gitifact 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/README.md +9 -6
  2. package/dist/browser/assets/BottomSheet-CUR7U0gF.js +1 -0
  3. package/dist/browser/assets/IconButton-BqlnBu_N.js +4 -0
  4. package/dist/browser/assets/Markdown-Br4lZgRm.js +68 -0
  5. package/dist/browser/assets/{MenuBottomSheet-BKiLm4Gk.js → MenuBottomSheet-BkRC4_VW.js} +1 -1
  6. package/dist/browser/assets/ProgressBarMarkTooltip-BVcVKVq9.js +1 -0
  7. package/dist/browser/assets/Section-DQRr6JoK.js +1 -0
  8. package/dist/browser/assets/TimestampHoverCard-ClDQXGeS.js +1 -0
  9. package/dist/browser/assets/{Tooltip-CH5OxdmX.js → Tooltip-a2AGdnkC.js} +1 -1
  10. package/dist/browser/assets/about-BEuntqm_.js +52 -0
  11. package/dist/browser/assets/about-yX6os7bt.css +1 -0
  12. package/dist/browser/assets/{contributors._email-B6w1SA-1.js → contributors._email-BedFTFKd.js} +1 -1
  13. package/dist/browser/assets/contributors.index-Bnzf41H5.js +1 -0
  14. package/dist/browser/assets/{features._featureId-B4Ba6Tbc.js → features._featureId-DcMHCk6D.js} +1 -1
  15. package/dist/browser/assets/features.index-De9qZC-A.js +1 -0
  16. package/dist/browser/assets/git-D7ZvYMaq.js +1 -0
  17. package/dist/browser/assets/git-DF8OMSPX.css +1 -0
  18. package/dist/browser/assets/guides._documentId-DCT-3idQ.js +1 -0
  19. package/dist/browser/assets/guides.index-D1kTKyw-.js +1 -0
  20. package/dist/browser/assets/index-Dv_ANS5w.js +56 -0
  21. package/dist/browser/assets/page-header-BL8BYIMW.js +57 -0
  22. package/dist/browser/assets/product-CV4EzacY.css +1 -0
  23. package/dist/browser/assets/product-mRpyGR_g.js +8 -0
  24. package/dist/browser/assets/product.index-DByH6f_H.js +1 -0
  25. package/dist/browser/assets/request-state-CcdtplxL.js +1 -0
  26. package/dist/browser/assets/requirements-Dwwz8esQ.js +1 -0
  27. package/dist/browser/assets/routes-3pD4uVSj.js +1 -0
  28. package/dist/browser/assets/themeProps-MQSlTycI.js +1 -0
  29. package/dist/browser/assets/{useClipboard-D2fN4Nhs.js → useClipboard-B8Or2k0a.js} +1 -1
  30. package/dist/browser/assets/useDevWarning-CzR6rkf6.js +1 -0
  31. package/dist/browser/assets/useIsomorphicLayoutEffect-f8dYmyS2.js +1 -0
  32. package/dist/browser/assets/useMediaQuery-C_nG4b-e.js +1 -0
  33. package/dist/browser/assets/{useScrollLock-0d-ttB5Z.js → useScrollLock-CrQ0xkil.js} +1 -1
  34. package/dist/browser/index.html +15 -17
  35. package/dist/docs/commit.md +36 -0
  36. package/dist/docs/design.md +42 -0
  37. package/dist/docs/product.md +21 -0
  38. package/dist/docs/spec.md +54 -0
  39. package/dist/docs/workflow.md +42 -0
  40. package/dist/main.js +875 -466
  41. package/package.json +3 -3
  42. package/dist/browser/assets/BottomSheet-DFEd7qcJ.js +0 -1
  43. package/dist/browser/assets/IconButton-DQKowV1I.js +0 -3
  44. package/dist/browser/assets/Section-CXNZYeQ6.js +0 -1
  45. package/dist/browser/assets/Text-LX6541eF.js +0 -2
  46. package/dist/browser/assets/TimestampHoverCard-CEVz4ZE2.js +0 -1
  47. package/dist/browser/assets/about-NfIJSqpC.js +0 -1
  48. package/dist/browser/assets/contributors.index-Dkv636DW.js +0 -1
  49. package/dist/browser/assets/features.index-Cfxr24mB.js +0 -1
  50. package/dist/browser/assets/git-D5knlkQy.js +0 -1
  51. package/dist/browser/assets/git-nj7fScNQ.css +0 -1
  52. package/dist/browser/assets/ime-u5HljzMu.js +0 -1
  53. package/dist/browser/assets/index-DMRG08Xu.js +0 -56
  54. package/dist/browser/assets/mergeProps-ptS-gIMz.js +0 -1
  55. package/dist/browser/assets/page-header-it9YqWBS.js +0 -56
  56. package/dist/browser/assets/product-Cn69vcBM.css +0 -1
  57. package/dist/browser/assets/product-DAbLI-2U.js +0 -75
  58. package/dist/browser/assets/request-state-s3JHTg5D.js +0 -3
  59. package/dist/browser/assets/requirements-Db8psmjT.js +0 -1
  60. package/dist/browser/assets/routes-HW2hx-iw.js +0 -1
  61. package/dist/browser/assets/themeProps-BV289t6M.js +0 -1
  62. package/dist/browser/assets/useDevWarning-CHuvA0bI.js +0 -1
  63. package/dist/browser/assets/useIsomorphicLayoutEffect-DPqcigQ0.js +0 -1
  64. package/dist/browser/assets/useMediaQuery-Bkz-2VBC.js +0 -1
  65. package/dist/skills/gitifact-workflow/SKILL.md +0 -157
@@ -1 +0,0 @@
1
- function e(e,t){let n={...e,...t},r=[e.className,t.className].filter(Boolean).join(` `);r?n.className=r:delete n.className;let i=t.style&&e.style?{...e.style,...t.style}:t.style||e.style;return i?n.style=i:delete n.style,n}function t(t,n,r,i){if(typeof t==`string`){let e=t,a=n??{className:``},o=r,s=a.className?`${e} ${a.className}`:e;o&&(s=`${s} ${o}`);let c=i&&a.style?{...a.style,...i}:i||a.style;return{...a,className:s,style:c}}let a=e(t,typeof n==`string`?{className:n}:n??{});return typeof r==`string`?a=e(a,{className:r}):r!=null&&(a=e(a,{style:r})),i!=null&&(a=e(a,{style:i})),a}export{t};
@@ -1,56 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Tooltip-CH5OxdmX.js","assets/themeProps-BV289t6M.js","assets/useIsomorphicLayoutEffect-DPqcigQ0.js","assets/ime-u5HljzMu.js"])))=>i.map(i=>d[i]);
2
- import{A as e,D as t,E as n,O as r,_ as i,b as a,c as o,n as s,v as c,x as l}from"./themeProps-BV289t6M.js";import{t as u}from"./mergeProps-ptS-gIMz.js";import{_ as d,a as f,c as p,d as m,f as h,g,h as _,i as v,l as y,m as b,n as x,o as S,p as ee,r as C,s as te,t as w,u as ne,v as re}from"./Text-LX6541eF.js";var T=e(t(),1),E=o(),ie=(0,T.lazy)(async()=>C(()=>import(`./Tooltip-CH5OxdmX.js`).then(e=>e.n).then(e=>({default:e.Tooltip})),__vite__mapDeps([0,1,2,3])));function ae(e){return e===`display-1`||e===`display-2`||e===`display-3`}var oe={1:`h1`,2:`h2`,3:`h3`,4:`h4`,5:`h5`,6:`h6`};function se({level:e,type:t,weight:r,accessibilityLevel:i,color:a=`primary`,display:o=`block`,maxLines:c=0,hasTruncateTooltip:l=!0,wordBreak:C,textWrap:w,justify:se=`start`,hasCapsize:ce=!1,hasStrikethrough:le=!1,xstyle:ue,className:de,style:fe,children:pe,ref:me,...he}){let ge=oe[e],_e=i&&i!==e?{"aria-level":i}:{},ve=C??(c===1?`break-all`:`break-word`),ye=c>0||ce?`block`:o,D=t&&ae(t)?t:void 0,be=f({maxLines:c}),xe=typeof l==`string`?l:`above`,Se=c>0&&l!==!1&&be.isTruncated,O=(0,T.useRef)(null),Ce=v(me,be.ref,O),we=c>1?{WebkitLineClamp:c}:void 0;return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(ge,{ref:Ce,...u(s(`heading`,{level:e,color:a,type:t,weight:r}),n(te[x(a)],D?ee[D]:h[e],D&&y[D],r&&d[r],c===1?_.singleLine:c>1?_.multiLine:ne[ye],c>0&&re[ve],w&&b[w],se!==`start`&&m[se],ce&&S.enabled,le&&p.strikethrough,ue),de,{...fe,...we}),..._e,...he,children:pe}),Se&&(0,E.jsx)(T.Suspense,{fallback:null,children:(0,E.jsx)(ie,{anchorRef:O,content:(0,E.jsx)(`span`,{...n(g.content),children:be.fullText}),placement:xe})})]})}se.displayName=`Heading`;var ce=T.use,le=T.useLayoutEffect;function ue(e,t,n){T.useEffect(()=>{if(!e.current||n||typeof IntersectionObserver!=`function`)return()=>t();let r=new IntersectionObserver(e=>{t(e.pop())},{rootMargin:`100px`});return r.observe(e.current),()=>{r.disconnect(),t()}},[t,n,e])}function de(e){let t=T.useRef(null);return T.useImperativeHandle(e,()=>t.current,[]),t}function fe(e){return e[e.length-1]}function pe(e,t){return typeof e==`function`?e(t):e}var me=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable;function ge(e){for(let t in e)if(me.call(e,t))return!0;return!1}var _e=()=>Object.create(null),ve=(e,t)=>ye(e,t,_e);function ye(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=Se(e)&&Se(i);if(!a&&!(be(e)&&be(i)))return i;let o=a?e:D(e);if(!o)return i;let s=a?i:D(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),d=0;for(let t=0;t<l;t++){let o=a?t:s[t],l=e[o],f=i[o];if(l===f){u[o]=l,(a?t<c:me.call(e,o))&&d++;continue}if(l===null||f===null||typeof l!=`object`||typeof f!=`object`){u[o]=f;continue}let p=ye(l,f,n,r+1);u[o]=p,p===l&&d++}return c===l&&d===c?e:u}function D(e){let t=Object.keys(e);if(t.length!==Object.getOwnPropertyNames(e).length)return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;for(let r of n){if(!he.call(e,r))return!1;t.push(r)}return t}function be(e){if(!xe(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!xe(n)||!n.hasOwnProperty(`isPrototypeOf`))}function xe(e){return Object.prototype.toString.call(e)===`[object Object]`}function Se(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function O(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!O(e[r],t[r],n))return!1;return!0}if(be(e)&&be(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!O(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!O(e[o],t[o],n)))return!1;return i===a}return!1}function Ce(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}var we=/[\x00-\x1f\x7f"<>`{}]/g;function Te(e){return e.replace(we,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function Ee(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return Te(t)}var De=[`http:`,`https:`,`mailto:`,`tel:`];function Oe(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var ke=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Ae(e,t){if(!e)return!1;if(ke.test(e))return!0;let n=Oe(e);return n?!t.has(n):!1}function je(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=Ee(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=Ee(r?e.slice(r):e)}return t}function Me(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Ne(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Pe(){throw Error(`Invariant failed`)}function Fe(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var k=4,Ie=5;function Le(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=a.indexOf(`{`),s;if(o!==-1&&o+1<a.length&&(s=a.indexOf(`}`,o))!==-1){let r=a.charCodeAt(o+1);if(r===45){if(o+2<a.length&&a.charCodeAt(o+2)===36){let e=o+3,r=s;if(e<r)return n[0]=3,n[1]=t+o,n[2]=t+e,n[3]=t+r,n[4]=t+s+1,n[5]=i,n}}else if(r===36){let r=o+1,a=o+2;return a===s?(n[0]=2,n[1]=t+o,n[2]=t+r,n[3]=t+a,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+o,n[2]=t+a,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function Re(e,t,n,r,i,a,o,s){s?.(n);let c=r;{let r=n.fullPath??n.from,s=n.options,l=r.length,u=s?.caseSensitive??e,d=s?.params?.parse??s?.parseParams;for(;c<l;){let e=Le(r,c,t),n,s=c,l=e[5];c=l+1,a++;let f=e[0];switch(f){case 0:{let t=r.substring(e[2],e[3]),o=t,s;u?s=i.static??=new Map:(o=t.toLowerCase(),s=i.staticInsensitive??=new Map);let c=s.get(o);if(c)n=c;else{let e=Be(r);e.parent=i,e.depth=a,n=e,s.set(o,e)}break}case 1:case 3:case 2:{let t=r.substring(s,e[1]),c=r.substring(e[4],l),p=u&&!!(t||c);u||(t=t.toLowerCase(),c=c.toLowerCase());let m=f===1?i.dynamic:f===3?i.optional:i.wildcard,h=f!==2&&!d&&m?.find(e=>!e.parse&&e.caseSensitive===p&&e.prefix===t&&e.suffix===c);if(h)n=h;else{let e=Ve(f,r,p,t,c);n=e,e.parent=i,e.depth=a;let s;s=f===1?i.dynamic??=[]:f===3?i.optional??=[]:i.wildcard??=[],s.push(e),s.length===2&&o?.push(s)}break}}i=n}if(d&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=Be(r);e.kind=Ie,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let f=(n.path||!n.children)&&!n.isRoot;if(f&&r.endsWith(`/`)){let e=Be(r);e.kind=k,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=d??null,i.priority=s?.params?.priority??0,f&&!i.route&&(i.route=n,i.fullPath=r)}if(n.children)for(let r of n.children)Re(e,t,r,c,i,a,o,s)}function ze(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Be(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function Ve(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function He(e,t){let n=Be(`/`),r=new Uint16Array(6),i=[];for(let t of e)Re(!1,r,t,1,n,0,i);for(let e of i)e.sort(ze);t.masksTree=n,t.flatCache=Fe(1e3)}function Ue(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=Je(e,t.masksTree);return t.flatCache.set(e,r),r}function We(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=Be(`/`),Re(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),Je(r,o,n)}function Ge(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=Je(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=Xe(a.route)),t.matchCache.set(r,a),a}function Ke(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function qe(e,t=!1,n){let r=Be(e.fullPath),i=new Uint16Array(6),a=[],o={},s={},c=0;Re(t,i,e,1,r,0,a,e=>{if(n?.(e,c),e.id in o&&Pe(),o[e.id]=e,c!==0&&e.path){let t=Ke(e.fullPath);(!s[t]||e.fullPath.endsWith(`/`))&&(s[t]=e)}c++});for(let e of a)e.sort(ze);return{processedTree:{segmentTree:r,singleCache:Fe(1e3),matchCache:Fe(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:s}}function Je(e,t,n=!1){let r=e.split(`/`),i=Qe(e,r,t,n);if(!i)return null;let[a]=Ye(e,r,i);return{route:i.node.route,rawParams:a}}function Ye(e,t,n){let r=Ze(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===k)break;if(u.kind===Ie){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix.length;if(e.charCodeAt(t)===123){let n=u.suffix.length,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix.length,r=u.suffix.length,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function Xe(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Ze(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Qe(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!fe(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!nt(l,n))continue;if(i.parse){if(!tt(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==k&&nt(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===k||i.kind===2)&&nt(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(tt(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&et(f,o))return n;nt(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+$e(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+$e(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+$e(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+$e(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function $e(e,t){return 2**(e-t-1)}function et(e,t){return e===2**(t-1)-1}function tt(e,t,n){let r,i;try{[r,i]=Ye(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function nt(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===k)>(e.node.kind===k)||t.node.kind===k==(e.node.kind===k)&&t.node.depth>e.node.depth)))}function rt(e){return it(e.filter(e=>e!==void 0).join(`/`))}function it(e){return e.replace(/\/{2,}/g,`/`)}function at(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function ot(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function st(e){return ot(at(e))}function ct(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function lt({base:e,to:t,trailingSlash:n=`never`,cache:r}){if(t.includes(`//`)&&(t=it(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=it(e)),o=e.split(`/`);o.length>1&&fe(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(fe(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?it(s):s)||`/`;return a&&r&&r.set(a,c),c}function ut(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function dt(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>pt(e,n)).join(`/`):pt(r,n):r}function ft({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=Le(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=dt(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=dt(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=dt(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function pt(e,t){let n=encodeURIComponent(e);return t?.(n)??n}var mt=`Error preloading route! ☝️`;function ht({children:e,fallback:t=null}){return(0,E.jsx)(T.Fragment,{children:gt()?e:t})}function gt(){return T.useSyncExternalStore(_t,()=>!0,()=>!1)}function _t(){return()=>{}}var vt=T.createContext(null);function yt(e){return T.useContext(vt)}var bt=r((e=>{var n=t();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useState,o=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=n.useSyncExternalStore===void 0?f:n.useSyncExternalStore})),xt=r(((e,t)=>{t.exports=bt()})),St=r((e=>{var n=t(),r=xt();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=r.useSyncExternalStore,s=n.useRef,c=n.useEffect,l=n.useMemo,u=n.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),Ct=r(((e,t)=>{t.exports=St()}))();function wt(e,t){return e===t}function Tt(e,t=e=>e,n){let r=n?.compare??wt,i=(0,T.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,T.useCallback)(()=>e.get(),[e]);return(0,Ct.useSyncExternalStoreWithSelector)(i,a,a,t,r)}function Et(e){let t=T.useRef(e);return O(t.current,e,{ignoreUndefined:!1})||(t.current=e),t.current}function Dt(e,t){return e[0]===t[0]&&e[1]===t[1]}function Ot(e,t){let n=typeof e==`string`&&Oe(e);if(n)return t.has(n)?e:null}function kt(e,t,n,r,i){let a=ct(e.pathname,r),o=ct(t.pathname,r);return(n?.exact?a!==o:!a.startsWith(o)||a.length!==o.length&&a[o.length]!==`/`)||(n?.includeSearch??!0)&&!O(e.search,t.search,{partial:!n?.exact,ignoreUndefined:!n?.explicitUndefined})?!1:!n?.includeHash||i&&e.hash===t.hash}function At(e,t){let n=yt(),r=de(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:s,preload:c,preloadDelay:l,preloadIntentProximity:u,hashScrollIntoView:d,replace:f,startTransition:p,resetScroll:m,viewTransition:h,children:g,target:_,disabled:v,style:y,className:b,onClick:x,onBlur:S,onFocus:ee,onMouseEnter:C,onMouseLeave:te,onTouchStart:w,ignoreBlocker:ne,params:re,search:E,hash:ie,state:ae,mask:oe,reloadDocument:se,unsafeRelative:ce,from:le,_fromLocation:fe,...me}=e,he=s,ge=gt(),_e=Et(e.search),ve=Et(e.params),ye=Et(o),D=T.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,_e,ve,e.state,e.mask,e.unsafeRelative]),be=T.useCallback(e=>{let t=Ot(he,n.protocolAllowlist);if(t!==void 0)return[t??void 0];let r=n.buildLocation({_fromLocation:e,...D}),i=Rt(r,n,v);return[i,!v&&(!i||Oe(i))?void 0:kt(e,r,ye,n.basepath,ge)]},[ye,v,ge,D,n,he]),[xe,Se]=Tt(n.stores.location,be,{compare:Dt}),O=Se===void 0?xe:void 0,Ce=v||xe===void 0,we=T.useRef(!1),Te=e.reloadDocument||O||Ce?!1:c??n.options.defaultPreload,Ee=l??n.options.defaultPreloadDelay??0,De=T.useCallback(()=>{n.preloadRoute(D).catch(e=>{console.warn(e),console.warn(mt)})},[n,D]),ke=T.useCallback(e=>{if(!e){It(r);return}if(!(e.isIntersecting??Te===`intent`)){e.isIntersecting===!1&&It(r);return}if(!Ee){De();return}Ft.has(r)||Ft.set(r,setTimeout(()=>{Ft.delete(r),De()},Ee))},[De,r,Te,Ee]);if(ue(r,ke,Te!==`viewport`),T.useEffect(()=>{we.current||Te===`render`&&(De(),we.current=!0)},[De,Te]),O)return{...me,ref:r,href:O,...g&&{children:g},..._&&{target:_},...v&&{disabled:v},...y&&{style:y},...b&&{className:b},...x&&{onClick:x},...S&&{onBlur:S},...ee&&{onFocus:ee},...C&&{onMouseEnter:C},...te&&{onMouseLeave:te},...w&&{onTouchStart:w}};let Ae=pe(Se?i:a,{})??(Se?Mt:jt),je=Ae.className,Me=b?je?`${b} ${je}`:b:je,Ne=Ae.style,Pe=y&&Ne?{...y,...Ne}:y||Ne,Fe=e=>{let t=e.currentTarget.getAttribute(`target`),r=_===void 0?t:_;!Ce&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0&&(e.preventDefault(),n.navigate({...D,replace:f,resetScroll:m,hashScrollIntoView:d,startTransition:p,viewTransition:h,ignoreBlocker:ne}))},k=()=>{Te===`intent`&&De()},Ie=()=>{Te===`intent`&&It(r)};return{...me,...Ae,href:xe,ref:r,onClick:Lt(x,Fe),onBlur:Lt(S,Ie),onFocus:Lt(ee,ke),onMouseEnter:Lt(C,ke),onMouseLeave:Lt(te,Ie),onTouchStart:Lt(w,k),disabled:!!Ce,target:_,...Pe&&{style:Pe},...Me&&{className:Me},...Ce&&Nt,...Se&&Pt}}var jt={},Mt={className:`active`},Nt={role:`link`,"aria-disabled":!0},Pt={"data-status":`active`,"aria-current":`page`},Ft=new WeakMap,It=e=>{clearTimeout(Ft.get(e)),Ft.delete(e)},Lt=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function Rt(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!Ae(i,t.protocolAllowlist))return i}var zt=T.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=At(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;a=t}return T.createElement(n||`a`,a,o)}),Bt=T.createContext(void 0),Vt=e=>{let t=T.useContext(Bt);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Ht=({client:e,children:t})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,E.jsx)(Bt.Provider,{value:e,children:t})),Ut={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Wt=new class{#e=Ut;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Gt(e){setTimeout(e,0)}var Kt=typeof window>`u`||`Deno`in globalThis;function qt(){}function Jt(e,t){return typeof e==`function`?e(t):e}function Yt(e){return typeof e==`number`&&e>=0&&e!==1/0}function Xt(e,t){return Math.max(e+(t||0)-Date.now(),0)}function A(e,t){return typeof e==`function`?e(t):e}function Zt(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==$t(o,t.options))return!1}else if(!tn(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Qt(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(en(t.options.mutationKey)!==en(a))return!1}else if(!tn(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function $t(e,t){return(t?.queryKeyHashFn||en)(e)}function en(e){return JSON.stringify(e,(e,t)=>sn(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function tn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!tn(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!tn(e[r],t[r]))return!1;return!0}return!1}var nn=Object.prototype.hasOwnProperty;function rn(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=on(e)&&on(t);if(!r&&!(sn(e)&&sn(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:nn.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=rn(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function an(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function on(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function sn(e){if(!cn(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!cn(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function cn(e){return Object.prototype.toString.call(e)===`[object Object]`}function ln(e){return new Promise(t=>{Wt.setTimeout(t,e)})}function un(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:rn(e,t)}function dn(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function fn(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var pn=Symbol();function mn(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===pn?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function hn(e,t){return typeof e==`function`?e(...t):!!e}function gn(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var _n=()=>Kt,vn=()=>_n(),yn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},bn=new class extends yn{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},xn=Gt;function Sn(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=xn,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Cn=Sn(),wn=new class extends yn{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Tn(e){return Math.min(1e3*2**e,3e4)}function En(e){return(e??`online`)!==`online`||wn.isOnline()}var Dn=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function On(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(qt);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new Dn(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>bn.isFocused()&&(e.networkMode===`always`||wn.isOnline())&&e.canRun(),p=()=>En(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=()=>new Promise(t=>{r=e=>{(c()||f())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(vn()?0:3),a=e.retryDelay??Tn,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!s){h(r);return}n++,e.onFail?.(n,r),ln(o).then(()=>f()?void 0:g()).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g().then(_),s)}}var kn=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Yt(this.gcTime)&&(this.#e=Wt.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vn()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Wt.clearTimeout(this.#e),this.#e=void 0)}};function An(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{gn(e,()=>t.signal,()=>n=!0)},u=mn(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?fn:dn;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Mn:jn,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:jn(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function jn(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Mn(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function Nn(e,t){return t?jn(e,t)!=null:!1}function Pn(e,t){return!t||!e.getPreviousPageParam?!1:Mn(e,t)!=null}var Fn=class extends kn{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Rn(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Rn(this.options);e.data!==void 0&&(this.setState(Ln(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=un(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(qt).catch(qt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>A(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===pn||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>A(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Xt(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=mn(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?An(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=On({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Dn&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Dn){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...In(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Ln(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Cn.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function In(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:En(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Ln(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Rn(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var zn=class extends yn{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Vn(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Hn(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Hn(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof A(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!an(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Un(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||A(this.options.enabled,this.#t)!==A(t.enabled,this.#t)||A(this.options.staleTime,this.#t)!==A(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||A(this.options.enabled,this.#t)!==A(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return an(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(qt)),t}#h(e){return!vn()&&A(this.options.enabled,this.#t)!==!1&&Yt(e)}#g(){this.#b();let e=A(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=Xt(this.#r.dataUpdatedAt,e)+1;this.#u=Wt.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=Wt.setInterval(()=>{(this.options.refetchIntervalInBackground||bn.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(Wt.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(Wt.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Vn(e,t),o=i&&Un(e,n,t,r);(a||o)&&(l={...l,...In(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=un(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=un(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Wn(e,t),refetch:this.refetch,isEnabled:A(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),an(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();Cn.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function Bn(e,t){return A(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||A(t.retryOnMount,e)!==!1)}function Vn(e,t){return Bn(e,t)||e.state.data!==void 0&&Hn(e,t,t.refetchOnMount)}function Hn(e,t,n){if(A(t.enabled,e)!==!1&&A(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Wn(e,t)}return!1}function Un(e,t,n,r){return(e!==t||A(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Wn(e,n)}function Wn(e,t){return A(t.enabled,e)!==!1&&e.isStaleByTime(A(t.staleTime,e))}var Gn=T.createContext(!1),Kn=()=>T.useContext(Gn);Gn.Provider;function qn(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Jn=T.createContext(qn()),Yn=()=>T.useContext(Jn),Xn=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?hn(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Zn=e=>{T.useEffect(()=>{e.clearReset()},[e])},Qn=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||hn(n,[e.error,r])),$n=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},er=(e,t)=>e?.suspense&&t.isPending,tr=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function nr(e,t,n){let r=Kn(),i=Yn(),a=Vt(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,$n(o),Xn(o,i,s),Zn(i);let[l]=T.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(T.useSyncExternalStore(T.useCallback(e=>{let t=d?l.subscribe(Cn.batchCalls(e)):qt;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),T.useEffect(()=>{l.setOptions(o)},[o,l]),er(o,u))throw tr(o,l,i);if(Qn({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function rr(e,t){return nr(e,zn,t)}function ir(e){return e}function ar(e){return e}var or={center:{kGNEyG:`x6s0dn4`,$$css:!0},end:{kGNEyG:`xuk3077`,$$css:!0},start:{kGNEyG:`x1cy8zhl`,$$css:!0},stretch:{kGNEyG:`x1qjc9v5`,$$css:!0}},sr={start:{kjj79g:`x1nhvcw1`,$$css:!0},center:{kjj79g:`xl56j7k`,$$css:!0},end:{kjj79g:`x13a6bvl`,$$css:!0},between:{kjj79g:`x1qughib`,$$css:!0},around:{kjj79g:`x1l1ennw`,$$css:!0},evenly:{kjj79g:`xaw8158`,$$css:!0}},cr={horizontal:{kXwgrk:`x1q0g3np`,$$css:!0},vertical:{kXwgrk:`xdt5ytf`,$$css:!0}},lr={nowrap:{kwnvtZ:`xozqiw3`,$$css:!0},wrap:{kwnvtZ:`x1a02dak`,$$css:!0},"wrap-reverse":{kwnvtZ:`x8hhl5t`,$$css:!0}},ur={stack:{k1xSpc:`x78zum5`,$$css:!0}},dr={0:{k1C7PZ:`x1o57wo1`,khm7nJ:`x6yxi7o`,$$css:!0},1:{k1C7PZ:`x1lfs0n9`,khm7nJ:`x1ngg2t4`,$$css:!0},2:{k1C7PZ:`xak3so`,khm7nJ:`x1x7z4sm`,$$css:!0},3:{k1C7PZ:`xewh9hi`,khm7nJ:`x4olc9o`,$$css:!0},4:{k1C7PZ:`xty4p9g`,khm7nJ:`xtx9w7w`,$$css:!0},5:{k1C7PZ:`x1eqhezk`,khm7nJ:`x1iu6piu`,$$css:!0},6:{k1C7PZ:`x3qlgwd`,khm7nJ:`xczp1bk`,$$css:!0},8:{k1C7PZ:`xicv188`,khm7nJ:`xgx0vcf`,$$css:!0},10:{k1C7PZ:`x1p37tyl`,khm7nJ:`x1xpicb7`,$$css:!0},"0.5":{k1C7PZ:`x1kihgfc`,khm7nJ:`x1tw44j4`,$$css:!0},"1.5":{k1C7PZ:`x1thn6ci`,khm7nJ:`xhq53yo`,$$css:!0}};function fr({crossAlign:e,direction:t,gap:n,mainAlign:r,wrap:i}){return[ur.stack,cr[t],n!=null&&dr[n],e!=null&&or[e],r!=null&&sr[r],i!=null&&lr[i]]}var pr={scrollable:{kVQacm:`xysyzu8`,$$css:!0}};function mr({direction:e=`vertical`,hAlign:t,vAlign:r,justify:o,align:d,gap:f,padding:p,paddingInline:m,paddingInlineStart:h,paddingInlineEnd:g,paddingBlock:_,paddingBlockStart:v,paddingBlockEnd:y,isScrollable:b,width:x,height:S,maxWidth:ee,minHeight:C,wrap:te,as:w=`div`,xstyle:ne,className:re,style:E,children:ie,ref:ae,...oe}){let se=t??(e===`horizontal`?o:d),ce=r??(e===`horizontal`?d:o),le=e===`horizontal`?se:ce,ue=e===`horizontal`?ce:se,de=h??m??p,fe=g??m??p,pe=v??_??p,me=y??_??p,he=n(...fr({direction:e,crossAlign:ue,mainAlign:le,gap:f,wrap:te}),de!=null&&l[de],fe!=null&&a[fe],pe!=null&&c[pe],me!=null&&i[me],b&&pr.scrollable,ne),ge={...x!=null&&{width:typeof x==`number`?`${x}px`:x},...S!=null&&{height:typeof S==`number`?`${S}px`:S},...ee!=null&&{maxWidth:typeof ee==`number`?`${ee}px`:ee},...C!=null&&{minHeight:typeof C==`number`?`${C}px`:C}};return(0,T.createElement)(w,{ref:ae,...u(s(`stack`,{direction:e,gap:f,wrap:te}),he,re,{...E,...ge}),...oe},ie)}mr.displayName=`Stack`;function hr({ref:e,justify:t,align:n,hAlign:r,vAlign:i,...a}){return(0,E.jsx)(mr,{...a,direction:`vertical`,hAlign:r??n,vAlign:i??t,ref:e})}hr.displayName=`VStack`;function gr({data:e,size:t}){return(0,E.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`${t/16}rem`,height:`${t/16}rem`,style:{flexShrink:0},fill:`none`,"aria-hidden":`true`,focusable:`false`,children:e.map(([e,t],n)=>(0,T.createElement)(e,{...t,key:n}))})}function _r(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 vr(e,t=`|`){return e.map(e=>Br(e)).join(t)}function yr(e,t){return typeof t==`bigint`?t.toString():t}var br=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 xr(e){return new br(e)}function Sr(e){return e==null}function Cr(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function wr(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}function j(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Tr(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function M(e){return Tr(e._zod.def)??e._zod.def.shape}function Er(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return j(this,t,e),e},enumerable:!0,configurable:!0})}function Dr(e,t,n){t in e?j(e,t,n):e[t]=n}function Or(e,t,n,r){let i=M(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?Er(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):Dr(e,a,r?r(n.value,a):n.value))}}function kr(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?Er(e,n,()=>t[n]):Dr(e,n,r.value))}}function N(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Ar(e){return JSON.stringify(e)}function jr(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Mr=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Nr(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Pr=xr(()=>{if(R.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Fr(e){if(Nr(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Nr(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function Ir(e){return Fr(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Lr=new Set([`string`,`number`,`symbol`]);function Rr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function zr(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function P(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 Br(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Vr(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Hr={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Ur={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Wr(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 Or(i,e,Gr(e,t)),zr(e,N(n,{shape:i,checks:[]}))}function Gr(e,t){let n=M(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 Kr(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(Gr(e,t)),a={};return Or(a,e,Reflect.ownKeys(M(e)).filter(e=>!i.has(e))),zr(e,N(n,{shape:a,checks:[]}))}function qr(e,t){if(!Fr(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=M(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 zr(e,N(e._zod.def,{shape:Jr(e,t)}))}function Jr(e,t){let n={};return Or(n,e,Reflect.ownKeys(M(e))),kr(n,t),n}function Yr(e,t){if(!Fr(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return zr(e,N(e._zod.def,{shape:Jr(e,t)}))}function Xr(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 Or(n,e,Reflect.ownKeys(M(e))),Or(n,t,Reflect.ownKeys(M(t))),zr(e,N(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Zr(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(Gr(t,n)):void 0,o={};return Or(o,t,Reflect.ownKeys(M(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),zr(t,N(t._zod.def,{shape:o,checks:[]}))}function Qr(e,t,n){let r=n?new Set(Gr(t,n)):void 0,i={};return Or(i,t,Reflect.ownKeys(M(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),zr(t,N(t._zod.def,{shape:i}))}function F(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 $r(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 ei(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function ti(e){return typeof e==`string`?e:e?.message}function ni(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function ri(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:ti(e.inst?._zod.def?.error?.(e))??ti(a?.(e))??ti(t?.error?.(e))??ti(n.customError?.(e))??ti(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 ii=/[\uD800-\uDBFF]/;function ai(e){let t=e.length;if(!ii.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 oi(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function si(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 ci(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function li(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):pi(e,n,r.value)}}function ui(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function di(e,t,n){return ui(e,t,n,!1)}function fi(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return ui(this,n,r(this))},set(e){ui(this,n,e)}})}return t}function pi(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:ui(this,t,n.bind(this))},set(e){ui(this,t,e)}})}function mi(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var hi,gi=!1,_i={configurable:!0,get(){gi=!0}};function I(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&hi!==e._zod){hi=void 0;return}hi=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,_i);let e=gi;gi=!1;try{let r=n(this);return gi?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),gi||=e,r}catch(n){throw delete this[t],gi||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function vi(e,t,n,r){let i=mi(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 yi=`~constantCatch`;function bi(e){let t=()=>e;return t[yi]=!0,t}var xi,Si={value:void 0,enumerable:!1},Ci=`captureStackTrace`in Error?Error:null;function wi(e){let t=Ci;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Ci=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function L(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){Si.value=new a(r);try{Object.defineProperty(n,"_zod",Si)}finally{Si.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),li(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?wi(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 Ti=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Ei=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(xi=globalThis).__zod_globalConfig??(xi.__zod_globalConfig={});var R=globalThis.__zod_globalConfig;function Di(e){return e&&Object.assign(R,e),R}function Oi(){let e=this._zod;return e.message??=JSON.stringify(e.def,yr,2),e.message}function ki(e){this._zod.message=e}var Ai={get:Oi,set:ki,enumerable:!0,configurable:!0},ji={value:void 0,enumerable:!1},Mi=new WeakSet([Object.prototype,Error.prototype]),Ni=(e,t)=>{e.name=`$ZodError`,ji.value=t,Object.defineProperty(e,"issues",ji),ji.value=void 0,Object.defineProperty(e,"message",Ai);let n=Object.getPrototypeOf(e);Mi.has(n)||(Mi.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})}}))},Pi=L(`$ZodError`,Ni);L(`$ZodError`,Ni,void 0,{Parent:Error});function Fi(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 Ii(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Fi(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Li(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 Ri(e,t){return{callee:t?.callee??e,Err:t?.Err}}var zi=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 Ti;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>ri(e,o,Di())));throw Mr(n,a?.callee??t),n}return s.value};return t},Bi=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=>ri(e,o,Di())));throw Mr(n,a?.callee??t),n}return s.value};return t},Vi=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 Ti;return a.issues.length?Hi(e,a.issues,i):{success:!0,data:a.value}};function Hi(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>ri(e,n,Di()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Ui=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?Hi(e,a.issues,i):{success:!0,data:a.value}},Wi=Symbol.for(`zod.compile.invalid`),Gi=Symbol.for(`zod.compile.fallback`),Ki=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==Wi)return!0;if(r.definite===!0&&n===void 0)return!1}return qi(e,t,n)});function qi(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Gi]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new Ti;return a.issues.length===0}var Ji=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},Yi=e=>{let t=zi(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,Ri(n,a))};return n},Xi=e=>{let t=zi(e),n=(e,r,i,a)=>t(e,r,i,Ri(n,a));return n},Zi=e=>{let t=Bi(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,Ri(n,a))};return n},Qi=e=>{let t=Bi(e),n=async(e,r,i,a)=>await t(e,r,i,Ri(n,a));return n},$i=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Vi(e)(t,n,i)},ea=e=>(t,n,r)=>Vi(e)(t,n,r),ta=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ui(e)(t,n,i)},na=e=>async(t,n,r)=>Ui(e)(t,n,r),ra=/^[cC][0-9a-z]{6,}$/,ia=/^[0-9a-z]+$/,aa=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,oa=/^[0-9a-vA-V]{20}$/,sa=/^[A-Za-z0-9]{27}$/,ca=/^[a-zA-Z0-9_-]{21}$/;function la(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var ua=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,da=/^([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})$/,fa=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)$/,pa=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ma=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function ha(){return new RegExp(ma,`u`)}var ga=/^(?:(?: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])$/,_a=/^(([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}|:))$/,va=/^((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])$/,ya=/^(([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])$/,ba=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,xa=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Sa=/^https?$/,Ca=/^\+[1-9]\d{6,14}$/,wa=`(?:(?:\\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 Ta(e){return RegExp(`^${e}$`)}var Ea=Ta(wa);function Da(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 Oa(e){return RegExp(`^${Da(e)}$`)}function ka(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Da({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Da({precision:e.precision})}`:n;return RegExp(`^${wa}T(?:${r})$`)}var Aa=/^[\s\S]{0,}$/,ja=/^-?\d+(?:\.\d+)?$/,Ma=/^(?:true|false)$/i,Na=/^null$/i,Pa=/^[^A-Z]*$/,Fa=/^[^a-z]*$/,z=L(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Ia=e=>{let t=e.value;return!Sr(t)&&t.length!==void 0},La={number:`number`,bigint:`bigint`,object:`date`},Ra=L(`$ZodCheckLessThan`,(e,t)=>{z.init(e,t);let n=La[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:La[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})}}),za=L(`$ZodCheckGreaterThan`,(e,t)=>{z.init(e,t);let n=La[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:La[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})}}),Ba=L(`$ZodCheckMultipleOf`,(e,t)=>{z.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):wr(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})}}),Va=L(`$ZodCheckNumberFormat`,(e,t)=>{z.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Hr[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})}}),Ha=L(`$ZodCheckMaxLength`,(e,t)=>{var n;z.init(e,t),(n=e._zod.def).when??(n.when=Ia),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?ai(r):i)<=t.maximum)return;let a=oi(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ua=L(`$ZodCheckMinLength`,(e,t)=>{var n;z.init(e,t),(n=e._zod.def).when??(n.when=Ia),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?ai(r):i)>=t.minimum)return;let a=oi(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Wa=L(`$ZodCheckLengthEquals`,(e,t)=>{var n;z.init(e,t),(n=e._zod.def).when??(n.when=Ia),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?ai(r):i;if(a===t.length)return;let o=oi(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})}}),Ga=L(`$ZodCheckStringFormat`,(e,t)=>{var n,r;z.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=()=>{})}),Ka=L(`$ZodCheckRegex`,(e,t)=>{Ga.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})}}),qa=L(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Pa,Ga.init(e,t)}),Ja=L(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Fa,Ga.init(e,t)}),Ya=L(`$ZodCheckIncludes`,(e,t)=>{z.init(e,t);let n=Rr(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})}}),Xa=L(`$ZodCheckStartsWith`,(e,t)=>{z.init(e,t);let n=RegExp(`^${Rr(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})}}),Za=L(`$ZodCheckEndsWith`,(e,t)=>{z.init(e,t);let n=RegExp(`.*${Rr(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})}}),Qa=L(`$ZodCheckOverwrite`,(e,t)=>{z.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),$a=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(`
3
- `).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(`
4
- `)}\n};`)(...Object.values(this.closed))}},eo={major:4,minor:6,patch:4},B=L(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=eo;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=F(t),a;for(let o of n){if(o._zod.def.when){if($r(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 Ti;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(ni(t.issues,n,e),i||=F(t,n))});else{if(t.issues.length===n)continue;ni(t.issues,n,e),i||=F(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(F(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new Ti;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 Ti;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return di(this,`~standard`,ro(this))},set"~standard"(e){ui(this,`~standard`,e)}}),to=(e,t)=>e.issues.length?{issues:e.issues.map(e=>ri(e,t,Di()))}:{value:e.value};async function no(e,t){let n={async:!0};return to(await e._zod.run({value:t,issues:[]},n),n)}function ro(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return to(r,n)}catch{}return no(e,t)},vendor:`zod`,version:1}}var io=L(`$ZodString`,(e,t)=>{B.init(e,t),e._zod.pattern=t.pattern??Aa,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}}),V=L(`$ZodStringFormat`,(e,t)=>{Ga.init(e,t),io.init(e,t)}),ao=L(`$ZodGUID`,(e,t)=>{t.pattern??=da,V.init(e,t)}),oo=L(`$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??=fa(e)}else t.pattern??=fa();V.init(e,t)}),so=L(`$ZodEmail`,(e,t)=>{t.pattern??=pa,V.init(e,t)});function co(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function lo(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?co(e)||2:uo(e,t)}function uo(e,t){if(!t.normalize&&t.protocol?.source===Sa.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 fo=/[\t\n\r]/g;function po(e){return e.replace(fo,``)}function mo(e,t){return t.lastIndex=0,t.test(e.hostname)}function ho(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var go=L(`$ZodURL`,(e,t)=>{V.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=lo(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=po(r);return}t.hostname&&!mo(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&&!ho(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:po(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),_o=L(`$ZodEmoji`,(e,t)=>{t.pattern??=ha(),V.init(e,t)}),vo=L(`$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?ca:la(t.length),V.init(e,t)}),yo=L(`$ZodCUID`,(e,t)=>{t.pattern??=ra,V.init(e,t)}),bo=L(`$ZodCUID2`,(e,t)=>{t.pattern??=ia,V.init(e,t)}),xo=L(`$ZodULID`,(e,t)=>{t.pattern??=aa,V.init(e,t)}),So=L(`$ZodXID`,(e,t)=>{t.pattern??=oa,V.init(e,t)}),Co=L(`$ZodKSUID`,(e,t)=>{t.pattern??=sa,V.init(e,t)}),wo=L(`$ZodISODateTime`,(e,t)=>{t.pattern??=ka(t),V.init(e,t)}),To=L(`$ZodISODate`,(e,t)=>{t.pattern??=Ea,V.init(e,t)}),Eo=L(`$ZodISOTime`,(e,t)=>{t.pattern??=Oa(t),V.init(e,t)}),Do=L(`$ZodISODuration`,(e,t)=>{t.pattern??=ua,V.init(e,t)}),Oo=L(`$ZodIPv4`,(e,t)=>{t.pattern??=ga,V.init(e,t)}),ko=/^[0-9a-fA-F:.]+$/;function Ao(e){return ko.test(e)?co(`http://[${e}]`):!1}var jo=L(`$ZodIPv6`,(e,t)=>{t.pattern??=_a,V.init(e,t),e._zod.check=n=>{Ao(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Mo=L(`$ZodCIDRv4`,(e,t)=>{t.pattern??=va,V.init(e,t)});function No(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:Ao(n)}var Po=L(`$ZodCIDRv6`,(e,t)=>{t.pattern??=ya,V.init(e,t),e._zod.check=n=>{No(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Fo(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Io=/^[0-9a-zA-Z+/]*={0,2}$/,Lo=L(`$ZodBase64`,(e,t)=>{t.pattern??=Io,V.init(e,t),e._zod.check=n=>{Fo(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Ro=/^[A-Za-z0-9_-]*$/;function zo(e){if(!Ro.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Fo(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Bo=L(`$ZodBase64URL`,(e,t)=>{t.pattern??=Ro,V.init(e,t),e._zod.check=n=>{zo(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Vo=L(`$ZodE164`,(e,t)=>{t.pattern??=Ca,V.init(e,t)});function Ho(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 Uo=L(`$ZodJWT`,(e,t)=>{V.init(e,t),e._zod.check=n=>{Ho(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Wo=L(`$ZodNumber`,(e,t)=>{B.init(e,t),e._zod.pattern=ja,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}}),Go=L(`$ZodNumberFormat`,(e,t)=>{Va.init(e,t),Wo.init(e,t)}),Ko=L(`$ZodBoolean`,(e,t)=>{B.init(e,t),e._zod.pattern=Ma,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}}),qo=L(`$ZodNull`,(e,t)=>{B.init(e,t),e._zod.pattern=Na,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),Jo=L(`$ZodUnknown`,(e,t)=>{B.init(e,t),e._zod.parse=e=>e}),Yo=L(`$ZodNever`,(e,t)=>{B.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Xo(e,t,n){e.issues.length&&t.issues.push(...ei(n,e.issues)),t.value[n]=e.value}var Zo=L(`$ZodArray`,(e,t)=>{B.init(e,t);let n=R.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=>Xo(t,r,e)));else if(Xo(c,r,e),s&&c.issues.length!==0&&F(c))break}return o.length?Promise.all(o).then(()=>r):r}});function Qo(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(...ei(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var $o=[];function es(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:$o,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=Vr(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function ts(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(F(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=>Qo(e,n,i,t,d,f))):Qo(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 ns=L(`$ZodObject`,(e,t)=>{B.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=xr(()=>es(t));I(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)||j(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=Nr,o=t.catchall,s,c=R.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(F(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=>Qo(n,t,e,r,a,o))):Qo(s,t,e,r,a,o)}return o?ts(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),rs=L(`$ZodObjectJIT`,(e,t)=>{ns.init(e,t);let n=e._zod.parse,r=xr(()=>es(t)),i=R.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new $a([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
5
- let ${e}_ab = false;
6
- for (let i = 0; i < ${e}.issues.length; i++) {
7
- const iss = ${e}.issues[i];
8
- iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
9
- payload.issues.push(iss);
10
- if (iss.continue !== true) ${e}_ab = true;
11
- }
12
- if (${e}_ab && ctx && ctx.abortEarly) {
13
- payload.value = newResult;
14
- return payload;
15
- }`;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)}]`:Ar(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(`
16
- const ${n}_present = ${i};
17
- if (!${n}.issues.length || ${n}_present) {
18
- if (${n}.issues.length) {${c(n,r)}
19
- }
20
-
21
- if (${e}) {
22
- newResult[${r}] = ${n}.value;
23
- }
24
- }
25
-
26
- `)}else f?(o.write(`
27
- if (${n}.issues.length) {${c(n,r)}
28
- }
29
- `),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
30
- if (${n}.value !== undefined || ${i}) {
31
- newResult[${r}] = ${n}.value;
32
- }
33
- `)):o.write(`
34
- const ${n}_present = ${i};
35
- if (${n}.issues.length) {${c(n,r)}
36
- }
37
- if (!${n}_present && !${n}.issues.length) {
38
- payload.issues.push({
39
- code: "invalid_type",
40
- expected: "nonoptional",
41
- input: undefined,
42
- path: [${r}]
43
- });
44
- if (ctx && ctx.abortEarly) {
45
- payload.value = newResult;
46
- return payload;
47
- }
48
- }
49
-
50
- if (${n}_present) {
51
- newResult[${r}] = ${n}.value;
52
- }
53
-
54
- `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=Nr,c=!R.jitless,l=c&&Pr.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?ts([],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 is(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=>!F(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=>ri(e,r,Di())))}),t)}var as=L(`$ZodUnion`,(e,t)=>{B.init(e,t),I(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),I(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),I(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)))}),I(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=>Cr(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=>is(t,r,e,i)):is(o,r,e,i)}});function os(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 ss=L(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,as.init(e,t);let n=e._zod.parse;I(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)||j(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=Tr(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=xr(()=>os(t));e._zod.parse=(i,a)=>{let o=i.value;if(!Nr(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)}}),cs=L(`$ZodIntersection`,(e,t)=>{B.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])=>us(e,t,n)):us(e,i,a)}});function ls(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Fr(e)&&Fr(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=ls(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=ls(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 us(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=ls(t.value,n.value);if(!c.valid){if(F(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var ds=L(`$ZodEnum`,(e,t)=>{B.init(e,t);let n=_r(t.entries),r=new Set(n);e._zod.values=r,I(e,`pattern`,e=>{let t=_r(e.def.entries).filter(e=>Lr.has(typeof e));return RegExp(t.length?`^(${t.map(e=>Rr(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}}),fs=L(`$ZodLiteral`,(e,t)=>{B.init(e,t);let n=new Set(t.values);e._zod.values=n,I(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?Rr(e):e?Rr(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}}),ps=L(`$ZodTransform`,(e,t)=>{B.init(e,t),e._zod.optin=`optional`,R.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ei(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 Ti;return n.value=i,n}});function ms(e,t){return e.value=t.issues.length?void 0:t.value,e}var hs=L(`$ZodOptional`,(e,t)=>{B.init(e,t),I(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,I(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),I(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Cr(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=>ms(e,t)):ms(e,r)}return t.innerType._zod.run(e,n)}}),gs=L(`$ZodExactOptional`,(e,t)=>{hs.init(e,t),I(e,`values`,e=>e.def.innerType._zod.values),I(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),_s=L(`$ZodNullable`,(e,t)=>{B.init(e,t),I(e,`optin`,e=>e.def.innerType._zod.optin),I(e,`optout`,e=>e.def.innerType._zod.optout),I(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Cr(t.source)}|null)$`):void 0}),I(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)}),vs=L(`$ZodDefault`,(e,t)=>{B.init(e,t),e._zod.optin=`defaulted`,I(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=>ys(e,t)):ys(r,t)}});function ys(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var bs=L(`$ZodPrefault`,(e,t)=>{B.init(e,t),e._zod.optin=`defaulted`,I(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))}),xs=L(`$ZodNonOptional`,(e,t)=>{B.init(e,t),I(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=>Ss(t,e)):Ss(i,e)}});function Ss(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 Cs(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>ri(e,r,Di()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var ws=L(`$ZodCatch`,(e,t)=>{B.init(e,t),I(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),I(e,`optout`,e=>e.def.innerType._zod.optout),I(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=>Cs(e,r,t,n)):Cs(e,r,t,n)}}),Ts=L(`$ZodPipe`,(e,t)=>{B.init(e,t),I(e,`values`,e=>e.def.in._zod.values),I(e,`optin`,e=>e.def.in._zod.optin),I(e,`optout`,e=>e.def.out._zod.optout),I(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=>Es(e,t.in,n)):Es(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Es(e,t.out,n)):Es(r,t.out,n)}});function Es(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 Ds=L(`$ZodReadonly`,(e,t)=>{B.init(e,t),I(e,`propValues`,e=>e.def.innerType._zod.propValues),I(e,`values`,e=>e.def.innerType._zod.values),I(e,`optin`,e=>e.def.innerType?._zod?.optin),I(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(Os):Os(r)}});function Os(e){return e.memo||(e.value=Object.freeze(e.value)),e}var ks=L(`$ZodCustom`,(e,t)=>{z.init(e,t),B.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=>As(t,n,r,e));As(i,n,r,e)}});function As(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(ci(e))}}var js=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Ms=`~memo`,Ns=[];function Ps(e){return typeof e==`object`&&!!e}function Fs(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Is=new WeakMap,Ls=0,Rs=1,zs=2;function Bs(e,t,n){let r=Is.get(e);if(r!==void 0)return r?zs:Ls;if(t.has(e))return zs;t.add(e);let i=Ls,a=e=>{if(i!==zs&&e?._zod){let r=Bs(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Ls;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Rs:o.value?._zod?Bs(o.value,t,n):Ls;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=Tr(c);s(e?o(e,!0):Rs),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?Bs(r,t,!1):Rs);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),Vs(e,i)}function Vs(e,t){return t!==Rs&&Is.set(e,t===zs),t}function Hs(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var Us,Ws=[],Gs={alloc(e,t,n){let r=Us;if(!r)return n;Us=void 0;let i={value:n,issues:null};return r.set(t.value,i),Ws.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`&&qs(n,e.value))throw new js;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=Bs(e,new Set,!1);if(i===Ls)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===zs||r?n=!0:r=!0}let l=s.value;if(!Ps(l))return t(s,c);let u=c[Ms];u||(u={buckets:new WeakMap,backEdges:void 0},c[Ms]=u);let d;i===c?d=a:(d=Hs(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(...Fs(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;Us=d;let p=Ws.length,m=t(s,c);Us=void 0;let h=Ws.length>p?Ws.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?Fs(e.issues):Ns),e)):(h&&(h.issues=m.issues.length?Fs(m.issues):Ns),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Ks(){return Gs}function qs(e,t){let n=e[Ms]?.backEdges;return n!==void 0&&Ps(t)&&n.has(t)}var Js=()=>{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(si(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Br(e.values[0])}`:`Invalid option: expected one of ${vr(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`:``}: ${vr(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 Ys(){return{localeError:Js()}}var Xs,Zs=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 Qs(){return new Zs}(Xs=globalThis).__zod_globalRegistry??(Xs.__zod_globalRegistry=Qs());var $s=globalThis.__zod_globalRegistry;function ec(e){return e.checks&&=[...e.checks],e}function tc(e,t){return new e(ec({type:`string`,...P(t)}))}function nc(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...P(t)})}function rc(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...P(t)})}function ic(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...P(t)})}function ac(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...P(t)})}function oc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...P(t)})}function sc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...P(t)})}function cc(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...P(t)})}function lc(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...P(t)})}function uc(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...P(t)})}function dc(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...P(t)})}function fc(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...P(t)})}function pc(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...P(t)})}function mc(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...P(t)})}function hc(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...P(t)})}function gc(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...P(t)})}function _c(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...P(t)})}function vc(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...P(t)})}function yc(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...P(t)})}function bc(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...P(t)})}function xc(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...P(t)})}function Sc(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...P(t)})}function Cc(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...P(t)})}function wc(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...P(t)})}function Tc(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...P(t)})}function Ec(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...P(t)})}function Dc(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...P(t)})}function Oc(e,t){return new e(ec({type:`number`,checks:[],...P(t)}))}function kc(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...P(t)})}function Ac(e,t){return new e({type:`boolean`,...P(t)})}function jc(e,t){return new e({type:`null`,...P(t)})}function Mc(e){return new e({type:`unknown`})}function Nc(e,t){return new e({type:`never`,...P(t)})}function Pc(e,t){return new Ra({check:`less_than`,...P(t),value:e,inclusive:!1})}function Fc(e,t){return new Ra({check:`less_than`,...P(t),value:e,inclusive:!0})}function Ic(e,t){return new za({check:`greater_than`,...P(t),value:e,inclusive:!1})}function Lc(e,t){return new za({check:`greater_than`,...P(t),value:e,inclusive:!0})}function Rc(e,t){return new Ba({check:`multiple_of`,...P(t),value:e})}function zc(e,t){return new Ha({check:`max_length`,...P(t),maximum:e})}function Bc(e,t){return new Ua({check:`min_length`,...P(t),minimum:e})}function Vc(e,t){return new Wa({check:`length_equals`,...P(t),length:e})}function Hc(e,t){return new Ka({check:`string_format`,format:`regex`,...P(t),pattern:e})}function Uc(e){return new qa({check:`string_format`,format:`lowercase`,...P(e)})}function Wc(e){return new Ja({check:`string_format`,format:`uppercase`,...P(e)})}function Gc(e,t){return new Ya({check:`string_format`,format:`includes`,...P(t),includes:e})}function Kc(e,t){return new Xa({check:`string_format`,format:`starts_with`,...P(t),prefix:e})}function qc(e,t){return new Za({check:`string_format`,format:`ends_with`,...P(t),suffix:e})}function Jc(e){return new Qa({check:`overwrite`,tx:e})}function Yc(e){return Jc(t=>t.normalize(e))}function Xc(){return Jc(e=>e.trim())}function Zc(){return Jc(e=>e.toLowerCase())}function Qc(){return Jc(e=>e.toUpperCase())}function $c(){return Jc(e=>jr(e))}function el(e,t,n){return new e({type:`array`,element:t,...P(n)})}function tl(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...P(n)})}function nl(e,t){let n=rl(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(ci(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(ci(r))}},e(t.value,t)),t);return n}function rl(e,t){let n=new z({check:`custom`,...P(t)});return n._zod.check=e,n}function il(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&j(e,t,n[t]);return e}function al(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??$s,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 ol(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 H(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,H(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&il(o.schema,c),t.io===`input`&&U(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 sl(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function cl(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}/${sl(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+sl(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>
55
-
56
- 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);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function ll(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;ll(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 ul=new Set([`type`,`properties`,`required`,`additionalProperties`]),dl=[`oneOf`,`anyOf`];function fl(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function pl(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!ul.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]??fl(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}j(n,r,e.length===1?e[0]:pl(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=fl(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 ml(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of ul)if(t in e)return;let n=t.filter(e=>dl.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=pl(t);else{let e=n[0],i=dl.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=>pl([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,il(e,r))}function hl(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)):il(i,s),il(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())ll(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)??[])ml(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)}il(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,j(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:_l(t,`input`,e.processors),output:_l(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function U(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 U(r.element,n);if(r.type===`set`)return U(r.valueType,n);if(r.type===`lazy`)return U(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 U(r.innerType,n);if(r.type===`intersection`)return U(r.left,n)||U(r.right,n);if(r.type===`record`||r.type===`map`)return U(r.keyType,n)||U(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:U(r.in,n)||U(r.out,n);if(r.type===`object`){for(let e in r.shape)if(U(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(U(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(U(e,n))return!0;return!!(r.rest&&U(r.rest,n))}return!1}var gl=(e,t={})=>n=>{let r=al({...n,processors:t});return H(e,r),cl(r,e),hl(r,e)},_l=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=al({...i??{},target:a,io:t,processors:n});return H(e,o),cl(o,e),hl(o,e)},vl=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},yl=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},bl=(e,t)=>{vl(e,`minimum`,t),yl(e,`maximum`,t)},xl=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Sl=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Cl=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},wl=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Tl=(e,t)=>vl(e,`minimum`,t.minimum),El=(e,t)=>yl(e,`maximum`,t.maximum),Dl=e=>(t,n)=>{wl(t,n.format);let[r,i]=e[n.format];vl(t,`minimum`,r),yl(t,`maximum`,i)},Ol={greater_than:(e,t)=>vl(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>yl(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>xl(e,t.value),number_format:Dl(Hr),bigint_format:Dl(Ur),min_length:Tl,max_length:El,length_equals:(e,t)=>bl(e,t.length),min_size:Tl,max_size:El,size_equals:(e,t)=>bl(e,t.size),string_format:(e,t)=>{wl(e,t.format),t.pattern&&Sl(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)=>Cl(e,t.mime)};function W(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Ol[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&vl(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&vl(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&yl(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&yl(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&xl(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Cl(t,i.mime);for(let e of i.patterns??[])Sl(t,e);return t}var kl={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Al=new Map([[Io,ba],[Ro,xa]]),jl=e=>Al.get(e)??e,Ml=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=W(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=kl[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(jl);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}))])}},Nl=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=W(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)):ol(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}))])}},Pl=(e,t,n,r)=>{n.type=`boolean`},Fl=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Il=(e,t,n,r)=>{n.not={}},Ll=(e,t,n,r)=>{let i=e._zod.def,a=_r(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Rl=(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(ol(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(ol(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}},zl=(e,t,n,r)=>{ol(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Bl=(e,t,n,r)=>{ol(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Vl=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=W(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=H(a.element,t,{...r,path:[...r.path,`items`]})};function Hl(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Hl(t.out):t.type===`catch`?Hl(t.innerType):e._zod.optin}var Ul=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&ol(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)j(i.properties,e,H(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`?Hl(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=H(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Wl=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>H(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Gl=(e,t,n,r)=>{let i=e._zod.def,a=H(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=H(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)},Kl=(e,t,n,r)=>{let i=e._zod.def,a=H(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`}]},ql=(e,t,n,r)=>{let i=e._zod.def;H(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Jl=Symbol();function Yl(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(ol(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Jl):JSON.parse(o)}var Xl=(e,t,n,r)=>{let i=e._zod.def;H(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=Yl(i.defaultValue,e,t,n,r);o!==Jl&&(n.default=o)},Zl=(e,t,n,r)=>{let i=e._zod.def;H(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=Yl(i.defaultValue,e,t,n,r);o!==Jl&&(n._prefault=o)},Ql=(e,t,n,r)=>{let i=e._zod.def;H(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{ol(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},$l=(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;H(o,t,r);let s=t.seen.get(e);s.ref=o},eu=(e,t,n,r)=>{let i=e._zod.def;H(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},tu=(e,t,n,r)=>{let i=e._zod.def;H(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},nu=new WeakSet([Object.prototype,Error.prototype]);function ru(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 G=L(`ZodError`,(e,t)=>{Pi.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);nu.has(n)||(nu.add(n),ru(n,`format`,e=>t=>Li(e,t)),ru(n,`flatten`,e=>t=>Ii(e,t)),ru(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,yr,2)}),ru(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,yr,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),iu=zi(G),au=Bi(G),ou=Vi(G),su=Ui(G),cu=Yi(G),lu=Xi(G),uu=Zi(G),du=Qi(G),fu=$i(G),pu=ea(G),mu=ta(G),hu=na(G);function gu(){R.localeError||Di(Ys())}function _u(){R.memoizer||Di({memoizer:Ks()})}var K=L(`ZodType`,(e,t)=>(gu(),B.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(N(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 zr(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Nd(e,t))},superRefine(e,t){return this.check(Pd(e,t))},overwrite(e){return this.check(Jc(e))},optional(){return hd(this)},exactOptional(){return _d(this)},nullable(){return yd(this)},nullish(){return hd(yd(this))},nonoptional(e){return Td(this,e)},array(){return Y(this)},or(e){return ad([this,e])},and(e){return ld(this,e)},transform(e){return kd(this,pd(e))},default(e){return xd(this,e)},prefault(e){return Cd(this,e)},catch(e){return Dd(this,e)},pipe(e){return kd(this,e)},readonly(){return jd(this)},describe(e){let t=this.clone();return $s.add(t,{description:e}),t},meta(...e){if(e.length===0)return $s.get(this);let t=this.clone();return $s.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 di(this,`~standard`,{...ro(this),jsonSchema:{input:_l(this,`input`),output:_l(this,`output`)}})},set"~standard"(e){ui(this,`~standard`,e)},parse:function e(t,n){return iu(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await au(this,t,n,{callee:e})},safeParse(e,t){return ou(this,e,t)},async safeParseAsync(e,t){return su(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){ui(this,`spa`,e)},validate(e,t){return Ki(this,e,t)},validateAsync(e,t){return Ji(this,e,t)},encode:function e(t,n){return cu(this,t,n,{callee:e})},decode:function e(t,n){return lu(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await uu(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await du(this,t,n,{callee:e})},safeEncode(e,t){return fu(this,e,t)},safeDecode(e,t){return pu(this,e,t)},async safeEncodeAsync(e,t){return mu(this,e,t)},async safeDecodeAsync(e,t){return hu(this,e,t)},toJSONSchema(e){return gl(this,{})(e)},get description(){return $s.get(this)?.description},get _def(){return this._zod.def}}),vu=L(`_ZodString`,(e,t)=>{io.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ml(e,t,n,r)},fi({format:e=>W(e).format??null,minLength:e=>W(e).minimum??null,maxLength:e=>W(e).maximum??null},{regex(...e){return this.check(Hc(...e))},includes(...e){return this.check(Gc(...e))},startsWith(...e){return this.check(Kc(...e))},endsWith(...e){return this.check(qc(...e))},min(...e){return this.check(Bc(...e))},max(...e){return this.check(zc(...e))},length(...e){return this.check(Vc(...e))},nonempty(...e){return this.check(Bc(1,...e))},lowercase(e){return this.check(Uc(e))},uppercase(e){return this.check(Wc(e))},trim(){return this.check(Xc())},normalize(...e){return this.check(Yc(...e))},toLowerCase(){return this.check(Zc())},toUpperCase(){return this.check(Qc())},slugify(){return this.check($c())}})),yu=L(`ZodString`,(e,t)=>{io.init(e,t),vu.init(e,t)},{email(e){return this.check(nc(wu,e))},url(e){return this.check(cc(Ou,e))},jwt(e){return this.check(Cc(Uu,e))},emoji(e){return this.check(lc(ku,e))},guid(e){return this.check(rc(Tu,e))},uuid(e){return this.check(ic(Eu,e))},uuidv4(e){return this.check(ac(Eu,e))},uuidv6(e){return this.check(oc(Eu,e))},uuidv7(e){return this.check(sc(Eu,e))},nanoid(e){return this.check(uc(Au,e))},cuid(e){return this.check(dc(ju,e))},cuid2(e){return this.check(fc(Mu,e))},ulid(e){return this.check(pc(Nu,e))},base64(e){return this.check(bc(Bu,e))},base64url(e){return this.check(xc(Vu,e))},xid(e){return this.check(mc(Pu,e))},ksuid(e){return this.check(hc(Fu,e))},ipv4(e){return this.check(gc(Iu,e))},ipv6(e){return this.check(_c(Lu,e))},cidrv4(e){return this.check(vc(Ru,e))},cidrv6(e){return this.check(yc(zu,e))},e164(e){return this.check(Sc(Hu,e))},datetime(e){return this.check(wc(bu,e))},date(e){return this.check(Tc(xu,e))},time(e){return this.check(Ec(Su,e))},duration(e){return this.check(Dc(Cu,e))}});function q(e){return tc(yu,e)}var J=L(`ZodStringFormat`,(e,t)=>{V.init(e,t),vu.init(e,t)}),bu=L(`ZodISODateTime`,(e,t)=>{wo.init(e,t),J.init(e,t)}),xu=L(`ZodISODate`,(e,t)=>{To.init(e,t),J.init(e,t)}),Su=L(`ZodISOTime`,(e,t)=>{Eo.init(e,t),J.init(e,t)}),Cu=L(`ZodISODuration`,(e,t)=>{Do.init(e,t),J.init(e,t)}),wu=L(`ZodEmail`,(e,t)=>{so.init(e,t),J.init(e,t)}),Tu=L(`ZodGUID`,(e,t)=>{ao.init(e,t),J.init(e,t)}),Eu=L(`ZodUUID`,(e,t)=>{oo.init(e,t),J.init(e,t)});function Du(e){return ic(Eu,e)}var Ou=L(`ZodURL`,(e,t)=>{go.init(e,t),J.init(e,t)}),ku=L(`ZodEmoji`,(e,t)=>{_o.init(e,t),J.init(e,t)}),Au=L(`ZodNanoID`,(e,t)=>{vo.init(e,t),J.init(e,t)}),ju=L(`ZodCUID`,(e,t)=>{yo.init(e,t),J.init(e,t)}),Mu=L(`ZodCUID2`,(e,t)=>{bo.init(e,t),J.init(e,t)}),Nu=L(`ZodULID`,(e,t)=>{xo.init(e,t),J.init(e,t)}),Pu=L(`ZodXID`,(e,t)=>{So.init(e,t),J.init(e,t)}),Fu=L(`ZodKSUID`,(e,t)=>{Co.init(e,t),J.init(e,t)}),Iu=L(`ZodIPv4`,(e,t)=>{Oo.init(e,t),J.init(e,t)}),Lu=L(`ZodIPv6`,(e,t)=>{jo.init(e,t),J.init(e,t)}),Ru=L(`ZodCIDRv4`,(e,t)=>{Mo.init(e,t),J.init(e,t)}),zu=L(`ZodCIDRv6`,(e,t)=>{Po.init(e,t),J.init(e,t)}),Bu=L(`ZodBase64`,(e,t)=>{Lo.init(e,t),J.init(e,t)}),Vu=L(`ZodBase64URL`,(e,t)=>{Bo.init(e,t),J.init(e,t)}),Hu=L(`ZodE164`,(e,t)=>{Vo.init(e,t),J.init(e,t)}),Uu=L(`ZodJWT`,(e,t)=>{Uo.init(e,t),J.init(e,t)}),Wu=L(`ZodNumber`,(e,t)=>{Wo.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nl(e,t,n,r),e.isFinite=!0},fi({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=W(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=W(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=W(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>W(e).format??null},{gt(e,t){return this.check(Ic(e,t))},gte(e,t){return this.check(Lc(e,t))},min(e,t){return this.check(Lc(e,t))},lt(e,t){return this.check(Pc(e,t))},lte(e,t){return this.check(Fc(e,t))},max(e,t){return this.check(Fc(e,t))},int(e){return this.check(qu(e))},safe(e){return this.check(qu(e))},positive(e){return this.check(Ic(0,e))},nonnegative(e){return this.check(Lc(0,e))},negative(e){return this.check(Pc(0,e))},nonpositive(e){return this.check(Fc(0,e))},multipleOf(e,t){return this.check(Rc(e,t))},step(e,t){return this.check(Rc(e,t))},finite(){return this}}));function Gu(e){return Oc(Wu,e)}var Ku=L(`ZodNumberFormat`,(e,t)=>{Go.init(e,t),Wu.init(e,t)});function qu(e){return kc(Ku,e)}var Ju=L(`ZodBoolean`,(e,t)=>{Ko.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pl(e,t,n,r)});function Yu(e){return Ac(Ju,e)}var Xu=L(`ZodNull`,(e,t)=>{qo.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fl(e,t,n,r)});function Zu(e){return jc(Xu,e)}var Qu=L(`ZodUnknown`,(e,t)=>{Jo.init(e,t),K.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function $u(){return Mc(Qu)}var ed=L(`ZodNever`,(e,t)=>{Yo.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Il(e,t,n,r)});function td(e){return Nc(ed,e)}var nd=L(`ZodArray`,(e,t)=>{_u(),Zo.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vl(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Bc(e,t))},nonempty(e){return this.check(Bc(1,e))},max(e,t){return this.check(zc(e,t))},length(e,t){return this.check(Vc(e,t))},unwrap(){return this.element}});function Y(e,t){return el(nd,e,t)}var rd=L(`ZodObject`,(e,t)=>{_u(),rs.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ul(e,t,n,r),vi(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return Z(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(N(this._zod.def,{catchall:e}))},passthrough(){return this.clone(N(this._zod.def,{catchall:$u()}))},loose(){return this.clone(N(this._zod.def,{catchall:$u()}))},strict(){return this.clone(N(this._zod.def,{catchall:td()}))},strip(){return this.clone(N(this._zod.def,{catchall:void 0}))},extend(e){return qr(this,e)},safeExtend(e){return Yr(this,e)},merge(e){return Xr(this,e)},pick(e){return Wr(this,e)},omit(e){return Kr(this,e)},partial(...e){return Zr(md,this,e[0])},exactPartial(...e){return Zr(gd,this,e[0],`exactPartial`)},required(...e){return Qr(wd,this,e[0])}});function X(e,t){return new rd({type:`object`,shape:e,catchall:td(),...P(t)})}var id=L(`ZodUnion`,(e,t)=>{as.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wl(e,t,n,r),e.options=t.options});function ad(e,t){return new id({type:`union`,options:e,...P(t)})}var od=L(`ZodDiscriminatedUnion`,(e,t)=>{id.init(e,t),ss.init(e,t)});function sd(e,t,n){return new od({type:`union`,options:t,discriminator:e,...P(n)})}var cd=L(`ZodIntersection`,(e,t)=>{cs.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gl(e,t,n,r)});function ld(e,t){return new cd({type:`intersection`,left:e,right:t})}var ud=L(`ZodEnum`,(e,t)=>{ds.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ll(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 ud({...t,checks:[],...P(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 ud({...t,checks:[],...P(r),entries:i})}});function Z(e,t){return new ud({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...P(t)})}var dd=L(`ZodLiteral`,(e,t)=>{fs.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rl(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 dd({type:`literal`,values:Array.isArray(e)?e:[e],...P(t)})}var fd=L(`ZodTransform`,(e,t)=>{_u(),ps.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bl(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ei(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(ci(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(ci(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function pd(e){return new fd({type:`transform`,transform:e})}var md=L(`ZodOptional`,(e,t)=>{hs.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function hd(e){return new md({type:`optional`,innerType:e})}var gd=L(`ZodExactOptional`,(e,t)=>{gs.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function _d(e){return new gd({type:`optional`,innerType:e})}var vd=L(`ZodNullable`,(e,t)=>{_s.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Kl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function yd(e){return new vd({type:`nullable`,innerType:e})}var bd=L(`ZodDefault`,(e,t)=>{vs.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function xd(e,t){return new bd({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ir(t)}})}var Sd=L(`ZodPrefault`,(e,t)=>{bs.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Cd(e,t){return new Sd({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ir(t)}})}var wd=L(`ZodNonOptional`,(e,t)=>{xs.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ql(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Td(e,t){return new wd({type:`nonoptional`,innerType:e,...P(t)})}var Ed=L(`ZodCatch`,(e,t)=>{ws.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ql(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Dd(e,t){return new Ed({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:bi(t)})}var Od=L(`ZodPipe`,(e,t)=>{Ts.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$l(e,t,n,r),e.in=t.in,e.out=t.out});function kd(e,t){return new Od({type:`pipe`,in:e,out:t})}var Ad=L(`ZodReadonly`,(e,t)=>{Ds.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function jd(e){return new Ad({type:`readonly`,innerType:e})}var Md=L(`ZodCustom`,(e,t)=>{ks.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zl(e,t,n,r)});function Nd(e,t={}){return tl(Md,e,t)}function Pd(e,t){return nl(e,t)}function Fd(e){return wc(bu,e)}var Id=q().min(1).refine(e=>!e.includes(`\0`)&&!/[\uD800-\uDFFF]/u.test(e),`Paths must be lossless Unicode strings without NUL.`),Ld=Id.refine(e=>!e.startsWith(`/`)&&!/^[A-Za-z]:/.test(e)&&!(e.endsWith(`/`)?e.slice(0,-1):e).split(`/`).some(e=>e===`.`||e===`..`||e===``)),Rd=q().regex(/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/).refine(e=>!/^0+$/.test(e)),zd=X({commitChanged:Yu(),trackedChanges:Yu(),untrackedChanges:Yu()}).nullable(),Bd=Ld.refine(e=>!e.endsWith(`/`)),Vd=sd(`kind`,[X({kind:Q(`tracked`),path:Bd,xy:q().regex(/^[.MTAD]{2}$/).refine(e=>e!==`..`),submodule:zd}),X({kind:Q(`unmerged`),path:Bd,xy:Z([`DD`,`AU`,`UD`,`UA`,`DU`,`AA`,`UU`]),submodule:zd}),X({kind:Q(`untracked`),path:Ld,xy:Zu(),submodule:Zu()})]),Hd=ad([X({contract:Q(`repository-status`),version:Q(1),ok:Q(!0),observation:X({id:Du(),startedAt:Fd(),completedAt:Fd(),consistency:Q(`best-effort`)}),repository:X({key:q().regex(/^repo:[0-9a-f]{64}$/),worktreeKey:q().regex(/^worktree:[0-9a-f]{64}$/),rootPath:Id.refine(e=>e.startsWith(`/`)||/^[A-Za-z]:[/\\]/.test(e)||e.startsWith(`\\\\`)),objectFormat:Z([`sha1`,`sha256`])}),head:sd(`state`,[X({state:Q(`branch`),branch:Id,commit:Rd}),X({state:Q(`detached`),branch:Zu(),commit:Rd}),X({state:Q(`unborn`),branch:Id,commit:Zu()})]),changes:Y(Vd),summary:X({staged:qu().nonnegative(),unstaged:qu().nonnegative(),untracked:qu().nonnegative(),conflicted:qu().nonnegative()}),checks:X({state:Q(`not-run`),reason:Q(`git-status-only`)})}).superRefine((e,t)=>{e.head.commit&&e.head.commit.length!==(e.repository.objectFormat===`sha1`?40:64)&&t.addIssue({code:`custom`,message:`Object ID does not match objectFormat.`,path:[`head`,`commit`]});let n=new Set,r={staged:0,unstaged:0,untracked:0,conflicted:0};for(let i of e.changes)n.has(i.path)&&t.addIssue({code:`custom`,message:`Duplicate path.`,path:[`changes`]}),n.add(i.path),i.kind===`unmerged`?r.conflicted++:i.kind===`untracked`?r.untracked++:(i.xy[0]!==`.`&&r.staged++,i.xy[1]!==`.`&&r.unstaged++);for(let n of[`staged`,`unstaged`,`untracked`,`conflicted`])e.summary[n]!==r[n]&&t.addIssue({code:`custom`,message:`Summary does not match changes.`,path:[`summary`,n]})}),X({contract:Q(`repository-status`),version:Q(1),ok:Q(!1),error:X({code:Z([`GIT_NOT_FOUND`,`GIT_CONTEXT_OVERRIDE`,`NOT_A_REPOSITORY`,`UNSUPPORTED_REPOSITORY`,`GIT_UNSUPPORTED`,`GIT_FAILED`,`INVALID_GIT_OUTPUT`,`UNSUPPORTED_PATH_ENCODING`,`REPOSITORY_CHANGED`,`READ_LIMIT_EXCEEDED`]),message:q().min(1)})})]),Ud=X({contract:Q(`browser-session`),version:Q(1),sessionId:Du(),repository:X({key:q().regex(/^repo:[0-9a-f]{64}$/),worktreeKey:q().regex(/^worktree:[0-9a-f]{64}$/)})}),Wd=X({contract:Q(`browser-http-error`),version:Q(1),error:X({code:Z([`BAD_REQUEST`,`FORBIDDEN`,`NOT_FOUND`,`METHOD_NOT_ALLOWED`,`SESSION_CHANGED`,`SERVER_CLOSING`,`INTERNAL_ERROR`]),message:q().min(1)})});sd(`ok`,[X({contract:Q(`skills`),version:Q(1),ok:Q(!0),outcome:Z([`planned`,`installed`,`synced`,`removed`,`not-installed`]),rootPath:q(),agent:Z([`codex`,`claude`]).nullable(),source:Q(`.agents/skills/gitifact-workflow/SKILL.md`),target:Q(`.claude/skills/gitifact-workflow/SKILL.md`).nullable(),sourcePreserved:Yu(),sessionState:Q(`not-observed`)}),X({contract:Q(`skills`),version:Q(1),ok:Q(!1),error:X({code:q(),message:q()})})]);var Gd=X({id:q(),title:q(),body:q()}),Kd=X({email:q(),name:q(),commits:Gu().int().nonnegative(),latest:q()}),qd=X({id:q(),path:q(),title:q(),description:q(),requirements:Y(Gd),design:X({title:q(),body:q(),requirements:Y(q())}).optional(),contributors:Y(Kd),updatedAt:q().nullable()}),Jd=Gd.extend({specId:q(),path:q()}).nullable(),Yd=X({contract:Q(`browser-specs`),version:Q(1),sessionId:q(),head:q().nullable(),observedAt:q(),working:Yu(),features:Y(qd),events:Y(X({key:q(),commit:q(),date:q(),author:q(),email:q(),committer:q(),message:q(),id:q(),kind:Z([`requirement`,`design`]).optional(),types:Y(Z([`created`,`modified`,`moved`,`deleted`])),before:Jd,after:Jd,reasons:Y(q())})),contributors:Y(Kd),contributorsLimited:Yu(),nextCursor:Gu().int().nonnegative().nullable(),boundary:Yu()}),$=class extends Error{code;constructor(e,t){super(e),this.code=t,this.name=`ApiError`}};async function Xd(e,t={}){let n;try{n=await fetch(e,{...t,cache:`no-store`})}catch(e){throw e instanceof Error&&e.name===`AbortError`?e:new $(`로컬 서버에 연결하지 못했습니다. 서버 실행 상태를 확인하세요.`,`NETWORK_ERROR`)}try{return{response:n,data:await n.json()}}catch{throw new $(`서버 응답 형식을 확인할 수 없습니다. CLI와 브라우저 버전을 확인하세요.`,`INVALID_RESPONSE`)}}var Zd=[`browser-session`,1,window.location.origin];function Qd(e){let t=Wd.safeParse(e);throw t.success?new $(t.data.error.message,t.data.error.code):new $(`서버 응답이 지원하는 계약과 일치하지 않습니다.`,`INVALID_RESPONSE`)}var $d=()=>ir({queryKey:Zd,staleTime:0,gcTime:0,retry:!1,refetchOnWindowFocus:!0,queryFn:async({signal:e})=>{let{response:t,data:n}=await Xd(`/api/v1/session`,{signal:e});if(!t.ok)return Qd(n);let r=Ud.safeParse(n);if(!r.success)throw new $(`서버 세션 형식이 호환되지 않습니다.`,`INVALID_RESPONSE`);return r.data}});function ef(e){return[`repository-status`,1,window.location.origin,e.sessionId,e.repository.key,e.repository.worktreeKey]}async function tf(e,t,n){let{response:r,data:i}=await Xd(`/api/v1/status`+(t?`/refresh`:``),{method:t?`POST`:`GET`,headers:{"X-Gitifact-Session":e.sessionId},...n?{signal:n}:{}}),a=Hd.safeParse(i);if(!a.success)return Qd(i);if(!a.data.ok)throw new $(a.data.error.message,a.data.error.code);if(!r.ok)throw new $(`서버 상태와 응답 결과가 일치하지 않습니다.`,`INVALID_RESPONSE`);if(a.data.repository.key!==e.repository.key||a.data.repository.worktreeKey!==e.repository.worktreeKey)throw new $(`다른 checkout의 응답입니다. 다시 연결하세요.`,`SESSION_CHANGED`);return a.data}var nf=e=>ir({queryKey:ef(e),staleTime:5e3,retry:!1,queryFn:({signal:t})=>tf(e,!1,t)}),rf=e=>tf(e,!0);function af(){let e=rr($d());return e.data?(0,E.jsx)(of,{session:e.data}):(0,E.jsx)(w,{type:`supporting`,color:`secondary`,children:`로컬 프로젝트`})}function of({session:e}){let t=rr(nf(e)).data?.repository.rootPath;return(0,E.jsx)(w,{type:`supporting`,color:`secondary`,children:t?.split(/[\/]/).filter(Boolean).at(-1)??`로컬 프로젝트`})}var sf=e=>ar({queryKey:[`browser-specs`,1,window.location.origin,e.sessionId,e.repository.worktreeKey],initialPageParam:{cursor:0,head:``},staleTime:5e3,retry:!1,queryFn:async({signal:t,pageParam:n})=>{let{response:r,data:i}=await Xd(`/api/v1/specs`+(n.cursor?`?cursor=${n.cursor}&head=${n.head}`:``),{signal:t,headers:{"X-Gitifact-Session":e.sessionId}});if(!r.ok)return Qd(i);let a=Yd.safeParse(i);if(!a.success)throw new $(`명세 응답 형식이 호환되지 않습니다.`,`INVALID_RESPONSE`);if(a.data.sessionId!==e.sessionId)throw new $(`서버가 변경됐습니다. 다시 연결하세요.`,`SESSION_CHANGED`);return a.data},getNextPageParam:e=>e.nextCursor===null?void 0:{cursor:e.nextCursor,head:e.head??``}});function cf({ref:e,justify:t,align:n,hAlign:r,vAlign:i,...a}){return(0,E.jsx)(mr,{...a,direction:`horizontal`,hAlign:r??t,vAlign:i??n,ref:e})}cf.displayName=`HStack`;var lf=[[`path`,{d:`M8 7H16.75C18.8567 7 19.91 7 20.6667 7.50559C20.9943 7.72447 21.2755 8.00572 21.4944 8.33329C22 9.08996 22 10.1433 22 12.25C22 15.7612 22 17.5167 21.1573 18.7779C20.7926 19.3238 20.3238 19.7926 19.7779 20.1573C18.5167 21 16.7612 21 13.25 21H12C7.28595 21 4.92893 21 3.46447 19.5355C2 18.0711 2 15.714 2 11V7.94427C2 6.1278 2 5.21956 2.38032 4.53806C2.65142 4.05227 3.05227 3.65142 3.53806 3.38032C4.21956 3 5.1278 3 6.94427 3C8.10802 3 8.6899 3 9.19926 3.19101C10.3622 3.62712 10.8418 4.68358 11.3666 5.73313L12 7`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}]];function uf({size:e=16}){return(0,E.jsx)(gr,{data:lf,size:e})}var df={bar:`_bar_2upas_2`,trail:`_trail_2upas_3`,crumb:`_crumb_2upas_4`};function ff({trail:e,actions:t}){return(0,E.jsxs)(cf,{as:`header`,"aria-label":`현재 위치`,gap:3,className:df.bar,children:[(0,E.jsxs)(cf,{gap:2,className:df.trail,children:[(0,E.jsx)(uf,{}),(0,E.jsx)(af,{}),e.map((t,n)=>(0,E.jsxs)(T.Fragment,{children:[(0,E.jsx)(w,{type:`supporting`,color:`secondary`,children:`/`}),t.to&&n<e.length-1?(0,E.jsx)(zt,{to:t.to,search:t.search??{},className:df.crumb,children:t.label}):(0,E.jsx)(w,{type:`supporting`,maxLines:1,children:t.label})]},n))]}),t]})}export{He as $,tn as A,vt as B,yn as C,Qt as D,$t as E,Ht as F,lt as G,ut as H,Vt as I,ot as J,st as K,zt as L,an as M,hn as N,Zt as O,pn as P,We as Q,Tt as R,bn as S,en as T,ft as U,ht as V,rt as W,Ue as X,Xe as Y,Ge as Z,Pn as _,ce as _t,$d as a,je as at,wn as b,$ as c,pe as ct,fr as d,Ae as dt,qe as et,rr as f,Ce as ft,Nn as g,ye as gt,Fn as h,ke as ht,rf as i,Ne as it,A as j,qt as k,gr as l,Oe as lt,zn as m,ve as mt,cf as n,Pe as nt,ef as o,O as ot,nr as p,fe as pt,at as q,sf as r,De as rt,nf as s,Me as st,ff as t,Fe as tt,hr as u,ge as ut,kn as v,le as vt,Jt as w,Cn as x,On as y,se as yt,yt as z};
@@ -1 +0,0 @@
1
- ._page_6s7z0_1{min-width:0}._content_6s7z0_1{padding:var(--spacing-4);min-width:0;animation:.22s ease-out both _reveal_6s7z0_1}._skeleton_6s7z0_2{min-height:24rem;animation:.2s ease-out both _reveal_6s7z0_1}._skeletonRow_6s7z0_3{padding-block:var(--spacing-3);border-bottom:1px solid var(--color-border);align-items:center}@keyframes _reveal_6s7z0_1{0%{opacity:0;transform:translateY(4px)}}@media (prefers-reduced-motion:reduce){._content_6s7z0_1{animation:none}}._highlight_6s7z0_5{border-inline-start:2px solid var(--color-border-accent,var(--color-border));padding-inline-start:var(--spacing-3)}._featureTable_6s7z0_8 table{border-radius:0}._featureTable_6s7z0_8 tbody tr{cursor:pointer}._featureTitle_6s7z0_10{color:var(--color-text-primary);font-weight:600;text-decoration:none}._featureTitle_6s7z0_10:hover{text-decoration:underline}._featureDetail_6s7z0_12{overflow-wrap:anywhere;min-width:0;padding-inline:var(--spacing-5)}._featureBack_6s7z0_13{color:var(--color-text-secondary);align-self:flex-start;font-size:.8125rem;text-decoration:none}._featureBack_6s7z0_13:hover{text-decoration:underline}._documentHeading_6s7z0_15{padding-block:var(--spacing-4) var(--spacing-6)}._documentHeading_6s7z0_15 h1{letter-spacing:-.025em;font-size:1.75rem;line-height:1.4}._featureDetail_6s7z0_12{padding-top:var(--spacing-6)}._designPanel_6s7z0_18{padding-block:var(--spacing-6)}._documentIndex_6s7z0_19{padding-block:var(--spacing-5);border-block:1px solid var(--color-border)}._documentIndex_6s7z0_19 a{padding-block:var(--spacing-1);text-decoration:none}._featureDetail_6s7z0_12 a:hover{text-decoration:underline}._requirementSection_6s7z0_22{padding-block:var(--spacing-7);border-bottom:1px solid var(--color-border);scroll-margin-top:calc(var(--gitifact-topbar-height) + var(--spacing-4))}._requirementSection_6s7z0_22 h3{font-size:1.25rem;line-height:1.5}._requirementSection_6s7z0_22 p,._requirementSection_6s7z0_22 li{line-height:1.9}._requirementSection_6s7z0_22 a,._documentHeading_6s7z0_15 a{font-size:.8125rem}@media (width<64rem){._documentHeading_6s7z0_15 h1{font-size:1.5rem}}._historyPagination_6s7z0_28{border-top:1px solid var(--color-border);align-items:center}._readingPane_6s7z0_29{background:var(--color-background-surface);overflow-wrap:anywhere;min-width:0}._readingPane_6s7z0_29>*{flex-shrink:0}._readingAuthor_6s7z0_31{justify-content:space-between}._readingSection_6s7z0_32{border-top:1px solid var(--color-border);padding-top:var(--spacing-5)}._readingPane_6s7z0_29 p,._readingPane_6s7z0_29 li{line-height:1.9}._column_6s7z0_37{width:100%;min-width:0;max-width:64rem;margin-inline:auto}._pageTitle_6s7z0_38{padding-inline:var(--spacing-5);padding-block:var(--spacing-6) var(--spacing-2)}._filters_6s7z0_39{padding:var(--spacing-3) var(--spacing-5)}._filtersSticky_6s7z0_40{top:var(--gitifact-topbar-height);z-index:2;background:var(--color-background-surface);border-bottom:1px solid var(--color-border);position:sticky}._timeline_6s7z0_41{margin:0;padding:0;list-style:none;position:relative}._timeline_6s7z0_41:before{content:"";top:var(--spacing-3);bottom:var(--spacing-3);background:var(--color-border);width:2px;position:absolute;inset-inline-start:calc(var(--spacing-3) - 1px)}._entry_6s7z0_43{padding-block:var(--spacing-4);align-items:flex-start;min-width:0;position:relative}._entryContinued_6s7z0_44{padding-top:0}._entryAvatar_6s7z0_45{z-index:1;padding-block:var(--spacing-1);background:var(--color-background-surface);flex-shrink:0;position:relative}._entryBody_6s7z0_46{flex:1;min-width:0}._entryHead_6s7z0_47{justify-content:space-between;align-items:baseline}._entryLine_6s7z0_48{align-items:center;min-width:0}._entryTitle_6s7z0_49{color:var(--color-text-primary);font-weight:500;text-decoration:none}._entryTitle_6s7z0_49:hover,._entryFeature_6s7z0_50:hover{text-decoration:underline}._entryFeature_6s7z0_50{color:var(--color-text-accent);text-decoration:none}._entry_6s7z0_43[aria-current=true] ._entryTitle_6s7z0_49{text-decoration:underline}._drawer_6s7z0_53{scrollbar-width:thin;scrollbar-color:var(--color-border-emphasized,var(--color-border)) transparent;border-radius:0;height:100dvh;max-height:100dvh;margin:0;overflow:hidden}._drawer_6s7z0_53>:first-child{scrollbar-gutter:stable;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--color-border-emphasized,var(--color-border)) transparent;overflow-y:auto}._drawerHeader_6s7z0_55{z-index:1;background:var(--color-background-surface);padding-inline:var(--spacing-5);padding-top:var(--spacing-4);position:sticky;top:0}._drawerHandle_6s7z0_56{z-index:2;position:absolute;inset-block:0;inset-inline-start:0}._person_6s7z0_59{align-items:center}._personName_6s7z0_60{color:var(--color-text-primary);font-size:.8125rem;text-decoration:none}._personName_6s7z0_60:hover{text-decoration:underline}._personCard_6s7z0_62{align-items:flex-start;min-width:0}._personCardBody_6s7z0_63{align-self:stretch;min-width:0}._personStats_6s7z0_64{align-items:center}._personHero_6s7z0_65{padding-block:var(--spacing-4) var(--spacing-6);align-items:center}._personActivityRow_6s7z0_66{padding-block:var(--spacing-3);border-bottom:1px solid var(--color-border);align-items:center;min-width:0}._personActivityRow_6s7z0_66>:nth-child(3){flex:1;min-width:0}._personSection_6s7z0_68{border-top:1px solid var(--color-border);padding-block:var(--spacing-5) var(--spacing-7)}