fumapress 0.1.35 → 0.1.36

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 (43) hide show
  1. package/dist/lib/cli/index.mjs +1 -1
  2. package/dist/waku/public/assets/Icon-C1lsW0A6.js +1 -0
  3. package/dist/waku/public/assets/{Icon-D2s1si6D.js → Icon-CJyYvzMg.js} +1 -1
  4. package/dist/waku/public/assets/{___.slugs_-DKvPa2nk.js → ___.slugs_-B-3PwilY.js} +3 -3
  5. package/dist/waku/public/assets/{_root-lFueX-1l.js → _root-C-iYL8yW.js} +2 -2
  6. package/dist/waku/public/assets/chevron-right-hYwrlb4_.js +1 -0
  7. package/dist/waku/public/assets/{client-CBEI8rY9.js → client-B4i2splh.js} +1 -1
  8. package/dist/waku/public/assets/client-D7ya4zTK.js +1 -0
  9. package/dist/waku/public/assets/{collapsible-BuNjVR-T.js → collapsible-BK0o4AqC.js} +1 -1
  10. package/dist/waku/public/assets/{createLucideIcon-Dx8fEl1v.js → createLucideIcon-YLHYIeJE.js} +1 -1
  11. package/dist/waku/public/assets/{dist-CfNcH_72.js → dist-CN-yjLyH.js} +1 -1
  12. package/dist/waku/public/assets/{dist-5zSB113r.js → dist-C_O3KiWo.js} +1 -1
  13. package/dist/waku/public/assets/{dist-DxUH5STn.js → dist-D2evd4Yy.js} +1 -1
  14. package/dist/waku/public/assets/{dist-fgL1a0Pj.js → dist-DN5XzmtL.js} +1 -1
  15. package/dist/waku/public/assets/docs-BsqQOLMe.js +1 -0
  16. package/dist/waku/public/assets/{flux-BCJVgCaI.js → flux-Df6a_7N8.js} +1 -1
  17. package/dist/waku/public/assets/{framework-CtqQbB2q.js → framework-BG7fkGZ9.js} +1 -1
  18. package/dist/waku/public/assets/{i18n-CLx-mz86.js → i18n-BOd_bK-C.js} +1 -1
  19. package/dist/waku/public/assets/{index-CZbzZwd9.js → index-DJk6G_x5.js} +2 -2
  20. package/dist/waku/public/assets/{link-item-CC5M5LQI.js → link-item-BbFJ2W59.js} +1 -1
  21. package/dist/waku/public/assets/{merge-refs-B0cNRJJJ.js → merge-refs-2vj-9N_8.js} +1 -1
  22. package/dist/waku/public/assets/{page-B9LfKaBm.js → page-YXvnyVJq.js} +1 -1
  23. package/dist/waku/public/assets/{page-actions-BZhvrOGn.js → page-actions-v9dH_9nQ.js} +1 -1
  24. package/dist/waku/public/assets/{page-BqwZhLF8.js → page-uTml2GgI.js} +1 -1
  25. package/dist/waku/public/assets/{proxy-3OiY6Nn5.js → proxy-Cdj7M4YK.js} +1 -1
  26. package/dist/waku/public/assets/search-DD8Q-mr_.js +1 -0
  27. package/dist/waku/public/assets/{search-default-CY256poQ.js → search-default-D97pROgr.js} +1 -1
  28. package/dist/waku/public/assets/{use-copy-button-DOhjj54K.js → use-copy-button-py8Am23I.js} +1 -1
  29. package/dist/waku/public/assets/{use-on-change-CLiICbWI.js → use-on-change-D-ewV_74.js} +1 -1
  30. package/dist/waku/public/assets/x-C7_M58Z_.js +1 -0
  31. package/dist/waku/server/__vite_rsc_assets_manifest.js +158 -158
  32. package/dist/waku/server/ssr/__vite_rsc_assets_manifest.js +158 -158
  33. package/dist/waku/server/ssr/assets/{page-CaArLWxJ.js → page-CRaj5fis.js} +1 -1
  34. package/dist/waku/server/ssr/assets/{page-Djsq9l6P.js → page-Ca0rPNUt.js} +1 -1
  35. package/dist/waku/server/ssr/assets/{page-actions-UixyJtFK.js → page-actions-Ce5cC139.js} +34 -23
  36. package/dist/waku/server/ssr/index.js +2 -2
  37. package/package.json +3 -3
  38. package/dist/waku/public/assets/Icon-D4kxG4i4.js +0 -1
  39. package/dist/waku/public/assets/chevron-right-BnE_VbwC.js +0 -1
  40. package/dist/waku/public/assets/client-DQxIQ2KZ.js +0 -1
  41. package/dist/waku/public/assets/docs-CVMAGbv3.js +0 -1
  42. package/dist/waku/public/assets/search-DU2pNx2k.js +0 -1
  43. package/dist/waku/public/assets/x-QyI6-aAy.js +0 -1
@@ -63,7 +63,7 @@ async function findConfigPath() {
63
63
  }
64
64
  //#endregion
65
65
  //#region package.json
66
- var version = "0.1.35";
66
+ var version = "0.1.36";
67
67
  //#endregion
68
68
  //#region src/cli/index.ts
69
69
  program.command("init").description("create configuration file").action(async () => {
@@ -0,0 +1 @@
1
+ import{t as e}from"./Icon-CJyYvzMg.js";var t={default:e};export{t as export_c892cc07bec3};
@@ -1 +1 @@
1
- import{a as e}from"./chunk-DZNXM-SG.js";import{u as t}from"./index-CZbzZwd9.js";var n=e(t(),1),r=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),i={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},a=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},o=(0,n.createContext)({}),s=()=>(0,n.useContext)(o),c=(0,n.forwardRef)(({color:e,size:t,strokeWidth:o,absoluteStrokeWidth:c,className:l=``,children:u,iconNode:d,...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,color:_=`currentColor`,className:v=``}=s()??{},y=c??g?Number(o??h)*24/Number(t??m):o??h;return(0,n.createElement)(`svg`,{ref:p,...i,width:t??m??i.width,height:t??m??i.height,stroke:e??_,strokeWidth:y,className:r(`lucide`,v,l),...!u&&!a(f)&&{"aria-hidden":`true`},...f},[...d.map(([e,t])=>(0,n.createElement)(e,t)),...Array.isArray(u)?u:[u]])});export{r as n,c as t};
1
+ import{a as e}from"./chunk-DZNXM-SG.js";import{u as t}from"./index-DJk6G_x5.js";var n=e(t(),1),r=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),i={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},a=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},o=(0,n.createContext)({}),s=()=>(0,n.useContext)(o),c=(0,n.forwardRef)(({color:e,size:t,strokeWidth:o,absoluteStrokeWidth:c,className:l=``,children:u,iconNode:d,...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,color:_=`currentColor`,className:v=``}=s()??{},y=c??g?Number(o??h)*24/Number(t??m):o??h;return(0,n.createElement)(`svg`,{ref:p,...i,width:t??m??i.width,height:t??m??i.height,stroke:e??_,strokeWidth:y,className:r(`lucide`,v,l),...!u&&!a(f)&&{"aria-hidden":`true`},...f},[...d.map(([e,t])=>(0,n.createElement)(e,t)),...Array.isArray(u)?u:[u]])});export{r as n,c as t};
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/core-C1uF6QvU.js","assets/dist-CHKhXvvv.js","assets/ccount-DeutX-gO.js","assets/space-separated-tokens-Bqpy-XNk.js","assets/chunk-DZNXM-SG.js","assets/html-void-elements-CVaJ_hlA.js","assets/zwitch-BxrjjRJo.js","assets/dist-fgL1a0Pj.js","assets/index-CZbzZwd9.js"])))=>i.map(i=>d[i]);
2
- import{a as e,t}from"./chunk-DZNXM-SG.js";import{c as n,s as r,u as i}from"./index-CZbzZwd9.js";import{d as a,f as o,g as s,i as c,l,m as u,n as d,o as f,p,r as m,s as h,t as g}from"./createLucideIcon-Dx8fEl1v.js";import{n as _}from"./framework-CtqQbB2q.js";import{n as ee,r as te,t as ne}from"./merge-refs-B0cNRJJJ.js";import{t as re}from"./search-DU2pNx2k.js";import{t as ie}from"./x-QyI6-aAy.js";import{n as ae}from"./dist-5zSB113r.js";import{t as oe}from"./use-copy-button-DOhjj54K.js";import{_ as v,a as y,c as se,d as ce,f as b,g as x,h as S,i as le,l as C,m as w,n as ue,o as de,p as fe,r as pe,s as me,t as he,v as ge,y as _e}from"./schemas-CMfwGsMz.js";import{C as ve,S as ye,_ as T,a as be,b as xe,c as Se,d as Ce,f as we,g as Te,h as Ee,l as De,m as Oe,o as ke,p as Ae,s as je,t as Me,u as Ne,v as Pe,x as Fe,y as Ie}from"./remark-CaTRcSSz.js";import{n as Le,t as Re}from"./lib-DkNh1mzO.js";import{t as ze}from"./ccount-DeutX-gO.js";var Be=g(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Ve=g(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),He=g(`clipboard`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}]]),Ue=g(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),We=g(`lightbulb`,[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),Ge=g(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),Ke=g(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),qe=g(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),Je=g(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Ye=g(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),Xe=g(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),E=e(i(),1),Ze=`vercel.ai.error`,Qe=Symbol.for(Ze),$e,et,D=class e extends (et=Error,$e=Qe,et){constructor({name:e,message:t,cause:n}){super(t),this[$e]=!0,this.name=e,this.cause=n}static isInstance(t){return e.hasMarker(t,Ze)}static hasMarker(e,t){let n=Symbol.for(t);return typeof e==`object`&&!!e&&n in e&&typeof e[n]==`boolean`&&e[n]===!0}};function tt(e){return e==null?`unknown error`:typeof e==`string`?e:e instanceof Error?e.message:JSON.stringify(e)}var nt=`AI_InvalidArgumentError`,rt=`vercel.ai.error.${nt}`,it=Symbol.for(rt),at,ot,st=class extends (ot=D,at=it,ot){constructor({message:e,cause:t,argument:n}){super({name:nt,message:e,cause:t}),this[at]=!0,this.argument=n}static isInstance(e){return D.hasMarker(e,rt)}},ct=`AI_JSONParseError`,lt=`vercel.ai.error.${ct}`,ut=Symbol.for(lt),dt,ft,pt=class extends (ft=D,dt=ut,ft){constructor({text:e,cause:t}){super({name:ct,message:`JSON parsing failed: Text: ${e}.
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/core-C1uF6QvU.js","assets/dist-CHKhXvvv.js","assets/ccount-DeutX-gO.js","assets/space-separated-tokens-Bqpy-XNk.js","assets/chunk-DZNXM-SG.js","assets/html-void-elements-CVaJ_hlA.js","assets/zwitch-BxrjjRJo.js","assets/dist-DN5XzmtL.js","assets/index-DJk6G_x5.js"])))=>i.map(i=>d[i]);
2
+ import{a as e,t}from"./chunk-DZNXM-SG.js";import{c as n,s as r,u as i}from"./index-DJk6G_x5.js";import{d as a,f as o,g as s,i as c,l,m as u,n as d,o as f,p,r as m,s as h,t as g}from"./createLucideIcon-YLHYIeJE.js";import{n as _}from"./framework-BG7fkGZ9.js";import{n as ee,r as te,t as ne}from"./merge-refs-2vj-9N_8.js";import{t as re}from"./search-DD8Q-mr_.js";import{t as ie}from"./x-C7_M58Z_.js";import{n as ae}from"./dist-C_O3KiWo.js";import{t as oe}from"./use-copy-button-py8Am23I.js";import{_ as v,a as y,c as se,d as ce,f as b,g as x,h as S,i as le,l as C,m as w,n as ue,o as de,p as fe,r as pe,s as me,t as he,v as ge,y as _e}from"./schemas-CMfwGsMz.js";import{C as ve,S as ye,_ as T,a as be,b as xe,c as Se,d as Ce,f as we,g as Te,h as Ee,l as De,m as Oe,o as ke,p as Ae,s as je,t as Me,u as Ne,v as Pe,x as Fe,y as Ie}from"./remark-CaTRcSSz.js";import{n as Le,t as Re}from"./lib-DkNh1mzO.js";import{t as ze}from"./ccount-DeutX-gO.js";var Be=g(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Ve=g(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),He=g(`clipboard`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}]]),Ue=g(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),We=g(`lightbulb`,[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),Ge=g(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),Ke=g(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),qe=g(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),Je=g(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Ye=g(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),Xe=g(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),E=e(i(),1),Ze=`vercel.ai.error`,Qe=Symbol.for(Ze),$e,et,D=class e extends (et=Error,$e=Qe,et){constructor({name:e,message:t,cause:n}){super(t),this[$e]=!0,this.name=e,this.cause=n}static isInstance(t){return e.hasMarker(t,Ze)}static hasMarker(e,t){let n=Symbol.for(t);return typeof e==`object`&&!!e&&n in e&&typeof e[n]==`boolean`&&e[n]===!0}};function tt(e){return e==null?`unknown error`:typeof e==`string`?e:e instanceof Error?e.message:JSON.stringify(e)}var nt=`AI_InvalidArgumentError`,rt=`vercel.ai.error.${nt}`,it=Symbol.for(rt),at,ot,st=class extends (ot=D,at=it,ot){constructor({message:e,cause:t,argument:n}){super({name:nt,message:e,cause:t}),this[at]=!0,this.argument=n}static isInstance(e){return D.hasMarker(e,rt)}},ct=`AI_JSONParseError`,lt=`vercel.ai.error.${ct}`,ut=Symbol.for(lt),dt,ft,pt=class extends (ft=D,dt=ut,ft){constructor({text:e,cause:t}){super({name:ct,message:`JSON parsing failed: Text: ${e}.
3
3
  Error message: ${tt(t)}`,cause:t}),this[dt]=!0,this.text=e}static isInstance(e){return D.hasMarker(e,lt)}},mt=`AI_TypeValidationError`,ht=`vercel.ai.error.${mt}`,gt=Symbol.for(ht),_t,vt,yt=class e extends (vt=D,_t=gt,vt){constructor({value:e,cause:t,context:n}){let r=`Type validation failed`;if(n?.field&&(r+=` for ${n.field}`),n?.entityName||n?.entityId){r+=` (`;let e=[];n.entityName&&e.push(n.entityName),n.entityId&&e.push(`id: "${n.entityId}"`),r+=e.join(`, `),r+=`)`}super({name:mt,message:`${r}: Value: ${JSON.stringify(e)}.
4
4
  Error message: ${tt(t)}`,cause:t}),this[_t]=!0,this.value=e,this.context=n}static isInstance(e){return D.hasMarker(e,ht)}static wrap({value:t,cause:n,context:r}){return e.isInstance(n)&&n.value===t&&n.context?.field===r?.field&&n.context?.entityName===r?.entityName&&n.context?.entityId===r?.entityId?n:new e({value:t,cause:n,context:r})}},O;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(O||={});var bt;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(bt||={});var k=O.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),xt=e=>{switch(typeof e){case`undefined`:return k.undefined;case`string`:return k.string;case`number`:return Number.isNaN(e)?k.nan:k.number;case`boolean`:return k.boolean;case`function`:return k.function;case`bigint`:return k.bigint;case`symbol`:return k.symbol;case`object`:return Array.isArray(e)?k.array:e===null?k.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?k.promise:typeof Map<`u`&&e instanceof Map?k.map:typeof Set<`u`&&e instanceof Set?k.set:typeof Date<`u`&&e instanceof Date?k.date:k.object;default:return k.unknown}},A=O.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),j=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,O.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=e=>e.message){let t=Object.create(null),n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};j.create=e=>new j(e);var St=(e,t)=>{let n;switch(e.code){case A.invalid_type:n=e.received===k.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case A.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,O.jsonStringifyReplacer)}`;break;case A.unrecognized_keys:n=`Unrecognized key(s) in object: ${O.joinValues(e.keys,`, `)}`;break;case A.invalid_union:n=`Invalid input`;break;case A.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${O.joinValues(e.options)}`;break;case A.invalid_enum_value:n=`Invalid enum value. Expected ${O.joinValues(e.options)}, received '${e.received}'`;break;case A.invalid_arguments:n=`Invalid function arguments`;break;case A.invalid_return_type:n=`Invalid function return type`;break;case A.invalid_date:n=`Invalid date`;break;case A.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:O.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case A.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case A.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case A.custom:n=`Invalid input`;break;case A.invalid_intersection_types:n=`Intersection results could not be merged`;break;case A.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case A.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,O.assertNever(e)}return{message:n}},Ct=St;function wt(){return Ct}var Tt=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function M(e,t){let n=wt(),r=Tt({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===St?void 0:St].filter(e=>!!e)});e.common.issues.push(r)}var N=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return P;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return P;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},P=Object.freeze({status:`aborted`}),Et=e=>({status:`dirty`,value:e}),F=e=>({status:`valid`,value:e}),Dt=e=>e.status===`aborted`,Ot=e=>e.status===`dirty`,kt=e=>e.status===`valid`,At=e=>typeof Promise<`u`&&e instanceof Promise,I;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(I||={});var L=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},jt=(e,t)=>{if(kt(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new j(e.common.issues);return this._error=t,this._error}}};function R(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var z=class{get description(){return this._def.description}_getType(e){return xt(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:xt(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new N,ctx:{common:e.parent.common,data:e.data,parsedType:xt(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(At(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:xt(e)};return jt(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:xt(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return kt(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>kt(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:xt(e)},r=this._parse({data:e,path:n.path,parent:n});return jt(n,await(At(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:A.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new V({schema:this,typeName:H.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return Pn.create(this,this._def)}nullable(){return Fn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return gn.create(this)}promise(){return Nn.create(this,this._def)}or(e){return vn.create([this,e],this._def)}and(e){return Sn.create(this,e,this._def)}transform(e){return new V({...R(this._def),schema:this,typeName:H.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new In({...R(this._def),innerType:this,defaultValue:t,typeName:H.ZodDefault})}brand(){return new zn({typeName:H.ZodBranded,type:this,...R(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new Ln({...R(this._def),innerType:this,catchValue:t,typeName:H.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Bn.create(this,e)}readonly(){return Vn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Mt=/^c[^\s-]{8,}$/i,Nt=/^[0-9a-z]+$/,Pt=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ft=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,It=/^[a-z0-9_-]{21}$/i,Lt=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Rt=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,zt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Bt=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,Vt,Ht=/^(?:(?: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])$/,Ut=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,Wt=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Gt=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Kt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,qt=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Jt=`((\\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])))`,Yt=RegExp(`^${Jt}$`);function Xt(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Zt(e){return RegExp(`^${Xt(e)}$`)}function Qt(e){let t=`${Jt}T${Xt(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function $t(e,t){return!!((t===`v4`||!t)&&Ht.test(e)||(t===`v6`||!t)&&Wt.test(e))}function en(e,t){if(!Lt.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function tn(e,t){return!!((t===`v4`||!t)&&Ut.test(e)||(t===`v6`||!t)&&Gt.test(e))}var nn=class e extends z{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==k.string){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:k.string,received:t.parsedType}),P}let t=new N,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),M(n,{code:A.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`max`)e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),M(n,{code:A.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.length<r.value;(i||a)&&(n=this._getOrReturnCtx(e,n),i?M(n,{code:A.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}):a&&M(n,{code:A.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if(r.kind===`email`)zt.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`email`,code:A.invalid_string,message:r.message}),t.dirty());else if(r.kind===`emoji`)Vt||=new RegExp(Bt,`u`),Vt.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`emoji`,code:A.invalid_string,message:r.message}),t.dirty());else if(r.kind===`uuid`)Ft.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`uuid`,code:A.invalid_string,message:r.message}),t.dirty());else if(r.kind===`nanoid`)It.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`nanoid`,code:A.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid`)Mt.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`cuid`,code:A.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid2`)Nt.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`cuid2`,code:A.invalid_string,message:r.message}),t.dirty());else if(r.kind===`ulid`)Pt.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`ulid`,code:A.invalid_string,message:r.message}),t.dirty());else if(r.kind===`url`)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),M(n,{validation:`url`,code:A.invalid_string,message:r.message}),t.dirty()}else r.kind===`regex`?(r.regex.lastIndex=0,r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`regex`,code:A.invalid_string,message:r.message}),t.dirty())):r.kind===`trim`?e.data=e.data.trim():r.kind===`includes`?e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),M(n,{code:A.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty()):r.kind===`toLowerCase`?e.data=e.data.toLowerCase():r.kind===`toUpperCase`?e.data=e.data.toUpperCase():r.kind===`startsWith`?e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),M(n,{code:A.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):r.kind===`endsWith`?e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),M(n,{code:A.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):r.kind===`datetime`?Qt(r).test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{code:A.invalid_string,validation:`datetime`,message:r.message}),t.dirty()):r.kind===`date`?Yt.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{code:A.invalid_string,validation:`date`,message:r.message}),t.dirty()):r.kind===`time`?Zt(r).test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{code:A.invalid_string,validation:`time`,message:r.message}),t.dirty()):r.kind===`duration`?Rt.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`duration`,code:A.invalid_string,message:r.message}),t.dirty()):r.kind===`ip`?$t(e.data,r.version)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`ip`,code:A.invalid_string,message:r.message}),t.dirty()):r.kind===`jwt`?en(e.data,r.alg)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`jwt`,code:A.invalid_string,message:r.message}),t.dirty()):r.kind===`cidr`?tn(e.data,r.version)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`cidr`,code:A.invalid_string,message:r.message}),t.dirty()):r.kind===`base64`?Kt.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`base64`,code:A.invalid_string,message:r.message}),t.dirty()):r.kind===`base64url`?qt.test(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{validation:`base64url`,code:A.invalid_string,message:r.message}),t.dirty()):O.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:A.invalid_string,...I.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...I.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...I.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...I.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...I.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...I.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...I.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...I.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...I.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...I.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...I.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...I.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...I.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...I.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...I.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...I.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...I.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...I.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...I.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...I.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...I.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...I.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...I.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...I.errToObj(t)})}nonempty(e){return this.min(1,I.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};nn.create=e=>new nn({checks:[],typeName:H.ZodString,coerce:e?.coerce??!1,...R(e)});function rn(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var an=class e extends z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==k.number){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:k.number,received:t.parsedType}),P}let t,n=new N;for(let r of this._def.checks)r.kind===`int`?O.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),M(t,{code:A.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),M(t,{code:A.too_small,minimum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),M(t,{code:A.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?rn(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),M(t,{code:A.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),M(t,{code:A.not_finite,message:r.message}),n.dirty()):O.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,I.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,I.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,I.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,I.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:I.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:I.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:I.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:I.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:I.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:I.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:I.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:I.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:I.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:I.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===`int`||e.kind===`multipleOf`&&O.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}};an.create=e=>new an({checks:[],typeName:H.ZodNumber,coerce:e?.coerce||!1,...R(e)});var on=class e extends z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==k.bigint)return this._getInvalidInput(e);let t,n=new N;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),M(t,{code:A.too_small,type:`bigint`,minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),M(t,{code:A.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),M(t,{code:A.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):O.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:k.bigint,received:t.parsedType}),P}gte(e,t){return this.setLimit(`min`,e,!0,I.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,I.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,I.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,I.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:I.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:I.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:I.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:I.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:I.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:I.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};on.create=e=>new on({checks:[],typeName:H.ZodBigInt,coerce:e?.coerce??!1,...R(e)});var sn=class extends z{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==k.boolean){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:k.boolean,received:t.parsedType}),P}return F(e.data)}};sn.create=e=>new sn({typeName:H.ZodBoolean,coerce:e?.coerce||!1,...R(e)});var cn=class e extends z{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==k.date){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:k.date,received:t.parsedType}),P}if(Number.isNaN(e.data.getTime()))return M(this._getOrReturnCtx(e),{code:A.invalid_date}),P;let t=new N,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),M(n,{code:A.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:`date`}),t.dirty()):r.kind===`max`?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),M(n,{code:A.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):O.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:I.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:I.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e==null?null:new Date(e)}};cn.create=e=>new cn({checks:[],coerce:e?.coerce||!1,typeName:H.ZodDate,...R(e)});var ln=class extends z{_parse(e){if(this._getType(e)!==k.symbol){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:k.symbol,received:t.parsedType}),P}return F(e.data)}};ln.create=e=>new ln({typeName:H.ZodSymbol,...R(e)});var un=class extends z{_parse(e){if(this._getType(e)!==k.undefined){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:k.undefined,received:t.parsedType}),P}return F(e.data)}};un.create=e=>new un({typeName:H.ZodUndefined,...R(e)});var dn=class extends z{_parse(e){if(this._getType(e)!==k.null){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:k.null,received:t.parsedType}),P}return F(e.data)}};dn.create=e=>new dn({typeName:H.ZodNull,...R(e)});var fn=class extends z{constructor(){super(...arguments),this._any=!0}_parse(e){return F(e.data)}};fn.create=e=>new fn({typeName:H.ZodAny,...R(e)});var pn=class extends z{constructor(){super(...arguments),this._unknown=!0}_parse(e){return F(e.data)}};pn.create=e=>new pn({typeName:H.ZodUnknown,...R(e)});var mn=class extends z{_parse(e){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:k.never,received:t.parsedType}),P}};mn.create=e=>new mn({typeName:H.ZodNever,...R(e)});var hn=class extends z{_parse(e){if(this._getType(e)!==k.undefined){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:k.void,received:t.parsedType}),P}return F(e.data)}};hn.create=e=>new hn({typeName:H.ZodVoid,...R(e)});var gn=class e extends z{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==k.array)return M(t,{code:A.invalid_type,expected:k.array,received:t.parsedType}),P;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(M(t,{code:e?A.too_big:A.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:`array`,inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(r.minLength!==null&&t.data.length<r.minLength.value&&(M(t,{code:A.too_small,minimum:r.minLength.value,type:`array`,inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),r.maxLength!==null&&t.data.length>r.maxLength.value&&(M(t,{code:A.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new L(t,e,t.path,n)))).then(e=>N.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new L(t,e,t.path,n)));return N.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:I.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:I.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:I.toString(n)}})}nonempty(e){return this.min(1,e)}};gn.create=(e,t)=>new gn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:H.ZodArray,...R(t)});function _n(e){if(e instanceof B){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=Pn.create(_n(r))}return new B({...e._def,shape:()=>t})}else if(e instanceof gn)return new gn({...e._def,type:_n(e.element)});else if(e instanceof Pn)return Pn.create(_n(e.unwrap()));else if(e instanceof Fn)return Fn.create(_n(e.unwrap()));else if(e instanceof Cn)return Cn.create(e.items.map(e=>_n(e)));else return e}var B=class e extends z{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=O.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==k.object){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:k.object,received:t.parsedType}),P}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof mn&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new L(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof mn){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(M(n,{code:A.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new L(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>N.mergeObjectSync(t,e)):N.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return I.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:I.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:H.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of O.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of O.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return _n(this)}partial(t){let n={};for(let e of O.objectKeys(this.shape)){let r=this.shape[e];t&&!t[e]?n[e]=r:n[e]=r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of O.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof Pn;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return An(O.objectKeys(this.shape))}};B.create=(e,t)=>new B({shape:()=>e,unknownKeys:`strip`,catchall:mn.create(),typeName:H.ZodObject,...R(t)}),B.strictCreate=(e,t)=>new B({shape:()=>e,unknownKeys:`strict`,catchall:mn.create(),typeName:H.ZodObject,...R(t)}),B.lazycreate=(e,t)=>new B({shape:e,unknownKeys:`strip`,catchall:mn.create(),typeName:H.ZodObject,...R(t)});var vn=class extends z{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new j(e.ctx.common.issues));return M(t,{code:A.invalid_union,unionErrors:n}),P}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new j(e));return M(t,{code:A.invalid_union,unionErrors:i}),P}}get options(){return this._def.options}};vn.create=(e,t)=>new vn({options:e,typeName:H.ZodUnion,...R(t)});var yn=e=>e instanceof On?yn(e.schema):e instanceof V?yn(e.innerType()):e instanceof kn?[e.value]:e instanceof jn?e.options:e instanceof Mn?O.objectValues(e.enum):e instanceof In?yn(e._def.innerType):e instanceof un?[void 0]:e instanceof dn?[null]:e instanceof Pn?[void 0,...yn(e.unwrap())]:e instanceof Fn?[null,...yn(e.unwrap())]:e instanceof zn||e instanceof Vn?yn(e.unwrap()):e instanceof Ln?yn(e._def.innerType):[],bn=class e extends z{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==k.object)return M(t,{code:A.invalid_type,expected:k.object,received:t.parsedType}),P;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(M(t,{code:A.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),P)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=yn(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:H.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...R(r)})}};function xn(e,t){let n=xt(e),r=xt(t);if(e===t)return{valid:!0,data:e};if(n===k.object&&r===k.object){let n=O.objectKeys(t),r=O.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=xn(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}else if(n===k.array&&r===k.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=xn(i,a);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}else if(n===k.date&&r===k.date&&+e==+t)return{valid:!0,data:e};else return{valid:!1}}var Sn=class extends z{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(Dt(e)||Dt(r))return P;let i=xn(e.value,r.value);return i.valid?((Ot(e)||Ot(r))&&t.dirty(),{status:t.value,value:i.data}):(M(n,{code:A.invalid_intersection_types}),P)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Sn.create=(e,t,n)=>new Sn({left:e,right:t,typeName:H.ZodIntersection,...R(n)});var Cn=class e extends z{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==k.array)return M(n,{code:A.invalid_type,expected:k.array,received:n.parsedType}),P;if(n.data.length<this._def.items.length)return M(n,{code:A.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),P;!this._def.rest&&n.data.length>this._def.items.length&&(M(n,{code:A.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new L(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>N.mergeArray(t,e)):N.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Cn.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new Cn({items:e,typeName:H.ZodTuple,rest:null,...R(t)})};var wn=class e extends z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==k.object)return M(n,{code:A.invalid_type,expected:k.object,received:n.parsedType}),P;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new L(n,e,n.path,e)),value:a._parse(new L(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?N.mergeObjectAsync(t,r):N.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof z?new e({keyType:t,valueType:n,typeName:H.ZodRecord,...R(r)}):new e({keyType:nn.create(),valueType:t,typeName:H.ZodRecord,...R(n)})}},Tn=class extends z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==k.map)return M(n,{code:A.invalid_type,expected:k.map,received:n.parsedType}),P;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new L(n,e,n.path,[a,`key`])),value:i._parse(new L(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return P;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}else{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return P;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};Tn.create=(e,t,n)=>new Tn({valueType:t,keyType:e,typeName:H.ZodMap,...R(n)});var En=class e extends z{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==k.set)return M(n,{code:A.invalid_type,expected:k.set,received:n.parsedType}),P;let r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&(M(n,{code:A.too_small,minimum:r.minSize.value,type:`set`,inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),r.maxSize!==null&&n.data.size>r.maxSize.value&&(M(n,{code:A.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return P;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new L(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:I.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:I.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};En.create=(e,t)=>new En({valueType:e,minSize:null,maxSize:null,typeName:H.ZodSet,...R(t)});var Dn=class e extends z{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==k.function)return M(t,{code:A.invalid_type,expected:k.function,received:t.parsedType}),P;function n(e,n){return Tt({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,wt(),St].filter(e=>!!e),issueData:{code:A.invalid_arguments,argumentsError:n}})}function r(e,n){return Tt({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,wt(),St].filter(e=>!!e),issueData:{code:A.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof Nn){let e=this;return F(async function(...t){let o=new j([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}else{let e=this;return F(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new j([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new j([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Cn.create(t).rest(pn.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||Cn.create([]).rest(pn.create()),returns:n||pn.create(),typeName:H.ZodFunction,...R(r)})}},On=class extends z{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};On.create=(e,t)=>new On({getter:e,typeName:H.ZodLazy,...R(t)});var kn=class extends z{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return M(t,{received:t.data,code:A.invalid_literal,expected:this._def.value}),P}return{status:`valid`,value:e.data}}get value(){return this._def.value}};kn.create=(e,t)=>new kn({value:e,typeName:H.ZodLiteral,...R(t)});function An(e,t){return new jn({values:e,typeName:H.ZodEnum,...R(t)})}var jn=class e extends z{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return M(t,{expected:O.joinValues(n),received:t.parsedType,code:A.invalid_type}),P}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return M(t,{received:t.data,code:A.invalid_enum_value,options:n}),P}return F(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};jn.create=An;var Mn=class extends z{_parse(e){let t=O.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==k.string&&n.parsedType!==k.number){let e=O.objectValues(t);return M(n,{expected:O.joinValues(e),received:n.parsedType,code:A.invalid_type}),P}if(this._cache||=new Set(O.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=O.objectValues(t);return M(n,{received:n.data,code:A.invalid_enum_value,options:e}),P}return F(e.data)}get enum(){return this._def.values}};Mn.create=(e,t)=>new Mn({values:e,typeName:H.ZodNativeEnum,...R(t)});var Nn=class extends z{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==k.promise&&t.common.async===!1?(M(t,{code:A.invalid_type,expected:k.promise,received:t.parsedType}),P):F((t.parsedType===k.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};Nn.create=(e,t)=>new Nn({type:e,typeName:H.ZodPromise,...R(t)});var V=class extends z{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===H.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{M(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return P;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?P:r.status===`dirty`||t.value===`dirty`?Et(r.value):r});{if(t.value===`aborted`)return P;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?P:r.status===`dirty`||t.value===`dirty`?Et(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?P:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?P:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`)if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!kt(e))return P;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>kt(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):P);O.assertNever(r)}};V.create=(e,t,n)=>new V({schema:e,typeName:H.ZodEffects,effect:t,...R(n)}),V.createWithPreprocess=(e,t,n)=>new V({schema:t,effect:{type:`preprocess`,transform:e},typeName:H.ZodEffects,...R(n)});var Pn=class extends z{_parse(e){return this._getType(e)===k.undefined?F(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Pn.create=(e,t)=>new Pn({innerType:e,typeName:H.ZodOptional,...R(t)});var Fn=class extends z{_parse(e){return this._getType(e)===k.null?F(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Fn.create=(e,t)=>new Fn({innerType:e,typeName:H.ZodNullable,...R(t)});var In=class extends z{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===k.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};In.create=(e,t)=>new In({innerType:e,typeName:H.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...R(t)});var Ln=class extends z{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return At(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new j(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new j(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Ln.create=(e,t)=>new Ln({innerType:e,typeName:H.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...R(t)});var Rn=class extends z{_parse(e){if(this._getType(e)!==k.nan){let t=this._getOrReturnCtx(e);return M(t,{code:A.invalid_type,expected:k.nan,received:t.parsedType}),P}return{status:`valid`,value:e.data}}};Rn.create=e=>new Rn({typeName:H.ZodNaN,...R(e)});var zn=class extends z{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},Bn=class e extends z{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?P:e.status===`dirty`?(t.dirty(),Et(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?P:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:H.ZodPipeline})}},Vn=class extends z{_parse(e){let t=this._def.innerType._parse(e),n=e=>(kt(e)&&(e.value=Object.freeze(e.value)),e);return At(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};Vn.create=(e,t)=>new Vn({innerType:e,typeName:H.ZodReadonly,...R(t)}),B.lazycreate;var H;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(H||={}),nn.create,an.create,Rn.create,on.create,sn.create,cn.create,ln.create,un.create,dn.create,fn.create,pn.create,mn.create,hn.create,gn.create,B.create,B.strictCreate,vn.create,bn.create,Sn.create,Cn.create,wn.create,Tn.create,En.create,Dn.create,On.create,kn.create,jn.create,Mn.create,Nn.create,V.create,Pn.create,Fn.create,V.createWithPreprocess,Bn.create;var Hn=class extends Error{constructor(e,t){super(e),this.name=`ParseError`,this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}},Un=10,Wn=13,Gn=32;function Kn(e){}function qn(e){if(typeof e==`function`)throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:t=Kn,onError:n=Kn,onRetry:r=Kn,onComment:i}=e,a=[],o=!0,s,c=``,l=0,u;function d(e){if(o&&(o=!1,e.charCodeAt(0)===239&&e.charCodeAt(1)===187&&e.charCodeAt(2)===191&&(e=e.slice(3))),a.length===0){let t=f(e);t!==``&&a.push(t);return}if(e.indexOf(`
5
5
  `)===-1&&e.indexOf(`\r`)===-1){a.push(e);return}a.push(e);let t=a.join(``);a.length=0;let n=f(t);n!==``&&a.push(n)}function f(e){let n=0;if(e.indexOf(`\r`)===-1){let r=e.indexOf(`
@@ -20,7 +20,7 @@ ${t}`,l++;break;case`id`:s=t.includes(`\0`)?void 0:t;break;case`retry`:/^\d+$/.t
20
20
  `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
21
21
  `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return go(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=be.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function Oo(){return{exit:{taskListCheckValueChecked:Ao,taskListCheckValueUnchecked:Ao,paragraph:jo}}}function ko(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:Mo}}}function Ao(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function jo(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Mo(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=be.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function No(){return[Na(),ro(),co(),yo(),Oo()]}function Po(e){return{extensions:[Pa(),io(e),lo(),Do(e),ko()]}}var Fo={tokenize:Jo,partial:!0},Io={tokenize:Yo,partial:!0},Lo={tokenize:Xo,partial:!0},Ro={tokenize:Zo,partial:!0},zo={tokenize:Qo,partial:!0},Bo={name:`wwwAutolink`,tokenize:Ko,previous:$o},Vo={name:`protocolAutolink`,tokenize:qo,previous:es},Ho={name:`emailAutolink`,tokenize:Go,previous:ts},Q={};function Uo(){return{text:Q}}for(var Wo=48;Wo<123;)Q[Wo]=Ho,Wo++,Wo===58?Wo=65:Wo===91&&(Wo=97);Q[43]=Ho,Q[45]=Ho,Q[46]=Ho,Q[95]=Ho,Q[72]=[Ho,Vo],Q[104]=[Ho,Vo],Q[87]=[Ho,Bo],Q[119]=[Ho,Bo];function Go(e,t,n){let r=this,i,a;return o;function o(t){return!ns(t)||!ts.call(r,r.previous)||rs(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return ns(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(zo,u,l)(t):t===45||t===95||Oe(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Ae(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Ko(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!$o.call(r,r.previous)||rs(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(Fo,e.attempt(Io,e.attempt(Lo,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function qo(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&es.call(r,r.previous)&&!rs(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Ae(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Ee(t)||T(t)||xe(t)||Ie(t)?n(t):e.attempt(Io,e.attempt(Lo,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Jo(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Yo(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(Ro,c,s)(t):t===null||T(t)||xe(t)||t!==45&&Ie(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Xo(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Ro,t,a)(o):o===null||T(o)||xe(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Zo(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||T(o)||xe(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||T(e)||xe(e)?t(e):r(e)}function a(e){return Ae(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Ae(t)?(e.consume(t),o):n(t)}}function Qo(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return Oe(e)?n(e):t(e)}}function $o(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||T(e)}function es(e){return!Ae(e)}function ts(e){return!(e===47||ns(e))}function ns(e){return e===43||e===45||e===46||e===95||Oe(e)}function rs(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var is={tokenize:fs,partial:!0};function as(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:ls,continuation:{tokenize:us},exit:ds}},text:{91:{name:`gfmFootnoteCall`,tokenize:cs},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:os,resolveTo:ss}}}}function os(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Fe(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function ss(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function cs(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||T(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Fe(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return T(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function ls(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||T(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Fe(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return T(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),we(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function us(e,t,n){return e.check(De,t,e.attempt(is,t,n))}function ds(e){e.exit(`gfmFootnoteDefinition`)}function fs(e,t,n){let r=this;return we(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function ps(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&ve(o,o.length,0,Ne(s,e.slice(r+1,n),t)),ve(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),ve(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Ce(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Ce(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var ms=class{constructor(){this.map=[]}add(e,t,n){hs(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function hs(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function gs(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function _s(){return{flow:{null:{name:`table`,tokenize:vs,resolveAll:ys}}}}function vs(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?ie:c;return a===ie&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):Te(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Pe(t)?we(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||T(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Pe(t)?we(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):re(t)}function h(t){return Pe(t)?we(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Te(t)?ne(t):re(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),ee(t)):re(t)}function ee(t){return t===45?(e.consume(t),ee):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),te):(e.exit(`tableDelimiterFiller`),te(t))}function te(t){return Pe(t)?we(e,ne,`whitespace`)(t):ne(t)}function ne(n){return n===124?m(n):n===null||Te(n)?!o||i!==a?re(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):re(n)}function re(e){return n(e)}function ie(t){return e.enter(`tableRow`),ae(t)}function ae(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),ae):n===null||Te(n)?(e.exit(`tableRow`),t(n)):Pe(n)?we(e,ae,`whitespace`)(n):(e.enter(`data`),oe(n))}function oe(t){return t===null||t===124||T(t)?(e.exit(`data`),ae(t)):(e.consume(t),t===92?v:oe)}function v(t){return t===92||t===124?(e.consume(t),oe):oe(t)}}function ys(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new ms;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(xs(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=bs(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=bs(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=bs(f,t,o,i,n,d)):(o[0]=o[1],d=bs(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&xs(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=gs(t.events,n))}return e}function bs(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Ss(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Ss(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Ss(t.events,n[2]),a=Ss(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Ss(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function xs(e,t,n,r,i){let a=[],o=Ss(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Ss(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Cs={name:`tasklistCheck`,tokenize:Ts};function ws(){return{text:{91:Cs}}}function Ts(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return T(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Te(r)?t(r):Pe(r)?e.check({tokenize:Es},t,n)(r):n(r)}}function Es(e,t,n){return we(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Ds(e){return ye([Uo(),as(),ps(e),_s(),ws()])}var Os={};function ks(e){let t=this,n=e||Os,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Ds(n)),a.push(No()),o.push(Po(n))}var $=e(r(),1);function As(e){let t=e+`CollectionProvider`,[n,r]=a(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=e=>{let{scope:t,children:n}=e,r=E.useRef(null),a=E.useRef(new Map).current;return(0,$.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};c.displayName=t;let u=e+`CollectionSlot`,d=l(u),f=E.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,$.jsx)(d,{ref:o(t,s(u,n).collectionRef),children:r})});f.displayName=u;let p=e+`CollectionItemSlot`,m=`data-radix-collection-item`,h=l(p),g=E.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=E.useRef(null),c=o(t,a),l=s(p,n);return E.useEffect(()=>(l.itemMap.set(a,{ref:a,...i}),()=>void l.itemMap.delete(a))),(0,$.jsx)(h,{[m]:``,ref:c,children:r})});g.displayName=p;function _(t){let n=s(e+`CollectionConsumer`,t);return E.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:c,Slot:f,ItemSlot:g},_,r]}var js=`rovingFocusGroup.onEntryFocus`,Ms={bubbles:!1,cancelable:!0},Ns=`RovingFocusGroup`,[Ps,Fs,Is]=As(Ns),[Ls,Rs]=a(Ns,[Is]),[zs,Bs]=Ls(Ns),Vs=E.forwardRef((e,t)=>(0,$.jsx)(Ps.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,$.jsx)(Ps.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,$.jsx)(Hs,{...e,ref:t})})}));Vs.displayName=Ns;var Hs=E.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:m=!1,...g}=e,_=E.useRef(null),ee=o(t,_),te=ae(a),[ne,re]=d({prop:s,defaultProp:c??null,onChange:l,caller:Ns}),[ie,oe]=E.useState(!1),v=f(u),y=Fs(n),se=E.useRef(!1),[ce,b]=E.useState(0);return E.useEffect(()=>{let e=_.current;if(e)return e.addEventListener(js,v),()=>e.removeEventListener(js,v)},[v]),(0,$.jsx)(zs,{scope:n,orientation:r,dir:te,loop:i,currentTabStopId:ne,onItemFocus:E.useCallback(e=>re(e),[re]),onItemShiftTab:E.useCallback(()=>oe(!0),[]),onFocusableItemAdd:E.useCallback(()=>b(e=>e+1),[]),onFocusableItemRemove:E.useCallback(()=>b(e=>e-1),[]),children:(0,$.jsx)(h.div,{tabIndex:ie||ce===0?-1:0,"data-orientation":r,...g,ref:ee,style:{outline:`none`,...e.style},onMouseDown:p(e.onMouseDown,()=>{se.current=!0}),onFocus:p(e.onFocus,e=>{let t=!se.current;if(e.target===e.currentTarget&&t&&!ie){let t=new CustomEvent(js,Ms);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=y().filter(e=>e.focusable);Js([e.find(e=>e.active),e.find(e=>e.id===ne),...e].filter(Boolean).map(e=>e.ref.current),m)}}se.current=!1}),onBlur:p(e.onBlur,()=>oe(!1))})})}),Us=`RovingFocusGroupItem`,Ws=E.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,l=c(),u=a||l,d=Bs(Us,n),f=d.currentTabStopId===u,m=Fs(n),{onFocusableItemAdd:g,onFocusableItemRemove:_,currentTabStopId:ee}=d;return E.useEffect(()=>{if(r)return g(),()=>_()},[r,g,_]),(0,$.jsx)(Ps.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:(0,$.jsx)(h.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:p(e.onMouseDown,e=>{r?d.onItemFocus(u):e.preventDefault()}),onFocus:p(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:p(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){d.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=qs(e,d.orientation,d.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=m().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=d.loop?Ys(n,r+1):n.slice(r+1)}setTimeout(()=>Js(n))}}),children:typeof o==`function`?o({isCurrentTabStop:f,hasTabStop:ee!=null}):o})})});Ws.displayName=Us;var Gs={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Ks(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function qs(e,t,n){let r=Ks(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Gs[r]}function Js(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Ys(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Xs=Vs,Zs=Ws,Qs=`Tabs`,[$s,ec]=a(Qs,[Rs]),tc=Rs(),[nc,rc]=$s(Qs),ic=E.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:l=`automatic`,...u}=e,f=ae(s),[p,m]=d({prop:r,onChange:i,defaultProp:a??``,caller:Qs});return(0,$.jsx)(nc,{scope:n,baseId:c(),value:p,onValueChange:m,orientation:o,dir:f,activationMode:l,children:(0,$.jsx)(h.div,{dir:f,"data-orientation":o,...u,ref:t})})});ic.displayName=Qs;var ac=`TabsList`,oc=E.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=rc(ac,n),o=tc(n);return(0,$.jsx)(Xs,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,$.jsx)(h.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});oc.displayName=ac;var sc=`TabsTrigger`,cc=E.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=rc(sc,n),s=tc(n),c=dc(o.baseId,r),l=fc(o.baseId,r),u=r===o.value;return(0,$.jsx)(Zs,{asChild:!0,...s,focusable:!i,active:u,children:(0,$.jsx)(h.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:p(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:p(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:p(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});cc.displayName=sc;var lc=`TabsContent`,uc=E.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=rc(lc,n),c=dc(s.baseId,r),l=fc(s.baseId,r),u=r===s.value,d=E.useRef(u);return E.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,$.jsx)(m,{present:i||u,children:({present:n})=>(0,$.jsx)(h.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});uc.displayName=lc;function dc(e,t){return`${e}-trigger-${t}`}function fc(e,t){return`${e}-content-${t}`}var pc=new Map,mc=(0,E.createContext)(null);function hc(){let e=(0,E.use)(mc);if(!e)throw Error(`You must wrap your component in <Tabs>`);return e}var gc=oc,_c=cc;function vc({ref:e,groupId:t,persist:n=!1,updateAnchor:r=!1,defaultValue:i,value:a,onValueChange:o,...s}){let c=(0,E.useRef)(null),l=(0,E.useMemo)(()=>new Map,[]),[u,d]=a===void 0?(0,E.useState)(i):[a,(0,E.useEffectEvent)(e=>o?.(e))];return(0,E.useLayoutEffect)(()=>{if(!t)return;let e=sessionStorage.getItem(t);n&&(e??=localStorage.getItem(t)),e&&d(e);let r=pc.get(t)??new Set;return r.add(d),pc.set(t,r),()=>{r.delete(d)}},[t,n,d]),(0,E.useLayoutEffect)(()=>{let e=window.location.hash.slice(1);if(e){for(let[t,n]of l.entries())if(n===e){d(t),c.current?.scrollIntoView();break}}},[d,l]),(0,$.jsx)(ic,{ref:ne(e,c),value:u,onValueChange:e=>{if(r){let t=l.get(e);t&&window.history.replaceState(null,``,`#${t}`)}if(t){let r=pc.get(t);if(r)for(let t of r)t(e);sessionStorage.setItem(t,e),n&&localStorage.setItem(t,e)}else d(e)},...s,children:(0,$.jsx)(mc,{value:(0,E.useMemo)(()=>({valueToIdMap:l}),[l]),children:s.children})})}function yc({value:e,...t}){let{valueToIdMap:n}=hc();return t.id&&n.set(e,t.id),(0,$.jsx)(uc,{value:e,...t,children:t.children})}var bc=(0,E.createContext)(null);function xc(e){return(0,$.jsx)(`pre`,{...e,className:s(`min-w-full w-max *:flex *:flex-col`,e.className),children:e.children})}function Sc({ref:e,title:t,allowCopy:n=!0,keepBackground:r=!1,icon:i,viewportProps:a={},children:o,Actions:c=e=>(0,$.jsx)(`div`,{...e,className:s(`empty:hidden`,e.className)}),...l}){let u=(0,E.use)(bc)!==null,d=(0,E.useRef)(null);return(0,$.jsxs)(`figure`,{ref:e,dir:`ltr`,...l,tabIndex:-1,className:s(u?`bg-fd-secondary -mx-px -mb-px last:rounded-b-xl`:`my-4 bg-fd-card rounded-xl`,r&&`bg-(--shiki-light-bg) dark:bg-(--shiki-dark-bg)`,`shiki relative border shadow-sm not-prose overflow-hidden text-sm`,l.className),children:[t?(0,$.jsxs)(`div`,{className:`flex text-fd-muted-foreground items-center gap-2 h-9.5 border-b px-4`,children:[typeof i==`string`?(0,$.jsx)(`div`,{className:`[&_svg]:size-3.5`,dangerouslySetInnerHTML:{__html:i}}):i,(0,$.jsx)(`figcaption`,{className:`flex-1 truncate`,children:t}),c({className:`-me-2`,children:n&&(0,$.jsx)(Cc,{containerRef:d})})]}):c({className:`absolute top-3 right-2 z-2 backdrop-blur-lg rounded-lg text-fd-muted-foreground`,children:n&&(0,$.jsx)(Cc,{containerRef:d})}),(0,$.jsx)(`div`,{ref:d,...a,role:`region`,tabIndex:0,className:s(`text-[0.8125rem] py-3.5 overflow-auto max-h-[600px] fd-scroll-container focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-fd-ring`,a.className),style:{"--padding-right":t?void 0:`calc(var(--spacing) * 8)`,counterSet:l[`data-line-numbers`]?`line ${Number(l[`data-line-numbers-start`]??1)-1}`:void 0,...a.style},children:o})]})}function Cc({className:e,containerRef:t,...n}){let[r,i]=oe(()=>{let e=t.current?.getElementsByTagName(`pre`).item(0);if(!e)return;let n=e.cloneNode(!0);n.querySelectorAll(`.nd-copy-ignore`).forEach(e=>{e.replaceWith(`
22
22
  `)}),navigator.clipboard.writeText(n.textContent??``)});return(0,$.jsx)(`button`,{type:`button`,"data-checked":r||void 0,className:s(u({className:`hover:text-fd-accent-foreground data-checked:text-fd-accent-foreground`,size:`icon-xs`}),e),"aria-label":r?`Copied Text`:`Copy Text`,onClick:i,...n,children:r?(0,$.jsx)(te,{}):(0,$.jsx)(He,{})})}function wc({ref:e,...t}){let n=(0,E.useRef)(null),r=(0,E.use)(bc)!==null;return(0,$.jsx)(vc,{ref:ne(n,e),...t,className:s(`bg-fd-card rounded-xl border`,!r&&`my-4`,t.className),children:(0,$.jsx)(bc,{value:(0,E.useMemo)(()=>({containerRef:n,nested:r}),[r]),children:t.children})})}function Tc(e){return(0,$.jsx)(gc,{...e,className:s(`flex flex-row px-2 overflow-x-auto text-fd-muted-foreground`,e.className),children:e.children})}function Ec({children:e,...t}){return(0,$.jsxs)(_c,{...t,className:s(`relative group inline-flex text-sm font-medium text-nowrap items-center transition-colors gap-2 px-2 py-1.5 hover:text-fd-accent-foreground data-[state=active]:text-fd-primary [&_svg]:size-3.5`,t.className),children:[(0,$.jsx)(`div`,{className:`absolute inset-x-2 bottom-0 h-px group-data-[state=active]:bg-fd-primary`}),e]})}function Dc(e){return(0,$.jsx)(yc,{...e})}async function Oc(e,t){let n=e.getBundledThemes(),r=t.filter(t=>{if(typeof t==`string`&&!(t in n))return!1;try{return e.getTheme(t),!1}catch{return!0}});r.length>0&&await e.loadTheme(...r)}function kc(e){return`theme`in e?[e.theme]:Object.values(e.themes).filter(e=>e!==void 0)}function Ac(e){let t;return{init(n){return t=e.init(n)},getOrInit(){return t??this.init()}}}async function jc(e,t,r){let{fallbackLanguage:i=`text`,...a}=r,{isSpecialLang:o}=await n(async()=>{let{isSpecialLang:e}=await import(`./core-C1uF6QvU.js`);return{isSpecialLang:e}},__vite__mapDeps([0,1,2,3,4,5,6]));return!o(a.lang)&&!(a.lang in e.getBundledLanguages())&&!e.getLoadedLanguages().includes(a.lang)&&(a.lang=i),await Promise.all([Oc(e,kc(a)),e.loadLanguage(a.lang)]),e.codeToHast(t,a)}function Mc(e,t,n,r){let[i,a]=(0,E.useState)(n.defaultValue),o=(0,E.useRef)(null);return(0,E.useEffect)(()=>{async function r(){return Re(await jc(typeof e==`function`?await e():e,t,n),{...$,components:n.components})}let i=r();return o.current=i,i.then(e=>{o.current===i&&a(e)}),()=>{o.current=null}},r),i}var Nc=(0,E.createContext)(void 0);function Pc(e){let t=(0,E.use)(Nc);return(0,$.jsx)(Sc,{...e,...t,className:s(`my-0`,e.className,t?.className),children:(0,$.jsx)(xc,{children:e.children})})}function Fc({lang:e,code:t,codeblock:n,options:r,wrapInSuspense:i=!0,highlighter:a}){let o=(0,E.useId)(),s={lang:e,defaultColor:!1,...r,components:{pre:Pc,...r.components}},c=Mc(a,t,s,[o,e,t]);return i&&(c??=(0,$.jsx)(Ic,{code:t,components:s.components})),(0,$.jsx)(Nc,{value:n,children:c})}function Ic({code:e,components:t={}}){let{pre:n=`pre`,code:r=`code`}=t;return(0,$.jsx)(n,{children:(0,$.jsx)(r,{children:e.split(`
23
- `).map((e,t)=>(0,$.jsx)(`span`,{className:`line`,children:e},t))})})}var Lc=Ac({async init(e){let{createHighlighter:t,createJavaScriptRegexEngine:r}=await n(async()=>{let{createHighlighter:e,createJavaScriptRegexEngine:t}=await import(`./dist-fgL1a0Pj.js`);return{createHighlighter:e,createJavaScriptRegexEngine:t}},__vite__mapDeps([7,8,4,1,2,3,5,6]));return t({langs:[],themes:[],langAlias:e?.langAlias,engine:r()})}});function Rc(e){return(0,$.jsx)(Fc,{highlighter:()=>Lc.getOrInit(),options:{themes:{light:`github-light`,dark:`github-dark`}},...e})}function zc(e){return(0,$.jsx)(`div`,{...e,className:s(`grid grid-cols-2 gap-3 @container`,e.className),children:e.children})}function Bc({icon:e,title:t,description:n,...r}){return(0,$.jsxs)(r.href?ee:`div`,{...r,"data-card":!0,className:s(`block rounded-xl border bg-fd-card p-4 text-fd-card-foreground transition-colors @max-lg:col-span-full`,r.href&&`hover:bg-fd-accent/80`,r.className),children:[e?(0,$.jsx)(`div`,{className:`not-prose mb-2 w-fit shadow-md rounded-lg border bg-fd-muted p-1.5 text-fd-muted-foreground [&_svg]:size-4`,children:e}):null,(0,$.jsx)(`h3`,{className:`not-prose mb-1 text-sm font-medium`,children:t}),n?(0,$.jsx)(`p`,{className:`my-0! text-sm text-fd-muted-foreground`,children:n}):null,(0,$.jsx)(`div`,{className:`text-sm text-fd-muted-foreground prose-no-margin empty:hidden`,children:r.children})]})}var Vc=`size-5 -me-0.5 fill-(--callout-color) text-fd-card`;function Hc({children:e,title:t,...n}){return(0,$.jsxs)(Wc,{...n,children:[t&&(0,$.jsx)(Gc,{children:t}),(0,$.jsx)(Kc,{children:e})]})}function Uc(e){return e===`warn`?`warning`:e===`tip`?`info`:e}function Wc({type:e=`info`,icon:t,children:n,className:r,style:i,...a}){let o=Uc(e);return(0,$.jsxs)(`div`,{className:s(`flex gap-2 my-4 rounded-xl border bg-fd-card p-3 ps-1 text-sm text-fd-card-foreground shadow-md`,r),style:{"--callout-color":`var(--color-fd-${o}, var(--color-fd-muted))`,...i},...a,children:[(0,$.jsx)(`div`,{role:`none`,className:`w-0.5 bg-(--callout-color)/50 rounded-sm`}),t??{info:(0,$.jsx)(Ue,{className:Vc}),warning:(0,$.jsx)(Xe,{className:Vc}),error:(0,$.jsx)(Ve,{className:Vc}),success:(0,$.jsx)(Be,{className:Vc}),idea:(0,$.jsx)(We,{className:`size-5 -me-0.5 fill-(--callout-color) text-(--callout-color)`})}[o],(0,$.jsx)(`div`,{className:`flex flex-col gap-2 min-w-0 flex-1`,children:n})]})}function Gc({children:e,className:t,...n}){return(0,$.jsx)(`p`,{className:s(`font-medium my-0!`,t),...n,children:e})}function Kc({children:e,className:t,...n}){return(0,$.jsx)(`div`,{className:s(`text-fd-muted-foreground prose-no-margin empty:hidden`,t),...n,children:e})}function qc({as:e,className:t,...n}){let r=e??`h1`;return n.id?(0,$.jsxs)(r,{className:s(`flex scroll-m-28 flex-row items-center gap-2`,t),...n,children:[(0,$.jsx)(`a`,{"data-card":``,href:`#${n.id}`,className:`peer`,children:n.children}),(0,$.jsx)(Ge,{"aria-hidden":!0,className:`size-3.5 shrink-0 text-fd-muted-foreground opacity-0 transition-opacity peer-hover:opacity-100`})]}):(0,$.jsx)(r,{className:t,...n})}function Jc(e){return(0,$.jsx)(_,{sizes:`(max-width: 768px) 100vw, (max-width: 1200px) 70vw, 900px`,...e,className:s(`rounded-lg`,e.className)})}function Yc(e){return(0,$.jsx)(`div`,{className:`relative overflow-auto prose-no-margin my-6`,children:(0,$.jsx)(`table`,{...e})})}var Xc={CodeBlockTab:Dc,CodeBlockTabs:wc,CodeBlockTabsList:Tc,CodeBlockTabsTrigger:Ec,pre:e=>(0,$.jsx)(Sc,{...e,children:(0,$.jsx)(xc,{children:e.children})}),Card:Bc,Cards:zc,a:ee,img:Jc,h1:e=>(0,$.jsx)(qc,{as:`h1`,...e}),h2:e=>(0,$.jsx)(qc,{as:`h2`,...e}),h3:e=>(0,$.jsx)(qc,{as:`h3`,...e}),h4:e=>(0,$.jsx)(qc,{as:`h4`,...e}),h5:e=>(0,$.jsx)(qc,{as:`h5`,...e}),h6:e=>(0,$.jsx)(qc,{as:`h6`,...e}),table:Yc,Callout:Hc,CalloutContainer:Wc,CalloutTitle:Gc,CalloutDescription:Kc};function Zc(){return e=>{ke(e,[`text`,`element`],(e,t,n)=>{if(e.type===`element`&&e.tagName===`pre`)return`skip`;if(e.type!==`text`||!n||t===void 0)return;let r=e.value.split(/(?=\s)/).flatMap(e=>e.length===0?[]:{type:`element`,tagName:`span`,properties:{class:`animate-fd-fade-in`},children:[{type:`text`,value:e}]});return Object.assign(e,{type:`element`,tagName:`span`,properties:{},children:r}),`skip`})}}function Qc(){let e=Me().use(ks).use(Le).use(Zc);return{async process(t){let n=e.parse({value:t});return Re(await e.run(n),{development:!1,jsx:$.jsx,jsxs:$.jsxs,Fragment:$.Fragment,components:{...Xc,pre:$c,img:void 0}})}}}function $c(e){let t=E.Children.only(e.children).props,n=t.children;if(typeof n!=`string`)return null;let r=t.className?.split(` `).find(e=>e.startsWith(`language-`))?.slice(9)??`text`;return r===`mdx`&&(r=`md`),(0,$.jsx)(Rc,{lang:r,code:n.trimEnd()})}var el=Qc();function tl({text:e}){let t=(0,E.useDeferredValue)(e);return(0,$.jsx)(E.Suspense,{fallback:(0,$.jsx)(`p`,{className:`invisible`,children:e}),children:(0,$.jsx)(rl,{text:t})})}var nl=new Map;function rl({text:e}){let t=nl.get(e)??el.process(e);return nl.set(e,t),(0,E.use)(t)}var il=(0,E.createContext)(null);function al({className:e,...t}){let{setOpen:n}=vl();return(0,$.jsxs)(`div`,{className:s(`sticky top-0 flex items-start gap-2 border rounded-xl bg-fd-secondary text-fd-secondary-foreground shadow-sm`,e),...t,children:[(0,$.jsxs)(`div`,{className:`px-3 py-2 flex-1`,children:[(0,$.jsx)(`p`,{className:`text-sm font-medium mb-2`,children:`AI Chat`}),(0,$.jsx)(`p`,{className:`text-xs text-fd-muted-foreground`,children:`AI can be inaccurate, please verify the answers.`})]}),(0,$.jsx)(`button`,{"aria-label":`Close`,tabIndex:-1,className:s(u({size:`icon-sm`,color:`ghost`,className:`text-fd-muted-foreground rounded-full`})),onClick:()=>n(!1),children:(0,$.jsx)(ie,{})})]})}function ol(){let{messages:e,status:t,setMessages:n,regenerate:r}=yl(),i=t===`streaming`;return e.length===0?null:(0,$.jsxs)($.Fragment,{children:[!i&&e.at(-1)?.role===`assistant`&&(0,$.jsxs)(`button`,{type:`button`,className:s(u({color:`secondary`,size:`sm`,className:`rounded-full gap-1.5`})),onClick:()=>r(),children:[(0,$.jsx)(Je,{className:`size-4`}),`Retry`]}),(0,$.jsx)(`button`,{type:`button`,className:s(u({color:`secondary`,size:`sm`,className:`rounded-full`})),onClick:()=>n([]),children:`Clear Chat`})]})}var sl=`__ai_search_input`;function cl(e){let{status:t,sendMessage:n,stop:r}=yl(),[i,a]=(0,E.useState)(()=>localStorage.getItem(sl)??``),o=t===`streaming`||t===`submitted`,c=e=>{e?.preventDefault(),n({text:i}),a(``),localStorage.removeItem(sl)};return(0,E.useEffect)(()=>{o&&document.getElementById(`nd-ai-input`)?.focus()},[o]),(0,$.jsxs)(`form`,{...e,className:s(`flex items-start pe-2`,e.className),onSubmit:c,children:[(0,$.jsx)(ul,{value:i,placeholder:o?`AI is answering...`:`Ask a question`,autoFocus:!0,className:`p-3`,disabled:t===`streaming`||t===`submitted`,onChange:e=>{a(e.target.value),localStorage.setItem(sl,e.target.value)},onKeyDown:e=>{!e.shiftKey&&e.key===`Enter`&&c(e)}}),o?(0,$.jsxs)(`button`,{type:`button`,className:s(u({color:`secondary`,className:`transition-all rounded-full mt-2 gap-2`})),onClick:r,children:[(0,$.jsx)(Ke,{className:`size-4 animate-spin text-fd-muted-foreground`}),`Abort Answer`]},`bn`):(0,$.jsx)(`button`,{type:`submit`,className:s(u({color:`primary`,className:`transition-all rounded-full mt-2`})),disabled:i.length===0,children:(0,$.jsx)(Ye,{className:`size-4`})},`bn`)]})}function ll(e){let t=(0,E.useRef)(null);return(0,E.useEffect)(()=>{if(!t.current)return;function e(){let e=t.current;e&&e.scrollTo({top:e.scrollHeight,behavior:`instant`})}let n=new ResizeObserver(e);e();let r=t.current?.firstElementChild;return r&&n.observe(r),()=>{n.disconnect()}},[]),(0,$.jsx)(`div`,{ref:t,...e,className:s(`fd-scroll-container overflow-y-auto min-w-0 flex flex-col`,e.className),children:e.children})}function ul(e){let t=(0,E.useRef)(null),n=s(`col-start-1 row-start-1`,e.className);return(0,$.jsxs)(`div`,{className:`grid flex-1`,children:[(0,$.jsx)(`textarea`,{id:`nd-ai-input`,...e,className:s(`resize-none bg-transparent placeholder:text-fd-muted-foreground focus-visible:outline-none`,n)}),(0,$.jsx)(`div`,{ref:t,className:s(n,`break-all invisible`),children:`${e.value?.toString()??``}\n`})]})}var dl={user:`you`,assistant:`fumadocs`};function fl({message:e,...t}){let n=``,r=[];for(let t of e.parts??[]){if(t.type===`text`){n+=t.text;continue}if(t.type.startsWith(`tool-`)){let e=t.type.slice(5),n=t;if(e!==`search`||!n.toolCallId)continue;r.push(n)}}return(0,$.jsxs)(`div`,{onClick:e=>e.stopPropagation(),...t,children:[(0,$.jsx)(`p`,{className:s(`mb-1 text-sm font-medium text-fd-muted-foreground`,e.role===`assistant`&&`text-fd-primary`),children:dl[e.role]??`unknown`}),(0,$.jsx)(`div`,{className:`prose text-sm`,children:(0,$.jsx)(tl,{text:n})}),r.map(e=>(0,$.jsxs)(`div`,{className:`flex flex-row gap-2 items-center mt-3 rounded-lg border bg-fd-secondary text-fd-muted-foreground text-xs p-2`,children:[(0,$.jsx)(re,{className:`size-4`}),e.state===`output-error`||e.state===`output-denied`?(0,$.jsx)(`p`,{className:`text-fd-error`,children:e.errorText??`Failed to search`}):(0,$.jsx)(`p`,{children:e.output?`${e.output.length} search results`:`Searching…`})]},e.toolCallId))]})}function pl({children:e}){let[t,n]=(0,E.useState)(!1),r=Ta({id:`search`,transport:new ca({api:`/api/chat`})});return(0,$.jsx)(il,{value:(0,E.useMemo)(()=>({chat:r,open:t,setOpen:n}),[r,t]),children:e})}function ml({position:e=`default`,className:t,...n}){let{open:r,setOpen:i}=vl();return(0,$.jsx)(`button`,{"data-state":r?`open`:`closed`,className:s(e===`float`&&[`fixed bottom-4 gap-3 w-24 inset-e-[calc(--spacing(4)+var(--removed-body-scroll-bar-size,0px))] shadow-lg z-20 transition-[translate,opacity]`,r&&`translate-y-10 opacity-0`],t),onClick:()=>i(!r),...n,children:n.children})}function hl(){let{open:e,setOpen:t}=vl();return _l(),(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`style`,{children:`
23
+ `).map((e,t)=>(0,$.jsx)(`span`,{className:`line`,children:e},t))})})}var Lc=Ac({async init(e){let{createHighlighter:t,createJavaScriptRegexEngine:r}=await n(async()=>{let{createHighlighter:e,createJavaScriptRegexEngine:t}=await import(`./dist-DN5XzmtL.js`);return{createHighlighter:e,createJavaScriptRegexEngine:t}},__vite__mapDeps([7,8,4,1,2,3,5,6]));return t({langs:[],themes:[],langAlias:e?.langAlias,engine:r()})}});function Rc(e){return(0,$.jsx)(Fc,{highlighter:()=>Lc.getOrInit(),options:{themes:{light:`github-light`,dark:`github-dark`}},...e})}function zc(e){return(0,$.jsx)(`div`,{...e,className:s(`grid grid-cols-2 gap-3 @container`,e.className),children:e.children})}function Bc({icon:e,title:t,description:n,...r}){return(0,$.jsxs)(r.href?ee:`div`,{...r,"data-card":!0,className:s(`block rounded-xl border bg-fd-card p-4 text-fd-card-foreground transition-colors @max-lg:col-span-full`,r.href&&`hover:bg-fd-accent/80`,r.className),children:[e?(0,$.jsx)(`div`,{className:`not-prose mb-2 w-fit shadow-md rounded-lg border bg-fd-muted p-1.5 text-fd-muted-foreground [&_svg]:size-4`,children:e}):null,(0,$.jsx)(`h3`,{className:`not-prose mb-1 text-sm font-medium`,children:t}),n?(0,$.jsx)(`p`,{className:`my-0! text-sm text-fd-muted-foreground`,children:n}):null,(0,$.jsx)(`div`,{className:`text-sm text-fd-muted-foreground prose-no-margin empty:hidden`,children:r.children})]})}var Vc=`size-5 -me-0.5 fill-(--callout-color) text-fd-card`;function Hc({children:e,title:t,...n}){return(0,$.jsxs)(Wc,{...n,children:[t&&(0,$.jsx)(Gc,{children:t}),(0,$.jsx)(Kc,{children:e})]})}function Uc(e){return e===`warn`?`warning`:e===`tip`?`info`:e}function Wc({type:e=`info`,icon:t,children:n,className:r,style:i,...a}){let o=Uc(e);return(0,$.jsxs)(`div`,{className:s(`flex gap-2 my-4 rounded-xl border bg-fd-card p-3 ps-1 text-sm text-fd-card-foreground shadow-md`,r),style:{"--callout-color":`var(--color-fd-${o}, var(--color-fd-muted))`,...i},...a,children:[(0,$.jsx)(`div`,{role:`none`,className:`w-0.5 bg-(--callout-color)/50 rounded-sm`}),t??{info:(0,$.jsx)(Ue,{className:Vc}),warning:(0,$.jsx)(Xe,{className:Vc}),error:(0,$.jsx)(Ve,{className:Vc}),success:(0,$.jsx)(Be,{className:Vc}),idea:(0,$.jsx)(We,{className:`size-5 -me-0.5 fill-(--callout-color) text-(--callout-color)`})}[o],(0,$.jsx)(`div`,{className:`flex flex-col gap-2 min-w-0 flex-1`,children:n})]})}function Gc({children:e,className:t,...n}){return(0,$.jsx)(`p`,{className:s(`font-medium my-0!`,t),...n,children:e})}function Kc({children:e,className:t,...n}){return(0,$.jsx)(`div`,{className:s(`text-fd-muted-foreground prose-no-margin empty:hidden`,t),...n,children:e})}function qc({as:e,className:t,...n}){let r=e??`h1`;return n.id?(0,$.jsxs)(r,{className:s(`flex scroll-m-28 flex-row items-center gap-2`,t),...n,children:[(0,$.jsx)(`a`,{"data-card":``,href:`#${n.id}`,className:`peer`,children:n.children}),(0,$.jsx)(Ge,{"aria-hidden":!0,className:`size-3.5 shrink-0 text-fd-muted-foreground opacity-0 transition-opacity peer-hover:opacity-100`})]}):(0,$.jsx)(r,{className:t,...n})}function Jc(e){return(0,$.jsx)(_,{sizes:`(max-width: 768px) 100vw, (max-width: 1200px) 70vw, 900px`,...e,className:s(`rounded-lg`,e.className)})}function Yc(e){return(0,$.jsx)(`div`,{className:`relative overflow-auto prose-no-margin my-6`,children:(0,$.jsx)(`table`,{...e})})}var Xc={CodeBlockTab:Dc,CodeBlockTabs:wc,CodeBlockTabsList:Tc,CodeBlockTabsTrigger:Ec,pre:e=>(0,$.jsx)(Sc,{...e,children:(0,$.jsx)(xc,{children:e.children})}),Card:Bc,Cards:zc,a:ee,img:Jc,h1:e=>(0,$.jsx)(qc,{as:`h1`,...e}),h2:e=>(0,$.jsx)(qc,{as:`h2`,...e}),h3:e=>(0,$.jsx)(qc,{as:`h3`,...e}),h4:e=>(0,$.jsx)(qc,{as:`h4`,...e}),h5:e=>(0,$.jsx)(qc,{as:`h5`,...e}),h6:e=>(0,$.jsx)(qc,{as:`h6`,...e}),table:Yc,Callout:Hc,CalloutContainer:Wc,CalloutTitle:Gc,CalloutDescription:Kc};function Zc(){return e=>{ke(e,[`text`,`element`],(e,t,n)=>{if(e.type===`element`&&e.tagName===`pre`)return`skip`;if(e.type!==`text`||!n||t===void 0)return;let r=e.value.split(/(?=\s)/).flatMap(e=>e.length===0?[]:{type:`element`,tagName:`span`,properties:{class:`animate-fd-fade-in`},children:[{type:`text`,value:e}]});return Object.assign(e,{type:`element`,tagName:`span`,properties:{},children:r}),`skip`})}}function Qc(){let e=Me().use(ks).use(Le).use(Zc);return{async process(t){let n=e.parse({value:t});return Re(await e.run(n),{development:!1,jsx:$.jsx,jsxs:$.jsxs,Fragment:$.Fragment,components:{...Xc,pre:$c,img:void 0}})}}}function $c(e){let t=E.Children.only(e.children).props,n=t.children;if(typeof n!=`string`)return null;let r=t.className?.split(` `).find(e=>e.startsWith(`language-`))?.slice(9)??`text`;return r===`mdx`&&(r=`md`),(0,$.jsx)(Rc,{lang:r,code:n.trimEnd()})}var el=Qc();function tl({text:e}){let t=(0,E.useDeferredValue)(e);return(0,$.jsx)(E.Suspense,{fallback:(0,$.jsx)(`p`,{className:`invisible`,children:e}),children:(0,$.jsx)(rl,{text:t})})}var nl=new Map;function rl({text:e}){let t=nl.get(e)??el.process(e);return nl.set(e,t),(0,E.use)(t)}var il=(0,E.createContext)(null);function al({className:e,...t}){let{setOpen:n}=vl();return(0,$.jsxs)(`div`,{className:s(`sticky top-0 flex items-start gap-2 border rounded-xl bg-fd-secondary text-fd-secondary-foreground shadow-sm`,e),...t,children:[(0,$.jsxs)(`div`,{className:`px-3 py-2 flex-1`,children:[(0,$.jsx)(`p`,{className:`text-sm font-medium mb-2`,children:`AI Chat`}),(0,$.jsx)(`p`,{className:`text-xs text-fd-muted-foreground`,children:`AI can be inaccurate, please verify the answers.`})]}),(0,$.jsx)(`button`,{"aria-label":`Close`,tabIndex:-1,className:s(u({size:`icon-sm`,color:`ghost`,className:`text-fd-muted-foreground rounded-full`})),onClick:()=>n(!1),children:(0,$.jsx)(ie,{})})]})}function ol(){let{messages:e,status:t,setMessages:n,regenerate:r}=yl(),i=t===`streaming`;return e.length===0?null:(0,$.jsxs)($.Fragment,{children:[!i&&e.at(-1)?.role===`assistant`&&(0,$.jsxs)(`button`,{type:`button`,className:s(u({color:`secondary`,size:`sm`,className:`rounded-full gap-1.5`})),onClick:()=>r(),children:[(0,$.jsx)(Je,{className:`size-4`}),`Retry`]}),(0,$.jsx)(`button`,{type:`button`,className:s(u({color:`secondary`,size:`sm`,className:`rounded-full`})),onClick:()=>n([]),children:`Clear Chat`})]})}var sl=`__ai_search_input`;function cl(e){let{status:t,sendMessage:n,stop:r}=yl(),[i,a]=(0,E.useState)(()=>localStorage.getItem(sl)??``),o=t===`streaming`||t===`submitted`,c=e=>{e?.preventDefault(),n({text:i}),a(``),localStorage.removeItem(sl)};return(0,E.useEffect)(()=>{o&&document.getElementById(`nd-ai-input`)?.focus()},[o]),(0,$.jsxs)(`form`,{...e,className:s(`flex items-start pe-2`,e.className),onSubmit:c,children:[(0,$.jsx)(ul,{value:i,placeholder:o?`AI is answering...`:`Ask a question`,autoFocus:!0,className:`p-3`,disabled:t===`streaming`||t===`submitted`,onChange:e=>{a(e.target.value),localStorage.setItem(sl,e.target.value)},onKeyDown:e=>{!e.shiftKey&&e.key===`Enter`&&c(e)}}),o?(0,$.jsxs)(`button`,{type:`button`,className:s(u({color:`secondary`,className:`transition-all rounded-full mt-2 gap-2`})),onClick:r,children:[(0,$.jsx)(Ke,{className:`size-4 animate-spin text-fd-muted-foreground`}),`Abort Answer`]},`bn`):(0,$.jsx)(`button`,{type:`submit`,className:s(u({color:`primary`,className:`transition-all rounded-full mt-2`})),disabled:i.length===0,children:(0,$.jsx)(Ye,{className:`size-4`})},`bn`)]})}function ll(e){let t=(0,E.useRef)(null);return(0,E.useEffect)(()=>{if(!t.current)return;function e(){let e=t.current;e&&e.scrollTo({top:e.scrollHeight,behavior:`instant`})}let n=new ResizeObserver(e);e();let r=t.current?.firstElementChild;return r&&n.observe(r),()=>{n.disconnect()}},[]),(0,$.jsx)(`div`,{ref:t,...e,className:s(`fd-scroll-container overflow-y-auto min-w-0 flex flex-col`,e.className),children:e.children})}function ul(e){let t=(0,E.useRef)(null),n=s(`col-start-1 row-start-1`,e.className);return(0,$.jsxs)(`div`,{className:`grid flex-1`,children:[(0,$.jsx)(`textarea`,{id:`nd-ai-input`,...e,className:s(`resize-none bg-transparent placeholder:text-fd-muted-foreground focus-visible:outline-none`,n)}),(0,$.jsx)(`div`,{ref:t,className:s(n,`break-all invisible`),children:`${e.value?.toString()??``}\n`})]})}var dl={user:`you`,assistant:`fumadocs`};function fl({message:e,...t}){let n=``,r=[];for(let t of e.parts??[]){if(t.type===`text`){n+=t.text;continue}if(t.type.startsWith(`tool-`)){let e=t.type.slice(5),n=t;if(e!==`search`||!n.toolCallId)continue;r.push(n)}}return(0,$.jsxs)(`div`,{onClick:e=>e.stopPropagation(),...t,children:[(0,$.jsx)(`p`,{className:s(`mb-1 text-sm font-medium text-fd-muted-foreground`,e.role===`assistant`&&`text-fd-primary`),children:dl[e.role]??`unknown`}),(0,$.jsx)(`div`,{className:`prose text-sm`,children:(0,$.jsx)(tl,{text:n})}),r.map(e=>(0,$.jsxs)(`div`,{className:`flex flex-row gap-2 items-center mt-3 rounded-lg border bg-fd-secondary text-fd-muted-foreground text-xs p-2`,children:[(0,$.jsx)(re,{className:`size-4`}),e.state===`output-error`||e.state===`output-denied`?(0,$.jsx)(`p`,{className:`text-fd-error`,children:e.errorText??`Failed to search`}):(0,$.jsx)(`p`,{children:e.output?`${e.output.length} search results`:`Searching…`})]},e.toolCallId))]})}function pl({children:e}){let[t,n]=(0,E.useState)(!1),r=Ta({id:`search`,transport:new ca({api:`/api/chat`})});return(0,$.jsx)(il,{value:(0,E.useMemo)(()=>({chat:r,open:t,setOpen:n}),[r,t]),children:e})}function ml({position:e=`default`,className:t,...n}){let{open:r,setOpen:i}=vl();return(0,$.jsx)(`button`,{"data-state":r?`open`:`closed`,className:s(e===`float`&&[`fixed bottom-4 gap-3 w-24 inset-e-[calc(--spacing(4)+var(--removed-body-scroll-bar-size,0px))] shadow-lg z-20 transition-[translate,opacity]`,r&&`translate-y-10 opacity-0`],t),onClick:()=>i(!r),...n,children:n.children})}function hl(){let{open:e,setOpen:t}=vl();return _l(),(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`style`,{children:`
24
24
  @keyframes ask-ai-open {
25
25
  from {
26
26
  translate: 100% 0;
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/search-default-CY256poQ.js","assets/index-CZbzZwd9.js","assets/chunk-DZNXM-SG.js","assets/createLucideIcon-Dx8fEl1v.js","assets/Icon-D2s1si6D.js","assets/dist-DxUH5STn.js","assets/lib-DkNh1mzO.js","assets/remark-CaTRcSSz.js","assets/zwitch-BxrjjRJo.js","assets/space-separated-tokens-Bqpy-XNk.js","assets/html-void-elements-CVaJ_hlA.js","assets/chevron-right-BnE_VbwC.js","assets/search-DU2pNx2k.js","assets/framework-CtqQbB2q.js","assets/use-on-change-CLiICbWI.js","assets/i18n-CLx-mz86.js"])))=>i.map(i=>d[i]);
2
- import{a as e}from"./chunk-DZNXM-SG.js";import{c as t,i as n,r,s as i,u as a}from"./index-CZbzZwd9.js";import{t as o}from"./framework-CtqQbB2q.js";import{n as s}from"./i18n-CLx-mz86.js";import{r as c,t as l}from"./dist-CfNcH_72.js";import{t as u}from"./dist-5zSB113r.js";import{f as d,h as f,l as p,s as m}from"./schemas-CMfwGsMz.js";var h=m(`type`,[d({type:p(`clear-cache`),absolutePath:f()}),d({type:p(`revalidate`)})]);function g(e){try{return h.safeParse(JSON.parse(e)).data}catch{return}}var _=e(a(),1),v=e(i(),1);function y(){let e=n();return(0,_.useEffect)(()=>{let t=new URL(`/_ws`,window.location.href);t.protocol=t.protocol===`https`?`wss`:`ws`;let n=new WebSocket(t);return n.addEventListener(`message`,t=>{let n=g(t.data);n&&(console.log(`Received:`,n),n.type===`revalidate`&&e.reload())}),()=>{n.close()}},[]),(0,v.jsx)(v.Fragment,{})}var b=(0,_.lazy)(()=>t(()=>import(`./search-default-CY256poQ.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])));function x({children:e,dir:t=`ltr`,theme:n={},search:r,i18n:i}){let a=e;return r?.enabled!==!1&&(a=(0,v.jsx)(c,{SearchDialog:b,...r,children:a})),n?.enabled!==!1&&(a=(0,v.jsx)(l,{attribute:`class`,defaultTheme:`system`,enableSystem:!0,disableTransitionOnChange:!0,...n,children:a})),i&&(a=(0,v.jsx)(s,{...i,children:a})),(0,v.jsx)(u,{dir:t,children:a})}var S={usePathname(){let{path:e}=n();return e},useParams(){let{query:e}=n();return(0,_.useMemo)(()=>{let t=new URLSearchParams(e);return Object.fromEntries(Array.from(t.entries()).map(([e,t])=>[e,Array.isArray(t)?t[0]:t]))},[e])},useRouter(){let e=n();return(0,_.useMemo)(()=>({push(t){e.push(t)},refresh(){e.push(e.path)}}),[e])},Link({href:e,prefetch:t=!0,...n}){return(0,v.jsx)(r,{to:e,unstable_prefetchOnEnter:t,...n,children:n.children})}};function C({children:e,Link:t,Image:n}){return(0,v.jsx)(o,{...S,Link:t??S.Link,Image:n??S.Image,children:e})}function w({components:e,...t}){return(0,v.jsx)(C,{Link:e?.Link,Image:e?.Image,children:(0,v.jsx)(x,{...t,children:t.children})})}function T({children:e}){return(0,v.jsx)(w,{children:e})}var E={HotReload:y},D={Provider:T};export{E as export_607cd537d716,D as export_75b87872b5db};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/search-default-D97pROgr.js","assets/index-DJk6G_x5.js","assets/chunk-DZNXM-SG.js","assets/createLucideIcon-YLHYIeJE.js","assets/Icon-CJyYvzMg.js","assets/dist-D2evd4Yy.js","assets/lib-DkNh1mzO.js","assets/remark-CaTRcSSz.js","assets/zwitch-BxrjjRJo.js","assets/space-separated-tokens-Bqpy-XNk.js","assets/html-void-elements-CVaJ_hlA.js","assets/chevron-right-hYwrlb4_.js","assets/search-DD8Q-mr_.js","assets/framework-BG7fkGZ9.js","assets/use-on-change-D-ewV_74.js","assets/i18n-BOd_bK-C.js"])))=>i.map(i=>d[i]);
2
+ import{a as e}from"./chunk-DZNXM-SG.js";import{c as t,i as n,r,s as i,u as a}from"./index-DJk6G_x5.js";import{t as o}from"./framework-BG7fkGZ9.js";import{n as s}from"./i18n-BOd_bK-C.js";import{r as c,t as l}from"./dist-CN-yjLyH.js";import{t as u}from"./dist-C_O3KiWo.js";import{f as d,h as f,l as p,s as m}from"./schemas-CMfwGsMz.js";var h=m(`type`,[d({type:p(`clear-cache`),absolutePath:f()}),d({type:p(`revalidate`)})]);function g(e){try{return h.safeParse(JSON.parse(e)).data}catch{return}}var _=e(a(),1),v=e(i(),1);function y(){let e=n();return(0,_.useEffect)(()=>{let t=new URL(`/_ws`,window.location.href);t.protocol=t.protocol===`https`?`wss`:`ws`;let n=new WebSocket(t);return n.addEventListener(`message`,t=>{let n=g(t.data);n&&(console.log(`Received:`,n),n.type===`revalidate`&&e.reload())}),()=>{n.close()}},[]),(0,v.jsx)(v.Fragment,{})}var b=(0,_.lazy)(()=>t(()=>import(`./search-default-D97pROgr.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])));function x({children:e,dir:t=`ltr`,theme:n={},search:r,i18n:i}){let a=e;return r?.enabled!==!1&&(a=(0,v.jsx)(c,{SearchDialog:b,...r,children:a})),n?.enabled!==!1&&(a=(0,v.jsx)(l,{attribute:`class`,defaultTheme:`system`,enableSystem:!0,disableTransitionOnChange:!0,...n,children:a})),i&&(a=(0,v.jsx)(s,{...i,children:a})),(0,v.jsx)(u,{dir:t,children:a})}var S={usePathname(){let{path:e}=n();return e},useParams(){let{query:e}=n();return(0,_.useMemo)(()=>{let t=new URLSearchParams(e);return Object.fromEntries(Array.from(t.entries()).map(([e,t])=>[e,Array.isArray(t)?t[0]:t]))},[e])},useRouter(){let e=n();return(0,_.useMemo)(()=>({push(t){e.push(t)},refresh(){e.push(e.path)}}),[e])},Link({href:e,prefetch:t=!0,...n}){return(0,v.jsx)(r,{to:e,unstable_prefetchOnEnter:t,...n,children:n.children})}};function C({children:e,Link:t,Image:n}){return(0,v.jsx)(o,{...S,Link:t??S.Link,Image:n??S.Image,children:e})}function w({components:e,...t}){return(0,v.jsx)(C,{Link:e?.Link,Image:e?.Image,children:(0,v.jsx)(x,{...t,children:t.children})})}function T({children:e}){return(0,v.jsx)(w,{children:e})}var E={HotReload:y},D={Provider:T};export{E as export_607cd537d716,D as export_75b87872b5db};
@@ -0,0 +1 @@
1
+ import{t as e}from"./createLucideIcon-YLHYIeJE.js";var t=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t};
@@ -1,3 +1,3 @@
1
- import{a as e}from"./chunk-DZNXM-SG.js";import{s as t,u as n}from"./index-CZbzZwd9.js";import{g as r,h as i,m as a}from"./createLucideIcon-Dx8fEl1v.js";import{i as o}from"./framework-CtqQbB2q.js";import{c as s,d as c,f as l,l as u,u as d}from"./collapsible-BuNjVR-T.js";import{C as f,D as p,E as m,S as h,T as g,_,a as v,b as y,c as b,d as ee,f as te,g as ne,h as re,i as x,l as S,m as C,n as w,o as T,p as E,r as D,s as ie,t as ae,u as oe,v as O,w as se,y as k}from"./link-item-CC5M5LQI.js";import{n as A,r as ce,t as j}from"./merge-refs-B0cNRJJJ.js";var M=e(n(),1);function N({enabled:e=!0}){let[t,n]=(0,M.useState)();return(0,M.useEffect)(()=>{if(!e)return;let t=()=>{n(window.scrollY<10)};return t(),window.addEventListener(`scroll`,t),()=>{window.removeEventListener(`scroll`,t)}},[e]),t}var P=e(t(),1),F=i(`relative flex flex-row items-center gap-2 rounded-lg p-2 text-start text-fd-muted-foreground wrap-anywhere [&_svg]:size-4 [&_svg]:shrink-0`,{variants:{variant:{link:`transition-colors hover:bg-fd-accent/50 hover:text-fd-accent-foreground/80 hover:transition-none data-[active=true]:bg-fd-primary/10 data-[active=true]:text-fd-primary data-[active=true]:hover:transition-colors`,button:`transition-colors hover:bg-fd-accent/50 hover:text-fd-accent-foreground/80 hover:transition-none`},highlight:{true:`data-[active=true]:before:content-[''] data-[active=true]:before:bg-fd-primary data-[active=true]:before:absolute data-[active=true]:before:w-px data-[active=true]:before:inset-y-2.5 data-[active=true]:before:inset-s-2.5`}}}),{useSidebar:I}=ne;function L(e){return(0,P.jsx)(te,{...e})}function R({footer:e,banner:t,collapsible:n=!0,components:i,...o}){let{menuItems:c,slots:l,props:{tabs:u,nav:d,tabMode:f}}=$(),p=c.filter(e=>e.type===`icon`),h=(0,P.jsxs)(re,{children:[c.filter(e=>e.type!==`icon`).map((e,t,n)=>(0,P.jsx)(ue,{item:e,className:r(t===n.length-1&&`mb-4`)},t)),(0,P.jsx)(le,{...i})]});return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(H,{...o,children:[(0,P.jsxs)(`div`,{className:`flex flex-col gap-3 p-4 pb-2`,children:[(0,P.jsxs)(`div`,{className:`flex`,children:[l.navTitle&&(0,P.jsx)(l.navTitle,{className:`inline-flex text-[0.9375rem] items-center gap-2.5 font-medium me-auto`}),d?.children,n&&(0,P.jsx)(B,{className:r(a({color:`ghost`,size:`icon-sm`,className:`mb-auto text-fd-muted-foreground`})),children:(0,P.jsx)(g,{})})]}),l.searchTrigger&&(0,P.jsx)(l.searchTrigger.full,{hideIfDisabled:!0}),u.length>0&&f===`auto`&&(0,P.jsx)(Y,{tabs:u}),t]}),h,(l.languageSelect||p.length>0||l.themeSwitch||e)&&(0,P.jsxs)(`div`,{className:`flex flex-col p-4 pt-2`,children:[l.languageSelect&&(0,P.jsxs)(l.languageSelect.root,{variant:`secondary`,className:`text-fd-muted-foreground text-start justify-start bg-fd-secondary/50 mb-2`,children:[(0,P.jsx)(m,{className:`size-4.5`}),(0,P.jsx)(l.languageSelect.text,{}),(0,P.jsx)(s,{className:`ms-auto size-3.5`})]}),(0,P.jsxs)(`div`,{className:`flex text-fd-muted-foreground items-center border bg-fd-secondary/50 p-0.5 pe-0 rounded-lg empty:hidden`,children:[p.map((e,t)=>(0,P.jsx)(k,{item:e,className:r(a({size:`icon-sm`,color:`ghost`})),"aria-label":e.label,children:e.icon},t)),l.themeSwitch&&(0,P.jsx)(l.themeSwitch,{className:`px-1 py-0 border-y-0 border-e-0 rounded-none ms-auto *:rounded-md`})]}),e]})]}),(0,P.jsxs)(U,{children:[(0,P.jsxs)(`div`,{className:`flex flex-col gap-3 p-4 pb-2`,children:[(0,P.jsxs)(`div`,{className:`flex text-fd-muted-foreground items-center gap-1.5`,children:[(0,P.jsx)(`div`,{className:`flex flex-1`,children:p.map((e,t)=>(0,P.jsx)(k,{item:e,className:r(a({size:`icon-sm`,color:`ghost`,className:`p-2`})),"aria-label":e.label,children:e.icon},t))}),l.languageSelect&&(0,P.jsxs)(l.languageSelect.root,{children:[(0,P.jsx)(m,{className:`size-4.5`}),(0,P.jsx)(l.languageSelect.text,{})]}),l.themeSwitch&&(0,P.jsx)(l.themeSwitch,{className:`p-0`}),(0,P.jsx)(V,{className:r(a({color:`ghost`,size:`icon-sm`,className:`p-2`})),children:(0,P.jsx)(g,{})})]}),u.length>0&&(0,P.jsx)(Y,{tabs:u}),t]}),h,(0,P.jsx)(`div`,{className:`flex flex-col border-t p-4 pt-2 empty:hidden`,children:e})]})]})}function z(e){return(0,P.jsx)(ie,{...e})}function B(e){return(0,P.jsx)(D,{...e})}function V(e){return(0,P.jsx)(C,{...e})}function H({ref:e,className:t,children:n,...i}){let o=(0,M.useRef)(null);return(0,P.jsx)(x,{children:({collapsed:s,hovered:c,ref:l,...u})=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{"data-sidebar-placeholder":``,className:`sticky top-(--fd-docs-row-1) z-20 [grid-area:sidebar] pointer-events-none *:pointer-events-auto h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] md:layout:[--fd-sidebar-width:268px] max-md:hidden`,children:[s&&(0,P.jsx)(`div`,{className:`absolute inset-s-0 inset-y-0 w-4`,...u}),(0,P.jsx)(`aside`,{id:`nd-sidebar`,ref:j(o,e,l),"data-collapsed":s,"data-hovered":s&&c,className:r(`absolute flex flex-col w-full inset-s-0 inset-y-0 items-end bg-fd-card text-sm border-e duration-250 *:w-(--fd-sidebar-width)`,s&&[`inset-y-2 rounded-xl transition-transform border w-(--fd-sidebar-width)`,c?`shadow-lg translate-x-2 rtl:-translate-x-2`:`-translate-x-(--fd-sidebar-width) rtl:translate-x-full`],o.current&&o.current.getAttribute(`data-collapsed`)===`true`!==s&&`transition-[width,inset-block,translate,background-color]`,t),...i,...u,children:n})]}),(0,P.jsxs)(`div`,{"data-sidebar-panel":``,className:r(`fixed flex top-[calc(--spacing(4)+var(--fd-docs-row-3))] inset-s-4 shadow-lg transition-opacity rounded-xl p-0.5 border bg-fd-muted text-fd-muted-foreground z-10`,(!s||c)&&`pointer-events-none opacity-0`),children:[(0,P.jsx)(D,{className:r(a({color:`ghost`,size:`icon-sm`,className:`rounded-lg`})),children:(0,P.jsx)(g,{})}),(0,P.jsx)(se,{className:`rounded-lg`,hideIfDisabled:!0})]})]})})}function U({children:e,className:t,...n}){return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(T,{className:`fixed z-40 inset-0 backdrop-blur-xs data-[state=open]:animate-fd-fade-in data-[state=closed]:animate-fd-fade-out`}),(0,P.jsx)(v,{className:r(`fixed text-[0.9375rem] flex flex-col shadow-lg border-s inset-e-0 inset-y-0 w-[85%] max-w-[380px] z-40 bg-fd-background data-[state=open]:animate-fd-sidebar-in data-[state=closed]:animate-fd-sidebar-out`,t),...n,children:e})]})}function W({className:e,style:t,children:n,...i}){let a=O();return(0,P.jsx)(E,{className:r(`inline-flex items-center gap-2 mb-1 px-2 mt-6 empty:mb-0 [&_svg]:size-4 [&_svg]:shrink-0`,a===0&&`first:mt-0`,e),style:{paddingInlineStart:X(a),...t},...i,children:n})}function G({className:e,style:t,children:n,...i}){let a=O();return(0,P.jsx)(ee,{className:r(F({variant:`link`,highlight:a>=1}),e),style:{paddingInlineStart:X(a),...t},...i,children:n})}function K({className:e,style:t,...n}){let{depth:i,collapsible:a}=_();return(0,P.jsx)(oe,{className:r(F({variant:a?`button`:null}),`w-full`,e),style:{paddingInlineStart:X(i-1),...t},...n,children:n.children})}function q({className:e,style:t,...n}){let i=O();return(0,P.jsx)(S,{className:r(F({variant:`link`,highlight:i>1}),`w-full`,e),style:{paddingInlineStart:X(i-1),...t},...n,children:n.children})}function J({className:e,children:t,...n}){return(0,P.jsx)(b,{className:r(`relative`,O()===1&&`before:content-[''] before:absolute before:w-px before:inset-y-1 before:bg-fd-border before:inset-s-2.5`,e),...n,children:(0,P.jsx)(`div`,{className:`flex flex-col gap-0.5 pt-0.5`,children:t})})}function Y({tabs:e,placeholder:t,...n}){let[i,a]=(0,M.useState)(!1),{closeOnRedirect:s}=I(),l=o(),f=(0,M.useMemo)(()=>e.findLast(e=>h(e,l)),[e,l]),m=()=>{s.current=!1,a(!1)},g=f?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`div`,{className:`size-9 shrink-0 empty:hidden md:size-5`,children:f.icon}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`p`,{className:`text-sm font-medium`,children:f.title}),(0,P.jsx)(`p`,{className:`text-sm text-fd-muted-foreground empty:hidden md:hidden`,children:f.description})]})]}):t;return(0,P.jsxs)(u,{open:i,onOpenChange:a,children:[g&&(0,P.jsxs)(c,{...n,className:r(`flex items-center gap-2 rounded-lg p-2 border bg-fd-secondary/50 text-start text-fd-secondary-foreground transition-colors hover:bg-fd-accent data-[state=open]:bg-fd-accent data-[state=open]:text-fd-accent-foreground`,n.className),children:[g,(0,P.jsx)(p,{className:`shrink-0 ms-auto size-4 text-fd-muted-foreground`})]}),(0,P.jsx)(d,{className:`flex flex-col gap-1 w-(--radix-popover-trigger-width) p-1 fd-scroll-container`,children:e.map(e=>{let t=f&&e.url===f.url;if(!(!t&&e.unlisted))return(0,P.jsxs)(A,{href:e.url,onClick:m,...e.props,className:r(`flex items-center gap-2 rounded-lg p-1.5 hover:bg-fd-accent hover:text-fd-accent-foreground`,e.props?.className),children:[(0,P.jsx)(`div`,{className:`shrink-0 size-9 md:mb-auto md:size-5 empty:hidden`,children:e.icon}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`p`,{className:`text-sm font-medium leading-none`,children:e.title}),(0,P.jsx)(`p`,{className:`text-[0.8125rem] text-fd-muted-foreground mt-1 empty:hidden`,children:e.description})]}),(0,P.jsx)(ce,{className:r(`shrink-0 ms-auto size-3.5 text-fd-primary`,!t&&`invisible`)})]},e.url)})})]})}function X(e){return`calc(${2+3*e} * var(--spacing))`}var le=w({SidebarFolder:z,SidebarFolderContent:J,SidebarFolderLink:q,SidebarFolderTrigger:K,SidebarItem:G,SidebarSeparator:W}),ue=ae({SidebarFolder:z,SidebarFolderContent:J,SidebarFolderLink:q,SidebarFolderTrigger:K,SidebarItem:G});function de(e){let{isNavTransparent:t,slots:n,props:{nav:i}}=$();return i?.component?i.component:(0,P.jsxs)(`header`,{id:`nd-subnav`,"data-transparent":t,...e,className:r(`[grid-area:header] sticky top-(--fd-docs-row-1) z-30 flex items-center ps-4 pe-2.5 border-b transition-colors backdrop-blur-sm h-(--fd-header-height) md:hidden max-md:layout:[--fd-header-height:--spacing(14)] data-[transparent=false]:bg-fd-background/80`,e.className),children:[n.navTitle&&(0,P.jsx)(n.navTitle,{className:`inline-flex items-center gap-2.5 font-semibold`}),(0,P.jsx)(`div`,{className:`flex-1`,children:i?.children}),n.searchTrigger&&(0,P.jsx)(n.searchTrigger.sm,{hideIfDisabled:!0,className:`p-2`}),n.sidebar&&(0,P.jsx)(n.sidebar.trigger,{className:r(a({color:`ghost`,size:`icon-sm`,className:`p-2`})),children:(0,P.jsx)(g,{})})]})}function Z(e){let{slots:t}=$(),{collapsed:n}=t.sidebar.useSidebar(),[i,a]=(0,M.useState)(n),o=i!==n;return(0,M.useEffect)(()=>{o&&a(n)},[n,o]),(0,P.jsx)(`div`,{id:`nd-docs-layout`,"data-sidebar-collapsed":n,"data-column-changed":o,...e,style:{gridTemplate:`"sidebar sidebar header toc toc"
1
+ import{a as e}from"./chunk-DZNXM-SG.js";import{s as t,u as n}from"./index-DJk6G_x5.js";import{g as r,h as i,m as a}from"./createLucideIcon-YLHYIeJE.js";import{i as o}from"./framework-BG7fkGZ9.js";import{c as s,d as c,f as l,l as u,u as d}from"./collapsible-BK0o4AqC.js";import{C as f,D as p,E as m,S as h,T as g,_,a as v,b as y,c as b,d as ee,f as te,g as ne,h as re,i as x,l as S,m as C,n as w,o as T,p as E,r as D,s as ie,t as ae,u as oe,v as O,w as se,y as k}from"./link-item-BbFJ2W59.js";import{n as A,r as ce,t as j}from"./merge-refs-2vj-9N_8.js";var M=e(n(),1);function N({enabled:e=!0}){let[t,n]=(0,M.useState)();return(0,M.useEffect)(()=>{if(!e)return;let t=()=>{n(window.scrollY<10)};return t(),window.addEventListener(`scroll`,t),()=>{window.removeEventListener(`scroll`,t)}},[e]),t}var P=e(t(),1),F=i(`relative flex flex-row items-center gap-2 rounded-lg p-2 text-start text-fd-muted-foreground wrap-anywhere [&_svg]:size-4 [&_svg]:shrink-0`,{variants:{variant:{link:`transition-colors hover:bg-fd-accent/50 hover:text-fd-accent-foreground/80 hover:transition-none data-[active=true]:bg-fd-primary/10 data-[active=true]:text-fd-primary data-[active=true]:hover:transition-colors`,button:`transition-colors hover:bg-fd-accent/50 hover:text-fd-accent-foreground/80 hover:transition-none`},highlight:{true:`data-[active=true]:before:content-[''] data-[active=true]:before:bg-fd-primary data-[active=true]:before:absolute data-[active=true]:before:w-px data-[active=true]:before:inset-y-2.5 data-[active=true]:before:inset-s-2.5`}}}),{useSidebar:I}=ne;function L(e){return(0,P.jsx)(te,{...e})}function R({footer:e,banner:t,collapsible:n=!0,components:i,...o}){let{menuItems:c,slots:l,props:{tabs:u,nav:d,tabMode:f}}=$(),p=c.filter(e=>e.type===`icon`),h=(0,P.jsxs)(re,{children:[c.filter(e=>e.type!==`icon`).map((e,t,n)=>(0,P.jsx)(ue,{item:e,className:r(t===n.length-1&&`mb-4`)},t)),(0,P.jsx)(le,{...i})]});return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(H,{...o,children:[(0,P.jsxs)(`div`,{className:`flex flex-col gap-3 p-4 pb-2`,children:[(0,P.jsxs)(`div`,{className:`flex`,children:[l.navTitle&&(0,P.jsx)(l.navTitle,{className:`inline-flex text-[0.9375rem] items-center gap-2.5 font-medium me-auto`}),d?.children,n&&(0,P.jsx)(B,{className:r(a({color:`ghost`,size:`icon-sm`,className:`mb-auto text-fd-muted-foreground`})),children:(0,P.jsx)(g,{})})]}),l.searchTrigger&&(0,P.jsx)(l.searchTrigger.full,{hideIfDisabled:!0}),u.length>0&&f===`auto`&&(0,P.jsx)(Y,{tabs:u}),t]}),h,(l.languageSelect||p.length>0||l.themeSwitch||e)&&(0,P.jsxs)(`div`,{className:`flex flex-col p-4 pt-2`,children:[l.languageSelect&&(0,P.jsxs)(l.languageSelect.root,{variant:`secondary`,className:`text-fd-muted-foreground text-start justify-start bg-fd-secondary/50 mb-2`,children:[(0,P.jsx)(m,{className:`size-4.5`}),(0,P.jsx)(l.languageSelect.text,{}),(0,P.jsx)(s,{className:`ms-auto size-3.5`})]}),(0,P.jsxs)(`div`,{className:`flex text-fd-muted-foreground items-center border bg-fd-secondary/50 p-0.5 pe-0 rounded-lg empty:hidden`,children:[p.map((e,t)=>(0,P.jsx)(k,{item:e,className:r(a({size:`icon-sm`,color:`ghost`})),"aria-label":e.label,children:e.icon},t)),l.themeSwitch&&(0,P.jsx)(l.themeSwitch,{className:`px-1 py-0 border-y-0 border-e-0 rounded-none ms-auto *:rounded-md`})]}),e]})]}),(0,P.jsxs)(U,{children:[(0,P.jsxs)(`div`,{className:`flex flex-col gap-3 p-4 pb-2`,children:[(0,P.jsxs)(`div`,{className:`flex text-fd-muted-foreground items-center gap-1.5`,children:[(0,P.jsx)(`div`,{className:`flex flex-1`,children:p.map((e,t)=>(0,P.jsx)(k,{item:e,className:r(a({size:`icon-sm`,color:`ghost`,className:`p-2`})),"aria-label":e.label,children:e.icon},t))}),l.languageSelect&&(0,P.jsxs)(l.languageSelect.root,{children:[(0,P.jsx)(m,{className:`size-4.5`}),(0,P.jsx)(l.languageSelect.text,{})]}),l.themeSwitch&&(0,P.jsx)(l.themeSwitch,{className:`p-0`}),(0,P.jsx)(V,{className:r(a({color:`ghost`,size:`icon-sm`,className:`p-2`})),children:(0,P.jsx)(g,{})})]}),u.length>0&&(0,P.jsx)(Y,{tabs:u}),t]}),h,(0,P.jsx)(`div`,{className:`flex flex-col border-t p-4 pt-2 empty:hidden`,children:e})]})]})}function z(e){return(0,P.jsx)(ie,{...e})}function B(e){return(0,P.jsx)(D,{...e})}function V(e){return(0,P.jsx)(C,{...e})}function H({ref:e,className:t,children:n,...i}){let o=(0,M.useRef)(null);return(0,P.jsx)(x,{children:({collapsed:s,hovered:c,ref:l,...u})=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{"data-sidebar-placeholder":``,className:`sticky top-(--fd-docs-row-1) z-20 [grid-area:sidebar] pointer-events-none *:pointer-events-auto h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] md:layout:[--fd-sidebar-width:268px] max-md:hidden`,children:[s&&(0,P.jsx)(`div`,{className:`absolute inset-s-0 inset-y-0 w-4`,...u}),(0,P.jsx)(`aside`,{id:`nd-sidebar`,ref:j(o,e,l),"data-collapsed":s,"data-hovered":s&&c,className:r(`absolute flex flex-col w-full inset-s-0 inset-y-0 items-end bg-fd-card text-sm border-e duration-250 *:w-(--fd-sidebar-width)`,s&&[`inset-y-2 rounded-xl transition-transform border w-(--fd-sidebar-width)`,c?`shadow-lg translate-x-2 rtl:-translate-x-2`:`-translate-x-(--fd-sidebar-width) rtl:translate-x-full`],o.current&&o.current.getAttribute(`data-collapsed`)===`true`!==s&&`transition-[width,inset-block,translate,background-color]`,t),...i,...u,children:n})]}),(0,P.jsxs)(`div`,{"data-sidebar-panel":``,className:r(`fixed flex top-[calc(--spacing(4)+var(--fd-docs-row-3))] inset-s-4 shadow-lg transition-opacity rounded-xl p-0.5 border bg-fd-muted text-fd-muted-foreground z-10`,(!s||c)&&`pointer-events-none opacity-0`),children:[(0,P.jsx)(D,{className:r(a({color:`ghost`,size:`icon-sm`,className:`rounded-lg`})),children:(0,P.jsx)(g,{})}),(0,P.jsx)(se,{className:`rounded-lg`,hideIfDisabled:!0})]})]})})}function U({children:e,className:t,...n}){return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(T,{className:`fixed z-40 inset-0 backdrop-blur-xs data-[state=open]:animate-fd-fade-in data-[state=closed]:animate-fd-fade-out`}),(0,P.jsx)(v,{className:r(`fixed text-[0.9375rem] flex flex-col shadow-lg border-s inset-e-0 inset-y-0 w-[85%] max-w-[380px] z-40 bg-fd-background data-[state=open]:animate-fd-sidebar-in data-[state=closed]:animate-fd-sidebar-out`,t),...n,children:e})]})}function W({className:e,style:t,children:n,...i}){let a=O();return(0,P.jsx)(E,{className:r(`inline-flex items-center gap-2 mb-1 px-2 mt-6 empty:mb-0 [&_svg]:size-4 [&_svg]:shrink-0`,a===0&&`first:mt-0`,e),style:{paddingInlineStart:X(a),...t},...i,children:n})}function G({className:e,style:t,children:n,...i}){let a=O();return(0,P.jsx)(ee,{className:r(F({variant:`link`,highlight:a>=1}),e),style:{paddingInlineStart:X(a),...t},...i,children:n})}function K({className:e,style:t,...n}){let{depth:i,collapsible:a}=_();return(0,P.jsx)(oe,{className:r(F({variant:a?`button`:null}),`w-full`,e),style:{paddingInlineStart:X(i-1),...t},...n,children:n.children})}function q({className:e,style:t,...n}){let i=O();return(0,P.jsx)(S,{className:r(F({variant:`link`,highlight:i>1}),`w-full`,e),style:{paddingInlineStart:X(i-1),...t},...n,children:n.children})}function J({className:e,children:t,...n}){return(0,P.jsx)(b,{className:r(`relative`,O()===1&&`before:content-[''] before:absolute before:w-px before:inset-y-1 before:bg-fd-border before:inset-s-2.5`,e),...n,children:(0,P.jsx)(`div`,{className:`flex flex-col gap-0.5 pt-0.5`,children:t})})}function Y({tabs:e,placeholder:t,...n}){let[i,a]=(0,M.useState)(!1),{closeOnRedirect:s}=I(),l=o(),f=(0,M.useMemo)(()=>e.findLast(e=>h(e,l)),[e,l]),m=()=>{s.current=!1,a(!1)},g=f?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`div`,{className:`size-9 shrink-0 empty:hidden md:size-5`,children:f.icon}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`p`,{className:`text-sm font-medium`,children:f.title}),(0,P.jsx)(`p`,{className:`text-sm text-fd-muted-foreground empty:hidden md:hidden`,children:f.description})]})]}):t;return(0,P.jsxs)(u,{open:i,onOpenChange:a,children:[g&&(0,P.jsxs)(c,{...n,className:r(`flex items-center gap-2 rounded-lg p-2 border bg-fd-secondary/50 text-start text-fd-secondary-foreground transition-colors hover:bg-fd-accent data-[state=open]:bg-fd-accent data-[state=open]:text-fd-accent-foreground`,n.className),children:[g,(0,P.jsx)(p,{className:`shrink-0 ms-auto size-4 text-fd-muted-foreground`})]}),(0,P.jsx)(d,{className:`flex flex-col gap-1 w-(--radix-popover-trigger-width) p-1 fd-scroll-container`,children:e.map(e=>{let t=f&&e.url===f.url;if(!(!t&&e.unlisted))return(0,P.jsxs)(A,{href:e.url,onClick:m,...e.props,className:r(`flex items-center gap-2 rounded-lg p-1.5 hover:bg-fd-accent hover:text-fd-accent-foreground`,e.props?.className),children:[(0,P.jsx)(`div`,{className:`shrink-0 size-9 md:mb-auto md:size-5 empty:hidden`,children:e.icon}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`p`,{className:`text-sm font-medium leading-none`,children:e.title}),(0,P.jsx)(`p`,{className:`text-[0.8125rem] text-fd-muted-foreground mt-1 empty:hidden`,children:e.description})]}),(0,P.jsx)(ce,{className:r(`shrink-0 ms-auto size-3.5 text-fd-primary`,!t&&`invisible`)})]},e.url)})})]})}function X(e){return`calc(${2+3*e} * var(--spacing))`}var le=w({SidebarFolder:z,SidebarFolderContent:J,SidebarFolderLink:q,SidebarFolderTrigger:K,SidebarItem:G,SidebarSeparator:W}),ue=ae({SidebarFolder:z,SidebarFolderContent:J,SidebarFolderLink:q,SidebarFolderTrigger:K,SidebarItem:G});function de(e){let{isNavTransparent:t,slots:n,props:{nav:i}}=$();return i?.component?i.component:(0,P.jsxs)(`header`,{id:`nd-subnav`,"data-transparent":t,...e,className:r(`[grid-area:header] sticky top-(--fd-docs-row-1) z-30 flex items-center ps-4 pe-2.5 border-b transition-colors backdrop-blur-sm h-(--fd-header-height) md:hidden max-md:layout:[--fd-header-height:--spacing(14)] data-[transparent=false]:bg-fd-background/80`,e.className),children:[n.navTitle&&(0,P.jsx)(n.navTitle,{className:`inline-flex items-center gap-2.5 font-semibold`}),(0,P.jsx)(`div`,{className:`flex-1`,children:i?.children}),n.searchTrigger&&(0,P.jsx)(n.searchTrigger.sm,{hideIfDisabled:!0,className:`p-2`}),n.sidebar&&(0,P.jsx)(n.sidebar.trigger,{className:r(a({color:`ghost`,size:`icon-sm`,className:`p-2`})),children:(0,P.jsx)(g,{})})]})}function Z(e){let{slots:t}=$(),{collapsed:n}=t.sidebar.useSidebar(),[i,a]=(0,M.useState)(n),o=i!==n;return(0,M.useEffect)(()=>{o&&a(n)},[n,o]),(0,P.jsx)(`div`,{id:`nd-docs-layout`,"data-sidebar-collapsed":n,"data-column-changed":o,...e,style:{gridTemplate:`"sidebar sidebar header toc toc"
2
2
  "sidebar sidebar toc-popover toc toc"
3
3
  "sidebar sidebar main toc toc" 1fr / minmax(min-content, 1fr) var(--fd-sidebar-col) minmax(0, calc(var(--fd-layout-width,97rem) - var(--fd-sidebar-width) - var(--fd-toc-width))) var(--fd-toc-width) minmax(min-content, 1fr)`,"--fd-docs-row-1":`var(--fd-banner-height, 0px)`,"--fd-docs-row-2":`calc(var(--fd-docs-row-1) + var(--fd-header-height))`,"--fd-docs-row-3":`calc(var(--fd-docs-row-2) + var(--fd-toc-popover-height))`,"--fd-sidebar-col":n?`0px`:`var(--fd-sidebar-width)`,...e.style},className:r(`grid overflow-x-clip min-h-(--fd-docs-height) [--fd-docs-height:100dvh] [--fd-header-height:0px] [--fd-toc-popover-height:0px] [--fd-sidebar-width:0px] [--fd-toc-width:0px] data-[column-changed=true]:transition-[grid-template-columns]`,e.className),children:e.children})}var{useProvider:fe}=y({useProps(){return $().props}}),Q=(0,M.createContext)(null);function $(){let e=(0,M.use)(Q);if(!e)throw Error("Please use <DocsPage /> (`fumadocs-ui/layouts/docs/page`) under <DocsLayout /> (`fumadocs-ui/layouts/docs`).");return e}function pe(e){let{nav:{enabled:t=!0,transparentMode:n=`none`}={},sidebar:{enabled:r=!0,defaultOpenLevel:i,prefetch:a,...o}={},slots:s,tabs:c,tabMode:u=`auto`,tree:d,containerProps:p,children:m}=e,h=N({enabled:n===`top`})??!0,g=n===`top`?h:n===`always`,{baseSlots:_,baseProps:v}=fe(e),y=f(e),b={..._,header:s?.header??de,container:s?.container??Z,sidebar:s?.sidebar??{provider:L,root:R,trigger:V,useSidebar:I}};return(0,P.jsx)(l,{tree:d,children:(0,P.jsx)(Q,{value:{props:{tabMode:u,tabs:c,...v},isNavTransparent:g,slots:b,...y},children:(0,P.jsx)(b.sidebar.provider,{defaultOpenLevel:i,prefetch:a,children:(0,P.jsxs)(b.container,{...p,children:[t&&(0,P.jsx)(b.header,{}),r&&(0,P.jsx)(b.sidebar.root,{...o}),u===`top`&&c.length>0&&(0,P.jsx)(me,{tabs:c,className:`z-10 bg-fd-background border-b px-6 pt-3 xl:px-8 max-md:hidden`}),m]})})})})}function me({tabs:e,...t}){let n=o(),i=(0,M.useMemo)(()=>e.findLast(e=>h(e,n)),[e,n]);return(0,P.jsx)(`div`,{...t,className:r(`flex flex-row items-end gap-6 overflow-auto [grid-area:main]`,t.className),children:e.map((e,t)=>(0,P.jsx)(A,{href:e.url,className:r(`inline-flex border-b-2 border-transparent transition-colors items-center pb-1.5 font-medium gap-2 text-fd-muted-foreground text-sm text-nowrap hover:text-fd-accent-foreground`,e.unlisted&&i!==e&&`hidden`,i===e&&`border-fd-primary text-fd-primary`),children:e.title},t))})}export{$ as n,pe as t};
@@ -0,0 +1 @@
1
+ import{a as e,n as t,o as n,t as r}from"./index-DJk6G_x5.js";var i={Children:e,Slot:n},a={ErrorBoundary:r,INTERNAL_ServerRouter:t};export{a as export_6d786e16fc6b,i as export_d92f2698599f};
@@ -1 +1 @@
1
- import{a as e}from"./chunk-DZNXM-SG.js";import{l as t,s as n,u as r}from"./index-CZbzZwd9.js";import{a as i,d as a,f as o,g as s,i as c,l,n as u,o as d,p as f,r as p,s as m,t as h}from"./createLucideIcon-Dx8fEl1v.js";import{i as g}from"./framework-CtqQbB2q.js";import{a as _,c as v,i as y,o as b,r as x,s as S}from"./dist-DxUH5STn.js";var C=e(r(),1),w=e(n(),1);function T(e){return e.startsWith(`http://`)||e.startsWith(`https://`)?e:(e.startsWith(`/`)||(e=`/`+e),e.length>1&&e.endsWith(`/`)&&(e=e.slice(0,-1)),e)}function E(e,t,n={}){let{includeSeparator:r=!0}=n;function i(e){let n;for(let a of e){if(t(a)){let e=[];return n&&e.push(n),e.push(a),e}if(a.type===`separator`&&r){n=a;continue}if(a.type===`folder`){let e=a.index&&t(a.index)?[a.index]:i(a.children);if(e)return e.unshift(a),n&&e.unshift(n),e}}}return i(e)??null}function D(e,t,n){let{includePage:r=!1,includeSeparator:i=!1,includeRoot:a=!1}=n,o=[];for(let n=0;n<t.length;n++){let s=t[n];switch(s.type){case`page`:r&&o.push({name:s.name,url:s.url});break;case`folder`:if(s.root){o=[],a&&o.push({name:e.name,url:typeof a==`object`?a.url:s.index?.url});break}(n===t.length-1||s.index!==t[n+1])&&o.push({name:s.name,url:s.index?.url});break;case`separator`:s.name&&i&&o.push({name:s.name});break}}return o}function O(e,t){let n=T(t);return E(e,e=>e.type===`page`&&e.url===n)}var k=(0,C.createContext)(null),A=(0,C.createContext)([]);function j({tree:e,children:t}){let n=(0,C.useRef)(0),r=g(),i=(0,C.useMemo)(()=>e,[e.$id??e]),a=(0,C.useMemo)(()=>O(i.children,r)??(i.fallback?O(i.fallback.children,r):null)??[],[i,r]),o=a.findLast(e=>e.type===`folder`&&e.root)??i;return o.$id??=String(n.current++),(0,w.jsx)(k,{value:(0,C.useMemo)(()=>({root:o,full:i}),[o,i]),children:(0,w.jsx)(A,{value:a,children:t})})}function M(){return(0,C.use)(A)}function N(){let e=(0,C.use)(k);if(!e)throw Error(`You must wrap this component under <DocsLayout />`);return e}var ee=[`top`,`right`,`bottom`,`left`],P=Math.min,F=Math.max,I=Math.round,te=Math.floor,L=e=>({x:e,y:e}),R={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function ne(e,t,n){return F(e,P(t,n))}function z(e,t){return typeof e==`function`?e(t):e}function B(e){return e.split(`-`)[0]}function V(e){return e.split(`-`)[1]}function re(e){return e===`x`?`y`:`x`}function ie(e){return e===`y`?`height`:`width`}function H(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ae(e){return re(H(e))}function oe(e,t,n){n===void 0&&(n=!1);let r=V(e),i=ae(e),a=ie(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=he(o)),[o,he(o)]}function se(e){let t=he(e);return[ce(e),t,ce(t)]}function ce(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var le=[`left`,`right`],ue=[`right`,`left`],de=[`top`,`bottom`],fe=[`bottom`,`top`];function pe(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ue:le:t?le:ue;case`left`:case`right`:return t?de:fe;default:return[]}}function me(e,t,n,r){let i=V(e),a=pe(B(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ce)))),a}function he(e){let t=B(e);return R[t]+e.slice(t.length)}function ge(e){return{top:0,right:0,bottom:0,left:0,...e}}function _e(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ge(e)}function ve(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ye(e,t,n){let{reference:r,floating:i}=e,a=H(t),o=ae(t),s=ie(o),c=B(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(V(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function be(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=z(t,e),p=_e(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ve(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ve(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var xe=50,Se=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:be},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ye(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<xe&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ye(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Ce=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=z(e,t)||{};if(l==null)return{};let d=_e(u),f={x:n,y:r},p=ae(i),m=ie(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=P(d[_],T),D=P(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=ne(O,A,k),M=!c.arrow&&V(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),we=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=z(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=B(r),_=H(o),v=B(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[he(o)]:se(o)),x=p!==`none`;!d&&x&&b.push(...me(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=oe(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==H(t))||T.every(e=>H(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=H(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Te(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ee(e){return ee.some(t=>e[t]>=0)}var De=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=z(e,t);switch(i){case`referenceHidden`:{let e=Te(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ee(e)}}}case`escaped`:{let e=Te(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ee(e)}}}default:return{}}}}},Oe=new Set([`left`,`top`]);async function ke(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=B(n),s=V(n),c=H(n)===`y`,l=Oe.has(o)?-1:1,u=a&&c?-1:1,d=z(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Ae=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await ke(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},je=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=z(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=H(B(i)),p=re(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=ne(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=ne(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Me=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=z(e,t),u={x:n,y:r},d=H(i),f=re(d),p=u[f],m=u[d],h=z(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Oe.has(B(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Ne=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=z(e,t),u=await o.detectOverflow(t,l),d=B(i),f=V(i),p=H(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=P(h-u[g],v),x=P(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=F(u.left,0),t=F(u.right,0),n=F(u.top,0),r=F(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:F(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:F(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Pe(){return typeof window<`u`}function U(e){return Fe(e)?(e.nodeName||``).toLowerCase():`#document`}function W(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function G(e){return((Fe(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Fe(e){return Pe()?e instanceof Node||e instanceof W(e).Node:!1}function K(e){return Pe()?e instanceof Element||e instanceof W(e).Element:!1}function q(e){return Pe()?e instanceof HTMLElement||e instanceof W(e).HTMLElement:!1}function Ie(e){return!Pe()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof W(e).ShadowRoot}function Le(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Re(e){return/^(table|td|th)$/.test(U(e))}function ze(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Be=/transform|translate|scale|rotate|perspective|filter/,Ve=/paint|layout|strict|content/,J=e=>!!e&&e!==`none`,He;function Ue(e){let t=K(e)?X(e):e;return J(t.transform)||J(t.translate)||J(t.scale)||J(t.rotate)||J(t.perspective)||!Ge()&&(J(t.backdropFilter)||J(t.filter))||Be.test(t.willChange||``)||Ve.test(t.contain||``)}function We(e){let t=Z(e);for(;q(t)&&!Y(t);){if(Ue(t))return t;if(ze(t))return null;t=Z(t)}return null}function Ge(){return He??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),He}function Y(e){return/^(html|body|#document)$/.test(U(e))}function X(e){return W(e).getComputedStyle(e)}function Ke(e){return K(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Z(e){if(U(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Ie(e)&&e.host||G(e);return Ie(t)?t.host:t}function qe(e){let t=Z(e);return Y(t)?e.ownerDocument?e.ownerDocument.body:e.body:q(t)&&Le(t)?t:qe(t)}function Je(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=qe(e),i=r===e.ownerDocument?.body,a=W(r);if(i){let e=Ye(a);return t.concat(a,a.visualViewport||[],Le(r)?r:[],e&&n?Je(e):[])}else return t.concat(r,Je(r,[],n))}function Ye(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xe(e){let t=X(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=q(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=I(n)!==a||I(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ze(e){return K(e)?e:e.contextElement}function Qe(e){let t=Ze(e);if(!q(t))return L(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Xe(t),o=(a?I(n.width):n.width)/r,s=(a?I(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var $e=L(0);function et(e){let t=W(e);return!Ge()||!t.visualViewport?$e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tt(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==W(e)?!1:t}function Q(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ze(e),o=L(1);t&&(r?K(r)&&(o=Qe(r)):o=Qe(e));let s=tt(a,n,r)?et(a):L(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=W(a),t=r&&K(r)?W(r):r,n=e,i=Ye(n);for(;i&&r&&t!==n;){let e=Qe(i),t=i.getBoundingClientRect(),r=X(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=W(i),i=Ye(n)}}return ve({width:u,height:d,x:c,y:l})}function nt(e,t){let n=Ke(e).scrollLeft;return t?t.left+n:Q(G(e)).left+n}function rt(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-nt(e,n),y:n.top+t.scrollTop}}function it(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=G(r),s=t?ze(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=L(1),u=L(0),d=q(r);if((d||!d&&!a)&&((U(r)!==`body`||Le(o))&&(c=Ke(r)),d)){let e=Q(r);l=Qe(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?rt(o,c):L(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function at(e){return Array.from(e.getClientRects())}function ot(e){let t=G(e),n=Ke(e),r=e.ownerDocument.body,i=F(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=F(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+nt(e),s=-n.scrollTop;return X(r).direction===`rtl`&&(o+=F(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var st=25;function ct(e,t){let n=W(e),r=G(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Ge();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=nt(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=st&&(a-=o)}else l<=st&&(a+=l);return{width:a,height:o,x:s,y:c}}function lt(e,t){let n=Q(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=q(e)?Qe(e):L(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function ut(e,t,n){let r;if(t===`viewport`)r=ct(e,n);else if(t===`document`)r=ot(G(e));else if(K(t))r=lt(t,n);else{let n=et(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ve(r)}function dt(e,t){let n=Z(e);return n===t||!K(n)||Y(n)?!1:X(n).position===`fixed`||dt(n,t)}function ft(e,t){let n=t.get(e);if(n)return n;let r=Je(e,[],!1).filter(e=>K(e)&&U(e)!==`body`),i=null,a=X(e).position===`fixed`,o=a?Z(e):e;for(;K(o)&&!Y(o);){let t=X(o),n=Ue(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Le(o)&&!n&&dt(e,o))?r=r.filter(e=>e!==o):i=t,o=Z(o)}return t.set(e,r),r}function pt(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ze(t)?[]:ft(t,this._c):[].concat(n),r],o=ut(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=ut(t,a[e],i);s=F(n.top,s),c=P(n.right,c),l=P(n.bottom,l),u=F(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function mt(e){let{width:t,height:n}=Xe(e);return{width:t,height:n}}function ht(e,t,n){let r=q(t),i=G(t),a=n===`fixed`,o=Q(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=L(0);function l(){c.x=nt(i)}if(r||!r&&!a)if((U(t)!==`body`||Le(i))&&(s=Ke(t)),r){let e=Q(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?rt(i,s):L(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function gt(e){return X(e).position===`static`}function _t(e,t){if(!q(e)||X(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return G(e)===n&&(n=n.ownerDocument.body),n}function vt(e,t){let n=W(e);if(ze(e))return n;if(!q(e)){let t=Z(e);for(;t&&!Y(t);){if(K(t)&&!gt(t))return t;t=Z(t)}return n}let r=_t(e,t);for(;r&&Re(r)&&gt(r);)r=_t(r,t);return r&&Y(r)&&gt(r)&&!Ue(r)?n:r||We(e)||n}var yt=async function(e){let t=this.getOffsetParent||vt,n=this.getDimensions,r=await n(e.floating);return{reference:ht(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function bt(e){return X(e).direction===`rtl`}var xt={convertOffsetParentRelativeRectToViewportRelativeRect:it,getDocumentElement:G,getClippingRect:pt,getOffsetParent:vt,getElementRects:yt,getClientRects:at,getDimensions:mt,getScale:Qe,isElement:K,isRTL:bt};function St(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ct(e,t){let n=null,r,i=G(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=te(d),h=te(i.clientWidth-(u+f)),g=te(i.clientHeight-(d+p)),_=te(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:F(0,P(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!St(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function wt(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ze(e),u=i||a?[...l?Je(l):[],...t?Je(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ct(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Q(e):null;c&&g();function g(){let t=Q(e);h&&!St(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Tt=Ae,Et=je,Dt=we,Ot=Ne,kt=De,At=Ce,jt=Me,Mt=(e,t,n)=>{let r=new Map,i={platform:xt,...n},a={...i.platform,_c:r};return Se(e,t,{...i,platform:a})},Nt=e(t(),1),Pt=typeof document<`u`?C.useLayoutEffect:function(){};function Ft(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ft(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Ft(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function It(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Lt(e,t){let n=It(e);return Math.round(t*n)/n}function Rt(e){let t=C.useRef(e);return Pt(()=>{t.current=e}),t}function zt(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=C.useState(r);Ft(f,r)||p(r);let[m,h]=C.useState(null),[g,_]=C.useState(null),v=C.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=C.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),b=a||m,x=o||g,S=C.useRef(null),w=C.useRef(null),T=C.useRef(u),E=c!=null,D=Rt(c),O=Rt(i),k=Rt(l),A=C.useCallback(()=>{if(!S.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Mt(S.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!Ft(T.current,t)&&(T.current=t,Nt.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);Pt(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=C.useRef(!1);Pt(()=>(j.current=!0,()=>{j.current=!1}),[]),Pt(()=>{if(b&&(S.current=b),x&&(w.current=x),b&&x){if(D.current)return D.current(b,x,A);A()}},[b,x,A,D,E]);let M=C.useMemo(()=>({reference:S,floating:w,setReference:v,setFloating:y}),[v,y]),N=C.useMemo(()=>({reference:b,floating:x}),[b,x]),ee=C.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=Lt(N.floating,u.x),r=Lt(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...It(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:ee}),[u,A,M,N,ee])}var Bt=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:At({element:r.current,padding:i}).fn(n):r?At({element:r,padding:i}).fn(n):{}}}},Vt=(e,t)=>{let n=Tt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ht=(e,t)=>{let n=Et(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ut=(e,t)=>({fn:jt(e).fn,options:[e,t]}),Wt=(e,t)=>{let n=Dt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gt=(e,t)=>{let n=Ot(e);return{name:n.name,fn:n.fn,options:[e,t]}},Kt=(e,t)=>{let n=kt(e);return{name:n.name,fn:n.fn,options:[e,t]}},qt=(e,t)=>{let n=Bt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Jt=`Arrow`,Yt=C.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,w.jsx)(m.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,w.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Yt.displayName=Jt;var Xt=Yt;function Zt(e){let[t,n]=C.useState(void 0);return i(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Qt=`Popper`,[$t,en]=a(Qt),[tn,nn]=$t(Qt),rn=e=>{let{__scopePopper:t,children:n}=e,[r,i]=C.useState(null);return(0,w.jsx)(tn,{scope:t,anchor:r,onAnchorChange:i,children:n})};rn.displayName=Qt;var an=`PopperAnchor`,on=C.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=nn(an,n),s=C.useRef(null),c=o(t,s),l=C.useRef(null);return C.useEffect(()=>{let e=l.current;l.current=r?.current||s.current,e!==l.current&&a.onAnchorChange(l.current)}),r?null:(0,w.jsx)(m.div,{...i,ref:c})});on.displayName=an;var sn=`PopperContent`,[cn,ln]=$t(sn),un=C.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:a=0,align:s=`center`,alignOffset:c=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:h=`partial`,hideWhenDetached:g=!1,updatePositionStrategy:_=`optimized`,onPlaced:v,...y}=e,b=nn(sn,n),[x,S]=C.useState(null),T=o(t,e=>S(e)),[E,D]=C.useState(null),O=Zt(E),k=O?.width??0,A=O?.height??0,j=r+(s===`center`?``:`-`+s),M=typeof p==`number`?p:{top:0,right:0,bottom:0,left:0,...p},N=Array.isArray(f)?f:[f],ee=N.length>0,P={padding:M,boundary:N.filter(mn),altBoundary:ee},{refs:F,floatingStyles:I,placement:te,isPositioned:L,middlewareData:R}=zt({strategy:`fixed`,placement:j,whileElementsMounted:(...e)=>wt(...e,{animationFrame:_===`always`}),elements:{reference:b.anchor},middleware:[Vt({mainAxis:a+A,alignmentAxis:c}),u&&Ht({mainAxis:!0,crossAxis:!1,limiter:h===`partial`?Ut():void 0,...P}),u&&Wt({...P}),Gt({...P,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),E&&qt({element:E,padding:l}),hn({arrowWidth:k,arrowHeight:A}),g&&Kt({strategy:`referenceHidden`,...P})]}),[ne,z]=gn(te),B=d(v);i(()=>{L&&B?.()},[L,B]);let V=R.arrow?.x,re=R.arrow?.y,ie=R.arrow?.centerOffset!==0,[H,ae]=C.useState();return i(()=>{x&&ae(window.getComputedStyle(x).zIndex)},[x]),(0,w.jsx)(`div`,{ref:F.setFloating,"data-radix-popper-content-wrapper":``,style:{...I,transform:L?I.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:H,"--radix-popper-transform-origin":[R.transformOrigin?.x,R.transformOrigin?.y].join(` `),...R.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,w.jsx)(cn,{scope:n,placedSide:ne,onArrowChange:D,arrowX:V,arrowY:re,shouldHideArrow:ie,children:(0,w.jsx)(m.div,{"data-side":ne,"data-align":z,...y,ref:T,style:{...y.style,animation:L?void 0:`none`}})})})});un.displayName=sn;var dn=`PopperArrow`,fn={top:`bottom`,right:`left`,bottom:`top`,left:`right`},pn=C.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=ln(dn,n),a=fn[i.placedSide];return(0,w.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,w.jsx)(Xt,{...r,ref:t,style:{...r.style,display:`block`}})})});pn.displayName=dn;function mn(e){return e!==null}var hn=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=gn(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function gn(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var _n=rn,vn=on,yn=un,bn=pn,xn=`Popover`,[Sn,Cn]=a(xn,[en]),wn=en(),[Tn,$]=Sn(xn),En=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=wn(t),l=C.useRef(null),[d,f]=C.useState(!1),[p,m]=u({prop:r,defaultProp:i??!1,onChange:a,caller:xn});return(0,w.jsx)(_n,{...s,children:(0,w.jsx)(Tn,{scope:t,contentId:c(),triggerRef:l,open:p,onOpenChange:m,onOpenToggle:C.useCallback(()=>m(e=>!e),[m]),hasCustomAnchor:d,onCustomAnchorAdd:C.useCallback(()=>f(!0),[]),onCustomAnchorRemove:C.useCallback(()=>f(!1),[]),modal:o,children:n})})};En.displayName=xn;var Dn=`PopoverAnchor`,On=C.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=$(Dn,n),a=wn(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return C.useEffect(()=>(o(),()=>s()),[o,s]),(0,w.jsx)(vn,{...a,...r,ref:t})});On.displayName=Dn;var kn=`PopoverTrigger`,An=C.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=$(kn,n),a=wn(n),s=o(t,i.triggerRef),c=(0,w.jsx)(m.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Gn(i.open),...r,ref:s,onClick:f(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?c:(0,w.jsx)(vn,{asChild:!0,...a,children:c})});An.displayName=kn;var jn=`PopoverPortal`,[Mn,Nn]=Sn(jn,{forceMount:void 0}),Pn=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=$(jn,t);return(0,w.jsx)(Mn,{scope:t,forceMount:n,children:(0,w.jsx)(p,{present:n||a.open,children:(0,w.jsx)(_,{asChild:!0,container:i,children:r})})})};Pn.displayName=jn;var Fn=`PopoverContent`,In=C.forwardRef((e,t)=>{let n=Nn(Fn,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=$(Fn,e.__scopePopover);return(0,w.jsx)(p,{present:r||a.open,children:a.modal?(0,w.jsx)(Rn,{...i,ref:t}):(0,w.jsx)(zn,{...i,ref:t})})});In.displayName=Fn;var Ln=l(`PopoverContent.RemoveScroll`),Rn=C.forwardRef((e,t)=>{let n=$(Fn,e.__scopePopover),r=C.useRef(null),i=o(t,r),a=C.useRef(!1);return C.useEffect(()=>{let e=r.current;if(e)return y(e)},[]),(0,w.jsx)(x,{as:Ln,allowPinchZoom:!0,children:(0,w.jsx)(Bn,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:f(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:f(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:f(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),zn=C.forwardRef((e,t)=>{let n=$(Fn,e.__scopePopover),r=C.useRef(!1),i=C.useRef(!1);return(0,w.jsx)(Bn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),Bn=C.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=$(Fn,n),p=wn(n);return S(),(0,w.jsx)(b,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,w.jsx)(v,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,w.jsx)(yn,{"data-state":Gn(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),Vn=`PopoverClose`,Hn=C.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=$(Vn,n);return(0,w.jsx)(m.button,{type:`button`,...r,ref:t,onClick:f(e.onClick,()=>i.onOpenChange(!1))})});Hn.displayName=Vn;var Un=`PopoverArrow`,Wn=C.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=wn(n);return(0,w.jsx)(bn,{...i,...r,ref:t})});Wn.displayName=Un;function Gn(e){return e?`open`:`closed`}var Kn=En,qn=An,Jn=Pn,Yn=In,Xn=Kn,Zn=qn;function Qn({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,w.jsx)(Jn,{children:(0,w.jsx)(Yn,{align:t,sideOffset:n,side:`bottom`,className:s(`z-50 origin-(--radix-popover-content-transform-origin) overflow-y-auto max-h-(--radix-popover-content-available-height) min-w-[240px] max-w-[98vw] rounded-xl border bg-fd-popover/60 backdrop-blur-lg p-2 text-sm text-fd-popover-foreground shadow-lg focus-visible:outline-none data-[state=closed]:animate-fd-popover-out data-[state=open]:animate-fd-popover-in`,e),...r})})}var $n=h(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),er=h(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]);function tr(e){return e.length>1&&e.endsWith(`/`)?e.slice(0,-1):e}function nr(e,t,n=!1){return e=tr(e),t=tr(t),e===t||n&&t.startsWith(`${e}/`)}var rr=Object.defineProperty,ir=(e,t)=>{let n={};for(var r in e)rr(n,r,{get:e[r],enumerable:!0});return t||rr(n,Symbol.toStringTag,{value:`Module`}),n},ar=`Collapsible`,[or,sr]=a(ar),[cr,lr]=or(ar),ur=C.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[l,d]=u({prop:r,defaultProp:i??!1,onChange:o,caller:ar});return(0,w.jsx)(cr,{scope:n,disabled:a,contentId:c(),open:l,onOpenToggle:C.useCallback(()=>d(e=>!e),[d]),children:(0,w.jsx)(m.div,{"data-state":gr(l),"data-disabled":a?``:void 0,...s,ref:t})})});ur.displayName=ar;var dr=`CollapsibleTrigger`,fr=C.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=lr(dr,n);return(0,w.jsx)(m.button,{type:`button`,"aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":gr(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:f(e.onClick,i.onOpenToggle)})});fr.displayName=dr;var pr=`CollapsibleContent`,mr=C.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=lr(pr,e.__scopeCollapsible);return(0,w.jsx)(p,{present:n||i.open,children:({present:e})=>(0,w.jsx)(hr,{...r,ref:t,present:e})})});mr.displayName=pr;var hr=C.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:a,...s}=e,c=lr(pr,n),[l,u]=C.useState(r),d=C.useRef(null),f=o(t,d),p=C.useRef(0),h=p.current,g=C.useRef(0),_=g.current,v=c.open||l,y=C.useRef(v),b=C.useRef(void 0);return C.useEffect(()=>{let e=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(e)},[]),i(()=>{let e=d.current;if(e){b.current=b.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();p.current=t.height,g.current=t.width,y.current||(e.style.transitionDuration=b.current.transitionDuration,e.style.animationName=b.current.animationName),u(r)}},[c.open,r]),(0,w.jsx)(m.div,{"data-state":gr(c.open),"data-disabled":c.disabled?``:void 0,id:c.contentId,hidden:!v,...s,ref:f,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":_?`${_}px`:void 0,...e.style},children:v&&a})});function gr(e){return e?`open`:`closed`}var _r=ur,vr=fr;function yr({children:e,...t}){let[n,r]=(0,C.useState)(!1);return(0,C.useEffect)(()=>{r(!0)},[]),(0,w.jsx)(mr,{...t,className:s(`overflow-hidden`,n&&`data-[state=closed]:animate-fd-collapsible-up data-[state=open]:animate-fd-collapsible-down`,t.className),children:e})}export{nr as a,$n as c,Zn as d,j as f,E as g,D as h,ir as i,Xn as l,M as m,yr as n,tr as o,N as p,vr as r,er as s,_r as t,Qn as u};
1
+ import{a as e}from"./chunk-DZNXM-SG.js";import{l as t,s as n,u as r}from"./index-DJk6G_x5.js";import{a as i,d as a,f as o,g as s,i as c,l,n as u,o as d,p as f,r as p,s as m,t as h}from"./createLucideIcon-YLHYIeJE.js";import{i as g}from"./framework-BG7fkGZ9.js";import{a as _,c as v,i as y,o as b,r as x,s as S}from"./dist-D2evd4Yy.js";var C=e(r(),1),w=e(n(),1);function T(e){return e.startsWith(`http://`)||e.startsWith(`https://`)?e:(e.startsWith(`/`)||(e=`/`+e),e.length>1&&e.endsWith(`/`)&&(e=e.slice(0,-1)),e)}function E(e,t,n={}){let{includeSeparator:r=!0}=n;function i(e){let n;for(let a of e){if(t(a)){let e=[];return n&&e.push(n),e.push(a),e}if(a.type===`separator`&&r){n=a;continue}if(a.type===`folder`){let e=a.index&&t(a.index)?[a.index]:i(a.children);if(e)return e.unshift(a),n&&e.unshift(n),e}}}return i(e)??null}function D(e,t,n){let{includePage:r=!1,includeSeparator:i=!1,includeRoot:a=!1}=n,o=[];for(let n=0;n<t.length;n++){let s=t[n];switch(s.type){case`page`:r&&o.push({name:s.name,url:s.url});break;case`folder`:if(s.root){o=[],a&&o.push({name:e.name,url:typeof a==`object`?a.url:s.index?.url});break}(n===t.length-1||s.index!==t[n+1])&&o.push({name:s.name,url:s.index?.url});break;case`separator`:s.name&&i&&o.push({name:s.name});break}}return o}function O(e,t){let n=T(t);return E(e,e=>e.type===`page`&&e.url===n)}var k=(0,C.createContext)(null),A=(0,C.createContext)([]);function j({tree:e,children:t}){let n=(0,C.useRef)(0),r=g(),i=(0,C.useMemo)(()=>e,[e.$id??e]),a=(0,C.useMemo)(()=>O(i.children,r)??(i.fallback?O(i.fallback.children,r):null)??[],[i,r]),o=a.findLast(e=>e.type===`folder`&&e.root)??i;return o.$id??=String(n.current++),(0,w.jsx)(k,{value:(0,C.useMemo)(()=>({root:o,full:i}),[o,i]),children:(0,w.jsx)(A,{value:a,children:t})})}function M(){return(0,C.use)(A)}function N(){let e=(0,C.use)(k);if(!e)throw Error(`You must wrap this component under <DocsLayout />`);return e}var ee=[`top`,`right`,`bottom`,`left`],P=Math.min,F=Math.max,I=Math.round,te=Math.floor,L=e=>({x:e,y:e}),R={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function ne(e,t,n){return F(e,P(t,n))}function z(e,t){return typeof e==`function`?e(t):e}function B(e){return e.split(`-`)[0]}function V(e){return e.split(`-`)[1]}function re(e){return e===`x`?`y`:`x`}function ie(e){return e===`y`?`height`:`width`}function H(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ae(e){return re(H(e))}function oe(e,t,n){n===void 0&&(n=!1);let r=V(e),i=ae(e),a=ie(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=he(o)),[o,he(o)]}function se(e){let t=he(e);return[ce(e),t,ce(t)]}function ce(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var le=[`left`,`right`],ue=[`right`,`left`],de=[`top`,`bottom`],fe=[`bottom`,`top`];function pe(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ue:le:t?le:ue;case`left`:case`right`:return t?de:fe;default:return[]}}function me(e,t,n,r){let i=V(e),a=pe(B(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ce)))),a}function he(e){let t=B(e);return R[t]+e.slice(t.length)}function ge(e){return{top:0,right:0,bottom:0,left:0,...e}}function _e(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ge(e)}function ve(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ye(e,t,n){let{reference:r,floating:i}=e,a=H(t),o=ae(t),s=ie(o),c=B(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(V(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function be(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=z(t,e),p=_e(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ve(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ve(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var xe=50,Se=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:be},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ye(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<xe&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ye(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Ce=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=z(e,t)||{};if(l==null)return{};let d=_e(u),f={x:n,y:r},p=ae(i),m=ie(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=P(d[_],T),D=P(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=ne(O,A,k),M=!c.arrow&&V(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),we=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=z(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=B(r),_=H(o),v=B(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[he(o)]:se(o)),x=p!==`none`;!d&&x&&b.push(...me(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=oe(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==H(t))||T.every(e=>H(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=H(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Te(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ee(e){return ee.some(t=>e[t]>=0)}var De=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=z(e,t);switch(i){case`referenceHidden`:{let e=Te(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ee(e)}}}case`escaped`:{let e=Te(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ee(e)}}}default:return{}}}}},Oe=new Set([`left`,`top`]);async function ke(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=B(n),s=V(n),c=H(n)===`y`,l=Oe.has(o)?-1:1,u=a&&c?-1:1,d=z(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Ae=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await ke(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},je=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=z(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=H(B(i)),p=re(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=ne(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=ne(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Me=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=z(e,t),u={x:n,y:r},d=H(i),f=re(d),p=u[f],m=u[d],h=z(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Oe.has(B(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Ne=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=z(e,t),u=await o.detectOverflow(t,l),d=B(i),f=V(i),p=H(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=P(h-u[g],v),x=P(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=F(u.left,0),t=F(u.right,0),n=F(u.top,0),r=F(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:F(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:F(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Pe(){return typeof window<`u`}function U(e){return Fe(e)?(e.nodeName||``).toLowerCase():`#document`}function W(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function G(e){return((Fe(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Fe(e){return Pe()?e instanceof Node||e instanceof W(e).Node:!1}function K(e){return Pe()?e instanceof Element||e instanceof W(e).Element:!1}function q(e){return Pe()?e instanceof HTMLElement||e instanceof W(e).HTMLElement:!1}function Ie(e){return!Pe()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof W(e).ShadowRoot}function Le(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Re(e){return/^(table|td|th)$/.test(U(e))}function ze(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Be=/transform|translate|scale|rotate|perspective|filter/,Ve=/paint|layout|strict|content/,J=e=>!!e&&e!==`none`,He;function Ue(e){let t=K(e)?X(e):e;return J(t.transform)||J(t.translate)||J(t.scale)||J(t.rotate)||J(t.perspective)||!Ge()&&(J(t.backdropFilter)||J(t.filter))||Be.test(t.willChange||``)||Ve.test(t.contain||``)}function We(e){let t=Z(e);for(;q(t)&&!Y(t);){if(Ue(t))return t;if(ze(t))return null;t=Z(t)}return null}function Ge(){return He??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),He}function Y(e){return/^(html|body|#document)$/.test(U(e))}function X(e){return W(e).getComputedStyle(e)}function Ke(e){return K(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Z(e){if(U(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Ie(e)&&e.host||G(e);return Ie(t)?t.host:t}function qe(e){let t=Z(e);return Y(t)?e.ownerDocument?e.ownerDocument.body:e.body:q(t)&&Le(t)?t:qe(t)}function Je(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=qe(e),i=r===e.ownerDocument?.body,a=W(r);if(i){let e=Ye(a);return t.concat(a,a.visualViewport||[],Le(r)?r:[],e&&n?Je(e):[])}else return t.concat(r,Je(r,[],n))}function Ye(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xe(e){let t=X(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=q(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=I(n)!==a||I(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ze(e){return K(e)?e:e.contextElement}function Qe(e){let t=Ze(e);if(!q(t))return L(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Xe(t),o=(a?I(n.width):n.width)/r,s=(a?I(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var $e=L(0);function et(e){let t=W(e);return!Ge()||!t.visualViewport?$e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tt(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==W(e)?!1:t}function Q(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ze(e),o=L(1);t&&(r?K(r)&&(o=Qe(r)):o=Qe(e));let s=tt(a,n,r)?et(a):L(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=W(a),t=r&&K(r)?W(r):r,n=e,i=Ye(n);for(;i&&r&&t!==n;){let e=Qe(i),t=i.getBoundingClientRect(),r=X(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=W(i),i=Ye(n)}}return ve({width:u,height:d,x:c,y:l})}function nt(e,t){let n=Ke(e).scrollLeft;return t?t.left+n:Q(G(e)).left+n}function rt(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-nt(e,n),y:n.top+t.scrollTop}}function it(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=G(r),s=t?ze(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=L(1),u=L(0),d=q(r);if((d||!d&&!a)&&((U(r)!==`body`||Le(o))&&(c=Ke(r)),d)){let e=Q(r);l=Qe(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?rt(o,c):L(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function at(e){return Array.from(e.getClientRects())}function ot(e){let t=G(e),n=Ke(e),r=e.ownerDocument.body,i=F(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=F(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+nt(e),s=-n.scrollTop;return X(r).direction===`rtl`&&(o+=F(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var st=25;function ct(e,t){let n=W(e),r=G(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Ge();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=nt(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=st&&(a-=o)}else l<=st&&(a+=l);return{width:a,height:o,x:s,y:c}}function lt(e,t){let n=Q(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=q(e)?Qe(e):L(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function ut(e,t,n){let r;if(t===`viewport`)r=ct(e,n);else if(t===`document`)r=ot(G(e));else if(K(t))r=lt(t,n);else{let n=et(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ve(r)}function dt(e,t){let n=Z(e);return n===t||!K(n)||Y(n)?!1:X(n).position===`fixed`||dt(n,t)}function ft(e,t){let n=t.get(e);if(n)return n;let r=Je(e,[],!1).filter(e=>K(e)&&U(e)!==`body`),i=null,a=X(e).position===`fixed`,o=a?Z(e):e;for(;K(o)&&!Y(o);){let t=X(o),n=Ue(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Le(o)&&!n&&dt(e,o))?r=r.filter(e=>e!==o):i=t,o=Z(o)}return t.set(e,r),r}function pt(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ze(t)?[]:ft(t,this._c):[].concat(n),r],o=ut(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=ut(t,a[e],i);s=F(n.top,s),c=P(n.right,c),l=P(n.bottom,l),u=F(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function mt(e){let{width:t,height:n}=Xe(e);return{width:t,height:n}}function ht(e,t,n){let r=q(t),i=G(t),a=n===`fixed`,o=Q(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=L(0);function l(){c.x=nt(i)}if(r||!r&&!a)if((U(t)!==`body`||Le(i))&&(s=Ke(t)),r){let e=Q(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?rt(i,s):L(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function gt(e){return X(e).position===`static`}function _t(e,t){if(!q(e)||X(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return G(e)===n&&(n=n.ownerDocument.body),n}function vt(e,t){let n=W(e);if(ze(e))return n;if(!q(e)){let t=Z(e);for(;t&&!Y(t);){if(K(t)&&!gt(t))return t;t=Z(t)}return n}let r=_t(e,t);for(;r&&Re(r)&&gt(r);)r=_t(r,t);return r&&Y(r)&&gt(r)&&!Ue(r)?n:r||We(e)||n}var yt=async function(e){let t=this.getOffsetParent||vt,n=this.getDimensions,r=await n(e.floating);return{reference:ht(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function bt(e){return X(e).direction===`rtl`}var xt={convertOffsetParentRelativeRectToViewportRelativeRect:it,getDocumentElement:G,getClippingRect:pt,getOffsetParent:vt,getElementRects:yt,getClientRects:at,getDimensions:mt,getScale:Qe,isElement:K,isRTL:bt};function St(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ct(e,t){let n=null,r,i=G(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=te(d),h=te(i.clientWidth-(u+f)),g=te(i.clientHeight-(d+p)),_=te(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:F(0,P(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!St(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function wt(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ze(e),u=i||a?[...l?Je(l):[],...t?Je(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ct(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Q(e):null;c&&g();function g(){let t=Q(e);h&&!St(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Tt=Ae,Et=je,Dt=we,Ot=Ne,kt=De,At=Ce,jt=Me,Mt=(e,t,n)=>{let r=new Map,i={platform:xt,...n},a={...i.platform,_c:r};return Se(e,t,{...i,platform:a})},Nt=e(t(),1),Pt=typeof document<`u`?C.useLayoutEffect:function(){};function Ft(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ft(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Ft(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function It(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Lt(e,t){let n=It(e);return Math.round(t*n)/n}function Rt(e){let t=C.useRef(e);return Pt(()=>{t.current=e}),t}function zt(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=C.useState(r);Ft(f,r)||p(r);let[m,h]=C.useState(null),[g,_]=C.useState(null),v=C.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=C.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),b=a||m,x=o||g,S=C.useRef(null),w=C.useRef(null),T=C.useRef(u),E=c!=null,D=Rt(c),O=Rt(i),k=Rt(l),A=C.useCallback(()=>{if(!S.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Mt(S.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!Ft(T.current,t)&&(T.current=t,Nt.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);Pt(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=C.useRef(!1);Pt(()=>(j.current=!0,()=>{j.current=!1}),[]),Pt(()=>{if(b&&(S.current=b),x&&(w.current=x),b&&x){if(D.current)return D.current(b,x,A);A()}},[b,x,A,D,E]);let M=C.useMemo(()=>({reference:S,floating:w,setReference:v,setFloating:y}),[v,y]),N=C.useMemo(()=>({reference:b,floating:x}),[b,x]),ee=C.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=Lt(N.floating,u.x),r=Lt(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...It(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:ee}),[u,A,M,N,ee])}var Bt=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:At({element:r.current,padding:i}).fn(n):r?At({element:r,padding:i}).fn(n):{}}}},Vt=(e,t)=>{let n=Tt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ht=(e,t)=>{let n=Et(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ut=(e,t)=>({fn:jt(e).fn,options:[e,t]}),Wt=(e,t)=>{let n=Dt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gt=(e,t)=>{let n=Ot(e);return{name:n.name,fn:n.fn,options:[e,t]}},Kt=(e,t)=>{let n=kt(e);return{name:n.name,fn:n.fn,options:[e,t]}},qt=(e,t)=>{let n=Bt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Jt=`Arrow`,Yt=C.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,w.jsx)(m.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,w.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Yt.displayName=Jt;var Xt=Yt;function Zt(e){let[t,n]=C.useState(void 0);return i(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Qt=`Popper`,[$t,en]=a(Qt),[tn,nn]=$t(Qt),rn=e=>{let{__scopePopper:t,children:n}=e,[r,i]=C.useState(null);return(0,w.jsx)(tn,{scope:t,anchor:r,onAnchorChange:i,children:n})};rn.displayName=Qt;var an=`PopperAnchor`,on=C.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=nn(an,n),s=C.useRef(null),c=o(t,s),l=C.useRef(null);return C.useEffect(()=>{let e=l.current;l.current=r?.current||s.current,e!==l.current&&a.onAnchorChange(l.current)}),r?null:(0,w.jsx)(m.div,{...i,ref:c})});on.displayName=an;var sn=`PopperContent`,[cn,ln]=$t(sn),un=C.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:a=0,align:s=`center`,alignOffset:c=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:h=`partial`,hideWhenDetached:g=!1,updatePositionStrategy:_=`optimized`,onPlaced:v,...y}=e,b=nn(sn,n),[x,S]=C.useState(null),T=o(t,e=>S(e)),[E,D]=C.useState(null),O=Zt(E),k=O?.width??0,A=O?.height??0,j=r+(s===`center`?``:`-`+s),M=typeof p==`number`?p:{top:0,right:0,bottom:0,left:0,...p},N=Array.isArray(f)?f:[f],ee=N.length>0,P={padding:M,boundary:N.filter(mn),altBoundary:ee},{refs:F,floatingStyles:I,placement:te,isPositioned:L,middlewareData:R}=zt({strategy:`fixed`,placement:j,whileElementsMounted:(...e)=>wt(...e,{animationFrame:_===`always`}),elements:{reference:b.anchor},middleware:[Vt({mainAxis:a+A,alignmentAxis:c}),u&&Ht({mainAxis:!0,crossAxis:!1,limiter:h===`partial`?Ut():void 0,...P}),u&&Wt({...P}),Gt({...P,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),E&&qt({element:E,padding:l}),hn({arrowWidth:k,arrowHeight:A}),g&&Kt({strategy:`referenceHidden`,...P})]}),[ne,z]=gn(te),B=d(v);i(()=>{L&&B?.()},[L,B]);let V=R.arrow?.x,re=R.arrow?.y,ie=R.arrow?.centerOffset!==0,[H,ae]=C.useState();return i(()=>{x&&ae(window.getComputedStyle(x).zIndex)},[x]),(0,w.jsx)(`div`,{ref:F.setFloating,"data-radix-popper-content-wrapper":``,style:{...I,transform:L?I.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:H,"--radix-popper-transform-origin":[R.transformOrigin?.x,R.transformOrigin?.y].join(` `),...R.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,w.jsx)(cn,{scope:n,placedSide:ne,onArrowChange:D,arrowX:V,arrowY:re,shouldHideArrow:ie,children:(0,w.jsx)(m.div,{"data-side":ne,"data-align":z,...y,ref:T,style:{...y.style,animation:L?void 0:`none`}})})})});un.displayName=sn;var dn=`PopperArrow`,fn={top:`bottom`,right:`left`,bottom:`top`,left:`right`},pn=C.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=ln(dn,n),a=fn[i.placedSide];return(0,w.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,w.jsx)(Xt,{...r,ref:t,style:{...r.style,display:`block`}})})});pn.displayName=dn;function mn(e){return e!==null}var hn=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=gn(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function gn(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var _n=rn,vn=on,yn=un,bn=pn,xn=`Popover`,[Sn,Cn]=a(xn,[en]),wn=en(),[Tn,$]=Sn(xn),En=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=wn(t),l=C.useRef(null),[d,f]=C.useState(!1),[p,m]=u({prop:r,defaultProp:i??!1,onChange:a,caller:xn});return(0,w.jsx)(_n,{...s,children:(0,w.jsx)(Tn,{scope:t,contentId:c(),triggerRef:l,open:p,onOpenChange:m,onOpenToggle:C.useCallback(()=>m(e=>!e),[m]),hasCustomAnchor:d,onCustomAnchorAdd:C.useCallback(()=>f(!0),[]),onCustomAnchorRemove:C.useCallback(()=>f(!1),[]),modal:o,children:n})})};En.displayName=xn;var Dn=`PopoverAnchor`,On=C.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=$(Dn,n),a=wn(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return C.useEffect(()=>(o(),()=>s()),[o,s]),(0,w.jsx)(vn,{...a,...r,ref:t})});On.displayName=Dn;var kn=`PopoverTrigger`,An=C.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=$(kn,n),a=wn(n),s=o(t,i.triggerRef),c=(0,w.jsx)(m.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Gn(i.open),...r,ref:s,onClick:f(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?c:(0,w.jsx)(vn,{asChild:!0,...a,children:c})});An.displayName=kn;var jn=`PopoverPortal`,[Mn,Nn]=Sn(jn,{forceMount:void 0}),Pn=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=$(jn,t);return(0,w.jsx)(Mn,{scope:t,forceMount:n,children:(0,w.jsx)(p,{present:n||a.open,children:(0,w.jsx)(_,{asChild:!0,container:i,children:r})})})};Pn.displayName=jn;var Fn=`PopoverContent`,In=C.forwardRef((e,t)=>{let n=Nn(Fn,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=$(Fn,e.__scopePopover);return(0,w.jsx)(p,{present:r||a.open,children:a.modal?(0,w.jsx)(Rn,{...i,ref:t}):(0,w.jsx)(zn,{...i,ref:t})})});In.displayName=Fn;var Ln=l(`PopoverContent.RemoveScroll`),Rn=C.forwardRef((e,t)=>{let n=$(Fn,e.__scopePopover),r=C.useRef(null),i=o(t,r),a=C.useRef(!1);return C.useEffect(()=>{let e=r.current;if(e)return y(e)},[]),(0,w.jsx)(x,{as:Ln,allowPinchZoom:!0,children:(0,w.jsx)(Bn,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:f(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:f(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:f(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),zn=C.forwardRef((e,t)=>{let n=$(Fn,e.__scopePopover),r=C.useRef(!1),i=C.useRef(!1);return(0,w.jsx)(Bn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),Bn=C.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=$(Fn,n),p=wn(n);return S(),(0,w.jsx)(b,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,w.jsx)(v,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,w.jsx)(yn,{"data-state":Gn(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),Vn=`PopoverClose`,Hn=C.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=$(Vn,n);return(0,w.jsx)(m.button,{type:`button`,...r,ref:t,onClick:f(e.onClick,()=>i.onOpenChange(!1))})});Hn.displayName=Vn;var Un=`PopoverArrow`,Wn=C.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=wn(n);return(0,w.jsx)(bn,{...i,...r,ref:t})});Wn.displayName=Un;function Gn(e){return e?`open`:`closed`}var Kn=En,qn=An,Jn=Pn,Yn=In,Xn=Kn,Zn=qn;function Qn({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,w.jsx)(Jn,{children:(0,w.jsx)(Yn,{align:t,sideOffset:n,side:`bottom`,className:s(`z-50 origin-(--radix-popover-content-transform-origin) overflow-y-auto max-h-(--radix-popover-content-available-height) min-w-[240px] max-w-[98vw] rounded-xl border bg-fd-popover/60 backdrop-blur-lg p-2 text-sm text-fd-popover-foreground shadow-lg focus-visible:outline-none data-[state=closed]:animate-fd-popover-out data-[state=open]:animate-fd-popover-in`,e),...r})})}var $n=h(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),er=h(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]);function tr(e){return e.length>1&&e.endsWith(`/`)?e.slice(0,-1):e}function nr(e,t,n=!1){return e=tr(e),t=tr(t),e===t||n&&t.startsWith(`${e}/`)}var rr=Object.defineProperty,ir=(e,t)=>{let n={};for(var r in e)rr(n,r,{get:e[r],enumerable:!0});return t||rr(n,Symbol.toStringTag,{value:`Module`}),n},ar=`Collapsible`,[or,sr]=a(ar),[cr,lr]=or(ar),ur=C.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[l,d]=u({prop:r,defaultProp:i??!1,onChange:o,caller:ar});return(0,w.jsx)(cr,{scope:n,disabled:a,contentId:c(),open:l,onOpenToggle:C.useCallback(()=>d(e=>!e),[d]),children:(0,w.jsx)(m.div,{"data-state":gr(l),"data-disabled":a?``:void 0,...s,ref:t})})});ur.displayName=ar;var dr=`CollapsibleTrigger`,fr=C.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=lr(dr,n);return(0,w.jsx)(m.button,{type:`button`,"aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":gr(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:f(e.onClick,i.onOpenToggle)})});fr.displayName=dr;var pr=`CollapsibleContent`,mr=C.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=lr(pr,e.__scopeCollapsible);return(0,w.jsx)(p,{present:n||i.open,children:({present:e})=>(0,w.jsx)(hr,{...r,ref:t,present:e})})});mr.displayName=pr;var hr=C.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:a,...s}=e,c=lr(pr,n),[l,u]=C.useState(r),d=C.useRef(null),f=o(t,d),p=C.useRef(0),h=p.current,g=C.useRef(0),_=g.current,v=c.open||l,y=C.useRef(v),b=C.useRef(void 0);return C.useEffect(()=>{let e=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(e)},[]),i(()=>{let e=d.current;if(e){b.current=b.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();p.current=t.height,g.current=t.width,y.current||(e.style.transitionDuration=b.current.transitionDuration,e.style.animationName=b.current.animationName),u(r)}},[c.open,r]),(0,w.jsx)(m.div,{"data-state":gr(c.open),"data-disabled":c.disabled?``:void 0,id:c.contentId,hidden:!v,...s,ref:f,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":_?`${_}px`:void 0,...e.style},children:v&&a})});function gr(e){return e?`open`:`closed`}var _r=ur,vr=fr;function yr({children:e,...t}){let[n,r]=(0,C.useState)(!1);return(0,C.useEffect)(()=>{r(!0)},[]),(0,w.jsx)(mr,{...t,className:s(`overflow-hidden`,n&&`data-[state=closed]:animate-fd-collapsible-up data-[state=open]:animate-fd-collapsible-down`,t.className),children:e})}export{nr as a,$n as c,Zn as d,j as f,E as g,D as h,ir as i,Xn as l,M as m,yr as n,tr as o,N as p,vr as r,er as s,_r as t,Qn as u};