@decocms/mesh 1.1.0 → 1.1.1
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/{AlertCircle-CRDUE68O.js → AlertCircle-Chhij1Oy.js} +1 -1
- package/dist/client/assets/{ArrowLeft-Iy4pjcqu.js → ArrowLeft-D6tnGfBt.js} +1 -1
- package/dist/client/assets/{ChevronDown-Dj0YzNJ5.js → ChevronDown-CgQNiJkO.js} +1 -1
- package/dist/client/assets/{Clock-BGo4abZy.js → Clock-DCYkShqR.js} +1 -1
- package/dist/client/assets/{Code01-C2mtSXCH.js → Code01-C94CaYep.js} +1 -1
- package/dist/client/assets/{Copy01-08G580G9.js → Copy01-D_Mdx0Pg.js} +1 -1
- package/dist/client/assets/{CpuChip02-vo-KC-ou.js → CpuChip02-CPlOIGho.js} +1 -1
- package/dist/client/assets/{DotsVertical-CDfNa7KY.js → DotsVertical-Cno9u2p2.js} +1 -1
- package/dist/client/assets/{File06-BwkobN1x.js → File06-Aynv5CgR.js} +1 -1
- package/dist/client/assets/{GitBranch01-Dus6D2gU.js → GitBranch01-ry350bue.js} +1 -1
- package/dist/client/assets/{Inbox01-DrIFHYCY.js → Inbox01-CVa4M8_i.js} +1 -1
- package/dist/client/assets/{InfoCircle-B76kcv1L.js → InfoCircle-Bdc1UZh_.js} +1 -1
- package/dist/client/assets/{Key01-RxQv3BJR.js → Key01-hqP79at_.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BdHgX43H.js → LinkExternal01-DnJp4-3N.js} +1 -1
- package/dist/client/assets/{Loading01-BtznjYdD.js → Loading01-ijJ9WBV1.js} +1 -1
- package/dist/client/assets/{Lock01-DGk0NR9v.js → Lock01-Dh0vU2Wh.js} +1 -1
- package/dist/client/assets/{Play-D_dkbQEF.js → Play-BhKKPmQz.js} +1 -1
- package/dist/client/assets/{Plus-Cmmt6kdX.js → Plus-Bx5vW5Pw.js} +1 -1
- package/dist/client/assets/{SearchMd-Csv5Q_gT.js → SearchMd-6q3Womqs.js} +1 -1
- package/dist/client/assets/{Terminal-mFLPBz-Y.js → Terminal-CScId5Gm.js} +1 -1
- package/dist/client/assets/{Trash01-ZjdY9Thx.js → Trash01-Dpne-hH8.js} +1 -1
- package/dist/client/assets/{Upload01-BL_smb86.js → Upload01-DiOTIeUO.js} +1 -1
- package/dist/client/assets/{X-DBHfQHAW.js → X-o0W9skNS.js} +1 -1
- package/dist/client/assets/{XClose-BjfF1u26.js → XClose-Hf5x2fDm.js} +1 -1
- package/dist/client/assets/{alert-dialog-CLKrwazh.js → alert-dialog-lIrOrUAe.js} +1 -1
- package/dist/client/assets/{auth-xselgzK2.js → auth-CX8buOs4.js} +1 -1
- package/dist/client/assets/{auth-catchall-L5hNy_48.js → auth-catchall-BkwZtj8t.js} +1 -1
- package/dist/client/assets/{avatar-D3l3SwY5.js → avatar-DYWiwzHT.js} +1 -1
- package/dist/client/assets/{badge-6daA1Xk-.js → badge-DadBZYFc.js} +1 -1
- package/dist/client/assets/{button-CFHFP204.js → button-Cr6E3Zah.js} +1 -1
- package/dist/client/assets/{card-DhbXb2hL.js → card-C2NrvtqW.js} +1 -1
- package/dist/client/assets/{checkbox-BUzjaLuN.js → checkbox-CzTPuzXG.js} +1 -1
- package/dist/client/assets/{collection-detail-D-1rhDCF.js → collection-detail-Cw-0Ldlz.js} +46 -46
- package/dist/client/assets/{collection-display-button-s533wXMW.js → collection-display-button-B7qSJRi3.js} +1 -1
- package/dist/client/assets/{collection-header-BTy0NEKS.js → collection-header-B_d7_qHc.js} +1 -1
- package/dist/client/assets/{collection-page-CVrAS9E8.js → collection-page-DABLhXqe.js} +1 -1
- package/dist/client/assets/{collection-search-CF2FAa9j.js → collection-search-r3DNZn4l.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CIM6pfWy.js → collection-table-wrapper-DFQTmAIE.js} +1 -1
- package/dist/client/assets/{connection-card-CoYgiSAy.js → connection-card-BXlOCQh2.js} +1 -1
- package/dist/client/assets/{connection-detail-D9Nx3j__.js → connection-detail-Co23Kme7.js} +1 -1
- package/dist/client/assets/{connections-DwXpLEQ7.js → connections-DYkeAsVf.js} +1 -1
- package/dist/client/assets/{core-UzwkWBsa.js → core-D4OhC65v.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-DPCOgwS8.js → create-organization-dialog-nBQd-tjn.js} +1 -1
- package/dist/client/assets/{dialog-DDJjJiXv.js → dialog-BwdAucXJ.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BVDy9llW.js → dropdown-menu-DRM8ajGJ.js} +1 -1
- package/dist/client/assets/{env-vars-editor-CSYlB5et.js → env-vars-editor-C11wezQg.js} +1 -1
- package/dist/client/assets/{error-boundary-BxGgxrSw.js → error-boundary-BxBuLeJo.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DYIo3urs.js → extract-connection-data-C_UXf1JR.js} +1 -1
- package/dist/client/assets/{form-O3ENwuWy.js → form-0XqB8VkL.js} +1 -1
- package/dist/client/assets/{formatDistanceToNow-DbTeYEPs.js → formatDistanceToNow-DDVdovHq.js} +1 -1
- package/dist/client/assets/{gateway-detail-4NLA7mwB.js → gateway-detail-DelDQ-Rq.js} +1 -1
- package/dist/client/assets/{gateways-Chp0OiTi.js → gateways-fhY3rI63.js} +1 -1
- package/dist/client/assets/{home-C7yAtry6.js → home-DhfzoKnv.js} +1 -1
- package/dist/client/assets/{index-CiPLnea-.js → index-BAX9m6md.js} +2 -2
- package/dist/client/assets/{index-DIWvfi3d.js → index-Di9rheM6.js} +1 -1
- package/dist/client/assets/{index-B9tJom0a.js → index-OQXTfZYS.js} +1 -1
- package/dist/client/assets/{index-C6fnPeNc.js → index-lbScTdWB.js} +1 -1
- package/dist/client/assets/{index-BFYCiRaa.css → index-rESQzSL0.css} +1 -1
- package/dist/client/assets/{input-iugRl47V.js → input-BJZKhFPd.js} +1 -1
- package/dist/client/assets/json-CFlNQcLh.js +1 -0
- package/dist/client/assets/{json-syntax-highlighter-o9Q8Bpjl.js → json-syntax-highlighter-nU-euVt8.js} +2 -2
- package/dist/client/assets/{layout-pV-LEIdm.js → layout-CH_UUP18.js} +1 -1
- package/dist/client/assets/{lazy-highlighter-Czs-NOYe.js → lazy-highlighter-CKbv8kMY.js} +1 -1
- package/dist/client/assets/{localstorage-keys-0rhjy_fp.js → localstorage-keys-CH6-Ca8T.js} +1 -1
- package/dist/client/assets/{login-CwJiA9wL.js → login-D-0oUGsc.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BKyHMwxJ.js → mcp-oauth-Dfazq7Kn.js} +1 -1
- package/dist/client/assets/{members-tsvd98Wp.js → members-Bvg9zof-.js} +1 -1
- package/dist/client/assets/{monitoring-DqS96I2Z.js → monitoring-DTZjVL1E.js} +1 -1
- package/dist/client/assets/{oauth-callback-DrBJtf1G.js → oauth-callback-6FTqNUKF.js} +1 -1
- package/dist/client/assets/{page-CIddjpQi.js → page-DNSGoiXc.js} +1 -1
- package/dist/client/assets/{popover-B_NyiW1Q.js → popover-DXIVGBua.js} +1 -1
- package/dist/client/assets/prism-light-DCXldjmj.js +1 -0
- package/dist/client/assets/{resizable-DR6TRvc0.js → resizable-CgllqzTc.js} +3 -3
- package/dist/client/assets/{resource-tabs-tnRJokpH.js → resource-tabs-BygE97ua.js} +1 -1
- package/dist/client/assets/{select-DfammiWD.js → select-ykoytU3x.js} +1 -1
- package/dist/client/assets/{settings-eYWaSfqs.js → settings-CxGxapUp.js} +1 -1
- package/dist/client/assets/{shell-layout-CuchTujm.js → shell-layout-BIudK5Ys.js} +1 -1
- package/dist/client/assets/{spinner-D4EsgSmE.js → spinner-BD7dyC65.js} +1 -1
- package/dist/client/assets/{store-BbbKGxbw.js → store-CeL_Jp7-.js} +1 -1
- package/dist/client/assets/{store-app-detail-N830c_Ks.js → store-app-detail-DXVTQgPU.js} +1 -1
- package/dist/client/assets/{switch-BXWlo3EE.js → switch-DRJZ0tTj.js} +1 -1
- package/dist/client/assets/{textarea-D1hQDzao.js → textarea-DCD8uj7C.js} +1 -1
- package/dist/client/assets/{tools-list-Bwj-fDqE.js → tools-list-CIaSVZ31.js} +1 -1
- package/dist/client/assets/{tooltip-BsevTbJB.js → tooltip-ft1RTR-v.js} +1 -1
- package/dist/client/assets/{types-j-TFLOzi.js → types-BV5sQ6JF.js} +1 -1
- package/dist/client/assets/{use-binding-CXIqq1bv.js → use-binding-D3xBye9L.js} +2 -2
- package/dist/client/assets/{use-connection-jCRGwpV6.js → use-connection-C7xrQrun.js} +1 -1
- package/dist/client/assets/{use-connection-resources-DJbpQoWM.js → use-connection-resources-Bqlxdfto.js} +1 -1
- package/dist/client/assets/{use-gateway-J9ygFzp4.js → use-gateway-CFo4NnYE.js} +1 -1
- package/dist/client/assets/{use-list-state-BGC5b0Pz.js → use-list-state-C_2Sj-cw.js} +1 -1
- package/dist/client/assets/{use-mcp-xRGeWjGX.js → use-mcp-nC4pIWOp.js} +1 -1
- package/dist/client/assets/{use-members-D3_MeK6r.js → use-members-CnIFz8X5.js} +1 -1
- package/dist/client/assets/{use-mobile-zZh9WHEY.js → use-mobile-iQFQFevV.js} +1 -1
- package/dist/client/assets/{use-organization-settings-_KK3dEko.js → use-organization-settings-CNoBVLFc.js} +1 -1
- package/dist/client/assets/{use-tool-call-Bukcla53.js → use-tool-call-DfCZUQ8y.js} +1 -1
- package/dist/client/assets/useQuery-DJsYPxOW.js +1 -0
- package/dist/client/assets/{useSuspenseInfiniteQuery-Cdb8QUCh.js → useSuspenseInfiniteQuery-CNo9dG89.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CCJ4Oh3w.js → view-mode-toggle-CLU-iE2c.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +41 -41
- package/dist/server/server.js +43 -43
- package/package.json +1 -1
- package/dist/client/assets/json-BJR-gxzf.js +0 -1
- package/dist/client/assets/prism-light-CEisnFKn.js +0 -1
- package/dist/client/assets/useQuery-DDngHzZ8.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b1 as oe,b2 as ss,w as P,aM as J,Y as he,aL as gr,W as B,aJ as aa,aH as de,aN as te,_ as Pe,b3 as it,b4 as oa,v as A,b5 as Br,b6 as ns,b7 as ia,b8 as qn,b9 as ca,ba as ua,bb as la,a3 as Mn,aK as Qr,aO as ge,X as we,bc as lr,bd as da,be as fa}from"./index-CiPLnea-.js";import{C as ha,P as pa,a as ma,G as ya,M as G,E as Z,b as ga,L as _a,c as va,i as ft,d as ba,e as Ur,f as wa,R as Ye,g as Sa,h as Hr,j as $a,k as Ea,l as Ta,T as as,m as jn,n as ka,o as Pa,p as Ia,q as Oa,I as Ra,S as Ca,r as bt,s as Na,t as qa,u as Ma,v as ja,w as Aa,x as Da,y as An,z as La,A as Ua,B as Ha,D as Va,F as Fa,U as Ne,H as Je,J as dr,K as mt,N as xa}from"./auth-xselgzK2.js";var za=class{apply(t,e){if(!e.type)return;const r=Array.isArray(e.type)?e.type:[e.type],s=new Set(r);if(s.has("string")||(t.string=!1),!s.has("number")&&!s.has("integer")&&(t.number=!1),s.has("boolean")||(t.boolean=!1),s.has("null")||(t.null=!1),s.has("array")||(t.array=!1),s.has("object")||(t.object=!1),s.has("integer")&&t.number!==!1){const a=t.number||J();a instanceof it&&(t.number=a.int())}}},Ka=class{apply(t,e){if(e.const===void 0)return;const r=e.const;t.string=!1,t.number=!1,t.boolean=!1,t.null=!1,t.array=!1,t.object=!1,typeof r=="string"?t.string=te(r):typeof r=="number"?t.number=te(r):typeof r=="boolean"?t.boolean=te(r):r===null?t.null=gr():Array.isArray(r)?t.array=void 0:typeof r=="object"&&(t.object=void 0)}},Wa=class{apply(t,e){if(!e.enum)return;if(e.enum.length===0){e.type||(t.string=!1,t.number=!1,t.boolean=!1,t.null=!1,t.array=!1,t.object=!1);return}const r={string:e.enum.filter(s=>typeof s=="string"),number:e.enum.filter(s=>typeof s=="number"),boolean:e.enum.filter(s=>typeof s=="boolean"),null:e.enum.filter(s=>s===null),array:e.enum.filter(s=>Array.isArray(s)),object:e.enum.filter(s=>typeof s=="object"&&s!==null&&!Array.isArray(s))};t.string=this.createTypeSchema(r.string,"string"),t.number=this.createTypeSchema(r.number,"number"),t.boolean=this.createTypeSchema(r.boolean,"boolean"),t.null=r.null.length>0?gr():!1,t.array=r.array.length>0?void 0:!1,t.object=r.object.length>0?void 0:!1}createTypeSchema(t,e){if(t.length===0)return!1;if(t.length===1)return te(t[0]);if(e==="string")return Pe(t);if(e==="number"){const[r,s,...a]=t;return de([te(r),te(s),...a.map(n=>te(n))])}return e==="boolean"?de([te(!0),te(!1)]):!1}},Ga=class{apply(t,e){const r=e;if(r.type==="string"&&r.format==="binary"&&r.contentEncoding==="binary"){let s=oa();r.minLength!==void 0&&(s=s.min(r.minLength)),r.maxLength!==void 0&&(s=s.max(r.maxLength)),r.contentMediaType!==void 0&&(s=s.mime(r.contentMediaType)),t.file=s,t.string=!1}}},Ja=class{apply(t,e){const r=e;e.type===void 0&&(r.minLength!==void 0||r.maxLength!==void 0||r.pattern!==void 0)&&t.string===void 0&&(t.string=P())}},Ba=class{apply(t,e){const r=e;if(r.minLength!==void 0&&t.string!==!1){const s=t.string||P();s instanceof Br&&(t.string=s.refine(a=>Array.from(a).length>=r.minLength,{message:`String must be at least ${r.minLength} characters long`}))}}},Qa=class{apply(t,e){const r=e;if(r.maxLength!==void 0&&t.string!==!1){const s=t.string||P();s instanceof Br&&(t.string=s.refine(a=>Array.from(a).length<=r.maxLength,{message:`String must be at most ${r.maxLength} characters long`}))}}},Za=class{apply(t,e){const r=e;if(r.pattern&&t.string!==!1){const s=t.string||P();if(s instanceof Br){const a=new RegExp(r.pattern);t.string=s.regex(a)}}}},Ya=class{apply(t,e){const r=e;if(r.minimum!==void 0&&t.number!==!1){const s=t.number||J();s instanceof it&&(t.number=s.min(r.minimum))}}},Xa=class{apply(t,e){const r=e;if(r.maximum!==void 0&&t.number!==!1){const s=t.number||J();s instanceof it&&(t.number=s.max(r.maximum))}}},eo=class{apply(t,e){const r=e;if(r.exclusiveMinimum!==void 0&&t.number!==!1){const s=t.number||J();s instanceof it&&(typeof r.exclusiveMinimum=="number"?t.number=s.gt(r.exclusiveMinimum):t.number=!1)}}},to=class{apply(t,e){const r=e;if(r.exclusiveMaximum!==void 0&&t.number!==!1){const s=t.number||J();s instanceof it&&(typeof r.exclusiveMaximum=="number"?t.number=s.lt(r.exclusiveMaximum):t.number=!1)}}},ro=class{apply(t,e){const r=e;if(r.multipleOf!==void 0&&t.number!==!1){const s=t.number||J();s instanceof it&&(t.number=s.refine(a=>{if(r.multipleOf===0)return!1;const n=a/r.multipleOf,i=Math.round(n),o=Math.min(Math.abs(a)*Number.EPSILON*10,Math.abs(r.multipleOf)*Number.EPSILON*10);return Math.abs(n-i)<=o/Math.abs(r.multipleOf)},{message:`Must be a multiple of ${r.multipleOf}`}))}}},so=class{apply(t,e){const r=e;e.type===void 0&&(r.minItems!==void 0||r.maxItems!==void 0||r.items!==void 0||r.prefixItems!==void 0)&&t.array===void 0&&(t.array=B(oe()))}},no=class{apply(t,e){const r=e;r.minItems!==void 0&&t.array!==!1&&(t.array=(t.array||B(oe())).min(r.minItems))}},ao=class{apply(t,e){const r=e;r.maxItems!==void 0&&t.array!==!1&&(t.array=(t.array||B(oe())).max(r.maxItems))}},oo=class{apply(t,e){const r=e;if(t.array!==!1)if(Array.isArray(r.items))t.array=t.array||B(oe());else if(r.items&&typeof r.items!="boolean"&&!r.prefixItems){const s=fe(r.items);let a=B(s);if(t.array&&t.array instanceof ia){const n=t.array._def;n.checks&&n.checks.forEach(i=>{if(i._zod&&i._zod.def){const o=i._zod.def;o.check==="min_length"&&o.minimum!==void 0?a=a.min(o.minimum):o.check==="max_length"&&o.maximum!==void 0&&(a=a.max(o.maximum))}})}t.array=a}else typeof r.items=="boolean"&&r.items===!1?r.prefixItems?t.array=t.array||B(oe()):t.array=B(oe()).max(0):typeof r.items=="boolean"&&r.items===!0?t.array=t.array||B(oe()):r.prefixItems&&(t.array=t.array||B(oe()))}},io=class{apply(t,e){if(e.type!=="array")return;const r=e;if(!Array.isArray(r.items)||t.array===!1)return;const s=r.items.map(n=>fe(n));let a;s.length===0?a=ns([]):a=ns(s),r.minItems!==void 0&&r.minItems>s.length&&(a=!1),r.maxItems!==void 0&&r.maxItems<s.length&&(a=!1),t.tuple=a,t.array=!1}},co=class{apply(t,e){const r=e;t.object!==!1&&(r.properties||r.required||r.additionalProperties!==void 0)&&(t.object=t.object||A({}).passthrough())}},uo=class{apply(t,e){const r=e;e.type===void 0&&(r.maxProperties!==void 0||r.minProperties!==void 0)&&t.object===void 0&&(t.object=A({}).passthrough())}},lo=class{apply(t,e){const r=e;if(r.maxProperties!==void 0&&t.object!==!1){const s=t.object||A({}).passthrough();t.object=s.refine(a=>Object.keys(a).length<=r.maxProperties,{message:`Object must have at most ${r.maxProperties} properties`})}}},fo=class{apply(t,e){const r=e;if(r.minProperties!==void 0&&t.object!==!1){const s=t.object||A({}).passthrough();t.object=s.refine(a=>Object.keys(a).length>=r.minProperties,{message:`Object must have at least ${r.minProperties} properties`})}}};function _t(t,e){if(t===e)return!0;if(t==null||e==null)return t===e;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e))return t.length!==e.length?!1:t.every((r,s)=>_t(r,e[s]));if(typeof t=="object"&&typeof e=="object"){const r=Object.keys(t),s=Object.keys(e);return r.length!==s.length?!1:r.every(a=>s.includes(a)&&_t(t[a],e[a]))}return!1}function ho(){return t=>{if(!Array.isArray(t))return!0;const e=[];return t.every(r=>e.some(a=>_t(r,a))?!1:(e.push(r),!0))}}function fr(t,e){return t.safeParse(e).success}var po=class{apply(t,e){if(!e.not)return t;const r=fe(e.not);return t.refine(s=>!fr(r,s),{message:"Value must not match the 'not' schema"})}},mo=class{apply(t,e){return e.uniqueItems!==!0?t:t.refine(ho(),{message:"Array items must be unique"})}},yo=class{apply(t,e){return!e.allOf||e.allOf.length===0?t:e.allOf.map(s=>fe(s)).reduce((s,a)=>qn(s,a),t)}},go=class{apply(t,e){if(!e.anyOf||e.anyOf.length===0)return t;const r=e.anyOf.length===1?fe(e.anyOf[0]):de([fe(e.anyOf[0]),fe(e.anyOf[1]),...e.anyOf.slice(2).map(s=>fe(s))]);return qn(t,r)}},_o=class{apply(t,e){if(!e.oneOf||e.oneOf.length===0)return t;const r=e.oneOf.map(s=>fe(s));return t.refine(s=>{let a=0;for(const n of r)if(n.safeParse(s).success&&(a++,a>1))return!1;return a===1},{message:"Value must match exactly one of the oneOf schemas"})}},vo=class{apply(t,e){const r=e;if(r.prefixItems&&Array.isArray(r.prefixItems)){const a=r.prefixItems.map(n=>fe(n));return t.refine(n=>{if(!Array.isArray(n))return!0;for(let i=0;i<Math.min(n.length,a.length);i++)if(!fr(a[i],n[i]))return!1;if(n.length>a.length){if(typeof r.items=="boolean"&&r.items===!1)return!1;if(r.items&&typeof r.items=="object"&&!Array.isArray(r.items)){const i=fe(r.items);for(let o=a.length;o<n.length;o++)if(!fr(i,n[o]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return t}},bo=class{apply(t,e){const r=e;if(!r.properties&&!r.required&&r.additionalProperties!==!1)return t;if(t instanceof ca||t instanceof ua){const s={};if(r.properties)for(const[a,n]of Object.entries(r.properties))n!==void 0&&(s[a]=fe(n));if(r.required&&Array.isArray(r.required)){const a=new Set(r.required);for(const n of Object.keys(s))a.has(n)||(s[n]=s[n].optional())}else for(const a of Object.keys(s))s[a]=s[a].optional();return r.additionalProperties===!1?A(s):A(s).passthrough()}return t.refine(s=>{if(typeof s!="object"||s===null||Array.isArray(s))return!0;if(r.properties){for(const[a,n]of Object.entries(r.properties))if(n!==void 0&&Object.getOwnPropertyDescriptor(s,a)!==void 0&&!fe(n).safeParse(s[a]).success)return!1}if(r.required&&Array.isArray(r.required)){for(const a of r.required)if(!(Object.getOwnPropertyDescriptor(s,a)!==void 0))return!1}if(r.additionalProperties===!1&&r.properties){const a=new Set(Object.keys(r.properties));for(const n in s)if(!a.has(n))return!1}return!0},{message:"Object constraints validation failed"})}},wo=class{apply(t,e){if(!e.enum||e.enum.length===0)return t;const r=e.enum.filter(s=>Array.isArray(s)||typeof s=="object"&&s!==null);return r.length===0?t:t.refine(s=>typeof s!="object"||s===null?!0:r.some(a=>_t(s,a)),{message:"Value must match one of the enum values"})}},So=class{apply(t,e){if(e.const===void 0)return t;const r=e.const;return typeof r!="object"||r===null?t:t.refine(s=>_t(s,r),{message:"Value must equal the const value"})}},$o=class{apply(t,e){return e.description&&(t=t.describe(e.description)),t}},Eo=class{apply(t,e){var r;const s=e;return!((r=s.required)!=null&&r.includes("__proto__"))||e.type!==void 0?t:oe().refine(a=>this.validateRequired(a,s.required),{message:"Missing required properties"})}validateRequired(t,e){return typeof t!="object"||t===null||Array.isArray(t)?!0:e.every(r=>Object.prototype.hasOwnProperty.call(t,r))}},To=class{apply(t,e){var r;const s=e;if(s.contains===void 0)return t;const a=fe(s.contains),n=(r=s.minContains)!=null?r:1,i=s.maxContains;return t.refine(o=>{if(!Array.isArray(o))return!0;let u=0;for(const m of o)fr(a,m)&&u++;return!(u<n||i!==void 0&&u>i)},{message:"Array must contain required items matching the schema"})}},ko=class{apply(t,e){const{default:r}=e;return r===void 0||!t.safeParse(r).success?t:t.default(r)}},Po=[new Ka,new Wa,new za,new Ga,new Ja,new so,new uo,new Ba,new Qa,new Za,new Ya,new Xa,new eo,new to,new ro,new io,new no,new ao,new oo,new lo,new fo,new co],Io=[new Eo,new wo,new So,new yo,new go,new _o,new vo,new bo,new To,new po,new mo,new ko,new $o];function fe(t){if(typeof t=="boolean")return t?oe():ss();const e={};for(const a of Po)a.apply(e,t);const r=[];if(e.string!==!1&&r.push(e.string||P()),e.number!==!1&&r.push(e.number||J()),e.boolean!==!1&&r.push(e.boolean||he()),e.null!==!1&&r.push(e.null||gr()),e.array!==!1&&r.push(e.array||B(oe())),e.tuple!==!1&&e.tuple!==void 0&&r.push(e.tuple),e.object!==!1)if(e.object)r.push(e.object);else{const a=aa(n=>typeof n=="object"&&n!==null&&!Array.isArray(n),"Must be an object, not an array");r.push(a)}e.file!==!1&&e.file!==void 0&&r.push(e.file);let s;r.length===0?s=ss():r.length===1?s=r[0]:Object.keys(t).some(n=>n!=="$schema"&&n!=="title"&&n!=="description")?s=de(r):s=oe();for(const a of Io)s=a.apply(s,t);return s}function _r(t){return!!t._zod}function He(t,e){return _r(t)?la(t,e):t.safeParse(e)}function Dn(t){if(!t)return;let e;if(_r(t)?e=t._zod?.def?.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function Oo(t){if(_r(t)){const n=t._zod?.def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}}const r=t._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}const s=t.value;if(s!==void 0)return s}function xe(t){return t==="completed"||t==="failed"||t==="cancelled"}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function os(t){const r=Dn(t)?.method;if(!r)throw new Error("Schema is missing a method literal");const s=Oo(r);if(typeof s!="string")throw new Error("Schema method literal must be a string");return s}function is(t,e){const r=He(t,e);if(!r.success)throw r.error;return r.data}const Ro=6e4;class Co{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(ha,r=>{this._oncancel(r)}),this.setNotificationHandler(pa,r=>{this._onprogress(r)}),this.setRequestHandler(ma,r=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(ya,async(r,s)=>{const a=await this._taskStore.getTask(r.params.taskId,s.sessionId);if(!a)throw new G(Z.InvalidParams,"Failed to retrieve task: Task not found");return{...a}}),this.setRequestHandler(ga,async(r,s)=>{const a=async()=>{const n=r.params.taskId;if(this._taskMessageQueue){let o;for(;o=await this._taskMessageQueue.dequeue(n,s.sessionId);){if(o.type==="response"||o.type==="error"){const u=o.message,m=u.id,h=this._requestResolvers.get(m);if(h)if(this._requestResolvers.delete(m),o.type==="response")h(u);else{const $=u,g=new G($.error.code,$.error.message,$.error.data);h(g)}else{const $=o.type==="response"?"Response":"Error";this._onerror(new Error(`${$} handler missing for request ${m}`))}continue}await this._transport?.send(o.message,{relatedRequestId:s.requestId})}}const i=await this._taskStore.getTask(n,s.sessionId);if(!i)throw new G(Z.InvalidParams,`Task not found: ${n}`);if(!xe(i.status))return await this._waitForTaskUpdate(n,s.signal),await a();if(xe(i.status)){const o=await this._taskStore.getTaskResult(n,s.sessionId);return this._clearTaskQueue(n),{...o,_meta:{...o._meta,[Ye]:{taskId:n}}}}return await a()};return await a()}),this.setRequestHandler(_a,async(r,s)=>{try{const{tasks:a,nextCursor:n}=await this._taskStore.listTasks(r.params?.cursor,s.sessionId);return{tasks:a,nextCursor:n,_meta:{}}}catch(a){throw new G(Z.InvalidParams,`Failed to list tasks: ${a instanceof Error?a.message:String(a)}`)}}),this.setRequestHandler(va,async(r,s)=>{try{const a=await this._taskStore.getTask(r.params.taskId,s.sessionId);if(!a)throw new G(Z.InvalidParams,`Task not found: ${r.params.taskId}`);if(xe(a.status))throw new G(Z.InvalidParams,`Cannot cancel task in terminal status: ${a.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",s.sessionId),this._clearTaskQueue(r.params.taskId);const n=await this._taskStore.getTask(r.params.taskId,s.sessionId);if(!n)throw new G(Z.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...n}}catch(a){throw a instanceof G?a:new G(Z.InvalidRequest,`Failed to cancel task: ${a instanceof Error?a.message:String(a)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,r,s,a,n=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(a,r),startTime:Date.now(),timeout:r,maxTotalTimeout:s,resetTimeoutOnProgress:n,onTimeout:a})}_resetTimeout(e){const r=this._timeoutInfo.get(e);if(!r)return!1;const s=Date.now()-r.startTime;if(r.maxTotalTimeout&&s>=r.maxTotalTimeout)throw this._timeoutInfo.delete(e),G.fromError(Z.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:s});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(e){const r=this._timeoutInfo.get(e);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;const r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};const s=this.transport?.onerror;this._transport.onerror=n=>{s?.(n),this._onerror(n)};const a=this._transport?.onmessage;this._transport.onmessage=(n,i)=>{a?.(n,i),ft(n)||ba(n)?this._onresponse(n):Ur(n)?this._onrequest(n,i):wa(n)?this._onnotification(n):this._onerror(new Error(`Unknown message type: ${JSON.stringify(n)}`))},await this._transport.start()}_onclose(){const e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();const r=G.fromError(Z.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const s of e.values())s(r)}_onerror(e){this.onerror?.(e)}_onnotification(e){const r=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(e)).catch(s=>this._onerror(new Error(`Uncaught error in notification handler: ${s}`)))}_onrequest(e,r){const s=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,a=this._transport,n=e.params?._meta?.[Ye]?.taskId;if(s===void 0){const h={jsonrpc:"2.0",id:e.id,error:{code:Z.MethodNotFound,message:"Method not found"}};n&&this._taskMessageQueue?this._enqueueTaskMessage(n,{type:"error",message:h,timestamp:Date.now()},a?.sessionId).catch($=>this._onerror(new Error(`Failed to enqueue error response: ${$}`))):a?.send(h).catch($=>this._onerror(new Error(`Failed to send an error response: ${$}`)));return}const i=new AbortController;this._requestHandlerAbortControllers.set(e.id,i);const o=Sa(e.params)?e.params.task:void 0,u=this._taskStore?this.requestTaskStore(e,a?.sessionId):void 0,m={signal:i.signal,sessionId:a?.sessionId,_meta:e.params?._meta,sendNotification:async h=>{const $={relatedRequestId:e.id};n&&($.relatedTask={taskId:n}),await this.notification(h,$)},sendRequest:async(h,$,g)=>{const y={...g,relatedRequestId:e.id};n&&!y.relatedTask&&(y.relatedTask={taskId:n});const v=y.relatedTask?.taskId??n;return v&&u&&await u.updateTaskStatus(v,"input_required"),await this.request(h,$,y)},authInfo:r?.authInfo,requestId:e.id,requestInfo:r?.requestInfo,taskId:n,taskStore:u,taskRequestedTtl:o?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>s(e,m)).then(async h=>{if(i.signal.aborted)return;const $={result:h,jsonrpc:"2.0",id:e.id};n&&this._taskMessageQueue?await this._enqueueTaskMessage(n,{type:"response",message:$,timestamp:Date.now()},a?.sessionId):await a?.send($)},async h=>{if(i.signal.aborted)return;const $={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(h.code)?h.code:Z.InternalError,message:h.message??"Internal error",...h.data!==void 0&&{data:h.data}}};n&&this._taskMessageQueue?await this._enqueueTaskMessage(n,{type:"error",message:$,timestamp:Date.now()},a?.sessionId):await a?.send($)}).catch(h=>this._onerror(new Error(`Failed to send response: ${h}`))).finally(()=>{this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){const{progressToken:r,...s}=e.params,a=Number(r),n=this._progressHandlers.get(a);if(!n){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}const i=this._responseHandlers.get(a),o=this._timeoutInfo.get(a);if(o&&i&&o.resetTimeoutOnProgress)try{this._resetTimeout(a)}catch(u){this._responseHandlers.delete(a),this._progressHandlers.delete(a),this._cleanupTimeout(a),i(u);return}n(s)}_onresponse(e){const r=Number(e.id),s=this._requestResolvers.get(r);if(s){if(this._requestResolvers.delete(r),ft(e))s(e);else{const i=new G(e.error.code,e.error.message,e.error.data);s(i)}return}const a=this._responseHandlers.get(r);if(a===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let n=!1;if(ft(e)&&e.result&&typeof e.result=="object"){const i=e.result;if(i.task&&typeof i.task=="object"){const o=i.task;typeof o.taskId=="string"&&(n=!0,this._taskProgressTokens.set(o.taskId,r))}}if(n||this._progressHandlers.delete(r),ft(e))a(e);else{const i=G.fromError(e.error.code,e.error.message,e.error.data);a(i)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,r,s){const{task:a}=s??{};if(!a){try{yield{type:"result",result:await this.request(e,r,s)}}catch(i){yield{type:"error",error:i instanceof G?i:new G(Z.InternalError,String(i))}}return}let n;try{const i=await this.request(e,Hr,s);if(i.task)n=i.task.taskId,yield{type:"taskCreated",task:i.task};else throw new G(Z.InternalError,"Task creation did not return a task");for(;;){const o=await this.getTask({taskId:n},s);if(yield{type:"taskStatus",task:o},xe(o.status)){o.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:n},r,s)}:o.status==="failed"?yield{type:"error",error:new G(Z.InternalError,`Task ${n} failed`)}:o.status==="cancelled"&&(yield{type:"error",error:new G(Z.InternalError,`Task ${n} was cancelled`)});return}if(o.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:n},r,s)};return}const u=o.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(m=>setTimeout(m,u)),s?.signal?.throwIfAborted()}}catch(i){yield{type:"error",error:i instanceof G?i:new G(Z.InternalError,String(i))}}}request(e,r,s){const{relatedRequestId:a,resumptionToken:n,onresumptiontoken:i,task:o,relatedTask:u}=s??{};return new Promise((m,h)=>{const $=c=>{h(c)};if(!this._transport){$(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(c){$(c);return}s?.signal?.throwIfAborted();const g=this._requestMessageId++,y={...e,jsonrpc:"2.0",id:g};s?.onprogress&&(this._progressHandlers.set(g,s.onprogress),y.params={...e.params,_meta:{...e.params?._meta||{},progressToken:g}}),o&&(y.params={...y.params,task:o}),u&&(y.params={...y.params,_meta:{...y.params?._meta||{},[Ye]:u}});const v=c=>{this._responseHandlers.delete(g),this._progressHandlers.delete(g),this._cleanupTimeout(g),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:g,reason:String(c)}},{relatedRequestId:a,resumptionToken:n,onresumptiontoken:i}).catch(S=>this._onerror(new Error(`Failed to send cancellation: ${S}`)));const d=c instanceof G?c:new G(Z.RequestTimeout,String(c));h(d)};this._responseHandlers.set(g,c=>{if(!s?.signal?.aborted){if(c instanceof Error)return h(c);try{const d=He(r,c.result);d.success?m(d.data):h(d.error)}catch(d){h(d)}}}),s?.signal?.addEventListener("abort",()=>{v(s?.signal?.reason)});const w=s?.timeout??Ro,l=()=>v(G.fromError(Z.RequestTimeout,"Request timed out",{timeout:w}));this._setupTimeout(g,w,s?.maxTotalTimeout,l,s?.resetTimeoutOnProgress??!1);const p=u?.taskId;if(p){const c=d=>{const S=this._responseHandlers.get(g);S?S(d):this._onerror(new Error(`Response handler missing for side-channeled request ${g}`))};this._requestResolvers.set(g,c),this._enqueueTaskMessage(p,{type:"request",message:y,timestamp:Date.now()}).catch(d=>{this._cleanupTimeout(g),h(d)})}else this._transport.send(y,{relatedRequestId:a,resumptionToken:n,onresumptiontoken:i}).catch(c=>{this._cleanupTimeout(g),h(c)})})}async getTask(e,r){return this.request({method:"tasks/get",params:e},$a,r)}async getTaskResult(e,r,s){return this.request({method:"tasks/result",params:e},r,s)}async listTasks(e,r){return this.request({method:"tasks/list",params:e},Ea,r)}async cancelTask(e,r){return this.request({method:"tasks/cancel",params:e},Ta,r)}async notification(e,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);const s=r?.relatedTask?.taskId;if(s){const o={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[Ye]:r.relatedTask}}};await this._enqueueTaskMessage(s,{type:"notification",message:o,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!r?.relatedRequestId&&!r?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let o={...e,jsonrpc:"2.0"};r?.relatedTask&&(o={...o,params:{...o.params,_meta:{...o.params?._meta||{},[Ye]:r.relatedTask}}}),this._transport?.send(o,r).catch(u=>this._onerror(u))});return}let i={...e,jsonrpc:"2.0"};r?.relatedTask&&(i={...i,params:{...i.params,_meta:{...i.params?._meta||{},[Ye]:r.relatedTask}}}),await this._transport.send(i,r)}setRequestHandler(e,r){const s=os(e);this.assertRequestHandlerCapability(s),this._requestHandlers.set(s,(a,n)=>{const i=is(e,a);return Promise.resolve(r(i,n))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,r){const s=os(e);this._notificationHandlers.set(s,a=>{const n=is(e,a);return Promise.resolve(r(n))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){const r=this._taskProgressTokens.get(e);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,r,s){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const a=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,r,s,a)}async _clearTaskQueue(e,r){if(this._taskMessageQueue){const s=await this._taskMessageQueue.dequeueAll(e,r);for(const a of s)if(a.type==="request"&&Ur(a.message)){const n=a.message.id,i=this._requestResolvers.get(n);i?(i(new G(Z.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(n)):this._onerror(new Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,r){let s=this._options?.defaultTaskPollInterval??1e3;try{const a=await this._taskStore?.getTask(e);a?.pollInterval&&(s=a.pollInterval)}catch{}return new Promise((a,n)=>{if(r.aborted){n(new G(Z.InvalidRequest,"Request cancelled"));return}const i=setTimeout(a,s);r.addEventListener("abort",()=>{clearTimeout(i),n(new G(Z.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,r){const s=this._taskStore;if(!s)throw new Error("No task store configured");return{createTask:async a=>{if(!e)throw new Error("No request provided");return await s.createTask(a,e.id,{method:e.method,params:e.params},r)},getTask:async a=>{const n=await s.getTask(a,r);if(!n)throw new G(Z.InvalidParams,"Failed to retrieve task: Task not found");return n},storeTaskResult:async(a,n,i)=>{await s.storeTaskResult(a,n,i,r);const o=await s.getTask(a,r);if(o){const u=as.parse({method:"notifications/tasks/status",params:o});await this.notification(u),xe(o.status)&&this._cleanupTaskProgressHandler(a)}},getTaskResult:a=>s.getTaskResult(a,r),updateTaskStatus:async(a,n,i)=>{const o=await s.getTask(a,r);if(!o)throw new G(Z.InvalidParams,`Task "${a}" not found - it may have been cleaned up`);if(xe(o.status))throw new G(Z.InvalidParams,`Cannot update task "${a}" from terminal status "${o.status}" to "${n}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await s.updateTaskStatus(a,n,i,r);const u=await s.getTask(a,r);if(u){const m=as.parse({method:"notifications/tasks/status",params:u});await this.notification(m),xe(u.status)&&this._cleanupTaskProgressHandler(a)}},listTasks:a=>s.listTasks(a,r)}}}function cs(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function No(t,e){const r={...t};for(const s in e){const a=s,n=e[a];if(n===void 0)continue;const i=r[a];cs(i)&&cs(n)?r[a]={...i,...n}:r[a]=n}return r}var wt={exports:{}},kr={},Me={},ze={},Pr={},Ir={},Or={},us;function hr(){return us||(us=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(c){if(super(),!t.IDENTIFIER.test(c))throw new Error("CodeGen: name must be a valid identifier");this.str=c}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class s extends e{constructor(c){super(),this._items=typeof c=="string"?[c]:c}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const c=this._items[0];return c===""||c==='""'}get str(){var c;return(c=this._str)!==null&&c!==void 0?c:this._str=this._items.reduce((d,S)=>`${d}${S}`,"")}get names(){var c;return(c=this._names)!==null&&c!==void 0?c:this._names=this._items.reduce((d,S)=>(S instanceof r&&(d[S.str]=(d[S.str]||0)+1),d),{})}}t._Code=s,t.nil=new s("");function a(p,...c){const d=[p[0]];let S=0;for(;S<c.length;)o(d,c[S]),d.push(p[++S]);return new s(d)}t._=a;const n=new s("+");function i(p,...c){const d=[y(p[0])];let S=0;for(;S<c.length;)d.push(n),o(d,c[S]),d.push(n,y(p[++S]));return u(d),new s(d)}t.str=i;function o(p,c){c instanceof s?p.push(...c._items):c instanceof r?p.push(c):p.push($(c))}t.addCodeArg=o;function u(p){let c=1;for(;c<p.length-1;){if(p[c]===n){const d=m(p[c-1],p[c+1]);if(d!==void 0){p.splice(c-1,3,d);continue}p[c++]="+"}c++}}function m(p,c){if(c==='""')return p;if(p==='""')return c;if(typeof p=="string")return c instanceof r||p[p.length-1]!=='"'?void 0:typeof c!="string"?`${p.slice(0,-1)}${c}"`:c[0]==='"'?p.slice(0,-1)+c.slice(1):void 0;if(typeof c=="string"&&c[0]==='"'&&!(p instanceof r))return`"${p}${c.slice(1)}`}function h(p,c){return c.emptyStr()?p:p.emptyStr()?c:i`${p}${c}`}t.strConcat=h;function $(p){return typeof p=="number"||typeof p=="boolean"||p===null?p:y(Array.isArray(p)?p.join(","):p)}function g(p){return new s(y(p))}t.stringify=g;function y(p){return JSON.stringify(p).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=y;function v(p){return typeof p=="string"&&t.IDENTIFIER.test(p)?new s(`.${p}`):a`[${p}]`}t.getProperty=v;function w(p){if(typeof p=="string"&&t.IDENTIFIER.test(p))return new s(`${p}`);throw new Error(`CodeGen: invalid export name: ${p}, use explicit $id name mapping`)}t.getEsmExportName=w;function l(p){return new s(p.toString())}t.regexpCode=l})(Or)),Or}var Rr={},ls;function ds(){return ls||(ls=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=hr();class r extends Error{constructor(m){super(`CodeGen: "code" for ${m} not defined`),this.value=m.value}}var s;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(s||(t.UsedValueState=s={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class a{constructor({prefixes:m,parent:h}={}){this._names={},this._prefixes=m,this._parent=h}toName(m){return m instanceof e.Name?m:this.name(m)}name(m){return new e.Name(this._newName(m))}_newName(m){const h=this._names[m]||this._nameGroup(m);return`${m}${h.index++}`}_nameGroup(m){var h,$;if(!(($=(h=this._parent)===null||h===void 0?void 0:h._prefixes)===null||$===void 0)&&$.has(m)||this._prefixes&&!this._prefixes.has(m))throw new Error(`CodeGen: prefix "${m}" is not allowed in this scope`);return this._names[m]={prefix:m,index:0}}}t.Scope=a;class n extends e.Name{constructor(m,h){super(h),this.prefix=m}setValue(m,{property:h,itemIndex:$}){this.value=m,this.scopePath=(0,e._)`.${new e.Name(h)}[${$}]`}}t.ValueScopeName=n;const i=(0,e._)`\n`;class o extends a{constructor(m){super(m),this._values={},this._scope=m.scope,this.opts={...m,_n:m.lines?i:e.nil}}get(){return this._scope}name(m){return new n(m,this._newName(m))}value(m,h){var $;if(h.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const g=this.toName(m),{prefix:y}=g,v=($=h.key)!==null&&$!==void 0?$:h.ref;let w=this._values[y];if(w){const c=w.get(v);if(c)return c}else w=this._values[y]=new Map;w.set(v,g);const l=this._scope[y]||(this._scope[y]=[]),p=l.length;return l[p]=h.ref,g.setValue(h,{property:y,itemIndex:p}),g}getValue(m,h){const $=this._values[m];if($)return $.get(h)}scopeRefs(m,h=this._values){return this._reduceValues(h,$=>{if($.scopePath===void 0)throw new Error(`CodeGen: name "${$}" has no value`);return(0,e._)`${m}${$.scopePath}`})}scopeCode(m=this._values,h,$){return this._reduceValues(m,g=>{if(g.value===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return g.value.code},h,$)}_reduceValues(m,h,$={},g){let y=e.nil;for(const v in m){const w=m[v];if(!w)continue;const l=$[v]=$[v]||new Map;w.forEach(p=>{if(l.has(p))return;l.set(p,s.Started);let c=h(p);if(c){const d=this.opts.es5?t.varKinds.var:t.varKinds.const;y=(0,e._)`${y}${d} ${p} = ${c};${this.opts._n}`}else if(c=g?.(p))y=(0,e._)`${y}${c}${this.opts._n}`;else throw new r(p);l.set(p,s.Completed)})}return y}}t.ValueScope=o})(Rr)),Rr}var fs;function Y(){return fs||(fs=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=hr(),r=ds();var s=hr();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}});var a=ds();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class n{optimizeNodes(){return this}optimizeNames(_,T){return this}}class i extends n{constructor(_,T,N){super(),this.varKind=_,this.name=T,this.rhs=N}render({es5:_,_n:T}){const N=_?r.varKinds.var:this.varKind,z=this.rhs===void 0?"":` = ${this.rhs}`;return`${N} ${this.name}${z};`+T}optimizeNames(_,T){if(_[this.name.str])return this.rhs&&(this.rhs=x(this.rhs,_,T)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class o extends n{constructor(_,T,N){super(),this.lhs=_,this.rhs=T,this.sideEffects=N}render({_n:_}){return`${this.lhs} = ${this.rhs};`+_}optimizeNames(_,T){if(!(this.lhs instanceof e.Name&&!_[this.lhs.str]&&!this.sideEffects))return this.rhs=x(this.rhs,_,T),this}get names(){const _=this.lhs instanceof e.Name?{}:{...this.lhs.names};return F(_,this.rhs)}}class u extends o{constructor(_,T,N,z){super(_,N,z),this.op=T}render({_n:_}){return`${this.lhs} ${this.op}= ${this.rhs};`+_}}class m extends n{constructor(_){super(),this.label=_,this.names={}}render({_n:_}){return`${this.label}:`+_}}class h extends n{constructor(_){super(),this.label=_,this.names={}}render({_n:_}){return`break${this.label?` ${this.label}`:""};`+_}}class $ extends n{constructor(_){super(),this.error=_}render({_n:_}){return`throw ${this.error};`+_}get names(){return this.error.names}}class g extends n{constructor(_){super(),this.code=_}render({_n:_}){return`${this.code};`+_}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(_,T){return this.code=x(this.code,_,T),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class y extends n{constructor(_=[]){super(),this.nodes=_}render(_){return this.nodes.reduce((T,N)=>T+N.render(_),"")}optimizeNodes(){const{nodes:_}=this;let T=_.length;for(;T--;){const N=_[T].optimizeNodes();Array.isArray(N)?_.splice(T,1,...N):N?_[T]=N:_.splice(T,1)}return _.length>0?this:void 0}optimizeNames(_,T){const{nodes:N}=this;let z=N.length;for(;z--;){const W=N[z];W.optimizeNames(_,T)||(ae(_,W.names),N.splice(z,1))}return N.length>0?this:void 0}get names(){return this.nodes.reduce((_,T)=>H(_,T.names),{})}}class v extends y{render(_){return"{"+_._n+super.render(_)+"}"+_._n}}class w extends y{}class l extends v{}l.kind="else";class p extends v{constructor(_,T){super(T),this.condition=_}render(_){let T=`if(${this.condition})`+super.render(_);return this.else&&(T+="else "+this.else.render(_)),T}optimizeNodes(){super.optimizeNodes();const _=this.condition;if(_===!0)return this.nodes;let T=this.else;if(T){const N=T.optimizeNodes();T=this.else=Array.isArray(N)?new l(N):N}if(T)return _===!1?T instanceof p?T:T.nodes:this.nodes.length?this:new p(_e(_),T instanceof p?[T]:T.nodes);if(!(_===!1||!this.nodes.length))return this}optimizeNames(_,T){var N;if(this.else=(N=this.else)===null||N===void 0?void 0:N.optimizeNames(_,T),!!(super.optimizeNames(_,T)||this.else))return this.condition=x(this.condition,_,T),this}get names(){const _=super.names;return F(_,this.condition),this.else&&H(_,this.else.names),_}}p.kind="if";class c extends v{}c.kind="for";class d extends c{constructor(_){super(),this.iteration=_}render(_){return`for(${this.iteration})`+super.render(_)}optimizeNames(_,T){if(super.optimizeNames(_,T))return this.iteration=x(this.iteration,_,T),this}get names(){return H(super.names,this.iteration.names)}}class S extends c{constructor(_,T,N,z){super(),this.varKind=_,this.name=T,this.from=N,this.to=z}render(_){const T=_.es5?r.varKinds.var:this.varKind,{name:N,from:z,to:W}=this;return`for(${T} ${N}=${z}; ${N}<${W}; ${N}++)`+super.render(_)}get names(){const _=F(super.names,this.from);return F(_,this.to)}}class f extends c{constructor(_,T,N,z){super(),this.loop=_,this.varKind=T,this.name=N,this.iterable=z}render(_){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(_)}optimizeNames(_,T){if(super.optimizeNames(_,T))return this.iterable=x(this.iterable,_,T),this}get names(){return H(super.names,this.iterable.names)}}class b extends v{constructor(_,T,N){super(),this.name=_,this.args=T,this.async=N}render(_){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(_)}}b.kind="func";class E extends y{render(_){return"return "+super.render(_)}}E.kind="return";class C extends v{render(_){let T="try"+super.render(_);return this.catch&&(T+=this.catch.render(_)),this.finally&&(T+=this.finally.render(_)),T}optimizeNodes(){var _,T;return super.optimizeNodes(),(_=this.catch)===null||_===void 0||_.optimizeNodes(),(T=this.finally)===null||T===void 0||T.optimizeNodes(),this}optimizeNames(_,T){var N,z;return super.optimizeNames(_,T),(N=this.catch)===null||N===void 0||N.optimizeNames(_,T),(z=this.finally)===null||z===void 0||z.optimizeNames(_,T),this}get names(){const _=super.names;return this.catch&&H(_,this.catch.names),this.finally&&H(_,this.finally.names),_}}class D extends v{constructor(_){super(),this.error=_}render(_){return`catch(${this.error})`+super.render(_)}}D.kind="catch";class V extends v{render(_){return"finally"+super.render(_)}}V.kind="finally";class q{constructor(_,T={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...T,_n:T.lines?`
|
|
1
|
+
import{b1 as oe,b2 as ss,w as P,aM as J,Y as he,aL as gr,W as B,aJ as aa,aH as de,aN as te,_ as Pe,b3 as it,b4 as oa,v as A,b5 as Br,b6 as ns,b7 as ia,b8 as qn,b9 as ca,ba as ua,bb as la,a3 as Mn,aK as Qr,aO as ge,X as we,bc as lr,bd as da,be as fa}from"./index-BAX9m6md.js";import{C as ha,P as pa,a as ma,G as ya,M as G,E as Z,b as ga,L as _a,c as va,i as ft,d as ba,e as Ur,f as wa,R as Ye,g as Sa,h as Hr,j as $a,k as Ea,l as Ta,T as as,m as jn,n as ka,o as Pa,p as Ia,q as Oa,I as Ra,S as Ca,r as bt,s as Na,t as qa,u as Ma,v as ja,w as Aa,x as Da,y as An,z as La,A as Ua,B as Ha,D as Va,F as Fa,U as Ne,H as Je,J as dr,K as mt,N as xa}from"./auth-CX8buOs4.js";var za=class{apply(t,e){if(!e.type)return;const r=Array.isArray(e.type)?e.type:[e.type],s=new Set(r);if(s.has("string")||(t.string=!1),!s.has("number")&&!s.has("integer")&&(t.number=!1),s.has("boolean")||(t.boolean=!1),s.has("null")||(t.null=!1),s.has("array")||(t.array=!1),s.has("object")||(t.object=!1),s.has("integer")&&t.number!==!1){const a=t.number||J();a instanceof it&&(t.number=a.int())}}},Ka=class{apply(t,e){if(e.const===void 0)return;const r=e.const;t.string=!1,t.number=!1,t.boolean=!1,t.null=!1,t.array=!1,t.object=!1,typeof r=="string"?t.string=te(r):typeof r=="number"?t.number=te(r):typeof r=="boolean"?t.boolean=te(r):r===null?t.null=gr():Array.isArray(r)?t.array=void 0:typeof r=="object"&&(t.object=void 0)}},Wa=class{apply(t,e){if(!e.enum)return;if(e.enum.length===0){e.type||(t.string=!1,t.number=!1,t.boolean=!1,t.null=!1,t.array=!1,t.object=!1);return}const r={string:e.enum.filter(s=>typeof s=="string"),number:e.enum.filter(s=>typeof s=="number"),boolean:e.enum.filter(s=>typeof s=="boolean"),null:e.enum.filter(s=>s===null),array:e.enum.filter(s=>Array.isArray(s)),object:e.enum.filter(s=>typeof s=="object"&&s!==null&&!Array.isArray(s))};t.string=this.createTypeSchema(r.string,"string"),t.number=this.createTypeSchema(r.number,"number"),t.boolean=this.createTypeSchema(r.boolean,"boolean"),t.null=r.null.length>0?gr():!1,t.array=r.array.length>0?void 0:!1,t.object=r.object.length>0?void 0:!1}createTypeSchema(t,e){if(t.length===0)return!1;if(t.length===1)return te(t[0]);if(e==="string")return Pe(t);if(e==="number"){const[r,s,...a]=t;return de([te(r),te(s),...a.map(n=>te(n))])}return e==="boolean"?de([te(!0),te(!1)]):!1}},Ga=class{apply(t,e){const r=e;if(r.type==="string"&&r.format==="binary"&&r.contentEncoding==="binary"){let s=oa();r.minLength!==void 0&&(s=s.min(r.minLength)),r.maxLength!==void 0&&(s=s.max(r.maxLength)),r.contentMediaType!==void 0&&(s=s.mime(r.contentMediaType)),t.file=s,t.string=!1}}},Ja=class{apply(t,e){const r=e;e.type===void 0&&(r.minLength!==void 0||r.maxLength!==void 0||r.pattern!==void 0)&&t.string===void 0&&(t.string=P())}},Ba=class{apply(t,e){const r=e;if(r.minLength!==void 0&&t.string!==!1){const s=t.string||P();s instanceof Br&&(t.string=s.refine(a=>Array.from(a).length>=r.minLength,{message:`String must be at least ${r.minLength} characters long`}))}}},Qa=class{apply(t,e){const r=e;if(r.maxLength!==void 0&&t.string!==!1){const s=t.string||P();s instanceof Br&&(t.string=s.refine(a=>Array.from(a).length<=r.maxLength,{message:`String must be at most ${r.maxLength} characters long`}))}}},Za=class{apply(t,e){const r=e;if(r.pattern&&t.string!==!1){const s=t.string||P();if(s instanceof Br){const a=new RegExp(r.pattern);t.string=s.regex(a)}}}},Ya=class{apply(t,e){const r=e;if(r.minimum!==void 0&&t.number!==!1){const s=t.number||J();s instanceof it&&(t.number=s.min(r.minimum))}}},Xa=class{apply(t,e){const r=e;if(r.maximum!==void 0&&t.number!==!1){const s=t.number||J();s instanceof it&&(t.number=s.max(r.maximum))}}},eo=class{apply(t,e){const r=e;if(r.exclusiveMinimum!==void 0&&t.number!==!1){const s=t.number||J();s instanceof it&&(typeof r.exclusiveMinimum=="number"?t.number=s.gt(r.exclusiveMinimum):t.number=!1)}}},to=class{apply(t,e){const r=e;if(r.exclusiveMaximum!==void 0&&t.number!==!1){const s=t.number||J();s instanceof it&&(typeof r.exclusiveMaximum=="number"?t.number=s.lt(r.exclusiveMaximum):t.number=!1)}}},ro=class{apply(t,e){const r=e;if(r.multipleOf!==void 0&&t.number!==!1){const s=t.number||J();s instanceof it&&(t.number=s.refine(a=>{if(r.multipleOf===0)return!1;const n=a/r.multipleOf,i=Math.round(n),o=Math.min(Math.abs(a)*Number.EPSILON*10,Math.abs(r.multipleOf)*Number.EPSILON*10);return Math.abs(n-i)<=o/Math.abs(r.multipleOf)},{message:`Must be a multiple of ${r.multipleOf}`}))}}},so=class{apply(t,e){const r=e;e.type===void 0&&(r.minItems!==void 0||r.maxItems!==void 0||r.items!==void 0||r.prefixItems!==void 0)&&t.array===void 0&&(t.array=B(oe()))}},no=class{apply(t,e){const r=e;r.minItems!==void 0&&t.array!==!1&&(t.array=(t.array||B(oe())).min(r.minItems))}},ao=class{apply(t,e){const r=e;r.maxItems!==void 0&&t.array!==!1&&(t.array=(t.array||B(oe())).max(r.maxItems))}},oo=class{apply(t,e){const r=e;if(t.array!==!1)if(Array.isArray(r.items))t.array=t.array||B(oe());else if(r.items&&typeof r.items!="boolean"&&!r.prefixItems){const s=fe(r.items);let a=B(s);if(t.array&&t.array instanceof ia){const n=t.array._def;n.checks&&n.checks.forEach(i=>{if(i._zod&&i._zod.def){const o=i._zod.def;o.check==="min_length"&&o.minimum!==void 0?a=a.min(o.minimum):o.check==="max_length"&&o.maximum!==void 0&&(a=a.max(o.maximum))}})}t.array=a}else typeof r.items=="boolean"&&r.items===!1?r.prefixItems?t.array=t.array||B(oe()):t.array=B(oe()).max(0):typeof r.items=="boolean"&&r.items===!0?t.array=t.array||B(oe()):r.prefixItems&&(t.array=t.array||B(oe()))}},io=class{apply(t,e){if(e.type!=="array")return;const r=e;if(!Array.isArray(r.items)||t.array===!1)return;const s=r.items.map(n=>fe(n));let a;s.length===0?a=ns([]):a=ns(s),r.minItems!==void 0&&r.minItems>s.length&&(a=!1),r.maxItems!==void 0&&r.maxItems<s.length&&(a=!1),t.tuple=a,t.array=!1}},co=class{apply(t,e){const r=e;t.object!==!1&&(r.properties||r.required||r.additionalProperties!==void 0)&&(t.object=t.object||A({}).passthrough())}},uo=class{apply(t,e){const r=e;e.type===void 0&&(r.maxProperties!==void 0||r.minProperties!==void 0)&&t.object===void 0&&(t.object=A({}).passthrough())}},lo=class{apply(t,e){const r=e;if(r.maxProperties!==void 0&&t.object!==!1){const s=t.object||A({}).passthrough();t.object=s.refine(a=>Object.keys(a).length<=r.maxProperties,{message:`Object must have at most ${r.maxProperties} properties`})}}},fo=class{apply(t,e){const r=e;if(r.minProperties!==void 0&&t.object!==!1){const s=t.object||A({}).passthrough();t.object=s.refine(a=>Object.keys(a).length>=r.minProperties,{message:`Object must have at least ${r.minProperties} properties`})}}};function _t(t,e){if(t===e)return!0;if(t==null||e==null)return t===e;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e))return t.length!==e.length?!1:t.every((r,s)=>_t(r,e[s]));if(typeof t=="object"&&typeof e=="object"){const r=Object.keys(t),s=Object.keys(e);return r.length!==s.length?!1:r.every(a=>s.includes(a)&&_t(t[a],e[a]))}return!1}function ho(){return t=>{if(!Array.isArray(t))return!0;const e=[];return t.every(r=>e.some(a=>_t(r,a))?!1:(e.push(r),!0))}}function fr(t,e){return t.safeParse(e).success}var po=class{apply(t,e){if(!e.not)return t;const r=fe(e.not);return t.refine(s=>!fr(r,s),{message:"Value must not match the 'not' schema"})}},mo=class{apply(t,e){return e.uniqueItems!==!0?t:t.refine(ho(),{message:"Array items must be unique"})}},yo=class{apply(t,e){return!e.allOf||e.allOf.length===0?t:e.allOf.map(s=>fe(s)).reduce((s,a)=>qn(s,a),t)}},go=class{apply(t,e){if(!e.anyOf||e.anyOf.length===0)return t;const r=e.anyOf.length===1?fe(e.anyOf[0]):de([fe(e.anyOf[0]),fe(e.anyOf[1]),...e.anyOf.slice(2).map(s=>fe(s))]);return qn(t,r)}},_o=class{apply(t,e){if(!e.oneOf||e.oneOf.length===0)return t;const r=e.oneOf.map(s=>fe(s));return t.refine(s=>{let a=0;for(const n of r)if(n.safeParse(s).success&&(a++,a>1))return!1;return a===1},{message:"Value must match exactly one of the oneOf schemas"})}},vo=class{apply(t,e){const r=e;if(r.prefixItems&&Array.isArray(r.prefixItems)){const a=r.prefixItems.map(n=>fe(n));return t.refine(n=>{if(!Array.isArray(n))return!0;for(let i=0;i<Math.min(n.length,a.length);i++)if(!fr(a[i],n[i]))return!1;if(n.length>a.length){if(typeof r.items=="boolean"&&r.items===!1)return!1;if(r.items&&typeof r.items=="object"&&!Array.isArray(r.items)){const i=fe(r.items);for(let o=a.length;o<n.length;o++)if(!fr(i,n[o]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return t}},bo=class{apply(t,e){const r=e;if(!r.properties&&!r.required&&r.additionalProperties!==!1)return t;if(t instanceof ca||t instanceof ua){const s={};if(r.properties)for(const[a,n]of Object.entries(r.properties))n!==void 0&&(s[a]=fe(n));if(r.required&&Array.isArray(r.required)){const a=new Set(r.required);for(const n of Object.keys(s))a.has(n)||(s[n]=s[n].optional())}else for(const a of Object.keys(s))s[a]=s[a].optional();return r.additionalProperties===!1?A(s):A(s).passthrough()}return t.refine(s=>{if(typeof s!="object"||s===null||Array.isArray(s))return!0;if(r.properties){for(const[a,n]of Object.entries(r.properties))if(n!==void 0&&Object.getOwnPropertyDescriptor(s,a)!==void 0&&!fe(n).safeParse(s[a]).success)return!1}if(r.required&&Array.isArray(r.required)){for(const a of r.required)if(!(Object.getOwnPropertyDescriptor(s,a)!==void 0))return!1}if(r.additionalProperties===!1&&r.properties){const a=new Set(Object.keys(r.properties));for(const n in s)if(!a.has(n))return!1}return!0},{message:"Object constraints validation failed"})}},wo=class{apply(t,e){if(!e.enum||e.enum.length===0)return t;const r=e.enum.filter(s=>Array.isArray(s)||typeof s=="object"&&s!==null);return r.length===0?t:t.refine(s=>typeof s!="object"||s===null?!0:r.some(a=>_t(s,a)),{message:"Value must match one of the enum values"})}},So=class{apply(t,e){if(e.const===void 0)return t;const r=e.const;return typeof r!="object"||r===null?t:t.refine(s=>_t(s,r),{message:"Value must equal the const value"})}},$o=class{apply(t,e){return e.description&&(t=t.describe(e.description)),t}},Eo=class{apply(t,e){var r;const s=e;return!((r=s.required)!=null&&r.includes("__proto__"))||e.type!==void 0?t:oe().refine(a=>this.validateRequired(a,s.required),{message:"Missing required properties"})}validateRequired(t,e){return typeof t!="object"||t===null||Array.isArray(t)?!0:e.every(r=>Object.prototype.hasOwnProperty.call(t,r))}},To=class{apply(t,e){var r;const s=e;if(s.contains===void 0)return t;const a=fe(s.contains),n=(r=s.minContains)!=null?r:1,i=s.maxContains;return t.refine(o=>{if(!Array.isArray(o))return!0;let u=0;for(const m of o)fr(a,m)&&u++;return!(u<n||i!==void 0&&u>i)},{message:"Array must contain required items matching the schema"})}},ko=class{apply(t,e){const{default:r}=e;return r===void 0||!t.safeParse(r).success?t:t.default(r)}},Po=[new Ka,new Wa,new za,new Ga,new Ja,new so,new uo,new Ba,new Qa,new Za,new Ya,new Xa,new eo,new to,new ro,new io,new no,new ao,new oo,new lo,new fo,new co],Io=[new Eo,new wo,new So,new yo,new go,new _o,new vo,new bo,new To,new po,new mo,new ko,new $o];function fe(t){if(typeof t=="boolean")return t?oe():ss();const e={};for(const a of Po)a.apply(e,t);const r=[];if(e.string!==!1&&r.push(e.string||P()),e.number!==!1&&r.push(e.number||J()),e.boolean!==!1&&r.push(e.boolean||he()),e.null!==!1&&r.push(e.null||gr()),e.array!==!1&&r.push(e.array||B(oe())),e.tuple!==!1&&e.tuple!==void 0&&r.push(e.tuple),e.object!==!1)if(e.object)r.push(e.object);else{const a=aa(n=>typeof n=="object"&&n!==null&&!Array.isArray(n),"Must be an object, not an array");r.push(a)}e.file!==!1&&e.file!==void 0&&r.push(e.file);let s;r.length===0?s=ss():r.length===1?s=r[0]:Object.keys(t).some(n=>n!=="$schema"&&n!=="title"&&n!=="description")?s=de(r):s=oe();for(const a of Io)s=a.apply(s,t);return s}function _r(t){return!!t._zod}function He(t,e){return _r(t)?la(t,e):t.safeParse(e)}function Dn(t){if(!t)return;let e;if(_r(t)?e=t._zod?.def?.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function Oo(t){if(_r(t)){const n=t._zod?.def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}}const r=t._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}const s=t.value;if(s!==void 0)return s}function xe(t){return t==="completed"||t==="failed"||t==="cancelled"}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function os(t){const r=Dn(t)?.method;if(!r)throw new Error("Schema is missing a method literal");const s=Oo(r);if(typeof s!="string")throw new Error("Schema method literal must be a string");return s}function is(t,e){const r=He(t,e);if(!r.success)throw r.error;return r.data}const Ro=6e4;class Co{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(ha,r=>{this._oncancel(r)}),this.setNotificationHandler(pa,r=>{this._onprogress(r)}),this.setRequestHandler(ma,r=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(ya,async(r,s)=>{const a=await this._taskStore.getTask(r.params.taskId,s.sessionId);if(!a)throw new G(Z.InvalidParams,"Failed to retrieve task: Task not found");return{...a}}),this.setRequestHandler(ga,async(r,s)=>{const a=async()=>{const n=r.params.taskId;if(this._taskMessageQueue){let o;for(;o=await this._taskMessageQueue.dequeue(n,s.sessionId);){if(o.type==="response"||o.type==="error"){const u=o.message,m=u.id,h=this._requestResolvers.get(m);if(h)if(this._requestResolvers.delete(m),o.type==="response")h(u);else{const $=u,g=new G($.error.code,$.error.message,$.error.data);h(g)}else{const $=o.type==="response"?"Response":"Error";this._onerror(new Error(`${$} handler missing for request ${m}`))}continue}await this._transport?.send(o.message,{relatedRequestId:s.requestId})}}const i=await this._taskStore.getTask(n,s.sessionId);if(!i)throw new G(Z.InvalidParams,`Task not found: ${n}`);if(!xe(i.status))return await this._waitForTaskUpdate(n,s.signal),await a();if(xe(i.status)){const o=await this._taskStore.getTaskResult(n,s.sessionId);return this._clearTaskQueue(n),{...o,_meta:{...o._meta,[Ye]:{taskId:n}}}}return await a()};return await a()}),this.setRequestHandler(_a,async(r,s)=>{try{const{tasks:a,nextCursor:n}=await this._taskStore.listTasks(r.params?.cursor,s.sessionId);return{tasks:a,nextCursor:n,_meta:{}}}catch(a){throw new G(Z.InvalidParams,`Failed to list tasks: ${a instanceof Error?a.message:String(a)}`)}}),this.setRequestHandler(va,async(r,s)=>{try{const a=await this._taskStore.getTask(r.params.taskId,s.sessionId);if(!a)throw new G(Z.InvalidParams,`Task not found: ${r.params.taskId}`);if(xe(a.status))throw new G(Z.InvalidParams,`Cannot cancel task in terminal status: ${a.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",s.sessionId),this._clearTaskQueue(r.params.taskId);const n=await this._taskStore.getTask(r.params.taskId,s.sessionId);if(!n)throw new G(Z.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...n}}catch(a){throw a instanceof G?a:new G(Z.InvalidRequest,`Failed to cancel task: ${a instanceof Error?a.message:String(a)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,r,s,a,n=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(a,r),startTime:Date.now(),timeout:r,maxTotalTimeout:s,resetTimeoutOnProgress:n,onTimeout:a})}_resetTimeout(e){const r=this._timeoutInfo.get(e);if(!r)return!1;const s=Date.now()-r.startTime;if(r.maxTotalTimeout&&s>=r.maxTotalTimeout)throw this._timeoutInfo.delete(e),G.fromError(Z.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:s});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(e){const r=this._timeoutInfo.get(e);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;const r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};const s=this.transport?.onerror;this._transport.onerror=n=>{s?.(n),this._onerror(n)};const a=this._transport?.onmessage;this._transport.onmessage=(n,i)=>{a?.(n,i),ft(n)||ba(n)?this._onresponse(n):Ur(n)?this._onrequest(n,i):wa(n)?this._onnotification(n):this._onerror(new Error(`Unknown message type: ${JSON.stringify(n)}`))},await this._transport.start()}_onclose(){const e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();const r=G.fromError(Z.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const s of e.values())s(r)}_onerror(e){this.onerror?.(e)}_onnotification(e){const r=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(e)).catch(s=>this._onerror(new Error(`Uncaught error in notification handler: ${s}`)))}_onrequest(e,r){const s=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,a=this._transport,n=e.params?._meta?.[Ye]?.taskId;if(s===void 0){const h={jsonrpc:"2.0",id:e.id,error:{code:Z.MethodNotFound,message:"Method not found"}};n&&this._taskMessageQueue?this._enqueueTaskMessage(n,{type:"error",message:h,timestamp:Date.now()},a?.sessionId).catch($=>this._onerror(new Error(`Failed to enqueue error response: ${$}`))):a?.send(h).catch($=>this._onerror(new Error(`Failed to send an error response: ${$}`)));return}const i=new AbortController;this._requestHandlerAbortControllers.set(e.id,i);const o=Sa(e.params)?e.params.task:void 0,u=this._taskStore?this.requestTaskStore(e,a?.sessionId):void 0,m={signal:i.signal,sessionId:a?.sessionId,_meta:e.params?._meta,sendNotification:async h=>{const $={relatedRequestId:e.id};n&&($.relatedTask={taskId:n}),await this.notification(h,$)},sendRequest:async(h,$,g)=>{const y={...g,relatedRequestId:e.id};n&&!y.relatedTask&&(y.relatedTask={taskId:n});const v=y.relatedTask?.taskId??n;return v&&u&&await u.updateTaskStatus(v,"input_required"),await this.request(h,$,y)},authInfo:r?.authInfo,requestId:e.id,requestInfo:r?.requestInfo,taskId:n,taskStore:u,taskRequestedTtl:o?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>s(e,m)).then(async h=>{if(i.signal.aborted)return;const $={result:h,jsonrpc:"2.0",id:e.id};n&&this._taskMessageQueue?await this._enqueueTaskMessage(n,{type:"response",message:$,timestamp:Date.now()},a?.sessionId):await a?.send($)},async h=>{if(i.signal.aborted)return;const $={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(h.code)?h.code:Z.InternalError,message:h.message??"Internal error",...h.data!==void 0&&{data:h.data}}};n&&this._taskMessageQueue?await this._enqueueTaskMessage(n,{type:"error",message:$,timestamp:Date.now()},a?.sessionId):await a?.send($)}).catch(h=>this._onerror(new Error(`Failed to send response: ${h}`))).finally(()=>{this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){const{progressToken:r,...s}=e.params,a=Number(r),n=this._progressHandlers.get(a);if(!n){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}const i=this._responseHandlers.get(a),o=this._timeoutInfo.get(a);if(o&&i&&o.resetTimeoutOnProgress)try{this._resetTimeout(a)}catch(u){this._responseHandlers.delete(a),this._progressHandlers.delete(a),this._cleanupTimeout(a),i(u);return}n(s)}_onresponse(e){const r=Number(e.id),s=this._requestResolvers.get(r);if(s){if(this._requestResolvers.delete(r),ft(e))s(e);else{const i=new G(e.error.code,e.error.message,e.error.data);s(i)}return}const a=this._responseHandlers.get(r);if(a===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let n=!1;if(ft(e)&&e.result&&typeof e.result=="object"){const i=e.result;if(i.task&&typeof i.task=="object"){const o=i.task;typeof o.taskId=="string"&&(n=!0,this._taskProgressTokens.set(o.taskId,r))}}if(n||this._progressHandlers.delete(r),ft(e))a(e);else{const i=G.fromError(e.error.code,e.error.message,e.error.data);a(i)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,r,s){const{task:a}=s??{};if(!a){try{yield{type:"result",result:await this.request(e,r,s)}}catch(i){yield{type:"error",error:i instanceof G?i:new G(Z.InternalError,String(i))}}return}let n;try{const i=await this.request(e,Hr,s);if(i.task)n=i.task.taskId,yield{type:"taskCreated",task:i.task};else throw new G(Z.InternalError,"Task creation did not return a task");for(;;){const o=await this.getTask({taskId:n},s);if(yield{type:"taskStatus",task:o},xe(o.status)){o.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:n},r,s)}:o.status==="failed"?yield{type:"error",error:new G(Z.InternalError,`Task ${n} failed`)}:o.status==="cancelled"&&(yield{type:"error",error:new G(Z.InternalError,`Task ${n} was cancelled`)});return}if(o.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:n},r,s)};return}const u=o.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(m=>setTimeout(m,u)),s?.signal?.throwIfAborted()}}catch(i){yield{type:"error",error:i instanceof G?i:new G(Z.InternalError,String(i))}}}request(e,r,s){const{relatedRequestId:a,resumptionToken:n,onresumptiontoken:i,task:o,relatedTask:u}=s??{};return new Promise((m,h)=>{const $=c=>{h(c)};if(!this._transport){$(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(c){$(c);return}s?.signal?.throwIfAborted();const g=this._requestMessageId++,y={...e,jsonrpc:"2.0",id:g};s?.onprogress&&(this._progressHandlers.set(g,s.onprogress),y.params={...e.params,_meta:{...e.params?._meta||{},progressToken:g}}),o&&(y.params={...y.params,task:o}),u&&(y.params={...y.params,_meta:{...y.params?._meta||{},[Ye]:u}});const v=c=>{this._responseHandlers.delete(g),this._progressHandlers.delete(g),this._cleanupTimeout(g),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:g,reason:String(c)}},{relatedRequestId:a,resumptionToken:n,onresumptiontoken:i}).catch(S=>this._onerror(new Error(`Failed to send cancellation: ${S}`)));const d=c instanceof G?c:new G(Z.RequestTimeout,String(c));h(d)};this._responseHandlers.set(g,c=>{if(!s?.signal?.aborted){if(c instanceof Error)return h(c);try{const d=He(r,c.result);d.success?m(d.data):h(d.error)}catch(d){h(d)}}}),s?.signal?.addEventListener("abort",()=>{v(s?.signal?.reason)});const w=s?.timeout??Ro,l=()=>v(G.fromError(Z.RequestTimeout,"Request timed out",{timeout:w}));this._setupTimeout(g,w,s?.maxTotalTimeout,l,s?.resetTimeoutOnProgress??!1);const p=u?.taskId;if(p){const c=d=>{const S=this._responseHandlers.get(g);S?S(d):this._onerror(new Error(`Response handler missing for side-channeled request ${g}`))};this._requestResolvers.set(g,c),this._enqueueTaskMessage(p,{type:"request",message:y,timestamp:Date.now()}).catch(d=>{this._cleanupTimeout(g),h(d)})}else this._transport.send(y,{relatedRequestId:a,resumptionToken:n,onresumptiontoken:i}).catch(c=>{this._cleanupTimeout(g),h(c)})})}async getTask(e,r){return this.request({method:"tasks/get",params:e},$a,r)}async getTaskResult(e,r,s){return this.request({method:"tasks/result",params:e},r,s)}async listTasks(e,r){return this.request({method:"tasks/list",params:e},Ea,r)}async cancelTask(e,r){return this.request({method:"tasks/cancel",params:e},Ta,r)}async notification(e,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);const s=r?.relatedTask?.taskId;if(s){const o={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[Ye]:r.relatedTask}}};await this._enqueueTaskMessage(s,{type:"notification",message:o,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!r?.relatedRequestId&&!r?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let o={...e,jsonrpc:"2.0"};r?.relatedTask&&(o={...o,params:{...o.params,_meta:{...o.params?._meta||{},[Ye]:r.relatedTask}}}),this._transport?.send(o,r).catch(u=>this._onerror(u))});return}let i={...e,jsonrpc:"2.0"};r?.relatedTask&&(i={...i,params:{...i.params,_meta:{...i.params?._meta||{},[Ye]:r.relatedTask}}}),await this._transport.send(i,r)}setRequestHandler(e,r){const s=os(e);this.assertRequestHandlerCapability(s),this._requestHandlers.set(s,(a,n)=>{const i=is(e,a);return Promise.resolve(r(i,n))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,r){const s=os(e);this._notificationHandlers.set(s,a=>{const n=is(e,a);return Promise.resolve(r(n))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){const r=this._taskProgressTokens.get(e);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,r,s){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const a=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,r,s,a)}async _clearTaskQueue(e,r){if(this._taskMessageQueue){const s=await this._taskMessageQueue.dequeueAll(e,r);for(const a of s)if(a.type==="request"&&Ur(a.message)){const n=a.message.id,i=this._requestResolvers.get(n);i?(i(new G(Z.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(n)):this._onerror(new Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,r){let s=this._options?.defaultTaskPollInterval??1e3;try{const a=await this._taskStore?.getTask(e);a?.pollInterval&&(s=a.pollInterval)}catch{}return new Promise((a,n)=>{if(r.aborted){n(new G(Z.InvalidRequest,"Request cancelled"));return}const i=setTimeout(a,s);r.addEventListener("abort",()=>{clearTimeout(i),n(new G(Z.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,r){const s=this._taskStore;if(!s)throw new Error("No task store configured");return{createTask:async a=>{if(!e)throw new Error("No request provided");return await s.createTask(a,e.id,{method:e.method,params:e.params},r)},getTask:async a=>{const n=await s.getTask(a,r);if(!n)throw new G(Z.InvalidParams,"Failed to retrieve task: Task not found");return n},storeTaskResult:async(a,n,i)=>{await s.storeTaskResult(a,n,i,r);const o=await s.getTask(a,r);if(o){const u=as.parse({method:"notifications/tasks/status",params:o});await this.notification(u),xe(o.status)&&this._cleanupTaskProgressHandler(a)}},getTaskResult:a=>s.getTaskResult(a,r),updateTaskStatus:async(a,n,i)=>{const o=await s.getTask(a,r);if(!o)throw new G(Z.InvalidParams,`Task "${a}" not found - it may have been cleaned up`);if(xe(o.status))throw new G(Z.InvalidParams,`Cannot update task "${a}" from terminal status "${o.status}" to "${n}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await s.updateTaskStatus(a,n,i,r);const u=await s.getTask(a,r);if(u){const m=as.parse({method:"notifications/tasks/status",params:u});await this.notification(m),xe(u.status)&&this._cleanupTaskProgressHandler(a)}},listTasks:a=>s.listTasks(a,r)}}}function cs(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function No(t,e){const r={...t};for(const s in e){const a=s,n=e[a];if(n===void 0)continue;const i=r[a];cs(i)&&cs(n)?r[a]={...i,...n}:r[a]=n}return r}var wt={exports:{}},kr={},Me={},ze={},Pr={},Ir={},Or={},us;function hr(){return us||(us=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(c){if(super(),!t.IDENTIFIER.test(c))throw new Error("CodeGen: name must be a valid identifier");this.str=c}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class s extends e{constructor(c){super(),this._items=typeof c=="string"?[c]:c}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const c=this._items[0];return c===""||c==='""'}get str(){var c;return(c=this._str)!==null&&c!==void 0?c:this._str=this._items.reduce((d,S)=>`${d}${S}`,"")}get names(){var c;return(c=this._names)!==null&&c!==void 0?c:this._names=this._items.reduce((d,S)=>(S instanceof r&&(d[S.str]=(d[S.str]||0)+1),d),{})}}t._Code=s,t.nil=new s("");function a(p,...c){const d=[p[0]];let S=0;for(;S<c.length;)o(d,c[S]),d.push(p[++S]);return new s(d)}t._=a;const n=new s("+");function i(p,...c){const d=[y(p[0])];let S=0;for(;S<c.length;)d.push(n),o(d,c[S]),d.push(n,y(p[++S]));return u(d),new s(d)}t.str=i;function o(p,c){c instanceof s?p.push(...c._items):c instanceof r?p.push(c):p.push($(c))}t.addCodeArg=o;function u(p){let c=1;for(;c<p.length-1;){if(p[c]===n){const d=m(p[c-1],p[c+1]);if(d!==void 0){p.splice(c-1,3,d);continue}p[c++]="+"}c++}}function m(p,c){if(c==='""')return p;if(p==='""')return c;if(typeof p=="string")return c instanceof r||p[p.length-1]!=='"'?void 0:typeof c!="string"?`${p.slice(0,-1)}${c}"`:c[0]==='"'?p.slice(0,-1)+c.slice(1):void 0;if(typeof c=="string"&&c[0]==='"'&&!(p instanceof r))return`"${p}${c.slice(1)}`}function h(p,c){return c.emptyStr()?p:p.emptyStr()?c:i`${p}${c}`}t.strConcat=h;function $(p){return typeof p=="number"||typeof p=="boolean"||p===null?p:y(Array.isArray(p)?p.join(","):p)}function g(p){return new s(y(p))}t.stringify=g;function y(p){return JSON.stringify(p).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=y;function v(p){return typeof p=="string"&&t.IDENTIFIER.test(p)?new s(`.${p}`):a`[${p}]`}t.getProperty=v;function w(p){if(typeof p=="string"&&t.IDENTIFIER.test(p))return new s(`${p}`);throw new Error(`CodeGen: invalid export name: ${p}, use explicit $id name mapping`)}t.getEsmExportName=w;function l(p){return new s(p.toString())}t.regexpCode=l})(Or)),Or}var Rr={},ls;function ds(){return ls||(ls=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=hr();class r extends Error{constructor(m){super(`CodeGen: "code" for ${m} not defined`),this.value=m.value}}var s;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(s||(t.UsedValueState=s={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class a{constructor({prefixes:m,parent:h}={}){this._names={},this._prefixes=m,this._parent=h}toName(m){return m instanceof e.Name?m:this.name(m)}name(m){return new e.Name(this._newName(m))}_newName(m){const h=this._names[m]||this._nameGroup(m);return`${m}${h.index++}`}_nameGroup(m){var h,$;if(!(($=(h=this._parent)===null||h===void 0?void 0:h._prefixes)===null||$===void 0)&&$.has(m)||this._prefixes&&!this._prefixes.has(m))throw new Error(`CodeGen: prefix "${m}" is not allowed in this scope`);return this._names[m]={prefix:m,index:0}}}t.Scope=a;class n extends e.Name{constructor(m,h){super(h),this.prefix=m}setValue(m,{property:h,itemIndex:$}){this.value=m,this.scopePath=(0,e._)`.${new e.Name(h)}[${$}]`}}t.ValueScopeName=n;const i=(0,e._)`\n`;class o extends a{constructor(m){super(m),this._values={},this._scope=m.scope,this.opts={...m,_n:m.lines?i:e.nil}}get(){return this._scope}name(m){return new n(m,this._newName(m))}value(m,h){var $;if(h.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const g=this.toName(m),{prefix:y}=g,v=($=h.key)!==null&&$!==void 0?$:h.ref;let w=this._values[y];if(w){const c=w.get(v);if(c)return c}else w=this._values[y]=new Map;w.set(v,g);const l=this._scope[y]||(this._scope[y]=[]),p=l.length;return l[p]=h.ref,g.setValue(h,{property:y,itemIndex:p}),g}getValue(m,h){const $=this._values[m];if($)return $.get(h)}scopeRefs(m,h=this._values){return this._reduceValues(h,$=>{if($.scopePath===void 0)throw new Error(`CodeGen: name "${$}" has no value`);return(0,e._)`${m}${$.scopePath}`})}scopeCode(m=this._values,h,$){return this._reduceValues(m,g=>{if(g.value===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return g.value.code},h,$)}_reduceValues(m,h,$={},g){let y=e.nil;for(const v in m){const w=m[v];if(!w)continue;const l=$[v]=$[v]||new Map;w.forEach(p=>{if(l.has(p))return;l.set(p,s.Started);let c=h(p);if(c){const d=this.opts.es5?t.varKinds.var:t.varKinds.const;y=(0,e._)`${y}${d} ${p} = ${c};${this.opts._n}`}else if(c=g?.(p))y=(0,e._)`${y}${c}${this.opts._n}`;else throw new r(p);l.set(p,s.Completed)})}return y}}t.ValueScope=o})(Rr)),Rr}var fs;function Y(){return fs||(fs=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=hr(),r=ds();var s=hr();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}});var a=ds();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class n{optimizeNodes(){return this}optimizeNames(_,T){return this}}class i extends n{constructor(_,T,N){super(),this.varKind=_,this.name=T,this.rhs=N}render({es5:_,_n:T}){const N=_?r.varKinds.var:this.varKind,z=this.rhs===void 0?"":` = ${this.rhs}`;return`${N} ${this.name}${z};`+T}optimizeNames(_,T){if(_[this.name.str])return this.rhs&&(this.rhs=x(this.rhs,_,T)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class o extends n{constructor(_,T,N){super(),this.lhs=_,this.rhs=T,this.sideEffects=N}render({_n:_}){return`${this.lhs} = ${this.rhs};`+_}optimizeNames(_,T){if(!(this.lhs instanceof e.Name&&!_[this.lhs.str]&&!this.sideEffects))return this.rhs=x(this.rhs,_,T),this}get names(){const _=this.lhs instanceof e.Name?{}:{...this.lhs.names};return F(_,this.rhs)}}class u extends o{constructor(_,T,N,z){super(_,N,z),this.op=T}render({_n:_}){return`${this.lhs} ${this.op}= ${this.rhs};`+_}}class m extends n{constructor(_){super(),this.label=_,this.names={}}render({_n:_}){return`${this.label}:`+_}}class h extends n{constructor(_){super(),this.label=_,this.names={}}render({_n:_}){return`break${this.label?` ${this.label}`:""};`+_}}class $ extends n{constructor(_){super(),this.error=_}render({_n:_}){return`throw ${this.error};`+_}get names(){return this.error.names}}class g extends n{constructor(_){super(),this.code=_}render({_n:_}){return`${this.code};`+_}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(_,T){return this.code=x(this.code,_,T),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class y extends n{constructor(_=[]){super(),this.nodes=_}render(_){return this.nodes.reduce((T,N)=>T+N.render(_),"")}optimizeNodes(){const{nodes:_}=this;let T=_.length;for(;T--;){const N=_[T].optimizeNodes();Array.isArray(N)?_.splice(T,1,...N):N?_[T]=N:_.splice(T,1)}return _.length>0?this:void 0}optimizeNames(_,T){const{nodes:N}=this;let z=N.length;for(;z--;){const W=N[z];W.optimizeNames(_,T)||(ae(_,W.names),N.splice(z,1))}return N.length>0?this:void 0}get names(){return this.nodes.reduce((_,T)=>H(_,T.names),{})}}class v extends y{render(_){return"{"+_._n+super.render(_)+"}"+_._n}}class w extends y{}class l extends v{}l.kind="else";class p extends v{constructor(_,T){super(T),this.condition=_}render(_){let T=`if(${this.condition})`+super.render(_);return this.else&&(T+="else "+this.else.render(_)),T}optimizeNodes(){super.optimizeNodes();const _=this.condition;if(_===!0)return this.nodes;let T=this.else;if(T){const N=T.optimizeNodes();T=this.else=Array.isArray(N)?new l(N):N}if(T)return _===!1?T instanceof p?T:T.nodes:this.nodes.length?this:new p(_e(_),T instanceof p?[T]:T.nodes);if(!(_===!1||!this.nodes.length))return this}optimizeNames(_,T){var N;if(this.else=(N=this.else)===null||N===void 0?void 0:N.optimizeNames(_,T),!!(super.optimizeNames(_,T)||this.else))return this.condition=x(this.condition,_,T),this}get names(){const _=super.names;return F(_,this.condition),this.else&&H(_,this.else.names),_}}p.kind="if";class c extends v{}c.kind="for";class d extends c{constructor(_){super(),this.iteration=_}render(_){return`for(${this.iteration})`+super.render(_)}optimizeNames(_,T){if(super.optimizeNames(_,T))return this.iteration=x(this.iteration,_,T),this}get names(){return H(super.names,this.iteration.names)}}class S extends c{constructor(_,T,N,z){super(),this.varKind=_,this.name=T,this.from=N,this.to=z}render(_){const T=_.es5?r.varKinds.var:this.varKind,{name:N,from:z,to:W}=this;return`for(${T} ${N}=${z}; ${N}<${W}; ${N}++)`+super.render(_)}get names(){const _=F(super.names,this.from);return F(_,this.to)}}class f extends c{constructor(_,T,N,z){super(),this.loop=_,this.varKind=T,this.name=N,this.iterable=z}render(_){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(_)}optimizeNames(_,T){if(super.optimizeNames(_,T))return this.iterable=x(this.iterable,_,T),this}get names(){return H(super.names,this.iterable.names)}}class b extends v{constructor(_,T,N){super(),this.name=_,this.args=T,this.async=N}render(_){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(_)}}b.kind="func";class E extends y{render(_){return"return "+super.render(_)}}E.kind="return";class C extends v{render(_){let T="try"+super.render(_);return this.catch&&(T+=this.catch.render(_)),this.finally&&(T+=this.finally.render(_)),T}optimizeNodes(){var _,T;return super.optimizeNodes(),(_=this.catch)===null||_===void 0||_.optimizeNodes(),(T=this.finally)===null||T===void 0||T.optimizeNodes(),this}optimizeNames(_,T){var N,z;return super.optimizeNames(_,T),(N=this.catch)===null||N===void 0||N.optimizeNames(_,T),(z=this.finally)===null||z===void 0||z.optimizeNames(_,T),this}get names(){const _=super.names;return this.catch&&H(_,this.catch.names),this.finally&&H(_,this.finally.names),_}}class D extends v{constructor(_){super(),this.error=_}render(_){return`catch(${this.error})`+super.render(_)}}D.kind="catch";class V extends v{render(_){return"finally"+super.render(_)}}V.kind="finally";class q{constructor(_,T={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...T,_n:T.lines?`
|
|
2
2
|
`:""},this._extScope=_,this._scope=new r.Scope({parent:_}),this._nodes=[new w]}toString(){return this._root.render(this.opts)}name(_){return this._scope.name(_)}scopeName(_){return this._extScope.name(_)}scopeValue(_,T){const N=this._extScope.value(_,T);return(this._values[N.prefix]||(this._values[N.prefix]=new Set)).add(N),N}getScopeValue(_,T){return this._extScope.getValue(_,T)}scopeRefs(_){return this._extScope.scopeRefs(_,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(_,T,N,z){const W=this._scope.toName(T);return N!==void 0&&z&&(this._constants[W.str]=N),this._leafNode(new i(_,W,N)),W}const(_,T,N){return this._def(r.varKinds.const,_,T,N)}let(_,T,N){return this._def(r.varKinds.let,_,T,N)}var(_,T,N){return this._def(r.varKinds.var,_,T,N)}assign(_,T,N){return this._leafNode(new o(_,T,N))}add(_,T){return this._leafNode(new u(_,t.operators.ADD,T))}code(_){return typeof _=="function"?_():_!==e.nil&&this._leafNode(new g(_)),this}object(..._){const T=["{"];for(const[N,z]of _)T.length>1&&T.push(","),T.push(N),(N!==z||this.opts.es5)&&(T.push(":"),(0,e.addCodeArg)(T,z));return T.push("}"),new e._Code(T)}if(_,T,N){if(this._blockNode(new p(_)),T&&N)this.code(T).else().code(N).endIf();else if(T)this.code(T).endIf();else if(N)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(_){return this._elseNode(new p(_))}else(){return this._elseNode(new l)}endIf(){return this._endBlockNode(p,l)}_for(_,T){return this._blockNode(_),T&&this.code(T).endFor(),this}for(_,T){return this._for(new d(_),T)}forRange(_,T,N,z,W=this.opts.es5?r.varKinds.var:r.varKinds.let){const ne=this._scope.toName(_);return this._for(new S(W,ne,T,N),()=>z(ne))}forOf(_,T,N,z=r.varKinds.const){const W=this._scope.toName(_);if(this.opts.es5){const ne=T instanceof e.Name?T:this.var("_arr",T);return this.forRange("_i",0,(0,e._)`${ne}.length`,re=>{this.var(W,(0,e._)`${ne}[${re}]`),N(W)})}return this._for(new f("of",z,W,T),()=>N(W))}forIn(_,T,N,z=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(_,(0,e._)`Object.keys(${T})`,N);const W=this._scope.toName(_);return this._for(new f("in",z,W,T),()=>N(W))}endFor(){return this._endBlockNode(c)}label(_){return this._leafNode(new m(_))}break(_){return this._leafNode(new h(_))}return(_){const T=new E;if(this._blockNode(T),this.code(_),T.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(_,T,N){if(!T&&!N)throw new Error('CodeGen: "try" without "catch" and "finally"');const z=new C;if(this._blockNode(z),this.code(_),T){const W=this.name("e");this._currNode=z.catch=new D(W),T(W)}return N&&(this._currNode=z.finally=new V,this.code(N)),this._endBlockNode(D,V)}throw(_){return this._leafNode(new $(_))}block(_,T){return this._blockStarts.push(this._nodes.length),_&&this.code(_).endBlock(T),this}endBlock(_){const T=this._blockStarts.pop();if(T===void 0)throw new Error("CodeGen: not in self-balancing block");const N=this._nodes.length-T;if(N<0||_!==void 0&&N!==_)throw new Error(`CodeGen: wrong number of nodes: ${N} vs ${_} expected`);return this._nodes.length=T,this}func(_,T=e.nil,N,z){return this._blockNode(new b(_,T,N)),z&&this.code(z).endFunc(),this}endFunc(){return this._endBlockNode(b)}optimize(_=1){for(;_-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(_){return this._currNode.nodes.push(_),this}_blockNode(_){this._currNode.nodes.push(_),this._nodes.push(_)}_endBlockNode(_,T){const N=this._currNode;if(N instanceof _||T&&N instanceof T)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${T?`${_.kind}/${T.kind}`:_.kind}"`)}_elseNode(_){const T=this._currNode;if(!(T instanceof p))throw new Error('CodeGen: "else" without "if"');return this._currNode=T.else=_,this}get _root(){return this._nodes[0]}get _currNode(){const _=this._nodes;return _[_.length-1]}set _currNode(_){const T=this._nodes;T[T.length-1]=_}}t.CodeGen=q;function H(R,_){for(const T in _)R[T]=(R[T]||0)+(_[T]||0);return R}function F(R,_){return _ instanceof e._CodeOrName?H(R,_.names):R}function x(R,_,T){if(R instanceof e.Name)return N(R);if(!z(R))return R;return new e._Code(R._items.reduce((W,ne)=>(ne instanceof e.Name&&(ne=N(ne)),ne instanceof e._Code?W.push(...ne._items):W.push(ne),W),[]));function N(W){const ne=T[W.str];return ne===void 0||_[W.str]!==1?W:(delete _[W.str],ne)}function z(W){return W instanceof e._Code&&W._items.some(ne=>ne instanceof e.Name&&_[ne.str]===1&&T[ne.str]!==void 0)}}function ae(R,_){for(const T in _)R[T]=(R[T]||0)-(_[T]||0)}function _e(R){return typeof R=="boolean"||typeof R=="number"||R===null?!R:(0,e._)`!${j(R)}`}t.not=_e;const ve=I(t.operators.AND);function ce(...R){return R.reduce(ve)}t.and=ce;const Ie=I(t.operators.OR);function L(...R){return R.reduce(Ie)}t.or=L;function I(R){return(_,T)=>_===e.nil?T:T===e.nil?_:(0,e._)`${j(_)} ${R} ${j(T)}`}function j(R){return R instanceof e.Name?R:(0,e._)`(${R})`}})(Ir)),Ir}var Q={},hs;function se(){if(hs)return Q;hs=1,Object.defineProperty(Q,"__esModule",{value:!0}),Q.checkStrictMode=Q.getErrorPath=Q.Type=Q.useFunc=Q.setEvaluated=Q.evaluatedPropsToName=Q.mergeEvaluated=Q.eachItem=Q.unescapeJsonPointer=Q.escapeJsonPointer=Q.escapeFragment=Q.unescapeFragment=Q.schemaRefOrVal=Q.schemaHasRulesButRef=Q.schemaHasRules=Q.checkUnknownRules=Q.alwaysValidSchema=Q.toHash=void 0;const t=Y(),e=hr();function r(f){const b={};for(const E of f)b[E]=!0;return b}Q.toHash=r;function s(f,b){return typeof b=="boolean"?b:Object.keys(b).length===0?!0:(a(f,b),!n(b,f.self.RULES.all))}Q.alwaysValidSchema=s;function a(f,b=f.schema){const{opts:E,self:C}=f;if(!E.strictSchema||typeof b=="boolean")return;const D=C.RULES.keywords;for(const V in b)D[V]||S(f,`unknown keyword: "${V}"`)}Q.checkUnknownRules=a;function n(f,b){if(typeof f=="boolean")return!f;for(const E in f)if(b[E])return!0;return!1}Q.schemaHasRules=n;function i(f,b){if(typeof f=="boolean")return!f;for(const E in f)if(E!=="$ref"&&b.all[E])return!0;return!1}Q.schemaHasRulesButRef=i;function o({topSchemaRef:f,schemaPath:b},E,C,D){if(!D){if(typeof E=="number"||typeof E=="boolean")return E;if(typeof E=="string")return(0,t._)`${E}`}return(0,t._)`${f}${b}${(0,t.getProperty)(C)}`}Q.schemaRefOrVal=o;function u(f){return $(decodeURIComponent(f))}Q.unescapeFragment=u;function m(f){return encodeURIComponent(h(f))}Q.escapeFragment=m;function h(f){return typeof f=="number"?`${f}`:f.replace(/~/g,"~0").replace(/\//g,"~1")}Q.escapeJsonPointer=h;function $(f){return f.replace(/~1/g,"/").replace(/~0/g,"~")}Q.unescapeJsonPointer=$;function g(f,b){if(Array.isArray(f))for(const E of f)b(E);else b(f)}Q.eachItem=g;function y({mergeNames:f,mergeToName:b,mergeValues:E,resultToName:C}){return(D,V,q,H)=>{const F=q===void 0?V:q instanceof t.Name?(V instanceof t.Name?f(D,V,q):b(D,V,q),q):V instanceof t.Name?(b(D,q,V),V):E(V,q);return H===t.Name&&!(F instanceof t.Name)?C(D,F):F}}Q.mergeEvaluated={props:y({mergeNames:(f,b,E)=>f.if((0,t._)`${E} !== true && ${b} !== undefined`,()=>{f.if((0,t._)`${b} === true`,()=>f.assign(E,!0),()=>f.assign(E,(0,t._)`${E} || {}`).code((0,t._)`Object.assign(${E}, ${b})`))}),mergeToName:(f,b,E)=>f.if((0,t._)`${E} !== true`,()=>{b===!0?f.assign(E,!0):(f.assign(E,(0,t._)`${E} || {}`),w(f,E,b))}),mergeValues:(f,b)=>f===!0?!0:{...f,...b},resultToName:v}),items:y({mergeNames:(f,b,E)=>f.if((0,t._)`${E} !== true && ${b} !== undefined`,()=>f.assign(E,(0,t._)`${b} === true ? true : ${E} > ${b} ? ${E} : ${b}`)),mergeToName:(f,b,E)=>f.if((0,t._)`${E} !== true`,()=>f.assign(E,b===!0?!0:(0,t._)`${E} > ${b} ? ${E} : ${b}`)),mergeValues:(f,b)=>f===!0?!0:Math.max(f,b),resultToName:(f,b)=>f.var("items",b)})};function v(f,b){if(b===!0)return f.var("props",!0);const E=f.var("props",(0,t._)`{}`);return b!==void 0&&w(f,E,b),E}Q.evaluatedPropsToName=v;function w(f,b,E){Object.keys(E).forEach(C=>f.assign((0,t._)`${b}${(0,t.getProperty)(C)}`,!0))}Q.setEvaluated=w;const l={};function p(f,b){return f.scopeValue("func",{ref:b,code:l[b.code]||(l[b.code]=new e._Code(b.code))})}Q.useFunc=p;var c;(function(f){f[f.Num=0]="Num",f[f.Str=1]="Str"})(c||(Q.Type=c={}));function d(f,b,E){if(f instanceof t.Name){const C=b===c.Num;return E?C?(0,t._)`"[" + ${f} + "]"`:(0,t._)`"['" + ${f} + "']"`:C?(0,t._)`"/" + ${f}`:(0,t._)`"/" + ${f}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return E?(0,t.getProperty)(f).toString():"/"+h(f)}Q.getErrorPath=d;function S(f,b,E=f.opts.strictSchema){if(E){if(b=`strict mode: ${b}`,E===!0)throw new Error(b);f.self.logger.warn(b)}}return Q.checkStrictMode=S,Q}var St={},ps;function Fe(){if(ps)return St;ps=1,Object.defineProperty(St,"__esModule",{value:!0});const t=Y(),e={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return St.default=e,St}var ms;function vr(){return ms||(ms=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=Y(),r=se(),s=Fe();t.keywordError={message:({keyword:l})=>(0,e.str)`must pass "${l}" keyword validation`},t.keyword$DataError={message:({keyword:l,schemaType:p})=>p?(0,e.str)`"${l}" keyword must be ${p} ($data)`:(0,e.str)`"${l}" keyword is invalid ($data)`};function a(l,p=t.keywordError,c,d){const{it:S}=l,{gen:f,compositeRule:b,allErrors:E}=S,C=$(l,p,c);d??(b||E)?u(f,C):m(S,(0,e._)`[${C}]`)}t.reportError=a;function n(l,p=t.keywordError,c){const{it:d}=l,{gen:S,compositeRule:f,allErrors:b}=d,E=$(l,p,c);u(S,E),f||b||m(d,s.default.vErrors)}t.reportExtraError=n;function i(l,p){l.assign(s.default.errors,p),l.if((0,e._)`${s.default.vErrors} !== null`,()=>l.if(p,()=>l.assign((0,e._)`${s.default.vErrors}.length`,p),()=>l.assign(s.default.vErrors,null)))}t.resetErrorsCount=i;function o({gen:l,keyword:p,schemaValue:c,data:d,errsCount:S,it:f}){if(S===void 0)throw new Error("ajv implementation error");const b=l.name("err");l.forRange("i",S,s.default.errors,E=>{l.const(b,(0,e._)`${s.default.vErrors}[${E}]`),l.if((0,e._)`${b}.instancePath === undefined`,()=>l.assign((0,e._)`${b}.instancePath`,(0,e.strConcat)(s.default.instancePath,f.errorPath))),l.assign((0,e._)`${b}.schemaPath`,(0,e.str)`${f.errSchemaPath}/${p}`),f.opts.verbose&&(l.assign((0,e._)`${b}.schema`,c),l.assign((0,e._)`${b}.data`,d))})}t.extendErrors=o;function u(l,p){const c=l.const("err",p);l.if((0,e._)`${s.default.vErrors} === null`,()=>l.assign(s.default.vErrors,(0,e._)`[${c}]`),(0,e._)`${s.default.vErrors}.push(${c})`),l.code((0,e._)`${s.default.errors}++`)}function m(l,p){const{gen:c,validateName:d,schemaEnv:S}=l;S.$async?c.throw((0,e._)`new ${l.ValidationError}(${p})`):(c.assign((0,e._)`${d}.errors`,p),c.return(!1))}const h={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function $(l,p,c){const{createErrors:d}=l.it;return d===!1?(0,e._)`{}`:g(l,p,c)}function g(l,p,c={}){const{gen:d,it:S}=l,f=[y(S,c),v(l,c)];return w(l,p,f),d.object(...f)}function y({errorPath:l},{instancePath:p}){const c=p?(0,e.str)`${l}${(0,r.getErrorPath)(p,r.Type.Str)}`:l;return[s.default.instancePath,(0,e.strConcat)(s.default.instancePath,c)]}function v({keyword:l,it:{errSchemaPath:p}},{schemaPath:c,parentSchema:d}){let S=d?p:(0,e.str)`${p}/${l}`;return c&&(S=(0,e.str)`${S}${(0,r.getErrorPath)(c,r.Type.Str)}`),[h.schemaPath,S]}function w(l,{params:p,message:c},d){const{keyword:S,data:f,schemaValue:b,it:E}=l,{opts:C,propertyName:D,topSchemaRef:V,schemaPath:q}=E;d.push([h.keyword,S],[h.params,typeof p=="function"?p(l):p||(0,e._)`{}`]),C.messages&&d.push([h.message,typeof c=="function"?c(l):c]),C.verbose&&d.push([h.schema,b],[h.parentSchema,(0,e._)`${V}${q}`],[s.default.data,f]),D&&d.push([h.propertyName,D])}})(Pr)),Pr}var ys;function qo(){if(ys)return ze;ys=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.boolOrEmptySchema=ze.topBoolOrEmptySchema=void 0;const t=vr(),e=Y(),r=Fe(),s={message:"boolean schema is false"};function a(o){const{gen:u,schema:m,validateName:h}=o;m===!1?i(o,!1):typeof m=="object"&&m.$async===!0?u.return(r.default.data):(u.assign((0,e._)`${h}.errors`,null),u.return(!0))}ze.topBoolOrEmptySchema=a;function n(o,u){const{gen:m,schema:h}=o;h===!1?(m.var(u,!1),i(o)):m.var(u,!0)}ze.boolOrEmptySchema=n;function i(o,u){const{gen:m,data:h}=o,$={gen:m,keyword:"false schema",data:h,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:o};(0,t.reportError)($,s,void 0,u)}return ze}var ye={},Ke={},gs;function Ln(){if(gs)return Ke;gs=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.getRules=Ke.isJSONType=void 0;const t=["string","number","integer","boolean","null","object","array"],e=new Set(t);function r(a){return typeof a=="string"&&e.has(a)}Ke.isJSONType=r;function s(){const a={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...a,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},a.number,a.string,a.array,a.object],post:{rules:[]},all:{},keywords:{}}}return Ke.getRules=s,Ke}var je={},_s;function Un(){if(_s)return je;_s=1,Object.defineProperty(je,"__esModule",{value:!0}),je.shouldUseRule=je.shouldUseGroup=je.schemaHasRulesForType=void 0;function t({schema:s,self:a},n){const i=a.RULES.types[n];return i&&i!==!0&&e(s,i)}je.schemaHasRulesForType=t;function e(s,a){return a.rules.some(n=>r(s,n))}je.shouldUseGroup=e;function r(s,a){var n;return s[a.keyword]!==void 0||((n=a.definition.implements)===null||n===void 0?void 0:n.some(i=>s[i]!==void 0))}return je.shouldUseRule=r,je}var vs;function pr(){if(vs)return ye;vs=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.reportTypeError=ye.checkDataTypes=ye.checkDataType=ye.coerceAndCheckDataType=ye.getJSONTypes=ye.getSchemaTypes=ye.DataType=void 0;const t=Ln(),e=Un(),r=vr(),s=Y(),a=se();var n;(function(c){c[c.Correct=0]="Correct",c[c.Wrong=1]="Wrong"})(n||(ye.DataType=n={}));function i(c){const d=o(c.type);if(d.includes("null")){if(c.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!d.length&&c.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');c.nullable===!0&&d.push("null")}return d}ye.getSchemaTypes=i;function o(c){const d=Array.isArray(c)?c:c?[c]:[];if(d.every(t.isJSONType))return d;throw new Error("type must be JSONType or JSONType[]: "+d.join(","))}ye.getJSONTypes=o;function u(c,d){const{gen:S,data:f,opts:b}=c,E=h(d,b.coerceTypes),C=d.length>0&&!(E.length===0&&d.length===1&&(0,e.schemaHasRulesForType)(c,d[0]));if(C){const D=v(d,f,b.strictNumbers,n.Wrong);S.if(D,()=>{E.length?$(c,d,E):l(c)})}return C}ye.coerceAndCheckDataType=u;const m=new Set(["string","number","integer","boolean","null"]);function h(c,d){return d?c.filter(S=>m.has(S)||d==="array"&&S==="array"):[]}function $(c,d,S){const{gen:f,data:b,opts:E}=c,C=f.let("dataType",(0,s._)`typeof ${b}`),D=f.let("coerced",(0,s._)`undefined`);E.coerceTypes==="array"&&f.if((0,s._)`${C} == 'object' && Array.isArray(${b}) && ${b}.length == 1`,()=>f.assign(b,(0,s._)`${b}[0]`).assign(C,(0,s._)`typeof ${b}`).if(v(d,b,E.strictNumbers),()=>f.assign(D,b))),f.if((0,s._)`${D} !== undefined`);for(const q of S)(m.has(q)||q==="array"&&E.coerceTypes==="array")&&V(q);f.else(),l(c),f.endIf(),f.if((0,s._)`${D} !== undefined`,()=>{f.assign(b,D),g(c,D)});function V(q){switch(q){case"string":f.elseIf((0,s._)`${C} == "number" || ${C} == "boolean"`).assign(D,(0,s._)`"" + ${b}`).elseIf((0,s._)`${b} === null`).assign(D,(0,s._)`""`);return;case"number":f.elseIf((0,s._)`${C} == "boolean" || ${b} === null
|
|
3
3
|
|| (${C} == "string" && ${b} && ${b} == +${b})`).assign(D,(0,s._)`+${b}`);return;case"integer":f.elseIf((0,s._)`${C} === "boolean" || ${b} === null
|
|
4
4
|
|| (${C} === "string" && ${b} && ${b} == +${b} && !(${b} % 1))`).assign(D,(0,s._)`+${b}`);return;case"boolean":f.elseIf((0,s._)`${b} === "false" || ${b} === 0 || ${b} === null`).assign(D,!1).elseIf((0,s._)`${b} === "true" || ${b} === 1`).assign(D,!0);return;case"null":f.elseIf((0,s._)`${b} === "" || ${b} === 0 || ${b} === false`),f.assign(D,null);return;case"array":f.elseIf((0,s._)`${C} === "string" || ${C} === "number"
|
|
@@ -18,7 +18,7 @@ import{b1 as oe,b2 as ss,w as P,aM as J,Y as he,aL as gr,W as B,aJ as aa,aH as d
|
|
|
18
18
|
},
|
|
19
19
|
"code": "export default function(input): Output { return { result: \`\${input.name} is \${input.age} years old.\` } }"
|
|
20
20
|
}
|
|
21
|
-
`)});A({signalName:P().describe("Signal name to wait for (e.g., 'approval'). Execution pauses until SEND_SIGNAL is called with this name.")});const cu=de([ou.describe("Call an external tool via MCP connection. "),iu.describe("Run pure TypeScript code for data transformation. Useful to merge data from multiple steps and transform it.")]),uu=A({maxAttempts:J().optional().describe("Max retry attempts on failure (default: 1, no retries)"),backoffMs:J().optional().describe("Initial delay between retries in ms (doubles each attempt)"),timeoutMs:J().optional().describe("Max execution time in ms before step fails (default: 30000)")}),ea=Qr(()=>A({type:P().optional(),properties:we(P(),ge()).optional(),required:B(P()).optional(),description:P().optional(),additionalProperties:he().optional(),additionalItems:he().optional(),items:ea.optional()}).passthrough()),ta=A({name:P().min(1).describe("Unique identifier for this step. Other steps reference its output as @name.field"),description:P().optional().describe("What this step does"),action:cu,input:we(P(),ge()).optional().describe("Data passed to the action. Use @ref for dynamic values: @input.field (workflow input), @stepName.field (previous step output), @item/@index (loop context). Example: { 'userId': '@input.user_id', 'data': '@fetch.result' }"),outputSchema:ea.optional().describe("Optional JSON Schema describing the expected output of the step."),config:uu.optional().describe("Retry and timeout settings")}),lu=Pe(["enqueued","running","success","error","failed","cancelled"]).default("enqueued"),ra=Be.extend({steps:B(ta).describe("Steps that make up the workflow")
|
|
21
|
+
`)});A({signalName:P().describe("Signal name to wait for (e.g., 'approval'). Execution pauses until SEND_SIGNAL is called with this name.")});const cu=de([ou.describe("Call an external tool via MCP connection. "),iu.describe("Run pure TypeScript code for data transformation. Useful to merge data from multiple steps and transform it.")]),uu=A({maxAttempts:J().optional().describe("Max retry attempts on failure (default: 1, no retries)"),backoffMs:J().optional().describe("Initial delay between retries in ms (doubles each attempt)"),timeoutMs:J().optional().describe("Max execution time in ms before step fails (default: 30000)")}),ea=Qr(()=>A({type:P().optional(),properties:we(P(),ge()).optional(),required:B(P()).optional(),description:P().optional(),additionalProperties:he().optional(),additionalItems:he().optional(),items:ea.optional()}).passthrough()),ta=A({name:P().min(1).describe("Unique identifier for this step. Other steps reference its output as @name.field"),description:P().optional().describe("What this step does"),action:cu,input:we(P(),ge()).optional().describe("Data passed to the action. Use @ref for dynamic values: @input.field (workflow input), @stepName.field (previous step output), @item/@index (loop context). Example: { 'userId': '@input.user_id', 'data': '@fetch.result' }"),outputSchema:ea.optional().describe("Optional JSON Schema describing the expected output of the step."),config:uu.optional().describe("Retry and timeout settings")}),lu=Pe(["enqueued","running","success","error","failed","cancelled"]).default("enqueued"),ra=Be.extend({steps:B(ta).describe("Steps that make up the workflow"),gateway_id:P().describe("ID of the gateway that will be used to execute the workflow"),status:lu.describe("Current status of the workflow execution"),input:we(P(),ge()).optional().describe("Input data for the workflow execution"),output:ge().optional().describe("Output data for the workflow execution"),completed_at_epoch_ms:J().nullish().describe("Timestamp of when the workflow execution completed"),start_at_epoch_ms:J().nullish().describe("Timestamp of when the workflow execution started or will start"),timeout_ms:J().nullish().describe("Timeout in milliseconds for the workflow execution"),deadline_at_epoch_ms:J().nullish().describe("Deadline for the workflow execution - when the workflow execution will be cancelled if it is not completed. This is read-only and is set by the workflow engine when an execution is created."),error:ge().describe("Error that occurred during the workflow execution"),completed_steps:A({success:B(P()).describe("Names of the steps that were completed successfully"),error:B(P()).describe("Names of the steps that errored")}).optional().describe("Names of the steps that were completed and their status")}),du=Pe(["signal","timer","message","output","step_started","step_completed","workflow_started","workflow_completed"]);Be.extend({execution_id:P(),type:du,name:P().nullish(),payload:ge().optional(),visible_at:J().nullish(),consumed_at:J().nullish(),source_execution_id:P().nullish()});const fu=Be.extend({description:P().optional().describe("Human-readable summary of what this workflow does"),steps:B(ta).describe("Ordered list of steps. Execution order is auto-determined by @ref dependencies: steps with no @ref dependencies run in parallel; steps referencing @stepName wait for that step to complete.")}),hu=Qe("workflow",fu),pu={maxAttempts:1,timeoutMs:3e4},Iu={name:"Initial Step",action:{code:`
|
|
22
22
|
interface Input {
|
|
23
23
|
example: string;
|
|
24
24
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as F,c as v,j as L,K as j,q as A,e as D,t as I}from"./index-
|
|
1
|
+
import{r as F,c as v,j as L,K as j,q as A,e as D,t as I}from"./index-BAX9m6md.js";import{c as b,u as q}from"./button-Cr6E3Zah.js";import{u as x}from"./tooltip-ft1RTR-v.js";const U=({size:n=24,color:t="currentColor",...o})=>F.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},F.createElement("path",{d:"M20.5 7.278 12 12m0 0L3.5 7.278M12 12v9.5m9-5.441V7.942c0-.343 0-.514-.05-.667a1 1 0 0 0-.215-.364c-.109-.119-.258-.202-.558-.368l-7.4-4.111c-.284-.158-.425-.237-.575-.267a1 1 0 0 0-.403 0c-.15.03-.292.11-.576.267l-7.4 4.11c-.3.167-.45.25-.558.369a1 1 0 0 0-.215.364C3 7.428 3 7.599 3 7.942v8.117c0 .342 0 .514.05.666a1 1 0 0 0 .215.364c.109.119.258.202.558.368l7.4 4.111c.284.158.425.237.576.268.133.027.27.027.402 0 .15-.031.292-.11.576-.268l7.4-4.11c.3-.167.45-.25.558-.369a.999.999 0 0 0 .215-.364c.05-.152.05-.324.05-.666Z"}));U.displayName="Container";const W={xs:"h-6 w-6",sm:"h-8 w-8",md:"h-12 w-12",lg:"h-16 w-16"},Q={xs:"min-w-6",sm:"min-w-8",md:"min-w-12",lg:"min-w-16"},B={xs:12,sm:16,md:24,lg:32};function ot(n){const t=v.c(7),{icon:o,name:e,size:s,className:r,fallbackIcon:i}=n,m=s===void 0?"md":s,g=o??"no-icon";let c;return t[0]!==r||t[1]!==i||t[2]!==o||t[3]!==e||t[4]!==m||t[5]!==g?(c=L.jsx(J,{icon:o,name:e,size:m,className:r,fallbackIcon:i},g),t[0]=r,t[1]=i,t[2]=o,t[3]=e,t[4]=m,t[5]=g,t[6]=c):c=t[6],c}function J(n){const t=v.c(24),{icon:o,name:e,size:s,className:r,fallbackIcon:i}=n,m=s===void 0?"md":s,[g,c]=F.useState(!1),h=!!o&&g,a=W[m],E=Q[m];let S;t[0]!==r||t[1]!==a||t[2]!==E?(S=b("rounded-lg border border-border shrink-0 overflow-hidden",a,E,r),t[0]=r,t[1]=a,t[2]=E,t[3]=S):S=t[3];const N=o||void 0,_=!h&&"hidden";let l;t[4]!==_?(l=b("h-full w-full object-cover",_),t[4]=_,t[5]=l):l=t[5];let y,T;t[6]===Symbol.for("react.memo_cache_sentinel")?(y=()=>c(!1),T=()=>c(!0),t[6]=y,t[7]=T):(y=t[6],T=t[7]);let u;t[8]!==e||t[9]!==N||t[10]!==l?(u=L.jsx("img",{src:N,alt:e,className:l,onError:y,onLoad:T}),t[8]=e,t[9]=N,t[10]=l,t[11]=u):u=t[11];const p=h&&"hidden";let d;t[12]!==p?(d=b("h-full w-full flex items-center justify-center bg-muted/20",p),t[12]=p,t[13]=d):d=t[13];let w;t[14]!==i||t[15]!==m?(w=i??L.jsx(U,{size:B[m],className:"text-muted-foreground"}),t[14]=i,t[15]=m,t[16]=w):w=t[16];let C;t[17]!==d||t[18]!==w?(C=L.jsx("div",{className:d,children:w}),t[17]=d,t[18]=w,t[19]=C):C=t[19];let f;return t[20]!==u||t[21]!==C||t[22]!==S?(f=L.jsxs("div",{className:S,children:[u,C]}),t[20]=u,t[21]=C,t[22]=S,t[23]=f):f=t[23],f}const M="UNKNOWN_CONNECTION_ID",P=async n=>{const o=(await n.text()).split(`
|
|
2
2
|
`).find(s=>s.startsWith("data: "));if(!o)throw new Error("No data received from the server");return JSON.parse(o.replace("data: ",""))};function k(n){if(n===M)return(async()=>{});const t=n?`/mcp/${n}`:"/mcp";return async(o,e)=>{const s=await fetch(t,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:1,method:"tools/call",params:{name:o,arguments:e}}),headers:{"Content-Type":"application/json",Accept:"application/json, text/event-stream"},credentials:"include"});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);const r=s.headers.get("Content-Type")==="application/json"?await s.json():await P(s);if(r.result?.isError)throw new Error(r.result.content?.[0]?.text||"Tool call failed");return r.result?.structuredContent||r.result}}function R(n,t,o){const e=[];if(n?.trim()){const s=n.trim(),r=o.map(i=>({field:[String(i)],operator:"contains",value:s}));r.length===1&&r[0]?e.push(r[0]):r.length>1&&e.push({operator:"or",conditions:r})}if(t&&t.length>0)for(const s of t)e.push({field:[s.column],operator:"eq",value:s.value});if(e.length!==0)return e.length===1?e[0]:{operator:"and",conditions:e}}function K(n,t,o){const e=n??o,s=t??"asc";return[{field:[String(e)],direction:s}]}function Z(n,t,o,e){const s=v.c(14),{org:r}=x();let i;s[0]!==t?(i=t.toUpperCase(),s[0]=t,s[1]=i):i=s[1];const g=`COLLECTION_${i}_GET`;let c;s[2]!==t||s[3]!==o||s[4]!==r.slug||s[5]!==n?(c=j.collectionItem(r.slug,n,t,o??""),s[2]=t,s[3]=o,s[4]=r.slug,s[5]=n,s[6]=c):c=s[6];let h;s[7]!==g||s[8]!==o||s[9]!==e?(h=async()=>o?await e(g,{id:o}):{item:null},s[7]=g,s[8]=o,s[9]=e,s[10]=h):h=s[10];let a;s[11]!==c||s[12]!==h?(a={queryKey:c,queryFn:h,staleTime:6e4},s[11]=c,s[12]=h,s[13]=a):a=s[13];const{data:E}=A(a);return E.item}function H(n,t,o,e){const s=v.c(11),r=e===void 0?{}:e,{org:i}=x(),{searchTerm:m,filters:g,sortKey:c,sortDirection:h,searchFields:a,defaultSortKey:E,pageSize:S}=r,N=a===void 0?["title","description"]:a,_=E===void 0?"updated_at":E,l=S===void 0?100:S;let y;s[0]!==t?(y=t.toUpperCase(),s[0]=t,s[1]=y):y=s[1];const u=`COLLECTION_${y}_LIST`,p=R(m,g,N),d=K(c,h,_),w=JSON.stringify({where:p,orderBy:d,limit:l}),C=j.collectionList(i.slug,n,t,w);let f;s[2]!==u||s[3]!==d||s[4]!==l||s[5]!==o||s[6]!==p?(f=async()=>{const z={...p&&{where:p},...d&&{orderBy:d},limit:l,offset:0};return(await o(u,z))?.items??[]},s[2]=u,s[3]=d,s[4]=l,s[5]=o,s[6]=p,s[7]=f):f=s[7];let O;s[8]!==C||s[9]!==f?(O={queryKey:C,queryFn:f},s[8]=C,s[9]=f,s[10]=O):O=s[10];const{data:$}=A(O);return $}function G(n,t,o){const e=v.c(39),{org:s}=x(),r=D();let i;e[0]!==t?(i=t.toUpperCase(),e[0]=t,e[1]=i):i=e[1];const m=i,g=`COLLECTION_${m}_CREATE`,c=`COLLECTION_${m}_UPDATE`,h=`COLLECTION_${m}_DELETE`;let a;e[2]!==g||e[3]!==o?(a=async f=>(await o(g,{data:f})).item,e[2]=g,e[3]=o,e[4]=a):a=e[4];let E;e[5]!==t||e[6]!==s||e[7]!==r||e[8]!==n?(E=()=>{r.invalidateQueries({queryKey:j.collection(s.slug,n,t)}),I.success("Item created successfully")},e[5]=t,e[6]=s,e[7]=r,e[8]=n,e[9]=E):E=e[9];let S;e[10]!==a||e[11]!==E?(S={mutationFn:a,onSuccess:E,onError:X},e[10]=a,e[11]=E,e[12]=S):S=e[12];const N=q(S);let _;e[13]!==o||e[14]!==c?(_=async f=>{const{id:O,data:$}=f;return(await o(c,{id:O,data:$})).item},e[13]=o,e[14]=c,e[15]=_):_=e[15];let l;e[16]!==t||e[17]!==s||e[18]!==r||e[19]!==n?(l=()=>{r.invalidateQueries({queryKey:j.collection(s.slug,n,t)}),I.success("Item updated successfully")},e[16]=t,e[17]=s,e[18]=r,e[19]=n,e[20]=l):l=e[20];let y;e[21]!==_||e[22]!==l?(y={mutationFn:_,onSuccess:l,onError:Y},e[21]=_,e[22]=l,e[23]=y):y=e[23];const T=q(y);let u;e[24]!==h||e[25]!==o?(u=async f=>(await o(h,{id:f})).item.id,e[24]=h,e[25]=o,e[26]=u):u=e[26];let p;e[27]!==t||e[28]!==s||e[29]!==r||e[30]!==n?(p=()=>{r.invalidateQueries({queryKey:j.collection(s.slug,n,t)}),I.success("Item deleted successfully")},e[27]=t,e[28]=s,e[29]=r,e[30]=n,e[31]=p):p=e[31];let d;e[32]!==u||e[33]!==p?(d={mutationFn:u,onSuccess:p,onError:V},e[32]=u,e[33]=p,e[34]=d):d=e[34];const w=q(d);let C;return e[35]!==N||e[36]!==w||e[37]!==T?(C={create:N,update:T,delete:w},e[35]=N,e[36]=w,e[37]=T,e[38]=C):C=e[38],C}function V(n){const t=n instanceof Error?n.message:String(n);I.error(`Failed to delete item: ${t}`)}function Y(n){const t=n instanceof Error?n.message:String(n);I.error(`Failed to update item: ${t}`)}function X(n){const t=n instanceof Error?n.message:String(n);I.error(`Failed to create item: ${t}`)}function rt(n){const t=v.c(3);let o;t[0]!==n?(o=n===void 0?{}:n,t[0]=n,t[1]=o):o=t[1];const e=o,{org:s}=x();let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=k(),t[2]=r):r=t[2];const i=r;return H(s.slug,"CONNECTIONS",i,e)}function it(n){const t=v.c(1),{org:o}=x();let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=k(),t[0]=e):e=t[0];const s=e;return Z(o.slug,"CONNECTIONS",n,s)}function ct(){const n=v.c(1),{org:t}=x();let o;n[0]===Symbol.for("react.memo_cache_sentinel")?(o=k(),n[0]=o):o=n[0];const e=o;return G(t.slug,"CONNECTIONS",e)}export{ot as I,M as U,ct as a,it as b,k as c,G as d,H as e,Z as f,U as n,rt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,K as l}from"./index-
|
|
1
|
+
import{c as f,K as l}from"./index-BAX9m6md.js";import{u as y}from"./formatDistanceToNow-DDVdovHq.js";async function h(t){const e=`/mcp/${t}`,s={"Content-Type":"application/json",Accept:"application/json, text/event-stream"};try{const o=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"mesh-prompts",version:"1.0.0"}}})});if(!o.ok)return[];if((await o.json()).error)return[];const i=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:2,method:"prompts/list",params:{}})});if(!i.ok)return[];const r=await i.json();return r.error?[]:r.result?.prompts||[]}catch{return[]}}function P(t){const e=f.c(13);let s;e[0]!==t?(s=t.map(q),e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s?(o={queries:s},e[2]=s,e[3]=o):o=e[3];const n=y(o);let i,r;if(e[4]!==t||e[5]!==n){r=new Map;let p;e[8]!==n?(p=n.some(j),e[8]=n,e[9]=p):p=e[9],i=p,t.forEach((u,m)=>{const c=n[m];c?.data?r.set(u,c.data.map(d)):r.set(u,[])}),e[4]=t,e[5]=n,e[6]=i,e[7]=r}else i=e[6],r=e[7];let a;return e[10]!==i||e[11]!==r?(a={promptsMap:r,isLoading:i},e[10]=i,e[11]=r,e[12]=a):a=e[12],a}function d(t){return{name:t.name,description:t.description}}function j(t){return t.isLoading}function q(t){return{queryKey:l.connectionPrompts(t),queryFn:()=>h(t),staleTime:6e4,retry:!1}}async function w(t){const e=`/mcp/${t}`,s={"Content-Type":"application/json",Accept:"application/json, text/event-stream"};try{const o=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"mesh-resources",version:"1.0.0"}}})});if(!o.ok)return[];if((await o.json()).error)return[];const i=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:2,method:"resources/list",params:{}})});if(!i.ok)return[];const r=await i.json();return r.error?[]:r.result?.resources||[]}catch{return[]}}function $(t){const e=f.c(13);let s;e[0]!==t?(s=t.map(O),e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s?(o={queries:s},e[2]=s,e[3]=o):o=e[3];const n=y(o);let i,r;if(e[4]!==t||e[5]!==n){r=new Map;let p;e[8]!==n?(p=n.some(g),e[8]=n,e[9]=p):p=e[9],i=p,t.forEach((u,m)=>{const c=n[m];c?.data?r.set(u,c.data.map(S)):r.set(u,[])}),e[4]=t,e[5]=n,e[6]=i,e[7]=r}else i=e[6],r=e[7];let a;return e[10]!==i||e[11]!==r?(a={resourcesMap:r,isLoading:i},e[10]=i,e[11]=r,e[12]=a):a=e[12],a}function S(t){return{uri:t.uri,name:t.name,description:t.description}}function g(t){return t.isLoading}function O(t){return{queryKey:l.connectionResources(t),queryFn:()=>w(t),staleTime:6e4,retry:!1}}export{$ as a,P as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n}from"./index-
|
|
1
|
+
import{c as n}from"./index-BAX9m6md.js";import{e as u,d as m,f,c as r}from"./use-connection-C7xrQrun.js";import{u as a}from"./tooltip-ft1RTR-v.js";function g(t){const e=n.c(3);let o;e[0]!==t?(o=t===void 0?{}:t,e[0]=t,e[1]=o):o=e[1];const s=o,{org:c}=a();let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=r(),e[2]=l):l=e[2];const i=l;return u(c.slug,"GATEWAY",i,s)}function y(t){const e=n.c(1),{org:o}=a();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=r(),e[0]=s):s=e[0];const c=s;return f(o.slug,"GATEWAY",t,c)}function G(){const t=n.c(1),{org:e}=a();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=r(),t[0]=o):o=t[0];const s=o;return m(e.slug,"GATEWAY",s)}export{G as a,y as b,g as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,c as T}from"./index-
|
|
1
|
+
import{r as a,c as T}from"./index-BAX9m6md.js";import{u as D}from"./use-mobile-iQFQFevV.js";const W=({size:l=24,color:e="currentColor",...t})=>a.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},a.createElement("path",{d:"M2.42 12.713c-.136-.215-.204-.323-.242-.49a1.173 1.173 0 0 1 0-.446c.038-.167.106-.274.242-.49C3.546 9.505 6.895 5 12 5s8.455 4.505 9.58 6.287c.137.215.205.323.243.49.029.125.029.322 0 .446-.038.167-.106.274-.242.49C20.455 14.495 17.105 19 12 19c-5.106 0-8.455-4.505-9.58-6.287Z"}),a.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}));W.displayName="Eye";function k(l){const e=`deco-filters-${l}`,[t,c]=a.useState(()=>{try{const o=globalThis.localStorage?.getItem(e);if(o)return JSON.parse(o)}catch(o){console.error("Failed to parse stored filters:",o)}return[]});return[t,o=>{c(o);try{globalThis.localStorage?.setItem(e,JSON.stringify(o))}catch(i){console.error("Failed to save filters:",i)}}]}function C(l){const e=T.c(7),[t,c]=a.useState(l),[s,o]=a.useState(l?"desc":null);let i;e[0]!==s||e[1]!==t?(i=h=>{t!==h?(c(h),o("asc")):s==="asc"?o("desc"):s==="desc"&&(c(void 0),o(null))},e[0]=s,e[1]=t,e[2]=i):i=e[2];const u=i;let r;return e[3]!==u||e[4]!==s||e[5]!==t?(r={sortKey:t,sortDirection:s,handleSort:u},e[3]=u,e[4]=s,e[5]=t,e[6]=r):r=e[6],r}function L(l,e){const t=T.c(12),c=e===void 0?"cards":e,s=D(),o=a.useRef(s),i=l?`deco-view-mode-${l}`:"deco-view-mode";let u;t[0]!==c||t[1]!==i?(u=()=>{const d=globalThis.localStorage?.getItem(i);return d==="cards"||d==="table"?d:c},t[0]=c,t[1]=i,t[2]=u):u=t[2];const[r,h]=a.useState(u);let f;t[3]!==i?(f=d=>{h(d),globalThis.localStorage?.setItem(i,d)},t[3]=i,t[4]=f):f=t[4];const p=f;let S,g;t[5]!==s||t[6]!==r?(S=()=>{!o.current&&s&&r==="table"&&h("cards"),o.current=s},g=[s,r],t[5]=s,t[6]=r,t[7]=S,t[8]=g):(S=t[7],g=t[8]),a.useEffect(S,g);let n;return t[9]!==p||t[10]!==r?(n=[r,p],t[9]=p,t[10]=r,t[11]=n):n=t[11],n}function O(l){const e=T.c(20),{namespace:t,resource:c,defaultSortKey:s,defaultViewMode:o}=l,i=s===void 0?"title":s,u=o===void 0?"table":o,[r,h]=a.useState(""),f=a.useDeferredValue(r),p=`${t}-${c}`,[S,g]=k(p),n=`mesh-${c}-filter-visible-${t}`;let d;e[0]!==n?(d=()=>globalThis.localStorage?.getItem(n)==="true",e[0]=n,e[1]=d):d=e[1];const[m,B]=a.useState(d);let y;e[2]!==n?(y=I=>{B(I),globalThis.localStorage?.setItem(n,String(I))},e[2]=n,e[3]=y):y=e[3];const b=y;let M;e[4]!==m||e[5]!==b?(M=()=>{b(!m)},e[4]=m,e[5]=b,e[6]=M):M=e[6];const w=M,[V,$]=L(`mesh-${c}-${t}`,u),{sortKey:x,sortDirection:F,handleSort:K}=C(i),E=x;let v;return e[7]!==m||e[8]!==S||e[9]!==K||e[10]!==r||e[11]!==f||e[12]!==b||e[13]!==g||e[14]!==$||e[15]!==F||e[16]!==E||e[17]!==w||e[18]!==V?(v={search:r,searchTerm:f,setSearch:h,filters:S,setFilters:g,filterBarVisible:m,setFilterBarVisible:b,toggleFilterBar:w,viewMode:V,setViewMode:$,sortKey:E,sortDirection:F,handleSort:K},e[7]=m,e[8]=S,e[9]=K,e[10]=r,e[11]=f,e[12]=b,e[13]=g,e[14]=$,e[15]=F,e[16]=E,e[17]=w,e[18]=V,e[19]=v):v=e[19],v}export{W as s,O as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as E,K as b}from"./index-
|
|
1
|
+
import{c as E,K as b}from"./index-BAX9m6md.js";import{u as j}from"./useQuery-DJsYPxOW.js";function T(g){const e=E.c(18),{url:o,token:r,enabled:w}=g,$=w===void 0?!0:w;let i;e[0]!==r||e[1]!==o?(i=b.mcpTools(o,r),e[0]=r,e[1]=o,e[2]=i):i=e[2];let s;e[3]!==r||e[4]!==o?(s=async()=>{if(!o)return[];const m={"Content-Type":"application/json",Accept:"application/json, text/event-stream"};r&&(m.Authorization=`Bearer ${r}`);const u=await fetch(o,{method:"POST",headers:m,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"mesh-mcp",version:"1.0.0"}}})});if(!u.ok)throw new Error(`MCP initialization failed: ${u.status}`);const h=await u.json();if(h.error)throw new Error(`MCP initialization error: ${h.error.message} (code: ${h.error.code})`);const y=await fetch(o,{method:"POST",headers:m,body:JSON.stringify({jsonrpc:"2.0",id:2,method:"tools/list",params:{}})});if(!y.ok)throw new Error(`Failed to list tools: ${y.status}`);const l=await y.json();if(l.error)throw new Error(`Failed to list tools: ${l.error.message} (code: ${l.error.code})`);return l.result?.tools||[]},e[3]=r,e[4]=o,e[5]=s):s=e[5];const d=$&&!!o;let a;e[6]!==i||e[7]!==s||e[8]!==d?(a={queryKey:i,queryFn:s,enabled:d,staleTime:3e4,retry:!1},e[6]=i,e[7]=s,e[8]=d,e[9]=a):a=e[9];const t=j(a),f=o?t.isLoading?"connecting":t.isError?"error":"ready":"disconnected";let n;e[10]!==t.data?(n=t.data||[],e[10]=t.data,e[11]=n):n=e[11];const p=t.error;let c;return e[12]!==t.isLoading||e[13]!==t.refetch||e[14]!==f||e[15]!==n||e[16]!==p?(c={tools:n,state:f,error:p,isLoading:t.isLoading,refetch:t.refetch},e[12]=t.isLoading,e[13]=t.refetch,e[14]=f,e[15]=n,e[16]=p,e[17]=c):c=e[17],c}export{T as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,q as n,K as u,a as i}from"./index-
|
|
1
|
+
import{c as o,q as n,K as u,a as i}from"./index-BAX9m6md.js";import{u as a}from"./tooltip-ft1RTR-v.js";function p(){const e=o.c(4),{locator:s}=a();let t;e[0]!==s?(t=u.members(s),e[0]=s,e[1]=t):t=e[1];let r;return e[2]!==t?(r={queryKey:t,queryFn:m},e[2]=t,e[3]=r):r=e[3],n(r)}function m(){return i.organization.listMembers()}export{p as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,r}from"./index-
|
|
1
|
+
import{c as m,r}from"./index-BAX9m6md.js";const a=768,o=()=>globalThis.innerWidth<a;function u(){const e=m.c(2),[l,n]=r.useState(o);let t,s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{const i=()=>n(o),c=globalThis.matchMedia(`(max-width: ${a-1}px)`);return c.addEventListener("change",i),n(o),()=>c.removeEventListener("change",i)},s=[],e[0]=t,e[1]=s):(t=e[0],s=e[1]),r.useEffect(t,s),l}export{u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,q as y,e as T,K as f}from"./index-
|
|
1
|
+
import{c as o,q as y,e as T,K as f}from"./index-BAX9m6md.js";import{u as p}from"./button-Cr6E3Zah.js";import{c as m}from"./use-connection-C7xrQrun.js";function N(t){const e=o.c(8);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=m(),e[0]=n):n=e[0];const c=n;let r;e[1]!==t?(r=f.organizationSettings(t),e[1]=t,e[2]=r):r=e[2];let s;e[3]!==t?(s=async()=>{const u=await c("ORGANIZATION_SETTINGS_GET",{});return u||{organizationId:t,sidebar_items:null,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}},e[3]=t,e[4]=s):s=e[4];let l;e[5]!==r||e[6]!==s?(l={queryKey:r,queryFn:s,staleTime:6e4},e[5]=r,e[6]=s,e[7]=l):l=e[7];const{data:i}=y(l);return i}function q(t){const e=o.c(11),n=T();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=m(),e[0]=c):c=e[0];const r=c;let s;e[1]!==t?(s=async S=>await r("ORGANIZATION_SETTINGS_UPDATE",{organizationId:t,...S}),e[1]=t,e[2]=s):s=e[2];let l;e[3]!==t||e[4]!==n?(l=()=>{n.invalidateQueries({queryKey:f.organizationSettings(t)})},e[3]=t,e[4]=n,e[5]=l):l=e[5];let i;e[6]!==s||e[7]!==l?(i={mutationFn:s,onSuccess:l},e[6]=s,e[7]=l,e[8]=i):i=e[8];const u=p(i);let a;return e[9]!==u?(a={update:u},e[9]=u,e[10]=a):a=e[10],a}export{q as a,N as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,q as T,K as C}from"./index-
|
|
1
|
+
import{c as p,q as T,K as C}from"./index-BAX9m6md.js";import{u as q}from"./useQuery-DJsYPxOW.js";import{u as K}from"./button-Cr6E3Zah.js";function F(a){const e=p.c(23);let o,l,t,s,r;e[0]!==a?({toolCaller:t,toolName:r,toolInputParams:s,scope:l,...o}=a,e[0]=a,e[1]=o,e[2]=l,e[3]=t,e[4]=s,e[5]=r):(o=e[1],l=e[2],t=e[3],s=e[4],r=e[5]);let i,c,m,u;if(e[6]!==o||e[7]!==l||e[8]!==s||e[9]!==r){const y=JSON.stringify(s);u=T,i=o,c=o.staleTime??6e4,m=C.toolCall(l,r,y),e[6]=o,e[7]=l,e[8]=s,e[9]=r,e[10]=i,e[11]=c,e[12]=m,e[13]=u}else i=e[10],c=e[11],m=e[12],u=e[13];let n;e[14]!==t||e[15]!==s||e[16]!==r?(n=async()=>await t(r,s),e[14]=t,e[15]=s,e[16]=r,e[17]=n):n=e[17];let f;return e[18]!==i||e[19]!==c||e[20]!==m||e[21]!==n?(f={...i,staleTime:c,queryKey:m,queryFn:n},e[18]=i,e[19]=c,e[20]=m,e[21]=n,e[22]=f):f=e[22],u(f)}function I(a){const e=p.c(3),{toolCaller:o,toolName:l}=a;let t;return e[0]!==o||e[1]!==l?(t={mutationFn:async s=>await o(l,s),onSuccess:S,onError:N},e[0]=o,e[1]=l,e[2]=t):t=e[2],K(t)}function N(a){console.error("tool call mutation error",a)}function S(a){console.log("tool call mutation success",a)}function O(a){const e=p.c(14),{toolCaller:o,toolName:l,toolInputParams:t,scope:s,staleTime:r,refetchInterval:i,enabled:c}=a,m=r===void 0?6e4:r;let u;e[0]!==s||e[1]!==t||e[2]!==l?(u=C.toolCall(s,l,JSON.stringify(t??{})),e[0]=s,e[1]=t,e[2]=l,e[3]=u):u=e[3];let n;e[4]!==o||e[5]!==t||e[6]!==l?(n=async()=>await o(l,t??{}),e[4]=o,e[5]=t,e[6]=l,e[7]=n):n=e[7];let f;return e[8]!==c||e[9]!==i||e[10]!==m||e[11]!==u||e[12]!==n?(f={queryKey:u,queryFn:n,enabled:c,staleTime:m,refetchInterval:i},e[8]=c,e[9]=i,e[10]=m,e[11]=u,e[12]=n,e[13]=f):f=e[13],q(f)}export{O as a,I as b,F as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aq as u,am as s}from"./index-BAX9m6md.js";function o(e,r){return u(e,s,r)}export{o as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{am as d,an as f,ao as v,ap as b,aq as p,ar as x}from"./index-
|
|
1
|
+
import{am as d,an as f,ao as v,ap as b,aq as p,ar as x}from"./index-BAX9m6md.js";var l=class extends d{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:f()})}getOptimisticResult(e){return e.behavior=f(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,a=super.createResult(e,t),{isFetching:i,isRefetching:P,isError:c,isRefetchError:g}=a,r=s.fetchMeta?.fetchMore?.direction,h=c&&r==="forward",o=i&&r==="forward",n=c&&r==="backward",u=i&&r==="backward";return{...a,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:b(t,s.data),hasPreviousPage:v(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:u,isRefetchError:g&&!h&&!n,isRefetching:P&&!o&&!u}}};function w(e,t){return p({...e,enabled:!0,suspense:!0,throwOnError:x},l,t)}export{w as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Y,r as V,j as i}from"./index-
|
|
1
|
+
import{c as Y,r as V,j as i}from"./index-BAX9m6md.js";import{c as n}from"./button-Cr6E3Zah.js";const Z={sm:{button:"size-7",icon:"size-4"},md:{button:"size-9",icon:"size-5"},lg:{button:"size-12",icon:"size-6"}};function oe(J){const e=Y.c(66),{value:o,onValueChange:l,options:t,size:D,fullWidth:F,className:W}=J,K=D===void 0?"sm":D,w=F===void 0?!1:F,G=V.useRef(null),H=V.useRef(null);let R;e[0]===Symbol.for("react.memo_cache_sentinel")?(R={left:0,width:0,opacity:0},e[0]=R):R=e[0];const[N,O]=V.useState(R);let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=S=>{if(!S.current)return;const{offsetLeft:U,offsetWidth:X}=S.current;O({left:U,width:X,opacity:1})},e[1]=_):_=e[1];const Q=_;let C;e[2]!==t[0].value||e[3]!==o?(C=()=>{const S=o===t[0].value?G:H;Q(S)},e[2]=t[0].value,e[3]=o,e[4]=C):C=e[4];let E;e[5]!==t||e[6]!==o?(E=[o,t],e[5]=t,e[6]=o,e[7]=E):E=e[7],V.useEffect(C,E);const s=Z[K];let a;e[8]!==W?(a=n("relative flex gap-0 bg-muted rounded-lg",W),e[8]=W,e[9]=a):a=e[9];let c;e[10]!==l||e[11]!==t[0].value?(c=()=>l(t[0].value),e[10]=l,e[11]=t[0].value,e[12]=c):c=e[12];const $=w?"flex-1 h-12 px-4":s.button,I=!w&&t[0].label?"px-3":"";let r;e[13]!==I||e[14]!==$?(r=n("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",$,I),e[13]=I,e[14]=$,e[15]=r):r=e[15];const P=o===t[0].value?"text-foreground":"text-muted-foreground";let u;e[16]!==s.icon||e[17]!==P?(u=n("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",s.icon,P),e[16]=s.icon,e[17]=P,e[18]=u):u=e[18];let f;e[19]!==t[0].icon||e[20]!==u?(f=i.jsx("span",{className:u,children:t[0].icon}),e[19]=t[0].icon,e[20]=u,e[21]=f):f=e[21];let d;e[22]!==t[0].label||e[23]!==t[0].value||e[24]!==o?(d=t[0].label&&i.jsx("span",{className:n("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[0].value?"text-foreground":"text-muted-foreground"),children:t[0].label}),e[22]=t[0].label,e[23]=t[0].value,e[24]=o,e[25]=d):d=e[25];let m;e[26]!==r||e[27]!==f||e[28]!==d||e[29]!==c?(m=i.jsxs("button",{ref:G,type:"button",onClick:c,className:r,children:[f,d]}),e[26]=r,e[27]=f,e[28]=d,e[29]=c,e[30]=m):m=e[30];let x;e[31]!==l||e[32]!==t[1].value?(x=()=>l(t[1].value),e[31]=l,e[32]=t[1].value,e[33]=x):x=e[33];const L=w?"flex-1 h-12 px-4":s.button,M=!w&&t[1].label?"px-3":"";let p;e[34]!==L||e[35]!==M?(p=n("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",L,M),e[34]=L,e[35]=M,e[36]=p):p=e[36];const T=o===t[1].value?"text-foreground":"text-muted-foreground";let b;e[37]!==s.icon||e[38]!==T?(b=n("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",s.icon,T),e[37]=s.icon,e[38]=T,e[39]=b):b=e[39];let v;e[40]!==t[1].icon||e[41]!==b?(v=i.jsx("span",{className:b,children:t[1].icon}),e[40]=t[1].icon,e[41]=b,e[42]=v):v=e[42];let g;e[43]!==t[1].label||e[44]!==t[1].value||e[45]!==o?(g=t[1].label&&i.jsx("span",{className:n("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[1].value?"text-foreground":"text-muted-foreground"),children:t[1].label}),e[43]=t[1].label,e[44]=t[1].value,e[45]=o,e[46]=g):g=e[46];let h;e[47]!==x||e[48]!==p||e[49]!==v||e[50]!==g?(h=i.jsxs("button",{ref:H,type:"button",onClick:x,className:p,children:[v,g]}),e[47]=x,e[48]=p,e[49]=v,e[50]=g,e[51]=h):h=e[51];const q=w?"h-12":s.button;let y;e[52]!==q?(y=n("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",q),e[52]=q,e[53]=y):y=e[53];const A=`${N.left}px`,B=`${N.width}px`;let j;e[54]!==N.opacity||e[55]!==A||e[56]!==B?(j={left:A,width:B,opacity:N.opacity},e[54]=N.opacity,e[55]=A,e[56]=B,e[57]=j):j=e[57];let z;e[58]!==y||e[59]!==j?(z=i.jsx("div",{className:y,style:j}),e[58]=y,e[59]=j,e[60]=z):z=e[60];let k;return e[61]!==m||e[62]!==h||e[63]!==z||e[64]!==a?(k=i.jsxs("div",{className:a,children:[m,h,z]}),e[61]=m,e[62]=h,e[63]=z,e[64]=a,e[65]=k):k=e[65],k}export{oe as V};
|
package/dist/client/index.html
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<title>MCP Mesh</title>
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
6
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
6
|
+
<script type="module" crossorigin src="/assets/index-BAX9m6md.js"></script>
|
|
7
|
+
<link rel="stylesheet" crossorigin href="/assets/index-rESQzSL0.css">
|
|
8
8
|
</head>
|
|
9
9
|
<body>
|
|
10
10
|
<div id="root"></div>
|