@tanagram/lore 0.1.229 → 0.1.230
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/README.md +3 -3
- package/dist/index.js +6 -6
- package/package.json +2 -2
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 knt=Object.create;var YL=Object.defineProperty;var Ont=Object.getOwnPropertyDescriptor;var Pnt=Object.getOwnPropertyNames;var Mnt=Object.getPrototypeOf,Lnt=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 B=(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}},Ws=(e,t)=>{for(var n in t)YL(e,n,{get:t[n],enumerable:!0})},FAe=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Pnt(t))!Lnt.call(e,o)&&o!==n&&YL(e,o,{get:()=>t[o],enumerable:!(r=Ont(t,o))||r.enumerable});return e};var ue=(e,t,n)=>(n=e!=null?knt(Mnt(e)):{},FAe(t||!e||!e.__esModule?YL(n,"default",{value:e,enumerable:!0}):n,e)),Me=e=>FAe(YL({},"__esModule",{value:!0}),e);var A=B(()=>{(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.229"}}catch{}})()});var bg,Qq=B(()=>{A();bg="1.9.1"});function Unt(e){let t=new Set([e]),n=new Set,r=e.match(zAe);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(zAe);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 zAe,HAe,$Ae=B(()=>{A();Qq();zAe=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;HAe=Unt(bg)});function vm(e,t,n,r=!1){var o;let i=pw[dw]=(o=pw[dw])!==null&&o!==void 0?o:{version:bg};if(!r&&i[e]){let s=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return n.error(s.stack||s.message),!1}if(i.version!==bg){let s=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${bg}`);return n.error(s.stack||s.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${bg}.`),!0}function jl(e){var t,n;let r=(t=pw[dw])===null||t===void 0?void 0:t.version;if(!(!r||!HAe(r)))return(n=pw[dw])===null||n===void 0?void 0:n[e]}function Rm(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${bg}.`);let n=pw[dw];n&&delete n[e]}var Qnt,dw,pw,aS=B(()=>{A();Qq();$Ae();Qnt=bg.split(".")[0],dw=Symbol.for(`opentelemetry.js.api.${Qnt}`),pw=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function fw(e,t,n){let r=jl("diag");if(r)return r[e](t,...n)}var KL,qAe=B(()=>{A();aS();KL=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return fw("debug",this._namespace,t)}error(...t){return fw("error",this._namespace,t)}info(...t){return fw("info",this._namespace,t)}warn(...t){return fw("warn",this._namespace,t)}verbose(...t){return fw("verbose",this._namespace,t)}}});var Rs,JL=B(()=>{A();(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"})(Rs||(Rs={}))});function VAe(e,t){e<Rs.NONE?e=Rs.NONE:e>Rs.ALL&&(e=Rs.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",Rs.ERROR),warn:n("warn",Rs.WARN),info:n("info",Rs.INFO),debug:n("debug",Rs.DEBUG),verbose:n("verbose",Rs.VERBOSE)}}var YAe=B(()=>{A();JL()});var Fnt,Xs,uS=B(()=>{A();qAe();YAe();JL();aS();Fnt="diag",Xs=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let s=jl("diag");if(s)return s[o](...i)}}let n=this,r=(o,i={logLevel:Rs.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=jl("diag"),h=VAe((u=i.logLevel)!==null&&u!==void 0?u:Rs.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(Fnt,n)},n.createComponentLogger=o=>new KL(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var ZL,KAe=B(()=>{A();ZL=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 JAe,ZAe=B(()=>{A();JAe=Symbol("BaggageEntryMetadata")});function WAe(e={}){return new ZL(new Map(Object.entries(e)))}function XAe(e){return typeof e!="string"&&(Gnt.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:JAe,toString(){return e}}}var Gnt,Fq=B(()=>{A();uS();KAe();ZAe();Gnt=Xs.instance()});function zl(e){return Symbol.for(e)}var Gq,kC,mw=B(()=>{A();Gq=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}}},kC=new Gq});var jq,zq,WL,ege=B(()=>{A();jq=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],zq={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(zq[t]=console[t])}WL=class{constructor(){function t(n){return function(...r){let o=zq[n];if(typeof o!="function"&&(o=zq.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<jq.length;n++)this[jq[n].n]=t(jq[n].c)}}});function tge(){return Wq}var Hq,OC,$q,qq,Vq,Yq,Aw,Kq,Jq,Zq,Wq,jnt,znt,Hnt,$nt,qnt,Vnt,Ynt,Xq=B(()=>{A();Hq=class{constructor(){}createGauge(t,n){return znt}createHistogram(t,n){return Hnt}createCounter(t,n){return jnt}createUpDownCounter(t,n){return $nt}createObservableGauge(t,n){return Vnt}createObservableCounter(t,n){return qnt}createObservableUpDownCounter(t,n){return Ynt}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},OC=class{},$q=class extends OC{add(t,n){}},qq=class extends OC{add(t,n){}},Vq=class extends OC{record(t,n){}},Yq=class extends OC{record(t,n){}},Aw=class{addCallback(t){}removeCallback(t){}},Kq=class extends Aw{},Jq=class extends Aw{},Zq=class extends Aw{},Wq=new Hq,jnt=new $q,znt=new Vq,Hnt=new Yq,$nt=new qq,qnt=new Kq,Vnt=new Jq,Ynt=new Zq});var XL,nge=B(()=>{A();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(XL||(XL={}))});var eU,tU,eV=B(()=>{A();eU={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},tU={set(e,t,n){e!=null&&(e[t]=n)}}});var nU,rge=B(()=>{A();mw();nU=class{active(){return kC}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var tV,Knt,xm,gw=B(()=>{A();rge();aS();uS();tV="context",Knt=new nU,xm=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return vm(tV,t,Xs.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 jl(tV)||Knt}disable(){this._getContextManager().disable(),Rm(tV,Xs.instance())}}});var ou,nV=B(()=>{A();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(ou||(ou={}))});var hw,cS,rU,oU=B(()=>{A();nV();hw="0000000000000000",cS="00000000000000000000000000000000",rU={traceId:cS,spanId:hw,traceFlags:ou.NONE}});var Dm,iU=B(()=>{A();oU();Dm=class{constructor(t=rU){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 sU(e){return e.getValue(rV)||void 0}function oge(){return sU(xm.getInstance().active())}function _w(e,t){return e.setValue(rV,t)}function ige(e){return e.deleteValue(rV)}function sge(e,t){return _w(e,new Dm(t))}function aU(e){var t;return(t=sU(e))===null||t===void 0?void 0:t.spanContext()}var rV,oV=B(()=>{A();mw();iU();gw();rV=zl("OpenTelemetry Context Key SPAN")});function age(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(uU[e.charCodeAt(r)]|0)+(uU[e.charCodeAt(r+1)]|0)+(uU[e.charCodeAt(r+2)]|0)+(uU[e.charCodeAt(r+3)]|0);return n===t}function iV(e){return age(e,32)&&e!==cS}function sV(e){return age(e,16)&&e!==hw}function Ig(e){return iV(e.traceId)&&sV(e.spanId)}function uge(e){return new Dm(e)}var uU,cU=B(()=>{A();oU();iU();uU=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 Jnt(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 aV,PC,uV=B(()=>{A();gw();oV();iU();cU();aV=xm.getInstance(),PC=class{startSpan(t,n,r=aV.active()){if(!!n?.root)return new Dm;let i=r&&aU(r);return Jnt(i)&&Ig(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??aV.active(),f=this.startSpan(t,i,l),h=_w(l,f);return aV.with(h,u,void 0,f)}}});var Znt,MC,cV=B(()=>{A();uV();Znt=new PC,MC=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):Znt}}});var lU,cge=B(()=>{A();uV();lU=class{getTracer(t,n,r){return new PC}}});var Wnt,lS,lV=B(()=>{A();cV();cge();Wnt=new lU,lS=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new MC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Wnt}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 dU,lge=B(()=>{A();(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(dU||(dU={}))});var Ao,dge=B(()=>{A();(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"})(Ao||(Ao={}))});var gi,pge=B(()=>{A();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(gi||(gi={}))});function fge(e){return trt.test(e)}function mge(e){return nrt.test(e)&&!rrt.test(e)}var dV,Xnt,ert,trt,nrt,rrt,Age=B(()=>{A();dV="[_0-9a-z-*/]",Xnt=`[a-z]${dV}{0,255}`,ert=`[a-z0-9]${dV}{0,240}@[a-z]${dV}{0,13}`,trt=new RegExp(`^(?:${Xnt}|${ert})$`),nrt=/^[ -~]{0,255}[!-~]$/,rrt=/,|=/});var gge,ort,hge,_ge,pU,Ege=B(()=>{A();Age();gge=32,ort=512,hge=",",_ge="=",pU=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+_ge+this.get(n)),t),[]).join(hge)}_parse(t){t.length>ort||(this._internalState=t.split(hge).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(_ge);if(i!==-1){let s=o.slice(0,i),u=o.slice(i+1,r.length);fge(s)&&mge(u)&&n.set(s,u)}return n},new Map),this._internalState.size>gge&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,gge))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function yge(e){return new pU(e)}var Sge=B(()=>{A();Ege()});var We,Tge=B(()=>{A();gw();We=xm.getInstance()});var Hl,bge=B(()=>{A();uS();Hl=Xs.instance()});var pV,Ige,Cge=B(()=>{A();Xq();pV=class{getMeter(t,n,r){return Wq}},Ige=new pV});var fV,fU,vge=B(()=>{A();Cge();aS();uS();fV="metrics",fU=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return vm(fV,t,Xs.instance())}getMeterProvider(){return jl(fV)||Ige}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){Rm(fV,Xs.instance())}}});var mV,Rge=B(()=>{A();vge();mV=fU.getInstance()});var mU,xge=B(()=>{A();mU=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function gV(e){return e.getValue(AV)||void 0}function Dge(){return gV(xm.getInstance().active())}function Nge(e,t){return e.setValue(AV,t)}function wge(e){return e.deleteValue(AV)}var AV,Bge=B(()=>{A();gw();mw();AV=zl("OpenTelemetry Baggage Key")});var hV,irt,AU,kge=B(()=>{A();aS();xge();eV();Bge();Fq();uS();hV="propagation",irt=new mU,AU=class e{constructor(){this.createBaggage=WAe,this.getBaggage=gV,this.getActiveBaggage=Dge,this.setBaggage=Nge,this.deleteBaggage=wge}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return vm(hV,t,Xs.instance())}inject(t,n,r=tU){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=eU){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){Rm(hV,Xs.instance())}_getGlobalPropagator(){return jl(hV)||irt}}});var Af,Oge=B(()=>{A();kge();Af=AU.getInstance()});var _V,gU,Pge=B(()=>{A();aS();lV();cU();oV();uS();_V="trace",gU=class e{constructor(){this._proxyTracerProvider=new lS,this.wrapSpanContext=uge,this.isSpanContextValid=Ig,this.deleteSpan=ige,this.getSpan=sU,this.getActiveSpan=oge,this.getSpanContext=aU,this.setSpan=_w,this.setSpanContext=sge}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=vm(_V,this._proxyTracerProvider,Xs.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return jl(_V)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){Rm(_V,Xs.instance()),this._proxyTracerProvider=new lS}}});var Jt,Mge=B(()=>{A();Pge();Jt=gU.getInstance()});var tt={};Ws(tt,{DiagConsoleLogger:()=>WL,DiagLogLevel:()=>Rs,INVALID_SPANID:()=>hw,INVALID_SPAN_CONTEXT:()=>rU,INVALID_TRACEID:()=>cS,ProxyTracer:()=>MC,ProxyTracerProvider:()=>lS,ROOT_CONTEXT:()=>kC,SamplingDecision:()=>dU,SpanKind:()=>Ao,SpanStatusCode:()=>gi,TraceFlags:()=>ou,ValueType:()=>XL,baggageEntryMetadataFromString:()=>XAe,context:()=>We,createContextKey:()=>zl,createNoopMeter:()=>tge,createTraceState:()=>yge,default:()=>srt,defaultTextMapGetter:()=>eU,defaultTextMapSetter:()=>tU,diag:()=>Hl,isSpanContextValid:()=>Ig,isValidSpanId:()=>sV,isValidTraceId:()=>iV,metrics:()=>mV,propagation:()=>Af,trace:()=>Jt});var srt,He=B(()=>{A();Fq();mw();ege();JL();Xq();nge();eV();cV();lV();lge();dge();pge();nV();Sge();cU();oU();Tge();bge();Rge();Oge();Mge();srt={context:We,diag:Hl,metrics:mV,propagation:Af,trace:Jt}});var Ew=M(C_=>{"use strict";A();Object.defineProperty(C_,"__esModule",{value:!0});C_.isTracingSuppressed=C_.unsuppressTracing=C_.suppressTracing=void 0;var art=(He(),Me(tt)),EV=(0,art.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function urt(e){return e.setValue(EV,!0)}C_.suppressTracing=urt;function crt(e){return e.deleteValue(EV)}C_.unsuppressTracing=crt;function lrt(e){return e.getValue(EV)===!0}C_.isTracingSuppressed=lrt});var yV=M(iu=>{"use strict";A();Object.defineProperty(iu,"__esModule",{value:!0});iu.BAGGAGE_MAX_TOTAL_LENGTH=iu.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=iu.BAGGAGE_MAX_NAME_VALUE_PAIRS=iu.BAGGAGE_HEADER=iu.BAGGAGE_ITEMS_SEPARATOR=iu.BAGGAGE_PROPERTIES_SEPARATOR=iu.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;iu.BAGGAGE_KEY_PAIR_SEPARATOR="=";iu.BAGGAGE_PROPERTIES_SEPARATOR=";";iu.BAGGAGE_ITEMS_SEPARATOR=",";iu.BAGGAGE_HEADER="baggage";iu.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;iu.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;iu.BAGGAGE_MAX_TOTAL_LENGTH=8192});var TV=M(Kd=>{"use strict";A();Object.defineProperty(Kd,"__esModule",{value:!0});Kd.parseKeyPairsIntoRecord=Kd.parseBaggageHeaderString=Kd.parsePairKeyValue=Kd.getKeyPairs=Kd.serializeKeyPairs=void 0;var drt=(He(),Me(tt)),Nm=yV();function prt(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},"")}Kd.serializeKeyPairs=prt;function frt(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})}Kd.getKeyPairs=frt;function SV(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,drt.baggageEntryMetadataFromString)(f)}return{key:s,value:u,metadata:l}}Kd.parsePairKeyValue=SV;function mrt(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=SV(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]}Kd.parseBaggageHeaderString=mrt;function Art(e){let t={};return typeof e=="string"&&e.length>0&&e.split(Nm.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=SV(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}Kd.parseKeyPairsIntoRecord=Art});var Lge=M(_U=>{"use strict";A();Object.defineProperty(_U,"__esModule",{value:!0});_U.W3CBaggagePropagator=void 0;var bV=(He(),Me(tt)),grt=Ew(),yw=yV(),hU=TV(),IV=class{inject(t,n,r){let o=bV.propagation.getBaggage(t);if(!o||(0,grt.isTracingSuppressed)(t))return;let i=(0,hU.getKeyPairs)(o).filter(u=>u.length<=yw.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,yw.BAGGAGE_MAX_NAME_VALUE_PAIRS),s=(0,hU.serializeKeyPairs)(i);s.length>0&&r.set(n,yw.BAGGAGE_HEADER,s)}extract(t,n,r){let o=r.get(n,yw.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,hU.parseBaggageHeaderString)(o[l],i,s,u);else[s]=(0,hU.parseBaggageHeaderString)(o,i,s,u);return s===0?t:bV.propagation.setBaggage(t,bV.propagation.createBaggage(i))}fields(){return[yw.BAGGAGE_HEADER]}};_U.W3CBaggagePropagator=IV});var Uge=M(EU=>{"use strict";A();Object.defineProperty(EU,"__esModule",{value:!0});EU.AnchoredClock=void 0;var CV=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}};EU.AnchoredClock=CV});var zge=M(v_=>{"use strict";A();Object.defineProperty(v_,"__esModule",{value:!0});v_.isAttributeValue=v_.isAttributeKey=v_.sanitizeAttributes=void 0;var Qge=(He(),Me(tt));function hrt(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(!Fge(n)){Qge.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!Gge(r)){Qge.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}v_.sanitizeAttributes=hrt;function Fge(e){return typeof e=="string"&&e!==""}v_.isAttributeKey=Fge;function Gge(e){return e==null?!0:Array.isArray(e)?_rt(e):jge(typeof e)}v_.isAttributeValue=Gge;function _rt(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(jge(r)){t=r;continue}return!1}return!1}}return!0}function jge(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var vV=M(yU=>{"use strict";A();Object.defineProperty(yU,"__esModule",{value:!0});yU.loggingErrorHandler=void 0;var Ert=(He(),Me(tt));function yrt(){return e=>{Ert.diag.error(Srt(e))}}yU.loggingErrorHandler=yrt;function Srt(e){return typeof e=="string"?e:JSON.stringify(Trt(e))}function Trt(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 $ge=M(LC=>{"use strict";A();Object.defineProperty(LC,"__esModule",{value:!0});LC.globalErrorHandler=LC.setGlobalErrorHandler=void 0;var brt=vV(),Hge=(0,brt.loggingErrorHandler)();function Irt(e){Hge=e}LC.setGlobalErrorHandler=Irt;function Crt(e){try{Hge(e)}catch{}}LC.globalErrorHandler=Crt});var Kge=M(wm=>{"use strict";A();Object.defineProperty(wm,"__esModule",{value:!0});wm.getStringListFromEnv=wm.getBooleanFromEnv=wm.getStringFromEnv=wm.getNumberFromEnv=void 0;var qge=(He(),Me(tt)),Vge=Ue("util");function vrt(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){qge.diag.warn(`Unknown value ${(0,Vge.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}wm.getNumberFromEnv=vrt;function Yge(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}wm.getStringFromEnv=Yge;function Rrt(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||qge.diag.warn(`Unknown value ${(0,Vge.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}wm.getBooleanFromEnv=Rrt;function xrt(e){return Yge(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}wm.getStringListFromEnv=xrt});var Jge=M(SU=>{"use strict";A();Object.defineProperty(SU,"__esModule",{value:!0});SU._globalThis=void 0;SU._globalThis=globalThis});var Zge=M(TU=>{"use strict";A();Object.defineProperty(TU,"__esModule",{value:!0});TU.VERSION=void 0;TU.VERSION="2.8.0"});function Mi(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 RV=B(()=>{A()});var 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,whe,Bhe,khe,Ohe,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,w_e,B_e,k_e,O_e,P_e,M_e,L_e,U_e,Q_e,F_e,G_e,j_e,z_e,H_e,$_e,q_e,V_e,Y_e,K_e,J_e,Z_e,W_e,X_e,eEe,tEe,nEe,rEe,oEe,iEe,sEe,aEe,uEe,cEe,lEe,dEe,pEe,fEe,mEe,AEe,gEe,hEe,Drt,xV,Nrt,wrt,Brt,krt,DV,Ort,Prt,Mrt,Lrt,Urt,Qrt,Frt,Grt,jrt,zrt,Hrt,$rt,qrt,Vrt,Yrt,Krt,Jrt,Zrt,NV,Wrt,Xrt,eot,tot,not,rot,oot,iot,sot,aot,uot,cot,wV,lot,dot,BV,kV,pot,fot,mot,Aot,got,hot,_ot,Eot,yot,Sot,Tot,bot,Iot,Cot,vot,Rot,xot,Sw,UC,OV,Dot,Not,dS,wot,Bot,kot,Oot,PV,MV,Pot,LV,Mot,Lot,Uot,Qot,Fot,Got,jot,zot,Hot,$ot,qot,Vot,Yot,Kot,Jot,Zot,Wot,Xot,eit,tit,nit,rit,oit,UV,iit,sit,ait,uit,cit,lit,dit,pit,fit,mit,Ait,git,hit,_it,Eit,yit,Sit,Tit,bit,QV,Iit,FV,Cit,vit,Rit,xit,Dit,Nit,wit,Bit,kit,_Ee,EEe,yEe,SEe,TEe,bEe,IEe,CEe,vEe,REe,xEe,DEe,NEe,wEe,BEe,kEe,OEe,PEe,MEe,LEe,UEe,QEe,FEe,GEe,jEe,zEe,HEe,$Ee,qEe,VEe,YEe,KEe,JEe,ZEe,WEe,XEe,eye,tye,nye,rye,oye,iye,sye,aye,uye,cye,lye,Oit,Pit,Mit,Lit,Uit,Qit,Fit,Git,jit,zit,Hit,$it,qit,Vit,Yit,Kit,Jit,Zit,Wit,Xit,est,tst,nst,rst,ost,ist,sst,ast,ust,cst,lst,dst,pst,fst,mst,Ast,gst,hst,_st,Est,yst,Sst,Tst,bst,Ist,Cst,vst,Rst,dye,pye,fye,mye,Aye,gye,hye,_ye,Eye,yye,Sye,xst,Dst,Nst,wst,Bst,kst,Ost,Pst,Mst,Lst,Ust,Qst,Tye,bye,Iye,Cye,vye,Fst,Gst,jst,zst,Hst,$st,Rye,xye,Dye,qst,Vst,Yst,Kst,Nye,wye,Bye,kye,Jst,Zst,Wst,Xst,eat,Oye,Pye,Mye,Lye,Uye,Qye,Fye,tat,nat,rat,oat,iat,sat,aat,uat,Gye,jye,zye,Hye,$ye,cat,lat,dat,pat,fat,mat,qye,Vye,Yye,Kye,Jye,Zye,Wye,Xye,e0e,t0e,n0e,r0e,o0e,i0e,s0e,a0e,u0e,c0e,l0e,d0e,p0e,Aat,gat,hat,_at,Eat,yat,Sat,Tat,bat,Iat,Cat,vat,Rat,xat,Dat,Nat,wat,Bat,kat,Oat,Pat,Mat,f0e,m0e,A0e,g0e,h0e,Lat,Uat,Qat,Fat,Gat,jat,_0e,E0e,zat,Hat,$at,y0e,S0e,qat,Vat,Yat,T0e,b0e,I0e,C0e,v0e,R0e,x0e,D0e,N0e,w0e,B0e,k0e,O0e,P0e,M0e,L0e,U0e,Kat,Jat,Zat,Wat,Xat,eut,tut,nut,rut,out,iut,sut,aut,uut,cut,lut,dut,put,Q0e,F0e,fut,mut,Aut,G0e=B(()=>{A();RV();Wge="aws.lambda.invoked_arn",Xge="db.system",ehe="db.connection_string",the="db.user",nhe="db.jdbc.driver_classname",rhe="db.name",ohe="db.statement",ihe="db.operation",she="db.mssql.instance_name",ahe="db.cassandra.keyspace",uhe="db.cassandra.page_size",che="db.cassandra.consistency_level",lhe="db.cassandra.table",dhe="db.cassandra.idempotence",phe="db.cassandra.speculative_execution_count",fhe="db.cassandra.coordinator.id",mhe="db.cassandra.coordinator.dc",Ahe="db.hbase.namespace",ghe="db.redis.database_index",hhe="db.mongodb.collection",_he="db.sql.table",Ehe="exception.type",yhe="exception.message",She="exception.stacktrace",The="exception.escaped",bhe="faas.trigger",Ihe="faas.execution",Che="faas.document.collection",vhe="faas.document.operation",Rhe="faas.document.time",xhe="faas.document.name",Dhe="faas.time",Nhe="faas.cron",whe="faas.coldstart",Bhe="faas.invoked_name",khe="faas.invoked_provider",Ohe="faas.invoked_region",Phe="net.transport",Mhe="net.peer.ip",Lhe="net.peer.port",Uhe="net.peer.name",Qhe="net.host.ip",Fhe="net.host.port",Ghe="net.host.name",jhe="net.host.connection.type",zhe="net.host.connection.subtype",Hhe="net.host.carrier.name",$he="net.host.carrier.mcc",qhe="net.host.carrier.mnc",Vhe="net.host.carrier.icc",Yhe="peer.service",Khe="enduser.id",Jhe="enduser.role",Zhe="enduser.scope",Whe="thread.id",Xhe="thread.name",e_e="code.function",t_e="code.namespace",n_e="code.filepath",r_e="code.lineno",o_e="http.method",i_e="http.url",s_e="http.target",a_e="http.host",u_e="http.scheme",c_e="http.status_code",l_e="http.flavor",d_e="http.user_agent",p_e="http.request_content_length",f_e="http.request_content_length_uncompressed",m_e="http.response_content_length",A_e="http.response_content_length_uncompressed",g_e="http.server_name",h_e="http.route",__e="http.client_ip",E_e="aws.dynamodb.table_names",y_e="aws.dynamodb.consumed_capacity",S_e="aws.dynamodb.item_collection_metrics",T_e="aws.dynamodb.provisioned_read_capacity",b_e="aws.dynamodb.provisioned_write_capacity",I_e="aws.dynamodb.consistent_read",C_e="aws.dynamodb.projection",v_e="aws.dynamodb.limit",R_e="aws.dynamodb.attributes_to_get",x_e="aws.dynamodb.index_name",D_e="aws.dynamodb.select",N_e="aws.dynamodb.global_secondary_indexes",w_e="aws.dynamodb.local_secondary_indexes",B_e="aws.dynamodb.exclusive_start_table",k_e="aws.dynamodb.table_count",O_e="aws.dynamodb.scan_forward",P_e="aws.dynamodb.segment",M_e="aws.dynamodb.total_segments",L_e="aws.dynamodb.count",U_e="aws.dynamodb.scanned_count",Q_e="aws.dynamodb.attribute_definitions",F_e="aws.dynamodb.global_secondary_index_updates",G_e="messaging.system",j_e="messaging.destination",z_e="messaging.destination_kind",H_e="messaging.temp_destination",$_e="messaging.protocol",q_e="messaging.protocol_version",V_e="messaging.url",Y_e="messaging.message_id",K_e="messaging.conversation_id",J_e="messaging.message_payload_size_bytes",Z_e="messaging.message_payload_compressed_size_bytes",W_e="messaging.operation",X_e="messaging.consumer_id",eEe="messaging.rabbitmq.routing_key",tEe="messaging.kafka.message_key",nEe="messaging.kafka.consumer_group",rEe="messaging.kafka.client_id",oEe="messaging.kafka.partition",iEe="messaging.kafka.tombstone",sEe="rpc.system",aEe="rpc.service",uEe="rpc.method",cEe="rpc.grpc.status_code",lEe="rpc.jsonrpc.version",dEe="rpc.jsonrpc.request_id",pEe="rpc.jsonrpc.error_code",fEe="rpc.jsonrpc.error_message",mEe="message.type",AEe="message.id",gEe="message.compressed_size",hEe="message.uncompressed_size",Drt=Wge,xV=Xge,Nrt=ehe,wrt=the,Brt=nhe,krt=rhe,DV=ohe,Ort=ihe,Prt=she,Mrt=ahe,Lrt=uhe,Urt=che,Qrt=lhe,Frt=dhe,Grt=phe,jrt=fhe,zrt=mhe,Hrt=Ahe,$rt=ghe,qrt=hhe,Vrt=_he,Yrt=Ehe,Krt=yhe,Jrt=She,Zrt=The,NV=bhe,Wrt=Ihe,Xrt=Che,eot=vhe,tot=Rhe,not=xhe,rot=Dhe,oot=Nhe,iot=whe,sot=Bhe,aot=khe,uot=Ohe,cot=Phe,wV=Mhe,lot=Lhe,dot=Uhe,BV=Qhe,kV=Fhe,pot=Ghe,fot=jhe,mot=zhe,Aot=Hhe,got=$he,hot=qhe,_ot=Vhe,Eot=Yhe,yot=Khe,Sot=Jhe,Tot=Zhe,bot=Whe,Iot=Xhe,Cot=e_e,vot=t_e,Rot=n_e,xot=r_e,Sw=o_e,UC=i_e,OV=s_e,Dot=a_e,Not=u_e,dS=c_e,wot=l_e,Bot=d_e,kot=p_e,Oot=f_e,PV=m_e,MV=A_e,Pot=g_e,LV=h_e,Mot=__e,Lot=E_e,Uot=y_e,Qot=S_e,Fot=T_e,Got=b_e,jot=I_e,zot=C_e,Hot=v_e,$ot=R_e,qot=x_e,Vot=D_e,Yot=N_e,Kot=w_e,Jot=B_e,Zot=k_e,Wot=O_e,Xot=P_e,eit=M_e,tit=L_e,nit=U_e,rit=Q_e,oit=F_e,UV=G_e,iit=j_e,sit=z_e,ait=H_e,uit=$_e,cit=q_e,lit=V_e,dit=Y_e,pit=K_e,fit=J_e,mit=Z_e,Ait=W_e,git=X_e,hit=eEe,_it=tEe,Eit=nEe,yit=rEe,Sit=oEe,Tit=iEe,bit=sEe,QV=aEe,Iit=uEe,FV=cEe,Cit=lEe,vit=dEe,Rit=pEe,xit=fEe,Dit=mEe,Nit=AEe,wit=gEe,Bit=hEe,kit=Mi([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,whe,Bhe,khe,Ohe,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,w_e,B_e,k_e,O_e,P_e,M_e,L_e,U_e,Q_e,F_e,G_e,j_e,z_e,H_e,$_e,q_e,V_e,Y_e,K_e,J_e,Z_e,W_e,X_e,eEe,tEe,nEe,rEe,oEe,iEe,sEe,aEe,uEe,cEe,lEe,dEe,pEe,fEe,mEe,AEe,gEe,hEe]),_Ee="other_sql",EEe="mssql",yEe="mysql",SEe="oracle",TEe="db2",bEe="postgresql",IEe="redshift",CEe="hive",vEe="cloudscape",REe="hsqldb",xEe="progress",DEe="maxdb",NEe="hanadb",wEe="ingres",BEe="firstsql",kEe="edb",OEe="cache",PEe="adabas",MEe="firebird",LEe="derby",UEe="filemaker",QEe="informix",FEe="instantdb",GEe="interbase",jEe="mariadb",zEe="netezza",HEe="pervasive",$Ee="pointbase",qEe="sqlite",VEe="sybase",YEe="teradata",KEe="vertica",JEe="h2",ZEe="coldfusion",WEe="cassandra",XEe="hbase",eye="mongodb",tye="redis",nye="couchbase",rye="couchdb",oye="cosmosdb",iye="dynamodb",sye="neo4j",aye="geode",uye="elasticsearch",cye="memcached",lye="cockroachdb",Oit=_Ee,Pit=EEe,Mit=yEe,Lit=SEe,Uit=TEe,Qit=bEe,Fit=IEe,Git=CEe,jit=vEe,zit=REe,Hit=xEe,$it=DEe,qit=NEe,Vit=wEe,Yit=BEe,Kit=kEe,Jit=OEe,Zit=PEe,Wit=MEe,Xit=LEe,est=UEe,tst=QEe,nst=FEe,rst=GEe,ost=jEe,ist=zEe,sst=HEe,ast=$Ee,ust=qEe,cst=VEe,lst=YEe,dst=KEe,pst=JEe,fst=ZEe,mst=WEe,Ast=XEe,gst=eye,hst=tye,_st=nye,Est=rye,yst=oye,Sst=iye,Tst=sye,bst=aye,Ist=uye,Cst=cye,vst=lye,Rst=Mi([_Ee,EEe,yEe,SEe,TEe,bEe,IEe,CEe,vEe,REe,xEe,DEe,NEe,wEe,BEe,kEe,OEe,PEe,MEe,LEe,UEe,QEe,FEe,GEe,jEe,zEe,HEe,$Ee,qEe,VEe,YEe,KEe,JEe,ZEe,WEe,XEe,eye,tye,nye,rye,oye,iye,sye,aye,uye,cye,lye]),dye="all",pye="each_quorum",fye="quorum",mye="local_quorum",Aye="one",gye="two",hye="three",_ye="local_one",Eye="any",yye="serial",Sye="local_serial",xst=dye,Dst=pye,Nst=fye,wst=mye,Bst=Aye,kst=gye,Ost=hye,Pst=_ye,Mst=Eye,Lst=yye,Ust=Sye,Qst=Mi([dye,pye,fye,mye,Aye,gye,hye,_ye,Eye,yye,Sye]),Tye="datasource",bye="http",Iye="pubsub",Cye="timer",vye="other",Fst=Tye,Gst=bye,jst=Iye,zst=Cye,Hst=vye,$st=Mi([Tye,bye,Iye,Cye,vye]),Rye="insert",xye="edit",Dye="delete",qst=Rye,Vst=xye,Yst=Dye,Kst=Mi([Rye,xye,Dye]),Nye="alibaba_cloud",wye="aws",Bye="azure",kye="gcp",Jst=Nye,Zst=wye,Wst=Bye,Xst=kye,eat=Mi([Nye,wye,Bye,kye]),Oye="ip_tcp",Pye="ip_udp",Mye="ip",Lye="unix",Uye="pipe",Qye="inproc",Fye="other",tat=Oye,nat=Pye,rat=Mye,oat=Lye,iat=Uye,sat=Qye,aat=Fye,uat=Mi([Oye,Pye,Mye,Lye,Uye,Qye,Fye]),Gye="wifi",jye="wired",zye="cell",Hye="unavailable",$ye="unknown",cat=Gye,lat=jye,dat=zye,pat=Hye,fat=$ye,mat=Mi([Gye,jye,zye,Hye,$ye]),qye="gprs",Vye="edge",Yye="umts",Kye="cdma",Jye="evdo_0",Zye="evdo_a",Wye="cdma2000_1xrtt",Xye="hsdpa",e0e="hsupa",t0e="hspa",n0e="iden",r0e="evdo_b",o0e="lte",i0e="ehrpd",s0e="hspap",a0e="gsm",u0e="td_scdma",c0e="iwlan",l0e="nr",d0e="nrnsa",p0e="lte_ca",Aat=qye,gat=Vye,hat=Yye,_at=Kye,Eat=Jye,yat=Zye,Sat=Wye,Tat=Xye,bat=e0e,Iat=t0e,Cat=n0e,vat=r0e,Rat=o0e,xat=i0e,Dat=s0e,Nat=a0e,wat=u0e,Bat=c0e,kat=l0e,Oat=d0e,Pat=p0e,Mat=Mi([qye,Vye,Yye,Kye,Jye,Zye,Wye,Xye,e0e,t0e,n0e,r0e,o0e,i0e,s0e,a0e,u0e,c0e,l0e,d0e,p0e]),f0e="1.0",m0e="1.1",A0e="2.0",g0e="SPDY",h0e="QUIC",Lat=f0e,Uat=m0e,Qat=A0e,Fat=g0e,Gat=h0e,jat={HTTP_1_0:f0e,HTTP_1_1:m0e,HTTP_2_0:A0e,SPDY:g0e,QUIC:h0e},_0e="queue",E0e="topic",zat=_0e,Hat=E0e,$at=Mi([_0e,E0e]),y0e="receive",S0e="process",qat=y0e,Vat=S0e,Yat=Mi([y0e,S0e]),T0e=0,b0e=1,I0e=2,C0e=3,v0e=4,R0e=5,x0e=6,D0e=7,N0e=8,w0e=9,B0e=10,k0e=11,O0e=12,P0e=13,M0e=14,L0e=15,U0e=16,Kat=T0e,Jat=b0e,Zat=I0e,Wat=C0e,Xat=v0e,eut=R0e,tut=x0e,nut=D0e,rut=N0e,out=w0e,iut=B0e,sut=k0e,aut=O0e,uut=P0e,cut=M0e,lut=L0e,dut=U0e,put={OK:T0e,CANCELLED:b0e,UNKNOWN:I0e,INVALID_ARGUMENT:C0e,DEADLINE_EXCEEDED:v0e,NOT_FOUND:R0e,ALREADY_EXISTS:x0e,PERMISSION_DENIED:D0e,RESOURCE_EXHAUSTED:N0e,FAILED_PRECONDITION:w0e,ABORTED:B0e,OUT_OF_RANGE:k0e,UNIMPLEMENTED:O0e,INTERNAL:P0e,UNAVAILABLE:M0e,DATA_LOSS:L0e,UNAUTHENTICATED:U0e},Q0e="SENT",F0e="RECEIVED",fut=Q0e,mut=F0e,Aut=Mi([Q0e,F0e])});var j0e=B(()=>{A();G0e()});var z0e,H0e,$0e,q0e,V0e,Y0e,K0e,J0e,Z0e,W0e,X0e,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,wSe,BSe,kSe,OSe,PSe,MSe,LSe,USe,QSe,FSe,GSe,jSe,zSe,HSe,$Se,qSe,VSe,YSe,KSe,JSe,ZSe,WSe,XSe,eTe,tTe,nTe,rTe,oTe,iTe,sTe,aTe,uTe,cTe,lTe,dTe,pTe,fTe,mTe,ATe,gut,hut,_ut,Eut,yut,Sut,Tut,but,Iut,Cut,vut,Rut,xut,Dut,Nut,wut,But,kut,Out,Put,Mut,Lut,Uut,Qut,Fut,Gut,jut,zut,Hut,$ut,qut,Vut,Yut,Kut,Jut,Zut,Wut,Xut,ect,tct,nct,rct,oct,ict,sct,act,uct,cct,lct,dct,pct,fct,mct,Act,gct,hct,_ct,Ect,yct,Sct,Tct,bct,Ict,Cct,vct,Rct,xct,Dct,Nct,wct,Bct,GV,kct,Oct,Pct,Mct,Lct,Uct,Qct,Fct,Gct,jct,gTe,hTe,_Te,ETe,zct,Hct,$ct,qct,Vct,yTe,STe,TTe,bTe,ITe,CTe,vTe,RTe,xTe,DTe,NTe,wTe,BTe,kTe,OTe,PTe,MTe,Yct,Kct,Jct,Zct,Wct,Xct,elt,tlt,nlt,rlt,olt,ilt,slt,alt,ult,clt,llt,dlt,LTe,UTe,plt,flt,mlt,QTe,FTe,GTe,jTe,zTe,HTe,$Te,Alt,glt,hlt,_lt,Elt,ylt,Slt,Tlt,qTe,VTe,YTe,KTe,JTe,ZTe,WTe,XTe,ebe,tbe,nbe,blt,Ilt,Clt,vlt,Rlt,xlt,Dlt,Nlt,wlt,Blt,klt,Olt,rbe,obe,ibe,sbe,abe,ube,cbe,lbe,dbe,pbe,Plt,Mlt,Llt,Ult,Qlt,Flt,Glt,jlt,zlt,Hlt,$lt,fbe=B(()=>{A();RV();z0e="cloud.provider",H0e="cloud.account.id",$0e="cloud.region",q0e="cloud.availability_zone",V0e="cloud.platform",Y0e="aws.ecs.container.arn",K0e="aws.ecs.cluster.arn",J0e="aws.ecs.launchtype",Z0e="aws.ecs.task.arn",W0e="aws.ecs.task.family",X0e="aws.ecs.task.revision",eSe="aws.eks.cluster.arn",tSe="aws.log.group.names",nSe="aws.log.group.arns",rSe="aws.log.stream.names",oSe="aws.log.stream.arns",iSe="container.name",sSe="container.id",aSe="container.runtime",uSe="container.image.name",cSe="container.image.tag",lSe="deployment.environment",dSe="device.id",pSe="device.model.identifier",fSe="device.model.name",mSe="faas.name",ASe="faas.id",gSe="faas.version",hSe="faas.instance",_Se="faas.max_memory",ESe="host.id",ySe="host.name",SSe="host.type",TSe="host.arch",bSe="host.image.name",ISe="host.image.id",CSe="host.image.version",vSe="k8s.cluster.name",RSe="k8s.node.name",xSe="k8s.node.uid",DSe="k8s.namespace.name",NSe="k8s.pod.uid",wSe="k8s.pod.name",BSe="k8s.container.name",kSe="k8s.replicaset.uid",OSe="k8s.replicaset.name",PSe="k8s.deployment.uid",MSe="k8s.deployment.name",LSe="k8s.statefulset.uid",USe="k8s.statefulset.name",QSe="k8s.daemonset.uid",FSe="k8s.daemonset.name",GSe="k8s.job.uid",jSe="k8s.job.name",zSe="k8s.cronjob.uid",HSe="k8s.cronjob.name",$Se="os.type",qSe="os.description",VSe="os.name",YSe="os.version",KSe="process.pid",JSe="process.executable.name",ZSe="process.executable.path",WSe="process.command",XSe="process.command_line",eTe="process.command_args",tTe="process.owner",nTe="process.runtime.name",rTe="process.runtime.version",oTe="process.runtime.description",iTe="service.name",sTe="service.namespace",aTe="service.instance.id",uTe="service.version",cTe="telemetry.sdk.name",lTe="telemetry.sdk.language",dTe="telemetry.sdk.version",pTe="telemetry.auto.version",fTe="webengine.name",mTe="webengine.version",ATe="webengine.description",gut=z0e,hut=H0e,_ut=$0e,Eut=q0e,yut=V0e,Sut=Y0e,Tut=K0e,but=J0e,Iut=Z0e,Cut=W0e,vut=X0e,Rut=eSe,xut=tSe,Dut=nSe,Nut=rSe,wut=oSe,But=iSe,kut=sSe,Out=aSe,Put=uSe,Mut=cSe,Lut=lSe,Uut=dSe,Qut=pSe,Fut=fSe,Gut=mSe,jut=ASe,zut=gSe,Hut=hSe,$ut=_Se,qut=ESe,Vut=ySe,Yut=SSe,Kut=TSe,Jut=bSe,Zut=ISe,Wut=CSe,Xut=vSe,ect=RSe,tct=xSe,nct=DSe,rct=NSe,oct=wSe,ict=BSe,sct=kSe,act=OSe,uct=PSe,cct=MSe,lct=LSe,dct=USe,pct=QSe,fct=FSe,mct=GSe,Act=jSe,gct=zSe,hct=HSe,_ct=$Se,Ect=qSe,yct=VSe,Sct=YSe,Tct=KSe,bct=JSe,Ict=ZSe,Cct=WSe,vct=XSe,Rct=eTe,xct=tTe,Dct=nTe,Nct=rTe,wct=oTe,Bct=iTe,GV=sTe,kct=aTe,Oct=uTe,Pct=cTe,Mct=lTe,Lct=dTe,Uct=pTe,Qct=fTe,Fct=mTe,Gct=ATe,jct=Mi([z0e,H0e,$0e,q0e,V0e,Y0e,K0e,J0e,Z0e,W0e,X0e,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,wSe,BSe,kSe,OSe,PSe,MSe,LSe,USe,QSe,FSe,GSe,jSe,zSe,HSe,$Se,qSe,VSe,YSe,KSe,JSe,ZSe,WSe,XSe,eTe,tTe,nTe,rTe,oTe,iTe,sTe,aTe,uTe,cTe,lTe,dTe,pTe,fTe,mTe,ATe]),gTe="alibaba_cloud",hTe="aws",_Te="azure",ETe="gcp",zct=gTe,Hct=hTe,$ct=_Te,qct=ETe,Vct=Mi([gTe,hTe,_Te,ETe]),yTe="alibaba_cloud_ecs",STe="alibaba_cloud_fc",TTe="aws_ec2",bTe="aws_ecs",ITe="aws_eks",CTe="aws_lambda",vTe="aws_elastic_beanstalk",RTe="azure_vm",xTe="azure_container_instances",DTe="azure_aks",NTe="azure_functions",wTe="azure_app_service",BTe="gcp_compute_engine",kTe="gcp_cloud_run",OTe="gcp_kubernetes_engine",PTe="gcp_cloud_functions",MTe="gcp_app_engine",Yct=yTe,Kct=STe,Jct=TTe,Zct=bTe,Wct=ITe,Xct=CTe,elt=vTe,tlt=RTe,nlt=xTe,rlt=DTe,olt=NTe,ilt=wTe,slt=BTe,alt=kTe,ult=OTe,clt=PTe,llt=MTe,dlt=Mi([yTe,STe,TTe,bTe,ITe,CTe,vTe,RTe,xTe,DTe,NTe,wTe,BTe,kTe,OTe,PTe,MTe]),LTe="ec2",UTe="fargate",plt=LTe,flt=UTe,mlt=Mi([LTe,UTe]),QTe="amd64",FTe="arm32",GTe="arm64",jTe="ia64",zTe="ppc32",HTe="ppc64",$Te="x86",Alt=QTe,glt=FTe,hlt=GTe,_lt=jTe,Elt=zTe,ylt=HTe,Slt=$Te,Tlt=Mi([QTe,FTe,GTe,jTe,zTe,HTe,$Te]),qTe="windows",VTe="linux",YTe="darwin",KTe="freebsd",JTe="netbsd",ZTe="openbsd",WTe="dragonflybsd",XTe="hpux",ebe="aix",tbe="solaris",nbe="z_os",blt=qTe,Ilt=VTe,Clt=YTe,vlt=KTe,Rlt=JTe,xlt=ZTe,Dlt=WTe,Nlt=XTe,wlt=ebe,Blt=tbe,klt=nbe,Olt=Mi([qTe,VTe,YTe,KTe,JTe,ZTe,WTe,XTe,ebe,tbe,nbe]),rbe="cpp",obe="dotnet",ibe="erlang",sbe="go",abe="java",ube="nodejs",cbe="php",lbe="python",dbe="ruby",pbe="webjs",Plt=rbe,Mlt=obe,Llt=ibe,Ult=sbe,Qlt=abe,Flt=ube,Glt=cbe,jlt=lbe,zlt=dbe,Hlt=pbe,$lt=Mi([rbe,obe,ibe,sbe,abe,ube,cbe,lbe,dbe,pbe])});var mbe=B(()=>{A();fbe()});var qlt,Vlt,Ylt,Klt,Jlt,Zlt,Wlt,Xlt,edt,tdt,ndt,rdt,odt,idt,sdt,adt,udt,cdt,ldt,ddt,pdt,fdt,mdt,Adt,gdt,jV,zV,hdt,QC,_dt,HV,$V,Edt,pS,ydt,Sdt,Tdt,bdt,Idt,Cdt,vdt,Rdt,yun,Sun,qV,xdt,Ddt,Ndt,wdt,Bdt,kdt,fS,Odt,Pdt,Mdt,Tun,Ldt,Udt,Qdt,Fdt,bun,Gdt,jdt,zdt,Hdt,Cg,vg,$dt,qdt,Vdt,Ydt,Kdt,Jdt,Zdt,Wdt,Xdt,Iun,ept,tpt,npt,rpt,opt,ipt,VV,YV,spt,KV,JV,apt,upt,Cun,vun,cpt,lpt,dpt,ppt,fpt,mpt,Apt,gpt,Run,hpt,ZV,WV,_pt,XV,Ept,e7,ypt,Spt,Tpt,bpt,Ipt,Cpt,vpt,Rpt,xpt,xun,Dpt,Npt,Dun,wpt,Bpt,Nun,kpt,Opt,Ppt,Mpt,Lpt,Upt,Qpt,Fpt,R_,Gpt,jpt,zpt,t7,Abe=B(()=>{A();qlt="aspnetcore.diagnostics.exception.result",Vlt="aborted",Ylt="handled",Klt="skipped",Jlt="unhandled",Zlt="aspnetcore.diagnostics.handler.type",Wlt="aspnetcore.rate_limiting.policy",Xlt="aspnetcore.rate_limiting.result",edt="acquired",tdt="endpoint_limiter",ndt="global_limiter",rdt="request_canceled",odt="aspnetcore.request.is_unhandled",idt="aspnetcore.routing.is_fallback",sdt="aspnetcore.routing.match_status",adt="failure",udt="success",cdt="aspnetcore.user.is_authenticated",ldt="client.address",ddt="client.port",pdt="code.column.number",fdt="code.file.path",mdt="code.function.name",Adt="code.line.number",gdt="code.stacktrace",jV="db.collection.name",zV="db.namespace",hdt="db.operation.batch.size",QC="db.operation.name",_dt="db.query.summary",HV="db.query.text",$V="db.response.status_code",Edt="db.stored_procedure.name",pS="db.system.name",ydt="mariadb",Sdt="microsoft.sql_server",Tdt="mysql",bdt="postgresql",Idt="dotnet.gc.heap.generation",Cdt="gen0",vdt="gen1",Rdt="gen2",yun="loh",Sun="poh",qV="error.type",xdt="_OTHER",Ddt="exception.escaped",Ndt="exception.message",wdt="exception.stacktrace",Bdt="exception.type",kdt=e=>`http.request.header.${e}`,fS="http.request.method",Odt="_OTHER",Pdt="CONNECT",Mdt="DELETE",Tun="GET",Ldt="HEAD",Udt="OPTIONS",Qdt="PATCH",Fdt="POST",bun="PUT",Gdt="TRACE",jdt="http.request.method_original",zdt="http.request.resend_count",Hdt=e=>`http.response.header.${e}`,Cg="http.response.status_code",vg="http.route",$dt="jvm.gc.action",qdt="jvm.gc.name",Vdt="jvm.memory.pool.name",Ydt="jvm.memory.type",Kdt="heap",Jdt="non_heap",Zdt="jvm.thread.daemon",Wdt="jvm.thread.state",Xdt="blocked",Iun="new",ept="runnable",tpt="terminated",npt="timed_waiting",rpt="waiting",opt="network.local.address",ipt="network.local.port",VV="network.peer.address",YV="network.peer.port",spt="network.protocol.name",KV="network.protocol.version",JV="network.transport",apt="pipe",upt="quic",Cun="tcp",vun="udp",cpt="unix",lpt="network.type",dpt="ipv4",ppt="ipv6",fpt="otel.scope.name",mpt="otel.scope.version",Apt="otel.status_code",gpt="ERROR",Run="OK",hpt="otel.status_description",ZV="server.address",WV="server.port",_pt="service.instance.id",XV="service.name",Ept="service.namespace",e7="service.version",ypt="signalr.connection.status",Spt="app_shutdown",Tpt="normal_closure",bpt="timeout",Ipt="signalr.transport",Cpt="long_polling",vpt="server_sent_events",Rpt="web_sockets",xpt="telemetry.sdk.language",xun="cpp",Dpt="dotnet",Npt="erlang",Dun="go",wpt="java",Bpt="nodejs",Nun="php",kpt="python",Opt="ruby",Ppt="rust",Mpt="swift",Lpt="webjs",Upt="telemetry.sdk.name",Qpt="telemetry.sdk.version",Fpt="url.fragment",R_="url.full",Gpt="url.path",jpt="url.query",zpt="url.scheme",t7="user_agent.original"});var Hpt,$pt,qpt,Vpt,Ypt,Kpt,Jpt,Zpt,Wpt,Xpt,eft,tft,nft,rft,oft,ift,sft,aft,uft,cft,lft,dft,pft,fft,mft,Aft,gft,hft,_ft,Eft,yft,Sft,Tft,bft,Ift,Cft,vft,Rft,xft,Dft,Nft,wft,Bft,kft,Oft,Pft,Mft,Lft,Uft,Qft,Fft,gbe=B(()=>{A();Hpt="aspnetcore.diagnostics.exceptions",$pt="aspnetcore.rate_limiting.active_request_leases",qpt="aspnetcore.rate_limiting.queued_requests",Vpt="aspnetcore.rate_limiting.request.time_in_queue",Ypt="aspnetcore.rate_limiting.request_lease.duration",Kpt="aspnetcore.rate_limiting.requests",Jpt="aspnetcore.routing.match_attempts",Zpt="db.client.operation.duration",Wpt="dotnet.assembly.count",Xpt="dotnet.exceptions",eft="dotnet.gc.collections",tft="dotnet.gc.heap.total_allocated",nft="dotnet.gc.last_collection.heap.fragmentation.size",rft="dotnet.gc.last_collection.heap.size",oft="dotnet.gc.last_collection.memory.committed_size",ift="dotnet.gc.pause.time",sft="dotnet.jit.compilation.time",aft="dotnet.jit.compiled_il.size",uft="dotnet.jit.compiled_methods",cft="dotnet.monitor.lock_contentions",lft="dotnet.process.cpu.count",dft="dotnet.process.cpu.time",pft="dotnet.process.memory.working_set",fft="dotnet.thread_pool.queue.length",mft="dotnet.thread_pool.thread.count",Aft="dotnet.thread_pool.work_item.count",gft="dotnet.timer.count",hft="http.client.request.duration",_ft="http.server.request.duration",Eft="jvm.class.count",yft="jvm.class.loaded",Sft="jvm.class.unloaded",Tft="jvm.cpu.count",bft="jvm.cpu.recent_utilization",Ift="jvm.cpu.time",Cft="jvm.gc.duration",vft="jvm.memory.committed",Rft="jvm.memory.limit",xft="jvm.memory.used",Dft="jvm.memory.used_after_last_gc",Nft="jvm.thread.count",wft="kestrel.active_connections",Bft="kestrel.active_tls_handshakes",kft="kestrel.connection.duration",Oft="kestrel.queued_connections",Pft="kestrel.queued_requests",Mft="kestrel.rejected_connections",Lft="kestrel.tls_handshake.duration",Uft="kestrel.upgraded_connections",Qft="signalr.server.active_connections",Fft="signalr.server.connection.duration"});var Gft,hbe=B(()=>{A();Gft="exception"});var Vr={};Ws(Vr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>Vlt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>Ylt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>Klt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>Jlt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>edt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>tdt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>ndt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>rdt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>adt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>udt,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>qlt,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Zlt,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>Wlt,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>Xlt,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>odt,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>idt,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>sdt,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>cdt,ATTR_CLIENT_ADDRESS:()=>ldt,ATTR_CLIENT_PORT:()=>ddt,ATTR_CODE_COLUMN_NUMBER:()=>pdt,ATTR_CODE_FILE_PATH:()=>fdt,ATTR_CODE_FUNCTION_NAME:()=>mdt,ATTR_CODE_LINE_NUMBER:()=>Adt,ATTR_CODE_STACKTRACE:()=>gdt,ATTR_DB_COLLECTION_NAME:()=>jV,ATTR_DB_NAMESPACE:()=>zV,ATTR_DB_OPERATION_BATCH_SIZE:()=>hdt,ATTR_DB_OPERATION_NAME:()=>QC,ATTR_DB_QUERY_SUMMARY:()=>_dt,ATTR_DB_QUERY_TEXT:()=>HV,ATTR_DB_RESPONSE_STATUS_CODE:()=>$V,ATTR_DB_STORED_PROCEDURE_NAME:()=>Edt,ATTR_DB_SYSTEM_NAME:()=>pS,ATTR_DOTNET_GC_HEAP_GENERATION:()=>Idt,ATTR_ERROR_TYPE:()=>qV,ATTR_EXCEPTION_ESCAPED:()=>Ddt,ATTR_EXCEPTION_MESSAGE:()=>Ndt,ATTR_EXCEPTION_STACKTRACE:()=>wdt,ATTR_EXCEPTION_TYPE:()=>Bdt,ATTR_HTTP_REQUEST_HEADER:()=>kdt,ATTR_HTTP_REQUEST_METHOD:()=>fS,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>jdt,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>zdt,ATTR_HTTP_RESPONSE_HEADER:()=>Hdt,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>Cg,ATTR_HTTP_ROUTE:()=>vg,ATTR_JVM_GC_ACTION:()=>$dt,ATTR_JVM_GC_NAME:()=>qdt,ATTR_JVM_MEMORY_POOL_NAME:()=>Vdt,ATTR_JVM_MEMORY_TYPE:()=>Ydt,ATTR_JVM_THREAD_DAEMON:()=>Zdt,ATTR_JVM_THREAD_STATE:()=>Wdt,ATTR_NETWORK_LOCAL_ADDRESS:()=>opt,ATTR_NETWORK_LOCAL_PORT:()=>ipt,ATTR_NETWORK_PEER_ADDRESS:()=>VV,ATTR_NETWORK_PEER_PORT:()=>YV,ATTR_NETWORK_PROTOCOL_NAME:()=>spt,ATTR_NETWORK_PROTOCOL_VERSION:()=>KV,ATTR_NETWORK_TRANSPORT:()=>JV,ATTR_NETWORK_TYPE:()=>lpt,ATTR_OTEL_SCOPE_NAME:()=>fpt,ATTR_OTEL_SCOPE_VERSION:()=>mpt,ATTR_OTEL_STATUS_CODE:()=>Apt,ATTR_OTEL_STATUS_DESCRIPTION:()=>hpt,ATTR_SERVER_ADDRESS:()=>ZV,ATTR_SERVER_PORT:()=>WV,ATTR_SERVICE_INSTANCE_ID:()=>_pt,ATTR_SERVICE_NAME:()=>XV,ATTR_SERVICE_NAMESPACE:()=>Ept,ATTR_SERVICE_VERSION:()=>e7,ATTR_SIGNALR_CONNECTION_STATUS:()=>ypt,ATTR_SIGNALR_TRANSPORT:()=>Ipt,ATTR_TELEMETRY_SDK_LANGUAGE:()=>xpt,ATTR_TELEMETRY_SDK_NAME:()=>Upt,ATTR_TELEMETRY_SDK_VERSION:()=>Qpt,ATTR_URL_FRAGMENT:()=>Fpt,ATTR_URL_FULL:()=>R_,ATTR_URL_PATH:()=>Gpt,ATTR_URL_QUERY:()=>jpt,ATTR_URL_SCHEME:()=>zpt,ATTR_USER_AGENT_ORIGINAL:()=>t7,AWSECSLAUNCHTYPEVALUES_EC2:()=>plt,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>flt,AwsEcsLaunchtypeValues:()=>mlt,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>Yct,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>Kct,CLOUDPLATFORMVALUES_AWS_EC2:()=>Jct,CLOUDPLATFORMVALUES_AWS_ECS:()=>Zct,CLOUDPLATFORMVALUES_AWS_EKS:()=>Wct,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>elt,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>Xct,CLOUDPLATFORMVALUES_AZURE_AKS:()=>rlt,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>ilt,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>nlt,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>olt,CLOUDPLATFORMVALUES_AZURE_VM:()=>tlt,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>llt,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>clt,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>alt,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>slt,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>ult,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>zct,CLOUDPROVIDERVALUES_AWS:()=>Hct,CLOUDPROVIDERVALUES_AZURE:()=>$ct,CLOUDPROVIDERVALUES_GCP:()=>qct,CloudPlatformValues:()=>dlt,CloudProviderValues:()=>Vct,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>xst,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>Mst,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>Dst,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>Pst,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>wst,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>Ust,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>Bst,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>Nst,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>Lst,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>Ost,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>kst,DBSYSTEMVALUES_ADABAS:()=>Zit,DBSYSTEMVALUES_CACHE:()=>Jit,DBSYSTEMVALUES_CASSANDRA:()=>mst,DBSYSTEMVALUES_CLOUDSCAPE:()=>jit,DBSYSTEMVALUES_COCKROACHDB:()=>vst,DBSYSTEMVALUES_COLDFUSION:()=>fst,DBSYSTEMVALUES_COSMOSDB:()=>yst,DBSYSTEMVALUES_COUCHBASE:()=>_st,DBSYSTEMVALUES_COUCHDB:()=>Est,DBSYSTEMVALUES_DB2:()=>Uit,DBSYSTEMVALUES_DERBY:()=>Xit,DBSYSTEMVALUES_DYNAMODB:()=>Sst,DBSYSTEMVALUES_EDB:()=>Kit,DBSYSTEMVALUES_ELASTICSEARCH:()=>Ist,DBSYSTEMVALUES_FILEMAKER:()=>est,DBSYSTEMVALUES_FIREBIRD:()=>Wit,DBSYSTEMVALUES_FIRSTSQL:()=>Yit,DBSYSTEMVALUES_GEODE:()=>bst,DBSYSTEMVALUES_H2:()=>pst,DBSYSTEMVALUES_HANADB:()=>qit,DBSYSTEMVALUES_HBASE:()=>Ast,DBSYSTEMVALUES_HIVE:()=>Git,DBSYSTEMVALUES_HSQLDB:()=>zit,DBSYSTEMVALUES_INFORMIX:()=>tst,DBSYSTEMVALUES_INGRES:()=>Vit,DBSYSTEMVALUES_INSTANTDB:()=>nst,DBSYSTEMVALUES_INTERBASE:()=>rst,DBSYSTEMVALUES_MARIADB:()=>ost,DBSYSTEMVALUES_MAXDB:()=>$it,DBSYSTEMVALUES_MEMCACHED:()=>Cst,DBSYSTEMVALUES_MONGODB:()=>gst,DBSYSTEMVALUES_MSSQL:()=>Pit,DBSYSTEMVALUES_MYSQL:()=>Mit,DBSYSTEMVALUES_NEO4J:()=>Tst,DBSYSTEMVALUES_NETEZZA:()=>ist,DBSYSTEMVALUES_ORACLE:()=>Lit,DBSYSTEMVALUES_OTHER_SQL:()=>Oit,DBSYSTEMVALUES_PERVASIVE:()=>sst,DBSYSTEMVALUES_POINTBASE:()=>ast,DBSYSTEMVALUES_POSTGRESQL:()=>Qit,DBSYSTEMVALUES_PROGRESS:()=>Hit,DBSYSTEMVALUES_REDIS:()=>hst,DBSYSTEMVALUES_REDSHIFT:()=>Fit,DBSYSTEMVALUES_SQLITE:()=>ust,DBSYSTEMVALUES_SYBASE:()=>cst,DBSYSTEMVALUES_TERADATA:()=>lst,DBSYSTEMVALUES_VERTICA:()=>dst,DB_SYSTEM_NAME_VALUE_MARIADB:()=>ydt,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>Sdt,DB_SYSTEM_NAME_VALUE_MYSQL:()=>Tdt,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>bdt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>Cdt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>vdt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>Rdt,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>yun,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>Sun,DbCassandraConsistencyLevelValues:()=>Qst,DbSystemValues:()=>Rst,ERROR_TYPE_VALUE_OTHER:()=>xdt,EVENT_EXCEPTION:()=>Gft,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>Yst,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>Vst,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>qst,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>Jst,FAASINVOKEDPROVIDERVALUES_AWS:()=>Zst,FAASINVOKEDPROVIDERVALUES_AZURE:()=>Wst,FAASINVOKEDPROVIDERVALUES_GCP:()=>Xst,FAASTRIGGERVALUES_DATASOURCE:()=>Fst,FAASTRIGGERVALUES_HTTP:()=>Gst,FAASTRIGGERVALUES_OTHER:()=>Hst,FAASTRIGGERVALUES_PUBSUB:()=>jst,FAASTRIGGERVALUES_TIMER:()=>zst,FaasDocumentOperationValues:()=>Kst,FaasInvokedProviderValues:()=>eat,FaasTriggerValues:()=>$st,HOSTARCHVALUES_AMD64:()=>Alt,HOSTARCHVALUES_ARM32:()=>glt,HOSTARCHVALUES_ARM64:()=>hlt,HOSTARCHVALUES_IA64:()=>_lt,HOSTARCHVALUES_PPC32:()=>Elt,HOSTARCHVALUES_PPC64:()=>ylt,HOSTARCHVALUES_X86:()=>Slt,HTTPFLAVORVALUES_HTTP_1_0:()=>Lat,HTTPFLAVORVALUES_HTTP_1_1:()=>Uat,HTTPFLAVORVALUES_HTTP_2_0:()=>Qat,HTTPFLAVORVALUES_QUIC:()=>Gat,HTTPFLAVORVALUES_SPDY:()=>Fat,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>Pdt,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>Mdt,HTTP_REQUEST_METHOD_VALUE_GET:()=>Tun,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>Ldt,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>Udt,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>Odt,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>Qdt,HTTP_REQUEST_METHOD_VALUE_POST:()=>Fdt,HTTP_REQUEST_METHOD_VALUE_PUT:()=>bun,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>Gdt,HostArchValues:()=>Tlt,HttpFlavorValues:()=>jat,JVM_MEMORY_TYPE_VALUE_HEAP:()=>Kdt,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>Jdt,JVM_THREAD_STATE_VALUE_BLOCKED:()=>Xdt,JVM_THREAD_STATE_VALUE_NEW:()=>Iun,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>ept,JVM_THREAD_STATE_VALUE_TERMINATED:()=>tpt,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>npt,JVM_THREAD_STATE_VALUE_WAITING:()=>rpt,MESSAGETYPEVALUES_RECEIVED:()=>mut,MESSAGETYPEVALUES_SENT:()=>fut,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>zat,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>Hat,MESSAGINGOPERATIONVALUES_PROCESS:()=>Vat,MESSAGINGOPERATIONVALUES_RECEIVE:()=>qat,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>Hpt,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>$pt,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>qpt,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>Kpt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>Ypt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>Vpt,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>Jpt,METRIC_DB_CLIENT_OPERATION_DURATION:()=>Zpt,METRIC_DOTNET_ASSEMBLY_COUNT:()=>Wpt,METRIC_DOTNET_EXCEPTIONS:()=>Xpt,METRIC_DOTNET_GC_COLLECTIONS:()=>eft,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>tft,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>nft,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>rft,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>oft,METRIC_DOTNET_GC_PAUSE_TIME:()=>ift,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>sft,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>aft,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>uft,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>cft,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>lft,METRIC_DOTNET_PROCESS_CPU_TIME:()=>dft,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>pft,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>fft,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>mft,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>Aft,METRIC_DOTNET_TIMER_COUNT:()=>gft,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>hft,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>_ft,METRIC_JVM_CLASS_COUNT:()=>Eft,METRIC_JVM_CLASS_LOADED:()=>yft,METRIC_JVM_CLASS_UNLOADED:()=>Sft,METRIC_JVM_CPU_COUNT:()=>Tft,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>bft,METRIC_JVM_CPU_TIME:()=>Ift,METRIC_JVM_GC_DURATION:()=>Cft,METRIC_JVM_MEMORY_COMMITTED:()=>vft,METRIC_JVM_MEMORY_LIMIT:()=>Rft,METRIC_JVM_MEMORY_USED:()=>xft,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>Dft,METRIC_JVM_THREAD_COUNT:()=>Nft,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>wft,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>Bft,METRIC_KESTREL_CONNECTION_DURATION:()=>kft,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>Oft,METRIC_KESTREL_QUEUED_REQUESTS:()=>Pft,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>Mft,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>Lft,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>Uft,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>Qft,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>Fft,MessageTypeValues:()=>Aut,MessagingDestinationKindValues:()=>$at,MessagingOperationValues:()=>Yat,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>_at,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>Sat,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>gat,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>xat,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>Eat,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>yat,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>vat,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>Aat,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>Nat,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>Tat,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>Iat,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>Dat,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>bat,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>Cat,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>Bat,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>Rat,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>Pat,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>kat,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>Oat,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>wat,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>hat,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>dat,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>pat,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>fat,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>cat,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>lat,NETTRANSPORTVALUES_INPROC:()=>sat,NETTRANSPORTVALUES_IP:()=>rat,NETTRANSPORTVALUES_IP_TCP:()=>tat,NETTRANSPORTVALUES_IP_UDP:()=>nat,NETTRANSPORTVALUES_OTHER:()=>aat,NETTRANSPORTVALUES_PIPE:()=>iat,NETTRANSPORTVALUES_UNIX:()=>oat,NETWORK_TRANSPORT_VALUE_PIPE:()=>apt,NETWORK_TRANSPORT_VALUE_QUIC:()=>upt,NETWORK_TRANSPORT_VALUE_TCP:()=>Cun,NETWORK_TRANSPORT_VALUE_UDP:()=>vun,NETWORK_TRANSPORT_VALUE_UNIX:()=>cpt,NETWORK_TYPE_VALUE_IPV4:()=>dpt,NETWORK_TYPE_VALUE_IPV6:()=>ppt,NetHostConnectionSubtypeValues:()=>Mat,NetHostConnectionTypeValues:()=>mat,NetTransportValues:()=>uat,OSTYPEVALUES_AIX:()=>wlt,OSTYPEVALUES_DARWIN:()=>Clt,OSTYPEVALUES_DRAGONFLYBSD:()=>Dlt,OSTYPEVALUES_FREEBSD:()=>vlt,OSTYPEVALUES_HPUX:()=>Nlt,OSTYPEVALUES_LINUX:()=>Ilt,OSTYPEVALUES_NETBSD:()=>Rlt,OSTYPEVALUES_OPENBSD:()=>xlt,OSTYPEVALUES_SOLARIS:()=>Blt,OSTYPEVALUES_WINDOWS:()=>blt,OSTYPEVALUES_Z_OS:()=>klt,OTEL_STATUS_CODE_VALUE_ERROR:()=>gpt,OTEL_STATUS_CODE_VALUE_OK:()=>Run,OsTypeValues:()=>Olt,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>iut,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>tut,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>Jat,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>lut,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>Xat,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>out,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>uut,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>Wat,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>eut,RPCGRPCSTATUSCODEVALUES_OK:()=>Kat,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>sut,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>nut,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>rut,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>dut,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>cut,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>aut,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>Zat,RpcGrpcStatusCodeValues:()=>put,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>$ot,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>rit,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>jot,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>Uot,SEMATTRS_AWS_DYNAMODB_COUNT:()=>tit,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>Jot,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>Yot,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>oit,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>qot,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>Qot,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>Hot,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>Kot,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>zot,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>Fot,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>Got,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>nit,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>Wot,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>Xot,SEMATTRS_AWS_DYNAMODB_SELECT:()=>Vot,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>Zot,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>Lot,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>eit,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>Drt,SEMATTRS_CODE_FILEPATH:()=>Rot,SEMATTRS_CODE_FUNCTION:()=>Cot,SEMATTRS_CODE_LINENO:()=>xot,SEMATTRS_CODE_NAMESPACE:()=>vot,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>Urt,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>zrt,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>jrt,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>Frt,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>Mrt,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>Lrt,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>Grt,SEMATTRS_DB_CASSANDRA_TABLE:()=>Qrt,SEMATTRS_DB_CONNECTION_STRING:()=>Nrt,SEMATTRS_DB_HBASE_NAMESPACE:()=>Hrt,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>Brt,SEMATTRS_DB_MONGODB_COLLECTION:()=>qrt,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>Prt,SEMATTRS_DB_NAME:()=>krt,SEMATTRS_DB_OPERATION:()=>Ort,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>$rt,SEMATTRS_DB_SQL_TABLE:()=>Vrt,SEMATTRS_DB_STATEMENT:()=>DV,SEMATTRS_DB_SYSTEM:()=>xV,SEMATTRS_DB_USER:()=>wrt,SEMATTRS_ENDUSER_ID:()=>yot,SEMATTRS_ENDUSER_ROLE:()=>Sot,SEMATTRS_ENDUSER_SCOPE:()=>Tot,SEMATTRS_EXCEPTION_ESCAPED:()=>Zrt,SEMATTRS_EXCEPTION_MESSAGE:()=>Krt,SEMATTRS_EXCEPTION_STACKTRACE:()=>Jrt,SEMATTRS_EXCEPTION_TYPE:()=>Yrt,SEMATTRS_FAAS_COLDSTART:()=>iot,SEMATTRS_FAAS_CRON:()=>oot,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>Xrt,SEMATTRS_FAAS_DOCUMENT_NAME:()=>not,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>eot,SEMATTRS_FAAS_DOCUMENT_TIME:()=>tot,SEMATTRS_FAAS_EXECUTION:()=>Wrt,SEMATTRS_FAAS_INVOKED_NAME:()=>sot,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>aot,SEMATTRS_FAAS_INVOKED_REGION:()=>uot,SEMATTRS_FAAS_TIME:()=>rot,SEMATTRS_FAAS_TRIGGER:()=>NV,SEMATTRS_HTTP_CLIENT_IP:()=>Mot,SEMATTRS_HTTP_FLAVOR:()=>wot,SEMATTRS_HTTP_HOST:()=>Dot,SEMATTRS_HTTP_METHOD:()=>Sw,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>kot,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>Oot,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>PV,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>MV,SEMATTRS_HTTP_ROUTE:()=>LV,SEMATTRS_HTTP_SCHEME:()=>Not,SEMATTRS_HTTP_SERVER_NAME:()=>Pot,SEMATTRS_HTTP_STATUS_CODE:()=>dS,SEMATTRS_HTTP_TARGET:()=>OV,SEMATTRS_HTTP_URL:()=>UC,SEMATTRS_HTTP_USER_AGENT:()=>Bot,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>wit,SEMATTRS_MESSAGE_ID:()=>Nit,SEMATTRS_MESSAGE_TYPE:()=>Dit,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>Bit,SEMATTRS_MESSAGING_CONSUMER_ID:()=>git,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>pit,SEMATTRS_MESSAGING_DESTINATION:()=>iit,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>sit,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>yit,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>Eit,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>_it,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>Sit,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>Tit,SEMATTRS_MESSAGING_MESSAGE_ID:()=>dit,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>mit,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>fit,SEMATTRS_MESSAGING_OPERATION:()=>Ait,SEMATTRS_MESSAGING_PROTOCOL:()=>uit,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>cit,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>hit,SEMATTRS_MESSAGING_SYSTEM:()=>UV,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>ait,SEMATTRS_MESSAGING_URL:()=>lit,SEMATTRS_NET_HOST_CARRIER_ICC:()=>_ot,SEMATTRS_NET_HOST_CARRIER_MCC:()=>got,SEMATTRS_NET_HOST_CARRIER_MNC:()=>hot,SEMATTRS_NET_HOST_CARRIER_NAME:()=>Aot,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>mot,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>fot,SEMATTRS_NET_HOST_IP:()=>BV,SEMATTRS_NET_HOST_NAME:()=>pot,SEMATTRS_NET_HOST_PORT:()=>kV,SEMATTRS_NET_PEER_IP:()=>wV,SEMATTRS_NET_PEER_NAME:()=>dot,SEMATTRS_NET_PEER_PORT:()=>lot,SEMATTRS_NET_TRANSPORT:()=>cot,SEMATTRS_PEER_SERVICE:()=>Eot,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>FV,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>Rit,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>xit,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>vit,SEMATTRS_RPC_JSONRPC_VERSION:()=>Cit,SEMATTRS_RPC_METHOD:()=>Iit,SEMATTRS_RPC_SERVICE:()=>QV,SEMATTRS_RPC_SYSTEM:()=>bit,SEMATTRS_THREAD_ID:()=>bot,SEMATTRS_THREAD_NAME:()=>Iot,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>Tut,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>Sut,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>but,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>Iut,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>Cut,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>vut,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>Rut,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>Dut,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>xut,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>wut,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>Nut,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>hut,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>Eut,SEMRESATTRS_CLOUD_PLATFORM:()=>yut,SEMRESATTRS_CLOUD_PROVIDER:()=>gut,SEMRESATTRS_CLOUD_REGION:()=>_ut,SEMRESATTRS_CONTAINER_ID:()=>kut,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>Put,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>Mut,SEMRESATTRS_CONTAINER_NAME:()=>But,SEMRESATTRS_CONTAINER_RUNTIME:()=>Out,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>Lut,SEMRESATTRS_DEVICE_ID:()=>Uut,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>Qut,SEMRESATTRS_DEVICE_MODEL_NAME:()=>Fut,SEMRESATTRS_FAAS_ID:()=>jut,SEMRESATTRS_FAAS_INSTANCE:()=>Hut,SEMRESATTRS_FAAS_MAX_MEMORY:()=>$ut,SEMRESATTRS_FAAS_NAME:()=>Gut,SEMRESATTRS_FAAS_VERSION:()=>zut,SEMRESATTRS_HOST_ARCH:()=>Kut,SEMRESATTRS_HOST_ID:()=>qut,SEMRESATTRS_HOST_IMAGE_ID:()=>Zut,SEMRESATTRS_HOST_IMAGE_NAME:()=>Jut,SEMRESATTRS_HOST_IMAGE_VERSION:()=>Wut,SEMRESATTRS_HOST_NAME:()=>Vut,SEMRESATTRS_HOST_TYPE:()=>Yut,SEMRESATTRS_K8S_CLUSTER_NAME:()=>Xut,SEMRESATTRS_K8S_CONTAINER_NAME:()=>ict,SEMRESATTRS_K8S_CRONJOB_NAME:()=>hct,SEMRESATTRS_K8S_CRONJOB_UID:()=>gct,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>fct,SEMRESATTRS_K8S_DAEMONSET_UID:()=>pct,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>cct,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>uct,SEMRESATTRS_K8S_JOB_NAME:()=>Act,SEMRESATTRS_K8S_JOB_UID:()=>mct,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>nct,SEMRESATTRS_K8S_NODE_NAME:()=>ect,SEMRESATTRS_K8S_NODE_UID:()=>tct,SEMRESATTRS_K8S_POD_NAME:()=>oct,SEMRESATTRS_K8S_POD_UID:()=>rct,SEMRESATTRS_K8S_REPLICASET_NAME:()=>act,SEMRESATTRS_K8S_REPLICASET_UID:()=>sct,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>dct,SEMRESATTRS_K8S_STATEFULSET_UID:()=>lct,SEMRESATTRS_OS_DESCRIPTION:()=>Ect,SEMRESATTRS_OS_NAME:()=>yct,SEMRESATTRS_OS_TYPE:()=>_ct,SEMRESATTRS_OS_VERSION:()=>Sct,SEMRESATTRS_PROCESS_COMMAND:()=>Cct,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>Rct,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>vct,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>bct,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>Ict,SEMRESATTRS_PROCESS_OWNER:()=>xct,SEMRESATTRS_PROCESS_PID:()=>Tct,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>wct,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>Dct,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>Nct,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>kct,SEMRESATTRS_SERVICE_NAME:()=>Bct,SEMRESATTRS_SERVICE_NAMESPACE:()=>GV,SEMRESATTRS_SERVICE_VERSION:()=>Oct,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>Uct,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>Mct,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>Pct,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>Lct,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>Gct,SEMRESATTRS_WEBENGINE_NAME:()=>Qct,SEMRESATTRS_WEBENGINE_VERSION:()=>Fct,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>Spt,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>Tpt,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>bpt,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>Cpt,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>vpt,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>Rpt,SemanticAttributes:()=>kit,SemanticResourceAttributes:()=>jct,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>Plt,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>Mlt,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>Llt,TELEMETRYSDKLANGUAGEVALUES_GO:()=>Ult,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>Qlt,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>Flt,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>Glt,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>jlt,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>zlt,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>Hlt,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>xun,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>Dpt,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>Npt,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>Dun,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>wpt,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>Bpt,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>Nun,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>kpt,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>Opt,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>Ppt,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>Mpt,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>Lpt,TelemetrySdkLanguageValues:()=>$lt});var Xn=B(()=>{A();j0e();mbe();Abe();gbe();hbe()});var _be=M(bU=>{"use strict";A();Object.defineProperty(bU,"__esModule",{value:!0});bU.ATTR_PROCESS_RUNTIME_NAME=void 0;bU.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var Ebe=M(CU=>{"use strict";A();Object.defineProperty(CU,"__esModule",{value:!0});CU.SDK_INFO=void 0;var jft=Zge(),IU=(Xn(),Me(Vr)),zft=_be();CU.SDK_INFO={[IU.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[zft.ATTR_PROCESS_RUNTIME_NAME]:"node",[IU.ATTR_TELEMETRY_SDK_LANGUAGE]:IU.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[IU.ATTR_TELEMETRY_SDK_VERSION]:jft.VERSION}});var ybe=M(su=>{"use strict";A();Object.defineProperty(su,"__esModule",{value:!0});su.otperformance=su.SDK_INFO=su._globalThis=su.getStringListFromEnv=su.getNumberFromEnv=su.getBooleanFromEnv=su.getStringFromEnv=void 0;var vU=Kge();Object.defineProperty(su,"getStringFromEnv",{enumerable:!0,get:function(){return vU.getStringFromEnv}});Object.defineProperty(su,"getBooleanFromEnv",{enumerable:!0,get:function(){return vU.getBooleanFromEnv}});Object.defineProperty(su,"getNumberFromEnv",{enumerable:!0,get:function(){return vU.getNumberFromEnv}});Object.defineProperty(su,"getStringListFromEnv",{enumerable:!0,get:function(){return vU.getStringListFromEnv}});var Hft=Jge();Object.defineProperty(su,"_globalThis",{enumerable:!0,get:function(){return Hft._globalThis}});var $ft=Ebe();Object.defineProperty(su,"SDK_INFO",{enumerable:!0,get:function(){return $ft.SDK_INFO}});su.otperformance=performance});var n7=M(au=>{"use strict";A();Object.defineProperty(au,"__esModule",{value:!0});au.getStringListFromEnv=au.getNumberFromEnv=au.getStringFromEnv=au.getBooleanFromEnv=au.otperformance=au._globalThis=au.SDK_INFO=void 0;var mS=ybe();Object.defineProperty(au,"SDK_INFO",{enumerable:!0,get:function(){return mS.SDK_INFO}});Object.defineProperty(au,"_globalThis",{enumerable:!0,get:function(){return mS._globalThis}});Object.defineProperty(au,"otperformance",{enumerable:!0,get:function(){return mS.otperformance}});Object.defineProperty(au,"getBooleanFromEnv",{enumerable:!0,get:function(){return mS.getBooleanFromEnv}});Object.defineProperty(au,"getStringFromEnv",{enumerable:!0,get:function(){return mS.getStringFromEnv}});Object.defineProperty(au,"getNumberFromEnv",{enumerable:!0,get:function(){return mS.getNumberFromEnv}});Object.defineProperty(au,"getStringListFromEnv",{enumerable:!0,get:function(){return mS.getStringListFromEnv}})});var Ibe=M(Yr=>{"use strict";A();Object.defineProperty(Yr,"__esModule",{value:!0});Yr.addHrTimes=Yr.isTimeInput=Yr.isTimeInputHrTime=Yr.hrTimeToSeconds=Yr.hrTimeToMilliseconds=Yr.hrTimeToMicroseconds=Yr.hrTimeToNanoseconds=Yr.hrTimeToTimeStamp=Yr.hrTimeDuration=Yr.timeInputToHrTime=Yr.hrTime=Yr.getTimeOrigin=Yr.millisToHrTime=void 0;var RU=n7(),Sbe=9,qft=6,Vft=Math.pow(10,qft),Tw=Math.pow(10,Sbe);function bw(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*Vft);return[n,r]}Yr.millisToHrTime=bw;function Yft(){return RU.otperformance.timeOrigin}Yr.getTimeOrigin=Yft;function Tbe(e){let t=bw(RU.otperformance.timeOrigin),n=bw(typeof e=="number"?e:RU.otperformance.now());return bbe(t,n)}Yr.hrTime=Tbe;function Kft(e){if(r7(e))return e;if(typeof e=="number")return e<RU.otperformance.timeOrigin?Tbe(e):bw(e);if(e instanceof Date)return bw(e.getTime());throw TypeError("Invalid input type")}Yr.timeInputToHrTime=Kft;function Jft(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=Tw),[n,r]}Yr.hrTimeDuration=Jft;function Zft(e){let t=Sbe,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}Yr.hrTimeToTimeStamp=Zft;function Wft(e){return e[0]*Tw+e[1]}Yr.hrTimeToNanoseconds=Wft;function Xft(e){return e[0]*1e6+e[1]/1e3}Yr.hrTimeToMicroseconds=Xft;function emt(e){return e[0]*1e3+e[1]/1e6}Yr.hrTimeToMilliseconds=emt;function tmt(e){return e[0]+e[1]/Tw}Yr.hrTimeToSeconds=tmt;function r7(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}Yr.isTimeInputHrTime=r7;function nmt(e){return r7(e)||typeof e=="number"||e instanceof Date}Yr.isTimeInput=nmt;function bbe(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=Tw&&(n[1]-=Tw,n[0]+=1),n}Yr.addHrTimes=bbe});var Cbe=M(xU=>{"use strict";A();Object.defineProperty(xU,"__esModule",{value:!0});xU.unrefTimer=void 0;function rmt(e){typeof e!="number"&&e.unref()}xU.unrefTimer=rmt});var vbe=M(Iw=>{"use strict";A();Object.defineProperty(Iw,"__esModule",{value:!0});Iw.ExportResultCode=void 0;var omt;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(omt=Iw.ExportResultCode||(Iw.ExportResultCode={}))});var xbe=M(DU=>{"use strict";A();Object.defineProperty(DU,"__esModule",{value:!0});DU.CompositePropagator=void 0;var Rbe=(He(),Me(tt)),o7=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){Rbe.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){Rbe.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${s.message}`)}return o},t)}fields(){return this._fields.slice()}};DU.CompositePropagator=o7});var Dbe=M(FC=>{"use strict";A();Object.defineProperty(FC,"__esModule",{value:!0});FC.validateValue=FC.validateKey=void 0;var i7="[_0-9a-z-*/]",imt=`[a-z]${i7}{0,255}`,smt=`[a-z0-9]${i7}{0,240}@[a-z]${i7}{0,13}`,amt=new RegExp(`^(?:${imt}|${smt})$`),umt=/^[ -~]{0,255}[!-~]$/,cmt=/,|=/;function lmt(e){return amt.test(e)}FC.validateKey=lmt;function dmt(e){return umt.test(e)&&!cmt.test(e)}FC.validateValue=dmt});var a7=M(wU=>{"use strict";A();Object.defineProperty(wU,"__esModule",{value:!0});wU.TraceState=void 0;var NU=Dbe(),pmt=32,Nbe=512,wbe=",",Bbe="=",s7=class e{_length;_rawTraceState;_internalState;constructor(t){this._rawTraceState=typeof t=="string"?t:"",this._length=this._rawTraceState.length}set(t,n){if(!(0,NU.validateKey)(t)||!(0,NU.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>Nbe)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=wbe+t),t=`${r[0]}${Bbe}${r[1]}`+t,n++;return t}_getState(){if(this._internalState)return this._internalState;let t=this._rawTraceState.split(wbe),n=new Map,r=0;for(let o of t){let i=o.trim(),s=i.indexOf(Bbe);if(s===-1)continue;let u=i.slice(0,s),l=i.slice(s+1);if(!(0,NU.validateKey)(u)||!(0,NU.validateValue)(l))continue;let f=r+i.length+(n.size>0?1:0);if(!(f>Nbe)&&(n.set(u,l),r=f,n.size>=pmt))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}};wU.TraceState=s7});var Obe=M(uu=>{"use strict";A();Object.defineProperty(uu,"__esModule",{value:!0});uu.W3CTraceContextPropagator=uu.parseTraceParent=uu.TRACE_STATE_HEADER=uu.TRACE_PARENT_HEADER=void 0;var BU=(He(),Me(tt)),fmt=Ew(),mmt=a7();uu.TRACE_PARENT_HEADER="traceparent";uu.TRACE_STATE_HEADER="tracestate";var Amt="00",gmt="(?!ff)[\\da-f]{2}",hmt="(?![0]{32})[\\da-f]{32}",_mt="(?![0]{16})[\\da-f]{16}",Emt="[\\da-f]{2}",ymt=new RegExp(`^\\s?(${gmt})-(${hmt})-(${_mt})-(${Emt})(-.*)?\\s?$`);function kbe(e){let t=ymt.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}uu.parseTraceParent=kbe;var u7=class{inject(t,n,r){let o=BU.trace.getSpanContext(t);if(!o||(0,fmt.isTracingSuppressed)(t)||!(0,BU.isSpanContextValid)(o))return;let i=`${Amt}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||BU.TraceFlags.NONE).toString(16)}`;r.set(n,uu.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,uu.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,uu.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let s=kbe(i);if(!s)return t;s.isRemote=!0;let u=r.get(n,uu.TRACE_STATE_HEADER);if(u){let l=Array.isArray(u)?u.join(","):u;s.traceState=new mmt.TraceState(typeof l=="string"?l:void 0)}return BU.trace.setSpanContext(t,s)}fields(){return[uu.TRACE_PARENT_HEADER,uu.TRACE_STATE_HEADER]}};uu.W3CTraceContextPropagator=u7});var Pbe=M(gf=>{"use strict";A();Object.defineProperty(gf,"__esModule",{value:!0});gf.getRPCMetadata=gf.deleteRPCMetadata=gf.setRPCMetadata=gf.RPCType=void 0;var Smt=(He(),Me(tt)),c7=(0,Smt.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),Tmt;(function(e){e.HTTP="http"})(Tmt=gf.RPCType||(gf.RPCType={}));function bmt(e,t){return e.setValue(c7,t)}gf.setRPCMetadata=bmt;function Imt(e){return e.deleteValue(c7)}gf.deleteRPCMetadata=Imt;function Cmt(e){return e.getValue(c7)}gf.getRPCMetadata=Cmt});var Fbe=M(kU=>{"use strict";A();Object.defineProperty(kU,"__esModule",{value:!0});kU.isPlainObject=void 0;var vmt="[object Object]",Rmt="[object Null]",xmt="[object Undefined]",Dmt=Function.prototype,Mbe=Dmt.toString,Nmt=Mbe.call(Object),wmt=Object.getPrototypeOf,Lbe=Object.prototype,Ube=Lbe.hasOwnProperty,AS=Symbol?Symbol.toStringTag:void 0,Qbe=Lbe.toString;function Bmt(e){if(!kmt(e)||Omt(e)!==vmt)return!1;let t=wmt(e);if(t===null)return!0;let n=Ube.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Mbe.call(n)===Nmt}kU.isPlainObject=Bmt;function kmt(e){return e!=null&&typeof e=="object"}function Omt(e){return e==null?e===void 0?xmt:Rmt:AS&&AS in Object(e)?Pmt(e):Mmt(e)}function Pmt(e){let t=Ube.call(e,AS),n=e[AS],r=!1;try{e[AS]=void 0,r=!0}catch{}let o=Qbe.call(e);return r&&(t?e[AS]=n:delete e[AS]),o}function Mmt(e){return Qbe.call(e)}});var $be=M(MU=>{"use strict";A();Object.defineProperty(MU,"__esModule",{value:!0});MU.merge=void 0;var Gbe=Fbe(),Lmt=20;function Umt(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=zbe(t,e.shift(),0,n);return t}MU.merge=Umt;function l7(e){return PU(e)?e.slice():e}function zbe(e,t,n=0,r){let o;if(!(n>Lmt)){if(n++,OU(e)||OU(t)||Hbe(t))o=l7(t);else if(PU(e)){if(o=e.slice(),PU(t))for(let i=0,s=t.length;i<s;i++)o.push(l7(t[i]));else if(Cw(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]=l7(t[l]))}}}else if(Cw(e))if(Cw(t)){if(!Qmt(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(OU(f))typeof f>"u"?delete o[l]:o[l]=f;else{let h=o[l],_=f;if(jbe(e,l,r)||jbe(t,l,r))delete o[l];else{if(Cw(h)&&Cw(_)){let E=r.get(h)||[],T=r.get(_)||[];E.push({obj:e,key:l}),T.push({obj:t,key:l}),r.set(h,E),r.set(_,T)}o[l]=zbe(o[l],f,n,r)}}}}else o=t;return o}}function jbe(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 PU(e){return Array.isArray(e)}function Hbe(e){return typeof e=="function"}function Cw(e){return!OU(e)&&!PU(e)&&!Hbe(e)&&typeof e=="object"}function OU(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function Qmt(e,t){return!(!(0,Gbe.isPlainObject)(e)||!(0,Gbe.isPlainObject)(t))}});var qbe=M(GC=>{"use strict";A();Object.defineProperty(GC,"__esModule",{value:!0});GC.callWithTimeout=GC.TimeoutError=void 0;var LU=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};GC.TimeoutError=LU;function Fmt(e,t){let n,r=new Promise(function(i,s){n=setTimeout(function(){s(new LU("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}GC.callWithTimeout=Fmt});var Ybe=M(jC=>{"use strict";A();Object.defineProperty(jC,"__esModule",{value:!0});jC.isUrlIgnored=jC.urlMatches=void 0;function Vbe(e,t){return typeof t=="string"?e===t:!!e.match(t)}jC.urlMatches=Vbe;function Gmt(e,t){if(!t)return!1;for(let n of t)if(Vbe(e,n))return!0;return!1}jC.isUrlIgnored=Gmt});var Kbe=M(UU=>{"use strict";A();Object.defineProperty(UU,"__esModule",{value:!0});UU.Deferred=void 0;var d7=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)}};UU.Deferred=d7});var Jbe=M(QU=>{"use strict";A();Object.defineProperty(QU,"__esModule",{value:!0});QU.BindOnceFuture=void 0;var jmt=Kbe(),p7=class{_isCalled=!1;_deferred=new jmt.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}};QU.BindOnceFuture=p7});var Wbe=M(FU=>{"use strict";A();Object.defineProperty(FU,"__esModule",{value:!0});FU.diagLogLevelFromString=void 0;var Rg=(He(),Me(tt)),Zbe={ALL:Rg.DiagLogLevel.ALL,VERBOSE:Rg.DiagLogLevel.VERBOSE,DEBUG:Rg.DiagLogLevel.DEBUG,INFO:Rg.DiagLogLevel.INFO,WARN:Rg.DiagLogLevel.WARN,ERROR:Rg.DiagLogLevel.ERROR,NONE:Rg.DiagLogLevel.NONE};function zmt(e){if(e==null)return;let t=Zbe[e.toUpperCase()];return t??(Rg.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(Zbe)}, using default`),Rg.DiagLogLevel.INFO)}FU.diagLogLevelFromString=zmt});var eIe=M(GU=>{"use strict";A();Object.defineProperty(GU,"__esModule",{value:!0});GU._export=void 0;var Xbe=(He(),Me(tt)),Hmt=Ew();function $mt(e,t){return new Promise(n=>{Xbe.context.with((0,Hmt.suppressTracing)(Xbe.context.active()),()=>{e.export(t,n)})})}GU._export=$mt});var Rr=M(we=>{"use strict";A();Object.defineProperty(we,"__esModule",{value:!0});we.diagLogLevelFromString=we.BindOnceFuture=we.urlMatches=we.isUrlIgnored=we.callWithTimeout=we.TimeoutError=we.merge=we.TraceState=we.unsuppressTracing=we.suppressTracing=we.isTracingSuppressed=we.setRPCMetadata=we.getRPCMetadata=we.deleteRPCMetadata=we.RPCType=we.parseTraceParent=we.W3CTraceContextPropagator=we.TRACE_STATE_HEADER=we.TRACE_PARENT_HEADER=we.CompositePropagator=we.otperformance=we.getStringListFromEnv=we.getNumberFromEnv=we.getBooleanFromEnv=we.getStringFromEnv=we._globalThis=we.SDK_INFO=we.parseKeyPairsIntoRecord=we.ExportResultCode=we.unrefTimer=we.timeInputToHrTime=we.millisToHrTime=we.isTimeInputHrTime=we.isTimeInput=we.hrTimeToTimeStamp=we.hrTimeToSeconds=we.hrTimeToNanoseconds=we.hrTimeToMilliseconds=we.hrTimeToMicroseconds=we.hrTimeDuration=we.hrTime=we.getTimeOrigin=we.addHrTimes=we.loggingErrorHandler=we.setGlobalErrorHandler=we.globalErrorHandler=we.sanitizeAttributes=we.isAttributeValue=we.AnchoredClock=we.W3CBaggagePropagator=void 0;we.internal=void 0;var qmt=Lge();Object.defineProperty(we,"W3CBaggagePropagator",{enumerable:!0,get:function(){return qmt.W3CBaggagePropagator}});var Vmt=Uge();Object.defineProperty(we,"AnchoredClock",{enumerable:!0,get:function(){return Vmt.AnchoredClock}});var tIe=zge();Object.defineProperty(we,"isAttributeValue",{enumerable:!0,get:function(){return tIe.isAttributeValue}});Object.defineProperty(we,"sanitizeAttributes",{enumerable:!0,get:function(){return tIe.sanitizeAttributes}});var nIe=$ge();Object.defineProperty(we,"globalErrorHandler",{enumerable:!0,get:function(){return nIe.globalErrorHandler}});Object.defineProperty(we,"setGlobalErrorHandler",{enumerable:!0,get:function(){return nIe.setGlobalErrorHandler}});var Ymt=vV();Object.defineProperty(we,"loggingErrorHandler",{enumerable:!0,get:function(){return Ymt.loggingErrorHandler}});var $l=Ibe();Object.defineProperty(we,"addHrTimes",{enumerable:!0,get:function(){return $l.addHrTimes}});Object.defineProperty(we,"getTimeOrigin",{enumerable:!0,get:function(){return $l.getTimeOrigin}});Object.defineProperty(we,"hrTime",{enumerable:!0,get:function(){return $l.hrTime}});Object.defineProperty(we,"hrTimeDuration",{enumerable:!0,get:function(){return $l.hrTimeDuration}});Object.defineProperty(we,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return $l.hrTimeToMicroseconds}});Object.defineProperty(we,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return $l.hrTimeToMilliseconds}});Object.defineProperty(we,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return $l.hrTimeToNanoseconds}});Object.defineProperty(we,"hrTimeToSeconds",{enumerable:!0,get:function(){return $l.hrTimeToSeconds}});Object.defineProperty(we,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return $l.hrTimeToTimeStamp}});Object.defineProperty(we,"isTimeInput",{enumerable:!0,get:function(){return $l.isTimeInput}});Object.defineProperty(we,"isTimeInputHrTime",{enumerable:!0,get:function(){return $l.isTimeInputHrTime}});Object.defineProperty(we,"millisToHrTime",{enumerable:!0,get:function(){return $l.millisToHrTime}});Object.defineProperty(we,"timeInputToHrTime",{enumerable:!0,get:function(){return $l.timeInputToHrTime}});var Kmt=Cbe();Object.defineProperty(we,"unrefTimer",{enumerable:!0,get:function(){return Kmt.unrefTimer}});var Jmt=vbe();Object.defineProperty(we,"ExportResultCode",{enumerable:!0,get:function(){return Jmt.ExportResultCode}});var Zmt=TV();Object.defineProperty(we,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return Zmt.parseKeyPairsIntoRecord}});var gS=n7();Object.defineProperty(we,"SDK_INFO",{enumerable:!0,get:function(){return gS.SDK_INFO}});Object.defineProperty(we,"_globalThis",{enumerable:!0,get:function(){return gS._globalThis}});Object.defineProperty(we,"getStringFromEnv",{enumerable:!0,get:function(){return gS.getStringFromEnv}});Object.defineProperty(we,"getBooleanFromEnv",{enumerable:!0,get:function(){return gS.getBooleanFromEnv}});Object.defineProperty(we,"getNumberFromEnv",{enumerable:!0,get:function(){return gS.getNumberFromEnv}});Object.defineProperty(we,"getStringListFromEnv",{enumerable:!0,get:function(){return gS.getStringListFromEnv}});Object.defineProperty(we,"otperformance",{enumerable:!0,get:function(){return gS.otperformance}});var Wmt=xbe();Object.defineProperty(we,"CompositePropagator",{enumerable:!0,get:function(){return Wmt.CompositePropagator}});var jU=Obe();Object.defineProperty(we,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return jU.TRACE_PARENT_HEADER}});Object.defineProperty(we,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return jU.TRACE_STATE_HEADER}});Object.defineProperty(we,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return jU.W3CTraceContextPropagator}});Object.defineProperty(we,"parseTraceParent",{enumerable:!0,get:function(){return jU.parseTraceParent}});var zU=Pbe();Object.defineProperty(we,"RPCType",{enumerable:!0,get:function(){return zU.RPCType}});Object.defineProperty(we,"deleteRPCMetadata",{enumerable:!0,get:function(){return zU.deleteRPCMetadata}});Object.defineProperty(we,"getRPCMetadata",{enumerable:!0,get:function(){return zU.getRPCMetadata}});Object.defineProperty(we,"setRPCMetadata",{enumerable:!0,get:function(){return zU.setRPCMetadata}});var f7=Ew();Object.defineProperty(we,"isTracingSuppressed",{enumerable:!0,get:function(){return f7.isTracingSuppressed}});Object.defineProperty(we,"suppressTracing",{enumerable:!0,get:function(){return f7.suppressTracing}});Object.defineProperty(we,"unsuppressTracing",{enumerable:!0,get:function(){return f7.unsuppressTracing}});var Xmt=a7();Object.defineProperty(we,"TraceState",{enumerable:!0,get:function(){return Xmt.TraceState}});var eAt=$be();Object.defineProperty(we,"merge",{enumerable:!0,get:function(){return eAt.merge}});var rIe=qbe();Object.defineProperty(we,"TimeoutError",{enumerable:!0,get:function(){return rIe.TimeoutError}});Object.defineProperty(we,"callWithTimeout",{enumerable:!0,get:function(){return rIe.callWithTimeout}});var oIe=Ybe();Object.defineProperty(we,"isUrlIgnored",{enumerable:!0,get:function(){return oIe.isUrlIgnored}});Object.defineProperty(we,"urlMatches",{enumerable:!0,get:function(){return oIe.urlMatches}});var tAt=Jbe();Object.defineProperty(we,"BindOnceFuture",{enumerable:!0,get:function(){return tAt.BindOnceFuture}});var nAt=Wbe();Object.defineProperty(we,"diagLogLevelFromString",{enumerable:!0,get:function(){return nAt.diagLogLevelFromString}});var rAt=eIe();we.internal={_export:rAt._export}});var iIe=M(HU=>{"use strict";A();Object.defineProperty(HU,"__esModule",{value:!0});HU.VERSION=void 0;HU.VERSION="0.214.0"});var sIe=M(vw=>{"use strict";A();Object.defineProperty(vw,"__esModule",{value:!0});vw.SeverityNumber=void 0;var oAt;(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"})(oAt=vw.SeverityNumber||(vw.SeverityNumber={}))});var qU=M(zC=>{"use strict";A();Object.defineProperty(zC,"__esModule",{value:!0});zC.NOOP_LOGGER=zC.NoopLogger=void 0;var $U=class{emit(t){}};zC.NoopLogger=$U;zC.NOOP_LOGGER=new $U});var aIe=M(Bm=>{"use strict";A();Object.defineProperty(Bm,"__esModule",{value:!0});Bm.API_BACKWARDS_COMPATIBILITY_VERSION=Bm.makeGetter=Bm._global=Bm.GLOBAL_LOGS_API_KEY=void 0;Bm.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");Bm._global=globalThis;function iAt(e,t,n){return r=>r===e?t:n}Bm.makeGetter=iAt;Bm.API_BACKWARDS_COMPATIBILITY_VERSION=1});var m7=M(HC=>{"use strict";A();Object.defineProperty(HC,"__esModule",{value:!0});HC.NOOP_LOGGER_PROVIDER=HC.NoopLoggerProvider=void 0;var sAt=qU(),VU=class{getLogger(t,n,r){return new sAt.NoopLogger}};HC.NoopLoggerProvider=VU;HC.NOOP_LOGGER_PROVIDER=new VU});var uIe=M(YU=>{"use strict";A();Object.defineProperty(YU,"__esModule",{value:!0});YU.ProxyLogger=void 0;var aAt=qU(),A7=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):aAt.NOOP_LOGGER}};YU.ProxyLogger=A7});var cIe=M(KU=>{"use strict";A();Object.defineProperty(KU,"__esModule",{value:!0});KU.ProxyLoggerProvider=void 0;var uAt=m7(),cAt=uIe(),g7=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new cAt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:uAt.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)}};KU.ProxyLoggerProvider=g7});var dIe=M(JU=>{"use strict";A();Object.defineProperty(JU,"__esModule",{value:!0});JU.LogsAPI=void 0;var Jd=aIe(),lAt=m7(),lIe=cIe(),h7=class e{constructor(){this._proxyLoggerProvider=new lIe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Jd._global[Jd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Jd._global[Jd.GLOBAL_LOGS_API_KEY]=(0,Jd.makeGetter)(Jd.API_BACKWARDS_COMPATIBILITY_VERSION,t,lAt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Jd._global[Jd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Jd._global,Jd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Jd._global[Jd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new lIe.ProxyLoggerProvider}};JU.LogsAPI=h7});var _7=M(km=>{"use strict";A();Object.defineProperty(km,"__esModule",{value:!0});km.logs=km.NoopLogger=km.NOOP_LOGGER=km.SeverityNumber=void 0;var dAt=sIe();Object.defineProperty(km,"SeverityNumber",{enumerable:!0,get:function(){return dAt.SeverityNumber}});var pIe=qU();Object.defineProperty(km,"NOOP_LOGGER",{enumerable:!0,get:function(){return pIe.NOOP_LOGGER}});Object.defineProperty(km,"NoopLogger",{enumerable:!0,get:function(){return pIe.NoopLogger}});var pAt=dIe();km.logs=pAt.LogsAPI.getInstance()});var fIe=M($C=>{"use strict";A();Object.defineProperty($C,"__esModule",{value:!0});$C.disableInstrumentations=$C.enableInstrumentations=void 0;function fAt(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()}}$C.enableInstrumentations=fAt;function mAt(e){e.forEach(t=>t.disable())}$C.disableInstrumentations=mAt});var gIe=M(ZU=>{"use strict";A();Object.defineProperty(ZU,"__esModule",{value:!0});ZU.registerInstrumentations=void 0;var mIe=(He(),Me(tt)),AAt=_7(),AIe=fIe();function gAt(e){let t=e.tracerProvider||mIe.trace.getTracerProvider(),n=e.meterProvider||mIe.metrics.getMeterProvider(),r=e.loggerProvider||AAt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,AIe.enableInstrumentations)(o,t,n,r),()=>{(0,AIe.disableInstrumentations)(o)}}ZU.registerInstrumentations=gAt});var CIe=M(WU=>{"use strict";A();Object.defineProperty(WU,"__esModule",{value:!0});WU.satisfies=void 0;var T7=(He(),Me(tt)),SIe=/^(?: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-]+)*))?$/,hAt=/^(?<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-]+)*))?$/,_At={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function EAt(e,t,n){if(!yAt(e))return T7.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=IAt(e);if(!r)return!1;let o=[],i=TIe(r,t,o,n);return i&&!n?.includePrerelease?TAt(r,o):i}WU.satisfies=EAt;function yAt(e){return typeof e=="string"&&SIe.test(e)}function TIe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(E7(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=$At(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!E7(e,i,n,r))return!1;return!0}return E7(e,t,n,r)}function E7(e,t,n,r){if(t=bAt(t,r),t.includes(" "))return TIe(e,t,n,r);{let o=CAt(t);return n.push(o),SAt(e,o)}}function SAt(e,t){if(t.invalid)return!1;if(!t.version||S7(t.version))return!0;let n=_Ie(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=_Ie(r,o)}return _At[t.op]?.includes(n)}function TAt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function bAt(e,t){return e=e.trim(),e=zAt(e,t),e=jAt(e),e=HAt(e,t),e=e.trim(),e}function $u(e){return!e||e.toLowerCase()==="x"||e==="*"}function IAt(e){let t=e.match(SIe);if(!t){T7.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 CAt(e){if(!e)return{};let t=e.match(hAt);if(!t)return T7.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 S7(e){return e==="*"||e==="x"||e==="X"}function hIe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function vAt(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 RAt(e,t){if(S7(e)||S7(t))return 0;let[n,r]=vAt(hIe(e),hIe(t));return n>r?1:n<r?-1:0}function _Ie(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=RAt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var bIe="[a-zA-Z0-9-]",IIe="0|[1-9]\\d*",xAt=`\\d*[a-zA-Z-]${bIe}*`,DAt="((?:<|>)?=?)",EIe=`(?:${IIe}|${xAt})`,NAt=`(?:-(${EIe}(?:\\.${EIe})*))`,yIe=`${bIe}+`,wAt=`(?:\\+(${yIe}(?:\\.${yIe})*))`,y7=`${IIe}|x|X|\\*`,Rw=`[v=\\s]*(${y7})(?:\\.(${y7})(?:\\.(${y7})(?:${NAt})?${wAt}?)?)?`,BAt=`^${DAt}\\s*${Rw}$`,kAt=new RegExp(BAt),OAt=`^\\s*(${Rw})\\s+-\\s+(${Rw})\\s*$`,PAt=new RegExp(OAt),MAt="(?:~>?)",LAt=`^${MAt}${Rw}$`,UAt=new RegExp(LAt),QAt="(?:\\^)",FAt=`^${QAt}${Rw}$`,GAt=new RegExp(FAt);function jAt(e){let t=UAt;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 zAt(e,t){let n=GAt,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 HAt(e,t){let n=kAt;return e.replace(n,(r,o,i,s,u,l)=>{let f=$u(i),h=f||$u(s),_=h||$u(u),E=_;return o==="="&&E&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&E?(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 $At(e,t){let n=PAt;return e.replace(n,(r,o,i,s,u,l,f,h,_,E,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(E)?h=`<${+_+1}.0.0-0`:$u(T)?h=`<${_}.${+E+1}.0-0`:v?h=`<=${_}.${E}.${T}-${v}`:t?.includePrerelease?h=`<${_}.${E}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var b7=M(Na=>{"use strict";A();Object.defineProperty(Na,"__esModule",{value:!0});Na.massUnwrap=Na.unwrap=Na.massWrap=Na.wrap=void 0;var qu=console.error.bind(console);function xw(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 qAt=(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 xw(o,"__original",r),xw(o,"__unwrap",()=>{e[t]===o&&xw(e,t,r)}),xw(o,"__wrapped",!0),xw(e,t,o),o};Na.wrap=qAt;var VAt=(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,Na.wrap)(r,o,n)})})};Na.massWrap=VAt;var YAt=(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}};Na.unwrap=YAt;var KAt=(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,Na.unwrap)(n,r)})})};Na.massUnwrap=KAt;function Dw(e){e&&e.logger&&(typeof e.logger!="function"?qu("new logger isn't a function, not replacing"):qu=e.logger)}Na.default=Dw;Dw.wrap=Na.wrap;Dw.massWrap=Na.massWrap;Dw.unwrap=Na.unwrap;Dw.massUnwrap=Na.massUnwrap});var vIe=M(eQ=>{"use strict";A();Object.defineProperty(eQ,"__esModule",{value:!0});eQ.InstrumentationAbstract=void 0;var I7=(He(),Me(tt)),JAt=_7(),XU=b7(),C7=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=I7.diag.createComponentLogger({namespace:t}),this._tracer=I7.trace.getTracer(t,n),this._meter=I7.metrics.getMeter(t,n),this._logger=JAt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=XU.wrap;_unwrap=XU.unwrap;_massWrap=XU.massWrap;_massUnwrap=XU.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)}}};eQ.InstrumentationAbstract=C7});var xIe=M((iln,RIe)=>{A();var qC=1e3,VC=qC*60,YC=VC*60,hS=YC*24,ZAt=hS*7,WAt=hS*365.25;RIe.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return XAt(e);if(n==="number"&&isFinite(e))return t.long?tgt(e):egt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function XAt(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*WAt;case"weeks":case"week":case"w":return n*ZAt;case"days":case"day":case"d":return n*hS;case"hours":case"hour":case"hrs":case"hr":case"h":return n*YC;case"minutes":case"minute":case"mins":case"min":case"m":return n*VC;case"seconds":case"second":case"secs":case"sec":case"s":return n*qC;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function egt(e){var t=Math.abs(e);return t>=hS?Math.round(e/hS)+"d":t>=YC?Math.round(e/YC)+"h":t>=VC?Math.round(e/VC)+"m":t>=qC?Math.round(e/qC)+"s":e+"ms"}function tgt(e){var t=Math.abs(e);return t>=hS?tQ(e,t,hS,"day"):t>=YC?tQ(e,t,YC,"hour"):t>=VC?tQ(e,t,VC,"minute"):t>=qC?tQ(e,t,qC,"second"):e+" ms"}function tQ(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var v7=M((aln,DIe)=>{A();function ngt(e){n.debug=n,n.default=n,n.coerce=l,n.disable=s,n.enable=o,n.enabled=u,n.humanize=xIe(),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 E=0;E<h.length;E++)_=(_<<5)-_+h.charCodeAt(E),_|=0;return n.colors[Math.abs(_)%n.colors.length]}n.selectColor=t;function n(h){let _,E=null,T,v;function R(...x){if(!R.enabled)return;let k=R,P=Number(new Date),j=P-(_||P);k.diff=j,k.prev=_,k.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 te=n.formatters[ae];if(typeof te=="function"){let _e=x[G];V=te.call(k,_e),x.splice(G,1),G--}return V}),n.formatArgs.call(k,x),(k.log||n.log).apply(k,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:()=>E!==null?E:(T!==n.namespaces&&(T=n.namespaces,v=n.enabled(h)),v),set:x=>{E=x}}),typeof n.init=="function"&&n.init(R),R}function r(h,_){let E=n(this.namespace+(typeof _>"u"?":":_)+h);return E.log=this.log,E}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 E of _)E[0]==="-"?n.skips.push(E.slice(1)):n.names.push(E)}function i(h,_){let E=0,T=0,v=-1,R=0;for(;E<h.length;)if(T<_.length&&(_[T]===h[E]||_[T]==="*"))_[T]==="*"?(v=T,R=E,T++):(E++,T++);else if(v!==-1)T=v+1,R++,E=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}DIe.exports=ngt});var NIe=M((jc,nQ)=>{A();jc.formatArgs=ogt;jc.save=igt;jc.load=sgt;jc.useColors=rgt;jc.storage=agt();jc.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`."))}})();jc.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 rgt(){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 ogt(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+nQ.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)}jc.log=console.debug||console.log||(()=>{});function igt(e){try{e?jc.storage.setItem("debug",e):jc.storage.removeItem("debug")}catch{}}function sgt(){let e;try{e=jc.storage.getItem("debug")||jc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function agt(){try{return localStorage}catch{}}nQ.exports=v7()(jc);var{formatters:ugt}=nQ.exports;ugt.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var BIe=M((lln,wIe)=>{"use strict";A();wIe.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 PIe=M((pln,OIe)=>{"use strict";A();var cgt=Ue("os"),kIe=Ue("tty"),Zd=BIe(),{env:ea}=process,x_;Zd("no-color")||Zd("no-colors")||Zd("color=false")||Zd("color=never")?x_=0:(Zd("color")||Zd("colors")||Zd("color=true")||Zd("color=always"))&&(x_=1);"FORCE_COLOR"in ea&&(ea.FORCE_COLOR==="true"?x_=1:ea.FORCE_COLOR==="false"?x_=0:x_=ea.FORCE_COLOR.length===0?1:Math.min(parseInt(ea.FORCE_COLOR,10),3));function R7(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function x7(e,t){if(x_===0)return 0;if(Zd("color=16m")||Zd("color=full")||Zd("color=truecolor"))return 3;if(Zd("color=256"))return 2;if(e&&!t&&x_===void 0)return 0;let n=x_||0;if(ea.TERM==="dumb")return n;if(process.platform==="win32"){let r=cgt.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in ea)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in ea)||ea.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in ea)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ea.TEAMCITY_VERSION)?1:0;if(ea.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ea){let r=parseInt((ea.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ea.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ea.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ea.TERM)||"COLORTERM"in ea?1:n}function lgt(e){let t=x7(e,e&&e.isTTY);return R7(t)}OIe.exports={supportsColor:lgt,stdout:R7(x7(!0,kIe.isatty(1))),stderr:R7(x7(!0,kIe.isatty(2)))}});var LIe=M((ta,oQ)=>{A();var dgt=Ue("tty"),rQ=Ue("util");ta.init=_gt;ta.log=Agt;ta.formatArgs=fgt;ta.save=ggt;ta.load=hgt;ta.useColors=pgt;ta.destroy=rQ.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ta.colors=[6,2,3,4,5,1];try{let e=PIe();e&&(e.stderr||e).level>=2&&(ta.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{}ta.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 pgt(){return"colors"in ta.inspectOpts?!!ta.inspectOpts.colors:dgt.isatty(process.stderr.fd)}function fgt(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 knt=Object.create;var YL=Object.defineProperty;var Ont=Object.getOwnPropertyDescriptor;var Pnt=Object.getOwnPropertyNames;var Mnt=Object.getPrototypeOf,Lnt=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 B=(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}},Ws=(e,t)=>{for(var n in t)YL(e,n,{get:t[n],enumerable:!0})},FAe=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Pnt(t))!Lnt.call(e,o)&&o!==n&&YL(e,o,{get:()=>t[o],enumerable:!(r=Ont(t,o))||r.enumerable});return e};var ue=(e,t,n)=>(n=e!=null?knt(Mnt(e)):{},FAe(t||!e||!e.__esModule?YL(n,"default",{value:e,enumerable:!0}):n,e)),Me=e=>FAe(YL({},"__esModule",{value:!0}),e);var A=B(()=>{(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.230"}}catch{}})()});var bg,Qq=B(()=>{A();bg="1.9.1"});function Unt(e){let t=new Set([e]),n=new Set,r=e.match(zAe);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(zAe);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 zAe,HAe,$Ae=B(()=>{A();Qq();zAe=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;HAe=Unt(bg)});function vm(e,t,n,r=!1){var o;let i=pw[dw]=(o=pw[dw])!==null&&o!==void 0?o:{version:bg};if(!r&&i[e]){let s=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return n.error(s.stack||s.message),!1}if(i.version!==bg){let s=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${bg}`);return n.error(s.stack||s.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${bg}.`),!0}function jl(e){var t,n;let r=(t=pw[dw])===null||t===void 0?void 0:t.version;if(!(!r||!HAe(r)))return(n=pw[dw])===null||n===void 0?void 0:n[e]}function Rm(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${bg}.`);let n=pw[dw];n&&delete n[e]}var Qnt,dw,pw,aS=B(()=>{A();Qq();$Ae();Qnt=bg.split(".")[0],dw=Symbol.for(`opentelemetry.js.api.${Qnt}`),pw=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function fw(e,t,n){let r=jl("diag");if(r)return r[e](t,...n)}var KL,qAe=B(()=>{A();aS();KL=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return fw("debug",this._namespace,t)}error(...t){return fw("error",this._namespace,t)}info(...t){return fw("info",this._namespace,t)}warn(...t){return fw("warn",this._namespace,t)}verbose(...t){return fw("verbose",this._namespace,t)}}});var Rs,JL=B(()=>{A();(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"})(Rs||(Rs={}))});function VAe(e,t){e<Rs.NONE?e=Rs.NONE:e>Rs.ALL&&(e=Rs.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",Rs.ERROR),warn:n("warn",Rs.WARN),info:n("info",Rs.INFO),debug:n("debug",Rs.DEBUG),verbose:n("verbose",Rs.VERBOSE)}}var YAe=B(()=>{A();JL()});var Fnt,Xs,uS=B(()=>{A();qAe();YAe();JL();aS();Fnt="diag",Xs=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let s=jl("diag");if(s)return s[o](...i)}}let n=this,r=(o,i={logLevel:Rs.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=jl("diag"),h=VAe((u=i.logLevel)!==null&&u!==void 0?u:Rs.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(Fnt,n)},n.createComponentLogger=o=>new KL(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var ZL,KAe=B(()=>{A();ZL=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 JAe,ZAe=B(()=>{A();JAe=Symbol("BaggageEntryMetadata")});function WAe(e={}){return new ZL(new Map(Object.entries(e)))}function XAe(e){return typeof e!="string"&&(Gnt.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:JAe,toString(){return e}}}var Gnt,Fq=B(()=>{A();uS();KAe();ZAe();Gnt=Xs.instance()});function zl(e){return Symbol.for(e)}var Gq,kC,mw=B(()=>{A();Gq=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}}},kC=new Gq});var jq,zq,WL,ege=B(()=>{A();jq=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],zq={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(zq[t]=console[t])}WL=class{constructor(){function t(n){return function(...r){let o=zq[n];if(typeof o!="function"&&(o=zq.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<jq.length;n++)this[jq[n].n]=t(jq[n].c)}}});function tge(){return Wq}var Hq,OC,$q,qq,Vq,Yq,Aw,Kq,Jq,Zq,Wq,jnt,znt,Hnt,$nt,qnt,Vnt,Ynt,Xq=B(()=>{A();Hq=class{constructor(){}createGauge(t,n){return znt}createHistogram(t,n){return Hnt}createCounter(t,n){return jnt}createUpDownCounter(t,n){return $nt}createObservableGauge(t,n){return Vnt}createObservableCounter(t,n){return qnt}createObservableUpDownCounter(t,n){return Ynt}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},OC=class{},$q=class extends OC{add(t,n){}},qq=class extends OC{add(t,n){}},Vq=class extends OC{record(t,n){}},Yq=class extends OC{record(t,n){}},Aw=class{addCallback(t){}removeCallback(t){}},Kq=class extends Aw{},Jq=class extends Aw{},Zq=class extends Aw{},Wq=new Hq,jnt=new $q,znt=new Vq,Hnt=new Yq,$nt=new qq,qnt=new Kq,Vnt=new Jq,Ynt=new Zq});var XL,nge=B(()=>{A();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(XL||(XL={}))});var eU,tU,eV=B(()=>{A();eU={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},tU={set(e,t,n){e!=null&&(e[t]=n)}}});var nU,rge=B(()=>{A();mw();nU=class{active(){return kC}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var tV,Knt,xm,gw=B(()=>{A();rge();aS();uS();tV="context",Knt=new nU,xm=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return vm(tV,t,Xs.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 jl(tV)||Knt}disable(){this._getContextManager().disable(),Rm(tV,Xs.instance())}}});var ou,nV=B(()=>{A();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(ou||(ou={}))});var hw,cS,rU,oU=B(()=>{A();nV();hw="0000000000000000",cS="00000000000000000000000000000000",rU={traceId:cS,spanId:hw,traceFlags:ou.NONE}});var Dm,iU=B(()=>{A();oU();Dm=class{constructor(t=rU){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 sU(e){return e.getValue(rV)||void 0}function oge(){return sU(xm.getInstance().active())}function _w(e,t){return e.setValue(rV,t)}function ige(e){return e.deleteValue(rV)}function sge(e,t){return _w(e,new Dm(t))}function aU(e){var t;return(t=sU(e))===null||t===void 0?void 0:t.spanContext()}var rV,oV=B(()=>{A();mw();iU();gw();rV=zl("OpenTelemetry Context Key SPAN")});function age(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(uU[e.charCodeAt(r)]|0)+(uU[e.charCodeAt(r+1)]|0)+(uU[e.charCodeAt(r+2)]|0)+(uU[e.charCodeAt(r+3)]|0);return n===t}function iV(e){return age(e,32)&&e!==cS}function sV(e){return age(e,16)&&e!==hw}function Ig(e){return iV(e.traceId)&&sV(e.spanId)}function uge(e){return new Dm(e)}var uU,cU=B(()=>{A();oU();iU();uU=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 Jnt(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 aV,PC,uV=B(()=>{A();gw();oV();iU();cU();aV=xm.getInstance(),PC=class{startSpan(t,n,r=aV.active()){if(!!n?.root)return new Dm;let i=r&&aU(r);return Jnt(i)&&Ig(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??aV.active(),f=this.startSpan(t,i,l),h=_w(l,f);return aV.with(h,u,void 0,f)}}});var Znt,MC,cV=B(()=>{A();uV();Znt=new PC,MC=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):Znt}}});var lU,cge=B(()=>{A();uV();lU=class{getTracer(t,n,r){return new PC}}});var Wnt,lS,lV=B(()=>{A();cV();cge();Wnt=new lU,lS=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new MC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Wnt}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 dU,lge=B(()=>{A();(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(dU||(dU={}))});var Ao,dge=B(()=>{A();(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"})(Ao||(Ao={}))});var gi,pge=B(()=>{A();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(gi||(gi={}))});function fge(e){return trt.test(e)}function mge(e){return nrt.test(e)&&!rrt.test(e)}var dV,Xnt,ert,trt,nrt,rrt,Age=B(()=>{A();dV="[_0-9a-z-*/]",Xnt=`[a-z]${dV}{0,255}`,ert=`[a-z0-9]${dV}{0,240}@[a-z]${dV}{0,13}`,trt=new RegExp(`^(?:${Xnt}|${ert})$`),nrt=/^[ -~]{0,255}[!-~]$/,rrt=/,|=/});var gge,ort,hge,_ge,pU,Ege=B(()=>{A();Age();gge=32,ort=512,hge=",",_ge="=",pU=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+_ge+this.get(n)),t),[]).join(hge)}_parse(t){t.length>ort||(this._internalState=t.split(hge).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(_ge);if(i!==-1){let s=o.slice(0,i),u=o.slice(i+1,r.length);fge(s)&&mge(u)&&n.set(s,u)}return n},new Map),this._internalState.size>gge&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,gge))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function yge(e){return new pU(e)}var Sge=B(()=>{A();Ege()});var We,Tge=B(()=>{A();gw();We=xm.getInstance()});var Hl,bge=B(()=>{A();uS();Hl=Xs.instance()});var pV,Ige,Cge=B(()=>{A();Xq();pV=class{getMeter(t,n,r){return Wq}},Ige=new pV});var fV,fU,vge=B(()=>{A();Cge();aS();uS();fV="metrics",fU=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return vm(fV,t,Xs.instance())}getMeterProvider(){return jl(fV)||Ige}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){Rm(fV,Xs.instance())}}});var mV,Rge=B(()=>{A();vge();mV=fU.getInstance()});var mU,xge=B(()=>{A();mU=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function gV(e){return e.getValue(AV)||void 0}function Dge(){return gV(xm.getInstance().active())}function Nge(e,t){return e.setValue(AV,t)}function wge(e){return e.deleteValue(AV)}var AV,Bge=B(()=>{A();gw();mw();AV=zl("OpenTelemetry Baggage Key")});var hV,irt,AU,kge=B(()=>{A();aS();xge();eV();Bge();Fq();uS();hV="propagation",irt=new mU,AU=class e{constructor(){this.createBaggage=WAe,this.getBaggage=gV,this.getActiveBaggage=Dge,this.setBaggage=Nge,this.deleteBaggage=wge}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return vm(hV,t,Xs.instance())}inject(t,n,r=tU){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=eU){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){Rm(hV,Xs.instance())}_getGlobalPropagator(){return jl(hV)||irt}}});var Af,Oge=B(()=>{A();kge();Af=AU.getInstance()});var _V,gU,Pge=B(()=>{A();aS();lV();cU();oV();uS();_V="trace",gU=class e{constructor(){this._proxyTracerProvider=new lS,this.wrapSpanContext=uge,this.isSpanContextValid=Ig,this.deleteSpan=ige,this.getSpan=sU,this.getActiveSpan=oge,this.getSpanContext=aU,this.setSpan=_w,this.setSpanContext=sge}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=vm(_V,this._proxyTracerProvider,Xs.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return jl(_V)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){Rm(_V,Xs.instance()),this._proxyTracerProvider=new lS}}});var Jt,Mge=B(()=>{A();Pge();Jt=gU.getInstance()});var tt={};Ws(tt,{DiagConsoleLogger:()=>WL,DiagLogLevel:()=>Rs,INVALID_SPANID:()=>hw,INVALID_SPAN_CONTEXT:()=>rU,INVALID_TRACEID:()=>cS,ProxyTracer:()=>MC,ProxyTracerProvider:()=>lS,ROOT_CONTEXT:()=>kC,SamplingDecision:()=>dU,SpanKind:()=>Ao,SpanStatusCode:()=>gi,TraceFlags:()=>ou,ValueType:()=>XL,baggageEntryMetadataFromString:()=>XAe,context:()=>We,createContextKey:()=>zl,createNoopMeter:()=>tge,createTraceState:()=>yge,default:()=>srt,defaultTextMapGetter:()=>eU,defaultTextMapSetter:()=>tU,diag:()=>Hl,isSpanContextValid:()=>Ig,isValidSpanId:()=>sV,isValidTraceId:()=>iV,metrics:()=>mV,propagation:()=>Af,trace:()=>Jt});var srt,He=B(()=>{A();Fq();mw();ege();JL();Xq();nge();eV();cV();lV();lge();dge();pge();nV();Sge();cU();oU();Tge();bge();Rge();Oge();Mge();srt={context:We,diag:Hl,metrics:mV,propagation:Af,trace:Jt}});var Ew=M(C_=>{"use strict";A();Object.defineProperty(C_,"__esModule",{value:!0});C_.isTracingSuppressed=C_.unsuppressTracing=C_.suppressTracing=void 0;var art=(He(),Me(tt)),EV=(0,art.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function urt(e){return e.setValue(EV,!0)}C_.suppressTracing=urt;function crt(e){return e.deleteValue(EV)}C_.unsuppressTracing=crt;function lrt(e){return e.getValue(EV)===!0}C_.isTracingSuppressed=lrt});var yV=M(iu=>{"use strict";A();Object.defineProperty(iu,"__esModule",{value:!0});iu.BAGGAGE_MAX_TOTAL_LENGTH=iu.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=iu.BAGGAGE_MAX_NAME_VALUE_PAIRS=iu.BAGGAGE_HEADER=iu.BAGGAGE_ITEMS_SEPARATOR=iu.BAGGAGE_PROPERTIES_SEPARATOR=iu.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;iu.BAGGAGE_KEY_PAIR_SEPARATOR="=";iu.BAGGAGE_PROPERTIES_SEPARATOR=";";iu.BAGGAGE_ITEMS_SEPARATOR=",";iu.BAGGAGE_HEADER="baggage";iu.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;iu.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;iu.BAGGAGE_MAX_TOTAL_LENGTH=8192});var TV=M(Kd=>{"use strict";A();Object.defineProperty(Kd,"__esModule",{value:!0});Kd.parseKeyPairsIntoRecord=Kd.parseBaggageHeaderString=Kd.parsePairKeyValue=Kd.getKeyPairs=Kd.serializeKeyPairs=void 0;var drt=(He(),Me(tt)),Nm=yV();function prt(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},"")}Kd.serializeKeyPairs=prt;function frt(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})}Kd.getKeyPairs=frt;function SV(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,drt.baggageEntryMetadataFromString)(f)}return{key:s,value:u,metadata:l}}Kd.parsePairKeyValue=SV;function mrt(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=SV(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]}Kd.parseBaggageHeaderString=mrt;function Art(e){let t={};return typeof e=="string"&&e.length>0&&e.split(Nm.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=SV(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}Kd.parseKeyPairsIntoRecord=Art});var Lge=M(_U=>{"use strict";A();Object.defineProperty(_U,"__esModule",{value:!0});_U.W3CBaggagePropagator=void 0;var bV=(He(),Me(tt)),grt=Ew(),yw=yV(),hU=TV(),IV=class{inject(t,n,r){let o=bV.propagation.getBaggage(t);if(!o||(0,grt.isTracingSuppressed)(t))return;let i=(0,hU.getKeyPairs)(o).filter(u=>u.length<=yw.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,yw.BAGGAGE_MAX_NAME_VALUE_PAIRS),s=(0,hU.serializeKeyPairs)(i);s.length>0&&r.set(n,yw.BAGGAGE_HEADER,s)}extract(t,n,r){let o=r.get(n,yw.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,hU.parseBaggageHeaderString)(o[l],i,s,u);else[s]=(0,hU.parseBaggageHeaderString)(o,i,s,u);return s===0?t:bV.propagation.setBaggage(t,bV.propagation.createBaggage(i))}fields(){return[yw.BAGGAGE_HEADER]}};_U.W3CBaggagePropagator=IV});var Uge=M(EU=>{"use strict";A();Object.defineProperty(EU,"__esModule",{value:!0});EU.AnchoredClock=void 0;var CV=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}};EU.AnchoredClock=CV});var zge=M(v_=>{"use strict";A();Object.defineProperty(v_,"__esModule",{value:!0});v_.isAttributeValue=v_.isAttributeKey=v_.sanitizeAttributes=void 0;var Qge=(He(),Me(tt));function hrt(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(!Fge(n)){Qge.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!Gge(r)){Qge.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}v_.sanitizeAttributes=hrt;function Fge(e){return typeof e=="string"&&e!==""}v_.isAttributeKey=Fge;function Gge(e){return e==null?!0:Array.isArray(e)?_rt(e):jge(typeof e)}v_.isAttributeValue=Gge;function _rt(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(jge(r)){t=r;continue}return!1}return!1}}return!0}function jge(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var vV=M(yU=>{"use strict";A();Object.defineProperty(yU,"__esModule",{value:!0});yU.loggingErrorHandler=void 0;var Ert=(He(),Me(tt));function yrt(){return e=>{Ert.diag.error(Srt(e))}}yU.loggingErrorHandler=yrt;function Srt(e){return typeof e=="string"?e:JSON.stringify(Trt(e))}function Trt(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 $ge=M(LC=>{"use strict";A();Object.defineProperty(LC,"__esModule",{value:!0});LC.globalErrorHandler=LC.setGlobalErrorHandler=void 0;var brt=vV(),Hge=(0,brt.loggingErrorHandler)();function Irt(e){Hge=e}LC.setGlobalErrorHandler=Irt;function Crt(e){try{Hge(e)}catch{}}LC.globalErrorHandler=Crt});var Kge=M(wm=>{"use strict";A();Object.defineProperty(wm,"__esModule",{value:!0});wm.getStringListFromEnv=wm.getBooleanFromEnv=wm.getStringFromEnv=wm.getNumberFromEnv=void 0;var qge=(He(),Me(tt)),Vge=Ue("util");function vrt(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){qge.diag.warn(`Unknown value ${(0,Vge.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}wm.getNumberFromEnv=vrt;function Yge(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}wm.getStringFromEnv=Yge;function Rrt(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||qge.diag.warn(`Unknown value ${(0,Vge.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}wm.getBooleanFromEnv=Rrt;function xrt(e){return Yge(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}wm.getStringListFromEnv=xrt});var Jge=M(SU=>{"use strict";A();Object.defineProperty(SU,"__esModule",{value:!0});SU._globalThis=void 0;SU._globalThis=globalThis});var Zge=M(TU=>{"use strict";A();Object.defineProperty(TU,"__esModule",{value:!0});TU.VERSION=void 0;TU.VERSION="2.8.0"});function Mi(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 RV=B(()=>{A()});var 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,whe,Bhe,khe,Ohe,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,w_e,B_e,k_e,O_e,P_e,M_e,L_e,U_e,Q_e,F_e,G_e,j_e,z_e,H_e,$_e,q_e,V_e,Y_e,K_e,J_e,Z_e,W_e,X_e,eEe,tEe,nEe,rEe,oEe,iEe,sEe,aEe,uEe,cEe,lEe,dEe,pEe,fEe,mEe,AEe,gEe,hEe,Drt,xV,Nrt,wrt,Brt,krt,DV,Ort,Prt,Mrt,Lrt,Urt,Qrt,Frt,Grt,jrt,zrt,Hrt,$rt,qrt,Vrt,Yrt,Krt,Jrt,Zrt,NV,Wrt,Xrt,eot,tot,not,rot,oot,iot,sot,aot,uot,cot,wV,lot,dot,BV,kV,pot,fot,mot,Aot,got,hot,_ot,Eot,yot,Sot,Tot,bot,Iot,Cot,vot,Rot,xot,Sw,UC,OV,Dot,Not,dS,wot,Bot,kot,Oot,PV,MV,Pot,LV,Mot,Lot,Uot,Qot,Fot,Got,jot,zot,Hot,$ot,qot,Vot,Yot,Kot,Jot,Zot,Wot,Xot,eit,tit,nit,rit,oit,UV,iit,sit,ait,uit,cit,lit,dit,pit,fit,mit,Ait,git,hit,_it,Eit,yit,Sit,Tit,bit,QV,Iit,FV,Cit,vit,Rit,xit,Dit,Nit,wit,Bit,kit,_Ee,EEe,yEe,SEe,TEe,bEe,IEe,CEe,vEe,REe,xEe,DEe,NEe,wEe,BEe,kEe,OEe,PEe,MEe,LEe,UEe,QEe,FEe,GEe,jEe,zEe,HEe,$Ee,qEe,VEe,YEe,KEe,JEe,ZEe,WEe,XEe,eye,tye,nye,rye,oye,iye,sye,aye,uye,cye,lye,Oit,Pit,Mit,Lit,Uit,Qit,Fit,Git,jit,zit,Hit,$it,qit,Vit,Yit,Kit,Jit,Zit,Wit,Xit,est,tst,nst,rst,ost,ist,sst,ast,ust,cst,lst,dst,pst,fst,mst,Ast,gst,hst,_st,Est,yst,Sst,Tst,bst,Ist,Cst,vst,Rst,dye,pye,fye,mye,Aye,gye,hye,_ye,Eye,yye,Sye,xst,Dst,Nst,wst,Bst,kst,Ost,Pst,Mst,Lst,Ust,Qst,Tye,bye,Iye,Cye,vye,Fst,Gst,jst,zst,Hst,$st,Rye,xye,Dye,qst,Vst,Yst,Kst,Nye,wye,Bye,kye,Jst,Zst,Wst,Xst,eat,Oye,Pye,Mye,Lye,Uye,Qye,Fye,tat,nat,rat,oat,iat,sat,aat,uat,Gye,jye,zye,Hye,$ye,cat,lat,dat,pat,fat,mat,qye,Vye,Yye,Kye,Jye,Zye,Wye,Xye,e0e,t0e,n0e,r0e,o0e,i0e,s0e,a0e,u0e,c0e,l0e,d0e,p0e,Aat,gat,hat,_at,Eat,yat,Sat,Tat,bat,Iat,Cat,vat,Rat,xat,Dat,Nat,wat,Bat,kat,Oat,Pat,Mat,f0e,m0e,A0e,g0e,h0e,Lat,Uat,Qat,Fat,Gat,jat,_0e,E0e,zat,Hat,$at,y0e,S0e,qat,Vat,Yat,T0e,b0e,I0e,C0e,v0e,R0e,x0e,D0e,N0e,w0e,B0e,k0e,O0e,P0e,M0e,L0e,U0e,Kat,Jat,Zat,Wat,Xat,eut,tut,nut,rut,out,iut,sut,aut,uut,cut,lut,dut,put,Q0e,F0e,fut,mut,Aut,G0e=B(()=>{A();RV();Wge="aws.lambda.invoked_arn",Xge="db.system",ehe="db.connection_string",the="db.user",nhe="db.jdbc.driver_classname",rhe="db.name",ohe="db.statement",ihe="db.operation",she="db.mssql.instance_name",ahe="db.cassandra.keyspace",uhe="db.cassandra.page_size",che="db.cassandra.consistency_level",lhe="db.cassandra.table",dhe="db.cassandra.idempotence",phe="db.cassandra.speculative_execution_count",fhe="db.cassandra.coordinator.id",mhe="db.cassandra.coordinator.dc",Ahe="db.hbase.namespace",ghe="db.redis.database_index",hhe="db.mongodb.collection",_he="db.sql.table",Ehe="exception.type",yhe="exception.message",She="exception.stacktrace",The="exception.escaped",bhe="faas.trigger",Ihe="faas.execution",Che="faas.document.collection",vhe="faas.document.operation",Rhe="faas.document.time",xhe="faas.document.name",Dhe="faas.time",Nhe="faas.cron",whe="faas.coldstart",Bhe="faas.invoked_name",khe="faas.invoked_provider",Ohe="faas.invoked_region",Phe="net.transport",Mhe="net.peer.ip",Lhe="net.peer.port",Uhe="net.peer.name",Qhe="net.host.ip",Fhe="net.host.port",Ghe="net.host.name",jhe="net.host.connection.type",zhe="net.host.connection.subtype",Hhe="net.host.carrier.name",$he="net.host.carrier.mcc",qhe="net.host.carrier.mnc",Vhe="net.host.carrier.icc",Yhe="peer.service",Khe="enduser.id",Jhe="enduser.role",Zhe="enduser.scope",Whe="thread.id",Xhe="thread.name",e_e="code.function",t_e="code.namespace",n_e="code.filepath",r_e="code.lineno",o_e="http.method",i_e="http.url",s_e="http.target",a_e="http.host",u_e="http.scheme",c_e="http.status_code",l_e="http.flavor",d_e="http.user_agent",p_e="http.request_content_length",f_e="http.request_content_length_uncompressed",m_e="http.response_content_length",A_e="http.response_content_length_uncompressed",g_e="http.server_name",h_e="http.route",__e="http.client_ip",E_e="aws.dynamodb.table_names",y_e="aws.dynamodb.consumed_capacity",S_e="aws.dynamodb.item_collection_metrics",T_e="aws.dynamodb.provisioned_read_capacity",b_e="aws.dynamodb.provisioned_write_capacity",I_e="aws.dynamodb.consistent_read",C_e="aws.dynamodb.projection",v_e="aws.dynamodb.limit",R_e="aws.dynamodb.attributes_to_get",x_e="aws.dynamodb.index_name",D_e="aws.dynamodb.select",N_e="aws.dynamodb.global_secondary_indexes",w_e="aws.dynamodb.local_secondary_indexes",B_e="aws.dynamodb.exclusive_start_table",k_e="aws.dynamodb.table_count",O_e="aws.dynamodb.scan_forward",P_e="aws.dynamodb.segment",M_e="aws.dynamodb.total_segments",L_e="aws.dynamodb.count",U_e="aws.dynamodb.scanned_count",Q_e="aws.dynamodb.attribute_definitions",F_e="aws.dynamodb.global_secondary_index_updates",G_e="messaging.system",j_e="messaging.destination",z_e="messaging.destination_kind",H_e="messaging.temp_destination",$_e="messaging.protocol",q_e="messaging.protocol_version",V_e="messaging.url",Y_e="messaging.message_id",K_e="messaging.conversation_id",J_e="messaging.message_payload_size_bytes",Z_e="messaging.message_payload_compressed_size_bytes",W_e="messaging.operation",X_e="messaging.consumer_id",eEe="messaging.rabbitmq.routing_key",tEe="messaging.kafka.message_key",nEe="messaging.kafka.consumer_group",rEe="messaging.kafka.client_id",oEe="messaging.kafka.partition",iEe="messaging.kafka.tombstone",sEe="rpc.system",aEe="rpc.service",uEe="rpc.method",cEe="rpc.grpc.status_code",lEe="rpc.jsonrpc.version",dEe="rpc.jsonrpc.request_id",pEe="rpc.jsonrpc.error_code",fEe="rpc.jsonrpc.error_message",mEe="message.type",AEe="message.id",gEe="message.compressed_size",hEe="message.uncompressed_size",Drt=Wge,xV=Xge,Nrt=ehe,wrt=the,Brt=nhe,krt=rhe,DV=ohe,Ort=ihe,Prt=she,Mrt=ahe,Lrt=uhe,Urt=che,Qrt=lhe,Frt=dhe,Grt=phe,jrt=fhe,zrt=mhe,Hrt=Ahe,$rt=ghe,qrt=hhe,Vrt=_he,Yrt=Ehe,Krt=yhe,Jrt=She,Zrt=The,NV=bhe,Wrt=Ihe,Xrt=Che,eot=vhe,tot=Rhe,not=xhe,rot=Dhe,oot=Nhe,iot=whe,sot=Bhe,aot=khe,uot=Ohe,cot=Phe,wV=Mhe,lot=Lhe,dot=Uhe,BV=Qhe,kV=Fhe,pot=Ghe,fot=jhe,mot=zhe,Aot=Hhe,got=$he,hot=qhe,_ot=Vhe,Eot=Yhe,yot=Khe,Sot=Jhe,Tot=Zhe,bot=Whe,Iot=Xhe,Cot=e_e,vot=t_e,Rot=n_e,xot=r_e,Sw=o_e,UC=i_e,OV=s_e,Dot=a_e,Not=u_e,dS=c_e,wot=l_e,Bot=d_e,kot=p_e,Oot=f_e,PV=m_e,MV=A_e,Pot=g_e,LV=h_e,Mot=__e,Lot=E_e,Uot=y_e,Qot=S_e,Fot=T_e,Got=b_e,jot=I_e,zot=C_e,Hot=v_e,$ot=R_e,qot=x_e,Vot=D_e,Yot=N_e,Kot=w_e,Jot=B_e,Zot=k_e,Wot=O_e,Xot=P_e,eit=M_e,tit=L_e,nit=U_e,rit=Q_e,oit=F_e,UV=G_e,iit=j_e,sit=z_e,ait=H_e,uit=$_e,cit=q_e,lit=V_e,dit=Y_e,pit=K_e,fit=J_e,mit=Z_e,Ait=W_e,git=X_e,hit=eEe,_it=tEe,Eit=nEe,yit=rEe,Sit=oEe,Tit=iEe,bit=sEe,QV=aEe,Iit=uEe,FV=cEe,Cit=lEe,vit=dEe,Rit=pEe,xit=fEe,Dit=mEe,Nit=AEe,wit=gEe,Bit=hEe,kit=Mi([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,whe,Bhe,khe,Ohe,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,w_e,B_e,k_e,O_e,P_e,M_e,L_e,U_e,Q_e,F_e,G_e,j_e,z_e,H_e,$_e,q_e,V_e,Y_e,K_e,J_e,Z_e,W_e,X_e,eEe,tEe,nEe,rEe,oEe,iEe,sEe,aEe,uEe,cEe,lEe,dEe,pEe,fEe,mEe,AEe,gEe,hEe]),_Ee="other_sql",EEe="mssql",yEe="mysql",SEe="oracle",TEe="db2",bEe="postgresql",IEe="redshift",CEe="hive",vEe="cloudscape",REe="hsqldb",xEe="progress",DEe="maxdb",NEe="hanadb",wEe="ingres",BEe="firstsql",kEe="edb",OEe="cache",PEe="adabas",MEe="firebird",LEe="derby",UEe="filemaker",QEe="informix",FEe="instantdb",GEe="interbase",jEe="mariadb",zEe="netezza",HEe="pervasive",$Ee="pointbase",qEe="sqlite",VEe="sybase",YEe="teradata",KEe="vertica",JEe="h2",ZEe="coldfusion",WEe="cassandra",XEe="hbase",eye="mongodb",tye="redis",nye="couchbase",rye="couchdb",oye="cosmosdb",iye="dynamodb",sye="neo4j",aye="geode",uye="elasticsearch",cye="memcached",lye="cockroachdb",Oit=_Ee,Pit=EEe,Mit=yEe,Lit=SEe,Uit=TEe,Qit=bEe,Fit=IEe,Git=CEe,jit=vEe,zit=REe,Hit=xEe,$it=DEe,qit=NEe,Vit=wEe,Yit=BEe,Kit=kEe,Jit=OEe,Zit=PEe,Wit=MEe,Xit=LEe,est=UEe,tst=QEe,nst=FEe,rst=GEe,ost=jEe,ist=zEe,sst=HEe,ast=$Ee,ust=qEe,cst=VEe,lst=YEe,dst=KEe,pst=JEe,fst=ZEe,mst=WEe,Ast=XEe,gst=eye,hst=tye,_st=nye,Est=rye,yst=oye,Sst=iye,Tst=sye,bst=aye,Ist=uye,Cst=cye,vst=lye,Rst=Mi([_Ee,EEe,yEe,SEe,TEe,bEe,IEe,CEe,vEe,REe,xEe,DEe,NEe,wEe,BEe,kEe,OEe,PEe,MEe,LEe,UEe,QEe,FEe,GEe,jEe,zEe,HEe,$Ee,qEe,VEe,YEe,KEe,JEe,ZEe,WEe,XEe,eye,tye,nye,rye,oye,iye,sye,aye,uye,cye,lye]),dye="all",pye="each_quorum",fye="quorum",mye="local_quorum",Aye="one",gye="two",hye="three",_ye="local_one",Eye="any",yye="serial",Sye="local_serial",xst=dye,Dst=pye,Nst=fye,wst=mye,Bst=Aye,kst=gye,Ost=hye,Pst=_ye,Mst=Eye,Lst=yye,Ust=Sye,Qst=Mi([dye,pye,fye,mye,Aye,gye,hye,_ye,Eye,yye,Sye]),Tye="datasource",bye="http",Iye="pubsub",Cye="timer",vye="other",Fst=Tye,Gst=bye,jst=Iye,zst=Cye,Hst=vye,$st=Mi([Tye,bye,Iye,Cye,vye]),Rye="insert",xye="edit",Dye="delete",qst=Rye,Vst=xye,Yst=Dye,Kst=Mi([Rye,xye,Dye]),Nye="alibaba_cloud",wye="aws",Bye="azure",kye="gcp",Jst=Nye,Zst=wye,Wst=Bye,Xst=kye,eat=Mi([Nye,wye,Bye,kye]),Oye="ip_tcp",Pye="ip_udp",Mye="ip",Lye="unix",Uye="pipe",Qye="inproc",Fye="other",tat=Oye,nat=Pye,rat=Mye,oat=Lye,iat=Uye,sat=Qye,aat=Fye,uat=Mi([Oye,Pye,Mye,Lye,Uye,Qye,Fye]),Gye="wifi",jye="wired",zye="cell",Hye="unavailable",$ye="unknown",cat=Gye,lat=jye,dat=zye,pat=Hye,fat=$ye,mat=Mi([Gye,jye,zye,Hye,$ye]),qye="gprs",Vye="edge",Yye="umts",Kye="cdma",Jye="evdo_0",Zye="evdo_a",Wye="cdma2000_1xrtt",Xye="hsdpa",e0e="hsupa",t0e="hspa",n0e="iden",r0e="evdo_b",o0e="lte",i0e="ehrpd",s0e="hspap",a0e="gsm",u0e="td_scdma",c0e="iwlan",l0e="nr",d0e="nrnsa",p0e="lte_ca",Aat=qye,gat=Vye,hat=Yye,_at=Kye,Eat=Jye,yat=Zye,Sat=Wye,Tat=Xye,bat=e0e,Iat=t0e,Cat=n0e,vat=r0e,Rat=o0e,xat=i0e,Dat=s0e,Nat=a0e,wat=u0e,Bat=c0e,kat=l0e,Oat=d0e,Pat=p0e,Mat=Mi([qye,Vye,Yye,Kye,Jye,Zye,Wye,Xye,e0e,t0e,n0e,r0e,o0e,i0e,s0e,a0e,u0e,c0e,l0e,d0e,p0e]),f0e="1.0",m0e="1.1",A0e="2.0",g0e="SPDY",h0e="QUIC",Lat=f0e,Uat=m0e,Qat=A0e,Fat=g0e,Gat=h0e,jat={HTTP_1_0:f0e,HTTP_1_1:m0e,HTTP_2_0:A0e,SPDY:g0e,QUIC:h0e},_0e="queue",E0e="topic",zat=_0e,Hat=E0e,$at=Mi([_0e,E0e]),y0e="receive",S0e="process",qat=y0e,Vat=S0e,Yat=Mi([y0e,S0e]),T0e=0,b0e=1,I0e=2,C0e=3,v0e=4,R0e=5,x0e=6,D0e=7,N0e=8,w0e=9,B0e=10,k0e=11,O0e=12,P0e=13,M0e=14,L0e=15,U0e=16,Kat=T0e,Jat=b0e,Zat=I0e,Wat=C0e,Xat=v0e,eut=R0e,tut=x0e,nut=D0e,rut=N0e,out=w0e,iut=B0e,sut=k0e,aut=O0e,uut=P0e,cut=M0e,lut=L0e,dut=U0e,put={OK:T0e,CANCELLED:b0e,UNKNOWN:I0e,INVALID_ARGUMENT:C0e,DEADLINE_EXCEEDED:v0e,NOT_FOUND:R0e,ALREADY_EXISTS:x0e,PERMISSION_DENIED:D0e,RESOURCE_EXHAUSTED:N0e,FAILED_PRECONDITION:w0e,ABORTED:B0e,OUT_OF_RANGE:k0e,UNIMPLEMENTED:O0e,INTERNAL:P0e,UNAVAILABLE:M0e,DATA_LOSS:L0e,UNAUTHENTICATED:U0e},Q0e="SENT",F0e="RECEIVED",fut=Q0e,mut=F0e,Aut=Mi([Q0e,F0e])});var j0e=B(()=>{A();G0e()});var z0e,H0e,$0e,q0e,V0e,Y0e,K0e,J0e,Z0e,W0e,X0e,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,wSe,BSe,kSe,OSe,PSe,MSe,LSe,USe,QSe,FSe,GSe,jSe,zSe,HSe,$Se,qSe,VSe,YSe,KSe,JSe,ZSe,WSe,XSe,eTe,tTe,nTe,rTe,oTe,iTe,sTe,aTe,uTe,cTe,lTe,dTe,pTe,fTe,mTe,ATe,gut,hut,_ut,Eut,yut,Sut,Tut,but,Iut,Cut,vut,Rut,xut,Dut,Nut,wut,But,kut,Out,Put,Mut,Lut,Uut,Qut,Fut,Gut,jut,zut,Hut,$ut,qut,Vut,Yut,Kut,Jut,Zut,Wut,Xut,ect,tct,nct,rct,oct,ict,sct,act,uct,cct,lct,dct,pct,fct,mct,Act,gct,hct,_ct,Ect,yct,Sct,Tct,bct,Ict,Cct,vct,Rct,xct,Dct,Nct,wct,Bct,GV,kct,Oct,Pct,Mct,Lct,Uct,Qct,Fct,Gct,jct,gTe,hTe,_Te,ETe,zct,Hct,$ct,qct,Vct,yTe,STe,TTe,bTe,ITe,CTe,vTe,RTe,xTe,DTe,NTe,wTe,BTe,kTe,OTe,PTe,MTe,Yct,Kct,Jct,Zct,Wct,Xct,elt,tlt,nlt,rlt,olt,ilt,slt,alt,ult,clt,llt,dlt,LTe,UTe,plt,flt,mlt,QTe,FTe,GTe,jTe,zTe,HTe,$Te,Alt,glt,hlt,_lt,Elt,ylt,Slt,Tlt,qTe,VTe,YTe,KTe,JTe,ZTe,WTe,XTe,ebe,tbe,nbe,blt,Ilt,Clt,vlt,Rlt,xlt,Dlt,Nlt,wlt,Blt,klt,Olt,rbe,obe,ibe,sbe,abe,ube,cbe,lbe,dbe,pbe,Plt,Mlt,Llt,Ult,Qlt,Flt,Glt,jlt,zlt,Hlt,$lt,fbe=B(()=>{A();RV();z0e="cloud.provider",H0e="cloud.account.id",$0e="cloud.region",q0e="cloud.availability_zone",V0e="cloud.platform",Y0e="aws.ecs.container.arn",K0e="aws.ecs.cluster.arn",J0e="aws.ecs.launchtype",Z0e="aws.ecs.task.arn",W0e="aws.ecs.task.family",X0e="aws.ecs.task.revision",eSe="aws.eks.cluster.arn",tSe="aws.log.group.names",nSe="aws.log.group.arns",rSe="aws.log.stream.names",oSe="aws.log.stream.arns",iSe="container.name",sSe="container.id",aSe="container.runtime",uSe="container.image.name",cSe="container.image.tag",lSe="deployment.environment",dSe="device.id",pSe="device.model.identifier",fSe="device.model.name",mSe="faas.name",ASe="faas.id",gSe="faas.version",hSe="faas.instance",_Se="faas.max_memory",ESe="host.id",ySe="host.name",SSe="host.type",TSe="host.arch",bSe="host.image.name",ISe="host.image.id",CSe="host.image.version",vSe="k8s.cluster.name",RSe="k8s.node.name",xSe="k8s.node.uid",DSe="k8s.namespace.name",NSe="k8s.pod.uid",wSe="k8s.pod.name",BSe="k8s.container.name",kSe="k8s.replicaset.uid",OSe="k8s.replicaset.name",PSe="k8s.deployment.uid",MSe="k8s.deployment.name",LSe="k8s.statefulset.uid",USe="k8s.statefulset.name",QSe="k8s.daemonset.uid",FSe="k8s.daemonset.name",GSe="k8s.job.uid",jSe="k8s.job.name",zSe="k8s.cronjob.uid",HSe="k8s.cronjob.name",$Se="os.type",qSe="os.description",VSe="os.name",YSe="os.version",KSe="process.pid",JSe="process.executable.name",ZSe="process.executable.path",WSe="process.command",XSe="process.command_line",eTe="process.command_args",tTe="process.owner",nTe="process.runtime.name",rTe="process.runtime.version",oTe="process.runtime.description",iTe="service.name",sTe="service.namespace",aTe="service.instance.id",uTe="service.version",cTe="telemetry.sdk.name",lTe="telemetry.sdk.language",dTe="telemetry.sdk.version",pTe="telemetry.auto.version",fTe="webengine.name",mTe="webengine.version",ATe="webengine.description",gut=z0e,hut=H0e,_ut=$0e,Eut=q0e,yut=V0e,Sut=Y0e,Tut=K0e,but=J0e,Iut=Z0e,Cut=W0e,vut=X0e,Rut=eSe,xut=tSe,Dut=nSe,Nut=rSe,wut=oSe,But=iSe,kut=sSe,Out=aSe,Put=uSe,Mut=cSe,Lut=lSe,Uut=dSe,Qut=pSe,Fut=fSe,Gut=mSe,jut=ASe,zut=gSe,Hut=hSe,$ut=_Se,qut=ESe,Vut=ySe,Yut=SSe,Kut=TSe,Jut=bSe,Zut=ISe,Wut=CSe,Xut=vSe,ect=RSe,tct=xSe,nct=DSe,rct=NSe,oct=wSe,ict=BSe,sct=kSe,act=OSe,uct=PSe,cct=MSe,lct=LSe,dct=USe,pct=QSe,fct=FSe,mct=GSe,Act=jSe,gct=zSe,hct=HSe,_ct=$Se,Ect=qSe,yct=VSe,Sct=YSe,Tct=KSe,bct=JSe,Ict=ZSe,Cct=WSe,vct=XSe,Rct=eTe,xct=tTe,Dct=nTe,Nct=rTe,wct=oTe,Bct=iTe,GV=sTe,kct=aTe,Oct=uTe,Pct=cTe,Mct=lTe,Lct=dTe,Uct=pTe,Qct=fTe,Fct=mTe,Gct=ATe,jct=Mi([z0e,H0e,$0e,q0e,V0e,Y0e,K0e,J0e,Z0e,W0e,X0e,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,wSe,BSe,kSe,OSe,PSe,MSe,LSe,USe,QSe,FSe,GSe,jSe,zSe,HSe,$Se,qSe,VSe,YSe,KSe,JSe,ZSe,WSe,XSe,eTe,tTe,nTe,rTe,oTe,iTe,sTe,aTe,uTe,cTe,lTe,dTe,pTe,fTe,mTe,ATe]),gTe="alibaba_cloud",hTe="aws",_Te="azure",ETe="gcp",zct=gTe,Hct=hTe,$ct=_Te,qct=ETe,Vct=Mi([gTe,hTe,_Te,ETe]),yTe="alibaba_cloud_ecs",STe="alibaba_cloud_fc",TTe="aws_ec2",bTe="aws_ecs",ITe="aws_eks",CTe="aws_lambda",vTe="aws_elastic_beanstalk",RTe="azure_vm",xTe="azure_container_instances",DTe="azure_aks",NTe="azure_functions",wTe="azure_app_service",BTe="gcp_compute_engine",kTe="gcp_cloud_run",OTe="gcp_kubernetes_engine",PTe="gcp_cloud_functions",MTe="gcp_app_engine",Yct=yTe,Kct=STe,Jct=TTe,Zct=bTe,Wct=ITe,Xct=CTe,elt=vTe,tlt=RTe,nlt=xTe,rlt=DTe,olt=NTe,ilt=wTe,slt=BTe,alt=kTe,ult=OTe,clt=PTe,llt=MTe,dlt=Mi([yTe,STe,TTe,bTe,ITe,CTe,vTe,RTe,xTe,DTe,NTe,wTe,BTe,kTe,OTe,PTe,MTe]),LTe="ec2",UTe="fargate",plt=LTe,flt=UTe,mlt=Mi([LTe,UTe]),QTe="amd64",FTe="arm32",GTe="arm64",jTe="ia64",zTe="ppc32",HTe="ppc64",$Te="x86",Alt=QTe,glt=FTe,hlt=GTe,_lt=jTe,Elt=zTe,ylt=HTe,Slt=$Te,Tlt=Mi([QTe,FTe,GTe,jTe,zTe,HTe,$Te]),qTe="windows",VTe="linux",YTe="darwin",KTe="freebsd",JTe="netbsd",ZTe="openbsd",WTe="dragonflybsd",XTe="hpux",ebe="aix",tbe="solaris",nbe="z_os",blt=qTe,Ilt=VTe,Clt=YTe,vlt=KTe,Rlt=JTe,xlt=ZTe,Dlt=WTe,Nlt=XTe,wlt=ebe,Blt=tbe,klt=nbe,Olt=Mi([qTe,VTe,YTe,KTe,JTe,ZTe,WTe,XTe,ebe,tbe,nbe]),rbe="cpp",obe="dotnet",ibe="erlang",sbe="go",abe="java",ube="nodejs",cbe="php",lbe="python",dbe="ruby",pbe="webjs",Plt=rbe,Mlt=obe,Llt=ibe,Ult=sbe,Qlt=abe,Flt=ube,Glt=cbe,jlt=lbe,zlt=dbe,Hlt=pbe,$lt=Mi([rbe,obe,ibe,sbe,abe,ube,cbe,lbe,dbe,pbe])});var mbe=B(()=>{A();fbe()});var qlt,Vlt,Ylt,Klt,Jlt,Zlt,Wlt,Xlt,edt,tdt,ndt,rdt,odt,idt,sdt,adt,udt,cdt,ldt,ddt,pdt,fdt,mdt,Adt,gdt,jV,zV,hdt,QC,_dt,HV,$V,Edt,pS,ydt,Sdt,Tdt,bdt,Idt,Cdt,vdt,Rdt,yun,Sun,qV,xdt,Ddt,Ndt,wdt,Bdt,kdt,fS,Odt,Pdt,Mdt,Tun,Ldt,Udt,Qdt,Fdt,bun,Gdt,jdt,zdt,Hdt,Cg,vg,$dt,qdt,Vdt,Ydt,Kdt,Jdt,Zdt,Wdt,Xdt,Iun,ept,tpt,npt,rpt,opt,ipt,VV,YV,spt,KV,JV,apt,upt,Cun,vun,cpt,lpt,dpt,ppt,fpt,mpt,Apt,gpt,Run,hpt,ZV,WV,_pt,XV,Ept,e7,ypt,Spt,Tpt,bpt,Ipt,Cpt,vpt,Rpt,xpt,xun,Dpt,Npt,Dun,wpt,Bpt,Nun,kpt,Opt,Ppt,Mpt,Lpt,Upt,Qpt,Fpt,R_,Gpt,jpt,zpt,t7,Abe=B(()=>{A();qlt="aspnetcore.diagnostics.exception.result",Vlt="aborted",Ylt="handled",Klt="skipped",Jlt="unhandled",Zlt="aspnetcore.diagnostics.handler.type",Wlt="aspnetcore.rate_limiting.policy",Xlt="aspnetcore.rate_limiting.result",edt="acquired",tdt="endpoint_limiter",ndt="global_limiter",rdt="request_canceled",odt="aspnetcore.request.is_unhandled",idt="aspnetcore.routing.is_fallback",sdt="aspnetcore.routing.match_status",adt="failure",udt="success",cdt="aspnetcore.user.is_authenticated",ldt="client.address",ddt="client.port",pdt="code.column.number",fdt="code.file.path",mdt="code.function.name",Adt="code.line.number",gdt="code.stacktrace",jV="db.collection.name",zV="db.namespace",hdt="db.operation.batch.size",QC="db.operation.name",_dt="db.query.summary",HV="db.query.text",$V="db.response.status_code",Edt="db.stored_procedure.name",pS="db.system.name",ydt="mariadb",Sdt="microsoft.sql_server",Tdt="mysql",bdt="postgresql",Idt="dotnet.gc.heap.generation",Cdt="gen0",vdt="gen1",Rdt="gen2",yun="loh",Sun="poh",qV="error.type",xdt="_OTHER",Ddt="exception.escaped",Ndt="exception.message",wdt="exception.stacktrace",Bdt="exception.type",kdt=e=>`http.request.header.${e}`,fS="http.request.method",Odt="_OTHER",Pdt="CONNECT",Mdt="DELETE",Tun="GET",Ldt="HEAD",Udt="OPTIONS",Qdt="PATCH",Fdt="POST",bun="PUT",Gdt="TRACE",jdt="http.request.method_original",zdt="http.request.resend_count",Hdt=e=>`http.response.header.${e}`,Cg="http.response.status_code",vg="http.route",$dt="jvm.gc.action",qdt="jvm.gc.name",Vdt="jvm.memory.pool.name",Ydt="jvm.memory.type",Kdt="heap",Jdt="non_heap",Zdt="jvm.thread.daemon",Wdt="jvm.thread.state",Xdt="blocked",Iun="new",ept="runnable",tpt="terminated",npt="timed_waiting",rpt="waiting",opt="network.local.address",ipt="network.local.port",VV="network.peer.address",YV="network.peer.port",spt="network.protocol.name",KV="network.protocol.version",JV="network.transport",apt="pipe",upt="quic",Cun="tcp",vun="udp",cpt="unix",lpt="network.type",dpt="ipv4",ppt="ipv6",fpt="otel.scope.name",mpt="otel.scope.version",Apt="otel.status_code",gpt="ERROR",Run="OK",hpt="otel.status_description",ZV="server.address",WV="server.port",_pt="service.instance.id",XV="service.name",Ept="service.namespace",e7="service.version",ypt="signalr.connection.status",Spt="app_shutdown",Tpt="normal_closure",bpt="timeout",Ipt="signalr.transport",Cpt="long_polling",vpt="server_sent_events",Rpt="web_sockets",xpt="telemetry.sdk.language",xun="cpp",Dpt="dotnet",Npt="erlang",Dun="go",wpt="java",Bpt="nodejs",Nun="php",kpt="python",Opt="ruby",Ppt="rust",Mpt="swift",Lpt="webjs",Upt="telemetry.sdk.name",Qpt="telemetry.sdk.version",Fpt="url.fragment",R_="url.full",Gpt="url.path",jpt="url.query",zpt="url.scheme",t7="user_agent.original"});var Hpt,$pt,qpt,Vpt,Ypt,Kpt,Jpt,Zpt,Wpt,Xpt,eft,tft,nft,rft,oft,ift,sft,aft,uft,cft,lft,dft,pft,fft,mft,Aft,gft,hft,_ft,Eft,yft,Sft,Tft,bft,Ift,Cft,vft,Rft,xft,Dft,Nft,wft,Bft,kft,Oft,Pft,Mft,Lft,Uft,Qft,Fft,gbe=B(()=>{A();Hpt="aspnetcore.diagnostics.exceptions",$pt="aspnetcore.rate_limiting.active_request_leases",qpt="aspnetcore.rate_limiting.queued_requests",Vpt="aspnetcore.rate_limiting.request.time_in_queue",Ypt="aspnetcore.rate_limiting.request_lease.duration",Kpt="aspnetcore.rate_limiting.requests",Jpt="aspnetcore.routing.match_attempts",Zpt="db.client.operation.duration",Wpt="dotnet.assembly.count",Xpt="dotnet.exceptions",eft="dotnet.gc.collections",tft="dotnet.gc.heap.total_allocated",nft="dotnet.gc.last_collection.heap.fragmentation.size",rft="dotnet.gc.last_collection.heap.size",oft="dotnet.gc.last_collection.memory.committed_size",ift="dotnet.gc.pause.time",sft="dotnet.jit.compilation.time",aft="dotnet.jit.compiled_il.size",uft="dotnet.jit.compiled_methods",cft="dotnet.monitor.lock_contentions",lft="dotnet.process.cpu.count",dft="dotnet.process.cpu.time",pft="dotnet.process.memory.working_set",fft="dotnet.thread_pool.queue.length",mft="dotnet.thread_pool.thread.count",Aft="dotnet.thread_pool.work_item.count",gft="dotnet.timer.count",hft="http.client.request.duration",_ft="http.server.request.duration",Eft="jvm.class.count",yft="jvm.class.loaded",Sft="jvm.class.unloaded",Tft="jvm.cpu.count",bft="jvm.cpu.recent_utilization",Ift="jvm.cpu.time",Cft="jvm.gc.duration",vft="jvm.memory.committed",Rft="jvm.memory.limit",xft="jvm.memory.used",Dft="jvm.memory.used_after_last_gc",Nft="jvm.thread.count",wft="kestrel.active_connections",Bft="kestrel.active_tls_handshakes",kft="kestrel.connection.duration",Oft="kestrel.queued_connections",Pft="kestrel.queued_requests",Mft="kestrel.rejected_connections",Lft="kestrel.tls_handshake.duration",Uft="kestrel.upgraded_connections",Qft="signalr.server.active_connections",Fft="signalr.server.connection.duration"});var Gft,hbe=B(()=>{A();Gft="exception"});var Vr={};Ws(Vr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>Vlt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>Ylt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>Klt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>Jlt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>edt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>tdt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>ndt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>rdt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>adt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>udt,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>qlt,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Zlt,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>Wlt,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>Xlt,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>odt,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>idt,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>sdt,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>cdt,ATTR_CLIENT_ADDRESS:()=>ldt,ATTR_CLIENT_PORT:()=>ddt,ATTR_CODE_COLUMN_NUMBER:()=>pdt,ATTR_CODE_FILE_PATH:()=>fdt,ATTR_CODE_FUNCTION_NAME:()=>mdt,ATTR_CODE_LINE_NUMBER:()=>Adt,ATTR_CODE_STACKTRACE:()=>gdt,ATTR_DB_COLLECTION_NAME:()=>jV,ATTR_DB_NAMESPACE:()=>zV,ATTR_DB_OPERATION_BATCH_SIZE:()=>hdt,ATTR_DB_OPERATION_NAME:()=>QC,ATTR_DB_QUERY_SUMMARY:()=>_dt,ATTR_DB_QUERY_TEXT:()=>HV,ATTR_DB_RESPONSE_STATUS_CODE:()=>$V,ATTR_DB_STORED_PROCEDURE_NAME:()=>Edt,ATTR_DB_SYSTEM_NAME:()=>pS,ATTR_DOTNET_GC_HEAP_GENERATION:()=>Idt,ATTR_ERROR_TYPE:()=>qV,ATTR_EXCEPTION_ESCAPED:()=>Ddt,ATTR_EXCEPTION_MESSAGE:()=>Ndt,ATTR_EXCEPTION_STACKTRACE:()=>wdt,ATTR_EXCEPTION_TYPE:()=>Bdt,ATTR_HTTP_REQUEST_HEADER:()=>kdt,ATTR_HTTP_REQUEST_METHOD:()=>fS,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>jdt,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>zdt,ATTR_HTTP_RESPONSE_HEADER:()=>Hdt,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>Cg,ATTR_HTTP_ROUTE:()=>vg,ATTR_JVM_GC_ACTION:()=>$dt,ATTR_JVM_GC_NAME:()=>qdt,ATTR_JVM_MEMORY_POOL_NAME:()=>Vdt,ATTR_JVM_MEMORY_TYPE:()=>Ydt,ATTR_JVM_THREAD_DAEMON:()=>Zdt,ATTR_JVM_THREAD_STATE:()=>Wdt,ATTR_NETWORK_LOCAL_ADDRESS:()=>opt,ATTR_NETWORK_LOCAL_PORT:()=>ipt,ATTR_NETWORK_PEER_ADDRESS:()=>VV,ATTR_NETWORK_PEER_PORT:()=>YV,ATTR_NETWORK_PROTOCOL_NAME:()=>spt,ATTR_NETWORK_PROTOCOL_VERSION:()=>KV,ATTR_NETWORK_TRANSPORT:()=>JV,ATTR_NETWORK_TYPE:()=>lpt,ATTR_OTEL_SCOPE_NAME:()=>fpt,ATTR_OTEL_SCOPE_VERSION:()=>mpt,ATTR_OTEL_STATUS_CODE:()=>Apt,ATTR_OTEL_STATUS_DESCRIPTION:()=>hpt,ATTR_SERVER_ADDRESS:()=>ZV,ATTR_SERVER_PORT:()=>WV,ATTR_SERVICE_INSTANCE_ID:()=>_pt,ATTR_SERVICE_NAME:()=>XV,ATTR_SERVICE_NAMESPACE:()=>Ept,ATTR_SERVICE_VERSION:()=>e7,ATTR_SIGNALR_CONNECTION_STATUS:()=>ypt,ATTR_SIGNALR_TRANSPORT:()=>Ipt,ATTR_TELEMETRY_SDK_LANGUAGE:()=>xpt,ATTR_TELEMETRY_SDK_NAME:()=>Upt,ATTR_TELEMETRY_SDK_VERSION:()=>Qpt,ATTR_URL_FRAGMENT:()=>Fpt,ATTR_URL_FULL:()=>R_,ATTR_URL_PATH:()=>Gpt,ATTR_URL_QUERY:()=>jpt,ATTR_URL_SCHEME:()=>zpt,ATTR_USER_AGENT_ORIGINAL:()=>t7,AWSECSLAUNCHTYPEVALUES_EC2:()=>plt,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>flt,AwsEcsLaunchtypeValues:()=>mlt,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>Yct,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>Kct,CLOUDPLATFORMVALUES_AWS_EC2:()=>Jct,CLOUDPLATFORMVALUES_AWS_ECS:()=>Zct,CLOUDPLATFORMVALUES_AWS_EKS:()=>Wct,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>elt,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>Xct,CLOUDPLATFORMVALUES_AZURE_AKS:()=>rlt,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>ilt,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>nlt,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>olt,CLOUDPLATFORMVALUES_AZURE_VM:()=>tlt,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>llt,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>clt,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>alt,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>slt,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>ult,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>zct,CLOUDPROVIDERVALUES_AWS:()=>Hct,CLOUDPROVIDERVALUES_AZURE:()=>$ct,CLOUDPROVIDERVALUES_GCP:()=>qct,CloudPlatformValues:()=>dlt,CloudProviderValues:()=>Vct,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>xst,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>Mst,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>Dst,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>Pst,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>wst,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>Ust,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>Bst,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>Nst,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>Lst,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>Ost,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>kst,DBSYSTEMVALUES_ADABAS:()=>Zit,DBSYSTEMVALUES_CACHE:()=>Jit,DBSYSTEMVALUES_CASSANDRA:()=>mst,DBSYSTEMVALUES_CLOUDSCAPE:()=>jit,DBSYSTEMVALUES_COCKROACHDB:()=>vst,DBSYSTEMVALUES_COLDFUSION:()=>fst,DBSYSTEMVALUES_COSMOSDB:()=>yst,DBSYSTEMVALUES_COUCHBASE:()=>_st,DBSYSTEMVALUES_COUCHDB:()=>Est,DBSYSTEMVALUES_DB2:()=>Uit,DBSYSTEMVALUES_DERBY:()=>Xit,DBSYSTEMVALUES_DYNAMODB:()=>Sst,DBSYSTEMVALUES_EDB:()=>Kit,DBSYSTEMVALUES_ELASTICSEARCH:()=>Ist,DBSYSTEMVALUES_FILEMAKER:()=>est,DBSYSTEMVALUES_FIREBIRD:()=>Wit,DBSYSTEMVALUES_FIRSTSQL:()=>Yit,DBSYSTEMVALUES_GEODE:()=>bst,DBSYSTEMVALUES_H2:()=>pst,DBSYSTEMVALUES_HANADB:()=>qit,DBSYSTEMVALUES_HBASE:()=>Ast,DBSYSTEMVALUES_HIVE:()=>Git,DBSYSTEMVALUES_HSQLDB:()=>zit,DBSYSTEMVALUES_INFORMIX:()=>tst,DBSYSTEMVALUES_INGRES:()=>Vit,DBSYSTEMVALUES_INSTANTDB:()=>nst,DBSYSTEMVALUES_INTERBASE:()=>rst,DBSYSTEMVALUES_MARIADB:()=>ost,DBSYSTEMVALUES_MAXDB:()=>$it,DBSYSTEMVALUES_MEMCACHED:()=>Cst,DBSYSTEMVALUES_MONGODB:()=>gst,DBSYSTEMVALUES_MSSQL:()=>Pit,DBSYSTEMVALUES_MYSQL:()=>Mit,DBSYSTEMVALUES_NEO4J:()=>Tst,DBSYSTEMVALUES_NETEZZA:()=>ist,DBSYSTEMVALUES_ORACLE:()=>Lit,DBSYSTEMVALUES_OTHER_SQL:()=>Oit,DBSYSTEMVALUES_PERVASIVE:()=>sst,DBSYSTEMVALUES_POINTBASE:()=>ast,DBSYSTEMVALUES_POSTGRESQL:()=>Qit,DBSYSTEMVALUES_PROGRESS:()=>Hit,DBSYSTEMVALUES_REDIS:()=>hst,DBSYSTEMVALUES_REDSHIFT:()=>Fit,DBSYSTEMVALUES_SQLITE:()=>ust,DBSYSTEMVALUES_SYBASE:()=>cst,DBSYSTEMVALUES_TERADATA:()=>lst,DBSYSTEMVALUES_VERTICA:()=>dst,DB_SYSTEM_NAME_VALUE_MARIADB:()=>ydt,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>Sdt,DB_SYSTEM_NAME_VALUE_MYSQL:()=>Tdt,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>bdt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>Cdt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>vdt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>Rdt,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>yun,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>Sun,DbCassandraConsistencyLevelValues:()=>Qst,DbSystemValues:()=>Rst,ERROR_TYPE_VALUE_OTHER:()=>xdt,EVENT_EXCEPTION:()=>Gft,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>Yst,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>Vst,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>qst,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>Jst,FAASINVOKEDPROVIDERVALUES_AWS:()=>Zst,FAASINVOKEDPROVIDERVALUES_AZURE:()=>Wst,FAASINVOKEDPROVIDERVALUES_GCP:()=>Xst,FAASTRIGGERVALUES_DATASOURCE:()=>Fst,FAASTRIGGERVALUES_HTTP:()=>Gst,FAASTRIGGERVALUES_OTHER:()=>Hst,FAASTRIGGERVALUES_PUBSUB:()=>jst,FAASTRIGGERVALUES_TIMER:()=>zst,FaasDocumentOperationValues:()=>Kst,FaasInvokedProviderValues:()=>eat,FaasTriggerValues:()=>$st,HOSTARCHVALUES_AMD64:()=>Alt,HOSTARCHVALUES_ARM32:()=>glt,HOSTARCHVALUES_ARM64:()=>hlt,HOSTARCHVALUES_IA64:()=>_lt,HOSTARCHVALUES_PPC32:()=>Elt,HOSTARCHVALUES_PPC64:()=>ylt,HOSTARCHVALUES_X86:()=>Slt,HTTPFLAVORVALUES_HTTP_1_0:()=>Lat,HTTPFLAVORVALUES_HTTP_1_1:()=>Uat,HTTPFLAVORVALUES_HTTP_2_0:()=>Qat,HTTPFLAVORVALUES_QUIC:()=>Gat,HTTPFLAVORVALUES_SPDY:()=>Fat,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>Pdt,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>Mdt,HTTP_REQUEST_METHOD_VALUE_GET:()=>Tun,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>Ldt,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>Udt,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>Odt,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>Qdt,HTTP_REQUEST_METHOD_VALUE_POST:()=>Fdt,HTTP_REQUEST_METHOD_VALUE_PUT:()=>bun,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>Gdt,HostArchValues:()=>Tlt,HttpFlavorValues:()=>jat,JVM_MEMORY_TYPE_VALUE_HEAP:()=>Kdt,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>Jdt,JVM_THREAD_STATE_VALUE_BLOCKED:()=>Xdt,JVM_THREAD_STATE_VALUE_NEW:()=>Iun,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>ept,JVM_THREAD_STATE_VALUE_TERMINATED:()=>tpt,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>npt,JVM_THREAD_STATE_VALUE_WAITING:()=>rpt,MESSAGETYPEVALUES_RECEIVED:()=>mut,MESSAGETYPEVALUES_SENT:()=>fut,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>zat,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>Hat,MESSAGINGOPERATIONVALUES_PROCESS:()=>Vat,MESSAGINGOPERATIONVALUES_RECEIVE:()=>qat,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>Hpt,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>$pt,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>qpt,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>Kpt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>Ypt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>Vpt,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>Jpt,METRIC_DB_CLIENT_OPERATION_DURATION:()=>Zpt,METRIC_DOTNET_ASSEMBLY_COUNT:()=>Wpt,METRIC_DOTNET_EXCEPTIONS:()=>Xpt,METRIC_DOTNET_GC_COLLECTIONS:()=>eft,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>tft,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>nft,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>rft,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>oft,METRIC_DOTNET_GC_PAUSE_TIME:()=>ift,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>sft,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>aft,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>uft,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>cft,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>lft,METRIC_DOTNET_PROCESS_CPU_TIME:()=>dft,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>pft,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>fft,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>mft,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>Aft,METRIC_DOTNET_TIMER_COUNT:()=>gft,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>hft,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>_ft,METRIC_JVM_CLASS_COUNT:()=>Eft,METRIC_JVM_CLASS_LOADED:()=>yft,METRIC_JVM_CLASS_UNLOADED:()=>Sft,METRIC_JVM_CPU_COUNT:()=>Tft,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>bft,METRIC_JVM_CPU_TIME:()=>Ift,METRIC_JVM_GC_DURATION:()=>Cft,METRIC_JVM_MEMORY_COMMITTED:()=>vft,METRIC_JVM_MEMORY_LIMIT:()=>Rft,METRIC_JVM_MEMORY_USED:()=>xft,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>Dft,METRIC_JVM_THREAD_COUNT:()=>Nft,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>wft,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>Bft,METRIC_KESTREL_CONNECTION_DURATION:()=>kft,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>Oft,METRIC_KESTREL_QUEUED_REQUESTS:()=>Pft,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>Mft,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>Lft,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>Uft,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>Qft,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>Fft,MessageTypeValues:()=>Aut,MessagingDestinationKindValues:()=>$at,MessagingOperationValues:()=>Yat,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>_at,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>Sat,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>gat,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>xat,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>Eat,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>yat,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>vat,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>Aat,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>Nat,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>Tat,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>Iat,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>Dat,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>bat,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>Cat,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>Bat,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>Rat,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>Pat,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>kat,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>Oat,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>wat,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>hat,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>dat,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>pat,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>fat,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>cat,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>lat,NETTRANSPORTVALUES_INPROC:()=>sat,NETTRANSPORTVALUES_IP:()=>rat,NETTRANSPORTVALUES_IP_TCP:()=>tat,NETTRANSPORTVALUES_IP_UDP:()=>nat,NETTRANSPORTVALUES_OTHER:()=>aat,NETTRANSPORTVALUES_PIPE:()=>iat,NETTRANSPORTVALUES_UNIX:()=>oat,NETWORK_TRANSPORT_VALUE_PIPE:()=>apt,NETWORK_TRANSPORT_VALUE_QUIC:()=>upt,NETWORK_TRANSPORT_VALUE_TCP:()=>Cun,NETWORK_TRANSPORT_VALUE_UDP:()=>vun,NETWORK_TRANSPORT_VALUE_UNIX:()=>cpt,NETWORK_TYPE_VALUE_IPV4:()=>dpt,NETWORK_TYPE_VALUE_IPV6:()=>ppt,NetHostConnectionSubtypeValues:()=>Mat,NetHostConnectionTypeValues:()=>mat,NetTransportValues:()=>uat,OSTYPEVALUES_AIX:()=>wlt,OSTYPEVALUES_DARWIN:()=>Clt,OSTYPEVALUES_DRAGONFLYBSD:()=>Dlt,OSTYPEVALUES_FREEBSD:()=>vlt,OSTYPEVALUES_HPUX:()=>Nlt,OSTYPEVALUES_LINUX:()=>Ilt,OSTYPEVALUES_NETBSD:()=>Rlt,OSTYPEVALUES_OPENBSD:()=>xlt,OSTYPEVALUES_SOLARIS:()=>Blt,OSTYPEVALUES_WINDOWS:()=>blt,OSTYPEVALUES_Z_OS:()=>klt,OTEL_STATUS_CODE_VALUE_ERROR:()=>gpt,OTEL_STATUS_CODE_VALUE_OK:()=>Run,OsTypeValues:()=>Olt,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>iut,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>tut,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>Jat,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>lut,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>Xat,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>out,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>uut,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>Wat,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>eut,RPCGRPCSTATUSCODEVALUES_OK:()=>Kat,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>sut,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>nut,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>rut,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>dut,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>cut,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>aut,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>Zat,RpcGrpcStatusCodeValues:()=>put,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>$ot,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>rit,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>jot,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>Uot,SEMATTRS_AWS_DYNAMODB_COUNT:()=>tit,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>Jot,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>Yot,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>oit,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>qot,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>Qot,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>Hot,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>Kot,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>zot,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>Fot,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>Got,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>nit,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>Wot,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>Xot,SEMATTRS_AWS_DYNAMODB_SELECT:()=>Vot,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>Zot,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>Lot,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>eit,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>Drt,SEMATTRS_CODE_FILEPATH:()=>Rot,SEMATTRS_CODE_FUNCTION:()=>Cot,SEMATTRS_CODE_LINENO:()=>xot,SEMATTRS_CODE_NAMESPACE:()=>vot,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>Urt,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>zrt,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>jrt,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>Frt,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>Mrt,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>Lrt,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>Grt,SEMATTRS_DB_CASSANDRA_TABLE:()=>Qrt,SEMATTRS_DB_CONNECTION_STRING:()=>Nrt,SEMATTRS_DB_HBASE_NAMESPACE:()=>Hrt,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>Brt,SEMATTRS_DB_MONGODB_COLLECTION:()=>qrt,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>Prt,SEMATTRS_DB_NAME:()=>krt,SEMATTRS_DB_OPERATION:()=>Ort,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>$rt,SEMATTRS_DB_SQL_TABLE:()=>Vrt,SEMATTRS_DB_STATEMENT:()=>DV,SEMATTRS_DB_SYSTEM:()=>xV,SEMATTRS_DB_USER:()=>wrt,SEMATTRS_ENDUSER_ID:()=>yot,SEMATTRS_ENDUSER_ROLE:()=>Sot,SEMATTRS_ENDUSER_SCOPE:()=>Tot,SEMATTRS_EXCEPTION_ESCAPED:()=>Zrt,SEMATTRS_EXCEPTION_MESSAGE:()=>Krt,SEMATTRS_EXCEPTION_STACKTRACE:()=>Jrt,SEMATTRS_EXCEPTION_TYPE:()=>Yrt,SEMATTRS_FAAS_COLDSTART:()=>iot,SEMATTRS_FAAS_CRON:()=>oot,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>Xrt,SEMATTRS_FAAS_DOCUMENT_NAME:()=>not,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>eot,SEMATTRS_FAAS_DOCUMENT_TIME:()=>tot,SEMATTRS_FAAS_EXECUTION:()=>Wrt,SEMATTRS_FAAS_INVOKED_NAME:()=>sot,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>aot,SEMATTRS_FAAS_INVOKED_REGION:()=>uot,SEMATTRS_FAAS_TIME:()=>rot,SEMATTRS_FAAS_TRIGGER:()=>NV,SEMATTRS_HTTP_CLIENT_IP:()=>Mot,SEMATTRS_HTTP_FLAVOR:()=>wot,SEMATTRS_HTTP_HOST:()=>Dot,SEMATTRS_HTTP_METHOD:()=>Sw,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>kot,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>Oot,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>PV,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>MV,SEMATTRS_HTTP_ROUTE:()=>LV,SEMATTRS_HTTP_SCHEME:()=>Not,SEMATTRS_HTTP_SERVER_NAME:()=>Pot,SEMATTRS_HTTP_STATUS_CODE:()=>dS,SEMATTRS_HTTP_TARGET:()=>OV,SEMATTRS_HTTP_URL:()=>UC,SEMATTRS_HTTP_USER_AGENT:()=>Bot,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>wit,SEMATTRS_MESSAGE_ID:()=>Nit,SEMATTRS_MESSAGE_TYPE:()=>Dit,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>Bit,SEMATTRS_MESSAGING_CONSUMER_ID:()=>git,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>pit,SEMATTRS_MESSAGING_DESTINATION:()=>iit,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>sit,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>yit,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>Eit,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>_it,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>Sit,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>Tit,SEMATTRS_MESSAGING_MESSAGE_ID:()=>dit,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>mit,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>fit,SEMATTRS_MESSAGING_OPERATION:()=>Ait,SEMATTRS_MESSAGING_PROTOCOL:()=>uit,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>cit,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>hit,SEMATTRS_MESSAGING_SYSTEM:()=>UV,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>ait,SEMATTRS_MESSAGING_URL:()=>lit,SEMATTRS_NET_HOST_CARRIER_ICC:()=>_ot,SEMATTRS_NET_HOST_CARRIER_MCC:()=>got,SEMATTRS_NET_HOST_CARRIER_MNC:()=>hot,SEMATTRS_NET_HOST_CARRIER_NAME:()=>Aot,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>mot,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>fot,SEMATTRS_NET_HOST_IP:()=>BV,SEMATTRS_NET_HOST_NAME:()=>pot,SEMATTRS_NET_HOST_PORT:()=>kV,SEMATTRS_NET_PEER_IP:()=>wV,SEMATTRS_NET_PEER_NAME:()=>dot,SEMATTRS_NET_PEER_PORT:()=>lot,SEMATTRS_NET_TRANSPORT:()=>cot,SEMATTRS_PEER_SERVICE:()=>Eot,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>FV,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>Rit,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>xit,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>vit,SEMATTRS_RPC_JSONRPC_VERSION:()=>Cit,SEMATTRS_RPC_METHOD:()=>Iit,SEMATTRS_RPC_SERVICE:()=>QV,SEMATTRS_RPC_SYSTEM:()=>bit,SEMATTRS_THREAD_ID:()=>bot,SEMATTRS_THREAD_NAME:()=>Iot,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>Tut,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>Sut,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>but,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>Iut,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>Cut,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>vut,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>Rut,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>Dut,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>xut,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>wut,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>Nut,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>hut,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>Eut,SEMRESATTRS_CLOUD_PLATFORM:()=>yut,SEMRESATTRS_CLOUD_PROVIDER:()=>gut,SEMRESATTRS_CLOUD_REGION:()=>_ut,SEMRESATTRS_CONTAINER_ID:()=>kut,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>Put,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>Mut,SEMRESATTRS_CONTAINER_NAME:()=>But,SEMRESATTRS_CONTAINER_RUNTIME:()=>Out,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>Lut,SEMRESATTRS_DEVICE_ID:()=>Uut,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>Qut,SEMRESATTRS_DEVICE_MODEL_NAME:()=>Fut,SEMRESATTRS_FAAS_ID:()=>jut,SEMRESATTRS_FAAS_INSTANCE:()=>Hut,SEMRESATTRS_FAAS_MAX_MEMORY:()=>$ut,SEMRESATTRS_FAAS_NAME:()=>Gut,SEMRESATTRS_FAAS_VERSION:()=>zut,SEMRESATTRS_HOST_ARCH:()=>Kut,SEMRESATTRS_HOST_ID:()=>qut,SEMRESATTRS_HOST_IMAGE_ID:()=>Zut,SEMRESATTRS_HOST_IMAGE_NAME:()=>Jut,SEMRESATTRS_HOST_IMAGE_VERSION:()=>Wut,SEMRESATTRS_HOST_NAME:()=>Vut,SEMRESATTRS_HOST_TYPE:()=>Yut,SEMRESATTRS_K8S_CLUSTER_NAME:()=>Xut,SEMRESATTRS_K8S_CONTAINER_NAME:()=>ict,SEMRESATTRS_K8S_CRONJOB_NAME:()=>hct,SEMRESATTRS_K8S_CRONJOB_UID:()=>gct,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>fct,SEMRESATTRS_K8S_DAEMONSET_UID:()=>pct,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>cct,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>uct,SEMRESATTRS_K8S_JOB_NAME:()=>Act,SEMRESATTRS_K8S_JOB_UID:()=>mct,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>nct,SEMRESATTRS_K8S_NODE_NAME:()=>ect,SEMRESATTRS_K8S_NODE_UID:()=>tct,SEMRESATTRS_K8S_POD_NAME:()=>oct,SEMRESATTRS_K8S_POD_UID:()=>rct,SEMRESATTRS_K8S_REPLICASET_NAME:()=>act,SEMRESATTRS_K8S_REPLICASET_UID:()=>sct,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>dct,SEMRESATTRS_K8S_STATEFULSET_UID:()=>lct,SEMRESATTRS_OS_DESCRIPTION:()=>Ect,SEMRESATTRS_OS_NAME:()=>yct,SEMRESATTRS_OS_TYPE:()=>_ct,SEMRESATTRS_OS_VERSION:()=>Sct,SEMRESATTRS_PROCESS_COMMAND:()=>Cct,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>Rct,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>vct,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>bct,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>Ict,SEMRESATTRS_PROCESS_OWNER:()=>xct,SEMRESATTRS_PROCESS_PID:()=>Tct,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>wct,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>Dct,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>Nct,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>kct,SEMRESATTRS_SERVICE_NAME:()=>Bct,SEMRESATTRS_SERVICE_NAMESPACE:()=>GV,SEMRESATTRS_SERVICE_VERSION:()=>Oct,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>Uct,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>Mct,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>Pct,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>Lct,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>Gct,SEMRESATTRS_WEBENGINE_NAME:()=>Qct,SEMRESATTRS_WEBENGINE_VERSION:()=>Fct,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>Spt,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>Tpt,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>bpt,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>Cpt,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>vpt,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>Rpt,SemanticAttributes:()=>kit,SemanticResourceAttributes:()=>jct,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>Plt,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>Mlt,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>Llt,TELEMETRYSDKLANGUAGEVALUES_GO:()=>Ult,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>Qlt,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>Flt,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>Glt,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>jlt,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>zlt,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>Hlt,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>xun,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>Dpt,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>Npt,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>Dun,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>wpt,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>Bpt,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>Nun,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>kpt,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>Opt,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>Ppt,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>Mpt,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>Lpt,TelemetrySdkLanguageValues:()=>$lt});var Xn=B(()=>{A();j0e();mbe();Abe();gbe();hbe()});var _be=M(bU=>{"use strict";A();Object.defineProperty(bU,"__esModule",{value:!0});bU.ATTR_PROCESS_RUNTIME_NAME=void 0;bU.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var Ebe=M(CU=>{"use strict";A();Object.defineProperty(CU,"__esModule",{value:!0});CU.SDK_INFO=void 0;var jft=Zge(),IU=(Xn(),Me(Vr)),zft=_be();CU.SDK_INFO={[IU.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[zft.ATTR_PROCESS_RUNTIME_NAME]:"node",[IU.ATTR_TELEMETRY_SDK_LANGUAGE]:IU.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[IU.ATTR_TELEMETRY_SDK_VERSION]:jft.VERSION}});var ybe=M(su=>{"use strict";A();Object.defineProperty(su,"__esModule",{value:!0});su.otperformance=su.SDK_INFO=su._globalThis=su.getStringListFromEnv=su.getNumberFromEnv=su.getBooleanFromEnv=su.getStringFromEnv=void 0;var vU=Kge();Object.defineProperty(su,"getStringFromEnv",{enumerable:!0,get:function(){return vU.getStringFromEnv}});Object.defineProperty(su,"getBooleanFromEnv",{enumerable:!0,get:function(){return vU.getBooleanFromEnv}});Object.defineProperty(su,"getNumberFromEnv",{enumerable:!0,get:function(){return vU.getNumberFromEnv}});Object.defineProperty(su,"getStringListFromEnv",{enumerable:!0,get:function(){return vU.getStringListFromEnv}});var Hft=Jge();Object.defineProperty(su,"_globalThis",{enumerable:!0,get:function(){return Hft._globalThis}});var $ft=Ebe();Object.defineProperty(su,"SDK_INFO",{enumerable:!0,get:function(){return $ft.SDK_INFO}});su.otperformance=performance});var n7=M(au=>{"use strict";A();Object.defineProperty(au,"__esModule",{value:!0});au.getStringListFromEnv=au.getNumberFromEnv=au.getStringFromEnv=au.getBooleanFromEnv=au.otperformance=au._globalThis=au.SDK_INFO=void 0;var mS=ybe();Object.defineProperty(au,"SDK_INFO",{enumerable:!0,get:function(){return mS.SDK_INFO}});Object.defineProperty(au,"_globalThis",{enumerable:!0,get:function(){return mS._globalThis}});Object.defineProperty(au,"otperformance",{enumerable:!0,get:function(){return mS.otperformance}});Object.defineProperty(au,"getBooleanFromEnv",{enumerable:!0,get:function(){return mS.getBooleanFromEnv}});Object.defineProperty(au,"getStringFromEnv",{enumerable:!0,get:function(){return mS.getStringFromEnv}});Object.defineProperty(au,"getNumberFromEnv",{enumerable:!0,get:function(){return mS.getNumberFromEnv}});Object.defineProperty(au,"getStringListFromEnv",{enumerable:!0,get:function(){return mS.getStringListFromEnv}})});var Ibe=M(Yr=>{"use strict";A();Object.defineProperty(Yr,"__esModule",{value:!0});Yr.addHrTimes=Yr.isTimeInput=Yr.isTimeInputHrTime=Yr.hrTimeToSeconds=Yr.hrTimeToMilliseconds=Yr.hrTimeToMicroseconds=Yr.hrTimeToNanoseconds=Yr.hrTimeToTimeStamp=Yr.hrTimeDuration=Yr.timeInputToHrTime=Yr.hrTime=Yr.getTimeOrigin=Yr.millisToHrTime=void 0;var RU=n7(),Sbe=9,qft=6,Vft=Math.pow(10,qft),Tw=Math.pow(10,Sbe);function bw(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*Vft);return[n,r]}Yr.millisToHrTime=bw;function Yft(){return RU.otperformance.timeOrigin}Yr.getTimeOrigin=Yft;function Tbe(e){let t=bw(RU.otperformance.timeOrigin),n=bw(typeof e=="number"?e:RU.otperformance.now());return bbe(t,n)}Yr.hrTime=Tbe;function Kft(e){if(r7(e))return e;if(typeof e=="number")return e<RU.otperformance.timeOrigin?Tbe(e):bw(e);if(e instanceof Date)return bw(e.getTime());throw TypeError("Invalid input type")}Yr.timeInputToHrTime=Kft;function Jft(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=Tw),[n,r]}Yr.hrTimeDuration=Jft;function Zft(e){let t=Sbe,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}Yr.hrTimeToTimeStamp=Zft;function Wft(e){return e[0]*Tw+e[1]}Yr.hrTimeToNanoseconds=Wft;function Xft(e){return e[0]*1e6+e[1]/1e3}Yr.hrTimeToMicroseconds=Xft;function emt(e){return e[0]*1e3+e[1]/1e6}Yr.hrTimeToMilliseconds=emt;function tmt(e){return e[0]+e[1]/Tw}Yr.hrTimeToSeconds=tmt;function r7(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}Yr.isTimeInputHrTime=r7;function nmt(e){return r7(e)||typeof e=="number"||e instanceof Date}Yr.isTimeInput=nmt;function bbe(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=Tw&&(n[1]-=Tw,n[0]+=1),n}Yr.addHrTimes=bbe});var Cbe=M(xU=>{"use strict";A();Object.defineProperty(xU,"__esModule",{value:!0});xU.unrefTimer=void 0;function rmt(e){typeof e!="number"&&e.unref()}xU.unrefTimer=rmt});var vbe=M(Iw=>{"use strict";A();Object.defineProperty(Iw,"__esModule",{value:!0});Iw.ExportResultCode=void 0;var omt;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(omt=Iw.ExportResultCode||(Iw.ExportResultCode={}))});var xbe=M(DU=>{"use strict";A();Object.defineProperty(DU,"__esModule",{value:!0});DU.CompositePropagator=void 0;var Rbe=(He(),Me(tt)),o7=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){Rbe.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){Rbe.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${s.message}`)}return o},t)}fields(){return this._fields.slice()}};DU.CompositePropagator=o7});var Dbe=M(FC=>{"use strict";A();Object.defineProperty(FC,"__esModule",{value:!0});FC.validateValue=FC.validateKey=void 0;var i7="[_0-9a-z-*/]",imt=`[a-z]${i7}{0,255}`,smt=`[a-z0-9]${i7}{0,240}@[a-z]${i7}{0,13}`,amt=new RegExp(`^(?:${imt}|${smt})$`),umt=/^[ -~]{0,255}[!-~]$/,cmt=/,|=/;function lmt(e){return amt.test(e)}FC.validateKey=lmt;function dmt(e){return umt.test(e)&&!cmt.test(e)}FC.validateValue=dmt});var a7=M(wU=>{"use strict";A();Object.defineProperty(wU,"__esModule",{value:!0});wU.TraceState=void 0;var NU=Dbe(),pmt=32,Nbe=512,wbe=",",Bbe="=",s7=class e{_length;_rawTraceState;_internalState;constructor(t){this._rawTraceState=typeof t=="string"?t:"",this._length=this._rawTraceState.length}set(t,n){if(!(0,NU.validateKey)(t)||!(0,NU.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>Nbe)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=wbe+t),t=`${r[0]}${Bbe}${r[1]}`+t,n++;return t}_getState(){if(this._internalState)return this._internalState;let t=this._rawTraceState.split(wbe),n=new Map,r=0;for(let o of t){let i=o.trim(),s=i.indexOf(Bbe);if(s===-1)continue;let u=i.slice(0,s),l=i.slice(s+1);if(!(0,NU.validateKey)(u)||!(0,NU.validateValue)(l))continue;let f=r+i.length+(n.size>0?1:0);if(!(f>Nbe)&&(n.set(u,l),r=f,n.size>=pmt))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}};wU.TraceState=s7});var Obe=M(uu=>{"use strict";A();Object.defineProperty(uu,"__esModule",{value:!0});uu.W3CTraceContextPropagator=uu.parseTraceParent=uu.TRACE_STATE_HEADER=uu.TRACE_PARENT_HEADER=void 0;var BU=(He(),Me(tt)),fmt=Ew(),mmt=a7();uu.TRACE_PARENT_HEADER="traceparent";uu.TRACE_STATE_HEADER="tracestate";var Amt="00",gmt="(?!ff)[\\da-f]{2}",hmt="(?![0]{32})[\\da-f]{32}",_mt="(?![0]{16})[\\da-f]{16}",Emt="[\\da-f]{2}",ymt=new RegExp(`^\\s?(${gmt})-(${hmt})-(${_mt})-(${Emt})(-.*)?\\s?$`);function kbe(e){let t=ymt.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}uu.parseTraceParent=kbe;var u7=class{inject(t,n,r){let o=BU.trace.getSpanContext(t);if(!o||(0,fmt.isTracingSuppressed)(t)||!(0,BU.isSpanContextValid)(o))return;let i=`${Amt}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||BU.TraceFlags.NONE).toString(16)}`;r.set(n,uu.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,uu.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,uu.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let s=kbe(i);if(!s)return t;s.isRemote=!0;let u=r.get(n,uu.TRACE_STATE_HEADER);if(u){let l=Array.isArray(u)?u.join(","):u;s.traceState=new mmt.TraceState(typeof l=="string"?l:void 0)}return BU.trace.setSpanContext(t,s)}fields(){return[uu.TRACE_PARENT_HEADER,uu.TRACE_STATE_HEADER]}};uu.W3CTraceContextPropagator=u7});var Pbe=M(gf=>{"use strict";A();Object.defineProperty(gf,"__esModule",{value:!0});gf.getRPCMetadata=gf.deleteRPCMetadata=gf.setRPCMetadata=gf.RPCType=void 0;var Smt=(He(),Me(tt)),c7=(0,Smt.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),Tmt;(function(e){e.HTTP="http"})(Tmt=gf.RPCType||(gf.RPCType={}));function bmt(e,t){return e.setValue(c7,t)}gf.setRPCMetadata=bmt;function Imt(e){return e.deleteValue(c7)}gf.deleteRPCMetadata=Imt;function Cmt(e){return e.getValue(c7)}gf.getRPCMetadata=Cmt});var Fbe=M(kU=>{"use strict";A();Object.defineProperty(kU,"__esModule",{value:!0});kU.isPlainObject=void 0;var vmt="[object Object]",Rmt="[object Null]",xmt="[object Undefined]",Dmt=Function.prototype,Mbe=Dmt.toString,Nmt=Mbe.call(Object),wmt=Object.getPrototypeOf,Lbe=Object.prototype,Ube=Lbe.hasOwnProperty,AS=Symbol?Symbol.toStringTag:void 0,Qbe=Lbe.toString;function Bmt(e){if(!kmt(e)||Omt(e)!==vmt)return!1;let t=wmt(e);if(t===null)return!0;let n=Ube.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Mbe.call(n)===Nmt}kU.isPlainObject=Bmt;function kmt(e){return e!=null&&typeof e=="object"}function Omt(e){return e==null?e===void 0?xmt:Rmt:AS&&AS in Object(e)?Pmt(e):Mmt(e)}function Pmt(e){let t=Ube.call(e,AS),n=e[AS],r=!1;try{e[AS]=void 0,r=!0}catch{}let o=Qbe.call(e);return r&&(t?e[AS]=n:delete e[AS]),o}function Mmt(e){return Qbe.call(e)}});var $be=M(MU=>{"use strict";A();Object.defineProperty(MU,"__esModule",{value:!0});MU.merge=void 0;var Gbe=Fbe(),Lmt=20;function Umt(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=zbe(t,e.shift(),0,n);return t}MU.merge=Umt;function l7(e){return PU(e)?e.slice():e}function zbe(e,t,n=0,r){let o;if(!(n>Lmt)){if(n++,OU(e)||OU(t)||Hbe(t))o=l7(t);else if(PU(e)){if(o=e.slice(),PU(t))for(let i=0,s=t.length;i<s;i++)o.push(l7(t[i]));else if(Cw(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]=l7(t[l]))}}}else if(Cw(e))if(Cw(t)){if(!Qmt(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(OU(f))typeof f>"u"?delete o[l]:o[l]=f;else{let h=o[l],_=f;if(jbe(e,l,r)||jbe(t,l,r))delete o[l];else{if(Cw(h)&&Cw(_)){let E=r.get(h)||[],T=r.get(_)||[];E.push({obj:e,key:l}),T.push({obj:t,key:l}),r.set(h,E),r.set(_,T)}o[l]=zbe(o[l],f,n,r)}}}}else o=t;return o}}function jbe(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 PU(e){return Array.isArray(e)}function Hbe(e){return typeof e=="function"}function Cw(e){return!OU(e)&&!PU(e)&&!Hbe(e)&&typeof e=="object"}function OU(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function Qmt(e,t){return!(!(0,Gbe.isPlainObject)(e)||!(0,Gbe.isPlainObject)(t))}});var qbe=M(GC=>{"use strict";A();Object.defineProperty(GC,"__esModule",{value:!0});GC.callWithTimeout=GC.TimeoutError=void 0;var LU=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};GC.TimeoutError=LU;function Fmt(e,t){let n,r=new Promise(function(i,s){n=setTimeout(function(){s(new LU("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}GC.callWithTimeout=Fmt});var Ybe=M(jC=>{"use strict";A();Object.defineProperty(jC,"__esModule",{value:!0});jC.isUrlIgnored=jC.urlMatches=void 0;function Vbe(e,t){return typeof t=="string"?e===t:!!e.match(t)}jC.urlMatches=Vbe;function Gmt(e,t){if(!t)return!1;for(let n of t)if(Vbe(e,n))return!0;return!1}jC.isUrlIgnored=Gmt});var Kbe=M(UU=>{"use strict";A();Object.defineProperty(UU,"__esModule",{value:!0});UU.Deferred=void 0;var d7=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)}};UU.Deferred=d7});var Jbe=M(QU=>{"use strict";A();Object.defineProperty(QU,"__esModule",{value:!0});QU.BindOnceFuture=void 0;var jmt=Kbe(),p7=class{_isCalled=!1;_deferred=new jmt.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}};QU.BindOnceFuture=p7});var Wbe=M(FU=>{"use strict";A();Object.defineProperty(FU,"__esModule",{value:!0});FU.diagLogLevelFromString=void 0;var Rg=(He(),Me(tt)),Zbe={ALL:Rg.DiagLogLevel.ALL,VERBOSE:Rg.DiagLogLevel.VERBOSE,DEBUG:Rg.DiagLogLevel.DEBUG,INFO:Rg.DiagLogLevel.INFO,WARN:Rg.DiagLogLevel.WARN,ERROR:Rg.DiagLogLevel.ERROR,NONE:Rg.DiagLogLevel.NONE};function zmt(e){if(e==null)return;let t=Zbe[e.toUpperCase()];return t??(Rg.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(Zbe)}, using default`),Rg.DiagLogLevel.INFO)}FU.diagLogLevelFromString=zmt});var eIe=M(GU=>{"use strict";A();Object.defineProperty(GU,"__esModule",{value:!0});GU._export=void 0;var Xbe=(He(),Me(tt)),Hmt=Ew();function $mt(e,t){return new Promise(n=>{Xbe.context.with((0,Hmt.suppressTracing)(Xbe.context.active()),()=>{e.export(t,n)})})}GU._export=$mt});var Rr=M(we=>{"use strict";A();Object.defineProperty(we,"__esModule",{value:!0});we.diagLogLevelFromString=we.BindOnceFuture=we.urlMatches=we.isUrlIgnored=we.callWithTimeout=we.TimeoutError=we.merge=we.TraceState=we.unsuppressTracing=we.suppressTracing=we.isTracingSuppressed=we.setRPCMetadata=we.getRPCMetadata=we.deleteRPCMetadata=we.RPCType=we.parseTraceParent=we.W3CTraceContextPropagator=we.TRACE_STATE_HEADER=we.TRACE_PARENT_HEADER=we.CompositePropagator=we.otperformance=we.getStringListFromEnv=we.getNumberFromEnv=we.getBooleanFromEnv=we.getStringFromEnv=we._globalThis=we.SDK_INFO=we.parseKeyPairsIntoRecord=we.ExportResultCode=we.unrefTimer=we.timeInputToHrTime=we.millisToHrTime=we.isTimeInputHrTime=we.isTimeInput=we.hrTimeToTimeStamp=we.hrTimeToSeconds=we.hrTimeToNanoseconds=we.hrTimeToMilliseconds=we.hrTimeToMicroseconds=we.hrTimeDuration=we.hrTime=we.getTimeOrigin=we.addHrTimes=we.loggingErrorHandler=we.setGlobalErrorHandler=we.globalErrorHandler=we.sanitizeAttributes=we.isAttributeValue=we.AnchoredClock=we.W3CBaggagePropagator=void 0;we.internal=void 0;var qmt=Lge();Object.defineProperty(we,"W3CBaggagePropagator",{enumerable:!0,get:function(){return qmt.W3CBaggagePropagator}});var Vmt=Uge();Object.defineProperty(we,"AnchoredClock",{enumerable:!0,get:function(){return Vmt.AnchoredClock}});var tIe=zge();Object.defineProperty(we,"isAttributeValue",{enumerable:!0,get:function(){return tIe.isAttributeValue}});Object.defineProperty(we,"sanitizeAttributes",{enumerable:!0,get:function(){return tIe.sanitizeAttributes}});var nIe=$ge();Object.defineProperty(we,"globalErrorHandler",{enumerable:!0,get:function(){return nIe.globalErrorHandler}});Object.defineProperty(we,"setGlobalErrorHandler",{enumerable:!0,get:function(){return nIe.setGlobalErrorHandler}});var Ymt=vV();Object.defineProperty(we,"loggingErrorHandler",{enumerable:!0,get:function(){return Ymt.loggingErrorHandler}});var $l=Ibe();Object.defineProperty(we,"addHrTimes",{enumerable:!0,get:function(){return $l.addHrTimes}});Object.defineProperty(we,"getTimeOrigin",{enumerable:!0,get:function(){return $l.getTimeOrigin}});Object.defineProperty(we,"hrTime",{enumerable:!0,get:function(){return $l.hrTime}});Object.defineProperty(we,"hrTimeDuration",{enumerable:!0,get:function(){return $l.hrTimeDuration}});Object.defineProperty(we,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return $l.hrTimeToMicroseconds}});Object.defineProperty(we,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return $l.hrTimeToMilliseconds}});Object.defineProperty(we,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return $l.hrTimeToNanoseconds}});Object.defineProperty(we,"hrTimeToSeconds",{enumerable:!0,get:function(){return $l.hrTimeToSeconds}});Object.defineProperty(we,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return $l.hrTimeToTimeStamp}});Object.defineProperty(we,"isTimeInput",{enumerable:!0,get:function(){return $l.isTimeInput}});Object.defineProperty(we,"isTimeInputHrTime",{enumerable:!0,get:function(){return $l.isTimeInputHrTime}});Object.defineProperty(we,"millisToHrTime",{enumerable:!0,get:function(){return $l.millisToHrTime}});Object.defineProperty(we,"timeInputToHrTime",{enumerable:!0,get:function(){return $l.timeInputToHrTime}});var Kmt=Cbe();Object.defineProperty(we,"unrefTimer",{enumerable:!0,get:function(){return Kmt.unrefTimer}});var Jmt=vbe();Object.defineProperty(we,"ExportResultCode",{enumerable:!0,get:function(){return Jmt.ExportResultCode}});var Zmt=TV();Object.defineProperty(we,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return Zmt.parseKeyPairsIntoRecord}});var gS=n7();Object.defineProperty(we,"SDK_INFO",{enumerable:!0,get:function(){return gS.SDK_INFO}});Object.defineProperty(we,"_globalThis",{enumerable:!0,get:function(){return gS._globalThis}});Object.defineProperty(we,"getStringFromEnv",{enumerable:!0,get:function(){return gS.getStringFromEnv}});Object.defineProperty(we,"getBooleanFromEnv",{enumerable:!0,get:function(){return gS.getBooleanFromEnv}});Object.defineProperty(we,"getNumberFromEnv",{enumerable:!0,get:function(){return gS.getNumberFromEnv}});Object.defineProperty(we,"getStringListFromEnv",{enumerable:!0,get:function(){return gS.getStringListFromEnv}});Object.defineProperty(we,"otperformance",{enumerable:!0,get:function(){return gS.otperformance}});var Wmt=xbe();Object.defineProperty(we,"CompositePropagator",{enumerable:!0,get:function(){return Wmt.CompositePropagator}});var jU=Obe();Object.defineProperty(we,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return jU.TRACE_PARENT_HEADER}});Object.defineProperty(we,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return jU.TRACE_STATE_HEADER}});Object.defineProperty(we,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return jU.W3CTraceContextPropagator}});Object.defineProperty(we,"parseTraceParent",{enumerable:!0,get:function(){return jU.parseTraceParent}});var zU=Pbe();Object.defineProperty(we,"RPCType",{enumerable:!0,get:function(){return zU.RPCType}});Object.defineProperty(we,"deleteRPCMetadata",{enumerable:!0,get:function(){return zU.deleteRPCMetadata}});Object.defineProperty(we,"getRPCMetadata",{enumerable:!0,get:function(){return zU.getRPCMetadata}});Object.defineProperty(we,"setRPCMetadata",{enumerable:!0,get:function(){return zU.setRPCMetadata}});var f7=Ew();Object.defineProperty(we,"isTracingSuppressed",{enumerable:!0,get:function(){return f7.isTracingSuppressed}});Object.defineProperty(we,"suppressTracing",{enumerable:!0,get:function(){return f7.suppressTracing}});Object.defineProperty(we,"unsuppressTracing",{enumerable:!0,get:function(){return f7.unsuppressTracing}});var Xmt=a7();Object.defineProperty(we,"TraceState",{enumerable:!0,get:function(){return Xmt.TraceState}});var eAt=$be();Object.defineProperty(we,"merge",{enumerable:!0,get:function(){return eAt.merge}});var rIe=qbe();Object.defineProperty(we,"TimeoutError",{enumerable:!0,get:function(){return rIe.TimeoutError}});Object.defineProperty(we,"callWithTimeout",{enumerable:!0,get:function(){return rIe.callWithTimeout}});var oIe=Ybe();Object.defineProperty(we,"isUrlIgnored",{enumerable:!0,get:function(){return oIe.isUrlIgnored}});Object.defineProperty(we,"urlMatches",{enumerable:!0,get:function(){return oIe.urlMatches}});var tAt=Jbe();Object.defineProperty(we,"BindOnceFuture",{enumerable:!0,get:function(){return tAt.BindOnceFuture}});var nAt=Wbe();Object.defineProperty(we,"diagLogLevelFromString",{enumerable:!0,get:function(){return nAt.diagLogLevelFromString}});var rAt=eIe();we.internal={_export:rAt._export}});var iIe=M(HU=>{"use strict";A();Object.defineProperty(HU,"__esModule",{value:!0});HU.VERSION=void 0;HU.VERSION="0.214.0"});var sIe=M(vw=>{"use strict";A();Object.defineProperty(vw,"__esModule",{value:!0});vw.SeverityNumber=void 0;var oAt;(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"})(oAt=vw.SeverityNumber||(vw.SeverityNumber={}))});var qU=M(zC=>{"use strict";A();Object.defineProperty(zC,"__esModule",{value:!0});zC.NOOP_LOGGER=zC.NoopLogger=void 0;var $U=class{emit(t){}};zC.NoopLogger=$U;zC.NOOP_LOGGER=new $U});var aIe=M(Bm=>{"use strict";A();Object.defineProperty(Bm,"__esModule",{value:!0});Bm.API_BACKWARDS_COMPATIBILITY_VERSION=Bm.makeGetter=Bm._global=Bm.GLOBAL_LOGS_API_KEY=void 0;Bm.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");Bm._global=globalThis;function iAt(e,t,n){return r=>r===e?t:n}Bm.makeGetter=iAt;Bm.API_BACKWARDS_COMPATIBILITY_VERSION=1});var m7=M(HC=>{"use strict";A();Object.defineProperty(HC,"__esModule",{value:!0});HC.NOOP_LOGGER_PROVIDER=HC.NoopLoggerProvider=void 0;var sAt=qU(),VU=class{getLogger(t,n,r){return new sAt.NoopLogger}};HC.NoopLoggerProvider=VU;HC.NOOP_LOGGER_PROVIDER=new VU});var uIe=M(YU=>{"use strict";A();Object.defineProperty(YU,"__esModule",{value:!0});YU.ProxyLogger=void 0;var aAt=qU(),A7=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):aAt.NOOP_LOGGER}};YU.ProxyLogger=A7});var cIe=M(KU=>{"use strict";A();Object.defineProperty(KU,"__esModule",{value:!0});KU.ProxyLoggerProvider=void 0;var uAt=m7(),cAt=uIe(),g7=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new cAt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:uAt.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)}};KU.ProxyLoggerProvider=g7});var dIe=M(JU=>{"use strict";A();Object.defineProperty(JU,"__esModule",{value:!0});JU.LogsAPI=void 0;var Jd=aIe(),lAt=m7(),lIe=cIe(),h7=class e{constructor(){this._proxyLoggerProvider=new lIe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Jd._global[Jd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Jd._global[Jd.GLOBAL_LOGS_API_KEY]=(0,Jd.makeGetter)(Jd.API_BACKWARDS_COMPATIBILITY_VERSION,t,lAt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Jd._global[Jd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Jd._global,Jd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Jd._global[Jd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new lIe.ProxyLoggerProvider}};JU.LogsAPI=h7});var _7=M(km=>{"use strict";A();Object.defineProperty(km,"__esModule",{value:!0});km.logs=km.NoopLogger=km.NOOP_LOGGER=km.SeverityNumber=void 0;var dAt=sIe();Object.defineProperty(km,"SeverityNumber",{enumerable:!0,get:function(){return dAt.SeverityNumber}});var pIe=qU();Object.defineProperty(km,"NOOP_LOGGER",{enumerable:!0,get:function(){return pIe.NOOP_LOGGER}});Object.defineProperty(km,"NoopLogger",{enumerable:!0,get:function(){return pIe.NoopLogger}});var pAt=dIe();km.logs=pAt.LogsAPI.getInstance()});var fIe=M($C=>{"use strict";A();Object.defineProperty($C,"__esModule",{value:!0});$C.disableInstrumentations=$C.enableInstrumentations=void 0;function fAt(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()}}$C.enableInstrumentations=fAt;function mAt(e){e.forEach(t=>t.disable())}$C.disableInstrumentations=mAt});var gIe=M(ZU=>{"use strict";A();Object.defineProperty(ZU,"__esModule",{value:!0});ZU.registerInstrumentations=void 0;var mIe=(He(),Me(tt)),AAt=_7(),AIe=fIe();function gAt(e){let t=e.tracerProvider||mIe.trace.getTracerProvider(),n=e.meterProvider||mIe.metrics.getMeterProvider(),r=e.loggerProvider||AAt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,AIe.enableInstrumentations)(o,t,n,r),()=>{(0,AIe.disableInstrumentations)(o)}}ZU.registerInstrumentations=gAt});var CIe=M(WU=>{"use strict";A();Object.defineProperty(WU,"__esModule",{value:!0});WU.satisfies=void 0;var T7=(He(),Me(tt)),SIe=/^(?: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-]+)*))?$/,hAt=/^(?<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-]+)*))?$/,_At={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function EAt(e,t,n){if(!yAt(e))return T7.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=IAt(e);if(!r)return!1;let o=[],i=TIe(r,t,o,n);return i&&!n?.includePrerelease?TAt(r,o):i}WU.satisfies=EAt;function yAt(e){return typeof e=="string"&&SIe.test(e)}function TIe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(E7(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=$At(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!E7(e,i,n,r))return!1;return!0}return E7(e,t,n,r)}function E7(e,t,n,r){if(t=bAt(t,r),t.includes(" "))return TIe(e,t,n,r);{let o=CAt(t);return n.push(o),SAt(e,o)}}function SAt(e,t){if(t.invalid)return!1;if(!t.version||S7(t.version))return!0;let n=_Ie(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=_Ie(r,o)}return _At[t.op]?.includes(n)}function TAt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function bAt(e,t){return e=e.trim(),e=zAt(e,t),e=jAt(e),e=HAt(e,t),e=e.trim(),e}function $u(e){return!e||e.toLowerCase()==="x"||e==="*"}function IAt(e){let t=e.match(SIe);if(!t){T7.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 CAt(e){if(!e)return{};let t=e.match(hAt);if(!t)return T7.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 S7(e){return e==="*"||e==="x"||e==="X"}function hIe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function vAt(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 RAt(e,t){if(S7(e)||S7(t))return 0;let[n,r]=vAt(hIe(e),hIe(t));return n>r?1:n<r?-1:0}function _Ie(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=RAt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var bIe="[a-zA-Z0-9-]",IIe="0|[1-9]\\d*",xAt=`\\d*[a-zA-Z-]${bIe}*`,DAt="((?:<|>)?=?)",EIe=`(?:${IIe}|${xAt})`,NAt=`(?:-(${EIe}(?:\\.${EIe})*))`,yIe=`${bIe}+`,wAt=`(?:\\+(${yIe}(?:\\.${yIe})*))`,y7=`${IIe}|x|X|\\*`,Rw=`[v=\\s]*(${y7})(?:\\.(${y7})(?:\\.(${y7})(?:${NAt})?${wAt}?)?)?`,BAt=`^${DAt}\\s*${Rw}$`,kAt=new RegExp(BAt),OAt=`^\\s*(${Rw})\\s+-\\s+(${Rw})\\s*$`,PAt=new RegExp(OAt),MAt="(?:~>?)",LAt=`^${MAt}${Rw}$`,UAt=new RegExp(LAt),QAt="(?:\\^)",FAt=`^${QAt}${Rw}$`,GAt=new RegExp(FAt);function jAt(e){let t=UAt;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 zAt(e,t){let n=GAt,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 HAt(e,t){let n=kAt;return e.replace(n,(r,o,i,s,u,l)=>{let f=$u(i),h=f||$u(s),_=h||$u(u),E=_;return o==="="&&E&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&E?(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 $At(e,t){let n=PAt;return e.replace(n,(r,o,i,s,u,l,f,h,_,E,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(E)?h=`<${+_+1}.0.0-0`:$u(T)?h=`<${_}.${+E+1}.0-0`:v?h=`<=${_}.${E}.${T}-${v}`:t?.includePrerelease?h=`<${_}.${E}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var b7=M(Na=>{"use strict";A();Object.defineProperty(Na,"__esModule",{value:!0});Na.massUnwrap=Na.unwrap=Na.massWrap=Na.wrap=void 0;var qu=console.error.bind(console);function xw(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 qAt=(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 xw(o,"__original",r),xw(o,"__unwrap",()=>{e[t]===o&&xw(e,t,r)}),xw(o,"__wrapped",!0),xw(e,t,o),o};Na.wrap=qAt;var VAt=(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,Na.wrap)(r,o,n)})})};Na.massWrap=VAt;var YAt=(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}};Na.unwrap=YAt;var KAt=(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,Na.unwrap)(n,r)})})};Na.massUnwrap=KAt;function Dw(e){e&&e.logger&&(typeof e.logger!="function"?qu("new logger isn't a function, not replacing"):qu=e.logger)}Na.default=Dw;Dw.wrap=Na.wrap;Dw.massWrap=Na.massWrap;Dw.unwrap=Na.unwrap;Dw.massUnwrap=Na.massUnwrap});var vIe=M(eQ=>{"use strict";A();Object.defineProperty(eQ,"__esModule",{value:!0});eQ.InstrumentationAbstract=void 0;var I7=(He(),Me(tt)),JAt=_7(),XU=b7(),C7=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=I7.diag.createComponentLogger({namespace:t}),this._tracer=I7.trace.getTracer(t,n),this._meter=I7.metrics.getMeter(t,n),this._logger=JAt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=XU.wrap;_unwrap=XU.unwrap;_massWrap=XU.massWrap;_massUnwrap=XU.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)}}};eQ.InstrumentationAbstract=C7});var xIe=M((iln,RIe)=>{A();var qC=1e3,VC=qC*60,YC=VC*60,hS=YC*24,ZAt=hS*7,WAt=hS*365.25;RIe.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return XAt(e);if(n==="number"&&isFinite(e))return t.long?tgt(e):egt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function XAt(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*WAt;case"weeks":case"week":case"w":return n*ZAt;case"days":case"day":case"d":return n*hS;case"hours":case"hour":case"hrs":case"hr":case"h":return n*YC;case"minutes":case"minute":case"mins":case"min":case"m":return n*VC;case"seconds":case"second":case"secs":case"sec":case"s":return n*qC;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function egt(e){var t=Math.abs(e);return t>=hS?Math.round(e/hS)+"d":t>=YC?Math.round(e/YC)+"h":t>=VC?Math.round(e/VC)+"m":t>=qC?Math.round(e/qC)+"s":e+"ms"}function tgt(e){var t=Math.abs(e);return t>=hS?tQ(e,t,hS,"day"):t>=YC?tQ(e,t,YC,"hour"):t>=VC?tQ(e,t,VC,"minute"):t>=qC?tQ(e,t,qC,"second"):e+" ms"}function tQ(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var v7=M((aln,DIe)=>{A();function ngt(e){n.debug=n,n.default=n,n.coerce=l,n.disable=s,n.enable=o,n.enabled=u,n.humanize=xIe(),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 E=0;E<h.length;E++)_=(_<<5)-_+h.charCodeAt(E),_|=0;return n.colors[Math.abs(_)%n.colors.length]}n.selectColor=t;function n(h){let _,E=null,T,v;function R(...x){if(!R.enabled)return;let k=R,P=Number(new Date),j=P-(_||P);k.diff=j,k.prev=_,k.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 te=n.formatters[ae];if(typeof te=="function"){let _e=x[G];V=te.call(k,_e),x.splice(G,1),G--}return V}),n.formatArgs.call(k,x),(k.log||n.log).apply(k,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:()=>E!==null?E:(T!==n.namespaces&&(T=n.namespaces,v=n.enabled(h)),v),set:x=>{E=x}}),typeof n.init=="function"&&n.init(R),R}function r(h,_){let E=n(this.namespace+(typeof _>"u"?":":_)+h);return E.log=this.log,E}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 E of _)E[0]==="-"?n.skips.push(E.slice(1)):n.names.push(E)}function i(h,_){let E=0,T=0,v=-1,R=0;for(;E<h.length;)if(T<_.length&&(_[T]===h[E]||_[T]==="*"))_[T]==="*"?(v=T,R=E,T++):(E++,T++);else if(v!==-1)T=v+1,R++,E=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}DIe.exports=ngt});var NIe=M((jc,nQ)=>{A();jc.formatArgs=ogt;jc.save=igt;jc.load=sgt;jc.useColors=rgt;jc.storage=agt();jc.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`."))}})();jc.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 rgt(){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 ogt(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+nQ.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)}jc.log=console.debug||console.log||(()=>{});function igt(e){try{e?jc.storage.setItem("debug",e):jc.storage.removeItem("debug")}catch{}}function sgt(){let e;try{e=jc.storage.getItem("debug")||jc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function agt(){try{return localStorage}catch{}}nQ.exports=v7()(jc);var{formatters:ugt}=nQ.exports;ugt.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var BIe=M((lln,wIe)=>{"use strict";A();wIe.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 PIe=M((pln,OIe)=>{"use strict";A();var cgt=Ue("os"),kIe=Ue("tty"),Zd=BIe(),{env:ea}=process,x_;Zd("no-color")||Zd("no-colors")||Zd("color=false")||Zd("color=never")?x_=0:(Zd("color")||Zd("colors")||Zd("color=true")||Zd("color=always"))&&(x_=1);"FORCE_COLOR"in ea&&(ea.FORCE_COLOR==="true"?x_=1:ea.FORCE_COLOR==="false"?x_=0:x_=ea.FORCE_COLOR.length===0?1:Math.min(parseInt(ea.FORCE_COLOR,10),3));function R7(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function x7(e,t){if(x_===0)return 0;if(Zd("color=16m")||Zd("color=full")||Zd("color=truecolor"))return 3;if(Zd("color=256"))return 2;if(e&&!t&&x_===void 0)return 0;let n=x_||0;if(ea.TERM==="dumb")return n;if(process.platform==="win32"){let r=cgt.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in ea)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in ea)||ea.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in ea)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ea.TEAMCITY_VERSION)?1:0;if(ea.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ea){let r=parseInt((ea.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ea.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ea.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ea.TERM)||"COLORTERM"in ea?1:n}function lgt(e){let t=x7(e,e&&e.isTTY);return R7(t)}OIe.exports={supportsColor:lgt,stdout:R7(x7(!0,kIe.isatty(1))),stderr:R7(x7(!0,kIe.isatty(2)))}});var LIe=M((ta,oQ)=>{A();var dgt=Ue("tty"),rQ=Ue("util");ta.init=_gt;ta.log=Agt;ta.formatArgs=fgt;ta.save=ggt;ta.load=hgt;ta.useColors=pgt;ta.destroy=rQ.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ta.colors=[6,2,3,4,5,1];try{let e=PIe();e&&(e.stderr||e).level>=2&&(ta.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{}ta.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 pgt(){return"colors"in ta.inspectOpts?!!ta.inspectOpts.colors:dgt.isatty(process.stderr.fd)}function fgt(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+"+oQ.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=mgt()+t+" "+e[0]}function mgt(){return ta.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Agt(...e){return process.stderr.write(rQ.formatWithOptions(ta.inspectOpts,...e)+`
|
|
6
6
|
`)}function ggt(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function hgt(){return process.env.DEBUG}function _gt(e){e.inspectOpts={};let t=Object.keys(ta.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=ta.inspectOpts[t[n]]}oQ.exports=v7()(ta);var{formatters:MIe}=oQ.exports;MIe.o=function(e){return this.inspectOpts.colors=this.useColors,rQ.inspect(e,this.inspectOpts).split(`
|
|
@@ -35,7 +35,7 @@ Url: ${mF(e)}`),!0}return!1}function OEt(e,t){return t?.length?cF(e).some(n=>U_(
|
|
|
35
35
|
`);for(let o of r){if(!o)continue;let i=o.indexOf(":");if(i===-1)continue;let s=o.substring(0,i).toLowerCase(),u=o.substring(i+1).trim(),l=n.get(s);l&&Array.isArray(l)?l.push(u):l?n.set(s,[l,u]):n.set(s,u)}}return n}onRequestCreated({request:t}){let n=this.getConfig(),r=n.enabled!==!1;if((0,$B.safeExecuteInTheMiddle)(()=>!r||t.method==="CONNECT"||n.ignoreRequestHook?.(t),V=>V&&this._diag.error("caught ignoreRequestHook error: ",V),!0))return;let i=(0,r3.hrTime)(),s;try{s=new UCt.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={[ss.ATTR_HTTP_REQUEST_METHOD]:l,[ss.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]:t.method,[ss.ATTR_URL_FULL]:s.toString(),[ss.ATTR_URL_PATH]:s.pathname,[ss.ATTR_URL_QUERY]:s.search,[ss.ATTR_URL_SCHEME]:u},h={https:"443",http:"80"},_=s.hostname,E=s.port||h[u];f[ss.ATTR_SERVER_ADDRESS]=_,E&&!isNaN(Number(E))&&(f[ss.ATTR_SERVER_PORT]=Number(E));let v=this.parseRequestHeaders(t).get("user-agent");if(v){let V=Array.isArray(v)?v[v.length-1]:v;f[ss.ATTR_USER_AGENT_ORIGINAL]=V}let R=(0,$B.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=td.context.active(),k=td.trace.getSpan(x),P;n.requireParentforSpans&&(!k||!td.trace.isSpanContextValid(k.spanContext()))?P=td.trace.wrapSpanContext(td.INVALID_SPAN_CONTEXT):P=this.tracer.startSpan(l==="_OTHER"?"HTTP":l,{kind:td.SpanKind.CLIENT,attributes:f},x),(0,$B.safeExecuteInTheMiddle)(()=>n.requestHook?.(P,t),V=>V&&this._diag.error("caught requestHook error: ",V),!0);let j=td.trace.setSpan(td.context.active(),P),G={};td.propagation.inject(j,G);let $=Object.entries(G);for(let V=0;V<$.length;V++){let[ae,te]=$[V];typeof t.addHeader=="function"?t.addHeader(ae,te):typeof t.headers=="string"?t.headers+=`${ae}: ${te}\r
|
|
36
36
|
`:Array.isArray(t.headers)&&t.headers.push(ae,te)}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={[ss.ATTR_NETWORK_PEER_ADDRESS]:s,[ss.ATTR_NETWORK_PEER_PORT]:u};if(o.headersToSpanAttributes?.requestHeaders){let f=new Set(o.headersToSpanAttributes.requestHeaders.map(_=>_.toLowerCase())),h=this.parseRequestHeaders(t);for(let[_,E]of h.entries())if(f.has(_)){let T=Array.isArray(E)?E:[E];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={[ss.ATTR_HTTP_RESPONSE_STATUS_CODE]:n.statusCode},u=this.getConfig();if((0,$B.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 E=`http.response.header.${h}`;Object.hasOwn(s,E)?s[E].push(_.toString()):s[E]=[_.toString()]}}}o.setAttributes(s),o.setStatus({code:n.statusCode>=400?td.SpanStatusCode.ERROR:td.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:td.SpanStatusCode.ERROR,message:n.message}),o.end(),this._recordFromReq.delete(t),i[ss.ATTR_ERROR_TYPE]=n.message,this.recordRequestDuration(i,s)}recordRequestDuration(t,n){let r={};[ss.ATTR_HTTP_RESPONSE_STATUS_CODE,ss.ATTR_HTTP_REQUEST_METHOD,ss.ATTR_SERVER_ADDRESS,ss.ATTR_SERVER_PORT,ss.ATTR_URL_SCHEME,ss.ATTR_ERROR_TYPE].forEach(s=>{s in t&&(r[s]=t[s])});let i=(0,r3.hrTimeToMilliseconds)((0,r3.hrTimeDuration)(n,(0,r3.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"}};o3.UndiciInstrumentation=uW});var FBe=M(i3=>{"use strict";A();Object.defineProperty(i3,"__esModule",{value:!0});i3.UndiciInstrumentation=void 0;var QCt=QBe();Object.defineProperty(i3,"UndiciInstrumentation",{enumerable:!0,get:function(){return QCt.UndiciInstrumentation}})});function GBe(e,t="/"){let n=`${e}`;return n.endsWith("/")&&t.startsWith("/")?`${n}${t.slice(1)}`:!n.endsWith("/")&&!t.startsWith("/")?`${n}/${t}`:`${n}${t}`}function zCt(e,t={}){return typeof e.spans=="boolean"?e.spans:!t.skipOpenTelemetrySetup&&Qi(t)}function HCt(e={}){return{requireParentforSpans:!1,ignoreRequestHook:n=>{let r=GBe(n.origin,n.path),o=e.ignoreOutgoingRequests;return!!(o&&r&&o(r))},startSpanHook:n=>{let r=GBe(n.origin,n.path);if(r.startsWith("data:")){let o=vv(r);return{[Lt]:"auto.http.otel.node_fetch","http.url":o,[z_]:o,[tp]:`${n.method||"GET"} ${o}`}}return{[Lt]:"auto.http.otel.node_fetch"}},requestHook:e.requestHook,responseHook:e.responseHook,headersToSpanAttributes:e.headersToSpanAttributes}}var jBe,zBe,FCt,GCt,jCt,HBe,$Be=B(()=>{A();jBe=ue(FBe(),1);mt();_r();zBe="NodeFetch",FCt=ct(zBe,jBe.UndiciInstrumentation,e=>HCt(e)),GCt=ct(`${zBe}.sentry`,FS,e=>e),jCt=((e={})=>({name:"NodeFetch",setupOnce(){zCt(e,Et()?.getOptions())&&FCt(e),GCt(e)}})),HBe=jCt});var s3=M(qB=>{"use strict";A();Object.defineProperty(qB,"__esModule",{value:!0});qB.ExpressLayerType=void 0;var $Ct;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})($Ct=qB.ExpressLayerType||(qB.ExpressLayerType={}))});var a3=M(VB=>{"use strict";A();Object.defineProperty(VB,"__esModule",{value:!0});VB.AttributeNames=void 0;var qCt;(function(e){e.EXPRESS_TYPE="express.type",e.EXPRESS_NAME="express.name"})(qCt=VB.AttributeNames||(VB.AttributeNames={}))});var cW=M(rR=>{"use strict";A();Object.defineProperty(rR,"__esModule",{value:!0});rR._LAYERS_STORE_PROPERTY=rR.kLayerPatched=void 0;rR.kLayerPatched=Symbol("express-layer-patched");rR._LAYERS_STORE_PROPERTY="__ot_middlewares"});var YBe=M(as=>{"use strict";A();Object.defineProperty(as,"__esModule",{value:!0});as.getActualMatchedRoute=as.getConstructedRoute=as.getLayerPath=as.asErrorAndMessage=as.isLayerIgnored=as.getLayerMetadata=as.getRouterPath=as.storeLayerPath=void 0;var lW=s3(),oR=a3(),qS=cW(),VCt=(e,t)=>(Array.isArray(e[qS._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,qS._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),t===void 0?{isLayerPathStored:!1}:(e[qS._LAYERS_STORE_PROPERTY].push(t),{isLayerPathStored:!0}));as.storeLayerPath=VCt;var YCt=(e,t)=>{let n=t.handle?.stack?.[0];return n?.route?.path?`${e}${n.route.path}`:n?.handle?.stack?(0,as.getRouterPath)(e,n):e};as.getRouterPath=YCt;var KCt=(e,t,n)=>{if(t.name==="router"){let r=(0,as.getRouterPath)("",t),o=r||n||e||"/";return{attributes:{[oR.AttributeNames.EXPRESS_NAME]:o,[oR.AttributeNames.EXPRESS_TYPE]:lW.ExpressLayerType.ROUTER},name:`router - ${o}`}}else return t.name==="bound dispatch"||t.name==="handle"?{attributes:{[oR.AttributeNames.EXPRESS_NAME]:(e||n)??"request handler",[oR.AttributeNames.EXPRESS_TYPE]:lW.ExpressLayerType.REQUEST_HANDLER},name:`request handler${t.path?` - ${e||n}`:""}`}:{attributes:{[oR.AttributeNames.EXPRESS_NAME]:t.name,[oR.AttributeNames.EXPRESS_TYPE]:lW.ExpressLayerType.MIDDLEWARE},name:`middleware - ${t.name}`}};as.getLayerMetadata=KCt;var JCt=(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")},ZCt=(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(JCt(e,r))return!0}catch{}return!1};as.isLayerIgnored=ZCt;var WCt=e=>e instanceof Error?[e,e.message]:[String(e),String(e)];as.asErrorAndMessage=WCt;var XCt=e=>{let t=e[0];return Array.isArray(t)?t.map(n=>qBe(n)||"").join(","):qBe(t)};as.getLayerPath=XCt;var qBe=e=>{if(typeof e=="string")return e;if(e instanceof RegExp||typeof e=="number")return e.toString()};function VBe(e){let n=(Array.isArray(e[qS._LAYERS_STORE_PROPERTY])?e[qS._LAYERS_STORE_PROPERTY]:[]).filter(r=>r!=="/"&&r!=="/*");return n.length===1&&n[0]==="*"?"*":n.join("").replace(/\/{2,}/g,"/")}as.getConstructedRoute=VBe;function evt(e){let t=Array.isArray(e[qS._LAYERS_STORE_PROPERTY])?e[qS._LAYERS_STORE_PROPERTY]:[];if(t.length===0)return;if(t.every(i=>i==="/"))return e.originalUrl==="/"?"/":void 0;let n=VBe(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)||tvt(r))?r:void 0}as.getActualMatchedRoute=evt;function tvt(e){return e.includes(":")||e.includes("*")}});var KBe=M(iR=>{"use strict";A();Object.defineProperty(iR,"__esModule",{value:!0});iR.PACKAGE_NAME=iR.PACKAGE_VERSION=void 0;iR.PACKAGE_VERSION="0.62.0";iR.PACKAGE_NAME="@opentelemetry/instrumentation-express"});var eke=M(c3=>{"use strict";A();Object.defineProperty(c3,"__esModule",{value:!0});c3.ExpressInstrumentation=void 0;var JBe=Rr(),Kc=(He(),Me(tt)),ZBe=s3(),WBe=a3(),Xm=YBe(),XBe=KBe(),sR=cn(),nvt=(Xn(),Me(Vr)),u3=cW(),dW=class extends sR.InstrumentationBase{constructor(t={}){super(XBe.PACKAGE_NAME,XBe.PACKAGE_VERSION,t)}init(){return[new sR.InstrumentationNodeModuleDefinition("express",[">=4.0.0 <6"],t=>{let n=typeof t?.Router?.prototype?.route=="function",r=n?t.Router.prototype:t.Router;return(0,sR.isWrapped)(r.route)&&this._unwrap(r,"route"),this._wrap(r,"route",this._getRoutePatch()),(0,sR.isWrapped)(r.use)&&this._unwrap(r,"use"),this._wrap(r,"use",this._getRouterUsePatch()),(0,sR.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[u3.kLayerPatched]!==!0&&(t[u3.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),_={[nvt.ATTR_HTTP_ROUTE]:h},E=(0,Xm.getLayerMetadata)(f,t,n),T=E.attributes[WBe.AttributeNames.EXPRESS_TYPE],v=(0,JBe.getRPCMetadata)(Kc.context.active());if(v?.type===JBe.RPCType.HTTP&&(v.route=h),(0,Xm.isLayerIgnored)(E.name,T,r.getConfig()))return T===ZBe.ExpressLayerType.MIDDLEWARE&&s[u3._LAYERS_STORE_PROPERTY].pop(),o.apply(this,arguments);if(Kc.trace.getSpan(Kc.context.active())===void 0)return o.apply(this,arguments);let R=r._getSpanName({request:s,layerType:T,route:f},E.name),x=r.tracer.startSpan(R,{attributes:Object.assign(_,E.attributes)}),k=Kc.context.active(),P=Kc.trace.setSpan(k,x),{requestHook:j}=r.getConfig();j&&(0,sR.safeExecuteInTheMiddle)(()=>j(x,{request:s,layerType:T,route:f}),te=>{te&&Kc.diag.error("express instrumentation: request hook failed",te)},!0);let G=!1;E.attributes[WBe.AttributeNames.EXPRESS_TYPE]===ZBe.ExpressLayerType.ROUTER&&(x.end(),G=!0,P=k);let $=()=>{G===!1&&(G=!0,x.end())},V=Array.from(arguments),ae=V.findIndex(te=>typeof te=="function");ae>=0&&(arguments[ae]=function(){let te=arguments[0],_e=![void 0,null,"route","router"].includes(te);if(!G&&_e){let[un,Se]=(0,Xm.asErrorAndMessage)(te);x.recordException(un),x.setStatus({code:Kc.SpanStatusCode.ERROR,message:Se})}G===!1&&(G=!0,s.res?.removeListener("finish",$),x.end()),!(s.route&&_e)&&l&&s[u3._LAYERS_STORE_PROPERTY].pop();let Ve=V[ae],nt=Kc.context.active(),Fe=Kc.trace.getSpan(k),Mt=Fe?Kc.trace.setSpan(nt,Fe):nt;return Kc.context.bind(Mt,Ve).apply(this,arguments)});try{return Kc.context.bind(P,o).apply(this,arguments)}catch(te){let[_e,Ve]=(0,Xm.asErrorAndMessage)(te);throw x.recordException(_e),x.setStatus({code:Kc.SpanStatusCode.ERROR,message:Ve}),te}finally{G||u.once("finish",$)}};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 Kc.diag.error("express instrumentation: error calling span name rewrite hook",o),n}}};c3.ExpressInstrumentation=dW});var tke=M(dE=>{"use strict";A();Object.defineProperty(dE,"__esModule",{value:!0});dE.AttributeNames=dE.ExpressLayerType=dE.ExpressInstrumentation=void 0;var rvt=eke();Object.defineProperty(dE,"ExpressInstrumentation",{enumerable:!0,get:function(){return rvt.ExpressInstrumentation}});var ovt=s3();Object.defineProperty(dE,"ExpressLayerType",{enumerable:!0,get:function(){return ovt.ExpressLayerType}});var ivt=a3();Object.defineProperty(dE,"AttributeNames",{enumerable:!0,get:function(){return ivt.AttributeNames}})});var ws,VS=B(()=>{A();ws=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__});function svt(e){Kr(e,"auto.http.otel.express");let t=Pt(e).data,n=t["express.type"];n&&e.setAttribute(rn,`${n}.express`);let r=t["express.name"];typeof r=="string"&&e.updateName(r)}function avt(e,t){if(xn()===ep())return ws&&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";xn().setTransactionName(`${r} ${e.route}`)}return t}var nke,rke,oke,uvt,ike,ske=B(()=>{A();nke=ue(tke(),1);mt();_r();VS();rke="Express";oke=ct(rke,()=>new nke.ExpressInstrumentation({requestHook:e=>svt(e),spanNameHook:(e,t)=>avt(e,t)})),uvt=(()=>({name:rke,setupOnce(){oke()}})),ike=uvt});var ake=M(YB=>{"use strict";A();Object.defineProperty(YB,"__esModule",{value:!0});YB.SeverityNumber=void 0;var cvt;(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"})(cvt=YB.SeverityNumber||(YB.SeverityNumber={}))});var p3=M(aR=>{"use strict";A();Object.defineProperty(aR,"__esModule",{value:!0});aR.NOOP_LOGGER=aR.NoopLogger=void 0;var d3=class{emit(t){}};aR.NoopLogger=d3;aR.NOOP_LOGGER=new d3});var uke=M(eA=>{"use strict";A();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 lvt(e,t,n){return r=>r===e?t:n}eA.makeGetter=lvt;eA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var pW=M(uR=>{"use strict";A();Object.defineProperty(uR,"__esModule",{value:!0});uR.NOOP_LOGGER_PROVIDER=uR.NoopLoggerProvider=void 0;var dvt=p3(),f3=class{getLogger(t,n,r){return new dvt.NoopLogger}};uR.NoopLoggerProvider=f3;uR.NOOP_LOGGER_PROVIDER=new f3});var cke=M(m3=>{"use strict";A();Object.defineProperty(m3,"__esModule",{value:!0});m3.ProxyLogger=void 0;var pvt=p3(),fW=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):pvt.NOOP_LOGGER}};m3.ProxyLogger=fW});var lke=M(A3=>{"use strict";A();Object.defineProperty(A3,"__esModule",{value:!0});A3.ProxyLoggerProvider=void 0;var fvt=pW(),mvt=cke(),mW=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new mvt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:fvt.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)}};A3.ProxyLoggerProvider=mW});var pke=M(g3=>{"use strict";A();Object.defineProperty(g3,"__esModule",{value:!0});g3.LogsAPI=void 0;var ap=uke(),Avt=pW(),dke=lke(),AW=class e{constructor(){this._proxyLoggerProvider=new dke.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return ap._global[ap.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(ap._global[ap.GLOBAL_LOGS_API_KEY]=(0,ap.makeGetter)(ap.API_BACKWARDS_COMPATIBILITY_VERSION,t,Avt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=ap._global[ap.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(ap._global,ap.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete ap._global[ap.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new dke.ProxyLoggerProvider}};g3.LogsAPI=AW});var gW=M(tA=>{"use strict";A();Object.defineProperty(tA,"__esModule",{value:!0});tA.logs=tA.NoopLogger=tA.NOOP_LOGGER=tA.SeverityNumber=void 0;var gvt=ake();Object.defineProperty(tA,"SeverityNumber",{enumerable:!0,get:function(){return gvt.SeverityNumber}});var fke=p3();Object.defineProperty(tA,"NOOP_LOGGER",{enumerable:!0,get:function(){return fke.NOOP_LOGGER}});Object.defineProperty(tA,"NoopLogger",{enumerable:!0,get:function(){return fke.NoopLogger}});var hvt=pke();tA.logs=hvt.LogsAPI.getInstance()});var mke=M(cR=>{"use strict";A();Object.defineProperty(cR,"__esModule",{value:!0});cR.disableInstrumentations=cR.enableInstrumentations=void 0;function _vt(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()}}cR.enableInstrumentations=_vt;function Evt(e){e.forEach(t=>t.disable())}cR.disableInstrumentations=Evt});var hke=M(h3=>{"use strict";A();Object.defineProperty(h3,"__esModule",{value:!0});h3.registerInstrumentations=void 0;var Ake=(He(),Me(tt)),yvt=gW(),gke=mke();function Svt(e){let t=e.tracerProvider||Ake.trace.getTracerProvider(),n=e.meterProvider||Ake.metrics.getMeterProvider(),r=e.loggerProvider||yvt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,gke.enableInstrumentations)(o,t,n,r),()=>{(0,gke.disableInstrumentations)(o)}}h3.registerInstrumentations=Svt});var vke=M(_3=>{"use strict";A();Object.defineProperty(_3,"__esModule",{value:!0});_3.satisfies=void 0;var yW=(He(),Me(tt)),Tke=/^(?: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-]+)*))?$/,Tvt=/^(?<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-]+)*))?$/,bvt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function Ivt(e,t,n){if(!Cvt(e))return yW.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=Dvt(e);if(!r)return!1;let o=[],i=bke(r,t,o,n);return i&&!n?.includePrerelease?Rvt(r,o):i}_3.satisfies=Ivt;function Cvt(e){return typeof e=="string"&&Tke.test(e)}function bke(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(hW(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Jvt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!hW(e,i,n,r))return!1;return!0}return hW(e,t,n,r)}function hW(e,t,n,r){if(t=xvt(t,r),t.includes(" "))return bke(e,t,n,r);{let o=Nvt(t);return n.push(o),vvt(e,o)}}function vvt(e,t){if(t.invalid)return!1;if(!t.version||EW(t.version))return!0;let n=Eke(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=Eke(r,o)}return bvt[t.op]?.includes(n)}function Rvt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function xvt(e,t){return e=e.trim(),e=Yvt(e,t),e=Vvt(e),e=Kvt(e,t),e=e.trim(),e}function Xu(e){return!e||e.toLowerCase()==="x"||e==="*"}function Dvt(e){let t=e.match(Tke);if(!t){yW.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 Nvt(e){if(!e)return{};let t=e.match(Tvt);if(!t)return yW.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 EW(e){return e==="*"||e==="x"||e==="X"}function _ke(e){let t=parseInt(e,10);return isNaN(t)?e:t}function wvt(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 Bvt(e,t){if(EW(e)||EW(t))return 0;let[n,r]=wvt(_ke(e),_ke(t));return n>r?1:n<r?-1:0}function Eke(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=Bvt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var Ike="[a-zA-Z0-9-]",Cke="0|[1-9]\\d*",kvt=`\\d*[a-zA-Z-]${Ike}*`,Ovt="((?:<|>)?=?)",yke=`(?:${Cke}|${kvt})`,Pvt=`(?:-(${yke}(?:\\.${yke})*))`,Ske=`${Ike}+`,Mvt=`(?:\\+(${Ske}(?:\\.${Ske})*))`,_W=`${Cke}|x|X|\\*`,KB=`[v=\\s]*(${_W})(?:\\.(${_W})(?:\\.(${_W})(?:${Pvt})?${Mvt}?)?)?`,Lvt=`^${Ovt}\\s*${KB}$`,Uvt=new RegExp(Lvt),Qvt=`^\\s*(${KB})\\s+-\\s+(${KB})\\s*$`,Fvt=new RegExp(Qvt),Gvt="(?:~>?)",jvt=`^${Gvt}${KB}$`,zvt=new RegExp(jvt),Hvt="(?:\\^)",$vt=`^${Hvt}${KB}$`,qvt=new RegExp($vt);function Vvt(e){let t=zvt;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 Yvt(e,t){let n=qvt,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 Kvt(e,t){let n=Uvt;return e.replace(n,(r,o,i,s,u,l)=>{let f=Xu(i),h=f||Xu(s),_=h||Xu(u),E=_;return o==="="&&E&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&E?(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 Jvt(e,t){let n=Fvt;return e.replace(n,(r,o,i,s,u,l,f,h,_,E,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(E)?h=`<${+_+1}.0.0-0`:Xu(T)?h=`<${_}.${+E+1}.0-0`:v?h=`<=${_}.${E}.${T}-${v}`:t?.includePrerelease?h=`<${_}.${E}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var SW=M(Ua=>{"use strict";A();Object.defineProperty(Ua,"__esModule",{value:!0});Ua.massUnwrap=Ua.unwrap=Ua.massWrap=Ua.wrap=void 0;var ec=console.error.bind(console);function JB(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 Zvt=(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 JB(o,"__original",r),JB(o,"__unwrap",()=>{e[t]===o&&JB(e,t,r)}),JB(o,"__wrapped",!0),JB(e,t,o),o};Ua.wrap=Zvt;var Wvt=(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,Ua.wrap)(r,o,n)})})};Ua.massWrap=Wvt;var Xvt=(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}};Ua.unwrap=Xvt;var eRt=(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,Ua.unwrap)(n,r)})})};Ua.massUnwrap=eRt;function ZB(e){e&&e.logger&&(typeof e.logger!="function"?ec("new logger isn't a function, not replacing"):ec=e.logger)}Ua.default=ZB;ZB.wrap=Ua.wrap;ZB.massWrap=Ua.massWrap;ZB.unwrap=Ua.unwrap;ZB.massUnwrap=Ua.massUnwrap});var Rke=M(y3=>{"use strict";A();Object.defineProperty(y3,"__esModule",{value:!0});y3.InstrumentationAbstract=void 0;var TW=(He(),Me(tt)),tRt=gW(),E3=SW(),bW=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=TW.diag.createComponentLogger({namespace:t}),this._tracer=TW.trace.getTracer(t,n),this._meter=TW.metrics.getMeter(t,n),this._logger=tRt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=E3.wrap;_unwrap=E3.unwrap;_massWrap=E3.massWrap;_massUnwrap=E3.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)}}};y3.InstrumentationAbstract=bW});var xke=M(pE=>{"use strict";A();Object.defineProperty(pE,"__esModule",{value:!0});pE.ModuleNameTrie=pE.ModuleNameSeparator=void 0;pE.ModuleNameSeparator="/";var S3=class{hooks=[];children=new Map},IW=class{_trie=new S3;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(pE.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new S3,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],s=!0;for(let u of t.split(pE.ModuleNameSeparator)){let l=o.children.get(u);if(!l){s=!1;break}r||i.push(...l.hooks),o=l}return r&&s&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((u,l)=>u.insertedId-l.insertedId),i.map(({hook:u})=>u))}};pE.ModuleNameTrie=IW});var Nke=M(T3=>{"use strict";A();Object.defineProperty(T3,"__esModule",{value:!0});T3.RequireInTheMiddleSingleton=void 0;var nRt=_S(),Dke=Ue("path"),CW=xke(),rRt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),vW=class e{_moduleNameTrie=new CW.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new nRt.Hook(null,{internals:!0},(t,n,r)=>{let o=oRt(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 rRt?new e:this._instance=this._instance??new e}};T3.RequireInTheMiddleSingleton=vW;function oRt(e){return Dke.sep!==CW.ModuleNameSeparator?e.split(Dke.sep).join(CW.ModuleNameSeparator):e}});var Pke=M(WB=>{A();var wke=[],RW=new WeakMap,Bke=new WeakMap,kke=new Map,Oke=[],iRt={set(e,t,n){let r=RW.get(e),o=r&&r[t];return typeof o=="function"?o(n):!0},get(e,t){if(t===Symbol.toStringTag)return"Module";let n=Bke.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=RW.get(e),o=r&&r[t];return typeof o=="function"?o(n.value):!0}};function sRt(e,t,n,r,o){kke.set(e,o),RW.set(t,n),Bke.set(t,r);let i=new Proxy(t,iRt);wke.forEach(s=>s(e,i,o)),Oke.push([e,i,o])}WB.register=sRt;WB.importHooks=wke;WB.specifiers=kke;WB.toHook=Oke});var wW=M((TNn,dR)=>{A();var Mke=Ue("path"),aRt=iQ(),{fileURLToPath:uRt}=Ue("url"),{MessageChannel:cRt}=Ue("worker_threads"),{isBuiltin:xW}=Ue("module");xW||(xW=()=>!0);var{importHooks:DW,specifiers:lRt,toHook:dRt}=Pke();function Lke(e){DW.push(e),dRt.forEach(([t,n,r])=>e(t,n,r))}function Uke(e){let t=DW.indexOf(e);t>-1&&DW.splice(t,1)}function lR(e,t,n,r){let o=e(t,n,r);o&&o!==t&&"default"in t&&(t.default=o)}var NW;function pRt(){let{port1:e,port2:t}=new cRt,n=0,r;NW=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 XB(e,t,n){if(!(this instanceof XB))return new XB(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;NW&&Array.isArray(e)&&NW(e),this._iitmHook=(o,i,s)=>{let u=o,l=u.startsWith("node:"),f,h;if(l){let _=o.slice(5);xW(_)&&(o=_)}else if(u.startsWith("file://")){let _=Error.stackTraceLimit;Error.stackTraceLimit=0;try{f=uRt(o),o=f}catch{}if(Error.stackTraceLimit=_,f){let E=aRt(f);E&&(o=E.name,h=E.basedir)}}if(e)for(let _ of e)if(f&&_===f)lR(n,i,f,void 0);else if(_===o){if(!h)lR(n,i,o,h);else if(h.endsWith(lRt.get(u)))lR(n,i,o,h);else if(r){let E=o+Mke.sep+Mke.relative(h,f);lR(n,i,E,h)}}else _===s&&lR(n,i,s,h);else lR(n,i,o,h)},Lke(this._iitmHook)}XB.prototype.unhook=function(){Uke(this._iitmHook)};dR.exports=XB;dR.exports.Hook=XB;dR.exports.addHook=Lke;dR.exports.removeHook=Uke;dR.exports.createAddHookMessageChannel=pRt});var BW=M(fE=>{"use strict";A();Object.defineProperty(fE,"__esModule",{value:!0});fE.isWrapped=fE.safeExecuteInTheMiddleAsync=fE.safeExecuteInTheMiddle=void 0;function fRt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}fE.safeExecuteInTheMiddle=fRt;async function mRt(e,t,n){let r,o;try{o=await e()}catch(i){r=i}finally{if(await t(r,o),r&&!n)throw r;return o}}fE.safeExecuteInTheMiddleAsync=mRt;function ARt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}fE.isWrapped=ARt});var Gke=M(b3=>{"use strict";A();Object.defineProperty(b3,"__esModule",{value:!0});b3.InstrumentationBase=void 0;var ek=Ue("path"),Qke=Ue("util"),gRt=vke(),kW=SW(),hRt=Rke(),_Rt=Nke(),ERt=wW(),tk=(He(),Me(tt)),yRt=_S(),SRt=Ue("fs"),TRt=BW(),OW=class extends hRt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=_Rt.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,TRt.isWrapped)(t[n])&&this._unwrap(t,n),Qke.types.isProxy(t)){let o=(0,kW.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,kW.wrap)(t,n,r)};_unwrap=(t,n)=>Qke.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,kW.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{tk.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){tk.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{tk.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){tk.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,SRt.readFileSync)(ek.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{tk.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 Fke(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=ek.normalize(r);return s.filter(f=>f.name===u&&Fke(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&&ek.isAbsolute(u)){let f=ek.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=ek.isAbsolute(t.name)?new yRt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new ERt.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}};b3.InstrumentationBase=OW;function Fke(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,gRt.satisfies)(t,r,{includePrerelease:n}))}});var jke=M(I3=>{"use strict";A();Object.defineProperty(I3,"__esModule",{value:!0});I3.normalize=void 0;var bRt=Ue("path");Object.defineProperty(I3,"normalize",{enumerable:!0,get:function(){return bRt.normalize}})});var zke=M(pR=>{"use strict";A();Object.defineProperty(pR,"__esModule",{value:!0});pR.normalize=pR.InstrumentationBase=void 0;var IRt=Gke();Object.defineProperty(pR,"InstrumentationBase",{enumerable:!0,get:function(){return IRt.InstrumentationBase}});var CRt=jke();Object.defineProperty(pR,"normalize",{enumerable:!0,get:function(){return CRt.normalize}})});var PW=M(fR=>{"use strict";A();Object.defineProperty(fR,"__esModule",{value:!0});fR.normalize=fR.InstrumentationBase=void 0;var Hke=zke();Object.defineProperty(fR,"InstrumentationBase",{enumerable:!0,get:function(){return Hke.InstrumentationBase}});Object.defineProperty(fR,"normalize",{enumerable:!0,get:function(){return Hke.normalize}})});var $ke=M(C3=>{"use strict";A();Object.defineProperty(C3,"__esModule",{value:!0});C3.InstrumentationNodeModuleDefinition=void 0;var MW=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}};C3.InstrumentationNodeModuleDefinition=MW});var qke=M(v3=>{"use strict";A();Object.defineProperty(v3,"__esModule",{value:!0});v3.InstrumentationNodeModuleFile=void 0;var vRt=PW(),LW=class{name;supportedVersions;patch;unpatch;constructor(t,n,r,o){this.name=(0,vRt.normalize)(t),this.supportedVersions=n,this.patch=r,this.unpatch=o}};v3.InstrumentationNodeModuleFile=LW});var Vke=M(YS=>{"use strict";A();Object.defineProperty(YS,"__esModule",{value:!0});YS.semconvStabilityFromStr=YS.SemconvStability=void 0;var R3;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(R3=YS.SemconvStability||(YS.SemconvStability={}));function RRt(e,t){let n=R3.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=R3.DUPLICATE;break}else o.toLowerCase()===e&&(n=R3.STABLE);return n}YS.semconvStabilityFromStr=RRt});var Kke=M(us=>{"use strict";A();Object.defineProperty(us,"__esModule",{value:!0});us.semconvStabilityFromStr=us.SemconvStability=us.safeExecuteInTheMiddleAsync=us.safeExecuteInTheMiddle=us.isWrapped=us.InstrumentationNodeModuleFile=us.InstrumentationNodeModuleDefinition=us.InstrumentationBase=us.registerInstrumentations=void 0;var xRt=hke();Object.defineProperty(us,"registerInstrumentations",{enumerable:!0,get:function(){return xRt.registerInstrumentations}});var DRt=PW();Object.defineProperty(us,"InstrumentationBase",{enumerable:!0,get:function(){return DRt.InstrumentationBase}});var NRt=$ke();Object.defineProperty(us,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return NRt.InstrumentationNodeModuleDefinition}});var wRt=qke();Object.defineProperty(us,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return wRt.InstrumentationNodeModuleFile}});var UW=BW();Object.defineProperty(us,"isWrapped",{enumerable:!0,get:function(){return UW.isWrapped}});Object.defineProperty(us,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return UW.safeExecuteInTheMiddle}});Object.defineProperty(us,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return UW.safeExecuteInTheMiddleAsync}});var Yke=Vke();Object.defineProperty(us,"SemconvStability",{enumerable:!0,get:function(){return Yke.SemconvStability}});Object.defineProperty(us,"semconvStabilityFromStr",{enumerable:!0,get:function(){return Yke.semconvStabilityFromStr}})});var Jke=M((zNn,BRt)=>{BRt.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 Wke=M(KS=>{"use strict";A();Object.defineProperty(KS,"__esModule",{value:!0});KS.range=KS.balanced=void 0;var kRt=(e,t,n)=>{let r=e instanceof RegExp?Zke(e,n):e,o=t instanceof RegExp?Zke(t,n):t,i=r!==null&&o!=null&&(0,KS.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)}};KS.balanced=kRt;var Zke=(e,t)=>{let n=t.match(e);return n?n[0]:null},ORt=(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};KS.range=ORt});var iOe=M(mR=>{"use strict";A();Object.defineProperty(mR,"__esModule",{value:!0});mR.EXPANSION_MAX=void 0;mR.expand=VRt;var Xke=Wke(),eOe="\0SLASH"+Math.random()+"\0",tOe="\0OPEN"+Math.random()+"\0",FW="\0CLOSE"+Math.random()+"\0",nOe="\0COMMA"+Math.random()+"\0",rOe="\0PERIOD"+Math.random()+"\0",PRt=new RegExp(eOe,"g"),MRt=new RegExp(tOe,"g"),LRt=new RegExp(FW,"g"),URt=new RegExp(nOe,"g"),QRt=new RegExp(rOe,"g"),FRt=/\\\\/g,GRt=/\\{/g,jRt=/\\}/g,zRt=/\\,/g,HRt=/\\\./g;mR.EXPANSION_MAX=1e5;function QW(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function $Rt(e){return e.replace(FRt,eOe).replace(GRt,tOe).replace(jRt,FW).replace(zRt,nOe).replace(HRt,rOe)}function qRt(e){return e.replace(PRt,"\\").replace(MRt,"{").replace(LRt,"}").replace(URt,",").replace(QRt,".")}function oOe(e){if(!e)return[""];let t=[],n=(0,Xke.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=oOe(i);return i.length&&(s[s.length-1]+=u.shift(),s.push.apply(s,u)),t.push.apply(t,s),t}function VRt(e,t={}){if(!e)return[];let{max:n=mR.EXPANSION_MAX}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),nk($Rt(e),n,!0).map(qRt)}function YRt(e){return"{"+e+"}"}function KRt(e){return/^-?0\d/.test(e)}function JRt(e,t){return e<=t}function ZRt(e,t){return e>=t}function nk(e,t,n){let r=[],o=(0,Xke.balanced)("{","}",e);if(!o)return[e];let i=o.pre,s=o.post.length?nk(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+FW+o.post,nk(e,t,!0)):[e];let _;if(f)_=o.body.split(/\.\./);else if(_=oOe(o.body),_.length===1&&_[0]!==void 0&&(_=nk(_[0],t,!1).map(YRt),_.length===1))return s.map(T=>o.pre+_[0]+T);let E;if(f&&_[0]!==void 0&&_[1]!==void 0){let T=QW(_[0]),v=QW(_[1]),R=Math.max(_[0].length,_[1].length),x=_.length===3&&_[2]!==void 0?Math.max(Math.abs(QW(_[2])),1):1,k=JRt;v<T&&(x*=-1,k=ZRt);let j=_.some(KRt);E=[];for(let G=T;k(G,v)&&E.length<t;G+=x){let $;if(l)$=String.fromCharCode(G),$==="\\"&&($="");else if($=String(G),j){let V=R-$.length;if(V>0){let ae=new Array(V+1).join("0");G<0?$="-"+ae+$.slice(1):$=ae+$}}E.push($)}}else{E=[];for(let T=0;T<_.length;T++)E.push.apply(E,nk(_[T],t,!1))}for(let T=0;T<E.length;T++)for(let v=0;v<s.length&&r.length<t;v++){let R=i+E[T]+s[v];(!n||f||R)&&r.push(R)}}return r}});var sOe=M(x3=>{"use strict";A();Object.defineProperty(x3,"__esModule",{value:!0});x3.assertValidPattern=void 0;var WRt=1024*64,XRt=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>WRt)throw new TypeError("pattern is too long")};x3.assertValidPattern=XRt});var uOe=M(D3=>{"use strict";A();Object.defineProperty(D3,"__esModule",{value:!0});D3.parseClass=void 0;var ext={"[: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]},rk=e=>e.replace(/[[\]\\-]/g,"\\$&"),txt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),aOe=e=>e.join(""),nxt=(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,[k,P,j]]of Object.entries(ext))if(e.startsWith(x,i)){if(_)return["$.",!1,e.length-n,!0];i+=x.length,j?o.push(k):r.push(k),u=u||P;continue e}}if(l=!1,_){R>_?r.push(rk(_)+"-"+rk(R)):R===_&&r.push(rk(R)),_="",i++;continue}if(e.startsWith("-]",i+1)){r.push(rk(R+"-")),i+=2;continue}if(e.startsWith("-",i+1)){_=R,i+=2;continue}r.push(rk(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[txt(R),!1,h-n,!1]}let E="["+(f?"^":"")+aOe(r)+"]",T="["+(f?"":"^")+aOe(o)+"]";return[r.length&&o.length?"("+E+"|"+T+")":r.length?E:T,u,h-n,!0]};D3.parseClass=nxt});var w3=M(N3=>{"use strict";A();Object.defineProperty(N3,"__esModule",{value:!0});N3.unescape=void 0;var rxt=(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");N3.unescape=rxt});var zW=M(P3=>{"use strict";A();var Jc;Object.defineProperty(P3,"__esModule",{value:!0});P3.AST=void 0;var oxt=uOe(),B3=w3(),ixt=new Set(["!","?","+","*","@"]),GW=e=>ixt.has(e),cOe=e=>GW(e.type),sxt=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),axt=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),uxt=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),lOe=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),cxt="(?!(?:^|/)\\.\\.?(?:$|/))",k3="(?!\\.)",lxt=new Set(["[","."]),dxt=new Set(["..","."]),pxt=new Set("().*{}+?[]^$\\!"),fxt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),jW="[^/]",dOe=jW+"*?",pOe=jW+"+?",mxt=0,O3=class{type;#n;#r;#o=!1;#e=[];#t;#a;#c;#u=!1;#i;#s;#l=!1;id=++mxt;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 Jc&&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 Jc&&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 Jc(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 k=t.charAt(R++);if(u||k==="\\"){u=!u,x+=k;continue}if(l){R===f+1?(k==="^"||k==="!")&&(h=!0):k==="]"&&!(R===f+2&&h)&&(l=!1),x+=k;continue}else if(k==="["){l=!0,f=R,h=!1,x+=k;continue}if(!o.noext&&GW(k)&&t.charAt(R)==="("&&i<=s){n.push(x),x="";let j=new Jc(k,n);R=Jc.#d(t,j,R,o,i+1),n.push(j);continue}x+=k}return n.push(x),R}let _=r+1,E=new Jc(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&&GW(R)&&t.charAt(_)==="("&&(i<=s||n&&n.#p(R))){let k=n&&n.#p(R)?0:1;E.push(v),v="";let P=new Jc(R,E);E.push(P),_=Jc.#d(t,P,_,o,i+k);continue}if(R==="|"){E.push(v),v="",T.push(E),E=new Jc(null,n);continue}if(R===")")return v===""&&n.#e.length===0&&(n.#l=!0),E.push(v),v="",n.push(...T,E),_;v+=R}return n.type=null,n.#r=void 0,n.#e=[t.substring(r-1)],_}#_(t){return this.#m(t,axt)}#m(t,n=sxt){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=uxt){return!!n.get(this.type)?.includes(t)}#E(t,n){let r=t.#e[0],o=new Jc(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!!lOe.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=lOe.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 Jc(null,void 0,n);return Jc.#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()),!cOe(this)){let l=this.isStart()&&this.isEnd()&&!this.#e.some(T=>typeof T!="string"),f=this.#e.map(T=>{let[v,R,x,k]=typeof T=="string"?Jc.#b(T,this.#r,l):T.toRegExpSource(t);return this.#r=this.#r||x,this.#o=this.#o||k,v}).join(""),h="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&dxt.has(this.#e[0]))){let v=lxt,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?cxt:x?k3:""}let _="";return this.isEnd()&&this.#n.#u&&this.#t?.type==="!"&&(_="(?:$|\\/)"),[h+f+_,(0,B3.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,B3.unescape)(this.toString()),!1,!1]}let s=!r||t||n||!k3?"":this.#g(!0);s===i&&(s=""),s&&(i=`(?:${i})(?:${s})*?`);let u="";if(this.type==="!"&&this.#l)u=(this.isStart()&&!n?k3:"")+pOe;else{let l=this.type==="!"?"))"+(this.isStart()&&!n&&!t?k3:"")+dOe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;u=o+i+l}return[u,(0,B3.unescape)(i),this.#r=!!this.#r,this.#o]}#f(){if(cOe(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+=(pxt.has(f)?"\\":"")+f;continue}if(f==="*"){if(u)continue;u=!0,i+=r&&/^[*]+$/.test(t)?pOe:dOe,n=!0;continue}else u=!1;if(f==="\\"){l===t.length-1?i+="\\\\":o=!0;continue}if(f==="["){let[h,_,E,T]=(0,oxt.parseClass)(t,l);if(E){i+=h,s=s||_,l+=E-1,n=n||T;continue}}if(f==="?"){i+=jW,n=!0;continue}i+=fxt(f)}return[i,(0,B3.unescape)(t),!!n,s]}};P3.AST=O3;Jc=O3});var HW=M(M3=>{"use strict";A();Object.defineProperty(M3,"__esModule",{value:!0});M3.escape=void 0;var Axt=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");M3.escape=Axt});var EOe=M(gt=>{"use strict";A();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 gxt=iOe(),L3=sOe(),AOe=zW(),hxt=HW(),_xt=w3(),Ext=(e,t,n={})=>((0,L3.assertValidPattern)(t),!n.nocomment&&t.charAt(0)==="#"?!1:new JS(t,n).match(e));gt.minimatch=Ext;var yxt=/^\*+([^+@!?\*\[\(]*)$/,Sxt=e=>t=>!t.startsWith(".")&&t.endsWith(e),Txt=e=>t=>t.endsWith(e),bxt=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),Ixt=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),Cxt=/^\*+\.\*+$/,vxt=e=>!e.startsWith(".")&&e.includes("."),Rxt=e=>e!=="."&&e!==".."&&e.includes("."),xxt=/^\.\*+$/,Dxt=e=>e!=="."&&e!==".."&&e.startsWith("."),Nxt=/^\*+$/,wxt=e=>e.length!==0&&!e.startsWith("."),Bxt=e=>e.length!==0&&e!=="."&&e!=="..",kxt=/^\?+([^+@!?\*\[\(]*)?$/,Oxt=([e,t=""])=>{let n=gOe([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},Pxt=([e,t=""])=>{let n=hOe([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},Mxt=([e,t=""])=>{let n=hOe([e]);return t?r=>n(r)&&r.endsWith(t):n},Lxt=([e,t=""])=>{let n=gOe([e]);return t?r=>n(r)&&r.endsWith(t):n},gOe=([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},hOe=([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},_Oe=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",fOe={win32:{sep:"\\"},posix:{sep:"/"}};gt.sep=_Oe==="win32"?fOe.win32.sep:fOe.posix.sep;gt.minimatch.sep=gt.sep;gt.GLOBSTAR=Symbol("globstar **");gt.minimatch.GLOBSTAR=gt.GLOBSTAR;var Uxt="[^/]",Qxt=Uxt+"*?",Fxt="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Gxt="(?:(?!(?:\\/|^)\\.).)*?",jxt=(e,t={})=>n=>(0,gt.minimatch)(n,e,t);gt.filter=jxt;gt.minimatch.filter=gt.filter;var up=(e,t={})=>Object.assign({},e,t),zxt=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,up(e,i)),{Minimatch:class extends t.Minimatch{constructor(o,i={}){super(o,up(e,i))}static defaults(o){return t.defaults(up(e,o)).Minimatch}},AST:class extends t.AST{constructor(o,i,s={}){super(o,i,up(e,s))}static fromGlob(o,i={}){return t.AST.fromGlob(o,up(e,i))}},unescape:(r,o={})=>t.unescape(r,up(e,o)),escape:(r,o={})=>t.escape(r,up(e,o)),filter:(r,o={})=>t.filter(r,up(e,o)),defaults:r=>t.defaults(up(e,r)),makeRe:(r,o={})=>t.makeRe(r,up(e,o)),braceExpand:(r,o={})=>t.braceExpand(r,up(e,o)),match:(r,o,i={})=>t.match(r,o,up(e,i)),sep:t.sep,GLOBSTAR:gt.GLOBSTAR})};gt.defaults=zxt;gt.minimatch.defaults=gt.defaults;var Hxt=(e,t={})=>((0,L3.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,gxt.expand)(e,{max:t.braceExpandMax}));gt.braceExpand=Hxt;gt.minimatch.braceExpand=gt.braceExpand;var $xt=(e,t={})=>new JS(e,t).makeRe();gt.makeRe=$xt;gt.minimatch.makeRe=gt.makeRe;var qxt=(e,t,n={})=>{let r=new JS(t,n);return e=e.filter(o=>r.match(o)),r.options.nonull&&!e.length&&e.push(t),e};gt.match=qxt;gt.minimatch.match=gt.match;var mOe=/[?*]|[+@!]\(.*?\)|\[|\]/,Vxt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),JS=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,n={}){(0,L3.assertValidPattern)(t),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=t,this.platform=n.platform||_Oe,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]==="?"||!mOe.test(i[2]))&&!mOe.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,E=h?3:f?0:void 0;if(typeof _=="number"&&typeof E=="number"){let[T,v]=[t[_],n[E]];T.toLowerCase()===v.toLowerCase()&&(n[E]=T,i=E,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 E=[[[],0]],T=E[0],v=0,R=[0];for(let P of f)P===gt.GLOBSTAR?(R.push(v),T=[[],0],E.push(T)):(T[0].push(P),v++);let x=E.length-1,k=t.length-_;for(let P of E)P[1]=k-(R[x--]+P[0].length);return!!this.#r(t,E,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 E=t[_];if(E==="."||E===".."||!this.options.dot&&E.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 E=t[r];if(E==="."||E===".."||!this.options.dot&&E.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 E;if(typeof h=="string"?(E=_===h,this.debug("string match",h,_,E)):(E=h.test(_),this.debug("pattern match",h,_,E)),!E)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,L3.assertValidPattern)(t);let n=this.options;if(t==="**")return gt.GLOBSTAR;if(t==="")return"";let r,o=null;(r=t.match(Nxt))?o=n.dot?Bxt:wxt:(r=t.match(yxt))?o=(n.nocase?n.dot?Ixt:bxt:n.dot?Txt:Sxt)(r[1]):(r=t.match(kxt))?o=(n.nocase?n.dot?Pxt:Oxt:n.dot?Mxt:Lxt)(r):(r=t.match(Cxt))?o=n.dot?Rxt:vxt:(r=t.match(xxt))&&(o=Dxt);let i=AOe.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?Qxt:n.dot?Fxt:Gxt,o=new Set(n.nocase?["i"]:[]),i=t.map(l=>{let f=l.map(_=>{if(_ instanceof RegExp)for(let E of _.flags.split(""))o.add(E);return typeof _=="string"?Vxt(_):_===gt.GLOBSTAR?gt.GLOBSTAR:_._src});f.forEach((_,E)=>{let T=f[E+1],v=f[E-1];_!==gt.GLOBSTAR||v===gt.GLOBSTAR||(v===void 0?T!==void 0&&T!==gt.GLOBSTAR?f[E+1]="(?:\\/|"+r+"\\/)?"+T:f[E]=r:T===void 0?f[E-1]=v+"(?:\\/|\\/"+r+")?":T!==gt.GLOBSTAR&&(f[E-1]=v+"(?:\\/|\\/"+r+"\\/)"+T,f[E+1]=gt.GLOBSTAR))});let h=f.filter(_=>_!==gt.GLOBSTAR);if(this.partial&&h.length>=1){let _=[];for(let E=1;E<=h.length;E++)_.push(h.slice(0,E).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=JS;var Yxt=zW();Object.defineProperty(gt,"AST",{enumerable:!0,get:function(){return Yxt.AST}});var Kxt=HW();Object.defineProperty(gt,"escape",{enumerable:!0,get:function(){return Kxt.escape}});var Jxt=w3();Object.defineProperty(gt,"unescape",{enumerable:!0,get:function(){return Jxt.unescape}});gt.minimatch.AST=AOe.AST;gt.minimatch.Minimatch=JS;gt.minimatch.escape=hxt.escape;gt.minimatch.unescape=_xt.unescape});var vOe=M((uwn,VW)=>{"use strict";A();var yOe=Ue("node:diagnostics_channel"),{context:U3,trace:$W,SpanStatusCode:Q3,propagation:qW,diag:Zxt}=(He(),Me(tt)),{getRPCMetadata:Wxt,RPCType:Xxt}=Rr(),{ATTR_HTTP_ROUTE:F3,ATTR_HTTP_RESPONSE_STATUS_CODE:SOe,ATTR_HTTP_REQUEST_METHOD:eDt,ATTR_URL_PATH:tDt}=(Xn(),Me(Vr)),{InstrumentationBase:nDt}=Kke(),{version:rDt,name:TOe}=Jke(),oDt=">=4.0.0 <6",bOe=["onRequest","preParsing","preValidation","preHandler","preSerialization","onSend","onResponse","onError"],vo={HOOK_NAME:"hook.name",FASTIFY_TYPE:"fastify.type",HOOK_CALLBACK_NAME:"hook.callback.name",ROOT:"fastify.root"},mE={ROUTE:"route-hook",INSTANCE:"hook",HANDLER:"request-handler"},Vg="anonymous",AE=Symbol("fastify otel instance"),gE=Symbol("fastify otel request spans"),ok=Symbol("fastify otel request context"),IOe=Symbol("fastify otel addhook original"),COe=Symbol("fastify otel setnotfound original"),ik=Symbol("fastify otel ignore path"),sk=Symbol("fastify otel record exceptions"),G3=class extends nDt{logger=null;_requestHook=null;_lifecycleHook=null;constructor(t){if(super(TOe,rDt,t),this.logger=Zxt.createComponentLogger({namespace:TOe}),this[ik]=null,this[sk]=!0,t?.recordExceptions!=null){if(typeof t.recordExceptions!="boolean")throw new TypeError("recordExceptions must be a boolean");this[sk]=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[ik]=o=>typeof n=="function"?n(o):(r==null&&(r=EOe().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)},yOe.subscribe("fastify.initialization",this._handleInitialization)),super.enable()}disable(){return this._handleInitialization&&(yOe.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:oDt,name:"@fastify/otel"},n;function n(r,o,i){r.decorate(AE,t),r.decorate(IOe,r.addHook),r.decorate(COe,r.setNotFoundHandler),r.decorateRequest("opentelemetry",function(){let T=this[ok],v=this[gE];return{enabled:this.routeOptions.config?.otel!==!1,span:v,tracer:t.tracer,context:T,inject:(R,x)=>qW.inject(T,R,x),extract:(R,x)=>qW.extract(T,R,x)}}),r.decorateRequest(gE,null),r.decorateRequest(ok,null),r.addHook("onRoute",function(T){if(t[ik]?.(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 bOe)if(T[v]!=null){let R=T[v];if(typeof R=="function")T[v]=_(R,v,{[vo.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[vo.FASTIFY_TYPE]:mE.ROUTE,[F3]:T.url,[vo.HOOK_CALLBACK_NAME]:R.name?.length>0?R.name:Vg});else if(Array.isArray(R)){let x=[];for(let k of R)x.push(_(k,v,{[vo.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[vo.FASTIFY_TYPE]:mE.ROUTE,[F3]:T.url,[vo.HOOK_CALLBACK_NAME]:k.name?.length>0?k.name:Vg}));T[v]=x}}T.onSend!=null?T.onSend=Array.isArray(T.onSend)?[...T.onSend,s]:[T.onSend,s]:T.onSend=s,T.onError!=null?T.onError=Array.isArray(T.onError)?[...T.onError,u]:[T.onError,u]:T.onError=u,T.handler=_(T.handler,"handler",{[vo.HOOK_NAME]:`${this.pluginName} - route-handler`,[vo.FASTIFY_TYPE]:mE.HANDLER,[F3]:T.url,[vo.HOOK_CALLBACK_NAME]:T.handler.name.length>0?T.handler.name:Vg})}),r.addHook("onRequest",function(T,v,R){if(this[AE].isEnabled()===!1||T.routeOptions.config?.otel===!1)return R();if(this[AE][ik]?.({url:T.url,method:T.method})===!0)return this[AE].logger.debug(`Ignoring request ${T.method} ${T.url} because it matches the ignore path`),R();let x=U3.active();$W.getSpan(x)==null&&(x=qW.extract(x,T.headers));let k=Wxt(x);T.routeOptions.url!=null&&k?.type===Xxt.HTTP&&(k.route=T.routeOptions.url);let P={[vo.ROOT]:"@fastify/otel",[eDt]:T.method,[tDt]:T.url};T.routeOptions.url!=null&&(P[F3]=T.routeOptions.url);let j=this[AE].tracer.startSpan("request",{attributes:P},x);try{this[AE]._requestHook?.(j,T)}catch(G){this[AE].logger.error({err:G},"requestHook threw")}T[ok]=$W.setSpan(x,j),T[gE]=j,U3.with(T[ok],()=>{R()})}),r.addHook("onResponse",function(T,v,R){let x=T[gE];x!=null&&(x.setAttributes({[SOe]:v.statusCode}),x.end()),T[gE]=null,R()}),r.addHook=l,r.setNotFoundHandler=f,i();function s(E,T,v,R){let x=E[gE];x!=null&&(T.statusCode>=500&&x.setStatus({code:Q3.ERROR}),x.setAttributes({[SOe]:T.statusCode}),x.end()),E[gE]=null,R(null,v)}function u(E,T,v,R){let x=E[gE];x!=null&&(x.setStatus({code:Q3.ERROR,message:v.message}),t[sk]!==!1&&x.recordException(v)),R()}function l(E,T){let v=this[IOe];return bOe.includes(E)?v.call(this,E,_(T,E,{[vo.HOOK_NAME]:`${this.pluginName} - ${E}`,[vo.FASTIFY_TYPE]:mE.INSTANCE,[vo.HOOK_CALLBACK_NAME]:T.name?.length>0?T.name:Vg})):v.call(this,E,T)}function f(E,T){let v=this[COe];typeof E=="function"?(T=_(E,"notFoundHandler",{[vo.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[vo.FASTIFY_TYPE]:mE.INSTANCE,[vo.HOOK_CALLBACK_NAME]:E.name?.length>0?E.name:Vg}),v.call(this,T)):(E.preValidation!=null&&(E.preValidation=_(E.preValidation,"notFoundHandler - preValidation",{[vo.HOOK_NAME]:`${this.pluginName} - not-found-handler - preValidation`,[vo.FASTIFY_TYPE]:mE.INSTANCE,[vo.HOOK_CALLBACK_NAME]:E.preValidation.name?.length>0?E.preValidation.name:Vg})),E.preHandler!=null&&(E.preHandler=_(E.preHandler,"notFoundHandler - preHandler",{[vo.HOOK_NAME]:`${this.pluginName} - not-found-handler - preHandler`,[vo.FASTIFY_TYPE]:mE.INSTANCE,[vo.HOOK_CALLBACK_NAME]:E.preHandler.name?.length>0?E.preHandler.name:Vg})),T=_(T,"notFoundHandler",{[vo.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[vo.FASTIFY_TYPE]:mE.INSTANCE,[vo.HOOK_CALLBACK_NAME]:T.name?.length>0?T.name:Vg}),v.call(this,E,T))}function h(E){for(let T of E)if(T?.routeOptions&&T.url&&T.method)return T;return null}function _(E,T,v={}){return function(...x){let k=this[AE],P=h(x);if(P===null)return k.logger.debug(`Ignoring route instrumentation because ${T} was called without a Fastify request argument`),E.call(this,...x);if(k.isEnabled()===!1||P.routeOptions.config?.otel===!1)return k.logger.debug(`Ignoring route instrumentation ${P.routeOptions.method} ${P.routeOptions.url} because it is disabled`),E.call(this,...x);if(k[ik]?.({url:P.url,method:P.method})===!0)return k.logger.debug(`Ignoring route instrumentation ${P.routeOptions.method} ${P.routeOptions.url} because it matches the ignore path`),E.call(this,...x);let j=P[ok]??U3.active(),G=E.name?.length>0?E.name:this.pluginName??Vg,$=k.tracer.startSpan(`${T} - ${G}`,{attributes:v},j);if(k._lifecycleHook!=null)try{k._lifecycleHook($,{hookName:T,request:P,handler:G})}catch(V){k.logger.error({err:V},"Execution of lifecycleHook failed")}return U3.with($W.setSpan(j,$),function(){try{let V=E.call(this,...x);return typeof V?.then=="function"?V.then(ae=>($.end(),ae),ae=>($.setStatus({code:Q3.ERROR,message:ae.message}),k[sk]!==!1&&$.recordException(ae),$.end(),Promise.reject(ae))):($.end(),V)}catch(V){throw $.setStatus({code:Q3.ERROR,message:V.message}),k[sk]!==!1&&$.recordException(V),$.end(),V}},this)}}}}};VW.exports=G3;VW.exports.FastifyOtelInstrumentation=G3});var Yg,ak,uk,ROe=B(()=>{A();(function(e){let t="fastify.name";e.FASTIFY_NAME=t;let n="fastify.type";e.FASTIFY_TYPE=n;let r="hook.name";e.HOOK_NAME=r;let o="plugin.name";e.PLUGIN_NAME=o})(Yg||(Yg={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request_handler";e.REQUEST_HANDLER=n})(ak||(ak={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request handler";e.REQUEST_HANDLER=n})(uk||(uk={}))});var ck,xOe=B(()=>{A();ck=Symbol("opentelemetry.instrumentation.fastify.request_active_span")});function YW(e,t,n,r={}){let o=t.startSpan(n,{attributes:r}),i=e[ck]||[];return i.push(o),Object.defineProperty(e,ck,{enumerable:!1,configurable:!0,value:i}),o}function j3(e,t){let n=e[ck]||[];n.length&&(n.forEach(r=>{t&&(r.setStatus({code:gi.ERROR,message:t.message}),r.recordException(t)),r.end()}),delete e[ck])}function NOe(e,t,n){let r,o;try{o=e(),DOe(o)&&o.then(i=>t(void 0,i),i=>t(i))}catch(i){r=i}finally{if(!DOe(o)&&(t(r,o),r))throw r;return o}}function DOe(e){return typeof e=="object"&&e&&typeof Object.getOwnPropertyDescriptor(e,"then")?.value=="function"||!1}var wOe=B(()=>{A();He();xOe()});function uDt(){let e=Et();e&&e.on("spanStart",t=>{kOe(t)})}function kOe(e){let t=Pt(e).data,n=t["fastify.type"];if(t[rn]||!n)return;e.setAttributes({[Lt]:"auto.http.otel.fastify",[rn]:`${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 H3,ZS,iDt,sDt,BOe,aDt,z3,OOe=B(()=>{A();He();H3=ue(Rr(),1),ZS=ue(cn(),1);Xn();mt();ROe();wOe();iDt="0.1.0",sDt="@sentry/instrumentation-fastify-v3",BOe="anonymous",aDt=new Set(["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError"]),z3=class extends ZS.InstrumentationBase{constructor(t={}){super(sDt,iDt,t)}init(){return[new ZS.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,H3.getRPCMetadata)(We.active()),l=s.routeOptions?s.routeOptions.url:r.routerPath;l&&u?.type===H3.RPCType.HTTP&&(u.route=l);let f=r.method||"GET";xn().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||BOe,l=`${uk.MIDDLEWARE} - ${u}`,f=s[1],h=YW(f,i.tracer,l,{[Yg.FASTIFY_TYPE]:ak.MIDDLEWARE,[Yg.PLUGIN_NAME]:t,[Yg.HOOK_NAME]:n}),_=o&&s[s.length-1];return _&&(s[s.length-1]=function(...E){j3(f),_.apply(this,E)}),We.with(Jt.setSpan(We.active(),h),()=>NOe(()=>r.apply(this,s),E=>{E instanceof Error&&(h.setStatus({code:gi.ERROR,message:E.message}),h.recordException(E)),o||j3(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(!aDt.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()),uDt(),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,ZS.safeExecuteInTheMiddle)(()=>r.apply(this,i),u=>{!u&&s instanceof Error&&(u=s),j3(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=`${uk.REQUEST_HANDLER} - ${l||this.pluginName||BOe}`,h={[Yg.PLUGIN_NAME]:this.pluginName,[Yg.FASTIFY_TYPE]:ak.REQUEST_HANDLER,[LV]:s.routeOptions?s.routeOptions.url:r.routerPath};l&&(h[Yg.FASTIFY_NAME]=l);let _=YW(o,t.tracer,f,h);kOe(_);let{requestHook:E}=t.getConfig();return E&&(0,ZS.safeExecuteInTheMiddle)(()=>E(_,{request:r}),T=>{T&&t._diag.error("request hook failed",T)},!0),We.with(Jt.setSpan(We.active(),_),()=>{i()})}}}});import*as KW from"node:diagnostics_channel";function cDt(){let e=Et();if(e)return e.getIntegrationByName($3)}function POe(e,t,n,r){let o=cDt()?.getShouldHandleError()||FOe;if(r==="diagnostics-channel"&&(this.diagnosticsChannelExists=!0),this.diagnosticsChannelExists&&r==="onError-hook"){ws&&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)&&an(e,{mechanism:{handled:!1,type:"auto.function.fastify"}})}function FOe(e,t,n){let r=n.statusCode;return r>=500||r<=299}function GOe(e){let t=Pt(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[rn]||!s&&!u&&!i)return;let l=i?"hook":s?"middleware":u?"request_handler":"<unknown>";e.setAttributes({[Lt]:"auto.http.otel.fastify",[rn]:`${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 dDt(){let e=Et();e&&e.on("spanStart",t=>{GOe(t)})}function pDt(e){e.addHook("onRequest",async(t,n)=>{if(t.opentelemetry){let{span:i}=t.opentelemetry();i&&GOe(i)}let r=t.routeOptions?.url,o=t.method||"GET";xn().setTransactionName(`${o} ${r}`)})}var MOe,$3,LOe,UOe,lDt,QOe,jOe=B(()=>{A();MOe=ue(vOe(),1);mt();_r();VS();OOe();$3="Fastify",LOe=ct(`${$3}.v3`,()=>new z3);UOe=ct(`${$3}.v5`,()=>{let e=new MOe.FastifyOtelInstrumentation,t=e.plugin();return KW.subscribe("fastify.initialization",n=>{let r=n.fastify;r?.register(t).after(o=>{o?ws&&W.error("Failed to setup Fastify instrumentation",o):(dDt(),r&&pDt(r))})}),KW.subscribe("tracing:fastify.request.handler:error",n=>{let{error:r,request:o,reply:i}=n;POe.call(POe,r,o,i,"diagnostics-channel")}),e}),lDt=(({shouldHandleError:e})=>{let t;return{name:$3,setupOnce(){t=e||FOe,LOe(),UOe()},getShouldHandleError(){return t},setShouldHandleError(n){t=n}}}),QOe=(e={})=>lDt(e)});var JW=M(xf=>{"use strict";A();Object.defineProperty(xf,"__esModule",{value:!0});xf.SpanNames=xf.TokenKind=xf.AllowedOperationTypes=void 0;var fDt;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(fDt=xf.AllowedOperationTypes||(xf.AllowedOperationTypes={}));var mDt;(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"})(mDt=xf.TokenKind||(xf.TokenKind={}));var ADt;(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"})(ADt=xf.SpanNames||(xf.SpanNames={}))});var ZW=M(lk=>{"use strict";A();Object.defineProperty(lk,"__esModule",{value:!0});lk.AttributeNames=void 0;var gDt;(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"})(gDt=lk.AttributeNames||(lk.AttributeNames={}))});var q3=M(AR=>{"use strict";A();Object.defineProperty(AR,"__esModule",{value:!0});AR.OTEL_GRAPHQL_DATA_SYMBOL=AR.OTEL_PATCHED_SYMBOL=void 0;AR.OTEL_PATCHED_SYMBOL=Symbol.for("opentelemetry.patched");AR.OTEL_GRAPHQL_DATA_SYMBOL=Symbol.for("opentelemetry.graphql_data")});var zOe=M(V3=>{"use strict";A();Object.defineProperty(V3,"__esModule",{value:!0});V3.OPERATION_NOT_SUPPORTED=void 0;var Lwn=q3();V3.OPERATION_NOT_SUPPORTED="Operation$operationName$not supported"});var rPe=M(Bs=>{"use strict";A();Object.defineProperty(Bs,"__esModule",{value:!0});Bs.wrapFieldResolver=Bs.wrapFields=Bs.getSourceFromLocation=Bs.getOperation=Bs.endSpan=Bs.addSpanSource=Bs.addInputVariableAttributes=Bs.isPromise=void 0;var gR=(He(),Me(tt)),hE=JW(),WS=ZW(),Kg=q3(),HOe=Object.values(hE.AllowedOperationTypes),hDt=e=>typeof e?.then=="function";Bs.isPromise=hDt;var _Dt=e=>typeof e=="object"&&e!==null;function WW(e,t,n){Array.isArray(n)?n.forEach((r,o)=>{WW(e,`${t}.${o}`,r)}):n instanceof Object?Object.entries(n).forEach(([r,o])=>{WW(e,`${t}.${r}`,o)}):e.setAttribute(`${WS.AttributeNames.VARIABLES}${String(t)}`,n)}function EDt(e,t){Object.entries(t).forEach(([n,r])=>{WW(e,n,r)})}Bs.addInputVariableAttributes=EDt;function YOe(e,t,n,r,o){let i=XOe(t,n,r,o);e.setAttribute(WS.AttributeNames.SOURCE,i)}Bs.addSpanSource=YOe;function yDt(e,t,n,r,o){let i=KOe(n,o);if(i)return{field:i,spanAdded:!1};let u=t().flatResolveSpans?ZOe(n):JOe(n,o);return i={span:SDt(e,t,n,r,o,u)},IDt(n,o,i),{field:i,spanAdded:!0}}function SDt(e,t,n,r,o,i){let s={[WS.AttributeNames.FIELD_NAME]:r.fieldName,[WS.AttributeNames.FIELD_PATH]:o.join("."),[WS.AttributeNames.FIELD_TYPE]:r.returnType.toString(),[WS.AttributeNames.PARENT_NAME]:r.parentType.name},u=e.startSpan(`${hE.SpanNames.RESOLVE} ${s[WS.AttributeNames.FIELD_PATH]}`,{attributes:s},i?gR.trace.setSpan(gR.context.active(),i):void 0),l=n[Kg.OTEL_GRAPHQL_DATA_SYMBOL].source,f=r.fieldNodes.find(h=>h.kind==="Field");return f&&YOe(u,l.loc,t().allowValues,f.loc?.start,f.loc?.end),u}function TDt(e,t){t&&e.recordException(t),e.end()}Bs.endSpan=TDt;function bDt(e,t){if(!(!e||!Array.isArray(e.definitions)))return t?e.definitions.filter(n=>HOe.indexOf(n?.operation)!==-1).find(n=>t===n?.name?.value):e.definitions.find(n=>HOe.indexOf(n?.operation)!==-1)}Bs.getOperation=bDt;function IDt(e,t,n){return e[Kg.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]=n}function KOe(e,t){return e[Kg.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]}function JOe(e,t){for(let n=t.length-1;n>0;n--){let r=KOe(e,t.slice(0,n));if(r)return r.span}return ZOe(e)}function ZOe(e){return e[Kg.OTEL_GRAPHQL_DATA_SYMBOL].span}function CDt(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 vDt(e){return WOe(`
|
|
37
37
|
`,e)}function $Oe(e){return WOe(" ",e)}function WOe(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}var RDt=[hE.TokenKind.FLOAT,hE.TokenKind.STRING,hE.TokenKind.INT,hE.TokenKind.BLOCK_STRING];function XOe(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&&RDt.indexOf(u.kind)>=0&&(f="*"),u.kind===hE.TokenKind.STRING&&(f=`"${f}"`),u.kind===hE.TokenKind.EOF&&(f=""),u.line>l?(o+=vDt(u.line-l),l=u.line,h=$Oe(u.column-1)):u.line===u.prev?.line&&(h=$Oe(u.start-(u.prev?.end||0))),o+=h+f,u&&(u=u.next)}}return o}Bs.getSourceFromLocation=XOe;function ePe(e,t,n){if(!e||e[Kg.OTEL_PATCHED_SYMBOL])return;let r=e.getFields();e[Kg.OTEL_PATCHED_SYMBOL]=!0,Object.keys(r).forEach(o=>{let i=r[o];if(i&&(i.resolve&&(i.resolve=nPe(t,n,i.resolve)),i.type)){let s=tPe(i.type);for(let u of s)ePe(u,t,n)}})}Bs.wrapFields=ePe;function tPe(e){return"ofType"in e?tPe(e.ofType):xDt(e)?e.getTypes():DDt(e)?[e]:[]}function xDt(e){return"getTypes"in e&&typeof e.getTypes=="function"}function DDt(e){return"getFields"in e&&typeof e.getFields=="function"}var qOe=(e,t,n)=>{n&&(e.recordException(t),e.setStatus({code:gR.SpanStatusCode.ERROR,message:t.message}),e.end())},VOe=(e,t)=>{t&&e.end()};function nPe(e,t,n,r=!1){if(o[Kg.OTEL_PATCHED_SYMBOL]||typeof n!="function")return n;function o(i,s,u,l){if(!n)return;let f=t();if(f.ignoreTrivialResolveSpans&&r&&(_Dt(i)||typeof i=="function")&&typeof i[l.fieldName]!="function")return n.call(this,i,s,u,l);if(!u[Kg.OTEL_GRAPHQL_DATA_SYMBOL])return n.call(this,i,s,u,l);let h=CDt(f.mergeItems,l&&l.path),_=h.filter(v=>typeof v=="string").length,E,T=!1;if(f.depth>=0&&f.depth<_)E=JOe(u,h);else{let{field:v,spanAdded:R}=yDt(e,t,u,l,h);E=v.span,T=R}return gR.context.with(gR.trace.setSpan(gR.context.active(),E),()=>{try{let v=n.call(this,i,s,u,l);return(0,Bs.isPromise)(v)?v.then(R=>(VOe(E,T),R),R=>{throw qOe(E,R,T),R}):(VOe(E,T),v)}catch(v){throw qOe(E,v,T),v}})}return o[Kg.OTEL_PATCHED_SYMBOL]=!0,o}Bs.wrapFieldResolver=nPe});var oPe=M(hR=>{"use strict";A();Object.defineProperty(hR,"__esModule",{value:!0});hR.PACKAGE_NAME=hR.PACKAGE_VERSION=void 0;hR.PACKAGE_VERSION="0.62.0";hR.PACKAGE_NAME="@opentelemetry/instrumentation-graphql"});var aPe=M(J3=>{"use strict";A();Object.defineProperty(J3,"__esModule",{value:!0});J3.GraphQLInstrumentation=void 0;var Jg=(He(),Me(tt)),cp=cn(),dk=JW(),Y3=ZW(),XW=q3(),NDt=zOe(),fu=rPe(),iPe=oPe(),sPe={mergeItems:!1,depth:-1,allowValues:!1,ignoreResolveSpans:!1},K3=[">=14.0.0 <17"],eX=class extends cp.InstrumentationBase{constructor(t={}){super(iPe.PACKAGE_NAME,iPe.PACKAGE_VERSION,{...sPe,...t})}setConfig(t={}){super.setConfig({...sPe,...t})}init(){let t=new cp.InstrumentationNodeModuleDefinition("graphql",K3);return t.files.push(this._addPatchingExecute()),t.files.push(this._addPatchingParser()),t.files.push(this._addPatchingValidate()),t}_addPatchingExecute(){return new cp.InstrumentationNodeModuleFile("graphql/execution/execute.js",K3,t=>((0,cp.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 cp.InstrumentationNodeModuleFile("graphql/language/parser.js",K3,t=>((0,cp.isWrapped)(t.parse)&&this._unwrap(t,"parse"),this._wrap(t,"parse",this._patchParse()),t),t=>{t&&this._unwrap(t,"parse")})}_addPatchingValidate(){return new cp.InstrumentationNodeModuleFile("graphql/validation/validate.js",K3,t=>((0,cp.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,fu.getOperation)(s.document,s.operationName),l=n._createExecuteSpan(u,s);return s.contextValue[XW.OTEL_GRAPHQL_DATA_SYMBOL]={source:s.document?s.document||s.document[XW.OTEL_GRAPHQL_DATA_SYMBOL]:void 0,span:l,fields:{}},Jg.context.with(Jg.trace.setSpan(Jg.context.active(),l),()=>(0,cp.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,fu.endSpan)(t,n);return}if((0,fu.isPromise)(r))r.then(i=>{if(typeof o.responseHook!="function"){(0,fu.endSpan)(t);return}this._executeResponseHook(t,i)},i=>{(0,fu.endSpan)(t,i)});else{if(typeof o.responseHook!="function"){(0,fu.endSpan)(t);return}this._executeResponseHook(t,r)}}_executeResponseHook(t,n){let{responseHook:r}=this.getConfig();r&&(0,cp.safeExecuteInTheMiddle)(()=>{r(t,n)},o=>{o&&this._diag.error("Error running response hook",o),(0,fu.endSpan)(t,void 0)},!0)}_patchParse(){let t=this;return function(r){return function(i,s){return t._parse(this,r,i,s)}}}_patchValidate(){let t=this;return function(r){return function(i,s,u,l,f){return t._validate(this,r,i,s,u,f,l)}}}_parse(t,n,r,o){let i=this.getConfig(),s=this.tracer.startSpan(dk.SpanNames.PARSE);return Jg.context.with(Jg.trace.setSpan(Jg.context.active(),s),()=>(0,cp.safeExecuteInTheMiddle)(()=>n.call(t,r,o),(u,l)=>{l&&((0,fu.getOperation)(l)?l.loc&&(0,fu.addSpanSource)(s,l.loc,i.allowValues):s.updateName(dk.SpanNames.SCHEMA_PARSE)),(0,fu.endSpan)(s,u)}))}_validate(t,n,r,o,i,s,u){let l=this.tracer.startSpan(dk.SpanNames.VALIDATE,{});return Jg.context.with(Jg.trace.setSpan(Jg.context.active(),l),()=>(0,cp.safeExecuteInTheMiddle)(()=>n.call(t,r,o,i,u,s),(f,h)=>{o.loc||l.updateName(dk.SpanNames.SCHEMA_VALIDATE),h&&h.length&&l.recordException({name:Y3.AttributeNames.ERROR_VALIDATION_NAME,message:JSON.stringify(h)}),(0,fu.endSpan)(l,f)}))}_createExecuteSpan(t,n){let r=this.getConfig(),o=this.tracer.startSpan(dk.SpanNames.EXECUTE,{});if(t){let{operation:i,name:s}=t;o.setAttribute(Y3.AttributeNames.OPERATION_TYPE,i);let u=s?.value;u?(o.setAttribute(Y3.AttributeNames.OPERATION_NAME,u),o.updateName(`${i} ${u}`)):o.updateName(i)}else{let i=" ";n.operationName&&(i=` "${n.operationName}" `),i=NDt.OPERATION_NOT_SUPPORTED.replace("$operationName$",i),o.setAttribute(Y3.AttributeNames.OPERATION_NAME,i)}return n.document?.loc&&(0,fu.addSpanSource)(o,n.document.loc,r.allowValues),n.variableValues&&r.allowValues&&(0,fu.addInputVariableAttributes)(o,n.variableValues),o}_wrapExecuteArgs(t,n,r,o,i,s,u,l,f){if(o||(o={}),o[XW.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,fu.wrapFieldResolver)(this.tracer,()=>this.getConfig(),_,h),t&&((0,fu.wrapFields)(t.getQueryType(),this.tracer,()=>this.getConfig()),(0,fu.wrapFields)(t.getMutationType(),this.tracer,()=>this.getConfig())),{schema:t,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:s,fieldResolver:u,typeResolver:l}}};J3.GraphQLInstrumentation=eX});var uPe=M(Z3=>{"use strict";A();Object.defineProperty(Z3,"__esModule",{value:!0});Z3.GraphQLInstrumentation=void 0;var wDt=aPe();Object.defineProperty(Z3,"GraphQLInstrumentation",{enumerable:!0,get:function(){return wDt.GraphQLInstrumentation}})});function fPe(e){return{ignoreResolveSpans:!0,ignoreTrivialResolveSpans:!0,useOperationNameForRootSpan:!0,...e}}function kDt(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 cPe,lPe,dPe,BDt,pPe,mPe=B(()=>{A();He();cPe=ue(uPe(),1);mt();_r();tR();lPe="Graphql",dPe=ct(lPe,cPe.GraphQLInstrumentation,e=>{let t=fPe(e);return{...t,responseHook(n,r){Kr(n,"auto.graphql.otel.graphql"),r.errors?.length&&!Pt(n).status&&n.setStatus({code:gi.ERROR});let i=Pt(n).data,s=i["graphql.operation.type"],u=i["graphql.operation.name"];if(t.useOperationNameForRootSpan&&s){let l=hi(n),h=Pt(l).data[Xv]||[],_=u?`${s} ${u}`:`${s}`;Array.isArray(h)?(h.push(_),l.setAttribute(Xv,h)):typeof h=="string"?l.setAttribute(Xv,[h,_]):l.setAttribute(Xv,_),Pt(l).data["original-description"]||l.setAttribute("original-description",Pt(l).description),l.updateName(`${Pt(l).data["original-description"]} (${kDt(h)})`)}}}}),BDt=((e={})=>({name:lPe,setupOnce(){dPe(fPe(e))}})),pPe=BDt});var APe=M(W3=>{"use strict";A();Object.defineProperty(W3,"__esModule",{value:!0});W3.EVENT_LISTENERS_SET=void 0;W3.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.kafkajs.eventListenersSet")});var gPe=M(X3=>{"use strict";A();Object.defineProperty(X3,"__esModule",{value:!0});X3.bufferTextMapGetter=void 0;X3.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 hPe=M(or=>{"use strict";A();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 _Pe=M(_R=>{"use strict";A();Object.defineProperty(_R,"__esModule",{value:!0});_R.PACKAGE_NAME=_R.PACKAGE_VERSION=void 0;_R.PACKAGE_VERSION="0.23.0";_R.PACKAGE_NAME="@opentelemetry/instrumentation-kafkajs"});var IPe=M(t6=>{"use strict";A();Object.defineProperty(t6,"__esModule",{value:!0});t6.KafkaJsInstrumentation=void 0;var Jr=(He(),Me(tt)),lp=cn(),ER=(Xn(),Me(Vr)),EPe=APe(),yPe=gPe(),ht=hPe(),SPe=_Pe();function e6(e,t,n){return r=>{e.add(t,{...n,...r?{[ER.ATTR_ERROR_TYPE]:r}:{}})}}function TPe(e,t,n){return r=>{e.record((Date.now()-t)/1e3,{...n,...r?{[ER.ATTR_ERROR_TYPE]:r}:{}})}}var bPe=[.005,.01,.025,.05,.075,.1,.25,.5,.75,1,2.5,5,7.5,10],tX=class extends lp.InstrumentationBase{constructor(t={}){super(SPe.PACKAGE_NAME,SPe.PACKAGE_VERSION,t)}_updateMetricInstruments(){this._clientDuration=this.meter.createHistogram(ht.METRIC_MESSAGING_CLIENT_OPERATION_DURATION,{advice:{explicitBucketBoundaries:bPe}}),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:bPe}})}init(){let t=r=>{(0,lp.isWrapped)(r?.Kafka?.prototype.producer)&&this._unwrap(r.Kafka.prototype,"producer"),(0,lp.isWrapped)(r?.Kafka?.prototype.consumer)&&this._unwrap(r.Kafka.prototype,"consumer")};return new lp.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,lp.isWrapped)(i.run)&&t._unwrap(i,"run"),t._wrap(i,"run",t._getConsumerRunPatch()),t._setKafkaEventListeners(i),i}}_setKafkaEventListeners(t){t[EPe.EVENT_LISTENERS_SET]||(t.events?.REQUEST&&t.on(t.events.REQUEST,this._recordClientDurationMetric.bind(this)),t[EPe.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}`,[ER.ATTR_SERVER_ADDRESS]:n,[ER.ATTR_SERVER_PORT]:Number.parseInt(r,10)})}_getProducerPatch(){let t=this;return n=>function(...o){let i=n.apply(this,o);return(0,lp.isWrapped)(i.sendBatch)&&t._unwrap(i,"sendBatch"),t._wrap(i,"sendBatch",t._getSendBatchPatch()),(0,lp.isWrapped)(i.send)&&t._unwrap(i,"send"),t._wrap(i,"send",t._getSendPatch()),(0,lp.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,lp.isWrapped)(i.eachMessage)&&t._unwrap(i,"eachMessage"),t._wrap(i,"eachMessage",t._getConsumerEachMessagePatch())),i?.eachBatch&&((0,lp.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=Jr.propagation.extract(Jr.ROOT_CONTEXT,i.message.headers,yPe.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=[TPe(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)}),e6(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=Jr.context.with(Jr.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:Jr.ROOT_CONTEXT,attributes:{[ht.ATTR_MESSAGING_BATCH_MESSAGE_COUNT]:i.batch.messages.length,[ht.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}});return Jr.context.with(Jr.trace.setSpan(Jr.context.active(),s),()=>{let u=Date.now(),l=[],f=[e6(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 E=Jr.propagation.extract(Jr.ROOT_CONTEXT,_.headers,yPe.bufferTextMapGetter),T=Jr.trace.getSpan(E)?.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(TPe(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 Jr.context.with(Jr.trace.setSpan(Jr.context.active(),i),()=>t._getSendPatch()(l).apply(this,T).catch(R=>{throw i.setStatus({code:Jr.SpanStatusCode.ERROR,message:R?.message}),i.recordException(R),R}))};let f=u.sendBatch;u.sendBatch=function(...T){return Jr.context.with(Jr.trace.setSpan(Jr.context.active(),i),()=>t._getSendBatchPatch()(f).apply(this,T).catch(R=>{throw i.setStatus({code:Jr.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:Jr.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:Jr.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(e6(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=>e6(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=ER.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(ER.ATTR_ERROR_TYPE,s),u.setStatus({code:Jr.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?Jr.SpanKind.CLIENT:Jr.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,lp.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:Jr.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??{},Jr.propagation.inject(Jr.trace.setSpan(Jr.context.active(),r),n.headers);let{producerHook:o}=this.getConfig();return o&&(0,lp.safeExecuteInTheMiddle)(()=>o(r,{topic:t,message:n}),i=>{i&&this._diag.error("producerHook error",i)},!0),r}};t6.KafkaJsInstrumentation=tX});var CPe=M(n6=>{"use strict";A();Object.defineProperty(n6,"__esModule",{value:!0});n6.KafkaJsInstrumentation=void 0;var ODt=IPe();Object.defineProperty(n6,"KafkaJsInstrumentation",{enumerable:!0,get:function(){return ODt.KafkaJsInstrumentation}})});var vPe,RPe,xPe,PDt,DPe,NPe=B(()=>{A();vPe=ue(CPe(),1);_r();RPe="Kafka",xPe=ct(RPe,()=>new vPe.KafkaJsInstrumentation({consumerHook(e){Kr(e,"auto.kafkajs.otel.consumer")},producerHook(e){Kr(e,"auto.kafkajs.otel.producer")}})),PDt=(()=>({name:RPe,setupOnce(){xPe()}})),DPe=PDt});var wPe=M(yR=>{"use strict";A();Object.defineProperty(yR,"__esModule",{value:!0});yR.PACKAGE_NAME=yR.PACKAGE_VERSION=void 0;yR.PACKAGE_VERSION="0.58.0";yR.PACKAGE_NAME="@opentelemetry/instrumentation-lru-memoizer"});var PPe=M(r6=>{"use strict";A();Object.defineProperty(r6,"__esModule",{value:!0});r6.LruMemoizerInstrumentation=void 0;var BPe=(He(),Me(tt)),kPe=cn(),OPe=wPe(),nX=class extends kPe.InstrumentationBase{constructor(t={}){super(OPe.PACKAGE_NAME,OPe.PACKAGE_VERSION,t)}init(){return[new kPe.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"?BPe.context.bind(BPe.context.active(),i):i;return o.push(s),r.apply(this,o)}};return n.sync=t.sync,n},void 0)]}};r6.LruMemoizerInstrumentation=nX});var MPe=M(o6=>{"use strict";A();Object.defineProperty(o6,"__esModule",{value:!0});o6.LruMemoizerInstrumentation=void 0;var MDt=PPe();Object.defineProperty(o6,"LruMemoizerInstrumentation",{enumerable:!0,get:function(){return MDt.LruMemoizerInstrumentation}})});var LPe,UPe,QPe,LDt,FPe,GPe=B(()=>{A();LPe=ue(MPe(),1);_r();UPe="LruMemoizer",QPe=ct(UPe,()=>new LPe.LruMemoizerInstrumentation),LDt=(()=>({name:UPe,setupOnce(){QPe()}})),FPe=LDt});var jPe=M(Uo=>{"use strict";A();Object.defineProperty(Uo,"__esModule",{value:!0});Uo.METRIC_DB_CLIENT_CONNECTIONS_USAGE=Uo.DB_SYSTEM_VALUE_MONGODB=Uo.DB_SYSTEM_NAME_VALUE_MONGODB=Uo.ATTR_NET_PEER_PORT=Uo.ATTR_NET_PEER_NAME=Uo.ATTR_DB_SYSTEM=Uo.ATTR_DB_STATEMENT=Uo.ATTR_DB_OPERATION=Uo.ATTR_DB_NAME=Uo.ATTR_DB_MONGODB_COLLECTION=Uo.ATTR_DB_CONNECTION_STRING=void 0;Uo.ATTR_DB_CONNECTION_STRING="db.connection_string";Uo.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";Uo.ATTR_DB_NAME="db.name";Uo.ATTR_DB_OPERATION="db.operation";Uo.ATTR_DB_STATEMENT="db.statement";Uo.ATTR_DB_SYSTEM="db.system";Uo.ATTR_NET_PEER_NAME="net.peer.name";Uo.ATTR_NET_PEER_PORT="net.peer.port";Uo.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb";Uo.DB_SYSTEM_VALUE_MONGODB="mongodb";Uo.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var zPe=M(pk=>{"use strict";A();Object.defineProperty(pk,"__esModule",{value:!0});pk.MongodbCommandType=void 0;var UDt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.AGGREGATE="aggregate",e.UNKNOWN="unknown"})(UDt=pk.MongodbCommandType||(pk.MongodbCommandType={}))});var HPe=M(SR=>{"use strict";A();Object.defineProperty(SR,"__esModule",{value:!0});SR.PACKAGE_NAME=SR.PACKAGE_VERSION=void 0;SR.PACKAGE_VERSION="0.67.0";SR.PACKAGE_NAME="@opentelemetry/instrumentation-mongodb"});var VPe=M(i6=>{"use strict";A();Object.defineProperty(i6,"__esModule",{value:!0});i6.MongoDBInstrumentation=void 0;var ni=(He(),Me(tt)),ir=cn(),Zg=(Xn(),Me(Vr)),nd=jPe(),XS=zPe(),$Pe=HPe(),qPe={requireParentSpan:!0},rX=class e extends ir.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super($Pe.PACKAGE_NAME,$Pe.PACKAGE_VERSION,{...qPe,...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({...qPe,...t})}_updateMetricInstruments(){this._connectionsUsage=this.meter.createUpDownCounter(nd.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=ni.context.bind(ni.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=ni.trace.getSpan(ni.context.active()),_=n._checkSkipInstrumentation(h),E=typeof l=="function"?l:f;if(_||typeof E!="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:ni.SpanKind.CLIENT,attributes:T}),x=n._patchEnd(R,E);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=ni.trace.getSpan(ni.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 E=e._getCommandType(s),T=E===XS.MongodbCommandType.UNKNOWN?void 0:E,v=t._getV3SpanAttributes(i,o,s,T),R=t._spanNameFromAttrs(v),x=t.tracer.startSpan(R,{kind:ni.SpanKind.CLIENT,attributes:v}),k=t._patchEnd(x,_);return typeof u=="function"?n.call(this,o,i,s,k):n.call(this,o,i,s,u,k)}}_getV4PatchCommandCallback(){let t=this;return n=>function(o,i,s,u){let l=ni.trace.getSpan(ni.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 E;if(!f){let v=t._getV4SpanAttributes(this,o,i,_),R=t._spanNameFromAttrs(v);E=t.tracer.startSpan(R,{kind:ni.SpanKind.CLIENT,attributes:v})}let T=t._patchEnd(E,h,this.id,_);return n.call(this,o,i,s,T)}}_getV4PatchCommandPromise(){let t=this;return n=>function(...o){let[i,s]=o,u=ni.trace.getSpan(ni.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:ni.SpanKind.CLIENT,attributes:v})}let E=t._patchEnd(_,h,this.id,f),T=n.apply(this,o);return T.then(v=>E(null,v),v=>E(v)),T}}_getV3PatchFind(){let t=this;return n=>function(o,i,s,u,l,f){let h=ni.trace.getSpan(ni.context.active()),_=t._checkSkipInstrumentation(h),E=typeof l=="function"?l:f;if(_||typeof E!="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:ni.SpanKind.CLIENT,attributes:T}),x=t._patchEnd(R,E);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=ni.trace.getSpan(ni.context.active()),_=t._checkSkipInstrumentation(h),E=typeof l=="function"?l:f;if(_||typeof E!="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:ni.SpanKind.CLIENT,attributes:T}),x=t._patchEnd(R,E);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?XS.MongodbCommandType.CREATE_INDEXES:t.findandmodify!==void 0?XS.MongodbCommandType.FIND_AND_MODIFY:t.ismaster!==void 0?XS.MongodbCommandType.IS_MASTER:t.count!==void 0?XS.MongodbCommandType.COUNT:t.aggregate!==void 0?XS.MongodbCommandType.AGGREGATE:XS.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[nd.ATTR_DB_SYSTEM]=nd.DB_SYSTEM_VALUE_MONGODB,u[nd.ATTR_DB_NAME]=t,u[nd.ATTR_DB_MONGODB_COLLECTION]=n,u[nd.ATTR_DB_OPERATION]=s,u[nd.ATTR_DB_CONNECTION_STRING]=`mongodb://${r}:${o}/${t}`),this._dbSemconvStability&ir.SemconvStability.STABLE&&(u[Zg.ATTR_DB_SYSTEM_NAME]=nd.DB_SYSTEM_NAME_VALUE_MONGODB,u[Zg.ATTR_DB_NAMESPACE]=t,u[Zg.ATTR_DB_OPERATION_NAME]=s,u[Zg.ATTR_DB_COLLECTION_NAME]=n),r&&o){this._netSemconvStability&ir.SemconvStability.OLD&&(u[nd.ATTR_NET_PEER_NAME]=r),this._netSemconvStability&ir.SemconvStability.STABLE&&(u[Zg.ATTR_SERVER_ADDRESS]=r);let l=parseInt(o,10);isNaN(l)||(this._netSemconvStability&ir.SemconvStability.OLD&&(u[nd.ATTR_NET_PEER_PORT]=l),this._netSemconvStability&ir.SemconvStability.STABLE&&(u[Zg.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[nd.ATTR_DB_STATEMENT]=h),this._dbSemconvStability&ir.SemconvStability.STABLE&&(u[Zg.ATTR_DB_QUERY_TEXT]=h)},h=>{h&&this._diag.error("Error running dbStatementSerializer hook",h)},!0)}return u}_spanNameFromAttrs(t){let n;return this._dbSemconvStability&ir.SemconvStability.STABLE?n=[t[Zg.ATTR_DB_OPERATION_NAME],t[Zg.ATTR_DB_COLLECTION_NAME]].filter(r=>r).join(" ")||nd.DB_SYSTEM_NAME_VALUE_MONGODB:n=`mongodb.${t[nd.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=ni.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:ni.SpanStatusCode.ERROR,message:h.message});else{let _=f[1];s._handleExecutionResult(t,_)}t.end()}o==="endSessions"&&s._connCountAdd(-1,s._poolName,"idle")}return ni.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}};i6.MongoDBInstrumentation=rX});var YPe=M(fk=>{"use strict";A();Object.defineProperty(fk,"__esModule",{value:!0});fk.MongodbCommandType=void 0;var QDt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.UNKNOWN="unknown"})(QDt=fk.MongodbCommandType||(fk.MongodbCommandType={}))});var KPe=M(TR=>{"use strict";A();Object.defineProperty(TR,"__esModule",{value:!0});TR.MongodbCommandType=TR.MongoDBInstrumentation=void 0;var FDt=VPe();Object.defineProperty(TR,"MongoDBInstrumentation",{enumerable:!0,get:function(){return FDt.MongoDBInstrumentation}});var GDt=YPe();Object.defineProperty(TR,"MongodbCommandType",{enumerable:!0,get:function(){return GDt.MongodbCommandType}})});function jDt(e){let t=oX(e);return JSON.stringify(t)}function oX(e){if(Array.isArray(e))return e.map(t=>oX(t));if(zDt(e)){let t={};return Object.entries(e).map(([n,r])=>[n,oX(r)]).reduce((n,r)=>($Dt(r)&&(n[r[0]]=r[1]),n),t)}return"?"}function zDt(e){return typeof e=="object"&&e!==null&&!HDt(e)}function HDt(e){let t=!1;return typeof Buffer<"u"&&(t=Buffer.isBuffer(e)),t}function $Dt(e){return Array.isArray(e)}var JPe,ZPe,WPe,qDt,XPe,eMe=B(()=>{A();JPe=ue(KPe(),1);_r();ZPe="Mongo",WPe=ct(ZPe,()=>new JPe.MongoDBInstrumentation({dbStatementSerializer:jDt,responseHook(e){Kr(e,"auto.db.otel.mongo")}}));qDt=(()=>({name:ZPe,setupOnce(){WPe()}})),XPe=qDt});var iX=M(cs=>{"use strict";A();Object.defineProperty(cs,"__esModule",{value:!0});cs.DB_SYSTEM_NAME_VALUE_MONGODB=cs.ATTR_NET_PEER_PORT=cs.ATTR_NET_PEER_NAME=cs.ATTR_DB_USER=cs.ATTR_DB_SYSTEM=cs.ATTR_DB_STATEMENT=cs.ATTR_DB_OPERATION=cs.ATTR_DB_NAME=cs.ATTR_DB_MONGODB_COLLECTION=void 0;cs.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";cs.ATTR_DB_NAME="db.name";cs.ATTR_DB_OPERATION="db.operation";cs.ATTR_DB_STATEMENT="db.statement";cs.ATTR_DB_SYSTEM="db.system";cs.ATTR_DB_USER="db.user";cs.ATTR_NET_PEER_NAME="net.peer.name";cs.ATTR_NET_PEER_PORT="net.peer.port";cs.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb"});var rMe=M(_E=>{"use strict";A();Object.defineProperty(_E,"__esModule",{value:!0});_E.handleCallbackResponse=_E.handlePromiseResponse=_E.getAttributesFromCollection=void 0;var tMe=(He(),Me(tt)),Ak=cn(),mk=iX(),s6=(Xn(),Me(Vr));function VDt(e,t,n){let r={};return t&Ak.SemconvStability.OLD&&(r[mk.ATTR_DB_MONGODB_COLLECTION]=e.name,r[mk.ATTR_DB_NAME]=e.conn.name,r[mk.ATTR_DB_USER]=e.conn.user),t&Ak.SemconvStability.STABLE&&(r[s6.ATTR_DB_COLLECTION_NAME]=e.name,r[s6.ATTR_DB_NAMESPACE]=e.conn.name),n&Ak.SemconvStability.OLD&&(r[mk.ATTR_NET_PEER_NAME]=e.conn.host,r[mk.ATTR_NET_PEER_PORT]=e.conn.port),n&Ak.SemconvStability.STABLE&&(r[s6.ATTR_SERVER_ADDRESS]=e.conn.host,r[s6.ATTR_SERVER_PORT]=e.conn.port),r}_E.getAttributesFromCollection=VDt;function nMe(e,t={}){e.recordException(t),e.setStatus({code:tMe.SpanStatusCode.ERROR,message:`${t.message} ${t.code?`
|
|
38
|
-
Mongoose Error Code: ${t.code}`:""}`})}function sX(e,t,n,r=void 0){n&&(0,Ak.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&tMe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function YDt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(sX(t,o,n,r),o)).catch(o=>{throw nMe(t,o),o}).finally(()=>t.end()):(sX(t,e,n,r),t.end(),e)}_E.handlePromiseResponse=YDt;function KDt(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?nMe(r,l):sX(r,f,i,s),r.end(),e(l,f)),t.apply(n,o)}_E.handleCallbackResponse=KDt});var oMe=M(bR=>{"use strict";A();Object.defineProperty(bR,"__esModule",{value:!0});bR.PACKAGE_NAME=bR.PACKAGE_VERSION=void 0;bR.PACKAGE_VERSION="0.60.0";bR.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var cMe=M(Zc=>{"use strict";A();Object.defineProperty(Zc,"__esModule",{value:!0});Zc.MongooseInstrumentation=Zc._ALREADY_INSTRUMENTED=Zc._STORED_PARENT_SPAN=void 0;var ks=(He(),Me(tt)),JDt=Rr(),aX=rMe(),Qa=cn(),iMe=oMe(),EE=iX(),eT=(Xn(),Me(Vr)),a6=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],ZDt=["remove","count","findOneAndRemove",...a6],WDt=["count","findOneAndRemove",...a6],XDt=[...a6];function sMe(e){return e?e.startsWith("6.")||e.startsWith("5.")?ZDt:e.startsWith("7.")?WDt:XDt:a6}function aMe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function uMe(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Zc._STORED_PARENT_SPAN=Symbol("stored-parent-span");Zc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var uX=class extends Qa.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(iMe.PACKAGE_NAME,iMe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Qa.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Qa.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new Qa.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,aMe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),uMe(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)),sMe(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=sMe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,aMe(n)&&this._unwrap(r.Model.prototype,"remove"),uMe(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&&ks.trace.getSpan(ks.context.active())===void 0)return r.apply(this,arguments);let s=this[Zc._STORED_PARENT_SPAN],u={},{dbStatementSerializer:l}=n.getConfig();if(l){let h=l("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&Qa.SemconvStability.OLD&&(u[EE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Qa.SemconvStability.STABLE&&(u[eT.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[Zc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&ks.trace.getSpan(ks.context.active())===void 0)return r.apply(this,arguments);let s=this[Zc._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&Qa.SemconvStability.OLD&&(u[EE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Qa.SemconvStability.STABLE&&(u[eT.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&&ks.trace.getSpan(ks.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 E=h(t,l);r._dbSemconvStability&Qa.SemconvStability.OLD&&(f[EE.ATTR_DB_STATEMENT]=E),r._dbSemconvStability&Qa.SemconvStability.STABLE&&(f[eT.ATTR_DB_QUERY_TEXT]=E)}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&&ks.trace.getSpan(ks.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 E={},T=r.getConfig().dbStatementSerializer;if(T){let x=T(t,{condition:{_id:this._id},updates:h,options:_});r._dbSemconvStability&Qa.SemconvStability.OLD&&(E[EE.ATTR_DB_STATEMENT]=x),r._dbSemconvStability&Qa.SemconvStability.STABLE&&(E[eT.ATTR_DB_QUERY_TEXT]=x)}let v=r._startSpan(this.constructor.collection,this.constructor.modelName,t,E),R=r._handleResponse(v,o,this,arguments,f,n);return R&&typeof R=="object"&&(R[Zc._ALREADY_INSTRUMENTED]=!0),R}}patchModelStatic(t,n){let r=this;return o=>function(s,u,l){if(r.getConfig().requireParentSpan&&ks.trace.getSpan(ks.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&Qa.SemconvStability.OLD&&(h[EE.ATTR_DB_STATEMENT]=T),r._dbSemconvStability&Qa.SemconvStability.STABLE&&(h[eT.ATTR_DB_QUERY_TEXT]=T)}let E=r._startSpan(this.collection,this.modelName,t,h);return r._handleResponse(E,o,this,arguments,l,n)}}patchModelAggregate(){let t=this;return n=>function(){let o=ks.trace.getSpan(ks.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Zc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[Zc._STORED_PARENT_SPAN]=ks.trace.getSpan(ks.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let s={...o,...(0,aX.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&Qa.SemconvStability.OLD&&(s[EE.ATTR_DB_OPERATION]=r,s[EE.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&Qa.SemconvStability.STABLE&&(s[eT.ATTR_DB_OPERATION_NAME]=r,s[eT.ATTR_DB_SYSTEM_NAME]=EE.DB_SYSTEM_NAME_VALUE_MONGODB);let u=this._dbSemconvStability&Qa.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(u,{kind:ks.SpanKind.CLIENT,attributes:s},i?ks.trace.setSpan(ks.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,aX.handleCallbackResponse)(i,n,r,t,o,u.getConfig().responseHook,s));{let l=u._callOriginalFunction(()=>n.apply(r,o));return(0,aX.handlePromiseResponse)(l,t,u.getConfig().responseHook,s)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?ks.context.with((0,JDt.suppressTracing)(ks.context.active()),t):t()}};Zc.MongooseInstrumentation=uX});var lMe=M(u6=>{"use strict";A();Object.defineProperty(u6,"__esModule",{value:!0});u6.MongooseInstrumentation=void 0;var e1t=cMe();Object.defineProperty(u6,"MongooseInstrumentation",{enumerable:!0,get:function(){return e1t.MongooseInstrumentation}})});var dMe,pMe,fMe,t1t,mMe,AMe=B(()=>{A();dMe=ue(lMe(),1);_r();pMe="Mongoose",fMe=ct(pMe,()=>new dMe.MongooseInstrumentation({responseHook(e){Kr(e,"auto.db.otel.mongoose")}})),t1t=(()=>({name:pMe,setupOnce(){fMe()}})),mMe=t1t});var gMe=M(ls=>{"use strict";A();Object.defineProperty(ls,"__esModule",{value:!0});ls.METRIC_DB_CLIENT_CONNECTIONS_USAGE=ls.DB_SYSTEM_VALUE_MYSQL=ls.ATTR_NET_PEER_PORT=ls.ATTR_NET_PEER_NAME=ls.ATTR_DB_USER=ls.ATTR_DB_SYSTEM=ls.ATTR_DB_STATEMENT=ls.ATTR_DB_NAME=ls.ATTR_DB_CONNECTION_STRING=void 0;ls.ATTR_DB_CONNECTION_STRING="db.connection_string";ls.ATTR_DB_NAME="db.name";ls.ATTR_DB_STATEMENT="db.statement";ls.ATTR_DB_SYSTEM="db.system";ls.ATTR_DB_USER="db.user";ls.ATTR_NET_PEER_NAME="net.peer.name";ls.ATTR_NET_PEER_PORT="net.peer.port";ls.DB_SYSTEM_VALUE_MYSQL="mysql";ls.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var hMe=M(gk=>{"use strict";A();Object.defineProperty(gk,"__esModule",{value:!0});gk.AttributeNames=void 0;var n1t;(function(e){e.MYSQL_VALUES="db.mysql.values"})(n1t=gk.AttributeNames||(gk.AttributeNames={}))});var _Me=M(mu=>{"use strict";A();Object.defineProperty(mu,"__esModule",{value:!0});mu.getPoolNameOld=mu.arrayStringifyHelper=mu.getSpanName=mu.getDbValues=mu.getDbQueryText=mu.getJDBCString=mu.getConfig=void 0;function r1t(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}mu.getConfig=r1t;function o1t(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}mu.getJDBCString=o1t;function i1t(e){return typeof e=="string"?e:e.sql}mu.getDbQueryText=i1t;function s1t(e,t){return cX(typeof e=="string"?t:t||e.values)}mu.getDbValues=s1t;function a1t(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}mu.getSpanName=a1t;function cX(e){return e?`[${e.toString()}]`:""}mu.arrayStringifyHelper=cX;function u1t(e){let t=e.config.connectionConfig,n="";return n+=t.host?`host: '${t.host}', `:"",n+=t.port?`port: ${t.port}, `:"",n+=t.database?`database: '${t.database}', `:"",n+=t.user?`user: '${t.user}'`:"",t.user||(n=n.substring(0,n.length-2)),n.trim()}mu.getPoolNameOld=u1t});var EMe=M(IR=>{"use strict";A();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-mysql"});var SMe=M(c6=>{"use strict";A();Object.defineProperty(c6,"__esModule",{value:!0});c6.MySQLInstrumentation=void 0;var Wc=(He(),Me(tt)),dp=cn(),CR=(Xn(),Me(Vr)),Wg=gMe(),c1t=hMe(),tT=_Me(),yMe=EMe(),lX=class extends dp.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(yMe.PACKAGE_NAME,yMe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,dp.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,dp.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(Wg.METRIC_DB_CLIENT_CONNECTIONS_USAGE,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}_connCountAdd(t,n,r){this._connectionsUsageOld?.add(t,{state:r,name:n})}init(){return[new dp.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,dp.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,dp.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,dp.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,tT.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=Wc.context.active();return function(o,i){i&&((0,dp.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&Wc.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,tT.getConfig)(t.config),E=parseInt(f,10),T=(0,tT.getDbQueryText)(o);r._dbSemconvStability&dp.SemconvStability.OLD&&(u[Wg.ATTR_DB_SYSTEM]=Wg.DB_SYSTEM_VALUE_MYSQL,u[Wg.ATTR_DB_CONNECTION_STRING]=(0,tT.getJDBCString)(l,f,h),u[Wg.ATTR_DB_NAME]=h,u[Wg.ATTR_DB_USER]=_,u[Wg.ATTR_DB_STATEMENT]=T),r._dbSemconvStability&dp.SemconvStability.STABLE&&(u[CR.ATTR_DB_SYSTEM_NAME]=CR.DB_SYSTEM_NAME_VALUE_MYSQL,u[CR.ATTR_DB_NAMESPACE]=h,u[CR.ATTR_DB_QUERY_TEXT]=T),r._netSemconvStability&dp.SemconvStability.OLD&&(u[Wg.ATTR_NET_PEER_NAME]=l,isNaN(E)||(u[Wg.ATTR_NET_PEER_PORT]=E)),r._netSemconvStability&dp.SemconvStability.STABLE&&(u[CR.ATTR_SERVER_ADDRESS]=l,isNaN(E)||(u[CR.ATTR_SERVER_PORT]=E));let v=r.tracer.startSpan((0,tT.getSpanName)(o),{kind:Wc.SpanKind.CLIENT,attributes:u});if(r.getConfig().enhancedDatabaseReporting){let k;Array.isArray(i)?k=i:arguments[2]&&(k=[i]),v.setAttribute(c1t.AttributeNames.MYSQL_VALUES,(0,tT.getDbValues)(o,k))}let R=Array.from(arguments).findIndex(k=>typeof k=="function"),x=Wc.context.active();if(R===-1){let k=Wc.context.with(Wc.trace.setSpan(Wc.context.active(),v),()=>n.apply(t,arguments));return Wc.context.bind(x,k),k.on("error",P=>v.setStatus({code:Wc.SpanStatusCode.ERROR,message:P.message})).on("end",()=>{v.end()})}else return r._wrap(arguments,R,r._patchCallbackQuery(v,x)),Wc.context.with(Wc.trace.setSpan(Wc.context.active(),v),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,s){return o&&t.setStatus({code:Wc.SpanStatusCode.ERROR,message:o.message}),t.end(),Wc.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,tT.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")})}};c6.MySQLInstrumentation=lX});var TMe=M(l6=>{"use strict";A();Object.defineProperty(l6,"__esModule",{value:!0});l6.MySQLInstrumentation=void 0;var l1t=SMe();Object.defineProperty(l6,"MySQLInstrumentation",{enumerable:!0,get:function(){return l1t.MySQLInstrumentation}})});var bMe,IMe,CMe,d1t,vMe,RMe=B(()=>{A();bMe=ue(TMe(),1);_r();IMe="Mysql",CMe=ct(IMe,()=>new bMe.MySQLInstrumentation({})),d1t=(()=>({name:IMe,setupOnce(){CMe()}})),vMe=d1t});var dX=M(ca=>{"use strict";A();Object.defineProperty(ca,"__esModule",{value:!0});ca.DB_SYSTEM_VALUE_MYSQL=ca.ATTR_NET_PEER_PORT=ca.ATTR_NET_PEER_NAME=ca.ATTR_DB_USER=ca.ATTR_DB_SYSTEM=ca.ATTR_DB_STATEMENT=ca.ATTR_DB_NAME=ca.ATTR_DB_CONNECTION_STRING=void 0;ca.ATTR_DB_CONNECTION_STRING="db.connection_string";ca.ATTR_DB_NAME="db.name";ca.ATTR_DB_STATEMENT="db.statement";ca.ATTR_DB_SYSTEM="db.system";ca.ATTR_DB_USER="db.user";ca.ATTR_NET_PEER_NAME="net.peer.name";ca.ATTR_NET_PEER_PORT="net.peer.port";ca.DB_SYSTEM_VALUE_MYSQL="mysql"});var fX=M(d6=>{"use strict";A();Object.defineProperty(d6,"__esModule",{value:!0});d6.addSqlCommenterComment=void 0;var pX=(He(),Me(tt)),p1t=Rr();function f1t(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function m1t(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function A1t(e,t){if(typeof t!="string"||t.length===0||f1t(t))return t;let n=new p1t.W3CTraceContextPropagator,r={};n.inject(pX.trace.setSpan(pX.ROOT_CONTEXT,e),r,pX.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(s=>{let u=m1t(r[s]);return`${s}='${u}'`}).join(",");return`${t} /*${i}*/`}d6.addSqlCommenterComment=A1t});var xMe=M(pp=>{"use strict";A();Object.defineProperty(pp,"__esModule",{value:!0});pp.getConnectionPrototypeToInstrument=pp.once=pp.getSpanName=pp.getQueryText=pp.getConnectionAttributes=void 0;var hk=dX(),p6=cn(),mX=(Xn(),Me(Vr));function g1t(e,t,n){let{host:r,port:o,database:i,user:s}=h1t(e),u={};t&p6.SemconvStability.OLD&&(u[hk.ATTR_DB_CONNECTION_STRING]=_1t(r,o,i),u[hk.ATTR_DB_NAME]=i,u[hk.ATTR_DB_USER]=s),t&p6.SemconvStability.STABLE&&(u[mX.ATTR_DB_NAMESPACE]=i);let l=parseInt(o,10);return n&p6.SemconvStability.OLD&&(u[hk.ATTR_NET_PEER_NAME]=r,isNaN(l)||(u[hk.ATTR_NET_PEER_PORT]=l)),n&p6.SemconvStability.STABLE&&(u[mX.ATTR_SERVER_ADDRESS]=r,isNaN(l)||(u[mX.ATTR_SERVER_PORT]=l)),u}pp.getConnectionAttributes=g1t;function h1t(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function _1t(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function E1t(e,t,n,r=!1,o=y1t){let[i,s]=typeof e=="string"?[e,n]:[e.sql,S1t(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"}}pp.getQueryText=E1t;function y1t(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function S1t(e){return"values"in e}function T1t(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}pp.getSpanName=T1t;var b1t=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};pp.once=b1t;function I1t(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}pp.getConnectionPrototypeToInstrument=I1t});var DMe=M(vR=>{"use strict";A();Object.defineProperty(vR,"__esModule",{value:!0});vR.PACKAGE_NAME=vR.PACKAGE_VERSION=void 0;vR.PACKAGE_VERSION="0.60.0";vR.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var kMe=M(f6=>{"use strict";A();Object.defineProperty(f6,"__esModule",{value:!0});f6.MySQL2Instrumentation=void 0;var NMe=(He(),Me(tt)),Df=cn(),AX=dX(),wMe=fX(),RR=xMe(),BMe=DMe(),gX=(Xn(),Me(Vr)),hX=[">=1.4.2 <4"],_X=class extends Df.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(BMe.PACKAGE_NAME,BMe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Df.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Df.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,Df.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,Df.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 Df.InstrumentationNodeModuleDefinition("mysql2",hX,i=>(n(i),i),()=>{},[new Df.InstrumentationNodeModuleFile("mysql2/promise.js",hX,i=>(n(i),i),()=>{}),new Df.InstrumentationNodeModuleFile("mysql2/lib/connection.js",hX,i=>{let s=(0,RR.getConnectionPrototypeToInstrument)(i);return r(s),i},i=>{if(i===void 0)return;let s=(0,RR.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(),E=(0,RR.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),T=(0,RR.getQueryText)(i,t,l,f,h);o._dbSemconvStability&Df.SemconvStability.OLD&&(E[AX.ATTR_DB_SYSTEM]=AX.DB_SYSTEM_VALUE_MYSQL,E[AX.ATTR_DB_STATEMENT]=T),o._dbSemconvStability&Df.SemconvStability.STABLE&&(E[gX.ATTR_DB_SYSTEM_NAME]=gX.DB_SYSTEM_NAME_VALUE_MYSQL,E[gX.ATTR_DB_QUERY_TEXT]=T);let v=o.tracer.startSpan((0,RR.getSpanName)(i),{kind:NMe.SpanKind.CLIENT,attributes:E});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,wMe.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,wMe.addSqlCommenterComment)(v,i.sql)}));let R=(0,RR.once)((x,k)=>{x?v.setStatus({code:NMe.SpanStatusCode.ERROR,message:x.message}):typeof _=="function"&&(0,Df.safeExecuteInTheMiddle)(()=>{_(v,{queryResults:k})},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",k=>{R(k)}).once("result",k=>{R(void 0,k)}),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)}}};f6.MySQL2Instrumentation=_X});var OMe=M(m6=>{"use strict";A();Object.defineProperty(m6,"__esModule",{value:!0});m6.MySQL2Instrumentation=void 0;var C1t=kMe();Object.defineProperty(m6,"MySQL2Instrumentation",{enumerable:!0,get:function(){return C1t.MySQL2Instrumentation}})});var PMe,MMe,LMe,v1t,UMe,QMe=B(()=>{A();PMe=ue(OMe(),1);_r();MMe="Mysql2",LMe=ct(MMe,()=>new PMe.MySQL2Instrumentation({responseHook(e){Kr(e,"auto.db.otel.mysql2")}})),v1t=(()=>({name:MMe,setupOnce(){LMe()}})),UMe=v1t});var FMe=M(Au=>{"use strict";A();Object.defineProperty(Au,"__esModule",{value:!0});Au.DB_SYSTEM_VALUE_REDIS=Au.DB_SYSTEM_NAME_VALUE_REDIS=Au.ATTR_NET_PEER_PORT=Au.ATTR_NET_PEER_NAME=Au.ATTR_DB_SYSTEM=Au.ATTR_DB_STATEMENT=Au.ATTR_DB_CONNECTION_STRING=void 0;Au.ATTR_DB_CONNECTION_STRING="db.connection_string";Au.ATTR_DB_STATEMENT="db.statement";Au.ATTR_DB_SYSTEM="db.system";Au.ATTR_NET_PEER_NAME="net.peer.name";Au.ATTR_NET_PEER_PORT="net.peer.port";Au.DB_SYSTEM_NAME_VALUE_REDIS="redis";Au.DB_SYSTEM_VALUE_REDIS="redis"});var GMe=M(A6=>{"use strict";A();Object.defineProperty(A6,"__esModule",{value:!0});A6.endSpan=void 0;var R1t=(He(),Me(tt)),x1t=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:R1t.SpanStatusCode.ERROR,message:t.message})),e.end()};A6.endSpan=x1t});var h6=M(g6=>{"use strict";A();Object.defineProperty(g6,"__esModule",{value:!0});g6.defaultDbStatementSerializer=void 0;var D1t=[{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}],N1t=(e,t)=>{if(Array.isArray(t)&&t.length){let n=D1t.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};g6.defaultDbStatementSerializer=N1t});var jMe=M(xR=>{"use strict";A();Object.defineProperty(xR,"__esModule",{value:!0});xR.PACKAGE_NAME=xR.PACKAGE_VERSION=void 0;xR.PACKAGE_VERSION="0.62.0";xR.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var qMe=M(_6=>{"use strict";A();Object.defineProperty(_6,"__esModule",{value:!0});_6.IORedisInstrumentation=void 0;var yE=(He(),Me(tt)),Xc=cn(),SE=(Xn(),Me(Vr)),el=FMe(),zMe=cn(),_k=GMe(),w1t=h6(),HMe=jMe(),$Me={requireParentSpan:!0},EX=class extends Xc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(HMe.PACKAGE_NAME,HMe.PACKAGE_VERSION,{...$Me,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Xc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Xc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...$Me,...t})}init(){return[new Xc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,Xc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,Xc.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||w1t.defaultDbStatementSerializer,u=yE.trace.getSpan(yE.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&Xc.SemconvStability.OLD&&(l[el.ATTR_DB_SYSTEM]=el.DB_SYSTEM_VALUE_REDIS,l[el.ATTR_DB_STATEMENT]=_,l[el.ATTR_DB_CONNECTION_STRING]=`redis://${f}:${h}`),r._dbSemconvStability&Xc.SemconvStability.STABLE&&(l[SE.ATTR_DB_SYSTEM_NAME]=el.DB_SYSTEM_NAME_VALUE_REDIS,l[SE.ATTR_DB_QUERY_TEXT]=_),r._netSemconvStability&Xc.SemconvStability.OLD&&(l[el.ATTR_NET_PEER_NAME]=f,l[el.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&Xc.SemconvStability.STABLE&&(l[SE.ATTR_SERVER_ADDRESS]=f,l[SE.ATTR_SERVER_PORT]=h);let E=r.tracer.startSpan(o.name,{kind:yE.SpanKind.CLIENT,attributes:l}),{requestHook:T}=i;T&&(0,zMe.safeExecuteInTheMiddle)(()=>T(E,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&yE.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),R=o.resolve;o.resolve=function(k){(0,zMe.safeExecuteInTheMiddle)(()=>i.responseHook?.(E,o.name,o.args,k),P=>{P&&yE.diag.error("ioredis instrumentation: response hook failed",P)},!0),(0,_k.endSpan)(E,null),R(k)};let x=o.reject;return o.reject=function(k){(0,_k.endSpan)(E,k),x(k)},v}catch(v){throw(0,_k.endSpan)(E,v),v}}}_traceConnection(t){let n=this;return function(){let r=yE.trace.getSpan(yE.context.active())===void 0;if(n.getConfig().requireParentSpan===!0&&r)return t.apply(this,arguments);let o={},{host:i,port:s}=this.options;n._dbSemconvStability&Xc.SemconvStability.OLD&&(o[el.ATTR_DB_SYSTEM]=el.DB_SYSTEM_VALUE_REDIS,o[el.ATTR_DB_STATEMENT]="connect",o[el.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${s}`),n._dbSemconvStability&Xc.SemconvStability.STABLE&&(o[SE.ATTR_DB_SYSTEM_NAME]=el.DB_SYSTEM_NAME_VALUE_REDIS,o[SE.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&Xc.SemconvStability.OLD&&(o[el.ATTR_NET_PEER_NAME]=i,o[el.ATTR_NET_PEER_PORT]=s),n._netSemconvStability&Xc.SemconvStability.STABLE&&(o[SE.ATTR_SERVER_ADDRESS]=i,o[SE.ATTR_SERVER_PORT]=s);let u=n.tracer.startSpan("connect",{kind:yE.SpanKind.CLIENT,attributes:o});try{let l=t.apply(this,arguments);return(0,_k.endSpan)(u,null),l}catch(l){throw(0,_k.endSpan)(u,l),l}}}};_6.IORedisInstrumentation=EX});var VMe=M(E6=>{"use strict";A();Object.defineProperty(E6,"__esModule",{value:!0});E6.IORedisInstrumentation=void 0;var B1t=qMe();Object.defineProperty(E6,"IORedisInstrumentation",{enumerable:!0,get:function(){return B1t.IORedisInstrumentation}})});var y6=M(DR=>{"use strict";A();Object.defineProperty(DR,"__esModule",{value:!0});DR.PACKAGE_NAME=DR.PACKAGE_VERSION=void 0;DR.PACKAGE_VERSION="0.62.0";DR.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var YMe=M(TE=>{"use strict";A();Object.defineProperty(TE,"__esModule",{value:!0});TE.getTracedCreateStreamTrace=TE.getTracedCreateClient=TE.endSpan=void 0;var Ek=(He(),Me(tt)),k1t=(e,t)=>{t&&e.setStatus({code:Ek.SpanStatusCode.ERROR,message:t.message}),e.end()};TE.endSpan=k1t;var O1t=e=>function(){let n=e.apply(this,arguments);return Ek.context.bind(Ek.context.active(),n)};TE.getTracedCreateClient=O1t;var P1t=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){Ek.context.bind(Ek.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};TE.getTracedCreateStreamTrace=P1t});var S6=M(gu=>{"use strict";A();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 JMe=M(b6=>{"use strict";A();Object.defineProperty(b6,"__esModule",{value:!0});b6.RedisInstrumentationV2_V3=void 0;var rd=cn(),T6=YMe(),KMe=y6(),yk=(He(),Me(tt)),Sk=(Xn(),Me(Vr)),nT=S6(),M1t=h6(),yX=class e extends rd.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(KMe.PACKAGE_NAME,KMe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,rd.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,rd.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new rd.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,rd.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,rd.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,rd.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=yk.trace.getSpan(yk.context.active())===void 0;if(s.requireParentSpan===!0&&u)return r.apply(this,arguments);let l=s?.dbStatementSerializer||M1t.defaultDbStatementSerializer,f={};t._semconvStability&rd.SemconvStability.OLD&&Object.assign(f,{[nT.ATTR_DB_SYSTEM]:nT.DB_SYSTEM_VALUE_REDIS,[nT.ATTR_DB_STATEMENT]:l(i.command,i.args)}),t._semconvStability&rd.SemconvStability.STABLE&&Object.assign(f,{[Sk.ATTR_DB_SYSTEM_NAME]:nT.DB_SYSTEM_NAME_VALUE_REDIS,[Sk.ATTR_DB_OPERATION_NAME]:i.command,[Sk.ATTR_DB_QUERY_TEXT]:l(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:yk.SpanKind.CLIENT,attributes:f});if(this.connection_options){let E={};t._semconvStability&rd.SemconvStability.OLD&&Object.assign(E,{[nT.ATTR_NET_PEER_NAME]:this.connection_options.host,[nT.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&rd.SemconvStability.STABLE&&Object.assign(E,{[Sk.ATTR_SERVER_ADDRESS]:this.connection_options.host,[Sk.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(E)}this.address&&t._semconvStability&rd.SemconvStability.OLD&&h.setAttribute(nT.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let _=arguments[0].callback;if(_){let E=yk.context.active();arguments[0].callback=function(v,R){if(s?.responseHook){let x=s.responseHook;(0,rd.safeExecuteInTheMiddle)(()=>{x(h,i.command,i.args,R)},k=>{k&&t._diag.error("Error executing responseHook",k)},!0)}return(0,T6.endSpan)(h,v),yk.context.with(E,_,this,...arguments)}}try{return r.apply(this,arguments)}catch(E){throw(0,T6.endSpan)(h,E),E}}}}_getPatchCreateClient(){return function(n){return(0,T6.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,T6.getTracedCreateStreamTrace)(n)}}};b6.RedisInstrumentationV2_V3=yX});var WMe=M(I6=>{"use strict";A();Object.defineProperty(I6,"__esModule",{value:!0});I6.getClientAttributes=void 0;var SX=(Xn(),Me(Vr)),NR=S6(),ZMe=cn();function L1t(e,t,n){let r={};return n&ZMe.SemconvStability.OLD&&Object.assign(r,{[NR.ATTR_DB_SYSTEM]:NR.DB_SYSTEM_VALUE_REDIS,[NR.ATTR_NET_PEER_NAME]:t?.socket?.host,[NR.ATTR_NET_PEER_PORT]:t?.socket?.port,[NR.ATTR_DB_CONNECTION_STRING]:U1t(e,t?.url)}),n&ZMe.SemconvStability.STABLE&&Object.assign(r,{[SX.ATTR_DB_SYSTEM_NAME]:NR.DB_SYSTEM_NAME_VALUE_REDIS,[SX.ATTR_SERVER_ADDRESS]:t?.socket?.host,[SX.ATTR_SERVER_PORT]:t?.socket?.port}),r}I6.getClientAttributes=L1t;function U1t(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 n2e=M(C6=>{"use strict";A();Object.defineProperty(C6,"__esModule",{value:!0});C6.RedisInstrumentationV4_V5=void 0;var fp=(He(),Me(tt)),Ro=cn(),XMe=WMe(),Q1t=h6(),e2e=y6(),TX=(Xn(),Me(Vr)),F1t=S6(),Tk=Symbol("opentelemetry.instrumentation.redis.open_spans"),t2e=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),bX=class e extends Ro.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(e2e.PACKAGE_NAME,e2e.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Ro.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Ro.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 Ro.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,Ro.isWrapped)(i?.[l])&&this._unwrap(i,l),this._wrap(i,l,this._getPatchExtendWithCommands(u)),i},i=>{(0,Ro.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,Ro.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new Ro.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return(0,Ro.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),this._wrap(s,"exec",this._getPatchMultiCommandsExec(!1)),(0,Ro.isWrapped)(s?.execAsPipeline)&&this._unwrap(s,"execAsPipeline"),this._wrap(s,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,Ro.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand"),this._wrap(s,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let s=i?.default?.prototype;(0,Ro.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),(0,Ro.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand")}),o=new Ro.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return s?.multi&&((0,Ro.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),this._wrap(s,"multi",this._getPatchRedisClientMulti())),s?.MULTI&&((0,Ro.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),this._wrap(s,"MULTI",this._getPatchRedisClientMulti())),(0,Ro.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,Ro.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),(0,Ro.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),(0,Ro.isWrapped)(s?.sendCommand)&&this._unwrap(s,"sendCommand")});return new Ro.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[Tk];return n._endSpansWithRedisReplies(l,u,t),u}).catch(u=>{let l=this[Tk];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[t2e]=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,XMe.getClientAttributes)(t._diag,i,t._semconvStability),u=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:fp.SpanKind.CLIENT,attributes:s});return fp.context.with(fp.trace.setSpan(fp.context.active(),u),()=>r.apply(this)).then(f=>(u.end(),f)).catch(f=>(u.recordException(f),u.setStatus({code:fp.SpanStatusCode.ERROR,message:f.message}),u.end(),Promise.reject(f)))}}}_traceClientCommand(t,n,r,o){if(fp.trace.getSpan(fp.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let s=n.options||n[t2e],u=o[0],l=o.slice(1),f=this.getConfig().dbStatementSerializer||Q1t.defaultDbStatementSerializer,h=(0,XMe.getClientAttributes)(this._diag,s,this._semconvStability);this._semconvStability&Ro.SemconvStability.STABLE&&(h[TX.ATTR_DB_OPERATION_NAME]=u);try{let T=f(u,l);T!=null&&(this._semconvStability&Ro.SemconvStability.OLD&&(h[F1t.ATTR_DB_STATEMENT]=T),this._semconvStability&Ro.SemconvStability.STABLE&&(h[TX.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:fp.SpanKind.CLIENT,attributes:h}),E=fp.context.with(fp.trace.setSpan(fp.context.active(),_),()=>t.apply(n,r));if(typeof E?.then=="function")E.then(T=>{this._endSpanWithResponse(_,u,l,T,void 0)},T=>{this._endSpanWithResponse(_,u,l,null,T)});else{let T=E;T[Tk]=T[Tk]||[],T[Tk].push({span:_,commandName:u,commandArgs:l})}return E}_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],[_,E]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&Ro.SemconvStability.STABLE&&l.setAttribute(TX.ATTR_DB_OPERATION_NAME,s),this._endSpanWithResponse(l,o[u],f,_,E)}}_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:fp.SpanStatusCode.ERROR,message:i?.message})),t.end()}};C6.RedisInstrumentationV4_V5=bX});var i2e=M(v6=>{"use strict";A();Object.defineProperty(v6,"__esModule",{value:!0});v6.RedisInstrumentation=void 0;var G1t=cn(),r2e=y6(),j1t=JMe(),z1t=n2e(),o2e={requireParentSpan:!1},IX=class extends G1t.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...o2e,...t};super(r2e.PACKAGE_NAME,r2e.PACKAGE_VERSION,n),this.instrumentationV2_V3=new j1t.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new z1t.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...o2e,...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())}};v6.RedisInstrumentation=IX});var s2e=M(R6=>{"use strict";A();Object.defineProperty(R6,"__esModule",{value:!0});R6.RedisInstrumentation=void 0;var H1t=i2e();Object.defineProperty(R6,"RedisInstrumentation",{enumerable:!0,get:function(){return H1t.RedisInstrumentation}})});function bk(e,t){return e.includes(t.toLowerCase())}function vX(e){return bk(CX,e)?"cache.get":bk(q1t,e)?"cache.put":void 0}function V1t(e,t){return t.some(n=>e.startsWith(n))}function u2e(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)?a2e(o.map(i=>n(i))):["<unknown>"],r=t[0];return bk($1t,e)&&r!=null?n(r):a2e(t.map(o=>n(o)))}catch{return}}function c2e(e,t,n){if(!vX(e))return!1;for(let r of t)if(V1t(r,n))return!0;return!1}function l2e(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 a2e(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var $1t,CX,q1t,d2e=B(()=>{A();$1t=["get","set","setex"],CX=["get","mget"],q1t=["set","setex"]});var p2e,f2e,x6,Ik,m2e,Y1t,K1t,A2e,J1t,g2e,h2e=B(()=>{A();p2e=ue(VMe(),1),f2e=ue(s2e(),1);mt();_r();d2e();x6="Redis",Ik={},m2e=(e,t,n,r)=>{e.setAttribute(Lt,"auto.db.otel.redis");let o=u2e(t,n),i=vX(t);if(!o||!i||!Ik.cachePrefixes||!c2e(t,o,Ik.cachePrefixes))return;let s=Pt(e).data["net.peer.name"],u=Pt(e).data["net.peer.port"];u&&s&&e.setAttributes({"network.peer.address":s,"network.peer.port":u});let l=l2e(r);l&&e.setAttribute(NY,l),bk(CX,t)&&l!==void 0&&e.setAttribute(xY,l>0),e.setAttributes({[rn]:i,[DY]:o});let f=o.join(", ");e.updateName(Ik.maxCacheKeyLength?L_(f,Ik.maxCacheKeyLength):f)},Y1t=ct(`${x6}.IORedis`,()=>new p2e.IORedisInstrumentation({responseHook:m2e})),K1t=ct(`${x6}.Redis`,()=>new f2e.RedisInstrumentation({responseHook:m2e})),A2e=Object.assign(()=>{Y1t(),K1t()},{id:x6}),J1t=((e={})=>({name:x6,setupOnce(){Ik=e,A2e()}})),g2e=J1t});var _2e=M(D6=>{"use strict";A();Object.defineProperty(D6,"__esModule",{value:!0});D6.EVENT_LISTENERS_SET=void 0;D6.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var RX=M(Ck=>{"use strict";A();Object.defineProperty(Ck,"__esModule",{value:!0});Ck.AttributeNames=void 0;var Z1t;(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"})(Z1t=Ck.AttributeNames||(Ck.AttributeNames={}))});var xX=M(Or=>{"use strict";A();Object.defineProperty(Or,"__esModule",{value:!0});Or.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=Or.METRIC_DB_CLIENT_CONNECTION_COUNT=Or.DB_SYSTEM_VALUE_POSTGRESQL=Or.DB_CLIENT_CONNECTION_STATE_VALUE_USED=Or.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=Or.ATTR_NET_PEER_PORT=Or.ATTR_NET_PEER_NAME=Or.ATTR_DB_USER=Or.ATTR_DB_SYSTEM=Or.ATTR_DB_STATEMENT=Or.ATTR_DB_NAME=Or.ATTR_DB_CONNECTION_STRING=Or.ATTR_DB_CLIENT_CONNECTION_STATE=Or.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;Or.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";Or.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";Or.ATTR_DB_CONNECTION_STRING="db.connection_string";Or.ATTR_DB_NAME="db.name";Or.ATTR_DB_STATEMENT="db.statement";Or.ATTR_DB_SYSTEM="db.system";Or.ATTR_DB_USER="db.user";Or.ATTR_NET_PEER_NAME="net.peer.name";Or.ATTR_NET_PEER_PORT="net.peer.port";Or.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";Or.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";Or.DB_SYSTEM_VALUE_POSTGRESQL="postgresql";Or.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";Or.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests"});var DX=M(vk=>{"use strict";A();Object.defineProperty(vk,"__esModule",{value:!0});vk.SpanNames=void 0;var W1t;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(W1t=vk.SpanNames||(vk.SpanNames={}))});var C2e=M(sr=>{"use strict";A();Object.defineProperty(sr,"__esModule",{value:!0});sr.sanitizedErrorMessage=sr.isObjectWithTextString=sr.getErrorMessage=sr.patchClientConnectCallback=sr.patchCallbackPGPool=sr.updateCounter=sr.getPoolName=sr.patchCallback=sr.handleExecutionResult=sr.handleConfigQuery=sr.shouldSkipInstrumentation=sr.getSemanticAttributesFromPoolConnection=sr.getSemanticAttributesFromConnection=sr.getConnectionString=sr.parseAndMaskConnectionString=sr.parseNormalizedOperationName=sr.getQuerySpanName=void 0;var bE=(He(),Me(tt)),N6=RX(),mp=(Xn(),Me(Vr)),yi=xX(),rT=cn(),E2e=DX();function y2e(e,t){if(!t)return E2e.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:S2e(t.text);return`${E2e.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}sr.getQuerySpanName=y2e;function S2e(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=S2e;function T2e(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}sr.parseAndMaskConnectionString=T2e;function NX(e){if("connectionString"in e&&e.connectionString)return T2e(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}sr.getConnectionString=NX;function w6(e){if(Number.isInteger(e))return e}function b2e(e,t){let n={};return t&rT.SemconvStability.OLD&&(n={...n,[yi.ATTR_DB_SYSTEM]:yi.DB_SYSTEM_VALUE_POSTGRESQL,[yi.ATTR_DB_NAME]:e.database,[yi.ATTR_DB_CONNECTION_STRING]:NX(e),[yi.ATTR_DB_USER]:e.user,[yi.ATTR_NET_PEER_NAME]:e.host,[yi.ATTR_NET_PEER_PORT]:w6(e.port)}),t&rT.SemconvStability.STABLE&&(n={...n,[mp.ATTR_DB_SYSTEM_NAME]:mp.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[mp.ATTR_DB_NAMESPACE]:e.namespace,[mp.ATTR_SERVER_ADDRESS]:e.host,[mp.ATTR_SERVER_PORT]:w6(e.port)}),n}sr.getSemanticAttributesFromConnection=b2e;function X1t(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[N6.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[N6.AttributeNames.MAX_CLIENT]:e.maxClient};return t&rT.SemconvStability.OLD&&(r={...r,[yi.ATTR_DB_SYSTEM]:yi.DB_SYSTEM_VALUE_POSTGRESQL,[yi.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[yi.ATTR_DB_CONNECTION_STRING]:NX(e),[yi.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[yi.ATTR_NET_PEER_PORT]:Number(n?.port)||w6(e.port),[yi.ATTR_DB_USER]:n?.username??e.user}),t&rT.SemconvStability.STABLE&&(r={...r,[mp.ATTR_DB_SYSTEM_NAME]:mp.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[mp.ATTR_DB_NAMESPACE]:e.namespace,[mp.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[mp.ATTR_SERVER_PORT]:Number(n?.port)||w6(e.port)}),r}sr.getSemanticAttributesFromPoolConnection=X1t;function eNt(e){return e.requireParentSpan===!0&&bE.trace.getSpan(bE.context.active())===void 0}sr.shouldSkipInstrumentation=eNt;function tNt(e,t,n,r){let{connectionParameters:o}=this,i=o.database,s=y2e(i,r),u=e.startSpan(s,{kind:bE.SpanKind.CLIENT,attributes:b2e(o,n)});if(!r)return u;if(r.text&&(n&rT.SemconvStability.OLD&&u.setAttribute(yi.ATTR_DB_STATEMENT,r.text),n&rT.SemconvStability.STABLE&&u.setAttribute(mp.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(N6.AttributeNames.PG_VALUES,l)}catch(l){bE.diag.error("failed to stringify ",r.values,l)}return typeof r.name=="string"&&u.setAttribute(N6.AttributeNames.PG_PLAN,r.name),u}sr.handleConfigQuery=tNt;function I2e(e,t,n){typeof e.responseHook=="function"&&(0,rT.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&bE.diag.error("Error running response hook",r)},!0)}sr.handleExecutionResult=I2e;function nNt(e,t,n,r,o){return function(s,u){s?(Object.prototype.hasOwnProperty.call(s,"code")&&(r[mp.ATTR_ERROR_TYPE]=s.code),s instanceof Error&&t.recordException(B6(s)),t.setStatus({code:bE.SpanStatusCode.ERROR,message:s.message})):I2e(e,t,u),o(),t.end(),n.call(this,s,u)}}sr.patchCallback=nNt;function rNt(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=rNt;function oNt(e,t,n,r,o){let i=t.totalCount,s=t.waitingCount,u=t.idleCount,l=i-u;return n.add(l-o.used,{[yi.ATTR_DB_CLIENT_CONNECTION_STATE]:yi.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[yi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(u-o.idle,{[yi.ATTR_DB_CLIENT_CONNECTION_STATE]:yi.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[yi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(s-o.pending,{[yi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:l,idle:u,pending:s}}sr.updateCounter=oNt;function iNt(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(B6(r)),e.setStatus({code:bE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}sr.patchCallbackPGPool=iNt;function sNt(e,t){return function(r){r&&(r instanceof Error&&e.recordException(B6(r)),e.setStatus({code:bE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}sr.patchClientConnectCallback=sNt;function aNt(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}sr.getErrorMessage=aNt;function uNt(e){return typeof e=="object"&&typeof e?.text=="string"}sr.isObjectWithTextString=uNt;function B6(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}sr.sanitizedErrorMessage=B6});var v2e=M(wR=>{"use strict";A();Object.defineProperty(wR,"__esModule",{value:!0});wR.PACKAGE_NAME=wR.PACKAGE_VERSION=void 0;wR.PACKAGE_VERSION="0.66.0";wR.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var B2e=M(O6=>{"use strict";A();Object.defineProperty(O6,"__esModule",{value:!0});O6.PgInstrumentation=void 0;var tc=cn(),Zr=(He(),Me(tt)),R2e=_2e(),ri=C2e(),x2e=fX(),D2e=v2e(),N2e=DX(),k6=Rr(),Nf=(Xn(),Me(Vr)),Rk=xX();function BR(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var wX=class extends tc.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(D2e.PACKAGE_NAME,D2e.PACKAGE_VERSION,t),this._semconvStability=(0,tc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(Nf.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Zr.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(Rk.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(Rk.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=BR(u);return this._patchPgClient(l.Client),u},u=>{let l=BR(u);return this._unpatchPgClient(l.Client),u},[o,r]),s=new tc.InstrumentationNodeModuleDefinition("pg-pool",n,u=>{let l=BR(u);return(0,tc.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect"),this._wrap(l.prototype,"connect",this._getPoolConnectPatch()),l},u=>{let l=BR(u);(0,tc.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect")});return[i,s]}_patchPgClient(t){if(!t)return;let n=BR(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=BR(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(ri.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan(N2e.SpanNames.CONNECT,{kind:Zr.SpanKind.CLIENT,attributes:ri.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let l=Zr.trace.getSpan(Zr.context.active());o=ri.patchClientConnectCallback(s,o),l&&(o=Zr.context.bind(Zr.context.active(),o))}let u=Zr.context.with(Zr.trace.setSpan(Zr.context.active(),s),()=>n.call(this,o));return w2e(s,u)}}recordOperationDuration(t,n){let r={},o=[Nf.ATTR_DB_NAMESPACE,Nf.ATTR_ERROR_TYPE,Nf.ATTR_SERVER_PORT,Nf.ATTR_SERVER_ADDRESS,Nf.ATTR_DB_OPERATION_NAME];this._semconvStability&tc.SemconvStability.OLD&&o.push(Rk.ATTR_DB_SYSTEM),this._semconvStability&tc.SemconvStability.STABLE&&o.push(Nf.ATTR_DB_SYSTEM_NAME),o.forEach(s=>{s in t&&(r[s]=t[s])});let i=(0,k6.hrTimeToMilliseconds)((0,k6.hrTimeDuration)(n,(0,k6.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(ri.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,k6.hrTime)(),s=o[0],u=typeof s=="string",l=ri.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={[Rk.ATTR_DB_SYSTEM]:Rk.DB_SYSTEM_VALUE_POSTGRESQL,[Nf.ATTR_DB_NAMESPACE]:this.database,[Nf.ATTR_SERVER_PORT]:this.connectionParameters.port,[Nf.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};f?.text&&(h[Nf.ATTR_DB_OPERATION_NAME]=ri.parseNormalizedOperationName(f?.text));let _=()=>{t.recordOperationDuration(h,i)},E=t.getConfig(),T=ri.handleConfigQuery.call(this,t.tracer,E,t._semconvStability,f);if(E.addSqlCommenterCommentToQueries&&(u?o[0]=(0,x2e.addSqlCommenterComment)(T,s):l&&!("name"in s)&&(o[0]={...s,text:(0,x2e.addSqlCommenterComment)(T,s.text)})),o.length>0){let x=Zr.trace.getSpan(Zr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=ri.patchCallback(E,T,o[o.length-1],h,_),x&&(o[o.length-1]=Zr.context.bind(Zr.context.active(),o[o.length-1]));else if(typeof f?.callback=="function"){let k=ri.patchCallback(t.getConfig(),T,f.callback,h,_);x&&(k=Zr.context.bind(Zr.context.active(),k)),o[0].callback=k}}let{requestHook:v}=E;typeof v=="function"&&f&&(0,tc.safeExecuteInTheMiddle)(()=>{let{database:x,host:k,port:P,user:j}=this.connectionParameters;v(T,{connection:{database:x,host:k,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(ri.sanitizedErrorMessage(x)),T.setStatus({code:Zr.SpanStatusCode.ERROR,message:ri.getErrorMessage(x)}),T.end(),x}return R instanceof Promise?R.then(x=>new Promise(k=>{ri.handleExecutionResult(t.getConfig(),T,x),_(),T.end(),k(x)})).catch(x=>new Promise((k,P)=>{x instanceof Error&&T.recordException(ri.sanitizedErrorMessage(x)),T.setStatus({code:Zr.SpanStatusCode.ERROR,message:x.message}),_(),T.end(),P(x)})):R})}_setPoolConnectEventListeners(t){if(t[R2e.EVENT_LISTENERS_SET])return;let n=ri.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=ri.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=ri.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=ri.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=ri.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[R2e.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(ri.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan(N2e.SpanNames.POOL_CONNECT,{kind:Zr.SpanKind.CLIENT,attributes:ri.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let l=Zr.trace.getSpan(Zr.context.active());o=ri.patchCallbackPGPool(s,o),l&&(o=Zr.context.bind(Zr.context.active(),o))}let u=Zr.context.with(Zr.trace.setSpan(Zr.context.active(),s),()=>n.call(this,o));return w2e(s,u)}}};O6.PgInstrumentation=wX;function w2e(e,t){if(!(t instanceof Promise))return t;let n=t;return Zr.context.bind(Zr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(ri.sanitizedErrorMessage(r)),e.setStatus({code:Zr.SpanStatusCode.ERROR,message:ri.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var k2e=M(kR=>{"use strict";A();Object.defineProperty(kR,"__esModule",{value:!0});kR.AttributeNames=kR.PgInstrumentation=void 0;var cNt=B2e();Object.defineProperty(kR,"PgInstrumentation",{enumerable:!0,get:function(){return cNt.PgInstrumentation}});var lNt=RX();Object.defineProperty(kR,"AttributeNames",{enumerable:!0,get:function(){return lNt.AttributeNames}})});var O2e,P2e,M2e,dNt,L2e,U2e=B(()=>{A();O2e=ue(k2e(),1);_r();P2e="Postgres",M2e=ct(P2e,O2e.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){Kr(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),dNt=(e=>({name:P2e,setupOnce(){M2e(e)}})),L2e=dNt});var IE,kX,Q2e,pNt,fNt,F2e,BX,mNt,G2e,j2e=B(()=>{A();He();IE=ue(cn(),1);Xn();mt();_r();VS();kX="PostgresJs",Q2e=[">=3.0.0 <4"],pNt=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,fNt=Symbol.for("sentry.query.from.instrumented.sql"),F2e=ct(kX,e=>new BX({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),BX=class extends IE.InstrumentationBase{constructor(t){super("sentry-postgres-js",er,t)}init(){let t=new IE.InstrumentationNodeModuleDefinition("postgres",Q2e,n=>{try{return this._patchPostgres(n)}catch(r){return ws&&W.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new IE.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,Q2e,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 ws&&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 ws&&W.warn("postgres() did not return a valid instance"),u;let l=o.getConfig();return BK(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:(TB(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return Jt.getSpan(We.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(QC,r);return}let o=n?.match(pNt);o?.[1]&&t.setAttribute(QC,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[fNt])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),s=n._sanitizeSqlQuery(i);return ia({name:s||"postgresjs.query",op:"db"},u=>{Kr(u,"auto.db.postgresjs"),u.setAttributes({[pS]:"postgres",[HV]:s});let l=n.getConfig(),{requestHook:f}=l;f&&(0,IE.safeExecuteInTheMiddle)(()=>f(u,s,void 0),E=>{E&&(u.setAttribute("sentry.hook.error","requestHook failed"),ws&&W.error(`Error in requestHook for ${kX} integration:`,E))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(E,T,v)=>{try{n._setOperationName(u,s,v?.[0]?.command),u.end()}catch(R){ws&&W.error("Error ending span in resolve callback:",R)}return Reflect.apply(E,T,v)}});let _=this.reject;this.reject=new Proxy(_,{apply:(E,T,v)=>{try{u.setStatus({code:2,message:v?.[0]?.message||"unknown_error"}),u.setAttribute($V,v?.[0]?.code||"unknown"),u.setAttribute(qV,v?.[0]?.name||"unknown"),n._setOperationName(u,s),u.end()}catch(R){ws&&W.error("Error ending span in reject callback:",R)}return Reflect.apply(E,T,v)}});try{return r.apply(this,o)}catch(E){throw u.setStatus({code:2,message:E instanceof Error?E.message:"unknown_error"}),u.end(),E}})},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}},mNt=(e=>({name:kX,setupOnce(){F2e(e)}})),G2e=mNt});var z2e=M(xk=>{"use strict";A();Object.defineProperty(xk,"__esModule",{value:!0});xk.SeverityNumber=void 0;var ANt;(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"})(ANt=xk.SeverityNumber||(xk.SeverityNumber={}))});var M6=M(OR=>{"use strict";A();Object.defineProperty(OR,"__esModule",{value:!0});OR.NOOP_LOGGER=OR.NoopLogger=void 0;var P6=class{emit(t){}};OR.NoopLogger=P6;OR.NOOP_LOGGER=new P6});var U6=M(PR=>{"use strict";A();Object.defineProperty(PR,"__esModule",{value:!0});PR.NOOP_LOGGER_PROVIDER=PR.NoopLoggerProvider=void 0;var gNt=M6(),L6=class{getLogger(t,n,r){return new gNt.NoopLogger}};PR.NoopLoggerProvider=L6;PR.NOOP_LOGGER_PROVIDER=new L6});var PX=M(Q6=>{"use strict";A();Object.defineProperty(Q6,"__esModule",{value:!0});Q6.ProxyLogger=void 0;var hNt=M6(),OX=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):hNt.NOOP_LOGGER}};Q6.ProxyLogger=OX});var LX=M(F6=>{"use strict";A();Object.defineProperty(F6,"__esModule",{value:!0});F6.ProxyLoggerProvider=void 0;var _Nt=U6(),ENt=PX(),MX=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new ENt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:_Nt.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)}};F6.ProxyLoggerProvider=MX});var H2e=M(G6=>{"use strict";A();Object.defineProperty(G6,"__esModule",{value:!0});G6._globalThis=void 0;G6._globalThis=typeof globalThis=="object"?globalThis:global});var $2e=M(j6=>{"use strict";A();Object.defineProperty(j6,"__esModule",{value:!0});j6._globalThis=void 0;var yNt=H2e();Object.defineProperty(j6,"_globalThis",{enumerable:!0,get:function(){return yNt._globalThis}})});var q2e=M(z6=>{"use strict";A();Object.defineProperty(z6,"__esModule",{value:!0});z6._globalThis=void 0;var SNt=$2e();Object.defineProperty(z6,"_globalThis",{enumerable:!0,get:function(){return SNt._globalThis}})});var V2e=M(nA=>{"use strict";A();Object.defineProperty(nA,"__esModule",{value:!0});nA.API_BACKWARDS_COMPATIBILITY_VERSION=nA.makeGetter=nA._global=nA.GLOBAL_LOGS_API_KEY=void 0;var TNt=q2e();nA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");nA._global=TNt._globalThis;function bNt(e,t,n){return r=>r===e?t:n}nA.makeGetter=bNt;nA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var K2e=M(H6=>{"use strict";A();Object.defineProperty(H6,"__esModule",{value:!0});H6.LogsAPI=void 0;var Ap=V2e(),INt=U6(),Y2e=LX(),UX=class e{constructor(){this._proxyLoggerProvider=new Y2e.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Ap._global[Ap.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Ap._global[Ap.GLOBAL_LOGS_API_KEY]=(0,Ap.makeGetter)(Ap.API_BACKWARDS_COMPATIBILITY_VERSION,t,INt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Ap._global[Ap.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Ap._global,Ap.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Ap._global[Ap.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new Y2e.ProxyLoggerProvider}};H6.LogsAPI=UX});var QX=M(la=>{"use strict";A();Object.defineProperty(la,"__esModule",{value:!0});la.logs=la.ProxyLoggerProvider=la.ProxyLogger=la.NoopLoggerProvider=la.NOOP_LOGGER_PROVIDER=la.NoopLogger=la.NOOP_LOGGER=la.SeverityNumber=void 0;var CNt=z2e();Object.defineProperty(la,"SeverityNumber",{enumerable:!0,get:function(){return CNt.SeverityNumber}});var J2e=M6();Object.defineProperty(la,"NOOP_LOGGER",{enumerable:!0,get:function(){return J2e.NOOP_LOGGER}});Object.defineProperty(la,"NoopLogger",{enumerable:!0,get:function(){return J2e.NoopLogger}});var Z2e=U6();Object.defineProperty(la,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return Z2e.NOOP_LOGGER_PROVIDER}});Object.defineProperty(la,"NoopLoggerProvider",{enumerable:!0,get:function(){return Z2e.NoopLoggerProvider}});var vNt=PX();Object.defineProperty(la,"ProxyLogger",{enumerable:!0,get:function(){return vNt.ProxyLogger}});var RNt=LX();Object.defineProperty(la,"ProxyLoggerProvider",{enumerable:!0,get:function(){return RNt.ProxyLoggerProvider}});var xNt=K2e();la.logs=xNt.LogsAPI.getInstance()});var W2e=M(MR=>{"use strict";A();Object.defineProperty(MR,"__esModule",{value:!0});MR.disableInstrumentations=MR.enableInstrumentations=void 0;function DNt(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()}}MR.enableInstrumentations=DNt;function NNt(e){e.forEach(t=>t.disable())}MR.disableInstrumentations=NNt});var tLe=M($6=>{"use strict";A();Object.defineProperty($6,"__esModule",{value:!0});$6.registerInstrumentations=void 0;var X2e=(He(),Me(tt)),wNt=QX(),eLe=W2e();function BNt(e){let t=e.tracerProvider||X2e.trace.getTracerProvider(),n=e.meterProvider||X2e.metrics.getMeterProvider(),r=e.loggerProvider||wNt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,eLe.enableInstrumentations)(o,t,n,r),()=>{(0,eLe.disableInstrumentations)(o)}}$6.registerInstrumentations=BNt});var lLe=M(q6=>{"use strict";A();Object.defineProperty(q6,"__esModule",{value:!0});q6.satisfies=void 0;var zX=(He(),Me(tt)),sLe=/^(?: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-]+)*))?$/,kNt=/^(?<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-]+)*))?$/,ONt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function PNt(e,t,n){if(!MNt(e))return zX.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=FNt(e);if(!r)return!1;let o=[],i=aLe(r,t,o,n);return i&&!n?.includePrerelease?UNt(r,o):i}q6.satisfies=PNt;function MNt(e){return typeof e=="string"&&sLe.test(e)}function aLe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(FX(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=awt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!FX(e,i,n,r))return!1;return!0}return FX(e,t,n,r)}function FX(e,t,n,r){if(t=QNt(t,r),t.includes(" "))return aLe(e,t,n,r);{let o=GNt(t);return n.push(o),LNt(e,o)}}function LNt(e,t){if(t.invalid)return!1;if(!t.version||jX(t.version))return!0;let n=rLe(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=rLe(r,o)}return ONt[t.op]?.includes(n)}function UNt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function QNt(e,t){return e=e.trim(),e=iwt(e,t),e=owt(e),e=swt(e,t),e=e.trim(),e}function nc(e){return!e||e.toLowerCase()==="x"||e==="*"}function FNt(e){let t=e.match(sLe);if(!t){zX.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 GNt(e){if(!e)return{};let t=e.match(kNt);if(!t)return zX.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 jX(e){return e==="*"||e==="x"||e==="X"}function nLe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function jNt(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 zNt(e,t){if(jX(e)||jX(t))return 0;let[n,r]=jNt(nLe(e),nLe(t));return n>r?1:n<r?-1:0}function rLe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=zNt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var uLe="[a-zA-Z0-9-]",cLe="0|[1-9]\\d*",HNt=`\\d*[a-zA-Z-]${uLe}*`,$Nt="((?:<|>)?=?)",oLe=`(?:${cLe}|${HNt})`,qNt=`(?:-(${oLe}(?:\\.${oLe})*))`,iLe=`${uLe}+`,VNt=`(?:\\+(${iLe}(?:\\.${iLe})*))`,GX=`${cLe}|x|X|\\*`,Dk=`[v=\\s]*(${GX})(?:\\.(${GX})(?:\\.(${GX})(?:${qNt})?${VNt}?)?)?`,YNt=`^${$Nt}\\s*${Dk}$`,KNt=new RegExp(YNt),JNt=`^\\s*(${Dk})\\s+-\\s+(${Dk})\\s*$`,ZNt=new RegExp(JNt),WNt="(?:~>?)",XNt=`^${WNt}${Dk}$`,ewt=new RegExp(XNt),twt="(?:\\^)",nwt=`^${twt}${Dk}$`,rwt=new RegExp(nwt);function owt(e){let t=ewt;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 iwt(e,t){let n=rwt,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 swt(e,t){let n=KNt;return e.replace(n,(r,o,i,s,u,l)=>{let f=nc(i),h=f||nc(s),_=h||nc(u),E=_;return o==="="&&E&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&E?(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 awt(e,t){let n=ZNt;return e.replace(n,(r,o,i,s,u,l,f,h,_,E,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(E)?h=`<${+_+1}.0.0-0`:nc(T)?h=`<${_}.${+E+1}.0-0`:v?h=`<=${_}.${E}.${T}-${v}`:t?.includePrerelease?h=`<${_}.${E}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var HX=M(Fa=>{"use strict";A();Object.defineProperty(Fa,"__esModule",{value:!0});Fa.massUnwrap=Fa.unwrap=Fa.massWrap=Fa.wrap=void 0;var rc=console.error.bind(console);function Nk(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 uwt=(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 Nk(o,"__original",r),Nk(o,"__unwrap",()=>{e[t]===o&&Nk(e,t,r)}),Nk(o,"__wrapped",!0),Nk(e,t,o),o};Fa.wrap=uwt;var cwt=(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,Fa.wrap)(r,o,n)})})};Fa.massWrap=cwt;var lwt=(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}};Fa.unwrap=lwt;var dwt=(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,Fa.unwrap)(n,r)})})};Fa.massUnwrap=dwt;function wk(e){e&&e.logger&&(typeof e.logger!="function"?rc("new logger isn't a function, not replacing"):rc=e.logger)}Fa.default=wk;wk.wrap=Fa.wrap;wk.massWrap=Fa.massWrap;wk.unwrap=Fa.unwrap;wk.massUnwrap=Fa.massUnwrap});var dLe=M(Y6=>{"use strict";A();Object.defineProperty(Y6,"__esModule",{value:!0});Y6.InstrumentationAbstract=void 0;var $X=(He(),Me(tt)),pwt=QX(),V6=HX(),qX=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=$X.diag.createComponentLogger({namespace:t}),this._tracer=$X.trace.getTracer(t,n),this._meter=$X.metrics.getMeter(t,n),this._logger=pwt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=V6.wrap;_unwrap=V6.unwrap;_massWrap=V6.massWrap;_massUnwrap=V6.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)}}};Y6.InstrumentationAbstract=qX});var pLe=M(CE=>{"use strict";A();Object.defineProperty(CE,"__esModule",{value:!0});CE.ModuleNameTrie=CE.ModuleNameSeparator=void 0;CE.ModuleNameSeparator="/";var K6=class{hooks=[];children=new Map},VX=class{_trie=new K6;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(CE.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new K6,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],s=!0;for(let u of t.split(CE.ModuleNameSeparator)){let l=o.children.get(u);if(!l){s=!1;break}r||i.push(...l.hooks),o=l}return r&&s&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((u,l)=>u.insertedId-l.insertedId),i.map(({hook:u})=>u))}};CE.ModuleNameTrie=VX});var mLe=M(J6=>{"use strict";A();Object.defineProperty(J6,"__esModule",{value:!0});J6.RequireInTheMiddleSingleton=void 0;var fwt=_S(),fLe=Ue("path"),YX=pLe(),mwt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),KX=class e{_moduleNameTrie=new YX.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new fwt.Hook(null,{internals:!0},(t,n,r)=>{let o=Awt(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 mwt?new e:this._instance=this._instance??new e}};J6.RequireInTheMiddleSingleton=KX;function Awt(e){return fLe.sep!==YX.ModuleNameSeparator?e.split(fLe.sep).join(YX.ModuleNameSeparator):e}});var JX=M(vE=>{"use strict";A();Object.defineProperty(vE,"__esModule",{value:!0});vE.isWrapped=vE.safeExecuteInTheMiddleAsync=vE.safeExecuteInTheMiddle=void 0;function gwt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}vE.safeExecuteInTheMiddle=gwt;async function hwt(e,t,n){let r,o;try{o=await e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}vE.safeExecuteInTheMiddleAsync=hwt;function _wt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}vE.isWrapped=_wt});var hLe=M(Z6=>{"use strict";A();Object.defineProperty(Z6,"__esModule",{value:!0});Z6.InstrumentationBase=void 0;var Bk=Ue("path"),ALe=Ue("util"),Ewt=lLe(),ZX=HX(),ywt=dLe(),Swt=mLe(),Twt=wW(),kk=(He(),Me(tt)),bwt=_S(),Iwt=Ue("fs"),Cwt=JX(),WX=class extends ywt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=Swt.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,Cwt.isWrapped)(t[n])&&this._unwrap(t,n),ALe.types.isProxy(t)){let o=(0,ZX.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,ZX.wrap)(t,n,r)};_unwrap=(t,n)=>ALe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,ZX.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{kk.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){kk.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{kk.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){kk.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,Iwt.readFileSync)(Bk.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{kk.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 gLe(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=Bk.normalize(r);return s.filter(f=>f.name===u).filter(f=>gLe(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&&Bk.isAbsolute(u)){let f=Bk.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=Bk.isAbsolute(t.name)?new bwt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new Twt.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}};Z6.InstrumentationBase=WX;function gLe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,Ewt.satisfies)(t,r,{includePrerelease:n}))}});var _Le=M(W6=>{"use strict";A();Object.defineProperty(W6,"__esModule",{value:!0});W6.normalize=void 0;var vwt=Ue("path");Object.defineProperty(W6,"normalize",{enumerable:!0,get:function(){return vwt.normalize}})});var ELe=M(LR=>{"use strict";A();Object.defineProperty(LR,"__esModule",{value:!0});LR.normalize=LR.InstrumentationBase=void 0;var Rwt=hLe();Object.defineProperty(LR,"InstrumentationBase",{enumerable:!0,get:function(){return Rwt.InstrumentationBase}});var xwt=_Le();Object.defineProperty(LR,"normalize",{enumerable:!0,get:function(){return xwt.normalize}})});var XX=M(UR=>{"use strict";A();Object.defineProperty(UR,"__esModule",{value:!0});UR.normalize=UR.InstrumentationBase=void 0;var yLe=ELe();Object.defineProperty(UR,"InstrumentationBase",{enumerable:!0,get:function(){return yLe.InstrumentationBase}});Object.defineProperty(UR,"normalize",{enumerable:!0,get:function(){return yLe.normalize}})});var SLe=M(X6=>{"use strict";A();Object.defineProperty(X6,"__esModule",{value:!0});X6.InstrumentationNodeModuleDefinition=void 0;var eee=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||[]}};X6.InstrumentationNodeModuleDefinition=eee});var TLe=M(eG=>{"use strict";A();Object.defineProperty(eG,"__esModule",{value:!0});eG.InstrumentationNodeModuleFile=void 0;var Dwt=XX(),tee=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,Dwt.normalize)(t)}};eG.InstrumentationNodeModuleFile=tee});var bLe=M(oT=>{"use strict";A();Object.defineProperty(oT,"__esModule",{value:!0});oT.semconvStabilityFromStr=oT.SemconvStability=void 0;var tG;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(tG=oT.SemconvStability||(oT.SemconvStability={}));function Nwt(e,t){let n=tG.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=tG.DUPLICATE;break}else o.toLowerCase()===e&&(n=tG.STABLE);return n}oT.semconvStabilityFromStr=Nwt});var CLe=M(ds=>{"use strict";A();Object.defineProperty(ds,"__esModule",{value:!0});ds.semconvStabilityFromStr=ds.SemconvStability=ds.safeExecuteInTheMiddleAsync=ds.safeExecuteInTheMiddle=ds.isWrapped=ds.InstrumentationNodeModuleFile=ds.InstrumentationNodeModuleDefinition=ds.InstrumentationBase=ds.registerInstrumentations=void 0;var wwt=tLe();Object.defineProperty(ds,"registerInstrumentations",{enumerable:!0,get:function(){return wwt.registerInstrumentations}});var Bwt=XX();Object.defineProperty(ds,"InstrumentationBase",{enumerable:!0,get:function(){return Bwt.InstrumentationBase}});var kwt=SLe();Object.defineProperty(ds,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return kwt.InstrumentationNodeModuleDefinition}});var Owt=TLe();Object.defineProperty(ds,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return Owt.InstrumentationNodeModuleFile}});var nee=JX();Object.defineProperty(ds,"isWrapped",{enumerable:!0,get:function(){return nee.isWrapped}});Object.defineProperty(ds,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return nee.safeExecuteInTheMiddle}});Object.defineProperty(ds,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return nee.safeExecuteInTheMiddleAsync}});var ILe=bLe();Object.defineProperty(ds,"SemconvStability",{enumerable:!0,get:function(){return ILe.SemconvStability}});Object.defineProperty(ds,"semconvStabilityFromStr",{enumerable:!0,get:function(){return ILe.semconvStabilityFromStr}})});function Lwt(){let e=QR[oee];return e?.helper?e.helper:QR[ree]?.helper}function Uwt(e){let t={helper:e};QR[oee]=t,QR[ree]=t}function Qwt(){delete QR[oee],delete QR[ree]}function jwt(e){return e==="client"?Ao.CLIENT:Ao.INTERNAL}function xLe(e,t,n,r,o){if(DLe(t.name,o))return;let i={attributes:t.attributes,kind:jwt(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)xLe(e,l,n,r,o);s.end(t.endTime)})}function vLe(e,t){return Hwt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function Hwt(e){return e!=null&&typeof e.then=="function"}function DLe(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var nG,Pwt,Mwt,ree,oee,QR,Fwt,Gwt,zwt,NLe,RLe,$wt,qwt,wLe,BLe=B(()=>{A();He();nG=ue(CLe(),1);He();Pwt={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"}},Mwt=Pwt.version.split(".")[0],ree="PRISMA_INSTRUMENTATION",oee=`V${Mwt}_PRISMA_INSTRUMENTATION`,QR=globalThis;Fwt=process.env.PRISMA_SHOW_ALL_TRACES==="true",Gwt="00-10-10-00";zwt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=Jt.getSpanContext(e??We.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:Gwt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)xLe(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return We.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!Fwt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(DLe(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return vLe(i,t(i,r))}return n.startActiveSpan(o,e,i=>vLe(i,t(i,r)))}};NLe={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},RLe=NLe.version,$wt=NLe.name,qwt="@prisma/client",wLe=class extends nG.InstrumentationBase{tracerProvider;constructor(e={}){super($wt,RLe,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new nG.InstrumentationNodeModuleDefinition(qwt,[RLe])]}enable(){let e=this._config;Uwt(new zwt({tracerProvider:this.tracerProvider??Jt.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){Qwt()}isEnabled(){return Lwt()!==void 0}}});function Vwt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function OLe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function Ywt(e){return e==="client"?Ao.CLIENT:Ao.INTERNAL}var kLe,iee,Kwt,PLe,MLe=B(()=>{A();He();BLe();mt();_r();kLe="Prisma";iee=class extends wLe{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=OLe();Vwt(t)&&(t.createEngineSpan=n=>{let r=Jt.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){ei(()=>{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=Ywt(i.kind),u=i.parent_span_id,l=i.span_id,f=i.trace_id,h=i.links?.map(E=>({context:{traceId:E.trace_id,spanId:E.span_id,traceFlags:ou.SAMPLED}})),_=Jt.setSpanContext(We.active(),{traceId:f,spanId:u,traceFlags:ou.SAMPLED});We.with(_,()=>{let E={generateTraceId:()=>f,generateSpanId:()=>l};r._idGenerator=E,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}})}};Kwt=ct(kLe,e=>new iee(e)),PLe=e=>({name:kLe,setupOnce(){Kwt(e)},setup(t){OLe()&&t.on("spanStart",n=>{let r=Pt(n);r.description?.startsWith("prisma:")&&n.setAttribute(Lt,"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 LLe=M(FR=>{"use strict";A();Object.defineProperty(FR,"__esModule",{value:!0});FR.PACKAGE_NAME=FR.PACKAGE_VERSION=void 0;FR.PACKAGE_VERSION="0.60.0";FR.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var see=M(rA=>{"use strict";A();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 ULe=M(rG=>{"use strict";A();Object.defineProperty(rG,"__esModule",{value:!0});rG.ATTR_HTTP_METHOD=void 0;rG.ATTR_HTTP_METHOD="http.method"});var aee=M(Ok=>{"use strict";A();Object.defineProperty(Ok,"__esModule",{value:!0});Ok.AttributeNames=void 0;var Jwt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(Jwt=Ok.AttributeNames||(Ok.AttributeNames={}))});var GLe=M(ps=>{"use strict";A();Object.defineProperty(ps,"__esModule",{value:!0});ps.getPluginFromInput=ps.getExtMetadata=ps.getRouteMetadata=ps.isPatchableExtMethod=ps.isDirectExtInput=ps.isLifecycleExtEventObj=ps.isLifecycleExtType=ps.getPluginName=void 0;var QLe=(Xn(),Me(Vr)),Zwt=ULe(),Pk=see(),RE=aee(),FLe=cn();function Wwt(e){return e.name?e.name:e.pkg.name}ps.getPluginName=Wwt;var Xwt=e=>typeof e=="string"&&Pk.HapiLifecycleMethodNames.has(e);ps.isLifecycleExtType=Xwt;var eBt=e=>{let t=e?.type;return t!==void 0&&(0,ps.isLifecycleExtType)(t)};ps.isLifecycleExtEventObj=eBt;var tBt=e=>Array.isArray(e)&&e.length<=3&&(0,ps.isLifecycleExtType)(e[0])&&typeof e[1]=="function";ps.isDirectExtInput=tBt;var nBt=e=>!Array.isArray(e);ps.isPatchableExtMethod=nBt;var rBt=(e,t,n)=>{let r={[QLe.ATTR_HTTP_ROUTE]:e.path};t&FLe.SemconvStability.OLD&&(r[Zwt.ATTR_HTTP_METHOD]=e.method),t&FLe.SemconvStability.STABLE&&(r[QLe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[RE.AttributeNames.HAPI_TYPE]=Pk.HapiLayerType.PLUGIN,r[RE.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[RE.AttributeNames.HAPI_TYPE]=Pk.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};ps.getRouteMetadata=rBt;var oBt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[RE.AttributeNames.EXT_TYPE]:e,[RE.AttributeNames.HAPI_TYPE]:Pk.HapiLayerType.EXT,[RE.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[RE.AttributeNames.EXT_TYPE]:e,[RE.AttributeNames.HAPI_TYPE]:Pk.HapiLayerType.EXT},name:r}};ps.getExtMetadata=oBt;var iBt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;ps.getPluginFromInput=iBt});var HLe=M(oG=>{"use strict";A();Object.defineProperty(oG,"__esModule",{value:!0});oG.HapiInstrumentation=void 0;var od=(He(),Me(tt)),jLe=Rr(),Mk=cn(),zLe=LLe(),Lk=see(),Xg=GLe(),uee=class extends Mk.InstrumentationBase{_semconvStability;constructor(t={}){super(zLe.PACKAGE_NAME,zLe.PACKAGE_VERSION,t),this._semconvStability=(0,Mk.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new Mk.InstrumentationNodeModuleDefinition(Lk.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,Mk.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,Mk.isWrapped)(n.Server)||this._wrap(n,"Server",this._getServerPatch.bind(this)),n},t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._massUnwrap([n],["server","Server"])})}_getServerPatch(t){let n=this,r=this;return function(i){let s=t.apply(this,[i]);return r._wrap(s,"route",u=>n._getServerRoutePatch.bind(n)(u)),r._wrap(s,"ext",u=>n._getServerExtPatch.bind(n)(u)),r._wrap(s,"register",n._getServerRegisterPatch.bind(n)),s}}_getServerRegisterPatch(t){let n=this;return function(o,i){if(Array.isArray(o))for(let s of o){let u=(0,Xg.getPluginFromInput)(s);n._wrapRegisterHandler(u)}else{let s=(0,Xg.getPluginFromInput)(o);n._wrapRegisterHandler(s)}return t.apply(this,[o,i])}}_getServerExtPatch(t,n){let r=this;return function(...i){if(Array.isArray(i[0])){let s=i[0];for(let u=0;u<s.length;u++){let l=s[u];if((0,Xg.isLifecycleExtType)(l.type)){let f=l,h=r._wrapExtMethods(f.method,l.type,n);f.method=h,s[u]=f}}return t.apply(this,i)}else if((0,Xg.isDirectExtInput)(i)){let s=i,u=s[1],l=r._wrapExtMethods(u,s[0],n);return t.apply(this,[s[0],l,s[2]])}else if((0,Xg.isLifecycleExtEventObj)(i[0])){let s=i[0],u=r._wrapExtMethods(s.method,s.type,n);return s.method=u,t.call(this,s)}return t.apply(this,i)}}_getServerRoutePatch(t,n){let r=this;return function(o){if(Array.isArray(o))for(let i=0;i<o.length;i++){let s=r._wrapRouteHandler.call(r,o[i],n);o[i]=s}else o=r._wrapRouteHandler.call(r,o,n);return t.apply(this,[o])}}_wrapRegisterHandler(t){let n=this,r=(0,Xg.getPluginName)(t),o=t.register,i=this,s=function(u,l){return i._wrap(u,"route",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,Xg.isPatchableExtMethod)(t))return t[Lk.handlerPatched]===!0?t:(t[Lk.handlerPatched]=!0,async function(...s){if(od.trace.getSpan(od.context.active())===void 0)return await t.apply(this,s);let u=(0,Xg.getExtMetadata)(n,r,t.name),l=o.tracer.startSpan(u.name,{attributes:u.attributes});try{return await od.context.with(od.trace.setSpan(od.context.active(),l),t,void 0,...s)}catch(f){throw l.recordException(f),l.setStatus({code:od.SpanStatusCode.ERROR,message:f.message}),f}finally{l.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[Lk.handlerPatched]===!0)return t;t[Lk.handlerPatched]=!0;let o=i=>async function(...s){if(od.trace.getSpan(od.context.active())===void 0)return await i.call(this,...s);let u=(0,jLe.getRPCMetadata)(od.context.active());u?.type===jLe.RPCType.HTTP&&(u.route=t.path);let l=(0,Xg.getRouteMetadata)(t,r._semconvStability,n),f=r.tracer.startSpan(l.name,{attributes:l.attributes});try{return await od.context.with(od.trace.setSpan(od.context.active(),f),()=>i.call(this,...s))}catch(h){throw f.recordException(h),f.setStatus({code:od.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}};oG.HapiInstrumentation=uee});var $Le=M(GR=>{"use strict";A();Object.defineProperty(GR,"__esModule",{value:!0});GR.AttributeNames=GR.HapiInstrumentation=void 0;var sBt=HLe();Object.defineProperty(GR,"HapiInstrumentation",{enumerable:!0,get:function(){return sBt.HapiInstrumentation}});var aBt=aee();Object.defineProperty(GR,"AttributeNames",{enumerable:!0,get:function(){return aBt.AttributeNames}})});var qLe,VLe,YLe,uBt,KLe,JLe=B(()=>{A();qLe=ue($Le(),1);_r();VLe="Hapi",YLe=ct(VLe,()=>new qLe.HapiInstrumentation),uBt=(()=>({name:VLe,setupOnce(){YLe()}})),KLe=uBt});var xE,Uk,cee=B(()=>{A();xE={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},Uk={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var sG,cBt,lBt,iG,ZLe=B(()=>{A();He();sG=ue(cn(),1);mt();cee();cBt="@sentry/instrumentation-hono",lBt="0.0.1",iG=class extends sG.InstrumentationBase{constructor(t={}){super(cBt,lBt,t)}init(){return[new sG.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(Jt.setSpan(We.active(),s),()=>n._safeExecute(()=>{let u=t.apply(this,[r,o]);if(wa(u))return u.then(l=>{let f=n._determineHandlerType(l);return s.setAttributes({[xE.HONO_TYPE]:f,[xE.HONO_NAME]:f===Uk.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(s),l});{let l=n._determineHandlerType(u);return s.setAttributes({[xE.HONO_TYPE]:l,[xE.HONO_NAME]:l===Uk.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 wa(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?Uk.MIDDLEWARE:Uk.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:gi.ERROR,message:n.message}),t.recordException(n))}}});function dBt(e){let t=Pt(e).data,n=t[xE.HONO_TYPE];if(t[rn]||!n)return;e.setAttributes({[Lt]:"auto.http.otel.hono",[rn]:`${n}.hono`});let r=t[xE.HONO_NAME];if(typeof r=="string"&&e.updateName(r),xn()===ep()){ws&&W.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[vg],i=t[fS];typeof o=="string"&&typeof i=="string"&&xn().setTransactionName(`${i} ${o}`)}var WLe,XLe,pBt,eUe,tUe=B(()=>{A();Xn();mt();_r();VS();cee();ZLe();WLe="Hono";XLe=ct(WLe,()=>new iG({responseHook:e=>{dBt(e)}})),pBt=(()=>({name:WLe,setupOnce(){XLe()}})),eUe=pBt});var aG=M(Qk=>{"use strict";A();Object.defineProperty(Qk,"__esModule",{value:!0});Qk.KoaLayerType=void 0;var fBt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(fBt=Qk.KoaLayerType||(Qk.KoaLayerType={}))});var nUe=M(jR=>{"use strict";A();Object.defineProperty(jR,"__esModule",{value:!0});jR.PACKAGE_NAME=jR.PACKAGE_VERSION=void 0;jR.PACKAGE_VERSION="0.62.0";jR.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var lee=M(Fk=>{"use strict";A();Object.defineProperty(Fk,"__esModule",{value:!0});Fk.AttributeNames=void 0;var mBt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(mBt=Fk.AttributeNames||(Fk.AttributeNames={}))});var oUe=M(zR=>{"use strict";A();Object.defineProperty(zR,"__esModule",{value:!0});zR.isLayerIgnored=zR.getMiddlewareMetadata=void 0;var rUe=aG(),uG=lee(),ABt=(Xn(),Me(Vr)),gBt=(e,t,n,r)=>n?{attributes:{[uG.AttributeNames.KOA_NAME]:r?.toString(),[uG.AttributeNames.KOA_TYPE]:rUe.KoaLayerType.ROUTER,[ABt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[uG.AttributeNames.KOA_NAME]:t.name??"middleware",[uG.AttributeNames.KOA_TYPE]:rUe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};zR.getMiddlewareMetadata=gBt;var hBt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));zR.isLayerIgnored=hBt});var iUe=M(cG=>{"use strict";A();Object.defineProperty(cG,"__esModule",{value:!0});cG.kLayerPatched=void 0;cG.kLayerPatched=Symbol("koa-layer-patched")});var dUe=M(lG=>{"use strict";A();Object.defineProperty(lG,"__esModule",{value:!0});lG.KoaInstrumentation=void 0;var oA=(He(),Me(tt)),Gk=cn(),sUe=aG(),aUe=nUe(),uUe=oUe(),cUe=Rr(),lUe=iUe(),dee=class extends Gk.InstrumentationBase{constructor(t={}){super(aUe.PACKAGE_NAME,aUe.PACKAGE_VERSION,t)}init(){return new Gk.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,Gk.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,Gk.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?sUe.KoaLayerType.ROUTER:sUe.KoaLayerType.MIDDLEWARE;return t[lUe.kLayerPatched]===!0||(0,uUe.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(oA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[lUe.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,uUe.getMiddlewareMetadata)(i,t,n,r),f=this.tracer.startSpan(l.name,{attributes:l.attributes}),h=(0,cUe.getRPCMetadata)(oA.context.active());h?.type===cUe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:_}=this.getConfig();_&&(0,Gk.safeExecuteInTheMiddle)(()=>_(f,{context:i,middlewareLayer:t,layerType:o}),T=>{T&&oA.diag.error("koa instrumentation: request hook failed",T)},!0);let E=oA.trace.setSpan(oA.context.active(),f);return oA.context.with(E,async()=>{try{return await t(i,s)}catch(T){throw f.recordException(T),T}finally{f.end()}})})}};lG.KoaInstrumentation=dee});var pUe=M(DE=>{"use strict";A();Object.defineProperty(DE,"__esModule",{value:!0});DE.KoaLayerType=DE.AttributeNames=DE.KoaInstrumentation=void 0;var _Bt=dUe();Object.defineProperty(DE,"KoaInstrumentation",{enumerable:!0,get:function(){return _Bt.KoaInstrumentation}});var EBt=lee();Object.defineProperty(DE,"AttributeNames",{enumerable:!0,get:function(){return EBt.AttributeNames}});var yBt=aG();Object.defineProperty(DE,"KoaLayerType",{enumerable:!0,get:function(){return yBt.KoaLayerType}})});var fUe,mUe,AUe,SBt,gUe,hUe=B(()=>{A();fUe=ue(pUe(),1);Xn();mt();_r();VS();mUe="Koa",AUe=ct(mUe,fUe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){Kr(t,"auto.http.otel.koa");let r=Pt(t).data,o=r["koa.type"];o&&t.setAttribute(rn,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),xn()===ep()){ws&&W.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let s=r[vg],u=n.context?.request?.method?.toUpperCase()||"GET";s&&xn().setTransactionName(`${u} ${s}`)}})),SBt=((e={})=>({name:mUe,setupOnce(){AUe(e)}})),gUe=SBt});var pee=M(wf=>{"use strict";A();Object.defineProperty(wf,"__esModule",{value:!0});wf.ConnectNames=wf.ConnectTypes=wf.AttributeNames=void 0;var TBt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(TBt=wf.AttributeNames||(wf.AttributeNames={}));var bBt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(bBt=wf.ConnectTypes||(wf.ConnectTypes={}));var IBt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(IBt=wf.ConnectNames||(wf.ConnectNames={}))});var _Ue=M(HR=>{"use strict";A();Object.defineProperty(HR,"__esModule",{value:!0});HR.PACKAGE_NAME=HR.PACKAGE_VERSION=void 0;HR.PACKAGE_VERSION="0.57.0";HR.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var EUe=M(dG=>{"use strict";A();Object.defineProperty(dG,"__esModule",{value:!0});dG._LAYERS_STORE_PROPERTY=void 0;dG._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var yUe=M(wE=>{"use strict";A();Object.defineProperty(wE,"__esModule",{value:!0});wE.generateRoute=wE.replaceCurrentStackRoute=wE.addNewStackLayer=void 0;var CBt=(He(),Me(tt)),NE=EUe(),vBt=e=>{Array.isArray(e[NE._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,NE._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[NE._LAYERS_STORE_PROPERTY].push("/");let t=e[NE._LAYERS_STORE_PROPERTY].length;return()=>{t===e[NE._LAYERS_STORE_PROPERTY].length?e[NE._LAYERS_STORE_PROPERTY].pop():CBt.diag.warn("Connect: Trying to pop the stack multiple time")}};wE.addNewStackLayer=vBt;var RBt=(e,t)=>{t&&e[NE._LAYERS_STORE_PROPERTY].splice(-1,1,t)};wE.replaceCurrentStackRoute=RBt;var xBt=e=>e[NE._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);wE.generateRoute=xBt});var bUe=M(BE=>{"use strict";A();Object.defineProperty(BE,"__esModule",{value:!0});BE.ConnectInstrumentation=BE.ANONYMOUS_NAME=void 0;var DBt=(He(),Me(tt)),SUe=Rr(),$R=pee(),TUe=_Ue(),pG=cn(),NBt=(Xn(),Me(Vr)),fee=yUe();BE.ANONYMOUS_NAME="anonymous";var mee=class extends pG.InstrumentationBase{constructor(t={}){super(TUe.PACKAGE_NAME,TUe.PACKAGE_VERSION,t)}init(){return[new pG.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,pG.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,pG.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=$R.ConnectTypes.REQUEST_HANDLER,i=$R.ConnectNames.REQUEST_HANDLER,o=t):(r=$R.ConnectTypes.MIDDLEWARE,i=$R.ConnectNames.MIDDLEWARE,o=n.name||BE.ANONYMOUS_NAME);let s=`${i} - ${o}`,u={attributes:{[NBt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[$R.AttributeNames.CONNECT_TYPE]:r,[$R.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,fee.replaceCurrentStackRoute)(f,t);let E=(0,SUe.getRPCMetadata)(DBt.context.active());t&&E?.type===SUe.RPCType.HTTP&&(E.route=(0,fee.generateRoute)(f));let T="";t?T=`request handler - ${t}`:T=`middleware - ${n.name||BE.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,fee.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)}}};BE.ConnectInstrumentation=mee});var CUe=M(gp=>{"use strict";A();Object.defineProperty(gp,"__esModule",{value:!0});gp.ConnectTypes=gp.ConnectNames=gp.AttributeNames=gp.ANONYMOUS_NAME=gp.ConnectInstrumentation=void 0;var IUe=bUe();Object.defineProperty(gp,"ConnectInstrumentation",{enumerable:!0,get:function(){return IUe.ConnectInstrumentation}});Object.defineProperty(gp,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return IUe.ANONYMOUS_NAME}});var Aee=pee();Object.defineProperty(gp,"AttributeNames",{enumerable:!0,get:function(){return Aee.AttributeNames}});Object.defineProperty(gp,"ConnectNames",{enumerable:!0,get:function(){return Aee.ConnectNames}});Object.defineProperty(gp,"ConnectTypes",{enumerable:!0,get:function(){return Aee.ConnectTypes}})});var vUe,RUe,xUe,wBt,DUe,NUe=B(()=>{A();vUe=ue(CUe(),1);_r();RUe="Connect",xUe=ct(RUe,()=>new vUe.ConnectInstrumentation),wBt=(()=>({name:RUe,setupOnce(){xUe()}})),DUe=wBt});var wUe=M(da=>{"use strict";A();Object.defineProperty(da,"__esModule",{value:!0});da.DB_SYSTEM_VALUE_MSSQL=da.ATTR_NET_PEER_PORT=da.ATTR_NET_PEER_NAME=da.ATTR_DB_USER=da.ATTR_DB_SYSTEM=da.ATTR_DB_STATEMENT=da.ATTR_DB_SQL_TABLE=da.ATTR_DB_NAME=void 0;da.ATTR_DB_NAME="db.name";da.ATTR_DB_SQL_TABLE="db.sql.table";da.ATTR_DB_STATEMENT="db.statement";da.ATTR_DB_SYSTEM="db.system";da.ATTR_DB_USER="db.user";da.ATTR_NET_PEER_NAME="net.peer.name";da.ATTR_NET_PEER_PORT="net.peer.port";da.DB_SYSTEM_VALUE_MSSQL="mssql"});var BUe=M(qR=>{"use strict";A();Object.defineProperty(qR,"__esModule",{value:!0});qR.once=qR.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}`}qR.getSpanName=BBt;var kBt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};qR.once=kBt});var kUe=M(VR=>{"use strict";A();Object.defineProperty(VR,"__esModule",{value:!0});VR.PACKAGE_NAME=VR.PACKAGE_VERSION=void 0;VR.PACKAGE_VERSION="0.33.0";VR.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var UUe=M(OE=>{"use strict";A();Object.defineProperty(OE,"__esModule",{value:!0});OE.TediousInstrumentation=OE.INJECTED_CTX=void 0;var YR=(He(),Me(tt)),OBt=Ue("events"),iA=cn(),iT=(Xn(),Me(Vr)),kE=wUe(),OUe=BUe(),PUe=kUe(),LUe=Symbol("opentelemetry.instrumentation-tedious.current-database");OE.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var MUe=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function fG(e){Object.defineProperty(this,LUe,{value:e,writable:!0})}var gee=class e extends iA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(PUe.PACKAGE_NAME,PUe.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 MUe)(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 MUe)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return fG.call(this,this.config?.options?.database),this.removeListener("databaseChange",fG),this.on("databaseChange",fG),this.once("end",()=>{this.removeListener("databaseChange",fG)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||YR.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,OE.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?.[OE.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[LUe],E=(G=>G.sqlTextOrProcedure==="sp_prepare"&&G.parametersByName?.stmt?.value?G.parametersByName.stmt.value:G.sqlTextOrProcedure)(s),T={};o._dbSemconvStability&iA.SemconvStability.OLD&&(T[kE.ATTR_DB_SYSTEM]=kE.DB_SYSTEM_VALUE_MSSQL,T[kE.ATTR_DB_NAME]=_,T[kE.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,T[kE.ATTR_DB_STATEMENT]=E,T[kE.ATTR_DB_SQL_TABLE]=s.table),o._dbSemconvStability&iA.SemconvStability.STABLE&&(T[iT.ATTR_DB_NAMESPACE]=_,T[iT.ATTR_DB_SYSTEM_NAME]=iT.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,T[iT.ATTR_DB_QUERY_TEXT]=E,T[iT.ATTR_DB_COLLECTION_NAME]=s.table),o._netSemconvStability&iA.SemconvStability.OLD&&(T[kE.ATTR_NET_PEER_NAME]=this.config?.server,T[kE.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&iA.SemconvStability.STABLE&&(T[iT.ATTR_SERVER_ADDRESS]=this.config?.server,T[iT.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,OUe.getSpanName)(t,_,E,s.table),{kind:YR.SpanKind.CLIENT,attributes:T}),R=(0,OUe.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:YR.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=()=>YR.context.with(YR.trace.setSpan(YR.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)}}};OE.TediousInstrumentation=gee});var QUe=M(mG=>{"use strict";A();Object.defineProperty(mG,"__esModule",{value:!0});mG.TediousInstrumentation=void 0;var PBt=UUe();Object.defineProperty(mG,"TediousInstrumentation",{enumerable:!0,get:function(){return PBt.TediousInstrumentation}})});var FUe,MBt,GUe,jUe,LBt,zUe,HUe=B(()=>{A();FUe=ue(QUe(),1);mt();_r();MBt=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),GUe="Tedious",jUe=ct(GUe,()=>new FUe.TediousInstrumentation({})),LBt=(()=>{let e;return{name:GUe,setupOnce(){let t=jUe();e=IB(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:r,data:o}=Pt(n);if(!r||o["db.system"]!=="mssql")return;let i=r.split(" ")[0]||"";MBt.has(i)&&n.setAttribute(Lt,"auto.db.otel.tedious")}))}}}),zUe=LBt});var $Ue=M(KR=>{"use strict";A();Object.defineProperty(KR,"__esModule",{value:!0});KR.PACKAGE_NAME=KR.PACKAGE_VERSION=void 0;KR.PACKAGE_VERSION="0.57.0";KR.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var VUe=M(AG=>{"use strict";A();Object.defineProperty(AG,"__esModule",{value:!0});AG.GenericPoolInstrumentation=void 0;var JR=(He(),Me(tt)),sT=cn(),qUe=$Ue(),hee="generic-pool",_ee=class extends sT.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(qUe.PACKAGE_NAME,qUe.PACKAGE_VERSION,t)}init(){return[new sT.InstrumentationNodeModuleDefinition(hee,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,sT.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 sT.InstrumentationNodeModuleDefinition(hee,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,sT.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 sT.InstrumentationNodeModuleDefinition(hee,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,sT.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=JR.context.active(),s=n.tracer.startSpan("generic-pool.acquire",{},i);return JR.context.with(JR.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=JR.context.active(),u=n.tracer.startSpan("generic-pool.acquire",{},s);return JR.context.with(JR.trace.setSpan(s,u),()=>{t.call(this,(l,f)=>{if(u.end(),o)return o(l,f)},i)})}}};AG.GenericPoolInstrumentation=_ee});var YUe=M(gG=>{"use strict";A();Object.defineProperty(gG,"__esModule",{value:!0});gG.GenericPoolInstrumentation=void 0;var UBt=VUe();Object.defineProperty(gG,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return UBt.GenericPoolInstrumentation}})});var KUe,JUe,ZUe,QBt,WUe,XUe=B(()=>{A();KUe=ue(YUe(),1);mt();_r();JUe="GenericPool",ZUe=ct(JUe,()=>new KUe.GenericPoolInstrumentation({})),QBt=(()=>{let e;return{name:JUe,setupOnce(){let t=ZUe();e=IB(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=Pt(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(Lt,"auto.db.otel.generic_pool")}))}}}),WUe=QBt});var Eee=M(sA=>{"use strict";A();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 yee=M(Si=>{"use strict";A();Object.defineProperty(Si,"__esModule",{value:!0});Si.ATTR_MESSAGING_CONVERSATION_ID=Si.OLD_ATTR_MESSAGING_MESSAGE_ID=Si.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=Si.ATTR_MESSAGING_URL=Si.ATTR_MESSAGING_PROTOCOL_VERSION=Si.ATTR_MESSAGING_PROTOCOL=Si.MESSAGING_OPERATION_VALUE_PROCESS=Si.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=Si.ATTR_MESSAGING_DESTINATION_KIND=Si.ATTR_MESSAGING_DESTINATION=void 0;Si.ATTR_MESSAGING_DESTINATION="messaging.destination";Si.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";Si.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";Si.MESSAGING_OPERATION_VALUE_PROCESS="process";Si.ATTR_MESSAGING_PROTOCOL="messaging.protocol";Si.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";Si.ATTR_MESSAGING_URL="messaging.url";Si.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";Si.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";Si.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var See=M(aT=>{"use strict";A();Object.defineProperty(aT,"__esModule",{value:!0});aT.DEFAULT_CONFIG=aT.EndOperation=void 0;var FBt;(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"})(FBt=aT.EndOperation||(aT.EndOperation={}));aT.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var rQe=M(Ti=>{"use strict";A();Object.defineProperty(Ti,"__esModule",{value:!0});Ti.isConfirmChannelTracing=Ti.unmarkConfirmChannelTracing=Ti.markConfirmChannelTracing=Ti.getConnectionAttributesFromUrl=Ti.getConnectionAttributesFromServer=Ti.normalizeExchange=Ti.CONNECTION_ATTRIBUTES=Ti.CHANNEL_CONSUME_TIMEOUT_TIMER=Ti.CHANNEL_SPANS_NOT_ENDED=Ti.MESSAGE_STORED_SPAN=void 0;var Tee=(He(),Me(tt)),PE=cn(),hG=(Xn(),Me(Vr)),jk=Eee(),_G=yee();Ti.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");Ti.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");Ti.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");Ti.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var bee=(0,Tee.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),GBt=e=>e!==""?e:"<default>";Ti.normalizeExchange=GBt;var jBt=e=>e.replace(/:[^:@/]*@/,":***@"),eQe=(e,t)=>e||(t==="AMQP"?5672:5671),tQe=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},nQe=e=>e||"localhost",aA=(e,t,n,r)=>n?{[t]:n}:(Tee.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),zBt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[jk.ATTR_MESSAGING_SYSTEM]:t}:{}};Ti.getConnectionAttributesFromServer=zBt;var HBt=(e,t)=>{let n={[_G.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=tQe(r?.protocol);Object.assign(n,{...aA(e,_G.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=nQe(r?.hostname);t&PE.SemconvStability.OLD&&Object.assign(n,{...aA(e,jk.ATTR_NET_PEER_NAME,i,"hostname")}),t&PE.SemconvStability.STABLE&&Object.assign(n,{...aA(e,hG.ATTR_SERVER_ADDRESS,i,"hostname")});let s=eQe(r.port,o);t&PE.SemconvStability.OLD&&Object.assign(n,aA(e,jk.ATTR_NET_PEER_PORT,s,"port")),t&PE.SemconvStability.STABLE&&Object.assign(n,aA(e,hG.ATTR_SERVER_PORT,s,"port"))}else{let r=jBt(e);n[_G.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=tQe(o.protocol);Object.assign(n,{...aA(r,_G.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let s=nQe(o.hostname);t&PE.SemconvStability.OLD&&Object.assign(n,{...aA(r,jk.ATTR_NET_PEER_NAME,s,"hostname")}),t&PE.SemconvStability.STABLE&&Object.assign(n,{...aA(r,hG.ATTR_SERVER_ADDRESS,s,"hostname")});let u=eQe(o.port?parseInt(o.port):void 0,i);t&PE.SemconvStability.OLD&&Object.assign(n,aA(r,jk.ATTR_NET_PEER_PORT,u,"port")),t&PE.SemconvStability.STABLE&&Object.assign(n,aA(r,hG.ATTR_SERVER_PORT,u,"port"))}catch(o){Tee.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};Ti.getConnectionAttributesFromUrl=HBt;var $Bt=e=>e.setValue(bee,!0);Ti.markConfirmChannelTracing=$Bt;var qBt=e=>e.deleteValue(bee);Ti.unmarkConfirmChannelTracing=qBt;var VBt=e=>e.getValue(bee)===!0;Ti.isConfirmChannelTracing=VBt});var oQe=M(ZR=>{"use strict";A();Object.defineProperty(ZR,"__esModule",{value:!0});ZR.PACKAGE_NAME=ZR.PACKAGE_VERSION=void 0;ZR.PACKAGE_VERSION="0.61.0";ZR.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var sQe=M(SG=>{"use strict";A();Object.defineProperty(SG,"__esModule",{value:!0});SG.AmqplibInstrumentation=void 0;var oi=(He(),Me(tt)),EG=Rr(),Dr=cn(),YBt=Eee(),id=yee(),oc=See(),bi=rQe(),iQe=oQe(),yG=[">=0.5.5 <1"],Iee=class extends Dr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(iQe.PACKAGE_NAME,iQe.PACKAGE_VERSION,{...oc.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Dr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...oc.DEFAULT_CONFIG,...t})}init(){let t=new Dr.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",yG,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new Dr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",yG,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new Dr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",yG,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new Dr.InstrumentationNodeModuleDefinition("amqplib",yG,void 0,void 0,[t,r,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,Dr.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,Dr.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,Dr.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,Dr.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,Dr.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,oc.EndOperation.Ack)),(0,Dr.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,oc.EndOperation.Nack)),(0,Dr.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,oc.EndOperation.Reject)),(0,Dr.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,oc.EndOperation.AckAll)),(0,Dr.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,oc.EndOperation.NackAll)),(0,Dr.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,Dr.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,Dr.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,Dr.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,Dr.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,Dr.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,Dr.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,Dr.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,Dr.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,Dr.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,Dr.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,bi.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,bi.getConnectionAttributesFromServer)(l);l[bi.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[bi.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[bi.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[bi.CHANNEL_SPANS_NOT_ENDED]??[],E=_.findIndex(T=>T.msg===s);if(E<0)o.endConsumerSpan(s,t,n,h);else if(n!==oc.EndOperation.Reject&&u){for(let T=0;T<=E;T++)o.endConsumerSpan(_[T].msg,t,n,h);_.splice(0,E+1)}else o.endConsumerSpan(s,t,n,h),_.splice(E,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,bi.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let _=setInterval(()=>{r.checkConsumeTimeoutOnChannel(l)},h);_.unref(),l[bi.CHANNEL_CONSUME_TIMEOUT_TIMER]=_}l[bi.CHANNEL_SPANS_NOT_ENDED]=[]}let f=function(h){if(!h)return s.call(this,h);let _=h.properties.headers??{},E=oi.propagation.extract(oi.ROOT_CONTEXT,_),T=h.fields?.exchange,v;if(r._config.useLinksForConsume){let P=E?oi.trace.getSpan(E)?.spanContext():void 0;E=void 0,P&&(v=[{context:P}])}let R=r.tracer.startSpan(`${i} process`,{kind:oi.SpanKind.CONSUMER,attributes:{...l?.connection?.[bi.CONNECTION_ATTRIBUTES],[id.ATTR_MESSAGING_DESTINATION]:T,[id.ATTR_MESSAGING_DESTINATION_KIND]:id.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[id.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[YBt.ATTR_MESSAGING_OPERATION]:id.MESSAGING_OPERATION_VALUE_PROCESS,[id.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[id.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:v},E),{consumeHook:x}=r.getConfig();x&&(0,Dr.safeExecuteInTheMiddle)(()=>x(R,{moduleVersion:t,msg:h}),P=>{P&&oi.diag.error("amqplib instrumentation: consumerHook error",P)},!0),u?.noAck||(l[bi.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,EG.hrTime)()}),h[bi.MESSAGE_STORED_SPAN]=R);let k=E||oi.ROOT_CONTEXT;oi.context.with(oi.trace.setSpan(k,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:E}=r.createPublishSpan(r,i,s,h,l),{publishHook:T}=r.getConfig();T&&(0,Dr.safeExecuteInTheMiddle)(()=>T(_,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:E,isConfirmChannel:!0}),k=>{k&&oi.diag.error("amqplib instrumentation: publishHook error",k)},!0);let v=function(k,P){try{f?.call(this,k,P)}finally{let{publishConfirmHook:j}=r.getConfig();j&&(0,Dr.safeExecuteInTheMiddle)(()=>j(_,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:l,isConfirmChannel:!0,confirmError:k}),G=>{G&&oi.diag.error("amqplib instrumentation: publishConfirmHook error",G)},!0),k&&_.setStatus({code:oi.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),_.end()}},R=(0,bi.markConfirmChannelTracing)(oi.context.active()),x=[...arguments];return x[3]=E,x[4]=oi.context.bind((0,bi.unmarkConfirmChannelTracing)(oi.trace.setSpan(R,_)),v),oi.context.with(R,n.bind(this,...x))}}getPublishPatch(t,n){let r=this;return function(i,s,u,l){if((0,bi.isConfirmChannelTracing)(oi.context.active()))return n.apply(this,arguments);{let f=this,{span:h,modifiedOptions:_}=r.createPublishSpan(r,i,s,f,l),{publishHook:E}=r.getConfig();E&&(0,Dr.safeExecuteInTheMiddle)(()=>E(h,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:_,isConfirmChannel:!1}),R=>{R&&oi.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,bi.normalizeExchange)(n),u=t.tracer.startSpan(`publish ${s}`,{kind:oi.SpanKind.PRODUCER,attributes:{...o.connection[bi.CONNECTION_ATTRIBUTES],[id.ATTR_MESSAGING_DESTINATION]:n,[id.ATTR_MESSAGING_DESTINATION_KIND]:id.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[id.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[id.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[id.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),l=i??{};return l.headers=l.headers??{},oi.propagation.inject(oi.trace.setSpan(oi.context.active(),u),l.headers),{span:u,modifiedOptions:l}}endConsumerSpan(t,n,r,o){let i=t[bi.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:oi.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[bi.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[bi.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(s=>{this.endConsumerSpan(s.msg,n,r,o)}),t[bi.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(t,n,r,o){let{consumeEndHook:i}=this.getConfig();i&&(0,Dr.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:r,endOperation:o}),s=>{s&&oi.diag.error("amqplib instrumentation: consumerEndHook error",s)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,EG.hrTime)(),r=t[bi.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let s=r[o],u=(0,EG.hrTimeDuration)(s.timeOfConsume,n);if((0,EG.hrTimeToMilliseconds)(u)<i)break;this.endConsumerSpan(s.msg,null,oc.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};SG.AmqplibInstrumentation=Iee});var uQe=M(ME=>{"use strict";A();Object.defineProperty(ME,"__esModule",{value:!0});ME.EndOperation=ME.DEFAULT_CONFIG=ME.AmqplibInstrumentation=void 0;var KBt=sQe();Object.defineProperty(ME,"AmqplibInstrumentation",{enumerable:!0,get:function(){return KBt.AmqplibInstrumentation}});var aQe=See();Object.defineProperty(ME,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return aQe.DEFAULT_CONFIG}});Object.defineProperty(ME,"EndOperation",{enumerable:!0,get:function(){return aQe.EndOperation}})});var cQe,lQe,JBt,dQe,ZBt,pQe,fQe=B(()=>{A();cQe=ue(uQe(),1);_r();lQe="Amqplib",JBt={consumeEndHook:e=>{Kr(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Kr(e,"auto.amqplib.otel.publisher")}},dQe=ct(lQe,()=>new cQe.AmqplibInstrumentation(JBt)),ZBt=(()=>({name:lQe,setupOnce(){dQe()}})),pQe=ZBt});var zk,Cee=B(()=>{A();zk="VercelAI"});function XBt(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 ekt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(tkt(t.content),nkt(t.content))}function tkt(e){for(let t of e){if(!XBt(t))continue;let n=tJ(t.toolCallId);n?Vl(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"),an(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):Vl(r=>{r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),an(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function nkt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&nJ(t.toolCallId)}function rkt(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 bG,WBt,mQe,TG,AQe=B(()=>{A();bG=ue(cn(),1);mt();Cee();WBt=[">=3.0.0 <7"],mQe=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];TG=class e extends bG.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 bG.InstrumentationNodeModuleDefinition("ai",WBt,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(zk),_=h?.options,E=h?!!f?.getOptions().sendDefaultPii:!1,{recordInputs:T,recordOutputs:v}=rkt(_,u,l,E);return s[0].experimental_telemetry={...u,isEnabled:l!==void 0?l:!0,recordInputs:T,recordOutputs:v},Cf(()=>Reflect.apply(o,i,s),R=>{R&&typeof R=="object"&&os(R,"_sentry_active_span",$c())},()=>{},R=>{ekt(R)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of mQe)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=mQe.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function okt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var gQe,ikt,hQe,_Qe=B(()=>{A();mt();_r();Cee();AQe();gQe=ct(zk,()=>new TG({}));ikt=((e={})=>{let t;return{name:zk,options:e,setupOnce(){t=gQe()},afterAllSetup(n){e.force??okt(n)?xF(n):t?.callWhenPatched(()=>xF(n))}}}),hQe=ikt});var CG,skt,IG,EQe=B(()=>{A();CG=ue(cn(),1);mt();skt=[">=4.0.0 <7"],IG=class extends CG.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",er,t)}init(){return new CG.InstrumentationNodeModuleDefinition("openai",skt,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(NS(sE))return Reflect.construct(r,s);let u=Reflect.construct(r,s);return wF(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 yQe,akt,SQe,TQe=B(()=>{A();mt();_r();EQe();yQe=ct(sE,e=>new IG(e)),akt=((e={})=>({name:sE,setupOnce(){yQe(e)}})),SQe=akt});var RG,ukt,vG,bQe=B(()=>{A();RG=ue(cn(),1);mt();ukt=[">=0.19.2 <1.0.0"],vG=class extends RG.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",er,t)}init(){return new RG.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",ukt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(NS(aE))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return BF(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 IQe,ckt,CQe,vQe=B(()=>{A();mt();_r();bQe();IQe=ct(aE,e=>new vG(e)),ckt=((e={})=>({name:aE,options:e,setupOnce(){IQe(e)}})),CQe=ckt});var WR,RQe,xG,xQe=B(()=>{A();WR=ue(cn(),1);mt();RQe=[">=0.10.0 <2"],xG=class extends WR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",er,t)}init(){return new WR.InstrumentationNodeModuleDefinition("@google/genai",RQe,n=>this._patch(n),n=>n,[new WR.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",RQe,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(NS(uE))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return kF(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 TB(t,"GoogleGenAI",o),t}}});var DQe,lkt,NQe,wQe=B(()=>{A();mt();_r();xQe();DQe=ct(uE,e=>new xG(e)),lkt=((e={})=>({name:uE,setupOnce(){DQe(e)}})),NQe=lkt});function dkt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function pkt(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=dkt(l,t);return u.callbacks=f,Reflect.apply(r,o,i)}})}var LE,DG,NG,BQe=B(()=>{A();LE=ue(cn(),1);mt();DG=[">=0.1.0 <2.0.0"];NG=class extends LE.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",er,t)}init(){let t=[],n=["@langchain/anthropic","@langchain/openai","@langchain/google-genai","@langchain/mistralai","@langchain/google-vertexai","@langchain/groq"];for(let r of n)t.push(new LE.InstrumentationNodeModuleDefinition(r,DG,this._patch.bind(this),o=>o,[new LE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,DG,this._patch.bind(this),o=>o)]));return t.push(new LE.InstrumentationNodeModuleDefinition("langchain",DG,this._patch.bind(this),r=>r,[new LE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",DG,this._patch.bind(this),r=>r)])),t}_patch(t){_K([sE,aE,uE]);let n=LF(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]=pkt(f,n))}}}});var kQe,fkt,OQe,PQe=B(()=>{A();mt();_r();BQe();kQe=ct(OF,e=>new NG(e)),fkt=((e={})=>({name:OF,setupOnce(){kQe(e)}})),OQe=fkt});var XR,MQe,wG,LQe=B(()=>{A();XR=ue(cn(),1);mt();MQe=[">=0.0.0 <2.0.0"],wG=class extends XR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",er,t)}init(){return new XR.InstrumentationNodeModuleDefinition("@langchain/langgraph",MQe,this._patch.bind(this),n=>n,[new XR.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",MQe,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&QF(t.StateGraph.prototype,this.getConfig()),t}}});var UQe,mkt,QQe,FQe=B(()=>{A();mt();_r();LQe();UQe=ct(UF,e=>new wG(e)),mkt=((e={})=>({name:UF,setupOnce(){UQe(e)}})),QQe=mkt});import*as jQe from"node:net";function zQe(e,t,n,r,o){let s=()=>{},u=o.firestoreSpanCreationHook;typeof u=="function"&&(s=h=>{(0,eh.safeExecuteInTheMiddle)(()=>u(h),_=>{_&&Hl.error(_?.message)},!0)});let l=new eh.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>GQe(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 eh.InstrumentationNodeModuleFile(h,t,_=>GQe(_,n,r,e,s),_=>HQe(_,r)));return l}function GQe(e,t,n,r,o){return HQe(e,n),t(e,"addDoc",Akt(r,o)),t(e,"getDocs",hkt(r,o)),t(e,"setDoc",_kt(r,o)),t(e,"deleteDoc",gkt(r,o)),e}function HQe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,eh.isWrapped)(e[n])&&t(e,n);return e}function Akt(e,t){return function(r){return function(o,i){let s=kG(e,"addDoc",o);return t(s),BG(s,()=>r(o,i))}}}function gkt(e,t){return function(r){return function(o){let i=kG(e,"deleteDoc",o.parent||o);return t(i),BG(i,()=>r(o))}}}function hkt(e,t){return function(r){return function(o){let i=kG(e,"getDocs",o);return t(i),BG(i,()=>r(o))}}}function _kt(e,t){return function(r){return function(o,i,s){let u=kG(e,"setDoc",o.parent||o);return t(u),BG(u,()=>typeof s<"u"?r(o,i,s):r(o,i))}}}function BG(e,t){return We.with(Jt.setSpan(We.active(),e),()=>(0,eh.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function kG(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:Ao.CLIENT});return ykt(r,n),r.setAttribute(QC,t),r}function Ekt(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(jQe.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 ykt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},s={[jV]:t.path,[zV]:n.name,[pS]:"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}=Ekt(i);u&&(s[ZV]=u),l&&(s[WV]=l),e.setAttributes(s)}var eh,$Qe=B(()=>{A();He();eh=ue(cn(),1);Xn()});function qQe(e,t,n,r,o){let i=()=>{},s=()=>{},u=o.functions?.errorHook,l=o.functions?.requestHook,f=o.functions?.responseHook;typeof f=="function"&&(s=(E,T)=>{(0,th.safeExecuteInTheMiddle)(()=>f(E,T),v=>{v&&Hl.error(v?.message)},!0)}),typeof l=="function"&&(i=E=>{(0,th.safeExecuteInTheMiddle)(()=>l(E),T=>{T&&Hl.error(T?.message)},!0)});let h=new th.InstrumentationNodeModuleDefinition("firebase-functions",t);return[{name:"firebase-functions/lib/v2/providers/https.js",triggerType:"function"},{name:"firebase-functions/lib/v2/providers/firestore.js",triggerType:"firestore"},{name:"firebase-functions/lib/v2/providers/scheduler.js",triggerType:"scheduler"},{name:"firebase-functions/lib/v2/storage.js",triggerType:"storage"}].forEach(({name:E,triggerType:T})=>{h.files.push(new th.InstrumentationNodeModuleFile(E,t,v=>Skt(v,n,r,e,{requestHook:i,responseHook:s,errorHook:u},T),v=>VQe(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:Ao.SERVER}),E={"faas.name":h,"faas.trigger":n,"faas.provider":"firebase"};return process.env.GCLOUD_PROJECT&&(E["cloud.project_id"]=process.env.GCLOUD_PROJECT),process.env.EVENTARC_CLOUD_EVENT_SOURCE&&(E["cloud.event_source"]=process.env.EVENTARC_CLOUD_EVENT_SOURCE),_.setAttributes(E),t?.requestHook?.(_),We.with(Jt.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 Skt(e,t,n,r,o,i){switch(VQe(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 VQe(e,t){let n=["onSchedule","onRequest","onCall","onObjectFinalized","onObjectArchived","onObjectDeleted","onObjectMetadataUpdated","onDocumentCreated","onDocumentUpdated","onDocumentDeleted","onDocumentWritten","onDocumentCreatedWithAuthContext","onDocumentUpdatedWithAuthContext","onDocumentDeletedWithAuthContext","onDocumentWrittenWithAuthContext"];for(let r of n)(0,th.isWrapped)(e[r])&&t(e,r);return e}var th,YQe=B(()=>{A();He();th=ue(cn(),1)});var JQe,KQe,Tkt,bkt,OG,ZQe=B(()=>{A();JQe=ue(cn(),1);mt();$Qe();YQe();KQe={},Tkt=[">=3.0.0 <5"],bkt=[">=6.0.0 <7"],OG=class extends JQe.InstrumentationBase{constructor(t=KQe){super("@sentry/instrumentation-firebase",er,t)}setConfig(t={}){super.setConfig({...KQe,...t})}init(){let t=[];return t.push(zQe(this.tracer,Tkt,this._wrap,this._unwrap,this.getConfig())),t.push(qQe(this.tracer,bkt,this._wrap,this._unwrap,this.getConfig())),t}}});var WQe,Ikt,XQe,Ckt,eFe,tFe=B(()=>{A();mt();_r();ZQe();WQe="Firebase",Ikt={firestoreSpanCreationHook:e=>{Kr(e,"auto.firebase.otel.firestore"),e.setAttribute(rn,"db.query")},functions:{requestHook:e=>{Kr(e,"auto.firebase.otel.functions"),e.setAttribute(rn,"http.request")},errorHook:async(e,t)=>{t&&(an(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await bv(2e3))}}},XQe=ct(WQe,()=>new OG(Ikt)),Ckt=(()=>({name:WQe,setupOnce(){XQe()}})),eFe=Ckt});function nFe(){return[ike(),QOe(),pPe(),eUe(),XPe(),mMe(),vMe(),UMe(),g2e(),L2e(),PLe(),KLe(),gUe(),DUe(),zUe(),WUe(),DPe(),pQe(),FPe(),OQe(),QQe(),hQe(),SQe(),CQe(),NQe(),G2e(),eFe()]}var rFe=B(()=>{A();fQe();vQe();NUe();ske();jOe();tFe();XUe();wQe();mPe();JLe();tUe();NPe();hUe();PQe();FQe();GPe();eMe();AMe();RMe();QMe();TQe();U2e();j2e();MLe();h2e();HUe();_Qe()});function iFe(e,t={}){e.getOptions().debug&&kZ();let[n,r]=vkt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function vkt(e,t={}){let n=new oFe.BasicTracerProvider({sampler:new $4(e),resource:(0,PG.defaultResource)().merge((0,PG.resourceFromAttributes)({[XV]:"node",[GV]:"sentry",[e7]:er})),forceFlushTimeoutMillis:500,spanProcessors:[new H4({timeout:Rkt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});Jt.setGlobalTracerProvider(n),Af.setGlobalPropagator(new z4);let r=new V4;return We.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function Rkt(e){if(e!=null){if(e>vee)return ws&&W.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${vee}`),vee;if(e<=0||Number.isNaN(e)){ws&&W.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var PG,oFe,vee,sFe=B(()=>{A();He();PG=ue(qJ(),1),oFe=ue(_Z(),1);Xn();mt();_r();tR();VS();vee=1e6});function aFe(){return e3().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(PBe(),HBe())}function uFe(e){return[...aFe(),...Qi(e)?nFe():[]]}function Ree(e={}){return xkt(e,uFe)}function xkt(e={},t){wS(e,"node");let n=iW({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(iFe(n,{spanProcessors:e.openTelemetrySpanProcessors}),t3()),n}var cFe=B(()=>{A();mt();_r();MBe();$Be();rFe();sFe()});var ex=B(()=>{A();cFe();mt();_r()});function zr(){return Dkt}function hu(){return lFe}function dFe(){return Nkt}var Dkt,lFe,Nkt,sc=B(()=>{"use strict";A();Dkt="prod",lFe="0.1.229",Nkt=`@loredotlink/cli/${lFe}`});function Pkt(e=""){if(!kkt.test(e))return e!==e.toLowerCase()}function fFe(e,t){let n=t??Okt,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=Pkt(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 Mkt(e){return e?e[0].toUpperCase()+e.slice(1):""}function Lkt(e){return e?e[0].toLowerCase()+e.slice(1):""}function Ukt(e,t){return e?(Array.isArray(e)?e:fFe(e)).map(n=>Mkt(t?.normalize?n.toLowerCase():n)).join(""):""}function $k(e,t){return Lkt(Ukt(e||"",t))}function MG(e,t){return e?(Array.isArray(e)?e:fFe(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function mFe(e){return MG(e||"","_")}var kkt,Okt,AFe=B(()=>{A();kkt=/\d/,Okt=["-","_","/","."]});import{parseArgs as Qkt}from"node:util";function FG(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function Dee(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 sX(e,t,n,r=void 0){n&&(0,Ak.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&tMe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function YDt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(sX(t,o,n,r),o)).catch(o=>{throw nMe(t,o),o}).finally(()=>t.end()):(sX(t,e,n,r),t.end(),e)}_E.handlePromiseResponse=YDt;function KDt(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?nMe(r,l):sX(r,f,i,s),r.end(),e(l,f)),t.apply(n,o)}_E.handleCallbackResponse=KDt});var oMe=M(bR=>{"use strict";A();Object.defineProperty(bR,"__esModule",{value:!0});bR.PACKAGE_NAME=bR.PACKAGE_VERSION=void 0;bR.PACKAGE_VERSION="0.60.0";bR.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var cMe=M(Zc=>{"use strict";A();Object.defineProperty(Zc,"__esModule",{value:!0});Zc.MongooseInstrumentation=Zc._ALREADY_INSTRUMENTED=Zc._STORED_PARENT_SPAN=void 0;var ks=(He(),Me(tt)),JDt=Rr(),aX=rMe(),Qa=cn(),iMe=oMe(),EE=iX(),eT=(Xn(),Me(Vr)),a6=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],ZDt=["remove","count","findOneAndRemove",...a6],WDt=["count","findOneAndRemove",...a6],XDt=[...a6];function sMe(e){return e?e.startsWith("6.")||e.startsWith("5.")?ZDt:e.startsWith("7.")?WDt:XDt:a6}function aMe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function uMe(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Zc._STORED_PARENT_SPAN=Symbol("stored-parent-span");Zc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var uX=class extends Qa.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(iMe.PACKAGE_NAME,iMe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Qa.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Qa.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new Qa.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,aMe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),uMe(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)),sMe(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=sMe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,aMe(n)&&this._unwrap(r.Model.prototype,"remove"),uMe(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&&ks.trace.getSpan(ks.context.active())===void 0)return r.apply(this,arguments);let s=this[Zc._STORED_PARENT_SPAN],u={},{dbStatementSerializer:l}=n.getConfig();if(l){let h=l("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&Qa.SemconvStability.OLD&&(u[EE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Qa.SemconvStability.STABLE&&(u[eT.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[Zc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&ks.trace.getSpan(ks.context.active())===void 0)return r.apply(this,arguments);let s=this[Zc._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&Qa.SemconvStability.OLD&&(u[EE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Qa.SemconvStability.STABLE&&(u[eT.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&&ks.trace.getSpan(ks.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 E=h(t,l);r._dbSemconvStability&Qa.SemconvStability.OLD&&(f[EE.ATTR_DB_STATEMENT]=E),r._dbSemconvStability&Qa.SemconvStability.STABLE&&(f[eT.ATTR_DB_QUERY_TEXT]=E)}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&&ks.trace.getSpan(ks.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 E={},T=r.getConfig().dbStatementSerializer;if(T){let x=T(t,{condition:{_id:this._id},updates:h,options:_});r._dbSemconvStability&Qa.SemconvStability.OLD&&(E[EE.ATTR_DB_STATEMENT]=x),r._dbSemconvStability&Qa.SemconvStability.STABLE&&(E[eT.ATTR_DB_QUERY_TEXT]=x)}let v=r._startSpan(this.constructor.collection,this.constructor.modelName,t,E),R=r._handleResponse(v,o,this,arguments,f,n);return R&&typeof R=="object"&&(R[Zc._ALREADY_INSTRUMENTED]=!0),R}}patchModelStatic(t,n){let r=this;return o=>function(s,u,l){if(r.getConfig().requireParentSpan&&ks.trace.getSpan(ks.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&Qa.SemconvStability.OLD&&(h[EE.ATTR_DB_STATEMENT]=T),r._dbSemconvStability&Qa.SemconvStability.STABLE&&(h[eT.ATTR_DB_QUERY_TEXT]=T)}let E=r._startSpan(this.collection,this.modelName,t,h);return r._handleResponse(E,o,this,arguments,l,n)}}patchModelAggregate(){let t=this;return n=>function(){let o=ks.trace.getSpan(ks.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Zc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[Zc._STORED_PARENT_SPAN]=ks.trace.getSpan(ks.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let s={...o,...(0,aX.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&Qa.SemconvStability.OLD&&(s[EE.ATTR_DB_OPERATION]=r,s[EE.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&Qa.SemconvStability.STABLE&&(s[eT.ATTR_DB_OPERATION_NAME]=r,s[eT.ATTR_DB_SYSTEM_NAME]=EE.DB_SYSTEM_NAME_VALUE_MONGODB);let u=this._dbSemconvStability&Qa.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(u,{kind:ks.SpanKind.CLIENT,attributes:s},i?ks.trace.setSpan(ks.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,aX.handleCallbackResponse)(i,n,r,t,o,u.getConfig().responseHook,s));{let l=u._callOriginalFunction(()=>n.apply(r,o));return(0,aX.handlePromiseResponse)(l,t,u.getConfig().responseHook,s)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?ks.context.with((0,JDt.suppressTracing)(ks.context.active()),t):t()}};Zc.MongooseInstrumentation=uX});var lMe=M(u6=>{"use strict";A();Object.defineProperty(u6,"__esModule",{value:!0});u6.MongooseInstrumentation=void 0;var e1t=cMe();Object.defineProperty(u6,"MongooseInstrumentation",{enumerable:!0,get:function(){return e1t.MongooseInstrumentation}})});var dMe,pMe,fMe,t1t,mMe,AMe=B(()=>{A();dMe=ue(lMe(),1);_r();pMe="Mongoose",fMe=ct(pMe,()=>new dMe.MongooseInstrumentation({responseHook(e){Kr(e,"auto.db.otel.mongoose")}})),t1t=(()=>({name:pMe,setupOnce(){fMe()}})),mMe=t1t});var gMe=M(ls=>{"use strict";A();Object.defineProperty(ls,"__esModule",{value:!0});ls.METRIC_DB_CLIENT_CONNECTIONS_USAGE=ls.DB_SYSTEM_VALUE_MYSQL=ls.ATTR_NET_PEER_PORT=ls.ATTR_NET_PEER_NAME=ls.ATTR_DB_USER=ls.ATTR_DB_SYSTEM=ls.ATTR_DB_STATEMENT=ls.ATTR_DB_NAME=ls.ATTR_DB_CONNECTION_STRING=void 0;ls.ATTR_DB_CONNECTION_STRING="db.connection_string";ls.ATTR_DB_NAME="db.name";ls.ATTR_DB_STATEMENT="db.statement";ls.ATTR_DB_SYSTEM="db.system";ls.ATTR_DB_USER="db.user";ls.ATTR_NET_PEER_NAME="net.peer.name";ls.ATTR_NET_PEER_PORT="net.peer.port";ls.DB_SYSTEM_VALUE_MYSQL="mysql";ls.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var hMe=M(gk=>{"use strict";A();Object.defineProperty(gk,"__esModule",{value:!0});gk.AttributeNames=void 0;var n1t;(function(e){e.MYSQL_VALUES="db.mysql.values"})(n1t=gk.AttributeNames||(gk.AttributeNames={}))});var _Me=M(mu=>{"use strict";A();Object.defineProperty(mu,"__esModule",{value:!0});mu.getPoolNameOld=mu.arrayStringifyHelper=mu.getSpanName=mu.getDbValues=mu.getDbQueryText=mu.getJDBCString=mu.getConfig=void 0;function r1t(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}mu.getConfig=r1t;function o1t(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}mu.getJDBCString=o1t;function i1t(e){return typeof e=="string"?e:e.sql}mu.getDbQueryText=i1t;function s1t(e,t){return cX(typeof e=="string"?t:t||e.values)}mu.getDbValues=s1t;function a1t(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}mu.getSpanName=a1t;function cX(e){return e?`[${e.toString()}]`:""}mu.arrayStringifyHelper=cX;function u1t(e){let t=e.config.connectionConfig,n="";return n+=t.host?`host: '${t.host}', `:"",n+=t.port?`port: ${t.port}, `:"",n+=t.database?`database: '${t.database}', `:"",n+=t.user?`user: '${t.user}'`:"",t.user||(n=n.substring(0,n.length-2)),n.trim()}mu.getPoolNameOld=u1t});var EMe=M(IR=>{"use strict";A();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-mysql"});var SMe=M(c6=>{"use strict";A();Object.defineProperty(c6,"__esModule",{value:!0});c6.MySQLInstrumentation=void 0;var Wc=(He(),Me(tt)),dp=cn(),CR=(Xn(),Me(Vr)),Wg=gMe(),c1t=hMe(),tT=_Me(),yMe=EMe(),lX=class extends dp.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(yMe.PACKAGE_NAME,yMe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,dp.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,dp.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(Wg.METRIC_DB_CLIENT_CONNECTIONS_USAGE,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}_connCountAdd(t,n,r){this._connectionsUsageOld?.add(t,{state:r,name:n})}init(){return[new dp.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,dp.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,dp.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,dp.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,tT.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=Wc.context.active();return function(o,i){i&&((0,dp.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&Wc.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,tT.getConfig)(t.config),E=parseInt(f,10),T=(0,tT.getDbQueryText)(o);r._dbSemconvStability&dp.SemconvStability.OLD&&(u[Wg.ATTR_DB_SYSTEM]=Wg.DB_SYSTEM_VALUE_MYSQL,u[Wg.ATTR_DB_CONNECTION_STRING]=(0,tT.getJDBCString)(l,f,h),u[Wg.ATTR_DB_NAME]=h,u[Wg.ATTR_DB_USER]=_,u[Wg.ATTR_DB_STATEMENT]=T),r._dbSemconvStability&dp.SemconvStability.STABLE&&(u[CR.ATTR_DB_SYSTEM_NAME]=CR.DB_SYSTEM_NAME_VALUE_MYSQL,u[CR.ATTR_DB_NAMESPACE]=h,u[CR.ATTR_DB_QUERY_TEXT]=T),r._netSemconvStability&dp.SemconvStability.OLD&&(u[Wg.ATTR_NET_PEER_NAME]=l,isNaN(E)||(u[Wg.ATTR_NET_PEER_PORT]=E)),r._netSemconvStability&dp.SemconvStability.STABLE&&(u[CR.ATTR_SERVER_ADDRESS]=l,isNaN(E)||(u[CR.ATTR_SERVER_PORT]=E));let v=r.tracer.startSpan((0,tT.getSpanName)(o),{kind:Wc.SpanKind.CLIENT,attributes:u});if(r.getConfig().enhancedDatabaseReporting){let k;Array.isArray(i)?k=i:arguments[2]&&(k=[i]),v.setAttribute(c1t.AttributeNames.MYSQL_VALUES,(0,tT.getDbValues)(o,k))}let R=Array.from(arguments).findIndex(k=>typeof k=="function"),x=Wc.context.active();if(R===-1){let k=Wc.context.with(Wc.trace.setSpan(Wc.context.active(),v),()=>n.apply(t,arguments));return Wc.context.bind(x,k),k.on("error",P=>v.setStatus({code:Wc.SpanStatusCode.ERROR,message:P.message})).on("end",()=>{v.end()})}else return r._wrap(arguments,R,r._patchCallbackQuery(v,x)),Wc.context.with(Wc.trace.setSpan(Wc.context.active(),v),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,s){return o&&t.setStatus({code:Wc.SpanStatusCode.ERROR,message:o.message}),t.end(),Wc.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,tT.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")})}};c6.MySQLInstrumentation=lX});var TMe=M(l6=>{"use strict";A();Object.defineProperty(l6,"__esModule",{value:!0});l6.MySQLInstrumentation=void 0;var l1t=SMe();Object.defineProperty(l6,"MySQLInstrumentation",{enumerable:!0,get:function(){return l1t.MySQLInstrumentation}})});var bMe,IMe,CMe,d1t,vMe,RMe=B(()=>{A();bMe=ue(TMe(),1);_r();IMe="Mysql",CMe=ct(IMe,()=>new bMe.MySQLInstrumentation({})),d1t=(()=>({name:IMe,setupOnce(){CMe()}})),vMe=d1t});var dX=M(ca=>{"use strict";A();Object.defineProperty(ca,"__esModule",{value:!0});ca.DB_SYSTEM_VALUE_MYSQL=ca.ATTR_NET_PEER_PORT=ca.ATTR_NET_PEER_NAME=ca.ATTR_DB_USER=ca.ATTR_DB_SYSTEM=ca.ATTR_DB_STATEMENT=ca.ATTR_DB_NAME=ca.ATTR_DB_CONNECTION_STRING=void 0;ca.ATTR_DB_CONNECTION_STRING="db.connection_string";ca.ATTR_DB_NAME="db.name";ca.ATTR_DB_STATEMENT="db.statement";ca.ATTR_DB_SYSTEM="db.system";ca.ATTR_DB_USER="db.user";ca.ATTR_NET_PEER_NAME="net.peer.name";ca.ATTR_NET_PEER_PORT="net.peer.port";ca.DB_SYSTEM_VALUE_MYSQL="mysql"});var fX=M(d6=>{"use strict";A();Object.defineProperty(d6,"__esModule",{value:!0});d6.addSqlCommenterComment=void 0;var pX=(He(),Me(tt)),p1t=Rr();function f1t(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function m1t(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function A1t(e,t){if(typeof t!="string"||t.length===0||f1t(t))return t;let n=new p1t.W3CTraceContextPropagator,r={};n.inject(pX.trace.setSpan(pX.ROOT_CONTEXT,e),r,pX.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(s=>{let u=m1t(r[s]);return`${s}='${u}'`}).join(",");return`${t} /*${i}*/`}d6.addSqlCommenterComment=A1t});var xMe=M(pp=>{"use strict";A();Object.defineProperty(pp,"__esModule",{value:!0});pp.getConnectionPrototypeToInstrument=pp.once=pp.getSpanName=pp.getQueryText=pp.getConnectionAttributes=void 0;var hk=dX(),p6=cn(),mX=(Xn(),Me(Vr));function g1t(e,t,n){let{host:r,port:o,database:i,user:s}=h1t(e),u={};t&p6.SemconvStability.OLD&&(u[hk.ATTR_DB_CONNECTION_STRING]=_1t(r,o,i),u[hk.ATTR_DB_NAME]=i,u[hk.ATTR_DB_USER]=s),t&p6.SemconvStability.STABLE&&(u[mX.ATTR_DB_NAMESPACE]=i);let l=parseInt(o,10);return n&p6.SemconvStability.OLD&&(u[hk.ATTR_NET_PEER_NAME]=r,isNaN(l)||(u[hk.ATTR_NET_PEER_PORT]=l)),n&p6.SemconvStability.STABLE&&(u[mX.ATTR_SERVER_ADDRESS]=r,isNaN(l)||(u[mX.ATTR_SERVER_PORT]=l)),u}pp.getConnectionAttributes=g1t;function h1t(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function _1t(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function E1t(e,t,n,r=!1,o=y1t){let[i,s]=typeof e=="string"?[e,n]:[e.sql,S1t(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"}}pp.getQueryText=E1t;function y1t(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function S1t(e){return"values"in e}function T1t(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}pp.getSpanName=T1t;var b1t=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};pp.once=b1t;function I1t(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}pp.getConnectionPrototypeToInstrument=I1t});var DMe=M(vR=>{"use strict";A();Object.defineProperty(vR,"__esModule",{value:!0});vR.PACKAGE_NAME=vR.PACKAGE_VERSION=void 0;vR.PACKAGE_VERSION="0.60.0";vR.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var kMe=M(f6=>{"use strict";A();Object.defineProperty(f6,"__esModule",{value:!0});f6.MySQL2Instrumentation=void 0;var NMe=(He(),Me(tt)),Df=cn(),AX=dX(),wMe=fX(),RR=xMe(),BMe=DMe(),gX=(Xn(),Me(Vr)),hX=[">=1.4.2 <4"],_X=class extends Df.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(BMe.PACKAGE_NAME,BMe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Df.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Df.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,Df.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,Df.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 Df.InstrumentationNodeModuleDefinition("mysql2",hX,i=>(n(i),i),()=>{},[new Df.InstrumentationNodeModuleFile("mysql2/promise.js",hX,i=>(n(i),i),()=>{}),new Df.InstrumentationNodeModuleFile("mysql2/lib/connection.js",hX,i=>{let s=(0,RR.getConnectionPrototypeToInstrument)(i);return r(s),i},i=>{if(i===void 0)return;let s=(0,RR.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(),E=(0,RR.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),T=(0,RR.getQueryText)(i,t,l,f,h);o._dbSemconvStability&Df.SemconvStability.OLD&&(E[AX.ATTR_DB_SYSTEM]=AX.DB_SYSTEM_VALUE_MYSQL,E[AX.ATTR_DB_STATEMENT]=T),o._dbSemconvStability&Df.SemconvStability.STABLE&&(E[gX.ATTR_DB_SYSTEM_NAME]=gX.DB_SYSTEM_NAME_VALUE_MYSQL,E[gX.ATTR_DB_QUERY_TEXT]=T);let v=o.tracer.startSpan((0,RR.getSpanName)(i),{kind:NMe.SpanKind.CLIENT,attributes:E});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,wMe.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,wMe.addSqlCommenterComment)(v,i.sql)}));let R=(0,RR.once)((x,k)=>{x?v.setStatus({code:NMe.SpanStatusCode.ERROR,message:x.message}):typeof _=="function"&&(0,Df.safeExecuteInTheMiddle)(()=>{_(v,{queryResults:k})},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",k=>{R(k)}).once("result",k=>{R(void 0,k)}),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)}}};f6.MySQL2Instrumentation=_X});var OMe=M(m6=>{"use strict";A();Object.defineProperty(m6,"__esModule",{value:!0});m6.MySQL2Instrumentation=void 0;var C1t=kMe();Object.defineProperty(m6,"MySQL2Instrumentation",{enumerable:!0,get:function(){return C1t.MySQL2Instrumentation}})});var PMe,MMe,LMe,v1t,UMe,QMe=B(()=>{A();PMe=ue(OMe(),1);_r();MMe="Mysql2",LMe=ct(MMe,()=>new PMe.MySQL2Instrumentation({responseHook(e){Kr(e,"auto.db.otel.mysql2")}})),v1t=(()=>({name:MMe,setupOnce(){LMe()}})),UMe=v1t});var FMe=M(Au=>{"use strict";A();Object.defineProperty(Au,"__esModule",{value:!0});Au.DB_SYSTEM_VALUE_REDIS=Au.DB_SYSTEM_NAME_VALUE_REDIS=Au.ATTR_NET_PEER_PORT=Au.ATTR_NET_PEER_NAME=Au.ATTR_DB_SYSTEM=Au.ATTR_DB_STATEMENT=Au.ATTR_DB_CONNECTION_STRING=void 0;Au.ATTR_DB_CONNECTION_STRING="db.connection_string";Au.ATTR_DB_STATEMENT="db.statement";Au.ATTR_DB_SYSTEM="db.system";Au.ATTR_NET_PEER_NAME="net.peer.name";Au.ATTR_NET_PEER_PORT="net.peer.port";Au.DB_SYSTEM_NAME_VALUE_REDIS="redis";Au.DB_SYSTEM_VALUE_REDIS="redis"});var GMe=M(A6=>{"use strict";A();Object.defineProperty(A6,"__esModule",{value:!0});A6.endSpan=void 0;var R1t=(He(),Me(tt)),x1t=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:R1t.SpanStatusCode.ERROR,message:t.message})),e.end()};A6.endSpan=x1t});var h6=M(g6=>{"use strict";A();Object.defineProperty(g6,"__esModule",{value:!0});g6.defaultDbStatementSerializer=void 0;var D1t=[{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}],N1t=(e,t)=>{if(Array.isArray(t)&&t.length){let n=D1t.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};g6.defaultDbStatementSerializer=N1t});var jMe=M(xR=>{"use strict";A();Object.defineProperty(xR,"__esModule",{value:!0});xR.PACKAGE_NAME=xR.PACKAGE_VERSION=void 0;xR.PACKAGE_VERSION="0.62.0";xR.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var qMe=M(_6=>{"use strict";A();Object.defineProperty(_6,"__esModule",{value:!0});_6.IORedisInstrumentation=void 0;var yE=(He(),Me(tt)),Xc=cn(),SE=(Xn(),Me(Vr)),el=FMe(),zMe=cn(),_k=GMe(),w1t=h6(),HMe=jMe(),$Me={requireParentSpan:!0},EX=class extends Xc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(HMe.PACKAGE_NAME,HMe.PACKAGE_VERSION,{...$Me,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Xc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Xc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...$Me,...t})}init(){return[new Xc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,Xc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,Xc.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||w1t.defaultDbStatementSerializer,u=yE.trace.getSpan(yE.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&Xc.SemconvStability.OLD&&(l[el.ATTR_DB_SYSTEM]=el.DB_SYSTEM_VALUE_REDIS,l[el.ATTR_DB_STATEMENT]=_,l[el.ATTR_DB_CONNECTION_STRING]=`redis://${f}:${h}`),r._dbSemconvStability&Xc.SemconvStability.STABLE&&(l[SE.ATTR_DB_SYSTEM_NAME]=el.DB_SYSTEM_NAME_VALUE_REDIS,l[SE.ATTR_DB_QUERY_TEXT]=_),r._netSemconvStability&Xc.SemconvStability.OLD&&(l[el.ATTR_NET_PEER_NAME]=f,l[el.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&Xc.SemconvStability.STABLE&&(l[SE.ATTR_SERVER_ADDRESS]=f,l[SE.ATTR_SERVER_PORT]=h);let E=r.tracer.startSpan(o.name,{kind:yE.SpanKind.CLIENT,attributes:l}),{requestHook:T}=i;T&&(0,zMe.safeExecuteInTheMiddle)(()=>T(E,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&yE.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),R=o.resolve;o.resolve=function(k){(0,zMe.safeExecuteInTheMiddle)(()=>i.responseHook?.(E,o.name,o.args,k),P=>{P&&yE.diag.error("ioredis instrumentation: response hook failed",P)},!0),(0,_k.endSpan)(E,null),R(k)};let x=o.reject;return o.reject=function(k){(0,_k.endSpan)(E,k),x(k)},v}catch(v){throw(0,_k.endSpan)(E,v),v}}}_traceConnection(t){let n=this;return function(){let r=yE.trace.getSpan(yE.context.active())===void 0;if(n.getConfig().requireParentSpan===!0&&r)return t.apply(this,arguments);let o={},{host:i,port:s}=this.options;n._dbSemconvStability&Xc.SemconvStability.OLD&&(o[el.ATTR_DB_SYSTEM]=el.DB_SYSTEM_VALUE_REDIS,o[el.ATTR_DB_STATEMENT]="connect",o[el.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${s}`),n._dbSemconvStability&Xc.SemconvStability.STABLE&&(o[SE.ATTR_DB_SYSTEM_NAME]=el.DB_SYSTEM_NAME_VALUE_REDIS,o[SE.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&Xc.SemconvStability.OLD&&(o[el.ATTR_NET_PEER_NAME]=i,o[el.ATTR_NET_PEER_PORT]=s),n._netSemconvStability&Xc.SemconvStability.STABLE&&(o[SE.ATTR_SERVER_ADDRESS]=i,o[SE.ATTR_SERVER_PORT]=s);let u=n.tracer.startSpan("connect",{kind:yE.SpanKind.CLIENT,attributes:o});try{let l=t.apply(this,arguments);return(0,_k.endSpan)(u,null),l}catch(l){throw(0,_k.endSpan)(u,l),l}}}};_6.IORedisInstrumentation=EX});var VMe=M(E6=>{"use strict";A();Object.defineProperty(E6,"__esModule",{value:!0});E6.IORedisInstrumentation=void 0;var B1t=qMe();Object.defineProperty(E6,"IORedisInstrumentation",{enumerable:!0,get:function(){return B1t.IORedisInstrumentation}})});var y6=M(DR=>{"use strict";A();Object.defineProperty(DR,"__esModule",{value:!0});DR.PACKAGE_NAME=DR.PACKAGE_VERSION=void 0;DR.PACKAGE_VERSION="0.62.0";DR.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var YMe=M(TE=>{"use strict";A();Object.defineProperty(TE,"__esModule",{value:!0});TE.getTracedCreateStreamTrace=TE.getTracedCreateClient=TE.endSpan=void 0;var Ek=(He(),Me(tt)),k1t=(e,t)=>{t&&e.setStatus({code:Ek.SpanStatusCode.ERROR,message:t.message}),e.end()};TE.endSpan=k1t;var O1t=e=>function(){let n=e.apply(this,arguments);return Ek.context.bind(Ek.context.active(),n)};TE.getTracedCreateClient=O1t;var P1t=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){Ek.context.bind(Ek.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};TE.getTracedCreateStreamTrace=P1t});var S6=M(gu=>{"use strict";A();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 JMe=M(b6=>{"use strict";A();Object.defineProperty(b6,"__esModule",{value:!0});b6.RedisInstrumentationV2_V3=void 0;var rd=cn(),T6=YMe(),KMe=y6(),yk=(He(),Me(tt)),Sk=(Xn(),Me(Vr)),nT=S6(),M1t=h6(),yX=class e extends rd.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(KMe.PACKAGE_NAME,KMe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,rd.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,rd.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new rd.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,rd.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,rd.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,rd.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=yk.trace.getSpan(yk.context.active())===void 0;if(s.requireParentSpan===!0&&u)return r.apply(this,arguments);let l=s?.dbStatementSerializer||M1t.defaultDbStatementSerializer,f={};t._semconvStability&rd.SemconvStability.OLD&&Object.assign(f,{[nT.ATTR_DB_SYSTEM]:nT.DB_SYSTEM_VALUE_REDIS,[nT.ATTR_DB_STATEMENT]:l(i.command,i.args)}),t._semconvStability&rd.SemconvStability.STABLE&&Object.assign(f,{[Sk.ATTR_DB_SYSTEM_NAME]:nT.DB_SYSTEM_NAME_VALUE_REDIS,[Sk.ATTR_DB_OPERATION_NAME]:i.command,[Sk.ATTR_DB_QUERY_TEXT]:l(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:yk.SpanKind.CLIENT,attributes:f});if(this.connection_options){let E={};t._semconvStability&rd.SemconvStability.OLD&&Object.assign(E,{[nT.ATTR_NET_PEER_NAME]:this.connection_options.host,[nT.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&rd.SemconvStability.STABLE&&Object.assign(E,{[Sk.ATTR_SERVER_ADDRESS]:this.connection_options.host,[Sk.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(E)}this.address&&t._semconvStability&rd.SemconvStability.OLD&&h.setAttribute(nT.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let _=arguments[0].callback;if(_){let E=yk.context.active();arguments[0].callback=function(v,R){if(s?.responseHook){let x=s.responseHook;(0,rd.safeExecuteInTheMiddle)(()=>{x(h,i.command,i.args,R)},k=>{k&&t._diag.error("Error executing responseHook",k)},!0)}return(0,T6.endSpan)(h,v),yk.context.with(E,_,this,...arguments)}}try{return r.apply(this,arguments)}catch(E){throw(0,T6.endSpan)(h,E),E}}}}_getPatchCreateClient(){return function(n){return(0,T6.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,T6.getTracedCreateStreamTrace)(n)}}};b6.RedisInstrumentationV2_V3=yX});var WMe=M(I6=>{"use strict";A();Object.defineProperty(I6,"__esModule",{value:!0});I6.getClientAttributes=void 0;var SX=(Xn(),Me(Vr)),NR=S6(),ZMe=cn();function L1t(e,t,n){let r={};return n&ZMe.SemconvStability.OLD&&Object.assign(r,{[NR.ATTR_DB_SYSTEM]:NR.DB_SYSTEM_VALUE_REDIS,[NR.ATTR_NET_PEER_NAME]:t?.socket?.host,[NR.ATTR_NET_PEER_PORT]:t?.socket?.port,[NR.ATTR_DB_CONNECTION_STRING]:U1t(e,t?.url)}),n&ZMe.SemconvStability.STABLE&&Object.assign(r,{[SX.ATTR_DB_SYSTEM_NAME]:NR.DB_SYSTEM_NAME_VALUE_REDIS,[SX.ATTR_SERVER_ADDRESS]:t?.socket?.host,[SX.ATTR_SERVER_PORT]:t?.socket?.port}),r}I6.getClientAttributes=L1t;function U1t(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 n2e=M(C6=>{"use strict";A();Object.defineProperty(C6,"__esModule",{value:!0});C6.RedisInstrumentationV4_V5=void 0;var fp=(He(),Me(tt)),Ro=cn(),XMe=WMe(),Q1t=h6(),e2e=y6(),TX=(Xn(),Me(Vr)),F1t=S6(),Tk=Symbol("opentelemetry.instrumentation.redis.open_spans"),t2e=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),bX=class e extends Ro.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(e2e.PACKAGE_NAME,e2e.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Ro.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Ro.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 Ro.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,Ro.isWrapped)(i?.[l])&&this._unwrap(i,l),this._wrap(i,l,this._getPatchExtendWithCommands(u)),i},i=>{(0,Ro.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,Ro.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new Ro.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return(0,Ro.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),this._wrap(s,"exec",this._getPatchMultiCommandsExec(!1)),(0,Ro.isWrapped)(s?.execAsPipeline)&&this._unwrap(s,"execAsPipeline"),this._wrap(s,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,Ro.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand"),this._wrap(s,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let s=i?.default?.prototype;(0,Ro.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),(0,Ro.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand")}),o=new Ro.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return s?.multi&&((0,Ro.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),this._wrap(s,"multi",this._getPatchRedisClientMulti())),s?.MULTI&&((0,Ro.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),this._wrap(s,"MULTI",this._getPatchRedisClientMulti())),(0,Ro.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,Ro.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),(0,Ro.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),(0,Ro.isWrapped)(s?.sendCommand)&&this._unwrap(s,"sendCommand")});return new Ro.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[Tk];return n._endSpansWithRedisReplies(l,u,t),u}).catch(u=>{let l=this[Tk];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[t2e]=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,XMe.getClientAttributes)(t._diag,i,t._semconvStability),u=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:fp.SpanKind.CLIENT,attributes:s});return fp.context.with(fp.trace.setSpan(fp.context.active(),u),()=>r.apply(this)).then(f=>(u.end(),f)).catch(f=>(u.recordException(f),u.setStatus({code:fp.SpanStatusCode.ERROR,message:f.message}),u.end(),Promise.reject(f)))}}}_traceClientCommand(t,n,r,o){if(fp.trace.getSpan(fp.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let s=n.options||n[t2e],u=o[0],l=o.slice(1),f=this.getConfig().dbStatementSerializer||Q1t.defaultDbStatementSerializer,h=(0,XMe.getClientAttributes)(this._diag,s,this._semconvStability);this._semconvStability&Ro.SemconvStability.STABLE&&(h[TX.ATTR_DB_OPERATION_NAME]=u);try{let T=f(u,l);T!=null&&(this._semconvStability&Ro.SemconvStability.OLD&&(h[F1t.ATTR_DB_STATEMENT]=T),this._semconvStability&Ro.SemconvStability.STABLE&&(h[TX.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:fp.SpanKind.CLIENT,attributes:h}),E=fp.context.with(fp.trace.setSpan(fp.context.active(),_),()=>t.apply(n,r));if(typeof E?.then=="function")E.then(T=>{this._endSpanWithResponse(_,u,l,T,void 0)},T=>{this._endSpanWithResponse(_,u,l,null,T)});else{let T=E;T[Tk]=T[Tk]||[],T[Tk].push({span:_,commandName:u,commandArgs:l})}return E}_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],[_,E]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&Ro.SemconvStability.STABLE&&l.setAttribute(TX.ATTR_DB_OPERATION_NAME,s),this._endSpanWithResponse(l,o[u],f,_,E)}}_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:fp.SpanStatusCode.ERROR,message:i?.message})),t.end()}};C6.RedisInstrumentationV4_V5=bX});var i2e=M(v6=>{"use strict";A();Object.defineProperty(v6,"__esModule",{value:!0});v6.RedisInstrumentation=void 0;var G1t=cn(),r2e=y6(),j1t=JMe(),z1t=n2e(),o2e={requireParentSpan:!1},IX=class extends G1t.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...o2e,...t};super(r2e.PACKAGE_NAME,r2e.PACKAGE_VERSION,n),this.instrumentationV2_V3=new j1t.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new z1t.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...o2e,...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())}};v6.RedisInstrumentation=IX});var s2e=M(R6=>{"use strict";A();Object.defineProperty(R6,"__esModule",{value:!0});R6.RedisInstrumentation=void 0;var H1t=i2e();Object.defineProperty(R6,"RedisInstrumentation",{enumerable:!0,get:function(){return H1t.RedisInstrumentation}})});function bk(e,t){return e.includes(t.toLowerCase())}function vX(e){return bk(CX,e)?"cache.get":bk(q1t,e)?"cache.put":void 0}function V1t(e,t){return t.some(n=>e.startsWith(n))}function u2e(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)?a2e(o.map(i=>n(i))):["<unknown>"],r=t[0];return bk($1t,e)&&r!=null?n(r):a2e(t.map(o=>n(o)))}catch{return}}function c2e(e,t,n){if(!vX(e))return!1;for(let r of t)if(V1t(r,n))return!0;return!1}function l2e(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 a2e(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var $1t,CX,q1t,d2e=B(()=>{A();$1t=["get","set","setex"],CX=["get","mget"],q1t=["set","setex"]});var p2e,f2e,x6,Ik,m2e,Y1t,K1t,A2e,J1t,g2e,h2e=B(()=>{A();p2e=ue(VMe(),1),f2e=ue(s2e(),1);mt();_r();d2e();x6="Redis",Ik={},m2e=(e,t,n,r)=>{e.setAttribute(Lt,"auto.db.otel.redis");let o=u2e(t,n),i=vX(t);if(!o||!i||!Ik.cachePrefixes||!c2e(t,o,Ik.cachePrefixes))return;let s=Pt(e).data["net.peer.name"],u=Pt(e).data["net.peer.port"];u&&s&&e.setAttributes({"network.peer.address":s,"network.peer.port":u});let l=l2e(r);l&&e.setAttribute(NY,l),bk(CX,t)&&l!==void 0&&e.setAttribute(xY,l>0),e.setAttributes({[rn]:i,[DY]:o});let f=o.join(", ");e.updateName(Ik.maxCacheKeyLength?L_(f,Ik.maxCacheKeyLength):f)},Y1t=ct(`${x6}.IORedis`,()=>new p2e.IORedisInstrumentation({responseHook:m2e})),K1t=ct(`${x6}.Redis`,()=>new f2e.RedisInstrumentation({responseHook:m2e})),A2e=Object.assign(()=>{Y1t(),K1t()},{id:x6}),J1t=((e={})=>({name:x6,setupOnce(){Ik=e,A2e()}})),g2e=J1t});var _2e=M(D6=>{"use strict";A();Object.defineProperty(D6,"__esModule",{value:!0});D6.EVENT_LISTENERS_SET=void 0;D6.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var RX=M(Ck=>{"use strict";A();Object.defineProperty(Ck,"__esModule",{value:!0});Ck.AttributeNames=void 0;var Z1t;(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"})(Z1t=Ck.AttributeNames||(Ck.AttributeNames={}))});var xX=M(Or=>{"use strict";A();Object.defineProperty(Or,"__esModule",{value:!0});Or.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=Or.METRIC_DB_CLIENT_CONNECTION_COUNT=Or.DB_SYSTEM_VALUE_POSTGRESQL=Or.DB_CLIENT_CONNECTION_STATE_VALUE_USED=Or.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=Or.ATTR_NET_PEER_PORT=Or.ATTR_NET_PEER_NAME=Or.ATTR_DB_USER=Or.ATTR_DB_SYSTEM=Or.ATTR_DB_STATEMENT=Or.ATTR_DB_NAME=Or.ATTR_DB_CONNECTION_STRING=Or.ATTR_DB_CLIENT_CONNECTION_STATE=Or.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;Or.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";Or.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";Or.ATTR_DB_CONNECTION_STRING="db.connection_string";Or.ATTR_DB_NAME="db.name";Or.ATTR_DB_STATEMENT="db.statement";Or.ATTR_DB_SYSTEM="db.system";Or.ATTR_DB_USER="db.user";Or.ATTR_NET_PEER_NAME="net.peer.name";Or.ATTR_NET_PEER_PORT="net.peer.port";Or.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";Or.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";Or.DB_SYSTEM_VALUE_POSTGRESQL="postgresql";Or.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";Or.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests"});var DX=M(vk=>{"use strict";A();Object.defineProperty(vk,"__esModule",{value:!0});vk.SpanNames=void 0;var W1t;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(W1t=vk.SpanNames||(vk.SpanNames={}))});var C2e=M(sr=>{"use strict";A();Object.defineProperty(sr,"__esModule",{value:!0});sr.sanitizedErrorMessage=sr.isObjectWithTextString=sr.getErrorMessage=sr.patchClientConnectCallback=sr.patchCallbackPGPool=sr.updateCounter=sr.getPoolName=sr.patchCallback=sr.handleExecutionResult=sr.handleConfigQuery=sr.shouldSkipInstrumentation=sr.getSemanticAttributesFromPoolConnection=sr.getSemanticAttributesFromConnection=sr.getConnectionString=sr.parseAndMaskConnectionString=sr.parseNormalizedOperationName=sr.getQuerySpanName=void 0;var bE=(He(),Me(tt)),N6=RX(),mp=(Xn(),Me(Vr)),yi=xX(),rT=cn(),E2e=DX();function y2e(e,t){if(!t)return E2e.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:S2e(t.text);return`${E2e.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}sr.getQuerySpanName=y2e;function S2e(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=S2e;function T2e(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}sr.parseAndMaskConnectionString=T2e;function NX(e){if("connectionString"in e&&e.connectionString)return T2e(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}sr.getConnectionString=NX;function w6(e){if(Number.isInteger(e))return e}function b2e(e,t){let n={};return t&rT.SemconvStability.OLD&&(n={...n,[yi.ATTR_DB_SYSTEM]:yi.DB_SYSTEM_VALUE_POSTGRESQL,[yi.ATTR_DB_NAME]:e.database,[yi.ATTR_DB_CONNECTION_STRING]:NX(e),[yi.ATTR_DB_USER]:e.user,[yi.ATTR_NET_PEER_NAME]:e.host,[yi.ATTR_NET_PEER_PORT]:w6(e.port)}),t&rT.SemconvStability.STABLE&&(n={...n,[mp.ATTR_DB_SYSTEM_NAME]:mp.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[mp.ATTR_DB_NAMESPACE]:e.namespace,[mp.ATTR_SERVER_ADDRESS]:e.host,[mp.ATTR_SERVER_PORT]:w6(e.port)}),n}sr.getSemanticAttributesFromConnection=b2e;function X1t(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[N6.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[N6.AttributeNames.MAX_CLIENT]:e.maxClient};return t&rT.SemconvStability.OLD&&(r={...r,[yi.ATTR_DB_SYSTEM]:yi.DB_SYSTEM_VALUE_POSTGRESQL,[yi.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[yi.ATTR_DB_CONNECTION_STRING]:NX(e),[yi.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[yi.ATTR_NET_PEER_PORT]:Number(n?.port)||w6(e.port),[yi.ATTR_DB_USER]:n?.username??e.user}),t&rT.SemconvStability.STABLE&&(r={...r,[mp.ATTR_DB_SYSTEM_NAME]:mp.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[mp.ATTR_DB_NAMESPACE]:e.namespace,[mp.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[mp.ATTR_SERVER_PORT]:Number(n?.port)||w6(e.port)}),r}sr.getSemanticAttributesFromPoolConnection=X1t;function eNt(e){return e.requireParentSpan===!0&&bE.trace.getSpan(bE.context.active())===void 0}sr.shouldSkipInstrumentation=eNt;function tNt(e,t,n,r){let{connectionParameters:o}=this,i=o.database,s=y2e(i,r),u=e.startSpan(s,{kind:bE.SpanKind.CLIENT,attributes:b2e(o,n)});if(!r)return u;if(r.text&&(n&rT.SemconvStability.OLD&&u.setAttribute(yi.ATTR_DB_STATEMENT,r.text),n&rT.SemconvStability.STABLE&&u.setAttribute(mp.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(N6.AttributeNames.PG_VALUES,l)}catch(l){bE.diag.error("failed to stringify ",r.values,l)}return typeof r.name=="string"&&u.setAttribute(N6.AttributeNames.PG_PLAN,r.name),u}sr.handleConfigQuery=tNt;function I2e(e,t,n){typeof e.responseHook=="function"&&(0,rT.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&bE.diag.error("Error running response hook",r)},!0)}sr.handleExecutionResult=I2e;function nNt(e,t,n,r,o){return function(s,u){s?(Object.prototype.hasOwnProperty.call(s,"code")&&(r[mp.ATTR_ERROR_TYPE]=s.code),s instanceof Error&&t.recordException(B6(s)),t.setStatus({code:bE.SpanStatusCode.ERROR,message:s.message})):I2e(e,t,u),o(),t.end(),n.call(this,s,u)}}sr.patchCallback=nNt;function rNt(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=rNt;function oNt(e,t,n,r,o){let i=t.totalCount,s=t.waitingCount,u=t.idleCount,l=i-u;return n.add(l-o.used,{[yi.ATTR_DB_CLIENT_CONNECTION_STATE]:yi.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[yi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(u-o.idle,{[yi.ATTR_DB_CLIENT_CONNECTION_STATE]:yi.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[yi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(s-o.pending,{[yi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:l,idle:u,pending:s}}sr.updateCounter=oNt;function iNt(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(B6(r)),e.setStatus({code:bE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}sr.patchCallbackPGPool=iNt;function sNt(e,t){return function(r){r&&(r instanceof Error&&e.recordException(B6(r)),e.setStatus({code:bE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}sr.patchClientConnectCallback=sNt;function aNt(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}sr.getErrorMessage=aNt;function uNt(e){return typeof e=="object"&&typeof e?.text=="string"}sr.isObjectWithTextString=uNt;function B6(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}sr.sanitizedErrorMessage=B6});var v2e=M(wR=>{"use strict";A();Object.defineProperty(wR,"__esModule",{value:!0});wR.PACKAGE_NAME=wR.PACKAGE_VERSION=void 0;wR.PACKAGE_VERSION="0.66.0";wR.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var B2e=M(O6=>{"use strict";A();Object.defineProperty(O6,"__esModule",{value:!0});O6.PgInstrumentation=void 0;var tc=cn(),Zr=(He(),Me(tt)),R2e=_2e(),ri=C2e(),x2e=fX(),D2e=v2e(),N2e=DX(),k6=Rr(),Nf=(Xn(),Me(Vr)),Rk=xX();function BR(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var wX=class extends tc.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(D2e.PACKAGE_NAME,D2e.PACKAGE_VERSION,t),this._semconvStability=(0,tc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(Nf.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Zr.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(Rk.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(Rk.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=BR(u);return this._patchPgClient(l.Client),u},u=>{let l=BR(u);return this._unpatchPgClient(l.Client),u},[o,r]),s=new tc.InstrumentationNodeModuleDefinition("pg-pool",n,u=>{let l=BR(u);return(0,tc.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect"),this._wrap(l.prototype,"connect",this._getPoolConnectPatch()),l},u=>{let l=BR(u);(0,tc.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect")});return[i,s]}_patchPgClient(t){if(!t)return;let n=BR(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=BR(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(ri.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan(N2e.SpanNames.CONNECT,{kind:Zr.SpanKind.CLIENT,attributes:ri.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let l=Zr.trace.getSpan(Zr.context.active());o=ri.patchClientConnectCallback(s,o),l&&(o=Zr.context.bind(Zr.context.active(),o))}let u=Zr.context.with(Zr.trace.setSpan(Zr.context.active(),s),()=>n.call(this,o));return w2e(s,u)}}recordOperationDuration(t,n){let r={},o=[Nf.ATTR_DB_NAMESPACE,Nf.ATTR_ERROR_TYPE,Nf.ATTR_SERVER_PORT,Nf.ATTR_SERVER_ADDRESS,Nf.ATTR_DB_OPERATION_NAME];this._semconvStability&tc.SemconvStability.OLD&&o.push(Rk.ATTR_DB_SYSTEM),this._semconvStability&tc.SemconvStability.STABLE&&o.push(Nf.ATTR_DB_SYSTEM_NAME),o.forEach(s=>{s in t&&(r[s]=t[s])});let i=(0,k6.hrTimeToMilliseconds)((0,k6.hrTimeDuration)(n,(0,k6.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(ri.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,k6.hrTime)(),s=o[0],u=typeof s=="string",l=ri.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={[Rk.ATTR_DB_SYSTEM]:Rk.DB_SYSTEM_VALUE_POSTGRESQL,[Nf.ATTR_DB_NAMESPACE]:this.database,[Nf.ATTR_SERVER_PORT]:this.connectionParameters.port,[Nf.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};f?.text&&(h[Nf.ATTR_DB_OPERATION_NAME]=ri.parseNormalizedOperationName(f?.text));let _=()=>{t.recordOperationDuration(h,i)},E=t.getConfig(),T=ri.handleConfigQuery.call(this,t.tracer,E,t._semconvStability,f);if(E.addSqlCommenterCommentToQueries&&(u?o[0]=(0,x2e.addSqlCommenterComment)(T,s):l&&!("name"in s)&&(o[0]={...s,text:(0,x2e.addSqlCommenterComment)(T,s.text)})),o.length>0){let x=Zr.trace.getSpan(Zr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=ri.patchCallback(E,T,o[o.length-1],h,_),x&&(o[o.length-1]=Zr.context.bind(Zr.context.active(),o[o.length-1]));else if(typeof f?.callback=="function"){let k=ri.patchCallback(t.getConfig(),T,f.callback,h,_);x&&(k=Zr.context.bind(Zr.context.active(),k)),o[0].callback=k}}let{requestHook:v}=E;typeof v=="function"&&f&&(0,tc.safeExecuteInTheMiddle)(()=>{let{database:x,host:k,port:P,user:j}=this.connectionParameters;v(T,{connection:{database:x,host:k,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(ri.sanitizedErrorMessage(x)),T.setStatus({code:Zr.SpanStatusCode.ERROR,message:ri.getErrorMessage(x)}),T.end(),x}return R instanceof Promise?R.then(x=>new Promise(k=>{ri.handleExecutionResult(t.getConfig(),T,x),_(),T.end(),k(x)})).catch(x=>new Promise((k,P)=>{x instanceof Error&&T.recordException(ri.sanitizedErrorMessage(x)),T.setStatus({code:Zr.SpanStatusCode.ERROR,message:x.message}),_(),T.end(),P(x)})):R})}_setPoolConnectEventListeners(t){if(t[R2e.EVENT_LISTENERS_SET])return;let n=ri.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=ri.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=ri.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=ri.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=ri.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[R2e.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(ri.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan(N2e.SpanNames.POOL_CONNECT,{kind:Zr.SpanKind.CLIENT,attributes:ri.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let l=Zr.trace.getSpan(Zr.context.active());o=ri.patchCallbackPGPool(s,o),l&&(o=Zr.context.bind(Zr.context.active(),o))}let u=Zr.context.with(Zr.trace.setSpan(Zr.context.active(),s),()=>n.call(this,o));return w2e(s,u)}}};O6.PgInstrumentation=wX;function w2e(e,t){if(!(t instanceof Promise))return t;let n=t;return Zr.context.bind(Zr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(ri.sanitizedErrorMessage(r)),e.setStatus({code:Zr.SpanStatusCode.ERROR,message:ri.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var k2e=M(kR=>{"use strict";A();Object.defineProperty(kR,"__esModule",{value:!0});kR.AttributeNames=kR.PgInstrumentation=void 0;var cNt=B2e();Object.defineProperty(kR,"PgInstrumentation",{enumerable:!0,get:function(){return cNt.PgInstrumentation}});var lNt=RX();Object.defineProperty(kR,"AttributeNames",{enumerable:!0,get:function(){return lNt.AttributeNames}})});var O2e,P2e,M2e,dNt,L2e,U2e=B(()=>{A();O2e=ue(k2e(),1);_r();P2e="Postgres",M2e=ct(P2e,O2e.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){Kr(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),dNt=(e=>({name:P2e,setupOnce(){M2e(e)}})),L2e=dNt});var IE,kX,Q2e,pNt,fNt,F2e,BX,mNt,G2e,j2e=B(()=>{A();He();IE=ue(cn(),1);Xn();mt();_r();VS();kX="PostgresJs",Q2e=[">=3.0.0 <4"],pNt=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,fNt=Symbol.for("sentry.query.from.instrumented.sql"),F2e=ct(kX,e=>new BX({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),BX=class extends IE.InstrumentationBase{constructor(t){super("sentry-postgres-js",er,t)}init(){let t=new IE.InstrumentationNodeModuleDefinition("postgres",Q2e,n=>{try{return this._patchPostgres(n)}catch(r){return ws&&W.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new IE.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,Q2e,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 ws&&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 ws&&W.warn("postgres() did not return a valid instance"),u;let l=o.getConfig();return BK(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:(TB(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return Jt.getSpan(We.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(QC,r);return}let o=n?.match(pNt);o?.[1]&&t.setAttribute(QC,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[fNt])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),s=n._sanitizeSqlQuery(i);return ia({name:s||"postgresjs.query",op:"db"},u=>{Kr(u,"auto.db.postgresjs"),u.setAttributes({[pS]:"postgres",[HV]:s});let l=n.getConfig(),{requestHook:f}=l;f&&(0,IE.safeExecuteInTheMiddle)(()=>f(u,s,void 0),E=>{E&&(u.setAttribute("sentry.hook.error","requestHook failed"),ws&&W.error(`Error in requestHook for ${kX} integration:`,E))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(E,T,v)=>{try{n._setOperationName(u,s,v?.[0]?.command),u.end()}catch(R){ws&&W.error("Error ending span in resolve callback:",R)}return Reflect.apply(E,T,v)}});let _=this.reject;this.reject=new Proxy(_,{apply:(E,T,v)=>{try{u.setStatus({code:2,message:v?.[0]?.message||"unknown_error"}),u.setAttribute($V,v?.[0]?.code||"unknown"),u.setAttribute(qV,v?.[0]?.name||"unknown"),n._setOperationName(u,s),u.end()}catch(R){ws&&W.error("Error ending span in reject callback:",R)}return Reflect.apply(E,T,v)}});try{return r.apply(this,o)}catch(E){throw u.setStatus({code:2,message:E instanceof Error?E.message:"unknown_error"}),u.end(),E}})},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}},mNt=(e=>({name:kX,setupOnce(){F2e(e)}})),G2e=mNt});var z2e=M(xk=>{"use strict";A();Object.defineProperty(xk,"__esModule",{value:!0});xk.SeverityNumber=void 0;var ANt;(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"})(ANt=xk.SeverityNumber||(xk.SeverityNumber={}))});var M6=M(OR=>{"use strict";A();Object.defineProperty(OR,"__esModule",{value:!0});OR.NOOP_LOGGER=OR.NoopLogger=void 0;var P6=class{emit(t){}};OR.NoopLogger=P6;OR.NOOP_LOGGER=new P6});var U6=M(PR=>{"use strict";A();Object.defineProperty(PR,"__esModule",{value:!0});PR.NOOP_LOGGER_PROVIDER=PR.NoopLoggerProvider=void 0;var gNt=M6(),L6=class{getLogger(t,n,r){return new gNt.NoopLogger}};PR.NoopLoggerProvider=L6;PR.NOOP_LOGGER_PROVIDER=new L6});var PX=M(Q6=>{"use strict";A();Object.defineProperty(Q6,"__esModule",{value:!0});Q6.ProxyLogger=void 0;var hNt=M6(),OX=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):hNt.NOOP_LOGGER}};Q6.ProxyLogger=OX});var LX=M(F6=>{"use strict";A();Object.defineProperty(F6,"__esModule",{value:!0});F6.ProxyLoggerProvider=void 0;var _Nt=U6(),ENt=PX(),MX=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new ENt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:_Nt.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)}};F6.ProxyLoggerProvider=MX});var H2e=M(G6=>{"use strict";A();Object.defineProperty(G6,"__esModule",{value:!0});G6._globalThis=void 0;G6._globalThis=typeof globalThis=="object"?globalThis:global});var $2e=M(j6=>{"use strict";A();Object.defineProperty(j6,"__esModule",{value:!0});j6._globalThis=void 0;var yNt=H2e();Object.defineProperty(j6,"_globalThis",{enumerable:!0,get:function(){return yNt._globalThis}})});var q2e=M(z6=>{"use strict";A();Object.defineProperty(z6,"__esModule",{value:!0});z6._globalThis=void 0;var SNt=$2e();Object.defineProperty(z6,"_globalThis",{enumerable:!0,get:function(){return SNt._globalThis}})});var V2e=M(nA=>{"use strict";A();Object.defineProperty(nA,"__esModule",{value:!0});nA.API_BACKWARDS_COMPATIBILITY_VERSION=nA.makeGetter=nA._global=nA.GLOBAL_LOGS_API_KEY=void 0;var TNt=q2e();nA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");nA._global=TNt._globalThis;function bNt(e,t,n){return r=>r===e?t:n}nA.makeGetter=bNt;nA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var K2e=M(H6=>{"use strict";A();Object.defineProperty(H6,"__esModule",{value:!0});H6.LogsAPI=void 0;var Ap=V2e(),INt=U6(),Y2e=LX(),UX=class e{constructor(){this._proxyLoggerProvider=new Y2e.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Ap._global[Ap.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Ap._global[Ap.GLOBAL_LOGS_API_KEY]=(0,Ap.makeGetter)(Ap.API_BACKWARDS_COMPATIBILITY_VERSION,t,INt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Ap._global[Ap.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Ap._global,Ap.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Ap._global[Ap.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new Y2e.ProxyLoggerProvider}};H6.LogsAPI=UX});var QX=M(la=>{"use strict";A();Object.defineProperty(la,"__esModule",{value:!0});la.logs=la.ProxyLoggerProvider=la.ProxyLogger=la.NoopLoggerProvider=la.NOOP_LOGGER_PROVIDER=la.NoopLogger=la.NOOP_LOGGER=la.SeverityNumber=void 0;var CNt=z2e();Object.defineProperty(la,"SeverityNumber",{enumerable:!0,get:function(){return CNt.SeverityNumber}});var J2e=M6();Object.defineProperty(la,"NOOP_LOGGER",{enumerable:!0,get:function(){return J2e.NOOP_LOGGER}});Object.defineProperty(la,"NoopLogger",{enumerable:!0,get:function(){return J2e.NoopLogger}});var Z2e=U6();Object.defineProperty(la,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return Z2e.NOOP_LOGGER_PROVIDER}});Object.defineProperty(la,"NoopLoggerProvider",{enumerable:!0,get:function(){return Z2e.NoopLoggerProvider}});var vNt=PX();Object.defineProperty(la,"ProxyLogger",{enumerable:!0,get:function(){return vNt.ProxyLogger}});var RNt=LX();Object.defineProperty(la,"ProxyLoggerProvider",{enumerable:!0,get:function(){return RNt.ProxyLoggerProvider}});var xNt=K2e();la.logs=xNt.LogsAPI.getInstance()});var W2e=M(MR=>{"use strict";A();Object.defineProperty(MR,"__esModule",{value:!0});MR.disableInstrumentations=MR.enableInstrumentations=void 0;function DNt(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()}}MR.enableInstrumentations=DNt;function NNt(e){e.forEach(t=>t.disable())}MR.disableInstrumentations=NNt});var tLe=M($6=>{"use strict";A();Object.defineProperty($6,"__esModule",{value:!0});$6.registerInstrumentations=void 0;var X2e=(He(),Me(tt)),wNt=QX(),eLe=W2e();function BNt(e){let t=e.tracerProvider||X2e.trace.getTracerProvider(),n=e.meterProvider||X2e.metrics.getMeterProvider(),r=e.loggerProvider||wNt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,eLe.enableInstrumentations)(o,t,n,r),()=>{(0,eLe.disableInstrumentations)(o)}}$6.registerInstrumentations=BNt});var lLe=M(q6=>{"use strict";A();Object.defineProperty(q6,"__esModule",{value:!0});q6.satisfies=void 0;var zX=(He(),Me(tt)),sLe=/^(?: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-]+)*))?$/,kNt=/^(?<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-]+)*))?$/,ONt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function PNt(e,t,n){if(!MNt(e))return zX.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=FNt(e);if(!r)return!1;let o=[],i=aLe(r,t,o,n);return i&&!n?.includePrerelease?UNt(r,o):i}q6.satisfies=PNt;function MNt(e){return typeof e=="string"&&sLe.test(e)}function aLe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(FX(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=awt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!FX(e,i,n,r))return!1;return!0}return FX(e,t,n,r)}function FX(e,t,n,r){if(t=QNt(t,r),t.includes(" "))return aLe(e,t,n,r);{let o=GNt(t);return n.push(o),LNt(e,o)}}function LNt(e,t){if(t.invalid)return!1;if(!t.version||jX(t.version))return!0;let n=rLe(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=rLe(r,o)}return ONt[t.op]?.includes(n)}function UNt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function QNt(e,t){return e=e.trim(),e=iwt(e,t),e=owt(e),e=swt(e,t),e=e.trim(),e}function nc(e){return!e||e.toLowerCase()==="x"||e==="*"}function FNt(e){let t=e.match(sLe);if(!t){zX.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 GNt(e){if(!e)return{};let t=e.match(kNt);if(!t)return zX.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 jX(e){return e==="*"||e==="x"||e==="X"}function nLe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function jNt(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 zNt(e,t){if(jX(e)||jX(t))return 0;let[n,r]=jNt(nLe(e),nLe(t));return n>r?1:n<r?-1:0}function rLe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=zNt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var uLe="[a-zA-Z0-9-]",cLe="0|[1-9]\\d*",HNt=`\\d*[a-zA-Z-]${uLe}*`,$Nt="((?:<|>)?=?)",oLe=`(?:${cLe}|${HNt})`,qNt=`(?:-(${oLe}(?:\\.${oLe})*))`,iLe=`${uLe}+`,VNt=`(?:\\+(${iLe}(?:\\.${iLe})*))`,GX=`${cLe}|x|X|\\*`,Dk=`[v=\\s]*(${GX})(?:\\.(${GX})(?:\\.(${GX})(?:${qNt})?${VNt}?)?)?`,YNt=`^${$Nt}\\s*${Dk}$`,KNt=new RegExp(YNt),JNt=`^\\s*(${Dk})\\s+-\\s+(${Dk})\\s*$`,ZNt=new RegExp(JNt),WNt="(?:~>?)",XNt=`^${WNt}${Dk}$`,ewt=new RegExp(XNt),twt="(?:\\^)",nwt=`^${twt}${Dk}$`,rwt=new RegExp(nwt);function owt(e){let t=ewt;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 iwt(e,t){let n=rwt,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 swt(e,t){let n=KNt;return e.replace(n,(r,o,i,s,u,l)=>{let f=nc(i),h=f||nc(s),_=h||nc(u),E=_;return o==="="&&E&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&E?(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 awt(e,t){let n=ZNt;return e.replace(n,(r,o,i,s,u,l,f,h,_,E,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(E)?h=`<${+_+1}.0.0-0`:nc(T)?h=`<${_}.${+E+1}.0-0`:v?h=`<=${_}.${E}.${T}-${v}`:t?.includePrerelease?h=`<${_}.${E}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var HX=M(Fa=>{"use strict";A();Object.defineProperty(Fa,"__esModule",{value:!0});Fa.massUnwrap=Fa.unwrap=Fa.massWrap=Fa.wrap=void 0;var rc=console.error.bind(console);function Nk(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 uwt=(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 Nk(o,"__original",r),Nk(o,"__unwrap",()=>{e[t]===o&&Nk(e,t,r)}),Nk(o,"__wrapped",!0),Nk(e,t,o),o};Fa.wrap=uwt;var cwt=(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,Fa.wrap)(r,o,n)})})};Fa.massWrap=cwt;var lwt=(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}};Fa.unwrap=lwt;var dwt=(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,Fa.unwrap)(n,r)})})};Fa.massUnwrap=dwt;function wk(e){e&&e.logger&&(typeof e.logger!="function"?rc("new logger isn't a function, not replacing"):rc=e.logger)}Fa.default=wk;wk.wrap=Fa.wrap;wk.massWrap=Fa.massWrap;wk.unwrap=Fa.unwrap;wk.massUnwrap=Fa.massUnwrap});var dLe=M(Y6=>{"use strict";A();Object.defineProperty(Y6,"__esModule",{value:!0});Y6.InstrumentationAbstract=void 0;var $X=(He(),Me(tt)),pwt=QX(),V6=HX(),qX=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=$X.diag.createComponentLogger({namespace:t}),this._tracer=$X.trace.getTracer(t,n),this._meter=$X.metrics.getMeter(t,n),this._logger=pwt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=V6.wrap;_unwrap=V6.unwrap;_massWrap=V6.massWrap;_massUnwrap=V6.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)}}};Y6.InstrumentationAbstract=qX});var pLe=M(CE=>{"use strict";A();Object.defineProperty(CE,"__esModule",{value:!0});CE.ModuleNameTrie=CE.ModuleNameSeparator=void 0;CE.ModuleNameSeparator="/";var K6=class{hooks=[];children=new Map},VX=class{_trie=new K6;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(CE.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new K6,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],s=!0;for(let u of t.split(CE.ModuleNameSeparator)){let l=o.children.get(u);if(!l){s=!1;break}r||i.push(...l.hooks),o=l}return r&&s&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((u,l)=>u.insertedId-l.insertedId),i.map(({hook:u})=>u))}};CE.ModuleNameTrie=VX});var mLe=M(J6=>{"use strict";A();Object.defineProperty(J6,"__esModule",{value:!0});J6.RequireInTheMiddleSingleton=void 0;var fwt=_S(),fLe=Ue("path"),YX=pLe(),mwt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),KX=class e{_moduleNameTrie=new YX.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new fwt.Hook(null,{internals:!0},(t,n,r)=>{let o=Awt(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 mwt?new e:this._instance=this._instance??new e}};J6.RequireInTheMiddleSingleton=KX;function Awt(e){return fLe.sep!==YX.ModuleNameSeparator?e.split(fLe.sep).join(YX.ModuleNameSeparator):e}});var JX=M(vE=>{"use strict";A();Object.defineProperty(vE,"__esModule",{value:!0});vE.isWrapped=vE.safeExecuteInTheMiddleAsync=vE.safeExecuteInTheMiddle=void 0;function gwt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}vE.safeExecuteInTheMiddle=gwt;async function hwt(e,t,n){let r,o;try{o=await e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}vE.safeExecuteInTheMiddleAsync=hwt;function _wt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}vE.isWrapped=_wt});var hLe=M(Z6=>{"use strict";A();Object.defineProperty(Z6,"__esModule",{value:!0});Z6.InstrumentationBase=void 0;var Bk=Ue("path"),ALe=Ue("util"),Ewt=lLe(),ZX=HX(),ywt=dLe(),Swt=mLe(),Twt=wW(),kk=(He(),Me(tt)),bwt=_S(),Iwt=Ue("fs"),Cwt=JX(),WX=class extends ywt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=Swt.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,Cwt.isWrapped)(t[n])&&this._unwrap(t,n),ALe.types.isProxy(t)){let o=(0,ZX.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,ZX.wrap)(t,n,r)};_unwrap=(t,n)=>ALe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,ZX.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{kk.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){kk.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{kk.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){kk.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,Iwt.readFileSync)(Bk.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{kk.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 gLe(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=Bk.normalize(r);return s.filter(f=>f.name===u).filter(f=>gLe(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&&Bk.isAbsolute(u)){let f=Bk.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=Bk.isAbsolute(t.name)?new bwt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new Twt.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}};Z6.InstrumentationBase=WX;function gLe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,Ewt.satisfies)(t,r,{includePrerelease:n}))}});var _Le=M(W6=>{"use strict";A();Object.defineProperty(W6,"__esModule",{value:!0});W6.normalize=void 0;var vwt=Ue("path");Object.defineProperty(W6,"normalize",{enumerable:!0,get:function(){return vwt.normalize}})});var ELe=M(LR=>{"use strict";A();Object.defineProperty(LR,"__esModule",{value:!0});LR.normalize=LR.InstrumentationBase=void 0;var Rwt=hLe();Object.defineProperty(LR,"InstrumentationBase",{enumerable:!0,get:function(){return Rwt.InstrumentationBase}});var xwt=_Le();Object.defineProperty(LR,"normalize",{enumerable:!0,get:function(){return xwt.normalize}})});var XX=M(UR=>{"use strict";A();Object.defineProperty(UR,"__esModule",{value:!0});UR.normalize=UR.InstrumentationBase=void 0;var yLe=ELe();Object.defineProperty(UR,"InstrumentationBase",{enumerable:!0,get:function(){return yLe.InstrumentationBase}});Object.defineProperty(UR,"normalize",{enumerable:!0,get:function(){return yLe.normalize}})});var SLe=M(X6=>{"use strict";A();Object.defineProperty(X6,"__esModule",{value:!0});X6.InstrumentationNodeModuleDefinition=void 0;var eee=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||[]}};X6.InstrumentationNodeModuleDefinition=eee});var TLe=M(eG=>{"use strict";A();Object.defineProperty(eG,"__esModule",{value:!0});eG.InstrumentationNodeModuleFile=void 0;var Dwt=XX(),tee=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,Dwt.normalize)(t)}};eG.InstrumentationNodeModuleFile=tee});var bLe=M(oT=>{"use strict";A();Object.defineProperty(oT,"__esModule",{value:!0});oT.semconvStabilityFromStr=oT.SemconvStability=void 0;var tG;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(tG=oT.SemconvStability||(oT.SemconvStability={}));function Nwt(e,t){let n=tG.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=tG.DUPLICATE;break}else o.toLowerCase()===e&&(n=tG.STABLE);return n}oT.semconvStabilityFromStr=Nwt});var CLe=M(ds=>{"use strict";A();Object.defineProperty(ds,"__esModule",{value:!0});ds.semconvStabilityFromStr=ds.SemconvStability=ds.safeExecuteInTheMiddleAsync=ds.safeExecuteInTheMiddle=ds.isWrapped=ds.InstrumentationNodeModuleFile=ds.InstrumentationNodeModuleDefinition=ds.InstrumentationBase=ds.registerInstrumentations=void 0;var wwt=tLe();Object.defineProperty(ds,"registerInstrumentations",{enumerable:!0,get:function(){return wwt.registerInstrumentations}});var Bwt=XX();Object.defineProperty(ds,"InstrumentationBase",{enumerable:!0,get:function(){return Bwt.InstrumentationBase}});var kwt=SLe();Object.defineProperty(ds,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return kwt.InstrumentationNodeModuleDefinition}});var Owt=TLe();Object.defineProperty(ds,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return Owt.InstrumentationNodeModuleFile}});var nee=JX();Object.defineProperty(ds,"isWrapped",{enumerable:!0,get:function(){return nee.isWrapped}});Object.defineProperty(ds,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return nee.safeExecuteInTheMiddle}});Object.defineProperty(ds,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return nee.safeExecuteInTheMiddleAsync}});var ILe=bLe();Object.defineProperty(ds,"SemconvStability",{enumerable:!0,get:function(){return ILe.SemconvStability}});Object.defineProperty(ds,"semconvStabilityFromStr",{enumerable:!0,get:function(){return ILe.semconvStabilityFromStr}})});function Lwt(){let e=QR[oee];return e?.helper?e.helper:QR[ree]?.helper}function Uwt(e){let t={helper:e};QR[oee]=t,QR[ree]=t}function Qwt(){delete QR[oee],delete QR[ree]}function jwt(e){return e==="client"?Ao.CLIENT:Ao.INTERNAL}function xLe(e,t,n,r,o){if(DLe(t.name,o))return;let i={attributes:t.attributes,kind:jwt(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)xLe(e,l,n,r,o);s.end(t.endTime)})}function vLe(e,t){return Hwt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function Hwt(e){return e!=null&&typeof e.then=="function"}function DLe(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var nG,Pwt,Mwt,ree,oee,QR,Fwt,Gwt,zwt,NLe,RLe,$wt,qwt,wLe,BLe=B(()=>{A();He();nG=ue(CLe(),1);He();Pwt={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"}},Mwt=Pwt.version.split(".")[0],ree="PRISMA_INSTRUMENTATION",oee=`V${Mwt}_PRISMA_INSTRUMENTATION`,QR=globalThis;Fwt=process.env.PRISMA_SHOW_ALL_TRACES==="true",Gwt="00-10-10-00";zwt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=Jt.getSpanContext(e??We.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:Gwt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)xLe(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return We.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!Fwt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(DLe(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return vLe(i,t(i,r))}return n.startActiveSpan(o,e,i=>vLe(i,t(i,r)))}};NLe={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},RLe=NLe.version,$wt=NLe.name,qwt="@prisma/client",wLe=class extends nG.InstrumentationBase{tracerProvider;constructor(e={}){super($wt,RLe,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new nG.InstrumentationNodeModuleDefinition(qwt,[RLe])]}enable(){let e=this._config;Uwt(new zwt({tracerProvider:this.tracerProvider??Jt.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){Qwt()}isEnabled(){return Lwt()!==void 0}}});function Vwt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function OLe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function Ywt(e){return e==="client"?Ao.CLIENT:Ao.INTERNAL}var kLe,iee,Kwt,PLe,MLe=B(()=>{A();He();BLe();mt();_r();kLe="Prisma";iee=class extends wLe{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=OLe();Vwt(t)&&(t.createEngineSpan=n=>{let r=Jt.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){ei(()=>{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=Ywt(i.kind),u=i.parent_span_id,l=i.span_id,f=i.trace_id,h=i.links?.map(E=>({context:{traceId:E.trace_id,spanId:E.span_id,traceFlags:ou.SAMPLED}})),_=Jt.setSpanContext(We.active(),{traceId:f,spanId:u,traceFlags:ou.SAMPLED});We.with(_,()=>{let E={generateTraceId:()=>f,generateSpanId:()=>l};r._idGenerator=E,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}})}};Kwt=ct(kLe,e=>new iee(e)),PLe=e=>({name:kLe,setupOnce(){Kwt(e)},setup(t){OLe()&&t.on("spanStart",n=>{let r=Pt(n);r.description?.startsWith("prisma:")&&n.setAttribute(Lt,"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 LLe=M(FR=>{"use strict";A();Object.defineProperty(FR,"__esModule",{value:!0});FR.PACKAGE_NAME=FR.PACKAGE_VERSION=void 0;FR.PACKAGE_VERSION="0.60.0";FR.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var see=M(rA=>{"use strict";A();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 ULe=M(rG=>{"use strict";A();Object.defineProperty(rG,"__esModule",{value:!0});rG.ATTR_HTTP_METHOD=void 0;rG.ATTR_HTTP_METHOD="http.method"});var aee=M(Ok=>{"use strict";A();Object.defineProperty(Ok,"__esModule",{value:!0});Ok.AttributeNames=void 0;var Jwt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(Jwt=Ok.AttributeNames||(Ok.AttributeNames={}))});var GLe=M(ps=>{"use strict";A();Object.defineProperty(ps,"__esModule",{value:!0});ps.getPluginFromInput=ps.getExtMetadata=ps.getRouteMetadata=ps.isPatchableExtMethod=ps.isDirectExtInput=ps.isLifecycleExtEventObj=ps.isLifecycleExtType=ps.getPluginName=void 0;var QLe=(Xn(),Me(Vr)),Zwt=ULe(),Pk=see(),RE=aee(),FLe=cn();function Wwt(e){return e.name?e.name:e.pkg.name}ps.getPluginName=Wwt;var Xwt=e=>typeof e=="string"&&Pk.HapiLifecycleMethodNames.has(e);ps.isLifecycleExtType=Xwt;var eBt=e=>{let t=e?.type;return t!==void 0&&(0,ps.isLifecycleExtType)(t)};ps.isLifecycleExtEventObj=eBt;var tBt=e=>Array.isArray(e)&&e.length<=3&&(0,ps.isLifecycleExtType)(e[0])&&typeof e[1]=="function";ps.isDirectExtInput=tBt;var nBt=e=>!Array.isArray(e);ps.isPatchableExtMethod=nBt;var rBt=(e,t,n)=>{let r={[QLe.ATTR_HTTP_ROUTE]:e.path};t&FLe.SemconvStability.OLD&&(r[Zwt.ATTR_HTTP_METHOD]=e.method),t&FLe.SemconvStability.STABLE&&(r[QLe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[RE.AttributeNames.HAPI_TYPE]=Pk.HapiLayerType.PLUGIN,r[RE.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[RE.AttributeNames.HAPI_TYPE]=Pk.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};ps.getRouteMetadata=rBt;var oBt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[RE.AttributeNames.EXT_TYPE]:e,[RE.AttributeNames.HAPI_TYPE]:Pk.HapiLayerType.EXT,[RE.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[RE.AttributeNames.EXT_TYPE]:e,[RE.AttributeNames.HAPI_TYPE]:Pk.HapiLayerType.EXT},name:r}};ps.getExtMetadata=oBt;var iBt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;ps.getPluginFromInput=iBt});var HLe=M(oG=>{"use strict";A();Object.defineProperty(oG,"__esModule",{value:!0});oG.HapiInstrumentation=void 0;var od=(He(),Me(tt)),jLe=Rr(),Mk=cn(),zLe=LLe(),Lk=see(),Xg=GLe(),uee=class extends Mk.InstrumentationBase{_semconvStability;constructor(t={}){super(zLe.PACKAGE_NAME,zLe.PACKAGE_VERSION,t),this._semconvStability=(0,Mk.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new Mk.InstrumentationNodeModuleDefinition(Lk.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,Mk.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,Mk.isWrapped)(n.Server)||this._wrap(n,"Server",this._getServerPatch.bind(this)),n},t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._massUnwrap([n],["server","Server"])})}_getServerPatch(t){let n=this,r=this;return function(i){let s=t.apply(this,[i]);return r._wrap(s,"route",u=>n._getServerRoutePatch.bind(n)(u)),r._wrap(s,"ext",u=>n._getServerExtPatch.bind(n)(u)),r._wrap(s,"register",n._getServerRegisterPatch.bind(n)),s}}_getServerRegisterPatch(t){let n=this;return function(o,i){if(Array.isArray(o))for(let s of o){let u=(0,Xg.getPluginFromInput)(s);n._wrapRegisterHandler(u)}else{let s=(0,Xg.getPluginFromInput)(o);n._wrapRegisterHandler(s)}return t.apply(this,[o,i])}}_getServerExtPatch(t,n){let r=this;return function(...i){if(Array.isArray(i[0])){let s=i[0];for(let u=0;u<s.length;u++){let l=s[u];if((0,Xg.isLifecycleExtType)(l.type)){let f=l,h=r._wrapExtMethods(f.method,l.type,n);f.method=h,s[u]=f}}return t.apply(this,i)}else if((0,Xg.isDirectExtInput)(i)){let s=i,u=s[1],l=r._wrapExtMethods(u,s[0],n);return t.apply(this,[s[0],l,s[2]])}else if((0,Xg.isLifecycleExtEventObj)(i[0])){let s=i[0],u=r._wrapExtMethods(s.method,s.type,n);return s.method=u,t.call(this,s)}return t.apply(this,i)}}_getServerRoutePatch(t,n){let r=this;return function(o){if(Array.isArray(o))for(let i=0;i<o.length;i++){let s=r._wrapRouteHandler.call(r,o[i],n);o[i]=s}else o=r._wrapRouteHandler.call(r,o,n);return t.apply(this,[o])}}_wrapRegisterHandler(t){let n=this,r=(0,Xg.getPluginName)(t),o=t.register,i=this,s=function(u,l){return i._wrap(u,"route",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,Xg.isPatchableExtMethod)(t))return t[Lk.handlerPatched]===!0?t:(t[Lk.handlerPatched]=!0,async function(...s){if(od.trace.getSpan(od.context.active())===void 0)return await t.apply(this,s);let u=(0,Xg.getExtMetadata)(n,r,t.name),l=o.tracer.startSpan(u.name,{attributes:u.attributes});try{return await od.context.with(od.trace.setSpan(od.context.active(),l),t,void 0,...s)}catch(f){throw l.recordException(f),l.setStatus({code:od.SpanStatusCode.ERROR,message:f.message}),f}finally{l.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[Lk.handlerPatched]===!0)return t;t[Lk.handlerPatched]=!0;let o=i=>async function(...s){if(od.trace.getSpan(od.context.active())===void 0)return await i.call(this,...s);let u=(0,jLe.getRPCMetadata)(od.context.active());u?.type===jLe.RPCType.HTTP&&(u.route=t.path);let l=(0,Xg.getRouteMetadata)(t,r._semconvStability,n),f=r.tracer.startSpan(l.name,{attributes:l.attributes});try{return await od.context.with(od.trace.setSpan(od.context.active(),f),()=>i.call(this,...s))}catch(h){throw f.recordException(h),f.setStatus({code:od.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}};oG.HapiInstrumentation=uee});var $Le=M(GR=>{"use strict";A();Object.defineProperty(GR,"__esModule",{value:!0});GR.AttributeNames=GR.HapiInstrumentation=void 0;var sBt=HLe();Object.defineProperty(GR,"HapiInstrumentation",{enumerable:!0,get:function(){return sBt.HapiInstrumentation}});var aBt=aee();Object.defineProperty(GR,"AttributeNames",{enumerable:!0,get:function(){return aBt.AttributeNames}})});var qLe,VLe,YLe,uBt,KLe,JLe=B(()=>{A();qLe=ue($Le(),1);_r();VLe="Hapi",YLe=ct(VLe,()=>new qLe.HapiInstrumentation),uBt=(()=>({name:VLe,setupOnce(){YLe()}})),KLe=uBt});var xE,Uk,cee=B(()=>{A();xE={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},Uk={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var sG,cBt,lBt,iG,ZLe=B(()=>{A();He();sG=ue(cn(),1);mt();cee();cBt="@sentry/instrumentation-hono",lBt="0.0.1",iG=class extends sG.InstrumentationBase{constructor(t={}){super(cBt,lBt,t)}init(){return[new sG.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(Jt.setSpan(We.active(),s),()=>n._safeExecute(()=>{let u=t.apply(this,[r,o]);if(wa(u))return u.then(l=>{let f=n._determineHandlerType(l);return s.setAttributes({[xE.HONO_TYPE]:f,[xE.HONO_NAME]:f===Uk.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(s),l});{let l=n._determineHandlerType(u);return s.setAttributes({[xE.HONO_TYPE]:l,[xE.HONO_NAME]:l===Uk.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 wa(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?Uk.MIDDLEWARE:Uk.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:gi.ERROR,message:n.message}),t.recordException(n))}}});function dBt(e){let t=Pt(e).data,n=t[xE.HONO_TYPE];if(t[rn]||!n)return;e.setAttributes({[Lt]:"auto.http.otel.hono",[rn]:`${n}.hono`});let r=t[xE.HONO_NAME];if(typeof r=="string"&&e.updateName(r),xn()===ep()){ws&&W.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[vg],i=t[fS];typeof o=="string"&&typeof i=="string"&&xn().setTransactionName(`${i} ${o}`)}var WLe,XLe,pBt,eUe,tUe=B(()=>{A();Xn();mt();_r();VS();cee();ZLe();WLe="Hono";XLe=ct(WLe,()=>new iG({responseHook:e=>{dBt(e)}})),pBt=(()=>({name:WLe,setupOnce(){XLe()}})),eUe=pBt});var aG=M(Qk=>{"use strict";A();Object.defineProperty(Qk,"__esModule",{value:!0});Qk.KoaLayerType=void 0;var fBt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(fBt=Qk.KoaLayerType||(Qk.KoaLayerType={}))});var nUe=M(jR=>{"use strict";A();Object.defineProperty(jR,"__esModule",{value:!0});jR.PACKAGE_NAME=jR.PACKAGE_VERSION=void 0;jR.PACKAGE_VERSION="0.62.0";jR.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var lee=M(Fk=>{"use strict";A();Object.defineProperty(Fk,"__esModule",{value:!0});Fk.AttributeNames=void 0;var mBt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(mBt=Fk.AttributeNames||(Fk.AttributeNames={}))});var oUe=M(zR=>{"use strict";A();Object.defineProperty(zR,"__esModule",{value:!0});zR.isLayerIgnored=zR.getMiddlewareMetadata=void 0;var rUe=aG(),uG=lee(),ABt=(Xn(),Me(Vr)),gBt=(e,t,n,r)=>n?{attributes:{[uG.AttributeNames.KOA_NAME]:r?.toString(),[uG.AttributeNames.KOA_TYPE]:rUe.KoaLayerType.ROUTER,[ABt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[uG.AttributeNames.KOA_NAME]:t.name??"middleware",[uG.AttributeNames.KOA_TYPE]:rUe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};zR.getMiddlewareMetadata=gBt;var hBt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));zR.isLayerIgnored=hBt});var iUe=M(cG=>{"use strict";A();Object.defineProperty(cG,"__esModule",{value:!0});cG.kLayerPatched=void 0;cG.kLayerPatched=Symbol("koa-layer-patched")});var dUe=M(lG=>{"use strict";A();Object.defineProperty(lG,"__esModule",{value:!0});lG.KoaInstrumentation=void 0;var oA=(He(),Me(tt)),Gk=cn(),sUe=aG(),aUe=nUe(),uUe=oUe(),cUe=Rr(),lUe=iUe(),dee=class extends Gk.InstrumentationBase{constructor(t={}){super(aUe.PACKAGE_NAME,aUe.PACKAGE_VERSION,t)}init(){return new Gk.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,Gk.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,Gk.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?sUe.KoaLayerType.ROUTER:sUe.KoaLayerType.MIDDLEWARE;return t[lUe.kLayerPatched]===!0||(0,uUe.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(oA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[lUe.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,uUe.getMiddlewareMetadata)(i,t,n,r),f=this.tracer.startSpan(l.name,{attributes:l.attributes}),h=(0,cUe.getRPCMetadata)(oA.context.active());h?.type===cUe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:_}=this.getConfig();_&&(0,Gk.safeExecuteInTheMiddle)(()=>_(f,{context:i,middlewareLayer:t,layerType:o}),T=>{T&&oA.diag.error("koa instrumentation: request hook failed",T)},!0);let E=oA.trace.setSpan(oA.context.active(),f);return oA.context.with(E,async()=>{try{return await t(i,s)}catch(T){throw f.recordException(T),T}finally{f.end()}})})}};lG.KoaInstrumentation=dee});var pUe=M(DE=>{"use strict";A();Object.defineProperty(DE,"__esModule",{value:!0});DE.KoaLayerType=DE.AttributeNames=DE.KoaInstrumentation=void 0;var _Bt=dUe();Object.defineProperty(DE,"KoaInstrumentation",{enumerable:!0,get:function(){return _Bt.KoaInstrumentation}});var EBt=lee();Object.defineProperty(DE,"AttributeNames",{enumerable:!0,get:function(){return EBt.AttributeNames}});var yBt=aG();Object.defineProperty(DE,"KoaLayerType",{enumerable:!0,get:function(){return yBt.KoaLayerType}})});var fUe,mUe,AUe,SBt,gUe,hUe=B(()=>{A();fUe=ue(pUe(),1);Xn();mt();_r();VS();mUe="Koa",AUe=ct(mUe,fUe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){Kr(t,"auto.http.otel.koa");let r=Pt(t).data,o=r["koa.type"];o&&t.setAttribute(rn,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),xn()===ep()){ws&&W.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let s=r[vg],u=n.context?.request?.method?.toUpperCase()||"GET";s&&xn().setTransactionName(`${u} ${s}`)}})),SBt=((e={})=>({name:mUe,setupOnce(){AUe(e)}})),gUe=SBt});var pee=M(wf=>{"use strict";A();Object.defineProperty(wf,"__esModule",{value:!0});wf.ConnectNames=wf.ConnectTypes=wf.AttributeNames=void 0;var TBt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(TBt=wf.AttributeNames||(wf.AttributeNames={}));var bBt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(bBt=wf.ConnectTypes||(wf.ConnectTypes={}));var IBt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(IBt=wf.ConnectNames||(wf.ConnectNames={}))});var _Ue=M(HR=>{"use strict";A();Object.defineProperty(HR,"__esModule",{value:!0});HR.PACKAGE_NAME=HR.PACKAGE_VERSION=void 0;HR.PACKAGE_VERSION="0.57.0";HR.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var EUe=M(dG=>{"use strict";A();Object.defineProperty(dG,"__esModule",{value:!0});dG._LAYERS_STORE_PROPERTY=void 0;dG._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var yUe=M(wE=>{"use strict";A();Object.defineProperty(wE,"__esModule",{value:!0});wE.generateRoute=wE.replaceCurrentStackRoute=wE.addNewStackLayer=void 0;var CBt=(He(),Me(tt)),NE=EUe(),vBt=e=>{Array.isArray(e[NE._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,NE._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[NE._LAYERS_STORE_PROPERTY].push("/");let t=e[NE._LAYERS_STORE_PROPERTY].length;return()=>{t===e[NE._LAYERS_STORE_PROPERTY].length?e[NE._LAYERS_STORE_PROPERTY].pop():CBt.diag.warn("Connect: Trying to pop the stack multiple time")}};wE.addNewStackLayer=vBt;var RBt=(e,t)=>{t&&e[NE._LAYERS_STORE_PROPERTY].splice(-1,1,t)};wE.replaceCurrentStackRoute=RBt;var xBt=e=>e[NE._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);wE.generateRoute=xBt});var bUe=M(BE=>{"use strict";A();Object.defineProperty(BE,"__esModule",{value:!0});BE.ConnectInstrumentation=BE.ANONYMOUS_NAME=void 0;var DBt=(He(),Me(tt)),SUe=Rr(),$R=pee(),TUe=_Ue(),pG=cn(),NBt=(Xn(),Me(Vr)),fee=yUe();BE.ANONYMOUS_NAME="anonymous";var mee=class extends pG.InstrumentationBase{constructor(t={}){super(TUe.PACKAGE_NAME,TUe.PACKAGE_VERSION,t)}init(){return[new pG.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,pG.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,pG.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=$R.ConnectTypes.REQUEST_HANDLER,i=$R.ConnectNames.REQUEST_HANDLER,o=t):(r=$R.ConnectTypes.MIDDLEWARE,i=$R.ConnectNames.MIDDLEWARE,o=n.name||BE.ANONYMOUS_NAME);let s=`${i} - ${o}`,u={attributes:{[NBt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[$R.AttributeNames.CONNECT_TYPE]:r,[$R.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,fee.replaceCurrentStackRoute)(f,t);let E=(0,SUe.getRPCMetadata)(DBt.context.active());t&&E?.type===SUe.RPCType.HTTP&&(E.route=(0,fee.generateRoute)(f));let T="";t?T=`request handler - ${t}`:T=`middleware - ${n.name||BE.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,fee.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)}}};BE.ConnectInstrumentation=mee});var CUe=M(gp=>{"use strict";A();Object.defineProperty(gp,"__esModule",{value:!0});gp.ConnectTypes=gp.ConnectNames=gp.AttributeNames=gp.ANONYMOUS_NAME=gp.ConnectInstrumentation=void 0;var IUe=bUe();Object.defineProperty(gp,"ConnectInstrumentation",{enumerable:!0,get:function(){return IUe.ConnectInstrumentation}});Object.defineProperty(gp,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return IUe.ANONYMOUS_NAME}});var Aee=pee();Object.defineProperty(gp,"AttributeNames",{enumerable:!0,get:function(){return Aee.AttributeNames}});Object.defineProperty(gp,"ConnectNames",{enumerable:!0,get:function(){return Aee.ConnectNames}});Object.defineProperty(gp,"ConnectTypes",{enumerable:!0,get:function(){return Aee.ConnectTypes}})});var vUe,RUe,xUe,wBt,DUe,NUe=B(()=>{A();vUe=ue(CUe(),1);_r();RUe="Connect",xUe=ct(RUe,()=>new vUe.ConnectInstrumentation),wBt=(()=>({name:RUe,setupOnce(){xUe()}})),DUe=wBt});var wUe=M(da=>{"use strict";A();Object.defineProperty(da,"__esModule",{value:!0});da.DB_SYSTEM_VALUE_MSSQL=da.ATTR_NET_PEER_PORT=da.ATTR_NET_PEER_NAME=da.ATTR_DB_USER=da.ATTR_DB_SYSTEM=da.ATTR_DB_STATEMENT=da.ATTR_DB_SQL_TABLE=da.ATTR_DB_NAME=void 0;da.ATTR_DB_NAME="db.name";da.ATTR_DB_SQL_TABLE="db.sql.table";da.ATTR_DB_STATEMENT="db.statement";da.ATTR_DB_SYSTEM="db.system";da.ATTR_DB_USER="db.user";da.ATTR_NET_PEER_NAME="net.peer.name";da.ATTR_NET_PEER_PORT="net.peer.port";da.DB_SYSTEM_VALUE_MSSQL="mssql"});var BUe=M(qR=>{"use strict";A();Object.defineProperty(qR,"__esModule",{value:!0});qR.once=qR.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}`}qR.getSpanName=BBt;var kBt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};qR.once=kBt});var kUe=M(VR=>{"use strict";A();Object.defineProperty(VR,"__esModule",{value:!0});VR.PACKAGE_NAME=VR.PACKAGE_VERSION=void 0;VR.PACKAGE_VERSION="0.33.0";VR.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var UUe=M(OE=>{"use strict";A();Object.defineProperty(OE,"__esModule",{value:!0});OE.TediousInstrumentation=OE.INJECTED_CTX=void 0;var YR=(He(),Me(tt)),OBt=Ue("events"),iA=cn(),iT=(Xn(),Me(Vr)),kE=wUe(),OUe=BUe(),PUe=kUe(),LUe=Symbol("opentelemetry.instrumentation-tedious.current-database");OE.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var MUe=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function fG(e){Object.defineProperty(this,LUe,{value:e,writable:!0})}var gee=class e extends iA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(PUe.PACKAGE_NAME,PUe.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 MUe)(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 MUe)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return fG.call(this,this.config?.options?.database),this.removeListener("databaseChange",fG),this.on("databaseChange",fG),this.once("end",()=>{this.removeListener("databaseChange",fG)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||YR.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,OE.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?.[OE.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[LUe],E=(G=>G.sqlTextOrProcedure==="sp_prepare"&&G.parametersByName?.stmt?.value?G.parametersByName.stmt.value:G.sqlTextOrProcedure)(s),T={};o._dbSemconvStability&iA.SemconvStability.OLD&&(T[kE.ATTR_DB_SYSTEM]=kE.DB_SYSTEM_VALUE_MSSQL,T[kE.ATTR_DB_NAME]=_,T[kE.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,T[kE.ATTR_DB_STATEMENT]=E,T[kE.ATTR_DB_SQL_TABLE]=s.table),o._dbSemconvStability&iA.SemconvStability.STABLE&&(T[iT.ATTR_DB_NAMESPACE]=_,T[iT.ATTR_DB_SYSTEM_NAME]=iT.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,T[iT.ATTR_DB_QUERY_TEXT]=E,T[iT.ATTR_DB_COLLECTION_NAME]=s.table),o._netSemconvStability&iA.SemconvStability.OLD&&(T[kE.ATTR_NET_PEER_NAME]=this.config?.server,T[kE.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&iA.SemconvStability.STABLE&&(T[iT.ATTR_SERVER_ADDRESS]=this.config?.server,T[iT.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,OUe.getSpanName)(t,_,E,s.table),{kind:YR.SpanKind.CLIENT,attributes:T}),R=(0,OUe.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:YR.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=()=>YR.context.with(YR.trace.setSpan(YR.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)}}};OE.TediousInstrumentation=gee});var QUe=M(mG=>{"use strict";A();Object.defineProperty(mG,"__esModule",{value:!0});mG.TediousInstrumentation=void 0;var PBt=UUe();Object.defineProperty(mG,"TediousInstrumentation",{enumerable:!0,get:function(){return PBt.TediousInstrumentation}})});var FUe,MBt,GUe,jUe,LBt,zUe,HUe=B(()=>{A();FUe=ue(QUe(),1);mt();_r();MBt=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),GUe="Tedious",jUe=ct(GUe,()=>new FUe.TediousInstrumentation({})),LBt=(()=>{let e;return{name:GUe,setupOnce(){let t=jUe();e=IB(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:r,data:o}=Pt(n);if(!r||o["db.system"]!=="mssql")return;let i=r.split(" ")[0]||"";MBt.has(i)&&n.setAttribute(Lt,"auto.db.otel.tedious")}))}}}),zUe=LBt});var $Ue=M(KR=>{"use strict";A();Object.defineProperty(KR,"__esModule",{value:!0});KR.PACKAGE_NAME=KR.PACKAGE_VERSION=void 0;KR.PACKAGE_VERSION="0.57.0";KR.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var VUe=M(AG=>{"use strict";A();Object.defineProperty(AG,"__esModule",{value:!0});AG.GenericPoolInstrumentation=void 0;var JR=(He(),Me(tt)),sT=cn(),qUe=$Ue(),hee="generic-pool",_ee=class extends sT.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(qUe.PACKAGE_NAME,qUe.PACKAGE_VERSION,t)}init(){return[new sT.InstrumentationNodeModuleDefinition(hee,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,sT.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 sT.InstrumentationNodeModuleDefinition(hee,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,sT.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 sT.InstrumentationNodeModuleDefinition(hee,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,sT.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=JR.context.active(),s=n.tracer.startSpan("generic-pool.acquire",{},i);return JR.context.with(JR.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=JR.context.active(),u=n.tracer.startSpan("generic-pool.acquire",{},s);return JR.context.with(JR.trace.setSpan(s,u),()=>{t.call(this,(l,f)=>{if(u.end(),o)return o(l,f)},i)})}}};AG.GenericPoolInstrumentation=_ee});var YUe=M(gG=>{"use strict";A();Object.defineProperty(gG,"__esModule",{value:!0});gG.GenericPoolInstrumentation=void 0;var UBt=VUe();Object.defineProperty(gG,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return UBt.GenericPoolInstrumentation}})});var KUe,JUe,ZUe,QBt,WUe,XUe=B(()=>{A();KUe=ue(YUe(),1);mt();_r();JUe="GenericPool",ZUe=ct(JUe,()=>new KUe.GenericPoolInstrumentation({})),QBt=(()=>{let e;return{name:JUe,setupOnce(){let t=ZUe();e=IB(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=Pt(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(Lt,"auto.db.otel.generic_pool")}))}}}),WUe=QBt});var Eee=M(sA=>{"use strict";A();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 yee=M(Si=>{"use strict";A();Object.defineProperty(Si,"__esModule",{value:!0});Si.ATTR_MESSAGING_CONVERSATION_ID=Si.OLD_ATTR_MESSAGING_MESSAGE_ID=Si.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=Si.ATTR_MESSAGING_URL=Si.ATTR_MESSAGING_PROTOCOL_VERSION=Si.ATTR_MESSAGING_PROTOCOL=Si.MESSAGING_OPERATION_VALUE_PROCESS=Si.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=Si.ATTR_MESSAGING_DESTINATION_KIND=Si.ATTR_MESSAGING_DESTINATION=void 0;Si.ATTR_MESSAGING_DESTINATION="messaging.destination";Si.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";Si.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";Si.MESSAGING_OPERATION_VALUE_PROCESS="process";Si.ATTR_MESSAGING_PROTOCOL="messaging.protocol";Si.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";Si.ATTR_MESSAGING_URL="messaging.url";Si.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";Si.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";Si.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var See=M(aT=>{"use strict";A();Object.defineProperty(aT,"__esModule",{value:!0});aT.DEFAULT_CONFIG=aT.EndOperation=void 0;var FBt;(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"})(FBt=aT.EndOperation||(aT.EndOperation={}));aT.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var rQe=M(Ti=>{"use strict";A();Object.defineProperty(Ti,"__esModule",{value:!0});Ti.isConfirmChannelTracing=Ti.unmarkConfirmChannelTracing=Ti.markConfirmChannelTracing=Ti.getConnectionAttributesFromUrl=Ti.getConnectionAttributesFromServer=Ti.normalizeExchange=Ti.CONNECTION_ATTRIBUTES=Ti.CHANNEL_CONSUME_TIMEOUT_TIMER=Ti.CHANNEL_SPANS_NOT_ENDED=Ti.MESSAGE_STORED_SPAN=void 0;var Tee=(He(),Me(tt)),PE=cn(),hG=(Xn(),Me(Vr)),jk=Eee(),_G=yee();Ti.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");Ti.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");Ti.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");Ti.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var bee=(0,Tee.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),GBt=e=>e!==""?e:"<default>";Ti.normalizeExchange=GBt;var jBt=e=>e.replace(/:[^:@/]*@/,":***@"),eQe=(e,t)=>e||(t==="AMQP"?5672:5671),tQe=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},nQe=e=>e||"localhost",aA=(e,t,n,r)=>n?{[t]:n}:(Tee.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),zBt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[jk.ATTR_MESSAGING_SYSTEM]:t}:{}};Ti.getConnectionAttributesFromServer=zBt;var HBt=(e,t)=>{let n={[_G.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=tQe(r?.protocol);Object.assign(n,{...aA(e,_G.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=nQe(r?.hostname);t&PE.SemconvStability.OLD&&Object.assign(n,{...aA(e,jk.ATTR_NET_PEER_NAME,i,"hostname")}),t&PE.SemconvStability.STABLE&&Object.assign(n,{...aA(e,hG.ATTR_SERVER_ADDRESS,i,"hostname")});let s=eQe(r.port,o);t&PE.SemconvStability.OLD&&Object.assign(n,aA(e,jk.ATTR_NET_PEER_PORT,s,"port")),t&PE.SemconvStability.STABLE&&Object.assign(n,aA(e,hG.ATTR_SERVER_PORT,s,"port"))}else{let r=jBt(e);n[_G.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=tQe(o.protocol);Object.assign(n,{...aA(r,_G.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let s=nQe(o.hostname);t&PE.SemconvStability.OLD&&Object.assign(n,{...aA(r,jk.ATTR_NET_PEER_NAME,s,"hostname")}),t&PE.SemconvStability.STABLE&&Object.assign(n,{...aA(r,hG.ATTR_SERVER_ADDRESS,s,"hostname")});let u=eQe(o.port?parseInt(o.port):void 0,i);t&PE.SemconvStability.OLD&&Object.assign(n,aA(r,jk.ATTR_NET_PEER_PORT,u,"port")),t&PE.SemconvStability.STABLE&&Object.assign(n,aA(r,hG.ATTR_SERVER_PORT,u,"port"))}catch(o){Tee.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};Ti.getConnectionAttributesFromUrl=HBt;var $Bt=e=>e.setValue(bee,!0);Ti.markConfirmChannelTracing=$Bt;var qBt=e=>e.deleteValue(bee);Ti.unmarkConfirmChannelTracing=qBt;var VBt=e=>e.getValue(bee)===!0;Ti.isConfirmChannelTracing=VBt});var oQe=M(ZR=>{"use strict";A();Object.defineProperty(ZR,"__esModule",{value:!0});ZR.PACKAGE_NAME=ZR.PACKAGE_VERSION=void 0;ZR.PACKAGE_VERSION="0.61.0";ZR.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var sQe=M(SG=>{"use strict";A();Object.defineProperty(SG,"__esModule",{value:!0});SG.AmqplibInstrumentation=void 0;var oi=(He(),Me(tt)),EG=Rr(),Dr=cn(),YBt=Eee(),id=yee(),oc=See(),bi=rQe(),iQe=oQe(),yG=[">=0.5.5 <1"],Iee=class extends Dr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(iQe.PACKAGE_NAME,iQe.PACKAGE_VERSION,{...oc.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Dr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...oc.DEFAULT_CONFIG,...t})}init(){let t=new Dr.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",yG,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new Dr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",yG,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new Dr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",yG,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new Dr.InstrumentationNodeModuleDefinition("amqplib",yG,void 0,void 0,[t,r,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,Dr.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,Dr.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,Dr.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,Dr.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,Dr.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,oc.EndOperation.Ack)),(0,Dr.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,oc.EndOperation.Nack)),(0,Dr.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,oc.EndOperation.Reject)),(0,Dr.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,oc.EndOperation.AckAll)),(0,Dr.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,oc.EndOperation.NackAll)),(0,Dr.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,Dr.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,Dr.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,Dr.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,Dr.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,Dr.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,Dr.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,Dr.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,Dr.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,Dr.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,Dr.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,bi.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,bi.getConnectionAttributesFromServer)(l);l[bi.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[bi.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[bi.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[bi.CHANNEL_SPANS_NOT_ENDED]??[],E=_.findIndex(T=>T.msg===s);if(E<0)o.endConsumerSpan(s,t,n,h);else if(n!==oc.EndOperation.Reject&&u){for(let T=0;T<=E;T++)o.endConsumerSpan(_[T].msg,t,n,h);_.splice(0,E+1)}else o.endConsumerSpan(s,t,n,h),_.splice(E,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,bi.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let _=setInterval(()=>{r.checkConsumeTimeoutOnChannel(l)},h);_.unref(),l[bi.CHANNEL_CONSUME_TIMEOUT_TIMER]=_}l[bi.CHANNEL_SPANS_NOT_ENDED]=[]}let f=function(h){if(!h)return s.call(this,h);let _=h.properties.headers??{},E=oi.propagation.extract(oi.ROOT_CONTEXT,_),T=h.fields?.exchange,v;if(r._config.useLinksForConsume){let P=E?oi.trace.getSpan(E)?.spanContext():void 0;E=void 0,P&&(v=[{context:P}])}let R=r.tracer.startSpan(`${i} process`,{kind:oi.SpanKind.CONSUMER,attributes:{...l?.connection?.[bi.CONNECTION_ATTRIBUTES],[id.ATTR_MESSAGING_DESTINATION]:T,[id.ATTR_MESSAGING_DESTINATION_KIND]:id.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[id.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[YBt.ATTR_MESSAGING_OPERATION]:id.MESSAGING_OPERATION_VALUE_PROCESS,[id.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[id.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:v},E),{consumeHook:x}=r.getConfig();x&&(0,Dr.safeExecuteInTheMiddle)(()=>x(R,{moduleVersion:t,msg:h}),P=>{P&&oi.diag.error("amqplib instrumentation: consumerHook error",P)},!0),u?.noAck||(l[bi.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,EG.hrTime)()}),h[bi.MESSAGE_STORED_SPAN]=R);let k=E||oi.ROOT_CONTEXT;oi.context.with(oi.trace.setSpan(k,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:E}=r.createPublishSpan(r,i,s,h,l),{publishHook:T}=r.getConfig();T&&(0,Dr.safeExecuteInTheMiddle)(()=>T(_,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:E,isConfirmChannel:!0}),k=>{k&&oi.diag.error("amqplib instrumentation: publishHook error",k)},!0);let v=function(k,P){try{f?.call(this,k,P)}finally{let{publishConfirmHook:j}=r.getConfig();j&&(0,Dr.safeExecuteInTheMiddle)(()=>j(_,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:l,isConfirmChannel:!0,confirmError:k}),G=>{G&&oi.diag.error("amqplib instrumentation: publishConfirmHook error",G)},!0),k&&_.setStatus({code:oi.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),_.end()}},R=(0,bi.markConfirmChannelTracing)(oi.context.active()),x=[...arguments];return x[3]=E,x[4]=oi.context.bind((0,bi.unmarkConfirmChannelTracing)(oi.trace.setSpan(R,_)),v),oi.context.with(R,n.bind(this,...x))}}getPublishPatch(t,n){let r=this;return function(i,s,u,l){if((0,bi.isConfirmChannelTracing)(oi.context.active()))return n.apply(this,arguments);{let f=this,{span:h,modifiedOptions:_}=r.createPublishSpan(r,i,s,f,l),{publishHook:E}=r.getConfig();E&&(0,Dr.safeExecuteInTheMiddle)(()=>E(h,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:_,isConfirmChannel:!1}),R=>{R&&oi.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,bi.normalizeExchange)(n),u=t.tracer.startSpan(`publish ${s}`,{kind:oi.SpanKind.PRODUCER,attributes:{...o.connection[bi.CONNECTION_ATTRIBUTES],[id.ATTR_MESSAGING_DESTINATION]:n,[id.ATTR_MESSAGING_DESTINATION_KIND]:id.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[id.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[id.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[id.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),l=i??{};return l.headers=l.headers??{},oi.propagation.inject(oi.trace.setSpan(oi.context.active(),u),l.headers),{span:u,modifiedOptions:l}}endConsumerSpan(t,n,r,o){let i=t[bi.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:oi.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[bi.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[bi.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(s=>{this.endConsumerSpan(s.msg,n,r,o)}),t[bi.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(t,n,r,o){let{consumeEndHook:i}=this.getConfig();i&&(0,Dr.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:r,endOperation:o}),s=>{s&&oi.diag.error("amqplib instrumentation: consumerEndHook error",s)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,EG.hrTime)(),r=t[bi.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let s=r[o],u=(0,EG.hrTimeDuration)(s.timeOfConsume,n);if((0,EG.hrTimeToMilliseconds)(u)<i)break;this.endConsumerSpan(s.msg,null,oc.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};SG.AmqplibInstrumentation=Iee});var uQe=M(ME=>{"use strict";A();Object.defineProperty(ME,"__esModule",{value:!0});ME.EndOperation=ME.DEFAULT_CONFIG=ME.AmqplibInstrumentation=void 0;var KBt=sQe();Object.defineProperty(ME,"AmqplibInstrumentation",{enumerable:!0,get:function(){return KBt.AmqplibInstrumentation}});var aQe=See();Object.defineProperty(ME,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return aQe.DEFAULT_CONFIG}});Object.defineProperty(ME,"EndOperation",{enumerable:!0,get:function(){return aQe.EndOperation}})});var cQe,lQe,JBt,dQe,ZBt,pQe,fQe=B(()=>{A();cQe=ue(uQe(),1);_r();lQe="Amqplib",JBt={consumeEndHook:e=>{Kr(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Kr(e,"auto.amqplib.otel.publisher")}},dQe=ct(lQe,()=>new cQe.AmqplibInstrumentation(JBt)),ZBt=(()=>({name:lQe,setupOnce(){dQe()}})),pQe=ZBt});var zk,Cee=B(()=>{A();zk="VercelAI"});function XBt(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 ekt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(tkt(t.content),nkt(t.content))}function tkt(e){for(let t of e){if(!XBt(t))continue;let n=tJ(t.toolCallId);n?Vl(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"),an(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):Vl(r=>{r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),an(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function nkt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&nJ(t.toolCallId)}function rkt(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 bG,WBt,mQe,TG,AQe=B(()=>{A();bG=ue(cn(),1);mt();Cee();WBt=[">=3.0.0 <7"],mQe=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];TG=class e extends bG.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 bG.InstrumentationNodeModuleDefinition("ai",WBt,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(zk),_=h?.options,E=h?!!f?.getOptions().sendDefaultPii:!1,{recordInputs:T,recordOutputs:v}=rkt(_,u,l,E);return s[0].experimental_telemetry={...u,isEnabled:l!==void 0?l:!0,recordInputs:T,recordOutputs:v},Cf(()=>Reflect.apply(o,i,s),R=>{R&&typeof R=="object"&&os(R,"_sentry_active_span",$c())},()=>{},R=>{ekt(R)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of mQe)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=mQe.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function okt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var gQe,ikt,hQe,_Qe=B(()=>{A();mt();_r();Cee();AQe();gQe=ct(zk,()=>new TG({}));ikt=((e={})=>{let t;return{name:zk,options:e,setupOnce(){t=gQe()},afterAllSetup(n){e.force??okt(n)?xF(n):t?.callWhenPatched(()=>xF(n))}}}),hQe=ikt});var CG,skt,IG,EQe=B(()=>{A();CG=ue(cn(),1);mt();skt=[">=4.0.0 <7"],IG=class extends CG.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",er,t)}init(){return new CG.InstrumentationNodeModuleDefinition("openai",skt,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(NS(sE))return Reflect.construct(r,s);let u=Reflect.construct(r,s);return wF(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 yQe,akt,SQe,TQe=B(()=>{A();mt();_r();EQe();yQe=ct(sE,e=>new IG(e)),akt=((e={})=>({name:sE,setupOnce(){yQe(e)}})),SQe=akt});var RG,ukt,vG,bQe=B(()=>{A();RG=ue(cn(),1);mt();ukt=[">=0.19.2 <1.0.0"],vG=class extends RG.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",er,t)}init(){return new RG.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",ukt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(NS(aE))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return BF(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 IQe,ckt,CQe,vQe=B(()=>{A();mt();_r();bQe();IQe=ct(aE,e=>new vG(e)),ckt=((e={})=>({name:aE,options:e,setupOnce(){IQe(e)}})),CQe=ckt});var WR,RQe,xG,xQe=B(()=>{A();WR=ue(cn(),1);mt();RQe=[">=0.10.0 <2"],xG=class extends WR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",er,t)}init(){return new WR.InstrumentationNodeModuleDefinition("@google/genai",RQe,n=>this._patch(n),n=>n,[new WR.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",RQe,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(NS(uE))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return kF(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 TB(t,"GoogleGenAI",o),t}}});var DQe,lkt,NQe,wQe=B(()=>{A();mt();_r();xQe();DQe=ct(uE,e=>new xG(e)),lkt=((e={})=>({name:uE,setupOnce(){DQe(e)}})),NQe=lkt});function dkt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function pkt(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=dkt(l,t);return u.callbacks=f,Reflect.apply(r,o,i)}})}var LE,DG,NG,BQe=B(()=>{A();LE=ue(cn(),1);mt();DG=[">=0.1.0 <2.0.0"];NG=class extends LE.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",er,t)}init(){let t=[],n=["@langchain/anthropic","@langchain/openai","@langchain/google-genai","@langchain/mistralai","@langchain/google-vertexai","@langchain/groq"];for(let r of n)t.push(new LE.InstrumentationNodeModuleDefinition(r,DG,this._patch.bind(this),o=>o,[new LE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,DG,this._patch.bind(this),o=>o)]));return t.push(new LE.InstrumentationNodeModuleDefinition("langchain",DG,this._patch.bind(this),r=>r,[new LE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",DG,this._patch.bind(this),r=>r)])),t}_patch(t){_K([sE,aE,uE]);let n=LF(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]=pkt(f,n))}}}});var kQe,fkt,OQe,PQe=B(()=>{A();mt();_r();BQe();kQe=ct(OF,e=>new NG(e)),fkt=((e={})=>({name:OF,setupOnce(){kQe(e)}})),OQe=fkt});var XR,MQe,wG,LQe=B(()=>{A();XR=ue(cn(),1);mt();MQe=[">=0.0.0 <2.0.0"],wG=class extends XR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",er,t)}init(){return new XR.InstrumentationNodeModuleDefinition("@langchain/langgraph",MQe,this._patch.bind(this),n=>n,[new XR.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",MQe,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&QF(t.StateGraph.prototype,this.getConfig()),t}}});var UQe,mkt,QQe,FQe=B(()=>{A();mt();_r();LQe();UQe=ct(UF,e=>new wG(e)),mkt=((e={})=>({name:UF,setupOnce(){UQe(e)}})),QQe=mkt});import*as jQe from"node:net";function zQe(e,t,n,r,o){let s=()=>{},u=o.firestoreSpanCreationHook;typeof u=="function"&&(s=h=>{(0,eh.safeExecuteInTheMiddle)(()=>u(h),_=>{_&&Hl.error(_?.message)},!0)});let l=new eh.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>GQe(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 eh.InstrumentationNodeModuleFile(h,t,_=>GQe(_,n,r,e,s),_=>HQe(_,r)));return l}function GQe(e,t,n,r,o){return HQe(e,n),t(e,"addDoc",Akt(r,o)),t(e,"getDocs",hkt(r,o)),t(e,"setDoc",_kt(r,o)),t(e,"deleteDoc",gkt(r,o)),e}function HQe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,eh.isWrapped)(e[n])&&t(e,n);return e}function Akt(e,t){return function(r){return function(o,i){let s=kG(e,"addDoc",o);return t(s),BG(s,()=>r(o,i))}}}function gkt(e,t){return function(r){return function(o){let i=kG(e,"deleteDoc",o.parent||o);return t(i),BG(i,()=>r(o))}}}function hkt(e,t){return function(r){return function(o){let i=kG(e,"getDocs",o);return t(i),BG(i,()=>r(o))}}}function _kt(e,t){return function(r){return function(o,i,s){let u=kG(e,"setDoc",o.parent||o);return t(u),BG(u,()=>typeof s<"u"?r(o,i,s):r(o,i))}}}function BG(e,t){return We.with(Jt.setSpan(We.active(),e),()=>(0,eh.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function kG(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:Ao.CLIENT});return ykt(r,n),r.setAttribute(QC,t),r}function Ekt(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(jQe.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 ykt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},s={[jV]:t.path,[zV]:n.name,[pS]:"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}=Ekt(i);u&&(s[ZV]=u),l&&(s[WV]=l),e.setAttributes(s)}var eh,$Qe=B(()=>{A();He();eh=ue(cn(),1);Xn()});function qQe(e,t,n,r,o){let i=()=>{},s=()=>{},u=o.functions?.errorHook,l=o.functions?.requestHook,f=o.functions?.responseHook;typeof f=="function"&&(s=(E,T)=>{(0,th.safeExecuteInTheMiddle)(()=>f(E,T),v=>{v&&Hl.error(v?.message)},!0)}),typeof l=="function"&&(i=E=>{(0,th.safeExecuteInTheMiddle)(()=>l(E),T=>{T&&Hl.error(T?.message)},!0)});let h=new th.InstrumentationNodeModuleDefinition("firebase-functions",t);return[{name:"firebase-functions/lib/v2/providers/https.js",triggerType:"function"},{name:"firebase-functions/lib/v2/providers/firestore.js",triggerType:"firestore"},{name:"firebase-functions/lib/v2/providers/scheduler.js",triggerType:"scheduler"},{name:"firebase-functions/lib/v2/storage.js",triggerType:"storage"}].forEach(({name:E,triggerType:T})=>{h.files.push(new th.InstrumentationNodeModuleFile(E,t,v=>Skt(v,n,r,e,{requestHook:i,responseHook:s,errorHook:u},T),v=>VQe(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:Ao.SERVER}),E={"faas.name":h,"faas.trigger":n,"faas.provider":"firebase"};return process.env.GCLOUD_PROJECT&&(E["cloud.project_id"]=process.env.GCLOUD_PROJECT),process.env.EVENTARC_CLOUD_EVENT_SOURCE&&(E["cloud.event_source"]=process.env.EVENTARC_CLOUD_EVENT_SOURCE),_.setAttributes(E),t?.requestHook?.(_),We.with(Jt.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 Skt(e,t,n,r,o,i){switch(VQe(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 VQe(e,t){let n=["onSchedule","onRequest","onCall","onObjectFinalized","onObjectArchived","onObjectDeleted","onObjectMetadataUpdated","onDocumentCreated","onDocumentUpdated","onDocumentDeleted","onDocumentWritten","onDocumentCreatedWithAuthContext","onDocumentUpdatedWithAuthContext","onDocumentDeletedWithAuthContext","onDocumentWrittenWithAuthContext"];for(let r of n)(0,th.isWrapped)(e[r])&&t(e,r);return e}var th,YQe=B(()=>{A();He();th=ue(cn(),1)});var JQe,KQe,Tkt,bkt,OG,ZQe=B(()=>{A();JQe=ue(cn(),1);mt();$Qe();YQe();KQe={},Tkt=[">=3.0.0 <5"],bkt=[">=6.0.0 <7"],OG=class extends JQe.InstrumentationBase{constructor(t=KQe){super("@sentry/instrumentation-firebase",er,t)}setConfig(t={}){super.setConfig({...KQe,...t})}init(){let t=[];return t.push(zQe(this.tracer,Tkt,this._wrap,this._unwrap,this.getConfig())),t.push(qQe(this.tracer,bkt,this._wrap,this._unwrap,this.getConfig())),t}}});var WQe,Ikt,XQe,Ckt,eFe,tFe=B(()=>{A();mt();_r();ZQe();WQe="Firebase",Ikt={firestoreSpanCreationHook:e=>{Kr(e,"auto.firebase.otel.firestore"),e.setAttribute(rn,"db.query")},functions:{requestHook:e=>{Kr(e,"auto.firebase.otel.functions"),e.setAttribute(rn,"http.request")},errorHook:async(e,t)=>{t&&(an(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await bv(2e3))}}},XQe=ct(WQe,()=>new OG(Ikt)),Ckt=(()=>({name:WQe,setupOnce(){XQe()}})),eFe=Ckt});function nFe(){return[ike(),QOe(),pPe(),eUe(),XPe(),mMe(),vMe(),UMe(),g2e(),L2e(),PLe(),KLe(),gUe(),DUe(),zUe(),WUe(),DPe(),pQe(),FPe(),OQe(),QQe(),hQe(),SQe(),CQe(),NQe(),G2e(),eFe()]}var rFe=B(()=>{A();fQe();vQe();NUe();ske();jOe();tFe();XUe();wQe();mPe();JLe();tUe();NPe();hUe();PQe();FQe();GPe();eMe();AMe();RMe();QMe();TQe();U2e();j2e();MLe();h2e();HUe();_Qe()});function iFe(e,t={}){e.getOptions().debug&&kZ();let[n,r]=vkt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function vkt(e,t={}){let n=new oFe.BasicTracerProvider({sampler:new $4(e),resource:(0,PG.defaultResource)().merge((0,PG.resourceFromAttributes)({[XV]:"node",[GV]:"sentry",[e7]:er})),forceFlushTimeoutMillis:500,spanProcessors:[new H4({timeout:Rkt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});Jt.setGlobalTracerProvider(n),Af.setGlobalPropagator(new z4);let r=new V4;return We.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function Rkt(e){if(e!=null){if(e>vee)return ws&&W.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${vee}`),vee;if(e<=0||Number.isNaN(e)){ws&&W.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var PG,oFe,vee,sFe=B(()=>{A();He();PG=ue(qJ(),1),oFe=ue(_Z(),1);Xn();mt();_r();tR();VS();vee=1e6});function aFe(){return e3().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(PBe(),HBe())}function uFe(e){return[...aFe(),...Qi(e)?nFe():[]]}function Ree(e={}){return xkt(e,uFe)}function xkt(e={},t){wS(e,"node");let n=iW({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(iFe(n,{spanProcessors:e.openTelemetrySpanProcessors}),t3()),n}var cFe=B(()=>{A();mt();_r();MBe();$Be();rFe();sFe()});var ex=B(()=>{A();cFe();mt();_r()});function zr(){return Dkt}function hu(){return lFe}function dFe(){return Nkt}var Dkt,lFe,Nkt,sc=B(()=>{"use strict";A();Dkt="prod",lFe="0.1.230",Nkt=`@loredotlink/cli/${lFe}`});function Pkt(e=""){if(!kkt.test(e))return e!==e.toLowerCase()}function fFe(e,t){let n=t??Okt,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=Pkt(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 Mkt(e){return e?e[0].toUpperCase()+e.slice(1):""}function Lkt(e){return e?e[0].toLowerCase()+e.slice(1):""}function Ukt(e,t){return e?(Array.isArray(e)?e:fFe(e)).map(n=>Mkt(t?.normalize?n.toLowerCase():n)).join(""):""}function $k(e,t){return Lkt(Ukt(e||"",t))}function MG(e,t){return e?(Array.isArray(e)?e:fFe(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function mFe(e){return MG(e||"","_")}var kkt,Okt,AFe=B(()=>{A();kkt=/\d/,Okt=["-","_","/","."]});import{parseArgs as Qkt}from"node:util";function FG(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function Dee(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 sd(e){return typeof e=="function"?e():e}function Fkt(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,k]of Object.entries(o)){let P=k;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 k=u.get(x)||[];for(let P of k)if(n.has(P))return"boolean";return"string"}function h(x){if(r.has(x))return!0;let k=u.get(x)||[];for(let P of k)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,k]of s.entries())x.length===1&&l[k]&&!l[k].short&&(l[k].short=x);let E=[],T={};for(let x=0;x<e.length;x++){let k=e[x];if(k==="--"){E.push(...e.slice(x));break}if(k.startsWith("--no-")){let P=k.slice(5);T[P]=!0;continue}E.push(k)}let v;try{v=Qkt({args:E,options:Object.keys(l).length>0?l:void 0,allowPositionals:!0,strict:!1})}catch{v={values:{},positionals:E}}let R={_:[]};R._=v.positionals;for(let[x,k]of Object.entries(v.values)){let P=k;f(x)==="boolean"&&typeof k=="string"?P=k!=="false":h(x)&&typeof k=="boolean"&&(P=""),R[x]=P}for(let[x]of Object.entries(T)){R[x]=!1;let k=s.get(x);k&&(R[k]=!1);let P=u.get(x);if(P)for(let j of P)R[j]=!1}for(let[x,k]of s.entries())R[x]!==void 0&&R[k]===void 0&&(R[k]=R[x]),R[k]!==void 0&&R[x]===void 0&&(R[x]=R[k]),R[x]!==R[k]&&i[k]===R[k]&&(R[k]=R[x]);return R}function jkt(e,t){let n={boolean:[],string:[],alias:{},default:{}},r=_Fe(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=$k(u.name),f=MG(u.name);if(l!==u.name||f!==u.name){let h=FG(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=Fkt(e,n),[...i]=o._,s=new Proxy(o,{get(u,l){return u[l]??u[$k(l)]??u[MG(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 uT(`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 uT(`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 uT(`Missing required argument: --${u.name}`,"EARG");return s}function _Fe(e){let t=[];for(let[n,r]of Object.entries(e||{}))t.push({...r,name:n,alias:FG(r.alias)});return t}async function zkt(e){return Promise.all(e.map(t=>sd(t)))}async function cT(e,t){let n=await sd(e.args||{}),r=jkt(t.rawArgs,n),o={rawArgs:t.rawArgs,args:r,data:t.data,cmd:e},i=await zkt(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 sd(e.subCommands);if(f&&Object.keys(f).length>0){let h=Hkt(t.rawArgs,n),_=t.rawArgs[h];if(_){let E=await gFe(f,_);if(!E)throw new uT(`Unknown command ${Bf(_)}`,"E_UNKNOWN_COMMAND");await cT(E,{rawArgs:t.rawArgs.slice(h+1)})}else{let E=await sd(e.default);if(E){if(e.run)throw new uT("Cannot specify both 'run' and 'default' on the same command.","E_DEFAULT_CONFLICT");let T=await gFe(f,E);if(!T)throw new uT(`Default sub command ${Bf(E)} not found in subCommands.`,"E_UNKNOWN_COMMAND");await cT(T,{rawArgs:t.rawArgs})}else if(!e.run)throw new uT("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 gFe(e,t){if(t in e)return sd(e[t]);for(let n of Object.values(e)){let r=await sd(n),o=await sd(r?.meta);if(o?.alias&&FG(o.alias).includes(t))return r}}function Hkt(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(r==="--")return-1;if(r.startsWith("-")){!r.includes("=")&&$kt(r,t)&&n++;continue}return n}return-1}function $kt(e,t){let n=e.replace(/^-{1,2}/,""),r=$k(n);for(let[o,i]of Object.entries(t))if(!(i.type!=="string"&&i.type!=="enum")&&(r===$k(o)||(Array.isArray(i.alias)?i.alias:i.alias?[i.alias]:[]).includes(n)))return!0;return!1}async function wee(e,t){let n=await sd(e.meta||{}),r=_Fe(await sd(e.args||{})),o=await sd(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+Nee(T)),hFe(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(", ")+Nee(T);if(s.push([Bf(R),hFe(T,v)]),T.type==="boolean"&&(T.default===!0||T.negativeDescription)&&!qkt.test(T.name)){let x=[...(T.alias||[]).map(k=>`--no-${k}`),`--no-${T.name}`].join(", ");s.push([Bf(x),[T.negativeDescription,v?QG("(Required)"):""].filter(Boolean).join(" ")])}v&&f.push(`--${T.name}`+Nee(T))}if(e.subCommands){let T=[],v=await sd(e.subCommands);for(let[R,x]of Object.entries(v)){let k=await sd((await sd(x))?.meta);if(k?.hidden)continue;let P=FG(k?.alias),j=[R,...P].join(", ");l.push([Bf(j),k?.description||""]),T.push(R,...P)}f.push(T.join("|"))}let h=[],_=n.version||o.version;h.push(QG(`${n.description} (${i+(_?` v${_}`:"")})`),"");let E=s.length>0||u.length>0;return h.push(`${UG(LG("USAGE"))} ${Bf(`${i}${E?" [OPTIONS]":""} ${f.join(" ")}`)}`,""),u.length>0&&(h.push(UG(LG("ARGUMENTS")),""),h.push(Dee(u," ")),h.push("")),s.length>0&&(h.push(UG(LG("OPTIONS")),""),h.push(Dee(s," ")),h.push("")),l.length>0&&(h.push(UG(LG("COMMANDS")),""),h.push(Dee(l," ")),h.push("",`Use ${Bf(`${i} <command> --help`)} for more information about a command.`)),h.filter(T=>typeof T=="string").join(`
|
|
40
40
|
`)}function Nee(e){let t=e.valueHint?`=<${e.valueHint}>`:"",n=t||`=<${mFe(e.name)}>`;return!e.type||e.type==="positional"||e.type==="boolean"?t:e.type==="enum"&&e.options?.length?`=<${e.options.join("|")}>`:n}function hFe(e,t){let n=t?QG("(Required)"):"",r=e.default===void 0?"":QG(`(Default: ${e.default})`);return[e.description,n,r].filter(Boolean).join(" ")}var uT,Gkt,GG,LG,Bf,QG,UG,qkt,Bee=B(()=>{A();AFe();uT=class extends Error{code;constructor(e,t){super(e),this.name="CLIError",this.code=t}};Gkt=(()=>{let e=globalThis.process?.env??{};return e.NO_COLOR==="1"||e.TERM==="dumb"||e.TEST||e.CI})(),GG=(e,t=39)=>n=>Gkt?n:`\x1B[${e}m${n}\x1B[${t}m`,LG=GG(1,22),Bf=GG(36),QG=GG(90),UG=GG(4,24);qkt=/^no[-A-Z]/});var tx,kee,Oee,jG=B(()=>{"use strict";A();tx="team_credit_2026_06",kee=Object.freeze({[tx]:{planVersion:tx,grantPerSeatMicrocents:20*1e5,seatPriceMicrocents:20*1e5,markupPct:10,rollover:!1,onEmptyPool:"hard_stop"}}),Oee=(e=tx)=>kee[e]??kee[tx]});var zG,Vkt,Pee=B(()=>{"use strict";A();jG();zG={creatorMonthlyPriceId:"STRIPE_PRICE_CREATOR_MONTHLY",teamSeatPriceId:"STRIPE_PRICE_TEAM_SEAT_MONTHLY",tokenMeteredPriceId:"STRIPE_PRICE_TOKEN_METERED"},Vkt={...zG,tokenMeterId:"STRIPE_TOKEN_METER_ID"}});var Mee,Ykt,Kkt,yFe,qQn,Lee=B(()=>{"use strict";A();jG();Pee();Mee=["free","creator","team"],Ykt=typeof process<"u"&&process.env?.NODE_ENV!=="production",Kkt={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}},{tier:"creator",subjectType:"user",name:"Creator",description:"For builders who share a lot.",price:29,isFeatured:!0,priceId:Ykt?"price_1TP9BSKwvRM43sh64waIrvjj":"price_1TPA2gKwvRM43sh6Kp4ZCpJZ",features:[{name:"Everything in Free"}],entitlements:{workspaceScope:!1,review:!1}},{tier:"team",subjectType:"organization",name:"Team",description:"Org-wide thread sharing plus the review surface. Each seat grants a pooled $20/mo of AI credits.",price:Oee().seatPriceMicrocents/1e5,minSeats:2,priceId:`env.${zG.teamSeatPriceId}`,features:[{name:"Everything in Creator"},{name:"Workspace-wide thread sharing"},{name:"Minimum 2 seats"},{name:"Review feature (beta)"}],entitlements:{workspaceScope:!0,review:!0}}]}},yFe=Kkt.stripe.plans,qQn=Object.freeze(Object.fromEntries(yFe.map(e=>[e.tier,e])))});var SFe=B(()=>{"use strict";A();Lee();Lee();jG();Pee()});function Zkt(e){CFe=e}function $G(){return CFe}function dt(e,t){let n=qG({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,$G(),qk].filter(r=>!!r)});e.common.issues.push(n)}function Dn(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 uOt(e,t){return!!((t==="v4"||!t)&&iOt.test(e)||(t==="v6"||!t)&&sOt.test(e))}function cOt(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 nx(e){if(e instanceof yu){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=kf.create(nx(r))}return new yu({...e._def,shape:()=>t})}else return e instanceof rh?new rh({...e._def,type:nx(e.element)}):e instanceof kf?kf.create(nx(e.unwrap())):e instanceof oh?oh.create(nx(e.unwrap())):e instanceof uA?uA.create(e.items.map(t=>nx(t))):e}function zee(e,t){let n=UE(e),r=UE(t);if(e===t)return{valid:!0,data:e};if(n===ut.object&&r===ut.object){let o=br.objectKeys(t),i=br.objectKeys(e).filter(u=>o.indexOf(u)!==-1),s={...e,...t};for(let u of i){let l=zee(e[u],t[u]);if(!l.valid)return{valid:!1};s[u]=l.data}return{valid:!0,data:s}}else if(n===ut.array&&r===ut.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=zee(s,u);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===ut.date&&r===ut.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function RFe(e,t){return new yT({values:e,typeName:Xt.ZodEnum,...Dn(t)})}var br,Fee,ut,UE,Ke,Jkt,tl,qk,CFe,qG,Wkt,Eu,Sn,vFe,ac,Gee,jee,Vk,VG,Qt,_p,TFe,Nn,Xkt,eOt,tOt,nOt,rOt,oOt,iOt,sOt,aOt,QE,lT,dT,pT,fT,rx,mT,AT,FE,nh,Of,ox,rh,yu,gT,HG,YG,hT,uA,KG,ix,sx,JG,_T,ET,yT,ST,GE,ad,kf,oh,TT,ax,ux,lOt,ZG,Yk,cx,xFe,dOt,Xt,pOt,DFe,NFe,fOt,mOt,wFe,AOt,gOt,hOt,_Ot,EOt,yOt,SOt,TOt,bOt,IOt,COt,vOt,ROt,xOt,DOt,NOt,wOt,BOt,kOt,OOt,POt,MOt,LOt,UOt,bFe,QOt,FOt,GOt,jOt,zOt,HOt,$Ot,qOt,VOt,_u,YOt,Uee,KOt,hp,Hee,bFn,IFn,CFn,BFe,JOt,ZOt,WOt,XOt,kFe,OFe,PFe,Qee,Su,ePt,tPt,nPt,rPt,$ee,qee,Vee,oPt,IFe,iPt,sPt,aPt,uPt,Yee,cA=B(()=>{A();(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})(br||(br={}));(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Fee||(Fee={}));ut=br.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),UE=e=>{switch(typeof e){case"undefined":return ut.undefined;case"string":return ut.string;case"number":return isNaN(e)?ut.nan:ut.number;case"boolean":return ut.boolean;case"function":return ut.function;case"bigint":return ut.bigint;case"symbol":return ut.symbol;case"object":return Array.isArray(e)?ut.array:e===null?ut.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ut.promise:typeof Map<"u"&&e instanceof Map?ut.map:typeof Set<"u"&&e instanceof Set?ut.set:typeof Date<"u"&&e instanceof Date?ut.date:ut.object;default:return ut.unknown}},Ke=br.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"]),Jkt=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),tl=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,br.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()}};tl.create=e=>new tl(e);qk=(e,t)=>{let n;switch(e.code){case Ke.invalid_type:e.received===ut.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ke.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,br.jsonStringifyReplacer)}`;break;case Ke.unrecognized_keys:n=`Unrecognized key(s) in object: ${br.joinValues(e.keys,", ")}`;break;case Ke.invalid_union:n="Invalid input";break;case Ke.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${br.joinValues(e.options)}`;break;case Ke.invalid_enum_value:n=`Invalid enum value. Expected ${br.joinValues(e.options)}, received '${e.received}'`;break;case Ke.invalid_arguments:n="Invalid function arguments";break;case Ke.invalid_return_type:n="Invalid function return type";break;case Ke.invalid_date:n="Invalid date";break;case Ke.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}"`:br.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ke.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 Ke.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 Ke.custom:n="Invalid input";break;case Ke.invalid_intersection_types:n="Intersection results could not be merged";break;case Ke.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ke.not_finite:n="Number must be finite";break;default:n=t.defaultError,br.assertNever(e)}return{message:n}},CFe=qk;qG=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}},Wkt=[];Eu=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){let r=[];for(let o of n){if(o.status==="aborted")return Sn;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 Sn;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}}},Sn=Object.freeze({status:"aborted"}),vFe=e=>({status:"dirty",value:e}),ac=e=>({status:"valid",value:e}),Gee=e=>e.status==="aborted",jee=e=>e.status==="dirty",Vk=e=>e.status==="valid",VG=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={}));_p=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}},TFe=(e,t)=>{if(Vk(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 tl(e.common.issues);return this._error=n,this._error}}};Nn=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return UE(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:UE(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Eu,ctx:{common:t.parent.common,data:t.data,parsedType:UE(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(VG(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){let n=this._parse(t);return Promise.resolve(n)}parse(t,n){let r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;let o={common:{issues:[],async:(r=n?.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:UE(t)},i=this._parseSync({data:t,path:o.path,parent:o});return TFe(o,i)}async parseAsync(t,n){let r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){let r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:UE(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(VG(o)?o:Promise.resolve(o));return TFe(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:Ke.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 ad({schema:this,typeName:Xt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return kf.create(this,this._def)}nullable(){return oh.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return rh.create(this,this._def)}promise(){return GE.create(this,this._def)}or(t){return gT.create([this,t],this._def)}and(t){return hT.create(this,t,this._def)}transform(t){return new ad({...Dn(this._def),schema:this,typeName:Xt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new TT({...Dn(this._def),innerType:this,defaultValue:n,typeName:Xt.ZodDefault})}brand(){return new ZG({typeName:Xt.ZodBranded,type:this,...Dn(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new ax({...Dn(this._def),innerType:this,catchValue:n,typeName:Xt.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Yk.create(this,t)}readonly(){return cx.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Xkt=/^c[^\s-]{8,}$/i,eOt=/^[a-z][a-z0-9]*$/,tOt=/[0-9A-HJKMNP-TV-Z]{26}/,nOt=/^[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,rOt=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,oOt=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),iOt=/^(((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}))$/,sOt=/^(([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})))$/,aOt=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");QE=class e extends Nn{constructor(){super(...arguments),this._regex=(t,n,r)=>this.refinement(o=>t.test(o),{validation:n,code:Ke.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)!==ut.string){let i=this._getOrReturnCtx(t);return dt(i,{code:Ke.invalid_type,expected:ut.string,received:i.parsedType}),Sn}let r=new Eu,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),dt(o,{code:Ke.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),dt(o,{code:Ke.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?dt(o,{code:Ke.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):u&&dt(o,{code:Ke.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")rOt.test(t.data)||(o=this._getOrReturnCtx(t,o),dt(o,{validation:"email",code:Ke.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")oOt.test(t.data)||(o=this._getOrReturnCtx(t,o),dt(o,{validation:"emoji",code:Ke.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")nOt.test(t.data)||(o=this._getOrReturnCtx(t,o),dt(o,{validation:"uuid",code:Ke.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Xkt.test(t.data)||(o=this._getOrReturnCtx(t,o),dt(o,{validation:"cuid",code:Ke.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")eOt.test(t.data)||(o=this._getOrReturnCtx(t,o),dt(o,{validation:"cuid2",code:Ke.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")tOt.test(t.data)||(o=this._getOrReturnCtx(t,o),dt(o,{validation:"ulid",code:Ke.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),dt(o,{validation:"url",code:Ke.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),dt(o,{validation:"regex",code:Ke.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),dt(o,{code:Ke.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),dt(o,{code:Ke.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),dt(o,{code:Ke.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?aOt(i).test(t.data)||(o=this._getOrReturnCtx(t,o),dt(o,{code:Ke.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="ip"?uOt(t.data,i.version)||(o=this._getOrReturnCtx(t,o),dt(o,{validation:"ip",code:Ke.invalid_string,message:i.message}),r.dirty()):br.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}};QE.create=e=>{var t;return new QE({checks:[],typeName:Xt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...Dn(e)})};lT=class e extends Nn{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)!==ut.number){let i=this._getOrReturnCtx(t);return dt(i,{code:Ke.invalid_type,expected:ut.number,received:i.parsedType}),Sn}let r,o=new Eu;for(let i of this._def.checks)i.kind==="int"?br.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),dt(r,{code:Ke.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),dt(r,{code:Ke.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),dt(r,{code:Ke.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?cOt(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),dt(r,{code:Ke.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),dt(r,{code:Ke.not_finite,message:i.message}),o.dirty()):br.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"&&br.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)}};lT.create=e=>new lT({checks:[],typeName:Xt.ZodNumber,coerce:e?.coerce||!1,...Dn(e)});dT=class e extends Nn{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)!==ut.bigint){let i=this._getOrReturnCtx(t);return dt(i,{code:Ke.invalid_type,expected:ut.bigint,received:i.parsedType}),Sn}let r,o=new Eu;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),dt(r,{code:Ke.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),dt(r,{code:Ke.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),dt(r,{code:Ke.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):br.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}};dT.create=e=>{var t;return new dT({checks:[],typeName:Xt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...Dn(e)})};pT=class extends Nn{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ut.boolean){let r=this._getOrReturnCtx(t);return dt(r,{code:Ke.invalid_type,expected:ut.boolean,received:r.parsedType}),Sn}return ac(t.data)}};pT.create=e=>new pT({typeName:Xt.ZodBoolean,coerce:e?.coerce||!1,...Dn(e)});fT=class e extends Nn{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ut.date){let i=this._getOrReturnCtx(t);return dt(i,{code:Ke.invalid_type,expected:ut.date,received:i.parsedType}),Sn}if(isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return dt(i,{code:Ke.invalid_date}),Sn}let r=new Eu,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),dt(o,{code:Ke.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),dt(o,{code:Ke.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):br.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}};fT.create=e=>new fT({checks:[],coerce:e?.coerce||!1,typeName:Xt.ZodDate,...Dn(e)});rx=class extends Nn{_parse(t){if(this._getType(t)!==ut.symbol){let r=this._getOrReturnCtx(t);return dt(r,{code:Ke.invalid_type,expected:ut.symbol,received:r.parsedType}),Sn}return ac(t.data)}};rx.create=e=>new rx({typeName:Xt.ZodSymbol,...Dn(e)});mT=class extends Nn{_parse(t){if(this._getType(t)!==ut.undefined){let r=this._getOrReturnCtx(t);return dt(r,{code:Ke.invalid_type,expected:ut.undefined,received:r.parsedType}),Sn}return ac(t.data)}};mT.create=e=>new mT({typeName:Xt.ZodUndefined,...Dn(e)});AT=class extends Nn{_parse(t){if(this._getType(t)!==ut.null){let r=this._getOrReturnCtx(t);return dt(r,{code:Ke.invalid_type,expected:ut.null,received:r.parsedType}),Sn}return ac(t.data)}};AT.create=e=>new AT({typeName:Xt.ZodNull,...Dn(e)});FE=class extends Nn{constructor(){super(...arguments),this._any=!0}_parse(t){return ac(t.data)}};FE.create=e=>new FE({typeName:Xt.ZodAny,...Dn(e)});nh=class extends Nn{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ac(t.data)}};nh.create=e=>new nh({typeName:Xt.ZodUnknown,...Dn(e)});Of=class extends Nn{_parse(t){let n=this._getOrReturnCtx(t);return dt(n,{code:Ke.invalid_type,expected:ut.never,received:n.parsedType}),Sn}};Of.create=e=>new Of({typeName:Xt.ZodNever,...Dn(e)});ox=class extends Nn{_parse(t){if(this._getType(t)!==ut.undefined){let r=this._getOrReturnCtx(t);return dt(r,{code:Ke.invalid_type,expected:ut.void,received:r.parsedType}),Sn}return ac(t.data)}};ox.create=e=>new ox({typeName:Xt.ZodVoid,...Dn(e)});rh=class e extends Nn{_parse(t){let{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ut.array)return dt(n,{code:Ke.invalid_type,expected:ut.array,received:n.parsedType}),Sn;if(o.exactLength!==null){let s=n.data.length>o.exactLength.value,u=n.data.length<o.exactLength.value;(s||u)&&(dt(n,{code:s?Ke.too_big:Ke.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&&(dt(n,{code:Ke.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&&(dt(n,{code:Ke.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 _p(n,s,n.path,u)))).then(s=>Eu.mergeArray(r,s));let i=[...n.data].map((s,u)=>o.type._parseSync(new _p(n,s,n.path,u)));return Eu.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message: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)}};rh.create=(e,t)=>new rh({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Xt.ZodArray,...Dn(t)});yu=class e extends Nn{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=br.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ut.object){let f=this._getOrReturnCtx(t);return dt(f,{code:Ke.invalid_type,expected:ut.object,received:f.parsedType}),Sn}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 _p(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&&(dt(o,{code:Ke.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 _p(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=>Eu.mergeObjectSync(r,f)):Eu.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:Xt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};return br.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 br.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new e({...this._def,shape:()=>n})}deepPartial(){return nx(this)}partial(t){let n={};return br.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 br.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof kf;)i=i._def.innerType;n[r]=i}}),new e({...this._def,shape:()=>n})}keyof(){return RFe(br.objectKeys(this.shape))}};yu.create=(e,t)=>new yu({shape:()=>e,unknownKeys:"strip",catchall:Of.create(),typeName:Xt.ZodObject,...Dn(t)});yu.strictCreate=(e,t)=>new yu({shape:()=>e,unknownKeys:"strict",catchall:Of.create(),typeName:Xt.ZodObject,...Dn(t)});yu.lazycreate=(e,t)=>new yu({shape:e,unknownKeys:"strip",catchall:Of.create(),typeName:Xt.ZodObject,...Dn(t)});gT=class extends Nn{_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 tl(u.ctx.common.issues));return dt(n,{code:Ke.invalid_union,unionErrors:s}),Sn}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 tl(l));return dt(n,{code:Ke.invalid_union,unionErrors:u}),Sn}}get options(){return this._def.options}};gT.create=(e,t)=>new gT({options:e,typeName:Xt.ZodUnion,...Dn(t)});HG=e=>e instanceof _T?HG(e.schema):e instanceof ad?HG(e.innerType()):e instanceof ET?[e.value]:e instanceof yT?e.options:e instanceof ST?Object.keys(e.enum):e instanceof TT?HG(e._def.innerType):e instanceof mT?[void 0]:e instanceof AT?[null]:null,YG=class e extends Nn{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==ut.object)return dt(n,{code:Ke.invalid_type,expected:ut.object,received:n.parsedType}),Sn;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}):(dt(n,{code:Ke.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Sn)}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=HG(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:Xt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Dn(r)})}};hT=class extends Nn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(Gee(i)||Gee(s))return Sn;let u=zee(i.value,s.value);return u.valid?((jee(i)||jee(s))&&n.dirty(),{status:n.value,value:u.data}):(dt(r,{code:Ke.invalid_intersection_types}),Sn)};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}))}};hT.create=(e,t,n)=>new hT({left:e,right:t,typeName:Xt.ZodIntersection,...Dn(n)});uA=class e extends Nn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ut.array)return dt(r,{code:Ke.invalid_type,expected:ut.array,received:r.parsedType}),Sn;if(r.data.length<this._def.items.length)return dt(r,{code:Ke.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Sn;!this._def.rest&&r.data.length>this._def.items.length&&(dt(r,{code:Ke.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 _p(r,s,r.path,u)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>Eu.mergeArray(n,s)):Eu.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};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:Xt.ZodTuple,rest:null,...Dn(t)})};KG=class e extends Nn{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!==ut.object)return dt(r,{code:Ke.invalid_type,expected:ut.object,received:r.parsedType}),Sn;let o=[],i=this._def.keyType,s=this._def.valueType;for(let u in r.data)o.push({key:i._parse(new _p(r,u,r.path,u)),value:s._parse(new _p(r,r.data[u],r.path,u))});return r.common.async?Eu.mergeObjectAsync(n,o):Eu.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Nn?new e({keyType:t,valueType:n,typeName:Xt.ZodRecord,...Dn(r)}):new e({keyType:QE.create(),valueType:t,typeName:Xt.ZodRecord,...Dn(n)})}},ix=class extends Nn{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!==ut.map)return dt(r,{code:Ke.invalid_type,expected:ut.map,received:r.parsedType}),Sn;let o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([u,l],f)=>({key:o._parse(new _p(r,u,r.path,[f,"key"])),value:i._parse(new _p(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 Sn;(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 Sn;(f.status==="dirty"||h.status==="dirty")&&n.dirty(),u.set(f.value,h.value)}return{status:n.value,value:u}}}};ix.create=(e,t,n)=>new ix({valueType:t,keyType:e,typeName:Xt.ZodMap,...Dn(n)});sx=class e extends Nn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ut.set)return dt(r,{code:Ke.invalid_type,expected:ut.set,received:r.parsedType}),Sn;let o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(dt(r,{code:Ke.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&&(dt(r,{code:Ke.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 Sn;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 _p(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)}};sx.create=(e,t)=>new sx({valueType:e,minSize:null,maxSize:null,typeName:Xt.ZodSet,...Dn(t)});JG=class e extends Nn{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==ut.function)return dt(n,{code:Ke.invalid_type,expected:ut.function,received:n.parsedType}),Sn;function r(u,l){return qG({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,$G(),qk].filter(f=>!!f),issueData:{code:Ke.invalid_arguments,argumentsError:l}})}function o(u,l){return qG({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,$G(),qk].filter(f=>!!f),issueData:{code:Ke.invalid_return_type,returnTypeError:l}})}let i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof GE){let u=this;return ac(async function(...l){let f=new tl([]),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 tl([r(l,f.error)]);let h=Reflect.apply(s,this,f.data),_=u._def.returns.safeParse(h,i);if(!_.success)throw new tl([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(nh.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new e({args:t||uA.create([]).rest(nh.create()),returns:n||nh.create(),typeName:Xt.ZodFunction,...Dn(r)})}},_T=class extends Nn{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})}};_T.create=(e,t)=>new _T({getter:e,typeName:Xt.ZodLazy,...Dn(t)});ET=class extends Nn{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return dt(n,{received:n.data,code:Ke.invalid_literal,expected:this._def.value}),Sn}return{status:"valid",value:t.data}}get value(){return this._def.value}};ET.create=(e,t)=>new ET({value:e,typeName:Xt.ZodLiteral,...Dn(t)});yT=class e extends Nn{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),r=this._def.values;return dt(n,{expected:br.joinValues(r),received:n.parsedType,code:Ke.invalid_type}),Sn}if(this._def.values.indexOf(t.data)===-1){let n=this._getOrReturnCtx(t),r=this._def.values;return dt(n,{received:n.data,code:Ke.invalid_enum_value,options:r}),Sn}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)))}};yT.create=RFe;ST=class extends Nn{_parse(t){let n=br.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ut.string&&r.parsedType!==ut.number){let o=br.objectValues(n);return dt(r,{expected:br.joinValues(o),received:r.parsedType,code:Ke.invalid_type}),Sn}if(n.indexOf(t.data)===-1){let o=br.objectValues(n);return dt(r,{received:r.data,code:Ke.invalid_enum_value,options:o}),Sn}return ac(t.data)}get enum(){return this._def.values}};ST.create=(e,t)=>new ST({values:e,typeName:Xt.ZodNativeEnum,...Dn(t)});GE=class extends Nn{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==ut.promise&&n.common.async===!1)return dt(n,{code:Ke.invalid_type,expected:ut.promise,received:n.parsedType}),Sn;let r=n.parsedType===ut.promise?n.data:Promise.resolve(n.data);return ac(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}};GE.create=(e,t)=>new GE({type:e,typeName:Xt.ZodPromise,...Dn(t)});ad=class extends Nn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Xt.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=>{dt(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"?Sn:(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"?Sn:(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(!Vk(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=>Vk(s)?Promise.resolve(o.transform(s.value,i)).then(u=>({status:n.value,value:u})):s);br.assertNever(o)}};ad.create=(e,t,n)=>new ad({schema:e,typeName:Xt.ZodEffects,effect:t,...Dn(n)});ad.createWithPreprocess=(e,t,n)=>new ad({schema:t,effect:{type:"preprocess",transform:e},typeName:Xt.ZodEffects,...Dn(n)});kf=class extends Nn{_parse(t){return this._getType(t)===ut.undefined?ac(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};kf.create=(e,t)=>new kf({innerType:e,typeName:Xt.ZodOptional,...Dn(t)});oh=class extends Nn{_parse(t){return this._getType(t)===ut.null?ac(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};oh.create=(e,t)=>new oh({innerType:e,typeName:Xt.ZodNullable,...Dn(t)});TT=class extends Nn{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return n.parsedType===ut.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};TT.create=(e,t)=>new TT({innerType:e,typeName:Xt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Dn(t)});ax=class extends Nn{_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 VG(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new tl(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new tl(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};ax.create=(e,t)=>new ax({innerType:e,typeName:Xt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Dn(t)});ux=class extends Nn{_parse(t){if(this._getType(t)!==ut.nan){let r=this._getOrReturnCtx(t);return dt(r,{code:Ke.invalid_type,expected:ut.nan,received:r.parsedType}),Sn}return{status:"valid",value:t.data}}};ux.create=e=>new ux({typeName:Xt.ZodNaN,...Dn(e)});lOt=Symbol("zod_brand"),ZG=class extends Nn{_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}},Yk=class e extends Nn{_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"?Sn:i.status==="dirty"?(n.dirty(),vFe(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"?Sn: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:Xt.ZodPipeline})}},cx=class extends Nn{_parse(t){let n=this._def.innerType._parse(t);return Vk(n)&&(n.value=Object.freeze(n.value)),n}};cx.create=(e,t)=>new cx({innerType:e,typeName:Xt.ZodReadonly,...Dn(t)});xFe=(e,t={},n)=>e?FE.create().superRefine((r,o)=>{var i,s;if(!e(r)){let u=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(s=(i=u.fatal)!==null&&i!==void 0?i:n)!==null&&s!==void 0?s:!0,f=typeof u=="string"?{message:u}:u;o.addIssue({code:"custom",...f,fatal:l})}}):FE.create(),dOt={object:yu.lazycreate};(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Xt||(Xt={}));pOt=(e,t={message:`Input not instance of ${e.name}`})=>xFe(n=>n instanceof e,t),DFe=QE.create,NFe=lT.create,fOt=ux.create,mOt=dT.create,wFe=pT.create,AOt=fT.create,gOt=rx.create,hOt=mT.create,_Ot=AT.create,EOt=FE.create,yOt=nh.create,SOt=Of.create,TOt=ox.create,bOt=rh.create,IOt=yu.create,COt=yu.strictCreate,vOt=gT.create,ROt=YG.create,xOt=hT.create,DOt=uA.create,NOt=KG.create,wOt=ix.create,BOt=sx.create,kOt=JG.create,OOt=_T.create,POt=ET.create,MOt=yT.create,LOt=ST.create,UOt=GE.create,bFe=ad.create,QOt=kf.create,FOt=oh.create,GOt=ad.createWithPreprocess,jOt=Yk.create,zOt=()=>DFe().optional(),HOt=()=>NFe().optional(),$Ot=()=>wFe().optional(),qOt={string:(e=>QE.create({...e,coerce:!0})),number:(e=>lT.create({...e,coerce:!0})),boolean:(e=>pT.create({...e,coerce:!0})),bigint:(e=>dT.create({...e,coerce:!0})),date:(e=>fT.create({...e,coerce:!0}))},VOt=Sn,_u=Object.freeze({__proto__:null,defaultErrorMap:qk,setErrorMap:Zkt,getErrorMap:$G,makeIssue:qG,EMPTY_PATH:Wkt,addIssueToContext:dt,ParseStatus:Eu,INVALID:Sn,DIRTY:vFe,OK:ac,isAborted:Gee,isDirty:jee,isValid:Vk,isAsync:VG,get util(){return br},get objectUtil(){return Fee},ZodParsedType:ut,getParsedType:UE,ZodType:Nn,ZodString:QE,ZodNumber:lT,ZodBigInt:dT,ZodBoolean:pT,ZodDate:fT,ZodSymbol:rx,ZodUndefined:mT,ZodNull:AT,ZodAny:FE,ZodUnknown:nh,ZodNever:Of,ZodVoid:ox,ZodArray:rh,ZodObject:yu,ZodUnion:gT,ZodDiscriminatedUnion:YG,ZodIntersection:hT,ZodTuple:uA,ZodRecord:KG,ZodMap:ix,ZodSet:sx,ZodFunction:JG,ZodLazy:_T,ZodLiteral:ET,ZodEnum:yT,ZodNativeEnum:ST,ZodPromise:GE,ZodEffects:ad,ZodTransformer:ad,ZodOptional:kf,ZodNullable:oh,ZodDefault:TT,ZodCatch:ax,ZodNaN:ux,BRAND:lOt,ZodBranded:ZG,ZodPipeline:Yk,ZodReadonly:cx,custom:xFe,Schema:Nn,ZodSchema:Nn,late:dOt,get ZodFirstPartyTypeKind(){return Xt},coerce:qOt,any:EOt,array:bOt,bigint:mOt,boolean:wFe,date:AOt,discriminatedUnion:ROt,effect:bFe,enum:MOt,function:kOt,instanceof:pOt,intersection:xOt,lazy:OOt,literal:POt,map:wOt,nan:fOt,nativeEnum:LOt,never:SOt,null:_Ot,nullable:FOt,number:NFe,object:IOt,oboolean:$Ot,onumber:HOt,optional:QOt,ostring:zOt,pipeline:jOt,preprocess:GOt,promise:UOt,record:NOt,set:BOt,strictObject:COt,string:DFe,symbol:gOt,transformer:bFe,tuple:DOt,undefined:hOt,union:vOt,unknown:yOt,void:TOt,NEVER:VOt,ZodIssueCode:Ke,quotelessJson:Jkt,ZodError:tl}),YOt=e=>typeof e?.safeParse=="function",Uee=e=>typeof e?.passthrough=="function",KOt=(e,t)=>Uee(e)?Uee(t)?e.merge(t):e:Uee(t)?t:Object.assign({},e,t),hp=_u.object({name:_u.literal("ZodError"),issues:_u.array(_u.object({path:_u.array(_u.union([_u.string(),_u.number()])),message:_u.string().optional(),code:_u.nativeEnum(_u.ZodIssueCode)}).catchall(_u.any()))}),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}},bFn=_u.object({message:_u.literal("Request validation failed"),pathParameterErrors:hp.nullable(),headerErrors:hp.nullable(),queryParameterErrors:hp.nullable(),bodyErrors:hp.nullable()}),IFn=_u.object({pathParameterErrors:hp.nullable(),headerErrors:hp.nullable(),queryParameterErrors:hp.nullable(),bodyErrors:hp.nullable()}),CFn=_u.object({paramsResult:hp.nullable(),headersResult:hp.nullable(),queryResult:hp.nullable(),bodyResult:hp.nullable()}),BFe="zod-ts-rest-polyfill",JOt=e=>{if(!e)return!1;let t=e?.["~standard"];return t?t.version===1&&typeof t.validate=="function":!1},ZOt=e=>JOt(e)?e:YOt(e)?(Object.assign(e,{"~standard":{vendor:BFe,version:1,validate:r=>{let o=e.safeParse(r);return o.success?{value:o.data}:{issues:o.error.issues}}}}),e):null,WOt=(e,t)=>e?t?e instanceof yu&&t instanceof yu?KOt(e,t):{...e,...t}:e:t,XOt=(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===BFe?{error:new tl(r.issues)}:{error:new Hee(r.issues)}:n&&typeof e=="object"&&r.value?{value:{...e,...r.value}}:{value:r.value}},kFe=Symbol("ContractNoBody"),OFe=e=>"method"in e&&"path"in e,PFe=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>{var o,i,s;return OFe(r)?[n,{...r,path:t?.pathPrefix?t.pathPrefix+r.path:r.path,headers:WOt(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,PFe(r,t)]})),Qee=Symbol("ContractPlainType"),Su=()=>({router:(e,t)=>PFe(e,t),query:e=>e,mutation:e=>e,responses:e=>e,response:()=>Qee,body:()=>Qee,type:()=>Qee,otherResponse:({contentType:e,body:t})=>({contentType:e,body:t}),noBody:()=>kFe}),ePt=({path:e,params:t})=>{let n=t;return e.replace(/\/?:([^/?]+)\??/g,(r,o)=>n[o]?`${r.startsWith("/")?"/":""}${n[o]}`:"")},tPt=(e,t=!1)=>{let n=t?nPt(e):rPt(e);return n?.length>0?"?"+n:""},nPt=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("&"):"",rPt=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}`]],qee=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}},Vee=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===kFe?void 0:await u.json(),headers:u.headers},_=ZOt(f);if(_&&(i??e.validateResponseOnClient)){let E=XOt(h.body,_);if(E.error)throw E.error;return{...h,body:E.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}},oPt=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},IFe=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>[t.toLowerCase(),n])),iPt=e=>{let{path:t,clientArgs:n,route:r,body:o,query:i,extraInputArgs:s,headers:u,fetchOptions:l}=e,f=n.api||Vee,h=n.baseHeaders&&Object.fromEntries(Object.entries(n.baseHeaders).map(([T,v])=>typeof v=="function"?[T,v(e)]:[T,v])),_={...h&&IFe(h),...IFe(u)};Object.keys(_).forEach(T=>{_[T]===void 0&&delete _[T]});let E={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"?E={...E,contentType:"multipart/form-data",body:o instanceof FormData?o:oPt(o)}:"contentType"in r&&r.contentType==="application/x-www-form-urlencoded"?E={...E,contentType:"application/x-www-form-urlencoded",headers:{"content-type":"application/x-www-form-urlencoded",...E.headers},body:typeof o=="string"?o:new URLSearchParams(o)}:o!=null&&(E={...E,contentType:"application/json",headers:{"content-type":"application/json",...E.headers},body:JSON.stringify(o)})),f({...E,...s})},sPt=(e,t,n)=>{let{query:r,params:o,body:i,headers:s,extraHeaders:u,overrideClientOptions:l,fetchOptions:f,cache:h,next:_,...E}=n||{},T={...t,...l},v=typeof o=="object"?Object.fromEntries(Object.entries(o).map(([x,k])=>[x,String(k)])):{};return{path:aPt(r,T.baseUrl,v,e,!!T.jsonQuery),clientArgs:T,route:e,body:i,query:r,extraInputArgs:E,fetchOptions:{...h&&{cache:h},..._&&{next:_},...f},headers:{...u,...s}}},aPt=(e,t,n,r,o)=>{let i=ePt({path:r.path,params:n}),s=tPt(e,o);return t.endsWith("/")&&i.startsWith("/")?`${t}${i.substring(1)}${s}`:`${t}${i}${s}`},uPt=(e,t)=>{let n=Object.keys(e.responses);return async r=>{let o=sPt(e,t,r),i=await iPt(o);if(!t.throwOnUnknownStatus||n.includes(i.status.toString()))return i;throw new qee(i,n)}},Yee=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>OFe(r)?[n,uPt(r,t)]:[n,Yee(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 E=h[_];E in u||(u[E]=f[E].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 Ii(e){return e&&Object.assign(bT,e),bT}var MFe,Kee,Jee,Pf,jE,bT,IT=B(()=>{A();Kee=Object.freeze({status:"aborted"});Jee=Symbol("zod_brand"),Pf=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},jE=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(MFe=globalThis).__zod_globalConfig??(MFe.__zod_globalConfig={});bT=globalThis.__zod_globalConfig});var Le={};Ws(Le,{BIGINT_FORMAT_RANGES:()=>ste,Class:()=>Wee,NUMBER_FORMAT_RANGES:()=>ite,aborted:()=>qE,allowsEval:()=>tte,assert:()=>fPt,assertEqual:()=>cPt,assertIs:()=>dPt,assertNever:()=>pPt,assertNotEqual:()=>lPt,assignProp:()=>HE,base64ToUint8Array:()=>UFe,base64urlToUint8Array:()=>NPt,cached:()=>dx,captureStackTrace:()=>XG,cleanEnum:()=>DPt,cleanRegex:()=>Zk,clone:()=>uc,cloneDef:()=>APt,createTransparentProxy:()=>SPt,defineLazy:()=>Hn,esc:()=>WG,escapeRegex:()=>Ep,explicitlyAborted:()=>ate,extend:()=>IPt,finalizeIssue:()=>cc,floatSafeRemainder:()=>Xee,getElementAtPath:()=>gPt,getEnumValues:()=>Jk,getLengthableOrigin:()=>eO,getParsedType:()=>yPt,getSizableOrigin:()=>Xk,hexToUint8Array:()=>BPt,isObject:()=>CT,isPlainObject:()=>$E,issue:()=>px,joinValues:()=>de,jsonStringifyReplacer:()=>lx,merge:()=>vPt,mergeDefs:()=>ih,normalizeParams:()=>qe,nullish:()=>zE,numKeys:()=>EPt,objectClone:()=>mPt,omit:()=>bPt,optionalKeys:()=>ote,parsedType:()=>Oe,partial:()=>RPt,pick:()=>TPt,prefixIssues:()=>nl,primitiveTypes:()=>rte,promiseAllObject:()=>hPt,propertyKeyTypes:()=>Wk,randomString:()=>_Pt,required:()=>xPt,safeExtend:()=>CPt,shallowClone:()=>nte,slugify:()=>ete,stringifyPrimitive:()=>ke,uint8ArrayToBase64:()=>QFe,uint8ArrayToBase64url:()=>wPt,uint8ArrayToHex:()=>kPt,unwrapMessage:()=>Kk});function cPt(e){return e}function lPt(e){return e}function dPt(e){}function pPt(e){throw new Error("Unexpected value in exhaustive check")}function fPt(e){}function Jk(e){let t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function de(e,t="|"){return e.map(n=>ke(n)).join(t)}function lx(e,t){return typeof t=="bigint"?t.toString():t}function dx(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function zE(e){return e==null}function Zk(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Xee(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!==LFe)return r===void 0&&(r=LFe,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function mPt(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function HE(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ih(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function APt(e){return ih(e._zod.def)}function gPt(e,t){return t?t.reduce((n,r)=>n?.[r],e):e}function hPt(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 _Pt(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function WG(e){return JSON.stringify(e)}function ete(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function CT(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function $E(e){if(CT(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(CT(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function nte(e){return $E(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function EPt(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function Ep(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 SPt(e){let t;return new Proxy({},{get(n,r,o){return t??(t=e()),Reflect.get(t,r,o)},set(n,r,o,i){return t??(t=e()),Reflect.set(t,r,o,i)},has(n,r){return t??(t=e()),Reflect.has(t,r)},deleteProperty(n,r){return t??(t=e()),Reflect.deleteProperty(t,r)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,o){return t??(t=e()),Reflect.defineProperty(t,r,o)}})}function ke(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function ote(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function TPt(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=ih(e._zod.def,{get shape(){let s={};for(let u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(s[u]=n.shape[u])}return HE(this,"shape",s),s},checks:[]});return uc(e,i)}function bPt(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=ih(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete s[u]}return HE(this,"shape",s),s},checks:[]});return uc(e,i)}function IPt(e,t){if(!$E(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let o=ih(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return HE(this,"shape",i),i}});return uc(e,o)}function CPt(e,t){if(!$E(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=ih(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return HE(this,"shape",r),r}});return uc(e,n)}function vPt(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=ih(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return HE(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return uc(e,n)}function RPt(e,t,n){let o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=ih(t._zod.def,{get shape(){let u=t._zod.def.shape,l={...u};if(n)for(let 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 HE(this,"shape",l),l},checks:[]});return uc(t,s)}function xPt(e,t,n){let r=ih(t._zod.def,{get shape(){let o=t._zod.def.shape,i={...o};if(n)for(let s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=new e({type:"nonoptional",innerType:o[s]}))}else for(let s in o)i[s]=new e({type:"nonoptional",innerType:o[s]});return HE(this,"shape",i),i}});return uc(t,r)}function qE(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ate(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 nl(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Kk(e){return typeof e=="string"?e:e?.message}function cc(e,t,n){let r=e.message?e.message:Kk(e.inst?._zod.def?.error?.(e))??Kk(t?.error?.(e))??Kk(n.customError?.(e))??Kk(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 Xk(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function eO(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Oe(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 px(...e){let[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function DPt(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function UFe(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 QFe(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function NPt(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return UFe(t+n)}function wPt(e){return QFe(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function BPt(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 kPt(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var LFe,XG,tte,yPt,Wk,rte,ite,ste,Wee,St=B(()=>{A();IT();LFe=Symbol("evaluating");XG="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};tte=dx(()=>{if(bT.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});yPt=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}`)}},Wk=new Set(["string","number","symbol"]),rte=new Set(["string","number","bigint","boolean","symbol","undefined"]);ite={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]},ste={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};Wee=class{constructor(...t){}}});function nO(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 rO(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 ute(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 E=f[_],T=_===f.length-1;typeof E=="string"?(h.properties??(h.properties={}),(s=h.properties)[E]??(s[E]={errors:[]}),h=h.properties[E]):(h.items??(h.items=[]),(u=h.items)[E]??(u[E]={errors:[]}),h=h.items[E]),T&&h.errors.push(t(l)),_++}}};return r(e),n}function GFe(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 cte(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 ${GFe(r.path)}`);return t.join(`
|
|
41
41
|
`)}var FFe,tO,rl,lte=B(()=>{A();IT();St();FFe=(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,lx,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},tO=ie("$ZodError",FFe),rl=ie("$ZodError",FFe,{Parent:Error})});var fx,ej,mx,tj,Ax,dte,gx,pte,nj,PPt,rj,MPt,oj,LPt,ij,UPt,sj,QPt,aj,FPt,uj,GPt,cj,jPt,fte=B(()=>{A();IT();lte();St();fx=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 Pf;if(s.issues.length){let u=new(o?.Err??e)(s.issues.map(l=>cc(l,i,Ii())));throw XG(u,o?.callee),u}return s.value},ej=fx(rl),mx=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,Ii())));throw XG(u,o?.callee),u}return s.value},tj=mx(rl),Ax=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 Pf;return i.issues.length?{success:!1,error:new(e??tO)(i.issues.map(s=>cc(s,o,Ii())))}:{success:!0,data:i.value}},dte=Ax(rl),gx=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,Ii())))}:{success:!0,data:i.value}},pte=gx(rl),nj=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return fx(e)(t,n,o)},PPt=nj(rl),rj=e=>(t,n,r)=>fx(e)(t,n,r),MPt=rj(rl),oj=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return mx(e)(t,n,o)},LPt=oj(rl),ij=e=>async(t,n,r)=>mx(e)(t,n,r),UPt=ij(rl),sj=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return Ax(e)(t,n,o)},QPt=sj(rl),aj=e=>(t,n,r)=>Ax(e)(t,n,r),FPt=aj(rl),uj=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return gx(e)(t,n,o)},GPt=uj(rl),cj=e=>async(t,n,r)=>gx(e)(t,n,r),jPt=cj(rl)});var ud={};Ws(ud,{base64:()=>Dte,base64url:()=>lj,bigint:()=>Mte,boolean:()=>Ute,browserEmail:()=>JPt,cidrv4:()=>Rte,cidrv6:()=>xte,cuid:()=>mte,cuid2:()=>Ate,date:()=>Bte,datetime:()=>Ote,domain:()=>XPt,duration:()=>yte,e164:()=>wte,email:()=>Tte,emoji:()=>bte,extendedDuration:()=>zPt,guid:()=>Ste,hex:()=>eMt,hostname:()=>WPt,html5Email:()=>VPt,httpProtocol:()=>Nte,idnEmail:()=>KPt,integer:()=>Lte,ipv4:()=>Ite,ipv6:()=>Cte,ksuid:()=>_te,lowercase:()=>Gte,mac:()=>vte,md5_base64:()=>nMt,md5_base64url:()=>rMt,md5_hex:()=>tMt,nanoid:()=>Ete,null:()=>Qte,number:()=>dj,rfc5322Email:()=>YPt,sha1_base64:()=>iMt,sha1_base64url:()=>sMt,sha1_hex:()=>oMt,sha256_base64:()=>uMt,sha256_base64url:()=>cMt,sha256_hex:()=>aMt,sha384_base64:()=>dMt,sha384_base64url:()=>pMt,sha384_hex:()=>lMt,sha512_base64:()=>mMt,sha512_base64url:()=>AMt,sha512_hex:()=>fMt,string:()=>Pte,time:()=>kte,ulid:()=>gte,undefined:()=>Fte,unicodeEmail:()=>jFe,uppercase:()=>jte,uuid:()=>vT,uuid4:()=>HPt,uuid6:()=>$Pt,uuid7:()=>qPt,xid:()=>hte});function bte(){return new RegExp(ZPt,"u")}function HFe(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 kte(e){return new RegExp(`^${HFe(e)}$`)}function Ote(e){let t=HFe({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(`^${zFe}T(?:${r})$`)}function oO(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function iO(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var mte,Ate,gte,hte,_te,Ete,yte,zPt,Ste,vT,HPt,$Pt,qPt,Tte,VPt,YPt,jFe,KPt,JPt,ZPt,Ite,Cte,vte,Rte,xte,Dte,lj,WPt,XPt,Nte,wte,zFe,Bte,Pte,Mte,Lte,dj,Ute,Qte,Fte,Gte,jte,eMt,tMt,nMt,rMt,oMt,iMt,sMt,aMt,uMt,cMt,lMt,dMt,pMt,fMt,mMt,AMt,pj=B(()=>{A();St();mte=/^[cC][0-9a-z]{6,}$/,Ate=/^[0-9a-z]+$/,gte=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,hte=/^[0-9a-vA-V]{20}$/,_te=/^[A-Za-z0-9]{27}$/,Ete=/^[a-zA-Z0-9_-]{21}$/,yte=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,zPt=/^[-+]?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)?)??$/,Ste=/^([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})$/,vT=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)$/,HPt=vT(4),$Pt=vT(6),qPt=vT(7),Tte=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,VPt=/^[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])?)*$/,YPt=/^(([^<>()\[\]\\.,;:\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,}))$/,jFe=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,KPt=jFe,JPt=/^[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])?)*$/,ZPt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";Ite=/^(?:(?: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])$/,Cte=/^(([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}|:))$/,vte=e=>{let t=Ep(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Rte=/^((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])$/,xte=/^(([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])$/,Dte=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,lj=/^[A-Za-z0-9_-]*$/,WPt=/^(?=.{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])?)*\.?$/,XPt=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Nte=/^https?$/,wte=/^\+[1-9]\d{6,14}$/,zFe="(?:(?:\\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])))",Bte=new RegExp(`^${zFe}$`);Pte=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Mte=/^-?\d+n?$/,Lte=/^-?\d+$/,dj=/^-?\d+(?:\.\d+)?$/,Ute=/^(?:true|false)$/i,Qte=/^null$/i,Fte=/^undefined$/i,Gte=/^[^A-Z]*$/,jte=/^[^a-z]*$/,eMt=/^[0-9a-fA-F]*$/;tMt=/^[0-9a-fA-F]{32}$/,nMt=oO(22,"=="),rMt=iO(22),oMt=/^[0-9a-fA-F]{40}$/,iMt=oO(27,"="),sMt=iO(27),aMt=/^[0-9a-fA-F]{64}$/,uMt=oO(43,"="),cMt=iO(43),lMt=/^[0-9a-fA-F]{96}$/,dMt=oO(64,""),pMt=iO(64),fMt=/^[0-9a-fA-F]{128}$/,mMt=oO(86,"=="),AMt=iO(86)});function $Fe(e,t,n){e.issues.length&&t.issues.push(...nl(n,e.issues))}var ro,qFe,fj,mj,zte,Hte,$te,qte,Vte,Yte,Kte,Jte,Zte,hx,Wte,Xte,ene,tne,nne,rne,one,ine,sne,Aj=B(()=>{A();IT();pj();St();ro=ie("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),qFe={number:"number",bigint:"bigint",object:"date"},fj=ie("$ZodCheckLessThan",(e,t)=>{ro.init(e,t);let n=qFe[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})}}),mj=ie("$ZodCheckGreaterThan",(e,t)=>{ro.init(e,t);let n=qFe[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})}}),zte=ie("$ZodCheckMultipleOf",(e,t)=>{ro.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):Xee(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)=>{ro.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[o,i]=ite[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)=>{ro.init(e,t);let[n,r]=ste[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})}}),qte=ie("$ZodCheckMaxSize",(e,t)=>{var n;ro.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!zE(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let o=r.value;o.size<=t.maximum||r.issues.push({origin:Xk(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Vte=ie("$ZodCheckMinSize",(e,t)=>{var n;ro.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!zE(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let o=r.value;o.size>=t.minimum||r.issues.push({origin:Xk(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Yte=ie("$ZodCheckSizeEquals",(e,t)=>{var n;ro.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!zE(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag;o.minimum=t.size,o.maximum=t.size,o.size=t.size}),e._zod.check=r=>{let o=r.value,i=o.size;if(i===t.size)return;let s=i>t.size;r.issues.push({origin:Xk(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})}}),Kte=ie("$ZodCheckMaxLength",(e,t)=>{var n;ro.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!zE(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let o=r.value;if(o.length<=t.maximum)return;let s=eO(o);r.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Jte=ie("$ZodCheckMinLength",(e,t)=>{var n;ro.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!zE(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let o=r.value;if(o.length>=t.minimum)return;let s=eO(o);r.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Zte=ie("$ZodCheckLengthEquals",(e,t)=>{var n;ro.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!zE(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{let o=r.value,i=o.length;if(i===t.length)return;let s=eO(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})}}),hx=ie("$ZodCheckStringFormat",(e,t)=>{var n,r;ro.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=()=>{})}),Wte=ie("$ZodCheckRegex",(e,t)=>{hx.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})}}),Xte=ie("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Gte),hx.init(e,t)}),ene=ie("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=jte),hx.init(e,t)}),tne=ie("$ZodCheckIncludes",(e,t)=>{ro.init(e,t);let n=Ep(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})}}),nne=ie("$ZodCheckStartsWith",(e,t)=>{ro.init(e,t);let n=new RegExp(`^${Ep(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})}}),rne=ie("$ZodCheckEndsWith",(e,t)=>{ro.init(e,t);let n=new RegExp(`.*${Ep(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})}});one=ie("$ZodCheckProperty",(e,t)=>{ro.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=>$Fe(o,n,t.property));$Fe(r,n,t.property)}}),ine=ie("$ZodCheckMimeType",(e,t)=>{ro.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})}}),sne=ie("$ZodCheckOverwrite",(e,t)=>{ro.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}})});var sO,ane=B(()=>{A();sO=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 sX(e,t,n,r=void 0){n&&(0,Ak.safe
|
|
|
101
101
|
|
|
102
102
|
`)}T.write("payload.value = newResult;"),T.write("return payload;");let P=T.compile();return(j,G)=>P(E,j,G)},i,s=CT,u=!bT.jitless,f=u&&tte.value,h=t.catchall,_;e._zod.parse=(E,T)=>{_??(_=r.value);let v=E.value;return s(v)?u&&f&&T?.async===!1&&T.jitless!==!0?(i||(i=o(t.shape)),E=i(E,T),h?d4e([],v,E,T,_,e):E):n(E,T):(E.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),E)}});uO=ie("$ZodUnion",(e,t)=>{ln.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=>Zk(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=>KFe(u,r,e,o)):KFe(s,r,e,o)}});Kne=ie("$ZodXor",(e,t)=>{uO.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=>JFe(u,r,e,o)):JFe(s,r,e,o)}}),Jne=ie("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,uO.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=dx(()=>{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(!CT(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)}}),Zne=ie("$ZodIntersection",(e,t)=>{ln.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])=>ZFe(n,l,f)):ZFe(n,i,s)}});Tj=ie("$ZodTuple",(e,t)=>{ln.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=WFe(n,"optin"),l=WFe(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(E=>{f[h]=E})):f[h]=_}if(t.rest){let h=n.length-1,_=i.slice(n.length);for(let E of _){h++;let T=t.rest._zod.run({value:E,issues:[]},o);T instanceof Promise?s.push(T.then(v=>XFe(v,r,h))):XFe(T,r,h)}}return s.length?Promise.all(s).then(()=>e4e(f,r,n,i,l)):e4e(f,r,n,i,l)}});Wne=ie("$ZodRecord",(e,t)=>{ln.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;if(!$E(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,Ii())),input:f,path:[f],inst:e});continue}let _=h.value,E=t.valueType._zod.run({value:o[f],issues:[]},r);E instanceof Promise?i.push(E.then(T=>{T.issues.length&&n.issues.push(...nl(f,T.issues)),n.value[_]=T.value})):(E.issues.length&&n.issues.push(...nl(f,E.issues)),n.value[_]=E.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"&&dj.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,Ii())),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(...nl(u,_.issues)),n.value[l.value]=_.value})):(h.issues.length&&n.issues.push(...nl(u,h.issues)),n.value[l.value]=h.value)}}return i.length?Promise.all(i).then(()=>n):n}}),Xne=ie("$ZodMap",(e,t)=>{ln.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,_])=>{t4e(h,_,n,s,o,e,r)})):t4e(l,f,n,s,o,e,r)}return i.length?Promise.all(i).then(()=>n):n}});ere=ie("$ZodSet",(e,t)=>{ln.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=>n4e(l,n))):n4e(u,n)}return i.length?Promise.all(i).then(()=>n):n}});tre=ie("$ZodEnum",(e,t)=>{ln.init(e,t);let n=Jk(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>Wk.has(typeof o)).map(o=>typeof o=="string"?Ep(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}}),nre=ie("$ZodLiteral",(e,t)=>{if(ln.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"?Ep(r):r?Ep(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}}),rre=ie("$ZodFile",(e,t)=>{ln.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}}),ore=ie("$ZodTransform",(e,t)=>{ln.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new jE(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 Pf;return n.value=o,n.fallback=!0,n}});bj=ie("$ZodOptional",(e,t)=>{ln.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(`^(${Zk(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=>r4e(s,o)):r4e(i,o)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),ire=ie("$ZodExactOptional",(e,t)=>{bj.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)}),sre=ie("$ZodNullable",(e,t)=>{ln.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(`^(${Zk(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)}),are=ie("$ZodDefault",(e,t)=>{ln.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=>o4e(i,t)):o4e(o,t)}});ure=ie("$ZodPrefault",(e,t)=>{ln.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))}),cre=ie("$ZodNonOptional",(e,t)=>{ln.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=>i4e(i,e)):i4e(o,e)}});lre=ie("$ZodSuccess",(e,t)=>{ln.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new jE("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)}}),dre=ie("$ZodCatch",(e,t)=>{ln.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,Ii()))},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,Ii()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),pre=ie("$ZodNaN",(e,t)=>{ln.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)}),Ij=ie("$ZodPipe",(e,t)=>{ln.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=>gj(s,t.in,r)):gj(i,t.in,r)}let o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>gj(i,t.out,r)):gj(o,t.out,r)}});cO=ie("$ZodCodec",(e,t)=>{ln.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=>hj(s,t,r)):hj(i,t,r)}else{let i=t.out._zod.run(n,r);return i instanceof Promise?i.then(s=>hj(s,t,r)):hj(i,t,r)}}});fre=ie("$ZodPreprocess",(e,t)=>{Ij.init(e,t)}),mre=ie("$ZodReadonly",(e,t)=>{ln.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(s4e):s4e(o)}});Are=ie("$ZodTemplateLiteral",(e,t)=>{ln.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||rte.has(typeof r))n.push(Ep(`${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)}),gre=ie("$ZodFunction",(e,t)=>(ln.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?ej(e._def.input,r):r,i=Reflect.apply(n,this,o);return e._def.output?ej(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 tj(e._def.input,r):r,i=await Reflect.apply(n,this,o);return e._def.output?await tj(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 Tj({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)),hre=ie("$ZodPromise",(e,t)=>{ln.init(e,t),e._zod.parse=(n,r)=>Promise.resolve(n.value).then(o=>t.innerType._zod.run({value:o,issues:[]},r))}),_re=ie("$ZodLazy",(e,t)=>{ln.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)}),Ere=ie("$ZodCustom",(e,t)=>{ro.init(e,t),ln.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=>a4e(i,n,r,e));a4e(o,n,r,e)}})});function f4e(){return{localeError:hMt()}}var hMt,m4e=B(()=>{A();St();hMt=()=>{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=Oe(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 ${ke(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 A4e(){return{localeError:_Mt()}}var _Mt,g4e=B(()=>{A();St();_Mt=()=>{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=Oe(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 ${ke(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 h4e(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 _4e(){return{localeError:EMt()}}var EMt,E4e=B(()=>{A();St();EMt=()=>{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=Oe(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 ${ke(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=h4e(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=h4e(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 y4e(){return{localeError:yMt()}}var yMt,S4e=B(()=>{A();St();yMt=()=>{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=Oe(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 ${ke(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 T4e(){return{localeError:SMt()}}var SMt,b4e=B(()=>{A();St();SMt=()=>{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=Oe(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 ${ke(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 I4e(){return{localeError:TMt()}}var TMt,C4e=B(()=>{A();St();TMt=()=>{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=Oe(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 ${ke(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 v4e(){return{localeError:bMt()}}var bMt,R4e=B(()=>{A();St();bMt=()=>{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=Oe(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 ${ke(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 x4e(){return{localeError:IMt()}}var IMt,D4e=B(()=>{A();St();IMt=()=>{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=Oe(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 ${ke(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 N4e(){return{localeError:CMt()}}var CMt,w4e=B(()=>{A();St();CMt=()=>{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=Oe(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 ${ke(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 Cj(){return{localeError:vMt()}}var vMt,Sre=B(()=>{A();St();vMt=()=>{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=Oe(o.input),u=r[s]??s;return`Invalid input: expected ${i}, received ${u}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${ke(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 B4e(){return{localeError:RMt()}}var RMt,k4e=B(()=>{A();St();RMt=()=>{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=Oe(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 ${ke(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 O4e(){return{localeError:xMt()}}var xMt,P4e=B(()=>{A();St();xMt=()=>{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=Oe(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 ${ke(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 M4e(){return{localeError:DMt()}}var DMt,L4e=B(()=>{A();St();DMt=()=>{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=Oe(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 ${ke(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 U4e(){return{localeError:NMt()}}var NMt,Q4e=B(()=>{A();St();NMt=()=>{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=Oe(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 ${ke(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 F4e(){return{localeError:wMt()}}var wMt,G4e=B(()=>{A();St();wMt=()=>{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=Oe(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 : ${ke(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 j4e(){return{localeError:BMt()}}var BMt,z4e=B(()=>{A();St();BMt=()=>{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=Oe(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 ${ke(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 H4e(){return{localeError:kMt()}}var kMt,$4e=B(()=>{A();St();kMt=()=>{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),E=Oe(f.input),T=l[E]??e[E]?.label??E;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 ${ke(f.values[0])}`;let h=f.values.map(T=>ke(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 E=f.inclusive?"<=":"<",T=i(f.origin??"value");return h?.unit?`${h.longLabel} \u05DE\u05D3\u05D9: ${_} ${T} ${E}${f.maximum.toString()} ${h.unit}`:`${h?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${_} ${T} ${E}${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 E=f.inclusive?">=":">",T=i(f.origin??"value");return h?.unit?`${h.shortLabel} \u05DE\u05D3\u05D9: ${_} ${T} ${E}${f.minimum.toString()} ${h.unit}`:`${h?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${_} ${T} ${E}${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],E=_?.label??h.format,v=(_?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${E} \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 q4e(){return{localeError:OMt()}}var OMt,V4e=B(()=>{A();St();OMt=()=>{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=Oe(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 ${ke(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 Y4e(){return{localeError:PMt()}}var PMt,K4e=B(()=>{A();St();PMt=()=>{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=Oe(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 ${ke(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 J4e(e,t,n){return Math.abs(e)===1?t:n}function _x(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 Z4e(){return{localeError:MMt()}}var MMt,W4e=B(()=>{A();St();MMt=()=>{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=Oe(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 ${ke(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=J4e(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 ${_x(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 ${_x(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=J4e(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 ${_x(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 ${_x(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 ${_x(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 ${_x(o.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}}});function X4e(){return{localeError:LMt()}}var LMt,e3e=B(()=>{A();St();LMt=()=>{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=Oe(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 ${ke(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 t3e(){return{localeError:UMt()}}var UMt,n3e=B(()=>{A();St();UMt=()=>{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=Oe(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 ${ke(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 r3e(){return{localeError:QMt()}}var QMt,o3e=B(()=>{A();St();QMt=()=>{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=Oe(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 ${ke(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 i3e(){return{localeError:FMt()}}var FMt,s3e=B(()=>{A();St();FMt=()=>{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=Oe(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: ${ke(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 a3e(){return{localeError:GMt()}}var GMt,u3e=B(()=>{A();St();GMt=()=>{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=Oe(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 ${ke(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 vj(){return{localeError:jMt()}}var jMt,Tre=B(()=>{A();St();jMt=()=>{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=Oe(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 ${ke(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 c3e(){return vj()}var l3e=B(()=>{A();Tre()});function d3e(){return{localeError:zMt()}}var zMt,p3e=B(()=>{A();St();zMt=()=>{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=Oe(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 ${ke(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 f3e(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 m3e(){return{localeError:HMt()}}var lO,HMt,A3e=B(()=>{A();St();lO=e=>e.charAt(0).toUpperCase()+e.slice(1);HMt=()=>{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=Oe(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 ${ke(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,f3e(Number(o.maximum)),o.inclusive??!1,"smaller");if(s?.verb)return`${lO(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`${lO(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,f3e(Number(o.minimum)),o.inclusive??!1,"bigger");if(s?.verb)return`${lO(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`${lO(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`${lO(i??o.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}}});function g3e(){return{localeError:$Mt()}}var $Mt,h3e=B(()=>{A();St();$Mt=()=>{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=Oe(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 ${ke(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 _3e(){return{localeError:qMt()}}var qMt,E3e=B(()=>{A();St();qMt=()=>{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=Oe(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 ${ke(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 y3e(){return{localeError:VMt()}}var VMt,S3e=B(()=>{A();St();VMt=()=>{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=Oe(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 ${ke(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 T3e(){return{localeError:YMt()}}var YMt,b3e=B(()=>{A();St();YMt=()=>{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=Oe(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 ${ke(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 I3e(){return{localeError:KMt()}}var KMt,C3e=B(()=>{A();St();KMt=()=>{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=Oe(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 ${ke(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 v3e(){return{localeError:JMt()}}var JMt,R3e=B(()=>{A();St();JMt=()=>{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=Oe(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 ${ke(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 x3e(){return{localeError:ZMt()}}var ZMt,D3e=B(()=>{A();St();ZMt=()=>{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=Oe(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 ${ke(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 N3e(){return{localeError:WMt()}}var WMt,w3e=B(()=>{A();St();WMt=()=>{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=Oe(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 ${ke(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 B3e(){return{localeError:XMt()}}var XMt,k3e=B(()=>{A();St();XMt=()=>{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=Oe(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 ${ke(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 O3e(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 P3e(){return{localeError:e2t()}}var e2t,M3e=B(()=>{A();St();e2t=()=>{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=Oe(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 ${ke(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=O3e(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=O3e(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 L3e(){return{localeError:t2t()}}var t2t,U3e=B(()=>{A();St();t2t=()=>{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=Oe(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 ${ke(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 Q3e(){return{localeError:n2t()}}var n2t,F3e=B(()=>{A();St();n2t=()=>{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=Oe(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 ${ke(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 G3e(){return{localeError:r2t()}}var r2t,j3e=B(()=>{A();St();r2t=()=>{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=Oe(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 ${ke(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 z3e(){return{localeError:o2t()}}var o2t,H3e=B(()=>{A();St();o2t=()=>{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=Oe(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 ${ke(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 $3e(){return{localeError:i2t()}}var i2t,q3e=B(()=>{A();St();i2t=()=>{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=Oe(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 ${ke(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 Rj(){return{localeError:s2t()}}var s2t,bre=B(()=>{A();St();s2t=()=>{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=Oe(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 ${ke(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 V3e(){return Rj()}var Y3e=B(()=>{A();bre()});function K3e(){return{localeError:a2t()}}var a2t,J3e=B(()=>{A();St();a2t=()=>{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=Oe(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: ${ke(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 Z3e(){return{localeError:u2t()}}var u2t,W3e=B(()=>{A();St();u2t=()=>{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=Oe(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 ${ke(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 X3e(){return{localeError:c2t()}}var c2t,e6e=B(()=>{A();St();c2t=()=>{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=Oe(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 ${ke(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 t6e(){return{localeError:l2t()}}var l2t,n6e=B(()=>{A();St();l2t=()=>{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=Oe(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 ${ke(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 r6e(){return{localeError:d2t()}}var d2t,o6e=B(()=>{A();St();d2t=()=>{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=Oe(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 ${ke(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 i6e(){return{localeError:p2t()}}var p2t,s6e=B(()=>{A();St();p2t=()=>{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=Oe(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 ${ke(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 dO={};Ws(dO,{ar:()=>f4e,az:()=>A4e,be:()=>_4e,bg:()=>y4e,ca:()=>T4e,cs:()=>I4e,da:()=>v4e,de:()=>x4e,el:()=>N4e,en:()=>Cj,eo:()=>B4e,es:()=>O4e,fa:()=>M4e,fi:()=>U4e,fr:()=>F4e,frCA:()=>j4e,he:()=>H4e,hr:()=>q4e,hu:()=>Y4e,hy:()=>Z4e,id:()=>X4e,is:()=>t3e,it:()=>r3e,ja:()=>i3e,ka:()=>a3e,kh:()=>c3e,km:()=>vj,ko:()=>d3e,lt:()=>m3e,mk:()=>g3e,ms:()=>_3e,nl:()=>y3e,no:()=>T3e,ota:()=>I3e,pl:()=>x3e,ps:()=>v3e,pt:()=>N3e,ro:()=>B3e,ru:()=>P3e,sl:()=>L3e,sv:()=>Q3e,ta:()=>G3e,th:()=>z3e,tr:()=>$3e,ua:()=>V3e,uk:()=>Rj,ur:()=>K3e,uz:()=>Z3e,vi:()=>X3e,yo:()=>i6e,zhCN:()=>t6e,zhTW:()=>r6e});var Ire=B(()=>{A();m4e();g4e();E4e();S4e();b4e();C4e();R4e();D4e();w4e();Sre();k4e();P4e();L4e();Q4e();G4e();z4e();$4e();V4e();K4e();W4e();e3e();n3e();o3e();s3e();u3e();l3e();Tre();p3e();A3e();h3e();E3e();S3e();b3e();C3e();R3e();D3e();w3e();k3e();M3e();U3e();F3e();j3e();H3e();q3e();Y3e();bre();J3e();W3e();e6e();n6e();o6e();s6e()});function Dj(){return new xj}var a6e,Cre,vre,xj,Ga,pO=B(()=>{A();Cre=Symbol("ZodOutput"),vre=Symbol("ZodInput"),xj=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)}};(a6e=globalThis).__zod_globalRegistry??(a6e.__zod_globalRegistry=Dj());Ga=globalThis.__zod_globalRegistry});function Rre(e,t){return new e({type:"string",...qe(t)})}function xre(e,t){return new e({type:"string",coerce:!0,...qe(t)})}function Nj(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...qe(t)})}function fO(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...qe(t)})}function wj(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...qe(t)})}function Bj(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...qe(t)})}function kj(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...qe(t)})}function Oj(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...qe(t)})}function mO(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...qe(t)})}function Pj(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...qe(t)})}function Mj(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...qe(t)})}function Lj(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...qe(t)})}function Uj(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...qe(t)})}function Qj(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...qe(t)})}function Fj(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...qe(t)})}function Gj(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...qe(t)})}function jj(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...qe(t)})}function zj(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...qe(t)})}function Dre(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...qe(t)})}function Hj(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...qe(t)})}function $j(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...qe(t)})}function qj(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...qe(t)})}function Vj(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...qe(t)})}function Yj(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...qe(t)})}function Kj(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...qe(t)})}function wre(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...qe(t)})}function Bre(e,t){return new e({type:"string",format:"date",check:"string_format",...qe(t)})}function kre(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...qe(t)})}function Ore(e,t){return new e({type:"string",format:"duration",check:"string_format",...qe(t)})}function Pre(e,t){return new e({type:"number",checks:[],...qe(t)})}function Mre(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 Ure(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...qe(t)})}function Qre(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 Gre(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...qe(t)})}function jre(e,t){return new e({type:"boolean",...qe(t)})}function zre(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 qre(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...qe(t)})}function Vre(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...qe(t)})}function Yre(e,t){return new e({type:"symbol",...qe(t)})}function Kre(e,t){return new e({type:"undefined",...qe(t)})}function Jre(e,t){return new e({type:"null",...qe(t)})}function Zre(e){return new e({type:"any"})}function Wre(e){return new e({type:"unknown"})}function Xre(e,t){return new e({type:"never",...qe(t)})}function eoe(e,t){return new e({type:"void",...qe(t)})}function toe(e,t){return new e({type:"date",...qe(t)})}function noe(e,t){return new e({type:"date",coerce:!0,...qe(t)})}function roe(e,t){return new e({type:"nan",...qe(t)})}function lA(e,t){return new fj({check:"less_than",...qe(t),value:e,inclusive:!1})}function cd(e,t){return new fj({check:"less_than",...qe(t),value:e,inclusive:!0})}function dA(e,t){return new mj({check:"greater_than",...qe(t),value:e,inclusive:!1})}function lc(e,t){return new mj({check:"greater_than",...qe(t),value:e,inclusive:!0})}function Jj(e){return dA(0,e)}function Zj(e){return lA(0,e)}function Wj(e){return cd(0,e)}function Xj(e){return lc(0,e)}function VE(e,t){return new zte({check:"multiple_of",...qe(t),value:e})}function YE(e,t){return new qte({check:"max_size",...qe(t),maximum:e})}function pA(e,t){return new Vte({check:"min_size",...qe(t),minimum:e})}function xT(e,t){return new Yte({check:"size_equals",...qe(t),size:e})}function DT(e,t){return new Kte({check:"max_length",...qe(t),maximum:e})}function sh(e,t){return new Jte({check:"min_length",...qe(t),minimum:e})}function NT(e,t){return new Zte({check:"length_equals",...qe(t),length:e})}function Ex(e,t){return new Wte({check:"string_format",format:"regex",...qe(t),pattern:e})}function yx(e){return new Xte({check:"string_format",format:"lowercase",...qe(e)})}function Sx(e){return new ene({check:"string_format",format:"uppercase",...qe(e)})}function Tx(e,t){return new tne({check:"string_format",format:"includes",...qe(t),includes:e})}function bx(e,t){return new nne({check:"string_format",format:"starts_with",...qe(t),prefix:e})}function Ix(e,t){return new rne({check:"string_format",format:"ends_with",...qe(t),suffix:e})}function ez(e,t,n){return new one({check:"property",property:e,schema:t,...qe(n)})}function Cx(e,t){return new ine({check:"mime_type",mime:e,...qe(t)})}function Mf(e){return new sne({check:"overwrite",tx:e})}function vx(e){return Mf(t=>t.normalize(e))}function Rx(){return Mf(e=>e.trim())}function xx(){return Mf(e=>e.toLowerCase())}function Dx(){return Mf(e=>e.toUpperCase())}function Nx(){return Mf(e=>ete(e))}function ooe(e,t,n){return new e({type:"array",element:t,...qe(n)})}function m2t(e,t,n){return new e({type:"union",options:t,...qe(n)})}function A2t(e,t,n){return new e({type:"union",options:t,inclusive:!1,...qe(n)})}function g2t(e,t,n,r){return new e({type:"union",options:n,discriminator:t,...qe(r)})}function h2t(e,t,n){return new e({type:"intersection",left:t,right:n})}function _2t(e,t,n,r){let o=n instanceof ln,i=o?r:n,s=o?n:null;return new e({type:"tuple",items:t,rest:s,...qe(i)})}function E2t(e,t,n,r){return new e({type:"record",keyType:t,valueType:n,...qe(r)})}function y2t(e,t,n,r){return new e({type:"map",keyType:t,valueType:n,...qe(r)})}function S2t(e,t,n){return new e({type:"set",valueType:t,...qe(n)})}function T2t(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 b2t(e,t,n){return new e({type:"enum",entries:t,...qe(n)})}function I2t(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...qe(n)})}function ioe(e,t){return new e({type:"file",...qe(t)})}function C2t(e,t){return new e({type:"transform",transform:t})}function v2t(e,t){return new e({type:"optional",innerType:t})}function R2t(e,t){return new e({type:"nullable",innerType:t})}function x2t(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():nte(n)}})}function D2t(e,t,n){return new e({type:"nonoptional",innerType:t,...qe(n)})}function N2t(e,t){return new e({type:"success",innerType:t})}function w2t(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function B2t(e,t,n){return new e({type:"pipe",in:t,out:n})}function k2t(e,t){return new e({type:"readonly",innerType:t})}function O2t(e,t,n){return new e({type:"template_literal",parts:t,...qe(n)})}function P2t(e,t){return new e({type:"lazy",getter:t})}function M2t(e,t){return new e({type:"promise",innerType:t})}function soe(e,t,n){let r=qe(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function aoe(e,t,n){return new e({type:"custom",check:"custom",fn:t,...qe(n)})}function uoe(e,t){let n=u6e(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(px(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(px(i))}},e(r.value,r)),t);return n}function u6e(e,t){let n=new ro({check:"custom",...qe(t)});return n._zod.check=e,n}function coe(e){let t=new ro({check:"describe"});return t._zod.onattach=[n=>{let r=Ga.get(n)??{};Ga.add(n,{...r,description:e})}],t._zod.check=()=>{},t}function loe(e){let t=new ro({check:"meta"});return t._zod.onattach=[n=>{let r=Ga.get(n)??{};Ga.add(n,{...r,...e})}],t._zod.check=()=>{},t}function doe(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??cO,l=e.Boolean??aO,f=e.String??RT,h=new f({type:"string",error:n.error}),_=new l({type:"boolean",error:n.error}),E=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:E,continue:!1}),{})}),reverseTransform:((T,v)=>T===!0?r[0]||"true":o[0]||"false"),error:n.error});return E}function wx(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 Nre,c6e=B(()=>{A();Aj();pO();yre();St();Nre={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function KE(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??Ga,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 Pr(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 E=s.schema,T=t.processors[o.type];if(!T)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);T(e,t,E,h)}let _=e._zod.parent;_&&(s.ref||(s.ref=_),Pr(_,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 JE(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,E=e.external.uri??(v=>v);if(_)return{ref:E(_)};let T=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=T,{defId:T,ref:`${E("__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 ZE(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 E=u._zod.parent;if(E&&E!==_){r(E);let T=e.seen.get(E);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:Bx(t,"input",e.processors),output:Bx(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 poe,Bx,AO=B(()=>{A();pO();poe=(e,t={})=>n=>{let r=KE({...n,processors:t});return Pr(e,r),JE(r,e),ZE(r,e)},Bx=(e,t,n={})=>r=>{let{libraryOptions:o,target:i}=r??{},s=KE({...o??{},target:i,io:t,processors:n});return Pr(e,s),JE(s,e),ZE(s,e)}});function oz(e,t){if("_idmap"in e){let r=e,o=KE({...t,processors:tz}),i={};for(let l of r._idmap.entries()){let[f,h]=l;Pr(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;JE(o,h),s[f]=ZE(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=KE({...t,processors:tz});return Pr(e,n),JE(n,e),ZE(n,e)}var L2t,foe,moe,Aoe,goe,hoe,_oe,Eoe,yoe,Soe,Toe,boe,Ioe,Coe,voe,Roe,xoe,Doe,Noe,woe,Boe,koe,Ooe,Poe,Moe,Loe,nz,Uoe,Qoe,Foe,Goe,joe,zoe,Hoe,$oe,qoe,Voe,Yoe,rz,Koe,tz,gO=B(()=>{A();AO();St();L2t={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},foe=(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=L2t[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}))])}},moe=(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),E=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),E?T?(o.maximum=f,o.exclusiveMaximum=!0):o.exclusiveMaximum=f:typeof s=="number"&&(o.maximum=s),typeof l=="number"&&(o.multipleOf=l)},Aoe=(e,t,n,r)=>{n.type="boolean"},goe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},hoe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},_oe=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Eoe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},yoe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Soe=(e,t,n,r)=>{n.not={}},Toe=(e,t,n,r)=>{},boe=(e,t,n,r)=>{},Ioe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Coe=(e,t,n,r)=>{let o=e._zod.def,i=Jk(o.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},voe=(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},Roe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},xoe=(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},Doe=(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)},Noe=(e,t,n,r)=>{n.type="boolean"},woe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Boe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},koe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Ooe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Poe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Moe=(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=Pr(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]=Pr(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=Pr(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},nz=(e,t,n,r)=>{let o=e._zod.def,i=o.inclusive===!1,s=o.options.map((u,l)=>Pr(u,t,{...r,path:[...r.path,i?"oneOf":"anyOf",l]}));i?n.oneOf=s:n.anyOf=s},Uoe=(e,t,n,r)=>{let o=e._zod.def,i=Pr(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=Pr(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},Qoe=(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((E,T)=>Pr(E,t,{...r,path:[...r.path,s,T]})),f=i.rest?Pr(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=Pr(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=Pr(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=Pr(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)}},Goe=(e,t,n,r)=>{let o=e._zod.def,i=Pr(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"}]},joe=(e,t,n,r)=>{let o=e._zod.def;Pr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},zoe=(e,t,n,r)=>{let o=e._zod.def;Pr(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;Pr(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;Pr(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},qoe=(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;Pr(s,t,r);let u=t.seen.get(e);u.ref=s},Voe=(e,t,n,r)=>{let o=e._zod.def;Pr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},Yoe=(e,t,n,r)=>{let o=e._zod.def;Pr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},rz=(e,t,n,r)=>{let o=e._zod.def;Pr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},Koe=(e,t,n,r)=>{let o=e._zod.innerType;Pr(o,t,r);let i=t.seen.get(e);i.ref=o},tz={string:foe,number:moe,boolean:Aoe,bigint:goe,symbol:hoe,null:_oe,undefined:Eoe,void:yoe,never:Soe,any:Toe,unknown:boe,date:Ioe,enum:Coe,literal:voe,nan:Roe,template_literal:xoe,file:Doe,success:Noe,custom:woe,function:Boe,transform:koe,map:Ooe,set:Poe,array:Moe,object:Loe,union:nz,intersection:Uoe,tuple:Qoe,record:Foe,nullable:Goe,nonoptional:joe,default:zoe,prefault:Hoe,catch:$oe,pipe:qoe,readonly:Voe,promise:Yoe,optional:rz,lazy:Koe}});var iz,l6e=B(()=>{A();gO();AO();iz=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=KE({processors:tz,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 Pr(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)),JE(this.ctx,t);let r=ZE(this.ctx,t),{"~standard":o,...i}=r;return i}}});var d6e={};var p6e=B(()=>{A()});var ah={};Ws(ah,{$ZodAny:()=>jne,$ZodArray:()=>Vne,$ZodAsyncError:()=>Pf,$ZodBase64:()=>Bne,$ZodBase64URL:()=>kne,$ZodBigInt:()=>Sj,$ZodBigIntFormat:()=>Une,$ZodBoolean:()=>aO,$ZodCIDRv4:()=>Dne,$ZodCIDRv6:()=>Nne,$ZodCUID:()=>hne,$ZodCUID2:()=>_ne,$ZodCatch:()=>dre,$ZodCheck:()=>ro,$ZodCheckBigIntFormat:()=>$te,$ZodCheckEndsWith:()=>rne,$ZodCheckGreaterThan:()=>mj,$ZodCheckIncludes:()=>tne,$ZodCheckLengthEquals:()=>Zte,$ZodCheckLessThan:()=>fj,$ZodCheckLowerCase:()=>Xte,$ZodCheckMaxLength:()=>Kte,$ZodCheckMaxSize:()=>qte,$ZodCheckMimeType:()=>ine,$ZodCheckMinLength:()=>Jte,$ZodCheckMinSize:()=>Vte,$ZodCheckMultipleOf:()=>zte,$ZodCheckNumberFormat:()=>Hte,$ZodCheckOverwrite:()=>sne,$ZodCheckProperty:()=>one,$ZodCheckRegex:()=>Wte,$ZodCheckSizeEquals:()=>Yte,$ZodCheckStartsWith:()=>nne,$ZodCheckStringFormat:()=>hx,$ZodCheckUpperCase:()=>ene,$ZodCodec:()=>cO,$ZodCustom:()=>Ere,$ZodCustomStringFormat:()=>Mne,$ZodDate:()=>qne,$ZodDefault:()=>are,$ZodDiscriminatedUnion:()=>Jne,$ZodE164:()=>One,$ZodEmail:()=>fne,$ZodEmoji:()=>Ane,$ZodEncodeError:()=>jE,$ZodEnum:()=>tre,$ZodError:()=>tO,$ZodExactOptional:()=>ire,$ZodFile:()=>rre,$ZodFunction:()=>gre,$ZodGUID:()=>dne,$ZodIPv4:()=>vne,$ZodIPv6:()=>Rne,$ZodISODate:()=>bne,$ZodISODateTime:()=>Tne,$ZodISODuration:()=>Cne,$ZodISOTime:()=>Ine,$ZodIntersection:()=>Zne,$ZodJWT:()=>Pne,$ZodKSUID:()=>Sne,$ZodLazy:()=>_re,$ZodLiteral:()=>nre,$ZodMAC:()=>xne,$ZodMap:()=>Xne,$ZodNaN:()=>pre,$ZodNanoID:()=>gne,$ZodNever:()=>Hne,$ZodNonOptional:()=>cre,$ZodNull:()=>Gne,$ZodNullable:()=>sre,$ZodNumber:()=>yj,$ZodNumberFormat:()=>Lne,$ZodObject:()=>p4e,$ZodObjectJIT:()=>Yne,$ZodOptional:()=>bj,$ZodPipe:()=>Ij,$ZodPrefault:()=>ure,$ZodPreprocess:()=>fre,$ZodPromise:()=>hre,$ZodReadonly:()=>mre,$ZodRealError:()=>rl,$ZodRecord:()=>Wne,$ZodRegistry:()=>xj,$ZodSet:()=>ere,$ZodString:()=>RT,$ZodStringFormat:()=>Wr,$ZodSuccess:()=>lre,$ZodSymbol:()=>Qne,$ZodTemplateLiteral:()=>Are,$ZodTransform:()=>ore,$ZodTuple:()=>Tj,$ZodType:()=>ln,$ZodULID:()=>Ene,$ZodURL:()=>mne,$ZodUUID:()=>pne,$ZodUndefined:()=>Fne,$ZodUnion:()=>uO,$ZodUnknown:()=>zne,$ZodVoid:()=>$ne,$ZodXID:()=>yne,$ZodXor:()=>Kne,$brand:()=>Jee,$constructor:()=>ie,$input:()=>vre,$output:()=>Cre,Doc:()=>sO,JSONSchema:()=>d6e,JSONSchemaGenerator:()=>iz,NEVER:()=>Kee,TimePrecision:()=>Nre,_any:()=>Zre,_array:()=>ooe,_base64:()=>qj,_base64url:()=>Vj,_bigint:()=>Hre,_boolean:()=>jre,_catch:()=>w2t,_check:()=>u6e,_cidrv4:()=>Hj,_cidrv6:()=>$j,_coercedBigint:()=>$re,_coercedBoolean:()=>zre,_coercedDate:()=>noe,_coercedNumber:()=>Mre,_coercedString:()=>xre,_cuid:()=>Lj,_cuid2:()=>Uj,_custom:()=>soe,_date:()=>toe,_decode:()=>rj,_decodeAsync:()=>ij,_default:()=>x2t,_discriminatedUnion:()=>g2t,_e164:()=>Yj,_email:()=>Nj,_emoji:()=>Pj,_encode:()=>nj,_encodeAsync:()=>oj,_endsWith:()=>Ix,_enum:()=>T2t,_file:()=>ioe,_float32:()=>Ure,_float64:()=>Qre,_gt:()=>dA,_gte:()=>lc,_guid:()=>fO,_includes:()=>Tx,_int:()=>Lre,_int32:()=>Fre,_int64:()=>qre,_intersection:()=>h2t,_ipv4:()=>jj,_ipv6:()=>zj,_isoDate:()=>Bre,_isoDateTime:()=>wre,_isoDuration:()=>Ore,_isoTime:()=>kre,_jwt:()=>Kj,_ksuid:()=>Gj,_lazy:()=>P2t,_length:()=>NT,_literal:()=>I2t,_lowercase:()=>yx,_lt:()=>lA,_lte:()=>cd,_mac:()=>Dre,_map:()=>y2t,_max:()=>cd,_maxLength:()=>DT,_maxSize:()=>YE,_mime:()=>Cx,_min:()=>lc,_minLength:()=>sh,_minSize:()=>pA,_multipleOf:()=>VE,_nan:()=>roe,_nanoid:()=>Mj,_nativeEnum:()=>b2t,_negative:()=>Zj,_never:()=>Xre,_nonnegative:()=>Xj,_nonoptional:()=>D2t,_nonpositive:()=>Wj,_normalize:()=>vx,_null:()=>Jre,_nullable:()=>R2t,_number:()=>Pre,_optional:()=>v2t,_overwrite:()=>Mf,_parse:()=>fx,_parseAsync:()=>mx,_pipe:()=>B2t,_positive:()=>Jj,_promise:()=>M2t,_property:()=>ez,_readonly:()=>k2t,_record:()=>E2t,_refine:()=>aoe,_regex:()=>Ex,_safeDecode:()=>aj,_safeDecodeAsync:()=>cj,_safeEncode:()=>sj,_safeEncodeAsync:()=>uj,_safeParse:()=>Ax,_safeParseAsync:()=>gx,_set:()=>S2t,_size:()=>xT,_slugify:()=>Nx,_startsWith:()=>bx,_string:()=>Rre,_stringFormat:()=>wx,_stringbool:()=>doe,_success:()=>N2t,_superRefine:()=>uoe,_symbol:()=>Yre,_templateLiteral:()=>O2t,_toLowerCase:()=>xx,_toUpperCase:()=>Dx,_transform:()=>C2t,_trim:()=>Rx,_tuple:()=>_2t,_uint32:()=>Gre,_uint64:()=>Vre,_ulid:()=>Qj,_undefined:()=>Kre,_union:()=>m2t,_unknown:()=>Wre,_uppercase:()=>Sx,_url:()=>mO,_uuid:()=>wj,_uuidv4:()=>Bj,_uuidv6:()=>kj,_uuidv7:()=>Oj,_void:()=>eoe,_xid:()=>Fj,_xor:()=>A2t,clone:()=>uc,config:()=>Ii,createStandardJSONSchemaMethod:()=>Bx,createToJSONSchemaMethod:()=>poe,decode:()=>MPt,decodeAsync:()=>UPt,describe:()=>coe,encode:()=>PPt,encodeAsync:()=>LPt,extractDefs:()=>JE,finalize:()=>ZE,flattenError:()=>nO,formatError:()=>rO,globalConfig:()=>bT,globalRegistry:()=>Ga,initializeContext:()=>KE,isValidBase64:()=>wne,isValidBase64URL:()=>u4e,isValidJWT:()=>c4e,locales:()=>dO,meta:()=>loe,parse:()=>ej,parseAsync:()=>tj,prettifyError:()=>cte,process:()=>Pr,regexes:()=>ud,registry:()=>Dj,safeDecode:()=>FPt,safeDecodeAsync:()=>jPt,safeEncode:()=>QPt,safeEncodeAsync:()=>GPt,safeParse:()=>dte,safeParseAsync:()=>pte,toDotPath:()=>GFe,toJSONSchema:()=>oz,treeifyError:()=>ute,util:()=>Le,version:()=>une});var ld=B(()=>{A();IT();fte();lte();yre();Aj();cne();St();pj();Ire();pO();ane();c6e();AO();gO();l6e();p6e()});var sz={};Ws(sz,{endsWith:()=>Ix,gt:()=>dA,gte:()=>lc,includes:()=>Tx,length:()=>NT,lowercase:()=>yx,lt:()=>lA,lte:()=>cd,maxLength:()=>DT,maxSize:()=>YE,mime:()=>Cx,minLength:()=>sh,minSize:()=>pA,multipleOf:()=>VE,negative:()=>Zj,nonnegative:()=>Xj,nonpositive:()=>Wj,normalize:()=>vx,overwrite:()=>Mf,positive:()=>Jj,property:()=>ez,regex:()=>Ex,size:()=>xT,slugify:()=>Nx,startsWith:()=>bx,toLowerCase:()=>xx,toUpperCase:()=>Dx,trim:()=>Rx,uppercase:()=>Sx});var az=B(()=>{A();ld()});var kx={};Ws(kx,{ZodISODate:()=>cz,ZodISODateTime:()=>uz,ZodISODuration:()=>dz,ZodISOTime:()=>lz,date:()=>Zoe,datetime:()=>Joe,duration:()=>Xoe,time:()=>Woe});function Joe(e){return wre(uz,e)}function Zoe(e){return Bre(cz,e)}function Woe(e){return kre(lz,e)}function Xoe(e){return Ore(dz,e)}var uz,cz,lz,dz,hO=B(()=>{A();ld();EO();uz=ie("ZodISODateTime",(e,t)=>{Tne.init(e,t),Xr.init(e,t)});cz=ie("ZodISODate",(e,t)=>{bne.init(e,t),Xr.init(e,t)});lz=ie("ZodISOTime",(e,t)=>{Ine.init(e,t),Xr.init(e,t)});dz=ie("ZodISODuration",(e,t)=>{Cne.init(e,t),Xr.init(e,t)})});var f6e,Q2t,ol,eie=B(()=>{A();ld();ld();St();f6e=(e,t)=>{tO.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>rO(e,n)},flatten:{value:n=>nO(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,lx,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,lx,2)}},isEmpty:{get(){return e.issues.length===0}}})},Q2t=ie("ZodError",f6e),ol=ie("ZodError",f6e,{Parent:Error})});var tie,nie,rie,oie,iie,sie,aie,uie,cie,lie,die,pie,fie=B(()=>{A();ld();eie();tie=fx(ol),nie=mx(ol),rie=Ax(ol),oie=gx(ol),iie=nj(ol),sie=rj(ol),aie=oj(ol),uie=ij(ol),cie=sj(ol),lie=aj(ol),die=uj(ol),pie=cj(ol)});var _O={};Ws(_O,{ZodAny:()=>Sie,ZodArray:()=>Cie,ZodBase64:()=>Rz,ZodBase64URL:()=>xz,ZodBigInt:()=>Fx,ZodBigIntFormat:()=>wz,ZodBoolean:()=>Qx,ZodCIDRv4:()=>Cz,ZodCIDRv6:()=>vz,ZodCUID:()=>_z,ZodCUID2:()=>Ez,ZodCatch:()=>Vie,ZodCodec:()=>wO,ZodCustom:()=>BO,ZodCustomStringFormat:()=>Lx,ZodDate:()=>vO,ZodDefault:()=>Gie,ZodDiscriminatedUnion:()=>Rie,ZodE164:()=>Dz,ZodEmail:()=>Az,ZodEmoji:()=>gz,ZodEnum:()=>Px,ZodExactOptional:()=>Uie,ZodFile:()=>Mie,ZodFunction:()=>rse,ZodGUID:()=>SO,ZodIPv4:()=>bz,ZodIPv6:()=>Iz,ZodIntersection:()=>xie,ZodJWT:()=>Nz,ZodKSUID:()=>Tz,ZodLazy:()=>ese,ZodLiteral:()=>Pie,ZodMAC:()=>mie,ZodMap:()=>kie,ZodNaN:()=>Kie,ZodNanoID:()=>hz,ZodNever:()=>bie,ZodNonOptional:()=>Lz,ZodNull:()=>Eie,ZodNullable:()=>Fie,ZodNumber:()=>Ux,ZodNumberFormat:()=>BT,ZodObject:()=>xO,ZodOptional:()=>Mz,ZodPipe:()=>NO,ZodPrefault:()=>zie,ZodPreprocess:()=>Jie,ZodPromise:()=>nse,ZodReadonly:()=>Zie,ZodRecord:()=>Ox,ZodSet:()=>Oie,ZodString:()=>Mx,ZodStringFormat:()=>Xr,ZodSuccess:()=>qie,ZodSymbol:()=>hie,ZodTemplateLiteral:()=>Xie,ZodTransform:()=>Lie,ZodTuple:()=>Nie,ZodType:()=>wn,ZodULID:()=>yz,ZodURL:()=>CO,ZodUUID:()=>fA,ZodUndefined:()=>_ie,ZodUnion:()=>DO,ZodUnknown:()=>Tie,ZodVoid:()=>Iie,ZodXID:()=>Sz,ZodXor:()=>vie,_ZodString:()=>mz,_default:()=>jie,_function:()=>SGe,any:()=>W6e,array:()=>RO,base64:()=>P6e,base64url:()=>M6e,bigint:()=>V6e,boolean:()=>gie,catch:()=>Yie,check:()=>TGe,cidrv4:()=>k6e,cidrv6:()=>O6e,codec:()=>hGe,cuid:()=>C6e,cuid2:()=>v6e,custom:()=>bGe,date:()=>eGe,describe:()=>IGe,discriminatedUnion:()=>sGe,e164:()=>L6e,email:()=>A6e,emoji:()=>b6e,enum:()=>Oz,exactOptional:()=>Qie,file:()=>fGe,float32:()=>z6e,float64:()=>H6e,function:()=>SGe,guid:()=>g6e,hash:()=>j6e,hex:()=>G6e,hostname:()=>F6e,httpUrl:()=>T6e,instanceof:()=>vGe,int:()=>pz,int32:()=>$6e,int64:()=>Y6e,intersection:()=>Die,invertCodec:()=>_Ge,ipv4:()=>N6e,ipv6:()=>B6e,json:()=>xGe,jwt:()=>U6e,keyof:()=>tGe,ksuid:()=>D6e,lazy:()=>tse,literal:()=>pGe,looseObject:()=>oGe,looseRecord:()=>uGe,mac:()=>w6e,map:()=>cGe,meta:()=>CGe,nan:()=>gGe,nanoid:()=>I6e,nativeEnum:()=>dGe,never:()=>Bz,nonoptional:()=>$ie,null:()=>yie,nullable:()=>bO,nullish:()=>mGe,number:()=>Aie,object:()=>nGe,optional:()=>TO,partialRecord:()=>aGe,pipe:()=>fz,prefault:()=>Hie,preprocess:()=>DGe,promise:()=>yGe,readonly:()=>Wie,record:()=>Bie,refine:()=>ose,set:()=>lGe,strictObject:()=>rGe,string:()=>yO,stringFormat:()=>Q6e,stringbool:()=>RGe,success:()=>AGe,superRefine:()=>ise,symbol:()=>J6e,templateLiteral:()=>EGe,transform:()=>Pz,tuple:()=>wie,uint32:()=>q6e,uint64:()=>K6e,ulid:()=>R6e,undefined:()=>Z6e,union:()=>kz,unknown:()=>wT,url:()=>S6e,uuid:()=>h6e,uuidv4:()=>_6e,uuidv6:()=>E6e,uuidv7:()=>y6e,void:()=>X6e,xid:()=>x6e,xor:()=>iGe});function IO(e,t,n){let r=Object.getPrototypeOf(e),o=m6e.get(r);if(o||(o=new Set,m6e.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 yO(e){return Rre(Mx,e)}function A6e(e){return Nj(Az,e)}function g6e(e){return fO(SO,e)}function h6e(e){return wj(fA,e)}function _6e(e){return Bj(fA,e)}function E6e(e){return kj(fA,e)}function y6e(e){return Oj(fA,e)}function S6e(e){return mO(CO,e)}function T6e(e){return mO(CO,{protocol:ud.httpProtocol,hostname:ud.domain,...Le.normalizeParams(e)})}function b6e(e){return Pj(gz,e)}function I6e(e){return Mj(hz,e)}function C6e(e){return Lj(_z,e)}function v6e(e){return Uj(Ez,e)}function R6e(e){return Qj(yz,e)}function x6e(e){return Fj(Sz,e)}function D6e(e){return Gj(Tz,e)}function N6e(e){return jj(bz,e)}function w6e(e){return Dre(mie,e)}function B6e(e){return zj(Iz,e)}function k6e(e){return Hj(Cz,e)}function O6e(e){return $j(vz,e)}function P6e(e){return qj(Rz,e)}function M6e(e){return Vj(xz,e)}function L6e(e){return Yj(Dz,e)}function U6e(e){return Kj(Nz,e)}function Q6e(e,t,n={}){return wx(Lx,e,t,n)}function F6e(e){return wx(Lx,"hostname",ud.hostname,e)}function G6e(e){return wx(Lx,"hex",ud.hex,e)}function j6e(e,t){let n=t?.enc??"hex",r=`${e}_${n}`,o=ud[r];if(!o)throw new Error(`Unrecognized hash format: ${r}`);return wx(Lx,r,o,t)}function Aie(e){return Pre(Ux,e)}function pz(e){return Lre(BT,e)}function z6e(e){return Ure(BT,e)}function H6e(e){return Qre(BT,e)}function $6e(e){return Fre(BT,e)}function q6e(e){return Gre(BT,e)}function gie(e){return jre(Qx,e)}function V6e(e){return Hre(Fx,e)}function Y6e(e){return qre(wz,e)}function K6e(e){return Vre(wz,e)}function J6e(e){return Yre(hie,e)}function Z6e(e){return Kre(_ie,e)}function yie(e){return Jre(Eie,e)}function W6e(){return Zre(Sie)}function wT(){return Wre(Tie)}function Bz(e){return Xre(bie,e)}function X6e(e){return eoe(Iie,e)}function eGe(e){return toe(vO,e)}function RO(e,t){return ooe(Cie,e,t)}function tGe(e){let t=e._zod.def.shape;return Oz(Object.keys(t))}function nGe(e,t){let n={type:"object",shape:e??{},...Le.normalizeParams(t)};return new xO(n)}function rGe(e,t){return new xO({type:"object",shape:e,catchall:Bz(),...Le.normalizeParams(t)})}function oGe(e,t){return new xO({type:"object",shape:e,catchall:wT(),...Le.normalizeParams(t)})}function kz(e,t){return new DO({type:"union",options:e,...Le.normalizeParams(t)})}function iGe(e,t){return new vie({type:"union",options:e,inclusive:!1,...Le.normalizeParams(t)})}function sGe(e,t,n){return new Rie({type:"union",options:t,discriminator:e,...Le.normalizeParams(n)})}function Die(e,t){return new xie({type:"intersection",left:e,right:t})}function wie(e,t,n){let r=t instanceof ln,o=r?n:t,i=r?t:null;return new Nie({type:"tuple",items:e,rest:i,...Le.normalizeParams(o)})}function Bie(e,t,n){return!t||!t._zod?new Ox({type:"record",keyType:yO(),valueType:e,...Le.normalizeParams(t)}):new Ox({type:"record",keyType:e,valueType:t,...Le.normalizeParams(n)})}function aGe(e,t,n){let r=uc(e);return r._zod.values=void 0,new Ox({type:"record",keyType:r,valueType:t,...Le.normalizeParams(n)})}function uGe(e,t,n){return new Ox({type:"record",keyType:e,valueType:t,mode:"loose",...Le.normalizeParams(n)})}function cGe(e,t,n){return new kie({type:"map",keyType:e,valueType:t,...Le.normalizeParams(n)})}function lGe(e,t){return new Oie({type:"set",valueType:e,...Le.normalizeParams(t)})}function Oz(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Px({type:"enum",entries:n,...Le.normalizeParams(t)})}function dGe(e,t){return new Px({type:"enum",entries:e,...Le.normalizeParams(t)})}function pGe(e,t){return new Pie({type:"literal",values:Array.isArray(e)?e:[e],...Le.normalizeParams(t)})}function fGe(e){return ioe(Mie,e)}function Pz(e){return new Lie({type:"transform",transform:e})}function TO(e){return new Mz({type:"optional",innerType:e})}function Qie(e){return new Uie({type:"optional",innerType:e})}function bO(e){return new Fie({type:"nullable",innerType:e})}function mGe(e){return TO(bO(e))}function jie(e,t){return new Gie({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Le.shallowClone(t)}})}function Hie(e,t){return new zie({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Le.shallowClone(t)}})}function $ie(e,t){return new Lz({type:"nonoptional",innerType:e,...Le.normalizeParams(t)})}function AGe(e){return new qie({type:"success",innerType:e})}function Yie(e,t){return new Vie({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function gGe(e){return roe(Kie,e)}function fz(e,t){return new NO({type:"pipe",in:e,out:t})}function hGe(e,t,n){return new wO({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function _Ge(e){let t=e._zod.def;return new wO({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function Wie(e){return new Zie({type:"readonly",innerType:e})}function EGe(e,t){return new Xie({type:"template_literal",parts:e,...Le.normalizeParams(t)})}function tse(e){return new ese({type:"lazy",getter:e})}function yGe(e){return new nse({type:"promise",innerType:e})}function SGe(e){return new rse({type:"function",input:Array.isArray(e?.input)?wie(e?.input):e?.input??RO(wT()),output:e?.output??wT()})}function TGe(e){let t=new ro({check:"custom"});return t._zod.check=e,t}function bGe(e,t){return soe(BO,e??(()=>!0),t)}function ose(e,t={}){return aoe(BO,e,t)}function ise(e,t){return uoe(e,t)}function vGe(e,t={}){let n=new BO({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 xGe(e){let t=tse(()=>kz([yO(e),Aie(),gie(),yie(),RO(t),Bie(yO(),t)]));return t}function DGe(e,t){return new Jie({type:"pipe",in:Pz(e),out:t})}var m6e,wn,mz,Mx,Xr,Az,SO,fA,CO,gz,hz,_z,Ez,yz,Sz,Tz,bz,mie,Iz,Cz,vz,Rz,xz,Dz,Nz,Lx,Ux,BT,Qx,Fx,wz,hie,_ie,Eie,Sie,Tie,bie,Iie,vO,Cie,xO,DO,vie,Rie,xie,Nie,Ox,kie,Oie,Px,Pie,Mie,Lie,Mz,Uie,Fie,Gie,zie,Lz,qie,Vie,Kie,NO,wO,Jie,Zie,Xie,ese,nse,rse,BO,IGe,CGe,RGe,EO=B(()=>{A();ld();ld();gO();AO();az();hO();fie();m6e=new WeakMap;wn=ie("ZodType",(e,t)=>(ln.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Bx(e,"input"),output:Bx(e,"output")}}),e.toJSONSchema=poe(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>tie(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>rie(e,n,r),e.parseAsync=async(n,r)=>nie(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>oie(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>iie(e,n,r),e.decode=(n,r)=>sie(e,n,r),e.encodeAsync=async(n,r)=>aie(e,n,r),e.decodeAsync=async(n,r)=>uie(e,n,r),e.safeEncode=(n,r)=>cie(e,n,r),e.safeDecode=(n,r)=>lie(e,n,r),e.safeEncodeAsync=async(n,r)=>die(e,n,r),e.safeDecodeAsync=async(n,r)=>pie(e,n,r),IO(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(ose(n,r))},superRefine(n,r){return this.check(ise(n,r))},overwrite(n){return this.check(Mf(n))},optional(){return TO(this)},exactOptional(){return Qie(this)},nullable(){return bO(this)},nullish(){return TO(bO(this))},nonoptional(n){return $ie(this,n)},array(){return RO(this)},or(n){return kz([this,n])},and(n){return Die(this,n)},transform(n){return fz(this,Pz(n))},default(n){return jie(this,n)},prefault(n){return Hie(this,n)},catch(n){return Yie(this,n)},pipe(n){return fz(this,n)},readonly(){return Wie(this)},describe(n){let r=this.clone();return Ga.add(r,{description:n}),r},meta(...n){if(n.length===0)return Ga.get(this);let r=this.clone();return Ga.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 Ga.get(e)?.description},configurable:!0}),e)),mz=ie("_ZodString",(e,t)=>{RT.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>foe(e,r,o,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,IO(e,"_ZodString",{regex(...r){return this.check(Ex(...r))},includes(...r){return this.check(Tx(...r))},startsWith(...r){return this.check(bx(...r))},endsWith(...r){return this.check(Ix(...r))},min(...r){return this.check(sh(...r))},max(...r){return this.check(DT(...r))},length(...r){return this.check(NT(...r))},nonempty(...r){return this.check(sh(1,...r))},lowercase(r){return this.check(yx(r))},uppercase(r){return this.check(Sx(r))},trim(){return this.check(Rx())},normalize(...r){return this.check(vx(...r))},toLowerCase(){return this.check(xx())},toUpperCase(){return this.check(Dx())},slugify(){return this.check(Nx())}})}),Mx=ie("ZodString",(e,t)=>{RT.init(e,t),mz.init(e,t),e.email=n=>e.check(Nj(Az,n)),e.url=n=>e.check(mO(CO,n)),e.jwt=n=>e.check(Kj(Nz,n)),e.emoji=n=>e.check(Pj(gz,n)),e.guid=n=>e.check(fO(SO,n)),e.uuid=n=>e.check(wj(fA,n)),e.uuidv4=n=>e.check(Bj(fA,n)),e.uuidv6=n=>e.check(kj(fA,n)),e.uuidv7=n=>e.check(Oj(fA,n)),e.nanoid=n=>e.check(Mj(hz,n)),e.guid=n=>e.check(fO(SO,n)),e.cuid=n=>e.check(Lj(_z,n)),e.cuid2=n=>e.check(Uj(Ez,n)),e.ulid=n=>e.check(Qj(yz,n)),e.base64=n=>e.check(qj(Rz,n)),e.base64url=n=>e.check(Vj(xz,n)),e.xid=n=>e.check(Fj(Sz,n)),e.ksuid=n=>e.check(Gj(Tz,n)),e.ipv4=n=>e.check(jj(bz,n)),e.ipv6=n=>e.check(zj(Iz,n)),e.cidrv4=n=>e.check(Hj(Cz,n)),e.cidrv6=n=>e.check($j(vz,n)),e.e164=n=>e.check(Yj(Dz,n)),e.datetime=n=>e.check(Joe(n)),e.date=n=>e.check(Zoe(n)),e.time=n=>e.check(Woe(n)),e.duration=n=>e.check(Xoe(n))});Xr=ie("ZodStringFormat",(e,t)=>{Wr.init(e,t),mz.init(e,t)}),Az=ie("ZodEmail",(e,t)=>{fne.init(e,t),Xr.init(e,t)});SO=ie("ZodGUID",(e,t)=>{dne.init(e,t),Xr.init(e,t)});fA=ie("ZodUUID",(e,t)=>{pne.init(e,t),Xr.init(e,t)});CO=ie("ZodURL",(e,t)=>{mne.init(e,t),Xr.init(e,t)});gz=ie("ZodEmoji",(e,t)=>{Ane.init(e,t),Xr.init(e,t)});hz=ie("ZodNanoID",(e,t)=>{gne.init(e,t),Xr.init(e,t)});_z=ie("ZodCUID",(e,t)=>{hne.init(e,t),Xr.init(e,t)});Ez=ie("ZodCUID2",(e,t)=>{_ne.init(e,t),Xr.init(e,t)});yz=ie("ZodULID",(e,t)=>{Ene.init(e,t),Xr.init(e,t)});Sz=ie("ZodXID",(e,t)=>{yne.init(e,t),Xr.init(e,t)});Tz=ie("ZodKSUID",(e,t)=>{Sne.init(e,t),Xr.init(e,t)});bz=ie("ZodIPv4",(e,t)=>{vne.init(e,t),Xr.init(e,t)});mie=ie("ZodMAC",(e,t)=>{xne.init(e,t),Xr.init(e,t)});Iz=ie("ZodIPv6",(e,t)=>{Rne.init(e,t),Xr.init(e,t)});Cz=ie("ZodCIDRv4",(e,t)=>{Dne.init(e,t),Xr.init(e,t)});vz=ie("ZodCIDRv6",(e,t)=>{Nne.init(e,t),Xr.init(e,t)});Rz=ie("ZodBase64",(e,t)=>{Bne.init(e,t),Xr.init(e,t)});xz=ie("ZodBase64URL",(e,t)=>{kne.init(e,t),Xr.init(e,t)});Dz=ie("ZodE164",(e,t)=>{One.init(e,t),Xr.init(e,t)});Nz=ie("ZodJWT",(e,t)=>{Pne.init(e,t),Xr.init(e,t)});Lx=ie("ZodCustomStringFormat",(e,t)=>{Mne.init(e,t),Xr.init(e,t)});Ux=ie("ZodNumber",(e,t)=>{yj.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>moe(e,r,o,i),IO(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(cd(r,o))},max(r,o){return this.check(cd(r,o))},int(r){return this.check(pz(r))},safe(r){return this.check(pz(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(cd(0,r))},multipleOf(r,o){return this.check(VE(r,o))},step(r,o){return this.check(VE(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});BT=ie("ZodNumberFormat",(e,t)=>{Lne.init(e,t),Ux.init(e,t)});Qx=ie("ZodBoolean",(e,t)=>{aO.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Aoe(e,n,r,o)});Fx=ie("ZodBigInt",(e,t)=>{Sj.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>goe(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(cd(r,o)),e.max=(r,o)=>e.check(cd(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(cd(BigInt(0),r)),e.nonnegative=r=>e.check(lc(BigInt(0),r)),e.multipleOf=(r,o)=>e.check(VE(r,o));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});wz=ie("ZodBigIntFormat",(e,t)=>{Une.init(e,t),Fx.init(e,t)});hie=ie("ZodSymbol",(e,t)=>{Qne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hoe(e,n,r,o)});_ie=ie("ZodUndefined",(e,t)=>{Fne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Eoe(e,n,r,o)});Eie=ie("ZodNull",(e,t)=>{Gne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>_oe(e,n,r,o)});Sie=ie("ZodAny",(e,t)=>{jne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Toe(e,n,r,o)});Tie=ie("ZodUnknown",(e,t)=>{zne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>boe(e,n,r,o)});bie=ie("ZodNever",(e,t)=>{Hne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Soe(e,n,r,o)});Iie=ie("ZodVoid",(e,t)=>{$ne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>yoe(e,n,r,o)});vO=ie("ZodDate",(e,t)=>{qne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Ioe(e,r,o,i),e.min=(r,o)=>e.check(lc(r,o)),e.max=(r,o)=>e.check(cd(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});Cie=ie("ZodArray",(e,t)=>{Vne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Moe(e,n,r,o),e.element=t.element,IO(e,"ZodArray",{min(n,r){return this.check(sh(n,r))},nonempty(n){return this.check(sh(1,n))},max(n,r){return this.check(DT(n,r))},length(n,r){return this.check(NT(n,r))},unwrap(){return this.element}})});xO=ie("ZodObject",(e,t)=>{Yne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Loe(e,n,r,o),Le.defineLazy(e,"shape",()=>t.shape),IO(e,"ZodObject",{keyof(){return Oz(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:Bz()})},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(Mz,this,n[0])},required(...n){return Le.required(Lz,this,n[0])}})});DO=ie("ZodUnion",(e,t)=>{uO.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>nz(e,n,r,o),e.options=t.options});vie=ie("ZodXor",(e,t)=>{DO.init(e,t),Kne.init(e,t),e._zod.processJSONSchema=(n,r,o)=>nz(e,n,r,o),e.options=t.options});Rie=ie("ZodDiscriminatedUnion",(e,t)=>{DO.init(e,t),Jne.init(e,t)});xie=ie("ZodIntersection",(e,t)=>{Zne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Uoe(e,n,r,o)});Nie=ie("ZodTuple",(e,t)=>{Tj.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Qoe(e,n,r,o),e.rest=n=>e.clone({...e._zod.def,rest:n})});Ox=ie("ZodRecord",(e,t)=>{Wne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Foe(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});kie=ie("ZodMap",(e,t)=>{Xne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ooe(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(YE(...n)),e.size=(...n)=>e.check(xT(...n))});Oie=ie("ZodSet",(e,t)=>{ere.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Poe(e,n,r,o),e.min=(...n)=>e.check(pA(...n)),e.nonempty=n=>e.check(pA(1,n)),e.max=(...n)=>e.check(YE(...n)),e.size=(...n)=>e.check(xT(...n))});Px=ie("ZodEnum",(e,t)=>{tre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Coe(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 Px({...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 Px({...t,checks:[],...Le.normalizeParams(o),entries:i})}});Pie=ie("ZodLiteral",(e,t)=>{nre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>voe(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]}})});Mie=ie("ZodFile",(e,t)=>{rre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Doe(e,n,r,o),e.min=(n,r)=>e.check(pA(n,r)),e.max=(n,r)=>e.check(YE(n,r)),e.mime=(n,r)=>e.check(Cx(Array.isArray(n)?n:[n],r))});Lie=ie("ZodTransform",(e,t)=>{ore.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>koe(e,n,r,o),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new jE(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)}});Mz=ie("ZodOptional",(e,t)=>{bj.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rz(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Uie=ie("ZodExactOptional",(e,t)=>{ire.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rz(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Fie=ie("ZodNullable",(e,t)=>{sre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Goe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Gie=ie("ZodDefault",(e,t)=>{are.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>zoe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});zie=ie("ZodPrefault",(e,t)=>{ure.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Hoe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Lz=ie("ZodNonOptional",(e,t)=>{cre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>joe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});qie=ie("ZodSuccess",(e,t)=>{lre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Noe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Vie=ie("ZodCatch",(e,t)=>{dre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>$oe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});Kie=ie("ZodNaN",(e,t)=>{pre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Roe(e,n,r,o)});NO=ie("ZodPipe",(e,t)=>{Ij.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>qoe(e,n,r,o),e.in=t.in,e.out=t.out});wO=ie("ZodCodec",(e,t)=>{NO.init(e,t),cO.init(e,t)});Jie=ie("ZodPreprocess",(e,t)=>{NO.init(e,t),fre.init(e,t)}),Zie=ie("ZodReadonly",(e,t)=>{mre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Voe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Xie=ie("ZodTemplateLiteral",(e,t)=>{Are.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>xoe(e,n,r,o)});ese=ie("ZodLazy",(e,t)=>{_re.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Koe(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});nse=ie("ZodPromise",(e,t)=>{hre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Yoe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});rse=ie("ZodFunction",(e,t)=>{gre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Boe(e,n,r,o)});BO=ie("ZodCustom",(e,t)=>{Ere.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>woe(e,n,r,o)});IGe=coe,CGe=loe;RGe=(...e)=>doe({Codec:wO,Boolean:Qx,String:Mx},...e)});function j2t(e){Ii({customError:e})}function z2t(){return Ii().customError}var G2t,sse,NGe=B(()=>{A();ld();G2t={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"};sse||(sse={})});function $2t(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 q2t(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 wGe(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=q2t(o,t),s=Tu(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 wGe(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=Tu(f,t);o[l]=s.has(l)?h:h.optional()}if(e.propertyNames){let l=Tu(e.propertyNames,t),f=e.additionalProperties&&typeof e.additionalProperties=="object"?Tu(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 E of f){let T=Tu(l[E],t),v=Xe.string().regex(new RegExp(E));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 E=Xe.intersection(_[0],_[1]);for(let T=2;T<_.length;T++)E=Xe.intersection(E,_[T]);r=E}break}let u=Xe.object(o);e.additionalProperties===!1?r=u.strict():typeof e.additionalProperties=="object"?r=u.catchall(Tu(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=>Tu(l,t)),u=i&&typeof i=="object"&&!Array.isArray(i)?Tu(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=>Tu(l,t)),u=e.additionalItems&&typeof e.additionalItems=="object"?Tu(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=Tu(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 Tu(e,t){if(typeof e=="boolean")return e?Xe.any():Xe.never();let n=wGe(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=>Tu(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=>Tu(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:Tu(e.allOf[0],t),l=r?0:1;for(let f=l;f<e.allOf.length;f++)u=Xe.intersection(u,Tu(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))H2t.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 BGe(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=$2t(n,t?.defaultTarget),o=n.$defs||n.definitions||{},i={version:r,defs:o,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Ga};return Tu(n,i)}var Xe,H2t,kGe=B(()=>{A();pO();az();hO();EO();Xe={..._O,...sz,iso:kx},H2t=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 ase={};Ws(ase,{bigint:()=>J2t,boolean:()=>K2t,date:()=>Z2t,number:()=>Y2t,string:()=>V2t});function V2t(e){return xre(Mx,e)}function Y2t(e){return Mre(Ux,e)}function K2t(e){return zre(Qx,e)}function J2t(e){return $re(Fx,e)}function Z2t(e){return noe(vO,e)}var OGe=B(()=>{A();ld();EO()});var p={};Ws(p,{$brand:()=>Jee,$input:()=>vre,$output:()=>Cre,NEVER:()=>Kee,TimePrecision:()=>Nre,ZodAny:()=>Sie,ZodArray:()=>Cie,ZodBase64:()=>Rz,ZodBase64URL:()=>xz,ZodBigInt:()=>Fx,ZodBigIntFormat:()=>wz,ZodBoolean:()=>Qx,ZodCIDRv4:()=>Cz,ZodCIDRv6:()=>vz,ZodCUID:()=>_z,ZodCUID2:()=>Ez,ZodCatch:()=>Vie,ZodCodec:()=>wO,ZodCustom:()=>BO,ZodCustomStringFormat:()=>Lx,ZodDate:()=>vO,ZodDefault:()=>Gie,ZodDiscriminatedUnion:()=>Rie,ZodE164:()=>Dz,ZodEmail:()=>Az,ZodEmoji:()=>gz,ZodEnum:()=>Px,ZodError:()=>Q2t,ZodExactOptional:()=>Uie,ZodFile:()=>Mie,ZodFirstPartyTypeKind:()=>sse,ZodFunction:()=>rse,ZodGUID:()=>SO,ZodIPv4:()=>bz,ZodIPv6:()=>Iz,ZodISODate:()=>cz,ZodISODateTime:()=>uz,ZodISODuration:()=>dz,ZodISOTime:()=>lz,ZodIntersection:()=>xie,ZodIssueCode:()=>G2t,ZodJWT:()=>Nz,ZodKSUID:()=>Tz,ZodLazy:()=>ese,ZodLiteral:()=>Pie,ZodMAC:()=>mie,ZodMap:()=>kie,ZodNaN:()=>Kie,ZodNanoID:()=>hz,ZodNever:()=>bie,ZodNonOptional:()=>Lz,ZodNull:()=>Eie,ZodNullable:()=>Fie,ZodNumber:()=>Ux,ZodNumberFormat:()=>BT,ZodObject:()=>xO,ZodOptional:()=>Mz,ZodPipe:()=>NO,ZodPrefault:()=>zie,ZodPreprocess:()=>Jie,ZodPromise:()=>nse,ZodReadonly:()=>Zie,ZodRealError:()=>ol,ZodRecord:()=>Ox,ZodSet:()=>Oie,ZodString:()=>Mx,ZodStringFormat:()=>Xr,ZodSuccess:()=>qie,ZodSymbol:()=>hie,ZodTemplateLiteral:()=>Xie,ZodTransform:()=>Lie,ZodTuple:()=>Nie,ZodType:()=>wn,ZodULID:()=>yz,ZodURL:()=>CO,ZodUUID:()=>fA,ZodUndefined:()=>_ie,ZodUnion:()=>DO,ZodUnknown:()=>Tie,ZodVoid:()=>Iie,ZodXID:()=>Sz,ZodXor:()=>vie,_ZodString:()=>mz,_default:()=>jie,_function:()=>SGe,any:()=>W6e,array:()=>RO,base64:()=>P6e,base64url:()=>M6e,bigint:()=>V6e,boolean:()=>gie,catch:()=>Yie,check:()=>TGe,cidrv4:()=>k6e,cidrv6:()=>O6e,clone:()=>uc,codec:()=>hGe,coerce:()=>ase,config:()=>Ii,core:()=>ah,cuid:()=>C6e,cuid2:()=>v6e,custom:()=>bGe,date:()=>eGe,decode:()=>sie,decodeAsync:()=>uie,describe:()=>IGe,discriminatedUnion:()=>sGe,e164:()=>L6e,email:()=>A6e,emoji:()=>b6e,encode:()=>iie,encodeAsync:()=>aie,endsWith:()=>Ix,enum:()=>Oz,exactOptional:()=>Qie,file:()=>fGe,flattenError:()=>nO,float32:()=>z6e,float64:()=>H6e,formatError:()=>rO,fromJSONSchema:()=>BGe,function:()=>SGe,getErrorMap:()=>z2t,globalRegistry:()=>Ga,gt:()=>dA,gte:()=>lc,guid:()=>g6e,hash:()=>j6e,hex:()=>G6e,hostname:()=>F6e,httpUrl:()=>T6e,includes:()=>Tx,instanceof:()=>vGe,int:()=>pz,int32:()=>$6e,int64:()=>Y6e,intersection:()=>Die,invertCodec:()=>_Ge,ipv4:()=>N6e,ipv6:()=>B6e,iso:()=>kx,json:()=>xGe,jwt:()=>U6e,keyof:()=>tGe,ksuid:()=>D6e,lazy:()=>tse,length:()=>NT,literal:()=>pGe,locales:()=>dO,looseObject:()=>oGe,looseRecord:()=>uGe,lowercase:()=>yx,lt:()=>lA,lte:()=>cd,mac:()=>w6e,map:()=>cGe,maxLength:()=>DT,maxSize:()=>YE,meta:()=>CGe,mime:()=>Cx,minLength:()=>sh,minSize:()=>pA,multipleOf:()=>VE,nan:()=>gGe,nanoid:()=>I6e,nativeEnum:()=>dGe,negative:()=>Zj,never:()=>Bz,nonnegative:()=>Xj,nonoptional:()=>$ie,nonpositive:()=>Wj,normalize:()=>vx,null:()=>yie,nullable:()=>bO,nullish:()=>mGe,number:()=>Aie,object:()=>nGe,optional:()=>TO,overwrite:()=>Mf,parse:()=>tie,parseAsync:()=>nie,partialRecord:()=>aGe,pipe:()=>fz,positive:()=>Jj,prefault:()=>Hie,preprocess:()=>DGe,prettifyError:()=>cte,promise:()=>yGe,property:()=>ez,readonly:()=>Wie,record:()=>Bie,refine:()=>ose,regex:()=>Ex,regexes:()=>ud,registry:()=>Dj,safeDecode:()=>lie,safeDecodeAsync:()=>pie,safeEncode:()=>cie,safeEncodeAsync:()=>die,safeParse:()=>rie,safeParseAsync:()=>oie,set:()=>lGe,setErrorMap:()=>j2t,size:()=>xT,slugify:()=>Nx,startsWith:()=>bx,strictObject:()=>rGe,string:()=>yO,stringFormat:()=>Q6e,stringbool:()=>RGe,success:()=>AGe,superRefine:()=>ise,symbol:()=>J6e,templateLiteral:()=>EGe,toJSONSchema:()=>oz,toLowerCase:()=>xx,toUpperCase:()=>Dx,transform:()=>Pz,treeifyError:()=>ute,trim:()=>Rx,tuple:()=>wie,uint32:()=>q6e,uint64:()=>K6e,ulid:()=>R6e,undefined:()=>Z6e,union:()=>kz,unknown:()=>wT,uppercase:()=>Sx,url:()=>S6e,util:()=>Le,uuid:()=>h6e,uuidv4:()=>_6e,uuidv6:()=>E6e,uuidv7:()=>y6e,void:()=>X6e,xid:()=>x6e,xor:()=>iGe});var use=B(()=>{A();ld();EO();az();eie();fie();NGe();ld();Sre();ld();gO();kGe();Ire();hO();hO();OGe();Ii(Cj())});var pc=B(()=>{A();use();use()});var W2t,bu,cse,kT,Uz,X2t,Qz,PGe,MGe,lse,eLt,tLt,nLt,rLt,oLt,iLt,sLt,LGe,Fz=B(()=>{"use strict";A();cA();pc();W2t=Su(),bu=p.object({message:p.string()}),cse=p.record(p.string(),p.unknown()),kT=p.string().regex(/^doc_[0-9A-Za-z]{22}$/),Uz=p.string().regex(/^proj_[0-9A-Za-z]{22}$/),X2t=["active","archived"],Qz=p.enum(X2t),PGe=p.object({id:p.string().min(1),display_name:p.string().min(1)}),MGe=p.object({id:Uz,name:p.string().min(1)}),lse=p.object({id:kT,title:p.string().min(1),status:Qz,author:PGe,project:MGe.nullable(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable()}),eLt=p.object({type:p.literal("list"),list_type:p.literal("doc"),objects:p.array(lse)}),tLt=p.object({project_id:Uz.optional(),status:Qz.optional()}),nLt=p.object({title:p.string().trim().min(1).max(300).optional(),prosemirror_json:cse.optional(),project_id:Uz.nullable().optional()}),rLt=p.object({id:kT,created_at:p.string().datetime()}),oLt=p.object({title:p.string().trim().min(1).max(300).optional(),prosemirror_json:cse.optional(),project_id:Uz.nullable().optional(),status:Qz.optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),iLt=p.object({id:kT,updated_at:p.string().datetime()}),sLt=p.object({id:kT,title:p.string().min(1),prosemirror_json:cse,status:Qz,author:PGe,project:MGe.nullable(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable()}),LGe=W2t.router({listDocs:{method:"GET",path:"/docs",headers:p.object({authorization:p.string().min(1).optional()}),query:tLt,responses:{200:eLt,401:bu,403:bu},summary:"List docs in the authenticated user\u2019s organization. Optional project_id filter scopes to a single project."},createDoc:{method:"POST",path:"/docs",headers:p.object({authorization:p.string().min(1).optional()}),body:nLt,responses:{201:rLt,401:bu,403:bu,404:bu,422:bu},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:p.object({docId:kT}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:sLt,401:bu,403:bu,404:bu},summary:"Get a doc by id with its rich-text body and parent project (if any)"},updateDoc:{method:"PATCH",path:"/docs/:docId",pathParams:p.object({docId:kT}),headers:p.object({authorization:p.string().min(1).optional()}),body:oLt,responses:{200:iLt,401:bu,403:bu,404:bu,422:bu},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:p.object({docId:kT}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.object({}),401:bu,403:bu,404:bu},summary:"Hard-delete a doc and any mention references it owns"}})});var aLt,Lf,XGn,ejn,uLt,tjn,cLt,Gx,Gz=B(()=>{"use strict";A();pc();aLt=["person","foot_gun"],Lf=p.enum(aLt),XGn=p.enum(["authored","commented","edited","mentioned"]),ejn=p.enum(["observed_in","reaffirmed_in"]),uLt=["primary"],tjn=p.enum(uLt),cLt=["supports","supersedes"],Gx=p.enum(cLt)});var lLt,dse=B(()=>{"use strict";A();pc();lLt=p.object({user_id:p.string().nullable()})});var dLt,pse=B(()=>{"use strict";A();pc();dLt=p.object({typical_phrasings:p.array(p.string()).default([])})});var fse=B(()=>{"use strict";A();Gz();dse();pse();Gz();dse();pse()});var pLt,ji,dd,fLt,QGe,FGe,mLt,UGe,OT,ALt,gLt,hLt,_Lt,ELt,GGe,mse=B(()=>{"use strict";A();cA();pc();fse();pLt=Su(),ji=p.object({message:p.string()}),dd=p.string().regex(/^ent_[0-9A-Za-z]{22}$/),fLt=["active","archived"],QGe=p.enum(fLt),FGe=p.object({id:dd,kind:Lf,slug:p.string(),name:p.string(),blurb:p.string().nullable(),status:QGe,lifecycle:p.string().nullable(),human_edited_at:p.string().datetime().nullable(),last_active_at:p.string().datetime(),created_at:p.string().datetime(),updated_at:p.string().datetime()}),mLt=p.object({thread_id:p.string(),thread_title:p.string(),role:p.string(),score:p.number().nullable(),added_at:p.string().datetime(),added_by:p.object({id:p.string(),display_name:p.string()})}),UGe=p.object({entity_id:dd,name:p.string(),slug:p.string(),kind:Lf,edge_kind:Gx}),OT=FGe.extend({payload:p.record(p.string(),p.unknown()),attachments:p.array(mLt),edges:p.object({outgoing:p.array(UGe),incoming:p.array(UGe)})}),ALt=p.object({type:p.literal("list"),list_type:p.literal("entities"),has_more:p.boolean(),objects:p.array(FGe)}),gLt=p.object({kind:Lf.optional().describe("Filter to a single entity kind"),status:QGe.optional().describe("Filter by entity status"),after:dd.optional().describe("Cursor: return entities after this id"),before:dd.optional().describe("Cursor: return entities before this id")}),hLt=p.object({name:p.string().min(1).optional().describe("New display name for the entity"),blurb:p.string().nullable().optional().describe("New blurb; null clears it"),payload:p.record(p.string(),p.unknown()).optional().describe("Replacement payload for the entity")}),_Lt=p.object({thread_id:p.string().min(1).describe("Id of the thread to attach"),role:p.string().min(1).describe("Role of the thread relative to the entity"),score:p.number().min(0).max(1).nullable().optional().describe("Optional relevance score in [0, 1]")}),ELt=p.object({to_id:dd.describe("Id of the target entity for the edge"),kind:Gx.describe("Kind of edge to create")}),GGe=pLt.router({listEntities:{method:"GET",path:"/entities",headers:p.object({authorization:p.string().min(1).optional()}),query:gLt,responses:{200:ALt,401:ji},summary:"List entities in the authenticated user\u2019s organization"},getEntity:{method:"GET",path:"/entities/:entityId",pathParams:p.object({entityId:dd.describe("Id of the entity to fetch")}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:OT,401:ji,404:ji},summary:"Get an entity with its payload, attachments, and edges"},patchEntity:{method:"PATCH",path:"/entities/:entityId",pathParams:p.object({entityId:dd.describe("Id of the entity to update")}),headers:p.object({authorization:p.string().min(1).optional()}),body:hLt,responses:{200:OT,401:ji,403:ji,404:ji},summary:"Update an entity\u2019s name, blurb, or payload"},archiveEntity:{method:"POST",path:"/entities/:entityId/archive",pathParams:p.object({entityId:dd.describe("Id of the entity to archive")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}),responses:{200:OT,401:ji,403:ji,404:ji},summary:"Archive an entity"},attachEntityThread:{method:"POST",path:"/entities/:entityId/threads",pathParams:p.object({entityId:dd.describe("Id of the entity to attach a thread to")}),headers:p.object({authorization:p.string().min(1).optional()}),body:_Lt,responses:{200:OT,401:ji,403:ji,404:ji},summary:"Attach a thread to an entity"},detachEntityThread:{method:"DELETE",path:"/entities/:entityId/threads/:threadId",pathParams:p.object({entityId:dd.describe("Id of the entity to detach a thread from"),threadId:p.string().min(1).describe("Id of the thread to detach")}),headers:p.object({authorization:p.string().min(1).optional()}),query:p.object({role:p.string().min(1).describe("Role of the thread membership to remove")}),responses:{200:OT,401:ji,403:ji,404:ji},summary:"Detach a thread from an entity"},addEntityEdge:{method:"POST",path:"/entities/:entityId/edges",pathParams:p.object({entityId:dd.describe("Id of the source entity for the edge")}),headers:p.object({authorization:p.string().min(1).optional()}),body:ELt,responses:{200:OT,401:ji,403:ji,404:ji},summary:"Add an edge from this entity to another entity"},removeEntityEdge:{method:"DELETE",path:"/entities/:entityId/edges/:toId/:kind",pathParams:p.object({entityId:dd.describe("Id of the source entity for the edge"),toId:dd.describe("Id of the target entity for the edge"),kind:Gx.describe("Kind of edge to remove")}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:OT,401:ji,403:ji,404:ji},summary:"Remove an edge from this entity to another entity"}})});var yLt,SLt,pa,jGe,TLt,bLt,ILt,CLt,zGe,vLt,RLt,HGe,Ase=B(()=>{"use strict";A();cA();pc();yLt=Su(),SLt=p.object({type:p.literal("list"),list_type:p.literal("thread"),has_more:p.boolean(),objects:p.array(p.unknown())}),pa=p.object({message:p.string()}),jGe=p.object({thread_id:p.string().min(1),is_favorited:p.boolean(),favorited_at:p.string().datetime().nullable()}),TLt=p.object({before:p.string().min(1).max(64).optional()}),bLt=p.object({id:p.string().min(1),display_name:p.string().min(1)}),ILt=p.object({block_id:p.string().min(1),thread_id:p.string().min(1),thread_title:p.string(),thread_visibility:p.enum(["private","workspace","public"]),author:bLt,preview:p.string(),prompted_at:p.string().datetime().nullable(),favorited_at:p.string().datetime()}),CLt=p.object({type:p.literal("list"),list_type:p.literal("favorite_prompt"),has_more:p.boolean(),objects:p.array(ILt)}),zGe=p.object({block_id:p.string().min(1),thread_id:p.string().min(1).nullable(),is_favorited:p.boolean(),favorited_at:p.string().datetime().nullable()}),vLt=p.object({before:p.string().min(1).max(64).optional()}),RLt=p.object({block_ids:p.array(p.string().min(1))}),HGe=yLt.router({addThreadFavorite:{method:"POST",path:"/threads/:id/favorite",pathParams:p.object({id:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{201:jGe,401:pa,403:pa,404:pa},summary:"Bookmark a thread for the authenticated user. Idempotent \u2014 re-favoriting returns the existing membership."},removeThreadFavorite:{method:"DELETE",path:"/threads/:id/favorite",pathParams:p.object({id:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:jGe,401:pa,403:pa,404:pa},summary:"Remove a thread bookmark for the authenticated user (no-op if absent)."},listFavoriteThreads:{method:"GET",path:"/favorites/threads",headers:p.object({authorization:p.string().min(1).optional()}),query:TLt,responses:{200:SLt,401:pa,403:pa},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:p.object({id:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{201:zGe,401:pa,403:pa,404:pa,409:pa},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:p.object({id:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:zGe,401:pa,404:pa},summary:"Remove a prompt bookmark for the authenticated user (no-op if absent)."},listFavoritePrompts:{method:"GET",path:"/favorites/prompts",headers:p.object({authorization:p.string().min(1).optional()}),query:vLt,responses:{200:CLt,401:pa},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:p.object({id:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:RLt,401:pa,403:pa,404:pa},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 xLt,jz,DLt,zz,NLt,wLt,BLt,kLt,OLt,PLt,MLt,LLt,$Ge,gse=B(()=>{"use strict";A();cA();pc();xLt=Su(),jz=p.object({message:p.string()}),DLt=["thread","plan","doc","user"],zz=p.enum(DLt),NLt=["doc","project"],wLt=p.enum(NLt),BLt=p.object({kind:zz,id:p.string().min(1),title:p.string().min(1),href:p.string().min(1)}),kLt=p.object({type:p.literal("list"),list_type:p.literal("mention"),objects:p.array(BLt)}),OLt=p.object({q:p.string().trim().min(1).max(50),kinds:p.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(p.array(zz).optional())}),PLt=p.object({source_kind:wLt,source_id:p.string().min(1),source_title:p.string().min(1),source_href:p.string().min(1),target_kind:zz,target_id:p.string().min(1),created_at:p.string().datetime()}),MLt=p.object({type:p.literal("list"),list_type:p.literal("backlink"),objects:p.array(PLt)}),LLt=p.object({target_kind:zz,target_id:p.string().min(1).max(64)}),$Ge=xLt.router({searchMentions:{method:"GET",path:"/mentions/search",headers:p.object({authorization:p.string().min(1).optional()}),query:OLt,responses:{200:kLt,401:jz,422:jz},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:p.object({authorization:p.string().min(1).optional()}),query:LLt,responses:{200:MLt,401:jz,403:jz},summary:"List every doc/project body in the caller\u2019s organization that mentions the given target. Newest-first."}})});var ULt,Mr,hse,il,QLt,kO,_se,qGe,FLt,GLt,jLt,zLt,HLt,$Lt,qLt,VLt,YLt,KLt,JLt,ZLt,WLt,XLt,eUt,VGe,Ese=B(()=>{"use strict";A();cA();pc();Fz();ULt=Su(),Mr=p.object({message:p.string()}),hse=p.record(p.string(),p.unknown()),il=p.string().regex(/^proj_[0-9A-Za-z]{22}$/),QLt=["active","archived"],kO=p.enum(QLt),_se=p.object({id:p.string().min(1),display_name:p.string().min(1)}),qGe=p.object({thread_id:p.string().min(1),title:p.string().min(1),added_at:p.string().datetime(),added_by:_se}),FLt=p.object({id:il,name:p.string().min(1),status:kO,author:_se,thread_count:p.number().int().nonnegative(),doc_count:p.number().int().nonnegative(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable()}),GLt=p.object({type:p.literal("list"),list_type:p.literal("project"),objects:p.array(FLt)}),jLt=p.object({status:kO.optional()}),zLt=p.object({name:p.string().trim().min(1).max(200),prosemirror_json:hse.optional()}),HLt=p.object({id:il,created_at:p.string().datetime()}),$Lt=p.object({name:p.string().trim().min(1).max(200).optional(),prosemirror_json:hse.optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),qLt=p.object({id:il,updated_at:p.string().datetime()}),VLt=p.object({archived:p.boolean()}),YLt=p.object({id:il,status:kO,archived_at:p.string().datetime().nullable()}),KLt=p.object({id:il,name:p.string().min(1),prosemirror_json:hse,status:kO,author:_se,summary:p.string().nullable(),summary_at:p.string().datetime().nullable(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable(),threads:p.array(qGe),docs:p.array(lse)}),JLt=p.object({id:il,summary:p.string(),summary_at:p.string().datetime()}),ZLt=p.object({thread_id:p.string().min(1).max(64)}),WLt=qGe,XLt=p.object({id:il,name:p.string().min(1),status:kO}),eUt=p.object({type:p.literal("list"),list_type:p.literal("thread_project"),objects:p.array(XLt)}),VGe=ULt.router({listProjects:{method:"GET",path:"/projects",headers:p.object({authorization:p.string().min(1).optional()}),query:jLt,responses:{200:GLt,401:Mr},summary:"List projects in the authenticated user\u2019s organization"},createProject:{method:"POST",path:"/projects",headers:p.object({authorization:p.string().min(1).optional()}),body:zLt,responses:{201:HLt,401:Mr,422:Mr},summary:"Create a new project in the authenticated user\u2019s organization"},getProject:{method:"GET",path:"/projects/:projectId",pathParams:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:KLt,401:Mr,403:Mr,404:Mr},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:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),body:$Lt,responses:{200:qLt,401:Mr,403:Mr,404:Mr,422:Mr},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:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),body:VLt,responses:{200:YLt,401:Mr,403:Mr,404:Mr},summary:"Archive (soft-delete) or unarchive a project"},synthesizeProject:{method:"POST",path:"/projects/:projectId/summary",pathParams:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:JLt,401:Mr,403:Mr,404:Mr,409:Mr,503:Mr},summary:"Generate (or refresh) the project\u2019s one-paragraph summary from its pinned threads. Persists to projects.summary."},addProjectThread:{method:"POST",path:"/projects/:projectId/threads",pathParams:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),body:ZLt,responses:{201:WLt,401:Mr,403:Mr,404:Mr,409:Mr,422:Mr},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:p.object({projectId:il,threadId:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.object({}),401:Mr,403:Mr,404:Mr},summary:"Remove a thread membership from a project"},listThreadProjects:{method:"GET",path:"/threads/:threadId/projects",pathParams:p.object({threadId:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:eUt,401:Mr},summary:"List the projects a thread belongs to that are visible to the viewer (org/author scope). Returns an empty list when there are none."},deleteProject:{method:"DELETE",path:"/projects/:projectId",pathParams:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.object({}),401:Mr,403:Mr,404:Mr},summary:"Permanently delete a project. Thread memberships and tasks are removed (FK cascade); child docs are detached (project_id set null)."}})});var tUt,$n,sl,KGe,nUt,Hz,$z,rUt,oUt,iUt,YGe,sUt,aUt,JGe,uUt,cUt,lUt,dUt,pUt,fUt,mUt,AUt,gUt,hUt,_Ut,EUt,yUt,SUt,TUt,bUt,IUt,CUt,vUt,RUt,ZGe,yse=B(()=>{"use strict";A();cA();pc();tUt=Su(),$n=p.object({message:p.string()}),sl=p.string().regex(/^reg_[0-9A-Za-z]{22}$/),KGe=p.string().min(1).max(64),nUt=["active","quiet","dormant","archived"],Hz=p.enum(nUt),$z=p.object({id:p.string().min(1),display_name:p.string().min(1),avatar_url:p.string().nullable().optional()}),rUt=p.object({id:p.string().min(1),display_name:p.string().min(1),thread_count:p.number().int().positive()}),oUt=["asked","requested","decided","corrected","shared","requirement"],iUt=p.enum(oUt),YGe=p.object({id:p.string().min(1),kind:iUt,summary:p.string(),thread_id:p.string().min(1),thread_title:p.string(),created_at:p.string().datetime()}),sUt=p.object({decided_14d:p.number().int().nonnegative(),asked_14d:p.number().int().nonnegative()}),aUt=p.object({id:sl,name:p.string().min(1),overlap_score:p.number().min(0).max(1)}),JGe=p.object({thread_id:p.string().min(1),title:p.string().min(1),is_primary:p.boolean(),added_at:p.string().datetime(),added_by:$z}),uUt=p.object({id:sl,name:p.string().min(1),blurb:p.string().nullable(),status:Hz,thread_count:p.number().int().nonnegative(),contributor_count:p.number().int().nonnegative(),comment_count:p.number().int().nonnegative(),contributors_preview:p.array($z).max(3),top_filepath:p.string().nullable(),last_active_at:p.string().datetime(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable()}),cUt=p.object({type:p.literal("list"),list_type:p.literal("region"),objects:p.array(uUt)}),lUt=p.object({status:Hz.optional()}),dUt=p.object({name:p.string().trim().min(1).max(200),blurb:p.string().trim().max(2e3).optional()}),pUt=p.object({id:sl,created_at:p.string().datetime()}),fUt=p.object({name:p.string().trim().min(1).max(200).optional(),blurb:p.string().trim().max(2e3).nullable().optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),mUt=p.object({id:sl,updated_at:p.string().datetime()}),AUt=p.object({archived:p.boolean()}),gUt=p.object({id:sl,status:Hz,archived_at:p.string().datetime().nullable()}),hUt=p.object({id:sl,name:p.string().min(1),blurb:p.string().nullable(),status:Hz,created_by:$z,thread_count:p.number().int().nonnegative(),last_active_at:p.string().datetime(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable(),synthesized_status:p.string().nullable(),synthesized_status_at:p.string().datetime().nullable(),threads:p.array(JGe),contributors:p.array(rUt),decisions:p.object({decided:p.array(YGe),open:p.array(YGe)}),velocity:sUt,cited_by_active_regions:p.array(aUt)}),_Ut=p.object({id:sl,synthesized_status:p.string(),synthesized_status_at:p.string().datetime()}),EUt=p.object({regions_created:p.number().int().nonnegative(),llm_dispatched:p.boolean()}),yUt=p.object({promoted_to_active:p.number().int().nonnegative(),demoted_to_quiet:p.number().int().nonnegative(),demoted_to_dormant:p.number().int().nonnegative()}),SUt=p.object({thread_id:p.string().min(1),region_id:sl,region_name:p.string().min(1),score:p.number().min(0).max(1),signal:p.enum(["file","embedding","combined"])}),TUt=p.object({thread_ids:p.array(p.string().min(1)).min(1).max(50)}),bUt=p.object({type:p.literal("list"),list_type:p.literal("region_suggestion"),objects:p.array(SUt)}),IUt=p.object({thread_id:p.string().min(1),title:p.string(),created_at:p.string().datetime(),author:$z,user_message_count:p.number().int().nonnegative(),comment_count:p.number().int().nonnegative()}),CUt=p.object({type:p.literal("list"),list_type:p.literal("unfiled_thread"),objects:p.array(IUt)}),vUt=p.object({thread_id:KGe}),RUt=JGe,ZGe=tUt.router({listRegions:{method:"GET",path:"/regions",headers:p.object({authorization:p.string().min(1).optional()}),query:lUt,responses:{200:cUt,401:$n,403:$n},summary:"List regions in the authenticated user\u2019s organization"},createRegion:{method:"POST",path:"/regions",headers:p.object({authorization:p.string().min(1).optional()}),body:dUt,responses:{201:pUt,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:p.object({regionId:sl}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:hUt,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:p.object({regionId:sl}),headers:p.object({authorization:p.string().min(1).optional()}),body:fUt,responses:{200:mUt,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:p.object({regionId:sl}),headers:p.object({authorization:p.string().min(1).optional()}),body:AUt,responses:{200:gUt,401:$n,403:$n,404:$n},summary:"Archive or unarchive a region"},addRegionThread:{method:"POST",path:"/regions/:regionId/threads",pathParams:p.object({regionId:sl}),headers:p.object({authorization:p.string().min(1).optional()}),body:vUt,responses:{201:RUt,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:p.object({authorization:p.string().min(1).optional()}),body:TUt,responses:{200:bUt,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:p.object({authorization:p.string().min(1).optional()}),query:p.object({days:p.coerce.number().int().positive().max(180).optional()}),responses:{200:CUt,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:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:yUt,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:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:EUt,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:p.object({regionId:sl}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:_Ut,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:p.object({regionId:sl,threadId:KGe}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.object({}),401:$n,403:$n,404:$n},summary:"Remove a thread membership from a region"}})});var xUt,WGe,DUt,NUt,wUt,BUt,kUt,XGe,Sse=B(()=>{"use strict";A();cA();pc();xUt=Su(),WGe=p.object({message:p.string()}),DUt=p.object({id:p.string().min(1),title:p.string(),href:p.string().min(1),author_display_name:p.string().nullable(),author_handle:p.string().nullable()}),NUt=p.object({name:p.string().min(1),usage_count:p.number().int().nonnegative(),href:p.string().min(1)}),wUt=p.object({id:p.string().min(1),display_name:p.string(),handle:p.string().nullable(),avatar_url:p.string().nullable(),href:p.string().min(1)}),BUt=p.object({type:p.literal("global_search"),threads:p.array(DUt),skills:p.array(NUt),people:p.array(wUt)}),kUt=p.object({q:p.string().trim().min(1).max(80)}),XGe=xUt.router({globalSearch:{method:"GET",path:"/search",headers:p.object({authorization:p.string().min(1).optional()}),query:kUt,responses:{200:BUt,401:WGe,422:WGe},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 Vjn,Yjn,Kjn,xo,OUt,PUt,MUt,LUt,Tse,Jjn,eje=B(()=>{"use strict";A();pc();Gz();OO();Vjn=p.enum(["thread","org","user","public"]),Yjn=p.discriminatedUnion("kind",[p.object({kind:p.literal("thread"),id:p.string().min(1)}),p.object({kind:p.literal("org"),id:p.string().min(1)}),p.object({kind:p.literal("user"),id:p.string().min(1)}),p.object({kind:p.literal("public"),id:p.string().min(1)})]),Kjn=p.enum(["thread.created","thread.completed","thread.block.appended","thread.comment.created","thread.comment.updated","thread.comment.deleted","thread.vote.cast","thread.vote.cleared","thread.participant.joined","thread.participant.left","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"]),xo=p.object({id:p.string().min(1),subjects:p.array(p.string().min(1)).min(1),actor_user_id:p.string().min(1).nullable(),created_at:p.string().datetime()}),OUt=p.object({thread_id:p.string().min(1),title:p.string(),author_id:p.string().min(1),created_at:p.string().datetime()}),PUt=p.enum(["user","assistant","tool","progress","system"]),MUt=p.enum(["claude_global","agents_global","claude_project","agents_project"]),LUt=p.literal("workspace"),Tse=p.object({skill_id:p.string().min(1),name:p.string().min(1),root_kind:MUt,version:p.number().int().positive(),content_hash:p.string().startsWith("md5:")}),Jjn=p.discriminatedUnion("type",[xo.extend({type:p.literal("thread.created"),payload:OUt}),xo.extend({type:p.literal("thread.completed"),payload:p.object({thread_id:p.string().min(1),completed_at:p.string().datetime()})}),xo.extend({type:p.literal("thread.block.appended"),payload:p.object({thread_id:p.string().min(1),block_id:p.string().min(1),block_type:PUt,excerpt:p.string().nullable()})}),xo.extend({type:p.literal("thread.comment.created"),payload:p.object({comment:p.lazy(()=>mA)})}),xo.extend({type:p.literal("thread.comment.updated"),payload:p.object({comment:p.lazy(()=>mA)})}),xo.extend({type:p.literal("thread.comment.deleted"),payload:p.object({thread_id:p.string().min(1),comment_id:p.string().min(1)})}),xo.extend({type:p.literal("thread.vote.cast"),payload:p.object({thread_id:p.string().min(1),vote_count:p.number().int().nonnegative()})}),xo.extend({type:p.literal("thread.vote.cleared"),payload:p.object({thread_id:p.string().min(1),vote_count:p.number().int().nonnegative()})}),xo.extend({type:p.literal("thread.participant.joined"),payload:p.object({thread_id:p.string().min(1),participant_user_id:p.string().min(1),role:p.enum(["owner","member"])})}),xo.extend({type:p.literal("thread.participant.left"),payload:p.object({thread_id:p.string().min(1),participant_user_id:p.string().min(1)})}),xo.extend({type:p.literal("user.followed"),payload:p.object({followee_id:p.string().min(1),followee_handle:p.string().nullable(),followee_display_name:p.string().nullable()})}),xo.extend({type:p.literal("user.joined"),payload:p.object({organization_id:p.string().min(1).nullable(),organization_name:p.string().nullable()})}),xo.extend({type:p.literal("user.presence"),payload:p.object({status:p.literal("online")})}),xo.extend({type:p.literal("entity.created"),payload:p.object({entity_id:p.string().min(1),kind:Lf,slug:p.string().min(1),name:p.string().min(1)})}),xo.extend({type:p.literal("entity.updated"),payload:p.object({entity_id:p.string().min(1),kind:Lf,changed_fields:p.array(p.string()).min(1),actor:p.enum(["agent","human"])})}),xo.extend({type:p.literal("entity.archived"),payload:p.object({entity_id:p.string().min(1),kind:Lf})}),xo.extend({type:p.literal("entity.thread_attached"),payload:p.object({entity_id:p.string().min(1),kind:Lf,thread_id:p.string().min(1),role:p.string().min(1),score:p.number().nullable()})}),xo.extend({type:p.literal("entity.thread_detached"),payload:p.object({entity_id:p.string().min(1),kind:Lf,thread_id:p.string().min(1),role:p.string().min(1)})}),xo.extend({type:p.literal("entity.linked"),payload:p.object({from_id:p.string().min(1),to_id:p.string().min(1),edge_kind:Gx})}),xo.extend({type:p.literal("entity.superseded"),payload:p.object({superseding_id:p.string().min(1),supersedes_id:p.string().min(1)})}),xo.extend({type:p.literal("skill.published"),payload:Tse.extend({visibility:LUt})}),xo.extend({type:p.literal("skill.version.accepted"),payload:Tse}),xo.extend({type:p.literal("skill.version.proposed"),payload:Tse.extend({owner_user_id:p.string().min(1),proposer_user_id:p.string().min(1)})}),xo.extend({type:p.literal("skill.version.rejected"),payload:p.object({skill_id:p.string().min(1),version:p.number().int().positive(),reviewer_user_id:p.string().min(1),proposer_user_id:p.string().min(1)})}),xo.extend({type:p.literal("skill.installation.deleted"),payload:p.object({skill_id:p.string().min(1),installation_id:p.string().min(1),user_id:p.string().min(1)})})])});var UUt,QUt,czn,FUt,GUt,lzn,q,jUt,dje,pje,fje,zUt,HUt,$Ut,tje,qUt,VUt,mje,YUt,KUt,JUt,ZUt,WUt,XUt,eQt,tQt,Aje,nQt,rQt,oQt,iQt,gje,Kz,sQt,aQt,uQt,cQt,lQt,dQt,pQt,fQt,mQt,AQt,gQt,hQt,_Qt,EQt,yQt,SQt,vse,hje,TQt,bQt,IQt,CQt,_je,vQt,RQt,xQt,DQt,NQt,wQt,Uf,BQt,kQt,OQt,PQt,MQt,LO,XE,LQt,UQt,Eje,Rse,dzn,bse,QQt,FQt,Jz,GQt,yje,Sje,jQt,PO,xse,nje,zQt,Tje,rje,HQt,$Qt,mA,qQt,VQt,YQt,KQt,JQt,ZQt,pzn,WQt,XQt,eFt,tFt,Dse,bje,nFt,rFt,oFt,iFt,sFt,aFt,Ije,uFt,cFt,lFt,dFt,pFt,fFt,mFt,Ise,AFt,gFt,hFt,MO,_Ft,EFt,yFt,SFt,TFt,bFt,IFt,CFt,vFt,RFt,xFt,DFt,NFt,wFt,oje,BFt,kFt,OFt,PFt,MFt,LFt,UFt,QFt,FFt,GFt,jFt,Vz,zFt,Cje,HFt,$Ft,qFt,VFt,YFt,KFt,JFt,ZFt,Zz,WFt,XFt,e4t,vje,t4t,n4t,r4t,o4t,i4t,s4t,a4t,u4t,c4t,ije,l4t,sje,d4t,p4t,f4t,m4t,A4t,g4t,h4t,_4t,E4t,y4t,S4t,Rje,T4t,b4t,I4t,C4t,v4t,R4t,xje,x4t,D4t,N4t,w4t,Dje,Nje,B4t,k4t,O4t,P4t,aje,M4t,L4t,U4t,Q4t,qz,F4t,G4t,j4t,z4t,H4t,$4t,q4t,V4t,Y4t,K4t,J4t,Z4t,W4t,jx,wje,Cse,X4t,e3t,t3t,n3t,r3t,uje,Yz,o3t,i3t,s3t,a3t,u3t,c3t,l3t,d3t,p3t,f3t,m3t,WE,cje,A3t,g3t,h3t,_3t,E3t,y3t,S3t,T3t,b3t,I3t,C3t,v3t,R3t,x3t,D3t,N3t,w3t,B3t,k3t,O3t,P3t,lje,M3t,Bje,L3t,U3t,Q3t,F3t,G3t,Wz,OO=B(()=>{"use strict";A();SFe();cA();pc();Fz();mse();Ase();gse();Ese();yse();Sse();eje();fse();Ese();yse();mse();Fz();gse();Ase();Sse();UUt=Su(),QUt=["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"],czn=new Set(QUt),FUt=p.object({id:p.string().uuid(),role:p.enum(["user","assistant"]),content:p.string().min(1),timestamp:p.string().datetime()}),GUt=p.object({id:p.string().uuid(),title:p.string().min(1),author:p.string().min(1),authorAvatar:p.string().min(1).max(4),model:p.string().min(1),turnCount:p.number().int().nonnegative(),createdAt:p.string().datetime(),preview:p.string()}),lzn=GUt.extend({messages:p.array(FUt)}),q=p.object({message:p.string()}),jUt=/^[a-zA-Z0-9_-]{2,32}$/,dje=p.string().regex(jUt,"Handle must be 2\u201332 characters: letters, numbers, dashes, or underscores."),pje=p.enum(["friend","events","twitter","linkedin","hacker_news","reddit","discord","youtube","google","ai_search","other"]),fje=p.object({id:p.string(),first_name:p.string().min(1),last_name:p.string().min(1),display_name:p.string().min(1),handle:p.string().nullable(),bio:p.string().max(280).nullable(),avatar_url:p.string().nullable(),banner_url:p.string().nullable(),share_new_threads_to_workspace:p.boolean(),experimental_features_enabled:p.boolean(),onboarded_at:p.string().nullable(),attribution_source:pje.nullable(),attribution_source_detail:p.string().nullable()}),zUt=p.object({email:p.string().nullable(),name:p.string().nullable(),handle:p.string().nullable(),created_at:p.string(),onboarded_at:p.string().nullable(),is_admin:p.boolean(),referred_by_user_id:p.string().nullable(),plan_tier:p.enum(["free","creator","team"]),organization_id:p.string().nullable(),signup_source:p.enum(["referral","organic"]),first_upload_at:p.string().nullable(),first_share_at:p.string().nullable(),first_cli_auth_at:p.string().nullable(),first_plugin_activated_at:p.string().nullable(),first_plugin_agent:p.string().nullable()}),HUt=p.object({group_key:p.string().min(1),properties:p.object({name:p.string(),plan_tier:p.enum(["free","creator","team"]),seat_count:p.number().int().nonnegative(),created_at:p.string(),email_domains:p.array(p.string()),default_thread_visibility:p.string(),member_count:p.number().int().nonnegative().nullable()})}),$Ut=p.object({authProviderUserId:p.string().min(1).optional(),organizationId:p.string().min(1).optional(),org_name:p.string().min(1).optional(),organizations:p.array(p.object({id:p.string().min(1),name:p.string().min(1)})),emailAddress:p.string().email(),name:p.string().nullable(),user:fje,is_admin:p.boolean(),is_new_signup:p.boolean(),posthog:p.object({user_properties:zUt,organization:HUt.nullable()})}),tje=p.object({workos_client_id:p.string().min(1),workos_api_origin:p.string().url()}),qUt=p.object({share_new_threads_to_workspace:p.boolean().optional(),experimental_features_enabled:p.boolean().optional(),onboarded_at:p.union([p.literal("now"),p.null()]).optional(),attribution_source:pje.nullable().optional(),attribution_source_detail:p.string().max(280).nullable().optional(),display_name:p.string().min(1).max(120).optional(),handle:dje.optional(),bio:p.string().max(280).nullable().optional(),avatar_storage_url:p.string().min(1).nullable().optional(),banner_storage_url:p.string().min(1).nullable().optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),VUt=p.object({id:p.string(),display_name:p.string(),handle:p.string().nullable(),avatar_url:p.string().nullable(),visible_thread_count:p.number().int().nonnegative(),last_active_at:p.string().datetime().nullable(),product_last_seen_at:p.string().datetime().nullable()}),mje=p.object({id:p.string().min(1),display_name:p.string().min(1),handle:p.string().nullable(),bio:p.string().max(280).nullable(),avatar_url:p.string().nullable(),banner_url:p.string().nullable(),organization_name:p.string().min(1).nullable(),created_at:p.string().min(1),visible_thread_count:p.number().int().nonnegative(),follower_count:p.number().int().nonnegative(),following_count:p.number().int().nonnegative(),published_project_count:p.number().int().nonnegative(),is_following:p.boolean(),is_self:p.boolean()}),YUt=p.object({type:p.literal("list"),list_type:p.literal("organization_member"),objects:p.array(VUt)}),KUt=p.object({email_address:p.string().email()}),JUt=p.object({email_address:p.string().email(),invitation_id:p.string().min(1)}),ZUt=p.object({organization_id:p.string().min(1),organization_name:p.string().min(1),domain:p.string().min(1),created:p.boolean()}),WUt=p.object({location:p.string().trim().min(1),contact:p.string().trim().email()}),XUt=p.object({name:p.string().trim().min(1).max(100).describe("Sender's name"),email:p.string().trim().email().max(200).describe("Reply-to email"),message:p.string().trim().min(1).max(5e3).describe("Message body"),company:p.string().max(200).optional()}),eQt=p.object({ok:p.boolean()}),tQt=p.object({location:p.string().min(1),contact:p.string().email(),created_at:p.string().datetime()}),Aje=p.enum(["general","bug","feature_request","question"]),nQt=p.object({type:Aje,message:p.string().trim().min(1).max(5e3)}),rQt=p.object({id:p.string().min(1),type:Aje,message:p.string().min(1),created_at:p.string().datetime()}),oQt=p.object({path_glob:p.string().min(1),name:p.string().min(1),description:p.string().min(1)}),iQt=p.object({repo_origin_path:p.string().min(1),building_blocks:p.array(oQt)}),gje=p.string().regex(/^th_[0-9A-Za-z]{22}$/),Kz=p.string().regex(/^tb_[0-9A-Za-z]{22}$/),sQt=p.object({id:gje,author:p.object({id:p.string().min(1),display_name:p.string().min(1)}),title:p.string().min(1),excerpt:p.string(),created_at:p.string().datetime(),repo_origin_path:p.string().min(1),latest_revision_id:Kz,revision_count:p.number().int().positive()}),aQt=p.object({id:p.string().min(1),display_name:p.string().min(1)}),uQt=p.object({id:p.string().min(1),author_id:p.string().min(1).nullable(),author:aQt.nullable(),created_at:p.string().datetime(),deleted_at:p.string().datetime().nullable(),content:p.string().min(1)}),cQt=p.object({id:p.string().min(1),thread_block_id:p.string().min(1),created_at:p.string().datetime(),resolved_at:p.string().datetime().nullable(),comments:p.array(uQt)}),lQt=p.object({thread_block_id:Kz,from_position:p.number().int().positive(),to_position:p.number().int().positive(),selected_text:p.string().min(1),content:p.string().trim().min(1)}),dQt=p.object({id:p.string().min(1)}),pQt=p.object({content:p.string().trim().min(1)}),fQt=p.object({id:p.string().min(1)}),mQt=p.object({content:p.string().trim().min(1)}),AQt=p.object({id:p.string().min(1)}),gQt=p.object({content:p.string().trim().min(1)}),hQt=p.object({id:p.string().min(1)}),_Qt=p.object({resolved:p.boolean()}),EQt=p.object({id:p.string().min(1),resolved_at:p.string().datetime().nullable()}),yQt=p.object({resolved:p.boolean()}),SQt=p.object({id:p.string().min(1),resolved_at:p.string().datetime().nullable()}),vse=p.record(p.string(),p.unknown()),hje=p.object({id:Kz,body:p.string().nullable(),created_at:p.string().datetime(),prosemirror_json:vse.nullable(),comment_threads:p.array(cQt)}),TQt=hje.extend({body:p.string(),prosemirror_json:vse}),bQt=p.object({id:gje,created_at:p.string().datetime(),repo_origin_path:p.string().min(1),author:p.object({id:p.string().min(1),display_name:p.string().min(1)}),latest_revision_id:Kz,revision_count:p.number().int().positive(),revisions:p.array(hje)}),IQt=p.object({type:p.literal("list"),list_type:p.literal("plan"),has_more:p.boolean(),objects:p.array(sQt)}),CQt=p.object({before:p.string().min(1).optional(),after:p.string().min(1).optional(),author_id:p.string().min(1).optional(),repo_origin_path:p.string().min(1).optional()}),_je=p.object({id:p.string().min(1),organization_id:p.string().min(1).nullable(),created_at:p.string().min(1),repo_origin_path:p.string().min(1),path_glob:p.string().min(1),name:p.string().min(1),description:p.string().min(1)}),vQt=p.array(_je),RQt=p.object({type:p.literal("list"),list_type:p.literal("building_block"),has_more:p.boolean(),objects:p.array(_je)}),xQt=p.object({repo_origin_path:p.string().min(1),before:p.string().min(1).optional(),after:p.string().min(1).optional()}),DQt=p.enum(["thread","building_block"]),NQt=p.object({repo_origin_path:p.string().min(1),sources:p.array(DQt).nonempty()}),wQt=p.object({type:p.literal("list"),list_type:p.literal("repository"),has_more:p.boolean(),objects:p.array(NQt)}),Uf=p.enum(["claudeCode","codex","amp","lore","cursor","cowork","unspecified"]),BQt=p.enum(["claudeCode","codex","amp","cursor","cowork","unspecified"]),kQt=p.object({uploads:p.array(p.string()),outputs:p.array(p.string())}),OQt=p.object({connected:p.boolean(),last_upload_at:p.string().nullable(),harnesses:p.array(Uf)}),PQt=["transcript","plan"],MQt=p.enum(PQt),LO=p.literal("workspace"),XE=p.enum(["claude_global","agents_global","claude_project","agents_project"]),LQt=p.object({name:p.string().min(1),description:p.string().nullable(),root_kind:XE,file_path:p.string().min(1),also_seen_at:p.array(p.string().min(1)),skill_id:p.string().min(1).optional(),local_content_hash:p.string().startsWith("md5:").optional()}),UQt=p.object({skill_id:p.string().min(1),name:p.string().min(1),description:p.string().nullable(),file_path:p.string().min(1),manifest_path:p.string().min(1)}),Eje=p.object({type:p.literal("local_skill_scanner_output"),skills:p.record(p.string(),p.array(LQt)),cowork_skills:p.record(p.string(),p.array(UQt))}),Rse=p.enum(["accepted","proposed","rejected","superseded"]),dzn=p.enum(["initial_publish","owner_update","subscriber_update"]),bse=p.object({md5:p.string().min(1).describe("Raw hex MD5 used to verify uploaded SKILL.md bytes"),name:p.string().min(1).describe("Skill directory/name, e.g. code-review"),filename:p.string().min(1).describe("Upload object filename, usually <name>/SKILL.md").optional(),description:p.string().nullable().describe("Optional skill description extracted from frontmatter").optional(),root_kind:XE.describe("Local root kind where this skill file came from"),base_version:p.number().int().positive().describe("Installed base version for local edits").optional()}),QQt=p.discriminatedUnion("sync_action",[bse.extend({sync_action:p.literal("initial_publish").describe("Publish a local skill without an existing server skill ID"),skill_id:p.never().optional()}),bse.extend({sync_action:p.literal("owner_update").describe("Publish an accepted update to an owned skill"),skill_id:p.string().min(1).describe("Existing skill ID for owner updates")}),bse.extend({sync_action:p.literal("subscriber_update").describe("Propose an update to an installed workspace skill"),skill_id:p.string().min(1).describe("Existing skill ID for subscriber update proposals")})]),FQt=p.object({md5:p.string().min(1),harness:BQt,filename:p.string().min(1).optional(),repo_origin_path:p.string().min(1).optional(),harness_internal_id:p.string().min(1).optional(),file_type:MQt.optional(),artifact_metadata:kQt.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"}),Jz=p.object({id:p.string().min(1),display_name:p.string().min(1),avatar_url:p.string().nullable()}),GQt=p.object({id:p.string().min(1),display_name:p.string().min(1)}),yje=p.object({id:p.string().min(1),author_id:p.string().min(1).nullable(),author:GQt.nullable(),created_at:p.string().datetime(),deleted_at:p.string().datetime().nullable(),content:p.string().min(1)}),Sje=p.object({id:p.string().min(1),thread_block_id:p.string().min(1),created_at:p.string().datetime(),resolved_at:p.string().datetime().nullable()}),jQt=Sje.extend({comments:p.array(yje)}),PO=p.object({id:p.string().min(1),type:p.string().min(1),index_in_thread:p.number().int().nonnegative(),isCritiqued:p.boolean(),comment_threads:p.array(jQt).optional()}).passthrough(),xse=p.object({type:p.literal("list"),list_type:p.literal("thread_block"),has_more:p.boolean(),objects:p.array(PO)}),nje=PO.extend({type:p.literal("plan"),prosemirror_json:vse,thread_file_id:p.string().min(1)}),zQt=p.union([p.literal(-1),p.literal(1)]),Tje=p.union([p.literal(-1),p.literal(0),p.literal(1)]),rje=p.object({score:p.number().int(),up_count:p.number().int().nonnegative(),down_count:p.number().int().nonnegative(),viewer_vote:Tje}),HQt=p.object({value:zQt}),$Qt=p.object({id:p.string().min(1),display_name:p.string().min(1),avatar_url:p.string().nullable()}),mA=p.object({id:p.string().min(1),thread_id:p.string().min(1),author_id:p.string().min(1).nullable(),author:$Qt.nullable(),parent_comment_id:p.string().min(1).nullable(),content:p.string(),created_at:p.string().datetime(),updated_at:p.string().datetime(),deleted_at:p.string().datetime().nullable()}),qQt=p.object({type:p.literal("list"),list_type:p.literal("thread_comment"),objects:p.array(mA)}),VQt=p.object({content:p.string().trim().min(1).max(4e3),parent_comment_id:p.string().min(1).optional()}),YQt=mA,KQt=p.object({content:p.string().trim().min(1).max(4e3)}),JQt=mA,ZQt=mA,pzn=p.discriminatedUnion("kind",[p.object({kind:p.literal("created"),thread_id:p.string().min(1),actor_user_id:p.string().min(1),version:p.number(),comment:mA}),p.object({kind:p.literal("updated"),thread_id:p.string().min(1),actor_user_id:p.string().min(1),version:p.number(),comment:mA}),p.object({kind:p.literal("deleted"),thread_id:p.string().min(1),actor_user_id:p.string().min(1),version:p.number(),comment:mA})]),WQt=p.enum(["pending","generating","ready","failed"]),XQt=p.enum(["pending","generating","ready","failed"]),eFt=p.enum(["pending","placeholder","ai","user","command","harness"]),tFt=p.enum(["pending","generating","ready","failed"]),Dse=p.enum(["pending","generating","ready","failed","disabled"]),bje=p.enum(["pending","generating","ready","failed"]),nFt=p.object({title:p.string().min(1),body:p.string().min(1),files:p.array(p.string()).optional()}),rFt=p.object({status:Dse,url:p.string().nullable(),url_expires_at:p.string().nullable(),generated_at:p.string().nullable(),model:p.string().nullable()}),oFt=p.object({status:bje,steps:p.array(nFt),generated_at:p.string().nullable()}),iFt=p.object({cover:rFt,how_to:oFt}),sFt=p.object({id:p.string().min(1),title:p.string().min(1),author:p.object({id:p.string().min(1),display_name:p.string(),handle:p.string().nullable(),avatar_url:p.string().nullable()}),cover:p.object({url:p.string(),url_expires_at:p.string()}),started_at:p.string(),cover_generated_at:p.string()}),aFt=p.object({type:p.literal("list"),list_type:p.literal("card_feed_item"),has_more:p.boolean(),objects:p.array(sFt)}),Ije=p.enum(["asked","requested","decided","corrected","shared","requirement"]),uFt=p.object({id:p.string().min(1),kind:Ije,summary:p.string().min(1),block_id:p.string().min(1)}),cFt=p.object({block_id:p.string().min(1),status:tFt,generated_at:p.string().nullable()}),lFt=p.object({type:p.literal("list"),list_type:p.literal("thread_decision"),objects:p.array(uFt),block_statuses:p.array(cFt)}),dFt=p.object({forker_intent:p.string().min(1).max(2e3).describe("What the forking user wants to do next with this session")}),pFt=p.object({source_thread_id:p.string().min(1),forker_intent:p.string(),source_distilled:p.string().min(1).describe("Intent-conditioned handoff summary of the source thread for a new agent")}),fFt=p.object({question:p.string().trim().min(1).max(2e3).describe("Question to answer from visible Lore thread decisions and titles")}),mFt=p.object({id:p.string().min(1),kind:Ije,summary:p.string().min(1),block_id:p.string().min(1)}),Ise=p.object({thread_id:p.string().min(1),title:p.string().min(1),summary:p.string().nullable(),started_at:p.string().datetime(),score:p.number(),matched_by:p.enum(["summary","decision","thread"]),decisions:p.array(mFt)}),AFt=p.object({id:p.string().min(1),kind:p.enum(["agent","tool","retrieval","answer","sources"]),title:p.string().min(1),status:p.enum(["completed"]),summary:p.string().min(1),duration_ms:p.number().nonnegative().optional(),metadata:p.object({retrieved_decisions:p.number().int().nonnegative().optional(),returned_sources:p.number().int().nonnegative().optional(),cited_sources:p.number().int().nonnegative().optional(),matched_sources:p.array(Ise).optional(),searched_query:p.string().min(1).optional(),since:p.string().min(1).optional(),until:p.string().min(1).optional(),thread_id:p.string().min(1).optional(),thread_ids:p.array(p.string().min(1)).optional(),question:p.string().min(1).optional()}).optional()}),gFt=p.object({steps:p.array(AFt)}),hFt=p.object({answer:p.string(),sources:p.array(Ise),matched_sources:p.array(Ise).describe("Threads matched by the vector decision search before citation filtering"),searched_query:p.string().describe("String embedded for the vector decision search"),trace:gFt.optional()}),MO=p.object({id:p.string().min(1),thread_file_id:p.string().min(1),organization_id:p.string().min(1).nullable(),deleted_at:p.string().datetime().nullable(),author:Jz,repo:p.string().min(1),title:p.string().min(1),started_at:p.string().min(1),last_activity_at:p.string().datetime().nullable(),blocks:xse,user_message_count:p.number().int().nonnegative(),files_touched:p.array(p.string()),skills_invoked:p.array(p.string()),slash_commands_invoked:p.array(p.string()),harness:Uf,transcript_parsing_state:p.enum(["pending","parsed","too_large_to_parse","failed"]),visibility:p.enum(["private","workspace","public"]),has_plan:p.boolean().optional(),summary:p.string().nullable(),summary_status:WQt,summary_generated_at:p.string().nullable(),title_status:XQt,title_generated_at:p.string().nullable(),title_source:eFt,score:p.number().int(),up_count:p.number().int().nonnegative(),down_count:p.number().int().nonnegative(),viewer_vote:Tje,comment_count:p.number().int().nonnegative(),is_favorited:p.boolean(),card:iFt}),_Ft=p.object({storage_url:p.string().min(1)}),EFt=p.object({storage_url:p.string().min(1)}),yFt=p.object({storage_url:p.string(),harness:Uf,thread:MO.nullable()}),SFt=p.object({status:p.literal("complete"),thread_files:p.array(yFt),skill_files:p.array(p.object({storage_url:p.string(),skill:p.object({id:p.string(),name:p.string(),version:p.number().int().positive(),latest_version:p.number().int().positive(),visibility:LO,root_kind:XE,version_status:Rse.optional(),content_hash:p.string()}).nullable()})).optional()}),TFt=p.object({id:p.string(),presigned_url:p.string().nullable(),presigned_url_expires_at:p.string().nullable(),storage_url:p.string(),harness:Uf,expected_md5:p.string(),error:p.string().nullable(),thread:MO.nullable()}),bFt=p.object({id:p.string(),presigned_url:p.string().nullable(),presigned_url_expires_at:p.string().nullable(),storage_url:p.string(),expected_md5:p.string(),name:p.string(),error:p.string().nullable()}),IFt=p.object({id:p.string(),substrate:p.enum(["s3","filesystem"]),status:p.enum(["incomplete","locked_for_parsing","complete","error"]),thread_files:p.array(TFt),skill_files:p.array(bFt).optional()}),CFt=p.object({query:p.string().min(1).describe("Natural-language description of the block or block range to highlight")}),vFt=p.object({thread_id:p.string(),url:p.string().url(),start_block_id:p.string().nullable(),end_block_id:p.string().nullable(),matched:p.boolean()}),RFt=p.object({}),xFt=p.object({thread_id:p.string().min(1)}),DFt=p.object({visibility:p.enum(["private","workspace","public"]).optional(),title:p.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"}),NFt=p.discriminatedUnion("visibility",[p.object({visibility:p.literal("private")}),p.object({visibility:p.literal("workspace")}),p.object({visibility:p.literal("public"),title:p.string().min(1),author_display_name:p.string().min(1),author_avatar_url:p.string().nullable(),first_user_message:p.string().nullable(),summary:p.string().nullable(),started_at:p.string().min(1),harness:Uf,cover_url:p.string().nullable()})]),wFt=p.object({id:p.string().min(1),author:Jz,repo:p.string().min(1),title:p.string().min(1),started_at:p.string().min(1),last_activity_at:p.string().datetime().nullable(),blocks:xse,user_message_count:p.number().int().nonnegative(),comment_count:p.number().int().nonnegative(),files_touched:p.array(p.string()),skills_invoked:p.array(p.string()),harness:Uf,visibility:p.enum(["private","workspace","public"]),has_plan:p.boolean().optional(),is_favorited:p.boolean(),participants:p.array(p.object({id:p.string().min(1),display_name:p.string(),avatar_url:p.string().nullable()})).optional()}),oje=p.object({type:p.literal("list"),list_type:p.literal("thread"),has_more:p.boolean(),objects:p.array(wFt)}),BFt=p.enum(["recent","popular"]),kFt=p.enum(["everyone","following"]),OFt=MO,PFt=p.object({type:p.literal("list"),list_type:p.literal("discover_thread"),has_more:p.boolean(),objects:p.array(OFt)}),MFt=p.object({before:p.string().min(1).optional(),after:p.string().min(1).optional(),sort:BFt.optional(),scope:kFt.optional(),harness:Uf.optional(),search:p.string().max(200).optional()}),LFt=p.object({thread_count:p.number().int().nonnegative(),author_count:p.number().int().nonnegative(),organization_count:p.number().int().nonnegative(),harness_breakdown:p.record(p.string(),p.number().int().nonnegative()).refine(e=>Object.keys(e).every(t=>Uf.safeParse(t).success),"Harness breakdown keys must be known harness values")}),UFt=p.object({id:p.string(),status:p.enum(["incomplete","locked_for_parsing","complete","error"]),created_at:p.string(),thread_count:p.number().int().nonnegative(),skill_count:p.number().int().nonnegative().default(0),thread_ids:p.array(p.string()).default([])}),QFt=p.object({type:p.literal("list"),list_type:p.literal("upload_session"),objects:p.array(UFt)}),FFt=p.object({before:p.string().min(1).optional(),after:p.string().min(1).optional()}),GFt=p.object({before:p.string().min(1).optional(),after:p.string().min(1).optional(),author_ids:p.string().min(1).optional(),created_at:p.string().min(1).optional(),filepath_prefixes:p.string().min(1).optional(),decision_kinds:p.string().min(1).optional().describe("Comma-separated decision kinds (asked, requested, decided, corrected, shared, requirement); returns threads with at least one matching decision."),q:p.string().trim().min(1).max(200).optional()}),jFt=p.object({path:p.string().min(1),start_offset:p.number().int().nonnegative(),end_offset:p.number().int().positive()}),Vz=p.object({id:p.string(),display_name:p.string(),avatar_url:p.string().nullable()}),zFt=p.object({before:p.string().min(1).optional().describe("Skill ID cursor. Returns skills newer than this cursor in descending created_at order."),after:p.string().min(1).optional().describe("Skill ID cursor. Returns skills older than this cursor in descending created_at order.")}),Cje=p.object({id:p.string(),name:p.string(),description:p.string().nullable(),visibility:LO,root_kind:XE,latest_version:p.number().int().nonnegative().nullable(),content_hash:p.string().nullable(),has_content:p.boolean(),owner:Vz.nullable(),usage_count:p.number().int().nonnegative(),author_count:p.number().int().nonnegative(),first_used_at:p.string().nullable(),last_used_at:p.string().nullable()}),HFt=p.object({type:p.literal("list"),list_type:p.literal("skill"),has_more:p.boolean(),objects:p.array(Cje)}),$Ft=p.object({skill_ids:p.string().optional().describe("Comma-separated local Lore skill IDs, e.g. sk_...,sk_..."),content_hashes:p.string().optional().describe("Comma-separated local SKILL.md content hashes, e.g. md5:...,md5:...")}),qFt=Cje.pick({id:!0,name:!0,description:!0,visibility:!0,root_kind:!0,latest_version:!0,content_hash:!0,has_content:!0,owner:!0}),VFt=p.object({type:p.literal("local_skill_reconciliation"),objects:p.array(qFt)}),YFt=p.object({id:p.string(),title:p.string(),visibility:p.enum(["private","workspace","public"]),started_at:p.string(),author:Jz,skills_invoked:p.array(p.string())}),KFt=p.object({version:p.number().int().positive().describe("Version timestamp for this SKILL.md body"),content_hash:p.string().describe("Content-addressed skill body hash, prefixed by hash type"),status:Rse.describe("Review status for this skill version"),created_at:p.string().describe("ISO-8601 timestamp when this version was uploaded"),created_by:Vz.nullable().describe("User who uploaded/proposed this version, when known"),reviewed_at:p.string().nullable().describe("ISO-8601 timestamp when the owner reviewed this version"),reviewed_by:Vz.nullable().describe("Owner who approved or rejected this version"),rejection_reason:p.string().nullable().describe("Owner-provided rejection reason for rejected versions")}),JFt=p.object({id:p.string(),name:p.string(),description:p.string().nullable(),visibility:LO,root_kind:XE,latest_version:p.number().int().nonnegative().nullable(),content_hash:p.string().nullable(),owner:Vz.nullable(),usage_count:p.number().int().nonnegative(),author_count:p.number().int().nonnegative(),first_used_at:p.string().nullable(),last_used_at:p.string().nullable(),versions:p.array(KFt),threads:p.array(YFt)}),ZFt=p.enum(["cowork","native"]),Zz=p.enum(["upload","output"]),WFt=p.enum(["private","workspace","public"]),XFt=p.object({id:p.string(),display_name:p.string(),avatar_url:p.string().nullable()}),e4t=p.object({scope:p.enum(["mine","workspace"]).optional().describe("`mine` (default) returns artifacts you authored; `workspace` returns all visible artifacts in your org."),thread_id:p.string().optional().describe("Restrict to artifacts produced by a single thread, e.g. th_..."),author_ids:p.string().optional().describe("Comma-separated user IDs to filter by author, e.g. user_...,user_..."),before:p.string().min(1).optional().describe("Artifact ID cursor. Returns artifacts newer than this cursor in descending created_at order."),after:p.string().min(1).optional().describe("Artifact ID cursor. Returns artifacts older than this cursor in descending created_at order.")}),vje=p.object({id:p.string(),thread_id:p.string(),thread_title:p.string(),source:ZFt,kind:Zz,file_name:p.string(),mime_type:p.string().nullable(),size_in_bytes:p.number().int().nonnegative().nullable(),content_hash:p.string().nullable(),visibility:WFt,owner:XFt.nullable(),created_at:p.string(),updated_at:p.string()}),t4t=p.object({type:p.literal("list"),list_type:p.literal("artifact"),has_more:p.boolean(),objects:p.array(vje)}),n4t=vje.extend({download_url:p.string().describe("Presigned, time-limited URL to download the artifact bytes."),download_url_expires_at:p.string().describe("ISO-8601 expiry for download_url.")}),r4t=p.object({kind:Zz,file_name:p.string(),md5:p.string(),size_in_bytes:p.number().int().nonnegative(),content_type:p.string().nullable().optional()}),o4t=p.object({harness:p.string().describe("Harness of the source session, e.g. cowork"),harness_internal_id:p.string().describe("Source session id (threads.harness_internal_id)"),artifact_files:p.array(r4t).min(1)}),i4t=p.object({thread_id:p.string(),artifact_files:p.array(p.object({kind:Zz,file_name:p.string(),presigned_url:p.string().nullable(),storage_url:p.string()}))}),s4t=p.object({harness:p.string(),harness_internal_id:p.string(),artifacts:p.array(p.object({kind:Zz,file_name:p.string(),storage_url:p.string(),md5:p.string(),size_in_bytes:p.number().int().nonnegative(),content_type:p.string().nullable().optional()})).min(1)}),a4t=p.object({thread_id:p.string(),created:p.number().int().nonnegative().describe("Number of artifact rows created or updated.")}),u4t=p.object({id:p.string(),name:p.string(),visibility:LO,root_kind:XE,latest_version:p.number().int().nonnegative(),content_hash:p.string()}),c4t=p.object({installation_id:p.string(),already_registered:p.boolean(),body_md_url:p.string(),skill:u4t}),ije=p.object({id:p.string(),skill_id:p.string(),installed_version:p.number().int().nonnegative().nullable(),already_registered:p.boolean().optional()}),l4t=p.object({installed_version:p.number().int().nonnegative().describe("Accepted skill version that was successfully written locally")}),sje=p.object({id:p.string(),name:p.string(),version:p.number().int().positive(),latest_version:p.number().int().positive(),visibility:LO,root_kind:XE,version_status:Rse,content_hash:p.string()}),d4t=p.object({id:p.string(),unpublished:p.literal(!0)}),p4t=p.object({reason:p.string().optional().describe("Optional owner-provided reason for rejecting the proposed version")}),f4t=p.object({id:p.string(),skill_id:p.string(),name:p.string(),description:p.string().nullable(),root_kind:XE,latest_version:p.number().int().nonnegative(),latest_content_hash:p.string(),installed_version:p.number().int().nonnegative().nullable()}),m4t=p.object({type:p.literal("list"),list_type:p.literal("skill_installation_sync"),has_more:p.boolean(),objects:p.array(f4t)}),A4t=p.object({path:p.string().min(1),text:p.string().max(64e3)}),g4t=p.enum(["text_edit","redact","delete_block"]),h4t=p.object({id:p.string(),thread_block_id:p.string(),editor:p.object({id:p.string(),display_name:p.string()}),kind:g4t,path:p.string().nullable(),previous_text:p.string().nullable(),new_text:p.string().nullable(),created_at:p.string()}),_4t=p.object({type:p.literal("list"),list_type:p.literal("thread_block_edit"),objects:p.array(h4t)}),E4t=p.object({organization_count:p.number().int().nonnegative(),user_count:p.number().int().nonnegative(),thread_count:p.number().int().nonnegative(),thread_count_last_24h:p.number().int().nonnegative(),user_count_last_24h:p.number().int().nonnegative()}),y4t=p.object({id:p.string(),name:p.string(),email_domains:p.array(p.string()),member_count:p.number().int().nonnegative(),thread_count:p.number().int().nonnegative(),default_thread_visibility:p.enum(["private","workspace","public"]),created_at:p.string()}),S4t=p.object({type:p.literal("list"),list_type:p.literal("admin_organization"),objects:p.array(y4t)}),Rje=p.object({id:p.string(),name:p.string()}),T4t=p.object({id:p.string(),display_name:p.string(),workos_id:p.string(),thread_count:p.number().int().nonnegative(),onboarded_at:p.string().nullable(),created_at:p.string(),organizations:p.array(Rje)}),b4t=p.object({q:p.string().trim().min(1).max(120).optional()}),I4t=p.object({follower_id:p.string().min(1),followee_id:p.string().min(1)}),C4t=p.object({follower_id:p.string().min(1),followee_id:p.string().min(1),is_following:p.literal(!0)}),v4t=p.object({skill_id:p.string().min(1),deleted:p.object({skills:p.number().int().nonnegative(),versions:p.number().int().nonnegative(),files:p.number().int().nonnegative(),installations:p.number().int().nonnegative()}),cli_command:p.string().min(1)}),R4t=p.object({type:p.literal("list"),list_type:p.literal("admin_user"),objects:p.array(T4t)}),xje=p.object({id:p.string(),title:p.string(),started_at:p.string(),created_at:p.string(),deleted_at:p.string().nullable(),visibility:p.enum(["private","workspace","public"]),harness:Uf,harness_internal_id:p.string(),thread_file_id:p.string(),transcript_parsing_state:p.enum(["pending","parsed","too_large_to_parse","failed"]),author:Jz,organization:Rje.nullable()}),x4t=p.object({id:p.string(),content_type:p.enum(["transcript","plan"]),harness:Uf,harness_internal_id:p.string(),expected_md5:p.string(),size_in_bytes:p.number().int().nonnegative().nullable(),created_at:p.string()}),D4t=p.object({thread:xje,latest_transcript_file:x4t.nullable()}),N4t=p.object({type:p.literal("list"),list_type:p.literal("admin_thread"),has_more:p.boolean(),objects:p.array(xje)}),w4t=p.object({before:p.string().min(1).optional(),after:p.string().min(1).optional()}),Dje=p.enum(["new","replied","dismissed"]),Nje=p.object({id:p.string(),tweet_id:p.string(),author_handle:p.string(),author_name:p.string(),author_followers:p.number().int().nonnegative(),text:p.string(),url:p.string().url(),tweet_created_at:p.string(),like_count:p.number().int().nonnegative(),retweet_count:p.number().int().nonnegative(),reply_count:p.number().int().nonnegative(),matched_query:p.string(),relevance_score:p.number().int().nullable(),relevance_reason:p.string().nullable(),status:Dje,collected_at:p.string()}),B4t=p.object({type:p.literal("list"),list_type:p.literal("admin_tweet_lead"),objects:p.array(Nje)}),k4t=p.object({status:Dje}),O4t=p.object({thread_id:p.string().min(1).optional().describe("Lore thread id, e.g. th_xxx."),thread_file_id:p.string().min(1).optional().describe("Thread file id, e.g. tf_xxx."),harness:Uf.optional().describe("Harness name, e.g. claudeCode."),harness_internal_id:p.string().min(1).optional().describe("Harness-native session id.")}),P4t=p.object({thread_id:p.string().min(1),thread_file_id:p.string().min(1),event_name:p.literal("lore/thread-files.parse.requested")}),aje=p.object({token:p.string().min(1),thread_id:p.string().min(1)}),M4t=p.object({visitor:p.string().min(1).max(64).optional()}),L4t=p.object({user_id:p.string(),display_name:p.string(),shares_sent:p.number().int().nonnegative(),unique_viewers:p.number().int().nonnegative(),attributed_signups:p.number().int().nonnegative()}),U4t=p.object({window_days:p.number().int().positive(),shares_sent:p.number().int().nonnegative(),unique_viewers:p.number().int().nonnegative(),attributed_signups:p.number().int().nonnegative(),active_sharers:p.number().int().nonnegative(),k_factor:p.number().nullable(),shares_sent_sparkline:p.array(p.number().int().nonnegative()),top_sharers:p.array(L4t)}),Q4t=p.object({windows:p.array(U4t)}),qz=p.object({period:p.string(),active:p.number().int().nonnegative()}),F4t=p.object({daily:p.array(qz),weekly:p.array(qz),monthly:p.array(qz),allTime:p.array(qz)}),G4t=p.object({quoted_text:p.string().min(1),comment:p.string().nullable(),type:p.enum(["comment","highlight:trapdoor"])}),j4t=Sje,z4t=yje.extend({comment_thread_id:p.string().min(1)}),H4t=p.object({markdown:p.string().min(1)}),$4t=p.object({storage_url:p.string().min(1),thread_file_id:p.string().min(1),parsed_plan_block:nje,critiqued_plan_block:nje,annotations:p.array(G4t),comment_threads:p.array(j4t),comments:p.array(z4t)}),q4t=p.object({key:p.string().min(1),label:p.string().min(1),description:p.string().optional(),type:p.enum(["text","textarea","url","email"]),required:p.boolean(),defaultValue:p.string()}),V4t=p.object({id:p.string().min(1),name:p.string().min(1),description:p.string().min(1),deliveryTrigger:p.string().min(1),fields:p.array(q4t),availableFormats:p.array(p.enum(["html","text"]))}),Y4t=p.object({templates:p.array(V4t)}),K4t=p.object({values:p.record(p.string(),p.string())}),J4t=p.object({subject:p.string().min(1),html:p.string().optional(),text:p.string().optional()}),Z4t=p.object({to:p.string().email().describe("Recipient email address."),values:p.record(p.string(),p.string())}),W4t=p.object({id:p.string().min(1)}),jx=p.enum(Mee),wje=p.object({workspace_scope:p.boolean(),review:p.boolean()}),Cse=p.object({subject_type:p.enum(["user","organization"]),subject_id:p.string().min(1),effective_plan:jx,admin_override:jx.nullable(),stripe_subscription_status:p.string().nullable(),cancel_at_period_end:p.boolean(),current_period_end:p.string().nullable(),seat_quantity:p.number().int().positive(),member_count:p.number().int().nonnegative().nullable(),features:wje}),X4t=p.object({effective_plan:jx,features:wje,user:Cse,organization:Cse.nullable(),is_billing_admin:p.boolean()}),e3t=p.object({plan:p.enum(["creator","team"]),seat_quantity:p.number().int().positive().optional()}),t3t=p.object({checkout_url:p.string().min(1)}),n3t=p.object({portal_url:p.string().min(1)}),r3t=p.object({seat_quantity:p.number().int().positive()}),uje=p.object({plan:jx.nullable()}),Yz=p.object({subject_type:p.enum(["user","organization"]),subject_id:p.string().min(1),label:p.string().min(1),effective_plan:jx,admin_override:jx.nullable(),stripe_subscription_status:p.string().nullable(),seat_quantity:p.number().int().positive()}),o3t=p.object({users:p.array(Yz),organizations:p.array(Yz)}),i3t=p.object({id:p.string().min(1),display_name:p.string().min(1),handle:p.string().nullable(),avatar_url:p.string().nullable()}),s3t=p.object({thread_id:p.string().min(1),title:p.string().min(1),author:i3t,last_active_at:p.string().datetime(),last_block_excerpt:p.string().nullable(),last_block_kind:p.string().min(1).nullable(),is_streaming:p.boolean()}),a3t=p.object({type:p.literal("list"),list_type:p.literal("live_thread"),objects:p.array(s3t)}),u3t=p.object({thread_id:p.string().min(1)}),c3t=p.object({thread_id:p.string().min(1),last_seen_at:p.string().datetime(),started_at:p.string().datetime()}),l3t=p.object({user_id:p.string().min(1),organization_id:p.string().min(1).nullable(),last_seen_at:p.string().datetime(),started_at:p.string().datetime()}),d3t=p.object({upload_completed:p.boolean().optional().describe("When true, also bump last_upload_at \u2014 the daemon completed an upload pass.")}),p3t=p.object({last_seen_at:p.string().datetime(),last_upload_at:p.string().datetime().nullable(),started_at:p.string().datetime()}),f3t=p.object({follower_id:p.string().min(1),followee_id:p.string().min(1),is_following:p.literal(!0),follower_count:p.number().int().nonnegative()}),m3t=p.object({follower_id:p.string().min(1),followee_id:p.string().min(1),is_following:p.literal(!1),follower_count:p.number().int().nonnegative()}),WE=p.object({id:p.string().min(1),display_name:p.string().min(1),handle:p.string().nullable(),avatar_url:p.string().nullable(),bio:p.string().max(280).nullable(),is_following:p.boolean(),is_self:p.boolean()}),cje=p.object({type:p.literal("list"),list_type:p.literal("user_follow"),objects:p.array(WE)}),A3t=WE.extend({mutuals:p.array(WE),mutual_count:p.number().int().nonnegative()}),g3t=p.object({type:p.literal("list"),list_type:p.literal("follow_suggestion"),objects:p.array(A3t)}),h3t=WE.extend({referred_at:p.string().min(1)}),_3t=p.object({type:p.literal("list"),list_type:p.literal("referral"),count:p.number().int().nonnegative(),recent:p.array(h3t)}),E3t=p.object({date:p.string().regex(/^\d{4}-\d{2}-\d{2}$/),referred:p.number().int().nonnegative(),total:p.number().int().nonnegative()}),y3t=p.object({inviter:WE,organization_name:p.string().nullable(),referred_count:p.number().int().positive(),latest_referred_at:p.string().min(1)}),S3t=p.object({inviter:WE,referee:WE,attributed_at:p.string().min(1)}),T3t=p.object({total_referred_signups:p.number().int().nonnegative(),active_inviters:p.number().int().nonnegative(),referred_signups_last_30d:p.number().int().nonnegative(),total_signups_last_30d:p.number().int().nonnegative(),daily_counts:p.array(E3t),top_inviters:p.array(y3t),recent_attributions:p.array(S3t)}),b3t=p.object({source:p.string().min(1),signups:p.number().int().nonnegative()}),I3t=p.object({sources:p.array(b3t),total_with_source:p.number().int().nonnegative(),total_without_source:p.number().int().nonnegative()}),C3t=p.object({date:p.string().regex(/^\d{4}-\d{2}-\d{2}$/),count:p.number().int().nonnegative()}),v3t=p.object({window_start:p.string().datetime(),window_end:p.string().datetime(),total_contributions:p.number().int().nonnegative(),days_active:p.number().int().nonnegative(),daily_average:p.number().nonnegative(),current_streak_days:p.number().int().nonnegative(),days:p.array(C3t)}),R3t=p.object({type:p.literal("thread_created"),occurred_at:p.string().datetime(),id:p.string().min(1),thread:p.object({id:p.string().min(1),title:p.string(),visibility:p.enum(["private","workspace","public"])})}),x3t=p.object({type:p.literal("thread_updated"),occurred_at:p.string().datetime(),id:p.string().min(1),thread:p.object({id:p.string().min(1),title:p.string(),visibility:p.enum(["private","workspace","public"])})}),D3t=p.object({type:p.literal("comment_posted"),occurred_at:p.string().datetime(),id:p.string().min(1),comment_excerpt:p.string(),thread:p.object({id:p.string().min(1),title:p.string(),visibility:p.enum(["private","workspace","public"])})}),N3t=p.object({type:p.literal("project_published"),occurred_at:p.string().datetime(),id:p.string().min(1),project:p.object({id:p.string().min(1),name:p.string().min(1)})}),w3t=p.object({type:p.literal("user_followed"),occurred_at:p.string().datetime(),id:p.string().min(1),followee:WE}),B3t=p.discriminatedUnion("type",[R3t,x3t,D3t,N3t,w3t]),k3t=p.object({type:p.literal("list"),list_type:p.literal("user_activity"),objects:p.array(B3t)}),O3t=p.object({id:p.string().min(1),name:p.string().min(1),excerpt:p.string(),published_at:p.string().datetime(),updated_at:p.string().datetime()}),P3t=p.object({type:p.literal("list"),list_type:p.literal("profile_published_project"),objects:p.array(O3t)}),lje=p.object({id:p.string().min(1),published_at:p.string().datetime().nullable()}),M3t=p.enum(["avatar","banner"]),Bje=p.enum(["image/png","image/jpeg","image/webp","image/gif"]),L3t=p.object({kind:M3t,content_type:Bje,base64_data:p.string().min(1)}),U3t=p.object({substrate:p.enum(["s3","filesystem"]),storage_url:p.string().min(1)}),Q3t=p.object({content_type:Bje,base64_data:p.string().min(1)}),F3t=p.object({cover_status:Dse,cover_url:p.string().min(1),cover_url_expires_at:p.string().min(1),cover_generated_at:p.string().min(1)}),G3t=mje,Wz=UUt.router({health:{method:"GET",path:"/health",responses:{200:p.object({status:p.literal("ok")})},summary:"Health check"},getDeepHealth:{method:"GET",path:"/health/deep",responses:{200:p.object({status:p.enum(["ok","degraded"]),environment:p.string(),checks:p.object({database:p.object({ok:p.boolean(),latencyMs:p.number().int().nonnegative().optional(),error:p.string().optional()}),migrations:p.object({ok:p.boolean(),appliedCount:p.number().int().nonnegative(),pendingCount:p.number().int().nonnegative(),latestApplied:p.string().optional(),pending:p.array(p.string())}),storage:p.object({ok:p.boolean(),bucket:p.string().optional(),error:p.string().optional()})})}),503:p.object({status:p.literal("down"),environment:p.string(),error:p.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:p.object({authorization:p.string().min(1).optional(),"x-lore-referral-token":p.string().min(1).max(16).optional(),"x-lore-invited-by-user-id":p.string().min(1).max(40).optional(),"user-agent":p.string().min(1).max(1024).optional()}),responses:{200:$Ut,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:tje,503:q},summary:"Return public WorkOS CLI Auth configuration for the Lore CLI"},getDesktopAuthConfig:{method:"GET",path:"/desktop-auth/config",responses:{200:tje,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:OQt,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:p.object({authorization:p.string().min(1).optional()}),body:u3t,responses:{200:c3t,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:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:l3t,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:p.object({authorization:p.string().min(1).optional()}),body:d3t,responses:{200:p3t,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:a3t,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:p.object({authorization:p.string().min(1).optional()}),query:GFt,responses:{200:oje,401:q},summary:"List threads visible to the authenticated user"},createThread:{method:"POST",path:"/threads",headers:p.object({authorization:p.string().min(1).optional()}),body:RFt,responses:{201:xFt,401:q},summary:"Create an empty Lore-native thread for the authenticated user"},getThread:{method:"GET",path:"/threads/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:MO,404:q},summary:"Load a visible thread by id"},getSimilarThreads:{method:"GET",path:"/threads/:id/similar",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:oje,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:p.object({id:p.string().min(1).describe("Thread id to share")}),headers:p.object({authorization:p.string().min(1).optional()}),body:CFt,responses:{200:vFt,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:p.object({authorization:p.string().min(1).optional()}),body:fFt,responses:{200:hFt,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:p.object({id:p.string().min(1).describe("Thread id or stable harness lookup id to fork")}),headers:p.object({authorization:p.string().min(1).optional()}),body:dFt,responses:{200:pFt,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),query:FFt,responses:{200:xse,401:q},summary:"List blocks for a visible thread"},createThreadBlockCommentThread:{method:"POST",path:"/threads/:threadId/blocks/:blockId/comment-threads",pathParams:p.object({threadId:p.string().min(1),blockId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:pQt,responses:{201:fQt,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:p.object({threadId:p.string().min(1),blockId:p.string().min(1),commentThreadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:gQt,responses:{201:hQt,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:p.object({threadId:p.string().min(1),blockId:p.string().min(1),commentThreadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:yQt,responses:{200:SQt,401:q,404:q},summary:"Resolve or reopen a block-level comment thread on a visible thread block"},listSkills:{method:"GET",path:"/skills",headers:p.object({authorization:p.string().min(1).optional()}),query:zFt,responses:{200:HFt,401:q},summary:"List visible workspace skills"},reconcileLocalSkills:{method:"GET",path:"/skills/reconcile-local",headers:p.object({authorization:p.string().min(1).optional()}),query:$Ft,responses:{200:VFt,401:q},summary:"Reconcile scanned local skills with visible server-side skills by ID or content hash"},getSkillDetail:{method:"GET",path:"/skills/:id",pathParams:p.object({id:p.string().min(1).describe("Stable skill ID, e.g. sk_...")}),query:p.object({include_unpublished:p.coerce.boolean().optional().describe("Allow the owner to load a soft-unpublished skill for republishing.")}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:JFt,401:q,404:q},summary:"Get visible skill details by stable skill ID"},listArtifacts:{method:"GET",path:"/artifacts",headers:p.object({authorization:p.string().min(1).optional()}),query:e4t,responses:{200:t4t,401:q},summary:"List visible artifacts (files produced by Cowork or native threads)"},getArtifactDetail:{method:"GET",path:"/artifacts/:id",pathParams:p.object({id:p.string().min(1).describe("Stable artifact ID, e.g. art_...")}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:n4t,401:q,404:q},summary:"Get a visible artifact with a presigned download URL"},presignBackfillArtifacts:{method:"POST",path:"/artifacts/backfill/presign",headers:p.object({authorization:p.string().min(1).optional()}),body:o4t,responses:{200:i4t,401:q,404:q},summary:"Presign artifact-byte uploads for an existing session thread (backfill)"},commitBackfillArtifacts:{method:"POST",path:"/artifacts/backfill/commit",headers:p.object({authorization:p.string().min(1).optional()}),body:s4t,responses:{200:a4t,401:q,404:q},summary:"Promote backfilled artifact bytes into artifact rows"},getSkillRaw:{method:"GET",path:"/skills/:id/raw",pathParams:p.object({id:p.string().min(1).describe("Stable skill ID, e.g. sk_...")}),query:p.object({version:p.coerce.number().int().positive().optional().describe("Version timestamp to download. Defaults to latest accepted version.")}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:p.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:p.object({id:p.string().min(1).describe("Workspace skill ID to install")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:c4t,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:p.object({id:p.string().min(1).describe("Workspace skill ID to uninstall")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:ije,401:q},summary:"Unregister the current user installation for a skill (idempotent)"},unpublishSkill:{method:"DELETE",path:"/skills/:id",pathParams:p.object({id:p.string().min(1).describe("Workspace skill ID to unpublish")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:d4t,401:q,403:q,404:q},summary:"Unpublish an owned workspace skill and remove it from the team catalog"},updateSkillInstallation:{method:"PATCH",path:"/skills/installations/:id",pathParams:p.object({id:p.string().min(1).describe("Stable skill installation ID, e.g. ski_...")}),headers:p.object({authorization:p.string().min(1).optional()}),body:l4t,responses:{200:ije,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:m4t,401:q},summary:"List installed skills with latest accepted version metadata"},approveSkillVersion:{method:"POST",path:"/skills/:id/versions/:version/approve",pathParams:p.object({id:p.string().min(1).describe("Workspace skill ID"),version:p.coerce.number().int().positive().describe("Proposed version timestamp to approve")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:sje,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:p.object({id:p.string().min(1).describe("Workspace skill ID"),version:p.coerce.number().int().positive().describe("Proposed version timestamp to reject")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p4t.optional(),responses:{200:sje,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:p.object({threadId:p.string().min(1),blockId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:jFt,responses:{200:PO,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:p.object({threadId:p.string().min(1),blockId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:A4t,responses:{200:PO,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:p.object({threadId:p.string().min(1),blockId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:PO,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:p.object({threadId:p.string().min(1),blockId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:_4t,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:lFt,401:q,404:q},summary:"List AI-extracted user decisions for a thread, in chronological order"},updateThread:{method:"PATCH",path:"/threads/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:DFt,responses:{200:MO,401:q,403:q,404:q},summary:"Update thread visibility (author only)"},deleteThread:{method:"DELETE",path:"/threads/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.null(),401:q,403:q,404:q},summary:"Soft-delete a thread (author only)"},generateThreadCard:{method:"POST",path:"/threads/:id/card/generate",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:p.object({cover_status:Dse,how_to_status:bje}),401:q,403:q,404:q,429:q.extend({retry_after_seconds:p.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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:Q3t,responses:{200:F3t,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:HQt,responses:{200:rje,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:rje,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:p.object({threadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:qQt,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:p.object({threadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:VQt,responses:{201:YQt,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:p.object({threadId:p.string().min(1),commentId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:KQt,responses:{200:JQt,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:p.object({threadId:p.string().min(1),commentId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:ZQt,401:q,403:q,404:q},summary:"Soft-delete your own thread comment (author only). Idempotent."},getThreadPreview:{method:"GET",path:"/threads/:id/preview",pathParams:p.object({id:p.string().min(1)}),responses:{200:NFt,404:q},summary:"Unauthenticated, visibility-redacted metadata for OG / social preview consumers"},getUser:{method:"GET",path:"/users/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:mje,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:p.object({authorization:p.string().min(1).optional()}),body:qUt,responses:{200:fje,401:q,409:q,422:q},summary:"Update the authenticated user profile"},getUserByHandle:{method:"GET",path:"/users/by-handle/:handle",pathParams:p.object({handle:dje}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:G3t,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:p.object({authorization:p.string().min(1)}),responses:{200:_3t,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),query:p.object({limit:p.coerce.number().int().positive().max(100).optional()}),responses:{200:k3t,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:v3t,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:cje,404:q},summary:"List the users following a given user."},listUserFollowing:{method:"GET",path:"/users/:id/following",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:cje,404:q},summary:"List the users a given user is following."},listFollowSuggestions:{method:"GET",path:"/users/:id/follow-suggestions",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:g3t,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:f3t,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:m3t,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:P3t,404:q},summary:"Projects the user has published to their public profile."},publishProject:{method:"POST",path:"/projects/:id/publish",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:lje,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:lje,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:p.object({authorization:p.string().min(1).optional()}),body:L3t,responses:{200:U3t,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:YUt,401:q},summary:"List members of the authenticated user\u2019s organization"},createOrganizationInvite:{method:"POST",path:"/organization/invites",headers:p.object({authorization:p.string().min(1).optional()}),body:KUt,responses:{201:JUt,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:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:ZUt,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:wQt,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:p.object({authorization:p.string().min(1).optional()}),body:iQt,responses:{201:vQt,401:q,403:q},summary:"Create building block snapshots for the authenticated user\u2019s organization"},getPlan:{method:"GET",path:"/plans/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:bQt,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:p.object({id:p.string().min(1),revisionId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:TQt,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:lQt,responses:{201:dQt,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:p.object({id:p.string().min(1),threadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:mQt,responses:{201:AQt,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:p.object({id:p.string().min(1),threadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:_Qt,responses:{200:EQt,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:p.object({authorization:p.string().min(1).optional()}),query:CQt,responses:{200:IQt,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:p.object({authorization:p.string().min(1).optional()}),query:xQt,responses:{200:RQt,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:QFt,401:q},summary:"List recent upload sessions for the authenticated user"},createUploadSession:{method:"POST",path:"/upload_sessions",headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({thread_files:p.array(FQt).optional(),skill_files:p.array(QQt).optional()}),responses:{201:IFt,400:q,401:q},summary:"Create an upload session with presigned URLs for file uploads"},completeUploadSession:{method:"POST",path:"/upload_sessions/:id/complete",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({thread_files:p.array(_Ft).optional(),skill_files:p.array(EFt).optional()}),responses:{200:SFt,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:E4t,401:q,403:q},summary:"Cross-org operational counts. Tanagram admins only."},adminListOrganizations:{method:"GET",path:"/admin/organizations",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:S4t,401:q,403:q},summary:"List every organization with member and thread counts. Tanagram admins only."},adminListUsers:{method:"GET",path:"/admin/users",query:b4t,headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:R4t,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:p.object({authorization:p.string().min(1).optional()}),query:w4t,responses:{200:N4t,401:q,403:q},summary:"List live threads across every organization. Tanagram admins only."},adminListTweetLeads:{method:"GET",path:"/admin/tweet-leads",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:B4t,401:q,403:q},summary:"List unreplied tweet leads from the last 24h, ranked by relevance. Tanagram admins only."},adminUpdateTweetLead:{method:"PATCH",path:"/admin/tweet-leads/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:k4t,responses:{200:Nje,401:q,403:q,404:q},summary:"Update a tweet lead status (replied/dismissed/new). Tanagram admins only."},adminLookupThread:{method:"GET",path:"/admin/threads/lookup",headers:p.object({authorization:p.string().min(1).optional()}),query:O4t,responses:{200:D4t,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:p.object({authorization:p.string().min(1).optional()}),body:I4t,responses:{200:C4t,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.null(),401:q,403:q,404:q},summary:"Permanently remove a thread. Tanagram admins only."},adminDeleteSkill:{method:"DELETE",path:"/admin/skills/:id",pathParams:p.object({id:p.string().min(1).describe("Workspace skill ID, e.g. sk_...")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:v4t,401:q,403:q,404:q},summary:"Permanently remove a skill and its sync records. Tanagram admins only."},adminReparseThreadFile:{method:"POST",path:"/admin/thread-files/:id/reparse",pathParams:p.object({id:p.string().min(1).describe("Thread file id, e.g. tf_xxx.")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:P4t,401:q,403:q,404:q},summary:"Re-enqueue parsing for a thread file. Tanagram admins only."},listCardFeed:{method:"GET",path:"/cards/feed",query:p.object({limit:p.coerce.number().int().min(1).max(48).optional()}),responses:{200:aFt},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:p.object({authorization:p.string().min(1).optional()}),query:MFt,responses:{200:PFt},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:LFt},summary:"Unauthenticated rollup of public-thread counts for the Discover header."},createWaitlistEntry:{method:"POST",path:"/waitlist_entries",body:WUt,responses:{201:tQt,409:q},summary:"Create an unauthenticated waitlist entry keyed by (location, contact)."},submitContactMessage:{method:"POST",path:"/contact",body:XUt,responses:{200:eQt,429:q,503:q},summary:"Submit a contact-form message from the marketing site; emails the Lore team."},createFeedback:{method:"POST",path:"/feedback",headers:p.object({authorization:p.string().min(1).optional()}),body:nQt,responses:{201:rQt,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{201:aje,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:p.object({token:p.string().min(1).max(16)}),headers:p.object({authorization:p.string().min(1).optional()}),query:M4t,responses:{200:aje,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:Q4t,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:F4t,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:T3t,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:I3t,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:p.object({authorization:p.string().min(1).optional()}),body:H4t,responses:{200:$4t,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:Y4t,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:p.object({id:p.string().min(1).describe("Email template id.")}),headers:p.object({authorization:p.string().min(1).optional()}),body:K4t,responses:{200:J4t,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:p.object({id:p.string().min(1).describe("Email template id.")}),headers:p.object({authorization:p.string().min(1).optional()}),body:Z4t,responses:{200:W4t,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:X4t,401:q},summary:"Resolve the caller's plan, features, seat count, and any admin override."},createBillingCheckout:{method:"POST",path:"/billing/checkout",headers:p.object({authorization:p.string().min(1).optional()}),body:e3t,responses:{200:t3t,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:p.object({authorization:p.string().min(1).optional()}),body:p.object({subject_type:p.enum(["user","organization"]).default("user")}).optional(),responses:{200:n3t,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:p.object({authorization:p.string().min(1).optional()}),body:r3t,responses:{200:Cse,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:o3t,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:uje,responses:{200:Yz,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:uje,responses:{200:Yz,401:q,403:q,404:q},summary:"Admin override for an organization's plan tier. Null clears the override."},projects:VGe,regions:ZGe,entities:GGe,docs:LGe,mentions:$Ge,favorites:HGe,search:XGe},{pathPrefix:"/api"})});import{AsyncLocalStorage as j3t}from"node:async_hooks";import uh from"node:fs/promises";import Oje from"node:path";function q3t(e){return Oje.join(e,"tokens-refresh.lock")}async function UO(e,t,n={}){let r=kje.getStore();if(r?.has(e))return t();let o=n.waitMs??z3t,i=n.staleMs??H3t,s=n.now??Date.now,u=n.sleep??(v=>new Promise(R=>setTimeout(R,v))),l=q3t(e),f=Oje.join(l,"owner"),h=`${process.pid}:${Date.now()}:${Math.random().toString(36).slice(2)}`,_=s(),E=!1;for(;!E;)try{await uh.mkdir(e,{recursive:!0,mode:448}),await uh.chmod(e,448).catch(()=>{}),await uh.mkdir(l,{mode:448});try{await uh.writeFile(f,h,{mode:384})}catch(v){throw await uh.rm(l,{recursive:!0,force:!0}),v}E=!0}catch(v){if(!V3t(v))throw v;if(await Y3t(l,i,s)){await uh.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($3t,o))}let T=new Set(r??[]);T.add(e);try{return await kje.run(T,t)}finally{await K3t(l,f,h)}}function Pje(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT"}function V3t(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="EEXIST"}async function Y3t(e,t,n){try{let r=await uh.stat(e);return n()-r.mtimeMs>=t}catch(r){if(Pje(r))return!1;throw r}}async function K3t(e,t,n){try{if(await uh.readFile(t,"utf8")!==n)return}catch(r){if(!Pje(r))throw r}await uh.rm(e,{recursive:!0,force:!0})}var kje,z3t,H3t,$3t,xzn,Dzn,Nzn,wzn,Bzn,kzn,Xz,Nse=B(()=>{"use strict";A();pc();kje=new j3t,z3t=3e4,H3t=6e4,$3t=100,xzn=process.env.LORE_PLUGIN_AUTHKIT_CLIENT_ID?.trim()||process.env.PLUGIN_AUTHKIT_CLIENT_ID?.trim()||"client_01KRSDB9SR20N7MB0D9MPS05Q6",Dzn=process.env.LORE_CLI_AUTHKIT_CLIENT_ID?.trim()||process.env.CLI_AUTHKIT_CLIENT_ID?.trim()||"client_01KV6K8BBANC2J3998K4DG9840",Nzn=p.object({resource:p.string(),endpoints:p.object({audience:p.string(),deviceAuthorizationEndpoint:p.string(),tokenEndpoint:p.string(),authorizationEndpoint:p.string()}),fetchedAt:p.number(),prmEtag:p.string().optional()}),wzn=p.object({resource:p.string().min(1,"`resource` must be a non-empty string"),authorization_servers:p.array(p.string())}),Bzn=p.object({issuer:p.string().min(1,"`issuer` must be a non-empty string"),token_endpoint:p.string().min(1,"`token_endpoint` must be a non-empty string"),authorization_endpoint:p.string().optional()}),kzn=p.object({access_token:p.string().min(1),refresh_token:p.string().min(1),expires_in:p.number().int().positive(),token_type:p.string().min(1),scope:p.string().optional()}),Xz=class extends Error{constructor(){super("OAuth refresh token is invalid or expired"),this.name="OAuthInvalidGrantError"}}});import yp from"node:fs";import J3t from"node:path";function wse(e){return J3t.join(e,"tokens.json")}function Z3t(e){return`${e}.tmp.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}`}function Uje(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT"}function W3t(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=Lje.safeParse(n);if(!o.success)throw new Error(`tokens file at ${t} failed schema validation: ${o.error.message}`);return o.data}let r=eH.safeParse(n);if(!r.success)throw new Error(`tokens file at ${t} failed schema validation: ${r.error.message}`);return t6t(r.data)}function X3t(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 e6t(e){let t=X3t(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 t6t(e){let t={};return e6t(e)&&(t.plugin=e),{version:2,clients:t}}function n6t(e){return JSON.stringify(Lje.parse(e))}function Bse(e){let t=wse(e),n;try{n=yp.readFileSync(t,"utf8")}catch(r){if(Uje(r))return null;throw r}return W3t(n,t)}function Qje(e,t){let n=wse(e);yp.mkdirSync(e,{recursive:!0,mode:448}),yp.chmodSync(e,448);let r=Z3t(n),o=n6t(t),i;try{i=yp.openSync(r,"w",384),yp.writeSync(i,o),yp.fchmodSync(i,384),yp.fsyncSync(i),yp.closeSync(i),i=void 0,yp.renameSync(r,n)}catch(s){if(i!==void 0)try{yp.closeSync(i)}catch{}try{yp.unlinkSync(r)}catch{}throw s}}function kse(e,t){return Bse(e)?.clients[t]??null}function r6t(e){try{return Bse(e)??{version:2,clients:{}}}catch{return{version:2,clients:{}}}}function Mje(e){try{yp.rmSync(wse(e))}catch(t){if(!Uje(t))throw t}}function Fje(e,t,n){let r=r6t(e);r.clients[t]=eH.parse(n),Qje(e,r)}function Ose(e,t){let n;try{n=Bse(e)}catch{Mje(e);return}if(!(!n||!(t in n.clients))){if(delete n.clients[t],Object.keys(n.clients).length===0){Mje(e);return}Qje(e,n)}}var eH,Lje,Pse=B(()=>{"use strict";A();pc();Nse();eH=p.object({access_token:p.string(),refresh_token:p.string(),expires_at:p.number().int(),scope:p.string().default("")}),Lje=p.object({version:p.literal(2),clients:p.record(p.string(),eH).default({})})});import o6t from"node:fs";import jje from"node:os";import zje from"node:path";function i6t(e=jje.homedir()){return zje.join(e,"Library","Application Support","tanagram","lore","tokens.json")}function Hje(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 Gje(e){try{o6t.rmSync(e)}catch(t){if(!(typeof t=="object"&&t!==null&&"code"in t&&t.code==="ENOENT"))throw t}}function tH(e,t=jje.homedir()){for(let n of s6t)Gje(zje.join(e,n));Gje(i6t(t))}var s6t,$je=B(()=>{"use strict";A();Pse();s6t=["token","refresh_token"]});var nH=B(()=>{"use strict";A();Pse();$je();Nse()});import PT from"node:fs";import zx from"node:path";function rH(e){return e.toISOString().slice(0,10)}function qje(e){let t=zx.basename(e);return t.endsWith(".log.txt")?t.slice(0,-8):t.replace(/\.txt$/,"")}function c6t(e,t){let n=zx.dirname(e),r=qje(e),o=zx.join(n,`${r}.${t}.txt`);for(let i=1;PT.existsSync(o);i++)o=zx.join(n,`${r}.${t}.${i}.txt`);return o}function l6t(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function d6t(e,t){let n=new Date(e.getTime());return n.setUTCDate(n.getUTCDate()-t),rH(n)}function p6t(e,t,n){let r=zx.dirname(e),o=qje(e),i=new RegExp(`^${l6t(o)}\\.(\\d{4}-\\d{2}-\\d{2})(?:\\.\\d+)?\\.txt$`),s=d6t(t,n),u;try{u=PT.readdirSync(r)}catch{return}for(let l of u){let f=i.exec(l);if(!(!f||f[1]>=s))try{PT.rmSync(zx.join(r,l),{force:!0})}catch{}}}function oH(e,t,n){let r=Buffer.byteLength(t);n.rotateIfNeeded(e,r),PT.appendFileSync(e,t),n.recordWrite(r)}var a6t,u6t,Hx,Mse=B(()=>{"use strict";A();a6t=50*1024*1024,u6t=30;Hx=class{liveFile=null;liveLogBytes=null;currentPeriod=null;maxBytes;retentionDays;now;constructor(t={}){this.maxBytes=t.maxBytes??a6t,this.retentionDays=t.retentionDays??u6t,this.now=t.now??(()=>new Date)}rotateIfNeeded(t,n){if(this.liveFile!==t&&(this.liveFile=t,this.liveLogBytes=null,this.currentPeriod=null),this.currentPeriod===null)try{let u=PT.statSync(t);this.liveLogBytes=u.size,this.currentPeriod=rH(u.mtime)}catch{this.liveLogBytes=0,this.currentPeriod=rH(this.now())}let r=this.now(),o=rH(r),i=this.currentPeriod!==o,s=(this.liveLogBytes??0)+n>this.maxBytes;if((i||s)&&(this.liveLogBytes??0)>0)try{PT.renameSync(t,c6t(t,this.currentPeriod??o)),p6t(t,r,this.retentionDays),this.liveLogBytes=0,this.currentPeriod=o;return}catch{try{this.liveLogBytes=PT.statSync(t).size}catch{this.liveLogBytes=0}return}this.currentPeriod=o}recordWrite(t){this.liveLogBytes=(this.liveLogBytes??0)+t}}});import{execFileSync as f6t}from"node:child_process";import{createHash as m6t}from"node:crypto";import QO from"node:os";import fa from"node:path";function Er(){if(zr()==="dev"){let t=process.env.LORE_DEV_STATE_DIR?.trim();if(t)return fa.resolve(t.replace(/^~(?=$|\/)/,QO.homedir()));let n=A6t();if(n)return fa.join(QO.homedir(),`.lore-dev-${n}`)}let e=zr()==="dev"?".lore-dev":".lore";return fa.join(QO.homedir(),e)}function A6t(){let e=Vje(process.env.LORE_DEV_STACK_NAME??"");if(e)return e;let t=g6t();return[Vje(t.split(/[\\/]/).pop()||"lore"),h6t(t)].filter(Boolean).join("-").slice(0,63)}function g6t(){try{return f6t("git",["rev-parse","--show-toplevel"],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()}catch{return fa.resolve(process.cwd(),"../..")}}function h6t(e){return m6t("sha1").update(e).digest("hex").slice(0,8)}function Vje(e){return e.toLowerCase().replace(/[^a-z0-9-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,63)}function Sp(){return fa.join(Er(),"cli.log.txt")}function FO(){return fa.join(Er(),"upload.log.txt")}function Yje(){return fa.join(Er(),"upload-daemon.lock")}function Lse(){return fa.join(Er(),"sync_state.json")}function MT(){return fa.join(Er(),"upload_filters.json")}function iH(){return fa.join(Er(),"upload_dirs.json")}function GO(){return fa.join(Er(),"status.json")}function $x(){return fa.join(Er(),"daemon_status.json")}function qx(){return fa.join(Er(),"quarantine")}function LT(){return fa.join(Er(),"install_source.json")}function ch(){return fa.join(Er(),"skill_sync_state.json")}function UT(){return fa.join(Er(),"bin","lore")}function ey(){let e=zr();return e==="prod"?"ai.tanagram.lore":`ai.tanagram.lore.${e}`}function Use(){return`${ey()}.skill-sync`}function Vx(){return fa.join(QO.homedir(),"Library","LaunchAgents",`${ey()}.plist`)}function Qse(){return fa.join(QO.homedir(),"Library","LaunchAgents",`${Use()}.plist`)}var oo=B(()=>{"use strict";A();sc()});import _6t from"node:fs";function y6t(){let e=Er();Kje!==e&&(_6t.mkdirSync(e,{recursive:!0}),Kje=e)}function S6t(e){let t=typeof e=="string"?e:JSON.stringify(e);return/[\s"=]/.test(t)?JSON.stringify(t):t}function T6t(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 ZE(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 E=u._zod.parent;if(E&&E!==_){r(E);let T=e.seen.get(E);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:Bx(t,"input",e.processors),output:Bx(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 poe,Bx,AO=B(()=>{A();pO();poe=(e,t={})=>n=>{let r=KE({...n,processors:t});return Pr(e,r),JE(r,e),ZE(r,e)},Bx=(e,t,n={})=>r=>{let{libraryOptions:o,target:i}=r??{},s=KE({...o??{},target:i,io:t,processors:n});return Pr(e,s),JE(s,e),ZE(s,e)}});function oz(e,t){if("_idmap"in e){let r=e,o=KE({...t,processors:tz}),i={};for(let l of r._idmap.entries()){let[f,h]=l;Pr(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;JE(o,h),s[f]=ZE(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=KE({...t,processors:tz});return Pr(e,n),JE(n,e),ZE(n,e)}var L2t,foe,moe,Aoe,goe,hoe,_oe,Eoe,yoe,Soe,Toe,boe,Ioe,Coe,voe,Roe,xoe,Doe,Noe,woe,Boe,koe,Ooe,Poe,Moe,Loe,nz,Uoe,Qoe,Foe,Goe,joe,zoe,Hoe,$oe,qoe,Voe,Yoe,rz,Koe,tz,gO=B(()=>{A();AO();St();L2t={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},foe=(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=L2t[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}))])}},moe=(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),E=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),E?T?(o.maximum=f,o.exclusiveMaximum=!0):o.exclusiveMaximum=f:typeof s=="number"&&(o.maximum=s),typeof l=="number"&&(o.multipleOf=l)},Aoe=(e,t,n,r)=>{n.type="boolean"},goe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},hoe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},_oe=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Eoe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},yoe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Soe=(e,t,n,r)=>{n.not={}},Toe=(e,t,n,r)=>{},boe=(e,t,n,r)=>{},Ioe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Coe=(e,t,n,r)=>{let o=e._zod.def,i=Jk(o.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},voe=(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},Roe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},xoe=(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},Doe=(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)},Noe=(e,t,n,r)=>{n.type="boolean"},woe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Boe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},koe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Ooe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Poe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Moe=(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=Pr(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]=Pr(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=Pr(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},nz=(e,t,n,r)=>{let o=e._zod.def,i=o.inclusive===!1,s=o.options.map((u,l)=>Pr(u,t,{...r,path:[...r.path,i?"oneOf":"anyOf",l]}));i?n.oneOf=s:n.anyOf=s},Uoe=(e,t,n,r)=>{let o=e._zod.def,i=Pr(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=Pr(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},Qoe=(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((E,T)=>Pr(E,t,{...r,path:[...r.path,s,T]})),f=i.rest?Pr(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=Pr(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=Pr(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=Pr(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)}},Goe=(e,t,n,r)=>{let o=e._zod.def,i=Pr(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"}]},joe=(e,t,n,r)=>{let o=e._zod.def;Pr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},zoe=(e,t,n,r)=>{let o=e._zod.def;Pr(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;Pr(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;Pr(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},qoe=(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;Pr(s,t,r);let u=t.seen.get(e);u.ref=s},Voe=(e,t,n,r)=>{let o=e._zod.def;Pr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},Yoe=(e,t,n,r)=>{let o=e._zod.def;Pr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},rz=(e,t,n,r)=>{let o=e._zod.def;Pr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},Koe=(e,t,n,r)=>{let o=e._zod.innerType;Pr(o,t,r);let i=t.seen.get(e);i.ref=o},tz={string:foe,number:moe,boolean:Aoe,bigint:goe,symbol:hoe,null:_oe,undefined:Eoe,void:yoe,never:Soe,any:Toe,unknown:boe,date:Ioe,enum:Coe,literal:voe,nan:Roe,template_literal:xoe,file:Doe,success:Noe,custom:woe,function:Boe,transform:koe,map:Ooe,set:Poe,array:Moe,object:Loe,union:nz,intersection:Uoe,tuple:Qoe,record:Foe,nullable:Goe,nonoptional:joe,default:zoe,prefault:Hoe,catch:$oe,pipe:qoe,readonly:Voe,promise:Yoe,optional:rz,lazy:Koe}});var iz,l6e=B(()=>{A();gO();AO();iz=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=KE({processors:tz,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 Pr(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)),JE(this.ctx,t);let r=ZE(this.ctx,t),{"~standard":o,...i}=r;return i}}});var d6e={};var p6e=B(()=>{A()});var ah={};Ws(ah,{$ZodAny:()=>jne,$ZodArray:()=>Vne,$ZodAsyncError:()=>Pf,$ZodBase64:()=>Bne,$ZodBase64URL:()=>kne,$ZodBigInt:()=>Sj,$ZodBigIntFormat:()=>Une,$ZodBoolean:()=>aO,$ZodCIDRv4:()=>Dne,$ZodCIDRv6:()=>Nne,$ZodCUID:()=>hne,$ZodCUID2:()=>_ne,$ZodCatch:()=>dre,$ZodCheck:()=>ro,$ZodCheckBigIntFormat:()=>$te,$ZodCheckEndsWith:()=>rne,$ZodCheckGreaterThan:()=>mj,$ZodCheckIncludes:()=>tne,$ZodCheckLengthEquals:()=>Zte,$ZodCheckLessThan:()=>fj,$ZodCheckLowerCase:()=>Xte,$ZodCheckMaxLength:()=>Kte,$ZodCheckMaxSize:()=>qte,$ZodCheckMimeType:()=>ine,$ZodCheckMinLength:()=>Jte,$ZodCheckMinSize:()=>Vte,$ZodCheckMultipleOf:()=>zte,$ZodCheckNumberFormat:()=>Hte,$ZodCheckOverwrite:()=>sne,$ZodCheckProperty:()=>one,$ZodCheckRegex:()=>Wte,$ZodCheckSizeEquals:()=>Yte,$ZodCheckStartsWith:()=>nne,$ZodCheckStringFormat:()=>hx,$ZodCheckUpperCase:()=>ene,$ZodCodec:()=>cO,$ZodCustom:()=>Ere,$ZodCustomStringFormat:()=>Mne,$ZodDate:()=>qne,$ZodDefault:()=>are,$ZodDiscriminatedUnion:()=>Jne,$ZodE164:()=>One,$ZodEmail:()=>fne,$ZodEmoji:()=>Ane,$ZodEncodeError:()=>jE,$ZodEnum:()=>tre,$ZodError:()=>tO,$ZodExactOptional:()=>ire,$ZodFile:()=>rre,$ZodFunction:()=>gre,$ZodGUID:()=>dne,$ZodIPv4:()=>vne,$ZodIPv6:()=>Rne,$ZodISODate:()=>bne,$ZodISODateTime:()=>Tne,$ZodISODuration:()=>Cne,$ZodISOTime:()=>Ine,$ZodIntersection:()=>Zne,$ZodJWT:()=>Pne,$ZodKSUID:()=>Sne,$ZodLazy:()=>_re,$ZodLiteral:()=>nre,$ZodMAC:()=>xne,$ZodMap:()=>Xne,$ZodNaN:()=>pre,$ZodNanoID:()=>gne,$ZodNever:()=>Hne,$ZodNonOptional:()=>cre,$ZodNull:()=>Gne,$ZodNullable:()=>sre,$ZodNumber:()=>yj,$ZodNumberFormat:()=>Lne,$ZodObject:()=>p4e,$ZodObjectJIT:()=>Yne,$ZodOptional:()=>bj,$ZodPipe:()=>Ij,$ZodPrefault:()=>ure,$ZodPreprocess:()=>fre,$ZodPromise:()=>hre,$ZodReadonly:()=>mre,$ZodRealError:()=>rl,$ZodRecord:()=>Wne,$ZodRegistry:()=>xj,$ZodSet:()=>ere,$ZodString:()=>RT,$ZodStringFormat:()=>Wr,$ZodSuccess:()=>lre,$ZodSymbol:()=>Qne,$ZodTemplateLiteral:()=>Are,$ZodTransform:()=>ore,$ZodTuple:()=>Tj,$ZodType:()=>ln,$ZodULID:()=>Ene,$ZodURL:()=>mne,$ZodUUID:()=>pne,$ZodUndefined:()=>Fne,$ZodUnion:()=>uO,$ZodUnknown:()=>zne,$ZodVoid:()=>$ne,$ZodXID:()=>yne,$ZodXor:()=>Kne,$brand:()=>Jee,$constructor:()=>ie,$input:()=>vre,$output:()=>Cre,Doc:()=>sO,JSONSchema:()=>d6e,JSONSchemaGenerator:()=>iz,NEVER:()=>Kee,TimePrecision:()=>Nre,_any:()=>Zre,_array:()=>ooe,_base64:()=>qj,_base64url:()=>Vj,_bigint:()=>Hre,_boolean:()=>jre,_catch:()=>w2t,_check:()=>u6e,_cidrv4:()=>Hj,_cidrv6:()=>$j,_coercedBigint:()=>$re,_coercedBoolean:()=>zre,_coercedDate:()=>noe,_coercedNumber:()=>Mre,_coercedString:()=>xre,_cuid:()=>Lj,_cuid2:()=>Uj,_custom:()=>soe,_date:()=>toe,_decode:()=>rj,_decodeAsync:()=>ij,_default:()=>x2t,_discriminatedUnion:()=>g2t,_e164:()=>Yj,_email:()=>Nj,_emoji:()=>Pj,_encode:()=>nj,_encodeAsync:()=>oj,_endsWith:()=>Ix,_enum:()=>T2t,_file:()=>ioe,_float32:()=>Ure,_float64:()=>Qre,_gt:()=>dA,_gte:()=>lc,_guid:()=>fO,_includes:()=>Tx,_int:()=>Lre,_int32:()=>Fre,_int64:()=>qre,_intersection:()=>h2t,_ipv4:()=>jj,_ipv6:()=>zj,_isoDate:()=>Bre,_isoDateTime:()=>wre,_isoDuration:()=>Ore,_isoTime:()=>kre,_jwt:()=>Kj,_ksuid:()=>Gj,_lazy:()=>P2t,_length:()=>NT,_literal:()=>I2t,_lowercase:()=>yx,_lt:()=>lA,_lte:()=>cd,_mac:()=>Dre,_map:()=>y2t,_max:()=>cd,_maxLength:()=>DT,_maxSize:()=>YE,_mime:()=>Cx,_min:()=>lc,_minLength:()=>sh,_minSize:()=>pA,_multipleOf:()=>VE,_nan:()=>roe,_nanoid:()=>Mj,_nativeEnum:()=>b2t,_negative:()=>Zj,_never:()=>Xre,_nonnegative:()=>Xj,_nonoptional:()=>D2t,_nonpositive:()=>Wj,_normalize:()=>vx,_null:()=>Jre,_nullable:()=>R2t,_number:()=>Pre,_optional:()=>v2t,_overwrite:()=>Mf,_parse:()=>fx,_parseAsync:()=>mx,_pipe:()=>B2t,_positive:()=>Jj,_promise:()=>M2t,_property:()=>ez,_readonly:()=>k2t,_record:()=>E2t,_refine:()=>aoe,_regex:()=>Ex,_safeDecode:()=>aj,_safeDecodeAsync:()=>cj,_safeEncode:()=>sj,_safeEncodeAsync:()=>uj,_safeParse:()=>Ax,_safeParseAsync:()=>gx,_set:()=>S2t,_size:()=>xT,_slugify:()=>Nx,_startsWith:()=>bx,_string:()=>Rre,_stringFormat:()=>wx,_stringbool:()=>doe,_success:()=>N2t,_superRefine:()=>uoe,_symbol:()=>Yre,_templateLiteral:()=>O2t,_toLowerCase:()=>xx,_toUpperCase:()=>Dx,_transform:()=>C2t,_trim:()=>Rx,_tuple:()=>_2t,_uint32:()=>Gre,_uint64:()=>Vre,_ulid:()=>Qj,_undefined:()=>Kre,_union:()=>m2t,_unknown:()=>Wre,_uppercase:()=>Sx,_url:()=>mO,_uuid:()=>wj,_uuidv4:()=>Bj,_uuidv6:()=>kj,_uuidv7:()=>Oj,_void:()=>eoe,_xid:()=>Fj,_xor:()=>A2t,clone:()=>uc,config:()=>Ii,createStandardJSONSchemaMethod:()=>Bx,createToJSONSchemaMethod:()=>poe,decode:()=>MPt,decodeAsync:()=>UPt,describe:()=>coe,encode:()=>PPt,encodeAsync:()=>LPt,extractDefs:()=>JE,finalize:()=>ZE,flattenError:()=>nO,formatError:()=>rO,globalConfig:()=>bT,globalRegistry:()=>Ga,initializeContext:()=>KE,isValidBase64:()=>wne,isValidBase64URL:()=>u4e,isValidJWT:()=>c4e,locales:()=>dO,meta:()=>loe,parse:()=>ej,parseAsync:()=>tj,prettifyError:()=>cte,process:()=>Pr,regexes:()=>ud,registry:()=>Dj,safeDecode:()=>FPt,safeDecodeAsync:()=>jPt,safeEncode:()=>QPt,safeEncodeAsync:()=>GPt,safeParse:()=>dte,safeParseAsync:()=>pte,toDotPath:()=>GFe,toJSONSchema:()=>oz,treeifyError:()=>ute,util:()=>Le,version:()=>une});var ld=B(()=>{A();IT();fte();lte();yre();Aj();cne();St();pj();Ire();pO();ane();c6e();AO();gO();l6e();p6e()});var sz={};Ws(sz,{endsWith:()=>Ix,gt:()=>dA,gte:()=>lc,includes:()=>Tx,length:()=>NT,lowercase:()=>yx,lt:()=>lA,lte:()=>cd,maxLength:()=>DT,maxSize:()=>YE,mime:()=>Cx,minLength:()=>sh,minSize:()=>pA,multipleOf:()=>VE,negative:()=>Zj,nonnegative:()=>Xj,nonpositive:()=>Wj,normalize:()=>vx,overwrite:()=>Mf,positive:()=>Jj,property:()=>ez,regex:()=>Ex,size:()=>xT,slugify:()=>Nx,startsWith:()=>bx,toLowerCase:()=>xx,toUpperCase:()=>Dx,trim:()=>Rx,uppercase:()=>Sx});var az=B(()=>{A();ld()});var kx={};Ws(kx,{ZodISODate:()=>cz,ZodISODateTime:()=>uz,ZodISODuration:()=>dz,ZodISOTime:()=>lz,date:()=>Zoe,datetime:()=>Joe,duration:()=>Xoe,time:()=>Woe});function Joe(e){return wre(uz,e)}function Zoe(e){return Bre(cz,e)}function Woe(e){return kre(lz,e)}function Xoe(e){return Ore(dz,e)}var uz,cz,lz,dz,hO=B(()=>{A();ld();EO();uz=ie("ZodISODateTime",(e,t)=>{Tne.init(e,t),Xr.init(e,t)});cz=ie("ZodISODate",(e,t)=>{bne.init(e,t),Xr.init(e,t)});lz=ie("ZodISOTime",(e,t)=>{Ine.init(e,t),Xr.init(e,t)});dz=ie("ZodISODuration",(e,t)=>{Cne.init(e,t),Xr.init(e,t)})});var f6e,Q2t,ol,eie=B(()=>{A();ld();ld();St();f6e=(e,t)=>{tO.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>rO(e,n)},flatten:{value:n=>nO(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,lx,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,lx,2)}},isEmpty:{get(){return e.issues.length===0}}})},Q2t=ie("ZodError",f6e),ol=ie("ZodError",f6e,{Parent:Error})});var tie,nie,rie,oie,iie,sie,aie,uie,cie,lie,die,pie,fie=B(()=>{A();ld();eie();tie=fx(ol),nie=mx(ol),rie=Ax(ol),oie=gx(ol),iie=nj(ol),sie=rj(ol),aie=oj(ol),uie=ij(ol),cie=sj(ol),lie=aj(ol),die=uj(ol),pie=cj(ol)});var _O={};Ws(_O,{ZodAny:()=>Sie,ZodArray:()=>Cie,ZodBase64:()=>Rz,ZodBase64URL:()=>xz,ZodBigInt:()=>Fx,ZodBigIntFormat:()=>wz,ZodBoolean:()=>Qx,ZodCIDRv4:()=>Cz,ZodCIDRv6:()=>vz,ZodCUID:()=>_z,ZodCUID2:()=>Ez,ZodCatch:()=>Vie,ZodCodec:()=>wO,ZodCustom:()=>BO,ZodCustomStringFormat:()=>Lx,ZodDate:()=>vO,ZodDefault:()=>Gie,ZodDiscriminatedUnion:()=>Rie,ZodE164:()=>Dz,ZodEmail:()=>Az,ZodEmoji:()=>gz,ZodEnum:()=>Px,ZodExactOptional:()=>Uie,ZodFile:()=>Mie,ZodFunction:()=>rse,ZodGUID:()=>SO,ZodIPv4:()=>bz,ZodIPv6:()=>Iz,ZodIntersection:()=>xie,ZodJWT:()=>Nz,ZodKSUID:()=>Tz,ZodLazy:()=>ese,ZodLiteral:()=>Pie,ZodMAC:()=>mie,ZodMap:()=>kie,ZodNaN:()=>Kie,ZodNanoID:()=>hz,ZodNever:()=>bie,ZodNonOptional:()=>Lz,ZodNull:()=>Eie,ZodNullable:()=>Fie,ZodNumber:()=>Ux,ZodNumberFormat:()=>BT,ZodObject:()=>xO,ZodOptional:()=>Mz,ZodPipe:()=>NO,ZodPrefault:()=>zie,ZodPreprocess:()=>Jie,ZodPromise:()=>nse,ZodReadonly:()=>Zie,ZodRecord:()=>Ox,ZodSet:()=>Oie,ZodString:()=>Mx,ZodStringFormat:()=>Xr,ZodSuccess:()=>qie,ZodSymbol:()=>hie,ZodTemplateLiteral:()=>Xie,ZodTransform:()=>Lie,ZodTuple:()=>Nie,ZodType:()=>wn,ZodULID:()=>yz,ZodURL:()=>CO,ZodUUID:()=>fA,ZodUndefined:()=>_ie,ZodUnion:()=>DO,ZodUnknown:()=>Tie,ZodVoid:()=>Iie,ZodXID:()=>Sz,ZodXor:()=>vie,_ZodString:()=>mz,_default:()=>jie,_function:()=>SGe,any:()=>W6e,array:()=>RO,base64:()=>P6e,base64url:()=>M6e,bigint:()=>V6e,boolean:()=>gie,catch:()=>Yie,check:()=>TGe,cidrv4:()=>k6e,cidrv6:()=>O6e,codec:()=>hGe,cuid:()=>C6e,cuid2:()=>v6e,custom:()=>bGe,date:()=>eGe,describe:()=>IGe,discriminatedUnion:()=>sGe,e164:()=>L6e,email:()=>A6e,emoji:()=>b6e,enum:()=>Oz,exactOptional:()=>Qie,file:()=>fGe,float32:()=>z6e,float64:()=>H6e,function:()=>SGe,guid:()=>g6e,hash:()=>j6e,hex:()=>G6e,hostname:()=>F6e,httpUrl:()=>T6e,instanceof:()=>vGe,int:()=>pz,int32:()=>$6e,int64:()=>Y6e,intersection:()=>Die,invertCodec:()=>_Ge,ipv4:()=>N6e,ipv6:()=>B6e,json:()=>xGe,jwt:()=>U6e,keyof:()=>tGe,ksuid:()=>D6e,lazy:()=>tse,literal:()=>pGe,looseObject:()=>oGe,looseRecord:()=>uGe,mac:()=>w6e,map:()=>cGe,meta:()=>CGe,nan:()=>gGe,nanoid:()=>I6e,nativeEnum:()=>dGe,never:()=>Bz,nonoptional:()=>$ie,null:()=>yie,nullable:()=>bO,nullish:()=>mGe,number:()=>Aie,object:()=>nGe,optional:()=>TO,partialRecord:()=>aGe,pipe:()=>fz,prefault:()=>Hie,preprocess:()=>DGe,promise:()=>yGe,readonly:()=>Wie,record:()=>Bie,refine:()=>ose,set:()=>lGe,strictObject:()=>rGe,string:()=>yO,stringFormat:()=>Q6e,stringbool:()=>RGe,success:()=>AGe,superRefine:()=>ise,symbol:()=>J6e,templateLiteral:()=>EGe,transform:()=>Pz,tuple:()=>wie,uint32:()=>q6e,uint64:()=>K6e,ulid:()=>R6e,undefined:()=>Z6e,union:()=>kz,unknown:()=>wT,url:()=>S6e,uuid:()=>h6e,uuidv4:()=>_6e,uuidv6:()=>E6e,uuidv7:()=>y6e,void:()=>X6e,xid:()=>x6e,xor:()=>iGe});function IO(e,t,n){let r=Object.getPrototypeOf(e),o=m6e.get(r);if(o||(o=new Set,m6e.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 yO(e){return Rre(Mx,e)}function A6e(e){return Nj(Az,e)}function g6e(e){return fO(SO,e)}function h6e(e){return wj(fA,e)}function _6e(e){return Bj(fA,e)}function E6e(e){return kj(fA,e)}function y6e(e){return Oj(fA,e)}function S6e(e){return mO(CO,e)}function T6e(e){return mO(CO,{protocol:ud.httpProtocol,hostname:ud.domain,...Le.normalizeParams(e)})}function b6e(e){return Pj(gz,e)}function I6e(e){return Mj(hz,e)}function C6e(e){return Lj(_z,e)}function v6e(e){return Uj(Ez,e)}function R6e(e){return Qj(yz,e)}function x6e(e){return Fj(Sz,e)}function D6e(e){return Gj(Tz,e)}function N6e(e){return jj(bz,e)}function w6e(e){return Dre(mie,e)}function B6e(e){return zj(Iz,e)}function k6e(e){return Hj(Cz,e)}function O6e(e){return $j(vz,e)}function P6e(e){return qj(Rz,e)}function M6e(e){return Vj(xz,e)}function L6e(e){return Yj(Dz,e)}function U6e(e){return Kj(Nz,e)}function Q6e(e,t,n={}){return wx(Lx,e,t,n)}function F6e(e){return wx(Lx,"hostname",ud.hostname,e)}function G6e(e){return wx(Lx,"hex",ud.hex,e)}function j6e(e,t){let n=t?.enc??"hex",r=`${e}_${n}`,o=ud[r];if(!o)throw new Error(`Unrecognized hash format: ${r}`);return wx(Lx,r,o,t)}function Aie(e){return Pre(Ux,e)}function pz(e){return Lre(BT,e)}function z6e(e){return Ure(BT,e)}function H6e(e){return Qre(BT,e)}function $6e(e){return Fre(BT,e)}function q6e(e){return Gre(BT,e)}function gie(e){return jre(Qx,e)}function V6e(e){return Hre(Fx,e)}function Y6e(e){return qre(wz,e)}function K6e(e){return Vre(wz,e)}function J6e(e){return Yre(hie,e)}function Z6e(e){return Kre(_ie,e)}function yie(e){return Jre(Eie,e)}function W6e(){return Zre(Sie)}function wT(){return Wre(Tie)}function Bz(e){return Xre(bie,e)}function X6e(e){return eoe(Iie,e)}function eGe(e){return toe(vO,e)}function RO(e,t){return ooe(Cie,e,t)}function tGe(e){let t=e._zod.def.shape;return Oz(Object.keys(t))}function nGe(e,t){let n={type:"object",shape:e??{},...Le.normalizeParams(t)};return new xO(n)}function rGe(e,t){return new xO({type:"object",shape:e,catchall:Bz(),...Le.normalizeParams(t)})}function oGe(e,t){return new xO({type:"object",shape:e,catchall:wT(),...Le.normalizeParams(t)})}function kz(e,t){return new DO({type:"union",options:e,...Le.normalizeParams(t)})}function iGe(e,t){return new vie({type:"union",options:e,inclusive:!1,...Le.normalizeParams(t)})}function sGe(e,t,n){return new Rie({type:"union",options:t,discriminator:e,...Le.normalizeParams(n)})}function Die(e,t){return new xie({type:"intersection",left:e,right:t})}function wie(e,t,n){let r=t instanceof ln,o=r?n:t,i=r?t:null;return new Nie({type:"tuple",items:e,rest:i,...Le.normalizeParams(o)})}function Bie(e,t,n){return!t||!t._zod?new Ox({type:"record",keyType:yO(),valueType:e,...Le.normalizeParams(t)}):new Ox({type:"record",keyType:e,valueType:t,...Le.normalizeParams(n)})}function aGe(e,t,n){let r=uc(e);return r._zod.values=void 0,new Ox({type:"record",keyType:r,valueType:t,...Le.normalizeParams(n)})}function uGe(e,t,n){return new Ox({type:"record",keyType:e,valueType:t,mode:"loose",...Le.normalizeParams(n)})}function cGe(e,t,n){return new kie({type:"map",keyType:e,valueType:t,...Le.normalizeParams(n)})}function lGe(e,t){return new Oie({type:"set",valueType:e,...Le.normalizeParams(t)})}function Oz(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Px({type:"enum",entries:n,...Le.normalizeParams(t)})}function dGe(e,t){return new Px({type:"enum",entries:e,...Le.normalizeParams(t)})}function pGe(e,t){return new Pie({type:"literal",values:Array.isArray(e)?e:[e],...Le.normalizeParams(t)})}function fGe(e){return ioe(Mie,e)}function Pz(e){return new Lie({type:"transform",transform:e})}function TO(e){return new Mz({type:"optional",innerType:e})}function Qie(e){return new Uie({type:"optional",innerType:e})}function bO(e){return new Fie({type:"nullable",innerType:e})}function mGe(e){return TO(bO(e))}function jie(e,t){return new Gie({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Le.shallowClone(t)}})}function Hie(e,t){return new zie({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Le.shallowClone(t)}})}function $ie(e,t){return new Lz({type:"nonoptional",innerType:e,...Le.normalizeParams(t)})}function AGe(e){return new qie({type:"success",innerType:e})}function Yie(e,t){return new Vie({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function gGe(e){return roe(Kie,e)}function fz(e,t){return new NO({type:"pipe",in:e,out:t})}function hGe(e,t,n){return new wO({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function _Ge(e){let t=e._zod.def;return new wO({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function Wie(e){return new Zie({type:"readonly",innerType:e})}function EGe(e,t){return new Xie({type:"template_literal",parts:e,...Le.normalizeParams(t)})}function tse(e){return new ese({type:"lazy",getter:e})}function yGe(e){return new nse({type:"promise",innerType:e})}function SGe(e){return new rse({type:"function",input:Array.isArray(e?.input)?wie(e?.input):e?.input??RO(wT()),output:e?.output??wT()})}function TGe(e){let t=new ro({check:"custom"});return t._zod.check=e,t}function bGe(e,t){return soe(BO,e??(()=>!0),t)}function ose(e,t={}){return aoe(BO,e,t)}function ise(e,t){return uoe(e,t)}function vGe(e,t={}){let n=new BO({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 xGe(e){let t=tse(()=>kz([yO(e),Aie(),gie(),yie(),RO(t),Bie(yO(),t)]));return t}function DGe(e,t){return new Jie({type:"pipe",in:Pz(e),out:t})}var m6e,wn,mz,Mx,Xr,Az,SO,fA,CO,gz,hz,_z,Ez,yz,Sz,Tz,bz,mie,Iz,Cz,vz,Rz,xz,Dz,Nz,Lx,Ux,BT,Qx,Fx,wz,hie,_ie,Eie,Sie,Tie,bie,Iie,vO,Cie,xO,DO,vie,Rie,xie,Nie,Ox,kie,Oie,Px,Pie,Mie,Lie,Mz,Uie,Fie,Gie,zie,Lz,qie,Vie,Kie,NO,wO,Jie,Zie,Xie,ese,nse,rse,BO,IGe,CGe,RGe,EO=B(()=>{A();ld();ld();gO();AO();az();hO();fie();m6e=new WeakMap;wn=ie("ZodType",(e,t)=>(ln.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Bx(e,"input"),output:Bx(e,"output")}}),e.toJSONSchema=poe(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>tie(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>rie(e,n,r),e.parseAsync=async(n,r)=>nie(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>oie(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>iie(e,n,r),e.decode=(n,r)=>sie(e,n,r),e.encodeAsync=async(n,r)=>aie(e,n,r),e.decodeAsync=async(n,r)=>uie(e,n,r),e.safeEncode=(n,r)=>cie(e,n,r),e.safeDecode=(n,r)=>lie(e,n,r),e.safeEncodeAsync=async(n,r)=>die(e,n,r),e.safeDecodeAsync=async(n,r)=>pie(e,n,r),IO(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(ose(n,r))},superRefine(n,r){return this.check(ise(n,r))},overwrite(n){return this.check(Mf(n))},optional(){return TO(this)},exactOptional(){return Qie(this)},nullable(){return bO(this)},nullish(){return TO(bO(this))},nonoptional(n){return $ie(this,n)},array(){return RO(this)},or(n){return kz([this,n])},and(n){return Die(this,n)},transform(n){return fz(this,Pz(n))},default(n){return jie(this,n)},prefault(n){return Hie(this,n)},catch(n){return Yie(this,n)},pipe(n){return fz(this,n)},readonly(){return Wie(this)},describe(n){let r=this.clone();return Ga.add(r,{description:n}),r},meta(...n){if(n.length===0)return Ga.get(this);let r=this.clone();return Ga.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 Ga.get(e)?.description},configurable:!0}),e)),mz=ie("_ZodString",(e,t)=>{RT.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>foe(e,r,o,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,IO(e,"_ZodString",{regex(...r){return this.check(Ex(...r))},includes(...r){return this.check(Tx(...r))},startsWith(...r){return this.check(bx(...r))},endsWith(...r){return this.check(Ix(...r))},min(...r){return this.check(sh(...r))},max(...r){return this.check(DT(...r))},length(...r){return this.check(NT(...r))},nonempty(...r){return this.check(sh(1,...r))},lowercase(r){return this.check(yx(r))},uppercase(r){return this.check(Sx(r))},trim(){return this.check(Rx())},normalize(...r){return this.check(vx(...r))},toLowerCase(){return this.check(xx())},toUpperCase(){return this.check(Dx())},slugify(){return this.check(Nx())}})}),Mx=ie("ZodString",(e,t)=>{RT.init(e,t),mz.init(e,t),e.email=n=>e.check(Nj(Az,n)),e.url=n=>e.check(mO(CO,n)),e.jwt=n=>e.check(Kj(Nz,n)),e.emoji=n=>e.check(Pj(gz,n)),e.guid=n=>e.check(fO(SO,n)),e.uuid=n=>e.check(wj(fA,n)),e.uuidv4=n=>e.check(Bj(fA,n)),e.uuidv6=n=>e.check(kj(fA,n)),e.uuidv7=n=>e.check(Oj(fA,n)),e.nanoid=n=>e.check(Mj(hz,n)),e.guid=n=>e.check(fO(SO,n)),e.cuid=n=>e.check(Lj(_z,n)),e.cuid2=n=>e.check(Uj(Ez,n)),e.ulid=n=>e.check(Qj(yz,n)),e.base64=n=>e.check(qj(Rz,n)),e.base64url=n=>e.check(Vj(xz,n)),e.xid=n=>e.check(Fj(Sz,n)),e.ksuid=n=>e.check(Gj(Tz,n)),e.ipv4=n=>e.check(jj(bz,n)),e.ipv6=n=>e.check(zj(Iz,n)),e.cidrv4=n=>e.check(Hj(Cz,n)),e.cidrv6=n=>e.check($j(vz,n)),e.e164=n=>e.check(Yj(Dz,n)),e.datetime=n=>e.check(Joe(n)),e.date=n=>e.check(Zoe(n)),e.time=n=>e.check(Woe(n)),e.duration=n=>e.check(Xoe(n))});Xr=ie("ZodStringFormat",(e,t)=>{Wr.init(e,t),mz.init(e,t)}),Az=ie("ZodEmail",(e,t)=>{fne.init(e,t),Xr.init(e,t)});SO=ie("ZodGUID",(e,t)=>{dne.init(e,t),Xr.init(e,t)});fA=ie("ZodUUID",(e,t)=>{pne.init(e,t),Xr.init(e,t)});CO=ie("ZodURL",(e,t)=>{mne.init(e,t),Xr.init(e,t)});gz=ie("ZodEmoji",(e,t)=>{Ane.init(e,t),Xr.init(e,t)});hz=ie("ZodNanoID",(e,t)=>{gne.init(e,t),Xr.init(e,t)});_z=ie("ZodCUID",(e,t)=>{hne.init(e,t),Xr.init(e,t)});Ez=ie("ZodCUID2",(e,t)=>{_ne.init(e,t),Xr.init(e,t)});yz=ie("ZodULID",(e,t)=>{Ene.init(e,t),Xr.init(e,t)});Sz=ie("ZodXID",(e,t)=>{yne.init(e,t),Xr.init(e,t)});Tz=ie("ZodKSUID",(e,t)=>{Sne.init(e,t),Xr.init(e,t)});bz=ie("ZodIPv4",(e,t)=>{vne.init(e,t),Xr.init(e,t)});mie=ie("ZodMAC",(e,t)=>{xne.init(e,t),Xr.init(e,t)});Iz=ie("ZodIPv6",(e,t)=>{Rne.init(e,t),Xr.init(e,t)});Cz=ie("ZodCIDRv4",(e,t)=>{Dne.init(e,t),Xr.init(e,t)});vz=ie("ZodCIDRv6",(e,t)=>{Nne.init(e,t),Xr.init(e,t)});Rz=ie("ZodBase64",(e,t)=>{Bne.init(e,t),Xr.init(e,t)});xz=ie("ZodBase64URL",(e,t)=>{kne.init(e,t),Xr.init(e,t)});Dz=ie("ZodE164",(e,t)=>{One.init(e,t),Xr.init(e,t)});Nz=ie("ZodJWT",(e,t)=>{Pne.init(e,t),Xr.init(e,t)});Lx=ie("ZodCustomStringFormat",(e,t)=>{Mne.init(e,t),Xr.init(e,t)});Ux=ie("ZodNumber",(e,t)=>{yj.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>moe(e,r,o,i),IO(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(cd(r,o))},max(r,o){return this.check(cd(r,o))},int(r){return this.check(pz(r))},safe(r){return this.check(pz(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(cd(0,r))},multipleOf(r,o){return this.check(VE(r,o))},step(r,o){return this.check(VE(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});BT=ie("ZodNumberFormat",(e,t)=>{Lne.init(e,t),Ux.init(e,t)});Qx=ie("ZodBoolean",(e,t)=>{aO.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Aoe(e,n,r,o)});Fx=ie("ZodBigInt",(e,t)=>{Sj.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>goe(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(cd(r,o)),e.max=(r,o)=>e.check(cd(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(cd(BigInt(0),r)),e.nonnegative=r=>e.check(lc(BigInt(0),r)),e.multipleOf=(r,o)=>e.check(VE(r,o));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});wz=ie("ZodBigIntFormat",(e,t)=>{Une.init(e,t),Fx.init(e,t)});hie=ie("ZodSymbol",(e,t)=>{Qne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hoe(e,n,r,o)});_ie=ie("ZodUndefined",(e,t)=>{Fne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Eoe(e,n,r,o)});Eie=ie("ZodNull",(e,t)=>{Gne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>_oe(e,n,r,o)});Sie=ie("ZodAny",(e,t)=>{jne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Toe(e,n,r,o)});Tie=ie("ZodUnknown",(e,t)=>{zne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>boe(e,n,r,o)});bie=ie("ZodNever",(e,t)=>{Hne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Soe(e,n,r,o)});Iie=ie("ZodVoid",(e,t)=>{$ne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>yoe(e,n,r,o)});vO=ie("ZodDate",(e,t)=>{qne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Ioe(e,r,o,i),e.min=(r,o)=>e.check(lc(r,o)),e.max=(r,o)=>e.check(cd(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});Cie=ie("ZodArray",(e,t)=>{Vne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Moe(e,n,r,o),e.element=t.element,IO(e,"ZodArray",{min(n,r){return this.check(sh(n,r))},nonempty(n){return this.check(sh(1,n))},max(n,r){return this.check(DT(n,r))},length(n,r){return this.check(NT(n,r))},unwrap(){return this.element}})});xO=ie("ZodObject",(e,t)=>{Yne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Loe(e,n,r,o),Le.defineLazy(e,"shape",()=>t.shape),IO(e,"ZodObject",{keyof(){return Oz(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:Bz()})},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(Mz,this,n[0])},required(...n){return Le.required(Lz,this,n[0])}})});DO=ie("ZodUnion",(e,t)=>{uO.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>nz(e,n,r,o),e.options=t.options});vie=ie("ZodXor",(e,t)=>{DO.init(e,t),Kne.init(e,t),e._zod.processJSONSchema=(n,r,o)=>nz(e,n,r,o),e.options=t.options});Rie=ie("ZodDiscriminatedUnion",(e,t)=>{DO.init(e,t),Jne.init(e,t)});xie=ie("ZodIntersection",(e,t)=>{Zne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Uoe(e,n,r,o)});Nie=ie("ZodTuple",(e,t)=>{Tj.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Qoe(e,n,r,o),e.rest=n=>e.clone({...e._zod.def,rest:n})});Ox=ie("ZodRecord",(e,t)=>{Wne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Foe(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});kie=ie("ZodMap",(e,t)=>{Xne.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ooe(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(YE(...n)),e.size=(...n)=>e.check(xT(...n))});Oie=ie("ZodSet",(e,t)=>{ere.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Poe(e,n,r,o),e.min=(...n)=>e.check(pA(...n)),e.nonempty=n=>e.check(pA(1,n)),e.max=(...n)=>e.check(YE(...n)),e.size=(...n)=>e.check(xT(...n))});Px=ie("ZodEnum",(e,t)=>{tre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Coe(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 Px({...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 Px({...t,checks:[],...Le.normalizeParams(o),entries:i})}});Pie=ie("ZodLiteral",(e,t)=>{nre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>voe(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]}})});Mie=ie("ZodFile",(e,t)=>{rre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Doe(e,n,r,o),e.min=(n,r)=>e.check(pA(n,r)),e.max=(n,r)=>e.check(YE(n,r)),e.mime=(n,r)=>e.check(Cx(Array.isArray(n)?n:[n],r))});Lie=ie("ZodTransform",(e,t)=>{ore.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>koe(e,n,r,o),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new jE(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)}});Mz=ie("ZodOptional",(e,t)=>{bj.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rz(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Uie=ie("ZodExactOptional",(e,t)=>{ire.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rz(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Fie=ie("ZodNullable",(e,t)=>{sre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Goe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Gie=ie("ZodDefault",(e,t)=>{are.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>zoe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});zie=ie("ZodPrefault",(e,t)=>{ure.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Hoe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Lz=ie("ZodNonOptional",(e,t)=>{cre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>joe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});qie=ie("ZodSuccess",(e,t)=>{lre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Noe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Vie=ie("ZodCatch",(e,t)=>{dre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>$oe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});Kie=ie("ZodNaN",(e,t)=>{pre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Roe(e,n,r,o)});NO=ie("ZodPipe",(e,t)=>{Ij.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>qoe(e,n,r,o),e.in=t.in,e.out=t.out});wO=ie("ZodCodec",(e,t)=>{NO.init(e,t),cO.init(e,t)});Jie=ie("ZodPreprocess",(e,t)=>{NO.init(e,t),fre.init(e,t)}),Zie=ie("ZodReadonly",(e,t)=>{mre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Voe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Xie=ie("ZodTemplateLiteral",(e,t)=>{Are.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>xoe(e,n,r,o)});ese=ie("ZodLazy",(e,t)=>{_re.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Koe(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});nse=ie("ZodPromise",(e,t)=>{hre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Yoe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});rse=ie("ZodFunction",(e,t)=>{gre.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Boe(e,n,r,o)});BO=ie("ZodCustom",(e,t)=>{Ere.init(e,t),wn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>woe(e,n,r,o)});IGe=coe,CGe=loe;RGe=(...e)=>doe({Codec:wO,Boolean:Qx,String:Mx},...e)});function j2t(e){Ii({customError:e})}function z2t(){return Ii().customError}var G2t,sse,NGe=B(()=>{A();ld();G2t={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"};sse||(sse={})});function $2t(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 q2t(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 wGe(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=q2t(o,t),s=Tu(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 wGe(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=Tu(f,t);o[l]=s.has(l)?h:h.optional()}if(e.propertyNames){let l=Tu(e.propertyNames,t),f=e.additionalProperties&&typeof e.additionalProperties=="object"?Tu(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 E of f){let T=Tu(l[E],t),v=Xe.string().regex(new RegExp(E));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 E=Xe.intersection(_[0],_[1]);for(let T=2;T<_.length;T++)E=Xe.intersection(E,_[T]);r=E}break}let u=Xe.object(o);e.additionalProperties===!1?r=u.strict():typeof e.additionalProperties=="object"?r=u.catchall(Tu(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=>Tu(l,t)),u=i&&typeof i=="object"&&!Array.isArray(i)?Tu(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=>Tu(l,t)),u=e.additionalItems&&typeof e.additionalItems=="object"?Tu(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=Tu(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 Tu(e,t){if(typeof e=="boolean")return e?Xe.any():Xe.never();let n=wGe(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=>Tu(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=>Tu(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:Tu(e.allOf[0],t),l=r?0:1;for(let f=l;f<e.allOf.length;f++)u=Xe.intersection(u,Tu(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))H2t.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 BGe(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=$2t(n,t?.defaultTarget),o=n.$defs||n.definitions||{},i={version:r,defs:o,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Ga};return Tu(n,i)}var Xe,H2t,kGe=B(()=>{A();pO();az();hO();EO();Xe={..._O,...sz,iso:kx},H2t=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 ase={};Ws(ase,{bigint:()=>J2t,boolean:()=>K2t,date:()=>Z2t,number:()=>Y2t,string:()=>V2t});function V2t(e){return xre(Mx,e)}function Y2t(e){return Mre(Ux,e)}function K2t(e){return zre(Qx,e)}function J2t(e){return $re(Fx,e)}function Z2t(e){return noe(vO,e)}var OGe=B(()=>{A();ld();EO()});var p={};Ws(p,{$brand:()=>Jee,$input:()=>vre,$output:()=>Cre,NEVER:()=>Kee,TimePrecision:()=>Nre,ZodAny:()=>Sie,ZodArray:()=>Cie,ZodBase64:()=>Rz,ZodBase64URL:()=>xz,ZodBigInt:()=>Fx,ZodBigIntFormat:()=>wz,ZodBoolean:()=>Qx,ZodCIDRv4:()=>Cz,ZodCIDRv6:()=>vz,ZodCUID:()=>_z,ZodCUID2:()=>Ez,ZodCatch:()=>Vie,ZodCodec:()=>wO,ZodCustom:()=>BO,ZodCustomStringFormat:()=>Lx,ZodDate:()=>vO,ZodDefault:()=>Gie,ZodDiscriminatedUnion:()=>Rie,ZodE164:()=>Dz,ZodEmail:()=>Az,ZodEmoji:()=>gz,ZodEnum:()=>Px,ZodError:()=>Q2t,ZodExactOptional:()=>Uie,ZodFile:()=>Mie,ZodFirstPartyTypeKind:()=>sse,ZodFunction:()=>rse,ZodGUID:()=>SO,ZodIPv4:()=>bz,ZodIPv6:()=>Iz,ZodISODate:()=>cz,ZodISODateTime:()=>uz,ZodISODuration:()=>dz,ZodISOTime:()=>lz,ZodIntersection:()=>xie,ZodIssueCode:()=>G2t,ZodJWT:()=>Nz,ZodKSUID:()=>Tz,ZodLazy:()=>ese,ZodLiteral:()=>Pie,ZodMAC:()=>mie,ZodMap:()=>kie,ZodNaN:()=>Kie,ZodNanoID:()=>hz,ZodNever:()=>bie,ZodNonOptional:()=>Lz,ZodNull:()=>Eie,ZodNullable:()=>Fie,ZodNumber:()=>Ux,ZodNumberFormat:()=>BT,ZodObject:()=>xO,ZodOptional:()=>Mz,ZodPipe:()=>NO,ZodPrefault:()=>zie,ZodPreprocess:()=>Jie,ZodPromise:()=>nse,ZodReadonly:()=>Zie,ZodRealError:()=>ol,ZodRecord:()=>Ox,ZodSet:()=>Oie,ZodString:()=>Mx,ZodStringFormat:()=>Xr,ZodSuccess:()=>qie,ZodSymbol:()=>hie,ZodTemplateLiteral:()=>Xie,ZodTransform:()=>Lie,ZodTuple:()=>Nie,ZodType:()=>wn,ZodULID:()=>yz,ZodURL:()=>CO,ZodUUID:()=>fA,ZodUndefined:()=>_ie,ZodUnion:()=>DO,ZodUnknown:()=>Tie,ZodVoid:()=>Iie,ZodXID:()=>Sz,ZodXor:()=>vie,_ZodString:()=>mz,_default:()=>jie,_function:()=>SGe,any:()=>W6e,array:()=>RO,base64:()=>P6e,base64url:()=>M6e,bigint:()=>V6e,boolean:()=>gie,catch:()=>Yie,check:()=>TGe,cidrv4:()=>k6e,cidrv6:()=>O6e,clone:()=>uc,codec:()=>hGe,coerce:()=>ase,config:()=>Ii,core:()=>ah,cuid:()=>C6e,cuid2:()=>v6e,custom:()=>bGe,date:()=>eGe,decode:()=>sie,decodeAsync:()=>uie,describe:()=>IGe,discriminatedUnion:()=>sGe,e164:()=>L6e,email:()=>A6e,emoji:()=>b6e,encode:()=>iie,encodeAsync:()=>aie,endsWith:()=>Ix,enum:()=>Oz,exactOptional:()=>Qie,file:()=>fGe,flattenError:()=>nO,float32:()=>z6e,float64:()=>H6e,formatError:()=>rO,fromJSONSchema:()=>BGe,function:()=>SGe,getErrorMap:()=>z2t,globalRegistry:()=>Ga,gt:()=>dA,gte:()=>lc,guid:()=>g6e,hash:()=>j6e,hex:()=>G6e,hostname:()=>F6e,httpUrl:()=>T6e,includes:()=>Tx,instanceof:()=>vGe,int:()=>pz,int32:()=>$6e,int64:()=>Y6e,intersection:()=>Die,invertCodec:()=>_Ge,ipv4:()=>N6e,ipv6:()=>B6e,iso:()=>kx,json:()=>xGe,jwt:()=>U6e,keyof:()=>tGe,ksuid:()=>D6e,lazy:()=>tse,length:()=>NT,literal:()=>pGe,locales:()=>dO,looseObject:()=>oGe,looseRecord:()=>uGe,lowercase:()=>yx,lt:()=>lA,lte:()=>cd,mac:()=>w6e,map:()=>cGe,maxLength:()=>DT,maxSize:()=>YE,meta:()=>CGe,mime:()=>Cx,minLength:()=>sh,minSize:()=>pA,multipleOf:()=>VE,nan:()=>gGe,nanoid:()=>I6e,nativeEnum:()=>dGe,negative:()=>Zj,never:()=>Bz,nonnegative:()=>Xj,nonoptional:()=>$ie,nonpositive:()=>Wj,normalize:()=>vx,null:()=>yie,nullable:()=>bO,nullish:()=>mGe,number:()=>Aie,object:()=>nGe,optional:()=>TO,overwrite:()=>Mf,parse:()=>tie,parseAsync:()=>nie,partialRecord:()=>aGe,pipe:()=>fz,positive:()=>Jj,prefault:()=>Hie,preprocess:()=>DGe,prettifyError:()=>cte,promise:()=>yGe,property:()=>ez,readonly:()=>Wie,record:()=>Bie,refine:()=>ose,regex:()=>Ex,regexes:()=>ud,registry:()=>Dj,safeDecode:()=>lie,safeDecodeAsync:()=>pie,safeEncode:()=>cie,safeEncodeAsync:()=>die,safeParse:()=>rie,safeParseAsync:()=>oie,set:()=>lGe,setErrorMap:()=>j2t,size:()=>xT,slugify:()=>Nx,startsWith:()=>bx,strictObject:()=>rGe,string:()=>yO,stringFormat:()=>Q6e,stringbool:()=>RGe,success:()=>AGe,superRefine:()=>ise,symbol:()=>J6e,templateLiteral:()=>EGe,toJSONSchema:()=>oz,toLowerCase:()=>xx,toUpperCase:()=>Dx,transform:()=>Pz,treeifyError:()=>ute,trim:()=>Rx,tuple:()=>wie,uint32:()=>q6e,uint64:()=>K6e,ulid:()=>R6e,undefined:()=>Z6e,union:()=>kz,unknown:()=>wT,uppercase:()=>Sx,url:()=>S6e,util:()=>Le,uuid:()=>h6e,uuidv4:()=>_6e,uuidv6:()=>E6e,uuidv7:()=>y6e,void:()=>X6e,xid:()=>x6e,xor:()=>iGe});var use=B(()=>{A();ld();EO();az();eie();fie();NGe();ld();Sre();ld();gO();kGe();Ire();hO();hO();OGe();Ii(Cj())});var pc=B(()=>{A();use();use()});var W2t,bu,cse,kT,Uz,X2t,Qz,PGe,MGe,lse,eLt,tLt,nLt,rLt,oLt,iLt,sLt,LGe,Fz=B(()=>{"use strict";A();cA();pc();W2t=Su(),bu=p.object({message:p.string()}),cse=p.record(p.string(),p.unknown()),kT=p.string().regex(/^doc_[0-9A-Za-z]{22}$/),Uz=p.string().regex(/^proj_[0-9A-Za-z]{22}$/),X2t=["active","archived"],Qz=p.enum(X2t),PGe=p.object({id:p.string().min(1),display_name:p.string().min(1)}),MGe=p.object({id:Uz,name:p.string().min(1)}),lse=p.object({id:kT,title:p.string().min(1),status:Qz,author:PGe,project:MGe.nullable(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable()}),eLt=p.object({type:p.literal("list"),list_type:p.literal("doc"),objects:p.array(lse)}),tLt=p.object({project_id:Uz.optional(),status:Qz.optional()}),nLt=p.object({title:p.string().trim().min(1).max(300).optional(),prosemirror_json:cse.optional(),project_id:Uz.nullable().optional()}),rLt=p.object({id:kT,created_at:p.string().datetime()}),oLt=p.object({title:p.string().trim().min(1).max(300).optional(),prosemirror_json:cse.optional(),project_id:Uz.nullable().optional(),status:Qz.optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),iLt=p.object({id:kT,updated_at:p.string().datetime()}),sLt=p.object({id:kT,title:p.string().min(1),prosemirror_json:cse,status:Qz,author:PGe,project:MGe.nullable(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable()}),LGe=W2t.router({listDocs:{method:"GET",path:"/docs",headers:p.object({authorization:p.string().min(1).optional()}),query:tLt,responses:{200:eLt,401:bu,403:bu},summary:"List docs in the authenticated user\u2019s organization. Optional project_id filter scopes to a single project."},createDoc:{method:"POST",path:"/docs",headers:p.object({authorization:p.string().min(1).optional()}),body:nLt,responses:{201:rLt,401:bu,403:bu,404:bu,422:bu},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:p.object({docId:kT}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:sLt,401:bu,403:bu,404:bu},summary:"Get a doc by id with its rich-text body and parent project (if any)"},updateDoc:{method:"PATCH",path:"/docs/:docId",pathParams:p.object({docId:kT}),headers:p.object({authorization:p.string().min(1).optional()}),body:oLt,responses:{200:iLt,401:bu,403:bu,404:bu,422:bu},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:p.object({docId:kT}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.object({}),401:bu,403:bu,404:bu},summary:"Hard-delete a doc and any mention references it owns"}})});var aLt,Lf,XGn,ejn,uLt,tjn,cLt,Gx,Gz=B(()=>{"use strict";A();pc();aLt=["person","foot_gun"],Lf=p.enum(aLt),XGn=p.enum(["authored","commented","edited","mentioned"]),ejn=p.enum(["observed_in","reaffirmed_in"]),uLt=["primary"],tjn=p.enum(uLt),cLt=["supports","supersedes"],Gx=p.enum(cLt)});var lLt,dse=B(()=>{"use strict";A();pc();lLt=p.object({user_id:p.string().nullable()})});var dLt,pse=B(()=>{"use strict";A();pc();dLt=p.object({typical_phrasings:p.array(p.string()).default([])})});var fse=B(()=>{"use strict";A();Gz();dse();pse();Gz();dse();pse()});var pLt,ji,dd,fLt,QGe,FGe,mLt,UGe,OT,ALt,gLt,hLt,_Lt,ELt,GGe,mse=B(()=>{"use strict";A();cA();pc();fse();pLt=Su(),ji=p.object({message:p.string()}),dd=p.string().regex(/^ent_[0-9A-Za-z]{22}$/),fLt=["active","archived"],QGe=p.enum(fLt),FGe=p.object({id:dd,kind:Lf,slug:p.string(),name:p.string(),blurb:p.string().nullable(),status:QGe,lifecycle:p.string().nullable(),human_edited_at:p.string().datetime().nullable(),last_active_at:p.string().datetime(),created_at:p.string().datetime(),updated_at:p.string().datetime()}),mLt=p.object({thread_id:p.string(),thread_title:p.string(),role:p.string(),score:p.number().nullable(),added_at:p.string().datetime(),added_by:p.object({id:p.string(),display_name:p.string()})}),UGe=p.object({entity_id:dd,name:p.string(),slug:p.string(),kind:Lf,edge_kind:Gx}),OT=FGe.extend({payload:p.record(p.string(),p.unknown()),attachments:p.array(mLt),edges:p.object({outgoing:p.array(UGe),incoming:p.array(UGe)})}),ALt=p.object({type:p.literal("list"),list_type:p.literal("entities"),has_more:p.boolean(),objects:p.array(FGe)}),gLt=p.object({kind:Lf.optional().describe("Filter to a single entity kind"),status:QGe.optional().describe("Filter by entity status"),after:dd.optional().describe("Cursor: return entities after this id"),before:dd.optional().describe("Cursor: return entities before this id")}),hLt=p.object({name:p.string().min(1).optional().describe("New display name for the entity"),blurb:p.string().nullable().optional().describe("New blurb; null clears it"),payload:p.record(p.string(),p.unknown()).optional().describe("Replacement payload for the entity")}),_Lt=p.object({thread_id:p.string().min(1).describe("Id of the thread to attach"),role:p.string().min(1).describe("Role of the thread relative to the entity"),score:p.number().min(0).max(1).nullable().optional().describe("Optional relevance score in [0, 1]")}),ELt=p.object({to_id:dd.describe("Id of the target entity for the edge"),kind:Gx.describe("Kind of edge to create")}),GGe=pLt.router({listEntities:{method:"GET",path:"/entities",headers:p.object({authorization:p.string().min(1).optional()}),query:gLt,responses:{200:ALt,401:ji},summary:"List entities in the authenticated user\u2019s organization"},getEntity:{method:"GET",path:"/entities/:entityId",pathParams:p.object({entityId:dd.describe("Id of the entity to fetch")}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:OT,401:ji,404:ji},summary:"Get an entity with its payload, attachments, and edges"},patchEntity:{method:"PATCH",path:"/entities/:entityId",pathParams:p.object({entityId:dd.describe("Id of the entity to update")}),headers:p.object({authorization:p.string().min(1).optional()}),body:hLt,responses:{200:OT,401:ji,403:ji,404:ji},summary:"Update an entity\u2019s name, blurb, or payload"},archiveEntity:{method:"POST",path:"/entities/:entityId/archive",pathParams:p.object({entityId:dd.describe("Id of the entity to archive")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}),responses:{200:OT,401:ji,403:ji,404:ji},summary:"Archive an entity"},attachEntityThread:{method:"POST",path:"/entities/:entityId/threads",pathParams:p.object({entityId:dd.describe("Id of the entity to attach a thread to")}),headers:p.object({authorization:p.string().min(1).optional()}),body:_Lt,responses:{200:OT,401:ji,403:ji,404:ji},summary:"Attach a thread to an entity"},detachEntityThread:{method:"DELETE",path:"/entities/:entityId/threads/:threadId",pathParams:p.object({entityId:dd.describe("Id of the entity to detach a thread from"),threadId:p.string().min(1).describe("Id of the thread to detach")}),headers:p.object({authorization:p.string().min(1).optional()}),query:p.object({role:p.string().min(1).describe("Role of the thread membership to remove")}),responses:{200:OT,401:ji,403:ji,404:ji},summary:"Detach a thread from an entity"},addEntityEdge:{method:"POST",path:"/entities/:entityId/edges",pathParams:p.object({entityId:dd.describe("Id of the source entity for the edge")}),headers:p.object({authorization:p.string().min(1).optional()}),body:ELt,responses:{200:OT,401:ji,403:ji,404:ji},summary:"Add an edge from this entity to another entity"},removeEntityEdge:{method:"DELETE",path:"/entities/:entityId/edges/:toId/:kind",pathParams:p.object({entityId:dd.describe("Id of the source entity for the edge"),toId:dd.describe("Id of the target entity for the edge"),kind:Gx.describe("Kind of edge to remove")}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:OT,401:ji,403:ji,404:ji},summary:"Remove an edge from this entity to another entity"}})});var yLt,SLt,pa,jGe,TLt,bLt,ILt,CLt,zGe,vLt,RLt,HGe,Ase=B(()=>{"use strict";A();cA();pc();yLt=Su(),SLt=p.object({type:p.literal("list"),list_type:p.literal("thread"),has_more:p.boolean(),objects:p.array(p.unknown())}),pa=p.object({message:p.string()}),jGe=p.object({thread_id:p.string().min(1),is_favorited:p.boolean(),favorited_at:p.string().datetime().nullable()}),TLt=p.object({before:p.string().min(1).max(64).optional()}),bLt=p.object({id:p.string().min(1),display_name:p.string().min(1)}),ILt=p.object({block_id:p.string().min(1),thread_id:p.string().min(1),thread_title:p.string(),thread_visibility:p.enum(["private","workspace","public"]),author:bLt,preview:p.string(),prompted_at:p.string().datetime().nullable(),favorited_at:p.string().datetime()}),CLt=p.object({type:p.literal("list"),list_type:p.literal("favorite_prompt"),has_more:p.boolean(),objects:p.array(ILt)}),zGe=p.object({block_id:p.string().min(1),thread_id:p.string().min(1).nullable(),is_favorited:p.boolean(),favorited_at:p.string().datetime().nullable()}),vLt=p.object({before:p.string().min(1).max(64).optional()}),RLt=p.object({block_ids:p.array(p.string().min(1))}),HGe=yLt.router({addThreadFavorite:{method:"POST",path:"/threads/:id/favorite",pathParams:p.object({id:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{201:jGe,401:pa,403:pa,404:pa},summary:"Bookmark a thread for the authenticated user. Idempotent \u2014 re-favoriting returns the existing membership."},removeThreadFavorite:{method:"DELETE",path:"/threads/:id/favorite",pathParams:p.object({id:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:jGe,401:pa,403:pa,404:pa},summary:"Remove a thread bookmark for the authenticated user (no-op if absent)."},listFavoriteThreads:{method:"GET",path:"/favorites/threads",headers:p.object({authorization:p.string().min(1).optional()}),query:TLt,responses:{200:SLt,401:pa,403:pa},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:p.object({id:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{201:zGe,401:pa,403:pa,404:pa,409:pa},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:p.object({id:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:zGe,401:pa,404:pa},summary:"Remove a prompt bookmark for the authenticated user (no-op if absent)."},listFavoritePrompts:{method:"GET",path:"/favorites/prompts",headers:p.object({authorization:p.string().min(1).optional()}),query:vLt,responses:{200:CLt,401:pa},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:p.object({id:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:RLt,401:pa,403:pa,404:pa},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 xLt,jz,DLt,zz,NLt,wLt,BLt,kLt,OLt,PLt,MLt,LLt,$Ge,gse=B(()=>{"use strict";A();cA();pc();xLt=Su(),jz=p.object({message:p.string()}),DLt=["thread","plan","doc","user"],zz=p.enum(DLt),NLt=["doc","project"],wLt=p.enum(NLt),BLt=p.object({kind:zz,id:p.string().min(1),title:p.string().min(1),href:p.string().min(1)}),kLt=p.object({type:p.literal("list"),list_type:p.literal("mention"),objects:p.array(BLt)}),OLt=p.object({q:p.string().trim().min(1).max(50),kinds:p.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(p.array(zz).optional())}),PLt=p.object({source_kind:wLt,source_id:p.string().min(1),source_title:p.string().min(1),source_href:p.string().min(1),target_kind:zz,target_id:p.string().min(1),created_at:p.string().datetime()}),MLt=p.object({type:p.literal("list"),list_type:p.literal("backlink"),objects:p.array(PLt)}),LLt=p.object({target_kind:zz,target_id:p.string().min(1).max(64)}),$Ge=xLt.router({searchMentions:{method:"GET",path:"/mentions/search",headers:p.object({authorization:p.string().min(1).optional()}),query:OLt,responses:{200:kLt,401:jz,422:jz},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:p.object({authorization:p.string().min(1).optional()}),query:LLt,responses:{200:MLt,401:jz,403:jz},summary:"List every doc/project body in the caller\u2019s organization that mentions the given target. Newest-first."}})});var ULt,Mr,hse,il,QLt,kO,_se,qGe,FLt,GLt,jLt,zLt,HLt,$Lt,qLt,VLt,YLt,KLt,JLt,ZLt,WLt,XLt,eUt,VGe,Ese=B(()=>{"use strict";A();cA();pc();Fz();ULt=Su(),Mr=p.object({message:p.string()}),hse=p.record(p.string(),p.unknown()),il=p.string().regex(/^proj_[0-9A-Za-z]{22}$/),QLt=["active","archived"],kO=p.enum(QLt),_se=p.object({id:p.string().min(1),display_name:p.string().min(1)}),qGe=p.object({thread_id:p.string().min(1),title:p.string().min(1),added_at:p.string().datetime(),added_by:_se}),FLt=p.object({id:il,name:p.string().min(1),status:kO,author:_se,thread_count:p.number().int().nonnegative(),doc_count:p.number().int().nonnegative(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable()}),GLt=p.object({type:p.literal("list"),list_type:p.literal("project"),objects:p.array(FLt)}),jLt=p.object({status:kO.optional()}),zLt=p.object({name:p.string().trim().min(1).max(200),prosemirror_json:hse.optional()}),HLt=p.object({id:il,created_at:p.string().datetime()}),$Lt=p.object({name:p.string().trim().min(1).max(200).optional(),prosemirror_json:hse.optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),qLt=p.object({id:il,updated_at:p.string().datetime()}),VLt=p.object({archived:p.boolean()}),YLt=p.object({id:il,status:kO,archived_at:p.string().datetime().nullable()}),KLt=p.object({id:il,name:p.string().min(1),prosemirror_json:hse,status:kO,author:_se,summary:p.string().nullable(),summary_at:p.string().datetime().nullable(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable(),threads:p.array(qGe),docs:p.array(lse)}),JLt=p.object({id:il,summary:p.string(),summary_at:p.string().datetime()}),ZLt=p.object({thread_id:p.string().min(1).max(64)}),WLt=qGe,XLt=p.object({id:il,name:p.string().min(1),status:kO}),eUt=p.object({type:p.literal("list"),list_type:p.literal("thread_project"),objects:p.array(XLt)}),VGe=ULt.router({listProjects:{method:"GET",path:"/projects",headers:p.object({authorization:p.string().min(1).optional()}),query:jLt,responses:{200:GLt,401:Mr},summary:"List projects in the authenticated user\u2019s organization"},createProject:{method:"POST",path:"/projects",headers:p.object({authorization:p.string().min(1).optional()}),body:zLt,responses:{201:HLt,401:Mr,422:Mr},summary:"Create a new project in the authenticated user\u2019s organization"},getProject:{method:"GET",path:"/projects/:projectId",pathParams:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:KLt,401:Mr,403:Mr,404:Mr},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:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),body:$Lt,responses:{200:qLt,401:Mr,403:Mr,404:Mr,422:Mr},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:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),body:VLt,responses:{200:YLt,401:Mr,403:Mr,404:Mr},summary:"Archive (soft-delete) or unarchive a project"},synthesizeProject:{method:"POST",path:"/projects/:projectId/summary",pathParams:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:JLt,401:Mr,403:Mr,404:Mr,409:Mr,503:Mr},summary:"Generate (or refresh) the project\u2019s one-paragraph summary from its pinned threads. Persists to projects.summary."},addProjectThread:{method:"POST",path:"/projects/:projectId/threads",pathParams:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),body:ZLt,responses:{201:WLt,401:Mr,403:Mr,404:Mr,409:Mr,422:Mr},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:p.object({projectId:il,threadId:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.object({}),401:Mr,403:Mr,404:Mr},summary:"Remove a thread membership from a project"},listThreadProjects:{method:"GET",path:"/threads/:threadId/projects",pathParams:p.object({threadId:p.string().min(1).max(64)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:eUt,401:Mr},summary:"List the projects a thread belongs to that are visible to the viewer (org/author scope). Returns an empty list when there are none."},deleteProject:{method:"DELETE",path:"/projects/:projectId",pathParams:p.object({projectId:il}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.object({}),401:Mr,403:Mr,404:Mr},summary:"Permanently delete a project. Thread memberships and tasks are removed (FK cascade); child docs are detached (project_id set null)."}})});var tUt,$n,sl,KGe,nUt,Hz,$z,rUt,oUt,iUt,YGe,sUt,aUt,JGe,uUt,cUt,lUt,dUt,pUt,fUt,mUt,AUt,gUt,hUt,_Ut,EUt,yUt,SUt,TUt,bUt,IUt,CUt,vUt,RUt,ZGe,yse=B(()=>{"use strict";A();cA();pc();tUt=Su(),$n=p.object({message:p.string()}),sl=p.string().regex(/^reg_[0-9A-Za-z]{22}$/),KGe=p.string().min(1).max(64),nUt=["active","quiet","dormant","archived"],Hz=p.enum(nUt),$z=p.object({id:p.string().min(1),display_name:p.string().min(1),avatar_url:p.string().nullable().optional()}),rUt=p.object({id:p.string().min(1),display_name:p.string().min(1),thread_count:p.number().int().positive()}),oUt=["asked","requested","decided","corrected","shared","requirement"],iUt=p.enum(oUt),YGe=p.object({id:p.string().min(1),kind:iUt,summary:p.string(),thread_id:p.string().min(1),thread_title:p.string(),created_at:p.string().datetime()}),sUt=p.object({decided_14d:p.number().int().nonnegative(),asked_14d:p.number().int().nonnegative()}),aUt=p.object({id:sl,name:p.string().min(1),overlap_score:p.number().min(0).max(1)}),JGe=p.object({thread_id:p.string().min(1),title:p.string().min(1),is_primary:p.boolean(),added_at:p.string().datetime(),added_by:$z}),uUt=p.object({id:sl,name:p.string().min(1),blurb:p.string().nullable(),status:Hz,thread_count:p.number().int().nonnegative(),contributor_count:p.number().int().nonnegative(),comment_count:p.number().int().nonnegative(),contributors_preview:p.array($z).max(3),top_filepath:p.string().nullable(),last_active_at:p.string().datetime(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable()}),cUt=p.object({type:p.literal("list"),list_type:p.literal("region"),objects:p.array(uUt)}),lUt=p.object({status:Hz.optional()}),dUt=p.object({name:p.string().trim().min(1).max(200),blurb:p.string().trim().max(2e3).optional()}),pUt=p.object({id:sl,created_at:p.string().datetime()}),fUt=p.object({name:p.string().trim().min(1).max(200).optional(),blurb:p.string().trim().max(2e3).nullable().optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),mUt=p.object({id:sl,updated_at:p.string().datetime()}),AUt=p.object({archived:p.boolean()}),gUt=p.object({id:sl,status:Hz,archived_at:p.string().datetime().nullable()}),hUt=p.object({id:sl,name:p.string().min(1),blurb:p.string().nullable(),status:Hz,created_by:$z,thread_count:p.number().int().nonnegative(),last_active_at:p.string().datetime(),created_at:p.string().datetime(),updated_at:p.string().datetime(),archived_at:p.string().datetime().nullable(),synthesized_status:p.string().nullable(),synthesized_status_at:p.string().datetime().nullable(),threads:p.array(JGe),contributors:p.array(rUt),decisions:p.object({decided:p.array(YGe),open:p.array(YGe)}),velocity:sUt,cited_by_active_regions:p.array(aUt)}),_Ut=p.object({id:sl,synthesized_status:p.string(),synthesized_status_at:p.string().datetime()}),EUt=p.object({regions_created:p.number().int().nonnegative(),llm_dispatched:p.boolean()}),yUt=p.object({promoted_to_active:p.number().int().nonnegative(),demoted_to_quiet:p.number().int().nonnegative(),demoted_to_dormant:p.number().int().nonnegative()}),SUt=p.object({thread_id:p.string().min(1),region_id:sl,region_name:p.string().min(1),score:p.number().min(0).max(1),signal:p.enum(["file","embedding","combined"])}),TUt=p.object({thread_ids:p.array(p.string().min(1)).min(1).max(50)}),bUt=p.object({type:p.literal("list"),list_type:p.literal("region_suggestion"),objects:p.array(SUt)}),IUt=p.object({thread_id:p.string().min(1),title:p.string(),created_at:p.string().datetime(),author:$z,user_message_count:p.number().int().nonnegative(),comment_count:p.number().int().nonnegative()}),CUt=p.object({type:p.literal("list"),list_type:p.literal("unfiled_thread"),objects:p.array(IUt)}),vUt=p.object({thread_id:KGe}),RUt=JGe,ZGe=tUt.router({listRegions:{method:"GET",path:"/regions",headers:p.object({authorization:p.string().min(1).optional()}),query:lUt,responses:{200:cUt,401:$n,403:$n},summary:"List regions in the authenticated user\u2019s organization"},createRegion:{method:"POST",path:"/regions",headers:p.object({authorization:p.string().min(1).optional()}),body:dUt,responses:{201:pUt,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:p.object({regionId:sl}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:hUt,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:p.object({regionId:sl}),headers:p.object({authorization:p.string().min(1).optional()}),body:fUt,responses:{200:mUt,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:p.object({regionId:sl}),headers:p.object({authorization:p.string().min(1).optional()}),body:AUt,responses:{200:gUt,401:$n,403:$n,404:$n},summary:"Archive or unarchive a region"},addRegionThread:{method:"POST",path:"/regions/:regionId/threads",pathParams:p.object({regionId:sl}),headers:p.object({authorization:p.string().min(1).optional()}),body:vUt,responses:{201:RUt,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:p.object({authorization:p.string().min(1).optional()}),body:TUt,responses:{200:bUt,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:p.object({authorization:p.string().min(1).optional()}),query:p.object({days:p.coerce.number().int().positive().max(180).optional()}),responses:{200:CUt,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:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:yUt,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:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:EUt,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:p.object({regionId:sl}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:_Ut,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:p.object({regionId:sl,threadId:KGe}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.object({}),401:$n,403:$n,404:$n},summary:"Remove a thread membership from a region"}})});var xUt,WGe,DUt,NUt,wUt,BUt,kUt,XGe,Sse=B(()=>{"use strict";A();cA();pc();xUt=Su(),WGe=p.object({message:p.string()}),DUt=p.object({id:p.string().min(1),title:p.string(),href:p.string().min(1),author_display_name:p.string().nullable(),author_handle:p.string().nullable()}),NUt=p.object({name:p.string().min(1),usage_count:p.number().int().nonnegative(),href:p.string().min(1)}),wUt=p.object({id:p.string().min(1),display_name:p.string(),handle:p.string().nullable(),avatar_url:p.string().nullable(),href:p.string().min(1)}),BUt=p.object({type:p.literal("global_search"),threads:p.array(DUt),skills:p.array(NUt),people:p.array(wUt)}),kUt=p.object({q:p.string().trim().min(1).max(80)}),XGe=xUt.router({globalSearch:{method:"GET",path:"/search",headers:p.object({authorization:p.string().min(1).optional()}),query:kUt,responses:{200:BUt,401:WGe,422:WGe},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 Vjn,Yjn,Kjn,xo,OUt,PUt,MUt,LUt,Tse,Jjn,eje=B(()=>{"use strict";A();pc();Gz();OO();Vjn=p.enum(["thread","org","user","public"]),Yjn=p.discriminatedUnion("kind",[p.object({kind:p.literal("thread"),id:p.string().min(1)}),p.object({kind:p.literal("org"),id:p.string().min(1)}),p.object({kind:p.literal("user"),id:p.string().min(1)}),p.object({kind:p.literal("public"),id:p.string().min(1)})]),Kjn=p.enum(["thread.created","thread.completed","thread.block.appended","thread.comment.created","thread.comment.updated","thread.comment.deleted","thread.vote.cast","thread.vote.cleared","thread.participant.joined","thread.participant.left","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"]),xo=p.object({id:p.string().min(1),subjects:p.array(p.string().min(1)).min(1),actor_user_id:p.string().min(1).nullable(),created_at:p.string().datetime()}),OUt=p.object({thread_id:p.string().min(1),title:p.string(),author_id:p.string().min(1),created_at:p.string().datetime()}),PUt=p.enum(["user","assistant","tool","progress","system"]),MUt=p.enum(["claude_global","agents_global","claude_project","agents_project"]),LUt=p.literal("workspace"),Tse=p.object({skill_id:p.string().min(1),name:p.string().min(1),root_kind:MUt,version:p.number().int().positive(),content_hash:p.string().startsWith("md5:")}),Jjn=p.discriminatedUnion("type",[xo.extend({type:p.literal("thread.created"),payload:OUt}),xo.extend({type:p.literal("thread.completed"),payload:p.object({thread_id:p.string().min(1),completed_at:p.string().datetime()})}),xo.extend({type:p.literal("thread.block.appended"),payload:p.object({thread_id:p.string().min(1),block_id:p.string().min(1),block_type:PUt,excerpt:p.string().nullable()})}),xo.extend({type:p.literal("thread.comment.created"),payload:p.object({comment:p.lazy(()=>mA)})}),xo.extend({type:p.literal("thread.comment.updated"),payload:p.object({comment:p.lazy(()=>mA)})}),xo.extend({type:p.literal("thread.comment.deleted"),payload:p.object({thread_id:p.string().min(1),comment_id:p.string().min(1)})}),xo.extend({type:p.literal("thread.vote.cast"),payload:p.object({thread_id:p.string().min(1),vote_count:p.number().int().nonnegative()})}),xo.extend({type:p.literal("thread.vote.cleared"),payload:p.object({thread_id:p.string().min(1),vote_count:p.number().int().nonnegative()})}),xo.extend({type:p.literal("thread.participant.joined"),payload:p.object({thread_id:p.string().min(1),participant_user_id:p.string().min(1),role:p.enum(["owner","member"])})}),xo.extend({type:p.literal("thread.participant.left"),payload:p.object({thread_id:p.string().min(1),participant_user_id:p.string().min(1)})}),xo.extend({type:p.literal("user.followed"),payload:p.object({followee_id:p.string().min(1),followee_handle:p.string().nullable(),followee_display_name:p.string().nullable()})}),xo.extend({type:p.literal("user.joined"),payload:p.object({organization_id:p.string().min(1).nullable(),organization_name:p.string().nullable()})}),xo.extend({type:p.literal("user.presence"),payload:p.object({status:p.literal("online")})}),xo.extend({type:p.literal("entity.created"),payload:p.object({entity_id:p.string().min(1),kind:Lf,slug:p.string().min(1),name:p.string().min(1)})}),xo.extend({type:p.literal("entity.updated"),payload:p.object({entity_id:p.string().min(1),kind:Lf,changed_fields:p.array(p.string()).min(1),actor:p.enum(["agent","human"])})}),xo.extend({type:p.literal("entity.archived"),payload:p.object({entity_id:p.string().min(1),kind:Lf})}),xo.extend({type:p.literal("entity.thread_attached"),payload:p.object({entity_id:p.string().min(1),kind:Lf,thread_id:p.string().min(1),role:p.string().min(1),score:p.number().nullable()})}),xo.extend({type:p.literal("entity.thread_detached"),payload:p.object({entity_id:p.string().min(1),kind:Lf,thread_id:p.string().min(1),role:p.string().min(1)})}),xo.extend({type:p.literal("entity.linked"),payload:p.object({from_id:p.string().min(1),to_id:p.string().min(1),edge_kind:Gx})}),xo.extend({type:p.literal("entity.superseded"),payload:p.object({superseding_id:p.string().min(1),supersedes_id:p.string().min(1)})}),xo.extend({type:p.literal("skill.published"),payload:Tse.extend({visibility:LUt})}),xo.extend({type:p.literal("skill.version.accepted"),payload:Tse}),xo.extend({type:p.literal("skill.version.proposed"),payload:Tse.extend({owner_user_id:p.string().min(1),proposer_user_id:p.string().min(1)})}),xo.extend({type:p.literal("skill.version.rejected"),payload:p.object({skill_id:p.string().min(1),version:p.number().int().positive(),reviewer_user_id:p.string().min(1),proposer_user_id:p.string().min(1)})}),xo.extend({type:p.literal("skill.installation.deleted"),payload:p.object({skill_id:p.string().min(1),installation_id:p.string().min(1),user_id:p.string().min(1)})})])});var UUt,QUt,czn,FUt,GUt,lzn,q,jUt,dje,pje,fje,zUt,HUt,$Ut,tje,qUt,VUt,mje,YUt,KUt,JUt,ZUt,WUt,XUt,eQt,tQt,Aje,nQt,rQt,oQt,iQt,gje,Kz,sQt,aQt,uQt,cQt,lQt,dQt,pQt,fQt,mQt,AQt,gQt,hQt,_Qt,EQt,yQt,SQt,vse,hje,TQt,bQt,IQt,CQt,_je,vQt,RQt,xQt,DQt,NQt,wQt,Uf,BQt,kQt,OQt,PQt,MQt,LO,XE,LQt,UQt,Eje,Rse,dzn,bse,QQt,FQt,Jz,GQt,yje,Sje,jQt,PO,xse,nje,zQt,Tje,rje,HQt,$Qt,mA,qQt,VQt,YQt,KQt,JQt,ZQt,pzn,WQt,XQt,eFt,tFt,Dse,bje,nFt,rFt,oFt,iFt,sFt,aFt,Ije,uFt,cFt,lFt,dFt,pFt,fFt,mFt,Ise,AFt,gFt,hFt,MO,_Ft,EFt,yFt,SFt,TFt,bFt,IFt,CFt,vFt,RFt,xFt,DFt,NFt,wFt,oje,BFt,kFt,OFt,PFt,MFt,LFt,UFt,QFt,FFt,GFt,jFt,Vz,zFt,Cje,HFt,$Ft,qFt,VFt,YFt,KFt,JFt,ZFt,Zz,WFt,XFt,e4t,vje,t4t,n4t,r4t,o4t,i4t,s4t,a4t,u4t,c4t,ije,l4t,sje,d4t,p4t,f4t,m4t,A4t,g4t,h4t,_4t,E4t,y4t,S4t,Rje,T4t,b4t,I4t,C4t,v4t,R4t,xje,x4t,D4t,N4t,w4t,Dje,Nje,B4t,k4t,O4t,P4t,aje,M4t,L4t,U4t,Q4t,qz,F4t,G4t,j4t,z4t,H4t,$4t,q4t,V4t,Y4t,K4t,J4t,Z4t,W4t,jx,wje,Cse,X4t,e3t,t3t,n3t,r3t,uje,Yz,o3t,i3t,s3t,a3t,u3t,c3t,l3t,d3t,p3t,f3t,m3t,WE,cje,A3t,g3t,h3t,_3t,E3t,y3t,S3t,T3t,b3t,I3t,C3t,v3t,R3t,x3t,D3t,N3t,w3t,B3t,k3t,O3t,P3t,lje,M3t,Bje,L3t,U3t,Q3t,F3t,G3t,Wz,OO=B(()=>{"use strict";A();SFe();cA();pc();Fz();mse();Ase();gse();Ese();yse();Sse();eje();fse();Ese();yse();mse();Fz();gse();Ase();Sse();UUt=Su(),QUt=["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"],czn=new Set(QUt),FUt=p.object({id:p.string().uuid(),role:p.enum(["user","assistant"]),content:p.string().min(1),timestamp:p.string().datetime()}),GUt=p.object({id:p.string().uuid(),title:p.string().min(1),author:p.string().min(1),authorAvatar:p.string().min(1).max(4),model:p.string().min(1),turnCount:p.number().int().nonnegative(),createdAt:p.string().datetime(),preview:p.string()}),lzn=GUt.extend({messages:p.array(FUt)}),q=p.object({message:p.string()}),jUt=/^[a-zA-Z0-9_-]{2,32}$/,dje=p.string().regex(jUt,"Handle must be 2\u201332 characters: letters, numbers, dashes, or underscores."),pje=p.enum(["friend","events","twitter","linkedin","hacker_news","reddit","discord","youtube","google","ai_search","other"]),fje=p.object({id:p.string(),first_name:p.string().min(1),last_name:p.string().min(1),display_name:p.string().min(1),handle:p.string().nullable(),bio:p.string().max(280).nullable(),avatar_url:p.string().nullable(),banner_url:p.string().nullable(),share_new_threads_to_workspace:p.boolean(),experimental_features_enabled:p.boolean(),onboarded_at:p.string().nullable(),attribution_source:pje.nullable(),attribution_source_detail:p.string().nullable()}),zUt=p.object({email:p.string().nullable(),name:p.string().nullable(),handle:p.string().nullable(),created_at:p.string(),onboarded_at:p.string().nullable(),is_admin:p.boolean(),referred_by_user_id:p.string().nullable(),plan_tier:p.enum(["free","creator","team"]),organization_id:p.string().nullable(),signup_source:p.enum(["referral","organic"]),first_upload_at:p.string().nullable(),first_share_at:p.string().nullable(),first_cli_auth_at:p.string().nullable(),first_plugin_activated_at:p.string().nullable(),first_plugin_agent:p.string().nullable()}),HUt=p.object({group_key:p.string().min(1),properties:p.object({name:p.string(),plan_tier:p.enum(["free","creator","team"]),seat_count:p.number().int().nonnegative(),created_at:p.string(),email_domains:p.array(p.string()),default_thread_visibility:p.string(),member_count:p.number().int().nonnegative().nullable()})}),$Ut=p.object({authProviderUserId:p.string().min(1).optional(),authProviderOrganizationId:p.string().min(1).optional(),org_name:p.string().min(1).optional(),workspaceOrganizationIds:p.array(p.string().min(1)).optional(),organizations:p.array(p.object({id:p.string().min(1),authProviderOrganizationId:p.string().min(1).optional(),name:p.string().min(1)})),emailAddress:p.string().email(),name:p.string().nullable(),user:fje,is_admin:p.boolean(),is_new_signup:p.boolean(),posthog:p.object({user_properties:zUt,organization:HUt.nullable()})}),tje=p.object({workos_client_id:p.string().min(1),workos_api_origin:p.string().url()}),qUt=p.object({share_new_threads_to_workspace:p.boolean().optional(),experimental_features_enabled:p.boolean().optional(),onboarded_at:p.union([p.literal("now"),p.null()]).optional(),attribution_source:pje.nullable().optional(),attribution_source_detail:p.string().max(280).nullable().optional(),display_name:p.string().min(1).max(120).optional(),handle:dje.optional(),bio:p.string().max(280).nullable().optional(),avatar_storage_url:p.string().min(1).nullable().optional(),banner_storage_url:p.string().min(1).nullable().optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),VUt=p.object({id:p.string(),display_name:p.string(),handle:p.string().nullable(),avatar_url:p.string().nullable(),visible_thread_count:p.number().int().nonnegative(),last_active_at:p.string().datetime().nullable(),product_last_seen_at:p.string().datetime().nullable()}),mje=p.object({id:p.string().min(1),display_name:p.string().min(1),handle:p.string().nullable(),bio:p.string().max(280).nullable(),avatar_url:p.string().nullable(),banner_url:p.string().nullable(),organization_name:p.string().min(1).nullable(),created_at:p.string().min(1),visible_thread_count:p.number().int().nonnegative(),follower_count:p.number().int().nonnegative(),following_count:p.number().int().nonnegative(),published_project_count:p.number().int().nonnegative(),is_following:p.boolean(),is_self:p.boolean()}),YUt=p.object({type:p.literal("list"),list_type:p.literal("organization_member"),objects:p.array(VUt)}),KUt=p.object({email_address:p.string().email()}),JUt=p.object({email_address:p.string().email(),invitation_id:p.string().min(1)}),ZUt=p.object({organization_id:p.string().min(1),organization_name:p.string().min(1),domain:p.string().min(1),created:p.boolean()}),WUt=p.object({location:p.string().trim().min(1),contact:p.string().trim().email()}),XUt=p.object({name:p.string().trim().min(1).max(100).describe("Sender's name"),email:p.string().trim().email().max(200).describe("Reply-to email"),message:p.string().trim().min(1).max(5e3).describe("Message body"),company:p.string().max(200).optional()}),eQt=p.object({ok:p.boolean()}),tQt=p.object({location:p.string().min(1),contact:p.string().email(),created_at:p.string().datetime()}),Aje=p.enum(["general","bug","feature_request","question"]),nQt=p.object({type:Aje,message:p.string().trim().min(1).max(5e3)}),rQt=p.object({id:p.string().min(1),type:Aje,message:p.string().min(1),created_at:p.string().datetime()}),oQt=p.object({path_glob:p.string().min(1),name:p.string().min(1),description:p.string().min(1)}),iQt=p.object({repo_origin_path:p.string().min(1),building_blocks:p.array(oQt)}),gje=p.string().regex(/^th_[0-9A-Za-z]{22}$/),Kz=p.string().regex(/^tb_[0-9A-Za-z]{22}$/),sQt=p.object({id:gje,author:p.object({id:p.string().min(1),display_name:p.string().min(1)}),title:p.string().min(1),excerpt:p.string(),created_at:p.string().datetime(),repo_origin_path:p.string().min(1),latest_revision_id:Kz,revision_count:p.number().int().positive()}),aQt=p.object({id:p.string().min(1),display_name:p.string().min(1)}),uQt=p.object({id:p.string().min(1),author_id:p.string().min(1).nullable(),author:aQt.nullable(),created_at:p.string().datetime(),deleted_at:p.string().datetime().nullable(),content:p.string().min(1)}),cQt=p.object({id:p.string().min(1),thread_block_id:p.string().min(1),created_at:p.string().datetime(),resolved_at:p.string().datetime().nullable(),comments:p.array(uQt)}),lQt=p.object({thread_block_id:Kz,from_position:p.number().int().positive(),to_position:p.number().int().positive(),selected_text:p.string().min(1),content:p.string().trim().min(1)}),dQt=p.object({id:p.string().min(1)}),pQt=p.object({content:p.string().trim().min(1)}),fQt=p.object({id:p.string().min(1)}),mQt=p.object({content:p.string().trim().min(1)}),AQt=p.object({id:p.string().min(1)}),gQt=p.object({content:p.string().trim().min(1)}),hQt=p.object({id:p.string().min(1)}),_Qt=p.object({resolved:p.boolean()}),EQt=p.object({id:p.string().min(1),resolved_at:p.string().datetime().nullable()}),yQt=p.object({resolved:p.boolean()}),SQt=p.object({id:p.string().min(1),resolved_at:p.string().datetime().nullable()}),vse=p.record(p.string(),p.unknown()),hje=p.object({id:Kz,body:p.string().nullable(),created_at:p.string().datetime(),prosemirror_json:vse.nullable(),comment_threads:p.array(cQt)}),TQt=hje.extend({body:p.string(),prosemirror_json:vse}),bQt=p.object({id:gje,created_at:p.string().datetime(),repo_origin_path:p.string().min(1),author:p.object({id:p.string().min(1),display_name:p.string().min(1)}),latest_revision_id:Kz,revision_count:p.number().int().positive(),revisions:p.array(hje)}),IQt=p.object({type:p.literal("list"),list_type:p.literal("plan"),has_more:p.boolean(),objects:p.array(sQt)}),CQt=p.object({before:p.string().min(1).optional(),after:p.string().min(1).optional(),author_id:p.string().min(1).optional(),repo_origin_path:p.string().min(1).optional()}),_je=p.object({id:p.string().min(1),organization_id:p.string().min(1).nullable(),created_at:p.string().min(1),repo_origin_path:p.string().min(1),path_glob:p.string().min(1),name:p.string().min(1),description:p.string().min(1)}),vQt=p.array(_je),RQt=p.object({type:p.literal("list"),list_type:p.literal("building_block"),has_more:p.boolean(),objects:p.array(_je)}),xQt=p.object({repo_origin_path:p.string().min(1),before:p.string().min(1).optional(),after:p.string().min(1).optional()}),DQt=p.enum(["thread","building_block"]),NQt=p.object({repo_origin_path:p.string().min(1),sources:p.array(DQt).nonempty()}),wQt=p.object({type:p.literal("list"),list_type:p.literal("repository"),has_more:p.boolean(),objects:p.array(NQt)}),Uf=p.enum(["claudeCode","codex","amp","lore","cursor","cowork","unspecified"]),BQt=p.enum(["claudeCode","codex","amp","cursor","cowork","unspecified"]),kQt=p.object({uploads:p.array(p.string()),outputs:p.array(p.string())}),OQt=p.object({connected:p.boolean(),last_upload_at:p.string().nullable(),harnesses:p.array(Uf)}),PQt=["transcript","plan"],MQt=p.enum(PQt),LO=p.literal("workspace"),XE=p.enum(["claude_global","agents_global","claude_project","agents_project"]),LQt=p.object({name:p.string().min(1),description:p.string().nullable(),root_kind:XE,file_path:p.string().min(1),also_seen_at:p.array(p.string().min(1)),skill_id:p.string().min(1).optional(),local_content_hash:p.string().startsWith("md5:").optional()}),UQt=p.object({skill_id:p.string().min(1),name:p.string().min(1),description:p.string().nullable(),file_path:p.string().min(1),manifest_path:p.string().min(1)}),Eje=p.object({type:p.literal("local_skill_scanner_output"),skills:p.record(p.string(),p.array(LQt)),cowork_skills:p.record(p.string(),p.array(UQt))}),Rse=p.enum(["accepted","proposed","rejected","superseded"]),dzn=p.enum(["initial_publish","owner_update","subscriber_update"]),bse=p.object({md5:p.string().min(1).describe("Raw hex MD5 used to verify uploaded SKILL.md bytes"),name:p.string().min(1).describe("Skill directory/name, e.g. code-review"),filename:p.string().min(1).describe("Upload object filename, usually <name>/SKILL.md").optional(),description:p.string().nullable().describe("Optional skill description extracted from frontmatter").optional(),root_kind:XE.describe("Local root kind where this skill file came from"),base_version:p.number().int().positive().describe("Installed base version for local edits").optional()}),QQt=p.discriminatedUnion("sync_action",[bse.extend({sync_action:p.literal("initial_publish").describe("Publish a local skill without an existing server skill ID"),skill_id:p.never().optional()}),bse.extend({sync_action:p.literal("owner_update").describe("Publish an accepted update to an owned skill"),skill_id:p.string().min(1).describe("Existing skill ID for owner updates")}),bse.extend({sync_action:p.literal("subscriber_update").describe("Propose an update to an installed workspace skill"),skill_id:p.string().min(1).describe("Existing skill ID for subscriber update proposals")})]),FQt=p.object({md5:p.string().min(1),harness:BQt,filename:p.string().min(1).optional(),repo_origin_path:p.string().min(1).optional(),harness_internal_id:p.string().min(1).optional(),file_type:MQt.optional(),artifact_metadata:kQt.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"}),Jz=p.object({id:p.string().min(1),display_name:p.string().min(1),avatar_url:p.string().nullable()}),GQt=p.object({id:p.string().min(1),display_name:p.string().min(1)}),yje=p.object({id:p.string().min(1),author_id:p.string().min(1).nullable(),author:GQt.nullable(),created_at:p.string().datetime(),deleted_at:p.string().datetime().nullable(),content:p.string().min(1)}),Sje=p.object({id:p.string().min(1),thread_block_id:p.string().min(1),created_at:p.string().datetime(),resolved_at:p.string().datetime().nullable()}),jQt=Sje.extend({comments:p.array(yje)}),PO=p.object({id:p.string().min(1),type:p.string().min(1),index_in_thread:p.number().int().nonnegative(),isCritiqued:p.boolean(),comment_threads:p.array(jQt).optional()}).passthrough(),xse=p.object({type:p.literal("list"),list_type:p.literal("thread_block"),has_more:p.boolean(),objects:p.array(PO)}),nje=PO.extend({type:p.literal("plan"),prosemirror_json:vse,thread_file_id:p.string().min(1)}),zQt=p.union([p.literal(-1),p.literal(1)]),Tje=p.union([p.literal(-1),p.literal(0),p.literal(1)]),rje=p.object({score:p.number().int(),up_count:p.number().int().nonnegative(),down_count:p.number().int().nonnegative(),viewer_vote:Tje}),HQt=p.object({value:zQt}),$Qt=p.object({id:p.string().min(1),display_name:p.string().min(1),avatar_url:p.string().nullable()}),mA=p.object({id:p.string().min(1),thread_id:p.string().min(1),author_id:p.string().min(1).nullable(),author:$Qt.nullable(),parent_comment_id:p.string().min(1).nullable(),content:p.string(),created_at:p.string().datetime(),updated_at:p.string().datetime(),deleted_at:p.string().datetime().nullable()}),qQt=p.object({type:p.literal("list"),list_type:p.literal("thread_comment"),objects:p.array(mA)}),VQt=p.object({content:p.string().trim().min(1).max(4e3),parent_comment_id:p.string().min(1).optional()}),YQt=mA,KQt=p.object({content:p.string().trim().min(1).max(4e3)}),JQt=mA,ZQt=mA,pzn=p.discriminatedUnion("kind",[p.object({kind:p.literal("created"),thread_id:p.string().min(1),actor_user_id:p.string().min(1),version:p.number(),comment:mA}),p.object({kind:p.literal("updated"),thread_id:p.string().min(1),actor_user_id:p.string().min(1),version:p.number(),comment:mA}),p.object({kind:p.literal("deleted"),thread_id:p.string().min(1),actor_user_id:p.string().min(1),version:p.number(),comment:mA})]),WQt=p.enum(["pending","generating","ready","failed"]),XQt=p.enum(["pending","generating","ready","failed"]),eFt=p.enum(["pending","placeholder","ai","user","command","harness"]),tFt=p.enum(["pending","generating","ready","failed"]),Dse=p.enum(["pending","generating","ready","failed","disabled"]),bje=p.enum(["pending","generating","ready","failed"]),nFt=p.object({title:p.string().min(1),body:p.string().min(1),files:p.array(p.string()).optional()}),rFt=p.object({status:Dse,url:p.string().nullable(),url_expires_at:p.string().nullable(),generated_at:p.string().nullable(),model:p.string().nullable()}),oFt=p.object({status:bje,steps:p.array(nFt),generated_at:p.string().nullable()}),iFt=p.object({cover:rFt,how_to:oFt}),sFt=p.object({id:p.string().min(1),title:p.string().min(1),author:p.object({id:p.string().min(1),display_name:p.string(),handle:p.string().nullable(),avatar_url:p.string().nullable()}),cover:p.object({url:p.string(),url_expires_at:p.string()}),started_at:p.string(),cover_generated_at:p.string()}),aFt=p.object({type:p.literal("list"),list_type:p.literal("card_feed_item"),has_more:p.boolean(),objects:p.array(sFt)}),Ije=p.enum(["asked","requested","decided","corrected","shared","requirement"]),uFt=p.object({id:p.string().min(1),kind:Ije,summary:p.string().min(1),block_id:p.string().min(1)}),cFt=p.object({block_id:p.string().min(1),status:tFt,generated_at:p.string().nullable()}),lFt=p.object({type:p.literal("list"),list_type:p.literal("thread_decision"),objects:p.array(uFt),block_statuses:p.array(cFt)}),dFt=p.object({forker_intent:p.string().min(1).max(2e3).describe("What the forking user wants to do next with this session")}),pFt=p.object({source_thread_id:p.string().min(1),forker_intent:p.string(),source_distilled:p.string().min(1).describe("Intent-conditioned handoff summary of the source thread for a new agent")}),fFt=p.object({question:p.string().trim().min(1).max(2e3).describe("Question to answer from visible Lore thread decisions and titles")}),mFt=p.object({id:p.string().min(1),kind:Ije,summary:p.string().min(1),block_id:p.string().min(1)}),Ise=p.object({thread_id:p.string().min(1),title:p.string().min(1),summary:p.string().nullable(),started_at:p.string().datetime(),score:p.number(),matched_by:p.enum(["summary","decision","thread"]),decisions:p.array(mFt)}),AFt=p.object({id:p.string().min(1),kind:p.enum(["agent","tool","retrieval","answer","sources"]),title:p.string().min(1),status:p.enum(["completed"]),summary:p.string().min(1),duration_ms:p.number().nonnegative().optional(),metadata:p.object({retrieved_decisions:p.number().int().nonnegative().optional(),returned_sources:p.number().int().nonnegative().optional(),cited_sources:p.number().int().nonnegative().optional(),matched_sources:p.array(Ise).optional(),searched_query:p.string().min(1).optional(),since:p.string().min(1).optional(),until:p.string().min(1).optional(),thread_id:p.string().min(1).optional(),thread_ids:p.array(p.string().min(1)).optional(),question:p.string().min(1).optional()}).optional()}),gFt=p.object({steps:p.array(AFt)}),hFt=p.object({answer:p.string(),sources:p.array(Ise),matched_sources:p.array(Ise).describe("Threads matched by the vector decision search before citation filtering"),searched_query:p.string().describe("String embedded for the vector decision search"),trace:gFt.optional()}),MO=p.object({id:p.string().min(1),thread_file_id:p.string().min(1),organization_id:p.string().min(1).nullable(),deleted_at:p.string().datetime().nullable(),author:Jz,repo:p.string().min(1),title:p.string().min(1),started_at:p.string().min(1),last_activity_at:p.string().datetime().nullable(),blocks:xse,user_message_count:p.number().int().nonnegative(),files_touched:p.array(p.string()),skills_invoked:p.array(p.string()),slash_commands_invoked:p.array(p.string()),harness:Uf,transcript_parsing_state:p.enum(["pending","parsed","too_large_to_parse","failed"]),visibility:p.enum(["private","workspace","public"]),has_plan:p.boolean().optional(),summary:p.string().nullable(),summary_status:WQt,summary_generated_at:p.string().nullable(),title_status:XQt,title_generated_at:p.string().nullable(),title_source:eFt,score:p.number().int(),up_count:p.number().int().nonnegative(),down_count:p.number().int().nonnegative(),viewer_vote:Tje,comment_count:p.number().int().nonnegative(),is_favorited:p.boolean(),card:iFt}),_Ft=p.object({storage_url:p.string().min(1)}),EFt=p.object({storage_url:p.string().min(1)}),yFt=p.object({storage_url:p.string(),harness:Uf,thread:MO.nullable()}),SFt=p.object({status:p.literal("complete"),thread_files:p.array(yFt),skill_files:p.array(p.object({storage_url:p.string(),skill:p.object({id:p.string(),name:p.string(),version:p.number().int().positive(),latest_version:p.number().int().positive(),visibility:LO,root_kind:XE,version_status:Rse.optional(),content_hash:p.string()}).nullable()})).optional()}),TFt=p.object({id:p.string(),presigned_url:p.string().nullable(),presigned_url_expires_at:p.string().nullable(),storage_url:p.string(),harness:Uf,expected_md5:p.string(),error:p.string().nullable(),thread:MO.nullable()}),bFt=p.object({id:p.string(),presigned_url:p.string().nullable(),presigned_url_expires_at:p.string().nullable(),storage_url:p.string(),expected_md5:p.string(),name:p.string(),error:p.string().nullable()}),IFt=p.object({id:p.string(),substrate:p.enum(["s3","filesystem"]),status:p.enum(["incomplete","locked_for_parsing","complete","error"]),thread_files:p.array(TFt),skill_files:p.array(bFt).optional()}),CFt=p.object({query:p.string().min(1).describe("Natural-language description of the block or block range to highlight")}),vFt=p.object({thread_id:p.string(),url:p.string().url(),start_block_id:p.string().nullable(),end_block_id:p.string().nullable(),matched:p.boolean()}),RFt=p.object({}),xFt=p.object({thread_id:p.string().min(1)}),DFt=p.object({visibility:p.enum(["private","workspace","public"]).optional(),title:p.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"}),NFt=p.discriminatedUnion("visibility",[p.object({visibility:p.literal("private")}),p.object({visibility:p.literal("workspace")}),p.object({visibility:p.literal("public"),title:p.string().min(1),author_display_name:p.string().min(1),author_avatar_url:p.string().nullable(),first_user_message:p.string().nullable(),summary:p.string().nullable(),started_at:p.string().min(1),harness:Uf,cover_url:p.string().nullable()})]),wFt=p.object({id:p.string().min(1),author:Jz,repo:p.string().min(1),title:p.string().min(1),started_at:p.string().min(1),last_activity_at:p.string().datetime().nullable(),blocks:xse,user_message_count:p.number().int().nonnegative(),comment_count:p.number().int().nonnegative(),files_touched:p.array(p.string()),skills_invoked:p.array(p.string()),harness:Uf,visibility:p.enum(["private","workspace","public"]),has_plan:p.boolean().optional(),is_favorited:p.boolean(),participants:p.array(p.object({id:p.string().min(1),display_name:p.string(),avatar_url:p.string().nullable()})).optional()}),oje=p.object({type:p.literal("list"),list_type:p.literal("thread"),has_more:p.boolean(),objects:p.array(wFt)}),BFt=p.enum(["recent","popular"]),kFt=p.enum(["everyone","following"]),OFt=MO,PFt=p.object({type:p.literal("list"),list_type:p.literal("discover_thread"),has_more:p.boolean(),objects:p.array(OFt)}),MFt=p.object({before:p.string().min(1).optional(),after:p.string().min(1).optional(),sort:BFt.optional(),scope:kFt.optional(),harness:Uf.optional(),search:p.string().max(200).optional()}),LFt=p.object({thread_count:p.number().int().nonnegative(),author_count:p.number().int().nonnegative(),organization_count:p.number().int().nonnegative(),harness_breakdown:p.record(p.string(),p.number().int().nonnegative()).refine(e=>Object.keys(e).every(t=>Uf.safeParse(t).success),"Harness breakdown keys must be known harness values")}),UFt=p.object({id:p.string(),status:p.enum(["incomplete","locked_for_parsing","complete","error"]),created_at:p.string(),thread_count:p.number().int().nonnegative(),skill_count:p.number().int().nonnegative().default(0),thread_ids:p.array(p.string()).default([])}),QFt=p.object({type:p.literal("list"),list_type:p.literal("upload_session"),objects:p.array(UFt)}),FFt=p.object({before:p.string().min(1).optional(),after:p.string().min(1).optional()}),GFt=p.object({before:p.string().min(1).optional(),after:p.string().min(1).optional(),author_ids:p.string().min(1).optional(),created_at:p.string().min(1).optional(),filepath_prefixes:p.string().min(1).optional(),decision_kinds:p.string().min(1).optional().describe("Comma-separated decision kinds (asked, requested, decided, corrected, shared, requirement); returns threads with at least one matching decision."),q:p.string().trim().min(1).max(200).optional()}),jFt=p.object({path:p.string().min(1),start_offset:p.number().int().nonnegative(),end_offset:p.number().int().positive()}),Vz=p.object({id:p.string(),display_name:p.string(),avatar_url:p.string().nullable()}),zFt=p.object({before:p.string().min(1).optional().describe("Skill ID cursor. Returns skills newer than this cursor in descending created_at order."),after:p.string().min(1).optional().describe("Skill ID cursor. Returns skills older than this cursor in descending created_at order.")}),Cje=p.object({id:p.string(),name:p.string(),description:p.string().nullable(),visibility:LO,root_kind:XE,latest_version:p.number().int().nonnegative().nullable(),content_hash:p.string().nullable(),has_content:p.boolean(),owner:Vz.nullable(),usage_count:p.number().int().nonnegative(),author_count:p.number().int().nonnegative(),first_used_at:p.string().nullable(),last_used_at:p.string().nullable()}),HFt=p.object({type:p.literal("list"),list_type:p.literal("skill"),has_more:p.boolean(),objects:p.array(Cje)}),$Ft=p.object({skill_ids:p.string().optional().describe("Comma-separated local Lore skill IDs, e.g. sk_...,sk_..."),content_hashes:p.string().optional().describe("Comma-separated local SKILL.md content hashes, e.g. md5:...,md5:...")}),qFt=Cje.pick({id:!0,name:!0,description:!0,visibility:!0,root_kind:!0,latest_version:!0,content_hash:!0,has_content:!0,owner:!0}),VFt=p.object({type:p.literal("local_skill_reconciliation"),objects:p.array(qFt)}),YFt=p.object({id:p.string(),title:p.string(),visibility:p.enum(["private","workspace","public"]),started_at:p.string(),author:Jz,skills_invoked:p.array(p.string())}),KFt=p.object({version:p.number().int().positive().describe("Version timestamp for this SKILL.md body"),content_hash:p.string().describe("Content-addressed skill body hash, prefixed by hash type"),status:Rse.describe("Review status for this skill version"),created_at:p.string().describe("ISO-8601 timestamp when this version was uploaded"),created_by:Vz.nullable().describe("User who uploaded/proposed this version, when known"),reviewed_at:p.string().nullable().describe("ISO-8601 timestamp when the owner reviewed this version"),reviewed_by:Vz.nullable().describe("Owner who approved or rejected this version"),rejection_reason:p.string().nullable().describe("Owner-provided rejection reason for rejected versions")}),JFt=p.object({id:p.string(),name:p.string(),description:p.string().nullable(),visibility:LO,root_kind:XE,latest_version:p.number().int().nonnegative().nullable(),content_hash:p.string().nullable(),owner:Vz.nullable(),usage_count:p.number().int().nonnegative(),author_count:p.number().int().nonnegative(),first_used_at:p.string().nullable(),last_used_at:p.string().nullable(),versions:p.array(KFt),threads:p.array(YFt)}),ZFt=p.enum(["cowork","native"]),Zz=p.enum(["upload","output"]),WFt=p.enum(["private","workspace","public"]),XFt=p.object({id:p.string(),display_name:p.string(),avatar_url:p.string().nullable()}),e4t=p.object({scope:p.enum(["mine","workspace"]).optional().describe("`mine` (default) returns artifacts you authored; `workspace` returns all visible artifacts in your org."),thread_id:p.string().optional().describe("Restrict to artifacts produced by a single thread, e.g. th_..."),author_ids:p.string().optional().describe("Comma-separated user IDs to filter by author, e.g. user_...,user_..."),before:p.string().min(1).optional().describe("Artifact ID cursor. Returns artifacts newer than this cursor in descending created_at order."),after:p.string().min(1).optional().describe("Artifact ID cursor. Returns artifacts older than this cursor in descending created_at order.")}),vje=p.object({id:p.string(),thread_id:p.string(),thread_title:p.string(),source:ZFt,kind:Zz,file_name:p.string(),mime_type:p.string().nullable(),size_in_bytes:p.number().int().nonnegative().nullable(),content_hash:p.string().nullable(),visibility:WFt,owner:XFt.nullable(),created_at:p.string(),updated_at:p.string()}),t4t=p.object({type:p.literal("list"),list_type:p.literal("artifact"),has_more:p.boolean(),objects:p.array(vje)}),n4t=vje.extend({download_url:p.string().describe("Presigned, time-limited URL to download the artifact bytes."),download_url_expires_at:p.string().describe("ISO-8601 expiry for download_url.")}),r4t=p.object({kind:Zz,file_name:p.string(),md5:p.string(),size_in_bytes:p.number().int().nonnegative(),content_type:p.string().nullable().optional()}),o4t=p.object({harness:p.string().describe("Harness of the source session, e.g. cowork"),harness_internal_id:p.string().describe("Source session id (threads.harness_internal_id)"),artifact_files:p.array(r4t).min(1)}),i4t=p.object({thread_id:p.string(),artifact_files:p.array(p.object({kind:Zz,file_name:p.string(),presigned_url:p.string().nullable(),storage_url:p.string()}))}),s4t=p.object({harness:p.string(),harness_internal_id:p.string(),artifacts:p.array(p.object({kind:Zz,file_name:p.string(),storage_url:p.string(),md5:p.string(),size_in_bytes:p.number().int().nonnegative(),content_type:p.string().nullable().optional()})).min(1)}),a4t=p.object({thread_id:p.string(),created:p.number().int().nonnegative().describe("Number of artifact rows created or updated.")}),u4t=p.object({id:p.string(),name:p.string(),visibility:LO,root_kind:XE,latest_version:p.number().int().nonnegative(),content_hash:p.string()}),c4t=p.object({installation_id:p.string(),already_registered:p.boolean(),body_md_url:p.string(),skill:u4t}),ije=p.object({id:p.string(),skill_id:p.string(),installed_version:p.number().int().nonnegative().nullable(),already_registered:p.boolean().optional()}),l4t=p.object({installed_version:p.number().int().nonnegative().describe("Accepted skill version that was successfully written locally")}),sje=p.object({id:p.string(),name:p.string(),version:p.number().int().positive(),latest_version:p.number().int().positive(),visibility:LO,root_kind:XE,version_status:Rse,content_hash:p.string()}),d4t=p.object({id:p.string(),unpublished:p.literal(!0)}),p4t=p.object({reason:p.string().optional().describe("Optional owner-provided reason for rejecting the proposed version")}),f4t=p.object({id:p.string(),skill_id:p.string(),name:p.string(),description:p.string().nullable(),root_kind:XE,latest_version:p.number().int().nonnegative(),latest_content_hash:p.string(),installed_version:p.number().int().nonnegative().nullable()}),m4t=p.object({type:p.literal("list"),list_type:p.literal("skill_installation_sync"),has_more:p.boolean(),objects:p.array(f4t)}),A4t=p.object({path:p.string().min(1),text:p.string().max(64e3)}),g4t=p.enum(["text_edit","redact","delete_block"]),h4t=p.object({id:p.string(),thread_block_id:p.string(),editor:p.object({id:p.string(),display_name:p.string()}),kind:g4t,path:p.string().nullable(),previous_text:p.string().nullable(),new_text:p.string().nullable(),created_at:p.string()}),_4t=p.object({type:p.literal("list"),list_type:p.literal("thread_block_edit"),objects:p.array(h4t)}),E4t=p.object({organization_count:p.number().int().nonnegative(),user_count:p.number().int().nonnegative(),thread_count:p.number().int().nonnegative(),thread_count_last_24h:p.number().int().nonnegative(),user_count_last_24h:p.number().int().nonnegative()}),y4t=p.object({id:p.string(),name:p.string(),email_domains:p.array(p.string()),member_count:p.number().int().nonnegative(),thread_count:p.number().int().nonnegative(),default_thread_visibility:p.enum(["private","workspace","public"]),created_at:p.string()}),S4t=p.object({type:p.literal("list"),list_type:p.literal("admin_organization"),objects:p.array(y4t)}),Rje=p.object({id:p.string(),name:p.string()}),T4t=p.object({id:p.string(),display_name:p.string(),workos_id:p.string(),thread_count:p.number().int().nonnegative(),onboarded_at:p.string().nullable(),created_at:p.string(),organizations:p.array(Rje)}),b4t=p.object({q:p.string().trim().min(1).max(120).optional()}),I4t=p.object({follower_id:p.string().min(1),followee_id:p.string().min(1)}),C4t=p.object({follower_id:p.string().min(1),followee_id:p.string().min(1),is_following:p.literal(!0)}),v4t=p.object({skill_id:p.string().min(1),deleted:p.object({skills:p.number().int().nonnegative(),versions:p.number().int().nonnegative(),files:p.number().int().nonnegative(),installations:p.number().int().nonnegative()}),cli_command:p.string().min(1)}),R4t=p.object({type:p.literal("list"),list_type:p.literal("admin_user"),objects:p.array(T4t)}),xje=p.object({id:p.string(),title:p.string(),started_at:p.string(),created_at:p.string(),deleted_at:p.string().nullable(),visibility:p.enum(["private","workspace","public"]),harness:Uf,harness_internal_id:p.string(),thread_file_id:p.string(),transcript_parsing_state:p.enum(["pending","parsed","too_large_to_parse","failed"]),author:Jz,organization:Rje.nullable()}),x4t=p.object({id:p.string(),content_type:p.enum(["transcript","plan"]),harness:Uf,harness_internal_id:p.string(),expected_md5:p.string(),size_in_bytes:p.number().int().nonnegative().nullable(),created_at:p.string()}),D4t=p.object({thread:xje,latest_transcript_file:x4t.nullable()}),N4t=p.object({type:p.literal("list"),list_type:p.literal("admin_thread"),has_more:p.boolean(),objects:p.array(xje)}),w4t=p.object({before:p.string().min(1).optional(),after:p.string().min(1).optional()}),Dje=p.enum(["new","replied","dismissed"]),Nje=p.object({id:p.string(),tweet_id:p.string(),author_handle:p.string(),author_name:p.string(),author_followers:p.number().int().nonnegative(),text:p.string(),url:p.string().url(),tweet_created_at:p.string(),like_count:p.number().int().nonnegative(),retweet_count:p.number().int().nonnegative(),reply_count:p.number().int().nonnegative(),matched_query:p.string(),relevance_score:p.number().int().nullable(),relevance_reason:p.string().nullable(),status:Dje,collected_at:p.string()}),B4t=p.object({type:p.literal("list"),list_type:p.literal("admin_tweet_lead"),objects:p.array(Nje)}),k4t=p.object({status:Dje}),O4t=p.object({thread_id:p.string().min(1).optional().describe("Lore thread id, e.g. th_xxx."),thread_file_id:p.string().min(1).optional().describe("Thread file id, e.g. tf_xxx."),harness:Uf.optional().describe("Harness name, e.g. claudeCode."),harness_internal_id:p.string().min(1).optional().describe("Harness-native session id.")}),P4t=p.object({thread_id:p.string().min(1),thread_file_id:p.string().min(1),event_name:p.literal("lore/thread-files.parse.requested")}),aje=p.object({token:p.string().min(1),thread_id:p.string().min(1)}),M4t=p.object({visitor:p.string().min(1).max(64).optional()}),L4t=p.object({user_id:p.string(),display_name:p.string(),shares_sent:p.number().int().nonnegative(),unique_viewers:p.number().int().nonnegative(),attributed_signups:p.number().int().nonnegative()}),U4t=p.object({window_days:p.number().int().positive(),shares_sent:p.number().int().nonnegative(),unique_viewers:p.number().int().nonnegative(),attributed_signups:p.number().int().nonnegative(),active_sharers:p.number().int().nonnegative(),k_factor:p.number().nullable(),shares_sent_sparkline:p.array(p.number().int().nonnegative()),top_sharers:p.array(L4t)}),Q4t=p.object({windows:p.array(U4t)}),qz=p.object({period:p.string(),active:p.number().int().nonnegative()}),F4t=p.object({daily:p.array(qz),weekly:p.array(qz),monthly:p.array(qz),allTime:p.array(qz)}),G4t=p.object({quoted_text:p.string().min(1),comment:p.string().nullable(),type:p.enum(["comment","highlight:trapdoor"])}),j4t=Sje,z4t=yje.extend({comment_thread_id:p.string().min(1)}),H4t=p.object({markdown:p.string().min(1)}),$4t=p.object({storage_url:p.string().min(1),thread_file_id:p.string().min(1),parsed_plan_block:nje,critiqued_plan_block:nje,annotations:p.array(G4t),comment_threads:p.array(j4t),comments:p.array(z4t)}),q4t=p.object({key:p.string().min(1),label:p.string().min(1),description:p.string().optional(),type:p.enum(["text","textarea","url","email"]),required:p.boolean(),defaultValue:p.string()}),V4t=p.object({id:p.string().min(1),name:p.string().min(1),description:p.string().min(1),deliveryTrigger:p.string().min(1),fields:p.array(q4t),availableFormats:p.array(p.enum(["html","text"]))}),Y4t=p.object({templates:p.array(V4t)}),K4t=p.object({values:p.record(p.string(),p.string())}),J4t=p.object({subject:p.string().min(1),html:p.string().optional(),text:p.string().optional()}),Z4t=p.object({to:p.string().email().describe("Recipient email address."),values:p.record(p.string(),p.string())}),W4t=p.object({id:p.string().min(1)}),jx=p.enum(Mee),wje=p.object({workspace_scope:p.boolean(),review:p.boolean()}),Cse=p.object({subject_type:p.enum(["user","organization"]),subject_id:p.string().min(1),effective_plan:jx,admin_override:jx.nullable(),stripe_subscription_status:p.string().nullable(),cancel_at_period_end:p.boolean(),current_period_end:p.string().nullable(),seat_quantity:p.number().int().positive(),member_count:p.number().int().nonnegative().nullable(),features:wje}),X4t=p.object({effective_plan:jx,features:wje,user:Cse,organization:Cse.nullable(),is_billing_admin:p.boolean()}),e3t=p.object({plan:p.enum(["creator","team"]),seat_quantity:p.number().int().positive().optional()}),t3t=p.object({checkout_url:p.string().min(1)}),n3t=p.object({portal_url:p.string().min(1)}),r3t=p.object({seat_quantity:p.number().int().positive()}),uje=p.object({plan:jx.nullable()}),Yz=p.object({subject_type:p.enum(["user","organization"]),subject_id:p.string().min(1),label:p.string().min(1),effective_plan:jx,admin_override:jx.nullable(),stripe_subscription_status:p.string().nullable(),seat_quantity:p.number().int().positive()}),o3t=p.object({users:p.array(Yz),organizations:p.array(Yz)}),i3t=p.object({id:p.string().min(1),display_name:p.string().min(1),handle:p.string().nullable(),avatar_url:p.string().nullable()}),s3t=p.object({thread_id:p.string().min(1),title:p.string().min(1),author:i3t,last_active_at:p.string().datetime(),last_block_excerpt:p.string().nullable(),last_block_kind:p.string().min(1).nullable(),is_streaming:p.boolean()}),a3t=p.object({type:p.literal("list"),list_type:p.literal("live_thread"),objects:p.array(s3t)}),u3t=p.object({thread_id:p.string().min(1)}),c3t=p.object({thread_id:p.string().min(1),last_seen_at:p.string().datetime(),started_at:p.string().datetime()}),l3t=p.object({user_id:p.string().min(1),organization_id:p.string().min(1).nullable(),last_seen_at:p.string().datetime(),started_at:p.string().datetime()}),d3t=p.object({upload_completed:p.boolean().optional().describe("When true, also bump last_upload_at \u2014 the daemon completed an upload pass.")}),p3t=p.object({last_seen_at:p.string().datetime(),last_upload_at:p.string().datetime().nullable(),started_at:p.string().datetime()}),f3t=p.object({follower_id:p.string().min(1),followee_id:p.string().min(1),is_following:p.literal(!0),follower_count:p.number().int().nonnegative()}),m3t=p.object({follower_id:p.string().min(1),followee_id:p.string().min(1),is_following:p.literal(!1),follower_count:p.number().int().nonnegative()}),WE=p.object({id:p.string().min(1),display_name:p.string().min(1),handle:p.string().nullable(),avatar_url:p.string().nullable(),bio:p.string().max(280).nullable(),is_following:p.boolean(),is_self:p.boolean()}),cje=p.object({type:p.literal("list"),list_type:p.literal("user_follow"),objects:p.array(WE)}),A3t=WE.extend({mutuals:p.array(WE),mutual_count:p.number().int().nonnegative()}),g3t=p.object({type:p.literal("list"),list_type:p.literal("follow_suggestion"),objects:p.array(A3t)}),h3t=WE.extend({referred_at:p.string().min(1)}),_3t=p.object({type:p.literal("list"),list_type:p.literal("referral"),count:p.number().int().nonnegative(),recent:p.array(h3t)}),E3t=p.object({date:p.string().regex(/^\d{4}-\d{2}-\d{2}$/),referred:p.number().int().nonnegative(),total:p.number().int().nonnegative()}),y3t=p.object({inviter:WE,organization_name:p.string().nullable(),referred_count:p.number().int().positive(),latest_referred_at:p.string().min(1)}),S3t=p.object({inviter:WE,referee:WE,attributed_at:p.string().min(1)}),T3t=p.object({total_referred_signups:p.number().int().nonnegative(),active_inviters:p.number().int().nonnegative(),referred_signups_last_30d:p.number().int().nonnegative(),total_signups_last_30d:p.number().int().nonnegative(),daily_counts:p.array(E3t),top_inviters:p.array(y3t),recent_attributions:p.array(S3t)}),b3t=p.object({source:p.string().min(1),signups:p.number().int().nonnegative()}),I3t=p.object({sources:p.array(b3t),total_with_source:p.number().int().nonnegative(),total_without_source:p.number().int().nonnegative()}),C3t=p.object({date:p.string().regex(/^\d{4}-\d{2}-\d{2}$/),count:p.number().int().nonnegative()}),v3t=p.object({window_start:p.string().datetime(),window_end:p.string().datetime(),total_contributions:p.number().int().nonnegative(),days_active:p.number().int().nonnegative(),daily_average:p.number().nonnegative(),current_streak_days:p.number().int().nonnegative(),days:p.array(C3t)}),R3t=p.object({type:p.literal("thread_created"),occurred_at:p.string().datetime(),id:p.string().min(1),thread:p.object({id:p.string().min(1),title:p.string(),visibility:p.enum(["private","workspace","public"])})}),x3t=p.object({type:p.literal("thread_updated"),occurred_at:p.string().datetime(),id:p.string().min(1),thread:p.object({id:p.string().min(1),title:p.string(),visibility:p.enum(["private","workspace","public"])})}),D3t=p.object({type:p.literal("comment_posted"),occurred_at:p.string().datetime(),id:p.string().min(1),comment_excerpt:p.string(),thread:p.object({id:p.string().min(1),title:p.string(),visibility:p.enum(["private","workspace","public"])})}),N3t=p.object({type:p.literal("project_published"),occurred_at:p.string().datetime(),id:p.string().min(1),project:p.object({id:p.string().min(1),name:p.string().min(1)})}),w3t=p.object({type:p.literal("user_followed"),occurred_at:p.string().datetime(),id:p.string().min(1),followee:WE}),B3t=p.discriminatedUnion("type",[R3t,x3t,D3t,N3t,w3t]),k3t=p.object({type:p.literal("list"),list_type:p.literal("user_activity"),objects:p.array(B3t)}),O3t=p.object({id:p.string().min(1),name:p.string().min(1),excerpt:p.string(),published_at:p.string().datetime(),updated_at:p.string().datetime()}),P3t=p.object({type:p.literal("list"),list_type:p.literal("profile_published_project"),objects:p.array(O3t)}),lje=p.object({id:p.string().min(1),published_at:p.string().datetime().nullable()}),M3t=p.enum(["avatar","banner"]),Bje=p.enum(["image/png","image/jpeg","image/webp","image/gif"]),L3t=p.object({kind:M3t,content_type:Bje,base64_data:p.string().min(1)}),U3t=p.object({substrate:p.enum(["s3","filesystem"]),storage_url:p.string().min(1)}),Q3t=p.object({content_type:Bje,base64_data:p.string().min(1)}),F3t=p.object({cover_status:Dse,cover_url:p.string().min(1),cover_url_expires_at:p.string().min(1),cover_generated_at:p.string().min(1)}),G3t=mje,Wz=UUt.router({health:{method:"GET",path:"/health",responses:{200:p.object({status:p.literal("ok")})},summary:"Health check"},getDeepHealth:{method:"GET",path:"/health/deep",responses:{200:p.object({status:p.enum(["ok","degraded"]),environment:p.string(),checks:p.object({database:p.object({ok:p.boolean(),latencyMs:p.number().int().nonnegative().optional(),error:p.string().optional()}),migrations:p.object({ok:p.boolean(),appliedCount:p.number().int().nonnegative(),pendingCount:p.number().int().nonnegative(),latestApplied:p.string().optional(),pending:p.array(p.string())}),storage:p.object({ok:p.boolean(),bucket:p.string().optional(),error:p.string().optional()})})}),503:p.object({status:p.literal("down"),environment:p.string(),error:p.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:p.object({authorization:p.string().min(1).optional(),"x-lore-referral-token":p.string().min(1).max(16).optional(),"x-lore-invited-by-user-id":p.string().min(1).max(40).optional(),"user-agent":p.string().min(1).max(1024).optional()}),responses:{200:$Ut,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:tje,503:q},summary:"Return public WorkOS CLI Auth configuration for the Lore CLI"},getDesktopAuthConfig:{method:"GET",path:"/desktop-auth/config",responses:{200:tje,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:OQt,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:p.object({authorization:p.string().min(1).optional()}),body:u3t,responses:{200:c3t,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:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:l3t,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:p.object({authorization:p.string().min(1).optional()}),body:d3t,responses:{200:p3t,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:a3t,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:p.object({authorization:p.string().min(1).optional()}),query:GFt,responses:{200:oje,401:q},summary:"List threads visible to the authenticated user"},createThread:{method:"POST",path:"/threads",headers:p.object({authorization:p.string().min(1).optional()}),body:RFt,responses:{201:xFt,401:q},summary:"Create an empty Lore-native thread for the authenticated user"},getThread:{method:"GET",path:"/threads/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:MO,404:q},summary:"Load a visible thread by id"},getSimilarThreads:{method:"GET",path:"/threads/:id/similar",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:oje,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:p.object({id:p.string().min(1).describe("Thread id to share")}),headers:p.object({authorization:p.string().min(1).optional()}),body:CFt,responses:{200:vFt,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:p.object({authorization:p.string().min(1).optional()}),body:fFt,responses:{200:hFt,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:p.object({id:p.string().min(1).describe("Thread id or stable harness lookup id to fork")}),headers:p.object({authorization:p.string().min(1).optional()}),body:dFt,responses:{200:pFt,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),query:FFt,responses:{200:xse,401:q},summary:"List blocks for a visible thread"},createThreadBlockCommentThread:{method:"POST",path:"/threads/:threadId/blocks/:blockId/comment-threads",pathParams:p.object({threadId:p.string().min(1),blockId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:pQt,responses:{201:fQt,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:p.object({threadId:p.string().min(1),blockId:p.string().min(1),commentThreadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:gQt,responses:{201:hQt,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:p.object({threadId:p.string().min(1),blockId:p.string().min(1),commentThreadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:yQt,responses:{200:SQt,401:q,404:q},summary:"Resolve or reopen a block-level comment thread on a visible thread block"},listSkills:{method:"GET",path:"/skills",headers:p.object({authorization:p.string().min(1).optional()}),query:zFt,responses:{200:HFt,401:q},summary:"List visible workspace skills"},reconcileLocalSkills:{method:"GET",path:"/skills/reconcile-local",headers:p.object({authorization:p.string().min(1).optional()}),query:$Ft,responses:{200:VFt,401:q},summary:"Reconcile scanned local skills with visible server-side skills by ID or content hash"},getSkillDetail:{method:"GET",path:"/skills/:id",pathParams:p.object({id:p.string().min(1).describe("Stable skill ID, e.g. sk_...")}),query:p.object({include_unpublished:p.coerce.boolean().optional().describe("Allow the owner to load a soft-unpublished skill for republishing.")}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:JFt,401:q,404:q},summary:"Get visible skill details by stable skill ID"},listArtifacts:{method:"GET",path:"/artifacts",headers:p.object({authorization:p.string().min(1).optional()}),query:e4t,responses:{200:t4t,401:q},summary:"List visible artifacts (files produced by Cowork or native threads)"},getArtifactDetail:{method:"GET",path:"/artifacts/:id",pathParams:p.object({id:p.string().min(1).describe("Stable artifact ID, e.g. art_...")}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:n4t,401:q,404:q},summary:"Get a visible artifact with a presigned download URL"},presignBackfillArtifacts:{method:"POST",path:"/artifacts/backfill/presign",headers:p.object({authorization:p.string().min(1).optional()}),body:o4t,responses:{200:i4t,401:q,404:q},summary:"Presign artifact-byte uploads for an existing session thread (backfill)"},commitBackfillArtifacts:{method:"POST",path:"/artifacts/backfill/commit",headers:p.object({authorization:p.string().min(1).optional()}),body:s4t,responses:{200:a4t,401:q,404:q},summary:"Promote backfilled artifact bytes into artifact rows"},getSkillRaw:{method:"GET",path:"/skills/:id/raw",pathParams:p.object({id:p.string().min(1).describe("Stable skill ID, e.g. sk_...")}),query:p.object({version:p.coerce.number().int().positive().optional().describe("Version timestamp to download. Defaults to latest accepted version.")}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:p.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:p.object({id:p.string().min(1).describe("Workspace skill ID to install")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:c4t,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:p.object({id:p.string().min(1).describe("Workspace skill ID to uninstall")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:ije,401:q},summary:"Unregister the current user installation for a skill (idempotent)"},unpublishSkill:{method:"DELETE",path:"/skills/:id",pathParams:p.object({id:p.string().min(1).describe("Workspace skill ID to unpublish")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:d4t,401:q,403:q,404:q},summary:"Unpublish an owned workspace skill and remove it from the team catalog"},updateSkillInstallation:{method:"PATCH",path:"/skills/installations/:id",pathParams:p.object({id:p.string().min(1).describe("Stable skill installation ID, e.g. ski_...")}),headers:p.object({authorization:p.string().min(1).optional()}),body:l4t,responses:{200:ije,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:m4t,401:q},summary:"List installed skills with latest accepted version metadata"},approveSkillVersion:{method:"POST",path:"/skills/:id/versions/:version/approve",pathParams:p.object({id:p.string().min(1).describe("Workspace skill ID"),version:p.coerce.number().int().positive().describe("Proposed version timestamp to approve")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:sje,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:p.object({id:p.string().min(1).describe("Workspace skill ID"),version:p.coerce.number().int().positive().describe("Proposed version timestamp to reject")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p4t.optional(),responses:{200:sje,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:p.object({threadId:p.string().min(1),blockId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:jFt,responses:{200:PO,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:p.object({threadId:p.string().min(1),blockId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:A4t,responses:{200:PO,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:p.object({threadId:p.string().min(1),blockId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:PO,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:p.object({threadId:p.string().min(1),blockId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:_4t,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:lFt,401:q,404:q},summary:"List AI-extracted user decisions for a thread, in chronological order"},updateThread:{method:"PATCH",path:"/threads/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:DFt,responses:{200:MO,401:q,403:q,404:q},summary:"Update thread visibility (author only)"},deleteThread:{method:"DELETE",path:"/threads/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.null(),401:q,403:q,404:q},summary:"Soft-delete a thread (author only)"},generateThreadCard:{method:"POST",path:"/threads/:id/card/generate",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:p.object({cover_status:Dse,how_to_status:bje}),401:q,403:q,404:q,429:q.extend({retry_after_seconds:p.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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:Q3t,responses:{200:F3t,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:HQt,responses:{200:rje,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:rje,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:p.object({threadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:qQt,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:p.object({threadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:VQt,responses:{201:YQt,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:p.object({threadId:p.string().min(1),commentId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:KQt,responses:{200:JQt,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:p.object({threadId:p.string().min(1),commentId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:ZQt,401:q,403:q,404:q},summary:"Soft-delete your own thread comment (author only). Idempotent."},getThreadPreview:{method:"GET",path:"/threads/:id/preview",pathParams:p.object({id:p.string().min(1)}),responses:{200:NFt,404:q},summary:"Unauthenticated, visibility-redacted metadata for OG / social preview consumers"},getUser:{method:"GET",path:"/users/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:mje,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:p.object({authorization:p.string().min(1).optional()}),body:qUt,responses:{200:fje,401:q,409:q,422:q},summary:"Update the authenticated user profile"},getUserByHandle:{method:"GET",path:"/users/by-handle/:handle",pathParams:p.object({handle:dje}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:G3t,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:p.object({authorization:p.string().min(1)}),responses:{200:_3t,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),query:p.object({limit:p.coerce.number().int().positive().max(100).optional()}),responses:{200:k3t,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:v3t,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:cje,404:q},summary:"List the users following a given user."},listUserFollowing:{method:"GET",path:"/users/:id/following",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:cje,404:q},summary:"List the users a given user is following."},listFollowSuggestions:{method:"GET",path:"/users/:id/follow-suggestions",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:g3t,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:f3t,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:m3t,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:P3t,404:q},summary:"Projects the user has published to their public profile."},publishProject:{method:"POST",path:"/projects/:id/publish",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:lje,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:lje,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:p.object({authorization:p.string().min(1).optional()}),body:L3t,responses:{200:U3t,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:YUt,401:q},summary:"List members of the authenticated user\u2019s organization"},createOrganizationInvite:{method:"POST",path:"/organization/invites",headers:p.object({authorization:p.string().min(1).optional()}),body:KUt,responses:{201:JUt,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:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:ZUt,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:wQt,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:p.object({authorization:p.string().min(1).optional()}),body:iQt,responses:{201:vQt,401:q,403:q},summary:"Create building block snapshots for the authenticated user\u2019s organization"},getPlan:{method:"GET",path:"/plans/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:bQt,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:p.object({id:p.string().min(1),revisionId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:TQt,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:lQt,responses:{201:dQt,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:p.object({id:p.string().min(1),threadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:mQt,responses:{201:AQt,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:p.object({id:p.string().min(1),threadId:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:_Qt,responses:{200:EQt,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:p.object({authorization:p.string().min(1).optional()}),query:CQt,responses:{200:IQt,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:p.object({authorization:p.string().min(1).optional()}),query:xQt,responses:{200:RQt,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:QFt,401:q},summary:"List recent upload sessions for the authenticated user"},createUploadSession:{method:"POST",path:"/upload_sessions",headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({thread_files:p.array(FQt).optional(),skill_files:p.array(QQt).optional()}),responses:{201:IFt,400:q,401:q},summary:"Create an upload session with presigned URLs for file uploads"},completeUploadSession:{method:"POST",path:"/upload_sessions/:id/complete",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({thread_files:p.array(_Ft).optional(),skill_files:p.array(EFt).optional()}),responses:{200:SFt,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:E4t,401:q,403:q},summary:"Cross-org operational counts. Tanagram admins only."},adminListOrganizations:{method:"GET",path:"/admin/organizations",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:S4t,401:q,403:q},summary:"List every organization with member and thread counts. Tanagram admins only."},adminListUsers:{method:"GET",path:"/admin/users",query:b4t,headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:R4t,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:p.object({authorization:p.string().min(1).optional()}),query:w4t,responses:{200:N4t,401:q,403:q},summary:"List live threads across every organization. Tanagram admins only."},adminListTweetLeads:{method:"GET",path:"/admin/tweet-leads",headers:p.object({authorization:p.string().min(1).optional()}),responses:{200:B4t,401:q,403:q},summary:"List unreplied tweet leads from the last 24h, ranked by relevance. Tanagram admins only."},adminUpdateTweetLead:{method:"PATCH",path:"/admin/tweet-leads/:id",pathParams:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:k4t,responses:{200:Nje,401:q,403:q,404:q},summary:"Update a tweet lead status (replied/dismissed/new). Tanagram admins only."},adminLookupThread:{method:"GET",path:"/admin/threads/lookup",headers:p.object({authorization:p.string().min(1).optional()}),query:O4t,responses:{200:D4t,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:p.object({authorization:p.string().min(1).optional()}),body:I4t,responses:{200:C4t,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{204:p.null(),401:q,403:q,404:q},summary:"Permanently remove a thread. Tanagram admins only."},adminDeleteSkill:{method:"DELETE",path:"/admin/skills/:id",pathParams:p.object({id:p.string().min(1).describe("Workspace skill ID, e.g. sk_...")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:v4t,401:q,403:q,404:q},summary:"Permanently remove a skill and its sync records. Tanagram admins only."},adminReparseThreadFile:{method:"POST",path:"/admin/thread-files/:id/reparse",pathParams:p.object({id:p.string().min(1).describe("Thread file id, e.g. tf_xxx.")}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{200:P4t,401:q,403:q,404:q},summary:"Re-enqueue parsing for a thread file. Tanagram admins only."},listCardFeed:{method:"GET",path:"/cards/feed",query:p.object({limit:p.coerce.number().int().min(1).max(48).optional()}),responses:{200:aFt},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:p.object({authorization:p.string().min(1).optional()}),query:MFt,responses:{200:PFt},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:LFt},summary:"Unauthenticated rollup of public-thread counts for the Discover header."},createWaitlistEntry:{method:"POST",path:"/waitlist_entries",body:WUt,responses:{201:tQt,409:q},summary:"Create an unauthenticated waitlist entry keyed by (location, contact)."},submitContactMessage:{method:"POST",path:"/contact",body:XUt,responses:{200:eQt,429:q,503:q},summary:"Submit a contact-form message from the marketing site; emails the Lore team."},createFeedback:{method:"POST",path:"/feedback",headers:p.object({authorization:p.string().min(1).optional()}),body:nQt,responses:{201:rQt,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:p.object({}).optional(),responses:{201:aje,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:p.object({token:p.string().min(1).max(16)}),headers:p.object({authorization:p.string().min(1).optional()}),query:M4t,responses:{200:aje,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:Q4t,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:F4t,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:T3t,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:I3t,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:p.object({authorization:p.string().min(1).optional()}),body:H4t,responses:{200:$4t,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:Y4t,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:p.object({id:p.string().min(1).describe("Email template id.")}),headers:p.object({authorization:p.string().min(1).optional()}),body:K4t,responses:{200:J4t,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:p.object({id:p.string().min(1).describe("Email template id.")}),headers:p.object({authorization:p.string().min(1).optional()}),body:Z4t,responses:{200:W4t,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:X4t,401:q},summary:"Resolve the caller's plan, features, seat count, and any admin override."},createBillingCheckout:{method:"POST",path:"/billing/checkout",headers:p.object({authorization:p.string().min(1).optional()}),body:e3t,responses:{200:t3t,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:p.object({authorization:p.string().min(1).optional()}),body:p.object({subject_type:p.enum(["user","organization"]).default("user")}).optional(),responses:{200:n3t,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:p.object({authorization:p.string().min(1).optional()}),body:r3t,responses:{200:Cse,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:p.object({authorization:p.string().min(1).optional()}),responses:{200:o3t,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:uje,responses:{200:Yz,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:p.object({id:p.string().min(1)}),headers:p.object({authorization:p.string().min(1).optional()}),body:uje,responses:{200:Yz,401:q,403:q,404:q},summary:"Admin override for an organization's plan tier. Null clears the override."},projects:VGe,regions:ZGe,entities:GGe,docs:LGe,mentions:$Ge,favorites:HGe,search:XGe},{pathPrefix:"/api"})});import{AsyncLocalStorage as j3t}from"node:async_hooks";import uh from"node:fs/promises";import Oje from"node:path";function q3t(e){return Oje.join(e,"tokens-refresh.lock")}async function UO(e,t,n={}){let r=kje.getStore();if(r?.has(e))return t();let o=n.waitMs??z3t,i=n.staleMs??H3t,s=n.now??Date.now,u=n.sleep??(v=>new Promise(R=>setTimeout(R,v))),l=q3t(e),f=Oje.join(l,"owner"),h=`${process.pid}:${Date.now()}:${Math.random().toString(36).slice(2)}`,_=s(),E=!1;for(;!E;)try{await uh.mkdir(e,{recursive:!0,mode:448}),await uh.chmod(e,448).catch(()=>{}),await uh.mkdir(l,{mode:448});try{await uh.writeFile(f,h,{mode:384})}catch(v){throw await uh.rm(l,{recursive:!0,force:!0}),v}E=!0}catch(v){if(!V3t(v))throw v;if(await Y3t(l,i,s)){await uh.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($3t,o))}let T=new Set(r??[]);T.add(e);try{return await kje.run(T,t)}finally{await K3t(l,f,h)}}function Pje(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT"}function V3t(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="EEXIST"}async function Y3t(e,t,n){try{let r=await uh.stat(e);return n()-r.mtimeMs>=t}catch(r){if(Pje(r))return!1;throw r}}async function K3t(e,t,n){try{if(await uh.readFile(t,"utf8")!==n)return}catch(r){if(!Pje(r))throw r}await uh.rm(e,{recursive:!0,force:!0})}var kje,z3t,H3t,$3t,xzn,Dzn,Nzn,wzn,Bzn,kzn,Xz,Nse=B(()=>{"use strict";A();pc();kje=new j3t,z3t=3e4,H3t=6e4,$3t=100,xzn=process.env.LORE_PLUGIN_AUTHKIT_CLIENT_ID?.trim()||process.env.PLUGIN_AUTHKIT_CLIENT_ID?.trim()||"client_01KRSDB9SR20N7MB0D9MPS05Q6",Dzn=process.env.LORE_CLI_AUTHKIT_CLIENT_ID?.trim()||process.env.CLI_AUTHKIT_CLIENT_ID?.trim()||"client_01KV6K8BBANC2J3998K4DG9840",Nzn=p.object({resource:p.string(),endpoints:p.object({audience:p.string(),deviceAuthorizationEndpoint:p.string(),tokenEndpoint:p.string(),authorizationEndpoint:p.string()}),fetchedAt:p.number(),prmEtag:p.string().optional()}),wzn=p.object({resource:p.string().min(1,"`resource` must be a non-empty string"),authorization_servers:p.array(p.string())}),Bzn=p.object({issuer:p.string().min(1,"`issuer` must be a non-empty string"),token_endpoint:p.string().min(1,"`token_endpoint` must be a non-empty string"),authorization_endpoint:p.string().optional()}),kzn=p.object({access_token:p.string().min(1),refresh_token:p.string().min(1),expires_in:p.number().int().positive(),token_type:p.string().min(1),scope:p.string().optional()}),Xz=class extends Error{constructor(){super("OAuth refresh token is invalid or expired"),this.name="OAuthInvalidGrantError"}}});import yp from"node:fs";import J3t from"node:path";function wse(e){return J3t.join(e,"tokens.json")}function Z3t(e){return`${e}.tmp.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}`}function Uje(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT"}function W3t(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=Lje.safeParse(n);if(!o.success)throw new Error(`tokens file at ${t} failed schema validation: ${o.error.message}`);return o.data}let r=eH.safeParse(n);if(!r.success)throw new Error(`tokens file at ${t} failed schema validation: ${r.error.message}`);return t6t(r.data)}function X3t(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 e6t(e){let t=X3t(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 t6t(e){let t={};return e6t(e)&&(t.plugin=e),{version:2,clients:t}}function n6t(e){return JSON.stringify(Lje.parse(e))}function Bse(e){let t=wse(e),n;try{n=yp.readFileSync(t,"utf8")}catch(r){if(Uje(r))return null;throw r}return W3t(n,t)}function Qje(e,t){let n=wse(e);yp.mkdirSync(e,{recursive:!0,mode:448}),yp.chmodSync(e,448);let r=Z3t(n),o=n6t(t),i;try{i=yp.openSync(r,"w",384),yp.writeSync(i,o),yp.fchmodSync(i,384),yp.fsyncSync(i),yp.closeSync(i),i=void 0,yp.renameSync(r,n)}catch(s){if(i!==void 0)try{yp.closeSync(i)}catch{}try{yp.unlinkSync(r)}catch{}throw s}}function kse(e,t){return Bse(e)?.clients[t]??null}function r6t(e){try{return Bse(e)??{version:2,clients:{}}}catch{return{version:2,clients:{}}}}function Mje(e){try{yp.rmSync(wse(e))}catch(t){if(!Uje(t))throw t}}function Fje(e,t,n){let r=r6t(e);r.clients[t]=eH.parse(n),Qje(e,r)}function Ose(e,t){let n;try{n=Bse(e)}catch{Mje(e);return}if(!(!n||!(t in n.clients))){if(delete n.clients[t],Object.keys(n.clients).length===0){Mje(e);return}Qje(e,n)}}var eH,Lje,Pse=B(()=>{"use strict";A();pc();Nse();eH=p.object({access_token:p.string(),refresh_token:p.string(),expires_at:p.number().int(),scope:p.string().default("")}),Lje=p.object({version:p.literal(2),clients:p.record(p.string(),eH).default({})})});import o6t from"node:fs";import jje from"node:os";import zje from"node:path";function i6t(e=jje.homedir()){return zje.join(e,"Library","Application Support","tanagram","lore","tokens.json")}function Hje(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 Gje(e){try{o6t.rmSync(e)}catch(t){if(!(typeof t=="object"&&t!==null&&"code"in t&&t.code==="ENOENT"))throw t}}function tH(e,t=jje.homedir()){for(let n of s6t)Gje(zje.join(e,n));Gje(i6t(t))}var s6t,$je=B(()=>{"use strict";A();Pse();s6t=["token","refresh_token"]});var nH=B(()=>{"use strict";A();Pse();$je();Nse()});import PT from"node:fs";import zx from"node:path";function rH(e){return e.toISOString().slice(0,10)}function qje(e){let t=zx.basename(e);return t.endsWith(".log.txt")?t.slice(0,-8):t.replace(/\.txt$/,"")}function c6t(e,t){let n=zx.dirname(e),r=qje(e),o=zx.join(n,`${r}.${t}.txt`);for(let i=1;PT.existsSync(o);i++)o=zx.join(n,`${r}.${t}.${i}.txt`);return o}function l6t(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function d6t(e,t){let n=new Date(e.getTime());return n.setUTCDate(n.getUTCDate()-t),rH(n)}function p6t(e,t,n){let r=zx.dirname(e),o=qje(e),i=new RegExp(`^${l6t(o)}\\.(\\d{4}-\\d{2}-\\d{2})(?:\\.\\d+)?\\.txt$`),s=d6t(t,n),u;try{u=PT.readdirSync(r)}catch{return}for(let l of u){let f=i.exec(l);if(!(!f||f[1]>=s))try{PT.rmSync(zx.join(r,l),{force:!0})}catch{}}}function oH(e,t,n){let r=Buffer.byteLength(t);n.rotateIfNeeded(e,r),PT.appendFileSync(e,t),n.recordWrite(r)}var a6t,u6t,Hx,Mse=B(()=>{"use strict";A();a6t=50*1024*1024,u6t=30;Hx=class{liveFile=null;liveLogBytes=null;currentPeriod=null;maxBytes;retentionDays;now;constructor(t={}){this.maxBytes=t.maxBytes??a6t,this.retentionDays=t.retentionDays??u6t,this.now=t.now??(()=>new Date)}rotateIfNeeded(t,n){if(this.liveFile!==t&&(this.liveFile=t,this.liveLogBytes=null,this.currentPeriod=null),this.currentPeriod===null)try{let u=PT.statSync(t);this.liveLogBytes=u.size,this.currentPeriod=rH(u.mtime)}catch{this.liveLogBytes=0,this.currentPeriod=rH(this.now())}let r=this.now(),o=rH(r),i=this.currentPeriod!==o,s=(this.liveLogBytes??0)+n>this.maxBytes;if((i||s)&&(this.liveLogBytes??0)>0)try{PT.renameSync(t,c6t(t,this.currentPeriod??o)),p6t(t,r,this.retentionDays),this.liveLogBytes=0,this.currentPeriod=o;return}catch{try{this.liveLogBytes=PT.statSync(t).size}catch{this.liveLogBytes=0}return}this.currentPeriod=o}recordWrite(t){this.liveLogBytes=(this.liveLogBytes??0)+t}}});import{execFileSync as f6t}from"node:child_process";import{createHash as m6t}from"node:crypto";import QO from"node:os";import fa from"node:path";function Er(){if(zr()==="dev"){let t=process.env.LORE_DEV_STATE_DIR?.trim();if(t)return fa.resolve(t.replace(/^~(?=$|\/)/,QO.homedir()));let n=A6t();if(n)return fa.join(QO.homedir(),`.lore-dev-${n}`)}let e=zr()==="dev"?".lore-dev":".lore";return fa.join(QO.homedir(),e)}function A6t(){let e=Vje(process.env.LORE_DEV_STACK_NAME??"");if(e)return e;let t=g6t();return[Vje(t.split(/[\\/]/).pop()||"lore"),h6t(t)].filter(Boolean).join("-").slice(0,63)}function g6t(){try{return f6t("git",["rev-parse","--show-toplevel"],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()}catch{return fa.resolve(process.cwd(),"../..")}}function h6t(e){return m6t("sha1").update(e).digest("hex").slice(0,8)}function Vje(e){return e.toLowerCase().replace(/[^a-z0-9-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,63)}function Sp(){return fa.join(Er(),"cli.log.txt")}function FO(){return fa.join(Er(),"upload.log.txt")}function Yje(){return fa.join(Er(),"upload-daemon.lock")}function Lse(){return fa.join(Er(),"sync_state.json")}function MT(){return fa.join(Er(),"upload_filters.json")}function iH(){return fa.join(Er(),"upload_dirs.json")}function GO(){return fa.join(Er(),"status.json")}function $x(){return fa.join(Er(),"daemon_status.json")}function qx(){return fa.join(Er(),"quarantine")}function LT(){return fa.join(Er(),"install_source.json")}function ch(){return fa.join(Er(),"skill_sync_state.json")}function UT(){return fa.join(Er(),"bin","lore")}function ey(){let e=zr();return e==="prod"?"ai.tanagram.lore":`ai.tanagram.lore.${e}`}function Use(){return`${ey()}.skill-sync`}function Vx(){return fa.join(QO.homedir(),"Library","LaunchAgents",`${ey()}.plist`)}function Qse(){return fa.join(QO.homedir(),"Library","LaunchAgents",`${Use()}.plist`)}var oo=B(()=>{"use strict";A();sc()});import _6t from"node:fs";function y6t(){let e=Er();Kje!==e&&(_6t.mkdirSync(e,{recursive:!0}),Kje=e)}function S6t(e){let t=typeof e=="string"?e:JSON.stringify(e);return/[\s"=]/.test(t)?JSON.stringify(t):t}function T6t(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}=${S6t(s)}`).join(" ");return o?`${r} ${o}
|
|
106
106
|
`:`${r}
|
|
107
107
|
`}function Fse(e,t,n){try{let r=T6t(e,t,n);y6t(),oH(Sp(),r,E6t),zr()==="dev"&&process.stderr.write(r)}catch{}b6t(e,t,n)}function b6t(e,t,n){if(zr()!=="dev")try{zB[e](t,I6t(n))}catch{}}function I6t(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 Kje,E6t,z,mn=B(()=>{"use strict";A();Mse();ex();sc();oo();Kje=null,E6t=new Hx;z={info(e,t){Fse("info",e,t)},warn(e,t){Fse("warn",e,t)},error(e,t){Fse("error",e,t)}}});import ty from"node:fs";import sH from"node:path";function ny(){try{return kse(Er(),aH)}catch(e){return z.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 uH(){try{return kse(Er(),C6t)}catch(e){return z.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 Gse(){return sH.join(Er(),"analytics_distinct_id")}function Jje(){let e;try{e=ty.readFileSync(Gse(),"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 Zje(e){let t=Gse();ty.mkdirSync(sH.dirname(t),{recursive:!0,mode:448}),ty.writeFileSync(t,e,{mode:384})}function Wje(){try{ty.rmSync(Gse())}catch(e){if(e&&typeof e=="object"&&"code"in e&&e.code==="ENOENT")return;throw e}}function jse(){return sH.join(Er(),"analytics_person_properties.json")}function Xje(){let e;try{e=ty.readFileSync(jse(),"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 eze(e){let t=jse();ty.mkdirSync(sH.dirname(t),{recursive:!0,mode:448}),ty.writeFileSync(t,JSON.stringify(e),{mode:384})}function tze(){try{ty.rmSync(jse())}catch(e){if(e&&typeof e=="object"&&"code"in e&&e.code==="ENOENT")return;throw e}}function zse(){let e=process.env.LORE_CLI_ACCESS_TOKEN?.trim()??"";if(e&&!Kx(e,new Date,Yx))return{token:e,source:"env"};let t=ny()?.access_token.trim()??"";return!t||Kx(t,new Date,Yx)?{token:"",source:"none"}:{token:t,source:"file"}}function nze(){let e=uH()?.access_token.trim()??"";return!e||Kx(e,new Date,Yx)?{token:"",source:"none"}:{token:e,source:"file"}}function rze(){return ny()?.refresh_token.trim()??""}function oze(){return!!ny()?.access_token}function ize(e){let t=Er();Fje(t,aH,e),tH(t)}function sze(e){ize(e)}function cH(e,t){let n=ny();ize({access_token:e,refresh_token:t,expires_at:Hje(e)??0,scope:n?.scope??""})}function lH(){z.warn("auth_delete_access_token",{stateDir:Er()}),Ose(Er(),aH),tH(Er())}function aze(){Ose(Er(),aH),tH(Er())}function R6t(e,t){return new URL(t,e).toString()}async function x6t(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function D6t(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Token refresh failed"}async function uze({clientId:e,refreshToken:t,workosApiOrigin:n,fetch:r=globalThis.fetch}){let o=await r(R6t(n,"/user_management/authenticate"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:v6t,refresh_token:t,client_id:e})}),i=await x6t(o);if(!o.ok){let s=i,u=D6t(s);throw s.error==="invalid_grant"?new jO(u):new Error(u)}return i}function zO(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 Kx(e,t,n=0){let r;try{r=zO(e)}catch{return!1}return typeof r.exp!="number"?!1:t.getTime()+n>=r.exp*1e3}var aH,C6t,Yx,jO,v6t,QT=B(()=>{"use strict";A();nH();mn();oo();aH="cli",C6t="desktop",Yx=10*1e3;jO=class extends Error{constructor(t="Refresh token is invalid or expired"){super(t),this.name="RefreshTokenInvalidGrantError"}},v6t="refresh_token"});import{AsyncLocalStorage as N6t}from"node:async_hooks";function lze(e,t){return cze.run(e,t)}function dze(){return cze.getStore()}var cze,Hse=B(()=>{"use strict";A();cze=new N6t});function jt(e){return e instanceof Error?e.message:String(e)}function Lr(e,t){return e!==null&&typeof e=="object"&&"code"in e&&e.code===t}function Zx(){return zr()==="dev"?"pnpm dev login":"lore login"}function w6t(e){return zr()!=="dev"?e:e.replaceAll("'lore login'","'pnpm dev login'").replaceAll("`lore login`","`pnpm dev login`")}function pd(){throw new Re("")}var Re,Jx,zt=B(()=>{"use strict";A();sc();Re=class extends Error{constructor(t){super(w6t(t)),this.name="CLIError"}};Jx=class extends Re{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 B6t}from"node:timers/promises";async function HO(e,t){let n=t.limit??k6t,r=t.baseMs??pze,o=t.maxMs??fze,i=t.sleep??B6t,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;z.warn(s,{attempt:u+1,reason:t.describeRetryReason?.(f)??"retryable_error",...t.logFields})}await i(O6t(u,{baseMs:r,maxMs:o}))}throw new Error("fetchWithRetry: unreachable")}function O6t(e,{baseMs:t=pze,maxMs:n=fze}={}){let r=Math.min(t*2**e,n),o=Math.floor(r/2);return o+Math.floor(Math.random()*o)}function Wx(e){return e instanceof TypeError?e.message==="fetch failed"||e.message==="terminated":!1}function $O(e){return mze(e,P6t)}function qO(e){return mze(e,M6t)}function mze(e,t){if(!Wx(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 VO(e){if(!Wx(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 dH(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 k6t,pze,fze,P6t,M6t,pH=B(()=>{"use strict";A();mn();k6t=5,pze=1e3,fze=16e3;P6t=new Set(["UND_ERR_CONNECT_TIMEOUT","ENOTFOUND","EAI_AGAIN","ECONNREFUSED"]),M6t=new Set(["ECONNRESET","ETIMEDOUT","EPIPE"])});import{execFileSync as gze}from"node:child_process";import{createHash as L6t}from"node:crypto";import{resolve as U6t}from"node:path";function F6t(e){if(process.env.LORE_DISABLE_PORTLESS_DISCOVERY!=="1"&&process.env.npm_lifecycle_event!=="test")try{return gze("portless",["get",e],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim().replace(/\/$/,"")}catch{return}}function Aze(e){return e.toLowerCase().replace(/[^a-z0-9-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,63)}function G6t(){try{return gze("git",["rev-parse","--show-toplevel"],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()}catch{return U6t(process.cwd(),"../..")}}function j6t(e){return L6t("sha1").update(e).digest("hex").slice(0,8)}function z6t(){let e=Aze(process.env.LORE_DEV_STACK_NAME??"");if(e)return e;let t=G6t();return[Aze(t.split(/[\\/]/).pop()||"lore"),j6t(t)].filter(Boolean).join("-").slice(0,63)}function H6t(){let e=z6t();return e?`api.${e}.lore`:"api.lore"}function $6t(e){let t=process.env.LORE_TARGET?.trim();return t&&Q6t.has(t)?t:e}function al(e=zr(),t=process.env.LORE_API_ORIGIN){let n=t?.trim();if(n)return n.replace(/\/$/,"");let r=$6t(e);return r==="dev"?F6t(H6t())??AH.dev:AH[r]}function Iu(){let e=ny(),t=uH(),n=e?.access_token.trim()??"",r=e?.refresh_token.trim()??"",o=t?.access_token.trim()??"";return{hasTokenRecord:!!e,hasAccessToken:!!n,accessTokenExpiredOrNearExpiry:n?Kx(n,new Date,Yx):void 0,hasRefreshToken:!!r,externalTokenManager:Eze(),hasDesktopManagedTokenRecord:!!t,hasDesktopManagedAccessToken:!!o,desktopManagedAccessTokenExpiredOrNearExpiry:o?Kx(o,new Date,Yx):void 0}}function hze(e){let t=dze()??$c();if(!t||t.spanContext().traceFlags!==1)return e;let n=W_({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 q6t(){let e=await _ze(`${al()}/api/cli-auth/config`);if(!e.ok)throw new Error(`CLI auth config failed: HTTP ${e.status}`);return await e.json()}async function V6t(){if(!ny()?.refresh_token.trim())return z.warn("auth_refresh_skipped_no_refresh_token",Iu()),"";fH?z.info("auth_refresh_join_inflight",Iu()):(z.info("auth_refresh_start",Iu()),fH=UO(Er(),async()=>{let t=zse().token;if(t)return z.info("auth_refresh_reused_latest_token",Iu()),t;let n=ny();if(!n?.refresh_token.trim())return z.warn("auth_refresh_skipped_latest_no_refresh_token",Iu()),"";z.info("auth_refresh_cli_auth_config_start",{...Iu(),resource:al()});let r=await q6t();z.info("auth_refresh_cli_auth_config_success",{...Iu(),tokenEndpoint:new URL("/user_management/authenticate",r.workos_api_origin).toString()});let o=await uze({clientId:r.workos_client_id,refreshToken:n.refresh_token,workosApiOrigin:r.workos_api_origin,fetch:_ze});return cH(o.access_token,o.refresh_token??n.refresh_token),z.info("auth_refresh_success",Iu()),o.access_token}).finally(()=>{fH=void 0}));try{return await fH}catch(t){return t instanceof Xz||t instanceof jO?(z.warn("auth_refresh_invalid_grant_deleting_tokens",{...Iu(),error:jt(t)}),lH()):z.warn("auth_refresh_failed",{...Iu(),errorName:t instanceof Error?t.name:void 0,error:jt(t)}),""}}function mH(e){try{let t=zO(e);typeof t.sub=="string"&&eF({id:t.sub,...typeof t.email=="string"?{email:t.email}:{}})}catch{}}function Eze(){let e=process.env.LORE_EXTERNAL_TOKEN_MANAGER;return typeof e=="string"&&Y6t.has(e.trim().toLowerCase())}async function Gt(){if(Eze()){let n=nze().token;if(n)return z.info("auth_get_access_token_valid_desktop_managed_token",Iu()),mH(n),n;let r=uH()?.access_token.trim()??"";return z.warn("auth_get_access_token_external_manager_raw_desktop_token",{...Iu(),returnedRawToken:!!r}),r&&mH(r),r}let e=zse().token;if(e)return z.info("auth_get_access_token_valid_file_token",Iu()),mH(e),e;z.warn("auth_get_access_token_no_valid_file_token",Iu());let t=await V6t();return t?(z.info("auth_get_access_token_refreshed_token",Iu()),mH(t)):z.warn("auth_get_access_token_returning_empty",Iu()),t}function Ct(e={}){let t=e.token;return Yee(Wz,{baseUrl:al(),baseHeaders:{"User-Agent":dFe(),...t?{authorization:`Bearer ${t}`}:{}},api:async n=>{let r=hze(n.headers);if(t===void 0){let i=await Gt();i&&!r.authorization&&(r={...r,authorization:`Bearer ${i}`})}let o=n.method.toUpperCase()==="GET";try{return await HO(()=>Vee({...n,headers:r}),{isRetryableError:o?i=>$O(i)||qO(i):$O,describeRetryReason:i=>`network:${VO(i)}`,logEvent:"api_request_retry",logFields:{method:n.method,path:n.path}})}catch(i){if(Wx(i)){let s=dH(i);z.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 AH,qHn,Q6t,fH,_ze,Y6t,yr=B(()=>{"use strict";A();OO();nH();cA();ex();QT();Hse();sc();zt();pH();mn();oo();AH={dev:"http://localhost:4000","dev-shared":"https://lore-api.dev.tanagram.ai",prod:"https://lore-api.tanagram.ai"},qHn={dev:`${AH.dev}/mcp`,"dev-shared":`${AH["dev-shared"]}/mcp`,prod:"https://mcp.lore.link/mcp"},Q6t=new Set(["dev","dev-shared","prod"]);_ze=(async(e,t)=>{let n=hze(Object.fromEntries(new Headers(t?.headers).entries()));return fetch(e,{...t,headers:n})});Y6t=new Set(["1","true","yes","on"])});function Cze(e){return typeof e!="string"?!1:oGt.has(e.trim().toLowerCase())}function Cu(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(vze)||Cze(r.LORE_NO_TUI)||Cze(r.CI)||r.TERM==="dumb"||!t?.isTTY||!n?.isTTY)}function Rze(e){return e.filter(t=>t!==vze)}var vze,oGt,ry=B(()=>{"use strict";A();vze="--no-tui",oGt=new Set(["1","true","yes","on"])});var Uze=M(bn=>{"use strict";A();var Wse=Symbol.for("react.transitional.element"),iGt=Symbol.for("react.portal"),sGt=Symbol.for("react.fragment"),aGt=Symbol.for("react.strict_mode"),uGt=Symbol.for("react.profiler"),cGt=Symbol.for("react.consumer"),lGt=Symbol.for("react.context"),dGt=Symbol.for("react.forward_ref"),pGt=Symbol.for("react.suspense"),fGt=Symbol.for("react.memo"),Bze=Symbol.for("react.lazy"),mGt=Symbol.for("react.activity"),xze=Symbol.iterator;function AGt(e){return e===null||typeof e!="object"?null:(e=xze&&e[xze]||e["@@iterator"],typeof e=="function"?e:null)}var kze={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Oze=Object.assign,Pze={};function eD(e,t,n){this.props=e,this.context=t,this.refs=Pze,this.updater=n||kze}eD.prototype.isReactComponent={};eD.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")};eD.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Mze(){}Mze.prototype=eD.prototype;function Xse(e,t,n){this.props=e,this.context=t,this.refs=Pze,this.updater=n||kze}var eae=Xse.prototype=new Mze;eae.constructor=Xse;Oze(eae,eD.prototype);eae.isPureReactComponent=!0;var Dze=Array.isArray;function Zse(){}var Do={H:null,A:null,T:null,S:null},Lze=Object.prototype.hasOwnProperty;function tae(e,t,n){var r=n.ref;return{$$typeof:Wse,type:e,key:t,ref:r!==void 0?r:null,props:n}}function gGt(e,t){return tae(e.type,t,e.props)}function nae(e){return typeof e=="object"&&e!==null&&e.$$typeof===Wse}function hGt(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Nze=/\/+/g;function Jse(e,t){return typeof e=="object"&&e!==null&&e.key!=null?hGt(""+e.key):t.toString(36)}function _Gt(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Zse,Zse):(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 Xx(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 Wse:case iGt:s=!0;break;case Bze:return s=e._init,Xx(s(e._payload),t,n,r,o)}}if(s)return o=o(e),s=r===""?"."+Jse(e,0):r,Dze(o)?(n="",s!=null&&(n=s.replace(Nze,"$&/")+"/"),Xx(o,t,n,"",function(f){return f})):o!=null&&(nae(o)&&(o=gGt(o,n+(o.key==null||e&&e.key===o.key?"":(""+o.key).replace(Nze,"$&/")+"/")+s)),t.push(o)),1;s=0;var u=r===""?".":r+":";if(Dze(e))for(var l=0;l<e.length;l++)r=e[l],i=u+Jse(r,l),s+=Xx(r,t,n,i,o);else if(l=AGt(e),typeof l=="function")for(e=l.call(e),l=0;!(r=e.next()).done;)r=r.value,i=u+Jse(r,l++),s+=Xx(r,t,n,i,o);else if(i==="object"){if(typeof e.then=="function")return Xx(_Gt(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 gH(e,t,n){if(e==null)return e;var r=[],o=0;return Xx(e,r,"","",function(i){return t.call(n,i,o++)}),r}function EGt(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 wze=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)},yGt={map:gH,forEach:function(e,t,n){gH(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return gH(e,function(){t++}),t},toArray:function(e){return gH(e,function(t){return t})||[]},only:function(e){if(!nae(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};bn.Activity=mGt;bn.Children=yGt;bn.Component=eD;bn.Fragment=sGt;bn.Profiler=uGt;bn.PureComponent=Xse;bn.StrictMode=aGt;bn.Suspense=pGt;bn.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Do;bn.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Do.H.useMemoCache(e)}};bn.cache=function(e){return function(){return e.apply(null,arguments)}};bn.cacheSignal=function(){return null};bn.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=Oze({},e.props),o=e.key;if(t!=null)for(i in t.key!==void 0&&(o=""+t.key),t)!Lze.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 tae(e.type,o,r)};bn.createContext=function(e){return e={$$typeof:lGt,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:cGt,_context:e},e};bn.createElement=function(e,t,n){var r,o={},i=null;if(t!=null)for(r in t.key!==void 0&&(i=""+t.key),t)Lze.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 tae(e,i,o)};bn.createRef=function(){return{current:null}};bn.forwardRef=function(e){return{$$typeof:dGt,render:e}};bn.isValidElement=nae;bn.lazy=function(e){return{$$typeof:Bze,_payload:{_status:-1,_result:e},_init:EGt}};bn.memo=function(e,t){return{$$typeof:fGt,type:e,compare:t===void 0?null:t}};bn.startTransition=function(e){var t=Do.T,n={};Do.T=n;try{var r=e(),o=Do.S;o!==null&&o(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(Zse,wze)}catch(i){wze(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),Do.T=t}};bn.unstable_useCacheRefresh=function(){return Do.H.useCacheRefresh()};bn.use=function(e){return Do.H.use(e)};bn.useActionState=function(e,t,n){return Do.H.useActionState(e,t,n)};bn.useCallback=function(e,t){return Do.H.useCallback(e,t)};bn.useContext=function(e){return Do.H.useContext(e)};bn.useDebugValue=function(){};bn.useDeferredValue=function(e,t){return Do.H.useDeferredValue(e,t)};bn.useEffect=function(e,t){return Do.H.useEffect(e,t)};bn.useEffectEvent=function(e){return Do.H.useEffectEvent(e)};bn.useId=function(){return Do.H.useId()};bn.useImperativeHandle=function(e,t,n){return Do.H.useImperativeHandle(e,t,n)};bn.useInsertionEffect=function(e,t){return Do.H.useInsertionEffect(e,t)};bn.useLayoutEffect=function(e,t){return Do.H.useLayoutEffect(e,t)};bn.useMemo=function(e,t){return Do.H.useMemo(e,t)};bn.useOptimistic=function(e,t){return Do.H.useOptimistic(e,t)};bn.useReducer=function(e,t,n){return Do.H.useReducer(e,t,n)};bn.useRef=function(e){return Do.H.useRef(e)};bn.useState=function(e){return Do.H.useState(e)};bn.useSyncExternalStore=function(e,t,n){return Do.H.useSyncExternalStore(e,t,n)};bn.useTransition=function(){return Do.H.useTransition()};bn.version="19.2.4"});var Qze=M((An,hH)=>{"use strict";A();process.env.NODE_ENV!=="production"&&(function(){function e(L,re){Object.defineProperty(r.prototype,L,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",re[0],re[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,re){L=(L=L.constructor)&&(L.displayName||L.name)||"ReactClass";var ve=L+"."+re;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.",re,L),ft[ve]=!0)}function r(L,re,ve){this.props=L,this.context=re,this.refs=Rt,this.updater=ve||on}function o(){}function i(L,re,ve){this.props=L,this.context=re,this.refs=Rt,this.updater=ve||on}function s(){}function u(L){return""+L}function l(L){try{u(L);var re=!1}catch{re=!0}if(re){re=console;var ve=re.error,$e=typeof Symbol=="function"&&Symbol.toStringTag&&L[Symbol.toStringTag]||L.constructor.name||"Object";return ve.call(re,"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===ui?null:L.displayName||L.name||null;if(typeof L=="string")return L;switch(L){case kt:return"Fragment";case be:return"Profiler";case Nr:return"StrictMode";case Sr:return"Suspense";case Qs:return"SuspenseList";case qt: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 lt:return"Portal";case $t:return L.displayName||"Context";case At:return(L._context.displayName||"Context")+".Consumer";case gn:var re=L.render;return L=L.displayName,L||(L=re.displayName||re.name||"",L=L!==""?"ForwardRef("+L+")":"ForwardRef"),L;case Vn:return re=L.displayName||null,re!==null?re:f(L.type)||"Memo";case ar:re=L._payload,L=L._init;try{return f(L(re))}catch{}}return null}function h(L){if(L===kt)return"<>";if(typeof L=="object"&&L!==null&&L.$$typeof===ar)return"<...>";try{var re=f(L);return re?"<"+re+">":"<...>"}catch{return"<...>"}}function _(){var L=vt.A;return L===null?null:L.getOwner()}function E(){return Error("react-stack-top-frame")}function T(L){if(Vi.call(L,"key")){var re=Object.getOwnPropertyDescriptor(L,"key").get;if(re&&re.isReactWarning)return!1}return L.key!==void 0}function v(L,re){function ve(){wo||(wo=!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)",re))}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,re,ve,$e,et,Vt){var xt=ve.ref;return L={$$typeof:rt,type:L,key:re,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:Vt}),Object.freeze&&(Object.freeze(L.props),Object.freeze(L)),L}function k(L,re){return re=x(L.type,re,L.props,L._owner,L._debugStack,L._debugTask),L._store&&(re._store.validated=L._store.validated),re}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===rt}function G(L){var re={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(ve){return re[ve]})}function $(L,re){return typeof L=="object"&&L!==null&&L.key!=null?(l(L.key),G(""+L.key)):re.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(re){L.status==="pending"&&(L.status="fulfilled",L.value=re)},function(re){L.status==="pending"&&(L.status="rejected",L.reason=re)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function ae(L,re,ve,$e,et){var Vt=typeof L;(Vt==="undefined"||Vt==="boolean")&&(L=null);var xt=!1;if(L===null)xt=!0;else switch(Vt){case"bigint":case"string":case"number":xt=!0;break;case"object":switch(L.$$typeof){case rt:case lt:xt=!0;break;case ar:return xt=L._init,ae(xt(L._payload),re,ve,$e,et)}}if(xt){xt=L,et=et(xt);var Fn=$e===""?"."+$(xt,0):$e;return so(et)?(ve="",Fn!=null&&(ve=Fn.replace(_d,"$&/")+"/"),ae(et,re,ve,"",function(ci){return ci})):et!=null&&(j(et)&&(et.key!=null&&(xt&&xt.key===et.key||l(et.key)),ve=k(et,ve+(et.key==null||xt&&xt.key===et.key?"":(""+et.key).replace(_d,"$&/")+"/")+Fn),$e!==""&&xt!=null&&j(xt)&&xt.key==null&&xt._store&&!xt._store.validated&&(ve._store.validated=2),et=ve),re.push(et)),1}if(xt=0,Fn=$e===""?".":$e+":",so(L))for(var pn=0;pn<L.length;pn++)$e=L[pn],Vt=Fn+$($e,pn),xt+=ae($e,re,ve,Vt,et);else if(pn=t(L),typeof pn=="function")for(pn===L.entries&&(wu||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),wu=!0),L=pn.call(L),pn=0;!($e=L.next()).done;)$e=$e.value,Vt=Fn+$($e,pn++),xt+=ae($e,re,ve,Vt,et);else if(Vt==="object"){if(typeof L.then=="function")return ae(V(L),re,ve,$e,et);throw re=String(L),Error("Objects are not valid as a React child (found: "+(re==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":re)+"). If you meant to render a collection of children, use an array instead.")}return xt}function te(L,re,ve){if(L==null)return L;var $e=[],et=0;return ae(L,$e,"","",function(Vt){return re.call(ve,Vt,et++)}),$e}function _e(L){if(L._status===-1){var re=L._ioInfo;re!=null&&(re.start=re.end=performance.now()),re=L._result;var ve=re();if(ve.then(function(et){if(L._status===0||L._status===-1){L._status=1,L._result=et;var Vt=L._ioInfo;Vt!=null&&(Vt.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 Vt=L._ioInfo;Vt!=null&&(Vt.end=performance.now()),ve.status===void 0&&(ve.status="rejected",ve.reason=et)}}),re=L._ioInfo,re!=null){re.value=ve;var $e=ve.displayName;typeof $e=="string"&&(re.name=$e)}L._status===-1&&(L._status=0,L._result=ve)}if(L._status===1)return re=L._result,re===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
@@ -470,7 +470,7 @@ exec ${rde(n)} ${rde(e)} "$@"
|
|
|
470
470
|
<%s {...props} />
|
|
471
471
|
React keys must be passed directly to JSX without using spread:
|
|
472
472
|
let props = %s;
|
|
473
|
-
<%s key={someKey} {...props} />`,gn,Vn,ar,Vn),Nr[Vn+gn]=!0)}if(Vn=null,$t!==void 0&&(n($t),Vn=""+$t),s(At)&&(n(At.key),Vn=""+At.key),"key"in At){$t={};for(var qt in At)qt!=="key"&&($t[qt]=At[qt])}else $t=At;return Vn&&u($t,typeof be=="function"?be.displayName||be.name||"Unknown":be),f(be,Vn,$t,o(),Sr,Qs)}function _(be){E(be)?be._store&&(be._store.validated=1):typeof be=="object"&&be!==null&&be.$$typeof===_e&&(be._payload.status==="fulfilled"?E(be._payload.value)&&be._payload.value._store&&(be._payload.value._store.validated=1):be._store&&(be._store.validated=1))}function E(be){return typeof be=="object"&&be!==null&&be.$$typeof===v}var T=dn(),v=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),G=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),_e=Symbol.for("react.lazy"),Ve=Symbol.for("react.activity"),nt=Symbol.for("react.client.reference"),Fe=T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Mt=Object.prototype.hasOwnProperty,un=Array.isArray,Se=console.createTask?console.createTask:function(){return null};T={react_stack_bottom_frame:function(be){return be()}};var ze,rt={},lt=T.react_stack_bottom_frame.bind(T,i)(),kt=Se(r(i)),Nr={};B$.Fragment=x,B$.jsx=function(be,At,$t){var gn=1e4>Fe.recentlyCreatedOwnerStacks++;return h(be,At,$t,!1,gn?Error("react-stack-top-frame"):lt,gn?Se(r(be)):kt)},B$.jsxs=function(be,At,$t){var gn=1e4>Fe.recentlyCreatedOwnerStacks++;return h(be,At,$t,!0,gn?Error("react-stack-top-frame"):lt,gn?Se(r(be)):kt)}})()});var Ht=M((tor,lde)=>{"use strict";A();process.env.NODE_ENV==="production"?lde.exports=IKe():lde.exports=CKe()});function nM({items:e,onChange:t,onSubmit:n,onAction:r,onCancel:o,submitShortcuts:i=[],toggleKeys:s=[" "],enterBehavior:u="submit",hint:l,disabled:f=!1}){let[h,_]=(0,$f.useState)(0),[E,T]=(0,$f.useState)(()=>{let P=new Set;for(let j of e)j.initialChecked&&P.add(j.id);return P}),v=(0,$f.useRef)(h);v.current=h;let R=(0,$f.useRef)(E);R.current=E;let x=(0,$f.useRef)(""),k=(0,$f.useRef)(void 0);return(0,$f.useEffect)(()=>{let P=new Set;for(let j of e)j.initialChecked&&P.add(j.id);_(j=>{let G=Math.min(j,Math.max(0,e.length-1));return v.current=G,G}),T(j=>$7t(j,P)?j:(R.current=P,P))},[e]),(0,$f.useEffect)(()=>()=>{k.current&&clearTimeout(k.current)},[]),Ru((P,j)=>{if(e.length!==0){if(i.length>0&&P){k.current&&(clearTimeout(k.current),k.current=void 0);let G=`${x.current}${P}`,$=i.includes(G),V=i.some(te=>te.startsWith(G)),ae=i.some(te=>te!==G&&te.startsWith(G));if($&&!ae){x.current="",n(R.current);return}if($&&ae){x.current=G,k.current=setTimeout(()=>{k.current=void 0,x.current="",n(R.current)},1e3),k.current.unref?.();return}if(V){x.current=G;return}x.current=""}if(j.upArrow||P==="k"){_(G=>{let $=(G-1+e.length)%e.length;return v.current=$,$});return}if(j.downArrow||P==="j"){_(G=>{let $=(G+1)%e.length;return v.current=$,$});return}if(s.includes(P)){let G=e[v.current];if(!G||G.disabled)return;if(G.action){r?.(G.id,R.current);return}let $=new Set(R.current);$.has(G.id)?$.delete(G.id):$.add(G.id),R.current=$,T($),t?.($);return}if(j.return){let G=e[v.current];if(G&&!G.disabled&&G.action){r?.(G.id,R.current);return}if(u==="action-only")return;n(R.current);return}j.escape&&o&&o()}},{isActive:!f}),e.length===0?(0,$i.jsx)(he,{color:xe.muted,children:"no options available"}):(0,$i.jsxs)(Ee,{flexDirection:"column",children:[e.map((P,j)=>{let G=j===h,$=E.has(P.id),V=P.actionVariant==="button"&&e[j-1]?.actionVariant!=="button",ae=P.disabled?"\u2298":P.action?P.actionVariant==="button"?" ":" + ":$?"[x]":"[ ]";return P.actionVariant==="button"?(0,$i.jsxs)(Ee,{marginTop:V?2:0,children:[(0,$i.jsx)(Ee,{width:2,flexShrink:0,children:(0,$i.jsx)(he,{color:G?xe.primary:xe.muted,children:G?"\u203A":" "})}),(0,$i.jsxs)(Ee,{flexGrow:1,flexShrink:1,flexDirection:"row",children:[(0,$i.jsx)(Ee,{width:10,flexShrink:0,children:(0,$i.jsxs)(he,{color:P.disabled?xe.muted:G?xe.primary:xe.highlight,bold:G&&!P.disabled,children:["[ ",P.label," ]"]})}),P.description?(0,$i.jsx)(he,{color:xe.muted,children:P.description}):null]})]},P.id):(0,$i.jsxs)(Ee,{children:[(0,$i.jsx)(Ee,{width:2,flexShrink:0,children:(0,$i.jsx)(he,{color:G?xe.primary:xe.muted,children:G?"\u203A":" "})}),(0,$i.jsx)(Ee,{width:4,flexShrink:0,children:(0,$i.jsx)(he,{color:P.disabled?xe.muted:$?xe.success:xe.muted,children:ae})}),(0,$i.jsxs)(Ee,{flexGrow:1,flexShrink:1,flexDirection:"column",children:[(0,$i.jsx)(he,{color:P.disabled?xe.muted:G?xe.primary:xe.highlight,bold:G&&!P.disabled,children:P.label}),P.description?(0,$i.jsx)(he,{color:xe.muted,children:P.description}):null]})]},P.id)}),l?(0,$i.jsx)(Ee,{marginTop:1,children:(0,$i.jsx)(he,{color:xe.muted,children:l})}):null]})}function $7t(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}var $f,$i,dde=B(async()=>{"use strict";A();await ho();$f=ue(dn(),1);Ps();$i=ue(Ht(),1)});function Ms({title:e,subtitle:t,right:n}){return(0,Ey.jsx)(Ee,{flexDirection:"column",marginBottom:1,children:(0,Ey.jsxs)(Ee,{justifyContent:"space-between",children:[(0,Ey.jsxs)(Ee,{children:[(0,Ey.jsx)(he,{bold:!0,color:xe.primary,children:e}),t?(0,Ey.jsxs)(he,{color:xe.muted,children:[" \u2014 ",t]}):null]}),n?(0,Ey.jsx)(he,{color:xe.muted,children:n}):null]})})}var Ey,RA=B(async()=>{"use strict";A();await ho();Ps();Ey=ue(Ht(),1)});function Ls({kind:e,title:t,children:n}){let r=q7t[e];return(0,mb.jsxs)(Ee,{borderStyle:"round",borderColor:r,flexDirection:"column",paddingX:1,children:[(0,mb.jsx)(Ee,{children:(0,mb.jsxs)(he,{color:r,bold:!0,children:[V7t[e],t?` ${t}`:""]})}),(0,mb.jsx)(Ee,{marginTop:t?1:0,flexDirection:"column",children:typeof n=="string"?(0,mb.jsx)(he,{children:n}):n})]})}var mb,q7t,V7t,Ab=B(async()=>{"use strict";A();await ho();Ps();mb=ue(Ht(),1),q7t={success:xe.success,error:xe.danger,warning:xe.warning,info:xe.primary},V7t={success:"\u2713",error:"\u2717",warning:"!",info:"\u2139"}});function Qn({title:e,subtitle:t,focused:n=!1,padding:r=1,children:o}){return(0,yy.jsxs)(Ee,{borderStyle:"round",borderColor:n?xe.primary:xe.border,flexDirection:"column",paddingX:r,paddingY:r>0?Math.max(0,r-1):0,children:[e||t?(0,yy.jsxs)(Ee,{justifyContent:"space-between",marginBottom:1,children:[e?(0,yy.jsx)(Ee,{marginRight:2,children:(0,yy.jsx)(he,{bold:!0,color:n?xe.primary:xe.highlight,children:e})}):(0,yy.jsx)(he,{}),t?(0,yy.jsx)(he,{color:xe.muted,children:t}):null]}):null,o]})}var yy,xA=B(async()=>{"use strict";A();await ho();Ps();yy=ue(Ht(),1)});function k$({initialValue:e="",placeholder:t="",value:n,onChange:r,onSubmit:o,onCancel:i,disabled:s=!1}){let[u,l]=(0,Sy.useState)(e),f=n!==void 0,h=f?n:u,[_,E]=(0,Sy.useState)(e.length),T=(0,Sy.useRef)(h);T.current=h;let v=(0,Sy.useRef)(_);v.current=_,(0,Sy.useEffect)(()=>{_>h.length&&E(h.length)},[h,_]);let R=j=>{T.current=j,f||l(j),r?.(j)};if(Ru((j,G)=>{if(G.return){o(T.current);return}if(G.escape&&i){i();return}let $=T.current,V=v.current;if(G.backspace||G.delete){if(V===0)return;let _e=$.slice(0,V-1)+$.slice(V);v.current=V-1,E(V-1),R(_e);return}if(G.leftArrow){V>0&&(v.current=V-1,E(V-1));return}if(G.rightArrow){V<$.length&&(v.current=V+1,E(V+1));return}if(G.ctrl&&j==="a"){v.current=0,E(0);return}if(G.ctrl&&j==="e"){v.current=$.length,E($.length);return}if(!j||G.ctrl||G.meta)return;let ae=$.slice(0,V)+j+$.slice(V),te=V+j.length;v.current=te,E(te),R(ae)},{isActive:!s}),h.length===0&&t)return(0,Ih.jsxs)(Ee,{children:[(0,Ih.jsx)(he,{color:xe.muted,children:"\u258F"}),(0,Ih.jsx)(he,{color:xe.muted,children:t})]});let x=h.slice(0,_),k=h[_]??" ",P=h.slice(_+1);return(0,Ih.jsxs)(Ee,{children:[(0,Ih.jsx)(he,{children:x}),(0,Ih.jsx)(he,{inverse:!0,children:k}),(0,Ih.jsx)(he,{children:P})]})}var Sy,Ih,pde=B(async()=>{"use strict";A();await ho();Sy=ue(dn(),1);Ps();Ih=ue(Ht(),1)});import Y7t from"node:fs/promises";import fde from"node:os";import rM from"node:path";function O$({initialValue:e="",placeholder:t="Start typing a path (try ~/code)",limit:n=8,loadSuggestions:r=K7t,onSubmit:o,onCancel:i}){let[s,u]=(0,Np.useState)(e),[l,f]=(0,Np.useState)([]),[h,_]=(0,Np.useState)("input"),[E,T]=(0,Np.useState)(0),v=(0,Np.useRef)(E);v.current=E;let R=(0,Np.useRef)(s);R.current=s;let x=(0,Np.useRef)(l);x.current=l;let k=(0,Np.useRef)(h);k.current=h,(0,Np.useEffect)(()=>{let j=!1;return(async()=>{let G=await r(s,n);j||(f(G),T(0),G.length===0&&k.current==="list"&&(k.current="input",_("input")))})(),()=>{j=!0}},[s,n,r]),Ru((j,G)=>{if(k.current==="input"){G.downArrow&&x.current.length>0&&(k.current="list",_("list"),T(0),v.current=0);return}if(G.upArrow){let $=v.current-1;$<0?(k.current="input",_("input")):(v.current=$,T($));return}if(G.downArrow){let $=Math.min(v.current+1,x.current.length-1);v.current=$,T($);return}if(G.return||G.tab){let $=x.current[v.current];$&&(R.current=$,u($),k.current="input",_("input"));return}if(G.escape&&i){i();return}});let P=j=>{k.current==="input"&&o(j)};return(0,mc.jsxs)(Ee,{flexDirection:"column",children:[(0,mc.jsxs)(Ee,{children:[(0,mc.jsx)(he,{color:h==="input"?xe.primary:xe.muted,children:h==="input"?"\u203A ":" "}),(0,mc.jsx)(k$,{value:s,placeholder:t,onChange:j=>{u(j),R.current=j},onSubmit:P,onCancel:i,disabled:h!=="input"})]}),l.length>0?(0,mc.jsxs)(Ee,{flexDirection:"column",marginTop:1,children:[l.map((j,G)=>{let $=h==="list"&&G===E;return(0,mc.jsxs)(Ee,{children:[(0,mc.jsx)(Ee,{width:2,flexShrink:0,children:(0,mc.jsx)(he,{color:$?xe.primary:xe.muted,children:$?"\u203A":" "})}),(0,mc.jsx)(he,{color:$?xe.primary:void 0,children:j})]},j)}),(0,mc.jsx)(Ee,{marginTop:1,children:(0,mc.jsx)(he,{color:xe.muted,children:"\u2193 to browse suggestions \xB7 \u2191 back to typing \xB7 Enter to commit or complete \xB7 Esc to cancel"})})]}):(0,mc.jsx)(Ee,{marginTop:1,children:(0,mc.jsx)(he,{color:xe.muted,children:"No matching directories yet. Keep typing or press Enter to use the literal path."})})]})}async function K7t(e,t){let n=J7t(e),r,o;n.length===0?(r=fde.homedir(),o=""):n.endsWith("/")?(r=n.length>1?n.replace(/\/+$/,""):"/",o=""):(r=rM.dirname(n),o=rM.basename(n)),r=rM.normalize(r);let i;try{i=(await Y7t.readdir(r,{withFileTypes:!0})).filter(u=>u.isDirectory()).map(u=>u.name).filter(u=>u.startsWith(o)).sort()}catch{return[]}return i.slice(0,t).map(s=>rM.join(r,s))}function J7t(e){return e==="~"?fde.homedir():e.startsWith("~/")?rM.join(fde.homedir(),e.slice(2)):e}var Np,mc,mde=B(async()=>{"use strict";A();await ho();Np=ue(dn(),1);Ps();await pde();mc=ue(Ht(),1)});function Ha({label:e,frames:t=Z7t,intervalMs:n=80,color:r=xe.primary}){let[o,i]=(0,P$.useState)(0);(0,P$.useEffect)(()=>{let u=setInterval(()=>{i(l=>(l+1)%t.length)},n);return typeof u.unref=="function"&&u.unref(),()=>clearInterval(u)},[t.length,n]);let s=t[o]??t[0]??"";return(0,Ade.jsxs)(he,{color:r,children:[s,e?(0,Ade.jsxs)(he,{children:[" ",e]}):null]})}var P$,Ade,Z7t,gb=B(async()=>{"use strict";A();await ho();P$=ue(dn(),1);Ps();Ade=ue(Ht(),1),Z7t=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]});function en({label:e,value:t,kind:n="idle",dotColor:r,valueColor:o,labelWidth:i=16}){return(0,DA.jsxs)(Ee,{children:[(0,DA.jsx)(Ee,{width:2,flexShrink:0,children:(0,DA.jsx)(he,{color:r??W7t[n],children:"\u25CF"})}),(0,DA.jsx)(Ee,{width:i,flexShrink:0,children:(0,DA.jsx)(he,{color:xe.muted,children:e})}),(0,DA.jsx)(Ee,{flexGrow:1,flexShrink:1,children:X7t(t,o)})]})}function X7t(e,t){return e==null?(0,DA.jsx)(he,{color:t,children:"\u2014"}):(0,vKe.isValidElement)(e)?e:(0,DA.jsx)(he,{color:t,children:e})}var vKe,DA,W7t,hb=B(async()=>{"use strict";A();await ho();vKe=ue(dn(),1);Ps();DA=ue(Ht(),1),W7t={idle:xe.muted,info:xe.primary,success:xe.success,warning:xe.warning,error:xe.danger}});function wA({state:e,onSubmit:t,onSkip:n}){return(0,nr.jsxs)(Ee,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,nr.jsx)(Ms,{title:"Configure uploads",subtitle:"Pick which repos and directories Lore should auto-upload from"}),e.phase==="loading"?(0,nr.jsx)(Qn,{title:"Looking at your recent Claude Code sessions\u2026",children:(0,nr.jsx)(Ha,{label:"reading ~/.claude/history.jsonl and resolving git remotes"})}):null,e.phase==="choose"?(0,nr.jsx)(eYt,{state:e,onSubmit:t,onSkip:n}):null,e.phase==="saving"?(0,nr.jsx)(Qn,{title:"Saving",children:(0,nr.jsx)(Ha,{label:"writing ~/.lore/upload_filters.json\u2026"})}):null,e.phase==="saved"?(0,nr.jsx)(Ee,{marginTop:1,children:(0,nr.jsx)(Ls,{kind:"success",title:"You're set",children:(0,nr.jsxs)(he,{children:[e.savedCount===0?"Nothing selected. Lore won't auto-upload anything until you run ":`Lore will auto-upload from ${e.savedCount} ${e.savedCount===1?"location":"locations"}. Add or remove more with `,(0,nr.jsx)(he,{bold:!0,children:"lore configure"}),(0,nr.jsx)(he,{children:"."})]})})}):null,e.phase==="errored"?(0,nr.jsx)(Ee,{marginTop:1,children:(0,nr.jsx)(Ls,{kind:"error",title:"Couldn't save your upload settings",children:(0,nr.jsx)(he,{children:e.errorMessage??"Unknown error."})})}):null]})}function eYt({state:e,onSubmit:t,onSkip:n}){let[r,o]=(0,JD.useState)(()=>new Set(NKe(e.initialSelectedIds,e.suggestions))),[i,s]=(0,JD.useState)([]),[u,l]=(0,JD.useState)("choose");if((0,JD.useEffect)(()=>{o(h=>h.size>0?h:new Set(NKe(e.initialSelectedIds,e.suggestions)))},[e.initialSelectedIds,e.suggestions]),u==="add_custom")return(0,nr.jsxs)(Ee,{flexDirection:"column",children:[(0,nr.jsx)(gde,{organizationName:e.organizationName}),(0,nr.jsx)(Qn,{title:"Type a directory or repo origin",subtitle:"\u2193 to browse suggestions \xB7 Enter to accept \xB7 Esc to go back",children:(0,nr.jsx)(O$,{placeholder:"Try ~/code or tanagram/lore",onSubmit:h=>{let _=h.trim();if(_.length>0){let E=`${NA}${_}`;s(T=>T.includes(_)?T:[...T,_]),o(T=>{let v=new Set(T);return v.add(E),v})}l("choose")},onCancel:()=>l("choose")})})]});if(e.suggestions.length===0&&i.length===0)return(0,nr.jsxs)(Ee,{flexDirection:"column",children:[(0,nr.jsx)(gde,{organizationName:e.organizationName}),(0,nr.jsx)(Qn,{title:"No recent projects found",children:(0,nr.jsxs)(he,{color:xe.muted,children:["Lore didn't find any recent Claude Code sessions. Press"," ",(0,nr.jsx)(he,{bold:!0,children:"Space"})," or ",(0,nr.jsx)(he,{bold:!0,children:"Enter"}),' on "+ Add a repo origin or directory\u2026" below to type one in, or run'," ",(0,nr.jsx)(he,{bold:!0,children:"lore configure"})," again later."]})}),(0,nr.jsx)(Ee,{marginTop:1,children:(0,nr.jsx)(Qn,{title:" ",subtitle:"space/x to toggle \xB7 enter activates buttons",children:(0,nr.jsx)(nM,{items:[RKe(),xKe(),DKe()],onSubmit:h=>t(Array.from(h)),onAction:(h,_)=>{if(h===hde){l("add_custom");return}if(h===_de){t(Array.from(_));return}h===Ede&&n()},submitShortcuts:[":w",":wq"],toggleKeys:[" ","x"],enterBehavior:"action-only",hint:"Each directory uploads to a single workspace. Re-run lore configure to add more."})})})]});let f=[...e.suggestions.map(h=>({id:h.id,label:h.label,description:tYt(h,e.now??Date.now()),initialChecked:r.has(h.id)})),...i.map(h=>({id:`${NA}${h}`,label:h,description:"custom directory or repo origin you added",initialChecked:r.has(`${NA}${h}`)})),RKe(),xKe(),DKe()];return(0,nr.jsxs)(Ee,{flexDirection:"column",children:[(0,nr.jsx)(gde,{organizationName:e.organizationName}),(0,nr.jsx)(Qn,{title:"Recently used repos and directories",subtitle:"space/x to toggle \xB7 enter activates buttons",children:(0,nr.jsx)(nM,{items:f,onChange:h=>o(new Set(h)),onAction:(h,_)=>{if(h===hde){l("add_custom");return}if(h===_de){t(Array.from(_));return}h===Ede&&n()},onSubmit:h=>t(Array.from(h)),submitShortcuts:[":w",":wq"],toggleKeys:[" ","x"],enterBehavior:"action-only",hint:"Each location uploads to a single workspace. Lore only auto-uploads sessions from items checked here. Everything else stays local."})})]})}function gde({organizationName:e}){return e?(0,nr.jsx)(Ee,{marginBottom:1,children:(0,nr.jsx)(en,{label:"Workspace",value:e,kind:"info"})}):null}function RKe(){return{id:hde,label:"+ Add a repo origin (e.g. tanagram/lore) or a directory\u2026",description:"a directory inside a git repo resolves to its `origin` remote; any other directory is uploaded by its path",action:!0,actionVariant:"add"}}function xKe(){return{id:_de,label:"Save",description:"save checked repos and directories",action:!0,actionVariant:"button"}}function DKe(){return{id:Ede,label:"Skip",description:"leave upload settings unchanged for now",action:!0,actionVariant:"button"}}function tYt(e,t){if(e.sessionCount===0)return`${e.kind==="dir"?"directory \xB7 ":""}already configured`;let n=Math.max(0,Math.floor((t-e.lastUsedAtMs)/1e3)),r=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`,o=e.sessionCount===1?"session":"sessions",i=e.kind==="dir"?"directory \xB7 ":"",s=e.configured?" \xB7 already configured":"";return`${i}${e.sessionCount} ${o} \xB7 last used ${r}${s}`}function NKe(e,t){return e?[...e]:t.slice(0,3).map(n=>n.id)}var JD,nr,hde,_de,Ede,NA,yde=B(async()=>{"use strict";A();await ho();JD=ue(dn(),1);await dde();await RA();await Ab();await xA();await mde();await gb();await hb();Ps();nr=ue(Ht(),1),hde="__add_custom_path__",_de="__save__",Ede="__skip__",NA="__custom_repo_path__:"});import nYt from"node:fs/promises";async function rYt(e){let t=await e.whoAmI({headers:{}});if(t.status!==200)return null;let n=t.body.organizationId?.trim(),r=t.body.org_name?.trim();if(n&&r)return{id:n,name:r};let o=t.body.organizations[0];return o?{id:o.id,name:o.name}:null}async function oYt(){let e=await AKe(),t=new Map;for(let n of e){let r=await hy(n.path),o=r?{id:r,label:r,kind:"repo"}:(()=>{let s=Hi(n.path);return{id:`${NA}${s}`,label:s,kind:"dir"}})(),i=t.get(o.id);if(i){i.sessionCount+=n.sessionCount,i.lastUsedAtMs=Math.max(i.lastUsedAtMs,n.lastUsedAtMs);continue}t.set(o.id,{...o,sessionCount:n.sessionCount,lastUsedAtMs:n.lastUsedAtMs})}return Array.from(t.values()).sort((n,r)=>r.lastUsedAtMs-n.lastUsedAtMs)}function iYt(e){return[...e.include.repo,...e.include.cwd.map(t=>`${NA}${t}`)]}function sYt(e,t){let n=new Map;for(let s of e)n.set(s.id,{...s});let r=iYt(t);for(let s of r){let u=n.get(s);if(u){u.configured=!0;continue}let l=s.startsWith(NA),f=l?s.slice(NA.length):s;n.set(s,{id:s,label:f,kind:l?"dir":"repo",lastUsedAtMs:0,sessionCount:0,configured:!0})}let o=new Set(r);return{suggestions:Array.from(n.values()).sort((s,u)=>{let l=o.has(s.id),f=o.has(u.id);return l!==f?l?-1:1:u.lastUsedAtMs-s.lastUsedAtMs}),initialSelectedIds:r.length>0?r:void 0}}async function aYt(){let[e,t]=await Promise.all([oYt(),xi()]);return sYt(e,t)}async function wKe(e){try{return(await nYt.stat(Hi(e))).isDirectory()}catch{return!1}}async function uYt(e){let t=e.trim();if(!t)return"";if(/^(?:~|\.|\/)/.test(t)||await wKe(t))return hy(Hi(t));let r=qP(t);return r?`${r.owner}/${r.name}`.toLowerCase():""}async function cYt(e){let t=await uYt(e);return t?{kind:"repo",repo:t}:await wKe(e)?{kind:"cwd",cwd:Hi(e)}:null}async function lYt(e,t){let n=[],r=[],o=new Set(t.include.cwd);for(let i of e){if(i.startsWith(NA)){let s=i.slice(NA.length),u=Hi(s);if(o.has(u)){r.push(u);continue}let l=await cYt(s);l?.kind==="repo"?n.push(l.repo):l?.kind==="cwd"&&r.push(l.cwd);continue}i&&n.push(i)}return{...t.include,repo:Array.from(new Set(n)).sort(),cwd:Array.from(new Set(r)).sort()}}function dYt({organizationName:e}){let[t,n]=(0,M$.useState)({phase:"loading",suggestions:[],organizationName:e}),{exit:r}=Os();(0,M$.useEffect)(()=>{let i=!1;return(async()=>{try{let{suggestions:s,initialSelectedIds:u}=await aYt();if(i)return;n(l=>({...l,phase:"choose",suggestions:s,initialSelectedIds:u,now:Date.now()}))}catch(s){if(i)return;let u=s instanceof Error?s.message:String(s);n(l=>({...l,phase:"errored",errorMessage:u})),z.warn("configure_upload_dirs_load_failed",{error:u})}})(),()=>{i=!0}},[]);let o=async i=>{n(s=>({...s,phase:"saving"}));try{let s=await xi(),u=await lYt(i,s);await Ad({...s,include:u}),n(l=>({...l,phase:"saved",savedCount:u.repo.length+u.cwd.length})),setTimeout(()=>r(),600)}catch(s){let u=s instanceof Error?s.message:String(s);z.warn("configure_upload_dirs_save_failed",{error:u}),n(l=>({...l,phase:"errored",errorMessage:u})),setTimeout(()=>r(s instanceof Error?s:new Error(String(s))),100)}};return(0,Sde.jsx)(wA,{state:t,onSubmit:i=>{o(i)},onSkip:()=>{n(i=>({...i,phase:"saved",savedCount:0})),setTimeout(()=>r(),300)}})}async function pYt(){if(process.platform==="darwin")try{await b$(),z.info("configure_upload_dirs_daemon_resynced",{})}catch(e){z.warn("configure_upload_dirs_daemon_resync_failed",{error:e instanceof Error?e.message:String(e)})}}async function fYt(){try{let e=await x$(),t=Object.keys(e.harnesses).reduce((n,r)=>TKe(n,r),e);await D$(t),z.info("configure_upload_dirs_backfill_rewound",{})}catch(e){z.warn("configure_upload_dirs_backfill_rewind_failed",{error:e instanceof Error?e.message:String(e)})}}async function L$(e={}){if(await Th(),e.skipIfAlreadyConfigured){let h=await xi();if(h.include.repo.length>0||h.include.cwd.length>0)return}if(!await Gt()){z.warn("configure_upload_dirs_skipped",{reason:"not_authenticated"});return}let n=e.client??Ct(),r=await rYt(n);r||z.info("configure_upload_dirs_no_active_org",{});let o=e.mount??(async h=>{await cl((0,Sde.jsx)(dYt,{organizationName:h})).waitUntilExit()}),i=(await xi()).include;await o(r?.name);let s=(await xi()).include,u=JSON.stringify(s)!==JSON.stringify(i),l=s.repo.length>0||s.cwd.length>0;(s.cwd.some(h=>!i.cwd.includes(h))||s.repo.some(h=>!i.repo.includes(h)))&&await(e.rewindBackfill??fYt)(),u&&l&&await(e.resyncDaemon??pYt)()}var M$,Sde,Tde=B(async()=>{"use strict";A();await ho();M$=ue(dn(),1);yr();mn();Du();jD();YD();gKe();yh();cde();await fb();await yde();Sde=ue(Ht(),1)});function oM(){return{phase:"initialising"}}function U$(e,t){switch(t.kind){case"already_logged_in":return{...e,phase:"already_logged_in"};case"device_authorized":return{...e,phase:"awaiting_browser",userCode:t.userCode,verificationUri:t.verificationUri,verificationUriComplete:t.verificationUriComplete};case"browser_opened":return{...e,browserOpened:!0};case"browser_open_failed":return{...e,browserOpened:!1};case"browser_url":return e;case"waiting_for_authorization":return{...e,phase:"awaiting_authorization"};case"logged_in":return{...e,phase:"finished_success"};case"auto_enable_started":return{...e,phase:"auto_enable_in_progress",autoEnable:{state:"started"}};case"auto_enable_succeeded":return{...e,phase:"finished_success",autoEnable:{state:"succeeded",plistPath:t.plistPath,binaryPath:t.binaryPath,logFile:t.logFile}};case"auto_enable_failed":return{...e,phase:"finished_success",autoEnable:{state:"failed"}};case"authorization_timed_out":return{...e,phase:"finished_failure",errorKind:"timed_out"};case"authorization_denied":return{...e,phase:"finished_failure",errorKind:"denied"};case"authorization_expired":return{...e,phase:"finished_failure",errorKind:"expired"};case"login_failed":return{...e,phase:"finished_failure",errorKind:"unknown",errorMessage:t.message}}}function wp({state:e}){return(0,qn.jsxs)(Ee,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,qn.jsx)(Ms,{title:"lore login",subtitle:"authorising this CLI"}),e.phase==="already_logged_in"?(0,qn.jsxs)(Ls,{kind:"info",title:"Already signed in",children:[(0,qn.jsx)(he,{children:"You can switch identities with "}),(0,qn.jsx)(he,{bold:!0,children:"lore logout"}),(0,qn.jsx)(he,{children:" and then "}),(0,qn.jsx)(he,{bold:!0,children:"lore login"}),(0,qn.jsx)(he,{children:" again."})]}):null,e.phase==="initialising"?(0,qn.jsx)(Qn,{title:"Step 1 of 3 \xB7 Negotiating with WorkOS",children:(0,qn.jsx)(Ha,{label:"requesting a device code\u2026"})}):null,(e.phase==="awaiting_browser"||e.phase==="awaiting_authorization"||e.phase==="auto_enable_in_progress"||e.phase==="finished_success"||e.phase==="finished_failure")&&e.userCode?(0,qn.jsx)(Qn,{title:"Step 2 of 3 \xB7 Sign in",children:(0,qn.jsxs)(Ee,{flexDirection:"column",children:[(0,qn.jsx)(en,{label:"Code",value:e.userCode,kind:"info"}),(0,qn.jsx)(en,{label:"URL",value:e.verificationUri??"\u2014"}),e.browserOpened?(0,qn.jsx)(he,{color:xe.muted,children:"Opened your default browser. If it didn\u2019t open, paste the URL above into a browser and enter the code."}):(0,qn.jsx)(he,{color:xe.muted,children:"Browser didn\u2019t open automatically \u2014 paste the URL above and enter the code manually."})]})}):null,e.phase==="awaiting_authorization"?(0,qn.jsx)(Ee,{marginTop:1,children:(0,qn.jsx)(Qn,{title:"Step 3 of 3 \xB7 Authorising",children:(0,qn.jsx)(Ha,{label:"waiting for the browser to confirm\u2026"})})}):null,e.phase==="auto_enable_in_progress"?(0,qn.jsx)(Ee,{marginTop:1,children:(0,qn.jsx)(Qn,{title:"Enabling background uploads",children:(0,qn.jsx)(Ha,{label:"installing the launchd agent (\u2264 1 minute)\u2026"})})}):null,e.phase==="finished_success"?(0,qn.jsxs)(Ee,{marginTop:1,flexDirection:"column",children:[(0,qn.jsxs)(Ls,{kind:"success",title:"Signed in",children:[(0,qn.jsx)(he,{children:"You\u2019re authorised. "}),e.autoEnable?.state==="succeeded"?(0,qn.jsx)(he,{color:xe.muted,children:"Background uploads are running."}):e.autoEnable?.state==="failed"?(0,qn.jsxs)(he,{color:xe.muted,children:["Couldn\u2019t enable background uploads \u2014 run ",(0,qn.jsx)(he,{bold:!0,children:"lore enable"})," to retry."]}):(0,qn.jsx)(he,{color:xe.muted,children:"Open the Lore CLI any time."})]}),e.autoEnable?.state==="succeeded"?(0,qn.jsx)(Ee,{marginTop:1,children:(0,qn.jsxs)(Qn,{title:"LaunchAgent",children:[(0,qn.jsx)(en,{label:"Plist",value:e.autoEnable.plistPath??"\u2014"}),(0,qn.jsx)(en,{label:"Binary",value:e.autoEnable.binaryPath??"\u2014"}),(0,qn.jsx)(en,{label:"Log file",value:e.autoEnable.logFile??"\u2014"})]})}):null]}):null,e.phase==="finished_failure"?(0,qn.jsx)(Ee,{marginTop:1,children:(0,qn.jsx)(Ls,{kind:"error",title:mYt(e.errorKind),children:(0,qn.jsx)(he,{children:e.errorMessage??AYt(e.errorKind)})})}):null]})}function mYt(e){switch(e){case"timed_out":return"Authorisation timed out";case"denied":return"Authorisation denied";case"expired":return"Authorisation expired";default:return"Login failed"}}function AYt(e){switch(e){case"timed_out":return"No response from the browser before the device code expired. Run lore login again to retry.";case"denied":return"Authorisation was declined in the browser. Run lore login again if you change your mind.";case"expired":return"The device code expired before sign-in completed. Run lore login again to start over.";default:return"Something went wrong. Run lore login again to retry."}}var qn,bde=B(async()=>{"use strict";A();await ho();await RA();await Ab();await xA();await gb();await hb();Ps();qn=ue(Ht(),1)});function gYt({runLogin:e,baseDeps:t}){let[n,r]=(0,Q$.useState)(oM),{exit:o}=Os();return(0,Q$.useEffect)(()=>{let i=!1,s=u=>{i||r(l=>U$(l,u))};return(async()=>{try{await e({...t,progress:s}),setTimeout(()=>o(),100)}catch(u){setTimeout(()=>o(u instanceof Error?u:new Error(String(u))),100)}})(),()=>{i=!0}},[]),(0,Ide.jsx)(wp,{state:n})}async function BKe(e){let{runLogin:t}=await Cde().then(()=>OKe);await cl((0,Ide.jsx)(gYt,{runLogin:t,baseDeps:e})).waitUntilExit()}var Q$,Ide,kKe=B(async()=>{"use strict";A();await ho();Q$=ue(dn(),1);await fb();await bde();Ide=ue(Ht(),1)});var PKe,MKe=B(()=>{"use strict";A();oo();PKe=e=>{switch(e.kind){case"already_logged_in":console.log(`
|
|
473
|
+
<%s key={someKey} {...props} />`,gn,Vn,ar,Vn),Nr[Vn+gn]=!0)}if(Vn=null,$t!==void 0&&(n($t),Vn=""+$t),s(At)&&(n(At.key),Vn=""+At.key),"key"in At){$t={};for(var qt in At)qt!=="key"&&($t[qt]=At[qt])}else $t=At;return Vn&&u($t,typeof be=="function"?be.displayName||be.name||"Unknown":be),f(be,Vn,$t,o(),Sr,Qs)}function _(be){E(be)?be._store&&(be._store.validated=1):typeof be=="object"&&be!==null&&be.$$typeof===_e&&(be._payload.status==="fulfilled"?E(be._payload.value)&&be._payload.value._store&&(be._payload.value._store.validated=1):be._store&&(be._store.validated=1))}function E(be){return typeof be=="object"&&be!==null&&be.$$typeof===v}var T=dn(),v=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),G=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),_e=Symbol.for("react.lazy"),Ve=Symbol.for("react.activity"),nt=Symbol.for("react.client.reference"),Fe=T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Mt=Object.prototype.hasOwnProperty,un=Array.isArray,Se=console.createTask?console.createTask:function(){return null};T={react_stack_bottom_frame:function(be){return be()}};var ze,rt={},lt=T.react_stack_bottom_frame.bind(T,i)(),kt=Se(r(i)),Nr={};B$.Fragment=x,B$.jsx=function(be,At,$t){var gn=1e4>Fe.recentlyCreatedOwnerStacks++;return h(be,At,$t,!1,gn?Error("react-stack-top-frame"):lt,gn?Se(r(be)):kt)},B$.jsxs=function(be,At,$t){var gn=1e4>Fe.recentlyCreatedOwnerStacks++;return h(be,At,$t,!0,gn?Error("react-stack-top-frame"):lt,gn?Se(r(be)):kt)}})()});var Ht=M((tor,lde)=>{"use strict";A();process.env.NODE_ENV==="production"?lde.exports=IKe():lde.exports=CKe()});function nM({items:e,onChange:t,onSubmit:n,onAction:r,onCancel:o,submitShortcuts:i=[],toggleKeys:s=[" "],enterBehavior:u="submit",hint:l,disabled:f=!1}){let[h,_]=(0,$f.useState)(0),[E,T]=(0,$f.useState)(()=>{let P=new Set;for(let j of e)j.initialChecked&&P.add(j.id);return P}),v=(0,$f.useRef)(h);v.current=h;let R=(0,$f.useRef)(E);R.current=E;let x=(0,$f.useRef)(""),k=(0,$f.useRef)(void 0);return(0,$f.useEffect)(()=>{let P=new Set;for(let j of e)j.initialChecked&&P.add(j.id);_(j=>{let G=Math.min(j,Math.max(0,e.length-1));return v.current=G,G}),T(j=>$7t(j,P)?j:(R.current=P,P))},[e]),(0,$f.useEffect)(()=>()=>{k.current&&clearTimeout(k.current)},[]),Ru((P,j)=>{if(e.length!==0){if(i.length>0&&P){k.current&&(clearTimeout(k.current),k.current=void 0);let G=`${x.current}${P}`,$=i.includes(G),V=i.some(te=>te.startsWith(G)),ae=i.some(te=>te!==G&&te.startsWith(G));if($&&!ae){x.current="",n(R.current);return}if($&&ae){x.current=G,k.current=setTimeout(()=>{k.current=void 0,x.current="",n(R.current)},1e3),k.current.unref?.();return}if(V){x.current=G;return}x.current=""}if(j.upArrow||P==="k"){_(G=>{let $=(G-1+e.length)%e.length;return v.current=$,$});return}if(j.downArrow||P==="j"){_(G=>{let $=(G+1)%e.length;return v.current=$,$});return}if(s.includes(P)){let G=e[v.current];if(!G||G.disabled)return;if(G.action){r?.(G.id,R.current);return}let $=new Set(R.current);$.has(G.id)?$.delete(G.id):$.add(G.id),R.current=$,T($),t?.($);return}if(j.return){let G=e[v.current];if(G&&!G.disabled&&G.action){r?.(G.id,R.current);return}if(u==="action-only")return;n(R.current);return}j.escape&&o&&o()}},{isActive:!f}),e.length===0?(0,$i.jsx)(he,{color:xe.muted,children:"no options available"}):(0,$i.jsxs)(Ee,{flexDirection:"column",children:[e.map((P,j)=>{let G=j===h,$=E.has(P.id),V=P.actionVariant==="button"&&e[j-1]?.actionVariant!=="button",ae=P.disabled?"\u2298":P.action?P.actionVariant==="button"?" ":" + ":$?"[x]":"[ ]";return P.actionVariant==="button"?(0,$i.jsxs)(Ee,{marginTop:V?2:0,children:[(0,$i.jsx)(Ee,{width:2,flexShrink:0,children:(0,$i.jsx)(he,{color:G?xe.primary:xe.muted,children:G?"\u203A":" "})}),(0,$i.jsxs)(Ee,{flexGrow:1,flexShrink:1,flexDirection:"row",children:[(0,$i.jsx)(Ee,{width:10,flexShrink:0,children:(0,$i.jsxs)(he,{color:P.disabled?xe.muted:G?xe.primary:xe.highlight,bold:G&&!P.disabled,children:["[ ",P.label," ]"]})}),P.description?(0,$i.jsx)(he,{color:xe.muted,children:P.description}):null]})]},P.id):(0,$i.jsxs)(Ee,{children:[(0,$i.jsx)(Ee,{width:2,flexShrink:0,children:(0,$i.jsx)(he,{color:G?xe.primary:xe.muted,children:G?"\u203A":" "})}),(0,$i.jsx)(Ee,{width:4,flexShrink:0,children:(0,$i.jsx)(he,{color:P.disabled?xe.muted:$?xe.success:xe.muted,children:ae})}),(0,$i.jsxs)(Ee,{flexGrow:1,flexShrink:1,flexDirection:"column",children:[(0,$i.jsx)(he,{color:P.disabled?xe.muted:G?xe.primary:xe.highlight,bold:G&&!P.disabled,children:P.label}),P.description?(0,$i.jsx)(he,{color:xe.muted,children:P.description}):null]})]},P.id)}),l?(0,$i.jsx)(Ee,{marginTop:1,children:(0,$i.jsx)(he,{color:xe.muted,children:l})}):null]})}function $7t(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}var $f,$i,dde=B(async()=>{"use strict";A();await ho();$f=ue(dn(),1);Ps();$i=ue(Ht(),1)});function Ms({title:e,subtitle:t,right:n}){return(0,Ey.jsx)(Ee,{flexDirection:"column",marginBottom:1,children:(0,Ey.jsxs)(Ee,{justifyContent:"space-between",children:[(0,Ey.jsxs)(Ee,{children:[(0,Ey.jsx)(he,{bold:!0,color:xe.primary,children:e}),t?(0,Ey.jsxs)(he,{color:xe.muted,children:[" \u2014 ",t]}):null]}),n?(0,Ey.jsx)(he,{color:xe.muted,children:n}):null]})})}var Ey,RA=B(async()=>{"use strict";A();await ho();Ps();Ey=ue(Ht(),1)});function Ls({kind:e,title:t,children:n}){let r=q7t[e];return(0,mb.jsxs)(Ee,{borderStyle:"round",borderColor:r,flexDirection:"column",paddingX:1,children:[(0,mb.jsx)(Ee,{children:(0,mb.jsxs)(he,{color:r,bold:!0,children:[V7t[e],t?` ${t}`:""]})}),(0,mb.jsx)(Ee,{marginTop:t?1:0,flexDirection:"column",children:typeof n=="string"?(0,mb.jsx)(he,{children:n}):n})]})}var mb,q7t,V7t,Ab=B(async()=>{"use strict";A();await ho();Ps();mb=ue(Ht(),1),q7t={success:xe.success,error:xe.danger,warning:xe.warning,info:xe.primary},V7t={success:"\u2713",error:"\u2717",warning:"!",info:"\u2139"}});function Qn({title:e,subtitle:t,focused:n=!1,padding:r=1,children:o}){return(0,yy.jsxs)(Ee,{borderStyle:"round",borderColor:n?xe.primary:xe.border,flexDirection:"column",paddingX:r,paddingY:r>0?Math.max(0,r-1):0,children:[e||t?(0,yy.jsxs)(Ee,{justifyContent:"space-between",marginBottom:1,children:[e?(0,yy.jsx)(Ee,{marginRight:2,children:(0,yy.jsx)(he,{bold:!0,color:n?xe.primary:xe.highlight,children:e})}):(0,yy.jsx)(he,{}),t?(0,yy.jsx)(he,{color:xe.muted,children:t}):null]}):null,o]})}var yy,xA=B(async()=>{"use strict";A();await ho();Ps();yy=ue(Ht(),1)});function k$({initialValue:e="",placeholder:t="",value:n,onChange:r,onSubmit:o,onCancel:i,disabled:s=!1}){let[u,l]=(0,Sy.useState)(e),f=n!==void 0,h=f?n:u,[_,E]=(0,Sy.useState)(e.length),T=(0,Sy.useRef)(h);T.current=h;let v=(0,Sy.useRef)(_);v.current=_,(0,Sy.useEffect)(()=>{_>h.length&&E(h.length)},[h,_]);let R=j=>{T.current=j,f||l(j),r?.(j)};if(Ru((j,G)=>{if(G.return){o(T.current);return}if(G.escape&&i){i();return}let $=T.current,V=v.current;if(G.backspace||G.delete){if(V===0)return;let _e=$.slice(0,V-1)+$.slice(V);v.current=V-1,E(V-1),R(_e);return}if(G.leftArrow){V>0&&(v.current=V-1,E(V-1));return}if(G.rightArrow){V<$.length&&(v.current=V+1,E(V+1));return}if(G.ctrl&&j==="a"){v.current=0,E(0);return}if(G.ctrl&&j==="e"){v.current=$.length,E($.length);return}if(!j||G.ctrl||G.meta)return;let ae=$.slice(0,V)+j+$.slice(V),te=V+j.length;v.current=te,E(te),R(ae)},{isActive:!s}),h.length===0&&t)return(0,Ih.jsxs)(Ee,{children:[(0,Ih.jsx)(he,{color:xe.muted,children:"\u258F"}),(0,Ih.jsx)(he,{color:xe.muted,children:t})]});let x=h.slice(0,_),k=h[_]??" ",P=h.slice(_+1);return(0,Ih.jsxs)(Ee,{children:[(0,Ih.jsx)(he,{children:x}),(0,Ih.jsx)(he,{inverse:!0,children:k}),(0,Ih.jsx)(he,{children:P})]})}var Sy,Ih,pde=B(async()=>{"use strict";A();await ho();Sy=ue(dn(),1);Ps();Ih=ue(Ht(),1)});import Y7t from"node:fs/promises";import fde from"node:os";import rM from"node:path";function O$({initialValue:e="",placeholder:t="Start typing a path (try ~/code)",limit:n=8,loadSuggestions:r=K7t,onSubmit:o,onCancel:i}){let[s,u]=(0,Np.useState)(e),[l,f]=(0,Np.useState)([]),[h,_]=(0,Np.useState)("input"),[E,T]=(0,Np.useState)(0),v=(0,Np.useRef)(E);v.current=E;let R=(0,Np.useRef)(s);R.current=s;let x=(0,Np.useRef)(l);x.current=l;let k=(0,Np.useRef)(h);k.current=h,(0,Np.useEffect)(()=>{let j=!1;return(async()=>{let G=await r(s,n);j||(f(G),T(0),G.length===0&&k.current==="list"&&(k.current="input",_("input")))})(),()=>{j=!0}},[s,n,r]),Ru((j,G)=>{if(k.current==="input"){G.downArrow&&x.current.length>0&&(k.current="list",_("list"),T(0),v.current=0);return}if(G.upArrow){let $=v.current-1;$<0?(k.current="input",_("input")):(v.current=$,T($));return}if(G.downArrow){let $=Math.min(v.current+1,x.current.length-1);v.current=$,T($);return}if(G.return||G.tab){let $=x.current[v.current];$&&(R.current=$,u($),k.current="input",_("input"));return}if(G.escape&&i){i();return}});let P=j=>{k.current==="input"&&o(j)};return(0,mc.jsxs)(Ee,{flexDirection:"column",children:[(0,mc.jsxs)(Ee,{children:[(0,mc.jsx)(he,{color:h==="input"?xe.primary:xe.muted,children:h==="input"?"\u203A ":" "}),(0,mc.jsx)(k$,{value:s,placeholder:t,onChange:j=>{u(j),R.current=j},onSubmit:P,onCancel:i,disabled:h!=="input"})]}),l.length>0?(0,mc.jsxs)(Ee,{flexDirection:"column",marginTop:1,children:[l.map((j,G)=>{let $=h==="list"&&G===E;return(0,mc.jsxs)(Ee,{children:[(0,mc.jsx)(Ee,{width:2,flexShrink:0,children:(0,mc.jsx)(he,{color:$?xe.primary:xe.muted,children:$?"\u203A":" "})}),(0,mc.jsx)(he,{color:$?xe.primary:void 0,children:j})]},j)}),(0,mc.jsx)(Ee,{marginTop:1,children:(0,mc.jsx)(he,{color:xe.muted,children:"\u2193 to browse suggestions \xB7 \u2191 back to typing \xB7 Enter to commit or complete \xB7 Esc to cancel"})})]}):(0,mc.jsx)(Ee,{marginTop:1,children:(0,mc.jsx)(he,{color:xe.muted,children:"No matching directories yet. Keep typing or press Enter to use the literal path."})})]})}async function K7t(e,t){let n=J7t(e),r,o;n.length===0?(r=fde.homedir(),o=""):n.endsWith("/")?(r=n.length>1?n.replace(/\/+$/,""):"/",o=""):(r=rM.dirname(n),o=rM.basename(n)),r=rM.normalize(r);let i;try{i=(await Y7t.readdir(r,{withFileTypes:!0})).filter(u=>u.isDirectory()).map(u=>u.name).filter(u=>u.startsWith(o)).sort()}catch{return[]}return i.slice(0,t).map(s=>rM.join(r,s))}function J7t(e){return e==="~"?fde.homedir():e.startsWith("~/")?rM.join(fde.homedir(),e.slice(2)):e}var Np,mc,mde=B(async()=>{"use strict";A();await ho();Np=ue(dn(),1);Ps();await pde();mc=ue(Ht(),1)});function Ha({label:e,frames:t=Z7t,intervalMs:n=80,color:r=xe.primary}){let[o,i]=(0,P$.useState)(0);(0,P$.useEffect)(()=>{let u=setInterval(()=>{i(l=>(l+1)%t.length)},n);return typeof u.unref=="function"&&u.unref(),()=>clearInterval(u)},[t.length,n]);let s=t[o]??t[0]??"";return(0,Ade.jsxs)(he,{color:r,children:[s,e?(0,Ade.jsxs)(he,{children:[" ",e]}):null]})}var P$,Ade,Z7t,gb=B(async()=>{"use strict";A();await ho();P$=ue(dn(),1);Ps();Ade=ue(Ht(),1),Z7t=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]});function en({label:e,value:t,kind:n="idle",dotColor:r,valueColor:o,labelWidth:i=16}){return(0,DA.jsxs)(Ee,{children:[(0,DA.jsx)(Ee,{width:2,flexShrink:0,children:(0,DA.jsx)(he,{color:r??W7t[n],children:"\u25CF"})}),(0,DA.jsx)(Ee,{width:i,flexShrink:0,children:(0,DA.jsx)(he,{color:xe.muted,children:e})}),(0,DA.jsx)(Ee,{flexGrow:1,flexShrink:1,children:X7t(t,o)})]})}function X7t(e,t){return e==null?(0,DA.jsx)(he,{color:t,children:"\u2014"}):(0,vKe.isValidElement)(e)?e:(0,DA.jsx)(he,{color:t,children:e})}var vKe,DA,W7t,hb=B(async()=>{"use strict";A();await ho();vKe=ue(dn(),1);Ps();DA=ue(Ht(),1),W7t={idle:xe.muted,info:xe.primary,success:xe.success,warning:xe.warning,error:xe.danger}});function wA({state:e,onSubmit:t,onSkip:n}){return(0,nr.jsxs)(Ee,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,nr.jsx)(Ms,{title:"Configure uploads",subtitle:"Pick which repos and directories Lore should auto-upload from"}),e.phase==="loading"?(0,nr.jsx)(Qn,{title:"Looking at your recent Claude Code sessions\u2026",children:(0,nr.jsx)(Ha,{label:"reading ~/.claude/history.jsonl and resolving git remotes"})}):null,e.phase==="choose"?(0,nr.jsx)(eYt,{state:e,onSubmit:t,onSkip:n}):null,e.phase==="saving"?(0,nr.jsx)(Qn,{title:"Saving",children:(0,nr.jsx)(Ha,{label:"writing ~/.lore/upload_filters.json\u2026"})}):null,e.phase==="saved"?(0,nr.jsx)(Ee,{marginTop:1,children:(0,nr.jsx)(Ls,{kind:"success",title:"You're set",children:(0,nr.jsxs)(he,{children:[e.savedCount===0?"Nothing selected. Lore won't auto-upload anything until you run ":`Lore will auto-upload from ${e.savedCount} ${e.savedCount===1?"location":"locations"}. Add or remove more with `,(0,nr.jsx)(he,{bold:!0,children:"lore configure"}),(0,nr.jsx)(he,{children:"."})]})})}):null,e.phase==="errored"?(0,nr.jsx)(Ee,{marginTop:1,children:(0,nr.jsx)(Ls,{kind:"error",title:"Couldn't save your upload settings",children:(0,nr.jsx)(he,{children:e.errorMessage??"Unknown error."})})}):null]})}function eYt({state:e,onSubmit:t,onSkip:n}){let[r,o]=(0,JD.useState)(()=>new Set(NKe(e.initialSelectedIds,e.suggestions))),[i,s]=(0,JD.useState)([]),[u,l]=(0,JD.useState)("choose");if((0,JD.useEffect)(()=>{o(h=>h.size>0?h:new Set(NKe(e.initialSelectedIds,e.suggestions)))},[e.initialSelectedIds,e.suggestions]),u==="add_custom")return(0,nr.jsxs)(Ee,{flexDirection:"column",children:[(0,nr.jsx)(gde,{organizationName:e.organizationName}),(0,nr.jsx)(Qn,{title:"Type a directory or repo origin",subtitle:"\u2193 to browse suggestions \xB7 Enter to accept \xB7 Esc to go back",children:(0,nr.jsx)(O$,{placeholder:"Try ~/code or tanagram/lore",onSubmit:h=>{let _=h.trim();if(_.length>0){let E=`${NA}${_}`;s(T=>T.includes(_)?T:[...T,_]),o(T=>{let v=new Set(T);return v.add(E),v})}l("choose")},onCancel:()=>l("choose")})})]});if(e.suggestions.length===0&&i.length===0)return(0,nr.jsxs)(Ee,{flexDirection:"column",children:[(0,nr.jsx)(gde,{organizationName:e.organizationName}),(0,nr.jsx)(Qn,{title:"No recent projects found",children:(0,nr.jsxs)(he,{color:xe.muted,children:["Lore didn't find any recent Claude Code sessions. Press"," ",(0,nr.jsx)(he,{bold:!0,children:"Space"})," or ",(0,nr.jsx)(he,{bold:!0,children:"Enter"}),' on "+ Add a repo origin or directory\u2026" below to type one in, or run'," ",(0,nr.jsx)(he,{bold:!0,children:"lore configure"})," again later."]})}),(0,nr.jsx)(Ee,{marginTop:1,children:(0,nr.jsx)(Qn,{title:" ",subtitle:"space/x to toggle \xB7 enter activates buttons",children:(0,nr.jsx)(nM,{items:[RKe(),xKe(),DKe()],onSubmit:h=>t(Array.from(h)),onAction:(h,_)=>{if(h===hde){l("add_custom");return}if(h===_de){t(Array.from(_));return}h===Ede&&n()},submitShortcuts:[":w",":wq"],toggleKeys:[" ","x"],enterBehavior:"action-only",hint:"Each directory uploads to a single workspace. Re-run lore configure to add more."})})})]});let f=[...e.suggestions.map(h=>({id:h.id,label:h.label,description:tYt(h,e.now??Date.now()),initialChecked:r.has(h.id)})),...i.map(h=>({id:`${NA}${h}`,label:h,description:"custom directory or repo origin you added",initialChecked:r.has(`${NA}${h}`)})),RKe(),xKe(),DKe()];return(0,nr.jsxs)(Ee,{flexDirection:"column",children:[(0,nr.jsx)(gde,{organizationName:e.organizationName}),(0,nr.jsx)(Qn,{title:"Recently used repos and directories",subtitle:"space/x to toggle \xB7 enter activates buttons",children:(0,nr.jsx)(nM,{items:f,onChange:h=>o(new Set(h)),onAction:(h,_)=>{if(h===hde){l("add_custom");return}if(h===_de){t(Array.from(_));return}h===Ede&&n()},onSubmit:h=>t(Array.from(h)),submitShortcuts:[":w",":wq"],toggleKeys:[" ","x"],enterBehavior:"action-only",hint:"Each location uploads to a single workspace. Lore only auto-uploads sessions from items checked here. Everything else stays local."})})]})}function gde({organizationName:e}){return e?(0,nr.jsx)(Ee,{marginBottom:1,children:(0,nr.jsx)(en,{label:"Workspace",value:e,kind:"info"})}):null}function RKe(){return{id:hde,label:"+ Add a repo origin (e.g. tanagram/lore) or a directory\u2026",description:"a directory inside a git repo resolves to its `origin` remote; any other directory is uploaded by its path",action:!0,actionVariant:"add"}}function xKe(){return{id:_de,label:"Save",description:"save checked repos and directories",action:!0,actionVariant:"button"}}function DKe(){return{id:Ede,label:"Skip",description:"leave upload settings unchanged for now",action:!0,actionVariant:"button"}}function tYt(e,t){if(e.sessionCount===0)return`${e.kind==="dir"?"directory \xB7 ":""}already configured`;let n=Math.max(0,Math.floor((t-e.lastUsedAtMs)/1e3)),r=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`,o=e.sessionCount===1?"session":"sessions",i=e.kind==="dir"?"directory \xB7 ":"",s=e.configured?" \xB7 already configured":"";return`${i}${e.sessionCount} ${o} \xB7 last used ${r}${s}`}function NKe(e,t){return e?[...e]:t.slice(0,3).map(n=>n.id)}var JD,nr,hde,_de,Ede,NA,yde=B(async()=>{"use strict";A();await ho();JD=ue(dn(),1);await dde();await RA();await Ab();await xA();await mde();await gb();await hb();Ps();nr=ue(Ht(),1),hde="__add_custom_path__",_de="__save__",Ede="__skip__",NA="__custom_repo_path__:"});import nYt from"node:fs/promises";async function rYt(e){let t=await e.whoAmI({headers:{}});if(t.status!==200)return null;let n=t.body.workspaceOrganizationIds?.[0]?.trim(),r=t.body.org_name?.trim();if(n&&r)return{id:n,name:r};let o=t.body.organizations[0];return o?{id:o.id,name:o.name}:null}async function oYt(){let e=await AKe(),t=new Map;for(let n of e){let r=await hy(n.path),o=r?{id:r,label:r,kind:"repo"}:(()=>{let s=Hi(n.path);return{id:`${NA}${s}`,label:s,kind:"dir"}})(),i=t.get(o.id);if(i){i.sessionCount+=n.sessionCount,i.lastUsedAtMs=Math.max(i.lastUsedAtMs,n.lastUsedAtMs);continue}t.set(o.id,{...o,sessionCount:n.sessionCount,lastUsedAtMs:n.lastUsedAtMs})}return Array.from(t.values()).sort((n,r)=>r.lastUsedAtMs-n.lastUsedAtMs)}function iYt(e){return[...e.include.repo,...e.include.cwd.map(t=>`${NA}${t}`)]}function sYt(e,t){let n=new Map;for(let s of e)n.set(s.id,{...s});let r=iYt(t);for(let s of r){let u=n.get(s);if(u){u.configured=!0;continue}let l=s.startsWith(NA),f=l?s.slice(NA.length):s;n.set(s,{id:s,label:f,kind:l?"dir":"repo",lastUsedAtMs:0,sessionCount:0,configured:!0})}let o=new Set(r);return{suggestions:Array.from(n.values()).sort((s,u)=>{let l=o.has(s.id),f=o.has(u.id);return l!==f?l?-1:1:u.lastUsedAtMs-s.lastUsedAtMs}),initialSelectedIds:r.length>0?r:void 0}}async function aYt(){let[e,t]=await Promise.all([oYt(),xi()]);return sYt(e,t)}async function wKe(e){try{return(await nYt.stat(Hi(e))).isDirectory()}catch{return!1}}async function uYt(e){let t=e.trim();if(!t)return"";if(/^(?:~|\.|\/)/.test(t)||await wKe(t))return hy(Hi(t));let r=qP(t);return r?`${r.owner}/${r.name}`.toLowerCase():""}async function cYt(e){let t=await uYt(e);return t?{kind:"repo",repo:t}:await wKe(e)?{kind:"cwd",cwd:Hi(e)}:null}async function lYt(e,t){let n=[],r=[],o=new Set(t.include.cwd);for(let i of e){if(i.startsWith(NA)){let s=i.slice(NA.length),u=Hi(s);if(o.has(u)){r.push(u);continue}let l=await cYt(s);l?.kind==="repo"?n.push(l.repo):l?.kind==="cwd"&&r.push(l.cwd);continue}i&&n.push(i)}return{...t.include,repo:Array.from(new Set(n)).sort(),cwd:Array.from(new Set(r)).sort()}}function dYt({organizationName:e}){let[t,n]=(0,M$.useState)({phase:"loading",suggestions:[],organizationName:e}),{exit:r}=Os();(0,M$.useEffect)(()=>{let i=!1;return(async()=>{try{let{suggestions:s,initialSelectedIds:u}=await aYt();if(i)return;n(l=>({...l,phase:"choose",suggestions:s,initialSelectedIds:u,now:Date.now()}))}catch(s){if(i)return;let u=s instanceof Error?s.message:String(s);n(l=>({...l,phase:"errored",errorMessage:u})),z.warn("configure_upload_dirs_load_failed",{error:u})}})(),()=>{i=!0}},[]);let o=async i=>{n(s=>({...s,phase:"saving"}));try{let s=await xi(),u=await lYt(i,s);await Ad({...s,include:u}),n(l=>({...l,phase:"saved",savedCount:u.repo.length+u.cwd.length})),setTimeout(()=>r(),600)}catch(s){let u=s instanceof Error?s.message:String(s);z.warn("configure_upload_dirs_save_failed",{error:u}),n(l=>({...l,phase:"errored",errorMessage:u})),setTimeout(()=>r(s instanceof Error?s:new Error(String(s))),100)}};return(0,Sde.jsx)(wA,{state:t,onSubmit:i=>{o(i)},onSkip:()=>{n(i=>({...i,phase:"saved",savedCount:0})),setTimeout(()=>r(),300)}})}async function pYt(){if(process.platform==="darwin")try{await b$(),z.info("configure_upload_dirs_daemon_resynced",{})}catch(e){z.warn("configure_upload_dirs_daemon_resync_failed",{error:e instanceof Error?e.message:String(e)})}}async function fYt(){try{let e=await x$(),t=Object.keys(e.harnesses).reduce((n,r)=>TKe(n,r),e);await D$(t),z.info("configure_upload_dirs_backfill_rewound",{})}catch(e){z.warn("configure_upload_dirs_backfill_rewind_failed",{error:e instanceof Error?e.message:String(e)})}}async function L$(e={}){if(await Th(),e.skipIfAlreadyConfigured){let h=await xi();if(h.include.repo.length>0||h.include.cwd.length>0)return}if(!await Gt()){z.warn("configure_upload_dirs_skipped",{reason:"not_authenticated"});return}let n=e.client??Ct(),r=await rYt(n);r||z.info("configure_upload_dirs_no_active_org",{});let o=e.mount??(async h=>{await cl((0,Sde.jsx)(dYt,{organizationName:h})).waitUntilExit()}),i=(await xi()).include;await o(r?.name);let s=(await xi()).include,u=JSON.stringify(s)!==JSON.stringify(i),l=s.repo.length>0||s.cwd.length>0;(s.cwd.some(h=>!i.cwd.includes(h))||s.repo.some(h=>!i.repo.includes(h)))&&await(e.rewindBackfill??fYt)(),u&&l&&await(e.resyncDaemon??pYt)()}var M$,Sde,Tde=B(async()=>{"use strict";A();await ho();M$=ue(dn(),1);yr();mn();Du();jD();YD();gKe();yh();cde();await fb();await yde();Sde=ue(Ht(),1)});function oM(){return{phase:"initialising"}}function U$(e,t){switch(t.kind){case"already_logged_in":return{...e,phase:"already_logged_in"};case"device_authorized":return{...e,phase:"awaiting_browser",userCode:t.userCode,verificationUri:t.verificationUri,verificationUriComplete:t.verificationUriComplete};case"browser_opened":return{...e,browserOpened:!0};case"browser_open_failed":return{...e,browserOpened:!1};case"browser_url":return e;case"waiting_for_authorization":return{...e,phase:"awaiting_authorization"};case"logged_in":return{...e,phase:"finished_success"};case"auto_enable_started":return{...e,phase:"auto_enable_in_progress",autoEnable:{state:"started"}};case"auto_enable_succeeded":return{...e,phase:"finished_success",autoEnable:{state:"succeeded",plistPath:t.plistPath,binaryPath:t.binaryPath,logFile:t.logFile}};case"auto_enable_failed":return{...e,phase:"finished_success",autoEnable:{state:"failed"}};case"authorization_timed_out":return{...e,phase:"finished_failure",errorKind:"timed_out"};case"authorization_denied":return{...e,phase:"finished_failure",errorKind:"denied"};case"authorization_expired":return{...e,phase:"finished_failure",errorKind:"expired"};case"login_failed":return{...e,phase:"finished_failure",errorKind:"unknown",errorMessage:t.message}}}function wp({state:e}){return(0,qn.jsxs)(Ee,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,qn.jsx)(Ms,{title:"lore login",subtitle:"authorising this CLI"}),e.phase==="already_logged_in"?(0,qn.jsxs)(Ls,{kind:"info",title:"Already signed in",children:[(0,qn.jsx)(he,{children:"You can switch identities with "}),(0,qn.jsx)(he,{bold:!0,children:"lore logout"}),(0,qn.jsx)(he,{children:" and then "}),(0,qn.jsx)(he,{bold:!0,children:"lore login"}),(0,qn.jsx)(he,{children:" again."})]}):null,e.phase==="initialising"?(0,qn.jsx)(Qn,{title:"Step 1 of 3 \xB7 Negotiating with WorkOS",children:(0,qn.jsx)(Ha,{label:"requesting a device code\u2026"})}):null,(e.phase==="awaiting_browser"||e.phase==="awaiting_authorization"||e.phase==="auto_enable_in_progress"||e.phase==="finished_success"||e.phase==="finished_failure")&&e.userCode?(0,qn.jsx)(Qn,{title:"Step 2 of 3 \xB7 Sign in",children:(0,qn.jsxs)(Ee,{flexDirection:"column",children:[(0,qn.jsx)(en,{label:"Code",value:e.userCode,kind:"info"}),(0,qn.jsx)(en,{label:"URL",value:e.verificationUri??"\u2014"}),e.browserOpened?(0,qn.jsx)(he,{color:xe.muted,children:"Opened your default browser. If it didn\u2019t open, paste the URL above into a browser and enter the code."}):(0,qn.jsx)(he,{color:xe.muted,children:"Browser didn\u2019t open automatically \u2014 paste the URL above and enter the code manually."})]})}):null,e.phase==="awaiting_authorization"?(0,qn.jsx)(Ee,{marginTop:1,children:(0,qn.jsx)(Qn,{title:"Step 3 of 3 \xB7 Authorising",children:(0,qn.jsx)(Ha,{label:"waiting for the browser to confirm\u2026"})})}):null,e.phase==="auto_enable_in_progress"?(0,qn.jsx)(Ee,{marginTop:1,children:(0,qn.jsx)(Qn,{title:"Enabling background uploads",children:(0,qn.jsx)(Ha,{label:"installing the launchd agent (\u2264 1 minute)\u2026"})})}):null,e.phase==="finished_success"?(0,qn.jsxs)(Ee,{marginTop:1,flexDirection:"column",children:[(0,qn.jsxs)(Ls,{kind:"success",title:"Signed in",children:[(0,qn.jsx)(he,{children:"You\u2019re authorised. "}),e.autoEnable?.state==="succeeded"?(0,qn.jsx)(he,{color:xe.muted,children:"Background uploads are running."}):e.autoEnable?.state==="failed"?(0,qn.jsxs)(he,{color:xe.muted,children:["Couldn\u2019t enable background uploads \u2014 run ",(0,qn.jsx)(he,{bold:!0,children:"lore enable"})," to retry."]}):(0,qn.jsx)(he,{color:xe.muted,children:"Open the Lore CLI any time."})]}),e.autoEnable?.state==="succeeded"?(0,qn.jsx)(Ee,{marginTop:1,children:(0,qn.jsxs)(Qn,{title:"LaunchAgent",children:[(0,qn.jsx)(en,{label:"Plist",value:e.autoEnable.plistPath??"\u2014"}),(0,qn.jsx)(en,{label:"Binary",value:e.autoEnable.binaryPath??"\u2014"}),(0,qn.jsx)(en,{label:"Log file",value:e.autoEnable.logFile??"\u2014"})]})}):null]}):null,e.phase==="finished_failure"?(0,qn.jsx)(Ee,{marginTop:1,children:(0,qn.jsx)(Ls,{kind:"error",title:mYt(e.errorKind),children:(0,qn.jsx)(he,{children:e.errorMessage??AYt(e.errorKind)})})}):null]})}function mYt(e){switch(e){case"timed_out":return"Authorisation timed out";case"denied":return"Authorisation denied";case"expired":return"Authorisation expired";default:return"Login failed"}}function AYt(e){switch(e){case"timed_out":return"No response from the browser before the device code expired. Run lore login again to retry.";case"denied":return"Authorisation was declined in the browser. Run lore login again if you change your mind.";case"expired":return"The device code expired before sign-in completed. Run lore login again to start over.";default:return"Something went wrong. Run lore login again to retry."}}var qn,bde=B(async()=>{"use strict";A();await ho();await RA();await Ab();await xA();await gb();await hb();Ps();qn=ue(Ht(),1)});function gYt({runLogin:e,baseDeps:t}){let[n,r]=(0,Q$.useState)(oM),{exit:o}=Os();return(0,Q$.useEffect)(()=>{let i=!1,s=u=>{i||r(l=>U$(l,u))};return(async()=>{try{await e({...t,progress:s}),setTimeout(()=>o(),100)}catch(u){setTimeout(()=>o(u instanceof Error?u:new Error(String(u))),100)}})(),()=>{i=!0}},[]),(0,Ide.jsx)(wp,{state:n})}async function BKe(e){let{runLogin:t}=await Cde().then(()=>OKe);await cl((0,Ide.jsx)(gYt,{runLogin:t,baseDeps:e})).waitUntilExit()}var Q$,Ide,kKe=B(async()=>{"use strict";A();await ho();Q$=ue(dn(),1);await fb();await bde();Ide=ue(Ht(),1)});var PKe,MKe=B(()=>{"use strict";A();oo();PKe=e=>{switch(e.kind){case"already_logged_in":console.log(`
|
|
474
474
|
Already logged in. Use 'lore logout' if you want to sign out.
|
|
475
475
|
`);return;case"device_authorized":console.log(`
|
|
476
476
|
Sign in to Lore:`),console.log(`
|
|
@@ -628,7 +628,7 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
|
|
|
628
628
|
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
629
629
|
`,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(Oy(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(jXe(n.key)&&!Oy(n.sep,"newline")){let s=f1(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(Oy(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{let s=f1(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]}):Oy(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&&!Oy(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||Oy(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=$9(r),i=f1(o);GXe(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(`
|
|
630
630
|
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
631
|
-
`,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=$9(t),r=f1(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=$9(t),r=f1(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())}}};zXe.Parser=Rfe});var YXe=M(zM=>{"use strict";A();var HXe=mfe(),len=OM(),jM=LM(),den=ppe(),pen=gr(),fen=vfe(),$Xe=xfe();function qXe(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new fen.LineCounter||null,prettyErrors:t}}function men(e,t={}){let{lineCounter:n,prettyErrors:r}=qXe(t),o=new $Xe.Parser(n?.addNewLine),i=new HXe.Composer(t),s=Array.from(i.compose(o.parse(e)));if(r&&n)for(let u of s)u.errors.forEach(jM.prettifyError(e,n)),u.warnings.forEach(jM.prettifyError(e,n));return s.length>0?s:Object.assign([],{empty:!0},i.streamInfo())}function VXe(e,t={}){let{lineCounter:n,prettyErrors:r}=qXe(t),o=new $Xe.Parser(n?.addNewLine),i=new HXe.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 jM.YAMLParseError(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(s.errors.forEach(jM.prettifyError(e,n)),s.warnings.forEach(jM.prettifyError(e,n))),s}function Aen(e,t,n){let r;typeof t=="function"?r=t:n===void 0&&t&&typeof t=="object"&&(n=t);let o=VXe(e,n);if(!o)return null;if(o.warnings.forEach(i=>den.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 gen(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 pen.isDocument(e)&&!r?e.toString(n):new len.Document(e,r,n).toString(n)}zM.parse=Aen;zM.parseAllDocuments=men;zM.parseDocument=VXe;zM.stringify=gen});var JXe=M(Qr=>{"use strict";A();var hen=mfe(),_en=OM(),Een=Ype(),Dfe=LM(),yen=hM(),Py=gr(),Sen=Ny(),Ten=ms(),ben=By(),Ien=ky(),Cen=z9(),ven=Ife(),Ren=vfe(),xen=xfe(),q9=YXe(),KXe=fM();Qr.Composer=hen.Composer;Qr.Document=_en.Document;Qr.Schema=Een.Schema;Qr.YAMLError=Dfe.YAMLError;Qr.YAMLParseError=Dfe.YAMLParseError;Qr.YAMLWarning=Dfe.YAMLWarning;Qr.Alias=yen.Alias;Qr.isAlias=Py.isAlias;Qr.isCollection=Py.isCollection;Qr.isDocument=Py.isDocument;Qr.isMap=Py.isMap;Qr.isNode=Py.isNode;Qr.isPair=Py.isPair;Qr.isScalar=Py.isScalar;Qr.isSeq=Py.isSeq;Qr.Pair=Sen.Pair;Qr.Scalar=Ten.Scalar;Qr.YAMLMap=ben.YAMLMap;Qr.YAMLSeq=Ien.YAMLSeq;Qr.CST=Cen;Qr.Lexer=ven.Lexer;Qr.LineCounter=Ren.LineCounter;Qr.Parser=xen.Parser;Qr.parse=q9.parse;Qr.parseAllDocuments=q9.parseAllDocuments;Qr.parseDocument=q9.parseDocument;Qr.stringify=q9.stringify;Qr.visit=KXe.visit;Qr.visitAsync=KXe.visitAsync});A();A();(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]="
|
|
631
|
+
`,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=$9(t),r=f1(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=$9(t),r=f1(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())}}};zXe.Parser=Rfe});var YXe=M(zM=>{"use strict";A();var HXe=mfe(),len=OM(),jM=LM(),den=ppe(),pen=gr(),fen=vfe(),$Xe=xfe();function qXe(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new fen.LineCounter||null,prettyErrors:t}}function men(e,t={}){let{lineCounter:n,prettyErrors:r}=qXe(t),o=new $Xe.Parser(n?.addNewLine),i=new HXe.Composer(t),s=Array.from(i.compose(o.parse(e)));if(r&&n)for(let u of s)u.errors.forEach(jM.prettifyError(e,n)),u.warnings.forEach(jM.prettifyError(e,n));return s.length>0?s:Object.assign([],{empty:!0},i.streamInfo())}function VXe(e,t={}){let{lineCounter:n,prettyErrors:r}=qXe(t),o=new $Xe.Parser(n?.addNewLine),i=new HXe.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 jM.YAMLParseError(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(s.errors.forEach(jM.prettifyError(e,n)),s.warnings.forEach(jM.prettifyError(e,n))),s}function Aen(e,t,n){let r;typeof t=="function"?r=t:n===void 0&&t&&typeof t=="object"&&(n=t);let o=VXe(e,n);if(!o)return null;if(o.warnings.forEach(i=>den.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 gen(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 pen.isDocument(e)&&!r?e.toString(n):new len.Document(e,r,n).toString(n)}zM.parse=Aen;zM.parseAllDocuments=men;zM.parseDocument=VXe;zM.stringify=gen});var JXe=M(Qr=>{"use strict";A();var hen=mfe(),_en=OM(),Een=Ype(),Dfe=LM(),yen=hM(),Py=gr(),Sen=Ny(),Ten=ms(),ben=By(),Ien=ky(),Cen=z9(),ven=Ife(),Ren=vfe(),xen=xfe(),q9=YXe(),KXe=fM();Qr.Composer=hen.Composer;Qr.Document=_en.Document;Qr.Schema=Een.Schema;Qr.YAMLError=Dfe.YAMLError;Qr.YAMLParseError=Dfe.YAMLParseError;Qr.YAMLWarning=Dfe.YAMLWarning;Qr.Alias=yen.Alias;Qr.isAlias=Py.isAlias;Qr.isCollection=Py.isCollection;Qr.isDocument=Py.isDocument;Qr.isMap=Py.isMap;Qr.isNode=Py.isNode;Qr.isPair=Py.isPair;Qr.isScalar=Py.isScalar;Qr.isSeq=Py.isSeq;Qr.Pair=Sen.Pair;Qr.Scalar=Ten.Scalar;Qr.YAMLMap=ben.YAMLMap;Qr.YAMLSeq=Ien.YAMLSeq;Qr.CST=Cen;Qr.Lexer=ven.Lexer;Qr.LineCounter=Ren.LineCounter;Qr.Parser=xen.Parser;Qr.parse=q9.parse;Qr.parseAllDocuments=q9.parseAllDocuments;Qr.parseDocument=q9.parseDocument;Qr.stringify=q9.stringify;Qr.visit=KXe.visit;Qr.visitAsync=KXe.visitAsync});A();A();(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]="ce0d700a-f3c0-46df-bfec-de5e7a93fb86",e._sentryDebugIdIdentifier="sentry-dbid-ce0d700a-f3c0-46df-bfec-de5e7a93fb86")}catch{}})();A();A();A();function GAe(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 jAe=GAe();jAe.ok||(process.stderr.write(`lore: ${jAe.message}.
|
|
632
632
|
Upgrade Node (e.g. \`nvm install 20\`) and re-run.
|
|
633
633
|
`),process.exit(1));A();ex();sc();function wkt(){let e=process.env.SENTRY_SPOTLIGHT?.trim();return!e||e==="0"||e==="false"?!1:e==="1"||e==="true"?!0:e}var Bkt=wkt(),pFe=zr(),xee=pFe!=="dev";Ree({dsn:xee?"https://583674b382128b1b30b9fa1f0581daab@o4509017064472576.ingest.us.sentry.io/4511344717529088":void 0,environment:pFe,release:hu(),sendDefaultPii:!0,enableLogs:xee,spotlight:Bkt,tracesSampleRate:xee?1:0});XQ("service_name","lore-cli");ex();Bee();import{realpathSync as Son}from"node:fs";import{fileURLToPath as Ton,pathToFileURL as cnt}from"node:url";A();A();OO();yr();zt();mn();A();function YO(e){let t=e;return t._def??t.def??{}}function K6t(e){let t=YO(e);return typeof t.typeName=="string"?t.typeName:typeof t.type=="string"?t.type:void 0}function ul(e,t,n){let r=K6t(e);return r===t||r===n}function yze(e){let t=YO(e);if(t.element)return t.element;if(typeof t.type=="object"&&t.type!==null)return t.type}function J6t(e){let t=e.options;if(Array.isArray(t))return[...t];let n=YO(e);return Array.isArray(n.values)?[...n.values]:n.entries&&typeof n.entries=="object"?Object.values(n.entries):[]}function $se(e){if(!e||!ul(e,"ZodObject","object"))return;let t=e.shape;if(typeof t=="function")return t();if(t&&typeof t=="object")return t;let n=YO(e).shape;if(typeof n=="function")return n();if(n&&typeof n=="object")return n}function Sze(e){let t=e,n=!1,r,o=e.description;for(;;){o=t.description??o;let i=YO(t);if(ul(t,"ZodOptional","optional"))n=!0,t=i.innerType;else if(ul(t,"ZodNullable","nullable"))n=!0,t=i.innerType;else if(ul(t,"ZodDefault","default"))r=typeof i.defaultValue=="function"?i.defaultValue():i.defaultValue,t=i.innerType;else if(ul(t,"ZodEffects","effects"))t=i.schema;else if(ul(t,"ZodPipeline","pipe"))t=i.in;else break}return{inner:t,optional:n,defaultValue:r,description:o}}function Z6t(e,t={}){let{inner:n,optional:r,defaultValue:o,description:i}=Sze(e),s=!1,u=n;ul(u,"ZodArray","array")&&(s=!0,u=yze(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}:ul(u,"ZodEnum","enum")?{arg:{type:"enum",description:i,options:J6t(u),required:l,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:s}:ul(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 qse(e,t={}){let n={},r={};for(let[o,i]of Object.entries(e)){let{arg:s,isArray:u}=Z6t(i,t);n[o]=s,r[o]={isArray:u,leafKind:W6t(i)}}return{args:n,fields:r}}function Vse(e,t={}){let n=$se(e);return n?qse(n,t):{args:{},fields:{}}}function W6t(e){let{inner:t}=Sze(e),n=t;return ul(n,"ZodArray","array")&&(n=yze(n)??n),ul(n,"ZodNumber","number")?"number":ul(n,"ZodBoolean","boolean")?"boolean":ul(n,"ZodEnum","enum")?"enum":ul(n,"ZodString","string")?"string":"other"}function X6t(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 eGt(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 Yse(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 tGt(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 nGt(e,t){let n=t.path.map(o=>String(o)).join(".");return` ${n?`${e}.${n}`:e}: ${t.message}`}function Kse(e,t,n){if(!e)return[];let r=t??{},o=e.safeParse(r);return o.success?[]:(o.error.issues??[]).map(s=>nGt(n,s))}function rGt(e,t,n){return e.resource==="threads"&&t==="id"?tGt(n):n}function Tze(e){let t=X6t(Wz,e.path),n=$se(t.pathParams),r=e.positional??(n?Object.keys(n):[]),o=new Set(r),i=qse(n?Object.fromEntries(r.map(h=>[h,n[h]])):{},{positional:!0}),s=Vse(t.query),u=t.method==="GET"||t.method==="DELETE"?{args:{},fields:{}}:Vse(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:_}){z.info("command_start",{command:`${e.resource} ${e.op}`,route:e.path.join(".")});let E=_;if(!await(E?.getAccessToken??Gt)())throw new Re("not logged in \u2014 run 'lore login' first");let v={};for(let ae of r){let te=h[ae],_e=Yse(te,i.fields[ae])??te;v[ae]=rGt(e,ae,_e)}let R={};for(let[ae,te]of Object.entries(s.fields)){let _e=Yse(h[ae],te);_e!==void 0&&(R[ae]=_e)}let x={};for(let[ae,te]of Object.entries(u.fields)){let _e=Yse(h[ae],te);_e!==void 0&&(x[ae]=_e)}let k=[...Kse(t.pathParams,v,"path"),...Kse(t.query,R,"query"),...t.method==="GET"||t.method==="DELETE"?[]:Kse(t.body,x,"body")];if(k.length>0)throw new Re(`Invalid request for \`lore ${e.resource} ${e.op}\`:
|
|
634
634
|
${k.join(`
|
|
@@ -655,7 +655,7 @@ The held transcript is never uploaded, and secret values are never shown.`)}},kK
|
|
|
655
655
|
`)&&(t.data=t.data.slice(0,-1)),t)}function ntn(e={}){let t=e.initialMs??Jen,n=e.maxMs??Zen,r=e.jitterMs??Wen,o=e.random??Math.random,i=e.sleep??((u,l)=>Yen(u,void 0,{signal:l}).catch(()=>{})),s=t;return{async sleep(u){let l=Math.min(n,s)+Math.floor(o()*r);s=Math.min(n,Math.max(t,s*2)),await i(l,u)},reset(){s=t}}}A();yr();sc();zt();mn();Du();jD();async function n5(e={}){(e.environment??zr())==="dev"&&await rtn({client:e.client})}function Aet(){z.warn("dev_preflight_login_required",{hint:`run \`${zr()==="dev"?"pnpm dev login":"lore login"}\` to authenticate through WorkOS`,apiBaseUrl:al()})}async function rtn(e={}){await Th();let t=await xi();if(t.include.cwd.length>0||t.include.repo.length>0)return;let n=Hi(process.env.LORE_DEV_UPLOAD_DIR?.trim()||process.cwd()),r=e.client??Ct();try{let o=await r.whoAmI({headers:{}});if(o.status!==200){z.warn("dev_preflight_whoami_failed",{status:o.status}),Aet();return}}catch(o){z.warn("dev_preflight_whoami_error",{error:jt(o)}),Aet();return}await Ad({...t,include:{...t.include,cwd:Array.from(new Set([...t.include.cwd,n])).sort()}}),z.info("dev_preflight_upload_dir_seeded",{path:n})}A();E$();zt();mn();oo();import Db from"node:fs";import{watch as Wtn}from"node:fs/promises";import qfe from"node:path";import{setTimeout as YM}from"node:timers/promises";A();yr();mn();var otn=6e4,r5=class{client;now;minIntervalMs;lastBeatAt=Number.NEGATIVE_INFINITY;constructor(t={}){this.client=t.client??Ct(),this.now=t.now??Date.now,this.minIntervalMs=t.minIntervalMs??otn}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){z.warn("cli_heartbeat_failed",{error:n instanceof Error?n.message:String(n)})}}};A();E$();yr();mn();Du();import{setTimeout as Get}from"node:timers/promises";A();import Al from"node:fs/promises";import Cet from"node:os";import As from"node:path";A();A();import itn from"node:os";import get from"node:path";function het(e){return e.replace(/[^A-Za-z0-9_-]/g,"-")}function _et(e=itn.homedir(),t=process.env.CLAUDE_CONFIG_DIR){let n=t?.trim();return n?get.join(n,"projects"):get.join(e,".claude","projects")}A();import ml from"node:fs";import stn from"node:os";import Rb from"node:path";var Ofe="local-agent-mode-sessions",Pfe=["audit.jsonl","transcript.jsonl"];function Eet(e=stn.homedir()){return Rb.join(e,"Library","Application Support","Claude",Ofe)}function yet(e){if(!ml.existsSync(e))return[];let t=[];for(let n of ml.readdirSync(e,{withFileTypes:!0})){if(!n.isDirectory())continue;let r=Rb.join(e,n.name);for(let o of ml.readdirSync(r,{withFileTypes:!0})){if(!o.isDirectory())continue;let i=Rb.join(r,o.name);for(let s of ml.readdirSync(i,{withFileTypes:!0})){if(!s.isDirectory()||!s.name.startsWith("local_"))continue;let u=s.name.replace(/^local_/,"");if(!u)continue;let l=Rb.join(i,s.name),f=i5(l),h=f?ml.statSync(f):ml.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 o5(e){if(!ml.existsSync(e))return null;let t=null;for(let n of ml.readdirSync(e,{withFileTypes:!0})){if(!n.isDirectory()||!n.name.startsWith("local_"))continue;let r=Rb.join(e,n.name),o=i5(r),i=o!==null,s=o?ml.statSync(o).mtimeMs:ml.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 i5(e){for(let t of Pfe){let n=Rb.join(e,t);if(ml.existsSync(n)&&ml.statSync(n).isFile())return n}return null}function Mfe(e,t){let n=Rb.join(e,t);return ml.existsSync(n)?ml.readdirSync(n,{withFileTypes:!0}).filter(r=>r.isFile()&&!r.name.startsWith(".")).map(r=>r.name).sort((r,o)=>r.localeCompare(o)):[]}zt();R$();mn();Du();yh();A();zt();import{createReadStream as atn}from"node:fs";import utn from"node:fs/promises";import{createInterface as ctn}from"node:readline";var ltn=50;async function Tet(e,t={}){let n=t.maxLines??ltn;try{await utn.stat(e)}catch(o){if(Lr(o,"ENOENT"))return null;throw o}let r=atn(e,{encoding:"utf8"});return await new Promise((o,i)=>{let s=!1,u=0,l=_=>{s||(s=!0,f.close(),r.destroy(),o(_))},f=ctn({input:r,crlfDelay:Number.POSITIVE_INFINITY});f.on("line",_=>{if(s)return;let E=_.trim();if(E){u+=1;try{let T=JSON.parse(E);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,Lr(_,"ENOENT")){o(null);return}i(_)}};f.on("error",h),r.on("error",h)})}var dtn=3600*1e3,ptn=336*60*60*1e3,s5=Symbol("missingSessionID"),vet={name:"claudeCode",historyFilePath:a5,readUnuploadedEntries:Ret,collectLocalFiles:Atn,buildPendingTranscriptWatches:gtn};async function Ret(e){let t=a5(),n=Date.now()-ptn,r;try{r=await Al.readdir(t,{withFileTypes:!0})}catch(i){if(Lr(i,"ENOENT"))return[];throw new Error(`readdir ${t}: ${String(i)}`)}let o=[];for(let i of r){if(!i.isDirectory())continue;let s=As.join(t,i.name),u;try{u=await Al.readdir(s,{withFileTypes:!0})}catch{continue}for(let l of u){if(!l.isFile()||!l.name.endsWith(".jsonl"))continue;let f=As.join(s,l.name),h;try{h=await Al.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 xet(){let e=new Map,t;try{t=await Al.readFile(_y(),"utf8")}catch{return e}for(let n of tM(t)){let r=n.sessionId?.trim(),o=n.project?.trim();r&&o&&!e.has(r)&&e.set(r,o)}return e}async function Det(e,t,n){let r=await Tet(e);return r||((await n()).get(t)??null)}async function ftn(){let e=_y(),t;try{t=await Al.readFile(e,"utf8")}catch(n){if(Lr(n,"ENOENT"))return[];throw n}return tM(t,e)}async function Net(e){let t=await ftn(),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 mtn(n);if(s){let u=e.project.trim()||process.cwd();return{sessionId:n,project:u,timestamp:s.mtimeMs,resolvedTranscriptPath:s.fullPath}}throw new Re(`no history entry or transcript file found for session-id "${n}" \u2014 check ~/.claude/history.jsonl and ~/.claude/projects/`)}let r=As.normalize(e.project.trim());if(!r)throw new Re("export requires either --session-id or a project path");let o=await FD(r),i=[...t].sort((s,u)=>u.timestamp-s.timestamp);for(let s of i){if(!s.sessionId?.trim())continue;let u=As.normalize(s.project.trim());if(!u||u===".")continue;if(u===r)return s;if(!o)continue;let l=await FD(u);if(l&&l===o)return s}throw new Re(`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 mtn(e){let t=e.trim();if(!t)return null;let n=a5(),r;try{r=await Al.readdir(n,{withFileTypes:!0})}catch(o){if(Lr(o,"ENOENT"))return null;throw new Error(`readdir ${n}: ${String(o)}`)}for(let o of r){if(!o.isDirectory())continue;let i=As.join(n,o.name,`${t}.jsonl`);try{let s=await Al.stat(i);if(s.isFile())return{fullPath:i,mtimeMs:s.mtimeMs}}catch(s){if(!Lr(s,"ENOENT")&&!Lr(s,"ENOTDIR"))throw new Error(`stat ${i}: ${String(s)}`)}}return null}async function wet(e){let t=await Lfe(e);if(t===s5)throw new Error("history entry is missing sessionId");return t}async function Atn(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 xet(),l);try{for(let h=0;h<e.length;h+=1){let _=e[h],E=await Lfe(_);if(E===s5){let V=`__missing_session__:${_.project}:${_.timestamp}:${h}`;r[h]=V,o.add(V),s.add(V);continue}if(r[h]=E.key,s.has(E.key))continue;let T=await qi(E.fullPath);if(!T.exists){o.add(E.key),s.add(E.key);continue}if(t.isUnchanged?.(E.key,T)){o.add(E.key),s.add(E.key);continue}if(t.isThrottled?.(E.key)){i.add(E.key),s.add(E.key);continue}let v=_.project.trim()||await Det(E.fullPath,_.sessionId??"",f);if(!v){z.info("upload_filter_session_excluded",{filename:E.relativeFilename,transcript_path:E.fullPath,cwd:"<unresolved>",reason:"no_resolvable_cwd"}),o.add(E.key),s.add(E.key);continue}let R=await Dp(v),x=null,k=async()=>(x!==null||(x=await Al.readFile(E.fullPath,"utf8")),x),P=await Sh(t.uploadFilterConfig??CA(),{cwd:v,repoOriginPath:R,transcriptPath:E.fullPath,readTranscript:k});if(!P.shouldUpload){z.info("upload_filter_session_excluded",{filename:E.relativeFilename,transcript_path:E.fullPath,cwd:v,repo_origin_path:R||"<none>",reason:P.reason}),o.add(E.key),s.add(E.key);continue}z.info("upload_filter_session_included",{filename:E.relativeFilename,transcript_path:E.fullPath,cwd:v,repo_origin_path:R||"<none>",reason:"matched"});let j;try{j=await dl(E.fullPath)}catch(V){if(Lr(V,"ENOENT")){o.add(E.key),s.add(E.key);continue}throw new Error(`read session transcript ${E.fullPath}: ${String(V)}`)}u.push(j.tempPath),n.push({key:E.key,filename:E.relativeFilename,sourcePath:E.fullPath,repoOriginPath:R,tempPath:j.tempPath,md5:j.md5,fileType:"transcript",harness:"claudeCode",harnessInternalId:_.sessionId?.trim()??"",watchedState:T}),s.add(E.key);let G=await Al.readFile(j.tempPath,"utf8"),$=ytn(G);for(let V of $){let ae;try{ae=await Stn(V)}catch{continue}let te=`${E.key}::plan:${ae}`;if(s.has(te))continue;let _e=await qi(ae),Ve;try{Ve=await dl(ae)}catch(nt){if(Lr(nt,"ENOENT"))continue;throw new Error(`read plan file ${ae}: ${String(nt)}`)}u.push(Ve.tempPath),n.push({key:te,filename:ae,sourcePath:ae,repoOriginPath:R,tempPath:Ve.tempPath,md5:Ve.md5,fileType:"plan",harness:"claudeCode",harnessInternalId:ae,watchedState:_e}),s.add(te)}}}catch(h){throw await Promise.all(u.map(_=>Al.rm(As.dirname(_),{recursive:!0,force:!0}))),h}return{entries:e,localFiles:n,entryFileKeys:r,skippedFileKeys:o,deferredFileKeys:i}}async function gtn(e,t,n={}){let r=await Ret(e),o=Date.now(),i=[],s=new Set,u=null,l=async()=>(u??=await xet(),u);for(let f of r){let h=await Lfe(f);if(h===s5||s.has(h.fullPath))continue;s.add(h.fullPath);let _=await qi(h.fullPath);if(!_.exists)continue;let E=f.project.trim()||await Det(h.fullPath,f.sessionId??"",l);if(!E)continue;let T=await Dp(E),v=await Sh(n.uploadFilterConfig??CA(),{cwd:E,repoOriginPath:T,transcriptPath:h.fullPath,readTranscript:()=>Al.readFile(h.fullPath,"utf8")},{ignoreSkillRules:!0});if(!v.shouldUpload){z.info("upload_filter_watch_excluded",{filename:h.relativeFilename,transcript_path:h.fullPath,cwd:E,repo_origin_path:T||"<none>",reason:v.reason});continue}i.push({sessionId:f.sessionId?.trim()??"",project:E,transcriptPath:h.fullPath,expiresAt:new Date(o+dtn),baseline:t.get(h.fullPath)??_})}return i.sort((f,h)=>f.transcriptPath.localeCompare(h.transcriptPath))}async function Lfe(e){let t=e.sessionId?.trim();if(!t)return s5;let n=a5(),r=e.resolvedTranscriptPath?.trim();if(r){let s=As.relative(n,r).split(As.sep).join("/");return{fullPath:r,relativeFilename:s,key:s}}let o=await htn(e.project),i=null;for(let s of o){let u=_tn(s),l=As.posix.join(u,`${t}.jsonl`),f=As.join(n,...l.split("/")),h={fullPath:f,relativeFilename:l,key:l};i??=h;try{return await Al.stat(f),h}catch(_){if(!Lr(_,"ENOENT"))throw new Error(`stat session transcript ${f}: ${String(_)}`)}}if(!i)throw new Error("history entry is missing project path");return i}async function htn(e){let t=As.normalize(e.trim());if(!t||t===".")throw new Error("history entry is missing project path");let n=[t],r=await FD(t);if(!r||r===t)return n;for(let o=As.dirname(t);o!==t&&(n.push(o),o!==r);)t=o,o=As.dirname(o);return n}function _tn(e){let t=As.normalize(e.trim());if(!t||t===".")throw new Error("history entry is missing project path");return het(t)}function a5(){return _et()}function Etn(){return As.join(Cet.homedir(),".claude","plans")}function ytn(e){let t=[],n=new Set;for(let r of e.split(`
|
|
656
656
|
`)){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(!Iet(u)||u.type!=="tool_use"||u.name!=="ExitPlanMode"||!Iet(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 Stn(e){let t=e.trim();if(!t)throw new Error("plan file path is empty");let n=Etn(),r=n;try{r=await Al.realpath(n)}catch{}if(t.startsWith("~/")&&(t=As.join(Cet.homedir(),t.slice(2))),!As.isAbsolute(t))throw new Error(`plan file path must stay under ${n}`);if(t=As.normalize(t),!bet(t,n))throw new Error(`plan file path must stay under ${n}`);try{let o=await Al.realpath(t);if(!bet(o,r))throw new Error(`plan file path must resolve under ${n}`)}catch(o){if(!Lr(o,"ENOENT"))throw o}return t}function bet(e,t){let n=As.relative(t,e);return n===""||n!==".."&&!n.startsWith(`..${As.sep}`)}function Iet(e){return e!==null&&typeof e=="object"}A();zt();mn();Du();import{createReadStream as Ttn}from"node:fs";import My from"node:fs/promises";import btn from"node:os";import Yf from"node:path";import{createInterface as Itn}from"node:readline";yh();var Ctn=3600*1e3,ket={name:"codex",historyFilePath:Ufe,readUnuploadedEntries:Oet,collectLocalFiles:Rtn,buildPendingTranscriptWatches:xtn};function Ufe(){return process.env.LORE_CODEX_SESSIONS_DIR??Yf.join(btn.homedir(),".codex","sessions")}async function Oet(e){let t=Ufe(),n;try{n=await My.readdir(t,{withFileTypes:!0})}catch(o){if(Lr(o,"ENOENT"))return[];throw o}let r=[];for(let o of n){if(!o.isDirectory())continue;let i=Yf.join(t,o.name),s;try{s=await My.readdir(i,{withFileTypes:!0})}catch{continue}for(let u of s){if(!u.isDirectory())continue;let l=Yf.join(i,u.name),f;try{f=await My.readdir(l,{withFileTypes:!0})}catch{continue}for(let h of f){if(!h.isDirectory())continue;let _=Yf.join(l,h.name),E;try{E=await My.readdir(_,{withFileTypes:!0})}catch{continue}for(let T of E){if(!T.isFile()||!T.name.startsWith("rollout-")||!T.name.endsWith(".jsonl"))continue;let v=Yf.join(_,T.name),R;try{R=await My.stat(v)}catch{continue}if(R.mtimeMs<=e)continue;let x=await vtn(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 vtn(e){let t,n=Ttn(e,{encoding:"utf8"});try{t=await new Promise((u,l)=>{let f=Itn({input:n,crlfDelay:Number.POSITIVE_INFINITY}),h=!1;f.on("line",_=>{if(h)return;let E=_.trim();E&&(h=!0,f.close(),n.destroy(),u(E))}),f.on("close",()=>{h||u("")}),f.on("error",l),n.on("error",l)})}finally{n.destroy()}if(!t)return z.warn("codex_rollout_skipped",{transcript_path:e,reason:"empty_first_line"}),null;let r;try{r=JSON.parse(t)}catch{return z.warn("codex_rollout_skipped",{transcript_path:e,reason:"unparseable_json"}),null}if(!Bet(r))return z.warn("codex_rollout_skipped",{transcript_path:e,reason:"not_session_meta"}),null;if(r.type!=="session_meta")return z.warn("codex_rollout_skipped",{transcript_path:e,reason:"not_session_meta"}),null;let o=r.payload;if(!Bet(o))return z.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?(z.warn("codex_rollout_skipped",{transcript_path:e,reason:"missing_id_or_cwd"}),null):{id:i,cwd:s}}async function Rtn(e,t={}){let n=Ufe(),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 _=Yf.relative(n,h.transcriptPath).split(Yf.sep).join("/");if(o[f]=_,u.has(_))continue;let E=await qi(h.transcriptPath);if(!E.exists){i.add(_),u.add(_);continue}if(t.isUnchanged?.(_,E)){i.add(_),u.add(_);continue}if(t.isThrottled?.(_)){s.add(_),u.add(_);continue}let T=await Dp(h.project),v=()=>My.readFile(h.transcriptPath,"utf8"),R=await Sh(t.uploadFilterConfig??CA(),{cwd:h.project,repoOriginPath:T,transcriptPath:h.transcriptPath,readTranscript:v});if(!R.shouldUpload){z.info("upload_filter_session_excluded",{filename:Yf.basename(h.transcriptPath),transcript_path:h.transcriptPath,cwd:h.project,repo_origin_path:T||"<none>",reason:R.reason}),i.add(_),u.add(_);continue}z.info("upload_filter_session_included",{filename:Yf.basename(h.transcriptPath),transcript_path:h.transcriptPath,cwd:h.project,repo_origin_path:T||"<none>",reason:"matched"});let x;try{x=await dl(h.transcriptPath)}catch(k){if(Lr(k,"ENOENT")){i.add(_),u.add(_);continue}throw new Error(`read codex rollout ${h.transcriptPath}: ${String(k)}`)}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:E}),u.add(_)}}catch(f){throw await Promise.all(l.map(h=>My.rm(Yf.dirname(h),{recursive:!0,force:!0}))),f}return{entries:e,localFiles:r,entryFileKeys:o,skippedFileKeys:i,deferredFileKeys:s}}async function xtn(e,t,n={}){let r=await Oet(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 qi(u.transcriptPath);if(!l.exists)continue;let f=await Dp(u.project),h=await Sh(n.uploadFilterConfig??CA(),{cwd:u.project,repoOriginPath:f,transcriptPath:u.transcriptPath,readTranscript:()=>My.readFile(u.transcriptPath,"utf8")},{ignoreSkillRules:!0});if(!h.shouldUpload){z.info("upload_filter_watch_excluded",{filename:Yf.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+Ctn),baseline:t.get(u.transcriptPath)??l})}return i}function Bet(e){return e!==null&&typeof e=="object"}A();zt();mn();Du();import c5 from"node:fs";import Ffe from"node:fs/promises";import xb from"node:path";A();import Dtn from"node:fs";var Ntn=o5,Qfe=i5;function Pet(e){let t=Ntn(e);if(!t)throw new Error(`Session ${e} has no local_* subdirectory \u2014 is this a Cowork session?`);let n=Qfe(t);if(!n)throw new Error(`Session ${e} has no transcript file under ${t} (looked for ${Pfe.join(", ")})`);let r=Dtn.readFileSync(n,"utf8"),o=Mfe(t,"uploads"),i=Mfe(t,"outputs");return{transcriptPath:n,transcript:r,uploads:o,outputs:i}}A();import VM from"node:path";var u5=Eet;function Met(e){let t=VM.resolve(e).split(VM.sep),n=t.lastIndexOf(Ofe);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(VM.sep),s=VM.join(i,r,o),l=t.slice(n+3).find(h=>h.startsWith("local_"))??VM.basename(o5(s)??""),f=l.startsWith("local_")?l.replace(/^local_/,""):"";return{accountId:r,orgId:o,sessionId:f,sessionDir:s,sessionsRoot:i}}function Ly(e){return yet(e)}function Let(e){return Ly(e)[0]??null}yh();var wtn=3600*1e3,Qet={name:"cowork",historyFilePath:l5,readUnuploadedEntries:Btn,collectLocalFiles:Ltn,buildPendingTranscriptWatches:Utn};function l5(){return process.env.LORE_COWORK_SESSIONS_DIR??u5()}async function Btn(e){return Fet(e,{includeWatermark:!1})}async function Fet(e,t){let n=l5(),r=Ly(n),o=[];for(let i of r){let s=i.localDir,u=Qfe(s);if(!u)continue;let l=xb.basename(s),f=xb.join(i.sessionDir,`${l}.json`),h=ktn(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 ktn(e,t){let n;try{n=c5.readFileSync(e,"utf8")}catch{return z.warn("cowork_manifest_missing",{session_dir:t,manifest_path:e}),null}let r;try{r=JSON.parse(n)}catch{return z.warn("cowork_manifest_unparseable",{session_dir:t,manifest_path:e}),null}if(!Qtn(r))return z.warn("cowork_manifest_not_object",{session_dir:t,manifest_path:e}),null;let o=typeof r.sessionId=="string"?r.sessionId.trim():"";if(!o)return z.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&&z.info("cowork_no_user_folders",{session_dir:t,manifest_path:e,cwd:s||"<none>"}),{sessionId:o,cwd:s,userSelectedFolders:u,lastActivityAt:i}}function Otn(e){return{uploads:Gfe(e,"uploads"),outputs:Gfe(e,"outputs")}}function Gfe(e,t){let n=xb.join(e,t);return c5.existsSync(n)?c5.readdirSync(n,{withFileTypes:!0}).filter(r=>r.isFile()&&!r.name.startsWith(".")).map(r=>r.name).sort((r,o)=>r.localeCompare(o)):[]}var Uet=25*1024*1024,Ptn={".txt":"text/plain",".md":"text/markdown",".json":"application/json",".csv":"text/csv",".html":"text/html",".js":"text/javascript",".ts":"text/plain",".py":"text/plain",".pdf":"application/pdf",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml",".zip":"application/zip"};function Mtn(e){return Ptn[xb.extname(e).toLowerCase()]??null}async function jfe(e){let t=[],n=[],r=["upload","output"];for(let o of r){let i=o==="upload"?"uploads":"outputs";for(let s of Gfe(e,i)){let u=xb.join(e,i,s),l;try{l=c5.statSync(u).size}catch(f){z.warn("cowork_artifact_stat_failed",{file:u,error:String(f)});continue}if(l>Uet){z.info("cowork_artifact_skipped_too_large",{file:u,size_in_bytes:l,max_bytes:Uet});continue}try{let f=await dl(u);n.push(f.tempPath),t.push({kind:o,fileName:s,tempPath:f.tempPath,md5:f.md5,sizeInBytes:l,contentType:Mtn(s)})}catch(f){z.warn("cowork_artifact_snapshot_failed",{file:u,error:String(f)})}}}return{artifactFiles:t,tempPaths:n}}async function Ltn(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 E=await qi(h.transcriptPath);if(!E.exists){o.add(_),s.add(_);continue}if(t.isUnchanged?.(_,E)){o.add(_),s.add(_);continue}if(t.isThrottled?.(_)){i.add(_),s.add(_);continue}let T=()=>Ffe.readFile(h.transcriptPath,"utf8"),v=null,R=null;for(let[$,V]of h.userSelectedFolders.entries()){let ae=await Dp(V),te=await Sh(t.uploadFilterConfig??CA(),{cwd:V,repoOriginPath:ae,transcriptPath:h.transcriptPath,readTranscript:T});if(z.info("cowork_upload_filter_folder_evaluated",{session_id:h.sessionId,account_id:h.accountId,org_id:h.orgId,transcript_path:h.transcriptPath,folder_index:$,folder:V,repo_origin_path:ae||"<none>",should_upload:te.shouldUpload,reason:te.shouldUpload?"matched":te.reason}),te.shouldUpload){v=V,R=ae;break}}if(v===null){z.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},z.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}),z.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 dl(h.transcriptPath)}catch($){if(Lr($,"ENOENT")){o.add(_),s.add(_);continue}throw new Error(`read cowork audit ${h.transcriptPath}: ${String($)}`)}u.push(x.tempPath);let k=xb.dirname(h.transcriptPath),P=Otn(k),{artifactFiles:j,tempPaths:G}=await jfe(k);u.push(...G),n.push({key:_,filename:_,sourcePath:h.transcriptPath,repoOriginPath:R??"",tempPath:x.tempPath,md5:x.md5,fileType:"transcript",harness:"cowork",harnessInternalId:h.sessionId,watchedState:E,artifactMetadata:P,artifactFiles:j}),s.add(_)}}catch(f){throw await Promise.all(u.map(h=>Ffe.rm(xb.dirname(h),{recursive:!0,force:!0}))),f}return{entries:l,localFiles:n,entryFileKeys:r,skippedFileKeys:o,deferredFileKeys:i}}async function Utn(e,t,n={}){let r=await Fet(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 qi(u.transcriptPath);if(!l.exists)continue;let f=()=>Ffe.readFile(u.transcriptPath,"utf8"),h=null,_=null;for(let[E,T]of u.userSelectedFolders.entries()){let v=await Dp(T),R=await Sh(n.uploadFilterConfig??CA(),{cwd:T,repoOriginPath:v,transcriptPath:u.transcriptPath,readTranscript:f},{ignoreSkillRules:!0});if(z.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:E,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){z.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+wtn),baseline:t.get(u.transcriptPath)??l}),z.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 Qtn(e){return e!==null&&typeof e=="object"}cde();var Ftn=1e3,Gtn=250,jtn=2,ztn=5e3,Hfe=[vet,ket,Qet],g1=class extends Error{constructor(){super("lore is logged out")}};function Htn(e){return e.adapters!==void 0?e.adapters:e.adapter!==void 0?[e.adapter]:Hfe}async function zet(e={}){return(await $fe(e)).threadIDs}async function $fe(e={}){Uy(e.signal);let t=await x$(),n=e.recorder??new zD,r=Htn(e),o=e.client??Ct();z.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 xi(),_=await Het({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,Uy(e.signal),f||(await n.markSyncSuccess(i),i.length>0&&e.onUploadCompleted?.());let E=e.tailActiveSessions!==!1;if(!f&&E&&i.length>0){let T=await $tn({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,Uy(e.signal)}return f?(z.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 $et(h)||await n.markError(h),h}}function zfe(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 Het(e){let t=[],n=0,r=e.syncState,o=new Map,i=await Ktn(e.adapters,Ytn(e.adapterConcurrency,e.adapters.length),async h=>{Uy(e.signal);let _=zfe(h.name),E=N$(e.syncState,_),T=e.syncState.harnesses[_]?.cursors??{};try{let v=await qtn({...e,adapter:h,harnessKey:_,floor:E,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(Uy(e.signal),!!h){if("error"in h){if(h.error instanceof g1){l=h.adapter.name;continue}if($et(h.error)){f??=h.error;continue}s.push(h.error),z.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[_,E]of h.uploadResult.cursorUpdates)r=yKe(r,h.harnessKey,_,E);r=SKe(r,h.harnessKey,ztn),r=EKe(r,h.harnessKey,h.uploadResult.newFloor);for(let[_,E]of h.uploadResult.watchBaselineOverrides)o.set(_,E);await D$(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?(z.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 $tn(e){let t=new Map;for(let i of e.adapters){let s=i.historyFilePath();t.set(s,await qi(s))}let n=[];for(let i of e.adapters){let s=zfe(i.name),u=await i.buildPendingTranscriptWatches(N$(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 Get(Ftn,void 0,{signal:e.signal}),Uy(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 qi(f);h!==void 0&&H$(h,_)&&(s=!0),t.set(f,_)}if(s||(s=await Jtn(n)),!s){let l=Ztn(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 Get(Gtn,void 0,{signal:e.signal});let u=await Het({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 qi(f))}n=[];for(let l of e.adapters){let f=zfe(l.name),h=await l.buildPendingTranscriptWatches(N$(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 qtn(e){let t=new Map,n=(_,E)=>{let T=e.cursors[_];return T===void 0?!1:!H$({exists:!0,size:T.sizeBytes,modTimeUnixMs:T.modTimeUnixMs},E)},r=e.minReuploadIntervalMs??0,o=e.now??Date.now,i=o(),s=_=>{if(r<=0)return!1;let E=e.cursors[_];return E===void 0?!1:i-E.lastUploadedAtMs<r};Uy(e.signal);let u=await e.adapter.readUnuploadedEntries(e.floor);if(z.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 Gt())throw z.warn("run_upload_no_access_token_for_entries",{adapter:e.adapter.name,entryCount:u.length,floor:e.floor}),new g1;z.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 k=jet(e.floor,f.entries,f.entryFileKeys,f.skippedFileKeys);return{threadIDs:[],cursorUpdates:t,newFloor:k,watchBaselineOverrides:new Map,deferredCount:h}}let _=await kA(e.client,f.localFiles,{networkTimeoutMs:e.uploadNetworkTimeoutMs}),E=[],T=new Map,v=new Set(f.skippedFileKeys),R=k=>{t.set(k.key,{sizeBytes:k.watchedState.size,modTimeUnixMs:k.watchedState.modTimeUnixMs,md5:k.md5,lastUploadedAtMs:o()})};for(let k of _){let{localFile:P}=k;if(k.status==="quarantined"){z.info("run_upload_quarantine",{filename:P.filename,reason:k.reason,findings:k.findingCount}),v.add(P.key);continue}if(k.status!=="uploaded"){let G=(k.status==="no_upload"?k.error?.trim():"")||`upload session response missing presigned_url for ${P.filename}`;z.info("run_upload_skip",{filename:P.filename,reason:G}),v.add(P.key),R(P);continue}await e.recorder.heartbeat(),Uy(e.signal);let j=k.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}`)}E.push(j);try{await Vtn(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")))z.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=jet(e.floor,f.entries,f.entryFileKeys,v);return{threadIDs:E,cursorUpdates:t,newFloor:x,watchBaselineOverrides:T,deferredCount:h}}finally{await Promise.all([...f.localFiles.map(_=>Ac(_.tempPath)),...f.localFiles.flatMap(_=>(_.artifactFiles??[]).map(E=>Ac(E.tempPath)))])}}async function Vtn(e,t,n,r={}){let o={...r,onPoll:()=>n.heartbeat()};await ZD(e,t,o)}function Uy(e){if(e?.aborted)throw new DOMException("The operation was aborted","AbortError")}function $et(e){return e instanceof Error&&e.name==="AbortError"}function Ytn(e,t){return t<=0?1:e===void 0?Math.min(jtn,t):!Number.isFinite(e)||e<1?1:Math.min(Math.floor(e),t)}async function Ktn(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 jet(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 Jtn(e){for(let t of e){let n=await qi(t.transcriptPath);if(H$(t.baseline,n))return!0}return!1}function Ztn(e,t){let n=e.filter(r=>t<r.expiresAt);return{watchers:n,changed:n.length!==e.length}}var Xtn=2e3,enn=6e4,tnn=5e3,nnn=Nde*3,rnn=5e3,onn=5*6e4,inn=.2,snn=15e3;function ann(e){return Array.isArray(e)?{threadIDs:e,deferredCount:0}:e}var d5=class extends Error{constructor(t){super(t),this.name="SyncPassDeadlineError"}};function unn(e){return e.historyFilePath!==void 0?[e.historyFilePath]:e.watchPaths!==void 0?e.watchPaths:(e.uploadOptions?.adapters??Hfe).map(n=>n.historyFilePath())}async function p5(e={}){let t=e.debounceMs??Xtn,n=e.pollIntervalMs,r=n??e.idlePollIntervalMs??enn,o=n??e.activePollIntervalMs??tnn,i=e.syncDeadlineMs??nnn,s=e.failureBackoffBaseMs??rnn,u=e.failureBackoffMaxMs??onn,l=e.failureBackoffJitterRatio??inn,f=e.random??Math.random,h=unn(e),_=e.runUploadFn??$fe,E=e.uploadOptions?.minReuploadIntervalMs??e.minReuploadIntervalMs??snn,T=e.uploadOptions?.recorder??new zD,v=e.heartbeatReporter??new r5,R={...e.uploadOptions,recorder:T,tailActiveSessions:!1,onUploadCompleted:()=>{v.uploadCompleted()},minReuploadIntervalMs:E},x=e.signal?void 0:new AbortController,k=e.signal??x.signal,P=()=>x?.abort();x&&(process.once("SIGINT",P),process.once("SIGTERM",P));let j=()=>{x&&(process.removeListener("SIGINT",P),process.removeListener("SIGTERM",P))},G=e.lockFilePath??Yje(),$;for(;;){let Se=await lnn(G);if(Se.acquired){$=Se.release;break}if(z.info("watch_skip_already_running",{pid:Se.pid}),e.lockBusyRetryIntervalMs===void 0){j();return}try{await YM(e.lockBusyRetryIntervalMs,void 0,{signal:k})}catch{j();return}if(k.aborted){j();return}}let V=!1,ae=!1,te=0,_e=r,Ve=async Se=>{if(V){ae=!0;return}V=!0;try{do{if(ae=!1,k.aborted)break;if(te>0){let ze=cnn({consecutiveFailures:te,baseMs:s,maxMs:u,jitterRatio:l,random:f});if(z.warn("watch_sync_backoff",{reason:Se,consecutiveFailures:te,backoffMs:ze}),await YM(ze,void 0,{signal:k}).catch(()=>{}),k.aborted)break}try{let ze=new AbortController,rt=()=>ze.abort();k.addEventListener("abort",rt,{once:!0});let lt=`sync pass exceeded ${i}ms deadline`,kt,Nr=new Promise((At,$t)=>{kt=setTimeout(()=>{z.error("watch_sync_stuck",{reason:Se,syncDeadlineMs:i}),T.markStuck(lt).catch(gn=>z.warn("watch_mark_stuck_failed",{error:jt(gn)})),ze.abort(),$t(new d5(lt))},i),kt.unref?.()}),be=_({...R,signal:ze.signal});try{let{threadIDs:At,deferredCount:$t}=ann(await Promise.race([be,Nr]));te=0,_e=At.length>0||$t>0?o:r,z.info("watch_sync_complete",{reason:Se,uploaded:At.length,deferred:$t,nextPollIntervalMs:_e})}finally{kt&&clearTimeout(kt),k.removeEventListener("abort",rt),await be.catch(()=>{})}}catch(ze){if(k.aborted&&ze?.name==="AbortError")break;te+=1,!(ze instanceof d5)&&ze?.name!=="AbortError"&&await T.markDegraded(ze).catch(rt=>z.warn("watch_mark_degraded_failed",{error:jt(rt)})),z.error("watch_sync_failed",{reason:Se,consecutiveFailures:te,error:jt(ze)})}}while(ae&&!k.aborted)}finally{V=!1}},nt,Fe=Se=>{nt&&clearTimeout(nt),nt=setTimeout(()=>{nt=void 0,Ve(Se)},t),nt.unref?.()};z.info("watch_start",{watchPaths:h,debounceMs:t,idlePollIntervalMs:r,activePollIntervalMs:o,syncDeadlineMs:i}),v.beat(),Ve("startup");let Mt=async Se=>{for(;!k.aborted;)try{let ze=Db.existsSync(Se)&&Db.statSync(Se).isDirectory(),rt=ze?Se:qfe.dirname(Se),lt=ze?void 0:qfe.basename(Se),kt=e.watchEventSource?.({watchDir:rt,watchPath:Se,recursive:ze,signal:k})??Wtn(rt,{signal:k,recursive:ze});for await(let Nr of kt){if(k.aborted)break;(lt===void 0||!Nr.filename||Nr.filename===lt)&&Fe("fs-event")}}catch(ze){if(k.aborted||ze?.name==="AbortError")break;z.warn("watch_fs_retry",{path:Se,error:jt(ze)}),await YM(r,void 0,{signal:k}).catch(()=>{})}},un=async()=>{for(;!k.aborted;){try{await YM(_e,void 0,{signal:k})}catch{break}if(k.aborted)break;v.beat(),await Ve("poll")}};try{await Promise.all([...h.map(Mt),un()])}finally{for(nt&&clearTimeout(nt),j();V;)await YM(50).catch(()=>{});await $(),z.info("watch_stop",{})}}function cnn(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 lnn(e){if(z.info("upload_daemon_lock_check",{lockFilePath:e}),e===!1)return{acquired:!0,release:async()=>{}};for(await Db.promises.mkdir(qfe.dirname(e),{recursive:!0,mode:448});;)try{let t=await Db.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 qet(e))?.pid===process.pid&&await Db.promises.rm(e,{force:!0})}}}catch(t){if(!pnn(t))throw t;let n=await qet(e);if(n?.pid&&dnn(n.pid))return{acquired:!1,pid:n.pid};await Db.promises.rm(e,{force:!0})}}async function qet(e){try{let t=JSON.parse(await Db.promises.readFile(e,"utf8"));return typeof t.pid=="number"?{pid:t.pid}:{}}catch{return}}function dnn(e){try{return process.kill(e,0),!0}catch(t){return typeof t=="object"&&t!==null&&"code"in t&&t.code==="EPERM"}}function pnn(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="EEXIST"}A();_$();zt();mn();import{setTimeout as fnn}from"node:timers/promises";var mnn=1e3,Ann=3e4,Vet=3e4,gnn=6e4;async function Yet(e,t={}){let n=t.signal?void 0:new AbortController,r=t.signal??n.signal,o=()=>n?.abort();n&&(process.once("SIGINT",o),process.once("SIGTERM",o));let i=t.recorder??new h$;await i.markDaemonRunning();let s=setInterval(()=>{i.heartbeat().catch(u=>z.warn("daemon_status_heartbeat_failed",{error:jt(u)}))},t.heartbeatIntervalMs??Vet);s.unref?.();try{await Promise.all(e.map(u=>hnn(u,{...t,signal:r,recorder:i})))}finally{clearInterval(s),n&&(process.removeListener("SIGINT",o),process.removeListener("SIGTERM",o))}}async function hnn(e,t){let n=t.minRestartDelayMs??mnn,r=t.maxRestartDelayMs??Ann,o=t.heartbeatIntervalMs??Vet,i=t.healthyAfterMs??gnn,s=t.random??Math.random,u=t.now??Date.now,l=0;for(;!t.signal.aborted;){let f=u(),h=new AbortController,_=()=>h.abort(t.signal.reason);t.signal.addEventListener("abort",_,{once:!0});let E,T=!1,v=async()=>{T||(T=!0,await t.recorder.markChildRunning(e.name),E=setInterval(()=>{t.recorder.markChildHeartbeat(e.name).catch(R=>z.warn("daemon_child_heartbeat_failed",{child:e.name,error:jt(R)}))},o),E.unref?.())};try{if(e.markRunning!=="manual"&&await v(),await e.run({signal:h.signal,markReady:v}),!t.signal.aborted)throw new Error(`${e.name} daemon exited unexpectedly`)}catch(R){if(t.signal.aborted||h.signal.aborted){await t.recorder.markChildStopped(e.name);return}u()-f>=i&&(l=0),l+=1;let x=_nn(l,n,r,s),k=new Date(u()+x);await t.recorder.markChildRestarting(e.name,R,k),z.error("daemon_child_failed",{child:e.name,attempt:l,restart_delay_ms:x,error:jt(R)});try{await fnn(x,void 0,{signal:t.signal})}catch{await t.recorder.markChildStopped(e.name);return}}finally{E&&clearInterval(E),t.signal.removeEventListener("abort",_)}}await t.recorder.markChildStopped(e.name)}function _nn(e,t,n,r){let o=Math.min(n,t*2**Math.max(0,e-1)),i=Math.max(t,o);return Math.floor(t+r()*(i-t))}var Enn=3e4,ynn=3e4,Snn=120*1e3,Jet={meta:{name:"_run_daemon",hidden:!0,skipAutoupdate:!0},args:{"skill-poll-interval-ms":{type:"string",description:"Skill sync fallback full-sync poll interval in milliseconds.",default:"1800000"},"skill-watch-debounce-ms":{type:"string",description:"Skill filesystem watcher debounce interval in milliseconds.",default:"2000"},"exit-if-daemon-running":{type:"boolean",description:"Exit before starting children when another combined daemon has a fresh heartbeat.",default:!1}},async run({args:e,data:t}){let n=t,r=Number(e["skill-poll-interval-ms"]);if(!Number.isFinite(r)||r<=0)throw new Re("--skill-poll-interval-ms must be a positive number");let o=Number(e["skill-watch-debounce-ms"]);if(!Number.isFinite(o)||o<=0)throw new Re("--skill-watch-debounce-ms must be a positive number");if(e["exit-if-daemon-running"]){let s=await(n?.readDaemonStatus??YP)(),u=n?.isProcessAlive??Inn;if(bnn(s,new Date,u)){z.info("daemon_skip_already_running",{pid:s.pid});return}}await n5(),await(n?.superviseChildren??Yet)([{name:"threads",run:({signal:s})=>{let u={client:n?.client,...n?.adapters!==void 0?{adapters:n.adapters}:n?.adapter!==void 0?{adapter:n.adapter}:{},recorder:n?.recorder};return(n?.runUploadWatch??p5)({uploadOptions:u,signal:s,lockBusyRetryIntervalMs:ynn})}},{name:"skills",markRunning:"manual",run:async({signal:s,markReady:u})=>{let{client:l,who:f}=await Tnn({signal:s,getAccessToken:n?.getAccessToken??Gt,injectedClient:n?.client,retryDelayMs:n?.authRetryDelayMs??Enn}),h=f.body.organizations.map(v=>v.id),_=f.body.user.id,{lastEventId:E}=await ii(),T=(n?.createEventStream??t5)({userId:_,organizationIds:h,getAccessToken:n?.getAccessToken??Gt,reconnect:!0,signal:s,...E?{lastEventId:E}:{}});await u(),await(n?.runSkillSyncDaemon??X9)({client:l,events:T,pollIntervalMs:r,watch:!0,watchDebounceMs:o,signal:s,onSyncPass:({reason:v,event:R,result:x})=>{let k=R?` from ${R.type}${R.id?`#${R.id}`:""}`:"";console.log(`skill sync ${v}${k}: ${x.publishedLocalPushed} published local update${x.publishedLocalPushed===1?"":"s"} uploaded, ${x.installedUpdated} updated, ${x.localEditsUploaded} local edit${x.localEditsUploaded===1?"":"s"} uploaded, ${x.conflicts} conflict${x.conflicts===1?"":"s"}`)}})}}],n?.supervisorOptions)}};async function Tnn(e){for(;!e.signal.aborted;){let t=await e.getAccessToken();if(!t){await Ket(e.retryDelayMs,e.signal);continue}let n=e.injectedClient??Ct({token:t}),r=await n.whoAmI({headers:{}});if(r.status===200)return{client:n,who:r};await Ket(e.retryDelayMs,e.signal)}throw new Error("daemon auth wait aborted")}function Ket(e,t){return t.aborted?Promise.resolve():new Promise(n=>{let r=setTimeout(n,e);r.unref?.(),t.addEventListener("abort",()=>{clearTimeout(r),n()},{once:!0})})}function bnn(e,t,n){if(e.state!=="running"||!e.last_heartbeat_at||!e.pid)return!1;let r=Date.parse(e.last_heartbeat_at);return Number.isNaN(r)?!1:r+Snn>=t.getTime()&&n(e.pid)}function Inn(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}ZP();sc();zt();mn();A();Mse();oo();import Cnn from"node:fs";import vnn from"node:path";var Zet=!1;function Rnn(e,t){let n=FO();try{Cnn.mkdirSync(vnn.dirname(n),{recursive:!0,mode:448}),oH(n,e,t)}catch{}}function Wet(e,t){let n=e.write.bind(e),r=(o,i,s)=>{let u=Buffer.isBuffer(o)?o.toString("utf8"):String(o);Rnn(u,t),e.isTTY&&n(u);let l=typeof i=="function"?i:s;return typeof l=="function"&&l(),!0};e.write=r}function Xet(){if(Zet)return;Zet=!0;let e=new Hx;Wet(process.stdout,e),Wet(process.stderr,e)}A();y$();var xnn=()=>{let e=globalThis.process?.env??{};return e.NO_COLOR==="1"||e.TERM==="dumb"||!!e.CI},ett="\x1B",f5=(e,t,n)=>r=>n?r:`${ett}[${e}m${r}${ett}[${t}m`,Dnn=e=>({cyan:f5(36,39,e),gray:f5(90,39,e),bold:f5(1,22,e),underline:f5(4,24,e)});async function Vfe(e,t={}){let n=t.noColor??xnn(),{cyan:r,gray:o,bold:i,underline:s}=Dnn(n),u=await za(e.meta),l=u?.name??"lore",f=u?.description??"",h=await za(e.subCommands),_=[];for(let[R,x]of Object.entries(h??{})){let k=await za(x),P=await za(k.meta);P?.hidden||_.push({name:R,description:P?.description??"",subDef:k})}let E=[];for(let R of _){E.push([r(R.name),R.description]);let x=await za(R.subDef.subCommands);if(x)for(let[k,P]of Object.entries(x)){let j=await za(P),G=await za(j.meta);G?.hidden||E.push([` ${r(k)}`,G?.description??""])}}let T=E.reduce((R,[x])=>Math.max(R,x.length),0),v=[];v.push(o(`${f} (${l})`),""),v.push(`${s(i("USAGE"))} ${r(`${l} ${_.map(R=>R.name).join("|")}`)}`,""),v.push(s(i("COMMANDS")),"");for(let[R,x]of E)v.push(` ${R.padEnd(T)} ${x}`);return v.push("",`Use ${r(`${l} <command> --help`)} for more information about a command.`),v.join(`
|
|
657
657
|
`)}A();y$();async function ttt(e,t){let n=t.filter(i=>!i.startsWith("-")),r=e,o;for(let i of n){let s=await za(r.subCommands);if(!s||!(i in s))break;let u=await za(s[i]);if(!u)break;o=r,r=u}return[r,o]}A();import Nnn from"node:os";zt();mn();Du();jD();function wnn(e){return[...e.include.cwd.map(t=>({kind:"cwd",value:t,workspace:"user-scoped"})),...e.include.repo.map(t=>({kind:"repo",value:t,workspace:"user-scoped"}))].sort((t,n)=>t.kind!==n.kind?t.kind.localeCompare(n.kind):t.value.localeCompare(n.value))}async function m5(){return await Th(),xi()}function Yfe(e){let t=Hi(e);if(!t)throw new Re("path must not be empty");return t}async function ntt(){let e=await m5();return wnn(e)}function rtt(e){return e.length>0}function Bnn(e){let t=Math.max(4,...e.map(o=>o.kind.length)),n=Math.max(8,...e.map(o=>o.value.length));console.log(`${"TYPE".padEnd(t)} ${"LOCATION".padEnd(n)} WORKSPACE`);for(let o of e)console.log(`${o.kind.padEnd(t)} ${o.value.padEnd(n)} ${o.workspace}`);let r=e.find(o=>o.kind==="cwd"&&o.value===Nnn.homedir());r&&console.log(`Warning: ${r.value} is your entire home directory. Narrow capture scope with \`lore listen delete ${r.value}\` and \`lore listen create <project-path>\`.`)}var knn={meta:{name:"create",description:"Allowlist a directory for daemon auto-uploads."},args:{path:{type:"positional",description:"Directory path to upload from (supports ~ and relative paths).",required:!0}},async run({args:e}){z.info("command_start",{command:"listen create"});let t=await m5(),n=Yfe(String(e.path));await Ad({...t,include:{...t.include,cwd:Array.from(new Set([...t.include.cwd,n])).sort()}}),console.log(`uploading from ${n}`)}},Onn={meta:{name:"list",description:"Print the directories Lore is allowed to auto-upload from."},args:{json:{type:"boolean",description:"Output as JSON."}},async run({args:e}){z.info("command_start",{command:"listen list"});let t=await ntt();if(e.json){console.log(JSON.stringify({version:1,locations:t},null,2));return}if(!rtt(t)){console.log("no upload locations yet \u2014 run `lore configure` for the guided setup, or `lore listen create <path>` to add a directory directly.");return}Bnn(t)}},Pnn={meta:{name:"delete",description:"Stop auto-uploading sessions from a directory."},args:{path:{type:"positional",description:"Directory path to stop uploading from.",required:!0}},async run({args:e}){z.info("command_start",{command:"listen delete"});let t=await m5(),n=Yfe(String(e.path)),r=t.include.cwd.filter(o=>o!==n);if(r.length===t.include.cwd.length)throw new Re(`no upload directory at ${n}`);await Ad({...t,include:{...t.include,cwd:r}}),console.log(`stopped uploading from ${n}`)}},Mnn={meta:{name:"update",description:"Deprecated. Use delete/create to change the cwd allowlist."},args:{path:{type:"positional",description:"Directory path to update.",required:!0}},async run({args:e}){z.info("command_start",{command:"listen update"});let t=Yfe(String(e.path));throw(await m5()).include.cwd.includes(t)?new Re("`lore listen update` is no longer supported because upload filters only store cwd allowlist entries. Use `lore listen delete <path>` and `lore listen create <path>` to change the cwd allowlist."):new Re(`no upload directory at ${t}`)}},ott={meta:{name:"listen",description:"Manage the directories Lore is allowed to auto-upload from."},subCommands:{create:knn,list:Onn,update:Mnn,delete:Pnn},async run({rawArgs:e}){let t=new Set(["create","list","update","delete"]);if(e.some(r=>t.has(r)))return;z.info("command_start",{command:"listen"});let n=await ntt();if(console.log(`lore listen \u2014 locations Lore is allowed to auto-upload from
|
|
658
|
-
`),!rtt(n))console.log(" currently uploading from: nothing yet \u2014 opt in to your first location below.");else{console.log(" currently uploading from:");let r=Math.max(8,...n.map(o=>o.value.length));for(let o of n){let i=o.kind==="cwd"?"dir":"repo";console.log(` ${i} ${o.value.padEnd(r)} \u2192 ${o.workspace}`)}}console.log(""),console.log(" For guided, interactive setup, run `lore configure`."),console.log(" These subcommands are the low-level CRUD for scripted edits:"),console.log(""),console.log(" lore listen create <path> start uploading from a directory"),console.log(" lore listen list [--json] print the upload list"),console.log(" lore listen delete <path> stop uploading from a directory"),console.log(""),console.log(" Example: lore listen create ~/code/projectA")}};A();jD();A();zt();oo();Du();yh();import Lnn from"node:fs/promises";async function Unn(e){try{return await Lnn.access(e),!0}catch(t){if(Lr(t,"ENOENT"))return!1;throw t}}async function Qnn({uploadFilterPath:e=MT()}={}){if(!await Unn(e))return;let t=await xi(e),n=[],r=[];for(let o of t.include.cwd){let i=await hy(o);i?n.push(i):r.push(o)}n.length===0&&r.length===t.include.cwd.length||await Ad({...t,include:{...t.include,cwd:r.sort(),repo:Array.from(new Set([...t.include.repo,...n])).sort()}},e)}var itt={id:"20260519000000-upload-filter-cwds-to-repos",run:Qnn};var Fnn=[RYe,itt];async function Gnn(e=Fnn,t=console.log){t(`running ${e.length} migration${e.length===1?"":"s"}`);for(let n of e)t(`running migration ${n.id}`),await n.run(),t(`finished migration ${n.id}`);t("finished migrations")}var stt={meta:{name:"postinstall:migrate",hidden:!0,skipAutoupdate:!0},async run(){await Gnn()}};Hse();JP();A();yr();sc();mn();Wle();import{platform as jnn,release as znn}from"node:os";function Hnn(e){return e.find(n=>!n.startsWith("-"))??"lore"}async function att(e){try{let t={command:Hnn(e.rawArgs),rawArgs:[...e.rawArgs],cliVersion:hu(),nodeVersion:process.version,platform:jnn(),release:znn()};(await kYe({error:e.error,context:t,logger:z,send:async r=>{let i=await Ct().createFeedback({body:r});switch(i.status){case 201:return{kind:"sent"};case 401:return{kind:"unauthorized"};case 429:return{kind:"rate-limited"};default:return{kind:"failed",error:new Error(`createFeedback returned HTTP ${i.status}`)}}}})).kind==="sent"&&z.info("error_report_sent")}catch(t){z.warn("error_report_unexpected_failure",{error:t instanceof Error?t.message:String(t)})}}A();import{setTimeout as utt}from"node:timers/promises";yr();zt();var $nn=3e4,A5={meta:{name:"_run_skill_sync",description:"Run the workspace skill sync daemon.",hidden:!0,skipAutoupdate:!0},args:{watch:{type:"boolean",description:"Run continuously with filesystem watchers, SSE, and fallback polling.",default:!1},"poll-interval-ms":{type:"string",description:"Fallback full-sync poll interval in milliseconds.",default:"1800000"},"watch-debounce-ms":{type:"string",description:"Filesystem watcher debounce interval in milliseconds.",default:"2000"}},async run({args:e,data:t}){let n=t,r=n?.getAccessToken??Gt,o=!!e.watch,{client:i,who:s}=await qnn({watch:o,getAccessToken:r,injectedClient:n?.client,retryDelayMs:n?.authRetryDelayMs??$nn}),u=s.body.organizations.map(T=>T.id),l=s.body.user.id,{lastEventId:f}=await ii(),h=(n?.createEventStream??t5)({userId:l,organizationIds:u,getAccessToken:r,reconnect:!0,...f?{lastEventId:f}:{}}),_=Number(e["poll-interval-ms"]);if(!Number.isFinite(_)||_<=0)throw new Re("--poll-interval-ms must be a positive number");let E=Number(e["watch-debounce-ms"]);if(!Number.isFinite(E)||E<=0)throw new Re("--watch-debounce-ms must be a positive number");await(n?.runSkillSyncDaemon??X9)({client:i,events:h,pollIntervalMs:_,watch:o,watchDebounceMs:E,onSyncPass:({reason:T,event:v,result:R})=>{let x=v?` from ${v.type}${v.id?`#${v.id}`:""}`:"";console.log(`skill sync ${T}${x}: ${R.publishedLocalPushed} published local update${R.publishedLocalPushed===1?"":"s"} uploaded, ${R.installedUpdated} updated, ${R.localEditsUploaded} local edit${R.localEditsUploaded===1?"":"s"} uploaded, ${R.conflicts} conflict${R.conflicts===1?"":"s"}`)}})}};async function qnn(e){for(;;){let t=await e.getAccessToken();if(!t){if(!e.watch)throw new Re("workspace skill sync daemon requires login \u2014 run 'lore login' first");await utt(e.retryDelayMs);continue}let n=e.injectedClient??Ct({token:t}),r=await n.whoAmI({headers:{}});if(r.status===200)return{client:n,who:r};if(!e.watch)throw new Re(`whoAmI returned ${r.status}`);await utt(e.retryDelayMs)}}A();A();yr();zt();var ctt={meta:{name:"approve",description:"Approve a proposed skill version and make it 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 approve"}},async run({args:e}){if(!await Gt())throw new Re("skill approval requires login \u2014 run 'lore login' first");await Vnn(Ct(),{id:e.id,version:e.version})}};async function Vnn(e,t){let n=Number(t.version);if(!Number.isInteger(n)||n<=0)throw new Re("--version must be a positive integer timestamp");let r=await e.approveSkillVersion({params:{id:t.id,version:n},body:{}});if(r.status!==200){let o=r.body?.message??`approveSkillVersion returned ${r.status}`;throw new Re(o)}console.log(`approved /${r.body.name} v${r.body.version} (${r.body.id})`)}A();import Ynn from"node:fs/promises";import ltt from"node:path";yr();zt();mn();var dtt={meta:{name:"install",description:"Pull a workspace skill from Lore and write it to ~/.claude/skills/<name>/SKILL.md."},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 Re("install needs a skill ID \u2014 e.g. `lore skills install sk_01j...`");if(!await Gt())throw new Re("workspace skill installs require login \u2014 run 'lore login' first");let n=Ct();await Knn(n,t)}};async function Knn(e,t){z.info("skill_install_started",{skill_id:t});try{let n=await Jnn(e,t);z.info("skill_install_registered",{skill_id:n.body.skill.id,installation_id:n.body.installation_id,already_registered:n.body.already_registered,name:n.body.skill.name,root_kind:n.body.skill.root_kind,latest_version:n.body.skill.latest_version});let r={skillId:n.body.skill.id,installationId:n.body.installation_id,name:n.body.skill.name,rootKind:n.body.skill.root_kind,latestVersion:n.body.skill.latest_version,contentHash:n.body.skill.content_hash,bodyMd:await Wnn(n.body.body_md_url,n.body.skill.content_hash)};if(!$M(r.name))throw new Re(`refusing to install skill with invalid name: ${JSON.stringify(r.name)}`);let o=Y9(r.rootKind),i=qM(o,r.name),s=await Xnn(i),u=await XD(r.skillId),l=u?.installPath!=null&<t.resolve(u.installPath)===ltt.resolve(i);if(s!==null&&!l)throw z.warn("skill_install_refused_unmanaged_target",{skill_id:r.skillId,name:r.name,root_kind:o,install_path:i}),new Re(`refusing to overwrite ${i}; it already exists and is not managed by Lore`);let f=await K9(o,r.name,r.bodyMd),h=r.latestVersion,_={installationId:r.installationId,skillId:r.skillId,name:r.name,rootKind:o,installPath:f,baseVersion:h,baseContentHash:r.contentHash,lastInstalledVersion:h,lastInstalledHash:r.contentHash,lastSyncStatus:"current"};await ll(_);try{await Znn(e,r.installationId,h)}catch(E){throw await ll({..._,lastSyncStatus:"error"}),z.warn("skill_install_failed",{skill_id:r.skillId,installation_id:r.installationId,phase:"update_installed_version",error:jt(E)}),E}z.info("skill_install_written",{skill_id:r.skillId,installation_id:r.installationId,name:r.name,root_kind:o,install_path:f,latest_version:h,already_up_to_date:s===r.bodyMd}),s===r.bodyMd?console.log(`/${r.name} is already up to date at ${f}`):console.log(`installed /${r.name} (${r.skillId}) -> ${f}`)}catch(n){throw z.warn("skill_install_failed",{skill_id:t,phase:"install",error:jt(n)}),n}}async function Jnn(e,t){let n=await e.installSkill({params:{id:t},body:{}});if(n.status!==200){let r=n.body?.message??`installSkill returned ${n.status}`;throw new Re(r)}return n}async function Znn(e,t,n){let r=await e.updateSkillInstallation({params:{id:t},body:{installed_version:n}});if(r.status!==200){let o=r.body?.message??`updateSkillInstallation returned ${r.status}`;throw new Re(`installed ${t} locally, but failed to record installed version: ${o}`)}}async function Wnn(e,t){let n=new URL(e,al()),r=await Gt(),o=await fetch(n,{headers:{...r?{authorization:`Bearer ${r}`}:{}}});if(!o.ok)throw new Re(`failed to download SKILL.md from ${e}: HTTP ${o.status}`);let i=await o.text();if(gd(i)!==t)throw new Re("downloaded SKILL.md hash did not match the skill metadata");return i}async function Xnn(e){try{return await Ynn.readFile(e,"utf8")}catch{return null}}A();yr();zt();function ern(e){return JSON.stringify(e,null,2)}var ptt={meta:{name:"list",description:"List skills available in your workspace."},async run({data:e}){let t=e;if(!await(t?.getAccessToken??Gt)())throw new Re("not logged in \u2014 run 'lore login' first");let o=await(t?.client??Ct()).listSkills({});if(o.status!==200){let i=o.body?.message??`listSkills returned ${o.status}`;throw new Re(i)}console.log(ern(o.body))}};A();yr();zt();var ftt={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 Gt())throw new Re("skill proposals require login \u2014 run 'lore login' first");await trn(Ct(),e.id)}};async function trn(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 Re(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}`)}}A();import{readFile as nrn}from"node:fs/promises";import g5 from"node:path";yr();zt();mn();var Att={meta:{name:"publish",description:"Publish a local skill to your workspace, or upload local edits for an already-published skill."},args:{target:{type:"positional",required:!0,description:"Local skill name/path or workspace published sk_* ID"}},async run({args:e}){if(!await Gt())throw new Re("not logged in \u2014 run 'lore login' first");let t=typeof e.target=="string"?e.target.trim():"";if(!t)throw new Re("pass a skill name, path, or sk_* ID to publish");let n=await rrn(Ct(),t);lrn(n)}};async function rrn(e,t){let n=t.trim();if(!n)throw new Re("pass a skill name, path, or sk_* ID to publish");let r=n.startsWith("sk_")?"skill_id":"local_name_or_path";z.info("skill_publish_started",{target_kind:r,target:n});try{if(n.startsWith("sk_"))return await gtt(e,n);let o=await SJe(),i=orn(n,o),s=await net(n)??await ret(n,process.cwd(),i);if(!s)throw new Re(`no SKILL.md found for ${n}`);return await irn(e,s)}catch(o){throw z.warn("skill_publish_failed",{target_kind:r,target:n,phase:"publish",error:jt(o)}),o}}function orn(e,t){let n=g5.resolve(e);for(let r of t){if(mtt(m1(r),n))return"claude_project";if(mtt(A1(r),n))return"agents_project"}}function mtt(e,t){let n=g5.relative(g5.resolve(e),t);return n!==""&&!n.startsWith("..")&&!g5.isAbsolute(n)}async function irn(e,t){let n=gd(t.bodyMd),r=await yJe(t);if(z.info("skill_publish_local_resolved",{name:t.name,file_path:t.filePath,root_kind:t.rootKind,published_local_skill_id:r,published_local_skill_id_present:!!r}),!r){let i=await e1(e,t,{syncAction:"initial_publish"});return await t1(t,{skillId:i.skill_id,version:i.version}),z.info("skill_publish_initial_uploaded",{name:t.name,file_path:t.filePath,skill_id:i.skill_id,version:i.version,root_kind:i.root_kind}),{kind:"uploaded",skillId:i.skill_id,version:i.version,versionStatus:i.version_status==="proposed"?"proposed":"accepted"}}let o=await srn(r)===n?await gtt(e,r):await arn(e,r,t);return o.kind!=="conflict"&&o.kind!=="remote_newer"&&await t1(t,{skillId:r,version:o.version}),o}async function srn(e){return(await ii()).publishedLocal[e]?.lastPublishedHash??null}async function gtt(e,t){let n=await e.getSkillDetail({params:{id:t},query:{include_unpublished:!0}});if(n.status===200&&n.body.visibility==="workspace")return htt(e,t,n.body);throw _tt("load workspace skill before publishing local edits",n.status,n.body)}async function arn(e,t,n){let r=await e.getSkillDetail({params:{id:t},query:{include_unpublished:!0}});if(r.status!==200)throw _tt("load skill before publishing local edits",r.status,r.body);return htt(e,t,r.body,n)}async function htt(e,t,n,r){let o=await ii(),i=o.installed[t]??null,s=o.publishedLocal[t]??null,u=i?.installPath??r?.filePath??s?.filePath,l=i?.rootKind??r?.rootKind??s?.rootKind??n.root_kind,f=i?.name??r?.name??s?.name??n.name;if(!u)throw new Re(`no managed local SKILL.md found for ${t}; install it or publish it from this machine first`);let h=await nrn(u,"utf8"),_=gd(h),E=n.latest_version??0,T=n.content_hash??"",v=urn(i,s);if(_===T)return z.info("skill_publish_noop",{skill_id:t,version:E,reason:"local_matches_remote"}),{kind:"unchanged",skillId:t,version:E};if(v.version>0&&E>v.version)return _===v.hash?(z.info("skill_publish_noop",{skill_id:t,version:E,reason:"remote_newer_local_unchanged",local_version:v.version}),{kind:"remote_newer",skillId:t,localVersion:v.version,remoteVersion:E}):(i&&await ll({...i,lastSyncStatus:"conflict"}),z.warn("skill_publish_conflict",{skill_id:t,local_version:v.version,remote_version:E,name:f,file_path:u}),{kind:"conflict",skillId:t,localVersion:v.version,remoteVersion:E});if(_===v.hash)return z.info("skill_publish_noop",{skill_id:t,version:E,reason:"local_matches_base"}),{kind:"unchanged",skillId:t,version:E};let R=await crn(e),x=n.owner?.id&&n.owner.id===R?"owner_update":"subscriber_update",k=await e1(e,{skillId:t,name:f,description:null,bodyMd:h,filePath:u,rootKind:l},{syncAction:x,...v.version>0?{baseVersion:v.version}:{}});return i&&await ll({...i,...k.version_status==="accepted"?{baseVersion:k.version,baseContentHash:k.content_hash,lastSyncStatus:"current"}:{lastSyncStatus:"proposed"},lastInstalledVersion:k.version,lastInstalledHash:k.content_hash}),await t1({name:f,bodyMd:h,filePath:u,rootKind:l},{skillId:k.skill_id,version:k.version}),z.info("skill_publish_update_uploaded",{skill_id:k.skill_id,name:f,file_path:u,sync_action:x,version:k.version,version_status:k.version_status}),{kind:"uploaded",skillId:k.skill_id,version:k.version,versionStatus:k.version_status==="proposed"?"proposed":"accepted"}}function urn(e,t){return e?{hash:e.baseContentHash,version:e.baseVersion}:t?{hash:t.lastPublishedHash,version:t.lastPublishedVersion}:{hash:"",version:0}}async function crn(e){let t=await e.whoAmI({headers:{}});return t.status!==200?null:t.body.user.id}function _tt(e,t,n){let r=n?.message??`${e} returned ${t}`;return new Re(r)}function lrn(e){switch(e.kind){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}}A();yr();zt();var Ett={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 Gt())throw new Re("skill rejection requires login \u2014 run 'lore login' first");await drn(Ct(),{id:e.id,version:e.version,reason:e.reason})}};async function drn(e,t){let n=Number(t.version);if(!Number.isInteger(n)||n<=0)throw new Re("--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 Re(i)}console.log(`rejected /${o.body.name} v${o.body.version} (${o.body.id})`)}A();OO();import Kfe from"node:fs/promises";import ytt from"node:os";import Di from"node:path";var Stt={meta:{name:"scan",description:"List local skills found by Lore's scanner."},async run(){await yrn()}};function Ttt(e){let t=Di.resolve(e),n=Di.resolve(ytt.homedir()),r=Di.relative(n,t);return r===""?"~":!r.startsWith("..")&&!Di.isAbsolute(r)?Di.join("~",r):t}function prn(e){return Ttt(Di.dirname(Di.dirname(e)))}function frn(e){return Di.basename(Di.dirname(e))}function mrn(e,t){let n=Di.resolve(e);for(let r of t){let o=Di.resolve(r),i=Di.relative(o,n);if(i!==""&&!i.startsWith("..")&&!Di.isAbsolute(i))return o}return null}function Arn(e,t,n){return e==="claude_project"?t.map(r=>Di.join(m1(r),n)):e==="agents_project"?t.map(r=>Di.join(A1(r),n)):[]}function grn(){return Di.join(ytt.homedir(),"Library","Application Support","Claude","local-agent-mode-sessions","skills-plugin")}async function hrn(e){let t=[];async function n(r){let o;try{o=await Kfe.readdir(r,{withFileTypes:!0})}catch{return}for(let i of o){let s=Di.join(r,i.name);i.isDirectory()?await n(s):i.isFile()&&i.name==="manifest.json"&&t.push(s)}}return await n(e),t.sort((r,o)=>r.localeCompare(o))}function h5(e){if(typeof e!="string")return null;let t=e.trim();return t.length>0?t:null}function _rn(e){let t;try{t=JSON.parse(e)}catch{return[]}if(!t||typeof t!="object"||Array.isArray(t))return[];let n=t.skills;if(!Array.isArray(n))return[];let r=[];for(let o of n){if(!o||typeof o!="object"||Array.isArray(o))continue;let i=o,s=h5(i.skillId),u=h5(i.name);!s||!u||r.push({skillId:s,name:u,description:h5(i.description),creatorType:h5(i.creatorType)})}return r}async function Ern(){let e={};for(let t of await hrn(grn())){let n;try{n=await Kfe.readFile(t,"utf8")}catch{continue}let r=Di.join(Di.dirname(t),"skills"),o=Ttt(r);for(let i of _rn(n)){if(i.creatorType==="anthropic")continue;let s=Di.join(r,i.name,"SKILL.md");try{await Kfe.access(s)}catch{continue}e[o]??=[],e[o].push({skill_id:i.skillId,name:i.name,description:i.description,file_path:s,manifest_path:t})}}for(let t of Object.values(e))t.sort((n,r)=>n.name.localeCompare(r.name)||n.file_path.localeCompare(r.file_path));return e}async function yrn(){let e=await Ude(),t=await ii(),n=e.map(l=>l.root),r=new Map(e.map(l=>[Di.resolve(l.root),l])),o=await set({projectCwds:n,includeCwdProject:!1}),i={},s=new Set;for(let l of o){let f=Di.resolve(l.filePath);if(s.has(f))continue;s.add(f);let h=prn(l.filePath),_=mrn(l.filePath,n),E=_?r.get(_)?.alsoSeenAt??[]:[],T=G$(t,{filePath:l.filePath,rootKind:l.rootKind});i[h]??=[],i[h].push({name:l.name,description:l.description,root_kind:l.rootKind,file_path:l.filePath,also_seen_at:Arn(l.rootKind,E,frn(l.filePath)),...T?{skill_id:T.skillId}:{},local_content_hash:gd(l.bodyMd)})}let u=Eje.parse({type:"local_skill_scanner_output",skills:i,cowork_skills:await Ern()});console.log(JSON.stringify(u,null,2))}A();yr();zt();var btt={meta:{name:"status",description:"Show local Lore-managed skill sync state."},async run(){if(!await Gt())throw new Re("skill status requires login \u2014 run 'lore login' first");await Srn()}};async function Srn(){let e=await ii();console.log(JSON.stringify(e))}A();yr();zt();var Itt={meta:{name:"sync",description:"Sync installed Lore-managed skills to their latest accepted versions."},async run(){if(!await Gt())throw new Re("workspace skill sync requires login \u2014 run 'lore login' first");let e=await kfe(Ct());console.log(`skill sync complete: ${e.installedUpdated} updated, ${e.localEditsUploaded} local edit${e.localEditsUploaded===1?"":"s"} uploaded, ${e.conflicts} conflict${e.conflicts===1?"":"s"}`)}};A();import Ctt from"node:fs/promises";import Trn from"node:path";yr();zt();var vtt={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 Re("uninstall needs a skill ID \u2014 e.g. `lore skills uninstall sk_01j...`");if(!await Gt())throw new Re("workspace skill uninstalls require login \u2014 run 'lore login' first");let n=Ct();await brn(n,t)}};async function brn(e,t){let n=await XD(t);n&&(await Ctt.rm(n.installPath,{force:!0}),await Ctt.rmdir(Trn.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 Re(o)}if(await fJe(t),n){console.log(`uninstalled /${n.name} (${t}) from ${n.installPath}`);return}console.log(`uninstalled ${t}`)}A();yr();zt();var Rtt={meta:{name:"unpublish",description:"Remove an owned published skill from your workspace catalog."},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 Re("unpublish needs a skill ID \u2014 e.g. `lore skills unpublish sk_01j...`");if(!await Gt())throw new Re("skill unpublishes require login \u2014 run 'lore login' first");await Irn(Ct(),t)}};async function Irn(e,t){let n=await e.unpublishSkill({params:{id:t},body:{}});if(n.status!==200){let o=n.body?.message??`unpublishSkill returned ${n.status}`;throw new Re(o)}let r=await dJe(n.body.id);if(r){console.log(`unpublished /${r.name} (${n.body.id}); local file kept at ${r.filePath}`);return}console.log(`unpublished ${n.body.id}`)}A();zt();var xtt={meta:{name:"unsync",description:"Remove local skill sync state for a skill ID.",hidden:!0},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 Re("unsync needs a skill ID \u2014 e.g. `lore skills unsync sk_01j...`");let n=await pJe(t);if(n.installed||n.publishedLocal){let r=[n.publishedLocal?"published local":null,n.installed?"installed":null].filter(Boolean);console.log(`removed ${r.join(" and ")} sync state for ${t}`);return}console.log(`no local sync state found for ${t}`)}};var Dtt={meta:{name:"skills",description:"Publish, install, and list skills shared via Lore."},subCommands:{publish:Att,unpublish:Rtt,install:dtt,uninstall:vtt,unsync:xtt,sync:Itt,daemon:A5,approve:ctt,reject:Ett,proposals:ftt,status:btt,list:ptt,scan:Stt}};ry();A();await ho();var C5=ue(dn(),1);sc();await fb();A();await ho();var T5=ue(dn(),1);await RA();A();await ho();var h1=ue(dn(),1);Ps();var hd=ue(Ht(),1);function _1({items:e,onSelect:t,initialIndex:n=0,disabled:r=!1,hint:o,labelWidth:i=20}){let[s,u]=(0,h1.useState)(Ntt(e,n)),l=(0,h1.useRef)(s);return(0,h1.useEffect)(()=>{let f=Ntt(e,n);l.current=f,u(f)},[e,n]),Ru((f,h)=>{if(e.length!==0){if(h.upArrow||f==="k"){let _=Crn(e,l.current);l.current=_,u(_);return}if(h.downArrow||f==="j"){let _=wtt(e,l.current);l.current=_,u(_);return}if(h.return||f===" "){let _=e[l.current];_&&!_.disabled&&t(_)}}},{isActive:!r}),e.length===0?(0,hd.jsx)(he,{color:xe.muted,children:"no actions available"}):(0,hd.jsxs)(Ee,{flexDirection:"column",children:[e.map((f,h)=>{let _=h===s,E=f.disabled?xe.muted:_?xe.primary:xe.highlight;return(0,hd.jsxs)(Ee,{children:[(0,hd.jsx)(Ee,{width:2,flexShrink:0,children:(0,hd.jsx)(he,{color:_?xe.primary:xe.muted,children:_?"\u203A":" "})}),(0,hd.jsx)(Ee,{width:i,flexShrink:0,children:(0,hd.jsx)(he,{color:E,bold:_&&!f.disabled,children:f.label})}),f.description?(0,hd.jsx)(Ee,{flexGrow:1,flexShrink:1,children:(0,hd.jsx)(he,{color:xe.muted,children:f.description})}):null]},f.id)}),o?(0,hd.jsx)(Ee,{marginTop:1,children:(0,hd.jsx)(he,{color:xe.muted,children:o})}):null]})}function Ntt(e,t){if(e.length===0)return 0;let n=Math.max(0,Math.min(t,e.length-1));return e[n]?.disabled?wtt(e,n-1):n}function wtt(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 Crn(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 xA();await gb();await hb();Ps();A();yr();Du();jD();YD();async function _5(e){if(!await(e.hasAccessToken??(async()=>!!await Gt()))())return{state:"logged_out"};let n=e.client??Ct();try{let r=await n.whoAmI({headers:{}});return r.status!==200?{state:"error",message:Btt(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 E5(e){let t=e.platform??process.platform;if(t!=="darwin")return{state:"unsupported",platform:t};let n=e.getDaemonStatus??I$;try{return{state:"ready",report:await n()}}catch(r){return{state:"error",message:r instanceof Error?r.message:String(r)}}}async function y5(e){if(!await(e.hasAccessToken??(async()=>!!await Gt()))())return{state:"logged_out"};let n=e.client??Ct();try{let r=await n.listSkills({});if(r.status!==200)return{state:"error",message:Btt(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 S5(){try{await Th();let e=await xi();return vrn(e)}catch(e){return{state:"error",message:e instanceof Error?e.message:String(e)}}}function vrn(e){return{state:"ready",cwd:e.include.cwd,repo:e.include.repo}}function Btt(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 Bt=ue(Ht(),1);function Qy({cliVersion:e,initialData:t,deps:n={},onSelect:r}){let{exit:o}=Os(),[i,s]=(0,T5.useState)(t??{identity:{state:"loading"},daemon:{state:"loading"},skills:{state:"loading"},uploadDirs:{state:"loading"}});(0,T5.useEffect)(()=>{if(t)return;let l=!1;return(async()=>{let[f,h,_,E]=await Promise.all([_5(n),E5(n),y5(n),S5()]);l||s({identity:f,daemon:h,skills:_,uploadDirs:E})})(),()=>{l=!0}},[]),Ru((l,f)=>{(l==="q"||f.ctrl&&l==="c"||f.escape)&&(r("quit"),o())});let u=Brn(i);return(0,Bt.jsxs)(Ee,{flexDirection:"column",paddingY:1,paddingX:1,children:[(0,Bt.jsx)(Ms,{title:"lore",subtitle:xrn(i.identity),right:`v${e}`}),(0,Bt.jsxs)(Ee,{flexDirection:"row",gap:2,children:[(0,Bt.jsx)(Ee,{flexDirection:"column",width:"50%",children:(0,Bt.jsx)(Qn,{title:"Daemon",children:(0,Bt.jsx)(Drn,{daemon:i.daemon})})}),(0,Bt.jsx)(Ee,{flexDirection:"column",width:"50%",children:(0,Bt.jsx)(Qn,{title:"Workspace",children:(0,Bt.jsx)(Nrn,{identity:i.identity,skills:i.skills})})})]}),(0,Bt.jsx)(Ee,{marginTop:1,children:(0,Bt.jsx)(Qn,{title:"Upload filters",subtitle:i.uploadDirs.state==="ready"?`${i.uploadDirs.cwd.length+i.uploadDirs.repo.length} configured`:void 0,children:(0,Bt.jsx)(Rrn,{uploadDirs:i.uploadDirs})})}),(0,Bt.jsx)(Ee,{marginTop:1,children:(0,Bt.jsx)(Qn,{title:"Quick actions",subtitle:"\u2191/\u2193 or j/k \xB7 Enter to choose \xB7 q to quit",children:(0,Bt.jsx)(_1,{items:u,onSelect:l=>{r(l.id),o()}})})})]})}function Rrn({uploadDirs:e}){return e.state==="loading"?(0,Bt.jsx)(Ha,{label:"reading ~/.lore/upload_filters.json\u2026"}):e.state==="error"?(0,Bt.jsxs)(Ee,{flexDirection:"column",children:[(0,Bt.jsx)(en,{label:"Status",value:"error",kind:"error"}),(0,Bt.jsx)(he,{color:xe.danger,children:e.message})]}):e.cwd.length===0&&e.repo.length===0?(0,Bt.jsxs)(Ee,{flexDirection:"column",children:[(0,Bt.jsx)(en,{label:"Status",value:"none configured \u2014 the daemon won't auto-upload anything",kind:"warning"}),(0,Bt.jsx)(Ee,{marginTop:1,children:(0,Bt.jsxs)(he,{color:xe.muted,children:["Run ",(0,Bt.jsx)(he,{bold:!0,children:"lore configure"})," to pick directories interactively."]})})]}):(0,Bt.jsxs)(Ee,{flexDirection:"column",children:[e.cwd.map(t=>(0,Bt.jsx)(en,{label:"cwd",value:t,kind:"success",labelWidth:16},`cwd:${t}`)),e.repo.map(t=>(0,Bt.jsx)(en,{label:"repo",value:t,kind:"success",labelWidth:16},`repo:${t}`))]})}function xrn(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 Drn({daemon:e}){if(e.state==="loading")return(0,Bt.jsx)(Ha,{label:"reading launchd state\u2026"});if(e.state==="unsupported")return(0,Bt.jsxs)(Ee,{flexDirection:"column",children:[(0,Bt.jsx)(he,{color:xe.muted,children:"Background uploads are macOS-only today."}),(0,Bt.jsxs)(he,{color:xe.muted,children:["Detected platform: ",e.platform]})]});if(e.state==="error")return(0,Bt.jsxs)(Ee,{flexDirection:"column",children:[(0,Bt.jsx)(en,{label:"Status",value:"error",kind:"error"}),(0,Bt.jsx)(he,{color:xe.danger,children:e.message})]});let t=e.report,n=t.healthy?"success":t.enabled?"warning":"idle";return(0,Bt.jsxs)(Ee,{flexDirection:"column",children:[(0,Bt.jsx)(en,{label:"Status",value:t.health,kind:n}),(0,Bt.jsx)(en,{label:"Enabled",value:t.enabled?"yes":"no",kind:t.enabled?"success":"idle"}),(0,Bt.jsx)(en,{label:"Running",value:t.running?"yes":"no",kind:t.running?"success":"idle"}),(0,Bt.jsx)(en,{label:"Heartbeat",value:ktt(t.status?.last_heartbeat_at),kind:t.heartbeat_fresh?"success":"idle"}),(0,Bt.jsx)(en,{label:"Last upload",value:ktt(t.status?.last_success_at)}),t.status?.last_error?(0,Bt.jsx)(en,{label:"Last error",value:t.status.last_error,kind:"error"}):null]})}function Nrn({identity:e,skills:t}){return e.state==="loading"?(0,Bt.jsx)(Ha,{label:"loading your account\u2026"}):e.state==="logged_out"?(0,Bt.jsxs)(Ee,{flexDirection:"column",children:[(0,Bt.jsx)(en,{label:"Status",value:"signed out",kind:"warning"}),(0,Bt.jsx)(he,{color:xe.muted,children:"Choose \u201CSign in\u201D below to authorise this CLI."})]}):e.state==="error"?(0,Bt.jsxs)(Ee,{flexDirection:"column",children:[(0,Bt.jsx)(en,{label:"Status",value:"error",kind:"error"}),(0,Bt.jsx)(he,{color:xe.danger,children:e.message})]}):(0,Bt.jsxs)(Ee,{flexDirection:"column",children:[(0,Bt.jsx)(en,{label:"User",value:e.email,kind:"success"}),(0,Bt.jsx)(en,{label:"Display name",value:e.displayName}),(0,Bt.jsx)(en,{label:"Workspace",value:e.activeOrganizationName??"\u2014",kind:e.activeOrganizationName?"info":"idle"}),(0,Bt.jsx)(en,{label:"Other workspaces",value:Math.max(0,e.organizations.length-1)}),(0,Bt.jsx)(en,{label:"Skills",value:wrn(t)})]})}function wrn(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 Brn(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 ktt(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`}A();await ho();await RA();await xA();Ps();var ai=ue(Ht(),1),krn=[{id:"login",label:"Sign in to Lore",description:"opens your browser for a device-code flow"},{id:"quit",label:"Quit",description:"exit without signing in"}];function b5({cliVersion:e,onSelect:t}){let{exit:n}=Os();return Ru((r,o)=>{(r==="q"||o.ctrl&&r==="c"||o.escape)&&(t("quit"),n())}),(0,ai.jsxs)(Ee,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,ai.jsx)(Ms,{title:"lore",subtitle:"welcome",right:`v${e}`}),(0,ai.jsx)(Qn,{title:"What is Lore?",children:(0,ai.jsxs)(Ee,{flexDirection:"column",children:[(0,ai.jsx)(he,{children:"Lore captures your Claude Code, Codex, and Cowork sessions and shares them with your team \u2014 searchable, discussable, and remixable."}),(0,ai.jsxs)(Ee,{marginTop:1,flexDirection:"column",children:[(0,ai.jsx)(he,{color:xe.muted,children:"You'll get:"}),(0,ai.jsxs)(he,{children:[(0,ai.jsx)(he,{color:xe.success,children:" \u2713"})," Background auto-upload of every Claude Code session"]}),(0,ai.jsxs)(he,{children:[(0,ai.jsx)(he,{color:xe.success,children:" \u2713"})," One-command share for Codex rollouts and Cowork sessions"]}),(0,ai.jsxs)(he,{children:[(0,ai.jsx)(he,{color:xe.success,children:" \u2713"})," Skill publishing and discovery across your workspace"]}),(0,ai.jsxs)(he,{children:[(0,ai.jsx)(he,{color:xe.success,children:" \u2713"})," Thread search, dashboards, and discussion"]})]})]})}),(0,ai.jsx)(Ee,{marginTop:1,children:(0,ai.jsx)(Qn,{title:"Sign in to continue",subtitle:"\u2191/\u2193 or j/k \xB7 Enter to choose \xB7 q to quit",children:(0,ai.jsx)(_1,{items:krn,onSelect:r=>{t(r.id),n()}})})}),(0,ai.jsx)(Ee,{marginTop:1,children:(0,ai.jsxs)(he,{color:xe.muted,children:["New to Lore? Run ",(0,ai.jsx)(he,{bold:!0,children:"lore --help"})," any time for the command reference."]})})]})}var I5=ue(Ht(),1),Orn={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 Prn({cliVersion:e,deps:t,onSelect:n}){let[r,o]=(0,C5.useState)(void 0),{exit:i}=Os();return(0,C5.useEffect)(()=>{let s=!1;return(async()=>{let[u,l,f,h]=await Promise.all([_5(t),E5(t),y5(t),S5()]);s||o({identity:u,daemon:l,skills:f,uploadDirs:h})})(),()=>{s=!0}},[]),r?r.identity.state==="logged_out"?(0,I5.jsx)(b5,{cliVersion:e,onSelect:s=>{n(s),i()}}):(0,I5.jsx)(Qy,{cliVersion:e,initialData:r,onSelect:n}):null}async function Ott(){let e="quit";return await cl((0,I5.jsx)(Prn,{cliVersion:hu(),deps:{},onSelect:n=>{e=n}})).waitUntilExit(),{action:e,rawArgs:Orn[e]}}A();await fb();A();await ho();var e2=ue(dn(),1);await RA();await xA();Ps();A();await ho();await dde();await RA();await Ab();await xA();await mde();A();await ho();Ps();var E1=ue(Ht(),1),Mrn="\u2588",Lrn="\u2591";function Ptt({value:e,width:t=24,label:n,color:r=xe.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,E1.jsxs)(Ee,{children:[(0,E1.jsx)(he,{color:r,children:Mrn.repeat(i)}),(0,E1.jsx)(he,{color:xe.muted,children:Lrn.repeat(s)}),n?(0,E1.jsxs)(he,{color:xe.muted,children:[" ",n]}):null]})}await gb();await hb();await pde();await yde();await bde();A();await ho();await RA();await Ab();await xA();await gb();Ps();var _o=ue(Ht(),1),Ltt=[{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 KM(){return{steps:Ltt.map(({key:e,label:t})=>({key:e,label:t,status:"pending"}))}}function v5(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?`${Mtt(n.key)} (${t.label})`:Mtt(n.key)}:n.status==="active"?{...n,status:"done"}:n)}}function Mtt(e){return Ltt.find(t=>t.key===e)?.label??e}function xh({title:e,subtitle:t,state:n}){return(0,_o.jsxs)(Ee,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,_o.jsx)(Ms,{title:e,subtitle:t}),(0,_o.jsx)(Qn,{title:"Pipeline",children:(0,_o.jsx)(Ee,{flexDirection:"column",children:n.steps.map(r=>(0,_o.jsx)(Urn,{step:r},r.key))})}),n.result?(0,_o.jsx)(Ee,{marginTop:1,flexDirection:"column",children:(0,_o.jsx)(Ls,{kind:"success",title:n.result.reused?"Already on Lore":"Shared",children:(0,_o.jsxs)(Ee,{flexDirection:"column",children:[(0,_o.jsx)(he,{children:n.result.url}),(0,_o.jsx)(Ee,{marginTop:1,children:(0,_o.jsxs)(he,{color:xe.muted,children:[n.result.clipboardCopied?"Copied to clipboard. ":"",n.result.visibility?`Visibility: ${n.result.visibility}.`:""]})})]})})}):null,n.errorMessage?(0,_o.jsx)(Ee,{marginTop:1,children:(0,_o.jsx)(Ls,{kind:"error",title:"Failed",children:(0,_o.jsx)(he,{children:n.errorMessage})})}):null]})}function Urn({step:e}){return e.status==="active"?(0,_o.jsxs)(Ee,{children:[(0,_o.jsx)(Ha,{}),(0,_o.jsx)(he,{children:" "}),(0,_o.jsx)(he,{color:xe.primary,children:e.label})]}):e.status==="done"?(0,_o.jsxs)(Ee,{children:[(0,_o.jsx)(he,{color:xe.success,children:"\u2713 "}),(0,_o.jsx)(he,{color:xe.muted,children:e.label})]}):(0,_o.jsxs)(Ee,{children:[(0,_o.jsx)(he,{color:xe.muted,children:"\u25CB "}),(0,_o.jsx)(he,{color:xe.muted,children:e.label})]})}Ps();A();var JM=Date.parse("2026-05-16T12:00:00.000Z");function ZM(e){return new Date(JM-e*6e4).toISOString()}var Kf={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"},Utt=[{id:"tanagram/lore",label:"tanagram/lore",kind:"repo",sessionCount:18,lastUsedAtMs:JM-7*6e4},{id:"acme/customer-demo",label:"acme/customer-demo",kind:"repo",sessionCount:6,lastUsedAtMs:JM-42*6e4},{id:"acme/integration",label:"acme/integration",kind:"repo",sessionCount:3,lastUsedAtMs:JM-180*6e4},{id:"__custom_repo_path__:/Users/alex/notes",label:"/Users/alex/notes",kind:"dir",sessionCount:1,lastUsedAtMs:JM-1560*6e4}],Qrn=["/Users/alex/code/tanagram-lore","/Users/alex/work/acme-integration"],y1={label:"ai.tanagram.lore",enabled:!0,loaded:!0,running:!0,healthy:!0,health:"running",heartbeat_fresh:!0,plist_path:Kf.plist,binary_path:Kf.binary,status_path:Kf.status,daemon_status_path:"/Users/alex/.lore/daemon_status.json",install_source_path:Kf.installSource,subsystems:{threads:{name:"threads",healthy:!0,health:"running",heartbeat_fresh:!0},skills:{name:"skills",healthy:!0,health:"running",heartbeat_fresh:!0}},status:{version:"0.1.0",pid:4242,state:"idle",auth:"logged_in",started_at:ZM(60),last_heartbeat_at:ZM(1),last_success_at:ZM(5),last_completed_at:ZM(5),last_thread_ids:["thr_01hx_story"]}},Qtt={...y1,running:!1,healthy:!1,health:"stale",heartbeat_fresh:!1,subsystems:{threads:{name:"threads",healthy:!1,health:"stale",heartbeat_fresh:!1},skills:{name:"skills",healthy:!0,health:"running",heartbeat_fresh:!0}},status:{...y1.status,state:"error",last_heartbeat_at:ZM(17),last_error:"upload failed: HTTP 503 from /api/upload-session"}},Frn={...y1,enabled:!1,loaded:!1,running:!1,healthy:!1,health:"disabled",heartbeat_fresh:!1,subsystems:{threads:{name:"threads",healthy:!1,health:"disabled",heartbeat_fresh:!1},skills:{name:"skills",healthy:!1,health:"disabled",heartbeat_fresh:!1}},status:void 0},Grn={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"},WM={identity:Grn,daemon:{state:"ready",report:y1},skills:{state:"ready",count:9,published:4},uploadDirs:{state:"ready",cwd:Qrn,repo:[]}},Ftt={...WM,uploadDirs:{state:"ready",cwd:[],repo:[]}},Gtt={...WM,daemon:{state:"error",message:"launchctl print failed: service not found"}},jtt={...WM,daemon:{state:"unsupported",platform:"linux"}},ztt={identity:{state:"logged_out"},daemon:{state:"ready",report:Frn},skills:{state:"logged_out"},uploadDirs:{state:"ready",cwd:[],repo:[]}},Htt=["/Users/alex/code/tanagram-lore","/Users/alex/code/customer-demo","/Users/alex/code/internal-tools"];var yt=ue(Ht(),1),io=()=>{};function Fy(...e){return e.reduce(U$,oM())}function XM(...e){return e.reduce(v5,KM())}var MA=[{id:"onboarding/welcome/default",title:"Welcome",path:["TUI","Screens","Onboarding","Welcome"],description:"First-run value prop and sign-in CTA.",render:()=>(0,yt.jsx)(b5,{cliVersion:"0.1.0",onSelect:io})},{id:"onboarding/login/initialising",title:"Login / initialising",path:["TUI","Screens","Onboarding","Login"],description:"Device-code request is in flight.",render:()=>(0,yt.jsx)(wp,{state:oM()})},{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)(wp,{state:Fy({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)(wp,{state:Fy({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)(wp,{state:Fy({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)(wp,{state:Fy({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:Kf.plist,binaryPath:Kf.binary,logFile:Kf.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)(wp,{state:Fy({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)(wp,{state:Fy({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)(wp,{state:Fy({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)(wp,{state:Fy({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:io,onSkip:io})},{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:Utt,now:Date.parse("2026-05-16T12:00:00.000Z"),organizationName:"Tanagram"},onSubmit:io,onSkip:io})},{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:io,onSkip:io})},{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:io,onSkip:io})},{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:io,onSkip:io})},{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:io,onSkip:io})},{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:io,onSkip:io})},{id:"dashboard/healthy",title:"Dashboard / healthy",path:["TUI","Screens","Dashboard"],description:"Signed in, daemon healthy, upload repos configured.",render:()=>(0,yt.jsx)(Qy,{cliVersion:"0.1.0",initialData:WM,onSelect:io})},{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)(Qy,{cliVersion:"0.1.0",initialData:Ftt,onSelect:io})},{id:"dashboard/daemon-error",title:"Dashboard / daemon error",path:["TUI","Screens","Dashboard"],description:"Daemon panel surfaces a launchctl failure.",render:()=>(0,yt.jsx)(Qy,{cliVersion:"0.1.0",initialData:Gtt,onSelect:io})},{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)(Qy,{cliVersion:"0.1.0",initialData:jtt,onSelect:io})},{id:"dashboard/signed-out",title:"Dashboard / signed out",path:["TUI","Screens","Dashboard"],description:"Signed-out dashboard snapshot.",render:()=>(0,yt.jsx)(Qy,{cliVersion:"0.1.0",initialData:ztt,onSelect:io})},{id:"sharing/initial",title:"Share flow / initial",path:["TUI","Screens","Sharing"],description:"All pipeline steps pending.",render:()=>(0,yt.jsx)(xh,{title:"lore share-codex",subtitle:"sharing this Codex session",state:KM()})},{id:"sharing/uploading",title:"Share flow / uploading",path:["TUI","Screens","Sharing"],description:"Upload step active with a progress label.",render:()=>(0,yt.jsx)(xh,{title:"lore share-codex",subtitle:"sharing this Codex session",state:XM({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)(xh,{title:"lore export",subtitle:"sharing your latest Claude Code session",state:XM({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)(xh,{title:"lore share-codex",state:XM({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)(xh,{title:"lore share-cowork",state:XM({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)(xh,{title:"lore export",state:XM({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)(Cy,{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)(Cy,{mode:"enable",state:{phase:"finished",result:{plistPath:Kf.plist,binaryPath:Kf.binary,logFile:Kf.logFile}}})},{id:"daemon/run/disable-success",title:"Daemon run / disable success",path:["TUI","Screens","Daemon","Run"],description:"Disable success copy.",render:()=>(0,yt.jsx)(Cy,{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)(Cy,{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)(Cy,{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)(uM,{report:y1})},{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)(uM,{report:Qtt})},{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)(Ms,{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:xe.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)(en,{label:"Healthy",value:"yes",kind:"success"}),(0,yt.jsx)(en,{label:"Warning",value:"needs attention",kind:"warning"}),(0,yt.jsx)(en,{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)(Ptt,{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)(Ls,{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)(Ls,{kind:"error",title:"Failed",children:(0,yt.jsx)(he,{color:xe.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)(Ha,{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)(_1,{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:io})})},{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)(nM,{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:io,onAction:io})})},{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)(k$,{initialValue:"~/code",onSubmit:io,onCancel:io})})},{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)(O$,{initialValue:"/Users/alex/code",loadSuggestions:async()=>Htt,onSubmit:io,onCancel:io})})}];function $tt(e){return MA.find(t=>t.id===e)}function S1(e){return e.path.slice(1).join(" / ")}var Hr=ue(Ht(),1);function Vtt({initialStoryId:e}){let t=Math.max(0,MA.findIndex(f=>f.id===e)),[n,r]=(0,e2.useState)(t),[o,i]=(0,e2.useState)("sidebar"),s=(0,e2.useRef)(o);s.current=o;let{exit:u}=Os();Ru((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(_=>qtt(_-1));return}(h.downArrow||f==="j")&&r(_=>qtt(_+1))}});let l=MA[n]??MA[0];return(0,Hr.jsxs)(Ee,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,Hr.jsx)(Ms,{title:"lore TUI stories",subtitle:"terminal story runner",right:`${n+1}/${MA.length}`}),(0,Hr.jsx)(Ee,{marginBottom:1,children:(0,Hr.jsx)(he,{color:xe.muted,children:"\u2191/\u2193 or j/k select stories \xB7 Tab focuses preview \xB7 Shift+Tab/Esc returns \xB7 q exits from sidebar"})}),(0,Hr.jsxs)(Ee,{flexDirection:"row",gap:2,children:[(0,Hr.jsx)(Ee,{width:36,flexShrink:0,children:(0,Hr.jsx)(Qn,{title:"Stories",subtitle:o==="sidebar"?"focused":void 0,focused:o==="sidebar",children:(0,Hr.jsx)(jrn,{stories:MA,selectedIndex:n,focused:o==="sidebar"})})}),(0,Hr.jsx)(Ee,{flexDirection:"column",flexGrow:1,flexShrink:1,children:(0,Hr.jsx)(Qn,{title:l.title,focused:o==="preview",subtitle:o==="preview"?`${S1(l)} \xB7 focused`:S1(l),children:(0,Hr.jsxs)(Ee,{flexDirection:"column",children:[(0,Hr.jsx)(he,{color:xe.muted,children:l.description}),o==="sidebar"?(0,Hr.jsxs)(he,{color:xe.muted,children:["Press ",(0,Hr.jsx)(he,{bold:!0,children:"Tab"})," to interact with this preview."]}):null,(0,Hr.jsx)(Ee,{marginTop:1,children:l.render()})]})})})]})]})}function jrn({stories:e,selectedIndex:t,focused:n}){let r=[],o=[];return e.forEach((i,s)=>{let u=i.path.slice(1),l=Vrn(o,u);for(let f=l;f<u.length;f++)r.push((0,Hr.jsx)(zrn,{label:u[f]??"",level:f,marginTop:qrn(u[f]??"",f,l),focused:n},`group:${u.slice(0,f+1).join("/")}`));r.push((0,Hr.jsx)(Hrn,{story:i,selected:s===t,focused:n},i.id)),o=u}),(0,Hr.jsx)(Ee,{flexDirection:"column",children:r})}function zrn({label:e,level:t,marginTop:n,focused:r}){return(0,Hr.jsx)(Ee,{marginLeft:Ytt(t),marginTop:n,children:(0,Hr.jsx)(he,{color:r?xe.primary:xe.muted,bold:r,wrap:"truncate-end",children:e})})}function Hrn({story:e,selected:t,focused:n}){let r=n?t?xe.accent:xe.highlight:xe.muted;return(0,Hr.jsxs)(Ee,{marginLeft:Ytt(e.path.slice(1).length),children:[(0,Hr.jsx)(he,{color:n&&t?xe.accent:xe.muted,children:t?"\u203A ":" "}),(0,Hr.jsx)(he,{color:r,bold:n&&t,wrap:"truncate-end",children:$rn(e)})]})}function $rn(e){let t=e.title.split(" / ");return t.length>1?t.slice(1).join(" / "):e.path.at(-1)===e.title?"Default":e.title}function Ytt(e){return Math.min(e,4)}function qrn(e,t,n){return t===0?e==="Components"?1:0:t===1&&t===n?1:0}function Vrn(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 qtt(e){let t=MA.length;return(e%t+t)%t}function Ktt({story:e}){let{exit:t}=Os();return Ru((n,r)=>{(r.ctrl&&n==="c"||r.escape)&&t()}),(0,Hr.jsxs)(Ee,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,Hr.jsx)(Ms,{title:e.title,subtitle:S1(e),right:"Esc to exit"}),(0,Hr.jsx)(Ee,{marginBottom:1,children:(0,Hr.jsx)(he,{color:xe.muted,children:e.description})}),e.render()]})}var Jfe=ue(Ht(),1),Jtt={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){Yrn();return}if(typeof e.story=="string"&&e.story.trim().length>0){let n=$tt(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 cl((0,Jfe.jsx)(Ktt,{story:n})).waitUntilExit();return}await cl((0,Jfe.jsx)(Vtt,{})).waitUntilExit()}};function Yrn(){for(let e of MA)console.log(`${e.id} ${S1(e)} ${e.title}`)}A();yr();mn();var Ztt={meta:{name:"backfill-artifacts",description:"Upload artifact files (uploads/ and outputs/) for Cowork sessions already shared to Lore, so they show up in the Artifacts tab. Re-uploads bytes from this machine; only sessions that already have a Lore thread are touched."},args:{"dry-run":{type:"boolean",description:"List what would be uploaded without uploading anything."}},async run({args:e,data:t}){let n=!!e["dry-run"];z.info("command_start",{command:"backfill-artifacts",dry_run:n});let r=t?.client??Ct(),o=l5(),i=Ly(o);if(i.length===0){console.log(`No Cowork sessions found under ${o}`);return}let s=0,u=0,l=0,f=0;for(let h of i){let{artifactFiles:_,tempPaths:E}=await jfe(h.localDir);try{if(_.length===0){f+=1;continue}if(n){console.log(`${h.sessionId}: ${_.length} artifact file(s) ready to upload`);continue}let T=await r.presignBackfillArtifacts({body:{harness:"cowork",harness_internal_id:h.sessionId,artifact_files:_.map(x=>({kind:x.kind,file_name:x.fileName,md5:x.md5,size_in_bytes:x.sizeInBytes,content_type:x.contentType}))}});if(T.status===404){l+=1;continue}if(T.status!==200){console.error(`${h.sessionId}: presign failed (${T.status})`);continue}let v=[];for(let x of T.body.artifact_files){let k=_.find(P=>P.kind===x.kind&&P.fileName===x.file_name);!k||!x.presigned_url||(await ZKe(x.presigned_url,k.tempPath),v.push({kind:x.kind,file_name:x.file_name,storage_url:x.storage_url,md5:k.md5,size_in_bytes:k.sizeInBytes,content_type:k.contentType}))}if(v.length===0)continue;let R=await r.commitBackfillArtifacts({body:{harness:"cowork",harness_internal_id:h.sessionId,artifacts:v}});if(R.status!==200){console.error(`${h.sessionId}: commit failed (${R.status})`);continue}s+=R.body.created,u+=1,console.log(`${h.sessionId}: backfilled ${R.body.created} artifact(s)`)}finally{await Promise.all(E.map(T=>Ac(T)))}}if(n){console.log(`Dry run complete. ${f} session(s) had no artifact files.`);return}console.log(`Done. Backfilled ${s} artifact(s) across ${u} thread(s). Skipped ${l} not-yet-shared session(s) and ${f} with no artifact files.`)}};A();mn();ry();A();await ho();var R5=ue(dn(),1);await fb();var Zfe=ue(Ht(),1);function Krn({title:e,subtitle:t,perform:n,onResolve:r,onReject:o}){let[i,s]=(0,R5.useState)(KM),{exit:u}=Os();return(0,R5.useEffect)(()=>{let l=!1,f=h=>{l||s(_=>v5(_,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,Zfe.jsx)(xh,{title:e,subtitle:t,state:i})}async function T1(e){let t,n,r=!1;if(await cl((0,Zfe.jsx)(Krn,{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}A();ex();yr();import ton from"node:os";import ent from"node:path";A();import{spawn as Jrn}from"node:child_process";import Zrn from"node:os";async function Wtt(e,t={}){let n=t.timeoutMs??2e3,r=Wrn();for(let o of r)if(await Xrn(o,e,n))return!0;return!1}function Wrn(){switch(Zrn.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 Xrn(e,t,n){return new Promise(r=>{let o;try{o=Jrn(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)})}zt();mn();JP();yh();A();var b1=()=>{};A();mn();async function eon(e,t,n){let r=await e.resolveThreadShareHighlight({params:{id:t},body:{query:n}});if(r.status!==200)throw Bp(`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 x5(e,t,n){try{return await eon(e,t,n)}catch(r){return z.warn("share_highlight_resolution_failed",{thread_id:t,error:r instanceof Error?r.message:String(r)}),null}}A();zt();function Xtt(e){if(e instanceof Jx)return"billing_required";if(e instanceof iM)return e.status>=500&&e.status<600?"server_5xx":e.status>=400&&e.status<500?"server_4xx":"s3_error";if(e instanceof Re)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 non=new Set(["private","workspace","public"]);function ron(e){let t=(e??"").trim();if(!t)return"";if(!non.has(t))throw new Re(`invalid --visibility "${e}": use one of private, workspace, public`);return t}async function Wfe(e={}){let t=e.progress??b1,n=ron(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 Net({sessionId:o,project:r});i="auth",await uon();let l=e.client??Ct();i="collecting_local_file",s=await oon(u),t({kind:"step",step:"uploading",label:s.filename}),i="uploading";let f=await ion(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;z.info("export_upload_single_file_result",{filename:s.filename,reused:h,response:JSON.stringify(_)});let E=_?.id?.trim();if(!E)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 ZD(l,E);let T=_?.visibility?.trim()??"",v=T;n&&n!==T&&(i="updating_visibility",t({kind:"step",step:"updating_visibility"}),v=await son(l,E,n));let R=aon(E),x,k=e.highlight?.trim();if(k){i="resolving_highlight",t({kind:"step",step:"resolving_highlight"});let j=await x5(l,E,k);j&&(R=j.url,x={query:k,matched:j.matched,start_block_id:j.start_block_id,end_block_id:j.end_block_id})}let P=await Wtt(R);return t({kind:"completed",url:R,reused:h,visibility:v,clipboardCopied:P,sessionId:u.sessionId?.trim()??""}),t({kind:"step",step:"done"}),bh("lore.cli.thread_exported",{thread_id:E,harness:s.harness,visibility:v,reused:h}),{thread_id:E,url:R,session_id:u.sessionId?.trim()??"",project:u.project,reused:h,visibility:v,clipboard_copied:P,...x?{highlight:x}:{}}}catch(u){throw bh("lore.cli.upload_failed",{error_category:Xtt(u),error_message:jt(u),step:i}),u}finally{s&&await Ac(s.tempPath)}}async function oon(e){let t=await wet(e),n=await qi(t.fullPath);if(!n.exists)throw new Re(`session transcript not found at ${con(t.fullPath)} \u2014 the file may have been rotated or pruned`);let r=await Dp(e.project),o=await dl(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 ion(e,t){let[n]=await kA(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 Re(`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 son(e,t,n){let r=await e.updateThread({params:{id:t},body:{visibility:n}});if(r.status!==200)throw Bp(`set thread ${t} visibility`,r.status,r.body);return r.body.visibility}function aon(e){return`${Ty().replace(/\/+$/,"")}/thread/${e}`}async function uon(){let e=await Gt();if(!e)throw new Re("not logged in \u2014 run 'lore login' first");return e}function con(e){let t=ton.homedir();if(!t)return e;let n=ent.relative(t,e);return!n||n.startsWith("..")?e:ent.join("~",n)}var tnt={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}){z.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(Cu()&&!t?.progress){let o=await T1({title:"lore export",subtitle:"uploading the most recent Claude Code session",perform:i=>Wfe({...n,progress:i})});"quarantined"in o&&o.quarantined&&console.log(`
|
|
658
|
+
`),!rtt(n))console.log(" currently uploading from: nothing yet \u2014 opt in to your first location below.");else{console.log(" currently uploading from:");let r=Math.max(8,...n.map(o=>o.value.length));for(let o of n){let i=o.kind==="cwd"?"dir":"repo";console.log(` ${i} ${o.value.padEnd(r)} \u2192 ${o.workspace}`)}}console.log(""),console.log(" For guided, interactive setup, run `lore configure`."),console.log(" These subcommands are the low-level CRUD for scripted edits:"),console.log(""),console.log(" lore listen create <path> start uploading from a directory"),console.log(" lore listen list [--json] print the upload list"),console.log(" lore listen delete <path> stop uploading from a directory"),console.log(""),console.log(" Example: lore listen create ~/code/projectA")}};A();jD();A();zt();oo();Du();yh();import Lnn from"node:fs/promises";async function Unn(e){try{return await Lnn.access(e),!0}catch(t){if(Lr(t,"ENOENT"))return!1;throw t}}async function Qnn({uploadFilterPath:e=MT()}={}){if(!await Unn(e))return;let t=await xi(e),n=[],r=[];for(let o of t.include.cwd){let i=await hy(o);i?n.push(i):r.push(o)}n.length===0&&r.length===t.include.cwd.length||await Ad({...t,include:{...t.include,cwd:r.sort(),repo:Array.from(new Set([...t.include.repo,...n])).sort()}},e)}var itt={id:"20260519000000-upload-filter-cwds-to-repos",run:Qnn};var Fnn=[RYe,itt];async function Gnn(e=Fnn,t=console.log){t(`running ${e.length} migration${e.length===1?"":"s"}`);for(let n of e)t(`running migration ${n.id}`),await n.run(),t(`finished migration ${n.id}`);t("finished migrations")}var stt={meta:{name:"postinstall:migrate",hidden:!0,skipAutoupdate:!0},async run(){await Gnn()}};Hse();JP();A();yr();sc();mn();Wle();import{platform as jnn,release as znn}from"node:os";function Hnn(e){return e.find(n=>!n.startsWith("-"))??"lore"}async function att(e){try{let t={command:Hnn(e.rawArgs),rawArgs:[...e.rawArgs],cliVersion:hu(),nodeVersion:process.version,platform:jnn(),release:znn()};(await kYe({error:e.error,context:t,logger:z,send:async r=>{let i=await Ct().createFeedback({body:r});switch(i.status){case 201:return{kind:"sent"};case 401:return{kind:"unauthorized"};case 429:return{kind:"rate-limited"};default:return{kind:"failed",error:new Error(`createFeedback returned HTTP ${i.status}`)}}}})).kind==="sent"&&z.info("error_report_sent")}catch(t){z.warn("error_report_unexpected_failure",{error:t instanceof Error?t.message:String(t)})}}A();import{setTimeout as utt}from"node:timers/promises";yr();zt();var $nn=3e4,A5={meta:{name:"_run_skill_sync",description:"Run the workspace skill sync daemon.",hidden:!0,skipAutoupdate:!0},args:{watch:{type:"boolean",description:"Run continuously with filesystem watchers, SSE, and fallback polling.",default:!1},"poll-interval-ms":{type:"string",description:"Fallback full-sync poll interval in milliseconds.",default:"1800000"},"watch-debounce-ms":{type:"string",description:"Filesystem watcher debounce interval in milliseconds.",default:"2000"}},async run({args:e,data:t}){let n=t,r=n?.getAccessToken??Gt,o=!!e.watch,{client:i,who:s}=await qnn({watch:o,getAccessToken:r,injectedClient:n?.client,retryDelayMs:n?.authRetryDelayMs??$nn}),u=s.body.organizations.map(T=>T.id),l=s.body.user.id,{lastEventId:f}=await ii(),h=(n?.createEventStream??t5)({userId:l,organizationIds:u,getAccessToken:r,reconnect:!0,...f?{lastEventId:f}:{}}),_=Number(e["poll-interval-ms"]);if(!Number.isFinite(_)||_<=0)throw new Re("--poll-interval-ms must be a positive number");let E=Number(e["watch-debounce-ms"]);if(!Number.isFinite(E)||E<=0)throw new Re("--watch-debounce-ms must be a positive number");await(n?.runSkillSyncDaemon??X9)({client:i,events:h,pollIntervalMs:_,watch:o,watchDebounceMs:E,onSyncPass:({reason:T,event:v,result:R})=>{let x=v?` from ${v.type}${v.id?`#${v.id}`:""}`:"";console.log(`skill sync ${T}${x}: ${R.publishedLocalPushed} published local update${R.publishedLocalPushed===1?"":"s"} uploaded, ${R.installedUpdated} updated, ${R.localEditsUploaded} local edit${R.localEditsUploaded===1?"":"s"} uploaded, ${R.conflicts} conflict${R.conflicts===1?"":"s"}`)}})}};async function qnn(e){for(;;){let t=await e.getAccessToken();if(!t){if(!e.watch)throw new Re("workspace skill sync daemon requires login \u2014 run 'lore login' first");await utt(e.retryDelayMs);continue}let n=e.injectedClient??Ct({token:t}),r=await n.whoAmI({headers:{}});if(r.status===200)return{client:n,who:r};if(!e.watch)throw new Re(`whoAmI returned ${r.status}`);await utt(e.retryDelayMs)}}A();A();yr();zt();var ctt={meta:{name:"approve",description:"Approve a proposed skill version and make it 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 approve"}},async run({args:e}){if(!await Gt())throw new Re("skill approval requires login \u2014 run 'lore login' first");await Vnn(Ct(),{id:e.id,version:e.version})}};async function Vnn(e,t){let n=Number(t.version);if(!Number.isInteger(n)||n<=0)throw new Re("--version must be a positive integer timestamp");let r=await e.approveSkillVersion({params:{id:t.id,version:n},body:{}});if(r.status!==200){let o=r.body?.message??`approveSkillVersion returned ${r.status}`;throw new Re(o)}console.log(`approved /${r.body.name} v${r.body.version} (${r.body.id})`)}A();import Ynn from"node:fs/promises";import ltt from"node:path";yr();zt();mn();var dtt={meta:{name:"install",description:"Pull a workspace skill from Lore and write it to ~/.claude/skills/<name>/SKILL.md."},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 Re("install needs a skill ID \u2014 e.g. `lore skills install sk_01j...`");if(!await Gt())throw new Re("workspace skill installs require login \u2014 run 'lore login' first");let n=Ct();await Knn(n,t)}};async function Knn(e,t){z.info("skill_install_started",{skill_id:t});try{let n=await Jnn(e,t);z.info("skill_install_registered",{skill_id:n.body.skill.id,installation_id:n.body.installation_id,already_registered:n.body.already_registered,name:n.body.skill.name,root_kind:n.body.skill.root_kind,latest_version:n.body.skill.latest_version});let r={skillId:n.body.skill.id,installationId:n.body.installation_id,name:n.body.skill.name,rootKind:n.body.skill.root_kind,latestVersion:n.body.skill.latest_version,contentHash:n.body.skill.content_hash,bodyMd:await Wnn(n.body.body_md_url,n.body.skill.content_hash)};if(!$M(r.name))throw new Re(`refusing to install skill with invalid name: ${JSON.stringify(r.name)}`);let o=Y9(r.rootKind),i=qM(o,r.name),s=await Xnn(i),u=await XD(r.skillId),l=u?.installPath!=null&<t.resolve(u.installPath)===ltt.resolve(i);if(s!==null&&!l)throw z.warn("skill_install_refused_unmanaged_target",{skill_id:r.skillId,name:r.name,root_kind:o,install_path:i}),new Re(`refusing to overwrite ${i}; it already exists and is not managed by Lore`);let f=await K9(o,r.name,r.bodyMd),h=r.latestVersion,_={installationId:r.installationId,skillId:r.skillId,name:r.name,rootKind:o,installPath:f,baseVersion:h,baseContentHash:r.contentHash,lastInstalledVersion:h,lastInstalledHash:r.contentHash,lastSyncStatus:"current"};await ll(_);try{await Znn(e,r.installationId,h)}catch(E){throw await ll({..._,lastSyncStatus:"error"}),z.warn("skill_install_failed",{skill_id:r.skillId,installation_id:r.installationId,phase:"update_installed_version",error:jt(E)}),E}z.info("skill_install_written",{skill_id:r.skillId,installation_id:r.installationId,name:r.name,root_kind:o,install_path:f,latest_version:h,already_up_to_date:s===r.bodyMd}),s===r.bodyMd?console.log(`/${r.name} is already up to date at ${f}`):console.log(`installed /${r.name} (${r.skillId}) -> ${f}`)}catch(n){throw z.warn("skill_install_failed",{skill_id:t,phase:"install",error:jt(n)}),n}}async function Jnn(e,t){let n=await e.installSkill({params:{id:t},body:{}});if(n.status!==200){let r=n.body?.message??`installSkill returned ${n.status}`;throw new Re(r)}return n}async function Znn(e,t,n){let r=await e.updateSkillInstallation({params:{id:t},body:{installed_version:n}});if(r.status!==200){let o=r.body?.message??`updateSkillInstallation returned ${r.status}`;throw new Re(`installed ${t} locally, but failed to record installed version: ${o}`)}}async function Wnn(e,t){let n=new URL(e,al()),r=await Gt(),o=await fetch(n,{headers:{...r?{authorization:`Bearer ${r}`}:{}}});if(!o.ok)throw new Re(`failed to download SKILL.md from ${e}: HTTP ${o.status}`);let i=await o.text();if(gd(i)!==t)throw new Re("downloaded SKILL.md hash did not match the skill metadata");return i}async function Xnn(e){try{return await Ynn.readFile(e,"utf8")}catch{return null}}A();yr();zt();function ern(e){return JSON.stringify(e,null,2)}var ptt={meta:{name:"list",description:"List skills available in your workspace."},async run({data:e}){let t=e;if(!await(t?.getAccessToken??Gt)())throw new Re("not logged in \u2014 run 'lore login' first");let o=await(t?.client??Ct()).listSkills({});if(o.status!==200){let i=o.body?.message??`listSkills returned ${o.status}`;throw new Re(i)}console.log(ern(o.body))}};A();yr();zt();var ftt={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 Gt())throw new Re("skill proposals require login \u2014 run 'lore login' first");await trn(Ct(),e.id)}};async function trn(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 Re(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}`)}}A();import{readFile as nrn}from"node:fs/promises";import g5 from"node:path";yr();zt();mn();var Att={meta:{name:"publish",description:"Publish a local skill to your workspace, or upload local edits for an already-published skill."},args:{target:{type:"positional",required:!0,description:"Local skill name/path or workspace published sk_* ID"}},async run({args:e}){if(!await Gt())throw new Re("not logged in \u2014 run 'lore login' first");let t=typeof e.target=="string"?e.target.trim():"";if(!t)throw new Re("pass a skill name, path, or sk_* ID to publish");let n=await rrn(Ct(),t);lrn(n)}};async function rrn(e,t){let n=t.trim();if(!n)throw new Re("pass a skill name, path, or sk_* ID to publish");let r=n.startsWith("sk_")?"skill_id":"local_name_or_path";z.info("skill_publish_started",{target_kind:r,target:n});try{if(n.startsWith("sk_"))return await gtt(e,n);let o=await SJe(),i=orn(n,o),s=await net(n)??await ret(n,process.cwd(),i);if(!s)throw new Re(`no SKILL.md found for ${n}`);return await irn(e,s)}catch(o){throw z.warn("skill_publish_failed",{target_kind:r,target:n,phase:"publish",error:jt(o)}),o}}function orn(e,t){let n=g5.resolve(e);for(let r of t){if(mtt(m1(r),n))return"claude_project";if(mtt(A1(r),n))return"agents_project"}}function mtt(e,t){let n=g5.relative(g5.resolve(e),t);return n!==""&&!n.startsWith("..")&&!g5.isAbsolute(n)}async function irn(e,t){let n=gd(t.bodyMd),r=await yJe(t);if(z.info("skill_publish_local_resolved",{name:t.name,file_path:t.filePath,root_kind:t.rootKind,published_local_skill_id:r,published_local_skill_id_present:!!r}),!r){let i=await e1(e,t,{syncAction:"initial_publish"});return await t1(t,{skillId:i.skill_id,version:i.version}),z.info("skill_publish_initial_uploaded",{name:t.name,file_path:t.filePath,skill_id:i.skill_id,version:i.version,root_kind:i.root_kind}),{kind:"uploaded",skillId:i.skill_id,version:i.version,versionStatus:i.version_status==="proposed"?"proposed":"accepted"}}let o=await srn(r)===n?await gtt(e,r):await arn(e,r,t);return o.kind!=="conflict"&&o.kind!=="remote_newer"&&await t1(t,{skillId:r,version:o.version}),o}async function srn(e){return(await ii()).publishedLocal[e]?.lastPublishedHash??null}async function gtt(e,t){let n=await e.getSkillDetail({params:{id:t},query:{include_unpublished:!0}});if(n.status===200&&n.body.visibility==="workspace")return htt(e,t,n.body);throw _tt("load workspace skill before publishing local edits",n.status,n.body)}async function arn(e,t,n){let r=await e.getSkillDetail({params:{id:t},query:{include_unpublished:!0}});if(r.status!==200)throw _tt("load skill before publishing local edits",r.status,r.body);return htt(e,t,r.body,n)}async function htt(e,t,n,r){let o=await ii(),i=o.installed[t]??null,s=o.publishedLocal[t]??null,u=i?.installPath??r?.filePath??s?.filePath,l=i?.rootKind??r?.rootKind??s?.rootKind??n.root_kind,f=i?.name??r?.name??s?.name??n.name;if(!u)throw new Re(`no managed local SKILL.md found for ${t}; install it or publish it from this machine first`);let h=await nrn(u,"utf8"),_=gd(h),E=n.latest_version??0,T=n.content_hash??"",v=urn(i,s);if(_===T)return z.info("skill_publish_noop",{skill_id:t,version:E,reason:"local_matches_remote"}),{kind:"unchanged",skillId:t,version:E};if(v.version>0&&E>v.version)return _===v.hash?(z.info("skill_publish_noop",{skill_id:t,version:E,reason:"remote_newer_local_unchanged",local_version:v.version}),{kind:"remote_newer",skillId:t,localVersion:v.version,remoteVersion:E}):(i&&await ll({...i,lastSyncStatus:"conflict"}),z.warn("skill_publish_conflict",{skill_id:t,local_version:v.version,remote_version:E,name:f,file_path:u}),{kind:"conflict",skillId:t,localVersion:v.version,remoteVersion:E});if(_===v.hash)return z.info("skill_publish_noop",{skill_id:t,version:E,reason:"local_matches_base"}),{kind:"unchanged",skillId:t,version:E};let R=await crn(e),x=n.owner?.id&&n.owner.id===R?"owner_update":"subscriber_update",k=await e1(e,{skillId:t,name:f,description:null,bodyMd:h,filePath:u,rootKind:l},{syncAction:x,...v.version>0?{baseVersion:v.version}:{}});return i&&await ll({...i,...k.version_status==="accepted"?{baseVersion:k.version,baseContentHash:k.content_hash,lastSyncStatus:"current"}:{lastSyncStatus:"proposed"},lastInstalledVersion:k.version,lastInstalledHash:k.content_hash}),await t1({name:f,bodyMd:h,filePath:u,rootKind:l},{skillId:k.skill_id,version:k.version}),z.info("skill_publish_update_uploaded",{skill_id:k.skill_id,name:f,file_path:u,sync_action:x,version:k.version,version_status:k.version_status}),{kind:"uploaded",skillId:k.skill_id,version:k.version,versionStatus:k.version_status==="proposed"?"proposed":"accepted"}}function urn(e,t){return e?{hash:e.baseContentHash,version:e.baseVersion}:t?{hash:t.lastPublishedHash,version:t.lastPublishedVersion}:{hash:"",version:0}}async function crn(e){let t=await e.whoAmI({headers:{}});return t.status!==200?null:t.body.user.id}function _tt(e,t,n){let r=n?.message??`${e} returned ${t}`;return new Re(r)}function lrn(e){switch(e.kind){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}}A();yr();zt();var Ett={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 Gt())throw new Re("skill rejection requires login \u2014 run 'lore login' first");await drn(Ct(),{id:e.id,version:e.version,reason:e.reason})}};async function drn(e,t){let n=Number(t.version);if(!Number.isInteger(n)||n<=0)throw new Re("--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 Re(i)}console.log(`rejected /${o.body.name} v${o.body.version} (${o.body.id})`)}A();OO();import Kfe from"node:fs/promises";import ytt from"node:os";import Di from"node:path";var Stt={meta:{name:"scan",description:"List local skills found by Lore's scanner."},async run(){await yrn()}};function Ttt(e){let t=Di.resolve(e),n=Di.resolve(ytt.homedir()),r=Di.relative(n,t);return r===""?"~":!r.startsWith("..")&&!Di.isAbsolute(r)?Di.join("~",r):t}function prn(e){return Ttt(Di.dirname(Di.dirname(e)))}function frn(e){return Di.basename(Di.dirname(e))}function mrn(e,t){let n=Di.resolve(e);for(let r of t){let o=Di.resolve(r),i=Di.relative(o,n);if(i!==""&&!i.startsWith("..")&&!Di.isAbsolute(i))return o}return null}function Arn(e,t,n){return e==="claude_project"?t.map(r=>Di.join(m1(r),n)):e==="agents_project"?t.map(r=>Di.join(A1(r),n)):[]}function grn(){return Di.join(ytt.homedir(),"Library","Application Support","Claude","local-agent-mode-sessions","skills-plugin")}async function hrn(e){let t=[];async function n(r){let o;try{o=await Kfe.readdir(r,{withFileTypes:!0})}catch{return}for(let i of o){let s=Di.join(r,i.name);i.isDirectory()?await n(s):i.isFile()&&i.name==="manifest.json"&&t.push(s)}}return await n(e),t.sort((r,o)=>r.localeCompare(o))}function h5(e){if(typeof e!="string")return null;let t=e.trim();return t.length>0?t:null}function _rn(e){let t;try{t=JSON.parse(e)}catch{return[]}if(!t||typeof t!="object"||Array.isArray(t))return[];let n=t.skills;if(!Array.isArray(n))return[];let r=[];for(let o of n){if(!o||typeof o!="object"||Array.isArray(o))continue;let i=o,s=h5(i.skillId),u=h5(i.name);!s||!u||r.push({skillId:s,name:u,description:h5(i.description),creatorType:h5(i.creatorType)})}return r}async function Ern(){let e={};for(let t of await hrn(grn())){let n;try{n=await Kfe.readFile(t,"utf8")}catch{continue}let r=Di.join(Di.dirname(t),"skills"),o=Ttt(r);for(let i of _rn(n)){if(i.creatorType==="anthropic")continue;let s=Di.join(r,i.name,"SKILL.md");try{await Kfe.access(s)}catch{continue}e[o]??=[],e[o].push({skill_id:i.skillId,name:i.name,description:i.description,file_path:s,manifest_path:t})}}for(let t of Object.values(e))t.sort((n,r)=>n.name.localeCompare(r.name)||n.file_path.localeCompare(r.file_path));return e}async function yrn(){let e=await Ude(),t=await ii(),n=e.map(l=>l.root),r=new Map(e.map(l=>[Di.resolve(l.root),l])),o=await set({projectCwds:n,includeCwdProject:!1}),i={},s=new Set;for(let l of o){let f=Di.resolve(l.filePath);if(s.has(f))continue;s.add(f);let h=prn(l.filePath),_=mrn(l.filePath,n),E=_?r.get(_)?.alsoSeenAt??[]:[],T=G$(t,{filePath:l.filePath,rootKind:l.rootKind});i[h]??=[],i[h].push({name:l.name,description:l.description,root_kind:l.rootKind,file_path:l.filePath,also_seen_at:Arn(l.rootKind,E,frn(l.filePath)),...T?{skill_id:T.skillId}:{},local_content_hash:gd(l.bodyMd)})}let u=Eje.parse({type:"local_skill_scanner_output",skills:i,cowork_skills:await Ern()});console.log(JSON.stringify(u,null,2))}A();yr();zt();var btt={meta:{name:"status",description:"Show local Lore-managed skill sync state."},async run(){if(!await Gt())throw new Re("skill status requires login \u2014 run 'lore login' first");await Srn()}};async function Srn(){let e=await ii();console.log(JSON.stringify(e))}A();yr();zt();var Itt={meta:{name:"sync",description:"Sync installed Lore-managed skills to their latest accepted versions."},async run(){if(!await Gt())throw new Re("workspace skill sync requires login \u2014 run 'lore login' first");let e=await kfe(Ct());console.log(`skill sync complete: ${e.installedUpdated} updated, ${e.localEditsUploaded} local edit${e.localEditsUploaded===1?"":"s"} uploaded, ${e.conflicts} conflict${e.conflicts===1?"":"s"}`)}};A();import Ctt from"node:fs/promises";import Trn from"node:path";yr();zt();var vtt={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 Re("uninstall needs a skill ID \u2014 e.g. `lore skills uninstall sk_01j...`");if(!await Gt())throw new Re("workspace skill uninstalls require login \u2014 run 'lore login' first");let n=Ct();await brn(n,t)}};async function brn(e,t){let n=await XD(t);n&&(await Ctt.rm(n.installPath,{force:!0}),await Ctt.rmdir(Trn.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 Re(o)}if(await fJe(t),n){console.log(`uninstalled /${n.name} (${t}) from ${n.installPath}`);return}console.log(`uninstalled ${t}`)}A();yr();zt();var Rtt={meta:{name:"unpublish",description:"Remove an owned published skill from your workspace catalog."},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 Re("unpublish needs a skill ID \u2014 e.g. `lore skills unpublish sk_01j...`");if(!await Gt())throw new Re("skill unpublishes require login \u2014 run 'lore login' first");await Irn(Ct(),t)}};async function Irn(e,t){let n=await e.unpublishSkill({params:{id:t},body:{}});if(n.status!==200){let o=n.body?.message??`unpublishSkill returned ${n.status}`;throw new Re(o)}let r=await dJe(n.body.id);if(r){console.log(`unpublished /${r.name} (${n.body.id}); local file kept at ${r.filePath}`);return}console.log(`unpublished ${n.body.id}`)}A();zt();var xtt={meta:{name:"unsync",description:"Remove local skill sync state for a skill ID.",hidden:!0},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 Re("unsync needs a skill ID \u2014 e.g. `lore skills unsync sk_01j...`");let n=await pJe(t);if(n.installed||n.publishedLocal){let r=[n.publishedLocal?"published local":null,n.installed?"installed":null].filter(Boolean);console.log(`removed ${r.join(" and ")} sync state for ${t}`);return}console.log(`no local sync state found for ${t}`)}};var Dtt={meta:{name:"skills",description:"Publish, install, and list skills shared via Lore."},subCommands:{publish:Att,unpublish:Rtt,install:dtt,uninstall:vtt,unsync:xtt,sync:Itt,daemon:A5,approve:ctt,reject:Ett,proposals:ftt,status:btt,list:ptt,scan:Stt}};ry();A();await ho();var C5=ue(dn(),1);sc();await fb();A();await ho();var T5=ue(dn(),1);await RA();A();await ho();var h1=ue(dn(),1);Ps();var hd=ue(Ht(),1);function _1({items:e,onSelect:t,initialIndex:n=0,disabled:r=!1,hint:o,labelWidth:i=20}){let[s,u]=(0,h1.useState)(Ntt(e,n)),l=(0,h1.useRef)(s);return(0,h1.useEffect)(()=>{let f=Ntt(e,n);l.current=f,u(f)},[e,n]),Ru((f,h)=>{if(e.length!==0){if(h.upArrow||f==="k"){let _=Crn(e,l.current);l.current=_,u(_);return}if(h.downArrow||f==="j"){let _=wtt(e,l.current);l.current=_,u(_);return}if(h.return||f===" "){let _=e[l.current];_&&!_.disabled&&t(_)}}},{isActive:!r}),e.length===0?(0,hd.jsx)(he,{color:xe.muted,children:"no actions available"}):(0,hd.jsxs)(Ee,{flexDirection:"column",children:[e.map((f,h)=>{let _=h===s,E=f.disabled?xe.muted:_?xe.primary:xe.highlight;return(0,hd.jsxs)(Ee,{children:[(0,hd.jsx)(Ee,{width:2,flexShrink:0,children:(0,hd.jsx)(he,{color:_?xe.primary:xe.muted,children:_?"\u203A":" "})}),(0,hd.jsx)(Ee,{width:i,flexShrink:0,children:(0,hd.jsx)(he,{color:E,bold:_&&!f.disabled,children:f.label})}),f.description?(0,hd.jsx)(Ee,{flexGrow:1,flexShrink:1,children:(0,hd.jsx)(he,{color:xe.muted,children:f.description})}):null]},f.id)}),o?(0,hd.jsx)(Ee,{marginTop:1,children:(0,hd.jsx)(he,{color:xe.muted,children:o})}):null]})}function Ntt(e,t){if(e.length===0)return 0;let n=Math.max(0,Math.min(t,e.length-1));return e[n]?.disabled?wtt(e,n-1):n}function wtt(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 Crn(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 xA();await gb();await hb();Ps();A();yr();Du();jD();YD();async function _5(e){if(!await(e.hasAccessToken??(async()=>!!await Gt()))())return{state:"logged_out"};let n=e.client??Ct();try{let r=await n.whoAmI({headers:{}});return r.status!==200?{state:"error",message:Btt(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.workspaceOrganizationIds?.[0],activeOrganizationName:r.body.org_name}}catch(r){return{state:"error",message:r instanceof Error?r.message:String(r)}}}async function E5(e){let t=e.platform??process.platform;if(t!=="darwin")return{state:"unsupported",platform:t};let n=e.getDaemonStatus??I$;try{return{state:"ready",report:await n()}}catch(r){return{state:"error",message:r instanceof Error?r.message:String(r)}}}async function y5(e){if(!await(e.hasAccessToken??(async()=>!!await Gt()))())return{state:"logged_out"};let n=e.client??Ct();try{let r=await n.listSkills({});if(r.status!==200)return{state:"error",message:Btt(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 S5(){try{await Th();let e=await xi();return vrn(e)}catch(e){return{state:"error",message:e instanceof Error?e.message:String(e)}}}function vrn(e){return{state:"ready",cwd:e.include.cwd,repo:e.include.repo}}function Btt(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 Bt=ue(Ht(),1);function Qy({cliVersion:e,initialData:t,deps:n={},onSelect:r}){let{exit:o}=Os(),[i,s]=(0,T5.useState)(t??{identity:{state:"loading"},daemon:{state:"loading"},skills:{state:"loading"},uploadDirs:{state:"loading"}});(0,T5.useEffect)(()=>{if(t)return;let l=!1;return(async()=>{let[f,h,_,E]=await Promise.all([_5(n),E5(n),y5(n),S5()]);l||s({identity:f,daemon:h,skills:_,uploadDirs:E})})(),()=>{l=!0}},[]),Ru((l,f)=>{(l==="q"||f.ctrl&&l==="c"||f.escape)&&(r("quit"),o())});let u=Brn(i);return(0,Bt.jsxs)(Ee,{flexDirection:"column",paddingY:1,paddingX:1,children:[(0,Bt.jsx)(Ms,{title:"lore",subtitle:xrn(i.identity),right:`v${e}`}),(0,Bt.jsxs)(Ee,{flexDirection:"row",gap:2,children:[(0,Bt.jsx)(Ee,{flexDirection:"column",width:"50%",children:(0,Bt.jsx)(Qn,{title:"Daemon",children:(0,Bt.jsx)(Drn,{daemon:i.daemon})})}),(0,Bt.jsx)(Ee,{flexDirection:"column",width:"50%",children:(0,Bt.jsx)(Qn,{title:"Workspace",children:(0,Bt.jsx)(Nrn,{identity:i.identity,skills:i.skills})})})]}),(0,Bt.jsx)(Ee,{marginTop:1,children:(0,Bt.jsx)(Qn,{title:"Upload filters",subtitle:i.uploadDirs.state==="ready"?`${i.uploadDirs.cwd.length+i.uploadDirs.repo.length} configured`:void 0,children:(0,Bt.jsx)(Rrn,{uploadDirs:i.uploadDirs})})}),(0,Bt.jsx)(Ee,{marginTop:1,children:(0,Bt.jsx)(Qn,{title:"Quick actions",subtitle:"\u2191/\u2193 or j/k \xB7 Enter to choose \xB7 q to quit",children:(0,Bt.jsx)(_1,{items:u,onSelect:l=>{r(l.id),o()}})})})]})}function Rrn({uploadDirs:e}){return e.state==="loading"?(0,Bt.jsx)(Ha,{label:"reading ~/.lore/upload_filters.json\u2026"}):e.state==="error"?(0,Bt.jsxs)(Ee,{flexDirection:"column",children:[(0,Bt.jsx)(en,{label:"Status",value:"error",kind:"error"}),(0,Bt.jsx)(he,{color:xe.danger,children:e.message})]}):e.cwd.length===0&&e.repo.length===0?(0,Bt.jsxs)(Ee,{flexDirection:"column",children:[(0,Bt.jsx)(en,{label:"Status",value:"none configured \u2014 the daemon won't auto-upload anything",kind:"warning"}),(0,Bt.jsx)(Ee,{marginTop:1,children:(0,Bt.jsxs)(he,{color:xe.muted,children:["Run ",(0,Bt.jsx)(he,{bold:!0,children:"lore configure"})," to pick directories interactively."]})})]}):(0,Bt.jsxs)(Ee,{flexDirection:"column",children:[e.cwd.map(t=>(0,Bt.jsx)(en,{label:"cwd",value:t,kind:"success",labelWidth:16},`cwd:${t}`)),e.repo.map(t=>(0,Bt.jsx)(en,{label:"repo",value:t,kind:"success",labelWidth:16},`repo:${t}`))]})}function xrn(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 Drn({daemon:e}){if(e.state==="loading")return(0,Bt.jsx)(Ha,{label:"reading launchd state\u2026"});if(e.state==="unsupported")return(0,Bt.jsxs)(Ee,{flexDirection:"column",children:[(0,Bt.jsx)(he,{color:xe.muted,children:"Background uploads are macOS-only today."}),(0,Bt.jsxs)(he,{color:xe.muted,children:["Detected platform: ",e.platform]})]});if(e.state==="error")return(0,Bt.jsxs)(Ee,{flexDirection:"column",children:[(0,Bt.jsx)(en,{label:"Status",value:"error",kind:"error"}),(0,Bt.jsx)(he,{color:xe.danger,children:e.message})]});let t=e.report,n=t.healthy?"success":t.enabled?"warning":"idle";return(0,Bt.jsxs)(Ee,{flexDirection:"column",children:[(0,Bt.jsx)(en,{label:"Status",value:t.health,kind:n}),(0,Bt.jsx)(en,{label:"Enabled",value:t.enabled?"yes":"no",kind:t.enabled?"success":"idle"}),(0,Bt.jsx)(en,{label:"Running",value:t.running?"yes":"no",kind:t.running?"success":"idle"}),(0,Bt.jsx)(en,{label:"Heartbeat",value:ktt(t.status?.last_heartbeat_at),kind:t.heartbeat_fresh?"success":"idle"}),(0,Bt.jsx)(en,{label:"Last upload",value:ktt(t.status?.last_success_at)}),t.status?.last_error?(0,Bt.jsx)(en,{label:"Last error",value:t.status.last_error,kind:"error"}):null]})}function Nrn({identity:e,skills:t}){return e.state==="loading"?(0,Bt.jsx)(Ha,{label:"loading your account\u2026"}):e.state==="logged_out"?(0,Bt.jsxs)(Ee,{flexDirection:"column",children:[(0,Bt.jsx)(en,{label:"Status",value:"signed out",kind:"warning"}),(0,Bt.jsx)(he,{color:xe.muted,children:"Choose \u201CSign in\u201D below to authorise this CLI."})]}):e.state==="error"?(0,Bt.jsxs)(Ee,{flexDirection:"column",children:[(0,Bt.jsx)(en,{label:"Status",value:"error",kind:"error"}),(0,Bt.jsx)(he,{color:xe.danger,children:e.message})]}):(0,Bt.jsxs)(Ee,{flexDirection:"column",children:[(0,Bt.jsx)(en,{label:"User",value:e.email,kind:"success"}),(0,Bt.jsx)(en,{label:"Display name",value:e.displayName}),(0,Bt.jsx)(en,{label:"Workspace",value:e.activeOrganizationName??"\u2014",kind:e.activeOrganizationName?"info":"idle"}),(0,Bt.jsx)(en,{label:"Other workspaces",value:Math.max(0,e.organizations.length-1)}),(0,Bt.jsx)(en,{label:"Skills",value:wrn(t)})]})}function wrn(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 Brn(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 ktt(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`}A();await ho();await RA();await xA();Ps();var ai=ue(Ht(),1),krn=[{id:"login",label:"Sign in to Lore",description:"opens your browser for a device-code flow"},{id:"quit",label:"Quit",description:"exit without signing in"}];function b5({cliVersion:e,onSelect:t}){let{exit:n}=Os();return Ru((r,o)=>{(r==="q"||o.ctrl&&r==="c"||o.escape)&&(t("quit"),n())}),(0,ai.jsxs)(Ee,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,ai.jsx)(Ms,{title:"lore",subtitle:"welcome",right:`v${e}`}),(0,ai.jsx)(Qn,{title:"What is Lore?",children:(0,ai.jsxs)(Ee,{flexDirection:"column",children:[(0,ai.jsx)(he,{children:"Lore captures your Claude Code, Codex, and Cowork sessions and shares them with your team \u2014 searchable, discussable, and remixable."}),(0,ai.jsxs)(Ee,{marginTop:1,flexDirection:"column",children:[(0,ai.jsx)(he,{color:xe.muted,children:"You'll get:"}),(0,ai.jsxs)(he,{children:[(0,ai.jsx)(he,{color:xe.success,children:" \u2713"})," Background auto-upload of every Claude Code session"]}),(0,ai.jsxs)(he,{children:[(0,ai.jsx)(he,{color:xe.success,children:" \u2713"})," One-command share for Codex rollouts and Cowork sessions"]}),(0,ai.jsxs)(he,{children:[(0,ai.jsx)(he,{color:xe.success,children:" \u2713"})," Skill publishing and discovery across your workspace"]}),(0,ai.jsxs)(he,{children:[(0,ai.jsx)(he,{color:xe.success,children:" \u2713"})," Thread search, dashboards, and discussion"]})]})]})}),(0,ai.jsx)(Ee,{marginTop:1,children:(0,ai.jsx)(Qn,{title:"Sign in to continue",subtitle:"\u2191/\u2193 or j/k \xB7 Enter to choose \xB7 q to quit",children:(0,ai.jsx)(_1,{items:krn,onSelect:r=>{t(r.id),n()}})})}),(0,ai.jsx)(Ee,{marginTop:1,children:(0,ai.jsxs)(he,{color:xe.muted,children:["New to Lore? Run ",(0,ai.jsx)(he,{bold:!0,children:"lore --help"})," any time for the command reference."]})})]})}var I5=ue(Ht(),1),Orn={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 Prn({cliVersion:e,deps:t,onSelect:n}){let[r,o]=(0,C5.useState)(void 0),{exit:i}=Os();return(0,C5.useEffect)(()=>{let s=!1;return(async()=>{let[u,l,f,h]=await Promise.all([_5(t),E5(t),y5(t),S5()]);s||o({identity:u,daemon:l,skills:f,uploadDirs:h})})(),()=>{s=!0}},[]),r?r.identity.state==="logged_out"?(0,I5.jsx)(b5,{cliVersion:e,onSelect:s=>{n(s),i()}}):(0,I5.jsx)(Qy,{cliVersion:e,initialData:r,onSelect:n}):null}async function Ott(){let e="quit";return await cl((0,I5.jsx)(Prn,{cliVersion:hu(),deps:{},onSelect:n=>{e=n}})).waitUntilExit(),{action:e,rawArgs:Orn[e]}}A();await fb();A();await ho();var e2=ue(dn(),1);await RA();await xA();Ps();A();await ho();await dde();await RA();await Ab();await xA();await mde();A();await ho();Ps();var E1=ue(Ht(),1),Mrn="\u2588",Lrn="\u2591";function Ptt({value:e,width:t=24,label:n,color:r=xe.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,E1.jsxs)(Ee,{children:[(0,E1.jsx)(he,{color:r,children:Mrn.repeat(i)}),(0,E1.jsx)(he,{color:xe.muted,children:Lrn.repeat(s)}),n?(0,E1.jsxs)(he,{color:xe.muted,children:[" ",n]}):null]})}await gb();await hb();await pde();await yde();await bde();A();await ho();await RA();await Ab();await xA();await gb();Ps();var _o=ue(Ht(),1),Ltt=[{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 KM(){return{steps:Ltt.map(({key:e,label:t})=>({key:e,label:t,status:"pending"}))}}function v5(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?`${Mtt(n.key)} (${t.label})`:Mtt(n.key)}:n.status==="active"?{...n,status:"done"}:n)}}function Mtt(e){return Ltt.find(t=>t.key===e)?.label??e}function xh({title:e,subtitle:t,state:n}){return(0,_o.jsxs)(Ee,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,_o.jsx)(Ms,{title:e,subtitle:t}),(0,_o.jsx)(Qn,{title:"Pipeline",children:(0,_o.jsx)(Ee,{flexDirection:"column",children:n.steps.map(r=>(0,_o.jsx)(Urn,{step:r},r.key))})}),n.result?(0,_o.jsx)(Ee,{marginTop:1,flexDirection:"column",children:(0,_o.jsx)(Ls,{kind:"success",title:n.result.reused?"Already on Lore":"Shared",children:(0,_o.jsxs)(Ee,{flexDirection:"column",children:[(0,_o.jsx)(he,{children:n.result.url}),(0,_o.jsx)(Ee,{marginTop:1,children:(0,_o.jsxs)(he,{color:xe.muted,children:[n.result.clipboardCopied?"Copied to clipboard. ":"",n.result.visibility?`Visibility: ${n.result.visibility}.`:""]})})]})})}):null,n.errorMessage?(0,_o.jsx)(Ee,{marginTop:1,children:(0,_o.jsx)(Ls,{kind:"error",title:"Failed",children:(0,_o.jsx)(he,{children:n.errorMessage})})}):null]})}function Urn({step:e}){return e.status==="active"?(0,_o.jsxs)(Ee,{children:[(0,_o.jsx)(Ha,{}),(0,_o.jsx)(he,{children:" "}),(0,_o.jsx)(he,{color:xe.primary,children:e.label})]}):e.status==="done"?(0,_o.jsxs)(Ee,{children:[(0,_o.jsx)(he,{color:xe.success,children:"\u2713 "}),(0,_o.jsx)(he,{color:xe.muted,children:e.label})]}):(0,_o.jsxs)(Ee,{children:[(0,_o.jsx)(he,{color:xe.muted,children:"\u25CB "}),(0,_o.jsx)(he,{color:xe.muted,children:e.label})]})}Ps();A();var JM=Date.parse("2026-05-16T12:00:00.000Z");function ZM(e){return new Date(JM-e*6e4).toISOString()}var Kf={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"},Utt=[{id:"tanagram/lore",label:"tanagram/lore",kind:"repo",sessionCount:18,lastUsedAtMs:JM-7*6e4},{id:"acme/customer-demo",label:"acme/customer-demo",kind:"repo",sessionCount:6,lastUsedAtMs:JM-42*6e4},{id:"acme/integration",label:"acme/integration",kind:"repo",sessionCount:3,lastUsedAtMs:JM-180*6e4},{id:"__custom_repo_path__:/Users/alex/notes",label:"/Users/alex/notes",kind:"dir",sessionCount:1,lastUsedAtMs:JM-1560*6e4}],Qrn=["/Users/alex/code/tanagram-lore","/Users/alex/work/acme-integration"],y1={label:"ai.tanagram.lore",enabled:!0,loaded:!0,running:!0,healthy:!0,health:"running",heartbeat_fresh:!0,plist_path:Kf.plist,binary_path:Kf.binary,status_path:Kf.status,daemon_status_path:"/Users/alex/.lore/daemon_status.json",install_source_path:Kf.installSource,subsystems:{threads:{name:"threads",healthy:!0,health:"running",heartbeat_fresh:!0},skills:{name:"skills",healthy:!0,health:"running",heartbeat_fresh:!0}},status:{version:"0.1.0",pid:4242,state:"idle",auth:"logged_in",started_at:ZM(60),last_heartbeat_at:ZM(1),last_success_at:ZM(5),last_completed_at:ZM(5),last_thread_ids:["thr_01hx_story"]}},Qtt={...y1,running:!1,healthy:!1,health:"stale",heartbeat_fresh:!1,subsystems:{threads:{name:"threads",healthy:!1,health:"stale",heartbeat_fresh:!1},skills:{name:"skills",healthy:!0,health:"running",heartbeat_fresh:!0}},status:{...y1.status,state:"error",last_heartbeat_at:ZM(17),last_error:"upload failed: HTTP 503 from /api/upload-session"}},Frn={...y1,enabled:!1,loaded:!1,running:!1,healthy:!1,health:"disabled",heartbeat_fresh:!1,subsystems:{threads:{name:"threads",healthy:!1,health:"disabled",heartbeat_fresh:!1},skills:{name:"skills",healthy:!1,health:"disabled",heartbeat_fresh:!1}},status:void 0},Grn={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"},WM={identity:Grn,daemon:{state:"ready",report:y1},skills:{state:"ready",count:9,published:4},uploadDirs:{state:"ready",cwd:Qrn,repo:[]}},Ftt={...WM,uploadDirs:{state:"ready",cwd:[],repo:[]}},Gtt={...WM,daemon:{state:"error",message:"launchctl print failed: service not found"}},jtt={...WM,daemon:{state:"unsupported",platform:"linux"}},ztt={identity:{state:"logged_out"},daemon:{state:"ready",report:Frn},skills:{state:"logged_out"},uploadDirs:{state:"ready",cwd:[],repo:[]}},Htt=["/Users/alex/code/tanagram-lore","/Users/alex/code/customer-demo","/Users/alex/code/internal-tools"];var yt=ue(Ht(),1),io=()=>{};function Fy(...e){return e.reduce(U$,oM())}function XM(...e){return e.reduce(v5,KM())}var MA=[{id:"onboarding/welcome/default",title:"Welcome",path:["TUI","Screens","Onboarding","Welcome"],description:"First-run value prop and sign-in CTA.",render:()=>(0,yt.jsx)(b5,{cliVersion:"0.1.0",onSelect:io})},{id:"onboarding/login/initialising",title:"Login / initialising",path:["TUI","Screens","Onboarding","Login"],description:"Device-code request is in flight.",render:()=>(0,yt.jsx)(wp,{state:oM()})},{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)(wp,{state:Fy({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)(wp,{state:Fy({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)(wp,{state:Fy({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)(wp,{state:Fy({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:Kf.plist,binaryPath:Kf.binary,logFile:Kf.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)(wp,{state:Fy({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)(wp,{state:Fy({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)(wp,{state:Fy({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)(wp,{state:Fy({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:io,onSkip:io})},{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:Utt,now:Date.parse("2026-05-16T12:00:00.000Z"),organizationName:"Tanagram"},onSubmit:io,onSkip:io})},{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:io,onSkip:io})},{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:io,onSkip:io})},{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:io,onSkip:io})},{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:io,onSkip:io})},{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:io,onSkip:io})},{id:"dashboard/healthy",title:"Dashboard / healthy",path:["TUI","Screens","Dashboard"],description:"Signed in, daemon healthy, upload repos configured.",render:()=>(0,yt.jsx)(Qy,{cliVersion:"0.1.0",initialData:WM,onSelect:io})},{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)(Qy,{cliVersion:"0.1.0",initialData:Ftt,onSelect:io})},{id:"dashboard/daemon-error",title:"Dashboard / daemon error",path:["TUI","Screens","Dashboard"],description:"Daemon panel surfaces a launchctl failure.",render:()=>(0,yt.jsx)(Qy,{cliVersion:"0.1.0",initialData:Gtt,onSelect:io})},{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)(Qy,{cliVersion:"0.1.0",initialData:jtt,onSelect:io})},{id:"dashboard/signed-out",title:"Dashboard / signed out",path:["TUI","Screens","Dashboard"],description:"Signed-out dashboard snapshot.",render:()=>(0,yt.jsx)(Qy,{cliVersion:"0.1.0",initialData:ztt,onSelect:io})},{id:"sharing/initial",title:"Share flow / initial",path:["TUI","Screens","Sharing"],description:"All pipeline steps pending.",render:()=>(0,yt.jsx)(xh,{title:"lore share-codex",subtitle:"sharing this Codex session",state:KM()})},{id:"sharing/uploading",title:"Share flow / uploading",path:["TUI","Screens","Sharing"],description:"Upload step active with a progress label.",render:()=>(0,yt.jsx)(xh,{title:"lore share-codex",subtitle:"sharing this Codex session",state:XM({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)(xh,{title:"lore export",subtitle:"sharing your latest Claude Code session",state:XM({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)(xh,{title:"lore share-codex",state:XM({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)(xh,{title:"lore share-cowork",state:XM({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)(xh,{title:"lore export",state:XM({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)(Cy,{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)(Cy,{mode:"enable",state:{phase:"finished",result:{plistPath:Kf.plist,binaryPath:Kf.binary,logFile:Kf.logFile}}})},{id:"daemon/run/disable-success",title:"Daemon run / disable success",path:["TUI","Screens","Daemon","Run"],description:"Disable success copy.",render:()=>(0,yt.jsx)(Cy,{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)(Cy,{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)(Cy,{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)(uM,{report:y1})},{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)(uM,{report:Qtt})},{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)(Ms,{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:xe.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)(en,{label:"Healthy",value:"yes",kind:"success"}),(0,yt.jsx)(en,{label:"Warning",value:"needs attention",kind:"warning"}),(0,yt.jsx)(en,{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)(Ptt,{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)(Ls,{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)(Ls,{kind:"error",title:"Failed",children:(0,yt.jsx)(he,{color:xe.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)(Ha,{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)(_1,{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:io})})},{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)(nM,{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:io,onAction:io})})},{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)(k$,{initialValue:"~/code",onSubmit:io,onCancel:io})})},{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)(O$,{initialValue:"/Users/alex/code",loadSuggestions:async()=>Htt,onSubmit:io,onCancel:io})})}];function $tt(e){return MA.find(t=>t.id===e)}function S1(e){return e.path.slice(1).join(" / ")}var Hr=ue(Ht(),1);function Vtt({initialStoryId:e}){let t=Math.max(0,MA.findIndex(f=>f.id===e)),[n,r]=(0,e2.useState)(t),[o,i]=(0,e2.useState)("sidebar"),s=(0,e2.useRef)(o);s.current=o;let{exit:u}=Os();Ru((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(_=>qtt(_-1));return}(h.downArrow||f==="j")&&r(_=>qtt(_+1))}});let l=MA[n]??MA[0];return(0,Hr.jsxs)(Ee,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,Hr.jsx)(Ms,{title:"lore TUI stories",subtitle:"terminal story runner",right:`${n+1}/${MA.length}`}),(0,Hr.jsx)(Ee,{marginBottom:1,children:(0,Hr.jsx)(he,{color:xe.muted,children:"\u2191/\u2193 or j/k select stories \xB7 Tab focuses preview \xB7 Shift+Tab/Esc returns \xB7 q exits from sidebar"})}),(0,Hr.jsxs)(Ee,{flexDirection:"row",gap:2,children:[(0,Hr.jsx)(Ee,{width:36,flexShrink:0,children:(0,Hr.jsx)(Qn,{title:"Stories",subtitle:o==="sidebar"?"focused":void 0,focused:o==="sidebar",children:(0,Hr.jsx)(jrn,{stories:MA,selectedIndex:n,focused:o==="sidebar"})})}),(0,Hr.jsx)(Ee,{flexDirection:"column",flexGrow:1,flexShrink:1,children:(0,Hr.jsx)(Qn,{title:l.title,focused:o==="preview",subtitle:o==="preview"?`${S1(l)} \xB7 focused`:S1(l),children:(0,Hr.jsxs)(Ee,{flexDirection:"column",children:[(0,Hr.jsx)(he,{color:xe.muted,children:l.description}),o==="sidebar"?(0,Hr.jsxs)(he,{color:xe.muted,children:["Press ",(0,Hr.jsx)(he,{bold:!0,children:"Tab"})," to interact with this preview."]}):null,(0,Hr.jsx)(Ee,{marginTop:1,children:l.render()})]})})})]})]})}function jrn({stories:e,selectedIndex:t,focused:n}){let r=[],o=[];return e.forEach((i,s)=>{let u=i.path.slice(1),l=Vrn(o,u);for(let f=l;f<u.length;f++)r.push((0,Hr.jsx)(zrn,{label:u[f]??"",level:f,marginTop:qrn(u[f]??"",f,l),focused:n},`group:${u.slice(0,f+1).join("/")}`));r.push((0,Hr.jsx)(Hrn,{story:i,selected:s===t,focused:n},i.id)),o=u}),(0,Hr.jsx)(Ee,{flexDirection:"column",children:r})}function zrn({label:e,level:t,marginTop:n,focused:r}){return(0,Hr.jsx)(Ee,{marginLeft:Ytt(t),marginTop:n,children:(0,Hr.jsx)(he,{color:r?xe.primary:xe.muted,bold:r,wrap:"truncate-end",children:e})})}function Hrn({story:e,selected:t,focused:n}){let r=n?t?xe.accent:xe.highlight:xe.muted;return(0,Hr.jsxs)(Ee,{marginLeft:Ytt(e.path.slice(1).length),children:[(0,Hr.jsx)(he,{color:n&&t?xe.accent:xe.muted,children:t?"\u203A ":" "}),(0,Hr.jsx)(he,{color:r,bold:n&&t,wrap:"truncate-end",children:$rn(e)})]})}function $rn(e){let t=e.title.split(" / ");return t.length>1?t.slice(1).join(" / "):e.path.at(-1)===e.title?"Default":e.title}function Ytt(e){return Math.min(e,4)}function qrn(e,t,n){return t===0?e==="Components"?1:0:t===1&&t===n?1:0}function Vrn(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 qtt(e){let t=MA.length;return(e%t+t)%t}function Ktt({story:e}){let{exit:t}=Os();return Ru((n,r)=>{(r.ctrl&&n==="c"||r.escape)&&t()}),(0,Hr.jsxs)(Ee,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,Hr.jsx)(Ms,{title:e.title,subtitle:S1(e),right:"Esc to exit"}),(0,Hr.jsx)(Ee,{marginBottom:1,children:(0,Hr.jsx)(he,{color:xe.muted,children:e.description})}),e.render()]})}var Jfe=ue(Ht(),1),Jtt={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){Yrn();return}if(typeof e.story=="string"&&e.story.trim().length>0){let n=$tt(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 cl((0,Jfe.jsx)(Ktt,{story:n})).waitUntilExit();return}await cl((0,Jfe.jsx)(Vtt,{})).waitUntilExit()}};function Yrn(){for(let e of MA)console.log(`${e.id} ${S1(e)} ${e.title}`)}A();yr();mn();var Ztt={meta:{name:"backfill-artifacts",description:"Upload artifact files (uploads/ and outputs/) for Cowork sessions already shared to Lore, so they show up in the Artifacts tab. Re-uploads bytes from this machine; only sessions that already have a Lore thread are touched."},args:{"dry-run":{type:"boolean",description:"List what would be uploaded without uploading anything."}},async run({args:e,data:t}){let n=!!e["dry-run"];z.info("command_start",{command:"backfill-artifacts",dry_run:n});let r=t?.client??Ct(),o=l5(),i=Ly(o);if(i.length===0){console.log(`No Cowork sessions found under ${o}`);return}let s=0,u=0,l=0,f=0;for(let h of i){let{artifactFiles:_,tempPaths:E}=await jfe(h.localDir);try{if(_.length===0){f+=1;continue}if(n){console.log(`${h.sessionId}: ${_.length} artifact file(s) ready to upload`);continue}let T=await r.presignBackfillArtifacts({body:{harness:"cowork",harness_internal_id:h.sessionId,artifact_files:_.map(x=>({kind:x.kind,file_name:x.fileName,md5:x.md5,size_in_bytes:x.sizeInBytes,content_type:x.contentType}))}});if(T.status===404){l+=1;continue}if(T.status!==200){console.error(`${h.sessionId}: presign failed (${T.status})`);continue}let v=[];for(let x of T.body.artifact_files){let k=_.find(P=>P.kind===x.kind&&P.fileName===x.file_name);!k||!x.presigned_url||(await ZKe(x.presigned_url,k.tempPath),v.push({kind:x.kind,file_name:x.file_name,storage_url:x.storage_url,md5:k.md5,size_in_bytes:k.sizeInBytes,content_type:k.contentType}))}if(v.length===0)continue;let R=await r.commitBackfillArtifacts({body:{harness:"cowork",harness_internal_id:h.sessionId,artifacts:v}});if(R.status!==200){console.error(`${h.sessionId}: commit failed (${R.status})`);continue}s+=R.body.created,u+=1,console.log(`${h.sessionId}: backfilled ${R.body.created} artifact(s)`)}finally{await Promise.all(E.map(T=>Ac(T)))}}if(n){console.log(`Dry run complete. ${f} session(s) had no artifact files.`);return}console.log(`Done. Backfilled ${s} artifact(s) across ${u} thread(s). Skipped ${l} not-yet-shared session(s) and ${f} with no artifact files.`)}};A();mn();ry();A();await ho();var R5=ue(dn(),1);await fb();var Zfe=ue(Ht(),1);function Krn({title:e,subtitle:t,perform:n,onResolve:r,onReject:o}){let[i,s]=(0,R5.useState)(KM),{exit:u}=Os();return(0,R5.useEffect)(()=>{let l=!1,f=h=>{l||s(_=>v5(_,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,Zfe.jsx)(xh,{title:e,subtitle:t,state:i})}async function T1(e){let t,n,r=!1;if(await cl((0,Zfe.jsx)(Krn,{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}A();ex();yr();import ton from"node:os";import ent from"node:path";A();import{spawn as Jrn}from"node:child_process";import Zrn from"node:os";async function Wtt(e,t={}){let n=t.timeoutMs??2e3,r=Wrn();for(let o of r)if(await Xrn(o,e,n))return!0;return!1}function Wrn(){switch(Zrn.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 Xrn(e,t,n){return new Promise(r=>{let o;try{o=Jrn(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)})}zt();mn();JP();yh();A();var b1=()=>{};A();mn();async function eon(e,t,n){let r=await e.resolveThreadShareHighlight({params:{id:t},body:{query:n}});if(r.status!==200)throw Bp(`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 x5(e,t,n){try{return await eon(e,t,n)}catch(r){return z.warn("share_highlight_resolution_failed",{thread_id:t,error:r instanceof Error?r.message:String(r)}),null}}A();zt();function Xtt(e){if(e instanceof Jx)return"billing_required";if(e instanceof iM)return e.status>=500&&e.status<600?"server_5xx":e.status>=400&&e.status<500?"server_4xx":"s3_error";if(e instanceof Re)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 non=new Set(["private","workspace","public"]);function ron(e){let t=(e??"").trim();if(!t)return"";if(!non.has(t))throw new Re(`invalid --visibility "${e}": use one of private, workspace, public`);return t}async function Wfe(e={}){let t=e.progress??b1,n=ron(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 Net({sessionId:o,project:r});i="auth",await uon();let l=e.client??Ct();i="collecting_local_file",s=await oon(u),t({kind:"step",step:"uploading",label:s.filename}),i="uploading";let f=await ion(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;z.info("export_upload_single_file_result",{filename:s.filename,reused:h,response:JSON.stringify(_)});let E=_?.id?.trim();if(!E)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 ZD(l,E);let T=_?.visibility?.trim()??"",v=T;n&&n!==T&&(i="updating_visibility",t({kind:"step",step:"updating_visibility"}),v=await son(l,E,n));let R=aon(E),x,k=e.highlight?.trim();if(k){i="resolving_highlight",t({kind:"step",step:"resolving_highlight"});let j=await x5(l,E,k);j&&(R=j.url,x={query:k,matched:j.matched,start_block_id:j.start_block_id,end_block_id:j.end_block_id})}let P=await Wtt(R);return t({kind:"completed",url:R,reused:h,visibility:v,clipboardCopied:P,sessionId:u.sessionId?.trim()??""}),t({kind:"step",step:"done"}),bh("lore.cli.thread_exported",{thread_id:E,harness:s.harness,visibility:v,reused:h}),{thread_id:E,url:R,session_id:u.sessionId?.trim()??"",project:u.project,reused:h,visibility:v,clipboard_copied:P,...x?{highlight:x}:{}}}catch(u){throw bh("lore.cli.upload_failed",{error_category:Xtt(u),error_message:jt(u),step:i}),u}finally{s&&await Ac(s.tempPath)}}async function oon(e){let t=await wet(e),n=await qi(t.fullPath);if(!n.exists)throw new Re(`session transcript not found at ${con(t.fullPath)} \u2014 the file may have been rotated or pruned`);let r=await Dp(e.project),o=await dl(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 ion(e,t){let[n]=await kA(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 Re(`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 son(e,t,n){let r=await e.updateThread({params:{id:t},body:{visibility:n}});if(r.status!==200)throw Bp(`set thread ${t} visibility`,r.status,r.body);return r.body.visibility}function aon(e){return`${Ty().replace(/\/+$/,"")}/thread/${e}`}async function uon(){let e=await Gt();if(!e)throw new Re("not logged in \u2014 run 'lore login' first");return e}function con(e){let t=ton.homedir();if(!t)return e;let n=ent.relative(t,e);return!n||n.startsWith("..")?e:ent.join("~",n)}var tnt={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}){z.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(Cu()&&!t?.progress){let o=await T1({title:"lore export",subtitle:"uploading the most recent Claude Code session",perform:i=>Wfe({...n,progress:i})});"quarantined"in o&&o.quarantined&&console.log(`
|
|
659
659
|
Held locally \u2014 not uploaded. ${o.finding_count} finding(s); reason: ${o.reason}. See \`lore quarantine\`.`);return}let r=await Wfe({...n,progress:t?.progress});console.log(JSON.stringify(r,null,2))}};A();var nnt={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 n5(),await p5({uploadOptions:n});return}let r=await zet(n);console.log(JSON.stringify(r))}};A();ry();A();yr();import{spawn as lon}from"node:child_process";import rnt from"node:path";async function Xfe(e){let t=e.progress??b1;if(!await Gt())throw new g1;t({kind:"step",step:"resolving_session"});let r=rnt.resolve(e.sessionFile),o=rnt.basename(r),i=e.harnessInternalId?.trim()||mon(o)||o,s=await qi(r);if(!s.exists)throw new Error(`session file does not exist: ${r}`);let u=await dl(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??Ct();try{t({kind:"step",step:"uploading",label:o});let[h]=await kA(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",E=h.thread,T=E?.id?.trim();if(!T)throw new Error("upload session did not return a thread id");t({kind:"step",step:"parsing"}),await ZD(f,T);let v=E?.visibility?.trim()??"",R=v,x=e.visibility;x&&x!==v&&(t({kind:"step",step:"updating_visibility"}),R=await don(f,T,x));let k=`${Ty().replace(/\/+$/,"")}/thread/${T}`,P,j=e.highlight?.trim();if(j){t({kind:"step",step:"resolving_highlight"});let V=await x5(f,T,j);V&&(k=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 Aon(k),$=fon(R)?R:"private";return t({kind:"completed",url:k,reused:_,visibility:$,clipboardCopied:G,sessionId:i}),t({kind:"step",step:"done"}),{thread_id:T,url:k,session_id:i,project:"",reused:_,visibility:$,clipboard_copied:G,...P?{highlight:P}:{}}}finally{await Ac(u.tempPath)}}async function don(e,t,n){let r=await e.updateThread({params:{id:t},body:{visibility:n}});if(r.status!==200)throw Bp(`update thread ${t} visibility`,r.status,r.body);return r.body.visibility}var pon=new Set(["private","workspace","public"]);function fon(e){return pon.has(e)}function mon(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 Aon(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 gon(n,r,e))return!0;return!1}function gon(e,t,n){return new Promise(r=>{let o;try{o=lon(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 ont=["private","workspace","public"],int={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=hon(e.visibility);if(Cu()){let r=await T1({title:"lore share-codex",subtitle:"sharing this Codex session",perform:o=>Xfe({sessionFile:t,harness:"codex",visibility:n,highlight:typeof e.highlight=="string"?e.highlight:void 0,progress:o})});"quarantined"in r&&r.quarantined&&console.log(`
|
|
660
660
|
Held locally \u2014 not uploaded. ${r.finding_count} finding(s); reason: ${r.reason}. See \`lore quarantine\`.`)}else{let r=await Xfe({sessionFile:t,harness:"codex",visibility:n,highlight:typeof e.highlight=="string"?e.highlight:void 0});console.log(JSON.stringify(r))}}};function hon(e){if(!(e==null||e==="")){if(typeof e!="string")throw new Error("--visibility must be a string");if(!ont.includes(e))throw new Error(`--visibility must be one of: ${ont.join(", ")}`);return e}}A();yr();mn();ry();A();async function eme(e,t,n={}){let r=n.progress??b1,{contents:o,accountId:i,orgId:s,sessionId:u}=t;r({kind:"step",step:"resolving_session",label:u});let l=await $$("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 kA(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 Ac(l.tempPath)}}var snt={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}){z.info("command_start",{command:"share-cowork",list:!!e.list,session:e.session??null});let n=u5();if(e.list){let f=Ly(n);if(f.length===0){console.error(`No Cowork sessions found under ${n}`);return}for(let h of f)console.log(Eon(h));return}let r=_on(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
|
|
661
661
|
${n}
|