@teammy/server 0.2.13 → 0.2.15

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.
Files changed (47) hide show
  1. package/README.md +4 -4
  2. package/dist/main.js +2662 -1505
  3. package/dist/web/assets/Assistant-CEmXtN1H.js +1 -0
  4. package/dist/web/assets/Computers-B-8vIzy-.css +1 -0
  5. package/dist/web/assets/Computers-ChyEKWzc.js +12 -0
  6. package/dist/web/assets/Conversation-CH2XJkku.css +1 -0
  7. package/dist/web/assets/{Conversation-Co9JjVu_.js → Conversation-CSGUsjrV.js} +1 -1
  8. package/dist/web/assets/Dashboard-BEZRdw_R.js +1 -0
  9. package/dist/web/assets/Dashboard-CppFmr8a.css +1 -0
  10. package/dist/web/assets/Dropdown-D625ln2m.js +55 -0
  11. package/dist/web/assets/Files-DywD1EaD.js +1 -0
  12. package/dist/web/assets/{Help-B2IpMg05.js → Help-DgEMyoMA.js} +53 -39
  13. package/dist/web/assets/{Help-BJ0x9N-8.css → Help-jzk8aJGg.css} +1 -1
  14. package/dist/web/assets/Markdown-Cw4CQNYb.js +29 -0
  15. package/dist/web/assets/MessageComposer-B8Oa9gpY.js +1 -0
  16. package/dist/web/assets/ResourceLibrary-C28WAP-Z.js +6 -0
  17. package/dist/web/assets/ResourceLibrary-uv9-Q5f-.css +1 -0
  18. package/dist/web/assets/TerminalPane-DDJO3cDO.js +22 -0
  19. package/dist/web/assets/WorkspaceTree-BHdUglYr.js +1 -0
  20. package/dist/web/assets/file-links-CVbLZSaw.js +1 -0
  21. package/dist/web/assets/index-DjMoKD7A.js +10 -0
  22. package/dist/web/assets/index-u6KD7Soy.css +1 -0
  23. package/dist/web/assets/project-links-DI2fBvjw.js +1 -0
  24. package/dist/web/assets/{workflow-DM6NUqoB.svg → workflow-h92qCEHO.svg} +1 -1
  25. package/dist/web/downloads/teammy-inbox-skill.zip +0 -0
  26. package/dist/web/downloads/teammy-skill.zip +0 -0
  27. package/dist/web/index.html +3 -3
  28. package/package.json +1 -1
  29. package/dist/web/assets/Assistant-ysfCwRha.js +0 -1
  30. package/dist/web/assets/Computers-B6RBtpNC.css +0 -1
  31. package/dist/web/assets/Computers-ChbQnbXv.js +0 -7
  32. package/dist/web/assets/Conversation-DKhKiqFy.css +0 -1
  33. package/dist/web/assets/Dashboard-BOsfWF4x.js +0 -1
  34. package/dist/web/assets/Dashboard-J2mog3Rs.css +0 -1
  35. package/dist/web/assets/Dropdown-nwEutrew.js +0 -55
  36. package/dist/web/assets/Files-BQBS447m.js +0 -1
  37. package/dist/web/assets/HtmlPreview-CuQjPwY9.js +0 -1
  38. package/dist/web/assets/Markdown-CE06iKkt.js +0 -29
  39. package/dist/web/assets/MessageComposer--n424osS.js +0 -1
  40. package/dist/web/assets/ResourceLibrary-CxfQ7WWY.css +0 -1
  41. package/dist/web/assets/ResourceLibrary-DgcocHeS.js +0 -6
  42. package/dist/web/assets/TerminalPane-DCgjBDv7.js +0 -22
  43. package/dist/web/assets/WorkspaceTree-BV7twy0b.js +0 -1
  44. package/dist/web/assets/file-links-BiCe1fX2.js +0 -1
  45. package/dist/web/assets/index-DDxaaPSE.js +0 -10
  46. package/dist/web/assets/index-Du6eplBD.css +0 -1
  47. package/dist/web/assets/project-links-Dy6-B89_.js +0 -1
@@ -0,0 +1,55 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));function u(){return document.querySelector(`meta[name="teammy-base-path"]`)?.content??``}function d(e){let t=u();return!e.startsWith(`/`)||e.startsWith(`//`)||!t||e===t||e.startsWith(t+`/`)||e.startsWith(t+`?`)?e:t+e}function f(){let e=u();return e&&(location.pathname===e||location.pathname.startsWith(e+`/`))?location.pathname.slice(e.length)||`/`:location.pathname}function p(e,t,n=``){return d(`/projects/${encodeURIComponent(e)}/help?${new URLSearchParams({doc:t})}${n}`)}function m(){return location.origin+u()}var h=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,ee={};function v(e,t,n){this.props=e,this.context=t,this.refs=ee,this.updater=n||g}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function te(){}te.prototype=v.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=ee,this.updater=n||g}var ne=y.prototype=new te;ne.constructor=y,_(ne,v.prototype),ne.isPureReactComponent=!0;var re=Array.isArray;function ie(){}var b={H:null,A:null,T:null,S:null},ae=Object.prototype.hasOwnProperty;function x(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function oe(e,t){return x(e.type,t,e.props)}function S(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function se(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ce=/\/+/g;function C(e,t){return typeof e==`object`&&e&&e.key!=null?se(``+e.key):t.toString(36)}function le(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(ie,ie):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function w(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,w(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+C(e,0):a,re(o)?(i=``,c!=null&&(i=c.replace(ce,`$&/`)+`/`),w(o,r,i,``,function(e){return e})):o!=null&&(S(o)&&(o=oe(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ce,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(re(e))for(var u=0;u<e.length;u++)a=e[u],s=l+C(a,u),c+=w(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+C(a,u++),c+=w(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return w(le(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ue(e,t,n){if(e==null)return e;var r=[],i=0;return w(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function de(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var fe=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function pe(e){var t=b.T,n={};n.types=t===null?null:t.types,b.T=n;try{var r=e(),i=b.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(ie,fe)}catch(e){fe(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),b.T=t}}function me(e){var t=b.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else pe(me.bind(null,e))}var he={map:ue,forEach:function(e,t,n){ue(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ue(e,function(){t++}),t},toArray:function(e){return ue(e,function(e){return e})||[]},only:function(e){if(!S(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=he,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=b,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return b.H.useMemoCache(e)}},e.addTransitionType=me,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!ae.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return x(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)ae.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return x(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=S,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:de}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=pe,e.unstable_useCacheRefresh=function(){return b.H.useCacheRefresh()},e.use=function(e){return b.H.use(e)},e.useActionState=function(e,t,n){return b.H.useActionState(e,t,n)},e.useCallback=function(e,t){return b.H.useCallback(e,t)},e.useContext=function(e){return b.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return b.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return b.H.useEffect(e,t)},e.useEffectEvent=function(e){return b.H.useEffectEvent(e)},e.useId=function(){return b.H.useId()},e.useImperativeHandle=function(e,t,n){return b.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return b.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return b.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return b.H.useMemo(e,t)},e.useOptimistic=function(e,t){return b.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return b.H.useReducer(e,t,n)},e.useRef=function(e){return b.H.useRef(e)},e.useState=function(e){return b.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return b.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return b.H.useTransition()},e.version=`19.3.1`})),g=o(((e,t)=>{t.exports=h()}));function _(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function ee(e,t=`|`){return e.map(e=>ye(e)).join(t)}function v(e,t){return typeof t==`bigint`?t.toString():t}var te=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function y(e){return new te(e)}function ne(e){return e==null}function re(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ie(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var b=Symbol(`evaluating`);function ae(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==b)return r===void 0&&(r=b,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function x(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function oe(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function S(e){return oe(e._zod.def)??e._zod.def.shape}function se(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return x(this,t,e),e},enumerable:!0,configurable:!0})}function ce(e,t,n){t in e?x(e,t,n):e[t]=n}function C(e,t,n,r){let i=S(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?se(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):ce(e,a,r?r(n.value,a):n.value))}}function le(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?se(e,n,()=>t[n]):ce(e,n,r.value))}}function w(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ue(e){return JSON.stringify(e)}function de(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var fe=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function pe(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var me=y(()=>{if(A.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function he(e){if(pe(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return pe(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function ge(e){return he(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var _e=new Set([`string`,`number`,`symbol`]);function ve(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function T(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function E(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function ye(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function be(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var xe={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Se={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Ce(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return C(i,e,we(e,t)),T(e,w(n,{shape:i,checks:[]}))}function we(e,t){let n=S(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function Te(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(we(e,t)),a={};return C(a,e,Reflect.ownKeys(S(e)).filter(e=>!i.has(e))),T(e,w(n,{shape:a,checks:[]}))}function Ee(e,t){if(!he(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=S(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return T(e,w(e._zod.def,{shape:De(e,t)}))}function De(e,t){let n={};return C(n,e,Reflect.ownKeys(S(e))),le(n,t),n}function Oe(e,t){if(!he(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return T(e,w(e._zod.def,{shape:De(e,t)}))}function ke(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return C(n,e,Reflect.ownKeys(S(e))),C(n,t,Reflect.ownKeys(S(t))),T(e,w(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Ae(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(we(t,n)):void 0,o={};return C(o,t,Reflect.ownKeys(S(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),T(t,w(t._zod.def,{shape:o,checks:[]}))}function je(e,t,n){let r=n?new Set(we(t,n)):void 0,i={};return C(i,t,Reflect.ownKeys(S(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),T(t,w(t._zod.def,{shape:i}))}function D(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Me(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Ne(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Pe(e){return typeof e==`string`?e:e?.message}function Fe(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function Ie(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Le(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Pe(e.inst?._zod.def?.error?.(e))??Pe(a?.(e))??Pe(t?.error?.(e))??Pe(n.customError?.(e))??Pe(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var Re=/[\uD800-\uDBFF]/;function ze(e){let t=e.length;if(!Re.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Be(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Ve(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function He(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Ue(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):qe(e,n,r.value)}}function We(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Ge(e,t,n){return We(e,t,n,!1)}function Ke(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return We(this,n,r(this))},set(e){We(this,n,e)}})}return t}function qe(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:We(this,t,n.bind(this))},set(e){We(this,t,e)}})}function Je(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Ye,Xe=!1,Ze={configurable:!0,get(){Xe=!0}};function O(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&Ye!==e._zod?Ye=void 0:(Ye=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Ze);let e=Xe;Xe=!1;try{let r=n(this);return Xe?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Xe||=e,r}catch(n){throw delete this[t],Xe||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function Qe(e,t,n,r){let i=Je(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var $e=`~constantCatch`;function et(e){let t=()=>e;return t[$e]=!0,t}var tt,nt={value:void 0,enumerable:!1},rt=`captureStackTrace`in Error?Error:null;function it(e){let t=rt;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return rt=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function k(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){nt.value=new a(r);try{Object.defineProperty(n,"_zod",nt)}finally{nt.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Ue(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?it(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var at=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},ot=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(tt=globalThis).__zod_globalConfig??(tt.__zod_globalConfig={});var A=globalThis.__zod_globalConfig;function j(e){return e&&Object.assign(A,e),A}function st(){let e=this._zod;return e.message??=JSON.stringify(e.def,v,2),e.message}function ct(e){this._zod.message=e}var lt={get:st,set:ct,enumerable:!0,configurable:!0},ut={value:void 0,enumerable:!1},dt=new WeakSet([Object.prototype,Error.prototype]),ft=k(`$ZodError`,(e,t)=>{e.name=`$ZodError`,ut.value=t,Object.defineProperty(e,"issues",ut),ut.value=void 0,Object.defineProperty(e,"message",lt);let n=Object.getPrototypeOf(e);dt.has(n)||(dt.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))});function pt(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function mt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?pt(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function ht(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function gt(e,t){return{callee:t?.callee??e,Err:t?.Err}}var _t=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new at;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Le(e,o,j())));throw fe(n,a?.callee??t),n}return s.value};return t},vt=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Le(e,o,j())));throw fe(n,a?.callee??t),n}return s.value};return t},yt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new at;return a.issues.length?bt(e,a.issues,i):{success:!0,data:a.value}};function bt(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>Le(e,n,j()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var xt=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?bt(e,a.issues,i):{success:!0,data:a.value}},St=Symbol.for(`zod.compile.invalid`),Ct=Symbol.for(`zod.compile.fallback`),wt=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==St)return!0;if(r.definite===!0&&n===void 0)return!1}return Tt(e,t,n)});function Tt(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Ct]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new at;return a.issues.length===0}var Et=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},Dt=e=>{let t=_t(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,gt(n,a))};return n},Ot=e=>{let t=_t(e),n=(e,r,i,a)=>t(e,r,i,gt(n,a));return n},kt=e=>{let t=vt(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,gt(n,a))};return n},At=e=>{let t=vt(e),n=async(e,r,i,a)=>await t(e,r,i,gt(n,a));return n},jt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return yt(e)(t,n,i)},Mt=e=>(t,n,r)=>yt(e)(t,n,r),Nt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return xt(e)(t,n,i)},Pt=e=>async(t,n,r)=>xt(e)(t,n,r),Ft=/^[cC][0-9a-z]{6,}$/,It=/^[0-9a-z]+$/,Lt=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Rt=/^[0-9a-vA-V]{20}$/,zt=/^[A-Za-z0-9]{27}$/,Bt=/^[a-zA-Z0-9_-]{21}$/;function Vt(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Ht=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ut=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Wt=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Gt=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Kt=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function qt(){return new RegExp(Kt,`u`)}var Jt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Yt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Xt=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Zt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Qt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,$t=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,en=/^https?$/,tn=/^\+[1-9]\d{6,14}$/,nn=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function rn(e){return RegExp(`^${e}$`)}var an=rn(nn);function on(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function sn(e){return RegExp(`^${on(e)}$`)}function cn(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${on({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${on({precision:e.precision})}`:n;return RegExp(`^${nn}T(?:${r})$`)}var ln=/^[\s\S]{0,}$/,un=/^-?\d+$/,dn=/^-?\d+(?:\.\d+)?$/,fn=/^(?:true|false)$/i,pn=/^[^A-Z]*$/,mn=/^[^a-z]*$/,M=k(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),hn=e=>{let t=e.value;return!ne(t)&&t.length!==void 0},gn={number:`number`,bigint:`bigint`,object:`date`},_n=k(`$ZodCheckLessThan`,(e,t)=>{M.init(e,t);let n=gn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:gn[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vn=k(`$ZodCheckGreaterThan`,(e,t)=>{M.init(e,t);let n=gn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:gn[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),yn=k(`$ZodCheckMultipleOf`,(e,t)=>{M.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):ie(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),bn=k(`$ZodCheckNumberFormat`,(e,t)=>{M.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=xe[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),xn=k(`$ZodCheckMaxLength`,(e,t)=>{var n;M.init(e,t),(n=e._zod.def).when??(n.when=hn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?ze(r):i)<=t.maximum)return;let a=Be(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Sn=k(`$ZodCheckMinLength`,(e,t)=>{var n;M.init(e,t),(n=e._zod.def).when??(n.when=hn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?ze(r):i)>=t.minimum)return;let a=Be(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Cn=k(`$ZodCheckLengthEquals`,(e,t)=>{var n;M.init(e,t),(n=e._zod.def).when??(n.when=hn),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?ze(r):i;if(a===t.length)return;let o=Be(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),wn=k(`$ZodCheckStringFormat`,(e,t)=>{var n,r;M.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Tn=k(`$ZodCheckRegex`,(e,t)=>{wn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),En=k(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=pn,wn.init(e,t)}),Dn=k(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=mn,wn.init(e,t)}),On=k(`$ZodCheckIncludes`,(e,t)=>{M.init(e,t);let n=ve(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),kn=k(`$ZodCheckStartsWith`,(e,t)=>{M.init(e,t);let n=RegExp(`^${ve(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),An=k(`$ZodCheckEndsWith`,(e,t)=>{M.init(e,t);let n=RegExp(`.*${ve(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),jn=k(`$ZodCheckOverwrite`,(e,t)=>{M.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Mn=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
2
+ `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
3
+ `)}\n};`)(...Object.values(this.closed))}},Nn={major:4,minor:6,patch:7},N=k(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Nn;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=D(t),a;for(let o of n){if(o._zod.def.when){if(Me(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new at;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Ie(t.issues,n,e),i||=D(t,n))});else{if(t.issues.length===n)continue;Ie(t.issues,n,e),i||=D(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(D(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new at;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new at;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Ge(this,`~standard`,In(this))},set"~standard"(e){We(this,`~standard`,e)}}),Pn=(e,t)=>e.issues.length?{issues:e.issues.map(e=>Le(e,t,j()))}:{value:e.value};async function Fn(e,t){let n={async:!0};return Pn(await e._zod.run({value:t,issues:[]},n),n)}function In(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Pn(r,n)}catch{}return Fn(e,t)},vendor:`zod`,version:1}}var Ln=k(`$ZodString`,(e,t)=>{N.init(e,t),e._zod.pattern=t.pattern??ln,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),P=k(`$ZodStringFormat`,(e,t)=>{wn.init(e,t),Ln.init(e,t)}),Rn=k(`$ZodGUID`,(e,t)=>{t.pattern??=Ut,P.init(e,t)}),zn=k(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Wt(e)}else t.pattern??=Wt();P.init(e,t)}),Bn=k(`$ZodEmail`,(e,t)=>{t.pattern??=Gt,P.init(e,t)});function Vn(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Hn(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?Vn(e)||2:Un(e,t)}function Un(e,t){if(!t.normalize&&t.protocol?.source===en.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var Wn=/[\t\n\r]/g;function Gn(e){return e.replace(Wn,``)}function Kn(e,t){return t.lastIndex=0,t.test(e.hostname)}function qn(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Jn=k(`$ZodURL`,(e,t)=>{P.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Hn(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=Gn(r);return}t.hostname&&!Kn(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!qn(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Gn(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Yn=k(`$ZodEmoji`,(e,t)=>{t.pattern??=qt(),P.init(e,t)}),Xn=k(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Bt:Vt(t.length),P.init(e,t)}),Zn=k(`$ZodCUID`,(e,t)=>{t.pattern??=Ft,P.init(e,t)}),Qn=k(`$ZodCUID2`,(e,t)=>{t.pattern??=It,P.init(e,t)}),$n=k(`$ZodULID`,(e,t)=>{t.pattern??=Lt,P.init(e,t)}),er=k(`$ZodXID`,(e,t)=>{t.pattern??=Rt,P.init(e,t)}),tr=k(`$ZodKSUID`,(e,t)=>{t.pattern??=zt,P.init(e,t)}),nr=k(`$ZodISODateTime`,(e,t)=>{t.pattern??=cn(t),P.init(e,t)}),rr=k(`$ZodISODate`,(e,t)=>{t.pattern??=an,P.init(e,t)}),ir=k(`$ZodISOTime`,(e,t)=>{t.pattern??=sn(t),P.init(e,t)}),ar=k(`$ZodISODuration`,(e,t)=>{t.pattern??=Ht,P.init(e,t)}),or=k(`$ZodIPv4`,(e,t)=>{t.pattern??=Jt,P.init(e,t)}),sr=/^[0-9a-fA-F:.]+$/;function cr(e){return sr.test(e)?Vn(`http://[${e}]`):!1}var lr=k(`$ZodIPv6`,(e,t)=>{t.pattern??=Yt,P.init(e,t),e._zod.check=n=>{cr(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),ur=k(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Xt,P.init(e,t)});function dr(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:cr(n)}var fr=k(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Zt,P.init(e,t),e._zod.check=n=>{dr(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function pr(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var mr=/^[0-9a-zA-Z+/]*={0,2}$/,hr=k(`$ZodBase64`,(e,t)=>{t.pattern??=mr,P.init(e,t),e._zod.check=n=>{pr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),gr=/^[A-Za-z0-9_-]*$/;function _r(e){if(!gr.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return pr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var vr=k(`$ZodBase64URL`,(e,t)=>{t.pattern??=gr,P.init(e,t),e._zod.check=n=>{_r(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),yr=k(`$ZodE164`,(e,t)=>{t.pattern??=tn,P.init(e,t)});function br(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var xr=k(`$ZodJWT`,(e,t)=>{P.init(e,t),e._zod.check=n=>{br(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Sr=k(`$ZodNumber`,(e,t)=>{N.init(e,t),e._zod.pattern=dn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Cr=k(`$ZodNumberFormat`,(e,t)=>{bn.init(e,t),Sr.init(e,t)}),wr=k(`$ZodBoolean`,(e,t)=>{N.init(e,t),e._zod.pattern=fn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Tr=k(`$ZodUnknown`,(e,t)=>{N.init(e,t),e._zod.parse=e=>e}),Er=k(`$ZodNever`,(e,t)=>{N.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Dr(e,t){let n=Fe(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of Fe(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,Ie(n.issues,t,e),n}}return i(n,a)}}var Or=e=>Array.isArray(e)?e.length:-1;function kr(e,t,n){e.issues.length&&t.issues.push(...Ne(n,e.issues)),t.value[n]=e.value}var Ar=k(`$ZodArray`,(e,t)=>{N.init(e,t);let n=A.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>kr(t,r,e)));else if(kr(c,r,e),s&&c.issues.length!==0&&D(c))break}return o.length?Promise.all(o).then(()=>r):r},Dr(e,Or)});function jr(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...Ne(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var Mr=[];function Nr(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Mr,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=be(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Pr(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(D(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>jr(e,n,i,t,d,f))):jr(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var Fr=k(`$ZodObject`,(e,t)=>{N.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=y(()=>Nr(t));O(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||x(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=pe,o=t.catchall,s,c=A.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(D(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>jr(n,t,e,r,a,o))):jr(s,t,e,r,a,o)}return o?Pr(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),Ir=k(`$ZodObjectJIT`,(e,t)=>{Fr.init(e,t);let n=e._zod.parse,r=y(()=>Nr(t)),i=A.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Mn([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
4
+ let ${e}_ab = false;
5
+ for (let i = 0; i < ${e}.issues.length; i++) {
6
+ const iss = ${e}.issues[i];
7
+ iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
8
+ payload.issues.push(iss);
9
+ if (iss.continue !== true) ${e}_ab = true;
10
+ }
11
+ if (${e}_ab && ctx && ctx.abortEarly) {
12
+ payload.value = newResult;
13
+ return payload;
14
+ }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:ue(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
15
+ const ${n}_present = ${i};
16
+ if (!${n}.issues.length || ${n}_present) {
17
+ if (${n}.issues.length) {${c(n,r)}
18
+ }
19
+
20
+ if (${e}) {
21
+ newResult[${r}] = ${n}.value;
22
+ }
23
+ }
24
+
25
+ `)}else f?(o.write(`
26
+ if (${n}.issues.length) {${c(n,r)}
27
+ }
28
+ `),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
29
+ if (${n}.value !== undefined || ${i}) {
30
+ newResult[${r}] = ${n}.value;
31
+ }
32
+ `)):o.write(`
33
+ const ${n}_present = ${i};
34
+ if (${n}.issues.length) {${c(n,r)}
35
+ }
36
+ if (!${n}_present && !${n}.issues.length) {
37
+ payload.issues.push({
38
+ code: "invalid_type",
39
+ expected: "nonoptional",
40
+ input: undefined,
41
+ path: [${r}]
42
+ });
43
+ if (ctx && ctx.abortEarly) {
44
+ payload.value = newResult;
45
+ return payload;
46
+ }
47
+ }
48
+
49
+ if (${n}_present) {
50
+ newResult[${r}] = ${n}.value;
51
+ }
52
+
53
+ `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=pe,c=!A.jitless,l=c&&me.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?Pr([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function Lr(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!D(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Le(e,r,j())))}),t)}var Rr=k(`$ZodUnion`,(e,t)=>{N.init(e,t),O(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),O(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),O(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),O(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>re(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Lr(t,r,e,i)):Lr(o,r,e,i)}});function zr(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var Br=k(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Rr.init(e,t);let n=e._zod.parse;O(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||x(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=oe(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=y(()=>zr(t));e._zod.parse=(i,a)=>{let o=i.value;if(!pe(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),Vr=k(`$ZodIntersection`,(e,t)=>{N.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Ur(e,t,n)):Ur(e,i,a)}});function Hr(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(he(e)&&he(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Hr(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Hr(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Ur(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Hr(t.value,n.value);if(!c.valid){if(D(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Wr=k(`$ZodRecord`,(e,t)=>{N.init(e,t);let n=A.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!he(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Le(e,i,j())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...Ne(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...Ne(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&dn.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>Le(e,i,j())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...Ne(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...Ne(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),Gr=k(`$ZodEnum`,(e,t)=>{N.init(e,t);let n=_(t.entries),r=new Set(n);e._zod.values=r,O(e,`pattern`,e=>{let t=_(e.def.entries).filter(e=>_e.has(typeof e));return RegExp(t.length?`^(${t.map(e=>ve(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Kr=k(`$ZodLiteral`,(e,t)=>{N.init(e,t);let n=new Set(t.values);e._zod.values=n,O(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?ve(e):e?ve(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),qr=k(`$ZodTransform`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,A.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new ot(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new at;return n.value=i,n}});function Jr(e,t){return e.value=t.issues.length?void 0:t.value,e}var Yr=k(`$ZodOptional`,(e,t)=>{N.init(e,t),O(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,O(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),O(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${re(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Jr(e,t)):Jr(e,r)}return t.innerType._zod.run(e,n)}}),Xr=k(`$ZodExactOptional`,(e,t)=>{Yr.init(e,t),O(e,`values`,e=>e.def.innerType._zod.values),O(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Zr=k(`$ZodNullable`,(e,t)=>{N.init(e,t),O(e,`optin`,e=>e.def.innerType._zod.optin),O(e,`optout`,e=>e.def.innerType._zod.optout),O(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${re(t.source)}|null)$`):void 0}),O(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Qr=k(`$ZodDefault`,(e,t)=>{N.init(e,t),e._zod.optin=`defaulted`,O(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>$r(e,t)):$r(r,t)}});function $r(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var ei=k(`$ZodPrefault`,(e,t)=>{N.init(e,t),e._zod.optin=`defaulted`,O(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),ti=k(`$ZodNonOptional`,(e,t)=>{N.init(e,t),O(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>ni(t,e)):ni(i,e)}});function ni(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function ri(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Le(e,r,j()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var ii=k(`$ZodCatch`,(e,t)=>{N.init(e,t),O(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),O(e,`optout`,e=>e.def.innerType._zod.optout),O(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>ri(e,r,t,n)):ri(e,r,t,n)}}),ai=k(`$ZodPipe`,(e,t)=>{N.init(e,t),O(e,`values`,e=>e.def.in._zod.values),O(e,`optin`,e=>e.def.in._zod.optin),O(e,`optout`,e=>e.def.out._zod.optout),O(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>oi(e,t.in,n)):oi(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>oi(e,t.out,n)):oi(r,t.out,n)}});function oi(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var si=k(`$ZodReadonly`,(e,t)=>{N.init(e,t),O(e,`propValues`,e=>e.def.innerType._zod.propValues),O(e,`values`,e=>e.def.innerType._zod.values),O(e,`optin`,e=>e.def.innerType?._zod?.optin),O(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(ci):ci(r)}});function ci(e){return e.memo||(e.value=Object.freeze(e.value)),e}var li=k(`$ZodLazy`,(e,t)=>{N.init(e,t),ae(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),O(e,`pattern`,e=>e.innerType?._zod?.pattern),O(e,`propValues`,e=>e.innerType?._zod?.propValues),O(e,`optin`,e=>e.innerType?._zod?.optin??void 0),O(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),ui=k(`$ZodCustom`,(e,t)=>{M.init(e,t),N.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>di(t,n,r,e));di(i,n,r,e)}});function di(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(He(e))}}var fi=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},pi=`~memo`,mi=[];function hi(e){return typeof e==`object`&&!!e}function gi(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var _i=new WeakMap,vi=0,yi=1,bi=2;function xi(e,t,n){let r=_i.get(e);if(r!==void 0)return r?bi:vi;if(t.has(e))return bi;t.add(e);let i=vi,a=e=>{if(i!==bi&&e?._zod){let r=xi(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=vi;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?yi:o.value?._zod?xi(o.value,t,n):vi;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=oe(c);s(e?o(e,!0):yi),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?xi(r,t,!1):yi);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),Si(e,i)}function Si(e,t){return t!==yi&&_i.set(e,t===bi),t}function Ci(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var wi,Ti=[],Ei={alloc(e,t,n){let r=wi;if(!r)return n;wi=void 0;let i={value:n,issues:null};return r.set(t.value,i),Ti.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&Oi(n,e.value))throw new fi;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=xi(e,new Set,!1);if(i===vi)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===bi||r?n=!0:r=!0}let l=s.value;if(!hi(l))return t(s,c);let u=c[pi];u||(u={buckets:new WeakMap,backEdges:void 0},c[pi]=u);let d;i===c?d=a:(d=Ci(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...gi(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;wi=d;let p=Ti.length,m=t(s,c);wi=void 0;let h=Ti.length>p?Ti.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?gi(e.issues):mi),e)):(h&&(h.issues=m.issues.length?gi(m.issues):mi),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Di(){return Ei}function Oi(e,t){let n=e[pi]?.backEdges;return n!==void 0&&hi(t)&&n.has(t)}var ki=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Ve(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${ye(e.values[0])}`:`Invalid option: expected one of ${ee(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${ee(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function Ai(){return{localeError:ki()}}var ji,Mi=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Ni(){return new Mi}(ji=globalThis).__zod_globalRegistry??(ji.__zod_globalRegistry=Ni());var Pi=globalThis.__zod_globalRegistry;function Fi(e){return e.checks&&=[...e.checks],e}function Ii(e,t){return new e(Fi({type:`string`,...E(t)}))}function Li(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...E(t)})}function Ri(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...E(t)})}function zi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...E(t)})}function Bi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...E(t)})}function Vi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...E(t)})}function Hi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...E(t)})}function Ui(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...E(t)})}function Wi(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...E(t)})}function Gi(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...E(t)})}function Ki(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...E(t)})}function qi(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...E(t)})}function Ji(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...E(t)})}function Yi(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...E(t)})}function Xi(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...E(t)})}function Zi(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...E(t)})}function Qi(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...E(t)})}function $i(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...E(t)})}function ea(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...E(t)})}function ta(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...E(t)})}function na(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...E(t)})}function ra(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...E(t)})}function ia(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...E(t)})}function aa(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...E(t)})}function oa(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...E(t)})}function sa(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...E(t)})}function ca(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...E(t)})}function la(e,t){return new e(Fi({type:`number`,checks:[],...E(t)}))}function ua(e,t){return new e(Fi({type:`number`,coerce:!0,checks:[],...E(t)}))}function da(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...E(t)})}function fa(e,t){return new e({type:`boolean`,...E(t)})}function pa(e){return new e({type:`unknown`})}function ma(e,t){return new e({type:`never`,...E(t)})}function ha(e,t){return new _n({check:`less_than`,...E(t),value:e,inclusive:!1})}function ga(e,t){return new _n({check:`less_than`,...E(t),value:e,inclusive:!0})}function _a(e,t){return new vn({check:`greater_than`,...E(t),value:e,inclusive:!1})}function va(e,t){return new vn({check:`greater_than`,...E(t),value:e,inclusive:!0})}function ya(e,t){return new yn({check:`multiple_of`,...E(t),value:e})}function ba(e,t){return new xn({check:`max_length`,...E(t),maximum:e})}function xa(e,t){return new Sn({check:`min_length`,...E(t),minimum:e})}function Sa(e,t){return new Cn({check:`length_equals`,...E(t),length:e})}function Ca(e,t){return new Tn({check:`string_format`,format:`regex`,...E(t),pattern:e})}function wa(e){return new En({check:`string_format`,format:`lowercase`,...E(e)})}function Ta(e){return new Dn({check:`string_format`,format:`uppercase`,...E(e)})}function Ea(e,t){return new On({check:`string_format`,format:`includes`,...E(t),includes:e})}function Da(e,t){return new kn({check:`string_format`,format:`starts_with`,...E(t),prefix:e})}function Oa(e,t){return new An({check:`string_format`,format:`ends_with`,...E(t),suffix:e})}function ka(e){return new jn({check:`overwrite`,tx:e})}function Aa(e){return ka(t=>t.normalize(e))}function ja(){return ka(e=>e.trim())}function Ma(){return ka(e=>e.toLowerCase())}function Na(){return ka(e=>e.toUpperCase())}function Pa(){return ka(e=>de(e))}function Fa(e,t,n){return new e({type:`array`,element:t,...E(n)})}function Ia(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...E(n)})}function La(e,t){let n=Ra(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(He(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(He(r))}},e(t.value,t)),t);return n}function Ra(e,t){let n=new M({check:`custom`,...E(t)});return n._zod.check=e,n}function za(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&x(e,t,n[t]);return e}function Ba(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Pi,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function F(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function I(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,I(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&za(o.schema,c),t.io===`input`&&L(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Va(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function Ha(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${Va(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+Va(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
54
+
55
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function Ua(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;Ua(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var Wa=new Set([`type`,`properties`,`required`,`additionalProperties`]),Ga=[`oneOf`,`anyOf`];function Ka(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function qa(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!Wa.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??Ka(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}x(n,r,e.length===1?e[0]:qa(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=Ka(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Ja(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of Wa)if(t in e)return;let n=t.filter(e=>Ga.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=qa(t);else{let e=n[0],i=Ga.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>qa([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,za(e,r))}function Ya(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):za(i,s),za(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())Ua(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Ja(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}za(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,x(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Za(t,`input`,e.processors),output:Za(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function L(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return L(r.element,n);if(r.type===`set`)return L(r.valueType,n);if(r.type===`lazy`)return L(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return L(r.innerType,n);if(r.type===`intersection`)return L(r.left,n)||L(r.right,n);if(r.type===`record`||r.type===`map`)return L(r.keyType,n)||L(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:L(r.in,n)||L(r.out,n);if(r.type===`object`){for(let e in r.shape)if(L(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(L(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(L(e,n))return!0;return!!(r.rest&&L(r.rest,n))}return!1}var Xa=(e,t={})=>n=>{let r=Ba({...n,processors:t});return I(e,r),Ha(r,e),Ya(r,e)},Za=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Ba({...i??{},target:a,io:t,processors:n});return I(e,o),Ha(o,e),Ya(o,e)},Qa=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},$a=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},eo=(e,t)=>{Qa(e,`minimum`,t),$a(e,`maximum`,t)},to=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},no=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},ro=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},io=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},ao=(e,t)=>Qa(e,`minimum`,t.minimum),oo=(e,t)=>$a(e,`maximum`,t.maximum),so=e=>(t,n)=>{io(t,n.format);let[r,i]=e[n.format];Qa(t,`minimum`,r),$a(t,`maximum`,i)},co={greater_than:(e,t)=>Qa(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>$a(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>to(e,t.value),number_format:so(xe),bigint_format:so(Se),min_length:ao,max_length:oo,length_equals:(e,t)=>eo(e,t.length),min_size:ao,max_size:oo,size_equals:(e,t)=>eo(e,t.size),string_format:(e,t)=>{io(e,t.format),t.pattern&&no(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>ro(e,t.mime)};function R(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)co[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&Qa(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&Qa(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&$a(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&$a(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&to(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&ro(t,i.mime);for(let e of i.patterns??[])no(t,e);return t}var lo={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},uo=new Map([[mr,Qt],[gr,$t]]),fo=e=>uo.get(e)??e,po=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=R(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=lo[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(fo);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},mo=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=R(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):F(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},ho=(e,t,n,r)=>{n.type=`boolean`},go=(e,t,n,r)=>{n.not={}},_o=(e,t,n,r)=>{let i=e._zod.def,a=_(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},vo=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(F(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(F(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},yo=(e,t,n,r)=>{F(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},bo=(e,t,n,r)=>{F(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},xo=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=R(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=I(a.element,t,{...r,path:[...r.path,`items`]})};function So(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?So(t.out):t.type===`catch`?So(t.innerType):e._zod.optin}var Co=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&F(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)x(i.properties,e,I(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?So(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=I(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},wo=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>I(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},To=(e,t,n,r)=>{let i=e._zod.def,a=I(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=I(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)};function Eo(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=Eo(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>Eo(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i&&(p.type=`string`,a||(p.pattern=(r.includes(`number`)?dn:un).source)),p}var Do=new WeakMap;function Oo(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of Do.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=Eo(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var ko=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=R(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=I(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)x(i.patternProperties,fo(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=I(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=Do.get(t);n||(n=[],Do.set(t,n),t.deferred.push(()=>Oo(t))),n.push(e)}i.additionalProperties=I(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&So(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},Ao=(e,t,n,r)=>{let i=e._zod.def,a=I(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},jo=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Mo=Symbol();function No(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(F(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Mo):JSON.parse(o)}var Po=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=No(i.defaultValue,e,t,n,r);o!==Mo&&(n.default=o)},Fo=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=No(i.defaultValue,e,t,n,r);o!==Mo&&(n._prefault=o)},Io=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{F(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Lo=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;I(o,t,r);let s=t.seen.get(e);s.ref=o},Ro=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},zo=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Bo=(e,t,n,r)=>{let i=e._zod.innerType;I(i,t,r);let a=t.seen.get(e);a.ref=i},Vo=new WeakSet([Object.prototype,Error.prototype]);function Ho(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var Uo=(e,t)=>{ft.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Vo.has(n)||(Vo.add(n),Ho(n,`format`,e=>t=>ht(e,t)),Ho(n,`flatten`,e=>t=>mt(e,t)),Ho(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,v,2)}),Ho(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,v,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},Wo=k(`ZodError`,Uo),z=k(`ZodError`,Uo,void 0,{Parent:Error}),Go=_t(z),Ko=vt(z),qo=yt(z),Jo=xt(z),Yo=Dt(z),Xo=Ot(z),Zo=kt(z),Qo=At(z),$o=jt(z),es=Mt(z),ts=Nt(z),ns=Pt(z);function rs(){A.localeError||j(Ai())}function is(){A.memoizer||j({memoizer:Di()})}var B=k(`ZodType`,(e,t)=>(rs(),N.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(w(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return T(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Sc(e,t))},superRefine(e,t){return this.check(Cc(e,t))},overwrite(e){return this.check(ka(e))},optional(){return nc(this)},exactOptional(){return ic(this)},nullable(){return oc(this)},nullish(){return nc(oc(this))},nonoptional(e){return fc(this,e)},array(){return G(this)},or(e){return Us([this,e])},and(e){return qs(this,e)},transform(e){return gc(this,ec(e))},default(e){return cc(this,e)},prefault(e){return uc(this,e)},catch(e){return mc(this,e)},pipe(e){return gc(this,e)},readonly(){return vc(this)},describe(e){let t=this.clone();return Pi.add(t,{description:e}),t},meta(...e){if(e.length===0)return Pi.get(this);let t=this.clone();return Pi.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Ge(this,`~standard`,{...In(this),jsonSchema:{input:Za(this,`input`),output:Za(this,`output`)}})},set"~standard"(e){We(this,`~standard`,e)},parse:function e(t,n){return Go(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await Ko(this,t,n,{callee:e})},safeParse(e,t){return qo(this,e,t)},async safeParseAsync(e,t){return Jo(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){We(this,`spa`,e)},validate(e,t){return wt(this,e,t)},validateAsync(e,t){return Et(this,e,t)},encode:function e(t,n){return Yo(this,t,n,{callee:e})},decode:function e(t,n){return Xo(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Zo(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Qo(this,t,n,{callee:e})},safeEncode(e,t){return $o(this,e,t)},safeDecode(e,t){return es(this,e,t)},async safeEncodeAsync(e,t){return ts(this,e,t)},async safeDecodeAsync(e,t){return ns(this,e,t)},toJSONSchema(e){return Xa(this,{})(e)},get description(){return Pi.get(this)?.description},get _def(){return this._zod.def}}),as=k(`_ZodString`,(e,t)=>{Ln.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>po(e,t,n,r)},Ke({format:e=>R(e).format??null,minLength:e=>R(e).minimum??null,maxLength:e=>R(e).maximum??null},{regex(...e){return this.check(Ca(...e))},includes(...e){return this.check(Ea(...e))},startsWith(...e){return this.check(Da(...e))},endsWith(...e){return this.check(Oa(...e))},min(...e){return this.check(xa(...e))},max(...e){return this.check(ba(...e))},length(...e){return this.check(Sa(...e))},nonempty(...e){return this.check(xa(1,...e))},lowercase(e){return this.check(wa(e))},uppercase(e){return this.check(Ta(e))},trim(){return this.check(ja())},normalize(...e){return this.check(Aa(...e))},toLowerCase(){return this.check(Ma())},toUpperCase(){return this.check(Na())},slugify(){return this.check(Pa())}})),os=k(`ZodString`,(e,t)=>{Ln.init(e,t),as.init(e,t)},{email(e){return this.check(Li(ds,e))},url(e){return this.check(Ui(hs,e))},jwt(e){return this.check(ia(js,e))},emoji(e){return this.check(Wi(_s,e))},guid(e){return this.check(Ri(fs,e))},uuid(e){return this.check(zi(ps,e))},uuidv4(e){return this.check(Bi(ps,e))},uuidv6(e){return this.check(Vi(ps,e))},uuidv7(e){return this.check(Hi(ps,e))},nanoid(e){return this.check(Gi(vs,e))},cuid(e){return this.check(Ki(ys,e))},cuid2(e){return this.check(qi(bs,e))},ulid(e){return this.check(Ji(xs,e))},base64(e){return this.check(ta(Os,e))},base64url(e){return this.check(na(ks,e))},xid(e){return this.check(Yi(Ss,e))},ksuid(e){return this.check(Xi(Cs,e))},ipv4(e){return this.check(Zi(ws,e))},ipv6(e){return this.check(Qi(Ts,e))},cidrv4(e){return this.check($i(Es,e))},cidrv6(e){return this.check(ea(Ds,e))},e164(e){return this.check(ra(As,e))},datetime(e){return this.check(aa(ss,e))},date(e){return this.check(oa(cs,e))},time(e){return this.check(sa(ls,e))},duration(e){return this.check(ca(us,e))}});function V(e){return Ii(os,e)}var H=k(`ZodStringFormat`,(e,t)=>{P.init(e,t),as.init(e,t)}),ss=k(`ZodISODateTime`,(e,t)=>{nr.init(e,t),H.init(e,t)}),cs=k(`ZodISODate`,(e,t)=>{rr.init(e,t),H.init(e,t)}),ls=k(`ZodISOTime`,(e,t)=>{ir.init(e,t),H.init(e,t)}),us=k(`ZodISODuration`,(e,t)=>{ar.init(e,t),H.init(e,t)}),ds=k(`ZodEmail`,(e,t)=>{Bn.init(e,t),H.init(e,t)}),fs=k(`ZodGUID`,(e,t)=>{Rn.init(e,t),H.init(e,t)}),ps=k(`ZodUUID`,(e,t)=>{zn.init(e,t),H.init(e,t)});function ms(e){return zi(ps,e)}var hs=k(`ZodURL`,(e,t)=>{Jn.init(e,t),H.init(e,t)});function gs(e){return Ui(hs,e)}var _s=k(`ZodEmoji`,(e,t)=>{Yn.init(e,t),H.init(e,t)}),vs=k(`ZodNanoID`,(e,t)=>{Xn.init(e,t),H.init(e,t)}),ys=k(`ZodCUID`,(e,t)=>{Zn.init(e,t),H.init(e,t)}),bs=k(`ZodCUID2`,(e,t)=>{Qn.init(e,t),H.init(e,t)}),xs=k(`ZodULID`,(e,t)=>{$n.init(e,t),H.init(e,t)}),Ss=k(`ZodXID`,(e,t)=>{er.init(e,t),H.init(e,t)}),Cs=k(`ZodKSUID`,(e,t)=>{tr.init(e,t),H.init(e,t)}),ws=k(`ZodIPv4`,(e,t)=>{or.init(e,t),H.init(e,t)}),Ts=k(`ZodIPv6`,(e,t)=>{lr.init(e,t),H.init(e,t)}),Es=k(`ZodCIDRv4`,(e,t)=>{ur.init(e,t),H.init(e,t)}),Ds=k(`ZodCIDRv6`,(e,t)=>{fr.init(e,t),H.init(e,t)}),Os=k(`ZodBase64`,(e,t)=>{hr.init(e,t),H.init(e,t)}),ks=k(`ZodBase64URL`,(e,t)=>{vr.init(e,t),H.init(e,t)}),As=k(`ZodE164`,(e,t)=>{yr.init(e,t),H.init(e,t)}),js=k(`ZodJWT`,(e,t)=>{xr.init(e,t),H.init(e,t)}),Ms=k(`ZodNumber`,(e,t)=>{Sr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mo(e,t,n,r),e.isFinite=!0},Ke({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=R(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=R(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=R(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>R(e).format??null},{gt(e,t){return this.check(_a(e,t))},gte(e,t){return this.check(va(e,t))},min(e,t){return this.check(va(e,t))},lt(e,t){return this.check(ha(e,t))},lte(e,t){return this.check(ga(e,t))},max(e,t){return this.check(ga(e,t))},int(e){return this.check(Ps(e))},safe(e){return this.check(Ps(e))},positive(e){return this.check(_a(0,e))},nonnegative(e){return this.check(va(0,e))},negative(e){return this.check(ha(0,e))},nonpositive(e){return this.check(ga(0,e))},multipleOf(e,t){return this.check(ya(e,t))},step(e,t){return this.check(ya(e,t))},finite(){return this}}));function U(e){return la(Ms,e)}var Ns=k(`ZodNumberFormat`,(e,t)=>{Cr.init(e,t),Ms.init(e,t)});function Ps(e){return da(Ns,e)}var Fs=k(`ZodBoolean`,(e,t)=>{wr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ho(e,t,n,r)});function W(e){return fa(Fs,e)}var Is=k(`ZodUnknown`,(e,t)=>{Tr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Ls(){return pa(Is)}var Rs=k(`ZodNever`,(e,t)=>{Er.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>go(e,t,n,r)});function zs(e){return ma(Rs,e)}var Bs=k(`ZodArray`,(e,t)=>{is(),Ar.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xo(e,t,n,r),e.element=t.element},{min(e,t){return this.check(xa(e,t))},nonempty(e){return this.check(xa(1,e))},max(e,t){return this.check(ba(e,t))},length(e,t){return this.check(Sa(e,t))},unwrap(){return this.element}});function G(e,t){return Fa(Bs,e,t)}var Vs=k(`ZodObject`,(e,t)=>{is(),Ir.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Co(e,t,n,r),Qe(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return Zs(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(w(this._zod.def,{catchall:e}))},passthrough(){return this.clone(w(this._zod.def,{catchall:Ls()}))},loose(){return this.clone(w(this._zod.def,{catchall:Ls()}))},strict(){return this.clone(w(this._zod.def,{catchall:zs()}))},strip(){return this.clone(w(this._zod.def,{catchall:void 0}))},extend(e){return Ee(this,e)},safeExtend(e){return Oe(this,e)},merge(e){return ke(this,e)},pick(e){return Ce(this,e)},omit(e){return Te(this,e)},partial(...e){return Ae(tc,this,e[0])},exactPartial(...e){return Ae(rc,this,e[0],`exactPartial`)},required(...e){return je(dc,this,e[0])}});function K(e,t){return new Vs({type:`object`,shape:e??{},...E(t)})}var Hs=k(`ZodUnion`,(e,t)=>{Rr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wo(e,t,n,r),e.options=t.options});function Us(e,t){return new Hs({type:`union`,options:e,...E(t)})}var Ws=k(`ZodDiscriminatedUnion`,(e,t)=>{Hs.init(e,t),Br.init(e,t)});function Gs(e,t,n){return new Ws({type:`union`,options:t,discriminator:e,...E(n)})}var Ks=k(`ZodIntersection`,(e,t)=>{Vr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>To(e,t,n,r)});function qs(e,t){return new Ks({type:`intersection`,left:e,right:t})}var Js=k(`ZodRecord`,(e,t)=>{is(),Wr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ko(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Ys(e,t,n){return!t||!t._zod?new Js({type:`record`,keyType:V(),valueType:e,...E(t)}):new Js({type:`record`,keyType:e,valueType:t,...E(n)})}var Xs=k(`ZodEnum`,(e,t)=>{Gr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_o(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Xs({...t,checks:[],...E(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Xs({...t,checks:[],...E(r),entries:i})}});function Zs(e,t){return new Xs({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...E(t)})}var Qs=k(`ZodLiteral`,(e,t)=>{Kr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vo(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function q(e,t){return new Qs({type:`literal`,values:Array.isArray(e)?e:[e],...E(t)})}var $s=k(`ZodTransform`,(e,t)=>{is(),qr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bo(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new ot(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(He(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(He(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function ec(e){return new $s({type:`transform`,transform:e})}var tc=k(`ZodOptional`,(e,t)=>{Yr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function nc(e){return new tc({type:`optional`,innerType:e})}var rc=k(`ZodExactOptional`,(e,t)=>{Xr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ic(e){return new rc({type:`optional`,innerType:e})}var ac=k(`ZodNullable`,(e,t)=>{Zr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ao(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function oc(e){return new ac({type:`nullable`,innerType:e})}var sc=k(`ZodDefault`,(e,t)=>{Qr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Po(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function cc(e,t){return new sc({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ge(t)}})}var lc=k(`ZodPrefault`,(e,t)=>{ei.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function uc(e,t){return new lc({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ge(t)}})}var dc=k(`ZodNonOptional`,(e,t)=>{ti.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function fc(e,t){return new dc({type:`nonoptional`,innerType:e,...E(t)})}var pc=k(`ZodCatch`,(e,t)=>{ii.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Io(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function mc(e,t){return new pc({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:et(t)})}var hc=k(`ZodPipe`,(e,t)=>{ai.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lo(e,t,n,r),e.in=t.in,e.out=t.out});function gc(e,t){return new hc({type:`pipe`,in:e,out:t})}var _c=k(`ZodReadonly`,(e,t)=>{si.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ro(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function vc(e){return new _c({type:`readonly`,innerType:e})}var yc=k(`ZodLazy`,(e,t)=>{li.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bo(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function bc(e){return new yc({type:`lazy`,getter:e})}var xc=k(`ZodCustom`,(e,t)=>{ui.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yo(e,t,n,r)});function Sc(e,t={}){return Ia(xc,e,t)}function Cc(e,t){return La(e,t)}var J=g(),Y=V().regex(/^[a-z][a-z0-9_-]{0,63}$/),wc=ms();K({deviceId:wc,projectId:Y.optional()}).strict(),K({workspaceId:Y,memberId:Y,deviceId:wc}),K({members:G(Y)});var Tc=134217728,Ec=10485760,Dc=3e5,Oc=V().regex(/^[a-f0-9]{64}$/),X=U().int().nonnegative().max(2**53-1),kc=V().min(1).max(1024).refine(e=>e!==e.normalize(`NFC`)||/[\\\x00-\x1f\x7f:<>"|?*]/.test(e)?!1:e.split(`/`).every(e=>e.length>0&&e.length<=255&&e!==`.`&&e!==`..`&&!/[. ]$/.test(e)&&!/^\.teammy(?:-|$)/i.test(e)&&!/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\.|$)/i.test(e)),`Path must be a portable, normalized relative file path.`),Ac=K({sha256:Oc,size:U().int().min(0).max(Tc)}),jc=Ac.extend({size:U().int().min(0).max(Ec)}),Mc=Gs(`kind`,[jc.extend({kind:q(`upsert`),path:kc}).strict(),K({kind:q(`delete`),path:kc}).strict()]);K({operationId:ms(),parentRevision:X,changes:G(Mc)}).strict().refine(e=>new Set(e.changes.map(e=>e.path)).size===e.changes.length,`Duplicate paths in a publication.`),K({operationId:ms(),revision:X});var Nc=jc.extend({path:kc,revision:X});K({revision:X,complete:W().default(!1),files:G(Nc),nextCursor:V().nullable()}),K({headRevision:X,revisions:G(K({revision:X,operationId:ms(),createdAt:V(),changes:G(Mc)}))}),K({hashes:G(Oc).max(200)}).strict(),K({missing:G(Oc)});var Pc=Gs(`kind`,[Nc.extend({kind:q(`file`)}),K({kind:q(`directory`),path:kc,fileCount:U().int().positive()})]),Fc=K({revision:X,path:Us([q(``),kc]),entries:G(Pc),nextCursor:V().nullable()}),Ic=K({revision:X,file:Nc}),Lc=V().url().max(2048).refine(e=>{let t=new URL(e);return[`http:`,`https:`].includes(t.protocol)&&!t.username&&!t.password&&!t.search&&!t.hash},`Use an HTTP(S) server URL without credentials, query or fragment.`),Rc=K({checkIntervalSeconds:U().int().min(1).max(86400),fileSettleSeconds:U().int().min(0).max(86400)}).strict(),zc=K({schemaVersion:q(1),projectId:Y,projectName:V().trim().min(1).max(120),description:V().max(2e3),publicServerUrl:Lc,configRevision:X,scopeProfile:q(`workspace-and-sessions-v1`),sync:Rc}).strict(),Bc=K({operationId:ms(),publicServerUrl:Lc,adminId:Y}).strict(),Vc=K({initialized:W(),authMode:Zs([`member-id`,`tai`]).default(`member-id`)}),Hc=zc.pick({projectName:!0,description:!0}).extend({expectedRevision:X.optional()}).strict(),Uc=K({id:Y,displayName:V().max(120),enabled:W(),accountEnabled:W(),revision:X,bound:W(),fileRevision:X,lastPublishedAt:V().nullable(),hasFiles:W().default(!1),hasSessions:W().default(!1)}),Wc=K({memberId:Y,displayName:V(),siteRole:Zs([`admin`,`member`])}),Gc=Wc.extend({workspaceId:Y}),Kc=K({seen:W()}),qc=K({id:Y}).strict(),Jc=K({expectedRevision:X,displayName:V().trim().max(120).optional(),enabled:W().optional()}).strict();K({operationId:ms(),projectName:V().trim().min(1).max(120),description:V().max(2e3).default(``),workspacePath:V().trim().min(1).optional()}).strict();var Yc=K({projects:G(K({projectId:Y,projectName:V(),description:V()}))}),Xc=K({sync:Rc,publicServerUrl:Lc,revision:X}),Zc=K({publicServerUrl:Lc.optional(),sync:Rc.optional(),expectedRevision:X}).strict().refine(e=>e.publicServerUrl!==void 0||e.sync!==void 0,`Provide a setting to update.`),Qc=K({id:Y,displayName:V(),siteRole:Zs([`admin`,`member`]),enabled:W(),revision:X}),$c=K({id:Y,displayName:V().trim().max(120).default(``),siteRole:Zs([`admin`,`member`]).default(`member`)}).strict(),el=K({expectedRevision:X,displayName:V().trim().max(120).optional(),enabled:W().optional(),siteRole:Zs([`admin`,`member`]).optional()}).strict();K({status:q(`ok`)});var tl=K({name:q(`teammy`),version:V().min(1),protocolVersion:q(1),capabilities:G(V()),clientUrl:V().url().optional()});K({error:K({code:V(),message:V(),requestId:V()})});var nl=V().regex(/^tmy_[a-f0-9]{64}$/);K({operationId:ms(),projectId:Y,memberId:Y,deviceId:wc,credential:nl,multiDevice:q(!0).optional()}).strict();var rl=K({checkIntervalSeconds:U().min(1).max(86400),fileSettleSeconds:U().min(0).max(86400)}).strict(),il=K({checkedAt:V(),published:W(),appliedFiles:U().int().nonnegative(),pendingFiles:U().int().nonnegative(),sessionSources:U().int().nonnegative(),errors:G(V().max(1e3)).max(20)}).strict(),al=K({clientVersion:V().max(64),receivedRevision:X.nullable(),appliedRevision:X.nullable(),effectivePolicy:rl,overrides:G(Zs([`checkIntervalSeconds`,`fileSettleSeconds`])).max(2),configError:V().max(2e3).nullable(),reportError:V().max(2e3).nullable(),lastSync:il.nullable()}).strict(),ol=K({devices:G(K({memberId:Y,deviceId:wc.nullish(),name:V().nullish(),bound:W(),lastSeenAt:V().nullable(),status:al.nullable()}))}),Z={brand:`Teammy`,navigation:`主导航`,filePreview:`文件预览`,versionPicker:`选择目录版本`,connectCommand:`连接命令`,syncCommand:`开启同步命令`,syncStopCommand:`停止同步命令`,installCommandLabel:`安装命令`,skipToMain:`跳到主要内容`,loading:`正在加载…`,retry:`重试`,refresh:`刷新`,cancel:`取消`,close:`关闭`,save:`保存`,saving:`正在保存…`,next:`下一步`,back:`上一步`,confirm:`确认`,logout:`退出登录`,menu:`导航菜单`,files:`工作区`,dashboard:`工作看板`,sessions:`会话库`,members:`成员`,settings:`设置`,account:`个人账户`,project:`项目`,projectName:`项目名称`,description:`项目说明`,address:`团队接入地址`,addressHint:`填写成员设备能够访问的服务地址。`,adminId:`管理员 ID`,memberId:`成员 ID`,idHint:`以小写字母开头,最多 64 位,可包含数字、短横线或下划线。ID 创建后不可修改。`,displayName:`显示名称`,admin:`管理员`,member:`成员`,enabled:`已启用`,disabled:`已停用`,login:`进入工作台`,loginTitle:`连接你的团队`,loginHint:`输入管理员预先建立的成员 ID。`,existing:`接入已有工作区`,choose:`请选择`,interval:`文件检查间隔(秒)`,settle:`文件稳定等待(秒)`,timingHint:`文件停止修改后开始计时。新设置约 30 秒后下发,当前批次结束后生效。`,scope:`共享范围`,owner:`文件所属成员`,noFiles:`该目录版本暂无文件`,noFilesHint:`运行客户端同步后查看。`,pickFile:`选择文件,查看内容`,more:`加载更多`,name:`文件路径`,size:`大小`,version:`版本`,directoryVersion:`目录版本`,latest:`最新版本`,viewVersion:`查看版本`,download:`下载原文件`,raw:`原文`,rendered:`预览`,previewUnavailable:`该文件不支持文本预览,请下载查看。`,previewLarge:`文件超过 512 KiB,请下载查看完整内容。`,readOnly:`只读`,refreshFiles:`刷新目录`,remoteImage:`图片`,addMember:`添加成员`,editName:`修改名称`,disableMember:`停用成员`,enableMember:`启用成员`,resetDevice:`重置设备`,resetHint:`撤销该成员的设备凭证,保留共享文件与历史。成员需要重新运行 connect --reconnect。`,disableHint:`停止该成员访问和同步本项目,保留历史资料。其他项目不受影响。`,enableHint:`恢复本项目访问权限。设备需要重新接入。`,bound:`设备已绑定`,unbound:`尚未绑定设备`,noContact:`尚无状态报告`,lastContact:`最近联系`,lastPublished:`最近发布`,noPublication:`尚未发布文件`,stale:`报告已超过 2 分钟`,applied:`已应用`,waiting:`等待应用`,failed:`应用失败`,received:`已接收`,saved:`服务端已保存`,override:`含命令行覆盖`,effective:`当前有效策略`,syncResult:`最近同步`,pending:`待发文件`,clientVersion:`客户端版本`,syncIssues:`同步提示`,statusHint:`最近上报状态,非实时在线状态。`,connectTitle:`连接项目目录`,connectHint:`在工作目录(例如 utu/)运行以下命令,并在打开的网页中确认用户 ID,将当前工作目录连接到 Teammy 服务:`,connectAfter:`注意:会话采集以工作目录为范围,只采集该目录及其子目录中的 Agent 会话。因此,建议在项目根目录(例如 utu/)执行此命令。`,install:`首次使用`,installHint:`需要 Node.js 22.19+。安装后按上方说明连接项目。`,copy:`复制`,copied:`已复制`,copyFailed:`复制失败,请手动选择命令。`,configSaved:`设置已保存,等待客户端接收并上报。`,reloadConfig:`读取最新设置`,configConflict:`设置已被其他成员修改。先读取最新设置,再重新编辑。`,permissionHint:`公共设置由管理员维护。`,application:`配置应用情况`,serverVersion:`服务端版本`,notReported:`未上报`,seconds:`秒`,errors:{AI_DEFAULT_REQUIRED:`请选择模型,或先设置默认接入点。`,AI_PROFILE_DISABLED:`该模型接入点已停用,请重新选择。`,AI_CONFIG_CONFLICT:`模型设置已更新,请重新载入后保存。`,SITE_ADMIN_REQUIRED:`此操作需要站点管理员身份。`,USER_NOT_FOUND:`用户尚未建立或账号已停用,请联系站点管理员。`,USER_EXISTS:`该用户 ID 已存在。`,PROJECT_NOT_FOUND:`项目不存在或你已不再是该项目成员。`,PROJECT_REQUIRED:`请选择一个项目。`,PROJECT_MISMATCH:`设备凭证属于其他项目。`,UNKNOWN_MEMBER:`成员 ID 不存在或已被停用。`,LOGIN_REQUIRED:`登录已失效,请重新登录。`,ADMIN_REQUIRED:`此操作需要管理员身份。`,STALE_CONFIG:`设置已变更,请读取最新设置后重试。`,STALE_MEMBER:`成员信息已变更,请刷新后重试。`,LAST_ADMIN:`至少需要保留一位启用的管理员。`,MEMBER_EXISTS:`该成员 ID 已存在。`,ALREADY_INITIALIZED:`服务已初始化,请刷新页面进入登录。`,INVALID_REQUEST:`请检查输入内容和数值范围。`,INVALID_RESPONSE:`服务返回了无法识别的响应,请刷新后重试。`,GATEWAY_ERROR:`服务网关未能转发请求,请检查部署配置。`,FORBIDDEN:`没有执行此操作的权限。`,INVALID_REVISION:`该目录版本不存在。`}};function sl(e){let t=e.replace(/\s+/g,` `).trim()||`未命名对话`,n=Array.from(t);return n.length>56?n.slice(0,56).join(``)+`…`:t}var cl=class extends Error{code;status;constructor(e,t,n){super(Z.errors[e]??t),this.code=e,this.status=n}},ll;async function ul(e,t,n={}){let r=n.method??`GET`,i=n.body instanceof Blob?n.body:void 0,a=await fetch(d(`/api/v1/${e}`),{method:r===`PATCH`?`POST`:r,headers:{accept:`application/json`,...r===`PATCH`?{"x-http-method-override":`PATCH`}:{},...n.body===void 0?{}:{"content-type":i?`application/octet-stream`:`application/json`},...r===`GET`?{}:{"x-teammy-web":`1`}},body:i??(n.body===void 0?void 0:JSON.stringify(n.body)),signal:n.signal?AbortSignal.any([n.signal,AbortSignal.timeout(n.timeoutMs??15e3)]):AbortSignal.timeout(n.timeoutMs??15e3),credentials:`same-origin`}),o=a.headers.get(`x-teammy-data-generation`);if(o){let e=ll!==void 0&&ll!==o;ll=o,e&&window.dispatchEvent(new Event(`teammy:data-reset`))}let s=await a.json().catch(()=>{throw new cl(`INVALID_RESPONSE`,``,a.status)});if(s?.Response?.Error)throw new cl(`GATEWAY_ERROR`,``,a.status);if(!a.ok){let e=new cl(s?.error?.code??`HTTP_ERROR`,s?.error?.message??`HTTP ${a.status}`,a.status);throw e.code===`LOGIN_REQUIRED`&&window.dispatchEvent(new Event(`teammy:logout`)),e}let c=t.safeParse(s);if(!c.success)throw new cl(`INVALID_RESPONSE`,``,a.status);return c.data}var dl={clientLatest:e=>ul(`client/latest`,K({version:V().min(1),versions:G(V()).default([])}),{signal:e}),server:e=>ul(`server`,tl,{signal:e}),projects:e=>ul(`projects`,Yc,{signal:e}),setup:e=>ul(`setup`,Vc,{signal:e}),session:e=>ul(`web/session`,Wc,{signal:e}),login:e=>ul(`web/session`,Wc,{method:`POST`,body:{id:e}}),logout:()=>ul(`web/session`,K({ok:W()}),{method:`DELETE`})};function fl(e){return{config:t=>e(`project/config`,zc,{signal:t}),members:t=>e(`web/members`,K({members:G(Uc)}),{signal:t}),devices:t=>e(`web/devices`,ol,{signal:t}),file:(t,n,r,i)=>e(`files/${encodeURIComponent(t)}/entry?${new URLSearchParams({path:n,...r===void 0?{}:{revision:String(r)}})}`,Ic,{signal:i}),tree:(t,n,r,i,a)=>e(`files/${encodeURIComponent(t)}/tree?${new URLSearchParams({path:n,after:i,limit:`100`,...r===void 0?{}:{revision:String(r)}})}`,Fc,{signal:a})}}function pl(e){return e instanceof Wo?Z.errors.INVALID_REQUEST:e instanceof Error?e.message:String(e)}function ml(e){return`'${e.replaceAll(`'`,`'\\''`)}'`}function hl(){let e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}async function gl(e,t,n){let r=await fetch(d(`${n}/blobs/${e.sha256}`),{signal:AbortSignal.any([t,AbortSignal.timeout(Dc)])});if(!r.ok)throw r.status===401&&window.dispatchEvent(new Event(`teammy:logout`)),new cl(`HTTP_ERROR`,`HTTP ${r.status}`,r.status);let i=await r.arrayBuffer();if(i.byteLength!==e.size)throw Error(`File size mismatch.`);let a;try{a=new TextDecoder(`utf-8`,{fatal:!0}).decode(i)}catch{throw Error(Z.previewUnavailable)}if(a.includes(`\0`))throw Error(Z.previewUnavailable);return a}var _l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),vl=o(((e,t)=>{t.exports=_l()})),Q=vl(),yl=class{values=new Map;get(e){return this.values.get(e)}set(e,t){this.values.set(e,t)}delete(e){this.values.delete(e)}},bl=(0,J.createContext)(void 0);function xl({children:e}){let[{cache:t,generation:n},r]=(0,J.useState)(()=>({cache:new yl,generation:0}));return(0,J.useEffect)(()=>{let e=()=>{let e=new URL(location.href);for(let t of[`chat`,`message`])e.searchParams.delete(t);history.replaceState(history.state,``,e),r(e=>({cache:new yl,generation:e.generation+1}))};return window.addEventListener(`teammy:data-reset`,e),()=>window.removeEventListener(`teammy:data-reset`,e)},[]),(0,Q.jsx)(bl.Provider,{value:t,children:(0,Q.jsx)(J.Fragment,{children:e},n)})}var Sl=()=>(0,J.useContext)(bl),Cl=(...e)=>JSON.stringify(e);function wl(e,t=!1,n){let r=Sl(),i=n??e,a=()=>n?r?.get(n):void 0,[o,s]=(0,J.useState)(()=>({source:i,data:a(),error:``,loading:!0})),c=o.source===i?o:{source:i,data:a(),error:``,loading:!0},l=(0,J.useRef)(null),u=(0,J.useRef)(0),d=(0,J.useCallback)(async()=>{l.current?.abort();let t=new AbortController;l.current=t;let o=++u.current;s(e=>({source:i,data:e.source===i?e.data:a(),error:``,loading:!0}));try{let a=await e(t.signal);o===u.current&&(n&&r?.set(n,a),s({source:i,data:a,error:``,loading:!1}))}catch(e){if(!t.signal.aborted&&o===u.current){let t=e instanceof cl&&[401,403,404].includes(e.status);t&&n&&r?.delete(n),s(n=>({...n,data:t?void 0:n.data,error:pl(e)}))}}finally{o===u.current&&(s(e=>({...e,loading:!1})),l.current=null)}},[e,n,r]);return(0,J.useEffect)(()=>{d();let e=()=>{!document.hidden&&!l.current&&d()},n=t?setInterval(e,typeof t==`number`?t:3e4):void 0;return t&&document.addEventListener(`visibilitychange`,e),()=>{u.current++,l.current?.abort(),l.current=null,clearInterval(n),document.removeEventListener(`visibilitychange`,e)}},[d,t]),{data:c.data,error:c.error,loading:c.loading,reload:d}}function Tl(){return wl(dl.clientLatest,3e5)}function El(){let[e]=(0,J.useState)(()=>new AbortController);return(0,J.useEffect)(()=>()=>e.abort(),[e]),e.signal}async function Dl(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}let t=document.activeElement,n=window.getSelection(),r=n?Array.from({length:n.rangeCount},(e,t)=>n.getRangeAt(t).cloneRange()):[],i=document.createElement(`textarea`);i.value=e,i.readOnly=!0,i.style.cssText=`position:fixed;left:0;top:0;opacity:0;pointer-events:none;`,document.body.append(i);try{if(i.focus({preventScroll:!0}),i.select(),!document.execCommand(`copy`))throw Error(`Clipboard copy was denied.`)}finally{if(i.remove(),t instanceof HTMLElement&&t.focus({preventScroll:!0}),n){n.removeAllRanges();for(let e of r)n.addRange(e)}}}var Ol=new URL(`teammy-logo-light-B6BoNVcp.svg`,import.meta.url).href,kl=new URL(`teammy-logo-dark-GROHRRMa.svg`,import.meta.url).href,Al=new URL(`teammy-y-standard-light-Bl5D78Uj.svg`,import.meta.url).href,jl=new URL(`teammy-y-standard-dark-C4LRaRpE.svg`,import.meta.url).href,Ml=`data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3eteammy-y-focus-light%3c/title%3e%3cdesc%20id='desc'%3eteammy%20v02%20y%20mascot,%20focus%20pose,%20transparent%20background;%20for%20light%20backgrounds.%3c/desc%3e%3cg%20transform='translate(112%2060)%20scale(1.3)'%3e%3cg%20id='y-pose'%20transform='rotate(-3%20111.0%20302)'%3e%3cpath%20id='y-body'%20fill='%23FD523A'%20fill-rule='evenodd'%20d='M%2049.317%20300.497%20C%2028.532%20295.979%2018.688%20282.992%2023.472%20266.402%20C%2026.05%20257.459%2033.188%20245.557%2064.462%20198.05%20C%2073.677%20184.052%2081.395%20172.127%2081.613%20171.55%20C%2081.831%20170.972%2078.97%20168.935%2075.255%20167.022%20C%2065.861%20162.185%2050.569%20146.814%2041.34%20132.932%20C%2029.015%20114.392%2010.878%2075.899%203.443%2052.5%20C%201.197%2045.434%200.575%2041.566%200.546%2034.5%20C%200.514%2026.44%200.839%2024.805%203.66%2018.841%20C%207.579%2010.555%2013.474%204.715%2020.613%202.044%20C%2029.833%20-1.406%2039.061%20-0.444%2046.837%204.779%20C%2054.765%2010.103%2057.482%2015.595%2066.49%2044.5%20C%2083.08%2097.73%2096.468%20117.452%20112.993%20113.002%20C%20118.444%20111.534%20127.482%20103.119%20133.012%2094.364%20C%20142.105%2079.966%20149.119%2064.195%20159.042%2035.835%20C%20167.649%2011.235%20170.163%207.091%20179.22%202.578%20C%20183.328%200.531%20185.863%20-0%20191.537%200%20C%20203.952%200%20214.157%206.698%20219.622%2018.435%20C%20222.964%2025.612%20222.934%2037.364%20219.549%2047.449%20C%20216.06%2057.842%20204.241%2083.895%20194.889%20101.805%20C%20181.005%20128.395%20171.321%20144.622%20133.006%20205.5%20C%20113.066%20237.182%20105%20250.137%20105%20250.478%20C%20105%20250.627%20111.412%20250.979%20119.25%20251.262%20C%20135.581%20251.85%20142.206%20253.486%20147.663%20258.277%20C%20156.782%20266.284%20156.024%20279.688%20145.965%20288.298%20C%20138.721%20294.498%20128.637%20297.41%20103.721%20300.494%20C%2088.557%20302.372%2057.948%20302.373%2049.317%20300.497%20Z'/%3e%3cg%20fill='%23161615'%20transform='translate(2.5%203)'%3e%3cpath%20id='y-eye-1'%20d='M%20107%2045.5%20C%20107%2054.613%20102.075%2062%2096%2062%20C%2089.925%2062%2085%2054.613%2085%2045.5%20C%2085%2036.387%2089.925%2029%2096%2029%20C%20102.075%2029%20107%2036.387%20107%2045.5%20Z'/%3e%3cpath%20id='y-eye-2'%20d='M%20139%2045.5%20C%20139%2054.613%20134.075%2062%20128%2062%20C%20121.925%2062%20117%2054.613%20117%2045.5%20C%20117%2036.387%20121.925%2029%20128%2029%20C%20134.075%2029%20139%2036.387%20139%2045.5%20Z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e`,Nl=`data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3eteammy-y-focus-dark%3c/title%3e%3cdesc%20id='desc'%3eteammy%20v02%20y%20mascot,%20focus%20pose,%20transparent%20background;%20for%20dark%20backgrounds.%3c/desc%3e%3cg%20transform='translate(112%2060)%20scale(1.3)'%3e%3cg%20id='y-pose'%20transform='rotate(-3%20111.0%20302)'%3e%3cpath%20id='y-body'%20fill='%23FD523A'%20fill-rule='evenodd'%20d='M%2049.317%20300.497%20C%2028.532%20295.979%2018.688%20282.992%2023.472%20266.402%20C%2026.05%20257.459%2033.188%20245.557%2064.462%20198.05%20C%2073.677%20184.052%2081.395%20172.127%2081.613%20171.55%20C%2081.831%20170.972%2078.97%20168.935%2075.255%20167.022%20C%2065.861%20162.185%2050.569%20146.814%2041.34%20132.932%20C%2029.015%20114.392%2010.878%2075.899%203.443%2052.5%20C%201.197%2045.434%200.575%2041.566%200.546%2034.5%20C%200.514%2026.44%200.839%2024.805%203.66%2018.841%20C%207.579%2010.555%2013.474%204.715%2020.613%202.044%20C%2029.833%20-1.406%2039.061%20-0.444%2046.837%204.779%20C%2054.765%2010.103%2057.482%2015.595%2066.49%2044.5%20C%2083.08%2097.73%2096.468%20117.452%20112.993%20113.002%20C%20118.444%20111.534%20127.482%20103.119%20133.012%2094.364%20C%20142.105%2079.966%20149.119%2064.195%20159.042%2035.835%20C%20167.649%2011.235%20170.163%207.091%20179.22%202.578%20C%20183.328%200.531%20185.863%20-0%20191.537%200%20C%20203.952%200%20214.157%206.698%20219.622%2018.435%20C%20222.964%2025.612%20222.934%2037.364%20219.549%2047.449%20C%20216.06%2057.842%20204.241%2083.895%20194.889%20101.805%20C%20181.005%20128.395%20171.321%20144.622%20133.006%20205.5%20C%20113.066%20237.182%20105%20250.137%20105%20250.478%20C%20105%20250.627%20111.412%20250.979%20119.25%20251.262%20C%20135.581%20251.85%20142.206%20253.486%20147.663%20258.277%20C%20156.782%20266.284%20156.024%20279.688%20145.965%20288.298%20C%20138.721%20294.498%20128.637%20297.41%20103.721%20300.494%20C%2088.557%20302.372%2057.948%20302.373%2049.317%20300.497%20Z'/%3e%3cg%20fill='%23FFFFFF'%20transform='translate(2.5%203)'%3e%3cpath%20id='y-eye-1'%20d='M%20107%2045.5%20C%20107%2054.613%20102.075%2062%2096%2062%20C%2089.925%2062%2085%2054.613%2085%2045.5%20C%2085%2036.387%2089.925%2029%2096%2029%20C%20102.075%2029%20107%2036.387%20107%2045.5%20Z'/%3e%3cpath%20id='y-eye-2'%20d='M%20139%2045.5%20C%20139%2054.613%20134.075%2062%20128%2062%20C%20121.925%2062%20117%2054.613%20117%2045.5%20C%20117%2036.387%20121.925%2029%20128%2029%20C%20134.075%2029%20139%2036.387%20139%2045.5%20Z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e`,Pl=`data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3eteammy-y-respond-light%3c/title%3e%3cdesc%20id='desc'%3eteammy%20v02%20y%20mascot,%20respond%20pose,%20transparent%20background;%20for%20light%20backgrounds.%3c/desc%3e%3cg%20transform='translate(112%2060)%20scale(1.3)'%3e%3cg%20id='y-pose'%20transform='rotate(2.5%20111.0%20302)'%3e%3cpath%20id='y-body'%20fill='%23FD523A'%20fill-rule='evenodd'%20d='M%2049.317%20300.497%20C%2028.532%20295.979%2018.688%20282.992%2023.472%20266.402%20C%2026.05%20257.459%2033.188%20245.557%2064.462%20198.05%20C%2073.677%20184.052%2081.395%20172.127%2081.613%20171.55%20C%2081.831%20170.972%2078.97%20168.935%2075.255%20167.022%20C%2065.861%20162.185%2050.569%20146.814%2041.34%20132.932%20C%2029.015%20114.392%2010.878%2075.899%203.443%2052.5%20C%201.197%2045.434%200.575%2041.566%200.546%2034.5%20C%200.514%2026.44%200.839%2024.805%203.66%2018.841%20C%207.579%2010.555%2013.474%204.715%2020.613%202.044%20C%2029.833%20-1.406%2039.061%20-0.444%2046.837%204.779%20C%2054.765%2010.103%2057.482%2015.595%2066.49%2044.5%20C%2083.08%2097.73%2096.468%20117.452%20112.993%20112.856%20C%20118.444%20111.12%20127.482%20101.716%20133.012%2091.812%20C%20142.105%2074.963%20149.119%2057.285%20159.042%2027.157%20C%20167.649%201.542%20170.163%20-2.773%20179.22%20-7.422%20C%20183.328%20-9.469%20185.863%20-10%20191.537%20-10%20C%20203.952%20-10%20214.157%20-3.302%20219.622%208.435%20C%20222.964%2015.612%20222.934%2027.364%20219.549%2037.449%20C%20216.06%2047.842%20204.241%2075.158%20194.889%2095.806%20C%20181.005%20126.785%20171.321%20144.508%20133.006%20205.5%20C%20113.066%20237.182%20105%20250.137%20105%20250.478%20C%20105%20250.627%20111.412%20250.979%20119.25%20251.262%20C%20135.581%20251.85%20142.206%20253.486%20147.663%20258.277%20C%20156.782%20266.284%20156.024%20279.688%20145.965%20288.298%20C%20138.721%20294.498%20128.637%20297.41%20103.721%20300.494%20C%2088.557%20302.372%2057.948%20302.373%2049.317%20300.497%20Z'/%3e%3cg%20fill='%23161615'%20transform='translate(0%20-1.5)'%3e%3cpath%20id='y-eye-1'%20d='M%20107%2045.5%20C%20107%2054.613%20102.075%2062%2096%2062%20C%2089.925%2062%2085%2054.613%2085%2045.5%20C%2085%2036.387%2089.925%2029%2096%2029%20C%20102.075%2029%20107%2036.387%20107%2045.5%20Z'/%3e%3cpath%20id='y-eye-2'%20d='M%20139%2045.5%20C%20139%2054.613%20134.075%2062%20128%2062%20C%20121.925%2062%20117%2054.613%20117%2045.5%20C%20117%2036.387%20121.925%2029%20128%2029%20C%20134.075%2029%20139%2036.387%20139%2045.5%20Z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e`,Fl=`data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3eteammy-y-respond-dark%3c/title%3e%3cdesc%20id='desc'%3eteammy%20v02%20y%20mascot,%20respond%20pose,%20transparent%20background;%20for%20dark%20backgrounds.%3c/desc%3e%3cg%20transform='translate(112%2060)%20scale(1.3)'%3e%3cg%20id='y-pose'%20transform='rotate(2.5%20111.0%20302)'%3e%3cpath%20id='y-body'%20fill='%23FD523A'%20fill-rule='evenodd'%20d='M%2049.317%20300.497%20C%2028.532%20295.979%2018.688%20282.992%2023.472%20266.402%20C%2026.05%20257.459%2033.188%20245.557%2064.462%20198.05%20C%2073.677%20184.052%2081.395%20172.127%2081.613%20171.55%20C%2081.831%20170.972%2078.97%20168.935%2075.255%20167.022%20C%2065.861%20162.185%2050.569%20146.814%2041.34%20132.932%20C%2029.015%20114.392%2010.878%2075.899%203.443%2052.5%20C%201.197%2045.434%200.575%2041.566%200.546%2034.5%20C%200.514%2026.44%200.839%2024.805%203.66%2018.841%20C%207.579%2010.555%2013.474%204.715%2020.613%202.044%20C%2029.833%20-1.406%2039.061%20-0.444%2046.837%204.779%20C%2054.765%2010.103%2057.482%2015.595%2066.49%2044.5%20C%2083.08%2097.73%2096.468%20117.452%20112.993%20112.856%20C%20118.444%20111.12%20127.482%20101.716%20133.012%2091.812%20C%20142.105%2074.963%20149.119%2057.285%20159.042%2027.157%20C%20167.649%201.542%20170.163%20-2.773%20179.22%20-7.422%20C%20183.328%20-9.469%20185.863%20-10%20191.537%20-10%20C%20203.952%20-10%20214.157%20-3.302%20219.622%208.435%20C%20222.964%2015.612%20222.934%2027.364%20219.549%2037.449%20C%20216.06%2047.842%20204.241%2075.158%20194.889%2095.806%20C%20181.005%20126.785%20171.321%20144.508%20133.006%20205.5%20C%20113.066%20237.182%20105%20250.137%20105%20250.478%20C%20105%20250.627%20111.412%20250.979%20119.25%20251.262%20C%20135.581%20251.85%20142.206%20253.486%20147.663%20258.277%20C%20156.782%20266.284%20156.024%20279.688%20145.965%20288.298%20C%20138.721%20294.498%20128.637%20297.41%20103.721%20300.494%20C%2088.557%20302.372%2057.948%20302.373%2049.317%20300.497%20Z'/%3e%3cg%20fill='%23FFFFFF'%20transform='translate(0%20-1.5)'%3e%3cpath%20id='y-eye-1'%20d='M%20107%2045.5%20C%20107%2054.613%20102.075%2062%2096%2062%20C%2089.925%2062%2085%2054.613%2085%2045.5%20C%2085%2036.387%2089.925%2029%2096%2029%20C%20102.075%2029%20107%2036.387%20107%2045.5%20Z'/%3e%3cpath%20id='y-eye-2'%20d='M%20139%2045.5%20C%20139%2054.613%20134.075%2062%20128%2062%20C%20121.925%2062%20117%2054.613%20117%2045.5%20C%20117%2036.387%20121.925%2029%20128%2029%20C%20134.075%2029%20139%2036.387%20139%2045.5%20Z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e`,Il=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Ll(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Il(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var Rl=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},zl=e=>{let t=Rl(e);return t.charAt(0).toUpperCase()+t.slice(1)},Bl=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Vl={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function Hl(e){return e!=null}function Ul(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Vl.width,a=e.size??e.height??Vl.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Bl(...c):Bl(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Vl[`stroke-width`])*Number(e.size??e.width??Vl.width)/Number(t.size??t.width??Vl.width):t.strokeWidth??Vl[`stroke-width`];return[`svg`,{...Object.entries(Vl).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Hl(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Hl(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Hl(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function Wl(e,t={}){return Ul(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Gl=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Kl=(0,J.createContext)({}),ql=()=>(0,J.useContext)(Kl),Jl=(0,J.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:ee=``}=ql()??{},v=!!c||Gl(d),[te,y,ne=[]]=Wl(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:Bl(ee,s),hasA11yProp:v,attributes:d});return(0,J.createElement)(te,{ref:f,...y},[...ne.map(([e,t])=>(0,J.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function $(e,t=[],n=[]){let r=typeof e==`string`?Ll(e,t,n):e,i=(0,J.forwardRef)(({className:e,...t},n)=>(0,J.createElement)(Jl,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=zl(r.name)),i}var Yl={name:`activity`,size:24,node:[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]};Yl.node;var Xl=$(Yl),Zl={name:`archive`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]};Zl.node;var Ql=$(Zl),$l={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};$l.node;var eu=$($l),tu={name:`bell`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]};tu.node;var nu=$(tu),ru={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]};ru.node;var iu=$(ru),au={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 01-3-4 4.17 4.17 0 01-3 4`,key:`5nuw1p`}],[`path`,{d:`M17.707 6.294A3 3 0 1012 5a3 3 0 10-5.707 1.294`,key:`18ldcf`}],[`path`,{d:`M17.996 5.125a4 4 0 012.526 5.77`,key:`1sdu8q`}],[`path`,{d:`M18 18a4 4 0 002-7.465`,key:`7xqqvr`}],[`path`,{d:`M19.967 17.482a4 4 0 11-7.967.517 4 4 0 11-7.967-.517`,key:`t46ysz`}],[`path`,{d:`M6 18a4 4 0 01-2-7.465`,key:`1y2m15`}],[`path`,{d:`M6.004 5.125a4 4 0 00-2.526 5.77`,key:`3cw1ss`}]]};au.node;var ou=$(au),su={name:`brush-cleaning`,size:24,node:[[`path`,{d:`m16 22-1-4`,key:`1ow2iv`}],[`path`,{d:`M19 14a1 1 0 0 0 1-1v-1a2 2 0 0 0-2-2h-3a1 1 0 0 1-1-1V4a2 2 0 0 0-4 0v5a1 1 0 0 1-1 1H6a2 2 0 0 0-2 2v1a1 1 0 0 0 1 1`,key:`11gii7`}],[`path`,{d:`M19 14H5l-1.973 6.767A1 1 0 0 0 4 22h16a1 1 0 0 0 .973-1.233z`,key:`bju7h4`}],[`path`,{d:`m8 22 1-4`,key:`s3unb`}]]};su.node;var cu=$(su),lu={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};lu.node;var uu=$(lu),du={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};du.node;var fu=$(du),pu={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};pu.node;var mu=$(pu),hu={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};hu.node;var gu=$(hu),_u={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};_u.node;var vu=$(_u),yu={name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`help-circle`,`circle-help`]};yu.node;var bu=$(yu),xu={name:`clipboard-paste`,size:24,node:[[`path`,{d:`M11 14h10`,key:`1w8e9d`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v1.344`,key:`1e62lh`}],[`path`,{d:`m17 18 4-4-4-4`,key:`z2g111`}],[`path`,{d:`M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113`,key:`bjbb7m`}],[`rect`,{x:`8`,y:`2`,width:`8`,height:`4`,rx:`1`,key:`ublpy`}]]};xu.node;var Su=$(xu),Cu={name:`clock-3`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]};Cu.node;var wu=$(Cu),Tu={name:`code-xml`,size:24,node:[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]],aliases:[`code-2`]};Tu.node;var Eu=$(Tu),Du={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};Du.node;var Ou=$(Du),ku={name:`cpu`,size:24,node:[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]};ku.node;var Au=$(ku),ju={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};ju.node;var Mu=$(ju),Nu={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};Nu.node;var Pu=$(Nu),Fu={name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};Fu.node;var Iu=$(Fu),Lu={name:`file-code`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]};Lu.node;var Ru=$(Lu),zu={name:`file-image`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`10`,cy:`12`,r:`2`,key:`737tya`}],[`path`,{d:`m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22`,key:`wt3hpn`}]]};zu.node;var Bu=$(zu),Vu={name:`file-plus-corner`,size:24,node:[[`path`,{d:`M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35`,key:`17jvcc`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M14 19h6`,key:`bvotb8`}],[`path`,{d:`M17 16v6`,key:`18yu1i`}]],aliases:[`file-plus-2`]};Vu.node;var Hu=$(Vu),Uu={name:`file-spreadsheet`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]};Uu.node;var Wu=$(Uu),Gu={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};Gu.node;var Ku=$(Gu),qu={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};qu.node;var Ju=$(qu),Yu={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};Yu.node;var Xu=$(Yu),Zu={name:`funnel`,size:24,node:[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]],aliases:[`filter`]};Zu.node;var Qu=$(Zu),$u={name:`house`,size:24,node:[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]],aliases:[`home`]};$u.node;var ed=$($u),td={name:`image`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]};td.node;var nd=$(td),rd={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};rd.node;var id=$(rd),ad={name:`layout-grid`,size:24,node:[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]};ad.node;var od=$(ad),sd={name:`link-2`,size:24,node:[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]};sd.node;var cd=$(sd),ld={name:`list-plus`,size:24,node:[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`M18 9v6`,key:`1twb98`}],[`path`,{d:`M21 12h-6`,key:`bt1uis`}]]};ld.node;var ud=$(ld),dd={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};dd.node;var fd=$(dd),pd={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};pd.node;var md=$(pd),hd={name:`menu`,size:24,node:[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]};hd.node;var gd=$(hd),_d={name:`message-circle`,size:24,node:[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]};_d.node;var vd=$(_d),yd={name:`messages-square`,size:24,node:[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]};yd.node;var bd=$(yd),xd={name:`minimize-2`,size:24,node:[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]};xd.node;var Sd=$(xd),Cd={name:`monitor`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]};Cd.node;var wd=$(Cd),Td={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]};Td.node;var Ed=$(Td),Dd={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};Dd.node;var Od=$(Dd),kd={name:`pin`,size:24,node:[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]};kd.node;var Ad=$(kd),jd={name:`plug`,size:24,node:[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]};jd.node;var Md=$(jd),Nd={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};Nd.node;var Pd=$(Nd),Fd={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};Fd.node;var Id=$(Fd),Ld={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};Ld.node;var Rd=$(Ld),zd={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};zd.node;var Bd=$(zd),Vd={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};Vd.node;var Hd=$(Vd),Ud={name:`sliders-horizontal`,size:24,node:[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]};Ud.node;var Wd=$(Ud),Gd={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};Gd.node;var Kd=$(Gd),qd={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};qd.node;var Jd=$(qd),Yd={name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]};Yd.node;var Xd=$(Yd),Zd={name:`text-align-start`,size:24,node:[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M17 19H3`,key:`z6ezky`}]],aliases:[`text`,`align-left`]};Zd.node;var Qd=$(Zd),$d={name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]};$d.node;var ef=$($d),tf={name:`user-round-check`,size:24,node:[[`path`,{d:`M2 21a8 8 0 0 1 13.292-6`,key:`bjp14o`}],[`circle`,{cx:`10`,cy:`8`,r:`5`,key:`o932ke`}],[`path`,{d:`m16 19 2 2 4-4`,key:`1b14m6`}]],aliases:[`user-check-2`]};tf.node;var nf=$(tf),rf={name:`user-round`,size:24,node:[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]],aliases:[`user-2`]};rf.node;var af=$(rf),of={name:`user-round-x`,size:24,node:[[`path`,{d:`m16.5 16.5 5 5`,key:`zc9lw7`}],[`path`,{d:`M2 21a8 8 0 0 1 11.531-7.18`,key:`x5izle`}],[`path`,{d:`m21.5 16.5-5 5`,key:`1empo3`}],[`circle`,{cx:`10`,cy:`8`,r:`5`,key:`o932ke`}]],aliases:[`user-x-2`]};of.node;var sf=$(of),cf={name:`users`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]};cf.node;var lf=$(cf),uf={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};uf.node;var df=$(uf),ff={name:`zoom-in`,size:24,node:[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]};ff.node;var pf=$(ff),mf={name:`zoom-out`,size:24,node:[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]};mf.node;var hf=$(mf),gf={light:{logo:Ol,standard:Al,focus:Ml,respond:Pl},dark:{logo:kl,standard:jl,focus:Nl,respond:Fl}};function _f({compact:e=!1,background:t=`light`}){return(0,Q.jsx)(`div`,{className:`brand ${e?`brand-compact`:``}`,children:(0,Q.jsx)(`img`,{src:gf[t][e?`standard`:`logo`],alt:`Teammy`})})}function vf({pose:e=`focus`,background:t=`light`}){return(0,Q.jsx)(`img`,{className:`mascot mascot-${e}`,src:gf[t][e],alt:``,"aria-hidden":`true`})}function yf({name:e,small:t=!1}){return(0,Q.jsx)(`span`,{className:`avatar ${t?`small`:``}`,"aria-hidden":`true`,children:Array.from(e)[0]?.toUpperCase()})}function bf({children:e}){return(0,Q.jsx)(`span`,{className:`count`,children:e})}function xf({title:e,description:t,icon:n,mascot:r=!1,children:i}){return(0,Q.jsxs)(`div`,{className:`empty-state`,children:[r?(0,Q.jsx)(vf,{}):n?(0,Q.jsx)(Mf,{name:n}):null,(0,Q.jsx)(`h3`,{children:e}),t&&(0,Q.jsx)(`p`,{children:t}),i]})}function Sf({title:e,count:t,children:n}){return(0,Q.jsxs)(`div`,{className:`section-heading`,children:[(0,Q.jsxs)(`h2`,{children:[e,t!==void 0&&(0,Q.jsx)(bf,{children:t})]}),n]})}function Cf({label:e,children:t}){return(0,Q.jsx)(`div`,{className:`toolbar-actions`,role:`group`,"aria-label":e,children:t})}function wf({children:e,error:t=!1}){return e?(0,Q.jsx)(`div`,{"data-testid":`notice`,"data-kind":t?`error`:`info`,className:`notice ${t?`error`:``}`,role:t?`alert`:`status`,children:e}):null}function Tf({id:e,name:t,label:n,hint:r,children:i}){let a=[i.props[`aria-describedby`],r?`${e}-hint`:void 0].filter(Boolean).join(` `)||void 0;return(0,Q.jsxs)(`label`,{className:`field`,htmlFor:e,children:[(0,Q.jsx)(`span`,{id:`${e}-label`,children:n}),(0,J.cloneElement)(i,{id:e,name:t??i.props.name??e,"data-testid":e,"aria-labelledby":`${e}-label`,"aria-describedby":a}),r&&(0,Q.jsx)(`small`,{id:`${e}-hint`,children:r})]})}function Ef({title:e,description:t,children:n}){return(0,Q.jsxs)(`header`,{className:`page-header`,children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`h1`,{children:e}),t&&(0,Q.jsx)(`p`,{children:t})]}),n]})}function Df({id:e,title:t,label:n,actions:r,onKeyDown:i,children:a,onClose:o}){let s=(0,J.useRef)(null);return(0,J.useEffect)(()=>{let e=document.activeElement;return s.current?.showModal(),()=>{s.current?.close(),e?.focus()}},[]),(0,Q.jsx)(`dialog`,{id:e,"data-testid":e,"aria-labelledby":n?void 0:`${e}-title`,"aria-label":n,ref:s,onKeyDown:i,onCancel:e=>{e.preventDefault(),o()},onClick:e=>{e.target===e.currentTarget&&o()},children:(0,Q.jsxs)(`div`,{className:`dialog-content`,children:[(0,Q.jsxs)(`header`,{className:`dialog-header`,children:[(0,Q.jsx)(`h2`,{id:`${e}-title`,children:t}),r,(0,Q.jsx)(Ff,{icon:`close`,label:Z.close,"data-testid":`dialog-close`,onClick:o})]}),a]})})}function Of({id:e,label:t,value:n}){let[r,i]=(0,J.useState)(``);return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{className:`command`,"data-testid":e,children:[(0,Q.jsx)(`code`,{"data-testid":`${e}-value`,children:n}),(0,Q.jsx)(Ff,{icon:`copy`,"data-testid":`${e}-copy`,label:`${Z.copy}${t}`,onClick:async()=>{try{await Dl(n),i(Z.copied)}catch{i(Z.copyFailed)}}})]}),r&&(0,Q.jsx)(`small`,{"data-testid":`${e}-feedback`,role:`status`,children:r})]})}function kf({value:e}){return e?(0,Q.jsx)(`time`,{dateTime:e,children:new Date(e).toLocaleString(`zh-CN`,{hour12:!1})}):(0,Q.jsx)(`span`,{children:`—`})}var Af={clear:cu,assistant:Kd,messages:vd,channels:bd,pin:Ad,more:Pu,computers:wd,archive:Ql,send:eu,activity:Xl,dashboard:od,home:ed,clock:wu,warning:ef,command:Xd,sessions:bd,message:vd,files:Xu,materials:iu,memory:ou,question:bu,folderOpen:Ju,chevronUp:gu,chevronDown:fu,members:lf,settings:Hd,help:bu,filter:Qu,compact:Sd,stop:Jd,restore:Rd,refresh:Id,loading:fd,chevron:mu,file:Ku,text:Qd,link:cd,attachment:Ed,image:nd,paste:Su,zoomIn:pf,zoomOut:hf,imageFile:Bu,spreadsheetFile:Wu,codeFile:Ru,addText:ud,addFile:Hu,download:Mu,code:Eu,preview:Iu,sparkles:Kd,close:df,plus:Pd,edit:Od,device:wd,disable:sf,enable:nf,reset:id,menu:gd,logout:md,account:af,copy:Ou,general:Wd,connect:Md,model:Au,check:uu,search:Bd,notifications:nu,attention:vu},jf={small:16,normal:24,navigation:38};function Mf({name:e,size:t=`normal`}){let n=Af[e];return(0,Q.jsx)(n,{className:`icon`,size:jf[t],strokeWidth:2,absoluteStrokeWidth:!0,"aria-hidden":`true`})}var Nf={channels:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`path`,{d:`M4.3 2.3h9.5a2.3 2.3 0 0 1 2.3 2.3v5.8a2.3 2.3 0 0 1-2.3 2.3H6.9l-3.5 2.9a.85.85 0 0 1-1.4-.65V4.6a2.3 2.3 0 0 1 2.3-2.3Z`}),(0,Q.jsx)(`path`,{d:`M18 8.5h1.8a2.2 2.2 0 0 1 2.2 2.2v10a.85.85 0 0 1-1.4.65L17.4 19h-7.2A2.2 2.2 0 0 1 8 16.8v-2.2h5.8a4.2 4.2 0 0 0 4.2-4.2Z`})]}),materials:(0,Q.jsx)(`path`,{d:`M2 5a2 2 0 0 1 2-2h3.1c1.6 0 2.9.45 4 1.3v16.4a6.4 6.4 0 0 0-3.9-1.2H4a2 2 0 0 1-2-2Zm20 0a2 2 0 0 0-2-2h-3.1c-1.6 0-2.9.45-4 1.3v16.4a6.4 6.4 0 0 1 3.9-1.2H20a2 2 0 0 0 2-2Z`}),help:(0,Q.jsx)(`path`,{fillRule:`evenodd`,d:`M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0ZM8.5 8.9a3.6 3.6 0 0 1 7 .9c0 1.8-1.3 2.7-2.4 3.5-.5.4-.6.7-.6 1.3h-1.8c0-1.4.5-2.1 1.5-2.8 1-.7 1.5-1.2 1.5-2a1.8 1.8 0 0 0-3.5-.45ZM13 17.2a1.15 1.15 0 1 1-2.3 0 1.15 1.15 0 0 1 2.3 0Z`}),settings:(0,Q.jsx)(`path`,{fillRule:`evenodd`,d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.32-1.915ZM15.4 12a3.4 3.4 0 1 1-6.8 0 3.4 3.4 0 0 1 6.8 0Z`})};function Pf({name:e,selected:t}){let n=t&&Nf[e];return n?(0,Q.jsx)(`svg`,{className:`icon`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,Q.jsx)(`g`,{stroke:`none`,children:n})}):(0,Q.jsx)(Mf,{name:e})}function Ff({label:e,icon:t,tooltip:n=t!==`refresh`,className:r=``,variant:i=`ghost`,...a}){return(0,Q.jsx)(`button`,{type:`button`,...a,className:`icon-button ${i===`primary`?`primary`:``} ${r}`,"aria-label":e,"data-tooltip":n===!0?e:n||void 0,children:(0,Q.jsx)(Mf,{name:t})})}function If({id:e,label:t,trigger:n,triggerId:r,className:i=``,disabled:a=!1,placement:o=`bottom`,routeKey:s,children:c,open:l,onOpenChange:u,focusFirst:d=!0}){let[f,p]=(0,J.useState)(!1),m=l??f,h=e=>{p(e),u?.(e)},g=(0,J.useRef)(null),_=(0,J.useRef)(null),ee=(0,J.useRef)(!1),v=(0,J.useRef)(null),[te,y]=(0,J.useState)();return(0,J.useLayoutEffect)(()=>{if(!m||o!==`top`)return;let e=()=>{if(!_.current||!v.current)return;let e=_.current.getBoundingClientRect(),t=v.current.getBoundingClientRect().width;y({position:`fixed`,top:`auto`,bottom:innerHeight-e.top+8,left:Math.max(8,Math.min(e.left,innerWidth-t-8)),maxHeight:`min(var(--dropdown-max-height, 70dvh), ${Math.max(80,e.top-24)}px)`})};return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[m,o]),(0,J.useEffect)(()=>h(!1),[s]),(0,J.useEffect)(()=>{if(!m)return;let e=g.current?.querySelectorAll(`[role="menuitem"]:not(:disabled)`);d&&e?.[ee.current?e.length-1:0]?.focus();let t=e=>{g.current?.contains(e.target)||h(!1)};return document.addEventListener(`pointerdown`,t),()=>document.removeEventListener(`pointerdown`,t)},[m]),(0,Q.jsxs)(`div`,{className:`dropdown ${i}`,ref:g,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||h(!1)},onKeyDown:e=>{e.key===`Escape`&&m&&(e.stopPropagation(),h(!1),_.current?.focus())},children:[(0,Q.jsx)(`button`,{ref:_,type:`button`,disabled:a,className:`dropdown-trigger`,"data-testid":r,"aria-label":t,"aria-haspopup":`menu`,"aria-expanded":m,"aria-controls":e,onClick:()=>{ee.current=!1,h(!m)},onKeyDown:e=>{(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),ee.current=e.key===`ArrowUp`,h(!0))},children:n}),m&&(0,Q.jsx)(`div`,{id:e,ref:v,style:o===`top`?te:void 0,className:`dropdown-menu`,role:`menu`,"aria-label":t,"data-testid":e,onKeyDown:e=>{let t=[...e.currentTarget.querySelectorAll(`[role="menuitem"]:not(:disabled)`)],n=t.indexOf(document.activeElement),r=e.key===`ArrowDown`?(n+1)%t.length:e.key===`ArrowUp`?(n+t.length-1)%t.length:e.key===`Home`?0:e.key===`End`?t.length-1:void 0;r!==void 0&&(e.preventDefault(),t[r]?.focus())},children:c(()=>{h(!1),_.current?.focus()})})]})}export{Ac as $,hl as A,Jc as B,Cl as C,f as Ct,dl as D,s as Dt,cl as E,o as Et,Z as F,Xc as G,Kc as H,ol as I,Qc as J,Zc as K,Hc as L,ul as M,ml as N,fl as O,l as Ot,sl as P,Dc as Q,qc as R,xl as S,d as St,vl as T,p as Tt,Lc as U,zc as V,Bc as W,Wc as X,el as Y,Gc as Z,kf as _,Ls as _t,bf as a,Ms as at,El as b,ua as bt,Mf as c,W as ct,Df as d,q as dt,kc as et,Pf as f,U as ft,Cf as g,Us as gt,Sf as h,V as ht,Of as i,Y as it,gl as j,pl as k,Ff as l,Gs as lt,Ef as m,Ys as mt,yf as n,X as nt,xf as o,Zs as ot,wf as p,K as pt,$c as q,_f as r,wc as rt,Tf as s,G as st,If as t,Oc as tt,vf as u,bc as ut,Dl as v,gs as vt,Sl as w,m as wt,wl as x,g as xt,Tl as y,ms as yt,Uc as z};
@@ -0,0 +1 @@
1
+ import{C as e,E as t,F as n,St as r,T as i,c as a,et as o,g as s,l as c,o as l,p as u,x as d,xt as f}from"./Dropdown-D625ln2m.js";import{A as p,M as m,R as h,j as g}from"./index-DjMoKD7A.js";import{t as _}from"./project-links-DI2fBvjw.js";import{t as v}from"./Markdown-Cw4CQNYb.js";import{a as y,i as b,l as x,n as S,o as C,s as w,t as T}from"./WorkspaceTree-BHdUglYr.js";import{t as E}from"./file-links-CVbLZSaw.js";var D=f(),O=i();function k(e,t){let n=t.split(`/`).slice(0,-1);return n.map((t,r)=>S(e,n.slice(0,r+1).join(`/`))).concat(S(e,``))}function A({members:e,onRefresh:i}){let{api:a,projectId:s}=h(),[f,p]=(0,D.useState)(()=>{let t=new URLSearchParams(location.search),n=t.get(`owner`),r=o.safeParse(t.get(`path`));return n&&(w(n)||e.some(e=>e.id===n))&&r.success&&!C(r.data)?{owner:n,path:r.data}:void 0}),[v,x]=(0,D.useState)(()=>new Set(f?k(f.owner,f.path):[])),[A,N]=(0,D.useState)(()=>f?{...f,kind:`file`}:void 0),[P,F]=(0,D.useState)(0),[I,L]=(0,D.useState)(()=>{let e=new URLSearchParams(location.search);return!f&&(e.has(`owner`)||e.has(`path`))?`文件链接不完整或目标已不可用。`:``}),R=(0,D.useCallback)(async e=>{if(f)try{return{owner:f.owner,...await a.file(f.owner,f.path,void 0,e)}}catch(e){throw e instanceof t&&e.code===`FILE_NOT_FOUND`?Error(`找不到这个文件,可能已被删除或移动。`):e}},[f?.owner,f?.path,P]),z=d(R),B=z.data?.owner===f?.owner&&z.data?.file.path===f?.path?z.data:void 0;function V(e,t){let n=t.split(`/`).filter(Boolean);x(t=>{let r=new Set(t);for(let t=0;t<=n.length;t++)r.add(S(e,n.slice(0,t).join(`/`)));return r})}function H(e,t){L(``),V(e,t.split(`/`).slice(0,-1).join(`/`)),p({owner:e,path:t}),N({owner:e,path:t,kind:`file`}),history.replaceState(null,``,r(_(s,e,t)))}function U(t){if(!f)return!1;let n=E(w(f.owner)?f.path:`${f.owner}/${f.path}`,t);if(!n)return!/^[a-z][a-z0-9+.-]*:/i.test(t)&&!t.startsWith(`//`)&&(L(`该链接超出工作区,请在原仓库查看。`),!0);if(C(n.path))return L(`配置文件不在文件浏览中显示。`),!0;if(y(n.path))return location.assign(r(`/projects/${s}/memory`)),!0;let[i,...a]=n.path.split(`/`),o=e.some(e=>e.id===i),c=o?i:b,l=o?a.join(`/`):n.path;return L(``),n.directory?(V(c,l),N({owner:c,path:l,kind:`directory`})):c===f.owner&&l===f.path?n.anchor&&[...document.querySelectorAll(`.markdown h1,.markdown h2,.markdown h3,.markdown h4`)].find(e=>e.textContent?.trim().toLowerCase().replace(/\s+/g,`-`)===n.anchor.toLowerCase())?.scrollIntoView({block:`center`}):H(c,l),!0}return(0,O.jsx)(g,{"data-testid":`file-browser`,label:`文件资源管理器`,navigation:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(m,{title:`工作区`,children:(0,O.jsx)(c,{icon:`refresh`,label:`刷新文件`,"data-testid":`files-refresh`,onClick:()=>{L(``),F(e=>e+1),i()}})}),(0,O.jsx)(T,{members:e,expanded:v,selected:A,revealed:!z.loading&&!z.error&&B?{owner:B.owner,path:B.file.path,file:B.file}:void 0,onSelect:H,onToggle:(e,t)=>{N({owner:e,path:t,kind:`directory`}),x(n=>{let r=new Set(n),i=S(e,t);return r.has(i)?r.delete(i):r.add(i),r})}},P)]}),children:(0,O.jsx)(`section`,{className:`file-detail`,"data-testid":`file-preview`,"data-owner-id":f?.owner,"data-file-path":f?.path,"aria-label":n.filePreview,children:B&&!z.loading&&!z.error?(0,O.jsx)(M,{owner:B.owner,file:B.file,linkError:I,onLink:U},`${B.owner}:${B.file.path}:${B.file.sha256}`):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(j,{target:f}),(0,O.jsxs)(`div`,{className:`reader-body`,children:[(0,O.jsx)(u,{error:!0,children:I||!z.loading&&z.error}),z.error&&(0,O.jsx)(`button`,{className:`file-entry-retry`,"data-testid":`files-retry`,onClick:()=>void z.reload(),children:n.retry}),f&&z.loading&&(0,O.jsx)(`p`,{className:`preview-body`,role:`status`,children:n.loading}),!f&&!I&&(0,O.jsx)(l,{mascot:!0,title:`查看工作区文件`,description:n.pickFile})]})]})})})}function j({target:e,children:t}){let r=e&&(w(e.owner)?`teamcontext`:e.owner);return(0,O.jsx)(p,{title:e?(0,O.jsxs)(`h2`,{className:`file-detail-path`,title:`${r}/${e.path}`,children:[(0,O.jsxs)(`span`,{children:[r,` / `]}),e.path]}):n.filePreview,actions:t})}function M({owner:t,file:r,linkError:i,onLink:o}){let{readTextBlob:l,blobUrl:f,projectId:p}=h(),[m,g]=(0,D.useState)(!1),_=r.size>524288,y=/\.(md|markdown)$/i.test(r.path),b=/\.html?$/i.test(r.path),S=(0,D.useCallback)(e=>_?Promise.resolve(void 0):l(r,e),[r.sha256,r.size,_]),C=d(S,!1,e(p,`file-body`,r.sha256));return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(j,{target:{owner:t,path:r.path},children:(0,O.jsxs)(s,{label:`文件操作`,children:[(y||b)&&(0,O.jsx)(c,{icon:m?`preview`:`code`,label:m?`切换为预览`:`切换为原文`,"data-testid":`file-toggle-raw`,"aria-pressed":m,onClick:()=>g(!m)}),(0,O.jsx)(`a`,{className:`icon-button`,"data-testid":`file-download`,"aria-label":n.download,title:n.download,href:f(r.sha256),download:r.path.split(`/`).at(-1),children:(0,O.jsx)(a,{name:`download`})})]})}),(0,O.jsxs)(`div`,{className:`reader-body`,children:[(0,O.jsx)(u,{error:!0,children:i}),_?(0,O.jsx)(`div`,{className:`empty`,children:(0,O.jsx)(`p`,{children:n.previewLarge})}):C.error?(0,O.jsxs)(`div`,{className:`preview-body`,children:[(0,O.jsx)(u,{error:!0,children:C.error}),(0,O.jsx)(`button`,{"data-testid":`file-preview-retry`,onClick:()=>void C.reload(),children:n.retry})]}):C.loading?(0,O.jsx)(`p`,{className:`preview-body`,role:`status`,children:n.loading}):(0,O.jsx)(`div`,{className:`preview-body${b&&!m?` preview-body-html`:``}`,children:b&&!m?(0,O.jsx)(x,{url:f(r.sha256),name:r.path.split(`/`).at(-1)}):y&&!m?(0,O.jsx)(`article`,{className:`markdown`,"data-testid":`file-content`,"data-format":`markdown`,children:(0,O.jsx)(v,{onLink:o,children:C.data??``})}):(0,O.jsx)(`pre`,{className:`raw`,"data-testid":`file-content`,"data-format":`text`,children:C.data})})]})]})}export{A as Files};