@mcpjam/inspector 3.25.2 → 3.26.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/client/assets/app-bootstrap-BTQE7bOL.css +1 -0
- package/dist/client/assets/{app-bootstrap-1nvCvKTu.js → app-bootstrap-DH9V5ruc.js} +417 -401
- package/dist/client/assets/app-navigation-DR1HvySV.js +1903 -0
- package/dist/client/assets/caniuse-instrument-sans-BbzFLZTg.woff2 +0 -0
- package/dist/client/assets/{chunk-D32TOXHM-oQ9_W5Z_.js → chunk-D32TOXHM-CyuI5mIj.js} +5 -5
- package/dist/client/assets/{dead-clicks-autocapture-4b8CtYsH.js → dead-clicks-autocapture-DPDniRFT.js} +2 -2
- package/dist/client/assets/{error-reporting-Dtp0I_co.js → error-reporting-B3uD72Mm.js} +1 -1
- package/dist/client/assets/{error-reporting-BSiw4y1I.js → error-reporting-B45ic1xn.js} +60 -60
- package/dist/client/assets/{exception-autocapture-B7NhdXJS.js → exception-autocapture-DfmiXL7P.js} +2 -2
- package/dist/client/assets/first-run-oauth-return-CNNqEZ9t.css +2 -0
- package/dist/client/assets/first-run-oauth-return-D9QTp0pi.js +11 -0
- package/dist/client/assets/{highlighted-body-KQOG7T2V-Bkm2yeWV.js → highlighted-body-KQOG7T2V-BJHVzwuE.js} +2 -2
- package/dist/client/assets/index-COoa-n8G.js +4 -0
- package/dist/client/assets/{jszip.min-BMhd-tDN.js → jszip.min-mcFGNyxN.js} +2 -2
- package/dist/client/assets/{mermaid-MCJ5UELQ-BH89GBNu.js → mermaid-MCJ5UELQ-C7LKilvg.js} +1 -1
- package/dist/client/assets/{posthog-recorder-BYAtjhGv.js → posthog-recorder-CPrlbyxV.js} +2 -2
- package/dist/client/assets/{preload-helper-SIk4t7Ze.js → preload-helper-DSOvb5Vt.js} +2 -2
- package/dist/client/assets/{project-route-CVSc0mXZ.js → project-route-Nif61zEo.js} +3 -3
- package/dist/client/assets/{react-dom-CeQ1Kv3m.js → react-dom-DYqNESIg.js} +2 -2
- package/dist/client/assets/{rolldown-runtime-COoCppmG.js → rolldown-runtime-B8IK0bAc.js} +1 -1
- package/dist/client/assets/{surveys-CS6JUc-z.js → surveys-P2oB9RB7.js} +2 -2
- package/dist/client/assets/telemetry-files-c187231a8c0529f6.js +1 -0
- package/dist/client/assets/trace-timeline-BZb0fhoh.js +90 -0
- package/dist/client/assets/{trace-timeline-b3f1aE0g.js → trace-timeline-CKpfuLys.js} +1 -1
- package/dist/client/assets/{web-vitals-p0pJml2T.js → web-vitals-D0Dvhg3H.js} +2 -2
- package/dist/client/caniuse-instrument-sans-OFL.txt +93 -0
- package/dist/client/caniuse-jar.webp +0 -0
- package/dist/client/caniuse-share-icons.svg +8 -0
- package/dist/client/index.html +9 -9
- package/dist/server/harness-install-cli.js +311 -62
- package/dist/server/index.js +2 -2
- package/package.json +2 -2
- package/dist/client/assets/app-bootstrap-wXhyegHd.css +0 -1
- package/dist/client/assets/first-run-oauth-return-Ctdtlees.js +0 -1872
- package/dist/client/assets/first-run-oauth-return-DS6OM0jO.css +0 -2
- package/dist/client/assets/index-BJZmdbiq.js +0 -4
- package/dist/client/assets/telemetry-files-fac3cc064e66cb1e.js +0 -1
- package/dist/client/assets/trace-timeline-CKGcby6S.js +0 -73
- package/dist/client/assets/use-reduced-motion-iJQiY9UT.js +0 -42
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"3.25.2"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a358a3a7-13c4-4aea-97e6-735f8afe2e41",e._sentryDebugIdIdentifier="sentry-dbid-a358a3a7-13c4-4aea-97e6-735f8afe2e41")}catch{}})();var jr=()=>"strict";function rf(e){jr=e}function nf(){return jr()}function Ye(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,n])=>t.indexOf(+r)===-1).map(([r,n])=>n)}function Wt(e,t="|"){return e.map(r=>Mr(r)).join(t)}function Qe(e,t){return typeof t=="bigint"?t.toString():t}var Ao=class{constructor(e){this._getter=e,this._value=void 0}get value(){const e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function Ne(e){return new Ao(e)}function To(e){return e==null}function gt(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Io(e,t){const r=e/t,n=Math.round(r),o=4*Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<o?0:r-n}var Bt=Symbol("evaluating");function Zo(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Bt)return n===void 0&&(n=Bt,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function D(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function _t(e){const t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function F(e){return _t(e._zod.def)??e._zod.def.shape}function xr(e,t,r){Object.defineProperty(e,t,{get(){const n=r();return D(this,t,n),n},enumerable:!0,configurable:!0})}function Ur(e,t,r){t in e?D(e,t,r):e[t]=r}function q(e,t,r,n){const o=F(t);for(const i of r){const s=Object.getOwnPropertyDescriptor(o,i);s.enumerable&&(s.get?xr(e,i,()=>{const a=t._zod.def.shape[i];return n?n(a,i):a}):Ur(e,i,n?n(s.value,i):s.value))}}function Ro(e,t){for(const r of Reflect.ownKeys(t)){const n=Object.getOwnPropertyDescriptor(t,r);n.enumerable&&(n.get?xr(e,r,()=>t[r]):Ur(e,r,n.value))}}function Z(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function No(e){return JSON.stringify(e)}function Co(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Dr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function pe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var jo=Ne(()=>{if(N.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function Y(e){if(pe(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(pe(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Lr(e){return Y(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var xo=new Set(["string","number","symbol"]);function Q(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function K(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function v(e){const 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 Mr(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Uo(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}var Fr={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]},Do={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Lo(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o={};return q(o,e,Ce(e,t)),K(e,Z(r,{shape:o,checks:[]}))}function Ce(e,t){const r=F(e),n=[];for(const o of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(r,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);t[o]&&n.push(o)}return n}function Mo(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=new Set(Ce(e,t)),i={};return q(i,e,Reflect.ownKeys(F(e)).filter(s=>!o.has(s))),K(e,Z(r,{shape:i,checks:[]}))}function Fo(e,t){if(!Y(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const n=F(e);for(const o of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return K(e,Z(e._zod.def,{shape:Jr(e,t)}))}function Jr(e,t){const r={};return q(r,e,Reflect.ownKeys(F(e))),Ro(r,t),r}function Jo(e,t){if(!Y(t))throw new Error("Invalid input to safeExtend: expected a plain object");return K(e,Z(e._zod.def,{shape:Jr(e,t)}))}function Wo(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const r={};return q(r,e,Reflect.ownKeys(F(e))),q(r,t,Reflect.ownKeys(F(t))),K(e,Z(e._zod.def,{shape:r,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Vt(e,t,r,n="partial"){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(`.${n}() cannot be used on object schemas containing refinements`);const i=r?new Set(Ce(t,r)):void 0,s={};return q(s,t,Reflect.ownKeys(F(t)),e&&((a,c)=>i&&!i.has(c)?a:new e({type:"optional",innerType:a}))),K(t,Z(t._zod.def,{shape:s,checks:[]}))}function Bo(e,t,r){const n=r?new Set(Ce(t,r)):void 0,o={};return q(o,t,Reflect.ownKeys(F(t)),(i,s)=>n&&!n.has(s)?i:new e({type:"nonoptional",innerType:i})),K(t,Z(t._zod.def,{shape:o}))}function j(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Vo(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function L(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function ae(e){return typeof e=="string"?e:e?.message}function Kt(e){const t=[];for(const r of e??[]){const n=r._zod.def;if(!/_(length|size)$|_equals$/.test(n.check))break;const o=n.maximum??n.length??n.size;o>=0&&t.push([o,r])}return t}function et(e,t,r){var n;for(let o=t;o<e.length;o++)(n=e[o]).schema??(n.schema=r)}function B(e,t,r){var n;const o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(n=e).schema??(n.schema=e.inst):e.schema=e.inst);const i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,s=e.message?e.message:ae(e.inst?._zod.def?.error?.(e))??ae(i?.(e))??ae(t?.error?.(e))??ae(r.customError?.(e))??ae(r.localeError?.(e))??"Invalid input",a={};for(const c of Object.keys(e))c==="inst"||c==="schema"||c==="continue"||c==="input"||c==="__proto__"||(a[c]=e[c]);return a.path??(a.path=[]),a.message=s,t?.reportInput&&(a.input=e.input),a}var Ko=/[\uD800-\uDBFF]/;function yt(e){const t=e.length;if(!Ko.test(e))return t;let r=t;for(let n=0;n<t-1;n++)(e.charCodeAt(n)&64512)===55296&&(e.charCodeAt(n+1)&64512)===56320&&(r--,n++);return r}function bt(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ho(e){const 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";const r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function he(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function qo(e,t){for(const r in t){const n=Object.getOwnPropertyDescriptor(t,r);n.get?Object.defineProperty(e,r,{...n,enumerable:!1}):Go(e,r,n.value)}}function V(e,t,r,n=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:n,value:r}),r}function wt(e,t,r){return V(e,t,r,!1)}function Wr(e,t){for(const r in e){const n=e[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!0,get(){return V(this,r,n(this))},set(o){V(this,r,o)}})}return t}function Go(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:V(this,t,r.bind(this))},set(n){V(this,t,n)}})}function Xo(e,t){const r=Object.getPrototypeOf(e);return t in r?void 0:r}var Fe,J=!1,Yo={configurable:!0,get(){J=!0}};function b(e,t,r){const n=Object.getPrototypeOf(e._zod);if(t in n&&Fe!==e._zod){Fe=void 0;return}Fe=e._zod,Object.defineProperty(n,t,{configurable:!0,get(){Object.defineProperty(this,t,Yo);const o=J;J=!1;try{const i=r(this);return J?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i}),J=J||o,i}catch(i){throw delete this[t],J=J||o,i}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function Qo(e,t,r,n){const o=Xo(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){const i={configurable:!0,writable:!0,enumerable:n,value:void 0};return Object.defineProperty(this,t,i),i.value=r(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:n,value:i})}})}var ei="~constantCatch";function ti(e){const t=()=>e;return t[ei]=!0,t}var Ht,of=Object.freeze({status:"aborted"}),Je={value:void 0,enumerable:!1},qt="captureStackTrace"in Error?Error:null;function ri(e){const t=qt;if(t){const r=t.stackTraceLimit;if(typeof r=="number"){try{t.stackTraceLimit=0}catch{return qt=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}function f(e,t,r,n){const o={};function i(h){this.def=h,this.constr=d,this.traits=new Set}i.prototype=o;const s=r,a=s&&new WeakSet;function c(h,p){if(h._zod){if(h._zod.traits.has(e))return}else{Je.value=new i(p);try{Object.defineProperty(h,"_zod",Je)}finally{Je.value=void 0}}if(h._zod.traits.add(e),t(h,p),a){const g=Object.getPrototypeOf(h),_=h._zod.constr.prototype;let y=g;for(;y&&y!==_;)y=Object.getPrototypeOf(y);const E=y??g;a.has(E)||(a.add(E),qo(E,s))}const m=d.prototype;for(const g in m)Object.prototype.hasOwnProperty.call(m,g)&&(g in h||(h[g]=m[g].bind(h)))}const u=n?.Parent??Object;class l extends u{}Object.defineProperty(l,"name",{value:e});function d(h){const p=n?.Parent?ri(l):this;c(p,h);const m=p._zod.deferred;if(m){for(const _ of m)_();p._zod.deferred=void 0}const g=globalThis.__zod_globalConfig?.postProcessor;return g&&g(p),p}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:h=>n?.Parent&&h instanceof n.Parent?!0:h?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var H=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Br=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Ht=globalThis).__zod_globalConfig??(Ht.__zod_globalConfig={});var N=globalThis.__zod_globalConfig;function U(e){return e&&Object.assign(N,e),N}function ni(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Qe,2)),e.message}function oi(e){this._zod.message=e}var ii={get:ni,set:oi,enumerable:!0,configurable:!0},We={value:void 0,enumerable:!1},Gt=new WeakSet([Object.prototype,Error.prototype]),Vr=(e,t)=>{e.name="$ZodError",We.value=t,Object.defineProperty(e,"issues",We),We.value=void 0,Object.defineProperty(e,"message",ii);const r=Object.getPrototypeOf(e);Gt.has(r)||(Gt.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){const n=()=>this.message;return Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0})}}))},si=f("$ZodError",Vr),ai=f("$ZodError",Vr,void 0,{Parent:Error});function ci(e,t,r){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:r(),writable:!0,enumerable:!0,configurable:!0}):e[t]=r()),e[t]}function ui(e,t=r=>r.message){const r={},n=[];for(const o of e.issues)o.path.length>0?ci(r,o.path[0],()=>[]).push(t(o)):n.push(t(o));return{formErrors:n,fieldErrors:r}}function li(e,t=r=>r.message){const r={_errors:[]},n=(o,i=[])=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>n({issues:a},[...i,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...i,...s.path]);else{const a=[...i,...s.path];if(a.length===0)r._errors.push(t(s));else{let c=r,u=0;for(;u<a.length;){const l=a[u],d=u===a.length-1;if(l==="_errors"){d&&c._errors.push(t(s)),u++;continue}Object.prototype.hasOwnProperty.call(c,l)||Object.defineProperty(c,l,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const h=c[l];d&&h._errors.push(t(s)),c=h,u++}}}};return n(e),r}function je(e,t){return{callee:t?.callee??e,Err:t?.Err}}var $t=e=>{const t=(r,n,o,i)=>{const s=o?{...o,async:!1}:{async:!1},a=r._zod.run({value:n,issues:[]},s);if(a instanceof Promise)throw new H;if(a.issues.length){const c=new(i?.Err??e)(a.issues.map(u=>B(u,s,U())));throw Dr(c,i?.callee??t),c}return a.value};return t},kt=e=>{const t=async(r,n,o,i)=>{const s=o?{...o,async:!0}:{async:!0};let a=r._zod.run({value:n,issues:[]},s);if(a instanceof Promise&&(a=await a),a.issues.length){const c=new(i?.Err??e)(a.issues.map(u=>B(u,s,U())));throw Dr(c,i?.callee??t),c}return a.value};return t},xe=e=>(t,r,n)=>{const o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new H;return i.issues.length?Kr(e,i.issues,o):{success:!0,data:i.value}},sf=xe(ai);function Kr(e,t,r){let n;return{success:!1,get error(){return n||(n=new e(t.map(o=>B(o,r,U()))),t=void 0,r=void 0),n},set error(o){n=o,t=void 0,r=void 0}}}var zt=e=>async(t,r,n)=>{const o=n?{...n,async:!0}:{async:!0};let i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?Kr(e,i.issues,o):{success:!0,data:i.value}},fi=Symbol.for("zod.compile.invalid"),di=Symbol.for("zod.compile.fallback"),pi=((e,t,r)=>{const n=e._zod.bag.validator;if(n!==void 0){if(n(t)!==fi)return!0;if(n.definite===!0&&r===void 0)return!1}return hi(e,t,r)});function hi(e,t,r){const n=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;let i;if(o?(n[di]=!0,i=o({value:t,issues:[]},n)):i=e._zod.run({value:t,issues:[]},n),i instanceof Promise)throw new H;return i.issues.length===0}var mi=async(e,t,r)=>{const n=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let o=e._zod.run({value:t,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length===0},vi=e=>{const t=$t(e),r=(n,o,i,s)=>{const a=i?{...i,direction:"backward"}:{direction:"backward"};return t(n,o,a,je(r,s))};return r},gi=e=>{const t=$t(e),r=(n,o,i,s)=>t(n,o,i,je(r,s));return r},_i=e=>{const t=kt(e),r=async(n,o,i,s)=>{const a=i?{...i,direction:"backward"}:{direction:"backward"};return await t(n,o,a,je(r,s))};return r},yi=e=>{const t=kt(e),r=async(n,o,i,s)=>await t(n,o,i,je(r,s));return r},bi=e=>(t,r,n)=>{const o=n?{...n,direction:"backward"}:{direction:"backward"};return xe(e)(t,r,o)},wi=e=>(t,r,n)=>xe(e)(t,r,n),$i=e=>async(t,r,n)=>{const o=n?{...n,direction:"backward"}:{direction:"backward"};return zt(e)(t,r,o)},ki=e=>async(t,r,n)=>zt(e)(t,r,n),zi=/^[cC][0-9a-z]{6,}$/,Oi=/^[0-9a-z]+$/,Si=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Pi=/^[0-9a-vA-V]{20}$/,Ei=/^[A-Za-z0-9]{27}$/,Ai=/^[a-zA-Z0-9_-]{21}$/;function Ti(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Ii=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Zi=/^([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})$/,Xt=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)$/,Ri=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ni="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function Ci(){return new RegExp(Ni,"u")}var ji=/^(?:(?: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])$/,xi=/^(([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}|:))$/,Ui=/^((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])$/,Di=/^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Li=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Mi=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Fi=/^https?$/,Ji=/^\+[1-9]\d{6,14}$/,Hr="(?:(?:\\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])))";function Wi(e){return new RegExp(`^${e}$`)}var Bi=Wi(Hr);function tt(e){const 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}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Vi(e){return new RegExp(`^${tt(e)}$`)}function Ki(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${tt({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,n=e.local?`${r}|${tt({precision:e.precision})}`:r;return new RegExp(`^${Hr}T(?:${n})$`)}var Hi=/^[\s\S]{0,}$/,qi=/^-?\d+$/,Ot=/^-?\d+(?:\.\d+)?$/,Gi=/^(?:true|false)$/i,Xi=/^null$/i,Yi=/^undefined$/i,Qi=/^[^A-Z]*$/,es=/^[^a-z]*$/,I=f("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),St=e=>{const t=e.value;return!To(t)&&t.length!==void 0},ze={number:"number",bigint:"bigint",object:"date"},qr=f("$ZodCheckLessThan",(e,t)=>{I.init(e,t);const r=ze[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:ze[typeof n.value]??r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Gr=f("$ZodCheckGreaterThan",(e,t)=>{I.init(e,t);const r=ze[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:ze[typeof n.value]??r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ts=f("$ZodCheckMultipleOf",(e,t)=>{I.init(e,t),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):Io(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),rs=f("$ZodCheckNumberFormat",(e,t)=>{I.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[o,i]=Fr[t.format];e._zod.check=s=>{const a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:n,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:n,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:n,inclusive:!0,continue:!t.abort});return}}a<o&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,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})}}),ns=f("$ZodCheckMaxLength",(e,t)=>{var r;I.init(e,t),(r=e._zod.def).when??(r.when=St),e._zod.check=n=>{const o=n.value,i=o.length;if((typeof o=="string"&&i>t.maximum?yt(o):i)<=t.maximum)return;const s=bt(o);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),os=f("$ZodCheckMinLength",(e,t)=>{var r;I.init(e,t),(r=e._zod.def).when??(r.when=St),e._zod.check=n=>{const o=n.value,i=o.length;if((typeof o=="string"&&i>=t.minimum&&i<t.minimum*2?yt(o):i)>=t.minimum)return;const s=bt(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),is=f("$ZodCheckLengthEquals",(e,t)=>{var r;I.init(e,t),(r=e._zod.def).when??(r.when=St),e._zod.check=n=>{const o=n.value,i=o.length,s=typeof o=="string"&&i>=t.length&&i<=t.length*2?yt(o):i;if(s===t.length)return;const a=bt(o),c=s>t.length;n.issues.push({origin:a,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ue=f("$ZodCheckStringFormat",(e,t)=>{var r,n;I.init(e,t),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),ss=f("$ZodCheckRegex",(e,t)=>{Ue.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),as=f("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Qi),Ue.init(e,t)}),cs=f("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=es),Ue.init(e,t)}),us=f("$ZodCheckIncludes",(e,t)=>{I.init(e,t);const r=Q(t.includes);t.pattern=new RegExp(typeof t.position=="number"?`^.{${t.position},}${r}`:r),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),ls=f("$ZodCheckStartsWith",(e,t)=>{I.init(e,t);const r=new RegExp(`^${Q(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),fs=f("$ZodCheckEndsWith",(e,t)=>{I.init(e,t);const r=new RegExp(`.*${Q(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function Yt(e,t,r){e.issues.length&&t.issues.push(...L(r,e.issues))}var ds=f("$ZodCheckProperties",(e,t)=>{I.init(e,t),wt(e,Symbol.iterator,function*(){yield e});let r;e._zod.check=n=>{if(n.value==null){n.issues.push({expected:"object",code:"invalid_type",input:n.value,inst:e});return}r??(r=Reflect.ownKeys(t.shape).map(s=>[s,t.shape[s]]));const o=n.value;let i;for(const[s,a]of r){const c=a._zod.run({value:o[s],issues:[]},{});c instanceof Promise?(i??(i=[]),i.push(c.then(u=>Yt(u,n,s)))):Yt(c,n,s)}if(i)return Promise.all(i).then(()=>{})}}),ps=f("$ZodCheckOverwrite",(e,t)=>{I.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),hs=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{this.indent-=1}}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const t=e.split(`
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"3.26.0"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8feb9e3b-3e14-4f19-8396-f9da79755ed7",e._sentryDebugIdIdentifier="sentry-dbid-8feb9e3b-3e14-4f19-8396-f9da79755ed7")}catch{}})();var jr=()=>"strict";function rf(e){jr=e}function nf(){return jr()}function Ye(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,n])=>t.indexOf(+r)===-1).map(([r,n])=>n)}function Wt(e,t="|"){return e.map(r=>Mr(r)).join(t)}function Qe(e,t){return typeof t=="bigint"?t.toString():t}var Ao=class{constructor(e){this._getter=e,this._value=void 0}get value(){const e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function Ne(e){return new Ao(e)}function To(e){return e==null}function gt(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Io(e,t){const r=e/t,n=Math.round(r),o=4*Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<o?0:r-n}var Bt=Symbol("evaluating");function Zo(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Bt)return n===void 0&&(n=Bt,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function D(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function _t(e){const t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function F(e){return _t(e._zod.def)??e._zod.def.shape}function xr(e,t,r){Object.defineProperty(e,t,{get(){const n=r();return D(this,t,n),n},enumerable:!0,configurable:!0})}function Ur(e,t,r){t in e?D(e,t,r):e[t]=r}function q(e,t,r,n){const o=F(t);for(const i of r){const s=Object.getOwnPropertyDescriptor(o,i);s.enumerable&&(s.get?xr(e,i,()=>{const a=t._zod.def.shape[i];return n?n(a,i):a}):Ur(e,i,n?n(s.value,i):s.value))}}function Ro(e,t){for(const r of Reflect.ownKeys(t)){const n=Object.getOwnPropertyDescriptor(t,r);n.enumerable&&(n.get?xr(e,r,()=>t[r]):Ur(e,r,n.value))}}function Z(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function No(e){return JSON.stringify(e)}function Co(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Dr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function pe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var jo=Ne(()=>{if(N.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function Y(e){if(pe(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(pe(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Lr(e){return Y(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var xo=new Set(["string","number","symbol"]);function Q(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function K(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function v(e){const 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 Mr(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Uo(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}var Fr={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]},Do={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Lo(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o={};return q(o,e,Ce(e,t)),K(e,Z(r,{shape:o,checks:[]}))}function Ce(e,t){const r=F(e),n=[];for(const o of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(r,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);t[o]&&n.push(o)}return n}function Mo(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=new Set(Ce(e,t)),i={};return q(i,e,Reflect.ownKeys(F(e)).filter(s=>!o.has(s))),K(e,Z(r,{shape:i,checks:[]}))}function Fo(e,t){if(!Y(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const n=F(e);for(const o of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return K(e,Z(e._zod.def,{shape:Jr(e,t)}))}function Jr(e,t){const r={};return q(r,e,Reflect.ownKeys(F(e))),Ro(r,t),r}function Jo(e,t){if(!Y(t))throw new Error("Invalid input to safeExtend: expected a plain object");return K(e,Z(e._zod.def,{shape:Jr(e,t)}))}function Wo(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const r={};return q(r,e,Reflect.ownKeys(F(e))),q(r,t,Reflect.ownKeys(F(t))),K(e,Z(e._zod.def,{shape:r,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Vt(e,t,r,n="partial"){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(`.${n}() cannot be used on object schemas containing refinements`);const i=r?new Set(Ce(t,r)):void 0,s={};return q(s,t,Reflect.ownKeys(F(t)),e&&((a,c)=>i&&!i.has(c)?a:new e({type:"optional",innerType:a}))),K(t,Z(t._zod.def,{shape:s,checks:[]}))}function Bo(e,t,r){const n=r?new Set(Ce(t,r)):void 0,o={};return q(o,t,Reflect.ownKeys(F(t)),(i,s)=>n&&!n.has(s)?i:new e({type:"nonoptional",innerType:i})),K(t,Z(t._zod.def,{shape:o}))}function j(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Vo(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function L(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function ae(e){return typeof e=="string"?e:e?.message}function Kt(e){const t=[];for(const r of e??[]){const n=r._zod.def;if(!/_(length|size)$|_equals$/.test(n.check))break;const o=n.maximum??n.length??n.size;o>=0&&t.push([o,r])}return t}function et(e,t,r){var n;for(let o=t;o<e.length;o++)(n=e[o]).schema??(n.schema=r)}function B(e,t,r){var n;const o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(n=e).schema??(n.schema=e.inst):e.schema=e.inst);const i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,s=e.message?e.message:ae(e.inst?._zod.def?.error?.(e))??ae(i?.(e))??ae(t?.error?.(e))??ae(r.customError?.(e))??ae(r.localeError?.(e))??"Invalid input",a={};for(const c of Object.keys(e))c==="inst"||c==="schema"||c==="continue"||c==="input"||c==="__proto__"||(a[c]=e[c]);return a.path??(a.path=[]),a.message=s,t?.reportInput&&(a.input=e.input),a}var Ko=/[\uD800-\uDBFF]/;function yt(e){const t=e.length;if(!Ko.test(e))return t;let r=t;for(let n=0;n<t-1;n++)(e.charCodeAt(n)&64512)===55296&&(e.charCodeAt(n+1)&64512)===56320&&(r--,n++);return r}function bt(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ho(e){const 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";const r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function he(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function qo(e,t){for(const r in t){const n=Object.getOwnPropertyDescriptor(t,r);n.get?Object.defineProperty(e,r,{...n,enumerable:!1}):Go(e,r,n.value)}}function V(e,t,r,n=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:n,value:r}),r}function wt(e,t,r){return V(e,t,r,!1)}function Wr(e,t){for(const r in e){const n=e[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!0,get(){return V(this,r,n(this))},set(o){V(this,r,o)}})}return t}function Go(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:V(this,t,r.bind(this))},set(n){V(this,t,n)}})}function Xo(e,t){const r=Object.getPrototypeOf(e);return t in r?void 0:r}var Fe,J=!1,Yo={configurable:!0,get(){J=!0}};function b(e,t,r){const n=Object.getPrototypeOf(e._zod);if(t in n&&Fe!==e._zod){Fe=void 0;return}Fe=e._zod,Object.defineProperty(n,t,{configurable:!0,get(){Object.defineProperty(this,t,Yo);const o=J;J=!1;try{const i=r(this);return J?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i}),J=J||o,i}catch(i){throw delete this[t],J=J||o,i}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function Qo(e,t,r,n){const o=Xo(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){const i={configurable:!0,writable:!0,enumerable:n,value:void 0};return Object.defineProperty(this,t,i),i.value=r(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:n,value:i})}})}var ei="~constantCatch";function ti(e){const t=()=>e;return t[ei]=!0,t}var Ht,of=Object.freeze({status:"aborted"}),Je={value:void 0,enumerable:!1},qt="captureStackTrace"in Error?Error:null;function ri(e){const t=qt;if(t){const r=t.stackTraceLimit;if(typeof r=="number"){try{t.stackTraceLimit=0}catch{return qt=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}function f(e,t,r,n){const o={};function i(h){this.def=h,this.constr=d,this.traits=new Set}i.prototype=o;const s=r,a=s&&new WeakSet;function c(h,p){if(h._zod){if(h._zod.traits.has(e))return}else{Je.value=new i(p);try{Object.defineProperty(h,"_zod",Je)}finally{Je.value=void 0}}if(h._zod.traits.add(e),t(h,p),a){const g=Object.getPrototypeOf(h),_=h._zod.constr.prototype;let y=g;for(;y&&y!==_;)y=Object.getPrototypeOf(y);const E=y??g;a.has(E)||(a.add(E),qo(E,s))}const m=d.prototype;for(const g in m)Object.prototype.hasOwnProperty.call(m,g)&&(g in h||(h[g]=m[g].bind(h)))}const u=n?.Parent??Object;class l extends u{}Object.defineProperty(l,"name",{value:e});function d(h){const p=n?.Parent?ri(l):this;c(p,h);const m=p._zod.deferred;if(m){for(const _ of m)_();p._zod.deferred=void 0}const g=globalThis.__zod_globalConfig?.postProcessor;return g&&g(p),p}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:h=>n?.Parent&&h instanceof n.Parent?!0:h?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var H=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Br=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Ht=globalThis).__zod_globalConfig??(Ht.__zod_globalConfig={});var N=globalThis.__zod_globalConfig;function U(e){return e&&Object.assign(N,e),N}function ni(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Qe,2)),e.message}function oi(e){this._zod.message=e}var ii={get:ni,set:oi,enumerable:!0,configurable:!0},We={value:void 0,enumerable:!1},Gt=new WeakSet([Object.prototype,Error.prototype]),Vr=(e,t)=>{e.name="$ZodError",We.value=t,Object.defineProperty(e,"issues",We),We.value=void 0,Object.defineProperty(e,"message",ii);const r=Object.getPrototypeOf(e);Gt.has(r)||(Gt.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){const n=()=>this.message;return Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0})}}))},si=f("$ZodError",Vr),ai=f("$ZodError",Vr,void 0,{Parent:Error});function ci(e,t,r){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:r(),writable:!0,enumerable:!0,configurable:!0}):e[t]=r()),e[t]}function ui(e,t=r=>r.message){const r={},n=[];for(const o of e.issues)o.path.length>0?ci(r,o.path[0],()=>[]).push(t(o)):n.push(t(o));return{formErrors:n,fieldErrors:r}}function li(e,t=r=>r.message){const r={_errors:[]},n=(o,i=[])=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>n({issues:a},[...i,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...i,...s.path]);else{const a=[...i,...s.path];if(a.length===0)r._errors.push(t(s));else{let c=r,u=0;for(;u<a.length;){const l=a[u],d=u===a.length-1;if(l==="_errors"){d&&c._errors.push(t(s)),u++;continue}Object.prototype.hasOwnProperty.call(c,l)||Object.defineProperty(c,l,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const h=c[l];d&&h._errors.push(t(s)),c=h,u++}}}};return n(e),r}function je(e,t){return{callee:t?.callee??e,Err:t?.Err}}var $t=e=>{const t=(r,n,o,i)=>{const s=o?{...o,async:!1}:{async:!1},a=r._zod.run({value:n,issues:[]},s);if(a instanceof Promise)throw new H;if(a.issues.length){const c=new(i?.Err??e)(a.issues.map(u=>B(u,s,U())));throw Dr(c,i?.callee??t),c}return a.value};return t},kt=e=>{const t=async(r,n,o,i)=>{const s=o?{...o,async:!0}:{async:!0};let a=r._zod.run({value:n,issues:[]},s);if(a instanceof Promise&&(a=await a),a.issues.length){const c=new(i?.Err??e)(a.issues.map(u=>B(u,s,U())));throw Dr(c,i?.callee??t),c}return a.value};return t},xe=e=>(t,r,n)=>{const o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new H;return i.issues.length?Kr(e,i.issues,o):{success:!0,data:i.value}},sf=xe(ai);function Kr(e,t,r){let n;return{success:!1,get error(){return n||(n=new e(t.map(o=>B(o,r,U()))),t=void 0,r=void 0),n},set error(o){n=o,t=void 0,r=void 0}}}var zt=e=>async(t,r,n)=>{const o=n?{...n,async:!0}:{async:!0};let i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?Kr(e,i.issues,o):{success:!0,data:i.value}},fi=Symbol.for("zod.compile.invalid"),di=Symbol.for("zod.compile.fallback"),pi=((e,t,r)=>{const n=e._zod.bag.validator;if(n!==void 0){if(n(t)!==fi)return!0;if(n.definite===!0&&r===void 0)return!1}return hi(e,t,r)});function hi(e,t,r){const n=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;let i;if(o?(n[di]=!0,i=o({value:t,issues:[]},n)):i=e._zod.run({value:t,issues:[]},n),i instanceof Promise)throw new H;return i.issues.length===0}var mi=async(e,t,r)=>{const n=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let o=e._zod.run({value:t,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length===0},vi=e=>{const t=$t(e),r=(n,o,i,s)=>{const a=i?{...i,direction:"backward"}:{direction:"backward"};return t(n,o,a,je(r,s))};return r},gi=e=>{const t=$t(e),r=(n,o,i,s)=>t(n,o,i,je(r,s));return r},_i=e=>{const t=kt(e),r=async(n,o,i,s)=>{const a=i?{...i,direction:"backward"}:{direction:"backward"};return await t(n,o,a,je(r,s))};return r},yi=e=>{const t=kt(e),r=async(n,o,i,s)=>await t(n,o,i,je(r,s));return r},bi=e=>(t,r,n)=>{const o=n?{...n,direction:"backward"}:{direction:"backward"};return xe(e)(t,r,o)},wi=e=>(t,r,n)=>xe(e)(t,r,n),$i=e=>async(t,r,n)=>{const o=n?{...n,direction:"backward"}:{direction:"backward"};return zt(e)(t,r,o)},ki=e=>async(t,r,n)=>zt(e)(t,r,n),zi=/^[cC][0-9a-z]{6,}$/,Oi=/^[0-9a-z]+$/,Si=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Pi=/^[0-9a-vA-V]{20}$/,Ei=/^[A-Za-z0-9]{27}$/,Ai=/^[a-zA-Z0-9_-]{21}$/;function Ti(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Ii=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Zi=/^([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})$/,Xt=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)$/,Ri=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ni="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function Ci(){return new RegExp(Ni,"u")}var ji=/^(?:(?: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])$/,xi=/^(([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}|:))$/,Ui=/^((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])$/,Di=/^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Li=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Mi=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Fi=/^https?$/,Ji=/^\+[1-9]\d{6,14}$/,Hr="(?:(?:\\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])))";function Wi(e){return new RegExp(`^${e}$`)}var Bi=Wi(Hr);function tt(e){const 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}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Vi(e){return new RegExp(`^${tt(e)}$`)}function Ki(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${tt({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,n=e.local?`${r}|${tt({precision:e.precision})}`:r;return new RegExp(`^${Hr}T(?:${n})$`)}var Hi=/^[\s\S]{0,}$/,qi=/^-?\d+$/,Ot=/^-?\d+(?:\.\d+)?$/,Gi=/^(?:true|false)$/i,Xi=/^null$/i,Yi=/^undefined$/i,Qi=/^[^A-Z]*$/,es=/^[^a-z]*$/,I=f("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),St=e=>{const t=e.value;return!To(t)&&t.length!==void 0},ze={number:"number",bigint:"bigint",object:"date"},qr=f("$ZodCheckLessThan",(e,t)=>{I.init(e,t);const r=ze[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:ze[typeof n.value]??r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Gr=f("$ZodCheckGreaterThan",(e,t)=>{I.init(e,t);const r=ze[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:ze[typeof n.value]??r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ts=f("$ZodCheckMultipleOf",(e,t)=>{I.init(e,t),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):Io(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),rs=f("$ZodCheckNumberFormat",(e,t)=>{I.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[o,i]=Fr[t.format];e._zod.check=s=>{const a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:n,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:n,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:n,inclusive:!0,continue:!t.abort});return}}a<o&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,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})}}),ns=f("$ZodCheckMaxLength",(e,t)=>{var r;I.init(e,t),(r=e._zod.def).when??(r.when=St),e._zod.check=n=>{const o=n.value,i=o.length;if((typeof o=="string"&&i>t.maximum?yt(o):i)<=t.maximum)return;const s=bt(o);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),os=f("$ZodCheckMinLength",(e,t)=>{var r;I.init(e,t),(r=e._zod.def).when??(r.when=St),e._zod.check=n=>{const o=n.value,i=o.length;if((typeof o=="string"&&i>=t.minimum&&i<t.minimum*2?yt(o):i)>=t.minimum)return;const s=bt(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),is=f("$ZodCheckLengthEquals",(e,t)=>{var r;I.init(e,t),(r=e._zod.def).when??(r.when=St),e._zod.check=n=>{const o=n.value,i=o.length,s=typeof o=="string"&&i>=t.length&&i<=t.length*2?yt(o):i;if(s===t.length)return;const a=bt(o),c=s>t.length;n.issues.push({origin:a,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ue=f("$ZodCheckStringFormat",(e,t)=>{var r,n;I.init(e,t),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),ss=f("$ZodCheckRegex",(e,t)=>{Ue.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),as=f("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Qi),Ue.init(e,t)}),cs=f("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=es),Ue.init(e,t)}),us=f("$ZodCheckIncludes",(e,t)=>{I.init(e,t);const r=Q(t.includes);t.pattern=new RegExp(typeof t.position=="number"?`^.{${t.position},}${r}`:r),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),ls=f("$ZodCheckStartsWith",(e,t)=>{I.init(e,t);const r=new RegExp(`^${Q(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),fs=f("$ZodCheckEndsWith",(e,t)=>{I.init(e,t);const r=new RegExp(`.*${Q(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function Yt(e,t,r){e.issues.length&&t.issues.push(...L(r,e.issues))}var ds=f("$ZodCheckProperties",(e,t)=>{I.init(e,t),wt(e,Symbol.iterator,function*(){yield e});let r;e._zod.check=n=>{if(n.value==null){n.issues.push({expected:"object",code:"invalid_type",input:n.value,inst:e});return}r??(r=Reflect.ownKeys(t.shape).map(s=>[s,t.shape[s]]));const o=n.value;let i;for(const[s,a]of r){const c=a._zod.run({value:o[s],issues:[]},{});c instanceof Promise?(i??(i=[]),i.push(c.then(u=>Yt(u,n,s)))):Yt(c,n,s)}if(i)return Promise.all(i).then(()=>{})}}),ps=f("$ZodCheckOverwrite",(e,t)=>{I.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),hs=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{this.indent-=1}}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const t=e.split(`
|
|
2
2
|
`).filter(o=>o),r=Math.min(...t.map(o=>o.length-o.trimStart().length)),n=t.map(o=>o.slice(r)).map(o=>" ".repeat(this.indent*2)+o);for(const o of n)this.content.push(o)}compile(){const e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
3
3
|
${t.join(`
|
|
4
4
|
`)}
|
|
@@ -54,6 +54,6 @@ ${t.join(`
|
|
|
54
54
|
|
|
55
55
|
`)}return _.write("payload.value = newResult;"),_.write("return payload;"),_.compile()};let s;const a=pe,c=!N.jitless,l=c&&jo.value,d=t.catchall;let h;e._zod.parse=(p,m)=>{h??(h=n.value);const g=p.value;return a(g)?c&&l&&m?.async===!1&&m.jitless!==!0?(s||(s=i(t.shape)),p=s(p,m),d?sn([],g,p,m,h,e,m?.abortEarly===!0):p):r(p,m):(p.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),p)}});function tr(e,t,r,n){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!j(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>B(s,n,U())))}),t)}var an=f("$ZodUnion",(e,t)=>{w.init(e,t),b(e,"optin",n=>n.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":n.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),b(e,"optout",n=>n.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),b(e,"values",n=>{if(n.def.options.every(o=>o._zod.values))return new Set(n.def.options.flatMap(o=>Array.from(o._zod.values)))}),b(e,"pattern",n=>{if(n.def.options.every(o=>o._zod.pattern)){const o=n.def.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>gt(i.source)).join("|")})$`)}});const r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let i=!1;const s=[];for(const a of t.options){const c=a._zod.run({value:n.value,issues:[]},o);if(c instanceof Promise)s.push(c),i=!0;else{if(c.issues.length===0)return c;s.push(c)}}return i?Promise.all(s).then(a=>tr(a,n,e,o)):tr(s,n,e,o)}});function ca(e){const t=new Map;for(const r of e.options){const n=r._zod.propValues?.[e.discriminator];if(!n||n.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(const o of n)if(t.has(o)){if(o!==void 0)throw new Error(`Duplicate discriminator value "${String(o)}"`);t.set(o,null)}else t.set(o,r)}return t}var ua=f("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,an.init(e,t);const r=e._zod.parse;b(e,"propValues",o=>{const i={};let s=0;for(const a of o.def.options){const c=a._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${o.def.options.indexOf(a)}"`);c[o.def.discriminator]?.has(void 0)&&s++;for(const[u,l]of Object.entries(c)){Object.prototype.hasOwnProperty.call(i,u)||D(i,u,new Set);for(const d of l)i[u].add(d)}}return!o.def.unionFallback&&s>1&&i[o.def.discriminator]?.delete(void 0),i}),t.options.forEach((o,i)=>{const s=_t(o._zod.def);if(s&&!Object.prototype.hasOwnProperty.call(s,t.discriminator))throw new Error(`Invalid discriminated union option at index "${i}"`)});const n=Ne(()=>ca(t));e._zod.parse=(o,i)=>{const s=o.value;if(!pe(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;const a=s?.[t.discriminator],c=n.value.get(a);return c&&(a!==void 0||i.direction!=="backward")?c._zod.run(o,i):t.unionFallback||i.direction==="backward"?r(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(n.value.keys()).filter(u=>n.value.get(u)!==null),input:s,path:[t.discriminator],inst:e}),o)}}),la=f("$ZodIntersection",(e,t)=>{w.init(e,t),e._zod.parse=(r,n)=>{const o=r.value,i=t.left._zod.run({value:o,issues:[]},n),s=t.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([a,c])=>rr(r,a,c)):rr(r,i,s)}});function rt(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(Y(e)&&Y(t)){const r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),o={...e,...t};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(const i of n){if(i==="__proto__")continue;const s=rt(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const o=e[n],i=t[n],s=rt(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function rr(e,t,r){const n=new Map;let o;const i=new Map,s=(u,l)=>{let d;if(u.code==="unrecognized_keys"&&!u.path?.length)o??(o=u),d=u.keys;else if(u.code==="invalid_key"&&u.origin==="record"&&u.path?.length===1){const h=String(u.path[0]);i.has(h)||i.set(h,u),d=[h]}else return!1;for(const h of d)n.has(h)||n.set(h,{}),n.get(h)[l]=!0;return!0};for(const u of t.issues)s(u,"l")||e.issues.push(u);for(const u of r.issues)s(u,"r")||e.issues.push(u);const a=[...n].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(a.length){const u=o?a.filter(l=>o.keys.includes(l)):[];u.length&&e.issues.push({...o,keys:u});for(const l of a)!u.includes(l)&&i.has(l)&&e.issues.push(i.get(l))}const c=rt(t.value,r.value);if(!c.valid){if(j(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var fa=f("$ZodTuple",(e,t)=>{w.init(e,t);const r=t.items,n=N.memoizer;n?.attach(e),e._zod.parse=(o,i)=>{const s=o.value;if(!Array.isArray(s))return o.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=n?n.alloc(e,o,[],i):[];const a=[],c=nr(r,"optin"),u=nr(r,"optout");if(!t.rest){if(s.length<c)return o.issues.push({code:"too_small",minimum:c,inclusive:!0,input:s,inst:e,origin:"array"}),o;s.length>r.length&&o.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:s,inst:e,origin:"array"})}const l=new Array(r.length),d=t.rest?i?.abortEarly:void 0;let h=!1;for(let p=0;p<r.length;p++){const m=r[p]._zod.run({value:s[p],issues:[]},i);m instanceof Promise?a.push(m.then(g=>{l[p]=g})):(l[p]=m,d&&!h&&m.issues.length&&(h=j(m)))}if(t.rest&&!h){let p=r.length-1;const m=s.slice(r.length);let g=o.issues.length;for(const _ of m){if(d&&o.issues.length!==g){if(j(o,g))break;g=o.issues.length}p++;const y=t.rest._zod.run({value:_,issues:[]},i);y instanceof Promise?a.push(y.then(E=>or(E,o,p))):or(y,o,p)}}return a.length?Promise.all(a).then(()=>ir(l,o,r,s,u)):ir(l,o,r,s,u)}});function nr(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function or(e,t,r){e.issues.length&&t.issues.push(...L(r,e.issues)),t.value[r]=e.value}function ir(e,t,r,n,o){for(let i=0;i<r.length;i++){const s=e[i],a=i<n.length;if(!a&&i>=o&&r[i]._zod.optin==="optional"){t.value.length=i;break}if(s.issues.length){if(!a&&i>=o){t.value.length=i;break}t.issues.push(...L(i,s.issues))}t.value[i]=s.value}for(let i=t.value.length-1;i>=n.length&&(r[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}var da=f("$ZodRecord",(e,t)=>{w.init(e,t);const r=N.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{const i=n.value;if(!Y(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;const s=[],a=t.keyType._zod.values;if(a&&!t.partial){n.value=r?r.alloc(e,n,{},o):{};const c=new Set;for(const l of a)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){if(c.add(typeof l=="number"?l.toString():l),l==="__proto__")continue;const d=t.keyType._zod.run({value:l,issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(m=>B(m,o,U())),input:l,path:[l],inst:e});continue}const h=d.value;if(h==="__proto__")continue;const p=t.valueType._zod.run({value:i[l],issues:[]},o);p instanceof Promise?s.push(p.then(m=>{m.issues.length&&n.issues.push(...L(l,m.issues)),n.value[h]=m.value})):(p.issues.length&&n.issues.push(...L(l,p.issues)),n.value[h]=p.value)}let u;for(const l in i)if(!c.has(l))if(t.mode==="loose"){if(l==="__proto__")continue;n.value[l]=i[l]}else u=u??[],u.push(l);u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:u,continue:!0})}else{n.value=r?r.alloc(e,n,{},o):{};let c;for(const u of Reflect.ownKeys(i)){if(u==="__proto__"||!Object.prototype.propertyIsEnumerable.call(i,u))continue;let l=t.keyType._zod.run({value:u,issues:[]},o);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&Ot.test(u)&&l.issues.length){const p=t.keyType._zod.run({value:Number(u),issues:[]},o);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(l=p)}if(l.issues.length){t.mode==="loose"?n.value[u]=i[u]:a?(c=c??[],c.push(u)):n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(p=>B(p,o,U())),input:u,path:[u],inst:e});continue}const d=l.value;if(d==="__proto__")continue;const h=t.valueType._zod.run({value:i[u],issues:[]},o);h instanceof Promise?s.push(h.then(p=>{p.issues.length&&n.issues.push(...L(u,p.issues)),n.value[d]=p.value})):(h.issues.length&&n.issues.push(...L(u,h.issues)),n.value[d]=h.value)}c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:c,continue:!0})}return s.length?Promise.all(s).then(()=>n):n}}),pa=f("$ZodEnum",(e,t)=>{w.init(e,t);const r=Ye(t.entries),n=new Set(r);e._zod.values=n,b(e,"pattern",o=>{const i=Ye(o.def.entries).filter(s=>xo.has(typeof s));return new RegExp(i.length?`^(${i.map(s=>Q(s.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(o,i)=>{const s=o.value;return n.has(s)||o.issues.push({code:"invalid_value",values:r,input:s,inst:e}),o}}),ha=f("$ZodLiteral",(e,t)=>{w.init(e,t);const r=new Set(t.values);e._zod.values=r,b(e,"pattern",n=>{const o=n.def.values;return new RegExp(o.length?`^(${o.map(i=>typeof i=="string"?Q(i):i?Q(i.toString()):String(i)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(n,o)=>{const i=n.value;return r.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}}),ma=f("$ZodTransform",(e,t)=>{w.init(e,t),e._zod.optin="optional",N.memoizer?.guard(e),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Br(e.constructor.name);const o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(r.value=i,r));if(o instanceof Promise)throw new H;return r.value=o,r}});function sr(e,t){return e.value=t.issues.length?void 0:t.value,e}var cn=f("$ZodOptional",(e,t)=>{w.init(e,t),b(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",b(e,"values",r=>{const n=r.def.innerType._zod.values;return n?new Set([...n,void 0]):void 0}),b(e,"pattern",r=>{const n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${gt(n.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(r.value===void 0){if(t.innerType._zod.optin!=="defaulted")return r;const o=t.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(i=>sr(r,i)):sr(r,o)}return t.innerType._zod.run(r,n)}}),va=f("$ZodExactOptional",(e,t)=>{cn.init(e,t),b(e,"values",r=>r.def.innerType._zod.values),b(e,"pattern",r=>r.def.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),ga=f("$ZodNullable",(e,t)=>{w.init(e,t),b(e,"optin",r=>r.def.innerType._zod.optin),b(e,"optout",r=>r.def.innerType._zod.optout),b(e,"pattern",r=>{const n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${gt(n.source)}|null)$`):void 0}),b(e,"values",r=>r.def.innerType._zod.values?new Set([...r.def.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),_a=f("$ZodDefault",(e,t)=>{w.init(e,t),e._zod.optin="defaulted",b(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>ar(i,t)):ar(o,t)}});function ar(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var ya=f("$ZodPrefault",(e,t)=>{w.init(e,t),e._zod.optin="defaulted",b(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),ba=f("$ZodNonOptional",(e,t)=>{w.init(e,t),b(e,"values",r=>{const n=r.def.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,n)=>{const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>cr(i,e)):cr(o,e)}});function cr(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 ur(e,t,r,n){return t.issues.length?(e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(o=>B(o,n,U()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var wa=f("$ZodCatch",(e,t)=>{w.init(e,t),b(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),b(e,"optout",r=>r.def.innerType._zod.optout),b(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(i=>ur(r,i,t,n)):ur(r,o,t,n)}}),un=f("$ZodPipe",(e,t)=>{w.init(e,t),b(e,"values",r=>r.def.in._zod.values),b(e,"optin",r=>r.def.in._zod.optin),b(e,"optout",r=>r.def.out._zod.optout),b(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const i=t.out._zod.run(r,n);return i instanceof Promise?i.then(s=>_e(s,t.in,n)):_e(i,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>_e(i,t.out,n)):_e(o,t.out,n)}});function _e(e,t,r){return e.issues.some(n=>n.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}var $a=f("$ZodPreprocess",(e,t)=>{un.init(e,t)}),ka=f("$ZodReadonly",(e,t)=>{w.init(e,t),b(e,"propValues",r=>r.def.innerType._zod.propValues),b(e,"values",r=>r.def.innerType._zod.values),b(e,"optin",r=>r.def.innerType?._zod?.optin),b(e,"optout",r=>r.def.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(lr):lr(o)}});function lr(e){return e.memo||(e.value=Object.freeze(e.value)),e}var za=f("$ZodLazy",(e,t)=>{w.init(e,t),Zo(e._zod,"innerType",()=>{const r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),b(e,"pattern",r=>r.innerType?._zod?.pattern),b(e,"propValues",r=>r.innerType?._zod?.propValues),b(e,"optin",r=>r.innerType?._zod?.optin??void 0),b(e,"optout",r=>r.innerType?._zod?.optout??void 0),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),Oa=f("$ZodCustom",(e,t)=>{I.init(e,t),w.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>fr(i,r,n,e));fr(o,r,n,e)}});function fr(e,t,r,n){if(!e){const o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(he(o))}}var Sa=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},nt="~memo",dr=[];function ln(e){return e!==null&&typeof e=="object"}function Be(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}var fn=new WeakMap,ce=0,$e=1,fe=2;function ke(e,t,r){const n=fn.get(e);if(n!==void 0)return n?fe:ce;if(t.has(e))return fe;t.add(e);let o=ce;const i=u=>{if(o!==fe&&u?._zod){const l=ke(u,t,r);l>o&&(o=l)}},s=(u,l)=>{let d=ce;for(const h of Reflect.ownKeys(u)){const p=Object.getOwnPropertyDescriptor(u,h);if(l&&!p.enumerable)continue;const m=p.get?$e:p.value?._zod?ke(p.value,t,r):ce;m>d&&(d=m)}return d},a=u=>{u>o&&(o=u)},c=e._zod.def;switch(c.type){case"object":{const u=_t(c);a(u?s(u,!0):$e),i(c.catchall);break}case"array":i(c.element);break;case"tuple":for(const u of c.items)i(u);i(c.rest);break;case"record":case"map":i(c.keyType),i(c.valueType);break;case"set":i(c.valueType);break;case"union":for(const u of c.options)i(u);break;case"intersection":i(c.left),i(c.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":i(c.innerType);break;case"pipe":i(c.in),i(c.out);break;case"function":i(c.input),i(c.output);break;case"lazy":{const u=c._cachedInner??(r?e._zod.innerType:void 0);a(u?ke(u,t,!1):$e);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const u in c){const l=Object.getOwnPropertyDescriptor(c,u);if(!l||l.get)continue;const d=l.value;if(!(!d||typeof d!="object")){if(d._zod)i(d);else if(Array.isArray(d))for(const h of d)i(h)}}}return t.delete(e),Pa(e,o)}function Pa(e,t){return t!==$e&&fn.set(e,t===fe),t}function Ea(e,t){let r=e.buckets.get(t);return r||(r=new WeakMap,e.buckets.set(t,r)),r}var ye,be=[],Aa={alloc(e,t,r){const n=ye;if(!n)return r;ye=void 0;const o={value:r,issues:null};return n.set(t.value,o),be.push(o),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const r=e._zod.parse,n=(o,i)=>{if(i.direction!=="backward"&&Ia(i,o.value))throw new Sa;return r(o,i)};e._zod.parse=n,e._zod.run===r&&(e._zod.run=n)})},attach(e){var t;let r,n=!1,o,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const s=e._zod.parse,a=(c,u)=>{if(r===void 0){const y=ke(e,new Set,!1);if(y===ce)return e._zod.parse=s,e._zod.run===a&&(e._zod.run=s),s(c,u);y===fe||n?r=!0:n=!0}const l=c.value;if(!ln(l))return s(c,u);let d=u[nt];d||(d={buckets:new WeakMap,backEdges:void 0},u[nt]=d);let h;o===u?h=i:(h=Ea(d,e),o=u,i=h);const p=h.get(l);if(p)return c.value=p.value,p.issues?p.issues.length&&c.issues.push(...Be(p.issues)):(c.memo=!0,d.backEdges??(d.backEdges=new WeakSet),d.backEdges.add(p.value)),c;ye=h;const m=be.length,g=s(c,u);ye=void 0;const _=be.length>m?be.pop():void 0;return g instanceof Promise?g.then(y=>(_&&(_.issues=y.issues.length?Be(y.issues):dr),y)):(_&&(_.issues=g.issues.length?Be(g.issues):dr),g)};e._zod.parse=a,e._zod.run===s&&(e._zod.run=a)})}};function Ta(){return Aa}function Ia(e,t){const r=e[nt]?.backEdges;return r!==void 0&&ln(t)&&r.has(t)}var Za=()=>{const 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(i){return e[i]??null}const r={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",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};function o(i,s){return i==="number"&&typeof s=="number"&&!Number.isFinite(s)?String(s):n[i]??i}return i=>{switch(i.code){case"invalid_type":return`Invalid input: expected ${o(i.expected)}, received ${o(Ho(i.input),i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${Mr(i.values[0])}`:`Invalid option: expected one of ${Wt(i.values,"|")}`;case"too_big":{const s=i.exact?"exactly ":i.inclusive?"<=":"<",a=t(i.origin);return a?`Too big: expected ${i.origin??"value"} to have ${s}${i.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${s}${i.maximum.toString()}`}case"too_small":{const s=i.exact?"exactly ":i.inclusive?">=":">",a=t(i.origin);return a?`Too small: expected ${i.origin} to have ${s}${i.minimum.toString()} ${a.unit}`:`Too small: expected ${i.origin} to be ${s}${i.minimum.toString()}`}case"invalid_format":{const s=i;return s.format==="starts_with"?`Invalid string: must start with "${s.prefix}"`:s.format==="ends_with"?`Invalid string: must end with "${s.suffix}"`:s.format==="includes"?`Invalid string: must include "${s.includes}"`:s.format==="regex"?`Invalid string: must match pattern ${s.pattern}`:`Invalid ${r[s.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${Wt(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`Invalid discriminator value. Expected ${i.options.map(s=>`'${s}'`).join(" | ")}`:i.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function Ra(){return{localeError:Za()}}var pr,Na=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const r=t[0];return this._map.set(e,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const r={...this.get(t)??{}};delete r.id;const n={...r,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Ca(){return new Na}(pr=globalThis).__zod_globalRegistry??(pr.__zod_globalRegistry=Ca());var ue=globalThis.__zod_globalRegistry;function At(e){return e.checks&&(e.checks=[...e.checks]),e}function ja(e,t){return new e(At({type:"string",...v(t)}))}function dn(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...v(t)})}function xa(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...v(t)})}function pn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...v(t)})}function Ua(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...v(t)})}function Da(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...v(t)})}function La(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...v(t)})}function hn(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...v(t)})}function Ma(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...v(t)})}function Fa(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...v(t)})}function Ja(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...v(t)})}function Wa(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...v(t)})}function Ba(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...v(t)})}function Va(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...v(t)})}function Ka(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...v(t)})}function Ha(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...v(t)})}function qa(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...v(t)})}function Ga(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...v(t)})}function Xa(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...v(t)})}function mn(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...v(t)})}function Ya(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...v(t)})}function Qa(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...v(t)})}function ec(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...v(t)})}function vn(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...v(t)})}function gn(e,t){return new e({type:"string",format:"date",check:"string_format",...v(t)})}function tc(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...v(t)})}function rc(e,t){return new e({type:"string",format:"duration",check:"string_format",...v(t)})}function nc(e,t){return new e(At({type:"number",checks:[],...v(t)}))}function af(e,t){return new e(At({type:"number",coerce:!0,checks:[],...v(t)}))}function oc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...v(t)})}function ic(e,t){return new e({type:"boolean",...v(t)})}function sc(e,t){return new e({type:"undefined",...v(t)})}function ac(e,t){return new e({type:"null",...v(t)})}function cc(e){return new e({type:"any"})}function uc(e){return new e({type:"unknown"})}function lc(e,t){return new e({type:"never",...v(t)})}function hr(e,t){return new qr({check:"less_than",...v(t),value:e,inclusive:!1})}function Ve(e,t){return new qr({check:"less_than",...v(t),value:e,inclusive:!0})}function mr(e,t){return new Gr({check:"greater_than",...v(t),value:e,inclusive:!1})}function Ke(e,t){return new Gr({check:"greater_than",...v(t),value:e,inclusive:!0})}function vr(e,t){return new ts({check:"multiple_of",...v(t),value:e})}function _n(e,t){return new ns({check:"max_length",...v(t),maximum:e})}function Se(e,t){return new os({check:"min_length",...v(t),minimum:e})}function yn(e,t){return new is({check:"length_equals",...v(t),length:e})}function fc(e,t){return new ss({check:"string_format",format:"regex",...v(t),pattern:e})}function dc(e){return new as({check:"string_format",format:"lowercase",...v(e)})}function pc(e){return new cs({check:"string_format",format:"uppercase",...v(e)})}function hc(e,t){return new us({check:"string_format",format:"includes",...v(t),includes:e})}function mc(e,t){return new ls({check:"string_format",format:"starts_with",...v(t),prefix:e})}function vc(e,t){return new fs({check:"string_format",format:"ends_with",...v(t),suffix:e})}function gc(e,t){return new ds({check:"properties",shape:e,...v(t)})}function oe(e){return new ps({check:"overwrite",tx:e})}function _c(e){return oe(t=>t.normalize(e))}function yc(){return oe(e=>e.trim())}function bc(){return oe(e=>e.toLowerCase())}function wc(){return oe(e=>e.toUpperCase())}function $c(){return oe(e=>Co(e))}function kc(e,t,r){return new e({type:"array",element:t,...v(r)})}function zc(e,t,r){const n=v(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function Oc(e,t,r){return new e({type:"custom",check:"custom",fn:t,...v(r)})}function Sc(e,t){const r=Pc(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(he(o,n.value,r._zod.def));else{const i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=n.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),n.issues.push(he(i))}},e(n.value,n)),t);return r}function Pc(e,t){const r=new I({check:"custom",...v(t)});return r._zod.check=e,r}function de(e,...t){for(const r of t)for(const n of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,n)&&D(e,n,r[n]);return e}function Pe(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??ue,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function A(e,t,r,n,o){const i=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:n.path,message:o}):t.unrepresentable;if(i==="any")return!1;if(i===void 0||i==="throw")throw new Error(o);return Object.assign(r,i),!0}function k(e,t,r={path:[],schemaPath:[]}){var n;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;const s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;const a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{const u={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,u);else{const d=s.schema,h=t.processors[o.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);h(e,t,d,u)}const l=e._zod.parent;l&&(s.ref||(s.ref=l),k(l,t,u),t.seen.get(l).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&de(s.schema,c),t.io==="input"&&T(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function gr(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Ee(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const n=new Map;for(const s of e.seen.entries()){const a=e.metadataRegistry.get(s[0])?.id;if(a){const c=n.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.`);n.set(a,s[0])}}const o=s=>{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(s[0])?.id,h=e.external.uri??(m=>m);if(d)return{ref:h(d)};const p=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=p,{defId:p,ref:`${h("__shared")}#/${a}/${gr(p)}`}}const c="#",u=`${c}/${a}/`;if(s[1]===r&&!s[1].schema.id)return{ref:c};const l=s[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+gr(l)}},i=s=>{if(s[1].schema.$ref)return;const a=s[1],{ref:c,defId:u}=o(s);a.def={...a.schema},u&&(a.defId=u);const l=a.schema;for(const d in l)delete l[d];l.$ref=c};if(e.cycles==="throw")for(const s of e.seen.entries()){const a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
|
|
56
56
|
|
|
57
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const a=s[1];if(t===s[0]){i(s);continue}if(e.external){const c=e.external.registry.get(s[0])?.id;if(t!==s[0]&&c){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}a.count>1&&e.reused==="ref"&&i(s)}e.external&&(e.sharedDefsExtractedFor=e.external)}function bn(e){const t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;const r=[];for(const n of t){if(!n||typeof n!="object")return;bn(n);const o=Object.keys(n);if(o.length!==1||o[0]!=="type")return;const i=n.type;for(const s of Array.isArray(i)?i:[i]){if(typeof s!="string")return;r.includes(s)||r.push(s)}}delete e.anyOf,e.type=r.length===1?r[0]:r}var wn=new Set(["type","properties","required","additionalProperties"]),_r=["oneOf","anyOf"];function yr(e){const t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function ot(e){const t=[];for(const i of e){if(typeof i!="object"||i.type!=="object")return null;for(const s in i)if(!wn.has(s))return null;t.push(i)}const r={},n=new Set;for(const i of t){for(const s in i.properties){if(Object.prototype.hasOwnProperty.call(r,s))continue;const a=[];for(const u of t){const l=u.properties?.[s]??yr(u);l!=null&&(a.some(d=>JSON.stringify(d)===JSON.stringify(l))||a.push(l))}const c=a.length===1?a[0]:ot(a)??{allOf:a};D(r,s,c)}for(const s of i.required??[])n.add(s)}const o={type:"object",properties:r};if(n.size&&(o.required=[...n]),t.every(i=>i.additionalProperties===!1))o.additionalProperties=!1;else{const i=[];for(const s of t){const a=yr(s);a&&!i.some(c=>JSON.stringify(c)===JSON.stringify(a))&&i.push(a)}i.length===1?o.additionalProperties=i[0]:i.length>1&&(o.additionalProperties={allOf:i})}return o}function Ec(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const o of wn)if(o in e)return;const r=t.filter(o=>_r.some(i=>Array.isArray(o[i])));let n=null;if(!r.length)n=ot(t);else{const o=r[0],i=_r.find(c=>Array.isArray(o[c]));if(Object.keys(o).length!==1)return;const s=t.filter(c=>c!==o),a=o[i].map(c=>ot([...s,c]));if(a.some(c=>!c))return;n={[i]:a}}n&&(delete e.allOf,de(e,n))}function Ae(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=a=>{const c=e.seen.get(a);if(c.ref===null)return;const u=c.def??c.schema,l={...u},d=c.ref;if(c.ref=null,d){n(d);const p=e.seen.get(d),m=p.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(m)):de(u,m),de(u,l),a._zod.parent===d)for(const g in u)g==="$ref"||g==="allOf"||g in l||delete u[g];if(m.$ref&&p.def)for(const g in u)g==="$ref"||g==="allOf"||g in p.def&&JSON.stringify(u[g])===JSON.stringify(p.def[g])&&delete u[g]}const h=a._zod.parent;if(h&&h!==d){n(h);const p=e.seen.get(h);if(p?.schema.$ref&&(u.$ref=p.schema.$ref,p.def))for(const m in u)m==="$ref"||m==="allOf"||m in p.def&&JSON.stringify(u[m])===JSON.stringify(p.def[m])&&delete u[m]}e.override({zodSchema:a,jsonSchema:u,path:c.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const a of[...e.seen.entries()].reverse())n(a[0]);if(e.target!=="openapi-3.0")for(const a of e.seen.entries())bn(a[1].def??a[1].schema);for(const a of e.deferred)a();if(e.intersections.length){const a=new Map;for(const c of e.seen.values())for(const u of[c.schema,c.def]){const l=u?.allOf;if(!Array.isArray(l))continue;const d=a.get(l);d?d.push(u):a.set(l,[u])}for(const c of e.intersections)for(const u of a.get(c)??[])Ec(u)}}const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(a)}de(o,r.defId?r.schema:r.def??r.schema);const i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;const s=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const a of e.seen.entries()){const c=a[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,D(s,c.defId,c.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{const a=JSON.parse(JSON.stringify(o));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:Te(t,"input",e.processors),output:Te(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function T(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return T(n.element,r);if(n.type==="set")return T(n.valueType,r);if(n.type==="lazy")return T(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault"||n.type==="catch")return T(n.innerType,r);if(n.type==="intersection")return T(n.left,r)||T(n.right,r);if(n.type==="record"||n.type==="map")return T(n.keyType,r)||T(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:T(n.in,r)||T(n.out,r);if(n.type==="object"){for(const o in n.shape)if(T(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(const o of n.options)if(T(o,r))return!0;return!1}if(n.type==="tuple"){for(const o of n.items)if(T(o,r))return!0;return!!(n.rest&&T(n.rest,r))}return!1}var Ac=(e,t={})=>r=>{const n=Pe({...r,processors:t});return k(e,n),Ee(n,e),Ae(n,e)},Te=(e,t,r={})=>n=>{const{libraryOptions:o,target:i}=n??{},s=Pe({...o??{},target:i,io:t,processors:r});return k(e,s),Ee(s,e),Ae(s,e)},ee=(e,t,r)=>{(e[t]===void 0||r>e[t])&&(e[t]=r)},te=(e,t,r)=>{(e[t]===void 0||r<e[t])&&(e[t]=r)},br=(e,t)=>{ee(e,"minimum",t),te(e,"maximum",t)},$n=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},kn=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},zn=(e,t)=>{e.mime=e.mime?e.mime.filter(r=>t.includes(r)):[...t]},On=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},wr=(e,t)=>ee(e,"minimum",t.minimum),$r=(e,t)=>te(e,"maximum",t.maximum),kr=e=>(t,r)=>{On(t,r.format);const[n,o]=e[r.format];ee(t,"minimum",n),te(t,"maximum",o)},Tc={greater_than:(e,t)=>ee(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>te(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>$n(e,t.value),number_format:kr(Fr),bigint_format:kr(Do),min_length:wr,max_length:$r,length_equals:(e,t)=>br(e,t.length),min_size:wr,max_size:$r,size_equals:(e,t)=>br(e,t.size),string_format:(e,t)=>{On(e,t.format),t.pattern&&kn(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>zn(e,t.mime)};function R(e){const t={},r=e._zod.def,n=e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[];for(const i of n)Tc[i._zod.def.check]?.(t,i._zod.def);const o=e._zod.bag;o.minimum!==void 0&&ee(t,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&ee(t,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&te(t,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&te(t,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&$n(t,o.multipleOf),o.format!==void 0&&(t.format??(t.format=o.format),o.format.includes("int")&&(t.isInt=!0)),o.mime&&zn(t,o.mime);for(const i of o.patterns??[])kn(t,i);return t}var Ic={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Zc=new Map([[rn,Li],[Et,Mi]]),Sn=e=>Zc.get(e)??e,Pn=(e,t,r,n)=>{const o=r;o.type="string";const{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:u,laxFormat:l}=R(e);if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),a&&(o.format=Ic[a]??a,o.format===""&&delete o.format,(a==="time"||l)&&delete o.format),u&&(o.contentEncoding=u),c&&c.size>0){const d=[...c].map(Sn);d.length===1?o.pattern=d[0].source:d.length>1&&(o.allOf=[...d.map(h=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:h.source}))])}},En=(e,t,r,n)=>{const o=r,{minimum:i,maximum:s,multipleOf:a,exclusiveMaximum:c,exclusiveMinimum:u,isInt:l}=R(e);o.type=l?"integer":"number";const d=typeof u=="number"&&u>=(i??Number.NEGATIVE_INFINITY),h=typeof c=="number"&&c<=(s??Number.POSITIVE_INFINITY),p=t.target==="draft-04"||t.target==="openapi-3.0";if(d?p?(o.minimum=u,o.exclusiveMinimum=!0):o.exclusiveMinimum=u:typeof i=="number"&&(o.minimum=i),h?p?(o.maximum=c,o.exclusiveMaximum=!0):o.exclusiveMaximum=c:typeof s=="number"&&(o.maximum=s),a){const m=new Set;for(const y of a)Number.isFinite(y)&&y!==0?m.add(Math.abs(y)):A(e,t,o,n,`A multipleOf divisor of ${y} cannot be represented in JSON Schema`);const[g,..._]=m;g!==void 0&&(o.multipleOf=g),_.length&&(o.allOf=[...o.allOf??[],..._.map(y=>({multipleOf:y}))])}},An=(e,t,r,n)=>{r.type="boolean"},Rc=(e,t,r,n)=>{A(e,t,r,n,"BigInt cannot be represented in JSON Schema")},Nc=(e,t,r,n)=>{A(e,t,r,n,"Symbols cannot be represented in JSON Schema")},Tn=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},In=(e,t,r,n)=>{A(e,t,r,n,"Undefined cannot be represented in JSON Schema")},Cc=(e,t,r,n)=>{A(e,t,r,n,"Void cannot be represented in JSON Schema")},Zn=(e,t,r,n)=>{r.not={}},Rn=(e,t,r,n)=>{},Nn=(e,t,r,n)=>{},jc=(e,t,r,n)=>{A(e,t,r,n,"Date cannot be represented in JSON Schema")},Cn=(e,t,r,n)=>{const o=e._zod.def,i=Ye(o.entries);if(i.length===0){r.not={};return}i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},jn=(e,t,r,n)=>{const o=e._zod.def;if(o.values.length===0){r.not={};return}const i=[];for(const s of o.values)if(s===void 0){if(A(e,t,r,n,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof s=="bigint"){if(A(e,t,r,n,"BigInt literals cannot be represented in JSON Schema"))return;i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){const s=i[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),i.every(s=>typeof s=="boolean")&&(r.type="boolean"),i.every(s=>s===null)&&(r.type="null"),r.enum=i},xc=(e,t,r,n)=>{A(e,t,r,n,"NaN cannot be represented in JSON Schema")},Uc=(e,t,r,n)=>{const o=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=i.source},Dc=(e,t,r,n)=>{const o=r;o.type="string",o.format="binary",o.contentEncoding="binary";const{minimum:i,maximum:s,mime:a}=R(e);i!==void 0&&(o.minLength=i),s!==void 0&&(o.maxLength=s),a&&(a.length===0?o.not={}:a.length===1?o.contentMediaType=a[0]:o.anyOf=a.map(c=>({contentMediaType:c})))},Lc=(e,t,r,n)=>{r.type="boolean"},xn=(e,t,r,n)=>{A(e,t,r,n,"Custom types cannot be represented in JSON Schema")},Mc=(e,t,r,n)=>{A(e,t,r,n,"Function types cannot be represented in JSON Schema")},Un=(e,t,r,n)=>{A(e,t,r,n,"Transforms cannot be represented in JSON Schema")},Fc=(e,t,r,n)=>{A(e,t,r,n,"Map cannot be represented in JSON Schema")},Jc=(e,t,r,n)=>{A(e,t,r,n,"Set cannot be represented in JSON Schema")},Dn=(e,t,r,n)=>{const o=r,i=e._zod.def,{minimum:s,maximum:a}=R(e);typeof s=="number"&&(o.minItems=s),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=k(i.element,t,{...n,path:[...n.path,"items"]})};function me(e){const t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?me(t.out):t.type==="catch"?me(t.innerType):e._zod.optin}var Ln=(e,t,r,n)=>{const o=r,i=e._zod.def,s=i.shape;if(Object.getOwnPropertySymbols(s).length&&A(e,t,o,n,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(const c in s)D(o.properties,c,k(s[c],t,{...n,path:[...n.path,"properties",c]}));const a=[];for(const c of Object.keys(s)){const u=i.shape[c];(t.io==="input"?me(u)===void 0:u._zod.optout===void 0)&&a.push(c)}a.length>0&&(o.required=a),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=k(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},Mn=(e,t,r,n)=>{const o=e._zod.def,i=o.inclusive===!1,s=o.options.map((a,c)=>k(a,t,{...n,path:[...n.path,i?"oneOf":"anyOf",c]}));i?r.oneOf=s:r.anyOf=s},Fn=(e,t,r,n)=>{const o=e._zod.def,i=k(o.left,t,{...n,path:[...n.path,"allOf",0]}),s=k(o.right,t,{...n,path:[...n.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];r.allOf=c,t.intersections.push(c)},Jn=(e,t,r,n)=>{const o=r,i=e._zod.def;o.type="array";const 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((g,_)=>k(g,t,{...n,path:[...n.path,s,_]})),u=i.rest?k(i.rest,t,{...n,path:[...n.path,a,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;let l=i.items.length;for(;l>0;){const g=i.items[l-1];if(!(t.io==="input"?me(g)!==void 0:g._zod.optout==="optional"))break;l--}const d=i.items.length,h=!i.rest;t.target==="draft-2020-12"?(o.prefixItems=c,h?o.items=!1:u&&(o.items=u),l>0&&(o.minItems=l),h&&(o.maxItems=d)):t.target==="openapi-3.0"?(o.items={anyOf:c},u&&o.items.anyOf.push(u),l>0&&(o.minItems=l),h&&(o.maxItems=d)):(o.items=c,h?o.additionalItems=!1:u&&(o.additionalItems=u),l>0&&(o.minItems=l),h&&(o.maxItems=d));const{minimum:p,maximum:m}=R(e);typeof p=="number"&&(o.minItems=p),typeof m=="number"&&(o.maxItems=m)};function it(e,t,r){if(t.$ref){if(r.has(t))return t;r.add(t);const m=e.get(t)?.def;if(!m)return t;const g=it(e,m,r);return g===m?t:g}for(const m of["anyOf","oneOf"]){const g=t[m];if(!Array.isArray(g))continue;const _=g.map(y=>it(e,y,r));_.some((y,E)=>y!==g[E])&&(t={...t,[m]:_})}const n=Array.isArray(t.type)?t.type:[t.type],o=!n.includes("string")&&n.some(m=>m==="number"||m==="integer"),i=t.enum??(t.const!==void 0?[t.const]:void 0);if(!o&&!i?.some(m=>typeof m=="number"))return t;const{minimum:s,maximum:a,exclusiveMinimum:c,exclusiveMaximum:u,multipleOf:l,format:d,id:h,...p}=t;return p.enum?p.enum=p.enum.map(m=>typeof m=="number"?String(m):m):typeof p.const=="number"&&(p.const=String(p.const)),o&&(p.type="string",i||(p.pattern=(n.includes("number")?Ot:qi).source)),p}var st=new WeakMap;function Wc(e){const t=new Map;for(const n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);const r=new Map;for(const n of st.get(e)??[]){const o=e.seen.get(n),i=(o?.def??o?.schema)?.propertyNames;if(!i||i===!0||r.has(i))continue;const s=it(t,i,new Set);s!==i&&r.set(i,s)}if(r.size)for(const n of e.seen.values())for(const o of[n.schema,n.def]){const i=o&&r.get(o.propertyNames);i&&(o.propertyNames=i)}}var Wn=(e,t,r,n)=>{const o=r,i=e._zod.def;o.type="object";const s=i.keyType,a=R(s).patterns;if(i.mode==="loose"&&a&&a.size>0){const l=k(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});o.patternProperties={};for(const d of a)D(o.patternProperties,Sn(d).source,l)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){o.propertyNames=k(i.keyType,t,{...n,path:[...n.path,"propertyNames"]});let l=st.get(t);l||(l=[],st.set(t,l),t.deferred.push(()=>Wc(t))),l.push(e)}o.additionalProperties=k(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]})}const c=s._zod.values,u=t.io==="input"&&me(i.valueType)!==void 0;if(c&&!i.partial&&!u){const l=[...c].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(o.required=l.map(String))}},Bn=(e,t,r,n)=>{const o=e._zod.def,i=k(o.innerType,t,n),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},Vn=(e,t,r,n)=>{const o=e._zod.def;k(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},Tt=Symbol();function Kn(e,t,r,n,o){let i=!1;const s=JSON.stringify(e,(a,c)=>typeof c!="bigint"?c:(i=!0,null));return i?(A(t,r,n,o,"BigInt defaults cannot be represented in JSON Schema"),Tt):JSON.parse(s)}var Hn=(e,t,r,n)=>{const o=e._zod.def;k(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType;const s=Kn(o.defaultValue,e,t,r,n);s!==Tt&&(r.default=s)},qn=(e,t,r,n)=>{const o=e._zod.def;k(o.innerType,t,n);const i=t.seen.get(e);if(i.ref=o.innerType,t.io!=="input")return;const s=Kn(o.defaultValue,e,t,r,n);s!==Tt&&(r._prefault=s)},Gn=(e,t,r,n)=>{const o=e._zod.def;k(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{A(e,t,r,n,"Dynamic catch values are not supported in JSON Schema");return}r.default=s},Xn=(e,t,r,n)=>{const o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?o.out:o.in:o.out;k(s,t,n);const a=t.seen.get(e);a.ref=s},Yn=(e,t,r,n)=>{const o=e._zod.def;k(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType,r.readOnly=!0},Bc=(e,t,r,n)=>{const o=e._zod.def;k(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},It=(e,t,r,n)=>{const o=e._zod.def;k(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},Qn=(e,t,r,n)=>{const o=e._zod.innerType;k(o,t,n);const i=t.seen.get(e);i.ref=o},zr={string:Pn,number:En,boolean:An,bigint:Rc,symbol:Nc,null:Tn,undefined:In,void:Cc,never:Zn,any:Rn,unknown:Nn,date:jc,enum:Cn,literal:jn,nan:xc,template_literal:Uc,file:Dc,success:Lc,custom:xn,function:Mc,transform:Un,map:Fc,set:Jc,array:Dn,object:Ln,union:Mn,intersection:Fn,tuple:Jn,record:Wn,nullable:Bn,nonoptional:Vn,default:Hn,prefault:qn,catch:Gn,pipe:Xn,readonly:Yn,promise:Bc,optional:It,lazy:Qn};function cf(e,t){if("_idmap"in e){const n=e,o=Pe({...t,processors:zr}),i={};for(const a of n._idmap.entries()){const[c,u]=a;k(u,o)}const s={};o.external={registry:n,uri:t?.uri,defs:i};for(const a of n._idmap.entries()){const[c,u]=a;Ee(o,u),D(s,c,Ae(o,u))}return Object.keys(i).length>0&&(s.__shared={[o.target==="draft-2020-12"?"$defs":"definitions"]:i}),{schemas:s}}const r=Pe({...t,processors:zr});return k(e,r),Ee(r,e),Ae(r,e)}var Or=new WeakSet([Object.prototype,Error.prototype]);function we(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){const n=r(this);return Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0})}})}var eo=(e,t)=>{si.init(e,t),e.name="ZodError";const r=Object.getPrototypeOf(e);Or.has(r)||(Or.add(r),we(r,"format",n=>o=>li(n,o)),we(r,"flatten",n=>o=>ui(n,o)),we(r,"addIssue",n=>o=>{n.issues.push(o),n.message=JSON.stringify(n.issues,Qe,2)}),we(r,"addIssues",n=>o=>{n.issues.push(...o),n.message=JSON.stringify(n.issues,Qe,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},uf=f("ZodError",eo),C=f("ZodError",eo,void 0,{Parent:Error}),Vc=$t(C),Kc=kt(C),Hc=xe(C),qc=zt(C),Gc=vi(C),Xc=gi(C),Yc=_i(C),Qc=yi(C),eu=bi(C),tu=wi(C),ru=$i(C),nu=ki(C);function ou(){N.localeError||U(Ra())}function ge(){N.memoizer||U({memoizer:Ta()})}var $=f("ZodType",(e,t)=>(ou(),w.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(Z(t,{checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return K(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(el(e,t))},superRefine(e,t){return this.check(tl(e,t))},overwrite(e){return this.check(oe(e))},optional(){return Pr(this)},exactOptional(){return Mu(this)},nullable(){return Er(this)},nullish(){return Pr(Er(this))},nonoptional(e){return Ku(this,e)},array(){return Zu(this)},or(e){return Ru([this,e])},and(e){return ju(this,e)},transform(e){return Ar(this,lo(e))},default(e){return Wu(this,e)},prefault(e){return Vu(this,e)},catch(e){return qu(this,e)},pipe(e){return Ar(this,e)},readonly(){return Yu(this)},describe(e){const t=this.clone();return ue.add(t,{description:e}),t},meta(...e){if(e.length===0)return ue.get(this);const t=this.clone();return ue.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return wt(this,"~standard",{...Yr(this),jsonSchema:{input:Te(this,"input"),output:Te(this,"output")}})},set"~standard"(e){V(this,"~standard",e)},parse:function e(t,r){return Vc(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await Kc(this,t,r,{callee:e})},safeParse(e,t){return Hc(this,e,t)},async safeParseAsync(e,t){return qc(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){V(this,"spa",e)},validate(e,t){return pi(this,e,t)},validateAsync(e,t){return mi(this,e,t)},encode:function e(t,r){return Gc(this,t,r,{callee:e})},decode:function e(t,r){return Xc(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await Yc(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await Qc(this,t,r,{callee:e})},safeEncode(e,t){return eu(this,e,t)},safeDecode(e,t){return tu(this,e,t)},async safeEncodeAsync(e,t){return ru(this,e,t)},async safeDecodeAsync(e,t){return nu(this,e,t)},toJSONSchema(e){return Ac(this,{})(e)},get description(){return ue.get(this)?.description},get _def(){return this._zod.def}}),to=f("_ZodString",(e,t)=>{Pt.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Pn(e,r,n,o)},Wr({format:e=>R(e).format??null,minLength:e=>R(e).minimum??null,maxLength:e=>R(e).maximum??null},{regex(...e){return this.check(fc(...e))},includes(...e){return this.check(hc(...e))},startsWith(...e){return this.check(mc(...e))},endsWith(...e){return this.check(vc(...e))},min(...e){return this.check(Se(...e))},max(...e){return this.check(_n(...e))},length(...e){return this.check(yn(...e))},nonempty(...e){return this.check(Se(1,...e))},lowercase(e){return this.check(dc(e))},uppercase(e){return this.check(pc(e))},trim(){return this.check(yc())},normalize(...e){return this.check(_c(...e))},toLowerCase(){return this.check(bc())},toUpperCase(){return this.check(wc())},slugify(){return this.check($c())}})),iu=f("ZodString",(e,t)=>{Pt.init(e,t),to.init(e,t)},{email(e){return this.check(dn(oo,e))},url(e){return this.check(hn(io,e))},jwt(e){return this.check(ec(ku,e))},emoji(e){return this.check(Ma(lu,e))},guid(e){return this.check(xa(uu,e))},uuid(e){return this.check(pn(le,e))},uuidv4(e){return this.check(Ua(le,e))},uuidv6(e){return this.check(Da(le,e))},uuidv7(e){return this.check(La(le,e))},nanoid(e){return this.check(Fa(fu,e))},cuid(e){return this.check(Ja(du,e))},cuid2(e){return this.check(Wa(pu,e))},ulid(e){return this.check(Ba(hu,e))},base64(e){return this.check(mn(so,e))},base64url(e){return this.check(Ya(wu,e))},xid(e){return this.check(Va(mu,e))},ksuid(e){return this.check(Ka(vu,e))},ipv4(e){return this.check(Ha(gu,e))},ipv6(e){return this.check(qa(_u,e))},cidrv4(e){return this.check(Ga(yu,e))},cidrv6(e){return this.check(Xa(bu,e))},e164(e){return this.check(Qa($u,e))},datetime(e){return this.check(vn(ro,e))},date(e){return this.check(gn(no,e))},time(e){return this.check(tc(au,e))},duration(e){return this.check(rc(cu,e))}});function su(e){return ja(iu,e)}var S=f("ZodStringFormat",(e,t)=>{O.init(e,t),to.init(e,t)}),ro=f("ZodISODateTime",(e,t)=>{Rs.init(e,t),S.init(e,t)}),no=f("ZodISODate",(e,t)=>{Ns.init(e,t),S.init(e,t)}),au=f("ZodISOTime",(e,t)=>{Cs.init(e,t),S.init(e,t)}),cu=f("ZodISODuration",(e,t)=>{js.init(e,t),S.init(e,t)}),oo=f("ZodEmail",(e,t)=>{ys.init(e,t),S.init(e,t)});function lf(e){return dn(oo,e)}var uu=f("ZodGUID",(e,t)=>{gs.init(e,t),S.init(e,t)}),le=f("ZodUUID",(e,t)=>{_s.init(e,t),S.init(e,t)});function ff(e){return pn(le,e)}var io=f("ZodURL",(e,t)=>{Os.init(e,t),S.init(e,t)});function df(e){return hn(io,e)}var lu=f("ZodEmoji",(e,t)=>{Ss.init(e,t),S.init(e,t)}),fu=f("ZodNanoID",(e,t)=>{Ps.init(e,t),S.init(e,t)}),du=f("ZodCUID",(e,t)=>{Es.init(e,t),S.init(e,t)}),pu=f("ZodCUID2",(e,t)=>{As.init(e,t),S.init(e,t)}),hu=f("ZodULID",(e,t)=>{Ts.init(e,t),S.init(e,t)}),mu=f("ZodXID",(e,t)=>{Is.init(e,t),S.init(e,t)}),vu=f("ZodKSUID",(e,t)=>{Zs.init(e,t),S.init(e,t)}),gu=f("ZodIPv4",(e,t)=>{xs.init(e,t),S.init(e,t)}),_u=f("ZodIPv6",(e,t)=>{Ds.init(e,t),S.init(e,t)}),yu=f("ZodCIDRv4",(e,t)=>{Ls.init(e,t),S.init(e,t)}),bu=f("ZodCIDRv6",(e,t)=>{Fs.init(e,t),S.init(e,t)}),so=f("ZodBase64",(e,t)=>{Js.init(e,t),S.init(e,t)});function pf(e){return mn(so,e)}var wu=f("ZodBase64URL",(e,t)=>{Bs.init(e,t),S.init(e,t)}),$u=f("ZodE164",(e,t)=>{Vs.init(e,t),S.init(e,t)}),ku=f("ZodJWT",(e,t)=>{Hs.init(e,t),S.init(e,t)}),ao=f("ZodNumber",(e,t)=>{nn.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>En(e,r,n,o),e.isFinite=!0},Wr({minValue:e=>{const{minimum:t,exclusiveMinimum:r}=R(e);return Math.max(t??Number.NEGATIVE_INFINITY,r??Number.NEGATIVE_INFINITY)},maxValue:e=>{const{maximum:t,exclusiveMaximum:r}=R(e);return Math.min(t??Number.POSITIVE_INFINITY,r??Number.POSITIVE_INFINITY)},isInt:e=>{const{isInt:t,multipleOf:r}=R(e);return!!t||!!r?.some(Number.isSafeInteger)},format:e=>R(e).format??null},{gt(e,t){return this.check(mr(e,t))},gte(e,t){return this.check(Ke(e,t))},min(e,t){return this.check(Ke(e,t))},lt(e,t){return this.check(hr(e,t))},lte(e,t){return this.check(Ve(e,t))},max(e,t){return this.check(Ve(e,t))},int(e){return this.check(Sr(e))},safe(e){return this.check(Sr(e))},positive(e){return this.check(mr(0,e))},nonnegative(e){return this.check(Ke(0,e))},negative(e){return this.check(hr(0,e))},nonpositive(e){return this.check(Ve(0,e))},multipleOf(e,t){return this.check(vr(e,t))},step(e,t){return this.check(vr(e,t))},finite(){return this}}));function hf(e){return nc(ao,e)}var zu=f("ZodNumberFormat",(e,t)=>{qs.init(e,t),ao.init(e,t)});function Sr(e){return oc(zu,e)}var Ou=f("ZodBoolean",(e,t)=>{Gs.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>An(e,r,n,o)});function mf(e){return ic(Ou,e)}var Su=f("ZodUndefined",(e,t)=>{Xs.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>In(e,r,n,o)});function vf(e){return sc(Su,e)}var Pu=f("ZodNull",(e,t)=>{Ys.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Tn(e,r,n,o)});function gf(e){return ac(Pu,e)}var Eu=f("ZodAny",(e,t)=>{Qs.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Rn(e,r,n,o)});function _f(){return cc(Eu)}var Au=f("ZodUnknown",(e,t)=>{ea.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Nn(e,r,n,o)});function at(){return uc(Au)}var Tu=f("ZodNever",(e,t)=>{ta.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Zn(e,r,n,o)});function co(e){return lc(Tu,e)}var Iu=f("ZodArray",(e,t)=>{ge(),oa.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Dn(e,r,n,o),e.element=t.element},{min(e,t){return this.check(Se(e,t))},nonempty(e){return this.check(Se(1,e))},max(e,t){return this.check(_n(e,t))},length(e,t){return this.check(yn(e,t))},unwrap(){return this.element}});function Zu(e,t){return kc(Iu,e,t)}var Zt=f("ZodObject",(e,t)=>{ge(),aa.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ln(e,r,n,o),Qo(e,"shape",r=>r._zod.def.shape,!1)},{keyof(){return Uu(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Z(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Z(this._zod.def,{catchall:at()}))},loose(){return this.clone(Z(this._zod.def,{catchall:at()}))},strict(){return this.clone(Z(this._zod.def,{catchall:co()}))},strip(){return this.clone(Z(this._zod.def,{catchall:void 0}))},extend(e){return Fo(this,e)},safeExtend(e){return Jo(this,e)},merge(e){return Wo(this,e)},pick(e){return Lo(this,e)},omit(e){return Mo(this,e)},partial(...e){return Vt(Rt,this,e[0])},exactPartial(...e){return Vt(fo,this,e[0],"exactPartial")},required(...e){return Bo(po,this,e[0])}});function yf(e,t){const r={type:"object",shape:e??{},...v(t)};return new Zt(r)}function bf(e,t){return new Zt({type:"object",shape:e,catchall:co(),...v(t)})}function wf(e,t){return new Zt({type:"object",shape:e,catchall:at(),...v(t)})}var uo=f("ZodUnion",(e,t)=>{an.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Mn(e,r,n,o),e.options=t.options});function Ru(e,t){return new uo({type:"union",options:e,...v(t)})}var Nu=f("ZodDiscriminatedUnion",(e,t)=>{uo.init(e,t),ua.init(e,t)});function $f(e,t,r){return new Nu({type:"union",options:t,discriminator:e,...v(r)})}var Cu=f("ZodIntersection",(e,t)=>{la.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Fn(e,r,n,o)});function ju(e,t){return new Cu({type:"intersection",left:e,right:t})}var xu=f("ZodTuple",(e,t)=>{ge(),fa.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Jn(e,r,n,o)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){const e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new Rt({type:"optional",innerType:t}))})}});function kf(e,t,r){const n=t instanceof w,o=n?r:t;return new xu({type:"tuple",items:e,rest:n?t:null,...v(o)})}var ct=f("ZodRecord",(e,t)=>{ge(),da.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Wn(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType});function zf(e,t,r){return!t||!t._zod?new ct({type:"record",keyType:su(),valueType:e,...v(t)}):new ct({type:"record",keyType:e,valueType:t,...v(r)})}function Of(e,t,r){return new ct({type:"record",keyType:e,valueType:t,...v(r),partial:!0})}var ut=f("ZodEnum",(e,t)=>{pa.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Cn(e,n,o,i),e.enum=t.entries,e.options=[...e._zod.values];const r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{const i={};for(const s of n)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new ut({...t,checks:[],...v(o),entries:i})},e.exclude=(n,o)=>{const i={...t.entries};for(const s of n)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new ut({...t,checks:[],...v(o),entries:i})}});function Uu(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new ut({type:"enum",entries:r,...v(t)})}var Du=f("ZodLiteral",(e,t)=>{ha.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>jn(e,r,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Sf(e,t){return new Du({type:"literal",values:Array.isArray(e)?e:[e],...v(t)})}var Lu=f("ZodTransform",(e,t)=>{ge(),ma.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Un(e,r,n,o),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Br(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(he(i,r.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),"input"in s||(s.input=r.value),s.inst??(s.inst=e),r.issues.push(he(s))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function lo(e){return new Lu({type:"transform",transform:e})}var Rt=f("ZodOptional",(e,t)=>{cn.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>It(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Pr(e){return new Rt({type:"optional",innerType:e})}var fo=f("ZodExactOptional",(e,t)=>{va.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>It(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Mu(e){return new fo({type:"optional",innerType:e})}var Fu=f("ZodNullable",(e,t)=>{ga.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Bn(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Er(e){return new Fu({type:"nullable",innerType:e})}var Ju=f("ZodDefault",(e,t)=>{_a.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Hn(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Wu(e,t){return new Ju({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Lr(t)}})}var Bu=f("ZodPrefault",(e,t)=>{ya.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>qn(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Vu(e,t){return new Bu({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Lr(t)}})}var po=f("ZodNonOptional",(e,t)=>{ba.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Vn(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Ku(e,t){return new po({type:"nonoptional",innerType:e,...v(t)})}var Hu=f("ZodCatch",(e,t)=>{wa.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Gn(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function qu(e,t){return new Hu({type:"catch",innerType:e,catchValue:typeof t=="function"?t:ti(t)})}var ho=f("ZodPipe",(e,t)=>{un.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Xn(e,r,n,o),e.in=t.in,e.out=t.out});function Ar(e,t){return new ho({type:"pipe",in:e,out:t})}var Gu=f("ZodPreprocess",(e,t)=>{ho.init(e,t),$a.init(e,t)}),Xu=f("ZodReadonly",(e,t)=>{ka.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Yn(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Yu(e){return new Xu({type:"readonly",innerType:e})}var Qu=f("ZodLazy",(e,t)=>{za.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Qn(e,r,n,o),e.unwrap=()=>e._zod.def.getter()});function Pf(e){return new Qu({type:"lazy",getter:e})}var Nt=f("ZodCustom",(e,t)=>{Oa.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>xn(e,r,n,o)});function Ef(e,t){return zc(Nt,e??(()=>!0),t)}function el(e,t={}){return Oc(Nt,e,t)}function tl(e,t){return Sc(e,t)}var rl=f("ZodInstanceOf",(e,t)=>{Nt.init(e,t)},{properties(e,t){return this.check(gc(e,t))}});function Af(e,t={}){const r=new rl({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...v(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}function Tf(e,t){return new Gu({type:"pipe",in:lo(e),out:t})}function If(e){return vn(ro,e)}function Zf(e){return gn(no,e)}var nl="io.modelcontextprotocol/skills";function Tr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ol(e){const t=e?.extensions;if(!Tr(t)||!Object.prototype.hasOwnProperty.call(t,"io.modelcontextprotocol/skills"))return;const r=t[nl];return Tr(r)?r:void 0}function Rf(e){return ol(e)!==void 0}var il="io.modelcontextprotocol/ui",sl="text/html;profile=mcp-app";function Ie(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function al(e,t){if(!e&&!t)return;if(!e)return{...t};if(!t)return{...e};const r={...e};for(const n of Object.keys(t)){const o=r[n],i=t[n];Ie(o)&&Ie(i)?r[n]={...o,...i}:r[n]=i}return r}function Nf(){return{extensions:{[il]:{mimeTypes:[sl]}}}}function Cf(e){return{...e??{}}}function jf(e,t){const r=e,n=t,o={...e??{},...t??{}};if(n&&Object.prototype.hasOwnProperty.call(n,"extensions")){const i=n.extensions;i===void 0?o.extensions=r?.extensions:Ie(i)?Object.keys(i).length===0?o.extensions={}:Ie(r?.extensions)?o.extensions=al(r.extensions,i):o.extensions={...i}:o.extensions=i}return o}function xf(){return"10.15.1"}var lt="[A-Za-z0-9!#$%&'*+.^_`|~-]+";function cl(e){const t={},r=new RegExp(`(${lt})\\s*=\\s*(?:"((?:\\\\.|[^"\\\\])*)"|([^,\\s]+))`,"g");for(let n=r.exec(e);n;n=r.exec(e)){const o=n[2];t[n[1].toLowerCase()]=o!==void 0?o.replace(/\\([\s\S])/g,"$1"):n[3]??""}return t}function Uf(e){return Ct(e)[0]??{}}function Df(e){if(!e)return;const t=e.split(/\s+/).map(r=>r.trim()).filter(Boolean);return t.length>0?Array.from(new Set(t)):void 0}function Lf(e,t){const r=[],n=new Set;for(const o of[...e??[],...t??[]]){const i=o?.trim();!i||n.has(i)||(n.add(i),r.push(i))}return r}function Ct(e){if(!e)return[];const t=[];let r="",n=!1;for(let a=0;a<e.length;a++){const c=e[a];n&&c==="\\"&&a+1<e.length?(r+=c+e[a+1],a++):c==='"'?(n=!n,r+=c):c===","&&!n?(t.push(r),r=""):r+=c}t.push(r);const o=[],i=new RegExp(`^(${lt})\\s+(?!\\s*=)(.+)$`,"s"),s=new RegExp(`^(${lt})$`);for(const a of t){const c=a.trim();if(!c)continue;const u=i.exec(c),l=u?null:s.exec(c);u?o.push({scheme:u[1].toLowerCase(),params:[u[2]]}):l?o.push({scheme:l[1].toLowerCase(),params:[]}):o.length>0&&o[o.length-1].params.push(c)}return o.filter(a=>a.scheme==="bearer").map(a=>cl(a.params.join(", ")))}function ul(e){return Ct(e).length>0}var Mf=class extends Error{status;constructor(e,t){super(e),this.name="UnexpectedProbeStatusError",this.status=t}},mo="MCP server returned HTTP ";function Ff(e){return e.startsWith(mo)}function ll(e){if(e.status===401)return{kind:"challenged",specCompliant:!0};if(e.status===200)return{kind:"anonymous_allowed"};if(e.status===403&&ul(e.wwwAuthenticateHeader))return{kind:"challenged",specCompliant:!1};const t=e.serverMessage||e.statusText,r=`${mo}${e.status}${t?` ${t}`:""}`;return e.status===403?e.wwwAuthenticateHeader?.trim()?{kind:"unexpected",message:`${r}, and its WWW-Authenticate header offers no Bearer challenge. MCP OAuth has nothing to discover from without one, so the flow cannot continue against this server.`}:{kind:"unexpected",message:`${r} with no WWW-Authenticate challenge. MCP requires 401 with a WWW-Authenticate header to begin OAuth, so there is nothing to discover from. A bare 403 usually means a proxy, WAF, or IP allowlist rejected the request before the MCP server saw it.`}:{kind:"unexpected",message:`${r} where MCP requires 401 Unauthorized (or 200, if the server allows anonymous access).`}}function Jf(e){return e.step!=="request_without_token"||e.status===void 0?!1:ll({status:e.status,statusText:e.statusText,wwwAuthenticateHeader:e.wwwAuthenticateHeader}).kind==="challenged"}function Wf(e){const t=Number.isInteger(e.maxRetries)&&e.maxRetries>=0?e.maxRetries:1;switch(e.authMode){case"m2m":return"throw";case"debugger":return"manual";case"interactive":return e.attempt<t?"reauthorize":"throw"}}function Bf(e){const t=e.customScopes?.trim();if(t)return t;const r=e.challengedScopes?.filter(Boolean)??[];if(r.length>0)return Array.from(new Set(r)).join(" ");const n=e.supportedScopes?.filter(Boolean)??[];if(n.length!==0)return Array.from(new Set(n)).join(" ")}var jt=Object.freeze({fieldChars:512,rawChars:2048}),fl="mcp/www_authenticate";function xt(e,t){return e.length>t?e.slice(0,t):e}function W(e){if(typeof e!="string")return;const t=e.trim();return t?xt(t,jt.fieldChars):void 0}var Ir=Object.freeze({challengeHeader:"none",hasResourceMetadata:!1,hasScope:!1,hasErrorParams:!1});function dl(e,t){return(t?e.find(r=>r.error==="insufficient_scope"):void 0)??e.find(r=>r.error)??e.find(r=>r.resource_metadata||r.scope)??e[0]}function pl(e,t){const r=typeof e=="string"?e.trim():"";if(!r)return{source:t,facets:{...Ir}};let n=[];try{n=Ct(r)}catch{n=[]}const o=xt(r,jt.rawChars);if(n.length===0)return{source:t,raw:o,facets:{...Ir,challengeHeader:"other-scheme"}};const i=dl(n,t==="http_403_insufficient_scope"||t==="tool_result_meta")??{},s=W(i.error),a=W(i.error_description),c=W(i.scope),u=W(i.resource_metadata);return{source:t,...s?{error:s}:{},...a?{errorDescription:a}:{},...c?{requiredScope:c}:{},...u?{resourceMetadataUrl:u}:{},raw:o,facets:{challengeHeader:"bearer",hasResourceMetadata:u!==void 0,hasScope:c!==void 0,hasErrorParams:s!==void 0&&a!==void 0}}}function G(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Vf(e){if(!G(e)||e.isError!==!0)return;const t=e._meta;if(!G(t))return;const r=t[fl],n=(Array.isArray(r)?r:[r]).filter(o=>typeof o=="string"&&o.trim()!=="");if(n.length!==0)return pl(n.map(o=>{const i=o.trim();return i.startsWith("'")&&i.endsWith("'")?i.slice(1,-1):i}).join(", "),"tool_result_meta")}function Kf(e){if(!G(e))return;const t=e.source;if(t!=="http_401"&&t!=="http_403_insufficient_scope"&&t!=="tool_result_meta")return;const r=G(e.facets)?e.facets:{},n=r.challengeHeader==="bearer"||r.challengeHeader==="other-scheme"?r.challengeHeader:"none",o=e.effectiveAuth,i=W(e.error),s=W(e.errorDescription),a=W(e.requiredScope),c=W(e.resourceMetadataUrl),u=typeof e.raw=="string"&&e.raw?xt(e.raw,jt.rawChars):void 0;return{source:t,...i?{error:i}:{},...s?{errorDescription:s}:{},...a?{requiredScope:a}:{},...c?{resourceMetadataUrl:c}:{},...u?{raw:u}:{},...o==="discover"||o==="oauth"||o==="xaa"||o==="bearer"||o==="none"?{effectiveAuth:o}:{},facets:{challengeHeader:n,hasResourceMetadata:r.hasResourceMetadata===!0,hasScope:r.hasScope===!0,hasErrorParams:r.hasErrorParams===!0}}}function He(e){if(!Array.isArray(e))return;const t=[];for(const r of e){if(!G(r)||typeof r.type!="string")continue;const n=Array.isArray(r.scopes)?r.scopes.filter(o=>typeof o=="string"):void 0;t.push({type:r.type,...n?{scopes:n}:{}})}return t}function Hf(e){const t=e.declaration??void 0,r=He(t?.securitySchemes);if(r)return{schemes:r,source:"tool"};const n=He((G(t?._meta)?t._meta:void 0)?.securitySchemes);if(n)return{schemes:n,source:"tool-meta"};const o=He(e.serverDefault);return o?{schemes:o,source:"server-default"}:e.serverDefault===null?{schemes:[],source:"none"}:{schemes:[],source:"unresolved"}}function hl(e){return e?.schemes.some(t=>t.type==="oauth2")===!0}var ml=["prompt","notify","passthrough"],vl=["any","bearer-header","resource-metadata"],gl=["any","oauth2-scheme","oauth2-scheme+error-params"],_l=Object.freeze({unauthorizedChallenge:"prompt",unauthorizedChallengeTrigger:"any",toolResultAuthChallenge:"passthrough",toolResultAuthChallengeTrigger:"oauth2-scheme+error-params"});function qf(e,t,r){const n={..._l,...yl(t??{})};if(e.source==="http_403_insufficient_scope")return{action:"prompt",reason:"honored"};if(e.source==="http_401"){const s=n.unauthorizedChallenge;if(s==="passthrough")return{action:"passthrough",reason:"not-honored"};const a=n.unauthorizedChallengeTrigger;return a!=="any"&&e.facets.challengeHeader!=="bearer"?{action:"passthrough",reason:"missing-bearer-header"}:a==="resource-metadata"&&!e.facets.hasResourceMetadata?{action:"passthrough",reason:"missing-resource-metadata"}:{action:s,reason:"honored"}}const o=n.toolResultAuthChallenge;if(o==="passthrough")return{action:"passthrough",reason:"not-honored"};const i=n.toolResultAuthChallengeTrigger;if(i!=="any"){if(r?.source==="unresolved"||r===void 0)return{action:"notify",reason:"schemes-unresolved"};if(!hl(r))return{action:"passthrough",reason:"missing-oauth2-scheme"};if(i==="oauth2-scheme+error-params"&&!e.facets.hasErrorParams)return{action:"passthrough",reason:"missing-error-params"}}return{action:o,reason:"honored"}}function yl(e){const t={};for(const[r,n]of Object.entries(e))n!==void 0&&(t[r]=n);return t}function Gf(e){if(!G(e))return;const t={},r=i=>ml.includes(i)?i:void 0,n=r(e.unauthorizedChallenge);n&&(t.unauthorizedChallenge=n),vl.includes(e.unauthorizedChallengeTrigger)&&(t.unauthorizedChallengeTrigger=e.unauthorizedChallengeTrigger);const o=r(e.toolResultAuthChallenge);return o&&(t.toolResultAuthChallenge=o),gl.includes(e.toolResultAuthChallengeTrigger)&&(t.toolResultAuthChallengeTrigger=e.toolResultAuthChallengeTrigger),Object.keys(t).length>0?t:void 0}function Xf(e,t,r="This host"){switch(t.reason){case"honored":return t.action==="prompt"?`${r} shows a sign-in prompt for this challenge and retries the call after sign-in.`:t.action==="notify"?`${r} tells the user to sign in, but does not retry the call.`:`${r} treats this challenge as an ordinary error.`;case"not-honored":return e.source==="tool_result_meta"?`${r} ignores _meta["mcp/www_authenticate"] on a tool result. To ask for sign-in, return HTTP 401 with a WWW-Authenticate: Bearer header instead.`:`${r} does not start sign-in from an HTTP 401 on a tool call.`;case"missing-bearer-header":return`${r} starts sign-in only when the 401 carries a WWW-Authenticate: Bearer header. Add one, with resource_metadata pointing at your Protected Resource Metadata.`;case"missing-resource-metadata":return`${r} needs resource_metadata="…" in the WWW-Authenticate challenge before it starts sign-in.`;case"missing-oauth2-scheme":return`${r} shows its sign-in UI for a _meta challenge only when the tool declares securitySchemes with an oauth2 entry.`;case"schemes-unresolved":return`This tool declares no securitySchemes, so it inherits the server default, which MCPJam cannot see. ${r} would show sign-in only if that default includes oauth2. Declare securitySchemes on the tool to make this explicit.`;case"missing-error-params":return`${r} needs both error and error_description in _meta["mcp/www_authenticate"] before it shows sign-in.`}}var ft=["2025-03-26","2025-06-18","2025-11-25","2026-07-28"],bl=ft[ft.length-1];function Yf(e){return e===bl?`Latest (${e})`:e}var wl=new Set(["2024-10-07","2024-11-05","2025-03-26","2025-06-18","2025-11-25"]);function Qf(e){return ft.includes(e)}function ed(e){return e.length>0&&!wl.has(e)}var $l=["claude-code","codex","cursor","copilot-cli","opencode","claude-web","chatgpt-web"];function td(e){return typeof e=="string"&&$l.includes(e)}var rd=["sidebarApps","conversationPanels","fileViewers","fileResources","localFiles","settings","displayModes","deepLinks","modelContext","messages","mentions","forms","onboarding"],nd=["verified","refuted","unverifiable"],od=["oauth2-dcr","oauth2-cimd","oauth2-preregistered","api-key","none"],id=["omit","fixed","challenge","all-supported"],sd=["none","client_secret_basic","client_secret_post"],kl="mcpjam-xaa-cli",dt="2025-11-25",zl="io.modelcontextprotocol/enterprise-managed-authorization";function ad(e){return{headers:{Accept:"application/json, text/event-stream","Content-Type":"application/json","MCP-Protocol-Version":dt,Authorization:`Bearer ${e}`},body:{jsonrpc:"2.0",id:kl,method:"initialize",params:{protocolVersion:dt,capabilities:{extensions:{[zl]:{}}},clientInfo:{name:"MCPJam XAA CLI",version:"1.0.0"}}}}}function vo(e){if(!e||typeof e!="object")return e;const t=e;return t.transport==="sse"?t.mcpResponse:e}function Ol(e){if(!e||typeof e!="object")return;const t=e.error;if(!t||typeof t!="object")return;const{code:r,message:n}=t,o=[];return typeof r=="number"&&o.push(String(r)),typeof n=="string"&&n.length>0&&o.push(n),o.length>0?o.join(": "):"JSON-RPC error"}function cd(e){if(e&&typeof e=="object"){const i=e.error;if(typeof i=="string"&&i.length>0)return i}const t=vo(e),r=Ol(t);if(r)return r;const n=t;if(!t||typeof t!="object"||n.jsonrpc!=="2.0"||n.id!=="mcpjam-xaa-cli"||n.result===null||typeof n.result!="object")return"MCP server did not return a JSON-RPC initialize result";const o=n.result.protocolVersion;if(o!=="2025-11-25")return`MCP server negotiated protocol version ${String(o)}; expected ${dt}`}function ud(e){const t=vo(e);if(!t||typeof t!="object")return"unknown";const r=t.result;if(!r||typeof r!="object")return"unknown";const n=r.capabilities;if(!n||typeof n!="object")return"unknown";const o=n.extensions;return!o||typeof o!="object"?"unknown":Object.prototype.hasOwnProperty.call(o,"io.modelcontextprotocol/enterprise-managed-authorization")?"advertised":"not_advertised"}var go=[{id:"score-results",pattern:"/results/:runToken",secretParam:"runToken",secretIn:"path",scope:"page",ttl:"permanent",note:"Score run result link (app and score.mcpjam.com). The token is the only access control."},{id:"bench-results",pattern:"/bench/results/:secret",secretParam:"secret",secretIn:"path",scope:"page",ttl:"permanent",note:"Connector Bench result link. A hex secret that would otherwise pass for an id."},{id:"conformance-shared",pattern:"/conformance/shared/:token",secretParam:"token",secretIn:"path",scope:"page",ttl:"permanent",note:"Shared conformance report (HMAC token)."},{id:"evals-shared",pattern:"/evals/shared/:token",secretParam:"token",secretIn:"path",scope:"page",ttl:"permanent",note:"Shared eval report."},{id:"tester-link",pattern:"/user-testing/:slug/:token",secretParam:"token",secretIn:"path",scope:"page",ttl:"permanent",reserved:["edit"],note:"Published study's tester link. `/user-testing/<id>/edit` is the editor, not a link."},{id:"tester-link-legacy",pattern:"/chatbox/:slug/:token",secretParam:"token",secretIn:"path",scope:"page",ttl:"permanent",note:"Pre-rename tester link shape. No longer minted, still in old emails and histories."},{id:"server-connection-claim",pattern:"/connect/server/:handoffToken",secretParam:"handoffToken",secretIn:"path",scope:"page",ttl:"single_use",reserved:["request"],note:"Server-connection handoff. Traded for a cookie, then replaced by /connect/server/request/<id>."},{id:"mcp-oauth-callback",pattern:"/oauth/callback*",secretParam:"code",secretIn:"query",scope:"page",ttl:"one_time_code",note:"MCP server OAuth callback (and its debugger variants): `code` and `state`."},{id:"github-install-callback",pattern:"/settings/integrations/github/callback",secretParam:"code",secretIn:"query",scope:"page",ttl:"one_time_code",note:"GitHub App install callback: `code` and `state`."},{id:"workos-callback",pattern:"/callback",secretParam:"code",secretIn:"query",scope:"page",ttl:"one_time_code",note:"WorkOS AuthKit sign-in callback. authkit-js consumes the code; the URL is scrubbed everywhere."},{id:"local-access-link",pattern:"/*",secretParam:"token",secretIn:"fragment",scope:"page",ttl:"permanent",note:"Local Inspector access link `#token=`. Consumed from the fragment before telemetry starts."},{id:"api-score-run",pattern:"/api/web/score/runs/:token",secretParam:"token",secretIn:"path",scope:"api",ttl:"permanent",note:"Score result read behind /results/<token>."},{id:"api-bench-results",pattern:"/api/web/bench/results/:secret",secretParam:"secret",secretIn:"path",scope:"api",ttl:"permanent",note:"Bench result read behind /bench/results/<secret>."},{id:"api-conformance-shared",pattern:"/api/web/conformance-shared/:token",secretParam:"token",secretIn:"path",scope:"api",ttl:"permanent",note:"Legacy conformance share read behind /conformance/shared/<token>."},{id:"api-local-web-connector",pattern:"/api/web-clients/local-connectors/:connectorId",secretParam:"connectorId",secretIn:"path",scope:"api",ttl:"permanent",note:"A local Inspector's capability connector for Claude web or ChatGPT web, in its turn and remove routes. The id is the connector's only credential."},{id:"web-connector",pattern:"/mcp/:connectorId",secretParam:"connectorId",secretIn:"path",scope:"api",ttl:"permanent",rootOnly:!0,note:"The forwarding endpoint Claude web and ChatGPT web connect to, the URL a tunnel exposes. A capability connector's id is its only credential."},{id:"web-connector-metadata",pattern:"/.well-known/oauth-protected-resource/mcp/:connectorId",secretParam:"connectorId",secretIn:"path",scope:"api",ttl:"permanent",note:"The forwarding endpoint's protected-resource metadata, which its sign-in challenge names. Carries the same connector id."},{id:"app-view-local",pattern:"/api/apps/mcp-apps/sandbox-proxy",secretParam:"view_token",secretIn:"query",scope:"api",ttl:"session",note:"Opaque local App document capability, valid only for its live admitted view."},{id:"app-view-hosted",pattern:"/api/web/apps/mcp-apps/sandbox-proxy",secretParam:"view_token",secretIn:"query",scope:"api",ttl:"expiring",note:"Opaque hosted App document capability, checked against its renewable lease."},{id:"api-session-token-query",pattern:"/api/*",secretParam:"_token",secretIn:"query",scope:"api",ttl:"session",note:"Session token on SSE routes (EventSource cannot send headers)."},{id:"signed-artifact-link",pattern:"/*",secretParam:"t",secretIn:"query",scope:"api",ttl:"expiring",note:"Signed artifact/media link `?t=` minted by the backend."}],X="[redacted]",Sl=/%5Bredacted%5D/gi,_o=new Set(["code","state","access_token","refresh_token","id_token","client_secret","code_verifier","assertion","client_assertion","token","_token","view_token","t","k","api_key","apikey","key","password","jwt","auth","authorization","otp","signature","sig","ticket","samlresponse","samlrequest","relaystate"]),Pl=/^(?:x-amz-|x-goog-)|(?:token|secret|password|signature|apikey|api_key|credential)$/i;function Ut(e){const t=e.trim().toLowerCase();return _o.has(t)||Pl.test(t)}var El="((?!:)[^/?#]+)";function Al(e){return e.replace(/[.*+?^${}()|[\]\\/-]/g,"\\$&")}function Tl(e){return`%${e.charCodeAt(0).toString(16).padStart(2,"0")}`}function yo(e){return[...e].map(t=>{const r=new Set([t.toLowerCase(),t.toUpperCase()].map(Tl));return`(?:${[Al(t),...r].join("|")})`}).join("")}function Il(e){const t=e.pattern.endsWith("*"),r=t?e.pattern.slice(0,-1):e.pattern,n=[],o=r.split("/").map(a=>a.startsWith(":")?(n.push(a.slice(1)),El):yo(a)).join("/"),i=t?"":"(?=/|$)",s=r.indexOf(":");return{route:e,anchored:new RegExp(`^${o}${i}`,"i"),segmentGroup:e.secretIn==="path"?n.indexOf(e.secretParam)+1:0,staticPrefix:s===-1?r:r.slice(0,s),paramNames:n}}var bo=go.map(Il),Dt=bo.filter(e=>e.route.secretIn==="path"),wo=bo.filter(e=>e.route.secretIn==="query"&&e.route.scope==="page"&&e.route.pattern!=="/*");function M(e){try{return decodeURIComponent(e)}catch{return e}}function Ze(e){for(const t of Dt){const r=t.anchored.exec(e);if(!r)continue;const n=r[t.segmentGroup];if(n===void 0||t.route.reserved?.includes(M(n).toLowerCase())||M(n)==="[redacted]")continue;const o={};t.paramNames.forEach((s,a)=>{o[s]=M(r[a+1]??"")});const i=r[0].length;return{route:t.route,params:o,segment:n,segmentStart:i-n.length,segmentEnd:i}}return null}function Zr(e){for(const t of wo)if(t.anchored.test(e))return t.route;return null}function ld(e){const t=go.find(r=>r.id===e);if(!t)throw new Error(`unknown credential route ${e}`);return t}function fd(e){const t=Ze(e);return t?t.route.pattern:null}function qe(e){const t=e.replace(/^[?#]/,"");return t?t.split(/[&;]/).some(r=>{const n=r.indexOf("="),o=M(n===-1?r:r.slice(0,n));return o!==""&&Ut(o)}):!1}function pt(e){return e.split(/([&;])/).map((t,r)=>{if(r%2===1)return t;const n=t.indexOf("=");if(n===-1)return t;const o=t.slice(0,n),i=t.slice(n+1);if(Ut(M(o.replace(/\+/g," "))))return i===""?t:`${o}=${X}`;const s=M(i.replace(/\+/g," ")),a=re(s);return a===s?t:`${o}=${encodeURIComponent(a).replace(Sl,X)}`}).join("")}function $o(e){const t=Ze(e);return!t||t.segmentStart===void 0?e:`${e.slice(0,t.segmentStart)}${X}${e.slice(t.segmentEnd)}`}function Zl(e){if(e.startsWith("/")){const t=e.search(/[?#]/),r=t===-1?e:e.slice(0,t),n=t===-1?"":e.slice(t),o=n.startsWith("?")||n.startsWith("#")?`${n[0]}${pt(n.slice(1))}`:n;return`${$o(r)}${o}`}return e.includes("=")?pt(e):e}var Lt=/^([a-z][a-z0-9+.-]*:)?\/\//i;function ko(e){let t=e,r="";const n=Lt.exec(t);if(n){const u=n[0].length,l=t.slice(u).search(/[/?#]/),d=l===-1?t.length:u+l;r=t.slice(0,d),t=t.slice(d)}const o=t.indexOf("#"),i=o===-1?"":t.slice(o+1);o!==-1&&(t=t.slice(0,o));const s=t.indexOf("?"),a=s===-1?"":t.slice(s+1),c=s===-1?t:t.slice(0,s);return{authority:r,path:c,query:a,fragment:i,hasQuery:s!==-1,hasFragment:o!==-1}}function Rl(e){const t=Lt.exec(e)?.[0]??"",r=e.slice(t.length),n=r.lastIndexOf("@");return n===-1?e:`${t}${r.slice(n+1)}`}function Nl(e){return Lt.test(e)||e.startsWith("/")||e.startsWith("?")||e.startsWith("#")}function ht(e){const t=ko(e);return`${Rl(t.authority)}${$o(t.path)}${t.hasQuery?`?${pt(t.query)}`:""}${t.hasFragment?`#${Zl(t.fragment)}`:""}`}function dd(e){if(typeof e!="string"||e==="")return e;try{if(!Nl(e))return re(e);const t=ht(e);return t===e?e:t}catch{return Cl(e)}}function Cl(e){try{return re(e)}catch{return X}}var Rr="(?:/|%2[Ff])",jl="((?!:|%5[Bb])(?:(?!%2[Ff]|%3[Ff]|%23)[^/?#\\s\"'<>\\\\()[\\]`|,;])+)",xl="(?:^|[\\s\"'<>()[\\]`|,;=]|(?://|%2[Ff]%2[Ff])(?:[^/?#\\s\"'<>()[\\]`%]|%(?!2[Ff]|3[Ff]|23)[0-9A-Fa-f]{2})*)";function Ul(e){const t=e.route.pattern.split("/").filter(Boolean).map(n=>n.startsWith(":")?jl:yo(n)).join(Rr),r=e.route.rootOnly?xl:"";return{regex:new RegExp(`${r}${Rr}${t}`,"gi"),reserved:e.route.reserved??[]}}var Dl=Dt.map(e=>({...Ul(e),compiled:e})),Ll=/\b[a-z][a-z0-9+.-]*:\/\/(?:\[[0-9A-Fa-f:.]+\])?[^\s"'<>()[\]`]*/gi,zo=/[.,;:!?]+$/,Ml=/^(?:[A-Z][A-Z0-9_]*|\d{1,4})[.,;:!?)]*$/,Fl=/((?:^|[?&#;]|%3[Ff]|%26|%23)\s*)((?:[A-Za-z0-9_.\-[\]]|%(?!3[Ff]|26|23|3[Dd])[0-9A-Fa-f]{2})+)((?:=|%3[Dd]))((?:(?!%26|%23)[^&#;\s"'<>\\`])*)/g,Jl=/(^|[\s"'(<=,[])\/\/[^\s/?#@"'<>()[\]`]+@(?=[^\s/?#@])/g,Wl=/^[/?#]\S*$/;function Bl(e){let t=e;for(const r of Dl){const{segmentGroup:n,paramNames:o}=r.compiled;t=t.replace(r.regex,(i,...s)=>{const a=s.slice(0,o.length)[n-1];return typeof a!="string"||r.reserved.includes(M(a).toLowerCase())?i:`${i.slice(0,i.length-a.length)}${X}`})}return t}function Oo(e,t=0){return e.replace(Fl,(r,n,o,i,s)=>{if(s===""||s.startsWith("[redacted]")||/^%5Bredacted%5D/i.test(s))return r;const a=M(M(o));if(!(n===""&&t===0&&!e.includes("&")&&a.trim().toLowerCase()==="code"&&Ml.test(s))&&Ut(a)){const u=zo.exec(s)?.[0]??"";return`${n}${o}${i}${X}${u}`}if(t>=4)return r;const c=Oo(s,t+1);return c===s?r:`${n}${o}${i}${c}`})}function re(e){if(typeof e!="string"||e===""||!Vl.test(e))return e;try{let t=Wl.test(e)?ht(e):e;return t=t.replace(Ll,r=>{const n=zo.exec(r)?.[0]??"";return`${ht(n?r.slice(0,-n.length):r)}${n}`}),t=t.replace(Jl,"$1//"),t=Bl(t),t=Oo(t),t}catch{return X}}var Vl=/[/=%:]/;function Kl(e){try{const t=e.pathname??"";if(Ze(t)||Zr(t)||e.search&&qe(e.search))return!0;const r=`${e.search??""}${e.hash??""}`;if(r&&re(r)!==r)return!0;const n=e.hash??"";if(n.length>1){const o=n.slice(1);if(o.startsWith("/")){const i=o.search(/[?#]/),s=i===-1?o:o.slice(0,i);if(Ze(s)||Zr(s)||i!==-1&&qe(o.slice(i)))return!0}else if(o.includes("=")&&qe(o))return!0}return!1}catch{return!0}}function Hl(e){return e.replace(/[^A-Za-z0-9_\-/.?=#;:]/g,t=>`\\${t.charCodeAt(0).toString(16)} `)}function pd(e=["href","src","srcset","action","data"]){const t=new Set;for(const n of Dt)n.staticPrefix.length>1&&t.add(n.staticPrefix);for(const n of wo){const o=n.route.pattern.replace(/\*$/,"");t.add(`${o}?`)}for(const n of _o)for(const o of["?","&","#",";"])t.add(`${o}${n}=`);for(const n of["x-amz-","x-goog-"])for(const o of["?","&"])t.add(`${o}${n}`);const r=[];for(const n of e)for(const o of t)r.push(`[${n}*="${Hl(o)}" i]`);return r}function hd(e){try{const{path:t,query:r,fragment:n}=ko(e);return Kl({pathname:t||"/",search:r?`?${r}`:"",hash:n?`#${n}`:""})}catch{return!0}}var ql=64,Gl=2e5,Ge=class extends Error{constructor(e){super(`telemetry scrub failed: ${e}`),this.name="TelemetryScrubError"}};function Nr(e,t={}){const r=new Set(t.preserveTopLevelKeys??[]),n=new Set;let o=0;const i=(s,a)=>{if(++o>Gl)throw new Ge("too large");if(typeof s=="string")return re(s);if(s===null||typeof s!="object")return s;if(a>ql)throw new Ge("too deep");if(n.has(s))throw new Ge("cycle");n.add(s);try{if(Array.isArray(s)){let d=!1;const h=s.map(p=>{const m=i(p,a+1);return m!==p&&(d=!0),m});return d?h:s}const c=Object.getPrototypeOf(s);if(c!==Object.prototype&&c!==null)return s;let u=!1;const l={};for(const[d,h]of Object.entries(s)){const p=re(d),m=a===0&&r.has(d)?h:i(h,a+1);(p!==d||m!==h)&&(u=!0);let g=p,_=m;if(Object.prototype.hasOwnProperty.call(l,p)){const y=l[p];if(Array.isArray(y)&&Array.isArray(m))_=[...y,...m];else{let E=2;for(;Object.prototype.hasOwnProperty.call(l,`${p}#${E}`);)E++;g=`${p}#${E}`}}Object.defineProperty(l,g,{value:_,enumerable:!0,writable:!0,configurable:!0})}return u?l:s}finally{n.delete(s)}};return i(e,0)}var Xl=["$current_url","$referrer","$pathname","$external_click_url","$session_entry_url","$session_entry_pathname","$session_entry_referrer","$initial_current_url","$initial_pathname","$initial_referrer","$prev_pageview_url","$prev_pageview_pathname"],Cr=[...Xl,"$referring_domain","$host","$elements_chain","$elements","$exception_list","$heatmap_data","$$heatmap","$web_vitals_LCP_event","$web_vitals_CLS_event","$web_vitals_FCP_event","$web_vitals_INP_event","$snapshot_data","failed_request","request","breadcrumbs","transaction","spans","exception","message","logentry","urls","url","contexts","extra"];function md(e,t={}){try{return Nr(e,t)}catch(r){t.onFallback?.(r instanceof Error?r.message:"unknown")}try{return Nr(Yl(e),t)}catch{return null}}function Yl(e){const t={...e};for(const r of Cr)delete t[r];for(const[r,n]of Object.entries(t))if(n&&typeof n=="object"&&!Array.isArray(n)){const o={...n};for(const i of Cr)delete o[i];t[r]=o}return t}var Xe="/home",Ql=/^[a-z0-9]{16,64}$/,ef=new Set(["none","local"]);function Mt(e){return typeof e!="string"||ef.has(e)?!1:Ql.test(e)}function ve(e){const t=e.indexOf("#"),r=e.indexOf("?");let n=-1;return r>=0&&(t<0||r<t)?n=r:t>=0&&(n=t),n<0?{path:e,suffix:""}:{path:e.slice(0,n),suffix:e.slice(n)}}function mt(e){if(typeof e!="string")return!1;const t=e.trim();return!(!t||t.startsWith("//")||/^[a-z][a-z0-9+.-]*:/i.test(t)||t.includes("\\"))}function ne(e){try{return decodeURIComponent(e)}catch{return e}}function Re(e){return e?e.startsWith("/")?e.replace(/^\/+/,"/"):`/${e}`:"/"}function De(e){if(typeof e!="string"||!e)return null;const{path:t}=ve(e),r=Re(t),n=/^\/p\/([^/]+)(\/.*)?$/.exec(r);if(!n)return null;const o=ne(n[1]);return Mt(o)?{projectId:o,relativePath:n[2]||"/"}:null}function vd(e){if(typeof e!="string"||!e)return null;const{path:t}=ve(e),r=/^\/p\/([^/]+)(\/.*)?$/.exec(Re(t));return r?ne(r[1]):null}function gd(e){return De(e)!==null}function vt(e,t){const r=typeof t=="string"&&t.trim()?t.trim():"/";if(!Mt(e))return mt(r)?Re(r):"/";const n=`/p/${encodeURIComponent(e)}`;if(!mt(r))return`${n}${Xe}`;const o=De(r);if(o){const{suffix:c}=ve(r);return`${n}${o.relativePath==="/"?Xe:o.relativePath}${c}`}const{path:i,suffix:s}=ve(r),a=Re(i);return a==="/"?`${n}${Xe}${s}`:`${n}${a}${s}`}function _d(e,t){return vt(t,e)}function yd(e){if(typeof e!="string"||!e)return e;const t=De(e);if(!t)return e;const{suffix:r}=ve(e);return`${t.relativePath}${r}`}var So="project";function tf(e){if(!e)return"";const t=e.startsWith("?")?e.slice(1):e;if(!t)return"";const r=t.split("&").filter(n=>{if(!n)return!1;const o=n.indexOf("=");return ne(o===-1?n:n.slice(0,o))!==So}).join("&");return r?`?${r}`:""}function bd(e){if(!e)return null;const t=e.startsWith("?")?e.slice(1):e;for(const r of t.split("&")){if(!r)continue;const n=r.indexOf("=");if(ne(n===-1?r:r.slice(0,n))!=="project")continue;const o=n===-1?"":ne(r.slice(n+1));if(Mt(o))return o}return null}function wd(e){return e?(e.startsWith("?")?e.slice(1):e).split("&").some(t=>{if(!t)return!1;const r=t.indexOf("=");return ne(r===-1?t:t.slice(0,r))===So}):!1}function $d(e){const{logicalTarget:t,projectId:r}=e,n=typeof t=="string"&&t?t:"/";if(!mt(n))return vt(r,"/");const o=n.indexOf("#"),i=o>=0?n.slice(o):"",s=o>=0?n.slice(0,o):n,a=s.indexOf("?"),c=`${a>=0?s.slice(0,a):s}${tf(a>=0?s.slice(a):"")}${i}`;return De(c)?c:vt(r,c)}export{Mf as $,af as $t,ud as A,lf as At,ed as B,Tf as Bt,fd as C,vf as Ct,zl as D,mf as Dt,go as E,pf as Et,sd as F,co as Ft,vl as G,Ru as Gt,ml as H,bf as Ht,rd as I,hf as It,Xf as J,ff as Jt,Gf as K,at as Kt,td as L,yf as Lt,od as M,Pf as Mt,nd as N,Sf as Nt,ad as O,Ef as Ot,id as P,wf as Pt,Hf as Q,cf as Qt,ft as R,Pr as Rt,ld as S,gf as St,X as T,Zu as Tt,_l as U,su as Ut,Yf as V,zf as Vt,gl as W,kf as Wt,Kf as X,qc as Xt,hl as Y,Hc as Yt,Vf as Z,uf as Zt,pd as _,Zf as _t,mt as a,Ct as at,dd as b,Uu as bt,De as c,Wf as ct,_d as d,sl as dt,sf as en,ll as et,tf as f,Nf as ft,Nr as g,Rf as gt,md as h,nl as ht,wd as i,Uf as it,$l as j,ju as jt,cd as k,$f as kt,bd as l,xf as lt,Cr as m,Cf as mt,vt as n,nf as nn,Jf as nt,Mt as o,Df as ot,yd as p,jf as pt,qf as q,df as qt,$d as r,rf as rn,Ff as rt,gd as s,Bf as st,Xe as t,of as tn,Lf as tt,vd as u,il as ut,Kl as v,If as vt,Al as w,_f as wt,re as x,Af as xt,hd as y,ao as yt,Qf as z,Of as zt};
|
|
57
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const a=s[1];if(t===s[0]){i(s);continue}if(e.external){const c=e.external.registry.get(s[0])?.id;if(t!==s[0]&&c){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}a.count>1&&e.reused==="ref"&&i(s)}e.external&&(e.sharedDefsExtractedFor=e.external)}function bn(e){const t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;const r=[];for(const n of t){if(!n||typeof n!="object")return;bn(n);const o=Object.keys(n);if(o.length!==1||o[0]!=="type")return;const i=n.type;for(const s of Array.isArray(i)?i:[i]){if(typeof s!="string")return;r.includes(s)||r.push(s)}}delete e.anyOf,e.type=r.length===1?r[0]:r}var wn=new Set(["type","properties","required","additionalProperties"]),_r=["oneOf","anyOf"];function yr(e){const t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function ot(e){const t=[];for(const i of e){if(typeof i!="object"||i.type!=="object")return null;for(const s in i)if(!wn.has(s))return null;t.push(i)}const r={},n=new Set;for(const i of t){for(const s in i.properties){if(Object.prototype.hasOwnProperty.call(r,s))continue;const a=[];for(const u of t){const l=u.properties?.[s]??yr(u);l!=null&&(a.some(d=>JSON.stringify(d)===JSON.stringify(l))||a.push(l))}const c=a.length===1?a[0]:ot(a)??{allOf:a};D(r,s,c)}for(const s of i.required??[])n.add(s)}const o={type:"object",properties:r};if(n.size&&(o.required=[...n]),t.every(i=>i.additionalProperties===!1))o.additionalProperties=!1;else{const i=[];for(const s of t){const a=yr(s);a&&!i.some(c=>JSON.stringify(c)===JSON.stringify(a))&&i.push(a)}i.length===1?o.additionalProperties=i[0]:i.length>1&&(o.additionalProperties={allOf:i})}return o}function Ec(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const o of wn)if(o in e)return;const r=t.filter(o=>_r.some(i=>Array.isArray(o[i])));let n=null;if(!r.length)n=ot(t);else{const o=r[0],i=_r.find(c=>Array.isArray(o[c]));if(Object.keys(o).length!==1)return;const s=t.filter(c=>c!==o),a=o[i].map(c=>ot([...s,c]));if(a.some(c=>!c))return;n={[i]:a}}n&&(delete e.allOf,de(e,n))}function Ae(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=a=>{const c=e.seen.get(a);if(c.ref===null)return;const u=c.def??c.schema,l={...u},d=c.ref;if(c.ref=null,d){n(d);const p=e.seen.get(d),m=p.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(m)):de(u,m),de(u,l),a._zod.parent===d)for(const g in u)g==="$ref"||g==="allOf"||g in l||delete u[g];if(m.$ref&&p.def)for(const g in u)g==="$ref"||g==="allOf"||g in p.def&&JSON.stringify(u[g])===JSON.stringify(p.def[g])&&delete u[g]}const h=a._zod.parent;if(h&&h!==d){n(h);const p=e.seen.get(h);if(p?.schema.$ref&&(u.$ref=p.schema.$ref,p.def))for(const m in u)m==="$ref"||m==="allOf"||m in p.def&&JSON.stringify(u[m])===JSON.stringify(p.def[m])&&delete u[m]}e.override({zodSchema:a,jsonSchema:u,path:c.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const a of[...e.seen.entries()].reverse())n(a[0]);if(e.target!=="openapi-3.0")for(const a of e.seen.entries())bn(a[1].def??a[1].schema);for(const a of e.deferred)a();if(e.intersections.length){const a=new Map;for(const c of e.seen.values())for(const u of[c.schema,c.def]){const l=u?.allOf;if(!Array.isArray(l))continue;const d=a.get(l);d?d.push(u):a.set(l,[u])}for(const c of e.intersections)for(const u of a.get(c)??[])Ec(u)}}const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(a)}de(o,r.defId?r.schema:r.def??r.schema);const i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;const s=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const a of e.seen.entries()){const c=a[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,D(s,c.defId,c.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{const a=JSON.parse(JSON.stringify(o));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:Te(t,"input",e.processors),output:Te(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function T(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return T(n.element,r);if(n.type==="set")return T(n.valueType,r);if(n.type==="lazy")return T(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault"||n.type==="catch")return T(n.innerType,r);if(n.type==="intersection")return T(n.left,r)||T(n.right,r);if(n.type==="record"||n.type==="map")return T(n.keyType,r)||T(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:T(n.in,r)||T(n.out,r);if(n.type==="object"){for(const o in n.shape)if(T(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(const o of n.options)if(T(o,r))return!0;return!1}if(n.type==="tuple"){for(const o of n.items)if(T(o,r))return!0;return!!(n.rest&&T(n.rest,r))}return!1}var Ac=(e,t={})=>r=>{const n=Pe({...r,processors:t});return k(e,n),Ee(n,e),Ae(n,e)},Te=(e,t,r={})=>n=>{const{libraryOptions:o,target:i}=n??{},s=Pe({...o??{},target:i,io:t,processors:r});return k(e,s),Ee(s,e),Ae(s,e)},ee=(e,t,r)=>{(e[t]===void 0||r>e[t])&&(e[t]=r)},te=(e,t,r)=>{(e[t]===void 0||r<e[t])&&(e[t]=r)},br=(e,t)=>{ee(e,"minimum",t),te(e,"maximum",t)},$n=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},kn=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},zn=(e,t)=>{e.mime=e.mime?e.mime.filter(r=>t.includes(r)):[...t]},On=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},wr=(e,t)=>ee(e,"minimum",t.minimum),$r=(e,t)=>te(e,"maximum",t.maximum),kr=e=>(t,r)=>{On(t,r.format);const[n,o]=e[r.format];ee(t,"minimum",n),te(t,"maximum",o)},Tc={greater_than:(e,t)=>ee(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>te(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>$n(e,t.value),number_format:kr(Fr),bigint_format:kr(Do),min_length:wr,max_length:$r,length_equals:(e,t)=>br(e,t.length),min_size:wr,max_size:$r,size_equals:(e,t)=>br(e,t.size),string_format:(e,t)=>{On(e,t.format),t.pattern&&kn(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>zn(e,t.mime)};function R(e){const t={},r=e._zod.def,n=e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[];for(const i of n)Tc[i._zod.def.check]?.(t,i._zod.def);const o=e._zod.bag;o.minimum!==void 0&&ee(t,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&ee(t,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&te(t,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&te(t,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&$n(t,o.multipleOf),o.format!==void 0&&(t.format??(t.format=o.format),o.format.includes("int")&&(t.isInt=!0)),o.mime&&zn(t,o.mime);for(const i of o.patterns??[])kn(t,i);return t}var Ic={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Zc=new Map([[rn,Li],[Et,Mi]]),Sn=e=>Zc.get(e)??e,Pn=(e,t,r,n)=>{const o=r;o.type="string";const{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:u,laxFormat:l}=R(e);if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),a&&(o.format=Ic[a]??a,o.format===""&&delete o.format,(a==="time"||l)&&delete o.format),u&&(o.contentEncoding=u),c&&c.size>0){const d=[...c].map(Sn);d.length===1?o.pattern=d[0].source:d.length>1&&(o.allOf=[...d.map(h=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:h.source}))])}},En=(e,t,r,n)=>{const o=r,{minimum:i,maximum:s,multipleOf:a,exclusiveMaximum:c,exclusiveMinimum:u,isInt:l}=R(e);o.type=l?"integer":"number";const d=typeof u=="number"&&u>=(i??Number.NEGATIVE_INFINITY),h=typeof c=="number"&&c<=(s??Number.POSITIVE_INFINITY),p=t.target==="draft-04"||t.target==="openapi-3.0";if(d?p?(o.minimum=u,o.exclusiveMinimum=!0):o.exclusiveMinimum=u:typeof i=="number"&&(o.minimum=i),h?p?(o.maximum=c,o.exclusiveMaximum=!0):o.exclusiveMaximum=c:typeof s=="number"&&(o.maximum=s),a){const m=new Set;for(const y of a)Number.isFinite(y)&&y!==0?m.add(Math.abs(y)):A(e,t,o,n,`A multipleOf divisor of ${y} cannot be represented in JSON Schema`);const[g,..._]=m;g!==void 0&&(o.multipleOf=g),_.length&&(o.allOf=[...o.allOf??[],..._.map(y=>({multipleOf:y}))])}},An=(e,t,r,n)=>{r.type="boolean"},Rc=(e,t,r,n)=>{A(e,t,r,n,"BigInt cannot be represented in JSON Schema")},Nc=(e,t,r,n)=>{A(e,t,r,n,"Symbols cannot be represented in JSON Schema")},Tn=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},In=(e,t,r,n)=>{A(e,t,r,n,"Undefined cannot be represented in JSON Schema")},Cc=(e,t,r,n)=>{A(e,t,r,n,"Void cannot be represented in JSON Schema")},Zn=(e,t,r,n)=>{r.not={}},Rn=(e,t,r,n)=>{},Nn=(e,t,r,n)=>{},jc=(e,t,r,n)=>{A(e,t,r,n,"Date cannot be represented in JSON Schema")},Cn=(e,t,r,n)=>{const o=e._zod.def,i=Ye(o.entries);if(i.length===0){r.not={};return}i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},jn=(e,t,r,n)=>{const o=e._zod.def;if(o.values.length===0){r.not={};return}const i=[];for(const s of o.values)if(s===void 0){if(A(e,t,r,n,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof s=="bigint"){if(A(e,t,r,n,"BigInt literals cannot be represented in JSON Schema"))return;i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){const s=i[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),i.every(s=>typeof s=="boolean")&&(r.type="boolean"),i.every(s=>s===null)&&(r.type="null"),r.enum=i},xc=(e,t,r,n)=>{A(e,t,r,n,"NaN cannot be represented in JSON Schema")},Uc=(e,t,r,n)=>{const o=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=i.source},Dc=(e,t,r,n)=>{const o=r;o.type="string",o.format="binary",o.contentEncoding="binary";const{minimum:i,maximum:s,mime:a}=R(e);i!==void 0&&(o.minLength=i),s!==void 0&&(o.maxLength=s),a&&(a.length===0?o.not={}:a.length===1?o.contentMediaType=a[0]:o.anyOf=a.map(c=>({contentMediaType:c})))},Lc=(e,t,r,n)=>{r.type="boolean"},xn=(e,t,r,n)=>{A(e,t,r,n,"Custom types cannot be represented in JSON Schema")},Mc=(e,t,r,n)=>{A(e,t,r,n,"Function types cannot be represented in JSON Schema")},Un=(e,t,r,n)=>{A(e,t,r,n,"Transforms cannot be represented in JSON Schema")},Fc=(e,t,r,n)=>{A(e,t,r,n,"Map cannot be represented in JSON Schema")},Jc=(e,t,r,n)=>{A(e,t,r,n,"Set cannot be represented in JSON Schema")},Dn=(e,t,r,n)=>{const o=r,i=e._zod.def,{minimum:s,maximum:a}=R(e);typeof s=="number"&&(o.minItems=s),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=k(i.element,t,{...n,path:[...n.path,"items"]})};function me(e){const t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?me(t.out):t.type==="catch"?me(t.innerType):e._zod.optin}var Ln=(e,t,r,n)=>{const o=r,i=e._zod.def,s=i.shape;if(Object.getOwnPropertySymbols(s).length&&A(e,t,o,n,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(const c in s)D(o.properties,c,k(s[c],t,{...n,path:[...n.path,"properties",c]}));const a=[];for(const c of Object.keys(s)){const u=i.shape[c];(t.io==="input"?me(u)===void 0:u._zod.optout===void 0)&&a.push(c)}a.length>0&&(o.required=a),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=k(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},Mn=(e,t,r,n)=>{const o=e._zod.def,i=o.inclusive===!1,s=o.options.map((a,c)=>k(a,t,{...n,path:[...n.path,i?"oneOf":"anyOf",c]}));i?r.oneOf=s:r.anyOf=s},Fn=(e,t,r,n)=>{const o=e._zod.def,i=k(o.left,t,{...n,path:[...n.path,"allOf",0]}),s=k(o.right,t,{...n,path:[...n.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];r.allOf=c,t.intersections.push(c)},Jn=(e,t,r,n)=>{const o=r,i=e._zod.def;o.type="array";const 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((g,_)=>k(g,t,{...n,path:[...n.path,s,_]})),u=i.rest?k(i.rest,t,{...n,path:[...n.path,a,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;let l=i.items.length;for(;l>0;){const g=i.items[l-1];if(!(t.io==="input"?me(g)!==void 0:g._zod.optout==="optional"))break;l--}const d=i.items.length,h=!i.rest;t.target==="draft-2020-12"?(o.prefixItems=c,h?o.items=!1:u&&(o.items=u),l>0&&(o.minItems=l),h&&(o.maxItems=d)):t.target==="openapi-3.0"?(o.items={anyOf:c},u&&o.items.anyOf.push(u),l>0&&(o.minItems=l),h&&(o.maxItems=d)):(o.items=c,h?o.additionalItems=!1:u&&(o.additionalItems=u),l>0&&(o.minItems=l),h&&(o.maxItems=d));const{minimum:p,maximum:m}=R(e);typeof p=="number"&&(o.minItems=p),typeof m=="number"&&(o.maxItems=m)};function it(e,t,r){if(t.$ref){if(r.has(t))return t;r.add(t);const m=e.get(t)?.def;if(!m)return t;const g=it(e,m,r);return g===m?t:g}for(const m of["anyOf","oneOf"]){const g=t[m];if(!Array.isArray(g))continue;const _=g.map(y=>it(e,y,r));_.some((y,E)=>y!==g[E])&&(t={...t,[m]:_})}const n=Array.isArray(t.type)?t.type:[t.type],o=!n.includes("string")&&n.some(m=>m==="number"||m==="integer"),i=t.enum??(t.const!==void 0?[t.const]:void 0);if(!o&&!i?.some(m=>typeof m=="number"))return t;const{minimum:s,maximum:a,exclusiveMinimum:c,exclusiveMaximum:u,multipleOf:l,format:d,id:h,...p}=t;return p.enum?p.enum=p.enum.map(m=>typeof m=="number"?String(m):m):typeof p.const=="number"&&(p.const=String(p.const)),o&&(p.type="string",i||(p.pattern=(n.includes("number")?Ot:qi).source)),p}var st=new WeakMap;function Wc(e){const t=new Map;for(const n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);const r=new Map;for(const n of st.get(e)??[]){const o=e.seen.get(n),i=(o?.def??o?.schema)?.propertyNames;if(!i||i===!0||r.has(i))continue;const s=it(t,i,new Set);s!==i&&r.set(i,s)}if(r.size)for(const n of e.seen.values())for(const o of[n.schema,n.def]){const i=o&&r.get(o.propertyNames);i&&(o.propertyNames=i)}}var Wn=(e,t,r,n)=>{const o=r,i=e._zod.def;o.type="object";const s=i.keyType,a=R(s).patterns;if(i.mode==="loose"&&a&&a.size>0){const l=k(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});o.patternProperties={};for(const d of a)D(o.patternProperties,Sn(d).source,l)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){o.propertyNames=k(i.keyType,t,{...n,path:[...n.path,"propertyNames"]});let l=st.get(t);l||(l=[],st.set(t,l),t.deferred.push(()=>Wc(t))),l.push(e)}o.additionalProperties=k(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]})}const c=s._zod.values,u=t.io==="input"&&me(i.valueType)!==void 0;if(c&&!i.partial&&!u){const l=[...c].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(o.required=l.map(String))}},Bn=(e,t,r,n)=>{const o=e._zod.def,i=k(o.innerType,t,n),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},Vn=(e,t,r,n)=>{const o=e._zod.def;k(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},Tt=Symbol();function Kn(e,t,r,n,o){let i=!1;const s=JSON.stringify(e,(a,c)=>typeof c!="bigint"?c:(i=!0,null));return i?(A(t,r,n,o,"BigInt defaults cannot be represented in JSON Schema"),Tt):JSON.parse(s)}var Hn=(e,t,r,n)=>{const o=e._zod.def;k(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType;const s=Kn(o.defaultValue,e,t,r,n);s!==Tt&&(r.default=s)},qn=(e,t,r,n)=>{const o=e._zod.def;k(o.innerType,t,n);const i=t.seen.get(e);if(i.ref=o.innerType,t.io!=="input")return;const s=Kn(o.defaultValue,e,t,r,n);s!==Tt&&(r._prefault=s)},Gn=(e,t,r,n)=>{const o=e._zod.def;k(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{A(e,t,r,n,"Dynamic catch values are not supported in JSON Schema");return}r.default=s},Xn=(e,t,r,n)=>{const o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?o.out:o.in:o.out;k(s,t,n);const a=t.seen.get(e);a.ref=s},Yn=(e,t,r,n)=>{const o=e._zod.def;k(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType,r.readOnly=!0},Bc=(e,t,r,n)=>{const o=e._zod.def;k(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},It=(e,t,r,n)=>{const o=e._zod.def;k(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},Qn=(e,t,r,n)=>{const o=e._zod.innerType;k(o,t,n);const i=t.seen.get(e);i.ref=o},zr={string:Pn,number:En,boolean:An,bigint:Rc,symbol:Nc,null:Tn,undefined:In,void:Cc,never:Zn,any:Rn,unknown:Nn,date:jc,enum:Cn,literal:jn,nan:xc,template_literal:Uc,file:Dc,success:Lc,custom:xn,function:Mc,transform:Un,map:Fc,set:Jc,array:Dn,object:Ln,union:Mn,intersection:Fn,tuple:Jn,record:Wn,nullable:Bn,nonoptional:Vn,default:Hn,prefault:qn,catch:Gn,pipe:Xn,readonly:Yn,promise:Bc,optional:It,lazy:Qn};function cf(e,t){if("_idmap"in e){const n=e,o=Pe({...t,processors:zr}),i={};for(const a of n._idmap.entries()){const[c,u]=a;k(u,o)}const s={};o.external={registry:n,uri:t?.uri,defs:i};for(const a of n._idmap.entries()){const[c,u]=a;Ee(o,u),D(s,c,Ae(o,u))}return Object.keys(i).length>0&&(s.__shared={[o.target==="draft-2020-12"?"$defs":"definitions"]:i}),{schemas:s}}const r=Pe({...t,processors:zr});return k(e,r),Ee(r,e),Ae(r,e)}var Or=new WeakSet([Object.prototype,Error.prototype]);function we(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){const n=r(this);return Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0})}})}var eo=(e,t)=>{si.init(e,t),e.name="ZodError";const r=Object.getPrototypeOf(e);Or.has(r)||(Or.add(r),we(r,"format",n=>o=>li(n,o)),we(r,"flatten",n=>o=>ui(n,o)),we(r,"addIssue",n=>o=>{n.issues.push(o),n.message=JSON.stringify(n.issues,Qe,2)}),we(r,"addIssues",n=>o=>{n.issues.push(...o),n.message=JSON.stringify(n.issues,Qe,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},uf=f("ZodError",eo),C=f("ZodError",eo,void 0,{Parent:Error}),Vc=$t(C),Kc=kt(C),Hc=xe(C),qc=zt(C),Gc=vi(C),Xc=gi(C),Yc=_i(C),Qc=yi(C),eu=bi(C),tu=wi(C),ru=$i(C),nu=ki(C);function ou(){N.localeError||U(Ra())}function ge(){N.memoizer||U({memoizer:Ta()})}var $=f("ZodType",(e,t)=>(ou(),w.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(Z(t,{checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return K(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(el(e,t))},superRefine(e,t){return this.check(tl(e,t))},overwrite(e){return this.check(oe(e))},optional(){return Pr(this)},exactOptional(){return Mu(this)},nullable(){return Er(this)},nullish(){return Pr(Er(this))},nonoptional(e){return Ku(this,e)},array(){return Zu(this)},or(e){return Ru([this,e])},and(e){return ju(this,e)},transform(e){return Ar(this,lo(e))},default(e){return Wu(this,e)},prefault(e){return Vu(this,e)},catch(e){return qu(this,e)},pipe(e){return Ar(this,e)},readonly(){return Yu(this)},describe(e){const t=this.clone();return ue.add(t,{description:e}),t},meta(...e){if(e.length===0)return ue.get(this);const t=this.clone();return ue.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return wt(this,"~standard",{...Yr(this),jsonSchema:{input:Te(this,"input"),output:Te(this,"output")}})},set"~standard"(e){V(this,"~standard",e)},parse:function e(t,r){return Vc(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await Kc(this,t,r,{callee:e})},safeParse(e,t){return Hc(this,e,t)},async safeParseAsync(e,t){return qc(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){V(this,"spa",e)},validate(e,t){return pi(this,e,t)},validateAsync(e,t){return mi(this,e,t)},encode:function e(t,r){return Gc(this,t,r,{callee:e})},decode:function e(t,r){return Xc(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await Yc(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await Qc(this,t,r,{callee:e})},safeEncode(e,t){return eu(this,e,t)},safeDecode(e,t){return tu(this,e,t)},async safeEncodeAsync(e,t){return ru(this,e,t)},async safeDecodeAsync(e,t){return nu(this,e,t)},toJSONSchema(e){return Ac(this,{})(e)},get description(){return ue.get(this)?.description},get _def(){return this._zod.def}}),to=f("_ZodString",(e,t)=>{Pt.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Pn(e,r,n,o)},Wr({format:e=>R(e).format??null,minLength:e=>R(e).minimum??null,maxLength:e=>R(e).maximum??null},{regex(...e){return this.check(fc(...e))},includes(...e){return this.check(hc(...e))},startsWith(...e){return this.check(mc(...e))},endsWith(...e){return this.check(vc(...e))},min(...e){return this.check(Se(...e))},max(...e){return this.check(_n(...e))},length(...e){return this.check(yn(...e))},nonempty(...e){return this.check(Se(1,...e))},lowercase(e){return this.check(dc(e))},uppercase(e){return this.check(pc(e))},trim(){return this.check(yc())},normalize(...e){return this.check(_c(...e))},toLowerCase(){return this.check(bc())},toUpperCase(){return this.check(wc())},slugify(){return this.check($c())}})),iu=f("ZodString",(e,t)=>{Pt.init(e,t),to.init(e,t)},{email(e){return this.check(dn(oo,e))},url(e){return this.check(hn(io,e))},jwt(e){return this.check(ec(ku,e))},emoji(e){return this.check(Ma(lu,e))},guid(e){return this.check(xa(uu,e))},uuid(e){return this.check(pn(le,e))},uuidv4(e){return this.check(Ua(le,e))},uuidv6(e){return this.check(Da(le,e))},uuidv7(e){return this.check(La(le,e))},nanoid(e){return this.check(Fa(fu,e))},cuid(e){return this.check(Ja(du,e))},cuid2(e){return this.check(Wa(pu,e))},ulid(e){return this.check(Ba(hu,e))},base64(e){return this.check(mn(so,e))},base64url(e){return this.check(Ya(wu,e))},xid(e){return this.check(Va(mu,e))},ksuid(e){return this.check(Ka(vu,e))},ipv4(e){return this.check(Ha(gu,e))},ipv6(e){return this.check(qa(_u,e))},cidrv4(e){return this.check(Ga(yu,e))},cidrv6(e){return this.check(Xa(bu,e))},e164(e){return this.check(Qa($u,e))},datetime(e){return this.check(vn(ro,e))},date(e){return this.check(gn(no,e))},time(e){return this.check(tc(au,e))},duration(e){return this.check(rc(cu,e))}});function su(e){return ja(iu,e)}var S=f("ZodStringFormat",(e,t)=>{O.init(e,t),to.init(e,t)}),ro=f("ZodISODateTime",(e,t)=>{Rs.init(e,t),S.init(e,t)}),no=f("ZodISODate",(e,t)=>{Ns.init(e,t),S.init(e,t)}),au=f("ZodISOTime",(e,t)=>{Cs.init(e,t),S.init(e,t)}),cu=f("ZodISODuration",(e,t)=>{js.init(e,t),S.init(e,t)}),oo=f("ZodEmail",(e,t)=>{ys.init(e,t),S.init(e,t)});function lf(e){return dn(oo,e)}var uu=f("ZodGUID",(e,t)=>{gs.init(e,t),S.init(e,t)}),le=f("ZodUUID",(e,t)=>{_s.init(e,t),S.init(e,t)});function ff(e){return pn(le,e)}var io=f("ZodURL",(e,t)=>{Os.init(e,t),S.init(e,t)});function df(e){return hn(io,e)}var lu=f("ZodEmoji",(e,t)=>{Ss.init(e,t),S.init(e,t)}),fu=f("ZodNanoID",(e,t)=>{Ps.init(e,t),S.init(e,t)}),du=f("ZodCUID",(e,t)=>{Es.init(e,t),S.init(e,t)}),pu=f("ZodCUID2",(e,t)=>{As.init(e,t),S.init(e,t)}),hu=f("ZodULID",(e,t)=>{Ts.init(e,t),S.init(e,t)}),mu=f("ZodXID",(e,t)=>{Is.init(e,t),S.init(e,t)}),vu=f("ZodKSUID",(e,t)=>{Zs.init(e,t),S.init(e,t)}),gu=f("ZodIPv4",(e,t)=>{xs.init(e,t),S.init(e,t)}),_u=f("ZodIPv6",(e,t)=>{Ds.init(e,t),S.init(e,t)}),yu=f("ZodCIDRv4",(e,t)=>{Ls.init(e,t),S.init(e,t)}),bu=f("ZodCIDRv6",(e,t)=>{Fs.init(e,t),S.init(e,t)}),so=f("ZodBase64",(e,t)=>{Js.init(e,t),S.init(e,t)});function pf(e){return mn(so,e)}var wu=f("ZodBase64URL",(e,t)=>{Bs.init(e,t),S.init(e,t)}),$u=f("ZodE164",(e,t)=>{Vs.init(e,t),S.init(e,t)}),ku=f("ZodJWT",(e,t)=>{Hs.init(e,t),S.init(e,t)}),ao=f("ZodNumber",(e,t)=>{nn.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>En(e,r,n,o),e.isFinite=!0},Wr({minValue:e=>{const{minimum:t,exclusiveMinimum:r}=R(e);return Math.max(t??Number.NEGATIVE_INFINITY,r??Number.NEGATIVE_INFINITY)},maxValue:e=>{const{maximum:t,exclusiveMaximum:r}=R(e);return Math.min(t??Number.POSITIVE_INFINITY,r??Number.POSITIVE_INFINITY)},isInt:e=>{const{isInt:t,multipleOf:r}=R(e);return!!t||!!r?.some(Number.isSafeInteger)},format:e=>R(e).format??null},{gt(e,t){return this.check(mr(e,t))},gte(e,t){return this.check(Ke(e,t))},min(e,t){return this.check(Ke(e,t))},lt(e,t){return this.check(hr(e,t))},lte(e,t){return this.check(Ve(e,t))},max(e,t){return this.check(Ve(e,t))},int(e){return this.check(Sr(e))},safe(e){return this.check(Sr(e))},positive(e){return this.check(mr(0,e))},nonnegative(e){return this.check(Ke(0,e))},negative(e){return this.check(hr(0,e))},nonpositive(e){return this.check(Ve(0,e))},multipleOf(e,t){return this.check(vr(e,t))},step(e,t){return this.check(vr(e,t))},finite(){return this}}));function hf(e){return nc(ao,e)}var zu=f("ZodNumberFormat",(e,t)=>{qs.init(e,t),ao.init(e,t)});function Sr(e){return oc(zu,e)}var Ou=f("ZodBoolean",(e,t)=>{Gs.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>An(e,r,n,o)});function mf(e){return ic(Ou,e)}var Su=f("ZodUndefined",(e,t)=>{Xs.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>In(e,r,n,o)});function vf(e){return sc(Su,e)}var Pu=f("ZodNull",(e,t)=>{Ys.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Tn(e,r,n,o)});function gf(e){return ac(Pu,e)}var Eu=f("ZodAny",(e,t)=>{Qs.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Rn(e,r,n,o)});function _f(){return cc(Eu)}var Au=f("ZodUnknown",(e,t)=>{ea.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Nn(e,r,n,o)});function at(){return uc(Au)}var Tu=f("ZodNever",(e,t)=>{ta.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Zn(e,r,n,o)});function co(e){return lc(Tu,e)}var Iu=f("ZodArray",(e,t)=>{ge(),oa.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Dn(e,r,n,o),e.element=t.element},{min(e,t){return this.check(Se(e,t))},nonempty(e){return this.check(Se(1,e))},max(e,t){return this.check(_n(e,t))},length(e,t){return this.check(yn(e,t))},unwrap(){return this.element}});function Zu(e,t){return kc(Iu,e,t)}var Zt=f("ZodObject",(e,t)=>{ge(),aa.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ln(e,r,n,o),Qo(e,"shape",r=>r._zod.def.shape,!1)},{keyof(){return Uu(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Z(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Z(this._zod.def,{catchall:at()}))},loose(){return this.clone(Z(this._zod.def,{catchall:at()}))},strict(){return this.clone(Z(this._zod.def,{catchall:co()}))},strip(){return this.clone(Z(this._zod.def,{catchall:void 0}))},extend(e){return Fo(this,e)},safeExtend(e){return Jo(this,e)},merge(e){return Wo(this,e)},pick(e){return Lo(this,e)},omit(e){return Mo(this,e)},partial(...e){return Vt(Rt,this,e[0])},exactPartial(...e){return Vt(fo,this,e[0],"exactPartial")},required(...e){return Bo(po,this,e[0])}});function yf(e,t){const r={type:"object",shape:e??{},...v(t)};return new Zt(r)}function bf(e,t){return new Zt({type:"object",shape:e,catchall:co(),...v(t)})}function wf(e,t){return new Zt({type:"object",shape:e,catchall:at(),...v(t)})}var uo=f("ZodUnion",(e,t)=>{an.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Mn(e,r,n,o),e.options=t.options});function Ru(e,t){return new uo({type:"union",options:e,...v(t)})}var Nu=f("ZodDiscriminatedUnion",(e,t)=>{uo.init(e,t),ua.init(e,t)});function $f(e,t,r){return new Nu({type:"union",options:t,discriminator:e,...v(r)})}var Cu=f("ZodIntersection",(e,t)=>{la.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Fn(e,r,n,o)});function ju(e,t){return new Cu({type:"intersection",left:e,right:t})}var xu=f("ZodTuple",(e,t)=>{ge(),fa.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Jn(e,r,n,o)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){const e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new Rt({type:"optional",innerType:t}))})}});function kf(e,t,r){const n=t instanceof w,o=n?r:t;return new xu({type:"tuple",items:e,rest:n?t:null,...v(o)})}var ct=f("ZodRecord",(e,t)=>{ge(),da.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Wn(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType});function zf(e,t,r){return!t||!t._zod?new ct({type:"record",keyType:su(),valueType:e,...v(t)}):new ct({type:"record",keyType:e,valueType:t,...v(r)})}function Of(e,t,r){return new ct({type:"record",keyType:e,valueType:t,...v(r),partial:!0})}var ut=f("ZodEnum",(e,t)=>{pa.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Cn(e,n,o,i),e.enum=t.entries,e.options=[...e._zod.values];const r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{const i={};for(const s of n)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new ut({...t,checks:[],...v(o),entries:i})},e.exclude=(n,o)=>{const i={...t.entries};for(const s of n)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new ut({...t,checks:[],...v(o),entries:i})}});function Uu(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new ut({type:"enum",entries:r,...v(t)})}var Du=f("ZodLiteral",(e,t)=>{ha.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>jn(e,r,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Sf(e,t){return new Du({type:"literal",values:Array.isArray(e)?e:[e],...v(t)})}var Lu=f("ZodTransform",(e,t)=>{ge(),ma.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Un(e,r,n,o),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Br(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(he(i,r.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),"input"in s||(s.input=r.value),s.inst??(s.inst=e),r.issues.push(he(s))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function lo(e){return new Lu({type:"transform",transform:e})}var Rt=f("ZodOptional",(e,t)=>{cn.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>It(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Pr(e){return new Rt({type:"optional",innerType:e})}var fo=f("ZodExactOptional",(e,t)=>{va.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>It(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Mu(e){return new fo({type:"optional",innerType:e})}var Fu=f("ZodNullable",(e,t)=>{ga.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Bn(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Er(e){return new Fu({type:"nullable",innerType:e})}var Ju=f("ZodDefault",(e,t)=>{_a.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Hn(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Wu(e,t){return new Ju({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Lr(t)}})}var Bu=f("ZodPrefault",(e,t)=>{ya.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>qn(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Vu(e,t){return new Bu({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Lr(t)}})}var po=f("ZodNonOptional",(e,t)=>{ba.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Vn(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Ku(e,t){return new po({type:"nonoptional",innerType:e,...v(t)})}var Hu=f("ZodCatch",(e,t)=>{wa.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Gn(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function qu(e,t){return new Hu({type:"catch",innerType:e,catchValue:typeof t=="function"?t:ti(t)})}var ho=f("ZodPipe",(e,t)=>{un.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Xn(e,r,n,o),e.in=t.in,e.out=t.out});function Ar(e,t){return new ho({type:"pipe",in:e,out:t})}var Gu=f("ZodPreprocess",(e,t)=>{ho.init(e,t),$a.init(e,t)}),Xu=f("ZodReadonly",(e,t)=>{ka.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Yn(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Yu(e){return new Xu({type:"readonly",innerType:e})}var Qu=f("ZodLazy",(e,t)=>{za.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Qn(e,r,n,o),e.unwrap=()=>e._zod.def.getter()});function Pf(e){return new Qu({type:"lazy",getter:e})}var Nt=f("ZodCustom",(e,t)=>{Oa.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>xn(e,r,n,o)});function Ef(e,t){return zc(Nt,e??(()=>!0),t)}function el(e,t={}){return Oc(Nt,e,t)}function tl(e,t){return Sc(e,t)}var rl=f("ZodInstanceOf",(e,t)=>{Nt.init(e,t)},{properties(e,t){return this.check(gc(e,t))}});function Af(e,t={}){const r=new rl({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...v(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}function Tf(e,t){return new Gu({type:"pipe",in:lo(e),out:t})}function If(e){return vn(ro,e)}function Zf(e){return gn(no,e)}var nl="io.modelcontextprotocol/skills";function Tr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ol(e){const t=e?.extensions;if(!Tr(t)||!Object.prototype.hasOwnProperty.call(t,"io.modelcontextprotocol/skills"))return;const r=t[nl];return Tr(r)?r:void 0}function Rf(e){return ol(e)!==void 0}var il="io.modelcontextprotocol/ui",sl="text/html;profile=mcp-app";function Ie(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function al(e,t){if(!e&&!t)return;if(!e)return{...t};if(!t)return{...e};const r={...e};for(const n of Object.keys(t)){const o=r[n],i=t[n];Ie(o)&&Ie(i)?r[n]={...o,...i}:r[n]=i}return r}function Nf(){return{extensions:{[il]:{mimeTypes:[sl]}}}}function Cf(e){return{...e??{}}}function jf(e,t){const r=e,n=t,o={...e??{},...t??{}};if(n&&Object.prototype.hasOwnProperty.call(n,"extensions")){const i=n.extensions;i===void 0?o.extensions=r?.extensions:Ie(i)?Object.keys(i).length===0?o.extensions={}:Ie(r?.extensions)?o.extensions=al(r.extensions,i):o.extensions={...i}:o.extensions=i}return o}function xf(){return"11.0.0"}var lt="[A-Za-z0-9!#$%&'*+.^_`|~-]+";function cl(e){const t={},r=new RegExp(`(${lt})\\s*=\\s*(?:"((?:\\\\.|[^"\\\\])*)"|([^,\\s]+))`,"g");for(let n=r.exec(e);n;n=r.exec(e)){const o=n[2];t[n[1].toLowerCase()]=o!==void 0?o.replace(/\\([\s\S])/g,"$1"):n[3]??""}return t}function Uf(e){return Ct(e)[0]??{}}function Df(e){if(!e)return;const t=e.split(/\s+/).map(r=>r.trim()).filter(Boolean);return t.length>0?Array.from(new Set(t)):void 0}function Lf(e,t){const r=[],n=new Set;for(const o of[...e??[],...t??[]]){const i=o?.trim();!i||n.has(i)||(n.add(i),r.push(i))}return r}function Ct(e){if(!e)return[];const t=[];let r="",n=!1;for(let a=0;a<e.length;a++){const c=e[a];n&&c==="\\"&&a+1<e.length?(r+=c+e[a+1],a++):c==='"'?(n=!n,r+=c):c===","&&!n?(t.push(r),r=""):r+=c}t.push(r);const o=[],i=new RegExp(`^(${lt})\\s+(?!\\s*=)(.+)$`,"s"),s=new RegExp(`^(${lt})$`);for(const a of t){const c=a.trim();if(!c)continue;const u=i.exec(c),l=u?null:s.exec(c);u?o.push({scheme:u[1].toLowerCase(),params:[u[2]]}):l?o.push({scheme:l[1].toLowerCase(),params:[]}):o.length>0&&o[o.length-1].params.push(c)}return o.filter(a=>a.scheme==="bearer").map(a=>cl(a.params.join(", ")))}function ul(e){return Ct(e).length>0}var Mf=class extends Error{status;constructor(e,t){super(e),this.name="UnexpectedProbeStatusError",this.status=t}},mo="MCP server returned HTTP ";function Ff(e){return e.startsWith(mo)}function ll(e){if(e.status===401)return{kind:"challenged",specCompliant:!0};if(e.status===200)return{kind:"anonymous_allowed"};if(e.status===403&&ul(e.wwwAuthenticateHeader))return{kind:"challenged",specCompliant:!1};const t=e.serverMessage||e.statusText,r=`${mo}${e.status}${t?` ${t}`:""}`;return e.status===403?e.wwwAuthenticateHeader?.trim()?{kind:"unexpected",message:`${r}, and its WWW-Authenticate header offers no Bearer challenge. MCP OAuth has nothing to discover from without one, so the flow cannot continue against this server.`}:{kind:"unexpected",message:`${r} with no WWW-Authenticate challenge. MCP requires 401 with a WWW-Authenticate header to begin OAuth, so there is nothing to discover from. A bare 403 usually means a proxy, WAF, or IP allowlist rejected the request before the MCP server saw it.`}:{kind:"unexpected",message:`${r} where MCP requires 401 Unauthorized (or 200, if the server allows anonymous access).`}}function Jf(e){return e.step!=="request_without_token"||e.status===void 0?!1:ll({status:e.status,statusText:e.statusText,wwwAuthenticateHeader:e.wwwAuthenticateHeader}).kind==="challenged"}function Wf(e){const t=Number.isInteger(e.maxRetries)&&e.maxRetries>=0?e.maxRetries:1;switch(e.authMode){case"m2m":return"throw";case"debugger":return"manual";case"interactive":return e.attempt<t?"reauthorize":"throw"}}function Bf(e){const t=e.customScopes?.trim();if(t)return t;const r=e.challengedScopes?.filter(Boolean)??[];if(r.length>0)return Array.from(new Set(r)).join(" ");const n=e.supportedScopes?.filter(Boolean)??[];if(n.length!==0)return Array.from(new Set(n)).join(" ")}var jt=Object.freeze({fieldChars:512,rawChars:2048}),fl="mcp/www_authenticate";function xt(e,t){return e.length>t?e.slice(0,t):e}function W(e){if(typeof e!="string")return;const t=e.trim();return t?xt(t,jt.fieldChars):void 0}var Ir=Object.freeze({challengeHeader:"none",hasResourceMetadata:!1,hasScope:!1,hasErrorParams:!1});function dl(e,t){return(t?e.find(r=>r.error==="insufficient_scope"):void 0)??e.find(r=>r.error)??e.find(r=>r.resource_metadata||r.scope)??e[0]}function pl(e,t){const r=typeof e=="string"?e.trim():"";if(!r)return{source:t,facets:{...Ir}};let n=[];try{n=Ct(r)}catch{n=[]}const o=xt(r,jt.rawChars);if(n.length===0)return{source:t,raw:o,facets:{...Ir,challengeHeader:"other-scheme"}};const i=dl(n,t==="http_403_insufficient_scope"||t==="tool_result_meta")??{},s=W(i.error),a=W(i.error_description),c=W(i.scope),u=W(i.resource_metadata);return{source:t,...s?{error:s}:{},...a?{errorDescription:a}:{},...c?{requiredScope:c}:{},...u?{resourceMetadataUrl:u}:{},raw:o,facets:{challengeHeader:"bearer",hasResourceMetadata:u!==void 0,hasScope:c!==void 0,hasErrorParams:s!==void 0&&a!==void 0}}}function G(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Vf(e){if(!G(e)||e.isError!==!0)return;const t=e._meta;if(!G(t))return;const r=t[fl],n=(Array.isArray(r)?r:[r]).filter(o=>typeof o=="string"&&o.trim()!=="");if(n.length!==0)return pl(n.map(o=>{const i=o.trim();return i.startsWith("'")&&i.endsWith("'")?i.slice(1,-1):i}).join(", "),"tool_result_meta")}function Kf(e){if(!G(e))return;const t=e.source;if(t!=="http_401"&&t!=="http_403_insufficient_scope"&&t!=="tool_result_meta")return;const r=G(e.facets)?e.facets:{},n=r.challengeHeader==="bearer"||r.challengeHeader==="other-scheme"?r.challengeHeader:"none",o=e.effectiveAuth,i=W(e.error),s=W(e.errorDescription),a=W(e.requiredScope),c=W(e.resourceMetadataUrl),u=typeof e.raw=="string"&&e.raw?xt(e.raw,jt.rawChars):void 0;return{source:t,...i?{error:i}:{},...s?{errorDescription:s}:{},...a?{requiredScope:a}:{},...c?{resourceMetadataUrl:c}:{},...u?{raw:u}:{},...o==="discover"||o==="oauth"||o==="xaa"||o==="bearer"||o==="none"?{effectiveAuth:o}:{},facets:{challengeHeader:n,hasResourceMetadata:r.hasResourceMetadata===!0,hasScope:r.hasScope===!0,hasErrorParams:r.hasErrorParams===!0}}}function He(e){if(!Array.isArray(e))return;const t=[];for(const r of e){if(!G(r)||typeof r.type!="string")continue;const n=Array.isArray(r.scopes)?r.scopes.filter(o=>typeof o=="string"):void 0;t.push({type:r.type,...n?{scopes:n}:{}})}return t}function Hf(e){const t=e.declaration??void 0,r=He(t?.securitySchemes);if(r)return{schemes:r,source:"tool"};const n=He((G(t?._meta)?t._meta:void 0)?.securitySchemes);if(n)return{schemes:n,source:"tool-meta"};const o=He(e.serverDefault);return o?{schemes:o,source:"server-default"}:e.serverDefault===null?{schemes:[],source:"none"}:{schemes:[],source:"unresolved"}}function hl(e){return e?.schemes.some(t=>t.type==="oauth2")===!0}var ml=["prompt","notify","passthrough"],vl=["any","bearer-header","resource-metadata"],gl=["any","oauth2-scheme","oauth2-scheme+error-params"],_l=Object.freeze({unauthorizedChallenge:"prompt",unauthorizedChallengeTrigger:"any",toolResultAuthChallenge:"passthrough",toolResultAuthChallengeTrigger:"oauth2-scheme+error-params"});function qf(e,t,r){const n={..._l,...yl(t??{})};if(e.source==="http_403_insufficient_scope")return{action:"prompt",reason:"honored"};if(e.source==="http_401"){const s=n.unauthorizedChallenge;if(s==="passthrough")return{action:"passthrough",reason:"not-honored"};const a=n.unauthorizedChallengeTrigger;return a!=="any"&&e.facets.challengeHeader!=="bearer"?{action:"passthrough",reason:"missing-bearer-header"}:a==="resource-metadata"&&!e.facets.hasResourceMetadata?{action:"passthrough",reason:"missing-resource-metadata"}:{action:s,reason:"honored"}}const o=n.toolResultAuthChallenge;if(o==="passthrough")return{action:"passthrough",reason:"not-honored"};const i=n.toolResultAuthChallengeTrigger;if(i!=="any"){if(r?.source==="unresolved"||r===void 0)return{action:"notify",reason:"schemes-unresolved"};if(!hl(r))return{action:"passthrough",reason:"missing-oauth2-scheme"};if(i==="oauth2-scheme+error-params"&&!e.facets.hasErrorParams)return{action:"passthrough",reason:"missing-error-params"}}return{action:o,reason:"honored"}}function yl(e){const t={};for(const[r,n]of Object.entries(e))n!==void 0&&(t[r]=n);return t}function Gf(e){if(!G(e))return;const t={},r=i=>ml.includes(i)?i:void 0,n=r(e.unauthorizedChallenge);n&&(t.unauthorizedChallenge=n),vl.includes(e.unauthorizedChallengeTrigger)&&(t.unauthorizedChallengeTrigger=e.unauthorizedChallengeTrigger);const o=r(e.toolResultAuthChallenge);return o&&(t.toolResultAuthChallenge=o),gl.includes(e.toolResultAuthChallengeTrigger)&&(t.toolResultAuthChallengeTrigger=e.toolResultAuthChallengeTrigger),Object.keys(t).length>0?t:void 0}function Xf(e,t,r="This host"){switch(t.reason){case"honored":return t.action==="prompt"?`${r} shows a sign-in prompt for this challenge and retries the call after sign-in.`:t.action==="notify"?`${r} tells the user to sign in, but does not retry the call.`:`${r} treats this challenge as an ordinary error.`;case"not-honored":return e.source==="tool_result_meta"?`${r} ignores _meta["mcp/www_authenticate"] on a tool result. To ask for sign-in, return HTTP 401 with a WWW-Authenticate: Bearer header instead.`:`${r} does not start sign-in from an HTTP 401 on a tool call.`;case"missing-bearer-header":return`${r} starts sign-in only when the 401 carries a WWW-Authenticate: Bearer header. Add one, with resource_metadata pointing at your Protected Resource Metadata.`;case"missing-resource-metadata":return`${r} needs resource_metadata="…" in the WWW-Authenticate challenge before it starts sign-in.`;case"missing-oauth2-scheme":return`${r} shows its sign-in UI for a _meta challenge only when the tool declares securitySchemes with an oauth2 entry.`;case"schemes-unresolved":return`This tool declares no securitySchemes, so it inherits the server default, which MCPJam cannot see. ${r} would show sign-in only if that default includes oauth2. Declare securitySchemes on the tool to make this explicit.`;case"missing-error-params":return`${r} needs both error and error_description in _meta["mcp/www_authenticate"] before it shows sign-in.`}}var ft=["2025-03-26","2025-06-18","2025-11-25","2026-07-28"],bl=ft[ft.length-1];function Yf(e){return e===bl?`Latest (${e})`:e}var wl=new Set(["2024-10-07","2024-11-05","2025-03-26","2025-06-18","2025-11-25"]);function Qf(e){return ft.includes(e)}function ed(e){return e.length>0&&!wl.has(e)}var $l=["claude-code","codex","cursor","copilot-cli","opencode","claude-web","chatgpt-web"];function td(e){return typeof e=="string"&&$l.includes(e)}var rd=["sidebarApps","conversationPanels","fileViewers","fileResources","localFiles","settings","displayModes","deepLinks","modelContext","messages","mentions","forms","onboarding"],nd=["verified","refuted","unverifiable"],od=["oauth2-dcr","oauth2-cimd","oauth2-preregistered","api-key","none"],id=["omit","fixed","challenge","all-supported"],sd=["none","client_secret_basic","client_secret_post"],kl="mcpjam-xaa-cli",dt="2025-11-25",zl="io.modelcontextprotocol/enterprise-managed-authorization";function ad(e){return{headers:{Accept:"application/json, text/event-stream","Content-Type":"application/json","MCP-Protocol-Version":dt,Authorization:`Bearer ${e}`},body:{jsonrpc:"2.0",id:kl,method:"initialize",params:{protocolVersion:dt,capabilities:{extensions:{[zl]:{}}},clientInfo:{name:"MCPJam XAA CLI",version:"1.0.0"}}}}}function vo(e){if(!e||typeof e!="object")return e;const t=e;return t.transport==="sse"?t.mcpResponse:e}function Ol(e){if(!e||typeof e!="object")return;const t=e.error;if(!t||typeof t!="object")return;const{code:r,message:n}=t,o=[];return typeof r=="number"&&o.push(String(r)),typeof n=="string"&&n.length>0&&o.push(n),o.length>0?o.join(": "):"JSON-RPC error"}function cd(e){if(e&&typeof e=="object"){const i=e.error;if(typeof i=="string"&&i.length>0)return i}const t=vo(e),r=Ol(t);if(r)return r;const n=t;if(!t||typeof t!="object"||n.jsonrpc!=="2.0"||n.id!=="mcpjam-xaa-cli"||n.result===null||typeof n.result!="object")return"MCP server did not return a JSON-RPC initialize result";const o=n.result.protocolVersion;if(o!=="2025-11-25")return`MCP server negotiated protocol version ${String(o)}; expected ${dt}`}function ud(e){const t=vo(e);if(!t||typeof t!="object")return"unknown";const r=t.result;if(!r||typeof r!="object")return"unknown";const n=r.capabilities;if(!n||typeof n!="object")return"unknown";const o=n.extensions;return!o||typeof o!="object"?"unknown":Object.prototype.hasOwnProperty.call(o,"io.modelcontextprotocol/enterprise-managed-authorization")?"advertised":"not_advertised"}var go=[{id:"score-results",pattern:"/results/:runToken",secretParam:"runToken",secretIn:"path",scope:"page",ttl:"permanent",note:"Score run result link (app and score.mcpjam.com). The token is the only access control."},{id:"bench-results",pattern:"/bench/results/:secret",secretParam:"secret",secretIn:"path",scope:"page",ttl:"permanent",note:"Connector Bench result link. A hex secret that would otherwise pass for an id."},{id:"conformance-shared",pattern:"/conformance/shared/:token",secretParam:"token",secretIn:"path",scope:"page",ttl:"permanent",note:"Shared conformance report (HMAC token)."},{id:"evals-shared",pattern:"/evals/shared/:token",secretParam:"token",secretIn:"path",scope:"page",ttl:"permanent",note:"Shared eval report."},{id:"tester-link",pattern:"/user-testing/:slug/:token",secretParam:"token",secretIn:"path",scope:"page",ttl:"permanent",reserved:["edit"],note:"Published study's tester link. `/user-testing/<id>/edit` is the editor, not a link."},{id:"tester-link-legacy",pattern:"/chatbox/:slug/:token",secretParam:"token",secretIn:"path",scope:"page",ttl:"permanent",note:"Pre-rename tester link shape. No longer minted, still in old emails and histories."},{id:"server-connection-claim",pattern:"/connect/server/:handoffToken",secretParam:"handoffToken",secretIn:"path",scope:"page",ttl:"single_use",reserved:["request"],note:"Server-connection handoff. Traded for a cookie, then replaced by /connect/server/request/<id>."},{id:"mcp-oauth-callback",pattern:"/oauth/callback*",secretParam:"code",secretIn:"query",scope:"page",ttl:"one_time_code",note:"MCP server OAuth callback (and its debugger variants): `code` and `state`."},{id:"github-install-callback",pattern:"/settings/integrations/github/callback",secretParam:"code",secretIn:"query",scope:"page",ttl:"one_time_code",note:"GitHub App install callback: `code` and `state`."},{id:"workos-callback",pattern:"/callback",secretParam:"code",secretIn:"query",scope:"page",ttl:"one_time_code",note:"WorkOS AuthKit sign-in callback. authkit-js consumes the code; the URL is scrubbed everywhere."},{id:"local-access-link",pattern:"/*",secretParam:"token",secretIn:"fragment",scope:"page",ttl:"permanent",note:"Local Inspector access link `#token=`. Consumed from the fragment before telemetry starts."},{id:"api-score-run",pattern:"/api/web/score/runs/:token",secretParam:"token",secretIn:"path",scope:"api",ttl:"permanent",note:"Score result read behind /results/<token>."},{id:"api-bench-results",pattern:"/api/web/bench/results/:secret",secretParam:"secret",secretIn:"path",scope:"api",ttl:"permanent",note:"Bench result read behind /bench/results/<secret>."},{id:"api-conformance-shared",pattern:"/api/web/conformance-shared/:token",secretParam:"token",secretIn:"path",scope:"api",ttl:"permanent",note:"Legacy conformance share read behind /conformance/shared/<token>."},{id:"api-local-web-connector",pattern:"/api/web-clients/local-connectors/:connectorId",secretParam:"connectorId",secretIn:"path",scope:"api",ttl:"permanent",note:"A local Inspector's capability connector for Claude web or ChatGPT web, in its turn and remove routes. The id is the connector's only credential."},{id:"web-connector",pattern:"/mcp/:connectorId",secretParam:"connectorId",secretIn:"path",scope:"api",ttl:"permanent",rootOnly:!0,note:"The forwarding endpoint Claude web and ChatGPT web connect to, the URL a tunnel exposes. A capability connector's id is its only credential."},{id:"web-connector-metadata",pattern:"/.well-known/oauth-protected-resource/mcp/:connectorId",secretParam:"connectorId",secretIn:"path",scope:"api",ttl:"permanent",note:"The forwarding endpoint's protected-resource metadata, which its sign-in challenge names. Carries the same connector id."},{id:"app-view-local",pattern:"/api/apps/mcp-apps/sandbox-proxy",secretParam:"view_token",secretIn:"query",scope:"api",ttl:"session",note:"Opaque local App document capability, valid only for its live admitted view."},{id:"app-view-hosted",pattern:"/api/web/apps/mcp-apps/sandbox-proxy",secretParam:"view_token",secretIn:"query",scope:"api",ttl:"expiring",note:"Opaque hosted App document capability, checked against its renewable lease."},{id:"api-session-token-query",pattern:"/api/*",secretParam:"_token",secretIn:"query",scope:"api",ttl:"session",note:"Session token on SSE routes (EventSource cannot send headers)."},{id:"signed-artifact-link",pattern:"/*",secretParam:"t",secretIn:"query",scope:"api",ttl:"expiring",note:"Signed artifact/media link `?t=` minted by the backend."}],X="[redacted]",Sl=/%5Bredacted%5D/gi,_o=new Set(["code","state","access_token","refresh_token","id_token","client_secret","code_verifier","assertion","client_assertion","token","_token","view_token","t","k","api_key","apikey","key","password","jwt","auth","authorization","otp","signature","sig","ticket","samlresponse","samlrequest","relaystate"]),Pl=/^(?:x-amz-|x-goog-)|(?:token|secret|password|signature|apikey|api_key|credential)$/i;function Ut(e){const t=e.trim().toLowerCase();return _o.has(t)||Pl.test(t)}var El="((?!:)[^/?#]+)";function Al(e){return e.replace(/[.*+?^${}()|[\]\\/-]/g,"\\$&")}function Tl(e){return`%${e.charCodeAt(0).toString(16).padStart(2,"0")}`}function yo(e){return[...e].map(t=>{const r=new Set([t.toLowerCase(),t.toUpperCase()].map(Tl));return`(?:${[Al(t),...r].join("|")})`}).join("")}function Il(e){const t=e.pattern.endsWith("*"),r=t?e.pattern.slice(0,-1):e.pattern,n=[],o=r.split("/").map(a=>a.startsWith(":")?(n.push(a.slice(1)),El):yo(a)).join("/"),i=t?"":"(?=/|$)",s=r.indexOf(":");return{route:e,anchored:new RegExp(`^${o}${i}`,"i"),segmentGroup:e.secretIn==="path"?n.indexOf(e.secretParam)+1:0,staticPrefix:s===-1?r:r.slice(0,s),paramNames:n}}var bo=go.map(Il),Dt=bo.filter(e=>e.route.secretIn==="path"),wo=bo.filter(e=>e.route.secretIn==="query"&&e.route.scope==="page"&&e.route.pattern!=="/*");function M(e){try{return decodeURIComponent(e)}catch{return e}}function Ze(e){for(const t of Dt){const r=t.anchored.exec(e);if(!r)continue;const n=r[t.segmentGroup];if(n===void 0||t.route.reserved?.includes(M(n).toLowerCase())||M(n)==="[redacted]")continue;const o={};t.paramNames.forEach((s,a)=>{o[s]=M(r[a+1]??"")});const i=r[0].length;return{route:t.route,params:o,segment:n,segmentStart:i-n.length,segmentEnd:i}}return null}function Zr(e){for(const t of wo)if(t.anchored.test(e))return t.route;return null}function ld(e){const t=go.find(r=>r.id===e);if(!t)throw new Error(`unknown credential route ${e}`);return t}function fd(e){const t=Ze(e);return t?t.route.pattern:null}function qe(e){const t=e.replace(/^[?#]/,"");return t?t.split(/[&;]/).some(r=>{const n=r.indexOf("="),o=M(n===-1?r:r.slice(0,n));return o!==""&&Ut(o)}):!1}function pt(e){return e.split(/([&;])/).map((t,r)=>{if(r%2===1)return t;const n=t.indexOf("=");if(n===-1)return t;const o=t.slice(0,n),i=t.slice(n+1);if(Ut(M(o.replace(/\+/g," "))))return i===""?t:`${o}=${X}`;const s=M(i.replace(/\+/g," ")),a=re(s);return a===s?t:`${o}=${encodeURIComponent(a).replace(Sl,X)}`}).join("")}function $o(e){const t=Ze(e);return!t||t.segmentStart===void 0?e:`${e.slice(0,t.segmentStart)}${X}${e.slice(t.segmentEnd)}`}function Zl(e){if(e.startsWith("/")){const t=e.search(/[?#]/),r=t===-1?e:e.slice(0,t),n=t===-1?"":e.slice(t),o=n.startsWith("?")||n.startsWith("#")?`${n[0]}${pt(n.slice(1))}`:n;return`${$o(r)}${o}`}return e.includes("=")?pt(e):e}var Lt=/^([a-z][a-z0-9+.-]*:)?\/\//i;function ko(e){let t=e,r="";const n=Lt.exec(t);if(n){const u=n[0].length,l=t.slice(u).search(/[/?#]/),d=l===-1?t.length:u+l;r=t.slice(0,d),t=t.slice(d)}const o=t.indexOf("#"),i=o===-1?"":t.slice(o+1);o!==-1&&(t=t.slice(0,o));const s=t.indexOf("?"),a=s===-1?"":t.slice(s+1),c=s===-1?t:t.slice(0,s);return{authority:r,path:c,query:a,fragment:i,hasQuery:s!==-1,hasFragment:o!==-1}}function Rl(e){const t=Lt.exec(e)?.[0]??"",r=e.slice(t.length),n=r.lastIndexOf("@");return n===-1?e:`${t}${r.slice(n+1)}`}function Nl(e){return Lt.test(e)||e.startsWith("/")||e.startsWith("?")||e.startsWith("#")}function ht(e){const t=ko(e);return`${Rl(t.authority)}${$o(t.path)}${t.hasQuery?`?${pt(t.query)}`:""}${t.hasFragment?`#${Zl(t.fragment)}`:""}`}function dd(e){if(typeof e!="string"||e==="")return e;try{if(!Nl(e))return re(e);const t=ht(e);return t===e?e:t}catch{return Cl(e)}}function Cl(e){try{return re(e)}catch{return X}}var Rr="(?:/|%2[Ff])",jl="((?!:|%5[Bb])(?:(?!%2[Ff]|%3[Ff]|%23)[^/?#\\s\"'<>\\\\()[\\]`|,;])+)",xl="(?:^|[\\s\"'<>()[\\]`|,;=]|(?://|%2[Ff]%2[Ff])(?:[^/?#\\s\"'<>()[\\]`%]|%(?!2[Ff]|3[Ff]|23)[0-9A-Fa-f]{2})*)";function Ul(e){const t=e.route.pattern.split("/").filter(Boolean).map(n=>n.startsWith(":")?jl:yo(n)).join(Rr),r=e.route.rootOnly?xl:"";return{regex:new RegExp(`${r}${Rr}${t}`,"gi"),reserved:e.route.reserved??[]}}var Dl=Dt.map(e=>({...Ul(e),compiled:e})),Ll=/\b[a-z][a-z0-9+.-]*:\/\/(?:\[[0-9A-Fa-f:.]+\])?[^\s"'<>()[\]`]*/gi,zo=/[.,;:!?]+$/,Ml=/^(?:[A-Z][A-Z0-9_]*|\d{1,4})[.,;:!?)]*$/,Fl=/((?:^|[?&#;]|%3[Ff]|%26|%23)\s*)((?:[A-Za-z0-9_.\-[\]]|%(?!3[Ff]|26|23|3[Dd])[0-9A-Fa-f]{2})+)((?:=|%3[Dd]))((?:(?!%26|%23)[^&#;\s"'<>\\`])*)/g,Jl=/(^|[\s"'(<=,[])\/\/[^\s/?#@"'<>()[\]`]+@(?=[^\s/?#@])/g,Wl=/^[/?#]\S*$/;function Bl(e){let t=e;for(const r of Dl){const{segmentGroup:n,paramNames:o}=r.compiled;t=t.replace(r.regex,(i,...s)=>{const a=s.slice(0,o.length)[n-1];return typeof a!="string"||r.reserved.includes(M(a).toLowerCase())?i:`${i.slice(0,i.length-a.length)}${X}`})}return t}function Oo(e,t=0){return e.replace(Fl,(r,n,o,i,s)=>{if(s===""||s.startsWith("[redacted]")||/^%5Bredacted%5D/i.test(s))return r;const a=M(M(o));if(!(n===""&&t===0&&!e.includes("&")&&a.trim().toLowerCase()==="code"&&Ml.test(s))&&Ut(a)){const u=zo.exec(s)?.[0]??"";return`${n}${o}${i}${X}${u}`}if(t>=4)return r;const c=Oo(s,t+1);return c===s?r:`${n}${o}${i}${c}`})}function re(e){if(typeof e!="string"||e===""||!Vl.test(e))return e;try{let t=Wl.test(e)?ht(e):e;return t=t.replace(Ll,r=>{const n=zo.exec(r)?.[0]??"";return`${ht(n?r.slice(0,-n.length):r)}${n}`}),t=t.replace(Jl,"$1//"),t=Bl(t),t=Oo(t),t}catch{return X}}var Vl=/[/=%:]/;function Kl(e){try{const t=e.pathname??"";if(Ze(t)||Zr(t)||e.search&&qe(e.search))return!0;const r=`${e.search??""}${e.hash??""}`;if(r&&re(r)!==r)return!0;const n=e.hash??"";if(n.length>1){const o=n.slice(1);if(o.startsWith("/")){const i=o.search(/[?#]/),s=i===-1?o:o.slice(0,i);if(Ze(s)||Zr(s)||i!==-1&&qe(o.slice(i)))return!0}else if(o.includes("=")&&qe(o))return!0}return!1}catch{return!0}}function Hl(e){return e.replace(/[^A-Za-z0-9_\-/.?=#;:]/g,t=>`\\${t.charCodeAt(0).toString(16)} `)}function pd(e=["href","src","srcset","action","data"]){const t=new Set;for(const n of Dt)n.staticPrefix.length>1&&t.add(n.staticPrefix);for(const n of wo){const o=n.route.pattern.replace(/\*$/,"");t.add(`${o}?`)}for(const n of _o)for(const o of["?","&","#",";"])t.add(`${o}${n}=`);for(const n of["x-amz-","x-goog-"])for(const o of["?","&"])t.add(`${o}${n}`);const r=[];for(const n of e)for(const o of t)r.push(`[${n}*="${Hl(o)}" i]`);return r}function hd(e){try{const{path:t,query:r,fragment:n}=ko(e);return Kl({pathname:t||"/",search:r?`?${r}`:"",hash:n?`#${n}`:""})}catch{return!0}}var ql=64,Gl=2e5,Ge=class extends Error{constructor(e){super(`telemetry scrub failed: ${e}`),this.name="TelemetryScrubError"}};function Nr(e,t={}){const r=new Set(t.preserveTopLevelKeys??[]),n=new Set;let o=0;const i=(s,a)=>{if(++o>Gl)throw new Ge("too large");if(typeof s=="string")return re(s);if(s===null||typeof s!="object")return s;if(a>ql)throw new Ge("too deep");if(n.has(s))throw new Ge("cycle");n.add(s);try{if(Array.isArray(s)){let d=!1;const h=s.map(p=>{const m=i(p,a+1);return m!==p&&(d=!0),m});return d?h:s}const c=Object.getPrototypeOf(s);if(c!==Object.prototype&&c!==null)return s;let u=!1;const l={};for(const[d,h]of Object.entries(s)){const p=re(d),m=a===0&&r.has(d)?h:i(h,a+1);(p!==d||m!==h)&&(u=!0);let g=p,_=m;if(Object.prototype.hasOwnProperty.call(l,p)){const y=l[p];if(Array.isArray(y)&&Array.isArray(m))_=[...y,...m];else{let E=2;for(;Object.prototype.hasOwnProperty.call(l,`${p}#${E}`);)E++;g=`${p}#${E}`}}Object.defineProperty(l,g,{value:_,enumerable:!0,writable:!0,configurable:!0})}return u?l:s}finally{n.delete(s)}};return i(e,0)}var Xl=["$current_url","$referrer","$pathname","$external_click_url","$session_entry_url","$session_entry_pathname","$session_entry_referrer","$initial_current_url","$initial_pathname","$initial_referrer","$prev_pageview_url","$prev_pageview_pathname"],Cr=[...Xl,"$referring_domain","$host","$elements_chain","$elements","$exception_list","$heatmap_data","$$heatmap","$web_vitals_LCP_event","$web_vitals_CLS_event","$web_vitals_FCP_event","$web_vitals_INP_event","$snapshot_data","failed_request","request","breadcrumbs","transaction","spans","exception","message","logentry","urls","url","contexts","extra"];function md(e,t={}){try{return Nr(e,t)}catch(r){t.onFallback?.(r instanceof Error?r.message:"unknown")}try{return Nr(Yl(e),t)}catch{return null}}function Yl(e){const t={...e};for(const r of Cr)delete t[r];for(const[r,n]of Object.entries(t))if(n&&typeof n=="object"&&!Array.isArray(n)){const o={...n};for(const i of Cr)delete o[i];t[r]=o}return t}var Xe="/home",Ql=/^[a-z0-9]{16,64}$/,ef=new Set(["none","local"]);function Mt(e){return typeof e!="string"||ef.has(e)?!1:Ql.test(e)}function ve(e){const t=e.indexOf("#"),r=e.indexOf("?");let n=-1;return r>=0&&(t<0||r<t)?n=r:t>=0&&(n=t),n<0?{path:e,suffix:""}:{path:e.slice(0,n),suffix:e.slice(n)}}function mt(e){if(typeof e!="string")return!1;const t=e.trim();return!(!t||t.startsWith("//")||/^[a-z][a-z0-9+.-]*:/i.test(t)||t.includes("\\"))}function ne(e){try{return decodeURIComponent(e)}catch{return e}}function Re(e){return e?e.startsWith("/")?e.replace(/^\/+/,"/"):`/${e}`:"/"}function De(e){if(typeof e!="string"||!e)return null;const{path:t}=ve(e),r=Re(t),n=/^\/p\/([^/]+)(\/.*)?$/.exec(r);if(!n)return null;const o=ne(n[1]);return Mt(o)?{projectId:o,relativePath:n[2]||"/"}:null}function vd(e){if(typeof e!="string"||!e)return null;const{path:t}=ve(e),r=/^\/p\/([^/]+)(\/.*)?$/.exec(Re(t));return r?ne(r[1]):null}function gd(e){return De(e)!==null}function vt(e,t){const r=typeof t=="string"&&t.trim()?t.trim():"/";if(!Mt(e))return mt(r)?Re(r):"/";const n=`/p/${encodeURIComponent(e)}`;if(!mt(r))return`${n}${Xe}`;const o=De(r);if(o){const{suffix:c}=ve(r);return`${n}${o.relativePath==="/"?Xe:o.relativePath}${c}`}const{path:i,suffix:s}=ve(r),a=Re(i);return a==="/"?`${n}${Xe}${s}`:`${n}${a}${s}`}function _d(e,t){return vt(t,e)}function yd(e){if(typeof e!="string"||!e)return e;const t=De(e);if(!t)return e;const{suffix:r}=ve(e);return`${t.relativePath}${r}`}var So="project";function tf(e){if(!e)return"";const t=e.startsWith("?")?e.slice(1):e;if(!t)return"";const r=t.split("&").filter(n=>{if(!n)return!1;const o=n.indexOf("=");return ne(o===-1?n:n.slice(0,o))!==So}).join("&");return r?`?${r}`:""}function bd(e){if(!e)return null;const t=e.startsWith("?")?e.slice(1):e;for(const r of t.split("&")){if(!r)continue;const n=r.indexOf("=");if(ne(n===-1?r:r.slice(0,n))!=="project")continue;const o=n===-1?"":ne(r.slice(n+1));if(Mt(o))return o}return null}function wd(e){return e?(e.startsWith("?")?e.slice(1):e).split("&").some(t=>{if(!t)return!1;const r=t.indexOf("=");return ne(r===-1?t:t.slice(0,r))===So}):!1}function $d(e){const{logicalTarget:t,projectId:r}=e,n=typeof t=="string"&&t?t:"/";if(!mt(n))return vt(r,"/");const o=n.indexOf("#"),i=o>=0?n.slice(o):"",s=o>=0?n.slice(0,o):n,a=s.indexOf("?"),c=`${a>=0?s.slice(0,a):s}${tf(a>=0?s.slice(a):"")}${i}`;return De(c)?c:vt(r,c)}export{Mf as $,af as $t,ud as A,lf as At,ed as B,Tf as Bt,fd as C,vf as Ct,zl as D,mf as Dt,go as E,pf as Et,sd as F,co as Ft,vl as G,Ru as Gt,ml as H,bf as Ht,rd as I,hf as It,Xf as J,ff as Jt,Gf as K,at as Kt,td as L,yf as Lt,od as M,Pf as Mt,nd as N,Sf as Nt,ad as O,Ef as Ot,id as P,wf as Pt,Hf as Q,cf as Qt,ft as R,Pr as Rt,ld as S,gf as St,X as T,Zu as Tt,_l as U,su as Ut,Yf as V,zf as Vt,gl as W,kf as Wt,Kf as X,qc as Xt,hl as Y,Hc as Yt,Vf as Z,uf as Zt,pd as _,Zf as _t,mt as a,Ct as at,dd as b,Uu as bt,De as c,Wf as ct,_d as d,sl as dt,sf as en,ll as et,tf as f,Nf as ft,Nr as g,Rf as gt,md as h,nl as ht,wd as i,Uf as it,$l as j,ju as jt,cd as k,$f as kt,bd as l,xf as lt,Cr as m,Cf as mt,vt as n,nf as nn,Jf as nt,Mt as o,Df as ot,yd as p,jf as pt,qf as q,df as qt,$d as r,rf as rn,Ff as rt,gd as s,Bf as st,Xe as t,of as tn,Lf as tt,vd as u,il as ut,Kl as v,If as vt,Al as w,_f as wt,re as x,Af as xt,hd as y,ao as yt,Qf as z,Of as zt};
|
|
58
58
|
|
|
59
|
-
//# sourceMappingURL=project-route-
|
|
59
|
+
//# sourceMappingURL=project-route-Nif61zEo.js.map
|