@loreai/gateway 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.cjs +27 -0
- package/dist/index.cjs +1058 -0
- package/dist/index.d.cts +21 -0
- package/package.json +10 -10
- package/dist/index.js +0 -50087
- package/src/auth.ts +0 -133
- package/src/batch-queue.ts +0 -575
- package/src/cache-analytics.ts +0 -344
- package/src/cli/agents.ts +0 -107
- package/src/cli/bin.ts +0 -11
- package/src/cli/help.ts +0 -55
- package/src/cli/lib/binary.ts +0 -353
- package/src/cli/lib/bspatch.ts +0 -306
- package/src/cli/lib/delta-upgrade.ts +0 -790
- package/src/cli/lib/errors.ts +0 -48
- package/src/cli/lib/ghcr.ts +0 -389
- package/src/cli/lib/patch-cache.ts +0 -342
- package/src/cli/lib/upgrade.ts +0 -454
- package/src/cli/lib/version-check.ts +0 -385
- package/src/cli/main.ts +0 -152
- package/src/cli/run.ts +0 -181
- package/src/cli/start.ts +0 -82
- package/src/cli/upgrade.ts +0 -311
- package/src/cli/version.ts +0 -22
- package/src/compaction.ts +0 -195
- package/src/config.ts +0 -199
- package/src/idle.ts +0 -240
- package/src/index.ts +0 -41
- package/src/llm-adapter.ts +0 -182
- package/src/pipeline.ts +0 -1681
- package/src/recall.ts +0 -433
- package/src/recorder.ts +0 -192
- package/src/server.ts +0 -250
- package/src/session.ts +0 -207
- package/src/stream/anthropic.ts +0 -708
- package/src/temporal-adapter.ts +0 -310
- package/src/translate/anthropic.ts +0 -469
- package/src/translate/openai.ts +0 -536
- package/src/translate/types.ts +0 -222
- package/src/worker-model.ts +0 -408
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,1058 @@
|
|
|
1
|
+
"use strict";var WAe=Object.create;var wT=Object.defineProperty;var KAe=Object.getOwnPropertyDescriptor;var ZAe=Object.getOwnPropertyNames;var JAe=Object.getPrototypeOf,XAe=Object.prototype.hasOwnProperty;var E=(e,t)=>()=>(e&&(t=e(e=0)),t);var A=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ht=(e,t)=>{for(var n in t)wT(e,n,{get:t[n],enumerable:!0})},Jz=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ZAe(t))!XAe.call(e,r)&&r!==n&&wT(e,r,{get:()=>t[r],enumerable:!(o=KAe(t,r))||o.enumerable});return e};var U=(e,t,n)=>(n=e!=null?WAe(JAe(e)):{},Jz(t||!e||!e.__esModule?wT(n,"default",{value:e,enumerable:!0}):n,e)),Xv=e=>Jz(wT({},"__esModule",{value:!0}),e);var QAe,eye,tye,nye,l=E(()=>{"use strict";if(typeof globalThis.Bun>"u"){let r=function(c){let u=e.createServer(async(d,p)=>{try{let f=`http://${c.hostname}:${c.port}${d.url}`,m=d.method==="GET"||d.method==="HEAD"?null:t.toWeb(d),_=new Request(f,{method:d.method,headers:d.headers,body:m,duplex:"half"}),h=await c.fetch(_),T=[];if(h.headers.forEach((S,y)=>{T.push([y,S])}),p.writeHead(h.status,Object.fromEntries(T)),h.body){let S=h.body.getReader();try{for(;;){let{done:y,value:v}=await S.read();if(y)break;p.write(v)}}finally{S.releaseLock()}}p.end()}catch(f){console.error("[lore] polyfill: request handler error:",f),p.headersSent||p.writeHead(500,{"content-type":"application/json"}),p.end(JSON.stringify({error:"Internal server error"}))}});return u.listen(c.port,c.hostname),{stop:()=>u.close(),get port(){let d=u.address();return typeof d=="object"&&d!==null?d.port:c.port}}},i=function(c){return n.zstdCompressSync(c)},s=function(c){return n.zstdDecompressSync(c)},a=function(c){try{let u=process.platform==="win32"?"where":"which";return o.execFileSync(u,[c],{encoding:"utf8",stdio:["pipe","pipe","pipe"]}).trim().split(`
|
|
2
|
+
`)[0]||null}catch{return null}};QAe=r,eye=i,tye=s,nye=a;let e=require("node:http"),{Readable:t}=require("node:stream"),n=require("node:zlib"),o=require("node:child_process");globalThis.Bun={serve:r,zstdCompressSync:i,zstdDecompressSync:s,which:a,main:null}}});var w,qe=E(()=>{l();w=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__});var Ee,An=E(()=>{l();Ee=globalThis});var ve,DT=E(()=>{l();ve="10.52.0"});function kn(){return va(Ee),Ee}function va(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||ve,t[ve]=t[ve]||{}}function Jo(e,t,n=Ee){let o=n.__SENTRY__=n.__SENTRY__||{},r=o[ve]=o[ve]||{};return r[e]||(r[e]=t())}var fo=E(()=>{l();DT();An()});function bt(e){if(!("console"in Ee))return e();let t=Ee.console,n={},o=Object.keys(Xo);o.forEach(r=>{let i=Xo[r];n[r]=t[r],t[r]=i});try{return e()}finally{o.forEach(r=>{t[r]=n[r]})}}function oye(){eP().enabled=!0}function iye(){eP().enabled=!1}function Xz(){return eP().enabled}function sye(...e){Qv("log",...e)}function aye(...e){Qv("warn",...e)}function cye(...e){Qv("error",...e)}function Qv(e,...t){w&&Xz()&&bt(()=>{Ee.console[e](`${rye}[${e}]:`,...t)})}function eP(){return w?Jo("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var uu,rye,Xo,b,De=E(()=>{l();fo();qe();An();uu=["debug","info","warn","error","log","assert","trace"],rye="Sentry Logger ",Xo={};b={enable:oye,disable:iye,isEnabled:Xz,log:sye,warn:aye,error:cye}});function UT(...e){let t=e.sort((n,o)=>n[0]-o[0]).map(n=>n[1]);return(n,o=0,r=0)=>{let i=[],s=n.split(`
|
|
3
|
+
`);for(let a=o;a<s.length;a++){let c=s[a];c.length>1024&&(c=c.slice(0,1024));let u=Qz.test(c)?c.replace(Qz,"$1"):c;if(!u.includes("Error: ")){for(let d of t){let p=d(u);if(p){i.push(p);break}}if(i.length>=50+r)break}}return tq(i.slice(r))}}function nP(e){return Array.isArray(e)?UT(...e):e}function tq(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(kT(t).function||"")&&t.pop(),t.reverse(),eq.test(kT(t).function||"")&&(t.pop(),eq.test(kT(t).function||"")&&t.pop()),t.slice(0,50).map(n=>({...n,filename:n.filename||kT(t).filename,function:n.function||"?"}))}function kT(e){return e[e.length-1]||{}}function d_(e){try{return!e||typeof e!="function"?tP:e.name||tP}catch{return tP}}function $T(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}function nq(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}var Qz,eq,tP,Ed=E(()=>{l();Qz=/\(error: (.*)\)/,eq=/captureMessage|captureException/;tP="<anonymous>"});function lu(e,t){return p_[e]=p_[e]||[],p_[e].push(t),()=>{let n=p_[e];if(n){let o=n.indexOf(t);o!==-1&&n.splice(o,1)}}}function Ms(e,t){if(!rq[e]){rq[e]=!0;try{t()}catch(n){w&&b.error(`Error while instrumenting ${e}`,n)}}}function Ni(e,t){let n=e&&p_[e];if(n)for(let o of n)try{o(t)}catch(r){w&&b.error(`Error while triggering instrumentation handler.
|
|
4
|
+
Type: ${e}
|
|
5
|
+
Name: ${d_(o)}
|
|
6
|
+
Error:`,r)}}var p_,rq,f_=E(()=>{l();qe();De();Ed();p_={},rq={}});function oq(e){let t="error";lu(t,e),Ms(t,uye)}function uye(){rP=Ee.onerror,Ee.onerror=function(e,t,n,o,r){return Ni("error",{column:o,error:r,line:n,msg:e,url:t}),rP?rP.apply(this,arguments):!1},Ee.onerror.__SENTRY_INSTRUMENTED__=!0}var rP,iq=E(()=>{l();An();f_();rP=null});function sq(e){let t="unhandledrejection";lu(t,e),Ms(t,lye)}function lye(){oP=Ee.onunhandledrejection,Ee.onunhandledrejection=function(e){return Ni("unhandledrejection",e),oP?oP.apply(this,arguments):!0},Ee.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var oP,aq=E(()=>{l();An();f_();oP=null});function Oi(e){switch(cq.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Ci(e,Error)}}function BT(e,t){return cq.call(e)===`[object ${t}]`}function iP(e){return BT(e,"ErrorEvent")}function Pa(e){return BT(e,"String")}function xa(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function du(e){return e===null||xa(e)||typeof e!="object"&&typeof e!="function"}function Ls(e){return BT(e,"Object")}function sP(e){return typeof Event<"u"&&Ci(e,Event)}function aP(e){return typeof Element<"u"&&Ci(e,Element)}function cP(e){return BT(e,"RegExp")}function yn(e){return!!(e?.then&&typeof e.then=="function")}function uP(e){return Ls(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Ci(e,t){try{return e instanceof t}catch{return!1}}function m_(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}var cq,en=E(()=>{l();cq=Object.prototype.toString});function uq(e,t={}){if(!e)return"<unknown>";try{let n=e,o=5,r=[],i=0,s=0,a=" > ",c=a.length,u,d=Array.isArray(t)?t:t.keyAttrs,p=!Array.isArray(t)&&t.maxStringLength||pye;for(;n&&i++<o&&(u=fye(n,d),!(u==="html"||i>1&&s+r.length*c+u.length>=p));)r.push(u),s+=u.length,n=n.parentNode;return r.reverse().join(a)}catch{return"<unknown>"}}function fye(e,t){let n=e,o=[];if(!n?.tagName)return"";if(dye.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}o.push(n.tagName.toLowerCase());let r=t?.length?t.filter(i=>n.getAttribute(i)).map(i=>[i,n.getAttribute(i)]):null;if(r?.length)r.forEach(i=>{o.push(`[${i[0]}="${i[1]}"]`)});else{n.id&&o.push(`#${n.id}`);let i=n.className;if(i&&Pa(i)){let s=i.split(/\s+/);for(let a of s)o.push(`.${a}`)}}for(let i of["aria-label","type","name","title","alt"]){let s=n.getAttribute(i);s&&o.push(`[${i}="${s}"]`)}return o.join("")}var dye,pye,lq=E(()=>{l();en();An();dye=Ee,pye=80});function __(e,t,n){if(!(t in e))return;let o=e[t];if(typeof o!="function")return;let r=n(o);typeof r=="function"&&pu(r,o);try{e[t]=r}catch{w&&b.log(`Failed to replace method "${t}" in object`,e)}}function Ft(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{w&&b.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function pu(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,Ft(e,"__sentry_original__",t)}catch{}}function fu(e,t,n,o=!0){let r=e[t];if(typeof r!="function")throw new Error(`Cannot wrap method: ${t} is not a function`);if(ws(r))throw new Error(`Attempting to wrap method ${t} multiple times`);pu(n,r),Object.defineProperty(e,t,{writable:!0,configurable:!0,enumerable:o,value:n})}function ws(e){return e.__sentry_original__}function GT(e){if(Oi(e))return{message:e.message,name:e.name,stack:e.stack,...pq(e)};if(sP(e)){let t={type:e.type,target:dq(e.target),currentTarget:dq(e.currentTarget),...pq(e)};return typeof CustomEvent<"u"&&Ci(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function dq(e){try{return aP(e)?uq(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function pq(e){return typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e)):{}}function lP(e){let t=Object.keys(GT(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}var Rr=E(()=>{l();qe();lq();De();en()});function mu(e){if(Td!==void 0)return Td?Td(e):e();let t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=Ee;return t in n&&typeof n[t]=="function"?(Td=n[t],Td(e)):(Td=null,e())}function Ht(){return mu(()=>Math.random())}function mo(){return mu(()=>Date.now())}var Td,Ds=E(()=>{l();An()});function Ma(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function dP(e,t){let n=e,o=n.length;if(o<=150)return n;t>o&&(t=o);let r=Math.max(t-60,0);r<5&&(r=0);let i=Math.min(r+140,o);return i>o-5&&(i=o),i===o&&(r=Math.max(i-140,0)),n=n.slice(r,i),r>0&&(n=`'{snip} ${n}`),i<o&&(n+=" {snip}"),n}function pP(e,t){if(!Array.isArray(e))return"";let n=[];for(let o=0;o<e.length;o++){let r=e[o];try{m_(r)?n.push($T(r)):n.push(String(r))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function vi(e,t,n=!1){return Pa(e)?cP(t)?t.test(e):Pa(t)?n?e===t:e.includes(t):typeof t=="function"?t(e):!1:!1}function Pi(e,t=[],n=!1){return t.some(o=>vi(e,o,n))}var ks=E(()=>{l();en();Ed()});function mye(){let e=Ee;return e.crypto||e.msCrypto}function _ye(){return Ht()*16}function tn(e=mye()){try{if(e?.randomUUID)return mu(()=>e.randomUUID()).replace(/-/g,"")}catch{}return fP||(fP="10000000100040008000"+1e11),fP.replace(/[018]/g,t=>(t^(_ye()&15)>>t/4).toString(16))}function fq(e){return e.exception?.values?.[0]}function La(e){let{message:t,event_id:n}=e;if(t)return t;let o=fq(e);return o?o.type&&o.value?`${o.type}: ${o.value}`:o.type||o.value||n||"<unknown>":n||"<unknown>"}function _P(e,t,n){let o=e.exception=e.exception||{},r=o.values=o.values||[],i=r[0]=r[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function Sd(e,t){let n=fq(e);if(!n)return;let o={type:"generic",handled:!0},r=n.mechanism;if(n.mechanism={...o,...r,...t},t&&"data"in t){let i={...r?.data,...t.data};n.mechanism.data=i}}function mP(e){return parseInt(e||"",10)}function gP(e){let t=e.match(gye)||[],n=mP(t[1]),o=mP(t[2]),r=mP(t[3]);return{buildmetadata:t[5],major:isNaN(n)?void 0:n,minor:isNaN(o)?void 0:o,patch:isNaN(r)?void 0:r,prerelease:t[4]}}function jT(e){if(mq(e))return!0;try{Ft(e,"__sentry_captured__",!0)}catch{}return!1}function mq(e){try{return e.__sentry_captured__}catch{}}var fP,gye,xi=E(()=>{l();Rr();Ds();An();gye=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/});function Us(){return mo()/gq}function hye(){let{performance:e}=Ee;if(!e?.now||!e.timeOrigin)return Us;let t=e.timeOrigin;return()=>(t+mu(()=>e.now()))/gq}function _o(){return(_q??(_q=hye()))()}var gq,_q,Mi=E(()=>{l();Ds();An();gq=1e3});function hq(e){let t=_o(),n={sid:tn(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Eye(n)};return e&&$s(n,e),n}function $s(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||_o(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:tn()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Eq(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),$s(e,n)}function Eye(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}var VT=E(()=>{l();xi();Mi()});function wa(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let o={...e};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(o[r]=wa(o[r],t[r],n-1));return o}var FT=E(()=>{l()});function ln(){return tn()}function Un(){return tn().substring(16)}var Bs=E(()=>{l();xi()});function Da(e,t){t?Ft(e,hP,t):delete e[hP]}function Qo(e){return e[hP]}var hP,Ad=E(()=>{l();Rr();hP="_sentrySpan"});var Tye,$n,g_=E(()=>{l();qe();VT();De();en();FT();xi();Bs();Ds();Ad();ks();Mi();Tye=100,$n=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:ln(),sampleRand:Ht()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,Da(t,Qo(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&$s(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this.setTags({[t]:n})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t=="function"?t(this):t,o=n instanceof e?n.getScopeData():Ls(n)?t:void 0,{tags:r,attributes:i,extra:s,user:a,contexts:c,level:u,fingerprint:d=[],propagationContext:p,conversationId:f}=o||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...s},this._contexts={...this._contexts,...c},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),d.length&&(this._fingerprint=d),p&&(this._propagationContext=p),f&&(this._conversationId=f),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Da(this,void 0),this._attachments=[],this.setPropagationContext({traceId:ln(),sampleRand:Ht()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){let o=typeof n=="number"?n:Tye;if(o<=0)return this;let r={timestamp:Us(),...t,message:t.message?Ma(t.message,2048):t.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>o&&(this._breadcrumbs=this._breadcrumbs.slice(-o),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Qo(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=wa(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let o=n?.event_id||tn();if(!this._client)return w&&b.warn("No client configured on scope - will not capture exception!"),o;let r=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:r,...n,event_id:o},this),o}captureMessage(t,n,o){let r=o?.event_id||tn();if(!this._client)return w&&b.warn("No client configured on scope - will not capture message!"),r;let i=o?.syntheticException??new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:i,...o,event_id:r},this),r}captureEvent(t,n){let o=t.event_id||n?.event_id||tn();return this._client?(this._client.captureEvent(t,{...n,event_id:o},this),o):(w&&b.warn("No client configured on scope - will not capture event!"),o)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}});function yd(){return Jo("defaultCurrentScope",()=>new $n)}function go(){return Jo("defaultIsolationScope",()=>new $n)}var HT=E(()=>{l();fo();g_()});var Tq,Sq,zT,Sye,EP=E(()=>{l();Tq=e=>e instanceof Promise&&!e[Sq],Sq=Symbol("chained PromiseLike"),zT=(e,t,n)=>{let o=e.then(r=>(t(r),r),r=>{throw n(r),r});return Tq(o)&&Tq(e)?o:Sye(e,o)},Sye=(e,t)=>{if(!t)return e;let n=!1;for(let o in e){if(o in t)continue;n=!0;let r=e[o];typeof r=="function"?Object.defineProperty(t,o,{value:(...i)=>r.apply(e,i),enumerable:!0,configurable:!0,writable:!0}):t[o]=r}return n&&Object.assign(t,{[Sq]:!0}),t}});function Rd(){let e=kn(),t=va(e);return t.stack=t.stack||new TP(yd(),go())}function Aye(e){return Rd().withScope(e)}function yye(e,t){let n=Rd();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Aq(e){return Rd().withScope(()=>e(Rd().getIsolationScope()))}function yq(){return{withIsolationScope:Aq,withScope:Aye,withSetScope:yye,withSetIsolationScope:(e,t)=>Aq(t),getCurrentScope:()=>Rd().getScope(),getIsolationScope:()=>Rd().getIsolationScope()}}var TP,Rq=E(()=>{l();HT();g_();EP();en();fo();TP=class{constructor(t,n){let o;t?o=t:o=new $n;let r;n?r=n:r=new $n,this._stack=[{scope:o}],this._isolationScope=r}withScope(t){let n=this._pushScope(),o;try{o=t(n)}catch(r){throw this._popScope(),r}return yn(o)?zT(o,()=>this._popScope(),()=>this._popScope()):(this._popScope(),o)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}});function SP(e){let t=kn(),n=va(t);n.acs=e}function ho(e){let t=va(e);return t.acs?t.acs:yq()}var Id=E(()=>{l();fo();Rq()});function Rye(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function Iye(e,t){let{value:n,unit:o}=Rye(e)?e:{value:e,unit:void 0},r=bye(n),i=o&&typeof o=="string"?{unit:o}:{};if(r)return{...r,...i};if(!t||t==="skip-undefined"&&n===void 0)return;let s="";try{s=JSON.stringify(n)??""}catch{}return{value:s,type:"string",...i}}function Gs(e,t=!1){let n={};for(let[o,r]of Object.entries(e??{})){let i=Iye(r,t);i&&(n[o]=i)}return n}function AP(e){if(!e)return 0;let t=0;for(let[n,o]of Object.entries(e)){t+=n.length*2,t+=o.type.length*2,t+=(o.unit?.length??0)*2;let r=o.value;Array.isArray(r)?t+=Iq(r[0])*r.length:du(r)?t+=Iq(r):t+=100}return t}function Iq(e){return typeof e=="string"?e.length*2:typeof e=="boolean"?4:typeof e=="number"?8:0}function bye(e){let t=typeof e=="string"?"string":typeof e=="boolean"?"boolean":typeof e=="number"&&!Number.isNaN(e)?Number.isInteger(e)?"integer":"double":null;if(t)return{value:e,type:t}}var h_=E(()=>{l();en()});function Nq(){return bq?.()}function yP(){return bq!==void 0}function Pe(){let e=kn();return ho(e).getCurrentScope()}function Te(){let e=kn();return ho(e).getIsolationScope()}function bd(){return Jo("globalScope",()=>new $n)}function Rn(...e){let t=kn(),n=ho(t);if(e.length===2){let[o,r]=e;return o?n.withSetScope(o,r):n.withScope(r)}return n.withScope(e[0])}function js(...e){let t=kn(),n=ho(t);if(e.length===2){let[o,r]=e;return o?n.withSetIsolationScope(o,r):n.withIsolationScope(r)}return n.withIsolationScope(e[0])}function Z(){return Pe().getClient()}function _u(e){let t=Nq();if(t)return{trace_id:t.traceId,span_id:t.spanId};let n=e.getPropagationContext(),{traceId:o,parentSpanId:r,propagationSpanId:i}=n,s={trace_id:o,span_id:i||Un()};return r&&(s.parent_span_id=r),s}var bq,pt=E(()=>{l();Id();fo();g_();Bs()});var $e,Yr,RP,oe,te,IP,bP,NP,OP,CP,vP,PP,xP,MP,LP,E_,wP,tr,Nd,Od,DP,kP,UP,T_,gu,$P,St=E(()=>{l();$e="sentry.source",Yr="sentry.sample_rate",RP="sentry.previous_trace_sample_rate",oe="sentry.op",te="sentry.origin",IP="sentry.measurement_unit",bP="sentry.measurement_value",NP="sentry.release",OP="sentry.environment",CP="sentry.segment.name",vP="sentry.segment.id",PP="sentry.sdk.name",xP="sentry.sdk.version",MP="user.id",LP="user.email",E_="user.ip_address",wP="user.name",tr="sentry.custom_span_name",Nd="sentry.profile_id",Od="sentry.exclusive_time",DP="cache.hit",kP="cache.key",UP="cache.item_size",T_="http.request.method",gu="url.full",$P="gen_ai.conversation.id"});function Eo(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"internal_error"}}function Cd(e,t){e.setAttribute("http.response.status_code",t);let n=Eo(t);n.message!=="unknown_error"&&e.setStatus(n)}var BP=E(()=>{l()});function S_(e){try{let t=Ee.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function A_(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}var GP=E(()=>{l();An()});function y_(e,t,n){e&&(Ft(e,Cq,S_(n)),Ft(e,Oq,t))}function Wr(e){let t=e;return{scope:t[Oq],isolationScope:A_(t[Cq])}}var Oq,Cq,hu=E(()=>{l();Rr();GP();Oq="_sentryScope",Cq="_sentryIsolationScope"});function ei(e){let t=vd(e);if(!t)return;let n=Object.entries(t).reduce((o,[r,i])=>{if(r.startsWith(Vs)){let s=r.slice(Vs.length);o[s]=i}return o},{});if(Object.keys(n).length>0)return n}function Eu(e){if(!e)return;let t=Object.entries(e).reduce((n,[o,r])=>(r&&(n[`${Vs}${o}`]=r),n),{});return jP(t)}function vd(e){if(!(!e||!Pa(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{let o=vq(n);return Object.entries(o).forEach(([r,i])=>{t[r]=i}),t},{}):vq(e)}function vq(e){return e.split(",").map(t=>{let n=t.indexOf("=");if(n===-1)return[];let o=t.slice(0,n),r=t.slice(n+1);return[o,r].map(i=>{try{return decodeURIComponent(i.trim())}catch{return}})}).reduce((t,[n,o])=>(n&&o&&(t[n]=o),t),{})}function jP(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,o],r)=>{let i=`${encodeURIComponent(n)}=${encodeURIComponent(o)}`,s=r===0?i:`${t},${i}`;return s.length>Pq?(w&&b.warn(`Not adding key: ${n} with val: ${o} to baggage header due to exceeding baggage size limits.`),t):s},"")}function Pd(e,t){if(!e)return t;let n=vd(e),o=vd(t);if(!o)return e;let r={},i=!1,s={},a={};for(let[c,u]of Object.entries(o))c.startsWith(Vs)?(s[c]=u,i=!0):a[c]=u;if(n)for(let[c,u]of Object.entries(n))(!i||!c.startsWith(Vs))&&(r[c]=u);i&&Object.assign(r,s);for(let[c,u]of Object.entries(a))r[c]??=u;return jP(r)}var Vs,Pq,Tu=E(()=>{l();qe();De();en();Vs="sentry-",Pq=8192});function Cye(e){return e==="http"||e==="https"}function nr(e,t=!1){let{host:n,path:o,pass:r,port:i,projectId:s,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&r?`:${r}`:""}@${n}${i?`:${i}`:""}/${o&&`${o}/`}${s}`}function vye(e){let t=Oye.exec(e);if(!t){bt(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,o,r="",i="",s="",a=""]=t.slice(1),c="",u=a,d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){let p=u.match(/^\d+/);p&&(u=p[0])}return xq({host:i,pass:r,path:c,projectId:u,port:s,protocol:n,publicKey:o})}function xq(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Pye(e){if(!w)return!0;let{port:t,projectId:n,protocol:o}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(b.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?Cye(o)?t&&isNaN(parseInt(t,10))?(b.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(b.error(`Invalid Sentry Dsn: Invalid protocol ${o}`),!1):(b.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function xye(e){return e.match(Nye)?.[1]}function qT(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},o;return t.orgId?o=String(t.orgId):n&&(o=xye(n)),o}function Mq(e){let t=typeof e=="string"?vye(e):xq(e);if(!(!t||!Pye(t)))return t}var Nye,Oye,Li=E(()=>{l();qe();De();Nye=/^o(\d+)\./,Oye=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/});function Kr(e){if(typeof e=="boolean")return Number(e);let t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}var xd=E(()=>{l()});function Lq(e){if(!e)return;let t=e.match(YT);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function Su(e,t){let n=Lq(e),o=ei(t);if(!n?.traceId)return{traceId:ln(),sampleRand:Ht()};let r=Mye(n,o);o&&(o.sample_rand=r.toString());let{traceId:i,parentSpanId:s,parentSampled:a}=n;return{traceId:i,parentSpanId:s,sampled:a,dsc:o||{},sampleRand:r}}function ka(e=ln(),t=Un(),n){let o="";return n!==void 0&&(o=n?"-1":"-0"),`${e}-${t}${o}`}function Ua(e=ln(),t=Un(),n){return`00-${e}-${t}-${n?"01":"00"}`}function Mye(e,t){let n=Kr(t?.sample_rand);if(n!==void 0)return n;let o=Kr(t?.sample_rate);return o&&e?.parentSampled!==void 0?e.parentSampled?Ht()*o:o+Ht()*(1-o):Ht()}function R_(e,t){let n=qT(e);return t&&n&&t!==n?(b.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${n})`),!1):(e.getOptions().strictTraceContinuation||!1)&&(t&&!n||!t&&n)?(b.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${t}, Sentry client: ${n})`),!1):!0}var YT,I_=E(()=>{l();De();Tu();Li();xd();Bs();Ds();YT=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$")});function kq(e){let{spanId:t,traceId:n}=e.spanContext(),{data:o,op:r,parent_span_id:i,status:s,origin:a,links:c}=_e(e);return{parent_span_id:i,span_id:t,trace_id:n,data:o,op:r,status:s,origin:a,links:c}}function $a(e){let{spanId:t,traceId:n,isRemote:o}=e.spanContext(),r=o?t:_e(e).parent_span_id,i=Wr(e).scope,s=o?i?.getPropagationContext().propagationSpanId||Un():t;return{parent_span_id:r,span_id:s,trace_id:n}}function Ld(e){let{traceId:t,spanId:n}=e.spanContext(),o=Zr(e);return ka(t,n,o)}function Uq(e){let{traceId:t,spanId:n}=e.spanContext(),o=Zr(e);return Ua(t,n,o)}function Au(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:o,...r},attributes:i})=>({span_id:t,trace_id:n,sampled:o===O_,attributes:i,...r}))}function FP(e){if(e?.length)return e.map(({context:{spanId:t,traceId:n,traceFlags:o},attributes:r})=>({span_id:t,trace_id:n,sampled:o===O_,attributes:r}))}function Bn(e){return typeof e=="number"?Dq(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Dq(e.getTime()):_o()}function Dq(e){return e>9999999999?e/1e3:e}function _e(e){if(jq(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(Gq(e)){let{attributes:o,startTime:r,name:i,endTime:s,status:a,links:c}=e;return{span_id:t,trace_id:n,data:o,description:i,parent_span_id:$q(e),start_timestamp:Bn(r),timestamp:Bn(s)||void 0,status:yu(a),op:o[oe],origin:o[te],links:Au(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function ZT(e){if(jq(e))return e.getStreamedSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(Gq(e)){let{attributes:o,startTime:r,name:i,endTime:s,status:a,links:c}=e;return{name:i,span_id:t,trace_id:n,parent_span_id:$q(e),start_timestamp:Bn(r),end_timestamp:Bn(s),is_segment:e===Md(e),status:HP(a),attributes:o,links:FP(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:e===Md(e)}}function $q(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function Bq(e){return{...e,attributes:Gs(e.attributes),links:e.links?.map(t=>({...t,attributes:Gs(t.attributes)}))}}function Gq(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function jq(e){return typeof e.getSpanJSON=="function"}function Zr(e){let{traceFlags:t}=e.spanContext();return t===O_}function yu(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"internal_error"}function HP(e){return!e||e.code===1||e.code===0||e.message==="cancelled"?"ok":"error"}function wd(e,t){let n=e[VP]||e;Ft(t,VP,n),e[b_]?e[b_].add(t):Ft(e,b_,new Set([t]))}function Dd(e){let t=new Set;function n(o){if(!t.has(o)&&Zr(o)){t.add(o);let r=o[b_]?Array.from(o[b_]):[];for(let i of r)n(i)}}return n(e),Array.from(t)}function Md(e){return e[VP]||e}function Gn(){let e=kn(),t=ho(e);return t.getActiveSpan?t.getActiveSpan():Qo(Pe())}function Ru(){wq||(bt(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),wq=!0)}var KT,O_,wq,b_,VP,Et,nn=E(()=>{l();Id();h_();fo();pt();St();hu();Rr();Bs();Mi();I_();De();Ad();KT=0,O_=1,wq=!1;b_="_sentryChildSpans",VP="_sentryRootSpan";Et=Md});function Fq(){if(Vq)return;function e(){let t=Gn(),n=t&&Et(t);if(n){let o="internal_error";w&&b.log(`[Tracing] Root span: ${o} -> Global error occurred`),n.setStatus({code:2,message:o})}}e.tag="sentry_tracingErrorCallback",Vq=!0,oq(e),sq(e)}var Vq,Hq=E(()=>{l();qe();iq();aq();De();nn();Vq=!1});function At(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=e||Z()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}var kd=E(()=>{l();pt()});function zq(e){b.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function ti(e,t){if(!t?.length)return!1;for(let n of t){if(wye(n)){if(e.description&&vi(e.description,n))return w&&zq(e),!0;continue}let o=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!o)continue;let r=n.name?e.description&&vi(e.description,n.name):!0,i=n.op?e.op&&vi(e.op,n.op):!0,s=n.attributes?Object.entries(n.attributes).every(([a,c])=>Lye(e.attributes?.[a],c)):!0;if(r&&i&&s)return w&&zq(e),!0}return!1}function Lye(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?vi(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e===t}function qq(e,t){let n=t.parent_span_id,o=t.span_id;if(n)for(let r of e)r.parent_span_id===o&&(r.parent_span_id=n)}function wye(e){return typeof e=="string"||e instanceof RegExp}var C_=E(()=>{l();qe();De();ks()});var Ud,JT=E(()=>{l();Ud="production"});function XT(e,t){Ft(e,Yq,t)}function zP(e,t){let n=t.getOptions(),{publicKey:o}=t.getDsn()||{},r={environment:n.environment||Ud,release:n.release,public_key:o,trace_id:e,org_id:qT(t)};return t.emit("createDsc",r),r}function wi(e,t){let n=t.getPropagationContext();return n.dsc||zP(n.traceId,e)}function Nt(e){let t=Z();if(!t)return{};let n=Et(e),o=_e(n),r=o.data,i=n.spanContext().traceState,s=i?.get("sentry.sample_rate")??r[Yr]??r[RP];function a(_){return(typeof s=="number"||typeof s=="string")&&(_.sample_rate=`${s}`),_}let c=n[Yq];if(c)return a(c);let u=i?.get("sentry.dsc"),d=u&&ei(u);if(d)return a(d);let p=zP(e.spanContext().traceId,t),f=r[$e]??r["sentry.span.source"],m=o.description;return f!=="url"&&m&&(p.transaction=m),At()&&(p.sampled=String(Zr(n)),p.sample_rand=i?.get("sentry.sample_rand")??Wr(n).scope?.getPropagationContext().sampleRand.toString()),a(p),t.emit("createDsc",p,n),p}var Yq,Di=E(()=>{l();JT();pt();St();Tu();Li();kd();Rr();nn();hu();Yq="_frozenDsc"});var To,Wq=E(()=>{l();Bs();nn();To=class{constructor(t={}){this._traceId=t.traceId||ln(),this._spanId=t.spanId||Un(),this.dropReason=t.dropReason}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:KT}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,o){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}});function Ba(e){return!!e&&typeof e=="function"&&"_streamed"in e&&!!e._streamed}var v_=E(()=>{l()});function Kq(e){return!!e[Dye]}function Zq(e){let t=e[kye];return typeof t=="number"?t:void 0}var Dye,kye,Jq=E(()=>{l();Dye=Symbol.for("sentry.skipNormalization"),kye=Symbol.for("sentry.overrideNormalizationDepth")});function ni(e,t=100,n=1/0){try{return qP("",e,t,n)}catch(o){return{ERROR:`**non-serializable** (${o})`}}}function YP(e,t=3,n=100*1024){let o=ni(e,t);return Gye(o)>n?YP(e,t-1,n):o}function qP(e,t,n=1/0,o=1/0,r=jye()){let[i,s]=r;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;let a=Uye(e,t);if(!a.startsWith("[object "))return a;if(Kq(t))return t;let c=Zq(t),u=c!==void 0?c:n;if(u===0)return a.replace("object ","");if(i(t))return"[Circular ~]";let d=t;if(d&&typeof d.toJSON=="function")try{let _=d.toJSON();return qP("",_,u-1,o,r)}catch{}let p=Array.isArray(t)?[]:{},f=0,m=GT(t);for(let _ in m){if(!Object.prototype.hasOwnProperty.call(m,_))continue;if(f>=o){p[_]="[MaxProperties ~]";break}let h=m[_];p[_]=qP(_,h,u-1,o,r),f++}return s(t),p}function Uye(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(m_(t))return $T(t);if(uP(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${d_(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=$ye(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function $ye(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function Bye(e){return~-encodeURI(e).split(/%..|./).length}function Gye(e){return Bye(JSON.stringify(e))}function jye(){let e=new WeakSet;function t(o){return e.has(o)?!0:(e.add(o),!1)}function n(o){e.delete(o)}return[t,n]}var QT=E(()=>{l();en();Jq();Rr();Ed()});function In(e,t=[]){return[e,t]}function KP(e,t){let[n,o]=e;return[n,[...o,t]]}function P_(e,t){let n=e[1];for(let o of n){let r=o[0].type;if(t(o,r))return!0}return!1}function ZP(e,t){return P_(e,(n,o)=>t.includes(o))}function WP(e){let t=va(Ee);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function x_(e){let[t,n]=e,o=JSON.stringify(t);function r(i){typeof o=="string"?o=typeof i=="string"?o+i:[WP(o),i]:o.push(typeof i=="string"?WP(i):i)}for(let i of n){let[s,a]=i;if(r(`
|
|
7
|
+
${JSON.stringify(s)}
|
|
8
|
+
`),typeof a=="string"||a instanceof Uint8Array)r(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(ni(a))}r(c)}}return typeof o=="string"?o:Vye(o)}function Vye(e){let t=e.reduce((r,i)=>r+i.length,0),n=new Uint8Array(t),o=0;for(let r of e)n.set(r,o),o+=r.length;return n}function JP(e){return[{type:"span"},e]}function XP(e){let t=typeof e.data=="string"?WP(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}function Fye(e){return e in Xq}function eS(e){return Fye(e)?Xq[e]:e}function $d(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function QP(e,t,n,o){let r=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&o&&{dsn:nr(o)},...r&&{trace:r}}}var Xq,ki=E(()=>{l();fo();Li();QT();An();Xq={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"}});function Hye(e,t){if(!t)return e;let n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function Qq(e,t,n,o){let r=$d(n),i={sent_at:new Date().toISOString(),...r&&{sdk:r},...!!o&&t&&{dsn:nr(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return In(i,[s])}function eY(e,t,n,o){let r=$d(n),i=e.type&&e.type!=="replay_event"?e.type:"event";Hye(e,n?.sdk);let s=QP(e,r,o,t);return delete e.sdkProcessingMetadata,In(s,[[{type:i},e]])}function tY(e,t){function n(m){return!!m.trace_id&&!!m.public_key}let o=Nt(e[0]),r=t?.getDsn(),i=t?.getOptions().tunnel,s={sent_at:new Date().toISOString(),...n(o)&&{trace:o},...!!i&&r&&{dsn:nr(r)}},{beforeSendSpan:a,ignoreSpans:c}=t?.getOptions()||{},u=c?.length?e.filter(m=>{let _=_e(m);return!ti({description:_.description,op:_.op,attributes:_.data},c)}):e,d=e.length-u.length;d&&t?.recordDroppedEvent("before_send","span",d);let p=a?m=>{let _=_e(m),h=Ba(a)?_:a(_);return h||(Ru(),_)}:_e,f=[];for(let m of u){let _=p(m);_&&f.push(JP(_))}return In(s,f)}var ex=E(()=>{l();Di();v_();Li();ki();C_();nn()});function M_(e){if(!w)return;let{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:o}=_e(e),{spanId:r}=e.spanContext(),i=Zr(e),s=Et(e),a=s===e,c=`[Tracing] Starting ${i?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${r}`];if(o&&u.push(`parent ID: ${o}`),!a){let{op:d,description:p}=_e(s);u.push(`root ID: ${s.spanContext().spanId}`),d&&u.push(`root op: ${d}`),p&&u.push(`root description: ${p}`)}b.log(`${c}
|
|
9
|
+
${u.join(`
|
|
10
|
+
`)}`)}function L_(e){if(!w)return;let{description:t="< unknown name >",op:n="< unknown op >"}=_e(e),{spanId:o}=e.spanContext(),i=Et(e)===e,s=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${o}`;b.log(s)}var tS=E(()=>{l();qe();De();nn()});function Iu(e){if(!e||e.length===0)return;let t={};return e.forEach(n=>{let o=n.attributes||{},r=o[IP],i=o[bP];typeof r=="string"&&typeof i=="number"&&(t[n.name]={value:i,unit:r})}),t}var tx=E(()=>{l();St()});function jn(e){return e.getOptions().traceLifecycle==="stream"}var bu=E(()=>{l()});function rY(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function oY(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function zye(e){return e instanceof Bd&&e.isStandaloneSpan()}function qye(e){let t=Z();if(!t)return;let n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}var nY,Bd,iY=E(()=>{l();pt();qe();ex();St();De();Bs();nn();Mi();Di();tS();tx();bu();hu();nY=1e3,Bd=class{constructor(t={}){this._traceId=t.traceId||ln(),this._spanId=t.spanId||Un(),this._startTime=t.startTimestamp||_o(),this._links=t.links,this._attributes={},this.setAttributes({[te]:"manual",[oe]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){let{_spanId:t,_traceId:n,_sampled:o}=this;return{spanId:t,traceId:n,traceFlags:o?O_:KT}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=Bn(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute($e,"custom"),this}end(t){this._endTime||(this._endTime=Bn(t),L_(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[oe],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:yu(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[te],profile_id:this._attributes[Nd],exclusive_time:this._attributes[Od],measurements:Iu(this._events),is_segment:this._isStandaloneSpan&&Et(this)===this||void 0,segment_id:this._isStandaloneSpan?Et(this).spanContext().spanId:void 0,links:Au(this._links)}}getStreamedSpanJSON(){return{name:this._name??"",span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===Et(this),status:HP(this._status),attributes:this._attributes,links:FP(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,o){w&&b.log("[Tracing] Adding an event to span:",t);let r=rY(n)?n:o||_o(),i=rY(n)?{}:n||{},s={name:t,time:Bn(r),attributes:i};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let t=Z();if(t&&(t.emit("spanEnd",this),this._isStandaloneSpan||t.emit("afterSpanEnd",this)),!(this._isStandaloneSpan||this===Et(this)))return;if(this._isStandaloneSpan){this._sampled?qye(tY([this],t)):(w&&b.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}else if(t&&jn(t)){t.emit("afterSegmentSpanEnd",this);return}let o=this._convertSpanToTransaction();o&&(Wr(this).scope||Pe()).captureEvent(o)}_convertSpanToTransaction(){if(!oY(_e(this)))return;this._name||(w&&b.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");let{scope:t,isolationScope:n}=Wr(this),o=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;let i=Dd(this).filter(d=>d!==this&&!zye(d)).map(d=>_e(d)).filter(oY),s=this._attributes[$e];delete this._attributes[tr],i.forEach(d=>{delete d.data[tr]});let a={contexts:{trace:kq(this)},spans:i.length>nY?i.sort((d,p)=>d.start_timestamp-p.start_timestamp).slice(0,nY):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:Nt(this)},request:o,...s&&{transaction_info:{source:s}}},c=Iu(this._events);return c&&Object.keys(c).length&&(w&&b.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),a.measurements=c),a}}});function ri(e,t,n=()=>{},o=()=>{}){let r;try{r=e()}catch(i){throw t(i),n(),i}return Yye(r,t,n,o)}function Yye(e,t,n,o){return yn(e)?zT(e,r=>{n(),o(r)},r=>{t(r),n()}):(n(),o(e),e)}var nS=E(()=>{l();EP();en()});function w_(e,t,n){if(!At(e))return[!1];let o,r;typeof e.tracesSampler=="function"?(r=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),o=!0):t.parentSampled!==void 0?r=t.parentSampled:typeof e.tracesSampleRate<"u"&&(r=e.tracesSampleRate,o=!0);let i=Kr(r);if(i===void 0)return w&&b.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(r)} of type ${JSON.stringify(typeof r)}.`),[!1];if(!i)return w&&b.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,i,o];let s=n<i;return s||w&&b.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),[s,i,o]}var nx=E(()=>{l();qe();De();kd();xd()});function Ot(e,t){let n=Vd();if(n.startSpan)return n.startSpan(e,t);let o=ox(e),{forceTransaction:r,parentSpan:i,scope:s}=e,a=s?.clone();return Rn(a,()=>aY(i)(()=>{let u=Pe(),d=ix(u,i),p=Z(),f=e.onlyIfParent&&!d,m=f?new To:rx({parentSpan:d,spanArguments:o,forceTransaction:r,scope:u});return f&&p?.recordDroppedEvent("no_parent_span","span"),(!cY(m)||!d)&&Da(u,m),ri(()=>t(m),()=>{let{status:_}=_e(m);m.isRecording()&&(!_||_==="ok")&&m.setStatus({code:2,message:"internal_error"})},()=>{m.end()})}))}function ft(e,t){let n=Vd();if(n.startSpanManual)return n.startSpanManual(e,t);let o=ox(e),{forceTransaction:r,parentSpan:i,scope:s}=e,a=s?.clone();return Rn(a,()=>aY(i)(()=>{let u=Pe(),d=ix(u,i),p=e.onlyIfParent&&!d,f=p?new To:rx({parentSpan:d,spanArguments:o,forceTransaction:r,scope:u});return p&&Z()?.recordDroppedEvent("no_parent_span","span"),(!cY(f)||!d)&&Da(u,f),ri(()=>t(f,()=>f.end()),()=>{let{status:m}=_e(f);f.isRecording()&&(!m||m==="ok")&&f.setStatus({code:2,message:"internal_error"})})}))}function Ga(e){let t=Vd();if(t.startInactiveSpan)return t.startInactiveSpan(e);let n=ox(e),{forceTransaction:o,parentSpan:r}=e;return(e.scope?s=>Rn(e.scope,s):r!==void 0?s=>Jr(r,s):s=>s())(()=>{let s=Pe(),a=ix(s,r),c=Z();return e.onlyIfParent&&!a?(c?.recordDroppedEvent("no_parent_span","span"),new To):rx({parentSpan:a,spanArguments:n,forceTransaction:o,scope:s})})}function Jr(e,t){let n=Vd();return n.withActiveSpan?n.withActiveSpan(e,t):Rn(o=>(Da(o,e||void 0),t(o)))}function Ui(e){let t=Vd();return t.suppressTracing?t.suppressTracing(e):Rn(n=>{n.setSDKProcessingMetadata({[Gd]:!0});let o=e();return n.setSDKProcessingMetadata({[Gd]:void 0}),o})}function D_(e){let t=Vd();return t.startNewTrace?t.startNewTrace(e):Rn(n=>(n.setPropagationContext({traceId:ln(),sampleRand:Ht()}),w&&b.log(`Starting a new trace with id ${n.getPropagationContext().traceId}`),Jr(null,e)))}function rx({parentSpan:e,spanArguments:t,forceTransaction:n,scope:o}){if(!At()){let a=new To;if(n||!e){let c={sampled:"false",sample_rate:"0",transaction:t.name,...Nt(a)};XT(a,c)}return a}let r=Z();if(Kye(r,t))return sx(o)||r?.recordDroppedEvent("ignored","span"),new To({dropReason:"ignored",traceId:e?.spanContext().traceId??o.getPropagationContext().traceId});let i=Te(),s;if(e&&!n)s=Wye(e,o,t),wd(e,s);else if(e){let a=Nt(e),{traceId:c,spanId:u}=e.spanContext(),d=Zr(e);s=sY({traceId:c,parentSpanId:u,...t},o,d),XT(s,a)}else{let{traceId:a,dsc:c,parentSpanId:u,sampled:d}={...i.getPropagationContext(),...o.getPropagationContext()};s=sY({traceId:a,parentSpanId:u,...t},o,d),c&&XT(s,c)}return M_(s),y_(s,o,i),s}function ox(e){let n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let o={...n};return o.startTimestamp=Bn(e.startTime),delete o.startTime,o}return n}function Vd(){let e=kn();return ho(e)}function sY(e,t,n){let o=Z(),r=o?.getOptions()||{},{name:i=""}=e,s={spanAttributes:{...e.attributes},spanName:i,parentSampled:n};o?.emit("beforeSampling",s,{decision:!1});let a=s.parentSampled??n,c=s.spanAttributes,u=t.getPropagationContext(),d=sx(t),[p,f,m]=d?[!1]:w_(r,{name:i,parentSampled:a,attributes:c,parentSampleRate:Kr(u.dsc?.sample_rate)},u.sampleRand),_=new Bd({...e,attributes:{[$e]:"custom",[Yr]:f!==void 0&&m?f:void 0,...c},sampled:p});return!p&&o&&!d&&(w&&b.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),o.recordDroppedEvent("sample_rate",jn(o)?"span":"transaction")),o&&o.emit("spanStart",_),_}function Wye(e,t,n){let{spanId:o,traceId:r}=e.spanContext(),i=sx(t),s=i?!1:Zr(e),a=s?new Bd({...n,parentSpanId:o,traceId:r,sampled:s}):new To({traceId:r});wd(e,a);let c=Z();return c&&(jn(c)&&a instanceof To&&(e instanceof To&&e.dropReason?(a.dropReason=e.dropReason,c.recordDroppedEvent(e.dropReason,"span")):i||(a.dropReason="sample_rate",c.recordDroppedEvent("sample_rate","span"))),c.emit("spanStart",a),n.endTimestamp&&(c.emit("spanEnd",a),c.emit("afterSpanEnd",a))),a}function ix(e,t){if(t)return t;if(t===null)return;let n=Qo(e);if(!n)return;let o=Z();return(o?o.getOptions():{}).parentSpanIsAlwaysRootSpan?Et(n):n}function aY(e){return e!==void 0?t=>Jr(e,t):t=>t()}function Kye(e,t){let n=e?.getOptions().ignoreSpans;return!e||!jn(e)||!n?.length?!1:ti({description:t.name||"",op:t.attributes?.[oe]||t.op,attributes:t.attributes},n)}function cY(e){return e instanceof To&&e.dropReason==="ignored"}function sx(e){return e.getScopeData().sdkProcessingMetadata[Gd]===!0}var Gd,jd,So=E(()=>{l();Id();fo();pt();qe();St();Tu();De();nS();kd();C_();bu();xd();Bs();Ds();Ad();nn();I_();Di();tS();nx();Wq();iY();hu();Gd="__SENTRY_SUPPRESS_TRACING__";jd=(e,t)=>{let n=kn(),o=ho(n);if(o.continueTrace)return o.continueTrace(e,t);let{sentryTrace:r,baggage:i}=e,s=Z(),a=ei(i);return s&&!R_(s,a?.org_id)?D_(t):Rn(c=>{let u=Su(r,i);return c.setPropagationContext(u),Da(c,void 0),t()})}});function lY(e,t){let{fingerprint:n,span:o,breadcrumbs:r,sdkProcessingMetadata:i}=t;Zye(e,t),o&&Qye(e,o),eRe(e,n),Jye(e,r),Xye(e,i)}function uY(e,t){let{extra:n,tags:o,attributes:r,user:i,contexts:s,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:d,eventProcessors:p,attachments:f,propagationContext:m,transactionName:_,span:h}=t;k_(e,"extra",n),k_(e,"tags",o),k_(e,"attributes",r),k_(e,"user",i),k_(e,"contexts",s),e.sdkProcessingMetadata=wa(e.sdkProcessingMetadata,c,2),a&&(e.level=a),_&&(e.transactionName=_),h&&(e.span=h),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),d.length&&(e.fingerprint=[...e.fingerprint,...d]),p.length&&(e.eventProcessors=[...e.eventProcessors,...p]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...m}}function k_(e,t,n){e[t]=wa(e[t],n,1)}function $i(e,t){let n=bd().getScopeData();return e&&uY(n,e.getScopeData()),t&&uY(n,t.getScopeData()),n}function Zye(e,t){let{extra:n,tags:o,user:r,contexts:i,level:s,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(o).length&&(e.tags={...o,...e.tags}),Object.keys(r).length&&(e.user={...r,...e.user}),Object.keys(i).length&&(e.contexts={...i,...e.contexts}),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function Jye(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Xye(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Qye(e,t){e.contexts={trace:$a(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Nt(t),...e.sdkProcessingMetadata};let n=Et(t),o=_e(n).description;o&&!e.transaction&&e.type==="transaction"&&(e.transaction=o)}function eRe(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}var Fd=E(()=>{l();pt();Di();FT();nn()});function U_(e){return"isRelative"in e}function Nu(e,t){let n=e.indexOf("://")<=0&&e.indexOf("//")!==0,o=t??(n?tRe:void 0);try{if("canParse"in URL&&!URL.canParse(e,o))return;let r=new URL(e,o);return n?{isRelative:n,pathname:r.pathname,search:r.search,hash:r.hash}:r}catch{}}function dY(e){if(U_(e))return e.pathname;let t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function nRe(e,t,n,o){let r=n?.method?.toUpperCase()??"GET",i=o||(e?t==="client"?dY(e):e.pathname:"/");return`${r} ${i}`}function ax(e,t,n,o,r){let i={[te]:n,[$e]:"url"};return r&&(i[t==="server"?"http.route":"url.template"]=r,i[$e]="route"),o?.method&&(i[T_]=o.method.toUpperCase()),e&&(e.search&&(i["url.query"]=e.search),e.hash&&(i["url.fragment"]=e.hash),e.pathname&&(i["url.path"]=e.pathname,e.pathname==="/"&&(i[$e]="route")),U_(e)||(i[gu]=e.href,e.port&&(i["url.port"]=e.port),e.protocol&&(i["url.scheme"]=e.protocol),e.hostname&&(i[t==="server"?"server.address":"url.domain"]=e.hostname))),[nRe(e,t,o,r),i]}function Bi(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",o=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:o,relative:t[5]+n+o}}function Ao(e){return e.split(/[?#]/,1)[0]}function Gi(e){let{protocol:t,host:n,path:o}=e,r=n?.replace(/^.*@/,"[filtered]:[filtered]@").replace(/(:80)$/,"").replace(/(:443)$/,"")||"";return`${t?`${t}://`:""}${r}${o}`}function $_(e,t=!0){if(e.startsWith("data:")){let n=e.match(/^data:([^;,]+)/),o=n?n[1]:"text/plain",r=e.includes(";base64,"),i=e.indexOf(","),s="";if(t&&i!==-1){let a=e.slice(i+1);s=a.length>10?`${a.slice(0,10)}... [truncated]`:a}return`data:${o}${r?",base64":""}${s?`,${s}`:""}`}return e}var tRe,B_=E(()=>{l();St();tRe="thismessage:/"});function ux(e,t){let n=ZT(e),o=Md(e),r=ZT(o),{isolationScope:i,scope:s}=Wr(e),a=$i(i,s);rRe(n,r,t,a);let c=e.kind;iRe(n,c),n.is_segment&&t.emit("processSegmentSpan",n),t.emit("processSpan",n);let{beforeSendSpan:u}=t.getOptions(),d=u&&Ba(u)?oRe(n,u):n,p=d.attributes?.[$e];return p&&zt(d,{"sentry.span.source":p}),{...Bq(d),_segmentSpan:o}}function zt(e,t){let n=e.attributes??(e.attributes={});Object.entries(t).forEach(([o,r])=>{r!=null&&!(o in n)&&(n[o]=r)})}function rRe(e,t,n,o){let r=n.getSdkMetadata(),{release:i,environment:s,sendDefaultPii:a}=n.getOptions();zt(e,{[NP]:i,[OP]:s,[CP]:t.name,[vP]:t.span_id,[PP]:r?.sdk?.name,[xP]:r?.sdk?.version,...a?{[MP]:o.user?.id,[LP]:o.user?.email,[E_]:o.user?.ip_address,[wP]:o.user?.username}:{},...o.attributes})}function oRe(e,t){let n=t(e);return n||(Ru(),e)}function iRe(e,t){let n=e.attributes;if(!n)return;let o=n["http.request.method"]||n["http.method"];if(o){sRe(e,n,t,o);return}let r=n["db.system.name"]||n["db.system"],i=typeof n[oe]=="string"&&`${n[oe]}`.startsWith("cache.");if(r&&!i){cRe(e,n);return}if(n["rpc.service"]){zt(e,{[oe]:"rpc"});return}if(n["messaging.system"]){zt(e,{[oe]:"message"});return}let s=n["faas.trigger"];s&&zt(e,{[oe]:`${s}`})}function sRe(e,t,n,o){let r=["http"];n===pY?r.push("client"):n===cx&&r.push("server"),t["sentry.http.prefetch"]&&r.push("prefetch"),zt(e,{[oe]:r.join(".")});let i=t[tr];if(typeof i=="string"){e.name=i;return}if(t[$e]==="custom")return;let s=t["http.route"];if(typeof s=="string")e.name=`${o} ${s}`,zt(e,{[$e]:"route"});else{if(n===pY||n===cx){let a=aRe(t,n);a&&(e.name=`${o} ${a}`)}zt(e,{[$e]:"url"})}}function aRe(e,t){let n=e["http.url"]||e["url.full"],o=e["http.target"],r=typeof n=="string"?Bi(n):void 0,i=r?Gi(r):void 0;if(t===cx&&typeof o=="string")return Ao(o);if(i)return i;if(typeof o=="string")return Ao(o)}function cRe(e,t){zt(e,{[oe]:"db"});let n=t[tr];if(typeof n=="string"){e.name=n;return}if(t[$e]==="custom")return;let o=t["db.statement"];o&&(e.name=`${o}`,zt(e,{[$e]:"task"}))}var cx,pY,rS=E(()=>{l();St();Fd();B_();nn();hu();v_();cx=1,pY=2});function Fs(e){return new oS(t=>{t(e)})}function Hd(e){return new oS((t,n)=>{n(e)})}var lx,fY,mY,oS,zd=E(()=>{l();en();lx=0,fY=1,mY=2;oS=class e{constructor(t){this._state=lx,this._handlers=[],this._runExecutor(t)}then(t,n){return new e((o,r)=>{this._handlers.push([!1,i=>{if(!t)o(i);else try{o(t(i))}catch(s){r(s)}},i=>{if(!n)r(i);else try{o(n(i))}catch(s){r(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new e((n,o)=>{let r,i;return this.then(s=>{i=!1,r=s,t&&t()},s=>{i=!0,r=s,t&&t()}).then(()=>{if(i){o(r);return}n(r)})})}_executeHandlers(){if(this._state===lx)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===fY&&n[1](this._value),this._state===mY&&n[2](this._value),n[0]=!0)})}_runExecutor(t){let n=(i,s)=>{if(this._state===lx){if(yn(s)){s.then(o,r);return}this._state=i,this._value=s,this._executeHandlers()}},o=i=>{n(fY,i)},r=i=>{n(mY,i)};try{t(o,r)}catch(i){r(i)}}}});function _Y(e,t,n,o=0){try{let r=dx(t,n,e,o);return yn(r)?r:Fs(r)}catch(r){return Hd(r)}}function dx(e,t,n,o){let r=n[o];if(!e||!r)return e;let i=r({...e},t);return w&&i===null&&b.log(`Event processor "${r.id||"?"}" dropped event`),yn(i)?i.then(s=>dx(s,t,n,o+1)):dx(i,t,n,o+1)}var gY=E(()=>{l();qe();De();en();zd()});function TY(e){let t=Ee._sentryDebugIds,n=Ee._debugIds;if(!t&&!n)return{};let o=t?Object.keys(t):[],r=n?Object.keys(n):[];if(ja&&o.length===hY&&r.length===EY)return ja;hY=o.length,EY=r.length,ja={},Ou||(Ou={});let i=(s,a)=>{for(let c of s){let u=a[c],d=Ou?.[c];if(d&&ja&&u)ja[d[0]]=u,Ou&&(Ou[c]=[d[0],u]);else if(u){let p=e(c);for(let f=p.length-1;f>=0;f--){let _=p[f]?.filename;if(_&&ja&&Ou){ja[_]=u,Ou[c]=[_,u];break}}}}};return t&&i(o,t),n&&i(r,n),ja}var Ou,hY,EY,ja,SY=E(()=>{l();An()});function AY(e,t,n,o,r,i){let{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||tn(),timestamp:t.timestamp||Us()},u=n.integrations||e.integrations.map(S=>S.name);uRe(c,e),pRe(c,u),r&&r.emit("applyFrameMetadata",t),t.type===void 0&&lRe(c,e.stackParser);let d=mRe(o,n.captureContext);n.mechanism&&Sd(c,n.mechanism);let p=r?r.getEventProcessors():[],f=$i(i,d),m=[...n.attachments||[],...f.attachments];m.length&&(n.attachments=m),lY(c,f);let _=[...p,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?Fs(c):_Y(_,c,n)).then(S=>(S&&dRe(S),typeof s=="number"&&s>0?fRe(S,s,a):S))}function uRe(e,t){let{environment:n,release:o,dist:r,maxValueLength:i}=t;e.environment=e.environment||n||Ud,!e.release&&o&&(e.release=o),!e.dist&&r&&(e.dist=r);let s=e.request;s?.url&&i&&(s.url=Ma(s.url,i)),i&&e.exception?.values?.forEach(a=>{a.value&&(a.value=Ma(a.value,i))})}function lRe(e,t){let n=TY(t);e.exception?.values?.forEach(o=>{o.stacktrace?.frames?.forEach(r=>{r.filename&&(r.debug_id=n[r.filename])})})}function dRe(e){let t={};if(e.exception?.values?.forEach(o=>{o.stacktrace?.frames?.forEach(r=>{r.debug_id&&(r.abs_path?t[r.abs_path]=r.debug_id:r.filename&&(t[r.filename]=r.debug_id),delete r.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([o,r])=>{n.push({type:"sourcemap",code_file:o,debug_id:r})})}function pRe(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function fRe(e,t,n){if(!e)return null;let o={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(r=>({...r,...r.data&&{data:ni(r.data,t,n)}}))},...e.user&&{user:ni(e.user,t,n)},...e.contexts&&{contexts:ni(e.contexts,t,n)},...e.extra&&{extra:ni(e.extra,t,n)}};return e.contexts?.trace&&o.contexts&&(o.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(o.contexts.trace.data=ni(e.contexts.trace.data,t,n))),e.spans&&(o.spans=e.spans.map(r=>({...r,...r.data&&{data:ni(r.data,t,n)}}))),e.contexts?.flags&&o.contexts&&(o.contexts.flags=ni(e.contexts.flags,3,n)),o}function mRe(e,t){if(!t)return e;let n=e?e.clone():new $n;return n.update(t),n}function yY(e){if(e)return _Re(e)?{captureContext:e}:hRe(e)?{captureContext:e}:e}function _Re(e){return e instanceof $n||typeof e=="function"}function hRe(e){return Object.keys(e).some(t=>gRe.includes(t))}var gRe,px=E(()=>{l();JT();gY();g_();SY();xi();QT();Fd();ks();zd();Mi();gRe=["user","level","extra","contexts","tags","fingerprint","propagationContext"]});function he(e,t){return Pe().captureException(e,yY(t))}function qd(e,t){return Pe().captureEvent(e,t)}function Yd(e,t){Te().setContext(e,t)}function Ir(e,t){Te().setTag(e,t)}function Cu(e){Te().setUser(e)}function G_(e){Te().setConversationId(e)}async function Wd(e){let t=Z();return t?t.flush(e):(w&&b.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}function rr(){return!!Z()}function Kd(){let e=Z();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function Zd(e){let t=Te(),{user:n}=$i(t,Pe()),{userAgent:o}=Ee.navigator||{},r=hq({user:n,...o&&{userAgent:o},...e}),i=t.getSession();return i?.status==="ok"&&$s(i,{status:"exited"}),vu(),t.setSession(r),r}function vu(){let e=Te(),n=Pe().getSession()||e.getSession();n&&Eq(n),ERe(),e.setSession()}function ERe(){let e=Te(),t=Z(),n=e.getSession();n&&t&&t.captureSession(n)}var or=E(()=>{l();pt();qe();VT();De();px();Fd();An()});function SRe(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function ARe(e){return`${SRe(e)}${e.projectId}/envelope/`}function yRe(e,t){let n={sentry_version:TRe};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function RY(e,t,n){return t||`${ARe(e)}?${yRe(e,n)}`}var TRe,IY=E(()=>{l();TRe="7"});function RRe(e){let t={};return e.forEach(n=>{let{name:o}=n,r=t[o];r&&!r.isDefaultInstance&&n.isDefaultInstance||(t[o]=n)}),Object.values(t)}function mx(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(r=>{r.isDefaultInstance=!0});let o;if(Array.isArray(n))o=[...t,...n];else if(typeof n=="function"){let r=n(t);o=Array.isArray(r)?r:[r]}else o=t;return RRe(o)}function bY(e,t){let n={};return t.forEach(o=>{o?.beforeSetup&&o.beforeSetup(e)}),t.forEach(o=>{o&&gx(e,o,n)}),n}function _x(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function gx(e,t,n){if(n[t.name]){w&&b.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!fx.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),fx.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){let o=t.preprocessEvent.bind(t);e.on("preprocessEvent",(r,i)=>o(r,i,e))}if(typeof t.processEvent=="function"){let o=t.processEvent.bind(t),r=Object.assign((i,s)=>o(i,s,e),{id:t.name});e.addEventProcessor(r)}["processSpan","processSegmentSpan"].forEach(o=>{let r=t[o];typeof r=="function"&&e.on(o,i=>r.call(t,i,e))}),w&&b.log(`Integration installed: ${t.name}`)}var fx,hx=E(()=>{l();qe();De();fx=[]});function iS(e){let t=Math.floor(e*1e3);Tx!==void 0&&t!==Tx&&(Ex=0);let n=Ex;return Ex++,Tx=t,{key:IRe,value:{value:n,type:"integer"}}}var IRe,Ex,Tx,Sx=E(()=>{l();IRe="sentry.timestamp.sequence",Ex=0});function Jd(e,t){return t?Rn(t,()=>{let n=Gn(),o=n?$a(n):_u(t);return[n?Nt(n):wi(e,t),o]}):[void 0,void 0]}var sS=E(()=>{l();pt();Di();nn()});var NY,OY=E(()=>{l();NY={trace:1,debug:5,info:9,warn:13,error:17,fatal:21}});function CY(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}var vY=E(()=>{l()});function PY(){return!CY()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}var xY=E(()=>{l();vY()});function Xd(){return typeof window<"u"&&(!PY()||bRe())}function bRe(){return Ee.process?.type==="renderer"}var aS=E(()=>{l();xY();An()});function NRe(e,t){let n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...Xd()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function MY(e,t,n,o,r){let i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&o&&(i.dsn=nr(o)),In(i,[NRe(e,r)])}var LY=E(()=>{l();Li();ki();aS()});function ji(e,t,n,o=!0){n&&(!e[t]||o)&&(e[t]=n)}function wY(e,t){let n=Ax(),o=DY(e);o===void 0?n.set(e,[t]):o.length>=ORe?(Pu(e,o),n.set(e,[t])):n.set(e,[...o,t])}function Qd(e,t=Pe(),n=wY){let o=t?.getClient()??Z();if(!o){w&&b.warn("No client available to capture log.");return}let{release:r,environment:i,enableLogs:s=!1,beforeSendLog:a}=o.getOptions();if(!s){w&&b.warn("logging option not enabled, log will not be captured.");return}let[,c]=Jd(o,t),u={...e.attributes},{user:{id:d,email:p,username:f},attributes:m={}}=$i(Te(),t);ji(u,"user.id",d,!1),ji(u,"user.email",p,!1),ji(u,"user.name",f,!1),ji(u,"sentry.release",r),ji(u,"sentry.environment",i);let{name:_,version:h}=o.getSdkMetadata()?.sdk??{};ji(u,"sentry.sdk.name",_),ji(u,"sentry.sdk.version",h);let T=o.getIntegrationByName("Replay"),S=T?.getReplayId(!0);ji(u,"sentry.replay_id",S),S&&T?.getRecordingMode()==="buffer"&&ji(u,"sentry._internal.replay_is_buffering",!0);let y=e.message;if(xa(y)){let{__sentry_template_string__:D,__sentry_template_values__:ue=[]}=y;ue?.length&&(u["sentry.message.template"]=D),ue.forEach((de,Ie)=>{u[`sentry.message.parameter.${Ie}`]=de})}let v=Qo(t);ji(u,"sentry.trace.parent_span_id",v?.spanContext().spanId);let x={...e,attributes:u};o.emit("beforeCaptureLog",x);let P=a?bt(()=>a(x)):x;if(!P){o.recordDroppedEvent("before_send","log_item",1),w&&b.warn("beforeSendLog returned null, log will not be captured.");return}let{level:N,message:F,attributes:se={},severityNumber:$}=P,G=_o(),Q=iS(G),J={timestamp:G,level:N,body:F,trace_id:c?.trace_id,severity_number:$??NY[N],attributes:{...Gs(m),...Gs(se,!0),[Q.key]:Q.value}};n(o,J),o.emit("afterCaptureLog",P)}function Pu(e,t){let n=t??DY(e)??[];if(n.length===0)return;let o=e.getOptions(),r=MY(n,o._metadata,o.tunnel,e.getDsn(),o.sendDefaultPii);Ax().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(r)}function DY(e){return Ax().get(e)}function Ax(){return Jo("clientToLogBufferMap",()=>new WeakMap)}var ORe,cS=E(()=>{l();h_();fo();pt();qe();De();en();Fd();Ad();Mi();Sx();sS();OY();LY();ORe=100});function CRe(e,t){let n=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...Xd()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function kY(e,t,n,o,r){let i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&o&&(i.dsn=nr(o)),In(i,[CRe(e,r)])}var UY=E(()=>{l();Li();ki();aS()});function Hs(e,t,n,o=!0){n&&(o||!(t in e))&&(e[t]=n)}function PRe(e,t){let n=Rx(),o=BY(e);o===void 0?n.set(e,[t]):o.length>=vRe?(yx(e,o),n.set(e,[t])):n.set(e,[...o,t])}function xRe(e,t,n){let{release:o,environment:r}=t.getOptions(),i={...e.attributes};Hs(i,"user.id",n.id,!1),Hs(i,"user.email",n.email,!1),Hs(i,"user.name",n.username,!1),Hs(i,"sentry.release",o),Hs(i,"sentry.environment",r);let{name:s,version:a}=t.getSdkMetadata()?.sdk??{};Hs(i,"sentry.sdk.name",s),Hs(i,"sentry.sdk.version",a);let c=t.getIntegrationByName("Replay"),u=c?.getReplayId(!0);return Hs(i,"sentry.replay_id",u),u&&c?.getRecordingMode()==="buffer"&&Hs(i,"sentry._internal.replay_is_buffering",!0),{...e,attributes:i}}function MRe(e,t,n,o){let[,r]=Jd(t,n),i=Qo(n),s=i?i.spanContext().traceId:r?.trace_id,a=i?i.spanContext().spanId:void 0,c=_o(),u=iS(c);return{timestamp:c,trace_id:s??"",span_id:a,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...Gs(o),...Gs(e.attributes,"skip-undefined"),[u.key]:u.value}}}function $Y(e,t){let n=t?.scope??Pe(),o=t?.captureSerializedMetric??PRe,r=n?.getClient()??Z();if(!r){w&&b.warn("No client available to capture metric.");return}let{_experiments:i,enableMetrics:s,beforeSendMetric:a}=r.getOptions();if(!(s??i?.enableMetrics??!0)){w&&b.warn("metrics option not enabled, metric will not be captured.");return}let{user:u,attributes:d}=$i(Te(),n),p=xRe(e,r,u);r.emit("processMetric",p);let f=a||i?.beforeSendMetric,m=f?f(p):p;if(!m){w&&b.log("`beforeSendMetric` returned `null`, will not send metric.");return}let _=MRe(m,r,n,d);w&&b.log("[Metric]",_),o(r,_),r.emit("afterCaptureMetric",m)}function yx(e,t){let n=t??BY(e)??[];if(n.length===0)return;let o=e.getOptions(),r=kY(n,o._metadata,o.tunnel,e.getDsn(),o.sendDefaultPii);Rx().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(r)}function BY(e){return Rx().get(e)}function Rx(){return Jo("clientToMetricBufferMap",()=>new WeakMap)}var vRe,Ix=E(()=>{l();h_();fo();pt();qe();De();Fd();Ad();Mi();Sx();sS();UY();vRe=1e3});function ep(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}var uS=E(()=>{l()});function tp(e=100){let t=new Set;function n(){return t.size<e}function o(s){t.delete(s)}function r(s){if(!n())return Hd(j_);let a=s();return t.add(a),a.then(()=>o(a),()=>o(a)),a}function i(s){if(!t.size)return Fs(!0);let a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!s)return a;let c=[a,new Promise(u=>ep(setTimeout(()=>u(!1),s)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:r,drain:i}}var j_,lS=E(()=>{l();zd();uS();j_=Symbol.for("SentryBufferFullError")});function wRe(e,t=mo()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let o=Date.parse(`${e}`);return isNaN(o)?LRe:o-t}function DRe(e,t){return e[t]||e.all||0}function GY(e,t,n=mo()){return DRe(e,t)>n}function jY(e,{statusCode:t,headers:n},o=mo()){let r={...e},i=n?.["x-sentry-rate-limits"],s=n?.["retry-after"];if(i)for(let a of i.trim().split(",")){let[c,u,,,d]=a.split(":",5),p=parseInt(c,10),f=(isNaN(p)?60:p)*1e3;if(!u)r.all=o+f;else for(let m of u.split(";"))m==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(r[m]=o+f):r[m]=o+f}else s?r.all=o+wRe(s,o):t===429&&(r.all=o+60*1e3);return r}var LRe,VY=E(()=>{l();Ds();LRe=60*1e3});function zs(e,t,n=tp(e.bufferSize||V_)){let o={},r=s=>n.drain(s);function i(s){let a=[];if(P_(s,(p,f)=>{let m=eS(f);GY(o,m)?e.recordDroppedEvent("ratelimit_backoff",m):a.push(p)}),a.length===0)return Promise.resolve({});let c=In(s[0],a),u=p=>{if(ZP(c,["client_report"])){w&&b.warn(`Dropping client report. Will not send outcomes (reason: ${p}).`);return}P_(c,(f,m)=>{e.recordDroppedEvent(p,eS(m))})},d=()=>t({body:x_(c)}).then(p=>p.statusCode===413?(w&&b.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),p):(w&&p.statusCode!==void 0&&(p.statusCode<200||p.statusCode>=300)&&b.warn(`Sentry responded with status code ${p.statusCode} to sent event.`),o=jY(o,p),p),p=>{throw u("network_error"),w&&b.error("Encountered error running transport request:",p),p});return n.add(d).then(p=>p,p=>{if(p===j_)return w&&b.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw p})}return{send:i,flush:r}}var V_,dS=E(()=>{l();qe();De();ki();lS();VY();V_=64});function FY(e,t,n){let o=[{type:"client_report"},{timestamp:n||Us(),discarded_events:e}];return In(t?{dsn:t}:{},[o])}var HY=E(()=>{l();ki();Mi()});function pS(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}var bx=E(()=>{l()});function zY(e){let{trace_id:t,parent_span_id:n,span_id:o,status:r,origin:i,data:s,op:a}=e.contexts?.trace??{};return{data:s??{},description:e.transaction,op:a,parent_span_id:n,span_id:o??"",start_timestamp:e.start_timestamp??0,status:r,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:s?.[Nd],exclusive_time:s?.[Od],measurements:e.measurements,is_segment:!0}}function qY(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[Nd]:e.profile_id},...e.exclusive_time&&{[Od]:e.exclusive_time}}}},measurements:e.measurements}}var YY=E(()=>{l();St()});function fS(e){return{message:e,[tW]:!0}}function Nx(e){return{message:e,[nW]:!0}}function ZY(e){return!!e&&typeof e=="object"&&tW in e}function JY(e){return!!e&&typeof e=="object"&&nW in e}function XY(e,t,n,o,r){let i=0,s,a=!1;e.on(n,()=>{i=0,clearTimeout(s),a=!1}),e.on(t,c=>{i+=o(c),i>=8e5?r(e):a||(a=!0,s=ep(setTimeout(()=>{r(e)},kRe)))}),e.on("flush",()=>{r(e)})}function QY(e){return e==="replay_event"?"replay":e||"error"}function URe(e,t){let n=`${t} must return \`null\` or a valid event.`;if(yn(e))return e.then(o=>{if(!Ls(o)&&o!==null)throw fS(n);return o},o=>{throw fS(`${t} rejected with ${o}`)});if(!Ls(e)&&e!==null)throw fS(n);return e}function $Re(e,t,n,o){let{beforeSend:r,beforeSendTransaction:i,ignoreSpans:s}=t,a=!Ba(t.beforeSendSpan)&&t.beforeSendSpan,c=n;if(Ox(c)&&r)return r(c,o);if(rW(c)){if(a||s){let u=zY(c);if(s?.length&&ti({description:u.description,op:u.op,attributes:u.data},s))return null;if(a){let d=a(u);d?c=wa(n,qY(d)):Ru()}if(c.spans){let d=[],p=c.spans;for(let m of p){if(s?.length&&ti({description:m.description,op:m.op,attributes:m.data},s)){qq(p,m);continue}if(a){let _=a(m);_?d.push(_):(Ru(),d.push(m))}else d.push(m)}let f=c.spans.length-d.length;f&&e.recordDroppedEvent("before_send","span",f),c.spans=d}}if(i){if(c.spans){let u=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return i(c,o)}}return c}function Ox(e){return e.type===void 0}function rW(e){return e.type==="transaction"}function BRe(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+oW(e.attributes)}function GRe(e){let t=0;return e.message&&(t+=e.message.length*2),t+oW(e.attributes)}function oW(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*eW(n[0]):du(n)?t+=eW(n):t+=100}),t}function eW(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}var WY,KY,tW,nW,kRe,mS,iW=E(()=>{l();IY();JT();pt();qe();ex();hx();cS();Ix();VT();Di();v_();dS();HY();De();Li();ki();bx();en();FT();xi();xd();px();lS();Ds();C_();nn();zd();uS();YY();WY="Not capturing exception because it's already been captured.",KY="Discarded session because of missing or non-string release",tW=Symbol.for("SentryInternalError"),nW=Symbol.for("SentryDoNotSendEventError"),kRe=5e3;mS=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=tp(t.transportOptions?.bufferSize??V_),t.dsn?this._dsn=Mq(t.dsn):w&&b.warn("No DSN provided, client will not send events."),this._dsn){let o=RY(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:o})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&XY(this,"afterCaptureLog","flushLogs",GRe,Pu),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&XY(this,"afterCaptureMetric","flushMetrics",BRe,yx)}captureException(t,n,o){let r=tn();if(jT(t))return w&&b.log(WY),r;let i={event_id:r,...n};return this._process(()=>this.eventFromException(t,i).then(s=>this._captureEvent(s,i,o)).then(s=>s),"error"),i.event_id}captureMessage(t,n,o,r){let i={event_id:tn(),...o},s=xa(t)?t:String(t),a=du(t),c=a?this.eventFromMessage(s,n,i):this.eventFromException(t,i);return this._process(()=>c.then(u=>this._captureEvent(u,i,r)),a?"unknown":"error"),i.event_id}captureEvent(t,n,o){let r=tn();if(n?.originalException&&jT(n.originalException))return w&&b.log(WY),r;let i={event_id:r,...n},s=t.sdkProcessingMetadata||{},a=s.capturedSpanScope,c=s.capturedSpanIsolationScope,u=QY(t.type);return this._process(()=>this._captureEvent(t,i,a||o,c),u),i.event_id}captureSession(t){this.sendSession(t),$s(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){let n=this._transport;if(this.emit("flush"),!n)return!0;let o=await this._isClientDoneProcessing(t),r=await n.flush(t);return o&&r}async close(t){Pu(this);let n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){let n=this._integrations[t.name];!n&&t.beforeSetup&&t.beforeSetup(this),gx(this,t,this._integrations),n||_x(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let o=eY(t,this._dsn,this._options._metadata,this._options.tunnel);for(let r of n.attachments||[])o=KP(o,XP(r));this.sendEnvelope(o).then(r=>this.emit("afterSendEvent",t,r))}sendSession(t){let{release:n,environment:o=Ud}=this._options;if("aggregates"in t){let i=t.attrs||{};if(!i.release&&!n){w&&b.warn(KY);return}i.release=i.release||n,i.environment=i.environment||o,t.attrs=i}else{if(!t.release&&!n){w&&b.warn(KY);return}t.release=t.release||n,t.environment=t.environment||o}this.emit("beforeSendSession",t);let r=Qq(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(t,n,o=1){if(this._options.sendClientReports){let r=`${t}:${n}`;w&&b.log(`Recording outcome: "${r}"${o>1?` (${o} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+o}}on(t,n){let o=this._hooks[t]=this._hooks[t]||new Set,r=(...i)=>n(...i);return o.add(r),()=>{o.delete(r)}}emit(t,...n){let o=this._hooks[t];o&&o.forEach(r=>r(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return w&&b.error("Error while sending envelope:",n),{}}return w&&b.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=bY(this,t),_x(this,t)}_updateSessionFromEvent(t,n){let o=n.level==="fatal",r=!1,i=n.exception?.values;if(i){r=!0,o=!1;for(let c of i)if(c.mechanism?.handled===!1){o=!0;break}}let s=t.status==="ok";(s&&t.errors===0||s&&o)&&($s(t,{...o&&{status:"crashed"},errors:t.errors||Number(r||o)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(o=>setTimeout(o,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,o,r){let i=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s?.length&&(n.integrations=s),this.emit("preprocessEvent",t,n),t.type||r.setLastEventId(t.event_id||n.event_id),AY(i,t,n,o,this,r).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:{...a.contexts?.trace,..._u(o)},...a.contexts};let c=wi(this,o);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},o=Pe(),r=Te()){return w&&Ox(t)&&b.log(`Captured error event \`${pS(t)[0]||"<unknown>"}\``),this._processEvent(t,n,o,r).then(i=>i.event_id,i=>{w&&(JY(i)?b.log(i.message):ZY(i)?b.warn(i.message):b.warn(i))})}_processEvent(t,n,o,r){let i=this.getOptions(),{sampleRate:s}=i,a=rW(t),c=Ox(t),d=`before send for type \`${t.type||"error"}\``,p=typeof s>"u"?void 0:Kr(s);if(c&&typeof p=="number"&&Ht()>p)return this.recordDroppedEvent("sample_rate","error"),Hd(Nx(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));let f=QY(t.type);return this._prepareEvent(t,n,o,r).then(m=>{if(m===null)throw this.recordDroppedEvent("event_processor",f),Nx("An event processor returned `null`, will not send event.");if(n.data?.__sentry__===!0)return m;let h=$Re(this,i,m,n);return URe(h,d)}).then(m=>{if(m===null){if(this.recordDroppedEvent("before_send",f),a){let S=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",S)}throw Nx(`${d} returned \`null\`, will not send event.`)}let _=o.getSession()||r.getSession();if(c&&_&&this._updateSessionFromEvent(_,m),a){let T=m.sdkProcessingMetadata?.spanCountBeforeProcessing||0,S=m.spans?m.spans.length:0,y=T-S;y>0&&this.recordDroppedEvent("before_send","span",y)}let h=m.transaction_info;if(a&&h&&m.transaction!==t.transaction){let T="custom";m.transaction_info={...h,source:T}}return this.sendEvent(m,n),m}).then(null,m=>{throw JY(m)||ZY(m)?m:(this.captureException(m,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:m}),fS(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
11
|
+
Reason: ${m}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(o=>(this._numProcessing--,o),o=>(this._numProcessing--,o===j_&&this.recordDroppedEvent("queue_overflow",n),o))}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,o])=>{let[r,i]=n.split(":");return{reason:r,category:i,quantity:o}})}_flushOutcomes(){w&&b.log("Flushing outcomes...");let t=this._clearOutcomes();if(t.length===0){w&&b.log("No outcomes to send");return}if(!this._dsn){w&&b.log("No dsn provided, will not send outcomes");return}w&&b.log("Sending outcomes:",t);let n=FY(t,this._options.tunnel&&nr(this._dsn));this.sendEnvelope(n)}}});function sW(e,t,n,o,r){let i={sent_at:new Date().toISOString()};n?.sdk&&(i.sdk={name:n.sdk.name,version:n.sdk.version}),o&&r&&(i.dsn=nr(r)),t&&(i.trace=t);let s=jRe(e);return In(i,[s])}function jRe(e){return[{type:"check_in"},e]}var aW=E(()=>{l();Li();ki()});function cW(e){let t=e._metadata?.sdk,n=t?.name&&t?.version?`${t?.name}/${t?.version}`:void 0;e.transportOptions={...e.transportOptions,headers:{...n&&{"user-agent":n},...e.transportOptions?.headers}}}var uW=E(()=>{l()});function lW(e,t){return e(t.stack||"",1)}function VRe(e){return Oi(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function FRe(e){return VRe(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function Cx(e,t){let n={type:t.name||t.constructor.name,value:FRe(t)},o=lW(e,t);return o.length&&(n.stacktrace={frames:o}),n}function HRe(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}function zRe(e){if("name"in e&&typeof e.name=="string"){let o=`'${e.name}' captured as exception`;return"message"in e&&typeof e.message=="string"&&(o+=` with message '${e.message}'`),o}else if("message"in e&&typeof e.message=="string")return e.message;let t=lP(e);if(iP(e))return`Event \`ErrorEvent\` captured as exception with message \`${e.message}\``;let n=qRe(e);return`${n&&n!=="Object"?`'${n}'`:"Object"} captured as exception with keys: ${t}`}function qRe(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function YRe(e,t,n,o){if(Oi(n))return[n,void 0];if(t.synthetic=!0,Ls(n)){let i=e?.getOptions().normalizeDepth,s={__serialized__:YP(n,i)},a=HRe(n);if(a)return[a,s];let c=zRe(n),u=o?.syntheticException||new Error(c);return u.message=c,[u,s]}let r=o?.syntheticException||new Error(n);return r.message=`${n}`,[r,void 0]}function dW(e,t,n,o){let i=o?.data&&o.data.mechanism||{handled:!0,type:"generic"},[s,a]=YRe(e,i,n,o),c={exception:{values:[Cx(t,s)]}};return a&&(c.extra=a),_P(c,void 0,void 0),Sd(c,i),{...c,event_id:o?.event_id}}function pW(e,t,n="info",o,r){let i={event_id:o?.event_id,level:n};if(r&&o?.syntheticException){let s=lW(e,o.syntheticException);s.length&&(i.exception={values:[{value:t,stacktrace:{frames:s}}]},Sd(i,{synthetic:!0}))}if(xa(t)){let{__sentry_template_string__:s,__sentry_template_values__:a}=t;return i.logentry={message:s,params:a},i}return i.message=t,i}var vx=E(()=>{l();en();xi();QT();Rr()});function fW(e){let t=Te().getScopeData().sdkProcessingMetadata.requestSession;if(t){let n=e?.mechanism?.handled??!0;n&&t.status!=="crashed"?t.status="errored":n||(t.status="crashed")}}var F_,mW=E(()=>{l();aW();iW();pt();qe();Hq();De();xi();dS();uW();vx();lS();zd();sS();F_=class e extends mS{__init(){this._disposeCallbacks=[]}constructor(t){Fq(),cW(t),super(t),e.prototype.__init.call(this),this._setUpMetricsProcessing()}eventFromException(t,n){let o=dW(this,this._options.stackParser,t,n);return o.level="error",Fs(o)}eventFromMessage(t,n="info",o){return Fs(pW(this._options.stackParser,t,n,o,this._options.attachStacktrace))}captureException(t,n,o){return fW(n),super.captureException(t,n,o)}captureEvent(t,n,o){return!t.type&&t.exception?.values&&t.exception.values.length>0&&fW(n),super.captureEvent(t,n,o)}captureCheckIn(t,n,o){let r="checkInId"in t&&t.checkInId?t.checkInId:tn();if(!this._isEnabled())return w&&b.warn("SDK not enabled, will not capture check-in."),r;let i=this.getOptions(),{release:s,environment:a,tunnel:c}=i,u={check_in_id:r,monitor_slug:t.monitorSlug,status:t.status,release:s,environment:a};"duration"in t&&(u.duration=t.duration),n&&(u.monitor_config={schedule:n.schedule,checkin_margin:n.checkinMargin,max_runtime:n.maxRuntime,timezone:n.timezone,failure_issue_threshold:n.failureIssueThreshold,recovery_threshold:n.recoveryThreshold});let[d,p]=Jd(this,o);p&&(u.contexts={trace:p});let f=sW(u,d,this.getSdkMetadata(),c,this.getDsn());return w&&b.log("Sending checkin:",t.monitorSlug,t.status),this.sendEnvelope(f),r}registerCleanup(t){this._disposeCallbacks.push(t)}dispose(){w&&b.log("Disposing client...");for(let t of this._disposeCallbacks)try{t()}catch{}this._disposeCallbacks.length=0;for(let t of Object.keys(this._hooks))this._hooks[t]?.clear();this._hooks={},this._eventProcessors.length=0,this._integrations={},this._outcomes={},this._transport=void 0,this._promiseBuffer=tp(V_)}_prepareEvent(t,n,o,r){return this._options.platform&&(t.platform=t.platform||this._options.platform),this._options.runtime&&(t.contexts={...t.contexts,runtime:t.contexts?.runtime||this._options.runtime}),this._options.serverName&&(t.server_name=t.server_name||this._options.serverName),super._prepareEvent(t,n,o,r)}_setUpMetricsProcessing(){this.on("processMetric",t=>{this._options.serverName&&(t.attributes={"server.address":this._options.serverName,...t.attributes})})}}});function xx(e){e.forEach(t=>{Px.add(t),w&&b.log(`AI provider "${t}" wrapping will be skipped`)})}function xu(e){return Px.has(e)}function Mx(){Px.clear(),w&&b.log("Cleared AI provider skip registrations")}var Px,_W=E(()=>{l();qe();De();Px=new Set});function Mu(e,t){let n=String(e).toLowerCase();return WRe.has(n)?!1:KRe.has(n)?!0:t?.strict?null:!!e}var WRe,KRe,gW=E(()=>{l();WRe=new Set(["false","f","n","no","off","0"]),KRe=new Set(["true","t","y","yes","on","1"])});function H_(e,...t){let n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}var z_,Lx=E(()=>{l();z_=H_});function qs(e,t,n=[t],o="npm"){let r=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};r.name||(r.name=`sentry.javascript.${t}`,r.packages=n.map(i=>({name:`${o}:@sentry/${i}`,version:ve})),r.version=ve)}var hW=E(()=>{l();DT()});function Va(e={}){let t=e.client||Z();if(!Kd()||!t)return{};let n=kn(),o=ho(n);if(o.getTraceData)return o.getTraceData(e);let r=e.scope||Pe(),i=e.span||Gn();if(!i&&yP())return{};let s=i?Ld(i):ZRe(r),a=i?Nt(i):wi(t,r),c=Eu(a);if(!YT.test(s))return b.warn("Invalid sentry-trace data. Cannot generate trace data"),{};let d={"sentry-trace":s,baggage:c};return e.propagateTraceparent&&(d.traceparent=i?Uq(i):JRe(r)),d}function ZRe(e){let{traceId:t,sampled:n,propagationSpanId:o}=e.getPropagationContext();return ka(t,o,n)}function JRe(e){let{traceId:t,sampled:n,propagationSpanId:o}=e.getPropagationContext();return Ua(t,o,n)}var wx=E(()=>{l();Id();fo();pt();or();De();nn();Di();Tu();I_()});function Lu(e,t,n){if(typeof e!="string"||!t)return!0;let o=n?.get(e);if(o!==void 0)return w&&!o&&b.log(EW,e),o;let r=Pi(e,t);return n?.set(e,r),w&&!r&&b.log(EW,e),r}var EW,Dx=E(()=>{l();qe();De();ks();EW="[Tracing] Not injecting trace data for url because it does not match tracePropagationTargets:"});function kx(e,t,n){let o,r,i,s=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function c(){return u(),o=e(),o}function u(){r!==void 0&&clearTimeout(r),i!==void 0&&clearTimeout(i),r=i=void 0}function d(){return r!==void 0||i!==void 0?c():o}function p(){return r&&clearTimeout(r),r=a(c,t),s&&i===void 0&&(i=a(c,s)),o}return p.cancel=u,p.flush=d,p}var TW=E(()=>{l()});function Ux(e){return e==="small"?1e3:e==="medium"?1e4:RW}function IW(e){let t=Object.create(null);try{Object.entries(e).forEach(([n,o])=>{typeof o=="string"&&(t[n]=o)})}catch{}return t}function np(e){let t=e.headers||{},o=(typeof t["x-forwarded-host"]=="string"?t["x-forwarded-host"]:void 0)||(typeof t.host=="string"?t.host:void 0),i=(typeof t["x-forwarded-proto"]=="string"?t["x-forwarded-proto"]:void 0)||e.protocol||(e.socket?.encrypted?"https":"http"),s=e.url||"",a=XRe({url:s,host:o,protocol:i}),c=e.body||void 0,u=e.cookies;return{url:a,method:e.method,query_string:bW(s),headers:IW(t),cookies:u,data:c}}function XRe({url:e,protocol:t,host:n}){if(e?.startsWith("http"))return e;if(e&&n)return`${t}://${n}${e}`}function oi(e,t=!1,n="request"){let o={};try{Object.entries(e).forEach(([r,i])=>{if(i==null)return;let s=r.toLowerCase();if((s==="cookie"||s==="set-cookie")&&typeof i=="string"&&i!==""){let c=s==="set-cookie",u=i.indexOf(";"),d=c&&u!==-1?i.substring(0,u):i,p=c?[d]:d.split("; ");for(let f of p){let m=f.indexOf("="),_=m!==-1?f.substring(0,m):f,h=m!==-1?f.substring(m+1):"",T=_.toLowerCase();yW({spanAttributes:o,headerKey:s,cookieKey:T,value:h,sendDefaultPii:t,lifecycle:n})}}else yW({spanAttributes:o,headerKey:s,value:i,sendDefaultPii:t,lifecycle:n})})}catch{}return o}function AW(e){return e.replace(/-/g,"_")}function yW({spanAttributes:e,headerKey:t,cookieKey:n,value:o,sendDefaultPii:r,lifecycle:i}){let c=tIe(n||t,o,r,!!n);if(c==null)return;let u=`http.${i}.header.${AW(t)}${n?`.${AW(n)}`:""}`;e[u]=c}function tIe(e,t,n,o=!1){let r=o?[...SW,...QRe]:SW;if(n?r.some(s=>e.includes(s)):[...eIe,...r].some(s=>e.includes(s)))return"[Filtered]";if(Array.isArray(t))return t.map(s=>s!=null?String(s):s).join(";");if(typeof t=="string")return t}function bW(e){if(e)try{let t=new URL(e,"http://s.io").search.slice(1);return t.length?t:void 0}catch{return}}var RW,SW,QRe,eIe,_S=E(()=>{l();RW=1024*1024;SW=["auth","token","secret","session","password","passwd","pwd","key","jwt","bearer","sso","saml","csrf","xsrf","credentials","set-cookie","cookie"],QRe=[".sid","sessid","remember","oidc","pkce","nonce","__secure-","__host-","awsalb","awselb","akamai","__stripe","cognito","firebase","supabase","sb-","mfa","2fa"],eIe=["x-forwarded-","-user"]});function br(e,t){let n=Z(),o=Te();if(!n)return;let{beforeBreadcrumb:r=null,maxBreadcrumbs:i=nIe}=n.getOptions();if(i<=0)return;let a={timestamp:Us(),...e},c=r?bt(()=>r(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),o.addBreadcrumb(c,i))}var nIe,gS=E(()=>{l();pt();De();Mi();nIe=100});var NW,rIe,OW,oIe,Fa,CW=E(()=>{l();pt();Rr();rIe="FunctionToString",OW=new WeakMap,oIe=(()=>({name:rIe,setupOnce(){NW=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=ws(this),n=OW.has(Z())&&t!==void 0?t:this;return NW.apply(n,e)}}catch{}},setup(e){OW.set(e,!0)}})),Fa=oIe});function vW(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:iIe],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function aIe(e,t){if(e.type){if(e.type==="transaction"&&uIe(e,t.ignoreTransactions))return w&&b.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
12
|
+
Event: ${La(e)}`),!0}else{if(cIe(e,t.ignoreErrors))return w&&b.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
13
|
+
Event: ${La(e)}`),!0;if(fIe(e))return w&&b.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
14
|
+
Event: ${La(e)}`),!0;if(lIe(e,t.denyUrls))return w&&b.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
15
|
+
Event: ${La(e)}.
|
|
16
|
+
Url: ${hS(e)}`),!0;if(!dIe(e,t.allowUrls))return w&&b.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
17
|
+
Event: ${La(e)}.
|
|
18
|
+
Url: ${hS(e)}`),!0}return!1}function cIe(e,t){return t?.length?pS(e).some(n=>Pi(n,t)):!1}function uIe(e,t){if(!t?.length)return!1;let n=e.transaction;return n?Pi(n,t):!1}function lIe(e,t){if(!t?.length)return!1;let n=hS(e);return n?Pi(n,t):!1}function dIe(e,t){if(!t?.length)return!0;let n=hS(e);return n?Pi(n,t):!0}function pIe(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function hS(e){try{let n=[...e.exception?.values??[]].reverse().find(o=>o.mechanism?.parent_id===void 0&&o.stacktrace?.frames?.length)?.stacktrace?.frames;return n?pIe(n):null}catch{return w&&b.error(`Cannot extract url for event ${La(e)}`),null}}function fIe(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}var iIe,sIe,q_,Ha,PW=E(()=>{l();qe();De();bx();xi();ks();iIe=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],sIe="EventFilters",q_=(e={})=>{let t;return{name:sIe,setup(n){let o=n.getOptions();t=vW(e,o)},processEvent(n,o,r){if(!t){let i=r.getOptions();t=vW(e,i)}return aIe(n,t)?null:n}}},Ha=((e={})=>({...q_(e),name:"InboundFilters"}))});function LW(e,t,n,o,r,i){if(!r.exception?.values||!i||!Ci(i.originalException,Error))return;let s=r.exception.values.length>0?r.exception.values[r.exception.values.length-1]:void 0;s&&(r.exception.values=$x(e,t,o,i.originalException,n,r.exception.values,s,0))}function $x(e,t,n,o,r,i,s,a){if(i.length>=n+1)return i;let c=[...i];if(Ci(o[r],Error)){xW(s,a,o);let u=e(t,o[r]),d=c.length;MW(u,r,d,a),c=$x(e,t,n,o[r],r,[u,...c],u,d)}return wW(o)&&o.errors.forEach((u,d)=>{if(Ci(u,Error)){xW(s,a,o);let p=e(t,u),f=c.length;MW(p,`errors[${d}]`,f,a),c=$x(e,t,n,u,r,[p,...c],p,f)}}),c}function wW(e){return Array.isArray(e.errors)}function xW(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...wW(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function MW(e,t,n,o){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:o}}var DW=E(()=>{l();en()});var mIe,_Ie,gIe,hIe,za,kW=E(()=>{l();DW();vx();mIe="cause",_Ie=5,gIe="LinkedErrors",hIe=((e={})=>{let t=e.limit||_Ie,n=e.key||mIe;return{name:gIe,preprocessEvent(o,r,i){let s=i.getOptions();LW(Cx,s.stackParser,n,t,o,r)}}}),za=hIe});function UW(e){let t={},n=0;for(;n<e.length;){let o=e.indexOf("=",n);if(o===-1)break;let r=e.indexOf(";",n);if(r===-1)r=e.length;else if(r<o){n=e.lastIndexOf(";",o-1)+1;continue}let i=e.slice(n,o).trim();if(t[i]===void 0){let s=e.slice(o+1,r).trim();s.charCodeAt(0)===34&&(s=s.slice(1,-1));try{t[i]=s.indexOf("%")!==-1?decodeURIComponent(s):s}catch{t[i]=s}}n=r+1}return t}var $W=E(()=>{l()});function Gx(e){let t={};for(let i of Object.keys(e))t[i.toLowerCase()]=e[i];return Bx.map(i=>{let s=t[i.toLowerCase()],a=Array.isArray(s)?s.join(";"):s;return i==="Forwarded"?EIe(a):a?.split(",").map(c=>c.trim())}).reduce((i,s)=>s?i.concat(s):i,[]).find(i=>i!==null&&TIe(i))||null}function EIe(e){if(!e)return null;for(let t of e.split(";"))if(t.startsWith("for="))return t.slice(4);return null}function TIe(e){return/(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-fA-F\d]{1,4}:){7}(?:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,2}|:)|(?:[a-fA-F\d]{1,4}:){4}(?:(?::[a-fA-F\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,3}|:)|(?:[a-fA-F\d]{1,4}:){3}(?:(?::[a-fA-F\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,4}|:)|(?:[a-fA-F\d]{1,4}:){2}(?:(?::[a-fA-F\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,5}|:)|(?:[a-fA-F\d]{1,4}:){1}(?:(?::[a-fA-F\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)/.test(e)}var Bx,BW=E(()=>{l();Bx=["X-Client-IP","X-Forwarded-For","Fly-Client-IP","CF-Connecting-IP","Fastly-Client-Ip","True-Client-Ip","X-Real-IP","X-Cluster-Client-IP","X-Forwarded","Forwarded-For","Forwarded","X-Vercel-Forwarded-For"]});function RIe(e,t,n,o){if(e.request={...e.request,...GW(t,o)},o.ip){let r=t.headers&&Gx(t.headers)||n.ipAddress;r&&(e.user={...e.user,ip_address:r})}}function IIe(e,t,n,o,r){let i=GW(t,o),s={};if(i.url&&(s["url.full"]=i.url),i.method&&(s["http.request.method"]=i.method),i.query_string&&(s["url.query"]=bIe(i.query_string)),zt(e,s),i.cookies&&Object.keys(i.cookies).length>0){let a=Object.entries(i.cookies).map(([u,d])=>`${u}=${d}`).join("; "),c=oi({cookie:a},r??!1,"request");zt(e,c)}if(i.headers){let a=oi(i.headers,r??!1,"request");zt(e,a)}if(i.data!=null){let a=typeof i.data=="string"?i.data:JSON.stringify(i.data);a&&zt(e,{"http.request.body.data":a})}if(o.ip){let a=t.headers&&Gx(t.headers)||n||void 0;a&&zt(e,{[E_]:a})}}function GW(e,t){let n={},o={...e.headers};if(t.headers&&(n.headers=o,t.cookies||delete o.cookie,!t.ip)){let r=new Set(Bx.map(i=>i.toLowerCase()));for(let i of Object.keys(o))r.has(i.toLowerCase())&&delete o[i]}if(n.method=e.method,t.url&&(n.url=e.url),t.cookies){let r=e.cookies||(o?.cookie?UW(o.cookie):void 0);n.cookies=r||{}}return t.query_string&&(n.query_string=e.query_string),t.data&&(n.data=e.data),n}function bIe(e){return typeof e=="string"?e||void 0:(Array.isArray(e)?e:Object.entries(e)).map(([o,r])=>`${o}=${r}`).join("&")||void 0}var SIe,AIe,yIe,qa,jW=E(()=>{l();pt();St();$W();_S();BW();rS();SIe={cookies:!0,data:!0,headers:!0,query_string:!0,url:!0},AIe="RequestData",yIe=((e={})=>{let t={...SIe,...e.include};return{name:AIe,processEvent(n,o,r){let{sdkProcessingMetadata:i={}}=n,{normalizedRequest:s,ipAddress:a}=i,c={...t,ip:t.ip??r.getOptions().sendDefaultPii};return s&&RIe(n,s,{ipAddress:a},c),n},processSegmentSpan(n,o){let{sdkProcessingMetadata:r={}}=Te().getScopeData(),{normalizedRequest:i,ipAddress:s}=r;if(!i)return;let{sendDefaultPii:a}=o.getOptions(),c={...t,ip:t.ip??a};IIe(n,i,s,c,a)}}}),qa=yIe});function VW(e){let t="console",n=lu(t,e);return Ms(t,NIe),n}function NIe(){"console"in Ee&&uu.forEach(function(e){e in Ee.console&&__(Ee.console,e,function(t){return Xo[e]=t,function(...n){Ni("console",{args:n,level:e}),Xo[e]?.apply(Ee.console,n)}})})}var FW=E(()=>{l();De();Rr();An();f_()});function HW(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var zW=E(()=>{l()});var ES,qW,Y_,jx=E(()=>{l();ES=new WeakMap,qW=(e,t)=>{let n=ES.get(e);n?n.push(t):ES.set(e,[t])},Y_=e=>{let t=ES.get(e);return t||(t=[],ES.set(e,t)),t}});var wu,YW,Du,TS,WW,KW,Vx=E(()=>{l();wu="express.name",YW="http.route",Du="express.type",TS="router",WW="middleware",KW="request_handler"});function OIe(e){return e.includes(":")||e.includes("*")}function e4(e,t){let n=Y_(e);if(n.length===0)return;if(n.every(i=>i==="/"))return e.originalUrl==="/"?"/":void 0;if(t==="*"||t.includes("/")&&(t.includes(",")||t.includes("\\")||t.includes("*")||t.includes("[")))return t;let o=t.startsWith("/")?t:`/${t}`;return o.length>0&&(e.originalUrl===o||e.originalUrl.startsWith(o)||OIe(o))?o:void 0}function t4(e){let t=Y_(e),n="";for(let o of t)o==="/"||o==="/*"||(n+=!n||n.endsWith("/")?o:`/${o}`);return n.replace(/\/{2,}/g,"/")}var Fx,JW,XW,QW,SS,ZW,AS,n4,r4,Hx=E(()=>{l();jx();Vx();ks();Fx=e=>e instanceof Error?[e,e.message]:[String(e),String(e)];JW=(e,t,n)=>{if(t.name==="router"){let o=XW("",t),r=o||n||e||"/";return{attributes:{[wu]:r,[Du]:TS},name:`router - ${r}`}}else return t.name==="bound dispatch"||t.name==="handle"?{attributes:{[wu]:(e||n)??"request handler",[Du]:KW},name:`request handler${t.path?` - ${e||n}`:""}`}:{attributes:{[wu]:t.name,[Du]:WW},name:`middleware - ${t.name}`}},XW=(e,t)=>{let n=Array.isArray(t.handle?.stack)?t.handle?.stack?.[0]:void 0;return n?.route?.path?`${e}${n.route.path}`:n&&Array.isArray(n?.handle?.stack)?XW(e,n):e},QW=(e,t,n)=>{if(Array.isArray(n?.ignoreLayersType)&&n?.ignoreLayersType?.includes(t))return!0;if(!Array.isArray(n?.ignoreLayers))return!1;try{return Pi(e,n.ignoreLayers,!0)}catch{}return!1};SS=e=>{let t=e[0];return Array.isArray(t)?t.map(n=>ZW(n)||"").join(","):ZW(t)},ZW=e=>typeof e=="string"?e:e instanceof RegExp||typeof e=="number"?String(e):void 0,AS=e=>n4(e?.Router?.prototype),n4=e=>(typeof e=="object"||typeof e=="function")&&!!e&&"route"in e&&typeof e.route=="function",r4=e=>n4(e.Router)&&!AS(e)});function o4(e){if(!Te()?.getScopeData()?.sdkProcessingMetadata?.normalizedRequest){let n=np(e);Te().setSDKProcessingMetadata({normalizedRequest:n})}}var i4=E(()=>{l();pt();_S()});function yS(e,t,n){if(!t?.handle)return;let o=t,r=o.handle;if(ws(r)||r.length===4)return;function i(s,a,...c){let u=e();o4(s);let d=Gn();if(!d)return r.apply(this,[s,a,...c]);n&&qW(s,n);let p=Y_(s),f=!!n,m=t4(s),_=e4(s,m);u.onRouteResolved?.(_);let h=JW(m,o,n),T=h.attributes[wu],S=h.attributes[Du],y=Object.assign(h.attributes,{[te]:"auto.http.express",[oe]:`${S}.express`});if(_&&(y[YW]=_),QW(h.attributes[wu],S,u))return f&&p.pop(),r.apply(this,[s,a,...c]);let v=Te();if(v!==go()){if(S==="request_handler"){let x=s.method?s.method.toUpperCase():"GET";v.setTransactionName(`${x} ${m}`)}}else w&&b.warn("Isolation scope is still default isolation scope - skipping setting transactionName");return ft({name:T,attributes:y},x=>{let P=!1;h.attributes[Du]===TS&&(x.end(),P=!0);let N=()=>{P||(P=!0,x.end())};for(let F=0;F<c.length;F++){let se=c[F];if(typeof se=="function"){c[F]=function(...$){let G=$[0],Q=!!G&&G!=="route"&&G!=="router";if(!P&&Q){let[J,D]=Fx(G);x.setStatus({code:2,message:D})}return P||(P=!0,a.removeListener("finish",N),x.end()),!(s.route&&Q)&&f&&p.pop(),Jr(d,()=>se.apply(this,$))};break}}try{return r.apply(this,[s,a,...c])}catch(F){let[se,$]=Fx(F);throw x.setStatus({code:2,message:$}),F}finally{P||a.once("finish",N)}})}for(let s in r)s in i||Object.defineProperty(i,s,{get(){return r[s]},set(a){r[s]=a}});pu(i,r),Object.defineProperty(o,"handle",{enumerable:!0,configurable:!0,writable:!0,value:i})}var s4=E(()=>{l();qe();St();De();nn();Rr();pt();So();jx();Vx();Hx();HT();i4()});function RS(e){return!!e&&typeof e=="object"&&"default"in e&&e.default||e}var zx=E(()=>{l()});function CIe(e){return!!e.express}function vIe(){a4||(a4=!0,w&&b.warn("[Express] `patchExpressModule(options)` is deprecated. Use `patchExpressModule(moduleExports, getOptions)` instead."))}function qx(e,t){let n,o;if(!t&&CIe(e)){let{express:d,...p}=e;o=d,n=()=>p,vIe()}else{if(typeof t!="function")throw new TypeError("`patchExpressModule(moduleExports, getOptions)` requires a `getOptions` callback");n=t,o=e}let r=RS(o),i=AS(r)?r.Router.prototype:r4(r)?r.Router:void 0;if(!i)throw new TypeError("no valid Express route function to instrument");let s=i.route;try{fu(i,"route",function(...p){let f=s.apply(this,p),m=this.stack[this.stack.length-1];return yS(n,m,SS(p)),f})}catch(d){w&&b.error("Failed to patch express route method:",d)}let a=i.use;try{fu(i,"use",function(...p){let f=a.apply(this,p),m=this.stack[this.stack.length-1];return m&&yS(n,m,SS(p)),f})}catch(d){w&&b.error("Failed to patch express use method:",d)}let{application:c}=r,u=c.use;try{fu(c,"use",function(...p){let f=u.apply(this,p),m=AS(r)?this.router:this._router;if(m){let _=m.stack[m.stack.length-1];_&&yS(n,_,SS(p))}return f})}catch(d){w&&b.error("Failed to patch express application.use method:",d)}return r}var a4,c4=E(()=>{l();De();qe();Hx();Rr();s4();zx();a4=!1});function xIe(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=PIe.exec(t);return n?n.slice(1):[]}function Yx(e){let t=xIe(e),n=t[0]||"",o=t[1];return!n&&!o?".":(o&&(o=o.slice(0,o.length-1)),n+o)}var PIe,u4=E(()=>{l();PIe=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/});function Jx(e,t){return!e||typeof e!="function"?(w&&b.warn("instrumentPostgresJsSql: provided value is not a valid postgres.js sql instance"),e):Zx(e,{requireParentSpan:!0,...t})}function Zx(e,t,n){if(e[Wx])return e;let o=new Proxy(e,{apply(r,i,s){let a=Reflect.apply(r,i,s);return a&&typeof a=="object"&&"handle"in a&&d4(a,o,t),a},get(r,i){let s=r[i];return typeof i!="string"||typeof s!="function"?s:i==="unsafe"||i==="file"?wIe(s,r,o,t):i==="begin"||i==="reserve"?DIe(s,r,o,t):s}});return n?o[IS]=n:GIe(e,o),e[Wx]=!0,o[Wx]=!0,o}function wIe(e,t,n,o){return function(...r){let i=Reflect.apply(e,t,r);return i&&typeof i=="object"&&"handle"in i&&d4(i,n,o),i}}function DIe(e,t,n,o){return function(...r){let i=n[IS];if(!(typeof r[r.length-1]=="function")){let d=Reflect.apply(e,t,r);return d&&typeof d.then=="function"?d.then(p=>Zx(p,o,i)):d}let a=r.length===1?r[0]:r[1],c=function(d){let p=Zx(d,o,i);return a(p)},u=r.length===1?[c]:[r[0],c];return Reflect.apply(e,t,u)}}function d4(e,t,n){if(e.handle?.__sentryWrapped)return;e[LIe]=!0;let o=e.handle,r=async function(...i){if(!kIe(n))return o.apply(this,i);let s=UIe(e.strings),a=$Ie(s);return ft({name:a||"postgresjs.query",op:"db"},c=>{c.setAttribute(te,"auto.db.postgresjs"),c.setAttributes({"db.system.name":"postgres","db.query.text":a});let u=t?t[IS]:void 0;if(BIe(c,u),n.requestHook)try{n.requestHook(c,a,u)}catch(p){c.setAttribute("sentry.hook.error","requestHook failed"),w&&b.error("Error in requestHook for PostgresJs instrumentation:",p)}let d=this;d.resolve=new Proxy(d.resolve,{apply:(p,f,m)=>{try{l4(c,a,m?.[0]?.command),c.end()}catch(_){w&&b.error("Error ending span in resolve callback:",_)}return Reflect.apply(p,f,m)}}),d.reject=new Proxy(d.reject,{apply:(p,f,m)=>{try{c.setStatus({code:2,message:m?.[0]?.message||"unknown_error"}),c.setAttribute("db.response.status_code",m?.[0]?.code||"unknown"),c.setAttribute("error.type",m?.[0]?.name||"unknown"),l4(c,a),c.end()}catch(_){w&&b.error("Error ending span in reject callback:",_)}return Reflect.apply(p,f,m)}});try{return o.apply(this,i)}catch(p){throw c.setStatus({code:2,message:p instanceof Error?p.message:"unknown_error"}),c.end(),p}})};r.__sentryWrapped=!0,e.handle=r}function kIe(e){return Gn()!==void 0||!e.requireParentSpan}function UIe(e){if(e?.length)return e.length===1?e[0]||void 0:e.reduce((t,n,o)=>o===0?n:`${t}$${o}${n}`,"")}function $Ie(e){return e?(Kx||(Kx=new RegExp("(?<!\\$)-?\\b\\d+\\b","g")),e.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(Kx,"?").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"}function BIe(e,t){if(t&&(t.ATTR_DB_NAMESPACE&&e.setAttribute("db.namespace",t.ATTR_DB_NAMESPACE),t.ATTR_SERVER_ADDRESS&&e.setAttribute("server.address",t.ATTR_SERVER_ADDRESS),t.ATTR_SERVER_PORT!==void 0)){let n=parseInt(t.ATTR_SERVER_PORT,10);isNaN(n)||e.setAttribute("server.port",n)}}function l4(e,t,n){if(n){e.setAttribute("db.operation.name",n);return}let o=t?.match(MIe);o?.[1]&&e.setAttribute("db.operation.name",o[1].toUpperCase())}function GIe(e,t){let n=e;if(!n.options||typeof n.options!="object")return;let o=n.options,r=o.host?.[0]||"localhost",i=o.port?.[0]||5432,s={ATTR_DB_NAMESPACE:typeof o.database=="string"&&o.database!==""?o.database:void 0,ATTR_SERVER_ADDRESS:r,ATTR_SERVER_PORT:String(i)};t[IS]=s}var MIe,IS,Wx,LIe,Kx,p4=E(()=>{l();qe();St();De();nn();So();MIe=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,IS=Symbol("sentryPostgresConnectionContext"),Wx=Symbol.for("sentry.instrumented.postgresjs"),LIe=Symbol.for("sentry.query.from.instrumented.sql")});function VIe(e,t){let n={category:"console",data:{arguments:t,logger:"console"},level:HW(e),message:f4(t)};if(e==="assert")if(t[0]===!1){let o=t.slice(1);n.message=o.length>0?`Assertion failed: ${f4(o)}`:"Assertion failed",n.data.arguments=o}else return;br(n,{input:t,level:e})}function f4(e){return"util"in Ee&&typeof Ee.util.format=="function"?Ee.util.format(...e):pP(e," ")}var jIe,Xx,m4=E(()=>{l();gS();pt();FW();De();zW();ks();An();jIe="Console",Xx=(e={})=>{let t=new Set(e.levels||uu);return{name:jIe,setup(n){let o=VW(({args:r,level:i})=>{Z()!==n||!t.has(i)||VIe(i,r)});n.registerCleanup(o)}}}});var FIe,HIe,Qx,_4=E(()=>{l();pt();St();nn();FIe="ConversationId",HIe=(()=>({name:FIe,setup(e){e.on("spanStart",t=>{let n=Pe().getScopeData(),o=Te().getScopeData(),r=n.conversationId||o.conversationId;if(r){let{op:i,data:s,description:a}=_e(t);if(!i?.startsWith("gen_ai.")&&!s["ai.operationId"]&&!a?.startsWith("ai."))return;t.setAttribute($P,r)}})}})),Qx=HIe});var Vi,Ys,W_=E(()=>{l();Vi="@sentry/instrumentation-http",Ys="http.client.request.created"});function K_(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}var eM=E(()=>{l()});function bS(e){let t=e.host||"",n=/^(.*):(\d+)$/.exec(t),o=n?n[1]:t,r=e.port??(n?Number(n[2]):void 0);return{method:e.method,port:r,protocol:e.protocol,host:e.host,hostname:o,path:e.path,headers:e.getHeaders()}}function tM(e){return String(g4(e))}function g4(e){let t=e.protocol||"http:",o=e.headers?.host&&String(e.headers?.host)||e.hostname||e.host||"",r=!e.port||e.port===80||e.port===443||/^(.*):(\d+)$/.test(o)?"":`:${e.port}`,i=e.path?e.path:"/";return new URL(i,`${t}//${o}${r}`)}function ii(e){return String(tM(bS(e)))}var rp=E(()=>{l()});function h4(e,t){let n=ii(e),o=Bi(n),r=t?.statusCode,i=K_(r);br({category:"http",data:{status_code:r,url:Gi(o),"http.method":e.method||"GET",...o.search?{"http.query":o.search}:{},...o.hash?{"http.fragment":o.hash}:{}},type:"http",level:i},{event:"response",request:e,response:t})}var E4=E(()=>{l();gS();eM();B_();rp()});var Nr,nM=E(()=>{l();Nr=class{constructor(t){this._maxSize=t,this._cache=new Map}get size(){return this._cache.size}get(t){let n=this._cache.get(t);if(n!==void 0)return this._cache.delete(t),this._cache.set(t,n),n}set(t,n){if(this._cache.size>=this._maxSize){let o=this._cache.keys().next().value;this._cache.delete(o)}this._cache.set(t,n)}remove(t){let n=this._cache.get(t);return n&&this._cache.delete(t),n}clear(){this._cache.clear()}keys(){return Array.from(this._cache.keys())}values(){let t=[];return this._cache.forEach(n=>t.push(n)),t}}});function T4(e){let t=ii(e),[n,o]=ax(Nu(t),"client","auto.http.client",e),r=e.getHeader("user-agent");return{name:n,attributes:{[oe]:"http.client","otel.kind":"CLIENT","http.url":t,"http.method":e.method,"http.target":e.path||"/","net.peer.name":e.host,"http.host":e.getHeader("host"),...r?{"user_agent.original":r}:{},...o},onlyIfParent:!0}}function S4(e,t){let{statusCode:n,statusMessage:o,httpVersion:r,socket:i}=e,s=r?.toUpperCase()!=="QUIC"?"ip_tcp":"ip_udp";t.setAttributes({"http.response.status_code":n,"network.protocol.version":r,"http.flavor":r,"network.transport":s,"net.transport":s,"http.status_text":o?.toUpperCase(),"http.status_code":n,...qIe(e),...zIe(i)})}function zIe(e){if(!e)return{};let{remoteAddress:t,remotePort:n}=e;return{"network.peer.address":t,"network.peer.port":n,"net.peer.ip":t,"net.peer.port":n}}function qIe(e){let{headers:t}=e,n=t["content-length"],o=n?parseInt(String(n),10):-1,r=t["content-encoding"];return o>=0?r&&r!=="identity"?{"http.response_content_length":o}:{"http.response_content_length_uncompressed":o}:{}}var A4=E(()=>{l();St();B_();rp()});function NS(e,t){let n=ii(e),o=Z()?.getOptions(),{tracePropagationTargets:r,propagateTraceparent:i}=o??{};if(!Lu(n,r,t)||!!e.getHeader("sentry-trace"))return;let a=Va({propagateTraceparent:i});if(!a)return;let{"sentry-trace":c,baggage:u,traceparent:d}=a;if(c)try{e.setHeader("sentry-trace",c),w&&b.log(Vi,"Added sentry-trace header")}catch(p){w&&b.error(Vi,"Failed to set sentry-trace header:",Oi(p)?p.message:"Unknown error")}if(d&&!e.getHeader("traceparent"))try{e.setHeader("traceparent",d),w&&b.log(Vi,"Added traceparent header")}catch(p){w&&b.error(Vi,"Failed to set traceparent header:",Oi(p)?p.message:"Unknown error")}if(u){let p=Pd(e.getHeader("baggage"),u);if(p)try{e.setHeader("baggage",p),w&&b.log(Vi,"Added baggage header")}catch(f){w&&b.error(Vi,"Failed to set baggage header:",Oi(f)?f.message:"Unknown error")}}}var y4=E(()=>{l();pt();qe();De();en();wx();Dx();W_();rp();Tu()});var R4,YIe,I4,rM,b4=E(()=>{l();qe();De();R4=e=>typeof e.__unwrap=="function",YIe="Double-wrapped http.client detected. Either disable spans in Sentry.httpIntegration, or disable the OpenTelemetry HTTP instrumentation.",I4=!1,rM=w?e=>{I4||(R4(e.request)||R4(e.get))&&(I4=!0,b.warn(YIe))}:()=>{}});function Z_(e){let t=new Nr(100),n=()=>Z()?.getOptions(),o=r=>{if(Pe().getScopeData().sdkProcessingMetadata[Gd]===!0)return;let i=n(),{errorMonitor:s="error",spans:a=i?At(i):!0,propagateTrace:c=!1,breadcrumbs:u=!0,http:d,https:p,suppressOtelWarning:f=!1}=e,{request:m}=r;if(e.ignoreOutgoingRequests?.(ii(m),m))return;let _=!1;function h(P,N){_||(_=!0,h4(P,N))}function T(P){P.on(s,()=>h(P,void 0)),P.prependListener("response",N=>{P.listenerCount("response")<=1&&N.resume(),N.on("end",()=>h(P,N)),N.on(s,()=>h(P,N))})}if(!a){u&&T(m),c&&NS(m,t);return}f||(d&&rM(d),p&&rM(p));let S=Ga(T4(m));e.outgoingRequestHook?.(S,m),c&&(S.isRecording()?Jr(S,()=>{NS(m,t)}):NS(m,t));let y=!1;function v(P){y||(y=!0,S.setStatus(P),S.end())}let x=()=>v({code:0});m.on("close",x),m.on(s,P=>{w&&b.log(Vi,"outgoingRequest on request error()",P),u&&h(m,void 0),v({code:2})}),m.prependListener("response",P=>{m.removeListener("close",x),m.listenerCount("response")<=1&&P.resume(),S4(P,S),e.outgoingResponseHook?.(S,P);let N=!1;function F(se){if(!N){N=!0,se&&w&&b.log(Vi,"outgoingRequest on response error()",se),u&&h(m,P);let $=P.aborted&&!P.complete,G=se||typeof P.statusCode!="number"||$?{code:2}:Eo(P.statusCode);e.applyCustomAttributesOnSpan?.(S,m,P),v(G)}}P.on("end",()=>F()),P.on(s,F)})};return{[Ys]:o}}var oM=E(()=>{l();E4();qe();De();pt();BP();kd();So();nM();A4();rp();y4();W_();b4()});function WIe(e,t){if(!ws(e.request)){let{[Ys]:n}=Z_({...t,http:e}),o=e.request;fu(e,"request",function(...i){let s=o.apply(this,i);return n({request:s},Ys),s})}}function KIe(e){ws(e.get)||fu(e,"get",function(n,o,r){let i=e.request.call(this,n,o,r);return i.end(),i})}function N4(e,t={}){let n=RS(e),o=e;if(n!==e){N4(n,t);for(let r of["get","request"]){let i=Object.getOwnPropertyDescriptor(n,r);i&&Object.defineProperty(o,r,i)}return o}return WIe(o,t),KIe(o),e}var OS,O4=E(()=>{l();zx();W_();Rr();oM();OS=(e,t={})=>N4(e,t)});var CS={};ht(CS,{debug:()=>JIe,error:()=>ebe,fatal:()=>tbe,fmt:()=>z_,info:()=>XIe,trace:()=>ZIe,warn:()=>QIe});function op(e,t,n,o,r){Qd({level:e,message:t,attributes:n,severityNumber:r},o)}function ZIe(e,t,{scope:n}={}){op("trace",e,t,n)}function JIe(e,t,{scope:n}={}){op("debug",e,t,n)}function XIe(e,t,{scope:n}={}){op("info",e,t,n)}function QIe(e,t,{scope:n}={}){op("warn",e,t,n)}function ebe(e,t,{scope:n}={}){op("error",e,t,n)}function tbe(e,t,{scope:n}={}){op("fatal",e,t,n)}var C4=E(()=>{l();cS();Lx()});var ku={};ht(ku,{count:()=>nbe,distribution:()=>obe,gauge:()=>rbe});function iM(e,t,n,o){$Y({type:e,name:t,value:n,unit:o?.unit,attributes:o?.attributes},{scope:o?.scope})}function nbe(e,t=1,n){iM("counter",e,t,n)}function rbe(e,t,n){iM("gauge",e,t,n)}function obe(e,t,n){iM("distribution",e,t,n)}var v4=E(()=>{l();Ix()});var P4,Fi,lt,ip,Ya,sp,Wa,ap,Ka,vS,PS,xS,Hi,ir,Za,x4,yt,qt,sr,Lt,ar,bn,M4,Xr,Vn,yo,L4,Or,Uu,w4,J_,D4,k4,sM,Ja,U4,Xa,aM,cM,zi,X_,Q_,cp,up,lp,Cr=E(()=>{l();P4="gen_ai.prompt",Fi="gen_ai.system",lt="gen_ai.request.model",ip="gen_ai.request.stream",Ya="gen_ai.request.temperature",sp="gen_ai.request.max_tokens",Wa="gen_ai.request.frequency_penalty",ap="gen_ai.request.presence_penalty",Ka="gen_ai.request.top_p",vS="gen_ai.request.top_k",PS="gen_ai.request.encoding_format",xS="gen_ai.request.dimensions",Hi="gen_ai.response.finish_reasons",ir="gen_ai.response.model",Za="gen_ai.response.id",x4="gen_ai.response.stop_reason",yt="gen_ai.usage.input_tokens",qt="gen_ai.usage.output_tokens",sr="gen_ai.usage.total_tokens",Lt="gen_ai.operation.name",ar="sentry.sdk_meta.gen_ai.input.messages.original_length",bn="gen_ai.input.messages",M4="gen_ai.output.messages",Xr="gen_ai.system_instructions",Vn="gen_ai.response.text",yo="gen_ai.request.available_tools",L4="gen_ai.response.streaming",Or="gen_ai.response.tool_calls",Uu="gen_ai.agent.name",w4="gen_ai.pipeline.name",J_="gen_ai.conversation.id",D4="gen_ai.usage.cache_creation_input_tokens",k4="gen_ai.usage.cache_read_input_tokens",sM="gen_ai.usage.input_tokens.cache_write",Ja="gen_ai.usage.input_tokens.cached",U4="gen_ai.invoke_agent",Xa="gen_ai.embeddings.input",aM="gen_ai.embeddings",cM="gen_ai.execute_tool",zi="gen_ai.tool.name",X_="gen_ai.tool.call.id",Q_="gen_ai.tool.type",cp="gen_ai.tool.input",up="gen_ai.tool.output",lp="gen_ai.tool.description"});function Qa(e){return!e||typeof e!="object"?!1:sbe(e)||B4(e)||ibe(e)||G4(e)||j4(e)||abe(e)||cbe(e)||ube(e)||lbe(e)||dbe(e)||pbe(e)||fbe(e)}function ibe(e){return"image_url"in e?typeof e.image_url=="string"?e.image_url.startsWith("data:"):$4(e):!1}function $4(e){return"image_url"in e&&!!e.image_url&&typeof e.image_url=="object"&&"url"in e.image_url&&typeof e.image_url.url=="string"&&e.image_url.url.startsWith("data:")}function sbe(e){return"type"in e&&typeof e.type=="string"&&"source"in e&&Qa(e.source)}function B4(e){return"inlineData"in e&&!!e.inlineData&&typeof e.inlineData=="object"&&"data"in e.inlineData&&typeof e.inlineData.data=="string"}function G4(e){return"type"in e&&e.type==="input_audio"&&"input_audio"in e&&!!e.input_audio&&typeof e.input_audio=="object"&&"data"in e.input_audio&&typeof e.input_audio.data=="string"}function j4(e){return"type"in e&&e.type==="file"&&"file"in e&&!!e.file&&typeof e.file=="object"&&"file_data"in e.file&&typeof e.file.file_data=="string"}function abe(e){return"media_type"in e&&typeof e.media_type=="string"&&"data"in e}function cbe(e){return"type"in e&&e.type==="file"&&"mediaType"in e&&typeof e.mediaType=="string"&&"data"in e&&typeof e.data=="string"&&!e.data.startsWith("http://")&&!e.data.startsWith("https://")}function ube(e){return"type"in e&&e.type==="image"&&"image"in e&&typeof e.image=="string"&&!e.image.startsWith("http://")&&!e.image.startsWith("https://")}function lbe(e){return"type"in e&&(e.type==="blob"||e.type==="base64")}function dbe(e){return"b64_json"in e}function pbe(e){return"type"in e&&"result"in e&&e.type==="image_generation"}function fbe(e){return"uri"in e&&typeof e.uri=="string"&&e.uri.startsWith("data:")}function $u(e){let t={...e};Qa(t.source)&&(t.source=$u(t.source)),B4(e)&&(t.inlineData={...e.inlineData,data:eg}),$4(e)&&(t.image_url={...e.image_url,url:eg}),G4(e)&&(t.input_audio={...e.input_audio,data:eg}),j4(e)&&(t.file={...e.file,file_data:eg});for(let n of mbe)typeof t[n]=="string"&&(t[n]=eg);return t}var eg,mbe,uM=E(()=>{l();eg="[Blob substitute]",mbe=["image_url","data","content","b64_json","result","uri","image"]});function LS(e,t){if(MS(e)<=t)return e;let n=0,o=e.length,r="";for(;n<=o;){let i=Math.floor((n+o)/2),s=e.slice(0,i);MS(s)<=t?(r=s,n=i+1):o=i-1}return r}function _be(e){return typeof e=="string"?e:"text"in e&&typeof e.text=="string"?e.text:""}function V4(e,t){return typeof e=="string"?t:{...e,text:t}}function gbe(e){return e!==null&&typeof e=="object"&&"content"in e&&typeof e.content=="string"}function H4(e){return e!==null&&typeof e=="object"&&"content"in e&&Array.isArray(e.content)}function z4(e){return e!==null&&typeof e=="object"&&"parts"in e&&Array.isArray(e.parts)&&e.parts.length>0}function hbe(e,t){let n={...e,content:""},o=dM(n),r=t-o;if(r<=0)return[];let i=LS(e.content,r);return[{...e,content:i}]}function Ebe(e){return"parts"in e&&Array.isArray(e.parts)?{key:"parts",items:e.parts}:"content"in e&&Array.isArray(e.content)?{key:"content",items:e.content}:{key:null,items:[]}}function Tbe(e,t){let{key:n,items:o}=Ebe(e);if(n===null||o.length===0)return[];let r=o.map(c=>V4(c,"")),i=dM({...e,[n]:r}),s=t-i;if(s<=0)return[];let a=[];for(let c of o){let u=_be(c),d=MS(u);if(d<=s)a.push(c),s-=d;else if(a.length===0){let p=LS(u,s);p&&a.push(V4(c,p));break}else break}return a.length<=0?[]:[{...e,[n]:a}]}function Sbe(e,t){if(!e)return[];if(typeof e=="string"){let n=LS(e,t);return n?[n]:[]}return typeof e!="object"?[]:gbe(e)?hbe(e,t):H4(e)||z4(e)?Tbe(e,t):[]}function lM(e){return e.map(n=>{let o;return n&&typeof n=="object"&&(H4(n)?o={...n,content:lM(n.content)}:"content"in n&&Qa(n.content)&&(o={...n,content:$u(n.content)}),z4(n)&&(o={...o??n,parts:lM(n.parts)}),Qa(o)?o=$u(o):Qa(n)&&(o=$u(n))),o??n})}function Abe(e,t){if(!Array.isArray(e)||e.length===0)return e;let n=t-2,o=e[e.length-1],r=lM([o]),i=r[0];return dM(i)<=n?r:Sbe(i,n)}function q4(e){return Abe(e,F4)}function Y4(e){return LS(e,F4)}var F4,MS,dM,W4=E(()=>{l();uM();F4=2e4,MS=e=>new TextEncoder().encode(e).length,dM=e=>MS(JSON.stringify(e))});function Qr(e){let t=!!Z()?.getOptions().sendDefaultPii;return{...e,recordInputs:e?.recordInputs??t,recordOutputs:e?.recordOutputs??t}}function Fn(e){let t=Z();return e??!(t&&jn(t))}function dp(e,t){return e?`${e}.${t}`:t}function K4(e,t,n,o,r){if(t!==void 0&&e.setAttributes({[yt]:t}),n!==void 0&&e.setAttributes({[qt]:n}),t!==void 0||n!==void 0||o!==void 0||r!==void 0){let i=(t??0)+(n??0)+(o??0)+(r??0);e.setAttributes({[sr]:i})}}function Bu(e,t,n){if(!e.isRecording())return;let o={[L4]:!0};t.responseId&&(o[Za]=t.responseId),t.responseModel&&(o[ir]=t.responseModel),t.promptTokens!==void 0&&(o[yt]=t.promptTokens),t.completionTokens!==void 0&&(o[qt]=t.completionTokens),t.totalTokens!==void 0?o[sr]=t.totalTokens:(t.promptTokens!==void 0||t.completionTokens!==void 0||t.cacheCreationInputTokens!==void 0||t.cacheReadInputTokens!==void 0)&&(o[sr]=(t.promptTokens??0)+(t.completionTokens??0)+(t.cacheCreationInputTokens??0)+(t.cacheReadInputTokens??0)),t.finishReasons.length&&(o[Hi]=JSON.stringify(t.finishReasons)),n&&t.responseTexts.length&&(o[Vn]=t.responseTexts.join("")),n&&t.toolCalls.length&&(o[Or]=JSON.stringify(t.toolCalls)),e.setAttributes(o),e.end()}function vr(e){return typeof e=="string"?e:JSON.stringify(e)}function Pr(e){if(typeof e=="string")return Y4(e);if(Array.isArray(e)){let t=q4(e);return JSON.stringify(t)}return JSON.stringify(e)}function eo(e){if(!Array.isArray(e))return{systemInstructions:void 0,filteredMessages:e};let t=e.findIndex(s=>s&&typeof s=="object"&&"role"in s&&s.role==="system");if(t===-1)return{systemInstructions:void 0,filteredMessages:e};let n=e[t],o=typeof n.content=="string"?n.content:n.content!==void 0?JSON.stringify(n.content):void 0;if(!o)return{systemInstructions:void 0,filteredMessages:e};let r=JSON.stringify([{type:"text",content:o}]),i=[...e.slice(0,t),...e.slice(t+1)];return{systemInstructions:r,filteredMessages:i}}async function ybe(e,t,n){let o=e.catch(s=>{throw he(s,{mechanism:{handled:!1,type:n}}),s}),r=await t,i=await o;return i&&typeof i=="object"&&"data"in i?{...i,data:r}:r}function pp(e,t,n){return yn(e)?new Proxy(e,{get(o,r){let s=r in Promise.prototype||r===Symbol.toStringTag?t:o,a=Reflect.get(s,r);return r==="withResponse"&&typeof a=="function"?function(){let u=a.call(o);return ybe(u,t,n)}:typeof a=="function"?a.bind(s):a}}):t}var xr=E(()=>{l();or();pt();bu();en();Cr();W4()});var tg,wS,pM,fM=E(()=>{l();tg=new Map,wS=new Map,pM=new Map([["ai.generateText","invoke_agent"],["ai.streamText","invoke_agent"],["ai.generateObject","invoke_agent"],["ai.streamObject","invoke_agent"],["ai.generateText.doGenerate","generate_content"],["ai.streamText.doStream","generate_content"],["ai.generateObject.doGenerate","generate_content"],["ai.streamObject.doStream","generate_content"],["ai.embed.doEmbed","embeddings"],["ai.embedMany.doEmbed","embeddings"],["ai.rerank.doRerank","rerank"],["ai.toolCall","execute_tool"]])});var DS,kS,US,Z4,J4,mM,_M,gM,X4,Gu,Ws,ng,Q4,e2,t2,n2,r2,o2,hM,EM,i2,s2,TM=E(()=>{l();DS="operation.name",kS="ai.operationId",US="ai.prompt",Z4="ai.schema",J4="ai.response.object",mM="ai.values",_M="ai.response.text",gM="ai.response.toolCalls",X4="ai.response.finishReason",Gu="ai.prompt.messages",Ws="ai.prompt.tools",ng="ai.model.id",Q4="ai.response.providerMetadata",e2="ai.usage.cachedInputTokens",t2="ai.telemetry.functionId",n2="ai.usage.completionTokens",r2="ai.usage.promptTokens",o2="ai.usage.tokens",hM="ai.toolCall.name",EM="ai.toolCall.id",i2="ai.toolCall.args",s2="ai.toolCall.result"});function c2(e,t){let n=e.parent_span_id;if(!n)return;let o=e.data[yt],r=e.data[qt];if(typeof o=="number"||typeof r=="number"){let i=t.get(n)||{inputTokens:0,outputTokens:0};typeof o=="number"&&(i.inputTokens+=o),typeof r=="number"&&(i.outputTokens+=r),t.set(n,i)}}function SM(e,t){let n=t.get(e.span_id);!n||!e.data||(n.inputTokens>0&&(e.data[yt]=n.inputTokens),n.outputTokens>0&&(e.data[qt]=n.outputTokens),(n.inputTokens>0||n.outputTokens>0)&&(e.data["gen_ai.usage.total_tokens"]=n.inputTokens+n.outputTokens))}function Rbe(e){let t=new Map;for(let n of e){let o=n.data[yo];if(typeof o=="string")try{let r=JSON.parse(o);for(let i of r)i.name&&i.description&&!t.has(i.name)&&t.set(i.name,i.description)}catch{}}return t}function u2(e,t){let n=Rbe(e);for(let o of e){if(o.op==="gen_ai.execute_tool"){let r=o.data[zi];if(typeof r=="string"){let i=n.get(r);i&&(o.data[lp]=i)}}o.op==="gen_ai.invoke_agent"&&SM(o,t)}}function AM(e){return tg.get(e)}function yM(e){tg.delete(e)}function l2(e){let t=e.map(n=>{if(typeof n=="string")try{return JSON.parse(n)}catch{return n}return n});return JSON.stringify(t)}function a2(e){return e.filter(t=>!!t&&typeof t=="object"&&"role"in t&&"content"in t)}function Ibe(e){try{let t=JSON.parse(e);if(t&&typeof t=="object"){let{messages:n}=t,{prompt:o,system:r}=t,i=[];if(typeof r=="string"&&i.push({role:"system",content:r}),typeof n=="string")try{n=JSON.parse(n)}catch{}if(Array.isArray(n))return i.push(...a2(n)),i;if(Array.isArray(o))return i.push(...a2(o)),i;if(typeof o=="string"&&i.push({role:"user",content:o}),i.length>0)return i}}catch{}return[]}function d2(e,t,n){if(typeof t[US]=="string"&&!t[bn]&&!t[Gu]){let o=t[US],r=Ibe(o);if(r.length){let{systemInstructions:i,filteredMessages:s}=eo(r);i&&e.setAttribute(Xr,i);let a=Array.isArray(s)?s.length:0,c=n?Pr(s):vr(s);e.setAttributes({[US]:c,[bn]:c,[ar]:a})}}else if(typeof t[Gu]=="string")try{let o=JSON.parse(t[Gu]);if(Array.isArray(o)){let{systemInstructions:r,filteredMessages:i}=eo(o);r&&e.setAttribute(Xr,r);let s=Array.isArray(i)?i.length:0,a=n?Pr(i):vr(i);e.setAttributes({[Gu]:a,[bn]:a,[ar]:s})}}catch{}}var RM=E(()=>{l();Cr();xr();fM();TM()});function bbe(e){let{data:t,description:n}=_e(e);if(!n)return;if(t[hM]&&t[EM]&&n==="ai.toolCall"){xbe(e,t);return}if(!t[kS]&&!n.startsWith("ai."))return;let r=Z()?.getIntegrationByName("VercelAI"),i=Fn(r?.options?.enableTruncation);Mbe(e,n,t,i)}function Nbe(e){if(e.type==="transaction"&&e.spans){let t=new Map;for(let o of e.spans)vbe(o),c2(o,t);u2(e.spans,t);let n=e.contexts?.trace;n?.op==="gen_ai.invoke_agent"&&SM(n,t)}return e}function Obe(e){if(typeof e!="string")return"stop";switch(e){case"tool-calls":return"tool_call";case"stop":case"length":case"content_filter":case"error":return e;default:return e}}function Cbe(e){let t=e[_M],n=e[gM],o=e[X4];if(t==null&&n==null)return;let r=[];if(typeof t=="string"&&t.length>0&&r.push({type:"text",content:t}),n!=null)try{let i=typeof n=="string"?JSON.parse(n):n;if(Array.isArray(i)){for(let s of i){let a=s.input??s.args;r.push({type:"tool_call",id:s.toolCallId,name:s.toolName,arguments:typeof a=="string"?a:JSON.stringify(a??{})})}delete e[gM]}}catch{}if(r.length>0){let i={role:"assistant",parts:r,finish_reason:Obe(o)};e[M4]=JSON.stringify([i]),delete e[_M]}}function p2(e){if(Nn(e,n2,qt),Nn(e,r2,yt),Nn(e,e2,Ja),Nn(e,"ai.usage.inputTokens",yt),Nn(e,"ai.usage.outputTokens",qt),Nn(e,o2,yt),Nn(e,"ai.response.avgOutputTokensPerSecond","ai.response.avgCompletionTokensPerSecond"),typeof e[yt]=="number"&&typeof e[Ja]=="number"&&(e[yt]=e[yt]+e[Ja]),typeof e[yt]=="number"){let t=typeof e[qt]=="number"?e[qt]:0;e[sr]=t+e[yt]}if(e[Ws]&&Array.isArray(e[Ws])&&(e[Ws]=l2(e[Ws])),e[DS]){let t=e[kS]?e[kS]:e[DS],n=pM.get(t)??t;e[Lt]=n,delete e[DS]}if(Nn(e,Gu,bn),Cbe(e),Nn(e,J4,"gen_ai.response.object"),Nn(e,Ws,"gen_ai.request.available_tools"),Nn(e,i2,cp),Nn(e,s2,up),Nn(e,Z4,"gen_ai.request.schema"),Nn(e,ng,lt),Array.isArray(e[mM])){let t=e[mM].map(n=>{try{return JSON.parse(n)}catch{return n}});e[Xa]=t.length===1?t[0]:JSON.stringify(t)}Lbe(e);for(let t of Object.keys(e))t.startsWith("ai.")&&Nn(e,t,`vercel.${t}`)}function vbe(e){let{data:t,origin:n}=e;n==="auto.vercelai.otel"&&(e.status&&e.status!=="ok"&&(e.status="internal_error"),p2(t))}function Pbe(e){let t=e.attributes;if(t?.[te]==="auto.vercelai.otel"){if(p2(t),t[oe]==="gen_ai.execute_tool"&&e.parent_span_id){let n=wS.get(e.parent_span_id);if(n){let o=t[zi];if(typeof o=="string"){let r=n.get(o);r&&(t[lp]=r)}}}wS.delete(e.span_id)}}function Nn(e,t,n){e[t]!=null&&(e[n]=e[t],delete e[t])}function xbe(e,t){e.setAttribute(te,"auto.vercelai.otel"),e.setAttribute(oe,"gen_ai.execute_tool"),e.setAttribute(Lt,"execute_tool"),Nn(t,hM,zi),Nn(t,EM,X_);let n=t[X_];typeof n=="string"&&tg.set(n,e.spanContext()),t[Q_]||e.setAttribute(Q_,"function");let o=t[zi];o&&e.updateName(`execute_tool ${o}`)}function Mbe(e,t,n,o){e.setAttribute(te,"auto.vercelai.otel");let r=t.replace("ai.","");e.setAttribute("ai.pipeline.name",r),e.updateName(r);let i=n[t2];i&&typeof i=="string"&&e.setAttribute("gen_ai.function_id",i),d2(e,n,o),n[ng]&&!n[ir]&&e.setAttribute(ir,n[ng]),e.setAttribute("ai.streaming",t.includes("stream"));let s=pM.get(t);if(s?e.setAttribute(oe,`gen_ai.${s}`):t.startsWith("ai.stream")&&e.setAttribute(oe,"ai.run"),s==="invoke_agent"){i&&typeof i=="string"?e.updateName(`invoke_agent ${i}`):e.updateName("invoke_agent");return}let a=n[ng];a&&s&&e.updateName(`${s} ${a}`);let c=Z();if(c&&jn(c)&&n[Ws]&&Array.isArray(n[Ws])){let u=new Map;for(let d of n[Ws])try{let p=typeof d=="string"?JSON.parse(d):d;p?.name&&p?.description&&u.set(p.name,p.description)}catch{}if(u.size>0){let d=_e(e).parent_span_id;d&&wS.set(d,u)}}}function $S(e){e.on("spanStart",bbe),e.addEventProcessor(Object.assign(Nbe,{id:"VercelAiEventProcessor"})),e.on("processSpan",t=>{Pbe(t)})}function Lbe(e){let t=e[Q4];if(t)try{let n=JSON.parse(t),o=n.openai??n.azure;if(o&&(si(e,Ja,o.cachedPromptTokens),si(e,"gen_ai.usage.output_tokens.reasoning",o.reasoningTokens),si(e,"gen_ai.usage.output_tokens.prediction_accepted",o.acceptedPredictionTokens),si(e,"gen_ai.usage.output_tokens.prediction_rejected",o.rejectedPredictionTokens),e["gen_ai.conversation.id"]||si(e,"gen_ai.conversation.id",o.responseId)),n.anthropic){let r=n.anthropic.usage?.cache_read_input_tokens??n.anthropic.cacheReadInputTokens;si(e,Ja,r);let i=n.anthropic.usage?.cache_creation_input_tokens??n.anthropic.cacheCreationInputTokens;si(e,sM,i)}n.bedrock?.usage&&(si(e,Ja,n.bedrock.usage.cacheReadInputTokens),si(e,sM,n.bedrock.usage.cacheWriteInputTokens)),n.deepseek&&(si(e,Ja,n.deepseek.promptCacheHitTokens),si(e,"gen_ai.usage.input_tokens.cache_miss",n.deepseek.promptCacheMissTokens))}catch{}}function si(e,t,n){n!=null&&(e[t]=n)}var f2=E(()=>{l();pt();St();xr();nn();Cr();fM();bu();RM();TM()});var ec,m2,wbe,_2,BS=E(()=>{l();ec="OpenAI",m2={"responses.create":{operation:"chat"},"chat.completions.create":{operation:"chat"},"embeddings.create":{operation:"embeddings"},"conversations.create":{operation:"chat"}},wbe=["response.output_item.added","response.function_call_arguments.delta","response.function_call_arguments.done","response.output_item.done"],_2=["response.created","response.in_progress","response.failed","response.completed","response.incomplete","response.queued","response.output_text.delta",...wbe]});function g2(e){return e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.startsWith("response.")}function h2(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion.chunk"}function E2(e,t,n){if(!t||typeof t!="object")return;let o=t,r={};if(typeof o.id=="string"&&(r[Za]=o.id),typeof o.model=="string"&&(r[ir]=o.model),o.object==="conversation"&&typeof o.id=="string"&&(r[J_]=o.id),o.usage&&typeof o.usage=="object"){let i=o.usage,s=i.prompt_tokens??i.input_tokens;typeof s=="number"&&(r[yt]=s);let a=i.completion_tokens??i.output_tokens;typeof a=="number"&&(r[qt]=a),typeof i.total_tokens=="number"&&(r[sr]=i.total_tokens)}if(Array.isArray(o.choices)){let i=o.choices,s=i.map(a=>a.finish_reason).filter(a=>typeof a=="string");if(s.length>0&&(r[Hi]=JSON.stringify(s)),n){let a=i.map(u=>u.message?.content||"");r[Vn]=JSON.stringify(a);let c=i.map(u=>u.message?.tool_calls).filter(u=>Array.isArray(u)&&u.length>0).flat();c.length>0&&(r[Or]=JSON.stringify(c))}}if(typeof o.status=="string"&&(r[Hi]||(r[Hi]=JSON.stringify([o.status]))),n&&(typeof o.output_text=="string"&&!r[Vn]&&(r[Vn]=o.output_text),Array.isArray(o.output)&&o.output.length>0&&!r[Or])){let i=o.output.filter(s=>s?.type==="function_call");i.length>0&&(r[Or]=JSON.stringify(i))}e.setAttributes(r)}function Dbe(e){if("conversation"in e&&typeof e.conversation=="string")return e.conversation;if("previous_response_id"in e&&typeof e.previous_response_id=="string")return e.previous_response_id}function T2(e){let t={[lt]:e.model??"unknown"};"temperature"in e&&(t[Ya]=e.temperature),"top_p"in e&&(t[Ka]=e.top_p),"frequency_penalty"in e&&(t[Wa]=e.frequency_penalty),"presence_penalty"in e&&(t[ap]=e.presence_penalty),"stream"in e&&(t[ip]=e.stream),"encoding_format"in e&&(t[PS]=e.encoding_format),"dimensions"in e&&(t[xS]=e.dimensions);let n=Dbe(e);return n&&(t[J_]=n),t}var IM=E(()=>{l();Cr()});function kbe(e,t){for(let n of e){let o=n.index;if(!(o===void 0||!n.function))if(!(o in t.chatCompletionToolCalls))t.chatCompletionToolCalls[o]={...n,function:{name:n.function.name,arguments:n.function.arguments||""}};else{let r=t.chatCompletionToolCalls[o];n.function.arguments&&r?.function&&(r.function.arguments+=n.function.arguments)}}}function Ube(e,t,n){t.responseId=e.id??t.responseId,t.responseModel=e.model??t.responseModel,e.usage&&(t.promptTokens=e.usage.prompt_tokens,t.completionTokens=e.usage.completion_tokens,t.totalTokens=e.usage.total_tokens);for(let o of e.choices??[])n&&(o.delta?.content&&t.responseTexts.push(o.delta.content),o.delta?.tool_calls&&kbe(o.delta.tool_calls,t)),o.finish_reason&&t.finishReasons.push(o.finish_reason)}function $be(e,t,n,o){if(!(e&&typeof e=="object")){t.eventTypes.push("unknown:non-object");return}if(e instanceof Error){o.setStatus({code:2,message:"internal_error"}),he(e,{mechanism:{handled:!1,type:"auto.ai.openai.stream-response"}});return}if(!("type"in e))return;let r=e;if(!_2.includes(r.type)){t.eventTypes.push(r.type);return}if(n&&(r.type==="response.output_item.done"&&"item"in r&&t.responsesApiToolCalls.push(r.item),r.type==="response.output_text.delta"&&"delta"in r&&r.delta)){t.responseTexts.push(r.delta);return}if("response"in r){let{response:i}=r;t.responseId=i.id??t.responseId,t.responseModel=i.model??t.responseModel,i.usage&&(t.promptTokens=i.usage.input_tokens,t.completionTokens=i.usage.output_tokens,t.totalTokens=i.usage.total_tokens),i.status&&t.finishReasons.push(i.status),n&&i.output_text&&t.responseTexts.push(i.output_text)}}async function*S2(e,t,n){let o={eventTypes:[],responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,totalTokens:void 0,chatCompletionToolCalls:{},responsesApiToolCalls:[]};try{for await(let r of e)h2(r)?Ube(r,o,n):g2(r)&&$be(r,o,n,t),yield r}finally{let r=[...Object.values(o.chatCompletionToolCalls),...o.responsesApiToolCalls];Bu(t,{...o,toolCalls:r},n)}}var A2=E(()=>{l();or();xr();BS();IM()});function Bbe(e){let t=Array.isArray(e.tools)?e.tools:[],o=e.web_search_options&&typeof e.web_search_options=="object"?[{type:"web_search_options",...e.web_search_options}]:[],r=[...t,...o];if(r.length!==0)try{return JSON.stringify(r)}catch(i){w&&b.error("Failed to serialize OpenAI tools:",i);return}}function Gbe(e,t){let n={[Fi]:"openai",[Lt]:t,[te]:"auto.ai.openai"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){let o=e[0],r=Bbe(o);r&&(n[yo]=r),Object.assign(n,T2(o))}else n[lt]="unknown";return n}function y2(e,t,n,o){if(n==="embeddings"&&"input"in t){let a=t.input;if(a==null||typeof a=="string"&&a.length===0||Array.isArray(a)&&a.length===0)return;e.setAttribute(Xa,typeof a=="string"?a:JSON.stringify(a));return}let r="input"in t?t.input:"messages"in t?t.messages:void 0;if(!r||Array.isArray(r)&&r.length===0)return;let{systemInstructions:i,filteredMessages:s}=eo(r);i&&e.setAttribute(Xr,i),e.setAttribute(bn,o?Pr(s):vr(s)),Array.isArray(s)?e.setAttribute(ar,s.length):e.setAttribute(ar,1)}function jbe(e,t,n,o,r){return function(...s){let a=n.operation||"unknown",c=Gbe(s,a),u=c[lt]||"unknown",d=s[0],p=d&&typeof d=="object"&&d.stream===!0,f={name:`${a} ${u}`,op:`gen_ai.${a}`,attributes:c};if(p){let h,T=ft(f,S=>(h=e.apply(o,s),r.recordInputs&&d&&y2(S,d,a,Fn(r.enableTruncation)),(async()=>{try{let y=await h;return S2(y,S,r.recordOutputs??!1)}catch(y){throw S.setStatus({code:2,message:"internal_error"}),he(y,{mechanism:{handled:!1,type:"auto.ai.openai.stream",data:{function:t}}}),S.end(),y}})()));return pp(h,T,"auto.ai.openai")}let m,_=Ot(f,h=>(m=e.apply(o,s),r.recordInputs&&d&&y2(h,d,a,Fn(r.enableTruncation)),m.then(T=>(E2(h,T,r.recordOutputs),T),T=>{throw he(T,{mechanism:{handled:!1,type:"auto.ai.openai",data:{function:t}}}),T})));return pp(m,_,"auto.ai.openai")}}function R2(e,t="",n){return new Proxy(e,{get(o,r){let i=o[r],s=dp(t,String(r)),a=m2[s];return typeof i=="function"&&a?jbe(i,s,a,o,n):typeof i=="function"?i.bind(o):i&&typeof i=="object"?R2(i,s,n):i}})}function rg(e,t){return R2(e,"",Qr(t))}var I2=E(()=>{l();qe();or();St();De();So();Cr();xr();BS();A2();IM()});var tc,b2,bM=E(()=>{l();tc="Anthropic_AI",b2={"messages.create":{operation:"chat"},"messages.stream":{operation:"chat",streaming:!0},"messages.countTokens":{operation:"chat"},"models.get":{operation:"models"},"completions.create":{operation:"chat"},"models.retrieve":{operation:"models"},"beta.messages.create":{operation:"chat"}}});function N2(e,t,n){if(Array.isArray(t)&&t.length===0)return;let{systemInstructions:o,filteredMessages:r}=eo(t);o&&e.setAttributes({[Xr]:o});let i=Array.isArray(r)?r.length:1;e.setAttributes({[bn]:n?Pr(r):vr(r),[ar]:i})}function NM(e){return e&&Vbe[e]||"internal_error"}function O2(e,t){t.error&&(e.setStatus({code:2,message:NM(t.error.type)}),he(t.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}))}function C2(e){let{system:t,messages:n,input:o}=e,r=typeof t=="string"?[{role:"system",content:e.system}]:[],i=Array.isArray(o)?o:o!=null?[o]:void 0,s=Array.isArray(n)?n:n!=null?[n]:[],a=i??s;return[...r,...a]}var Vbe,OM=E(()=>{l();or();Cr();xr();Vbe={invalid_request_error:"invalid_argument",authentication_error:"unauthenticated",permission_error:"permission_denied",not_found_error:"not_found",request_too_large:"failed_precondition",rate_limit_error:"resource_exhausted",api_error:"internal_error",overloaded_error:"unavailable"}});function Fbe(e,t){return"type"in e&&typeof e.type=="string"&&e.type==="error"?(t.setStatus({code:2,message:NM(e.error?.type)}),he(e.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}),!0):!1}function Hbe(e,t){if(e.type==="message_delta"&&e.usage&&"output_tokens"in e.usage&&typeof e.usage.output_tokens=="number"&&(t.completionTokens=e.usage.output_tokens),e.message){let n=e.message;n.id&&(t.responseId=n.id),n.model&&(t.responseModel=n.model),n.stop_reason&&t.finishReasons.push(n.stop_reason),n.usage&&(typeof n.usage.input_tokens=="number"&&(t.promptTokens=n.usage.input_tokens),typeof n.usage.cache_creation_input_tokens=="number"&&(t.cacheCreationInputTokens=n.usage.cache_creation_input_tokens),typeof n.usage.cache_read_input_tokens=="number"&&(t.cacheReadInputTokens=n.usage.cache_read_input_tokens))}}function zbe(e,t){e.type!=="content_block_start"||typeof e.index!="number"||!e.content_block||(e.content_block.type==="tool_use"||e.content_block.type==="server_tool_use")&&(t.activeToolBlocks[e.index]={id:e.content_block.id,name:e.content_block.name,inputJsonParts:[]})}function qbe(e,t,n){if(!(e.type!=="content_block_delta"||!e.delta)){if(typeof e.index=="number"&&"partial_json"in e.delta&&typeof e.delta.partial_json=="string"){let o=t.activeToolBlocks[e.index];o&&o.inputJsonParts.push(e.delta.partial_json)}n&&typeof e.delta.text=="string"&&t.responseTexts.push(e.delta.text)}}function Ybe(e,t){if(e.type!=="content_block_stop"||typeof e.index!="number")return;let n=t.activeToolBlocks[e.index];if(!n)return;let o=n.inputJsonParts.join(""),r;try{r=o?JSON.parse(o):{}}catch{r={__unparsed:o}}t.toolCalls.push({type:"tool_use",id:n.id,name:n.name,input:r}),delete t.activeToolBlocks[e.index]}function v2(e,t,n,o){!(e&&typeof e=="object")||Fbe(e,o)||(Hbe(e,t),zbe(e,t),qbe(e,t,n),Ybe(e,t))}async function*P2(e,t,n){let o={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};try{for await(let r of e)v2(r,o,n,t),yield r}finally{Bu(t,o,n)}}function x2(e,t,n){let o={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};return e.on("streamEvent",r=>{v2(r,o,n,t)}),e.on("message",()=>{Bu(t,o,n)}),e.on("error",r=>{he(r,{mechanism:{handled:!1,type:"auto.ai.anthropic.stream_error"}}),t.isRecording()&&(t.setStatus({code:2,message:"internal_error"}),t.end())}),e}var M2=E(()=>{l();or();xr();OM()});function Wbe(e,t,n){let o={[Fi]:"anthropic",[Lt]:n,[te]:"auto.ai.anthropic"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){let r=e[0];r.tools&&Array.isArray(r.tools)&&(o[yo]=JSON.stringify(r.tools)),o[lt]=r.model??"unknown","temperature"in r&&(o[Ya]=r.temperature),"top_p"in r&&(o[Ka]=r.top_p),"stream"in r&&(o[ip]=r.stream),"top_k"in r&&(o[vS]=r.top_k),"frequency_penalty"in r&&(o[Wa]=r.frequency_penalty),"max_tokens"in r&&(o[sp]=r.max_tokens)}else t==="models.retrieve"||t==="models.get"?o[lt]=e[0]:o[lt]="unknown";return o}function CM(e,t,n){let o=C2(t);N2(e,o,n),"prompt"in t&&e.setAttributes({[P4]:JSON.stringify(t.prompt)})}function Kbe(e,t){if("content"in t&&Array.isArray(t.content)){e.setAttributes({[Vn]:t.content.map(o=>o.text).filter(o=>!!o).join("")});let n=[];for(let o of t.content)(o.type==="tool_use"||o.type==="server_tool_use")&&n.push(o);n.length>0&&e.setAttributes({[Or]:JSON.stringify(n)})}"completion"in t&&e.setAttributes({[Vn]:t.completion}),"input_tokens"in t&&e.setAttributes({[Vn]:JSON.stringify(t.input_tokens)})}function Zbe(e,t){"id"in t&&"model"in t&&(e.setAttributes({[Za]:t.id,[ir]:t.model}),"usage"in t&&t.usage&&K4(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens))}function Jbe(e,t,n){if(!(!t||typeof t!="object")){if("type"in t&&t.type==="error"){O2(e,t);return}n&&Kbe(e,t),Zbe(e,t)}}function L2(e,t,n){throw he(e,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:n}}}),t.isRecording()&&(t.setStatus({code:2,message:"internal_error"}),t.end()),e}function Xbe(e,t,n,o,r,i,s,a,c,u,d){let p=r[lt]??"unknown",f={name:`${i} ${p}`,op:`gen_ai.${i}`,attributes:r};if(u&&!d){let m,_=ft(f,h=>(m=e.apply(n,o),c.recordInputs&&a&&CM(h,a,Fn(c.enableTruncation)),(async()=>{try{let T=await m;return P2(T,h,c.recordOutputs??!1)}catch(T){return L2(T,h,s)}})()));return pp(m,_,"auto.ai.anthropic")}else return ft(f,m=>{try{c.recordInputs&&a&&CM(m,a,Fn(c.enableTruncation));let _=t.apply(n,o);return x2(_,m,c.recordOutputs??!1)}catch(_){return L2(_,m,s)}})}function Qbe(e,t,n,o,r){return new Proxy(e,{apply(i,s,a){let c=n.operation||"unknown",u=Wbe(a,t,c),d=u[lt]??"unknown",p=typeof a[0]=="object"?a[0]:void 0,f=!!p?.stream,m=n.streaming===!0;if(f||m)return Xbe(e,i,o,a,u,c,t,p,r,f,m);let _,h=Ot({name:`${c} ${d}`,op:`gen_ai.${c}`,attributes:u},T=>(_=i.apply(o,a),r.recordInputs&&p&&CM(T,p,Fn(r.enableTruncation)),_.then(S=>(Jbe(T,S,r.recordOutputs),S),S=>{throw he(S,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:t}}}),S})));return pp(_,h,"auto.ai.anthropic")}})}function w2(e,t="",n){return new Proxy(e,{get(o,r){let i=o[r],s=dp(t,String(r)),a=b2[s];return typeof i=="function"&&a?Qbe(i,s,a,o,n):typeof i=="function"?i.bind(o):i&&typeof i=="object"?w2(i,s,n):i}})}function og(e,t){return w2(e,"",Qr(t))}var D2=E(()=>{l();or();St();So();Cr();xr();bM();M2();OM()});var nc,k2,U2,vM=E(()=>{l();nc="Google_GenAI",k2={"models.generateContent":{operation:"generate_content"},"models.generateContentStream":{operation:"generate_content",streaming:!0},"models.embedContent":{operation:"embeddings"},"chats.create":{proxyResultPath:"chat"},"chat.sendMessage":{operation:"chat"},"chat.sendMessageStream":{operation:"chat",streaming:!0}},U2="google_genai"});function eNe(e,t){let n=e?.promptFeedback;if(n?.blockReason){let o=n.blockReasonMessage??n.blockReason;return t.setStatus({code:2,message:"internal_error"}),he(`Content blocked: ${o}`,{mechanism:{handled:!1,type:"auto.ai.google_genai"}}),!0}return!1}function tNe(e,t){typeof e.responseId=="string"&&(t.responseId=e.responseId),typeof e.modelVersion=="string"&&(t.responseModel=e.modelVersion);let n=e.usageMetadata;n&&(typeof n.promptTokenCount=="number"&&(t.promptTokens=n.promptTokenCount),typeof n.candidatesTokenCount=="number"&&(t.completionTokens=n.candidatesTokenCount),typeof n.totalTokenCount=="number"&&(t.totalTokens=n.totalTokenCount))}function nNe(e,t,n){Array.isArray(e.functionCalls)&&t.toolCalls.push(...e.functionCalls);for(let o of e.candidates??[]){o?.finishReason&&!t.finishReasons.includes(o.finishReason)&&t.finishReasons.push(o.finishReason);for(let r of o?.content?.parts??[])n&&r.text&&t.responseTexts.push(r.text),r.functionCall&&t.toolCalls.push({type:"function",id:r.functionCall.id,name:r.functionCall.name,arguments:r.functionCall.args})}}function rNe(e,t,n,o){!e||eNe(e,o)||(tNe(e,t),nNe(e,t,n))}async function*$2(e,t,n){let o={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(let r of e)rNe(r,o,n,t),yield r}finally{Bu(t,o,n)}}var B2=E(()=>{l();or();xr()});function fp(e,t="user"){return typeof e=="string"?[{role:t,content:e}]:Array.isArray(e)?e.flatMap(n=>fp(n,t)):typeof e!="object"||!e?[]:"role"in e&&typeof e.role=="string"?[e]:"parts"in e?[{...e,role:t}]:[{role:t,content:e}]}var G2=E(()=>{l()});function j2(e,t){if("model"in e&&typeof e.model=="string")return e.model;if(t&&typeof t=="object"){let n=t;if("model"in n&&typeof n.model=="string")return n.model;if("modelVersion"in n&&typeof n.modelVersion=="string")return n.modelVersion}return"unknown"}function oNe(e){let t={};return"temperature"in e&&typeof e.temperature=="number"&&(t[Ya]=e.temperature),"topP"in e&&typeof e.topP=="number"&&(t[Ka]=e.topP),"topK"in e&&typeof e.topK=="number"&&(t[vS]=e.topK),"maxOutputTokens"in e&&typeof e.maxOutputTokens=="number"&&(t[sp]=e.maxOutputTokens),"frequencyPenalty"in e&&typeof e.frequencyPenalty=="number"&&(t[Wa]=e.frequencyPenalty),"presencePenalty"in e&&typeof e.presencePenalty=="number"&&(t[ap]=e.presencePenalty),t}function iNe(e,t,n){let o={[Fi]:U2,[Lt]:e,[te]:"auto.ai.google_genai"};if(t){if(o[lt]=j2(t,n),"config"in t&&typeof t.config=="object"&&t.config){let r=t.config;if(Object.assign(o,oNe(r)),"tools"in r&&Array.isArray(r.tools)){let i=r.tools.flatMap(s=>s.functionDeclarations);o[yo]=JSON.stringify(i)}}}else o[lt]=j2({},n);return o}function V2(e,t,n,o){if(n){let i=t.contents;i!=null&&e.setAttribute(Xa,typeof i=="string"?i:JSON.stringify(i));return}let r=[];if("config"in t&&t.config&&typeof t.config=="object"&&"systemInstruction"in t.config&&t.config.systemInstruction&&r.push(...fp(t.config.systemInstruction,"system")),"history"in t&&r.push(...fp(t.history,"user")),"contents"in t&&r.push(...fp(t.contents,"user")),"message"in t&&r.push(...fp(t.message,"user")),Array.isArray(r)&&r.length){let{systemInstructions:i,filteredMessages:s}=eo(r);i&&e.setAttribute(Xr,i);let a=Array.isArray(s)?s.length:0;e.setAttributes({[ar]:a,[bn]:o?Pr(s):vr(s)})}}function sNe(e,t,n){if(!(!t||typeof t!="object")){if(t.modelVersion&&e.setAttribute(ir,t.modelVersion),t.usageMetadata&&typeof t.usageMetadata=="object"){let o=t.usageMetadata;typeof o.promptTokenCount=="number"&&e.setAttributes({[yt]:o.promptTokenCount}),typeof o.candidatesTokenCount=="number"&&e.setAttributes({[qt]:o.candidatesTokenCount}),typeof o.totalTokenCount=="number"&&e.setAttributes({[sr]:o.totalTokenCount})}if(n&&Array.isArray(t.candidates)&&t.candidates.length>0){let o=t.candidates.map(r=>r.content?.parts&&Array.isArray(r.content.parts)?r.content.parts.map(i=>typeof i.text=="string"?i.text:"").filter(i=>i.length>0).join(""):"").filter(r=>r.length>0);o.length>0&&e.setAttributes({[Vn]:o.join("")})}if(n&&t.functionCalls){let o=t.functionCalls;Array.isArray(o)&&o.length>0&&e.setAttributes({[Or]:JSON.stringify(o)})}}}function aNe(e,t,n,o,r){let i=n.operation==="embeddings";return new Proxy(e,{apply(s,a,c){let u=n.operation||"unknown",d=c[0],p=iNe(u,d,o),f=p[lt]??"unknown";return n.streaming?ft({name:`${u} ${f}`,op:`gen_ai.${u}`,attributes:p},async m=>{try{r.recordInputs&&d&&V2(m,d,i,Fn(r.enableTruncation));let _=await s.apply(o,c);return $2(_,m,!!r.recordOutputs)}catch(_){throw m.setStatus({code:2,message:"internal_error"}),he(_,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}}),m.end(),_}}):Ot({name:`${u} ${f}`,op:`gen_ai.${u}`,attributes:p},m=>(r.recordInputs&&d&&V2(m,d,i,Fn(r.enableTruncation)),ri(()=>s.apply(o,c),_=>{he(_,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}})},()=>{},_=>{i||sNe(m,_,r.recordOutputs)})))}})}function PM(e,t="",n){return new Proxy(e,{get:(o,r,i)=>{let s=Reflect.get(o,r,i),a=dp(t,String(r)),c=k2[a];if(typeof s=="function"&&c){let u=c.operation?aNe(s,a,c,o,n):s.bind(o);return c.proxyResultPath?function(...d){let p=u(...d);return p&&typeof p=="object"?PM(p,c.proxyResultPath,n):p}:u}return typeof s=="function"?s.bind(o):s&&typeof s=="object"?PM(s,a,n):s}})}function ig(e,t){return PM(e,"",Qr(t))}var F2=E(()=>{l();or();St();So();nS();Cr();xr();vM();B2();G2()});var GS,Ks,H2,sg=E(()=>{l();GS="LangChain",Ks="auto.ai.langchain",H2={human:"user",ai:"assistant",assistant:"assistant",system:"system",function:"function",tool:"tool"}});function ju(e){if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function mp(e){if(Array.isArray(e))try{let t=e.map(n=>n&&typeof n=="object"&&Qa(n)?$u(n):n);return JSON.stringify(t)}catch{return String(e)}return ju(e)}function ag(e){let t=e.toLowerCase();return H2[t]??t}function z2(e){return e.includes("System")?"system":e.includes("Human")?"user":e.includes("AI")||e.includes("Assistant")?"assistant":e.includes("Function")?"function":e.includes("Tool")?"tool":"user"}function xM(e){if(!(!e||Array.isArray(e)))return e.invocation_params}function cg(e){return e.map(t=>{let n=t._getType;if(typeof n=="function"){let r=n.call(t);return{role:ag(r),content:mp(t.content)}}if(t.lc===1&&t.kwargs){let r=t.id,i=Array.isArray(r)&&r.length>0?r[r.length-1]:"",s=typeof i=="string"?z2(i):"user";return{role:ag(s),content:mp(t.kwargs?.content)}}if(t.type){let r=String(t.type).toLowerCase();return{role:ag(r),content:mp(t.content)}}if(t.role)return{role:ag(String(t.role)),content:mp(t.content)};let o=t.constructor?.name;return o&&o!=="Object"?{role:ag(z2(o)),content:mp(t.content)}:{role:"user",content:mp(t.content)}})}function cNe(e,t,n){let o={},r="kwargs"in e?e.kwargs:void 0,i=t?.temperature??n?.ls_temperature??r?.temperature;to(o,Ya,i);let s=t?.max_tokens??n?.ls_max_tokens??r?.max_tokens;to(o,sp,s);let a=t?.top_p??r?.top_p;to(o,Ka,a);let c=t?.frequency_penalty;to(o,Wa,c);let u=t?.presence_penalty;return to(o,ap,u),t&&"stream"in t&&Ro(o,ip,!!t.stream),o}function q2(e,t,n,o,r){return{[Fi]:ju(e??"langchain"),[Lt]:"chat",[lt]:ju(t),[te]:Ks,...cNe(n,o,r)}}function Y2(e,t,n,o,r,i){let s=i?.ls_provider,a=r?.model??i?.ls_model_name??"unknown",c=q2(s,a,e,r,i);if(n&&Array.isArray(t)&&t.length>0){Ro(c,ar,t.length);let u=t.map(d=>({role:"user",content:d}));Ro(c,bn,o?Pr(u):vr(u))}return c}function W2(e,t,n,o,r,i){let s=i?.ls_provider??e.id?.[2],a=r?.model??i?.ls_model_name??"unknown",c=q2(s,a,e,r,i);if(n&&Array.isArray(t)&&t.length>0){let u=cg(t.flat()),{systemInstructions:d,filteredMessages:p}=eo(u);d&&Ro(c,Xr,d);let f=Array.isArray(p)?p.length:0;Ro(c,ar,f),Ro(c,bn,o?Pr(p):vr(p))}return c}function uNe(e,t){let n=[],o=e.flat();for(let r of o){let s=r.message?.tool_calls;if(Array.isArray(s)&&s.length>0)n.push(...s);else{let a=r.message?.content;if(Array.isArray(a))for(let c of a){let u=c;u.type==="tool_use"&&n.push(u)}}}n.length>0&&Ro(t,Or,ju(n))}function lNe(e,t){if(!e)return;let n=e.tokenUsage,o=e.usage;if(n)to(t,yt,n.promptTokens),to(t,qt,n.completionTokens),to(t,sr,n.totalTokens);else if(o){to(t,yt,o.input_tokens),to(t,qt,o.output_tokens);let r=Number(o.input_tokens),i=Number(o.output_tokens),s=(Number.isNaN(r)?0:r)+(Number.isNaN(i)?0:i);s>0&&to(t,sr,s),o.cache_creation_input_tokens!==void 0&&to(t,D4,o.cache_creation_input_tokens),o.cache_read_input_tokens!==void 0&&to(t,k4,o.cache_read_input_tokens)}}function K2(e,t){if(!e)return;let n={};if(Array.isArray(e.generations)){let u=e.generations.flat().map(d=>d.generationInfo?.finish_reason?d.generationInfo.finish_reason:d.generation_info?.finish_reason?d.generation_info.finish_reason:null).filter(d=>typeof d=="string");if(u.length>0&&Ro(n,Hi,ju(u)),uNe(e.generations,n),t){let d=e.generations.flat().map(p=>p.text??p.message?.content).filter(p=>typeof p=="string");d.length>0&&Ro(n,Vn,ju(d))}}lNe(e.llmOutput,n);let o=e.llmOutput,i=e.generations?.[0]?.[0]?.message,s=o?.model_name??o?.model??i?.response_metadata?.model_name;s&&Ro(n,ir,s);let a=o?.id??i?.id;a&&Ro(n,Za,a);let c=o?.stop_reason??i?.response_metadata?.finish_reason;return c&&Ro(n,x4,ju(c)),n}function jS(e){let t={},n=e?.lc_agent_name;return typeof n=="string"&&(t[Uu]=n),t}function Z2(e){let t=e?.invocation_params?.tools??e?.options?.tools;if(!Array.isArray(t)||t.length===0)return;let n=t.map(o=>{let r=o.function;return{type:"function",name:o.name??r?.name??"",description:o.description??r?.description}});return JSON.stringify(n)}var Ro,to,VS=E(()=>{l();St();Cr();uM();xr();sg();Ro=(e,t,n)=>{n!=null&&(e[t]=n)},to=(e,t,n)=>{let o=Number(n);Number.isNaN(o)||(e[t]=o)}});function rc(e={}){let{recordInputs:t,recordOutputs:n}=Qr(e),o=Fn(e.enableTruncation),r=new Map,i=a=>{let c=r.get(a);c?.isRecording()&&(c.end(),r.delete(a))},s={lc_serializable:!1,lc_namespace:["langchain_core","callbacks","sentry"],lc_secrets:void 0,lc_attributes:void 0,lc_aliases:void 0,lc_serializable_keys:void 0,lc_id:["langchain_core","callbacks","sentry"],lc_kwargs:{},name:"SentryCallbackHandler",ignoreLLM:!1,ignoreChain:!1,ignoreAgent:!1,ignoreRetriever:!1,ignoreCustomEvent:!1,raiseError:!1,awaitHandlers:!0,handleLLMStart(a,c,u,d,p,f,m,_){let h=xM(f),T=Y2(a,c,t,o,h,m),S=T[lt],y=T[Lt];ft({name:`${y} ${S}`,op:"gen_ai.chat",attributes:{...jS(m),...T,[oe]:"gen_ai.chat"}},v=>(r.set(u,v),v))},handleChatModelStart(a,c,u,d,p,f,m,_){let h=xM(f),T=W2(a,c,t,o,h,m),S=Z2(p);S&&(T[yo]=S);let y=T[lt],v=T[Lt];ft({name:`${v} ${y}`,op:"gen_ai.chat",attributes:{...jS(m),...T,[oe]:"gen_ai.chat"}},x=>(r.set(u,x),x))},handleLLMEnd(a,c,u,d,p){let f=r.get(c);if(f?.isRecording()){let m=K2(a,n);m&&f.setAttributes(m),i(c)}},handleLLMError(a,c){let u=r.get(c);u?.isRecording()&&(u.setStatus({code:2,message:"internal_error"}),i(c)),he(a,{mechanism:{handled:!1,type:`${Ks}.llm_error_handler`}})},handleChainStart(a,c,u,d,p,f,m,_){if(f?.__sentry_langgraph__)return;let h=_||a.name||"unknown_chain",T={[te]:"auto.ai.langchain","langchain.chain.name":h};t&&(T["langchain.chain.inputs"]=JSON.stringify(c)),ft({name:`chain ${h}`,op:"gen_ai.invoke_agent",attributes:{...T,[oe]:"gen_ai.invoke_agent"}},S=>(r.set(u,S),S))},handleChainEnd(a,c){let u=r.get(c);u?.isRecording()&&(n&&u.setAttributes({"langchain.chain.outputs":JSON.stringify(a)}),i(c))},handleChainError(a,c){let u=r.get(c);u?.isRecording()&&(u.setStatus({code:2,message:"internal_error"}),i(c)),he(a,{mechanism:{handled:!1,type:`${Ks}.chain_error_handler`}})},handleToolStart(a,c,u,d,p,f,m){if(f?.__sentry_langgraph__)return;let _=m||a.name||"unknown_tool",h={...jS(f),[te]:Ks,[Lt]:"execute_tool",[zi]:_};t&&(h[cp]=c),ft({name:`execute_tool ${_}`,op:"gen_ai.execute_tool",attributes:{...h,[oe]:"gen_ai.execute_tool"}},T=>(r.set(u,T),T))},handleToolEnd(a,c){let u=r.get(c);if(u?.isRecording()){if(n){let d=a,p=d&&typeof d=="object"&&"content"in d?d.content:a;u.setAttributes({[up]:typeof p=="string"?p:JSON.stringify(p)})}i(c)}},handleToolError(a,c){let u=r.get(c);u?.isRecording()&&(u.setStatus({code:2,message:"internal_error"}),i(c)),he(a,{mechanism:{handled:!1,type:`${Ks}.tool_error_handler`}})},copy(){return s},toJSON(){return{lc:1,type:"not_implemented",id:s.lc_id}},toJSONNotImplemented(){return{lc:1,type:"not_implemented",id:s.lc_id}}};return s}var MM=E(()=>{l();or();St();So();Cr();xr();sg();VS()});var FS,ug,HS=E(()=>{l();FS="LangGraph",ug="auto.ai.langgraph"});function J2(e){let t=e[0];if(typeof t!="object"||!t||!("llm"in t)||!t.llm||typeof t.llm!="object")return null;let n=t.llm;return typeof n.modelName!="string"&&typeof n.model!="string"?null:n}function X2(e){let t=e[0];return typeof t=="object"&&t&&"name"in t&&typeof t.name=="string"?t.name:null}function Q2(e,t,n){let o="__sentry_tool_wrapped__";for(let r of e){if(!r||typeof r!="object")continue;let i=r,s=i.invoke;if(typeof s!="function"||Object.prototype.hasOwnProperty.call(i,o))continue;let a=typeof i.name=="string"?i.name:"unknown_tool",c=typeof i.description=="string"?i.description:void 0,u=new Proxy(s,{apply(d,p,f){let m={[te]:ug,[oe]:cM,[Lt]:"execute_tool",[zi]:a,[Q_]:"function"},h=f[1]?.metadata?.lc_agent_name??n;typeof h=="string"&&(m[Uu]=h),c&&(m[lp]=c);let T=f[0];if(typeof T=="object"&&T&&("id"in T&&typeof T.id=="string"&&(m[X_]=T.id),t.recordInputs)){let S="args"in T&&typeof T.args=="object"?T.args:T;try{m[cp]=JSON.stringify(S)}catch{}}return Ot({op:cM,name:`execute_tool ${a}`,attributes:m},async S=>{try{let y=await Reflect.apply(d,p,f);if(t.recordOutputs)try{let v=y,x=v&&typeof v=="object"&&"content"in v?v.content:y;S.setAttribute(up,typeof x=="string"?x:JSON.stringify(x))}catch{}return y}catch(y){throw S.setStatus({code:2,message:"internal_error"}),he(y,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),y}})}});i.invoke=u,Object.defineProperty(i,o,{value:!0,enumerable:!1})}return e}function dNe(e){if(!e||e.length===0)return null;let t=[];for(let n of e)if(n&&typeof n=="object"){let o=n.tool_calls;o&&Array.isArray(o)&&t.push(...o)}return t.length>0?t:null}function pNe(e){let t=e,n=0,o=0,r=0;if(t.usage_metadata&&typeof t.usage_metadata=="object"){let i=t.usage_metadata;return typeof i.input_tokens=="number"&&(n=i.input_tokens),typeof i.output_tokens=="number"&&(o=i.output_tokens),typeof i.total_tokens=="number"&&(r=i.total_tokens),{inputTokens:n,outputTokens:o,totalTokens:r}}if(t.response_metadata&&typeof t.response_metadata=="object"){let i=t.response_metadata;if(i.tokenUsage&&typeof i.tokenUsage=="object"){let s=i.tokenUsage;typeof s.promptTokens=="number"&&(n=s.promptTokens),typeof s.completionTokens=="number"&&(o=s.completionTokens),typeof s.totalTokens=="number"&&(r=s.totalTokens)}}return{inputTokens:n,outputTokens:o,totalTokens:r}}function fNe(e,t){let n=t;if(n.response_metadata&&typeof n.response_metadata=="object"){let o=n.response_metadata;o.model_name&&typeof o.model_name=="string"&&e.setAttribute(ir,o.model_name),o.finish_reason&&typeof o.finish_reason=="string"&&e.setAttribute(Hi,[o.finish_reason])}}function eK(e){if(!e.builder?.nodes?.tools?.runnable?.tools)return null;let t=e.builder?.nodes?.tools?.runnable?.tools;return!t||!Array.isArray(t)||t.length===0?null:t.map(n=>({name:n.lc_kwargs?.name,description:n.lc_kwargs?.description,schema:n.lc_kwargs?.schema}))}function tK(e,t,n){let r=n?.messages;if(!r||!Array.isArray(r))return;let i=t?.length??0,s=r.length>i?r.slice(i):[];if(s.length===0)return;let a=dNe(s);a&&e.setAttribute(Or,JSON.stringify(a));let c=cg(s);e.setAttribute(Vn,JSON.stringify(c));let u=0,d=0,p=0;for(let f of s){let m=pNe(f);u+=m.inputTokens,d+=m.outputTokens,p+=m.totalTokens,fNe(e,f)}u>0&&e.setAttribute(yt,u),d>0&&e.setAttribute(qt,d),p>0&&e.setAttribute(sr,p)}function nK(e,t){if(!e)return[t];if(Array.isArray(e))return e.includes(t)?e:[...e,t];let n=e;return typeof n.addHandler=="function"&&(Array.isArray(n.handlers)&&n.handlers.includes(t)||n.addHandler(t)),e}var rK=E(()=>{l();or();St();So();Cr();VS();HS()});function qS(e,t){if(Object.prototype.hasOwnProperty.call(e,zS))return e;let n=rc(t),o=new Proxy(e,{apply(r,i,s){return LM?Reflect.apply(r,i,s):Ot({op:"gen_ai.create_agent",name:"create_agent",attributes:{[te]:ug,[oe]:"gen_ai.create_agent",[Lt]:"create_agent"}},a=>{try{let c=Reflect.apply(r,i,s),u=s.length>0?s[0]:{};u?.name&&typeof u.name=="string"&&(a.setAttribute(Uu,u.name),a.updateName(`create_agent ${u.name}`));let d=c.invoke;return d&&typeof d=="function"&&(c.invoke=oK(d.bind(c),c,u,t,void 0,n)),c}catch(c){throw a.setStatus({code:2,message:"internal_error"}),he(c,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),c}})}});return Object.defineProperty(o,zS,{value:!0,enumerable:!1}),o}function oK(e,t,n,o,r,i){return new Proxy(e,{apply(s,a,c){let u=r?.modelName??r?.model;return Ot({op:"gen_ai.invoke_agent",name:"invoke_agent",attributes:{[te]:ug,[oe]:U4,[Lt]:"invoke_agent"}},async d=>{try{let p=n?.name;p&&typeof p=="string"&&(d.setAttribute(w4,p),d.setAttribute(Uu,p),d.updateName(`invoke_agent ${p}`)),u&&d.setAttribute(lt,u);let _=(c.length>1?c[1]:void 0)?.configurable?.thread_id;if(_&&typeof _=="string"&&d.setAttribute(J_,_),i){let x=c[1]??{};c[1]=x;let P=x.metadata??{};x.metadata={...P,__sentry_langgraph__:!0,...typeof p=="string"?{lc_agent_name:p}:{}},x.callbacks=nK(x.callbacks,i)}let h=eK(t);h&&d.setAttribute(yo,JSON.stringify(h));let T=o.recordInputs,S=o.recordOutputs,y=c.length>0?c[0]?.messages??[]:[];if(y&&T){let x=cg(y),{systemInstructions:P,filteredMessages:N}=eo(x);P&&d.setAttribute(Xr,P);let F=Fn(o.enableTruncation),se=Array.isArray(N)?N.length:0;d.setAttributes({[bn]:F?Pr(N):vr(N),[ar]:se})}let v=await Reflect.apply(s,a,c);return S&&tK(d,y??null,v),v}catch(p){throw d.setStatus({code:2,message:"internal_error"}),he(p,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),p}})}})}function wM(e,t){if(Object.prototype.hasOwnProperty.call(e,zS))return e;let n=Qr(t),o=rc(n),r=new Proxy(e,{apply(i,s,a){let c=J2(a),u=X2(a),d=a[0];d&&Array.isArray(d.tools)&&d.tools.length>0&&Q2(d.tools,n,u??void 0),LM=!0;let p;try{p=Reflect.apply(i,s,a)}finally{LM=!1}let f=p.invoke;if(f&&typeof f=="function"){let m={};u&&(m.name=u),p.invoke=oK(f.bind(p),p,m,n,c,o)}return p}});return Object.defineProperty(r,zS,{value:!0,enumerable:!1}),r}function lg(e,t){return e.compile=qS(e.compile,Qr(t)),e}var LM,zS,iK=E(()=>{l();or();St();So();Cr();xr();MM();VS();HS();rK();LM=!1,zS="__sentry_patched__"});function sK(e,t,n){let o=n.getOptions(),r=n.getDsn(),i=o.tunnel,s=$d(o._metadata),a={sent_at:new Date().toISOString(),...mNe(t)&&{trace:t},...s&&{sdk:s},...!!i&&r&&{dsn:nr(r)}},c=o.sendDefaultPii?"auto":"never",u=[{type:"span",item_count:e.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...Xd()&&{ingest_settings:{infer_ip:c,infer_user_agent:c}},items:e}];return In(a,[u])}function mNe(e){return!!e.trace_id&&!!e.public_key}var aK=E(()=>{l();Li();ki();aS()});function cK(e){let t=156;if(t+=e.name.length*2,t+=AP(e.attributes),e.links&&e.links.length>0){let o=e.links[0]?.attributes,r=100+(o?AP(o):0);t+=r*e.links.length}return t}var uK=E(()=>{l();h_()});var lK,_Ne,YS,dK=E(()=>{l();qe();De();uS();Di();aK();uK();lK=1e3,_Ne=5e6,YS=class{constructor(t,n){this._traceBuckets=new Map,this._client=t;let{maxSpanLimit:o,flushInterval:r,maxTraceWeightInBytes:i}=n??{};this._maxSpanLimit=o&&o>0&&o<=lK?o:lK,this._flushInterval=r&&r>0?r:5e3,this._maxTraceWeight=i&&i>0?i:_Ne,this._client.on("flush",()=>{this.drain()}),this._client.on("close",()=>{this._traceBuckets.forEach(s=>{clearTimeout(s.timeout)}),this._traceBuckets.clear()})}add(t){let n=t.trace_id,o=this._traceBuckets.get(n);o||(o={spans:new Set,size:0,timeout:ep(setTimeout(()=>{this.flush(n)},this._flushInterval))},this._traceBuckets.set(n,o)),o.spans.add(t),o.size+=cK(t),(o.spans.size>=this._maxSpanLimit||o.size>=this._maxTraceWeight)&&this.flush(n)}drain(){this._traceBuckets.size&&(w&&b.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((t,n)=>{this.flush(n)}))}flush(t){let n=this._traceBuckets.get(t);if(!n)return;if(!n.spans.size){this._removeTrace(t);return}let o=Array.from(n.spans),r=o[0]?._segmentSpan;if(!r){w&&b.warn("No segment span reference found on span JSON, cannot compute DSC"),this._removeTrace(t);return}let i=Nt(r),s=o.map(c=>{let{_segmentSpan:u,...d}=c;return d}),a=sK(s,i,this._client);w&&b.log(`Sending span envelope for trace ${t} with ${s.length} spans`),this._client.sendEnvelope(a).then(null,c=>{w&&b.error("Error while sending streamed span envelope:",c)}),this._removeTrace(t)}_removeTrace(t){let n=this._traceBuckets.get(t);n&&clearTimeout(n.timeout),this._traceBuckets.delete(t)}}});var _p,pK=E(()=>{l();qe();v_();rS();bu();dK();De();nn();_p=()=>({name:"SpanStreaming",setup(e){let t="SpanStreaming integration requires",n="Falling back to static trace lifecycle.",o=e.getOptions();if(!jn(e)){o.traceLifecycle="static",w&&b.warn(`${t} \`traceLifecycle\` to be set to "stream"! ${n}`);return}let r=o.beforeSendSpan;if(r&&!Ba(r)){o.traceLifecycle="static",w&&b.warn(`${t} a beforeSendSpan callback using \`withStreamedSpan\`! ${n}`);return}let i=new YS(e);e.on("afterSpanEnd",s=>{Zr(s)&&i.add(ux(s,e))})}})});function dg(e,t,n){let o=e[t];if(typeof o=="function"){try{e[t]=n}catch{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0,enumerable:!0})}if(e.default===o)try{e.default=n}catch{Object.defineProperty(e,"default",{value:n,writable:!0,configurable:!0,enumerable:!0})}}}var fK=E(()=>{l()});function gK(e,t=!1){return!(t||e&&!e.startsWith("/")&&!e.match(/^[A-Z]:/)&&!e.startsWith(".")&&!e.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&e!==void 0&&!e.includes("node_modules/")}function hK(e){let t=/^\s*[-]{4,}$/,n=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/,o=/at (?:async )?(.+?) \(data:(.*?),/;return r=>{let i=r.match(o);if(i)return{filename:`<data:${i[2]}>`,function:i[1]};let s=r.match(n);if(s){let a,c,u,d,p;if(s[1]){u=s[1];let h=u.lastIndexOf(".");if(u[h-1]==="."&&h--,h>0){a=u.slice(0,h),c=u.slice(h+1);let T=a.indexOf(".Module");T>0&&(u=u.slice(T+1),a=a.slice(0,T))}d=void 0}c&&(d=a,p=c),c==="<anonymous>"&&(p=void 0,u=void 0),u===void 0&&(p=p||"?",u=d?`${d}.${p}`:p);let f=nq(s[2]),m=s[5]==="native";!f&&s[5]&&!m&&(f=s[5]);let _=f?gNe(f):void 0;return{filename:_??f,module:_&&e?.(_),function:u,lineno:mK(s[3]),colno:mK(s[4]),in_app:gK(f||"",m)}}if(r.match(t))return{filename:r}}}function DM(e){return[90,hK(e)]}function mK(e){return parseInt(e||"",10)||void 0}function gNe(e){try{return decodeURI(e)}catch{return}}var EK=E(()=>{l();Ed()});function hNe(e){let t=e.constructor?.name??"";return t.includes("OpenAI")?"openai":t.includes("Google")?"google_genai":t.includes("Mistral")?"mistralai":t.includes("Vertex")?"google_vertexai":t.includes("Bedrock")?"aws_bedrock":t.includes("Ollama")?"ollama":t.includes("Cloudflare")?"cloudflare":t.includes("Cohere")?"cohere":"langchain"}function ENe(e){let t=e??{},n={[te]:Ks,[oe]:aM,[Lt]:"embeddings",[lt]:t.model??"unknown"};return n[Fi]=hNe(t),"dimensions"in t&&(n[xS]=t.dimensions),"encodingFormat"in t&&(n[PS]=t.encodingFormat),n}function TK(e,t={}){let{recordInputs:n}=Qr(t);return new Proxy(e,{apply(o,r,i){let s=ENe(r),a=s[lt]||"unknown";if(n){let c=i[0];c!=null&&(s[Xa]=typeof c=="string"?c:JSON.stringify(c))}return Ot({name:`embeddings ${a}`,op:aM,attributes:s},()=>Reflect.apply(o,r,i).then(void 0,c=>{throw he(c,{mechanism:{handled:!1,type:"auto.ai.langchain"}}),c}))}})}function pg(e,t){let n=e;return typeof n.embedQuery=="function"&&(n.embedQuery=TK(n.embedQuery,t)),typeof n.embedDocuments=="function"&&(n.embedDocuments=TK(n.embedDocuments,t)),e}var SK=E(()=>{l();or();St();So();Cr();xr();sg()});var ne=E(()=>{l();hu();BP();So();Di();tx();nx();tS();rS();St();or();pt();HT();Id();mW();dS();hx();_W();gW();kd();nS();Lx();nn();xd();hW();wx();Dx();TW();GP();C_();_S();gS();CW();PW();kW();jW();c4();p4();m4();_4();O4();oM();rp();W_();cS();C4();v4();f2();RM();I2();BS();D2();bM();F2();vM();MM();sg();iK();HS();bu();pK();eM();An();f_();en();De();xi();Rr();u4();fK();Ed();EK();ks();I_();ki();Tu();B_();nM();Bs();DT();Ds();SK()});var ZM=A(WS=>{"use strict";l();Object.defineProperty(WS,"__esModule",{value:!0});WS.VERSION=void 0;WS.VERSION="1.9.1"});var bK=A(gp=>{"use strict";l();Object.defineProperty(gp,"__esModule",{value:!0});gp.isCompatible=gp._makeCompatibilityCheck=void 0;var SNe=ZM(),RK=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function IK(e){let t=new Set([e]),n=new Set,o=e.match(RK);if(!o)return()=>!1;let r={major:+o[1],minor:+o[2],patch:+o[3],prerelease:o[4]};if(r.prerelease!=null)return function(c){return c===e};function i(a){return n.add(a),!1}function s(a){return t.add(a),!0}return function(c){if(t.has(c))return!0;if(n.has(c))return!1;let u=c.match(RK);if(!u)return i(c);let d={major:+u[1],minor:+u[2],patch:+u[3],prerelease:u[4]};return d.prerelease!=null||r.major!==d.major?i(c):r.major===0?r.minor===d.minor&&r.patch<=d.patch?s(c):i(c):r.minor<=d.minor?s(c):i(c)}}gp._makeCompatibilityCheck=IK;gp.isCompatible=IK(SNe.VERSION)});var Vu=A(oc=>{"use strict";l();Object.defineProperty(oc,"__esModule",{value:!0});oc.unregisterGlobal=oc.getGlobal=oc.registerGlobal=void 0;var hp=ZM(),ANe=bK(),yNe=hp.VERSION.split(".")[0],fg=Symbol.for(`opentelemetry.js.api.${yNe}`),mg=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function RNe(e,t,n,o=!1){var r;let i=mg[fg]=(r=mg[fg])!==null&&r!==void 0?r:{version:hp.VERSION};if(!o&&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!==hp.VERSION){let s=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${hp.VERSION}`);return n.error(s.stack||s.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${hp.VERSION}.`),!0}oc.registerGlobal=RNe;function INe(e){var t,n;let o=(t=mg[fg])===null||t===void 0?void 0:t.version;if(!(!o||!(0,ANe.isCompatible)(o)))return(n=mg[fg])===null||n===void 0?void 0:n[e]}oc.getGlobal=INe;function bNe(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${hp.VERSION}.`);let n=mg[fg];n&&delete n[e]}oc.unregisterGlobal=bNe});var NK=A(KS=>{"use strict";l();Object.defineProperty(KS,"__esModule",{value:!0});KS.DiagComponentLogger=void 0;var NNe=Vu(),JM=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return _g("debug",this._namespace,t)}error(...t){return _g("error",this._namespace,t)}info(...t){return _g("info",this._namespace,t)}warn(...t){return _g("warn",this._namespace,t)}verbose(...t){return _g("verbose",this._namespace,t)}};KS.DiagComponentLogger=JM;function _g(e,t,n){let o=(0,NNe.getGlobal)("diag");if(o)return o[e](t,...n)}});var ZS=A(gg=>{"use strict";l();Object.defineProperty(gg,"__esModule",{value:!0});gg.DiagLogLevel=void 0;var ONe;(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"})(ONe=gg.DiagLogLevel||(gg.DiagLogLevel={}))});var OK=A(JS=>{"use strict";l();Object.defineProperty(JS,"__esModule",{value:!0});JS.createLogLevelDiagLogger=void 0;var Zs=ZS();function CNe(e,t){e<Zs.DiagLogLevel.NONE?e=Zs.DiagLogLevel.NONE:e>Zs.DiagLogLevel.ALL&&(e=Zs.DiagLogLevel.ALL),t=t||{};function n(o,r){let i=t[o];return typeof i=="function"&&e>=r?i.bind(t):function(){}}return{error:n("error",Zs.DiagLogLevel.ERROR),warn:n("warn",Zs.DiagLogLevel.WARN),info:n("info",Zs.DiagLogLevel.INFO),debug:n("debug",Zs.DiagLogLevel.DEBUG),verbose:n("verbose",Zs.DiagLogLevel.VERBOSE)}}JS.createLogLevelDiagLogger=CNe});var Fu=A(QS=>{"use strict";l();Object.defineProperty(QS,"__esModule",{value:!0});QS.DiagAPI=void 0;var vNe=NK(),PNe=OK(),CK=ZS(),XS=Vu(),xNe="diag",XM=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(r){return function(...i){let s=(0,XS.getGlobal)("diag");if(s)return s[r](...i)}}let n=this,o=(r,i={logLevel:CK.DiagLogLevel.INFO})=>{var s,a,c;if(r===n){let p=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=p.stack)!==null&&s!==void 0?s:p.message),!1}typeof i=="number"&&(i={logLevel:i});let u=(0,XS.getGlobal)("diag"),d=(0,PNe.createLogLevelDiagLogger)((a=i.logLevel)!==null&&a!==void 0?a:CK.DiagLogLevel.INFO,r);if(u&&!i.suppressOverrideMessage){let p=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";u.warn(`Current logger will be overwritten from ${p}`),d.warn(`Current logger will overwrite one already registered from ${p}`)}return(0,XS.registerGlobal)("diag",d,n,!0)};n.setLogger=o,n.disable=()=>{(0,XS.unregisterGlobal)(xNe,n)},n.createComponentLogger=r=>new vNe.DiagComponentLogger(r),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}};QS.DiagAPI=XM});var vK=A(eA=>{"use strict";l();Object.defineProperty(eA,"__esModule",{value:!0});eA.BaggageImpl=void 0;var QM=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 o=new e(this._entries);return o._entries.set(t,n),o}removeEntry(t){let n=new e(this._entries);return n._entries.delete(t),n}removeEntries(...t){let n=new e(this._entries);for(let o of t)n._entries.delete(o);return n}clear(){return new e}};eA.BaggageImpl=QM});var PK=A(tA=>{"use strict";l();Object.defineProperty(tA,"__esModule",{value:!0});tA.baggageEntryMetadataSymbol=void 0;tA.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")});var eL=A(Ep=>{"use strict";l();Object.defineProperty(Ep,"__esModule",{value:!0});Ep.baggageEntryMetadataFromString=Ep.createBaggage=void 0;var MNe=Fu(),LNe=vK(),wNe=PK(),DNe=MNe.DiagAPI.instance();function kNe(e={}){return new LNe.BaggageImpl(new Map(Object.entries(e)))}Ep.createBaggage=kNe;function UNe(e){return typeof e!="string"&&(DNe.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:wNe.baggageEntryMetadataSymbol,toString(){return e}}}Ep.baggageEntryMetadataFromString=UNe});var hg=A(Tp=>{"use strict";l();Object.defineProperty(Tp,"__esModule",{value:!0});Tp.ROOT_CONTEXT=Tp.createContextKey=void 0;function $Ne(e){return Symbol.for(e)}Tp.createContextKey=$Ne;var tL=class e{constructor(t){let n=this;n._currentContext=t?new Map(t):new Map,n.getValue=o=>n._currentContext.get(o),n.setValue=(o,r)=>{let i=new e(n._currentContext);return i._currentContext.set(o,r),i},n.deleteValue=o=>{let r=new e(n._currentContext);return r._currentContext.delete(o),r}}};Tp.ROOT_CONTEXT=new tL});var xK=A(Js=>{"use strict";l();Object.defineProperty(Js,"__esModule",{value:!0});Js.DiagConsoleLogger=Js._originalConsoleMethods=void 0;var nL=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];Js._originalConsoleMethods={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(Js._originalConsoleMethods[t]=console[t])}var rL=class{constructor(){function t(n){return function(...o){let r=Js._originalConsoleMethods[n];if(typeof r!="function"&&(r=Js._originalConsoleMethods.log),typeof r!="function"&&console&&(r=console[n],typeof r!="function"&&(r=console.log)),typeof r=="function")return r.apply(console,o)}}for(let n=0;n<nL.length;n++)this[nL[n].n]=t(nL[n].c)}};Js.DiagConsoleLogger=rL});var oL=A(Re=>{"use strict";l();Object.defineProperty(Re,"__esModule",{value:!0});Re.createNoopMeter=Re.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=Re.NOOP_OBSERVABLE_GAUGE_METRIC=Re.NOOP_OBSERVABLE_COUNTER_METRIC=Re.NOOP_UP_DOWN_COUNTER_METRIC=Re.NOOP_HISTOGRAM_METRIC=Re.NOOP_GAUGE_METRIC=Re.NOOP_COUNTER_METRIC=Re.NOOP_METER=Re.NoopObservableUpDownCounterMetric=Re.NoopObservableGaugeMetric=Re.NoopObservableCounterMetric=Re.NoopObservableMetric=Re.NoopHistogramMetric=Re.NoopGaugeMetric=Re.NoopUpDownCounterMetric=Re.NoopCounterMetric=Re.NoopMetric=Re.NoopMeter=void 0;var nA=class{constructor(){}createGauge(t,n){return Re.NOOP_GAUGE_METRIC}createHistogram(t,n){return Re.NOOP_HISTOGRAM_METRIC}createCounter(t,n){return Re.NOOP_COUNTER_METRIC}createUpDownCounter(t,n){return Re.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(t,n){return Re.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(t,n){return Re.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(t,n){return Re.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}};Re.NoopMeter=nA;var Hu=class{};Re.NoopMetric=Hu;var rA=class extends Hu{add(t,n){}};Re.NoopCounterMetric=rA;var oA=class extends Hu{add(t,n){}};Re.NoopUpDownCounterMetric=oA;var iA=class extends Hu{record(t,n){}};Re.NoopGaugeMetric=iA;var sA=class extends Hu{record(t,n){}};Re.NoopHistogramMetric=sA;var Sp=class{addCallback(t){}removeCallback(t){}};Re.NoopObservableMetric=Sp;var aA=class extends Sp{};Re.NoopObservableCounterMetric=aA;var cA=class extends Sp{};Re.NoopObservableGaugeMetric=cA;var uA=class extends Sp{};Re.NoopObservableUpDownCounterMetric=uA;Re.NOOP_METER=new nA;Re.NOOP_COUNTER_METRIC=new rA;Re.NOOP_GAUGE_METRIC=new iA;Re.NOOP_HISTOGRAM_METRIC=new sA;Re.NOOP_UP_DOWN_COUNTER_METRIC=new oA;Re.NOOP_OBSERVABLE_COUNTER_METRIC=new aA;Re.NOOP_OBSERVABLE_GAUGE_METRIC=new cA;Re.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new uA;function BNe(){return Re.NOOP_METER}Re.createNoopMeter=BNe});var MK=A(Eg=>{"use strict";l();Object.defineProperty(Eg,"__esModule",{value:!0});Eg.ValueType=void 0;var GNe;(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(GNe=Eg.ValueType||(Eg.ValueType={}))});var iL=A(Ap=>{"use strict";l();Object.defineProperty(Ap,"__esModule",{value:!0});Ap.defaultTextMapSetter=Ap.defaultTextMapGetter=void 0;Ap.defaultTextMapGetter={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}};Ap.defaultTextMapSetter={set(e,t,n){e!=null&&(e[t]=n)}}});var LK=A(lA=>{"use strict";l();Object.defineProperty(lA,"__esModule",{value:!0});lA.NoopContextManager=void 0;var jNe=hg(),sL=class{active(){return jNe.ROOT_CONTEXT}with(t,n,o,...r){return n.call(o,...r)}bind(t,n){return n}enable(){return this}disable(){return this}};lA.NoopContextManager=sL});var Tg=A(dA=>{"use strict";l();Object.defineProperty(dA,"__esModule",{value:!0});dA.ContextAPI=void 0;var VNe=LK(),aL=Vu(),wK=Fu(),cL="context",FNe=new VNe.NoopContextManager,uL=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return(0,aL.registerGlobal)(cL,t,wK.DiagAPI.instance())}active(){return this._getContextManager().active()}with(t,n,o,...r){return this._getContextManager().with(t,n,o,...r)}bind(t,n){return this._getContextManager().bind(t,n)}_getContextManager(){return(0,aL.getGlobal)(cL)||FNe}disable(){this._getContextManager().disable(),(0,aL.unregisterGlobal)(cL,wK.DiagAPI.instance())}};dA.ContextAPI=uL});var lL=A(Sg=>{"use strict";l();Object.defineProperty(Sg,"__esModule",{value:!0});Sg.TraceFlags=void 0;var HNe;(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(HNe=Sg.TraceFlags||(Sg.TraceFlags={}))});var pA=A(qi=>{"use strict";l();Object.defineProperty(qi,"__esModule",{value:!0});qi.INVALID_SPAN_CONTEXT=qi.INVALID_TRACEID=qi.INVALID_SPANID=void 0;var zNe=lL();qi.INVALID_SPANID="0000000000000000";qi.INVALID_TRACEID="00000000000000000000000000000000";qi.INVALID_SPAN_CONTEXT={traceId:qi.INVALID_TRACEID,spanId:qi.INVALID_SPANID,traceFlags:zNe.TraceFlags.NONE}});var mA=A(fA=>{"use strict";l();Object.defineProperty(fA,"__esModule",{value:!0});fA.NonRecordingSpan=void 0;var qNe=pA(),dL=class{constructor(t=qNe.INVALID_SPAN_CONTEXT){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){}};fA.NonRecordingSpan=dL});var mL=A(Mr=>{"use strict";l();Object.defineProperty(Mr,"__esModule",{value:!0});Mr.getSpanContext=Mr.setSpanContext=Mr.deleteSpan=Mr.setSpan=Mr.getActiveSpan=Mr.getSpan=void 0;var YNe=hg(),WNe=mA(),KNe=Tg(),pL=(0,YNe.createContextKey)("OpenTelemetry Context Key SPAN");function fL(e){return e.getValue(pL)||void 0}Mr.getSpan=fL;function ZNe(){return fL(KNe.ContextAPI.getInstance().active())}Mr.getActiveSpan=ZNe;function DK(e,t){return e.setValue(pL,t)}Mr.setSpan=DK;function JNe(e){return e.deleteValue(pL)}Mr.deleteSpan=JNe;function XNe(e,t){return DK(e,new WNe.NonRecordingSpan(t))}Mr.setSpanContext=XNe;function QNe(e){var t;return(t=fL(e))===null||t===void 0?void 0:t.spanContext()}Mr.getSpanContext=QNe});var gA=A(Yi=>{"use strict";l();Object.defineProperty(Yi,"__esModule",{value:!0});Yi.wrapSpanContext=Yi.isSpanContextValid=Yi.isValidSpanId=Yi.isValidTraceId=void 0;var kK=pA(),eOe=mA(),_A=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 UK(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let o=0;o<e.length;o+=4)n+=(_A[e.charCodeAt(o)]|0)+(_A[e.charCodeAt(o+1)]|0)+(_A[e.charCodeAt(o+2)]|0)+(_A[e.charCodeAt(o+3)]|0);return n===t}function $K(e){return UK(e,32)&&e!==kK.INVALID_TRACEID}Yi.isValidTraceId=$K;function BK(e){return UK(e,16)&&e!==kK.INVALID_SPANID}Yi.isValidSpanId=BK;function tOe(e){return $K(e.traceId)&&BK(e.spanId)}Yi.isSpanContextValid=tOe;function nOe(e){return new eOe.NonRecordingSpan(e)}Yi.wrapSpanContext=nOe});var EL=A(hA=>{"use strict";l();Object.defineProperty(hA,"__esModule",{value:!0});hA.NoopTracer=void 0;var rOe=Tg(),GK=mL(),_L=mA(),oOe=gA(),gL=rOe.ContextAPI.getInstance(),hL=class{startSpan(t,n,o=gL.active()){if(!!n?.root)return new _L.NonRecordingSpan;let i=o&&(0,GK.getSpanContext)(o);return iOe(i)&&(0,oOe.isSpanContextValid)(i)?new _L.NonRecordingSpan(i):new _L.NonRecordingSpan}startActiveSpan(t,n,o,r){let i,s,a;if(arguments.length<2)return;arguments.length===2?a=n:arguments.length===3?(i=n,a=o):(i=n,s=o,a=r);let c=s??gL.active(),u=this.startSpan(t,i,c),d=(0,GK.setSpan)(c,u);return gL.with(d,a,void 0,u)}};hA.NoopTracer=hL;function iOe(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 SL=A(EA=>{"use strict";l();Object.defineProperty(EA,"__esModule",{value:!0});EA.ProxyTracer=void 0;var sOe=EL(),aOe=new sOe.NoopTracer,TL=class{constructor(t,n,o,r){this._provider=t,this.name=n,this.version=o,this.options=r}startSpan(t,n,o){return this._getTracer().startSpan(t,n,o)}startActiveSpan(t,n,o,r){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):aOe}};EA.ProxyTracer=TL});var jK=A(TA=>{"use strict";l();Object.defineProperty(TA,"__esModule",{value:!0});TA.NoopTracerProvider=void 0;var cOe=EL(),AL=class{getTracer(t,n,o){return new cOe.NoopTracer}};TA.NoopTracerProvider=AL});var RL=A(SA=>{"use strict";l();Object.defineProperty(SA,"__esModule",{value:!0});SA.ProxyTracerProvider=void 0;var uOe=SL(),lOe=jK(),dOe=new lOe.NoopTracerProvider,yL=class{getTracer(t,n,o){var r;return(r=this.getDelegateTracer(t,n,o))!==null&&r!==void 0?r:new uOe.ProxyTracer(this,t,n,o)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:dOe}setDelegate(t){this._delegate=t}getDelegateTracer(t,n,o){var r;return(r=this._delegate)===null||r===void 0?void 0:r.getTracer(t,n,o)}};SA.ProxyTracerProvider=yL});var VK=A(Ag=>{"use strict";l();Object.defineProperty(Ag,"__esModule",{value:!0});Ag.SamplingDecision=void 0;var pOe;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(pOe=Ag.SamplingDecision||(Ag.SamplingDecision={}))});var FK=A(yg=>{"use strict";l();Object.defineProperty(yg,"__esModule",{value:!0});yg.SpanKind=void 0;var fOe;(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"})(fOe=yg.SpanKind||(yg.SpanKind={}))});var HK=A(Rg=>{"use strict";l();Object.defineProperty(Rg,"__esModule",{value:!0});Rg.SpanStatusCode=void 0;var mOe;(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(mOe=Rg.SpanStatusCode||(Rg.SpanStatusCode={}))});var zK=A(yp=>{"use strict";l();Object.defineProperty(yp,"__esModule",{value:!0});yp.validateValue=yp.validateKey=void 0;var IL="[_0-9a-z-*/]",_Oe=`[a-z]${IL}{0,255}`,gOe=`[a-z0-9]${IL}{0,240}@[a-z]${IL}{0,13}`,hOe=new RegExp(`^(?:${_Oe}|${gOe})$`),EOe=/^[ -~]{0,255}[!-~]$/,TOe=/,|=/;function SOe(e){return hOe.test(e)}yp.validateKey=SOe;function AOe(e){return EOe.test(e)&&!TOe.test(e)}yp.validateValue=AOe});var ZK=A(AA=>{"use strict";l();Object.defineProperty(AA,"__esModule",{value:!0});AA.TraceStateImpl=void 0;var qK=zK(),YK=32,yOe=512,WK=",",KK="=",bL=class e{constructor(t){this._internalState=new Map,t&&this._parse(t)}set(t,n){let o=this._clone();return o._internalState.has(t)&&o._internalState.delete(t),o._internalState.set(t,n),o}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+KK+this.get(n)),t),[]).join(WK)}_parse(t){t.length>yOe||(this._internalState=t.split(WK).reduceRight((n,o)=>{let r=o.trim(),i=r.indexOf(KK);if(i!==-1){let s=r.slice(0,i),a=r.slice(i+1,o.length);(0,qK.validateKey)(s)&&(0,qK.validateValue)(a)&&n.set(s,a)}return n},new Map),this._internalState.size>YK&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,YK))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}};AA.TraceStateImpl=bL});var JK=A(yA=>{"use strict";l();Object.defineProperty(yA,"__esModule",{value:!0});yA.createTraceState=void 0;var ROe=ZK();function IOe(e){return new ROe.TraceStateImpl(e)}yA.createTraceState=IOe});var XK=A(RA=>{"use strict";l();Object.defineProperty(RA,"__esModule",{value:!0});RA.context=void 0;var bOe=Tg();RA.context=bOe.ContextAPI.getInstance()});var QK=A(IA=>{"use strict";l();Object.defineProperty(IA,"__esModule",{value:!0});IA.diag=void 0;var NOe=Fu();IA.diag=NOe.DiagAPI.instance()});var e6=A(Rp=>{"use strict";l();Object.defineProperty(Rp,"__esModule",{value:!0});Rp.NOOP_METER_PROVIDER=Rp.NoopMeterProvider=void 0;var OOe=oL(),bA=class{getMeter(t,n,o){return OOe.NOOP_METER}};Rp.NoopMeterProvider=bA;Rp.NOOP_METER_PROVIDER=new bA});var n6=A(NA=>{"use strict";l();Object.defineProperty(NA,"__esModule",{value:!0});NA.MetricsAPI=void 0;var COe=e6(),NL=Vu(),t6=Fu(),OL="metrics",CL=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return(0,NL.registerGlobal)(OL,t,t6.DiagAPI.instance())}getMeterProvider(){return(0,NL.getGlobal)(OL)||COe.NOOP_METER_PROVIDER}getMeter(t,n,o){return this.getMeterProvider().getMeter(t,n,o)}disable(){(0,NL.unregisterGlobal)(OL,t6.DiagAPI.instance())}};NA.MetricsAPI=CL});var r6=A(OA=>{"use strict";l();Object.defineProperty(OA,"__esModule",{value:!0});OA.metrics=void 0;var vOe=n6();OA.metrics=vOe.MetricsAPI.getInstance()});var o6=A(CA=>{"use strict";l();Object.defineProperty(CA,"__esModule",{value:!0});CA.NoopTextMapPropagator=void 0;var vL=class{inject(t,n){}extract(t,n){return t}fields(){return[]}};CA.NoopTextMapPropagator=vL});var s6=A(Wi=>{"use strict";l();Object.defineProperty(Wi,"__esModule",{value:!0});Wi.deleteBaggage=Wi.setBaggage=Wi.getActiveBaggage=Wi.getBaggage=void 0;var POe=Tg(),xOe=hg(),PL=(0,xOe.createContextKey)("OpenTelemetry Baggage Key");function i6(e){return e.getValue(PL)||void 0}Wi.getBaggage=i6;function MOe(){return i6(POe.ContextAPI.getInstance().active())}Wi.getActiveBaggage=MOe;function LOe(e,t){return e.setValue(PL,t)}Wi.setBaggage=LOe;function wOe(e){return e.deleteValue(PL)}Wi.deleteBaggage=wOe});var u6=A(PA=>{"use strict";l();Object.defineProperty(PA,"__esModule",{value:!0});PA.PropagationAPI=void 0;var xL=Vu(),DOe=o6(),a6=iL(),vA=s6(),kOe=eL(),c6=Fu(),ML="propagation",UOe=new DOe.NoopTextMapPropagator,LL=class e{constructor(){this.createBaggage=kOe.createBaggage,this.getBaggage=vA.getBaggage,this.getActiveBaggage=vA.getActiveBaggage,this.setBaggage=vA.setBaggage,this.deleteBaggage=vA.deleteBaggage}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return(0,xL.registerGlobal)(ML,t,c6.DiagAPI.instance())}inject(t,n,o=a6.defaultTextMapSetter){return this._getGlobalPropagator().inject(t,n,o)}extract(t,n,o=a6.defaultTextMapGetter){return this._getGlobalPropagator().extract(t,n,o)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,xL.unregisterGlobal)(ML,c6.DiagAPI.instance())}_getGlobalPropagator(){return(0,xL.getGlobal)(ML)||UOe}};PA.PropagationAPI=LL});var l6=A(xA=>{"use strict";l();Object.defineProperty(xA,"__esModule",{value:!0});xA.propagation=void 0;var $Oe=u6();xA.propagation=$Oe.PropagationAPI.getInstance()});var m6=A(MA=>{"use strict";l();Object.defineProperty(MA,"__esModule",{value:!0});MA.TraceAPI=void 0;var wL=Vu(),d6=RL(),p6=gA(),Ip=mL(),f6=Fu(),DL="trace",kL=class e{constructor(){this._proxyTracerProvider=new d6.ProxyTracerProvider,this.wrapSpanContext=p6.wrapSpanContext,this.isSpanContextValid=p6.isSpanContextValid,this.deleteSpan=Ip.deleteSpan,this.getSpan=Ip.getSpan,this.getActiveSpan=Ip.getActiveSpan,this.getSpanContext=Ip.getSpanContext,this.setSpan=Ip.setSpan,this.setSpanContext=Ip.setSpanContext}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=(0,wL.registerGlobal)(DL,this._proxyTracerProvider,f6.DiagAPI.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return(0,wL.getGlobal)(DL)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){(0,wL.unregisterGlobal)(DL,f6.DiagAPI.instance()),this._proxyTracerProvider=new d6.ProxyTracerProvider}};MA.TraceAPI=kL});var _6=A(LA=>{"use strict";l();Object.defineProperty(LA,"__esModule",{value:!0});LA.trace=void 0;var BOe=m6();LA.trace=BOe.TraceAPI.getInstance()});var K=A(ge=>{"use strict";l();Object.defineProperty(ge,"__esModule",{value:!0});ge.trace=ge.propagation=ge.metrics=ge.diag=ge.context=ge.INVALID_SPAN_CONTEXT=ge.INVALID_TRACEID=ge.INVALID_SPANID=ge.isValidSpanId=ge.isValidTraceId=ge.isSpanContextValid=ge.createTraceState=ge.TraceFlags=ge.SpanStatusCode=ge.SpanKind=ge.SamplingDecision=ge.ProxyTracerProvider=ge.ProxyTracer=ge.defaultTextMapSetter=ge.defaultTextMapGetter=ge.ValueType=ge.createNoopMeter=ge.DiagLogLevel=ge.DiagConsoleLogger=ge.ROOT_CONTEXT=ge.createContextKey=ge.baggageEntryMetadataFromString=void 0;var GOe=eL();Object.defineProperty(ge,"baggageEntryMetadataFromString",{enumerable:!0,get:function(){return GOe.baggageEntryMetadataFromString}});var g6=hg();Object.defineProperty(ge,"createContextKey",{enumerable:!0,get:function(){return g6.createContextKey}});Object.defineProperty(ge,"ROOT_CONTEXT",{enumerable:!0,get:function(){return g6.ROOT_CONTEXT}});var jOe=xK();Object.defineProperty(ge,"DiagConsoleLogger",{enumerable:!0,get:function(){return jOe.DiagConsoleLogger}});var VOe=ZS();Object.defineProperty(ge,"DiagLogLevel",{enumerable:!0,get:function(){return VOe.DiagLogLevel}});var FOe=oL();Object.defineProperty(ge,"createNoopMeter",{enumerable:!0,get:function(){return FOe.createNoopMeter}});var HOe=MK();Object.defineProperty(ge,"ValueType",{enumerable:!0,get:function(){return HOe.ValueType}});var h6=iL();Object.defineProperty(ge,"defaultTextMapGetter",{enumerable:!0,get:function(){return h6.defaultTextMapGetter}});Object.defineProperty(ge,"defaultTextMapSetter",{enumerable:!0,get:function(){return h6.defaultTextMapSetter}});var zOe=SL();Object.defineProperty(ge,"ProxyTracer",{enumerable:!0,get:function(){return zOe.ProxyTracer}});var qOe=RL();Object.defineProperty(ge,"ProxyTracerProvider",{enumerable:!0,get:function(){return qOe.ProxyTracerProvider}});var YOe=VK();Object.defineProperty(ge,"SamplingDecision",{enumerable:!0,get:function(){return YOe.SamplingDecision}});var WOe=FK();Object.defineProperty(ge,"SpanKind",{enumerable:!0,get:function(){return WOe.SpanKind}});var KOe=HK();Object.defineProperty(ge,"SpanStatusCode",{enumerable:!0,get:function(){return KOe.SpanStatusCode}});var ZOe=lL();Object.defineProperty(ge,"TraceFlags",{enumerable:!0,get:function(){return ZOe.TraceFlags}});var JOe=JK();Object.defineProperty(ge,"createTraceState",{enumerable:!0,get:function(){return JOe.createTraceState}});var UL=gA();Object.defineProperty(ge,"isSpanContextValid",{enumerable:!0,get:function(){return UL.isSpanContextValid}});Object.defineProperty(ge,"isValidTraceId",{enumerable:!0,get:function(){return UL.isValidTraceId}});Object.defineProperty(ge,"isValidSpanId",{enumerable:!0,get:function(){return UL.isValidSpanId}});var $L=pA();Object.defineProperty(ge,"INVALID_SPANID",{enumerable:!0,get:function(){return $L.INVALID_SPANID}});Object.defineProperty(ge,"INVALID_TRACEID",{enumerable:!0,get:function(){return $L.INVALID_TRACEID}});Object.defineProperty(ge,"INVALID_SPAN_CONTEXT",{enumerable:!0,get:function(){return $L.INVALID_SPAN_CONTEXT}});var E6=XK();Object.defineProperty(ge,"context",{enumerable:!0,get:function(){return E6.context}});var T6=QK();Object.defineProperty(ge,"diag",{enumerable:!0,get:function(){return T6.diag}});var S6=r6();Object.defineProperty(ge,"metrics",{enumerable:!0,get:function(){return S6.metrics}});var A6=l6();Object.defineProperty(ge,"propagation",{enumerable:!0,get:function(){return A6.propagation}});var y6=_6();Object.defineProperty(ge,"trace",{enumerable:!0,get:function(){return y6.trace}});ge.default={context:E6.context,diag:T6.diag,metrics:S6.metrics,propagation:A6.propagation,trace:y6.trace}});var R6=A(Ig=>{"use strict";l();Object.defineProperty(Ig,"__esModule",{value:!0});Ig.SeverityNumber=void 0;var XOe;(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"})(XOe=Ig.SeverityNumber||(Ig.SeverityNumber={}))});var DA=A(bp=>{"use strict";l();Object.defineProperty(bp,"__esModule",{value:!0});bp.NOOP_LOGGER=bp.NoopLogger=void 0;var wA=class{emit(t){}};bp.NoopLogger=wA;bp.NOOP_LOGGER=new wA});var I6=A(Ki=>{"use strict";l();Object.defineProperty(Ki,"__esModule",{value:!0});Ki.API_BACKWARDS_COMPATIBILITY_VERSION=Ki.makeGetter=Ki._global=Ki.GLOBAL_LOGS_API_KEY=void 0;Ki.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");Ki._global=globalThis;function QOe(e,t,n){return o=>o===e?t:n}Ki.makeGetter=QOe;Ki.API_BACKWARDS_COMPATIBILITY_VERSION=1});var BL=A(Np=>{"use strict";l();Object.defineProperty(Np,"__esModule",{value:!0});Np.NOOP_LOGGER_PROVIDER=Np.NoopLoggerProvider=void 0;var eCe=DA(),kA=class{getLogger(t,n,o){return new eCe.NoopLogger}};Np.NoopLoggerProvider=kA;Np.NOOP_LOGGER_PROVIDER=new kA});var b6=A(UA=>{"use strict";l();Object.defineProperty(UA,"__esModule",{value:!0});UA.ProxyLogger=void 0;var tCe=DA(),GL=class{constructor(t,n,o,r){this._provider=t,this.name=n,this.version=o,this.options=r}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):tCe.NOOP_LOGGER}};UA.ProxyLogger=GL});var N6=A($A=>{"use strict";l();Object.defineProperty($A,"__esModule",{value:!0});$A.ProxyLoggerProvider=void 0;var nCe=BL(),rCe=b6(),jL=class{getLogger(t,n,o){var r;return(r=this._getDelegateLogger(t,n,o))!==null&&r!==void 0?r:new rCe.ProxyLogger(this,t,n,o)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:nCe.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,o){var r;return(r=this._delegate)===null||r===void 0?void 0:r.getLogger(t,n,o)}};$A.ProxyLoggerProvider=jL});var C6=A(BA=>{"use strict";l();Object.defineProperty(BA,"__esModule",{value:!0});BA.LogsAPI=void 0;var Io=I6(),oCe=BL(),O6=N6(),VL=class e{constructor(){this._proxyLoggerProvider=new O6.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Io._global[Io.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Io._global[Io.GLOBAL_LOGS_API_KEY]=(0,Io.makeGetter)(Io.API_BACKWARDS_COMPATIBILITY_VERSION,t,oCe.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Io._global[Io.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Io._global,Io.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,o){return this.getLoggerProvider().getLogger(t,n,o)}disable(){delete Io._global[Io.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new O6.ProxyLoggerProvider}};BA.LogsAPI=VL});var FL=A(Zi=>{"use strict";l();Object.defineProperty(Zi,"__esModule",{value:!0});Zi.logs=Zi.NoopLogger=Zi.NOOP_LOGGER=Zi.SeverityNumber=void 0;var iCe=R6();Object.defineProperty(Zi,"SeverityNumber",{enumerable:!0,get:function(){return iCe.SeverityNumber}});var v6=DA();Object.defineProperty(Zi,"NOOP_LOGGER",{enumerable:!0,get:function(){return v6.NOOP_LOGGER}});Object.defineProperty(Zi,"NoopLogger",{enumerable:!0,get:function(){return v6.NoopLogger}});var sCe=C6();Zi.logs=sCe.LogsAPI.getInstance()});var P6=A(Op=>{"use strict";l();Object.defineProperty(Op,"__esModule",{value:!0});Op.disableInstrumentations=Op.enableInstrumentations=void 0;function aCe(e,t,n,o){for(let r=0,i=e.length;r<i;r++){let s=e[r];t&&s.setTracerProvider(t),n&&s.setMeterProvider(n),o&&s.setLoggerProvider&&s.setLoggerProvider(o),s.getConfig().enabled||s.enable()}}Op.enableInstrumentations=aCe;function cCe(e){e.forEach(t=>t.disable())}Op.disableInstrumentations=cCe});var L6=A(GA=>{"use strict";l();Object.defineProperty(GA,"__esModule",{value:!0});GA.registerInstrumentations=void 0;var x6=K(),uCe=FL(),M6=P6();function lCe(e){let t=e.tracerProvider||x6.trace.getTracerProvider(),n=e.meterProvider||x6.metrics.getMeterProvider(),o=e.loggerProvider||uCe.logs.getLoggerProvider(),r=e.instrumentations?.flat()??[];return(0,M6.enableInstrumentations)(r,t,n,o),()=>{(0,M6.disableInstrumentations)(r)}}GA.registerInstrumentations=lCe});var V6=A(jA=>{"use strict";l();Object.defineProperty(jA,"__esModule",{value:!0});jA.satisfies=void 0;var YL=K(),$6=/^(?: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-]+)*))?$/,dCe=/^(?<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-]+)*))?$/,pCe={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function fCe(e,t,n){if(!mCe(e))return YL.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let o=ECe(e);if(!o)return!1;let r=[],i=B6(o,t,r,n);return i&&!n?.includePrerelease?gCe(o,r):i}jA.satisfies=fCe;function mCe(e){return typeof e=="string"&&$6.test(e)}function B6(e,t,n,o){if(t.includes("||")){let r=t.trim().split("||");for(let i of r)if(HL(e,i,n,o))return!0;return!1}else if(t.includes(" - "))t=BCe(t,o);else if(t.includes(" ")){let r=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of r)if(!HL(e,i,n,o))return!1;return!0}return HL(e,t,n,o)}function HL(e,t,n,o){if(t=hCe(t,o),t.includes(" "))return B6(e,t,n,o);{let r=TCe(t);return n.push(r),_Ce(e,r)}}function _Ce(e,t){if(t.invalid)return!1;if(!t.version||qL(t.version))return!0;let n=D6(e.versionSegments||[],t.versionSegments||[]);if(n===0){let o=e.prereleaseSegments||[],r=t.prereleaseSegments||[];!o.length&&!r.length?n=0:!o.length&&r.length?n=1:o.length&&!r.length?n=-1:n=D6(o,r)}return pCe[t.op]?.includes(n)}function gCe(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function hCe(e,t){return e=e.trim(),e=UCe(e,t),e=kCe(e),e=$Ce(e,t),e=e.trim(),e}function cr(e){return!e||e.toLowerCase()==="x"||e==="*"}function ECe(e){let t=e.match($6);if(!t){YL.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,o=t.groups.prerelease,r=t.groups.build,i=n.split("."),s=o?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:o,prereleaseSegments:s,prereleaseSegmentCount:s?s.length:0,build:r}}function TCe(e){if(!e)return{};let t=e.match(dCe);if(!t)return YL.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,o=t.groups.version,r=t.groups.prerelease,i=t.groups.build,s=o.split("."),a=r?.split(".");return n==="=="&&(n="="),{op:n||"=",version:o,versionSegments:s,versionSegmentCount:s.length,prerelease:r,prereleaseSegments:a,prereleaseSegmentCount:a?a.length:0,build:i}}function qL(e){return e==="*"||e==="x"||e==="X"}function w6(e){let t=parseInt(e,10);return isNaN(t)?e:t}function SCe(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 ACe(e,t){if(qL(e)||qL(t))return 0;let[n,o]=SCe(w6(e),w6(t));return n>o?1:n<o?-1:0}function D6(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let o=ACe(e[n]||"0",t[n]||"0");if(o!==0)return o}return 0}var G6="[a-zA-Z0-9-]",j6="0|[1-9]\\d*",yCe=`\\d*[a-zA-Z-]${G6}*`,RCe="((?:<|>)?=?)",k6=`(?:${j6}|${yCe})`,ICe=`(?:-(${k6}(?:\\.${k6})*))`,U6=`${G6}+`,bCe=`(?:\\+(${U6}(?:\\.${U6})*))`,zL=`${j6}|x|X|\\*`,bg=`[v=\\s]*(${zL})(?:\\.(${zL})(?:\\.(${zL})(?:${ICe})?${bCe}?)?)?`,NCe=`^${RCe}\\s*${bg}$`,OCe=new RegExp(NCe),CCe=`^\\s*(${bg})\\s+-\\s+(${bg})\\s*$`,vCe=new RegExp(CCe),PCe="(?:~>?)",xCe=`^${PCe}${bg}$`,MCe=new RegExp(xCe),LCe="(?:\\^)",wCe=`^${LCe}${bg}$`,DCe=new RegExp(wCe);function kCe(e){let t=MCe;return e.replace(t,(n,o,r,i,s)=>{let a;return cr(o)?a="":cr(r)?a=`>=${o}.0.0 <${+o+1}.0.0-0`:cr(i)?a=`>=${o}.${r}.0 <${o}.${+r+1}.0-0`:s?a=`>=${o}.${r}.${i}-${s} <${o}.${+r+1}.0-0`:a=`>=${o}.${r}.${i} <${o}.${+r+1}.0-0`,a})}function UCe(e,t){let n=DCe,o=t?.includePrerelease?"-0":"";return e.replace(n,(r,i,s,a,c)=>{let u;return cr(i)?u="":cr(s)?u=`>=${i}.0.0${o} <${+i+1}.0.0-0`:cr(a)?i==="0"?u=`>=${i}.${s}.0${o} <${i}.${+s+1}.0-0`:u=`>=${i}.${s}.0${o} <${+i+1}.0.0-0`:c?i==="0"?s==="0"?u=`>=${i}.${s}.${a}-${c} <${i}.${s}.${+a+1}-0`:u=`>=${i}.${s}.${a}-${c} <${i}.${+s+1}.0-0`:u=`>=${i}.${s}.${a}-${c} <${+i+1}.0.0-0`:i==="0"?s==="0"?u=`>=${i}.${s}.${a}${o} <${i}.${s}.${+a+1}-0`:u=`>=${i}.${s}.${a}${o} <${i}.${+s+1}.0-0`:u=`>=${i}.${s}.${a} <${+i+1}.0.0-0`,u})}function $Ce(e,t){let n=OCe;return e.replace(n,(o,r,i,s,a,c)=>{let u=cr(i),d=u||cr(s),p=d||cr(a),f=p;return r==="="&&f&&(r=""),c=t?.includePrerelease?"-0":"",u?r===">"||r==="<"?o="<0.0.0-0":o="*":r&&f?(d&&(s=0),a=0,r===">"?(r=">=",d?(i=+i+1,s=0,a=0):(s=+s+1,a=0)):r==="<="&&(r="<",d?i=+i+1:s=+s+1),r==="<"&&(c="-0"),o=`${r+i}.${s}.${a}${c}`):d?o=`>=${i}.0.0${c} <${+i+1}.0.0-0`:p&&(o=`>=${i}.${s}.0${c} <${i}.${+s+1}.0-0`),o})}function BCe(e,t){let n=vCe;return e.replace(n,(o,r,i,s,a,c,u,d,p,f,m,_)=>(cr(i)?r="":cr(s)?r=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:cr(a)?r=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:c?r=`>=${r}`:r=`>=${r}${t?.includePrerelease?"-0":""}`,cr(p)?d="":cr(f)?d=`<${+p+1}.0.0-0`:cr(m)?d=`<${p}.${+f+1}.0-0`:_?d=`<=${p}.${f}.${m}-${_}`:t?.includePrerelease?d=`<${p}.${f}.${+m+1}-0`:d=`<=${d}`,`${r} ${d}`.trim()))}});var WL=A(On=>{"use strict";l();Object.defineProperty(On,"__esModule",{value:!0});On.massUnwrap=On.unwrap=On.massWrap=On.wrap=void 0;var ur=console.error.bind(console);function Ng(e,t,n){let o=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:o,writable:!0,value:n})}var GCe=(e,t,n)=>{if(!e||!e[t]){ur("no original function "+String(t)+" to wrap");return}if(!n){ur("no wrapper function"),ur(new Error().stack);return}let o=e[t];if(typeof o!="function"||typeof n!="function"){ur("original object and wrapper must be functions");return}let r=n(o,t);return Ng(r,"__original",o),Ng(r,"__unwrap",()=>{e[t]===r&&Ng(e,t,o)}),Ng(r,"__wrapped",!0),Ng(e,t,r),r};On.wrap=GCe;var jCe=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{ur("must provide one or more modules to patch"),ur(new Error().stack);return}if(!(t&&Array.isArray(t))){ur("must provide one or more functions to wrap on modules");return}e.forEach(o=>{t.forEach(r=>{(0,On.wrap)(o,r,n)})})};On.massWrap=jCe;var VCe=(e,t)=>{if(!e||!e[t]){ur("no function to unwrap."),ur(new Error().stack);return}let n=e[t];if(!n.__unwrap)ur("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};On.unwrap=VCe;var FCe=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{ur("must provide one or more modules to patch"),ur(new Error().stack);return}if(!(t&&Array.isArray(t))){ur("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(o=>{(0,On.unwrap)(n,o)})})};On.massUnwrap=FCe;function Og(e){e&&e.logger&&(typeof e.logger!="function"?ur("new logger isn't a function, not replacing"):ur=e.logger)}On.default=Og;Og.wrap=On.wrap;Og.massWrap=On.massWrap;Og.unwrap=On.unwrap;Og.massUnwrap=On.massUnwrap});var F6=A(FA=>{"use strict";l();Object.defineProperty(FA,"__esModule",{value:!0});FA.InstrumentationAbstract=void 0;var KL=K(),HCe=FL(),VA=WL(),ZL=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,o){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(o),this._diag=KL.diag.createComponentLogger({namespace:t}),this._tracer=KL.trace.getTracer(t,n),this._meter=KL.metrics.getMeter(t,n),this._logger=HCe.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=VA.wrap;_unwrap=VA.unwrap;_massWrap=VA.massWrap;_massUnwrap=VA.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,o,r){if(t)try{t(o,r)}catch(i){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},i)}}};FA.InstrumentationAbstract=ZL});var z6=A((but,H6)=>{l();var Cp=1e3,vp=Cp*60,Pp=vp*60,zu=Pp*24,zCe=zu*7,qCe=zu*365.25;H6.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return YCe(e);if(n==="number"&&isFinite(e))return t.long?KCe(e):WCe(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function YCe(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]),o=(t[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return n*qCe;case"weeks":case"week":case"w":return n*zCe;case"days":case"day":case"d":return n*zu;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Pp;case"minutes":case"minute":case"mins":case"min":case"m":return n*vp;case"seconds":case"second":case"secs":case"sec":case"s":return n*Cp;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function WCe(e){var t=Math.abs(e);return t>=zu?Math.round(e/zu)+"d":t>=Pp?Math.round(e/Pp)+"h":t>=vp?Math.round(e/vp)+"m":t>=Cp?Math.round(e/Cp)+"s":e+"ms"}function KCe(e){var t=Math.abs(e);return t>=zu?HA(e,t,zu,"day"):t>=Pp?HA(e,t,Pp,"hour"):t>=vp?HA(e,t,vp,"minute"):t>=Cp?HA(e,t,Cp,"second"):e+" ms"}function HA(e,t,n,o){var r=t>=n*1.5;return Math.round(e/n)+" "+o+(r?"s":"")}});var JL=A((Out,q6)=>{l();function ZCe(e){n.debug=n,n.default=n,n.coerce=c,n.disable=s,n.enable=r,n.enabled=a,n.humanize=z6(),n.destroy=u,Object.keys(e).forEach(d=>{n[d]=e[d]}),n.names=[],n.skips=[],n.formatters={};function t(d){let p=0;for(let f=0;f<d.length;f++)p=(p<<5)-p+d.charCodeAt(f),p|=0;return n.colors[Math.abs(p)%n.colors.length]}n.selectColor=t;function n(d){let p,f=null,m,_;function h(...T){if(!h.enabled)return;let S=h,y=Number(new Date),v=y-(p||y);S.diff=v,S.prev=p,S.curr=y,p=y,T[0]=n.coerce(T[0]),typeof T[0]!="string"&&T.unshift("%O");let x=0;T[0]=T[0].replace(/%([a-zA-Z%])/g,(N,F)=>{if(N==="%%")return"%";x++;let se=n.formatters[F];if(typeof se=="function"){let $=T[x];N=se.call(S,$),T.splice(x,1),x--}return N}),n.formatArgs.call(S,T),(S.log||n.log).apply(S,T)}return h.namespace=d,h.useColors=n.useColors(),h.color=n.selectColor(d),h.extend=o,h.destroy=n.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(m!==n.namespaces&&(m=n.namespaces,_=n.enabled(d)),_),set:T=>{f=T}}),typeof n.init=="function"&&n.init(h),h}function o(d,p){let f=n(this.namespace+(typeof p>"u"?":":p)+d);return f.log=this.log,f}function r(d){n.save(d),n.namespaces=d,n.names=[],n.skips=[];let p=(typeof d=="string"?d:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let f of p)f[0]==="-"?n.skips.push(f.slice(1)):n.names.push(f)}function i(d,p){let f=0,m=0,_=-1,h=0;for(;f<d.length;)if(m<p.length&&(p[m]===d[f]||p[m]==="*"))p[m]==="*"?(_=m,h=f,m++):(f++,m++);else if(_!==-1)m=_+1,h++,f=h;else return!1;for(;m<p.length&&p[m]==="*";)m++;return m===p.length}function s(){let d=[...n.names,...n.skips.map(p=>"-"+p)].join(",");return n.enable(""),d}function a(d){for(let p of n.skips)if(i(d,p))return!1;for(let p of n.names)if(i(d,p))return!0;return!1}function c(d){return d instanceof Error?d.stack||d.message:d}function u(){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}q6.exports=ZCe});var Y6=A((Lr,zA)=>{l();Lr.formatArgs=XCe;Lr.save=QCe;Lr.load=eve;Lr.useColors=JCe;Lr.storage=tve();Lr.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`."))}})();Lr.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 JCe(){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 XCe(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+zA.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let n=0,o=0;e[0].replace(/%[a-zA-Z%]/g,r=>{r!=="%%"&&(n++,r==="%c"&&(o=n))}),e.splice(o,0,t)}Lr.log=console.debug||console.log||(()=>{});function QCe(e){try{e?Lr.storage.setItem("debug",e):Lr.storage.removeItem("debug")}catch{}}function eve(){let e;try{e=Lr.storage.getItem("debug")||Lr.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function tve(){try{return localStorage}catch{}}zA.exports=JL()(Lr);var{formatters:nve}=zA.exports;nve.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var K6=A((Put,W6)=>{"use strict";l();W6.exports=(e,t=process.argv)=>{let n=e.startsWith("-")?"":e.length===1?"-":"--",o=t.indexOf(n+e),r=t.indexOf("--");return o!==-1&&(r===-1||o<r)}});var X6=A((Mut,J6)=>{"use strict";l();var rve=require("os"),Z6=require("tty"),bo=K6(),{env:dn}=process,ic;bo("no-color")||bo("no-colors")||bo("color=false")||bo("color=never")?ic=0:(bo("color")||bo("colors")||bo("color=true")||bo("color=always"))&&(ic=1);"FORCE_COLOR"in dn&&(dn.FORCE_COLOR==="true"?ic=1:dn.FORCE_COLOR==="false"?ic=0:ic=dn.FORCE_COLOR.length===0?1:Math.min(parseInt(dn.FORCE_COLOR,10),3));function XL(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function QL(e,t){if(ic===0)return 0;if(bo("color=16m")||bo("color=full")||bo("color=truecolor"))return 3;if(bo("color=256"))return 2;if(e&&!t&&ic===void 0)return 0;let n=ic||0;if(dn.TERM==="dumb")return n;if(process.platform==="win32"){let o=rve.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in dn)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(o=>o in dn)||dn.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in dn)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(dn.TEAMCITY_VERSION)?1:0;if(dn.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in dn){let o=parseInt((dn.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(dn.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(dn.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(dn.TERM)||"COLORTERM"in dn?1:n}function ove(e){let t=QL(e,e&&e.isTTY);return XL(t)}J6.exports={supportsColor:ove,stdout:XL(QL(!0,Z6.isatty(1))),stderr:XL(QL(!0,Z6.isatty(2)))}});var eZ=A((pn,YA)=>{l();var ive=require("tty"),qA=require("util");pn.init=pve;pn.log=uve;pn.formatArgs=ave;pn.save=lve;pn.load=dve;pn.useColors=sve;pn.destroy=qA.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");pn.colors=[6,2,3,4,5,1];try{let e=X6();e&&(e.stderr||e).level>=2&&(pn.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{}pn.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(r,i)=>i.toUpperCase()),o=process.env[t];return/^(yes|on|true|enabled)$/i.test(o)?o=!0:/^(no|off|false|disabled)$/i.test(o)?o=!1:o==="null"?o=null:o=Number(o),e[n]=o,e},{});function sve(){return"colors"in pn.inspectOpts?!!pn.inspectOpts.colors:ive.isatty(process.stderr.fd)}function ave(e){let{namespace:t,useColors:n}=this;if(n){let o=this.color,r="\x1B[3"+(o<8?o:"8;5;"+o),i=` ${r};1m${t} \x1B[0m`;e[0]=i+e[0].split(`
|
|
19
|
+
`).join(`
|
|
20
|
+
`+i),e.push(r+"m+"+YA.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=cve()+t+" "+e[0]}function cve(){return pn.inspectOpts.hideDate?"":new Date().toISOString()+" "}function uve(...e){return process.stderr.write(qA.formatWithOptions(pn.inspectOpts,...e)+`
|
|
21
|
+
`)}function lve(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function dve(){return process.env.DEBUG}function pve(e){e.inspectOpts={};let t=Object.keys(pn.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=pn.inspectOpts[t[n]]}YA.exports=JL()(pn);var{formatters:Q6}=YA.exports;Q6.o=function(e){return this.inspectOpts.colors=this.useColors,qA.inspect(e,this.inspectOpts).split(`
|
|
22
|
+
`).map(t=>t.trim()).join(" ")};Q6.O=function(e){return this.inspectOpts.colors=this.useColors,qA.inspect(e,this.inspectOpts)}});var tZ=A((Dut,ew)=>{l();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?ew.exports=Y6():ew.exports=eZ()});var WA=A((Uut,nZ)=>{"use strict";l();var tw=require("path").sep;nZ.exports=function(e){var t=e.split(tw),n=t.lastIndexOf("node_modules");if(n!==-1&&t[n+1]){for(var o=t[n+1][0]==="@",r=o?t[n+1]+"/"+t[n+2]:t[n+1],i=o?3:2,s="",a=n+i-1,c=0;c<=a;c++)c===a?s+=t[c]:s+=t[c]+tw;for(var u="",d=t.length-1,p=n+i;p<=d;p++)p===d?u+=t[p]:u+=t[p]+tw;return{name:r,basedir:s,path:u}}}});var qu=A((But,ow)=>{"use strict";l();var xp=require("path"),ai=require("module"),jt=tZ()("require-in-the-middle"),fve=WA();ow.exports=Cg;ow.exports.Hook=Cg;var nw,KA;if(ai.isBuiltin)KA=ai.isBuiltin;else if(ai.builtinModules)KA=e=>e.startsWith("node:")?!0:(nw===void 0&&(nw=new Set(ai.builtinModules)),nw.has(e));else throw new Error("'require-in-the-middle' requires Node.js >=v9.3.0 or >=v8.10.0");var mve=/([/\\]index)?(\.js)?$/,rw=class{constructor(){this._localCache=new Map,this._kRitmExports=Symbol("RitmExports")}has(t,n){if(this._localCache.has(t))return!0;if(n)return!1;{let o=require.cache[t];return!!(o&&this._kRitmExports in o)}}get(t,n){let o=this._localCache.get(t);if(o!==void 0)return o;if(!n){let r=require.cache[t];return r&&r[this._kRitmExports]}}set(t,n,o){o?this._localCache.set(t,n):t in require.cache?require.cache[t][this._kRitmExports]=n:(jt('non-core module is unexpectedly not in require.cache: "%s"',t),this._localCache.set(t,n))}};function Cg(e,t,n){if(!(this instanceof Cg))return new Cg(e,t,n);if(typeof e=="function"?(n=e,e=null,t=null):typeof t=="function"&&(n=t,t=null),typeof ai._resolveFilename!="function"){console.error("Error: Expected Module._resolveFilename to be a function (was: %s) - aborting!",typeof ai._resolveFilename),console.error("Please report this error as an issue related to Node.js %s at https://github.com/nodejs/require-in-the-middle/issues",process.version);return}this._cache=new rw,this._unhooked=!1,this._origRequire=ai.prototype.require;let o=this,r=new Set,i=t?t.internals===!0:!1,s=Array.isArray(e);jt("registering require hook"),this._require=ai.prototype.require=function(c){return o._unhooked===!0?(jt("ignoring require call - module is soft-unhooked"),o._origRequire.apply(this,arguments)):a.call(this,arguments,!1)},typeof process.getBuiltinModule=="function"&&(this._origGetBuiltinModule=process.getBuiltinModule,this._getBuiltinModule=process.getBuiltinModule=function(c){return o._unhooked===!0?(jt("ignoring process.getBuiltinModule call - module is soft-unhooked"),o._origGetBuiltinModule.apply(this,arguments)):a.call(this,arguments,!0)});function a(c,u){let d=c[0],p=KA(d),f;if(p){if(f=d,d.startsWith("node:")){let y=d.slice(5);KA(y)&&(f=y)}}else{if(u)return jt("call to process.getBuiltinModule with unknown built-in id"),o._origGetBuiltinModule.apply(this,c);try{f=ai._resolveFilename(d,this)}catch(y){return jt('Module._resolveFilename("%s") threw %j, calling original Module.require',d,y.message),o._origRequire.apply(this,c)}}let m,_;if(jt("processing %s module require('%s'): %s",p===!0?"core":"non-core",d,f),o._cache.has(f,p)===!0)return jt("returning already patched cached module: %s",f),o._cache.get(f,p);let h=r.has(f);h===!1&&r.add(f);let T=u?o._origGetBuiltinModule.apply(this,c):o._origRequire.apply(this,c);if(h===!0)return jt("module is in the process of being patched already - ignoring: %s",f),T;if(r.delete(f),p===!0){if(s===!0&&e.includes(f)===!1)return jt("ignoring core module not on whitelist: %s",f),T;m=f}else if(s===!0&&e.includes(f)){let y=xp.parse(f);m=y.name,_=y.dir}else{let y=fve(f);if(y===void 0)return jt("could not parse filename: %s",f),T;m=y.name,_=y.basedir;let v=_ve(y);jt("resolved filename to module: %s (id: %s, resolved: %s, basedir: %s)",m,d,v,_);let x=!1;if(s){if(!d.startsWith(".")&&e.includes(d)&&(m=d,x=!0),!e.includes(m)&&!e.includes(v))return T;e.includes(v)&&v!==m&&(m=v,x=!0)}if(!x){let P;try{P=require.resolve(m,{paths:[_]})}catch{return jt("could not resolve module: %s",m),o._cache.set(f,T,p),T}if(P!==f)if(i===!0)m=m+xp.sep+xp.relative(_,f),jt("preparing to process require of internal file: %s",m);else return jt("ignoring require of non-main module file: %s",P),o._cache.set(f,T,p),T}}o._cache.set(f,T,p),jt("calling require hook: %s",m);let S=n(T,m,_);return o._cache.set(f,S,p),jt("returning module: %s",m),S}}Cg.prototype.unhook=function(){this._unhooked=!0,this._require===ai.prototype.require?(ai.prototype.require=this._origRequire,jt("require unhook successful")):jt("require unhook unsuccessful"),process.getBuiltinModule!==void 0&&(this._getBuiltinModule===process.getBuiltinModule?(process.getBuiltinModule=this._origGetBuiltinModule,jt("process.getBuiltinModule unhook successful")):jt("process.getBuiltinModule unhook unsuccessful"))};function _ve(e){let t=xp.sep!=="/"?e.path.split(xp.sep).join("/"):e.path;return xp.posix.join(e.name,t).replace(mve,"")}});var rZ=A(sc=>{"use strict";l();Object.defineProperty(sc,"__esModule",{value:!0});sc.ModuleNameTrie=sc.ModuleNameSeparator=void 0;sc.ModuleNameSeparator="/";var ZA=class{hooks=[];children=new Map},iw=class{_trie=new ZA;_counter=0;insert(t){let n=this._trie;for(let o of t.moduleName.split(sc.ModuleNameSeparator)){let r=n.children.get(o);r||(r=new ZA,n.children.set(o,r)),n=r}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:o}={}){let r=this._trie,i=[],s=!0;for(let a of t.split(sc.ModuleNameSeparator)){let c=r.children.get(a);if(!c){s=!1;break}o||i.push(...c.hooks),r=c}return o&&s&&i.push(...r.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((a,c)=>a.insertedId-c.insertedId),i.map(({hook:a})=>a))}};sc.ModuleNameTrie=iw});var iZ=A(JA=>{"use strict";l();Object.defineProperty(JA,"__esModule",{value:!0});JA.RequireInTheMiddleSingleton=void 0;var gve=qu(),oZ=require("path"),sw=rZ(),hve=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),aw=class e{_moduleNameTrie=new sw.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new gve.Hook(null,{internals:!0},(t,n,o)=>{let r=Eve(n),i=this._moduleNameTrie.search(r,{maintainInsertionOrder:!0,fullOnly:o===void 0});for(let{onRequire:s}of i)t=s(t,n,o);return t})}register(t,n){let o={moduleName:t,onRequire:n};return this._moduleNameTrie.insert(o),o}static getInstance(){return hve?new e:this._instance=this._instance??new e}};JA.RequireInTheMiddleSingleton=aw;function Eve(e){return oZ.sep!==sw.ModuleNameSeparator?e.split(oZ.sep).join(sw.ModuleNameSeparator):e}});var lZ=A(vg=>{l();var sZ=[],cw=new WeakMap,aZ=new WeakMap,cZ=new Map,uZ=[],Tve={set(e,t,n){let o=cw.get(e),r=o&&o[t];return typeof r=="function"?r(n):!0},get(e,t){if(t===Symbol.toStringTag)return"Module";let n=aZ.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 o=cw.get(e),r=o&&o[t];return typeof r=="function"?r(n.value):!0}};function Sve(e,t,n,o,r){cZ.set(e,r),cw.set(t,n),aZ.set(t,o);let i=new Proxy(t,Tve);sZ.forEach(s=>s(e,i,r)),uZ.push([e,i,r])}vg.register=Sve;vg.importHooks=sZ;vg.specifiers=cZ;vg.toHook=uZ});var pw=A((Yut,Lp)=>{l();var dZ=require("path"),Ave=WA(),{fileURLToPath:yve}=require("url"),{MessageChannel:Rve}=require("worker_threads"),{isBuiltin:uw}=require("module");uw||(uw=()=>!0);var{importHooks:lw,specifiers:pZ,toHook:Ive}=lZ();function bve(e,t){if(!(process.env.TURBOPACK??process.argv.includes("--turbo")))return!1;let o=e.slice(0,e.lastIndexOf("-"));return t.endsWith(o)}function fZ(e){lw.push(e),Ive.forEach(([t,n,o])=>e(t,n,o))}function mZ(e){let t=lw.indexOf(e);t>-1&&lw.splice(t,1)}function Mp(e,t,n,o){let r=e(t,n,o);r&&r!==t&&"default"in t&&(t.default=r)}var dw;function Nve(){let{port1:e,port2:t}=new Rve,n=0,o;dw=a=>{n++,e.postMessage(a)},e.on("message",()=>{n--,o&&n<=0&&o()}).unref();function r(){let a=setInterval(()=>{},1e3),c=new Promise(u=>{o=u}).then(()=>{clearInterval(a)});return n===0&&o(),c}let i=t;return{registerOptions:{data:{addHookMessagePort:i,include:[]},transferList:[i]},addHookMessagePort:i,waitForAllMessagesAcknowledged:r}}function Pg(e,t,n){if(!(this instanceof Pg))return new Pg(e,t,n);typeof e=="function"?(n=e,e=null,t=null):typeof t=="function"&&(n=t,t=null);let o=t?t.internals===!0:!1;dw&&Array.isArray(e)&&dw(e),this._iitmHook=(r,i,s)=>{let a=r,c=a.startsWith("node:"),u,d;if(c){let p=r.slice(5);uw(p)&&(r=p)}else if(a.startsWith("file://")){let p=Error.stackTraceLimit;Error.stackTraceLimit=0;try{u=yve(r),r=u}catch{}if(Error.stackTraceLimit=p,u){let f=Ave(u);f&&(r=f.name,d=f.basedir)}}if(e)for(let p of e)if(u&&p===u)Mp(n,i,u,void 0);else if(p===r){if(!d)Mp(n,i,r,d);else if(d.endsWith(pZ.get(a))||bve(pZ.get(a),d))Mp(n,i,r,d);else if(o){let f=r+dZ.sep+dZ.relative(d,u);Mp(n,i,f,d)}}else p===s&&Mp(n,i,s,d);else Mp(n,i,r,d)},fZ(this._iitmHook)}Pg.prototype.unhook=function(){mZ(this._iitmHook)};Lp.exports=Pg;Lp.exports.Hook=Pg;Lp.exports.addHook=fZ;Lp.exports.removeHook=mZ;Lp.exports.createAddHookMessageChannel=Nve});var fw=A(ac=>{"use strict";l();Object.defineProperty(ac,"__esModule",{value:!0});ac.isWrapped=ac.safeExecuteInTheMiddleAsync=ac.safeExecuteInTheMiddle=void 0;function Ove(e,t,n){let o,r;try{r=e()}catch(i){o=i}finally{if(t(o,r),o&&!n)throw o;return r}}ac.safeExecuteInTheMiddle=Ove;async function Cve(e,t,n){let o,r;try{r=await e()}catch(i){o=i}finally{if(await t(o,r),o&&!n)throw o;return r}}ac.safeExecuteInTheMiddleAsync=Cve;function vve(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}ac.isWrapped=vve});var hZ=A(XA=>{"use strict";l();Object.defineProperty(XA,"__esModule",{value:!0});XA.InstrumentationBase=void 0;var xg=require("path"),_Z=require("util"),Pve=V6(),mw=WL(),xve=F6(),Mve=iZ(),Lve=pw(),Mg=K(),wve=qu(),Dve=require("fs"),kve=fw(),_w=class extends xve.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=Mve.RequireInTheMiddleSingleton.getInstance();_enabled=!1;constructor(t,n,o){super(t,n,o);let r=this.init();r&&!Array.isArray(r)&&(r=[r]),this._modules=r||[],this._config.enabled&&this.enable()}_wrap=(t,n,o)=>{if((0,kve.isWrapped)(t[n])&&this._unwrap(t,n),_Z.types.isProxy(t)){let r=(0,mw.wrap)(Object.assign({},t),n,o);return Object.defineProperty(t,n,{value:r}),r}else return(0,mw.wrap)(t,n,o)};_unwrap=(t,n)=>_Z.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,mw.unwrap)(t,n);_massWrap=(t,n,o)=>{if(t)Array.isArray(t)||(t=[t]);else{Mg.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){Mg.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(r=>{n.forEach(i=>{this._wrap(r,i,o)})})};_massUnwrap=(t,n)=>{if(t)Array.isArray(t)||(t=[t]);else{Mg.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){Mg.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(o=>{n.forEach(r=>{this._unwrap(o,r)})})};_warnOnPreloadedModules(){let t=globalThis.require;!t?.resolve||!t?.cache||this._modules.forEach(n=>{let{name:o}=n;try{let r=t.resolve(o);t.cache[r]?.loaded&&this._diag.warn(`Module ${o} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${o}`)}catch{}})}_extractPackageVersion(t){try{let n=(0,Dve.readFileSync)(xg.join(t,"package.json"),{encoding:"utf8"}),o=JSON.parse(n).version;return typeof o=="string"?o:void 0}catch{Mg.diag.warn("Failed extracting version",t)}}_onRequire(t,n,o,r){if(!r)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(r);if(t.moduleVersion=i,t.name===o)return gZ(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:r}),t.patch(n,t.moduleVersion)):n;let s=t.files??[],a=xg.normalize(o);return s.filter(u=>u.name===a&&gZ(u.supportedVersions,i,t.includePrerelease)).reduce((u,d)=>(d.moduleExports=u,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:t.name,version:t.moduleVersion,fileName:d.name,baseDir:r}),d.patch(u,t.moduleVersion)):u),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,a,c)=>{if(!c&&xg.isAbsolute(a)){let u=xg.parse(a);a=u.name,c=u.dir}return this._onRequire(t,s,a,c)},o=(s,a,c)=>this._onRequire(t,s,a,c),r=xg.isAbsolute(t.name)?new wve.Hook([t.name],{internals:!0},o):this._requireInTheMiddleSingleton.register(t.name,o);this._hooks.push(r);let i=new Lve.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}};XA.InstrumentationBase=_w;function gZ(e,t,n){return typeof t>"u"?e.includes("*"):e.some(o=>(0,Pve.satisfies)(t,o,{includePrerelease:n}))}});var EZ=A(QA=>{"use strict";l();Object.defineProperty(QA,"__esModule",{value:!0});QA.normalize=void 0;var Uve=require("path");Object.defineProperty(QA,"normalize",{enumerable:!0,get:function(){return Uve.normalize}})});var TZ=A(wp=>{"use strict";l();Object.defineProperty(wp,"__esModule",{value:!0});wp.normalize=wp.InstrumentationBase=void 0;var $ve=hZ();Object.defineProperty(wp,"InstrumentationBase",{enumerable:!0,get:function(){return $ve.InstrumentationBase}});var Bve=EZ();Object.defineProperty(wp,"normalize",{enumerable:!0,get:function(){return Bve.normalize}})});var gw=A(Dp=>{"use strict";l();Object.defineProperty(Dp,"__esModule",{value:!0});Dp.normalize=Dp.InstrumentationBase=void 0;var SZ=TZ();Object.defineProperty(Dp,"InstrumentationBase",{enumerable:!0,get:function(){return SZ.InstrumentationBase}});Object.defineProperty(Dp,"normalize",{enumerable:!0,get:function(){return SZ.normalize}})});var AZ=A(ey=>{"use strict";l();Object.defineProperty(ey,"__esModule",{value:!0});ey.InstrumentationNodeModuleDefinition=void 0;var hw=class{files;name;supportedVersions;patch;unpatch;constructor(t,n,o,r,i){this.files=i||[],this.name=t,this.supportedVersions=n,this.patch=o,this.unpatch=r}};ey.InstrumentationNodeModuleDefinition=hw});var yZ=A(ty=>{"use strict";l();Object.defineProperty(ty,"__esModule",{value:!0});ty.InstrumentationNodeModuleFile=void 0;var Gve=gw(),Ew=class{name;supportedVersions;patch;unpatch;constructor(t,n,o,r){this.name=(0,Gve.normalize)(t),this.supportedVersions=n,this.patch=o,this.unpatch=r}};ty.InstrumentationNodeModuleFile=Ew});var RZ=A(Yu=>{"use strict";l();Object.defineProperty(Yu,"__esModule",{value:!0});Yu.semconvStabilityFromStr=Yu.SemconvStability=void 0;var ny;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(ny=Yu.SemconvStability||(Yu.SemconvStability={}));function jve(e,t){let n=ny.OLD,o=t?.split(",").map(r=>r.trim()).filter(r=>r!=="");for(let r of o??[])if(r.toLowerCase()===e+"/dup"){n=ny.DUPLICATE;break}else r.toLowerCase()===e&&(n=ny.STABLE);return n}Yu.semconvStabilityFromStr=jve});var Me=A(Yt=>{"use strict";l();Object.defineProperty(Yt,"__esModule",{value:!0});Yt.semconvStabilityFromStr=Yt.SemconvStability=Yt.safeExecuteInTheMiddleAsync=Yt.safeExecuteInTheMiddle=Yt.isWrapped=Yt.InstrumentationNodeModuleFile=Yt.InstrumentationNodeModuleDefinition=Yt.InstrumentationBase=Yt.registerInstrumentations=void 0;var Vve=L6();Object.defineProperty(Yt,"registerInstrumentations",{enumerable:!0,get:function(){return Vve.registerInstrumentations}});var Fve=gw();Object.defineProperty(Yt,"InstrumentationBase",{enumerable:!0,get:function(){return Fve.InstrumentationBase}});var Hve=AZ();Object.defineProperty(Yt,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return Hve.InstrumentationNodeModuleDefinition}});var zve=yZ();Object.defineProperty(Yt,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return zve.InstrumentationNodeModuleFile}});var Tw=fw();Object.defineProperty(Yt,"isWrapped",{enumerable:!0,get:function(){return Tw.isWrapped}});Object.defineProperty(Yt,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return Tw.safeExecuteInTheMiddle}});Object.defineProperty(Yt,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return Tw.safeExecuteInTheMiddleAsync}});var IZ=RZ();Object.defineProperty(Yt,"SemconvStability",{enumerable:!0,get:function(){return IZ.SemconvStability}});Object.defineProperty(Yt,"semconvStabilityFromStr",{enumerable:!0,get:function(){return IZ.semconvStabilityFromStr}})});function ae(e,t,n){return n?Yve(e,t,n):qve(e,t)}function qve(e,t){return Object.assign(n=>{let o=Lg[e];if(o)return n&&o.setConfig(n),o;let r=t(n);return Lg[e]=r,(0,Sw.registerInstrumentations)({instrumentations:[r]}),r},{id:e})}function Yve(e,t,n){return Object.assign(o=>{let r=n(o),i=Lg[e];if(i)return i.setConfig(r),i;let s=new t(r);return Lg[e]=s,(0,Sw.registerInstrumentations)({instrumentations:[s]}),s},{id:e})}function wg(e){let t=!1,n=[];if(!Wve(e))t=!0;else{let r=e._wrap;e._wrap=(...i)=>(t=!0,n.forEach(s=>s()),n=[],r(...i))}return r=>{t?r():n.push(r)}}function Wve(e){return typeof e._wrap=="function"}var Sw,Lg,ry=E(()=>{l();Sw=U(Me(),1),Lg={}});var Fe,Xs=E(()=>{l();Fe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__});function bZ(e,t,n,o){let r=0,i=[];Fe&&b.log(o,"Patching request.on");let s=new WeakMap,a=Ux(n);try{e.on=new Proxy(e.on,{apply:(c,u,d)=>{let[p,f,...m]=d;if(p==="data"){Fe&&b.log(o,`Handling request.on("data") with maximum body size of ${a}b`);let _=new Proxy(f,{apply:(h,T,S)=>{try{let y=S[0],v=Buffer.from(y);r<a?(i.push(v),r+=v.byteLength):Fe&&b.log(o,`Dropping request body chunk because maximum body length of ${a}b is exceeded.`)}catch{Fe&&b.error(o,"Encountered error while storing body chunk.")}return Reflect.apply(h,T,S)}});return s.set(f,_),Reflect.apply(c,u,[p,_,...m])}return Reflect.apply(c,u,d)}}),e.off=new Proxy(e.off,{apply:(c,u,d)=>{let[,p]=d,f=s.get(p);if(f){s.delete(p);let m=d.slice();return m[1]=f,Reflect.apply(c,u,m)}return Reflect.apply(c,u,d)}}),e.on("end",()=>{try{let c=Buffer.concat(i).toString("utf-8");if(c){let d=Buffer.byteLength(c,"utf-8")>a?`${Buffer.from(c).subarray(0,a-3).toString("utf-8")}...`:c;t.setSDKProcessingMetadata({normalizedRequest:{data:d}})}}catch(c){Fe&&b.error(o,"Error building captured request body",c)}})}catch(c){Fe&&b.error(o,"Error patching request to capture body",c)}}var NZ=E(()=>{l();ne();Xs()});function PZ(e,t){Ft(e,"_startSpanCallback",new WeakRef(t))}function Zve(e,{ignoreRequestBody:t,maxRequestBodySize:n,sessions:o,sessionFlushingDelayMS:r}){let i=e.emit;if(CZ.has(i))return;let s=new Proxy(i,{apply(a,c,u){if(u[0]!=="request")return a.apply(c,u);let d=Z();if(cc.context.active().getValue(OZ)||!d)return a.apply(c,u);Fe&&b.log(yw,"Handling incoming request");let p=Te().clone(),f=u[1],m=u[2],_=np(f),h=f.ip||f.socket?.remoteAddress,T=f.url||"/";n!=="none"&&!t?.(T,f)&&bZ(f,p,n,yw),p.setSDKProcessingMetadata({normalizedRequest:_,ipAddress:h});let S=(f.method||"GET").toUpperCase(),y=Ao(T),v=`${S} ${y}`;return p.setTransactionName(v),o&&d&&Jve(d,{requestIsolationScope:p,response:m,sessionFlushingDelayMS:r??6e4}),js(p,()=>{let x={traceId:ln(),sampleRand:Ht(),propagationSpanId:Un()};Pe().setPropagationContext({...x}),p.setPropagationContext({...x});let P=cc.propagation.extract(cc.context.active(),_.headers).setValue(OZ,!0);return cc.context.with(P,()=>{d.emit("httpServerRequest",f,m,_);let N=f._startSpanCallback?.deref();return N?N(()=>a.apply(c,u)):a.apply(c,u)})})}});CZ.add(s),e.emit=s}function Jve(e,{requestIsolationScope:t,response:n,sessionFlushingDelayMS:o}){t.setSDKProcessingMetadata({requestSession:{status:"ok"}}),n.once("close",()=>{let r=t.getScopeData().sdkProcessingMetadata.requestSession;if(e&&r){Fe&&b.log(`Recorded request session with status: ${r.status}`);let i=new Date;i.setSeconds(0,0);let s=i.toISOString(),a=Aw.get(e),c=a?.[s]||{exited:0,crashed:0,errored:0};if(c[{ok:"exited",crashed:"crashed",errored:"errored"}[r.status]]++,a)a[s]=c;else{Fe&&b.log("Opened new request session aggregate.");let u={[s]:c};Aw.set(e,u);let d=()=>{clearTimeout(f),p(),Aw.delete(e);let m=Object.entries(u).map(([_,h])=>({started:_,exited:h.exited,errored:h.errored,crashed:h.crashed}));e.sendSession({aggregates:m})},p=e.on("flush",()=>{Fe&&b.log("Sending request session aggregate due to client flush"),d()}),f=setTimeout(()=>{Fe&&b.log("Sending request session aggregate due to flushing schedule"),d()},o).unref()}}})}var vZ,cc,OZ,yw,Aw,CZ,Kve,Wu,oy=E(()=>{l();vZ=require("node:diagnostics_channel"),cc=U(K(),1);ne();Xs();NZ();OZ=(0,cc.createContextKey)("sentry_http_server_instrumented"),yw="Http.Server",Aw=new Map,CZ=new WeakSet;Kve=((e={})=>{let t={sessions:e.sessions??!0,sessionFlushingDelayMS:e.sessionFlushingDelayMS??6e4,maxRequestBodySize:e.maxRequestBodySize??"medium",ignoreRequestBody:e.ignoreRequestBody};return{name:yw,setupOnce(){(0,vZ.subscribe)("http.server.request.start",(o=>{Zve(o.server,t)}))},afterAllSetup(n){Fe&&n.getIntegrationByName("Http")&&b.warn("It seems that you have manually added `httpServerIntegration` while `httpIntegration` is also present. Make sure to remove `httpServerIntegration` when adding `httpIntegration`.")}}}),Wu=Kve});var Dg=A(uc=>{"use strict";l();Object.defineProperty(uc,"__esModule",{value:!0});uc.isTracingSuppressed=uc.unsuppressTracing=uc.suppressTracing=void 0;var Xve=K(),Rw=(0,Xve.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Qve(e){return e.setValue(Rw,!0)}uc.suppressTracing=Qve;function ePe(e){return e.deleteValue(Rw)}uc.unsuppressTracing=ePe;function tPe(e){return e.getValue(Rw)===!0}uc.isTracingSuppressed=tPe});var Iw=A(Hn=>{"use strict";l();Object.defineProperty(Hn,"__esModule",{value:!0});Hn.BAGGAGE_MAX_TOTAL_LENGTH=Hn.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=Hn.BAGGAGE_MAX_NAME_VALUE_PAIRS=Hn.BAGGAGE_HEADER=Hn.BAGGAGE_ITEMS_SEPARATOR=Hn.BAGGAGE_PROPERTIES_SEPARATOR=Hn.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;Hn.BAGGAGE_KEY_PAIR_SEPARATOR="=";Hn.BAGGAGE_PROPERTIES_SEPARATOR=";";Hn.BAGGAGE_ITEMS_SEPARATOR=",";Hn.BAGGAGE_HEADER="baggage";Hn.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;Hn.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;Hn.BAGGAGE_MAX_TOTAL_LENGTH=8192});var bw=A(Ji=>{"use strict";l();Object.defineProperty(Ji,"__esModule",{value:!0});Ji.parseKeyPairsIntoRecord=Ji.parsePairKeyValue=Ji.getKeyPairs=Ji.serializeKeyPairs=void 0;var nPe=K(),kp=Iw();function rPe(e){return e.reduce((t,n)=>{let o=`${t}${t!==""?kp.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return o.length>kp.BAGGAGE_MAX_TOTAL_LENGTH?t:o},"")}Ji.serializeKeyPairs=rPe;function oPe(e){return e.getAllEntries().map(([t,n])=>{let o=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(o+=kp.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),o})}Ji.getKeyPairs=oPe;function xZ(e){if(!e)return;let t=e.indexOf(kp.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),o=n.indexOf(kp.BAGGAGE_KEY_PAIR_SEPARATOR);if(o<=0)return;let r=n.substring(0,o).trim(),i=n.substring(o+1).trim();if(!r||!i)return;let s,a;try{s=decodeURIComponent(r),a=decodeURIComponent(i)}catch{return}let c;if(t!==-1&&t<e.length-1){let u=e.substring(t+1);c=(0,nPe.baggageEntryMetadataFromString)(u)}return{key:s,value:a,metadata:c}}Ji.parsePairKeyValue=xZ;function iPe(e){let t={};return typeof e=="string"&&e.length>0&&e.split(kp.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let o=xZ(n);o!==void 0&&o.value.length>0&&(t[o.key]=o.value)}),t}Ji.parseKeyPairsIntoRecord=iPe});var MZ=A(iy=>{"use strict";l();Object.defineProperty(iy,"__esModule",{value:!0});iy.W3CBaggagePropagator=void 0;var Nw=K(),sPe=Dg(),Ku=Iw(),Ow=bw(),Cw=class{inject(t,n,o){let r=Nw.propagation.getBaggage(t);if(!r||(0,sPe.isTracingSuppressed)(t))return;let i=(0,Ow.getKeyPairs)(r).filter(a=>a.length<=Ku.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,Ku.BAGGAGE_MAX_NAME_VALUE_PAIRS),s=(0,Ow.serializeKeyPairs)(i);s.length>0&&o.set(n,Ku.BAGGAGE_HEADER,s)}extract(t,n,o){let r=o.get(n,Ku.BAGGAGE_HEADER),i=Array.isArray(r)?r.join(Ku.BAGGAGE_ITEMS_SEPARATOR):r;if(!i)return t;let s={};return i.length===0||(i.split(Ku.BAGGAGE_ITEMS_SEPARATOR).forEach(c=>{let u=(0,Ow.parsePairKeyValue)(c);if(u){let d={value:u.value};u.metadata&&(d.metadata=u.metadata),s[u.key]=d}}),Object.entries(s).length===0)?t:Nw.propagation.setBaggage(t,Nw.propagation.createBaggage(s))}fields(){return[Ku.BAGGAGE_HEADER]}};iy.W3CBaggagePropagator=Cw});var LZ=A(sy=>{"use strict";l();Object.defineProperty(sy,"__esModule",{value:!0});sy.AnchoredClock=void 0;var vw=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}};sy.AnchoredClock=vw});var $Z=A(lc=>{"use strict";l();Object.defineProperty(lc,"__esModule",{value:!0});lc.isAttributeValue=lc.isAttributeKey=lc.sanitizeAttributes=void 0;var wZ=K();function aPe(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(!DZ(n)){wZ.diag.warn(`Invalid attribute key: ${n}`);continue}let o=e[n];if(!kZ(o)){wZ.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(o)?t[n]=o.slice():t[n]=o}return t}lc.sanitizeAttributes=aPe;function DZ(e){return typeof e=="string"&&e!==""}lc.isAttributeKey=DZ;function kZ(e){return e==null?!0:Array.isArray(e)?cPe(e):UZ(typeof e)}lc.isAttributeValue=kZ;function cPe(e){let t;for(let n of e){if(n==null)continue;let o=typeof n;if(o!==t){if(!t){if(UZ(o)){t=o;continue}return!1}return!1}}return!0}function UZ(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var Pw=A(ay=>{"use strict";l();Object.defineProperty(ay,"__esModule",{value:!0});ay.loggingErrorHandler=void 0;var uPe=K();function lPe(){return e=>{uPe.diag.error(dPe(e))}}ay.loggingErrorHandler=lPe;function dPe(e){return typeof e=="string"?e:JSON.stringify(pPe(e))}function pPe(e){let t={},n=e;for(;n!==null;)Object.getOwnPropertyNames(n).forEach(o=>{if(t[o])return;let r=n[o];r&&(t[o]=String(r))}),n=Object.getPrototypeOf(n);return t}});var GZ=A(Up=>{"use strict";l();Object.defineProperty(Up,"__esModule",{value:!0});Up.globalErrorHandler=Up.setGlobalErrorHandler=void 0;var fPe=Pw(),BZ=(0,fPe.loggingErrorHandler)();function mPe(e){BZ=e}Up.setGlobalErrorHandler=mPe;function _Pe(e){try{BZ(e)}catch{}}Up.globalErrorHandler=_Pe});var HZ=A(Xi=>{"use strict";l();Object.defineProperty(Xi,"__esModule",{value:!0});Xi.getStringListFromEnv=Xi.getBooleanFromEnv=Xi.getStringFromEnv=Xi.getNumberFromEnv=void 0;var jZ=K(),VZ=require("util");function gPe(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){jZ.diag.warn(`Unknown value ${(0,VZ.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}Xi.getNumberFromEnv=gPe;function FZ(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}Xi.getStringFromEnv=FZ;function hPe(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||jZ.diag.warn(`Unknown value ${(0,VZ.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}Xi.getBooleanFromEnv=hPe;function EPe(e){return FZ(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}Xi.getStringListFromEnv=EPe});var zZ=A(cy=>{"use strict";l();Object.defineProperty(cy,"__esModule",{value:!0});cy._globalThis=void 0;cy._globalThis=globalThis});var qZ=A(uy=>{"use strict";l();Object.defineProperty(uy,"__esModule",{value:!0});uy.VERSION=void 0;uy.VERSION="2.7.1"});var xw=A(ly=>{"use strict";l();Object.defineProperty(ly,"__esModule",{value:!0});ly.createConstMap=void 0;function TPe(e){let t={},n=e.length;for(let o=0;o<n;o++){let r=e[o];r&&(t[String(r).toUpperCase().replace(/[-.]/g,"_")]=r)}return t}ly.createConstMap=TPe});var k9=A(g=>{"use strict";l();Object.defineProperty(g,"__esModule",{value:!0});g.SEMATTRS_NET_HOST_CARRIER_ICC=g.SEMATTRS_NET_HOST_CARRIER_MNC=g.SEMATTRS_NET_HOST_CARRIER_MCC=g.SEMATTRS_NET_HOST_CARRIER_NAME=g.SEMATTRS_NET_HOST_CONNECTION_SUBTYPE=g.SEMATTRS_NET_HOST_CONNECTION_TYPE=g.SEMATTRS_NET_HOST_NAME=g.SEMATTRS_NET_HOST_PORT=g.SEMATTRS_NET_HOST_IP=g.SEMATTRS_NET_PEER_NAME=g.SEMATTRS_NET_PEER_PORT=g.SEMATTRS_NET_PEER_IP=g.SEMATTRS_NET_TRANSPORT=g.SEMATTRS_FAAS_INVOKED_REGION=g.SEMATTRS_FAAS_INVOKED_PROVIDER=g.SEMATTRS_FAAS_INVOKED_NAME=g.SEMATTRS_FAAS_COLDSTART=g.SEMATTRS_FAAS_CRON=g.SEMATTRS_FAAS_TIME=g.SEMATTRS_FAAS_DOCUMENT_NAME=g.SEMATTRS_FAAS_DOCUMENT_TIME=g.SEMATTRS_FAAS_DOCUMENT_OPERATION=g.SEMATTRS_FAAS_DOCUMENT_COLLECTION=g.SEMATTRS_FAAS_EXECUTION=g.SEMATTRS_FAAS_TRIGGER=g.SEMATTRS_EXCEPTION_ESCAPED=g.SEMATTRS_EXCEPTION_STACKTRACE=g.SEMATTRS_EXCEPTION_MESSAGE=g.SEMATTRS_EXCEPTION_TYPE=g.SEMATTRS_DB_SQL_TABLE=g.SEMATTRS_DB_MONGODB_COLLECTION=g.SEMATTRS_DB_REDIS_DATABASE_INDEX=g.SEMATTRS_DB_HBASE_NAMESPACE=g.SEMATTRS_DB_CASSANDRA_COORDINATOR_DC=g.SEMATTRS_DB_CASSANDRA_COORDINATOR_ID=g.SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT=g.SEMATTRS_DB_CASSANDRA_IDEMPOTENCE=g.SEMATTRS_DB_CASSANDRA_TABLE=g.SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL=g.SEMATTRS_DB_CASSANDRA_PAGE_SIZE=g.SEMATTRS_DB_CASSANDRA_KEYSPACE=g.SEMATTRS_DB_MSSQL_INSTANCE_NAME=g.SEMATTRS_DB_OPERATION=g.SEMATTRS_DB_STATEMENT=g.SEMATTRS_DB_NAME=g.SEMATTRS_DB_JDBC_DRIVER_CLASSNAME=g.SEMATTRS_DB_USER=g.SEMATTRS_DB_CONNECTION_STRING=g.SEMATTRS_DB_SYSTEM=g.SEMATTRS_AWS_LAMBDA_INVOKED_ARN=void 0;g.SEMATTRS_MESSAGING_DESTINATION_KIND=g.SEMATTRS_MESSAGING_DESTINATION=g.SEMATTRS_MESSAGING_SYSTEM=g.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES=g.SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS=g.SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT=g.SEMATTRS_AWS_DYNAMODB_COUNT=g.SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS=g.SEMATTRS_AWS_DYNAMODB_SEGMENT=g.SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD=g.SEMATTRS_AWS_DYNAMODB_TABLE_COUNT=g.SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE=g.SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES=g.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES=g.SEMATTRS_AWS_DYNAMODB_SELECT=g.SEMATTRS_AWS_DYNAMODB_INDEX_NAME=g.SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET=g.SEMATTRS_AWS_DYNAMODB_LIMIT=g.SEMATTRS_AWS_DYNAMODB_PROJECTION=g.SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ=g.SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY=g.SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY=g.SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS=g.SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY=g.SEMATTRS_AWS_DYNAMODB_TABLE_NAMES=g.SEMATTRS_HTTP_CLIENT_IP=g.SEMATTRS_HTTP_ROUTE=g.SEMATTRS_HTTP_SERVER_NAME=g.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED=g.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH=g.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED=g.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH=g.SEMATTRS_HTTP_USER_AGENT=g.SEMATTRS_HTTP_FLAVOR=g.SEMATTRS_HTTP_STATUS_CODE=g.SEMATTRS_HTTP_SCHEME=g.SEMATTRS_HTTP_HOST=g.SEMATTRS_HTTP_TARGET=g.SEMATTRS_HTTP_URL=g.SEMATTRS_HTTP_METHOD=g.SEMATTRS_CODE_LINENO=g.SEMATTRS_CODE_FILEPATH=g.SEMATTRS_CODE_NAMESPACE=g.SEMATTRS_CODE_FUNCTION=g.SEMATTRS_THREAD_NAME=g.SEMATTRS_THREAD_ID=g.SEMATTRS_ENDUSER_SCOPE=g.SEMATTRS_ENDUSER_ROLE=g.SEMATTRS_ENDUSER_ID=g.SEMATTRS_PEER_SERVICE=void 0;g.DBSYSTEMVALUES_FILEMAKER=g.DBSYSTEMVALUES_DERBY=g.DBSYSTEMVALUES_FIREBIRD=g.DBSYSTEMVALUES_ADABAS=g.DBSYSTEMVALUES_CACHE=g.DBSYSTEMVALUES_EDB=g.DBSYSTEMVALUES_FIRSTSQL=g.DBSYSTEMVALUES_INGRES=g.DBSYSTEMVALUES_HANADB=g.DBSYSTEMVALUES_MAXDB=g.DBSYSTEMVALUES_PROGRESS=g.DBSYSTEMVALUES_HSQLDB=g.DBSYSTEMVALUES_CLOUDSCAPE=g.DBSYSTEMVALUES_HIVE=g.DBSYSTEMVALUES_REDSHIFT=g.DBSYSTEMVALUES_POSTGRESQL=g.DBSYSTEMVALUES_DB2=g.DBSYSTEMVALUES_ORACLE=g.DBSYSTEMVALUES_MYSQL=g.DBSYSTEMVALUES_MSSQL=g.DBSYSTEMVALUES_OTHER_SQL=g.SemanticAttributes=g.SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE=g.SEMATTRS_MESSAGE_COMPRESSED_SIZE=g.SEMATTRS_MESSAGE_ID=g.SEMATTRS_MESSAGE_TYPE=g.SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE=g.SEMATTRS_RPC_JSONRPC_ERROR_CODE=g.SEMATTRS_RPC_JSONRPC_REQUEST_ID=g.SEMATTRS_RPC_JSONRPC_VERSION=g.SEMATTRS_RPC_GRPC_STATUS_CODE=g.SEMATTRS_RPC_METHOD=g.SEMATTRS_RPC_SERVICE=g.SEMATTRS_RPC_SYSTEM=g.SEMATTRS_MESSAGING_KAFKA_TOMBSTONE=g.SEMATTRS_MESSAGING_KAFKA_PARTITION=g.SEMATTRS_MESSAGING_KAFKA_CLIENT_ID=g.SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP=g.SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY=g.SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY=g.SEMATTRS_MESSAGING_CONSUMER_ID=g.SEMATTRS_MESSAGING_OPERATION=g.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES=g.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES=g.SEMATTRS_MESSAGING_CONVERSATION_ID=g.SEMATTRS_MESSAGING_MESSAGE_ID=g.SEMATTRS_MESSAGING_URL=g.SEMATTRS_MESSAGING_PROTOCOL_VERSION=g.SEMATTRS_MESSAGING_PROTOCOL=g.SEMATTRS_MESSAGING_TEMP_DESTINATION=void 0;g.FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD=g.FaasDocumentOperationValues=g.FAASDOCUMENTOPERATIONVALUES_DELETE=g.FAASDOCUMENTOPERATIONVALUES_EDIT=g.FAASDOCUMENTOPERATIONVALUES_INSERT=g.FaasTriggerValues=g.FAASTRIGGERVALUES_OTHER=g.FAASTRIGGERVALUES_TIMER=g.FAASTRIGGERVALUES_PUBSUB=g.FAASTRIGGERVALUES_HTTP=g.FAASTRIGGERVALUES_DATASOURCE=g.DbCassandraConsistencyLevelValues=g.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL=g.DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL=g.DBCASSANDRACONSISTENCYLEVELVALUES_ANY=g.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE=g.DBCASSANDRACONSISTENCYLEVELVALUES_THREE=g.DBCASSANDRACONSISTENCYLEVELVALUES_TWO=g.DBCASSANDRACONSISTENCYLEVELVALUES_ONE=g.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM=g.DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM=g.DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM=g.DBCASSANDRACONSISTENCYLEVELVALUES_ALL=g.DbSystemValues=g.DBSYSTEMVALUES_COCKROACHDB=g.DBSYSTEMVALUES_MEMCACHED=g.DBSYSTEMVALUES_ELASTICSEARCH=g.DBSYSTEMVALUES_GEODE=g.DBSYSTEMVALUES_NEO4J=g.DBSYSTEMVALUES_DYNAMODB=g.DBSYSTEMVALUES_COSMOSDB=g.DBSYSTEMVALUES_COUCHDB=g.DBSYSTEMVALUES_COUCHBASE=g.DBSYSTEMVALUES_REDIS=g.DBSYSTEMVALUES_MONGODB=g.DBSYSTEMVALUES_HBASE=g.DBSYSTEMVALUES_CASSANDRA=g.DBSYSTEMVALUES_COLDFUSION=g.DBSYSTEMVALUES_H2=g.DBSYSTEMVALUES_VERTICA=g.DBSYSTEMVALUES_TERADATA=g.DBSYSTEMVALUES_SYBASE=g.DBSYSTEMVALUES_SQLITE=g.DBSYSTEMVALUES_POINTBASE=g.DBSYSTEMVALUES_PERVASIVE=g.DBSYSTEMVALUES_NETEZZA=g.DBSYSTEMVALUES_MARIADB=g.DBSYSTEMVALUES_INTERBASE=g.DBSYSTEMVALUES_INSTANTDB=g.DBSYSTEMVALUES_INFORMIX=void 0;g.MESSAGINGOPERATIONVALUES_RECEIVE=g.MessagingDestinationKindValues=g.MESSAGINGDESTINATIONKINDVALUES_TOPIC=g.MESSAGINGDESTINATIONKINDVALUES_QUEUE=g.HttpFlavorValues=g.HTTPFLAVORVALUES_QUIC=g.HTTPFLAVORVALUES_SPDY=g.HTTPFLAVORVALUES_HTTP_2_0=g.HTTPFLAVORVALUES_HTTP_1_1=g.HTTPFLAVORVALUES_HTTP_1_0=g.NetHostConnectionSubtypeValues=g.NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA=g.NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA=g.NETHOSTCONNECTIONSUBTYPEVALUES_NR=g.NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN=g.NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA=g.NETHOSTCONNECTIONSUBTYPEVALUES_GSM=g.NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP=g.NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD=g.NETHOSTCONNECTIONSUBTYPEVALUES_LTE=g.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B=g.NETHOSTCONNECTIONSUBTYPEVALUES_IDEN=g.NETHOSTCONNECTIONSUBTYPEVALUES_HSPA=g.NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA=g.NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA=g.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT=g.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A=g.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0=g.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA=g.NETHOSTCONNECTIONSUBTYPEVALUES_UMTS=g.NETHOSTCONNECTIONSUBTYPEVALUES_EDGE=g.NETHOSTCONNECTIONSUBTYPEVALUES_GPRS=g.NetHostConnectionTypeValues=g.NETHOSTCONNECTIONTYPEVALUES_UNKNOWN=g.NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE=g.NETHOSTCONNECTIONTYPEVALUES_CELL=g.NETHOSTCONNECTIONTYPEVALUES_WIRED=g.NETHOSTCONNECTIONTYPEVALUES_WIFI=g.NetTransportValues=g.NETTRANSPORTVALUES_OTHER=g.NETTRANSPORTVALUES_INPROC=g.NETTRANSPORTVALUES_PIPE=g.NETTRANSPORTVALUES_UNIX=g.NETTRANSPORTVALUES_IP=g.NETTRANSPORTVALUES_IP_UDP=g.NETTRANSPORTVALUES_IP_TCP=g.FaasInvokedProviderValues=g.FAASINVOKEDPROVIDERVALUES_GCP=g.FAASINVOKEDPROVIDERVALUES_AZURE=g.FAASINVOKEDPROVIDERVALUES_AWS=void 0;g.MessageTypeValues=g.MESSAGETYPEVALUES_RECEIVED=g.MESSAGETYPEVALUES_SENT=g.RpcGrpcStatusCodeValues=g.RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED=g.RPCGRPCSTATUSCODEVALUES_DATA_LOSS=g.RPCGRPCSTATUSCODEVALUES_UNAVAILABLE=g.RPCGRPCSTATUSCODEVALUES_INTERNAL=g.RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED=g.RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE=g.RPCGRPCSTATUSCODEVALUES_ABORTED=g.RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION=g.RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED=g.RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED=g.RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS=g.RPCGRPCSTATUSCODEVALUES_NOT_FOUND=g.RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED=g.RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT=g.RPCGRPCSTATUSCODEVALUES_UNKNOWN=g.RPCGRPCSTATUSCODEVALUES_CANCELLED=g.RPCGRPCSTATUSCODEVALUES_OK=g.MessagingOperationValues=g.MESSAGINGOPERATIONVALUES_PROCESS=void 0;var No=xw(),YZ="aws.lambda.invoked_arn",WZ="db.system",KZ="db.connection_string",ZZ="db.user",JZ="db.jdbc.driver_classname",XZ="db.name",QZ="db.statement",e3="db.operation",t3="db.mssql.instance_name",n3="db.cassandra.keyspace",r3="db.cassandra.page_size",o3="db.cassandra.consistency_level",i3="db.cassandra.table",s3="db.cassandra.idempotence",a3="db.cassandra.speculative_execution_count",c3="db.cassandra.coordinator.id",u3="db.cassandra.coordinator.dc",l3="db.hbase.namespace",d3="db.redis.database_index",p3="db.mongodb.collection",f3="db.sql.table",m3="exception.type",_3="exception.message",g3="exception.stacktrace",h3="exception.escaped",E3="faas.trigger",T3="faas.execution",S3="faas.document.collection",A3="faas.document.operation",y3="faas.document.time",R3="faas.document.name",I3="faas.time",b3="faas.cron",N3="faas.coldstart",O3="faas.invoked_name",C3="faas.invoked_provider",v3="faas.invoked_region",P3="net.transport",x3="net.peer.ip",M3="net.peer.port",L3="net.peer.name",w3="net.host.ip",D3="net.host.port",k3="net.host.name",U3="net.host.connection.type",$3="net.host.connection.subtype",B3="net.host.carrier.name",G3="net.host.carrier.mcc",j3="net.host.carrier.mnc",V3="net.host.carrier.icc",F3="peer.service",H3="enduser.id",z3="enduser.role",q3="enduser.scope",Y3="thread.id",W3="thread.name",K3="code.function",Z3="code.namespace",J3="code.filepath",X3="code.lineno",Q3="http.method",eJ="http.url",tJ="http.target",nJ="http.host",rJ="http.scheme",oJ="http.status_code",iJ="http.flavor",sJ="http.user_agent",aJ="http.request_content_length",cJ="http.request_content_length_uncompressed",uJ="http.response_content_length",lJ="http.response_content_length_uncompressed",dJ="http.server_name",pJ="http.route",fJ="http.client_ip",mJ="aws.dynamodb.table_names",_J="aws.dynamodb.consumed_capacity",gJ="aws.dynamodb.item_collection_metrics",hJ="aws.dynamodb.provisioned_read_capacity",EJ="aws.dynamodb.provisioned_write_capacity",TJ="aws.dynamodb.consistent_read",SJ="aws.dynamodb.projection",AJ="aws.dynamodb.limit",yJ="aws.dynamodb.attributes_to_get",RJ="aws.dynamodb.index_name",IJ="aws.dynamodb.select",bJ="aws.dynamodb.global_secondary_indexes",NJ="aws.dynamodb.local_secondary_indexes",OJ="aws.dynamodb.exclusive_start_table",CJ="aws.dynamodb.table_count",vJ="aws.dynamodb.scan_forward",PJ="aws.dynamodb.segment",xJ="aws.dynamodb.total_segments",MJ="aws.dynamodb.count",LJ="aws.dynamodb.scanned_count",wJ="aws.dynamodb.attribute_definitions",DJ="aws.dynamodb.global_secondary_index_updates",kJ="messaging.system",UJ="messaging.destination",$J="messaging.destination_kind",BJ="messaging.temp_destination",GJ="messaging.protocol",jJ="messaging.protocol_version",VJ="messaging.url",FJ="messaging.message_id",HJ="messaging.conversation_id",zJ="messaging.message_payload_size_bytes",qJ="messaging.message_payload_compressed_size_bytes",YJ="messaging.operation",WJ="messaging.consumer_id",KJ="messaging.rabbitmq.routing_key",ZJ="messaging.kafka.message_key",JJ="messaging.kafka.consumer_group",XJ="messaging.kafka.client_id",QJ="messaging.kafka.partition",eX="messaging.kafka.tombstone",tX="rpc.system",nX="rpc.service",rX="rpc.method",oX="rpc.grpc.status_code",iX="rpc.jsonrpc.version",sX="rpc.jsonrpc.request_id",aX="rpc.jsonrpc.error_code",cX="rpc.jsonrpc.error_message",uX="message.type",lX="message.id",dX="message.compressed_size",pX="message.uncompressed_size";g.SEMATTRS_AWS_LAMBDA_INVOKED_ARN=YZ;g.SEMATTRS_DB_SYSTEM=WZ;g.SEMATTRS_DB_CONNECTION_STRING=KZ;g.SEMATTRS_DB_USER=ZZ;g.SEMATTRS_DB_JDBC_DRIVER_CLASSNAME=JZ;g.SEMATTRS_DB_NAME=XZ;g.SEMATTRS_DB_STATEMENT=QZ;g.SEMATTRS_DB_OPERATION=e3;g.SEMATTRS_DB_MSSQL_INSTANCE_NAME=t3;g.SEMATTRS_DB_CASSANDRA_KEYSPACE=n3;g.SEMATTRS_DB_CASSANDRA_PAGE_SIZE=r3;g.SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL=o3;g.SEMATTRS_DB_CASSANDRA_TABLE=i3;g.SEMATTRS_DB_CASSANDRA_IDEMPOTENCE=s3;g.SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT=a3;g.SEMATTRS_DB_CASSANDRA_COORDINATOR_ID=c3;g.SEMATTRS_DB_CASSANDRA_COORDINATOR_DC=u3;g.SEMATTRS_DB_HBASE_NAMESPACE=l3;g.SEMATTRS_DB_REDIS_DATABASE_INDEX=d3;g.SEMATTRS_DB_MONGODB_COLLECTION=p3;g.SEMATTRS_DB_SQL_TABLE=f3;g.SEMATTRS_EXCEPTION_TYPE=m3;g.SEMATTRS_EXCEPTION_MESSAGE=_3;g.SEMATTRS_EXCEPTION_STACKTRACE=g3;g.SEMATTRS_EXCEPTION_ESCAPED=h3;g.SEMATTRS_FAAS_TRIGGER=E3;g.SEMATTRS_FAAS_EXECUTION=T3;g.SEMATTRS_FAAS_DOCUMENT_COLLECTION=S3;g.SEMATTRS_FAAS_DOCUMENT_OPERATION=A3;g.SEMATTRS_FAAS_DOCUMENT_TIME=y3;g.SEMATTRS_FAAS_DOCUMENT_NAME=R3;g.SEMATTRS_FAAS_TIME=I3;g.SEMATTRS_FAAS_CRON=b3;g.SEMATTRS_FAAS_COLDSTART=N3;g.SEMATTRS_FAAS_INVOKED_NAME=O3;g.SEMATTRS_FAAS_INVOKED_PROVIDER=C3;g.SEMATTRS_FAAS_INVOKED_REGION=v3;g.SEMATTRS_NET_TRANSPORT=P3;g.SEMATTRS_NET_PEER_IP=x3;g.SEMATTRS_NET_PEER_PORT=M3;g.SEMATTRS_NET_PEER_NAME=L3;g.SEMATTRS_NET_HOST_IP=w3;g.SEMATTRS_NET_HOST_PORT=D3;g.SEMATTRS_NET_HOST_NAME=k3;g.SEMATTRS_NET_HOST_CONNECTION_TYPE=U3;g.SEMATTRS_NET_HOST_CONNECTION_SUBTYPE=$3;g.SEMATTRS_NET_HOST_CARRIER_NAME=B3;g.SEMATTRS_NET_HOST_CARRIER_MCC=G3;g.SEMATTRS_NET_HOST_CARRIER_MNC=j3;g.SEMATTRS_NET_HOST_CARRIER_ICC=V3;g.SEMATTRS_PEER_SERVICE=F3;g.SEMATTRS_ENDUSER_ID=H3;g.SEMATTRS_ENDUSER_ROLE=z3;g.SEMATTRS_ENDUSER_SCOPE=q3;g.SEMATTRS_THREAD_ID=Y3;g.SEMATTRS_THREAD_NAME=W3;g.SEMATTRS_CODE_FUNCTION=K3;g.SEMATTRS_CODE_NAMESPACE=Z3;g.SEMATTRS_CODE_FILEPATH=J3;g.SEMATTRS_CODE_LINENO=X3;g.SEMATTRS_HTTP_METHOD=Q3;g.SEMATTRS_HTTP_URL=eJ;g.SEMATTRS_HTTP_TARGET=tJ;g.SEMATTRS_HTTP_HOST=nJ;g.SEMATTRS_HTTP_SCHEME=rJ;g.SEMATTRS_HTTP_STATUS_CODE=oJ;g.SEMATTRS_HTTP_FLAVOR=iJ;g.SEMATTRS_HTTP_USER_AGENT=sJ;g.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH=aJ;g.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED=cJ;g.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH=uJ;g.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED=lJ;g.SEMATTRS_HTTP_SERVER_NAME=dJ;g.SEMATTRS_HTTP_ROUTE=pJ;g.SEMATTRS_HTTP_CLIENT_IP=fJ;g.SEMATTRS_AWS_DYNAMODB_TABLE_NAMES=mJ;g.SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY=_J;g.SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS=gJ;g.SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY=hJ;g.SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY=EJ;g.SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ=TJ;g.SEMATTRS_AWS_DYNAMODB_PROJECTION=SJ;g.SEMATTRS_AWS_DYNAMODB_LIMIT=AJ;g.SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET=yJ;g.SEMATTRS_AWS_DYNAMODB_INDEX_NAME=RJ;g.SEMATTRS_AWS_DYNAMODB_SELECT=IJ;g.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES=bJ;g.SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES=NJ;g.SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE=OJ;g.SEMATTRS_AWS_DYNAMODB_TABLE_COUNT=CJ;g.SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD=vJ;g.SEMATTRS_AWS_DYNAMODB_SEGMENT=PJ;g.SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS=xJ;g.SEMATTRS_AWS_DYNAMODB_COUNT=MJ;g.SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT=LJ;g.SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS=wJ;g.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES=DJ;g.SEMATTRS_MESSAGING_SYSTEM=kJ;g.SEMATTRS_MESSAGING_DESTINATION=UJ;g.SEMATTRS_MESSAGING_DESTINATION_KIND=$J;g.SEMATTRS_MESSAGING_TEMP_DESTINATION=BJ;g.SEMATTRS_MESSAGING_PROTOCOL=GJ;g.SEMATTRS_MESSAGING_PROTOCOL_VERSION=jJ;g.SEMATTRS_MESSAGING_URL=VJ;g.SEMATTRS_MESSAGING_MESSAGE_ID=FJ;g.SEMATTRS_MESSAGING_CONVERSATION_ID=HJ;g.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES=zJ;g.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES=qJ;g.SEMATTRS_MESSAGING_OPERATION=YJ;g.SEMATTRS_MESSAGING_CONSUMER_ID=WJ;g.SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY=KJ;g.SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY=ZJ;g.SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP=JJ;g.SEMATTRS_MESSAGING_KAFKA_CLIENT_ID=XJ;g.SEMATTRS_MESSAGING_KAFKA_PARTITION=QJ;g.SEMATTRS_MESSAGING_KAFKA_TOMBSTONE=eX;g.SEMATTRS_RPC_SYSTEM=tX;g.SEMATTRS_RPC_SERVICE=nX;g.SEMATTRS_RPC_METHOD=rX;g.SEMATTRS_RPC_GRPC_STATUS_CODE=oX;g.SEMATTRS_RPC_JSONRPC_VERSION=iX;g.SEMATTRS_RPC_JSONRPC_REQUEST_ID=sX;g.SEMATTRS_RPC_JSONRPC_ERROR_CODE=aX;g.SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE=cX;g.SEMATTRS_MESSAGE_TYPE=uX;g.SEMATTRS_MESSAGE_ID=lX;g.SEMATTRS_MESSAGE_COMPRESSED_SIZE=dX;g.SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE=pX;g.SemanticAttributes=(0,No.createConstMap)([YZ,WZ,KZ,ZZ,JZ,XZ,QZ,e3,t3,n3,r3,o3,i3,s3,a3,c3,u3,l3,d3,p3,f3,m3,_3,g3,h3,E3,T3,S3,A3,y3,R3,I3,b3,N3,O3,C3,v3,P3,x3,M3,L3,w3,D3,k3,U3,$3,B3,G3,j3,V3,F3,H3,z3,q3,Y3,W3,K3,Z3,J3,X3,Q3,eJ,tJ,nJ,rJ,oJ,iJ,sJ,aJ,cJ,uJ,lJ,dJ,pJ,fJ,mJ,_J,gJ,hJ,EJ,TJ,SJ,AJ,yJ,RJ,IJ,bJ,NJ,OJ,CJ,vJ,PJ,xJ,MJ,LJ,wJ,DJ,kJ,UJ,$J,BJ,GJ,jJ,VJ,FJ,HJ,zJ,qJ,YJ,WJ,KJ,ZJ,JJ,XJ,QJ,eX,tX,nX,rX,oX,iX,sX,aX,cX,uX,lX,dX,pX]);var fX="other_sql",mX="mssql",_X="mysql",gX="oracle",hX="db2",EX="postgresql",TX="redshift",SX="hive",AX="cloudscape",yX="hsqldb",RX="progress",IX="maxdb",bX="hanadb",NX="ingres",OX="firstsql",CX="edb",vX="cache",PX="adabas",xX="firebird",MX="derby",LX="filemaker",wX="informix",DX="instantdb",kX="interbase",UX="mariadb",$X="netezza",BX="pervasive",GX="pointbase",jX="sqlite",VX="sybase",FX="teradata",HX="vertica",zX="h2",qX="coldfusion",YX="cassandra",WX="hbase",KX="mongodb",ZX="redis",JX="couchbase",XX="couchdb",QX="cosmosdb",e5="dynamodb",t5="neo4j",n5="geode",r5="elasticsearch",o5="memcached",i5="cockroachdb";g.DBSYSTEMVALUES_OTHER_SQL=fX;g.DBSYSTEMVALUES_MSSQL=mX;g.DBSYSTEMVALUES_MYSQL=_X;g.DBSYSTEMVALUES_ORACLE=gX;g.DBSYSTEMVALUES_DB2=hX;g.DBSYSTEMVALUES_POSTGRESQL=EX;g.DBSYSTEMVALUES_REDSHIFT=TX;g.DBSYSTEMVALUES_HIVE=SX;g.DBSYSTEMVALUES_CLOUDSCAPE=AX;g.DBSYSTEMVALUES_HSQLDB=yX;g.DBSYSTEMVALUES_PROGRESS=RX;g.DBSYSTEMVALUES_MAXDB=IX;g.DBSYSTEMVALUES_HANADB=bX;g.DBSYSTEMVALUES_INGRES=NX;g.DBSYSTEMVALUES_FIRSTSQL=OX;g.DBSYSTEMVALUES_EDB=CX;g.DBSYSTEMVALUES_CACHE=vX;g.DBSYSTEMVALUES_ADABAS=PX;g.DBSYSTEMVALUES_FIREBIRD=xX;g.DBSYSTEMVALUES_DERBY=MX;g.DBSYSTEMVALUES_FILEMAKER=LX;g.DBSYSTEMVALUES_INFORMIX=wX;g.DBSYSTEMVALUES_INSTANTDB=DX;g.DBSYSTEMVALUES_INTERBASE=kX;g.DBSYSTEMVALUES_MARIADB=UX;g.DBSYSTEMVALUES_NETEZZA=$X;g.DBSYSTEMVALUES_PERVASIVE=BX;g.DBSYSTEMVALUES_POINTBASE=GX;g.DBSYSTEMVALUES_SQLITE=jX;g.DBSYSTEMVALUES_SYBASE=VX;g.DBSYSTEMVALUES_TERADATA=FX;g.DBSYSTEMVALUES_VERTICA=HX;g.DBSYSTEMVALUES_H2=zX;g.DBSYSTEMVALUES_COLDFUSION=qX;g.DBSYSTEMVALUES_CASSANDRA=YX;g.DBSYSTEMVALUES_HBASE=WX;g.DBSYSTEMVALUES_MONGODB=KX;g.DBSYSTEMVALUES_REDIS=ZX;g.DBSYSTEMVALUES_COUCHBASE=JX;g.DBSYSTEMVALUES_COUCHDB=XX;g.DBSYSTEMVALUES_COSMOSDB=QX;g.DBSYSTEMVALUES_DYNAMODB=e5;g.DBSYSTEMVALUES_NEO4J=t5;g.DBSYSTEMVALUES_GEODE=n5;g.DBSYSTEMVALUES_ELASTICSEARCH=r5;g.DBSYSTEMVALUES_MEMCACHED=o5;g.DBSYSTEMVALUES_COCKROACHDB=i5;g.DbSystemValues=(0,No.createConstMap)([fX,mX,_X,gX,hX,EX,TX,SX,AX,yX,RX,IX,bX,NX,OX,CX,vX,PX,xX,MX,LX,wX,DX,kX,UX,$X,BX,GX,jX,VX,FX,HX,zX,qX,YX,WX,KX,ZX,JX,XX,QX,e5,t5,n5,r5,o5,i5]);var s5="all",a5="each_quorum",c5="quorum",u5="local_quorum",l5="one",d5="two",p5="three",f5="local_one",m5="any",_5="serial",g5="local_serial";g.DBCASSANDRACONSISTENCYLEVELVALUES_ALL=s5;g.DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM=a5;g.DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM=c5;g.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM=u5;g.DBCASSANDRACONSISTENCYLEVELVALUES_ONE=l5;g.DBCASSANDRACONSISTENCYLEVELVALUES_TWO=d5;g.DBCASSANDRACONSISTENCYLEVELVALUES_THREE=p5;g.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE=f5;g.DBCASSANDRACONSISTENCYLEVELVALUES_ANY=m5;g.DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL=_5;g.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL=g5;g.DbCassandraConsistencyLevelValues=(0,No.createConstMap)([s5,a5,c5,u5,l5,d5,p5,f5,m5,_5,g5]);var h5="datasource",E5="http",T5="pubsub",S5="timer",A5="other";g.FAASTRIGGERVALUES_DATASOURCE=h5;g.FAASTRIGGERVALUES_HTTP=E5;g.FAASTRIGGERVALUES_PUBSUB=T5;g.FAASTRIGGERVALUES_TIMER=S5;g.FAASTRIGGERVALUES_OTHER=A5;g.FaasTriggerValues=(0,No.createConstMap)([h5,E5,T5,S5,A5]);var y5="insert",R5="edit",I5="delete";g.FAASDOCUMENTOPERATIONVALUES_INSERT=y5;g.FAASDOCUMENTOPERATIONVALUES_EDIT=R5;g.FAASDOCUMENTOPERATIONVALUES_DELETE=I5;g.FaasDocumentOperationValues=(0,No.createConstMap)([y5,R5,I5]);var b5="alibaba_cloud",N5="aws",O5="azure",C5="gcp";g.FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD=b5;g.FAASINVOKEDPROVIDERVALUES_AWS=N5;g.FAASINVOKEDPROVIDERVALUES_AZURE=O5;g.FAASINVOKEDPROVIDERVALUES_GCP=C5;g.FaasInvokedProviderValues=(0,No.createConstMap)([b5,N5,O5,C5]);var v5="ip_tcp",P5="ip_udp",x5="ip",M5="unix",L5="pipe",w5="inproc",D5="other";g.NETTRANSPORTVALUES_IP_TCP=v5;g.NETTRANSPORTVALUES_IP_UDP=P5;g.NETTRANSPORTVALUES_IP=x5;g.NETTRANSPORTVALUES_UNIX=M5;g.NETTRANSPORTVALUES_PIPE=L5;g.NETTRANSPORTVALUES_INPROC=w5;g.NETTRANSPORTVALUES_OTHER=D5;g.NetTransportValues=(0,No.createConstMap)([v5,P5,x5,M5,L5,w5,D5]);var k5="wifi",U5="wired",$5="cell",B5="unavailable",G5="unknown";g.NETHOSTCONNECTIONTYPEVALUES_WIFI=k5;g.NETHOSTCONNECTIONTYPEVALUES_WIRED=U5;g.NETHOSTCONNECTIONTYPEVALUES_CELL=$5;g.NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE=B5;g.NETHOSTCONNECTIONTYPEVALUES_UNKNOWN=G5;g.NetHostConnectionTypeValues=(0,No.createConstMap)([k5,U5,$5,B5,G5]);var j5="gprs",V5="edge",F5="umts",H5="cdma",z5="evdo_0",q5="evdo_a",Y5="cdma2000_1xrtt",W5="hsdpa",K5="hsupa",Z5="hspa",J5="iden",X5="evdo_b",Q5="lte",e9="ehrpd",t9="hspap",n9="gsm",r9="td_scdma",o9="iwlan",i9="nr",s9="nrnsa",a9="lte_ca";g.NETHOSTCONNECTIONSUBTYPEVALUES_GPRS=j5;g.NETHOSTCONNECTIONSUBTYPEVALUES_EDGE=V5;g.NETHOSTCONNECTIONSUBTYPEVALUES_UMTS=F5;g.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA=H5;g.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0=z5;g.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A=q5;g.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT=Y5;g.NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA=W5;g.NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA=K5;g.NETHOSTCONNECTIONSUBTYPEVALUES_HSPA=Z5;g.NETHOSTCONNECTIONSUBTYPEVALUES_IDEN=J5;g.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B=X5;g.NETHOSTCONNECTIONSUBTYPEVALUES_LTE=Q5;g.NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD=e9;g.NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP=t9;g.NETHOSTCONNECTIONSUBTYPEVALUES_GSM=n9;g.NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA=r9;g.NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN=o9;g.NETHOSTCONNECTIONSUBTYPEVALUES_NR=i9;g.NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA=s9;g.NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA=a9;g.NetHostConnectionSubtypeValues=(0,No.createConstMap)([j5,V5,F5,H5,z5,q5,Y5,W5,K5,Z5,J5,X5,Q5,e9,t9,n9,r9,o9,i9,s9,a9]);var c9="1.0",u9="1.1",l9="2.0",d9="SPDY",p9="QUIC";g.HTTPFLAVORVALUES_HTTP_1_0=c9;g.HTTPFLAVORVALUES_HTTP_1_1=u9;g.HTTPFLAVORVALUES_HTTP_2_0=l9;g.HTTPFLAVORVALUES_SPDY=d9;g.HTTPFLAVORVALUES_QUIC=p9;g.HttpFlavorValues={HTTP_1_0:c9,HTTP_1_1:u9,HTTP_2_0:l9,SPDY:d9,QUIC:p9};var f9="queue",m9="topic";g.MESSAGINGDESTINATIONKINDVALUES_QUEUE=f9;g.MESSAGINGDESTINATIONKINDVALUES_TOPIC=m9;g.MessagingDestinationKindValues=(0,No.createConstMap)([f9,m9]);var _9="receive",g9="process";g.MESSAGINGOPERATIONVALUES_RECEIVE=_9;g.MESSAGINGOPERATIONVALUES_PROCESS=g9;g.MessagingOperationValues=(0,No.createConstMap)([_9,g9]);var h9=0,E9=1,T9=2,S9=3,A9=4,y9=5,R9=6,I9=7,b9=8,N9=9,O9=10,C9=11,v9=12,P9=13,x9=14,M9=15,L9=16;g.RPCGRPCSTATUSCODEVALUES_OK=h9;g.RPCGRPCSTATUSCODEVALUES_CANCELLED=E9;g.RPCGRPCSTATUSCODEVALUES_UNKNOWN=T9;g.RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT=S9;g.RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED=A9;g.RPCGRPCSTATUSCODEVALUES_NOT_FOUND=y9;g.RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS=R9;g.RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED=I9;g.RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED=b9;g.RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION=N9;g.RPCGRPCSTATUSCODEVALUES_ABORTED=O9;g.RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE=C9;g.RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED=v9;g.RPCGRPCSTATUSCODEVALUES_INTERNAL=P9;g.RPCGRPCSTATUSCODEVALUES_UNAVAILABLE=x9;g.RPCGRPCSTATUSCODEVALUES_DATA_LOSS=M9;g.RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED=L9;g.RpcGrpcStatusCodeValues={OK:h9,CANCELLED:E9,UNKNOWN:T9,INVALID_ARGUMENT:S9,DEADLINE_EXCEEDED:A9,NOT_FOUND:y9,ALREADY_EXISTS:R9,PERMISSION_DENIED:I9,RESOURCE_EXHAUSTED:b9,FAILED_PRECONDITION:N9,ABORTED:O9,OUT_OF_RANGE:C9,UNIMPLEMENTED:v9,INTERNAL:P9,UNAVAILABLE:x9,DATA_LOSS:M9,UNAUTHENTICATED:L9};var w9="SENT",D9="RECEIVED";g.MESSAGETYPEVALUES_SENT=w9;g.MESSAGETYPEVALUES_RECEIVED=D9;g.MessageTypeValues=(0,No.createConstMap)([w9,D9])});var U9=A(Zu=>{"use strict";l();var SPe=Zu&&Zu.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),APe=Zu&&Zu.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&SPe(t,e,n)};Object.defineProperty(Zu,"__esModule",{value:!0});APe(k9(),Zu)});var c7=A(R=>{"use strict";l();Object.defineProperty(R,"__esModule",{value:!0});R.SEMRESATTRS_K8S_STATEFULSET_NAME=R.SEMRESATTRS_K8S_STATEFULSET_UID=R.SEMRESATTRS_K8S_DEPLOYMENT_NAME=R.SEMRESATTRS_K8S_DEPLOYMENT_UID=R.SEMRESATTRS_K8S_REPLICASET_NAME=R.SEMRESATTRS_K8S_REPLICASET_UID=R.SEMRESATTRS_K8S_CONTAINER_NAME=R.SEMRESATTRS_K8S_POD_NAME=R.SEMRESATTRS_K8S_POD_UID=R.SEMRESATTRS_K8S_NAMESPACE_NAME=R.SEMRESATTRS_K8S_NODE_UID=R.SEMRESATTRS_K8S_NODE_NAME=R.SEMRESATTRS_K8S_CLUSTER_NAME=R.SEMRESATTRS_HOST_IMAGE_VERSION=R.SEMRESATTRS_HOST_IMAGE_ID=R.SEMRESATTRS_HOST_IMAGE_NAME=R.SEMRESATTRS_HOST_ARCH=R.SEMRESATTRS_HOST_TYPE=R.SEMRESATTRS_HOST_NAME=R.SEMRESATTRS_HOST_ID=R.SEMRESATTRS_FAAS_MAX_MEMORY=R.SEMRESATTRS_FAAS_INSTANCE=R.SEMRESATTRS_FAAS_VERSION=R.SEMRESATTRS_FAAS_ID=R.SEMRESATTRS_FAAS_NAME=R.SEMRESATTRS_DEVICE_MODEL_NAME=R.SEMRESATTRS_DEVICE_MODEL_IDENTIFIER=R.SEMRESATTRS_DEVICE_ID=R.SEMRESATTRS_DEPLOYMENT_ENVIRONMENT=R.SEMRESATTRS_CONTAINER_IMAGE_TAG=R.SEMRESATTRS_CONTAINER_IMAGE_NAME=R.SEMRESATTRS_CONTAINER_RUNTIME=R.SEMRESATTRS_CONTAINER_ID=R.SEMRESATTRS_CONTAINER_NAME=R.SEMRESATTRS_AWS_LOG_STREAM_ARNS=R.SEMRESATTRS_AWS_LOG_STREAM_NAMES=R.SEMRESATTRS_AWS_LOG_GROUP_ARNS=R.SEMRESATTRS_AWS_LOG_GROUP_NAMES=R.SEMRESATTRS_AWS_EKS_CLUSTER_ARN=R.SEMRESATTRS_AWS_ECS_TASK_REVISION=R.SEMRESATTRS_AWS_ECS_TASK_FAMILY=R.SEMRESATTRS_AWS_ECS_TASK_ARN=R.SEMRESATTRS_AWS_ECS_LAUNCHTYPE=R.SEMRESATTRS_AWS_ECS_CLUSTER_ARN=R.SEMRESATTRS_AWS_ECS_CONTAINER_ARN=R.SEMRESATTRS_CLOUD_PLATFORM=R.SEMRESATTRS_CLOUD_AVAILABILITY_ZONE=R.SEMRESATTRS_CLOUD_REGION=R.SEMRESATTRS_CLOUD_ACCOUNT_ID=R.SEMRESATTRS_CLOUD_PROVIDER=void 0;R.CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE=R.CLOUDPLATFORMVALUES_AZURE_APP_SERVICE=R.CLOUDPLATFORMVALUES_AZURE_FUNCTIONS=R.CLOUDPLATFORMVALUES_AZURE_AKS=R.CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES=R.CLOUDPLATFORMVALUES_AZURE_VM=R.CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK=R.CLOUDPLATFORMVALUES_AWS_LAMBDA=R.CLOUDPLATFORMVALUES_AWS_EKS=R.CLOUDPLATFORMVALUES_AWS_ECS=R.CLOUDPLATFORMVALUES_AWS_EC2=R.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC=R.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS=R.CloudProviderValues=R.CLOUDPROVIDERVALUES_GCP=R.CLOUDPROVIDERVALUES_AZURE=R.CLOUDPROVIDERVALUES_AWS=R.CLOUDPROVIDERVALUES_ALIBABA_CLOUD=R.SemanticResourceAttributes=R.SEMRESATTRS_WEBENGINE_DESCRIPTION=R.SEMRESATTRS_WEBENGINE_VERSION=R.SEMRESATTRS_WEBENGINE_NAME=R.SEMRESATTRS_TELEMETRY_AUTO_VERSION=R.SEMRESATTRS_TELEMETRY_SDK_VERSION=R.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE=R.SEMRESATTRS_TELEMETRY_SDK_NAME=R.SEMRESATTRS_SERVICE_VERSION=R.SEMRESATTRS_SERVICE_INSTANCE_ID=R.SEMRESATTRS_SERVICE_NAMESPACE=R.SEMRESATTRS_SERVICE_NAME=R.SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION=R.SEMRESATTRS_PROCESS_RUNTIME_VERSION=R.SEMRESATTRS_PROCESS_RUNTIME_NAME=R.SEMRESATTRS_PROCESS_OWNER=R.SEMRESATTRS_PROCESS_COMMAND_ARGS=R.SEMRESATTRS_PROCESS_COMMAND_LINE=R.SEMRESATTRS_PROCESS_COMMAND=R.SEMRESATTRS_PROCESS_EXECUTABLE_PATH=R.SEMRESATTRS_PROCESS_EXECUTABLE_NAME=R.SEMRESATTRS_PROCESS_PID=R.SEMRESATTRS_OS_VERSION=R.SEMRESATTRS_OS_NAME=R.SEMRESATTRS_OS_DESCRIPTION=R.SEMRESATTRS_OS_TYPE=R.SEMRESATTRS_K8S_CRONJOB_NAME=R.SEMRESATTRS_K8S_CRONJOB_UID=R.SEMRESATTRS_K8S_JOB_NAME=R.SEMRESATTRS_K8S_JOB_UID=R.SEMRESATTRS_K8S_DAEMONSET_NAME=R.SEMRESATTRS_K8S_DAEMONSET_UID=void 0;R.TelemetrySdkLanguageValues=R.TELEMETRYSDKLANGUAGEVALUES_WEBJS=R.TELEMETRYSDKLANGUAGEVALUES_RUBY=R.TELEMETRYSDKLANGUAGEVALUES_PYTHON=R.TELEMETRYSDKLANGUAGEVALUES_PHP=R.TELEMETRYSDKLANGUAGEVALUES_NODEJS=R.TELEMETRYSDKLANGUAGEVALUES_JAVA=R.TELEMETRYSDKLANGUAGEVALUES_GO=R.TELEMETRYSDKLANGUAGEVALUES_ERLANG=R.TELEMETRYSDKLANGUAGEVALUES_DOTNET=R.TELEMETRYSDKLANGUAGEVALUES_CPP=R.OsTypeValues=R.OSTYPEVALUES_Z_OS=R.OSTYPEVALUES_SOLARIS=R.OSTYPEVALUES_AIX=R.OSTYPEVALUES_HPUX=R.OSTYPEVALUES_DRAGONFLYBSD=R.OSTYPEVALUES_OPENBSD=R.OSTYPEVALUES_NETBSD=R.OSTYPEVALUES_FREEBSD=R.OSTYPEVALUES_DARWIN=R.OSTYPEVALUES_LINUX=R.OSTYPEVALUES_WINDOWS=R.HostArchValues=R.HOSTARCHVALUES_X86=R.HOSTARCHVALUES_PPC64=R.HOSTARCHVALUES_PPC32=R.HOSTARCHVALUES_IA64=R.HOSTARCHVALUES_ARM64=R.HOSTARCHVALUES_ARM32=R.HOSTARCHVALUES_AMD64=R.AwsEcsLaunchtypeValues=R.AWSECSLAUNCHTYPEVALUES_FARGATE=R.AWSECSLAUNCHTYPEVALUES_EC2=R.CloudPlatformValues=R.CLOUDPLATFORMVALUES_GCP_APP_ENGINE=R.CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS=R.CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE=R.CLOUDPLATFORMVALUES_GCP_CLOUD_RUN=void 0;var Ju=xw(),$9="cloud.provider",B9="cloud.account.id",G9="cloud.region",j9="cloud.availability_zone",V9="cloud.platform",F9="aws.ecs.container.arn",H9="aws.ecs.cluster.arn",z9="aws.ecs.launchtype",q9="aws.ecs.task.arn",Y9="aws.ecs.task.family",W9="aws.ecs.task.revision",K9="aws.eks.cluster.arn",Z9="aws.log.group.names",J9="aws.log.group.arns",X9="aws.log.stream.names",Q9="aws.log.stream.arns",eQ="container.name",tQ="container.id",nQ="container.runtime",rQ="container.image.name",oQ="container.image.tag",iQ="deployment.environment",sQ="device.id",aQ="device.model.identifier",cQ="device.model.name",uQ="faas.name",lQ="faas.id",dQ="faas.version",pQ="faas.instance",fQ="faas.max_memory",mQ="host.id",_Q="host.name",gQ="host.type",hQ="host.arch",EQ="host.image.name",TQ="host.image.id",SQ="host.image.version",AQ="k8s.cluster.name",yQ="k8s.node.name",RQ="k8s.node.uid",IQ="k8s.namespace.name",bQ="k8s.pod.uid",NQ="k8s.pod.name",OQ="k8s.container.name",CQ="k8s.replicaset.uid",vQ="k8s.replicaset.name",PQ="k8s.deployment.uid",xQ="k8s.deployment.name",MQ="k8s.statefulset.uid",LQ="k8s.statefulset.name",wQ="k8s.daemonset.uid",DQ="k8s.daemonset.name",kQ="k8s.job.uid",UQ="k8s.job.name",$Q="k8s.cronjob.uid",BQ="k8s.cronjob.name",GQ="os.type",jQ="os.description",VQ="os.name",FQ="os.version",HQ="process.pid",zQ="process.executable.name",qQ="process.executable.path",YQ="process.command",WQ="process.command_line",KQ="process.command_args",ZQ="process.owner",JQ="process.runtime.name",XQ="process.runtime.version",QQ="process.runtime.description",e8="service.name",t8="service.namespace",n8="service.instance.id",r8="service.version",o8="telemetry.sdk.name",i8="telemetry.sdk.language",s8="telemetry.sdk.version",a8="telemetry.auto.version",c8="webengine.name",u8="webengine.version",l8="webengine.description";R.SEMRESATTRS_CLOUD_PROVIDER=$9;R.SEMRESATTRS_CLOUD_ACCOUNT_ID=B9;R.SEMRESATTRS_CLOUD_REGION=G9;R.SEMRESATTRS_CLOUD_AVAILABILITY_ZONE=j9;R.SEMRESATTRS_CLOUD_PLATFORM=V9;R.SEMRESATTRS_AWS_ECS_CONTAINER_ARN=F9;R.SEMRESATTRS_AWS_ECS_CLUSTER_ARN=H9;R.SEMRESATTRS_AWS_ECS_LAUNCHTYPE=z9;R.SEMRESATTRS_AWS_ECS_TASK_ARN=q9;R.SEMRESATTRS_AWS_ECS_TASK_FAMILY=Y9;R.SEMRESATTRS_AWS_ECS_TASK_REVISION=W9;R.SEMRESATTRS_AWS_EKS_CLUSTER_ARN=K9;R.SEMRESATTRS_AWS_LOG_GROUP_NAMES=Z9;R.SEMRESATTRS_AWS_LOG_GROUP_ARNS=J9;R.SEMRESATTRS_AWS_LOG_STREAM_NAMES=X9;R.SEMRESATTRS_AWS_LOG_STREAM_ARNS=Q9;R.SEMRESATTRS_CONTAINER_NAME=eQ;R.SEMRESATTRS_CONTAINER_ID=tQ;R.SEMRESATTRS_CONTAINER_RUNTIME=nQ;R.SEMRESATTRS_CONTAINER_IMAGE_NAME=rQ;R.SEMRESATTRS_CONTAINER_IMAGE_TAG=oQ;R.SEMRESATTRS_DEPLOYMENT_ENVIRONMENT=iQ;R.SEMRESATTRS_DEVICE_ID=sQ;R.SEMRESATTRS_DEVICE_MODEL_IDENTIFIER=aQ;R.SEMRESATTRS_DEVICE_MODEL_NAME=cQ;R.SEMRESATTRS_FAAS_NAME=uQ;R.SEMRESATTRS_FAAS_ID=lQ;R.SEMRESATTRS_FAAS_VERSION=dQ;R.SEMRESATTRS_FAAS_INSTANCE=pQ;R.SEMRESATTRS_FAAS_MAX_MEMORY=fQ;R.SEMRESATTRS_HOST_ID=mQ;R.SEMRESATTRS_HOST_NAME=_Q;R.SEMRESATTRS_HOST_TYPE=gQ;R.SEMRESATTRS_HOST_ARCH=hQ;R.SEMRESATTRS_HOST_IMAGE_NAME=EQ;R.SEMRESATTRS_HOST_IMAGE_ID=TQ;R.SEMRESATTRS_HOST_IMAGE_VERSION=SQ;R.SEMRESATTRS_K8S_CLUSTER_NAME=AQ;R.SEMRESATTRS_K8S_NODE_NAME=yQ;R.SEMRESATTRS_K8S_NODE_UID=RQ;R.SEMRESATTRS_K8S_NAMESPACE_NAME=IQ;R.SEMRESATTRS_K8S_POD_UID=bQ;R.SEMRESATTRS_K8S_POD_NAME=NQ;R.SEMRESATTRS_K8S_CONTAINER_NAME=OQ;R.SEMRESATTRS_K8S_REPLICASET_UID=CQ;R.SEMRESATTRS_K8S_REPLICASET_NAME=vQ;R.SEMRESATTRS_K8S_DEPLOYMENT_UID=PQ;R.SEMRESATTRS_K8S_DEPLOYMENT_NAME=xQ;R.SEMRESATTRS_K8S_STATEFULSET_UID=MQ;R.SEMRESATTRS_K8S_STATEFULSET_NAME=LQ;R.SEMRESATTRS_K8S_DAEMONSET_UID=wQ;R.SEMRESATTRS_K8S_DAEMONSET_NAME=DQ;R.SEMRESATTRS_K8S_JOB_UID=kQ;R.SEMRESATTRS_K8S_JOB_NAME=UQ;R.SEMRESATTRS_K8S_CRONJOB_UID=$Q;R.SEMRESATTRS_K8S_CRONJOB_NAME=BQ;R.SEMRESATTRS_OS_TYPE=GQ;R.SEMRESATTRS_OS_DESCRIPTION=jQ;R.SEMRESATTRS_OS_NAME=VQ;R.SEMRESATTRS_OS_VERSION=FQ;R.SEMRESATTRS_PROCESS_PID=HQ;R.SEMRESATTRS_PROCESS_EXECUTABLE_NAME=zQ;R.SEMRESATTRS_PROCESS_EXECUTABLE_PATH=qQ;R.SEMRESATTRS_PROCESS_COMMAND=YQ;R.SEMRESATTRS_PROCESS_COMMAND_LINE=WQ;R.SEMRESATTRS_PROCESS_COMMAND_ARGS=KQ;R.SEMRESATTRS_PROCESS_OWNER=ZQ;R.SEMRESATTRS_PROCESS_RUNTIME_NAME=JQ;R.SEMRESATTRS_PROCESS_RUNTIME_VERSION=XQ;R.SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION=QQ;R.SEMRESATTRS_SERVICE_NAME=e8;R.SEMRESATTRS_SERVICE_NAMESPACE=t8;R.SEMRESATTRS_SERVICE_INSTANCE_ID=n8;R.SEMRESATTRS_SERVICE_VERSION=r8;R.SEMRESATTRS_TELEMETRY_SDK_NAME=o8;R.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE=i8;R.SEMRESATTRS_TELEMETRY_SDK_VERSION=s8;R.SEMRESATTRS_TELEMETRY_AUTO_VERSION=a8;R.SEMRESATTRS_WEBENGINE_NAME=c8;R.SEMRESATTRS_WEBENGINE_VERSION=u8;R.SEMRESATTRS_WEBENGINE_DESCRIPTION=l8;R.SemanticResourceAttributes=(0,Ju.createConstMap)([$9,B9,G9,j9,V9,F9,H9,z9,q9,Y9,W9,K9,Z9,J9,X9,Q9,eQ,tQ,nQ,rQ,oQ,iQ,sQ,aQ,cQ,uQ,lQ,dQ,pQ,fQ,mQ,_Q,gQ,hQ,EQ,TQ,SQ,AQ,yQ,RQ,IQ,bQ,NQ,OQ,CQ,vQ,PQ,xQ,MQ,LQ,wQ,DQ,kQ,UQ,$Q,BQ,GQ,jQ,VQ,FQ,HQ,zQ,qQ,YQ,WQ,KQ,ZQ,JQ,XQ,QQ,e8,t8,n8,r8,o8,i8,s8,a8,c8,u8,l8]);var d8="alibaba_cloud",p8="aws",f8="azure",m8="gcp";R.CLOUDPROVIDERVALUES_ALIBABA_CLOUD=d8;R.CLOUDPROVIDERVALUES_AWS=p8;R.CLOUDPROVIDERVALUES_AZURE=f8;R.CLOUDPROVIDERVALUES_GCP=m8;R.CloudProviderValues=(0,Ju.createConstMap)([d8,p8,f8,m8]);var _8="alibaba_cloud_ecs",g8="alibaba_cloud_fc",h8="aws_ec2",E8="aws_ecs",T8="aws_eks",S8="aws_lambda",A8="aws_elastic_beanstalk",y8="azure_vm",R8="azure_container_instances",I8="azure_aks",b8="azure_functions",N8="azure_app_service",O8="gcp_compute_engine",C8="gcp_cloud_run",v8="gcp_kubernetes_engine",P8="gcp_cloud_functions",x8="gcp_app_engine";R.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS=_8;R.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC=g8;R.CLOUDPLATFORMVALUES_AWS_EC2=h8;R.CLOUDPLATFORMVALUES_AWS_ECS=E8;R.CLOUDPLATFORMVALUES_AWS_EKS=T8;R.CLOUDPLATFORMVALUES_AWS_LAMBDA=S8;R.CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK=A8;R.CLOUDPLATFORMVALUES_AZURE_VM=y8;R.CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES=R8;R.CLOUDPLATFORMVALUES_AZURE_AKS=I8;R.CLOUDPLATFORMVALUES_AZURE_FUNCTIONS=b8;R.CLOUDPLATFORMVALUES_AZURE_APP_SERVICE=N8;R.CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE=O8;R.CLOUDPLATFORMVALUES_GCP_CLOUD_RUN=C8;R.CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE=v8;R.CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS=P8;R.CLOUDPLATFORMVALUES_GCP_APP_ENGINE=x8;R.CloudPlatformValues=(0,Ju.createConstMap)([_8,g8,h8,E8,T8,S8,A8,y8,R8,I8,b8,N8,O8,C8,v8,P8,x8]);var M8="ec2",L8="fargate";R.AWSECSLAUNCHTYPEVALUES_EC2=M8;R.AWSECSLAUNCHTYPEVALUES_FARGATE=L8;R.AwsEcsLaunchtypeValues=(0,Ju.createConstMap)([M8,L8]);var w8="amd64",D8="arm32",k8="arm64",U8="ia64",$8="ppc32",B8="ppc64",G8="x86";R.HOSTARCHVALUES_AMD64=w8;R.HOSTARCHVALUES_ARM32=D8;R.HOSTARCHVALUES_ARM64=k8;R.HOSTARCHVALUES_IA64=U8;R.HOSTARCHVALUES_PPC32=$8;R.HOSTARCHVALUES_PPC64=B8;R.HOSTARCHVALUES_X86=G8;R.HostArchValues=(0,Ju.createConstMap)([w8,D8,k8,U8,$8,B8,G8]);var j8="windows",V8="linux",F8="darwin",H8="freebsd",z8="netbsd",q8="openbsd",Y8="dragonflybsd",W8="hpux",K8="aix",Z8="solaris",J8="z_os";R.OSTYPEVALUES_WINDOWS=j8;R.OSTYPEVALUES_LINUX=V8;R.OSTYPEVALUES_DARWIN=F8;R.OSTYPEVALUES_FREEBSD=H8;R.OSTYPEVALUES_NETBSD=z8;R.OSTYPEVALUES_OPENBSD=q8;R.OSTYPEVALUES_DRAGONFLYBSD=Y8;R.OSTYPEVALUES_HPUX=W8;R.OSTYPEVALUES_AIX=K8;R.OSTYPEVALUES_SOLARIS=Z8;R.OSTYPEVALUES_Z_OS=J8;R.OsTypeValues=(0,Ju.createConstMap)([j8,V8,F8,H8,z8,q8,Y8,W8,K8,Z8,J8]);var X8="cpp",Q8="dotnet",e7="erlang",t7="go",n7="java",r7="nodejs",o7="php",i7="python",s7="ruby",a7="webjs";R.TELEMETRYSDKLANGUAGEVALUES_CPP=X8;R.TELEMETRYSDKLANGUAGEVALUES_DOTNET=Q8;R.TELEMETRYSDKLANGUAGEVALUES_ERLANG=e7;R.TELEMETRYSDKLANGUAGEVALUES_GO=t7;R.TELEMETRYSDKLANGUAGEVALUES_JAVA=n7;R.TELEMETRYSDKLANGUAGEVALUES_NODEJS=r7;R.TELEMETRYSDKLANGUAGEVALUES_PHP=o7;R.TELEMETRYSDKLANGUAGEVALUES_PYTHON=i7;R.TELEMETRYSDKLANGUAGEVALUES_RUBY=s7;R.TELEMETRYSDKLANGUAGEVALUES_WEBJS=a7;R.TelemetrySdkLanguageValues=(0,Ju.createConstMap)([X8,Q8,e7,t7,n7,r7,o7,i7,s7,a7])});var u7=A(Xu=>{"use strict";l();var yPe=Xu&&Xu.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),RPe=Xu&&Xu.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&yPe(t,e,n)};Object.defineProperty(Xu,"__esModule",{value:!0});RPe(c7(),Xu)});var l7=A(I=>{"use strict";l();Object.defineProperty(I,"__esModule",{value:!0});I.ATTR_EXCEPTION_TYPE=I.ATTR_EXCEPTION_STACKTRACE=I.ATTR_EXCEPTION_MESSAGE=I.ATTR_EXCEPTION_ESCAPED=I.ERROR_TYPE_VALUE_OTHER=I.ATTR_ERROR_TYPE=I.DOTNET_GC_HEAP_GENERATION_VALUE_POH=I.DOTNET_GC_HEAP_GENERATION_VALUE_LOH=I.DOTNET_GC_HEAP_GENERATION_VALUE_GEN2=I.DOTNET_GC_HEAP_GENERATION_VALUE_GEN1=I.DOTNET_GC_HEAP_GENERATION_VALUE_GEN0=I.ATTR_DOTNET_GC_HEAP_GENERATION=I.DB_SYSTEM_NAME_VALUE_POSTGRESQL=I.DB_SYSTEM_NAME_VALUE_MYSQL=I.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER=I.DB_SYSTEM_NAME_VALUE_MARIADB=I.ATTR_DB_SYSTEM_NAME=I.ATTR_DB_STORED_PROCEDURE_NAME=I.ATTR_DB_RESPONSE_STATUS_CODE=I.ATTR_DB_QUERY_TEXT=I.ATTR_DB_QUERY_SUMMARY=I.ATTR_DB_OPERATION_NAME=I.ATTR_DB_OPERATION_BATCH_SIZE=I.ATTR_DB_NAMESPACE=I.ATTR_DB_COLLECTION_NAME=I.ATTR_CODE_STACKTRACE=I.ATTR_CODE_LINE_NUMBER=I.ATTR_CODE_FUNCTION_NAME=I.ATTR_CODE_FILE_PATH=I.ATTR_CODE_COLUMN_NUMBER=I.ATTR_CLIENT_PORT=I.ATTR_CLIENT_ADDRESS=I.ATTR_ASPNETCORE_USER_IS_AUTHENTICATED=I.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS=I.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE=I.ATTR_ASPNETCORE_ROUTING_MATCH_STATUS=I.ATTR_ASPNETCORE_ROUTING_IS_FALLBACK=I.ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED=I.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED=I.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER=I.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER=I.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED=I.ATTR_ASPNETCORE_RATE_LIMITING_RESULT=I.ATTR_ASPNETCORE_RATE_LIMITING_POLICY=I.ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE=I.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED=I.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED=I.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED=I.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED=I.ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT=void 0;I.OTEL_STATUS_CODE_VALUE_ERROR=I.ATTR_OTEL_STATUS_CODE=I.ATTR_OTEL_SCOPE_VERSION=I.ATTR_OTEL_SCOPE_NAME=I.NETWORK_TYPE_VALUE_IPV6=I.NETWORK_TYPE_VALUE_IPV4=I.ATTR_NETWORK_TYPE=I.NETWORK_TRANSPORT_VALUE_UNIX=I.NETWORK_TRANSPORT_VALUE_UDP=I.NETWORK_TRANSPORT_VALUE_TCP=I.NETWORK_TRANSPORT_VALUE_QUIC=I.NETWORK_TRANSPORT_VALUE_PIPE=I.ATTR_NETWORK_TRANSPORT=I.ATTR_NETWORK_PROTOCOL_VERSION=I.ATTR_NETWORK_PROTOCOL_NAME=I.ATTR_NETWORK_PEER_PORT=I.ATTR_NETWORK_PEER_ADDRESS=I.ATTR_NETWORK_LOCAL_PORT=I.ATTR_NETWORK_LOCAL_ADDRESS=I.JVM_THREAD_STATE_VALUE_WAITING=I.JVM_THREAD_STATE_VALUE_TIMED_WAITING=I.JVM_THREAD_STATE_VALUE_TERMINATED=I.JVM_THREAD_STATE_VALUE_RUNNABLE=I.JVM_THREAD_STATE_VALUE_NEW=I.JVM_THREAD_STATE_VALUE_BLOCKED=I.ATTR_JVM_THREAD_STATE=I.ATTR_JVM_THREAD_DAEMON=I.JVM_MEMORY_TYPE_VALUE_NON_HEAP=I.JVM_MEMORY_TYPE_VALUE_HEAP=I.ATTR_JVM_MEMORY_TYPE=I.ATTR_JVM_MEMORY_POOL_NAME=I.ATTR_JVM_GC_NAME=I.ATTR_JVM_GC_ACTION=I.ATTR_HTTP_ROUTE=I.ATTR_HTTP_RESPONSE_STATUS_CODE=I.ATTR_HTTP_RESPONSE_HEADER=I.ATTR_HTTP_REQUEST_RESEND_COUNT=I.ATTR_HTTP_REQUEST_METHOD_ORIGINAL=I.HTTP_REQUEST_METHOD_VALUE_TRACE=I.HTTP_REQUEST_METHOD_VALUE_PUT=I.HTTP_REQUEST_METHOD_VALUE_POST=I.HTTP_REQUEST_METHOD_VALUE_PATCH=I.HTTP_REQUEST_METHOD_VALUE_OPTIONS=I.HTTP_REQUEST_METHOD_VALUE_HEAD=I.HTTP_REQUEST_METHOD_VALUE_GET=I.HTTP_REQUEST_METHOD_VALUE_DELETE=I.HTTP_REQUEST_METHOD_VALUE_CONNECT=I.HTTP_REQUEST_METHOD_VALUE_OTHER=I.ATTR_HTTP_REQUEST_METHOD=I.ATTR_HTTP_REQUEST_HEADER=void 0;I.ATTR_USER_AGENT_ORIGINAL=I.ATTR_URL_SCHEME=I.ATTR_URL_QUERY=I.ATTR_URL_PATH=I.ATTR_URL_FULL=I.ATTR_URL_FRAGMENT=I.ATTR_TELEMETRY_SDK_VERSION=I.ATTR_TELEMETRY_SDK_NAME=I.TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS=I.TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT=I.TELEMETRY_SDK_LANGUAGE_VALUE_RUST=I.TELEMETRY_SDK_LANGUAGE_VALUE_RUBY=I.TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON=I.TELEMETRY_SDK_LANGUAGE_VALUE_PHP=I.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS=I.TELEMETRY_SDK_LANGUAGE_VALUE_JAVA=I.TELEMETRY_SDK_LANGUAGE_VALUE_GO=I.TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG=I.TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET=I.TELEMETRY_SDK_LANGUAGE_VALUE_CPP=I.ATTR_TELEMETRY_SDK_LANGUAGE=I.SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS=I.SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS=I.SIGNALR_TRANSPORT_VALUE_LONG_POLLING=I.ATTR_SIGNALR_TRANSPORT=I.SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT=I.SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE=I.SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN=I.ATTR_SIGNALR_CONNECTION_STATUS=I.ATTR_SERVICE_VERSION=I.ATTR_SERVICE_NAMESPACE=I.ATTR_SERVICE_NAME=I.ATTR_SERVICE_INSTANCE_ID=I.ATTR_SERVER_PORT=I.ATTR_SERVER_ADDRESS=I.ATTR_OTEL_STATUS_DESCRIPTION=I.OTEL_STATUS_CODE_VALUE_OK=void 0;I.ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT="aspnetcore.diagnostics.exception.result";I.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED="aborted";I.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED="handled";I.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED="skipped";I.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED="unhandled";I.ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE="aspnetcore.diagnostics.handler.type";I.ATTR_ASPNETCORE_RATE_LIMITING_POLICY="aspnetcore.rate_limiting.policy";I.ATTR_ASPNETCORE_RATE_LIMITING_RESULT="aspnetcore.rate_limiting.result";I.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED="acquired";I.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER="endpoint_limiter";I.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER="global_limiter";I.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED="request_canceled";I.ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED="aspnetcore.request.is_unhandled";I.ATTR_ASPNETCORE_ROUTING_IS_FALLBACK="aspnetcore.routing.is_fallback";I.ATTR_ASPNETCORE_ROUTING_MATCH_STATUS="aspnetcore.routing.match_status";I.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE="failure";I.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS="success";I.ATTR_ASPNETCORE_USER_IS_AUTHENTICATED="aspnetcore.user.is_authenticated";I.ATTR_CLIENT_ADDRESS="client.address";I.ATTR_CLIENT_PORT="client.port";I.ATTR_CODE_COLUMN_NUMBER="code.column.number";I.ATTR_CODE_FILE_PATH="code.file.path";I.ATTR_CODE_FUNCTION_NAME="code.function.name";I.ATTR_CODE_LINE_NUMBER="code.line.number";I.ATTR_CODE_STACKTRACE="code.stacktrace";I.ATTR_DB_COLLECTION_NAME="db.collection.name";I.ATTR_DB_NAMESPACE="db.namespace";I.ATTR_DB_OPERATION_BATCH_SIZE="db.operation.batch.size";I.ATTR_DB_OPERATION_NAME="db.operation.name";I.ATTR_DB_QUERY_SUMMARY="db.query.summary";I.ATTR_DB_QUERY_TEXT="db.query.text";I.ATTR_DB_RESPONSE_STATUS_CODE="db.response.status_code";I.ATTR_DB_STORED_PROCEDURE_NAME="db.stored_procedure.name";I.ATTR_DB_SYSTEM_NAME="db.system.name";I.DB_SYSTEM_NAME_VALUE_MARIADB="mariadb";I.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER="microsoft.sql_server";I.DB_SYSTEM_NAME_VALUE_MYSQL="mysql";I.DB_SYSTEM_NAME_VALUE_POSTGRESQL="postgresql";I.ATTR_DOTNET_GC_HEAP_GENERATION="dotnet.gc.heap.generation";I.DOTNET_GC_HEAP_GENERATION_VALUE_GEN0="gen0";I.DOTNET_GC_HEAP_GENERATION_VALUE_GEN1="gen1";I.DOTNET_GC_HEAP_GENERATION_VALUE_GEN2="gen2";I.DOTNET_GC_HEAP_GENERATION_VALUE_LOH="loh";I.DOTNET_GC_HEAP_GENERATION_VALUE_POH="poh";I.ATTR_ERROR_TYPE="error.type";I.ERROR_TYPE_VALUE_OTHER="_OTHER";I.ATTR_EXCEPTION_ESCAPED="exception.escaped";I.ATTR_EXCEPTION_MESSAGE="exception.message";I.ATTR_EXCEPTION_STACKTRACE="exception.stacktrace";I.ATTR_EXCEPTION_TYPE="exception.type";var IPe=e=>`http.request.header.${e}`;I.ATTR_HTTP_REQUEST_HEADER=IPe;I.ATTR_HTTP_REQUEST_METHOD="http.request.method";I.HTTP_REQUEST_METHOD_VALUE_OTHER="_OTHER";I.HTTP_REQUEST_METHOD_VALUE_CONNECT="CONNECT";I.HTTP_REQUEST_METHOD_VALUE_DELETE="DELETE";I.HTTP_REQUEST_METHOD_VALUE_GET="GET";I.HTTP_REQUEST_METHOD_VALUE_HEAD="HEAD";I.HTTP_REQUEST_METHOD_VALUE_OPTIONS="OPTIONS";I.HTTP_REQUEST_METHOD_VALUE_PATCH="PATCH";I.HTTP_REQUEST_METHOD_VALUE_POST="POST";I.HTTP_REQUEST_METHOD_VALUE_PUT="PUT";I.HTTP_REQUEST_METHOD_VALUE_TRACE="TRACE";I.ATTR_HTTP_REQUEST_METHOD_ORIGINAL="http.request.method_original";I.ATTR_HTTP_REQUEST_RESEND_COUNT="http.request.resend_count";var bPe=e=>`http.response.header.${e}`;I.ATTR_HTTP_RESPONSE_HEADER=bPe;I.ATTR_HTTP_RESPONSE_STATUS_CODE="http.response.status_code";I.ATTR_HTTP_ROUTE="http.route";I.ATTR_JVM_GC_ACTION="jvm.gc.action";I.ATTR_JVM_GC_NAME="jvm.gc.name";I.ATTR_JVM_MEMORY_POOL_NAME="jvm.memory.pool.name";I.ATTR_JVM_MEMORY_TYPE="jvm.memory.type";I.JVM_MEMORY_TYPE_VALUE_HEAP="heap";I.JVM_MEMORY_TYPE_VALUE_NON_HEAP="non_heap";I.ATTR_JVM_THREAD_DAEMON="jvm.thread.daemon";I.ATTR_JVM_THREAD_STATE="jvm.thread.state";I.JVM_THREAD_STATE_VALUE_BLOCKED="blocked";I.JVM_THREAD_STATE_VALUE_NEW="new";I.JVM_THREAD_STATE_VALUE_RUNNABLE="runnable";I.JVM_THREAD_STATE_VALUE_TERMINATED="terminated";I.JVM_THREAD_STATE_VALUE_TIMED_WAITING="timed_waiting";I.JVM_THREAD_STATE_VALUE_WAITING="waiting";I.ATTR_NETWORK_LOCAL_ADDRESS="network.local.address";I.ATTR_NETWORK_LOCAL_PORT="network.local.port";I.ATTR_NETWORK_PEER_ADDRESS="network.peer.address";I.ATTR_NETWORK_PEER_PORT="network.peer.port";I.ATTR_NETWORK_PROTOCOL_NAME="network.protocol.name";I.ATTR_NETWORK_PROTOCOL_VERSION="network.protocol.version";I.ATTR_NETWORK_TRANSPORT="network.transport";I.NETWORK_TRANSPORT_VALUE_PIPE="pipe";I.NETWORK_TRANSPORT_VALUE_QUIC="quic";I.NETWORK_TRANSPORT_VALUE_TCP="tcp";I.NETWORK_TRANSPORT_VALUE_UDP="udp";I.NETWORK_TRANSPORT_VALUE_UNIX="unix";I.ATTR_NETWORK_TYPE="network.type";I.NETWORK_TYPE_VALUE_IPV4="ipv4";I.NETWORK_TYPE_VALUE_IPV6="ipv6";I.ATTR_OTEL_SCOPE_NAME="otel.scope.name";I.ATTR_OTEL_SCOPE_VERSION="otel.scope.version";I.ATTR_OTEL_STATUS_CODE="otel.status_code";I.OTEL_STATUS_CODE_VALUE_ERROR="ERROR";I.OTEL_STATUS_CODE_VALUE_OK="OK";I.ATTR_OTEL_STATUS_DESCRIPTION="otel.status_description";I.ATTR_SERVER_ADDRESS="server.address";I.ATTR_SERVER_PORT="server.port";I.ATTR_SERVICE_INSTANCE_ID="service.instance.id";I.ATTR_SERVICE_NAME="service.name";I.ATTR_SERVICE_NAMESPACE="service.namespace";I.ATTR_SERVICE_VERSION="service.version";I.ATTR_SIGNALR_CONNECTION_STATUS="signalr.connection.status";I.SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN="app_shutdown";I.SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE="normal_closure";I.SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT="timeout";I.ATTR_SIGNALR_TRANSPORT="signalr.transport";I.SIGNALR_TRANSPORT_VALUE_LONG_POLLING="long_polling";I.SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS="server_sent_events";I.SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS="web_sockets";I.ATTR_TELEMETRY_SDK_LANGUAGE="telemetry.sdk.language";I.TELEMETRY_SDK_LANGUAGE_VALUE_CPP="cpp";I.TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET="dotnet";I.TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG="erlang";I.TELEMETRY_SDK_LANGUAGE_VALUE_GO="go";I.TELEMETRY_SDK_LANGUAGE_VALUE_JAVA="java";I.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS="nodejs";I.TELEMETRY_SDK_LANGUAGE_VALUE_PHP="php";I.TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON="python";I.TELEMETRY_SDK_LANGUAGE_VALUE_RUBY="ruby";I.TELEMETRY_SDK_LANGUAGE_VALUE_RUST="rust";I.TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT="swift";I.TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS="webjs";I.ATTR_TELEMETRY_SDK_NAME="telemetry.sdk.name";I.ATTR_TELEMETRY_SDK_VERSION="telemetry.sdk.version";I.ATTR_URL_FRAGMENT="url.fragment";I.ATTR_URL_FULL="url.full";I.ATTR_URL_PATH="url.path";I.ATTR_URL_QUERY="url.query";I.ATTR_URL_SCHEME="url.scheme";I.ATTR_USER_AGENT_ORIGINAL="user_agent.original"});var d7=A(B=>{"use strict";l();Object.defineProperty(B,"__esModule",{value:!0});B.METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS=B.METRIC_KESTREL_UPGRADED_CONNECTIONS=B.METRIC_KESTREL_TLS_HANDSHAKE_DURATION=B.METRIC_KESTREL_REJECTED_CONNECTIONS=B.METRIC_KESTREL_QUEUED_REQUESTS=B.METRIC_KESTREL_QUEUED_CONNECTIONS=B.METRIC_KESTREL_CONNECTION_DURATION=B.METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES=B.METRIC_KESTREL_ACTIVE_CONNECTIONS=B.METRIC_JVM_THREAD_COUNT=B.METRIC_JVM_MEMORY_USED_AFTER_LAST_GC=B.METRIC_JVM_MEMORY_USED=B.METRIC_JVM_MEMORY_LIMIT=B.METRIC_JVM_MEMORY_COMMITTED=B.METRIC_JVM_GC_DURATION=B.METRIC_JVM_CPU_TIME=B.METRIC_JVM_CPU_RECENT_UTILIZATION=B.METRIC_JVM_CPU_COUNT=B.METRIC_JVM_CLASS_UNLOADED=B.METRIC_JVM_CLASS_LOADED=B.METRIC_JVM_CLASS_COUNT=B.METRIC_HTTP_SERVER_REQUEST_DURATION=B.METRIC_HTTP_CLIENT_REQUEST_DURATION=B.METRIC_DOTNET_TIMER_COUNT=B.METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT=B.METRIC_DOTNET_THREAD_POOL_THREAD_COUNT=B.METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH=B.METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET=B.METRIC_DOTNET_PROCESS_CPU_TIME=B.METRIC_DOTNET_PROCESS_CPU_COUNT=B.METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS=B.METRIC_DOTNET_JIT_COMPILED_METHODS=B.METRIC_DOTNET_JIT_COMPILED_IL_SIZE=B.METRIC_DOTNET_JIT_COMPILATION_TIME=B.METRIC_DOTNET_GC_PAUSE_TIME=B.METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE=B.METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE=B.METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE=B.METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED=B.METRIC_DOTNET_GC_COLLECTIONS=B.METRIC_DOTNET_EXCEPTIONS=B.METRIC_DOTNET_ASSEMBLY_COUNT=B.METRIC_DB_CLIENT_OPERATION_DURATION=B.METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS=B.METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS=B.METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION=B.METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE=B.METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS=B.METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES=B.METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS=void 0;B.METRIC_SIGNALR_SERVER_CONNECTION_DURATION=void 0;B.METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS="aspnetcore.diagnostics.exceptions";B.METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES="aspnetcore.rate_limiting.active_request_leases";B.METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS="aspnetcore.rate_limiting.queued_requests";B.METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE="aspnetcore.rate_limiting.request.time_in_queue";B.METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION="aspnetcore.rate_limiting.request_lease.duration";B.METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS="aspnetcore.rate_limiting.requests";B.METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS="aspnetcore.routing.match_attempts";B.METRIC_DB_CLIENT_OPERATION_DURATION="db.client.operation.duration";B.METRIC_DOTNET_ASSEMBLY_COUNT="dotnet.assembly.count";B.METRIC_DOTNET_EXCEPTIONS="dotnet.exceptions";B.METRIC_DOTNET_GC_COLLECTIONS="dotnet.gc.collections";B.METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED="dotnet.gc.heap.total_allocated";B.METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE="dotnet.gc.last_collection.heap.fragmentation.size";B.METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE="dotnet.gc.last_collection.heap.size";B.METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE="dotnet.gc.last_collection.memory.committed_size";B.METRIC_DOTNET_GC_PAUSE_TIME="dotnet.gc.pause.time";B.METRIC_DOTNET_JIT_COMPILATION_TIME="dotnet.jit.compilation.time";B.METRIC_DOTNET_JIT_COMPILED_IL_SIZE="dotnet.jit.compiled_il.size";B.METRIC_DOTNET_JIT_COMPILED_METHODS="dotnet.jit.compiled_methods";B.METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS="dotnet.monitor.lock_contentions";B.METRIC_DOTNET_PROCESS_CPU_COUNT="dotnet.process.cpu.count";B.METRIC_DOTNET_PROCESS_CPU_TIME="dotnet.process.cpu.time";B.METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET="dotnet.process.memory.working_set";B.METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH="dotnet.thread_pool.queue.length";B.METRIC_DOTNET_THREAD_POOL_THREAD_COUNT="dotnet.thread_pool.thread.count";B.METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT="dotnet.thread_pool.work_item.count";B.METRIC_DOTNET_TIMER_COUNT="dotnet.timer.count";B.METRIC_HTTP_CLIENT_REQUEST_DURATION="http.client.request.duration";B.METRIC_HTTP_SERVER_REQUEST_DURATION="http.server.request.duration";B.METRIC_JVM_CLASS_COUNT="jvm.class.count";B.METRIC_JVM_CLASS_LOADED="jvm.class.loaded";B.METRIC_JVM_CLASS_UNLOADED="jvm.class.unloaded";B.METRIC_JVM_CPU_COUNT="jvm.cpu.count";B.METRIC_JVM_CPU_RECENT_UTILIZATION="jvm.cpu.recent_utilization";B.METRIC_JVM_CPU_TIME="jvm.cpu.time";B.METRIC_JVM_GC_DURATION="jvm.gc.duration";B.METRIC_JVM_MEMORY_COMMITTED="jvm.memory.committed";B.METRIC_JVM_MEMORY_LIMIT="jvm.memory.limit";B.METRIC_JVM_MEMORY_USED="jvm.memory.used";B.METRIC_JVM_MEMORY_USED_AFTER_LAST_GC="jvm.memory.used_after_last_gc";B.METRIC_JVM_THREAD_COUNT="jvm.thread.count";B.METRIC_KESTREL_ACTIVE_CONNECTIONS="kestrel.active_connections";B.METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES="kestrel.active_tls_handshakes";B.METRIC_KESTREL_CONNECTION_DURATION="kestrel.connection.duration";B.METRIC_KESTREL_QUEUED_CONNECTIONS="kestrel.queued_connections";B.METRIC_KESTREL_QUEUED_REQUESTS="kestrel.queued_requests";B.METRIC_KESTREL_REJECTED_CONNECTIONS="kestrel.rejected_connections";B.METRIC_KESTREL_TLS_HANDSHAKE_DURATION="kestrel.tls_handshake.duration";B.METRIC_KESTREL_UPGRADED_CONNECTIONS="kestrel.upgraded_connections";B.METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS="signalr.server.active_connections";B.METRIC_SIGNALR_SERVER_CONNECTION_DURATION="signalr.server.connection.duration"});var p7=A(dy=>{"use strict";l();Object.defineProperty(dy,"__esModule",{value:!0});dy.EVENT_EXCEPTION=void 0;dy.EVENT_EXCEPTION="exception"});var Qe=A(ci=>{"use strict";l();var NPe=ci&&ci.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),kg=ci&&ci.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&NPe(t,e,n)};Object.defineProperty(ci,"__esModule",{value:!0});kg(U9(),ci);kg(u7(),ci);kg(l7(),ci);kg(d7(),ci);kg(p7(),ci)});var f7=A(py=>{"use strict";l();Object.defineProperty(py,"__esModule",{value:!0});py.ATTR_PROCESS_RUNTIME_NAME=void 0;py.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var m7=A(my=>{"use strict";l();Object.defineProperty(my,"__esModule",{value:!0});my.SDK_INFO=void 0;var OPe=qZ(),fy=Qe(),CPe=f7();my.SDK_INFO={[fy.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[CPe.ATTR_PROCESS_RUNTIME_NAME]:"node",[fy.ATTR_TELEMETRY_SDK_LANGUAGE]:fy.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[fy.ATTR_TELEMETRY_SDK_VERSION]:OPe.VERSION}});var _7=A(zn=>{"use strict";l();Object.defineProperty(zn,"__esModule",{value:!0});zn.otperformance=zn.SDK_INFO=zn._globalThis=zn.getStringListFromEnv=zn.getNumberFromEnv=zn.getBooleanFromEnv=zn.getStringFromEnv=void 0;var _y=HZ();Object.defineProperty(zn,"getStringFromEnv",{enumerable:!0,get:function(){return _y.getStringFromEnv}});Object.defineProperty(zn,"getBooleanFromEnv",{enumerable:!0,get:function(){return _y.getBooleanFromEnv}});Object.defineProperty(zn,"getNumberFromEnv",{enumerable:!0,get:function(){return _y.getNumberFromEnv}});Object.defineProperty(zn,"getStringListFromEnv",{enumerable:!0,get:function(){return _y.getStringListFromEnv}});var vPe=zZ();Object.defineProperty(zn,"_globalThis",{enumerable:!0,get:function(){return vPe._globalThis}});var PPe=m7();Object.defineProperty(zn,"SDK_INFO",{enumerable:!0,get:function(){return PPe.SDK_INFO}});zn.otperformance=performance});var Mw=A(qn=>{"use strict";l();Object.defineProperty(qn,"__esModule",{value:!0});qn.getStringListFromEnv=qn.getNumberFromEnv=qn.getStringFromEnv=qn.getBooleanFromEnv=qn.otperformance=qn._globalThis=qn.SDK_INFO=void 0;var Qu=_7();Object.defineProperty(qn,"SDK_INFO",{enumerable:!0,get:function(){return Qu.SDK_INFO}});Object.defineProperty(qn,"_globalThis",{enumerable:!0,get:function(){return Qu._globalThis}});Object.defineProperty(qn,"otperformance",{enumerable:!0,get:function(){return Qu.otperformance}});Object.defineProperty(qn,"getBooleanFromEnv",{enumerable:!0,get:function(){return Qu.getBooleanFromEnv}});Object.defineProperty(qn,"getStringFromEnv",{enumerable:!0,get:function(){return Qu.getStringFromEnv}});Object.defineProperty(qn,"getNumberFromEnv",{enumerable:!0,get:function(){return Qu.getNumberFromEnv}});Object.defineProperty(qn,"getStringListFromEnv",{enumerable:!0,get:function(){return Qu.getStringListFromEnv}})});var T7=A(mt=>{"use strict";l();Object.defineProperty(mt,"__esModule",{value:!0});mt.addHrTimes=mt.isTimeInput=mt.isTimeInputHrTime=mt.hrTimeToMicroseconds=mt.hrTimeToMilliseconds=mt.hrTimeToNanoseconds=mt.hrTimeToTimeStamp=mt.hrTimeDuration=mt.timeInputToHrTime=mt.hrTime=mt.getTimeOrigin=mt.millisToHrTime=void 0;var gy=Mw(),g7=9,xPe=6,MPe=Math.pow(10,xPe),hy=Math.pow(10,g7);function Ug(e){let t=e/1e3,n=Math.trunc(t),o=Math.round(e%1e3*MPe);return[n,o]}mt.millisToHrTime=Ug;function LPe(){return gy.otperformance.timeOrigin}mt.getTimeOrigin=LPe;function h7(e){let t=Ug(gy.otperformance.timeOrigin),n=Ug(typeof e=="number"?e:gy.otperformance.now());return E7(t,n)}mt.hrTime=h7;function wPe(e){if(Lw(e))return e;if(typeof e=="number")return e<gy.otperformance.timeOrigin?h7(e):Ug(e);if(e instanceof Date)return Ug(e.getTime());throw TypeError("Invalid input type")}mt.timeInputToHrTime=wPe;function DPe(e,t){let n=t[0]-e[0],o=t[1]-e[1];return o<0&&(n-=1,o+=hy),[n,o]}mt.hrTimeDuration=DPe;function kPe(e){let t=g7,n=`${"0".repeat(t)}${e[1]}Z`,o=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",o)}mt.hrTimeToTimeStamp=kPe;function UPe(e){return e[0]*hy+e[1]}mt.hrTimeToNanoseconds=UPe;function $Pe(e){return e[0]*1e3+e[1]/1e6}mt.hrTimeToMilliseconds=$Pe;function BPe(e){return e[0]*1e6+e[1]/1e3}mt.hrTimeToMicroseconds=BPe;function Lw(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}mt.isTimeInputHrTime=Lw;function GPe(e){return Lw(e)||typeof e=="number"||e instanceof Date}mt.isTimeInput=GPe;function E7(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=hy&&(n[1]-=hy,n[0]+=1),n}mt.addHrTimes=E7});var S7=A(Ey=>{"use strict";l();Object.defineProperty(Ey,"__esModule",{value:!0});Ey.unrefTimer=void 0;function jPe(e){typeof e!="number"&&e.unref()}Ey.unrefTimer=jPe});var A7=A($g=>{"use strict";l();Object.defineProperty($g,"__esModule",{value:!0});$g.ExportResultCode=void 0;var VPe;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(VPe=$g.ExportResultCode||($g.ExportResultCode={}))});var R7=A(Ty=>{"use strict";l();Object.defineProperty(Ty,"__esModule",{value:!0});Ty.CompositePropagator=void 0;var y7=K(),ww=class{_propagators;_fields;constructor(t={}){this._propagators=t.propagators??[];let n=new Set;for(let o of this._propagators){let r=typeof o.fields=="function"?o.fields():[];for(let i of r)n.add(i)}this._fields=Array.from(n)}inject(t,n,o){for(let r of this._propagators)try{r.inject(t,n,o)}catch(i){y7.diag.warn(`Failed to inject with ${r.constructor.name}. Err: ${i.message}`)}}extract(t,n,o){return this._propagators.reduce((r,i)=>{try{return i.extract(r,n,o)}catch(s){y7.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${s.message}`)}return r},t)}fields(){return this._fields.slice()}};Ty.CompositePropagator=ww});var I7=A($p=>{"use strict";l();Object.defineProperty($p,"__esModule",{value:!0});$p.validateValue=$p.validateKey=void 0;var Dw="[_0-9a-z-*/]",FPe=`[a-z]${Dw}{0,255}`,HPe=`[a-z0-9]${Dw}{0,240}@[a-z]${Dw}{0,13}`,zPe=new RegExp(`^(?:${FPe}|${HPe})$`),qPe=/^[ -~]{0,255}[!-~]$/,YPe=/,|=/;function WPe(e){return zPe.test(e)}$p.validateKey=WPe;function KPe(e){return qPe.test(e)&&!YPe.test(e)}$p.validateValue=KPe});var Uw=A(Ay=>{"use strict";l();Object.defineProperty(Ay,"__esModule",{value:!0});Ay.TraceState=void 0;var Sy=I7(),ZPe=32,b7=512,N7=",",O7="=",kw=class e{_length;_rawTraceState;_internalState;constructor(t){this._rawTraceState=typeof t=="string"?t:"",this._length=this._rawTraceState.length}set(t,n){if(!(0,Sy.validateKey)(t)||!(0,Sy.validateValue)(n))return this;let o=this._getState(),r=o.get(t),i=this._length;if(typeof r=="string"?i+=n.length-r.length:i+=t.length+n.length+(o.size>0?2:1),i>b7)return this;let s=new Map(o);return s.delete(t),s.set(t,n),this._fromState(s,i)}unset(t){let n=this._getState(),o=n.get(t);if(typeof o!="string")return this;let r=this._length-(t.length+o.length+1);n.size>1&&(r=r-1);let i=new Map(n);return i.delete(t),this._fromState(i,r)}get(t){return this._getState().get(t)}serialize(){let t="",n=0;for(let o of this._getState())n>0&&(t=N7+t),t=`${o[0]}${O7}${o[1]}`+t,n++;return t}_getState(){if(this._internalState)return this._internalState;let t=this._rawTraceState.split(N7),n=new Map,o=0;for(let r of t){let i=r.trim(),s=i.indexOf(O7);if(s===-1)continue;let a=i.slice(0,s),c=i.slice(s+1);if(!(0,Sy.validateKey)(a)||!(0,Sy.validateValue)(c))continue;let u=o+i.length+(n.size>0?1:0);if(!(u>b7)&&(n.set(a,c),o=u,n.size>=ZPe))break}return this._length=o,this._internalState=new Map(Array.from(n.entries()).reverse()),this._internalState}_fromState(t,n){let o=Object.create(e.prototype);return o._internalState=t,o._length=n,o}};Ay.TraceState=kw});var v7=A(Yn=>{"use strict";l();Object.defineProperty(Yn,"__esModule",{value:!0});Yn.W3CTraceContextPropagator=Yn.parseTraceParent=Yn.TRACE_STATE_HEADER=Yn.TRACE_PARENT_HEADER=void 0;var yy=K(),JPe=Dg(),XPe=Uw();Yn.TRACE_PARENT_HEADER="traceparent";Yn.TRACE_STATE_HEADER="tracestate";var QPe="00",exe="(?!ff)[\\da-f]{2}",txe="(?![0]{32})[\\da-f]{32}",nxe="(?![0]{16})[\\da-f]{16}",rxe="[\\da-f]{2}",oxe=new RegExp(`^\\s?(${exe})-(${txe})-(${nxe})-(${rxe})(-.*)?\\s?$`);function C7(e){let t=oxe.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}Yn.parseTraceParent=C7;var $w=class{inject(t,n,o){let r=yy.trace.getSpanContext(t);if(!r||(0,JPe.isTracingSuppressed)(t)||!(0,yy.isSpanContextValid)(r))return;let i=`${QPe}-${r.traceId}-${r.spanId}-0${Number(r.traceFlags||yy.TraceFlags.NONE).toString(16)}`;o.set(n,Yn.TRACE_PARENT_HEADER,i),r.traceState&&o.set(n,Yn.TRACE_STATE_HEADER,r.traceState.serialize())}extract(t,n,o){let r=o.get(n,Yn.TRACE_PARENT_HEADER);if(!r)return t;let i=Array.isArray(r)?r[0]:r;if(typeof i!="string")return t;let s=C7(i);if(!s)return t;s.isRemote=!0;let a=o.get(n,Yn.TRACE_STATE_HEADER);if(a){let c=Array.isArray(a)?a.join(","):a;s.traceState=new XPe.TraceState(typeof c=="string"?c:void 0)}return yy.trace.setSpanContext(t,s)}fields(){return[Yn.TRACE_PARENT_HEADER,Yn.TRACE_STATE_HEADER]}};Yn.W3CTraceContextPropagator=$w});var P7=A(ui=>{"use strict";l();Object.defineProperty(ui,"__esModule",{value:!0});ui.getRPCMetadata=ui.deleteRPCMetadata=ui.setRPCMetadata=ui.RPCType=void 0;var ixe=K(),Bw=(0,ixe.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),sxe;(function(e){e.HTTP="http"})(sxe=ui.RPCType||(ui.RPCType={}));function axe(e,t){return e.setValue(Bw,t)}ui.setRPCMetadata=axe;function cxe(e){return e.deleteValue(Bw)}ui.deleteRPCMetadata=cxe;function uxe(e){return e.getValue(Bw)}ui.getRPCMetadata=uxe});var D7=A(Ry=>{"use strict";l();Object.defineProperty(Ry,"__esModule",{value:!0});Ry.isPlainObject=void 0;var lxe="[object Object]",dxe="[object Null]",pxe="[object Undefined]",fxe=Function.prototype,x7=fxe.toString,mxe=x7.call(Object),_xe=Object.getPrototypeOf,M7=Object.prototype,L7=M7.hasOwnProperty,el=Symbol?Symbol.toStringTag:void 0,w7=M7.toString;function gxe(e){if(!hxe(e)||Exe(e)!==lxe)return!1;let t=_xe(e);if(t===null)return!0;let n=L7.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&x7.call(n)===mxe}Ry.isPlainObject=gxe;function hxe(e){return e!=null&&typeof e=="object"}function Exe(e){return e==null?e===void 0?pxe:dxe:el&&el in Object(e)?Txe(e):Sxe(e)}function Txe(e){let t=L7.call(e,el),n=e[el],o=!1;try{e[el]=void 0,o=!0}catch{}let r=w7.call(e);return o&&(t?e[el]=n:delete e[el]),r}function Sxe(e){return w7.call(e)}});var G7=A(Ny=>{"use strict";l();Object.defineProperty(Ny,"__esModule",{value:!0});Ny.merge=void 0;var k7=D7(),Axe=20;function yxe(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=$7(t,e.shift(),0,n);return t}Ny.merge=yxe;function Gw(e){return by(e)?e.slice():e}function $7(e,t,n=0,o){let r;if(!(n>Axe)){if(n++,Iy(e)||Iy(t)||B7(t))r=Gw(t);else if(by(e)){if(r=e.slice(),by(t))for(let i=0,s=t.length;i<s;i++)r.push(Gw(t[i]));else if(Bg(t)){let i=Object.keys(t);for(let s=0,a=i.length;s<a;s++){let c=i[s];c==="__proto__"||c==="constructor"||c==="prototype"||(r[c]=Gw(t[c]))}}}else if(Bg(e))if(Bg(t)){if(!Rxe(e,t))return t;r=Object.assign({},e);let i=Object.keys(t);for(let s=0,a=i.length;s<a;s++){let c=i[s];if(c==="__proto__"||c==="constructor"||c==="prototype")continue;let u=t[c];if(Iy(u))typeof u>"u"?delete r[c]:r[c]=u;else{let d=r[c],p=u;if(U7(e,c,o)||U7(t,c,o))delete r[c];else{if(Bg(d)&&Bg(p)){let f=o.get(d)||[],m=o.get(p)||[];f.push({obj:e,key:c}),m.push({obj:t,key:c}),o.set(d,f),o.set(p,m)}r[c]=$7(r[c],u,n,o)}}}}else r=t;return r}}function U7(e,t,n){let o=n.get(e[t])||[];for(let r=0,i=o.length;r<i;r++){let s=o[r];if(s.key===t&&s.obj===e)return!0}return!1}function by(e){return Array.isArray(e)}function B7(e){return typeof e=="function"}function Bg(e){return!Iy(e)&&!by(e)&&!B7(e)&&typeof e=="object"}function Iy(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function Rxe(e,t){return!(!(0,k7.isPlainObject)(e)||!(0,k7.isPlainObject)(t))}});var j7=A(Bp=>{"use strict";l();Object.defineProperty(Bp,"__esModule",{value:!0});Bp.callWithTimeout=Bp.TimeoutError=void 0;var Oy=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};Bp.TimeoutError=Oy;function Ixe(e,t){let n,o=new Promise(function(i,s){n=setTimeout(function(){s(new Oy("Operation timed out."))},t)});return Promise.race([e,o]).then(r=>(clearTimeout(n),r),r=>{throw clearTimeout(n),r})}Bp.callWithTimeout=Ixe});var F7=A(Gp=>{"use strict";l();Object.defineProperty(Gp,"__esModule",{value:!0});Gp.isUrlIgnored=Gp.urlMatches=void 0;function V7(e,t){return typeof t=="string"?e===t:!!e.match(t)}Gp.urlMatches=V7;function bxe(e,t){if(!t)return!1;for(let n of t)if(V7(e,n))return!0;return!1}Gp.isUrlIgnored=bxe});var H7=A(Cy=>{"use strict";l();Object.defineProperty(Cy,"__esModule",{value:!0});Cy.Deferred=void 0;var jw=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)}};Cy.Deferred=jw});var z7=A(vy=>{"use strict";l();Object.defineProperty(vy,"__esModule",{value:!0});vy.BindOnceFuture=void 0;var Nxe=H7(),Vw=class{_isCalled=!1;_deferred=new Nxe.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}};vy.BindOnceFuture=Vw});var Y7=A(Py=>{"use strict";l();Object.defineProperty(Py,"__esModule",{value:!0});Py.diagLogLevelFromString=void 0;var Qs=K(),q7={ALL:Qs.DiagLogLevel.ALL,VERBOSE:Qs.DiagLogLevel.VERBOSE,DEBUG:Qs.DiagLogLevel.DEBUG,INFO:Qs.DiagLogLevel.INFO,WARN:Qs.DiagLogLevel.WARN,ERROR:Qs.DiagLogLevel.ERROR,NONE:Qs.DiagLogLevel.NONE};function Oxe(e){if(e==null)return;let t=q7[e.toUpperCase()];return t??(Qs.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(q7)}, using default`),Qs.DiagLogLevel.INFO)}Py.diagLogLevelFromString=Oxe});var K7=A(xy=>{"use strict";l();Object.defineProperty(xy,"__esModule",{value:!0});xy._export=void 0;var W7=K(),Cxe=Dg();function vxe(e,t){return new Promise(n=>{W7.context.with((0,Cxe.suppressTracing)(W7.context.active()),()=>{e.export(t,n)})})}xy._export=vxe});var rt=A(V=>{"use strict";l();Object.defineProperty(V,"__esModule",{value:!0});V.internal=V.diagLogLevelFromString=V.BindOnceFuture=V.urlMatches=V.isUrlIgnored=V.callWithTimeout=V.TimeoutError=V.merge=V.TraceState=V.unsuppressTracing=V.suppressTracing=V.isTracingSuppressed=V.setRPCMetadata=V.getRPCMetadata=V.deleteRPCMetadata=V.RPCType=V.parseTraceParent=V.W3CTraceContextPropagator=V.TRACE_STATE_HEADER=V.TRACE_PARENT_HEADER=V.CompositePropagator=V.otperformance=V.getStringListFromEnv=V.getNumberFromEnv=V.getBooleanFromEnv=V.getStringFromEnv=V._globalThis=V.SDK_INFO=V.parseKeyPairsIntoRecord=V.ExportResultCode=V.unrefTimer=V.timeInputToHrTime=V.millisToHrTime=V.isTimeInputHrTime=V.isTimeInput=V.hrTimeToTimeStamp=V.hrTimeToNanoseconds=V.hrTimeToMilliseconds=V.hrTimeToMicroseconds=V.hrTimeDuration=V.hrTime=V.getTimeOrigin=V.addHrTimes=V.loggingErrorHandler=V.setGlobalErrorHandler=V.globalErrorHandler=V.sanitizeAttributes=V.isAttributeValue=V.AnchoredClock=V.W3CBaggagePropagator=void 0;var Pxe=MZ();Object.defineProperty(V,"W3CBaggagePropagator",{enumerable:!0,get:function(){return Pxe.W3CBaggagePropagator}});var xxe=LZ();Object.defineProperty(V,"AnchoredClock",{enumerable:!0,get:function(){return xxe.AnchoredClock}});var Z7=$Z();Object.defineProperty(V,"isAttributeValue",{enumerable:!0,get:function(){return Z7.isAttributeValue}});Object.defineProperty(V,"sanitizeAttributes",{enumerable:!0,get:function(){return Z7.sanitizeAttributes}});var J7=GZ();Object.defineProperty(V,"globalErrorHandler",{enumerable:!0,get:function(){return J7.globalErrorHandler}});Object.defineProperty(V,"setGlobalErrorHandler",{enumerable:!0,get:function(){return J7.setGlobalErrorHandler}});var Mxe=Pw();Object.defineProperty(V,"loggingErrorHandler",{enumerable:!0,get:function(){return Mxe.loggingErrorHandler}});var Oo=T7();Object.defineProperty(V,"addHrTimes",{enumerable:!0,get:function(){return Oo.addHrTimes}});Object.defineProperty(V,"getTimeOrigin",{enumerable:!0,get:function(){return Oo.getTimeOrigin}});Object.defineProperty(V,"hrTime",{enumerable:!0,get:function(){return Oo.hrTime}});Object.defineProperty(V,"hrTimeDuration",{enumerable:!0,get:function(){return Oo.hrTimeDuration}});Object.defineProperty(V,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return Oo.hrTimeToMicroseconds}});Object.defineProperty(V,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return Oo.hrTimeToMilliseconds}});Object.defineProperty(V,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return Oo.hrTimeToNanoseconds}});Object.defineProperty(V,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return Oo.hrTimeToTimeStamp}});Object.defineProperty(V,"isTimeInput",{enumerable:!0,get:function(){return Oo.isTimeInput}});Object.defineProperty(V,"isTimeInputHrTime",{enumerable:!0,get:function(){return Oo.isTimeInputHrTime}});Object.defineProperty(V,"millisToHrTime",{enumerable:!0,get:function(){return Oo.millisToHrTime}});Object.defineProperty(V,"timeInputToHrTime",{enumerable:!0,get:function(){return Oo.timeInputToHrTime}});var Lxe=S7();Object.defineProperty(V,"unrefTimer",{enumerable:!0,get:function(){return Lxe.unrefTimer}});var wxe=A7();Object.defineProperty(V,"ExportResultCode",{enumerable:!0,get:function(){return wxe.ExportResultCode}});var Dxe=bw();Object.defineProperty(V,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return Dxe.parseKeyPairsIntoRecord}});var tl=Mw();Object.defineProperty(V,"SDK_INFO",{enumerable:!0,get:function(){return tl.SDK_INFO}});Object.defineProperty(V,"_globalThis",{enumerable:!0,get:function(){return tl._globalThis}});Object.defineProperty(V,"getStringFromEnv",{enumerable:!0,get:function(){return tl.getStringFromEnv}});Object.defineProperty(V,"getBooleanFromEnv",{enumerable:!0,get:function(){return tl.getBooleanFromEnv}});Object.defineProperty(V,"getNumberFromEnv",{enumerable:!0,get:function(){return tl.getNumberFromEnv}});Object.defineProperty(V,"getStringListFromEnv",{enumerable:!0,get:function(){return tl.getStringListFromEnv}});Object.defineProperty(V,"otperformance",{enumerable:!0,get:function(){return tl.otperformance}});var kxe=R7();Object.defineProperty(V,"CompositePropagator",{enumerable:!0,get:function(){return kxe.CompositePropagator}});var My=v7();Object.defineProperty(V,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return My.TRACE_PARENT_HEADER}});Object.defineProperty(V,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return My.TRACE_STATE_HEADER}});Object.defineProperty(V,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return My.W3CTraceContextPropagator}});Object.defineProperty(V,"parseTraceParent",{enumerable:!0,get:function(){return My.parseTraceParent}});var Ly=P7();Object.defineProperty(V,"RPCType",{enumerable:!0,get:function(){return Ly.RPCType}});Object.defineProperty(V,"deleteRPCMetadata",{enumerable:!0,get:function(){return Ly.deleteRPCMetadata}});Object.defineProperty(V,"getRPCMetadata",{enumerable:!0,get:function(){return Ly.getRPCMetadata}});Object.defineProperty(V,"setRPCMetadata",{enumerable:!0,get:function(){return Ly.setRPCMetadata}});var Fw=Dg();Object.defineProperty(V,"isTracingSuppressed",{enumerable:!0,get:function(){return Fw.isTracingSuppressed}});Object.defineProperty(V,"suppressTracing",{enumerable:!0,get:function(){return Fw.suppressTracing}});Object.defineProperty(V,"unsuppressTracing",{enumerable:!0,get:function(){return Fw.unsuppressTracing}});var Uxe=Uw();Object.defineProperty(V,"TraceState",{enumerable:!0,get:function(){return Uxe.TraceState}});var $xe=G7();Object.defineProperty(V,"merge",{enumerable:!0,get:function(){return $xe.merge}});var X7=j7();Object.defineProperty(V,"TimeoutError",{enumerable:!0,get:function(){return X7.TimeoutError}});Object.defineProperty(V,"callWithTimeout",{enumerable:!0,get:function(){return X7.callWithTimeout}});var Q7=F7();Object.defineProperty(V,"isUrlIgnored",{enumerable:!0,get:function(){return Q7.isUrlIgnored}});Object.defineProperty(V,"urlMatches",{enumerable:!0,get:function(){return Q7.urlMatches}});var Bxe=z7();Object.defineProperty(V,"BindOnceFuture",{enumerable:!0,get:function(){return Bxe.BindOnceFuture}});var Gxe=Y7();Object.defineProperty(V,"diagLogLevelFromString",{enumerable:!0,get:function(){return Gxe.diagLogLevelFromString}});var jxe=K7();V.internal={_export:jxe._export}});function Fxe(e){return e.headers["next-router-prefetch"]==="1"}function Hxe(e){let t=Ao(e);return!!(t.match(/\.(ico|png|jpg|jpeg|gif|svg|css|js|woff|woff2|ttf|eot|webp|avif)$/)||t.match(/^\/(robots\.txt|sitemap\.xml|manifest\.json|browserconfig\.xml)$/))}function zxe(e,{ignoreStaticAssets:t,ignoreIncomingRequests:n}){if((0,ea.isTracingSuppressed)(no.context.active()))return!0;let o=e.url,r=e.method?.toUpperCase();return!!(r==="OPTIONS"||r==="HEAD"||!o||t&&r==="GET"&&Hxe(o)||n?.(o,e))}function qxe(e){let t=Yxe(e.headers);return t==null?{}:Wxe(e.headers)?{"http.request_content_length":t}:{"http.request_content_length_uncompressed":t}}function Yxe(e){let t=e["content-length"];if(t===void 0)return null;let n=parseInt(t,10);return isNaN(n)?null:n}function Wxe(e){let t=e["content-encoding"];return!!t&&t!=="identity"}function Kxe(e,t){let{socket:n}=e,{statusCode:o,statusMessage:r}=t,i={[ro.ATTR_HTTP_RESPONSE_STATUS_CODE]:o,[ro.SEMATTRS_HTTP_STATUS_CODE]:o,"http.status_text":r?.toUpperCase()},s=(0,ea.getRPCMetadata)(no.context.active());if(n){let{localAddress:a,localPort:c,remoteAddress:u,remotePort:d}=n;i[ro.SEMATTRS_NET_HOST_IP]=a,i[ro.SEMATTRS_NET_HOST_PORT]=c,i[ro.SEMATTRS_NET_PEER_IP]=u,i["net.peer.port"]=d}if(i[ro.SEMATTRS_HTTP_STATUS_CODE]=o,i["http.status_text"]=(r||"").toUpperCase(),s?.type===ea.RPCType.HTTP&&s.route!==void 0){let a=s.route;i[ro.ATTR_HTTP_ROUTE]=a}return i}function Zxe(e,t){return t.some(n=>{if(typeof n=="number")return n===e;let[o,r]=n;return e>=o&&e<=r})}var tee,no,ea,ro,eee,Vxe,nl,Hw=E(()=>{l();tee=require("node:events"),no=U(K(),1),ea=U(rt(),1),ro=U(Qe(),1);ne();Xs();oy();eee="Http.ServerSpans",Vxe=((e={})=>{let t=e.ignoreStaticAssets??!0,n=e.ignoreIncomingRequests,o=e.ignoreStatusCodes??[[401,404],[301,303],[305,399]],{onSpanCreated:r}=e,{requestHook:i,responseHook:s,applyCustomAttributesOnSpan:a}=e.instrumentation??{};return{name:eee,setup(c){typeof __SENTRY_TRACING__<"u"&&!__SENTRY_TRACING__||c.on("httpServerRequest",(u,d,p)=>{let f=u,m=d;PZ(f,h=>{if(zxe(f,{ignoreStaticAssets:t,ignoreIncomingRequests:n}))return Fe&&b.log(eee,"Skipping span creation for incoming request",f.url),h();let T=p.url||f.url||"/",S=Nu(T),y=f.headers,v=y["user-agent"],x=y["x-forwarded-for"],P=f.httpVersion,N=y.host,F=N?.replace(/^(.*)(:[0-9]{1,5})/,"$1")||"localhost",se=c.tracer,$=T.startsWith("https")?"https":"http",G=p.method||f.method?.toUpperCase()||"GET",Q=S?S.pathname:Ao(T),J=`${G} ${Q}`,D=se.startSpan(J,{kind:no.SpanKind.SERVER,attributes:{[oe]:"http.server",[te]:"auto.http.otel.http","sentry.http.prefetch":Fxe(f)||void 0,"http.url":T,"http.method":p.method,"http.target":S?`${S.pathname}${S.search}`:Q,"http.host":N,"net.host.name":F,"http.client_ip":typeof x=="string"?x.split(",")[0]:void 0,"http.user_agent":v,"http.scheme":$,"http.flavor":P,"net.transport":P?.toUpperCase()==="QUIC"?"ip_udp":"ip_tcp",...qxe(f),...oi(p.headers||{},c.getOptions().sendDefaultPii??!1)}});i?.(D,f),s?.(D,m),a?.(D,f,m),r?.(D,f,m);let ue={type:ea.RPCType.HTTP,span:D};return no.context.with((0,ea.setRPCMetadata)(no.trace.setSpan(no.context.active(),D),ue),()=>{no.context.bind(no.context.active(),f),no.context.bind(no.context.active(),m);let de=!1;function Ie(Ae){if(de)return;de=!0;let Je=Kxe(f,m);D.setAttributes(Je),D.setStatus(Ae),D.end();let un=Je["http.route"];un&&Te().setTransactionName(`${f.method?.toUpperCase()||"GET"} ${un}`)}return m.on("close",()=>{Ie(Eo(m.statusCode))}),m.on(tee.errorMonitor,()=>{let Ae=Eo(m.statusCode);Ie(Ae.code===2?Ae:{code:2})}),h()})})})},processEvent(c){if(c.type==="transaction"){let u=c.contexts?.trace?.data?.["http.response.status_code"];if(typeof u=="number"&&Zxe(u,o))return Fe&&b.log("Dropping transaction due to status code",u),null}return c},afterAllSetup(c){Fe&&(c.getIntegrationByName("Http")&&b.warn("It seems that you have manually added `httpServerSpansIntergation` while `httpIntegration` is also present. Make sure to remove `httpIntegration` when adding `httpServerSpansIntegration`."),c.getIntegrationByName("Http.Server")||b.error("It seems that you have manually added `httpServerSpansIntergation` without adding `httpServerIntegration`. This is a requiement for spans to be created - please add the `httpServerIntegration` integration."))}}}),nl=Vxe});var nee,ree=E(()=>{l();nee="@sentry/instrumentation-http"});var li,ta,Gg,jp=E(()=>{l();ne();li=gP(process.versions.node),ta=li.major,Gg=li.minor});var oee,dc,iee,jg,see,Jxe,Xxe,Qxe,rl,zw=E(()=>{l();oee=require("node:diagnostics_channel"),dc=U(K(),1),iee=U(rt(),1),jg=U(Me(),1);ne();ree();jp();see=require("node:events"),Jxe=U(require("node:http"),1),Xxe=U(require("node:https"),1),Qxe=li.major===22&&li.minor>=12||li.major===23&&li.minor>=2||li.major>=24,rl=class extends jg.InstrumentationBase{constructor(t={}){super(nee,ve,t)}init(){let{outgoingRequestApplyCustomAttributes:t,...n}=this.getConfig(),o={propagateTrace:n.propagateTraceInOutgoingRequests,applyCustomAttributesOnSpan:t,...n,spans:n.createSpansForOutgoingRequests&&(n.spans??!0),ignoreOutgoingRequests(u,d){return(0,iee.isTracingSuppressed)(dc.context.active())||!!n.ignoreOutgoingRequests?.(u,bS(d))},outgoingRequestHook(u,d){n.outgoingRequestHook?.(u,d);let p=d.once,f=new Proxy(p,{apply(m,_,h){let[T]=h;if(T!=="response")return m.apply(_,h);let S=dc.context.active(),y=dc.trace.setSpan(S,u);return dc.context.with(y,()=>m.apply(_,h))}});d.once=f},outgoingResponseHook(u,d){n.outgoingResponseHook?.(u,d),dc.context.bind(dc.context.active(),d)},errorMonitor:see.errorMonitor,http:Jxe,https:Xxe},{[Ys]:r}=Qxe?Z_(o):{},i=!1,s=r?u=>(!i&&r&&(i=!0,(0,oee.subscribe)(Ys,r)),u):void 0,a=s??(u=>OS(u,o)),c=s??(u=>OS(u,o));return[new jg.InstrumentationNodeModuleDefinition("http",["*"],a),new jg.InstrumentationNodeModuleDefinition("https",["*"],c)]}}});var aee,eMe,cee,uee=E(()=>{l();ry();oy();Hw();zw();aee="Http",eMe=ae(`${aee}.sentry`,e=>new rl(e)),cee=(e={})=>{let t={sessions:e.trackIncomingRequestsAsSessions,sessionFlushingDelayMS:e.sessionFlushingDelayMS,ignoreRequestBody:e.ignoreIncomingRequestBody,maxRequestBodySize:e.maxIncomingRequestBodySize},n={ignoreIncomingRequests:e.ignoreIncomingRequests,ignoreStaticAssets:e.ignoreStaticAssets,ignoreStatusCodes:e.dropSpansForIncomingRequestStatusCodes},o={breadcrumbs:e.breadcrumbs,propagateTraceInOutgoingRequests:e.tracePropagation??!0,ignoreOutgoingRequests:e.ignoreOutgoingRequests},r=Wu(t),i=nl(n),s=e.spans??!1,a=e.disableIncomingRequestSpans??!1,c=s&&!a;return{name:aee,setup(u){c&&i.setup(u)},setupOnce(){r.setupOnce(),eMe(o)},processEvent(u){return i.processEvent(u)}}}});function lee(e,t){let n=Dy(e.origin,e.path),{tracePropagationTargets:o,propagateTraceparent:r}=Z()?.getOptions()||{},i=Lu(n,o,t)?Va({propagateTraceparent:r}):void 0;if(!i)return;let{"sentry-trace":s,baggage:a,traceparent:c}=i,u=Array.isArray(e.headers)?nMe(e.headers):rMe(e.headers);if(Yw(u,qw),Yw(u,wy),r&&Yw(u,tMe),!(Ww(u,qw)!==-1)){s&&u.push(qw,s),c&&Ww(u,"traceparent")===-1&&u.push("traceparent",c);let p=Ww(u,wy);if(a&&p===-1)u.push(wy,a);else if(a){let f=u[p+1],m=Pd(f,a);m&&(u[p+1]=m)}}Array.isArray(e.headers)?e.headers.splice(0,e.headers.length,...u):e.headers=oMe(u)}function nMe(e){let t=[];for(let n=0;n<e.length;n++){let o=e[n];n%2===0?t.push(typeof o=="string"?o:String(o)):t.push(Array.isArray(o)?o.join(", "):o??"")}return t}function rMe(e){let t=e.split(`\r
|
|
23
|
+
`),n=[];for(let o of t)try{let r=o.indexOf(":");if(r===-1)continue;let i=o.slice(0,r).trim(),s=o.slice(r+1).trim();i&&n.push(i,s)}catch{b.warn(`Failed to convert string request header to array header: ${o}`)}return n}function oMe(e){let t=[];for(let n=0;n<e.length;n+=2){let o=e[n],r=e[n+1];!o||r==null||t.push(`${o}: ${r}`)}return t.length?t.join(`\r
|
|
24
|
+
`).concat(`\r
|
|
25
|
+
`):""}function Yw(e,t){let n=-1;for(let o=0;o<e.length;o+=2){if(e[o]!==t)continue;if(n===-1){n=o;continue}let r=e[n+1];if(t===wy&&r){let i=Pd(e[o+1],r);i&&(e[n+1]=i)}e.splice(o,2),o-=2}}function Ww(e,t){return e.findIndex((n,o)=>o%2===0&&n===t)}function dee(e,t){let n=iMe(e),o=t.statusCode,r=K_(o);br({category:"http",data:{status_code:o,...n},type:"http",level:r},{event:"response",request:e,response:t})}function iMe(e){try{let t=Dy(e.origin,e.path),n=Bi(t),o={url:Gi(n),"http.method":e.method||"GET"};return n.search&&(o["http.query"]=n.search),n.hash&&(o["http.fragment"]=n.hash),o}catch{return{}}}function Dy(e,t="/"){try{return new URL(t,e).toString()}catch{let n=`${e}`;return n.endsWith("/")&&t.startsWith("/")?`${n}${t.slice(1)}`:!n.endsWith("/")&&!t.startsWith("/")?`${n}/${t}`:`${n}${t}`}}var qw,wy,tMe,pee=E(()=>{l();ne();qw="sentry-trace",wy="baggage",tMe="traceparent"});var fee,mee,_ee,Vp,ol,Kw=E(()=>{l();fee=U(K(),1),mee=U(rt(),1),_ee=U(Me(),1);ne();Vp=U(require("diagnostics_channel"),1);jp();pee();ol=class extends _ee.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-node-fetch",ve,t),this._channelSubs=[],this._propagationDecisionMap=new Nr(100),this._ignoreOutgoingRequestsMap=new WeakMap}init(){}disable(){super.disable(),this._channelSubs.forEach(t=>t.unsubscribe()),this._channelSubs=[]}enable(){super.enable(),this._channelSubs=this._channelSubs||[],!(this._channelSubs.length>0)&&(this._subscribeToChannel("undici:request:create",this._onRequestCreated.bind(this)),this._subscribeToChannel("undici:request:headers",this._onResponseHeaders.bind(this)))}_onRequestCreated({request:t}){let n=this.getConfig();if(!(n.enabled!==!1))return;let r=this._shouldIgnoreOutgoingRequest(t);this._ignoreOutgoingRequestsMap.set(t,r),!r&&n.tracePropagation!==!1&&lee(t,this._propagationDecisionMap)}_onResponseHeaders({request:t,response:n}){let o=this.getConfig();if(!(o.enabled!==!1))return;let i=o.breadcrumbs,s=typeof i>"u"?!0:i,a=this._ignoreOutgoingRequestsMap.get(t);s&&!a&&dee(t,n)}_subscribeToChannel(t,n){let o=ta>18||ta===18&&Gg>=19,r;if(o)Vp.subscribe?.(t,n),r=()=>Vp.unsubscribe?.(t,n);else{let i=Vp.channel(t);i.subscribe(n),r=()=>i.unsubscribe(n)}this._channelSubs.push({name:t,unsubscribe:r})}_shouldIgnoreOutgoingRequest(t){if((0,mee.isTracingSuppressed)(fee.context.active()))return!0;let n=Dy(t.origin,t.path),o=this.getConfig().ignoreOutgoingRequests;return typeof o!="function"||!n?!1:o(n)}}});var sMe,aMe,cMe,gee,hee=E(()=>{l();ry();Kw();sMe="NodeFetch",aMe=ae(`${sMe}.sentry`,ol,e=>e),cMe=((e={})=>({name:"NodeFetch",setupOnce(){aMe(e)}})),gee=cMe});var di,Zw=E(()=>{l();di=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__});var Jw=A(Fp=>{"use strict";l();Object.defineProperty(Fp,"__esModule",{value:!0});Fp._clearDefaultServiceNameCache=Fp.defaultServiceName=void 0;var Vg;function uMe(){if(Vg===void 0)try{let e=globalThis.process.argv0;Vg=e?`unknown_service:${e}`:"unknown_service"}catch{Vg="unknown_service"}return Vg}Fp.defaultServiceName=uMe;function lMe(){Vg=void 0}Fp._clearDefaultServiceNameCache=lMe});var Eee=A(ky=>{"use strict";l();Object.defineProperty(ky,"__esModule",{value:!0});ky.isPromiseLike=void 0;var dMe=e=>e!==null&&typeof e=="object"&&typeof e.then=="function";ky.isPromiseLike=dMe});var eD=A(Qi=>{"use strict";l();Object.defineProperty(Qi,"__esModule",{value:!0});Qi.defaultResource=Qi.emptyResource=Qi.resourceFromDetectedResource=Qi.resourceFromAttributes=void 0;var Hg=K(),Xw=rt(),il=Qe(),pMe=Jw(),Fg=Eee(),Uy=class e{_rawAttributes;_asyncAttributesPending=!1;_schemaUrl;_memoizedAttributes;static FromAttributeList(t,n){let o=new e({},n);return o._rawAttributes=Tee(t),o._asyncAttributesPending=t.filter(([r,i])=>(0,Fg.isPromiseLike)(i)).length>0,o}constructor(t,n){let o=t.attributes??{};this._rawAttributes=Object.entries(o).map(([r,i])=>((0,Fg.isPromiseLike)(i)&&(this._asyncAttributesPending=!0),[r,i])),this._rawAttributes=Tee(this._rawAttributes),this._schemaUrl=gMe(n?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let t=0;t<this._rawAttributes.length;t++){let[n,o]=this._rawAttributes[t];this._rawAttributes[t]=[n,(0,Fg.isPromiseLike)(o)?await o:o]}this._asyncAttributesPending=!1}}get attributes(){if(this.asyncAttributesPending&&Hg.diag.error("Accessing resource attributes before async attributes settled"),this._memoizedAttributes)return this._memoizedAttributes;let t={};for(let[n,o]of this._rawAttributes){if((0,Fg.isPromiseLike)(o)){Hg.diag.debug(`Unsettled resource attribute ${n} skipped`);continue}o!=null&&(t[n]??=o)}return this._asyncAttributesPending||(this._memoizedAttributes=t),t}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(t){if(t==null)return this;let n=hMe(this,t),o=n?{schemaUrl:n}:void 0;return e.FromAttributeList([...t.getRawAttributes(),...this.getRawAttributes()],o)}};function Qw(e,t){return Uy.FromAttributeList(Object.entries(e),t)}Qi.resourceFromAttributes=Qw;function fMe(e,t){return new Uy(e,t)}Qi.resourceFromDetectedResource=fMe;function mMe(){return Qw({})}Qi.emptyResource=mMe;function _Me(){return Qw({[il.ATTR_SERVICE_NAME]:(0,pMe.defaultServiceName)(),[il.ATTR_TELEMETRY_SDK_LANGUAGE]:Xw.SDK_INFO[il.ATTR_TELEMETRY_SDK_LANGUAGE],[il.ATTR_TELEMETRY_SDK_NAME]:Xw.SDK_INFO[il.ATTR_TELEMETRY_SDK_NAME],[il.ATTR_TELEMETRY_SDK_VERSION]:Xw.SDK_INFO[il.ATTR_TELEMETRY_SDK_VERSION]})}Qi.defaultResource=_Me;function Tee(e){return e.map(([t,n])=>(0,Fg.isPromiseLike)(n)?[t,n.catch(o=>{Hg.diag.debug("promise rejection for resource attribute: %s - %s",t,o)})]:[t,n])}function gMe(e){if(typeof e=="string"||e===void 0)return e;Hg.diag.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.",e)}function hMe(e,t){let n=e?.schemaUrl,o=t?.schemaUrl,r=n===void 0||n==="",i=o===void 0||o==="";if(r)return o;if(i||n===o)return n;Hg.diag.warn('Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.',n,o)}});var Aee=A($y=>{"use strict";l();Object.defineProperty($y,"__esModule",{value:!0});$y.detectResources=void 0;var See=K(),tD=eD(),EMe=(e={})=>(e.detectors||[]).map(n=>{try{let o=(0,tD.resourceFromDetectedResource)(n.detect(e));return See.diag.debug(`${n.constructor.name} found resource.`,o),o}catch(o){return See.diag.debug(`${n.constructor.name} failed: ${o.message}`),(0,tD.emptyResource)()}}).reduce((n,o)=>n.merge(o),(0,tD.emptyResource)());$y.detectResources=EMe});var Ree=A(By=>{"use strict";l();Object.defineProperty(By,"__esModule",{value:!0});By.envDetector=void 0;var TMe=K(),SMe=Qe(),yee=rt(),nD=class{_MAX_LENGTH=255;_COMMA_SEPARATOR=",";_LABEL_KEY_VALUE_SPLITTER="=";detect(t){let n={},o=(0,yee.getStringFromEnv)("OTEL_RESOURCE_ATTRIBUTES"),r=(0,yee.getStringFromEnv)("OTEL_SERVICE_NAME");if(o)try{let i=this._parseResourceAttributes(o);Object.assign(n,i)}catch(i){TMe.diag.debug(`EnvDetector failed: ${i instanceof Error?i.message:i}`)}return r&&(n[SMe.ATTR_SERVICE_NAME]=r),{attributes:n}}_parseResourceAttributes(t){if(!t)return{};let n={},o=t.split(this._COMMA_SEPARATOR).filter(r=>r.trim()!=="");for(let r of o){let i=r.split(this._LABEL_KEY_VALUE_SPLITTER);if(i.length!==2)throw new Error(`Invalid format for OTEL_RESOURCE_ATTRIBUTES: "${r}". Expected format: key=value. The ',' and '=' characters must be percent-encoded in keys and values.`);let[s,a]=i,c=s.trim(),u=a.trim();if(c.length===0)throw new Error(`Invalid OTEL_RESOURCE_ATTRIBUTES: empty attribute key in "${r}".`);let d,p;try{d=decodeURIComponent(c),p=decodeURIComponent(u)}catch(f){throw new Error(`Failed to percent-decode OTEL_RESOURCE_ATTRIBUTES entry "${r}": ${f instanceof Error?f.message:f}`)}if(d.length>this._MAX_LENGTH)throw new Error(`Attribute key exceeds the maximum length of ${this._MAX_LENGTH} characters: "${d}".`);if(p.length>this._MAX_LENGTH)throw new Error(`Attribute value exceeds the maximum length of ${this._MAX_LENGTH} characters for key "${d}".`);n[d]=p}return n}};By.envDetector=new nD});var zg=A(ie=>{"use strict";l();Object.defineProperty(ie,"__esModule",{value:!0});ie.ATTR_WEBENGINE_VERSION=ie.ATTR_WEBENGINE_NAME=ie.ATTR_WEBENGINE_DESCRIPTION=ie.ATTR_SERVICE_NAMESPACE=ie.ATTR_SERVICE_INSTANCE_ID=ie.ATTR_PROCESS_RUNTIME_VERSION=ie.ATTR_PROCESS_RUNTIME_NAME=ie.ATTR_PROCESS_RUNTIME_DESCRIPTION=ie.ATTR_PROCESS_PID=ie.ATTR_PROCESS_OWNER=ie.ATTR_PROCESS_EXECUTABLE_PATH=ie.ATTR_PROCESS_EXECUTABLE_NAME=ie.ATTR_PROCESS_COMMAND_ARGS=ie.ATTR_PROCESS_COMMAND=ie.ATTR_OS_VERSION=ie.ATTR_OS_TYPE=ie.ATTR_K8S_POD_NAME=ie.ATTR_K8S_NAMESPACE_NAME=ie.ATTR_K8S_DEPLOYMENT_NAME=ie.ATTR_K8S_CLUSTER_NAME=ie.ATTR_HOST_TYPE=ie.ATTR_HOST_NAME=ie.ATTR_HOST_IMAGE_VERSION=ie.ATTR_HOST_IMAGE_NAME=ie.ATTR_HOST_IMAGE_ID=ie.ATTR_HOST_ID=ie.ATTR_HOST_ARCH=ie.ATTR_CONTAINER_NAME=ie.ATTR_CONTAINER_IMAGE_TAGS=ie.ATTR_CONTAINER_IMAGE_NAME=ie.ATTR_CONTAINER_ID=ie.ATTR_CLOUD_REGION=ie.ATTR_CLOUD_PROVIDER=ie.ATTR_CLOUD_AVAILABILITY_ZONE=ie.ATTR_CLOUD_ACCOUNT_ID=void 0;ie.ATTR_CLOUD_ACCOUNT_ID="cloud.account.id";ie.ATTR_CLOUD_AVAILABILITY_ZONE="cloud.availability_zone";ie.ATTR_CLOUD_PROVIDER="cloud.provider";ie.ATTR_CLOUD_REGION="cloud.region";ie.ATTR_CONTAINER_ID="container.id";ie.ATTR_CONTAINER_IMAGE_NAME="container.image.name";ie.ATTR_CONTAINER_IMAGE_TAGS="container.image.tags";ie.ATTR_CONTAINER_NAME="container.name";ie.ATTR_HOST_ARCH="host.arch";ie.ATTR_HOST_ID="host.id";ie.ATTR_HOST_IMAGE_ID="host.image.id";ie.ATTR_HOST_IMAGE_NAME="host.image.name";ie.ATTR_HOST_IMAGE_VERSION="host.image.version";ie.ATTR_HOST_NAME="host.name";ie.ATTR_HOST_TYPE="host.type";ie.ATTR_K8S_CLUSTER_NAME="k8s.cluster.name";ie.ATTR_K8S_DEPLOYMENT_NAME="k8s.deployment.name";ie.ATTR_K8S_NAMESPACE_NAME="k8s.namespace.name";ie.ATTR_K8S_POD_NAME="k8s.pod.name";ie.ATTR_OS_TYPE="os.type";ie.ATTR_OS_VERSION="os.version";ie.ATTR_PROCESS_COMMAND="process.command";ie.ATTR_PROCESS_COMMAND_ARGS="process.command_args";ie.ATTR_PROCESS_EXECUTABLE_NAME="process.executable.name";ie.ATTR_PROCESS_EXECUTABLE_PATH="process.executable.path";ie.ATTR_PROCESS_OWNER="process.owner";ie.ATTR_PROCESS_PID="process.pid";ie.ATTR_PROCESS_RUNTIME_DESCRIPTION="process.runtime.description";ie.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name";ie.ATTR_PROCESS_RUNTIME_VERSION="process.runtime.version";ie.ATTR_SERVICE_INSTANCE_ID="service.instance.id";ie.ATTR_SERVICE_NAMESPACE="service.namespace";ie.ATTR_WEBENGINE_DESCRIPTION="webengine.description";ie.ATTR_WEBENGINE_NAME="webengine.name";ie.ATTR_WEBENGINE_VERSION="webengine.version"});var jy=A(Gy=>{"use strict";l();Object.defineProperty(Gy,"__esModule",{value:!0});Gy.execAsync=void 0;var AMe=require("child_process"),yMe=require("util");Gy.execAsync=yMe.promisify(AMe.exec)});var Iee=A(Vy=>{"use strict";l();Object.defineProperty(Vy,"__esModule",{value:!0});Vy.getMachineId=void 0;var RMe=jy(),IMe=K();async function bMe(){try{let t=(await(0,RMe.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"')).stdout.split(`
|
|
26
|
+
`).find(o=>o.includes("IOPlatformUUID"));if(!t)return;let n=t.split('" = "');if(n.length===2)return n[1].slice(0,-1)}catch(e){IMe.diag.debug(`error reading machine id: ${e}`)}}Vy.getMachineId=bMe});var bee=A(Fy=>{"use strict";l();Object.defineProperty(Fy,"__esModule",{value:!0});Fy.getMachineId=void 0;var NMe=require("fs"),OMe=K();async function CMe(){let e=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let t of e)try{return(await NMe.promises.readFile(t,{encoding:"utf8"})).trim()}catch(n){OMe.diag.debug(`error reading machine id: ${n}`)}}Fy.getMachineId=CMe});var Oee=A(Hy=>{"use strict";l();Object.defineProperty(Hy,"__esModule",{value:!0});Hy.getMachineId=void 0;var vMe=require("fs"),PMe=jy(),Nee=K();async function xMe(){try{return(await vMe.promises.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(e){Nee.diag.debug(`error reading machine id: ${e}`)}try{return(await(0,PMe.execAsync)("kenv -q smbios.system.uuid")).stdout.trim()}catch(e){Nee.diag.debug(`error reading machine id: ${e}`)}}Hy.getMachineId=xMe});var vee=A(zy=>{"use strict";l();Object.defineProperty(zy,"__esModule",{value:!0});zy.getMachineId=void 0;var Cee=require("process"),MMe=jy(),LMe=K();async function wMe(){let e="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",t="%windir%\\System32\\REG.exe";Cee.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in Cee.env&&(t="%windir%\\sysnative\\cmd.exe /c "+t);try{let o=(await(0,MMe.execAsync)(`${t} ${e}`)).stdout.split("REG_SZ");if(o.length===2)return o[1].trim()}catch(n){LMe.diag.debug(`error reading machine id: ${n}`)}}zy.getMachineId=wMe});var Pee=A(qy=>{"use strict";l();Object.defineProperty(qy,"__esModule",{value:!0});qy.getMachineId=void 0;var DMe=K();async function kMe(){DMe.diag.debug("could not read machine-id: unsupported platform")}qy.getMachineId=kMe});var xee=A(Yy=>{"use strict";l();Object.defineProperty(Yy,"__esModule",{value:!0});Yy.getMachineId=void 0;var UMe=require("process"),sl;async function $Me(){if(!sl)switch(UMe.platform){case"darwin":sl=(await Promise.resolve().then(()=>U(Iee()))).getMachineId;break;case"linux":sl=(await Promise.resolve().then(()=>U(bee()))).getMachineId;break;case"freebsd":sl=(await Promise.resolve().then(()=>U(Oee()))).getMachineId;break;case"win32":sl=(await Promise.resolve().then(()=>U(vee()))).getMachineId;break;default:sl=(await Promise.resolve().then(()=>U(Pee()))).getMachineId;break}return sl()}Yy.getMachineId=$Me});var rD=A(Hp=>{"use strict";l();Object.defineProperty(Hp,"__esModule",{value:!0});Hp.normalizeType=Hp.normalizeArch=void 0;var BMe=e=>{switch(e){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return e}};Hp.normalizeArch=BMe;var GMe=e=>{switch(e){case"sunos":return"solaris";case"win32":return"windows";default:return e}};Hp.normalizeType=GMe});var Lee=A(Wy=>{"use strict";l();Object.defineProperty(Wy,"__esModule",{value:!0});Wy.hostDetector=void 0;var oD=zg(),Mee=require("os"),jMe=xee(),VMe=rD(),iD=class{detect(t){return{attributes:{[oD.ATTR_HOST_NAME]:(0,Mee.hostname)(),[oD.ATTR_HOST_ARCH]:(0,VMe.normalizeArch)((0,Mee.arch)()),[oD.ATTR_HOST_ID]:(0,jMe.getMachineId)()}}}};Wy.hostDetector=new iD});var kee=A(Ky=>{"use strict";l();Object.defineProperty(Ky,"__esModule",{value:!0});Ky.osDetector=void 0;var wee=zg(),Dee=require("os"),FMe=rD(),sD=class{detect(t){return{attributes:{[wee.ATTR_OS_TYPE]:(0,FMe.normalizeType)((0,Dee.platform)()),[wee.ATTR_OS_VERSION]:(0,Dee.release)()}}}};Ky.osDetector=new sD});var Uee=A(Zy=>{"use strict";l();Object.defineProperty(Zy,"__esModule",{value:!0});Zy.processDetector=void 0;var HMe=K(),na=zg(),zMe=require("os"),aD=class{detect(t){let n={[na.ATTR_PROCESS_PID]:process.pid,[na.ATTR_PROCESS_EXECUTABLE_NAME]:process.title,[na.ATTR_PROCESS_EXECUTABLE_PATH]:process.execPath,[na.ATTR_PROCESS_COMMAND_ARGS]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[na.ATTR_PROCESS_RUNTIME_VERSION]:process.versions.node,[na.ATTR_PROCESS_RUNTIME_NAME]:"nodejs",[na.ATTR_PROCESS_RUNTIME_DESCRIPTION]:"Node.js"};process.argv.length>1&&(n[na.ATTR_PROCESS_COMMAND]=process.argv[1]);try{let o=zMe.userInfo();n[na.ATTR_PROCESS_OWNER]=o.username}catch(o){HMe.diag.debug(`error obtaining process owner: ${o}`)}return{attributes:n}}};Zy.processDetector=new aD});var $ee=A(Jy=>{"use strict";l();Object.defineProperty(Jy,"__esModule",{value:!0});Jy.serviceInstanceIdDetector=void 0;var qMe=zg(),YMe=require("crypto"),cD=class{detect(t){return{attributes:{[qMe.ATTR_SERVICE_INSTANCE_ID]:(0,YMe.randomUUID)()}}}};Jy.serviceInstanceIdDetector=new cD});var Bee=A(es=>{"use strict";l();Object.defineProperty(es,"__esModule",{value:!0});es.serviceInstanceIdDetector=es.processDetector=es.osDetector=es.hostDetector=void 0;var WMe=Lee();Object.defineProperty(es,"hostDetector",{enumerable:!0,get:function(){return WMe.hostDetector}});var KMe=kee();Object.defineProperty(es,"osDetector",{enumerable:!0,get:function(){return KMe.osDetector}});var ZMe=Uee();Object.defineProperty(es,"processDetector",{enumerable:!0,get:function(){return ZMe.processDetector}});var JMe=$ee();Object.defineProperty(es,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return JMe.serviceInstanceIdDetector}})});var Gee=A(ts=>{"use strict";l();Object.defineProperty(ts,"__esModule",{value:!0});ts.serviceInstanceIdDetector=ts.processDetector=ts.osDetector=ts.hostDetector=void 0;var Xy=Bee();Object.defineProperty(ts,"hostDetector",{enumerable:!0,get:function(){return Xy.hostDetector}});Object.defineProperty(ts,"osDetector",{enumerable:!0,get:function(){return Xy.osDetector}});Object.defineProperty(ts,"processDetector",{enumerable:!0,get:function(){return Xy.processDetector}});Object.defineProperty(ts,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return Xy.serviceInstanceIdDetector}})});var jee=A(zp=>{"use strict";l();Object.defineProperty(zp,"__esModule",{value:!0});zp.noopDetector=zp.NoopDetector=void 0;var Qy=class{detect(){return{attributes:{}}}};zp.NoopDetector=Qy;zp.noopDetector=new Qy});var Vee=A(wr=>{"use strict";l();Object.defineProperty(wr,"__esModule",{value:!0});wr.noopDetector=wr.serviceInstanceIdDetector=wr.processDetector=wr.osDetector=wr.hostDetector=wr.envDetector=void 0;var XMe=Ree();Object.defineProperty(wr,"envDetector",{enumerable:!0,get:function(){return XMe.envDetector}});var eR=Gee();Object.defineProperty(wr,"hostDetector",{enumerable:!0,get:function(){return eR.hostDetector}});Object.defineProperty(wr,"osDetector",{enumerable:!0,get:function(){return eR.osDetector}});Object.defineProperty(wr,"processDetector",{enumerable:!0,get:function(){return eR.processDetector}});Object.defineProperty(wr,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return eR.serviceInstanceIdDetector}});var QMe=jee();Object.defineProperty(wr,"noopDetector",{enumerable:!0,get:function(){return QMe.noopDetector}})});var Fee=A(wt=>{"use strict";l();Object.defineProperty(wt,"__esModule",{value:!0});wt.defaultServiceName=wt.emptyResource=wt.defaultResource=wt.resourceFromAttributes=wt.serviceInstanceIdDetector=wt.processDetector=wt.osDetector=wt.hostDetector=wt.envDetector=wt.detectResources=void 0;var eLe=Aee();Object.defineProperty(wt,"detectResources",{enumerable:!0,get:function(){return eLe.detectResources}});var qg=Vee();Object.defineProperty(wt,"envDetector",{enumerable:!0,get:function(){return qg.envDetector}});Object.defineProperty(wt,"hostDetector",{enumerable:!0,get:function(){return qg.hostDetector}});Object.defineProperty(wt,"osDetector",{enumerable:!0,get:function(){return qg.osDetector}});Object.defineProperty(wt,"processDetector",{enumerable:!0,get:function(){return qg.processDetector}});Object.defineProperty(wt,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return qg.serviceInstanceIdDetector}});var uD=eD();Object.defineProperty(wt,"resourceFromAttributes",{enumerable:!0,get:function(){return uD.resourceFromAttributes}});Object.defineProperty(wt,"defaultResource",{enumerable:!0,get:function(){return uD.defaultResource}});Object.defineProperty(wt,"emptyResource",{enumerable:!0,get:function(){return uD.emptyResource}});var tLe=Jw();Object.defineProperty(wt,"defaultServiceName",{enumerable:!0,get:function(){return tLe.defaultServiceName}})});var Hee=A(tR=>{"use strict";l();Object.defineProperty(tR,"__esModule",{value:!0});tR.ExceptionEventName=void 0;tR.ExceptionEventName="exception"});var zee=A(nR=>{"use strict";l();Object.defineProperty(nR,"__esModule",{value:!0});nR.SpanImpl=void 0;var Cn=K(),vn=rt(),al=Qe(),nLe=Hee(),lD=class{_spanContext;kind;parentSpanContext;attributes={};links=[];events=[];startTime;resource;instrumentationScope;_droppedAttributesCount=0;_droppedEventsCount=0;_droppedLinksCount=0;_attributesCount=0;name;status={code:Cn.SpanStatusCode.UNSET};endTime=[0,0];_ended=!1;_duration=[-1,-1];_spanProcessor;_spanLimits;_attributeValueLengthLimit;_recordEndMetrics;_performanceStartTime;_performanceOffset;_startTimeProvided;constructor(t){let n=Date.now();if(this._spanContext=t.spanContext,this._performanceStartTime=vn.otperformance.now(),this._performanceOffset=n-(this._performanceStartTime+vn.otperformance.timeOrigin),this._startTimeProvided=t.startTime!=null,this._spanLimits=t.spanLimits,this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit??0,this._spanProcessor=t.spanProcessor,this.name=t.name,this.parentSpanContext=t.parentSpanContext,this.kind=t.kind,t.links)for(let o of t.links)this.addLink(o);this.startTime=this._getTime(t.startTime??n),this.resource=t.resource,this.instrumentationScope=t.scope,this._recordEndMetrics=t.recordEndMetrics,t.attributes!=null&&this.setAttributes(t.attributes),this._spanProcessor.onStart(this,t.context)}spanContext(){return this._spanContext}setAttribute(t,n){if(n==null||this._isSpanEnded())return this;if(t.length===0)return Cn.diag.warn(`Invalid attribute key: ${t}`),this;if(!(0,vn.isAttributeValue)(n))return Cn.diag.warn(`Invalid attribute value set for key: ${t}`),this;let{attributeCountLimit:o}=this._spanLimits,r=!Object.prototype.hasOwnProperty.call(this.attributes,t);return o!==void 0&&this._attributesCount>=o&&r?(this._droppedAttributesCount++,this):(this.attributes[t]=this._truncateToSize(n),r&&this._attributesCount++,this)}setAttributes(t){for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.setAttribute(n,t[n]);return this}addEvent(t,n,o){if(this._isSpanEnded())return this;let{eventCountLimit:r}=this._spanLimits;if(r===0)return Cn.diag.warn("No events allowed."),this._droppedEventsCount++,this;r!==void 0&&this.events.length>=r&&(this._droppedEventsCount===0&&Cn.diag.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),(0,vn.isTimeInput)(n)&&((0,vn.isTimeInput)(o)||(o=n),n=void 0);let i=(0,vn.sanitizeAttributes)(n),{attributePerEventCountLimit:s}=this._spanLimits,a={},c=0,u=0;for(let d in i){if(!Object.prototype.hasOwnProperty.call(i,d))continue;let p=i[d];if(s!==void 0&&u>=s){c++;continue}a[d]=this._truncateToSize(p),u++}return this.events.push({name:t,attributes:a,time:this._getTime(o),droppedAttributesCount:c}),this}addLink(t){if(this._isSpanEnded())return this;let{linkCountLimit:n}=this._spanLimits;if(n===0)return this._droppedLinksCount++,this;n!==void 0&&this.links.length>=n&&(this._droppedLinksCount===0&&Cn.diag.debug("Dropping extra links."),this.links.shift(),this._droppedLinksCount++);let{attributePerLinkCountLimit:o}=this._spanLimits,r=(0,vn.sanitizeAttributes)(t.attributes),i={},s=0,a=0;for(let u in r){if(!Object.prototype.hasOwnProperty.call(r,u))continue;let d=r[u];if(o!==void 0&&a>=o){s++;continue}i[u]=this._truncateToSize(d),a++}let c={context:t.context};return a>0&&(c.attributes=i),s>0&&(c.droppedAttributesCount=s),this.links.push(c),this}addLinks(t){for(let n of t)this.addLink(n);return this}setStatus(t){if(this._isSpanEnded())return this;if(t.code===Cn.SpanStatusCode.UNSET)return this;if(this.status.code===Cn.SpanStatusCode.OK)return this;let n={code:t.code};return t.code===Cn.SpanStatusCode.ERROR&&(typeof t.message=="string"?n.message=t.message:t.message!=null&&Cn.diag.warn(`Dropping invalid status.message of type '${typeof t.message}', expected 'string'`)),this.status=n,this}updateName(t){return this._isSpanEnded()?this:(this.name=t,this)}end(t){if(this._isSpanEnded()){Cn.diag.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);return}this.endTime=this._getTime(t),this._duration=(0,vn.hrTimeDuration)(this.startTime,this.endTime),this._duration[0]<0&&(Cn.diag.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&Cn.diag.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._droppedLinksCount>0&&Cn.diag.warn(`Dropped ${this._droppedLinksCount} links because linkCountLimit reached`),this._spanProcessor.onEnding&&this._spanProcessor.onEnding(this),this._recordEndMetrics?.(),this._ended=!0,this._spanProcessor.onEnd(this)}_getTime(t){if(typeof t=="number"&&t<=vn.otperformance.now())return(0,vn.hrTime)(t+this._performanceOffset);if(typeof t=="number")return(0,vn.millisToHrTime)(t);if(t instanceof Date)return(0,vn.millisToHrTime)(t.getTime());if((0,vn.isTimeInputHrTime)(t))return t;if(this._startTimeProvided)return(0,vn.millisToHrTime)(Date.now());let n=vn.otperformance.now()-this._performanceStartTime;return(0,vn.addHrTimes)(this.startTime,(0,vn.millisToHrTime)(n))}isRecording(){return this._ended===!1}recordException(t,n){let o={};typeof t=="string"?o[al.ATTR_EXCEPTION_MESSAGE]=t:t&&(t.code?o[al.ATTR_EXCEPTION_TYPE]=t.code.toString():t.name&&(o[al.ATTR_EXCEPTION_TYPE]=t.name),t.message&&(o[al.ATTR_EXCEPTION_MESSAGE]=t.message),t.stack&&(o[al.ATTR_EXCEPTION_STACKTRACE]=t.stack)),o[al.ATTR_EXCEPTION_TYPE]||o[al.ATTR_EXCEPTION_MESSAGE]?this.addEvent(nLe.ExceptionEventName,o,n):Cn.diag.warn(`Failed to record an exception ${t}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){if(this._ended){let t=new Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);Cn.diag.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,t)}return this._ended}_truncateToLimitUtil(t,n){return t.length<=n?t:t.substring(0,n)}_truncateToSize(t){let n=this._attributeValueLengthLimit;return n<=0?(Cn.diag.warn(`Attribute value limit must be positive, got ${n}`),t):typeof t=="string"?this._truncateToLimitUtil(t,n):Array.isArray(t)?t.map(o=>typeof o=="string"?this._truncateToLimitUtil(o,n):o):t}};nR.SpanImpl=lD});var qp=A(Yg=>{"use strict";l();Object.defineProperty(Yg,"__esModule",{value:!0});Yg.SamplingDecision=void 0;var rLe;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(rLe=Yg.SamplingDecision||(Yg.SamplingDecision={}))});var oR=A(rR=>{"use strict";l();Object.defineProperty(rR,"__esModule",{value:!0});rR.AlwaysOffSampler=void 0;var oLe=qp(),dD=class{shouldSample(){return{decision:oLe.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};rR.AlwaysOffSampler=dD});var sR=A(iR=>{"use strict";l();Object.defineProperty(iR,"__esModule",{value:!0});iR.AlwaysOnSampler=void 0;var iLe=qp(),pD=class{shouldSample(){return{decision:iLe.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};iR.AlwaysOnSampler=pD});var _D=A(cR=>{"use strict";l();Object.defineProperty(cR,"__esModule",{value:!0});cR.ParentBasedSampler=void 0;var aR=K(),sLe=rt(),qee=oR(),fD=sR(),mD=class{_root;_remoteParentSampled;_remoteParentNotSampled;_localParentSampled;_localParentNotSampled;constructor(t){this._root=t.root,this._root||((0,sLe.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new fD.AlwaysOnSampler),this._remoteParentSampled=t.remoteParentSampled??new fD.AlwaysOnSampler,this._remoteParentNotSampled=t.remoteParentNotSampled??new qee.AlwaysOffSampler,this._localParentSampled=t.localParentSampled??new fD.AlwaysOnSampler,this._localParentNotSampled=t.localParentNotSampled??new qee.AlwaysOffSampler}shouldSample(t,n,o,r,i,s){let a=aR.trace.getSpanContext(t);return!a||!(0,aR.isSpanContextValid)(a)?this._root.shouldSample(t,n,o,r,i,s):a.isRemote?a.traceFlags&aR.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(t,n,o,r,i,s):this._remoteParentNotSampled.shouldSample(t,n,o,r,i,s):a.traceFlags&aR.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(t,n,o,r,i,s):this._localParentNotSampled.shouldSample(t,n,o,r,i,s)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};cR.ParentBasedSampler=mD});var hD=A(uR=>{"use strict";l();Object.defineProperty(uR,"__esModule",{value:!0});uR.TraceIdRatioBasedSampler=void 0;var aLe=K(),Yee=qp(),gD=class{_ratio;_upperBound;constructor(t=0){this._ratio=this._normalize(t),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(t,n){return{decision:(0,aLe.isValidTraceId)(n)&&this._accumulate(n)<this._upperBound?Yee.SamplingDecision.RECORD_AND_SAMPLED:Yee.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(t){return typeof t!="number"||isNaN(t)?0:t>=1?1:t<=0?0:t}_accumulate(t){let n=0;for(let o=0;o<32;o+=8){let r=0;for(let i=0;i<8;i++){let s=t.charCodeAt(o+i),a=s<58?s-48:s<71?s-55:s-87;r=r<<4|a}n=(n^r)>>>0}return n}};uR.TraceIdRatioBasedSampler=gD});var SD=A(Yp=>{"use strict";l();Object.defineProperty(Yp,"__esModule",{value:!0});Yp.buildSamplerFromEnv=Yp.loadDefaultConfig=void 0;var TD=K(),ns=rt(),Wee=oR(),ED=sR(),lR=_D(),Kee=hD(),rs;(function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"})(rs||(rs={}));var dR=1;function cLe(){return{sampler:Jee(),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,ns.getNumberFromEnv)("OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT")??1/0,attributeCountLimit:(0,ns.getNumberFromEnv)("OTEL_ATTRIBUTE_COUNT_LIMIT")??128},spanLimits:{attributeValueLengthLimit:(0,ns.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT")??1/0,attributeCountLimit:(0,ns.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT")??128,linkCountLimit:(0,ns.getNumberFromEnv)("OTEL_SPAN_LINK_COUNT_LIMIT")??128,eventCountLimit:(0,ns.getNumberFromEnv)("OTEL_SPAN_EVENT_COUNT_LIMIT")??128,attributePerEventCountLimit:(0,ns.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT")??128,attributePerLinkCountLimit:(0,ns.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT")??128}}}Yp.loadDefaultConfig=cLe;function Jee(){let e=(0,ns.getStringFromEnv)("OTEL_TRACES_SAMPLER")??rs.ParentBasedAlwaysOn;switch(e){case rs.AlwaysOn:return new ED.AlwaysOnSampler;case rs.AlwaysOff:return new Wee.AlwaysOffSampler;case rs.ParentBasedAlwaysOn:return new lR.ParentBasedSampler({root:new ED.AlwaysOnSampler});case rs.ParentBasedAlwaysOff:return new lR.ParentBasedSampler({root:new Wee.AlwaysOffSampler});case rs.TraceIdRatio:return new Kee.TraceIdRatioBasedSampler(Zee());case rs.ParentBasedTraceIdRatio:return new lR.ParentBasedSampler({root:new Kee.TraceIdRatioBasedSampler(Zee())});default:return TD.diag.error(`OTEL_TRACES_SAMPLER value "${e}" invalid, defaulting to "${rs.ParentBasedAlwaysOn}".`),new lR.ParentBasedSampler({root:new ED.AlwaysOnSampler})}}Yp.buildSamplerFromEnv=Jee;function Zee(){let e=(0,ns.getNumberFromEnv)("OTEL_TRACES_SAMPLER_ARG");return e==null?(TD.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${dR}.`),dR):e<0||e>1?(TD.diag.error(`OTEL_TRACES_SAMPLER_ARG=${e} was given, but it is out of range ([0..1]), defaulting to ${dR}.`),dR):e}});var AD=A(Co=>{"use strict";l();Object.defineProperty(Co,"__esModule",{value:!0});Co.reconfigureLimits=Co.mergeConfig=Co.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=Co.DEFAULT_ATTRIBUTE_COUNT_LIMIT=void 0;var Xee=SD(),pR=rt();Co.DEFAULT_ATTRIBUTE_COUNT_LIMIT=128;Co.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=1/0;function uLe(e){let t={sampler:(0,Xee.buildSamplerFromEnv)()},n=(0,Xee.loadDefaultConfig)(),o=Object.assign({},n,t,e);return o.generalLimits=Object.assign({},n.generalLimits,e.generalLimits||{}),o.spanLimits=Object.assign({},n.spanLimits,e.spanLimits||{}),o}Co.mergeConfig=uLe;function lLe(e){let t=Object.assign({},e.spanLimits);return t.attributeCountLimit=e.spanLimits?.attributeCountLimit??e.generalLimits?.attributeCountLimit??(0,pR.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT")??(0,pR.getNumberFromEnv)("OTEL_ATTRIBUTE_COUNT_LIMIT")??Co.DEFAULT_ATTRIBUTE_COUNT_LIMIT,t.attributeValueLengthLimit=e.spanLimits?.attributeValueLengthLimit??e.generalLimits?.attributeValueLengthLimit??(0,pR.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT")??(0,pR.getNumberFromEnv)("OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT")??Co.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},e,{spanLimits:t})}Co.reconfigureLimits=lLe});var Qee=A(fR=>{"use strict";l();Object.defineProperty(fR,"__esModule",{value:!0});fR.BatchSpanProcessorBase=void 0;var Wp=K(),ra=rt(),yD=class{_maxExportBatchSize;_maxQueueSize;_scheduledDelayMillis;_exportTimeoutMillis;_exporter;_isExporting=!1;_finishedSpans=[];_timer;_shutdownOnce;_droppedSpansCount=0;constructor(t,n){this._exporter=t,this._maxExportBatchSize=typeof n?.maxExportBatchSize=="number"?n.maxExportBatchSize:(0,ra.getNumberFromEnv)("OTEL_BSP_MAX_EXPORT_BATCH_SIZE")??512,this._maxQueueSize=typeof n?.maxQueueSize=="number"?n.maxQueueSize:(0,ra.getNumberFromEnv)("OTEL_BSP_MAX_QUEUE_SIZE")??2048,this._scheduledDelayMillis=typeof n?.scheduledDelayMillis=="number"?n.scheduledDelayMillis:(0,ra.getNumberFromEnv)("OTEL_BSP_SCHEDULE_DELAY")??5e3,this._exportTimeoutMillis=typeof n?.exportTimeoutMillis=="number"?n.exportTimeoutMillis:(0,ra.getNumberFromEnv)("OTEL_BSP_EXPORT_TIMEOUT")??3e4,this._shutdownOnce=new ra.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(Wp.diag.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}onStart(t,n){}onEnd(t){this._shutdownOnce.isCalled||(t.spanContext().traceFlags&Wp.TraceFlags.SAMPLED)!==0&&this._addToBuffer(t)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>this._exporter.shutdown())}_addToBuffer(t){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&Wp.diag.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(Wp.diag.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(t),this._maybeStartTimer()}_flushAll(){return new Promise((t,n)=>{let o=[],r=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let i=0,s=r;i<s;i++)o.push(this._flushOneBatch());Promise.all(o).then(()=>{t()}).catch(n)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((t,n)=>{let o=setTimeout(()=>{n(new Error("Timeout"))},this._exportTimeoutMillis);Wp.context.with((0,ra.suppressTracing)(Wp.context.active()),()=>{let r;this._finishedSpans.length<=this._maxExportBatchSize?(r=this._finishedSpans,this._finishedSpans=[]):r=this._finishedSpans.splice(0,this._maxExportBatchSize);let i=()=>this._exporter.export(r,a=>{clearTimeout(o),a.code===ra.ExportResultCode.SUCCESS?t():n(a.error??new Error("BatchSpanProcessor: span export failed"))}),s=null;for(let a=0,c=r.length;a<c;a++){let u=r[a];u.resource.asyncAttributesPending&&u.resource.waitForAsyncAttributes&&(s??=[],s.push(u.resource.waitForAsyncAttributes()))}s===null?i():Promise.all(s).then(i,a=>{(0,ra.globalErrorHandler)(a),n(a)})})})}_maybeStartTimer(){if(this._isExporting)return;let t=()=>{this._isExporting=!0,this._flushOneBatch().finally(()=>{this._isExporting=!1,this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(n=>{this._isExporting=!1,(0,ra.globalErrorHandler)(n)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return t();this._timer===void 0&&(this._timer=setTimeout(()=>t(),this._scheduledDelayMillis),typeof this._timer!="number"&&this._timer.unref())}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}};fR.BatchSpanProcessorBase=yD});var ete=A(mR=>{"use strict";l();Object.defineProperty(mR,"__esModule",{value:!0});mR.BatchSpanProcessor=void 0;var dLe=Qee(),RD=class extends dLe.BatchSpanProcessorBase{onShutdown(){}};mR.BatchSpanProcessor=RD});var rte=A(gR=>{"use strict";l();Object.defineProperty(gR,"__esModule",{value:!0});gR.RandomIdGenerator=void 0;var pLe=8,nte=16,ID=class{generateTraceId=tte(nte);generateSpanId=tte(pLe)};gR.RandomIdGenerator=ID;var _R=Buffer.allocUnsafe(nte);function tte(e){return function(){for(let n=0;n<e/4;n++)_R.writeUInt32BE(Math.random()*2**32>>>0,n*4);for(let n=0;n<e&&!(_R[n]>0);n++)n===e-1&&(_R[e-1]=1);return _R.toString("hex",0,e)}}});var ote=A(Kp=>{"use strict";l();Object.defineProperty(Kp,"__esModule",{value:!0});Kp.RandomIdGenerator=Kp.BatchSpanProcessor=void 0;var fLe=ete();Object.defineProperty(Kp,"BatchSpanProcessor",{enumerable:!0,get:function(){return fLe.BatchSpanProcessor}});var mLe=rte();Object.defineProperty(Kp,"RandomIdGenerator",{enumerable:!0,get:function(){return mLe.RandomIdGenerator}})});var bD=A(Zp=>{"use strict";l();Object.defineProperty(Zp,"__esModule",{value:!0});Zp.RandomIdGenerator=Zp.BatchSpanProcessor=void 0;var ite=ote();Object.defineProperty(Zp,"BatchSpanProcessor",{enumerable:!0,get:function(){return ite.BatchSpanProcessor}});Object.defineProperty(Zp,"RandomIdGenerator",{enumerable:!0,get:function(){return ite.RandomIdGenerator}})});var ste=A(os=>{"use strict";l();Object.defineProperty(os,"__esModule",{value:!0});os.METRIC_OTEL_SDK_SPAN_STARTED=os.METRIC_OTEL_SDK_SPAN_LIVE=os.ATTR_OTEL_SPAN_SAMPLING_RESULT=os.ATTR_OTEL_SPAN_PARENT_ORIGIN=void 0;os.ATTR_OTEL_SPAN_PARENT_ORIGIN="otel.span.parent.origin";os.ATTR_OTEL_SPAN_SAMPLING_RESULT="otel.span.sampling_result";os.METRIC_OTEL_SDK_SPAN_LIVE="otel.sdk.span.live";os.METRIC_OTEL_SDK_SPAN_STARTED="otel.sdk.span.started"});var ate=A(ER=>{"use strict";l();Object.defineProperty(ER,"__esModule",{value:!0});ER.TracerMetrics=void 0;var hR=qp(),Wg=ste(),ND=class{startedSpans;liveSpans;constructor(t){this.startedSpans=t.createCounter(Wg.METRIC_OTEL_SDK_SPAN_STARTED,{unit:"{span}",description:"The number of created spans."}),this.liveSpans=t.createUpDownCounter(Wg.METRIC_OTEL_SDK_SPAN_LIVE,{unit:"{span}",description:"The number of currently live spans."})}startSpan(t,n){let o=gLe(n);if(this.startedSpans.add(1,{[Wg.ATTR_OTEL_SPAN_PARENT_ORIGIN]:_Le(t),[Wg.ATTR_OTEL_SPAN_SAMPLING_RESULT]:o}),n===hR.SamplingDecision.NOT_RECORD)return()=>{};let r={[Wg.ATTR_OTEL_SPAN_SAMPLING_RESULT]:o};return this.liveSpans.add(1,r),()=>{this.liveSpans.add(-1,r)}}};ER.TracerMetrics=ND;function _Le(e){return e?e.isRemote?"remote":"local":"none"}function gLe(e){switch(e){case hR.SamplingDecision.RECORD_AND_SAMPLED:return"RECORD_AND_SAMPLE";case hR.SamplingDecision.RECORD:return"RECORD_ONLY";case hR.SamplingDecision.NOT_RECORD:return"DROP"}}});var cte=A(TR=>{"use strict";l();Object.defineProperty(TR,"__esModule",{value:!0});TR.VERSION=void 0;TR.VERSION="2.7.1"});var ute=A(AR=>{"use strict";l();Object.defineProperty(AR,"__esModule",{value:!0});AR.Tracer=void 0;var fn=K(),SR=rt(),hLe=zee(),ELe=AD(),TLe=bD(),SLe=ate(),ALe=cte(),OD=class{_sampler;_generalLimits;_spanLimits;_idGenerator;instrumentationScope;_resource;_spanProcessor;_tracerMetrics;constructor(t,n,o,r){let i=(0,ELe.mergeConfig)(n);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=n.idGenerator||new TLe.RandomIdGenerator,this._resource=o,this._spanProcessor=r,this.instrumentationScope=t;let s=i.meterProvider?i.meterProvider.getMeter("@opentelemetry/sdk-trace",ALe.VERSION):fn.createNoopMeter();this._tracerMetrics=new SLe.TracerMetrics(s)}startSpan(t,n={},o=fn.context.active()){n.root&&(o=fn.trace.deleteSpan(o));let r=fn.trace.getSpan(o);if((0,SR.isTracingSuppressed)(o))return fn.diag.debug("Instrumentation suppressed, returning Noop Span"),fn.trace.wrapSpanContext(fn.INVALID_SPAN_CONTEXT);let i=r?.spanContext(),s=this._idGenerator.generateSpanId(),a,c,u;!i||!fn.trace.isSpanContextValid(i)?c=this._idGenerator.generateTraceId():(c=i.traceId,u=i.traceState,a=i);let d=n.kind??fn.SpanKind.INTERNAL,p=(n.links??[]).map(v=>({context:v.context,attributes:(0,SR.sanitizeAttributes)(v.attributes)})),f=(0,SR.sanitizeAttributes)(n.attributes),m=this._sampler.shouldSample(o,c,t,d,f,p),_=this._tracerMetrics.startSpan(i,m.decision);u=m.traceState??u;let h=m.decision===fn.SamplingDecision.RECORD_AND_SAMPLED?fn.TraceFlags.SAMPLED:fn.TraceFlags.NONE,T={traceId:c,spanId:s,traceFlags:h,traceState:u};if(m.decision===fn.SamplingDecision.NOT_RECORD)return fn.diag.debug("Recording is off, propagating context in a non-recording span"),fn.trace.wrapSpanContext(T);let S=(0,SR.sanitizeAttributes)(Object.assign(f,m.attributes));return new hLe.SpanImpl({resource:this._resource,scope:this.instrumentationScope,context:o,spanContext:T,name:t,kind:d,links:p,parentSpanContext:a,attributes:S,startTime:n.startTime,spanProcessor:this._spanProcessor,spanLimits:this._spanLimits,recordEndMetrics:_})}startActiveSpan(t,n,o,r){let i,s,a;if(arguments.length<2)return;arguments.length===2?a=n:arguments.length===3?(i=n,a=o):(i=n,s=o,a=r);let c=s??fn.context.active(),u=this.startSpan(t,i,c),d=fn.trace.setSpan(c,u);return fn.context.with(d,a,void 0,u)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}};AR.Tracer=OD});var lte=A(yR=>{"use strict";l();Object.defineProperty(yR,"__esModule",{value:!0});yR.MultiSpanProcessor=void 0;var yLe=rt(),CD=class{_spanProcessors;constructor(t){this._spanProcessors=t}forceFlush(){let t=[];for(let n of this._spanProcessors)t.push(n.forceFlush());return new Promise(n=>{Promise.all(t).then(()=>{n()}).catch(o=>{(0,yLe.globalErrorHandler)(o||new Error("MultiSpanProcessor: forceFlush failed")),n()})})}onStart(t,n){for(let o of this._spanProcessors)o.onStart(t,n)}onEnding(t){for(let n of this._spanProcessors)n.onEnding&&n.onEnding(t)}onEnd(t){for(let n of this._spanProcessors)n.onEnd(t)}shutdown(){let t=[];for(let n of this._spanProcessors)t.push(n.shutdown());return new Promise((n,o)=>{Promise.all(t).then(()=>{n()},o)})}};yR.MultiSpanProcessor=CD});var dte=A(cl=>{"use strict";l();Object.defineProperty(cl,"__esModule",{value:!0});cl.BasicTracerProvider=cl.ForceFlushState=void 0;var RLe=rt(),ILe=Fee(),bLe=ute(),NLe=SD(),OLe=lte(),CLe=AD(),Jp;(function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"})(Jp=cl.ForceFlushState||(cl.ForceFlushState={}));var vD=class{_config;_tracers=new Map;_resource;_activeSpanProcessor;constructor(t={}){let n=(0,RLe.merge)({},(0,NLe.loadDefaultConfig)(),(0,CLe.reconfigureLimits)(t));this._resource=n.resource??(0,ILe.defaultResource)(),this._config=Object.assign({},n,{resource:this._resource});let o=[];t.spanProcessors?.length&&o.push(...t.spanProcessors),this._activeSpanProcessor=new OLe.MultiSpanProcessor(o)}getTracer(t,n,o){let r=`${t}@${n||""}:${o?.schemaUrl||""}`;return this._tracers.has(r)||this._tracers.set(r,new bLe.Tracer({name:t,version:n,schemaUrl:o?.schemaUrl},this._config,this._resource,this._activeSpanProcessor)),this._tracers.get(r)}forceFlush(){let t=this._config.forceFlushTimeoutMillis,n=this._activeSpanProcessor._spanProcessors.map(o=>new Promise(r=>{let i,s=setTimeout(()=>{r(new Error(`Span processor did not completed within timeout period of ${t} ms`)),i=Jp.timeout},t);o.forceFlush().then(()=>{clearTimeout(s),i!==Jp.timeout&&(i=Jp.resolved,r(i))}).catch(a=>{clearTimeout(s),i=Jp.error,r(a)})}));return new Promise((o,r)=>{Promise.all(n).then(i=>{let s=i.filter(a=>a!==Jp.resolved);s.length>0?r(s):o()}).catch(i=>r([i]))})}shutdown(){return this._activeSpanProcessor.shutdown()}};cl.BasicTracerProvider=vD});var pte=A(RR=>{"use strict";l();Object.defineProperty(RR,"__esModule",{value:!0});RR.ConsoleSpanExporter=void 0;var PD=rt(),xD=class{export(t,n){return this._sendSpans(t,n)}shutdown(){return this._sendSpans([]),this.forceFlush()}forceFlush(){return Promise.resolve()}_exportInfo(t){return{resource:{attributes:t.resource.attributes},instrumentationScope:t.instrumentationScope,traceId:t.spanContext().traceId,parentSpanContext:t.parentSpanContext,traceState:t.spanContext().traceState?.serialize(),name:t.name,id:t.spanContext().spanId,kind:t.kind,timestamp:(0,PD.hrTimeToMicroseconds)(t.startTime),duration:(0,PD.hrTimeToMicroseconds)(t.duration),attributes:t.attributes,status:t.status,events:t.events,links:t.links}}_sendSpans(t,n){for(let o of t)console.dir(this._exportInfo(o),{depth:3});if(n)return n({code:PD.ExportResultCode.SUCCESS})}};RR.ConsoleSpanExporter=xD});var mte=A(IR=>{"use strict";l();Object.defineProperty(IR,"__esModule",{value:!0});IR.InMemorySpanExporter=void 0;var fte=rt(),MD=class{_finishedSpans=[];_stopped=!1;export(t,n){if(this._stopped)return n({code:fte.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedSpans.push(...t),setTimeout(()=>n({code:fte.ExportResultCode.SUCCESS}),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()}forceFlush(){return Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}};IR.InMemorySpanExporter=MD});var _te=A(NR=>{"use strict";l();Object.defineProperty(NR,"__esModule",{value:!0});NR.SimpleSpanProcessor=void 0;var vLe=K(),bR=rt(),LD=class{_exporter;_shutdownOnce;_pendingExports;constructor(t){this._exporter=t,this._shutdownOnce=new bR.BindOnceFuture(this._shutdown,this),this._pendingExports=new Set}async forceFlush(){await Promise.all(Array.from(this._pendingExports)),this._exporter.forceFlush&&await this._exporter.forceFlush()}onStart(t,n){}onEnd(t){if(this._shutdownOnce.isCalled||(t.spanContext().traceFlags&vLe.TraceFlags.SAMPLED)===0)return;let n=this._doExport(t).catch(o=>(0,bR.globalErrorHandler)(o));this._pendingExports.add(n),n.finally(()=>this._pendingExports.delete(n))}async _doExport(t){t.resource.asyncAttributesPending&&await t.resource.waitForAsyncAttributes?.();let n=await bR.internal._export(this._exporter,[t]);if(n.code!==bR.ExportResultCode.SUCCESS)throw n.error??new Error(`SimpleSpanProcessor: span export failed (status ${n})`)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}};NR.SimpleSpanProcessor=LD});var gte=A(OR=>{"use strict";l();Object.defineProperty(OR,"__esModule",{value:!0});OR.NoopSpanProcessor=void 0;var wD=class{onStart(t,n){}onEnd(t){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}};OR.NoopSpanProcessor=wD});var DD=A(_t=>{"use strict";l();Object.defineProperty(_t,"__esModule",{value:!0});_t.SamplingDecision=_t.TraceIdRatioBasedSampler=_t.ParentBasedSampler=_t.AlwaysOnSampler=_t.AlwaysOffSampler=_t.NoopSpanProcessor=_t.SimpleSpanProcessor=_t.InMemorySpanExporter=_t.ConsoleSpanExporter=_t.RandomIdGenerator=_t.BatchSpanProcessor=_t.BasicTracerProvider=void 0;var PLe=dte();Object.defineProperty(_t,"BasicTracerProvider",{enumerable:!0,get:function(){return PLe.BasicTracerProvider}});var hte=bD();Object.defineProperty(_t,"BatchSpanProcessor",{enumerable:!0,get:function(){return hte.BatchSpanProcessor}});Object.defineProperty(_t,"RandomIdGenerator",{enumerable:!0,get:function(){return hte.RandomIdGenerator}});var xLe=pte();Object.defineProperty(_t,"ConsoleSpanExporter",{enumerable:!0,get:function(){return xLe.ConsoleSpanExporter}});var MLe=mte();Object.defineProperty(_t,"InMemorySpanExporter",{enumerable:!0,get:function(){return MLe.InMemorySpanExporter}});var LLe=_te();Object.defineProperty(_t,"SimpleSpanProcessor",{enumerable:!0,get:function(){return LLe.SimpleSpanProcessor}});var wLe=gte();Object.defineProperty(_t,"NoopSpanProcessor",{enumerable:!0,get:function(){return wLe.NoopSpanProcessor}});var DLe=oR();Object.defineProperty(_t,"AlwaysOffSampler",{enumerable:!0,get:function(){return DLe.AlwaysOffSampler}});var kLe=sR();Object.defineProperty(_t,"AlwaysOnSampler",{enumerable:!0,get:function(){return kLe.AlwaysOnSampler}});var ULe=_D();Object.defineProperty(_t,"ParentBasedSampler",{enumerable:!0,get:function(){return ULe.ParentBasedSampler}});var $Le=hD();Object.defineProperty(_t,"TraceIdRatioBasedSampler",{enumerable:!0,get:function(){return $Le.TraceIdRatioBasedSampler}});var BLe=qp();Object.defineProperty(_t,"SamplingDecision",{enumerable:!0,get:function(){return BLe.SamplingDecision}})});function YD(e){if("parentSpanId"in e)return e.parentSpanId;if("parentSpanContext"in e)return e.parentSpanContext?.spanId}function vR(e){let t=e;return!!t.attributes&&typeof t.attributes=="object"}function Ate(e){return typeof e.kind=="number"}function yte(e){return!!e.status}function WD(e){return!!e.name}function Rte(e){if(!vR(e))return{};let t=e.attributes[fe.ATTR_URL_FULL]||e.attributes[fe.SEMATTRS_HTTP_URL],n={url:t,"http.method":e.attributes[fe.ATTR_HTTP_REQUEST_METHOD]||e.attributes[fe.SEMATTRS_HTTP_METHOD]};!n["http.method"]&&n.url&&(n["http.method"]="GET");try{if(typeof t=="string"){let o=Bi(t);n.url=Gi(o),o.search&&(n["http.query"]=o.search),o.hash&&(n["http.fragment"]=o.hash)}}catch{}return n}function Ite(e){return Ate(e)?e.kind:re.SpanKind.INTERNAL}function ll(e){return e.getValue(PR)}function vte(e,t){return e.setValue(PR,t)}function VLe(e,t){Ft(e,Cte,S_(t))}function Zg(e){return A_(e[Cte])}function Xp(e){let{traceFlags:t,traceState:n}=e,o=n?n.get(ZD)==="1":!1;if(t===re.TraceFlags.SAMPLED)return!0;if(o)return!1;let r=n?n.get(KD):void 0,i=r?ei(r):void 0;if(i?.sampled==="true")return!0;if(i?.sampled==="false")return!1}function GD(e,t,n){let o=t[fe.ATTR_HTTP_REQUEST_METHOD]||t[fe.SEMATTRS_HTTP_METHOD];if(o)return HLe({attributes:t,name:e,kind:n},o);let r=t[fe.ATTR_DB_SYSTEM_NAME]||t[fe.SEMATTRS_DB_SYSTEM],i=typeof t[oe]=="string"&&t[oe].startsWith("cache.");if(r&&!i)return FLe({attributes:t,name:e});let s=t[$e]==="custom"?"custom":"route";if(t[fe.SEMATTRS_RPC_SERVICE])return{...Kg(e,t,"route"),op:"rpc"};if(t[fe.SEMATTRS_MESSAGING_SYSTEM])return{...Kg(e,t,s),op:"message"};let u=t[fe.SEMATTRS_FAAS_TRIGGER];return u?{...Kg(e,t,s),op:u.toString()}:{op:void 0,description:e,source:"custom"}}function Pte(e){let t=vR(e)?e.attributes:{},n=WD(e)?e.name:"<unknown>",o=Ite(e);return GD(n,t,o)}function FLe({attributes:e,name:t}){let n=e[tr];if(typeof n=="string")return{op:"db",description:n,source:e[$e]||"custom"};if(e[$e]==="custom")return{op:"db",description:t,source:"custom"};let o=e[fe.SEMATTRS_DB_STATEMENT];return{op:"db",description:o?o.toString():t,source:"task"}}function HLe({name:e,kind:t,attributes:n},o){let r=["http"];switch(t){case re.SpanKind.CLIENT:r.push("client");break;case re.SpanKind.SERVER:r.push("server");break}n["sentry.http.prefetch"]&&r.push("prefetch");let{urlPath:i,url:s,query:a,fragment:c,hasRoute:u}=qLe(n,t);if(!i)return{...Kg(e,n),op:r.join(".")};let d=n[ul],p=`${o} ${i}`,f=d?`${p} (${zLe(d)})`:p,m=u||i==="/"?"route":"url",_={};s&&(_.url=s),a&&(_["http.query"]=a),c&&(_["http.fragment"]=c);let h=t===re.SpanKind.CLIENT||t===re.SpanKind.SERVER,S=!`${n[te]||"manual"}`.startsWith("auto"),y=n[$e]==="custom",v=n[tr],x=!y&&v==null&&(h||!S),{description:P,source:N}=x?{description:f,source:m}:Kg(e,n);return{op:r.join("."),description:P,source:N,data:_}}function zLe(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}`}function qLe(e,t){let n=e[fe.SEMATTRS_HTTP_TARGET],o=e[fe.SEMATTRS_HTTP_URL]||e[fe.ATTR_URL_FULL],r=e[fe.ATTR_HTTP_ROUTE],i=typeof o=="string"?Bi(o):void 0,s=i?Gi(i):void 0,a=i?.search||void 0,c=i?.hash||void 0;return typeof r=="string"?{urlPath:r,url:s,query:a,fragment:c,hasRoute:!0}:t===re.SpanKind.SERVER&&typeof n=="string"?{urlPath:Ao(n),url:s,query:a,fragment:c,hasRoute:!1}:i?{urlPath:s,url:s,query:a,fragment:c,hasRoute:!1}:typeof n=="string"?{urlPath:Ao(n),url:s,query:a,fragment:c,hasRoute:!1}:{urlPath:void 0,url:s,query:a,fragment:c,hasRoute:!1}}function Kg(e,t,n="custom"){let o=t[$e]||n,r=t[tr];return r&&typeof r=="string"?{description:r,source:o}:{description:e,source:o}}function JD(e){e.on("createDsc",(t,n)=>{if(!n)return;let i=_e(n).data[$e],{description:s}=WD(n)?Pte(n):{description:void 0};if(i!=="url"&&s&&(t.transaction=s),At()){let a=Xp(n.spanContext());t.sampled=a==null?void 0:String(a)}})}function XD(){return re.trace.getActiveSpan()}function xte({dsc:e,sampled:t}){let n=e?Eu(e):void 0,o=new rn.TraceState,r=n?o.set(KD,n):o;return t===!1?r.set(ZD,"1"):r}function QD(){return Array.from(Mte)}function eh(e){Mte.add(e)}function Lte(e,t={}){let n=re.trace.getSpan(e);if(n?.spanContext().isRemote){let a=n.spanContext();return{dynamicSamplingContext:Nt(n),traceId:a.traceId,spanId:void 0,sampled:Xp(a)}}if(n){let a=n.spanContext();return{dynamicSamplingContext:Nt(n),traceId:a.traceId,spanId:a.spanId,sampled:Xp(a)}}let o=t.scope||ll(e)?.scope||Pe(),r=t.client||Z(),i=o.getPropagationContext();return{dynamicSamplingContext:r?wi(r,o):void 0,traceId:i.traceId,spanId:i.propagationSpanId,sampled:i.sampled}}function wte(e,{sentryTrace:t,baggage:n}){let o=Su(t,n),{traceId:r,parentSpanId:i,sampled:s,dsc:a}=o,c=Z(),u=ei(n);if(!i||c&&!R_(c,u?.org_id))return e;let d=JLe({traceId:r,spanId:i,sampled:s,dsc:a});return re.trace.setSpanContext(e,d)}function YLe(e,t,n){let o=Dte(wte(e,t));return re.context.with(o,n)}function Dte(e){let t=ll(e),n={scope:t?t.scope:Pe().clone(),isolationScope:t?t.isolationScope:Te()};return vte(e,n)}function WLe(e){try{let t=e[kD];return Array.isArray(t)?t.join(","):t}catch{return}}function KLe(e){try{return e[CR]}catch{return}}function ZLe(e){let t=_e(e).data,n=t[fe.SEMATTRS_HTTP_URL]||t[fe.ATTR_URL_FULL];if(typeof n=="string")return n;let o=e.spanContext().traceState?.get(bte);if(o)return o}function JLe({spanId:e,traceId:t,sampled:n,dsc:o}){let r=xte({dsc:o,sampled:n});return{traceId:t,spanId:e,isRemote:!0,traceFlags:n?re.TraceFlags.SAMPLED:re.TraceFlags.NONE,traceState:r}}function kte(e,t,n){let o=Gte(),{name:r,parentSpan:i}=e;return zte(i)(()=>{let a=Fte(e.scope,e.forceTransaction),c=e.onlyIfParent&&!re.trace.getSpan(a),u=c?(0,rn.suppressTracing)(a):a;c&&Z()?.recordDroppedEvent("no_parent_span","span");let d=jte(e);if(!At()){let p=(0,rn.isTracingSuppressed)(u)?u:(0,rn.suppressTracing)(u);return re.context.with(p,()=>o.startActiveSpan(r,d,p,f=>(jD(f),re.context.with(a,()=>ri(()=>t(f),()=>{_e(f).status===void 0&&f.setStatus({code:re.SpanStatusCode.ERROR})},n?()=>f.end():void 0)))))}return o.startActiveSpan(r,d,u,p=>(jD(p),ri(()=>t(p),()=>{_e(p).status===void 0&&p.setStatus({code:re.SpanStatusCode.ERROR})},n?()=>p.end():void 0)))})}function Ute(e,t){return kte(e,t,!0)}function $te(e,t){return kte(e,n=>t(n,()=>n.end()),!1)}function Bte(e){let t=Gte(),{name:n,parentSpan:o}=e;return zte(o)(()=>{let i=Fte(e.scope,e.forceTransaction),s=e.onlyIfParent&&!re.trace.getSpan(i),a=s?(0,rn.suppressTracing)(i):i;s&&Z()?.recordDroppedEvent("no_parent_span","span");let c=jte(e);At()||(a=(0,rn.isTracingSuppressed)(a)?a:(0,rn.suppressTracing)(a));let u=t.startSpan(n,c,a);return jD(u),u})}function ek(e,t){let n=e?re.trace.setSpan(re.context.active(),e):re.trace.deleteSpan(re.context.active());return re.context.with(n,()=>t(Pe()))}function Gte(){return Z()?.tracer||re.trace.getTracer("@sentry/opentelemetry",ve)}function jte(e){let{startTime:t,attributes:n,kind:o,op:r,links:i}=e,s=typeof t=="number"?Vte(t):t;return{attributes:r?{[oe]:r,...n}:n,kind:o,links:i,startTime:s}}function Vte(e){return e<9999999999?e*1e3:e}function jD(e){let t=e.end.bind(e);e.end=n=>t(typeof n=="number"?Vte(n):n)}function Fte(e,t){let n=XLe(e),o=re.trace.getSpan(n);if(!o||!t)return n;let r=re.trace.deleteSpan(n),{spanId:i,traceId:s}=o.spanContext(),a=Xp(o.spanContext()),c=Et(o),u=Nt(c),d=xte({dsc:u,sampled:a}),p={traceId:s,spanId:i,isRemote:!0,traceFlags:a?re.TraceFlags.SAMPLED:re.TraceFlags.NONE,traceState:d};return re.trace.setSpanContext(r,p)}function XLe(e){if(e){let t=Zg(e);if(t)return t}return re.context.active()}function Hte(e,t){return YLe(re.context.active(),e,t)}function QLe(e){let t=ln(),n=Un(),o={traceId:t,spanId:n,isRemote:!0,traceFlags:re.TraceFlags.NONE},r=re.trace.setSpanContext(re.context.active(),o);return re.context.with(r,()=>(Pe().setPropagationContext({traceId:t,sampleRand:Ht()}),e()))}function tk(e,t){let n=Zg(t),o=n&&re.trace.getSpan(n),r=o?$a(o):_u(t);return[o?Nt(o):wi(e,t),r]}function zte(e){return e!==void 0?t=>ek(e,t):t=>t()}function qte(e){let t=(0,rn.suppressTracing)(re.context.active());return re.context.with(t,e)}function nk(e){e.on("preprocessEvent",t=>{let n=XD();if(!n||t.type==="transaction")return;t.contexts={trace:$a(n),...t.contexts};let o=Et(n);return t.sdkProcessingMetadata={dynamicSamplingContext:Nt(o),...t.sdkProcessingMetadata},t})}function ewe({span:e,scope:t,client:n,propagateTraceparent:o}={}){let r=(t&&Zg(t))??Dr.context.active();if(e){let{scope:d}=Wr(e);r=d&&Zg(d)||Dr.trace.setSpan(Dr.context.active(),e)}let{traceId:i,spanId:s,sampled:a,dynamicSamplingContext:c}=Lte(r,{scope:t,client:n}),u={"sentry-trace":ka(i,s,a),baggage:Eu(c)};return o&&(u.traceparent=Ua(i,s,a)),u}function rk(){function e(){let a=Dr.context.active(),c=ll(a);return c||{scope:yd(),isolationScope:go()}}function t(a){let c=Dr.context.active();return Dr.context.with(c,()=>a(i()))}function n(a,c){let u=Zg(a)||Dr.context.active();return Dr.context.with(u.setValue($D,a),()=>c(a))}function o(a){let c=Dr.context.active();return Dr.context.with(c.setValue(UD,!0),()=>a(s()))}function r(a,c){let u=Dr.context.active();return Dr.context.with(u.setValue(BD,a),()=>c(s()))}function i(){return e().scope}function s(){return e().isolationScope}SP({withScope:t,withSetScope:n,withSetIsolationScope:r,withIsolationScope:o,getCurrentScope:i,getIsolationScope:s,startSpan:Ute,startSpanManual:$te,startInactiveSpan:Bte,getActiveSpan:XD,suppressTracing:qte,getTraceData:ewe,continueTrace:Hte,startNewTrace:QLe,withActiveSpan:ek})}function Yte(e,t){let n=re.trace.getSpan(e),o;if(n?.spanContext().traceState?.get(Nte)==="1"){let h=re.trace.deleteSpan(e),T=re.trace.getSpan(t);o=T?re.trace.setSpan(h,T):h}else o=e;let r=ll(o),i=r?.scope||Pe(),s=r?.isolationScope||Te(),a=o.getValue(UD)===!0,c=o.getValue($D),u=o.getValue(BD),d=c||i.clone(),p=u||(a?s.clone():s),_=vte(o,{scope:d,isolationScope:p}).deleteValue(UD).deleteValue($D).deleteValue(BD);return VLe(d,_),_}function twe(e){let t=new Map;for(let n of e)nwe(t,n);return Array.from(t,function([n,o]){return o})}function Wte(e){return e.attributes[qD]===!0?void 0:YD(e)}function nwe(e,t){let n=t.spanContext().spanId,o=Wte(t);if(!o){VD(e,{id:n,span:t,children:[]});return}let r=rwe(e,o),i=VD(e,{id:n,span:t,parentNode:r,children:[]});r.children.push(i)}function rwe(e,t){let n=e.get(t);return n||VD(e,{id:t,children:[]})}function VD(e,t){let n=e.get(t.id);return n?.span?n:n&&!n.span?(n.span=t.span,n.parentNode=t.parentNode,n):(e.set(t.id,t),t)}function Zte(e){let t=vR(e)?e.attributes:{},n=yte(e)?e.status:void 0;if(n){if(n.code===re.SpanStatusCode.OK)return{code:1};if(n.code===re.SpanStatusCode.ERROR){if(typeof n.message>"u"){let r=Ete(t);if(r)return r}return n.message&&owe(n.message)?{code:2,message:n.message}:{code:2,message:"internal_error"}}}let o=Ete(t);return o||(n?.code===re.SpanStatusCode.UNSET?{code:1}:{code:2,message:"unknown_error"})}function Ete(e){let t=e[fe.ATTR_HTTP_RESPONSE_STATUS_CODE]||e[fe.SEMATTRS_HTTP_STATUS_CODE],n=e[fe.SEMATTRS_RPC_GRPC_STATUS_CODE],o=typeof t=="number"?t:typeof t=="string"?parseInt(t):void 0;if(typeof o=="number")return Eo(o);if(typeof n=="string")return{code:2,message:Kte[n]||"unknown_error"}}function iwe(e){let t=e.attributes,n=t[te],o=t[oe],r=t[$e];return{origin:n,op:o,source:r}}function swe(e){let{op:t,description:n,data:o,origin:r="manual",source:i}=Jte(e),s=Wr(e),a=e.attributes[Yr],c={[$e]:i,[Yr]:a,[oe]:t,[te]:r,...o,...Xte(e.attributes)},{links:u}=e,{traceId:d,spanId:p}=e.spanContext(),f=YD(e),m=Zte(e),_={parent_span_id:f,span_id:p,trace_id:d,data:c,origin:r,op:t,status:yu(m),links:Au(u)},h=c[fe.ATTR_HTTP_RESPONSE_STATUS_CODE],T=typeof h=="number"?{response:{status_code:h}}:void 0;return{contexts:{trace:_,otel:{resource:e.resource.attributes},...T},spans:[],start_timestamp:Bn(e.startTime),timestamp:Bn(e.endTime),transaction:n,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:s.scope,capturedSpanIsolationScope:s.isolationScope,sampleRate:a,dynamicSamplingContext:Nt(e)},...i&&{transaction_info:{source:i}}}}function HD(e,t,n){let o=e.span;if(o&&n.add(o),!o){e.children.forEach(v=>{HD(v,t,n)});return}let i=o.spanContext().spanId,s=o.spanContext().traceId,a=YD(o),{attributes:c,startTime:u,endTime:d,links:p}=o,{op:f,description:m,data:_,origin:h="manual"}=Jte(o),T={[te]:h,[oe]:f,...Xte(c),..._},S=Zte(o),y={span_id:i,trace_id:s,data:T,description:m,parent_span_id:a,start_timestamp:Bn(u),timestamp:Bn(d)||void 0,status:yu(S),op:f,origin:h,measurements:Iu(o.events),links:Au(p)};t.push(y),e.children.forEach(v=>{HD(v,t,n)})}function Jte(e){let{op:t,source:n,origin:o}=iwe(e),{op:r,description:i,source:s,data:a}=Pte(e),c=t||r,u=n||s,d={...a,...awe(e)};return{op:c,description:i,source:u,origin:o,data:d}}function Xte(e){let t={...e};return delete t[Yr],delete t[qD],delete t[tr],t}function awe(e){let t=e.attributes,n={};e.kind!==re.SpanKind.INTERNAL&&(n["otel.kind"]=re.SpanKind[e.kind]);let o=t[fe.SEMATTRS_HTTP_STATUS_CODE];o&&(n[fe.ATTR_HTTP_RESPONSE_STATUS_CODE]=o);let r=Rte(e);return r.url&&(n.url=r.url),r["http.query"]&&(n["http.query"]=r["http.query"].slice(1)),r["http.fragment"]&&(n["http.fragment"]=r["http.fragment"].slice(1)),n}function cwe(e,t,n){let o=e.spanContext();if((0,re.isSpanContextValid)(o)&&o.traceId===t){if(o.isRemote){let i=Xp(e.spanContext());return di&&b.log(`[Tracing] Inheriting remote parent's sampled decision for ${n}: ${i}`),i}let r=Xp(o);return di&&b.log(`[Tracing] Inheriting parent's sampled decision for ${n}: ${r}`),r}}function oa({decision:e,context:t,spanAttributes:n,sampleRand:o,downstreamTraceSampleRate:r,ignoredChildSpan:i,ignoredSegmentSpan:s}){let a=uwe(t,n);return r!==void 0&&(a=a.set(jLe,`${r}`)),o!==void 0&&(a=a.set(GLe,`${o}`)),i&&(a=a.set(Nte,"1")),s&&(a=a.set(Ote,"1")),e==null?{decision:is.SamplingDecision.NOT_RECORD,traceState:a}:e===is.SamplingDecision.NOT_RECORD?{decision:e,traceState:a.set(ZD,"1")}:{decision:e,traceState:a}}function uwe(e,t){let r=re.trace.getSpan(e)?.spanContext()?.traceState||new rn.TraceState,i=t[fe.SEMATTRS_HTTP_URL]||t[fe.ATTR_URL_FULL];return i&&typeof i=="string"&&(r=r.set(bte,i)),r}function lwe(e){let t=re.trace.getSpan(e);return t&&(0,re.isSpanContextValid)(t.spanContext())?t:void 0}function dwe(e){if(!e)return{};let t={};for(let n of e.split(",")){let o=n.indexOf("=");if(o===-1)continue;let r=n.substring(0,o).trim(),i=n.substring(o+1).trim();if(r)try{t[r]=decodeURIComponent(i)}catch{t[r]=i}}return t}function ok(e){let t=typeof process<"u"?process.env:{},n=t.OTEL_SERVICE_NAME,o=dwe(t.OTEL_RESOURCE_ATTRIBUTES);return new zD({[fe.SEMRESATTRS_SERVICE_NAMESPACE]:"sentry",[fe.ATTR_SERVICE_NAME]:e,...o,...n?{[fe.ATTR_SERVICE_NAME]:n}:{},[fe.ATTR_SERVICE_VERSION]:ve,[fe.ATTR_TELEMETRY_SDK_LANGUAGE]:rn.SDK_INFO[fe.ATTR_TELEMETRY_SDK_LANGUAGE],[fe.ATTR_TELEMETRY_SDK_NAME]:rn.SDK_INFO[fe.ATTR_TELEMETRY_SDK_NAME],[fe.ATTR_TELEMETRY_SDK_VERSION]:rn.SDK_INFO[fe.ATTR_TELEMETRY_SDK_VERSION]})}var Dr,re,fe,rn,is,qD,ul,CR,kD,KD,ZD,bte,GLe,jLe,Nte,Ote,PR,UD,$D,BD,Cte,Mte,Jg,Kte,owe,Tte,Ste,FD,Xg,Qg,zD,ik=E(()=>{l();Dr=U(K(),1),re=U(K(),1);ne();fe=U(Qe(),1),rn=U(rt(),1);Zw();is=U(DD(),1),qD="sentry.parentIsRemote",ul="sentry.graphql.operation";CR="sentry-trace",kD="baggage",KD="sentry.dsc",ZD="sentry.sampled_not_recording",bte="sentry.url",GLe="sentry.sample_rand",jLe="sentry.sample_rate",Nte="sentry.ignored",Ote="sentry.segment_ignored",PR=(0,re.createContextKey)("sentry_scopes"),UD=(0,re.createContextKey)("sentry_fork_isolation_scope"),$D=(0,re.createContextKey)("sentry_fork_set_scope"),BD=(0,re.createContextKey)("sentry_fork_set_isolation_scope"),Cte="_scopeContext";Mte=new Set;Jg=class extends rn.W3CBaggagePropagator{constructor(){super(),eh("SentryPropagator"),this._urlMatchesTargetsMap=new Nr(100)}inject(t,n,o){if((0,rn.isTracingSuppressed)(t)){di&&b.log("[Tracing] Not injecting trace data for url because tracing is suppressed.");return}let r=re.trace.getSpan(t),i=r&&ZLe(r),{tracePropagationTargets:s,propagateTraceparent:a}=Z()?.getOptions()||{};if(!Lu(i,s,this._urlMatchesTargetsMap)){di&&b.log("[Tracing] Not injecting trace data for url because it does not match tracePropagationTargets:",i);return}let c=WLe(n),u=KLe(n),d=re.propagation.getBaggage(t)||re.propagation.createBaggage({}),{dynamicSamplingContext:p,traceId:f,spanId:m,sampled:_}=Lte(t);if(c){let h=vd(c);h&&Object.entries(h).forEach(([T,S])=>{!u&&T.startsWith(Vs)||(d=d.setEntry(T,{value:S}))})}!u&&p&&(d=Object.entries(p).reduce((h,[T,S])=>S?h.setEntry(`${Vs}${T}`,{value:S}):h,d)),!u&&f&&f!==re.INVALID_TRACEID&&(o.set(n,CR,ka(f,m,_)),a&&o.set(n,"traceparent",Ua(f,m,_))),super.inject(re.propagation.setBaggage(t,d),n,o)}extract(t,n,o){let r=o.get(n,CR),i=o.get(n,kD),s=r?Array.isArray(r)?r[0]:r:void 0;return Dte(wte(t,{sentryTrace:s,baggage:i}))}fields(){return[CR,kD,"traceparent"]}};Kte={1:"cancelled",2:"unknown_error",3:"invalid_argument",4:"deadline_exceeded",5:"not_found",6:"already_exists",7:"permission_denied",8:"resource_exhausted",9:"failed_precondition",10:"aborted",11:"out_of_range",12:"unimplemented",13:"internal_error",14:"unavailable",15:"data_loss",16:"unauthenticated"},owe=e=>Object.values(Kte).includes(e);Tte=1e3,Ste=300,FD=class{constructor(t){this._finishedSpanBucketSize=t?.timeout||Ste,this._finishedSpanBuckets=new Array(this._finishedSpanBucketSize).fill(void 0),this._lastCleanupTimestampInS=Math.floor(mo()/1e3),this._spansToBucketEntry=new WeakMap,this._sentSpans=new Map,this._debouncedFlush=kx(this.flush.bind(this),1,{maxWait:100})}export(t){let n=Math.floor(mo()/1e3);if(this._lastCleanupTimestampInS!==n){let s=0;this._finishedSpanBuckets.forEach((a,c)=>{a&&a.timestampInS<=n-this._finishedSpanBucketSize&&(s+=a.spans.size,this._finishedSpanBuckets[c]=void 0)}),s>0&&di&&b.log(`SpanExporter dropped ${s} spans because they were pending for more than ${this._finishedSpanBucketSize} seconds.`),this._lastCleanupTimestampInS=n}let o=n%this._finishedSpanBucketSize,r=this._finishedSpanBuckets[o]||{timestampInS:n,spans:new Set};this._finishedSpanBuckets[o]=r,r.spans.add(t),this._spansToBucketEntry.set(t,r);let i=Wte(t);(!i||this._sentSpans.has(i))&&this._debouncedFlush()}flush(){let t=this._finishedSpanBuckets.flatMap(s=>s?Array.from(s.spans):[]);this._flushSentSpanCache();let n=this._maybeSend(t),o=n.size,r=t.length-o;di&&b.log(`SpanExporter exported ${o} spans, ${r} spans are waiting for their parent spans to finish`);let i=mo()+Ste*1e3;for(let s of n){this._sentSpans.set(s.spanContext().spanId,i);let a=this._spansToBucketEntry.get(s);a&&a.spans.delete(s)}this._debouncedFlush.cancel()}clear(){this._finishedSpanBuckets=this._finishedSpanBuckets.fill(void 0),this._sentSpans.clear(),this._debouncedFlush.cancel()}_maybeSend(t){let n=twe(t),o=new Set,r=this._getCompletedRootNodes(n);for(let i of r){let s=i.span;o.add(s);let a=swe(s);if(i.parentNode&&this._sentSpans.has(i.parentNode.id)){let d=a.contexts?.trace?.data;d&&(d["sentry.parent_span_already_sent"]=!0)}let c=a.spans||[];for(let d of i.children)HD(d,c,o);a.spans=c.length>Tte?c.sort((d,p)=>d.start_timestamp-p.start_timestamp).slice(0,Tte):c;let u=Iu(s.events);u&&(a.measurements=u),qd(a)}return o}_flushSentSpanCache(){let t=mo();for(let[n,o]of this._sentSpans.entries())o<=t&&this._sentSpans.delete(n)}_nodeIsCompletedRootNodeOrHasSentParent(t){return!!t.span&&(!t.parentNode||this._sentSpans.has(t.parentNode.id))}_getCompletedRootNodes(t){return t.filter(n=>this._nodeIsCompletedRootNodeOrHasSentParent(n))}};Xg=class{constructor(t){eh("SentrySpanProcessor"),this._exporter=new FD(t)}async forceFlush(){this._exporter.flush()}async shutdown(){this._exporter.clear()}onStart(t,n){let o=re.trace.getSpan(n),r=ll(n);o&&!o.spanContext().isRemote&&wd(o,t),o?.spanContext().isRemote&&t.setAttribute(qD,!0),n===re.ROOT_CONTEXT&&(r={scope:yd(),isolationScope:go()}),r&&y_(t,r.scope,r.isolationScope),M_(t),Z()?.emit("spanStart",t)}onEnd(t){L_(t);let n=Z();n?.emit("spanEnd",t),n&&jn(n)?n.emit("afterSpanEnd",t):this._exporter.export(t)}},Qg=class{constructor(t){this._client=t,this._isSpanStreaming=jn(t),eh("SentrySampler")}shouldSample(t,n,o,r,i,s){let a=this._client.getOptions(),{ignoreSpans:c}=a,u=lwe(t),d=u?.spanContext();if(!At(a))return oa({decision:void 0,context:t,spanAttributes:i});let p=i[fe.SEMATTRS_HTTP_METHOD]||i[fe.ATTR_HTTP_REQUEST_METHOD];if(r===re.SpanKind.CLIENT&&p&&(!u||d?.isRemote)&&!this._isSpanStreaming)return this._client.recordDroppedEvent("no_parent_span","span"),oa({decision:void 0,context:t,spanAttributes:i});let f=u?cwe(u,n,o):void 0;if(!(!u||d?.isRemote)){if(this._isSpanStreaming){if(f&&c?.length){let{description:Q,op:J}=GD(o,i,r);if(ti({description:Q,op:i[oe]??J,attributes:i},c))return this._client.recordDroppedEvent("ignored","span"),oa({decision:is.SamplingDecision.NOT_RECORD,context:t,spanAttributes:i,ignoredChildSpan:!0})}if(!f){let Q=d?.traceState?.get(Ote)==="1";this._client.recordDroppedEvent(Q?"ignored":"sample_rate","span")}}return oa({decision:f?is.SamplingDecision.RECORD_AND_SAMPLED:is.SamplingDecision.NOT_RECORD,context:t,spanAttributes:i})}let{description:_,data:h,op:T}=GD(o,i,r),S={...h,...i};if(T&&(S[oe]=T),this._isSpanStreaming&&c?.length&&ti({description:_,op:S[oe]??T,attributes:S},c))return this._client.recordDroppedEvent("ignored","span"),oa({decision:is.SamplingDecision.NOT_RECORD,context:t,spanAttributes:i,ignoredSegmentSpan:!0});let y={decision:!0};if(this._client.emit("beforeSampling",{spanAttributes:S,spanName:_,parentSampled:f,parentContext:d},y),!y.decision)return oa({decision:void 0,context:t,spanAttributes:i});let{isolationScope:v}=ll(t)??{},x=d?.traceState?d.traceState.get(KD):void 0,P=x?ei(x):void 0,N=Kr(P?.sample_rand)??Ht(),[F,se,$]=w_(a,{name:_,attributes:S,normalizedRequest:v?.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampled:f,parentSampleRate:Kr(P?.sample_rate)},N),G=`${p}`.toUpperCase();return G==="OPTIONS"||G==="HEAD"?(di&&b.log(`[Tracing] Not sampling span because HTTP method is '${G}' for ${o}`),oa({decision:is.SamplingDecision.NOT_RECORD,context:t,spanAttributes:i,sampleRand:N,downstreamTraceSampleRate:0})):(!F&&f===void 0&&(di&&b.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),this._client.recordDroppedEvent("sample_rate",this._isSpanStreaming?"span":"transaction")),{...oa({decision:F?is.SamplingDecision.RECORD_AND_SAMPLED:is.SamplingDecision.NOT_RECORD,context:t,spanAttributes:i,sampleRand:N,downstreamTraceSampleRate:$?se:void 0}),attributes:{[Yr]:$?se:void 0}})}toString(){return"SentrySampler"}};zD=class e{constructor(t){this._attributes=t}get attributes(){return this._attributes}merge(t){return t?new e({...this._attributes,...t.attributes}):this}getRawAttributes(){return Object.entries(this._attributes)}}});var Qte,ene,tne,pwe,xR,Qp=E(()=>{l();ik();ik();Qte=U(K(),1),ene=require("node:async_hooks"),tne=require("node:events"),pwe=["addListener","on","once","prependListener","prependOnceListener"],xR=class e{__init(){this._asyncLocalStorage=new ene.AsyncLocalStorage}__init2(){this._kOtListeners=Symbol("OtListeners")}__init3(){this._wrapped=!1}constructor(){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),eh("SentryContextManager")}active(){return this._asyncLocalStorage.getStore()??Qte.ROOT_CONTEXT}with(t,n,o,...r){let i=Yte(t,this.active()),s=o==null?n:n.bind(o);return this._asyncLocalStorage.run(i,s,...r)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}bind(t,n){return n instanceof tne.EventEmitter?this._bindEventEmitter(t,n):typeof n=="function"?this._bindFunction(t,n):n}getAsyncLocalStorageLookup(){return{asyncLocalStorage:this._asyncLocalStorage,contextSymbol:PR}}_bindFunction(t,n){let o=this.with.bind(this),r=function(...i){return o(t,()=>n.apply(this,i))};return Object.defineProperty(r,"length",{enumerable:!1,configurable:!0,writable:!1,value:n.length}),r}_bindEventEmitter(t,n){if(this._getPatchMap(n)!==void 0)return n;this._createPatchMap(n);for(let o of pwe)n[o]!==void 0&&(n[o]=this._patchAddListener(n,n[o],t));return typeof n.removeListener=="function"&&(n.removeListener=this._patchRemoveListener(n,n.removeListener)),typeof n.off=="function"&&(n.off=this._patchRemoveListener(n,n.off)),typeof n.removeAllListeners=="function"&&(n.removeAllListeners=this._patchRemoveAllListeners(n,n.removeAllListeners)),n}_patchRemoveListener(t,n){let o=this;return function(r,i){let s=o._getPatchMap(t)?.[r];if(s===void 0)return n.call(this,r,i);let a=s.get(i);return n.call(this,r,a||i)}}_patchRemoveAllListeners(t,n){let o=this;return function(r){let i=o._getPatchMap(t);return i!==void 0&&(arguments.length===0?o._createPatchMap(t):r!==void 0&&i[r]!==void 0&&delete i[r]),n.apply(this,arguments)}}_patchAddListener(t,n,o){let r=this;return function(i,s){if(r._wrapped)return n.call(this,i,s);let a=r._getPatchMap(t);a===void 0&&(a=r._createPatchMap(t));let c=a[i];c===void 0&&(c=new WeakMap,a[i]=c);let u=r.bind(o,s);c.set(s,u),r._wrapped=!0;try{return n.call(this,i,u)}finally{r._wrapped=!1}}}_createPatchMap(t){let n=Object.create(null);return t[this._kOtListeners]=n,n}_getPatchMap(t){return t[this._kOtListeners]}}});var MR,nne=E(()=>{l();Qp();MR=xR});function sk(){th.diag.disable(),th.diag.setLogger({error:b.error,warn:b.warn,info:b.log,debug:b.log,verbose:b.log},th.DiagLogLevel.DEBUG)}var th,rne=E(()=>{l();th=U(K(),1);ne()});function mwe(e,t){let n=!1,o;e.on("spawn",()=>{if(e.spawnfile==="/usr/bin/sw_vers"){n=!0;return}o={spawnfile:e.spawnfile},t.includeChildProcessArgs&&(o.spawnargs=e.spawnargs)}).on("exit",r=>{n||(n=!0,r!==null&&r!==0&&br({category:"child_process",message:`Child process exited with code '${r}'`,level:r===0?"info":"warning",data:o}))}).on("error",r=>{n||(n=!0,br({category:"child_process",message:`Child process errored with '${r.message}'`,level:"error",data:o}))})}function _we(e,t){let n;e.on("online",()=>{n=e.threadId}).on("error",o=>{t.captureWorkerErrors!==!1?he(o,{mechanism:{type:"auto.child_process.worker_thread",handled:!1,data:{threadId:String(n)}}}):br({category:"worker_thread",message:`Worker thread errored with '${o.message}'`,level:"error",data:{threadId:n}})})}var ak,fwe,ck,one=E(()=>{l();ak=U(require("node:diagnostics_channel"),1);ne();fwe="ChildProcess",ck=(e={})=>({name:fwe,setup(){ak.channel("child_process").subscribe(t=>{t&&typeof t=="object"&&"process"in t&&mwe(t.process,e)}),ak.channel("worker_threads").subscribe(t=>{t&&typeof t=="object"&&"worker"in t&&_we(t.worker,e)})}})});function Swe(e){if(e.app?.app_memory&&(e.app.app_memory=process.memoryUsage().rss),e.app?.free_memory&&typeof process.availableMemory=="function"){let t=process.availableMemory?.();t!=null&&(e.app.free_memory=t)}return e.device?.free_memory&&(e.device.free_memory=on.freemem()),e}function ine(e){let t={},{app:n,device:o,os:r,culture:i,cloud_resource:s}=e;if(n&&n.app_start_time&&(t["app.start_time"]=n.app_start_time),o&&(o.arch&&(t["device.archs"]=[o.arch]),o.boot_time&&(t["device.boot_time"]=o.boot_time),o.memory_size!=null&&(t["device.memory_size"]=o.memory_size),o.processor_count!=null&&(t["device.processor_count"]=o.processor_count),o.cpu_description&&(t["device.cpu_description"]=o.cpu_description),o.processor_frequency!=null&&(t["device.processor_frequency"]=o.processor_frequency)),r&&(r.name&&(t["os.name"]=r.name),r.version&&(t["os.version"]=r.version),r.kernel_version&&(t["os.kernel_version"]=r.kernel_version),r.build&&(t["os.build"]=r.build)),i&&(i.locale&&(t["culture.locale"]=i.locale),i.timezone&&(t["culture.timezone"]=i.timezone)),s)for(let[a,c]of Object.entries(s))c!=null&&(t[a]=c);return t}function Awe(e,t){let n={};if(e&&(n["app.memory"]=process.memoryUsage().rss,typeof process.availableMemory=="function")){let o=process.availableMemory?.();o!=null&&(n["app.free_memory"]=o)}return t?.free_memory!=null&&(n["device.free_memory"]=on.freemem()),n}async function ywe(){let e=on.platform();switch(e){case"darwin":return vwe();case"linux":return Pwe();default:return{name:Nwe[e]||e,version:on.release()}}}function Rwe(){try{if(typeof process.versions.icu!="string")return;let e=new Date(9e8);if(new Intl.DateTimeFormat("es",{month:"long"}).format(e)==="enero"){let n=Intl.DateTimeFormat().resolvedOptions();return{locale:n.locale,timezone:n.timeZone}}}catch{}}function Iwe(){let e=process.memoryUsage().rss,n={app_start_time:new Date(Date.now()-process.uptime()*1e3).toISOString(),app_memory:e};if(typeof process.availableMemory=="function"){let o=process.availableMemory?.();o!=null&&(n.free_memory=o)}return n}function bwe(e){let t={},n;try{n=on.uptime()}catch{}if(typeof n=="number"&&(t.boot_time=new Date(Date.now()-n*1e3).toISOString()),t.arch=on.arch(),(e===!0||e.memory)&&(t.memory_size=on.totalmem(),t.free_memory=on.freemem()),e===!0||e.cpu){let o=on.cpus(),r=o?.[0];r&&(t.processor_count=o.length,t.cpu_description=r.model,t.processor_frequency=r.speed)}return t}function ss(e,t){let n=e.exec(t);return n?n[1]:void 0}async function vwe(){let e={kernel_version:on.release(),name:"Mac OS X",version:`10.${Number(on.release().split(".")[0])-4}`};try{let t=await new Promise((n,o)=>{(0,ane.execFile)("/usr/bin/sw_vers",(r,i)=>{if(r){o(r);return}n(i)})});e.name=ss(/^ProductName:\s+(.*)$/m,t),e.version=ss(/^ProductVersion:\s+(.*)$/m,t),e.build=ss(/^BuildVersion:\s+(.*)$/m,t)}catch{}return e}function sne(e){return e.split(" ")[0].toLowerCase()}async function Pwe(){let e={kernel_version:on.release(),name:"Linux"};try{let t=await hwe("/etc"),n=Owe.find(a=>t.includes(a.name));if(!n)return e;let o=(0,cne.join)("/etc",n.name),r=(await gwe(o,{encoding:"utf-8"})).toLowerCase(),{distros:i}=n;e.name=i.find(a=>r.indexOf(sne(a))>=0)||i[0];let s=sne(e.name);e.version=Cwe[s]?.(r)}catch{}return e}function xwe(){return process.env.VERCEL?{"cloud.provider":"vercel","cloud.region":process.env.VERCEL_REGION}:process.env.AWS_REGION?{"cloud.provider":"aws","cloud.region":process.env.AWS_REGION,"cloud.platform":process.env.AWS_EXECUTION_ENV}:process.env.GCP_PROJECT?{"cloud.provider":"gcp"}:process.env.ALIYUN_REGION_ID?{"cloud.provider":"alibaba_cloud","cloud.region":process.env.ALIYUN_REGION_ID}:process.env.WEBSITE_SITE_NAME&&process.env.REGION_NAME?{"cloud.provider":"azure","cloud.region":process.env.REGION_NAME}:process.env.IBM_CLOUD_REGION?{"cloud.provider":"ibm_cloud","cloud.region":process.env.IBM_CLOUD_REGION}:process.env.TENCENTCLOUD_REGION?{"cloud.provider":"tencent_cloud","cloud.region":process.env.TENCENTCLOUD_REGION,"cloud.account.id":process.env.TENCENTCLOUD_APPID,"cloud.availability_zone":process.env.TENCENTCLOUD_ZONE}:process.env.NETLIFY?{"cloud.provider":"netlify"}:process.env.FLY_REGION?{"cloud.provider":"fly.io","cloud.region":process.env.FLY_REGION}:process.env.DYNO?{"cloud.provider":"heroku"}:void 0}var ane,LR,on,cne,uk,gwe,hwe,Ewe,Twe,dl,Nwe,Owe,Cwe,lk=E(()=>{l();ane=require("node:child_process"),LR=require("node:fs"),on=U(require("node:os"),1),cne=require("node:path"),uk=require("node:util");ne();gwe=(0,uk.promisify)(LR.readFile),hwe=(0,uk.promisify)(LR.readdir),Ewe="Context",Twe=((e={})=>{let t={app:!0,os:!0,device:!0,culture:!0,cloudResource:!0,...e},n=t.app?Iwe():void 0,o=t.device?bwe(t.device):void 0,r=t.culture?Rwe():void 0,i=t.cloudResource?xwe():void 0,s=t.os?ywe():void 0,a={"process.runtime.engine.name":"v8","process.runtime.engine.version":process.versions.v8,...ine({app:n,device:o,culture:r,cloud_resource:i})};s&&s.then(d=>Object.assign(a,ine({os:d}))).catch(()=>{});let c=(async()=>{let d={};return s&&(d.os=await s),n&&(d.app=n),o&&(d.device=o),r&&(d.culture=r),i&&(d.cloud_resource=i),d})();async function u(d){let p=Swe(await c);return d.contexts={...d.contexts,app:{...p.app,...d.contexts?.app},os:{...p.os,...d.contexts?.os},device:{...p.device,...d.contexts?.device},culture:{...p.culture,...d.contexts?.culture},cloud_resource:{...p.cloud_resource,...d.contexts?.cloud_resource}},d}return{name:Ewe,processEvent(d){return u(d)},processSegmentSpan(d){zt(d,a),zt(d,Awe(n,o))}}}),dl=Twe;Nwe={aix:"IBM AIX",freebsd:"FreeBSD",openbsd:"OpenBSD",sunos:"SunOS",win32:"Windows",ohos:"OpenHarmony",android:"Android"},Owe=[{name:"fedora-release",distros:["Fedora"]},{name:"redhat-release",distros:["Red Hat Linux","Centos"]},{name:"redhat_version",distros:["Red Hat Linux"]},{name:"SuSE-release",distros:["SUSE Linux"]},{name:"lsb-release",distros:["Ubuntu Linux","Arch Linux"]},{name:"debian_version",distros:["Debian"]},{name:"debian_release",distros:["Debian"]},{name:"arch-release",distros:["Arch Linux"]},{name:"gentoo-release",distros:["Gentoo Linux"]},{name:"novell-release",distros:["SUSE Linux"]},{name:"alpine-release",distros:["Alpine Linux"]}],Cwe={alpine:e=>e,arch:e=>ss(/distrib_release=(.*)/,e),centos:e=>ss(/release ([^ ]+)/,e),debian:e=>e,fedora:e=>ss(/release (..)/,e),mint:e=>ss(/distrib_release=(.*)/,e),red:e=>ss(/release ([^ ]+)/,e),suse:e=>ss(/VERSION = (.*)\n/,e),ubuntu:e=>ss(/distrib_release=(.*)/,e)}});function kwe(e,t,n){let o=e.get(t);return o===void 0?(e.set(t,n),n):o}function Uwe(e){return!!(e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:"))}function $we(e){return e.lineno!==void 0&&e.lineno>Dwe||e.colno!==void 0&&e.colno>wwe}function Bwe(e,t){let n=dk.get(e);if(n===void 0)return!1;for(let o=t[0];o<=t[1];o++)if(n[o]===void 0)return!1;return!0}function Gwe(e,t){if(!e.length)return[];let n=0,o=e[0];if(typeof o!="number")return[];let r=lne(o,t),i=[];for(;;){if(n===e.length-1){i.push(r);break}let s=e[n+1];if(typeof s!="number")break;s<=r[1]?r[1]=s+t:(i.push(r),r=lne(s,t)),n++}return i}function jwe(e,t,n){return new Promise((o,r)=>{let i=(0,dne.createReadStream)(e),s=(0,pne.createInterface)({input:i});function a(){i.destroy(),o()}let c=0,u=0,d=t[u];if(d===void 0){a();return}let p=d[0],f=d[1];function m(_){fne.set(e,1),Fe&&b.error(`Failed to read file: ${e}. Error: ${_}`),s.close(),s.removeAllListeners(),a()}i.on("error",m),s.on("error",m),s.on("close",a),s.on("line",_=>{if(c++,!(c<p)&&(n[c]=dP(_,0),c>=f)){if(u===t.length-1){s.close(),s.removeAllListeners();return}u++;let h=t[u];if(h===void 0){s.close(),s.removeAllListeners();return}p=h[0],f=h[1]}})})}async function Vwe(e,t){let n={};if(t>0&&e.exception?.values){for(let i of e.exception.values)if(i.stacktrace?.frames?.length)for(let s=i.stacktrace.frames.length-1;s>=0;s--){let a=i.stacktrace.frames[s],c=a?.filename;if(!a||typeof c!="string"||typeof a.lineno!="number"||Uwe(c)||$we(a))continue;n[c]||(n[c]=[]),n[c].push(a.lineno)}}let o=Object.keys(n);if(o.length==0)return e;let r=[];for(let i of o){if(fne.get(i))continue;let s=n[i];if(!s)continue;s.sort((u,d)=>u-d);let a=Gwe(s,t);if(a.every(u=>Bwe(i,u)))continue;let c=kwe(dk,i,{});r.push(jwe(i,a,c))}if(await Promise.all(r).catch(()=>{Fe&&b.log("Failed to read one or more source files and resolve context lines")}),t>0&&e.exception?.values)for(let i of e.exception.values)i.stacktrace?.frames&&i.stacktrace.frames.length>0&&Fwe(i.stacktrace.frames,t,dk);return e}function Fwe(e,t,n){for(let o of e)if(o.filename&&o.context_line===void 0&&typeof o.lineno=="number"){let r=n.get(o.filename);if(r===void 0)continue;Hwe(o.lineno,o,t,r)}}function une(e){delete e.pre_context,delete e.context_line,delete e.post_context}function Hwe(e,t,n,o){if(t.lineno===void 0||o===void 0){Fe&&b.error("Cannot resolve context for frame with no lineno or file contents");return}t.pre_context=[];for(let i=mne(e,n);i<e;i++){let s=o[i];if(s===void 0){une(t),Fe&&b.error(`Could not find line ${i} in file ${t.filename}`);return}t.pre_context.push(s)}if(o[e]===void 0){une(t),Fe&&b.error(`Could not find line ${e} in file ${t.filename}`);return}t.context_line=o[e];let r=_ne(e,n);t.post_context=[];for(let i=e+1;i<=r;i++){let s=o[i];if(s===void 0)break;t.post_context.push(s)}}function mne(e,t){return Math.max(1,e-t)}function _ne(e,t){return e+t}function lne(e,t){return[mne(e,t),_ne(e,t)]}var dne,pne,dk,fne,Mwe,Lwe,wwe,Dwe,zwe,pl,pk=E(()=>{l();dne=require("node:fs"),pne=require("node:readline");ne();Xs();dk=new Nr(10),fne=new Nr(20),Mwe=7,Lwe="ContextLines",wwe=1e3,Dwe=1e4;zwe=((e={})=>{let t=e.frameContextLines!==void 0?e.frameContextLines:Mwe;return{name:Lwe,processEvent(n){return Vwe(n,t)}}}),pl=zwe});async function DR(){if(wR===void 0)try{wR=!!(await import("node:inspector")).url()}catch{wR=!1}return wR}var wR,fk=E(()=>{l()});function hne(e,t,n){let o=0,r=5,i=0;return setInterval(()=>{i===0?o>e&&(r*=2,n(r),r>86400&&(r=86400),i=r):(i-=1,i===0&&t()),o=0},1e3).unref(),()=>{o+=1}}function gne(e){return e!==void 0&&(e.length===0||e==="?"||e==="<anonymous>")}function kR(e,t){return e===t||`Object.${e}`===t||e===`Object.${t}`||gne(e)&&gne(t)}var nh,mk=E(()=>{l();nh="__SENTRY_ERROR_LOCAL_VARIABLES__"});function Ene(...e){b.log("[LocalVariables]",...e)}var Tne,qwe,Sne,Ane=E(()=>{l();Tne=require("node:worker_threads");ne();fk();mk();qwe="LyohIEBzZW50cnkvbm9kZS1jb3JlIDEwLjUyLjAgKDRiOTExZTApIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyBlfWZyb20ibm9kZTppbnNwZWN0b3IvcHJvbWlzZXMiO2ltcG9ydHt3b3JrZXJEYXRhIGFzIHR9ZnJvbSJub2RlOndvcmtlcl90aHJlYWRzIjtjb25zdCBuPWdsb2JhbFRoaXMsaT17fTtjb25zdCBvPSJfX1NFTlRSWV9FUlJPUl9MT0NBTF9WQVJJQUJMRVNfXyI7Y29uc3QgYT10O2Z1bmN0aW9uIHMoLi4uZSl7YS5kZWJ1ZyYmZnVuY3Rpb24oZSl7aWYoISgiY29uc29sZSJpbiBuKSlyZXR1cm4gZSgpO2NvbnN0IHQ9bi5jb25zb2xlLG89e30sYT1PYmplY3Qua2V5cyhpKTthLmZvckVhY2goZT0+e2NvbnN0IG49aVtlXTtvW2VdPXRbZV0sdFtlXT1ufSk7dHJ5e3JldHVybiBlKCl9ZmluYWxseXthLmZvckVhY2goZT0+e3RbZV09b1tlXX0pfX0oKCk9PmNvbnNvbGUubG9nKCJbTG9jYWxWYXJpYWJsZXMgV29ya2VyXSIsLi4uZSkpfWFzeW5jIGZ1bmN0aW9uIGMoZSx0LG4saSl7Y29uc3Qgbz1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pO2lbbl09by5yZXN1bHQuZmlsdGVyKGU9PiJsZW5ndGgiIT09ZS5uYW1lJiYhaXNOYU4ocGFyc2VJbnQoZS5uYW1lLDEwKSkpLnNvcnQoKGUsdCk9PnBhcnNlSW50KGUubmFtZSwxMCktcGFyc2VJbnQodC5uYW1lLDEwKSkubWFwKGU9PmUudmFsdWU/LnZhbHVlKX1hc3luYyBmdW5jdGlvbiByKGUsdCxuLGkpe2NvbnN0IG89YXdhaXQgZS5wb3N0KCJSdW50aW1lLmdldFByb3BlcnRpZXMiLHtvYmplY3RJZDp0LG93blByb3BlcnRpZXM6ITB9KTtpW25dPW8ucmVzdWx0Lm1hcChlPT5bZS5uYW1lLGUudmFsdWU/LnZhbHVlXSkucmVkdWNlKChlLFt0LG5dKT0+KGVbdF09bixlKSx7fSl9ZnVuY3Rpb24gdShlLHQpe2UudmFsdWUmJigidmFsdWUiaW4gZS52YWx1ZT92b2lkIDA9PT1lLnZhbHVlLnZhbHVlfHxudWxsPT09ZS52YWx1ZS52YWx1ZT90W2UubmFtZV09YDwke2UudmFsdWUudmFsdWV9PmA6dFtlLm5hbWVdPWUudmFsdWUudmFsdWU6ImRlc2NyaXB0aW9uImluIGUudmFsdWUmJiJmdW5jdGlvbiIhPT1lLnZhbHVlLnR5cGU/dFtlLm5hbWVdPWA8JHtlLnZhbHVlLmRlc2NyaXB0aW9ufT5gOiJ1bmRlZmluZWQiPT09ZS52YWx1ZS50eXBlJiYodFtlLm5hbWVdPSI8dW5kZWZpbmVkPiIpKX1hc3luYyBmdW5jdGlvbiBsKGUsdCl7Y29uc3Qgbj1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pLGk9e307Zm9yKGNvbnN0IHQgb2Ygbi5yZXN1bHQpaWYodC52YWx1ZT8ub2JqZWN0SWQmJiJBcnJheSI9PT10LnZhbHVlLmNsYXNzTmFtZSl7Y29uc3Qgbj10LnZhbHVlLm9iamVjdElkO2F3YWl0IGMoZSxuLHQubmFtZSxpKX1lbHNlIGlmKHQudmFsdWU/Lm9iamVjdElkJiYiT2JqZWN0Ij09PXQudmFsdWUuY2xhc3NOYW1lKXtjb25zdCBuPXQudmFsdWUub2JqZWN0SWQ7YXdhaXQgcihlLG4sdC5uYW1lLGkpfWVsc2UgdC52YWx1ZSYmdSh0LGkpO3JldHVybiBpfWxldCBmOyhhc3luYyBmdW5jdGlvbigpe2NvbnN0IHQ9bmV3IGU7dC5jb25uZWN0VG9NYWluVGhyZWFkKCkscygiQ29ubmVjdGVkIHRvIG1haW4gdGhyZWFkIik7bGV0IG49ITE7dC5vbigiRGVidWdnZXIucmVzdW1lZCIsKCk9PntuPSExfSksdC5vbigiRGVidWdnZXIucGF1c2VkIixlPT57bj0hMCxhc3luYyBmdW5jdGlvbihlLHtyZWFzb246dCxkYXRhOntvYmplY3RJZDpufSxjYWxsRnJhbWVzOml9KXtpZigiZXhjZXB0aW9uIiE9PXQmJiJwcm9taXNlUmVqZWN0aW9uIiE9PXQpcmV0dXJuO2lmKGY/LigpLG51bGw9PW4pcmV0dXJuO2NvbnN0IGE9W107Zm9yKGxldCB0PTA7dDxpLmxlbmd0aDt0Kyspe2NvbnN0e3Njb3BlQ2hhaW46bixmdW5jdGlvbk5hbWU6byx0aGlzOnN9PWlbdF0sYz1uLmZpbmQoZT0+ImxvY2FsIj09PWUudHlwZSkscj0iZ2xvYmFsIiE9PXMuY2xhc3NOYW1lJiZzLmNsYXNzTmFtZT9gJHtzLmNsYXNzTmFtZX0uJHtvfWA6bztpZih2b2lkIDA9PT1jPy5vYmplY3Qub2JqZWN0SWQpYVt0XT17ZnVuY3Rpb246cn07ZWxzZXtjb25zdCBuPWF3YWl0IGwoZSxjLm9iamVjdC5vYmplY3RJZCk7YVt0XT17ZnVuY3Rpb246cix2YXJzOm59fX1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuY2FsbEZ1bmN0aW9uT24iLHtmdW5jdGlvbkRlY2xhcmF0aW9uOmBmdW5jdGlvbigpIHsgdGhpcy4ke299ID0gdGhpcy4ke299IHx8ICR7SlNPTi5zdHJpbmdpZnkoYSl9OyB9YCxzaWxlbnQ6ITAsb2JqZWN0SWQ6bn0pLGF3YWl0IGUucG9zdCgiUnVudGltZS5yZWxlYXNlT2JqZWN0Iix7b2JqZWN0SWQ6bn0pfSh0LGUucGFyYW1zKS50aGVuKGFzeW5jKCk9PntuJiZhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnJlc3VtZSIpfSxhc3luYyBlPT57biYmYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5yZXN1bWUiKX0pfSksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5lbmFibGUiKTtjb25zdCBpPSExIT09YS5jYXB0dXJlQWxsRXhjZXB0aW9ucztpZihhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6aT8iYWxsIjoidW5jYXVnaHQifSksaSl7Y29uc3QgZT1hLm1heEV4Y2VwdGlvbnNQZXJTZWNvbmR8fDUwO2Y9ZnVuY3Rpb24oZSx0LG4pe2xldCBpPTAsbz01LGE9MDtyZXR1cm4gc2V0SW50ZXJ2YWwoKCk9PnswPT09YT9pPmUmJihvKj0yLG4obyksbz44NjQwMCYmKG89ODY0MDApLGE9byk6KGEtPTEsMD09PWEmJnQoKSksaT0wfSwxZTMpLnVucmVmKCksKCk9PntpKz0xfX0oZSxhc3luYygpPT57cygiUmF0ZS1saW1pdCBsaWZ0ZWQuIiksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJhbGwifSl9LGFzeW5jIGU9PntzKGBSYXRlLWxpbWl0IGV4Y2VlZGVkLiBEaXNhYmxpbmcgY2FwdHVyaW5nIG9mIGNhdWdodCBleGNlcHRpb25zIGZvciAke2V9IHNlY29uZHMuYCksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJ1bmNhdWdodCJ9KX0pfX0pKCkuY2F0Y2goZT0+e3MoIkZhaWxlZCB0byBzdGFydCBkZWJ1Z2dlciIsZSl9KSxzZXRJbnRlcnZhbCgoKT0+e30sMWU0KTs=";Sne=((e={})=>{function t(i,s){let a=(i.stacktrace?.frames||[]).filter(c=>c.function!=="new Promise");for(let c=0;c<a.length;c++){let u=a.length-c-1,d=s[c],p=a[u];if(!p||!d)break;d.vars===void 0||p.in_app===!1&&e.includeOutOfAppFrames!==!0||!kR(p.function,d.function)||(p.vars=d.vars)}}function n(i,s){if(s.originalException&&typeof s.originalException=="object"&&nh in s.originalException&&Array.isArray(s.originalException[nh])){for(let a of i.exception?.values||[])t(a,s.originalException[nh]);s.originalException[nh]=void 0}return i}async function o(){let i=await import("node:inspector");i.url()||i.open(0)}function r(i){let s=new Tne.Worker(new URL(`data:application/javascript;base64,${qwe}`),{workerData:i,execArgv:[],env:{...process.env,NODE_OPTIONS:void 0}});process.on("exit",()=>{s.terminate()}),s.once("error",a=>{Ene("Worker error",a)}),s.once("exit",a=>{Ene("Worker exit",a)}),s.unref()}return{name:"LocalVariablesAsync",async setup(i){if(!i.getOptions().includeLocalVariables)return;if(await DR()){b.warn("Local variables capture has been disabled because the debugger was already enabled");return}let a={...e,debug:b.isEnabled()};o().then(()=>{try{r(a)}catch(c){b.error("Failed to start worker",c)}},c=>{b.error("Failed to start inspector",c)})},processEvent(i,s){return n(i,s)}}})});function yne(e){if(e!==void 0)return e.slice(-10).reduce((t,n)=>`${t},${n.function},${n.lineno},${n.colno}`,"")}function Ywe(e,t){if(t!==void 0)return yne(e(t,1))}function Rne(e){let t=[],n=!1;function o(s){t=[],!n&&(n=!0,e(s))}t.push(o);function r(s){t.push(s)}function i(s){let a=t.pop()||o;try{a(s)}catch{o(s)}}return{add:r,next:i}}var _k,Wwe,Kwe,Ine,bne=E(()=>{l();ne();jp();fk();mk();_k=class e{constructor(t){this._session=t}static async create(t){if(t)return t;let n=await import("node:inspector");return new e(new n.Session)}configureAndConnect(t,n){this._session.connect(),this._session.on("Debugger.paused",o=>{t(o,()=>{this._session.post("Debugger.resume")})}),this._session.post("Debugger.enable"),this._session.post("Debugger.setPauseOnExceptions",{state:n?"all":"uncaught"})}setPauseOnExceptions(t){this._session.post("Debugger.setPauseOnExceptions",{state:t?"all":"uncaught"})}getLocalVariables(t,n){this._getProperties(t,o=>{let{add:r,next:i}=Rne(n);for(let s of o)if(s.value?.objectId&&s.value.className==="Array"){let a=s.value.objectId;r(c=>this._unrollArray(a,s.name,c,i))}else if(s.value?.objectId&&s.value.className==="Object"){let a=s.value.objectId;r(c=>this._unrollObject(a,s.name,c,i))}else s.value&&r(a=>this._unrollOther(s,a,i));i({})})}_getProperties(t,n){this._session.post("Runtime.getProperties",{objectId:t,ownProperties:!0},(o,r)=>{n(o?[]:r.result)})}_unrollArray(t,n,o,r){this._getProperties(t,i=>{o[n]=i.filter(s=>s.name!=="length"&&!isNaN(parseInt(s.name,10))).sort((s,a)=>parseInt(s.name,10)-parseInt(a.name,10)).map(s=>s.value?.value),r(o)})}_unrollObject(t,n,o,r){this._getProperties(t,i=>{o[n]=i.map(s=>[s.name,s.value?.value]).reduce((s,[a,c])=>(s[a]=c,s),{}),r(o)})}_unrollOther(t,n,o){t.value&&("value"in t.value?t.value.value===void 0||t.value.value===null?n[t.name]=`<${t.value.value}>`:n[t.name]=t.value.value:"description"in t.value&&t.value.type!=="function"?n[t.name]=`<${t.value.description}>`:t.value.type==="undefined"&&(n[t.name]="<undefined>")),o(n)}},Wwe="LocalVariables",Kwe=((e={},t)=>{let n=new Nr(20),o,r=!1;function i(u){let d=yne(u.stacktrace?.frames);if(d===void 0)return;let p=n.remove(d);if(p===void 0)return;let f=(u.stacktrace?.frames||[]).filter(m=>m.function!=="new Promise");for(let m=0;m<f.length;m++){let _=f.length-m-1,h=p[m],T=f[_];if(!T||!h)break;h.vars===void 0||T.in_app===!1&&e.includeOutOfAppFrames!==!0||!kR(T.function,h.function)||(T.vars=h.vars)}}function s(u){for(let d of u.exception?.values||[])i(d);return u}let a;async function c(){let d=Z()?.getOptions();if(!d?.includeLocalVariables)return;if(ta<18){b.log("The `LocalVariables` integration is only supported on Node >= v18.");return}if(await DR()){b.warn("Local variables capture has been disabled because the debugger was already enabled");return}try{let f=await _k.create(t),m=(h,{params:{reason:T,data:S,callFrames:y}},v)=>{if(T!=="exception"&&T!=="promiseRejection"){v();return}o?.();let x=Ywe(h,S.description);if(x==null){v();return}let{add:P,next:N}=Rne(F=>{n.set(x,F),v()});for(let F=0;F<Math.min(y.length,5);F++){let{scopeChain:se,functionName:$,this:G}=y[F],Q=se.find(D=>D.type==="local"),J=G.className==="global"||!G.className?$:`${G.className}.${$}`;if(Q?.object.objectId===void 0)P(D=>{D[F]={function:J},N(D)});else{let D=Q.object.objectId;P(ue=>f.getLocalVariables(D,de=>{ue[F]={function:J,vars:de},N(ue)}))}}N([])},_=e.captureAllExceptions!==!1;if(f.configureAndConnect((h,T)=>m(d.stackParser,h,T),_),_){let h=e.maxExceptionsPerSecond||50;o=hne(h,()=>{b.log("Local variables rate-limit lifted."),f.setPauseOnExceptions(!0)},T=>{b.log(`Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${T} seconds.`),f.setPauseOnExceptions(!1)})}r=!0}catch(f){b.log("The `LocalVariables` integration failed to start.",f)}}return{name:Wwe,setupOnce(){a=c()},async processEvent(u){return await a,r?s(u):u},_getCachedFramesCount(){return n.size},_getFirstCachedFrame(){return n.values()[0]}}}),Ine=Kwe});var UR,Nne=E(()=>{l();jp();Ane();bne();UR=(e={})=>li.major<19?Ine(e):Sne(e)});function rh(){try{return typeof module<"u"&&typeof module.exports<"u"}catch{return!1}}function Cne(){return rh()?!1:ta>=21||ta===20&&Gg>=6||ta===18&&Gg>=19?!0:(One||(One=!0,bt(()=>{console.warn(`[Sentry] You are using Node.js v${process.versions.node} in ESM mode ("import syntax"). The Sentry Node.js SDK is not compatible with ESM in Node.js versions before 18.19.0 or before 20.6.0. Please either build your application with CommonJS ("require() syntax"), or upgrade your Node.js version.`)})),!1)}var One,$R=E(()=>{l();ne();jp()});function Qwe(){try{return require.cache?Object.keys(require.cache):[]}catch{return[]}}function eDe(){return{...Jwe,...rDe(),...rh()?tDe():{}}}function tDe(){let e=require.main?.paths||[],t=Qwe(),n={},o=new Set;return t.forEach(r=>{let i=r,s=()=>{let a=i;if(i=(0,ih.dirname)(a),!i||a===i||o.has(a))return;if(e.indexOf(i)<0)return s();let c=(0,ih.join)(a,"package.json");if(o.add(a),!(0,oh.existsSync)(c))return s();try{let u=JSON.parse((0,oh.readFileSync)(c,"utf8"));n[u.name]=u.version}catch{}};s()}),n}function vne(){return gk||(gk=eDe()),gk}function nDe(){try{let e=(0,ih.join)(process.cwd(),"package.json");return JSON.parse((0,oh.readFileSync)(e,"utf8"))}catch{return{}}}function rDe(){let e=nDe();return{...e.dependencies,...e.devDependencies}}var oh,ih,gk,Zwe,Jwe,Xwe,fl,hk=E(()=>{l();oh=require("node:fs"),ih=require("node:path");$R();Zwe="Modules",Jwe=typeof __SENTRY_SERVER_MODULES__>"u"?{}:__SENTRY_SERVER_MODULES__,Xwe=(()=>({name:Zwe,processEvent(e){return e.modules={...e.modules,...vne()},e},getModules:vne})),fl=Xwe});function sh(e){bt(()=>{console.error(e)});let t=Z();if(t===void 0){Fe&&b.warn("No NodeClient was defined, we are exiting the process now."),global.process.exit(1);return}let n=t.getOptions(),o=n?.shutdownTimeout&&n.shutdownTimeout>0?n.shutdownTimeout:oDe;t.close(o).then(r=>{r||Fe&&b.warn("We reached the timeout for emptying the request buffer, still exiting now!"),global.process.exit(1)},r=>{Fe&&b.error(r)})}var oDe,Ek=E(()=>{l();ne();Xs();oDe=2e3});function sDe(e,t){let o=!1,r=!1,i=!1,s,a=e.getOptions();return Object.assign(c=>{let u=sh;t.onFatalError?u=t.onFatalError:a.onFatalError&&(u=a.onFatalError);let p=global.process.listeners("uncaughtException").filter(m=>m.name!=="domainUncaughtExceptionClear"&&m.tag!=="sentry_tracingErrorCallback"&&m._errorHandler!==!0).length===0,f=t.exitEvenIfOtherHandlersAreRegistered||p;o?f&&(i?(Fe&&b.warn("uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown"),sh(c)):r||(r=!0,setTimeout(()=>{i||(i=!0,u(s,c))},2e3))):(s=c,o=!0,Z()===e&&he(c,{originalException:c,captureContext:{level:"fatal"},mechanism:{handled:!1,type:"auto.node.onuncaughtexception"}}),!i&&f&&(i=!0,u(c)))},{_errorHandler:!0})}var Pne,iDe,ml,Tk=E(()=>{l();ne();Pne=require("worker_threads");Xs();Ek();iDe="OnUncaughtException",ml=(e={})=>{let t={exitEvenIfOtherHandlersAreRegistered:!1,...e};return{name:iDe,setup(n){Pne.isMainThread&&global.process.on("uncaughtException",sDe(n,t))}}}});function lDe(e){if(typeof e!="object"||e===null)return{name:"",message:String(e??"")};let t=e,n=typeof t.name=="string"?t.name:"",o=typeof t.message=="string"?t.message:String(e);return{name:n,message:o}}function dDe(e,t){let n=e.name===void 0||vi(t.name,e.name,!0),o=e.message===void 0||vi(t.message,e.message);return n&&o}function pDe(e,t){let n=lDe(t);return e.some(o=>dDe(o,n))}function fDe(e,t){return function(o,r){if(Z()!==e||pDe(t.ignore??[],o))return;let i=t.mode==="strict"?"fatal":"error",s=o&&typeof o=="object"?o._sentry_active_span:void 0;(s?c=>Jr(s,c):c=>c())(()=>{he(o,{originalException:o,captureContext:{extra:{unhandledPromiseRejection:!0},level:i},mechanism:{handled:!1,type:"auto.node.onunhandledrejection"}})}),mDe(o,t.mode)}}function mDe(e,t){let n="This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:";t==="warn"?bt(()=>{console.warn(n),console.error(e&&typeof e=="object"&&"stack"in e?e.stack:e)}):t==="strict"&&(bt(()=>{console.warn(n)}),sh(e))}var aDe,cDe,uDe,_l,Sk=E(()=>{l();ne();Ek();aDe="OnUnhandledRejection",cDe=[{name:"AI_NoOutputGeneratedError"},{name:"AbortError"}],uDe=((e={})=>{let t={mode:e.mode??"warn",ignore:[...cDe,...e.ignore??[]]};return{name:aDe,setup(n){global.process.on("unhandledRejection",fDe(n,t))}}}),_l=uDe});var _De,gl,Ak=E(()=>{l();ne();_De="ProcessSession",gl=()=>({name:_De,setupOnce(){Zd(),process.on("beforeExit",()=>{Te().getSession()?.status!=="ok"&&vu()})}})});function hDe(e,t){let n=EDe(t.sidecarUrl);if(!n)return;let o=0;e.on("beforeEnvelope",r=>{if(o>3){b.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests");return}let i=x_(r);Ui(()=>{let s=xne.request({method:"POST",path:n.pathname,hostname:n.hostname,port:n.port,headers:{"Content-Type":"application/x-sentry-envelope"}},a=>{a.statusCode&&a.statusCode>=200&&a.statusCode<400&&(o=0),a.on("data",()=>{}),a.on("end",()=>{}),a.setEncoding("utf8")});s.on("error",()=>{o++,b.warn("[Spotlight] Failed to send envelope to Spotlight Sidecar")}),s.write(i),s.end()})})}function EDe(e){try{return new URL(`${e}`)}catch{b.warn(`[Spotlight] Invalid sidecar URL: ${e}`);return}}var xne,yk,gDe,BR,Mne=E(()=>{l();xne=U(require("node:http"),1);ne();yk="Spotlight",gDe=((e={})=>{let t={sidecarUrl:e.sidecarUrl||"http://localhost:8969/stream"};return{name:yk,setup(n){try{process.env.NODE_ENV&&process.env.NODE_ENV!=="development"&&b.warn("[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?")}catch{}hDe(n,t)}}}),BR=gDe});function TDe(){let e=Ee?.console;e&&uu.forEach(t=>{t in e&&SDe(e,t)})}function SDe(e,t){let n=e[t];Xo[t]=n;let o=n,r,i=!1,s=function(...c){if(i){n.apply(e,c);return}i=!0;try{Ni("console",{args:c,level:t}),o.apply(e,c)}finally{i=!1}};pu(s,n);let a=n.bind(e);Xo[t]=a;try{let c=s;Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){return c},set(u){u===s?(r!==void 0&&(o=r,r=void 0),c=s):u===a?(r=o,c=a):typeof u=="function"&&!u.__sentry_original__?(o=u,c=s):c=u}})}catch{__(e,t,function(c){return Xo[t]=c,function(...u){Ni("console",{args:u,level:t}),Xo[t]?.apply(this,u)}})}}var hl,Rk=E(()=>{l();ne();hl=(e={})=>({name:"Console",setup(t){process.env.LAMBDA_TASK_ROOT&&Ms("console",TDe),Xx(e).setup?.(t)}})});function yDe(e){return!(e instanceof Error)||!("errno"in e)||typeof e.errno!="number"?!1:Lne.getSystemErrorMap().has(e.errno)}var Lne,ADe,Ik,wne=E(()=>{l();Lne=U(require("node:util"),1),ADe="NodeSystemError";Ik=(e={})=>({name:ADe,processEvent:(t,n,o)=>{if(!yDe(n.originalException))return t;let r=n.originalException,i={...r};!o.getOptions().sendDefaultPii&&e.includePaths!==!0&&(delete i.path,delete i.dest),t.contexts={...t.contexts,node_system_error:i};for(let s of t.exception?.values||[])s.value&&(r.path&&s.value.includes(r.path)&&(s.value=s.value.replace(`'${r.path}'`,"").trim()),r.dest&&s.value.includes(r.dest)&&(s.value=s.value.replace(`'${r.dest}'`,"").trim()));return t}})});var bk,Z_t,as,GR,Dne=E(()=>{l();bk=U(require("node:http"),1),Z_t=require("node:https"),as=Symbol("AgentBaseInternalState"),GR=class extends bk.Agent{constructor(t){super(t),this[as]={}}isSecureEndpoint(t){if(t){if(typeof t.secureEndpoint=="boolean")return t.secureEndpoint;if(typeof t.protocol=="string")return t.protocol==="https:"}let{stack:n}=new Error;return typeof n!="string"?!1:n.split(`
|
|
27
|
+
`).some(o=>o.indexOf("(https.js:")!==-1||o.indexOf("node:https:")!==-1)}createSocket(t,n,o){let r={...n,secureEndpoint:this.isSecureEndpoint(n)};Promise.resolve().then(()=>this.connect(t,r)).then(i=>{if(i instanceof bk.Agent)return i.addRequest(t,r);this[as].currentSocket=i,super.createSocket(t,n,o)},o)}createConnection(){let t=this[as].currentSocket;if(this[as].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[as].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(t){this[as]&&(this[as].defaultPort=t)}get protocol(){return this[as].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[as]&&(this[as].protocol=t)}}});function jR(...e){b.log("[https-proxy-agent:parse-proxy-response]",...e)}function kne(e){return new Promise((t,n)=>{let o=0,r=[];function i(){let d=e.read();d?u(d):e.once("readable",i)}function s(){e.removeListener("end",a),e.removeListener("error",c),e.removeListener("readable",i)}function a(){s(),jR("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}function c(d){s(),jR("onerror %o",d),n(d)}function u(d){r.push(d),o+=d.length;let p=Buffer.concat(r,o),f=p.indexOf(`\r
|
|
28
|
+
\r
|
|
29
|
+
`);if(f===-1){jR("have not received end of HTTP headers yet..."),i();return}let m=p.subarray(0,f).toString("ascii").split(`\r
|
|
30
|
+
`),_=m.shift();if(!_)return e.destroy(),n(new Error("No header received from proxy CONNECT response"));let h=_.split(" "),T=+(h[1]||0),S=h.slice(2).join(" "),y={};for(let v of m){if(!v)continue;let x=v.indexOf(":");if(x===-1)return e.destroy(),n(new Error(`Invalid header from proxy CONNECT response: "${v}"`));let P=v.slice(0,x).toLowerCase(),N=v.slice(x+1).trimStart(),F=y[P];typeof F=="string"?y[P]=[F,N]:Array.isArray(F)?F.push(N):y[P]=N}jR("got proxy server response: %o %o",_,y),s(),t({connect:{statusCode:T,statusText:S,headers:y},buffered:p})}e.on("error",c),e.on("end",a),i()})}var Une=E(()=>{l();ne()});function ah(...e){b.log("[https-proxy-agent]",...e)}function RDe(e){e.resume()}function $ne(e,...t){let n={},o;for(o in e)t.includes(o)||(n[o]=e[o]);return n}var ia,Nk,ch,Bne=E(()=>{l();ia=U(require("node:net"),1),Nk=U(require("node:tls"),1);ne();Dne();Une();ch=class extends GR{static __initStatic(){this.protocols=["http","https"]}constructor(t,n){super(n),this.options={},this.proxy=typeof t=="string"?new URL(t):t,this.proxyHeaders=n?.headers??{},ah("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let o=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),r=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...n?$ne(n,"headers"):null,host:o,port:r}}async connect(t,n){let{proxy:o}=this;if(!n.host)throw new TypeError('No "host" provided');let r;if(o.protocol==="https:"){ah("Creating `tls.Socket`: %o",this.connectOpts);let f=this.connectOpts.servername||this.connectOpts.host;r=Nk.connect({...this.connectOpts,servername:f&&ia.isIP(f)?void 0:f})}else ah("Creating `net.Socket`: %o",this.connectOpts),r=ia.connect(this.connectOpts);let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},s=ia.isIPv6(n.host)?`[${n.host}]`:n.host,a=`CONNECT ${s}:${n.port} HTTP/1.1\r
|
|
31
|
+
`;if(o.username||o.password){let f=`${decodeURIComponent(o.username)}:${decodeURIComponent(o.password)}`;i["Proxy-Authorization"]=`Basic ${Buffer.from(f).toString("base64")}`}i.Host=`${s}:${n.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let f of Object.keys(i))a+=`${f}: ${i[f]}\r
|
|
32
|
+
`;let c=kne(r);r.write(`${a}\r
|
|
33
|
+
`);let{connect:u,buffered:d}=await c;if(t.emit("proxyConnect",u),this.emit("proxyConnect",u,t),u.statusCode===200){if(t.once("socket",RDe),n.secureEndpoint){ah("Upgrading socket connection to TLS");let f=n.servername||n.host;return Nk.connect({...$ne(n,"host","path","port"),socket:r,servername:ia.isIP(f)?void 0:f})}return r}r.destroy();let p=new ia.Socket({writable:!1});return p.readable=!0,t.once("socket",f=>{ah("Replaying proxy buffer for failed request"),f.push(d),f.push(null)}),p}};ch.__initStatic()});function ODe(e){return new Gne.Readable({read(){this.push(e),this.push(null)}})}function VR(e){let t;try{t=new URL(e.url)}catch{return bt(()=>{console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.")}),zs(e,()=>Promise.resolve({}))}let n=t.protocol==="https:",o=CDe(t,e.proxy||(n?process.env.https_proxy:void 0)||process.env.http_proxy),r=n?bDe:IDe,i=e.keepAlive===void 0?!1:e.keepAlive,s=o?new ch(o):new r.Agent({keepAlive:i,maxSockets:30,timeout:2e3}),a=vDe(e,e.httpModule??r,s);return zs(e,a)}function CDe(e,t){let{no_proxy:n}=process.env;if(!n?.split(",").some(r=>e.host.endsWith(r)||e.hostname.endsWith(r)))return t}function vDe(e,t,n){let{hostname:o,pathname:r,port:i,protocol:s,search:a}=new URL(e.url);return function(u){return new Promise((d,p)=>{Ui(()=>{let f=ODe(u.body),m={...e.headers};u.body.length>NDe&&(m["content-encoding"]="gzip",f=f.pipe((0,jne.createGzip)()));let _=o.startsWith("["),h=t.request({method:"POST",agent:n,headers:m,hostname:_?o.slice(1,-1):o,path:`${r}${a}`,port:i,protocol:s,ca:e.caCerts},T=>{T.on("data",()=>{}),T.on("end",()=>{}),T.setEncoding("utf8");let S=T.headers["retry-after"]??null,y=T.headers["x-sentry-rate-limits"]??null;d({statusCode:T.statusCode,headers:{"retry-after":S,"x-sentry-rate-limits":Array.isArray(y)?y[0]||null:y}})});h.on("error",p),f.pipe(h)})})}}var IDe,bDe,Gne,jne,NDe,Vne=E(()=>{l();IDe=U(require("node:http"),1),bDe=U(require("node:https"),1),Gne=require("node:stream"),jne=require("node:zlib");ne();Bne();NDe=1024*32});function Fne(e){if(e===!1)return!1;if(typeof e=="string")return e;let t=Mu(process.env.SENTRY_SPOTLIGHT,{strict:!0}),n=t===null&&process.env.SENTRY_SPOTLIGHT?process.env.SENTRY_SPOTLIGHT:void 0;return e===!0?n??!0:t??n}var Hne=E(()=>{l();ne()});function zne(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}function HR(e=process.argv[1]?Yx(process.argv[1]):process.cwd(),t=FR.sep==="\\"){let n=t?zne(e):e;return o=>{if(!o)return;let r=t?zne(o):o,{dir:i,base:s,ext:a}=FR.posix.parse(r);(a===".js"||a===".mjs"||a===".cjs")&&(s=s.slice(0,a.length*-1));let c=decodeURIComponent(s);i||(i=".");let u=i.lastIndexOf("/node_modules");if(u>-1)return`${i.slice(u+14).replace(/\//g,".")}:${c}`;if(i.startsWith(n)){let d=i.slice(n.length+1).replace(/\//g,".");return d?`${d}:${c}`:c}return c}}var FR,qne=E(()=>{l();FR=require("node:path");ne()});function zR(e){if(process.env.SENTRY_RELEASE)return process.env.SENTRY_RELEASE;if(Ee.SENTRY_RELEASE?.id)return Ee.SENTRY_RELEASE.id;let t=process.env.GITHUB_SHA||process.env.CI_MERGE_REQUEST_SOURCE_BRANCH_SHA||process.env.CI_BUILD_REF||process.env.CI_COMMIT_SHA||process.env.BITBUCKET_COMMIT,n=process.env.APPVEYOR_PULL_REQUEST_HEAD_COMMIT||process.env.APPVEYOR_REPO_COMMIT||process.env.CODEBUILD_RESOLVED_SOURCE_VERSION||process.env.AWS_COMMIT_ID||process.env.BUILD_SOURCEVERSION||process.env.GIT_CLONE_COMMIT_HASH||process.env.BUDDY_EXECUTION_REVISION||process.env.BUILDKITE_COMMIT||process.env.CIRCLE_SHA1||process.env.CIRRUS_CHANGE_IN_REPO||process.env.CF_REVISION||process.env.CM_COMMIT||process.env.CF_PAGES_COMMIT_SHA||process.env.DRONE_COMMIT_SHA||process.env.FC_GIT_COMMIT_SHA||process.env.HEROKU_TEST_RUN_COMMIT_VERSION||process.env.HEROKU_BUILD_COMMIT||process.env.HEROKU_SLUG_COMMIT||process.env.RAILWAY_GIT_COMMIT_SHA||process.env.RENDER_GIT_COMMIT||process.env.SEMAPHORE_GIT_SHA||process.env.TRAVIS_PULL_REQUEST_SHA||process.env.VERCEL_GIT_COMMIT_SHA||process.env.VERCEL_GITHUB_COMMIT_SHA||process.env.VERCEL_GITLAB_COMMIT_SHA||process.env.VERCEL_BITBUCKET_COMMIT_SHA||process.env.ZEIT_GITHUB_COMMIT_SHA||process.env.ZEIT_GITLAB_COMMIT_SHA||process.env.ZEIT_BITBUCKET_COMMIT_SHA,o=process.env.CI_COMMIT_ID||process.env.SOURCE_COMMIT||process.env.SOURCE_VERSION||process.env.GIT_COMMIT||process.env.COMMIT_REF||process.env.BUILD_VCS_NUMBER||process.env.CI_COMMIT_SHA;return t||n||o||e}var qR,Yne=E(()=>{l();ne();qne();qR=UT(DM(HR()))});var Wne,Kne,Zne,YR,PDe,ef,Jne=E(()=>{l();Wne=U(require("node:os"),1),Kne=U(K(),1),Zne=U(Me(),1);ne();Qp();YR=require("worker_threads");Xs();PDe=6e4,ef=class extends F_{constructor(t){let n=t.includeServerName===!1?void 0:t.serverName||global.process.env.SENTRY_NAME||Wne.hostname(),o={...t,platform:"node",runtime:t.runtime||{name:"node",version:global.process.version},serverName:n};t.openTelemetryInstrumentations&&(0,Zne.registerInstrumentations)({instrumentations:t.openTelemetryInstrumentations}),qs(o,"node"),b.log(`Initializing Sentry: process: ${process.pid}, thread: ${YR.isMainThread?"main":`worker-${YR.threadId}`}.`),super(o),this.getOptions().enableLogs&&(this._logOnExitFlushListener=()=>{Pu(this)},n&&this.on("beforeCaptureLog",r=>{r.attributes={...r.attributes,"server.address":n}}),process.on("beforeExit",this._logOnExitFlushListener))}get tracer(){if(this._tracer)return this._tracer;let t="@sentry/node",n=ve,o=Kne.trace.getTracer(t,n);return this._tracer=o,o}async flush(t){return await this.traceProvider?.forceFlush(),this.getOptions().sendClientReports&&this._flushOutcomes(),super.flush(t)}async close(t){this._clientReportInterval&&clearInterval(this._clientReportInterval),this._clientReportOnExitFlushListener&&process.off("beforeExit",this._clientReportOnExitFlushListener),this._logOnExitFlushListener&&process.off("beforeExit",this._logOnExitFlushListener);let n=await super.close(t);return this.traceProvider&&await this.traceProvider.shutdown(),n}startClientReportTracking(){let t=this.getOptions();t.sendClientReports&&(this._clientReportOnExitFlushListener=()=>{this._flushOutcomes()},this._clientReportInterval=setInterval(()=>{Fe&&b.log("Flushing client reports based on interval."),this._flushOutcomes()},t.clientReportFlushInterval??PDe).unref(),process.on("beforeExit",this._clientReportOnExitFlushListener))}_setupIntegrations(){Mx(),super._setupIntegrations()}_getTraceInfoFromScope(t){return t?tk(this,t):[void 0,void 0]}}});function Ok(){if(Cne()&&!Ee._sentryEsmLoaderHookRegistered){Ee._sentryEsmLoaderHookRegistered=!0;try{let{addHookMessagePort:e}=(0,Xne.createAddHookMessageChannel)();Qne.register("import-in-the-middle/hook.mjs",xDe.url,{data:{addHookMessagePort:e,include:[]},transferList:[e]})}catch(e){b.warn("Failed to register 'import-in-the-middle' hook",e)}}}var Xne,Qne,xDe,ere=E(()=>{l();ne();Xne=U(pw(),1),Qne=U(require("module"),1);$R();xDe={}});function WR(){return[Ha(),Fa(),za(),qa(),Ik(),Qx(),hl(),cee(),gee(),ml(),_l(),pl(),UR(),dl(),ck(),gl(),fl()]}function Ck(e={}){return MDe(e,WR)}function MDe(e={},t){let n=LDe(e,t);n.debug===!0&&(Fe?b.enable():bt(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),n.registerEsmLoaderHooks!==!1&&Ok(),rk(),Pe().update(n.initialScope),n.spotlight&&!n.integrations.some(({name:i})=>i===yk)&&n.integrations.push(BR({sidecarUrl:typeof n.spotlight=="string"?n.spotlight:void 0})),qs(n,"node-core");let r=new ef(n);return Pe().setClient(r),r.init(),b.log(`SDK initialized from ${rh()?"CommonJS":"ESM"}`),r.startClientReportTracking(),kDe(),JD(r),nk(r),process.env.VERCEL&&process.on("SIGTERM",async()=>{await r.flush(200)}),r}function KR(){if(!Fe)return;let e=QD(),t=["SentryContextManager","SentryPropagator"];At()&&t.push("SentrySpanProcessor");for(let n of t)e.includes(n)||b.error(`You have to set up the ${n}. Without this, the OpenTelemetry & Sentry integration will not work properly.`);e.includes("SentrySampler")||b.warn("You have to set up the SentrySampler. Without this, the OpenTelemetry & Sentry integration may still work, but sample rates set for the Sentry SDK will not be respected. If you use a custom sampler, make sure to use `wrapSamplingDecision`.")}function LDe(e,t){let n=wDe(e.release),o=Fne(e.spotlight),r=DDe(e.tracesSampleRate),i={...e,dsn:e.dsn??process.env.SENTRY_DSN,environment:e.environment??process.env.SENTRY_ENVIRONMENT,sendClientReports:e.sendClientReports??!0,transport:e.transport??VR,stackParser:nP(e.stackParser||qR),release:n,tracesSampleRate:r,spotlight:o,debug:Mu(e.debug??process.env.SENTRY_DEBUG)},s=e.integrations,a=e.defaultIntegrations??t(i),c=mx({defaultIntegrations:a,integrations:s});return i.traceLifecycle==="stream"&&!c.some(u=>u.name==="SpanStreaming")&&c.push(_p()),{...i,integrations:c}}function wDe(e){if(e!==void 0)return e;let t=zR();if(t!==void 0)return t}function DDe(e){if(e!==void 0)return e;let t=process.env.SENTRY_TRACES_SAMPLE_RATE;if(!t)return;let n=parseFloat(t);return isFinite(n)?n:void 0}function kDe(){if(Mu(process.env.SENTRY_USE_ENVIRONMENT)!==!1){let e=process.env.SENTRY_TRACE,t=process.env.SENTRY_BAGGAGE,n=Su(e,t);Pe().setPropagationContext(n)}}var tre=E(()=>{l();ne();Qp();Xs();one();lk();pk();uee();Nne();hk();hee();Tk();Sk();Ak();Mne();Rk();wne();Vne();$R();Hne();Yne();Jne();ere()});function El(e,...t){let[n,o,r,i]=t;if(Array.isArray(o)){let s={...r};s["sentry.message.template"]=n,o.forEach((c,u)=>{s[`sentry.message.parameter.${u}`]=c});let a=(0,nre.format)(n,...o);Qd({level:e,message:a,attributes:s},i?.scope)}else Qd({level:e,message:n,attributes:o},r?.scope??i?.scope)}var nre,rre=E(()=>{l();nre=require("node:util");ne()});var pc={};ht(pc,{debug:()=>$De,error:()=>jDe,fatal:()=>VDe,fmt:()=>z_,info:()=>BDe,trace:()=>UDe,warn:()=>GDe});function UDe(...e){El("trace",...e)}function $De(...e){El("debug",...e)}function BDe(...e){El("info",...e)}function GDe(...e){El("warn",...e)}function jDe(...e){El("error",...e)}function VDe(...e){El("fatal",...e)}var ore=E(()=>{l();rre();ne()});function Rt(e,t){e.setAttribute(te,t)}var ire=E(()=>{l();ne()});var Ye=E(()=>{l();Hw();oy();zw();Kw();nne();rne();ry();tre();Ak();ne();ore();lk();pk();hk();Tk();Sk();Rk();ire()});var Tre,YDe,tf,vk=E(()=>{l();ne();Ye();Tre="Http",YDe=ae(`${Tre}.sentry`,e=>new rl(e)),tf=(e={})=>{let t=e.spans??!0,n=e.disableIncomingRequestSpans,o=t&&!n,r={sessions:e.trackIncomingRequestsAsSessions,sessionFlushingDelayMS:e.sessionFlushingDelayMS,ignoreRequestBody:e.ignoreIncomingRequestBody,maxRequestBodySize:e.maxIncomingRequestBodySize},i={ignoreIncomingRequests:e.ignoreIncomingRequests,ignoreStaticAssets:e.ignoreStaticAssets,ignoreStatusCodes:e.dropSpansForIncomingRequestStatusCodes,instrumentation:e.instrumentation,onSpanCreated:e.incomingRequestSpanHook},s=Wu(r),a=nl(i);return{name:Tre,setup(c){let u=c.getOptions();o&&At(u)&&a.setup(c)},setupOnce(){s.setupOnce();let c={breadcrumbs:e.breadcrumbs,spans:t,propagateTraceInOutgoingRequests:e.tracePropagation??!0,createSpansForOutgoingRequests:t,ignoreOutgoingRequests:e.ignoreOutgoingRequests,outgoingRequestHook:(u,d)=>{let p=ii(d);if(p.startsWith("data:")){let f=$_(p);u.setAttribute("http.url",f),u.setAttribute(gu,f),u.updateName(`${d.method||"GET"} ${f}`)}e.instrumentation?.requestHook?.(u,d)},outgoingResponseHook:e.instrumentation?.responseHook,outgoingRequestApplyCustomAttributes:e.instrumentation?.applyCustomAttributesOnSpan};YDe(c)},processEvent(c){return a.processEvent(c)}}}});var nf,Sre,Tl,Wt,Sl,He,WDe,ZR,Are=E(()=>{l();nf=U(require("diagnostics_channel"),1),Sre=require("url"),Tl=U(Me(),1),Wt=U(K(),1),Sl=U(rt(),1),He=U(Qe(),1);ne();WDe="@sentry/instrumentation-undici",ZR=class e extends Tl.InstrumentationBase{__init(){this._recordFromReq=new WeakMap}constructor(t={}){super(WDe,ve,t),e.prototype.__init.call(this)}init(){}disable(){super.disable(),this._channelSubs.forEach(t=>t.unsubscribe()),this._channelSubs.length=0}enable(){super.enable(),this._channelSubs=this._channelSubs||[],!(this._channelSubs.length>0)&&(this.subscribeToChannel("undici:request:create",this.onRequestCreated.bind(this)),this.subscribeToChannel("undici:client:sendHeaders",this.onRequestHeaders.bind(this)),this.subscribeToChannel("undici:request:headers",this.onResponseHeaders.bind(this)),this.subscribeToChannel("undici:request:trailers",this.onDone.bind(this)),this.subscribeToChannel("undici:request:error",this.onError.bind(this)))}_updateMetricInstruments(){this._httpClientDurationHistogram=this.meter.createHistogram(He.METRIC_HTTP_CLIENT_REQUEST_DURATION,{description:"Measures the duration of outbound HTTP requests.",unit:"s",valueType:Wt.ValueType.DOUBLE,advice:{explicitBucketBoundaries:[.005,.01,.025,.05,.075,.1,.25,.5,.75,1,2.5,5,7.5,10]}})}subscribeToChannel(t,n){let[o=0,r=0]=process.version.replace("v","").split(".").map(a=>Number(a)),i=o>18||o===18&&r>=19,s;if(i)nf.subscribe?.(t,n),s=()=>nf.unsubscribe?.(t,n);else{let a=nf.channel(t);a.subscribe(n),s=()=>a.unsubscribe(n)}this._channelSubs.push({name:t,unsubscribe:s})}parseRequestHeaders(t){let n=new Map;if(Array.isArray(t.headers))for(let o=0;o<t.headers.length;o+=2){let r=t.headers[o],i=t.headers[o+1];typeof r=="string"&&i!==void 0&&n.set(r.toLowerCase(),i)}else if(typeof t.headers=="string"){let o=t.headers.split(`\r
|
|
34
|
+
`);for(let r of o){if(!r)continue;let i=r.indexOf(":");if(i===-1)continue;let s=r.substring(0,i).toLowerCase(),a=r.substring(i+1).trim(),c=n.get(s);c&&Array.isArray(c)?c.push(a):c?n.set(s,[c,a]):n.set(s,a)}}return n}onRequestCreated({request:t}){let n=this.getConfig(),o=n.enabled!==!1;if((0,Tl.safeExecuteInTheMiddle)(()=>!o||t.method==="CONNECT"||n.ignoreRequestHook?.(t),N=>N&&this._diag.error("caught ignoreRequestHook error: ",N),!0))return;let i=(0,Sl.hrTime)(),s;try{s=new Sre.URL(t.path,t.origin)}catch(N){this._diag.warn("could not determine url.full:",N);return}let a=s.protocol.replace(":",""),c=this.getRequestMethod(t.method),u={[He.ATTR_HTTP_REQUEST_METHOD]:c,[He.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]:t.method,[He.ATTR_URL_FULL]:s.toString(),[He.ATTR_URL_PATH]:s.pathname,[He.ATTR_URL_QUERY]:s.search,[He.ATTR_URL_SCHEME]:a},d={https:"443",http:"80"},p=s.hostname,f=s.port||d[a];u[He.ATTR_SERVER_ADDRESS]=p,f&&!isNaN(Number(f))&&(u[He.ATTR_SERVER_PORT]=Number(f));let _=this.parseRequestHeaders(t).get("user-agent");if(_){let N=Array.isArray(_)?_[_.length-1]:_;u[He.ATTR_USER_AGENT_ORIGINAL]=N}let h=(0,Tl.safeExecuteInTheMiddle)(()=>n.startSpanHook?.(t),N=>N&&this._diag.error("caught startSpanHook error: ",N),!0);h&&Object.entries(h).forEach(([N,F])=>{u[N]=F});let T=Wt.context.active(),S=Wt.trace.getSpan(T),y;n.requireParentforSpans&&(!S||!Wt.trace.isSpanContextValid(S.spanContext()))?y=Wt.trace.wrapSpanContext(Wt.INVALID_SPAN_CONTEXT):y=this.tracer.startSpan(c==="_OTHER"?"HTTP":c,{kind:Wt.SpanKind.CLIENT,attributes:u},T),(0,Tl.safeExecuteInTheMiddle)(()=>n.requestHook?.(y,t),N=>N&&this._diag.error("caught requestHook error: ",N),!0);let v=Wt.trace.setSpan(Wt.context.active(),y),x={};Wt.propagation.inject(v,x);let P=Object.entries(x);for(let N=0;N<P.length;N++){let F=P[N];if(!F)continue;let[se,$]=F;typeof t.addHeader=="function"?t.addHeader(se,$):typeof t.headers=="string"?t.headers+=`${se}: ${$}\r
|
|
35
|
+
`:Array.isArray(t.headers)&&t.headers.push(se,$)}this._recordFromReq.set(t,{span:y,attributes:u,startTime:i})}onRequestHeaders({request:t,socket:n}){let o=this._recordFromReq.get(t);if(!o)return;let r=this.getConfig(),{span:i}=o,{remoteAddress:s,remotePort:a}=n,c={[He.ATTR_NETWORK_PEER_ADDRESS]:s,[He.ATTR_NETWORK_PEER_PORT]:a};if(r.headersToSpanAttributes?.requestHeaders){let u=new Set(r.headersToSpanAttributes.requestHeaders.map(p=>p.toLowerCase())),d=this.parseRequestHeaders(t);for(let[p,f]of d.entries())if(u.has(p)){let m=Array.isArray(f)?f:[f];c[`http.request.header.${p}`]=m}}i.setAttributes(c)}onResponseHeaders({request:t,response:n}){let o=this._recordFromReq.get(t);if(!o)return;let{span:r,attributes:i}=o,s={[He.ATTR_HTTP_RESPONSE_STATUS_CODE]:n.statusCode},a=this.getConfig();if((0,Tl.safeExecuteInTheMiddle)(()=>a.responseHook?.(r,{request:t,response:n}),c=>c&&this._diag.error("caught responseHook error: ",c),!0),a.headersToSpanAttributes?.responseHeaders){let c=new Set;a.headersToSpanAttributes?.responseHeaders.forEach(u=>c.add(u.toLowerCase()));for(let u=0;u<n.headers.length;u=u+2){let d=n.headers[u],p=n.headers[u+1];if(d===void 0||p===void 0)continue;let f=d.toString().toLowerCase(),m=p;if(c.has(f)){let _=`http.response.header.${f}`;Object.prototype.hasOwnProperty.call(s,_)?s[_].push(m.toString()):s[_]=[m.toString()]}}}r.setAttributes(s),r.setStatus({code:n.statusCode>=400?Wt.SpanStatusCode.ERROR:Wt.SpanStatusCode.UNSET}),o.attributes=Object.assign(i,s)}onDone({request:t}){let n=this._recordFromReq.get(t);if(!n)return;let{span:o,attributes:r,startTime:i}=n;o.end(),this._recordFromReq.delete(t),this.recordRequestDuration(r,i)}onError({request:t,error:n}){let o=this._recordFromReq.get(t);if(!o)return;let{span:r,attributes:i,startTime:s}=o;r.recordException(n),r.setStatus({code:Wt.SpanStatusCode.ERROR,message:n.message}),r.end(),this._recordFromReq.delete(t),i[He.ATTR_ERROR_TYPE]=n.message,this.recordRequestDuration(i,s)}recordRequestDuration(t,n){let o={};[He.ATTR_HTTP_RESPONSE_STATUS_CODE,He.ATTR_HTTP_REQUEST_METHOD,He.ATTR_SERVER_ADDRESS,He.ATTR_SERVER_PORT,He.ATTR_URL_SCHEME,He.ATTR_ERROR_TYPE].forEach(s=>{s in t&&(o[s]=t[s])});let i=(0,Sl.hrTimeToMilliseconds)((0,Sl.hrTimeDuration)(n,(0,Sl.hrTime)()))/1e3;this._httpClientDurationHistogram.record(i,o)}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"}}});function yre(e,t="/"){let n=`${e}`;return n.endsWith("/")&&t.startsWith("/")?`${n}${t.slice(1)}`:!n.endsWith("/")&&!t.startsWith("/")?`${n}/${t}`:`${n}${t}`}function XDe(e,t={}){return typeof e.spans=="boolean"?e.spans:!t.skipOpenTelemetrySetup&&At(t)}function QDe(e={}){return{requireParentforSpans:!1,ignoreRequestHook:n=>{let o=yre(n.origin,n.path),r=e.ignoreOutgoingRequests;return!!(r&&o&&r(o))},startSpanHook:n=>{let o=yre(n.origin,n.path);if(o.startsWith("data:")){let r=$_(o);return{[te]:"auto.http.otel.node_fetch","http.url":r,[gu]:r,[tr]:`${n.method||"GET"} ${r}`}}return{[te]:"auto.http.otel.node_fetch"}},requestHook:e.requestHook,responseHook:e.responseHook,headersToSpanAttributes:e.headersToSpanAttributes}}var Rre,KDe,ZDe,JDe,rf,Pk=E(()=>{l();Are();ne();Ye();Rre="NodeFetch",KDe=ae(Rre,ZR,e=>QDe(e)),ZDe=ae(`${Rre}.sentry`,ol,e=>e),JDe=((e={})=>({name:"NodeFetch",setupOnce(){XDe(e,Z()?.getOptions())&&KDe(e),ZDe(e)}})),rf=JDe});var sn,Al=E(()=>{l();sn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__});var XR,Ire,QR,bre,eke,Nre,xk,tke,Mk,Ore=E(()=>{l();XR=U(Me(),1),Ire=U(K(),1),QR=U(rt(),1);Ye();ne();Al();bre="Express",eke=[">=4.0.0 <6"],Nre=ae(bre,e=>new xk(e)),xk=class extends XR.InstrumentationBase{constructor(t={}){super("sentry-express",ve,t)}init(){return new XR.InstrumentationNodeModuleDefinition("express",eke,n=>{try{qx(n,()=>({...this.getConfig(),onRouteResolved(o){let r=(0,QR.getRPCMetadata)(Ire.context.active());o&&r?.type===QR.RPCType.HTTP&&(r.route=o)}}))}catch(o){sn&&b.error("Failed to patch express module:",o)}return n},n=>n)}},tke=(e=>({name:bre,setupOnce(){Nre(e)}})),Mk=tke});var Cre=A(uh=>{"use strict";l();Object.defineProperty(uh,"__esModule",{value:!0});uh.SeverityNumber=void 0;var nke;(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"})(nke=uh.SeverityNumber||(uh.SeverityNumber={}))});var tI=A(of=>{"use strict";l();Object.defineProperty(of,"__esModule",{value:!0});of.NOOP_LOGGER=of.NoopLogger=void 0;var eI=class{emit(t){}};of.NoopLogger=eI;of.NOOP_LOGGER=new eI});var vre=A(cs=>{"use strict";l();Object.defineProperty(cs,"__esModule",{value:!0});cs.API_BACKWARDS_COMPATIBILITY_VERSION=cs.makeGetter=cs._global=cs.GLOBAL_LOGS_API_KEY=void 0;cs.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");cs._global=globalThis;function rke(e,t,n){return o=>o===e?t:n}cs.makeGetter=rke;cs.API_BACKWARDS_COMPATIBILITY_VERSION=1});var Lk=A(sf=>{"use strict";l();Object.defineProperty(sf,"__esModule",{value:!0});sf.NOOP_LOGGER_PROVIDER=sf.NoopLoggerProvider=void 0;var oke=tI(),nI=class{getLogger(t,n,o){return new oke.NoopLogger}};sf.NoopLoggerProvider=nI;sf.NOOP_LOGGER_PROVIDER=new nI});var Pre=A(rI=>{"use strict";l();Object.defineProperty(rI,"__esModule",{value:!0});rI.ProxyLogger=void 0;var ike=tI(),wk=class{constructor(t,n,o,r){this._provider=t,this.name=n,this.version=o,this.options=r}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):ike.NOOP_LOGGER}};rI.ProxyLogger=wk});var xre=A(oI=>{"use strict";l();Object.defineProperty(oI,"__esModule",{value:!0});oI.ProxyLoggerProvider=void 0;var ske=Lk(),ake=Pre(),Dk=class{getLogger(t,n,o){var r;return(r=this._getDelegateLogger(t,n,o))!==null&&r!==void 0?r:new ake.ProxyLogger(this,t,n,o)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:ske.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,o){var r;return(r=this._delegate)===null||r===void 0?void 0:r.getLogger(t,n,o)}};oI.ProxyLoggerProvider=Dk});var Lre=A(iI=>{"use strict";l();Object.defineProperty(iI,"__esModule",{value:!0});iI.LogsAPI=void 0;var vo=vre(),cke=Lk(),Mre=xre(),kk=class e{constructor(){this._proxyLoggerProvider=new Mre.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return vo._global[vo.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(vo._global[vo.GLOBAL_LOGS_API_KEY]=(0,vo.makeGetter)(vo.API_BACKWARDS_COMPATIBILITY_VERSION,t,cke.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=vo._global[vo.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(vo._global,vo.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,o){return this.getLoggerProvider().getLogger(t,n,o)}disable(){delete vo._global[vo.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new Mre.ProxyLoggerProvider}};iI.LogsAPI=kk});var Uk=A(us=>{"use strict";l();Object.defineProperty(us,"__esModule",{value:!0});us.logs=us.NoopLogger=us.NOOP_LOGGER=us.SeverityNumber=void 0;var uke=Cre();Object.defineProperty(us,"SeverityNumber",{enumerable:!0,get:function(){return uke.SeverityNumber}});var wre=tI();Object.defineProperty(us,"NOOP_LOGGER",{enumerable:!0,get:function(){return wre.NOOP_LOGGER}});Object.defineProperty(us,"NoopLogger",{enumerable:!0,get:function(){return wre.NoopLogger}});var lke=Lre();us.logs=lke.LogsAPI.getInstance()});var Dre=A(af=>{"use strict";l();Object.defineProperty(af,"__esModule",{value:!0});af.disableInstrumentations=af.enableInstrumentations=void 0;function dke(e,t,n,o){for(let r=0,i=e.length;r<i;r++){let s=e[r];t&&s.setTracerProvider(t),n&&s.setMeterProvider(n),o&&s.setLoggerProvider&&s.setLoggerProvider(o),s.getConfig().enabled||s.enable()}}af.enableInstrumentations=dke;function pke(e){e.forEach(t=>t.disable())}af.disableInstrumentations=pke});var $re=A(sI=>{"use strict";l();Object.defineProperty(sI,"__esModule",{value:!0});sI.registerInstrumentations=void 0;var kre=K(),fke=Uk(),Ure=Dre();function mke(e){let t=e.tracerProvider||kre.trace.getTracerProvider(),n=e.meterProvider||kre.metrics.getMeterProvider(),o=e.loggerProvider||fke.logs.getLoggerProvider(),r=e.instrumentations?.flat()??[];return(0,Ure.enableInstrumentations)(r,t,n,o),()=>{(0,Ure.disableInstrumentations)(r)}}sI.registerInstrumentations=mke});var Yre=A(aI=>{"use strict";l();Object.defineProperty(aI,"__esModule",{value:!0});aI.satisfies=void 0;var jk=K(),Fre=/^(?: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-]+)*))?$/,_ke=/^(?<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-]+)*))?$/,gke={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function hke(e,t,n){if(!Eke(e))return jk.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let o=yke(e);if(!o)return!1;let r=[],i=Hre(o,t,r,n);return i&&!n?.includePrerelease?Ske(o,r):i}aI.satisfies=hke;function Eke(e){return typeof e=="string"&&Fre.test(e)}function Hre(e,t,n,o){if(t.includes("||")){let r=t.trim().split("||");for(let i of r)if($k(e,i,n,o))return!0;return!1}else if(t.includes(" - "))t=Fke(t,o);else if(t.includes(" ")){let r=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of r)if(!$k(e,i,n,o))return!1;return!0}return $k(e,t,n,o)}function $k(e,t,n,o){if(t=Ake(t,o),t.includes(" "))return Hre(e,t,n,o);{let r=Rke(t);return n.push(r),Tke(e,r)}}function Tke(e,t){if(t.invalid)return!1;if(!t.version||Gk(t.version))return!0;let n=Gre(e.versionSegments||[],t.versionSegments||[]);if(n===0){let o=e.prereleaseSegments||[],r=t.prereleaseSegments||[];!o.length&&!r.length?n=0:!o.length&&r.length?n=1:o.length&&!r.length?n=-1:n=Gre(o,r)}return gke[t.op]?.includes(n)}function Ske(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function Ake(e,t){return e=e.trim(),e=jke(e,t),e=Gke(e),e=Vke(e,t),e=e.trim(),e}function lr(e){return!e||e.toLowerCase()==="x"||e==="*"}function yke(e){let t=e.match(Fre);if(!t){jk.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,o=t.groups.prerelease,r=t.groups.build,i=n.split("."),s=o?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:o,prereleaseSegments:s,prereleaseSegmentCount:s?s.length:0,build:r}}function Rke(e){if(!e)return{};let t=e.match(_ke);if(!t)return jk.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,o=t.groups.version,r=t.groups.prerelease,i=t.groups.build,s=o.split("."),a=r?.split(".");return n==="=="&&(n="="),{op:n||"=",version:o,versionSegments:s,versionSegmentCount:s.length,prerelease:r,prereleaseSegments:a,prereleaseSegmentCount:a?a.length:0,build:i}}function Gk(e){return e==="*"||e==="x"||e==="X"}function Bre(e){let t=parseInt(e,10);return isNaN(t)?e:t}function Ike(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 bke(e,t){if(Gk(e)||Gk(t))return 0;let[n,o]=Ike(Bre(e),Bre(t));return n>o?1:n<o?-1:0}function Gre(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let o=bke(e[n]||"0",t[n]||"0");if(o!==0)return o}return 0}var zre="[a-zA-Z0-9-]",qre="0|[1-9]\\d*",Nke=`\\d*[a-zA-Z-]${zre}*`,Oke="((?:<|>)?=?)",jre=`(?:${qre}|${Nke})`,Cke=`(?:-(${jre}(?:\\.${jre})*))`,Vre=`${zre}+`,vke=`(?:\\+(${Vre}(?:\\.${Vre})*))`,Bk=`${qre}|x|X|\\*`,lh=`[v=\\s]*(${Bk})(?:\\.(${Bk})(?:\\.(${Bk})(?:${Cke})?${vke}?)?)?`,Pke=`^${Oke}\\s*${lh}$`,xke=new RegExp(Pke),Mke=`^\\s*(${lh})\\s+-\\s+(${lh})\\s*$`,Lke=new RegExp(Mke),wke="(?:~>?)",Dke=`^${wke}${lh}$`,kke=new RegExp(Dke),Uke="(?:\\^)",$ke=`^${Uke}${lh}$`,Bke=new RegExp($ke);function Gke(e){let t=kke;return e.replace(t,(n,o,r,i,s)=>{let a;return lr(o)?a="":lr(r)?a=`>=${o}.0.0 <${+o+1}.0.0-0`:lr(i)?a=`>=${o}.${r}.0 <${o}.${+r+1}.0-0`:s?a=`>=${o}.${r}.${i}-${s} <${o}.${+r+1}.0-0`:a=`>=${o}.${r}.${i} <${o}.${+r+1}.0-0`,a})}function jke(e,t){let n=Bke,o=t?.includePrerelease?"-0":"";return e.replace(n,(r,i,s,a,c)=>{let u;return lr(i)?u="":lr(s)?u=`>=${i}.0.0${o} <${+i+1}.0.0-0`:lr(a)?i==="0"?u=`>=${i}.${s}.0${o} <${i}.${+s+1}.0-0`:u=`>=${i}.${s}.0${o} <${+i+1}.0.0-0`:c?i==="0"?s==="0"?u=`>=${i}.${s}.${a}-${c} <${i}.${s}.${+a+1}-0`:u=`>=${i}.${s}.${a}-${c} <${i}.${+s+1}.0-0`:u=`>=${i}.${s}.${a}-${c} <${+i+1}.0.0-0`:i==="0"?s==="0"?u=`>=${i}.${s}.${a}${o} <${i}.${s}.${+a+1}-0`:u=`>=${i}.${s}.${a}${o} <${i}.${+s+1}.0-0`:u=`>=${i}.${s}.${a} <${+i+1}.0.0-0`,u})}function Vke(e,t){let n=xke;return e.replace(n,(o,r,i,s,a,c)=>{let u=lr(i),d=u||lr(s),p=d||lr(a),f=p;return r==="="&&f&&(r=""),c=t?.includePrerelease?"-0":"",u?r===">"||r==="<"?o="<0.0.0-0":o="*":r&&f?(d&&(s=0),a=0,r===">"?(r=">=",d?(i=+i+1,s=0,a=0):(s=+s+1,a=0)):r==="<="&&(r="<",d?i=+i+1:s=+s+1),r==="<"&&(c="-0"),o=`${r+i}.${s}.${a}${c}`):d?o=`>=${i}.0.0${c} <${+i+1}.0.0-0`:p&&(o=`>=${i}.${s}.0${c} <${i}.${+s+1}.0-0`),o})}function Fke(e,t){let n=Lke;return e.replace(n,(o,r,i,s,a,c,u,d,p,f,m,_)=>(lr(i)?r="":lr(s)?r=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:lr(a)?r=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:c?r=`>=${r}`:r=`>=${r}${t?.includePrerelease?"-0":""}`,lr(p)?d="":lr(f)?d=`<${+p+1}.0.0-0`:lr(m)?d=`<${p}.${+f+1}.0-0`:_?d=`<=${p}.${f}.${m}-${_}`:t?.includePrerelease?d=`<${p}.${f}.${+m+1}-0`:d=`<=${d}`,`${r} ${d}`.trim()))}});var Vk=A(Pn=>{"use strict";l();Object.defineProperty(Pn,"__esModule",{value:!0});Pn.massUnwrap=Pn.unwrap=Pn.massWrap=Pn.wrap=void 0;var dr=console.error.bind(console);function dh(e,t,n){let o=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:o,writable:!0,value:n})}var Hke=(e,t,n)=>{if(!e||!e[t]){dr("no original function "+String(t)+" to wrap");return}if(!n){dr("no wrapper function"),dr(new Error().stack);return}let o=e[t];if(typeof o!="function"||typeof n!="function"){dr("original object and wrapper must be functions");return}let r=n(o,t);return dh(r,"__original",o),dh(r,"__unwrap",()=>{e[t]===r&&dh(e,t,o)}),dh(r,"__wrapped",!0),dh(e,t,r),r};Pn.wrap=Hke;var zke=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{dr("must provide one or more modules to patch"),dr(new Error().stack);return}if(!(t&&Array.isArray(t))){dr("must provide one or more functions to wrap on modules");return}e.forEach(o=>{t.forEach(r=>{(0,Pn.wrap)(o,r,n)})})};Pn.massWrap=zke;var qke=(e,t)=>{if(!e||!e[t]){dr("no function to unwrap."),dr(new Error().stack);return}let n=e[t];if(!n.__unwrap)dr("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Pn.unwrap=qke;var Yke=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{dr("must provide one or more modules to patch"),dr(new Error().stack);return}if(!(t&&Array.isArray(t))){dr("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(o=>{(0,Pn.unwrap)(n,o)})})};Pn.massUnwrap=Yke;function ph(e){e&&e.logger&&(typeof e.logger!="function"?dr("new logger isn't a function, not replacing"):dr=e.logger)}Pn.default=ph;ph.wrap=Pn.wrap;ph.massWrap=Pn.massWrap;ph.unwrap=Pn.unwrap;ph.massUnwrap=Pn.massUnwrap});var Wre=A(uI=>{"use strict";l();Object.defineProperty(uI,"__esModule",{value:!0});uI.InstrumentationAbstract=void 0;var Fk=K(),Wke=Uk(),cI=Vk(),Hk=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,o){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(o),this._diag=Fk.diag.createComponentLogger({namespace:t}),this._tracer=Fk.trace.getTracer(t,n),this._meter=Fk.metrics.getMeter(t,n),this._logger=Wke.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=cI.wrap;_unwrap=cI.unwrap;_massWrap=cI.massWrap;_massUnwrap=cI.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,o,r){if(t)try{t(o,r)}catch(i){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},i)}}};uI.InstrumentationAbstract=Hk});var Kre=A(fc=>{"use strict";l();Object.defineProperty(fc,"__esModule",{value:!0});fc.ModuleNameTrie=fc.ModuleNameSeparator=void 0;fc.ModuleNameSeparator="/";var lI=class{hooks=[];children=new Map},zk=class{_trie=new lI;_counter=0;insert(t){let n=this._trie;for(let o of t.moduleName.split(fc.ModuleNameSeparator)){let r=n.children.get(o);r||(r=new lI,n.children.set(o,r)),n=r}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:o}={}){let r=this._trie,i=[],s=!0;for(let a of t.split(fc.ModuleNameSeparator)){let c=r.children.get(a);if(!c){s=!1;break}o||i.push(...c.hooks),r=c}return o&&s&&i.push(...r.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((a,c)=>a.insertedId-c.insertedId),i.map(({hook:a})=>a))}};fc.ModuleNameTrie=zk});var Jre=A(dI=>{"use strict";l();Object.defineProperty(dI,"__esModule",{value:!0});dI.RequireInTheMiddleSingleton=void 0;var Kke=qu(),Zre=require("path"),qk=Kre(),Zke=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),Yk=class e{_moduleNameTrie=new qk.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new Kke.Hook(null,{internals:!0},(t,n,o)=>{let r=Jke(n),i=this._moduleNameTrie.search(r,{maintainInsertionOrder:!0,fullOnly:o===void 0});for(let{onRequire:s}of i)t=s(t,n,o);return t})}register(t,n){let o={moduleName:t,onRequire:n};return this._moduleNameTrie.insert(o),o}static getInstance(){return Zke?new e:this._instance=this._instance??new e}};dI.RequireInTheMiddleSingleton=Yk;function Jke(e){return Zre.sep!==qk.ModuleNameSeparator?e.split(Zre.sep).join(qk.ModuleNameSeparator):e}});var noe=A(fh=>{l();var Xre=[],Wk=new WeakMap,Qre=new WeakMap,eoe=new Map,toe=[],Xke={set(e,t,n){let o=Wk.get(e),r=o&&o[t];return typeof r=="function"?r(n):!0},get(e,t){if(t===Symbol.toStringTag)return"Module";let n=Qre.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 o=Wk.get(e),r=o&&o[t];return typeof r=="function"?r(n.value):!0}};function Qke(e,t,n,o,r){eoe.set(e,r),Wk.set(t,n),Qre.set(t,o);let i=new Proxy(t,Xke);Xre.forEach(s=>s(e,i,r)),toe.push([e,i,r])}fh.register=Qke;fh.importHooks=Xre;fh.specifiers=eoe;fh.toHook=toe});var Xk=A((NEt,uf)=>{l();var roe=require("path"),e0e=WA(),{fileURLToPath:t0e}=require("url"),{MessageChannel:n0e}=require("worker_threads"),{isBuiltin:Kk}=require("module");Kk||(Kk=()=>!0);var{importHooks:Zk,specifiers:r0e,toHook:o0e}=noe();function ooe(e){Zk.push(e),o0e.forEach(([t,n,o])=>e(t,n,o))}function ioe(e){let t=Zk.indexOf(e);t>-1&&Zk.splice(t,1)}function cf(e,t,n,o){let r=e(t,n,o);r&&r!==t&&"default"in t&&(t.default=r)}var Jk;function i0e(){let{port1:e,port2:t}=new n0e,n=0,o;Jk=a=>{n++,e.postMessage(a)},e.on("message",()=>{n--,o&&n<=0&&o()}).unref();function r(){let a=setInterval(()=>{},1e3),c=new Promise(u=>{o=u}).then(()=>{clearInterval(a)});return n===0&&o(),c}let i=t;return{registerOptions:{data:{addHookMessagePort:i,include:[]},transferList:[i]},addHookMessagePort:i,waitForAllMessagesAcknowledged:r}}function mh(e,t,n){if(!(this instanceof mh))return new mh(e,t,n);typeof e=="function"?(n=e,e=null,t=null):typeof t=="function"&&(n=t,t=null);let o=t?t.internals===!0:!1;Jk&&Array.isArray(e)&&Jk(e),this._iitmHook=(r,i,s)=>{let a=r,c=a.startsWith("node:"),u,d;if(c){let p=r.slice(5);Kk(p)&&(r=p)}else if(a.startsWith("file://")){let p=Error.stackTraceLimit;Error.stackTraceLimit=0;try{u=t0e(r),r=u}catch{}if(Error.stackTraceLimit=p,u){let f=e0e(u);f&&(r=f.name,d=f.basedir)}}if(e)for(let p of e)if(u&&p===u)cf(n,i,u,void 0);else if(p===r){if(!d)cf(n,i,r,d);else if(d.endsWith(r0e.get(a)))cf(n,i,r,d);else if(o){let f=r+roe.sep+roe.relative(d,u);cf(n,i,f,d)}}else p===s&&cf(n,i,s,d);else cf(n,i,r,d)},ooe(this._iitmHook)}mh.prototype.unhook=function(){ioe(this._iitmHook)};uf.exports=mh;uf.exports.Hook=mh;uf.exports.addHook=ooe;uf.exports.removeHook=ioe;uf.exports.createAddHookMessageChannel=i0e});var Qk=A(mc=>{"use strict";l();Object.defineProperty(mc,"__esModule",{value:!0});mc.isWrapped=mc.safeExecuteInTheMiddleAsync=mc.safeExecuteInTheMiddle=void 0;function s0e(e,t,n){let o,r;try{r=e()}catch(i){o=i}finally{if(t(o,r),o&&!n)throw o;return r}}mc.safeExecuteInTheMiddle=s0e;async function a0e(e,t,n){let o,r;try{r=await e()}catch(i){o=i}finally{if(await t(o,r),o&&!n)throw o;return r}}mc.safeExecuteInTheMiddleAsync=a0e;function c0e(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}mc.isWrapped=c0e});var coe=A(pI=>{"use strict";l();Object.defineProperty(pI,"__esModule",{value:!0});pI.InstrumentationBase=void 0;var _h=require("path"),soe=require("util"),u0e=Yre(),e0=Vk(),l0e=Wre(),d0e=Jre(),p0e=Xk(),gh=K(),f0e=qu(),m0e=require("fs"),_0e=Qk(),t0=class extends l0e.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=d0e.RequireInTheMiddleSingleton.getInstance();_enabled=!1;constructor(t,n,o){super(t,n,o);let r=this.init();r&&!Array.isArray(r)&&(r=[r]),this._modules=r||[],this._config.enabled&&this.enable()}_wrap=(t,n,o)=>{if((0,_0e.isWrapped)(t[n])&&this._unwrap(t,n),soe.types.isProxy(t)){let r=(0,e0.wrap)(Object.assign({},t),n,o);return Object.defineProperty(t,n,{value:r}),r}else return(0,e0.wrap)(t,n,o)};_unwrap=(t,n)=>soe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,e0.unwrap)(t,n);_massWrap=(t,n,o)=>{if(t)Array.isArray(t)||(t=[t]);else{gh.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){gh.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(r=>{n.forEach(i=>{this._wrap(r,i,o)})})};_massUnwrap=(t,n)=>{if(t)Array.isArray(t)||(t=[t]);else{gh.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){gh.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(o=>{n.forEach(r=>{this._unwrap(o,r)})})};_warnOnPreloadedModules(){this._modules.forEach(t=>{let{name:n}=t;try{let o=require.resolve(n);require.cache[o]&&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,m0e.readFileSync)(_h.join(t,"package.json"),{encoding:"utf8"}),o=JSON.parse(n).version;return typeof o=="string"?o:void 0}catch{gh.diag.warn("Failed extracting version",t)}}_onRequire(t,n,o,r){if(!r)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(r);if(t.moduleVersion=i,t.name===o)return aoe(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:r}),t.patch(n,t.moduleVersion)):n;let s=t.files??[],a=_h.normalize(o);return s.filter(u=>u.name===a&&aoe(u.supportedVersions,i,t.includePrerelease)).reduce((u,d)=>(d.moduleExports=u,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:t.name,version:t.moduleVersion,fileName:d.name,baseDir:r}),d.patch(u,t.moduleVersion)):u),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,a,c)=>{if(!c&&_h.isAbsolute(a)){let u=_h.parse(a);a=u.name,c=u.dir}return this._onRequire(t,s,a,c)},o=(s,a,c)=>this._onRequire(t,s,a,c),r=_h.isAbsolute(t.name)?new f0e.Hook([t.name],{internals:!0},o):this._requireInTheMiddleSingleton.register(t.name,o);this._hooks.push(r);let i=new p0e.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}};pI.InstrumentationBase=t0;function aoe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(o=>(0,u0e.satisfies)(t,o,{includePrerelease:n}))}});var uoe=A(fI=>{"use strict";l();Object.defineProperty(fI,"__esModule",{value:!0});fI.normalize=void 0;var g0e=require("path");Object.defineProperty(fI,"normalize",{enumerable:!0,get:function(){return g0e.normalize}})});var loe=A(lf=>{"use strict";l();Object.defineProperty(lf,"__esModule",{value:!0});lf.normalize=lf.InstrumentationBase=void 0;var h0e=coe();Object.defineProperty(lf,"InstrumentationBase",{enumerable:!0,get:function(){return h0e.InstrumentationBase}});var E0e=uoe();Object.defineProperty(lf,"normalize",{enumerable:!0,get:function(){return E0e.normalize}})});var n0=A(df=>{"use strict";l();Object.defineProperty(df,"__esModule",{value:!0});df.normalize=df.InstrumentationBase=void 0;var doe=loe();Object.defineProperty(df,"InstrumentationBase",{enumerable:!0,get:function(){return doe.InstrumentationBase}});Object.defineProperty(df,"normalize",{enumerable:!0,get:function(){return doe.normalize}})});var poe=A(mI=>{"use strict";l();Object.defineProperty(mI,"__esModule",{value:!0});mI.InstrumentationNodeModuleDefinition=void 0;var r0=class{files;name;supportedVersions;patch;unpatch;constructor(t,n,o,r,i){this.files=i||[],this.name=t,this.supportedVersions=n,this.patch=o,this.unpatch=r}};mI.InstrumentationNodeModuleDefinition=r0});var foe=A(_I=>{"use strict";l();Object.defineProperty(_I,"__esModule",{value:!0});_I.InstrumentationNodeModuleFile=void 0;var T0e=n0(),o0=class{name;supportedVersions;patch;unpatch;constructor(t,n,o,r){this.name=(0,T0e.normalize)(t),this.supportedVersions=n,this.patch=o,this.unpatch=r}};_I.InstrumentationNodeModuleFile=o0});var moe=A(yl=>{"use strict";l();Object.defineProperty(yl,"__esModule",{value:!0});yl.semconvStabilityFromStr=yl.SemconvStability=void 0;var gI;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(gI=yl.SemconvStability||(yl.SemconvStability={}));function S0e(e,t){let n=gI.OLD,o=t?.split(",").map(r=>r.trim()).filter(r=>r!=="");for(let r of o??[])if(r.toLowerCase()===e+"/dup"){n=gI.DUPLICATE;break}else r.toLowerCase()===e&&(n=gI.STABLE);return n}yl.semconvStabilityFromStr=S0e});var goe=A(Kt=>{"use strict";l();Object.defineProperty(Kt,"__esModule",{value:!0});Kt.semconvStabilityFromStr=Kt.SemconvStability=Kt.safeExecuteInTheMiddleAsync=Kt.safeExecuteInTheMiddle=Kt.isWrapped=Kt.InstrumentationNodeModuleFile=Kt.InstrumentationNodeModuleDefinition=Kt.InstrumentationBase=Kt.registerInstrumentations=void 0;var A0e=$re();Object.defineProperty(Kt,"registerInstrumentations",{enumerable:!0,get:function(){return A0e.registerInstrumentations}});var y0e=n0();Object.defineProperty(Kt,"InstrumentationBase",{enumerable:!0,get:function(){return y0e.InstrumentationBase}});var R0e=poe();Object.defineProperty(Kt,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return R0e.InstrumentationNodeModuleDefinition}});var I0e=foe();Object.defineProperty(Kt,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return I0e.InstrumentationNodeModuleFile}});var i0=Qk();Object.defineProperty(Kt,"isWrapped",{enumerable:!0,get:function(){return i0.isWrapped}});Object.defineProperty(Kt,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return i0.safeExecuteInTheMiddle}});Object.defineProperty(Kt,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return i0.safeExecuteInTheMiddleAsync}});var _oe=moe();Object.defineProperty(Kt,"SemconvStability",{enumerable:!0,get:function(){return _oe.SemconvStability}});Object.defineProperty(Kt,"semconvStabilityFromStr",{enumerable:!0,get:function(){return _oe.semconvStabilityFromStr}})});var hoe=A((qEt,b0e)=>{b0e.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 Toe=A(Rl=>{"use strict";l();Object.defineProperty(Rl,"__esModule",{value:!0});Rl.range=Rl.balanced=void 0;var N0e=(e,t,n)=>{let o=e instanceof RegExp?Eoe(e,n):e,r=t instanceof RegExp?Eoe(t,n):t,i=o!==null&&r!=null&&(0,Rl.range)(o,r,n);return i&&{start:i[0],end:i[1],pre:n.slice(0,i[0]),body:n.slice(i[0]+o.length,i[1]),post:n.slice(i[1]+r.length)}};Rl.balanced=N0e;var Eoe=(e,t)=>{let n=t.match(e);return n?n[0]:null},O0e=(e,t,n)=>{let o,r,i,s,a,c=n.indexOf(e),u=n.indexOf(t,c+1),d=c;if(c>=0&&u>0){if(e===t)return[c,u];for(o=[],i=n.length;d>=0&&!a;){if(d===c)o.push(d),c=n.indexOf(e,d+1);else if(o.length===1){let p=o.pop();p!==void 0&&(a=[p,u])}else r=o.pop(),r!==void 0&&r<i&&(i=r,s=u),u=n.indexOf(t,d+1);d=c<u&&c>=0?c:u}o.length&&s!==void 0&&(a=[i,s])}return a};Rl.range=O0e});var Noe=A(pf=>{"use strict";l();Object.defineProperty(pf,"__esModule",{value:!0});pf.EXPANSION_MAX=void 0;pf.expand=G0e;var Soe=Toe(),Aoe="\0SLASH"+Math.random()+"\0",yoe="\0OPEN"+Math.random()+"\0",a0="\0CLOSE"+Math.random()+"\0",Roe="\0COMMA"+Math.random()+"\0",Ioe="\0PERIOD"+Math.random()+"\0",C0e=new RegExp(Aoe,"g"),v0e=new RegExp(yoe,"g"),P0e=new RegExp(a0,"g"),x0e=new RegExp(Roe,"g"),M0e=new RegExp(Ioe,"g"),L0e=/\\\\/g,w0e=/\\{/g,D0e=/\\}/g,k0e=/\\,/g,U0e=/\\\./g;pf.EXPANSION_MAX=1e5;function s0(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function $0e(e){return e.replace(L0e,Aoe).replace(w0e,yoe).replace(D0e,a0).replace(k0e,Roe).replace(U0e,Ioe)}function B0e(e){return e.replace(C0e,"\\").replace(v0e,"{").replace(P0e,"}").replace(x0e,",").replace(M0e,".")}function boe(e){if(!e)return[""];let t=[],n=(0,Soe.balanced)("{","}",e);if(!n)return e.split(",");let{pre:o,body:r,post:i}=n,s=o.split(",");s[s.length-1]+="{"+r+"}";let a=boe(i);return i.length&&(s[s.length-1]+=a.shift(),s.push.apply(s,a)),t.push.apply(t,s),t}function G0e(e,t={}){if(!e)return[];let{max:n=pf.EXPANSION_MAX}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),hh($0e(e),n,!0).map(B0e)}function j0e(e){return"{"+e+"}"}function V0e(e){return/^-?0\d/.test(e)}function F0e(e,t){return e<=t}function H0e(e,t){return e>=t}function hh(e,t,n){let o=[],r=(0,Soe.balanced)("{","}",e);if(!r)return[e];let i=r.pre,s=r.post.length?hh(r.post,t,!1):[""];if(/\$$/.test(r.pre))for(let a=0;a<s.length&&a<t;a++){let c=i+"{"+r.body+"}"+s[a];o.push(c)}else{let a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(r.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(r.body),u=a||c,d=r.body.indexOf(",")>=0;if(!u&&!d)return r.post.match(/,(?!,).*\}/)?(e=r.pre+"{"+r.body+a0+r.post,hh(e,t,!0)):[e];let p;if(u)p=r.body.split(/\.\./);else if(p=boe(r.body),p.length===1&&p[0]!==void 0&&(p=hh(p[0],t,!1).map(j0e),p.length===1))return s.map(m=>r.pre+p[0]+m);let f;if(u&&p[0]!==void 0&&p[1]!==void 0){let m=s0(p[0]),_=s0(p[1]),h=Math.max(p[0].length,p[1].length),T=p.length===3&&p[2]!==void 0?Math.max(Math.abs(s0(p[2])),1):1,S=F0e;_<m&&(T*=-1,S=H0e);let v=p.some(V0e);f=[];for(let x=m;S(x,_);x+=T){let P;if(c)P=String.fromCharCode(x),P==="\\"&&(P="");else if(P=String(x),v){let N=h-P.length;if(N>0){let F=new Array(N+1).join("0");x<0?P="-"+F+P.slice(1):P=F+P}}f.push(P)}}else{f=[];for(let m=0;m<p.length;m++)f.push.apply(f,hh(p[m],t,!1))}for(let m=0;m<f.length;m++)for(let _=0;_<s.length&&o.length<t;_++){let h=i+f[m]+s[_];(!n||u||h)&&o.push(h)}}return o}});var Ooe=A(hI=>{"use strict";l();Object.defineProperty(hI,"__esModule",{value:!0});hI.assertValidPattern=void 0;var z0e=1024*64,q0e=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>z0e)throw new TypeError("pattern is too long")};hI.assertValidPattern=q0e});var voe=A(EI=>{"use strict";l();Object.defineProperty(EI,"__esModule",{value:!0});EI.parseClass=void 0;var Y0e={"[: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]},Eh=e=>e.replace(/[[\]\\-]/g,"\\$&"),W0e=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Coe=e=>e.join(""),K0e=(e,t)=>{let n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");let o=[],r=[],i=n+1,s=!1,a=!1,c=!1,u=!1,d=n,p="";e:for(;i<e.length;){let h=e.charAt(i);if((h==="!"||h==="^")&&i===n+1){u=!0,i++;continue}if(h==="]"&&s&&!c){d=i+1;break}if(s=!0,h==="\\"&&!c){c=!0,i++;continue}if(h==="["&&!c){for(let[T,[S,y,v]]of Object.entries(Y0e))if(e.startsWith(T,i)){if(p)return["$.",!1,e.length-n,!0];i+=T.length,v?r.push(S):o.push(S),a=a||y;continue e}}if(c=!1,p){h>p?o.push(Eh(p)+"-"+Eh(h)):h===p&&o.push(Eh(h)),p="",i++;continue}if(e.startsWith("-]",i+1)){o.push(Eh(h+"-")),i+=2;continue}if(e.startsWith("-",i+1)){p=h,i+=2;continue}o.push(Eh(h)),i++}if(d<i)return["",!1,0,!1];if(!o.length&&!r.length)return["$.",!1,e.length-n,!0];if(r.length===0&&o.length===1&&/^\\?.$/.test(o[0])&&!u){let h=o[0].length===2?o[0].slice(-1):o[0];return[W0e(h),!1,d-n,!1]}let f="["+(u?"^":"")+Coe(o)+"]",m="["+(u?"":"^")+Coe(r)+"]";return[o.length&&r.length?"("+f+"|"+m+")":o.length?f:m,a,d-n,!0]};EI.parseClass=K0e});var SI=A(TI=>{"use strict";l();Object.defineProperty(TI,"__esModule",{value:!0});TI.unescape=void 0;var Z0e=(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");TI.unescape=Z0e});var l0=A(II=>{"use strict";l();var kr;Object.defineProperty(II,"__esModule",{value:!0});II.AST=void 0;var J0e=voe(),AI=SI(),X0e=new Set(["!","?","+","*","@"]),c0=e=>X0e.has(e),Poe=e=>c0(e.type),Q0e=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),eUe=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),tUe=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),xoe=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),nUe="(?!(?:^|/)\\.\\.?(?:$|/))",yI="(?!\\.)",rUe=new Set(["[","."]),oUe=new Set(["..","."]),iUe=new Set("().*{}+?[]^$\\!"),sUe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),u0="[^/]",Moe=u0+"*?",Loe=u0+"+?",aUe=0,RI=class{type;#n;#r;#o=!1;#e=[];#t;#a;#u;#c=!1;#i;#s;#l=!1;id=++aUe;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,o={}){this.type=t,t&&(this.#r=!0),this.#t=n,this.#n=this.#t?this.#t.#n:this,this.#i=this.#n===this?o:this.#n.#i,this.#u=this.#n===this?[]:this.#n.#u,t==="!"&&!this.#n.#c&&this.#u.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.#c)return this;this.toString(),this.#c=!0;let t;for(;t=this.#u.pop();){if(t.type!=="!")continue;let n=t,o=n.#t;for(;o;){for(let r=n.#a+1;!o.type&&r<o.#e.length;r++)for(let i of t.#e){if(typeof i=="string")throw new Error("string part in extglob AST??");i.copyIn(o.#e[r])}n=o,o=n.#t}}return this}push(...t){for(let n of t)if(n!==""){if(typeof n!="string"&&!(n instanceof kr&&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.#c&&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 o=t.#e[n];if(!(o instanceof kr&&o.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 kr(this.type,t);for(let o of this.#e)n.copyIn(o);return n}static#d(t,n,o,r,i){let s=r.maxExtglobRecursion??2,a=!1,c=!1,u=-1,d=!1;if(n.type===null){let h=o,T="";for(;h<t.length;){let S=t.charAt(h++);if(a||S==="\\"){a=!a,T+=S;continue}if(c){h===u+1?(S==="^"||S==="!")&&(d=!0):S==="]"&&!(h===u+2&&d)&&(c=!1),T+=S;continue}else if(S==="["){c=!0,u=h,d=!1,T+=S;continue}if(!r.noext&&c0(S)&&t.charAt(h)==="("&&i<=s){n.push(T),T="";let v=new kr(S,n);h=kr.#d(t,v,h,r,i+1),n.push(v);continue}T+=S}return n.push(T),h}let p=o+1,f=new kr(null,n),m=[],_="";for(;p<t.length;){let h=t.charAt(p++);if(a||h==="\\"){a=!a,_+=h;continue}if(c){p===u+1?(h==="^"||h==="!")&&(d=!0):h==="]"&&!(p===u+2&&d)&&(c=!1),_+=h;continue}else if(h==="["){c=!0,u=p,d=!1,_+=h;continue}if(!r.noext&&c0(h)&&t.charAt(p)==="("&&(i<=s||n&&n.#p(h))){let S=n&&n.#p(h)?0:1;f.push(_),_="";let y=new kr(h,f);f.push(y),p=kr.#d(t,y,p,r,i+S);continue}if(h==="|"){f.push(_),_="",m.push(f),f=new kr(null,n);continue}if(h===")")return _===""&&n.#e.length===0&&(n.#l=!0),f.push(_),_="",n.push(...m,f),p;_+=h}return n.type=null,n.#r=void 0,n.#e=[t.substring(o-1)],p}#E(t){return this.#m(t,eUe)}#m(t,n=Q0e){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null)return!1;let o=t.#e[0];return!o||typeof o!="object"||o.type===null?!1:this.#p(o.type,n)}#p(t,n=tUe){return!!n.get(this.type)?.includes(t)}#T(t,n){let o=t.#e[0],r=new kr(null,o,this.options);r.#e.push(""),o.push(r),this.#_(t,n)}#_(t,n){let o=t.#e[0];this.#e.splice(n,1,...o.#e);for(let r of o.#e)typeof r=="object"&&(r.#t=this);this.#s=void 0}#S(t){return!!xoe.get(this.type)?.has(t)}#A(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.#S(n.type)}#y(t){let n=xoe.get(this.type),o=t.#e[0],r=n?.get(o.type);if(!r)return!1;this.#e=o.#e;for(let i of this.#e)typeof i=="object"&&(i.#t=this);this.type=r,this.#s=void 0,this.#l=!1}static fromGlob(t,n={}){let o=new kr(null,void 0,n);return kr.#d(t,o,0,n,0),o}toMMPattern(){if(this!==this.#n)return this.#n.toMMPattern();let t=this.toString(),[n,o,r,i]=this.toRegExpSource();if(!(r||this.#r||this.#i.nocase&&!this.#i.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return o;let a=(this.#i.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${n}$`,a),{_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()),!Poe(this)){let c=this.isStart()&&this.isEnd()&&!this.#e.some(m=>typeof m!="string"),u=this.#e.map(m=>{let[_,h,T,S]=typeof m=="string"?kr.#R(m,this.#r,c):m.toRegExpSource(t);return this.#r=this.#r||T,this.#o=this.#o||S,_}).join(""),d="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&oUe.has(this.#e[0]))){let _=rUe,h=n&&_.has(u.charAt(0))||u.startsWith("\\.")&&_.has(u.charAt(2))||u.startsWith("\\.\\.")&&_.has(u.charAt(4)),T=!n&&!t&&_.has(u.charAt(0));d=h?nUe:T?yI:""}let p="";return this.isEnd()&&this.#n.#c&&this.#t?.type==="!"&&(p="(?:$|\\/)"),[d+u+p,(0,AI.unescape)(u),this.#r=!!this.#r,this.#o]}let o=this.type==="*"||this.type==="+",r=this.type==="!"?"(?:(?!(?:":"(?:",i=this.#g(n);if(this.isStart()&&this.isEnd()&&!i&&this.type!=="!"){let c=this.toString(),u=this;return u.#e=[c],u.type=null,u.#r=void 0,[c,(0,AI.unescape)(this.toString()),!1,!1]}let s=!o||t||n||!yI?"":this.#g(!0);s===i&&(s=""),s&&(i=`(?:${i})(?:${s})*?`);let a="";if(this.type==="!"&&this.#l)a=(this.isStart()&&!n?yI:"")+Loe;else{let c=this.type==="!"?"))"+(this.isStart()&&!n&&!t?yI:"")+Moe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;a=r+i+c}return[a,(0,AI.unescape)(i),this.#r=!!this.#r,this.#o]}#f(){if(Poe(this)){let t=0,n=!1;do{n=!0;for(let o=0;o<this.#e.length;o++){let r=this.#e[o];typeof r=="object"&&(r.#f(),this.#m(r)?(n=!1,this.#_(r,o)):this.#E(r)?(n=!1,this.#T(r,o)):this.#A(r)&&(n=!1,this.#y(r)))}}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[o,r,i,s]=n.toRegExpSource(t);return this.#o=this.#o||s,o}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#R(t,n,o=!1){let r=!1,i="",s=!1,a=!1;for(let c=0;c<t.length;c++){let u=t.charAt(c);if(r){r=!1,i+=(iUe.has(u)?"\\":"")+u;continue}if(u==="*"){if(a)continue;a=!0,i+=o&&/^[*]+$/.test(t)?Loe:Moe,n=!0;continue}else a=!1;if(u==="\\"){c===t.length-1?i+="\\\\":r=!0;continue}if(u==="["){let[d,p,f,m]=(0,J0e.parseClass)(t,c);if(f){i+=d,s=s||p,c+=f-1,n=n||m;continue}}if(u==="?"){i+=u0,n=!0;continue}i+=sUe(u)}return[i,(0,AI.unescape)(t),!!n,s]}};II.AST=RI;kr=RI});var d0=A(bI=>{"use strict";l();Object.defineProperty(bI,"__esModule",{value:!0});bI.escape=void 0;var cUe=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");bI.escape=cUe});var Goe=A(le=>{"use strict";l();Object.defineProperty(le,"__esModule",{value:!0});le.unescape=le.escape=le.AST=le.Minimatch=le.match=le.makeRe=le.braceExpand=le.defaults=le.filter=le.GLOBSTAR=le.sep=le.minimatch=void 0;var uUe=Noe(),NI=Ooe(),koe=l0(),lUe=d0(),dUe=SI(),pUe=(e,t,n={})=>((0,NI.assertValidPattern)(t),!n.nocomment&&t.charAt(0)==="#"?!1:new Il(t,n).match(e));le.minimatch=pUe;var fUe=/^\*+([^+@!?*[(]*)$/,mUe=e=>t=>!t.startsWith(".")&&t.endsWith(e),_Ue=e=>t=>t.endsWith(e),gUe=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),hUe=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),EUe=/^\*+\.\*+$/,TUe=e=>!e.startsWith(".")&&e.includes("."),SUe=e=>e!=="."&&e!==".."&&e.includes("."),AUe=/^\.\*+$/,yUe=e=>e!=="."&&e!==".."&&e.startsWith("."),RUe=/^\*+$/,IUe=e=>e.length!==0&&!e.startsWith("."),bUe=e=>e.length!==0&&e!=="."&&e!=="..",NUe=/^\?+([^+@!?*[(]*)?$/,OUe=([e,t=""])=>{let n=Uoe([e]);return t?(t=t.toLowerCase(),o=>n(o)&&o.toLowerCase().endsWith(t)):n},CUe=([e,t=""])=>{let n=$oe([e]);return t?(t=t.toLowerCase(),o=>n(o)&&o.toLowerCase().endsWith(t)):n},vUe=([e,t=""])=>{let n=$oe([e]);return t?o=>n(o)&&o.endsWith(t):n},PUe=([e,t=""])=>{let n=Uoe([e]);return t?o=>n(o)&&o.endsWith(t):n},Uoe=([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},$oe=([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},Boe=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",woe={win32:{sep:"\\"},posix:{sep:"/"}};le.sep=Boe==="win32"?woe.win32.sep:woe.posix.sep;le.minimatch.sep=le.sep;le.GLOBSTAR=Symbol("globstar **");le.minimatch.GLOBSTAR=le.GLOBSTAR;var xUe="[^/]",MUe=xUe+"*?",LUe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",wUe="(?:(?!(?:\\/|^)\\.).)*?",DUe=(e,t={})=>n=>(0,le.minimatch)(n,e,t);le.filter=DUe;le.minimatch.filter=le.filter;var Po=(e,t={})=>Object.assign({},e,t),kUe=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return le.minimatch;let t=le.minimatch;return Object.assign((o,r,i={})=>t(o,r,Po(e,i)),{Minimatch:class extends t.Minimatch{constructor(r,i={}){super(r,Po(e,i))}static defaults(r){return t.defaults(Po(e,r)).Minimatch}},AST:class extends t.AST{constructor(r,i,s={}){super(r,i,Po(e,s))}static fromGlob(r,i={}){return t.AST.fromGlob(r,Po(e,i))}},unescape:(o,r={})=>t.unescape(o,Po(e,r)),escape:(o,r={})=>t.escape(o,Po(e,r)),filter:(o,r={})=>t.filter(o,Po(e,r)),defaults:o=>t.defaults(Po(e,o)),makeRe:(o,r={})=>t.makeRe(o,Po(e,r)),braceExpand:(o,r={})=>t.braceExpand(o,Po(e,r)),match:(o,r,i={})=>t.match(o,r,Po(e,i)),sep:t.sep,GLOBSTAR:le.GLOBSTAR})};le.defaults=kUe;le.minimatch.defaults=le.defaults;var UUe=(e,t={})=>((0,NI.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,uUe.expand)(e,{max:t.braceExpandMax}));le.braceExpand=UUe;le.minimatch.braceExpand=le.braceExpand;var $Ue=(e,t={})=>new Il(e,t).makeRe();le.makeRe=$Ue;le.minimatch.makeRe=le.makeRe;var BUe=(e,t,n={})=>{let o=new Il(t,n);return e=e.filter(r=>o.match(r)),o.options.nonull&&!e.length&&e.push(t),e};le.match=BUe;le.minimatch.match=le.match;var Doe=/[?*]|[+@!]\(.*?\)|\[|\]/,GUe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Il=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,n={}){(0,NI.assertValidPattern)(t),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=t,this.platform=n.platform||Boe,this.isWindows=this.platform==="win32";let o="allowWindowsEscape";this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n[o]===!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 o=this.globSet.map(i=>this.slashSplit(i));this.globParts=this.preprocess(o),this.debug(this.pattern,this.globParts);let r=this.globParts.map((i,s,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=i[0]===""&&i[1]===""&&(i[2]==="?"||!Doe.test(i[2]))&&!Doe.test(i[3]),u=/^[a-z]:/i.test(i[0]);if(c)return[...i.slice(0,4),...i.slice(4).map(d=>this.parse(d))];if(u)return[i[0],...i.slice(1).map(d=>this.parse(d))]}return i.map(c=>this.parse(c))});if(this.debug(this.pattern,r),this.set=r.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 o of t)for(let r=0;r<o.length;r++)o[r]==="**"&&(o[r]="*");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 o=-1;for(;(o=n.indexOf("**",o+1))!==-1;){let r=o;for(;n[r+1]==="**";)r++;r!==o&&n.splice(o,r-o)}return n})}levelOneOptimize(t){return t.map(n=>(n=n.reduce((o,r)=>{let i=o[o.length-1];return r==="**"&&i==="**"?o:r===".."&&i&&i!==".."&&i!=="."&&i!=="**"?(o.pop(),o):(o.push(r),o)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let r=1;r<t.length-1;r++){let i=t[r];r===1&&i===""&&t[0]===""||(i==="."||i==="")&&(n=!0,t.splice(r,1),r--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(n=!0,t.pop())}let o=0;for(;(o=t.indexOf("..",o+1))!==-1;){let r=t[o-1];r&&r!=="."&&r!==".."&&r!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(r))&&(n=!0,t.splice(o-1,2),o-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let o of t){let r=-1;for(;(r=o.indexOf("**",r+1))!==-1;){let s=r;for(;o[s+1]==="**";)s++;s>r&&o.splice(r+1,s-r);let a=o[r+1],c=o[r+2],u=o[r+3];if(a!==".."||!c||c==="."||c===".."||!u||u==="."||u==="..")continue;n=!0,o.splice(r,1);let d=o.slice(0);d[r]="**",t.push(d),r--}if(!this.preserveMultipleSlashes){for(let s=1;s<o.length-1;s++){let a=o[s];s===1&&a===""&&o[0]===""||(a==="."||a==="")&&(n=!0,o.splice(s,1),s--)}o[0]==="."&&o.length===2&&(o[1]==="."||o[1]==="")&&(n=!0,o.pop())}let i=0;for(;(i=o.indexOf("..",i+1))!==-1;){let s=o[i-1];if(s&&s!=="."&&s!==".."&&s!=="**"){n=!0;let c=i===1&&o[i+1]==="**"?["."]:[];o.splice(i-1,2,...c),o.length===0&&o.push(""),i-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let o=n+1;o<t.length;o++){let r=this.partsMatch(t[n],t[o],!this.preserveMultipleSlashes);if(r){t[n]=[],t[o]=r;break}}return t.filter(n=>n.length)}partsMatch(t,n,o=!1){let r=0,i=0,s=[],a="";for(;r<t.length&&i<n.length;)if(t[r]===n[i])s.push(a==="b"?n[i]:t[r]),r++,i++;else if(o&&t[r]==="**"&&n[i]===t[r+1])s.push(t[r]),r++;else if(o&&n[i]==="**"&&t[r]===n[i+1])s.push(n[i]),i++;else if(t[r]==="*"&&n[i]&&(this.options.dot||!n[i].startsWith("."))&&n[i]!=="**"){if(a==="b")return!1;a="a",s.push(t[r]),r++,i++}else if(n[i]==="*"&&t[r]&&(this.options.dot||!t[r].startsWith("."))&&t[r]!=="**"){if(a==="a")return!1;a="b",s.push(n[i]),r++,i++}else return!1;return t.length===n.length&&s}parseNegate(){if(this.nonegate)return;let t=this.pattern,n=!1,o=0;for(let r=0;r<t.length&&t.charAt(r)==="!";r++)n=!n,o++;o&&(this.pattern=t.slice(o)),this.negate=n}matchOne(t,n,o=!1){let r=0,i=0;if(this.isWindows){let a=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),c=!a&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),u=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),d=!u&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),p=c?3:a?0:void 0,f=d?3:u?0:void 0;if(typeof p=="number"&&typeof f=="number"){let[m,_]=[t[p],n[f]];m.toLowerCase()===_.toLowerCase()&&(n[f]=m,i=f,r=p)}}let{optimizationLevel:s=1}=this.options;return s>=2&&(t=this.levelTwoFileOptimize(t)),n.includes(le.GLOBSTAR)?this.#n(t,n,o,r,i):this.#o(t,n,o,r,i)}#n(t,n,o,r,i){let s=n.indexOf(le.GLOBSTAR,i),a=n.lastIndexOf(le.GLOBSTAR),[c,u,d]=o?[n.slice(i,s),n.slice(s+1),[]]:[n.slice(i,s),n.slice(s+1,a),n.slice(a+1)];if(c.length){let y=t.slice(r,r+c.length);if(!this.#o(y,c,o,0,0))return!1;r+=c.length,i+=c.length}let p=0;if(d.length){if(d.length+r>t.length)return!1;let y=t.length-d.length;if(this.#o(t,d,o,y,0))p=d.length;else{if(t[t.length-1]!==""||r+d.length===t.length||(y--,!this.#o(t,d,o,y,0)))return!1;p=d.length+1}}if(!u.length){let y=!!p;for(let v=r;v<t.length-p;v++){let x=String(t[v]);if(y=!0,x==="."||x===".."||!this.options.dot&&x.startsWith("."))return!1}return o||y}let f=[[[],0]],m=f[0],_=0,h=[0];for(let y of u)y===le.GLOBSTAR?(h.push(_),m=[[],0],f.push(m)):(m[0].push(y),_++);let T=f.length-1,S=t.length-p;for(let y of f)y[1]=S-(h[T--]+y[0].length);return!!this.#r(t,f,r,0,o,0,!!p)}#r(t,n,o,r,i,s,a){let c=n[r];if(!c){for(let p=o;p<t.length;p++){a=!0;let f=t[p];if(f==="."||f===".."||!this.options.dot&&f.startsWith("."))return!1}return a}let[u,d]=c;for(;o<=d;){if(this.#o(t.slice(0,o+u.length),u,i,o,0)&&s<this.maxGlobstarRecursion){let m=this.#r(t,n,o+u.length,r+1,i,s+1,a);if(m!==!1)return m}let f=t[o];if(f==="."||f===".."||!this.options.dot&&f.startsWith("."))return!1;o++}return i||null}#o(t,n,o,r,i){let s,a,c,u;for(s=r,a=i,u=t.length,c=n.length;s<u&&a<c;s++,a++){this.debug("matchOne loop");let d=n[a],p=t[s];if(this.debug(n,d,p),d===!1||d===le.GLOBSTAR)return!1;let f;if(typeof d=="string"?(f=p===d,this.debug("string match",d,p,f)):(f=d.test(p),this.debug("pattern match",d,p,f)),!f)return!1}if(s===u&&a===c)return!0;if(s===u)return o;if(a===c)return s===u-1&&t[s]==="";throw new Error("wtf?")}braceExpand(){return(0,le.braceExpand)(this.pattern,this.options)}parse(t){(0,NI.assertValidPattern)(t);let n=this.options;if(t==="**")return le.GLOBSTAR;if(t==="")return"";let o,r=null;(o=t.match(RUe))?r=n.dot?bUe:IUe:(o=t.match(fUe))?r=(n.nocase?n.dot?hUe:gUe:n.dot?_Ue:mUe)(o[1]):(o=t.match(NUe))?r=(n.nocase?n.dot?CUe:OUe:n.dot?vUe:PUe)(o):(o=t.match(EUe))?r=n.dot?SUe:TUe:(o=t.match(AUe))&&(r=yUe);let i=koe.AST.fromGlob(t,this.options).toMMPattern();return r&&typeof i=="object"&&Reflect.defineProperty(i,"test",{value:r}),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,o=n.noglobstar?MUe:n.dot?LUe:wUe,r=new Set(n.nocase?["i"]:[]),i=t.map(c=>{let u=c.map(p=>{if(p instanceof RegExp)for(let f of p.flags.split(""))r.add(f);return typeof p=="string"?GUe(p):p===le.GLOBSTAR?le.GLOBSTAR:p._src});u.forEach((p,f)=>{let m=u[f+1],_=u[f-1];p!==le.GLOBSTAR||_===le.GLOBSTAR||(_===void 0?m!==void 0&&m!==le.GLOBSTAR?u[f+1]="(?:\\/|"+o+"\\/)?"+m:u[f]=o:m===void 0?u[f-1]=_+"(?:\\/|\\/"+o+")?":m!==le.GLOBSTAR&&(u[f-1]=_+"(?:\\/|\\/"+o+"\\/)"+m,u[f+1]=le.GLOBSTAR))});let d=u.filter(p=>p!==le.GLOBSTAR);if(this.partial&&d.length>=1){let p=[];for(let f=1;f<=d.length;f++)p.push(d.slice(0,f).join("/"));return"(?:"+p.join("|")+")"}return d.join("/")}).join("|"),[s,a]=t.length>1?["(?:",")"]:["",""];i="^"+s+i+a+"$",this.partial&&(i="^(?:\\/|"+s+i.slice(1,-1)+a+")$"),this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...r].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 o=this.options;this.isWindows&&(t=t.split("\\").join("/"));let r=this.slashSplit(t);this.debug(this.pattern,"split",r);let i=this.set;this.debug(this.pattern,"set",i);let s=r[r.length-1];if(!s)for(let a=r.length-2;!s&&a>=0;a--)s=r[a];for(let a of i){let c=r;if(o.matchBase&&a.length===1&&(c=[s]),this.matchOne(c,a,n))return o.flipNegate?!0:!this.negate}return o.flipNegate?!1:this.negate}static defaults(t){return le.minimatch.defaults(t).Minimatch}};le.Minimatch=Il;var jUe=l0();Object.defineProperty(le,"AST",{enumerable:!0,get:function(){return jUe.AST}});var VUe=d0();Object.defineProperty(le,"escape",{enumerable:!0,get:function(){return VUe.escape}});var FUe=SI();Object.defineProperty(le,"unescape",{enumerable:!0,get:function(){return FUe.unescape}});le.minimatch.AST=koe.AST;le.minimatch.Minimatch=Il;le.minimatch.escape=lUe.escape;le.minimatch.unescape=dUe.unescape});var Yoe=A((dTt,m0)=>{"use strict";l();var joe=require("node:diagnostics_channel"),{context:OI,trace:p0,SpanStatusCode:CI,propagation:f0,diag:HUe}=K(),{getRPCMetadata:zUe,RPCType:qUe}=rt(),{ATTR_HTTP_ROUTE:vI,ATTR_HTTP_RESPONSE_STATUS_CODE:Voe,ATTR_HTTP_REQUEST_METHOD:YUe,ATTR_URL_PATH:WUe}=Qe(),{InstrumentationBase:KUe}=goe(),{version:ZUe,name:Foe}=hoe(),JUe=">=4.0.0 <6",Hoe=["onRequest","preParsing","preValidation","preHandler","preSerialization","onSend","onResponse","onError"],Tt={HOOK_NAME:"hook.name",FASTIFY_TYPE:"fastify.type",HOOK_CALLBACK_NAME:"hook.callback.name",ROOT:"fastify.root"},_c={ROUTE:"route-hook",INSTANCE:"hook",HANDLER:"request-handler"},sa="anonymous",gc=Symbol("fastify otel instance"),hc=Symbol("fastify otel request spans"),Th=Symbol("fastify otel request context"),zoe=Symbol("fastify otel addhook original"),qoe=Symbol("fastify otel setnotfound original"),Sh=Symbol("fastify otel ignore path"),Ah=Symbol("fastify otel record exceptions"),PI=class extends KUe{logger=null;_requestHook=null;_lifecycleHook=null;constructor(t){if(super(Foe,ZUe,t),this.logger=HUe.createComponentLogger({namespace:Foe}),this[Sh]=null,this[Ah]=!0,t?.recordExceptions!=null){if(typeof t.recordExceptions!="boolean")throw new TypeError("recordExceptions must be a boolean");this[Ah]=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 o=null;this[Sh]=r=>typeof n=="function"?n(r):(o==null&&(o=Goe().minimatch),o(r.url,n))}}enable(){return this._handleInitialization===void 0&&this.getConfig().registerOnInitialization&&(this._handleInitialization=t=>{this.plugin()(t.fastify,void 0,()=>{});let n=(o,r,i)=>{i()};n[Symbol.for("skip-override")]=!0,n[Symbol.for("fastify.display-name")]="@fastify/otel",t.fastify.register(n)},joe.subscribe("fastify.initialization",this._handleInitialization)),super.enable()}disable(){return this._handleInitialization&&(joe.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:JUe,name:"@fastify/otel"},n;function n(o,r,i){o.decorate(gc,t),o.decorate(zoe,o.addHook),o.decorate(qoe,o.setNotFoundHandler),o.decorateRequest("opentelemetry",function(){let m=this[Th],_=this[hc];return{enabled:this.routeOptions.config?.otel!==!1,span:_,tracer:t.tracer,context:m,inject:(h,T)=>f0.inject(m,h,T),extract:(h,T)=>f0.extract(m,h,T)}}),o.decorateRequest(hc,null),o.decorateRequest(Th,null),o.addHook("onRoute",function(m){if(t[Sh]?.(m)===!0){t.logger.debug(`Ignoring route instrumentation ${m.method} ${m.url} because it matches the ignore path`);return}if(m.config?.otel===!1){t.logger.debug(`Ignoring route instrumentation ${m.method} ${m.url} because it is disabled`);return}for(let _ of Hoe)if(m[_]!=null){let h=m[_];if(typeof h=="function")m[_]=p(h,_,{[Tt.HOOK_NAME]:`${this.pluginName} - route -> ${_}`,[Tt.FASTIFY_TYPE]:_c.ROUTE,[vI]:m.url,[Tt.HOOK_CALLBACK_NAME]:h.name?.length>0?h.name:sa});else if(Array.isArray(h)){let T=[];for(let S of h)T.push(p(S,_,{[Tt.HOOK_NAME]:`${this.pluginName} - route -> ${_}`,[Tt.FASTIFY_TYPE]:_c.ROUTE,[vI]:m.url,[Tt.HOOK_CALLBACK_NAME]:S.name?.length>0?S.name:sa}));m[_]=T}}m.onSend!=null?m.onSend=Array.isArray(m.onSend)?[...m.onSend,s]:[m.onSend,s]:m.onSend=s,m.onError!=null?m.onError=Array.isArray(m.onError)?[...m.onError,a]:[m.onError,a]:m.onError=a,m.handler=p(m.handler,"handler",{[Tt.HOOK_NAME]:`${this.pluginName} - route-handler`,[Tt.FASTIFY_TYPE]:_c.HANDLER,[vI]:m.url,[Tt.HOOK_CALLBACK_NAME]:m.handler.name.length>0?m.handler.name:sa})}),o.addHook("onRequest",function(m,_,h){if(this[gc].isEnabled()===!1||m.routeOptions.config?.otel===!1)return h();if(this[gc][Sh]?.({url:m.url,method:m.method})===!0)return this[gc].logger.debug(`Ignoring request ${m.method} ${m.url} because it matches the ignore path`),h();let T=OI.active();p0.getSpan(T)==null&&(T=f0.extract(T,m.headers));let S=zUe(T);m.routeOptions.url!=null&&S?.type===qUe.HTTP&&(S.route=m.routeOptions.url);let y={[Tt.ROOT]:"@fastify/otel",[YUe]:m.method,[WUe]:m.url};m.routeOptions.url!=null&&(y[vI]=m.routeOptions.url);let v=this[gc].tracer.startSpan("request",{attributes:y},T);try{this[gc]._requestHook?.(v,m)}catch(x){this[gc].logger.error({err:x},"requestHook threw")}m[Th]=p0.setSpan(T,v),m[hc]=v,OI.with(m[Th],()=>{h()})}),o.addHook("onResponse",function(m,_,h){let T=m[hc];T!=null&&(T.setAttributes({[Voe]:_.statusCode}),T.end()),m[hc]=null,h()}),o.addHook=c,o.setNotFoundHandler=u,i();function s(f,m,_,h){let T=f[hc];T!=null&&(m.statusCode>=500&&T.setStatus({code:CI.ERROR}),T.setAttributes({[Voe]:m.statusCode}),T.end()),f[hc]=null,h(null,_)}function a(f,m,_,h){let T=f[hc];T!=null&&(T.setStatus({code:CI.ERROR,message:_.message}),t[Ah]!==!1&&T.recordException(_)),h()}function c(f,m){let _=this[zoe];return Hoe.includes(f)?_.call(this,f,p(m,f,{[Tt.HOOK_NAME]:`${this.pluginName} - ${f}`,[Tt.FASTIFY_TYPE]:_c.INSTANCE,[Tt.HOOK_CALLBACK_NAME]:m.name?.length>0?m.name:sa})):_.call(this,f,m)}function u(f,m){let _=this[qoe];typeof f=="function"?(m=p(f,"notFoundHandler",{[Tt.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[Tt.FASTIFY_TYPE]:_c.INSTANCE,[Tt.HOOK_CALLBACK_NAME]:f.name?.length>0?f.name:sa}),_.call(this,m)):(f.preValidation!=null&&(f.preValidation=p(f.preValidation,"notFoundHandler - preValidation",{[Tt.HOOK_NAME]:`${this.pluginName} - not-found-handler - preValidation`,[Tt.FASTIFY_TYPE]:_c.INSTANCE,[Tt.HOOK_CALLBACK_NAME]:f.preValidation.name?.length>0?f.preValidation.name:sa})),f.preHandler!=null&&(f.preHandler=p(f.preHandler,"notFoundHandler - preHandler",{[Tt.HOOK_NAME]:`${this.pluginName} - not-found-handler - preHandler`,[Tt.FASTIFY_TYPE]:_c.INSTANCE,[Tt.HOOK_CALLBACK_NAME]:f.preHandler.name?.length>0?f.preHandler.name:sa})),m=p(m,"notFoundHandler",{[Tt.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[Tt.FASTIFY_TYPE]:_c.INSTANCE,[Tt.HOOK_CALLBACK_NAME]:m.name?.length>0?m.name:sa}),_.call(this,f,m))}function d(f){for(let m of f)if(m?.routeOptions&&m.url&&m.method)return m;return null}function p(f,m,_={}){return function(...T){let S=this[gc],y=d(T);if(y===null)return S.logger.debug(`Ignoring route instrumentation because ${m} was called without a Fastify request argument`),f.call(this,...T);if(S.isEnabled()===!1||y.routeOptions.config?.otel===!1)return S.logger.debug(`Ignoring route instrumentation ${y.routeOptions.method} ${y.routeOptions.url} because it is disabled`),f.call(this,...T);if(S[Sh]?.({url:y.url,method:y.method})===!0)return S.logger.debug(`Ignoring route instrumentation ${y.routeOptions.method} ${y.routeOptions.url} because it matches the ignore path`),f.call(this,...T);let v=y[Th]??OI.active(),x=f.name?.length>0?f.name:this.pluginName??sa,P=S.tracer.startSpan(`${m} - ${x}`,{attributes:_},v);if(S._lifecycleHook!=null)try{S._lifecycleHook(P,{hookName:m,request:y,handler:x})}catch(N){S.logger.error({err:N},"Execution of lifecycleHook failed")}return OI.with(p0.setSpan(v,P),function(){try{let N=f.call(this,...T);return typeof N?.then=="function"?N.then(F=>(P.end(),F),F=>(P.setStatus({code:CI.ERROR,message:F.message}),S[Ah]!==!1&&P.recordException(F),P.end(),Promise.reject(F))):(P.end(),N)}catch(N){throw P.setStatus({code:CI.ERROR,message:N.message}),S[Ah]!==!1&&P.recordException(N),P.end(),N}},this)}}}}};m0.exports=PI;m0.exports.FastifyOtelInstrumentation=PI});var aa,yh,Rh,Woe=E(()=>{l();(function(e){let t="fastify.name";e.FASTIFY_NAME=t;let n="fastify.type";e.FASTIFY_TYPE=n;let o="hook.name";e.HOOK_NAME=o;let r="plugin.name";e.PLUGIN_NAME=r})(aa||(aa={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request_handler";e.REQUEST_HANDLER=n})(yh||(yh={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request handler";e.REQUEST_HANDLER=n})(Rh||(Rh={}))});var Ih,Koe=E(()=>{l();Ih=Symbol("opentelemetry.instrumentation.fastify.request_active_span")});function _0(e,t,n,o={}){let r=t.startSpan(n,{attributes:o}),i=e[Ih]||[];return i.push(r),Object.defineProperty(e,Ih,{enumerable:!1,configurable:!0,value:i}),r}function xI(e,t){let n=e[Ih]||[];n.length&&(n.forEach(o=>{t&&(o.setStatus({code:Joe.SpanStatusCode.ERROR,message:t.message}),o.recordException(t)),o.end()}),delete e[Ih])}function Xoe(e,t,n){let o,r;try{r=e(),Zoe(r)&&r.then(i=>t(void 0,i),i=>t(i))}catch(i){o=i}finally{if(!Zoe(r)&&(t(o,r),o))throw o;return r}}function Zoe(e){return typeof e=="object"&&e&&typeof Object.getOwnPropertyDescriptor(e,"then")?.value=="function"||!1}var Joe,Qoe=E(()=>{l();Joe=U(K(),1);Koe()});function t$e(){let e=Z();e&&e.on("spanStart",t=>{nie(t)})}function nie(e){let t=_e(e).data,n=t["fastify.type"];if(t[oe]||!n)return;e.setAttributes({[te]:"auto.http.otel.fastify",[oe]:`${n}.fastify`});let o=t["fastify.name"]||t["plugin.name"]||t["hook.name"];if(typeof o=="string"){let r=o.replace(/^fastify -> /,"").replace(/^@fastify\/otel -> /,"");e.updateName(r)}}var pi,LI,bl,tie,XUe,QUe,eie,e$e,MI,rie=E(()=>{l();pi=U(K(),1),LI=U(rt(),1),bl=U(Me(),1),tie=U(Qe(),1);ne();Woe();Qoe();XUe="0.1.0",QUe="@sentry/instrumentation-fastify-v3",eie="anonymous",e$e=new Set(["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError"]),MI=class extends bl.InstrumentationBase{constructor(t={}){super(QUe,XUe,t)}init(){return[new bl.InstrumentationNodeModuleDefinition("fastify",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_hookOnRequest(){let t=this;return function(o,r,i){if(!t.isEnabled())return i();t._wrap(r,"send",t._patchSend());let s=o,a=(0,LI.getRPCMetadata)(pi.context.active()),c=s.routeOptions?s.routeOptions.url:o.routerPath;c&&a?.type===LI.RPCType.HTTP&&(a.route=c);let u=o.method||"GET";Te().setTransactionName(`${u} ${c}`),i()}}_wrapHandler(t,n,o,r){let i=this;return this._diag.debug("Patching fastify route.handler function"),function(...s){if(!i.isEnabled())return o.apply(this,s);let a=o.name||t||eie,c=`${Rh.MIDDLEWARE} - ${a}`,u=s[1],d=_0(u,i.tracer,c,{[aa.FASTIFY_TYPE]:yh.MIDDLEWARE,[aa.PLUGIN_NAME]:t,[aa.HOOK_NAME]:n}),p=r&&s[s.length-1];return p&&(s[s.length-1]=function(...f){xI(u),p.apply(this,f)}),pi.context.with(pi.trace.setSpan(pi.context.active(),d),()=>Xoe(()=>o.apply(this,s),f=>{f instanceof Error&&(d.setStatus({code:pi.SpanStatusCode.ERROR,message:f.message}),d.recordException(f)),r||xI(u)}))}}_wrapAddHook(){let t=this;return this._diag.debug("Patching fastify server.addHook function"),function(n){return function(...r){let i=r[0],s=r[1],a=this.pluginName;if(!e$e.has(i))return n.apply(this,r);let c=typeof r[r.length-1]=="function"&&s.constructor.name!=="AsyncFunction";return n.apply(this,[i,t._wrapHandler(a,i,s,c)])}}}_patchConstructor(t){let n=this;function o(...r){let i=t.fastify.apply(this,r);return i.addHook("onRequest",n._hookOnRequest()),i.addHook("preHandler",n._hookPreHandler()),t$e(),n._wrap(i,"addHook",n._wrapAddHook()),i}return t.errorCodes!==void 0&&(o.errorCodes=t.errorCodes),o.fastify=o,o.default=o,o}_patchSend(){let t=this;return this._diag.debug("Patching fastify reply.send function"),function(o){return function(...i){let s=i[0];return t.isEnabled()?(0,bl.safeExecuteInTheMiddle)(()=>o.apply(this,i),a=>{!a&&s instanceof Error&&(a=s),xI(this,a)}):o.apply(this,i)}}}_hookPreHandler(){let t=this;return this._diag.debug("Patching fastify preHandler function"),function(o,r,i){if(!t.isEnabled())return i();let s=o,a=s.routeOptions?.handler||s.context?.handler,c=a?.name.startsWith("bound ")?a.name.substring(6):a?.name,u=`${Rh.REQUEST_HANDLER} - ${c||this.pluginName||eie}`,d={[aa.PLUGIN_NAME]:this.pluginName,[aa.FASTIFY_TYPE]:yh.REQUEST_HANDLER,[tie.SEMATTRS_HTTP_ROUTE]:s.routeOptions?s.routeOptions.url:o.routerPath};c&&(d[aa.FASTIFY_NAME]=c);let p=_0(r,t.tracer,u,d);nie(p);let{requestHook:f}=t.getConfig();return f&&(0,bl.safeExecuteInTheMiddle)(()=>f(p,{request:o}),m=>{m&&t._diag.error("request hook failed",m)},!0),pi.context.with(pi.trace.setSpan(pi.context.active(),p),()=>{i()})}}}});function n$e(){let e=Z();if(e)return e.getIntegrationByName(wI)}function oie(e,t,n,o){let r=n$e()?.getShouldHandleError()||cie;if(o==="diagnostics-channel"&&(this.diagnosticsChannelExists=!0),this.diagnosticsChannelExists&&o==="onError-hook"){sn&&b.warn("Fastify error handler was already registered via diagnostics channel.","You can safely remove `setupFastifyErrorHandler` call and set `shouldHandleError` on the integration options.");return}r(e,t,n)&&he(e,{mechanism:{handled:!1,type:"auto.function.fastify"}})}function cie(e,t,n){let o=n.statusCode;return o>=500||o<=299}function uie(e){let t=_e(e),n=t.description,o=t.data,r=o["fastify.type"],i=r==="hook",s=r===n?.startsWith("handler -"),a=n==="request"||r==="request-handler";if(o[oe]||!s&&!a&&!i)return;let c=i?"hook":s?"middleware":a?"request_handler":"<unknown>";e.setAttributes({[te]:"auto.http.otel.fastify",[oe]:`${c}.fastify`});let u=o["fastify.name"]||o["plugin.name"]||o["hook.name"];if(typeof u=="string"){let d=u.replace(/^fastify -> /,"").replace(/^@fastify\/otel -> /,"");e.updateName(d)}}function o$e(){let e=Z();e&&e.on("spanStart",t=>{uie(t)})}function i$e(e){e.addHook("onRequest",async(t,n)=>{if(t.opentelemetry){let{span:i}=t.opentelemetry();i&&uie(i)}let o=t.routeOptions?.url,r=t.method||"GET";Te().setTransactionName(`${r} ${o}`)})}var g0,iie,wI,sie,aie,r$e,h0,lie=E(()=>{l();g0=U(require("node:diagnostics_channel"),1),iie=U(Yoe(),1);ne();Ye();Al();rie();wI="Fastify",sie=ae(`${wI}.v3`,()=>new MI);aie=ae(`${wI}.v5`,()=>{let e=new iie.FastifyOtelInstrumentation,t=e.plugin();return g0.subscribe("fastify.initialization",n=>{let o=n.fastify;o?.register(t).after(r=>{r?sn&&b.error("Failed to setup Fastify instrumentation",r):(o$e(),o&&i$e(o))})}),g0.subscribe("tracing:fastify.request.handler:error",n=>{let{error:o,request:r,reply:i}=n;oie.call(oie,o,r,i,"diagnostics-channel")}),e}),r$e=(({shouldHandleError:e})=>{let t;return{name:wI,setupOnce(){t=e||cie,sie(),aie()},getShouldHandleError(){return t},setShouldHandleError(n){t=n}}}),h0=(e={})=>r$e(e)});var E0=A(fi=>{"use strict";l();Object.defineProperty(fi,"__esModule",{value:!0});fi.SpanNames=fi.TokenKind=fi.AllowedOperationTypes=void 0;var s$e;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(s$e=fi.AllowedOperationTypes||(fi.AllowedOperationTypes={}));var a$e;(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"})(a$e=fi.TokenKind||(fi.TokenKind={}));var c$e;(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"})(c$e=fi.SpanNames||(fi.SpanNames={}))});var T0=A(bh=>{"use strict";l();Object.defineProperty(bh,"__esModule",{value:!0});bh.AttributeNames=void 0;var u$e;(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"})(u$e=bh.AttributeNames||(bh.AttributeNames={}))});var DI=A(ff=>{"use strict";l();Object.defineProperty(ff,"__esModule",{value:!0});ff.OTEL_GRAPHQL_DATA_SYMBOL=ff.OTEL_PATCHED_SYMBOL=void 0;ff.OTEL_PATCHED_SYMBOL=Symbol.for("opentelemetry.patched");ff.OTEL_GRAPHQL_DATA_SYMBOL=Symbol.for("opentelemetry.graphql_data")});var die=A(kI=>{"use strict";l();Object.defineProperty(kI,"__esModule",{value:!0});kI.OPERATION_NOT_SUPPORTED=void 0;var UTt=DI();kI.OPERATION_NOT_SUPPORTED="Operation$operationName$not supported"});var bie=A(an=>{"use strict";l();Object.defineProperty(an,"__esModule",{value:!0});an.wrapFieldResolver=an.wrapFields=an.getSourceFromLocation=an.getOperation=an.endSpan=an.addSpanSource=an.addInputVariableAttributes=an.isPromise=void 0;var mf=K(),Ec=E0(),Nl=T0(),ca=DI(),pie=Object.values(Ec.AllowedOperationTypes),l$e=e=>typeof e?.then=="function";an.isPromise=l$e;var d$e=e=>typeof e=="object"&&e!==null;function S0(e,t,n){Array.isArray(n)?n.forEach((o,r)=>{S0(e,`${t}.${r}`,o)}):n instanceof Object?Object.entries(n).forEach(([o,r])=>{S0(e,`${t}.${o}`,r)}):e.setAttribute(`${Nl.AttributeNames.VARIABLES}${String(t)}`,n)}function p$e(e,t){Object.entries(t).forEach(([n,o])=>{S0(e,n,o)})}an.addInputVariableAttributes=p$e;function gie(e,t,n,o,r){let i=Aie(t,n,o,r);e.setAttribute(Nl.AttributeNames.SOURCE,i)}an.addSpanSource=gie;function f$e(e,t,n,o,r){let i=hie(n,r);if(i)return{field:i,spanAdded:!1};let a=t().flatResolveSpans?Tie(n):Eie(n,r);return i={span:m$e(e,t,n,o,r,a)},h$e(n,r,i),{field:i,spanAdded:!0}}function m$e(e,t,n,o,r,i){let s={[Nl.AttributeNames.FIELD_NAME]:o.fieldName,[Nl.AttributeNames.FIELD_PATH]:r.join("."),[Nl.AttributeNames.FIELD_TYPE]:o.returnType.toString(),[Nl.AttributeNames.PARENT_NAME]:o.parentType.name},a=e.startSpan(`${Ec.SpanNames.RESOLVE} ${s[Nl.AttributeNames.FIELD_PATH]}`,{attributes:s},i?mf.trace.setSpan(mf.context.active(),i):void 0),c=n[ca.OTEL_GRAPHQL_DATA_SYMBOL].source,u=o.fieldNodes.find(d=>d.kind==="Field");return u&&gie(a,c.loc,t().allowValues,u.loc?.start,u.loc?.end),a}function _$e(e,t){t&&e.recordException(t),e.end()}an.endSpan=_$e;function g$e(e,t){if(!(!e||!Array.isArray(e.definitions)))return t?e.definitions.filter(n=>pie.indexOf(n?.operation)!==-1).find(n=>t===n?.name?.value):e.definitions.find(n=>pie.indexOf(n?.operation)!==-1)}an.getOperation=g$e;function h$e(e,t,n){return e[ca.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]=n}function hie(e,t){return e[ca.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]}function Eie(e,t){for(let n=t.length-1;n>0;n--){let o=hie(e,t.slice(0,n));if(o)return o.span}return Tie(e)}function Tie(e){return e[ca.OTEL_GRAPHQL_DATA_SYMBOL].span}function E$e(e,t){let n=[],o=t;for(;o;){let r=o.key;e&&typeof r=="number"&&(r="*"),n.push(String(r)),o=o.prev}return n.reverse()}function T$e(e){return Sie(`
|
|
36
|
+
`,e)}function fie(e){return Sie(" ",e)}function Sie(e,t){let n="";for(let o=0;o<t;o++)n+=e;return n}var S$e=[Ec.TokenKind.FLOAT,Ec.TokenKind.STRING,Ec.TokenKind.INT,Ec.TokenKind.BLOCK_STRING];function Aie(e,t=!1,n,o){let r="";if(e?.startToken){let i=typeof n=="number"?n:e.start,s=typeof o=="number"?o:e.end,a=e.startToken.next,c=1;for(;a;){if(a.start<i){a=a.next,c=a?.line;continue}if(a.end>s){a=a.next,c=a?.line;continue}let u=a.value||a.kind,d="";!t&&S$e.indexOf(a.kind)>=0&&(u="*"),a.kind===Ec.TokenKind.STRING&&(u=`"${u}"`),a.kind===Ec.TokenKind.EOF&&(u=""),a.line>c?(r+=T$e(a.line-c),c=a.line,d=fie(a.column-1)):a.line===a.prev?.line&&(d=fie(a.start-(a.prev?.end||0))),r+=d+u,a&&(a=a.next)}}return r}an.getSourceFromLocation=Aie;function yie(e,t,n){if(!e||e[ca.OTEL_PATCHED_SYMBOL])return;let o=e.getFields();e[ca.OTEL_PATCHED_SYMBOL]=!0,Object.keys(o).forEach(r=>{let i=o[r];if(i&&(i.resolve&&(i.resolve=Iie(t,n,i.resolve)),i.type)){let s=Rie(i.type);for(let a of s)yie(a,t,n)}})}an.wrapFields=yie;function Rie(e){return"ofType"in e?Rie(e.ofType):A$e(e)?e.getTypes():y$e(e)?[e]:[]}function A$e(e){return"getTypes"in e&&typeof e.getTypes=="function"}function y$e(e){return"getFields"in e&&typeof e.getFields=="function"}var mie=(e,t,n)=>{n&&(e.recordException(t),e.setStatus({code:mf.SpanStatusCode.ERROR,message:t.message}),e.end())},_ie=(e,t)=>{t&&e.end()};function Iie(e,t,n,o=!1){if(r[ca.OTEL_PATCHED_SYMBOL]||typeof n!="function")return n;function r(i,s,a,c){if(!n)return;let u=t();if(u.ignoreTrivialResolveSpans&&o&&(d$e(i)||typeof i=="function")&&typeof i[c.fieldName]!="function")return n.call(this,i,s,a,c);if(!a[ca.OTEL_GRAPHQL_DATA_SYMBOL])return n.call(this,i,s,a,c);let d=E$e(u.mergeItems,c&&c.path),p=d.filter(_=>typeof _=="string").length,f,m=!1;if(u.depth>=0&&u.depth<p)f=Eie(a,d);else{let{field:_,spanAdded:h}=f$e(e,t,a,c,d);f=_.span,m=h}return mf.context.with(mf.trace.setSpan(mf.context.active(),f),()=>{try{let _=n.call(this,i,s,a,c);return(0,an.isPromise)(_)?_.then(h=>(_ie(f,m),h),h=>{throw mie(f,h,m),h}):(_ie(f,m),_)}catch(_){throw mie(f,_,m),_}})}return r[ca.OTEL_PATCHED_SYMBOL]=!0,r}an.wrapFieldResolver=Iie});var Nie=A(_f=>{"use strict";l();Object.defineProperty(_f,"__esModule",{value:!0});_f.PACKAGE_NAME=_f.PACKAGE_VERSION=void 0;_f.PACKAGE_VERSION="0.62.0";_f.PACKAGE_NAME="@opentelemetry/instrumentation-graphql"});var vie=A(BI=>{"use strict";l();Object.defineProperty(BI,"__esModule",{value:!0});BI.GraphQLInstrumentation=void 0;var ua=K(),xo=Me(),Nh=E0(),UI=T0(),A0=DI(),R$e=die(),Wn=bie(),Oie=Nie(),Cie={mergeItems:!1,depth:-1,allowValues:!1,ignoreResolveSpans:!1},$I=[">=14.0.0 <17"],y0=class extends xo.InstrumentationBase{constructor(t={}){super(Oie.PACKAGE_NAME,Oie.PACKAGE_VERSION,{...Cie,...t})}setConfig(t={}){super.setConfig({...Cie,...t})}init(){let t=new xo.InstrumentationNodeModuleDefinition("graphql",$I);return t.files.push(this._addPatchingExecute()),t.files.push(this._addPatchingParser()),t.files.push(this._addPatchingValidate()),t}_addPatchingExecute(){return new xo.InstrumentationNodeModuleFile("graphql/execution/execute.js",$I,t=>((0,xo.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 xo.InstrumentationNodeModuleFile("graphql/language/parser.js",$I,t=>((0,xo.isWrapped)(t.parse)&&this._unwrap(t,"parse"),this._wrap(t,"parse",this._patchParse()),t),t=>{t&&this._unwrap(t,"parse")})}_addPatchingValidate(){return new xo.InstrumentationNodeModuleFile("graphql/validation/validate.js",$I,t=>((0,xo.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(r){return function(){let s;if(arguments.length>=2){let u=arguments;s=n._wrapExecuteArgs(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],t)}else{let u=arguments[0];s=n._wrapExecuteArgs(u.schema,u.document,u.rootValue,u.contextValue,u.variableValues,u.operationName,u.fieldResolver,u.typeResolver,t)}let a=(0,Wn.getOperation)(s.document,s.operationName),c=n._createExecuteSpan(a,s);return s.contextValue[A0.OTEL_GRAPHQL_DATA_SYMBOL]={source:s.document?s.document||s.document[A0.OTEL_GRAPHQL_DATA_SYMBOL]:void 0,span:c,fields:{}},ua.context.with(ua.trace.setSpan(ua.context.active(),c),()=>(0,xo.safeExecuteInTheMiddle)(()=>r.apply(this,[s]),(u,d)=>{n._handleExecutionResult(c,u,d)}))}}}_handleExecutionResult(t,n,o){let r=this.getConfig();if(o===void 0||n){(0,Wn.endSpan)(t,n);return}if((0,Wn.isPromise)(o))o.then(i=>{if(typeof r.responseHook!="function"){(0,Wn.endSpan)(t);return}this._executeResponseHook(t,i)},i=>{(0,Wn.endSpan)(t,i)});else{if(typeof r.responseHook!="function"){(0,Wn.endSpan)(t);return}this._executeResponseHook(t,o)}}_executeResponseHook(t,n){let{responseHook:o}=this.getConfig();o&&(0,xo.safeExecuteInTheMiddle)(()=>{o(t,n)},r=>{r&&this._diag.error("Error running response hook",r),(0,Wn.endSpan)(t,void 0)},!0)}_patchParse(){let t=this;return function(o){return function(i,s){return t._parse(this,o,i,s)}}}_patchValidate(){let t=this;return function(o){return function(i,s,a,c,u){return t._validate(this,o,i,s,a,u,c)}}}_parse(t,n,o,r){let i=this.getConfig(),s=this.tracer.startSpan(Nh.SpanNames.PARSE);return ua.context.with(ua.trace.setSpan(ua.context.active(),s),()=>(0,xo.safeExecuteInTheMiddle)(()=>n.call(t,o,r),(a,c)=>{c&&((0,Wn.getOperation)(c)?c.loc&&(0,Wn.addSpanSource)(s,c.loc,i.allowValues):s.updateName(Nh.SpanNames.SCHEMA_PARSE)),(0,Wn.endSpan)(s,a)}))}_validate(t,n,o,r,i,s,a){let c=this.tracer.startSpan(Nh.SpanNames.VALIDATE,{});return ua.context.with(ua.trace.setSpan(ua.context.active(),c),()=>(0,xo.safeExecuteInTheMiddle)(()=>n.call(t,o,r,i,a,s),(u,d)=>{r.loc||c.updateName(Nh.SpanNames.SCHEMA_VALIDATE),d&&d.length&&c.recordException({name:UI.AttributeNames.ERROR_VALIDATION_NAME,message:JSON.stringify(d)}),(0,Wn.endSpan)(c,u)}))}_createExecuteSpan(t,n){let o=this.getConfig(),r=this.tracer.startSpan(Nh.SpanNames.EXECUTE,{});if(t){let{operation:i,name:s}=t;r.setAttribute(UI.AttributeNames.OPERATION_TYPE,i);let a=s?.value;a?(r.setAttribute(UI.AttributeNames.OPERATION_NAME,a),r.updateName(`${i} ${a}`)):r.updateName(i)}else{let i=" ";n.operationName&&(i=` "${n.operationName}" `),i=R$e.OPERATION_NOT_SUPPORTED.replace("$operationName$",i),r.setAttribute(UI.AttributeNames.OPERATION_NAME,i)}return n.document?.loc&&(0,Wn.addSpanSource)(r,n.document.loc,o.allowValues),n.variableValues&&o.allowValues&&(0,Wn.addInputVariableAttributes)(r,n.variableValues),r}_wrapExecuteArgs(t,n,o,r,i,s,a,c,u){if(r||(r={}),r[A0.OTEL_GRAPHQL_DATA_SYMBOL]||this.getConfig().ignoreResolveSpans)return{schema:t,document:n,rootValue:o,contextValue:r,variableValues:i,operationName:s,fieldResolver:a,typeResolver:c};let d=a==null,p=a??u;return a=(0,Wn.wrapFieldResolver)(this.tracer,()=>this.getConfig(),p,d),t&&((0,Wn.wrapFields)(t.getQueryType(),this.tracer,()=>this.getConfig()),(0,Wn.wrapFields)(t.getMutationType(),this.tracer,()=>this.getConfig())),{schema:t,document:n,rootValue:o,contextValue:r,variableValues:i,operationName:s,fieldResolver:a,typeResolver:c}}};BI.GraphQLInstrumentation=y0});var Pie=A(GI=>{"use strict";l();Object.defineProperty(GI,"__esModule",{value:!0});GI.GraphQLInstrumentation=void 0;var I$e=vie();Object.defineProperty(GI,"GraphQLInstrumentation",{enumerable:!0,get:function(){return I$e.GraphQLInstrumentation}})});function Die(e){return{ignoreResolveSpans:!0,ignoreTrivialResolveSpans:!0,useOperationNameForRootSpan:!0,...e}}function N$e(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 xie,Mie,Lie,wie,b$e,R0,kie=E(()=>{l();xie=U(K(),1),Mie=U(Pie(),1);ne();Ye();Qp();Lie="Graphql",wie=ae(Lie,Mie.GraphQLInstrumentation,e=>{let t=Die(e);return{...t,responseHook(n,o){Rt(n,"auto.graphql.otel.graphql"),o.errors?.length&&!_e(n).status&&n.setStatus({code:xie.SpanStatusCode.ERROR});let i=_e(n).data,s=i["graphql.operation.type"],a=i["graphql.operation.name"];if(t.useOperationNameForRootSpan&&s){let c=Et(n),d=_e(c).data[ul]||[],p=a?`${s} ${a}`:`${s}`;Array.isArray(d)?(d.push(p),c.setAttribute(ul,d)):typeof d=="string"?c.setAttribute(ul,[d,p]):c.setAttribute(ul,p),_e(c).data["original-description"]||c.setAttribute("original-description",_e(c).description),c.updateName(`${_e(c).data["original-description"]} (${N$e(d)})`)}}}}),b$e=((e={})=>({name:Lie,setupOnce(){wie(Die(e))}})),R0=b$e});var Uie=A(jI=>{"use strict";l();Object.defineProperty(jI,"__esModule",{value:!0});jI.EVENT_LISTENERS_SET=void 0;jI.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.kafkajs.eventListenersSet")});var $ie=A(VI=>{"use strict";l();Object.defineProperty(VI,"__esModule",{value:!0});VI.bufferTextMapGetter=void 0;VI.bufferTextMapGetter={get(e,t){if(!e)return;let n=Object.keys(e);for(let o of n)if(o===t||o.toLowerCase()===t)return e[o]?.toString()},keys(e){return e?Object.keys(e):[]}}});var Bie=A(Be=>{"use strict";l();Object.defineProperty(Be,"__esModule",{value:!0});Be.METRIC_MESSAGING_PROCESS_DURATION=Be.METRIC_MESSAGING_CLIENT_SENT_MESSAGES=Be.METRIC_MESSAGING_CLIENT_OPERATION_DURATION=Be.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES=Be.MESSAGING_SYSTEM_VALUE_KAFKA=Be.MESSAGING_OPERATION_TYPE_VALUE_SEND=Be.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE=Be.MESSAGING_OPERATION_TYPE_VALUE_PROCESS=Be.ATTR_MESSAGING_SYSTEM=Be.ATTR_MESSAGING_OPERATION_TYPE=Be.ATTR_MESSAGING_OPERATION_NAME=Be.ATTR_MESSAGING_KAFKA_OFFSET=Be.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE=Be.ATTR_MESSAGING_KAFKA_MESSAGE_KEY=Be.ATTR_MESSAGING_DESTINATION_PARTITION_ID=Be.ATTR_MESSAGING_DESTINATION_NAME=Be.ATTR_MESSAGING_BATCH_MESSAGE_COUNT=void 0;Be.ATTR_MESSAGING_BATCH_MESSAGE_COUNT="messaging.batch.message_count";Be.ATTR_MESSAGING_DESTINATION_NAME="messaging.destination.name";Be.ATTR_MESSAGING_DESTINATION_PARTITION_ID="messaging.destination.partition.id";Be.ATTR_MESSAGING_KAFKA_MESSAGE_KEY="messaging.kafka.message.key";Be.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE="messaging.kafka.message.tombstone";Be.ATTR_MESSAGING_KAFKA_OFFSET="messaging.kafka.offset";Be.ATTR_MESSAGING_OPERATION_NAME="messaging.operation.name";Be.ATTR_MESSAGING_OPERATION_TYPE="messaging.operation.type";Be.ATTR_MESSAGING_SYSTEM="messaging.system";Be.MESSAGING_OPERATION_TYPE_VALUE_PROCESS="process";Be.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE="receive";Be.MESSAGING_OPERATION_TYPE_VALUE_SEND="send";Be.MESSAGING_SYSTEM_VALUE_KAFKA="kafka";Be.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES="messaging.client.consumed.messages";Be.METRIC_MESSAGING_CLIENT_OPERATION_DURATION="messaging.client.operation.duration";Be.METRIC_MESSAGING_CLIENT_SENT_MESSAGES="messaging.client.sent.messages";Be.METRIC_MESSAGING_PROCESS_DURATION="messaging.process.duration"});var Gie=A(gf=>{"use strict";l();Object.defineProperty(gf,"__esModule",{value:!0});gf.PACKAGE_NAME=gf.PACKAGE_VERSION=void 0;gf.PACKAGE_VERSION="0.23.0";gf.PACKAGE_NAME="@opentelemetry/instrumentation-kafkajs"});var qie=A(HI=>{"use strict";l();Object.defineProperty(HI,"__esModule",{value:!0});HI.KafkaJsInstrumentation=void 0;var ot=K(),Mo=Me(),hf=Qe(),jie=Uie(),Vie=$ie(),pe=Bie(),Fie=Gie();function FI(e,t,n){return o=>{e.add(t,{...n,...o?{[hf.ATTR_ERROR_TYPE]:o}:{}})}}function Hie(e,t,n){return o=>{e.record((Date.now()-t)/1e3,{...n,...o?{[hf.ATTR_ERROR_TYPE]:o}:{}})}}var zie=[.005,.01,.025,.05,.075,.1,.25,.5,.75,1,2.5,5,7.5,10],I0=class extends Mo.InstrumentationBase{constructor(t={}){super(Fie.PACKAGE_NAME,Fie.PACKAGE_VERSION,t)}_updateMetricInstruments(){this._clientDuration=this.meter.createHistogram(pe.METRIC_MESSAGING_CLIENT_OPERATION_DURATION,{advice:{explicitBucketBoundaries:zie}}),this._sentMessages=this.meter.createCounter(pe.METRIC_MESSAGING_CLIENT_SENT_MESSAGES),this._consumedMessages=this.meter.createCounter(pe.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES),this._processDuration=this.meter.createHistogram(pe.METRIC_MESSAGING_PROCESS_DURATION,{advice:{explicitBucketBoundaries:zie}})}init(){let t=o=>{(0,Mo.isWrapped)(o?.Kafka?.prototype.producer)&&this._unwrap(o.Kafka.prototype,"producer"),(0,Mo.isWrapped)(o?.Kafka?.prototype.consumer)&&this._unwrap(o.Kafka.prototype,"consumer")};return new Mo.InstrumentationNodeModuleDefinition("kafkajs",[">=0.3.0 <3"],o=>(t(o),this._wrap(o?.Kafka?.prototype,"producer",this._getProducerPatch()),this._wrap(o?.Kafka?.prototype,"consumer",this._getConsumerPatch()),o),t)}_getConsumerPatch(){let t=this;return n=>function(...r){let i=n.apply(this,r);return(0,Mo.isWrapped)(i.run)&&t._unwrap(i,"run"),t._wrap(i,"run",t._getConsumerRunPatch()),t._setKafkaEventListeners(i),i}}_setKafkaEventListeners(t){t[jie.EVENT_LISTENERS_SET]||(t.events?.REQUEST&&t.on(t.events.REQUEST,this._recordClientDurationMetric.bind(this)),t[jie.EVENT_LISTENERS_SET]=!0)}_recordClientDurationMetric(t){let[n,o]=t.payload.broker.split(":");this._clientDuration.record(t.payload.duration/1e3,{[pe.ATTR_MESSAGING_SYSTEM]:pe.MESSAGING_SYSTEM_VALUE_KAFKA,[pe.ATTR_MESSAGING_OPERATION_NAME]:`${t.payload.apiName}`,[hf.ATTR_SERVER_ADDRESS]:n,[hf.ATTR_SERVER_PORT]:Number.parseInt(o,10)})}_getProducerPatch(){let t=this;return n=>function(...r){let i=n.apply(this,r);return(0,Mo.isWrapped)(i.sendBatch)&&t._unwrap(i,"sendBatch"),t._wrap(i,"sendBatch",t._getSendBatchPatch()),(0,Mo.isWrapped)(i.send)&&t._unwrap(i,"send"),t._wrap(i,"send",t._getSendPatch()),(0,Mo.isWrapped)(i.transaction)&&t._unwrap(i,"transaction"),t._wrap(i,"transaction",t._getProducerTransactionPatch()),t._setKafkaEventListeners(i),i}}_getConsumerRunPatch(){let t=this;return n=>function(...r){let i=r[0];return i?.eachMessage&&((0,Mo.isWrapped)(i.eachMessage)&&t._unwrap(i,"eachMessage"),t._wrap(i,"eachMessage",t._getConsumerEachMessagePatch())),i?.eachBatch&&((0,Mo.isWrapped)(i.eachBatch)&&t._unwrap(i,"eachBatch"),t._wrap(i,"eachBatch",t._getConsumerEachBatchPatch())),n.call(this,i)}}_getConsumerEachMessagePatch(){let t=this;return n=>function(...r){let i=r[0],s=ot.propagation.extract(ot.ROOT_CONTEXT,i.message.headers,Vie.bufferTextMapGetter),a=t._startConsumerSpan({topic:i.topic,message:i.message,operationType:pe.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,ctx:s,attributes:{[pe.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)}}),c=[Hie(t._processDuration,Date.now(),{[pe.ATTR_MESSAGING_SYSTEM]:pe.MESSAGING_SYSTEM_VALUE_KAFKA,[pe.ATTR_MESSAGING_OPERATION_NAME]:"process",[pe.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[pe.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)}),FI(t._consumedMessages,1,{[pe.ATTR_MESSAGING_SYSTEM]:pe.MESSAGING_SYSTEM_VALUE_KAFKA,[pe.ATTR_MESSAGING_OPERATION_NAME]:"process",[pe.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[pe.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)})],u=ot.context.with(ot.trace.setSpan(s,a),()=>n.apply(this,r));return t._endSpansOnPromise([a],c,u)}}_getConsumerEachBatchPatch(){return t=>{let n=this;return function(...r){let i=r[0],s=n._startConsumerSpan({topic:i.batch.topic,message:void 0,operationType:pe.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE,ctx:ot.ROOT_CONTEXT,attributes:{[pe.ATTR_MESSAGING_BATCH_MESSAGE_COUNT]:i.batch.messages.length,[pe.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}});return ot.context.with(ot.trace.setSpan(ot.context.active(),s),()=>{let a=Date.now(),c=[],u=[FI(n._consumedMessages,i.batch.messages.length,{[pe.ATTR_MESSAGING_SYSTEM]:pe.MESSAGING_SYSTEM_VALUE_KAFKA,[pe.ATTR_MESSAGING_OPERATION_NAME]:"process",[pe.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[pe.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)})];i.batch.messages.forEach(p=>{let f=ot.propagation.extract(ot.ROOT_CONTEXT,p.headers,Vie.bufferTextMapGetter),m=ot.trace.getSpan(f)?.spanContext(),_;m&&(_={context:m}),c.push(n._startConsumerSpan({topic:i.batch.topic,message:p,operationType:pe.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,link:_,attributes:{[pe.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}})),u.push(Hie(n._processDuration,a,{[pe.ATTR_MESSAGING_SYSTEM]:pe.MESSAGING_SYSTEM_VALUE_KAFKA,[pe.ATTR_MESSAGING_OPERATION_NAME]:"process",[pe.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[pe.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}))});let d=t.apply(this,r);return c.unshift(s),n._endSpansOnPromise(c,u,d)})}}}_getProducerTransactionPatch(){let t=this;return n=>function(...r){let i=t.tracer.startSpan("transaction"),s=n.apply(this,r);return s.then(a=>{let c=a.send;a.send=function(...m){return ot.context.with(ot.trace.setSpan(ot.context.active(),i),()=>t._getSendPatch()(c).apply(this,m).catch(h=>{throw i.setStatus({code:ot.SpanStatusCode.ERROR,message:h?.message}),i.recordException(h),h}))};let u=a.sendBatch;a.sendBatch=function(...m){return ot.context.with(ot.trace.setSpan(ot.context.active(),i),()=>t._getSendBatchPatch()(u).apply(this,m).catch(h=>{throw i.setStatus({code:ot.SpanStatusCode.ERROR,message:h?.message}),i.recordException(h),h}))};let d=a.commit;a.commit=function(...m){let _=d.apply(this,m).then(()=>{i.setStatus({code:ot.SpanStatusCode.OK})});return t._endSpansOnPromise([i],[],_)};let p=a.abort;a.abort=function(...m){let _=p.apply(this,m);return t._endSpansOnPromise([i],[],_)}}).catch(a=>{i.setStatus({code:ot.SpanStatusCode.ERROR,message:a?.message}),i.recordException(a),i.end()}),s}}_getSendBatchPatch(){let t=this;return n=>function(...r){let s=r[0].topicMessages||[],a=[],c=[];s.forEach(d=>{d.messages.forEach(p=>{a.push(t._startProducerSpan(d.topic,p)),c.push(FI(t._sentMessages,1,{[pe.ATTR_MESSAGING_SYSTEM]:pe.MESSAGING_SYSTEM_VALUE_KAFKA,[pe.ATTR_MESSAGING_OPERATION_NAME]:"send",[pe.ATTR_MESSAGING_DESTINATION_NAME]:d.topic,...p.partition!==void 0?{[pe.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(p.partition)}:{}}))})});let u=n.apply(this,r);return t._endSpansOnPromise(a,c,u)}}_getSendPatch(){let t=this;return n=>function(...r){let i=r[0],s=i.messages.map(u=>t._startProducerSpan(i.topic,u)),a=i.messages.map(u=>FI(t._sentMessages,1,{[pe.ATTR_MESSAGING_SYSTEM]:pe.MESSAGING_SYSTEM_VALUE_KAFKA,[pe.ATTR_MESSAGING_OPERATION_NAME]:"send",[pe.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,...u.partition!==void 0?{[pe.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(u.partition)}:{}})),c=n.apply(this,r);return t._endSpansOnPromise(s,a,c)}}_endSpansOnPromise(t,n,o){return Promise.resolve(o).then(r=>(n.forEach(i=>i()),r)).catch(r=>{let i,s=hf.ERROR_TYPE_VALUE_OTHER;throw typeof r=="string"||r===void 0?i=r:typeof r=="object"&&Object.prototype.hasOwnProperty.call(r,"message")&&(i=r.message,s=r.constructor.name),n.forEach(a=>a(s)),t.forEach(a=>{a.setAttribute(hf.ATTR_ERROR_TYPE,s),a.setStatus({code:ot.SpanStatusCode.ERROR,message:i})}),r}).finally(()=>{t.forEach(r=>r.end())})}_startConsumerSpan({topic:t,message:n,operationType:o,ctx:r,link:i,attributes:s}){let a=o===pe.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?"poll":o,c=this.tracer.startSpan(`${a} ${t}`,{kind:o===pe.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?ot.SpanKind.CLIENT:ot.SpanKind.CONSUMER,attributes:{...s,[pe.ATTR_MESSAGING_SYSTEM]:pe.MESSAGING_SYSTEM_VALUE_KAFKA,[pe.ATTR_MESSAGING_DESTINATION_NAME]:t,[pe.ATTR_MESSAGING_OPERATION_TYPE]:o,[pe.ATTR_MESSAGING_OPERATION_NAME]:a,[pe.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n?.key?String(n.key):void 0,[pe.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n?.key&&n.value===null?!0:void 0,[pe.ATTR_MESSAGING_KAFKA_OFFSET]:n?.offset},links:i?[i]:[]},r),{consumerHook:u}=this.getConfig();return u&&n&&(0,Mo.safeExecuteInTheMiddle)(()=>u(c,{topic:t,message:n}),d=>{d&&this._diag.error("consumerHook error",d)},!0),c}_startProducerSpan(t,n){let o=this.tracer.startSpan(`send ${t}`,{kind:ot.SpanKind.PRODUCER,attributes:{[pe.ATTR_MESSAGING_SYSTEM]:pe.MESSAGING_SYSTEM_VALUE_KAFKA,[pe.ATTR_MESSAGING_DESTINATION_NAME]:t,[pe.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n.key?String(n.key):void 0,[pe.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n.key&&n.value===null?!0:void 0,[pe.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:n.partition!==void 0?String(n.partition):void 0,[pe.ATTR_MESSAGING_OPERATION_NAME]:"send",[pe.ATTR_MESSAGING_OPERATION_TYPE]:pe.MESSAGING_OPERATION_TYPE_VALUE_SEND}});n.headers=n.headers??{},ot.propagation.inject(ot.trace.setSpan(ot.context.active(),o),n.headers);let{producerHook:r}=this.getConfig();return r&&(0,Mo.safeExecuteInTheMiddle)(()=>r(o,{topic:t,message:n}),i=>{i&&this._diag.error("producerHook error",i)},!0),o}};HI.KafkaJsInstrumentation=I0});var Yie=A(zI=>{"use strict";l();Object.defineProperty(zI,"__esModule",{value:!0});zI.KafkaJsInstrumentation=void 0;var O$e=qie();Object.defineProperty(zI,"KafkaJsInstrumentation",{enumerable:!0,get:function(){return O$e.KafkaJsInstrumentation}})});var Wie,Kie,Zie,C$e,b0,Jie=E(()=>{l();Wie=U(Yie(),1);Ye();Kie="Kafka",Zie=ae(Kie,()=>new Wie.KafkaJsInstrumentation({consumerHook(e){Rt(e,"auto.kafkajs.otel.consumer")},producerHook(e){Rt(e,"auto.kafkajs.otel.producer")}})),C$e=(()=>({name:Kie,setupOnce(){Zie()}})),b0=C$e});var Xie=A(Ef=>{"use strict";l();Object.defineProperty(Ef,"__esModule",{value:!0});Ef.PACKAGE_NAME=Ef.PACKAGE_VERSION=void 0;Ef.PACKAGE_VERSION="0.58.0";Ef.PACKAGE_NAME="@opentelemetry/instrumentation-lru-memoizer"});var nse=A(qI=>{"use strict";l();Object.defineProperty(qI,"__esModule",{value:!0});qI.LruMemoizerInstrumentation=void 0;var Qie=K(),ese=Me(),tse=Xie(),N0=class extends ese.InstrumentationBase{constructor(t={}){super(tse.PACKAGE_NAME,tse.PACKAGE_VERSION,t)}init(){return[new ese.InstrumentationNodeModuleDefinition("lru-memoizer",[">=1.3 <4"],t=>{let n=function(){let o=t.apply(this,arguments);return function(){let r=[...arguments],i=r.pop(),s=typeof i=="function"?Qie.context.bind(Qie.context.active(),i):i;return r.push(s),o.apply(this,r)}};return n.sync=t.sync,n},void 0)]}};qI.LruMemoizerInstrumentation=N0});var rse=A(YI=>{"use strict";l();Object.defineProperty(YI,"__esModule",{value:!0});YI.LruMemoizerInstrumentation=void 0;var v$e=nse();Object.defineProperty(YI,"LruMemoizerInstrumentation",{enumerable:!0,get:function(){return v$e.LruMemoizerInstrumentation}})});var ose,ise,sse,P$e,O0,ase=E(()=>{l();ose=U(rse(),1);Ye();ise="LruMemoizer",sse=ae(ise,()=>new ose.LruMemoizerInstrumentation),P$e=(()=>({name:ise,setupOnce(){sse()}})),O0=P$e});var cse=A(It=>{"use strict";l();Object.defineProperty(It,"__esModule",{value:!0});It.METRIC_DB_CLIENT_CONNECTIONS_USAGE=It.DB_SYSTEM_VALUE_MONGODB=It.DB_SYSTEM_NAME_VALUE_MONGODB=It.ATTR_NET_PEER_PORT=It.ATTR_NET_PEER_NAME=It.ATTR_DB_SYSTEM=It.ATTR_DB_STATEMENT=It.ATTR_DB_OPERATION=It.ATTR_DB_NAME=It.ATTR_DB_MONGODB_COLLECTION=It.ATTR_DB_CONNECTION_STRING=void 0;It.ATTR_DB_CONNECTION_STRING="db.connection_string";It.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";It.ATTR_DB_NAME="db.name";It.ATTR_DB_OPERATION="db.operation";It.ATTR_DB_STATEMENT="db.statement";It.ATTR_DB_SYSTEM="db.system";It.ATTR_NET_PEER_NAME="net.peer.name";It.ATTR_NET_PEER_PORT="net.peer.port";It.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb";It.DB_SYSTEM_VALUE_MONGODB="mongodb";It.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var use=A(Oh=>{"use strict";l();Object.defineProperty(Oh,"__esModule",{value:!0});Oh.MongodbCommandType=void 0;var x$e;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.AGGREGATE="aggregate",e.UNKNOWN="unknown"})(x$e=Oh.MongodbCommandType||(Oh.MongodbCommandType={}))});var lse=A(Tf=>{"use strict";l();Object.defineProperty(Tf,"__esModule",{value:!0});Tf.PACKAGE_NAME=Tf.PACKAGE_VERSION=void 0;Tf.PACKAGE_VERSION="0.67.0";Tf.PACKAGE_NAME="@opentelemetry/instrumentation-mongodb"});var fse=A(WI=>{"use strict";l();Object.defineProperty(WI,"__esModule",{value:!0});WI.MongoDBInstrumentation=void 0;var Ct=K(),Ge=Me(),la=Qe(),oo=cse(),Ol=use(),dse=lse(),pse={requireParentSpan:!0},C0=class e extends Ge.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(dse.PACKAGE_NAME,dse.PACKAGE_VERSION,{...pse,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Ge.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Ge.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...pse,...t})}_updateMetricInstruments(){this._connectionsUsage=this.meter.createUpDownCounter(oo.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,o){this._connectionsUsage?.add(t,{"pool.name":n,state:o})}init(){let{v3PatchConnection:t,v3UnpatchConnection:n}=this._getV3ConnectionPatches(),{v4PatchConnect:o,v4UnpatchConnect:r}=this._getV4ConnectPatches(),{v4PatchConnectionCallback:i,v4PatchConnectionPromise:s,v4UnpatchConnection:a}=this._getV4ConnectionPatches(),{v4PatchConnectionPool:c,v4UnpatchConnectionPool:u}=this._getV4ConnectionPoolPatches(),{v4PatchSessions:d,v4UnpatchSessions:p}=this._getV4SessionsPatches();return[new Ge.InstrumentationNodeModuleDefinition("mongodb",[">=3.3.0 <4"],void 0,void 0,[new Ge.InstrumentationNodeModuleFile("mongodb/lib/core/wireprotocol/index.js",[">=3.3.0 <4"],t,n)]),new Ge.InstrumentationNodeModuleDefinition("mongodb",[">=4.0.0 <8"],void 0,void 0,[new Ge.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=4.0.0 <6.4"],i,a),new Ge.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=6.4.0 <8"],s,a),new Ge.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection_pool.js",[">=4.0.0 <6.4"],c,u),new Ge.InstrumentationNodeModuleFile("mongodb/lib/cmap/connect.js",[">=4.0.0 <8"],o,r),new Ge.InstrumentationNodeModuleFile("mongodb/lib/sessions.js",[">=4.0.0 <8"],d,p)])]}_getV3ConnectionPatches(){return{v3PatchConnection:t=>((0,Ge.isWrapped)(t.insert)&&this._unwrap(t,"insert"),this._wrap(t,"insert",this._getV3PatchOperation("insert")),(0,Ge.isWrapped)(t.remove)&&this._unwrap(t,"remove"),this._wrap(t,"remove",this._getV3PatchOperation("remove")),(0,Ge.isWrapped)(t.update)&&this._unwrap(t,"update"),this._wrap(t,"update",this._getV3PatchOperation("update")),(0,Ge.isWrapped)(t.command)&&this._unwrap(t,"command"),this._wrap(t,"command",this._getV3PatchCommand()),(0,Ge.isWrapped)(t.query)&&this._unwrap(t,"query"),this._wrap(t,"query",this._getV3PatchFind()),(0,Ge.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,Ge.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),this._wrap(t.ServerSessionPool.prototype,"acquire",this._getV4AcquireCommand()),(0,Ge.isWrapped)(t.release)&&this._unwrap(t,"release"),this._wrap(t.ServerSessionPool.prototype,"release",this._getV4ReleaseCommand()),t),v4UnpatchSessions:t=>{t!==void 0&&((0,Ge.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),(0,Ge.isWrapped)(t.release)&&this._unwrap(t,"release"))}}}_getV4AcquireCommand(){let t=this;return n=>function(){let r=this.sessions.length,i=n.call(this),s=this.sessions.length;return r===s?t._connCountAdd(1,t._poolName,"used"):r-1===s&&(t._connCountAdd(-1,t._poolName,"idle"),t._connCountAdd(1,t._poolName,"used")),i}}_getV4ReleaseCommand(){let t=this;return n=>function(r){let i=n.call(this,r);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,Ge.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,Ge.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(o){let r=Ct.context.bind(Ct.context.active(),o);return t.call(this,r)}}_getV4ConnectCommand(){let t=this;return n=>function(r,i){if(n.length===1){let a=n.call(this,r);return a&&typeof a.then=="function"&&a.then(()=>t.setPoolName(r),()=>{}),a}let s=function(a,c){if(a||!c){i(a,c);return}t.setPoolName(r),i(a,c)};return n.call(this,r,s)}}_getV4ConnectionPatches(){return{v4PatchConnectionCallback:t=>((0,Ge.isWrapped)(t.Connection.prototype.command)&&this._unwrap(t.Connection.prototype,"command"),this._wrap(t.Connection.prototype,"command",this._getV4PatchCommandCallback()),t),v4PatchConnectionPromise:t=>((0,Ge.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 o=>function(i,s,a,c,u){let d=Ct.trace.getSpan(Ct.context.active()),p=n._checkSkipInstrumentation(d),f=typeof c=="function"?c:u;if(p||typeof f!="function"||typeof a!="object")return typeof c=="function"?o.call(this,i,s,a,c):o.call(this,i,s,a,c,u);let m=n._getV3SpanAttributes(s,i,a[0],t),_=n._spanNameFromAttrs(m),h=n.tracer.startSpan(_,{kind:Ct.SpanKind.CLIENT,attributes:m}),T=n._patchEnd(h,f);return typeof c=="function"?o.call(this,i,s,a,T):o.call(this,i,s,a,c,T)}}_getV3PatchCommand(){let t=this;return n=>function(r,i,s,a,c){let u=Ct.trace.getSpan(Ct.context.active()),d=t._checkSkipInstrumentation(u),p=typeof a=="function"?a:c;if(d||typeof p!="function"||typeof s!="object")return typeof a=="function"?n.call(this,r,i,s,a):n.call(this,r,i,s,a,c);let f=e._getCommandType(s),m=f===Ol.MongodbCommandType.UNKNOWN?void 0:f,_=t._getV3SpanAttributes(i,r,s,m),h=t._spanNameFromAttrs(_),T=t.tracer.startSpan(h,{kind:Ct.SpanKind.CLIENT,attributes:_}),S=t._patchEnd(T,p);return typeof a=="function"?n.call(this,r,i,s,S):n.call(this,r,i,s,a,S)}}_getV4PatchCommandCallback(){let t=this;return n=>function(r,i,s,a){let c=Ct.trace.getSpan(Ct.context.active()),u=t._checkSkipInstrumentation(c),d=a,p=Object.keys(i)[0];if(typeof i!="object"||i.ismaster||i.hello)return n.call(this,r,i,s,a);let f;if(!u){let _=t._getV4SpanAttributes(this,r,i,p),h=t._spanNameFromAttrs(_);f=t.tracer.startSpan(h,{kind:Ct.SpanKind.CLIENT,attributes:_})}let m=t._patchEnd(f,d,this.id,p);return n.call(this,r,i,s,m)}}_getV4PatchCommandPromise(){let t=this;return n=>function(...r){let[i,s]=r,a=Ct.trace.getSpan(Ct.context.active()),c=t._checkSkipInstrumentation(a),u=Object.keys(s)[0],d=()=>{};if(typeof s!="object"||s.ismaster||s.hello)return n.apply(this,r);let p;if(!c){let _=t._getV4SpanAttributes(this,i,s,u),h=t._spanNameFromAttrs(_);p=t.tracer.startSpan(h,{kind:Ct.SpanKind.CLIENT,attributes:_})}let f=t._patchEnd(p,d,this.id,u),m=n.apply(this,r);return m.then(_=>f(null,_),_=>f(_)),m}}_getV3PatchFind(){let t=this;return n=>function(r,i,s,a,c,u){let d=Ct.trace.getSpan(Ct.context.active()),p=t._checkSkipInstrumentation(d),f=typeof c=="function"?c:u;if(p||typeof f!="function"||typeof s!="object")return typeof c=="function"?n.call(this,r,i,s,a,c):n.call(this,r,i,s,a,c,u);let m=t._getV3SpanAttributes(i,r,s,"find"),_=t._spanNameFromAttrs(m),h=t.tracer.startSpan(_,{kind:Ct.SpanKind.CLIENT,attributes:m}),T=t._patchEnd(h,f);return typeof c=="function"?n.call(this,r,i,s,a,T):n.call(this,r,i,s,a,c,T)}}_getV3PatchCursor(){let t=this;return n=>function(r,i,s,a,c,u){let d=Ct.trace.getSpan(Ct.context.active()),p=t._checkSkipInstrumentation(d),f=typeof c=="function"?c:u;if(p||typeof f!="function")return typeof c=="function"?n.call(this,r,i,s,a,c):n.call(this,r,i,s,a,c,u);let m=t._getV3SpanAttributes(i,r,s.cmd,"getMore"),_=t._spanNameFromAttrs(m),h=t.tracer.startSpan(_,{kind:Ct.SpanKind.CLIENT,attributes:m}),T=t._patchEnd(h,f);return typeof c=="function"?n.call(this,r,i,s,a,T):n.call(this,r,i,s,a,c,T)}}static _getCommandType(t){return t.createIndexes!==void 0?Ol.MongodbCommandType.CREATE_INDEXES:t.findandmodify!==void 0?Ol.MongodbCommandType.FIND_AND_MODIFY:t.ismaster!==void 0?Ol.MongodbCommandType.IS_MASTER:t.count!==void 0?Ol.MongodbCommandType.COUNT:t.aggregate!==void 0?Ol.MongodbCommandType.AGGREGATE:Ol.MongodbCommandType.UNKNOWN}_getV4SpanAttributes(t,n,o,r){let i,s;if(t){let c=typeof t.address=="string"?t.address.split(":"):"";c.length===2&&(i=c[0],s=c[1])}let a;return o?.documents&&o.documents[0]?a=o.documents[0]:o?.cursors?a=o.cursors:a=o,this._getSpanAttributes(n.db,n.collection,i,s,a,r)}_getV3SpanAttributes(t,n,o,r){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 d=n.description?.address;if(d){let p=d.split(":");i=p[0],s=p[1]}}let[a,c]=t.toString().split("."),u=o?.query??o?.q??o;return this._getSpanAttributes(a,c,i,s,u,r)}_getSpanAttributes(t,n,o,r,i,s){let a={};if(this._dbSemconvStability&Ge.SemconvStability.OLD&&(a[oo.ATTR_DB_SYSTEM]=oo.DB_SYSTEM_VALUE_MONGODB,a[oo.ATTR_DB_NAME]=t,a[oo.ATTR_DB_MONGODB_COLLECTION]=n,a[oo.ATTR_DB_OPERATION]=s,a[oo.ATTR_DB_CONNECTION_STRING]=`mongodb://${o}:${r}/${t}`),this._dbSemconvStability&Ge.SemconvStability.STABLE&&(a[la.ATTR_DB_SYSTEM_NAME]=oo.DB_SYSTEM_NAME_VALUE_MONGODB,a[la.ATTR_DB_NAMESPACE]=t,a[la.ATTR_DB_OPERATION_NAME]=s,a[la.ATTR_DB_COLLECTION_NAME]=n),o&&r){this._netSemconvStability&Ge.SemconvStability.OLD&&(a[oo.ATTR_NET_PEER_NAME]=o),this._netSemconvStability&Ge.SemconvStability.STABLE&&(a[la.ATTR_SERVER_ADDRESS]=o);let c=parseInt(r,10);isNaN(c)||(this._netSemconvStability&Ge.SemconvStability.OLD&&(a[oo.ATTR_NET_PEER_PORT]=c),this._netSemconvStability&Ge.SemconvStability.STABLE&&(a[la.ATTR_SERVER_PORT]=c))}if(i){let{dbStatementSerializer:c}=this.getConfig(),u=typeof c=="function"?c:this._defaultDbStatementSerializer.bind(this);(0,Ge.safeExecuteInTheMiddle)(()=>{let d=u(i);this._dbSemconvStability&Ge.SemconvStability.OLD&&(a[oo.ATTR_DB_STATEMENT]=d),this._dbSemconvStability&Ge.SemconvStability.STABLE&&(a[la.ATTR_DB_QUERY_TEXT]=d)},d=>{d&&this._diag.error("Error running dbStatementSerializer hook",d)},!0)}return a}_spanNameFromAttrs(t){let n;return this._dbSemconvStability&Ge.SemconvStability.STABLE?n=[t[la.ATTR_DB_OPERATION_NAME],t[la.ATTR_DB_COLLECTION_NAME]].filter(o=>o).join(" ")||oo.DB_SYSTEM_NAME_VALUE_MONGODB:n=`mongodb.${t[oo.ATTR_DB_OPERATION]||"command"}`,n}_getDefaultDbStatementReplacer(){let t=new WeakSet;return(n,o)=>typeof o!="object"||!o?"?":t.has(o)?"[Circular]":(t.add(o),o)}_defaultDbStatementSerializer(t){let{enhancedDatabaseReporting:n}=this.getConfig();return n?JSON.stringify(t):JSON.stringify(t,this._getDefaultDbStatementReplacer())}_handleExecutionResult(t,n){let{responseHook:o}=this.getConfig();typeof o=="function"&&(0,Ge.safeExecuteInTheMiddle)(()=>{o(t,{data:n})},r=>{r&&this._diag.error("Error running response hook",r)},!0)}_patchEnd(t,n,o,r){let i=Ct.context.active(),s=this,a=!1;return function(...u){if(!a){a=!0;let d=u[0];if(t){if(d instanceof Error)t.setStatus({code:Ct.SpanStatusCode.ERROR,message:d.message});else{let p=u[1];s._handleExecutionResult(t,p)}t.end()}r==="endSessions"&&s._connCountAdd(-1,s._poolName,"idle")}return Ct.context.with(i,()=>n.apply(this,u))}}setPoolName(t){let n=t.hostAddress?.host,o=t.hostAddress?.port,r=t.dbName,i=`mongodb://${n}:${o}/${r}`;this._poolName=i}_checkSkipInstrumentation(t){return this.getConfig().requireParentSpan===!0&&t===void 0}};WI.MongoDBInstrumentation=C0});var mse=A(Ch=>{"use strict";l();Object.defineProperty(Ch,"__esModule",{value:!0});Ch.MongodbCommandType=void 0;var M$e;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.UNKNOWN="unknown"})(M$e=Ch.MongodbCommandType||(Ch.MongodbCommandType={}))});var _se=A(Sf=>{"use strict";l();Object.defineProperty(Sf,"__esModule",{value:!0});Sf.MongodbCommandType=Sf.MongoDBInstrumentation=void 0;var L$e=fse();Object.defineProperty(Sf,"MongoDBInstrumentation",{enumerable:!0,get:function(){return L$e.MongoDBInstrumentation}});var w$e=mse();Object.defineProperty(Sf,"MongodbCommandType",{enumerable:!0,get:function(){return w$e.MongodbCommandType}})});function D$e(e){let t=v0(e);return JSON.stringify(t)}function v0(e){if(Array.isArray(e))return e.map(t=>v0(t));if(k$e(e)){let t={};return Object.entries(e).map(([n,o])=>[n,v0(o)]).reduce((n,o)=>($$e(o)&&(n[o[0]]=o[1]),n),t)}return"?"}function k$e(e){return typeof e=="object"&&e!==null&&!U$e(e)}function U$e(e){let t=!1;return typeof Buffer<"u"&&(t=Buffer.isBuffer(e)),t}function $$e(e){return Array.isArray(e)}var gse,hse,Ese,B$e,P0,Tse=E(()=>{l();gse=U(_se(),1);Ye();hse="Mongo",Ese=ae(hse,()=>new gse.MongoDBInstrumentation({dbStatementSerializer:D$e,responseHook(e){Rt(e,"auto.db.otel.mongo")}}));B$e=(()=>({name:hse,setupOnce(){Ese()}})),P0=B$e});var x0=A(Zt=>{"use strict";l();Object.defineProperty(Zt,"__esModule",{value:!0});Zt.DB_SYSTEM_NAME_VALUE_MONGODB=Zt.ATTR_NET_PEER_PORT=Zt.ATTR_NET_PEER_NAME=Zt.ATTR_DB_USER=Zt.ATTR_DB_SYSTEM=Zt.ATTR_DB_STATEMENT=Zt.ATTR_DB_OPERATION=Zt.ATTR_DB_NAME=Zt.ATTR_DB_MONGODB_COLLECTION=void 0;Zt.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";Zt.ATTR_DB_NAME="db.name";Zt.ATTR_DB_OPERATION="db.operation";Zt.ATTR_DB_STATEMENT="db.statement";Zt.ATTR_DB_SYSTEM="db.system";Zt.ATTR_DB_USER="db.user";Zt.ATTR_NET_PEER_NAME="net.peer.name";Zt.ATTR_NET_PEER_PORT="net.peer.port";Zt.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb"});var yse=A(Tc=>{"use strict";l();Object.defineProperty(Tc,"__esModule",{value:!0});Tc.handleCallbackResponse=Tc.handlePromiseResponse=Tc.getAttributesFromCollection=void 0;var Sse=K(),Ph=Me(),vh=x0(),KI=Qe();function G$e(e,t,n){let o={};return t&Ph.SemconvStability.OLD&&(o[vh.ATTR_DB_MONGODB_COLLECTION]=e.name,o[vh.ATTR_DB_NAME]=e.conn.name,o[vh.ATTR_DB_USER]=e.conn.user),t&Ph.SemconvStability.STABLE&&(o[KI.ATTR_DB_COLLECTION_NAME]=e.name,o[KI.ATTR_DB_NAMESPACE]=e.conn.name),n&Ph.SemconvStability.OLD&&(o[vh.ATTR_NET_PEER_NAME]=e.conn.host,o[vh.ATTR_NET_PEER_PORT]=e.conn.port),n&Ph.SemconvStability.STABLE&&(o[KI.ATTR_SERVER_ADDRESS]=e.conn.host,o[KI.ATTR_SERVER_PORT]=e.conn.port),o}Tc.getAttributesFromCollection=G$e;function Ase(e,t={}){e.recordException(t),e.setStatus({code:Sse.SpanStatusCode.ERROR,message:`${t.message} ${t.code?`
|
|
37
|
+
Mongoose Error Code: ${t.code}`:""}`})}function M0(e,t,n,o=void 0){n&&(0,Ph.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:o,response:t}),r=>{r&&Sse.diag.error("mongoose instrumentation: responseHook error",r)},!0)}function j$e(e,t,n,o=void 0){return e instanceof Promise?e.then(r=>(M0(t,r,n,o),r)).catch(r=>{throw Ase(t,r),r}).finally(()=>t.end()):(M0(t,e,n,o),t.end(),e)}Tc.handlePromiseResponse=j$e;function V$e(e,t,n,o,r,i,s=void 0){let a=0;return r.length===2?a=1:r.length===3&&(a=2),r[a]=(c,u)=>(c?Ase(o,c):M0(o,u,i,s),o.end(),e(c,u)),t.apply(n,r)}Tc.handleCallbackResponse=V$e});var Rse=A(Af=>{"use strict";l();Object.defineProperty(Af,"__esModule",{value:!0});Af.PACKAGE_NAME=Af.PACKAGE_VERSION=void 0;Af.PACKAGE_VERSION="0.60.0";Af.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var Cse=A(Ur=>{"use strict";l();Object.defineProperty(Ur,"__esModule",{value:!0});Ur.MongooseInstrumentation=Ur._ALREADY_INSTRUMENTED=Ur._STORED_PARENT_SPAN=void 0;var cn=K(),F$e=rt(),L0=yse(),xn=Me(),Ise=Rse(),Sc=x0(),Cl=Qe(),ZI=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],H$e=["remove","count","findOneAndRemove",...ZI],z$e=["count","findOneAndRemove",...ZI],q$e=[...ZI];function bse(e){return e?e.startsWith("6.")||e.startsWith("5.")?H$e:e.startsWith("7.")?z$e:q$e:ZI}function Nse(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function Ose(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Ur._STORED_PARENT_SPAN=Symbol("stored-parent-span");Ur._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var w0=class extends xn.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(Ise.PACKAGE_NAME,Ise.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,xn.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,xn.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new xn.InstrumentationNodeModuleDefinition("mongoose",[">=5.9.7 <10"],this.patch.bind(this),this.unpatch.bind(this))}patch(t,n){let o=t[Symbol.toStringTag]==="Module"?t.default:t;return this._wrap(o.Model.prototype,"save",this.patchOnModelMethods("save",n)),o.Model.prototype.$save=o.Model.prototype.save,Nse(n)&&this._wrap(o.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),Ose(n)&&(this._wrap(o.Model.prototype,"updateOne",this._patchDocumentUpdateMethods("updateOne",n)),this._wrap(o.Model.prototype,"deleteOne",this._patchDocumentUpdateMethods("deleteOne",n))),this._wrap(o.Query.prototype,"exec",this.patchQueryExec(n)),this._wrap(o.Aggregate.prototype,"exec",this.patchAggregateExec(n)),bse(n).forEach(i=>{this._wrap(o.Query.prototype,i,this.patchAndCaptureSpanContext(i))}),this._wrap(o.Model,"aggregate",this.patchModelAggregate()),this._wrap(o.Model,"insertMany",this.patchModelStatic("insertMany",n)),this._wrap(o.Model,"bulkWrite",this.patchModelStatic("bulkWrite",n)),o}unpatch(t,n){let o=t[Symbol.toStringTag]==="Module"?t.default:t,r=bse(n);this._unwrap(o.Model.prototype,"save"),o.Model.prototype.$save=o.Model.prototype.save,Nse(n)&&this._unwrap(o.Model.prototype,"remove"),Ose(n)&&(this._unwrap(o.Model.prototype,"updateOne"),this._unwrap(o.Model.prototype,"deleteOne")),this._unwrap(o.Query.prototype,"exec"),this._unwrap(o.Aggregate.prototype,"exec"),r.forEach(i=>{this._unwrap(o.Query.prototype,i)}),this._unwrap(o.Model,"aggregate"),this._unwrap(o.Model,"insertMany"),this._unwrap(o.Model,"bulkWrite")}patchAggregateExec(t){let n=this;return o=>function(i){if(n.getConfig().requireParentSpan&&cn.trace.getSpan(cn.context.active())===void 0)return o.apply(this,arguments);let s=this[Ur._STORED_PARENT_SPAN],a={},{dbStatementSerializer:c}=n.getConfig();if(c){let d=c("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&xn.SemconvStability.OLD&&(a[Sc.ATTR_DB_STATEMENT]=d),n._dbSemconvStability&xn.SemconvStability.STABLE&&(a[Cl.ATTR_DB_QUERY_TEXT]=d)}let u=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",a,s);return n._handleResponse(u,o,this,arguments,i,t)}}patchQueryExec(t){let n=this;return o=>function(i){if(this[Ur._ALREADY_INSTRUMENTED])return o.apply(this,arguments);if(n.getConfig().requireParentSpan&&cn.trace.getSpan(cn.context.active())===void 0)return o.apply(this,arguments);let s=this[Ur._STORED_PARENT_SPAN],a={},{dbStatementSerializer:c}=n.getConfig();if(c){let d=c(this.op,{condition:this.getFilter?.()??this._conditions,updates:this._update,options:this.getOptions?.()??this.options,fields:this._fields});n._dbSemconvStability&xn.SemconvStability.OLD&&(a[Sc.ATTR_DB_STATEMENT]=d),n._dbSemconvStability&xn.SemconvStability.STABLE&&(a[Cl.ATTR_DB_QUERY_TEXT]=d)}let u=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,a,s);return n._handleResponse(u,o,this,arguments,i,t)}}patchOnModelMethods(t,n){let o=this;return r=>function(s,a){if(o.getConfig().requireParentSpan&&cn.trace.getSpan(cn.context.active())===void 0)return r.apply(this,arguments);let c={document:this};s&&!(s instanceof Function)&&(c.options=s);let u={},{dbStatementSerializer:d}=o.getConfig();if(d){let f=d(t,c);o._dbSemconvStability&xn.SemconvStability.OLD&&(u[Sc.ATTR_DB_STATEMENT]=f),o._dbSemconvStability&xn.SemconvStability.STABLE&&(u[Cl.ATTR_DB_QUERY_TEXT]=f)}let p=o._startSpan(this.constructor.collection,this.constructor.modelName,t,u);return s instanceof Function&&(a=s,s=void 0),o._handleResponse(p,r,this,arguments,a,n)}}_patchDocumentUpdateMethods(t,n){let o=this;return r=>function(s,a,c){if(o.getConfig().requireParentSpan&&cn.trace.getSpan(cn.context.active())===void 0)return r.apply(this,arguments);let u=c,d=s,p=a;typeof s=="function"?(u=s,d=void 0,p=void 0):typeof a=="function"&&(u=a,p=void 0);let f={},m=o.getConfig().dbStatementSerializer;if(m){let T=m(t,{condition:{_id:this._id},updates:d,options:p});o._dbSemconvStability&xn.SemconvStability.OLD&&(f[Sc.ATTR_DB_STATEMENT]=T),o._dbSemconvStability&xn.SemconvStability.STABLE&&(f[Cl.ATTR_DB_QUERY_TEXT]=T)}let _=o._startSpan(this.constructor.collection,this.constructor.modelName,t,f),h=o._handleResponse(_,r,this,arguments,u,n);return h&&typeof h=="object"&&(h[Ur._ALREADY_INSTRUMENTED]=!0),h}}patchModelStatic(t,n){let o=this;return r=>function(s,a,c){if(o.getConfig().requireParentSpan&&cn.trace.getSpan(cn.context.active())===void 0)return r.apply(this,arguments);typeof a=="function"&&(c=a,a=void 0);let u={};switch(t){case"insertMany":u.documents=s;break;case"bulkWrite":u.operations=s;break;default:u.document=s;break}a!==void 0&&(u.options=a);let d={},{dbStatementSerializer:p}=o.getConfig();if(p){let m=p(t,u);o._dbSemconvStability&xn.SemconvStability.OLD&&(d[Sc.ATTR_DB_STATEMENT]=m),o._dbSemconvStability&xn.SemconvStability.STABLE&&(d[Cl.ATTR_DB_QUERY_TEXT]=m)}let f=o._startSpan(this.collection,this.modelName,t,d);return o._handleResponse(f,r,this,arguments,c,n)}}patchModelAggregate(){let t=this;return n=>function(){let r=cn.trace.getSpan(cn.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Ur._STORED_PARENT_SPAN]=r),i}}patchAndCaptureSpanContext(t){let n=this;return o=>function(){return this[Ur._STORED_PARENT_SPAN]=cn.trace.getSpan(cn.context.active()),n._callOriginalFunction(()=>o.apply(this,arguments))}}_startSpan(t,n,o,r,i){let s={...r,...(0,L0.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&xn.SemconvStability.OLD&&(s[Sc.ATTR_DB_OPERATION]=o,s[Sc.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&xn.SemconvStability.STABLE&&(s[Cl.ATTR_DB_OPERATION_NAME]=o,s[Cl.ATTR_DB_SYSTEM_NAME]=Sc.DB_SYSTEM_NAME_VALUE_MONGODB);let a=this._dbSemconvStability&xn.SemconvStability.STABLE?`${o} ${t.name}`:`mongoose.${n}.${o}`;return this.tracer.startSpan(a,{kind:cn.SpanKind.CLIENT,attributes:s},i?cn.trace.setSpan(cn.context.active(),i):void 0)}_handleResponse(t,n,o,r,i,s=void 0){let a=this;if(i instanceof Function)return a._callOriginalFunction(()=>(0,L0.handleCallbackResponse)(i,n,o,t,r,a.getConfig().responseHook,s));{let c=a._callOriginalFunction(()=>n.apply(o,r));return(0,L0.handlePromiseResponse)(c,t,a.getConfig().responseHook,s)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?cn.context.with((0,F$e.suppressTracing)(cn.context.active()),t):t()}};Ur.MongooseInstrumentation=w0});var vse=A(JI=>{"use strict";l();Object.defineProperty(JI,"__esModule",{value:!0});JI.MongooseInstrumentation=void 0;var Y$e=Cse();Object.defineProperty(JI,"MongooseInstrumentation",{enumerable:!0,get:function(){return Y$e.MongooseInstrumentation}})});var Pse,xse,Mse,W$e,D0,Lse=E(()=>{l();Pse=U(vse(),1);Ye();xse="Mongoose",Mse=ae(xse,()=>new Pse.MongooseInstrumentation({responseHook(e){Rt(e,"auto.db.otel.mongoose")}})),W$e=(()=>({name:xse,setupOnce(){Mse()}})),D0=W$e});var wse=A(Jt=>{"use strict";l();Object.defineProperty(Jt,"__esModule",{value:!0});Jt.METRIC_DB_CLIENT_CONNECTIONS_USAGE=Jt.DB_SYSTEM_VALUE_MYSQL=Jt.ATTR_NET_PEER_PORT=Jt.ATTR_NET_PEER_NAME=Jt.ATTR_DB_USER=Jt.ATTR_DB_SYSTEM=Jt.ATTR_DB_STATEMENT=Jt.ATTR_DB_NAME=Jt.ATTR_DB_CONNECTION_STRING=void 0;Jt.ATTR_DB_CONNECTION_STRING="db.connection_string";Jt.ATTR_DB_NAME="db.name";Jt.ATTR_DB_STATEMENT="db.statement";Jt.ATTR_DB_SYSTEM="db.system";Jt.ATTR_DB_USER="db.user";Jt.ATTR_NET_PEER_NAME="net.peer.name";Jt.ATTR_NET_PEER_PORT="net.peer.port";Jt.DB_SYSTEM_VALUE_MYSQL="mysql";Jt.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var Dse=A(xh=>{"use strict";l();Object.defineProperty(xh,"__esModule",{value:!0});xh.AttributeNames=void 0;var K$e;(function(e){e.MYSQL_VALUES="db.mysql.values"})(K$e=xh.AttributeNames||(xh.AttributeNames={}))});var kse=A(Kn=>{"use strict";l();Object.defineProperty(Kn,"__esModule",{value:!0});Kn.getPoolNameOld=Kn.arrayStringifyHelper=Kn.getSpanName=Kn.getDbValues=Kn.getDbQueryText=Kn.getJDBCString=Kn.getConfig=void 0;function Z$e(e){let{host:t,port:n,database:o,user:r}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:o,user:r}}Kn.getConfig=Z$e;function J$e(e,t,n){let o=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(o+=`:${t}`),typeof n=="string"&&(o+=`/${n}`),o}Kn.getJDBCString=J$e;function X$e(e){return typeof e=="string"?e:e.sql}Kn.getDbQueryText=X$e;function Q$e(e,t){return k0(typeof e=="string"?t:t||e.values)}Kn.getDbValues=Q$e;function eBe(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Kn.getSpanName=eBe;function k0(e){return e?`[${e.toString()}]`:""}Kn.arrayStringifyHelper=k0;function tBe(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()}Kn.getPoolNameOld=tBe});var Use=A(yf=>{"use strict";l();Object.defineProperty(yf,"__esModule",{value:!0});yf.PACKAGE_NAME=yf.PACKAGE_VERSION=void 0;yf.PACKAGE_VERSION="0.60.0";yf.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var Bse=A(XI=>{"use strict";l();Object.defineProperty(XI,"__esModule",{value:!0});XI.MySQLInstrumentation=void 0;var $r=K(),Lo=Me(),Rf=Qe(),da=wse(),nBe=Dse(),vl=kse(),$se=Use(),U0=class extends Lo.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super($se.PACKAGE_NAME,$se.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Lo.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Lo.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(da.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,o){this._connectionsUsageOld?.add(t,{state:o,name:n})}init(){return[new Lo.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,Lo.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,Lo.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,Lo.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(r){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),i}}}_patchCreatePool(){return t=>{let n=this;return function(r){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 o=this;return function(i){let s=t._allConnections.length,a=t._freeConnections.length,c=s-a,u=(0,vl.getPoolNameOld)(t);o._connCountAdd(-c,u,"used"),o._connCountAdd(-a,u,"idle"),n.apply(t,arguments)}}}_patchCreatePoolCluster(){return t=>{let n=this;return function(r){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 o=this;return function(i,s){if(!o._enabled)return o._unwrap(t,"add"),n.apply(t,arguments);n.apply(t,arguments);let a=t._nodes;if(a){let c=typeof i=="object"?"CLUSTER::"+t._lastId:String(i),u=a[c].pool;o._setPoolCallbacks(u,i)}}}}_patchGetConnection(t){return n=>{let o=this;return function(i,s,a){if(!o._enabled)return o._unwrap(t,"getConnection"),n.apply(t,arguments);if(arguments.length===1&&typeof i=="function"){let c=o._getConnectionCallbackPatchFn(i);return n.call(t,c)}if(arguments.length===2&&typeof s=="function"){let c=o._getConnectionCallbackPatchFn(s);return n.call(t,i,c)}if(arguments.length===3&&typeof a=="function"){let c=o._getConnectionCallbackPatchFn(a);return n.call(t,i,s,c)}return n.apply(t,arguments)}}}_getConnectionCallbackPatchFn(t){let n=this,o=$r.context.active();return function(r,i){i&&((0,Lo.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&$r.context.with(o,t,this,r,i)}}_patchQuery(t){return n=>{let o=this;return function(r,i,s){if(!o._enabled)return o._unwrap(t,"query"),n.apply(t,arguments);let a={},{host:c,port:u,database:d,user:p}=(0,vl.getConfig)(t.config),f=parseInt(u,10),m=(0,vl.getDbQueryText)(r);o._dbSemconvStability&Lo.SemconvStability.OLD&&(a[da.ATTR_DB_SYSTEM]=da.DB_SYSTEM_VALUE_MYSQL,a[da.ATTR_DB_CONNECTION_STRING]=(0,vl.getJDBCString)(c,u,d),a[da.ATTR_DB_NAME]=d,a[da.ATTR_DB_USER]=p,a[da.ATTR_DB_STATEMENT]=m),o._dbSemconvStability&Lo.SemconvStability.STABLE&&(a[Rf.ATTR_DB_SYSTEM_NAME]=Rf.DB_SYSTEM_NAME_VALUE_MYSQL,a[Rf.ATTR_DB_NAMESPACE]=d,a[Rf.ATTR_DB_QUERY_TEXT]=m),o._netSemconvStability&Lo.SemconvStability.OLD&&(a[da.ATTR_NET_PEER_NAME]=c,isNaN(f)||(a[da.ATTR_NET_PEER_PORT]=f)),o._netSemconvStability&Lo.SemconvStability.STABLE&&(a[Rf.ATTR_SERVER_ADDRESS]=c,isNaN(f)||(a[Rf.ATTR_SERVER_PORT]=f));let _=o.tracer.startSpan((0,vl.getSpanName)(r),{kind:$r.SpanKind.CLIENT,attributes:a});if(o.getConfig().enhancedDatabaseReporting){let S;Array.isArray(i)?S=i:arguments[2]&&(S=[i]),_.setAttribute(nBe.AttributeNames.MYSQL_VALUES,(0,vl.getDbValues)(r,S))}let h=Array.from(arguments).findIndex(S=>typeof S=="function"),T=$r.context.active();if(h===-1){let S=$r.context.with($r.trace.setSpan($r.context.active(),_),()=>n.apply(t,arguments));return $r.context.bind(T,S),S.on("error",y=>_.setStatus({code:$r.SpanStatusCode.ERROR,message:y.message})).on("end",()=>{_.end()})}else return o._wrap(arguments,h,o._patchCallbackQuery(_,T)),$r.context.with($r.trace.setSpan($r.context.active(),_),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return o=>function(r,i,s){return r&&t.setStatus({code:$r.SpanStatusCode.ERROR,message:r.message}),t.end(),$r.context.with(n,()=>o(...arguments))}}_setPoolCallbacks(t,n){let o=n||(0,vl.getPoolNameOld)(t);t.on("connection",r=>{this._connCountAdd(1,o,"idle")}),t.on("acquire",r=>{this._connCountAdd(-1,o,"idle"),this._connCountAdd(1,o,"used")}),t.on("release",r=>{this._connCountAdd(1,o,"idle"),this._connCountAdd(-1,o,"used")})}};XI.MySQLInstrumentation=U0});var Gse=A(QI=>{"use strict";l();Object.defineProperty(QI,"__esModule",{value:!0});QI.MySQLInstrumentation=void 0;var rBe=Bse();Object.defineProperty(QI,"MySQLInstrumentation",{enumerable:!0,get:function(){return rBe.MySQLInstrumentation}})});var jse,Vse,Fse,oBe,$0,Hse=E(()=>{l();jse=U(Gse(),1);Ye();Vse="Mysql",Fse=ae(Vse,()=>new jse.MySQLInstrumentation({})),oBe=(()=>({name:Vse,setupOnce(){Fse()}})),$0=oBe});var B0=A(mn=>{"use strict";l();Object.defineProperty(mn,"__esModule",{value:!0});mn.DB_SYSTEM_VALUE_MYSQL=mn.ATTR_NET_PEER_PORT=mn.ATTR_NET_PEER_NAME=mn.ATTR_DB_USER=mn.ATTR_DB_SYSTEM=mn.ATTR_DB_STATEMENT=mn.ATTR_DB_NAME=mn.ATTR_DB_CONNECTION_STRING=void 0;mn.ATTR_DB_CONNECTION_STRING="db.connection_string";mn.ATTR_DB_NAME="db.name";mn.ATTR_DB_STATEMENT="db.statement";mn.ATTR_DB_SYSTEM="db.system";mn.ATTR_DB_USER="db.user";mn.ATTR_NET_PEER_NAME="net.peer.name";mn.ATTR_NET_PEER_PORT="net.peer.port";mn.DB_SYSTEM_VALUE_MYSQL="mysql"});var j0=A(eb=>{"use strict";l();Object.defineProperty(eb,"__esModule",{value:!0});eb.addSqlCommenterComment=void 0;var G0=K(),iBe=rt();function sBe(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let o=e.indexOf("*/");return t<o}function aBe(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function cBe(e,t){if(typeof t!="string"||t.length===0||sBe(t))return t;let n=new iBe.W3CTraceContextPropagator,o={};n.inject(G0.trace.setSpan(G0.ROOT_CONTEXT,e),o,G0.defaultTextMapSetter);let r=Object.keys(o).sort();if(r.length===0)return t;let i=r.map(s=>{let a=aBe(o[s]);return`${s}='${a}'`}).join(",");return`${t} /*${i}*/`}eb.addSqlCommenterComment=cBe});var zse=A(wo=>{"use strict";l();Object.defineProperty(wo,"__esModule",{value:!0});wo.getConnectionPrototypeToInstrument=wo.once=wo.getSpanName=wo.getQueryText=wo.getConnectionAttributes=void 0;var Mh=B0(),tb=Me(),V0=Qe();function uBe(e,t,n){let{host:o,port:r,database:i,user:s}=lBe(e),a={};t&tb.SemconvStability.OLD&&(a[Mh.ATTR_DB_CONNECTION_STRING]=dBe(o,r,i),a[Mh.ATTR_DB_NAME]=i,a[Mh.ATTR_DB_USER]=s),t&tb.SemconvStability.STABLE&&(a[V0.ATTR_DB_NAMESPACE]=i);let c=parseInt(r,10);return n&tb.SemconvStability.OLD&&(a[Mh.ATTR_NET_PEER_NAME]=o,isNaN(c)||(a[Mh.ATTR_NET_PEER_PORT]=c)),n&tb.SemconvStability.STABLE&&(a[V0.ATTR_SERVER_ADDRESS]=o,isNaN(c)||(a[V0.ATTR_SERVER_PORT]=c)),a}wo.getConnectionAttributes=uBe;function lBe(e){let{host:t,port:n,database:o,user:r}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:o,user:r}}function dBe(e,t,n){let o=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(o+=`:${t}`),typeof n=="string"&&(o+=`/${n}`),o}function pBe(e,t,n,o=!1,r=fBe){let[i,s]=typeof e=="string"?[e,n]:[e.sql,mBe(e)?n||e.values:n];try{return o?r(i):t&&s?t(i,s):i}catch{return"Could not determine the query due to an error in masking or formatting"}}wo.getQueryText=pBe;function fBe(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function mBe(e){return"values"in e}function _Be(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}wo.getSpanName=_Be;var gBe=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};wo.once=gBe;function hBe(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}wo.getConnectionPrototypeToInstrument=hBe});var qse=A(If=>{"use strict";l();Object.defineProperty(If,"__esModule",{value:!0});If.PACKAGE_NAME=If.PACKAGE_VERSION=void 0;If.PACKAGE_VERSION="0.60.0";If.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var Zse=A(nb=>{"use strict";l();Object.defineProperty(nb,"__esModule",{value:!0});nb.MySQL2Instrumentation=void 0;var Yse=K(),mi=Me(),F0=B0(),Wse=j0(),bf=zse(),Kse=qse(),H0=Qe(),z0=[">=1.4.2 <4"],q0=class extends mi.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(Kse.PACKAGE_NAME,Kse.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,mi.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,mi.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){let t;function n(i){!t&&i.format&&(t=i.format)}let o=i=>{(0,mi.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,mi.isWrapped)(i.execute)&&this._unwrap(i,"execute"),this._wrap(i,"execute",this._patchQuery(t,!0))},r=i=>{this._unwrap(i,"query"),this._unwrap(i,"execute")};return[new mi.InstrumentationNodeModuleDefinition("mysql2",z0,i=>(n(i),i),()=>{},[new mi.InstrumentationNodeModuleFile("mysql2/promise.js",z0,i=>(n(i),i),()=>{}),new mi.InstrumentationNodeModuleFile("mysql2/lib/connection.js",z0,i=>{let s=(0,bf.getConnectionPrototypeToInstrument)(i);return o(s),i},i=>{if(i===void 0)return;let s=(0,bf.getConnectionPrototypeToInstrument)(i);r(s)})])]}_patchQuery(t,n){return o=>{let r=this;return function(i,s,a){let c;Array.isArray(s)?c=s:arguments[2]&&(c=[s]);let{maskStatement:u,maskStatementHook:d,responseHook:p}=r.getConfig(),f=(0,bf.getConnectionAttributes)(this.config,r._dbSemconvStability,r._netSemconvStability),m=(0,bf.getQueryText)(i,t,c,u,d);r._dbSemconvStability&mi.SemconvStability.OLD&&(f[F0.ATTR_DB_SYSTEM]=F0.DB_SYSTEM_VALUE_MYSQL,f[F0.ATTR_DB_STATEMENT]=m),r._dbSemconvStability&mi.SemconvStability.STABLE&&(f[H0.ATTR_DB_SYSTEM_NAME]=H0.DB_SYSTEM_NAME_VALUE_MYSQL,f[H0.ATTR_DB_QUERY_TEXT]=m);let _=r.tracer.startSpan((0,bf.getSpanName)(i),{kind:Yse.SpanKind.CLIENT,attributes:f});!n&&r.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,Wse.addSqlCommenterComment)(_,i):Object.assign(i,{sql:(0,Wse.addSqlCommenterComment)(_,i.sql)}));let h=(0,bf.once)((T,S)=>{T?_.setStatus({code:Yse.SpanStatusCode.ERROR,message:T.message}):typeof p=="function"&&(0,mi.safeExecuteInTheMiddle)(()=>{p(_,{queryResults:S})},y=>{y&&r._diag.warn("Failed executing responseHook",y)},!0),_.end()});if(arguments.length===1){typeof i.onResult=="function"&&r._wrap(i,"onResult",r._patchCallbackQuery(h));let T=o.apply(this,arguments);return T.once("error",S=>{h(S)}).once("result",S=>{h(void 0,S)}),T}return typeof arguments[1]=="function"?r._wrap(arguments,1,r._patchCallbackQuery(h)):typeof arguments[2]=="function"&&r._wrap(arguments,2,r._patchCallbackQuery(h)),o.apply(this,arguments)}}}_patchCallbackQuery(t){return n=>function(o,r,i){return t(o,r),n(...arguments)}}};nb.MySQL2Instrumentation=q0});var Jse=A(rb=>{"use strict";l();Object.defineProperty(rb,"__esModule",{value:!0});rb.MySQL2Instrumentation=void 0;var EBe=Zse();Object.defineProperty(rb,"MySQL2Instrumentation",{enumerable:!0,get:function(){return EBe.MySQL2Instrumentation}})});var Xse,Qse,eae,TBe,Y0,tae=E(()=>{l();Xse=U(Jse(),1);Ye();Qse="Mysql2",eae=ae(Qse,()=>new Xse.MySQL2Instrumentation({responseHook(e){Rt(e,"auto.db.otel.mysql2")}})),TBe=(()=>({name:Qse,setupOnce(){eae()}})),Y0=TBe});function Lh(e,t){return e.includes(t.toLowerCase())}function K0(e){return Lh(W0,e)?"cache.get":Lh(ABe,e)?"cache.put":void 0}function yBe(e,t){return t.some(n=>e.startsWith(n))}function rae(e,t){try{if(t.length===0)return;let n=r=>typeof r=="string"||typeof r=="number"||Buffer.isBuffer(r)?[r.toString()]:Array.isArray(r)?nae(r.map(i=>n(i))):["<unknown>"],o=t[0];return Lh(SBe,e)&&o!=null?n(o):nae(t.map(r=>n(r)))}catch{return}}function oae(e,t,n){if(!K0(e))return!1;for(let o of t)if(yBe(o,n))return!0;return!1}function iae(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,o)=>{let r=t(o);return typeof r=="number"?n!==void 0?n+r:r:n},0):t(e)}function nae(e){let t=[],n=o=>{o.forEach(r=>{Array.isArray(r)?n(r):t.push(r)})};return n(e),t}var SBe,W0,ABe,sae=E(()=>{l();SBe=["get","set","setex"],W0=["get","mget"],ABe=["set","setex"]});var RBe,Pl,ob=E(()=>{l();RBe=[{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}],Pl=(e,t)=>{if(Array.isArray(t)&&t.length){let n=RBe.find(({regex:r})=>r.test(e))?.args??0,o=n>=0?t.slice(0,n):t.slice();return t.length>o.length&&o.push(`[${t.length-n} other arguments]`),`${e} ${o.join(" ")}`}return e}});var Nf,Ac,ls,ds,ps,Of,fs,ib=E(()=>{l();Nf="db.connection_string",Ac="db.statement",ls="db.system",ds="net.peer.name",ps="net.peer.port",Of="redis",fs="redis"});function xl(e,t){t&&(e.recordException(t),e.setStatus({code:Br.SpanStatusCode.ERROR,message:t.message})),e.end()}var Br,Dt,Do,IBe,bBe,aae,sb,cae=E(()=>{l();Br=U(K(),1);ne();Dt=U(Me(),1),Do=U(Qe(),1);ob();ib();IBe="@opentelemetry/instrumentation-ioredis",bBe="0.62.0";aae={requireParentSpan:!0},sb=class extends Dt.InstrumentationBase{constructor(t={}){super(IBe,bBe,{...aae,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Dt.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Dt.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...aae,...t})}init(){return[new Dt.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let o=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,Dt.isWrapped)(o.prototype.sendCommand)&&this._unwrap(o.prototype,"sendCommand"),this._wrap(o.prototype,"sendCommand",this._patchSendCommand(n)),(0,Dt.isWrapped)(o.prototype.connect)&&this._unwrap(o.prototype,"connect"),this._wrap(o.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 o=this;return function(r){if(arguments.length<1||typeof r!="object")return t.apply(this,arguments);let i=o.getConfig(),s=i.dbStatementSerializer||Pl,a=Br.trace.getSpan(Br.context.active())===void 0;if(i.requireParentSpan===!0&&a)return t.apply(this,arguments);let c={},{host:u,port:d}=this.options,p=s(r.name,r.args);o._dbSemconvStability&Dt.SemconvStability.OLD&&(c[ls]=fs,c[Ac]=p,c[Nf]=`redis://${u}:${d}`),o._dbSemconvStability&Dt.SemconvStability.STABLE&&(c[Do.ATTR_DB_SYSTEM_NAME]=Of,c[Do.ATTR_DB_QUERY_TEXT]=p),o._netSemconvStability&Dt.SemconvStability.OLD&&(c[ds]=u,c[ps]=d),o._netSemconvStability&Dt.SemconvStability.STABLE&&(c[Do.ATTR_SERVER_ADDRESS]=u,c[Do.ATTR_SERVER_PORT]=d),c[te]="auto.db.otel.redis";let f=o.tracer.startSpan(r.name,{kind:Br.SpanKind.CLIENT,attributes:c}),{requestHook:m}=i;m&&(0,Dt.safeExecuteInTheMiddle)(()=>m(f,{moduleVersion:n,cmdName:r.name,cmdArgs:r.args}),_=>{_&&Br.diag.error("ioredis instrumentation: request hook failed",_)},!0);try{let _=t.apply(this,arguments),h=r.resolve;r.resolve=function(S){(0,Dt.safeExecuteInTheMiddle)(()=>i.responseHook?.(f,r.name,r.args,S),y=>{y&&Br.diag.error("ioredis instrumentation: response hook failed",y)},!0),xl(f,null),h(S)};let T=r.reject;return r.reject=function(S){xl(f,S),T(S)},_}catch(_){throw xl(f,_),_}}}_traceConnection(t){let n=this;return function(){let o=Br.trace.getSpan(Br.context.active())===void 0;if(n.getConfig().requireParentSpan===!0&&o)return t.apply(this,arguments);let r={},{host:i,port:s}=this.options;n._dbSemconvStability&Dt.SemconvStability.OLD&&(r[ls]=fs,r[Ac]="connect",r[Nf]=`redis://${i}:${s}`),n._dbSemconvStability&Dt.SemconvStability.STABLE&&(r[Do.ATTR_DB_SYSTEM_NAME]=Of,r[Do.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&Dt.SemconvStability.OLD&&(r[ds]=i,r[ps]=s),n._netSemconvStability&Dt.SemconvStability.STABLE&&(r[Do.ATTR_SERVER_ADDRESS]=i,r[Do.ATTR_SERVER_PORT]=s),r[te]="auto.db.otel.redis";let a=n.tracer.startSpan("connect",{kind:Br.SpanKind.CLIENT,attributes:r});try{let c=t.apply(this,arguments);return typeof c?.then=="function"?c.then(u=>(xl(a,null),u),u=>(xl(a,u),Promise.reject(u))):(xl(a,null),c)}catch(c){throw xl(a,c),c}}}}});function NBe(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)}}function lae(e,t,n){let o={};return n&Se.SemconvStability.OLD&&Object.assign(o,{[ls]:fs,[ds]:t?.socket?.host,[ps]:t?.socket?.port,[Nf]:NBe(e,t?.url)}),n&Se.SemconvStability.STABLE&&Object.assign(o,{[Zn.ATTR_DB_SYSTEM_NAME]:Of,[Zn.ATTR_SERVER_ADDRESS]:t?.socket?.host,[Zn.ATTR_SERVER_PORT]:t?.socket?.port}),o}function dae(e,t){t&&e.setStatus({code:gt.SpanStatusCode.ERROR,message:t.message}),e.end()}function OBe(e){return function(){let n=e.apply(this,arguments);return gt.context.bind(gt.context.active(),n)}}function CBe(e){return function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){gt.context.bind(gt.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)}}var gt,Se,Zn,Z0,J0,wh,uae,ab,cb,pae,ub,fae=E(()=>{l();gt=U(K(),1);ne();Se=U(Me(),1),Zn=U(Qe(),1);ob();ib();Z0="@opentelemetry/instrumentation-redis",J0="0.62.0",wh=Symbol("opentelemetry.instrumentation.redis.open_spans"),uae=Symbol("opentelemetry.instrumentation.redis.multi_command_options");ab=class e extends Se.InstrumentationBase{static __initStatic(){this.COMPONENT="redis"}constructor(t={}){super(Z0,J0,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Se.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Se.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new Se.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,Se.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,Se.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,Se.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(o){return function(i){if(arguments.length!==1||typeof i!="object")return o.apply(this,arguments);let s=t.getConfig(),a=gt.trace.getSpan(gt.context.active())===void 0;if(s.requireParentSpan===!0&&a)return o.apply(this,arguments);let c=s?.dbStatementSerializer||Pl,u={};t._semconvStability&Se.SemconvStability.OLD&&Object.assign(u,{[ls]:fs,[Ac]:c(i.command,i.args)}),t._semconvStability&Se.SemconvStability.STABLE&&Object.assign(u,{[Zn.ATTR_DB_SYSTEM_NAME]:Of,[Zn.ATTR_DB_OPERATION_NAME]:i.command,[Zn.ATTR_DB_QUERY_TEXT]:c(i.command,i.args)}),u[te]="auto.db.otel.redis";let d=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:gt.SpanKind.CLIENT,attributes:u});if(this.connection_options){let f={};t._semconvStability&Se.SemconvStability.OLD&&Object.assign(f,{[ds]:this.connection_options.host,[ps]:this.connection_options.port}),t._semconvStability&Se.SemconvStability.STABLE&&Object.assign(f,{[Zn.ATTR_SERVER_ADDRESS]:this.connection_options.host,[Zn.ATTR_SERVER_PORT]:this.connection_options.port}),d.setAttributes(f)}this.address&&t._semconvStability&Se.SemconvStability.OLD&&d.setAttribute(Nf,`redis://${this.address}`);let p=arguments[0].callback;if(p){let f=gt.context.active();arguments[0].callback=function(_,h){if(s?.responseHook){let T=s.responseHook;(0,Se.safeExecuteInTheMiddle)(()=>{T(d,i.command,i.args,h)},S=>{S&&t._diag.error("Error executing responseHook",S)},!0)}return dae(d,_),gt.context.with(f,p,this,...arguments)}}try{return o.apply(this,arguments)}catch(f){throw dae(d,f),f}}}}_getPatchCreateClient(){return function(n){return OBe(n)}}_getPatchCreateStream(){return function(n){return CBe(n)}}};ab.__initStatic();cb=class e extends Se.InstrumentationBase{static __initStatic2(){this.COMPONENT="redis"}constructor(t={}){super(Z0,J0,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Se.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Se.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 Se.InstrumentationNodeModuleFile(`${t}/dist/lib/commander.js`,["^1.0.0"],(i,s)=>{let a=i.transformCommandArguments;if(!a)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),i;let c=s?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,Se.isWrapped)(i?.[c])&&this._unwrap(i,c),this._wrap(i,c,this._getPatchExtendWithCommands(a)),i},i=>{(0,Se.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,Se.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),o=new Se.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0",">=5.0.0 <5.12.0"],i=>{let s=i?.default?.prototype;return(0,Se.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),this._wrap(s,"exec",this._getPatchMultiCommandsExec(!1)),(0,Se.isWrapped)(s?.execAsPipeline)&&this._unwrap(s,"execAsPipeline"),this._wrap(s,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,Se.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand"),this._wrap(s,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let s=i?.default?.prototype;(0,Se.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),(0,Se.isWrapped)(s?.execAsPipeline)&&this._unwrap(s,"execAsPipeline"),(0,Se.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand")}),r=new Se.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0",">=5.0.0 <5.12.0"],i=>{let s=i?.default?.prototype;return s?.multi&&((0,Se.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),this._wrap(s,"multi",this._getPatchRedisClientMulti())),s?.MULTI&&((0,Se.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),this._wrap(s,"MULTI",this._getPatchRedisClientMulti())),(0,Se.isWrapped)(s?.sendCommand)&&this._unwrap(s,"sendCommand"),this._wrap(s,"sendCommand",this._getPatchRedisClientSendCommand()),(0,Se.isWrapped)(s?.connect)&&this._unwrap(s,"connect"),this._wrap(s,"connect",this._getPatchedClientConnect()),i},i=>{let s=i?.default?.prototype;(0,Se.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),(0,Se.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),(0,Se.isWrapped)(s?.sendCommand)&&this._unwrap(s,"sendCommand"),(0,Se.isWrapped)(s?.connect)&&this._unwrap(s,"connect")});return new Se.InstrumentationNodeModuleDefinition(t,["^1.0.0",">=5.0.0 <5.12.0"],i=>i,()=>{},[n,o,r])}_getPatchExtendWithCommands(t){let n=this;return function(r){return function(s){if(s?.BaseClass?.name!=="RedisClient")return r.apply(this,arguments);let a=s.executor;return s.executor=function(c,u){let d=t(c,u).args;return n._traceClientCommand(a,this,arguments,d)},r.apply(this,arguments)}}}_getPatchMultiCommandsExec(t){let n=this;return function(r){return function(){let s=r.apply(this,arguments);return typeof s?.then!="function"?(n._diag.error("non-promise result when patching exec/execAsPipeline"),s):s.then(a=>{let c=this[wh];return n._endSpansWithRedisReplies(c,a,t),a}).catch(a=>{let c=this[wh];if(!c)n._diag.error("cannot find open spans to end for multi/pipeline");else{let u=a.constructor.name==="MultiErrorReply"?a.replies:new Array(c.length).fill(a);n._endSpansWithRedisReplies(c,u,t)}return Promise.reject(a)})}}}_getPatchMultiCommandsAddCommand(){let t=this;return function(o){return function(i){return t._traceClientCommand(o,this,arguments,i)}}}_getPatchRedisClientMulti(){return function(n){return function(){let r=n.apply(this,arguments);return r[uae]=this.options,r}}}_getPatchRedisClientSendCommand(){let t=this;return function(o){return function(i){return t._traceClientCommand(o,this,arguments,i)}}}_getPatchedClientConnect(){let t=this;return function(o){return function(){let i=this.options,s=lae(t._diag,i,t._semconvStability);s[te]="auto.db.otel.redis";let a=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:gt.SpanKind.CLIENT,attributes:s});return gt.context.with(gt.trace.setSpan(gt.context.active(),a),()=>o.apply(this)).then(u=>(a.end(),u)).catch(u=>(a.recordException(u),a.setStatus({code:gt.SpanStatusCode.ERROR,message:u.message}),a.end(),Promise.reject(u)))}}}_traceClientCommand(t,n,o,r){if(gt.trace.getSpan(gt.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,o);let s=n.options||n[uae],a=r[0],c=r.slice(1),u=this.getConfig().dbStatementSerializer||Pl,d=lae(this._diag,s,this._semconvStability);this._semconvStability&Se.SemconvStability.STABLE&&(d[Zn.ATTR_DB_OPERATION_NAME]=a);try{let m=u(a,c);m!=null&&(this._semconvStability&Se.SemconvStability.OLD&&(d[Ac]=m),this._semconvStability&Se.SemconvStability.STABLE&&(d[Zn.ATTR_DB_QUERY_TEXT]=m))}catch(m){this._diag.error("dbStatementSerializer throw an exception",m,{commandName:a})}d[te]="auto.db.otel.redis";let p=this.tracer.startSpan(`${e.COMPONENT}-${a}`,{kind:gt.SpanKind.CLIENT,attributes:d}),f=gt.context.with(gt.trace.setSpan(gt.context.active(),p),()=>t.apply(n,o));if(typeof f?.then=="function")f.then(m=>{this._endSpanWithResponse(p,a,c,m,void 0)},m=>{this._endSpanWithResponse(p,a,c,null,m)});else{let m=f;m[wh]=m[wh]||[],m[wh].push({span:p,commandName:a,commandArgs:c})}return f}_endSpansWithRedisReplies(t,n,o=!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 r=t.map(a=>a.commandName),s=r.every(a=>a===r[0])?(o?"PIPELINE ":"MULTI ")+r[0]:o?"PIPELINE":"MULTI";for(let a=0;a<t.length;a++){let{span:c,commandArgs:u}=t[a],d=n[a],[p,f]=d instanceof Error?[null,d]:[d,void 0];this._semconvStability&Se.SemconvStability.STABLE&&c.setAttribute(Zn.ATTR_DB_OPERATION_NAME,s),this._endSpanWithResponse(c,r[a],u,p,f)}}_endSpanWithResponse(t,n,o,r,i){let{responseHook:s}=this.getConfig();if(!i&&s)try{s(t,n,o,r)}catch(a){this._diag.error("responseHook throw an exception",a)}i&&(t.recordException(i),t.setStatus({code:gt.SpanStatusCode.ERROR,message:i?.message})),t.end()}};cb.__initStatic2();pae={requireParentSpan:!1},ub=class e extends Se.InstrumentationBase{__init(){this.initialized=!1}constructor(t={}){let n={...pae,...t};super(Z0,J0,n),e.prototype.__init.call(this),this.instrumentationV2_V3=new ab(this.getConfig()),this.instrumentationV4_V5=new cb(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...pae,...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())}}});function lb(e,t){let n=(0,mae.tracingChannel)(e),o;try{o=Dh.context._getContextManager().getAsyncLocalStorageLookup()}catch{}if(!o)return di&&CS.warn("[TracingChannel] Could not access OpenTelemetry AsyncLocalStorage, context propagation will not work."),n;let r=o.asyncLocalStorage;return n.start.bindStore(r,i=>{let s=t(i);return i._sentrySpan=s,Dh.trace.setSpan(Dh.context.active(),s)}),n}var mae,Dh,_ae=E(()=>{l();mae=require("node:diagnostics_channel"),Dh=U(K(),1);ne();Zw()});function Eae(e){if(hae=e,!gae)try{MBe(),LBe(),wBe(),gae=!0}catch{}}function MBe(){lb(vBe,t=>{let n=t.args.slice(1),o=kBe(t.command,n);return ft({name:`redis-${t.command}`,attributes:{[te]:X0,[oe]:"db.redis",[ls]:fs,...o!=null?{[Ac]:o}:{},...t.serverAddress!=null?{[ds]:t.serverAddress}:{},...t.serverPort!=null?{[ps]:t.serverPort}:{}}},r=>r)}).subscribe({start:pa,asyncStart:pa,end:pa,asyncEnd:t=>{let n=t._sentrySpan;!n||t.error||(DBe(n,t.command,t.args.slice(1),t.result),n.end())},error:t=>{let n=t._sentrySpan;n&&(t.error&&n.setStatus({code:2,message:t.error.message}),n.end())}})}function LBe(){lb(PBe,t=>{let n=t.batchMode==="PIPELINE"?"PIPELINE":"MULTI";return ft({name:n,attributes:{[te]:X0,[oe]:"db.redis",[ls]:fs,...t.batchSize!=null?{"db.redis.batch_size":t.batchSize}:{},...t.serverAddress!=null?{[ds]:t.serverAddress}:{},...t.serverPort!=null?{[ps]:t.serverPort}:{}}},o=>o)}).subscribe({start:pa,asyncStart:pa,end:pa,asyncEnd:t=>{t.error||t._sentrySpan?.end()},error:t=>{let n=t._sentrySpan;n&&(t.error&&n.setStatus({code:2,message:t.error.message}),n.end())}})}function wBe(){lb(xBe,t=>ft({name:"redis-connect",attributes:{[te]:X0,[oe]:"db.redis.connect",[ls]:fs,...t.serverAddress!=null?{[ds]:t.serverAddress}:{},...t.serverPort!=null?{[ps]:t.serverPort}:{}}},n=>n)).subscribe({start:pa,asyncStart:pa,end:pa,asyncEnd:t=>{t.error||t._sentrySpan?.end()},error:t=>{let n=t._sentrySpan;n&&(t.error&&n.setStatus({code:2,message:t.error.message}),n.end())}})}function DBe(e,t,n,o){let r=hae;if(r)try{r(e,t,n,o)}catch{}}function kBe(e,t){try{return Pl(e,t)}catch{return}}var vBe,PBe,xBe,X0,pa,gae,hae,Tae=E(()=>{l();ne();_ae();ob();ib();vBe="node-redis:command",PBe="node-redis:batch",xBe="node-redis:connect",X0="auto.db.redis.diagnostic_channel",pa=()=>{},gae=!1});var db,kh,Q0,UBe,$Be,Sae,BBe,eU,Aae=E(()=>{l();ne();Ye();sae();cae();fae();Tae();db="Redis",kh={},Q0=(e,t,n,o)=>{let r=rae(t,n),i=K0(t);if(!r||!i||!kh.cachePrefixes||!oae(t,r,kh.cachePrefixes))return;let s=_e(e).data,a=s["net.peer.name"]??s["server.address"],c=s["net.peer.port"]??s["server.port"];c&&a&&e.setAttributes({"network.peer.address":a,"network.peer.port":c});let u=iae(o);u&&e.setAttribute(UP,u),Lh(W0,t)&&u!==void 0&&e.setAttribute(DP,u>0),e.setAttributes({[oe]:i,[kP]:r});let d=r.join(", ");e.updateName(kh.maxCacheKeyLength?Ma(d,kh.maxCacheKeyLength):d)},UBe=ae(`${db}.IORedis`,()=>new sb({responseHook:Q0})),$Be=ae(`${db}.Redis`,()=>new ub({responseHook:Q0})),Sae=Object.assign(()=>{UBe(),$Be(),Promise.resolve().then(()=>Eae(Q0))},{id:db}),BBe=((e={})=>({name:db,setupOnce(){kh=e,Sae()}})),eU=BBe});var yae=A(pb=>{"use strict";l();Object.defineProperty(pb,"__esModule",{value:!0});pb.EVENT_LISTENERS_SET=void 0;pb.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var tU=A(Uh=>{"use strict";l();Object.defineProperty(Uh,"__esModule",{value:!0});Uh.AttributeNames=void 0;var GBe;(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"})(GBe=Uh.AttributeNames||(Uh.AttributeNames={}))});var nU=A(et=>{"use strict";l();Object.defineProperty(et,"__esModule",{value:!0});et.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=et.METRIC_DB_CLIENT_CONNECTION_COUNT=et.DB_SYSTEM_VALUE_POSTGRESQL=et.DB_CLIENT_CONNECTION_STATE_VALUE_USED=et.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=et.ATTR_NET_PEER_PORT=et.ATTR_NET_PEER_NAME=et.ATTR_DB_USER=et.ATTR_DB_SYSTEM=et.ATTR_DB_STATEMENT=et.ATTR_DB_NAME=et.ATTR_DB_CONNECTION_STRING=et.ATTR_DB_CLIENT_CONNECTION_STATE=et.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;et.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";et.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";et.ATTR_DB_CONNECTION_STRING="db.connection_string";et.ATTR_DB_NAME="db.name";et.ATTR_DB_STATEMENT="db.statement";et.ATTR_DB_SYSTEM="db.system";et.ATTR_DB_USER="db.user";et.ATTR_NET_PEER_NAME="net.peer.name";et.ATTR_NET_PEER_PORT="net.peer.port";et.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";et.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";et.DB_SYSTEM_VALUE_POSTGRESQL="postgresql";et.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";et.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests"});var rU=A($h=>{"use strict";l();Object.defineProperty($h,"__esModule",{value:!0});$h.SpanNames=void 0;var jBe;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(jBe=$h.SpanNames||($h.SpanNames={}))});var vae=A(je=>{"use strict";l();Object.defineProperty(je,"__esModule",{value:!0});je.sanitizedErrorMessage=je.isObjectWithTextString=je.getErrorMessage=je.patchClientConnectCallback=je.patchCallbackPGPool=je.updateCounter=je.getPoolName=je.patchCallback=je.handleExecutionResult=je.handleConfigQuery=je.shouldSkipInstrumentation=je.getSemanticAttributesFromPoolConnection=je.getSemanticAttributesFromConnection=je.getConnectionString=je.parseAndMaskConnectionString=je.parseNormalizedOperationName=je.getQuerySpanName=void 0;var yc=K(),fb=tU(),ko=Qe(),kt=nU(),Ml=Me(),Rae=rU();function Iae(e,t){if(!t)return Rae.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:bae(t.text);return`${Rae.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}je.getQuerySpanName=Iae;function bae(e){let t=e.trim(),n=t.indexOf(" "),o=n===-1?t:t.slice(0,n);return o=o.toUpperCase(),o.endsWith(";")?o.slice(0,-1):o}je.parseNormalizedOperationName=bae;function Nae(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}je.parseAndMaskConnectionString=Nae;function oU(e){if("connectionString"in e&&e.connectionString)return Nae(e.connectionString);let t=e.host||"localhost",n=e.port||5432,o=e.database||"";return`postgresql://${t}:${n}/${o}`}je.getConnectionString=oU;function mb(e){if(Number.isInteger(e))return e}function Oae(e,t){let n={};return t&Ml.SemconvStability.OLD&&(n={...n,[kt.ATTR_DB_SYSTEM]:kt.DB_SYSTEM_VALUE_POSTGRESQL,[kt.ATTR_DB_NAME]:e.database,[kt.ATTR_DB_CONNECTION_STRING]:oU(e),[kt.ATTR_DB_USER]:e.user,[kt.ATTR_NET_PEER_NAME]:e.host,[kt.ATTR_NET_PEER_PORT]:mb(e.port)}),t&Ml.SemconvStability.STABLE&&(n={...n,[ko.ATTR_DB_SYSTEM_NAME]:ko.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[ko.ATTR_DB_NAMESPACE]:e.namespace,[ko.ATTR_SERVER_ADDRESS]:e.host,[ko.ATTR_SERVER_PORT]:mb(e.port)}),n}je.getSemanticAttributesFromConnection=Oae;function VBe(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let o={[fb.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[fb.AttributeNames.MAX_CLIENT]:e.maxClient};return t&Ml.SemconvStability.OLD&&(o={...o,[kt.ATTR_DB_SYSTEM]:kt.DB_SYSTEM_VALUE_POSTGRESQL,[kt.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[kt.ATTR_DB_CONNECTION_STRING]:oU(e),[kt.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[kt.ATTR_NET_PEER_PORT]:Number(n?.port)||mb(e.port),[kt.ATTR_DB_USER]:n?.username??e.user}),t&Ml.SemconvStability.STABLE&&(o={...o,[ko.ATTR_DB_SYSTEM_NAME]:ko.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[ko.ATTR_DB_NAMESPACE]:e.namespace,[ko.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[ko.ATTR_SERVER_PORT]:Number(n?.port)||mb(e.port)}),o}je.getSemanticAttributesFromPoolConnection=VBe;function FBe(e){return e.requireParentSpan===!0&&yc.trace.getSpan(yc.context.active())===void 0}je.shouldSkipInstrumentation=FBe;function HBe(e,t,n,o){let{connectionParameters:r}=this,i=r.database,s=Iae(i,o),a=e.startSpan(s,{kind:yc.SpanKind.CLIENT,attributes:Oae(r,n)});if(!o)return a;if(o.text&&(n&Ml.SemconvStability.OLD&&a.setAttribute(kt.ATTR_DB_STATEMENT,o.text),n&Ml.SemconvStability.STABLE&&a.setAttribute(ko.ATTR_DB_QUERY_TEXT,o.text)),t.enhancedDatabaseReporting&&Array.isArray(o.values))try{let c=o.values.map(u=>u==null?"null":u instanceof Buffer?u.toString():typeof u=="object"?typeof u.toPostgres=="function"?u.toPostgres():JSON.stringify(u):u.toString());a.setAttribute(fb.AttributeNames.PG_VALUES,c)}catch(c){yc.diag.error("failed to stringify ",o.values,c)}return typeof o.name=="string"&&a.setAttribute(fb.AttributeNames.PG_PLAN,o.name),a}je.handleConfigQuery=HBe;function Cae(e,t,n){typeof e.responseHook=="function"&&(0,Ml.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},o=>{o&&yc.diag.error("Error running response hook",o)},!0)}je.handleExecutionResult=Cae;function zBe(e,t,n,o,r){return function(s,a){s?(Object.prototype.hasOwnProperty.call(s,"code")&&(o[ko.ATTR_ERROR_TYPE]=s.code),s instanceof Error&&t.recordException(_b(s)),t.setStatus({code:yc.SpanStatusCode.ERROR,message:s.message})):Cae(e,t,a),r(),t.end(),n.call(this,s,a)}}je.patchCallback=zBe;function qBe(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()}je.getPoolName=qBe;function YBe(e,t,n,o,r){let i=t.totalCount,s=t.waitingCount,a=t.idleCount,c=i-a;return n.add(c-r.used,{[kt.ATTR_DB_CLIENT_CONNECTION_STATE]:kt.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[kt.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(a-r.idle,{[kt.ATTR_DB_CLIENT_CONNECTION_STATE]:kt.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[kt.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),o.add(s-r.pending,{[kt.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:c,idle:a,pending:s}}je.updateCounter=YBe;function WBe(e,t){return function(o,r,i){o&&(o instanceof Error&&e.recordException(_b(o)),e.setStatus({code:yc.SpanStatusCode.ERROR,message:o.message})),e.end(),t.call(this,o,r,i)}}je.patchCallbackPGPool=WBe;function KBe(e,t){return function(o){o&&(o instanceof Error&&e.recordException(_b(o)),e.setStatus({code:yc.SpanStatusCode.ERROR,message:o.message})),e.end(),t.apply(this,arguments)}}je.patchClientConnectCallback=KBe;function ZBe(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}je.getErrorMessage=ZBe;function JBe(e){return typeof e=="object"&&typeof e?.text=="string"}je.isObjectWithTextString=JBe;function _b(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}je.sanitizedErrorMessage=_b});var Pae=A(Cf=>{"use strict";l();Object.defineProperty(Cf,"__esModule",{value:!0});Cf.PACKAGE_NAME=Cf.PACKAGE_VERSION=void 0;Cf.PACKAGE_VERSION="0.66.0";Cf.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var kae=A(hb=>{"use strict";l();Object.defineProperty(hb,"__esModule",{value:!0});hb.PgInstrumentation=void 0;var pr=Me(),it=K(),xae=yae(),vt=vae(),Mae=j0(),Lae=Pae(),wae=rU(),gb=rt(),_i=Qe(),Bh=nU();function vf(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var iU=class extends pr.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(Lae.PACKAGE_NAME,Lae.PACKAGE_VERSION,t),this._semconvStability=(0,pr.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(_i.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:it.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(Bh.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(Bh.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"],o=new pr.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),r=new pr.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new pr.InstrumentationNodeModuleDefinition("pg",t,a=>{let c=vf(a);return this._patchPgClient(c.Client),a},a=>{let c=vf(a);return this._unpatchPgClient(c.Client),a},[r,o]),s=new pr.InstrumentationNodeModuleDefinition("pg-pool",n,a=>{let c=vf(a);return(0,pr.isWrapped)(c.prototype.connect)&&this._unwrap(c.prototype,"connect"),this._wrap(c.prototype,"connect",this._getPoolConnectPatch()),c},a=>{let c=vf(a);(0,pr.isWrapped)(c.prototype.connect)&&this._unwrap(c.prototype,"connect")});return[i,s]}_patchPgClient(t){if(!t)return;let n=vf(t);return(0,pr.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,pr.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=vf(t);return(0,pr.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,pr.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(r){let i=t.getConfig();if(vt.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,r);let s=t.tracer.startSpan(wae.SpanNames.CONNECT,{kind:it.SpanKind.CLIENT,attributes:vt.getSemanticAttributesFromConnection(this,t._semconvStability)});if(r){let c=it.trace.getSpan(it.context.active());r=vt.patchClientConnectCallback(s,r),c&&(r=it.context.bind(it.context.active(),r))}let a=it.context.with(it.trace.setSpan(it.context.active(),s),()=>n.call(this,r));return Dae(s,a)}}recordOperationDuration(t,n){let o={},r=[_i.ATTR_DB_NAMESPACE,_i.ATTR_ERROR_TYPE,_i.ATTR_SERVER_PORT,_i.ATTR_SERVER_ADDRESS,_i.ATTR_DB_OPERATION_NAME];this._semconvStability&pr.SemconvStability.OLD&&r.push(Bh.ATTR_DB_SYSTEM),this._semconvStability&pr.SemconvStability.STABLE&&r.push(_i.ATTR_DB_SYSTEM_NAME),r.forEach(s=>{s in t&&(o[s]=t[s])});let i=(0,gb.hrTimeToMilliseconds)((0,gb.hrTimeDuration)(n,(0,gb.hrTime)()))/1e3;this._operationDuration.record(i,o)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...r){if(vt.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,r);let i=(0,gb.hrTime)(),s=r[0],a=typeof s=="string",c=vt.isObjectWithTextString(s),u=a?{text:s,values:Array.isArray(r[1])?r[1]:void 0}:c?{...s,name:s.name,text:s.text,values:s.values??(Array.isArray(r[1])?r[1]:void 0)}:void 0,d={[Bh.ATTR_DB_SYSTEM]:Bh.DB_SYSTEM_VALUE_POSTGRESQL,[_i.ATTR_DB_NAMESPACE]:this.database,[_i.ATTR_SERVER_PORT]:this.connectionParameters.port,[_i.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};u?.text&&(d[_i.ATTR_DB_OPERATION_NAME]=vt.parseNormalizedOperationName(u?.text));let p=()=>{t.recordOperationDuration(d,i)},f=t.getConfig(),m=vt.handleConfigQuery.call(this,t.tracer,f,t._semconvStability,u);if(f.addSqlCommenterCommentToQueries&&(a?r[0]=(0,Mae.addSqlCommenterComment)(m,s):c&&!("name"in s)&&(r[0]={...s,text:(0,Mae.addSqlCommenterComment)(m,s.text)})),r.length>0){let T=it.trace.getSpan(it.context.active());if(typeof r[r.length-1]=="function")r[r.length-1]=vt.patchCallback(f,m,r[r.length-1],d,p),T&&(r[r.length-1]=it.context.bind(it.context.active(),r[r.length-1]));else if(typeof u?.callback=="function"){let S=vt.patchCallback(t.getConfig(),m,u.callback,d,p);T&&(S=it.context.bind(it.context.active(),S)),r[0].callback=S}}let{requestHook:_}=f;typeof _=="function"&&u&&(0,pr.safeExecuteInTheMiddle)(()=>{let{database:T,host:S,port:y,user:v}=this.connectionParameters;_(m,{connection:{database:T,host:S,port:y,user:v},query:{text:u.text,values:u.values,name:u.name}})},T=>{T&&t._diag.error("Error running query hook",T)},!0);let h;try{h=n.apply(this,r)}catch(T){throw T instanceof Error&&m.recordException(vt.sanitizedErrorMessage(T)),m.setStatus({code:it.SpanStatusCode.ERROR,message:vt.getErrorMessage(T)}),m.end(),T}return h instanceof Promise?h.then(T=>new Promise(S=>{vt.handleExecutionResult(t.getConfig(),m,T),p(),m.end(),S(T)})).catch(T=>new Promise((S,y)=>{T instanceof Error&&m.recordException(vt.sanitizedErrorMessage(T)),m.setStatus({code:it.SpanStatusCode.ERROR,message:T.message}),p(),m.end(),y(T)})):h})}_setPoolConnectEventListeners(t){if(t[xae.EVENT_LISTENERS_SET])return;let n=vt.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=vt.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=vt.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=vt.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=vt.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[xae.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(r){let i=t.getConfig();if(vt.shouldSkipInstrumentation(i))return n.call(this,r);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,r);let s=t.tracer.startSpan(wae.SpanNames.POOL_CONNECT,{kind:it.SpanKind.CLIENT,attributes:vt.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(r){let c=it.trace.getSpan(it.context.active());r=vt.patchCallbackPGPool(s,r),c&&(r=it.context.bind(it.context.active(),r))}let a=it.context.with(it.trace.setSpan(it.context.active(),s),()=>n.call(this,r));return Dae(s,a)}}};hb.PgInstrumentation=iU;function Dae(e,t){if(!(t instanceof Promise))return t;let n=t;return it.context.bind(it.context.active(),n.then(o=>(e.end(),o)).catch(o=>(o instanceof Error&&e.recordException(vt.sanitizedErrorMessage(o)),e.setStatus({code:it.SpanStatusCode.ERROR,message:vt.getErrorMessage(o)}),e.end(),Promise.reject(o))))}});var Uae=A(Pf=>{"use strict";l();Object.defineProperty(Pf,"__esModule",{value:!0});Pf.AttributeNames=Pf.PgInstrumentation=void 0;var XBe=kae();Object.defineProperty(Pf,"PgInstrumentation",{enumerable:!0,get:function(){return XBe.PgInstrumentation}});var QBe=tU();Object.defineProperty(Pf,"AttributeNames",{enumerable:!0,get:function(){return QBe.AttributeNames}})});var $ae,Bae,Gae,eGe,sU,jae=E(()=>{l();$ae=U(Uae(),1);Ye();Bae="Postgres",Gae=ae(Bae,$ae.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){Rt(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),eGe=(e=>({name:Bae,setupOnce(){Gae(e)}})),sU=eGe});var Eb,Rc,gi,cU,Vae,tGe,nGe,Fae,aU,rGe,uU,Hae=E(()=>{l();Eb=U(K(),1),Rc=U(Me(),1),gi=U(Qe(),1);ne();Ye();Al();cU="PostgresJs",Vae=[">=3.0.0 <4"],tGe=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,nGe=Symbol.for("sentry.query.from.instrumented.sql"),Fae=ae(cU,e=>new aU({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),aU=class extends Rc.InstrumentationBase{constructor(t){super("sentry-postgres-js",ve,t)}init(){let t=new Rc.InstrumentationNodeModuleDefinition("postgres",Vae,n=>{try{return this._patchPostgres(n)}catch(o){return sn&&b.error("Failed to patch postgres module:",o),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new Rc.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,Vae,this._patchQueryPrototype.bind(this),this._unpatchQueryPrototype.bind(this)))}),t}_patchPostgres(t){let n=typeof t=="function",o=n?t:t.default;if(typeof o!="function")return sn&&b.warn("postgres module does not export a function. Skipping instrumentation."),t;let r=this,i=function(...s){let a=Reflect.construct(o,s);if(!a||typeof a!="function")return sn&&b.warn("postgres() did not return a valid instance"),a;let c=r.getConfig();return Jx(a,{requireParentSpan:c.requireParentSpan,requestHook:c.requestHook})};Object.setPrototypeOf(i,o),Object.setPrototypeOf(i.prototype,o.prototype);for(let s of Object.getOwnPropertyNames(o))if(!["length","name","prototype"].includes(s)){let a=Object.getOwnPropertyDescriptor(o,s);a&&Object.defineProperty(i,s,a)}return n?i:(dg(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return Eb.trace.getSpan(Eb.context.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,o){if(o){t.setAttribute(gi.ATTR_DB_OPERATION_NAME,o);return}let r=n?.match(tGe);r?.[1]&&t.setAttribute(gi.ATTR_DB_OPERATION_NAME,r[1].toUpperCase())}_reconstructQuery(t){if(t?.length)return t.length===1?t[0]||void 0:t.reduce((n,o,r)=>r===0?o:`${n}$${r}${o}`,"")}_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,o=t.Query.prototype.handle;return t.Query.prototype.handle=async function(...r){if(this[nGe])return o.apply(this,r);if(!n._shouldCreateSpans())return o.apply(this,r);let i=n._reconstructQuery(this.strings),s=n._sanitizeSqlQuery(i);return ft({name:s||"postgresjs.query",op:"db"},a=>{Rt(a,"auto.db.postgresjs"),a.setAttributes({[gi.ATTR_DB_SYSTEM_NAME]:"postgres",[gi.ATTR_DB_QUERY_TEXT]:s});let c=n.getConfig(),{requestHook:u}=c;u&&(0,Rc.safeExecuteInTheMiddle)(()=>u(a,s,void 0),f=>{f&&(a.setAttribute("sentry.hook.error","requestHook failed"),sn&&b.error(`Error in requestHook for ${cU} integration:`,f))},!0);let d=this.resolve;this.resolve=new Proxy(d,{apply:(f,m,_)=>{try{n._setOperationName(a,s,_?.[0]?.command),a.end()}catch(h){sn&&b.error("Error ending span in resolve callback:",h)}return Reflect.apply(f,m,_)}});let p=this.reject;this.reject=new Proxy(p,{apply:(f,m,_)=>{try{a.setStatus({code:2,message:_?.[0]?.message||"unknown_error"}),a.setAttribute(gi.ATTR_DB_RESPONSE_STATUS_CODE,_?.[0]?.code||"unknown"),a.setAttribute(gi.ATTR_ERROR_TYPE,_?.[0]?.name||"unknown"),n._setOperationName(a,s),a.end()}catch(h){sn&&b.error("Error ending span in reject callback:",h)}return Reflect.apply(f,m,_)}});try{return o.apply(this,r)}catch(f){throw a.setStatus({code:2,message:f instanceof Error?f.message:"unknown_error"}),a.end(),f}})},t.Query.prototype.handle.__sentry_original__=o,t}_unpatchQueryPrototype(t){return t.Query.prototype.handle.__sentry_original__&&(t.Query.prototype.handle=t.Query.prototype.handle.__sentry_original__),t}},rGe=(e=>({name:cU,setupOnce(){Fae(e)}})),uU=rGe});var zae=A(Gh=>{"use strict";l();Object.defineProperty(Gh,"__esModule",{value:!0});Gh.SeverityNumber=void 0;var oGe;(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"})(oGe=Gh.SeverityNumber||(Gh.SeverityNumber={}))});var Sb=A(xf=>{"use strict";l();Object.defineProperty(xf,"__esModule",{value:!0});xf.NOOP_LOGGER=xf.NoopLogger=void 0;var Tb=class{emit(t){}};xf.NoopLogger=Tb;xf.NOOP_LOGGER=new Tb});var yb=A(Mf=>{"use strict";l();Object.defineProperty(Mf,"__esModule",{value:!0});Mf.NOOP_LOGGER_PROVIDER=Mf.NoopLoggerProvider=void 0;var iGe=Sb(),Ab=class{getLogger(t,n,o){return new iGe.NoopLogger}};Mf.NoopLoggerProvider=Ab;Mf.NOOP_LOGGER_PROVIDER=new Ab});var dU=A(Rb=>{"use strict";l();Object.defineProperty(Rb,"__esModule",{value:!0});Rb.ProxyLogger=void 0;var sGe=Sb(),lU=class{constructor(t,n,o,r){this._provider=t,this.name=n,this.version=o,this.options=r}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):sGe.NOOP_LOGGER}};Rb.ProxyLogger=lU});var fU=A(Ib=>{"use strict";l();Object.defineProperty(Ib,"__esModule",{value:!0});Ib.ProxyLoggerProvider=void 0;var aGe=yb(),cGe=dU(),pU=class{getLogger(t,n,o){var r;return(r=this._getDelegateLogger(t,n,o))!==null&&r!==void 0?r:new cGe.ProxyLogger(this,t,n,o)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:aGe.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,o){var r;return(r=this._delegate)===null||r===void 0?void 0:r.getLogger(t,n,o)}};Ib.ProxyLoggerProvider=pU});var qae=A(bb=>{"use strict";l();Object.defineProperty(bb,"__esModule",{value:!0});bb._globalThis=void 0;bb._globalThis=typeof globalThis=="object"?globalThis:global});var Yae=A(Nb=>{"use strict";l();Object.defineProperty(Nb,"__esModule",{value:!0});Nb._globalThis=void 0;var uGe=qae();Object.defineProperty(Nb,"_globalThis",{enumerable:!0,get:function(){return uGe._globalThis}})});var Wae=A(Ob=>{"use strict";l();Object.defineProperty(Ob,"__esModule",{value:!0});Ob._globalThis=void 0;var lGe=Yae();Object.defineProperty(Ob,"_globalThis",{enumerable:!0,get:function(){return lGe._globalThis}})});var Kae=A(ms=>{"use strict";l();Object.defineProperty(ms,"__esModule",{value:!0});ms.API_BACKWARDS_COMPATIBILITY_VERSION=ms.makeGetter=ms._global=ms.GLOBAL_LOGS_API_KEY=void 0;var dGe=Wae();ms.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");ms._global=dGe._globalThis;function pGe(e,t,n){return o=>o===e?t:n}ms.makeGetter=pGe;ms.API_BACKWARDS_COMPATIBILITY_VERSION=1});var Jae=A(Cb=>{"use strict";l();Object.defineProperty(Cb,"__esModule",{value:!0});Cb.LogsAPI=void 0;var Uo=Kae(),fGe=yb(),Zae=fU(),mU=class e{constructor(){this._proxyLoggerProvider=new Zae.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Uo._global[Uo.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Uo._global[Uo.GLOBAL_LOGS_API_KEY]=(0,Uo.makeGetter)(Uo.API_BACKWARDS_COMPATIBILITY_VERSION,t,fGe.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Uo._global[Uo.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Uo._global,Uo.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,o){return this.getLoggerProvider().getLogger(t,n,o)}disable(){delete Uo._global[Uo.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new Zae.ProxyLoggerProvider}};Cb.LogsAPI=mU});var _U=A(_n=>{"use strict";l();Object.defineProperty(_n,"__esModule",{value:!0});_n.logs=_n.ProxyLoggerProvider=_n.ProxyLogger=_n.NoopLoggerProvider=_n.NOOP_LOGGER_PROVIDER=_n.NoopLogger=_n.NOOP_LOGGER=_n.SeverityNumber=void 0;var mGe=zae();Object.defineProperty(_n,"SeverityNumber",{enumerable:!0,get:function(){return mGe.SeverityNumber}});var Xae=Sb();Object.defineProperty(_n,"NOOP_LOGGER",{enumerable:!0,get:function(){return Xae.NOOP_LOGGER}});Object.defineProperty(_n,"NoopLogger",{enumerable:!0,get:function(){return Xae.NoopLogger}});var Qae=yb();Object.defineProperty(_n,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return Qae.NOOP_LOGGER_PROVIDER}});Object.defineProperty(_n,"NoopLoggerProvider",{enumerable:!0,get:function(){return Qae.NoopLoggerProvider}});var _Ge=dU();Object.defineProperty(_n,"ProxyLogger",{enumerable:!0,get:function(){return _Ge.ProxyLogger}});var gGe=fU();Object.defineProperty(_n,"ProxyLoggerProvider",{enumerable:!0,get:function(){return gGe.ProxyLoggerProvider}});var hGe=Jae();_n.logs=hGe.LogsAPI.getInstance()});var ece=A(Lf=>{"use strict";l();Object.defineProperty(Lf,"__esModule",{value:!0});Lf.disableInstrumentations=Lf.enableInstrumentations=void 0;function EGe(e,t,n,o){for(let r=0,i=e.length;r<i;r++){let s=e[r];t&&s.setTracerProvider(t),n&&s.setMeterProvider(n),o&&s.setLoggerProvider&&s.setLoggerProvider(o),s.getConfig().enabled||s.enable()}}Lf.enableInstrumentations=EGe;function TGe(e){e.forEach(t=>t.disable())}Lf.disableInstrumentations=TGe});var rce=A(vb=>{"use strict";l();Object.defineProperty(vb,"__esModule",{value:!0});vb.registerInstrumentations=void 0;var tce=K(),SGe=_U(),nce=ece();function AGe(e){let t=e.tracerProvider||tce.trace.getTracerProvider(),n=e.meterProvider||tce.metrics.getMeterProvider(),o=e.loggerProvider||SGe.logs.getLoggerProvider(),r=e.instrumentations?.flat()??[];return(0,nce.enableInstrumentations)(r,t,n,o),()=>{(0,nce.disableInstrumentations)(r)}}vb.registerInstrumentations=AGe});var pce=A(Pb=>{"use strict";l();Object.defineProperty(Pb,"__esModule",{value:!0});Pb.satisfies=void 0;var TU=K(),cce=/^(?: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-]+)*))?$/,yGe=/^(?<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-]+)*))?$/,RGe={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function IGe(e,t,n){if(!bGe(e))return TU.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let o=vGe(e);if(!o)return!1;let r=[],i=uce(o,t,r,n);return i&&!n?.includePrerelease?OGe(o,r):i}Pb.satisfies=IGe;function bGe(e){return typeof e=="string"&&cce.test(e)}function uce(e,t,n,o){if(t.includes("||")){let r=t.trim().split("||");for(let i of r)if(gU(e,i,n,o))return!0;return!1}else if(t.includes(" - "))t=ZGe(t,o);else if(t.includes(" ")){let r=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of r)if(!gU(e,i,n,o))return!1;return!0}return gU(e,t,n,o)}function gU(e,t,n,o){if(t=CGe(t,o),t.includes(" "))return uce(e,t,n,o);{let r=PGe(t);return n.push(r),NGe(e,r)}}function NGe(e,t){if(t.invalid)return!1;if(!t.version||EU(t.version))return!0;let n=ice(e.versionSegments||[],t.versionSegments||[]);if(n===0){let o=e.prereleaseSegments||[],r=t.prereleaseSegments||[];!o.length&&!r.length?n=0:!o.length&&r.length?n=1:o.length&&!r.length?n=-1:n=ice(o,r)}return RGe[t.op]?.includes(n)}function OGe(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function CGe(e,t){return e=e.trim(),e=WGe(e,t),e=YGe(e),e=KGe(e,t),e=e.trim(),e}function fr(e){return!e||e.toLowerCase()==="x"||e==="*"}function vGe(e){let t=e.match(cce);if(!t){TU.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,o=t.groups.prerelease,r=t.groups.build,i=n.split("."),s=o?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:o,prereleaseSegments:s,prereleaseSegmentCount:s?s.length:0,build:r}}function PGe(e){if(!e)return{};let t=e.match(yGe);if(!t)return TU.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,o=t.groups.version,r=t.groups.prerelease,i=t.groups.build,s=o.split("."),a=r?.split(".");return n==="=="&&(n="="),{op:n||"=",version:o,versionSegments:s,versionSegmentCount:s.length,prerelease:r,prereleaseSegments:a,prereleaseSegmentCount:a?a.length:0,build:i}}function EU(e){return e==="*"||e==="x"||e==="X"}function oce(e){let t=parseInt(e,10);return isNaN(t)?e:t}function xGe(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 MGe(e,t){if(EU(e)||EU(t))return 0;let[n,o]=xGe(oce(e),oce(t));return n>o?1:n<o?-1:0}function ice(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let o=MGe(e[n]||"0",t[n]||"0");if(o!==0)return o}return 0}var lce="[a-zA-Z0-9-]",dce="0|[1-9]\\d*",LGe=`\\d*[a-zA-Z-]${lce}*`,wGe="((?:<|>)?=?)",sce=`(?:${dce}|${LGe})`,DGe=`(?:-(${sce}(?:\\.${sce})*))`,ace=`${lce}+`,kGe=`(?:\\+(${ace}(?:\\.${ace})*))`,hU=`${dce}|x|X|\\*`,jh=`[v=\\s]*(${hU})(?:\\.(${hU})(?:\\.(${hU})(?:${DGe})?${kGe}?)?)?`,UGe=`^${wGe}\\s*${jh}$`,$Ge=new RegExp(UGe),BGe=`^\\s*(${jh})\\s+-\\s+(${jh})\\s*$`,GGe=new RegExp(BGe),jGe="(?:~>?)",VGe=`^${jGe}${jh}$`,FGe=new RegExp(VGe),HGe="(?:\\^)",zGe=`^${HGe}${jh}$`,qGe=new RegExp(zGe);function YGe(e){let t=FGe;return e.replace(t,(n,o,r,i,s)=>{let a;return fr(o)?a="":fr(r)?a=`>=${o}.0.0 <${+o+1}.0.0-0`:fr(i)?a=`>=${o}.${r}.0 <${o}.${+r+1}.0-0`:s?a=`>=${o}.${r}.${i}-${s} <${o}.${+r+1}.0-0`:a=`>=${o}.${r}.${i} <${o}.${+r+1}.0-0`,a})}function WGe(e,t){let n=qGe,o=t?.includePrerelease?"-0":"";return e.replace(n,(r,i,s,a,c)=>{let u;return fr(i)?u="":fr(s)?u=`>=${i}.0.0${o} <${+i+1}.0.0-0`:fr(a)?i==="0"?u=`>=${i}.${s}.0${o} <${i}.${+s+1}.0-0`:u=`>=${i}.${s}.0${o} <${+i+1}.0.0-0`:c?i==="0"?s==="0"?u=`>=${i}.${s}.${a}-${c} <${i}.${s}.${+a+1}-0`:u=`>=${i}.${s}.${a}-${c} <${i}.${+s+1}.0-0`:u=`>=${i}.${s}.${a}-${c} <${+i+1}.0.0-0`:i==="0"?s==="0"?u=`>=${i}.${s}.${a}${o} <${i}.${s}.${+a+1}-0`:u=`>=${i}.${s}.${a}${o} <${i}.${+s+1}.0-0`:u=`>=${i}.${s}.${a} <${+i+1}.0.0-0`,u})}function KGe(e,t){let n=$Ge;return e.replace(n,(o,r,i,s,a,c)=>{let u=fr(i),d=u||fr(s),p=d||fr(a),f=p;return r==="="&&f&&(r=""),c=t?.includePrerelease?"-0":"",u?r===">"||r==="<"?o="<0.0.0-0":o="*":r&&f?(d&&(s=0),a=0,r===">"?(r=">=",d?(i=+i+1,s=0,a=0):(s=+s+1,a=0)):r==="<="&&(r="<",d?i=+i+1:s=+s+1),r==="<"&&(c="-0"),o=`${r+i}.${s}.${a}${c}`):d?o=`>=${i}.0.0${c} <${+i+1}.0.0-0`:p&&(o=`>=${i}.${s}.0${c} <${i}.${+s+1}.0-0`),o})}function ZGe(e,t){let n=GGe;return e.replace(n,(o,r,i,s,a,c,u,d,p,f,m,_)=>(fr(i)?r="":fr(s)?r=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:fr(a)?r=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:c?r=`>=${r}`:r=`>=${r}${t?.includePrerelease?"-0":""}`,fr(p)?d="":fr(f)?d=`<${+p+1}.0.0-0`:fr(m)?d=`<${p}.${+f+1}.0-0`:_?d=`<=${p}.${f}.${m}-${_}`:t?.includePrerelease?d=`<${p}.${f}.${+m+1}-0`:d=`<=${d}`,`${r} ${d}`.trim()))}});var SU=A(Mn=>{"use strict";l();Object.defineProperty(Mn,"__esModule",{value:!0});Mn.massUnwrap=Mn.unwrap=Mn.massWrap=Mn.wrap=void 0;var mr=console.error.bind(console);function Vh(e,t,n){let o=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:o,writable:!0,value:n})}var JGe=(e,t,n)=>{if(!e||!e[t]){mr("no original function "+String(t)+" to wrap");return}if(!n){mr("no wrapper function"),mr(new Error().stack);return}let o=e[t];if(typeof o!="function"||typeof n!="function"){mr("original object and wrapper must be functions");return}let r=n(o,t);return Vh(r,"__original",o),Vh(r,"__unwrap",()=>{e[t]===r&&Vh(e,t,o)}),Vh(r,"__wrapped",!0),Vh(e,t,r),r};Mn.wrap=JGe;var XGe=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{mr("must provide one or more modules to patch"),mr(new Error().stack);return}if(!(t&&Array.isArray(t))){mr("must provide one or more functions to wrap on modules");return}e.forEach(o=>{t.forEach(r=>{(0,Mn.wrap)(o,r,n)})})};Mn.massWrap=XGe;var QGe=(e,t)=>{if(!e||!e[t]){mr("no function to unwrap."),mr(new Error().stack);return}let n=e[t];if(!n.__unwrap)mr("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Mn.unwrap=QGe;var e1e=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{mr("must provide one or more modules to patch"),mr(new Error().stack);return}if(!(t&&Array.isArray(t))){mr("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(o=>{(0,Mn.unwrap)(n,o)})})};Mn.massUnwrap=e1e;function Fh(e){e&&e.logger&&(typeof e.logger!="function"?mr("new logger isn't a function, not replacing"):mr=e.logger)}Mn.default=Fh;Fh.wrap=Mn.wrap;Fh.massWrap=Mn.massWrap;Fh.unwrap=Mn.unwrap;Fh.massUnwrap=Mn.massUnwrap});var fce=A(Mb=>{"use strict";l();Object.defineProperty(Mb,"__esModule",{value:!0});Mb.InstrumentationAbstract=void 0;var AU=K(),t1e=_U(),xb=SU(),yU=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,o){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(o),this._diag=AU.diag.createComponentLogger({namespace:t}),this._tracer=AU.trace.getTracer(t,n),this._meter=AU.metrics.getMeter(t,n),this._logger=t1e.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=xb.wrap;_unwrap=xb.unwrap;_massWrap=xb.massWrap;_massUnwrap=xb.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,o,r){if(t)try{t(o,r)}catch(i){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},i)}}};Mb.InstrumentationAbstract=yU});var mce=A(Ic=>{"use strict";l();Object.defineProperty(Ic,"__esModule",{value:!0});Ic.ModuleNameTrie=Ic.ModuleNameSeparator=void 0;Ic.ModuleNameSeparator="/";var Lb=class{hooks=[];children=new Map},RU=class{_trie=new Lb;_counter=0;insert(t){let n=this._trie;for(let o of t.moduleName.split(Ic.ModuleNameSeparator)){let r=n.children.get(o);r||(r=new Lb,n.children.set(o,r)),n=r}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:o}={}){let r=this._trie,i=[],s=!0;for(let a of t.split(Ic.ModuleNameSeparator)){let c=r.children.get(a);if(!c){s=!1;break}o||i.push(...c.hooks),r=c}return o&&s&&i.push(...r.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((a,c)=>a.insertedId-c.insertedId),i.map(({hook:a})=>a))}};Ic.ModuleNameTrie=RU});var gce=A(wb=>{"use strict";l();Object.defineProperty(wb,"__esModule",{value:!0});wb.RequireInTheMiddleSingleton=void 0;var n1e=qu(),_ce=require("path"),IU=mce(),r1e=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),bU=class e{_moduleNameTrie=new IU.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new n1e.Hook(null,{internals:!0},(t,n,o)=>{let r=o1e(n),i=this._moduleNameTrie.search(r,{maintainInsertionOrder:!0,fullOnly:o===void 0});for(let{onRequire:s}of i)t=s(t,n,o);return t})}register(t,n){let o={moduleName:t,onRequire:n};return this._moduleNameTrie.insert(o),o}static getInstance(){return r1e?new e:this._instance=this._instance??new e}};wb.RequireInTheMiddleSingleton=bU;function o1e(e){return _ce.sep!==IU.ModuleNameSeparator?e.split(_ce.sep).join(IU.ModuleNameSeparator):e}});var NU=A(bc=>{"use strict";l();Object.defineProperty(bc,"__esModule",{value:!0});bc.isWrapped=bc.safeExecuteInTheMiddleAsync=bc.safeExecuteInTheMiddle=void 0;function i1e(e,t,n){let o,r;try{r=e()}catch(i){o=i}finally{if(t(o,r),o&&!n)throw o;return r}}bc.safeExecuteInTheMiddle=i1e;async function s1e(e,t,n){let o,r;try{r=await e()}catch(i){o=i}finally{if(t(o,r),o&&!n)throw o;return r}}bc.safeExecuteInTheMiddleAsync=s1e;function a1e(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}bc.isWrapped=a1e});var Tce=A(Db=>{"use strict";l();Object.defineProperty(Db,"__esModule",{value:!0});Db.InstrumentationBase=void 0;var Hh=require("path"),hce=require("util"),c1e=pce(),OU=SU(),u1e=fce(),l1e=gce(),d1e=Xk(),zh=K(),p1e=qu(),f1e=require("fs"),m1e=NU(),CU=class extends u1e.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=l1e.RequireInTheMiddleSingleton.getInstance();_enabled=!1;constructor(t,n,o){super(t,n,o);let r=this.init();r&&!Array.isArray(r)&&(r=[r]),this._modules=r||[],this._config.enabled&&this.enable()}_wrap=(t,n,o)=>{if((0,m1e.isWrapped)(t[n])&&this._unwrap(t,n),hce.types.isProxy(t)){let r=(0,OU.wrap)(Object.assign({},t),n,o);return Object.defineProperty(t,n,{value:r}),r}else return(0,OU.wrap)(t,n,o)};_unwrap=(t,n)=>hce.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,OU.unwrap)(t,n);_massWrap=(t,n,o)=>{if(t)Array.isArray(t)||(t=[t]);else{zh.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){zh.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(r=>{n.forEach(i=>{this._wrap(r,i,o)})})};_massUnwrap=(t,n)=>{if(t)Array.isArray(t)||(t=[t]);else{zh.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){zh.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(o=>{n.forEach(r=>{this._unwrap(o,r)})})};_warnOnPreloadedModules(){this._modules.forEach(t=>{let{name:n}=t;try{let o=require.resolve(n);require.cache[o]&&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,f1e.readFileSync)(Hh.join(t,"package.json"),{encoding:"utf8"}),o=JSON.parse(n).version;return typeof o=="string"?o:void 0}catch{zh.diag.warn("Failed extracting version",t)}}_onRequire(t,n,o,r){if(!r)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(r);if(t.moduleVersion=i,t.name===o)return Ece(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:r}),t.patch(n,t.moduleVersion)):n;let s=t.files??[],a=Hh.normalize(o);return s.filter(u=>u.name===a).filter(u=>Ece(u.supportedVersions,i,t.includePrerelease)).reduce((u,d)=>(d.moduleExports=u,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:t.name,version:t.moduleVersion,fileName:d.name,baseDir:r}),d.patch(u,t.moduleVersion)):u),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,a,c)=>{if(!c&&Hh.isAbsolute(a)){let u=Hh.parse(a);a=u.name,c=u.dir}return this._onRequire(t,s,a,c)},o=(s,a,c)=>this._onRequire(t,s,a,c),r=Hh.isAbsolute(t.name)?new p1e.Hook([t.name],{internals:!0},o):this._requireInTheMiddleSingleton.register(t.name,o);this._hooks.push(r);let i=new d1e.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}};Db.InstrumentationBase=CU;function Ece(e,t,n){return typeof t>"u"?e.includes("*"):e.some(o=>(0,c1e.satisfies)(t,o,{includePrerelease:n}))}});var Sce=A(kb=>{"use strict";l();Object.defineProperty(kb,"__esModule",{value:!0});kb.normalize=void 0;var _1e=require("path");Object.defineProperty(kb,"normalize",{enumerable:!0,get:function(){return _1e.normalize}})});var Ace=A(wf=>{"use strict";l();Object.defineProperty(wf,"__esModule",{value:!0});wf.normalize=wf.InstrumentationBase=void 0;var g1e=Tce();Object.defineProperty(wf,"InstrumentationBase",{enumerable:!0,get:function(){return g1e.InstrumentationBase}});var h1e=Sce();Object.defineProperty(wf,"normalize",{enumerable:!0,get:function(){return h1e.normalize}})});var vU=A(Df=>{"use strict";l();Object.defineProperty(Df,"__esModule",{value:!0});Df.normalize=Df.InstrumentationBase=void 0;var yce=Ace();Object.defineProperty(Df,"InstrumentationBase",{enumerable:!0,get:function(){return yce.InstrumentationBase}});Object.defineProperty(Df,"normalize",{enumerable:!0,get:function(){return yce.normalize}})});var Rce=A(Ub=>{"use strict";l();Object.defineProperty(Ub,"__esModule",{value:!0});Ub.InstrumentationNodeModuleDefinition=void 0;var PU=class{name;supportedVersions;patch;unpatch;files;constructor(t,n,o,r,i){this.name=t,this.supportedVersions=n,this.patch=o,this.unpatch=r,this.files=i||[]}};Ub.InstrumentationNodeModuleDefinition=PU});var Ice=A($b=>{"use strict";l();Object.defineProperty($b,"__esModule",{value:!0});$b.InstrumentationNodeModuleFile=void 0;var E1e=vU(),xU=class{supportedVersions;patch;unpatch;name;constructor(t,n,o,r){this.supportedVersions=n,this.patch=o,this.unpatch=r,this.name=(0,E1e.normalize)(t)}};$b.InstrumentationNodeModuleFile=xU});var bce=A(Ll=>{"use strict";l();Object.defineProperty(Ll,"__esModule",{value:!0});Ll.semconvStabilityFromStr=Ll.SemconvStability=void 0;var Bb;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(Bb=Ll.SemconvStability||(Ll.SemconvStability={}));function T1e(e,t){let n=Bb.OLD,o=t?.split(",").map(r=>r.trim()).filter(r=>r!=="");for(let r of o??[])if(r.toLowerCase()===e+"/dup"){n=Bb.DUPLICATE;break}else r.toLowerCase()===e&&(n=Bb.STABLE);return n}Ll.semconvStabilityFromStr=T1e});var Oce=A(Xt=>{"use strict";l();Object.defineProperty(Xt,"__esModule",{value:!0});Xt.semconvStabilityFromStr=Xt.SemconvStability=Xt.safeExecuteInTheMiddleAsync=Xt.safeExecuteInTheMiddle=Xt.isWrapped=Xt.InstrumentationNodeModuleFile=Xt.InstrumentationNodeModuleDefinition=Xt.InstrumentationBase=Xt.registerInstrumentations=void 0;var S1e=rce();Object.defineProperty(Xt,"registerInstrumentations",{enumerable:!0,get:function(){return S1e.registerInstrumentations}});var A1e=vU();Object.defineProperty(Xt,"InstrumentationBase",{enumerable:!0,get:function(){return A1e.InstrumentationBase}});var y1e=Rce();Object.defineProperty(Xt,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return y1e.InstrumentationNodeModuleDefinition}});var R1e=Ice();Object.defineProperty(Xt,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return R1e.InstrumentationNodeModuleFile}});var MU=NU();Object.defineProperty(Xt,"isWrapped",{enumerable:!0,get:function(){return MU.isWrapped}});Object.defineProperty(Xt,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return MU.safeExecuteInTheMiddle}});Object.defineProperty(Xt,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return MU.safeExecuteInTheMiddleAsync}});var Nce=bce();Object.defineProperty(Xt,"SemconvStability",{enumerable:!0,get:function(){return Nce.SemconvStability}});Object.defineProperty(Xt,"semconvStabilityFromStr",{enumerable:!0,get:function(){return Nce.semconvStabilityFromStr}})});function N1e(){let e=kf[wU];return e?.helper?e.helper:kf[LU]?.helper}function O1e(e){let t={helper:e};kf[wU]=t,kf[LU]=t}function C1e(){delete kf[wU],delete kf[LU]}function x1e(e){switch(e){case"client":return Nc.SpanKind.CLIENT;case"internal":default:return Nc.SpanKind.INTERNAL}}function xce(e,t,n,o,r){if(Mce(t.name,r))return;let i={attributes:t.attributes,kind:x1e(t.kind),startTime:t.startTime};e.startActiveSpan(t.name,i,s=>{o.set(t.id,s.spanContext().spanId),t.links&&s.addLinks(t.links.flatMap(c=>{let u=o.get(c);return u?{context:{spanId:u,traceId:s.spanContext().traceId,traceFlags:s.spanContext().traceFlags}}:[]}));let a=n.filter(c=>c.parentId===t.id);for(let c of a)xce(e,c,n,o,r);s.end(t.endTime)})}function Cce(e,t){return L1e(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function L1e(e){return e!=null&&typeof e.then=="function"}function Mce(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var Pce,Gb,Nc,I1e,b1e,LU,wU,kf,v1e,P1e,M1e,Lce,vce,w1e,D1e,wce,Dce=E(()=>{l();Pce=U(K(),1),Gb=U(Oce(),1),Nc=U(K(),1),I1e={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"}},b1e=I1e.version.split(".")[0],LU="PRISMA_INSTRUMENTATION",wU=`V${b1e}_PRISMA_INSTRUMENTATION`,kf=globalThis;v1e=process.env.PRISMA_SHOW_ALL_TRACES==="true",P1e="00-10-10-00";M1e=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=Nc.trace.getSpanContext(e??Nc.context.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:P1e}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,o=e.filter(r=>r.parentId===null);for(let r of o)xce(t,r,e,n,this.ignoreSpanTypes)}getActiveContext(){return Nc.context.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!v1e)return t();let n=this.tracerProvider.getTracer("prisma"),o=e.context??this.getActiveContext(),r=`prisma:client:${e.name}`;if(Mce(r,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(r,e,o);return Cce(i,t(i,o))}return n.startActiveSpan(r,e,i=>Cce(i,t(i,o)))}};Lce={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},vce=Lce.version,w1e=Lce.name,D1e="@prisma/client",wce=class extends Gb.InstrumentationBase{tracerProvider;constructor(e={}){super(w1e,vce,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new Gb.InstrumentationNodeModuleDefinition(D1e,[vce])]}enable(){let e=this._config;O1e(new M1e({tracerProvider:this.tracerProvider??Pce.trace.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){C1e()}isEnabled(){return N1e()!==void 0}}});function k1e(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function Uce(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function U1e(e){switch(e){case"client":return $o.SpanKind.CLIENT;case"internal":default:return $o.SpanKind.INTERNAL}}var $o,kce,DU,$1e,kU,$ce=E(()=>{l();$o=U(K(),1);Dce();ne();Ye();kce="Prisma";DU=class extends wce{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=Uce();k1e(t)&&(t.createEngineSpan=n=>{let o=$o.trace.getTracer("prismaV5Compatibility"),r=o._idGenerator;if(!r){bt(()=>{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=U1e(i.kind),a=i.parent_span_id,c=i.span_id,u=i.trace_id,d=i.links?.map(f=>({context:{traceId:f.trace_id,spanId:f.span_id,traceFlags:$o.TraceFlags.SAMPLED}})),p=$o.trace.setSpanContext($o.context.active(),{traceId:u,spanId:a,traceFlags:$o.TraceFlags.SAMPLED});$o.context.with(p,()=>{let f={generateTraceId:()=>u,generateSpanId:()=>c};o._idGenerator=f,o.startSpan(i.name,{kind:s,links:d,startTime:i.start_time,attributes:i.attributes}).end(i.end_time),o._idGenerator=r})})}finally{o._idGenerator=r}})}};$1e=ae(kce,e=>new DU(e)),kU=e=>({name:kce,setupOnce(){$1e(e)},setup(t){Uce()&&t.on("spanStart",n=>{let o=_e(n);o.description?.startsWith("prisma:")&&n.setAttribute(te,"auto.db.otel.prisma"),(o.description==="prisma:engine:db_query"||o.description==="prisma:client:db_query")&&o.data["db.query.text"]&&n.updateName(o.data["db.query.text"]),o.description==="prisma:engine:db_query"&&!o.data["db.system"]&&n.setAttribute("db.system","prisma")})}})});var Bce=A(Uf=>{"use strict";l();Object.defineProperty(Uf,"__esModule",{value:!0});Uf.PACKAGE_NAME=Uf.PACKAGE_VERSION=void 0;Uf.PACKAGE_VERSION="0.60.0";Uf.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var UU=A(_s=>{"use strict";l();Object.defineProperty(_s,"__esModule",{value:!0});_s.HapiLifecycleMethodNames=_s.HapiLayerType=_s.handlerPatched=_s.HapiComponentName=void 0;_s.HapiComponentName="@hapi/hapi";_s.handlerPatched=Symbol("hapi-handler-patched");_s.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};_s.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var Gce=A(jb=>{"use strict";l();Object.defineProperty(jb,"__esModule",{value:!0});jb.ATTR_HTTP_METHOD=void 0;jb.ATTR_HTTP_METHOD="http.method"});var $U=A(qh=>{"use strict";l();Object.defineProperty(qh,"__esModule",{value:!0});qh.AttributeNames=void 0;var B1e;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(B1e=qh.AttributeNames||(qh.AttributeNames={}))});var Fce=A(Qt=>{"use strict";l();Object.defineProperty(Qt,"__esModule",{value:!0});Qt.getPluginFromInput=Qt.getExtMetadata=Qt.getRouteMetadata=Qt.isPatchableExtMethod=Qt.isDirectExtInput=Qt.isLifecycleExtEventObj=Qt.isLifecycleExtType=Qt.getPluginName=void 0;var jce=Qe(),G1e=Gce(),Yh=UU(),Oc=$U(),Vce=Me();function j1e(e){return e.name?e.name:e.pkg.name}Qt.getPluginName=j1e;var V1e=e=>typeof e=="string"&&Yh.HapiLifecycleMethodNames.has(e);Qt.isLifecycleExtType=V1e;var F1e=e=>{let t=e?.type;return t!==void 0&&(0,Qt.isLifecycleExtType)(t)};Qt.isLifecycleExtEventObj=F1e;var H1e=e=>Array.isArray(e)&&e.length<=3&&(0,Qt.isLifecycleExtType)(e[0])&&typeof e[1]=="function";Qt.isDirectExtInput=H1e;var z1e=e=>!Array.isArray(e);Qt.isPatchableExtMethod=z1e;var q1e=(e,t,n)=>{let o={[jce.ATTR_HTTP_ROUTE]:e.path};t&Vce.SemconvStability.OLD&&(o[G1e.ATTR_HTTP_METHOD]=e.method),t&Vce.SemconvStability.STABLE&&(o[jce.ATTR_HTTP_REQUEST_METHOD]=e.method);let r;return n?(o[Oc.AttributeNames.HAPI_TYPE]=Yh.HapiLayerType.PLUGIN,o[Oc.AttributeNames.PLUGIN_NAME]=n,r=`${n}: route - ${e.path}`):(o[Oc.AttributeNames.HAPI_TYPE]=Yh.HapiLayerType.ROUTER,r=`route - ${e.path}`),{attributes:o,name:r}};Qt.getRouteMetadata=q1e;var Y1e=(e,t,n)=>{let o=`ext - ${e}`;return n&&n!=="method"&&(o=`ext - ${e} - ${n}`),t?{attributes:{[Oc.AttributeNames.EXT_TYPE]:e,[Oc.AttributeNames.HAPI_TYPE]:Yh.HapiLayerType.EXT,[Oc.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${o}`}:{attributes:{[Oc.AttributeNames.EXT_TYPE]:e,[Oc.AttributeNames.HAPI_TYPE]:Yh.HapiLayerType.EXT},name:o}};Qt.getExtMetadata=Y1e;var W1e=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;Qt.getPluginFromInput=W1e});var qce=A(Vb=>{"use strict";l();Object.defineProperty(Vb,"__esModule",{value:!0});Vb.HapiInstrumentation=void 0;var io=K(),Hce=rt(),Wh=Me(),zce=Bce(),Kh=UU(),fa=Fce(),BU=class extends Wh.InstrumentationBase{_semconvStability;constructor(t={}){super(zce.PACKAGE_NAME,zce.PACKAGE_VERSION,t),this._semconvStability=(0,Wh.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new Wh.InstrumentationNodeModuleDefinition(Kh.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,Wh.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,Wh.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,o=this;return function(i){let s=t.apply(this,[i]);return o._wrap(s,"route",a=>n._getServerRoutePatch.bind(n)(a)),o._wrap(s,"ext",a=>n._getServerExtPatch.bind(n)(a)),o._wrap(s,"register",n._getServerRegisterPatch.bind(n)),s}}_getServerRegisterPatch(t){let n=this;return function(r,i){if(Array.isArray(r))for(let s of r){let a=(0,fa.getPluginFromInput)(s);n._wrapRegisterHandler(a)}else{let s=(0,fa.getPluginFromInput)(r);n._wrapRegisterHandler(s)}return t.apply(this,[r,i])}}_getServerExtPatch(t,n){let o=this;return function(...i){if(Array.isArray(i[0])){let s=i[0];for(let a=0;a<s.length;a++){let c=s[a];if((0,fa.isLifecycleExtType)(c.type)){let u=c,d=o._wrapExtMethods(u.method,c.type,n);u.method=d,s[a]=u}}return t.apply(this,i)}else if((0,fa.isDirectExtInput)(i)){let s=i,a=s[1],c=o._wrapExtMethods(a,s[0],n);return t.apply(this,[s[0],c,s[2]])}else if((0,fa.isLifecycleExtEventObj)(i[0])){let s=i[0],a=o._wrapExtMethods(s.method,s.type,n);return s.method=a,t.call(this,s)}return t.apply(this,i)}}_getServerRoutePatch(t,n){let o=this;return function(r){if(Array.isArray(r))for(let i=0;i<r.length;i++){let s=o._wrapRouteHandler.call(o,r[i],n);r[i]=s}else r=o._wrapRouteHandler.call(o,r,n);return t.apply(this,[r])}}_wrapRegisterHandler(t){let n=this,o=(0,fa.getPluginName)(t),r=t.register,i=this,s=function(a,c){return i._wrap(a,"route",u=>n._getServerRoutePatch.bind(n)(u,o)),i._wrap(a,"ext",u=>n._getServerExtPatch.bind(n)(u,o)),r.call(this,a,c)};t.register=s}_wrapExtMethods(t,n,o){let r=this;if(t instanceof Array){for(let i=0;i<t.length;i++)t[i]=r._wrapExtMethods(t[i],n);return t}else if((0,fa.isPatchableExtMethod)(t))return t[Kh.handlerPatched]===!0?t:(t[Kh.handlerPatched]=!0,async function(...s){if(io.trace.getSpan(io.context.active())===void 0)return await t.apply(this,s);let a=(0,fa.getExtMetadata)(n,o,t.name),c=r.tracer.startSpan(a.name,{attributes:a.attributes});try{return await io.context.with(io.trace.setSpan(io.context.active(),c),t,void 0,...s)}catch(u){throw c.recordException(u),c.setStatus({code:io.SpanStatusCode.ERROR,message:u.message}),u}finally{c.end()}});return t}_wrapRouteHandler(t,n){let o=this;if(t[Kh.handlerPatched]===!0)return t;t[Kh.handlerPatched]=!0;let r=i=>async function(...s){if(io.trace.getSpan(io.context.active())===void 0)return await i.call(this,...s);let a=(0,Hce.getRPCMetadata)(io.context.active());a?.type===Hce.RPCType.HTTP&&(a.route=t.path);let c=(0,fa.getRouteMetadata)(t,o._semconvStability,n),u=o.tracer.startSpan(c.name,{attributes:c.attributes});try{return await io.context.with(io.trace.setSpan(io.context.active(),u),()=>i.call(this,...s))}catch(d){throw u.recordException(d),u.setStatus({code:io.SpanStatusCode.ERROR,message:d.message}),d}finally{u.end()}};if(typeof t.handler=="function")t.handler=r(t.handler);else if(typeof t.options=="function"){let i=t.options;t.options=function(s){let a=i(s);return typeof a.handler=="function"&&(a.handler=r(a.handler)),a}}else typeof t.options?.handler=="function"&&(t.options.handler=r(t.options.handler));return t}};Vb.HapiInstrumentation=BU});var Yce=A($f=>{"use strict";l();Object.defineProperty($f,"__esModule",{value:!0});$f.AttributeNames=$f.HapiInstrumentation=void 0;var K1e=qce();Object.defineProperty($f,"HapiInstrumentation",{enumerable:!0,get:function(){return K1e.HapiInstrumentation}});var Z1e=$U();Object.defineProperty($f,"AttributeNames",{enumerable:!0,get:function(){return Z1e.AttributeNames}})});var Wce,Kce,Zce,J1e,GU,Jce=E(()=>{l();Wce=U(Yce(),1);Ye();Kce="Hapi",Zce=ae(Kce,()=>new Wce.HapiInstrumentation),J1e=(()=>({name:Kce,setupOnce(){Zce()}})),GU=J1e});var Cc,Zh,jU=E(()=>{l();Cc={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},Zh={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var wl,Hb,X1e,Q1e,Fb,Xce=E(()=>{l();wl=U(K(),1),Hb=U(Me(),1);ne();jU();X1e="@sentry/instrumentation-hono",Q1e="0.0.1",Fb=class extends Hb.InstrumentationBase{constructor(t={}){super(X1e,Q1e,t)}init(){return[new Hb.InstrumentationNodeModuleDefinition("hono",[">=4.0.0 <5"],t=>this._patch(t))]}_patch(t){let n=this;class o 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=o}catch{return{...t,Hono:o}}return t}_patchHandler(){let t=this;return function(n){return function(...r){if(typeof r[0]=="string"){let i=r[0];if(r.length===1)return n.apply(this,[i]);let s=r.slice(1);return n.apply(this,[i,...s.map(a=>t._wrapHandler(a))])}return n.apply(this,r.map(i=>t._wrapHandler(i)))}}}_patchOnHandler(){let t=this;return function(n){return function(...r){let i=r.slice(2);return n.apply(this,[...r.slice(0,2),...i.map(s=>t._wrapHandler(s))])}}}_patchMiddlewareHandler(){let t=this;return function(n){return function(...r){if(typeof r[0]=="string"){let i=r[0];if(r.length===1)return n.apply(this,[i]);let s=r.slice(1);return n.apply(this,[i,...s.map(a=>t._wrapHandler(a))])}return n.apply(this,r.map(i=>t._wrapHandler(i)))}}}_wrapHandler(t){let n=this;return function(o,r){if(!n.isEnabled())return t.apply(this,[o,r]);let i=o.req.path,s=n.tracer.startSpan(i);return wl.context.with(wl.trace.setSpan(wl.context.active(),s),()=>n._safeExecute(()=>{let a=t.apply(this,[o,r]);if(yn(a))return a.then(c=>{let u=n._determineHandlerType(c);return s.setAttributes({[Cc.HONO_TYPE]:u,[Cc.HONO_NAME]:u===Zh.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(s),c});{let c=n._determineHandlerType(a);return s.setAttributes({[Cc.HONO_TYPE]:c,[Cc.HONO_NAME]:c===Zh.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(s),a}},()=>s.end(),a=>{n._handleError(s,a),s.end()}))}}_safeExecute(t,n,o){try{let r=t();return yn(r)?r.then(()=>n(),i=>o(i)):n(),r}catch(r){throw o(r),r}}_determineHandlerType(t){return t===void 0?Zh.MIDDLEWARE:Zh.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:wl.SpanStatusCode.ERROR,message:n.message}),t.recordException(n))}}});function eje(e){let t=_e(e).data,n=t[Cc.HONO_TYPE];if(t[oe]||!n)return;e.setAttributes({[te]:"auto.http.otel.hono",[oe]:`${n}.hono`});let o=t[Cc.HONO_NAME];if(typeof o=="string"&&e.updateName(o),Te()===go()){sn&&b.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let r=t[zb.ATTR_HTTP_ROUTE],i=t[zb.ATTR_HTTP_REQUEST_METHOD];typeof r=="string"&&typeof i=="string"&&Te().setTransactionName(`${i} ${r}`)}var zb,Qce,eue,tje,VU,tue=E(()=>{l();zb=U(Qe(),1);ne();Ye();Al();jU();Xce();Qce="Hono";eue=ae(Qce,()=>new Fb({responseHook:e=>{eje(e)}})),tje=(()=>({name:Qce,setupOnce(){eue()}})),VU=tje});var qb=A(Jh=>{"use strict";l();Object.defineProperty(Jh,"__esModule",{value:!0});Jh.KoaLayerType=void 0;var nje;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(nje=Jh.KoaLayerType||(Jh.KoaLayerType={}))});var nue=A(Bf=>{"use strict";l();Object.defineProperty(Bf,"__esModule",{value:!0});Bf.PACKAGE_NAME=Bf.PACKAGE_VERSION=void 0;Bf.PACKAGE_VERSION="0.62.0";Bf.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var FU=A(Xh=>{"use strict";l();Object.defineProperty(Xh,"__esModule",{value:!0});Xh.AttributeNames=void 0;var rje;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(rje=Xh.AttributeNames||(Xh.AttributeNames={}))});var oue=A(Gf=>{"use strict";l();Object.defineProperty(Gf,"__esModule",{value:!0});Gf.isLayerIgnored=Gf.getMiddlewareMetadata=void 0;var rue=qb(),Yb=FU(),oje=Qe(),ije=(e,t,n,o)=>n?{attributes:{[Yb.AttributeNames.KOA_NAME]:o?.toString(),[Yb.AttributeNames.KOA_TYPE]:rue.KoaLayerType.ROUTER,[oje.ATTR_HTTP_ROUTE]:o?.toString()},name:e._matchedRouteName||`router - ${o}`}:{attributes:{[Yb.AttributeNames.KOA_NAME]:t.name??"middleware",[Yb.AttributeNames.KOA_TYPE]:rue.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};Gf.getMiddlewareMetadata=ije;var sje=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));Gf.isLayerIgnored=sje});var iue=A(Wb=>{"use strict";l();Object.defineProperty(Wb,"__esModule",{value:!0});Wb.kLayerPatched=void 0;Wb.kLayerPatched=Symbol("koa-layer-patched")});var due=A(Kb=>{"use strict";l();Object.defineProperty(Kb,"__esModule",{value:!0});Kb.KoaInstrumentation=void 0;var gs=K(),Qh=Me(),sue=qb(),aue=nue(),cue=oue(),uue=rt(),lue=iue(),HU=class extends Qh.InstrumentationBase{constructor(t={}){super(aue.PACKAGE_NAME,aue.PACKAGE_VERSION,t)}init(){return new Qh.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,Qh.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,Qh.isWrapped)(n.prototype.use)&&this._unwrap(n.prototype,"use")})}_getKoaUsePatch(t){let n=this;return function(r){let i;return r.router?i=n._patchRouterDispatch(r):i=n._patchLayer(r,!1),t.apply(this,[i])}}_patchRouterDispatch(t){gs.diag.debug("Patching @koa/router dispatch");let o=t.router?.stack??[];for(let r of o){let i=r.path,s=r.stack;for(let a=0;a<s.length;a++){let c=s[a];s[a]=this._patchLayer(c,!0,i)}}return t}_patchLayer(t,n,o){let r=n?sue.KoaLayerType.ROUTER:sue.KoaLayerType.MIDDLEWARE;return t[lue.kLayerPatched]===!0||(0,cue.isLayerIgnored)(r,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(gs.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[lue.kLayerPatched]=!0,gs.diag.debug("patching Koa middleware layer"),async(i,s)=>{if(gs.trace.getSpan(gs.context.active())===void 0)return t(i,s);let c=(0,cue.getMiddlewareMetadata)(i,t,n,o),u=this.tracer.startSpan(c.name,{attributes:c.attributes}),d=(0,uue.getRPCMetadata)(gs.context.active());d?.type===uue.RPCType.HTTP&&i._matchedRoute&&(d.route=i._matchedRoute.toString());let{requestHook:p}=this.getConfig();p&&(0,Qh.safeExecuteInTheMiddle)(()=>p(u,{context:i,middlewareLayer:t,layerType:r}),m=>{m&&gs.diag.error("koa instrumentation: request hook failed",m)},!0);let f=gs.trace.setSpan(gs.context.active(),u);return gs.context.with(f,async()=>{try{return await t(i,s)}catch(m){throw u.recordException(m),m}finally{u.end()}})})}};Kb.KoaInstrumentation=HU});var pue=A(vc=>{"use strict";l();Object.defineProperty(vc,"__esModule",{value:!0});vc.KoaLayerType=vc.AttributeNames=vc.KoaInstrumentation=void 0;var aje=due();Object.defineProperty(vc,"KoaInstrumentation",{enumerable:!0,get:function(){return aje.KoaInstrumentation}});var cje=FU();Object.defineProperty(vc,"AttributeNames",{enumerable:!0,get:function(){return cje.AttributeNames}});var uje=qb();Object.defineProperty(vc,"KoaLayerType",{enumerable:!0,get:function(){return uje.KoaLayerType}})});var fue,mue,_ue,gue,lje,zU,hue=E(()=>{l();fue=U(pue(),1),mue=U(Qe(),1);ne();Ye();Al();_ue="Koa",gue=ae(_ue,fue.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){Rt(t,"auto.http.otel.koa");let o=_e(t).data,r=o["koa.type"];r&&t.setAttribute(oe,`${r}.koa`);let i=o["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),Te()===go()){sn&&b.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let s=o[mue.ATTR_HTTP_ROUTE],a=n.context?.request?.method?.toUpperCase()||"GET";s&&Te().setTransactionName(`${a} ${s}`)}})),lje=((e={})=>({name:_ue,setupOnce(){gue(e)}})),zU=lje});var qU=A(hi=>{"use strict";l();Object.defineProperty(hi,"__esModule",{value:!0});hi.ConnectNames=hi.ConnectTypes=hi.AttributeNames=void 0;var dje;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(dje=hi.AttributeNames||(hi.AttributeNames={}));var pje;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(pje=hi.ConnectTypes||(hi.ConnectTypes={}));var fje;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(fje=hi.ConnectNames||(hi.ConnectNames={}))});var Eue=A(jf=>{"use strict";l();Object.defineProperty(jf,"__esModule",{value:!0});jf.PACKAGE_NAME=jf.PACKAGE_VERSION=void 0;jf.PACKAGE_VERSION="0.57.0";jf.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var Tue=A(Zb=>{"use strict";l();Object.defineProperty(Zb,"__esModule",{value:!0});Zb._LAYERS_STORE_PROPERTY=void 0;Zb._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var Sue=A(xc=>{"use strict";l();Object.defineProperty(xc,"__esModule",{value:!0});xc.generateRoute=xc.replaceCurrentStackRoute=xc.addNewStackLayer=void 0;var mje=K(),Pc=Tue(),_je=e=>{Array.isArray(e[Pc._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,Pc._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[Pc._LAYERS_STORE_PROPERTY].push("/");let t=e[Pc._LAYERS_STORE_PROPERTY].length;return()=>{t===e[Pc._LAYERS_STORE_PROPERTY].length?e[Pc._LAYERS_STORE_PROPERTY].pop():mje.diag.warn("Connect: Trying to pop the stack multiple time")}};xc.addNewStackLayer=_je;var gje=(e,t)=>{t&&e[Pc._LAYERS_STORE_PROPERTY].splice(-1,1,t)};xc.replaceCurrentStackRoute=gje;var hje=e=>e[Pc._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);xc.generateRoute=hje});var Rue=A(Mc=>{"use strict";l();Object.defineProperty(Mc,"__esModule",{value:!0});Mc.ConnectInstrumentation=Mc.ANONYMOUS_NAME=void 0;var Eje=K(),Aue=rt(),Vf=qU(),yue=Eue(),Jb=Me(),Tje=Qe(),YU=Sue();Mc.ANONYMOUS_NAME="anonymous";var WU=class extends Jb.InstrumentationBase{constructor(t={}){super(yue.PACKAGE_NAME,yue.PACKAGE_VERSION,t)}init(){return[new Jb.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,Jb.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,Jb.isWrapped)(t.handle)||this._wrap(t,"handle",this._patchHandle.bind(this))}_patchConstructor(t){let n=this;return function(...o){let r=t.apply(this,o);return n._patchApp(r),r}}_patchNext(t,n){return function(r){let i=t.apply(this,[r]);return n(),i}}_startSpan(t,n){let o,r,i;t?(o=Vf.ConnectTypes.REQUEST_HANDLER,i=Vf.ConnectNames.REQUEST_HANDLER,r=t):(o=Vf.ConnectTypes.MIDDLEWARE,i=Vf.ConnectNames.MIDDLEWARE,r=n.name||Mc.ANONYMOUS_NAME);let s=`${i} - ${r}`,a={attributes:{[Tje.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[Vf.AttributeNames.CONNECT_TYPE]:o,[Vf.AttributeNames.CONNECT_NAME]:r}};return this.tracer.startSpan(s,a)}_patchMiddleware(t,n){let o=this,r=n.length===4;function i(){if(!o.isEnabled())return n.apply(this,arguments);let[s,a,c]=r?[1,2,3]:[0,1,2],u=arguments[s],d=arguments[a],p=arguments[c];(0,YU.replaceCurrentStackRoute)(u,t);let f=(0,Aue.getRPCMetadata)(Eje.context.active());t&&f?.type===Aue.RPCType.HTTP&&(f.route=(0,YU.generateRoute)(u));let m="";t?m=`request handler - ${t}`:m=`middleware - ${n.name||Mc.ANONYMOUS_NAME}`;let _=o._startSpan(t,n);o._diag.debug("start span",m);let h=!1;function T(){h?o._diag.debug(`span ${_.name} - already finished`):(h=!0,o._diag.debug(`finishing span ${_.name}`),_.end()),d.removeListener("close",T)}return d.addListener("close",T),arguments[c]=o._patchNext(p,T),n.apply(this,arguments)}return Object.defineProperty(i,"length",{value:n.length,writable:!1,configurable:!0}),i}_patchUse(t){let n=this;return function(...o){let r=o[o.length-1],i=o[o.length-2]||"";return o[o.length-1]=n._patchMiddleware(i,r),t.apply(this,o)}}_patchHandle(t){let n=this;return function(){let[o,r]=[0,2],i=arguments[o],s=arguments[r],a=(0,YU.addNewStackLayer)(i);return typeof s=="function"&&(arguments[r]=n._patchOut(s,a)),t.apply(this,arguments)}}_patchOut(t,n){return function(...r){return n(),Reflect.apply(t,this,r)}}};Mc.ConnectInstrumentation=WU});var bue=A(Bo=>{"use strict";l();Object.defineProperty(Bo,"__esModule",{value:!0});Bo.ConnectTypes=Bo.ConnectNames=Bo.AttributeNames=Bo.ANONYMOUS_NAME=Bo.ConnectInstrumentation=void 0;var Iue=Rue();Object.defineProperty(Bo,"ConnectInstrumentation",{enumerable:!0,get:function(){return Iue.ConnectInstrumentation}});Object.defineProperty(Bo,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return Iue.ANONYMOUS_NAME}});var KU=qU();Object.defineProperty(Bo,"AttributeNames",{enumerable:!0,get:function(){return KU.AttributeNames}});Object.defineProperty(Bo,"ConnectNames",{enumerable:!0,get:function(){return KU.ConnectNames}});Object.defineProperty(Bo,"ConnectTypes",{enumerable:!0,get:function(){return KU.ConnectTypes}})});var Nue,Oue,Cue,Sje,ZU,vue=E(()=>{l();Nue=U(bue(),1);Ye();Oue="Connect",Cue=ae(Oue,()=>new Nue.ConnectInstrumentation),Sje=(()=>({name:Oue,setupOnce(){Cue()}})),ZU=Sje});var Pue=A(gn=>{"use strict";l();Object.defineProperty(gn,"__esModule",{value:!0});gn.DB_SYSTEM_VALUE_MSSQL=gn.ATTR_NET_PEER_PORT=gn.ATTR_NET_PEER_NAME=gn.ATTR_DB_USER=gn.ATTR_DB_SYSTEM=gn.ATTR_DB_STATEMENT=gn.ATTR_DB_SQL_TABLE=gn.ATTR_DB_NAME=void 0;gn.ATTR_DB_NAME="db.name";gn.ATTR_DB_SQL_TABLE="db.sql.table";gn.ATTR_DB_STATEMENT="db.statement";gn.ATTR_DB_SYSTEM="db.system";gn.ATTR_DB_USER="db.user";gn.ATTR_NET_PEER_NAME="net.peer.name";gn.ATTR_NET_PEER_PORT="net.peer.port";gn.DB_SYSTEM_VALUE_MSSQL="mssql"});var xue=A(Ff=>{"use strict";l();Object.defineProperty(Ff,"__esModule",{value:!0});Ff.once=Ff.getSpanName=void 0;function Aje(e,t,n,o){return e==="execBulkLoad"&&o&&t?`${e} ${o} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}Ff.getSpanName=Aje;var yje=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Ff.once=yje});var Mue=A(Hf=>{"use strict";l();Object.defineProperty(Hf,"__esModule",{value:!0});Hf.PACKAGE_NAME=Hf.PACKAGE_VERSION=void 0;Hf.PACKAGE_VERSION="0.33.0";Hf.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var Uue=A(wc=>{"use strict";l();Object.defineProperty(wc,"__esModule",{value:!0});wc.TediousInstrumentation=wc.INJECTED_CTX=void 0;var zf=K(),Rje=require("events"),hs=Me(),Dl=Qe(),Lc=Pue(),Lue=xue(),wue=Mue(),kue=Symbol("opentelemetry.instrumentation-tedious.current-database");wc.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var Due=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function Xb(e){Object.defineProperty(this,kue,{value:e,writable:!0})}var JU=class e extends hs.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(wue.PACKAGE_NAME,wue.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,hs.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,hs.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new hs.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let o of Due)(0,hs.isWrapped)(n[o])&&this._unwrap(n,o),this._wrap(n,o,this._patchQuery(o,t));return(0,hs.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 o of Due)this._unwrap(n,o);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return Xb.call(this,this.config?.options?.database),this.removeListener("databaseChange",Xb),this.on("databaseChange",Xb),this.once("end",()=>{this.removeListener("databaseChange",Xb)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||zf.TraceFlags.NONE).toString(16)}`}_injectContextInfo(t,n,o){return new Promise(r=>{try{let i="set context_info @opentelemetry_traceparent",s=new n.Request(i,c=>{r()});Object.defineProperty(s,wc.INJECTED_CTX,{value:!0});let a=Buffer.from(o,"utf8");s.addParameter("opentelemetry_traceparent",n.TYPES.VarBinary,a,{length:a.length}),t.execSql(s)}catch{r()}})}_shouldInjectFor(t){return t==="execSql"||t==="execSqlBatch"||t==="callProcedure"||t==="execute"}_patchQuery(t,n){return o=>{let r=this;function i(s){if(s?.[wc.INJECTED_CTX])return o.apply(this,arguments);if(!(s instanceof Rje.EventEmitter))return r._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),o.apply(this,arguments);let a=0,c=0,u=()=>c++,d=()=>a++,p=this[kue],f=(x=>x.sqlTextOrProcedure==="sp_prepare"&&x.parametersByName?.stmt?.value?x.parametersByName.stmt.value:x.sqlTextOrProcedure)(s),m={};r._dbSemconvStability&hs.SemconvStability.OLD&&(m[Lc.ATTR_DB_SYSTEM]=Lc.DB_SYSTEM_VALUE_MSSQL,m[Lc.ATTR_DB_NAME]=p,m[Lc.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,m[Lc.ATTR_DB_STATEMENT]=f,m[Lc.ATTR_DB_SQL_TABLE]=s.table),r._dbSemconvStability&hs.SemconvStability.STABLE&&(m[Dl.ATTR_DB_NAMESPACE]=p,m[Dl.ATTR_DB_SYSTEM_NAME]=Dl.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,m[Dl.ATTR_DB_QUERY_TEXT]=f,m[Dl.ATTR_DB_COLLECTION_NAME]=s.table),r._netSemconvStability&hs.SemconvStability.OLD&&(m[Lc.ATTR_NET_PEER_NAME]=this.config?.server,m[Lc.ATTR_NET_PEER_PORT]=this.config?.options?.port),r._netSemconvStability&hs.SemconvStability.STABLE&&(m[Dl.ATTR_SERVER_ADDRESS]=this.config?.server,m[Dl.ATTR_SERVER_PORT]=this.config?.options?.port);let _=r.tracer.startSpan((0,Lue.getSpanName)(t,p,f,s.table),{kind:zf.SpanKind.CLIENT,attributes:m}),h=(0,Lue.once)(x=>{s.removeListener("done",u),s.removeListener("doneInProc",u),s.removeListener("doneProc",d),s.removeListener("error",h),this.removeListener("end",h),_.setAttribute("tedious.procedure_count",a),_.setAttribute("tedious.statement_count",c),x&&_.setStatus({code:zf.SpanStatusCode.ERROR,message:x.message}),_.end()});s.on("done",u),s.on("doneInProc",u),s.on("doneProc",d),s.once("error",h),this.on("end",h),typeof s.callback=="function"?r._wrap(s,"callback",r._patchCallbackQuery(h)):r._diag.error("Expected request.callback to be a function");let T=()=>zf.context.with(zf.trace.setSpan(zf.context.active(),_),o,this,...arguments);if(!(r.getConfig().enableTraceContextPropagation&&r._shouldInjectFor(t)))return T();let v=r._buildTraceparent(_);r._injectContextInfo(this,n,v).finally(T)}return Object.defineProperty(i,"length",{value:o.length,writable:!1}),i}}_patchCallbackQuery(t){return n=>function(o,r,i){return t(o),n.apply(this,arguments)}}};wc.TediousInstrumentation=JU});var $ue=A(Qb=>{"use strict";l();Object.defineProperty(Qb,"__esModule",{value:!0});Qb.TediousInstrumentation=void 0;var Ije=Uue();Object.defineProperty(Qb,"TediousInstrumentation",{enumerable:!0,get:function(){return Ije.TediousInstrumentation}})});var Bue,bje,Gue,jue,Nje,XU,Vue=E(()=>{l();Bue=U($ue(),1);ne();Ye();bje=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),Gue="Tedious",jue=ae(Gue,()=>new Bue.TediousInstrumentation({})),Nje=(()=>{let e;return{name:Gue,setupOnce(){let t=jue();e=wg(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:o,data:r}=_e(n);if(!o||r["db.system"]!=="mssql")return;let i=o.split(" ")[0]||"";bje.has(i)&&n.setAttribute(te,"auto.db.otel.tedious")}))}}}),XU=Nje});var Fue=A(qf=>{"use strict";l();Object.defineProperty(qf,"__esModule",{value:!0});qf.PACKAGE_NAME=qf.PACKAGE_VERSION=void 0;qf.PACKAGE_VERSION="0.57.0";qf.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var zue=A(eN=>{"use strict";l();Object.defineProperty(eN,"__esModule",{value:!0});eN.GenericPoolInstrumentation=void 0;var Yf=K(),kl=Me(),Hue=Fue(),QU="generic-pool",e$=class extends kl.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(Hue.PACKAGE_NAME,Hue.PACKAGE_VERSION,t)}init(){return[new kl.InstrumentationNodeModuleDefinition(QU,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,kl.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 kl.InstrumentationNodeModuleDefinition(QU,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,kl.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 kl.InstrumentationNodeModuleDefinition(QU,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,kl.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(...r){let i=Yf.context.active(),s=n.tracer.startSpan("generic-pool.acquire",{},i);return Yf.context.with(Yf.trace.setSpan(i,s),()=>t.call(this,...r).then(a=>(s.end(),a),a=>{throw s.recordException(a),s.end(),a}))}}_poolWrapper(t){let n=this;return function(){let r=t.apply(this,arguments);return n._wrap(r,"acquire",n._acquireWithCallbacksPatcher.bind(n)),r}}_acquireWithCallbacksPatcher(t){let n=this;return function(r,i){if(n._isDisabled)return t.call(this,r,i);let s=Yf.context.active(),a=n.tracer.startSpan("generic-pool.acquire",{},s);return Yf.context.with(Yf.trace.setSpan(s,a),()=>{t.call(this,(c,u)=>{if(a.end(),r)return r(c,u)},i)})}}};eN.GenericPoolInstrumentation=e$});var que=A(tN=>{"use strict";l();Object.defineProperty(tN,"__esModule",{value:!0});tN.GenericPoolInstrumentation=void 0;var Oje=zue();Object.defineProperty(tN,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return Oje.GenericPoolInstrumentation}})});var Yue,Wue,Kue,Cje,t$,Zue=E(()=>{l();Yue=U(que(),1);ne();Ye();Wue="GenericPool",Kue=ae(Wue,()=>new Yue.GenericPoolInstrumentation({})),Cje=(()=>{let e;return{name:Wue,setupOnce(){let t=Kue();e=wg(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let r=_e(n).description;(r==="generic-pool.aquire"||r==="generic-pool.acquire")&&n.setAttribute(te,"auto.db.otel.generic_pool")}))}}}),t$=Cje});var n$=A(Es=>{"use strict";l();Object.defineProperty(Es,"__esModule",{value:!0});Es.ATTR_NET_PEER_PORT=Es.ATTR_NET_PEER_NAME=Es.ATTR_MESSAGING_SYSTEM=Es.ATTR_MESSAGING_OPERATION=void 0;Es.ATTR_MESSAGING_OPERATION="messaging.operation";Es.ATTR_MESSAGING_SYSTEM="messaging.system";Es.ATTR_NET_PEER_NAME="net.peer.name";Es.ATTR_NET_PEER_PORT="net.peer.port"});var r$=A(Ut=>{"use strict";l();Object.defineProperty(Ut,"__esModule",{value:!0});Ut.ATTR_MESSAGING_CONVERSATION_ID=Ut.OLD_ATTR_MESSAGING_MESSAGE_ID=Ut.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=Ut.ATTR_MESSAGING_URL=Ut.ATTR_MESSAGING_PROTOCOL_VERSION=Ut.ATTR_MESSAGING_PROTOCOL=Ut.MESSAGING_OPERATION_VALUE_PROCESS=Ut.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=Ut.ATTR_MESSAGING_DESTINATION_KIND=Ut.ATTR_MESSAGING_DESTINATION=void 0;Ut.ATTR_MESSAGING_DESTINATION="messaging.destination";Ut.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";Ut.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";Ut.MESSAGING_OPERATION_VALUE_PROCESS="process";Ut.ATTR_MESSAGING_PROTOCOL="messaging.protocol";Ut.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";Ut.ATTR_MESSAGING_URL="messaging.url";Ut.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";Ut.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";Ut.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var o$=A(Ul=>{"use strict";l();Object.defineProperty(Ul,"__esModule",{value:!0});Ul.DEFAULT_CONFIG=Ul.EndOperation=void 0;var vje;(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"})(vje=Ul.EndOperation||(Ul.EndOperation={}));Ul.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var ele=A($t=>{"use strict";l();Object.defineProperty($t,"__esModule",{value:!0});$t.isConfirmChannelTracing=$t.unmarkConfirmChannelTracing=$t.markConfirmChannelTracing=$t.getConnectionAttributesFromUrl=$t.getConnectionAttributesFromServer=$t.normalizeExchange=$t.CONNECTION_ATTRIBUTES=$t.CHANNEL_CONSUME_TIMEOUT_TIMER=$t.CHANNEL_SPANS_NOT_ENDED=$t.MESSAGE_STORED_SPAN=void 0;var i$=K(),Dc=Me(),nN=Qe(),eE=n$(),rN=r$();$t.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");$t.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");$t.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");$t.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var s$=(0,i$.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),Pje=e=>e!==""?e:"<default>";$t.normalizeExchange=Pje;var xje=e=>e.replace(/:[^:@/]*@/,":***@"),Jue=(e,t)=>e||(t==="AMQP"?5672:5671),Xue=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},Que=e=>e||"localhost",Ts=(e,t,n,o)=>n?{[t]:n}:(i$.diag.error(`amqplib instrumentation: could not extract connection attribute ${o} from user supplied url`,{url:e}),{}),Mje=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[eE.ATTR_MESSAGING_SYSTEM]:t}:{}};$t.getConnectionAttributesFromServer=Mje;var Lje=(e,t)=>{let n={[rN.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let o=e,r=Xue(o?.protocol);Object.assign(n,{...Ts(e,rN.ATTR_MESSAGING_PROTOCOL,r,"protocol")});let i=Que(o?.hostname);t&Dc.SemconvStability.OLD&&Object.assign(n,{...Ts(e,eE.ATTR_NET_PEER_NAME,i,"hostname")}),t&Dc.SemconvStability.STABLE&&Object.assign(n,{...Ts(e,nN.ATTR_SERVER_ADDRESS,i,"hostname")});let s=Jue(o.port,r);t&Dc.SemconvStability.OLD&&Object.assign(n,Ts(e,eE.ATTR_NET_PEER_PORT,s,"port")),t&Dc.SemconvStability.STABLE&&Object.assign(n,Ts(e,nN.ATTR_SERVER_PORT,s,"port"))}else{let o=xje(e);n[rN.ATTR_MESSAGING_URL]=o;try{let r=new URL(o),i=Xue(r.protocol);Object.assign(n,{...Ts(o,rN.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let s=Que(r.hostname);t&Dc.SemconvStability.OLD&&Object.assign(n,{...Ts(o,eE.ATTR_NET_PEER_NAME,s,"hostname")}),t&Dc.SemconvStability.STABLE&&Object.assign(n,{...Ts(o,nN.ATTR_SERVER_ADDRESS,s,"hostname")});let a=Jue(r.port?parseInt(r.port):void 0,i);t&Dc.SemconvStability.OLD&&Object.assign(n,Ts(o,eE.ATTR_NET_PEER_PORT,a,"port")),t&Dc.SemconvStability.STABLE&&Object.assign(n,Ts(o,nN.ATTR_SERVER_PORT,a,"port"))}catch(r){i$.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:o,err:r})}}return n};$t.getConnectionAttributesFromUrl=Lje;var wje=e=>e.setValue(s$,!0);$t.markConfirmChannelTracing=wje;var Dje=e=>e.deleteValue(s$);$t.unmarkConfirmChannelTracing=Dje;var kje=e=>e.getValue(s$)===!0;$t.isConfirmChannelTracing=kje});var tle=A(Wf=>{"use strict";l();Object.defineProperty(Wf,"__esModule",{value:!0});Wf.PACKAGE_NAME=Wf.PACKAGE_VERSION=void 0;Wf.PACKAGE_VERSION="0.61.0";Wf.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var rle=A(sN=>{"use strict";l();Object.defineProperty(sN,"__esModule",{value:!0});sN.AmqplibInstrumentation=void 0;var Pt=K(),oN=rt(),We=Me(),Uje=n$(),so=r$(),_r=o$(),Bt=ele(),nle=tle(),iN=[">=0.5.5 <1"],a$=class extends We.InstrumentationBase{_netSemconvStability;constructor(t={}){super(nle.PACKAGE_NAME,nle.PACKAGE_VERSION,{..._r.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,We.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({..._r.DEFAULT_CONFIG,...t})}init(){let t=new We.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",iN,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new We.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",iN,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),o=new We.InstrumentationNodeModuleFile("amqplib/lib/connect.js",iN,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new We.InstrumentationNodeModuleDefinition("amqplib",iN,void 0,void 0,[t,o,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,We.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,We.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,We.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,We.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,We.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,_r.EndOperation.Ack)),(0,We.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,_r.EndOperation.Nack)),(0,We.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,_r.EndOperation.Reject)),(0,We.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,_r.EndOperation.AckAll)),(0,We.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,_r.EndOperation.NackAll)),(0,We.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,We.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,We.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,We.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,We.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,We.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,We.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,We.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,We.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,We.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,We.isWrapped)(t.ConfirmChannel.prototype.publish)&&this._unwrap(t.ConfirmChannel.prototype,"publish"),t}getConnectPatch(t){let n=this;return function(r,i,s){return t.call(this,r,i,function(a,c){if(a==null){let u=(0,Bt.getConnectionAttributesFromUrl)(r,n._netSemconvStability),d=(0,Bt.getConnectionAttributesFromServer)(c);c[Bt.CONNECTION_ATTRIBUTES]={...u,...d}}s.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(r){if(r==="close"){n.endAllSpansOnChannel(this,!0,_r.EndOperation.ChannelClosed,void 0);let i=this[Bt.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[Bt.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else r==="error"&&n.endAllSpansOnChannel(this,!0,_r.EndOperation.ChannelError,void 0);return t.apply(this,arguments)}}getAckAllPatch(t,n,o){let r=this;return function(s){return r.endAllSpansOnChannel(this,t,n,s),o.apply(this,arguments)}}getAckPatch(t,n,o){let r=this;return function(s,a,c){let u=this,d=n===_r.EndOperation.Reject?a:c,p=u[Bt.CHANNEL_SPANS_NOT_ENDED]??[],f=p.findIndex(m=>m.msg===s);if(f<0)r.endConsumerSpan(s,t,n,d);else if(n!==_r.EndOperation.Reject&&a){for(let m=0;m<=f;m++)r.endConsumerSpan(p[m].msg,t,n,d);p.splice(0,f+1)}else r.endConsumerSpan(s,t,n,d),p.splice(f,1);return o.apply(this,arguments)}}getConsumePatch(t,n){let o=this;return function(i,s,a){let c=this;if(!Object.prototype.hasOwnProperty.call(c,Bt.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:d}=o.getConfig();if(d){let p=setInterval(()=>{o.checkConsumeTimeoutOnChannel(c)},d);p.unref(),c[Bt.CHANNEL_CONSUME_TIMEOUT_TIMER]=p}c[Bt.CHANNEL_SPANS_NOT_ENDED]=[]}let u=function(d){if(!d)return s.call(this,d);let p=d.properties.headers??{},f=Pt.propagation.extract(Pt.ROOT_CONTEXT,p),m=d.fields?.exchange,_;if(o._config.useLinksForConsume){let y=f?Pt.trace.getSpan(f)?.spanContext():void 0;f=void 0,y&&(_=[{context:y}])}let h=o.tracer.startSpan(`${i} process`,{kind:Pt.SpanKind.CONSUMER,attributes:{...c?.connection?.[Bt.CONNECTION_ATTRIBUTES],[so.ATTR_MESSAGING_DESTINATION]:m,[so.ATTR_MESSAGING_DESTINATION_KIND]:so.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[so.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:d.fields?.routingKey,[Uje.ATTR_MESSAGING_OPERATION]:so.MESSAGING_OPERATION_VALUE_PROCESS,[so.OLD_ATTR_MESSAGING_MESSAGE_ID]:d?.properties.messageId,[so.ATTR_MESSAGING_CONVERSATION_ID]:d?.properties.correlationId},links:_},f),{consumeHook:T}=o.getConfig();T&&(0,We.safeExecuteInTheMiddle)(()=>T(h,{moduleVersion:t,msg:d}),y=>{y&&Pt.diag.error("amqplib instrumentation: consumerHook error",y)},!0),a?.noAck||(c[Bt.CHANNEL_SPANS_NOT_ENDED].push({msg:d,timeOfConsume:(0,oN.hrTime)()}),d[Bt.MESSAGE_STORED_SPAN]=h);let S=f||Pt.ROOT_CONTEXT;Pt.context.with(Pt.trace.setSpan(S,h),()=>{s.call(this,d)}),a?.noAck&&(o.callConsumeEndHook(h,d,!1,_r.EndOperation.AutoAck),h.end())};return arguments[1]=u,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let o=this;return function(i,s,a,c,u){let d=this,{span:p,modifiedOptions:f}=o.createPublishSpan(o,i,s,d,c),{publishHook:m}=o.getConfig();m&&(0,We.safeExecuteInTheMiddle)(()=>m(p,{moduleVersion:t,exchange:i,routingKey:s,content:a,options:f,isConfirmChannel:!0}),S=>{S&&Pt.diag.error("amqplib instrumentation: publishHook error",S)},!0);let _=function(S,y){try{u?.call(this,S,y)}finally{let{publishConfirmHook:v}=o.getConfig();v&&(0,We.safeExecuteInTheMiddle)(()=>v(p,{moduleVersion:t,exchange:i,routingKey:s,content:a,options:c,isConfirmChannel:!0,confirmError:S}),x=>{x&&Pt.diag.error("amqplib instrumentation: publishConfirmHook error",x)},!0),S&&p.setStatus({code:Pt.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),p.end()}},h=(0,Bt.markConfirmChannelTracing)(Pt.context.active()),T=[...arguments];return T[3]=f,T[4]=Pt.context.bind((0,Bt.unmarkConfirmChannelTracing)(Pt.trace.setSpan(h,p)),_),Pt.context.with(h,n.bind(this,...T))}}getPublishPatch(t,n){let o=this;return function(i,s,a,c){if((0,Bt.isConfirmChannelTracing)(Pt.context.active()))return n.apply(this,arguments);{let u=this,{span:d,modifiedOptions:p}=o.createPublishSpan(o,i,s,u,c),{publishHook:f}=o.getConfig();f&&(0,We.safeExecuteInTheMiddle)(()=>f(d,{moduleVersion:t,exchange:i,routingKey:s,content:a,options:p,isConfirmChannel:!1}),h=>{h&&Pt.diag.error("amqplib instrumentation: publishHook error",h)},!0);let m=[...arguments];m[3]=p;let _=n.apply(this,m);return d.end(),_}}}createPublishSpan(t,n,o,r,i){let s=(0,Bt.normalizeExchange)(n),a=t.tracer.startSpan(`publish ${s}`,{kind:Pt.SpanKind.PRODUCER,attributes:{...r.connection[Bt.CONNECTION_ATTRIBUTES],[so.ATTR_MESSAGING_DESTINATION]:n,[so.ATTR_MESSAGING_DESTINATION_KIND]:so.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[so.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:o,[so.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[so.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),c=i??{};return c.headers=c.headers??{},Pt.propagation.inject(Pt.trace.setSpan(Pt.context.active(),a),c.headers),{span:a,modifiedOptions:c}}endConsumerSpan(t,n,o,r){let i=t[Bt.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:Pt.SpanStatusCode.ERROR,message:o!==_r.EndOperation.ChannelClosed&&o!==_r.EndOperation.ChannelError?`${o} called on message${r===!0?" with requeue":r===!1?" without requeue":""}`:o}),this.callConsumeEndHook(i,t,n,o),i.end(),t[Bt.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,o,r){(t[Bt.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(s=>{this.endConsumerSpan(s.msg,n,o,r)}),t[Bt.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(t,n,o,r){let{consumeEndHook:i}=this.getConfig();i&&(0,We.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:o,endOperation:r}),s=>{s&&Pt.diag.error("amqplib instrumentation: consumerEndHook error",s)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,oN.hrTime)(),o=t[Bt.CHANNEL_SPANS_NOT_ENDED]??[],r,{consumeTimeoutMs:i}=this.getConfig();for(r=0;r<o.length;r++){let s=o[r],a=(0,oN.hrTimeDuration)(s.timeOfConsume,n);if((0,oN.hrTimeToMilliseconds)(a)<i)break;this.endConsumerSpan(s.msg,null,_r.EndOperation.InstrumentationTimeout,!0)}o.splice(0,r)}};sN.AmqplibInstrumentation=a$});var ile=A(kc=>{"use strict";l();Object.defineProperty(kc,"__esModule",{value:!0});kc.EndOperation=kc.DEFAULT_CONFIG=kc.AmqplibInstrumentation=void 0;var $je=rle();Object.defineProperty(kc,"AmqplibInstrumentation",{enumerable:!0,get:function(){return $je.AmqplibInstrumentation}});var ole=o$();Object.defineProperty(kc,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return ole.DEFAULT_CONFIG}});Object.defineProperty(kc,"EndOperation",{enumerable:!0,get:function(){return ole.EndOperation}})});var sle,ale,Bje,cle,Gje,c$,ule=E(()=>{l();sle=U(ile(),1);Ye();ale="Amqplib",Bje={consumeEndHook:e=>{Rt(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Rt(e,"auto.amqplib.otel.publisher")}},cle=ae(ale,()=>new sle.AmqplibInstrumentation(Bje)),Gje=(()=>({name:ale,setupOnce(){cle()}})),c$=Gje});var tE,u$=E(()=>{l();tE="VercelAI"});function Vje(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 Fje(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(Hje(t.content),zje(t.content))}function Hje(e){for(let t of e){if(!Vje(t))continue;let n=AM(t.toolCallId);n?Rn(o=>{o.setContext("trace",{trace_id:n.traceId,span_id:n.spanId}),o.setTag("vercel.ai.tool.name",t.toolName),o.setTag("vercel.ai.tool.callId",t.toolCallId),o.setLevel("error"),he(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):Rn(o=>{o.setTag("vercel.ai.tool.name",t.toolName),o.setTag("vercel.ai.tool.callId",t.toolCallId),o.setLevel("error"),he(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function zje(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&yM(t.toolCallId)}function qje(e,t,n,o){let r=e?.recordInputs!==void 0?e.recordInputs:t.recordInputs!==void 0?t.recordInputs:n===!0?!0:o,i=e?.recordOutputs!==void 0?e.recordOutputs:t.recordOutputs!==void 0?t.recordOutputs:n===!0?!0:o;return{recordInputs:r,recordOutputs:i}}var cN,jje,lle,aN,dle=E(()=>{l();cN=U(Me(),1);ne();u$();jje=[">=3.0.0 <7"],lle=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];aN=class e extends cN.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",ve,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new cN.InstrumentationNodeModuleDefinition("ai",jje,this._patch.bind(this))}callWhenPatched(t){this._isPatched?t():this._callbacks.push(t)}_patch(t){this._isPatched=!0,this._callbacks.forEach(o=>o()),this._callbacks=[];let n=o=>new Proxy(o,{apply:(r,i,s)=>{let a=s[0].experimental_telemetry||{},c=a.isEnabled,u=Z(),d=u?.getIntegrationByName(tE),p=d?.options,f=d?!!u?.getOptions().sendDefaultPii:!1,{recordInputs:m,recordOutputs:_}=qje(p,a,c,f);return s[0].experimental_telemetry={...a,isEnabled:c!==void 0?c:!0,recordInputs:m,recordOutputs:_},ri(()=>Reflect.apply(r,i,s),h=>{h&&typeof h=="object"&&Ft(h,"_sentry_active_span",Gn())},()=>{},h=>{Fje(h)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let o of lle)t[o]!=null&&(t[o]=n(t[o]));return t}else{let o=lle.reduce((r,i)=>(t[i]!=null&&(r[i]=n(t[i])),r),{});return{...t,...o}}}}});function Yje(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var ple,Wje,l$,fle=E(()=>{l();ne();Ye();u$();dle();ple=ae(tE,()=>new aN({}));Wje=((e={})=>{let t;return{name:tE,options:e,setupOnce(){t=ple()},afterAllSetup(n){e.force??Yje(n)?$S(n):t?.callWhenPatched(()=>$S(n))}}}),l$=Wje});var lN,Kje,uN,mle=E(()=>{l();lN=U(Me(),1);ne();Kje=[">=4.0.0 <7"],uN=class extends lN.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",ve,t)}init(){return new lN.InstrumentationNodeModuleDefinition("openai",Kje,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 o=t[n];if(!o)return t;let r=this.getConfig(),i=function(...s){if(xu(ec))return Reflect.construct(o,s);let a=Reflect.construct(o,s);return rg(a,r)};Object.setPrototypeOf(i,o),Object.setPrototypeOf(i.prototype,o.prototype);for(let s of Object.getOwnPropertyNames(o))if(!["length","name","prototype"].includes(s)){let a=Object.getOwnPropertyDescriptor(o,s);a&&Object.defineProperty(i,s,a)}try{t[n]=i}catch{Object.defineProperty(t,n,{value:i,writable:!0,configurable:!0,enumerable:!0})}if(t.default===o)try{t.default=i}catch{Object.defineProperty(t,"default",{value:i,writable:!0,configurable:!0,enumerable:!0})}return t}}});var _le,Zje,d$,gle=E(()=>{l();ne();Ye();mle();_le=ae(ec,e=>new uN(e)),Zje=((e={})=>({name:ec,setupOnce(){_le(e)}})),d$=Zje});var pN,Jje,dN,hle=E(()=>{l();pN=U(Me(),1);ne();Jje=[">=0.19.2 <1.0.0"],dN=class extends pN.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",ve,t)}init(){return new pN.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",Jje,this._patch.bind(this))}_patch(t){let n=t.Anthropic,o=this.getConfig(),r=function(...i){if(xu(tc))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return og(s,o)};Object.setPrototypeOf(r,n),Object.setPrototypeOf(r.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(r,i,s)}try{t.Anthropic=r}catch{Object.defineProperty(t,"Anthropic",{value:r,writable:!0,configurable:!0,enumerable:!0})}if(t.default===n)try{t.default=r}catch{Object.defineProperty(t,"default",{value:r,writable:!0,configurable:!0,enumerable:!0})}return t}}});var Ele,Xje,p$,Tle=E(()=>{l();ne();Ye();hle();Ele=ae(tc,e=>new dN(e)),Xje=((e={})=>({name:tc,options:e,setupOnce(){Ele(e)}})),p$=Xje});var Kf,Sle,fN,Ale=E(()=>{l();Kf=U(Me(),1);ne();Sle=[">=0.10.0 <2"],fN=class extends Kf.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",ve,t)}init(){return new Kf.InstrumentationNodeModuleDefinition("@google/genai",Sle,n=>this._patch(n),n=>n,[new Kf.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",Sle,n=>this._patch(n),n=>n)])}_patch(t){let n=t.GoogleGenAI,o=this.getConfig();if(typeof n!="function")return t;let r=function(...i){if(xu(nc))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return ig(s,o)};Object.setPrototypeOf(r,n),Object.setPrototypeOf(r.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(r,i,s)}return dg(t,"GoogleGenAI",r),t}}});var yle,Qje,f$,Rle=E(()=>{l();ne();Ye();Ale();yle=ae(nc,e=>new fN(e)),Qje=((e={})=>({name:nc,setupOnce(){yle(e)}})),f$=Qje});function eVe(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function tVe(e,t,n){return new Proxy(e,{apply(o,r,i){let a=i[1];(!a||typeof a!="object"||Array.isArray(a))&&(a={},i[1]=a);let c=a.callbacks,u=eVe(c,t);return a.callbacks=u,Reflect.apply(o,r,i)}})}var Uc,mN,_N,Ile=E(()=>{l();Uc=U(Me(),1);ne();mN=[">=0.1.0 <2.0.0"];_N=class extends Uc.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",ve,t)}init(){let t=[],n=["@langchain/anthropic","@langchain/openai","@langchain/google-genai","@langchain/mistralai","@langchain/google-vertexai","@langchain/groq"];for(let o of n)t.push(new Uc.InstrumentationNodeModuleDefinition(o,mN,this._patch.bind(this),r=>r,[new Uc.InstrumentationNodeModuleFile(`${o}/dist/index.cjs`,mN,this._patch.bind(this),r=>r)]));return t.push(new Uc.InstrumentationNodeModuleDefinition("langchain",mN,this._patch.bind(this),o=>o,[new Uc.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",mN,this._patch.bind(this),o=>o)])),t}_patch(t){xx([ec,tc,nc]);let n=this.getConfig(),o=rc(n);return this._patchRunnableMethods(t,o),this._patchEmbeddingsMethods(t,n),t}_patchRunnableMethods(t,n){let o=["ChatAnthropic","ChatOpenAI","ChatGoogleGenerativeAI","ChatMistralAI","ChatVertexAI","ChatGroq","ConfigurableModel"],r=t.universal_exports??t,i=Object.values(r).find(c=>typeof c=="function"&&o.includes(c.name));if(!i)return;let s=i.prototype;if(s.__sentry_patched__)return;s.__sentry_patched__=!0;let a=["invoke","stream","batch"];for(let c of a){let u=s[c];typeof u=="function"&&(s[c]=tVe(u,n))}}_patchEmbeddingsMethods(t,n){let o=t.universal_exports??t;for(let r of Object.values(o)){if(typeof r!="function"||!r.prototype)continue;let i=r.prototype;typeof i.embedQuery!="function"||typeof i.embedDocuments!="function"||i.__sentry_patched__||(i.__sentry_patched__=!0,pg(i,n))}}}});var ble,nVe,m$,Nle=E(()=>{l();ne();Ye();Ile();ble=ae(GS,e=>new _N(e)),nVe=((e={})=>({name:GS,setupOnce(){ble(e)}})),m$=nVe});var ma,nE,gN,Ole=E(()=>{l();ma=U(Me(),1);ne();nE=[">=0.0.0 <2.0.0"],gN=class extends ma.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",ve,t)}init(){return[new ma.InstrumentationNodeModuleDefinition("@langchain/langgraph",nE,this._patch.bind(this),t=>t,[new ma.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",nE,this._patch.bind(this),t=>t),new ma.InstrumentationNodeModuleFile("@langchain/langgraph/dist/prebuilt/index.cjs",nE,this._patch.bind(this),t=>t)]),new ma.InstrumentationNodeModuleDefinition("@langchain/langgraph/prebuilt",nE,this._patch.bind(this),t=>t,[new ma.InstrumentationNodeModuleFile("@langchain/langgraph/dist/prebuilt/index.cjs",nE,this._patch.bind(this),t=>t)])]}_patch(t){let n=Z(),o={...this.getConfig(),recordInputs:this.getConfig().recordInputs??n?.getOptions().sendDefaultPii,recordOutputs:this.getConfig().recordOutputs??n?.getOptions().sendDefaultPii};if(t.StateGraph&&typeof t.StateGraph=="function"&&lg(t.StateGraph.prototype,o),t.createReactAgent&&typeof t.createReactAgent=="function"){let r=t.createReactAgent;Object.defineProperty(t,"createReactAgent",{value:wM(r,o),writable:!0,enumerable:!0,configurable:!0})}return t}}});var Cle,rVe,_$,vle=E(()=>{l();ne();Ye();Ole();Cle=ae(FS,e=>new gN(e)),rVe=((e={})=>({name:FS,setupOnce(){Cle(e)}})),_$=rVe});function Mle(e,t,n,o,r){let s=()=>{},a=r.firestoreSpanCreationHook;typeof a=="function"&&(s=d=>{(0,ga.safeExecuteInTheMiddle)(()=>a(d),p=>{p&&_a.diag.error(p?.message)},!0)});let c=new ga.InstrumentationNodeModuleDefinition("@firebase/firestore",t,d=>Ple(d,n,o,e,s)),u=["@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 d of u)c.files.push(new ga.InstrumentationNodeModuleFile(d,t,p=>Ple(p,n,o,e,s),p=>Lle(p,o)));return c}function Ple(e,t,n,o,r){return Lle(e,n),t(e,"addDoc",oVe(o,r)),t(e,"getDocs",sVe(o,r)),t(e,"setDoc",aVe(o,r)),t(e,"deleteDoc",iVe(o,r)),e}function Lle(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,ga.isWrapped)(e[n])&&t(e,n);return e}function oVe(e,t){return function(o){return function(r,i){let s=EN(e,"addDoc",r);return t(s),hN(s,()=>o(r,i))}}}function iVe(e,t){return function(o){return function(r){let i=EN(e,"deleteDoc",r.parent||r);return t(i),hN(i,()=>o(r))}}}function sVe(e,t){return function(o){return function(r){let i=EN(e,"getDocs",r);return t(i),hN(i,()=>o(r))}}}function aVe(e,t){return function(o){return function(r,i,s){let a=EN(e,"setDoc",r.parent||r);return t(a),hN(a,()=>typeof s<"u"?o(r,i,s):o(r,i))}}}function hN(e,t){return _a.context.with(_a.trace.setSpan(_a.context.active(),e),()=>(0,ga.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function EN(e,t,n){let o=e.startSpan(`${t} ${n.path}`,{kind:_a.SpanKind.CLIENT});return uVe(o,n),o.setAttribute(Go.ATTR_DB_OPERATION_NAME,t),o}function cVe(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 o=e.host.lastIndexOf(":");o!==-1&&(t=e.host.slice(1,o).replace(/^\[|\]$/g,""),n=e.host.slice(o+1))}}else if(xle.isIPv6(e.host))t=e.host;else{let o=e.host.lastIndexOf(":");o!==-1?(t=e.host.slice(0,o),n=e.host.slice(o+1)):t=e.host}return{address:t,port:n?parseInt(n,10):void 0}}function uVe(e,t){let n=t.firestore.app,o=n.options,i=(t.firestore.toJSON()||{}).settings||{},s={[Go.ATTR_DB_COLLECTION_NAME]:t.path,[Go.ATTR_DB_NAMESPACE]:n.name,[Go.ATTR_DB_SYSTEM_NAME]:"firebase.firestore","firebase.firestore.type":t.type,"firebase.firestore.options.projectId":o.projectId,"firebase.firestore.options.appId":o.appId,"firebase.firestore.options.messagingSenderId":o.messagingSenderId,"firebase.firestore.options.storageBucket":o.storageBucket},{address:a,port:c}=cVe(i);a&&(s[Go.ATTR_SERVER_ADDRESS]=a),c&&(s[Go.ATTR_SERVER_PORT]=c),e.setAttributes(s)}var xle,_a,ga,Go,wle=E(()=>{l();xle=U(require("node:net"),1),_a=U(K(),1),ga=U(Me(),1),Go=U(Qe(),1)});function Dle(e,t,n,o,r){let i=()=>{},s=()=>{},a=r.functions?.errorHook,c=r.functions?.requestHook,u=r.functions?.responseHook;typeof u=="function"&&(s=(f,m)=>{(0,ha.safeExecuteInTheMiddle)(()=>u(f,m),_=>{_&&Ss.diag.error(_?.message)},!0)}),typeof c=="function"&&(i=f=>{(0,ha.safeExecuteInTheMiddle)(()=>c(f),m=>{m&&Ss.diag.error(m?.message)},!0)});let d=new ha.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:f,triggerType:m})=>{d.files.push(new ha.InstrumentationNodeModuleFile(f,t,_=>lVe(_,n,o,e,{requestHook:i,responseHook:s,errorHook:a},m),_=>kle(_,o)))}),d}function gr(e,t,n){return function(r){return function(...i){let s=typeof i[0]=="function"?i[0]:i[1],a=typeof i[0]=="function"?void 0:i[0];if(!s)return r.call(this,...i);let c=async function(...u){let d=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",p=e.startSpan(`firebase.function.${n}`,{kind:Ss.SpanKind.SERVER}),f={"faas.name":d,"faas.trigger":n,"faas.provider":"firebase"};return process.env.GCLOUD_PROJECT&&(f["cloud.project_id"]=process.env.GCLOUD_PROJECT),process.env.EVENTARC_CLOUD_EVENT_SOURCE&&(f["cloud.event_source"]=process.env.EVENTARC_CLOUD_EVENT_SOURCE),p.setAttributes(f),t?.requestHook?.(p),Ss.context.with(Ss.trace.setSpan(Ss.context.active(),p),async()=>{let m,_;try{_=await s.apply(this,u)}catch(h){m=h}if(t?.responseHook?.(p,m),m&&p.recordException(m),p.end(),m)throw await t?.errorHook?.(p,m),m;return _})};return a?r.call(this,a,c):r.call(this,c)}}}function lVe(e,t,n,o,r,i){switch(kle(e,n),i){case"function":t(e,"onRequest",gr(o,r,"http.request")),t(e,"onCall",gr(o,r,"http.call"));break;case"firestore":t(e,"onDocumentCreated",gr(o,r,"firestore.document.created")),t(e,"onDocumentUpdated",gr(o,r,"firestore.document.updated")),t(e,"onDocumentDeleted",gr(o,r,"firestore.document.deleted")),t(e,"onDocumentWritten",gr(o,r,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",gr(o,r,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",gr(o,r,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",gr(o,r,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",gr(o,r,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",gr(o,r,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",gr(o,r,"storage.object.finalized")),t(e,"onObjectArchived",gr(o,r,"storage.object.archived")),t(e,"onObjectDeleted",gr(o,r,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",gr(o,r,"storage.object.metadataUpdated"));break}return e}function kle(e,t){let n=["onSchedule","onRequest","onCall","onObjectFinalized","onObjectArchived","onObjectDeleted","onObjectMetadataUpdated","onDocumentCreated","onDocumentUpdated","onDocumentDeleted","onDocumentWritten","onDocumentCreatedWithAuthContext","onDocumentUpdatedWithAuthContext","onDocumentDeletedWithAuthContext","onDocumentWrittenWithAuthContext"];for(let o of n)(0,ha.isWrapped)(e[o])&&t(e,o);return e}var Ss,ha,Ule=E(()=>{l();Ss=U(K(),1),ha=U(Me(),1)});var Ble,$le,dVe,pVe,TN,Gle=E(()=>{l();Ble=U(Me(),1);ne();wle();Ule();$le={},dVe=[">=3.0.0 <5"],pVe=[">=6.0.0 <7"],TN=class extends Ble.InstrumentationBase{constructor(t=$le){super("@sentry/instrumentation-firebase",ve,t)}setConfig(t={}){super.setConfig({...$le,...t})}init(){let t=[];return t.push(Mle(this.tracer,dVe,this._wrap,this._unwrap,this.getConfig())),t.push(Dle(this.tracer,pVe,this._wrap,this._unwrap,this.getConfig())),t}}});var jle,fVe,Vle,mVe,g$,Fle=E(()=>{l();ne();Ye();Gle();jle="Firebase",fVe={firestoreSpanCreationHook:e=>{Rt(e,"auto.firebase.otel.firestore"),e.setAttribute(oe,"db.query")},functions:{requestHook:e=>{Rt(e,"auto.firebase.otel.functions"),e.setAttribute(oe,"http.request")},errorHook:async(e,t)=>{t&&(he(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await Wd(2e3))}}},Vle=ae(jle,()=>new TN(fVe)),mVe=(()=>({name:jle,setupOnce(){Vle()}})),g$=mVe});function Zf(){return[Mk(),h0(),R0(),VU(),P0(),D0(),$0(),Y0(),eU(),sU(),kU(),GU(),zU(),ZU(),XU(),t$(),b0(),c$(),O0(),m$(),_$(),l$(),d$(),p$(),f$(),uU(),g$()]}var h$=E(()=>{l();ule();Tle();vue();Ore();lie();Fle();Zue();Rle();kie();Jce();tue();Jie();hue();Nle();vle();ase();Tse();Lse();Hse();tae();gle();jae();Hae();$ce();Aae();Vue();fle()});function T$(e,t={}){e.getOptions().debug&&sk();let[n,o]=_Ve(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=o}function _Ve(e,t={}){let n=new Hle.BasicTracerProvider({sampler:new Qg(e),resource:ok("node"),forceFlushTimeoutMillis:500,spanProcessors:[new Xg({timeout:gVe(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});Jf.trace.setGlobalTracerProvider(n),Jf.propagation.setGlobalPropagator(new Jg);let o=new MR;return Jf.context.setGlobalContextManager(o),[n,o.getAsyncLocalStorageLookup()]}function gVe(e){if(e!=null){if(e>E$)return sn&&b.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${E$}`),E$;if(e<=0||Number.isNaN(e)){sn&&b.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var Jf,Hle,E$,zle=E(()=>{l();Jf=U(K(),1),Hle=U(DD(),1);ne();Ye();Qp();Al();E$=1e6});function qle(){return WR().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(tf(),rf())}function Yle(e){return[...qle(),...At(e)?Zf():[]]}function S$(e={}){return hVe(e,Yle)}function hVe(e={},t){qs(e,"node");let n=Ck({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(T$(n,{spanProcessors:e.openTelemetrySpanProcessors}),KR()),n}var Wle=E(()=>{l();ne();Ye();vk();Pk();h$();zle()});var A$=E(()=>{l();vk();Pk();Wle();h$();ne();Ye()});function bVe(){Kle||(Bun.serve=new Proxy(Bun.serve,{apply(e,t,n){Zle(n[0]);let o=e.apply(t,n),r=o.reload.bind(o);return o.reload=i=>(Zle(i),r(i)),o}}),Kle=!0)}function Zle(e){NVe(e),OVe(e)}function NVe(e){typeof e.fetch=="function"&&(e.fetch=new Proxy(e.fetch,{apply(t,n,o){return y$(t,n,o)}}))}function OVe(e){e.routes&&typeof e.routes=="object"&&Object.keys(e.routes).forEach(t=>{let n=e.routes[t];typeof n=="function"&&(e.routes[t]=new Proxy(n,{apply:(o,r,i)=>y$(o,r,i,t)})),!(n instanceof Response)&&typeof n=="object"&&Object.entries(n).forEach(([o,r])=>{typeof r=="function"&&(e.routes[t][o]=new Proxy(r,{apply:(i,s,a)=>y$(i,s,a,t)}))})})}function y$(e,t,n,o){return js(r=>{let i=n[0],s=i.method.toUpperCase();if(s==="OPTIONS"||s==="HEAD")return e.apply(t,n);let a=Nu(i.url),c=CVe(a,i),u=a?.pathname||"/";i.params&&(Object.keys(i.params).forEach(p=>{c[`url.path.parameter.${p}`]=i.params[p]}),o&&(c[$e]="route",c["url.template"]=o,u=o)),o?.endsWith("/*")&&(c[$e]="route",c["url.template"]=o,u=o);let d=Z()?.getOptions().sendDefaultPii??!1;return Object.assign(c,oi(i.headers.toJSON(),d)),r.setSDKProcessingMetadata({normalizedRequest:{url:i.url,method:i.method,headers:i.headers.toJSON(),query_string:a?.search}}),jd({sentryTrace:i.headers.get("sentry-trace")??"",baggage:i.headers.get("baggage")},()=>Ot({attributes:c,op:"http.server",name:`${i.method} ${u}`},async p=>{try{let f=await e.apply(t,n);return f?.status&&(Cd(p,f.status),r.setContext("response",{status_code:f.status}),p.setAttributes(oi(f.headers.toJSON(),d,"response"))),f}catch(f){throw he(f,{mechanism:{type:"auto.http.bun.serve",handled:!1}}),f}}))})}function CVe(e,t){let n={[te]:"auto.http.bun.serve",[T_]:t.method||"GET",[$e]:"url"};return e&&(e.search&&(n["url.query"]=e.search),e.hash&&(n["url.fragment"]=e.hash),e.pathname&&(n["url.path"]=e.pathname),U_(e)||(n["url.full"]=e.href,e.port&&(n["url.port"]=e.port),e.protocol&&(n["url.scheme"]=e.protocol),e.hostname&&(n["url.domain"]=e.hostname))),n}var RVe,IVe,Jle,Kle,Xle=E(()=>{l();ne();RVe="BunServer",IVe=(()=>({name:RVe,setupOnce(){bVe()}})),Jle=IVe,Kle=!1});function Qle(e){function t(n){let o={body:n.body,method:"POST",headers:e.headers};try{return Ui(()=>fetch(e.url,o).then(r=>({statusCode:r.status,headers:{"x-sentry-rate-limits":r.headers.get("X-Sentry-Rate-Limits"),"retry-after":r.headers.get("Retry-After")}})))}catch(r){return Promise.reject(r)}}return zs(e,t)}var ede=E(()=>{l();ne()});function nde(e){return[Ha(),Fa(),za(),qa(),hl(),tf(),rf(),ml(),_l(),pl(),dl(),fl(),gl(),Jle(),...At(e)?Zf():[]]}function R$(e={}){qs(e,"bun");let t={...e,platform:"javascript",runtime:{name:"bun",version:typeof Bun<"u"?Bun.version:"unknown"},serverName:e.serverName||global.process.env.SENTRY_NAME||tde.hostname()};return t.transport=t.transport||Qle,t.defaultIntegrations===void 0&&(t.defaultIntegrations=nde(t)),S$(t)}var tde,rde=E(()=>{l();tde=U(require("node:os"),1);ne();A$();Xle();ede()});var Xf=E(()=>{l();A$();rde()});function AN(e){return(0,sde.createHash)("sha256").update(e).digest("hex")}var ide,sde,ode,SN,yN=E(()=>{"use strict";l();ide=require("node:sqlite"),sde=require("node:crypto"),ode=new WeakMap,SN=class extends ide.DatabaseSync{query(t){let n=ode.get(this);n||(n=new Map,ode.set(this,n));let o=n.get(t);return o||(o=this.prepare(t),n.set(t,o)),o}}});function vVe(){let t=process.env.XDG_DATA_HOME||(0,Qf.join)((0,cde.homedir)(),".local","share");return(0,Qf.join)(t,"opencode-lore")}function j(){if(RN)return RN;let e=process.env.LORE_DB_PATH,t;if(e)(0,I$.mkdirSync)((0,Qf.dirname)(e),{recursive:!0}),t=e;else{let o=vVe();(0,I$.mkdirSync)(o,{recursive:!0}),t=(0,Qf.join)(o,"lore.db")}let n=new SN(t);return n.exec("PRAGMA journal_mode = WAL"),n.exec("PRAGMA foreign_keys = ON"),n.exec("PRAGMA busy_timeout = 5000"),n.exec("PRAGMA auto_vacuum = INCREMENTAL"),xVe(n),RN=n,RN}function xVe(e){let n=e.query("SELECT name FROM sqlite_master WHERE type='table' AND name='schema_version'").get()?e.query("SELECT version FROM schema_version").get()?.version??0:0;if(n>=oE.length){ade(e);return}for(let o=n;o<oE.length;o++)if(o===PVe)e.exec("PRAGMA auto_vacuum = INCREMENTAL"),e.exec("VACUUM");else try{e.exec(oE[o])}catch(r){if(r instanceof Error&&/duplicate column name/i.test(r.message)){let i=MVe(oE[o],e);i.trim()&&e.exec(i)}else throw r}e.exec(`UPDATE schema_version SET version = ${oE.length}`),ade(e)}function MVe(e,t){return e.replace(/ALTER\s+TABLE\s+(\w+)\s+ADD\s+COLUMN\s+(\w+)\b[^;]*;/gi,(n,o,r)=>t.query(`PRAGMA table_info(${o})`).all().some(s=>s.name===r)?"":n)}function ade(e){e.exec(`
|
|
38
|
+
CREATE TABLE IF NOT EXISTS kv_meta (
|
|
39
|
+
key TEXT PRIMARY KEY,
|
|
40
|
+
value TEXT NOT NULL
|
|
41
|
+
);
|
|
42
|
+
CREATE TABLE IF NOT EXISTS metadata (
|
|
43
|
+
key TEXT PRIMARY KEY,
|
|
44
|
+
value TEXT NOT NULL,
|
|
45
|
+
updated_at INTEGER NOT NULL
|
|
46
|
+
);
|
|
47
|
+
`)}function Ue(e,t){let n=j().query("SELECT id FROM projects WHERE path = ?").get(e);if(n)return n.id;let o=crypto.randomUUID();return j().query("INSERT INTO projects (id, path, name, created_at) VALUES (?, ?, ?, ?)").run(o,e,t??e.split("/").pop()??"unknown",Date.now()),o}function b$(e){return j().query("SELECT name FROM projects WHERE id = ?").get(e)?.name??null}function N$(e){return j().query("SELECT force_min_layer FROM session_state WHERE session_id = ?").get(e)?.force_min_layer??0}function O$(e,t){t===0?j().query("DELETE FROM session_state WHERE session_id = ?").run(e):j().query("INSERT OR REPLACE INTO session_state (session_id, force_min_layer, updated_at) VALUES (?, ?, ?)").run(e,t,Date.now())}function IN(e){return j().query("SELECT value FROM metadata WHERE key = ?").get(e)?.value??null}function iE(e,t){j().query("INSERT INTO metadata (key, value, updated_at) VALUES (?, ?, ?) ON CONFLICT(key) DO UPDATE SET value = ?, updated_at = ?").run(e,t,Date.now(),t,Date.now())}function bN(){let e=IN("instance_id");if(e)return e;let t=crypto.randomUUID();return iE("instance_id",t),t}var Qf,I$,cde,oE,RN,PVe,As=E(()=>{"use strict";l();yN();Qf=require("path"),I$=require("fs"),cde=require("os"),oE=[`
|
|
48
|
+
-- Version 1: Initial schema
|
|
49
|
+
|
|
50
|
+
CREATE TABLE IF NOT EXISTS projects (
|
|
51
|
+
id TEXT PRIMARY KEY,
|
|
52
|
+
path TEXT NOT NULL UNIQUE,
|
|
53
|
+
name TEXT,
|
|
54
|
+
created_at INTEGER NOT NULL
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
CREATE TABLE IF NOT EXISTS temporal_messages (
|
|
58
|
+
id TEXT PRIMARY KEY,
|
|
59
|
+
project_id TEXT NOT NULL REFERENCES projects(id),
|
|
60
|
+
session_id TEXT NOT NULL,
|
|
61
|
+
role TEXT NOT NULL,
|
|
62
|
+
content TEXT NOT NULL,
|
|
63
|
+
tokens INTEGER DEFAULT 0,
|
|
64
|
+
distilled INTEGER DEFAULT 0,
|
|
65
|
+
created_at INTEGER NOT NULL,
|
|
66
|
+
metadata TEXT
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
CREATE VIRTUAL TABLE IF NOT EXISTS temporal_fts USING fts5(
|
|
70
|
+
content,
|
|
71
|
+
content=temporal_messages,
|
|
72
|
+
content_rowid=rowid,
|
|
73
|
+
tokenize='porter unicode61'
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
-- Triggers to keep FTS in sync
|
|
77
|
+
CREATE TRIGGER IF NOT EXISTS temporal_fts_insert AFTER INSERT ON temporal_messages BEGIN
|
|
78
|
+
INSERT INTO temporal_fts(rowid, content) VALUES (new.rowid, new.content);
|
|
79
|
+
END;
|
|
80
|
+
|
|
81
|
+
CREATE TRIGGER IF NOT EXISTS temporal_fts_delete AFTER DELETE ON temporal_messages BEGIN
|
|
82
|
+
INSERT INTO temporal_fts(temporal_fts, rowid, content) VALUES('delete', old.rowid, old.content);
|
|
83
|
+
END;
|
|
84
|
+
|
|
85
|
+
CREATE TRIGGER IF NOT EXISTS temporal_fts_update AFTER UPDATE ON temporal_messages BEGIN
|
|
86
|
+
INSERT INTO temporal_fts(temporal_fts, rowid, content) VALUES('delete', old.rowid, old.content);
|
|
87
|
+
INSERT INTO temporal_fts(rowid, content) VALUES (new.rowid, new.content);
|
|
88
|
+
END;
|
|
89
|
+
|
|
90
|
+
CREATE INDEX IF NOT EXISTS idx_temporal_session ON temporal_messages(session_id);
|
|
91
|
+
CREATE INDEX IF NOT EXISTS idx_temporal_project ON temporal_messages(project_id);
|
|
92
|
+
CREATE INDEX IF NOT EXISTS idx_temporal_distilled ON temporal_messages(distilled);
|
|
93
|
+
CREATE INDEX IF NOT EXISTS idx_temporal_created ON temporal_messages(created_at);
|
|
94
|
+
|
|
95
|
+
CREATE TABLE IF NOT EXISTS distillations (
|
|
96
|
+
id TEXT PRIMARY KEY,
|
|
97
|
+
project_id TEXT NOT NULL REFERENCES projects(id),
|
|
98
|
+
session_id TEXT NOT NULL,
|
|
99
|
+
narrative TEXT NOT NULL,
|
|
100
|
+
facts TEXT NOT NULL,
|
|
101
|
+
source_ids TEXT NOT NULL,
|
|
102
|
+
generation INTEGER DEFAULT 0,
|
|
103
|
+
token_count INTEGER DEFAULT 0,
|
|
104
|
+
created_at INTEGER NOT NULL
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
CREATE INDEX IF NOT EXISTS idx_distillation_session ON distillations(session_id);
|
|
108
|
+
CREATE INDEX IF NOT EXISTS idx_distillation_project ON distillations(project_id);
|
|
109
|
+
CREATE INDEX IF NOT EXISTS idx_distillation_generation ON distillations(generation);
|
|
110
|
+
CREATE INDEX IF NOT EXISTS idx_distillation_created ON distillations(created_at);
|
|
111
|
+
|
|
112
|
+
CREATE TABLE IF NOT EXISTS knowledge (
|
|
113
|
+
id TEXT PRIMARY KEY,
|
|
114
|
+
project_id TEXT,
|
|
115
|
+
category TEXT NOT NULL,
|
|
116
|
+
title TEXT NOT NULL,
|
|
117
|
+
content TEXT NOT NULL,
|
|
118
|
+
source_session TEXT,
|
|
119
|
+
cross_project INTEGER DEFAULT 0,
|
|
120
|
+
confidence REAL DEFAULT 1.0,
|
|
121
|
+
created_at INTEGER NOT NULL,
|
|
122
|
+
updated_at INTEGER NOT NULL,
|
|
123
|
+
metadata TEXT
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
CREATE VIRTUAL TABLE IF NOT EXISTS knowledge_fts USING fts5(
|
|
127
|
+
title,
|
|
128
|
+
content,
|
|
129
|
+
category,
|
|
130
|
+
content=knowledge,
|
|
131
|
+
content_rowid=rowid,
|
|
132
|
+
tokenize='porter unicode61'
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
CREATE TRIGGER IF NOT EXISTS knowledge_fts_insert AFTER INSERT ON knowledge BEGIN
|
|
136
|
+
INSERT INTO knowledge_fts(rowid, title, content, category)
|
|
137
|
+
VALUES (new.rowid, new.title, new.content, new.category);
|
|
138
|
+
END;
|
|
139
|
+
|
|
140
|
+
CREATE TRIGGER IF NOT EXISTS knowledge_fts_delete AFTER DELETE ON knowledge BEGIN
|
|
141
|
+
INSERT INTO knowledge_fts(knowledge_fts, rowid, title, content, category)
|
|
142
|
+
VALUES('delete', old.rowid, old.title, old.content, old.category);
|
|
143
|
+
END;
|
|
144
|
+
|
|
145
|
+
CREATE TRIGGER IF NOT EXISTS knowledge_fts_update AFTER UPDATE ON knowledge BEGIN
|
|
146
|
+
INSERT INTO knowledge_fts(knowledge_fts, rowid, title, content, category)
|
|
147
|
+
VALUES('delete', old.rowid, old.title, old.content, old.category);
|
|
148
|
+
INSERT INTO knowledge_fts(rowid, title, content, category)
|
|
149
|
+
VALUES (new.rowid, new.title, new.content, new.category);
|
|
150
|
+
END;
|
|
151
|
+
|
|
152
|
+
CREATE INDEX IF NOT EXISTS idx_knowledge_project ON knowledge(project_id);
|
|
153
|
+
CREATE INDEX IF NOT EXISTS idx_knowledge_category ON knowledge(category);
|
|
154
|
+
CREATE INDEX IF NOT EXISTS idx_knowledge_cross ON knowledge(cross_project);
|
|
155
|
+
|
|
156
|
+
CREATE TABLE IF NOT EXISTS schema_version (
|
|
157
|
+
version INTEGER NOT NULL
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
INSERT INTO schema_version (version) VALUES (1);
|
|
161
|
+
`,`
|
|
162
|
+
-- Version 2: Replace narrative+facts with observations text
|
|
163
|
+
ALTER TABLE distillations ADD COLUMN observations TEXT NOT NULL DEFAULT '';
|
|
164
|
+
`,`
|
|
165
|
+
-- Version 3: One-time vacuum to reclaim accumulated free pages, and enable
|
|
166
|
+
-- incremental auto-vacuum so future deletes return pages to the OS.
|
|
167
|
+
-- VACUUM must run outside a transaction and cannot be in a multi-statement
|
|
168
|
+
-- exec, so it is handled specially in the migrate() function.
|
|
169
|
+
`,`
|
|
170
|
+
-- Version 4: Persistent session state for error recovery.
|
|
171
|
+
-- Stores forceMinLayer so it survives OpenCode restarts. Without this,
|
|
172
|
+
-- a "prompt too long" error recovery (escalate to layer 2) is lost if
|
|
173
|
+
-- the process restarts before the next turn.
|
|
174
|
+
CREATE TABLE IF NOT EXISTS session_state (
|
|
175
|
+
session_id TEXT PRIMARY KEY,
|
|
176
|
+
force_min_layer INTEGER NOT NULL DEFAULT 0,
|
|
177
|
+
updated_at INTEGER NOT NULL
|
|
178
|
+
);
|
|
179
|
+
`,`
|
|
180
|
+
-- Version 5: Multi-resolution composable distillations.
|
|
181
|
+
-- Instead of deleting gen-0 distillations during meta-distillation,
|
|
182
|
+
-- mark them as archived. Archived entries are excluded from the in-context
|
|
183
|
+
-- prefix but remain searchable via the recall tool, providing a detailed
|
|
184
|
+
-- "zoom-in" layer beneath the compressed gen-1 summary.
|
|
185
|
+
-- Inspired by Cartridges (Eyuboglu et al., 2025) composability: independently
|
|
186
|
+
-- compressed representations can be concatenated and queried without retraining.
|
|
187
|
+
-- Reference: https://arxiv.org/abs/2501.17390
|
|
188
|
+
ALTER TABLE distillations ADD COLUMN archived INTEGER NOT NULL DEFAULT 0;
|
|
189
|
+
CREATE INDEX IF NOT EXISTS idx_distillation_archived ON distillations(archived);
|
|
190
|
+
`,`
|
|
191
|
+
-- Version 6: Compound indexes for common multi-column query patterns.
|
|
192
|
+
-- Almost every query filters on (project_id, session_id) but only single-column
|
|
193
|
+
-- indexes existed, forcing SQLite to pick one and scan for the rest.
|
|
194
|
+
|
|
195
|
+
-- temporal_messages: covers bySession, search-LIKE fallback, count, undistilledCount
|
|
196
|
+
CREATE INDEX IF NOT EXISTS idx_temporal_project_session ON temporal_messages(project_id, session_id);
|
|
197
|
+
-- temporal_messages: covers undistilled() and undistilledCount() with distilled filter
|
|
198
|
+
CREATE INDEX IF NOT EXISTS idx_temporal_project_session_distilled ON temporal_messages(project_id, session_id, distilled);
|
|
199
|
+
-- temporal_messages: covers pruning TTL pass and size-cap pass (distilled=1 ordered by created_at)
|
|
200
|
+
CREATE INDEX IF NOT EXISTS idx_temporal_project_distilled_created ON temporal_messages(project_id, distilled, created_at);
|
|
201
|
+
|
|
202
|
+
-- distillations: covers loadForSession, latestObservations, searchDistillations, resetOrphans
|
|
203
|
+
CREATE INDEX IF NOT EXISTS idx_distillation_project_session ON distillations(project_id, session_id);
|
|
204
|
+
-- distillations: covers gen0Count, loadGen0, gradient prefix loading (archived filter)
|
|
205
|
+
CREATE INDEX IF NOT EXISTS idx_distillation_project_session_gen_archived ON distillations(project_id, session_id, generation, archived);
|
|
206
|
+
|
|
207
|
+
-- Drop redundant single-column indexes that are now left-prefixes of compound indexes.
|
|
208
|
+
-- idx_temporal_project is a prefix of idx_temporal_project_session.
|
|
209
|
+
-- idx_distillation_project is a prefix of idx_distillation_project_session.
|
|
210
|
+
-- idx_temporal_distilled is a prefix of no compound index but is low-selectivity (0/1)
|
|
211
|
+
-- and all queries that use it also filter on project_id \u2014 covered by the new compounds.
|
|
212
|
+
DROP INDEX IF EXISTS idx_temporal_project;
|
|
213
|
+
DROP INDEX IF EXISTS idx_temporal_distilled;
|
|
214
|
+
DROP INDEX IF EXISTS idx_distillation_project;
|
|
215
|
+
`,`
|
|
216
|
+
-- Version 7: FTS5 for distillations \u2014 enables ranked search instead of LIKE.
|
|
217
|
+
CREATE VIRTUAL TABLE IF NOT EXISTS distillation_fts USING fts5(
|
|
218
|
+
observations,
|
|
219
|
+
content=distillations,
|
|
220
|
+
content_rowid=rowid,
|
|
221
|
+
tokenize='porter unicode61'
|
|
222
|
+
);
|
|
223
|
+
|
|
224
|
+
-- Backfill existing data (skip empty observations from schema v1\u2192v2 migration)
|
|
225
|
+
INSERT INTO distillation_fts(rowid, observations)
|
|
226
|
+
SELECT rowid, observations FROM distillations WHERE observations != '';
|
|
227
|
+
|
|
228
|
+
-- Sync triggers
|
|
229
|
+
CREATE TRIGGER IF NOT EXISTS distillation_fts_insert AFTER INSERT ON distillations BEGIN
|
|
230
|
+
INSERT INTO distillation_fts(rowid, observations) VALUES (new.rowid, new.observations);
|
|
231
|
+
END;
|
|
232
|
+
|
|
233
|
+
CREATE TRIGGER IF NOT EXISTS distillation_fts_delete AFTER DELETE ON distillations BEGIN
|
|
234
|
+
INSERT INTO distillation_fts(distillation_fts, rowid, observations)
|
|
235
|
+
VALUES('delete', old.rowid, old.observations);
|
|
236
|
+
END;
|
|
237
|
+
|
|
238
|
+
CREATE TRIGGER IF NOT EXISTS distillation_fts_update AFTER UPDATE ON distillations BEGIN
|
|
239
|
+
INSERT INTO distillation_fts(distillation_fts, rowid, observations)
|
|
240
|
+
VALUES('delete', old.rowid, old.observations);
|
|
241
|
+
INSERT INTO distillation_fts(rowid, observations) VALUES (new.rowid, new.observations);
|
|
242
|
+
END;
|
|
243
|
+
`,`
|
|
244
|
+
-- Version 8: Embedding BLOB column for vector search (Voyage AI).
|
|
245
|
+
-- No backfill \u2014 entries get embedded lazily on next create/update
|
|
246
|
+
-- or via explicit backfill when embeddings are first enabled.
|
|
247
|
+
ALTER TABLE knowledge ADD COLUMN embedding BLOB;
|
|
248
|
+
|
|
249
|
+
-- Key-value metadata table for plugin state (e.g. embedding config fingerprint).
|
|
250
|
+
CREATE TABLE IF NOT EXISTS kv_meta (
|
|
251
|
+
key TEXT PRIMARY KEY,
|
|
252
|
+
value TEXT NOT NULL
|
|
253
|
+
);
|
|
254
|
+
`,`
|
|
255
|
+
-- Version 9: Embedding BLOB column for distillation vector search.
|
|
256
|
+
-- Same pattern as knowledge embeddings (version 8). Enables semantic
|
|
257
|
+
-- search over distilled session summaries via cosine similarity.
|
|
258
|
+
-- No backfill \u2014 entries get embedded lazily on next distillation
|
|
259
|
+
-- or via explicit backfill when embeddings are first enabled.
|
|
260
|
+
ALTER TABLE distillations ADD COLUMN embedding BLOB;
|
|
261
|
+
`,`
|
|
262
|
+
-- Version 10: lat.md section cache + knowledge cross-references.
|
|
263
|
+
|
|
264
|
+
-- lat.md section cache for recall integration.
|
|
265
|
+
-- Parsed from lat.md/ directory markdown files, FTS5-indexed for search.
|
|
266
|
+
CREATE TABLE IF NOT EXISTS lat_sections (
|
|
267
|
+
id TEXT PRIMARY KEY,
|
|
268
|
+
project_id TEXT NOT NULL REFERENCES projects(id),
|
|
269
|
+
file TEXT NOT NULL,
|
|
270
|
+
heading TEXT NOT NULL,
|
|
271
|
+
depth INTEGER NOT NULL,
|
|
272
|
+
content TEXT NOT NULL,
|
|
273
|
+
content_hash TEXT NOT NULL,
|
|
274
|
+
first_paragraph TEXT,
|
|
275
|
+
updated_at INTEGER NOT NULL
|
|
276
|
+
);
|
|
277
|
+
|
|
278
|
+
CREATE VIRTUAL TABLE IF NOT EXISTS lat_sections_fts USING fts5(
|
|
279
|
+
heading,
|
|
280
|
+
content,
|
|
281
|
+
content=lat_sections,
|
|
282
|
+
content_rowid=rowid,
|
|
283
|
+
tokenize='porter unicode61'
|
|
284
|
+
);
|
|
285
|
+
|
|
286
|
+
CREATE TRIGGER IF NOT EXISTS lat_fts_insert AFTER INSERT ON lat_sections BEGIN
|
|
287
|
+
INSERT INTO lat_sections_fts(rowid, heading, content)
|
|
288
|
+
VALUES (new.rowid, new.heading, new.content);
|
|
289
|
+
END;
|
|
290
|
+
|
|
291
|
+
CREATE TRIGGER IF NOT EXISTS lat_fts_delete AFTER DELETE ON lat_sections BEGIN
|
|
292
|
+
INSERT INTO lat_sections_fts(lat_sections_fts, rowid, heading, content)
|
|
293
|
+
VALUES('delete', old.rowid, old.heading, old.content);
|
|
294
|
+
END;
|
|
295
|
+
|
|
296
|
+
CREATE TRIGGER IF NOT EXISTS lat_fts_update AFTER UPDATE ON lat_sections BEGIN
|
|
297
|
+
INSERT INTO lat_sections_fts(lat_sections_fts, rowid, heading, content)
|
|
298
|
+
VALUES('delete', old.rowid, old.heading, old.content);
|
|
299
|
+
INSERT INTO lat_sections_fts(rowid, heading, content)
|
|
300
|
+
VALUES (new.rowid, new.heading, new.content);
|
|
301
|
+
END;
|
|
302
|
+
|
|
303
|
+
CREATE INDEX IF NOT EXISTS idx_lat_sections_project ON lat_sections(project_id);
|
|
304
|
+
CREATE INDEX IF NOT EXISTS idx_lat_sections_file ON lat_sections(project_id, file);
|
|
305
|
+
|
|
306
|
+
-- Knowledge cross-references via [[entry-id]] wiki links.
|
|
307
|
+
-- ON DELETE CASCADE: when either entry is deleted, the ref row is auto-removed.
|
|
308
|
+
CREATE TABLE IF NOT EXISTS knowledge_refs (
|
|
309
|
+
from_id TEXT NOT NULL REFERENCES knowledge(id) ON DELETE CASCADE,
|
|
310
|
+
to_id TEXT NOT NULL REFERENCES knowledge(id) ON DELETE CASCADE,
|
|
311
|
+
PRIMARY KEY (from_id, to_id)
|
|
312
|
+
);
|
|
313
|
+
`,`
|
|
314
|
+
-- Version 11: F3b -- unambiguous chunk terminator in temporal_messages.content.
|
|
315
|
+
--
|
|
316
|
+
-- Pre-F3b, partsToText joined chunks with a newline. Tool-output payloads
|
|
317
|
+
-- can contain newlines too, so the boundary between a tool envelope and a
|
|
318
|
+
-- following plain-text or [reasoning] chunk was structurally ambiguous.
|
|
319
|
+
-- This caused two known limitations in the F3 distill-input truncator:
|
|
320
|
+
-- trailing text could be swallowed into a tool payload, and embedded
|
|
321
|
+
-- literal envelope strings inside a payload (e.g. when reading AGENTS.md)
|
|
322
|
+
-- could fabricate fake boundaries.
|
|
323
|
+
--
|
|
324
|
+
-- F3b switches the chunk separator to newline plus ASCII Unit Separator
|
|
325
|
+
-- (char 31). The Unit Separator is non-word so FTS5's unicode61 tokenizer
|
|
326
|
+
-- ignores it (zero BM25 impact). New rows are written via the post-F3b
|
|
327
|
+
-- partsToText. Existing rows are rewritten in place by the UPDATE below,
|
|
328
|
+
-- which uses pure SQL replace() to inject the Unit Separator after every
|
|
329
|
+
-- legacy chunk-prefix sequence -- the same boundary patterns the legacy
|
|
330
|
+
-- F3 reader was already trying to recover.
|
|
331
|
+
--
|
|
332
|
+
-- Trade-off (acceptable): any embedded legacy chunk-prefix sequence
|
|
333
|
+
-- inside a tool payload becomes a structural boundary post-migration.
|
|
334
|
+
-- This matches what the legacy F3 reader did at read-time anyway, baked
|
|
335
|
+
-- into the row permanently. The migration runs once per machine.
|
|
336
|
+
--
|
|
337
|
+
-- Idempotent: a row that already contains the Unit Separator before a
|
|
338
|
+
-- chunk prefix no longer matches the search literal (the separator
|
|
339
|
+
-- interposes), so re-running the UPDATE is a no-op for migrated rows.
|
|
340
|
+
-- (Important: migrate() in db.ts runs each migration via database.exec()
|
|
341
|
+
-- with no explicit BEGIN/COMMIT around the whole loop. SQLite makes this
|
|
342
|
+
-- single UPDATE statement atomic per-statement, so partial progress on
|
|
343
|
+
-- crash is safe to retry thanks to the idempotency above.)
|
|
344
|
+
--
|
|
345
|
+
-- char(10) = newline, char(31) = Unit Separator. SQLite has no native
|
|
346
|
+
-- regex, but two nested replace() calls on the literal prefixes are
|
|
347
|
+
-- sufficient because both legacy chunk prefixes match at line-start.
|
|
348
|
+
--
|
|
349
|
+
-- Each row UPDATE fires the temporal_fts_update trigger once; because
|
|
350
|
+
-- the Unit Separator is a non-word character, the re-indexed content
|
|
351
|
+
-- tokenizes identically -- net no-op for FTS scoring.
|
|
352
|
+
UPDATE temporal_messages
|
|
353
|
+
SET content = replace(
|
|
354
|
+
replace(
|
|
355
|
+
content,
|
|
356
|
+
char(10) || '[tool:',
|
|
357
|
+
char(10) || char(31) || '[tool:'
|
|
358
|
+
),
|
|
359
|
+
char(10) || '[reasoning] ',
|
|
360
|
+
char(10) || char(31) || '[reasoning] '
|
|
361
|
+
)
|
|
362
|
+
WHERE content LIKE '%' || char(10) || '[tool:%'
|
|
363
|
+
OR content LIKE '%' || char(10) || '[reasoning] %';
|
|
364
|
+
`,`
|
|
365
|
+
-- Version 12: Context health diagnostic columns on distillations.
|
|
366
|
+
--
|
|
367
|
+
-- r_compression: k/\u221AN where k = distilled token count, N = source token
|
|
368
|
+
-- count. Values < 1.0 signal likely lossy compression. NULL for rows
|
|
369
|
+
-- created before this migration or for meta-distillations (gen > 0)
|
|
370
|
+
-- where the metric is not computed.
|
|
371
|
+
--
|
|
372
|
+
-- c_norm: normalized variance of relative-existence weights over source
|
|
373
|
+
-- message timestamps. Range [0, 1]; 0 = uniform distribution, 1 = attention
|
|
374
|
+
-- dominated by distant past. NULL for pre-migration rows or meta-distillations.
|
|
375
|
+
--
|
|
376
|
+
-- Both columns are nullable REALs \u2014 cheap to add, no backfill needed.
|
|
377
|
+
ALTER TABLE distillations ADD COLUMN r_compression REAL;
|
|
378
|
+
ALTER TABLE distillations ADD COLUMN c_norm REAL;
|
|
379
|
+
`,`
|
|
380
|
+
-- Version 13: Installation metadata table for telemetry and diagnostics.
|
|
381
|
+
--
|
|
382
|
+
-- Separate from kv_meta (plugin state) \u2014 this holds installation-scoped
|
|
383
|
+
-- values: instance_id, release_channel, etc. Has updated_at for tracking
|
|
384
|
+
-- when values last changed.
|
|
385
|
+
CREATE TABLE IF NOT EXISTS metadata (
|
|
386
|
+
key TEXT PRIMARY KEY,
|
|
387
|
+
value TEXT NOT NULL,
|
|
388
|
+
updated_at INTEGER NOT NULL
|
|
389
|
+
);
|
|
390
|
+
`];PVe=2});function $l(e,t){let n=t||LVe,o=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,r=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return lde(e,o,r)}function lde(e,t,n){if(wVe(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ude(e.children,t,n)}return Array.isArray(e)?ude(e,t,n):""}function ude(e,t,n){let o=[],r=-1;for(;++r<e.length;)o[r]=lde(e[r],t,n);return o.join("")}function wVe(e){return!!(e&&typeof e=="object")}var LVe,dde=E(()=>{l();LVe={}});var NN=E(()=>{l();dde()});var C$,pde=E(()=>{l();C$={AElig:"\xC6",AMP:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",Aring:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",Bscr:"\u212C",Bumpeq:"\u224E",CHcy:"\u0427",COPY:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",Cayleys:"\u212D",Ccaron:"\u010C",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",CenterDot:"\xB7",Cfr:"\u212D",Chi:"\u03A7",CircleDot:"\u2299",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",Colon:"\u2237",Colone:"\u2A74",Congruent:"\u2261",Conint:"\u222F",ContourIntegral:"\u222E",Copf:"\u2102",Coproduct:"\u2210",CounterClockwiseContourIntegral:"\u2233",Cross:"\u2A2F",Cscr:"\u{1D49E}",Cup:"\u22D3",CupCap:"\u224D",DD:"\u2145",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",Delta:"\u0394",Dfr:"\u{1D507}",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",Diamond:"\u22C4",DifferentialD:"\u2146",Dopf:"\u{1D53B}",Dot:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",Downarrow:"\u21D3",Dscr:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ETH:"\xD0",Eacute:"\xC9",Ecaron:"\u011A",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrave:"\xC8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",Equilibrium:"\u21CC",Escr:"\u2130",Esim:"\u2A73",Eta:"\u0397",Euml:"\xCB",Exists:"\u2203",ExponentialE:"\u2147",Fcy:"\u0424",Ffr:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",Fopf:"\u{1D53D}",ForAll:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1D50A}",Gg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",Gt:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",HilbertSpace:"\u210B",Hopf:"\u210D",HorizontalLine:"\u2500",Hscr:"\u210B",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Igrave:"\xCC",Im:"\u2111",Imacr:"\u012A",ImaginaryI:"\u2148",Implies:"\u21D2",Int:"\u222C",Integral:"\u222B",Intersection:"\u22C2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Iogon:"\u012E",Iopf:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",LJcy:"\u0409",LT:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Larr:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",LeftRightArrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",Leftarrow:"\u21D0",Leftrightarrow:"\u21D4",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",Lfr:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",LongLeftRightArrow:"\u27F7",LongRightArrow:"\u27F6",Longleftarrow:"\u27F8",Longleftrightarrow:"\u27FA",Longrightarrow:"\u27F9",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",Mopf:"\u{1D544}",Mscr:"\u2133",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
|
|
391
|
+
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",ZeroWidthSpace:"\u200B",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\u{1D4B5}",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acute:"\xB4",acy:"\u0430",aelig:"\xE6",af:"\u2061",afr:"\u{1D51E}",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",amp:"&",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",ap:"\u2248",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",apid:"\u224B",apos:"'",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",beta:"\u03B2",beth:"\u2136",between:"\u226C",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255D",boxUR:"\u255A",boxUl:"\u255C",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256C",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256B",boxVl:"\u2562",boxVr:"\u255F",boxbox:"\u29C9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250C",boxh:"\u2500",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",bprime:"\u2035",breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",bumpeq:"\u224F",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cedil:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledR:"\xAE",circledS:"\u24C8",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",conint:"\u222E",copf:"\u{1D554}",coprod:"\u2210",copy:"\xA9",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dArr:"\u21D3",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",darr:"\u2193",dash:"\u2010",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",dcy:"\u0434",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",ddotseq:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",dharl:"\u21C3",dharr:"\u21C2",diam:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",dot:"\u02D9",doteq:"\u2250",doteqdot:"\u2251",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",downarrow:"\u2193",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eDDot:"\u2A77",eDot:"\u2251",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",ecirc:"\xEA",ecolon:"\u2255",ecy:"\u044D",edot:"\u0117",ee:"\u2147",efDot:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",equals:"=",equest:"\u225F",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",erarr:"\u2971",escr:"\u212F",esdot:"\u2250",esim:"\u2242",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",expectation:"\u2130",exponentiale:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",gE:"\u2267",gEl:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gammad:"\u03DD",gap:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",ge:"\u2265",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",gl:"\u2277",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\u{1D558}",grave:"`",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hArr:"\u21D4",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",hbar:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hslash:"\u210F",hstrok:"\u0127",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",ic:"\u2063",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",image:"\u2111",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",intcal:"\u22BA",integers:"\u2124",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",isin:"\u2208",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAarr:"\u21DA",lArr:"\u21D0",lAtail:"\u291B",lBarr:"\u290E",lE:"\u2266",lEg:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",laquo:"\xAB",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lceil:"\u2308",lcub:"{",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leftarrow:"\u2190",leftarrowtail:"\u21A2",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",leftthreetimes:"\u22CB",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",lessgtr:"\u2276",lesssim:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",measuredangle:"\u2221",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",mstpos:"\u223E",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nGtv:"\u226B\u0338",nLeftarrow:"\u21CD",nLeftrightarrow:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nLtv:"\u226A\u0338",nRightarrow:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nabla:"\u2207",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",neArr:"\u21D7",nearhk:"\u2924",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",ngsim:"\u2275",ngt:"\u226F",ngtr:"\u226F",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",nlArr:"\u21CD",nlE:"\u2266\u0338",nlarr:"\u219A",nldr:"\u2025",nle:"\u2270",nleftarrow:"\u219A",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nlsim:"\u2274",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nmid:"\u2224",nopf:"\u{1D55F}",not:"\xAC",notin:"\u2209",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22AD",nvHarr:"\u2904",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwArr:"\u21D6",nwarhk:"\u2923",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",oS:"\u24C8",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",ocy:"\u043E",odash:"\u229D",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",oplus:"\u2295",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oscr:"\u2134",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimes:"\u2297",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",pointint:"\u2A15",popf:"\u{1D561}",pound:"\xA3",pr:"\u227A",prE:"\u2AB3",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",primes:"\u2119",prnE:"\u2AB5",prnap:"\u2AB9",prnsim:"\u22E8",prod:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',rAarr:"\u21DB",rArr:"\u21D2",rAtail:"\u291C",rBarr:"\u290F",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rceil:"\u2309",rcub:"}",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",rightarrow:"\u2192",rightarrowtail:"\u21A3",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",rightthreetimes:"\u22CC",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",rsaquo:"\u203A",rscr:"\u{1D4C7}",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",sbquo:"\u201A",sc:"\u227B",scE:"\u2AB4",scap:"\u2AB8",scaron:"\u0161",sccue:"\u227D",sce:"\u2AB0",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",scnap:"\u2ABA",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",seArr:"\u21D8",searhk:"\u2925",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shortmid:"\u2223",shortparallel:"\u2225",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",subE:"\u2AC5",subdot:"\u2ABD",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",sum:"\u2211",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",sup:"\u2283",supE:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swarhk:"\u2926",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tbrk:"\u23B4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",tfr:"\u{1D531}",there4:"\u2234",therefore:"\u2234",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",tilde:"\u02DC",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uArr:"\u21D1",uHar:"\u2963",uacute:"\xFA",uarr:"\u2191",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udarr:"\u21C5",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",ufr:"\u{1D532}",ugrave:"\xF9",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uml:"\xA8",uogon:"\u0173",uopf:"\u{1D566}",uparrow:"\u2191",updownarrow:"\u2195",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",upsi:"\u03C5",upsih:"\u03D2",upsilon:"\u03C5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",uwangle:"\u29A7",vArr:"\u21D5",vBar:"\u2AE8",vBarv:"\u2AE9",vDash:"\u22A8",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vcy:"\u0432",vdash:"\u22A2",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",vert:"|",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeetrf:"\u2128",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"}});function em(e){return DVe.call(C$,e)?C$[e]:!1}var DVe,ON=E(()=>{l();pde();DVe={}.hasOwnProperty});function Ln(e,t,n,o){let r=e.length,i=0,s;if(t<0?t=-t>r?0:r+t:t=t>r?r:t,n=n>0?n:0,o.length<1e4)s=Array.from(o),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);i<o.length;)s=o.slice(i,i+1e4),s.unshift(t,0),e.splice(...s),i+=1e4,t+=1e4}function hr(e,t){return e.length>0?(Ln(e,e.length,0,t),e):t}var $c=E(()=>{l()});function mde(e){let t={},n=-1;for(;++n<e.length;)kVe(t,e[n]);return t}function kVe(e,t){let n;for(n in t){let r=(fde.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],s;if(i)for(s in i){fde.call(r,s)||(r[s]=[]);let a=i[s];UVe(r[s],Array.isArray(a)?a:a?[a]:[])}}}function UVe(e,t){let n=-1,o=[];for(;++n<t.length;)(t[n].add==="after"?e:o).push(t[n]);Ln(e,0,0,o)}var fde,_de=E(()=>{l();$c();fde={}.hasOwnProperty});function CN(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCodePoint(n)}var v$=E(()=>{l()});function Ea(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var vN=E(()=>{l()});function sE(e){return e!==null&&(e<32||e===127)}function ce(e){return e!==null&&e<-2}function Vt(e){return e!==null&&(e<0||e===32)}function Ne(e){return e===-2||e===-1||e===32}function Bc(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}var ao,Er,gde,aE,hde,Ede,Tde,Sde,st=E(()=>{l();ao=Bc(/[A-Za-z]/),Er=Bc(/[\dA-Za-z]/),gde=Bc(/[#-'*+\--9=?A-Z^-~]/);aE=Bc(/\d/),hde=Bc(/[\dA-Fa-f]/),Ede=Bc(/[!-/:-@[-`{-~]/);Tde=Bc(new RegExp("\\p{P}|\\p{S}","u")),Sde=Bc(/\s/)});function Ce(e,t,n,o){let r=o?o-1:Number.POSITIVE_INFINITY,i=0;return s;function s(c){return Ne(c)?(e.enter(n),a(c)):t(c)}function a(c){return Ne(c)&&i++<r?(e.consume(c),a):(e.exit(n),t(c))}}var hn=E(()=>{l();st()});function $Ve(e){let t=e.attempt(this.parser.constructs.contentInitial,o,r),n;return t;function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ce(e,t,"linePrefix")}function r(a){return e.enter("paragraph"),i(a)}function i(a){let c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,s(a)}function s(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return ce(a)?(e.consume(a),e.exit("chunkText"),i):(e.consume(a),s)}}var Ade,yde=E(()=>{l();hn();st();Ade={tokenize:$Ve}});function BVe(e){let t=this,n=[],o=0,r,i,s;return a;function a(v){if(o<n.length){let x=n[o];return t.containerState=x[1],e.attempt(x[0].continuation,c,u)(v)}return u(v)}function c(v){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&y();let x=t.events.length,P=x,N;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){N=t.events[P][1].end;break}S(o);let F=x;for(;F<t.events.length;)t.events[F][1].end={...N},F++;return Ln(t.events,P+1,0,t.events.slice(x)),t.events.length=F,u(v)}return a(v)}function u(v){if(o===n.length){if(!r)return f(v);if(r.currentConstruct&&r.currentConstruct.concrete)return _(v);t.interrupt=!!(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Rde,d,p)(v)}function d(v){return r&&y(),S(o),f(v)}function p(v){return t.parser.lazy[t.now().line]=o!==n.length,s=t.now().offset,_(v)}function f(v){return t.containerState={},e.attempt(Rde,m,_)(v)}function m(v){return o++,n.push([t.currentConstruct,t.containerState]),f(v)}function _(v){if(v===null){r&&y(),S(0),e.consume(v);return}return r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:i}),h(v)}function h(v){if(v===null){T(e.exit("chunkFlow"),!0),S(0),e.consume(v);return}return ce(v)?(e.consume(v),T(e.exit("chunkFlow")),o=0,t.interrupt=void 0,a):(e.consume(v),h)}function T(v,x){let P=t.sliceStream(v);if(x&&P.push(null),v.previous=i,i&&(i.next=v),i=v,r.defineSkip(v.start),r.write(P),t.parser.lazy[v.start.line]){let N=r.events.length;for(;N--;)if(r.events[N][1].start.offset<s&&(!r.events[N][1].end||r.events[N][1].end.offset>s))return;let F=t.events.length,se=F,$,G;for(;se--;)if(t.events[se][0]==="exit"&&t.events[se][1].type==="chunkFlow"){if($){G=t.events[se][1].end;break}$=!0}for(S(o),N=F;N<t.events.length;)t.events[N][1].end={...G},N++;Ln(t.events,se+1,0,t.events.slice(F)),t.events.length=N}}function S(v){let x=n.length;for(;x-- >v;){let P=n[x];t.containerState=P[1],P[0].exit.call(t,e)}n.length=v}function y(){r.write([null]),i=void 0,r=void 0,t.containerState._closeFlow=void 0}}function GVe(e,t,n){return Ce(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var Ide,Rde,bde=E(()=>{l();hn();st();$c();Ide={tokenize:BVe},Rde={tokenize:GVe}});function tm(e){if(e===null||Vt(e)||Sde(e))return 1;if(Tde(e))return 2}var P$=E(()=>{l();st()});function nm(e,t,n){let o=[],r=-1;for(;++r<e.length;){let i=e[r].resolveAll;i&&!o.includes(i)&&(t=i(t,n),o.push(i))}return t}var PN=E(()=>{l()});function jVe(e,t){let n=-1,o,r,i,s,a,c,u,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(o=n;o--;)if(e[o][0]==="exit"&&e[o][1].type==="attentionSequence"&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[o][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[o][1].end.offset-e[o][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let p={...e[o][1].end},f={...e[n][1].start};Nde(p,-c),Nde(f,c),s={type:c>1?"strongSequence":"emphasisSequence",start:p,end:{...e[o][1].end}},a={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},i={type:c>1?"strongText":"emphasisText",start:{...e[o][1].end},end:{...e[n][1].start}},r={type:c>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},e[o][1].end={...s.start},e[n][1].start={...a.end},u=[],e[o][1].end.offset-e[o][1].start.offset&&(u=hr(u,[["enter",e[o][1],t],["exit",e[o][1],t]])),u=hr(u,[["enter",r,t],["enter",s,t],["exit",s,t],["enter",i,t]]),u=hr(u,nm(t.parser.constructs.insideSpan.null,e.slice(o+1,n),t)),u=hr(u,[["exit",i,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=hr(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Ln(e,o-1,n-o+3,u),n=o+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function VVe(e,t){let n=this.parser.constructs.attentionMarkers.null,o=this.previous,r=tm(o),i;return s;function s(c){return i=c,e.enter("attentionSequence"),a(c)}function a(c){if(c===i)return e.consume(c),a;let u=e.exit("attentionSequence"),d=tm(c),p=!d||d===2&&r||n.includes(c),f=!r||r===2&&d||n.includes(o);return u._open=!!(i===42?p:p&&(r||!f)),u._close=!!(i===42?f:f&&(d||!p)),t(c)}}function Nde(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var cE,Ode=E(()=>{l();$c();P$();PN();cE={name:"attention",resolveAll:jVe,tokenize:VVe}});function FVe(e,t,n){let o=0;return r;function r(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(m){return ao(m)?(e.consume(m),s):m===64?n(m):u(m)}function s(m){return m===43||m===45||m===46||Er(m)?(o=1,a(m)):u(m)}function a(m){return m===58?(e.consume(m),o=0,c):(m===43||m===45||m===46||Er(m))&&o++<32?(e.consume(m),a):(o=0,u(m))}function c(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||sE(m)?n(m):(e.consume(m),c)}function u(m){return m===64?(e.consume(m),d):gde(m)?(e.consume(m),u):n(m)}function d(m){return Er(m)?p(m):n(m)}function p(m){return m===46?(e.consume(m),o=0,d):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):f(m)}function f(m){if((m===45||Er(m))&&o++<63){let _=m===45?f:p;return e.consume(m),_}return n(m)}}var x$,Cde=E(()=>{l();st();x$={name:"autolink",tokenize:FVe}});function HVe(e,t,n){return o;function o(i){return Ne(i)?Ce(e,r,"linePrefix")(i):r(i)}function r(i){return i===null||ce(i)?t(i):n(i)}}var Gc,xN=E(()=>{l();hn();st();Gc={partial:!0,tokenize:HVe}});function zVe(e,t,n){let o=this;return r;function r(s){if(s===62){let a=o.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),i}return n(s)}function i(s){return Ne(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function qVe(e,t,n){let o=this;return r;function r(s){return Ne(s)?Ce(e,i,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):i(s)}function i(s){return e.attempt(MN,t,n)(s)}}function YVe(e){e.exit("blockQuote")}var MN,vde=E(()=>{l();hn();st();MN={continuation:{tokenize:qVe},exit:YVe,name:"blockQuote",tokenize:zVe}});function WVe(e,t,n){return o;function o(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),r}function r(i){return Ede(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}var LN,Pde=E(()=>{l();st();LN={name:"characterEscape",tokenize:WVe}});function KVe(e,t,n){let o=this,r=0,i,s;return a;function a(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),c}function c(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,s=Er,d(p))}function u(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,s=hde,d):(e.enter("characterReferenceValue"),i=7,s=aE,d(p))}function d(p){if(p===59&&r){let f=e.exit("characterReferenceValue");return s===Er&&!em(o.sliceSerialize(f))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(p)&&r++<i?(e.consume(p),d):n(p)}}var wN,xde=E(()=>{l();ON();st();wN={name:"characterReference",tokenize:KVe}});function ZVe(e,t,n){let o=this,r={partial:!0,tokenize:P},i=0,s=0,a;return c;function c(N){return u(N)}function u(N){let F=o.events[o.events.length-1];return i=F&&F[1].type==="linePrefix"?F[2].sliceSerialize(F[1],!0).length:0,a=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(N)}function d(N){return N===a?(s++,e.consume(N),d):s<3?n(N):(e.exit("codeFencedFenceSequence"),Ne(N)?Ce(e,p,"whitespace")(N):p(N))}function p(N){return N===null||ce(N)?(e.exit("codeFencedFence"),o.interrupt?t(N):e.check(Mde,h,x)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(N))}function f(N){return N===null||ce(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(N)):Ne(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ce(e,m,"whitespace")(N)):N===96&&N===a?n(N):(e.consume(N),f)}function m(N){return N===null||ce(N)?p(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(N))}function _(N){return N===null||ce(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(N)):N===96&&N===a?n(N):(e.consume(N),_)}function h(N){return e.attempt(r,x,T)(N)}function T(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),S}function S(N){return i>0&&Ne(N)?Ce(e,y,"linePrefix",i+1)(N):y(N)}function y(N){return N===null||ce(N)?e.check(Mde,h,x)(N):(e.enter("codeFlowValue"),v(N))}function v(N){return N===null||ce(N)?(e.exit("codeFlowValue"),y(N)):(e.consume(N),v)}function x(N){return e.exit("codeFenced"),t(N)}function P(N,F,se){let $=0;return G;function G(de){return N.enter("lineEnding"),N.consume(de),N.exit("lineEnding"),Q}function Q(de){return N.enter("codeFencedFence"),Ne(de)?Ce(N,J,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(de):J(de)}function J(de){return de===a?(N.enter("codeFencedFenceSequence"),D(de)):se(de)}function D(de){return de===a?($++,N.consume(de),D):$>=s?(N.exit("codeFencedFenceSequence"),Ne(de)?Ce(N,ue,"whitespace")(de):ue(de)):se(de)}function ue(de){return de===null||ce(de)?(N.exit("codeFencedFence"),F(de)):se(de)}}}function JVe(e,t,n){let o=this;return r;function r(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i)}function i(s){return o.parser.lazy[o.now().line]?n(s):t(s)}}var Mde,DN,Lde=E(()=>{l();hn();st();Mde={partial:!0,tokenize:JVe},DN={concrete:!0,name:"codeFenced",tokenize:ZVe}});function QVe(e,t,n){let o=this;return r;function r(u){return e.enter("codeIndented"),Ce(e,i,"linePrefix",5)(u)}function i(u){let d=o.events[o.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?c(u):ce(u)?e.attempt(XVe,s,c)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||ce(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),a)}function c(u){return e.exit("codeIndented"),t(u)}}function eFe(e,t,n){let o=this;return r;function r(s){return o.parser.lazy[o.now().line]?n(s):ce(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),r):Ce(e,i,"linePrefix",5)(s)}function i(s){let a=o.events[o.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):ce(s)?r(s):n(s)}}var uE,XVe,wde=E(()=>{l();hn();st();uE={name:"codeIndented",tokenize:QVe},XVe={partial:!0,tokenize:eFe}});function tFe(e){let t=e.length-4,n=3,o,r;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(o=n;++o<t;)if(e[o][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(o=n-1,t++;++o<=t;)r===void 0?o!==t&&e[o][1].type!=="lineEnding"&&(r=o):(o===t||e[o][1].type==="lineEnding")&&(e[r][1].type="codeTextData",o!==r+2&&(e[r][1].end=e[o-1][1].end,e.splice(r+2,o-r-2),t-=o-r-2,o=r+2),r=void 0);return e}function nFe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function rFe(e,t,n){let o=this,r=0,i,s;return a;function a(f){return e.enter("codeText"),e.enter("codeTextSequence"),c(f)}function c(f){return f===96?(e.consume(f),r++,c):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(s=e.enter("codeTextSequence"),i=0,p(f)):ce(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),d(f))}function d(f){return f===null||f===32||f===96||ce(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),d)}function p(f){return f===96?(e.consume(f),i++,p):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(s.type="codeTextData",d(f))}}var M$,Dde=E(()=>{l();st();M$={name:"codeText",previous:nFe,resolve:tFe,tokenize:rFe}});function lE(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}var kN,kde=E(()=>{l();kN=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){let o=n??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(t,o):t>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(t,n,o){let r=n||0;this.setCursor(Math.trunc(t));let i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return o&&lE(this.left,o),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),lE(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),lE(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let n=this.left.splice(t,Number.POSITIVE_INFINITY);lE(this.right,n.reverse())}else{let n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);lE(this.left,n.reverse())}}}});function UN(e){let t={},n=-1,o,r,i,s,a,c,u,d=new kN(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(o=d.get(n),n&&o[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(c=o[1]._tokenizer.events,i=0,i<c.length&&c[i][1].type==="lineEndingBlank"&&(i+=2),i<c.length&&c[i][1].type==="content"))for(;++i<c.length&&c[i][1].type!=="content";)c[i][1].type==="chunkText"&&(c[i][1]._isInFirstContentOfListItem=!0,i++);if(o[0]==="enter")o[1].contentType&&(Object.assign(t,oFe(d,n)),n=t[n],u=!0);else if(o[1]._container){for(i=n,r=void 0;i--;)if(s=d.get(i),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(r&&(d.get(r)[1].type="lineEndingBlank"),s[1].type="lineEnding",r=i);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;r&&(o[1].end={...d.get(r)[1].start},a=d.slice(r,n),a.unshift(o),d.splice(r,n-r+1,a))}}return Ln(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function oFe(e,t){let n=e.get(t)[1],o=e.get(t)[2],r=t-1,i=[],s=n._tokenizer;s||(s=o.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));let a=s.events,c=[],u={},d,p,f=-1,m=n,_=0,h=0,T=[h];for(;m;){for(;e.get(++r)[1]!==m;);i.push(r),m._tokenizer||(d=o.sliceStream(m),m.next||d.push(null),p&&s.defineSkip(m.start),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),p=m,m=m.next}for(m=n;++f<a.length;)a[f][0]==="exit"&&a[f-1][0]==="enter"&&a[f][1].type===a[f-1][1].type&&a[f][1].start.line!==a[f][1].end.line&&(h=f+1,T.push(h),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(s.events=[],m?(m._tokenizer=void 0,m.previous=void 0):T.pop(),f=T.length;f--;){let S=a.slice(T[f],T[f+1]),y=i.pop();c.push([y,y+S.length-1]),e.splice(y,2,S)}for(c.reverse(),f=-1;++f<c.length;)u[_+c[f][0]]=_+c[f][1],_+=c[f][1]-c[f][0]-1;return u}var L$=E(()=>{l();$c();kde()});function sFe(e){return UN(e),e}function aFe(e,t){let n;return o;function o(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(a)}function r(a){return a===null?i(a):ce(a)?e.check(iFe,s,i)(a):(e.consume(a),r)}function i(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function s(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}function cFe(e,t,n){let o=this;return r;function r(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ce(e,i,"linePrefix")}function i(s){if(s===null||ce(s))return n(s);let a=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):e.interrupt(o.parser.constructs.flow,n,t)(s)}}var w$,iFe,Ude=E(()=>{l();hn();st();L$();w$={resolve:sFe,tokenize:aFe},iFe={partial:!0,tokenize:cFe}});function $N(e,t,n,o,r,i,s,a,c){let u=c||Number.POSITIVE_INFINITY,d=0;return p;function p(S){return S===60?(e.enter(o),e.enter(r),e.enter(i),e.consume(S),e.exit(i),f):S===null||S===32||S===41||sE(S)?n(S):(e.enter(o),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),h(S))}function f(S){return S===62?(e.enter(i),e.consume(S),e.exit(i),e.exit(r),e.exit(o),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===62?(e.exit("chunkString"),e.exit(a),f(S)):S===null||S===60||ce(S)?n(S):(e.consume(S),S===92?_:m)}function _(S){return S===60||S===62||S===92?(e.consume(S),m):m(S)}function h(S){return!d&&(S===null||S===41||Vt(S))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(o),t(S)):d<u&&S===40?(e.consume(S),d++,h):S===41?(e.consume(S),d--,h):S===null||S===32||S===40||sE(S)?n(S):(e.consume(S),S===92?T:h)}function T(S){return S===40||S===41||S===92?(e.consume(S),h):h(S)}}var D$=E(()=>{l();st()});function BN(e,t,n,o,r,i){let s=this,a=0,c;return u;function u(m){return e.enter(o),e.enter(r),e.consume(m),e.exit(r),e.enter(i),d}function d(m){return a>999||m===null||m===91||m===93&&!c||m===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(m):m===93?(e.exit(i),e.enter(r),e.consume(m),e.exit(r),e.exit(o),t):ce(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),p(m))}function p(m){return m===null||m===91||m===93||ce(m)||a++>999?(e.exit("chunkString"),d(m)):(e.consume(m),c||(c=!Ne(m)),m===92?f:p)}function f(m){return m===91||m===92||m===93?(e.consume(m),a++,p):p(m)}}var k$=E(()=>{l();st()});function GN(e,t,n,o,r,i){let s;return a;function a(f){return f===34||f===39||f===40?(e.enter(o),e.enter(r),e.consume(f),e.exit(r),s=f===40?41:f,c):n(f)}function c(f){return f===s?(e.enter(r),e.consume(f),e.exit(r),e.exit(o),t):(e.enter(i),u(f))}function u(f){return f===s?(e.exit(i),c(s)):f===null?n(f):ce(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ce(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===s||f===null||ce(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?p:d)}function p(f){return f===s||f===92?(e.consume(f),d):d(f)}}var U$=E(()=>{l();hn();st()});function Bl(e,t){let n;return o;function o(r){return ce(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),n=!0,o):Ne(r)?Ce(e,o,n?"linePrefix":"lineSuffix")(r):t(r)}}var $$=E(()=>{l();hn();st()});function lFe(e,t,n){let o=this,r;return i;function i(m){return e.enter("definition"),s(m)}function s(m){return BN.call(o,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function a(m){return r=Ea(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),c):n(m)}function c(m){return Vt(m)?Bl(e,u)(m):u(m)}function u(m){return $N(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function d(m){return e.attempt(uFe,p,p)(m)}function p(m){return Ne(m)?Ce(e,f,"whitespace")(m):f(m)}function f(m){return m===null||ce(m)?(e.exit("definition"),o.parser.defined.push(r),t(m)):n(m)}}function dFe(e,t,n){return o;function o(a){return Vt(a)?Bl(e,r)(a):n(a)}function r(a){return GN(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function i(a){return Ne(a)?Ce(e,s,"whitespace")(a):s(a)}function s(a){return a===null||ce(a)?t(a):n(a)}}var B$,uFe,$de=E(()=>{l();D$();k$();hn();U$();$$();st();vN();B$={name:"definition",tokenize:lFe},uFe={partial:!0,tokenize:dFe}});function pFe(e,t,n){return o;function o(i){return e.enter("hardBreakEscape"),e.consume(i),r}function r(i){return ce(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}var G$,Bde=E(()=>{l();st();G$={name:"hardBreakEscape",tokenize:pFe}});function fFe(e,t){let n=e.length-2,o=3,r,i;return e[o][1].type==="whitespace"&&(o+=2),n-2>o&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(o===n-1||n-4>o&&e[n-2][1].type==="whitespace")&&(n-=o+1===n?2:4),n>o&&(r={type:"atxHeadingText",start:e[o][1].start,end:e[n][1].end},i={type:"chunkText",start:e[o][1].start,end:e[n][1].end,contentType:"text"},Ln(e,o,n-o+1,[["enter",r,t],["enter",i,t],["exit",i,t],["exit",r,t]])),e}function mFe(e,t,n){let o=0;return r;function r(d){return e.enter("atxHeading"),i(d)}function i(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&o++<6?(e.consume(d),s):d===null||Vt(d)?(e.exit("atxHeadingSequence"),a(d)):n(d)}function a(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||ce(d)?(e.exit("atxHeading"),t(d)):Ne(d)?Ce(e,a,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),a(d))}function u(d){return d===null||d===35||Vt(d)?(e.exit("atxHeadingText"),a(d)):(e.consume(d),u)}}var j$,Gde=E(()=>{l();hn();st();$c();j$={name:"headingAtx",resolve:fFe,tokenize:mFe}});var jde,V$,Vde=E(()=>{l();jde=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],V$=["pre","script","style","textarea"]});function hFe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function EFe(e,t,n){let o=this,r,i,s,a,c;return u;function u(O){return d(O)}function d(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),p}function p(O){return O===33?(e.consume(O),f):O===47?(e.consume(O),i=!0,h):O===63?(e.consume(O),r=3,o.interrupt?t:C):ao(O)?(e.consume(O),s=String.fromCharCode(O),T):n(O)}function f(O){return O===45?(e.consume(O),r=2,m):O===91?(e.consume(O),r=5,a=0,_):ao(O)?(e.consume(O),r=4,o.interrupt?t:C):n(O)}function m(O){return O===45?(e.consume(O),o.interrupt?t:C):n(O)}function _(O){let Mt="CDATA[";return O===Mt.charCodeAt(a++)?(e.consume(O),a===Mt.length?o.interrupt?t:J:_):n(O)}function h(O){return ao(O)?(e.consume(O),s=String.fromCharCode(O),T):n(O)}function T(O){if(O===null||O===47||O===62||Vt(O)){let Mt=O===47,Ko=s.toLowerCase();return!Mt&&!i&&V$.includes(Ko)?(r=1,o.interrupt?t(O):J(O)):jde.includes(s.toLowerCase())?(r=6,Mt?(e.consume(O),S):o.interrupt?t(O):J(O)):(r=7,o.interrupt&&!o.parser.lazy[o.now().line]?n(O):i?y(O):v(O))}return O===45||Er(O)?(e.consume(O),s+=String.fromCharCode(O),T):n(O)}function S(O){return O===62?(e.consume(O),o.interrupt?t:J):n(O)}function y(O){return Ne(O)?(e.consume(O),y):G(O)}function v(O){return O===47?(e.consume(O),G):O===58||O===95||ao(O)?(e.consume(O),x):Ne(O)?(e.consume(O),v):G(O)}function x(O){return O===45||O===46||O===58||O===95||Er(O)?(e.consume(O),x):P(O)}function P(O){return O===61?(e.consume(O),N):Ne(O)?(e.consume(O),P):v(O)}function N(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),c=O,F):Ne(O)?(e.consume(O),N):se(O)}function F(O){return O===c?(e.consume(O),c=null,$):O===null||ce(O)?n(O):(e.consume(O),F)}function se(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||Vt(O)?P(O):(e.consume(O),se)}function $(O){return O===47||O===62||Ne(O)?v(O):n(O)}function G(O){return O===62?(e.consume(O),Q):n(O)}function Q(O){return O===null||ce(O)?J(O):Ne(O)?(e.consume(O),Q):n(O)}function J(O){return O===45&&r===2?(e.consume(O),Ie):O===60&&r===1?(e.consume(O),Ae):O===62&&r===4?(e.consume(O),er):O===63&&r===3?(e.consume(O),C):O===93&&r===5?(e.consume(O),un):ce(O)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(_Fe,we,D)(O)):O===null||ce(O)?(e.exit("htmlFlowData"),D(O)):(e.consume(O),J)}function D(O){return e.check(gFe,ue,we)(O)}function ue(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),de}function de(O){return O===null||ce(O)?D(O):(e.enter("htmlFlowData"),J(O))}function Ie(O){return O===45?(e.consume(O),C):J(O)}function Ae(O){return O===47?(e.consume(O),s="",Je):J(O)}function Je(O){if(O===62){let Mt=s.toLowerCase();return V$.includes(Mt)?(e.consume(O),er):J(O)}return ao(O)&&s.length<8?(e.consume(O),s+=String.fromCharCode(O),Je):J(O)}function un(O){return O===93?(e.consume(O),C):J(O)}function C(O){return O===62?(e.consume(O),er):O===45&&r===2?(e.consume(O),C):J(O)}function er(O){return O===null||ce(O)?(e.exit("htmlFlowData"),we(O)):(e.consume(O),er)}function we(O){return e.exit("htmlFlow"),t(O)}}function TFe(e,t,n){let o=this;return r;function r(s){return ce(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):n(s)}function i(s){return o.parser.lazy[o.now().line]?n(s):t(s)}}function SFe(e,t,n){return o;function o(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Gc,t,n)}}var F$,_Fe,gFe,Fde=E(()=>{l();st();Vde();xN();F$={concrete:!0,name:"htmlFlow",resolveTo:hFe,tokenize:EFe},_Fe={partial:!0,tokenize:SFe},gFe={partial:!0,tokenize:TFe}});function AFe(e,t,n){let o=this,r,i,s;return a;function a(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),c}function c(C){return C===33?(e.consume(C),u):C===47?(e.consume(C),P):C===63?(e.consume(C),v):ao(C)?(e.consume(C),se):n(C)}function u(C){return C===45?(e.consume(C),d):C===91?(e.consume(C),i=0,_):ao(C)?(e.consume(C),y):n(C)}function d(C){return C===45?(e.consume(C),m):n(C)}function p(C){return C===null?n(C):C===45?(e.consume(C),f):ce(C)?(s=p,Ae(C)):(e.consume(C),p)}function f(C){return C===45?(e.consume(C),m):p(C)}function m(C){return C===62?Ie(C):C===45?f(C):p(C)}function _(C){let er="CDATA[";return C===er.charCodeAt(i++)?(e.consume(C),i===er.length?h:_):n(C)}function h(C){return C===null?n(C):C===93?(e.consume(C),T):ce(C)?(s=h,Ae(C)):(e.consume(C),h)}function T(C){return C===93?(e.consume(C),S):h(C)}function S(C){return C===62?Ie(C):C===93?(e.consume(C),S):h(C)}function y(C){return C===null||C===62?Ie(C):ce(C)?(s=y,Ae(C)):(e.consume(C),y)}function v(C){return C===null?n(C):C===63?(e.consume(C),x):ce(C)?(s=v,Ae(C)):(e.consume(C),v)}function x(C){return C===62?Ie(C):v(C)}function P(C){return ao(C)?(e.consume(C),N):n(C)}function N(C){return C===45||Er(C)?(e.consume(C),N):F(C)}function F(C){return ce(C)?(s=F,Ae(C)):Ne(C)?(e.consume(C),F):Ie(C)}function se(C){return C===45||Er(C)?(e.consume(C),se):C===47||C===62||Vt(C)?$(C):n(C)}function $(C){return C===47?(e.consume(C),Ie):C===58||C===95||ao(C)?(e.consume(C),G):ce(C)?(s=$,Ae(C)):Ne(C)?(e.consume(C),$):Ie(C)}function G(C){return C===45||C===46||C===58||C===95||Er(C)?(e.consume(C),G):Q(C)}function Q(C){return C===61?(e.consume(C),J):ce(C)?(s=Q,Ae(C)):Ne(C)?(e.consume(C),Q):$(C)}function J(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),r=C,D):ce(C)?(s=J,Ae(C)):Ne(C)?(e.consume(C),J):(e.consume(C),ue)}function D(C){return C===r?(e.consume(C),r=void 0,de):C===null?n(C):ce(C)?(s=D,Ae(C)):(e.consume(C),D)}function ue(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||Vt(C)?$(C):(e.consume(C),ue)}function de(C){return C===47||C===62||Vt(C)?$(C):n(C)}function Ie(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function Ae(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),Je}function Je(C){return Ne(C)?Ce(e,un,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):un(C)}function un(C){return e.enter("htmlTextData"),s(C)}}var H$,Hde=E(()=>{l();hn();st();H$={name:"htmlText",tokenize:AFe}});function bFe(e){let t=-1,n=[];for(;++t<e.length;){let o=e[t][1];if(n.push(e[t]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){let r=o.type==="labelImage"?4:2;o.type="data",t+=r}}return e.length!==n.length&&Ln(e,0,e.length,n),e}function NFe(e,t){let n=e.length,o=0,r,i,s,a;for(;n--;)if(r=e[n][1],i){if(r.type==="link"||r.type==="labelLink"&&r._inactive)break;e[n][0]==="enter"&&r.type==="labelLink"&&(r._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(r.type==="labelImage"||r.type==="labelLink")&&!r._balanced&&(i=n,r.type!=="labelLink")){o=2;break}}else r.type==="labelEnd"&&(s=n);let c={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[s][1].end}},d={type:"labelText",start:{...e[i+o+2][1].end},end:{...e[s-2][1].start}};return a=[["enter",c,t],["enter",u,t]],a=hr(a,e.slice(i+1,i+o+3)),a=hr(a,[["enter",d,t]]),a=hr(a,nm(t.parser.constructs.insideSpan.null,e.slice(i+o+4,s-3),t)),a=hr(a,[["exit",d,t],e[s-2],e[s-1],["exit",u,t]]),a=hr(a,e.slice(s+1)),a=hr(a,[["exit",c,t]]),Ln(e,i,e.length,a),e}function OFe(e,t,n){let o=this,r=o.events.length,i,s;for(;r--;)if((o.events[r][1].type==="labelImage"||o.events[r][1].type==="labelLink")&&!o.events[r][1]._balanced){i=o.events[r][1];break}return a;function a(f){return i?i._inactive?p(f):(s=o.parser.defined.includes(Ea(o.sliceSerialize({start:i.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),c):n(f)}function c(f){return f===40?e.attempt(yFe,d,s?d:p)(f):f===91?e.attempt(RFe,d,s?u:p)(f):s?d(f):p(f)}function u(f){return e.attempt(IFe,d,p)(f)}function d(f){return t(f)}function p(f){return i._balanced=!0,n(f)}}function CFe(e,t,n){return o;function o(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),r}function r(p){return Vt(p)?Bl(e,i)(p):i(p)}function i(p){return p===41?d(p):$N(e,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function s(p){return Vt(p)?Bl(e,c)(p):d(p)}function a(p){return n(p)}function c(p){return p===34||p===39||p===40?GN(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):d(p)}function u(p){return Vt(p)?Bl(e,d)(p):d(p)}function d(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function vFe(e,t,n){let o=this;return r;function r(a){return BN.call(o,e,i,s,"reference","referenceMarker","referenceString")(a)}function i(a){return o.parser.defined.includes(Ea(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function s(a){return n(a)}}function PFe(e,t,n){return o;function o(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),r}function r(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}var Gl,yFe,RFe,IFe,jN=E(()=>{l();D$();k$();U$();$$();st();$c();vN();PN();Gl={name:"labelEnd",resolveAll:bFe,resolveTo:NFe,tokenize:OFe},yFe={tokenize:CFe},RFe={tokenize:vFe},IFe={tokenize:PFe}});function xFe(e,t,n){let o=this;return r;function r(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),i}function i(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),s):n(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in o.parser.constructs?n(a):t(a)}}var z$,zde=E(()=>{l();jN();z$={name:"labelStartImage",resolveAll:Gl.resolveAll,tokenize:xFe}});function MFe(e,t,n){let o=this;return r;function r(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),i}function i(s){return s===94&&"_hiddenFootnoteSupport"in o.parser.constructs?n(s):t(s)}}var q$,qde=E(()=>{l();jN();q$={name:"labelStartLink",resolveAll:Gl.resolveAll,tokenize:MFe}});function LFe(e,t){return n;function n(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ce(e,t,"linePrefix")}}var dE,Yde=E(()=>{l();hn();dE={name:"lineEnding",tokenize:LFe}});function wFe(e,t,n){let o=0,r;return i;function i(u){return e.enter("thematicBreak"),s(u)}function s(u){return r=u,a(u)}function a(u){return u===r?(e.enter("thematicBreakSequence"),c(u)):o>=3&&(u===null||ce(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===r?(e.consume(u),o++,c):(e.exit("thematicBreakSequence"),Ne(u)?Ce(e,a,"whitespace")(u):a(u))}}var jl,Y$=E(()=>{l();hn();st();jl={name:"thematicBreak",tokenize:wFe}});function UFe(e,t,n){let o=this,r=o.events[o.events.length-1],i=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,s=0;return a;function a(m){let _=o.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!o.containerState.marker||m===o.containerState.marker:aE(m)){if(o.containerState.type||(o.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(jl,n,u)(m):u(m);if(!o.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(m)}return n(m)}function c(m){return aE(m)&&++s<10?(e.consume(m),c):(!o.interrupt||s<2)&&(o.containerState.marker?m===o.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),u(m)):n(m)}function u(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||m,e.check(Gc,o.interrupt?n:d,e.attempt(DFe,f,p))}function d(m){return o.containerState.initialBlankLine=!0,i++,f(m)}function p(m){return Ne(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),f):n(m)}function f(m){return o.containerState.size=i+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function $Fe(e,t,n){let o=this;return o.containerState._closeFlow=void 0,e.check(Gc,r,i);function r(a){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Ce(e,t,"listItemIndent",o.containerState.size+1)(a)}function i(a){return o.containerState.furtherBlankLines||!Ne(a)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,s(a)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(kFe,t,s)(a))}function s(a){return o.containerState._closeFlow=!0,o.interrupt=void 0,Ce(e,e.attempt(Jn,t,n),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function BFe(e,t,n){let o=this;return Ce(e,r,"listItemIndent",o.containerState.size+1);function r(i){let s=o.events[o.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===o.containerState.size?t(i):n(i)}}function GFe(e){e.exit(this.containerState.type)}function jFe(e,t,n){let o=this;return Ce(e,r,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(i){let s=o.events[o.events.length-1];return!Ne(i)&&s&&s[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}var Jn,DFe,kFe,Wde=E(()=>{l();hn();st();xN();Y$();Jn={continuation:{tokenize:$Fe},exit:GFe,name:"list",tokenize:UFe},DFe={partial:!0,tokenize:jFe},kFe={partial:!0,tokenize:BFe}});function VFe(e,t){let n=e.length,o,r,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){o=n;break}e[n][1].type==="paragraph"&&(r=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);let s={type:"setextHeading",start:{...e[o][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",s,t]),e.splice(i+1,0,["exit",e[o][1],t]),e[o][1].end={...e[i][1].end}):e[o][1]=s,e.push(["exit",s,t]),e}function FFe(e,t,n){let o=this,r;return i;function i(u){let d=o.events.length,p;for(;d--;)if(o.events[d][1].type!=="lineEnding"&&o.events[d][1].type!=="linePrefix"&&o.events[d][1].type!=="content"){p=o.events[d][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||p)?(e.enter("setextHeadingLine"),r=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===r?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),Ne(u)?Ce(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||ce(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}var VN,Kde=E(()=>{l();hn();st();VN={name:"setextUnderline",resolveTo:VFe,tokenize:FFe}});var W$=E(()=>{l();Ode();Cde();xN();vde();Pde();xde();Lde();wde();Dde();Ude();$de();Bde();Gde();Fde();Hde();jN();zde();qde();Yde();Wde();Kde();Y$()});function HFe(e){let t=this,n=e.attempt(Gc,o,e.attempt(this.parser.constructs.flowInitial,r,Ce(e,e.attempt(this.parser.constructs.flow,r,e.attempt(w$,r)),"linePrefix")));return n;function o(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function r(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}var Zde,Jde=E(()=>{l();W$();hn();Zde={tokenize:HFe}});function tpe(e){return{resolveAll:npe(e==="text"?zFe:void 0),tokenize:t};function t(n){let o=this,r=this.parser.constructs[e],i=n.attempt(r,s,a);return s;function s(d){return u(d)?i(d):a(d)}function a(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),c}function c(d){return u(d)?(n.exit("data"),i(d)):(n.consume(d),c)}function u(d){if(d===null)return!0;let p=r[d],f=-1;if(p)for(;++f<p.length;){let m=p[f];if(!m.previous||m.previous.call(o,o.previous))return!0}return!1}}}function npe(e){return t;function t(n,o){let r=-1,i;for(;++r<=n.length;)i===void 0?n[r]&&n[r][1].type==="data"&&(i=r,r++):(!n[r]||n[r][1].type!=="data")&&(r!==i+2&&(n[i][1].end=n[r-1][1].end,n.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(n,o):n}}function zFe(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){let o=e[n-1][1],r=t.sliceStream(o),i=r.length,s=-1,a=0,c;for(;i--;){let u=r[i];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(u===-2)c=!0,a++;else if(u!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){let u={type:n===e.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:o.start._bufferIndex+s,_index:o.start._index+i,line:o.end.line,column:o.end.column-a,offset:o.end.offset-a},end:{...o.end}};o.end={...u.start},o.start.offset===o.end.offset?Object.assign(o,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}var Xde,Qde,epe,K$=E(()=>{l();Xde={resolveAll:npe()},Qde=tpe("string"),epe=tpe("text")});var Z$={};ht(Z$,{attentionMarkers:()=>QFe,contentInitial:()=>YFe,disable:()=>eHe,document:()=>qFe,flow:()=>KFe,flowInitial:()=>WFe,insideSpan:()=>XFe,string:()=>ZFe,text:()=>JFe});var qFe,YFe,WFe,KFe,ZFe,JFe,XFe,QFe,eHe,rpe=E(()=>{l();W$();K$();qFe={42:Jn,43:Jn,45:Jn,48:Jn,49:Jn,50:Jn,51:Jn,52:Jn,53:Jn,54:Jn,55:Jn,56:Jn,57:Jn,62:MN},YFe={91:B$},WFe={[-2]:uE,[-1]:uE,32:uE},KFe={35:j$,42:jl,45:[VN,jl],60:F$,61:VN,95:jl,96:DN,126:DN},ZFe={38:wN,92:LN},JFe={[-5]:dE,[-4]:dE,[-3]:dE,33:z$,38:wN,42:cE,60:[x$,H$],91:q$,92:[G$,LN],93:Gl,95:cE,96:M$},XFe={null:[cE,Xde]},QFe={null:[42,95]},eHe={null:[]}});function ope(e,t,n){let o={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},r={},i=[],s=[],a=[],c=!0,u={attempt:$(F),check:$(se),consume:x,enter:P,exit:N,interrupt:$(se,{interrupt:!0})},d={code:null,containerState:{},defineSkip:S,events:[],now:T,parser:e,previous:null,sliceSerialize:_,sliceStream:h,write:m},p=t.tokenize.call(d,u),f;return t.resolveAll&&i.push(t),d;function m(D){return s=hr(s,D),y(),s[s.length-1]!==null?[]:(G(t,0),d.events=nm(i,d.events,d),d.events)}function _(D,ue){return nHe(h(D),ue)}function h(D){return tHe(s,D)}function T(){let{_bufferIndex:D,_index:ue,line:de,column:Ie,offset:Ae}=o;return{_bufferIndex:D,_index:ue,line:de,column:Ie,offset:Ae}}function S(D){r[D.line]=D.column,J()}function y(){let D;for(;o._index<s.length;){let ue=s[o._index];if(typeof ue=="string")for(D=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===D&&o._bufferIndex<ue.length;)v(ue.charCodeAt(o._bufferIndex));else v(ue)}}function v(D){c=void 0,f=D,p=p(D)}function x(D){ce(D)?(o.line++,o.column=1,o.offset+=D===-3?2:1,J()):D!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===s[o._index].length&&(o._bufferIndex=-1,o._index++)),d.previous=D,c=!0}function P(D,ue){let de=ue||{};return de.type=D,de.start=T(),d.events.push(["enter",de,d]),a.push(de),de}function N(D){let ue=a.pop();return ue.end=T(),d.events.push(["exit",ue,d]),ue}function F(D,ue){G(D,ue.from)}function se(D,ue){ue.restore()}function $(D,ue){return de;function de(Ie,Ae,Je){let un,C,er,we;return Array.isArray(Ie)?Mt(Ie):"tokenize"in Ie?Mt([Ie]):O(Ie);function O(Sn){return c_;function c_(vs){let au=vs!==null&&Sn[vs],gd=vs!==null&&Sn.null,Jv=[...Array.isArray(au)?au:au?[au]:[],...Array.isArray(gd)?gd:gd?[gd]:[]];return Mt(Jv)(vs)}}function Mt(Sn){return un=Sn,C=0,Sn.length===0?Je:Ko(Sn[C])}function Ko(Sn){return c_;function c_(vs){return we=Q(),er=Sn,Sn.partial||(d.currentConstruct=Sn),Sn.name&&d.parser.constructs.disable.null.includes(Sn.name)?LT(vs):Sn.tokenize.call(ue?Object.assign(Object.create(d),ue):d,u,a_,LT)(vs)}}function a_(Sn){return c=!0,D(er,we),Ae}function LT(Sn){return c=!0,we.restore(),++C<un.length?Ko(un[C]):Je}}}function G(D,ue){D.resolveAll&&!i.includes(D)&&i.push(D),D.resolve&&Ln(d.events,ue,d.events.length-ue,D.resolve(d.events.slice(ue),d)),D.resolveTo&&(d.events=D.resolveTo(d.events,d))}function Q(){let D=T(),ue=d.previous,de=d.currentConstruct,Ie=d.events.length,Ae=Array.from(a);return{from:Ie,restore:Je};function Je(){o=D,d.previous=ue,d.currentConstruct=de,d.events.length=Ie,a=Ae,J()}}function J(){o.line in r&&o.column<2&&(o.column=r[o.line],o.offset+=r[o.line]-1)}}function tHe(e,t){let n=t.start._index,o=t.start._bufferIndex,r=t.end._index,i=t.end._bufferIndex,s;if(n===r)s=[e[n].slice(o,i)];else{if(s=e.slice(n,r),o>-1){let a=s[0];typeof a=="string"?s[0]=a.slice(o):s.shift()}i>0&&s.push(e[r].slice(0,i))}return s}function nHe(e,t){let n=-1,o=[],r;for(;++n<e.length;){let i=e[n],s;if(typeof i=="string")s=i;else switch(i){case-5:{s="\r";break}case-4:{s=`
|
|
392
|
+
`;break}case-3:{s=`\r
|
|
393
|
+
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&r)continue;s=" ";break}default:s=String.fromCharCode(i)}r=i===-2,o.push(s)}return o.join("")}var ipe=E(()=>{l();st();$c();PN()});function J$(e){let o={constructs:mde([Z$,...(e||{}).extensions||[]]),content:r(Ade),defined:[],document:r(Ide),flow:r(Zde),lazy:{},string:r(Qde),text:r(epe)};return o;function r(i){return s;function s(a){return ope(o,i,a)}}}var spe=E(()=>{l();_de();yde();bde();Jde();K$();rpe();ipe()});function X$(e){for(;!UN(e););return e}var ape=E(()=>{l();L$()});function Q$(){let e=1,t="",n=!0,o;return r;function r(i,s,a){let c=[],u,d,p,f,m;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),p=0,t="",n&&(i.charCodeAt(0)===65279&&p++,n=void 0);p<i.length;){if(cpe.lastIndex=p,u=cpe.exec(i),f=u&&u.index!==void 0?u.index:i.length,m=i.charCodeAt(f),!u){t=i.slice(p);break}if(m===10&&p===f&&o)c.push(-3),o=void 0;else switch(o&&(c.push(-5),o=void 0),p<f&&(c.push(i.slice(p,f)),e+=f-p),m){case 0:{c.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,c.push(-2);e++<d;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:o=!0,e=1}p=f+1}return a&&(o&&c.push(-5),t&&c.push(t),c.push(null)),c}}var cpe,upe=E(()=>{l();cpe=/[\0\t\n\r]/g});var lpe=E(()=>{l();spe();ape();upe()});function FN(e){return e.replace(rHe,oHe)}function oHe(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let r=n.charCodeAt(1),i=r===120||r===88;return CN(n.slice(i?2:1),i?16:10)}return em(n)||e}var rHe,eB=E(()=>{l();ON();v$();rHe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi});function jc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?dpe(e.position):"start"in e||"end"in e?dpe(e):"line"in e||"column"in e?tB(e):""}function tB(e){return ppe(e&&e.line)+":"+ppe(e&&e.column)}function dpe(e){return tB(e&&e.start)+"-"+tB(e&&e.end)}function ppe(e){return e&&typeof e=="number"?e:1}var fpe=E(()=>{l()});var nB=E(()=>{l();fpe()});function rB(e,t,n){return typeof t!="string"&&(n=t,t=void 0),iHe(n)(X$(J$(n).document().write(Q$()(e,t,!0))))}function iHe(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(Kz),autolinkProtocol:$,autolinkEmail:$,atxHeading:i(qz),blockQuote:i(vs),characterEscape:$,characterReference:$,codeFenced:i(au),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(au,s),codeText:i(gd,s),codeTextData:$,data:$,codeFlowValue:$,definition:i(Jv),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(jAe),hardBreakEscape:i(Yz),hardBreakTrailing:i(Yz),htmlFlow:i(Wz,s),htmlFlowData:$,htmlText:i(Wz,s),htmlTextData:$,image:i(VAe),label:s,link:i(Kz),listItem:i(FAe),listItemValue:f,listOrdered:i(Zz,p),listUnordered:i(Zz),paragraph:i(HAe),reference:O,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(qz),strong:i(zAe),thematicBreak:i(YAe)},exit:{atxHeading:c(),atxHeadingSequence:P,autolink:c(),autolinkEmail:c_,autolinkProtocol:Sn,blockQuote:c(),characterEscapeValue:G,characterReferenceMarkerHexadecimal:Ko,characterReferenceMarkerNumeric:Ko,characterReferenceValue:a_,characterReference:LT,codeFenced:c(T),codeFencedFence:h,codeFencedFenceInfo:m,codeFencedFenceMeta:_,codeFlowValue:G,codeIndented:c(S),codeText:c(de),codeTextData:G,data:G,definition:c(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:v,emphasis:c(),hardBreakEscape:c(J),hardBreakTrailing:c(J),htmlFlow:c(D),htmlFlowData:G,htmlText:c(ue),htmlTextData:G,image:c(Ae),label:un,labelText:Je,lineEnding:Q,link:c(Ie),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Mt,resourceDestinationString:C,resourceTitleString:er,resource:we,setextHeading:c(se),setextHeadingLineSequence:F,setextHeadingText:N,strong:c(),thematicBreak:c()}};gpe(t,(e||{}).mdastExtensions||[]);let n={};return o;function o(k){let X={type:"root",children:[]},Oe={stack:[X],tokenStack:[],config:t,enter:a,exit:u,buffer:s,resume:d,data:n},Ve=[],ut=-1;for(;++ut<k.length;)if(k[ut][1].type==="listOrdered"||k[ut][1].type==="listUnordered")if(k[ut][0]==="enter")Ve.push(ut);else{let Zo=Ve.pop();ut=r(k,Zo,ut)}for(ut=-1;++ut<k.length;){let Zo=t[k[ut][0]];_pe.call(Zo,k[ut][1].type)&&Zo[k[ut][1].type].call(Object.assign({sliceSerialize:k[ut][2].sliceSerialize},Oe),k[ut][1])}if(Oe.tokenStack.length>0){let Zo=Oe.tokenStack[Oe.tokenStack.length-1];(Zo[1]||mpe).call(Oe,void 0,Zo[0])}for(X.position={start:Vc(k.length>0?k[0][1].start:{line:1,column:1,offset:0}),end:Vc(k.length>0?k[k.length-2][1].end:{line:1,column:1,offset:0})},ut=-1;++ut<t.transforms.length;)X=t.transforms[ut](X)||X;return X}function r(k,X,Oe){let Ve=X-1,ut=-1,Zo=!1,cu,Ps,u_,l_;for(;++Ve<=Oe;){let qr=k[Ve];switch(qr[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{qr[0]==="enter"?ut++:ut--,l_=void 0;break}case"lineEndingBlank":{qr[0]==="enter"&&(cu&&!l_&&!ut&&!u_&&(u_=Ve),l_=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:l_=void 0}if(!ut&&qr[0]==="enter"&&qr[1].type==="listItemPrefix"||ut===-1&&qr[0]==="exit"&&(qr[1].type==="listUnordered"||qr[1].type==="listOrdered")){if(cu){let hd=Ve;for(Ps=void 0;hd--;){let xs=k[hd];if(xs[1].type==="lineEnding"||xs[1].type==="lineEndingBlank"){if(xs[0]==="exit")continue;Ps&&(k[Ps][1].type="lineEndingBlank",Zo=!0),xs[1].type="lineEnding",Ps=hd}else if(!(xs[1].type==="linePrefix"||xs[1].type==="blockQuotePrefix"||xs[1].type==="blockQuotePrefixWhitespace"||xs[1].type==="blockQuoteMarker"||xs[1].type==="listItemIndent"))break}u_&&(!Ps||u_<Ps)&&(cu._spread=!0),cu.end=Object.assign({},Ps?k[Ps][1].start:qr[1].end),k.splice(Ps||Ve,0,["exit",cu,qr[2]]),Ve++,Oe++}if(qr[1].type==="listItemPrefix"){let hd={type:"listItem",_spread:!1,start:Object.assign({},qr[1].start),end:void 0};cu=hd,k.splice(Ve,0,["enter",hd,qr[2]]),Ve++,Oe++,u_=void 0,l_=!0}}}return k[X][1]._spread=Zo,Oe}function i(k,X){return Oe;function Oe(Ve){a.call(this,k(Ve),Ve),X&&X.call(this,Ve)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(k,X,Oe){this.stack[this.stack.length-1].children.push(k),this.stack.push(k),this.tokenStack.push([X,Oe||void 0]),k.position={start:Vc(X.start),end:void 0}}function c(k){return X;function X(Oe){k&&k.call(this,Oe),u.call(this,Oe)}}function u(k,X){let Oe=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==k.type&&(X?X.call(this,k,Ve[0]):(Ve[1]||mpe).call(this,k,Ve[0]));else throw new Error("Cannot close `"+k.type+"` ("+jc({start:k.start,end:k.end})+"): it\u2019s not open");Oe.position.end=Vc(k.end)}function d(){return $l(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function f(k){if(this.data.expectingFirstListItemValue){let X=this.stack[this.stack.length-2];X.start=Number.parseInt(this.sliceSerialize(k),10),this.data.expectingFirstListItemValue=void 0}}function m(){let k=this.resume(),X=this.stack[this.stack.length-1];X.lang=k}function _(){let k=this.resume(),X=this.stack[this.stack.length-1];X.meta=k}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){let k=this.resume(),X=this.stack[this.stack.length-1];X.value=k.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){let k=this.resume(),X=this.stack[this.stack.length-1];X.value=k.replace(/(\r?\n|\r)$/g,"")}function y(k){let X=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=X,Oe.identifier=Ea(this.sliceSerialize(k)).toLowerCase()}function v(){let k=this.resume(),X=this.stack[this.stack.length-1];X.title=k}function x(){let k=this.resume(),X=this.stack[this.stack.length-1];X.url=k}function P(k){let X=this.stack[this.stack.length-1];if(!X.depth){let Oe=this.sliceSerialize(k).length;X.depth=Oe}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function F(k){let X=this.stack[this.stack.length-1];X.depth=this.sliceSerialize(k).codePointAt(0)===61?1:2}function se(){this.data.setextHeadingSlurpLineEnding=void 0}function $(k){let Oe=this.stack[this.stack.length-1].children,Ve=Oe[Oe.length-1];(!Ve||Ve.type!=="text")&&(Ve=qAe(),Ve.position={start:Vc(k.start),end:void 0},Oe.push(Ve)),this.stack.push(Ve)}function G(k){let X=this.stack.pop();X.value+=this.sliceSerialize(k),X.position.end=Vc(k.end)}function Q(k){let X=this.stack[this.stack.length-1];if(this.data.atHardBreak){let Oe=X.children[X.children.length-1];Oe.position.end=Vc(k.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(X.type)&&($.call(this,k),G.call(this,k))}function J(){this.data.atHardBreak=!0}function D(){let k=this.resume(),X=this.stack[this.stack.length-1];X.value=k}function ue(){let k=this.resume(),X=this.stack[this.stack.length-1];X.value=k}function de(){let k=this.resume(),X=this.stack[this.stack.length-1];X.value=k}function Ie(){let k=this.stack[this.stack.length-1];if(this.data.inReference){let X=this.data.referenceType||"shortcut";k.type+="Reference",k.referenceType=X,delete k.url,delete k.title}else delete k.identifier,delete k.label;this.data.referenceType=void 0}function Ae(){let k=this.stack[this.stack.length-1];if(this.data.inReference){let X=this.data.referenceType||"shortcut";k.type+="Reference",k.referenceType=X,delete k.url,delete k.title}else delete k.identifier,delete k.label;this.data.referenceType=void 0}function Je(k){let X=this.sliceSerialize(k),Oe=this.stack[this.stack.length-2];Oe.label=FN(X),Oe.identifier=Ea(X).toLowerCase()}function un(){let k=this.stack[this.stack.length-1],X=this.resume(),Oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Oe.type==="link"){let Ve=k.children;Oe.children=Ve}else Oe.alt=X}function C(){let k=this.resume(),X=this.stack[this.stack.length-1];X.url=k}function er(){let k=this.resume(),X=this.stack[this.stack.length-1];X.title=k}function we(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function Mt(k){let X=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=X,Oe.identifier=Ea(this.sliceSerialize(k)).toLowerCase(),this.data.referenceType="full"}function Ko(k){this.data.characterReferenceType=k.type}function a_(k){let X=this.sliceSerialize(k),Oe=this.data.characterReferenceType,Ve;Oe?(Ve=CN(X,Oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=em(X);let ut=this.stack[this.stack.length-1];ut.value+=Ve}function LT(k){let X=this.stack.pop();X.position.end=Vc(k.end)}function Sn(k){G.call(this,k);let X=this.stack[this.stack.length-1];X.url=this.sliceSerialize(k)}function c_(k){G.call(this,k);let X=this.stack[this.stack.length-1];X.url="mailto:"+this.sliceSerialize(k)}function vs(){return{type:"blockquote",children:[]}}function au(){return{type:"code",lang:null,meta:null,value:""}}function gd(){return{type:"inlineCode",value:""}}function Jv(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function jAe(){return{type:"emphasis",children:[]}}function qz(){return{type:"heading",depth:0,children:[]}}function Yz(){return{type:"break"}}function Wz(){return{type:"html",value:""}}function VAe(){return{type:"image",title:null,url:"",alt:null}}function Kz(){return{type:"link",title:null,url:"",children:[]}}function Zz(k){return{type:"list",ordered:k.type==="listOrdered",start:null,spread:k._spread,children:[]}}function FAe(k){return{type:"listItem",spread:k._spread,checked:null,children:[]}}function HAe(){return{type:"paragraph",children:[]}}function zAe(){return{type:"strong",children:[]}}function qAe(){return{type:"text",value:""}}function YAe(){return{type:"thematicBreak"}}}function Vc(e){return{line:e.line,column:e.column,offset:e.offset}}function gpe(e,t){let n=-1;for(;++n<t.length;){let o=t[n];Array.isArray(o)?gpe(e,o):sHe(e,o)}}function sHe(e,t){let n;for(n in t)if(_pe.call(t,n))switch(n){case"canContainEols":{let o=t[n];o&&e[n].push(...o);break}case"transforms":{let o=t[n];o&&e[n].push(...o);break}case"enter":case"exit":{let o=t[n];o&&Object.assign(e[n],o);break}}}function mpe(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+jc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+jc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+jc({start:t.start,end:t.end})+") is still open")}var _pe,hpe=E(()=>{l();NN();lpe();v$();eB();vN();ON();nB();_pe={}.hasOwnProperty});var Epe=E(()=>{l();hpe()});function HN(e){let t=this;t.parser=n;function n(o){return rB(o,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}var Tpe=E(()=>{l();Epe()});var Spe=E(()=>{l();Tpe()});function ype(e,t){let n=t||{};function o(r,...i){let s=o.invalid,a=o.handlers;if(r&&Ape.call(r,e)){let c=String(r[e]);s=Ape.call(a,c)?a[c]:o.unknown}if(s)return s.call(this,r,...i)}return o.handlers=n.handlers||{},o.invalid=n.invalid,o.unknown=n.unknown,o}var Ape,Rpe=E(()=>{l();Ape={}.hasOwnProperty});function oB(e,t){let n=-1,o;if(t.extensions)for(;++n<t.extensions.length;)oB(e,t.extensions[n]);for(o in t)if(aHe.call(t,o))switch(o){case"extensions":break;case"unsafe":{Ipe(e[o],t[o]);break}case"join":{Ipe(e[o],t[o]);break}case"handlers":{cHe(e[o],t[o]);break}default:e.options[o]=t[o]}return e}function Ipe(e,t){t&&e.push(...t)}function cHe(e,t){t&&Object.assign(e,t)}var aHe,bpe=E(()=>{l();aHe={}.hasOwnProperty});function Npe(e,t,n,o){let r=n.enter("blockquote"),i=n.createTracker(o);i.move("> "),i.shift(2);let s=n.indentLines(n.containerFlow(e,i.current()),uHe);return r(),s}function uHe(e,t,n){return">"+(n?"":" ")+e}var Ope=E(()=>{l()});function zN(e,t){return Cpe(e,t.inConstruct,!0)&&!Cpe(e,t.notInConstruct,!1)}function Cpe(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let o=-1;for(;++o<t.length;)if(e.includes(t[o]))return!0;return!1}var iB=E(()=>{l()});function sB(e,t,n,o){let r=-1;for(;++r<n.unsafe.length;)if(n.unsafe[r].character===`
|
|
394
|
+
`&&zN(n.stack,n.unsafe[r]))return/[ \t]/.test(o.before)?"":" ";return`\\
|
|
395
|
+
`}var vpe=E(()=>{l();iB()});function Ppe(e,t){let n=String(e),o=n.indexOf(t),r=o,i=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;o!==-1;)o===r?++i>s&&(s=i):i=1,r=o+t.length,o=n.indexOf(t,r);return s}var xpe=E(()=>{l()});function pE(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}var aB=E(()=>{l()});function Mpe(e){let t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}var Lpe=E(()=>{l()});function wpe(e,t,n,o){let r=Mpe(n),i=e.value||"",s=r==="`"?"GraveAccent":"Tilde";if(pE(e,n)){let p=n.enter("codeIndented"),f=n.indentLines(i,lHe);return p(),f}let a=n.createTracker(o),c=r.repeat(Math.max(Ppe(i,r)+1,3)),u=n.enter("codeFenced"),d=a.move(c);if(e.lang){let p=n.enter(`codeFencedLang${s}`);d+=a.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...a.current()})),p()}if(e.lang&&e.meta){let p=n.enter(`codeFencedMeta${s}`);d+=a.move(" "),d+=a.move(n.safe(e.meta,{before:d,after:`
|
|
396
|
+
`,encode:["`"],...a.current()})),p()}return d+=a.move(`
|
|
397
|
+
`),i&&(d+=a.move(i+`
|
|
398
|
+
`)),d+=a.move(c),u(),d}function lHe(e,t,n){return(n?"":" ")+e}var Dpe=E(()=>{l();xpe();aB();Lpe()});function rm(e){let t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}var qN=E(()=>{l()});function kpe(e,t,n,o){let r=rm(n),i=r==='"'?"Quote":"Apostrophe",s=n.enter("definition"),a=n.enter("label"),c=n.createTracker(o),u=c.move("[");return u+=c.move(n.safe(n.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(a=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
399
|
+
`,...c.current()}))),a(),e.title&&(a=n.enter(`title${i}`),u+=c.move(" "+r),u+=c.move(n.safe(e.title,{before:u,after:r,...c.current()})),u+=c.move(r),a()),s(),u}var Upe=E(()=>{l();qN()});function $pe(e){let t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}var Bpe=E(()=>{l()});function co(e){return"&#x"+e.toString(16).toUpperCase()+";"}var om=E(()=>{l()});function im(e,t,n){let o=tm(e),r=tm(t);return o===void 0?r===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:o===1?r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}var cB=E(()=>{l();P$()});function uB(e,t,n,o){let r=$pe(n),i=n.enter("emphasis"),s=n.createTracker(o),a=s.move(r),c=s.move(n.containerPhrasing(e,{after:r,before:a,...s.current()})),u=c.charCodeAt(0),d=im(o.before.charCodeAt(o.before.length-1),u,r);d.inside&&(c=co(u)+c.slice(1));let p=c.charCodeAt(c.length-1),f=im(o.after.charCodeAt(0),p,r);f.inside&&(c=c.slice(0,-1)+co(p));let m=s.move(r);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:d.outside},a+c+m}function dHe(e,t,n){return n.options.emphasis||"*"}var Gpe=E(()=>{l();Bpe();om();cB();uB.peek=dHe});function pHe(e){let t=[],n=-1;for(;++n<e.length;)t[n]=sm(e[n]);return YN(o);function o(...r){let i=-1;for(;++i<t.length;)if(t[i].apply(this,r))return!0;return!1}}function fHe(e){let t=e;return YN(n);function n(o){let r=o,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function mHe(e){return YN(t);function t(n){return n&&n.type===e}}function YN(e){return t;function t(n,o,r){return!!(gHe(n)&&e.call(this,n,typeof o=="number"?o:void 0,r||void 0))}}function _He(){return!0}function gHe(e){return e!==null&&typeof e=="object"&&"type"in e}var sm,jpe=E(()=>{l();sm=(function(e){if(e==null)return _He;if(typeof e=="function")return YN(e);if(typeof e=="object")return Array.isArray(e)?pHe(e):fHe(e);if(typeof e=="string")return mHe(e);throw new Error("Expected function, string, or object as test")})});var lB=E(()=>{l();jpe()});function Vpe(e){return"\x1B[33m"+e+"\x1B[39m"}var Fpe=E(()=>{l()});function dB(e,t,n,o){let r;typeof t=="function"&&typeof n!="function"?(o=n,n=t):r=t;let i=sm(r),s=o?-1:1;a(e,void 0,[])();function a(c,u,d){let p=c&&typeof c=="object"?c:{};if(typeof p.type=="string"){let m=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(f,"name",{value:"node ("+Vpe(c.type+(m?"<"+m+">":""))+")"})}return f;function f(){let m=Hpe,_,h,T;if((!t||i(c,u,d[d.length-1]||void 0))&&(m=hHe(n(c,d)),m[0]===Vl))return m;if("children"in c&&c.children){let S=c;if(S.children&&m[0]!==KN)for(h=(o?S.children.length:-1)+s,T=d.concat(S);h>-1&&h<S.children.length;){let y=S.children[h];if(_=a(y,h,T)(),_[0]===Vl)return _;h=typeof _[1]=="number"?_[1]:h+s}}return m}}}function hHe(e){return Array.isArray(e)?e:typeof e=="number"?[WN,e]:e==null?Hpe:[e]}var Hpe,WN,Vl,KN,zpe=E(()=>{l();lB();Fpe();Hpe=[],WN=!0,Vl=!1,KN="skip"});var pB=E(()=>{l();zpe()});function fB(e,t,n,o){let r,i,s;typeof t=="function"&&typeof n!="function"?(i=void 0,s=t,r=n):(i=t,s=n,r=o),dB(e,i,a,r);function a(c,u){let d=u[u.length-1],p=d?d.children.indexOf(c):void 0;return s(c,p,d)}}var qpe=E(()=>{l();pB();pB()});var Ype=E(()=>{l();qpe()});function ZN(e,t){let n=!1;return fB(e,function(o){if("value"in o&&/\r?\n|\r/.test(o.value)||o.type==="break")return n=!0,Vl}),!!((!e.depth||e.depth<3)&&$l(e)&&(t.options.setext||n))}var mB=E(()=>{l();Ype();NN()});function Wpe(e,t,n,o){let r=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(o);if(ZN(e,n)){let d=n.enter("headingSetext"),p=n.enter("phrasing"),f=n.containerPhrasing(e,{...i.current(),before:`
|
|
400
|
+
`,after:`
|
|
401
|
+
`});return p(),d(),f+`
|
|
402
|
+
`+(r===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
|
|
403
|
+
`))+1))}let s="#".repeat(r),a=n.enter("headingAtx"),c=n.enter("phrasing");i.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
404
|
+
`,...i.current()});return/^[\t ]/.test(u)&&(u=co(u.charCodeAt(0))+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),c(),a(),u}var Kpe=E(()=>{l();om();mB()});function _B(e){return e.value||""}function EHe(){return"<"}var Zpe=E(()=>{l();_B.peek=EHe});function gB(e,t,n,o){let r=rm(n),i=r==='"'?"Quote":"Apostrophe",s=n.enter("image"),a=n.enter("label"),c=n.createTracker(o),u=c.move("![");return u+=c.move(n.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(a=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),a(),e.title&&(a=n.enter(`title${i}`),u+=c.move(" "+r),u+=c.move(n.safe(e.title,{before:u,after:r,...c.current()})),u+=c.move(r),a()),u+=c.move(")"),s(),u}function THe(){return"!"}var Jpe=E(()=>{l();qN();gB.peek=THe});function hB(e,t,n,o){let r=e.referenceType,i=n.enter("imageReference"),s=n.enter("label"),a=n.createTracker(o),c=a.move("!["),u=n.safe(e.alt,{before:c,after:"]",...a.current()});c+=a.move(u+"]["),s();let d=n.stack;n.stack=[],s=n.enter("reference");let p=n.safe(n.associationId(e),{before:c,after:"]",...a.current()});return s(),n.stack=d,i(),r==="full"||!u||u!==p?c+=a.move(p+"]"):r==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function SHe(){return"!"}var Xpe=E(()=>{l();hB.peek=SHe});function EB(e,t,n){let o=e.value||"",r="`",i=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(o);)r+="`";for(/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^`|`$/.test(o))&&(o=" "+o+" ");++i<n.unsafe.length;){let s=n.unsafe[i],a=n.compilePattern(s),c;if(s.atBreak)for(;c=a.exec(o);){let u=c.index;o.charCodeAt(u)===10&&o.charCodeAt(u-1)===13&&u--,o=o.slice(0,u)+" "+o.slice(c.index+1)}}return r+o+r}function AHe(){return"`"}var Qpe=E(()=>{l();EB.peek=AHe});function TB(e,t){let n=$l(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}var efe=E(()=>{l();NN()});function SB(e,t,n,o){let r=rm(n),i=r==='"'?"Quote":"Apostrophe",s=n.createTracker(o),a,c;if(TB(e,n)){let d=n.stack;n.stack=[],a=n.enter("autolink");let p=s.move("<");return p+=s.move(n.containerPhrasing(e,{before:p,after:">",...s.current()})),p+=s.move(">"),a(),n.stack=d,p}a=n.enter("link"),c=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(c=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),c(),e.title&&(c=n.enter(`title${i}`),u+=s.move(" "+r),u+=s.move(n.safe(e.title,{before:u,after:r,...s.current()})),u+=s.move(r),c()),u+=s.move(")"),a(),u}function yHe(e,t,n){return TB(e,n)?"<":"["}var tfe=E(()=>{l();qN();efe();SB.peek=yHe});function AB(e,t,n,o){let r=e.referenceType,i=n.enter("linkReference"),s=n.enter("label"),a=n.createTracker(o),c=a.move("["),u=n.containerPhrasing(e,{before:c,after:"]",...a.current()});c+=a.move(u+"]["),s();let d=n.stack;n.stack=[],s=n.enter("reference");let p=n.safe(n.associationId(e),{before:c,after:"]",...a.current()});return s(),n.stack=d,i(),r==="full"||!u||u!==p?c+=a.move(p+"]"):r==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function RHe(){return"["}var nfe=E(()=>{l();AB.peek=RHe});function am(e){let t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}var JN=E(()=>{l()});function rfe(e){let t=am(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}var ofe=E(()=>{l();JN()});function ife(e){let t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}var sfe=E(()=>{l()});function XN(e){let t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}var yB=E(()=>{l()});function afe(e,t,n,o){let r=n.enter("list"),i=n.bulletCurrent,s=e.ordered?ife(n):am(n),a=e.ordered?s==="."?")":".":rfe(n),c=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){let d=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),XN(n)===s&&d){let p=-1;for(;++p<e.children.length;){let f=e.children[p];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(s=a),n.bulletCurrent=s;let u=n.containerFlow(e,o);return n.bulletLastUsed=s,n.bulletCurrent=i,r(),u}var cfe=E(()=>{l();JN();ofe();sfe();yB()});function ufe(e){let t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}var lfe=E(()=>{l()});function dfe(e,t,n,o){let r=ufe(n),i=n.bulletCurrent||am(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let s=i.length+1;(r==="tab"||r==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);let a=n.createTracker(o);a.move(i+" ".repeat(s-i.length)),a.shift(s);let c=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),d);return c(),u;function d(p,f,m){return f?(m?"":" ".repeat(s))+p:(m?i:i+" ".repeat(s-i.length))+p}}var pfe=E(()=>{l();JN();lfe()});function ffe(e,t,n,o){let r=n.enter("paragraph"),i=n.enter("phrasing"),s=n.containerPhrasing(e,o);return i(),r(),s}var mfe=E(()=>{l()});var RB,_fe=E(()=>{l();lB();RB=sm(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"])});var gfe=E(()=>{l();_fe()});function hfe(e,t,n,o){return(e.children.some(function(s){return RB(s)})?n.containerPhrasing:n.containerFlow).call(n,e,o)}var Efe=E(()=>{l();gfe()});function Tfe(e){let t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}var Sfe=E(()=>{l()});function IB(e,t,n,o){let r=Tfe(n),i=n.enter("strong"),s=n.createTracker(o),a=s.move(r+r),c=s.move(n.containerPhrasing(e,{after:r,before:a,...s.current()})),u=c.charCodeAt(0),d=im(o.before.charCodeAt(o.before.length-1),u,r);d.inside&&(c=co(u)+c.slice(1));let p=c.charCodeAt(c.length-1),f=im(o.after.charCodeAt(0),p,r);f.inside&&(c=c.slice(0,-1)+co(p));let m=s.move(r+r);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:d.outside},a+c+m}function IHe(e,t,n){return n.options.strong||"*"}var Afe=E(()=>{l();Sfe();om();cB();IB.peek=IHe});function yfe(e,t,n,o){return n.safe(e.value,o)}var Rfe=E(()=>{l()});function Ife(e){let t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}var bfe=E(()=>{l()});function Nfe(e,t,n){let o=(XN(n)+(n.options.ruleSpaces?" ":"")).repeat(Ife(n));return n.options.ruleSpaces?o.slice(0,-1):o}var Ofe=E(()=>{l();bfe();yB()});var Cfe,vfe=E(()=>{l();Ope();vpe();Dpe();Upe();Gpe();Kpe();Zpe();Jpe();Xpe();Qpe();tfe();nfe();cfe();pfe();mfe();Efe();Afe();Rfe();Ofe();Cfe={blockquote:Npe,break:sB,code:wpe,definition:kpe,emphasis:uB,hardBreak:sB,heading:Wpe,html:_B,image:gB,imageReference:hB,inlineCode:EB,link:SB,linkReference:AB,list:afe,listItem:dfe,paragraph:ffe,root:hfe,strong:IB,text:yfe,thematicBreak:Nfe}});function bHe(e,t,n,o){if(t.type==="code"&&pE(t,o)&&(e.type==="list"||e.type===t.type&&pE(e,o)))return!1;if("spread"in n&&typeof n.spread=="boolean")return e.type==="paragraph"&&(e.type===t.type||t.type==="definition"||t.type==="heading"&&ZN(t,o))?void 0:n.spread?1:0}var Pfe,xfe=E(()=>{l();aB();mB();Pfe=[bHe]});var Fl,Mfe,Lfe=E(()=>{l();Fl=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],Mfe=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
|
|
405
|
+
`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:Fl},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
|
|
406
|
+
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:Fl},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
|
|
407
|
+
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:Fl},{atBreak:!0,character:"+",after:`(?:[ \r
|
|
408
|
+
])`},{atBreak:!0,character:"-",after:`(?:[ \r
|
|
409
|
+
-])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
|
|
410
|
+
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:Fl},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:Fl},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:Fl},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:Fl},{atBreak:!0,character:"~"}]});function wfe(e){return e.label||!e.identifier?e.label||"":FN(e.identifier)}var Dfe=E(()=>{l();eB()});function kfe(e){if(!e._compiled){let t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}var Ufe=E(()=>{l()});function $fe(e,t,n){let o=t.indexStack,r=e.children||[],i=[],s=-1,a=n.before,c;o.push(-1);let u=t.createTracker(n);for(;++s<r.length;){let d=r[s],p;if(o[o.length-1]=s,s+1<r.length){let _=t.handle.handlers[r[s+1].type];_&&_.peek&&(_=_.peek),p=_?_(r[s+1],e,t,{before:"",after:"",...u.current()}).charAt(0):""}else p=n.after;i.length>0&&(a==="\r"||a===`
|
|
411
|
+
`)&&d.type==="html"&&(i[i.length-1]=i[i.length-1].replace(/(\r?\n|\r)$/," "),a=" ",u=t.createTracker(n),u.move(i.join("")));let f=t.handle(d,e,t,{...u.current(),after:p,before:a});c&&c===f.slice(0,1)&&(f=co(c.charCodeAt(0))+f.slice(1));let m=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,c=void 0,m&&(i.length>0&&m.before&&a===i[i.length-1].slice(-1)&&(i[i.length-1]=i[i.length-1].slice(0,-1)+co(a.charCodeAt(0))),m.after&&(c=p)),u.move(f),i.push(f),a=f.slice(-1)}return o.pop(),i.join("")}var Bfe=E(()=>{l();om()});function Gfe(e,t,n){let o=t.indexStack,r=e.children||[],i=t.createTracker(n),s=[],a=-1;for(o.push(-1);++a<r.length;){let c=r[a];o[o.length-1]=a,s.push(i.move(t.handle(c,e,t,{before:`
|
|
412
|
+
`,after:`
|
|
413
|
+
`,...i.current()}))),c.type!=="list"&&(t.bulletLastUsed=void 0),a<r.length-1&&s.push(i.move(NHe(c,r[a+1],e,t)))}return o.pop(),s.join("")}function NHe(e,t,n,o){let r=o.join.length;for(;r--;){let i=o.join[r](e,t,n,o);if(i===!0||i===1)break;if(typeof i=="number")return`
|
|
414
|
+
`.repeat(1+i);if(i===!1)return`
|
|
415
|
+
|
|
416
|
+
<!---->
|
|
417
|
+
|
|
418
|
+
`}return`
|
|
419
|
+
|
|
420
|
+
`}var jfe=E(()=>{l()});function Vfe(e,t){let n=[],o=0,r=0,i;for(;i=OHe.exec(e);)s(e.slice(o,i.index)),n.push(i[0]),o=i.index+i[0].length,r++;return s(e.slice(o)),n.join("");function s(a){n.push(t(a,r,!a))}}var OHe,Ffe=E(()=>{l();OHe=/\r?\n|\r/g});function zfe(e,t,n){let o=(n.before||"")+(t||"")+(n.after||""),r=[],i=[],s={},a=-1;for(;++a<e.unsafe.length;){let d=e.unsafe[a];if(!zN(e.stack,d))continue;let p=e.compilePattern(d),f;for(;f=p.exec(o);){let m="before"in d||!!d.atBreak,_="after"in d,h=f.index+(m?f[1].length:0);r.includes(h)?(s[h].before&&!m&&(s[h].before=!1),s[h].after&&!_&&(s[h].after=!1)):(r.push(h),s[h]={before:m,after:_})}}r.sort(CHe);let c=n.before?n.before.length:0,u=o.length-(n.after?n.after.length:0);for(a=-1;++a<r.length;){let d=r[a];d<c||d>=u||d+1<u&&r[a+1]===d+1&&s[d].after&&!s[d+1].before&&!s[d+1].after||r[a-1]===d-1&&s[d].before&&!s[d-1].before&&!s[d-1].after||(c!==d&&i.push(Hfe(o.slice(c,d),"\\")),c=d,/[!-/:-@[-`{-~]/.test(o.charAt(d))&&(!n.encode||!n.encode.includes(o.charAt(d)))?i.push("\\"):(i.push(co(o.charCodeAt(d))),c++))}return i.push(Hfe(o.slice(c,u),n.after)),i.join("")}function CHe(e,t){return e-t}function Hfe(e,t){let n=/\\(?=[!-/:-@[-`{-~])/g,o=[],r=[],i=e+t,s=-1,a=0,c;for(;c=n.exec(i);)o.push(c.index);for(;++s<o.length;)a!==o[s]&&r.push(e.slice(a,o[s])),r.push("\\"),a=o[s];return r.push(e.slice(a)),r.join("")}var qfe=E(()=>{l();om();iB()});function Yfe(e){let t=e||{},n=t.now||{},o=t.lineShift||0,r=n.line||1,i=n.column||1;return{move:c,current:s,shift:a};function s(){return{now:{line:r,column:i},lineShift:o}}function a(u){o+=u}function c(u){let d=u||"",p=d.split(/\r?\n|\r/g),f=p[p.length-1];return r+=p.length-1,i=p.length===1?i+f.length:1+f.length+o,d}}var Wfe=E(()=>{l()});function bB(e,t){let n=t||{},o={associationId:wfe,containerPhrasing:MHe,containerFlow:LHe,createTracker:Yfe,compilePattern:kfe,enter:i,handlers:{...Cfe},handle:void 0,indentLines:Vfe,indexStack:[],join:[...Pfe],options:{},safe:wHe,stack:[],unsafe:[...Mfe]};oB(o,n),o.options.tightDefinitions&&o.join.push(xHe),o.handle=ype("type",{invalid:vHe,unknown:PHe,handlers:o.handlers});let r=o.handle(e,void 0,o,{before:`
|
|
421
|
+
`,after:`
|
|
422
|
+
`,now:{line:1,column:1},lineShift:0});return r&&r.charCodeAt(r.length-1)!==10&&r.charCodeAt(r.length-1)!==13&&(r+=`
|
|
423
|
+
`),r;function i(s){return o.stack.push(s),a;function a(){o.stack.pop()}}}function vHe(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function PHe(e){let t=e;throw new Error("Cannot handle unknown node `"+t.type+"`")}function xHe(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function MHe(e,t){return $fe(e,this,t)}function LHe(e,t){return Gfe(e,this,t)}function wHe(e,t){return zfe(this,e,t)}var Kfe=E(()=>{l();Rpe();bpe();vfe();xfe();Lfe();Dfe();Ufe();Bfe();jfe();Ffe();qfe();Wfe()});var Zfe=E(()=>{l();Kfe()});function QN(e){let t=this;t.compiler=n;function n(o){return bB(o,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}}var Jfe=E(()=>{l();Zfe()});var Xfe=E(()=>{l();Jfe()});function NB(e){if(e)throw e}var Qfe=E(()=>{l()});var cme=A((zkt,ame)=>{"use strict";l();var eO=Object.prototype.hasOwnProperty,sme=Object.prototype.toString,eme=Object.defineProperty,tme=Object.getOwnPropertyDescriptor,nme=function(t){return typeof Array.isArray=="function"?Array.isArray(t):sme.call(t)==="[object Array]"},rme=function(t){if(!t||sme.call(t)!=="[object Object]")return!1;var n=eO.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&eO.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!o)return!1;var r;for(r in t);return typeof r>"u"||eO.call(t,r)},ome=function(t,n){eme&&n.name==="__proto__"?eme(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},ime=function(t,n){if(n==="__proto__")if(eO.call(t,n)){if(tme)return tme(t,n).value}else return;return t[n]};ame.exports=function e(){var t,n,o,r,i,s,a=arguments[0],c=1,u=arguments.length,d=!1;for(typeof a=="boolean"&&(d=a,a=arguments[1]||{},c=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});c<u;++c)if(t=arguments[c],t!=null)for(n in t)o=ime(a,n),r=ime(t,n),a!==r&&(d&&r&&(rme(r)||(i=nme(r)))?(i?(i=!1,s=o&&nme(o)?o:[]):s=o&&rme(o)?o:{},ome(a,{name:n,newValue:e(d,s,r)})):typeof r<"u"&&ome(a,{name:n,newValue:r}));return a}});function fE(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var ume=E(()=>{l()});function OB(){let e=[],t={run:n,use:o};return t;function n(...r){let i=-1,s=r.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...r);function a(c,...u){let d=e[++i],p=-1;if(c){s(c);return}for(;++p<r.length;)(u[p]===null||u[p]===void 0)&&(u[p]=r[p]);r=u,d?lme(d,a)(...u):s(null,...u)}}function o(r){if(typeof r!="function")throw new TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}}function lme(e,t){let n;return o;function o(...s){let a=e.length>s.length,c;a&&s.push(r);try{c=e.apply(this,s)}catch(u){let d=u;if(a&&n)throw d;return r(d)}a||(c&&c.then&&typeof c.then=="function"?c.then(i,r):c instanceof Error?r(c):i(c))}function r(s,...a){n||(n=!0,t(s,...a))}function i(s){r(null,s)}}var dme=E(()=>{l()});var pme=E(()=>{l();dme()});var En,fme=E(()=>{l();nB();En=class extends Error{constructor(t,n,o){super(),typeof n=="string"&&(o=n,n=void 0);let r="",i={},s=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?r=t:!i.cause&&t&&(s=!0,r=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof o=="string"){let c=o.indexOf(":");c===-1?i.ruleId=o:(i.source=o.slice(0,c),i.ruleId=o.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){let c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}let a=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=a?a.line:void 0,this.name=jc(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};En.prototype.file="";En.prototype.name="";En.prototype.reason="";En.prototype.message="";En.prototype.stack="";En.prototype.column=void 0;En.prototype.line=void 0;En.prototype.ancestors=void 0;En.prototype.cause=void 0;En.prototype.fatal=void 0;En.prototype.place=void 0;En.prototype.ruleId=void 0;En.prototype.source=void 0});var mme=E(()=>{l();fme()});var jo,_me=E(()=>{l();jo=U(require("node:path"),1)});var CB,gme=E(()=>{l();CB=U(require("node:process"),1)});function tO(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}var hme=E(()=>{l()});var vB,Eme=E(()=>{l();vB=require("node:url");hme()});function xB(e,t){if(e&&e.includes(jo.default.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+jo.default.sep+"`")}function MB(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Tme(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function DHe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var PB,mE,Sme=E(()=>{l();mme();_me();gme();Eme();PB=["history","path","basename","stem","extname","dirname"],mE=class{constructor(t){let n;t?tO(t)?n={path:t}:typeof t=="string"||DHe(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":CB.default.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<PB.length;){let i=PB[o];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let r;for(r in n)PB.includes(r)||(this[r]=n[r])}get basename(){return typeof this.path=="string"?jo.default.basename(this.path):void 0}set basename(t){MB(t,"basename"),xB(t,"basename"),this.path=jo.default.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?jo.default.dirname(this.path):void 0}set dirname(t){Tme(this.basename,"dirname"),this.path=jo.default.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?jo.default.extname(this.path):void 0}set extname(t){if(xB(t,"extname"),Tme(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=jo.default.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){tO(t)&&(t=(0,vB.fileURLToPath)(t)),MB(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?jo.default.basename(this.path,this.extname):void 0}set stem(t){MB(t,"stem"),xB(t,"stem"),this.path=jo.default.join(this.dirname||"",t+(this.extname||""))}fail(t,n,o){let r=this.message(t,n,o);throw r.fatal=!0,r}info(t,n,o){let r=this.message(t,n,o);return r.fatal=void 0,r}message(t,n,o){let r=new En(t,n,o);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}});var Ame=E(()=>{l();Sme()});var yme,Rme=E(()=>{l();yme=(function(e){let o=this.constructor.prototype,r=o[e],i=function(){return r.apply(i,arguments)};return Object.setPrototypeOf(i,o),i})});function LB(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function wB(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function DB(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ime(e){if(!fE(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function bme(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function nO(e){return UHe(e)?e:new mE(e)}function UHe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function $He(e){return typeof e=="string"||BHe(e)}function BHe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var rO,kHe,kB,UB,Nme=E(()=>{l();Qfe();rO=U(cme(),1);ume();pme();Ame();Rme();kHe={}.hasOwnProperty,kB=class e extends yme{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=OB()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let o=this.attachers[n];t.use(...o)}return t.data((0,rO.default)(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(DB("data",this.frozen),this.namespace[t]=n,this):kHe.call(this.namespace,t)&&this.namespace[t]||void 0:t?(DB("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;let t=this;for(;++this.freezeIndex<this.attachers.length;){let[n,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);let r=n.call(t,...o);typeof r=="function"&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();let n=nO(t),o=this.parser||this.Parser;return LB("parse",o),o(String(n),n)}process(t,n){let o=this;return this.freeze(),LB("process",this.parser||this.Parser),wB("process",this.compiler||this.Compiler),n?r(void 0,n):new Promise(r);function r(i,s){let a=nO(t),c=o.parse(a);o.run(c,a,function(d,p,f){if(d||!p||!f)return u(d);let m=p,_=o.stringify(m,f);$He(_)?f.value=_:f.result=_,u(d,f)});function u(d,p){d||!p?s(d):i?i(p):n(void 0,p)}}}processSync(t){let n=!1,o;return this.freeze(),LB("processSync",this.parser||this.Parser),wB("processSync",this.compiler||this.Compiler),this.process(t,r),bme("processSync","process",n),o;function r(i,s){n=!0,NB(i),o=s}}run(t,n,o){Ime(t),this.freeze();let r=this.transformers;return!o&&typeof n=="function"&&(o=n,n=void 0),o?i(void 0,o):new Promise(i);function i(s,a){let c=nO(n);r.run(t,c,u);function u(d,p,f){let m=p||t;d?a(d):s?s(m):o(void 0,m,f)}}}runSync(t,n){let o=!1,r;return this.run(t,n,i),bme("runSync","run",o),r;function i(s,a){NB(s),r=a,o=!0}}stringify(t,n){this.freeze();let o=nO(n),r=this.compiler||this.Compiler;return wB("stringify",r),Ime(t),r(t,o)}use(t,...n){let o=this.attachers,r=this.namespace;if(DB("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){let[d,...p]=u;c(d,p)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(u.plugins),u.settings&&(r.settings=(0,rO.default)(!0,r.settings,u.settings))}function a(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){let p=u[d];i(p)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,d){let p=-1,f=-1;for(;++p<o.length;)if(o[p][0]===u){f=p;break}if(f===-1)o.push([u,...d]);else if(d.length>0){let[m,..._]=d,h=o[f][1];fE(h)&&fE(m)&&(m=(0,rO.default)(!0,h,m)),o[f]=[u,m,..._]}}}},UB=new kB().freeze()});var Ome=E(()=>{l();Nme()});var oO,$B=E(()=>{l();Spe();Xfe();Ome();oO=UB().use(HN).use(QN).freeze()});function Hl(e){return GHe.stringify(e)}function iO(e){return e.replace(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g,"\uFFFD")}function wn(e){return iO(e).replace(/\s*\n\s*/g," ").trim()}function cm(e,t){return{type:"heading",depth:e,children:[Vo(t)]}}function Cme(e){return{type:"paragraph",children:[Vo(e)]}}function zl(e){return{type:"list",ordered:!1,spread:!1,children:e}}function vme(...e){return{type:"listItem",spread:!1,children:e}}function sO(e){return vme(Cme(e))}function Ta(...e){return vme({type:"paragraph",children:e})}function Vo(e){return{type:"text",value:e}}function _E(e){return{type:"strong",children:[Vo(e)]}}function ql(...e){return{type:"root",children:e}}var GHe,Yl=E(()=>{"use strict";l();$B();GHe=oO()});function hE(e){return`${e.priorObservations?`Previous observations (do NOT repeat these \u2014 your new observations will be appended):
|
|
424
|
+
${e.priorObservations}
|
|
425
|
+
|
|
426
|
+
---`:"This is the beginning of the session."}
|
|
427
|
+
|
|
428
|
+
Session date: ${e.date}
|
|
429
|
+
|
|
430
|
+
Conversation to observe:
|
|
431
|
+
|
|
432
|
+
${e.messages}
|
|
433
|
+
|
|
434
|
+
Extract new observations. Output ONLY an <observations> block.`}function GB(e,t){let n=e.map((o,r)=>`Segment ${r+1}:
|
|
435
|
+
${o.observations}`);return t?`Update the anchored meta-summary below using the NEW observation segments. Preserve still-true details, remove stale details, and merge in new facts. Keep the same section headings.
|
|
436
|
+
|
|
437
|
+
<previous-meta-summary>
|
|
438
|
+
${t}
|
|
439
|
+
</previous-meta-summary>
|
|
440
|
+
|
|
441
|
+
---
|
|
442
|
+
|
|
443
|
+
New observation segments to merge (chronological order):
|
|
444
|
+
|
|
445
|
+
${n.join(`
|
|
446
|
+
|
|
447
|
+
---
|
|
448
|
+
|
|
449
|
+
`)}`:`Observation segments to consolidate (chronological order):
|
|
450
|
+
|
|
451
|
+
${n.join(`
|
|
452
|
+
|
|
453
|
+
---
|
|
454
|
+
|
|
455
|
+
`)}`}function VB(e){let t=e.existing.length;return`${t?`Existing knowledge entries (${t} total \u2014 you may update or delete these):
|
|
456
|
+
${e.existing.map(o=>`- [${o.id}] (${o.category}) ${o.title}: ${o.content}`).join(`
|
|
457
|
+
`)}`:"No existing knowledge entries."}
|
|
458
|
+
|
|
459
|
+
---
|
|
460
|
+
Recent conversation to extract knowledge from:
|
|
461
|
+
|
|
462
|
+
${e.messages}
|
|
463
|
+
|
|
464
|
+
---
|
|
465
|
+
IMPORTANT:
|
|
466
|
+
1. Prefer updating existing entries over creating new ones. If a new insight refines or
|
|
467
|
+
extends an existing entry on the same topic, update that entry \u2014 don't create a new one.
|
|
468
|
+
2. When updating, REPLACE the content with a complete rewrite \u2014 never append.
|
|
469
|
+
3. If entries cover the same system from different angles, merge them: update one, delete the rest.
|
|
470
|
+
4. Only create a new entry for genuinely distinct knowledge with no existing home.
|
|
471
|
+
5. Keep all entries under 150 words. If an existing entry is too long, use an update op to trim it.`}function HB(e){let t=e.entries.length,n=e.entries.map(o=>`- [${o.id}] (${o.category}) ${o.title}: ${o.content}`).join(`
|
|
472
|
+
`);return`Current knowledge entries (${t} total, target max: ${e.targetMax}):
|
|
473
|
+
|
|
474
|
+
${n}
|
|
475
|
+
|
|
476
|
+
Produce update/delete ops to reduce entry count to at most ${e.targetMax}. Prioritize merging related entries and trimming verbose ones over outright deletion.`}function EE(e){if(!e.length)return"";let t=e.filter(r=>r.generation>0),n=e.filter(r=>r.generation===0),o=["## Session History"];if(t.length){o.push("### Earlier Work (summarized)");for(let r of t)o.push(r.observations.trim())}if(n.length){o.push("### Recent Work (distilled)");for(let r of n)o.push(r.observations.trim())}return o.join(`
|
|
477
|
+
|
|
478
|
+
`)}function zB(e){let t=e.hasDistillations?`Lore has pre-computed chunked summaries of the session history (injected above as context). Use them as the authoritative source \u2014 do NOT re-read raw conversation messages that conflict with them.
|
|
479
|
+
|
|
480
|
+
`:"",n=e.previousSummary?`A prior compacted summary exists for this session. Update it using the conversation history above: preserve still-true details, remove stale details, and merge in new facts. Keep every section in place.
|
|
481
|
+
|
|
482
|
+
<previous-summary>
|
|
483
|
+
${e.previousSummary}
|
|
484
|
+
</previous-summary>
|
|
485
|
+
|
|
486
|
+
`:"",o=e.knowledge?`
|
|
487
|
+
${e.knowledge}
|
|
488
|
+
`:"";return`You are producing a compacted session summary for an AI coding agent. This summary will be the ONLY context available in the next part of the conversation.
|
|
489
|
+
|
|
490
|
+
${t}${n}${Pme}
|
|
491
|
+
${o}`}function jHe(e){return Math.ceil(e.length/3)}function aO(e,t){if(!e.length)return"";let n=e;if(t!==void 0){let s=50,a=[];for(let c of e){let u=jHe(c.title+c.content)+10;s+u>t||(a.push(c),s+=u)}if(n=a,!n.length)return""}let o={};for(let i of n)(o[i.category]??(o[i.category]=[])).push(i);let r=[cm(2,"Long-term Knowledge")];for(let[i,s]of Object.entries(o))r.push(cm(3,i.charAt(0).toUpperCase()+i.slice(1))),r.push(zl(s.map(a=>Ta(_E(wn(a.title)),Vo(": "+wn(a.content))))));return Hl(ql(...r))}var gE,BB,jB,FB,Pme,qB,Wl=E(()=>{"use strict";l();Yl();gE=`You are a memory observer. Your observations will be the ONLY information an AI assistant has about past interactions. Produce a dense, dated event log \u2014 not a summary.
|
|
492
|
+
|
|
493
|
+
CRITICAL: DISTINGUISH USER ASSERTIONS FROM QUESTIONS
|
|
494
|
+
|
|
495
|
+
When the user TELLS you something about themselves, mark it as an assertion (\u{1F534}):
|
|
496
|
+
- "I have two kids" \u2192 \u{1F534} (14:30) User stated has two kids
|
|
497
|
+
- "I work at Acme Corp" \u2192 \u{1F534} (14:31) User stated works at Acme Corp
|
|
498
|
+
|
|
499
|
+
When the user ASKS about something, mark it as a question (\u{1F7E1}):
|
|
500
|
+
- "Can you help me with X?" \u2192 \u{1F7E1} (15:00) User asked for help with X
|
|
501
|
+
|
|
502
|
+
User assertions are AUTHORITATIVE \u2014 the user is the source of truth about their own life.
|
|
503
|
+
|
|
504
|
+
TEMPORAL ANCHORING \u2014 CRITICAL FOR TEMPORAL REASONING:
|
|
505
|
+
|
|
506
|
+
Each observation has up to two timestamps:
|
|
507
|
+
1. BEGINNING: The time the statement was made \u2014 ALWAYS include this as (HH:MM)
|
|
508
|
+
2. END: The referenced date, if the content refers to a different time \u2014 add as "(meaning DATE)" or "(estimated DATE)"
|
|
509
|
+
|
|
510
|
+
ONLY add "(meaning DATE)" when you can derive an actual date:
|
|
511
|
+
- "last week", "yesterday", "next month" \u2192 compute and add the date
|
|
512
|
+
- "recently", "a while ago", "soon" \u2192 too vague, omit the end date
|
|
513
|
+
|
|
514
|
+
ALWAYS put the date annotation at the END of the observation line.
|
|
515
|
+
|
|
516
|
+
GOOD: (09:15) User will visit parents this weekend. (meaning Jun 17-18, 2025)
|
|
517
|
+
GOOD: (09:15) User's friend had a birthday party last month. (estimated May 2025)
|
|
518
|
+
GOOD: (09:15) User prefers hiking in the mountains.
|
|
519
|
+
BAD: (09:15) User prefers hiking. (meaning Jun 15, 2025) \u2190 no time reference, don't add date
|
|
520
|
+
|
|
521
|
+
If an observation contains MULTIPLE events, split into SEPARATE lines, each with its own date.
|
|
522
|
+
|
|
523
|
+
STATE CHANGES \u2014 make supersession explicit:
|
|
524
|
+
- "User will use X (replacing Y)" \u2014 not just "User will use X"
|
|
525
|
+
- "User moved to Berlin (no longer in London)"
|
|
526
|
+
|
|
527
|
+
DETAILS TO ALWAYS PRESERVE:
|
|
528
|
+
- Names, handles, usernames (@username, "Dr. Smith")
|
|
529
|
+
- Numbers, counts, quantities (4 items, 3 sessions, $120)
|
|
530
|
+
- Measurements, percentages (5kg, 20% improvement, 85% accuracy)
|
|
531
|
+
- Sequences and orderings (steps 1-5, lucky numbers: 7 14 23)
|
|
532
|
+
- Prices, dates, times, durations
|
|
533
|
+
- Locations and distinguishing attributes
|
|
534
|
+
- User's specific role (presenter, volunteer, organizer \u2014 not just "attended")
|
|
535
|
+
- Exact phrasing when unusual ("movement session" for exercise)
|
|
536
|
+
|
|
537
|
+
EXACT NUMBERS \u2014 NEVER APPROXIMATE:
|
|
538
|
+
|
|
539
|
+
When the conversation states a specific count, record that EXACT number \u2014 do not round, estimate, or substitute a count you see later. If the same quantity appears with different values at different times, record each with its timestamp.
|
|
540
|
+
|
|
541
|
+
BAD: All existing entries bulk-updated to cross_project=1 (50 entries) \u2190 wrong: mixed up with a later count
|
|
542
|
+
GOOD: 43 knowledge entries bulk-updated to cross_project=1 via SQL UPDATE \u2190 exact number from the operation
|
|
543
|
+
|
|
544
|
+
BAD: ~130 test failures
|
|
545
|
+
GOOD: 131 test failures (1902 pass, 131 fail, 1 error across 100 files) \u2190 preserve exact counts
|
|
546
|
+
|
|
547
|
+
BUG FIXES AND CODE CHANGES \u2014 HIGH PRIORITY:
|
|
548
|
+
|
|
549
|
+
Every bug fix, code change, or technical decision is important regardless of where it appears in the conversation. Early-session fixes are just as valuable as later ones.
|
|
550
|
+
|
|
551
|
+
For each fix, record:
|
|
552
|
+
- The specific bug/problem (what went wrong)
|
|
553
|
+
- The root cause (why it went wrong)
|
|
554
|
+
- The fix applied (what changed, with file paths and line numbers)
|
|
555
|
+
- The outcome (tests pass, deployed, etc.)
|
|
556
|
+
|
|
557
|
+
BAD: \u{1F7E1} Fixed an FTS5 search bug
|
|
558
|
+
GOOD: \u{1F7E1} FTS5 was doing exact term matching instead of prefix matching in ltm.ts. Fix: added ftsQuery() function that appends * to each search term for prefix matching. Committed as [hash].
|
|
559
|
+
|
|
560
|
+
ASSISTANT-GENERATED CONTENT \u2014 THIS IS CRITICAL:
|
|
561
|
+
|
|
562
|
+
When the assistant produces lists, recommendations, explanations, recipes, schedules, creative content, or any structured output \u2014 record EVERY ITEM with its distinguishing details. The user WILL ask about specific items later.
|
|
563
|
+
|
|
564
|
+
BAD: \u{1F7E1} Assistant recommended 5 dessert spots in Orlando.
|
|
565
|
+
GOOD: \u{1F7E1} Assistant recommended dessert spots: Sugar Factory (Icon Park, giant milkshakes), Wondermade (Sanford, gourmet marshmallows), Gideon's Bakehouse (Disney Springs, cookies), Farris & Foster's (unique flavors), Kilwins (handmade fudge)
|
|
566
|
+
|
|
567
|
+
BAD: \u{1F7E1} Assistant listed work-from-home jobs for seniors.
|
|
568
|
+
GOOD: \u{1F7E1} Assistant listed 10 WFH jobs for seniors: 1. Virtual assistant, 2. Online tutor, 3. Freelance writer, 4. Social media manager, 5. Customer service rep, 6. Bookkeeper, 7. Transcriptionist, 8. Web designer, 9. Data entry, 10. Consultant
|
|
569
|
+
|
|
570
|
+
BAD: \u{1F7E1} Assistant explained refining processes.
|
|
571
|
+
GOOD: \u{1F7E1} Assistant explained Lake Charles refinery processes: atmospheric distillation, fluid catalytic cracking (FCC), alkylation, hydrotreating
|
|
572
|
+
|
|
573
|
+
Rules for assistant content:
|
|
574
|
+
- Record EACH item in a list with at least one distinguishing attribute
|
|
575
|
+
- For numbered lists, preserve the EXACT ordering (1st, 2nd, 3rd...)
|
|
576
|
+
- For recipes: preserve specific quantities, ratios, temperatures, times
|
|
577
|
+
- For recommendations: preserve names, locations, prices, key features
|
|
578
|
+
- For creative content (songs, stories, poems): preserve titles, key phrases, character names, structural details
|
|
579
|
+
- For technical explanations: preserve specific values, percentages, formulas, tool/library names
|
|
580
|
+
- Ordered lists must keep their numbering \u2014 users ask "what was the 7th item?"
|
|
581
|
+
- Use \u{1F7E1} priority but NEVER skip assistant-generated details to save space
|
|
582
|
+
|
|
583
|
+
ENUMERATABLE ENTITIES \u2014 always flag for cross-session aggregation:
|
|
584
|
+
When the user mentions attending events, buying things, meeting people, completing tasks \u2014 mark with entity type so these can be aggregated across sessions:
|
|
585
|
+
\u{1F534} [event-attended] User attended Rachel+Mike's wedding (vineyard in Napa, Aug 12, 2023)
|
|
586
|
+
\u{1F534} [item-purchased] User bought Sony WH-1000XM5 headphones ($280, replaced old Bose)
|
|
587
|
+
This makes it possible to answer "how many weddings did I attend?" by aggregating across sessions.
|
|
588
|
+
|
|
589
|
+
PRIORITY LEVELS:
|
|
590
|
+
- \u{1F534} High: user assertions, stated facts, preferences, goals, enumeratable entities
|
|
591
|
+
- \u{1F7E1} Medium: questions asked, context, assistant-generated content with full detail
|
|
592
|
+
- \u{1F7E2} Low: minor conversational context, greetings, acknowledgments
|
|
593
|
+
|
|
594
|
+
OUTPUT FORMAT \u2014 output ONLY observations, no preamble:
|
|
595
|
+
|
|
596
|
+
<observations>
|
|
597
|
+
Date: Jan 15, 2026
|
|
598
|
+
* \u{1F534} (09:15) User stated has two kids: Emma (12) and Jake (9)
|
|
599
|
+
* \u{1F534} (09:16) User's anniversary is March 15
|
|
600
|
+
* \u{1F7E1} (09:20) User asked how to optimize database queries
|
|
601
|
+
* \u{1F534} [event-attended] (10:00) User attended company holiday party as a presenter (gave talk on microservices)
|
|
602
|
+
* \u{1F534} (11:30) User will visit parents this weekend. (meaning Jan 17-18, 2026)
|
|
603
|
+
* \u{1F7E1} (14:00) Agent debugging auth issue \u2014 found missing null check in auth.ts:45, applied fix, tests pass
|
|
604
|
+
* \u{1F7E1} (14:30) Assistant recommended 5 hotels: 1. Grand Plaza (near station, $180), 2. Seaside Inn (pet-friendly, $120), 3. Mountain Lodge (pool, free breakfast, $95), 4. Harbor View (historic, walkable, $150), 5. Zen Garden (quietest, spa, $200)
|
|
605
|
+
* \u{1F534} (15:00) User switched from Python to TypeScript for the project (no longer using Python)
|
|
606
|
+
</observations>`;BB=`You are a memory reflector. You are given a set of observations from multiple conversation segments. Your job is to consolidate them into a structured working context that will become the agent's entire memory going forward.
|
|
607
|
+
|
|
608
|
+
IMPORTANT: Your reflections ARE the entirety of the assistant's memory. Any information you omit is permanently forgotten. Do not leave out anything important.
|
|
609
|
+
|
|
610
|
+
STRUCTURE your output into these sections \u2014 each section supports a different type of downstream query:
|
|
611
|
+
|
|
612
|
+
### Current State
|
|
613
|
+
What is in progress right now? Active branches, open files, current task, blockers.
|
|
614
|
+
This section answers: "What was I working on?"
|
|
615
|
+
|
|
616
|
+
### Key Decisions
|
|
617
|
+
What was decided and why? Include the alternatives considered and rationale.
|
|
618
|
+
This section answers: "Why did we choose approach X?" and "What alternatives were rejected?"
|
|
619
|
+
|
|
620
|
+
### Technical Changes
|
|
621
|
+
Bugs found, root causes, fixes applied, files modified, tests added/fixed.
|
|
622
|
+
Preserve exact file paths, line numbers, error messages, and commit references.
|
|
623
|
+
This section answers: "What bugs were fixed?" and "What files were changed?"
|
|
624
|
+
|
|
625
|
+
### Session Timeline
|
|
626
|
+
Condensed chronological events with timestamps. Older events compressed more aggressively; recent events retain detail. This section answers: "When did X happen?" and "What was the sequence of events?"
|
|
627
|
+
|
|
628
|
+
CONSOLIDATION RULES:
|
|
629
|
+
- Preserve ALL dates and timestamps \u2014 temporal context is critical
|
|
630
|
+
- Combine related items (e.g., "agent called view tool 5 times on file x" \u2192 single line)
|
|
631
|
+
- Merge duplicate facts, keeping the most specific version
|
|
632
|
+
- Drop observations superseded by later info (if value changed, keep only final value)
|
|
633
|
+
- When consolidating, USER ASSERTIONS take precedence over questions about the same topic
|
|
634
|
+
- Preserve all enumeratable entities [entity-type] \u2014 these are needed for aggregation questions
|
|
635
|
+
- For enumeratable entities spanning multiple segments, create an explicit aggregation:
|
|
636
|
+
\u{1F534} [event-attended] User attended 3 weddings total: Rachel+Mike (vineyard, Aug 2023), Emily+Sarah (garden, Sep 2023), Jen+Tom (Oct 8, 2023)
|
|
637
|
+
|
|
638
|
+
EXACT NUMBERS: When two segments report different numbers for what seems like the same thing, keep the number from the earlier/original observation \u2014 it's likely the correct one from the actual event. Later references may be from memory or approximation.
|
|
639
|
+
|
|
640
|
+
EARLY-SESSION CONTENT: Bug fixes, code changes, and decisions from the start of a session are just as important as later work. Never drop them just because the segment is short or old. If the first segment contains a specific bug fix with file paths and root cause, it MUST survive into the reflection.
|
|
641
|
+
|
|
642
|
+
ANCHORED UPDATES: If the prompt includes a <previous-meta-summary> block, treat it as the current consolidated state. Update it using the NEW observation segments \u2014 preserve still-true details, remove stale details, and merge in new facts. Keep the same section headings. Do NOT re-derive unchanged sections verbatim unless the new segments contradict them.
|
|
643
|
+
|
|
644
|
+
Output ONLY an <observations> block with the consolidated observations.`;jB=`You are a long-term memory curator. Your job is to extract durable knowledge from a conversation that should persist across sessions.
|
|
645
|
+
|
|
646
|
+
Focus ONLY on knowledge that helps a coding agent work effectively on THIS codebase:
|
|
647
|
+
- Architectural decisions and their rationale (why something was built a certain way)
|
|
648
|
+
- Non-obvious implementation patterns and conventions specific to the project
|
|
649
|
+
- Recurring gotchas, constraints, or traps in the codebase
|
|
650
|
+
- Environment/tooling setup details that affect development
|
|
651
|
+
- Important relationships between components that aren't obvious from reading the code
|
|
652
|
+
- User preferences and working style specific to how they use this project
|
|
653
|
+
|
|
654
|
+
Do NOT extract:
|
|
655
|
+
- Task-specific details (file currently being edited, current bug being fixed)
|
|
656
|
+
- Temporary state (current branch, in-progress work)
|
|
657
|
+
- Information that will change frequently
|
|
658
|
+
- Ecosystem descriptions, product announcements, or marketing content
|
|
659
|
+
- Business strategy, roadmap, or organizational information
|
|
660
|
+
- Information that's readily available in public documentation or READMEs
|
|
661
|
+
- Knowledge about unrelated projects or repositories unless explicitly cross-project
|
|
662
|
+
- Restatements of what the code obviously does (e.g. "the auth module handles authentication")
|
|
663
|
+
|
|
664
|
+
BREVITY IS CRITICAL \u2014 each entry must be concise:
|
|
665
|
+
- content MUST be under 150 words (~600 characters). Capture ONE specific actionable
|
|
666
|
+
insight in 2-3 sentences. Prefer terse technical language.
|
|
667
|
+
- Each "gotcha": one specific trap + its fix in 1-2 sentences
|
|
668
|
+
- Each "architecture": one design decision and its key constraint
|
|
669
|
+
- Focus on the actionable insight, not the full story behind it
|
|
670
|
+
- If a pattern requires more detail, split into multiple focused entries (each under 150 words)
|
|
671
|
+
- Omit code examples unless a single short snippet is essential
|
|
672
|
+
- Never include full file contents, large diffs, or complete command outputs
|
|
673
|
+
|
|
674
|
+
PREFER UPDATES OVER CREATES:
|
|
675
|
+
- Before creating a new entry, always check if an existing entry covers the same system
|
|
676
|
+
or component. Update the existing entry rather than creating a new one.
|
|
677
|
+
- When updating, REPLACE the full content with a concise rewrite \u2014 do not append to
|
|
678
|
+
the existing content or repeat what was already there.
|
|
679
|
+
- If multiple existing entries cover the same system from different angles (e.g. different
|
|
680
|
+
bugs in the same module), consolidate them: update one with merged insights, delete the
|
|
681
|
+
rest. Fewer, denser entries are better than many scattered ones.
|
|
682
|
+
|
|
683
|
+
CROSS-REFERENCES between entries:
|
|
684
|
+
- When an entry relates to another entry, reference it with [[entry-uuid]] using the entry's ID
|
|
685
|
+
from the existing entries list. This creates navigable links between entries.
|
|
686
|
+
- Only reference entries you can see in the existing entries list \u2014 don't guess IDs.
|
|
687
|
+
- Example: "Uses the gradient system [[019c904b-791e-772a-ab2b-93ac892a960c]] for context management."
|
|
688
|
+
|
|
689
|
+
crossProject flag:
|
|
690
|
+
- Default is true \u2014 most useful knowledge is worth sharing across projects
|
|
691
|
+
- Set crossProject to false for things that are meaningless outside this specific repo (e.g. a config path, a project-local naming convention that conflicts with your usual style)
|
|
692
|
+
|
|
693
|
+
Produce a JSON array of operations:
|
|
694
|
+
[
|
|
695
|
+
{
|
|
696
|
+
"op": "create",
|
|
697
|
+
"category": "decision" | "pattern" | "preference" | "architecture" | "gotcha",
|
|
698
|
+
"title": "Short descriptive title",
|
|
699
|
+
"content": "Concise knowledge entry \u2014 under 150 words",
|
|
700
|
+
"scope": "project" | "global",
|
|
701
|
+
"crossProject": true
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
"op": "update",
|
|
705
|
+
"id": "existing-entry-id",
|
|
706
|
+
"content": "Updated content \u2014 under 150 words",
|
|
707
|
+
"confidence": 0.0-1.0
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
"op": "delete",
|
|
711
|
+
"id": "existing-entry-id",
|
|
712
|
+
"reason": "Why this is no longer relevant"
|
|
713
|
+
}
|
|
714
|
+
]
|
|
715
|
+
|
|
716
|
+
If nothing warrants extraction, return an empty array: []
|
|
717
|
+
|
|
718
|
+
Output ONLY valid JSON. No markdown fences, no explanation, no preamble.`;FB=`You are a long-term memory curator performing a consolidation pass. The knowledge base has grown too large and needs to be trimmed.
|
|
719
|
+
|
|
720
|
+
Your goal: reduce the entry count to the target maximum while preserving the most valuable knowledge.
|
|
721
|
+
|
|
722
|
+
CONSOLIDATION RULES:
|
|
723
|
+
1. MERGE related entries \u2014 if multiple entries describe the same system, module, or concept
|
|
724
|
+
from different angles (e.g. several bug fixes in the same component), merge them into
|
|
725
|
+
ONE concise entry. Use an "update" op for the surviving entry and "delete" ops for the rest.
|
|
726
|
+
2. TRIM verbose entries \u2014 any entry over 150 words must be trimmed to its essential insight.
|
|
727
|
+
Use an "update" op with the rewritten content.
|
|
728
|
+
3. DELETE low-value entries:
|
|
729
|
+
- Stale entries about bugs that have been fixed and no longer need gotcha warnings
|
|
730
|
+
- Entries whose knowledge is fully subsumed by another entry
|
|
731
|
+
- Entries about one-off incidents with no recurring applicability
|
|
732
|
+
- General advice available in any documentation
|
|
733
|
+
4. PRESERVE:
|
|
734
|
+
- Entries describing non-obvious design decisions specific to this codebase
|
|
735
|
+
- Entries about recurring traps that a developer would hit again
|
|
736
|
+
- Entries that capture a hard-won gotcha with a concrete fix
|
|
737
|
+
|
|
738
|
+
OUTPUT: A JSON array of "update" and "delete" ops only. No "create" ops \u2014 you are not
|
|
739
|
+
extracting new knowledge, only consolidating existing knowledge.
|
|
740
|
+
|
|
741
|
+
- "update": Replace content with a concise rewrite (under 150 words). Use to merge survivors or trim verbose entries.
|
|
742
|
+
- "delete": Remove entries that are merged, stale, or low-value.
|
|
743
|
+
|
|
744
|
+
Output ONLY valid JSON. No markdown fences, no explanation, no preamble.`;Pme=`Output exactly this Markdown structure. Keep every section in this order, even when empty (use "(none)").
|
|
745
|
+
|
|
746
|
+
---
|
|
747
|
+
## Goal
|
|
748
|
+
- [single-sentence task summary]
|
|
749
|
+
|
|
750
|
+
## Constraints & Preferences
|
|
751
|
+
- [user constraints, preferences, specs, or "(none)"]
|
|
752
|
+
|
|
753
|
+
## Progress
|
|
754
|
+
### Done
|
|
755
|
+
- [completed work or "(none)"]
|
|
756
|
+
|
|
757
|
+
### In Progress
|
|
758
|
+
- [current work or "(none)"]
|
|
759
|
+
|
|
760
|
+
### Blocked
|
|
761
|
+
- [blockers or "(none)"]
|
|
762
|
+
|
|
763
|
+
## Key Decisions
|
|
764
|
+
- [decision and why, or "(none)"]
|
|
765
|
+
|
|
766
|
+
## Next Steps
|
|
767
|
+
- [ordered next actions or "(none)"]
|
|
768
|
+
|
|
769
|
+
## Critical Context
|
|
770
|
+
- [important technical facts, errors, open questions, or "(none)"]
|
|
771
|
+
|
|
772
|
+
## Relevant Files
|
|
773
|
+
- [file or directory path: why it matters, or "(none)"]
|
|
774
|
+
---
|
|
775
|
+
|
|
776
|
+
Rules:
|
|
777
|
+
- Keep every section, even when empty.
|
|
778
|
+
- Use terse bullets, not prose paragraphs.
|
|
779
|
+
- Preserve exact file paths, commands, error strings, and identifiers when known.
|
|
780
|
+
- Do not mention the summary process or that context was compacted.
|
|
781
|
+
- End with "I'm ready to continue." on its own line after the closing "---".`;qB=`You are a search query expander for a code knowledge base. Given a search query, generate 2\u20133 alternative queries that would help find relevant results. Focus on:
|
|
782
|
+
- Synonyms and related technical terms
|
|
783
|
+
- Different phrasings of the same concept
|
|
784
|
+
- Broader or narrower scopes
|
|
785
|
+
|
|
786
|
+
Return ONLY a JSON array of strings. No explanation, no markdown.
|
|
787
|
+
|
|
788
|
+
Example:
|
|
789
|
+
Input: "SQLite FTS5 ranking"
|
|
790
|
+
Output: ["full text search scoring SQLite", "BM25 relevance ranking database", "FTS5 match order by rank"]`});var z={};ht(z,{error:()=>SE,info:()=>ze,registerSink:()=>VHe,warn:()=>um});function VHe(e){TE=e}function YB(e){return e.map(t=>typeof t=="string"?t:t instanceof Error?t.message:String(t)).join(" ")}function FHe(e){for(let t of e)if(t instanceof Error)return t}function ze(...e){xme&&console.error("[lore]",...e),TE?.info(YB(e))}function um(...e){xme&&console.error("[lore] WARN:",...e),TE?.warn(YB(e))}function SE(...e){console.error("[lore]",...e),TE?.error(YB(e));let t=FHe(e);t&&TE?.captureException(t)}var TE,xme,ys=E(()=>{"use strict";l();TE=null;xme=!!process.env.LORE_DEBUG});function AE(e){return e.replace(/[^\w\s]/g," ").split(/\s+/).filter(Boolean).filter(n=>n.length>1&&!Mme.has(n.toLowerCase()))}function Gr(e){let t=AE(e);return t.length?t.map(n=>`${n}*`).join(" "):xt}function Fo(e){let t=AE(e);return t.length?t.map(n=>`${n}*`).join(" OR "):xt}function yE(e,t=40){return[...e.replace(/[^\w\s]/g," ").toLowerCase().split(/\s+/).filter(o=>o.length>1&&!Mme.has(o)).reduce((o,r)=>(o.set(r,(o.get(r)??0)+1),o),new Map).entries()].sort((o,r)=>r[1]-o[1]).slice(0,t).map(([o])=>o)}function WB(e,t=60){let n=new Map;for(let o of e)for(let r=0;r<o.items.length;r++){let i=o.items[r],s=o.key(i),a=1/(t+r),c=n.get(s);c?c.score+=a:n.set(s,{item:i,score:a})}return[...n.values()].sort((o,r)=>r.score-o.score)}function KB(e,t,n){let o=AE(n).map(i=>i.toLowerCase());return o.length?e.map(i=>{let s=t(i).toLowerCase(),a=o.filter(c=>s.includes(c)).length;return{item:i,matches:a}}).filter(i=>i.matches>0).sort((i,s)=>s.matches-i.matches).map(i=>i.item):[]}async function ZB(e,t,n,o){try{let i=await Promise.race([e.prompt(qB,`Input: "${t}"`,{model:n,workerID:"lore-query-expand",thinking:!1,urgent:!0,sessionID:o}),new Promise(u=>setTimeout(()=>u(null),3e3))]);if(!i)return ze("query expansion timed out or failed, using original query"),[t];let s=i.trim().replace(/^```json?\s*/i,"").replace(/\s*```$/i,""),a=JSON.parse(s);if(!Array.isArray(a))return[t];let c=a.filter(u=>typeof u=="string"&&u.trim().length>0);return c.length?[t,...c.slice(0,3)]:[t]}catch(i){return ze("query expansion failed, using original query:",i),[t]}}var Mme,xt,lm=E(()=>{"use strict";l();Wl();ys();Mme=new Set(["an","the","this","that","these","those","some","each","every","he","it","me","my","we","us","or","am","they","them","their","there","here","what","which","where","when","whom","is","be","do","no","so","if","as","at","by","in","of","on","to","up","are","was","has","had","not","but","can","did","for","got","let","may","our","its","nor","yet","how","all","any","too","own","out","why","who","few","have","been","were","will","would","could","should","does","being","also","with","from","into","about","than","over","such","after","before","between","just","only","very","more","most","really","already"]),xt='""'});function Fc(e){return e.type==="text"}function RE(e){return e.type==="reasoning"}function Tr(e){return e.type==="tool"}var cO=E(()=>{"use strict";l()});var jr={};ht(jr,{CHUNK_TERMINATOR:()=>IE,bySession:()=>XB,count:()=>YHe,markDistilled:()=>QB,partsToText:()=>Dme,prune:()=>KHe,search:()=>qHe,searchScored:()=>eG,store:()=>HHe,temporalCnorm:()=>uO,undistilled:()=>JB,undistilledCount:()=>WHe});function Lme(e){return Math.ceil(e.length/3)}function Dme(e){let t=[];for(let n of e)Fc(n)?t.push(n.text):RE(n)&&n.text?t.push(`[reasoning] ${n.text}`):Tr(n)&&n.state.status==="completed"&&t.push(`[tool:${n.tool}] ${n.state.output}`);return iO(t.join(`
|
|
791
|
+
`+IE))}function wme(e,t){let n={};e.role==="user"?(n.agent=e.agent,n.model=e.model):(n.modelID=e.modelID,n.providerID=e.providerID,n.mode=e.mode);let o=t.filter(Tr).map(r=>r.tool);return o.length&&(n.tools=o),JSON.stringify(n)}function HHe(e){let t=Ue(e.projectPath),n=Dme(e.parts);if(!n.trim())return;if(j().query("SELECT id FROM temporal_messages WHERE id = ?").get(e.info.id)){j().query("UPDATE temporal_messages SET content = ?, tokens = ?, metadata = ? WHERE id = ?").run(n,Lme(n),wme(e.info,e.parts),e.info.id);return}j().query(`INSERT INTO temporal_messages (id, project_id, session_id, role, content, tokens, distilled, created_at, metadata)
|
|
792
|
+
VALUES (?, ?, ?, ?, ?, ?, 0, ?, ?)`).run(e.info.id,t,e.info.sessionID,e.info.role,n,Lme(n),e.info.time.created,wme(e.info,e.parts))}function JB(e,t){let n=Ue(e),o=t?"SELECT * FROM temporal_messages WHERE project_id = ? AND session_id = ? AND distilled = 0 ORDER BY created_at ASC":"SELECT * FROM temporal_messages WHERE project_id = ? AND distilled = 0 ORDER BY created_at ASC",r=t?[n,t]:[n];return j().query(o).all(...r)}function XB(e,t){let n=Ue(e);return j().query("SELECT * FROM temporal_messages WHERE project_id = ? AND session_id = ? ORDER BY created_at ASC").all(n,t)}function QB(e){if(!e.length)return;let t=e.map(()=>"?").join(",");j().query(`UPDATE temporal_messages SET distilled = 1 WHERE id IN (${t})`).run(...e)}function zHe(e){let t=e.query.toLowerCase().split(/\s+/).filter(s=>s.length>2);if(!t.length)return[];let n=t.map(()=>"LOWER(content) LIKE ?").join(" AND "),o=t.map(s=>`%${s}%`),r=e.sessionID?`SELECT * FROM temporal_messages WHERE project_id = ? AND session_id = ? AND ${n} ORDER BY created_at DESC LIMIT ?`:`SELECT * FROM temporal_messages WHERE project_id = ? AND ${n} ORDER BY created_at DESC LIMIT ?`,i=e.sessionID?[e.pid,e.sessionID,...o,e.limit]:[e.pid,...o,e.limit];return j().query(r).all(...i)}function qHe(e){let t=Ue(e.projectPath),n=e.limit??20,o=Gr(e.query);if(o===xt)return[];let r=e.sessionID?`SELECT m.* FROM temporal_fts f
|
|
793
|
+
CROSS JOIN temporal_messages m ON m.rowid = f.rowid
|
|
794
|
+
WHERE f.content MATCH ? AND m.project_id = ? AND m.session_id = ?
|
|
795
|
+
ORDER BY rank LIMIT ?`:`SELECT m.* FROM temporal_fts f
|
|
796
|
+
CROSS JOIN temporal_messages m ON m.rowid = f.rowid
|
|
797
|
+
WHERE f.content MATCH ? AND m.project_id = ?
|
|
798
|
+
ORDER BY rank LIMIT ?`,i=e.sessionID?[o,t,e.sessionID,n]:[o,t,n];try{let s=j().query(r).all(...i);if(s.length)return s;let a=Fo(e.query);if(a===xt)return[];let c=e.sessionID?[a,t,e.sessionID,n]:[a,t,n];return j().query(r).all(...c)}catch{return zHe({pid:t,query:e.query,sessionID:e.sessionID,limit:n})}}function eG(e){let t=Ue(e.projectPath),n=e.limit??20,o=Gr(e.query);if(o===xt)return[];let r=e.sessionID?`SELECT m.*, rank FROM temporal_fts f
|
|
799
|
+
CROSS JOIN temporal_messages m ON m.rowid = f.rowid
|
|
800
|
+
WHERE f.content MATCH ? AND m.project_id = ? AND m.session_id = ?
|
|
801
|
+
ORDER BY rank LIMIT ?`:`SELECT m.*, rank FROM temporal_fts f
|
|
802
|
+
CROSS JOIN temporal_messages m ON m.rowid = f.rowid
|
|
803
|
+
WHERE f.content MATCH ? AND m.project_id = ?
|
|
804
|
+
ORDER BY rank LIMIT ?`,i=e.sessionID?[o,t,e.sessionID,n]:[o,t,n];try{let s=j().query(r).all(...i);if(s.length)return s;let a=Fo(e.query);if(a===xt)return[];let c=e.sessionID?[a,t,e.sessionID,n]:[a,t,n];return j().query(r).all(...c)}catch{return[]}}function uO(e,t=Date.now()){let n=e.length;if(n<2)return 0;let o=e.map(u=>t-u),r=o.reduce((u,d)=>u+d,0);if(r<=0)return 0;let i=o.map(u=>u/r),s=1/n,a=i.reduce((u,d)=>u+(d-s)**2,0)/n,c=(n-1)/(n*n);return c===0?0:a/c}function YHe(e,t){let n=Ue(e),o=t?"SELECT COUNT(*) as count FROM temporal_messages WHERE project_id = ? AND session_id = ?":"SELECT COUNT(*) as count FROM temporal_messages WHERE project_id = ?",r=t?[n,t]:[n];return j().query(o).get(...r).count}function WHe(e,t){let n=Ue(e),o=t?"SELECT COUNT(*) as count FROM temporal_messages WHERE project_id = ? AND session_id = ? AND distilled = 0":"SELECT COUNT(*) as count FROM temporal_messages WHERE project_id = ? AND distilled = 0",r=t?[n,t]:[n];return j().query(o).get(...r).count}function KHe(e){let t=j(),n=Ue(e.projectPath),o=Date.now()-e.retentionDays*24*60*60*1e3,r=t.query("SELECT COUNT(*) as c FROM temporal_messages WHERE project_id = ? AND distilled = 1 AND created_at < ?").get(n,o).c;r>0&&t.query("DELETE FROM temporal_messages WHERE project_id = ? AND distilled = 1 AND created_at < ?").run(n,o);let i=r,s=e.maxStorageMB*1024*1024,a=t.query("SELECT SUM(LENGTH(content)) as b FROM temporal_messages WHERE project_id = ?").get(n).b??0,c=0;if(a>s){let u=t.query("SELECT id, LENGTH(content) as size FROM temporal_messages WHERE project_id = ? AND distilled = 1 ORDER BY created_at ASC").all(n),d=[],p=0,f=a-s;for(let m of u){if(p>=f)break;d.push(m.id),p+=m.size}if(d.length){let m=d.map(()=>"?").join(",");t.query(`DELETE FROM temporal_messages WHERE id IN (${m})`).run(...d),c=d.length}}return t.query("DELETE FROM distillations WHERE project_id = ? AND archived = 1 AND created_at < ?").run(n,o),{ttlDeleted:i,capDeleted:c}}var IE,dm=E(()=>{"use strict";l();As();lm();Yl();cO();IE=""});var lO,dO,tG,ZHe,nG,kme,Ume,JHe,$me=E(()=>{l();lO="0123456789abcdef",dO=class e{constructor(t){this.bytes=t}static ofInner(t){if(t.length!==16)throw new TypeError("not 128-bit length");return new e(t)}static fromFieldsV7(t,n,o,r){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(o)||!Number.isInteger(r)||t<0||n<0||o<0||r<0||t>0xffffffffffff||n>4095||o>1073741823||r>4294967295)throw new RangeError("invalid field value");let i=new Uint8Array(16);return i[0]=t/2**40,i[1]=t/2**32,i[2]=t/2**24,i[3]=t/2**16,i[4]=t/2**8,i[5]=t,i[6]=112|n>>>8,i[7]=n,i[8]=128|o>>>24,i[9]=o>>>16,i[10]=o>>>8,i[11]=o,i[12]=r>>>24,i[13]=r>>>16,i[14]=r>>>8,i[15]=r,new e(i)}static parse(t){var n,o,r,i;let s;switch(t.length){case 32:s=(n=/^[0-9a-f]{32}$/i.exec(t))===null||n===void 0?void 0:n[0];break;case 36:s=(o=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(t))===null||o===void 0?void 0:o.slice(1,6).join("");break;case 38:s=(r=/^\{([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})\}$/i.exec(t))===null||r===void 0?void 0:r.slice(1,6).join("");break;case 45:s=(i=/^urn:uuid:([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(t))===null||i===void 0?void 0:i.slice(1,6).join("");break;default:break}if(s){let a=new Uint8Array(16);for(let c=0;c<16;c+=4){let u=parseInt(s.substring(2*c,2*c+8),16);a[c+0]=u>>>24,a[c+1]=u>>>16,a[c+2]=u>>>8,a[c+3]=u}return new e(a)}else throw new SyntaxError("could not parse UUID string")}toString(){let t="";for(let n=0;n<this.bytes.length;n++)t+=lO.charAt(this.bytes[n]>>>4),t+=lO.charAt(this.bytes[n]&15),(n===3||n===5||n===7||n===9)&&(t+="-");return t}toHex(){let t="";for(let n=0;n<this.bytes.length;n++)t+=lO.charAt(this.bytes[n]>>>4),t+=lO.charAt(this.bytes[n]&15);return t}toJSON(){return this.toString()}getVariant(){let t=this.bytes[8]>>>4;if(t<0)throw new Error("unreachable");if(t<=7)return this.bytes.every(n=>n===0)?"NIL":"VAR_0";if(t<=11)return"VAR_10";if(t<=13)return"VAR_110";if(t<=15)return this.bytes.every(n=>n===255)?"MAX":"VAR_RESERVED";throw new Error("unreachable")}getVersion(){return this.getVariant()==="VAR_10"?this.bytes[6]>>>4:void 0}clone(){return new e(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(let n=0;n<16;n++){let o=this.bytes[n]-t.bytes[n];if(o!==0)return Math.sign(o)}return 0}},tG=class{constructor(t){this.timestamp_biased=0,this.counter=0,this.random=t??ZHe()}generate(){return this.generateOrResetCore(Date.now(),1e4)}generateOrAbort(){return this.generateOrAbortCore(Date.now(),1e4)}generateOrResetCore(t,n){let o=this.generateOrAbortCore(t,n);return o===void 0&&(this.timestamp_biased=0,o=this.generateOrAbortCore(t,n)),o}generateOrAbortCore(t,n){if(!Number.isInteger(t)||t<0||t>0xffffffffffff)throw new RangeError("`unixTsMs` must be a 48-bit unsigned integer");if(n<0||n>0xffffffffffff)throw new RangeError("`rollbackAllowance` out of reasonable range");if(t++,t>this.timestamp_biased)this.timestamp_biased=t,this.resetCounter();else if(t+n>=this.timestamp_biased)this.counter++,this.counter>4398046511103&&(this.timestamp_biased++,this.resetCounter());else return;return dO.fromFieldsV7(this.timestamp_biased-1,Math.trunc(this.counter/2**30),this.counter&2**30-1,this.random.nextUint32())}resetCounter(){this.counter=this.random.nextUint32()*1024+(this.random.nextUint32()&1023)}generateV4(){let t=new Uint8Array(Uint32Array.of(this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32()).buffer);return t[6]=64|t[6]>>>4,t[8]=128|t[8]>>>2,dO.ofInner(t)}},ZHe=()=>{if(typeof crypto<"u"&&typeof crypto.getRandomValues<"u")return new nG;if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");return{nextUint32:()=>Math.trunc(Math.random()*65536)*65536+Math.trunc(Math.random()*65536)}},nG=class{constructor(){this.buffer=new Uint32Array(8),this.cursor=65535}nextUint32(){return this.cursor>=this.buffer.length&&(crypto.getRandomValues(this.buffer),this.cursor=0),this.buffer[this.cursor++]}},Ume=()=>JHe().toString(),JHe=()=>(kme||(kme=new tG)).generate()});function M(e,t,n){function o(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let u=s.prototype,d=Object.keys(u);for(let p=0;p<d.length;p++){let f=d[p];f in a||(a[f]=u[f].bind(a))}}let r=n?.Parent??Object;class i extends r{}Object.defineProperty(i,"name",{value:e});function s(a){var c;let u=n?.Parent?new i:this;o(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let d of u._zod.deferred)d();return u}return Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}function Gt(e){return e&&Object.assign(bE,e),bE}var rG,pO,Ei,Hc,bE,pm=E(()=>{l();rG=Object.freeze({status:"aborted"});pO=Symbol("zod_brand"),Ei=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Hc=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},bE={}});var Y={};ht(Y,{BIGINT_FORMAT_RANGES:()=>fG,Class:()=>iG,NUMBER_FORMAT_RANGES:()=>pG,aborted:()=>Wc,allowsEval:()=>cG,assert:()=>nze,assertEqual:()=>XHe,assertIs:()=>eze,assertNever:()=>tze,assertNotEqual:()=>QHe,assignProp:()=>qc,base64ToUint8Array:()=>Gme,base64urlToUint8Array:()=>Tze,cached:()=>mm,captureStackTrace:()=>mO,cleanEnum:()=>Eze,cleanRegex:()=>CE,clone:()=>Sr,cloneDef:()=>oze,createTransparentProxy:()=>lze,defineLazy:()=>Le,esc:()=>fO,escapeRegex:()=>Ho,extend:()=>fze,finalizeIssue:()=>Vr,floatSafeRemainder:()=>sG,getElementAtPath:()=>ize,getEnumValues:()=>OE,getLengthableOrigin:()=>xE,getParsedType:()=>uze,getSizableOrigin:()=>PE,hexToUint8Array:()=>Aze,isObject:()=>Kl,isPlainObject:()=>Yc,issue:()=>_m,joinValues:()=>L,jsonStringifyReplacer:()=>fm,merge:()=>_ze,mergeDefs:()=>Sa,normalizeParams:()=>W,nullish:()=>zc,numKeys:()=>cze,objectClone:()=>rze,omit:()=>pze,optionalKeys:()=>dG,parsedType:()=>q,partial:()=>gze,pick:()=>dze,prefixIssues:()=>uo,primitiveTypes:()=>lG,promiseAllObject:()=>sze,propertyKeyTypes:()=>vE,randomString:()=>aze,required:()=>hze,safeExtend:()=>mze,shallowClone:()=>uG,slugify:()=>aG,stringifyPrimitive:()=>H,uint8ArrayToBase64:()=>jme,uint8ArrayToBase64url:()=>Sze,uint8ArrayToHex:()=>yze,unwrapMessage:()=>NE});function XHe(e){return e}function QHe(e){return e}function eze(e){}function tze(e){throw new Error("Unexpected value in exhaustive check")}function nze(e){}function OE(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,r])=>t.indexOf(+o)===-1).map(([o,r])=>r)}function L(e,t="|"){return e.map(n=>H(n)).join(t)}function fm(e,t){return typeof t=="bigint"?t.toString():t}function mm(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function zc(e){return e==null}function CE(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function sG(e,t){let n=(e.toString().split(".")[1]||"").length,o=t.toString(),r=(o.split(".")[1]||"").length;if(r===0&&/\d?e-\d?/.test(o)){let c=o.match(/\d?e-(\d?)/);c?.[1]&&(r=Number.parseInt(c[1]))}let i=n>r?n:r,s=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return s%a/10**i}function Le(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==Bme)return o===void 0&&(o=Bme,o=n()),o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function rze(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function qc(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Sa(...e){let t={};for(let n of e){let o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function oze(e){return Sa(e._zod.def)}function ize(e,t){return t?t.reduce((n,o)=>n?.[o],e):e}function sze(e){let t=Object.keys(e),n=t.map(o=>e[o]);return Promise.all(n).then(o=>{let r={};for(let i=0;i<t.length;i++)r[t[i]]=o[i];return r})}function aze(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let o=0;o<e;o++)n+=t[Math.floor(Math.random()*t.length)];return n}function fO(e){return JSON.stringify(e)}function aG(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Kl(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Yc(e){if(Kl(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(Kl(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function uG(e){return Yc(e)?{...e}:Array.isArray(e)?[...e]:e}function cze(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function Ho(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Sr(e,t,n){let o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}function W(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 lze(e){let t;return new Proxy({},{get(n,o,r){return t??(t=e()),Reflect.get(t,o,r)},set(n,o,r,i){return t??(t=e()),Reflect.set(t,o,r,i)},has(n,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(n,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(n,o,r){return t??(t=e()),Reflect.defineProperty(t,o,r)}})}function H(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function dG(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function dze(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=Sa(e._zod.def,{get shape(){let s={};for(let a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=n.shape[a])}return qc(this,"shape",s),s},checks:[]});return Sr(e,i)}function pze(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=Sa(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return qc(this,"shape",s),s},checks:[]});return Sr(e,i)}function fze(e,t){if(!Yc(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 r=Sa(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return qc(this,"shape",i),i}});return Sr(e,r)}function mze(e,t){if(!Yc(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Sa(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return qc(this,"shape",o),o}});return Sr(e,n)}function _ze(e,t){let n=Sa(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return qc(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return Sr(e,n)}function gze(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=Sa(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(n)for(let u in n){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(c[u]=e?new e({type:"optional",innerType:a[u]}):a[u])}else for(let u in a)c[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return qc(this,"shape",c),c},checks:[]});return Sr(t,s)}function hze(e,t,n){let o=Sa(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};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:r[s]}))}else for(let s in r)i[s]=new e({type:"nonoptional",innerType:r[s]});return qc(this,"shape",i),i}});return Sr(t,o)}function Wc(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 uo(e,t){return t.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function NE(e){return typeof e=="string"?e:e?.message}function Vr(e,t,n){let o={...e,path:e.path??[]};if(!e.message){let r=NE(e.inst?._zod.def?.error?.(e))??NE(t?.error?.(e))??NE(n.customError?.(e))??NE(n.localeError?.(e))??"Invalid input";o.message=r}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function PE(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function xE(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function q(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 _m(...e){let[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}function Eze(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Gme(e){let t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}function jme(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function Tze(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return Gme(t+n)}function Sze(e){return jme(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Aze(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 o=0;o<t.length;o+=2)n[o/2]=Number.parseInt(t.slice(o,o+2),16);return n}function yze(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Bme,mO,cG,uze,vE,lG,pG,fG,iG,me=E(()=>{l();Bme=Symbol("evaluating");mO="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};cG=mm(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});uze=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}`)}},vE=new Set(["string","number","symbol"]),lG=new Set(["string","number","bigint","boolean","symbol","undefined"]);pG={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]},fG={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};iG=class{constructor(...t){}}});function LE(e,t=n=>n.message){let n={},o=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):o.push(t(r));return{formErrors:o,fieldErrors:n}}function wE(e,t=n=>n.message){let n={_errors:[]},o=r=>{for(let i of r.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>o({issues:s}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let s=n,a=0;for(;a<i.path.length;){let c=i.path[a];a===i.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(i))):s[c]=s[c]||{_errors:[]},s=s[c],a++}}};return o(e),n}function mG(e,t=n=>n.message){let n={errors:[]},o=(r,i=[])=>{var s,a;for(let c of r.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>o({issues:u},c.path));else if(c.code==="invalid_key")o({issues:c.issues},c.path);else if(c.code==="invalid_element")o({issues:c.issues},c.path);else{let u=[...i,...c.path];if(u.length===0){n.errors.push(t(c));continue}let d=n,p=0;for(;p<u.length;){let f=u[p],m=p===u.length-1;typeof f=="string"?(d.properties??(d.properties={}),(s=d.properties)[f]??(s[f]={errors:[]}),d=d.properties[f]):(d.items??(d.items=[]),(a=d.items)[f]??(a[f]={errors:[]}),d=d.items[f]),m&&d.errors.push(t(c)),p++}}};return o(e),n}function Fme(e){let t=[],n=e.map(o=>typeof o=="object"?o.key:o);for(let o of n)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function _G(e){let t=[],n=[...e.issues].sort((o,r)=>(o.path??[]).length-(r.path??[]).length);for(let o of n)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${Fme(o.path)}`);return t.join(`
|
|
805
|
+
`)}var Vme,ME,Fr,gG=E(()=>{l();pm();me();Vme=(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,fm,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ME=M("$ZodError",Vme),Fr=M("$ZodError",Vme,{Parent:Error})});var gm,_O,hm,gO,Em,hG,Tm,EG,hO,Ize,EO,bze,TO,Nze,SO,Oze,AO,Cze,yO,vze,RO,Pze,IO,xze,TG=E(()=>{l();pm();gG();me();gm=e=>(t,n,o,r)=>{let i=o?Object.assign(o,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new Ei;if(s.issues.length){let a=new(r?.Err??e)(s.issues.map(c=>Vr(c,i,Gt())));throw mO(a,r?.callee),a}return s.value},_O=gm(Fr),hm=e=>async(t,n,o,r)=>{let i=o?Object.assign(o,{async:!0}):{async:!0},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(r?.Err??e)(s.issues.map(c=>Vr(c,i,Gt())));throw mO(a,r?.callee),a}return s.value},gO=hm(Fr),Em=e=>(t,n,o)=>{let r=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new Ei;return i.issues.length?{success:!1,error:new(e??ME)(i.issues.map(s=>Vr(s,r,Gt())))}:{success:!0,data:i.value}},hG=Em(Fr),Tm=e=>async(t,n,o)=>{let r=o?Object.assign(o,{async:!0}):{async:!0},i=t._zod.run({value:n,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>Vr(s,r,Gt())))}:{success:!0,data:i.value}},EG=Tm(Fr),hO=e=>(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return gm(e)(t,n,r)},Ize=hO(Fr),EO=e=>(t,n,o)=>gm(e)(t,n,o),bze=EO(Fr),TO=e=>async(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return hm(e)(t,n,r)},Nze=TO(Fr),SO=e=>async(t,n,o)=>hm(e)(t,n,o),Oze=SO(Fr),AO=e=>(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Em(e)(t,n,r)},Cze=AO(Fr),yO=e=>(t,n,o)=>Em(e)(t,n,o),vze=yO(Fr),RO=e=>async(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Tm(e)(t,n,r)},Pze=RO(Fr),IO=e=>async(t,n,o)=>Tm(e)(t,n,o),xze=IO(Fr)});var zo={};ht(zo,{base64:()=>DG,base64url:()=>bO,bigint:()=>jG,boolean:()=>FG,browserEmail:()=>Bze,cidrv4:()=>LG,cidrv6:()=>wG,cuid:()=>SG,cuid2:()=>AG,date:()=>UG,datetime:()=>BG,domain:()=>Vze,duration:()=>NG,e164:()=>kG,email:()=>CG,emoji:()=>vG,extendedDuration:()=>Mze,guid:()=>OG,hex:()=>Fze,hostname:()=>jze,html5Email:()=>kze,idnEmail:()=>$ze,integer:()=>VG,ipv4:()=>PG,ipv6:()=>xG,ksuid:()=>IG,lowercase:()=>qG,mac:()=>MG,md5_base64:()=>zze,md5_base64url:()=>qze,md5_hex:()=>Hze,nanoid:()=>bG,null:()=>HG,number:()=>NO,rfc5322Email:()=>Uze,sha1_base64:()=>Wze,sha1_base64url:()=>Kze,sha1_hex:()=>Yze,sha256_base64:()=>Jze,sha256_base64url:()=>Xze,sha256_hex:()=>Zze,sha384_base64:()=>eqe,sha384_base64url:()=>tqe,sha384_hex:()=>Qze,sha512_base64:()=>rqe,sha512_base64url:()=>oqe,sha512_hex:()=>nqe,string:()=>GG,time:()=>$G,ulid:()=>yG,undefined:()=>zG,unicodeEmail:()=>Hme,uppercase:()=>YG,uuid:()=>Zl,uuid4:()=>Lze,uuid6:()=>wze,uuid7:()=>Dze,xid:()=>RG});function vG(){return new RegExp(Gze,"u")}function qme(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 $G(e){return new RegExp(`^${qme(e)}$`)}function BG(e){let t=qme({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${n.join("|")})`;return new RegExp(`^${zme}T(?:${o})$`)}function DE(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function kE(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var SG,AG,yG,RG,IG,bG,NG,Mze,OG,Zl,Lze,wze,Dze,CG,kze,Uze,Hme,$ze,Bze,Gze,PG,xG,MG,LG,wG,DG,bO,jze,Vze,kG,zme,UG,GG,jG,VG,NO,FG,HG,zG,qG,YG,Fze,Hze,zze,qze,Yze,Wze,Kze,Zze,Jze,Xze,Qze,eqe,tqe,nqe,rqe,oqe,OO=E(()=>{l();me();SG=/^[cC][^\s-]{8,}$/,AG=/^[0-9a-z]+$/,yG=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,RG=/^[0-9a-vA-V]{20}$/,IG=/^[A-Za-z0-9]{27}$/,bG=/^[a-zA-Z0-9_-]{21}$/,NG=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Mze=/^[-+]?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)?)??$/,OG=/^([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})$/,Zl=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)$/,Lze=Zl(4),wze=Zl(6),Dze=Zl(7),CG=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,kze=/^[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])?)*$/,Uze=/^(([^<>()\[\]\\.,;:\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,}))$/,Hme=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,$ze=Hme,Bze=/^[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])?)*$/,Gze="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";PG=/^(?:(?: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])$/,xG=/^(([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}|:))$/,MG=e=>{let t=Ho(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},LG=/^((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])$/,wG=/^(([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])$/,DG=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,bO=/^[A-Za-z0-9_-]*$/,jze=/^(?=.{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])?)*\.?$/,Vze=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,kG=/^\+[1-9]\d{6,14}$/,zme="(?:(?:\\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])))",UG=new RegExp(`^${zme}$`);GG=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},jG=/^-?\d+n?$/,VG=/^-?\d+$/,NO=/^-?\d+(?:\.\d+)?$/,FG=/^(?:true|false)$/i,HG=/^null$/i,zG=/^undefined$/i,qG=/^[^A-Z]*$/,YG=/^[^a-z]*$/,Fze=/^[0-9a-fA-F]*$/;Hze=/^[0-9a-fA-F]{32}$/,zze=DE(22,"=="),qze=kE(22),Yze=/^[0-9a-fA-F]{40}$/,Wze=DE(27,"="),Kze=kE(27),Zze=/^[0-9a-fA-F]{64}$/,Jze=DE(43,"="),Xze=kE(43),Qze=/^[0-9a-fA-F]{96}$/,eqe=DE(64,""),tqe=kE(64),nqe=/^[0-9a-fA-F]{128}$/,rqe=DE(86,"=="),oqe=kE(86)});function Yme(e,t,n){e.issues.length&&t.issues.push(...uo(n,e.issues))}var dt,Wme,CO,vO,WG,KG,ZG,JG,XG,QG,e1,t1,n1,Sm,r1,o1,i1,s1,a1,c1,u1,l1,d1,PO=E(()=>{l();pm();OO();me();dt=M("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Wme={number:"number",bigint:"bigint",object:"date"},CO=M("$ZodCheckLessThan",(e,t)=>{dt.init(e,t);let n=Wme[typeof t.value];e._zod.onattach.push(o=>{let r=o._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vO=M("$ZodCheckGreaterThan",(e,t)=>{dt.init(e,t);let n=Wme[typeof t.value];e._zod.onattach.push(o=>{let r=o._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),WG=M("$ZodCheckMultipleOf",(e,t)=>{dt.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.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):sG(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})}}),KG=M("$ZodCheckNumberFormat",(e,t)=>{dt.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),o=n?"int":"number",[r,i]=pG[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=r,a.maximum=i,n&&(a.pattern=VG)}),e._zod.check=s=>{let a=s.value;if(n){if(!Number.isInteger(a)){s.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}a<r&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),ZG=M("$ZodCheckBigIntFormat",(e,t)=>{dt.init(e,t);let[n,o]=fG[t.format];e._zod.onattach.push(r=>{let i=r._zod.bag;i.format=t.format,i.minimum=n,i.maximum=o}),e._zod.check=r=>{let i=r.value;i<n&&r.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),i>o&&r.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),JG=M("$ZodCheckMaxSize",(e,t)=>{var n;dt.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!zc(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let r=o.value;r.size<=t.maximum||o.issues.push({origin:PE(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),XG=M("$ZodCheckMinSize",(e,t)=>{var n;dt.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!zc(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let r=o.value;r.size>=t.minimum||o.issues.push({origin:PE(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),QG=M("$ZodCheckSizeEquals",(e,t)=>{var n;dt.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!zc(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=o=>{let r=o.value,i=r.size;if(i===t.size)return;let s=i>t.size;o.issues.push({origin:PE(r),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),e1=M("$ZodCheckMaxLength",(e,t)=>{var n;dt.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!zc(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let r=o.value;if(r.length<=t.maximum)return;let s=xE(r);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),t1=M("$ZodCheckMinLength",(e,t)=>{var n;dt.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!zc(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let r=o.value;if(r.length>=t.minimum)return;let s=xE(r);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),n1=M("$ZodCheckLengthEquals",(e,t)=>{var n;dt.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!zc(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=o=>{let r=o.value,i=r.length;if(i===t.length)return;let s=xE(r),a=i>t.length;o.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Sm=M("$ZodCheckStringFormat",(e,t)=>{var n,o;dt.init(e,t),e._zod.onattach.push(r=>{let i=r._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=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),r1=M("$ZodCheckRegex",(e,t)=>{Sm.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})}}),o1=M("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=qG),Sm.init(e,t)}),i1=M("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=YG),Sm.init(e,t)}),s1=M("$ZodCheckIncludes",(e,t)=>{dt.init(e,t);let n=Ho(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(r=>{let i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),a1=M("$ZodCheckStartsWith",(e,t)=>{dt.init(e,t);let n=new RegExp(`^${Ho(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),c1=M("$ZodCheckEndsWith",(e,t)=>{dt.init(e,t);let n=new RegExp(`.*${Ho(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});u1=M("$ZodCheckProperty",(e,t)=>{dt.init(e,t),e._zod.check=n=>{let o=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(r=>Yme(r,n,t.property));Yme(o,n,t.property)}}),l1=M("$ZodCheckMimeType",(e,t)=>{dt.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{n.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),d1=M("$ZodCheckOverwrite",(e,t)=>{dt.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}})});var UE,p1=E(()=>{l();UE=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 o=t.split(`
|
|
806
|
+
`).filter(s=>s),r=Math.min(...o.map(s=>s.length-s.trimStart().length)),i=o.map(s=>s.slice(r)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){let t=Function,n=this?.args,r=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,r.join(`
|
|
807
|
+
`))}}});var f1,m1=E(()=>{l();f1={major:4,minor:3,patch:6}});function k1(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}function a_e(e){if(!bO.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return k1(n)}function c_e(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[o]=n;if(!o)return!1;let r=JSON.parse(atob(o));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}function Zme(e,t,n){e.issues.length&&t.issues.push(...uo(n,e.issues)),t.value[n]=e.value}function DO(e,t,n,o,r){if(e.issues.length){if(r&&!(n in o))return;t.issues.push(...uo(n,e.issues))}e.value===void 0?n in o&&(t.value[n]=void 0):t.value[n]=e.value}function u_e(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let n=dG(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function l_e(e,t,n,o,r,i){let s=[],a=r.keySet,c=r.catchall._zod,u=c.def.type,d=c.optout==="optional";for(let p in t){if(a.has(p))continue;if(u==="never"){s.push(p);continue}let f=c.run({value:t[p],issues:[]},o);f instanceof Promise?e.push(f.then(m=>DO(m,n,p,t,d))):DO(f,n,p,t,d)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}function Jme(e,t,n,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let r=e.filter(i=>!Wc(i));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>Vr(s,o,Gt())))}),t)}function Xme(e,t,n,o){let r=e.filter(i=>i.issues.length===0);return r.length===1?(t.value=r[0].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>Vr(s,o,Gt())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}function _1(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Yc(e)&&Yc(t)){let n=Object.keys(t),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),r={...e,...t};for(let i of o){let s=_1(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r[i]=s.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let o=0;o<e.length;o++){let r=e[o],i=t[o],s=_1(r,i);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Qme(e,t,n){let o=new Map,r;for(let a of t.issues)if(a.code==="unrecognized_keys"){r??(r=a);for(let c of a.keys)o.has(c)||o.set(c,{}),o.get(c).l=!0}else e.issues.push(a);for(let a of n.issues)if(a.code==="unrecognized_keys")for(let c of a.keys)o.has(c)||o.set(c,{}),o.get(c).r=!0;else e.issues.push(a);let i=[...o].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&r&&e.issues.push({...r,keys:i}),Wc(e))return e;let s=_1(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}function xO(e,t,n){e.issues.length&&t.issues.push(...uo(n,e.issues)),t.value[n]=e.value}function e_e(e,t,n,o,r,i,s){e.issues.length&&(vE.has(typeof o)?n.issues.push(...uo(o,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:i,issues:e.issues.map(a=>Vr(a,s,Gt()))})),t.issues.length&&(vE.has(typeof o)?n.issues.push(...uo(o,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:i,key:o,issues:t.issues.map(a=>Vr(a,s,Gt()))})),n.value.set(e.value,t.value)}function t_e(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function n_e(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}function r_e(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function o_e(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function MO(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}function LO(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(i=>wO(e,i,t.out,n)):wO(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(i=>wO(e,i,t.in,n)):wO(e,r,t.in,n)}}function wO(e,t,n,o){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},o)}function i_e(e){return e.value=Object.freeze(e.value),e}function s_e(e,t,n,o){if(!e){let r={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(r.params=o._zod.def.params),t.issues.push(_m(r))}}var be,Jl,at,g1,h1,E1,T1,S1,A1,y1,R1,I1,b1,N1,O1,C1,v1,P1,x1,M1,L1,w1,D1,U1,$1,B1,G1,j1,kO,V1,$E,UO,F1,H1,z1,q1,Y1,W1,K1,Z1,J1,X1,d_e,Q1,BE,ej,tj,nj,$O,rj,oj,ij,sj,aj,cj,uj,BO,lj,dj,pj,fj,mj,_j,gj,hj,Ej,GE,Tj,Sj,Aj,yj,Rj,Ij,bj=E(()=>{l();PO();pm();p1();TG();OO();me();m1();me();be=M("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=f1;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let r of o)for(let i of r._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(s,a,c)=>{let u=Wc(s),d;for(let p of a){if(p._zod.def.when){if(!p._zod.def.when(s))continue}else if(u)continue;let f=s.issues.length,m=p._zod.check(s);if(m instanceof Promise&&c?.async===!1)throw new Ei;if(d||m instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await m,s.issues.length!==f&&(u||(u=Wc(s,f)))});else{if(s.issues.length===f)continue;u||(u=Wc(s,f))}}return d?d.then(()=>s):s},i=(s,a,c)=>{if(Wc(s))return s.aborted=!0,s;let u=r(a,o,c);if(u instanceof Promise){if(c.async===!1)throw new Ei;return u.then(d=>e._zod.parse(d,c))}return e._zod.parse(u,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){let u=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(d=>i(d,s,a)):i(u,s,a)}let c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new Ei;return c.then(u=>r(u,o,a))}return r(c,o,a)}}Le(e,"~standard",()=>({validate:r=>{try{let i=hG(e,r);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return EG(e,r).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),Jl=M("$ZodString",(e,t)=>{be.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??GG(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),at=M("$ZodStringFormat",(e,t)=>{Sm.init(e,t),Jl.init(e,t)}),g1=M("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=OG),at.init(e,t)}),h1=M("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Zl(o))}else t.pattern??(t.pattern=Zl());at.init(e,t)}),E1=M("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=CG),at.init(e,t)}),T1=M("$ZodURL",(e,t)=>{at.init(e,t),e._zod.check=n=>{try{let o=n.value.trim(),r=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),S1=M("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=vG()),at.init(e,t)}),A1=M("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=bG),at.init(e,t)}),y1=M("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=SG),at.init(e,t)}),R1=M("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=AG),at.init(e,t)}),I1=M("$ZodULID",(e,t)=>{t.pattern??(t.pattern=yG),at.init(e,t)}),b1=M("$ZodXID",(e,t)=>{t.pattern??(t.pattern=RG),at.init(e,t)}),N1=M("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=IG),at.init(e,t)}),O1=M("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=BG(t)),at.init(e,t)}),C1=M("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=UG),at.init(e,t)}),v1=M("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=$G(t)),at.init(e,t)}),P1=M("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=NG),at.init(e,t)}),x1=M("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=PG),at.init(e,t),e._zod.bag.format="ipv4"}),M1=M("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=xG),at.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),L1=M("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=MG(t.delimiter)),at.init(e,t),e._zod.bag.format="mac"}),w1=M("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=LG),at.init(e,t)}),D1=M("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=wG),at.init(e,t),e._zod.check=n=>{let o=n.value.split("/");try{if(o.length!==2)throw new Error;let[r,i]=o;if(!i)throw new Error;let s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});U1=M("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=DG),at.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{k1(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});$1=M("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=bO),at.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{a_e(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),B1=M("$ZodE164",(e,t)=>{t.pattern??(t.pattern=kG),at.init(e,t)});G1=M("$ZodJWT",(e,t)=>{at.init(e,t),e._zod.check=n=>{c_e(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),j1=M("$ZodCustomStringFormat",(e,t)=>{at.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),kO=M("$ZodNumber",(e,t)=>{be.init(e,t),e._zod.pattern=e._zod.bag.pattern??NO,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let i=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...i?{received:i}:{}}),n}}),V1=M("$ZodNumberFormat",(e,t)=>{KG.init(e,t),kO.init(e,t)}),$E=M("$ZodBoolean",(e,t)=>{be.init(e,t),e._zod.pattern=FG,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),UO=M("$ZodBigInt",(e,t)=>{be.init(e,t),e._zod.pattern=jG,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),F1=M("$ZodBigIntFormat",(e,t)=>{ZG.init(e,t),UO.init(e,t)}),H1=M("$ZodSymbol",(e,t)=>{be.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),z1=M("$ZodUndefined",(e,t)=>{be.init(e,t),e._zod.pattern=zG,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),q1=M("$ZodNull",(e,t)=>{be.init(e,t),e._zod.pattern=HG,e._zod.values=new Set([null]),e._zod.parse=(n,o)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),Y1=M("$ZodAny",(e,t)=>{be.init(e,t),e._zod.parse=n=>n}),W1=M("$ZodUnknown",(e,t)=>{be.init(e,t),e._zod.parse=n=>n}),K1=M("$ZodNever",(e,t)=>{be.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Z1=M("$ZodVoid",(e,t)=>{be.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),J1=M("$ZodDate",(e,t)=>{be.init(e,t),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,i=r instanceof Date;return i&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...i?{received:"Invalid Date"}:{},inst:e}),n}});X1=M("$ZodArray",(e,t)=>{be.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let i=[];for(let s=0;s<r.length;s++){let a=r[s],c=t.element._zod.run({value:a,issues:[]},o);c instanceof Promise?i.push(c.then(u=>Zme(u,n,s))):Zme(c,n,s)}return i.length?Promise.all(i).then(()=>n):n}});d_e=M("$ZodObject",(e,t)=>{if(be.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}let o=mm(()=>u_e(t));Le(e._zod,"propValues",()=>{let a=t.shape,c={};for(let u in a){let d=a[u]._zod;if(d.values){c[u]??(c[u]=new Set);for(let p of d.values)c[u].add(p)}}return c});let r=Kl,i=t.catchall,s;e._zod.parse=(a,c)=>{s??(s=o.value);let u=a.value;if(!r(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};let d=[],p=s.shape;for(let f of s.keys){let m=p[f],_=m._zod.optout==="optional",h=m._zod.run({value:u[f],issues:[]},c);h instanceof Promise?d.push(h.then(T=>DO(T,a,f,u,_))):DO(h,a,f,u,_)}return i?l_e(d,u,a,c,o.value,e):d.length?Promise.all(d).then(()=>a):a}}),Q1=M("$ZodObjectJIT",(e,t)=>{d_e.init(e,t);let n=e._zod.parse,o=mm(()=>u_e(t)),r=f=>{let m=new UE(["shape","payload","ctx"]),_=o.value,h=v=>{let x=fO(v);return`shape[${x}]._zod.run({ value: input[${x}], issues: [] }, ctx)`};m.write("const input = payload.value;");let T=Object.create(null),S=0;for(let v of _.keys)T[v]=`key_${S++}`;m.write("const newResult = {};");for(let v of _.keys){let x=T[v],P=fO(v),F=f[v]?._zod?.optout==="optional";m.write(`const ${x} = ${h(v)};`),F?m.write(`
|
|
808
|
+
if (${x}.issues.length) {
|
|
809
|
+
if (${P} in input) {
|
|
810
|
+
payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
|
|
811
|
+
...iss,
|
|
812
|
+
path: iss.path ? [${P}, ...iss.path] : [${P}]
|
|
813
|
+
})));
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
if (${x}.value === undefined) {
|
|
818
|
+
if (${P} in input) {
|
|
819
|
+
newResult[${P}] = undefined;
|
|
820
|
+
}
|
|
821
|
+
} else {
|
|
822
|
+
newResult[${P}] = ${x}.value;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
`):m.write(`
|
|
826
|
+
if (${x}.issues.length) {
|
|
827
|
+
payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
|
|
828
|
+
...iss,
|
|
829
|
+
path: iss.path ? [${P}, ...iss.path] : [${P}]
|
|
830
|
+
})));
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
if (${x}.value === undefined) {
|
|
834
|
+
if (${P} in input) {
|
|
835
|
+
newResult[${P}] = undefined;
|
|
836
|
+
}
|
|
837
|
+
} else {
|
|
838
|
+
newResult[${P}] = ${x}.value;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
`)}m.write("payload.value = newResult;"),m.write("return payload;");let y=m.compile();return(v,x)=>y(f,v,x)},i,s=Kl,a=!bE.jitless,u=a&&cG.value,d=t.catchall,p;e._zod.parse=(f,m)=>{p??(p=o.value);let _=f.value;return s(_)?a&&u&&m?.async===!1&&m.jitless!==!0?(i||(i=r(t.shape)),f=i(f,m),d?l_e([],_,f,m,p,e):f):n(f,m):(f.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),f)}});BE=M("$ZodUnion",(e,t)=>{be.init(e,t),Le(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),Le(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),Le(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),Le(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${r.map(i=>CE(i.source)).join("|")})$`)}});let n=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(n)return o(r,i);let s=!1,a=[];for(let c of t.options){let u=c._zod.run({value:r.value,issues:[]},i);if(u instanceof Promise)a.push(u),s=!0;else{if(u.issues.length===0)return u;a.push(u)}}return s?Promise.all(a).then(c=>Jme(c,r,e,i)):Jme(a,r,e,i)}});ej=M("$ZodXor",(e,t)=>{BE.init(e,t),t.inclusive=!1;let n=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(n)return o(r,i);let s=!1,a=[];for(let c of t.options){let u=c._zod.run({value:r.value,issues:[]},i);u instanceof Promise?(a.push(u),s=!0):a.push(u)}return s?Promise.all(a).then(c=>Xme(c,r,e,i)):Xme(a,r,e,i)}}),tj=M("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,BE.init(e,t);let n=e._zod.parse;Le(e._zod,"propValues",()=>{let r={};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[a,c]of Object.entries(s)){r[a]||(r[a]=new Set);for(let u of c)r[a].add(u)}}return r});let o=mm(()=>{let r=t.options,i=new Map;for(let s of r){let a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let c of a){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s)}}return i});e._zod.parse=(r,i)=>{let s=r.value;if(!Kl(s))return r.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),r;let a=o.value.get(s?.[t.discriminator]);return a?a._zod.run(r,i):t.unionFallback?n(r,i):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),r)}}),nj=M("$ZodIntersection",(e,t)=>{be.init(e,t),e._zod.parse=(n,o)=>{let r=n.value,i=t.left._zod.run({value:r,issues:[]},o),s=t.right._zod.run({value:r,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,u])=>Qme(n,c,u)):Qme(n,i,s)}});$O=M("$ZodTuple",(e,t)=>{be.init(e,t);let n=t.items;e._zod.parse=(o,r)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let s=[],a=[...n].reverse().findIndex(d=>d._zod.optin!=="optional"),c=a===-1?0:n.length-a;if(!t.rest){let d=i.length>n.length,p=i.length<c-1;if(d||p)return o.issues.push({...d?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:i,inst:e,origin:"array"}),o}let u=-1;for(let d of n){if(u++,u>=i.length&&u>=c)continue;let p=d._zod.run({value:i[u],issues:[]},r);p instanceof Promise?s.push(p.then(f=>xO(f,o,u))):xO(p,o,u)}if(t.rest){let d=i.slice(n.length);for(let p of d){u++;let f=t.rest._zod.run({value:p,issues:[]},r);f instanceof Promise?s.push(f.then(m=>xO(m,o,u))):xO(f,o,u)}}return s.length?Promise.all(s).then(()=>o):o}});rj=M("$ZodRecord",(e,t)=>{be.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!Yc(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let i=[],s=t.keyType._zod.values;if(s){n.value={};let a=new Set;for(let u of s)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){a.add(typeof u=="number"?u.toString():u);let d=t.valueType._zod.run({value:r[u],issues:[]},o);d instanceof Promise?i.push(d.then(p=>{p.issues.length&&n.issues.push(...uo(u,p.issues)),n.value[u]=p.value})):(d.issues.length&&n.issues.push(...uo(u,d.issues)),n.value[u]=d.value)}let c;for(let u in r)a.has(u)||(c=c??[],c.push(u));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:c})}else{n.value={};for(let a of Reflect.ownKeys(r)){if(a==="__proto__")continue;let c=t.keyType._zod.run({value:a,issues:[]},o);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&NO.test(a)&&c.issues.length){let p=t.keyType._zod.run({value:Number(a),issues:[]},o);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(c=p)}if(c.issues.length){t.mode==="loose"?n.value[a]=r[a]:n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(p=>Vr(p,o,Gt())),input:a,path:[a],inst:e});continue}let d=t.valueType._zod.run({value:r[a],issues:[]},o);d instanceof Promise?i.push(d.then(p=>{p.issues.length&&n.issues.push(...uo(a,p.issues)),n.value[c.value]=p.value})):(d.issues.length&&n.issues.push(...uo(a,d.issues)),n.value[c.value]=d.value)}}return i.length?Promise.all(i).then(()=>n):n}}),oj=M("$ZodMap",(e,t)=>{be.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let i=[];n.value=new Map;for(let[s,a]of r){let c=t.keyType._zod.run({value:s,issues:[]},o),u=t.valueType._zod.run({value:a,issues:[]},o);c instanceof Promise||u instanceof Promise?i.push(Promise.all([c,u]).then(([d,p])=>{e_e(d,p,n,s,r,e,o)})):e_e(c,u,n,s,r,e,o)}return i.length?Promise.all(i).then(()=>n):n}});ij=M("$ZodSet",(e,t)=>{be.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let i=[];n.value=new Set;for(let s of r){let a=t.valueType._zod.run({value:s,issues:[]},o);a instanceof Promise?i.push(a.then(c=>t_e(c,n))):t_e(a,n)}return i.length?Promise.all(i).then(()=>n):n}});sj=M("$ZodEnum",(e,t)=>{be.init(e,t);let n=OE(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(r=>vE.has(typeof r)).map(r=>typeof r=="string"?Ho(r):r.toString()).join("|")})$`),e._zod.parse=(r,i)=>{let s=r.value;return o.has(s)||r.issues.push({code:"invalid_value",values:n,input:s,inst:e}),r}}),aj=M("$ZodLiteral",(e,t)=>{if(be.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(o=>typeof o=="string"?Ho(o):o?Ho(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,r)=>{let i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),cj=M("$ZodFile",(e,t)=>{be.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),uj=M("$ZodTransform",(e,t)=>{be.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Hc(e.constructor.name);let r=t.transform(n.value,n);if(o.async)return(r instanceof Promise?r:Promise.resolve(r)).then(s=>(n.value=s,n));if(r instanceof Promise)throw new Ei;return n.value=r,n}});BO=M("$ZodOptional",(e,t)=>{be.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Le(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Le(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${CE(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>n_e(i,n.value)):n_e(r,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),lj=M("$ZodExactOptional",(e,t)=>{BO.init(e,t),Le(e._zod,"values",()=>t.innerType._zod.values),Le(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),dj=M("$ZodNullable",(e,t)=>{be.init(e,t),Le(e._zod,"optin",()=>t.innerType._zod.optin),Le(e._zod,"optout",()=>t.innerType._zod.optout),Le(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${CE(n.source)}|null)$`):void 0}),Le(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),pj=M("$ZodDefault",(e,t)=>{be.init(e,t),e._zod.optin="optional",Le(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>r_e(i,t)):r_e(r,t)}});fj=M("$ZodPrefault",(e,t)=>{be.init(e,t),e._zod.optin="optional",Le(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),mj=M("$ZodNonOptional",(e,t)=>{be.init(e,t),Le(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>o_e(i,e)):o_e(r,e)}});_j=M("$ZodSuccess",(e,t)=>{be.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Hc("ZodSuccess");let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),gj=M("$ZodCatch",(e,t)=>{be.init(e,t),Le(e._zod,"optin",()=>t.innerType._zod.optin),Le(e._zod,"optout",()=>t.innerType._zod.optout),Le(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>Vr(s,o,Gt()))},input:n.value}),n.issues=[]),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(i=>Vr(i,o,Gt()))},input:n.value}),n.issues=[]),n)}}),hj=M("$ZodNaN",(e,t)=>{be.init(e,t),e._zod.parse=(n,o)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),Ej=M("$ZodPipe",(e,t)=>{be.init(e,t),Le(e._zod,"values",()=>t.in._zod.values),Le(e._zod,"optin",()=>t.in._zod.optin),Le(e._zod,"optout",()=>t.out._zod.optout),Le(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(s=>MO(s,t.in,o)):MO(i,t.in,o)}let r=t.in._zod.run(n,o);return r instanceof Promise?r.then(i=>MO(i,t.out,o)):MO(r,t.out,o)}});GE=M("$ZodCodec",(e,t)=>{be.init(e,t),Le(e._zod,"values",()=>t.in._zod.values),Le(e._zod,"optin",()=>t.in._zod.optin),Le(e._zod,"optout",()=>t.out._zod.optout),Le(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(n,o);return i instanceof Promise?i.then(s=>LO(s,t,o)):LO(i,t,o)}else{let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(s=>LO(s,t,o)):LO(i,t,o)}}});Tj=M("$ZodReadonly",(e,t)=>{be.init(e,t),Le(e._zod,"propValues",()=>t.innerType._zod.propValues),Le(e._zod,"values",()=>t.innerType._zod.values),Le(e._zod,"optin",()=>t.innerType?._zod?.optin),Le(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i_e):i_e(r)}});Sj=M("$ZodTemplateLiteral",(e,t)=>{be.init(e,t);let n=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let r=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=r.startsWith("^")?1:0,s=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(i,s))}else if(o===null||lG.has(typeof o))n.push(Ho(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(o,r)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),Aj=M("$ZodFunction",(e,t)=>(be.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(...o){let r=e._def.input?_O(e._def.input,o):o,i=Reflect.apply(n,this,r);return e._def.output?_O(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(...o){let r=e._def.input?await gO(e._def.input,o):o,i=await Reflect.apply(n,this,r);return e._def.output?await gO(e._def.output,i):i}},e._zod.parse=(n,o)=>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 o=e.constructor;return Array.isArray(n[0])?new o({type:"function",input:new $O({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new o({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:n})},e)),yj=M("$ZodPromise",(e,t)=>{be.init(e,t),e._zod.parse=(n,o)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},o))}),Rj=M("$ZodLazy",(e,t)=>{be.init(e,t),Le(e._zod,"innerType",()=>t.getter()),Le(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Le(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Le(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Le(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o)}),Ij=M("$ZodCustom",(e,t)=>{dt.init(e,t),be.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{let o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then(i=>s_e(i,n,o,e));s_e(r,n,o,e)}})});function p_e(){return{localeError:sqe()}}var sqe,f_e=E(()=>{l();me();sqe=()=>{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(r){return e[r]??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"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.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 ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`:`\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 ${a}`}case"invalid_value":return r.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 ${H(r.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: ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.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 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${r.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 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${r.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;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 "${r.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]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${L(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.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 ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}}});function m_e(){return{localeError:aqe()}}var aqe,__e=E(()=>{l();me();aqe=()=>{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(r){return e[r]??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"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${a}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${a}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${H(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}}});function g_e(e,t,n,o){let r=Math.abs(e),i=r%10,s=r%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?n:o}function h_e(){return{localeError:cqe()}}var cqe,E_e=E(()=>{l();me();cqe=()=>{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(r){return e[r]??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"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`:`\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 ${a}`}case"invalid_value":return r.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 ${H(r.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 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);if(s){let a=Number(r.maximum),c=g_e(a,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 ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${r.maximum.toString()} ${c}`}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 ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);if(s){let a=Number(r.minimum),c=g_e(a,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 ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${r.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${L(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.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 ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}}});function T_e(){return{localeError:uqe()}}var uqe,S_e=E(()=>{l();me();uqe=()=>{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(r){return e[r]??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"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`:`\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 ${a}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${H(r.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 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${r.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 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${r.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${L(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.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 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}}});function A_e(){return{localeError:lqe()}}var lqe,y_e=E(()=>{l();me();lqe=()=>{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(r){return e[r]??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"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${a}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${a}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${H(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${L(r.values," o ")}`;case"too_big":{let i=r.inclusive?"com a m\xE0xim":"menys de",s=t(r.origin);return s?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${i} ${r.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(r.origin);return s?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${i} ${r.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}}});function R_e(){return{localeError:dqe()}}var dqe,I_e=E(()=>{l();me();dqe=()=>{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(r){return e[r]??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"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${a}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${a}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${H(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${L(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}}});function b_e(){return{localeError:pqe()}}var pqe,N_e=E(()=>{l();me();pqe=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??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"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${a}`:`Ugyldigt input: forventede ${i}, fik ${a}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${H(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin),a=o[r.origin]??r.origin;return s?`For stor: forventede ${a??"value"} ${s.verb} ${i} ${r.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${a??"value"} havde ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin),a=o[r.origin]??r.origin;return s?`For lille: forventede ${a} ${s.verb} ${i} ${r.minimum.toString()} ${s.unit}`:`For lille: forventede ${a} havde ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${L(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}}});function O_e(){return{localeError:fqe()}}var fqe,C_e=E(()=>{l();me();fqe=()=>{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(r){return e[r]??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"},o={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${a}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${a}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${H(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ist`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ist`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${L(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}}});function GO(){return{localeError:mqe()}}var mqe,Nj=E(()=>{l();me();mqe=()=>{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(r){return e[r]??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"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return`Invalid input: expected ${i}, received ${a}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${H(r.values[0])}`:`Invalid option: expected one of ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Too big: expected ${r.origin??"value"} to have ${i}${r.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Too small: expected ${r.origin} to have ${i}${r.minimum.toString()} ${s.unit}`:`Too small: expected ${r.origin} to be ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}}});function v_e(){return{localeError:_qe()}}var _qe,P_e=E(()=>{l();me();_qe=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??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"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${a}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${a}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${H(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${i}${r.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}}});function x_e(){return{localeError:gqe()}}var gqe,M_e=E(()=>{l();me();gqe=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??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"},o={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${a}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${a}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${H(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin),a=o[r.origin]??r.origin;return s?`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${i}${r.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${a??"valor"} fuera ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin),a=o[r.origin]??r.origin;return s?`Demasiado peque\xF1o: se esperaba que ${a} tuviera ${i}${r.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${a} fuera ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}}});function L_e(){return{localeError:hqe()}}var hqe,w_e=E(()=>{l();me();hqe=()=>{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(r){return e[r]??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"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \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 ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${H(r.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 ${L(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=r;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]??r.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 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${L(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.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 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}}});function D_e(){return{localeError:Eqe()}}var Eqe,k_e=E(()=>{l();me();Eqe=()=>{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(r){return e[r]??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"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${a}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${a}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${H(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${r.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${r.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${L(r.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 U_e(){return{localeError:Tqe()}}var Tqe,$_e=E(()=>{l();me();Tqe=()=>{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(r){return e[r]??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"},o={nan:"NaN",number:"nombre",array:"tableau"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${a} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${a} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${H(r.values[0])} attendu`:`Option invalide : une valeur parmi ${L(r.values,"|")} attendue`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Trop grand : ${r.origin??"valeur"} doit ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${r.origin??"valeur"} doit \xEAtre ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Trop petit : ${r.origin} doit ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`Trop petit : ${r.origin} doit \xEAtre ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${L(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}}});function B_e(){return{localeError:Sqe()}}var Sqe,G_e=E(()=>{l();me();Sqe=()=>{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(r){return e[r]??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"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${a}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${a}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${H(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"\u2264":"<",s=t(r.origin);return s?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${i}${r.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"\u2265":">",s=t(r.origin);return s?`Trop petit : attendu que ${r.origin} ait ${i}${r.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${r.origin} soit ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${L(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}}});function j_e(){return{localeError:Aqe()}}var Aqe,V_e=E(()=>{l();me();Aqe=()=>{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=u=>u?e[u]:void 0,o=u=>{let d=n(u);return d?d.label:u??e.unknown.label},r=u=>`\u05D4${o(u)}`,i=u=>(n(u)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=u=>u?t[u]??null:null,a={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"}},c={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let d=u.expected,p=c[d??""]??o(d),f=q(u.input),m=c[f]??e[f]?.label??f;return/^[A-Z]/.test(u.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${u.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`}case"invalid_value":{if(u.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 ${H(u.values[0])}`;let d=u.values.map(m=>H(m));if(u.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 ${d[0]} \u05D0\u05D5 ${d[1]}`;let p=d[d.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 ${d.slice(0,-1).join(", ")} \u05D0\u05D5 ${p}`}case"too_big":{let d=s(u.origin),p=r(u.origin??"value");if(u.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.maximum.toString()} ${d?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(u.origin==="number"){let _=u.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${u.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${_}`}if(u.origin==="array"||u.origin==="set"){let _=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",h=u.inclusive?`${u.maximum} ${d?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${u.maximum} ${d?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} ${_} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let f=u.inclusive?"<=":"<",m=i(u.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${p} ${m} ${f}${u.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${m} ${f}${u.maximum.toString()}`}case"too_small":{let d=s(u.origin),p=r(u.origin??"value");if(u.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.minimum.toString()} ${d?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(u.origin==="number"){let _=u.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${u.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${_}`}if(u.origin==="array"||u.origin==="set"){let _=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){let T=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${_} \u05DC\u05D4\u05DB\u05D9\u05DC ${T}`}let h=u.inclusive?`${u.minimum} ${d?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${u.minimum} ${d?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${_} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let f=u.inclusive?">=":">",m=i(u.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${p} ${m} ${f}${u.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${m} ${f}${u.minimum.toString()}`}case"invalid_format":{let d=u;if(d.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${d.prefix}"`;if(d.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${d.suffix}"`;if(d.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${d.includes}"`;if(d.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 ${d.pattern}`;let p=a[d.format],f=p?.label??d.format,_=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${_}`}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 ${u.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${u.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${u.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${L(u.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${r(u.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}}});function F_e(){return{localeError:yqe()}}var yqe,H_e=E(()=>{l();me();yqe=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??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"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${a}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${a}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${H(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${r.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${i}${r.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}}});function z_e(e,t,n){return Math.abs(e)===1?t:n}function Am(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 q_e(){return{localeError:Rqe()}}var Rqe,Y_e=E(()=>{l();me();Rqe=()=>{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(r){return e[r]??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"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.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 ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`:`\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 ${a}`}case"invalid_value":return r.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 ${H(r.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 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);if(s){let a=Number(r.maximum),c=z_e(a,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 ${Am(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${r.maximum.toString()} ${c}`}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 ${Am(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);if(s){let a=Number(r.minimum),c=z_e(a,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 ${Am(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${r.minimum.toString()} ${c}`}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 ${Am(r.origin)} \u056C\u056B\u0576\u056B ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.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 ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${L(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Am(r.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 ${Am(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}}});function W_e(){return{localeError:Iqe()}}var Iqe,K_e=E(()=>{l();me();Iqe=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??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"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${a}`:`Input tidak valid: diharapkan ${i}, diterima ${a}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${H(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${i}${r.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Terlalu kecil: diharapkan ${r.origin} memiliki ${i}${r.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}}});function Z_e(){return{localeError:bqe()}}var bqe,J_e=E(()=>{l();me();bqe=()=>{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(r){return e[r]??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"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${H(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${i}${r.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${i}${r.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${L(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}}});function X_e(){return{localeError:Nqe()}}var Nqe,Q_e=E(()=>{l();me();Nqe=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??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"},o={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${a}`:`Input non valido: atteso ${i}, ricevuto ${a}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${H(r.values[0])}`:`Opzione non valida: atteso uno tra ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Troppo grande: ${r.origin??"valore"} deve avere ${i}${r.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Troppo piccolo: ${r.origin} deve avere ${i}${r.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${r.origin} deve essere ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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}`:`Invalid ${n[i.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${L(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}}});function ege(){return{localeError:Oqe()}}var Oqe,tge=E(()=>{l();me();Oqe=()=>{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(r){return e[r]??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"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${H(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${L(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(r.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(r.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.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${r.keys.length>1?"\u7FA4":""}: ${L(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}}});function nge(){return{localeError:Cqe()}}var Cqe,rge=E(()=>{l();me();Cqe=()=>{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(r){return e[r]??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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.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 ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`:`\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 ${a}`}case"invalid_value":return r.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 ${H(r.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 ${L(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.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 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${i}${r.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 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.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 ${r.origin} ${s.verb} ${i}${r.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 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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]??r.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 ${r.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${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${L(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.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 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}}});function jO(){return{localeError:vqe()}}var vqe,Oj=E(()=>{l();me();vqe=()=>{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(r){return e[r]??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"},o={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.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 ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`:`\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 ${a}`}case"invalid_value":return r.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 ${H(r.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 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${r.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${L(r.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 ${r.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 ${r.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 oge(){return jO()}var ige=E(()=>{l();Oj()});function sge(){return{localeError:Pqe()}}var Pqe,age=E(()=>{l();me();Pqe=()=>{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(r){return e[r]??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"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${H(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${L(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(r.origin),c=a?.unit??"\uC694\uC18C";return a?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${c} ${i}${s}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${i}${s}`}case"too_small":{let i=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(r.origin),c=a?.unit??"\uC694\uC18C";return a?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${c} ${i}${s}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${i}${s}`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${L(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}}});function cge(e){let t=Math.abs(e),n=t%10,o=t%100;return o>=11&&o<=19||n===0?"many":n===1?"one":"few"}function uge(){return{localeError:xqe()}}var jE,xqe,lge=E(()=>{l();me();jE=e=>e.charAt(0).toUpperCase()+e.slice(1);xqe=()=>{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(r,i,s,a){let c=e[r]??null;return c===null?c:{unit:c.unit[i],verb:c.verb[a][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"},o={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${a}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${a}, o tik\u0117tasi - ${i}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${H(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${L(r.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[r.origin]??r.origin,s=t(r.origin,cge(Number(r.maximum)),r.inclusive??!1,"smaller");if(s?.verb)return`${jE(i??r.origin??"reik\u0161m\u0117")} ${s.verb} ${r.maximum.toString()} ${s.unit??"element\u0173"}`;let a=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${jE(i??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${r.maximum.toString()} ${s?.unit}`}case"too_small":{let i=o[r.origin]??r.origin,s=t(r.origin,cge(Number(r.minimum)),r.inclusive??!1,"bigger");if(s?.verb)return`${jE(i??r.origin??"reik\u0161m\u0117")} ${s.verb} ${r.minimum.toString()} ${s.unit??"element\u0173"}`;let a=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${jE(i??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${r.minimum.toString()} ${s?.unit}`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${L(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=o[r.origin]??r.origin;return`${jE(i??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}}});function dge(){return{localeError:Mqe()}}var Mqe,pge=E(()=>{l();me();Mqe=()=>{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(r){return e[r]??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"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`:`\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 ${a}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${H(r.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 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.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 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${r.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 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${r.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.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 ${r.divisor}`;case"unrecognized_keys":return`${r.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"}: ${L(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.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 ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}}});function fge(){return{localeError:Lqe()}}var Lqe,mge=E(()=>{l();me();Lqe=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??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"},o={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${a}`:`Input tidak sah: dijangka ${i}, diterima ${a}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${H(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Terlalu besar: dijangka ${r.origin??"nilai"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Terlalu kecil: dijangka ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${L(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}}});function _ge(){return{localeError:wqe()}}var wqe,gge=E(()=>{l();me();wqe=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??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"},o={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${a}`:`Ongeldige invoer: verwacht ${i}, ontving ${a}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${H(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin),a=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return s?`Te ${a}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${a}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} is`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin),a=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return s?`Te ${a}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${a}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} is`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}}});function hge(){return{localeError:Dqe()}}var Dqe,Ege=E(()=>{l();me();Dqe=()=>{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(r){return e[r]??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"},o={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${a}`:`Ugyldig input: forventet ${i}, fikk ${a}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${H(r.values[0])}`:`Ugyldig valg: forventet en av ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${L(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}}});function Tge(){return{localeError:kqe()}}var kqe,Sge=E(()=>{l();me();kqe=()=>{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(r){return e[r]??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"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${a}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${a}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${H(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}}});function Age(){return{localeError:Uqe()}}var Uqe,yge=E(()=>{l();me();Uqe=()=>{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(r){return e[r]??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"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \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 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${H(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${L(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=r;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]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${L(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.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 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}}});function Rge(){return{localeError:$qe()}}var $qe,Ige=E(()=>{l();me();$qe=()=>{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(r){return e[r]??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"},o={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${a}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${a}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${H(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${r.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${r.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}}});function bge(){return{localeError:Bqe()}}var Bqe,Nge=E(()=>{l();me();Bqe=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??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"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${a}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${a}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${H(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${i}${r.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Muito pequeno: esperado que ${r.origin} tivesse ${i}${r.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}}});function Oge(e,t,n,o){let r=Math.abs(e),i=r%10,s=r%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?n:o}function Cge(){return{localeError:Gqe()}}var Gqe,vge=E(()=>{l();me();Gqe=()=>{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(r){return e[r]??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"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`:`\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 ${a}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${H(r.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 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);if(s){let a=Number(r.maximum),c=Oge(a,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 ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${r.maximum.toString()} ${c}`}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 ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);if(s){let a=Number(r.minimum),c=Oge(a,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 ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${r.minimum.toString()} ${c}`}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 ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${L(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.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 ${r.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 Pge(){return{localeError:jqe()}}var jqe,xge=E(()=>{l();me();jqe=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??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"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${a}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${a}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${H(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${i}${r.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${i}${r.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${L(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}}});function Mge(){return{localeError:Vqe()}}var Vqe,Lge=E(()=>{l();me();Vqe=()=>{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(r){return e[r]??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"},o={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${a}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${a}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${H(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${L(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}}});function wge(){return{localeError:Fqe()}}var Fqe,Dge=E(()=>{l();me();Fqe=()=>{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(r){return e[r]??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"},o={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.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 ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`:`\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 ${a}`}case"invalid_value":return r.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 ${H(r.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 ${L(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.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 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${r.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 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.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 ${r.origin} ${i}${r.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 ${r.origin} ${i}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.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${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.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`${r.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 kge(){return{localeError:Hqe()}}var Hqe,Uge=E(()=>{l();me();Hqe=()=>{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(r){return e[r]??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"},o={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.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 ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`:`\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 ${a}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${H(r.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 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(r.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(r.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.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 ${r.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: ${L(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.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 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}}});function $ge(){return{localeError:zqe()}}var zqe,Bge=E(()=>{l();me();zqe=()=>{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(r){return e[r]??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"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${a}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${a}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${H(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${i}${r.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${i}${r.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}}});function VO(){return{localeError:qqe()}}var qqe,Cj=E(()=>{l();me();qqe=()=>{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(r){return e[r]??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"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.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 ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`:`\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 ${a}`}case"invalid_value":return r.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 ${H(r.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 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.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 ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${i}${r.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 ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.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 ${r.origin} ${s.verb} ${i}${r.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 ${r.origin} \u0431\u0443\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${L(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.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 ${r.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 Gge(){return VO()}var jge=E(()=>{l();Cj()});function Vge(){return{localeError:Yqe()}}var Yqe,Fge=E(()=>{l();me();Yqe=()=>{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(r){return e[r]??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"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \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 ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${H(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${L(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${r.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: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${i}${r.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${i}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.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${r.keys.length>1?"\u0632":""}: ${L(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}}});function Hge(){return{localeError:Wqe()}}var Wqe,zge=E(()=>{l();me();Wqe=()=>{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"}};function t(r){return e[r]??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"},o={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${a}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${a}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${H(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}}});function qge(){return{localeError:Kqe()}}var Kqe,Yge=E(()=>{l();me();Kqe=()=>{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(r){return e[r]??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"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${H(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.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 ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${L(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.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 ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}}});function Wge(){return{localeError:Zqe()}}var Zqe,Kge=E(()=>{l();me();Zqe=()=>{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(r){return e[r]??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"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${H(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}}});function Zge(){return{localeError:Jqe()}}var Jqe,Jge=E(()=>{l();me();Jqe=()=>{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(r){return e[r]??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"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${a}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${a}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${H(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${L(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}}});function Xge(){return{localeError:Xqe()}}var Xqe,Qge=E(()=>{l();me();Xqe=()=>{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(r){return e[r]??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"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=q(r.input),a=o[s]??s;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${a}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${a}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${H(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${s.verb} ${i}${r.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.maximum}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${s.verb} ${i}${r.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.minimum}`}case"invalid_format":{let i=r;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]??r.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 ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${L(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.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 ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}}});var VE={};ht(VE,{ar:()=>p_e,az:()=>m_e,be:()=>h_e,bg:()=>T_e,ca:()=>A_e,cs:()=>R_e,da:()=>b_e,de:()=>O_e,en:()=>GO,eo:()=>v_e,es:()=>x_e,fa:()=>L_e,fi:()=>D_e,fr:()=>U_e,frCA:()=>B_e,he:()=>j_e,hu:()=>F_e,hy:()=>q_e,id:()=>W_e,is:()=>Z_e,it:()=>X_e,ja:()=>ege,ka:()=>nge,kh:()=>oge,km:()=>jO,ko:()=>sge,lt:()=>uge,mk:()=>dge,ms:()=>fge,nl:()=>_ge,no:()=>hge,ota:()=>Tge,pl:()=>Rge,ps:()=>Age,pt:()=>bge,ru:()=>Cge,sl:()=>Pge,sv:()=>Mge,ta:()=>wge,th:()=>kge,tr:()=>$ge,ua:()=>Gge,uk:()=>VO,ur:()=>Vge,uz:()=>Hge,vi:()=>qge,yo:()=>Xge,zhCN:()=>Wge,zhTW:()=>Zge});var vj=E(()=>{l();f_e();__e();E_e();S_e();y_e();I_e();N_e();C_e();Nj();P_e();M_e();w_e();k_e();$_e();G_e();V_e();H_e();Y_e();K_e();J_e();Q_e();tge();rge();ige();Oj();age();lge();pge();mge();gge();Ege();Sge();yge();Ige();Nge();vge();xge();Lge();Dge();Uge();Bge();jge();Cj();Fge();zge();Yge();Kge();Jge();Qge()});function HO(){return new FO}var ehe,Pj,xj,FO,Dn,FE=E(()=>{l();Pj=Symbol("ZodOutput"),xj=Symbol("ZodInput"),FO=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.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 o={...this.get(n)??{}};delete o.id;let r={...o,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};(ehe=globalThis).__zod_globalRegistry??(ehe.__zod_globalRegistry=HO());Dn=globalThis.__zod_globalRegistry});function Mj(e,t){return new e({type:"string",...W(t)})}function Lj(e,t){return new e({type:"string",coerce:!0,...W(t)})}function zO(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...W(t)})}function HE(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...W(t)})}function qO(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...W(t)})}function YO(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...W(t)})}function WO(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...W(t)})}function KO(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...W(t)})}function zE(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...W(t)})}function ZO(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...W(t)})}function JO(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...W(t)})}function XO(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...W(t)})}function QO(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...W(t)})}function eC(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...W(t)})}function tC(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...W(t)})}function nC(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...W(t)})}function rC(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...W(t)})}function oC(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...W(t)})}function wj(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...W(t)})}function iC(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...W(t)})}function sC(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...W(t)})}function aC(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...W(t)})}function cC(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...W(t)})}function uC(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...W(t)})}function lC(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...W(t)})}function kj(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...W(t)})}function Uj(e,t){return new e({type:"string",format:"date",check:"string_format",...W(t)})}function $j(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...W(t)})}function Bj(e,t){return new e({type:"string",format:"duration",check:"string_format",...W(t)})}function Gj(e,t){return new e({type:"number",checks:[],...W(t)})}function jj(e,t){return new e({type:"number",coerce:!0,checks:[],...W(t)})}function Vj(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...W(t)})}function Fj(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...W(t)})}function Hj(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...W(t)})}function zj(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...W(t)})}function qj(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...W(t)})}function Yj(e,t){return new e({type:"boolean",...W(t)})}function Wj(e,t){return new e({type:"boolean",coerce:!0,...W(t)})}function Kj(e,t){return new e({type:"bigint",...W(t)})}function Zj(e,t){return new e({type:"bigint",coerce:!0,...W(t)})}function Jj(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...W(t)})}function Xj(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...W(t)})}function Qj(e,t){return new e({type:"symbol",...W(t)})}function eV(e,t){return new e({type:"undefined",...W(t)})}function tV(e,t){return new e({type:"null",...W(t)})}function nV(e){return new e({type:"any"})}function rV(e){return new e({type:"unknown"})}function oV(e,t){return new e({type:"never",...W(t)})}function iV(e,t){return new e({type:"void",...W(t)})}function sV(e,t){return new e({type:"date",...W(t)})}function aV(e,t){return new e({type:"date",coerce:!0,...W(t)})}function cV(e,t){return new e({type:"nan",...W(t)})}function Rs(e,t){return new CO({check:"less_than",...W(t),value:e,inclusive:!1})}function lo(e,t){return new CO({check:"less_than",...W(t),value:e,inclusive:!0})}function Is(e,t){return new vO({check:"greater_than",...W(t),value:e,inclusive:!1})}function Ar(e,t){return new vO({check:"greater_than",...W(t),value:e,inclusive:!0})}function dC(e){return Is(0,e)}function pC(e){return Rs(0,e)}function fC(e){return lo(0,e)}function mC(e){return Ar(0,e)}function Kc(e,t){return new WG({check:"multiple_of",...W(t),value:e})}function Zc(e,t){return new JG({check:"max_size",...W(t),maximum:e})}function bs(e,t){return new XG({check:"min_size",...W(t),minimum:e})}function Xl(e,t){return new QG({check:"size_equals",...W(t),size:e})}function Ql(e,t){return new e1({check:"max_length",...W(t),maximum:e})}function Aa(e,t){return new t1({check:"min_length",...W(t),minimum:e})}function ed(e,t){return new n1({check:"length_equals",...W(t),length:e})}function ym(e,t){return new r1({check:"string_format",format:"regex",...W(t),pattern:e})}function Rm(e){return new o1({check:"string_format",format:"lowercase",...W(e)})}function Im(e){return new i1({check:"string_format",format:"uppercase",...W(e)})}function bm(e,t){return new s1({check:"string_format",format:"includes",...W(t),includes:e})}function Nm(e,t){return new a1({check:"string_format",format:"starts_with",...W(t),prefix:e})}function Om(e,t){return new c1({check:"string_format",format:"ends_with",...W(t),suffix:e})}function _C(e,t,n){return new u1({check:"property",property:e,schema:t,...W(n)})}function Cm(e,t){return new l1({check:"mime_type",mime:e,...W(t)})}function Ti(e){return new d1({check:"overwrite",tx:e})}function vm(e){return Ti(t=>t.normalize(e))}function Pm(){return Ti(e=>e.trim())}function xm(){return Ti(e=>e.toLowerCase())}function Mm(){return Ti(e=>e.toUpperCase())}function Lm(){return Ti(e=>aG(e))}function uV(e,t,n){return new e({type:"array",element:t,...W(n)})}function eYe(e,t,n){return new e({type:"union",options:t,...W(n)})}function tYe(e,t,n){return new e({type:"union",options:t,inclusive:!1,...W(n)})}function nYe(e,t,n,o){return new e({type:"union",options:n,discriminator:t,...W(o)})}function rYe(e,t,n){return new e({type:"intersection",left:t,right:n})}function oYe(e,t,n,o){let r=n instanceof be,i=r?o:n,s=r?n:null;return new e({type:"tuple",items:t,rest:s,...W(i)})}function iYe(e,t,n,o){return new e({type:"record",keyType:t,valueType:n,...W(o)})}function sYe(e,t,n,o){return new e({type:"map",keyType:t,valueType:n,...W(o)})}function aYe(e,t,n){return new e({type:"set",valueType:t,...W(n)})}function cYe(e,t,n){let o=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:o,...W(n)})}function uYe(e,t,n){return new e({type:"enum",entries:t,...W(n)})}function lYe(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...W(n)})}function lV(e,t){return new e({type:"file",...W(t)})}function dYe(e,t){return new e({type:"transform",transform:t})}function pYe(e,t){return new e({type:"optional",innerType:t})}function fYe(e,t){return new e({type:"nullable",innerType:t})}function mYe(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():uG(n)}})}function _Ye(e,t,n){return new e({type:"nonoptional",innerType:t,...W(n)})}function gYe(e,t){return new e({type:"success",innerType:t})}function hYe(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function EYe(e,t,n){return new e({type:"pipe",in:t,out:n})}function TYe(e,t){return new e({type:"readonly",innerType:t})}function SYe(e,t,n){return new e({type:"template_literal",parts:t,...W(n)})}function AYe(e,t){return new e({type:"lazy",getter:t})}function yYe(e,t){return new e({type:"promise",innerType:t})}function dV(e,t,n){let o=W(n);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function pV(e,t,n){return new e({type:"custom",check:"custom",fn:t,...W(n)})}function fV(e){let t=the(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(_m(o,n.value,t._zod.def));else{let r=o;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(_m(r))}},e(n.value,n)));return t}function the(e,t){let n=new dt({check:"custom",...W(t)});return n._zod.check=e,n}function mV(e){let t=new dt({check:"describe"});return t._zod.onattach=[n=>{let o=Dn.get(n)??{};Dn.add(n,{...o,description:e})}],t._zod.check=()=>{},t}function _V(e){let t=new dt({check:"meta"});return t._zod.onattach=[n=>{let o=Dn.get(n)??{};Dn.add(n,{...o,...e})}],t._zod.check=()=>{},t}function gV(e,t){let n=W(t),o=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(o=o.map(m=>typeof m=="string"?m.toLowerCase():m),r=r.map(m=>typeof m=="string"?m.toLowerCase():m));let i=new Set(o),s=new Set(r),a=e.Codec??GE,c=e.Boolean??$E,u=e.String??Jl,d=new u({type:"string",error:n.error}),p=new c({type:"boolean",error:n.error}),f=new a({type:"pipe",in:d,out:p,transform:((m,_)=>{let h=m;return n.case!=="sensitive"&&(h=h.toLowerCase()),i.has(h)?!0:s.has(h)?!1:(_.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:_.value,inst:f,continue:!1}),{})}),reverseTransform:((m,_)=>m===!0?o[0]||"true":r[0]||"false"),error:n.error});return f}function wm(e,t,n,o={}){let r=W(o),i={...W(o),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:a=>n.test(a),...r};return n instanceof RegExp&&(i.pattern=n),new e(i)}var Dj,nhe=E(()=>{l();PO();FE();bj();me();Dj={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function Jc(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??Dn,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 tt(e,t,n={path:[],schemaPath:[]}){var o;let r=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 a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{let d={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,d);else{let f=s.schema,m=t.processors[r.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);m(e,t,f,d)}let p=e._zod.parent;p&&(s.ref||(s.ref=p),tt(p,t,d),t.seen.get(p).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(s.schema,c),t.io==="input"&&yr(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((o=s.schema).default??(o.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function Xc(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let s of e.seen.entries()){let a=e.metadataRegistry.get(s[0])?.id;if(a){let c=o.get(a);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(a,s[0])}}let r=s=>{let a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(s[0])?.id,f=e.external.uri??(_=>_);if(p)return{ref:f(p)};let m=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=m,{defId:m,ref:`${f("__shared")}#/${a}/${m}`}}if(s[1]===n)return{ref:"#"};let u=`#/${a}/`,d=s[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:u+d}},i=s=>{if(s[1].schema.$ref)return;let a=s[1],{ref:c,defId:u}=r(s);a.def={...a.schema},u&&(a.defId=u);let d=a.schema;for(let p in d)delete d[p];d.$ref=c};if(e.cycles==="throw")for(let s of e.seen.entries()){let a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
|
|
842
|
+
|
|
843
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let a=s[1];if(t===s[0]){i(s);continue}if(e.external){let u=e.external.registry.get(s[0])?.id;if(t!==s[0]&&u){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1&&e.reused==="ref"){i(s);continue}}}function Qc(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=s=>{let a=e.seen.get(s);if(a.ref===null)return;let c=a.def??a.schema,u={...c},d=a.ref;if(a.ref=null,d){o(d);let f=e.seen.get(d),m=f.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(m)):Object.assign(c,m),Object.assign(c,u),s._zod.parent===d)for(let h in c)h==="$ref"||h==="allOf"||h in u||delete c[h];if(m.$ref&&f.def)for(let h in c)h==="$ref"||h==="allOf"||h in f.def&&JSON.stringify(c[h])===JSON.stringify(f.def[h])&&delete c[h]}let p=s._zod.parent;if(p&&p!==d){o(p);let f=e.seen.get(p);if(f?.schema.$ref&&(c.$ref=f.schema.$ref,f.def))for(let m in c)m==="$ref"||m==="allOf"||m in f.def&&JSON.stringify(c[m])===JSON.stringify(f.def[m])&&delete c[m]}e.override({zodSchema:s,jsonSchema:c,path:a.path??[]})};for(let s of[...e.seen.entries()].reverse())o(s[0]);let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(s)}Object.assign(r,n.def??n.schema);let i=e.external?.defs??{};for(let s of e.seen.entries()){let a=s[1];a.def&&a.defId&&(i[a.defId]=a.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?r.$defs=i:r.definitions=i);try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Dm(t,"input",e.processors),output:Dm(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function yr(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return yr(o.element,n);if(o.type==="set")return yr(o.valueType,n);if(o.type==="lazy")return yr(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return yr(o.innerType,n);if(o.type==="intersection")return yr(o.left,n)||yr(o.right,n);if(o.type==="record"||o.type==="map")return yr(o.keyType,n)||yr(o.valueType,n);if(o.type==="pipe")return yr(o.in,n)||yr(o.out,n);if(o.type==="object"){for(let r in o.shape)if(yr(o.shape[r],n))return!0;return!1}if(o.type==="union"){for(let r of o.options)if(yr(r,n))return!0;return!1}if(o.type==="tuple"){for(let r of o.items)if(yr(r,n))return!0;return!!(o.rest&&yr(o.rest,n))}return!1}var hV,Dm,qE=E(()=>{l();FE();hV=(e,t={})=>n=>{let o=Jc({...n,processors:t});return tt(e,o),Xc(o,e),Qc(o,e)},Dm=(e,t,n={})=>o=>{let{libraryOptions:r,target:i}=o??{},s=Jc({...r??{},target:i,io:t,processors:n});return tt(e,s),Xc(s,e),Qc(s,e)}});function TC(e,t){if("_idmap"in e){let o=e,r=Jc({...t,processors:gC}),i={};for(let c of o._idmap.entries()){let[u,d]=c;tt(d,r)}let s={},a={registry:o,uri:t?.uri,defs:i};r.external=a;for(let c of o._idmap.entries()){let[u,d]=c;Xc(r,d),s[u]=Qc(r,d)}if(Object.keys(i).length>0){let c=r.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:i}}return{schemas:s}}let n=Jc({...t,processors:gC});return tt(e,n),Xc(n,e),Qc(n,e)}var RYe,EV,TV,SV,AV,yV,RV,IV,bV,NV,OV,CV,vV,PV,xV,MV,LV,wV,DV,kV,UV,$V,BV,GV,jV,VV,hC,FV,HV,zV,qV,YV,WV,KV,ZV,JV,XV,QV,EC,eF,gC,YE=E(()=>{l();qE();me();RYe={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},EV=(e,t,n,o)=>{let r=n;r.type="string";let{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof i=="number"&&(r.minLength=i),typeof s=="number"&&(r.maxLength=s),a&&(r.format=RYe[a]??a,r.format===""&&delete r.format,a==="time"&&delete r.format),u&&(r.contentEncoding=u),c&&c.size>0){let d=[...c];d.length===1?r.pattern=d[0].source:d.length>1&&(r.allOf=[...d.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},TV=(e,t,n,o)=>{let r=n,{minimum:i,maximum:s,format:a,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:d}=e._zod.bag;typeof a=="string"&&a.includes("int")?r.type="integer":r.type="number",typeof d=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.minimum=d,r.exclusiveMinimum=!0):r.exclusiveMinimum=d),typeof i=="number"&&(r.minimum=i,typeof d=="number"&&t.target!=="draft-04"&&(d>=i?delete r.minimum:delete r.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.maximum=u,r.exclusiveMaximum=!0):r.exclusiveMaximum=u),typeof s=="number"&&(r.maximum=s,typeof u=="number"&&t.target!=="draft-04"&&(u<=s?delete r.maximum:delete r.exclusiveMaximum)),typeof c=="number"&&(r.multipleOf=c)},SV=(e,t,n,o)=>{n.type="boolean"},AV=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},yV=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},RV=(e,t,n,o)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},IV=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},bV=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},NV=(e,t,n,o)=>{n.not={}},OV=(e,t,n,o)=>{},CV=(e,t,n,o)=>{},vV=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},PV=(e,t,n,o)=>{let r=e._zod.def,i=OE(r.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},xV=(e,t,n,o)=>{let r=e._zod.def,i=[];for(let s of r.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},MV=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},LV=(e,t,n,o)=>{let r=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=i.source},wV=(e,t,n,o)=>{let r=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:c}=e._zod.bag;s!==void 0&&(i.minLength=s),a!==void 0&&(i.maxLength=a),c?c.length===1?(i.contentMediaType=c[0],Object.assign(r,i)):(Object.assign(r,i),r.anyOf=c.map(u=>({contentMediaType:u}))):Object.assign(r,i)},DV=(e,t,n,o)=>{n.type="boolean"},kV=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},UV=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},$V=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},BV=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},GV=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},jV=(e,t,n,o)=>{let r=n,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(r.minItems=s),typeof a=="number"&&(r.maxItems=a),r.type="array",r.items=tt(i.element,t,{...o,path:[...o.path,"items"]})},VV=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object",r.properties={};let s=i.shape;for(let u in s)r.properties[u]=tt(s[u],t,{...o,path:[...o.path,"properties",u]});let a=new Set(Object.keys(s)),c=new Set([...a].filter(u=>{let d=i.shape[u]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));c.size>0&&(r.required=Array.from(c)),i.catchall?._zod.def.type==="never"?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=tt(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},hC=(e,t,n,o)=>{let r=e._zod.def,i=r.inclusive===!1,s=r.options.map((a,c)=>tt(a,t,{...o,path:[...o.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=s:n.anyOf=s},FV=(e,t,n,o)=>{let r=e._zod.def,i=tt(r.left,t,{...o,path:[...o.path,"allOf",0]}),s=tt(r.right,t,{...o,path:[...o.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];n.allOf=c},HV=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((f,m)=>tt(f,t,{...o,path:[...o.path,s,m]})),u=i.rest?tt(i.rest,t,{...o,path:[...o.path,a,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=c,u&&(r.items=u)):t.target==="openapi-3.0"?(r.items={anyOf:c},u&&r.items.anyOf.push(u),r.minItems=c.length,u||(r.maxItems=c.length)):(r.items=c,u&&(r.additionalItems=u));let{minimum:d,maximum:p}=e._zod.bag;typeof d=="number"&&(r.minItems=d),typeof p=="number"&&(r.maxItems=p)},zV=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object";let s=i.keyType,c=s._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){let d=tt(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(let p of c)r.patternProperties[p.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=tt(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),r.additionalProperties=tt(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let u=s._zod.values;if(u){let d=[...u].filter(p=>typeof p=="string"||typeof p=="number");d.length>0&&(r.required=d)}},qV=(e,t,n,o)=>{let r=e._zod.def,i=tt(r.innerType,t,o),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=r.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},YV=(e,t,n,o)=>{let r=e._zod.def;tt(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},WV=(e,t,n,o)=>{let r=e._zod.def;tt(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},KV=(e,t,n,o)=>{let r=e._zod.def;tt(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},ZV=(e,t,n,o)=>{let r=e._zod.def;tt(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType;let s;try{s=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},JV=(e,t,n,o)=>{let r=e._zod.def,i=t.io==="input"?r.in._zod.def.type==="transform"?r.out:r.in:r.out;tt(i,t,o);let s=t.seen.get(e);s.ref=i},XV=(e,t,n,o)=>{let r=e._zod.def;tt(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.readOnly=!0},QV=(e,t,n,o)=>{let r=e._zod.def;tt(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},EC=(e,t,n,o)=>{let r=e._zod.def;tt(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},eF=(e,t,n,o)=>{let r=e._zod.innerType;tt(r,t,o);let i=t.seen.get(e);i.ref=r},gC={string:EV,number:TV,boolean:SV,bigint:AV,symbol:yV,null:RV,undefined:IV,void:bV,never:NV,any:OV,unknown:CV,date:vV,enum:PV,literal:xV,nan:MV,template_literal:LV,file:wV,success:DV,custom:kV,function:UV,transform:$V,map:BV,set:GV,array:jV,object:VV,union:hC,intersection:FV,tuple:HV,record:zV,nullable:qV,nonoptional:YV,default:WV,prefault:KV,catch:ZV,pipe:JV,readonly:XV,promise:QV,optional:EC,lazy:eF}});var SC,rhe=E(()=>{l();YE();qE();SC=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=Jc({processors:gC,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 tt(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)),Xc(this.ctx,t);let o=Qc(this.ctx,t),{"~standard":r,...i}=o;return i}}});var ohe={};var ihe=E(()=>{l()});var ya={};ht(ya,{$ZodAny:()=>Y1,$ZodArray:()=>X1,$ZodAsyncError:()=>Ei,$ZodBase64:()=>U1,$ZodBase64URL:()=>$1,$ZodBigInt:()=>UO,$ZodBigIntFormat:()=>F1,$ZodBoolean:()=>$E,$ZodCIDRv4:()=>w1,$ZodCIDRv6:()=>D1,$ZodCUID:()=>y1,$ZodCUID2:()=>R1,$ZodCatch:()=>gj,$ZodCheck:()=>dt,$ZodCheckBigIntFormat:()=>ZG,$ZodCheckEndsWith:()=>c1,$ZodCheckGreaterThan:()=>vO,$ZodCheckIncludes:()=>s1,$ZodCheckLengthEquals:()=>n1,$ZodCheckLessThan:()=>CO,$ZodCheckLowerCase:()=>o1,$ZodCheckMaxLength:()=>e1,$ZodCheckMaxSize:()=>JG,$ZodCheckMimeType:()=>l1,$ZodCheckMinLength:()=>t1,$ZodCheckMinSize:()=>XG,$ZodCheckMultipleOf:()=>WG,$ZodCheckNumberFormat:()=>KG,$ZodCheckOverwrite:()=>d1,$ZodCheckProperty:()=>u1,$ZodCheckRegex:()=>r1,$ZodCheckSizeEquals:()=>QG,$ZodCheckStartsWith:()=>a1,$ZodCheckStringFormat:()=>Sm,$ZodCheckUpperCase:()=>i1,$ZodCodec:()=>GE,$ZodCustom:()=>Ij,$ZodCustomStringFormat:()=>j1,$ZodDate:()=>J1,$ZodDefault:()=>pj,$ZodDiscriminatedUnion:()=>tj,$ZodE164:()=>B1,$ZodEmail:()=>E1,$ZodEmoji:()=>S1,$ZodEncodeError:()=>Hc,$ZodEnum:()=>sj,$ZodError:()=>ME,$ZodExactOptional:()=>lj,$ZodFile:()=>cj,$ZodFunction:()=>Aj,$ZodGUID:()=>g1,$ZodIPv4:()=>x1,$ZodIPv6:()=>M1,$ZodISODate:()=>C1,$ZodISODateTime:()=>O1,$ZodISODuration:()=>P1,$ZodISOTime:()=>v1,$ZodIntersection:()=>nj,$ZodJWT:()=>G1,$ZodKSUID:()=>N1,$ZodLazy:()=>Rj,$ZodLiteral:()=>aj,$ZodMAC:()=>L1,$ZodMap:()=>oj,$ZodNaN:()=>hj,$ZodNanoID:()=>A1,$ZodNever:()=>K1,$ZodNonOptional:()=>mj,$ZodNull:()=>q1,$ZodNullable:()=>dj,$ZodNumber:()=>kO,$ZodNumberFormat:()=>V1,$ZodObject:()=>d_e,$ZodObjectJIT:()=>Q1,$ZodOptional:()=>BO,$ZodPipe:()=>Ej,$ZodPrefault:()=>fj,$ZodPromise:()=>yj,$ZodReadonly:()=>Tj,$ZodRealError:()=>Fr,$ZodRecord:()=>rj,$ZodRegistry:()=>FO,$ZodSet:()=>ij,$ZodString:()=>Jl,$ZodStringFormat:()=>at,$ZodSuccess:()=>_j,$ZodSymbol:()=>H1,$ZodTemplateLiteral:()=>Sj,$ZodTransform:()=>uj,$ZodTuple:()=>$O,$ZodType:()=>be,$ZodULID:()=>I1,$ZodURL:()=>T1,$ZodUUID:()=>h1,$ZodUndefined:()=>z1,$ZodUnion:()=>BE,$ZodUnknown:()=>W1,$ZodVoid:()=>Z1,$ZodXID:()=>b1,$ZodXor:()=>ej,$brand:()=>pO,$constructor:()=>M,$input:()=>xj,$output:()=>Pj,Doc:()=>UE,JSONSchema:()=>ohe,JSONSchemaGenerator:()=>SC,NEVER:()=>rG,TimePrecision:()=>Dj,_any:()=>nV,_array:()=>uV,_base64:()=>aC,_base64url:()=>cC,_bigint:()=>Kj,_boolean:()=>Yj,_catch:()=>hYe,_check:()=>the,_cidrv4:()=>iC,_cidrv6:()=>sC,_coercedBigint:()=>Zj,_coercedBoolean:()=>Wj,_coercedDate:()=>aV,_coercedNumber:()=>jj,_coercedString:()=>Lj,_cuid:()=>XO,_cuid2:()=>QO,_custom:()=>dV,_date:()=>sV,_decode:()=>EO,_decodeAsync:()=>SO,_default:()=>mYe,_discriminatedUnion:()=>nYe,_e164:()=>uC,_email:()=>zO,_emoji:()=>ZO,_encode:()=>hO,_encodeAsync:()=>TO,_endsWith:()=>Om,_enum:()=>cYe,_file:()=>lV,_float32:()=>Fj,_float64:()=>Hj,_gt:()=>Is,_gte:()=>Ar,_guid:()=>HE,_includes:()=>bm,_int:()=>Vj,_int32:()=>zj,_int64:()=>Jj,_intersection:()=>rYe,_ipv4:()=>rC,_ipv6:()=>oC,_isoDate:()=>Uj,_isoDateTime:()=>kj,_isoDuration:()=>Bj,_isoTime:()=>$j,_jwt:()=>lC,_ksuid:()=>nC,_lazy:()=>AYe,_length:()=>ed,_literal:()=>lYe,_lowercase:()=>Rm,_lt:()=>Rs,_lte:()=>lo,_mac:()=>wj,_map:()=>sYe,_max:()=>lo,_maxLength:()=>Ql,_maxSize:()=>Zc,_mime:()=>Cm,_min:()=>Ar,_minLength:()=>Aa,_minSize:()=>bs,_multipleOf:()=>Kc,_nan:()=>cV,_nanoid:()=>JO,_nativeEnum:()=>uYe,_negative:()=>pC,_never:()=>oV,_nonnegative:()=>mC,_nonoptional:()=>_Ye,_nonpositive:()=>fC,_normalize:()=>vm,_null:()=>tV,_nullable:()=>fYe,_number:()=>Gj,_optional:()=>pYe,_overwrite:()=>Ti,_parse:()=>gm,_parseAsync:()=>hm,_pipe:()=>EYe,_positive:()=>dC,_promise:()=>yYe,_property:()=>_C,_readonly:()=>TYe,_record:()=>iYe,_refine:()=>pV,_regex:()=>ym,_safeDecode:()=>yO,_safeDecodeAsync:()=>IO,_safeEncode:()=>AO,_safeEncodeAsync:()=>RO,_safeParse:()=>Em,_safeParseAsync:()=>Tm,_set:()=>aYe,_size:()=>Xl,_slugify:()=>Lm,_startsWith:()=>Nm,_string:()=>Mj,_stringFormat:()=>wm,_stringbool:()=>gV,_success:()=>gYe,_superRefine:()=>fV,_symbol:()=>Qj,_templateLiteral:()=>SYe,_toLowerCase:()=>xm,_toUpperCase:()=>Mm,_transform:()=>dYe,_trim:()=>Pm,_tuple:()=>oYe,_uint32:()=>qj,_uint64:()=>Xj,_ulid:()=>eC,_undefined:()=>eV,_union:()=>eYe,_unknown:()=>rV,_uppercase:()=>Im,_url:()=>zE,_uuid:()=>qO,_uuidv4:()=>YO,_uuidv6:()=>WO,_uuidv7:()=>KO,_void:()=>iV,_xid:()=>tC,_xor:()=>tYe,clone:()=>Sr,config:()=>Gt,createStandardJSONSchemaMethod:()=>Dm,createToJSONSchemaMethod:()=>hV,decode:()=>bze,decodeAsync:()=>Oze,describe:()=>mV,encode:()=>Ize,encodeAsync:()=>Nze,extractDefs:()=>Xc,finalize:()=>Qc,flattenError:()=>LE,formatError:()=>wE,globalConfig:()=>bE,globalRegistry:()=>Dn,initializeContext:()=>Jc,isValidBase64:()=>k1,isValidBase64URL:()=>a_e,isValidJWT:()=>c_e,locales:()=>VE,meta:()=>_V,parse:()=>_O,parseAsync:()=>gO,prettifyError:()=>_G,process:()=>tt,regexes:()=>zo,registry:()=>HO,safeDecode:()=>vze,safeDecodeAsync:()=>xze,safeEncode:()=>Cze,safeEncodeAsync:()=>Pze,safeParse:()=>hG,safeParseAsync:()=>EG,toDotPath:()=>Fme,toJSONSchema:()=>TC,treeifyError:()=>mG,util:()=>Y,version:()=>f1});var Hr=E(()=>{l();pm();TG();gG();bj();PO();m1();me();OO();vj();FE();p1();nhe();qE();YE();rhe();ihe()});var AC={};ht(AC,{endsWith:()=>Om,gt:()=>Is,gte:()=>Ar,includes:()=>bm,length:()=>ed,lowercase:()=>Rm,lt:()=>Rs,lte:()=>lo,maxLength:()=>Ql,maxSize:()=>Zc,mime:()=>Cm,minLength:()=>Aa,minSize:()=>bs,multipleOf:()=>Kc,negative:()=>pC,nonnegative:()=>mC,nonpositive:()=>fC,normalize:()=>vm,overwrite:()=>Ti,positive:()=>dC,property:()=>_C,regex:()=>ym,size:()=>Xl,slugify:()=>Lm,startsWith:()=>Nm,toLowerCase:()=>xm,toUpperCase:()=>Mm,trim:()=>Pm,uppercase:()=>Im});var yC=E(()=>{l();Hr()});var km={};ht(km,{ZodISODate:()=>IC,ZodISODateTime:()=>RC,ZodISODuration:()=>NC,ZodISOTime:()=>bC,date:()=>nF,datetime:()=>tF,duration:()=>oF,time:()=>rF});function tF(e){return kj(RC,e)}function nF(e){return Uj(IC,e)}function rF(e){return $j(bC,e)}function oF(e){return Bj(NC,e)}var RC,IC,bC,NC,WE=E(()=>{l();Hr();ZE();RC=M("ZodISODateTime",(e,t)=>{O1.init(e,t),ct.init(e,t)});IC=M("ZodISODate",(e,t)=>{C1.init(e,t),ct.init(e,t)});bC=M("ZodISOTime",(e,t)=>{v1.init(e,t),ct.init(e,t)});NC=M("ZodISODuration",(e,t)=>{P1.init(e,t),ct.init(e,t)})});var she,bYe,zr,iF=E(()=>{l();Hr();Hr();me();she=(e,t)=>{ME.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>wE(e,n)},flatten:{value:n=>LE(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,fm,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,fm,2)}},isEmpty:{get(){return e.issues.length===0}}})},bYe=M("ZodError",she),zr=M("ZodError",she,{Parent:Error})});var sF,aF,cF,uF,lF,dF,pF,fF,mF,_F,gF,hF,EF=E(()=>{l();Hr();iF();sF=gm(zr),aF=hm(zr),cF=Em(zr),uF=Tm(zr),lF=hO(zr),dF=EO(zr),pF=TO(zr),fF=SO(zr),mF=AO(zr),_F=yO(zr),gF=RO(zr),hF=IO(zr)});var KE={};ht(KE,{ZodAny:()=>NF,ZodArray:()=>PF,ZodBase64:()=>VC,ZodBase64URL:()=>FC,ZodBigInt:()=>Vm,ZodBigIntFormat:()=>qC,ZodBoolean:()=>jm,ZodCIDRv4:()=>GC,ZodCIDRv6:()=>jC,ZodCUID:()=>LC,ZodCUID2:()=>wC,ZodCatch:()=>XF,ZodCodec:()=>ev,ZodCustom:()=>aT,ZodCustomStringFormat:()=>Bm,ZodDate:()=>nT,ZodDefault:()=>qF,ZodDiscriminatedUnion:()=>MF,ZodE164:()=>HC,ZodEmail:()=>PC,ZodEmoji:()=>xC,ZodEnum:()=>Um,ZodExactOptional:()=>FF,ZodFile:()=>jF,ZodFunction:()=>aH,ZodGUID:()=>JE,ZodIPv4:()=>$C,ZodIPv6:()=>BC,ZodIntersection:()=>LF,ZodJWT:()=>zC,ZodKSUID:()=>UC,ZodLazy:()=>oH,ZodLiteral:()=>GF,ZodMAC:()=>TF,ZodMap:()=>$F,ZodNaN:()=>eH,ZodNanoID:()=>MC,ZodNever:()=>CF,ZodNonOptional:()=>XC,ZodNull:()=>IF,ZodNullable:()=>zF,ZodNumber:()=>Gm,ZodNumberFormat:()=>nd,ZodObject:()=>oT,ZodOptional:()=>JC,ZodPipe:()=>QC,ZodPrefault:()=>WF,ZodPromise:()=>sH,ZodReadonly:()=>tH,ZodRecord:()=>sT,ZodSet:()=>BF,ZodString:()=>$m,ZodStringFormat:()=>ct,ZodSuccess:()=>JF,ZodSymbol:()=>yF,ZodTemplateLiteral:()=>rH,ZodTransform:()=>VF,ZodTuple:()=>DF,ZodType:()=>xe,ZodULID:()=>DC,ZodURL:()=>tT,ZodUUID:()=>Ns,ZodUndefined:()=>RF,ZodUnion:()=>iT,ZodUnknown:()=>OF,ZodVoid:()=>vF,ZodXID:()=>kC,ZodXor:()=>xF,_ZodString:()=>vC,_default:()=>YF,_function:()=>pEe,any:()=>Hhe,array:()=>rT,base64:()=>Ohe,base64url:()=>Che,bigint:()=>Bhe,boolean:()=>AF,catch:()=>QF,check:()=>fEe,cidrv4:()=>bhe,cidrv6:()=>Nhe,codec:()=>uEe,cuid:()=>hhe,cuid2:()=>Ehe,custom:()=>mEe,date:()=>qhe,describe:()=>_Ee,discriminatedUnion:()=>Xhe,e164:()=>vhe,email:()=>ahe,emoji:()=>_he,enum:()=>KC,exactOptional:()=>HF,file:()=>iEe,float32:()=>Dhe,float64:()=>khe,function:()=>pEe,guid:()=>che,hash:()=>whe,hex:()=>Lhe,hostname:()=>Mhe,httpUrl:()=>mhe,instanceof:()=>hEe,int:()=>CC,int32:()=>Uhe,int64:()=>Ghe,intersection:()=>wF,ipv4:()=>yhe,ipv6:()=>Ihe,json:()=>TEe,jwt:()=>Phe,keyof:()=>Yhe,ksuid:()=>Ahe,lazy:()=>iH,literal:()=>oEe,looseObject:()=>Zhe,looseRecord:()=>eEe,mac:()=>Rhe,map:()=>tEe,meta:()=>gEe,nan:()=>cEe,nanoid:()=>ghe,nativeEnum:()=>rEe,never:()=>YC,nonoptional:()=>ZF,null:()=>bF,nullable:()=>QE,nullish:()=>sEe,number:()=>SF,object:()=>Whe,optional:()=>XE,partialRecord:()=>Qhe,pipe:()=>eT,prefault:()=>KF,preprocess:()=>SEe,promise:()=>dEe,readonly:()=>nH,record:()=>UF,refine:()=>cH,set:()=>nEe,strictObject:()=>Khe,string:()=>OC,stringFormat:()=>xhe,stringbool:()=>EEe,success:()=>aEe,superRefine:()=>uH,symbol:()=>Vhe,templateLiteral:()=>lEe,transform:()=>ZC,tuple:()=>kF,uint32:()=>$he,uint64:()=>jhe,ulid:()=>The,undefined:()=>Fhe,union:()=>WC,unknown:()=>td,url:()=>fhe,uuid:()=>uhe,uuidv4:()=>lhe,uuidv6:()=>dhe,uuidv7:()=>phe,void:()=>zhe,xid:()=>She,xor:()=>Jhe});function OC(e){return Mj($m,e)}function ahe(e){return zO(PC,e)}function che(e){return HE(JE,e)}function uhe(e){return qO(Ns,e)}function lhe(e){return YO(Ns,e)}function dhe(e){return WO(Ns,e)}function phe(e){return KO(Ns,e)}function fhe(e){return zE(tT,e)}function mhe(e){return zE(tT,{protocol:/^https?$/,hostname:zo.domain,...Y.normalizeParams(e)})}function _he(e){return ZO(xC,e)}function ghe(e){return JO(MC,e)}function hhe(e){return XO(LC,e)}function Ehe(e){return QO(wC,e)}function The(e){return eC(DC,e)}function She(e){return tC(kC,e)}function Ahe(e){return nC(UC,e)}function yhe(e){return rC($C,e)}function Rhe(e){return wj(TF,e)}function Ihe(e){return oC(BC,e)}function bhe(e){return iC(GC,e)}function Nhe(e){return sC(jC,e)}function Ohe(e){return aC(VC,e)}function Che(e){return cC(FC,e)}function vhe(e){return uC(HC,e)}function Phe(e){return lC(zC,e)}function xhe(e,t,n={}){return wm(Bm,e,t,n)}function Mhe(e){return wm(Bm,"hostname",zo.hostname,e)}function Lhe(e){return wm(Bm,"hex",zo.hex,e)}function whe(e,t){let n=t?.enc??"hex",o=`${e}_${n}`,r=zo[o];if(!r)throw new Error(`Unrecognized hash format: ${o}`);return wm(Bm,o,r,t)}function SF(e){return Gj(Gm,e)}function CC(e){return Vj(nd,e)}function Dhe(e){return Fj(nd,e)}function khe(e){return Hj(nd,e)}function Uhe(e){return zj(nd,e)}function $he(e){return qj(nd,e)}function AF(e){return Yj(jm,e)}function Bhe(e){return Kj(Vm,e)}function Ghe(e){return Jj(qC,e)}function jhe(e){return Xj(qC,e)}function Vhe(e){return Qj(yF,e)}function Fhe(e){return eV(RF,e)}function bF(e){return tV(IF,e)}function Hhe(){return nV(NF)}function td(){return rV(OF)}function YC(e){return oV(CF,e)}function zhe(e){return iV(vF,e)}function qhe(e){return sV(nT,e)}function rT(e,t){return uV(PF,e,t)}function Yhe(e){let t=e._zod.def.shape;return KC(Object.keys(t))}function Whe(e,t){let n={type:"object",shape:e??{},...Y.normalizeParams(t)};return new oT(n)}function Khe(e,t){return new oT({type:"object",shape:e,catchall:YC(),...Y.normalizeParams(t)})}function Zhe(e,t){return new oT({type:"object",shape:e,catchall:td(),...Y.normalizeParams(t)})}function WC(e,t){return new iT({type:"union",options:e,...Y.normalizeParams(t)})}function Jhe(e,t){return new xF({type:"union",options:e,inclusive:!1,...Y.normalizeParams(t)})}function Xhe(e,t,n){return new MF({type:"union",options:t,discriminator:e,...Y.normalizeParams(n)})}function wF(e,t){return new LF({type:"intersection",left:e,right:t})}function kF(e,t,n){let o=t instanceof be,r=o?n:t,i=o?t:null;return new DF({type:"tuple",items:e,rest:i,...Y.normalizeParams(r)})}function UF(e,t,n){return new sT({type:"record",keyType:e,valueType:t,...Y.normalizeParams(n)})}function Qhe(e,t,n){let o=Sr(e);return o._zod.values=void 0,new sT({type:"record",keyType:o,valueType:t,...Y.normalizeParams(n)})}function eEe(e,t,n){return new sT({type:"record",keyType:e,valueType:t,mode:"loose",...Y.normalizeParams(n)})}function tEe(e,t,n){return new $F({type:"map",keyType:e,valueType:t,...Y.normalizeParams(n)})}function nEe(e,t){return new BF({type:"set",valueType:e,...Y.normalizeParams(t)})}function KC(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Um({type:"enum",entries:n,...Y.normalizeParams(t)})}function rEe(e,t){return new Um({type:"enum",entries:e,...Y.normalizeParams(t)})}function oEe(e,t){return new GF({type:"literal",values:Array.isArray(e)?e:[e],...Y.normalizeParams(t)})}function iEe(e){return lV(jF,e)}function ZC(e){return new VF({type:"transform",transform:e})}function XE(e){return new JC({type:"optional",innerType:e})}function HF(e){return new FF({type:"optional",innerType:e})}function QE(e){return new zF({type:"nullable",innerType:e})}function sEe(e){return XE(QE(e))}function YF(e,t){return new qF({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Y.shallowClone(t)}})}function KF(e,t){return new WF({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Y.shallowClone(t)}})}function ZF(e,t){return new XC({type:"nonoptional",innerType:e,...Y.normalizeParams(t)})}function aEe(e){return new JF({type:"success",innerType:e})}function QF(e,t){return new XF({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function cEe(e){return cV(eH,e)}function eT(e,t){return new QC({type:"pipe",in:e,out:t})}function uEe(e,t,n){return new ev({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function nH(e){return new tH({type:"readonly",innerType:e})}function lEe(e,t){return new rH({type:"template_literal",parts:e,...Y.normalizeParams(t)})}function iH(e){return new oH({type:"lazy",getter:e})}function dEe(e){return new sH({type:"promise",innerType:e})}function pEe(e){return new aH({type:"function",input:Array.isArray(e?.input)?kF(e?.input):e?.input??rT(td()),output:e?.output??td()})}function fEe(e){let t=new dt({check:"custom"});return t._zod.check=e,t}function mEe(e,t){return dV(aT,e??(()=>!0),t)}function cH(e,t={}){return pV(aT,e,t)}function uH(e){return fV(e)}function hEe(e,t={}){let n=new aT({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...Y.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]})},n}function TEe(e){let t=iH(()=>WC([OC(e),SF(),AF(),bF(),rT(t),UF(OC(),t)]));return t}function SEe(e,t){return eT(ZC(e),t)}var xe,vC,$m,ct,PC,JE,Ns,tT,xC,MC,LC,wC,DC,kC,UC,$C,TF,BC,GC,jC,VC,FC,HC,zC,Bm,Gm,nd,jm,Vm,qC,yF,RF,IF,NF,OF,CF,vF,nT,PF,oT,iT,xF,MF,LF,DF,sT,$F,BF,Um,GF,jF,VF,JC,FF,zF,qF,WF,XC,JF,XF,eH,QC,ev,tH,rH,oH,sH,aH,aT,_Ee,gEe,EEe,ZE=E(()=>{l();Hr();Hr();YE();qE();yC();WE();EF();xe=M("ZodType",(e,t)=>(be.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Dm(e,"input"),output:Dm(e,"output")}}),e.toJSONSchema=hV(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Y.mergeDefs(t,{checks:[...t.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),e.with=e.check,e.clone=(n,o)=>Sr(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.parse=(n,o)=>sF(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>cF(e,n,o),e.parseAsync=async(n,o)=>aF(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>uF(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>lF(e,n,o),e.decode=(n,o)=>dF(e,n,o),e.encodeAsync=async(n,o)=>pF(e,n,o),e.decodeAsync=async(n,o)=>fF(e,n,o),e.safeEncode=(n,o)=>mF(e,n,o),e.safeDecode=(n,o)=>_F(e,n,o),e.safeEncodeAsync=async(n,o)=>gF(e,n,o),e.safeDecodeAsync=async(n,o)=>hF(e,n,o),e.refine=(n,o)=>e.check(cH(n,o)),e.superRefine=n=>e.check(uH(n)),e.overwrite=n=>e.check(Ti(n)),e.optional=()=>XE(e),e.exactOptional=()=>HF(e),e.nullable=()=>QE(e),e.nullish=()=>XE(QE(e)),e.nonoptional=n=>ZF(e,n),e.array=()=>rT(e),e.or=n=>WC([e,n]),e.and=n=>wF(e,n),e.transform=n=>eT(e,ZC(n)),e.default=n=>YF(e,n),e.prefault=n=>KF(e,n),e.catch=n=>QF(e,n),e.pipe=n=>eT(e,n),e.readonly=()=>nH(e),e.describe=n=>{let o=e.clone();return Dn.add(o,{description:n}),o},Object.defineProperty(e,"description",{get(){return Dn.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Dn.get(e);let o=e.clone();return Dn.add(o,n[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),vC=M("_ZodString",(e,t)=>{Jl.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>EV(e,o,r,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...o)=>e.check(ym(...o)),e.includes=(...o)=>e.check(bm(...o)),e.startsWith=(...o)=>e.check(Nm(...o)),e.endsWith=(...o)=>e.check(Om(...o)),e.min=(...o)=>e.check(Aa(...o)),e.max=(...o)=>e.check(Ql(...o)),e.length=(...o)=>e.check(ed(...o)),e.nonempty=(...o)=>e.check(Aa(1,...o)),e.lowercase=o=>e.check(Rm(o)),e.uppercase=o=>e.check(Im(o)),e.trim=()=>e.check(Pm()),e.normalize=(...o)=>e.check(vm(...o)),e.toLowerCase=()=>e.check(xm()),e.toUpperCase=()=>e.check(Mm()),e.slugify=()=>e.check(Lm())}),$m=M("ZodString",(e,t)=>{Jl.init(e,t),vC.init(e,t),e.email=n=>e.check(zO(PC,n)),e.url=n=>e.check(zE(tT,n)),e.jwt=n=>e.check(lC(zC,n)),e.emoji=n=>e.check(ZO(xC,n)),e.guid=n=>e.check(HE(JE,n)),e.uuid=n=>e.check(qO(Ns,n)),e.uuidv4=n=>e.check(YO(Ns,n)),e.uuidv6=n=>e.check(WO(Ns,n)),e.uuidv7=n=>e.check(KO(Ns,n)),e.nanoid=n=>e.check(JO(MC,n)),e.guid=n=>e.check(HE(JE,n)),e.cuid=n=>e.check(XO(LC,n)),e.cuid2=n=>e.check(QO(wC,n)),e.ulid=n=>e.check(eC(DC,n)),e.base64=n=>e.check(aC(VC,n)),e.base64url=n=>e.check(cC(FC,n)),e.xid=n=>e.check(tC(kC,n)),e.ksuid=n=>e.check(nC(UC,n)),e.ipv4=n=>e.check(rC($C,n)),e.ipv6=n=>e.check(oC(BC,n)),e.cidrv4=n=>e.check(iC(GC,n)),e.cidrv6=n=>e.check(sC(jC,n)),e.e164=n=>e.check(uC(HC,n)),e.datetime=n=>e.check(tF(n)),e.date=n=>e.check(nF(n)),e.time=n=>e.check(rF(n)),e.duration=n=>e.check(oF(n))});ct=M("ZodStringFormat",(e,t)=>{at.init(e,t),vC.init(e,t)}),PC=M("ZodEmail",(e,t)=>{E1.init(e,t),ct.init(e,t)});JE=M("ZodGUID",(e,t)=>{g1.init(e,t),ct.init(e,t)});Ns=M("ZodUUID",(e,t)=>{h1.init(e,t),ct.init(e,t)});tT=M("ZodURL",(e,t)=>{T1.init(e,t),ct.init(e,t)});xC=M("ZodEmoji",(e,t)=>{S1.init(e,t),ct.init(e,t)});MC=M("ZodNanoID",(e,t)=>{A1.init(e,t),ct.init(e,t)});LC=M("ZodCUID",(e,t)=>{y1.init(e,t),ct.init(e,t)});wC=M("ZodCUID2",(e,t)=>{R1.init(e,t),ct.init(e,t)});DC=M("ZodULID",(e,t)=>{I1.init(e,t),ct.init(e,t)});kC=M("ZodXID",(e,t)=>{b1.init(e,t),ct.init(e,t)});UC=M("ZodKSUID",(e,t)=>{N1.init(e,t),ct.init(e,t)});$C=M("ZodIPv4",(e,t)=>{x1.init(e,t),ct.init(e,t)});TF=M("ZodMAC",(e,t)=>{L1.init(e,t),ct.init(e,t)});BC=M("ZodIPv6",(e,t)=>{M1.init(e,t),ct.init(e,t)});GC=M("ZodCIDRv4",(e,t)=>{w1.init(e,t),ct.init(e,t)});jC=M("ZodCIDRv6",(e,t)=>{D1.init(e,t),ct.init(e,t)});VC=M("ZodBase64",(e,t)=>{U1.init(e,t),ct.init(e,t)});FC=M("ZodBase64URL",(e,t)=>{$1.init(e,t),ct.init(e,t)});HC=M("ZodE164",(e,t)=>{B1.init(e,t),ct.init(e,t)});zC=M("ZodJWT",(e,t)=>{G1.init(e,t),ct.init(e,t)});Bm=M("ZodCustomStringFormat",(e,t)=>{j1.init(e,t),ct.init(e,t)});Gm=M("ZodNumber",(e,t)=>{kO.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>TV(e,o,r,i),e.gt=(o,r)=>e.check(Is(o,r)),e.gte=(o,r)=>e.check(Ar(o,r)),e.min=(o,r)=>e.check(Ar(o,r)),e.lt=(o,r)=>e.check(Rs(o,r)),e.lte=(o,r)=>e.check(lo(o,r)),e.max=(o,r)=>e.check(lo(o,r)),e.int=o=>e.check(CC(o)),e.safe=o=>e.check(CC(o)),e.positive=o=>e.check(Is(0,o)),e.nonnegative=o=>e.check(Ar(0,o)),e.negative=o=>e.check(Rs(0,o)),e.nonpositive=o=>e.check(lo(0,o)),e.multipleOf=(o,r)=>e.check(Kc(o,r)),e.step=(o,r)=>e.check(Kc(o,r)),e.finite=()=>e;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});nd=M("ZodNumberFormat",(e,t)=>{V1.init(e,t),Gm.init(e,t)});jm=M("ZodBoolean",(e,t)=>{$E.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>SV(e,n,o,r)});Vm=M("ZodBigInt",(e,t)=>{UO.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>AV(e,o,r,i),e.gte=(o,r)=>e.check(Ar(o,r)),e.min=(o,r)=>e.check(Ar(o,r)),e.gt=(o,r)=>e.check(Is(o,r)),e.gte=(o,r)=>e.check(Ar(o,r)),e.min=(o,r)=>e.check(Ar(o,r)),e.lt=(o,r)=>e.check(Rs(o,r)),e.lte=(o,r)=>e.check(lo(o,r)),e.max=(o,r)=>e.check(lo(o,r)),e.positive=o=>e.check(Is(BigInt(0),o)),e.negative=o=>e.check(Rs(BigInt(0),o)),e.nonpositive=o=>e.check(lo(BigInt(0),o)),e.nonnegative=o=>e.check(Ar(BigInt(0),o)),e.multipleOf=(o,r)=>e.check(Kc(o,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});qC=M("ZodBigIntFormat",(e,t)=>{F1.init(e,t),Vm.init(e,t)});yF=M("ZodSymbol",(e,t)=>{H1.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>yV(e,n,o,r)});RF=M("ZodUndefined",(e,t)=>{z1.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>IV(e,n,o,r)});IF=M("ZodNull",(e,t)=>{q1.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>RV(e,n,o,r)});NF=M("ZodAny",(e,t)=>{Y1.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>OV(e,n,o,r)});OF=M("ZodUnknown",(e,t)=>{W1.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>CV(e,n,o,r)});CF=M("ZodNever",(e,t)=>{K1.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>NV(e,n,o,r)});vF=M("ZodVoid",(e,t)=>{Z1.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>bV(e,n,o,r)});nT=M("ZodDate",(e,t)=>{J1.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>vV(e,o,r,i),e.min=(o,r)=>e.check(Ar(o,r)),e.max=(o,r)=>e.check(lo(o,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});PF=M("ZodArray",(e,t)=>{X1.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>jV(e,n,o,r),e.element=t.element,e.min=(n,o)=>e.check(Aa(n,o)),e.nonempty=n=>e.check(Aa(1,n)),e.max=(n,o)=>e.check(Ql(n,o)),e.length=(n,o)=>e.check(ed(n,o)),e.unwrap=()=>e.element});oT=M("ZodObject",(e,t)=>{Q1.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>VV(e,n,o,r),Y.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>KC(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:td()}),e.loose=()=>e.clone({...e._zod.def,catchall:td()}),e.strict=()=>e.clone({...e._zod.def,catchall:YC()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Y.extend(e,n),e.safeExtend=n=>Y.safeExtend(e,n),e.merge=n=>Y.merge(e,n),e.pick=n=>Y.pick(e,n),e.omit=n=>Y.omit(e,n),e.partial=(...n)=>Y.partial(JC,e,n[0]),e.required=(...n)=>Y.required(XC,e,n[0])});iT=M("ZodUnion",(e,t)=>{BE.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hC(e,n,o,r),e.options=t.options});xF=M("ZodXor",(e,t)=>{iT.init(e,t),ej.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hC(e,n,o,r),e.options=t.options});MF=M("ZodDiscriminatedUnion",(e,t)=>{iT.init(e,t),tj.init(e,t)});LF=M("ZodIntersection",(e,t)=>{nj.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>FV(e,n,o,r)});DF=M("ZodTuple",(e,t)=>{$O.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>HV(e,n,o,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});sT=M("ZodRecord",(e,t)=>{rj.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>zV(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType});$F=M("ZodMap",(e,t)=>{oj.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>BV(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(bs(...n)),e.nonempty=n=>e.check(bs(1,n)),e.max=(...n)=>e.check(Zc(...n)),e.size=(...n)=>e.check(Xl(...n))});BF=M("ZodSet",(e,t)=>{ij.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>GV(e,n,o,r),e.min=(...n)=>e.check(bs(...n)),e.nonempty=n=>e.check(bs(1,n)),e.max=(...n)=>e.check(Zc(...n)),e.size=(...n)=>e.check(Xl(...n))});Um=M("ZodEnum",(e,t)=>{sj.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(o,r,i)=>PV(e,o,r,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(o,r)=>{let i={};for(let s of o)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Um({...t,checks:[],...Y.normalizeParams(r),entries:i})},e.exclude=(o,r)=>{let i={...t.entries};for(let s of o)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Um({...t,checks:[],...Y.normalizeParams(r),entries:i})}});GF=M("ZodLiteral",(e,t)=>{aj.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xV(e,n,o,r),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]}})});jF=M("ZodFile",(e,t)=>{cj.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>wV(e,n,o,r),e.min=(n,o)=>e.check(bs(n,o)),e.max=(n,o)=>e.check(Zc(n,o)),e.mime=(n,o)=>e.check(Cm(Array.isArray(n)?n:[n],o))});VF=M("ZodTransform",(e,t)=>{uj.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>$V(e,n,o,r),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Hc(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Y.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(Y.issue(s))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(i=>(n.value=i,n)):(n.value=r,n)}});JC=M("ZodOptional",(e,t)=>{BO.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>EC(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});FF=M("ZodExactOptional",(e,t)=>{lj.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>EC(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});zF=M("ZodNullable",(e,t)=>{dj.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>qV(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});qF=M("ZodDefault",(e,t)=>{pj.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>WV(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});WF=M("ZodPrefault",(e,t)=>{fj.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>KV(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});XC=M("ZodNonOptional",(e,t)=>{mj.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>YV(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});JF=M("ZodSuccess",(e,t)=>{_j.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>DV(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});XF=M("ZodCatch",(e,t)=>{gj.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ZV(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});eH=M("ZodNaN",(e,t)=>{hj.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>MV(e,n,o,r)});QC=M("ZodPipe",(e,t)=>{Ej.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>JV(e,n,o,r),e.in=t.in,e.out=t.out});ev=M("ZodCodec",(e,t)=>{QC.init(e,t),GE.init(e,t)});tH=M("ZodReadonly",(e,t)=>{Tj.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>XV(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});rH=M("ZodTemplateLiteral",(e,t)=>{Sj.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>LV(e,n,o,r)});oH=M("ZodLazy",(e,t)=>{Rj.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>eF(e,n,o,r),e.unwrap=()=>e._zod.def.getter()});sH=M("ZodPromise",(e,t)=>{yj.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>QV(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});aH=M("ZodFunction",(e,t)=>{Aj.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>UV(e,n,o,r)});aT=M("ZodCustom",(e,t)=>{Ij.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,o,r)=>kV(e,n,o,r)});_Ee=mV,gEe=_V;EEe=(...e)=>gV({Codec:ev,Boolean:jm,String:$m},...e)});function CYe(e){Gt({customError:e})}function vYe(){return Gt().customError}var OYe,lH,AEe=E(()=>{l();Hr();Hr();OYe={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"};lH||(lH={})});function xYe(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 MYe(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 o=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===o){let r=n[1];if(!r||!t.defs[r])throw new Error(`Reference not found: ${e}`);return t.defs[r]}throw new Error(`Reference not found: ${e}`)}function yEe(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return ee.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 r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return ee.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let i=MYe(r,t),s=Xn(i,t);return t.refs.set(r,s),t.processing.delete(r),s}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return ee.null();if(r.length===0)return ee.never();if(r.length===1)return ee.literal(r[0]);if(r.every(s=>typeof s=="string"))return ee.enum(r);let i=r.map(s=>ee.literal(s));return i.length<2?i[0]:ee.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return ee.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(i=>{let s={...e,type:i};return yEe(s,t)});return r.length===0?ee.never():r.length===1?r[0]:ee.union(r)}if(!n)return ee.any();let o;switch(n){case"string":{let r=ee.string();if(e.format){let i=e.format;i==="email"?r=r.check(ee.email()):i==="uri"||i==="uri-reference"?r=r.check(ee.url()):i==="uuid"||i==="guid"?r=r.check(ee.uuid()):i==="date-time"?r=r.check(ee.iso.datetime()):i==="date"?r=r.check(ee.iso.date()):i==="time"?r=r.check(ee.iso.time()):i==="duration"?r=r.check(ee.iso.duration()):i==="ipv4"?r=r.check(ee.ipv4()):i==="ipv6"?r=r.check(ee.ipv6()):i==="mac"?r=r.check(ee.mac()):i==="cidr"?r=r.check(ee.cidrv4()):i==="cidr-v6"?r=r.check(ee.cidrv6()):i==="base64"?r=r.check(ee.base64()):i==="base64url"?r=r.check(ee.base64url()):i==="e164"?r=r.check(ee.e164()):i==="jwt"?r=r.check(ee.jwt()):i==="emoji"?r=r.check(ee.emoji()):i==="nanoid"?r=r.check(ee.nanoid()):i==="cuid"?r=r.check(ee.cuid()):i==="cuid2"?r=r.check(ee.cuid2()):i==="ulid"?r=r.check(ee.ulid()):i==="xid"?r=r.check(ee.xid()):i==="ksuid"&&(r=r.check(ee.ksuid()))}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),o=r;break}case"number":case"integer":{let r=n==="integer"?ee.number().int():ee.number();typeof e.minimum=="number"&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),o=r;break}case"boolean":{o=ee.boolean();break}case"null":{o=ee.null();break}case"object":{let r={},i=e.properties||{},s=new Set(e.required||[]);for(let[c,u]of Object.entries(i)){let d=Xn(u,t);r[c]=s.has(c)?d:d.optional()}if(e.propertyNames){let c=Xn(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?Xn(e.additionalProperties,t):ee.any();if(Object.keys(r).length===0){o=ee.record(c,u);break}let d=ee.object(r).passthrough(),p=ee.looseRecord(c,u);o=ee.intersection(d,p);break}if(e.patternProperties){let c=e.patternProperties,u=Object.keys(c),d=[];for(let f of u){let m=Xn(c[f],t),_=ee.string().regex(new RegExp(f));d.push(ee.looseRecord(_,m))}let p=[];if(Object.keys(r).length>0&&p.push(ee.object(r).passthrough()),p.push(...d),p.length===0)o=ee.object({}).passthrough();else if(p.length===1)o=p[0];else{let f=ee.intersection(p[0],p[1]);for(let m=2;m<p.length;m++)f=ee.intersection(f,p[m]);o=f}break}let a=ee.object(r);e.additionalProperties===!1?o=a.strict():typeof e.additionalProperties=="object"?o=a.catchall(Xn(e.additionalProperties,t)):o=a.passthrough();break}case"array":{let r=e.prefixItems,i=e.items;if(r&&Array.isArray(r)){let s=r.map(c=>Xn(c,t)),a=i&&typeof i=="object"&&!Array.isArray(i)?Xn(i,t):void 0;a?o=ee.tuple(s).rest(a):o=ee.tuple(s),typeof e.minItems=="number"&&(o=o.check(ee.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(ee.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=i.map(c=>Xn(c,t)),a=e.additionalItems&&typeof e.additionalItems=="object"?Xn(e.additionalItems,t):void 0;a?o=ee.tuple(s).rest(a):o=ee.tuple(s),typeof e.minItems=="number"&&(o=o.check(ee.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(ee.maxLength(e.maxItems)))}else if(i!==void 0){let s=Xn(i,t),a=ee.array(s);typeof e.minItems=="number"&&(a=a.min(e.minItems)),typeof e.maxItems=="number"&&(a=a.max(e.maxItems)),o=a}else o=ee.array(ee.any());break}default:throw new Error(`Unsupported type: ${n}`)}return e.description&&(o=o.describe(e.description)),e.default!==void 0&&(o=o.default(e.default)),o}function Xn(e,t){if(typeof e=="boolean")return e?ee.any():ee.never();let n=yEe(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let a=e.anyOf.map(u=>Xn(u,t)),c=ee.union(a);n=o?ee.intersection(n,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map(u=>Xn(u,t)),c=ee.xor(a);n=o?ee.intersection(n,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=o?n:ee.any();else{let a=o?n:Xn(e.allOf[0],t),c=o?0:1;for(let u=c;u<e.allOf.length;u++)a=ee.intersection(a,Xn(e.allOf[u],t));n=a}e.nullable===!0&&t.version==="openapi-3.0"&&(n=ee.nullable(n)),e.readOnly===!0&&(n=ee.readonly(n));let r={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of i)a in e&&(r[a]=e[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in e&&(r[a]=e[a]);for(let a of Object.keys(e))PYe.has(a)||(r[a]=e[a]);return Object.keys(r).length>0&&t.registry.add(n,r),n}function REe(e,t){if(typeof e=="boolean")return e?ee.any():ee.never();let n=xYe(e,t?.defaultTarget),o=e.$defs||e.definitions||{},r={version:n,defs:o,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??Dn};return Xn(e,r)}var ee,PYe,IEe=E(()=>{l();FE();yC();WE();ZE();ee={...KE,...AC,iso:km},PYe=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 dH={};ht(dH,{bigint:()=>kYe,boolean:()=>DYe,date:()=>UYe,number:()=>wYe,string:()=>LYe});function LYe(e){return Lj($m,e)}function wYe(e){return jj(Gm,e)}function DYe(e){return Wj(jm,e)}function kYe(e){return Zj(Vm,e)}function UYe(e){return aV(nT,e)}var bEe=E(()=>{l();Hr();ZE()});var ye={};ht(ye,{$brand:()=>pO,$input:()=>xj,$output:()=>Pj,NEVER:()=>rG,TimePrecision:()=>Dj,ZodAny:()=>NF,ZodArray:()=>PF,ZodBase64:()=>VC,ZodBase64URL:()=>FC,ZodBigInt:()=>Vm,ZodBigIntFormat:()=>qC,ZodBoolean:()=>jm,ZodCIDRv4:()=>GC,ZodCIDRv6:()=>jC,ZodCUID:()=>LC,ZodCUID2:()=>wC,ZodCatch:()=>XF,ZodCodec:()=>ev,ZodCustom:()=>aT,ZodCustomStringFormat:()=>Bm,ZodDate:()=>nT,ZodDefault:()=>qF,ZodDiscriminatedUnion:()=>MF,ZodE164:()=>HC,ZodEmail:()=>PC,ZodEmoji:()=>xC,ZodEnum:()=>Um,ZodError:()=>bYe,ZodExactOptional:()=>FF,ZodFile:()=>jF,ZodFirstPartyTypeKind:()=>lH,ZodFunction:()=>aH,ZodGUID:()=>JE,ZodIPv4:()=>$C,ZodIPv6:()=>BC,ZodISODate:()=>IC,ZodISODateTime:()=>RC,ZodISODuration:()=>NC,ZodISOTime:()=>bC,ZodIntersection:()=>LF,ZodIssueCode:()=>OYe,ZodJWT:()=>zC,ZodKSUID:()=>UC,ZodLazy:()=>oH,ZodLiteral:()=>GF,ZodMAC:()=>TF,ZodMap:()=>$F,ZodNaN:()=>eH,ZodNanoID:()=>MC,ZodNever:()=>CF,ZodNonOptional:()=>XC,ZodNull:()=>IF,ZodNullable:()=>zF,ZodNumber:()=>Gm,ZodNumberFormat:()=>nd,ZodObject:()=>oT,ZodOptional:()=>JC,ZodPipe:()=>QC,ZodPrefault:()=>WF,ZodPromise:()=>sH,ZodReadonly:()=>tH,ZodRealError:()=>zr,ZodRecord:()=>sT,ZodSet:()=>BF,ZodString:()=>$m,ZodStringFormat:()=>ct,ZodSuccess:()=>JF,ZodSymbol:()=>yF,ZodTemplateLiteral:()=>rH,ZodTransform:()=>VF,ZodTuple:()=>DF,ZodType:()=>xe,ZodULID:()=>DC,ZodURL:()=>tT,ZodUUID:()=>Ns,ZodUndefined:()=>RF,ZodUnion:()=>iT,ZodUnknown:()=>OF,ZodVoid:()=>vF,ZodXID:()=>kC,ZodXor:()=>xF,_ZodString:()=>vC,_default:()=>YF,_function:()=>pEe,any:()=>Hhe,array:()=>rT,base64:()=>Ohe,base64url:()=>Che,bigint:()=>Bhe,boolean:()=>AF,catch:()=>QF,check:()=>fEe,cidrv4:()=>bhe,cidrv6:()=>Nhe,clone:()=>Sr,codec:()=>uEe,coerce:()=>dH,config:()=>Gt,core:()=>ya,cuid:()=>hhe,cuid2:()=>Ehe,custom:()=>mEe,date:()=>qhe,decode:()=>dF,decodeAsync:()=>fF,describe:()=>_Ee,discriminatedUnion:()=>Xhe,e164:()=>vhe,email:()=>ahe,emoji:()=>_he,encode:()=>lF,encodeAsync:()=>pF,endsWith:()=>Om,enum:()=>KC,exactOptional:()=>HF,file:()=>iEe,flattenError:()=>LE,float32:()=>Dhe,float64:()=>khe,formatError:()=>wE,fromJSONSchema:()=>REe,function:()=>pEe,getErrorMap:()=>vYe,globalRegistry:()=>Dn,gt:()=>Is,gte:()=>Ar,guid:()=>che,hash:()=>whe,hex:()=>Lhe,hostname:()=>Mhe,httpUrl:()=>mhe,includes:()=>bm,instanceof:()=>hEe,int:()=>CC,int32:()=>Uhe,int64:()=>Ghe,intersection:()=>wF,ipv4:()=>yhe,ipv6:()=>Ihe,iso:()=>km,json:()=>TEe,jwt:()=>Phe,keyof:()=>Yhe,ksuid:()=>Ahe,lazy:()=>iH,length:()=>ed,literal:()=>oEe,locales:()=>VE,looseObject:()=>Zhe,looseRecord:()=>eEe,lowercase:()=>Rm,lt:()=>Rs,lte:()=>lo,mac:()=>Rhe,map:()=>tEe,maxLength:()=>Ql,maxSize:()=>Zc,meta:()=>gEe,mime:()=>Cm,minLength:()=>Aa,minSize:()=>bs,multipleOf:()=>Kc,nan:()=>cEe,nanoid:()=>ghe,nativeEnum:()=>rEe,negative:()=>pC,never:()=>YC,nonnegative:()=>mC,nonoptional:()=>ZF,nonpositive:()=>fC,normalize:()=>vm,null:()=>bF,nullable:()=>QE,nullish:()=>sEe,number:()=>SF,object:()=>Whe,optional:()=>XE,overwrite:()=>Ti,parse:()=>sF,parseAsync:()=>aF,partialRecord:()=>Qhe,pipe:()=>eT,positive:()=>dC,prefault:()=>KF,preprocess:()=>SEe,prettifyError:()=>_G,promise:()=>dEe,property:()=>_C,readonly:()=>nH,record:()=>UF,refine:()=>cH,regex:()=>ym,regexes:()=>zo,registry:()=>HO,safeDecode:()=>_F,safeDecodeAsync:()=>hF,safeEncode:()=>mF,safeEncodeAsync:()=>gF,safeParse:()=>cF,safeParseAsync:()=>uF,set:()=>nEe,setErrorMap:()=>CYe,size:()=>Xl,slugify:()=>Lm,startsWith:()=>Nm,strictObject:()=>Khe,string:()=>OC,stringFormat:()=>xhe,stringbool:()=>EEe,success:()=>aEe,superRefine:()=>uH,symbol:()=>Vhe,templateLiteral:()=>lEe,toJSONSchema:()=>TC,toLowerCase:()=>xm,toUpperCase:()=>Mm,transform:()=>ZC,treeifyError:()=>mG,trim:()=>Pm,tuple:()=>kF,uint32:()=>$he,uint64:()=>jhe,ulid:()=>The,undefined:()=>Fhe,union:()=>WC,unknown:()=>td,uppercase:()=>Im,url:()=>fhe,util:()=>Y,uuid:()=>uhe,uuidv4:()=>lhe,uuidv6:()=>dhe,uuidv7:()=>phe,void:()=>zhe,xid:()=>She,xor:()=>Jhe});var pH=E(()=>{l();Hr();ZE();yC();iF();EF();AEe();Hr();Nj();Hr();YE();IEe();vj();WE();WE();bEe();Gt(GO())});var NEe=E(()=>{l();pH();pH()});function Ke(){return cT}async function mH(e){let t=(0,OEe.join)(e,".lore.json");if((0,tv.existsSync)(t)){let n=JSON.parse((0,tv.readFileSync)(t,"utf8"));return cT=fH.parse(n),cT}return cT=fH.parse({}),cT}var tv,OEe,fH,cT,rd=E(()=>{"use strict";l();NEe();tv=require("node:fs"),OEe=require("node:path"),fH=ye.object({model:ye.object({providerID:ye.string(),modelID:ye.string()}).optional(),workerModel:ye.object({providerID:ye.string(),modelID:ye.string()}).optional(),budget:ye.object({distilled:ye.number().min(.05).max(.5).default(.25),raw:ye.number().min(.1).max(.7).default(.4),output:ye.number().min(.1).max(.5).default(.25),ltm:ye.number().min(.02).max(.3).default(.05),targetCacheReadCostPerTurn:ye.number().min(0).default(.1),maxLayer0Tokens:ye.number().min(0).optional()}).default({distilled:.25,raw:.4,output:.25,ltm:.05,targetCacheReadCostPerTurn:.1}),idleResumeMinutes:ye.number().min(0).max(1440).default(5),distillation:ye.object({minMessages:ye.number().min(3).default(5),maxSegment:ye.number().min(5).default(30),metaThreshold:ye.number().min(3).default(10),toolOutputMaxChars:ye.number().min(0).default(2e3)}).default({minMessages:5,maxSegment:30,metaThreshold:10,toolOutputMaxChars:2e3}),knowledge:ye.object({enabled:ye.boolean().default(!0)}).default({enabled:!0}),curator:ye.object({enabled:ye.boolean().default(!0),onIdle:ye.boolean().default(!0),afterTurns:ye.number().min(1).default(3),maxEntries:ye.number().min(10).default(25)}).default({enabled:!0,onIdle:!0,afterTurns:3,maxEntries:25}),pruning:ye.object({retention:ye.number().min(1).default(120),maxStorage:ye.number().min(50).default(1024)}).default({retention:120,maxStorage:1024}),search:ye.object({ftsWeights:ye.object({title:ye.number().min(0).default(6),content:ye.number().min(0).default(2),category:ye.number().min(0).default(3)}).default({title:6,content:2,category:3}),recallLimit:ye.number().min(1).max(50).default(10),queryExpansion:ye.boolean().default(!1),embeddings:ye.object({enabled:ye.boolean().default(!0),provider:ye.enum(["local","voyage","openai"]).default("local"),model:ye.string().default("BGESmallENV15"),dimensions:ye.number().min(64).max(2048).default(384)}).default({enabled:!0,provider:"local",model:"BGESmallENV15",dimensions:384})}).default({ftsWeights:{title:6,content:2,category:3},recallLimit:10,queryExpansion:!1,embeddings:{enabled:!0,provider:"local",model:"BGESmallENV15",dimensions:384}}),crossProject:ye.boolean().default(!1),agentsFile:ye.object({enabled:ye.boolean().default(!0),path:ye.string().default("AGENTS.md")}).default({enabled:!0,path:"AGENTS.md"})}),cT=fH.parse({})});function CEe(e){let t=GYe[e];return t?process.env[t]:void 0}function PEe(){if(Si!==void 0)return Si;let e=Ke().search.embeddings;if(e.enabled===!1)return Si=null,null;let t=e.provider,n=e.model;switch(t){case"local":{try{Si=new hH(n)}catch{ze("local embedding provider unavailable (fastembed not installed)"),Si=null}break}case"voyage":{let o=CEe(t);if(!o)return Si=null,null;Si=new _H(o,n,e.dimensions);break}case"openai":{let o=CEe(t);if(!o)return Si=null,null;Si=new gH(o,n,e.dimensions);break}default:ze(`unknown embedding provider: ${t}`),Si=null}return Si}function eu(){return PEe()!==null}async function nv(e,t){let n=PEe();if(!n)throw new Error("No embedding provider available");return n.embed(e,t)}function xEe(e,t){let n=Math.min(e.length,t.length),o=0,r=0,i=0;for(let a=0;a<n;a++)o+=e[a]*t[a],r+=e[a]*e[a],i+=t[a]*t[a];let s=Math.sqrt(r)*Math.sqrt(i);return s===0?0:o/s}function MEe(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength)}function LEe(e){let t=new Uint8Array(e);return new Float32Array(t.buffer,t.byteOffset,t.byteLength/4)}function wEe(e,t=10){let n=j().query("SELECT id, embedding FROM knowledge WHERE embedding IS NOT NULL AND confidence > 0.2").all(),o=[];for(let r of n){let i=LEe(r.embedding),s=xEe(e,i);o.push({id:r.id,similarity:s})}return o.sort((r,i)=>i.similarity-r.similarity),o.slice(0,t)}function DEe(e,t=10){let n=j().query("SELECT id, embedding FROM distillations WHERE embedding IS NOT NULL AND archived = 0").all(),o=[];for(let r of n){let i=LEe(r.embedding),s=xEe(e,i);o.push({id:r.id,similarity:s})}return o.sort((r,i)=>i.similarity-r.similarity),o.slice(0,t)}function EH(e,t,n){let o=`${t}
|
|
844
|
+
${n}`;nv([o],"document").then(([r])=>{j().query("UPDATE knowledge SET embedding = ? WHERE id = ?").run(MEe(r),e)}).catch(r=>{ze("embedding failed for knowledge entry",e,":",r)})}function TH(e,t){nv([t],"document").then(([n])=>{j().query("UPDATE distillations SET embedding = ? WHERE id = ?").run(MEe(n),e)}).catch(n=>{ze("embedding failed for distillation",e,":",n)})}var vEe,$Ye,_H,BYe,gH,hH,GYe,Si,uT=E(()=>{"use strict";l();As();rd();ys();vEe=1e4,$Ye="https://api.voyageai.com/v1/embeddings",_H=class{maxBatchSize=128;apiKey;model;dimensions;constructor(t,n,o){this.apiKey=t,this.model=n,this.dimensions=o}async embed(t,n){let o=await fetch($Ye,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({input:t,model:this.model,input_type:n,output_dimension:this.dimensions}),signal:AbortSignal.timeout(vEe)});if(!o.ok){let s=await o.text().catch(()=>"");throw new Error(`Voyage API ${o.status}: ${s}`)}return[...(await o.json()).data].sort((s,a)=>s.index-a.index).map(s=>new Float32Array(s.embedding))}},BYe="https://api.openai.com/v1/embeddings",gH=class{maxBatchSize=2048;apiKey;model;dimensions;constructor(t,n,o){this.apiKey=t,this.model=n,this.dimensions=o}async embed(t,n){let o={input:t,model:this.model};this.model.startsWith("text-embedding-3")&&(o.dimensions=this.dimensions);let r=await fetch(BYe,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify(o),signal:AbortSignal.timeout(vEe)});if(!r.ok){let a=await r.text().catch(()=>"");throw new Error(`OpenAI API ${r.status}: ${a}`)}return[...(await r.json()).data].sort((a,c)=>a.index-c.index).map(a=>new Float32Array(a.embedding))}},hH=class{maxBatchSize=256;model=null;initPromise=null;modelName;constructor(t){this.modelName=t}async getModel(){return this.model?this.model:(this.initPromise||(this.initPromise=(async()=>{let{EmbeddingModel:t,FlagEmbedding:n}=await import("fastembed"),o=t[this.modelName],r=await n.init({model:o??this.modelName});return this.model=r,r})()),this.initPromise)}async embed(t,n){let o=await this.getModel();if(n==="query"&&t.length===1){let i=await o.queryEmbed(t[0]);return[new Float32Array(i)]}let r=[];for await(let i of o.passageEmbed(t))for(let s of i)r.push(new Float32Array(s));return r}},GYe={voyage:"VOYAGE_API_KEY",openai:"OPENAI_API_KEY"}});var Hm={};ht(Hm,{count:()=>YYe,hasLatDir:()=>Fm,parseSections:()=>kEe,refresh:()=>qYe,scoreForSession:()=>AH,searchScored:()=>SH});function VYe(e){return Math.ceil(e.length/3)}function FYe(e){return e.children.filter(t=>t.type==="text").map(t=>t.value).join("")}function HYe(e){let t=[];for(let n of e.children)if(n.type==="text")t.push(n.value);else if(n.type==="inlineCode")t.push("`"+n.value+"`");else if("children"in n)for(let o of n.children)"value"in o&&typeof o.value=="string"&&t.push(o.value);return t.join("")}function kEe(e,t,n){let o=jYe.parse(t),r=(0,od.relative)(n,e).replace(/\.md$/,""),i=t.split(`
|
|
845
|
+
`),s=[];for(let u of o.children)u.type==="heading"&&u.position&&s.push({node:u,text:FYe(u),line:u.position.start.line,depth:u.depth});if(!s.length)return[];let a=[],c=[];for(let u=0;u<s.length;u++){let{text:d,depth:p,line:f}=s[u];for(;a.length>0&&a[a.length-1].depth>=p;)a.pop();let m=a.length>0?a[a.length-1]:null,_=m?`${m.id}#${d}`:`${r}#${d}`;a.push({id:_,depth:p});let h=f,T=u+1<s.length?s[u+1].line-1:i.length,y=i.slice(h,T).join(`
|
|
846
|
+
`).trim(),v=null;for(let x of o.children)if(x.position&&!(x.position.start.line<=h)){if(u+1<s.length&&x.position.start.line>=s[u+1].line)break;if(x.type==="paragraph"){let P=HYe(x);v=P.length>250?P.slice(0,250):P;break}}c.push({id:_,file:r,heading:d,depth:p,content:y,first_paragraph:v})}return c}function UEe(e){let t=[];try{let n=(0,Os.readdirSync)(e,{withFileTypes:!0});for(let o of n){let r=(0,od.join)(e,o.name);o.isDirectory()&&!o.name.startsWith(".")?t.push(...UEe(r)):o.isFile()&&o.name.endsWith(".md")&&t.push(r)}}catch{}return t.sort()}function zYe(e){return AN(e)}function Fm(e){let t=(0,od.join)(e,"lat.md");return(0,Os.existsSync)(t)&&(0,Os.statSync)(t).isDirectory()}function qYe(e){let t=(0,od.join)(e,"lat.md");if(!(0,Os.existsSync)(t)||!(0,Os.statSync)(t).isDirectory())return 0;let n=Ue(e),o=UEe(t),r=0,i=new Set,s=j().query(`INSERT OR REPLACE INTO lat_sections (id, project_id, file, heading, depth, content, content_hash, first_paragraph, updated_at)
|
|
847
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`);for(let u of o){let d;try{d=(0,Os.readFileSync)(u,"utf-8")}catch{continue}let p=(0,od.relative)(e,u);i.add(p);let f=zYe(d),m=j().query("SELECT content_hash FROM lat_sections WHERE project_id = ? AND file = ? LIMIT 1").get(n,p.replace(/\.md$/,""));if(m&&m.content_hash===f)continue;j().query("DELETE FROM lat_sections WHERE project_id = ? AND file = ?").run(n,p.replace(/\.md$/,""));let _=kEe(u,d,e),h=Date.now();for(let T of _)s.run(T.id,n,T.file,T.heading,T.depth,T.content,f,T.first_paragraph,h),r++}let a=new Set([...i].map(u=>u.replace(/\.md$/,""))),c=j().query("SELECT DISTINCT file FROM lat_sections WHERE project_id = ?").all(n);for(let u of c)a.has(u.file)||(j().query("DELETE FROM lat_sections WHERE project_id = ? AND file = ?").run(n,u.file),ze(`lat-reader: removed sections for deleted file ${u.file}`));return r>0&&ze(`lat-reader: indexed ${r} sections from ${o.length} files`),r}function SH(e){let t=e.limit??10,n=Gr(e.query);if(n===xt)return[];let o=Ue(e.projectPath),r=`SELECT s.id, s.project_id, s.file, s.heading, s.depth, s.content,
|
|
848
|
+
s.content_hash, s.first_paragraph, s.updated_at,
|
|
849
|
+
bm25(lat_sections_fts, 6.0, 2.0) as rank
|
|
850
|
+
FROM lat_sections_fts f
|
|
851
|
+
CROSS JOIN lat_sections s ON s.rowid = f.rowid
|
|
852
|
+
WHERE lat_sections_fts MATCH ?
|
|
853
|
+
AND s.project_id = ?
|
|
854
|
+
ORDER BY rank LIMIT ?`;try{let i=j().query(r).all(n,o,t);if(i.length)return i;let s=Fo(e.query);return s===xt?[]:j().query(r).all(s,o,t)}catch{return[]}}function AH(e,t,n){if(!Fm(e))return[];let o=Ue(e),r=yE(t);if(!r.length)return[];let i=r.map(d=>`${d}*`).join(" OR "),s;try{s=j().query(`SELECT s.id, s.project_id, s.file, s.heading, s.depth, s.content,
|
|
855
|
+
s.content_hash, s.first_paragraph, s.updated_at,
|
|
856
|
+
bm25(lat_sections_fts, 6.0, 2.0) as rank
|
|
857
|
+
FROM lat_sections_fts f
|
|
858
|
+
CROSS JOIN lat_sections s ON s.rowid = f.rowid
|
|
859
|
+
WHERE lat_sections_fts MATCH ?
|
|
860
|
+
AND s.project_id = ?
|
|
861
|
+
ORDER BY rank`).all(i,o)}catch{return[]}if(!s.length)return[];let c=10,u=[];for(let d of s){if(c>=n)break;let p=VYe(d.heading+(d.first_paragraph??d.content))+5;c+p>n||(u.push(d),c+=p)}return u}function YYe(e){let t=Ue(e);return j().query("SELECT COUNT(*) as cnt FROM lat_sections WHERE project_id = ?").get(t).cnt}var Os,od,jYe,ov=E(()=>{"use strict";l();Os=require("fs"),od=require("path");$B();As();yN();lm();ys();jYe=oO()});var po={};ht(po,{all:()=>JYe,cascadeRefReplace:()=>tWe,check:()=>rWe,cleanDeadRefs:()=>nWe,create:()=>sd,extractRefs:()=>FEe,forProject:()=>ad,forSession:()=>ZYe,get:()=>qo,pruneOversized:()=>QYe,remove:()=>iv,resolveRef:()=>VEe,search:()=>jEe,searchScored:()=>yH,searchScoredOtherProjects:()=>RH,syncRefs:()=>IH,update:()=>id});function $Ee(e){return Math.ceil(e.length/3)}function sd(e){let t=e.scope==="project"&&e.projectPath?Ue(e.projectPath):null;if(!e.id){let r=t!==null?j().query("SELECT id FROM knowledge WHERE project_id = ? AND LOWER(title) = LOWER(?) AND confidence > 0 LIMIT 1").get(t,e.title):j().query("SELECT id FROM knowledge WHERE project_id IS NULL AND LOWER(title) = LOWER(?) AND confidence > 0 LIMIT 1").get(e.title);if(r)return id(r.id,{content:e.content}),r.id;let i=j().query("SELECT id FROM knowledge WHERE cross_project = 1 AND LOWER(title) = LOWER(?) AND confidence > 0 LIMIT 1").get(e.title);if(i)return id(i.id,{content:e.content}),i.id}let n=e.id??Ume(),o=Date.now();return j().query(`INSERT INTO knowledge (id, project_id, category, title, content, source_session, cross_project, confidence, created_at, updated_at)
|
|
862
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, 1.0, ?, ?)`).run(n,t,e.category,e.title,e.content,e.session??null,e.crossProject??!1?1:0,o,o),eu()&&EH(n,e.title,e.content),n}function id(e,t){let n=[],o=[];if(t.content!==void 0&&(n.push("content = ?"),o.push(t.content)),t.confidence!==void 0&&(n.push("confidence = ?"),o.push(t.confidence)),n.push("updated_at = ?"),o.push(Date.now()),o.push(e),j().query(`UPDATE knowledge SET ${n.join(", ")} WHERE id = ?`).run(...o),eu()&&t.content!==void 0){let r=qo(e);r&&EH(e,r.title,t.content)}}function iv(e){j().query("DELETE FROM knowledge WHERE id = ?").run(e)}function ad(e,t=!0){let n=Ue(e);return t?j().query(`SELECT ${tu} FROM knowledge
|
|
863
|
+
WHERE (project_id = ? OR (project_id IS NULL) OR (cross_project = 1))
|
|
864
|
+
AND confidence > 0.2
|
|
865
|
+
ORDER BY confidence DESC, updated_at DESC`).all(n):j().query(`SELECT ${tu} FROM knowledge
|
|
866
|
+
WHERE project_id = ?
|
|
867
|
+
AND confidence > 0.2
|
|
868
|
+
ORDER BY confidence DESC, updated_at DESC`).all(n)}function sv(){return Ke().search.ftsWeights}function KYe(e){let t=yE(e);if(!t.length)return new Map;let n=t.map(s=>`${s}*`).join(" OR "),{title:o,content:r,category:i}=sv();try{let s=j().query(`SELECT k.id, bm25(knowledge_fts, ?, ?, ?) as rank
|
|
869
|
+
FROM knowledge_fts f
|
|
870
|
+
CROSS JOIN knowledge k ON k.rowid = f.rowid
|
|
871
|
+
WHERE knowledge_fts MATCH ?
|
|
872
|
+
AND k.confidence > 0.2`).all(o,r,i,n);if(!s.length)return new Map;let a=s.map(p=>p.rank),c=Math.min(...a),u=Math.max(...a),d=new Map;for(let p of s){let f=c===u?1:(u-p.rank)/(u-c);d.set(p.id,f)}return d}catch{return new Map}}function ZYe(e,t,n){let o=Ue(e),r=j().query(`SELECT ${tu} FROM knowledge
|
|
873
|
+
WHERE project_id = ? AND cross_project = 0 AND confidence > 0.2
|
|
874
|
+
ORDER BY confidence DESC, updated_at DESC`).all(o),i=j().query(`SELECT ${tu} FROM knowledge
|
|
875
|
+
WHERE (project_id IS NULL OR cross_project = 1) AND confidence > 0.2
|
|
876
|
+
ORDER BY confidence DESC, updated_at DESC`).all();if(!i.length&&!r.length)return[];let s="";if(t){let m=j().query(`SELECT observations FROM distillations
|
|
877
|
+
WHERE project_id = ? AND session_id = ?
|
|
878
|
+
ORDER BY created_at DESC LIMIT 1`).get(o,t);m?.observations&&(s+=m.observations+`
|
|
879
|
+
`);let _=j().query(`SELECT content FROM temporal_messages
|
|
880
|
+
WHERE project_id = ? AND session_id = ?
|
|
881
|
+
ORDER BY created_at DESC LIMIT 10`).all(o,t);_.length&&(s+=_.map(h=>h.content).join(`
|
|
882
|
+
`))}let a,c;if(s.trim().length>20){let m=KYe(s),h=r.map(y=>({entry:y,score:(m.get(y.id)??0)*y.confidence})).filter(y=>y.score>0),T=new Set(h.map(y=>y.entry.id)),S=r.filter(y=>!T.has(y.id)).slice(0,WYe).map(y=>({entry:y,score:.001*y.confidence}));a=[...h,...S],c=i.filter(y=>m.has(y.id)).map(y=>({entry:y,score:(m.get(y.id)??0)*y.confidence}))}else a=r.slice(0,BEe).map(m=>({entry:m,score:m.confidence})),c=i.slice(0,BEe).map(m=>({entry:m,score:m.confidence}));let u=[...a,...c];u.sort((m,_)=>_.score-m.score);let p=15,f=[];for(let{entry:m}of u){if(p>=n)break;let _=$Ee(m.title+m.content)+10;p+_>n||(f.push(m),p+=_)}if(Fm(e)&&p<n){let m=AH(e,s,n-p);for(let _ of m){if(p>=n)break;let h=_.first_paragraph??_.content,T=$Ee(_.heading+h)+10;p+T>n||(f.push({id:_.id,project_id:_.project_id,category:"lat.md",title:`[${_.file}] ${_.heading}`,content:h,source_session:null,cross_project:0,confidence:1,created_at:_.updated_at,updated_at:_.updated_at,metadata:null}),p+=T)}}return f}function JYe(){return j().query(`SELECT ${tu} FROM knowledge WHERE confidence > 0.2 ORDER BY confidence DESC, updated_at DESC`).all()}function XYe(e){let t=e.query.toLowerCase().split(/\s+/).filter(r=>r.length>2);if(!t.length)return[];let n=t.map(()=>"(LOWER(title) LIKE ? OR LOWER(content) LIKE ?)").join(" AND "),o=t.flatMap(r=>[`%${r}%`,`%${r}%`]);if(e.projectPath){let r=Ue(e.projectPath);return j().query(`SELECT ${tu} FROM knowledge WHERE (project_id = ? OR project_id IS NULL OR cross_project = 1) AND confidence > 0.2 AND ${n} ORDER BY updated_at DESC LIMIT ?`).all(r,...o,e.limit)}return j().query(`SELECT ${tu} FROM knowledge WHERE confidence > 0.2 AND ${n} ORDER BY updated_at DESC LIMIT ?`).all(...o,e.limit)}function jEe(e){let t=e.limit??20,n=Gr(e.query);if(n===xt)return[];let o=e.projectPath?Ue(e.projectPath):null,r=o?`SELECT ${lT} FROM knowledge_fts f
|
|
883
|
+
CROSS JOIN knowledge k ON k.rowid = f.rowid
|
|
884
|
+
WHERE knowledge_fts MATCH ?
|
|
885
|
+
AND (k.project_id = ? OR k.project_id IS NULL OR k.cross_project = 1)
|
|
886
|
+
AND k.confidence > 0.2
|
|
887
|
+
ORDER BY bm25(knowledge_fts, ?, ?, ?) LIMIT ?`:`SELECT ${lT} FROM knowledge_fts f
|
|
888
|
+
CROSS JOIN knowledge k ON k.rowid = f.rowid
|
|
889
|
+
WHERE knowledge_fts MATCH ?
|
|
890
|
+
AND k.confidence > 0.2
|
|
891
|
+
ORDER BY bm25(knowledge_fts, ?, ?, ?) LIMIT ?`,{title:i,content:s,category:a}=sv(),c=o?[n,o,i,s,a,t]:[n,i,s,a,t];try{let u=j().query(r).all(...c);if(u.length)return u;let d=Fo(e.query);if(d===xt)return[];let p=o?[d,o,i,s,a,t]:[d,i,s,a,t];return j().query(r).all(...p)}catch{return XYe({query:e.query,projectPath:e.projectPath,limit:t})}}function yH(e){let t=e.limit??20,n=Gr(e.query);if(n===xt)return[];let o=e.projectPath?Ue(e.projectPath):null,{title:r,content:i,category:s}=sv(),a=o?`SELECT ${lT}, bm25(knowledge_fts, ?, ?, ?) as rank FROM knowledge_fts f
|
|
892
|
+
CROSS JOIN knowledge k ON k.rowid = f.rowid
|
|
893
|
+
WHERE knowledge_fts MATCH ?
|
|
894
|
+
AND (k.project_id = ? OR k.project_id IS NULL OR k.cross_project = 1)
|
|
895
|
+
AND k.confidence > 0.2
|
|
896
|
+
ORDER BY rank LIMIT ?`:`SELECT ${lT}, bm25(knowledge_fts, ?, ?, ?) as rank FROM knowledge_fts f
|
|
897
|
+
CROSS JOIN knowledge k ON k.rowid = f.rowid
|
|
898
|
+
WHERE knowledge_fts MATCH ?
|
|
899
|
+
AND k.confidence > 0.2
|
|
900
|
+
ORDER BY rank LIMIT ?`,c=o?[r,i,s,n,o,t]:[r,i,s,n,t];try{let u=j().query(a).all(...c);if(u.length)return u;let d=Fo(e.query);if(d===xt)return[];let p=o?[r,i,s,d,o,t]:[r,i,s,d,t];return j().query(a).all(...p)}catch{return[]}}function RH(e){let t=e.limit??10,n=Gr(e.query);if(n===xt)return[];let o=Ue(e.excludeProjectPath),{title:r,content:i,category:s}=sv(),a=`SELECT ${lT}, bm25(knowledge_fts, ?, ?, ?) as rank FROM knowledge_fts f
|
|
901
|
+
CROSS JOIN knowledge k ON k.rowid = f.rowid
|
|
902
|
+
WHERE knowledge_fts MATCH ?
|
|
903
|
+
AND k.project_id IS NOT NULL
|
|
904
|
+
AND k.project_id != ?
|
|
905
|
+
AND k.cross_project = 0
|
|
906
|
+
AND k.confidence > 0.2
|
|
907
|
+
ORDER BY rank LIMIT ?`,c=[r,i,s,n,o,t];try{let u=j().query(a).all(...c);if(u.length)return u;let d=Fo(e.query);if(d===xt)return[];let p=[r,i,s,d,o,t];return j().query(a).all(...p)}catch{return[]}}function qo(e){return j().query(`SELECT ${tu} FROM knowledge WHERE id = ?`).get(e)}function QYe(e){let t=j().query("UPDATE knowledge SET confidence = 0, updated_at = ? WHERE LENGTH(content) > ? AND confidence > 0").run(Date.now(),e);return Number(t.changes)}function VEe(e){if(eWe.test(e)){let n=qo(e);return n?n.id:null}let t=jEe({query:e,limit:1});return t.length?t[0].id:null}function FEe(e){let t=[],n,o=new RegExp(GEe.source,GEe.flags);for(;(n=o.exec(e))!==null;)t.push(n[1]);return t}function IH(e){let t=qo(e);if(!t)return 0;j().query("DELETE FROM knowledge_refs WHERE from_id = ?").run(e);let n=FEe(t.content);if(!n.length)return 0;let o=0,r=j().query("INSERT OR IGNORE INTO knowledge_refs (from_id, to_id) VALUES (?, ?)");for(let i of n){let s=VEe(i);s&&s!==e&&(r.run(e,s),o++)}return o}function tWe(e,t){let n=`[[${e}]]`,o=`[[${t}]]`,r=j().query(`UPDATE knowledge SET content = REPLACE(content, ?, ?), updated_at = ?
|
|
908
|
+
WHERE content LIKE ?`).run(n,o,Date.now(),`%${n}%`);return j().query("UPDATE OR IGNORE knowledge_refs SET to_id = ? WHERE to_id = ?").run(t,e),j().query("UPDATE OR IGNORE knowledge_refs SET from_id = ? WHERE from_id = ?").run(t,e),j().query("DELETE FROM knowledge_refs WHERE from_id = to_id").run(),Number(r.changes)}function nWe(){let e=j().query(`SELECT DISTINCT kr.from_id, kr.to_id FROM knowledge_refs kr
|
|
909
|
+
WHERE NOT EXISTS (SELECT 1 FROM knowledge k WHERE k.id = kr.to_id)`).all();if(!e.length)return 0;let t=Date.now(),n=0;for(let o of e){let r=`[[${o.to_id}]]`;j().query(`UPDATE knowledge SET content = REPLACE(content, ?, ''), updated_at = ?
|
|
910
|
+
WHERE id = ? AND content LIKE ?`).run(r,t,o.from_id,`%${r}%`).changes>0&&n++}return j().query("DELETE FROM knowledge_refs WHERE to_id NOT IN (SELECT id FROM knowledge)").run(),n>0&&ze(`cleaned ${n} entries with dead [[ref]] links`),n}function rWe(e){let t=ad(e,!1),n=[];for(let r of t)r.content.length>1200&&n.push({entryId:r.id,type:"oversized",description:`Content is ${r.content.length} chars (max 1200)`,suggestion:"Trim or split into multiple entries"});for(let r of t)r.content.trim().length<10&&n.push({entryId:r.id,type:"empty",description:`Content is empty or near-empty (${r.content.trim().length} chars)`,suggestion:"Delete or add meaningful content"});let o=new Set;for(let r of t){if(o.has(r.id))continue;let i=Gr(r.title);if(i!==xt){try{let{title:s,content:a,category:c}=Ke().search.ftsWeights,u=j().query(`SELECT k.id, k.title FROM knowledge_fts f
|
|
911
|
+
CROSS JOIN knowledge k ON k.rowid = f.rowid
|
|
912
|
+
WHERE knowledge_fts MATCH ?
|
|
913
|
+
AND k.id != ?
|
|
914
|
+
AND k.confidence > 0.2
|
|
915
|
+
ORDER BY bm25(knowledge_fts, ?, ?, ?) LIMIT 3`).all(i,r.id,s,a,c);for(let d of u){if(o.has(d.id))continue;let p=r.title.toLowerCase(),f=d.title.toLowerCase(),m=new Set(p.split(/\s+/)),_=new Set(f.split(/\s+/));[...m].filter(S=>_.has(S)).length/Math.min(m.size,_.size)>=.7&&(n.push({entryId:r.id,type:"duplicate",description:`Possibly duplicates "${d.title}" (${d.id.slice(0,8)}...)`,suggestion:`Merge with ${d.id}`}),o.add(d.id))}}catch{}o.add(r.id)}}return n}var tu,lT,BEe,WYe,eWe,GEe,zm=E(()=>{"use strict";l();$me();As();rd();lm();uT();ov();ys();tu="id, project_id, category, title, content, source_session, cross_project, confidence, created_at, updated_at, metadata",lT="k.id, k.project_id, k.category, k.title, k.content, k.source_session, k.cross_project, k.confidence, k.created_at, k.updated_at, k.metadata";BEe=10,WYe=5;eWe=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,GEe=/\[\[([^\]]+)\]\]/g});function bH(e){let t=[],n=new Set;for(let{regex:o,category:r,titleFn:i}of oWe){o.lastIndex=0;let s;for(;(s=o.exec(e))!==null;){let a=i(s),c=a.toLowerCase();n.has(c)||(n.add(c),t.push({category:r,title:a,content:s[0].trim()}))}}return t}var oWe,NH=E(()=>{"use strict";l();oWe=[{regex:/decided to (?:use |switch to |go with |adopt )(.+?)(?:\.|,|$)/gi,category:"decision",titleFn:e=>`Decided to use ${e[1].trim()}`},{regex:/chose (.+?) over (.+?)(?:\.|,|$)/gi,category:"decision",titleFn:e=>`Chose ${e[1].trim()} over ${e[2].trim()}`},{regex:/switched from (.+?) to (.+?)(?:\.|,|$)/gi,category:"decision",titleFn:e=>`Switched from ${e[1].trim()} to ${e[2].trim()}`},{regex:/going with (.+?) (?:because|for|due to)(.+?)(?:\.|,|$)/gi,category:"decision",titleFn:e=>`Going with ${e[1].trim()}`},{regex:/migrat(?:ed|ing) (?:from .+? )?to (.+?)(?:\.|,|$)/gi,category:"decision",titleFn:e=>`Migrated to ${e[1].trim()}`},{regex:/adopted (.+?) (?:for|as|instead)(.+?)(?:\.|,|$)/gi,category:"decision",titleFn:e=>`Adopted ${e[1].trim()}`},{regex:/prefers? (.+?) (?:over|to|instead of|rather than) (.+?)(?:\.|,|$)/gi,category:"preference",titleFn:e=>`Prefers ${e[1].trim()} over ${e[2].trim()}`},{regex:/(?:user |team |we )(?:always |usually |typically )(?:use|prefer|go with) (.+?)(?:\.|,|$)/gi,category:"preference",titleFn:e=>`Typically uses ${e[1].trim()}`}]});function av(e){return Math.ceil(e.length/3)}function aWe(e){let t=0;for(let n of e)Fc(n)||RE(n)&&n.text?t+=av(n.text):Tr(n)&&n.state.status==="completed"?t+=av(n.state.output)+av(n.tool)+50:t+=20;return t}function Yo(e){return aWe(e.parts)+20}function ZEe(){return{lastKnownInput:0,lastKnownLtm:0,lastKnownMessageCount:0,lastTransformedCount:0,lastLayer:0,lastWindowMessageIDs:new Set,forceMinLayer:0,lastTransformEstimate:0,ltmTokens:0,prefixCache:null,rawWindowCache:null,lastTurnAt:0,cameOutOfIdle:!1,postIdleCompact:!1,consecutiveHighLayer:0,distillationSnapshot:null}}function qm(e){let t=pv.get(e);return t||(t=ZEe(),t.forceMinLayer=N$(e),pv.set(e,t)),t}function PH(e,t,n=Date.now()){if(t<=0)return{triggered:!1};let o=qm(e);if(o.lastTurnAt===0)return{triggered:!1};let r=n-o.lastTurnAt;return r<t?{triggered:!1}:(o.prefixCache=null,o.rawWindowCache=null,o.distillationSnapshot=null,o.cameOutOfIdle=!0,o.postIdleCompact=!0,{triggered:!0,idleMs:r})}function fv(e){let t=pv.get(e);return!t||!t.cameOutOfIdle?!1:(t.cameOutOfIdle=!1,!0)}function xH(e){uv=e.context||2e5,lv=Math.min(e.output||32e3,32e3)}function mv(e){dv=Math.max(0,Math.floor(e))}function MH(e,t){if(e<=0||t<=0)return 0;let n=Math.floor(e/t);return Math.max(n,cWe)}function cd(e,t){t&&(qm(t).ltmTokens=e),JEe=e}function LH(e){let t=dT??KEe,n=Math.max(0,uv-lv-t);return Math.floor(n*e)}function wH(e,t,n){let o=t?qm(t).lastTransformEstimate:0;if(o>0||e===0){let r=Math.max(0,e-o);dT=dT===null?r:Math.round(dT*.7+r*.3)}if(t!==void 0){let r=qm(t);r.lastKnownInput=e,r.lastKnownLtm=r.ltmTokens,n!==void 0&&(r.lastKnownMessageCount=n)}}function uWe(){return dT??KEe}function DH(e){return pv.get(e)?.lastTransformedCount??0}function lWe(e,t){let n=Ue(e),o=t?"SELECT id, observations, generation, token_count, created_at, session_id FROM distillations WHERE project_id = ? AND session_id = ? AND archived = 0 ORDER BY created_at ASC":"SELECT id, observations, generation, token_count, created_at, session_id FROM distillations WHERE project_id = ? AND archived = 0 ORDER BY created_at ASC",r=t?[n,t]:[n];return j().query(o).all(...r)}function dWe(e,t,n,o){let r=null;for(let a=n.length-1;a>=0;a--)if(n[a].info.role==="user"){r=n[a].info.id;break}let i=o.distillationSnapshot;if(i&&i.lastUserMsgId===r)return i.rows;let s=lWe(e,t);return o.distillationSnapshot={rows:s,lastUserMsgId:r},ze(`distillation refresh: ${s.length} rows (user msg ${r?.substring(0,16)??"none"})`),s}function pWe(e){return e.replace(/<system-reminder>[\s\S]*?<\/system-reminder>\n?/g,t=>{let n=t.match(/The user sent the following message:\n([\s\S]*?)\n\nPlease address/);return n?n[1].trim()+`
|
|
916
|
+
`:""}).replace(/\n{3,}/g,`
|
|
917
|
+
|
|
918
|
+
`).trim()}function fT(e){let n=e.map(o=>{if(!Fc(o))return o;let r=pWe(o.text);return r===o.text?o:{...o,text:r}}).filter(o=>!Fc(o)||o.text.trim().length>0);if(n.length===0&&e.length>0){let o=e[0];if(Fc(o))return[{...o,text:"..."}]}return n.length>0?n:e}function _v(e,t){let n=t.split(`
|
|
919
|
+
`).length,o=/\b(?:error|fail(?:ed|ure)?|exception|panic|traceback)\b/i.test(t),r=[];if(t.indexOf("/")!==-1){let a=(t.length>HEe?t.slice(0,HEe):t).match(fWe);a&&(r=[...new Set(a)].slice(0,5))}let i=`[output omitted \u2014 ${e}: ${n} lines`;return o&&(i+=", contained errors"),r.length>0&&(i+=`, paths: ${r.join(", ")}`),i+=" \u2014 use recall for details]",i}function qEe(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=t*16777619>>>0;return t}function YEe(e){try{let t=JSON.parse(e),n=t.path||t.filePath||t.file;if(!n)return;let o=typeof t.offset=="number"?t.offset:void 0,r=typeof t.limit=="number"?t.limit:void 0;return{path:n,offset:o,limit:r}}catch{let t=e.match(/(?:[\w.-]+\/)+[\w.-]+\.\w{1,5}/);return t?{path:t[0],offset:void 0,limit:void 0}:void 0}}function mWe(e,t){if(e.path!==t.path)return!1;if(e.offset===void 0&&e.limit===void 0)return!0;if(t.offset===void 0&&t.limit===void 0)return!1;let n=e.offset??1,o=t.offset??1;if(e.limit===void 0)return n<=o;if(t.limit===void 0)return!1;let r=n+e.limit,i=o+t.limit;return n<=o&&r>=i}function _We(e){return e.offset!==void 0&&e.limit!==void 0?` lines ${e.offset}-${e.offset+e.limit-1}`:e.offset!==void 0?` from line ${e.offset}`:""}function gWe(e,t,n){if(t){let o=n?_We(n):"";return`[earlier read of ${t}${o} \u2014 see latest read below for current content]`}return`[duplicate output \u2014 same content as later ${e} in this session \u2014 use recall for details]`}function hWe(e,t){let n=new Map,o=new Map;for(let s=0;s<e.length;s++)for(let a of e[s].parts){if(!Tr(a)||a.state.status!=="completed")continue;let c=a.state.output;if(!c||c.length<zEe)continue;let u=`${a.tool}:${qEe(c)}`;if(n.set(u,s),a.tool==="read_file"||a.tool==="read"){let d=typeof a.state.input=="string"?a.state.input:JSON.stringify(a.state.input),p=YEe(d);if(p){let f=o.get(p.path);f||(f=[],o.set(p.path,f)),f.push({range:p,msgIdx:s})}}}let r=!1,i=e.map((s,a)=>{if(a>=t)return s;let c=!1,u=s.parts.map(d=>{if(!Tr(d)||d.state.status!=="completed")return d;let p=d.state.output;if(!p||p.length<zEe)return d;let f=`${d.tool}:${qEe(p)}`,m=n.get(f)===a,_,h=!1;if(d.tool==="read_file"||d.tool==="read"){let T=typeof d.state.input=="string"?d.state.input:JSON.stringify(d.state.input);if(_=YEe(T),_){let S=o.get(_.path);if(S){for(let y of S)if(y.msgIdx>a&&mWe(y.range,_)){h=!0;break}}}}return m&&!h?d:(c=!0,{...d,state:{...d.state,output:gWe(d.tool,_?.path,_)}})});return c?(r=!0,{...s,parts:u}):s});return r?i:e}function EWe(e){let t=!1,n=e.map(o=>{if(o.info.role!=="assistant")return o;let r=!1,i=o.parts.map(s=>{if(!Tr(s))return s;let{status:a}=s.state;if(a==="completed"||a==="error")return s;r=!0;let c="time"in s.state?s.state.time.start:0;return{...s,state:{status:"error",input:s.state.input,error:"[tool execution interrupted \u2014 session recovered]",metadata:"metadata"in s.state?s.state.metadata:void 0,time:{start:c,end:c}}}});return r?(t=!0,{...o,parts:i}):o});return t?n:e}function WEe(e){return e.map(t=>!Tr(t)||t.state.status!=="completed"?t:{...t,state:{...t.state,output:_v(t.tool,t.state.output)}})}function CH(e){return[{info:{id:"lore-distilled-user",sessionID:"",role:"user",time:{created:0},agent:"",model:{providerID:"",modelID:""}},parts:[{id:"lore-distilled-user-part",sessionID:"",messageID:"lore-distilled-user",type:"text",text:"[Memory context follows \u2014 do not reference this format in your responses]",time:{start:0,end:0}}]},{info:{id:"lore-distilled-assistant",sessionID:"",role:"assistant",time:{created:0},parentID:"lore-distilled-user",modelID:"",providerID:"",mode:"memory",path:{cwd:"",root:""},cost:0,tokens:{input:0,output:0,reasoning:0,cache:{read:0,write:0}}},parts:[{id:"lore-distilled-assistant-part",sessionID:"",messageID:"lore-distilled-assistant",type:"text",text:e+`
|
|
920
|
+
|
|
921
|
+
I'm ready to continue.`,time:{start:0,end:0}}]}]}function OH(e){if(!e.length)return[];let t=EE(e);return t?CH(t):[]}function TWe(e,t,n){if(!e.length)return n.prefixCache=null,{messages:[],tokens:0};let o=e[e.length-1],r=n.prefixCache;if(r!==null&&r.sessionID===t&&r.rowCount<=e.length&&(r.rowCount===0||e[r.rowCount-1]?.id===r.lastDistillationID)){if(r.lastDistillationID===o.id)return{messages:r.prefixMessages,tokens:r.prefixTokens};let u=e.slice(r.rowCount),d=EE(u);if(d){let p=r.cachedText+`
|
|
922
|
+
|
|
923
|
+
`+d,f=CH(p),m=f.reduce((_,h)=>_+Yo(h),0);return n.prefixCache={sessionID:t,lastDistillationID:o.id,rowCount:e.length,cachedText:p,prefixMessages:f,prefixTokens:m},{messages:f,tokens:m}}}let s=EE(e);if(!s)return n.prefixCache=null,{messages:[],tokens:0};let a=CH(s),c=a.reduce((u,d)=>u+Yo(d),0);return n.prefixCache={sessionID:t,lastDistillationID:o.id,rowCount:e.length,cachedText:s,prefixMessages:a,prefixTokens:c},{messages:a,tokens:c}}function SWe(e){if(e.prefixTokens>e.distilledBudget&&e.prefix.length>0)return null;let t=e.sessState.rawWindowCache;if(t!==null&&t.sessionID===e.sessionID){let r=Math.max(0,e.messages.length-t.pinnedTotalCount),i=t.pinnedRawCount+r,s=Math.max(0,e.messages.length-i),a=e.messages.slice(s),c=a.reduce((p,f)=>p+Yo(f),0),d=Math.max(t.pinnedBudget,e.rawBudget)*1.15;if(c<=d){c>t.pinnedBudget*1.15&&(e.sessState.rawWindowCache={...t,pinnedRawCount:a.length,pinnedTotalCount:e.messages.length,pinnedBudget:e.rawBudget});let p=a.map(m=>{let _=fT(m.parts);return _!==m.parts?{info:m.info,parts:_}:m}),f=e.prefixTokens+c;return{messages:[...e.prefix,...p],distilledTokens:e.prefixTokens,rawTokens:c,totalTokens:f}}ze(`pin-overflow: session=${e.sessionID} pinnedTokens=${c} pinnedBudget=${t.pinnedBudget} effectiveBudget=${Math.round(d)} currentRawBudget=${e.rawBudget} windowSize=${a.length}`)}let o=cv({messages:e.messages,prefix:e.prefix,prefixTokens:e.prefixTokens,distilledBudget:e.distilledBudget,rawBudget:e.rawBudget,strip:"none"});if(o){let r=o.messages.length-e.prefix.length;r>0&&(e.sessState.rawWindowCache={sessionID:e.sessionID,pinnedRawCount:r,pinnedTotalCount:e.messages.length,pinnedBudget:e.rawBudget})}return o}function mT(){let e=pT;return pT=!1,e}function AWe(e){let t=Ke(),n=uWe(),o=e.sessionID??e.messages[0]?.info.sessionID,r=o?qm(o):ZEe(),i=o?r.ltmTokens:JEe,s=Math.max(0,uv-lv-n-i),a=Math.floor(s*t.budget.distilled),c=Math.floor(s*t.budget.raw),u=r.forceMinLayer;r.forceMinLayer=0,o&&u>0&&O$(o,0);let d=uv-lv,p=r.lastKnownInput>0,f=1.5;function m(we){return we?p?!0:we.totalTokens*f<=d:!1}p&&r.lastLayer>=1&&e.messages.length>=r.lastKnownMessageCount&&(u=Math.max(u,r.lastLayer)),r.postIdleCompact&&(r.postIdleCompact=!1,u=Math.max(u,1),c=Math.floor(s*.2),ze(`post-idle compact: session=${o} rawBudget=${c} (${Math.floor(s*t.budget.raw)}\u2192${c})`));let h;if(p){let O=(r.lastWindowMessageIDs.size>0?e.messages.filter(Ko=>!r.lastWindowMessageIDs.has(Ko.info.id)):e.messages.slice(-Math.max(0,e.messages.length-r.lastKnownMessageCount))).reduce((Ko,a_)=>Ko+Yo(a_),0),Mt=i-r.lastKnownLtm;h=r.lastKnownInput+O+Mt}else h=e.messages.reduce((O,Mt)=>O+Yo(Mt),0)+n+i;let T=p?h:h*f,S=dv>0?Math.min(d,dv):d;if(!p&&S<d&&(S=Math.floor(S*.7)),u===0&&T<=S){let we=p?h-(i-r.lastKnownLtm):h-n-i;return{messages:e.messages,layer:0,distilledTokens:0,rawTokens:Math.max(0,we),totalTokens:Math.max(0,we),usable:s,distilledBudget:a,rawBudget:c}}let y=vH(e.messages),v=hWe(e.messages,y),x=o?dWe(e.projectPath,o,e.messages,r):[],P=o?TWe(x,o,r):(()=>{let we=OH(x);return{messages:we,tokens:we.reduce((O,Mt)=>O+Yo(Mt),0)}})();if(u<=1){let we=o?SWe({messages:v,prefix:P.messages,prefixTokens:P.tokens,distilledBudget:a,rawBudget:c,sessionID:o,sessState:r}):cv({messages:v,prefix:P.messages,prefixTokens:P.tokens,distilledBudget:a,rawBudget:c,strip:"none"});if(m(we))return{...we,layer:1,usable:s,distilledBudget:a,rawBudget:c}}if(r.rawWindowCache=null,u<=2){let we=cv({messages:v,prefix:P.messages,prefixTokens:P.tokens,distilledBudget:a,rawBudget:Math.floor(s*.5),strip:"old-tools",protectedTurns:2});if(m(we))return pT=!0,{...we,layer:2,usable:s,distilledBudget:a,rawBudget:c}}let N=x.slice(-5),F=OH(N),se=F.reduce((we,O)=>we+Yo(O),0),$=cv({messages:v,prefix:F,prefixTokens:se,distilledBudget:Math.floor(s*.15),rawBudget:Math.floor(s*.55),strip:"all-tools"});if(m($))return pT=!0,{...$,layer:3,usable:s,distilledBudget:a,rawBudget:c};pT=!0;let G=x.slice(-2),Q=OH(G),J=Q.reduce((we,O)=>we+Yo(O),0),D=Math.max(2e3,Math.min(8e3,Math.floor(s*.25))),ue=vH(e.messages),de=e.messages.slice(ue).map(we=>({info:we.info,parts:fT(we.parts)})),Ie=de.reduce((we,O)=>we+Yo(O),0),Ae=[],Je=0,un=Math.max(0,D-Ie);for(let we=ue-1;we>=0&&Je<un;we--){let O=e.messages[we],Mt=Yo(O);if(Je+Mt>un)break;Ae.unshift({info:O.info,parts:fT(O.parts)}),Je+=Mt}let C=[...Ae,...de],er=Je+Ie;return{messages:[...Q,...C],layer:4,distilledTokens:J,rawTokens:er,totalTokens:J+er,usable:s,distilledBudget:a,rawBudget:c}}function kH(e){let t=AWe(e);t.messages=EWe(t.messages);let n=e.sessionID??e.messages[0]?.info.sessionID;if(n){let o=qm(n);o.lastTransformedCount=t.messages.length,o.lastTransformEstimate=t.totalTokens,o.lastLayer=t.layer,o.lastWindowMessageIDs=new Set(t.messages.map(r=>r.info.id)),o.lastTurnAt=Date.now(),t.layer>=2?(o.consecutiveHighLayer++,o.consecutiveHighLayer===3&&ze(`session ${n} has been at gradient layer ${t.layer}+ for 3 consecutive turns. Consider running /compact to reset the context window.`)):o.consecutiveHighLayer=0,ze(`gradient: session=${n} layer=${t.layer} tokens=${t.totalTokens} (distilled=${t.distilledTokens} raw=${t.rawTokens}) usable=${t.usable} cap=${dv||"off"}`)}return t}function vH(e){if(e.length===0)return 0;let t=e.length;for(let n=e.length-1;n>=0;n--)if(e[n].info.role==="user"){t=n;break}if(t===e.length)return 0;for(let n=t-1;n>=0;n--){let o=e[n];if(o.parts.some(Tr)){t=n;continue}if(o.info.role==="user"){t=n;continue}break}return t}function cv(e){if(e.prefixTokens>e.distilledBudget&&e.prefix.length>0)return null;let t=vH(e.messages),n=e.messages.slice(t),o=n.reduce((_,h)=>_+Yo(h),0);if(o>e.rawBudget)return null;let r=e.messages.slice(0,t),i=e.rawBudget-o,s=0,a=r.length,c=e.protectedTurns??0;for(let _=r.length-1;_>=0;_--){let h=r[_],T=Yo(h);if(s+T>i){a=_+1;break}s+=T,_===0&&(a=0)}let u=[...r.slice(a),...n],d=s+o,p=new Set(n.map(_=>_.info.id)),f=u.map((_,h)=>{let T=u.length-h,y=p.has(_.info.id)||e.strip==="none"||e.strip==="old-tools"&&T<=c*2,v=fT(y?_.parts:(e.strip==="all-tools",WEe(_.parts)));return v!==_.parts?{info:_.info,parts:v}:_}),m=e.prefixTokens+d;return{messages:[...e.prefix,...f],distilledTokens:e.prefixTokens,rawTokens:d,totalTokens:m}}var uv,lv,dv,cWe,KEe,dT,pv,JEe,HEe,fWe,zEe,pT,UH=E(()=>{"use strict";l();cO();As();rd();Wl();Yl();ys();uv=2e5,lv=32e3,dv=0,cWe=4e4,KEe=15e3,dT=null;pv=new Map;JEe=0;HEe=64*1024,fWe=/(?:[\w.-]+\/)+[\w.-]+\.\w{1,5}/g;zEe=600;pT=!1});var $H,BH=E(()=>{"use strict";l();$H=new Set});var Ai={};ht(Ai,{backfillMetrics:()=>wWe,compressionRatio:()=>VH,detectSegments:()=>eTe,latestMetaObservations:()=>NWe,loadForSession:()=>OWe,messagesToText:()=>nTe,metaDistill:()=>sTe,parseSourceIds:()=>_T,run:()=>MWe,truncateToolOutputsInContent:()=>tTe,workerSessionIDs:()=>$H});function VH(e,t){return t<=0?0:e/Math.sqrt(t)}function eTe(e,t){return e.length<=t?[e]:jH(e,t)}function jH(e,t){if(e.length<=t)return[e];let n=RWe(e,t),o=e.slice(0,n),r=e.slice(n),i=jH(o,t);return r.length<GH?i[i.length-1].push(...r):i.push(...jH(r,t)),i}function RWe(e,t){let n=[];for(let s=1;s<e.length;s++)n.push({index:s,gap:e[s].created_at-e[s-1].created_at});if(n.length===0)return t;let o=n.map(s=>s.gap).sort((s,a)=>s-a),r=o[Math.floor(o.length/2)],i={index:-1,gap:0};for(let s of n)s.gap>i.gap&&s.index>=GH&&e.length-s.index>=GH&&(i=s);return i.index>0&&i.gap>=r*yWe?i.index:t}function IWe(e){let t=new Date(e),n=t.getHours().toString().padStart(2,"0"),o=t.getMinutes().toString().padStart(2,"0");return`${n}:${o}`}function tTe(e,t){if(t<=0||e.length===0)return e;if(e.indexOf(IE)===-1)return QEe(e,t);let n=e.split(XEe),o=!1;for(let i of n)if(i.startsWith("[tool:")){o=!0;break}return o?n.map(i=>QEe(i,t)).join(XEe):e}function QEe(e,t){if(!e.startsWith("[tool:"))return e;let n=e.indexOf("] ");if(n<0)return e;let o=e.slice(6,n),r=e.slice(n+2);return r.length<=t?e:`[tool:${o}] ${_v(o,r)}`}function nTe(e,t){let n=t??Ke().distillation.toolOutputMaxChars;return e.map(o=>{let r=o.role==="user"?o.content:tTe(o.content,n);return`[${o.role}] (${IWe(o.created_at)}) ${r}`}).join(`
|
|
924
|
+
|
|
925
|
+
`)}function rTe(e){let t=e.match(/<observations>([\s\S]*?)<\/observations>/i),n=t?t[1].trim():e.trim();return n?{observations:n}:null}function bWe(e,t){let n=Ue(e);return j().query("SELECT observations FROM distillations WHERE project_id = ? AND session_id = ? ORDER BY created_at DESC LIMIT 1").get(n,t)?.observations||void 0}function NWe(e,t){return oTe(e,t)?.observations}function oTe(e,t){let n=Ue(e),o=j().query(`SELECT observations, generation FROM distillations
|
|
926
|
+
WHERE project_id = ? AND session_id = ? AND generation > 0
|
|
927
|
+
ORDER BY generation DESC, created_at DESC LIMIT 1`).get(n,t);if(!(!o||!o.observations))return o}function _T(e){try{let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return um("corrupt source_ids in distillation, defaulting to []"),[]}}function OWe(e,t,n=!1){let o=Ue(e),r=n?"SELECT id, project_id, session_id, observations, source_ids, generation, token_count, created_at, r_compression, c_norm FROM distillations WHERE project_id = ? AND session_id = ? ORDER BY created_at ASC":"SELECT id, project_id, session_id, observations, source_ids, generation, token_count, created_at, r_compression, c_norm FROM distillations WHERE project_id = ? AND session_id = ? AND archived = 0 ORDER BY created_at ASC";return j().query(r).all(o,t).map(s=>({...s,source_ids:_T(s.source_ids)}))}function iTe(e){let t=Ue(e.projectPath),n=crypto.randomUUID(),o=JSON.stringify(e.sourceIDs),r=Math.ceil(e.observations.length/3);return j().query(`INSERT INTO distillations (id, project_id, session_id, narrative, facts, observations, source_ids, generation, token_count, created_at, r_compression, c_norm)
|
|
928
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(n,t,e.sessionID,"","[]",e.observations,o,e.generation,r,Date.now(),e.rCompression??null,e.cNorm??null),n}function CWe(e,t){let n=Ue(e);return j().query("SELECT COUNT(*) as count FROM distillations WHERE project_id = ? AND session_id = ? AND generation = 0 AND archived = 0").get(n,t).count}function vWe(e,t){let n=Ue(e);return j().query("SELECT id, project_id, session_id, observations, source_ids, generation, token_count, created_at, r_compression, c_norm FROM distillations WHERE project_id = ? AND session_id = ? AND generation = 0 AND archived = 0 ORDER BY created_at ASC").all(n,t).map(r=>({...r,source_ids:_T(r.source_ids)}))}function PWe(e){if(!e.length)return;let t=e.map(()=>"?").join(",");j().query(`UPDATE distillations SET archived = 1 WHERE id IN (${t})`).run(...e)}function xWe(e,t){let n=Ue(e),o=j().query("SELECT source_ids FROM distillations WHERE project_id = ? AND session_id = ?").all(n,t),r=new Set;for(let c of o)for(let u of _T(c.source_ids))r.add(u);if(o.length===0){let c=j().query("UPDATE temporal_messages SET distilled = 0 WHERE project_id = ? AND session_id = ? AND distilled = 1").run(n,t);return Number(c.changes)}let s=j().query("SELECT id FROM temporal_messages WHERE project_id = ? AND session_id = ? AND distilled = 1").all(n,t).filter(c=>!r.has(c.id)).map(c=>c.id);if(!s.length)return 0;let a=500;for(let c=0;c<s.length;c+=a){let u=s.slice(c,c+a),d=u.map(()=>"?").join(",");j().query(`UPDATE temporal_messages SET distilled = 0 WHERE id IN (${d})`).run(...u)}return s.length}async function MWe(e){let t=xWe(e.projectPath,e.sessionID);t>0&&ze(`Reset ${t} orphaned messages for re-observation`);let n=Ke(),o=3,r=0,i=0;for(let s=0;s<o;s++){let a=JB(e.projectPath,e.sessionID);if(!e.force&&a.length<n.distillation.minMessages&&s===0)break;if(a.length>0){let c=eTe(a,n.distillation.maxSegment);for(let u of c)await LWe({llm:e.llm,projectPath:e.projectPath,sessionID:e.sessionID,messages:u,model:e.model,urgent:e.urgent})&&(i+=u.length,r++)}if(!e.skipMeta&&CWe(e.projectPath,e.sessionID)>=n.distillation.metaThreshold&&(await sTe({llm:e.llm,projectPath:e.projectPath,sessionID:e.sessionID,model:e.model,urgent:e.urgent}),r++),!mT())break}return{rounds:r,distilled:i}}async function LWe(e){let t=bWe(e.projectPath,e.sessionID),n=nTe(e.messages),o=e.messages[0],r=o?new Date(o.created_at).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}):"unknown date",i=hE({priorObservations:t,date:r,messages:n}),s=e.model??Ke().model,a=await e.llm.prompt(gE,i,{model:s,workerID:"lore-distill",thinking:!1,urgent:e.urgent,sessionID:e.sessionID});if(!a)return null;let c=rTe(a);if(!c)return null;let u=Math.ceil(c.observations.length/3),d=e.messages.reduce((_,h)=>_+h.tokens,0),p=VH(u,d),f=uO(e.messages.map(_=>_.created_at)),m=iTe({projectPath:e.projectPath,sessionID:e.sessionID,observations:c.observations,sourceIDs:e.messages.map(_=>_.id),generation:0,rCompression:p,cNorm:f});if(QB(e.messages.map(_=>_.id)),ze(`distill segment: ${e.messages.length} msgs, ${d}\u2192${u} tokens, R=${p.toFixed(2)}, C_norm=${f.toFixed(3)}`),eu()&&TH(m,c.observations),Ke().knowledge.enabled)for(let _ of bH(c.observations))try{sd({projectPath:e.projectPath,category:_.category,title:_.title,content:_.content,session:e.sessionID,scope:"project"})}catch{}return c}async function sTe(e){let t=vWe(e.projectPath,e.sessionID),n=oTe(e.projectPath,e.sessionID);if(n){if(t.length===0)return null}else if(t.length<3)return null;let o=GB(t,n?.observations),r=e.model??Ke().model,i=await e.llm.prompt(BB,o,{model:r,workerID:"lore-distill",thinking:!1,urgent:e.urgent,sessionID:e.sessionID});if(!i)return null;let s=rTe(i);if(!s)return null;let a=Math.max(...t.map(d=>d.generation),n?.generation??0),c=t.flatMap(d=>d.source_ids),u;j().exec("BEGIN IMMEDIATE");try{u=iTe({projectPath:e.projectPath,sessionID:e.sessionID,observations:s.observations,sourceIDs:c,generation:a+1}),PWe(t.map(d=>d.id)),j().exec("COMMIT")}catch(d){throw j().exec("ROLLBACK"),d}if(eu()&&TH(u,s.observations),Ke().knowledge.enabled)for(let d of bH(s.observations))try{sd({projectPath:e.projectPath,category:d.category,title:d.title,content:d.content,session:e.sessionID,scope:"project"})}catch{}return s}function wWe(){let e=j().query("SELECT id, source_ids, token_count FROM distillations WHERE r_compression IS NULL").all();if(!e.length)return 0;let t=j().prepare("UPDATE distillations SET r_compression = ?, c_norm = ? WHERE id = ?"),n=0;for(let o of e){let r=_T(o.source_ids);if(!r.length)continue;let i=r.map(()=>"?").join(","),s=j().query(`SELECT tokens, created_at FROM temporal_messages WHERE id IN (${i})`).all(...r);if(!s.length)continue;let a=s.reduce((p,f)=>p+f.tokens,0),c=s.map(p=>p.created_at),u=VH(o.token_count,a),d=uO(c);t.run(u,d,o.id),n++}return n>0&&ze(`backfilled metrics for ${n} distillations (${e.length-n} skipped \u2014 missing sources)`),n}var GH,yWe,XEe,aTe=E(()=>{"use strict";l();As();rd();dm();dm();uT();zm();ys();NH();Wl();UH();BH();GH=3,yWe=3;XEe=`
|
|
929
|
+
`+IE});var ud={};ht(ud,{consolidate:()=>UWe,resetCurationTracker:()=>kWe,run:()=>DWe});function cTe(e){let t=e.trim().replace(/^```json?\s*/i,"").replace(/\s*```$/i,"");try{let n=JSON.parse(t);return Array.isArray(n)?n.filter(o=>typeof o=="object"&&o!==null&&"op"in o&&typeof o.op=="string"):[]}catch{return[]}}async function DWe(e){let t=Ke();if(!t.curator.enabled)return{created:0,updated:0,deleted:0};let n=XB(e.projectPath,e.sessionID),o=gv.get(e.sessionID)??0,r=n.filter(T=>T.created_at>o);if(r.length<3)return{created:0,updated:0,deleted:0};let i=r.map(T=>`[${T.role}] ${T.content}`).join(`
|
|
930
|
+
|
|
931
|
+
`),a=ad(e.projectPath,!1).map(T=>({id:T.id,category:T.category,title:T.title,content:T.content})),c=VB({messages:i,existing:a}),u=e.model??t.model,d=await e.llm.prompt(jB,c,{model:u,workerID:"lore-curator",thinking:!1,sessionID:e.sessionID});if(!d)return{created:0,updated:0,deleted:0};let p=cTe(d),f=0,m=0,_=0,h=[];for(let T of p)if(T.op==="create"){let S=T.content.length>Ym?T.content.slice(0,Ym)+" [truncated \u2014 entry too long]":T.content,y=sd({projectPath:T.scope==="project"?e.projectPath:void 0,category:T.category,title:T.title,content:S,session:e.sessionID,scope:T.scope,crossProject:T.crossProject??!0});h.push(y),f++}else if(T.op==="update"){if(qo(T.id)){let y=T.content!==void 0&&T.content.length>Ym?T.content.slice(0,Ym)+" [truncated \u2014 entry too long]":T.content;id(T.id,{content:y,confidence:T.confidence}),T.content!==void 0&&h.push(T.id),m++}}else T.op==="delete"&&qo(T.id)&&(iv(T.id),_++);for(let T of h)IH(T);return gv.set(e.sessionID,Date.now()),{created:f,updated:m,deleted:_}}function kWe(e){e?gv.delete(e):gv.clear()}async function UWe(e){let t=Ke();if(!t.curator.enabled)return{updated:0,deleted:0};let n=ad(e.projectPath,!1);if(n.length<=t.curator.maxEntries)return{updated:0,deleted:0};let o=n.map(d=>({id:d.id,category:d.category,title:d.title,content:d.content})),r=HB({entries:o,targetMax:t.curator.maxEntries}),i=e.model??t.model,s=await e.llm.prompt(FB,r,{model:i,workerID:"lore-curator",thinking:!1,sessionID:e.sessionID});if(!s)return{updated:0,deleted:0};let a=cTe(s),c=0,u=0;for(let d of a)if(d.op==="update"){if(qo(d.id)){let f=d.content!==void 0&&d.content.length>Ym?d.content.slice(0,Ym)+" [truncated \u2014 entry too long]":d.content;id(d.id,{content:f,confidence:d.confidence}),c++}}else d.op==="delete"&&qo(d.id)&&(iv(d.id),u++);return{updated:c,deleted:u}}var Ym,gv,uTe=E(()=>{"use strict";l();rd();dm();zm();Wl();Ym=1200;gv=new Map});function $We(e){switch(e.source){case"knowledge":case"cross-knowledge":return`${e.item.title} ${e.item.content}`;case"distillation":return e.item.observations;case"temporal":return e.item.content;case"lat-section":return`${e.item.heading} ${e.item.content}`}}function BWe(e){switch(e.source){case"knowledge":return`k:${e.item.id}`;case"cross-knowledge":return`xk:${e.item.id}`;case"distillation":return`d:${e.item.id}`;case"temporal":return`t:${e.item.id}`;case"lat-section":return`lat:${e.item.id}`}}function GWe(e){let t=e.query.toLowerCase().split(/\s+/).filter(s=>s.length>1);if(!t.length)return[];let n=t.map(()=>"LOWER(observations) LIKE ?").join(" AND "),o=t.map(s=>`%${s}%`),r=e.sessionID?`SELECT id, observations, generation, created_at, session_id, c_norm FROM distillations WHERE project_id = ? AND session_id = ? AND ${n} ORDER BY created_at DESC LIMIT ?`:`SELECT id, observations, generation, created_at, session_id, c_norm FROM distillations WHERE project_id = ? AND ${n} ORDER BY created_at DESC LIMIT ?`,i=e.sessionID?[e.pid,e.sessionID,...o,e.limit]:[e.pid,...o,e.limit];return j().query(r).all(...i)}function jWe(e){let t=Ue(e.projectPath),n=e.limit??10,o=Gr(e.query);if(o===xt)return[];let r=e.sessionID?`SELECT d.id, d.observations, d.generation, d.created_at, d.session_id, d.c_norm, rank
|
|
932
|
+
FROM distillation_fts f
|
|
933
|
+
CROSS JOIN distillations d ON d.rowid = f.rowid
|
|
934
|
+
WHERE distillation_fts MATCH ?
|
|
935
|
+
AND d.project_id = ? AND d.session_id = ?
|
|
936
|
+
ORDER BY rank LIMIT ?`:`SELECT d.id, d.observations, d.generation, d.created_at, d.session_id, d.c_norm, rank
|
|
937
|
+
FROM distillation_fts f
|
|
938
|
+
CROSS JOIN distillations d ON d.rowid = f.rowid
|
|
939
|
+
WHERE distillation_fts MATCH ?
|
|
940
|
+
AND d.project_id = ?
|
|
941
|
+
ORDER BY rank LIMIT ?`,i=e.sessionID?[o,t,e.sessionID,n]:[o,t,n];try{let s=j().query(r).all(...i);if(s.length)return s;let a=Fo(e.query);if(a===xt)return[];let c=e.sessionID?[a,t,e.sessionID,n]:[a,t,n];return j().query(r).all(...c)}catch{return GWe({pid:t,query:e.query,sessionID:e.sessionID,limit:n}).map((s,a)=>({...s,rank:-(10-a)}))}}function VWe(e,t){if(!e.length)return"No results found for this query.";let n=e.slice(0,t).map(({item:o})=>{switch(o.source){case"knowledge":{let r=o.item;return Ta(Vo(`**[knowledge/${r.category}]** ${wn(r.title)}: ${wn(r.content)}`))}case"cross-knowledge":{let r=o.item;return Ta(Vo(`**[knowledge/${r.category} from: ${o.projectLabel}]** ${wn(r.title)}: ${wn(r.content)}`))}case"distillation":{let r=o.item,i=r.observations.length>500?r.observations.slice(0,500)+"...":r.observations;return sO(`**[distilled]** ${wn(i)}`)}case"temporal":{let r=o.item,i=r.content.length>500?r.content.slice(0,500)+"...":r.content;return sO(`**[temporal/${r.role}]** (session: ${r.session_id.slice(0,8)}...) ${wn(i)}`)}case"lat-section":{let r=o.item,i=r.first_paragraph?wn(r.first_paragraph):wn(r.content.length>300?r.content.slice(0,300)+"...":r.content);return Ta(Vo(`**[lat.md/${r.file}]** ${wn(r.heading)}: ${i}`))}}});return Hl(ql(cm(2,"Recall Results"),zl(n)))}async function FH(e){let{query:t,scope:n="all",projectPath:o,sessionID:r,knowledgeEnabled:i=!0,llm:s,searchConfig:a}=e,c=a?.recallLimit??10;if(Gr(t)===xt)return"Query too vague \u2014 try using specific keywords, file names, or technical terms.";let u=[t];if(a?.queryExpansion&&s)try{u=await ZB(s,t,void 0,r)}catch(f){ze("recall: query expansion failed, using original:",f)}let d=[];for(let f of u){let m=[];if(i&&n!=="session")try{m.push(...yH({query:f,projectPath:o,limit:c}))}catch(T){SE("recall: knowledge search failed:",T)}let _=[];if(n!=="knowledge")try{_.push(...jWe({projectPath:o,query:f,sessionID:n==="session"?r:void 0,limit:c}))}catch(T){SE("recall: distillation search failed:",T)}let h=[];if(n!=="knowledge")try{h.push(...eG({projectPath:o,query:f,sessionID:n==="session"?r:void 0,limit:c}))}catch(T){SE("recall: temporal search failed:",T)}if(d.push({items:m.map(T=>({source:"knowledge",item:T})),key:T=>`k:${T.item.id}`},{items:_.map(T=>({source:"distillation",item:T})),key:T=>`d:${T.item.id}`},{items:h.map(T=>({source:"temporal",item:T})),key:T=>`t:${T.item.id}`}),h.length>0){let T=[...h].sort((S,y)=>y.created_at-S.created_at);d.push({items:T.map(S=>({source:"temporal",item:S})),key:S=>`t:${S.item.id}`})}}if(eu()&&n!=="session")try{let[f]=await nv([t],"query");if(i){let m=wEe(f,c),_=[];for(let h of m){let T=qo(h.id);T&&_.push({source:"knowledge",item:{...T,rank:-h.similarity}})}_.length&&d.push({items:_,key:h=>`k:${h.item.id}`})}if(n!=="knowledge"){let _=DEe(f,c).map(h=>{let T=j().query("SELECT id, observations, generation, created_at, session_id, c_norm FROM distillations WHERE id = ?").get(h.id);return T?{source:"distillation",item:{...T,rank:-h.similarity}}:null}).filter(h=>h!==null);_.length&&d.push({items:_,key:h=>`d:${h.item.id}`})}}catch(f){ze("recall: vector search failed:",f)}if(n!=="session"&&Fm(o))try{let f=SH({query:t,projectPath:o,limit:c});f.length&&d.push({items:f.map(m=>({source:"lat-section",item:m})),key:m=>`lat:${m.item.id}`})}catch(f){ze("recall: lat.md section search failed:",f)}if(i&&n==="all")try{let f=RH({query:t,excludeProjectPath:o,limit:c});f.length&&d.push({items:f.map(m=>{let _=(m.project_id?b$(m.project_id):null)??"other";return{source:"cross-knowledge",item:m,projectLabel:_}}),key:m=>`xk:${m.item.id}`})}catch(f){ze("recall: cross-project knowledge search failed:",f)}{let f=[];for(let m of d)for(let _ of m.items){if(_.source!=="distillation")continue;let h=`d:${_.item.id}`,T=_.item,S=T.c_norm??0,y=Math.min((Date.now()-T.created_at)/864e5,90),v=S+y/90*.1;f.push({tagged:_,key:h,qualityScore:v})}if(f.length>1){let m=new Set,_=f.filter(h=>m.has(h.key)?!1:(m.add(h.key),!0));_.sort((h,T)=>h.qualityScore-T.qualityScore),d.push({items:_.map(h=>h.tagged),key:h=>`d:${h.item.id}`})}}if(AE(t).length>0&&d.length>0){let f=new Map;for(let h of d)for(let T of h.items){let S=h.key(T);f.has(S)||f.set(S,T)}let m=[...f.entries()],_=KB(m,([,h])=>$We(h),t);_.length&&d.push({items:_.map(([,h])=>h),key:BWe})}let p=WB(d);return VWe(p,20)}var HH,hv,lTe=E(()=>{"use strict";l();ov();zm();dm();uT();ys();As();lm();Yl();HH="Search your persistent memory for this project. Your visible context is a trimmed window \u2014 older messages, decisions, and details may not be visible to you even within the current session. Use this tool whenever you need information that isn't in your current context: file paths, past decisions, user preferences, prior approaches, or anything from earlier in this conversation or previous sessions. Always prefer recall over assuming you don't have the information. Searches long-term knowledge, distilled history, and raw message archives.",hv={query:"What to search for \u2014 be specific. Include keywords, file names, or concepts.",scope:"Search scope: 'all' (default) searches everything, 'session' searches current session only, 'project' searches all sessions in this project, 'knowledge' searches only long-term knowledge."}});function qWe(e){let t=[],n=0;for(;n<e.length;){let s=-1,a=0;for(let d of HWe){let p=e.indexOf(d,n);p!==-1&&(s===-1||p<s)&&(s=p,a=d.length)}if(s===-1)break;let c=s+a,u=e.indexOf(Ev,c);if(u===-1){t.push({markerStart:s,bodyStart:c,bodyEnd:e.length,spanEnd:e.length});break}t.push({markerStart:s,bodyStart:c,bodyEnd:u,spanEnd:u+Ev.length}),n=u+Ev.length}if(t.length===0)return{before:e,section:null,after:""};let o=e.slice(0,t[0].markerStart),r=e.slice(t[0].bodyStart,t[0].bodyEnd),i=e.slice(t[t.length-1].spanEnd);return{before:o,section:r,after:i}}function YWe(e){let t=ad(e,!1);if(!t.length)return`
|
|
942
|
+
`;let n=new Map;for(let r of t){let i=n.get(r.category)??[];i.push(r),n.set(r.category,i)}let o=[""];o.push("## Long-term Knowledge");for(let[r,i]of[...n.entries()].sort((s,a)=>s[0].localeCompare(a[0]))){o.push(""),o.push(`### ${r.charAt(0).toUpperCase()+r.slice(1)}`),o.push("");let s=[...i].sort((a,c)=>a.title.localeCompare(c.title,void 0,{sensitivity:"base"}));for(let a=0;a<s.length;a++){a>0&&o.push(""),o.push(`<!-- lore:${s[a].id} -->`);let c=Hl(ql(zl([Ta(_E(wn(s[a].title)),Vo(": "+wn(s[a].content)))]))).trimEnd();o.push(c)}}return o.push(""),o.join(`
|
|
943
|
+
`)}function zH(e){Sv(e.projectPath);let n=dTe+`
|
|
944
|
+
## Long-term Knowledge
|
|
945
|
+
|
|
946
|
+
For long-term knowledge entries managed by [lore](https://github.com/BYK/loreai) (gotchas, patterns, decisions, architecture), see [\`.lore.md\`](.lore.md) in the project root.
|
|
947
|
+
`+Ev+`
|
|
948
|
+
`,o="";(0,Ra.existsSync)(e.filePath)&&(o=(0,Ra.readFileSync)(e.filePath,"utf8"));let{before:r,after:i}=qWe(o),s=r.trimEnd(),a=s.length>0?s+`
|
|
949
|
+
|
|
950
|
+
`:"",c=i.trimStart(),u=c.length>0?`
|
|
951
|
+
`+c:"",d=a+n+u;(0,Ra.mkdirSync)((0,Tv.dirname)(e.filePath),{recursive:!0}),(0,Ra.writeFileSync)(e.filePath,d,"utf8")}function Sv(e){let t=YWe(e),n=zWe+`
|
|
952
|
+
`+t;(0,Ra.writeFileSync)((0,Tv.join)(e,pTe),n,"utf8")}var Ra,Tv,dTe,Ev,HWe,pTe,zWe,fTe=E(()=>{"use strict";l();Ra=require("fs"),Tv=require("path");zm();Yl();dTe="<!-- This section is maintained by the coding agent via lore (https://github.com/BYK/loreai) -->",Ev="<!-- End lore-managed section -->",HWe=[dTe,"<!-- This section is maintained by the coding agent via lore (https://github.com/BYK/opencode-lore) -->","<!-- This section is auto-maintained by lore (https://github.com/BYK/opencode-lore) -->"],pTe=".lore.md",zWe="<!-- Managed by lore (https://github.com/BYK/loreai) \u2014 manual edits are imported on next session. -->"});var Ia={};ht(Ia,{WORKER_JUDGE_SYSTEM:()=>TTe,clearValidatedWorkerModel:()=>hTe,computeModelFingerprint:()=>mTe,getValidatedWorkerModel:()=>_Te,isValidationStale:()=>KWe,parseJudgeScore:()=>ATe,resolveWorkerModel:()=>JWe,runValidation:()=>ZWe,selectWorkerCandidates:()=>WWe,storeValidatedWorkerModel:()=>gTe,structuralCheck:()=>ETe,workerJudgeUser:()=>STe});function WWe(e,t){let n=t.filter(a=>a.providerID===e.providerID&&a.status==="active"&&a.capabilities.input.text);if(n.length===0)return[];let o=[...n].sort((a,c)=>{let u=a.cost.input-c.cost.input;if(u!==0)return u;let d=a.capabilities.reasoning?1:0,p=c.capabilities.reasoning?1:0;return d-p}),r=o[0],i=o.filter(a=>a.cost.input<e.cost.input).pop(),s=new Map;return s.set(r.id,r),i&&i.id!==r.id&&s.set(i.id,i),r.id===e.id||r.cost.input>=e.cost.input?[r]:[...s.values()]}function mTe(e,t,n){let o=[...n].sort();return AN(JSON.stringify({providerID:e,sessionModelID:t,modelIDs:o}))}function _Te(e){let t=j().query("SELECT value FROM kv_meta WHERE key = ?").get(`${qH}${e}`);if(!t)return null;try{return JSON.parse(t.value)}catch{return null}}function gTe(e){let t=`${qH}${e.providerID}`,n=JSON.stringify(e);j().query("INSERT INTO kv_meta (key, value) VALUES (?, ?) ON CONFLICT(key) DO UPDATE SET value = ?").run(t,n,n)}function hTe(e){j().query("DELETE FROM kv_meta WHERE key = ?").run(`${qH}${e}`)}function KWe(e,t){return e?e.fingerprint!==t:!0}function ETe(e,t){if(e==null||e.length===0)return{passed:!1,observationCount:0,tokenCount:0,reason:e===null?"parse_failed":"empty"};let n=a=>a.split(`
|
|
953
|
+
`).filter(c=>c.trim().length>0).length,o=n(t),r=n(e),i=Math.ceil(e.length/3);if(o>0&&(r<o*.5||r>o*1.5))return{passed:!1,observationCount:r,tokenCount:i,reason:`observation_count_${r}_vs_ref_${o}`};let s=Math.ceil(t.length/3);return i===0?{passed:!1,observationCount:r,tokenCount:i,reason:"empty"}:s>0&&i>s*3?{passed:!1,observationCount:r,tokenCount:i,reason:`token_count_${i}_vs_ref_${s}_3x`}:{passed:!0,observationCount:r,tokenCount:i}}function STe(e,t){return`<reference>
|
|
954
|
+
${e}
|
|
955
|
+
</reference>
|
|
956
|
+
|
|
957
|
+
<candidate>
|
|
958
|
+
${t}
|
|
959
|
+
</candidate>`}function ATe(e){let t=e.trim().match(/^([1-5])/);return t?parseInt(t[1],10):null}async function ZWe(e){let{llm:t,candidates:n,referenceObservations:o,sourceMessagesText:r,date:i}=e,s=hE({messages:r,date:i});for(let a of n){if(a.id===e.sessionModelID)continue;let c=null;try{let m=await t.prompt(gE,s,{model:{providerID:a.providerID,modelID:a.id},workerID:"lore-distill",thinking:!1});if(m){let _=m.match(/<observations>([\s\S]*?)<\/observations>/);c=_?_[1].trim():m.trim()}}catch(m){um(`worker model validation: candidate ${a.id} failed:`,m);continue}let u=ETe(c,o);if(!u.passed){ze(`worker model validation: ${a.id} failed structural check: ${u.reason}`);continue}let d=null;try{let m=await t.prompt(TTe,STe(o,c),{workerID:"lore-distill",thinking:!1});m&&(d=ATe(m))}catch(m){um(`worker model validation: judge call failed for ${a.id}:`,m)}if(d!==null&&d<3){ze(`worker model validation: ${a.id} failed judge (score=${d})`);continue}let p=mTe(e.providerID,e.sessionModelID,n.map(m=>m.id)),f={modelID:a.id,providerID:a.providerID,fingerprint:p,validatedAt:Date.now(),judgeScore:d};return gTe(f),ze(`worker model validated: ${a.id} (judge=${d}) for provider ${e.providerID}`),f}return hTe(e.providerID),ze(`worker model validation: no candidate passed for ${e.providerID} \u2014 cleared stale entry`),null}function JWe(e,t,n){if(t)return t;let o=_Te(e),r=1440*60*1e3;return o&&Date.now()-o.validatedAt<=r?{providerID:o.providerID,modelID:o.modelID}:n}var qH,TTe,yTe=E(()=>{"use strict";l();As();yN();ys();Wl();qH="lore:worker_model:";TTe=`You are evaluating distillation quality. You will be given a REFERENCE distillation (produced by a capable model) and a CANDIDATE distillation (produced by a cheaper model) of the same conversation segment.
|
|
960
|
+
|
|
961
|
+
Rate the candidate on a scale of 1-5:
|
|
962
|
+
5 = Captures all key facts and decisions, equivalent to reference
|
|
963
|
+
4 = Captures most facts, minor omissions
|
|
964
|
+
3 = Captures the essential facts, some detail loss acceptable
|
|
965
|
+
2 = Missing important facts or technical details
|
|
966
|
+
1 = Significantly incomplete or inaccurate
|
|
967
|
+
|
|
968
|
+
Respond with ONLY a single digit (1-5).`});var Wo=E(()=>{"use strict";l();dm();zm();aTe();uTe();uT();ov();NH();ys();lTe();cO();rd();As();UH();Wl();fTe();BH();yTe();lm();Yl()});var Ze,ld=E(()=>{"use strict";l();Ze="0.15.0"});function Av(){let e=process.env;return{port:t4e(e.LORE_LISTEN_PORT,6969),host:e.LORE_LISTEN_HOST||"127.0.0.1",upstreamAnthropic:RTe(e.LORE_UPSTREAM_ANTHROPIC||"https://api.anthropic.com"),upstreamOpenAI:RTe(e.LORE_UPSTREAM_OPENAI||"https://api.openai.com"),idleTimeoutSeconds:n4e(e.LORE_IDLE_TIMEOUT,60),debug:r4e(e.LORE_DEBUG)}}function yv(e){for(let t of XWe)if(e.startsWith(t.prefix))return{url:t.url,protocol:t.protocol};return null}function e4e(e){for(let t of QWe){let n=t.exec(e);if(n?.[1])return n[1].replace(/\/+$/,"")||null}return null}function YH(e,t){let n=t["x-lore-project"];if(n)return n;let o=e4e(e);return o||process.cwd()}function t4e(e,t){if(!e)return t;let n=Number.parseInt(e,10);return Number.isNaN(n)||n<0||n>65535?t:n}function n4e(e,t){if(!e)return t;let n=Number.parseInt(e,10);return Number.isNaN(n)||n<=0?t:n}function r4e(e){return e==="1"||e?.toLowerCase()==="true"}function RTe(e){return e.replace(/\/+$/,"")}var XWe,QWe,Rv=E(()=>{"use strict";l();XWe=[{prefix:"claude-",url:"https://api.anthropic.com",protocol:"anthropic"},{prefix:"nvidia/",url:"https://integrate.api.nvidia.com",protocol:"openai"},{prefix:"meta/",url:"https://integrate.api.nvidia.com",protocol:"openai"},{prefix:"mistralai/",url:"https://integrate.api.nvidia.com",protocol:"openai"},{prefix:"google/",url:"https://integrate.api.nvidia.com",protocol:"openai"},{prefix:"qwen/",url:"https://integrate.api.nvidia.com",protocol:"openai"},{prefix:"deepseek/",url:"https://integrate.api.nvidia.com",protocol:"openai"},{prefix:"gpt-",url:"https://api.openai.com",protocol:"openai"},{prefix:"o1-",url:"https://api.openai.com",protocol:"openai"},{prefix:"o3-",url:"https://api.openai.com",protocol:"openai"},{prefix:"o4-",url:"https://api.openai.com",protocol:"openai"},{prefix:"grok-",url:"https://api.x.ai",protocol:"openai"},{prefix:"mistral-",url:"https://api.mistral.ai",protocol:"openai"},{prefix:"codestral-",url:"https://api.mistral.ai",protocol:"openai"},{prefix:"gemini-",url:"https://generativelanguage.googleapis.com",protocol:"openai"}];QWe=[/["']?cwd["']?\s*[:=]\s*["']?(\/(?:home|Users)\/[^\s"',}]+)/,/[Ww]orking\s+directory[:=]\s*(\/(?:home|Users)\/[^\s"',]+)/,/(\/(?:home|Users)\/[^\s"',]+)\/(?:CLAUDE|AGENTS|\.lore)\.md/,/(\/(?:home|Users)\/[\w./-]+)/]});function nu(e){let t=e["x-api-key"]||e["X-Api-Key"];if(t)return{scheme:"api-key",value:t};let n=e.authorization||e.Authorization;if(n){let o=/^Bearer\s+(\S+)$/i.exec(n);if(o)return{scheme:"bearer",value:o[1]}}return null}function Cs(e){switch(e.scheme){case"api-key":return{"x-api-key":e.value};case"bearer":return{Authorization:`Bearer ${e.value}`}}}function Iv(e){return(0,ITe.createHash)("sha256").update(`${e.scheme}|${e.value}`).digest("hex").slice(0,16)}function NTe(e,t){bTe.set(e,t)}function o4e(e){return bTe.get(e)??null}function WH(e){OTe=e}function i4e(){return OTe}function bv(e){if(e){let t=o4e(e);if(t)return t}return i4e()}var ITe,bTe,OTe,dd=E(()=>{"use strict";l();ITe=require("node:crypto");bTe=new Map;OTe=null});function c4e(e){switch(e.type){case"text":return{type:"text",text:String(e.text??"")};case"thinking":return{type:"thinking",thinking:String(e.thinking??""),...e.signature!=null?{signature:String(e.signature)}:void 0};case"tool_use":return{type:"tool_use",id:String(e.id??""),name:String(e.name??""),input:e.input};case"tool_result":{let t="";return typeof e.content=="string"?t=e.content:Array.isArray(e.content)&&(t=e.content.filter(n=>n.type==="text").map(n=>String(n.text??"")).join(`
|
|
969
|
+
`)),{type:"tool_result",toolUseId:String(e.tool_use_id??""),content:t,...e.is_error?{isError:!0}:void 0}}default:return{type:"text",text:JSON.stringify(e)}}}function u4e(e){return typeof e=="string"?[{type:"text",text:e}]:Array.isArray(e)?e.map(t=>c4e(t)):[]}function l4e(e){return e==null?"":typeof e=="string"?e:Array.isArray(e)?e.filter(t=>t.type==="text").map(t=>String(t.text??"")).join(`
|
|
970
|
+
`):String(e)}function CTe(e){switch(e.type){case"text":return{type:"text",text:e.text};case"thinking":return{type:"thinking",thinking:e.thinking,...e.signature!=null?{signature:e.signature}:void 0};case"tool_use":return{type:"tool_use",id:e.id,name:e.name,input:e.input};case"tool_result":{let t={type:"tool_result",tool_use_id:e.toolUseId,content:e.content};return e.isError&&(t.is_error=!0),t}}}function vTe(e,t){let n=e??{},o=String(n.model??""),r=l4e(n.system),i=n.stream===!0,s=typeof n.max_tokens=="number"?n.max_tokens:4096,c=(Array.isArray(n.messages)?n.messages:[]).map(f=>({role:f.role==="assistant"?"assistant":"user",content:u4e(f.content)})),d=(Array.isArray(n.tools)?n.tools:[]).map(f=>({name:String(f.name??""),description:String(f.description??""),inputSchema:f.input_schema??{}})),p={};for(let[f,m]of Object.entries(n))a4e.has(f)||(p[f]=m);return{protocol:"anthropic",model:o,system:r,messages:c,tools:d,stream:i,maxTokens:s,metadata:p,rawHeaders:t}}function PTe(e,t){let n={"content-type":"application/json","anthropic-version":s4e},o=nu(e.rawHeaders);o&&Object.assign(n,Cs(o));let r=e.rawHeaders["anthropic-beta"]||e.rawHeaders["Anthropic-Beta"]||"";r&&(n["anthropic-beta"]=r);let i={model:e.model,max_tokens:e.maxTokens,stream:e.stream};if(e.system){let a=t?.systemTTL,c=t?.ltmSystem;if(a){let u=a==="1h"?{type:"ephemeral",ttl:"1h"}:{type:"ephemeral"},d=[{type:"text",text:e.system,cache_control:u}];c&&d.push({type:"text",text:c}),i.system=d}else i.system=c?`${e.system}
|
|
971
|
+
|
|
972
|
+
${c}`:e.system}let s=e.messages.map(a=>({role:a.role,content:a.content.map(CTe)}));if(t?.cacheConversation&&s.length>0){let a=s[s.length-1];if(a.content.length>0){let c=a.content[a.content.length-1];c.cache_control={type:"ephemeral"}}}if(i.messages=s,e.tools.length>0){let a=e.tools.map(c=>({name:c.name,description:c.description,input_schema:c.inputSchema}));if(t?.cacheTools&&a.length>0){let c=a[a.length-1];c.cache_control={type:"ephemeral",ttl:"1h"}}i.tools=a}for(let[a,c]of Object.entries(e.metadata))i[a]=c;return{url:"/v1/messages",headers:n,body:i}}function xTe(e){let t={input_tokens:e.usage.inputTokens,output_tokens:e.usage.outputTokens};return e.usage.cacheReadInputTokens!=null&&(t.cache_read_input_tokens=e.usage.cacheReadInputTokens),e.usage.cacheCreationInputTokens!=null&&(t.cache_creation_input_tokens=e.usage.cacheCreationInputTokens),{id:e.id,type:"message",role:"assistant",model:e.model,content:e.content.map(CTe),stop_reason:e.stopReason,stop_sequence:null,usage:t}}var s4e,a4e,KH=E(()=>{"use strict";l();dd();s4e="2023-06-01",a4e=new Set(["model","system","messages","tools","max_tokens","stream"])});function MTe(e,t){let n=e??{},o=String(n.model??""),r=n.stream===!0,i=typeof n.max_tokens=="number"?n.max_tokens:4096,s={};typeof n.temperature=="number"&&(s.temperature=n.temperature),typeof n.top_p=="number"&&(s.top_p=n.top_p),typeof n.frequency_penalty=="number"&&(s.frequency_penalty=n.frequency_penalty),typeof n.presence_penalty=="number"&&(s.presence_penalty=n.presence_penalty),typeof n.user=="string"&&(s.user=n.user),(n.logprobs===!0||n.logprobs===!1)&&(s.logprobs=n.logprobs),typeof n.top_logprobs=="number"&&(s.top_logprobs=n.top_logprobs);let a=Array.isArray(n.messages)?n.messages:[],c="",u=[];for(let f of a){let m=f.role,_=f.content;if(m==="system"){let h=typeof _=="string"?_:"";c?c+=`
|
|
973
|
+
|
|
974
|
+
`+h:c=h;continue}if(m==="user"){let h=d4e(_,f.tool_calls);u.push({role:"user",content:h});continue}if(m==="assistant"){let h=p4e(_,f.tool_calls);u.push({role:"assistant",content:h});continue}if(m==="tool"){let h=f4e(f);h.length>0&&u.push({role:"user",content:h});continue}}let p=(Array.isArray(n.tools)?n.tools:[]).map(f=>{let m=f.function;return{name:String(m?.name??f.name??""),description:String(m?.description??""),inputSchema:m?.parameters??{}}});return{protocol:"openai",model:o,system:c,messages:u,tools:p,stream:r,maxTokens:i,metadata:{},rawHeaders:{...t,"x-api-key":t["x-api-key"]??""},extras:s}}function d4e(e,t){let n=[];if(typeof e=="string"&&e)n.push({type:"text",text:e});else if(Array.isArray(e))for(let o of e)o.type==="text"?n.push({type:"text",text:String(o.text??"")}):o.type==="tool_use"&&n.push({type:"tool_use",id:String(o.id??""),name:String(o.name??""),input:o.input??{}});if(t)for(let o of t){let r=o.function;n.push({type:"tool_use",id:String(o.id??""),name:String(r?.name??""),input:r?.arguments?JSON.parse(r.arguments):{}})}return n}function p4e(e,t){let n=[];if(typeof e=="string"&&e)n.push({type:"text",text:e});else if(Array.isArray(e))for(let o of e)o.type==="text"?n.push({type:"text",text:String(o.text??"")}):o.type==="tool_use"&&n.push({type:"tool_use",id:String(o.id??""),name:String(o.name??""),input:o.input??{}});if(t)for(let o of t){let r=o.function;n.push({type:"tool_use",id:String(o.id??""),name:String(r?.name??""),input:r?.arguments?JSON.parse(r.arguments):{}})}return n}function f4e(e){let t=[],n=String(e.tool_call_id??""),o=e.content;if(typeof o=="string"&&o)t.push({type:"tool_result",toolUseId:n,content:o});else if(Array.isArray(o))for(let r of o)r.type==="text"&&t.push({type:"tool_result",toolUseId:n,content:String(r.text??"")});return t}function ZH(e,t){return t?_4e(e):m4e(e)}function m4e(e){let t=[],n="",o=[];for(let s of e.content)s.type==="text"?n+=s.text:s.type==="tool_use"&&o.push({id:s.id,type:"function",function:{name:s.name,arguments:JSON.stringify(s.input)}});let r={role:"assistant",content:n||null};o.length>0&&(r.tool_calls=o);let i={id:e.id.startsWith("chatcmpl-")?e.id:`chatcmpl-${e.id}`,object:"chat.completion",created:Math.floor(Date.now()/1e3),model:e.model,choices:[{index:0,message:r,finish_reason:LTe(e.stopReason),logprobs:null}],usage:{prompt_tokens:e.usage.inputTokens,completion_tokens:e.usage.outputTokens,total_tokens:e.usage.inputTokens+e.usage.outputTokens}};return new Response(JSON.stringify(i),{status:200,headers:{"content-type":"application/json"}})}function LTe(e){switch(e){case"end_turn":case"stop":case"stop_sequence":return"stop";case"max_tokens":case"length":return"length";case"tool_use":return"tool_calls";default:return"stop"}}function _4e(e){let t=new TextEncoder,n=0,o=new ReadableStream({start(r){let i=e.id.startsWith("chatcmpl-")?e.id:`chatcmpl-${e.id}`,s=Math.floor(Date.now()/1e3);function a(c,u){let d={id:i,object:"chat.completion.chunk",created:s,model:e.model,choices:[{index:0,delta:c,finish_reason:u}]};r.enqueue(t.encode(`data: ${JSON.stringify(d)}
|
|
975
|
+
|
|
976
|
+
`))}a({role:"assistant"},null);for(let c of e.content)if(c.type==="text"){let u=c.text,d=0;for(;d<u.length;){let p=u.slice(d,d+10);a({content:p},null),d+=10}}else c.type==="tool_use"&&(a({tool_calls:[{index:n,id:c.id,type:"function",function:{name:c.name,arguments:JSON.stringify(c.input)}}]},null),n++);a({},LTe(e.stopReason)),r.enqueue(t.encode(`data: [DONE]
|
|
977
|
+
|
|
978
|
+
`)),r.close()}});return new Response(o,{status:200,headers:{"content-type":"text/event-stream","cache-control":"no-cache",connection:"keep-alive"}})}function wTe(e,t){let n={"content-type":"application/json"},o=nu(e.rawHeaders);o&&(n.Authorization=`Bearer ${o.value}`);let r={model:e.model,messages:g4e(e.messages,e.system),stream:e.stream};return e.maxTokens&&(r.max_tokens=e.maxTokens),e.tools.length>0&&(r.tools=e.tools.map(i=>({type:"function",function:{name:i.name,description:i.description,parameters:i.inputSchema}}))),e.extras&&(e.extras.temperature!==void 0&&(r.temperature=e.extras.temperature),e.extras.top_p!==void 0&&(r.top_p=e.extras.top_p),e.extras.frequency_penalty!==void 0&&(r.frequency_penalty=e.extras.frequency_penalty),e.extras.presence_penalty!==void 0&&(r.presence_penalty=e.extras.presence_penalty),e.extras.user!==void 0&&(r.user=e.extras.user),e.extras.logprobs!==void 0&&(r.logprobs=e.extras.logprobs),e.extras.top_logprobs!==void 0&&(r.top_logprobs=e.extras.top_logprobs)),{url:`${t}/v1/chat/completions`,headers:n,body:r}}function g4e(e,t){let n=[];t&&n.push({role:"system",content:t});for(let o of e){let r=o.content,i=o.role,s=[],a=[];for(let u of r)u.type==="text"?s.push(u.text):u.type==="tool_use"?a.push({id:u.id,type:"function",function:{name:u.name,arguments:JSON.stringify(u.input)}}):u.type;let c={role:i};s.length>0&&(c.content=s.join("")),a.length>0&&(c.tool_calls=a),n.push(c)}return n}var JH=E(()=>{"use strict";l();dd()});function Tn(e,t){return`event: ${e}
|
|
979
|
+
data: ${t}
|
|
980
|
+
|
|
981
|
+
`}async function*XH(e){let t=new TextDecoder,n="";for(;;){let{done:o,value:r}=await e.read();r&&(n+=t.decode(r,{stream:!0}));let i;for(;(i=n.indexOf(`
|
|
982
|
+
|
|
983
|
+
`))!==-1;){let s=n.slice(0,i);if(n=n.slice(i+2),s.trim()==="")continue;let a="message",c=[];for(let u of s.split(`
|
|
984
|
+
`))u.startsWith("event:")?a=u.slice(6).trim():u.startsWith("data:")&&c.push(u.slice(5).trimStart());c.length>0&&(yield{event:a,data:c.join(`
|
|
985
|
+
`)})}if(o){if(n.trim()){let s="message",a=[];for(let c of n.split(`
|
|
986
|
+
`))c.startsWith("event:")?s=c.slice(6).trim():c.startsWith("data:")&&a.push(c.slice(5).trimStart());a.length>0&&(yield{event:s,data:a.join(`
|
|
987
|
+
`)})}break}}}function Nv(){let e="",t="",n="",o=!1,r={inputTokens:0,outputTokens:0},i=new Map,s=[],a=new Set;function c(h,T){let S=Tn(h,T),y;try{y=JSON.parse(T)}catch{return S}switch(h){case"message_start":u(y);break;case"content_block_start":d(y);break;case"content_block_delta":p(y);break;case"content_block_stop":f(y);break;case"message_delta":m(y);break;case"message_stop":o=!0;break}return S}function u(h){let T=h.message;if(!T)return;typeof T.id=="string"&&(e=T.id),typeof T.model=="string"&&(t=T.model);let S=T.usage;S&&(typeof S.input_tokens=="number"&&(r.inputTokens=S.input_tokens),typeof S.output_tokens=="number"&&(r.outputTokens=S.output_tokens),typeof S.cache_read_input_tokens=="number"&&(r.cacheReadInputTokens=S.cache_read_input_tokens),typeof S.cache_creation_input_tokens=="number"&&(r.cacheCreationInputTokens=S.cache_creation_input_tokens))}function d(h){let T=h.index;if(typeof T!="number")return;let S=h.content_block;if(!(!S||typeof S.type!="string"))switch(S.type){case"text":i.set(T,{type:"text",text:typeof S.text=="string"?S.text:""});break;case"thinking":i.set(T,{type:"thinking",thinking:typeof S.thinking=="string"?S.thinking:"",signature:""});break;case"tool_use":i.set(T,{type:"tool_use",id:typeof S.id=="string"?S.id:"",name:typeof S.name=="string"?S.name:"",partialJson:""});break}}function p(h){let T=h.index;if(typeof T!="number")return;let S=h.delta;if(!S||typeof S.type!="string")return;let y=i.get(T);if(y)switch(S.type){case"text_delta":y.type==="text"&&typeof S.text=="string"&&(y.text+=S.text);break;case"thinking_delta":y.type==="thinking"&&typeof S.thinking=="string"&&(y.thinking+=S.thinking);break;case"signature_delta":y.type==="thinking"&&typeof S.signature=="string"&&(y.signature+=S.signature);break;case"input_json_delta":y.type==="tool_use"&&typeof S.partial_json=="string"&&(y.partialJson+=S.partial_json);break}}function f(h){let T=h.index;if(typeof T!="number")return;let S=i.get(T);if(!(!S||a.has(T)))switch(a.add(T),S.type){case"text":s.push({type:"text",text:S.text});break;case"thinking":{let y={type:"thinking",thinking:S.thinking};S.signature&&(y.signature=S.signature),s.push(y);break}case"tool_use":{let y={};if(S.partialJson)try{y=JSON.parse(S.partialJson)}catch{y=S.partialJson}s.push({type:"tool_use",id:S.id,name:S.name,input:y});break}}}function m(h){let T=h.delta;T&&typeof T.stop_reason=="string"&&(n=T.stop_reason);let S=h.usage;S&&typeof S.output_tokens=="number"&&(r.outputTokens=S.output_tokens)}function _(){for(let[h,T]of i)if(!a.has(h))switch(a.add(h),T.type){case"text":s.push({type:"text",text:T.text});break;case"thinking":s.push({type:"thinking",thinking:T.thinking,...T.signature?{signature:T.signature}:{}});break;case"tool_use":{let S={};if(T.partialJson)try{S=JSON.parse(T.partialJson)}catch{S=T.partialJson}s.push({type:"tool_use",id:T.id,name:T.name,input:S});break}}return{id:e,model:t,content:s,stopReason:n,usage:{...r}}}return{processEvent:c,getResponse:_,isDone:()=>o}}function DTe(e,t,n,o){let r=[];return r.push(Tn("message_start",JSON.stringify({type:"message_start",message:{id:e,type:"message",role:"assistant",content:[],model:t,stop_reason:null,stop_sequence:null,usage:{input_tokens:o.inputTokens,output_tokens:1}}}))),r.push(Tn("content_block_start",JSON.stringify({type:"content_block_start",index:0,content_block:{type:"text",text:""}}))),r.push(Tn("content_block_delta",JSON.stringify({type:"content_block_delta",index:0,delta:{type:"text_delta",text:n}}))),r.push(Tn("content_block_stop",JSON.stringify({type:"content_block_stop",index:0}))),r.push(Tn("message_delta",JSON.stringify({type:"message_delta",delta:{stop_reason:"end_turn",stop_sequence:null},usage:{output_tokens:o.outputTokens}}))),r.push(Tn("message_stop",JSON.stringify({type:"message_stop"}))),r.join("")}function kTe(e="recall"){let t=Nv(),n=new Set,o=new Set,r=0,i=-1,s=0,a="",c=!1;function u(d,p){t.processEvent(d,p);let f;try{f=JSON.parse(p)}catch{return Tn(d,p)}switch(d){case"content_block_start":{let m=f.index;if(typeof m!="number")break;let _=f.content_block;if(_?.type==="tool_use"&&_.name===e)return n.add(m),r++,c=!0,i<0&&(i=m),"";if(_?.type==="tool_use"&&o.add(m),s++,r>0){let h={...f,index:m-r};return Tn(d,JSON.stringify(h))}break}case"content_block_delta":case"content_block_stop":{let m=f.index;if(typeof m=="number"&&n.has(m))return"";if(r>0&&typeof f.index=="number"){let _={...f,index:f.index-r};return Tn(d,JSON.stringify(_))}break}case"message_delta":case"message_stop":{if(c)return a+=Tn(d,p),"";break}}return Tn(d,p)}return{processEvent:u,getResponse:()=>t.getResponse(),isDone:()=>t.isDone(),hasRecall:()=>c,hasOtherTools:()=>o.size>0,recallBlockIndex:()=>i,clientBlockCount:()=>s,heldBackEvents:()=>a}}async function UTe(e){let t=Nv(),n=await e.text();for(let o of n.split(`
|
|
988
|
+
|
|
989
|
+
`)){if(!o.trim())continue;let r="message",i=[];for(let s of o.split(`
|
|
990
|
+
`))s.startsWith("event:")?r=s.slice(6).trim():s.startsWith("data:")&&i.push(s.slice(5).trimStart());i.length>0&&t.processEvent(r,i.join(`
|
|
991
|
+
`))}return t.getResponse()}var QH=E(()=>{"use strict";l()});function h4e(e,t=0){let n=0n;for(let r of e)n=n<<8n|BigInt(r);if(n===0n)return ez[0].repeat(Math.max(1,t));let o=[];for(;n>0n;)o.push(ez[Number(n%$Te)]),n/=$Te;for(o.reverse();o.length<t;)o.unshift(ez[0]);return o.join("")}function BTe(){let e=new Uint8Array(12);crypto.getRandomValues(e.subarray(0,8));let t=Math.floor(Date.now()/1e3);return new DataView(e.buffer,e.byteOffset,e.byteLength).setUint32(8,t>>>0,!1),h4e(e,E4e)}function T4e(e){if(typeof e=="string")return[e];if(Array.isArray(e)){let t=[];for(let n of e)n&&typeof n=="object"&&"type"in n&&n.type==="text"&&"text"in n&&typeof n.text=="string"&&t.push(n.text);return t}return[]}async function tz(e,t){let n="";for(let c of e)if(c.role==="user"){n=T4e(c.content).join("");break}let o=n+(t?.model??"")+(t?.authSuffix??""),r=new TextEncoder().encode(o),i=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(i),a="";for(let c=0;c<8;c++)a+=s[c].toString(16).padStart(2,"0");return a}var ez,$Te,E4e,GTe,jTe=E(()=>{"use strict";l();ez="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",$Te=62n;E4e=17;GTe=20});function VTe(e){for(let t=e.messages.length-1;t>=0;t--){let n=e.messages[t];if(n.role==="user")return n.content.filter(o=>o.type==="text").map(o=>o.text).join(`
|
|
992
|
+
`)}return""}function R4e(e){return Math.ceil(e.length/4)}function nz(e){let t=e.system.toLowerCase();for(let o of S4e)if(t.includes(o.toLowerCase()))return!0;let n=VTe(e);if(e.tools.length===0&&n){for(let o of A4e)if(n.includes(o))return!0}if(n.includes("<template>")){let o=0;for(let r of y4e)n.includes(r)&&o++;if(o>=4)return!0}return!1}function FTe(e){let t=VTe(e);return I4e.exec(t)?.[1]??void 0}function HTe(e){return nz(e)?!1:e.tools.length<=N4e&&e.messages.length<=O4e&&e.system.length<b4e}function zTe(e,t,n){return{id:`msg_lore_compact_${crypto.randomUUID().slice(0,8)}`,model:n,content:[{type:"text",text:t}],stopReason:"end_turn",usage:{inputTokens:0,outputTokens:R4e(t)}}}var S4e,A4e,y4e,I4e,b4e,N4e,O4e,qTe=E(()=>{"use strict";l();S4e=["anchored context summarization assistant"],A4e=["anchored summary from the conversation history above","Update the anchored summary below","<previous-summary>"],y4e=["## Goal","## Progress","## Key Decisions","## Next Steps","## Critical Context","## Relevant Files"];I4e=/<previous-summary>\n(.*?)\n<\/previous-summary>/s;b4e=500,N4e=2,O4e=2});function C4e(e,t,n){let o=(0,gT.createHash)("sha256");o.update(`${e}:${t}:`);for(let r of n)switch(r.type){case"text":o.update(`text:${r.text}`);break;case"thinking":o.update(`thinking:${r.thinking}`);break;case"tool_use":o.update(`tool_use:${r.id}:${r.name}:${JSON.stringify(r.input)}`);break;case"tool_result":o.update(`tool_result:${r.toolUseId}:${r.content}`);break}return o.digest("hex").slice(0,32)}function v4e(e,t){let n=(0,gT.createHash)("sha256");return n.update(`${e}:part:${t}`),n.digest("hex").slice(0,32)}function P4e(e,t,n,o){let r=Date.now(),i=v4e(n,o);switch(e.type){case"text":return{id:i,sessionID:t,messageID:n,type:"text",text:e.text,time:{start:r,end:r}};case"thinking":return{id:i,sessionID:t,messageID:n,type:"reasoning",text:e.thinking,...e.signature!=null?{signature:e.signature}:void 0};case"tool_use":return{id:i,sessionID:t,messageID:n,type:"tool",tool:e.name,callID:e.id,state:{status:"pending",input:e.input}};case"tool_result":return{id:i,sessionID:t,messageID:n,type:"tool",tool:"result",callID:e.toolUseId,state:{status:"completed",input:null,output:e.content,time:{start:r,end:r}}}}}function Ov(e,t){let n=[],o=Date.now();for(let r=0;r<e.length;r++){let i=e[r],s=C4e(i.role,r,i.content),a=i.content.map((c,u)=>P4e(c,t,s,u));if(i.role==="user"){let c={id:s,sessionID:t,role:"user",time:{created:o},agent:"gateway",model:{providerID:"anthropic",modelID:"unknown"}};n.push({info:c,parts:a})}else{let c={id:s,sessionID:t,role:"assistant",time:{created:o},parentID:"",modelID:"unknown",providerID:"anthropic",mode:"gateway",path:{cwd:"",root:""},cost:0,tokens:{input:0,output:0,reasoning:0,cache:{read:0,write:0}}};n.push({info:c,parts:a})}}return n}function YTe(e,t,n){let o=e.info;o.role==="assistant"&&(o.tokens.input=t.inputTokens,o.tokens.output=t.outputTokens,o.tokens.cache.read=t.cacheReadInputTokens??0,o.tokens.cache.write=t.cacheCreationInputTokens??0,o.modelID=n)}function rz(e){let t=new Map;for(let o of e)for(let r of o.parts)Tr(r)&&r.tool==="result"&&r.state.status==="completed"&&t.set(r.callID,{output:r.state.output,isError:!1});let n=Date.now();for(let o of e)for(let r of o.parts)if(Tr(r)&&r.tool!=="result"&&r.state.status==="pending"){let i=t.get(r.callID);i&&(r.state={status:"completed",input:r.state.input,output:i.output,time:{start:n,end:n}})}for(let o of e){if(o.info.role!=="user")continue;let r=o.parts.length;o.parts=o.parts.filter(i=>!(Tr(i)&&i.tool==="result")),o.parts.length===0&&r>0&&(o.parts=[{id:(0,gT.randomUUID)(),sessionID:"",messageID:o.info.id,type:"text",text:"[tool results provided]",time:{start:0,end:0}}])}}var gT,WTe=E(()=>{"use strict";l();gT=require("crypto");Wo()});function KTe(e){if(!rr())return;Cu({id:bN()}),e.authFingerprint&&Ir("auth_fingerprint",e.authFingerprint),Ir("model",e.model),Ir("upstream_url",e.upstreamUrl),Ir("port",String(e.port));let t=(0,oz.createHash)("sha256").update(e.projectPath).digest("hex").slice(0,16);Ir("project_hash",t),G_(e.sessionID)}function iz(e){if(rr()&&(Cu({id:bN()}),e.model&&Ir("model",e.model),e.projectPath)){let t=(0,oz.createHash)("sha256").update(e.projectPath).digest("hex").slice(0,16);Ir("project_hash",t)}}function ZTe(e){if(!rr())return;let t=e.cacheReadInputTokens??0,n=e.cacheCreationInputTokens??0,o=e.inputTokens+t+n,r=o>0?t/o:0;Yd("cache",{read_tokens:t,write_tokens:n,uncached_tokens:e.inputTokens,hit_rate:Math.round(r*1e3)/1e3,is_cold:t===0&&n>0})}function Wm(e,t,n){n&&e.setAttribute("gen_ai.response.model",n),e.setAttribute("gen_ai.usage.input_tokens",t.input_tokens??0),e.setAttribute("gen_ai.usage.output_tokens",t.output_tokens??0),t.cache_read_input_tokens!=null&&e.setAttribute("gen_ai.usage.input_tokens.cached",t.cache_read_input_tokens),t.cache_creation_input_tokens!=null&&e.setAttribute("gen_ai.usage.input_tokens.cache_write",t.cache_creation_input_tokens)}function L4e(e){for(let[t,n]of Object.entries(x4e))if(e.startsWith(t))return n;return M4e}function Km(e,t,n){if(!rr())return;let o=L4e(e),r=n==="batch"?.5:1,i=(t.input_tokens??0)/1e6*o.input*r,s=(t.output_tokens??0)/1e6*o.output*r,a=i+s;ku.distribution("lore.llm_cost_usd",a,{attributes:{model:e,call_type:n},unit:"dollar"})}var oz,x4e,M4e,Cv=E(()=>{"use strict";l();Xf();Wo();oz=require("node:crypto");x4e={"claude-opus-4":{input:15,output:75},"claude-sonnet-4":{input:3,output:15},"claude-sonnet-3-5":{input:3,output:15},"claude-haiku-3-5":{input:.8,output:4}},M4e={input:3,output:15}});function D4e(e){let t=e.headers.get("retry-after");if(!t)return null;let n=Number(t);if(!Number.isNaN(n))return n*1e3;let o=Date.parse(t);return Number.isNaN(o)?null:Math.max(0,o-Date.now())}function XTe(e,t){return e===0&&t!=null?Math.min(t,3e4):Math.min(1e3*2**e,8e3)}function QTe(e){return new Promise(t=>setTimeout(t,e))}function eSe(e,t,n){return{async prompt(o,r,i){let s=t(i?.sessionID);if(!s)return z.warn("no auth credentials available for worker call"),null;let a=i?.model??n,c=`${e.replace(/\/$/,"")}/v1/messages`,u=`gw-worker-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;JTe.add(u);try{let d=o?[{type:"text",text:o,cache_control:{type:"ephemeral",ttl:"1h"}}]:void 0,p=JSON.stringify({model:a.modelID,max_tokens:8192,system:d??o,messages:[{role:"user",content:r}]}),f={"Content-Type":"application/json","anthropic-version":"2023-06-01",...Cs(s)};return await Ot({op:"gen_ai.chat",name:`chat ${a.modelID}`,attributes:{"gen_ai.operation.name":"chat","gen_ai.request.model":a.modelID,"gen_ai.provider.name":"anthropic","lore.worker_id":i?.workerID??"unknown","lore.call_type":"direct"}},async m=>{for(let _=0;;_++){let h;try{h=await fetch(c,{method:"POST",headers:f,body:p})}catch(S){if(_<hT){let y=XTe(_,null);z.warn(`worker request network error (attempt ${_+1}/${hT+1}), retrying in ${y}ms`),await QTe(y);continue}throw S}if(h.ok){let S=await h.json();return S.usage&&(Wm(m,S.usage,S.model),Km(a.modelID,S.usage,"direct")),S.content?.find(v=>v.type==="text"&&typeof v.text=="string")?.text??null}if(!w4e.has(h.status)){let S=await h.text().catch(()=>"(no body)");return z.error(`worker upstream request failed: ${h.status} ${h.statusText} \u2014 ${S}`),m.setStatus({code:2,message:`HTTP ${h.status}`}),null}if(_<hT){let S=D4e(h),y=XTe(_,S);z.warn(`worker upstream ${h.status} (attempt ${_+1}/${hT+1}), retrying in ${y}ms`),await QTe(y);continue}let T=await h.text().catch(()=>"(no body)");return z.error(`worker upstream request failed after ${hT+1} attempts: ${h.status} ${h.statusText} \u2014 ${T}`),m.setStatus({code:2,message:"HTTP exhausted retries"}),null}})}catch(d){return z.error("worker prompt failed:",d),null}finally{JTe.delete(u)}}}}var JTe,w4e,hT,tSe=E(()=>{"use strict";l();Wo();Xf();dd();Cv();JTe=new Set,w4e=new Set([429,500,502,503,529]),hT=3});function j4e(){let e=Date.now().toString(36),t=(G4e++).toString(36),n=Math.random().toString(36).slice(2,8);return`lore-${e}-${t}-${n}`}function sz(e){return`${e.scheme}:${e.value}`}function nSe(e,t,n,o,r){let i=r?.flushIntervalMs??k4e,s=r?.maxQueueSize??U4e,a=r?.pollIntervalMs??$4e,c=r?.maxBatchAgeMs??B4e,u=[],d=new Map,p=null,f=!1,m=new Set,_=0,h=0,T=0,S=0,y=0,v=0;async function x($,G){let Q=G.map(J=>({custom_id:J.customId,params:J.params}));z.info(`batch flush: submitting ${G.length} requests`);try{let J=`${t.replace(/\/$/,"")}/v1/messages/batches`,D=await fetch(J,{method:"POST",headers:{"Content-Type":"application/json","anthropic-version":"2023-06-01",...Cs($)},body:JSON.stringify({requests:Q})});if(!D.ok){let Ae=await D.text().catch(()=>"(no body)");if(D.status===401||D.status===403){let Je=sz($);m.has(Je)||(m.add(Je),z.warn(`batch API disabled for this credential (${D.status}): ${Ae}. Future worker calls will use individual requests.`))}else z.error(`batch create failed: ${D.status} ${D.statusText} \u2014 ${Ae}`);await se(G);return}let ue=await D.json();h+=G.length;let de=new Map;for(let Ae of G)de.set(Ae.customId,Ae);let Ie=setInterval(()=>N(ue.id).catch(Ae=>z.error("batch poll error:",Ae)),a);d.set(ue.id,{batchId:ue.id,requests:de,submittedAt:Date.now(),pollTimer:Ie,auth:$}),z.info(`batch created: ${ue.id} with ${G.length} requests`)}catch(J){z.error("batch create error:",J),await se(G)}}async function P(){if(u.length===0)return;let $=u.splice(0),G=new Map;for(let Q of $){let J=sz(Q.auth),D=G.get(J);D||(D={auth:Q.auth,items:[]},G.set(J,D)),D.items.push(Q)}for(let{auth:Q,items:J}of G.values()){if(m.has(sz(Q))){await se(J);continue}await x(Q,J)}}async function N($){let G=d.get($);if(G){if(Date.now()-G.submittedAt>c){z.warn(`batch ${$} exceeded max age \u2014 falling back to synchronous`),clearInterval(G.pollTimer),d.delete($),await se([...G.requests.values()]);return}try{let Q=`${t.replace(/\/$/,"")}/v1/messages/batches/${$}`,J=await fetch(Q,{headers:{"anthropic-version":"2023-06-01",...Cs(G.auth)}});if(!J.ok){z.error(`batch poll failed for ${$}: ${J.status}`);return}let D=await J.json();if(D.processing_status!=="ended")return;z.info(`batch ${$} ended \u2014 retrieving results`),D.results_url?await F($,D.results_url):await F($,`${t.replace(/\/$/,"")}/v1/messages/batches/${$}/results`)}catch(Q){z.error(`batch poll error for ${$}:`,Q)}}}async function F($,G){let Q=d.get($);if(Q)try{let J=await fetch(G,{headers:{"anthropic-version":"2023-06-01",...Cs(Q.auth)}});if(!J.ok){z.error(`batch results fetch failed for ${$}: ${J.status}`);return}let ue=(await J.text()).split(`
|
|
993
|
+
`).filter(de=>de.trim());for(let de of ue)try{let Ie=JSON.parse(de),Ae=Q.requests.get(Ie.custom_id);if(!Ae)continue;switch(Ie.result.type){case"succeeded":{let Je=Ie.result.message,un=Je?.content?.find(C=>C.type==="text"&&typeof C.text=="string");rr()&&Je?.usage&&(Ot({op:"gen_ai.chat",name:`chat ${Ae.params.model}`,attributes:{"gen_ai.operation.name":"chat","gen_ai.request.model":Ae.params.model,"gen_ai.provider.name":"anthropic","lore.call_type":"batch","lore.batch_queue_ms":Date.now()-Ae.enqueuedAt}},C=>{Wm(C,Je.usage,Je.model)}),Km(Ae.params.model,Je.usage,"batch")),Ae.resolve(un?.text??null),y++;break}case"errored":Ae.resolve(null),v++,z.error(`batch item ${Ie.custom_id} errored: ${Ie.result.error?.type??"unknown"} \u2014 ${Ie.result.error?.message??JSON.stringify(Ie.result.error)}`);break;case"canceled":case"expired":Ae.resolve(null),v++,z.warn(`batch item ${Ie.custom_id} ${Ie.result.type}`);break}Q.requests.delete(Ie.custom_id)}catch{z.error(`failed to parse batch result line: ${de.slice(0,200)}`)}for(let[,de]of Q.requests)de.resolve(null),v++;clearInterval(Q.pollTimer),d.delete($),z.info(`batch ${$} fully resolved (${y} ok, ${v} failed total)`)}catch(J){z.error(`batch results retrieval error for ${$}:`,J)}}async function se($){S+=$.length,z.info(`batch fallback: processing ${$.length} items synchronously`);let G=5;for(let Q=0;Q<$.length;Q+=G){let J=$.slice(Q,Q+G);await Promise.all(J.map(async D=>{try{let ue=typeof D.params.system=="string"?D.params.system:D.params.system.map(Ae=>Ae.text).join(`
|
|
994
|
+
`),de=D.params.messages[0]?.content??"",Ie=await e.prompt(ue,de,{urgent:!0});D.resolve(Ie)}catch(ue){z.error(`batch fallback error for ${D.customId}:`,ue),D.resolve(null)}}))}}return p=setInterval(()=>{P().catch($=>z.error("batch flush timer error:",$))},i),{async prompt($,G,Q){if(Q?.urgent||f)return T++,e.prompt($,G,Q);let J=n(Q?.sessionID);if(!J)return T++,e.prompt($,G,Q);_++;let D=Q?.model??o,ue=$&&[{type:"text",text:$,cache_control:{type:"ephemeral",ttl:"1h"}}],de=j4e(),Ie=new Promise((Ae,Je)=>{u.push({customId:de,params:{model:D.modelID,max_tokens:8192,system:ue??$,messages:[{role:"user",content:G}]},resolve:Ae,reject:Je,enqueuedAt:Date.now(),auth:J})});return u.length>=s&&P().catch(Ae=>z.error("batch auto-flush error:",Ae)),Ie},async shutdown(){f=!0,p&&(clearInterval(p),p=null),u.length>0&&(z.info(`batch shutdown: processing ${u.length} remaining items synchronously`),await se(u.splice(0)));for(let[$,G]of d){clearInterval(G.pollTimer);for(let[,Q]of G.requests)Q.resolve(null);z.warn(`batch shutdown: abandoned inflight batch ${$}`)}d.clear()},stats(){return{queued:u.length,inflightBatches:d.size,inflightRequests:[...d.values()].reduce(($,G)=>$+G.requests.size,0),totalQueued:_,totalBatched:h,totalUrgent:T,totalFallback:S,totalResolved:y,totalFailed:v}}}}var k4e,U4e,$4e,B4e,G4e,rSe=E(()=>{"use strict";l();Wo();Xf();dd();Cv();k4e=3e4,U4e=50,$4e=6e4,B4e=36e5,G4e=0});function uz(e){for(let{prefix:t,inputCostPerToken:n}of H4e)if(e.startsWith(t))return n;return 100/1e6}async function z4e(){if(pd&&Date.now()-az<F4e)return pd;try{let e=new AbortController,t=setTimeout(()=>e.abort(),1e4),n=await fetch(V4e,{signal:e.signal});if(clearTimeout(t),!n.ok)return z.warn(`models.dev API failed: ${n.status} ${n.statusText}`),pd??new Map;let r=(await n.json()).anthropic?.models;if(!r)return z.warn("models.dev API: no anthropic provider found"),pd??new Map;let i=new Map;for(let[s,a]of Object.entries(r))a.cost?.input!=null&&i.set(s,a.cost.input);return pd=i,az=Date.now(),z.info(`models.dev: loaded costs for ${i.size} anthropic models`),i}catch(e){return z.warn("models.dev API error:",e),pd??new Map}}function q4e(){pd=null,az=0}async function Y4e(e){let t=await z4e(),n=new Map;for(let o of e){let r=t.get(o);r!=null?n.set(o,r/1e6):n.set(o,uz(o))}return n}async function K4e(e,t){if(Zm&&Date.now()-cz<W4e)return Zm;try{let n=[],o;do{let a=new URL(`${e}/v1/models`);a.searchParams.set("limit","1000"),o&&a.searchParams.set("after_id",o);let c=await fetch(a.toString(),{headers:{"content-type":"application/json","anthropic-version":"2023-06-01",...Cs(t)}});if(!c.ok){let d=await c.text().catch(()=>"(no body)");return z.warn(`model discovery failed: ${c.status} ${c.statusText} \u2014 ${d}`),Zm??[]}let u=await c.json();for(let d of u.data)n.push(d);o=u.has_more?u.last_id:void 0}while(o);let r=n.map(a=>a.id),i=await Y4e(r),s=n.map(a=>({id:a.id,providerID:"anthropic",cost:{input:i.get(a.id)??uz(a.id)},status:"active",capabilities:{input:{text:!0},reasoning:a.capabilities?.thinking?.supported??!1}}));return Zm=s,cz=Date.now(),z.info(`model discovery: found ${s.length} models (${s.map(a=>a.id).join(", ")})`),s}catch(n){return z.warn("model discovery error:",n),Zm??[]}}function Z4e(){Zm=null,cz=0}async function oSe(e,t,n,o,r,i){if(vv||Ke().workerModel)return;let a=await K4e(t,n);if(a.length===0)return;let c=a.find(N=>N.id===e),u={id:e,providerID:"anthropic",cost:{input:c?.cost.input??uz(e)}},d=Ia.selectWorkerCandidates(u,a);if(d.length===0||d.length===1&&d[0].id===e)return;let p=Ia.computeModelFingerprint("anthropic",e,a.filter(N=>N.providerID==="anthropic").map(N=>N.id)),f=Ia.getValidatedWorkerModel("anthropic");if(!Ia.isValidationStale(f,p))return;let _=Ai.loadForSession(r,i,!0).filter(N=>N.generation===0);if(_.length===0)return;let h=_[_.length-1],T=h.source_ids;if(T.length===0)return;let S=jr.bySession(r,i),y=new Set(T),v=S.filter(N=>y.has(N.id));if(v.length===0)return;let x=v.map(N=>N.content).join(`
|
|
995
|
+
`),P=new Date(v[0].created_at).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});vv=!0;try{let N=await Ia.runValidation({llm:o,providerID:"anthropic",sessionModelID:e,candidates:d,referenceObservations:h.observations,sourceMessagesText:x,date:P});N&&z.info(`worker model validated: ${N.modelID} (judge=${N.judgeScore}) \u2014 saving 50%+ on worker calls`)}catch(N){z.error("worker model validation error:",N)}finally{vv=!1}}function ET(){let e=Ke();return Ia.resolveWorkerModel("anthropic",e.workerModel,e.model)}function iSe(){Z4e(),q4e(),vv=!1}var V4e,pd,az,F4e,H4e,Zm,cz,W4e,vv,lz=E(()=>{"use strict";l();Wo();dd();V4e="https://models.dev/api.json",pd=null,az=0,F4e=3600*1e3,H4e=[{prefix:"claude-opus-4",inputCostPerToken:15/1e6},{prefix:"claude-sonnet-4",inputCostPerToken:3/1e6},{prefix:"claude-haiku-4",inputCostPerToken:1/1e6},{prefix:"claude-haiku-3-5",inputCostPerToken:.8/1e6},{prefix:"claude-sonnet-3-5",inputCostPerToken:3/1e6},{prefix:"claude-3-haiku",inputCostPerToken:.25/1e6},{prefix:"claude-3-sonnet",inputCostPerToken:3/1e6},{prefix:"claude-3-opus",inputCostPerToken:15/1e6}];Zm=null,cz=0,W4e=3600*1e3;vv=!1});function aSe(e,t,n){let o=new Set,r=setInterval(()=>{let i=Date.now(),s=e.idleTimeoutSeconds*1e3;for(let[a,c]of t)o.has(a)||i-c.lastRequestTime<s||(o.add(a),n(a,c).catch(u=>z.error(`idle work failed for session ${a}:`,u)).finally(()=>o.delete(a)))},J4e);return()=>clearInterval(r)}function cSe(e,t,n,o,r){return async(i,s)=>{let a=Ke();try{let u=o();u&&await oSe(r,n,u,t,e,i)}catch(u){z.error("idle worker model validation error:",u)}let c=ET();try{jr.undistilledCount(e,i)>0&&await Ai.run({llm:t,projectPath:e,sessionID:i,model:c,force:!0})}catch(u){z.error("idle distillation error:",u)}if(a.knowledge.enabled&&a.curator.onIdle)try{s.turnsSinceCuration>=a.curator.afterTurns&&(await ud.run({llm:t,projectPath:e,sessionID:i,model:c}),s.turnsSinceCuration=0)}catch(u){z.error("idle curation error:",u)}if(a.knowledge.enabled)try{let u=po.forProject(e,!1);if(u.length>a.curator.maxEntries){z.info(`entry count ${u.length} exceeds maxEntries ${a.curator.maxEntries} \u2014 running consolidation`);let{updated:d,deleted:p}=await ud.consolidate({llm:t,projectPath:e,sessionID:i,model:c});(d>0||p>0)&&z.info(`consolidation: ${d} updated, ${p} deleted`)}}catch(u){z.error("idle consolidation error:",u)}try{let{ttlDeleted:u,capDeleted:d}=jr.prune({projectPath:e,retentionDays:a.pruning.retention,maxStorageMB:a.pruning.maxStorage});(u>0||d>0)&&z.info(`pruned temporal messages: ${u} by TTL, ${d} by size cap`)}catch(u){z.error("idle pruning error:",u)}if(a.knowledge.enabled)try{if(po.forProject(e,!1).length>0)if(a.agentsFile.enabled){let d=(0,sSe.join)(e,a.agentsFile.path);zH({projectPath:e,filePath:d})}else Sv(e)}catch(u){z.error("idle knowledge export error:",u)}if(a.knowledge.enabled)try{let u=po.cleanDeadRefs();u>0&&z.info(`cleaned ${u} dead knowledge cross-references`)}catch(u){z.error("idle dead-ref cleanup error:",u)}try{Hm.refresh(e)}catch(u){z.error("idle lat-reader refresh error:",u)}}}var sSe,J4e,uSe=E(()=>{"use strict";l();sSe=require("node:path");Wo();lz();J4e=3e4});function X4e(e){return Bun.zstdCompressSync(Buffer.from(e))}function Q4e(e){return Buffer.from(Bun.zstdDecompressSync(e)).toString()}function e2e(e,t){let n=Math.min(e.length,t.length);for(let o=0;o<n;o++)if(e[o]!==t[o])return o;return n}function t2e(e,t){if(t>=e.length)return"<end>";if(t===0)return"<start>";let n=[],o=!1,r=!1,i="",s=!1;for(let c=0;c<e.length&&c<t;c++){let u=e[c];if(o){if(r){r=!1,s&&(i+=u);continue}if(u==="\\"){r=!0,s&&(i+=u);continue}if(u==='"'){o=!1,s=!1;continue}s&&(i+=u);continue}switch(u){case'"':o=!0,s=n2e(e,c),s&&(i="");break;case"{":n.push({kind:"object",key:""});break;case"[":n.push({kind:"array",index:0});break;case"}":case"]":n.pop();break;case":":if(i&&n.length>0){let d=n[n.length-1];d.kind==="object"&&(d.key=i),i=""}break;case",":if(n.length>0){let d=n[n.length-1];d.kind==="array"&&d.index++}break}}let a=[];for(let c of n)c.kind==="object"&&c.key?a.push(a.length===0?c.key:`.${c.key}`):c.kind==="array"&&a.push(`[${c.index}]`);return a.length===0?"<root>":a.join("")}function n2e(e,t){for(let n=t-1;n>=0;n--){let o=e[n];if(!(o===" "||o===`
|
|
996
|
+
`||o==="\r"||o===" "))return o==="{"||o===","}return!1}function r2e(e,t,n){if(e==="<end>")return n>t?"new content appended":"content truncated";if(e==="<start>")return"request structure changed from start";if(e==="<root>")return"top-level structure changed";if(e==="system"||e.startsWith("system"))return"system prompt changed";if(e==="model")return"model changed";if(e==="max_tokens")return"max_tokens changed";if(e==="tools"||e.startsWith("tools"))return"tool definitions changed";let o=e.match(/^messages\[(\d+)\]/);if(o){let r=parseInt(o[1],10),i=e.slice(o[0].length);if(!i)return`message ${r} structure changed`;if(i===".role")return`message ${r} role changed`;if(i.startsWith(".content"))return`message ${r} content changed`}return`changed at ${e}`}function lSe(e,t,n,o){e.turnCount++;let r=n.cacheReadInputTokens??0,i=n.cacheCreationInputTokens??0,s=n.inputTokens??0,a=r+i+s,c=a>0?r/a:0;r===0&&i>0&&e.turnCount>1&&e.bustCount++;let u=0,d=0,p="<first-turn>",f="first turn \u2014 no previous request to compare";if(e.lastRequestBody!==null){let _=Q4e(e.lastRequestBody),h=_.length,T=t.length;u=e2e(_,t);let S=Math.min(h,T);d=S>0?u/S:0,u<S?(p=t2e(t,u),f=r2e(p,h,T)):h!==T?(p="<end>",f=T>h?"new content appended (likely new messages)":"content truncated (context window compressed)"):(p="<identical>",f="request bodies are identical")}e.lastRequestBody=X4e(t),e.lastRequestBodyLength=t.length,e.lastCacheRead=r,e.lastCacheCreation=i;let m={turn:e.turnCount,cacheRead:r,cacheCreation:i,inputTokens:s,cacheHitRate:c,prefixMatchBytes:u,prefixMatchPercent:d,divergencePoint:p,divergenceReason:f};if(e.turnCount>1){let _=r===0&&i>0?" [BUST]":"",h=o?` session=${o.slice(0,16)}`:"";z.info(`cache-analytics:${h} turn=${m.turn} hit=${(m.cacheHitRate*100).toFixed(0)}% read=${r} create=${i} input=${s} prefixMatch=${(m.prefixMatchPercent*100).toFixed(1)}% (${u}/${e.lastRequestBodyLength}B) divergence="${p}" reason="${f}"`+_)}return m}var dSe=E(()=>{"use strict";l();Wo()});function i2e(e="all"){return dz[e]??dz.all}function s2e(e){return o2e[e]??"all"}function pz(e,t="all"){return`\u{1F4DA} Searching ${i2e(t)} for "${e}"\u2026`}function pSe(e){let t=a2e.exec(e);return t?{query:t[2],scope:s2e(t[1])}:null}function TT(e,t="all"){return`${t}:${e}`}function fSe(e,t){let n=!1;for(let o=0;o<e.messages.length;o++){let r=e.messages[o];if(r.role!=="assistant")continue;let i=-1,s=null;for(let f=0;f<r.content.length;f++){let m=r.content[f];if(m.type==="text"&&(s=pSe(m.text),s)){i=f;break}}if(i<0||!s)continue;let a=TT(s.query,s.scope),c=t.get(a);if(!c)continue;let u=r.content.slice(i+1),d=u.length>0&&u.some(f=>f.type!=="tool_use");r.content[i]={type:"tool_use",id:c.toolUseId,name:ba,input:c.input},d&&(r.content.length=i+1);let p={role:"user",content:[{type:"tool_result",toolUseId:c.toolUseId,content:c.result}]};if(d){let f={role:"assistant",content:u};e.messages.splice(o+1,0,p,f),o+=2}else{let f=e.messages[o+1];f?.role==="user"?f.content.unshift({type:"tool_result",toolUseId:c.toolUseId,content:c.result}):(e.messages.splice(o+1,0,p),o+=1)}n=!0}return n}function mSe(e,t){if(t.size===0)return;let n=new Set;for(let o of e.messages)if(o.role==="assistant")for(let r of o.content){if(r.type!=="text")continue;let i=pSe(r.text);i&&n.add(TT(i.query,i.scope))}for(let o of t.keys())n.has(o)||t.delete(o)}function xv(e){return e.content.find(t=>t.type==="tool_use"&&t.name===ba)}function _Se(e){return xv(e)!==void 0}function gSe(e){return e.content.some(t=>t.type==="tool_use"&&t.name!==ba)}function hSe(e){return e.some(t=>t.name===ba)}function c2e(e){let t=e.input;return{query:typeof t.query=="string"?t.query:"",scope:t.scope??"all"}}async function fz(e,t,n){let{query:o,scope:r}=c2e(e),i=Ke();try{return{result:await FH({query:o,scope:r,projectPath:t,sessionID:n,knowledgeEnabled:i.knowledge?.enabled??!0,searchConfig:i.search}),input:{query:o,scope:r}}}catch(s){return z.error("gateway recall execution failed:",s),{result:"Recall search failed. The memory system encountered an error.",input:{query:o,scope:r}}}}function mz(e,t,n,o){let r={role:"assistant",content:[o]},i={role:"user",content:[{type:"tool_result",toolUseId:o.id,content:n||"[No results found.]"}]},s=e.tools.filter(a=>a.name!==ba);return{...e,messages:[...e.messages,r,i],tools:s}}function Jm(e){return{...e,content:e.content.map(t=>{if(t.type==="tool_use"&&t.name===ba){let n=t.input,o=typeof n.query=="string"?n.query:"",r=n.scope??"all";return{type:"text",text:pz(o,r)}}return t})}}var Pv,ba,dz,o2e,a2e,ESe=E(()=>{"use strict";l();Wo();Pv={name:"recall",description:HH,inputSchema:{type:"object",properties:{query:{type:"string",description:hv.query},scope:{type:"string",enum:["all","session","project","knowledge"],description:hv.scope}},required:["query"]}},ba="recall",dz={all:"all archives",session:"session history",project:"project archives",knowledge:"knowledge base"},o2e=Object.fromEntries(Object.entries(dz).map(([e,t])=>[t,e]));a2e=/📚 Searching (.+?) for "(.+?)"…/});async function Lv(){_z=!1,hz=null,IT.clear(),yT.clear(),gz.clear(),ru&&"shutdown"in ru&&await ru.shutdown(),ru=null,SSe=void 0,RT&&(RT(),RT=null),Ez=null,iSe()}function u2e(e,t){if(e===t)return 0;if(!e||!t)return 1;let n=Math.min(e.length,t.length),o=Math.max(e.length,t.length),r=0;for(let a=0;a<n&&e[a]===t[a];a++)r++;let i=0;for(let a=0;a<n-r&&e[e.length-1-a]===t[t.length-1-a];a++)i++;return 1-(r+i)/o}function p2e(e){for(let[t,n]of Object.entries(l2e))if(e.startsWith(t))return n;return d2e}async function ASe(e,t){if(!_z){if(await mH(e),Ue(e),_z=!0,hz=e,t&&!RT){let n=Tz(t),o=Ez??Ke().model?.modelID??"claude-sonnet-4-20250514",r=cSe(e,n,t.upstreamAnthropic,()=>bv(),o);RT=aSe(t,IT,r)}z.info(`gateway pipeline initialized: ${e}`)}}function Tz(e){if(!ru){let n=Ke().model??{providerID:"anthropic",modelID:"claude-sonnet-4-20250514"},o=eSe(e.upstreamAnthropic,bv,n),r=process.env.LORE_BATCH_DISABLED==="1";rr()&&Ir("batch_enabled",String(!r)),r?ru=o:ru=nSe(o,e.upstreamAnthropic,bv,n)}return ru}function ySe(e,t){let n=IT.get(e);return n||(n={sessionID:e,projectPath:t,fingerprint:"",lastRequestTime:Date.now(),messageCount:0,turnsSinceCuration:0,recallStore:new Map,cacheAnalytics:{lastRequestBody:null,lastRequestBodyLength:0,lastCacheRead:0,lastCacheCreation:0,turnCount:0,bustCount:0}},IT.set(e,n)),n.lastRequestTime=Date.now(),n.recallStore||(n.recallStore=new Map),n}async function RSe(e,t){let n=e.messages.map(c=>({role:c.role,content:c.content})),o=nu(e.rawHeaders),r=await tz(n,{model:e.model,authSuffix:o?Iv(o):""}),i=e.messages.length,s=null;for(let[c,u]of IT){if(u.fingerprint!==r)continue;let d=i-u.messageCount;if(d<-GTe)continue;let p=Math.abs(d);(!s||p<s.countDiff)&&(s={sid:c,countDiff:p})}return s?{sessionID:s.sid,isNew:!1}:{sessionID:BTe(),isNew:!0}}async function Mv(e,t,n,o){let r,i,s,a=yv(e.model),c=a?.protocol??e.protocol,u=a?.url??(c==="openai"?t.upstreamOpenAI:t.upstreamAnthropic);if(c==="openai"){let m=wTe(e,u);r=m.url,i=m.headers,s=m.body}else{let m=PTe(e,o);r=`${u}${m.url}`,i=m.headers,s=m.body}let d=JSON.stringify(s),p=n??SSe;return p?{response:await p(s,e.model,e.stream,()=>fetch(r,{method:"POST",headers:i,body:d})),serializedBody:d}:{response:await fetch(r,{method:"POST",headers:i,body:d}),serializedBody:d}}function f2e(e,t,n){let o=n?kTe(ba):null,r=o??Nv(),i=new TextEncoder,s=new ReadableStream({async start(a){try{let c=e.body.getReader();for await(let{event:d,data:p}of XH(c)){let f=r.processEvent(d,p);f&&a.enqueue(i.encode(f))}if(o?.hasRecall()){let d=o.getResponse(),p=xv(d);if(p&&n){let{result:f,input:m}=await fz(p,n.sessionState.projectPath,n.sessionState.sessionID),_=m.scope??"all",h=TT(m.query,_),T=d.content.indexOf(p);n.sessionState.recallStore.set(h,{toolUseId:p.id,input:m,position:T,result:f});let S=pz(m.query,_),y=o.clientBlockCount(),v=[Tn("content_block_start",JSON.stringify({type:"content_block_start",index:y,content_block:{type:"text",text:""}})),Tn("content_block_delta",JSON.stringify({type:"content_block_delta",index:y,delta:{type:"text_delta",text:S}})),Tn("content_block_stop",JSON.stringify({type:"content_block_stop",index:y}))].join("");if(a.enqueue(i.encode(v)),o.hasOtherTools()){z.info(`recall (stream, mixed): stored result for session ${n.sessionState.sessionID.slice(0,16)}`);let G=o.heldBackEvents();G&&a.enqueue(i.encode(G)),a.close();let Q=Jm(d);t(Q);return}z.info(`recall (stream, only): executing follow-up for session ${n.sessionState.sessionID.slice(0,16)}`);let x=mz(n.modifiedReq,d,f,p),P;try{({response:P}=await Mv(x,n.config,void 0,n.cacheOptions))}catch(G){z.error(`recall follow-up fetch error for session ${n.sessionState.sessionID.slice(0,16)}:`,G);let Q=o.heldBackEvents();Q&&a.enqueue(i.encode(Q)),a.close();let J=Jm(d);t(J);return}if(z.info(`recall follow-up response: status=${P.status} hasBody=${!!P.body} session=${n.sessionState.sessionID.slice(0,16)}`),!P.ok){let G=await P.text();z.error(`recall follow-up upstream error: ${P.status} ${G.slice(0,500)}`);let Q=o.heldBackEvents();Q&&a.enqueue(i.encode(Q)),a.close();let J=Jm(d);t(J);return}let N=o.clientBlockCount()+1,F=P.body.getReader(),se=0;for await(let{event:G,data:Q}of XH(F)){if(se++,G==="message_start")continue;if(G==="content_block_start"||G==="content_block_delta"||G==="content_block_stop")try{let D=JSON.parse(Q);if(typeof D.index=="number"){D.index=D.index+N;let ue=Tn(G,JSON.stringify(D));a.enqueue(i.encode(ue));continue}}catch{}let J=Tn(G,Q);a.enqueue(i.encode(J))}z.info(`recall follow-up stream complete: ${se} events piped, session=${n.sessionState.sessionID.slice(0,16)}`),a.close();let $=Jm(d);t($);return}}a.close();let u=r.getResponse();t(u)}catch(c){z.error("streaming pipeline error:",c),a.error(c)}}});return new Response(s,{status:200,headers:{"content-type":"text/event-stream","cache-control":"no-cache",connection:"keep-alive"}})}async function TSe(e){let t=await e.json(),n=[],o=t.content;if(o)for(let i of o)switch(i.type){case"text":n.push({type:"text",text:String(i.text??"")});break;case"thinking":n.push({type:"thinking",thinking:String(i.thinking??""),...i.signature?{signature:String(i.signature)}:void 0});break;case"tool_use":n.push({type:"tool_use",id:String(i.id??""),name:String(i.name??""),input:i.input});break}let r=t.usage;return{id:String(t.id??""),model:String(t.model??""),content:n,stopReason:String(t.stop_reason??"end_turn"),usage:{inputTokens:r?.input_tokens??0,outputTokens:r?.output_tokens??0,cacheReadInputTokens:r?.cache_read_input_tokens,cacheCreationInputTokens:r?.cache_creation_input_tokens}}}function AT(e){let t=xTe(e);return new Response(JSON.stringify(t),{status:200,headers:{"content-type":"application/json"}})}function m2e(e){let n=e.content.filter(r=>r.type==="text").map(r=>r.text).join(""),o=DTe(e.id,e.model,n,{inputTokens:e.usage.inputTokens,outputTokens:e.usage.outputTokens});return new Response(o,{status:200,headers:{"content-type":"text/event-stream","cache-control":"no-cache",connection:"keep-alive"}})}function ST(e,t,n,o,r,i){let{sessionID:s,projectPath:a}=n;try{let c=(t.usage.inputTokens??0)+(t.usage.cacheReadInputTokens??0)+(t.usage.cacheCreationInputTokens??0);wH(c,s,DH(s)),ZTe(t.usage);let u={input_tokens:t.usage.inputTokens,output_tokens:t.usage.outputTokens,cache_read_input_tokens:t.usage.cacheReadInputTokens,cache_creation_input_tokens:t.usage.cacheCreationInputTokens};Km(t.model,u,"conversation"),i&&(Wm(i,u,t.model),i.end()),r&&lSe(n.cacheAnalytics,r,t.usage,s);let d=Ov(e.messages,s);rz(d);for(let f=d.length-1;f>=0;f--)if(d[f].info.role==="user"){jr.store({projectPath:a,info:d[f].info,parts:d[f].parts});break}let p=Ov([{role:"assistant",content:t.content}],s)[0];YTe(p,t.usage,t.model),jr.store({projectPath:a,info:p.info,parts:p.parts}),n.turnsSinceCuration=(n.turnsSinceCuration??0)+1,_2e(n,o)}catch(c){z.error("post-response processing failed:",c)}}function _2e(e,t){let{sessionID:n,projectPath:o}=e,r=Tz(t),i=Ke(),s=ET();mT()&&Ai.run({llm:r,projectPath:o,sessionID:n,model:s,force:!0,urgent:!0}).catch(c=>z.error("background distillation failed:",c));let a=jr.undistilledCount(o,n);a>=i.distillation.maxSegment&&(z.info(`incremental distillation: ${a} undistilled messages in ${n.slice(0,16)}`),Ai.run({llm:r,projectPath:o,sessionID:n,model:s}).catch(c=>z.error("background distillation failed:",c))),i.knowledge.enabled&&i.curator.onIdle&&e.turnsSinceCuration>=i.curator.afterTurns&&ud.run({llm:r,projectPath:o,sessionID:n,model:s}).then(()=>{e.turnsSinceCuration=0,yT.delete(n)}).catch(c=>z.error("background curation failed:",c))}async function g2e(e,t){let n=hz??YH(e.system,e.rawHeaders);await ASe(n,t);let{sessionID:o}=await RSe(e,n),r=ySe(o,n),i=Tz(t);iz({model:e.model,projectPath:n}),z.info(`compaction intercepted for session ${o.slice(0,16)}`);let s=ET();await Ai.run({llm:i,projectPath:n,sessionID:o,model:s,force:!0,urgent:!0});let a=Ai.loadForSession(n,o),c=FTe(e),u=Ke(),d=u.knowledge.enabled?po.forProject(n,u.crossProject):[],p=d.length?aO(d.map(y=>({category:y.category,title:y.title,content:y.content}))):"",f=zB({hasDistillations:a.length>0,knowledge:p,previousSummary:c}),m="";a.length>0&&(m=`## Lore Pre-computed Session Summaries
|
|
997
|
+
|
|
998
|
+
The following ${a.length} summary chunk(s) were pre-computed from the conversation history. Use these as the authoritative source.
|
|
999
|
+
|
|
1000
|
+
`+a.map((y,v)=>`### Chunk ${v+1}${y.generation>0?" (consolidated)":""}
|
|
1001
|
+
${y.observations}`).join(`
|
|
1002
|
+
|
|
1003
|
+
`));let _=m?`${m}
|
|
1004
|
+
|
|
1005
|
+
---
|
|
1006
|
+
|
|
1007
|
+
${f}`:f,T=await i.prompt(f,_,{model:u.model,workerID:"lore-compact",urgent:!0})??"(Compaction failed \u2014 no summary generated.)",S=zTe(o,T,e.model);return e.stream?m2e(S):AT(S)}async function h2e(e,t){iz({model:e.model});let{response:n}=await Mv(e,t);if(e.stream&&n.body)return new Response(n.body,{status:n.status,headers:{"content-type":n.headers.get("content-type")??"text/event-stream"}});let o=await n.text();return new Response(o,{status:n.status,headers:{"content-type":"application/json"}})}async function E2e(e,t){let n=YH(e.system,e.rawHeaders);await ASe(n,t);let o=nu(e.rawHeaders);o&&WH(o);let{sessionID:r,isNew:i}=await RSe(e,n),s=ySe(r,n);if(o&&NTe(r,o),i){let P=await tz(e.messages.map(N=>({role:N.role,content:N.content})),{model:e.model,authSuffix:o?Iv(o):""});s.fingerprint=P}s.messageCount=e.messages.length,Ez=e.model,KTe({authFingerprint:o?Iv(o):null,sessionID:r,model:e.model,upstreamUrl:yv(e.model)?.url??t.upstreamAnthropic,port:t.port,projectPath:n}),s.recallStore.size>0&&(fSe(e,s.recallStore)&&z.info(`expanded recall markers for session ${r.slice(0,16)}`),mSe(e,s.recallStore)),z.info(`turn: session=${r.slice(0,16)} messages=${e.messages.length} model=${e.model} stream=${e.stream} new=${i}`);let a=p2e(e.model);xH({context:a.context,output:a.output});let c=Ke();c.budget.maxLayer0Tokens!==void 0?mv(c.budget.maxLayer0Tokens):a.cacheReadCost&&c.budget.targetCacheReadCostPerTurn>0&&mv(MH(c.budget.targetCacheReadCostPerTurn,a.cacheReadCost));let u=c.idleResumeMinutes*6e4,d=PH(r,u);d.triggered&&(yT.delete(r),z.info(`session idle ${Math.round(d.idleMs/6e4)}min \u2014 refreshing caches`));let p;if(c.knowledge.enabled)try{let P=yT.get(r);if(!P){let N=c.budget.ltm,F=LH(N),se=po.forSession(n,r,F);if(se.length){let $=aO(se.map(G=>({category:G.category,title:G.title,content:G.content})),F);if($){let G=Math.ceil($.length/3);P={formatted:$,tokenCount:G},yT.set(r,P)}}}if(P){let N=gz.get(r);N&&u2e(N.formatted,P.formatted)<.05?(p=N.formatted,cd(N.tokenCount,r)):(gz.set(r,P),p=P.formatted,cd(P.tokenCount,r))}else cd(0,r)}catch(P){z.error("LTM injection failed:",P),cd(0,r)}finally{fv(r)}else cd(0,r),fv(r);let f=Ov(e.messages,r);rz(f);let m=kH({messages:f,projectPath:n,sessionID:r});for(;m.messages.length>0&&m.messages.at(-1).info.role!=="user"&&!m.messages.at(-1).parts.some(F=>F.type==="tool");)m.messages.pop();let _=T2e(m.messages);S2e(_);let h={...e,messages:_};if(h.tools.length>0&&!hSe(h.tools)){let P=c.knowledge.enabled?{...Pv,description:Pv.description+`
|
|
1008
|
+
|
|
1009
|
+
When making git commits, always check if .lore.md has unstaged changes and include it in the commit. This file contains shared project knowledge managed by lore and must be version-controlled.`}:Pv;h.tools=[...h.tools,P]}let T={systemTTL:"1h",ltmSystem:p,cacheTools:!0,cacheConversation:!0},S=Ga({op:"gen_ai.chat",name:`chat ${e.model}`,attributes:{"gen_ai.operation.name":"chat","gen_ai.request.model":e.model,"gen_ai.provider.name":yv(e.model)?.protocol??"anthropic","gen_ai.response.streaming":e.stream}}),{response:y,serializedBody:v}=await Mv(h,t,void 0,T);if(!y.ok){let P=await y.text();return z.error(`upstream error: ${y.status} ${P.slice(0,500)}`),S.setStatus({code:2,message:`HTTP ${y.status}`}),S.end(),new Response(P,{status:y.status,headers:{"content-type":"application/json"}})}if(e.stream&&y.body){let P=h.tools.some(N=>N.name===ba);return f2e(y,N=>ST(e,N,s,t,v,S),P?{modifiedReq:h,config:t,sessionState:s,cacheOptions:T}:void 0)}let x=await TSe(y);if(_Se(x)){let P=xv(x),{result:N,input:F}=await fz(P,s.projectPath,s.sessionID),se=TT(F.query,F.scope??"all"),$=x.content.indexOf(P);s.recallStore.set(se,{toolUseId:P.id,input:F,position:$,result:N});let G=Jm(x);if(gSe(x))return z.info(`recall (non-stream, mixed): stored result for session ${s.sessionID.slice(0,16)}`),ST(e,G,s,t,v,S),AT(G);z.info(`recall (non-stream, only): executing follow-up for session ${s.sessionID.slice(0,16)}`);let Q=mz(h,x,N,P),J;if({response:J}=await Mv(Q,t,void 0,T),!J.ok){let ue=await J.text();return z.error(`recall follow-up upstream error: ${J.status} ${ue.slice(0,500)}`),ST(e,G,s,t,v,S),AT(G)}let D=await TSe(J);return D.usage.inputTokens+=x.usage.inputTokens,D.usage.outputTokens+=x.usage.outputTokens,x.usage.cacheReadInputTokens&&(D.usage.cacheReadInputTokens=(D.usage.cacheReadInputTokens??0)+x.usage.cacheReadInputTokens),x.usage.cacheCreationInputTokens&&(D.usage.cacheCreationInputTokens=(D.usage.cacheCreationInputTokens??0)+x.usage.cacheCreationInputTokens),ST(e,D,s,t,v,S),AT(D)}return ST(e,x,s,t,v,S),AT(x)}function T2e(e){let t=[],n=[];for(let o of e){let r=[];o.info.role==="user"?(r.push(...n),n=[]):n=[];for(let i of o.parts)switch(i.type){case"text":r.push({type:"text",text:i.text});break;case"reasoning":r.push({type:"thinking",thinking:i.text??"",...i.signature!=null?{signature:i.signature}:void 0});break;case"tool":{let s=i;s.tool==="result"?r.push({type:"tool_result",toolUseId:s.callID,content:s.state.output??""}):(r.push({type:"tool_use",id:s.callID,name:s.tool,input:s.state.input??{}}),s.state.status==="completed"?n.push({type:"tool_result",toolUseId:s.callID,content:s.state.output??""}):s.state.status==="error"&&n.push({type:"tool_result",toolUseId:s.callID,content:s.state.error??"[error]",isError:!0}));break}default:"text"in i&&typeof i.text=="string"&&r.push({type:"text",text:i.text});break}t.push({role:o.info.role,content:r})}return t}function S2e(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.role!=="user"||!n.content.some(s=>s.type==="tool_result"))continue;let o=t>0&&e[t-1].role==="assistant"?e[t-1]:null,r=new Set((o?.content??[]).filter(s=>s.type==="tool_use").map(s=>s.id)),i=n.content.length;n.content=n.content.filter(s=>s.type!=="tool_result"||r.has(s.toolUseId)),n.content.length<i&&z.warn(`removed ${i-n.content.length} orphaned tool_result block(s) from message ${t}`),n.content.length===0&&(n.content=[{type:"text",text:"[tool results provided]"}])}}function A2e(e,t){return new Response(JSON.stringify({type:"error",error:{type:"server_error",message:t}}),{status:e,headers:{"content-type":"application/json"}})}async function bT(e,t){try{let n=nu(e.rawHeaders);return n&&WH(n),nz(e)?await g2e(e,t):HTe(e)?await h2e(e,t):await E2e(e,t)}catch(n){let o=n instanceof Error?n.message:"Unknown gateway error";return z.error("pipeline error:",n),A2e(502,o)}}var _z,SSe,hz,IT,yT,gz,ru,RT,Ez,l2e,d2e,wv=E(()=>{"use strict";l();Wo();Rv();jTe();qTe();KH();JH();QH();WTe();tSe();rSe();dd();uSe();lz();Xf();dSe();Cv();ESe();_z=!1;hz=null,IT=new Map,yT=new Map,gz=new Map;ru=null,RT=null,Ez=null,l2e={"claude-opus-4":{context:2e5,output:32e3,cacheReadCost:15/1e6*.1},"claude-sonnet-4":{context:2e5,output:16e3,cacheReadCost:3/1e6*.1},"claude-sonnet-3-5":{context:2e5,output:8192,cacheReadCost:3/1e6*.1},"claude-haiku-3-5":{context:2e5,output:8192,cacheReadCost:.8/1e6*.1}},d2e={context:2e5,output:8192}});var ISe=A((iFt,y2e)=>{y2e.exports={name:"@loreai/gateway",version:"0.15.0",type:"module",license:"FSL-1.1-Apache-2.0",description:"Lore as a transparent LLM proxy \u2014 context management for any AI coding client",main:"./dist/index.cjs",types:"./dist/index.d.cts",exports:{".":{bun:"./src/index.ts",types:"./dist/index.d.cts",require:"./dist/index.cjs",default:"./dist/index.cjs"}},bin:{lore:"./dist/bin.cjs","lore-gateway":"./dist/bin.cjs"},scripts:{typecheck:"tsc --noEmit",build:"bun run script/build.ts",bundle:"bun run script/bundle.ts","build:binary":"bun run script/build.ts --binary",start:"bun run src/index.ts"},dependencies:{},files:["dist/bin.cjs","dist/index.cjs","dist/index.d.cts"],engines:{node:">=22.15",bun:">=1.2.0"},repository:{type:"git",url:"git+https://github.com/BYK/loreai.git",directory:"packages/gateway"},publishConfig:{access:"public"},keywords:["lore","gateway","proxy","llm","context-management","anthropic","openai"],author:"BYK",devDependencies:{"@loreai/core":"workspace:*","@sentry/bun":"^10.52.0",binpunch:"^1.0.0"}}});function fd(e){for(let[t,n]of Object.entries(R2e))e.headers.set(t,n);return e}function NSe(e){let t={};return e.forEach((n,o)=>{t[o]=n}),t}function OSe(e,t=200){return fd(new Response(JSON.stringify(e),{status:t,headers:{"content-type":"application/json"}}))}function Na(e,t,n){return OSe({type:"error",error:{type:t,message:n}},e)}async function I2e(e,t){let n;try{n=await e.json()}catch{return Na(400,"invalid_request_error","Invalid JSON body")}let o;try{o=vTe(n,NSe(e.headers))}catch(r){let i=r instanceof Error?r.message:"Failed to parse request";return Na(400,"invalid_request_error",i)}try{let r=await bT(o,t);return fd(r)}catch(r){let i=r instanceof Error?r.message:"Pipeline error";return console.error(`[lore] pipeline error: ${i}`),Na(502,"api_error",`Gateway pipeline error: ${i}`)}}async function b2e(e){try{let t=await fetch(`${e.upstreamAnthropic}/v1/models`,{headers:{"content-type":"application/json"}}),n=new Response(t.body,{status:t.status,statusText:t.statusText,headers:new Headers(t.headers)});return fd(n)}catch(t){let n=t instanceof Error?t.message:"Upstream unreachable";return Na(502,"api_error",`Failed to fetch models: ${n}`)}}function N2e(){return OSe({status:"ok",version:bSe})}async function O2e(e,t){let n;try{n=await e.json()}catch{return Na(400,"invalid_request_error","Invalid JSON body")}let o;try{o=MTe(n,NSe(e.headers))}catch(a){let c=a instanceof Error?a.message:"Failed to parse request";return Na(400,"invalid_request_error",c)}let r;try{r=await bT(o,t)}catch(a){let c=a instanceof Error?a.message:"Pipeline error";return console.error(`[lore] pipeline error: ${c}`),Na(502,"api_error",`Gateway pipeline error: ${c}`)}if(!r.ok)return fd(r);if((r.headers.get("content-type")??"").includes("text/event-stream")){let a=await UTe(r);return fd(ZH(a,!0))}let s=await r.json();return fd(ZH(s,!1))}function Dv(e){let t=Bun.serve({port:e.port,hostname:e.host,async fetch(n){let o=new URL(n.url),{pathname:r}=o,i=n.method;if(i==="OPTIONS")return fd(new Response(null,{status:204}));e.debug&&console.error(`[lore] ${i} ${r}`);try{return i==="POST"&&r==="/v1/messages"?await I2e(n,e):i==="POST"&&r==="/v1/chat/completions"?await O2e(n,e):i==="GET"&&r==="/v1/models"?await b2e(e):i==="GET"&&r==="/health"?N2e():Na(404,"not_found",`No route for ${i} ${r}`)}catch(s){let a=s instanceof Error?s.message:"Internal server error";return console.error(`[lore] uncaught error: ${a}`),Na(500,"api_error",a)}}});return{stop:()=>t.stop(),port:t.port??e.port}}var bSe,R2e,Sz=E(()=>{"use strict";l();KH();JH();QH();wv();bSe="unknown";try{let e=ISe();e.version&&(bSe=e.version)}catch{}R2e={"access-control-allow-origin":"*","access-control-allow-methods":"GET, POST, OPTIONS","access-control-allow-headers":"*","access-control-max-age":"86400"}});var vSe={};ht(vSe,{commandStart:()=>Az,startGateway:()=>Uv});function Uv(e={}){let t=Av();e.port!==void 0&&(t.port=e.port),e.host!==void 0&&(t.host=e.host),e.debug!==void 0&&(t.debug=e.debug);let n=Dv(t),o=n.port;return{config:t,port:o,shutdown:async()=>{console.error("[lore] Shutting down\u2026"),n.stop(),await Lv()}}}async function Az(e){let{config:t,port:n,shutdown:o}=Uv(e),r=`http://${t.host}:${n}`;console.error(`[lore] Gateway listening on ${r}`),console.error("[lore] Model routing: claude-* \u2192 Anthropic, nvidia/* \u2192 Nvidia NIM, gpt-* \u2192 OpenAI, \u2026"),console.error(""),console.error("[lore] Point your AI agent at the gateway:"),console.error(` export ANTHROPIC_BASE_URL=${r}`),console.error(` export OPENAI_BASE_URL=${r}/v1`),console.error(""),console.error("[lore] Configuration (environment variables):"),console.error(` LORE_LISTEN_PORT Port to listen on (current: ${n})`),console.error(` LORE_LISTEN_HOST Host to bind to (current: ${t.host})`),console.error(` LORE_UPSTREAM_ANTHROPIC Anthropic API URL (current: ${t.upstreamAnthropic})`),console.error(` LORE_UPSTREAM_OPENAI OpenAI API URL (current: ${t.upstreamOpenAI})`),console.error(` LORE_IDLE_TIMEOUT Idle timeout in seconds (current: ${t.idleTimeoutSeconds})`),console.error(` LORE_DEBUG Enable debug logging (current: ${t.debug})`),console.error(` LORE_BATCH_DISABLED Disable batch background work (current: ${process.env.LORE_BATCH_DISABLED==="1"})`);let i=async()=>{await o(),process.exit(0)};return process.on("SIGINT",()=>i()),process.on("SIGTERM",()=>i()),new Promise(()=>{})}var $v=E(()=>{"use strict";l();Rv();Sz();wv()});function PSe(e){if(typeof e=="string")return e;if(e instanceof Error)return e.message;if(e&&typeof e=="object")try{return JSON.stringify(e)}catch{return String(e)}return String(e)}var nt,NT=E(()=>{"use strict";l();nt=class extends Error{reason;constructor(t,n){let o={network_error:"Failed to fetch version information.",execution_failed:"Upgrade command failed.",version_not_found:"The specified version was not found.",offline_cache_miss:"Cannot upgrade offline \u2014 no pre-downloaded update is available."};super(n??o[t]),this.name="UpgradeError",this.reason=t}}});var Nz={};ht(Nz,{GITHUB_RELEASES_URL:()=>Qm,KNOWN_CURL_DIRS:()=>yz,acquireLock:()=>Xm,cleanupOldBinary:()=>DSe,compareVersions:()=>LSe,determineInstallDir:()=>Iz,fetchWithUpgradeError:()=>t_,getBinaryDownloadUrl:()=>Rz,getBinaryFilename:()=>Bv,getBinaryPaths:()=>OT,getConfigDir:()=>Oa,getGitHubHeaders:()=>CT,getPlatformBinaryName:()=>ou,getUserAgent:()=>Ri,installBinary:()=>bz,isDowngrade:()=>e_,isNightlyVersion:()=>iu,isProcessRunning:()=>kSe,releaseLock:()=>n_,replaceBinarySync:()=>wSe});function ou(){let e;process.platform==="darwin"?e="darwin":process.platform==="win32"?e="windows":e="linux";let t=process.arch==="arm64"?"arm64":"x64",n=process.platform==="win32"?".exe":"";return`lore-${e}-${t}${n}`}function Rz(e){return`https://github.com/${xSe}/${MSe}/releases/download/${e}/${ou()}`}function iu(e){return e.includes("-dev.")}function LSe(e,t){return Bun.semver.order(e,t)}function e_(e,t){return LSe(e,t)===1}function Bv(){return process.platform==="win32"?"lore.exe":"lore"}function OT(e){return{installPath:e,tempPath:`${e}.download`,oldPath:`${e}.old`,lockPath:`${e}.lock`}}function Iz(e,t){let n=(t.PATH??"").split(yi.delimiter);if(t.LORE_INSTALL_DIR)return t.LORE_INSTALL_DIR;let o=[(0,yi.join)(e,".local","bin"),(0,yi.join)(e,"bin")];for(let r of o)if((0,Qn.existsSync)(r)&&n.includes(r))return r;return(0,yi.join)(e,".lore","bin")}function CT(){return{Accept:"application/vnd.github.v3+json","User-Agent":Ri()}}function Ri(){let e=typeof process.versions.bun<"u"?`bun/${process.versions.bun}`:`node/${process.versions.node}`;return`lore/${Ze} (${process.platform}-${process.arch}) ${e}`}async function t_(e,t,n){try{return await fetch(e,t)}catch(o){if(o instanceof Error&&o.name==="AbortError")throw o;let r=PSe(o);throw new nt("network_error",`Failed to connect to ${n}: ${r}`)}}function wSe(e,t){if(process.platform==="win32"){let n=`${t}.old`;try{(0,Qn.renameSync)(t,n)}catch{try{(0,Qn.unlinkSync)(n),(0,Qn.renameSync)(t,n)}catch{}}(0,Qn.renameSync)(e,t)}else(0,Qn.renameSync)(e,t)}function DSe(e){(0,md.unlink)(e).catch(()=>{})}function kSe(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}function Xm(e){try{(0,Qn.writeFileSync)(e,String(process.pid),{flag:"wx"})}catch(t){if(t.code!=="EEXIST")throw t;v2e(e)}}function v2e(e){let t;try{t=(0,Qn.readFileSync)(e,"utf-8").trim()}catch(o){if(o.code==="ENOENT"){Xm(e);return}throw o}let n=Number.parseInt(t,10);if(!Number.isNaN(n)&&kSe(n)){if(n===process.ppid){(0,Qn.writeFileSync)(e,String(process.pid));return}throw new nt("execution_failed","Another upgrade is already in progress")}try{(0,Qn.unlinkSync)(e)}catch(o){if(o.code!=="ENOENT")throw o}Xm(e)}function n_(e){try{(0,Qn.unlinkSync)(e)}catch{}}async function bz(e,t){await(0,md.mkdir)(t,{recursive:!0,mode:493});let n=(0,yi.join)(t,Bv()),{tempPath:o,lockPath:r}=OT(n);Xm(r);try{if((0,yi.resolve)(e)!==(0,yi.resolve)(o)){try{await(0,md.unlink)(o)}catch{}await Bun.write(o,Bun.file(e)),process.platform!=="win32"&&await(0,md.chmod)(o,493)}wSe(o,n)}finally{n_(r)}return n}function Oa(){if(process.env.LORE_CONFIG_DIR)return process.env.LORE_CONFIG_DIR;let e=process.env.HOME??process.env.USERPROFILE??require("node:os").homedir();return(0,yi.join)(e,".lore")}var Qn,md,yi,xSe,MSe,Qm,yz,Ca=E(()=>{"use strict";l();Qn=require("node:fs"),md=require("node:fs/promises"),yi=require("node:path");ld();NT();xSe="BYK",MSe="loreai",Qm=`https://api.github.com/repos/${xSe}/${MSe}/releases`,yz=[".local/bin","bin",".lore/bin"]});function r_(e,t){let n=new DataView(e.buffer,e.byteOffset+t,8),o=n.getUint32(0,!0),r=n.getUint32(4,!0),i=r%2147483648*4294967296+o;return i!==0&&r>=2147483648?-i:i}function x2e(e){if(e.byteLength<Gv)throw new Error(`Patch too small: ${e.byteLength} bytes (need at least ${Gv})`);let t=new TextDecoder().decode(e.subarray(0,8));if(t!==P2e)throw new Error(`Invalid patch format: expected TRDIFF10, got "${t}"`);let n=r_(e,8),o=r_(e,16),r=r_(e,24);if(n<0||o<0||r<0)throw new Error("Corrupt patch: negative length in header");let i=Gv+n+o;if(i>e.byteLength)throw new Error(`Corrupt patch: header lengths (${i}) exceed file size (${e.byteLength})`);return{controlLen:n,diffLen:o,newSize:r}}function USe(e){let n=new ReadableStream({start(o){o.enqueue(e),o.close()}}).pipeThrough(new DecompressionStream("zstd"));return new Cz(n.getReader())}async function M2e(e){$Se+=1;let t=(0,GSe.join)((0,BSe.tmpdir)(),`lore-patch-old-${process.pid}-${$Se}`);try{return(0,jv.copyFileSync)(e,t,jv.constants.COPYFILE_FICLONE),{data:Bun.mmap(t,{shared:!1}),cleanup:()=>(0,Oz.unlink)(t).catch(()=>{})}}catch{return await(0,Oz.unlink)(t).catch(()=>{}),{data:new Uint8Array(await Bun.file(e).arrayBuffer()),cleanup:()=>{}}}}async function jSe(e,t,n){let{controlLen:o,diffLen:r,newSize:i}=x2e(t),s=Gv,a=s+o,c=a+r,u=Bun.zstdDecompressSync(t.subarray(s,a)),d=USe(t.subarray(a,c)),p=USe(t.subarray(c)),{data:f,cleanup:m}=await M2e(e),_=Bun.file(n).writer(),h=new Bun.CryptoHasher("sha256"),T=0,S=0;try{for(let y=0;y<u.byteLength;y+=24){let v=r_(u,y),x=r_(u,y+8),P=r_(u,y+16);if(v>0){let N=await d.read(v),F=new Uint8Array(v);for(let se=0;se<v;se++)F[se]=((f[T+se]??0)+(N[se]??0))%256;_.write(F),h.update(F),T+=v,S+=v}if(x>0){let N=await p.read(x);_.write(N),h.update(N),S+=x}T+=P}}finally{try{await _.end()}finally{await m()}}if(S!==i)throw new Error(`Output size mismatch: wrote ${S} bytes, expected ${i}`);return h.digest("hex")}var jv,Oz,BSe,GSe,P2e,Gv,Cz,$Se,VSe=E(()=>{"use strict";l();jv=require("node:fs"),Oz=require("node:fs/promises"),BSe=require("node:os"),GSe=require("node:path"),P2e="TRDIFF10",Gv=32;Cz=class{chunks=[];buffered=0;done=!1;reader;constructor(t){this.reader=t}async read(t){for(;this.buffered<t&&!this.done;){let r=await this.reader.read();if(r.done){this.done=!0;break}this.chunks.push(r.value),this.buffered+=r.value.byteLength}if(this.buffered<t)throw new Error(`Unexpected end of stream: needed ${t} bytes, have ${this.buffered}`);let n=new Uint8Array(t),o=0;for(;o<t;){let r=this.chunks[0];if(!r)break;let i=t-o;r.byteLength<=i?(n.set(r,o),o+=r.byteLength,this.buffered-=r.byteLength,this.chunks.shift()):(n.set(r.subarray(0,i),o),this.chunks[0]=r.subarray(i),this.buffered-=i,o=t)}return n}};$Se=0});function D2e(e){if(e.name==="TimeoutError"||e.name==="AbortError")return!0;let t=e.message.toLowerCase();return t.includes("timeout")||t.includes("econnreset")||t.includes("econnrefused")||t.includes("network")||t.includes("fetch failed")}function HSe(e,t){let n=AbortSignal.timeout(e);return t?AbortSignal.any([n,t]):n}function k2e(e,t){return!!(t?.aborted&&e.name==="AbortError")}async function vz(e,t,n,o){let r=o?.timeout??L2e,i=o?.signal,s;for(let a=0;a<=FSe;a++)try{return await fetch(e,{...t,signal:HSe(r,i)})}catch(c){if(s=c instanceof Error?c:new Error(String(c)),k2e(s,i)||a>=FSe||!D2e(s))break}throw new nt("network_error",`${n}: ${s?.message??"unknown error"}`)}async function o_(e){let t=`${Fv}/token?scope=repository:${Vv}:pull`,n=await vz(t,{headers:{"User-Agent":Ri()}},"Failed to connect to GHCR",{signal:e});if(!n.ok)throw new nt("network_error",`GHCR token exchange failed: HTTP ${n.status}`);let o=await n.json();if(!o.token)throw new nt("network_error","GHCR token exchange returned no token");return o.token}async function _d(e,t,n){let o=`${Fv}/v2/${Vv}/manifests/${t}`,r=await vz(o,{headers:{Authorization:`Bearer ${e}`,Accept:$2e,"User-Agent":Ri()}},`Failed to fetch manifest for tag "${t}"`,{signal:n});if(!r.ok)throw new nt("network_error",`Failed to fetch manifest for tag "${t}": HTTP ${r.status}`);return await r.json()}async function Pz(e){return await _d(e,U2e)}function zSe(e){let t=e.annotations?.version;if(!t)throw new nt("network_error","Nightly manifest has no version annotation");return t}function qSe(e,t){let n=e.layers.find(o=>o.annotations?.["org.opencontainers.image.title"]===t);if(!n)throw new nt("version_not_found",`No nightly build found for ${t}`);return n}async function xz(e,t,n){let o=`${Fv}/v2/${Vv}/blobs/${t}`,r;try{r=await fetch(o,{headers:{Authorization:`Bearer ${e}`,"User-Agent":Ri()},redirect:"manual",signal:HSe(w2e,n)})}catch(i){let s=i instanceof Error?i.message:String(i);throw new nt("network_error",`Failed to connect to GHCR: ${s}`)}if(r.status===200)return r;if(r.status===301||r.status===302||r.status===307||r.status===308){let i=r.headers.get("location");if(!i)throw new nt("network_error",`GHCR blob redirect (${r.status}) had no Location header`);let s;try{s=await fetch(i,{headers:{"User-Agent":Ri()},signal:n})}catch(a){let c=a instanceof Error?a.message:String(a);throw new nt("network_error",`Failed to download from blob storage: ${c}`)}if(!s.ok)throw new nt("network_error",`Blob storage download failed: HTTP ${s.status}`);return s}throw new nt("network_error",`Unexpected GHCR blob response: HTTP ${r.status}`)}async function B2e(e,t,n){let o=`${Fv}/v2/${Vv}/tags/list?n=${YSe}`;t&&(o+=`&last=${encodeURIComponent(t)}`);let r=await vz(o,{headers:{Authorization:`Bearer ${e}`,"User-Agent":Ri()}},"Failed to list GHCR tags",{signal:n});if(!r.ok)throw new nt("network_error",`Failed to list GHCR tags: HTTP ${r.status}`);return(await r.json()).tags??[]}async function Mz(e,t,n){let o=[],r;for(;;){let i=await B2e(e,r,n);if(i.length===0)break;for(let s of i)(!t||s.startsWith(t))&&o.push(s);if(i.length<YSe)break;r=i.at(-1)}return o}async function WSe(e,t,n){return(await xz(e,t,n)).arrayBuffer()}var L2e,FSe,w2e,Vv,U2e,Fv,$2e,YSe,Lz=E(()=>{"use strict";l();Ca();NT();L2e=1e4,FSe=1,w2e=3e4;Vv="BYK/loreai",U2e="nightly",Fv="https://ghcr.io",$2e="application/vnd.oci.image.manifest.v1+json";YSe=100});function vT(){return(0,Ii.join)(Oa(),G2e)}async function F2e(){await(0,bi.mkdir)(vT(),{recursive:!0,mode:448})}function Hv(e){return e.replace(/[^a-zA-Z0-9.-]/g,"_")}function zv(e,t){return`${Hv(e)}-${Hv(t)}.patch`}function KSe(e,t){return`chain-${Hv(e)}-${Hv(t)}.json`}function qv(e){return e instanceof Error&&"code"in e&&e.code==="ENOENT"}async function wz(e,t){await F2e();let n=vT();if(await Promise.all(e.patches.flatMap((o,r)=>{let i=t[r];if(!(i&&o))return[];let s=(0,Ii.join)(n,zv(i.fromVersion,i.toVersion));return[Bun.write(s,o.data)]})),t.length>0){let o=t.at(0),r=t.at(-1);if(o&&r){let i={fromVersion:o.fromVersion,toVersion:r.toVersion,expectedSha256:e.expectedSha256,cachedAt:Date.now(),patches:t.map((a,c)=>({fromVersion:a.fromVersion,toVersion:a.toVersion,size:e.patches[c]?.size??0}))},s=(0,Ii.join)(n,KSe(o.fromVersion,r.toVersion));await Bun.write(s,JSON.stringify(i))}}}async function H2e(e){let t;try{t=await(0,bi.readdir)(e)}catch(r){if(qv(r))return[];throw r}let n=t.filter(r=>r.startsWith("chain-")&&r.endsWith(".json"));return(await Promise.all(n.map(async r=>{try{return await Bun.file((0,Ii.join)(e,r)).json()}catch{return null}}))).filter(r=>r!==null)}function z2e(e){let t=new Map;for(let n of e)for(let o of n.patches)t.set(o.fromVersion,{toVersion:o.toVersion,size:o.size});return t}function q2e(e,t,n){let o=[],r=t;for(;r!==n;){let i=e.get(r);if(!i||(o.push({fromVersion:r,toVersion:i.toVersion}),r=i.toVersion,o.length>V2e))return null}return o.length>0?o:null}async function ZSe(e,t){let n=vT(),o=await H2e(n);if(o.length===0)return null;let r=z2e(o),i=q2e(r,e,t);if(!i)return null;let s="";for(let d of o)if(d.toVersion===t&&d.expectedSha256){s=d.expectedSha256;break}if(!s)return null;let a=await Promise.all(i.map(async d=>{let p=(0,Ii.join)(n,zv(d.fromVersion,d.toVersion));try{let f=new Uint8Array(await Bun.file(p).arrayBuffer());return{data:f,size:f.byteLength}}catch(f){if(qv(f))return null;throw f}})),c=[],u=0;for(let d of a){if(!d)return null;c.push(d),u+=d.size}return{patches:c,totalSize:u,expectedSha256:s}}async function Y2e(e,t,n){let o=[],r=new Set,i=await Promise.all(t.filter(a=>a.startsWith("chain-")&&a.endsWith(".json")).map(async a=>{try{let c=await Bun.file((0,Ii.join)(e,a)).json();return{file:a,meta:c}}catch{return await(0,bi.unlink)((0,Ii.join)(e,a)).catch(()=>{}),null}}));for(let a of i)if(a)if(n-a.meta.cachedAt>j2e)o.push(a.meta);else for(let c of a.meta.patches)r.add(zv(c.fromVersion,c.toVersion));let s=[];for(let a of o){for(let c of a.patches){let u=zv(c.fromVersion,c.toVersion);r.has(u)||s.push((0,bi.unlink)((0,Ii.join)(e,u)).catch(()=>{}))}s.push((0,bi.unlink)((0,Ii.join)(e,KSe(a.fromVersion,a.toVersion))).catch(()=>{}))}await Promise.all(s)}async function JSe(){let e=vT(),t;try{t=await(0,bi.readdir)(e)}catch(n){if(qv(n))return;throw n}await Y2e(e,t,Date.now())}async function XSe(){let e=vT(),t;try{t=await(0,bi.readdir)(e)}catch(n){if(qv(n))return;throw n}await Promise.all(t.map(n=>(0,bi.unlink)((0,Ii.join)(e,n)).catch(()=>{})))}var bi,Ii,G2e,j2e,V2e,Yv=E(()=>{"use strict";l();bi=require("node:fs/promises"),Ii=require("node:path");Ca();G2e="patch-cache",j2e=10080*60*1e3,V2e=10});function oAe(e){return!(Ze==="dev"||Ze==="0.0.0-dev"||iu(Ze)!==iu(e)||e_(Ze,e))}async function Z2e(e){let t=nAe+2,n;try{n=await fetch(`${Qm}?per_page=${t}`,{headers:{Accept:"application/vnd.github.v3+json","User-Agent":Ri()},signal:e})}catch{return[]}return n.ok?await n.json():[]}function J2e(e){if(!e.digest)return null;let t=K2e.exec(e.digest);return t?t[1]?.toLowerCase()??null:null}async function X2e(e,t){let n;try{n=await fetch(e,{headers:{"User-Agent":Ri()},signal:t})}catch{return null}return n.ok?new Uint8Array(await n.arrayBuffer()):null}function Q2e(e,t){let n=e.assets.find(o=>o.name===t);return n?J2e(n):null}function eKe(e){let{releases:t,currentVersion:n,targetVersion:o,binaryName:r,fullGzSize:i}=e,s=`${r}.patch`,a=t.findIndex(S=>S.tag_name===o),c=t.findIndex(S=>S.tag_name===n);if(a===-1||c===-1||a>=c)return null;let u=t.slice(a,c);if(u.length>nAe)return null;let d=u[0];if(!d)return null;let p=Q2e(d,r)??"";if(!p)return null;let f=[],m=0;for(let S of u){let y=S.assets.find(v=>v.name===s);if(!y||(f.push(y.browser_download_url),m+=y.size,m>i*rAe))return null}f.reverse();let _=[...u].reverse(),h=[],T=n;for(let S of _)h.push({fromVersion:T,toVersion:S.tag_name}),T=S.tag_name;return{patchUrls:f,expectedSha256:p,steps:h}}async function iAe(e,t,n){let o=ou(),r=await Z2e(n),i=r.find(p=>p.tag_name===t);if(!i)return null;let s=i.assets.find(p=>p.name===`${o}.gz`);if(!s)return null;let a=eKe({releases:r,currentVersion:e,targetVersion:t,binaryName:o,fullGzSize:s.size});if(!a)return null;let c=await Promise.all(a.patchUrls.map(p=>X2e(p,n))),u=[],d=0;for(let p of c){if(!p)return null;u.push({data:p,size:p.byteLength}),d+=p.byteLength}return{patches:u,totalSize:d,expectedSha256:a.expectedSha256,steps:a.steps}}function tKe(e){return e.annotations?.["from-version"]??null}function nKe(e,t){return e.annotations?.[`sha256-${t}`]??null}function rKe(e,t,n){let o=[];for(let r of e){let i=r.slice(PT.length);Bun.semver.order(i,t)===1&&Bun.semver.order(i,n)!==1&&o.push({tag:r,version:i})}return o.sort((r,i)=>Bun.semver.order(r.version,i.version)),o.map(r=>r.tag)}function oKe(e,t){if(tKe(e)!==t.expectedFrom)return{ok:!1};let o=e.layers.find(r=>r.annotations?.["org.opencontainers.image.title"]===t.patchLayerName);return o?o.size>t.sizeLimit?{ok:!1}:{ok:!0,digest:o.digest,size:o.size}:{ok:!1}}function iKe(e){let{manifests:t,chainTags:n,currentVersion:o,targetVersion:r,patchLayerName:i,binaryName:s,fullGzSize:a}=e,c=[],u=0,d=o;for(let p=0;p<t.length;p++){let f=t[p],m=n[p];if(!(f&&m))return null;let _=a*rAe-u,h=oKe(f,{expectedFrom:d,patchLayerName:i,sizeLimit:_});if(!h.ok)return null;if(c.push(h.digest),u+=h.size,d=m.slice(PT.length),p===t.length-1){if(d!==r)return null;let T=nKe(f,s)??"";return T?{digests:c,totalSize:u,expectedSha256:T}:null}}return null}async function sKe(e){let{token:t,currentVersion:n,targetVersion:o,fullGzSize:r,preloadedTags:i,signal:s}=e,a=ou(),c=`${a}.patch`,u=i??await Mz(t,PT,s),d=rKe(u,n,o);if(d.length===0||d.length>W2e)return null;let p=new Map,f=await Promise.all(d.map(async x=>{try{let P=await _d(t,x,s);return{tag:x,manifest:P}}catch{return{tag:x,manifest:null}}}));for(let{tag:x,manifest:P}of f)P&&p.set(x,P);let m=d.map(x=>p.get(x));if(m.some(x=>!x))return null;let _=iKe({manifests:m,chainTags:d,currentVersion:n,targetVersion:o,patchLayerName:c,binaryName:a,fullGzSize:r});if(!_)return null;let h=await Promise.all(_.digests.map(x=>WSe(t,x,s).then(P=>new Uint8Array(P)))),T=[],S=0;for(let x of h)T.push({data:x,size:x.byteLength}),S+=x.byteLength;let y=[],v=n;for(let x of d){let P=x.slice(PT.length);y.push({fromVersion:v,toVersion:P}),v=P}return{patches:T,totalSize:S,expectedSha256:_.expectedSha256,steps:y}}async function sAe(e,t,n,o){if(!oAe(e))return null;let r=iu(e)?"nightly":"stable";try{return r==="nightly"?await QSe({targetVersion:e,oldBinaryPath:t,destPath:n,resolveFromNetwork:()=>aAe(e),channel:"nightly",offline:o}):await QSe({targetVersion:e,oldBinaryPath:t,destPath:n,resolveFromNetwork:()=>iAe(Ze,e),channel:"stable",offline:o})}catch(i){let s=i instanceof Error?i.message:String(i);return console.error(`[lore] Delta upgrade failed (${s}), falling back to full download`),null}}async function QSe(e){let{targetVersion:t,oldBinaryPath:n,destPath:o,resolveFromNetwork:r,channel:i,offline:s}=e,a=await aKe(Ze,t);if(a)return await eAe(a,n,o);if(s)return null;let c=await r();return c?(c.steps&&wz(c,c.steps).catch(()=>{}),await eAe(c,n,o)):null}async function aKe(e,t){try{return await ZSe(e,t)}catch{return null}}async function eAe(e,t,n){return{sha256:await lKe(e,t,n),patchBytes:e.totalSize,chainLength:e.patches.length}}async function aAe(e,t){let n=await o_(t),o=ou(),r=`nightly-${e}`,[i,s]=await Promise.all([_d(n,r,t),Mz(n,PT,t)]),a=i.layers.find(c=>c.annotations?.["org.opencontainers.image.title"]===`${o}.gz`);return a?await sKe({token:n,currentVersion:Ze,targetVersion:e,fullGzSize:a.size,preloadedTags:s,signal:t}):null}function cKe(e){for(let t of[".patching.a",".patching.b"])try{(0,tAe.unlinkSync)(`${e}${t}`)}catch{}}async function uKe(e,t,n){let o=t,r="",i=`${n}.patching.a`,s=`${n}.patching.b`;try{for(let a=0;a<e.patches.length;a++){let c=e.patches[a];if(!c)throw new Error(`Missing patch at index ${a}`);let u=a===e.patches.length-1,d=a%2===0?i:s,p=u?n:d;r=await jSe(o,c.data,p),u||(o=p)}}finally{e.patches.length>1&&cKe(n)}return r}async function lKe(e,t,n){let o=await uKe(e,t,n);if(o!==e.expectedSha256)throw new Error(`SHA-256 mismatch after patching: got ${o}, expected ${e.expectedSha256}`);return o}async function cAe(e,t,n){if(!oAe(e)||t?.aborted)return;let o=await n();!o?.steps||t?.aborted||await wz(o,o.steps)}function uAe(e,t){return cAe(e,t,()=>aAe(e,t))}function lAe(e,t){return cAe(e,t,()=>iAe(Ze,e,t))}var tAe,nAe,W2e,rAe,K2e,PT,Dz=E(()=>{"use strict";l();tAe=require("node:fs");Ca();VSe();ld();Lz();Yv();nAe=10,W2e=30,rAe=.6,K2e=/^sha256:([0-9a-f]+)$/i;PT="patch-"});function s_(){try{let e=IN(kz);if(e==="nightly")return"nightly";if(e==="stable")return"stable"}catch{}try{if(require("node:fs").readFileSync((0,xT.join)(Oa(),fAe),"utf-8").trim()==="nightly"){try{iE(kz,"nightly")}catch{}return"nightly"}}catch{}return"stable"}function mAe(e){try{iE(kz,e)}catch{}try{let t=require("node:fs"),n=Oa();t.mkdirSync(n,{recursive:!0}),t.writeFileSync((0,xT.join)(n,fAe),e,"utf-8")}catch{}}function $z(){for(let t of pKe)if(process.execPath.startsWith(t))return OT(process.execPath);let e=(0,xT.join)((0,Uz.homedir)(),".lore","bin",Bv());return OT(e)}async function Bz(e){let t=await t_(`${Qm}/latest`,{headers:CT(),signal:e},"GitHub");if(!t.ok)throw new nt("network_error",`Failed to fetch from GitHub: ${t.status}`);let n=await t.json();if(!n.tag_name)throw new nt("network_error","No version found in GitHub release");return n.tag_name.replace(Wv,"")}async function Gz(e){if(e?.aborted)throw new Error("Aborted");let t=await o_(e);if(e?.aborted)throw new Error("Aborted");let n=await Pz(t);return zSe(n)}function _Ae(e="stable",t){return e==="nightly"?Gz(t):Bz(t)}async function gAe(e,t){if(iu(e)||t==="nightly")try{let o=await o_();return await _d(o,`nightly-${e}`),!0}catch(o){if(o instanceof nt&&(o.message.includes("HTTP 404")||o.message.includes("HTTP 403")))return!1;throw o}return(await t_(`${Qm}/tags/${e}`,{method:"HEAD",headers:CT()},"GitHub")).ok}async function hAe(e,t){let n=e.pipeThrough(new DecompressionStream("gzip")),o=Bun.file(t).writer();try{for await(let r of n)o.write(r)}finally{await o.end()}}function fKe(){return`${ou()}.gz`}async function mKe(e,t){let n=await o_(),o=t?await _d(n,`nightly-${t}`):await Pz(n),r=fKe(),i=qSe(o,r),s=await xz(n,i.digest);if(!s.body)throw new nt("execution_failed","GHCR blob response had no body");await hAe(s.body,e)}async function _Ke(e,t){let n=Rz(e),o=CT();try{let s=await t_(`${n}.gz`,{headers:o},"GitHub");if(s.ok&&s.body){await hAe(s.body,t);return}}catch{}let r=await t_(n,{headers:o},"GitHub");if(!r.ok)throw new nt("execution_failed",`Failed to download binary: HTTP ${r.status}`);let i=await r.arrayBuffer();await Bun.write(t,i)}function hKe(e){let t=(0,i_.statSync)(e,{throwIfNoEntry:!1});return t?.isFile()&&t.size>0?t.size:null}async function EKe(e){for(let t=1;t<=dAe;t++){let n=hKe(e);if(n!==null)return n;if(t===dAe)break;let o=gKe*2**(t-1);await Bun.sleep(o)}throw new nt("execution_failed",`Downloaded binary is missing or empty at ${e}. This is usually transient \u2014 rerun \`lore upgrade\` to retry.`)}function TKe(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}async function SKe(e,t,n){let{tempPath:o,lockPath:r}=$z();Xm(r);try{try{(0,i_.unlinkSync)(o)}catch{}let i=await sAe(e,process.execPath,o,!!n),s;if(i)s=i.patchBytes;else{if(n)throw new nt("offline_cache_miss",n==="explicit"?`Cannot upgrade to ${e} in offline mode \u2014 no pre-downloaded update is available. Run \`lore upgrade\` without \`--offline\` to download the update directly.`:`Cannot upgrade to ${e} \u2014 the network is unavailable and no pre-downloaded update was found. Check your internet connection and try again.`);iu(e)?await mKe(o,e):await _Ke(t??e,o)}let a=await EKe(o);return console.error(`[lore] Binary verified (${TKe(a)})`),XSe().catch(()=>{}),process.platform!=="win32"&&(0,i_.chmodSync)(o,493),{tempBinaryPath:o,lockPath:r,patchBytes:s}}catch(i){throw n_(r),i}}async function EAe(e,t,n){return SKe(e,t,n)}var i_,Uz,xT,Wv,pAe,fAe,kz,dKe,pKe,dAe,gKe,jz=E(()=>{"use strict";l();i_=require("node:fs"),Uz=require("node:os"),xT=require("node:path");Wo();Ca();Dz();NT();Lz();Yv();Wv=/^v/,pAe="nightly",fAe="channel",kz="release_channel";dKe=require("node:path").sep,pKe=yz.map(e=>(0,xT.join)((0,Uz.homedir)(),e)+dKe);dAe=6,gKe=100});function Zv(e){if(typeof Bun<"u"&&typeof Bun.which=="function")return Bun.which(e);try{let{execFileSync:t}=require("node:child_process"),n=process.platform==="win32"?"where":"which";return t(n,[e],{encoding:"utf8",stdio:["pipe","pipe","pipe"]}).trim().split(`
|
|
1010
|
+
`)[0]||null}catch{return null}}function vAe(){let e=[];for(let t of Fz){let n=t.detect();n&&e.push({def:t,path:n})}return e}var Fz,PAe=E(()=>{"use strict";l();Fz=[{name:"claude-code",displayName:"Claude Code",binary:"claude",detect:()=>Zv("claude"),envVars:e=>({ANTHROPIC_BASE_URL:e})},{name:"codex",displayName:"Codex",binary:"codex",detect:()=>Zv("codex"),envVars:e=>({OPENAI_BASE_URL:`${e}/v1`})},{name:"pi",displayName:"Pi",binary:"pi",detect:()=>Zv("pi"),envVars:e=>({ANTHROPIC_BASE_URL:e})},{name:"opencode",displayName:"OpenCode",binary:"opencode",detect:()=>Zv("opencode"),envVars:e=>({OPENAI_BASE_URL:`${e}/v1`})}]});var Hz={};ht(Hz,{commandRun:()=>$Ke});async function DKe(e){console.error(`
|
|
1011
|
+
[lore] Multiple AI agents detected:
|
|
1012
|
+
`);for(let n=0;n<e.length;n++)console.error(` ${n+1}) ${e[n].def.displayName} (${e[n].path})`);console.error();let t=(0,MAe.createInterface)({input:process.stdin,output:process.stderr});return new Promise(n=>{let o=()=>{t.question("Choose an agent [1]: ",r=>{let i=r.trim(),s=i===""?0:Number.parseInt(i,10)-1;Number.isInteger(s)&&s>=0&&s<e.length?(t.close(),n(e[s])):(console.error(` Invalid choice. Enter 1\u2013${e.length}.`),o())})};o()})}async function kKe(e,t){if(t.length>0){let r={};for(let i of Fz)Object.assign(r,i.envVars(e));return{command:t[0],args:t.slice(1),env:r}}let n=vAe();if(n.length===0)return console.error("[lore] No known AI agents found on PATH."),console.error("[lore] Install one of: Claude Code (claude), Codex (codex), Pi (pi), OpenCode (opencode)"),console.error("[lore] Or run with an explicit command: lore run <command>"),null;let o;if(n.length===1)o=n[0],console.error(`[lore] Detected ${o.def.displayName} at ${o.path}`);else if(process.stdin.isTTY)o=await DKe(n);else{console.error("[lore] Multiple agents detected but stdin is not a TTY."),console.error("[lore] Specify which agent to run: lore run <command>");for(let r of n)console.error(` - ${r.def.displayName}: lore run ${r.def.binary}`);return null}return{command:o.def.binary,args:[],env:o.def.envVars(e)}}function UKe(e){let t={...process.env,...e.env};return(0,xAe.spawn)(e.command,e.args,{env:t,stdio:"inherit"})}async function $Ke(e,t){let{config:n,port:o,shutdown:r}=Uv(e),i=`http://${n.host}:${o}`;console.error(`[lore] Gateway listening on ${i}`);let s=await kKe(i,t);if(!s){console.error("[lore] Running in server-only mode. Point your agent at the gateway manually."),console.error(`[lore] export ANTHROPIC_BASE_URL=${i}`);let u=async()=>{await r(),process.exit(0)};return process.on("SIGINT",()=>u()),process.on("SIGTERM",()=>u()),new Promise(()=>{})}console.error(`[lore] Launching: ${s.command} ${s.args.join(" ")}`.trimEnd());let a=UKe(s),c=u=>{a.kill(u)};return process.on("SIGINT",()=>c("SIGINT")),process.on("SIGTERM",()=>c("SIGTERM")),new Promise(u=>{a.on("exit",async(d,p)=>{if(await r(),p){let f={SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGTERM:15};process.exit(128+(f[p]??1))}process.exit(d??0)}),a.on("error",async d=>{console.error(`[lore] Failed to launch ${s.command}: ${d.message}`),await r(),process.exit(1)})})}var xAe,MAe,zz=E(()=>{"use strict";l();xAe=require("node:child_process"),MAe=require("node:readline");$v();PAe()});var UAe={};ht(UAe,{commandUpgrade:()=>FKe});function BKe(e){let{values:t,positionals:n}=(0,DAe.parseArgs)({args:e,options:{check:{type:"boolean",default:!1},force:{type:"boolean",default:!1},offline:{type:"boolean",default:!1},channel:{type:"string"}},allowPositionals:!0,strict:!1});return{flags:{check:!!t.check,force:!!t.force,offline:!!t.offline,channel:t.channel},versionArg:n[0]}}function GKe(e,t){let n=e?.toLowerCase();return n==="nightly"||n==="stable"?{channel:n,cleanVersionArg:void 0}:t==="nightly"||t==="stable"?{channel:t,cleanVersionArg:e}:{channel:s_(),cleanVersionArg:e}}function jKe(){try{let e=require("node:fs"),t=require("node:path"),{getConfigDir:n}=(Ca(),Xv(Nz));return e.readFileSync(t.join(n(),"latest-version"),"utf-8").trim()||null}catch{return null}}function VKe(e){try{let t=require("node:fs"),n=require("node:path"),{getConfigDir:o}=(Ca(),Xv(Nz)),r=o();t.mkdirSync(r,{recursive:!0}),t.writeFileSync(n.join(r,"latest-version"),e,"utf-8")}catch{}}function wAe(e){if(e)return e.replace(Wv,"");let t=jKe();if(!t)throw new nt("network_error","No cached version available. Run `lore upgrade` with network access first, then retry with --offline.");return t}async function FKe(e){let{flags:t,versionArg:n}=BKe(e),{channel:o,cleanVersionArg:r}=GKe(n,t.channel),i=s_(),s=o!==i;console.error(`[lore] Current version: ${Ze}`),console.error(`[lore] Channel: ${o}`);let a,c=!1;if(t.offline)a=wAe(r),c="explicit",console.error(`[lore] Offline mode: using cached target ${a}`);else try{let m=await _Ae(o);a=r?.replace(Wv,"")??m,VKe(m)}catch(m){if(m instanceof nt&&m.reason==="network_error")try{a=wAe(r),c="network-fallback",console.error("[lore] Network unavailable, falling back to cached upgrade target")}catch{throw m}else throw m}if((s||LAe.has(n??""))&&mAe(o),t.check){if(Ze===a)console.error(`[lore] Already up to date (${Ze})`);else{let m=e_(Ze,a)?"Downgrade":"Update";console.error(`[lore] ${m} available: ${Ze} -> ${a}`),console.error("[lore] Run 'lore upgrade' to update.")}c&&console.error("[lore] (resolved from cache \u2014 network unavailable)");return}if(Ze===a&&!t.force&&!s){console.error(`[lore] Already up to date (${Ze})`);return}if(r&&!LAe.has(r)&&!c&&!await gAe(a,o))throw new nt("version_not_found",`Version ${a} not found`);let u=e_(Ze,a);console.error(`[lore] ${u?"Downgrading":"Upgrading"} to ${a}...`);let f=await EAe(a,o==="nightly"&&!r?pAe:void 0,c);f.patchBytes&&console.error(`[lore] Applied delta patch (${HKe(f.patchBytes)} downloaded)`);try{let m=(0,kAe.dirname)($z().installPath),_=Iz(require("node:os").homedir(),process.env),h=process.execPath.startsWith(m)?m:_,T=await bz(f.tempBinaryPath,h);console.error(`[lore] ${u?"Downgraded":"Upgraded"} successfully: ${Ze} -> ${a}`),console.error(`[lore] Binary installed at: ${T}`),c&&console.error("[lore] (upgraded from cached patches)")}finally{n_(f.lockPath)}}function HKe(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}var DAe,kAe,LAe,$Ae=E(()=>{"use strict";l();DAe=require("node:util"),kAe=require("node:path");ld();Ca();NT();jz();LAe=new Set(["nightly","stable"])});var WKe={};ht(WKe,{_cli:()=>GAe,handleRequest:()=>bT,loadConfig:()=>Av,resetPipelineState:()=>Lv,startServer:()=>Dv});module.exports=Xv(WKe);l();l();Xf();Wo();ld();try{let e=new Error().stack;if(e){let t=globalThis;t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="2b28a791-1d47-4495-9d22-26ffd499f9be"}}catch{}Ze!=="dev"&&!rr()&&(R$({dsn:"https://0282201d6a3df3bc46423e61012ae62b@o275100.ingest.us.sentry.io/4511355222622208",release:Ze,sendDefaultPii:!0,tracesSampleRate:1,enableLogs:!0}),z.registerSink({info:(e,t)=>pc.info(e,t),warn:(e,t)=>pc.warn(e,t),error:(e,t)=>pc.error(e,t),captureException:e=>he(e)}));Rv();Sz();wv();l();var BAe=require("node:util");l();ld();var C2e=`
|
|
1013
|
+
lore v${Ze} \u2014 context management proxy for AI coding agents
|
|
1014
|
+
|
|
1015
|
+
Usage:
|
|
1016
|
+
lore [command] [options]
|
|
1017
|
+
|
|
1018
|
+
Commands:
|
|
1019
|
+
run [command...] Start gateway and launch an AI agent (default)
|
|
1020
|
+
start Start the gateway server only
|
|
1021
|
+
upgrade [version] Update lore to the latest (or specified) version
|
|
1022
|
+
Flags: --check, --force, --offline, --channel <ch>
|
|
1023
|
+
help Show this help text
|
|
1024
|
+
|
|
1025
|
+
Options:
|
|
1026
|
+
-p, --port <port> Gateway port (default: 6969, env: LORE_LISTEN_PORT)
|
|
1027
|
+
-H, --host <host> Gateway host (default: 127.0.0.1, env: LORE_LISTEN_HOST)
|
|
1028
|
+
-d, --debug Enable debug logging (env: LORE_DEBUG=1)
|
|
1029
|
+
-v, --version Print version and exit
|
|
1030
|
+
-h, --help Show this help text
|
|
1031
|
+
|
|
1032
|
+
Examples:
|
|
1033
|
+
lore # Auto-detect agent and launch with gateway
|
|
1034
|
+
lore run claude # Launch Claude Code through the gateway
|
|
1035
|
+
lore run opencode # Launch OpenCode through the gateway
|
|
1036
|
+
lore start # Start gateway only (set ANTHROPIC_BASE_URL yourself)
|
|
1037
|
+
lore start -p 8080 # Start gateway on a custom port
|
|
1038
|
+
lore upgrade # Upgrade to latest version
|
|
1039
|
+
lore upgrade --check # Check for updates without installing
|
|
1040
|
+
lore upgrade --force # Force re-download even if up to date
|
|
1041
|
+
lore upgrade nightly # Switch to nightly channel and update
|
|
1042
|
+
lore upgrade stable # Switch back to stable channel
|
|
1043
|
+
lore upgrade 0.14.0 # Install a specific version
|
|
1044
|
+
lore upgrade --offline # Upgrade from cached patches (no network)
|
|
1045
|
+
|
|
1046
|
+
Environment variables:
|
|
1047
|
+
LORE_LISTEN_PORT Gateway port (overridden by --port)
|
|
1048
|
+
LORE_LISTEN_HOST Gateway host (overridden by --host)
|
|
1049
|
+
LORE_UPSTREAM_ANTHROPIC Upstream Anthropic API URL
|
|
1050
|
+
LORE_UPSTREAM_OPENAI Upstream OpenAI API URL
|
|
1051
|
+
LORE_DEBUG Enable debug logging (1 or true)
|
|
1052
|
+
LORE_NO_UPDATE_CHECK Disable background update checks (set to 1)
|
|
1053
|
+
`.trimStart();function kv(){console.log(C2e)}function CSe(){console.log(Ze)}$v();l();var su=require("node:fs"),SAe=require("node:path");Ca();ld();Dz();Yv();jz();var AKe=1440*60*1e3,yKe=1440*60*1e3,RKe=.2,IKe=new Set(["upgrade","--version","-v","--json","help"]),AAe=process.env.FORCE_COLOR!=="0"&&process.env.NO_COLOR===void 0&&(process.stderr.isTTY??!1);function Vz(e){return AAe?`\x1B[36m${e}\x1B[39m`:e}function bKe(e){return AAe?`\x1B[2m${e}\x1B[22m`:e}var NKe="version-check.json";function yAe(){return(0,SAe.join)(Oa(),NKe)}function Kv(){try{let e=(0,su.readFileSync)(yAe(),"utf-8"),t=JSON.parse(e);return{lastChecked:typeof t.lastChecked=="number"?t.lastChecked:null,latestVersion:typeof t.latestVersion=="string"?t.latestVersion:null,lastNotified:typeof t.lastNotified=="number"?t.lastNotified:null}}catch{return{lastChecked:null,latestVersion:null,lastNotified:null}}}function RAe(e){try{let t=Oa();(0,su.existsSync)(t)||(0,su.mkdirSync)(t,{recursive:!0}),(0,su.writeFileSync)(yAe(),JSON.stringify(e),"utf-8")}catch{}}function OKe(e){let t=Kv();RAe({...t,lastChecked:Date.now(),latestVersion:e})}function CKe(){let e=Kv();RAe({...e,lastNotified:Date.now()})}function vKe(){let{lastChecked:e}=Kv();if(e===null)return!0;let t=Date.now()-e,n=(Math.random()-.5)*2*RKe,o=AKe*(1+n),r=1-Math.exp(-t/o);return Math.random()<r}var TAe=!1;function PKe(e){return e===null?!0:Date.now()-e>=yKe}var MT=null;async function xKe(e,t,n){if(Bun.semver.order(t,Ze)===1){try{e==="nightly"?await uAe(t,n):await lAe(t,n)}catch{}try{await JSe()}catch{}}}function MKe(){try{if(!vKe())return}catch{return}MT=new AbortController;let{signal:e}=MT,t=s_();(async()=>{try{let n=t==="nightly"?await Gz(e):await Bz(e);OKe(n),await xKe(t,n,e)}catch{}finally{MT=null}})()}function LKe(){return!!process.stderr.isTTY}function wKe(){if(!LKe()||TAe)return null;try{let{latestVersion:e,lastNotified:t}=Kv();if(!e||Bun.semver.order(e,Ze)!==1||!PKe(t))return null;let o=s_()==="nightly"?"New nightly available:":"Update available:";try{CKe()}catch{}return TAe=!0,`
|
|
1054
|
+
${bKe(o)} ${Vz(Ze)} -> ${Vz(e)} Run ${Vz('"lore upgrade"')} to update.
|
|
1055
|
+
`}catch{return null}}function IAe(e){return e.some(t=>IKe.has(t))}function bAe(){return process.env.LORE_NO_UPDATE_CHECK==="1"}function NAe(){bAe()||MKe()}function OAe(){return bAe()?null:wKe()}function CAe(){MT?.abort(),MT=null}var zKe={port:{type:"string",short:"p"},host:{type:"string",short:"H"},debug:{type:"boolean",short:"d"},version:{type:"boolean",short:"v"},help:{type:"boolean",short:"h"}};function qKe(e){let t=Number.parseInt(e,10);return(Number.isNaN(t)||t<0||t>65535)&&(console.error(`Error: Invalid port "${e}". Must be 0\u201365535.`),process.exit(1)),t}function YKe(e){return{port:e.port?qKe(e.port):void 0,host:e.host??void 0,debug:e.debug??void 0}}async function GAe(){let e,t;try{let s=(0,BAe.parseArgs)({args:process.argv.slice(2),options:zKe,allowPositionals:!0,strict:!1});e=s.values,t=s.positionals}catch(s){console.error(`Error: ${s instanceof Error?s.message:s}`),kv(),process.exit(1)}if(e.version){CSe();return}if(e.help&&t.length===0){kv();return}let n=t[0]??"run",o=t.slice(1),r=YKe(e),i=IAe(t);i||NAe();try{switch(n){case"start":await Az(r);break;case"run":{let{commandRun:s}=await Promise.resolve().then(()=>(zz(),Hz));await s(r,o);break}case"upgrade":{let{commandUpgrade:s}=await Promise.resolve().then(()=>($Ae(),UAe));await s(o);break}case"help":kv();break;default:{let{commandRun:s}=await Promise.resolve().then(()=>(zz(),Hz));await s(r,[n,...o])}break}}finally{CAe()}if(!i){let s=OAe();s&&process.stderr.write(s)}}var KKe={};typeof Bun<"u"&&Bun.main===KKe.path&&Promise.resolve().then(()=>($v(),vSe)).then(({commandStart:e})=>e({}));0&&(module.exports={_cli,handleRequest,loadConfig,resetPipelineState,startServer});
|
|
1056
|
+
//# sourceMappingURL=index.cjs.map
|
|
1057
|
+
|
|
1058
|
+
//# debugId=2b28a791-1d47-4495-9d22-26ffd499f9be
|