vxui-react 1.3.5 → 1.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +82 -5
- package/README.md +84 -5
- package/dist/index.cjs +22 -66
- package/dist/index.js +6527 -5506
- package/dist/src/components/Article.d.ts +72 -0
- package/dist/src/components/Dialog.d.ts +24 -6
- package/dist/src/components/Select.d.ts +8 -1
- package/dist/src/components/Sheet/Sheet.d.ts +30 -0
- package/dist/src/components/Sheet/SheetPanel.d.ts +44 -0
- package/dist/src/components/Sheet/index.d.ts +2 -0
- package/dist/src/components/Sheet/useSheetState.d.ts +34 -0
- package/dist/src/components/mobile/BottomSheet.d.ts +28 -0
- package/dist/src/lib/VXUIProvider.d.ts +29 -0
- package/dist/src/lib/breakpoints.d.ts +63 -0
- package/dist/src/lib/dialogPopover.d.ts +26 -0
- package/dist/src/lib/index.d.ts +23 -8
- package/dist/src/lib/viewport.d.ts +6 -0
- package/dist/vxui-react.css +1 -1
- package/llms.txt +6 -2
- package/package.json +4 -3
- package/dist/src/components/AlertDialog.d.ts +0 -14
- package/dist/src/components/Sheet.d.ts +0 -13
- package/dist/src/components/__tests__/Accordion.test.d.ts +0 -1
- package/dist/src/components/__tests__/ActionSheet.test.d.ts +0 -1
- package/dist/src/components/__tests__/Alert.test.d.ts +0 -1
- package/dist/src/components/__tests__/AlertDialog.test.d.ts +0 -1
- package/dist/src/components/__tests__/AppShell.test.d.ts +0 -1
- package/dist/src/components/__tests__/Avatar.test.d.ts +0 -1
- package/dist/src/components/__tests__/Badge.test.d.ts +0 -1
- package/dist/src/components/__tests__/BottomNav.test.d.ts +0 -1
- package/dist/src/components/__tests__/Breadcrumb.test.d.ts +0 -1
- package/dist/src/components/__tests__/Button.test.d.ts +0 -1
- package/dist/src/components/__tests__/Calendar.test.d.ts +0 -1
- package/dist/src/components/__tests__/Card.test.d.ts +0 -1
- package/dist/src/components/__tests__/Carousel.test.d.ts +0 -1
- package/dist/src/components/__tests__/Checkbox.test.d.ts +0 -1
- package/dist/src/components/__tests__/CodeBlock.test.d.ts +0 -1
- package/dist/src/components/__tests__/ColorPicker.test.d.ts +0 -1
- package/dist/src/components/__tests__/CommandPalette.test.d.ts +0 -1
- package/dist/src/components/__tests__/ContextMenu.test.d.ts +0 -1
- package/dist/src/components/__tests__/DatePicker.test.d.ts +0 -1
- package/dist/src/components/__tests__/Dialog.test.d.ts +0 -1
- package/dist/src/components/__tests__/DialogFormControls.test.d.ts +0 -1
- package/dist/src/components/__tests__/DropdownMenu.test.d.ts +0 -1
- package/dist/src/components/__tests__/EmptyState.test.d.ts +0 -1
- package/dist/src/components/__tests__/FileUpload.test.d.ts +0 -1
- package/dist/src/components/__tests__/Form.test.d.ts +0 -1
- package/dist/src/components/__tests__/Heading.test.d.ts +0 -1
- package/dist/src/components/__tests__/HoverCard.test.d.ts +0 -1
- package/dist/src/components/__tests__/Input.test.d.ts +0 -1
- package/dist/src/components/__tests__/Label.test.d.ts +0 -1
- package/dist/src/components/__tests__/LanguageSwitcher.test.d.ts +0 -1
- package/dist/src/components/__tests__/Menubar.test.d.ts +0 -1
- package/dist/src/components/__tests__/MobileDrawer.test.d.ts +0 -1
- package/dist/src/components/__tests__/MobileList.test.d.ts +0 -1
- package/dist/src/components/__tests__/MultiSelect.test.d.ts +0 -1
- package/dist/src/components/__tests__/NavigationMenu.test.d.ts +0 -1
- package/dist/src/components/__tests__/NumberInput.test.d.ts +0 -1
- package/dist/src/components/__tests__/Pagination.test.d.ts +0 -1
- package/dist/src/components/__tests__/Popover.test.d.ts +0 -1
- package/dist/src/components/__tests__/Progress.test.d.ts +0 -1
- package/dist/src/components/__tests__/Radio.test.d.ts +0 -1
- package/dist/src/components/__tests__/Rating.test.d.ts +0 -1
- package/dist/src/components/__tests__/Resizable.test.d.ts +0 -1
- package/dist/src/components/__tests__/Responsive.test.d.ts +0 -1
- package/dist/src/components/__tests__/ScrollArea.test.d.ts +0 -1
- package/dist/src/components/__tests__/SegmentedControl.test.d.ts +0 -1
- package/dist/src/components/__tests__/Select.test.d.ts +0 -1
- package/dist/src/components/__tests__/Separator.test.d.ts +0 -1
- package/dist/src/components/__tests__/Sheet.test.d.ts +0 -1
- package/dist/src/components/__tests__/Shell.test.d.ts +0 -1
- package/dist/src/components/__tests__/Skeleton.test.d.ts +0 -1
- package/dist/src/components/__tests__/Slider.test.d.ts +0 -1
- package/dist/src/components/__tests__/Spinner.test.d.ts +0 -1
- package/dist/src/components/__tests__/Stepper.test.d.ts +0 -1
- package/dist/src/components/__tests__/Switch.test.d.ts +0 -1
- package/dist/src/components/__tests__/Table.test.d.ts +0 -1
- package/dist/src/components/__tests__/Tabs.test.d.ts +0 -1
- package/dist/src/components/__tests__/TagInput.test.d.ts +0 -1
- package/dist/src/components/__tests__/Text.test.d.ts +0 -1
- package/dist/src/components/__tests__/Textarea.test.d.ts +0 -1
- package/dist/src/components/__tests__/ThemeProvider.test.d.ts +0 -1
- package/dist/src/components/__tests__/TimePicker.test.d.ts +0 -1
- package/dist/src/components/__tests__/Timeline.test.d.ts +0 -1
- package/dist/src/components/__tests__/Toast.test.d.ts +0 -1
- package/dist/src/components/__tests__/Toggle.test.d.ts +0 -1
- package/dist/src/components/__tests__/Tooltip.test.d.ts +0 -1
- package/dist/src/components/__tests__/TreeView.test.d.ts +0 -1
- package/dist/src/lib/__tests__/cx.test.d.ts +0 -1
- package/dist/src/lib/__tests__/viewport.test.d.ts +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,148 +1,104 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),x=require("react"),ce=require("react-dom");function an(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const _=an(x),on=an(ce),Wr=767,Gr=1023;function Rt(){if(typeof window>"u")return"desktop";const e=window.innerWidth;return e<=Wr?"phone":e<=Gr?"tablet":"desktop"}const ln=x.createContext({viewport:"desktop",isPhone:!1,isTablet:!1,isTabletPortrait:!1,isDesktop:!0});function Pt(){return typeof window>"u"?!1:window.innerHeight>window.innerWidth}function Vr({children:e}){const[t,r]=x.useState(Rt),[s,a]=x.useState(Pt);x.useEffect(()=>{const i=()=>{const u=Rt();r(d=>d===u?d:u);const c=Pt();a(d=>d===c?d:c)};return window.addEventListener("resize",i,{passive:!0}),()=>window.removeEventListener("resize",i)},[]);const o=t==="tablet",l={viewport:t,isPhone:t==="phone",isTablet:o,isTabletPortrait:o&&s,isDesktop:t==="desktop"};return n.jsx(ln.Provider,{value:l,children:e})}function dt(){return x.useContext(ln)}function Kr({desktop:e,mobile:t,tablet:r}){const{viewport:s}=dt();return s==="phone"?n.jsx(n.Fragment,{children:t}):s==="tablet"?n.jsx(n.Fragment,{children:r??e}):n.jsx(n.Fragment,{children:e})}/**
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("react"),oe=require("react-dom");function wt(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:()=>t[r]})}}return n.default=t,Object.freeze(n)}const C=wt(p),_t=wt(oe),kt={sm:640,md:768,lg:1e3},Ye=kt.lg,St=.7,Nt=.75;function Ie(){if(typeof window>"u")return"desktop";const t=window.screen.width,n=window.screen.height;return t>Ye?"desktop":t/n<St?"phone":"tablet"}const jt=p.createContext({viewport:"desktop",isPhone:!1,isTablet:!1,isTabletPortrait:!1,isDesktop:!0,screenWidth:0,screenHeight:0,aspectRatio:0});function st(){return typeof window>"u"?!1:window.innerHeight>window.innerWidth}function Ct({children:t}){const[n,r]=p.useState(Ie),[s,a]=p.useState(st);p.useEffect(()=>{const u=()=>{const f=Ie();r(w=>w===f?w:f);const b=st();a(w=>w===b?w:b)};if(window.addEventListener("resize",u,{passive:!0}),typeof window<"u"&&window.matchMedia){const f=window.matchMedia("(orientation: portrait)"),b=()=>{const w=f.matches;a(_=>_===w?_:w);const N=Ie();r(_=>_===N?_:N)};return f.addEventListener("change",b),()=>{window.removeEventListener("resize",u),f.removeEventListener("change",b)}}return()=>window.removeEventListener("resize",u)},[]);const i=n==="tablet",o=window.screen.width,l=window.screen.height,d=o/l,c={viewport:n,isPhone:n==="phone",isTablet:i,isTabletPortrait:i&&s,isDesktop:n==="desktop",screenWidth:o,screenHeight:l,aspectRatio:d};return e.jsx(jt.Provider,{value:c,children:t})}function Ee(){return p.useContext(jt)}function Vn({desktop:t,mobile:n,tablet:r}){const{viewport:s}=Ee();return s==="phone"?e.jsx(e.Fragment,{children:n}):s==="tablet"?e.jsx(e.Fragment,{children:r??t}):e.jsx(e.Fragment,{children:t})}const Tt={light:{label:"Light",mode:"light"},dark:{label:"Dark",mode:"dark"}};function ne(t,n={}){return{label:n.label,mode:t,tokens:n.tokens}}const Wn={...Tt,sunset:ne("light",{label:"Sunset",tokens:{"--vx-primary":"#c2410c","--vx-primary-strong":"#9a3412","--vx-primary-soft":"rgba(194, 65, 12, 0.12)","--vx-secondary":"#9a3412","--vx-bg":"#fff7ed","--vx-bg-accent":"#ffedd5","--vx-surface-hover":"#fffaf5","--vx-border":"#fed7aa","--vx-border-strong":"#fdba74","--vx-text":"#431407","--vx-text-secondary":"#9a3412","--vx-text-muted":"#b45309","--vx-shadow-sm":"0 1px 2px rgba(124, 45, 18, 0.08)","--vx-shadow":"0 14px 32px rgba(124, 45, 18, 0.08)","--vx-shadow-lg":"0 28px 64px rgba(124, 45, 18, 0.12)"}}),mint:ne("light",{label:"Mint",tokens:{"--vx-primary":"#0f766e","--vx-primary-strong":"#115e59","--vx-primary-soft":"rgba(15, 118, 110, 0.12)","--vx-secondary":"#0f766e","--vx-bg":"#f0fdfa","--vx-bg-accent":"#ccfbf1","--vx-surface-hover":"#f6fffd","--vx-border":"#99f6e4","--vx-border-strong":"#5eead4","--vx-text":"#042f2e","--vx-text-secondary":"#115e59","--vx-text-muted":"#0f766e","--vx-shadow-sm":"0 1px 2px rgba(4, 47, 46, 0.08)","--vx-shadow":"0 14px 32px rgba(4, 47, 46, 0.08)","--vx-shadow-lg":"0 28px 64px rgba(4, 47, 46, 0.12)"}}),graphite:ne("dark",{label:"Graphite",tokens:{"--vx-primary":"#f59e0b","--vx-primary-strong":"#d97706","--vx-primary-soft":"rgba(245, 158, 11, 0.16)","--vx-bg":"#111111","--vx-bg-accent":"#191919","--vx-surface":"#18181b","--vx-surface-strong":"#111111","--vx-surface-hover":"#222225","--vx-border":"rgba(244, 244, 245, 0.10)","--vx-border-strong":"rgba(244, 244, 245, 0.18)","--vx-text":"#fafafa","--vx-text-secondary":"#d4d4d8","--vx-text-muted":"#a1a1aa","--vx-shadow-sm":"0 1px 2px rgba(0, 0, 0, 0.34)","--vx-shadow":"0 20px 44px rgba(0, 0, 0, 0.28)","--vx-shadow-lg":"0 30px 72px rgba(0, 0, 0, 0.38)"}}),"ivory-gold":ne("light",{label:"Ivory Gold",tokens:{"--vx-primary":"#a0742a","--vx-primary-strong":"#7d5a1e","--vx-primary-soft":"rgba(160, 116, 42, 0.12)","--vx-bg":"#faf6ee","--vx-bg-accent":"#f2ead8","--vx-surface":"#ffffff","--vx-surface-strong":"#faf6ee","--vx-surface-hover":"#f6f0e4","--vx-border":"rgba(160, 116, 42, 0.18)","--vx-border-strong":"rgba(160, 116, 42, 0.38)","--vx-text":"#1c1409","--vx-text-secondary":"#5a4320","--vx-text-muted":"#9a7c4a","--vx-shadow-sm":"0 1px 2px rgba(90, 67, 32, 0.08)","--vx-shadow":"0 12px 32px rgba(90, 67, 32, 0.10)","--vx-shadow-lg":"0 28px 64px rgba(90, 67, 32, 0.14)","--vx-success":"#1a9e6e","--vx-warning":"#c4820a","--vx-danger":"#d63b3b"}}),"black-gold":ne("dark",{label:"Black Gold",tokens:{"--vx-primary":"#c8a97c","--vx-primary-strong":"#9a7545","--vx-primary-soft":"rgba(200, 169, 124, 0.16)","--vx-bg":"#05070b","--vx-bg-accent":"#0a0d14","--vx-surface":"rgba(15, 18, 25, 0.76)","--vx-surface-strong":"rgba(18, 21, 29, 0.9)","--vx-surface-hover":"rgba(245, 233, 215, 0.1)","--vx-border":"rgba(245, 233, 215, 0.12)","--vx-border-strong":"rgba(200, 169, 124, 0.42)","--vx-text":"#f5e9d7","--vx-text-secondary":"#d7c8b2","--vx-text-muted":"#928a81","--vx-shadow-sm":"0 1px 2px rgba(0, 0, 0, 0.4)","--vx-shadow":"0 0 42px rgba(200, 169, 124, 0.16)","--vx-shadow-lg":"0 34px 120px rgba(0, 0, 0, 0.62)","--vx-success":"#32d49a","--vx-warning":"#e6ad64","--vx-danger":"#ef6a64"}}),ocean:ne("dark",{label:"Ocean",tokens:{"--vx-primary":"#38bdf8","--vx-primary-strong":"#0ea5e9","--vx-primary-soft":"rgba(56, 189, 248, 0.16)","--vx-bg":"#06131f","--vx-bg-accent":"#0b1a2b","--vx-surface":"#0d2236","--vx-surface-strong":"#06131f","--vx-surface-hover":"#13314d","--vx-border":"rgba(125, 211, 252, 0.16)","--vx-border-strong":"rgba(56, 189, 248, 0.24)","--vx-text":"#e0f2fe","--vx-text-secondary":"#bae6fd","--vx-text-muted":"#7dd3fc","--vx-shadow-sm":"0 1px 2px rgba(2, 6, 23, 0.34)","--vx-shadow":"0 20px 44px rgba(2, 6, 23, 0.28)","--vx-shadow-lg":"0 30px 72px rgba(2, 6, 23, 0.4)"}}),indigo:ne("light",{label:"Indigo",tokens:{"--vx-primary":"#5c5fe8","--vx-primary-strong":"#4f52d4","--vx-primary-soft":"rgba(92, 95, 232, 0.10)","--vx-secondary":"#818cf8","--vx-success":"#059669","--vx-warning":"#d97706","--vx-danger":"#dc2626","--vx-info":"#5c5fe8","--vx-bg":"#e8ecf6","--vx-bg-accent":"#dde3f0","--vx-surface":"#ffffff","--vx-surface-strong":"#f8f9ff","--vx-surface-hover":"#f4f5ff","--vx-border":"#d4daf0","--vx-border-strong":"#bfc8e8","--vx-text":"#1a2336","--vx-text-secondary":"#4a5572","--vx-text-muted":"#8b96b4","--vx-shadow-sm":"0 1px 3px rgba(28, 40, 80, 0.08)","--vx-shadow":"0 8px 28px rgba(28, 40, 80, 0.10)","--vx-shadow-lg":"0 24px 60px rgba(28, 40, 80, 0.14)","--vx-glass-bg":"color-mix(in srgb, #ffffff 86%, transparent)","--vx-glass-bg-strong":"color-mix(in srgb, #f8f9ff 93%, transparent)","--vx-glass-border":"rgba(92, 95, 232, 0.18)","--vx-glass-shadow":"0 16px 44px rgba(28, 40, 80, 0.12)","--vx-glass-highlight":"inset 0 1px 0 rgba(255, 255, 255, 0.70)","--vx-radius-sm":"10px","--vx-radius":"12px","--vx-radius-lg":"16px","--vx-radius-xl":"22px"}}),violet:ne("light",{label:"Violet",tokens:{"--vx-primary":"#7c3aed","--vx-primary-strong":"#6d28d9","--vx-primary-soft":"rgba(124, 58, 237, 0.10)","--vx-secondary":"#8b5cf6","--vx-success":"#059669","--vx-warning":"#d97706","--vx-danger":"#dc2626","--vx-info":"#6d28d9","--vx-bg":"#f8f7ff","--vx-bg-accent":"#ede9fe","--vx-surface":"#ffffff","--vx-surface-strong":"#faf9ff","--vx-surface-hover":"#f5f3ff","--vx-border":"#e4dfff","--vx-border-strong":"#c9bffd","--vx-text":"#1e1b2e","--vx-text-secondary":"#6e6a8a","--vx-text-muted":"#a89fc8","--vx-shadow-sm":"0 1px 3px rgba(109, 40, 217, 0.07)","--vx-shadow":"0 12px 32px rgba(109, 40, 217, 0.10)","--vx-shadow-lg":"0 28px 64px rgba(109, 40, 217, 0.14)","--vx-glass-bg":"color-mix(in srgb, #ffffff 84%, transparent)","--vx-glass-bg-strong":"color-mix(in srgb, #faf9ff 92%, transparent)","--vx-glass-border":"rgba(196, 181, 253, 0.55)","--vx-glass-shadow":"0 18px 48px rgba(109, 40, 217, 0.12)","--vx-glass-highlight":"inset 0 1px 0 rgba(255, 255, 255, 0.60)","--vx-radius-sm":"10px","--vx-radius":"12px","--vx-radius-lg":"16px","--vx-radius-xl":"24px"}}),"violet-dark":ne("dark",{label:"Violet Dark",tokens:{"--vx-primary":"#a78bfa","--vx-primary-strong":"#8b5cf6","--vx-primary-soft":"rgba(167, 139, 250, 0.16)","--vx-secondary":"#c4b5fd","--vx-success":"#34d399","--vx-warning":"#fbbf24","--vx-danger":"#f87171","--vx-info":"#c4b5fd","--vx-bg":"#0d0b1a","--vx-bg-accent":"#13102a","--vx-surface":"#1a1735","--vx-surface-strong":"#0d0b1a","--vx-surface-hover":"#1e1b3a","--vx-border":"rgba(167, 139, 250, 0.16)","--vx-border-strong":"rgba(167, 139, 250, 0.30)","--vx-text":"#f0eeff","--vx-text-secondary":"#c4b5fd","--vx-text-muted":"#8b7fc8","--vx-shadow-sm":"0 1px 3px rgba(0, 0, 0, 0.40)","--vx-shadow":"0 18px 44px rgba(0, 0, 0, 0.30)","--vx-shadow-lg":"0 30px 72px rgba(0, 0, 0, 0.44)","--vx-glass-bg":"color-mix(in srgb, #1a1735 86%, transparent)","--vx-glass-bg-strong":"color-mix(in srgb, #0d0b1a 94%, transparent)","--vx-glass-border":"rgba(167, 139, 250, 0.22)","--vx-glass-shadow":"0 22px 54px rgba(0, 0, 0, 0.50)","--vx-glass-highlight":"inset 0 1px 0 rgba(255, 255, 255, 0.07)","--vx-glass-scrim":"color-mix(in srgb, #04030d 62%, transparent)","--vx-radius-sm":"10px","--vx-radius":"12px","--vx-radius-lg":"16px","--vx-radius-xl":"24px"}}),vxai:ne("light",{label:"VXAI (Default)",tokens:{"--vx-primary":"#4f46e5","--vx-primary-strong":"#4338ca","--vx-primary-soft":"rgba(79, 70, 229, 0.1)","--vx-secondary":"#64748b","--vx-success":"#10b981","--vx-warning":"#f59e0b","--vx-danger":"#ef4444","--vx-info":"#4f46e5","--vx-bg":"#f8fafc","--vx-bg-accent":"#f1f5f9","--vx-surface":"#ffffff","--vx-surface-strong":"#f8fafc","--vx-surface-hover":"#f1f5f9","--vx-border":"#e2e8f0","--vx-border-strong":"#cbd5e1","--vx-text":"#0f172a","--vx-text-secondary":"#334155","--vx-text-muted":"#64748b","--vx-shadow-sm":"0 1px 2px -1px rgba(0, 0, 0, 0.1), 0 1px 3px 0 rgba(0, 0, 0, 0.1)","--vx-shadow":"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)","--vx-shadow-lg":"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)","--vx-glass-bg":"rgba(255, 255, 255, 0.8)","--vx-glass-bg-strong":"rgba(255, 255, 255, 0.95)","--vx-glass-border":"#e2e8f0","--vx-glass-shadow":"none","--vx-glass-highlight":"none","--vx-radius-sm":"4px","--vx-radius":"6px","--vx-radius-lg":"8px","--vx-radius-xl":"12px"}}),"vxai-dark":ne("dark",{label:"VXAI Dark",tokens:{"--vx-primary":"#6366f1","--vx-primary-strong":"#4f46e5","--vx-primary-soft":"rgba(99, 102, 241, 0.16)","--vx-secondary":"#cbd5e1","--vx-success":"#34d399","--vx-warning":"#fbbf24","--vx-danger":"#f87171","--vx-info":"#6366f1","--vx-bg":"#020617","--vx-bg-accent":"#0f172a","--vx-surface":"#0f172a","--vx-surface-strong":"#020617","--vx-surface-hover":"#1e293b","--vx-border":"oklch(27.8% 0.033 256.848)","--vx-border-strong":"#334155","--vx-text":"oklch(96.8% 0.007 247.896)","--vx-text-secondary":"#94a3b8","--vx-text-muted":"#64748b","--vx-shadow-sm":"0 1px 2px -1px rgba(0, 0, 0, 0.4), 0 1px 3px 0 rgba(0, 0, 0, 0.4)","--vx-shadow":"0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4)","--vx-shadow-lg":"0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4)","--vx-glass-bg":"rgba(15, 23, 42, 0.7)","--vx-glass-bg-strong":"rgba(15, 23, 42, 0.95)","--vx-glass-border":"oklch(27.8% 0.033 256.848)","--vx-glass-shadow":"none","--vx-glass-highlight":"none","--vx-radius-sm":"4px","--vx-radius":"6px","--vx-radius-lg":"8px","--vx-radius-xl":"12px"}})};function qn(t){return{...Tt,...t}}function Kn(t,n){if(t&&n[t])return t;if(n.light)return"light";const[r]=Object.keys(n);return r??"light"}function Yn(t,n){const r=window.localStorage.getItem(t);return r&&n[r]?r:null}function Xn(t,n,r){var a;if(((a=t[r])==null?void 0:a.mode)===n)return r;const s=Object.entries(t).find(([,i])=>i.mode===n);return s==null?void 0:s[0]}const Et=p.createContext(null);function At({children:t,defaultTheme:n="light",storageKey:r="vxui-react-theme",themes:s}){const a=p.useMemo(()=>qn(s),[s]),i=p.useMemo(()=>Kn(n,a),[n,a]),o=p.useRef([]),[l,d]=p.useState(()=>typeof window>"u"?i:Yn(r,a)??i),c=a[l]?l:i,u=a[c];p.useEffect(()=>{l!==c&&d(c)},[c,l]),p.useEffect(()=>{const b=document.documentElement;for(const N of o.current)b.style.removeProperty(N);b.dataset.theme=u.mode,b.dataset.themeName=c;const w=Object.entries(u.tokens??{}).filter(N=>typeof N[1]=="string"&&N[1].length>0);for(const[N,_]of w)b.style.setProperty(N,_);o.current=w.map(([N])=>N),window.localStorage.setItem(r,c)},[u,c,r]);const f=p.useMemo(()=>({theme:c,mode:u.mode,themes:a,setTheme:b=>{d(a[b]?b:i)},toggleTheme:()=>{d(b=>{const N=(a[b]??u).mode==="light"?"dark":"light";return Xn(a,N,N)??b})}}),[u,i,a,c]);return e.jsx(Et.Provider,{value:f,children:t})}function Zn(){const t=p.useContext(Et);if(!t)throw new Error("useTheme must be used within ThemeProvider.");return t}function Y(t,n,{checkForDefaultPrevented:r=!0}={}){return function(a){if(t==null||t(a),r===!1||!a.defaultPrevented)return n==null?void 0:n(a)}}function at(t,n){if(typeof t=="function")return t(n);t!=null&&(t.current=n)}function Pt(...t){return n=>{let r=!1;const s=t.map(a=>{const i=at(a,n);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let a=0;a<s.length;a++){const i=s[a];typeof i=="function"?i():at(t[a],null)}}}}function se(...t){return C.useCallback(Pt(...t),t)}function ve(t,n=[]){let r=[];function s(i,o){const l=C.createContext(o),d=r.length;r=[...r,o];const c=f=>{var k;const{scope:b,children:w,...N}=f,_=((k=b==null?void 0:b[t])==null?void 0:k[d])||l,g=C.useMemo(()=>N,Object.values(N));return e.jsx(_.Provider,{value:g,children:w})};c.displayName=i+"Provider";function u(f,b){var _;const w=((_=b==null?void 0:b[t])==null?void 0:_[d])||l,N=C.useContext(w);if(N)return N;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[c,u]}const a=()=>{const i=r.map(o=>C.createContext(o));return function(l){const d=(l==null?void 0:l[t])||i;return C.useMemo(()=>({[`__scope${t}`]:{...l,[t]:d}}),[l,d])}};return a.scopeName=t,[s,Qn(a,...n)]}function Qn(...t){const n=t[0];if(t.length===1)return n;const r=()=>{const s=t.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const o=s.reduce((l,{useScope:d,scopeName:c})=>{const f=d(i)[`__scope${c}`];return{...l,...f}},{});return C.useMemo(()=>({[`__scope${n.scopeName}`]:o}),[o])}};return r.scopeName=n.scopeName,r}function Be(t){const n=Jn(t),r=C.forwardRef((s,a)=>{const{children:i,...o}=s,l=C.Children.toArray(i),d=l.find(tr);if(d){const c=d.props.children,u=l.map(f=>f===d?C.Children.count(c)>1?C.Children.only(null):C.isValidElement(c)?c.props.children:null:f);return e.jsx(n,{...o,ref:a,children:C.isValidElement(c)?C.cloneElement(c,void 0,u):null})}return e.jsx(n,{...o,ref:a,children:i})});return r.displayName=`${t}.Slot`,r}function Jn(t){const n=C.forwardRef((r,s)=>{const{children:a,...i}=r;if(C.isValidElement(a)){const o=rr(a),l=nr(i,a.props);return a.type!==C.Fragment&&(l.ref=s?Pt(s,o):o),C.cloneElement(a,l)}return C.Children.count(a)>1?C.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var er=Symbol("radix.slottable");function tr(t){return C.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===er}function nr(t,n){const r={...n};for(const s in n){const a=t[s],i=n[s];/^on[A-Z]/.test(s)?a&&i?r[s]=(...l)=>{const d=i(...l);return a(...l),d}:a&&(r[s]=a):s==="style"?r[s]={...a,...i}:s==="className"&&(r[s]=[a,i].filter(Boolean).join(" "))}return{...t,...r}}function rr(t){var s,a;let n=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?t.ref:(n=(a=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:a.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function Rt(t){const n=t+"CollectionProvider",[r,s]=ve(n),[a,i]=r(n,{collectionRef:{current:null},itemMap:new Map}),o=_=>{const{scope:g,children:k}=_,v=p.useRef(null),h=p.useRef(new Map).current;return e.jsx(a,{scope:g,itemMap:h,collectionRef:v,children:k})};o.displayName=n;const l=t+"CollectionSlot",d=Be(l),c=p.forwardRef((_,g)=>{const{scope:k,children:v}=_,h=i(l,k),m=se(g,h.collectionRef);return e.jsx(d,{ref:m,children:v})});c.displayName=l;const u=t+"CollectionItemSlot",f="data-radix-collection-item",b=Be(u),w=p.forwardRef((_,g)=>{const{scope:k,children:v,...h}=_,m=p.useRef(null),x=se(g,m),y=i(u,k);return p.useEffect(()=>(y.itemMap.set(m,{ref:m,...h}),()=>void y.itemMap.delete(m))),e.jsx(b,{[f]:"",ref:x,children:v})});w.displayName=u;function N(_){const g=i(t+"CollectionConsumer",_);return p.useCallback(()=>{const v=g.collectionRef.current;if(!v)return[];const h=Array.from(v.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((y,S)=>h.indexOf(y.ref.current)-h.indexOf(S.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:o,Slot:c,ItemSlot:w},N,s]}var sr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Q=sr.reduce((t,n)=>{const r=Be(`Primitive.${n}`),s=C.forwardRef((a,i)=>{const{asChild:o,...l}=a,d=o?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),e.jsx(d,{...l,ref:i})});return s.displayName=`Primitive.${n}`,{...t,[n]:s}},{});function Ft(t,n){t&&_t.flushSync(()=>t.dispatchEvent(n))}function ie(t){const n=C.useRef(t);return C.useEffect(()=>{n.current=t}),C.useMemo(()=>(...r)=>{var s;return(s=n.current)==null?void 0:s.call(n,...r)},[])}function ar(t,n=globalThis==null?void 0:globalThis.document){const r=ie(t);C.useEffect(()=>{const s=a=>{a.key==="Escape"&&r(a)};return n.addEventListener("keydown",s,{capture:!0}),()=>n.removeEventListener("keydown",s,{capture:!0})},[r,n])}var or="DismissableLayer",He="dismissableLayer.update",ir="dismissableLayer.pointerDownOutside",lr="dismissableLayer.focusOutside",ot,Dt=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Lt=C.forwardRef((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:o,onDismiss:l,...d}=t,c=C.useContext(Dt),[u,f]=C.useState(null),b=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,w]=C.useState({}),N=se(n,S=>f(S)),_=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),k=_.indexOf(g),v=u?_.indexOf(u):-1,h=c.layersWithOutsidePointerEventsDisabled.size>0,m=v>=k,x=dr(S=>{const P=S.target,E=[...c.branches].some(R=>R.contains(P));!m||E||(a==null||a(S),o==null||o(S),S.defaultPrevented||l==null||l())},b),y=ur(S=>{const P=S.target;[...c.branches].some(R=>R.contains(P))||(i==null||i(S),o==null||o(S),S.defaultPrevented||l==null||l())},b);return ar(S=>{v===c.layers.size-1&&(s==null||s(S),!S.defaultPrevented&&l&&(S.preventDefault(),l()))},b),C.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(ot=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),it(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=ot)}},[u,b,r,c]),C.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),it())},[u,c]),C.useEffect(()=>{const S=()=>w({});return document.addEventListener(He,S),()=>document.removeEventListener(He,S)},[]),e.jsx(Q.div,{...d,ref:N,style:{pointerEvents:h?m?"auto":"none":void 0,...t.style},onFocusCapture:Y(t.onFocusCapture,y.onFocusCapture),onBlurCapture:Y(t.onBlurCapture,y.onBlurCapture),onPointerDownCapture:Y(t.onPointerDownCapture,x.onPointerDownCapture)})});Lt.displayName=or;var cr="DismissableLayerBranch",It=C.forwardRef((t,n)=>{const r=C.useContext(Dt),s=C.useRef(null),a=se(n,s);return C.useEffect(()=>{const i=s.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),e.jsx(Q.div,{...t,ref:a})});It.displayName=cr;function dr(t,n=globalThis==null?void 0:globalThis.document){const r=ie(t),s=C.useRef(!1),a=C.useRef(()=>{});return C.useEffect(()=>{const i=l=>{if(l.target&&!s.current){let d=function(){Mt(ir,r,c,{discrete:!0})};const c={originalEvent:l};l.pointerType==="touch"?(n.removeEventListener("click",a.current),a.current=d,n.addEventListener("click",a.current,{once:!0})):d()}else n.removeEventListener("click",a.current);s.current=!1},o=window.setTimeout(()=>{n.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),n.removeEventListener("pointerdown",i),n.removeEventListener("click",a.current)}},[n,r]),{onPointerDownCapture:()=>s.current=!0}}function ur(t,n=globalThis==null?void 0:globalThis.document){const r=ie(t),s=C.useRef(!1);return C.useEffect(()=>{const a=i=>{i.target&&!s.current&&Mt(lr,r,{originalEvent:i},{discrete:!1})};return n.addEventListener("focusin",a),()=>n.removeEventListener("focusin",a)},[n,r]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function it(){const t=new CustomEvent(He);document.dispatchEvent(t)}function Mt(t,n,r,{discrete:s}){const a=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});n&&a.addEventListener(t,n,{once:!0}),s?Ft(a,i):a.dispatchEvent(i)}var pr=Lt,mr=It,de=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{},fr="Portal",Ot=C.forwardRef((t,n)=>{var l;const{container:r,...s}=t,[a,i]=C.useState(!1);de(()=>i(!0),[]);const o=r||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?oe.createPortal(e.jsx(Q.div,{...s,ref:n}),o):null});Ot.displayName=fr;function hr(t,n){return C.useReducer((r,s)=>n[r][s]??r,t)}var Xe=t=>{const{present:n,children:r}=t,s=vr(n),a=typeof r=="function"?r({present:s.isPresent}):C.Children.only(r),i=se(s.ref,gr(a));return typeof r=="function"||s.isPresent?C.cloneElement(a,{ref:i}):null};Xe.displayName="Presence";function vr(t){const[n,r]=C.useState(),s=C.useRef(null),a=C.useRef(t),i=C.useRef("none"),o=t?"mounted":"unmounted",[l,d]=hr(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const c=_e(s.current);i.current=l==="mounted"?c:"none"},[l]),de(()=>{const c=s.current,u=a.current;if(u!==t){const b=i.current,w=_e(c);t?d("MOUNT"):w==="none"||(c==null?void 0:c.display)==="none"?d("UNMOUNT"):d(u&&b!==w?"ANIMATION_OUT":"UNMOUNT"),a.current=t}},[t,d]),de(()=>{if(n){let c;const u=n.ownerDocument.defaultView??window,f=w=>{const _=_e(s.current).includes(CSS.escape(w.animationName));if(w.target===n&&_&&(d("ANIMATION_END"),!a.current)){const g=n.style.animationFillMode;n.style.animationFillMode="forwards",c=u.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=g)})}},b=w=>{w.target===n&&(i.current=_e(s.current))};return n.addEventListener("animationstart",b),n.addEventListener("animationcancel",f),n.addEventListener("animationend",f),()=>{u.clearTimeout(c),n.removeEventListener("animationstart",b),n.removeEventListener("animationcancel",f),n.removeEventListener("animationend",f)}}else d("ANIMATION_END")},[n,d]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:C.useCallback(c=>{s.current=c?getComputedStyle(c):null,r(c)},[])}}function _e(t){return(t==null?void 0:t.animationName)||"none"}function gr(t){var s,a;let n=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?t.ref:(n=(a=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:a.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var xr=C[" useInsertionEffect ".trim().toString()]||de;function Ae({prop:t,defaultProp:n,onChange:r=()=>{},caller:s}){const[a,i,o]=br({defaultProp:n,onChange:r}),l=t!==void 0,d=l?t:a;{const u=C.useRef(t!==void 0);C.useEffect(()=>{const f=u.current;f!==l&&console.warn(`${s} is changing from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=l},[l,s])}const c=C.useCallback(u=>{var f;if(l){const b=yr(u)?u(t):u;b!==t&&((f=o.current)==null||f.call(o,b))}else i(u)},[l,t,i,o]);return[d,c]}function br({defaultProp:t,onChange:n}){const[r,s]=C.useState(t),a=C.useRef(r),i=C.useRef(n);return xr(()=>{i.current=n},[n]),C.useEffect(()=>{var o;a.current!==r&&((o=i.current)==null||o.call(i,r),a.current=r)},[r,a]),[r,s,i]}function yr(t){return typeof t=="function"}var wr=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),_r="VisuallyHidden",Ze=C.forwardRef((t,n)=>e.jsx(Q.span,{...t,ref:n,style:{...wr,...t.style}}));Ze.displayName=_r;var Qe="ToastProvider",[Je,kr,Sr]=Rt("Toast"),[$t]=ve("Toast",[Sr]),[Nr,Pe]=$t(Qe),zt=t=>{const{__scopeToast:n,label:r="Notification",duration:s=5e3,swipeDirection:a="right",swipeThreshold:i=50,children:o}=t,[l,d]=C.useState(null),[c,u]=C.useState(0),f=C.useRef(!1),b=C.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Qe}\`. Expected non-empty \`string\`.`),e.jsx(Je.Provider,{scope:n,children:e.jsx(Nr,{scope:n,label:r,duration:s,swipeDirection:a,swipeThreshold:i,toastCount:c,viewport:l,onViewportChange:d,onToastAdd:C.useCallback(()=>u(w=>w+1),[]),onToastRemove:C.useCallback(()=>u(w=>w-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:b,children:o})})};zt.displayName=Qe;var Bt="ToastViewport",jr=["F8"],Ue="toast.viewportPause",Ge="toast.viewportResume",Ht=C.forwardRef((t,n)=>{const{__scopeToast:r,hotkey:s=jr,label:a="Notifications ({hotkey})",...i}=t,o=Pe(Bt,r),l=kr(r),d=C.useRef(null),c=C.useRef(null),u=C.useRef(null),f=C.useRef(null),b=se(n,f,o.onViewportChange),w=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),N=o.toastCount>0;C.useEffect(()=>{const g=k=>{var h;s.length!==0&&s.every(m=>k[m]||k.code===m)&&((h=f.current)==null||h.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[s]),C.useEffect(()=>{const g=d.current,k=f.current;if(N&&g&&k){const v=()=>{if(!o.isClosePausedRef.current){const y=new CustomEvent(Ue);k.dispatchEvent(y),o.isClosePausedRef.current=!0}},h=()=>{if(o.isClosePausedRef.current){const y=new CustomEvent(Ge);k.dispatchEvent(y),o.isClosePausedRef.current=!1}},m=y=>{!g.contains(y.relatedTarget)&&h()},x=()=>{g.contains(document.activeElement)||h()};return g.addEventListener("focusin",v),g.addEventListener("focusout",m),g.addEventListener("pointermove",v),g.addEventListener("pointerleave",x),window.addEventListener("blur",v),window.addEventListener("focus",h),()=>{g.removeEventListener("focusin",v),g.removeEventListener("focusout",m),g.removeEventListener("pointermove",v),g.removeEventListener("pointerleave",x),window.removeEventListener("blur",v),window.removeEventListener("focus",h)}}},[N,o.isClosePausedRef]);const _=C.useCallback(({tabbingDirection:g})=>{const v=l().map(h=>{const m=h.ref.current,x=[m,...zr(m)];return g==="forwards"?x:x.reverse()});return(g==="forwards"?v.reverse():v).flat()},[l]);return C.useEffect(()=>{const g=f.current;if(g){const k=v=>{var x,y,S;const h=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!h){const P=document.activeElement,E=v.shiftKey;if(v.target===g&&E){(x=c.current)==null||x.focus();return}const A=_({tabbingDirection:E?"backwards":"forwards"}),$=A.findIndex(D=>D===P);Me(A.slice($+1))?v.preventDefault():E?(y=c.current)==null||y.focus():(S=u.current)==null||S.focus()}};return g.addEventListener("keydown",k),()=>g.removeEventListener("keydown",k)}},[l,_]),e.jsxs(mr,{ref:d,role:"region","aria-label":a.replace("{hotkey}",w),tabIndex:-1,style:{pointerEvents:N?void 0:"none"},children:[N&&e.jsx(Ve,{ref:c,onFocusFromOutsideViewport:()=>{const g=_({tabbingDirection:"forwards"});Me(g)}}),e.jsx(Je.Slot,{scope:r,children:e.jsx(Q.ol,{tabIndex:-1,...i,ref:b})}),N&&e.jsx(Ve,{ref:u,onFocusFromOutsideViewport:()=>{const g=_({tabbingDirection:"backwards"});Me(g)}})]})});Ht.displayName=Bt;var Ut="ToastFocusProxy",Ve=C.forwardRef((t,n)=>{const{__scopeToast:r,onFocusFromOutsideViewport:s,...a}=t,i=Pe(Ut,r);return e.jsx(Ze,{tabIndex:0,...a,ref:n,style:{position:"fixed"},onFocus:o=>{var c;const l=o.relatedTarget;!((c=i.viewport)!=null&&c.contains(l))&&s()}})});Ve.displayName=Ut;var ge="Toast",Cr="toast.swipeStart",Tr="toast.swipeMove",Er="toast.swipeCancel",Ar="toast.swipeEnd",Gt=C.forwardRef((t,n)=>{const{forceMount:r,open:s,defaultOpen:a,onOpenChange:i,...o}=t,[l,d]=Ae({prop:s,defaultProp:a??!0,onChange:i,caller:ge});return e.jsx(Xe,{present:r||l,children:e.jsx(Fr,{open:l,...o,ref:n,onClose:()=>d(!1),onPause:ie(t.onPause),onResume:ie(t.onResume),onSwipeStart:Y(t.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Y(t.onSwipeMove,c=>{const{x:u,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:Y(t.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Y(t.onSwipeEnd,c=>{const{x:u,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),d(!1)})})})});Gt.displayName=ge;var[Pr,Rr]=$t(ge,{onClose(){}}),Fr=C.forwardRef((t,n)=>{const{__scopeToast:r,type:s="foreground",duration:a,open:i,onClose:o,onEscapeKeyDown:l,onPause:d,onResume:c,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:b,onSwipeEnd:w,...N}=t,_=Pe(ge,r),[g,k]=C.useState(null),v=se(n,D=>k(D)),h=C.useRef(null),m=C.useRef(null),x=a||_.duration,y=C.useRef(0),S=C.useRef(x),P=C.useRef(0),{onToastAdd:E,onToastRemove:R}=_,T=ie(()=>{var I;(g==null?void 0:g.contains(document.activeElement))&&((I=_.viewport)==null||I.focus()),o()}),A=C.useCallback(D=>{!D||D===1/0||(window.clearTimeout(P.current),y.current=new Date().getTime(),P.current=window.setTimeout(T,D))},[T]);C.useEffect(()=>{const D=_.viewport;if(D){const I=()=>{A(S.current),c==null||c()},O=()=>{const H=new Date().getTime()-y.current;S.current=S.current-H,window.clearTimeout(P.current),d==null||d()};return D.addEventListener(Ue,O),D.addEventListener(Ge,I),()=>{D.removeEventListener(Ue,O),D.removeEventListener(Ge,I)}}},[_.viewport,x,d,c,A]),C.useEffect(()=>{i&&!_.isClosePausedRef.current&&A(x)},[i,x,_.isClosePausedRef,A]),C.useEffect(()=>(E(),()=>R()),[E,R]);const $=C.useMemo(()=>g?Xt(g):null,[g]);return _.viewport?e.jsxs(e.Fragment,{children:[$&&e.jsx(Dr,{__scopeToast:r,role:"status","aria-live":s==="foreground"?"assertive":"polite",children:$}),e.jsx(Pr,{scope:r,onClose:T,children:_t.createPortal(e.jsx(Je.ItemSlot,{scope:r,children:e.jsx(pr,{asChild:!0,onEscapeKeyDown:Y(l,()=>{_.isFocusedToastEscapeKeyDownRef.current||T(),_.isFocusedToastEscapeKeyDownRef.current=!1}),children:e.jsx(Q.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":_.swipeDirection,...N,ref:v,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Y(t.onKeyDown,D=>{D.key==="Escape"&&(l==null||l(D.nativeEvent),D.nativeEvent.defaultPrevented||(_.isFocusedToastEscapeKeyDownRef.current=!0,T()))}),onPointerDown:Y(t.onPointerDown,D=>{D.button===0&&(h.current={x:D.clientX,y:D.clientY})}),onPointerMove:Y(t.onPointerMove,D=>{if(!h.current)return;const I=D.clientX-h.current.x,O=D.clientY-h.current.y,H=!!m.current,U=["left","right"].includes(_.swipeDirection),W=["left","up"].includes(_.swipeDirection)?Math.min:Math.max,K=U?W(0,I):0,X=U?0:W(0,O),q=D.pointerType==="touch"?10:2,ee={x:K,y:X},Z={originalEvent:D,delta:ee};H?(m.current=ee,ke(Tr,f,Z,{discrete:!1})):lt(ee,_.swipeDirection,q)?(m.current=ee,ke(Cr,u,Z,{discrete:!1}),D.target.setPointerCapture(D.pointerId)):(Math.abs(I)>q||Math.abs(O)>q)&&(h.current=null)}),onPointerUp:Y(t.onPointerUp,D=>{const I=m.current,O=D.target;if(O.hasPointerCapture(D.pointerId)&&O.releasePointerCapture(D.pointerId),m.current=null,h.current=null,I){const H=D.currentTarget,U={originalEvent:D,delta:I};lt(I,_.swipeDirection,_.swipeThreshold)?ke(Ar,w,U,{discrete:!0}):ke(Er,b,U,{discrete:!0}),H.addEventListener("click",W=>W.preventDefault(),{once:!0})}})})})}),_.viewport)})]}):null}),Dr=t=>{const{__scopeToast:n,children:r,...s}=t,a=Pe(ge,n),[i,o]=C.useState(!1),[l,d]=C.useState(!1);return Or(()=>o(!0)),C.useEffect(()=>{const c=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(c)},[]),l?null:e.jsx(Ot,{asChild:!0,children:e.jsx(Ze,{...s,children:i&&e.jsxs(e.Fragment,{children:[a.label," ",r]})})})},Lr="ToastTitle",Vt=C.forwardRef((t,n)=>{const{__scopeToast:r,...s}=t;return e.jsx(Q.div,{...s,ref:n})});Vt.displayName=Lr;var Ir="ToastDescription",Wt=C.forwardRef((t,n)=>{const{__scopeToast:r,...s}=t;return e.jsx(Q.div,{...s,ref:n})});Wt.displayName=Ir;var qt="ToastAction",Mr=C.forwardRef((t,n)=>{const{altText:r,...s}=t;return r.trim()?e.jsx(Yt,{altText:r,asChild:!0,children:e.jsx(et,{...s,ref:n})}):(console.error(`Invalid prop \`altText\` supplied to \`${qt}\`. Expected non-empty \`string\`.`),null)});Mr.displayName=qt;var Kt="ToastClose",et=C.forwardRef((t,n)=>{const{__scopeToast:r,...s}=t,a=Rr(Kt,r);return e.jsx(Yt,{asChild:!0,children:e.jsx(Q.button,{type:"button",...s,ref:n,onClick:Y(t.onClick,a.onClose)})})});et.displayName=Kt;var Yt=C.forwardRef((t,n)=>{const{__scopeToast:r,altText:s,...a}=t;return e.jsx(Q.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":s||void 0,...a,ref:n})});function Xt(t){const n=[];return Array.from(t.childNodes).forEach(s=>{if(s.nodeType===s.TEXT_NODE&&s.textContent&&n.push(s.textContent),$r(s)){const a=s.ariaHidden||s.hidden||s.style.display==="none",i=s.dataset.radixToastAnnounceExclude==="";if(!a)if(i){const o=s.dataset.radixToastAnnounceAlt;o&&n.push(o)}else n.push(...Xt(s))}}),n}function ke(t,n,r,{discrete:s}){const a=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});n&&a.addEventListener(t,n,{once:!0}),s?Ft(a,i):a.dispatchEvent(i)}var lt=(t,n,r=0)=>{const s=Math.abs(t.x),a=Math.abs(t.y),i=s>a;return n==="left"||n==="right"?i&&s>r:!i&&a>r};function Or(t=()=>{}){const n=ie(t);de(()=>{let r=0,s=0;return r=window.requestAnimationFrame(()=>s=window.requestAnimationFrame(n)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(s)}},[n])}function $r(t){return t.nodeType===t.ELEMENT_NODE}function zr(t){const n=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const a=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||a?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)n.push(r.currentNode);return n}function Me(t){const n=document.activeElement;return t.some(r=>r===n?!0:(r.focus(),document.activeElement!==n))}var Br=zt,Hr=Ht,Ur=Gt,Gr=Vt,Vr=Wt,Wr=et;/**
|
|
2
2
|
* @license lucide-react v0.511.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const qr=
|
|
6
|
+
*/const qr=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Kr=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,r,s)=>s?s.toUpperCase():r.toLowerCase()),ct=t=>{const n=Kr(t);return n.charAt(0).toUpperCase()+n.slice(1)},Zt=(...t)=>t.filter((n,r,s)=>!!n&&n.trim()!==""&&s.indexOf(n)===r).join(" ").trim(),Yr=t=>{for(const n in t)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};/**
|
|
7
7
|
* @license lucide-react v0.511.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/var
|
|
11
|
+
*/var Xr={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"};/**
|
|
12
12
|
* @license lucide-react v0.511.0 - ISC
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const
|
|
16
|
+
*/const Zr=p.forwardRef(({color:t="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:a="",children:i,iconNode:o,...l},d)=>p.createElement("svg",{ref:d,...Xr,width:n,height:n,stroke:t,strokeWidth:s?Number(r)*24/Number(n):r,className:Zt("lucide",a),...!i&&!Yr(l)&&{"aria-hidden":"true"},...l},[...o.map(([c,u])=>p.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
|
|
17
17
|
* @license lucide-react v0.511.0 - ISC
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const
|
|
21
|
+
*/const J=(t,n)=>{const r=p.forwardRef(({className:s,...a},i)=>p.createElement(Zr,{ref:i,iconNode:n,className:Zt(`lucide-${qr(ct(t))}`,`lucide-${t}`,s),...a}));return r.displayName=ct(t),r};/**
|
|
22
22
|
* @license lucide-react v0.511.0 - ISC
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the ISC license.
|
|
25
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const
|
|
26
|
+
*/const Qr=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],he=J("check",Qr);/**
|
|
27
27
|
* @license lucide-react v0.511.0 - ISC
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the ISC license.
|
|
30
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const
|
|
31
|
+
*/const Jr=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],xe=J("chevron-down",Jr);/**
|
|
32
32
|
* @license lucide-react v0.511.0 - ISC
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const
|
|
36
|
+
*/const es=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Qt=J("chevron-left",es);/**
|
|
37
37
|
* @license lucide-react v0.511.0 - ISC
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the ISC license.
|
|
40
40
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const
|
|
41
|
+
*/const ts=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],be=J("chevron-right",ts);/**
|
|
42
42
|
* @license lucide-react v0.511.0 - ISC
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the ISC license.
|
|
45
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const
|
|
46
|
+
*/const ns=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],rs=J("circle-alert",ns);/**
|
|
47
47
|
* @license lucide-react v0.511.0 - ISC
|
|
48
48
|
*
|
|
49
49
|
* This source code is licensed under the ISC license.
|
|
50
50
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const
|
|
51
|
+
*/const ss=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],as=J("circle-check",ss);/**
|
|
52
52
|
* @license lucide-react v0.511.0 - ISC
|
|
53
53
|
*
|
|
54
54
|
* This source code is licensed under the ISC license.
|
|
55
55
|
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const
|
|
56
|
+
*/const os=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],is=J("copy",os);/**
|
|
57
57
|
* @license lucide-react v0.511.0 - ISC
|
|
58
58
|
*
|
|
59
59
|
* This source code is licensed under the ISC license.
|
|
60
60
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const
|
|
61
|
+
*/const ls=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],cs=J("file",ls);/**
|
|
62
62
|
* @license lucide-react v0.511.0 - ISC
|
|
63
63
|
*
|
|
64
64
|
* This source code is licensed under the ISC license.
|
|
65
65
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const ds=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],
|
|
66
|
+
*/const ds=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],us=J("globe",ds);/**
|
|
67
67
|
* @license lucide-react v0.511.0 - ISC
|
|
68
68
|
*
|
|
69
69
|
* This source code is licensed under the ISC license.
|
|
70
70
|
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const
|
|
71
|
+
*/const ps=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],ms=J("info",ps);/**
|
|
72
72
|
* @license lucide-react v0.511.0 - ISC
|
|
73
73
|
*
|
|
74
74
|
* This source code is licensed under the ISC license.
|
|
75
75
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const
|
|
76
|
+
*/const fs=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],Jt=J("panel-left-close",fs);/**
|
|
77
77
|
* @license lucide-react v0.511.0 - ISC
|
|
78
78
|
*
|
|
79
79
|
* This source code is licensed under the ISC license.
|
|
80
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const hs=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],
|
|
81
|
+
*/const hs=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],en=J("panel-left-open",hs);/**
|
|
82
82
|
* @license lucide-react v0.511.0 - ISC
|
|
83
83
|
*
|
|
84
84
|
* This source code is licensed under the ISC license.
|
|
85
85
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const
|
|
86
|
+
*/const vs=[["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"}]],gs=J("triangle-alert",vs);/**
|
|
87
87
|
* @license lucide-react v0.511.0 - ISC
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const
|
|
91
|
+
*/const xs=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],bs=J("upload",xs);/**
|
|
92
92
|
* @license lucide-react v0.511.0 - ISC
|
|
93
93
|
*
|
|
94
94
|
* This source code is licensed under the ISC license.
|
|
95
95
|
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const _s=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],re=q("x",_s);function pt(e,t,r=!0){x.useEffect(()=>{const s=e.current,a=t.current;if(!s)return;if(!r||!a){s.dataset.scrollable="false",s.dataset.scrollbarState="hidden",s.style.setProperty("--vx-scrollbar-thumb-height","0px"),s.style.setProperty("--vx-scrollbar-thumb-offset","0px");return}let o;const l=()=>{const d=a.scrollHeight>a.clientHeight+1;if(s.dataset.scrollable=d?"true":"false",!d){s.dataset.scrollbarState="hidden",s.style.setProperty("--vx-scrollbar-thumb-height","0px"),s.style.setProperty("--vx-scrollbar-thumb-offset","0px");return}const f=Math.max(s.clientHeight-16,0),y=Math.max(a.clientHeight/a.scrollHeight*f,36),S=a.scrollHeight-a.clientHeight,N=Math.max(f-y,0),g=S>0?a.scrollTop/S*N:0;s.style.setProperty("--vx-scrollbar-thumb-height",`${y}px`),s.style.setProperty("--vx-scrollbar-thumb-offset",`${g}px`),s.dataset.scrollbarState!=="active"&&(s.dataset.scrollbarState="hidden")},i=()=>{s.dataset.scrollable==="true"&&(s.dataset.scrollbarState="active",o!==void 0&&window.clearTimeout(o),o=window.setTimeout(()=>{s.dataset.scrollbarState="hidden"},640))},u=()=>{l(),i()};l(),a.addEventListener("scroll",u,{passive:!0});const c=new ResizeObserver(()=>l());return c.observe(s),c.observe(a),()=>{a.removeEventListener("scroll",u),c.disconnect(),o!==void 0&&window.clearTimeout(o)}},[r,e,t])}function C(...e){return e.filter(Boolean).join(" ")}const oe=x.forwardRef(function({className:t,variant:r="solid",size:s="md",shape:a="rect",fullWidth:o=!1,loading:l=!1,startIcon:i,endIcon:u,disabled:c,type:d="button",children:f,...y},S){return n.jsxs("button",{ref:S,type:d,disabled:c||l,"aria-busy":l||void 0,className:C("vx-button",`vx-button--${r}`,`vx-button--${s}`,a==="square"&&"vx-button--square",a==="pill"&&"vx-button--pill",a==="circle"&&"vx-button--circle",o&&"vx-button--full-width",l&&"vx-button--loading",t),...y,children:[l?n.jsx("span",{className:"vx-button__spinner","aria-hidden":"true"}):i??null,f,!l&&u?u:null]})}),st=x.createContext(!1);function fn({collapsed:e=!1,mobileNavOpen:t=!1,density:r,sidebarWidth:s,className:a,children:o}){const{isTablet:l,isTabletPortrait:i}=dt(),u=s?{"--vx-sidebar-width":typeof s=="number"?`${s}px`:s}:void 0;return n.jsx(st.Provider,{value:e,children:n.jsx("div",{className:C("vx-shell",a),"data-collapsed":e,"data-nav-open":t,"data-tablet":l,"data-tablet-portrait":i,"data-density":r,style:u,children:o})})}function vn({brand:e="VXUI",brandCaption:t,brandIcon:r,collapsed:s=!1,footer:a,onToggle:o,collapseLabel:l="Collapse",expandLabel:i="Expand",onSidebarClick:u,children:c}){const d=x.useRef(null),f=x.useRef(null);return pt(d,f),n.jsxs("aside",{ref:d,className:"vx-sidebar vx-scroll-host","data-scrollable":"false","data-scrollbar-state":"hidden",onClickCapture:u,children:[n.jsxs("div",{ref:y=>{f.current=y},className:"vx-sidebar__scroll vx-scroll-hide-native",children:[n.jsx("div",{className:"vx-sidebar__header",children:n.jsxs("div",{className:"vx-sidebar__brand",children:[r?n.jsx("span",{className:"vx-sidebar__brand-icon",children:r}):null,n.jsxs("div",{className:"vx-sidebar__brand-copy",children:[n.jsx("span",{className:"vx-sidebar__brand-text",children:e}),t?n.jsx("span",{className:"vx-sidebar__brand-caption",children:t}):null]})]})}),c,n.jsxs("div",{className:"vx-sidebar__footer",children:[a?n.jsx("div",{className:"vx-sidebar__footer-content",children:a}):null,o?n.jsxs(oe,{variant:"ghost",size:"sm",className:"vx-sidebar__toggle",onClick:o,"aria-label":s?i:l,children:[s?n.jsx(pn,{size:16}):n.jsx(dn,{size:16}),n.jsx("span",{className:"vx-sidebar__toggle-label",children:s?i:l})]}):null]})]}),n.jsx("span",{className:"vx-overlay-scrollbar","aria-hidden":"true",children:n.jsx("span",{className:"vx-overlay-scrollbar__thumb"})})]})}function mn({label:e="Primary navigation",children:t}){return n.jsx("nav",{className:"vx-sidebar__nav","aria-label":e,children:t})}function hn({title:e,children:t}){return n.jsxs("div",{className:"vx-nav-section-block",children:[e?n.jsx("div",{className:"vx-nav-section-block__title",children:e}):null,n.jsx("div",{className:"vx-nav-section-block__items",children:t})]})}function xn({label:e,icon:t,badge:r,trailing:s,active:a,onSelect:o,children:l,defaultOpen:i=!1}){const[u,c]=x.useState(i),[d,f]=x.useState(!1),[y,S]=x.useState({top:0,left:0}),N=x.useRef(null),g=x.useRef(void 0),h=x.useContext(st),w=!!l;x.useEffect(()=>()=>{g.current!==void 0&&clearTimeout(g.current)},[]);const p=()=>{w&&!h&&c(j=>!j),(!w||h)&&(o==null||o())},m=()=>{if(!h||!w||!N.current)return;g.current!==void 0&&clearTimeout(g.current);const j=N.current.getBoundingClientRect(),T=N.current.closest(".vx-sidebar"),E=T?T.getBoundingClientRect().right:j.right;S({top:j.top-6,left:E+4}),f(!0)},v=()=>{g.current=setTimeout(()=>f(!1),100)},b=()=>{g.current!==void 0&&clearTimeout(g.current)},k=n.jsxs("button",{type:"button",className:C("vx-nav-item",a&&"vx-nav-item--active",w&&"vx-nav-item--parent"),onClick:p,"aria-expanded":w&&!h?u:void 0,title:h?e:void 0,children:[t?n.jsx("span",{className:"vx-nav-item__icon",children:t}):null,n.jsx("span",{className:"vx-nav-item__label",children:e}),r?n.jsx("span",{className:"vx-nav-item__badge",children:r}):null,w?n.jsx(be,{size:14,className:C("vx-nav-item__chevron",u&&"vx-nav-item__chevron--open")}):s?n.jsx("span",{className:"vx-nav-item__trailing",children:s}):null]});return w?n.jsxs("div",{ref:N,className:"vx-nav-item-wrap",onMouseEnter:m,onMouseLeave:h?v:void 0,children:[k,!h&&u&&n.jsx("div",{className:"vx-nav-sublist",role:"group",children:l}),h&&d&&ce.createPortal(n.jsx(st.Provider,{value:!1,children:n.jsxs("div",{className:"vx-nav-sublist-flyout",style:{top:y.top,left:y.left},role:"group",onMouseEnter:b,onMouseLeave:v,children:[n.jsx("div",{className:"vx-nav-sublist-flyout__label",children:e}),l]})}),document.body)]}):k}function gn({onClose:e,closeLabel:t="Close sidebar"}){return n.jsx("button",{type:"button",className:"vx-shell__overlay","aria-label":t,onClick:e})}function bn({children:e}){return n.jsx("div",{className:"vx-shell__main",children:e})}const yn=x.forwardRef(function({title:t,description:r,breadcrumb:s,actions:a,onMenuToggle:o,mobileNavOpen:l=!1,menuButtonLabel:i="Open navigation"},u){return n.jsxs("header",{ref:u,className:"vx-topbar",children:[o?n.jsx(oe,{variant:"ghost",size:"sm",className:"vx-topbar__menu","aria-label":i,onClick:o,children:l?n.jsx(dn,{size:16}):n.jsx(pn,{size:16})}):null,n.jsx("div",{className:"vx-topbar__title-group",children:s||n.jsxs("div",{children:[t?n.jsx("h1",{className:"vx-topbar__title",children:t}):null,r?n.jsx("p",{className:"vx-topbar__description",children:r}):null]})}),a?n.jsx("div",{className:"vx-topbar__actions",children:a}):null]})});function _n({children:e}){const t=x.useRef(null),r=x.useRef(null);return pt(t,r),n.jsxs("div",{ref:s=>{t.current=s},className:"vx-shell__content-wrap vx-scroll-host","data-scrollable":"false","data-scrollbar-state":"hidden",children:[n.jsx("main",{ref:s=>{r.current=s},className:"vx-shell__content vx-scroll-hide-native",children:e}),n.jsx("span",{className:"vx-overlay-scrollbar","aria-hidden":"true",children:n.jsx("span",{className:"vx-overlay-scrollbar__thumb"})})]})}function ws({brand:e="VXUI",brandCaption:t,brandIcon:r,topbarRef:s,breadcrumb:a,title:o,description:l,navItems:i,navSections:u,sidebarCollapsed:c=!1,sidebarWidth:d,mobileNavOpen:f=!1,onSidebarToggle:y,onMobileNavToggle:S,onSidebarClick:N,menuButtonLabel:g="Open navigation",sidebarCollapseLabel:h="Collapse",sidebarExpandLabel:w="Expand",sidebarCloseLabel:p="Close sidebar",density:m,headerActions:v,sidebarFooter:b,children:k}){const j=u??(i?[{items:i}]:[]);function T(E){const{key:R,onSelect:A,children:D,defaultOpen:O,...F}=E,H=(D==null?void 0:D.some(U=>U.active))??!1;return n.jsx(xn,{onSelect:A,defaultOpen:O??(D?H:void 0),...F,children:D==null?void 0:D.map(T)},R)}return n.jsxs(fn,{collapsed:c,mobileNavOpen:f,density:m,sidebarWidth:d,children:[n.jsx(vn,{brand:e,brandCaption:t,brandIcon:r,collapsed:c,footer:b,onToggle:y,onSidebarClick:N,collapseLabel:h,expandLabel:w,children:n.jsx(mn,{children:j.map((E,R)=>n.jsx(hn,{title:E.title,children:E.items.map(T)},E.key??E.title??R))})}),S?n.jsx(gn,{onClose:S,closeLabel:p}):null,n.jsxs(bn,{children:[n.jsx(yn,{ref:s,breadcrumb:a,title:o,description:l,actions:v,onMenuToggle:S,mobileNavOpen:f,menuButtonLabel:g}),n.jsx(_n,{children:k})]})]})}function ks({className:e,variant:t="neutral",...r}){return n.jsx("span",{className:C("vx-badge",`vx-badge--${t}`,e),...r})}function Ss({className:e,variant:t="default",padding:r,hoverable:s=!1,...a}){return n.jsx("section",{className:C("vx-card",t!=="default"&&`vx-card--${t}`,r&&`vx-card--pad-${r}`,s&&"vx-card--hoverable",e),...a})}function Ns({className:e,...t}){return n.jsx("header",{className:C("vx-card__header",e),...t})}function js({className:e,...t}){return n.jsx("h2",{className:C("vx-card__title",e),...t})}function Es({className:e,...t}){return n.jsx("p",{className:C("vx-card__description",e),...t})}function Cs({className:e,...t}){return n.jsx("div",{className:C("vx-card__content",e),...t})}function W(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Ft(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wn(...e){return t=>{let r=!1;const s=e.map(a=>{const o=Ft(a,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let a=0;a<s.length;a++){const o=s[a];typeof o=="function"?o():Ft(e[a],null)}}}}function Y(...e){return _.useCallback(wn(...e),e)}function Ts(e,t){const r=_.createContext(t),s=o=>{const{children:l,...i}=o,u=_.useMemo(()=>i,Object.values(i));return n.jsx(r.Provider,{value:u,children:l})};s.displayName=e+"Provider";function a(o){const l=_.useContext(r);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[s,a]}function ve(e,t=[]){let r=[];function s(o,l){const i=_.createContext(l),u=r.length;r=[...r,l];const c=f=>{var w;const{scope:y,children:S,...N}=f,g=((w=y==null?void 0:y[e])==null?void 0:w[u])||i,h=_.useMemo(()=>N,Object.values(N));return n.jsx(g.Provider,{value:h,children:S})};c.displayName=o+"Provider";function d(f,y){var g;const S=((g=y==null?void 0:y[e])==null?void 0:g[u])||i,N=_.useContext(S);if(N)return N;if(l!==void 0)return l;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[c,d]}const a=()=>{const o=r.map(l=>_.createContext(l));return function(i){const u=(i==null?void 0:i[e])||o;return _.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return a.scopeName=e,[s,As(a,...t)]}function As(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const s=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const l=s.reduce((i,{useScope:u,scopeName:c})=>{const f=u(o)[`__scope${c}`];return{...i,...f}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return r.scopeName=t.scopeName,r}var ie=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},Rs=_[" useId ".trim().toString()]||(()=>{}),Ps=0;function he(e){const[t,r]=_.useState(Rs());return ie(()=>{r(s=>s??String(Ps++))},[e]),e||(t?`radix-${t}`:"")}var Ds=_[" useInsertionEffect ".trim().toString()]||ie;function ye({prop:e,defaultProp:t,onChange:r=()=>{},caller:s}){const[a,o,l]=Fs({defaultProp:t,onChange:r}),i=e!==void 0,u=i?e:a;{const d=_.useRef(e!==void 0);_.useEffect(()=>{const f=d.current;f!==i&&console.warn(`${s} is changing from ${f?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=i},[i,s])}const c=_.useCallback(d=>{var f;if(i){const y=Ls(d)?d(e):d;y!==e&&((f=l.current)==null||f.call(l,y))}else o(d)},[i,e,o,l]);return[u,c]}function Fs({defaultProp:e,onChange:t}){const[r,s]=_.useState(e),a=_.useRef(r),o=_.useRef(t);return Ds(()=>{o.current=t},[t]),_.useEffect(()=>{var l;a.current!==r&&((l=o.current)==null||l.call(o,r),a.current=r)},[r,a]),[r,s,o]}function Ls(e){return typeof e=="function"}function Fe(e){const t=Is(e),r=_.forwardRef((s,a)=>{const{children:o,...l}=s,i=_.Children.toArray(o),u=i.find(Os);if(u){const c=u.props.children,d=i.map(f=>f===u?_.Children.count(c)>1?_.Children.only(null):_.isValidElement(c)?c.props.children:null:f);return n.jsx(t,{...l,ref:a,children:_.isValidElement(c)?_.cloneElement(c,void 0,d):null})}return n.jsx(t,{...l,ref:a,children:o})});return r.displayName=`${e}.Slot`,r}function Is(e){const t=_.forwardRef((r,s)=>{const{children:a,...o}=r;if(_.isValidElement(a)){const l=Bs(a),i=$s(o,a.props);return a.type!==_.Fragment&&(i.ref=s?wn(s,l):l),_.cloneElement(a,i)}return _.Children.count(a)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ms=Symbol("radix.slottable");function Os(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ms}function $s(e,t){const r={...t};for(const s in t){const a=e[s],o=t[s];/^on[A-Z]/.test(s)?a&&o?r[s]=(...i)=>{const u=o(...i);return a(...i),u}:a&&(r[s]=a):s==="style"?r[s]={...a,...o}:s==="className"&&(r[s]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}function Bs(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var zs=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],G=zs.reduce((e,t)=>{const r=Fe(`Primitive.${t}`),s=_.forwardRef((a,o)=>{const{asChild:l,...i}=a,u=l?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),n.jsx(u,{...i,ref:o})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function kn(e,t){e&&on.flushSync(()=>e.dispatchEvent(t))}function ee(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...r)=>{var s;return(s=t.current)==null?void 0:s.call(t,...r)},[])}function Hs(e,t=globalThis==null?void 0:globalThis.document){const r=ee(e);_.useEffect(()=>{const s=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[r,t])}var Us="DismissableLayer",at="dismissableLayer.update",Ws="dismissableLayer.pointerDownOutside",Gs="dismissableLayer.focusOutside",Lt,Sn=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ft=_.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:l,onDismiss:i,...u}=e,c=_.useContext(Sn),[d,f]=_.useState(null),y=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=_.useState({}),N=Y(t,j=>f(j)),g=Array.from(c.layers),[h]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(h),p=d?g.indexOf(d):-1,m=c.layersWithOutsidePointerEventsDisabled.size>0,v=p>=w,b=Ks(j=>{const T=j.target,E=[...c.branches].some(R=>R.contains(T));!v||E||(a==null||a(j),l==null||l(j),j.defaultPrevented||i==null||i())},y),k=qs(j=>{const T=j.target;[...c.branches].some(R=>R.contains(T))||(o==null||o(j),l==null||l(j),j.defaultPrevented||i==null||i())},y);return Hs(j=>{p===c.layers.size-1&&(s==null||s(j),!j.defaultPrevented&&i&&(j.preventDefault(),i()))},y),_.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Lt=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),It(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=Lt)}},[d,y,r,c]),_.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),It())},[d,c]),_.useEffect(()=>{const j=()=>S({});return document.addEventListener(at,j),()=>document.removeEventListener(at,j)},[]),n.jsx(G.div,{...u,ref:N,style:{pointerEvents:m?v?"auto":"none":void 0,...e.style},onFocusCapture:W(e.onFocusCapture,k.onFocusCapture),onBlurCapture:W(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:W(e.onPointerDownCapture,b.onPointerDownCapture)})});ft.displayName=Us;var Vs="DismissableLayerBranch",Nn=_.forwardRef((e,t)=>{const r=_.useContext(Sn),s=_.useRef(null),a=Y(t,s);return _.useEffect(()=>{const o=s.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),n.jsx(G.div,{...e,ref:a})});Nn.displayName=Vs;function Ks(e,t=globalThis==null?void 0:globalThis.document){const r=ee(e),s=_.useRef(!1),a=_.useRef(()=>{});return _.useEffect(()=>{const o=i=>{if(i.target&&!s.current){let u=function(){jn(Ws,r,c,{discrete:!0})};const c={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=u,t.addEventListener("click",a.current,{once:!0})):u()}else t.removeEventListener("click",a.current);s.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>s.current=!0}}function qs(e,t=globalThis==null?void 0:globalThis.document){const r=ee(e),s=_.useRef(!1);return _.useEffect(()=>{const a=o=>{o.target&&!s.current&&jn(Gs,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function It(){const e=new CustomEvent(at);document.dispatchEvent(e)}function jn(e,t,r,{discrete:s}){const a=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),s?kn(a,o):a.dispatchEvent(o)}var Ys=ft,Xs=Nn,Ve="focusScope.autoFocusOnMount",Ke="focusScope.autoFocusOnUnmount",Mt={bubbles:!1,cancelable:!0},Zs="FocusScope",En=_.forwardRef((e,t)=>{const{loop:r=!1,trapped:s=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...l}=e,[i,u]=_.useState(null),c=ee(a),d=ee(o),f=_.useRef(null),y=Y(t,g=>u(g)),S=_.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;_.useEffect(()=>{if(s){let g=function(m){if(S.paused||!i)return;const v=m.target;i.contains(v)?f.current=v:ne(f.current,{select:!0})},h=function(m){if(S.paused||!i)return;const v=m.relatedTarget;v!==null&&(i.contains(v)||ne(f.current,{select:!0}))},w=function(m){if(document.activeElement===document.body)for(const b of m)b.removedNodes.length>0&&ne(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",h);const p=new MutationObserver(w);return i&&p.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",h),p.disconnect()}}},[s,i,S.paused]),_.useEffect(()=>{if(i){$t.add(S);const g=document.activeElement;if(!i.contains(g)){const w=new CustomEvent(Ve,Mt);i.addEventListener(Ve,c),i.dispatchEvent(w),w.defaultPrevented||(Qs(ra(Cn(i)),{select:!0}),document.activeElement===g&&ne(i))}return()=>{i.removeEventListener(Ve,c),setTimeout(()=>{const w=new CustomEvent(Ke,Mt);i.addEventListener(Ke,d),i.dispatchEvent(w),w.defaultPrevented||ne(g??document.body,{select:!0}),i.removeEventListener(Ke,d),$t.remove(S)},0)}}},[i,c,d,S]);const N=_.useCallback(g=>{if(!r&&!s||S.paused)return;const h=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,w=document.activeElement;if(h&&w){const p=g.currentTarget,[m,v]=Js(p);m&&v?!g.shiftKey&&w===v?(g.preventDefault(),r&&ne(m,{select:!0})):g.shiftKey&&w===m&&(g.preventDefault(),r&&ne(v,{select:!0})):w===p&&g.preventDefault()}},[r,s,S.paused]);return n.jsx(G.div,{tabIndex:-1,...l,ref:y,onKeyDown:N})});En.displayName=Zs;function Qs(e,{select:t=!1}={}){const r=document.activeElement;for(const s of e)if(ne(s,{select:t}),document.activeElement!==r)return}function Js(e){const t=Cn(e),r=Ot(t,e),s=Ot(t.reverse(),e);return[r,s]}function Cn(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const a=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||a?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Ot(e,t){for(const r of e)if(!ea(r,{upTo:t}))return r}function ea(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ta(e){return e instanceof HTMLInputElement&&"select"in e}function ne(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&ta(e)&&t&&e.select()}}var $t=na();function na(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Bt(e,t),e.unshift(t)},remove(t){var r;e=Bt(e,t),(r=e[0])==null||r.resume()}}}function Bt(e,t){const r=[...e],s=r.indexOf(t);return s!==-1&&r.splice(s,1),r}function ra(e){return e.filter(t=>t.tagName!=="A")}var sa="Portal",vt=_.forwardRef((e,t)=>{var i;const{container:r,...s}=e,[a,o]=_.useState(!1);ie(()=>o(!0),[]);const l=r||a&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return l?ce.createPortal(n.jsx(G.div,{...s,ref:t}),l):null});vt.displayName=sa;function aa(e,t){return _.useReducer((r,s)=>t[r][s]??r,e)}var me=e=>{const{present:t,children:r}=e,s=oa(t),a=typeof r=="function"?r({present:s.isPresent}):_.Children.only(r),o=Y(s.ref,ia(a));return typeof r=="function"||s.isPresent?_.cloneElement(a,{ref:o}):null};me.displayName="Presence";function oa(e){const[t,r]=_.useState(),s=_.useRef(null),a=_.useRef(e),o=_.useRef("none"),l=e?"mounted":"unmounted",[i,u]=aa(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const c=Se(s.current);o.current=i==="mounted"?c:"none"},[i]),ie(()=>{const c=s.current,d=a.current;if(d!==e){const y=o.current,S=Se(c);e?u("MOUNT"):S==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&y!==S?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,u]),ie(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=S=>{const g=Se(s.current).includes(CSS.escape(S.animationName));if(S.target===t&&g&&(u("ANIMATION_END"),!a.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},y=S=>{S.target===t&&(o.current=Se(s.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:_.useCallback(c=>{s.current=c?getComputedStyle(c):null,r(c)},[])}}function Se(e){return(e==null?void 0:e.animationName)||"none"}function ia(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var qe=0;function la(){_.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??zt()),document.body.insertAdjacentElement("beforeend",e[1]??zt()),qe++,()=>{qe===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),qe--}},[])}function zt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var J=function(){return J=Object.assign||function(t){for(var r,s=1,a=arguments.length;s<a;s++){r=arguments[s];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},J.apply(this,arguments)};function Tn(e,t){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(e);a<s.length;a++)t.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(e,s[a])&&(r[s[a]]=e[s[a]]);return r}function ca(e,t,r){if(r||arguments.length===2)for(var s=0,a=t.length,o;s<a;s++)(o||!(s in t))&&(o||(o=Array.prototype.slice.call(t,0,s)),o[s]=t[s]);return e.concat(o||Array.prototype.slice.call(t))}var Pe="right-scroll-bar-position",De="width-before-scroll-bar",ua="with-scroll-bars-hidden",da="--removed-body-scroll-bar-size";function Ye(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function pa(e,t){var r=x.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(s){var a=r.value;a!==s&&(r.value=s,r.callback(s,a))}}}})[0];return r.callback=t,r.facade}var fa=typeof window<"u"?_.useLayoutEffect:_.useEffect,Ht=new WeakMap;function va(e,t){var r=pa(null,function(s){return e.forEach(function(a){return Ye(a,s)})});return fa(function(){var s=Ht.get(r);if(s){var a=new Set(s),o=new Set(e),l=r.current;a.forEach(function(i){o.has(i)||Ye(i,null)}),o.forEach(function(i){a.has(i)||Ye(i,l)})}Ht.set(r,e)},[e]),r}function ma(e){return e}function ha(e,t){t===void 0&&(t=ma);var r=[],s=!1,a={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var l=t(o,s);return r.push(l),function(){r=r.filter(function(i){return i!==l})}},assignSyncMedium:function(o){for(s=!0;r.length;){var l=r;r=[],l.forEach(o)}r={push:function(i){return o(i)},filter:function(){return r}}},assignMedium:function(o){s=!0;var l=[];if(r.length){var i=r;r=[],i.forEach(o),l=r}var u=function(){var d=l;l=[],d.forEach(o)},c=function(){return Promise.resolve().then(u)};c(),r={push:function(d){l.push(d),c()},filter:function(d){return l=l.filter(d),r}}}};return a}function xa(e){e===void 0&&(e={});var t=ha(null);return t.options=J({async:!0,ssr:!1},e),t}var An=function(e){var t=e.sideCar,r=Tn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=t.read();if(!s)throw new Error("Sidecar medium not found");return _.createElement(s,J({},r))};An.isSideCarExport=!0;function ga(e,t){return e.useMedium(t),An}var Rn=xa(),Xe=function(){},Oe=_.forwardRef(function(e,t){var r=_.useRef(null),s=_.useState({onScrollCapture:Xe,onWheelCapture:Xe,onTouchMoveCapture:Xe}),a=s[0],o=s[1],l=e.forwardProps,i=e.children,u=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,y=e.sideCar,S=e.noRelative,N=e.noIsolation,g=e.inert,h=e.allowPinchZoom,w=e.as,p=w===void 0?"div":w,m=e.gapMode,v=Tn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=y,k=va([r,t]),j=J(J({},v),a);return _.createElement(_.Fragment,null,d&&_.createElement(b,{sideCar:Rn,removeScrollBar:c,shards:f,noRelative:S,noIsolation:N,inert:g,setCallbacks:o,allowPinchZoom:!!h,lockRef:r,gapMode:m}),l?_.cloneElement(_.Children.only(i),J(J({},j),{ref:k})):_.createElement(p,J({},j,{className:u,ref:k}),i))});Oe.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Oe.classNames={fullWidth:De,zeroRight:Pe};var ba=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ya(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ba();return t&&e.setAttribute("nonce",t),e}function _a(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function wa(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ka=function(){var e=0,t=null;return{add:function(r){e==0&&(t=ya())&&(_a(t,r),wa(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Sa=function(){var e=ka();return function(t,r){_.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Pn=function(){var e=Sa(),t=function(r){var s=r.styles,a=r.dynamic;return e(s,a),null};return t},Na={left:0,top:0,right:0,gap:0},Ze=function(e){return parseInt(e||"",10)||0},ja=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],s=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Ze(r),Ze(s),Ze(a)]},Ea=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Na;var t=ja(e),r=document.documentElement.clientWidth,s=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,s-r+t[2]-t[0])}},Ca=Pn(),fe="data-scroll-locked",Ta=function(e,t,r,s){var a=e.left,o=e.top,l=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
97
|
-
.`.concat(ua,` {
|
|
98
|
-
overflow: hidden `).concat(s,`;
|
|
99
|
-
padding-right: `).concat(i,"px ").concat(s,`;
|
|
100
|
-
}
|
|
101
|
-
body[`).concat(fe,`] {
|
|
102
|
-
overflow: hidden `).concat(s,`;
|
|
103
|
-
overscroll-behavior: contain;
|
|
104
|
-
`).concat([t&&"position: relative ".concat(s,";"),r==="margin"&&`
|
|
105
|
-
padding-left: `.concat(a,`px;
|
|
106
|
-
padding-top: `).concat(o,`px;
|
|
107
|
-
padding-right: `).concat(l,`px;
|
|
108
|
-
margin-left:0;
|
|
109
|
-
margin-top:0;
|
|
110
|
-
margin-right: `).concat(i,"px ").concat(s,`;
|
|
111
|
-
`),r==="padding"&&"padding-right: ".concat(i,"px ").concat(s,";")].filter(Boolean).join(""),`
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.`).concat(Pe,` {
|
|
115
|
-
right: `).concat(i,"px ").concat(s,`;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.`).concat(De,` {
|
|
119
|
-
margin-right: `).concat(i,"px ").concat(s,`;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.`).concat(Pe," .").concat(Pe,` {
|
|
123
|
-
right: 0 `).concat(s,`;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.`).concat(De," .").concat(De,` {
|
|
127
|
-
margin-right: 0 `).concat(s,`;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
body[`).concat(fe,`] {
|
|
131
|
-
`).concat(da,": ").concat(i,`px;
|
|
132
|
-
}
|
|
133
|
-
`)},Ut=function(){var e=parseInt(document.body.getAttribute(fe)||"0",10);return isFinite(e)?e:0},Aa=function(){_.useEffect(function(){return document.body.setAttribute(fe,(Ut()+1).toString()),function(){var e=Ut()-1;e<=0?document.body.removeAttribute(fe):document.body.setAttribute(fe,e.toString())}},[])},Ra=function(e){var t=e.noRelative,r=e.noImportant,s=e.gapMode,a=s===void 0?"margin":s;Aa();var o=_.useMemo(function(){return Ea(a)},[a]);return _.createElement(Ca,{styles:Ta(o,!t,a,r?"":"!important")})},ot=!1;if(typeof window<"u")try{var Ne=Object.defineProperty({},"passive",{get:function(){return ot=!0,!0}});window.addEventListener("test",Ne,Ne),window.removeEventListener("test",Ne,Ne)}catch{ot=!1}var ue=ot?{passive:!1}:!1,Pa=function(e){return e.tagName==="TEXTAREA"},Dn=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Pa(e)&&r[t]==="visible")},Da=function(e){return Dn(e,"overflowY")},Fa=function(e){return Dn(e,"overflowX")},Wt=function(e,t){var r=t.ownerDocument,s=t;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var a=Fn(e,s);if(a){var o=Ln(e,s),l=o[1],i=o[2];if(l>i)return!0}s=s.parentNode}while(s&&s!==r.body);return!1},La=function(e){var t=e.scrollTop,r=e.scrollHeight,s=e.clientHeight;return[t,r,s]},Ia=function(e){var t=e.scrollLeft,r=e.scrollWidth,s=e.clientWidth;return[t,r,s]},Fn=function(e,t){return e==="v"?Da(t):Fa(t)},Ln=function(e,t){return e==="v"?La(t):Ia(t)},Ma=function(e,t){return e==="h"&&t==="rtl"?-1:1},Oa=function(e,t,r,s,a){var o=Ma(e,window.getComputedStyle(t).direction),l=o*s,i=r.target,u=t.contains(i),c=!1,d=l>0,f=0,y=0;do{if(!i)break;var S=Ln(e,i),N=S[0],g=S[1],h=S[2],w=g-h-o*N;(N||w)&&Fn(e,i)&&(f+=w,y+=N);var p=i.parentNode;i=p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE?p.host:p}while(!u&&i!==document.body||u&&(t.contains(i)||t===i));return(d&&Math.abs(f)<1||!d&&Math.abs(y)<1)&&(c=!0),c},je=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Gt=function(e){return[e.deltaX,e.deltaY]},Vt=function(e){return e&&"current"in e?e.current:e},$a=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ba=function(e){return`
|
|
134
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
135
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
136
|
-
`)},za=0,de=[];function Ha(e){var t=_.useRef([]),r=_.useRef([0,0]),s=_.useRef(),a=_.useState(za++)[0],o=_.useState(Pn)[0],l=_.useRef(e);_.useEffect(function(){l.current=e},[e]),_.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var g=ca([e.lockRef.current],(e.shards||[]).map(Vt),!0).filter(Boolean);return g.forEach(function(h){return h.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),g.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var i=_.useCallback(function(g,h){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!l.current.allowPinchZoom;var w=je(g),p=r.current,m="deltaX"in g?g.deltaX:p[0]-w[0],v="deltaY"in g?g.deltaY:p[1]-w[1],b,k=g.target,j=Math.abs(m)>Math.abs(v)?"h":"v";if("touches"in g&&j==="h"&&k.type==="range")return!1;var T=window.getSelection(),E=T&&T.anchorNode,R=E?E===k||E.contains(k):!1;if(R)return!1;var A=Wt(j,k);if(!A)return!0;if(A?b=j:(b=j==="v"?"h":"v",A=Wt(j,k)),!A)return!1;if(!s.current&&"changedTouches"in g&&(m||v)&&(s.current=b),!b)return!0;var D=s.current||b;return Oa(D,h,g,D==="h"?m:v)},[]),u=_.useCallback(function(g){var h=g;if(!(!de.length||de[de.length-1]!==o)){var w="deltaY"in h?Gt(h):je(h),p=t.current.filter(function(b){return b.name===h.type&&(b.target===h.target||h.target===b.shadowParent)&&$a(b.delta,w)})[0];if(p&&p.should){h.cancelable&&h.preventDefault();return}if(!p){var m=(l.current.shards||[]).map(Vt).filter(Boolean).filter(function(b){return b.contains(h.target)}),v=m.length>0?i(h,m[0]):!l.current.noIsolation;v&&h.cancelable&&h.preventDefault()}}},[]),c=_.useCallback(function(g,h,w,p){var m={name:g,delta:h,target:w,should:p,shadowParent:Ua(w)};t.current.push(m),setTimeout(function(){t.current=t.current.filter(function(v){return v!==m})},1)},[]),d=_.useCallback(function(g){r.current=je(g),s.current=void 0},[]),f=_.useCallback(function(g){c(g.type,Gt(g),g.target,i(g,e.lockRef.current))},[]),y=_.useCallback(function(g){c(g.type,je(g),g.target,i(g,e.lockRef.current))},[]);_.useEffect(function(){return de.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:y}),document.addEventListener("wheel",u,ue),document.addEventListener("touchmove",u,ue),document.addEventListener("touchstart",d,ue),function(){de=de.filter(function(g){return g!==o}),document.removeEventListener("wheel",u,ue),document.removeEventListener("touchmove",u,ue),document.removeEventListener("touchstart",d,ue)}},[]);var S=e.removeScrollBar,N=e.inert;return _.createElement(_.Fragment,null,N?_.createElement(o,{styles:Ba(a)}):null,S?_.createElement(Ra,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ua(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Wa=ga(Rn,Ha);var In=_.forwardRef(function(e,t){return _.createElement(Oe,J({},e,{ref:t,sideCar:Wa}))});In.classNames=Oe.classNames;var Ga=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},pe=new WeakMap,Ee=new WeakMap,Ce={},Qe=0,Mn=function(e){return e&&(e.host||Mn(e.parentNode))},Va=function(e,t){return t.map(function(r){if(e.contains(r))return r;var s=Mn(r);return s&&e.contains(s)?s:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Ka=function(e,t,r,s){var a=Va(t,Array.isArray(e)?e:[e]);Ce[r]||(Ce[r]=new WeakMap);var o=Ce[r],l=[],i=new Set,u=new Set(a),c=function(f){!f||i.has(f)||(i.add(f),c(f.parentNode))};a.forEach(c);var d=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(y){if(i.has(y))d(y);else try{var S=y.getAttribute(s),N=S!==null&&S!=="false",g=(pe.get(y)||0)+1,h=(o.get(y)||0)+1;pe.set(y,g),o.set(y,h),l.push(y),g===1&&N&&Ee.set(y,!0),h===1&&y.setAttribute(r,"true"),N||y.setAttribute(s,"true")}catch(w){console.error("aria-hidden: cannot operate on ",y,w)}})};return d(t),i.clear(),Qe++,function(){l.forEach(function(f){var y=pe.get(f)-1,S=o.get(f)-1;pe.set(f,y),o.set(f,S),y||(Ee.has(f)||f.removeAttribute(s),Ee.delete(f)),S||f.removeAttribute(r)}),Qe--,Qe||(pe=new WeakMap,pe=new WeakMap,Ee=new WeakMap,Ce={})}},qa=function(e,t,r){r===void 0&&(r="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),a=Ga(e);return a?(s.push.apply(s,Array.from(a.querySelectorAll("[aria-live], script"))),Ka(s,a,r,"aria-hidden")):function(){return null}},$e="Dialog",[On]=ve($e),[Ya,Q]=On($e),$n=e=>{const{__scopeDialog:t,children:r,open:s,defaultOpen:a,onOpenChange:o,modal:l=!0}=e,i=_.useRef(null),u=_.useRef(null),[c,d]=ye({prop:s,defaultProp:a??!1,onChange:o,caller:$e});return n.jsx(Ya,{scope:t,triggerRef:i,contentRef:u,contentId:he(),titleId:he(),descriptionId:he(),open:c,onOpenChange:d,onOpenToggle:_.useCallback(()=>d(f=>!f),[d]),modal:l,children:r})};$n.displayName=$e;var Bn="DialogTrigger",zn=_.forwardRef((e,t)=>{const{__scopeDialog:r,...s}=e,a=Q(Bn,r),o=Y(t,a.triggerRef);return n.jsx(G.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":xt(a.open),...s,ref:o,onClick:W(e.onClick,a.onOpenToggle)})});zn.displayName=Bn;var mt="DialogPortal",[Xa,Hn]=On(mt,{forceMount:void 0}),Un=e=>{const{__scopeDialog:t,forceMount:r,children:s,container:a}=e,o=Q(mt,t);return n.jsx(Xa,{scope:t,forceMount:r,children:_.Children.map(s,l=>n.jsx(me,{present:r||o.open,children:n.jsx(vt,{asChild:!0,container:a,children:l})}))})};Un.displayName=mt;var Le="DialogOverlay",Wn=_.forwardRef((e,t)=>{const r=Hn(Le,e.__scopeDialog),{forceMount:s=r.forceMount,...a}=e,o=Q(Le,e.__scopeDialog);return o.modal?n.jsx(me,{present:s||o.open,children:n.jsx(Qa,{...a,ref:t})}):null});Wn.displayName=Le;var Za=Fe("DialogOverlay.RemoveScroll"),Qa=_.forwardRef((e,t)=>{const{__scopeDialog:r,...s}=e,a=Q(Le,r);return n.jsx(In,{as:Za,allowPinchZoom:!0,shards:[a.contentRef],children:n.jsx(G.div,{"data-state":xt(a.open),...s,ref:t,style:{pointerEvents:"auto",...s.style}})})}),le="DialogContent",Gn=_.forwardRef((e,t)=>{const r=Hn(le,e.__scopeDialog),{forceMount:s=r.forceMount,...a}=e,o=Q(le,e.__scopeDialog);return n.jsx(me,{present:s||o.open,children:o.modal?n.jsx(Ja,{...a,ref:t}):n.jsx(eo,{...a,ref:t})})});Gn.displayName=le;var Ja=_.forwardRef((e,t)=>{const r=Q(le,e.__scopeDialog),s=_.useRef(null),a=Y(t,r.contentRef,s);return _.useEffect(()=>{const o=s.current;if(o)return qa(o)},[]),n.jsx(Vn,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:W(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),(l=r.triggerRef.current)==null||l.focus()}),onPointerDownOutside:W(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,i=l.button===0&&l.ctrlKey===!0;(l.button===2||i)&&o.preventDefault()}),onFocusOutside:W(e.onFocusOutside,o=>o.preventDefault())})}),eo=_.forwardRef((e,t)=>{const r=Q(le,e.__scopeDialog),s=_.useRef(!1),a=_.useRef(!1);return n.jsx(Vn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,i;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(s.current||(i=r.triggerRef.current)==null||i.focus(),o.preventDefault()),s.current=!1,a.current=!1},onInteractOutside:o=>{var u,c;(u=e.onInteractOutside)==null||u.call(e,o),o.defaultPrevented||(s.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=o.target;((c=r.triggerRef.current)==null?void 0:c.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),Vn=_.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:o,...l}=e,i=Q(le,r),u=_.useRef(null),c=Y(t,u);return la(),n.jsxs(n.Fragment,{children:[n.jsx(En,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:a,onUnmountAutoFocus:o,children:n.jsx(ft,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":xt(i.open),...l,ref:c,onDismiss:()=>i.onOpenChange(!1)})}),n.jsxs(n.Fragment,{children:[n.jsx(to,{titleId:i.titleId}),n.jsx(ro,{contentRef:u,descriptionId:i.descriptionId})]})]})}),ht="DialogTitle",Kn=_.forwardRef((e,t)=>{const{__scopeDialog:r,...s}=e,a=Q(ht,r);return n.jsx(G.h2,{id:a.titleId,...s,ref:t})});Kn.displayName=ht;var qn="DialogDescription",Yn=_.forwardRef((e,t)=>{const{__scopeDialog:r,...s}=e,a=Q(qn,r);return n.jsx(G.p,{id:a.descriptionId,...s,ref:t})});Yn.displayName=qn;var Xn="DialogClose",Zn=_.forwardRef((e,t)=>{const{__scopeDialog:r,...s}=e,a=Q(Xn,r);return n.jsx(G.button,{type:"button",...s,ref:t,onClick:W(e.onClick,()=>a.onOpenChange(!1))})});Zn.displayName=Xn;function xt(e){return e?"open":"closed"}var Qn="DialogTitleWarning",[dc,Jn]=Ts(Qn,{contentName:le,titleName:ht,docsSlug:"dialog"}),to=({titleId:e})=>{const t=Jn(Qn),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
137
|
-
|
|
138
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
139
|
-
|
|
140
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return _.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},no="DialogDescriptionWarning",ro=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Jn(no).contentName}}.`;return _.useEffect(()=>{var o;const a=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},gt=$n,bt=zn,yt=Un,_t=Wn,wt=Gn,kt=Kn,St=Yn,xe=Zn;function so({children:e,scrollable:t}){const r=x.useRef(null),s=x.useRef(null);return pt(r,s,t),n.jsxs("div",{ref:r,className:"vx-dialog__body-wrap vx-scroll-host","data-scrollable":"false","data-scrollbar-state":"hidden",children:[n.jsx("div",{ref:s,className:C("vx-dialog__body",t&&"vx-scroll-hide-native"),children:e}),t?n.jsx("span",{className:"vx-overlay-scrollbar","aria-hidden":"true",children:n.jsx("span",{className:"vx-overlay-scrollbar__thumb"})}):null]})}function ao({trigger:e,title:t,description:r,children:s,footer:a,className:o,size:l="md",padding:i,placement:u="center",scrollable:c=!0,closable:d=!0,fullscreen:f=!1,...y}){const S=x.useRef(null);return n.jsxs(gt,{...y,children:[n.jsx(bt,{asChild:!0,children:e}),n.jsxs(yt,{children:[n.jsx(_t,{className:"vx-dialog__overlay"}),n.jsxs(wt,{ref:S,className:C("vx-dialog__content",f&&"vx-dialog__content--fullscreen",l!=="md"&&`vx-dialog__content--${l}`,u!=="center"&&`vx-dialog__content--${u}`,i&&`vx-dialog__content--pad-${i}`,c&&"vx-dialog__content--scrollable",o),onEscapeKeyDown:N=>{const g=S.current;if(!g)return;const h=!!g.querySelector(".vx-select__dropdown, .vx-multiselect__dropdown, .vx-datepicker__popover, .vx-timepicker__popover, .vx-colorpicker__panel"),w=g.dataset.hasOpenPortal==="1";(h||w)&&N.preventDefault()},onPointerDownOutside:N=>{const g=S.current;(g==null?void 0:g.dataset.hasOpenPortal)==="1"&&N.preventDefault()},children:[n.jsxs("div",{className:"vx-dialog__header",children:[n.jsxs("div",{children:[n.jsx(kt,{className:"vx-dialog__title",children:t}),r?n.jsx(St,{className:"vx-dialog__description",children:r}):null]}),d?n.jsx(xe,{className:"vx-dialog__close","aria-label":"Close dialog",children:n.jsx(re,{size:16})}):null]}),n.jsx(so,{scrollable:c,children:s}),a?n.jsx("div",{className:"vx-dialog__footer",children:a}):null]})]})]})}const oo=xe;function io({className:e,label:t,hint:r,prefix:s,suffix:a,error:o,variant:l="default",size:i="md",rounded:u=!1,...c}){return n.jsxs("label",{className:"vx-field-group",children:[t?n.jsx("span",{className:"vx-field-group__label",children:t}):null,n.jsxs("span",{className:C("vx-input",l!=="default"&&`vx-input--${l}`,i!=="md"&&`vx-input--${i}`,u&&"vx-input--rounded",o&&"vx-input--invalid",e),children:[s?n.jsx("span",{className:"vx-input__ornament",children:s}):null,n.jsx("input",{className:"vx-input__field","aria-invalid":o?"true":void 0,...c}),a?n.jsx("span",{className:"vx-input__ornament",children:a}):null]}),o?n.jsx("span",{className:"vx-field-group__error",children:o}):null,!o&&r?n.jsx("span",{className:"vx-field-group__hint",children:r}):null]})}function lo(e){const t=_.useRef({value:e,previous:e});return _.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function co(e){const[t,r]=_.useState(void 0);return ie(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let l,i;if("borderBoxSize"in o){const u=o.borderBoxSize,c=Array.isArray(u)?u[0]:u;l=c.inlineSize,i=c.blockSize}else l=e.offsetWidth,i=e.offsetHeight;r({width:l,height:i})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else r(void 0)},[e]),t}var Be="Switch",[uo]=ve(Be),[po,fo]=uo(Be),er=_.forwardRef((e,t)=>{const{__scopeSwitch:r,name:s,checked:a,defaultChecked:o,required:l,disabled:i,value:u="on",onCheckedChange:c,form:d,...f}=e,[y,S]=_.useState(null),N=Y(t,m=>S(m)),g=_.useRef(!1),h=y?d||!!y.closest("form"):!0,[w,p]=ye({prop:a,defaultProp:o??!1,onChange:c,caller:Be});return n.jsxs(po,{scope:r,checked:w,disabled:i,children:[n.jsx(G.button,{type:"button",role:"switch","aria-checked":w,"aria-required":l,"data-state":sr(w),"data-disabled":i?"":void 0,disabled:i,value:u,...f,ref:N,onClick:W(e.onClick,m=>{p(v=>!v),h&&(g.current=m.isPropagationStopped(),g.current||m.stopPropagation())})}),h&&n.jsx(rr,{control:y,bubbles:!g.current,name:s,value:u,checked:w,required:l,disabled:i,form:d,style:{transform:"translateX(-100%)"}})]})});er.displayName=Be;var tr="SwitchThumb",nr=_.forwardRef((e,t)=>{const{__scopeSwitch:r,...s}=e,a=fo(tr,r);return n.jsx(G.span,{"data-state":sr(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:t})});nr.displayName=tr;var vo="SwitchBubbleInput",rr=_.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:s=!0,...a},o)=>{const l=_.useRef(null),i=Y(l,o),u=lo(r),c=co(t);return _.useEffect(()=>{const d=l.current;if(!d)return;const f=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(f,"checked").set;if(u!==r&&S){const N=new Event("click",{bubbles:s});S.call(d,r),d.dispatchEvent(N)}},[u,r,s]),n.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:i,style:{...a.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});rr.displayName=vo;function sr(e){return e?"checked":"unchecked"}var mo=er,ho=nr;function xo({className:e,label:t,description:r,...s}){return n.jsxs("label",{className:"vx-switch",children:[n.jsxs("span",{className:"vx-switch__copy",children:[n.jsx("span",{className:"vx-switch__label",children:t}),r?n.jsx("span",{className:"vx-switch__description",children:r}):null]}),n.jsx(mo,{className:C("vx-switch__control",e),...s,children:n.jsx(ho,{className:"vx-switch__thumb"})})]})}function ar(e){const t=e+"CollectionProvider",[r,s]=ve(t),[a,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),l=g=>{const{scope:h,children:w}=g,p=x.useRef(null),m=x.useRef(new Map).current;return n.jsx(a,{scope:h,itemMap:m,collectionRef:p,children:w})};l.displayName=t;const i=e+"CollectionSlot",u=Fe(i),c=x.forwardRef((g,h)=>{const{scope:w,children:p}=g,m=o(i,w),v=Y(h,m.collectionRef);return n.jsx(u,{ref:v,children:p})});c.displayName=i;const d=e+"CollectionItemSlot",f="data-radix-collection-item",y=Fe(d),S=x.forwardRef((g,h)=>{const{scope:w,children:p,...m}=g,v=x.useRef(null),b=Y(h,v),k=o(d,w);return x.useEffect(()=>(k.itemMap.set(v,{ref:v,...m}),()=>void k.itemMap.delete(v))),n.jsx(y,{[f]:"",ref:b,children:p})});S.displayName=d;function N(g){const h=o(e+"CollectionConsumer",g);return x.useCallback(()=>{const p=h.collectionRef.current;if(!p)return[];const m=Array.from(p.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((k,j)=>m.indexOf(k.ref.current)-m.indexOf(j.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:l,Slot:c,ItemSlot:S},N,s]}var go=_.createContext(void 0);function or(e){const t=_.useContext(go);return e||t||"ltr"}var Je="rovingFocusGroup.onEntryFocus",bo={bubbles:!1,cancelable:!0},_e="RovingFocusGroup",[it,ir,yo]=ar(_e),[_o,lr]=ve(_e,[yo]),[wo,ko]=_o(_e),cr=_.forwardRef((e,t)=>n.jsx(it.Provider,{scope:e.__scopeRovingFocusGroup,children:n.jsx(it.Slot,{scope:e.__scopeRovingFocusGroup,children:n.jsx(So,{...e,ref:t})})}));cr.displayName=_e;var So=_.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:s,loop:a=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...f}=e,y=_.useRef(null),S=Y(t,y),N=or(o),[g,h]=ye({prop:l,defaultProp:i??null,onChange:u,caller:_e}),[w,p]=_.useState(!1),m=ee(c),v=ir(r),b=_.useRef(!1),[k,j]=_.useState(0);return _.useEffect(()=>{const T=y.current;if(T)return T.addEventListener(Je,m),()=>T.removeEventListener(Je,m)},[m]),n.jsx(wo,{scope:r,orientation:s,dir:N,loop:a,currentTabStopId:g,onItemFocus:_.useCallback(T=>h(T),[h]),onItemShiftTab:_.useCallback(()=>p(!0),[]),onFocusableItemAdd:_.useCallback(()=>j(T=>T+1),[]),onFocusableItemRemove:_.useCallback(()=>j(T=>T-1),[]),children:n.jsx(G.div,{tabIndex:w||k===0?-1:0,"data-orientation":s,...f,ref:S,style:{outline:"none",...e.style},onMouseDown:W(e.onMouseDown,()=>{b.current=!0}),onFocus:W(e.onFocus,T=>{const E=!b.current;if(T.target===T.currentTarget&&E&&!w){const R=new CustomEvent(Je,bo);if(T.currentTarget.dispatchEvent(R),!R.defaultPrevented){const A=v().filter(U=>U.focusable),D=A.find(U=>U.active),O=A.find(U=>U.id===g),H=[D,O,...A].filter(Boolean).map(U=>U.ref.current);pr(H,d)}}b.current=!1}),onBlur:W(e.onBlur,()=>p(!1))})})}),ur="RovingFocusGroupItem",dr=_.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:s=!0,active:a=!1,tabStopId:o,children:l,...i}=e,u=he(),c=o||u,d=ko(ur,r),f=d.currentTabStopId===c,y=ir(r),{onFocusableItemAdd:S,onFocusableItemRemove:N,currentTabStopId:g}=d;return _.useEffect(()=>{if(s)return S(),()=>N()},[s,S,N]),n.jsx(it.ItemSlot,{scope:r,id:c,focusable:s,active:a,children:n.jsx(G.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...i,ref:t,onMouseDown:W(e.onMouseDown,h=>{s?d.onItemFocus(c):h.preventDefault()}),onFocus:W(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:W(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){d.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const w=Eo(h,d.orientation,d.dir);if(w!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let m=y().filter(v=>v.focusable).map(v=>v.ref.current);if(w==="last")m.reverse();else if(w==="prev"||w==="next"){w==="prev"&&m.reverse();const v=m.indexOf(h.currentTarget);m=d.loop?Co(m,v+1):m.slice(v+1)}setTimeout(()=>pr(m))}}),children:typeof l=="function"?l({isCurrentTabStop:f,hasTabStop:g!=null}):l})})});dr.displayName=ur;var No={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function jo(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Eo(e,t,r){const s=jo(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return No[s]}function pr(e,t=!1){const r=document.activeElement;for(const s of e)if(s===r||(s.focus({preventScroll:t}),document.activeElement!==r))return}function Co(e,t){return e.map((r,s)=>e[(t+s)%e.length])}var To=cr,Ao=dr,ze="Tabs",[Ro]=ve(ze,[lr]),fr=lr(),[Po,Nt]=Ro(ze),vr=_.forwardRef((e,t)=>{const{__scopeTabs:r,value:s,onValueChange:a,defaultValue:o,orientation:l="horizontal",dir:i,activationMode:u="automatic",...c}=e,d=or(i),[f,y]=ye({prop:s,onChange:a,defaultProp:o??"",caller:ze});return n.jsx(Po,{scope:r,baseId:he(),value:f,onValueChange:y,orientation:l,dir:d,activationMode:u,children:n.jsx(G.div,{dir:d,"data-orientation":l,...c,ref:t})})});vr.displayName=ze;var mr="TabsList",hr=_.forwardRef((e,t)=>{const{__scopeTabs:r,loop:s=!0,...a}=e,o=Nt(mr,r),l=fr(r);return n.jsx(To,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:s,children:n.jsx(G.div,{role:"tablist","aria-orientation":o.orientation,...a,ref:t})})});hr.displayName=mr;var xr="TabsTrigger",gr=_.forwardRef((e,t)=>{const{__scopeTabs:r,value:s,disabled:a=!1,...o}=e,l=Nt(xr,r),i=fr(r),u=_r(l.baseId,s),c=wr(l.baseId,s),d=s===l.value;return n.jsx(Ao,{asChild:!0,...i,focusable:!a,active:d,children:n.jsx(G.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:u,...o,ref:t,onMouseDown:W(e.onMouseDown,f=>{!a&&f.button===0&&f.ctrlKey===!1?l.onValueChange(s):f.preventDefault()}),onKeyDown:W(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&l.onValueChange(s)}),onFocus:W(e.onFocus,()=>{const f=l.activationMode!=="manual";!d&&!a&&f&&l.onValueChange(s)})})})});gr.displayName=xr;var br="TabsContent",yr=_.forwardRef((e,t)=>{const{__scopeTabs:r,value:s,forceMount:a,children:o,...l}=e,i=Nt(br,r),u=_r(i.baseId,s),c=wr(i.baseId,s),d=s===i.value,f=_.useRef(d);return _.useEffect(()=>{const y=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(y)},[]),n.jsx(me,{present:a||d,children:({present:y})=>n.jsx(G.div,{"data-state":d?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":u,hidden:!y,id:c,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:y&&o})})});yr.displayName=br;function _r(e,t){return`${e}-trigger-${t}`}function wr(e,t){return`${e}-content-${t}`}var Do=vr,Fo=hr,Lo=gr,Io=yr;const Mo=Do,Oo=x.forwardRef(function({className:t,...r},s){return n.jsx(Fo,{ref:s,className:C("vx-tabs__list",t),...r})}),$o=x.forwardRef(function({className:t,...r},s){return n.jsx(Lo,{ref:s,className:C("vx-tabs__trigger",t),...r})}),Bo=x.forwardRef(function({className:t,...r},s){return n.jsx(Io,{ref:s,className:C("vx-tabs__content",t),...r})}),kr={light:{label:"Light",mode:"light"},dark:{label:"Dark",mode:"dark"}};function X(e,t={}){return{label:t.label,mode:e,tokens:t.tokens}}const zo={...kr,sunset:X("light",{label:"Sunset",tokens:{"--vx-primary":"#c2410c","--vx-primary-strong":"#9a3412","--vx-primary-soft":"rgba(194, 65, 12, 0.12)","--vx-secondary":"#9a3412","--vx-bg":"#fff7ed","--vx-bg-accent":"#ffedd5","--vx-surface-hover":"#fffaf5","--vx-border":"#fed7aa","--vx-border-strong":"#fdba74","--vx-text":"#431407","--vx-text-secondary":"#9a3412","--vx-text-muted":"#b45309","--vx-shadow-sm":"0 1px 2px rgba(124, 45, 18, 0.08)","--vx-shadow":"0 14px 32px rgba(124, 45, 18, 0.08)","--vx-shadow-lg":"0 28px 64px rgba(124, 45, 18, 0.12)"}}),mint:X("light",{label:"Mint",tokens:{"--vx-primary":"#0f766e","--vx-primary-strong":"#115e59","--vx-primary-soft":"rgba(15, 118, 110, 0.12)","--vx-secondary":"#0f766e","--vx-bg":"#f0fdfa","--vx-bg-accent":"#ccfbf1","--vx-surface-hover":"#f6fffd","--vx-border":"#99f6e4","--vx-border-strong":"#5eead4","--vx-text":"#042f2e","--vx-text-secondary":"#115e59","--vx-text-muted":"#0f766e","--vx-shadow-sm":"0 1px 2px rgba(4, 47, 46, 0.08)","--vx-shadow":"0 14px 32px rgba(4, 47, 46, 0.08)","--vx-shadow-lg":"0 28px 64px rgba(4, 47, 46, 0.12)"}}),graphite:X("dark",{label:"Graphite",tokens:{"--vx-primary":"#f59e0b","--vx-primary-strong":"#d97706","--vx-primary-soft":"rgba(245, 158, 11, 0.16)","--vx-bg":"#111111","--vx-bg-accent":"#191919","--vx-surface":"#18181b","--vx-surface-strong":"#111111","--vx-surface-hover":"#222225","--vx-border":"rgba(244, 244, 245, 0.10)","--vx-border-strong":"rgba(244, 244, 245, 0.18)","--vx-text":"#fafafa","--vx-text-secondary":"#d4d4d8","--vx-text-muted":"#a1a1aa","--vx-shadow-sm":"0 1px 2px rgba(0, 0, 0, 0.34)","--vx-shadow":"0 20px 44px rgba(0, 0, 0, 0.28)","--vx-shadow-lg":"0 30px 72px rgba(0, 0, 0, 0.38)"}}),"ivory-gold":X("light",{label:"Ivory Gold",tokens:{"--vx-primary":"#a0742a","--vx-primary-strong":"#7d5a1e","--vx-primary-soft":"rgba(160, 116, 42, 0.12)","--vx-bg":"#faf6ee","--vx-bg-accent":"#f2ead8","--vx-surface":"#ffffff","--vx-surface-strong":"#faf6ee","--vx-surface-hover":"#f6f0e4","--vx-border":"rgba(160, 116, 42, 0.18)","--vx-border-strong":"rgba(160, 116, 42, 0.38)","--vx-text":"#1c1409","--vx-text-secondary":"#5a4320","--vx-text-muted":"#9a7c4a","--vx-shadow-sm":"0 1px 2px rgba(90, 67, 32, 0.08)","--vx-shadow":"0 12px 32px rgba(90, 67, 32, 0.10)","--vx-shadow-lg":"0 28px 64px rgba(90, 67, 32, 0.14)","--vx-success":"#1a9e6e","--vx-warning":"#c4820a","--vx-danger":"#d63b3b"}}),"black-gold":X("dark",{label:"Black Gold",tokens:{"--vx-primary":"#c8a97c","--vx-primary-strong":"#9a7545","--vx-primary-soft":"rgba(200, 169, 124, 0.16)","--vx-bg":"#05070b","--vx-bg-accent":"#0a0d14","--vx-surface":"rgba(15, 18, 25, 0.76)","--vx-surface-strong":"rgba(18, 21, 29, 0.9)","--vx-surface-hover":"rgba(245, 233, 215, 0.1)","--vx-border":"rgba(245, 233, 215, 0.12)","--vx-border-strong":"rgba(200, 169, 124, 0.42)","--vx-text":"#f5e9d7","--vx-text-secondary":"#d7c8b2","--vx-text-muted":"#928a81","--vx-shadow-sm":"0 1px 2px rgba(0, 0, 0, 0.4)","--vx-shadow":"0 0 42px rgba(200, 169, 124, 0.16)","--vx-shadow-lg":"0 34px 120px rgba(0, 0, 0, 0.62)","--vx-success":"#32d49a","--vx-warning":"#e6ad64","--vx-danger":"#ef6a64"}}),ocean:X("dark",{label:"Ocean",tokens:{"--vx-primary":"#38bdf8","--vx-primary-strong":"#0ea5e9","--vx-primary-soft":"rgba(56, 189, 248, 0.16)","--vx-bg":"#06131f","--vx-bg-accent":"#0b1a2b","--vx-surface":"#0d2236","--vx-surface-strong":"#06131f","--vx-surface-hover":"#13314d","--vx-border":"rgba(125, 211, 252, 0.16)","--vx-border-strong":"rgba(56, 189, 248, 0.24)","--vx-text":"#e0f2fe","--vx-text-secondary":"#bae6fd","--vx-text-muted":"#7dd3fc","--vx-shadow-sm":"0 1px 2px rgba(2, 6, 23, 0.34)","--vx-shadow":"0 20px 44px rgba(2, 6, 23, 0.28)","--vx-shadow-lg":"0 30px 72px rgba(2, 6, 23, 0.4)"}}),indigo:X("light",{label:"Indigo",tokens:{"--vx-primary":"#5c5fe8","--vx-primary-strong":"#4f52d4","--vx-primary-soft":"rgba(92, 95, 232, 0.10)","--vx-secondary":"#818cf8","--vx-success":"#059669","--vx-warning":"#d97706","--vx-danger":"#dc2626","--vx-info":"#5c5fe8","--vx-bg":"#e8ecf6","--vx-bg-accent":"#dde3f0","--vx-surface":"#ffffff","--vx-surface-strong":"#f8f9ff","--vx-surface-hover":"#f4f5ff","--vx-border":"#d4daf0","--vx-border-strong":"#bfc8e8","--vx-text":"#1a2336","--vx-text-secondary":"#4a5572","--vx-text-muted":"#8b96b4","--vx-shadow-sm":"0 1px 3px rgba(28, 40, 80, 0.08)","--vx-shadow":"0 8px 28px rgba(28, 40, 80, 0.10)","--vx-shadow-lg":"0 24px 60px rgba(28, 40, 80, 0.14)","--vx-glass-bg":"color-mix(in srgb, #ffffff 86%, transparent)","--vx-glass-bg-strong":"color-mix(in srgb, #f8f9ff 93%, transparent)","--vx-glass-border":"rgba(92, 95, 232, 0.18)","--vx-glass-shadow":"0 16px 44px rgba(28, 40, 80, 0.12)","--vx-glass-highlight":"inset 0 1px 0 rgba(255, 255, 255, 0.70)","--vx-radius-sm":"10px","--vx-radius":"12px","--vx-radius-lg":"16px","--vx-radius-xl":"22px"}}),violet:X("light",{label:"Violet",tokens:{"--vx-primary":"#7c3aed","--vx-primary-strong":"#6d28d9","--vx-primary-soft":"rgba(124, 58, 237, 0.10)","--vx-secondary":"#8b5cf6","--vx-success":"#059669","--vx-warning":"#d97706","--vx-danger":"#dc2626","--vx-info":"#6d28d9","--vx-bg":"#f8f7ff","--vx-bg-accent":"#ede9fe","--vx-surface":"#ffffff","--vx-surface-strong":"#faf9ff","--vx-surface-hover":"#f5f3ff","--vx-border":"#e4dfff","--vx-border-strong":"#c9bffd","--vx-text":"#1e1b2e","--vx-text-secondary":"#6e6a8a","--vx-text-muted":"#a89fc8","--vx-shadow-sm":"0 1px 3px rgba(109, 40, 217, 0.07)","--vx-shadow":"0 12px 32px rgba(109, 40, 217, 0.10)","--vx-shadow-lg":"0 28px 64px rgba(109, 40, 217, 0.14)","--vx-glass-bg":"color-mix(in srgb, #ffffff 84%, transparent)","--vx-glass-bg-strong":"color-mix(in srgb, #faf9ff 92%, transparent)","--vx-glass-border":"rgba(196, 181, 253, 0.55)","--vx-glass-shadow":"0 18px 48px rgba(109, 40, 217, 0.12)","--vx-glass-highlight":"inset 0 1px 0 rgba(255, 255, 255, 0.60)","--vx-radius-sm":"10px","--vx-radius":"12px","--vx-radius-lg":"16px","--vx-radius-xl":"24px"}}),"violet-dark":X("dark",{label:"Violet Dark",tokens:{"--vx-primary":"#a78bfa","--vx-primary-strong":"#8b5cf6","--vx-primary-soft":"rgba(167, 139, 250, 0.16)","--vx-secondary":"#c4b5fd","--vx-success":"#34d399","--vx-warning":"#fbbf24","--vx-danger":"#f87171","--vx-info":"#c4b5fd","--vx-bg":"#0d0b1a","--vx-bg-accent":"#13102a","--vx-surface":"#1a1735","--vx-surface-strong":"#0d0b1a","--vx-surface-hover":"#1e1b3a","--vx-border":"rgba(167, 139, 250, 0.16)","--vx-border-strong":"rgba(167, 139, 250, 0.30)","--vx-text":"#f0eeff","--vx-text-secondary":"#c4b5fd","--vx-text-muted":"#8b7fc8","--vx-shadow-sm":"0 1px 3px rgba(0, 0, 0, 0.40)","--vx-shadow":"0 18px 44px rgba(0, 0, 0, 0.30)","--vx-shadow-lg":"0 30px 72px rgba(0, 0, 0, 0.44)","--vx-glass-bg":"color-mix(in srgb, #1a1735 86%, transparent)","--vx-glass-bg-strong":"color-mix(in srgb, #0d0b1a 94%, transparent)","--vx-glass-border":"rgba(167, 139, 250, 0.22)","--vx-glass-shadow":"0 22px 54px rgba(0, 0, 0, 0.50)","--vx-glass-highlight":"inset 0 1px 0 rgba(255, 255, 255, 0.07)","--vx-glass-scrim":"color-mix(in srgb, #04030d 62%, transparent)","--vx-radius-sm":"10px","--vx-radius":"12px","--vx-radius-lg":"16px","--vx-radius-xl":"24px"}}),vxai:X("light",{label:"VXAI (Default)",tokens:{"--vx-primary":"#4f46e5","--vx-primary-strong":"#4338ca","--vx-primary-soft":"rgba(79, 70, 229, 0.1)","--vx-secondary":"#64748b","--vx-success":"#10b981","--vx-warning":"#f59e0b","--vx-danger":"#ef4444","--vx-info":"#4f46e5","--vx-bg":"#f8fafc","--vx-bg-accent":"#f1f5f9","--vx-surface":"#ffffff","--vx-surface-strong":"#f8fafc","--vx-surface-hover":"#f1f5f9","--vx-border":"#e2e8f0","--vx-border-strong":"#cbd5e1","--vx-text":"#0f172a","--vx-text-secondary":"#334155","--vx-text-muted":"#64748b","--vx-shadow-sm":"0 1px 2px -1px rgba(0, 0, 0, 0.1), 0 1px 3px 0 rgba(0, 0, 0, 0.1)","--vx-shadow":"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)","--vx-shadow-lg":"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)","--vx-glass-bg":"rgba(255, 255, 255, 0.8)","--vx-glass-bg-strong":"rgba(255, 255, 255, 0.95)","--vx-glass-border":"#e2e8f0","--vx-glass-shadow":"none","--vx-glass-highlight":"none","--vx-radius-sm":"4px","--vx-radius":"6px","--vx-radius-lg":"8px","--vx-radius-xl":"12px"}}),"vxai-dark":X("dark",{label:"VXAI Dark",tokens:{"--vx-primary":"#6366f1","--vx-primary-strong":"#4f46e5","--vx-primary-soft":"rgba(99, 102, 241, 0.16)","--vx-secondary":"#cbd5e1","--vx-success":"#34d399","--vx-warning":"#fbbf24","--vx-danger":"#f87171","--vx-info":"#6366f1","--vx-bg":"#020617","--vx-bg-accent":"#0f172a","--vx-surface":"#0f172a","--vx-surface-strong":"#020617","--vx-surface-hover":"#1e293b","--vx-border":"oklch(27.8% 0.033 256.848)","--vx-border-strong":"#334155","--vx-text":"oklch(96.8% 0.007 247.896)","--vx-text-secondary":"#94a3b8","--vx-text-muted":"#64748b","--vx-shadow-sm":"0 1px 2px -1px rgba(0, 0, 0, 0.4), 0 1px 3px 0 rgba(0, 0, 0, 0.4)","--vx-shadow":"0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4)","--vx-shadow-lg":"0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4)","--vx-glass-bg":"rgba(15, 23, 42, 0.7)","--vx-glass-bg-strong":"rgba(15, 23, 42, 0.95)","--vx-glass-border":"oklch(27.8% 0.033 256.848)","--vx-glass-shadow":"none","--vx-glass-highlight":"none","--vx-radius-sm":"4px","--vx-radius":"6px","--vx-radius-lg":"8px","--vx-radius-xl":"12px"}})};function Ho(e){return{...kr,...e}}function Uo(e,t){if(e&&t[e])return e;if(t.light)return"light";const[r]=Object.keys(t);return r??"light"}function Wo(e,t){const r=window.localStorage.getItem(e);return r&&t[r]?r:null}function Go(e,t,r){var a;if(((a=e[r])==null?void 0:a.mode)===t)return r;const s=Object.entries(e).find(([,o])=>o.mode===t);return s==null?void 0:s[0]}const Sr=x.createContext(null);function Vo({children:e,defaultTheme:t="light",storageKey:r="vxui-react-theme",themes:s}){const a=x.useMemo(()=>Ho(s),[s]),o=x.useMemo(()=>Uo(t,a),[t,a]),l=x.useRef([]),[i,u]=x.useState(()=>typeof window>"u"?o:Wo(r,a)??o),c=a[i]?i:o,d=a[c];x.useEffect(()=>{i!==c&&u(c)},[c,i]),x.useEffect(()=>{const y=document.documentElement;for(const N of l.current)y.style.removeProperty(N);y.dataset.theme=d.mode,y.dataset.themeName=c;const S=Object.entries(d.tokens??{}).filter(N=>typeof N[1]=="string"&&N[1].length>0);for(const[N,g]of S)y.style.setProperty(N,g);l.current=S.map(([N])=>N),window.localStorage.setItem(r,c)},[d,c,r]);const f=x.useMemo(()=>({theme:c,mode:d.mode,themes:a,setTheme:y=>{u(a[y]?y:o)},toggleTheme:()=>{u(y=>{const N=(a[y]??d).mode==="light"?"dark":"light";return Go(a,N,N)??y})}}),[d,o,a,c]);return n.jsx(Sr.Provider,{value:f,children:e})}function Ko(){const e=x.useContext(Sr);if(!e)throw new Error("useTheme must be used within ThemeProvider.");return e}var qo=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Yo="VisuallyHidden",jt=_.forwardRef((e,t)=>n.jsx(G.span,{...e,ref:t,style:{...qo,...e.style}}));jt.displayName=Yo;var Et="ToastProvider",[Ct,Xo,Zo]=ar("Toast"),[Nr]=ve("Toast",[Zo]),[Qo,He]=Nr(Et),jr=e=>{const{__scopeToast:t,label:r="Notification",duration:s=5e3,swipeDirection:a="right",swipeThreshold:o=50,children:l}=e,[i,u]=_.useState(null),[c,d]=_.useState(0),f=_.useRef(!1),y=_.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Et}\`. Expected non-empty \`string\`.`),n.jsx(Ct.Provider,{scope:t,children:n.jsx(Qo,{scope:t,label:r,duration:s,swipeDirection:a,swipeThreshold:o,toastCount:c,viewport:i,onViewportChange:u,onToastAdd:_.useCallback(()=>d(S=>S+1),[]),onToastRemove:_.useCallback(()=>d(S=>S-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:y,children:l})})};jr.displayName=Et;var Er="ToastViewport",Jo=["F8"],lt="toast.viewportPause",ct="toast.viewportResume",Cr=_.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:s=Jo,label:a="Notifications ({hotkey})",...o}=e,l=He(Er,r),i=Xo(r),u=_.useRef(null),c=_.useRef(null),d=_.useRef(null),f=_.useRef(null),y=Y(t,f,l.onViewportChange),S=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),N=l.toastCount>0;_.useEffect(()=>{const h=w=>{var m;s.length!==0&&s.every(v=>w[v]||w.code===v)&&((m=f.current)==null||m.focus())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[s]),_.useEffect(()=>{const h=u.current,w=f.current;if(N&&h&&w){const p=()=>{if(!l.isClosePausedRef.current){const k=new CustomEvent(lt);w.dispatchEvent(k),l.isClosePausedRef.current=!0}},m=()=>{if(l.isClosePausedRef.current){const k=new CustomEvent(ct);w.dispatchEvent(k),l.isClosePausedRef.current=!1}},v=k=>{!h.contains(k.relatedTarget)&&m()},b=()=>{h.contains(document.activeElement)||m()};return h.addEventListener("focusin",p),h.addEventListener("focusout",v),h.addEventListener("pointermove",p),h.addEventListener("pointerleave",b),window.addEventListener("blur",p),window.addEventListener("focus",m),()=>{h.removeEventListener("focusin",p),h.removeEventListener("focusout",v),h.removeEventListener("pointermove",p),h.removeEventListener("pointerleave",b),window.removeEventListener("blur",p),window.removeEventListener("focus",m)}}},[N,l.isClosePausedRef]);const g=_.useCallback(({tabbingDirection:h})=>{const p=i().map(m=>{const v=m.ref.current,b=[v,...fi(v)];return h==="forwards"?b:b.reverse()});return(h==="forwards"?p.reverse():p).flat()},[i]);return _.useEffect(()=>{const h=f.current;if(h){const w=p=>{var b,k,j;const m=p.altKey||p.ctrlKey||p.metaKey;if(p.key==="Tab"&&!m){const T=document.activeElement,E=p.shiftKey;if(p.target===h&&E){(b=c.current)==null||b.focus();return}const D=g({tabbingDirection:E?"backwards":"forwards"}),O=D.findIndex(F=>F===T);et(D.slice(O+1))?p.preventDefault():E?(k=c.current)==null||k.focus():(j=d.current)==null||j.focus()}};return h.addEventListener("keydown",w),()=>h.removeEventListener("keydown",w)}},[i,g]),n.jsxs(Xs,{ref:u,role:"region","aria-label":a.replace("{hotkey}",S),tabIndex:-1,style:{pointerEvents:N?void 0:"none"},children:[N&&n.jsx(ut,{ref:c,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"forwards"});et(h)}}),n.jsx(Ct.Slot,{scope:r,children:n.jsx(G.ol,{tabIndex:-1,...o,ref:y})}),N&&n.jsx(ut,{ref:d,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"backwards"});et(h)}})]})});Cr.displayName=Er;var Tr="ToastFocusProxy",ut=_.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:s,...a}=e,o=He(Tr,r);return n.jsx(jt,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:l=>{var c;const i=l.relatedTarget;!((c=o.viewport)!=null&&c.contains(i))&&s()}})});ut.displayName=Tr;var we="Toast",ei="toast.swipeStart",ti="toast.swipeMove",ni="toast.swipeCancel",ri="toast.swipeEnd",Ar=_.forwardRef((e,t)=>{const{forceMount:r,open:s,defaultOpen:a,onOpenChange:o,...l}=e,[i,u]=ye({prop:s,defaultProp:a??!0,onChange:o,caller:we});return n.jsx(me,{present:r||i,children:n.jsx(oi,{open:i,...l,ref:t,onClose:()=>u(!1),onPause:ee(e.onPause),onResume:ee(e.onResume),onSwipeStart:W(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:W(e.onSwipeMove,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:W(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:W(e.onSwipeEnd,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),u(!1)})})})});Ar.displayName=we;var[si,ai]=Nr(we,{onClose(){}}),oi=_.forwardRef((e,t)=>{const{__scopeToast:r,type:s="foreground",duration:a,open:o,onClose:l,onEscapeKeyDown:i,onPause:u,onResume:c,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:y,onSwipeEnd:S,...N}=e,g=He(we,r),[h,w]=_.useState(null),p=Y(t,F=>w(F)),m=_.useRef(null),v=_.useRef(null),b=a||g.duration,k=_.useRef(0),j=_.useRef(b),T=_.useRef(0),{onToastAdd:E,onToastRemove:R}=g,A=ee(()=>{var H;(h==null?void 0:h.contains(document.activeElement))&&((H=g.viewport)==null||H.focus()),l()}),D=_.useCallback(F=>{!F||F===1/0||(window.clearTimeout(T.current),k.current=new Date().getTime(),T.current=window.setTimeout(A,F))},[A]);_.useEffect(()=>{const F=g.viewport;if(F){const H=()=>{D(j.current),c==null||c()},U=()=>{const K=new Date().getTime()-k.current;j.current=j.current-K,window.clearTimeout(T.current),u==null||u()};return F.addEventListener(lt,U),F.addEventListener(ct,H),()=>{F.removeEventListener(lt,U),F.removeEventListener(ct,H)}}},[g.viewport,b,u,c,D]),_.useEffect(()=>{o&&!g.isClosePausedRef.current&&D(b)},[o,b,g.isClosePausedRef,D]),_.useEffect(()=>(E(),()=>R()),[E,R]);const O=_.useMemo(()=>h?Ir(h):null,[h]);return g.viewport?n.jsxs(n.Fragment,{children:[O&&n.jsx(ii,{__scopeToast:r,role:"status","aria-live":s==="foreground"?"assertive":"polite",children:O}),n.jsx(si,{scope:r,onClose:A,children:on.createPortal(n.jsx(Ct.ItemSlot,{scope:r,children:n.jsx(Ys,{asChild:!0,onEscapeKeyDown:W(i,()=>{g.isFocusedToastEscapeKeyDownRef.current||A(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:n.jsx(G.li,{tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":g.swipeDirection,...N,ref:p,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:W(e.onKeyDown,F=>{F.key==="Escape"&&(i==null||i(F.nativeEvent),F.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,A()))}),onPointerDown:W(e.onPointerDown,F=>{F.button===0&&(m.current={x:F.clientX,y:F.clientY})}),onPointerMove:W(e.onPointerMove,F=>{if(!m.current)return;const H=F.clientX-m.current.x,U=F.clientY-m.current.y,K=!!v.current,L=["left","right"].includes(g.swipeDirection),I=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,$=L?I(0,H):0,P=L?0:I(0,U),M=F.pointerType==="touch"?10:2,B={x:$,y:P},z={originalEvent:F,delta:B};K?(v.current=B,Te(ti,f,z,{discrete:!1})):Kt(B,g.swipeDirection,M)?(v.current=B,Te(ei,d,z,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs(H)>M||Math.abs(U)>M)&&(m.current=null)}),onPointerUp:W(e.onPointerUp,F=>{const H=v.current,U=F.target;if(U.hasPointerCapture(F.pointerId)&&U.releasePointerCapture(F.pointerId),v.current=null,m.current=null,H){const K=F.currentTarget,L={originalEvent:F,delta:H};Kt(H,g.swipeDirection,g.swipeThreshold)?Te(ri,S,L,{discrete:!0}):Te(ni,y,L,{discrete:!0}),K.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),ii=e=>{const{__scopeToast:t,children:r,...s}=e,a=He(we,t),[o,l]=_.useState(!1),[i,u]=_.useState(!1);return di(()=>l(!0)),_.useEffect(()=>{const c=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(c)},[]),i?null:n.jsx(vt,{asChild:!0,children:n.jsx(jt,{...s,children:o&&n.jsxs(n.Fragment,{children:[a.label," ",r]})})})},li="ToastTitle",Rr=_.forwardRef((e,t)=>{const{__scopeToast:r,...s}=e;return n.jsx(G.div,{...s,ref:t})});Rr.displayName=li;var ci="ToastDescription",Pr=_.forwardRef((e,t)=>{const{__scopeToast:r,...s}=e;return n.jsx(G.div,{...s,ref:t})});Pr.displayName=ci;var Dr="ToastAction",ui=_.forwardRef((e,t)=>{const{altText:r,...s}=e;return r.trim()?n.jsx(Lr,{altText:r,asChild:!0,children:n.jsx(Tt,{...s,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Dr}\`. Expected non-empty \`string\`.`),null)});ui.displayName=Dr;var Fr="ToastClose",Tt=_.forwardRef((e,t)=>{const{__scopeToast:r,...s}=e,a=ai(Fr,r);return n.jsx(Lr,{asChild:!0,children:n.jsx(G.button,{type:"button",...s,ref:t,onClick:W(e.onClick,a.onClose)})})});Tt.displayName=Fr;var Lr=_.forwardRef((e,t)=>{const{__scopeToast:r,altText:s,...a}=e;return n.jsx(G.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":s||void 0,...a,ref:t})});function Ir(e){const t=[];return Array.from(e.childNodes).forEach(s=>{if(s.nodeType===s.TEXT_NODE&&s.textContent&&t.push(s.textContent),pi(s)){const a=s.ariaHidden||s.hidden||s.style.display==="none",o=s.dataset.radixToastAnnounceExclude==="";if(!a)if(o){const l=s.dataset.radixToastAnnounceAlt;l&&t.push(l)}else t.push(...Ir(s))}}),t}function Te(e,t,r,{discrete:s}){const a=r.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),s?kn(a,o):a.dispatchEvent(o)}var Kt=(e,t,r=0)=>{const s=Math.abs(e.x),a=Math.abs(e.y),o=s>a;return t==="left"||t==="right"?o&&s>r:!o&&a>r};function di(e=()=>{}){const t=ee(e);ie(()=>{let r=0,s=0;return r=window.requestAnimationFrame(()=>s=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(s)}},[t])}function pi(e){return e.nodeType===e.ELEMENT_NODE}function fi(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const a=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||a?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function et(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var vi=jr,mi=Cr,hi=Ar,xi=Rr,gi=Pr,bi=Tt;const Mr=x.createContext(null);let yi=1;const _i={info:n.jsx(vs,{size:15}),success:n.jsx(os,{size:15}),warning:n.jsx(gs,{size:15}),danger:n.jsx(ss,{size:15})};function wi({children:e}){const[t,r]=x.useState([]),s=x.useMemo(()=>({push:a=>{r(o=>[...o,{id:yi+=1,tone:"info",...a}])}}),[]);return n.jsx(Mr.Provider,{value:s,children:n.jsxs(vi,{swipeDirection:"right",children:[e,t.map(a=>n.jsxs(hi,{className:C("vx-toast",`vx-toast--${a.tone??"info"}`),duration:4500,open:!0,onOpenChange:o=>{o||r(l=>l.filter(i=>i.id!==a.id))},children:[n.jsxs("div",{className:"vx-toast__content",children:[n.jsxs("div",{className:"vx-toast__header",children:[n.jsx("span",{className:"vx-toast__icon","aria-hidden":"true",children:_i[a.tone??"info"]}),n.jsx(xi,{className:"vx-toast__title",children:a.title})]}),a.description?n.jsx(gi,{className:"vx-toast__description",children:a.description}):null]}),n.jsx(bi,{className:"vx-toast__close","aria-label":"Dismiss notification",children:n.jsx(re,{size:14})})]},a.id)),n.jsx(mi,{className:"vx-toast__viewport"})]})})}function ki(){const e=x.useContext(Mr);if(!e)throw new Error("useToast must be used within ToastProvider.");return e}function Si({as:e="p",variant:t="default",size:r="base",weight:s="normal",truncate:a=!1,className:o,...l}){return n.jsx(e,{className:C("vx-text-component",`vx-text--${t}`,`vx-text-size--${r}`,`vx-text-weight--${s}`,a&&"vx-text--truncate",o),...l})}function Ni({as:e,level:t=2,variant:r="default",weight:s="bold",truncate:a=!1,className:o,...l}){const i=e||`h${t}`;return n.jsx(i,{className:C("vx-heading",`vx-heading--h${t}`,`vx-heading--${r}`,`vx-heading-weight--${s}`,a&&"vx-text--truncate",o),...l})}const ji=".vx-dialog__content",Ei="(max-width: 640px)";function se(e){const t=(e==null?void 0:e.closest(ji))??null,r=window.matchMedia(Ei).matches&&!t;return{dialogContent:t,shouldInline:r}}function Ci({options:e,value:t,defaultValue:r,onChange:s,placeholder:a="Select...",searchPlaceholder:o="Search...",label:l,hint:i,error:u,disabled:c,clearable:d=!1,emptyText:f="No results",searchable:y=!0,className:S}){const N=t!==void 0,[g,h]=x.useState(r),w=N?t:g,[p,m]=x.useState(!1),[v,b]=x.useState(""),k=x.useRef(null),j=x.useRef(null),T=x.useRef(null),E=x.useRef(null),R=x.useId(),[A,D]=x.useState(null),O=x.useRef(null),F=e.find(I=>I.value===w),H=e.filter(I=>I.label.toLowerCase().includes(v.toLowerCase())),U=typeof y=="number"?e.length>y:y;x.useEffect(()=>{if(!p){b("");return}if(U){const I=setTimeout(()=>{var $;return($=E.current)==null?void 0:$.focus()},0);return()=>clearTimeout(I)}},[p,U]),x.useEffect(()=>{if(!p)return;const I=P=>{var z,V;const M=(z=k.current)==null?void 0:z.contains(P.target),B=(V=T.current)==null?void 0:V.contains(P.target);!M&&!B&&m(!1)},$=P=>{P.key==="Escape"&&(P.preventDefault(),m(!1))};return document.addEventListener("mousedown",I),document.addEventListener("touchstart",I,{passive:!0}),document.addEventListener("keydown",$),()=>{document.removeEventListener("mousedown",I),document.removeEventListener("touchstart",I),document.removeEventListener("keydown",$)}},[p]),x.useEffect(()=>{const{shouldInline:I}=se(k.current);if(!(!p||!I))return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[p]),x.useEffect(()=>{if(!p||!A)return;const I=O.current;if(I)return I.dataset.hasOpenPortal="1",()=>{delete I.dataset.hasOpenPortal}},[p,A]),x.useLayoutEffect(()=>{const{dialogContent:I,shouldInline:$}=se(k.current);if(!p||!j.current||$){D(null),O.current=null;return}O.current=I;const P=j.current.getBoundingClientRect(),M=window.innerHeight-P.bottom,B=P.top,z=M<280&&B>M?"up":"down";D(z==="down"?{top:P.bottom+4,left:P.left,width:P.width,direction:z}:{bottom:window.innerHeight-P.top+4,left:P.left,width:P.width,direction:z})},[p]),x.useEffect(()=>{if(!p||!A)return;const I=$=>{var P;(P=T.current)!=null&&P.contains($.target)||m(!1)};return window.addEventListener("scroll",I,{capture:!0,passive:!0}),window.addEventListener("resize",I),()=>{window.removeEventListener("scroll",I,{capture:!0}),window.removeEventListener("resize",I)}},[p,A]);const K=I=>{I.disabled||(N||h(I.value),s==null||s(I.value),m(!1))},L=I=>{I.stopPropagation(),N||h(void 0),s==null||s(void 0)};return n.jsxs("div",{ref:k,className:C("vx-select",p&&"vx-select--open",S),children:[l?n.jsx("span",{className:"vx-field-group__label",children:l}):null,n.jsxs("button",{ref:j,type:"button",className:C("vx-select__trigger",u&&"vx-select__trigger--invalid",c&&"vx-select__trigger--disabled"),onClick:()=>!c&&m(I=>!I),disabled:c,"aria-haspopup":"listbox","aria-expanded":p,"aria-controls":R,children:[n.jsx("span",{className:C("vx-select__value",!F&&"vx-select__value--placeholder"),children:(F==null?void 0:F.label)??a}),n.jsxs("span",{className:"vx-select__icons",children:[d&&F&&n.jsx("span",{className:"vx-select__clear",onClick:L,role:"button","aria-label":"Clear selection",children:n.jsx(re,{size:14})}),n.jsx(ge,{size:14,className:C("vx-select__chevron",p&&"vx-select__chevron--open")})]})]}),u?n.jsx("span",{className:"vx-field-group__error",children:u}):null,!u&&i?n.jsx("span",{className:"vx-field-group__hint",children:i}):null,p&&(()=>{const I=!!A,$=A?{top:A.top,bottom:A.bottom,left:A.left,width:A.width,pointerEvents:"auto"}:void 0,P=n.jsxs("div",{ref:T,className:C("vx-select__dropdown",(A==null?void 0:A.direction)==="up"&&"vx-select__dropdown--up",!!O.current&&"vx-select__dropdown--in-dialog"),style:$,children:[U&&n.jsx("div",{className:"vx-select__search-wrap",children:n.jsx("input",{ref:E,type:"text",className:"vx-select__search",placeholder:o,value:v,onChange:M=>b(M.target.value),"aria-label":o})}),n.jsx("ul",{id:R,className:"vx-select__list",role:"listbox","aria-label":l??"Options",children:H.length===0?n.jsx("li",{className:"vx-select__empty",children:f}):H.map(M=>n.jsxs("li",{className:C("vx-select__option",M.value===w&&"vx-select__option--selected",M.disabled&&"vx-select__option--disabled"),role:"option","aria-selected":M.value===w,"aria-disabled":M.disabled,onClick:()=>K(M),children:[n.jsx("span",{children:M.label}),M.value===w?n.jsx(Me,{size:14}):null]},M.value))})]});return I?ce.createPortal(P,document.body):P})()]})}function Ti({className:e,label:t,description:r,indeterminate:s,...a}){return n.jsxs("label",{className:C("vx-checkbox",a.disabled&&"vx-checkbox--disabled"),children:[n.jsxs("span",{className:"vx-checkbox__control-wrap",children:[n.jsx("input",{type:"checkbox",className:C("vx-checkbox__input",e),ref:o=>{o&&(o.indeterminate=s??!1)},...a}),n.jsx("span",{className:"vx-checkbox__box","aria-hidden":"true",children:s?n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:n.jsx("path",{d:"M2 5h6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}):n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:n.jsx("path",{d:"M2 5l2.5 2.5L8 3",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),t?n.jsxs("span",{className:"vx-checkbox__copy",children:[n.jsx("span",{className:"vx-checkbox__label",children:t}),r?n.jsx("span",{className:"vx-checkbox__description",children:r}):null]}):null]})}function Ai({options:e,value:t,defaultValue:r,onChange:s,className:a,fullWidth:o,size:l="md"}){var h;const[i,u]=x.useState(r??((h=e[0])==null?void 0:h.value)),c=t!==void 0,d=c?t:i,[f,y]=x.useState({left:0,width:0,opacity:0}),S=x.useRef(null),N=x.useRef({});x.useEffect(()=>{requestAnimationFrame(()=>{const w=N.current[d];w&&y({left:w.offsetLeft,width:w.offsetWidth,opacity:1})})},[d,e,o,l]);const g=w=>{c||u(w),s==null||s(w)};return n.jsxs("div",{ref:S,className:C("vx-segmented-control",`vx-segmented-control--${l}`,o&&"vx-segmented-control--full",a),children:[n.jsx("div",{className:"vx-segmented-control__slider",style:{transform:`translateX(${f.left}px)`,width:`${f.width}px`,opacity:f.opacity}}),e.map(w=>{const p=d===w.value;return n.jsx("button",{ref:m=>{N.current[w.value]=m},type:"button",role:"radio","aria-checked":p,disabled:w.disabled,onClick:()=>!w.disabled&&g(w.value),className:C("vx-segmented-control__item",p&&"vx-segmented-control__item--active"),children:w.label},w.value)})]})}function Ri({className:e,label:t,description:r,...s}){return n.jsxs("label",{className:C("vx-radio",s.disabled&&"vx-radio--disabled"),children:[n.jsxs("span",{className:"vx-radio__control-wrap",children:[n.jsx("input",{type:"radio",className:C("vx-radio__input",e),...s}),n.jsx("span",{className:"vx-radio__circle","aria-hidden":"true",children:n.jsx("span",{className:"vx-radio__dot"})})]}),t?n.jsxs("span",{className:"vx-radio__copy",children:[n.jsx("span",{className:"vx-radio__label",children:t}),r?n.jsx("span",{className:"vx-radio__description",children:r}):null]}):null]})}function Pi({label:e,children:t,className:r}){return n.jsxs("fieldset",{className:C("vx-radio-group",r),children:[e?n.jsx("legend",{className:"vx-field-group__label",children:e}):null,n.jsx("div",{className:"vx-radio-group__items",children:t})]})}function Di({className:e,label:t,hint:r,resize:s="vertical",style:a,...o}){return n.jsxs("label",{className:"vx-field-group",children:[t?n.jsx("span",{className:"vx-field-group__label",children:t}):null,n.jsx("textarea",{className:C("vx-textarea",e),style:{resize:s,...a},...o}),r?n.jsx("span",{className:"vx-field-group__hint",children:r}):null]})}function Fi({className:e,label:t,showValue:r=!1,hint:s,value:a,defaultValue:o,...l}){const i=a??o??"";return n.jsxs("label",{className:"vx-field-group",children:[t||r?n.jsxs("span",{className:"vx-slider__header",children:[t?n.jsx("span",{className:"vx-field-group__label vx-slider__label",children:t}):null,r?n.jsx("span",{className:"vx-slider__value",children:i}):null]}):null,n.jsx("input",{type:"range",className:C("vx-slider",e),value:a,defaultValue:o,...l}),s?n.jsx("span",{className:"vx-field-group__hint",children:s}):null]})}const Li={sm:16,md:24,lg:36};function Ii({className:e,size:t="md",label:r="Loading…",...s}){const a=Li[t];return n.jsx("span",{role:"status","aria-label":r,className:C("vx-spinner",`vx-spinner--${t}`,e),...s,children:n.jsx("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:n.jsx("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:"42 14"})})})}function Mi({className:e,value:t=0,max:r=100,label:s,showLabel:a=!1,size:o="md",variant:l="default",indeterminate:i=!1,...u}){const c=i?void 0:Math.min(100,Math.max(0,t/r*100));return n.jsxs("div",{className:C("vx-progress-wrap",e),...u,children:[s||a?n.jsxs("div",{className:"vx-progress__header",children:[s?n.jsx("span",{className:"vx-progress__label",children:s}):null,a&&!i?n.jsxs("span",{className:"vx-progress__value",children:[Math.round(c),"%"]}):null]}):null,n.jsx("div",{role:"progressbar","aria-valuenow":i?void 0:t,"aria-valuemin":0,"aria-valuemax":r,"aria-label":s,className:C("vx-progress",`vx-progress--${o}`,`vx-progress--${l}`,i&&"vx-progress--indeterminate"),children:n.jsx("div",{className:"vx-progress__bar",style:i?void 0:{width:`${c}%`}})})]})}const Oi={info:n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[n.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),n.jsx("path",{d:"M8 7v4M8 5.5v.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),success:n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[n.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),n.jsx("path",{d:"M5 8.5l2 2 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),warning:n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[n.jsx("path",{d:"M8 2L14.5 13.5H1.5L8 2z",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"}),n.jsx("path",{d:"M8 6.5v3M8 11v.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),danger:n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[n.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),n.jsx("path",{d:"M10 6L6 10M6 6l4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})};function $i({className:e,variant:t="info",title:r,icon:s,onClose:a,children:o,...l}){return n.jsxs("div",{role:"alert",className:C("vx-alert",`vx-alert--${t}`,e),...l,children:[n.jsx("span",{className:"vx-alert__icon",children:s??Oi[t]}),n.jsxs("div",{className:"vx-alert__body",children:[r?n.jsx("p",{className:"vx-alert__title",children:r}):null,o?n.jsx("div",{className:"vx-alert__content",children:o}):null]}),a?n.jsx("button",{type:"button",className:"vx-alert__close",onClick:a,"aria-label":"关闭",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M1 1l12 12M13 1L1 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}):null]})}function Bi({className:e,width:t,height:r,variant:s="rect",lines:a=1,style:o,...l}){return s==="text"&&a>1?n.jsx("span",{className:C("vx-skeleton-text",e),...l,children:Array.from({length:a}).map((i,u)=>n.jsx("span",{className:"vx-skeleton vx-skeleton--text",style:u===a-1?{width:"70%"}:void 0},u))}):n.jsx("span",{className:C("vx-skeleton",`vx-skeleton--${s}`,e),style:{width:typeof t=="number"?`${t}px`:t,height:typeof r=="number"?`${r}px`:r,...o},...l})}function zi({content:e,placement:t="top",delay:r=600,children:s,className:a}){const[o,l]=x.useState(!1),i=x.useRef(null),u=x.useCallback(()=>{i.current=setTimeout(()=>l(!0),r)},[r]),c=x.useCallback(()=>{i.current&&clearTimeout(i.current),l(!1)},[]);return x.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]),n.jsxs("span",{className:C("vx-tooltip-wrap",a),onMouseEnter:u,onMouseLeave:c,onFocus:u,onBlur:c,children:[s,o?n.jsx("span",{role:"tooltip",className:C("vx-tooltip",`vx-tooltip--${t}`),children:e}):null]})}function Hi({content:e,placement:t="bottom",trigger:r="click",children:s,className:a,open:o,onOpenChange:l}){const[i,u]=x.useState(!1),c=o!==void 0,d=c?o:i,f=x.useRef(null),y=x.useCallback(g=>{c||u(g),l==null||l(g)},[c,l]),S=x.useCallback(()=>y(!d),[d,y]);x.useEffect(()=>{if(!d)return;const g=w=>{w.key==="Escape"&&y(!1)},h=w=>{f.current&&!f.current.contains(w.target)&&y(!1)};return document.addEventListener("keydown",g),document.addEventListener("mousedown",h),()=>{document.removeEventListener("keydown",g),document.removeEventListener("mousedown",h)}},[d,y]);const N=r==="click"?{onClick:S}:{onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1)};return n.jsxs("div",{ref:f,className:C("vx-popover-wrap",a),...N,children:[s,d?n.jsx("div",{className:C("vx-popover",`vx-popover--${t}`),role:"dialog",children:e}):null]})}function Ui({trigger:e,groups:t,items:r,align:s="left",className:a,open:o,onOpenChange:l}){const[i,u]=x.useState(!1),c=o!==void 0,d=c?o:i,f=x.useRef(null),y=x.useRef(null),[S,N]=x.useState(s);x.useLayoutEffect(()=>{d&&N(s)},[d,s]),x.useLayoutEffect(()=>{if(!d||!y.current)return;const p=y.current.getBoundingClientRect(),m=8;S==="left"&&p.right>window.innerWidth-m?N("right"):S==="right"&&p.left<m&&N("left")},[d,S]);const g=x.useCallback(p=>{c||u(p),l==null||l(p)},[c,l]),h=x.useCallback(()=>g(!d),[d,g]);x.useEffect(()=>{if(!d)return;const p=v=>{v.key==="Escape"&&g(!1)},m=v=>{f.current&&!f.current.contains(v.target)&&g(!1)};return document.addEventListener("keydown",p),document.addEventListener("mousedown",m),()=>{document.removeEventListener("keydown",p),document.removeEventListener("mousedown",m)}},[d,g]);const w=t??(r?[{items:r}]:[]);return n.jsxs("div",{ref:f,className:C("vx-dropdown",d&&"vx-dropdown--open",a),children:[n.jsx("div",{className:"vx-dropdown__trigger",onClick:h,role:"button",tabIndex:0,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&h()},children:e}),d?n.jsx("div",{ref:y,className:C("vx-dropdown__menu",`vx-dropdown__menu--${S}`),role:"menu",children:w.map((p,m)=>n.jsxs("div",{className:"vx-dropdown__group",children:[p.label?n.jsx("div",{className:"vx-dropdown__group-label",children:p.label}):null,m>0&&!p.label?n.jsx("div",{className:"vx-dropdown__separator",role:"separator"}):null,p.items.map((v,b)=>n.jsxs("button",{role:"menuitem",disabled:v.disabled,className:C("vx-dropdown__item",v.danger&&"vx-dropdown__item--danger",v.disabled&&"vx-dropdown__item--disabled"),onClick:()=>{var k;v.disabled||((k=v.onClick)==null||k.call(v),g(!1))},children:[v.icon?n.jsx("span",{className:"vx-dropdown__item-icon",children:v.icon}):null,n.jsx("span",{className:"vx-dropdown__item-label",children:v.label}),v.shortcut?n.jsx("kbd",{className:"vx-dropdown__shortcut",children:v.shortcut}):null]},b))]},m))}):null]})}const Wi=()=>n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M4.5 2.5L7.5 6l-3 3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function Gi({items:e,separator:t,className:r}){return n.jsx("nav",{"aria-label":"Breadcrumb",className:C("vx-breadcrumb",r),children:n.jsx("ol",{className:"vx-breadcrumb__list",children:e.map((s,a)=>{const o=a===e.length-1;return n.jsxs("li",{className:"vx-breadcrumb__item",children:[o?n.jsx("span",{className:"vx-breadcrumb__current","aria-current":"page",children:s.label}):s.href?n.jsx("a",{href:s.href,className:"vx-breadcrumb__link",children:s.label}):n.jsx("button",{type:"button",className:"vx-breadcrumb__link",onClick:s.onClick,children:s.label}),o?null:n.jsx("span",{className:"vx-breadcrumb__sep","aria-hidden":"true",children:t??n.jsx(Wi,{})})]},a)})})})}function Ae(e,t){return Array.from({length:t-e+1},(r,s)=>e+s)}function Vi({page:e,total:t,pageSize:r=10,siblingCount:s=1,onChange:a,className:o}){const l=Math.max(1,Math.ceil(t/r)),i=(()=>{const u=s*2+5;if(l<=u)return Ae(1,l);const c=Math.max(e-s,1),d=Math.min(e+s,l),f=c>3,y=d<l-2;return!f&&y?[...Ae(1,3+s*2),"…",l]:f&&!y?[1,"…",...Ae(l-(2+s*2),l)]:[1,"…",...Ae(c,d),"…",l]})();return n.jsxs("nav",{role:"navigation","aria-label":"Pagination",className:C("vx-pagination",o),children:[n.jsx("button",{type:"button",className:"vx-pagination__btn vx-pagination__btn--prev",disabled:e<=1,onClick:()=>a(e-1),"aria-label":"上一页",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M9 11L5 7l4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),i.map((u,c)=>u==="…"?n.jsx("span",{className:"vx-pagination__ellipsis","aria-hidden":"true",children:"…"},`e-${c}`):n.jsx("button",{type:"button","aria-current":u===e?"page":void 0,className:C("vx-pagination__btn",u===e&&"vx-pagination__btn--active"),onClick:()=>a(u),children:u},u)),n.jsx("button",{type:"button",className:"vx-pagination__btn vx-pagination__btn--next",disabled:e>=l,onClick:()=>a(e+1),"aria-label":"下一页",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M5 11l4-4-4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}function Ki({items:e,multiple:t=!1,defaultOpen:r=[],className:s}){const[a,o]=x.useState(new Set(r));function l(i){o(u=>{const c=new Set(t?u:[]);return u.has(i)?c.delete(i):c.add(i),c})}return n.jsx("div",{className:C("vx-accordion",s),children:e.map(i=>{const u=a.has(i.key);return n.jsxs("div",{className:C("vx-accordion__item",u&&"vx-accordion__item--open",i.disabled&&"vx-accordion__item--disabled"),children:[n.jsxs("button",{type:"button",disabled:i.disabled,"aria-expanded":u,className:"vx-accordion__trigger",onClick:()=>!i.disabled&&l(i.key),children:[n.jsx("span",{className:"vx-accordion__title",children:i.title}),n.jsx("span",{className:"vx-accordion__chevron","aria-hidden":"true",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:n.jsx("path",{d:"M3 5l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),u?n.jsx("div",{className:"vx-accordion__content",children:i.content}):null]},i.key)})})}function qi({className:e,orientation:t="horizontal",decorative:r=!0,...s}){return n.jsx("hr",{role:r?"none":"separator","aria-orientation":r?void 0:t,className:C("vx-separator",`vx-separator--${t}`,e),...s})}function Yi(e){const t=e.trim().split(/\s+/);return t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()}const qt=[0,30,60,120,160,200,240,270,300,340];function Xi(e){let t=0;for(let r=0;r<e.length;r++)t+=e.charCodeAt(r);return qt[t%qt.length]}function Zi({src:e,name:t,size:r="md",shape:s="circle",fallback:a,className:o,alt:l,...i}){const[u,c]=x.useState(!1),d=e&&!u,f=t??l??"",y=f?Xi(f):200;return n.jsx("span",{className:C("vx-avatar",`vx-avatar--${r}`,`vx-avatar--${s}`,o),"aria-label":f||void 0,style:d?void 0:{"--vx-avatar-hue":y},children:d?n.jsx("img",{src:e,alt:l??t??"",className:"vx-avatar__img",onError:()=>c(!0),...i}):a?n.jsx("span",{className:"vx-avatar__fallback",children:a}):f?n.jsx("span",{className:"vx-avatar__initials",children:Yi(f)}):n.jsxs("svg",{className:"vx-avatar__placeholder",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[n.jsx("circle",{cx:"12",cy:"8",r:"4",stroke:"currentColor",strokeWidth:"1.5"}),n.jsx("path",{d:"M4 20c0-4 3.58-7 8-7s8 3 8 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})})}function Qi({columns:e,data:t,size:r="md",striped:s=!1,hoverable:a=!0,bordered:o=!1,compact:l=!1,stickyHeader:i=!1,borderless:u=!1,headless:c=!1,rounded:d=!0,loading:f=!1,caption:y,emptyText:S="暂无数据",sortColumn:N,sortDirection:g,onSortChange:h,className:w,...p}){const m=l?"sm":r,[v,b]=x.useState(null),[k,j]=x.useState(null),T=N!==void 0,E=T?N:v,R=T?g??null:k,A=x.useCallback(D=>{let O;E!==D?O="asc":R==="asc"?O="desc":R==="desc"?O=null:O="asc",T||(b(O===null?null:D),j(O)),h==null||h(D,O)},[E,R,T,h]);return n.jsx("div",{className:C("vx-table-wrap",u&&"vx-table-wrap--borderless",!d&&"vx-table-wrap--square",w),...p,children:n.jsxs("table",{className:C("vx-table",s&&"vx-table--striped",a&&"vx-table--hoverable",o&&"vx-table--bordered",u&&"vx-table--borderless",m!=="md"&&`vx-table--${m}`,i&&"vx-table--sticky"),children:[y?n.jsx("caption",{className:"vx-table__caption",children:y}):null,c?null:n.jsx("thead",{children:n.jsx("tr",{children:e.map(D=>n.jsx("th",{className:C("vx-table__th",D.sortable&&"vx-table__th--sortable",D.align&&`vx-table__th--${D.align}`,D.className),style:{width:D.width},onClick:D.sortable?()=>A(D.key):void 0,"aria-sort":E===D.key?R==="asc"?"ascending":R==="desc"?"descending":"none":void 0,children:n.jsxs("span",{className:"vx-table__th-inner",children:[D.header,D.sortable?n.jsx("span",{className:"vx-table__sort-icon","aria-hidden":"true",children:E===D.key&&R==="asc"?"↑":E===D.key&&R==="desc"?"↓":"↕"}):null]})},D.key))})}),n.jsx("tbody",{className:C(f&&"vx-table__body--loading"),children:t.length===0?n.jsx("tr",{children:n.jsx("td",{colSpan:e.length,className:"vx-table__empty",children:S})}):t.map((D,O)=>n.jsx("tr",{className:"vx-table__row",children:e.map(F=>n.jsx("td",{className:C("vx-table__td",F.align&&`vx-table__td--${F.align}`,F.className),children:F.accessor(D)},F.key))},O))})]})})}function Ji({topBar:e,bottomNav:t,children:r,className:s}){return n.jsxs("div",{className:C("vxm-shell",s),children:[e&&n.jsx("div",{className:"vxm-shell__topbar",children:e}),n.jsx("main",{className:"vxm-shell__main",children:r}),t&&n.jsx("div",{className:"vxm-shell__bottomnav",children:t})]})}function el({title:e,leading:t,trailing:r,className:s}){return n.jsxs("div",{className:C("vxm-topbar",s),children:[n.jsx("div",{className:"vxm-topbar__leading",children:t}),n.jsx("div",{className:"vxm-topbar__title",children:e}),n.jsx("div",{className:"vxm-topbar__trailing",children:r})]})}function tl({label:e,className:t,children:r,...s}){return n.jsx("button",{type:"button",className:C("vxm-icon-btn",t),"aria-label":e,...s,children:r})}function nl({items:e,className:t}){const[r,s]=x.useState(null),a=r?e.find(l=>l.key===r):null,o=l=>{var i,u;(i=l.submenu)!=null&&i.length?s(c=>c===l.key?null:l.key):(s(null),(u=l.onSelect)==null||u.call(l))};return n.jsxs("div",{className:"vxm-bottomnav-wrap",children:[r&&(a==null?void 0:a.submenu)&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"vxm-bottomnav__scrim",onClick:()=>s(null),"aria-hidden":"true"}),n.jsx("div",{className:"vxm-bottomnav__submenu",role:"menu",children:a.submenu.map(l=>n.jsxs("button",{type:"button",role:"menuitem",className:"vxm-bottomnav__submenu-item",onClick:()=>{var i;(i=l.onSelect)==null||i.call(l),s(null)},children:[l.icon&&n.jsx("span",{className:"vxm-bottomnav__submenu-icon",children:l.icon}),n.jsx("span",{children:l.label})]},l.key))})]}),n.jsx("nav",{className:C("vxm-bottomnav",t),"aria-label":"底部导航",children:e.map(l=>{var i,u,c;return n.jsxs("button",{type:"button",className:C("vxm-bottomnav__item",l.active&&"vxm-bottomnav__item--active",!!((i=l.submenu)!=null&&i.length&&r===l.key)&&"vxm-bottomnav__item--submenu-open"),onClick:()=>o(l),"aria-current":l.active?"page":void 0,"aria-expanded":(u=l.submenu)!=null&&u.length?r===l.key:void 0,"aria-haspopup":(c=l.submenu)!=null&&c.length?"menu":void 0,children:[n.jsxs("span",{className:"vxm-bottomnav__icon",children:[l.icon,l.badge!=null&&n.jsx("span",{className:"vxm-bottomnav__badge","aria-label":`${l.badge} 条未读`,children:l.badge})]}),n.jsx("span",{className:"vxm-bottomnav__label",children:l.label})]},l.key)})})]})}function rl({open:e,onClose:t,title:r,description:s,children:a,className:o}){const l=x.useRef(null),i=x.useRef(0),[u,c]=x.useState(!1),[d,f]=x.useState(0),y=x.useRef(0);x.useEffect(()=>{e||(f(0),y.current=0)},[e]),x.useEffect(()=>{if(!e)return;const h=w=>{w.key==="Escape"&&t()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[e,t]),x.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]);const S=h=>{i.current=h.touches[0].clientY,y.current=0,c(!0)},N=h=>{const w=h.touches[0].clientY-i.current;w<0||(y.current=w,f(w))},g=()=>{c(!1);const h=l.current;if(!h)return;const w=h.offsetHeight*.32;y.current>w?t():f(0)};return e?n.jsx("div",{className:"vxm-actionsheet__overlay",onClick:t,role:"presentation","aria-hidden":"true",children:n.jsxs("div",{ref:l,className:C("vxm-actionsheet",o),style:{transform:`translateY(${d}px)`,transition:u?"none":"transform 280ms cubic-bezier(0.32, 0.72, 0, 1)"},onClick:h=>h.stopPropagation(),onTouchStart:S,onTouchMove:N,onTouchEnd:g,role:"dialog","aria-modal":!0,"aria-label":r??"Action sheet",children:[n.jsx("div",{className:"vxm-actionsheet__handle","aria-hidden":"true"}),(r||s)&&n.jsxs("div",{className:"vxm-actionsheet__header",children:[r&&n.jsx("h3",{className:"vxm-actionsheet__title",children:r}),s&&n.jsx("p",{className:"vxm-actionsheet__description",children:s})]}),n.jsx("div",{className:"vxm-actionsheet__body",children:a})]})}):null}function sl({icon:e,destructive:t,className:r,children:s,...a}){return n.jsxs("button",{type:"button",className:C("vxm-actionsheet-item",t&&"vxm-actionsheet-item--destructive",r),...a,children:[e&&n.jsx("span",{className:"vxm-actionsheet-item__icon",children:e}),s]})}function al({className:e,...t}){return n.jsx("ul",{className:C("vxm-list",e),role:"list",...t})}function ol({title:e,className:t,children:r,...s}){return n.jsxs("div",{className:C("vxm-list-section",t),...s,children:[e&&n.jsx("div",{className:"vxm-list-section__title",children:e}),r]})}function il({leading:e,trailing:t,label:r,description:s,chevron:a,destructive:o,disabled:l,onClick:i,className:u}){const c=n.jsxs(n.Fragment,{children:[e&&n.jsx("span",{className:"vxm-list-item__leading",children:e}),n.jsxs("span",{className:"vxm-list-item__content",children:[n.jsx("span",{className:"vxm-list-item__label",children:r}),s&&n.jsx("span",{className:"vxm-list-item__description",children:s})]}),t&&n.jsx("span",{className:"vxm-list-item__trailing",children:t}),a&&n.jsx(be,{size:16,className:"vxm-list-item__chevron","aria-hidden":"true"})]});return n.jsx("li",{className:C("vxm-list-item",o&&"vxm-list-item--destructive",l&&"vxm-list-item--disabled",!i&&"vxm-list-item--static",u),children:n.jsx("button",{type:"button",className:"vxm-list-item__btn",onClick:l?void 0:i,disabled:l,tabIndex:i?0:-1,children:c})})}function ll({open:e,onClose:t,width:r=280,header:s,footer:a,children:o,className:l}){const i=x.useRef(null),u=x.useRef(0),c=x.useRef(0),[d,f]=x.useState(!1),[y,S]=x.useState(0);x.useEffect(()=>{e||(S(0),c.current=0)},[e]),x.useEffect(()=>{if(!e)return;const m=v=>{v.key==="Escape"&&t()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[e,t]),x.useEffect(()=>(document.body.style.overflow=e?"hidden":"",()=>{document.body.style.overflow=""}),[e]);const N=m=>{u.current=m.touches[0].clientX,c.current=0,f(!0)},g=m=>{const v=m.touches[0].clientX-u.current;v>0||(c.current=v,S(v))},h=()=>{f(!1),Math.abs(c.current)>r*.3?t():S(0)};if(!e)return null;const p=.52*Math.max(0,1+y/r);return n.jsxs("div",{className:"vxm-drawer__overlay",style:{"--vxm-overlay-opacity":p},children:[n.jsx("div",{className:"vxm-drawer__scrim",onClick:t,"aria-hidden":"true"}),n.jsxs("div",{ref:i,className:C("vxm-drawer",l),style:{width:r,transform:`translateX(${y}px)`,transition:d?"none":"transform 280ms cubic-bezier(0.32, 0.72, 0, 1)"},onTouchStart:N,onTouchMove:g,onTouchEnd:h,role:"dialog","aria-modal":!0,"aria-label":"Navigation drawer",children:[s&&n.jsx("div",{className:"vxm-drawer__header",children:s}),n.jsx("div",{className:"vxm-drawer__body",children:o}),a&&n.jsx("div",{className:"vxm-drawer__footer",children:a})]})]})}function cl({icon:e,label:t,badge:r,active:s,onClick:a}){return n.jsxs("button",{type:"button",className:C("vxm-drawer-item",s&&"vxm-drawer-item--active"),onClick:a,"aria-current":s?"page":void 0,children:[e&&n.jsx("span",{className:"vxm-drawer-item__icon",children:e}),n.jsx("span",{className:"vxm-drawer-item__label",children:t}),r!=null&&n.jsx("span",{className:"vxm-drawer-item__badge",children:r})]})}function ul({title:e,collapsible:t=!1,defaultOpen:r=!0,children:s}){const[a,o]=x.useState(r);return n.jsxs("div",{className:C("vxm-drawer-section",t&&"vxm-drawer-section--collapsible"),children:[e&&(t?n.jsxs("button",{type:"button",className:"vxm-drawer-section__header",onClick:()=>o(l=>!l),"aria-expanded":a,children:[n.jsx("span",{className:"vxm-drawer-section__title",children:e}),n.jsx(ge,{size:14,className:C("vxm-drawer-section__chevron",a&&"vxm-drawer-section__chevron--open")})]}):n.jsx("div",{className:"vxm-drawer-section__title",children:e})),n.jsx("div",{className:C("vxm-drawer-section__items-wrap",!a&&"vxm-drawer-section__items-wrap--closed"),children:n.jsx("div",{className:"vxm-drawer-section__items",children:s})})]})}const dl=x.forwardRef(function({className:t,required:r,children:s,...a},o){return n.jsxs("label",{ref:o,className:C("vx-label",t),...a,children:[s,r?n.jsx("span",{className:"vx-label__required","aria-hidden":"true",children:" *"}):null]})}),Or=x.createContext({});function $r(){return x.useContext(Or)}function pl({className:e,...t}){return n.jsx("form",{noValidate:!0,className:C("vx-form",e),...t})}function fl({error:e,children:t,className:r}){return n.jsx(Or.Provider,{value:{error:e},children:n.jsx("div",{className:C("vx-form-field",e&&"vx-form-field--invalid",r),children:t})})}function vl({className:e,required:t,children:r,...s}){return n.jsxs("label",{className:C("vx-form-label",e),...s,children:[r,t?n.jsx("span",{className:"vx-form-label__required","aria-hidden":"true",children:" *"}):null]})}function ml({className:e,children:t,...r}){return n.jsx("p",{className:C("vx-form-description",e),...r,children:t})}function hl({className:e,children:t,...r}){const{error:s}=$r(),a=s??t;return a?n.jsx("p",{className:C("vx-form-message",s&&"vx-form-message--error",e),...r,children:a}):null}function xl({trigger:e,title:t,description:r,confirmLabel:s="Confirm",cancelLabel:a="Cancel",onConfirm:o,onCancel:l,variant:i="default",className:u,...c}){return n.jsxs(gt,{...c,children:[n.jsx(bt,{asChild:!0,children:e}),n.jsxs(yt,{children:[n.jsx(_t,{className:"vx-dialog__overlay"}),n.jsxs(wt,{className:C("vx-alert-dialog__content",u),role:"alertdialog","aria-modal":"true",children:[n.jsx(kt,{className:"vx-alert-dialog__title",children:t}),r?n.jsx(St,{className:"vx-alert-dialog__description",children:r}):null,n.jsxs("div",{className:"vx-alert-dialog__footer",children:[n.jsx(xe,{asChild:!0,children:n.jsx(oe,{variant:"secondary",onClick:l,children:a})}),n.jsx(xe,{asChild:!0,children:n.jsx(oe,{variant:i==="danger"?"danger":"solid",onClick:o,children:s})})]})]})]})]})}function gl({className:e,label:t,hint:r,error:s,value:a,onChange:o,min:l,max:i,step:u=1,disabled:c,...d}){const f=x.useCallback(w=>{let p=w;return l!==void 0&&(p=Math.max(l,p)),i!==void 0&&(p=Math.min(i,p)),p},[l,i]),y=()=>{c||o==null||o(f((a??0)+u))},S=()=>{c||o==null||o(f((a??0)-u))},N=w=>{const p=parseFloat(w.target.value);isNaN(p)||o==null||o(f(p))},g=l!==void 0&&(a??0)<=l,h=i!==void 0&&(a??0)>=i;return n.jsxs("label",{className:"vx-field-group",children:[t?n.jsx("span",{className:"vx-field-group__label",children:t}):null,n.jsxs("span",{className:C("vx-number-input",s&&"vx-number-input--invalid",c&&"vx-number-input--disabled",e),children:[n.jsx("button",{type:"button",className:"vx-number-input__btn",onClick:S,disabled:c||g,"aria-label":"Decrease",tabIndex:-1,children:n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M2 6h8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),n.jsx("input",{type:"number",className:"vx-number-input__field",value:a??"",onChange:N,min:l,max:i,step:u,disabled:c,"aria-invalid":s?"true":void 0,...d}),n.jsx("button",{type:"button",className:"vx-number-input__btn",onClick:y,disabled:c||h,"aria-label":"Increase",tabIndex:-1,children:n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M6 2v8M2 6h8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),s?n.jsx("span",{className:"vx-field-group__error",children:s}):null,!s&&r?n.jsx("span",{className:"vx-field-group__hint",children:r}):null]})}function bl(e,t){return new Date(e,t+1,0).getDate()}function yl(e,t){return new Date(e,t,1).getDay()}function Yt(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Br({value:e,defaultValue:t,onChange:r,min:s,max:a,className:o,weekStartsOnMonday:l=!1}){const i=new Date,u=e!==void 0,[c,d]=x.useState(t),f=u?e:c,[y,S]=x.useState((f??i).getFullYear()),[N,g]=x.useState((f??i).getMonth()),h=bl(y,N),w=yl(y,N),p=l?w===0?6:w-1:w,m=l?["Mo","Tu","We","Th","Fr","Sa","Su"]:["Su","Mo","Tu","We","Th","Fr","Sa"],v=()=>{N===0?(S(R=>R-1),g(11)):g(R=>R-1)},b=()=>{N===11?(S(R=>R+1),g(0)):g(R=>R+1)},k=x.useCallback(R=>{const A=new Date(y,N,R);if(s){const D=new Date(s.getFullYear(),s.getMonth(),s.getDate());if(A<D)return!0}if(a){const D=new Date(a.getFullYear(),a.getMonth(),a.getDate());if(A>D)return!0}return!1},[y,N,s,a]),j=R=>{if(k(R))return;const A=new Date(y,N,R);u||d(A),r==null||r(A)},T=new Date(y,N).toLocaleString("default",{month:"long"}),E=[...Array(p).fill(null),...Array.from({length:h},(R,A)=>A+1)];for(;E.length%7!==0;)E.push(null);return n.jsxs("div",{className:C("vx-calendar",o),children:[n.jsxs("div",{className:"vx-calendar__header",children:[n.jsx("button",{type:"button",className:"vx-calendar__nav-btn",onClick:v,"aria-label":"Previous month",children:n.jsx(un,{size:16})}),n.jsxs("span",{className:"vx-calendar__month-label",children:[T," ",y]}),n.jsx("button",{type:"button",className:"vx-calendar__nav-btn",onClick:b,"aria-label":"Next month",children:n.jsx(be,{size:16})})]}),n.jsxs("div",{className:"vx-calendar__grid",role:"grid","aria-label":`${T} ${y}`,children:[m.map(R=>n.jsx("div",{className:"vx-calendar__weekday",role:"columnheader",children:R},R)),E.map((R,A)=>{if(R===null)return n.jsx("div",{className:"vx-calendar__cell vx-calendar__cell--empty"},`e-${A}`);const D=new Date(y,N,R),O=Yt(D,i),F=f?Yt(D,f):!1,H=k(R);return n.jsx("button",{type:"button",role:"gridcell",className:C("vx-calendar__cell",O&&"vx-calendar__cell--today",F&&"vx-calendar__cell--selected",H&&"vx-calendar__cell--disabled"),onClick:()=>j(R),disabled:H,"aria-label":D.toLocaleDateString(),"aria-selected":F,children:R},R)})]})]})}function _l(e){return e.toLocaleDateString()}function wl(){return n.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",children:[n.jsx("rect",{x:"1",y:"3",width:"13",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.2"}),n.jsx("path",{d:"M1 6.5h13",stroke:"currentColor",strokeWidth:"1.2"}),n.jsx("path",{d:"M5 1v3M10 1v3",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]})}function kl({value:e,defaultValue:t,onChange:r,placeholder:s="Select date",label:a,hint:o,error:l,min:i,max:u,disabled:c,weekStartsOnMonday:d,className:f}){const y=e!==void 0,[S,N]=x.useState(t),g=y?e:S,[h,w]=x.useState(!1),p=x.useRef(null),m=x.useRef(null),v=x.useRef(null),b=x.useRef(null),[k,j]=x.useState(null);x.useEffect(()=>{if(!h)return;const E=A=>{var F,H;const D=(F=p.current)==null?void 0:F.contains(A.target),O=(H=v.current)==null?void 0:H.contains(A.target);!D&&!O&&w(!1)},R=A=>{A.key==="Escape"&&(A.preventDefault(),w(!1))};return document.addEventListener("mousedown",E),document.addEventListener("touchstart",E,{passive:!0}),document.addEventListener("keydown",R),()=>{document.removeEventListener("mousedown",E),document.removeEventListener("touchstart",E),document.removeEventListener("keydown",R)}},[h]),x.useEffect(()=>{const{shouldInline:E}=se(p.current);if(!(!h||!E))return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[h]),x.useEffect(()=>{if(!h||!k)return;const E=b.current;if(E)return E.dataset.hasOpenPortal="1",()=>{delete E.dataset.hasOpenPortal}},[h,k]),x.useLayoutEffect(()=>{const{dialogContent:E,shouldInline:R}=se(p.current);if(!h||!m.current||R){j(null),b.current=null;return}b.current=E;const A=m.current.getBoundingClientRect(),D=window.innerHeight-A.bottom,O=A.top,F=D<320&&O>D?"up":"down";j(F==="down"?{top:A.bottom+6,left:A.left,direction:F}:{bottom:window.innerHeight-A.top+6,left:A.left,direction:F})},[h]),x.useEffect(()=>{if(!h||!k)return;const E=R=>{var A;(A=v.current)!=null&&A.contains(R.target)||w(!1)};return window.addEventListener("scroll",E,{capture:!0,passive:!0}),window.addEventListener("resize",E),()=>{window.removeEventListener("scroll",E,{capture:!0}),window.removeEventListener("resize",E)}},[h,k]);const T=E=>{y||N(E),r==null||r(E),w(!1)};return n.jsxs("div",{ref:p,className:C("vx-datepicker",f),children:[a?n.jsx("span",{className:"vx-field-group__label",children:a}):null,n.jsxs("button",{ref:m,type:"button",className:C("vx-datepicker__trigger",l&&"vx-datepicker__trigger--invalid",c&&"vx-datepicker__trigger--disabled"),onClick:()=>!c&&w(E=>!E),disabled:c,"aria-haspopup":"dialog","aria-expanded":h,children:[n.jsx(wl,{}),n.jsx("span",{className:C("vx-datepicker__value",!g&&"vx-datepicker__value--placeholder"),children:g?_l(g):s})]}),l?n.jsx("span",{className:"vx-field-group__error",children:l}):null,!l&&o?n.jsx("span",{className:"vx-field-group__hint",children:o}):null,h?(()=>{const E=!!k,R=k?{position:"fixed",top:k.top,bottom:k.bottom,left:k.left,pointerEvents:"auto"}:void 0,A=n.jsx("div",{ref:v,className:C("vx-datepicker__popover",(k==null?void 0:k.direction)==="up"&&"vx-datepicker__popover--up",!!b.current&&"vx-datepicker__popover--in-dialog"),role:"dialog","aria-label":"Date picker",style:R,children:n.jsx(Br,{value:g,onChange:T,min:i,max:u,weekStartsOnMonday:d})});return E?ce.createPortal(A,document.body):A})():null]})}function Sl({options:e,value:t,defaultValue:r=[],onChange:s,placeholder:a="Select...",searchPlaceholder:o="Search...",label:l,hint:i,error:u,disabled:c,clearable:d=!1,emptyText:f="No results",maxDisplay:y,className:S}){const N=t!==void 0,[g,h]=x.useState(r),w=N?t:g,[p,m]=x.useState(!1),[v,b]=x.useState(""),k=x.useRef(null),j=x.useRef(null),T=x.useRef(null),E=x.useRef(null),R=x.useId(),[A,D]=x.useState(null),O=x.useRef(null),F=e.filter(P=>P.label.toLowerCase().includes(v.toLowerCase()));x.useEffect(()=>{if(!p){b("");return}const P=setTimeout(()=>{var M;return(M=E.current)==null?void 0:M.focus()},0);return()=>clearTimeout(P)},[p]),x.useEffect(()=>{if(!p)return;const P=B=>{var Z,ae;const z=(Z=k.current)==null?void 0:Z.contains(B.target),V=(ae=T.current)==null?void 0:ae.contains(B.target);!z&&!V&&m(!1)},M=B=>{B.key==="Escape"&&(B.preventDefault(),m(!1))};return document.addEventListener("mousedown",P),document.addEventListener("touchstart",P,{passive:!0}),document.addEventListener("keydown",M),()=>{document.removeEventListener("mousedown",P),document.removeEventListener("touchstart",P),document.removeEventListener("keydown",M)}},[p]),x.useEffect(()=>{const{shouldInline:P}=se(k.current);if(!(!p||!P))return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[p]),x.useEffect(()=>{if(!p||!A)return;const P=O.current;if(P)return P.dataset.hasOpenPortal="1",()=>{delete P.dataset.hasOpenPortal}},[p,A]),x.useLayoutEffect(()=>{const{dialogContent:P,shouldInline:M}=se(k.current);if(!p||!j.current||M){D(null),O.current=null;return}O.current=P;const B=j.current.getBoundingClientRect(),z=window.innerHeight-B.bottom,V=B.top,Z=z<300&&V>z?"up":"down";D(Z==="down"?{top:B.bottom+4,left:B.left,width:B.width,direction:Z}:{bottom:window.innerHeight-B.top+4,left:B.left,width:B.width,direction:Z})},[p]),x.useEffect(()=>{if(!p||!A)return;const P=M=>{var B;(B=T.current)!=null&&B.contains(M.target)||m(!1)};return window.addEventListener("scroll",P,{capture:!0,passive:!0}),window.addEventListener("resize",P),()=>{window.removeEventListener("scroll",P,{capture:!0}),window.removeEventListener("resize",P)}},[p,A]);const H=P=>{if(P.disabled)return;const M=w.includes(P.value)?w.filter(B=>B!==P.value):[...w,P.value];N||h(M),s==null||s(M)},U=(P,M)=>{P.stopPropagation();const B=w.filter(z=>z!==M);N||h(B),s==null||s(B)},K=P=>{P.stopPropagation(),N||h([]),s==null||s([])},L=y?w.slice(0,y):w,I=y?Math.max(0,w.length-y):0,$=e.reduce((P,M)=>(P[M.value]=M.label,P),{});return n.jsxs("div",{ref:k,className:C("vx-multiselect",p&&"vx-multiselect--open",S),children:[l?n.jsx("span",{className:"vx-field-group__label",children:l}):null,n.jsxs("button",{ref:j,type:"button",className:C("vx-multiselect__trigger",u&&"vx-multiselect__trigger--invalid",c&&"vx-multiselect__trigger--disabled"),onClick:()=>!c&&m(P=>!P),disabled:c,"aria-haspopup":"listbox","aria-expanded":p,"aria-controls":R,children:[n.jsx("span",{className:"vx-multiselect__tags",children:w.length===0?n.jsx("span",{className:"vx-multiselect__placeholder",children:a}):n.jsxs(n.Fragment,{children:[L.map(P=>n.jsxs("span",{className:"vx-multiselect__tag",children:[$[P]??P,!c&&n.jsx("span",{className:"vx-multiselect__tag-remove",role:"button","aria-label":`Remove ${$[P]??P}`,onClick:M=>U(M,P),children:n.jsx(re,{size:11})})]},P)),I>0&&n.jsxs("span",{className:"vx-multiselect__overflow",children:["+",I]})]})}),n.jsxs("span",{className:"vx-multiselect__icons",children:[d&&w.length>0&&n.jsx("span",{className:"vx-multiselect__clear",role:"button","aria-label":"Clear all",onClick:K,children:n.jsx(re,{size:14})}),n.jsx(ge,{size:14,className:C("vx-multiselect__chevron",p&&"vx-multiselect__chevron--open")})]})]}),u?n.jsx("span",{className:"vx-field-group__error",children:u}):null,!u&&i?n.jsx("span",{className:"vx-field-group__hint",children:i}):null,p&&(()=>{const P=!!A,M=P&&A?{top:A.top,bottom:A.bottom,left:A.left,width:A.width,pointerEvents:"auto"}:void 0,B=n.jsxs("div",{ref:T,className:C("vx-multiselect__dropdown",(A==null?void 0:A.direction)==="up"&&"vx-multiselect__dropdown--up",!!O.current&&"vx-multiselect__dropdown--in-dialog"),style:M,children:[n.jsx("div",{className:"vx-multiselect__search-wrap",children:n.jsx("input",{ref:E,type:"text",className:"vx-multiselect__search",placeholder:o,value:v,onChange:z=>b(z.target.value),"aria-label":o})}),n.jsx("ul",{id:R,className:"vx-multiselect__list",role:"listbox","aria-multiselectable":"true","aria-label":l??"Options",children:F.length===0?n.jsx("li",{className:"vx-multiselect__empty",children:f}):F.map(z=>{const V=w.includes(z.value);return n.jsxs("li",{className:C("vx-multiselect__option",V&&"vx-multiselect__option--selected",z.disabled&&"vx-multiselect__option--disabled"),role:"option","aria-selected":V,"aria-disabled":z.disabled,onClick:()=>H(z),children:[n.jsx("span",{className:C("vx-multiselect__checkbox",V&&"vx-multiselect__checkbox--checked"),children:V?n.jsx(Me,{size:11}):null}),n.jsx("span",{children:z.label})]},z.value)})})]});return P?ce.createPortal(B,document.body):B})()]})}function te(e){return String(e).padStart(2,"0")}function Xt(e){const t=e.split(":").map(Number);return{h:t[0]??0,m:t[1]??0,s:t[2]??0}}function Zt(e,t,r,s){return s?`${te(e)}:${te(t)}:${te(r)}`:`${te(e)}:${te(t)}`}function Nl(){return n.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",children:[n.jsx("circle",{cx:"7.5",cy:"7.5",r:"6",stroke:"currentColor",strokeWidth:"1.2"}),n.jsx("path",{d:"M7.5 4v3.5l2.5 1.5",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function jl({size:e=14}){return n.jsx("svg",{width:e,height:e,viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M3 9l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function El({size:e=14}){return n.jsx("svg",{width:e,height:e,viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M3 5l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function tt({value:e,min:t,max:r,onChange:s,label:a}){const o=()=>s(e===t?r:e-1),l=()=>s(e===r?t:e+1),i=f=>{f.preventDefault(),f.deltaY>0?l():o()},u=f=>{f.key==="ArrowUp"&&(f.preventDefault(),o()),f.key==="ArrowDown"&&(f.preventDefault(),l())},c=e===t?r:e-1,d=e===r?t:e+1;return n.jsxs("div",{className:"vx-timepicker__col",role:"spinbutton","aria-label":a,"aria-valuenow":e,"aria-valuemin":t,"aria-valuemax":r,"aria-valuetext":te(e),tabIndex:0,onKeyDown:u,onWheel:i,children:[n.jsx("button",{type:"button",className:"vx-timepicker__col-btn",onClick:o,"aria-label":`Decrease ${a}`,tabIndex:-1,children:n.jsx(jl,{size:13})}),n.jsxs("div",{className:"vx-timepicker__col-items",children:[n.jsx("div",{className:"vx-timepicker__col-item vx-timepicker__col-item--adjacent",children:te(c)}),n.jsx("div",{className:"vx-timepicker__col-item vx-timepicker__col-item--selected",children:te(e)}),n.jsx("div",{className:"vx-timepicker__col-item vx-timepicker__col-item--adjacent",children:te(d)})]}),n.jsx("button",{type:"button",className:"vx-timepicker__col-btn",onClick:l,"aria-label":`Increase ${a}`,tabIndex:-1,children:n.jsx(El,{size:13})})]})}function Cl({value:e,defaultValue:t,onChange:r,placeholder:s="Select time",label:a,hint:o,error:l,disabled:i,seconds:u=!1,className:c}){const d=e!==void 0,[f,y]=x.useState(t),S=d?e:f,N=S?Xt(S):{h:12,m:0,s:0},[g,h]=x.useState(N.h),[w,p]=x.useState(N.m),[m,v]=x.useState(N.s),[b,k]=x.useState(!1),j=x.useRef(null),T=x.useRef(null),E=x.useRef(null),R=x.useRef(null),[A,D]=x.useState(null);x.useEffect(()=>{if(e){const L=Xt(e);h(L.h),p(L.m),v(L.s)}},[e]),x.useEffect(()=>{if(!b)return;const L=$=>{var B,z;const P=(B=j.current)==null?void 0:B.contains($.target),M=(z=E.current)==null?void 0:z.contains($.target);!P&&!M&&k(!1)},I=$=>{$.key==="Escape"&&($.preventDefault(),k(!1))};return document.addEventListener("mousedown",L),document.addEventListener("touchstart",L,{passive:!0}),document.addEventListener("keydown",I),()=>{document.removeEventListener("mousedown",L),document.removeEventListener("touchstart",L),document.removeEventListener("keydown",I)}},[b]),x.useEffect(()=>{const{shouldInline:L}=se(j.current);if(!(!b||!L))return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[b]),x.useEffect(()=>{if(!b||!A)return;const L=R.current;if(L)return L.dataset.hasOpenPortal="1",()=>{delete L.dataset.hasOpenPortal}},[b,A]),x.useLayoutEffect(()=>{const{dialogContent:L,shouldInline:I}=se(j.current);if(!b||!T.current||I){D(null),R.current=null;return}R.current=L;const $=T.current.getBoundingClientRect(),P=window.innerHeight-$.bottom,M=$.top,B=P<220&&M>P?"up":"down";D(B==="down"?{top:$.bottom+4,left:$.left,direction:B}:{bottom:window.innerHeight-$.top+4,left:$.left,direction:B})},[b]),x.useEffect(()=>{if(!b||!A)return;const L=I=>{var $;($=E.current)!=null&&$.contains(I.target)||k(!1)};return window.addEventListener("scroll",L,{capture:!0,passive:!0}),window.addEventListener("resize",L),()=>{window.removeEventListener("scroll",L,{capture:!0}),window.removeEventListener("resize",L)}},[b,A]);const O=x.useCallback((L,I,$)=>{const P=Zt(L,I,$,u);d||y(P),r==null||r(P)},[d,u,r]),F=L=>{h(L),O(L,w,m)},H=L=>{p(L),O(g,L,m)},U=L=>{v(L),O(g,w,L)},K=S??(b?Zt(g,w,m,u):void 0);return n.jsxs("div",{ref:j,className:C("vx-timepicker",c),children:[a?n.jsx("span",{className:"vx-field-group__label",children:a}):null,n.jsxs("button",{ref:T,type:"button",className:C("vx-timepicker__trigger",l&&"vx-timepicker__trigger--invalid",i&&"vx-timepicker__trigger--disabled"),onClick:()=>!i&&k(L=>!L),disabled:i,"aria-haspopup":"dialog","aria-expanded":b,children:[n.jsx(Nl,{}),n.jsx("span",{className:C("vx-timepicker__value",!K&&"vx-timepicker__value--placeholder"),children:K??s})]}),l?n.jsx("span",{className:"vx-field-group__error",children:l}):null,!l&&o?n.jsx("span",{className:"vx-field-group__hint",children:o}):null,b&&(()=>{const L=!!A,I=A?{position:"fixed",top:A.top,bottom:A.bottom,left:A.left,pointerEvents:"auto"}:void 0,$=n.jsxs("div",{ref:E,className:C("vx-timepicker__popover",(A==null?void 0:A.direction)==="up"&&"vx-timepicker__popover--up",!!R.current&&"vx-timepicker__popover--in-dialog"),role:"dialog","aria-label":"Time picker",style:I,children:[n.jsxs("div",{className:"vx-timepicker__columns",children:[n.jsx(tt,{value:g,min:0,max:23,onChange:F,label:"Hours"}),n.jsx("span",{className:"vx-timepicker__sep",children:":"}),n.jsx(tt,{value:w,min:0,max:59,onChange:H,label:"Minutes"}),u&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"vx-timepicker__sep",children:":"}),n.jsx(tt,{value:m,min:0,max:59,onChange:U,label:"Seconds"})]})]}),n.jsx("div",{className:"vx-timepicker__footer",children:n.jsx("button",{type:"button",className:"vx-timepicker__done",onClick:()=>{S||O(g,w,m),k(!1)},children:"Done"})})]});return L?ce.createPortal($,document.body):$})()]})}function Tl({label:e,hint:t,error:r,accept:s,multiple:a=!1,maxSize:o,disabled:l,onFiles:i,className:u}){const[c,d]=x.useState(!1),[f,y]=x.useState([]),[S,N]=x.useState(),g=x.useRef(null),h=x.useCallback(b=>{if(!b)return;const k=Array.from(b);if(o&&k.filter(R=>R.size>o).length>0){N(`File too large (max ${(o/1024/1024).toFixed(1)} MB)`);return}N(void 0);const j=k.map(E=>({file:E,id:crypto.randomUUID()})),T=a?[...f,...j]:j;y(T),i==null||i(T.map(E=>E.file))},[f,o,a,i]),w=b=>{b.preventDefault(),d(!1),l||h(b.dataTransfer.files)},p=b=>{b.preventDefault(),l||d(!0)},m=b=>{const k=f.filter(j=>j.id!==b);y(k),i==null||i(k.map(j=>j.file))},v=r??S;return n.jsxs("div",{className:C("vx-file-upload",u),children:[e?n.jsx("span",{className:"vx-field-group__label",children:e}):null,n.jsxs("div",{className:C("vx-file-upload__zone",c&&"vx-file-upload__zone--dragging",l&&"vx-file-upload__zone--disabled",v&&"vx-file-upload__zone--invalid"),onDrop:w,onDragOver:p,onDragLeave:()=>d(!1),onClick:()=>{var b;return!l&&((b=g.current)==null?void 0:b.click())},role:"button",tabIndex:l?-1:0,onKeyDown:b=>{var k;return b.key==="Enter"&&!l&&((k=g.current)==null?void 0:k.click())},"aria-label":"Upload files, click or drag and drop",children:[n.jsx(ys,{size:24,className:"vx-file-upload__icon"}),n.jsxs("p",{className:"vx-file-upload__text",children:[n.jsx("span",{className:"vx-file-upload__link",children:"Click to upload"})," or drag and drop"]}),t?n.jsx("p",{className:"vx-file-upload__hint",children:t}):null,n.jsx("input",{ref:g,type:"file",accept:s,multiple:a,disabled:l,className:"vx-file-upload__input",onChange:b=>h(b.target.files),"aria-hidden":"true",tabIndex:-1})]}),v?n.jsx("span",{className:"vx-field-group__error",children:v}):null,f.length>0&&n.jsx("ul",{className:"vx-file-upload__list",children:f.map(({id:b,file:k})=>n.jsxs("li",{className:"vx-file-upload__file",children:[n.jsx(us,{size:14,className:"vx-file-upload__file-icon"}),n.jsx("span",{className:"vx-file-upload__file-name",children:k.name}),n.jsxs("span",{className:"vx-file-upload__file-size",children:[(k.size/1024).toFixed(0)," KB"]}),n.jsx("button",{type:"button",className:"vx-file-upload__remove",onClick:()=>m(b),"aria-label":`Remove ${k.name}`,children:n.jsx(re,{size:14})})]},b))})]})}function Al({trigger:e,title:t,description:r,side:s="right",children:a,footer:o,className:l,...i}){return n.jsxs(gt,{...i,children:[e?n.jsx(bt,{asChild:!0,children:e}):null,n.jsxs(yt,{children:[n.jsx(_t,{className:"vx-sheet__overlay"}),n.jsxs(wt,{className:C("vx-sheet",`vx-sheet--${s}`,l),children:[n.jsxs("div",{className:"vx-sheet__header",children:[n.jsxs("div",{children:[t?n.jsx(kt,{className:"vx-sheet__title",children:t}):null,r?n.jsx(St,{className:"vx-sheet__description",children:r}):null]}),n.jsx(xe,{className:"vx-dialog__close","aria-label":"Close",children:n.jsx(re,{size:16})})]}),n.jsx("div",{className:"vx-sheet__body",children:a}),o?n.jsx("div",{className:"vx-sheet__footer",children:o}):null]})]})]})}function Rl({maxHeight:e,maxWidth:t,children:r,className:s,style:a,...o}){return n.jsx("div",{className:C("vx-scroll-area",s),style:{maxHeight:typeof e=="number"?`${e}px`:e,maxWidth:typeof t=="number"?`${t}px`:t,...a},...o,children:n.jsx("div",{className:"vx-scroll-area__viewport",children:r})})}function Pl({pressed:e,defaultPressed:t=!1,onPressedChange:r,size:s="md",className:a,children:o,onClick:l,...i}){const[u,c]=x.useState(t),d=e!==void 0,f=d?e:u,y=S=>{d||c(N=>!N),r==null||r(!f),l==null||l(S)};return n.jsx("button",{type:"button","aria-pressed":f,className:C("vx-toggle",`vx-toggle--${s}`,f&&"vx-toggle--on",a),onClick:y,...i,children:o})}function Dl({items:e,value:t,defaultValue:r,onValueChange:s,type:a="single",size:o="md",className:l}){const[i,u]=x.useState(r??(a==="multiple"?[]:"")),c=t!==void 0,d=c?t:i,f=S=>Array.isArray(d)?d.includes(S):d===S,y=S=>{let N;if(a==="multiple"){const g=Array.isArray(d)?d:[];N=g.includes(S)?g.filter(h=>h!==S):[...g,S]}else N=d===S?"":S;c||u(N),s==null||s(N)};return n.jsx("div",{className:C("vx-toggle-group",l),role:"group",children:e.map(S=>n.jsx("button",{type:"button","aria-pressed":f(S.value),disabled:S.disabled,className:C("vx-toggle",`vx-toggle--${o}`,f(S.value)&&"vx-toggle--on","vx-toggle-group__item"),onClick:()=>!S.disabled&&y(S.value),children:S.label},S.value))})}function Fl({groups:e,items:t,children:r,className:s}){const[a,o]=x.useState(null),l=x.useRef(null),i=e??(t?[{items:t}]:[]);x.useEffect(()=>{if(!a)return;const c=f=>{l.current&&!l.current.contains(f.target)&&o(null)},d=f=>{f.key==="Escape"&&o(null)};return document.addEventListener("mousedown",c),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("keydown",d)}},[a]);const u=x.useCallback(c=>{c.preventDefault(),o({x:c.clientX,y:c.clientY})},[]);return n.jsxs("div",{className:C("vx-context-menu-wrap",s),onContextMenu:u,children:[r,a&&n.jsx("div",{ref:l,className:"vx-dropdown__menu vx-context-menu",style:{position:"fixed",top:a.y,left:a.x},role:"menu",children:i.map((c,d)=>n.jsxs("div",{className:"vx-dropdown__group",children:[d>0&&n.jsx("div",{className:"vx-dropdown__separator"}),c.label&&n.jsx("div",{className:"vx-dropdown__group-label",children:c.label}),c.items.map((f,y)=>n.jsxs("button",{type:"button",role:"menuitem",disabled:f.disabled,className:C("vx-dropdown__item",f.danger&&"vx-dropdown__item--danger",f.disabled&&"vx-dropdown__item--disabled"),onClick:()=>{var S;(S=f.onClick)==null||S.call(f),o(null)},children:[f.icon&&n.jsx("span",{className:"vx-dropdown__item-icon",children:f.icon}),n.jsx("span",{className:"vx-dropdown__item-label",children:f.label}),f.shortcut&&n.jsx("span",{className:"vx-dropdown__shortcut",children:f.shortcut})]},y))]},d))})]})}function Ll({content:e,placement:t="bottom",delay:r=400,children:s,className:a}){const[o,l]=x.useState(!1),i=x.useRef(null),u=x.useCallback(()=>{i.current=setTimeout(()=>l(!0),r)},[r]),c=x.useCallback(()=>{i.current&&clearTimeout(i.current),l(!1)},[]);return n.jsxs("span",{className:C("vx-hovercard-wrap",a),onMouseEnter:u,onMouseLeave:c,onFocus:u,onBlur:c,children:[s,o&&n.jsx("div",{className:C("vx-hovercard",`vx-hovercard--${t}`),children:e})]})}function Il({menus:e,className:t}){const[r,s]=x.useState(null),a=x.useRef(null);return x.useEffect(()=>{if(r===null)return;const o=i=>{a.current&&!a.current.contains(i.target)&&s(null)},l=i=>{i.key==="Escape"&&s(null)};return document.addEventListener("mousedown",o),document.addEventListener("keydown",l),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("keydown",l)}},[r]),n.jsx("div",{ref:a,className:C("vx-menubar",t),role:"menubar",children:e.map((o,l)=>{const i=o.groups??(o.items?[{items:o.items}]:[]),u=r===l;return n.jsxs("div",{className:"vx-menubar__item-wrap",children:[n.jsx("button",{type:"button",role:"menuitem",className:C("vx-menubar__trigger",u&&"vx-menubar__trigger--open"),disabled:o.disabled,"aria-haspopup":"menu","aria-expanded":u,onClick:()=>s(u?null:l),onMouseEnter:()=>{r!==null&&s(l)},children:o.label}),u&&n.jsx("div",{className:"vx-dropdown__menu",role:"menu",children:i.map((c,d)=>n.jsxs("div",{className:"vx-dropdown__group",children:[d>0&&n.jsx("div",{className:"vx-dropdown__separator"}),c.label&&n.jsx("div",{className:"vx-dropdown__group-label",children:c.label}),c.items.map((f,y)=>n.jsxs("button",{type:"button",role:"menuitem",disabled:f.disabled,className:C("vx-dropdown__item",f.danger&&"vx-dropdown__item--danger",f.disabled&&"vx-dropdown__item--disabled"),onClick:()=>{var S;(S=f.onClick)==null||S.call(f),s(null)},children:[f.icon&&n.jsx("span",{className:"vx-dropdown__item-icon",children:f.icon}),n.jsx("span",{className:"vx-dropdown__item-label",children:f.label}),f.shortcut&&n.jsx("span",{className:"vx-dropdown__shortcut",children:f.shortcut})]},y))]},d))})]},l)})})}function Ml({items:e,className:t}){const[r,s]=x.useState(null),a=x.useRef(null);return x.useEffect(()=>{if(r===null)return;const o=i=>{a.current&&!a.current.contains(i.target)&&s(null)},l=i=>{i.key==="Escape"&&s(null)};return document.addEventListener("mousedown",o),document.addEventListener("keydown",l),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("keydown",l)}},[r]),n.jsx("nav",{ref:a,className:C("vx-nav-menu",t),"aria-label":"Main navigation",children:n.jsx("ul",{className:"vx-nav-menu__list",role:"list",children:e.map((o,l)=>{const i=o.items&&o.items.length>0,u=r===l;return n.jsxs("li",{className:"vx-nav-menu__item-wrap",children:[i?n.jsxs("button",{type:"button",className:C("vx-nav-menu__link",o.active&&"vx-nav-menu__link--active",u&&"vx-nav-menu__link--open"),"aria-haspopup":"true","aria-expanded":u,onClick:()=>s(u?null:l),children:[o.label,n.jsx(ge,{size:14,className:C("vx-nav-menu__chevron",u&&"vx-nav-menu__chevron--open")})]}):n.jsx("a",{href:o.href??"#",className:C("vx-nav-menu__link",o.active&&"vx-nav-menu__link--active"),onClick:o.onClick,children:o.label}),i&&u&&n.jsx("div",{className:"vx-nav-menu__dropdown",children:o.items.map((c,d)=>n.jsxs("a",{href:c.href??"#",className:"vx-nav-menu__sub-item",onClick:()=>{var f;(f=c.onClick)==null||f.call(c),s(null)},children:[c.icon&&n.jsx("span",{className:"vx-nav-menu__sub-icon",children:c.icon}),n.jsxs("span",{children:[n.jsx("span",{className:"vx-nav-menu__sub-label",children:c.label}),c.description&&n.jsx("span",{className:"vx-nav-menu__sub-desc",children:c.description})]})]},d))})]},l)})})})}function Ol({steps:e,currentStep:t=0,orientation:r="horizontal",className:s}){return n.jsx("ol",{className:C("vx-stepper",`vx-stepper--${r}`,s),"aria-label":"Steps",children:e.map((a,o)=>{const l=a.status??(o<t?"completed":o===t?"active":"pending");return n.jsxs("li",{className:C("vx-stepper__step",`vx-stepper__step--${l}`),children:[n.jsx("div",{className:"vx-stepper__indicator","aria-hidden":"true",children:l==="completed"?n.jsx(Me,{size:14}):n.jsx("span",{children:o+1})}),n.jsxs("div",{className:"vx-stepper__content",children:[n.jsx("span",{className:"vx-stepper__label",children:a.label}),a.description&&n.jsx("span",{className:"vx-stepper__description",children:a.description})]}),o<e.length-1&&n.jsx("div",{className:"vx-stepper__connector","aria-hidden":"true"})]},o)})})}function $l({items:e,className:t}){return n.jsx("ol",{className:C("vx-timeline",t),"aria-label":"Timeline",children:e.map((r,s)=>n.jsxs("li",{className:C("vx-timeline__item",r.status&&`vx-timeline__item--${r.status}`),children:[n.jsx("div",{className:"vx-timeline__dot","aria-hidden":"true",children:r.icon??null}),n.jsxs("div",{className:"vx-timeline__body",children:[n.jsxs("div",{className:"vx-timeline__header",children:[n.jsx("span",{className:"vx-timeline__title",children:r.title}),r.time&&n.jsx("span",{className:"vx-timeline__time",children:r.time})]}),r.description&&n.jsx("p",{className:"vx-timeline__description",children:r.description})]})]},s))})}function Bl({icon:e,title:t,description:r,action:s,className:a}){return n.jsxs("div",{className:C("vx-empty-state",a),role:"status","aria-live":"polite",children:[e&&n.jsx("div",{className:"vx-empty-state__icon","aria-hidden":"true",children:e}),n.jsx("p",{className:"vx-empty-state__title",children:t}),r&&n.jsx("p",{className:"vx-empty-state__description",children:r}),s&&n.jsx("div",{className:"vx-empty-state__action",children:s})]})}function zl({items:e,defaultIndex:t=0,index:r,onIndexChange:s,autoPlay:a=!1,interval:o=3e3,loop:l=!0,showDots:i=!0,showArrows:u=!0,className:c}){const d=r!==void 0,[f,y]=x.useState(t),S=d?r:f,N=e.length,g=x.useRef(null),h=x.useCallback(m=>{let v=m;l?v=(m%N+N)%N:v=Math.max(0,Math.min(m,N-1)),d||y(v),s==null||s(v)},[d,l,s,N]);x.useEffect(()=>{if(a)return g.current=setInterval(()=>h(S+1),o),()=>{g.current&&clearInterval(g.current)}},[a,S,h,o]);const w=()=>h(S-1),p=()=>h(S+1);return N===0?null:n.jsxs("div",{className:C("vx-carousel",c),role:"region","aria-roledescription":"carousel","aria-label":"Carousel",children:[n.jsx("div",{className:"vx-carousel__track-wrap",children:n.jsx("div",{className:"vx-carousel__track",style:{transform:`translateX(-${S*100}%)`},children:e.map((m,v)=>n.jsx("div",{className:"vx-carousel__slide",role:"group","aria-roledescription":"slide","aria-label":`Slide ${v+1} of ${N}`,"aria-hidden":v!==S,children:m},v))})}),u&&n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",className:"vx-carousel__arrow vx-carousel__arrow--prev",onClick:w,disabled:!l&&S===0,"aria-label":"Previous slide",children:n.jsx(un,{size:20})}),n.jsx("button",{type:"button",className:"vx-carousel__arrow vx-carousel__arrow--next",onClick:p,disabled:!l&&S===N-1,"aria-label":"Next slide",children:n.jsx(be,{size:20})})]}),i&&n.jsx("div",{className:"vx-carousel__dots",role:"tablist","aria-label":"Slides",children:e.map((m,v)=>n.jsx("button",{type:"button",role:"tab",className:C("vx-carousel__dot",v===S&&"vx-carousel__dot--active"),onClick:()=>h(v),"aria-selected":v===S,"aria-label":`Go to slide ${v+1}`},v))})]})}function Hl({filled:e,half:t}){return n.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:t?n.jsxs(n.Fragment,{children:[n.jsx("defs",{children:n.jsxs("linearGradient",{id:"vx-star-half",children:[n.jsx("stop",{offset:"50%",stopColor:"currentColor"}),n.jsx("stop",{offset:"50%",stopColor:"none",stopOpacity:"0"})]})}),n.jsx("path",{d:"M10 1.5l2.39 4.84 5.34.78-3.87 3.77.91 5.32L10 13.77l-4.77 2.44.91-5.32L2.27 7.12l5.34-.78L10 1.5z",fill:"url(#vx-star-half)",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})]}):n.jsx("path",{d:"M10 1.5l2.39 4.84 5.34.78-3.87 3.77.91 5.32L10 13.77l-4.77 2.44.91-5.32L2.27 7.12l5.34-.78L10 1.5z",fill:e?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})})}function Ul({value:e,defaultValue:t=0,onChange:r,max:s=5,allowHalf:a=!1,disabled:o,readOnly:l,label:i,className:u,size:c="md"}){const d=e!==void 0,[f,y]=x.useState(t),S=d?e:f,[N,g]=x.useState(null),h=N??S,w=(v,b)=>{if(!a)return v;const k=b.currentTarget.getBoundingClientRect();return b.clientX-k.left<k.width/2?v-.5:v},p=(v,b)=>{if(o||l)return;const k=w(v,b);d||y(k),r==null||r(k)},m=(v,b)=>{o||l||g(w(v,b))};return n.jsx("div",{className:C("vx-rating",`vx-rating--${c}`,o&&"vx-rating--disabled",u),role:"group","aria-label":i??"Rating",children:Array.from({length:s},(v,b)=>{const k=b+1,j=h>=k,T=!j&&h>=k-.5;return n.jsx("button",{type:"button",className:C("vx-rating__star",(j||T)&&"vx-rating__star--active"),onClick:E=>p(k,E),onMouseMove:E=>m(k,E),onMouseLeave:()=>g(null),disabled:o,"aria-label":`${k} star${k!==1?"s":""}`,"aria-pressed":S>=k,tabIndex:l||o?-1:0,children:n.jsx(Hl,{filled:j,half:T})},b)})})}function zr({node:e,depth:t,selected:r,expanded:s,onSelect:a,onToggle:o}){const l=e.children&&e.children.length>0,i=s.has(e.id),u=r===e.id,c=d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),e.disabled||a(e.id,e)),d.key==="ArrowRight"&&l&&!i&&(d.preventDefault(),o(e.id)),d.key==="ArrowLeft"&&i&&(d.preventDefault(),o(e.id))};return n.jsxs("li",{role:"treeitem","aria-selected":u,"aria-expanded":l?i:void 0,children:[n.jsxs("div",{className:C("vx-tree__node",u&&"vx-tree__node--selected",e.disabled&&"vx-tree__node--disabled"),style:{paddingLeft:`${8+t*20}px`},onClick:()=>{e.disabled||(a(e.id,e),l&&o(e.id))},onKeyDown:c,tabIndex:e.disabled?-1:0,role:"button","aria-label":typeof e.label=="string"?e.label:void 0,children:[n.jsx("span",{className:C("vx-tree__expand",!l&&"vx-tree__expand--hidden"),children:n.jsx(be,{size:14,className:C("vx-tree__chevron",i&&"vx-tree__chevron--open")})}),e.icon&&n.jsx("span",{className:"vx-tree__icon",children:e.icon}),n.jsx("span",{className:"vx-tree__label",children:e.label})]}),l&&i&&n.jsx("ul",{role:"group",className:"vx-tree__children",children:e.children.map(d=>n.jsx(zr,{node:d,depth:t+1,selected:r,expanded:s,onSelect:a,onToggle:o},d.id))})]})}function Wl({nodes:e,selected:t,defaultSelected:r,onSelect:s,defaultExpanded:a=[],expanded:o,onExpandedChange:l,className:i}){const u=t!==void 0,[c,d]=x.useState(r),f=u?t:c,y=o!==void 0,[S,N]=x.useState(new Set(a)),g=y?new Set(o):S,h=x.useCallback((p,m)=>{u||d(p),s==null||s(p,m)},[u,s]),w=x.useCallback(p=>{const m=new Set(g);m.has(p)?m.delete(p):m.add(p),y||N(m),l==null||l([...m])},[g,y,l]);return n.jsx("ul",{className:C("vx-tree",i),role:"tree","aria-multiselectable":"false",children:e.map(p=>n.jsx(zr,{node:p,depth:0,selected:f,expanded:g,onSelect:h,onToggle:w},p.id))})}function Gl({value:e,defaultValue:t=[],onChange:r,label:s,hint:a,error:o,placeholder:l="Add tag...",confirmKeys:i=["Enter",","],maxTags:u,validate:c,disabled:d,className:f,...y}){const S=e!==void 0,[N,g]=x.useState(t),h=S?e:N,[w,p]=x.useState(""),[m,v]=x.useState(),b=x.useRef(null),k=A=>{S||g(A),r==null||r(A)},j=A=>{const D=A.trim();if(D){if(h.includes(D)){v("Tag already exists");return}if(u&&h.length>=u){v(`Max ${u} tags`);return}if(c){const O=c(D);if(O===!1){v("Invalid tag");return}if(typeof O=="string"){v(O);return}}v(void 0),k([...h,D]),p("")}},T=A=>{k(h.filter((D,O)=>O!==A))},E=A=>{i.includes(A.key)?(A.preventDefault(),j(w)):A.key==="Backspace"&&!w&&h.length>0&&T(h.length-1)},R=o??m;return n.jsxs("div",{className:C("vx-tag-input",f),children:[s?n.jsx("span",{className:"vx-field-group__label",children:s}):null,n.jsxs("div",{className:C("vx-tag-input__wrap",R&&"vx-tag-input__wrap--invalid",d&&"vx-tag-input__wrap--disabled"),onClick:()=>{var A;return(A=b.current)==null?void 0:A.focus()},children:[h.map((A,D)=>n.jsxs("span",{className:"vx-tag-input__tag",children:[A,!d&&n.jsx("button",{type:"button",className:"vx-tag-input__remove",onClick:O=>{O.stopPropagation(),T(D)},"aria-label":`Remove tag ${A}`,children:n.jsx(re,{size:11})})]},D)),n.jsx("input",{ref:b,className:"vx-tag-input__input",value:w,placeholder:h.length===0?l:"",disabled:d,onKeyDown:E,onChange:A=>{p(A.target.value),v(void 0)},onBlur:()=>{w.trim()&&j(w)},"aria-label":s??"Tag input",...y})]}),R?n.jsx("span",{className:"vx-field-group__error",children:R}):null,!R&&a?n.jsx("span",{className:"vx-field-group__hint",children:a}):null]})}function Vl(e){const t=parseInt(e.slice(1,3),16)/255,r=parseInt(e.slice(3,5),16)/255,s=parseInt(e.slice(5,7),16)/255,a=Math.max(t,r,s),o=Math.min(t,r,s),l=(a+o)/2;let i=0,u=0;if(a!==o){const c=a-o;switch(u=c/(l>.5?2-a-o:a+o),a){case t:i=((r-s)/c+(r<s?6:0))/6;break;case r:i=((s-t)/c+2)/6;break;case s:i=((t-r)/c+4)/6;break}}return[Math.round(i*360),Math.round(u*100),Math.round(l*100)]}function nt(e,t,r){const s=e/360,a=t/100,o=r/100,l=(f,y,S)=>{let N=S;return N<0&&(N+=1),N>1&&(N-=1),N<1/6?f+(y-f)*6*N:N<1/2?y:N<2/3?f+(y-f)*(2/3-N)*6:f};let i,u,c;if(a===0)i=u=c=o;else{const f=o<.5?o*(1+a):o+a-o*a,y=2*o-f;i=l(y,f,s+1/3),u=l(y,f,s),c=l(y,f,s-1/3)}const d=f=>Math.round(f*255).toString(16).padStart(2,"0");return`#${d(i)}${d(u)}${d(c)}`}function Qt(e){return/^#[0-9a-f]{6}$/i.test(e)}const Kl=["#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899","#64748b","#0f172a","#ffffff","#f8fafc"];function ql({value:e,defaultValue:t="#3b82f6",onChange:r,label:s,hint:a,error:o,disabled:l,presets:i=Kl,showPresets:u=!0,className:c}){const d=e!==void 0,[f,y]=x.useState(t),S=d?e:f,[N,g]=x.useState(S),[h,w]=x.useState(!1),p=x.useRef(null);x.useEffect(()=>{if(!h)return;const T=R=>{p.current&&!p.current.contains(R.target)&&w(!1)},E=R=>{R.key==="Escape"&&(R.preventDefault(),w(!1))};return document.addEventListener("mousedown",T),document.addEventListener("touchstart",T,{passive:!0}),document.addEventListener("keydown",E),()=>{document.removeEventListener("mousedown",T),document.removeEventListener("touchstart",T),document.removeEventListener("keydown",E)}},[h]),x.useEffect(()=>{if(!(!h||!window.matchMedia("(max-width: 640px)").matches))return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[h]);const[m,v,b]=Qt(S)?Vl(S):[0,0,50],k=x.useCallback(T=>{d||y(T),g(T),r==null||r(T)},[d,r]),j=T=>{const E=T.startsWith("#")?T:`#${T}`;g(E),Qt(E)&&k(E)};return n.jsxs("div",{ref:p,className:C("vx-colorpicker",c),children:[s?n.jsx("span",{className:"vx-field-group__label",children:s}):null,n.jsxs("div",{className:"vx-colorpicker__row",children:[n.jsx("button",{type:"button",className:C("vx-colorpicker__swatch-btn",l&&"vx-colorpicker__swatch-btn--disabled"),style:{"--vx-cp-color":S},onClick:()=>!l&&w(T=>!T),disabled:l,"aria-label":`Current color: ${S}. Click to open color picker.`,"aria-haspopup":"dialog","aria-expanded":h}),n.jsx("input",{type:"text",className:"vx-colorpicker__hex-input",value:N,onChange:T=>j(T.target.value),disabled:l,"aria-label":"Hex color value",maxLength:7})]}),o?n.jsx("span",{className:"vx-field-group__error",children:o}):null,!o&&a?n.jsx("span",{className:"vx-field-group__hint",children:a}):null,h&&n.jsxs("div",{className:"vx-colorpicker__panel",role:"dialog","aria-label":"Color picker",children:[n.jsx("div",{className:"vx-colorpicker__section-label",children:"Hue"}),n.jsx("input",{type:"range",className:"vx-colorpicker__hue-slider",min:"0",max:"360",value:m,onChange:T=>k(nt(Number(T.target.value),v,b)),"aria-label":"Hue"}),n.jsx("div",{className:"vx-colorpicker__section-label",children:"Saturation"}),n.jsx("input",{type:"range",className:"vx-colorpicker__sat-slider",min:"0",max:"100",value:v,style:{"--vx-cp-hue":m},onChange:T=>k(nt(m,Number(T.target.value),b)),"aria-label":"Saturation"}),n.jsx("div",{className:"vx-colorpicker__section-label",children:"Lightness"}),n.jsx("input",{type:"range",className:"vx-colorpicker__lit-slider",min:"0",max:"100",value:b,style:{"--vx-cp-hue":m,"--vx-cp-sat":`${v}%`},onChange:T=>k(nt(m,v,Number(T.target.value))),"aria-label":"Lightness"}),u&&n.jsx("div",{className:"vx-colorpicker__presets",children:i.map(T=>n.jsx("button",{type:"button",className:C("vx-colorpicker__preset",S.toLowerCase()===T.toLowerCase()&&"vx-colorpicker__preset--active"),style:{background:T},onClick:()=>k(T),"aria-label":T},T))}),n.jsx("button",{type:"button",className:"vx-colorpicker__close",onClick:()=>w(!1),children:"Done"})]})]})}function Yl({direction:e="horizontal",children:t,className:r}){return n.jsx("div",{className:C("vx-resizable-group",`vx-resizable-group--${e}`,r),children:t})}function Xl({children:e,defaultSize:t=50,minSize:r=10,maxSize:s=90,className:a,style:o}){return n.jsx("div",{className:C("vx-resizable-panel",a),style:{"--vx-panel-size":`${t}%`,...o},"data-min":r,"data-max":s,children:e})}function Zl({className:e,direction:t="horizontal"}){const r=x.useRef(!1),[s,a]=x.useState(!1),o=x.useCallback(l=>{const i=l.currentTarget,u=i.previousElementSibling,c=i.nextElementSibling;if(!u||!c)return;const d=i.parentElement,f=t==="horizontal",y=f?d.getBoundingClientRect().width:d.getBoundingClientRect().height,S=f?u.getBoundingClientRect().width:u.getBoundingClientRect().height,N=f?c.getBoundingClientRect().width:c.getBoundingClientRect().height,g=j=>"touches"in j?f?j.touches[0].clientX:j.touches[0].clientY:f?j.clientX:j.clientY,h=g(l.nativeEvent);r.current=!0,a(!0);const w=Number(u.dataset.min??10)/100*y,p=Number(u.dataset.max??90)/100*y,m=Number(c.dataset.min??10)/100*y,v=Number(c.dataset.max??90)/100*y,b=j=>{if(!r.current)return;const T=g(j)-h,E=Math.min(Math.max(S+T,w),p),R=Math.min(Math.max(N-T,m),v);u.style.flexBasis=`${E/y*100}%`,c.style.flexBasis=`${R/y*100}%`},k=()=>{r.current=!1,a(!1),document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",k),document.removeEventListener("touchmove",b),document.removeEventListener("touchend",k)};document.addEventListener("mousemove",b),document.addEventListener("mouseup",k),document.addEventListener("touchmove",b,{passive:!1}),document.addEventListener("touchend",k)},[t]);return n.jsx("div",{role:"separator","aria-orientation":t==="horizontal"?"vertical":"horizontal",className:C("vx-resizable-handle",`vx-resizable-handle--${t}`,s&&"vx-resizable-handle--active",e),onMouseDown:o,onTouchStart:o,children:n.jsx("span",{className:"vx-resizable-handle__bar","aria-hidden":"true"})})}function Jt(e,t){if(!t)return e;const r=e.toLowerCase().indexOf(t.toLowerCase());return r===-1?e:n.jsxs(n.Fragment,{children:[e.slice(0,r),n.jsx("mark",{className:"vx-cmd__mark",children:e.slice(r,r+t.length)}),e.slice(r+t.length)]})}function Ql(e,t){const r=t.toLowerCase(),s=e.title.toLowerCase(),a=e.section.toLowerCase(),o=e.description.toLowerCase(),l=(e.keywords??[]).join(" ").toLowerCase();return s===r?100:s.startsWith(r)?80:s.includes(r)?60:a.includes(r)?40:l.includes(r)?35:o.includes(r)?20:0}function Jl({entries:e,open:t,onClose:r,onSelect:s,placeholder:a="Search components, pages, keywords…",ariaLabel:o="Search",emptyText:l=d=>`No results for "${d}"`,labelNavigate:i="Navigate",labelGo:u="Go",labelClose:c="Close"}){const[d,f]=x.useState(""),[y,S]=x.useState(0),N=x.useRef(null),g=x.useRef(null),h=d.trim()?e.map(v=>({entry:v,s:Ql(v,d.trim())})).filter(v=>v.s>0).sort((v,b)=>b.s-v.s).map(v=>v.entry):e;x.useEffect(()=>{t&&(f(""),S(0),setTimeout(()=>{var v;return(v=N.current)==null?void 0:v.focus()},30))},[t]),x.useEffect(()=>{S(0)},[d]),x.useEffect(()=>{var b;const v=(b=g.current)==null?void 0:b.children[y];v==null||v.scrollIntoView({block:"nearest"})},[y]);const w=x.useCallback(v=>{s(v),r()},[s,r]),p=x.useCallback(v=>{v.key==="ArrowDown"?(v.preventDefault(),S(b=>Math.min(b+1,h.length-1))):v.key==="ArrowUp"?(v.preventDefault(),S(b=>Math.max(b-1,0))):v.key==="Enter"?(v.preventDefault(),h[y]&&w(h[y].key)):v.key==="Escape"&&r()},[h,y,w,r]);if(!t)return null;const m=[];for(const v of h){const b=m[m.length-1];b&&b.section===v.section?b.items.push(v):m.push({section:v.section,items:[v]})}return n.jsx("div",{className:"vx-cmd__backdrop",onMouseDown:r,children:n.jsxs("div",{className:"vx-cmd",role:"dialog","aria-modal":"true","aria-label":o,onMouseDown:v=>v.stopPropagation(),children:[n.jsxs("div",{className:"vx-cmd__search",children:[n.jsxs("svg",{className:"vx-cmd__search-icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[n.jsx("circle",{cx:"6.5",cy:"6.5",r:"5",stroke:"currentColor",strokeWidth:"1.5"}),n.jsx("path",{d:"M10.5 10.5L14 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),n.jsx("input",{ref:N,className:"vx-cmd__input",type:"text",placeholder:a,value:d,onChange:v=>f(v.target.value),onKeyDown:p,autoComplete:"off",spellCheck:!1}),d?n.jsx("button",{className:"vx-cmd__clear",onClick:()=>f(""),"aria-label":"清除",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M1 1l12 12M13 1L1 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}):n.jsx("kbd",{className:"vx-cmd__esc",children:"esc"})]}),n.jsx("ul",{className:"vx-cmd__list",ref:g,role:"listbox",children:h.length===0?n.jsx("li",{className:"vx-cmd__empty",children:l(d)}):m.map(v=>v.items.map((b,k)=>{const j=h.indexOf(b),T=j===y;return n.jsxs("li",{role:"option","aria-selected":T,className:`vx-cmd__item${T?" vx-cmd__item--active":""}`,onMouseEnter:()=>S(j),onMouseDown:()=>w(b.key),children:[b.icon?n.jsx("span",{className:"vx-cmd__item-icon",children:b.icon}):n.jsx("span",{className:"vx-cmd__item-icon vx-cmd__item-icon--section",children:b.section.slice(0,1)}),n.jsxs("span",{className:"vx-cmd__item-body",children:[n.jsx("span",{className:"vx-cmd__item-title",children:Jt(b.title,d)}),n.jsx("span",{className:"vx-cmd__item-sub",children:Jt(b.section,d)})]}),T&&n.jsx("kbd",{className:"vx-cmd__enter",children:"↵"})]},b.key)}))}),n.jsxs("div",{className:"vx-cmd__footer",children:[n.jsxs("span",{children:[n.jsx("kbd",{children:"↑↓"})," ",i]}),n.jsxs("span",{children:[n.jsx("kbd",{children:"↵"})," ",u]}),n.jsxs("span",{children:[n.jsx("kbd",{children:"esc"})," ",c]})]})]})})}var en=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ec(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rt={exports:{}},tn;function tc(){return tn||(tn=1,(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
96
|
+
*/const ys=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],le=J("x",ys);function j(...t){return t.filter(Boolean).join(" ")}const tn=p.createContext(null);let ws=1;const _s={info:e.jsx(ms,{size:15}),success:e.jsx(as,{size:15}),warning:e.jsx(gs,{size:15}),danger:e.jsx(rs,{size:15})};function nn({children:t}){const[n,r]=p.useState([]),s=p.useMemo(()=>({push:a=>{r(i=>[...i,{id:ws+=1,tone:"info",...a}])}}),[]);return e.jsx(tn.Provider,{value:s,children:e.jsxs(Br,{swipeDirection:"right",children:[t,n.map(a=>e.jsxs(Ur,{className:j("vx-toast",`vx-toast--${a.tone??"info"}`),duration:4500,open:!0,onOpenChange:i=>{i||r(o=>o.filter(l=>l.id!==a.id))},children:[e.jsxs("div",{className:"vx-toast__content",children:[e.jsxs("div",{className:"vx-toast__header",children:[e.jsx("span",{className:"vx-toast__icon","aria-hidden":"true",children:_s[a.tone??"info"]}),e.jsx(Gr,{className:"vx-toast__title",children:a.title})]}),a.description?e.jsx(Vr,{className:"vx-toast__description",children:a.description}):null]}),e.jsx(Wr,{className:"vx-toast__close","aria-label":"Dismiss notification",children:e.jsx(le,{size:14})})]},a.id)),e.jsx(Hr,{className:"vx-toast__viewport"})]})})}function ks(){const t=p.useContext(tn);if(!t)throw new Error("useToast must be used within ToastProvider.");return t}function Ss({children:t,themes:n,defaultTheme:r,storageKey:s}){return e.jsx(At,{themes:n,defaultTheme:r,storageKey:s,children:e.jsx(Ct,{children:e.jsx(nn,{children:t})})})}function tt(t,n,r=!0){p.useEffect(()=>{const s=t.current,a=n.current;if(!s)return;if(!r||!a){s.dataset.scrollable="false",s.dataset.scrollbarState="hidden",s.style.setProperty("--vx-scrollbar-thumb-height","0px"),s.style.setProperty("--vx-scrollbar-thumb-offset","0px");return}let i;const o=()=>{const u=a.scrollHeight>a.clientHeight+1;if(s.dataset.scrollable=u?"true":"false",!u){s.dataset.scrollbarState="hidden",s.style.setProperty("--vx-scrollbar-thumb-height","0px"),s.style.setProperty("--vx-scrollbar-thumb-offset","0px");return}const f=Math.max(s.clientHeight-16,0),b=Math.max(a.clientHeight/a.scrollHeight*f,36),w=a.scrollHeight-a.clientHeight,N=Math.max(f-b,0),_=w>0?a.scrollTop/w*N:0;s.style.setProperty("--vx-scrollbar-thumb-height",`${b}px`),s.style.setProperty("--vx-scrollbar-thumb-offset",`${_}px`),s.dataset.scrollbarState!=="active"&&(s.dataset.scrollbarState="hidden")},l=()=>{s.dataset.scrollable==="true"&&(s.dataset.scrollbarState="active",i!==void 0&&window.clearTimeout(i),i=window.setTimeout(()=>{s.dataset.scrollbarState="hidden"},640))},d=()=>{o(),l()};o(),a.addEventListener("scroll",d,{passive:!0});const c=new ResizeObserver(()=>o());return c.observe(s),c.observe(a),()=>{a.removeEventListener("scroll",d),c.disconnect(),i!==void 0&&window.clearTimeout(i)}},[r,t,n])}const ye=p.forwardRef(function({className:n,variant:r="solid",size:s="md",shape:a="rect",fullWidth:i=!1,loading:o=!1,startIcon:l,endIcon:d,disabled:c,type:u="button",children:f,...b},w){return e.jsxs("button",{ref:w,type:u,disabled:c||o,"aria-busy":o||void 0,className:j("vx-button",`vx-button--${r}`,`vx-button--${s}`,a==="square"&&"vx-button--square",a==="pill"&&"vx-button--pill",a==="circle"&&"vx-button--circle",i&&"vx-button--full-width",o&&"vx-button--loading",n),...b,children:[o?e.jsx("span",{className:"vx-button__spinner","aria-hidden":"true"}):l??null,f,!o&&d?d:null]})}),We=p.createContext(!1);function rn({collapsed:t=!1,mobileNavOpen:n=!1,density:r,sidebarWidth:s,className:a,children:i}){const{isTablet:o,isTabletPortrait:l}=Ee(),d=s?{"--vx-sidebar-width":typeof s=="number"?`${s}px`:s}:void 0;return e.jsx(We.Provider,{value:t,children:e.jsx("div",{className:j("vx-shell",a),"data-collapsed":t,"data-nav-open":n,"data-tablet":o,"data-tablet-portrait":l,"data-density":r,style:d,children:i})})}function sn({brand:t="VXUI",brandCaption:n,brandIcon:r,collapsed:s=!1,footer:a,onToggle:i,collapseLabel:o="Collapse",expandLabel:l="Expand",onSidebarClick:d,children:c}){const u=p.useRef(null),f=p.useRef(null);return tt(u,f),e.jsxs("aside",{ref:u,className:"vx-sidebar vx-scroll-host","data-scrollable":"false","data-scrollbar-state":"hidden",onClickCapture:d,children:[e.jsxs("div",{ref:b=>{f.current=b},className:"vx-sidebar__scroll vx-scroll-hide-native",children:[e.jsx("div",{className:"vx-sidebar__header",children:e.jsxs("div",{className:"vx-sidebar__brand",children:[r?e.jsx("span",{className:"vx-sidebar__brand-icon",children:r}):null,e.jsxs("div",{className:"vx-sidebar__brand-copy",children:[e.jsx("span",{className:"vx-sidebar__brand-text",children:t}),n?e.jsx("span",{className:"vx-sidebar__brand-caption",children:n}):null]})]})}),c,e.jsxs("div",{className:"vx-sidebar__footer",children:[a?e.jsx("div",{className:"vx-sidebar__footer-content",children:a}):null,i?e.jsxs(ye,{variant:"ghost",size:"sm",className:"vx-sidebar__toggle",onClick:i,"aria-label":s?l:o,children:[s?e.jsx(en,{size:16}):e.jsx(Jt,{size:16}),e.jsx("span",{className:"vx-sidebar__toggle-label",children:s?l:o})]}):null]})]}),e.jsx("span",{className:"vx-overlay-scrollbar","aria-hidden":"true",children:e.jsx("span",{className:"vx-overlay-scrollbar__thumb"})})]})}function an({label:t="Primary navigation",children:n}){return e.jsx("nav",{className:"vx-sidebar__nav","aria-label":t,children:n})}function on({title:t,children:n}){return e.jsxs("div",{className:"vx-nav-section-block",children:[t?e.jsx("div",{className:"vx-nav-section-block__title",children:t}):null,e.jsx("div",{className:"vx-nav-section-block__items",children:n})]})}function ln({label:t,icon:n,badge:r,trailing:s,active:a,onSelect:i,children:o,defaultOpen:l=!1}){const[d,c]=p.useState(l),[u,f]=p.useState(!1),[b,w]=p.useState({top:0,left:0}),N=p.useRef(null),_=p.useRef(void 0),g=p.useContext(We),k=!!o;p.useEffect(()=>()=>{_.current!==void 0&&clearTimeout(_.current)},[]);const v=()=>{k&&!g&&c(S=>!S),(!k||g)&&(i==null||i())},h=()=>{if(!g||!k||!N.current)return;_.current!==void 0&&clearTimeout(_.current);const S=N.current.getBoundingClientRect(),P=N.current.closest(".vx-sidebar"),E=P?P.getBoundingClientRect().right:S.right;w({top:S.top-6,left:E+4}),f(!0)},m=()=>{_.current=setTimeout(()=>f(!1),100)},x=()=>{_.current!==void 0&&clearTimeout(_.current)},y=e.jsxs("button",{type:"button",className:j("vx-nav-item",a&&"vx-nav-item--active",k&&"vx-nav-item--parent"),onClick:v,"aria-expanded":k&&!g?d:void 0,title:g?t:void 0,children:[n?e.jsx("span",{className:"vx-nav-item__icon",children:n}):null,e.jsx("span",{className:"vx-nav-item__label",children:t}),r?e.jsx("span",{className:"vx-nav-item__badge",children:r}):null,k?e.jsx(be,{size:14,className:j("vx-nav-item__chevron",d&&"vx-nav-item__chevron--open")}):s?e.jsx("span",{className:"vx-nav-item__trailing",children:s}):null]});return k?e.jsxs("div",{ref:N,className:"vx-nav-item-wrap",onMouseEnter:h,onMouseLeave:g?m:void 0,children:[y,!g&&d&&e.jsx("div",{className:"vx-nav-sublist",role:"group",children:o}),g&&u&&oe.createPortal(e.jsx(We.Provider,{value:!1,children:e.jsxs("div",{className:"vx-nav-sublist-flyout",style:{top:b.top,left:b.left},role:"group",onMouseEnter:x,onMouseLeave:m,children:[e.jsx("div",{className:"vx-nav-sublist-flyout__label",children:t}),o]})}),document.body)]}):y}function cn({onClose:t,closeLabel:n="Close sidebar"}){return e.jsx("button",{type:"button",className:"vx-shell__overlay","aria-label":n,onClick:t})}function dn({children:t}){return e.jsx("div",{className:"vx-shell__main",children:t})}const un=p.forwardRef(function({title:n,description:r,breadcrumb:s,actions:a,onMenuToggle:i,mobileNavOpen:o=!1,menuButtonLabel:l="Open navigation"},d){return e.jsxs("header",{ref:d,className:"vx-topbar",children:[i?e.jsx(ye,{variant:"ghost",size:"sm",className:"vx-topbar__menu","aria-label":l,onClick:i,children:o?e.jsx(Jt,{size:16}):e.jsx(en,{size:16})}):null,e.jsx("div",{className:"vx-topbar__title-group",children:s||e.jsxs("div",{children:[n?e.jsx("h1",{className:"vx-topbar__title",children:n}):null,r?e.jsx("p",{className:"vx-topbar__description",children:r}):null]})}),a?e.jsx("div",{className:"vx-topbar__actions",children:a}):null]})});function pn({children:t}){const n=p.useRef(null),r=p.useRef(null);return tt(n,r),e.jsxs("div",{ref:s=>{n.current=s},className:"vx-shell__content-wrap vx-scroll-host","data-scrollable":"false","data-scrollbar-state":"hidden",children:[e.jsx("main",{ref:s=>{r.current=s},className:"vx-shell__content vx-scroll-hide-native",children:t}),e.jsx("span",{className:"vx-overlay-scrollbar","aria-hidden":"true",children:e.jsx("span",{className:"vx-overlay-scrollbar__thumb"})})]})}function Ns({brand:t="VXUI",brandCaption:n,brandIcon:r,topbarRef:s,breadcrumb:a,title:i,description:o,navItems:l,navSections:d,sidebarCollapsed:c=!1,sidebarWidth:u,mobileNavOpen:f=!1,onSidebarToggle:b,onMobileNavToggle:w,onSidebarClick:N,menuButtonLabel:_="Open navigation",sidebarCollapseLabel:g="Collapse",sidebarExpandLabel:k="Expand",sidebarCloseLabel:v="Close sidebar",density:h,headerActions:m,sidebarFooter:x,children:y}){const S=d??(l?[{items:l}]:[]);function P(E){const{key:R,onSelect:T,children:A,defaultOpen:$,...D}=E,I=(A==null?void 0:A.some(O=>O.active))??!1;return e.jsx(ln,{onSelect:T,defaultOpen:$??(A?I:void 0),...D,children:A==null?void 0:A.map(P)},R)}return e.jsxs(rn,{collapsed:c,mobileNavOpen:f,density:h,sidebarWidth:u,children:[e.jsx(sn,{brand:t,brandCaption:n,brandIcon:r,collapsed:c,footer:x,onToggle:b,onSidebarClick:N,collapseLabel:g,expandLabel:k,children:e.jsx(an,{children:S.map((E,R)=>e.jsx(on,{title:E.title,children:E.items.map(P)},E.key??E.title??R))})}),w?e.jsx(cn,{onClose:w,closeLabel:v}):null,e.jsxs(dn,{children:[e.jsx(un,{ref:s,breadcrumb:a,title:i,description:o,actions:m,onMenuToggle:w,mobileNavOpen:f,menuButtonLabel:_}),e.jsx(pn,{children:y})]})]})}function js({className:t,variant:n="neutral",...r}){return e.jsx("span",{className:j("vx-badge",`vx-badge--${n}`,t),...r})}function Cs({className:t,variant:n="default",padding:r,hoverable:s=!1,...a}){return e.jsx("section",{className:j("vx-card",n!=="default"&&`vx-card--${n}`,r&&`vx-card--pad-${r}`,s&&"vx-card--hoverable",t),...a})}function Ts({className:t,...n}){return e.jsx("header",{className:j("vx-card__header",t),...n})}function Es({className:t,...n}){return e.jsx("h2",{className:j("vx-card__title",t),...n})}function As({className:t,...n}){return e.jsx("p",{className:j("vx-card__description",t),...n})}function Ps({className:t,...n}){return e.jsx("div",{className:j("vx-card__content",t),...n})}function mn({open:t,defaultOpen:n=!1,onOpenChange:r}){const s=t!==void 0,[a,i]=p.useState(n),o=s?t:a,l=p.useRef(r);l.current=r;const d=p.useCallback(b=>{var w;if(s){const N=typeof b=="function"?b(t):b;(w=l.current)==null||w.call(l,N)}else i(b)},[s,t]);p.useEffect(()=>{s&&i(t)},[s,t]),p.useEffect(()=>{var b;s||(b=l.current)==null||b.call(l,a)},[s,a]);const c=p.useCallback(()=>d(!0),[d]),u=p.useCallback(()=>d(!1),[d]),f=p.useCallback(()=>d(b=>!b),[d]);return{isOpen:o,open:c,close:u,toggle:f}}const fn=["a[href]",'button:not([disabled]):not([aria-hidden="true"])','input:not([disabled]):not([aria-hidden="true"])','textarea:not([disabled]):not([aria-hidden="true"])','select:not([disabled]):not([aria-hidden="true"])','[tabindex]:not([tabindex="-1"]):not([aria-hidden="true"])',"area[href]","iframe","object","embed"].join(", ");function hn(t,n){const{active:r,autoFocus:s=!0,onMountAutoFocus:a,onUnmountAutoFocus:i}=n,o=p.useRef(null);p.useEffect(()=>{if(!r){if(o.current&&document.contains(o.current)){const c=o.current,u=new Event("focusrestore");((i==null?void 0:i(u))??!0)&&requestAnimationFrame(()=>{c.focus({preventScroll:!0})})}o.current=null;return}const l=t.current;if(!l)return;if(o.current=document.activeElement,s){const c=new Event("focusauto");if((a==null?void 0:a(c))??!0){const f=Fs(l);f?f.focus({preventScroll:!0}):l.focus({preventScroll:!0})}}const d=c=>{if(c.key!=="Tab")return;const u=Rs(l);if(u.length===0){c.preventDefault();return}const f=u[0],b=u[u.length-1],w=u.indexOf(document.activeElement);c.shiftKey?w<=0&&(c.preventDefault(),b.focus({preventScroll:!0})):(w===-1||w===u.length-1)&&(c.preventDefault(),f.focus({preventScroll:!0}))};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d)}},[r,s,t,a,i])}function Rs(t){return Array.from(t.querySelectorAll(fn))}function Fs(t){return t.querySelector(fn)}function vn(t){const n=p.useRef(0);p.useEffect(()=>(t?(n.current+=1,n.current===1&&Ds()):(n.current-=1,n.current<=0&&(n.current=0,dt())),()=>{n.current-=1,n.current<=0&&(n.current=0,dt())}),[t])}let je=null,Ce=null;function Ds(){const t=document.body,n=window.innerWidth-document.documentElement.clientWidth;if(je=t.style.overflow,Ce=t.style.paddingRight,t.style.overflow="hidden",n>0){const r=parseFloat(getComputedStyle(t).paddingRight)||0;t.style.paddingRight=`${r+n}px`}}function dt(){const t=document.body;je!==null?(t.style.overflow=je,je=null):t.style.overflow="",Ce!==null?(t.style.paddingRight=Ce,Ce=null):t.style.paddingRight=""}const Ls=p.createContext(null);function Is(t){if(t){const n=t.closest("[data-dialog-content-ref]");if(n)return n}return(t==null?void 0:t.closest(".vx-dialog__content"))??null}function ce(t){return{dialogContent:Is(t),shouldInline:!1}}const gn=p.createContext(null);function Ms(){const t=p.useContext(gn);if(!t)throw new Error("DialogClose must be used within a Dialog component");return t}function Os({children:t,scrollable:n}){const r=p.useRef(null),s=p.useRef(null);return tt(r,s,n),e.jsxs("div",{ref:r,className:"vx-dialog__body-wrap vx-scroll-host","data-scrollable":"false","data-scrollbar-state":"hidden",children:[e.jsx("div",{ref:s,className:j("vx-dialog__body",n&&"vx-scroll-hide-native"),children:t}),n?e.jsx("span",{className:"vx-overlay-scrollbar","aria-hidden":"true",children:e.jsx("span",{className:"vx-overlay-scrollbar__thumb"})}):null]})}function $s({asChild:t,children:n,onClick:r,className:s,...a}){const{close:i}=Ms(),o=p.useCallback(l=>{r==null||r(l),l.defaultPrevented||i()},[i,r]);if(t){const l=p.Children.only(n),d={...a,onClick:c=>{const u=l.props.onClick;u==null||u(c),c.defaultPrevented||o(c)}};return p.cloneElement(l,d)}return e.jsx("button",{type:"button",className:s,onClick:o,...a,children:n})}function zs({trigger:t,onOpen:n}){if(p.isValidElement(t)){const r=t;return p.cloneElement(r,{onClick:s=>{const a=r.props.onClick;a==null||a(s),s.defaultPrevented||n()}})}return e.jsx("button",{type:"button",onClick:n,children:t})}function Bs({trigger:t,title:n,description:r,children:s,footer:a,className:i,size:o="md",padding:l,placement:d="center",scrollable:c=!0,closable:u=!0,fullscreen:f=!1,open:b,defaultOpen:w,onOpenChange:N,onConfirm:_,onCancel:g,confirmLabel:k="Confirm",cancelLabel:v="Cancel",confirmVariant:h="solid"}){const{isOpen:m,open:x,close:y}=mn({open:b,defaultOpen:w,onOpenChange:N}),S=p.useCallback(()=>{_==null||_(),y()},[_,y]),P=p.useCallback(()=>{g==null||g(),y()},[g,y]),E=p.useRef(null),R=p.useId(),T=p.useId();vn(m),hn(E,{active:m}),p.useEffect(()=>{if(!m)return;const I=O=>{if(O.key!=="Escape")return;const H=E.current;if(!H)return;const U=!!H.querySelector(".vx-select__dropdown, .vx-multiselect__dropdown, .vx-datepicker__popover, .vx-timepicker__popover, .vx-colorpicker__panel"),W=H.dataset.hasOpenPortal==="1";if(U||W){O.preventDefault();return}y()};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[m,y]);const A=p.useCallback(I=>{if(I.target!==I.currentTarget)return;const O=E.current;(O==null?void 0:O.dataset.hasOpenPortal)==="1"||(O==null?void 0:O.dataset.hasOpenBottomSheet)==="1"||y()},[y]),$={close:y,contentRef:E},D=a??(_?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"vx-button vx-button--secondary",onClick:P,children:v}),e.jsx("button",{type:"button",className:j("vx-button",h==="danger"?"vx-button--danger":"vx-button--solid"),onClick:S,children:k})]}):null);return e.jsxs(e.Fragment,{children:[e.jsx(zs,{trigger:t,onOpen:x}),m&&oe.createPortal(e.jsx(gn.Provider,{value:$,children:e.jsxs(Ls.Provider,{value:E.current,children:[e.jsx("div",{className:"vx-dialog__overlay",onClick:A,onPointerDown:I=>{const O=E.current;((O==null?void 0:O.dataset.hasOpenPortal)==="1"||(O==null?void 0:O.dataset.hasOpenBottomSheet)==="1")&&I.preventDefault()}}),e.jsxs("div",{ref:E,role:"dialog","aria-modal":"true","aria-labelledby":R,"aria-describedby":r?T:void 0,tabIndex:-1,className:j("vx-dialog__content",f&&"vx-dialog__content--fullscreen",o!=="md"&&`vx-dialog__content--${o}`,d!=="center"&&`vx-dialog__content--${d}`,l&&`vx-dialog__content--pad-${l}`,c&&"vx-dialog__content--scrollable",i),children:[e.jsxs("div",{className:"vx-dialog__header",children:[e.jsxs("div",{children:[e.jsx("h2",{id:R,className:"vx-dialog__title",children:n}),r?e.jsx("p",{id:T,className:"vx-dialog__description",children:r}):null]}),u?e.jsx("button",{type:"button",className:"vx-dialog__close","aria-label":"Close dialog",onClick:y,children:e.jsx(le,{size:16})}):null]}),s?e.jsx(Os,{scrollable:c,children:s}):null,D?e.jsx("div",{className:"vx-dialog__footer",children:D}):null]})]})}),document.body)]})}function Hs({className:t,label:n,hint:r,prefix:s,suffix:a,error:i,variant:o="default",size:l="md",rounded:d=!1,...c}){return e.jsxs("label",{className:"vx-field-group",children:[n?e.jsx("span",{className:"vx-field-group__label",children:n}):null,e.jsxs("span",{className:j("vx-input",o!=="default"&&`vx-input--${o}`,l!=="md"&&`vx-input--${l}`,d&&"vx-input--rounded",i&&"vx-input--invalid",t),children:[s?e.jsx("span",{className:"vx-input__ornament",children:s}):null,e.jsx("input",{className:"vx-input__field","aria-invalid":i?"true":void 0,...c}),a?e.jsx("span",{className:"vx-input__ornament",children:a}):null]}),i?e.jsx("span",{className:"vx-field-group__error",children:i}):null,!i&&r?e.jsx("span",{className:"vx-field-group__hint",children:r}):null]})}function Us(t){const n=C.useRef({value:t,previous:t});return C.useMemo(()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous),[t])}function Gs(t){const[n,r]=C.useState(void 0);return de(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let o,l;if("borderBoxSize"in i){const d=i.borderBoxSize,c=Array.isArray(d)?d[0]:d;o=c.inlineSize,l=c.blockSize}else o=t.offsetWidth,l=t.offsetHeight;r({width:o,height:l})});return s.observe(t,{box:"border-box"}),()=>s.unobserve(t)}else r(void 0)},[t]),n}var Re="Switch",[Vs]=ve(Re),[Ws,qs]=Vs(Re),xn=C.forwardRef((t,n)=>{const{__scopeSwitch:r,name:s,checked:a,defaultChecked:i,required:o,disabled:l,value:d="on",onCheckedChange:c,form:u,...f}=t,[b,w]=C.useState(null),N=se(n,h=>w(h)),_=C.useRef(!1),g=b?u||!!b.closest("form"):!0,[k,v]=Ae({prop:a,defaultProp:i??!1,onChange:c,caller:Re});return e.jsxs(Ws,{scope:r,checked:k,disabled:l,children:[e.jsx(Q.button,{type:"button",role:"switch","aria-checked":k,"aria-required":o,"data-state":_n(k),"data-disabled":l?"":void 0,disabled:l,value:d,...f,ref:N,onClick:Y(t.onClick,h=>{v(m=>!m),g&&(_.current=h.isPropagationStopped(),_.current||h.stopPropagation())})}),g&&e.jsx(wn,{control:b,bubbles:!_.current,name:s,value:d,checked:k,required:o,disabled:l,form:u,style:{transform:"translateX(-100%)"}})]})});xn.displayName=Re;var bn="SwitchThumb",yn=C.forwardRef((t,n)=>{const{__scopeSwitch:r,...s}=t,a=qs(bn,r);return e.jsx(Q.span,{"data-state":_n(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:n})});yn.displayName=bn;var Ks="SwitchBubbleInput",wn=C.forwardRef(({__scopeSwitch:t,control:n,checked:r,bubbles:s=!0,...a},i)=>{const o=C.useRef(null),l=se(o,i),d=Us(r),c=Gs(n);return C.useEffect(()=>{const u=o.current;if(!u)return;const f=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(f,"checked").set;if(d!==r&&w){const N=new Event("click",{bubbles:s});w.call(u,r),u.dispatchEvent(N)}},[d,r,s]),e.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:l,style:{...a.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});wn.displayName=Ks;function _n(t){return t?"checked":"unchecked"}var Ys=xn,Xs=yn;function Zs({className:t,label:n,description:r,...s}){return e.jsxs("label",{className:"vx-switch",children:[e.jsxs("span",{className:"vx-switch__copy",children:[e.jsx("span",{className:"vx-switch__label",children:n}),r?e.jsx("span",{className:"vx-switch__description",children:r}):null]}),e.jsx(Ys,{className:j("vx-switch__control",t),...s,children:e.jsx(Xs,{className:"vx-switch__thumb"})})]})}var Qs=C[" useId ".trim().toString()]||(()=>{}),Js=0;function kn(t){const[n,r]=C.useState(Qs());return de(()=>{r(s=>s??String(Js++))},[t]),t||(n?`radix-${n}`:"")}var ea=C.createContext(void 0);function Sn(t){const n=C.useContext(ea);return t||n||"ltr"}var Oe="rovingFocusGroup.onEntryFocus",ta={bubbles:!1,cancelable:!0},we="RovingFocusGroup",[qe,Nn,na]=Rt(we),[ra,jn]=ve(we,[na]),[sa,aa]=ra(we),Cn=C.forwardRef((t,n)=>e.jsx(qe.Provider,{scope:t.__scopeRovingFocusGroup,children:e.jsx(qe.Slot,{scope:t.__scopeRovingFocusGroup,children:e.jsx(oa,{...t,ref:n})})}));Cn.displayName=we;var oa=C.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:r,orientation:s,loop:a=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:d,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...f}=t,b=C.useRef(null),w=se(n,b),N=Sn(i),[_,g]=Ae({prop:o,defaultProp:l??null,onChange:d,caller:we}),[k,v]=C.useState(!1),h=ie(c),m=Nn(r),x=C.useRef(!1),[y,S]=C.useState(0);return C.useEffect(()=>{const P=b.current;if(P)return P.addEventListener(Oe,h),()=>P.removeEventListener(Oe,h)},[h]),e.jsx(sa,{scope:r,orientation:s,dir:N,loop:a,currentTabStopId:_,onItemFocus:C.useCallback(P=>g(P),[g]),onItemShiftTab:C.useCallback(()=>v(!0),[]),onFocusableItemAdd:C.useCallback(()=>S(P=>P+1),[]),onFocusableItemRemove:C.useCallback(()=>S(P=>P-1),[]),children:e.jsx(Q.div,{tabIndex:k||y===0?-1:0,"data-orientation":s,...f,ref:w,style:{outline:"none",...t.style},onMouseDown:Y(t.onMouseDown,()=>{x.current=!0}),onFocus:Y(t.onFocus,P=>{const E=!x.current;if(P.target===P.currentTarget&&E&&!k){const R=new CustomEvent(Oe,ta);if(P.currentTarget.dispatchEvent(R),!R.defaultPrevented){const T=m().filter(O=>O.focusable),A=T.find(O=>O.active),$=T.find(O=>O.id===_),I=[A,$,...T].filter(Boolean).map(O=>O.ref.current);An(I,u)}}x.current=!1}),onBlur:Y(t.onBlur,()=>v(!1))})})}),Tn="RovingFocusGroupItem",En=C.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:r,focusable:s=!0,active:a=!1,tabStopId:i,children:o,...l}=t,d=kn(),c=i||d,u=aa(Tn,r),f=u.currentTabStopId===c,b=Nn(r),{onFocusableItemAdd:w,onFocusableItemRemove:N,currentTabStopId:_}=u;return C.useEffect(()=>{if(s)return w(),()=>N()},[s,w,N]),e.jsx(qe.ItemSlot,{scope:r,id:c,focusable:s,active:a,children:e.jsx(Q.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...l,ref:n,onMouseDown:Y(t.onMouseDown,g=>{s?u.onItemFocus(c):g.preventDefault()}),onFocus:Y(t.onFocus,()=>u.onItemFocus(c)),onKeyDown:Y(t.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const k=ca(g,u.orientation,u.dir);if(k!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let h=b().filter(m=>m.focusable).map(m=>m.ref.current);if(k==="last")h.reverse();else if(k==="prev"||k==="next"){k==="prev"&&h.reverse();const m=h.indexOf(g.currentTarget);h=u.loop?da(h,m+1):h.slice(m+1)}setTimeout(()=>An(h))}}),children:typeof o=="function"?o({isCurrentTabStop:f,hasTabStop:_!=null}):o})})});En.displayName=Tn;var ia={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function la(t,n){return n!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function ca(t,n,r){const s=la(t.key,r);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return ia[s]}function An(t,n=!1){const r=document.activeElement;for(const s of t)if(s===r||(s.focus({preventScroll:n}),document.activeElement!==r))return}function da(t,n){return t.map((r,s)=>t[(n+s)%t.length])}var ua=Cn,pa=En,Fe="Tabs",[ma]=ve(Fe,[jn]),Pn=jn(),[fa,nt]=ma(Fe),Rn=C.forwardRef((t,n)=>{const{__scopeTabs:r,value:s,onValueChange:a,defaultValue:i,orientation:o="horizontal",dir:l,activationMode:d="automatic",...c}=t,u=Sn(l),[f,b]=Ae({prop:s,onChange:a,defaultProp:i??"",caller:Fe});return e.jsx(fa,{scope:r,baseId:kn(),value:f,onValueChange:b,orientation:o,dir:u,activationMode:d,children:e.jsx(Q.div,{dir:u,"data-orientation":o,...c,ref:n})})});Rn.displayName=Fe;var Fn="TabsList",Dn=C.forwardRef((t,n)=>{const{__scopeTabs:r,loop:s=!0,...a}=t,i=nt(Fn,r),o=Pn(r);return e.jsx(ua,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:s,children:e.jsx(Q.div,{role:"tablist","aria-orientation":i.orientation,...a,ref:n})})});Dn.displayName=Fn;var Ln="TabsTrigger",In=C.forwardRef((t,n)=>{const{__scopeTabs:r,value:s,disabled:a=!1,...i}=t,o=nt(Ln,r),l=Pn(r),d=$n(o.baseId,s),c=zn(o.baseId,s),u=s===o.value;return e.jsx(pa,{asChild:!0,...l,focusable:!a,active:u,children:e.jsx(Q.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:d,...i,ref:n,onMouseDown:Y(t.onMouseDown,f=>{!a&&f.button===0&&f.ctrlKey===!1?o.onValueChange(s):f.preventDefault()}),onKeyDown:Y(t.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(s)}),onFocus:Y(t.onFocus,()=>{const f=o.activationMode!=="manual";!u&&!a&&f&&o.onValueChange(s)})})})});In.displayName=Ln;var Mn="TabsContent",On=C.forwardRef((t,n)=>{const{__scopeTabs:r,value:s,forceMount:a,children:i,...o}=t,l=nt(Mn,r),d=$n(l.baseId,s),c=zn(l.baseId,s),u=s===l.value,f=C.useRef(u);return C.useEffect(()=>{const b=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(b)},[]),e.jsx(Xe,{present:a||u,children:({present:b})=>e.jsx(Q.div,{"data-state":u?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":d,hidden:!b,id:c,tabIndex:0,...o,ref:n,style:{...t.style,animationDuration:f.current?"0s":void 0},children:b&&i})})});On.displayName=Mn;function $n(t,n){return`${t}-trigger-${n}`}function zn(t,n){return`${t}-content-${n}`}var ha=Rn,va=Dn,ga=In,xa=On;const ba=ha,ya=p.forwardRef(function({className:n,...r},s){return e.jsx(va,{ref:s,className:j("vx-tabs__list",n),...r})}),wa=p.forwardRef(function({className:n,...r},s){return e.jsx(ga,{ref:s,className:j("vx-tabs__trigger",n),...r})}),_a=p.forwardRef(function({className:n,...r},s){return e.jsx(xa,{ref:s,className:j("vx-tabs__content",n),...r})});function ka({as:t="p",variant:n="default",size:r="base",weight:s="normal",truncate:a=!1,className:i,...o}){return e.jsx(t,{className:j("vx-text-component",`vx-text--${n}`,`vx-text-size--${r}`,`vx-text-weight--${s}`,a&&"vx-text--truncate",i),...o})}function Sa({as:t,level:n=2,variant:r="default",weight:s="bold",truncate:a=!1,className:i,...o}){const l=t||`h${n}`;return e.jsx(l,{className:j("vx-heading",`vx-heading--h${n}`,`vx-heading--${r}`,`vx-heading-weight--${s}`,a&&"vx-text--truncate",i),...o})}function De(){const{isPhone:t,screenWidth:n,aspectRatio:r}=Ee();return!!(t||r>0&&r<Nt&&n<=Ye)}function Na(t){const{isOpen:n,open:r,close:s}=mn(t),[a,i]=p.useState("hidden"),o=p.useRef(!1);p.useEffect(()=>{n?(o.current=!1,i("visible")):o.current||(o.current=!0,i("exiting"))},[n]),p.useEffect(()=>{if(a==="exiting"){const c=setTimeout(()=>{i("hidden"),o.current=!1},280);return()=>clearTimeout(c)}},[a]);const l=a!=="hidden",d=p.useCallback(()=>{s()},[s]);return{isVisible:l,phase:a,open:r,close:d,isOpen:n}}function ja({side:t,phase:n,title:r,description:s,children:a,header:i,footer:o,className:l,showClose:d=!0,showConfirm:c=!1,confirmText:u="确认",confirmDisabled:f=!1,onConfirm:b,onClose:w,closeOnOverlayClick:N=!0,action:_=!1,width:g}){const k=p.useRef(null),v=p.useId(),h=p.useId(),m=n!=="hidden";if(vn(m),hn(k,{active:n==="visible"}),p.useEffect(()=>{if(n!=="visible")return;const y=S=>{S.key==="Escape"&&w()};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[n,w]),!m)return null;const x=t==="left"||t==="right";return oe.createPortal(e.jsx("div",{className:j("vx-sheet__overlay",n==="exiting"&&"vx-sheet__overlay--exiting"),onClick:N?w:void 0,children:e.jsxs("div",{ref:k,role:"dialog","aria-modal":"true","aria-labelledby":r?v:void 0,"aria-describedby":s?h:void 0,tabIndex:-1,className:j("vx-sheet",`vx-sheet--${t}`,n==="exiting"&&"vx-sheet--exiting",_&&"vx-sheet--action",l),onClick:y=>y.stopPropagation(),style:x&&g?{width:g}:void 0,children:[!_&&d&&e.jsx("button",{type:"button",className:"vx-sheet__close",onClick:w,"aria-label":"Close",children:e.jsx(le,{size:16})}),i,!i&&(r||s)&&e.jsx("div",{className:"vx-sheet__header",children:e.jsxs("div",{children:[r&&e.jsx("h2",{id:v,className:"vx-sheet__title",children:r}),s&&e.jsx("p",{id:h,className:"vx-sheet__description",children:s})]})}),e.jsx("div",{className:j("vx-sheet__body",_&&"vx-sheet__body--action"),children:a}),o,!_&&c&&e.jsx("div",{className:"vx-sheet__footer",children:e.jsx("button",{type:"button",className:"vx-sheet__confirm",disabled:f,onClick:()=>{b==null||b(),w()},children:u})})]})}),document.body)}function Ca({icon:t,destructive:n,className:r,children:s,...a}){return e.jsxs("button",{type:"button",className:j("vxm-actionsheet-item",n&&"vxm-actionsheet-item--destructive",r),...a,children:[t&&e.jsx("span",{className:"vxm-actionsheet-item__icon",children:t}),s]})}function Ta(t){return t!=null&&typeof t=="object"&&"type"in t&&"props"in t}function Ea(t,n){const{onClick:r,...s}=t.props;return{...t,props:{...s,...n,onClick:i=>{typeof r=="function"&&r(i),typeof n.onClick=="function"&&n.onClick(i)}}}}function Aa({trigger:t,onOpen:n}){return Ta(t)?Ea(t,{onClick:n}):e.jsx("button",{type:"button",onClick:n,children:t})}function ue({trigger:t,title:n,description:r,side:s="right",variant:a="default",children:i,header:o,footer:l,className:d,open:c,defaultOpen:u,onOpenChange:f,showClose:b=!0,closeOnOverlayClick:w=!0,showConfirm:N=!1,confirmText:_="确认",confirmDisabled:g=!1,onConfirm:k,width:v}){const{phase:h,open:m,close:x}=Na({open:c,defaultOpen:u,onOpenChange:f});return e.jsxs(e.Fragment,{children:[t?e.jsx(Aa,{trigger:t,onOpen:m}):null,e.jsx(ja,{side:s,phase:h,title:n,description:r,header:o,footer:l,className:d,showClose:a==="action"?!1:b,closeOnOverlayClick:w,showConfirm:N,confirmText:_,confirmDisabled:g,onConfirm:k,onClose:x,action:a==="action",width:v,children:i})]})}ue.Item=Ca;function Pa({options:t,value:n,defaultValue:r,onChange:s,placeholder:a="Select...",searchPlaceholder:i="Search...",label:o,hint:l,error:d,disabled:c,clearable:u=!1,emptyText:f="No results",searchable:b=!0,className:w,mobileSheet:N}){const _=n!==void 0,[g,k]=p.useState(r),v=_?n:g,[h,m]=p.useState(!1),[x,y]=p.useState(""),S=p.useRef(null),P=p.useRef(null),E=p.useRef(null),R=p.useRef(null),T=p.useId(),A=De(),[$,D]=p.useState(null),I=p.useRef(null),O=t.find(z=>z.value===v),H=t.filter(z=>z.label.toLowerCase().includes(x.toLowerCase())),U=typeof b=="number"?t.length>b:b;p.useEffect(()=>{if(!h){y("");return}if(U){const F=setTimeout(()=>{var M;return(M=R.current)==null?void 0:M.focus()},A?350:0);return()=>clearTimeout(F)}},[h,U,A]),p.useEffect(()=>{if(!h||A)return;const z=M=>{var V,G;const B=(V=S.current)==null?void 0:V.contains(M.target),L=(G=E.current)==null?void 0:G.contains(M.target);!B&&!L&&m(!1)},F=M=>{M.key==="Escape"&&(M.preventDefault(),m(!1))};return document.addEventListener("mousedown",z),document.addEventListener("touchstart",z,{passive:!0}),document.addEventListener("keydown",F),()=>{document.removeEventListener("mousedown",z),document.removeEventListener("touchstart",z),document.removeEventListener("keydown",F)}},[h,A]),p.useEffect(()=>{ce(S.current)},[h]),p.useEffect(()=>{if(!h||!$)return;const z=I.current;if(z)return z.dataset.hasOpenPortal="1",()=>{delete z.dataset.hasOpenPortal}},[h,$]),p.useLayoutEffect(()=>{const{dialogContent:z,shouldInline:F}=ce(S.current);if(!h||!P.current||F||A){D(null),I.current=null;return}I.current=z;const M=P.current.getBoundingClientRect(),B=window.innerHeight-M.bottom,L=M.top,V=B<280&&L>B?"up":"down";D(V==="down"?{top:M.bottom+4,left:M.left,width:M.width,direction:V}:{bottom:window.innerHeight-M.top+4,left:M.left,width:M.width,direction:V})},[h,A]),p.useEffect(()=>{if(!h||!$)return;const z=F=>{var M;(M=E.current)!=null&&M.contains(F.target)||m(!1)};return window.addEventListener("scroll",z,{capture:!0,passive:!0}),window.addEventListener("resize",z),()=>{window.removeEventListener("scroll",z,{capture:!0}),window.removeEventListener("resize",z)}},[h,$]);const W=z=>{z.disabled||(_||k(z.value),s==null||s(z.value),m(!1))},K=z=>{z.stopPropagation(),_||k(void 0),s==null||s(void 0)},[X,q]=p.useState(v);p.useEffect(()=>{h&&A&&q(v)},[h,A,v]);const ee=z=>{z.disabled||q(z.value)},Z=()=>{_||k(X),s==null||s(X)},re=e.jsxs(e.Fragment,{children:[U&&e.jsx("div",{className:"vx-select__search-wrap",children:e.jsx("input",{ref:R,type:"text",className:"vx-select__search",placeholder:i,value:x,onChange:z=>y(z.target.value),"aria-label":i})}),e.jsx("ul",{id:T,className:"vx-select__list",role:"listbox","aria-label":o??"Options",children:H.length===0?e.jsx("li",{className:"vx-select__empty",children:f}):H.map(z=>e.jsxs("li",{className:j("vx-select__option",z.value===X&&"vx-select__option--selected",z.disabled&&"vx-select__option--disabled"),role:"option","aria-selected":z.value===X,"aria-disabled":z.disabled,onClick:()=>ee(z),children:[e.jsx("span",{children:z.label}),z.value===X?e.jsx(he,{size:14}):null]},z.value))})]});return e.jsxs("div",{ref:S,className:j("vx-select",h&&"vx-select--open",w),children:[o?e.jsx("span",{className:"vx-field-group__label",children:o}):null,e.jsxs("button",{ref:P,type:"button",className:j("vx-select__trigger",d&&"vx-select__trigger--invalid",c&&"vx-select__trigger--disabled"),onClick:()=>!c&&m(z=>!z),disabled:c,"aria-haspopup":"listbox","aria-expanded":h,"aria-controls":T,children:[e.jsx("span",{className:j("vx-select__value",!O&&"vx-select__value--placeholder"),children:(O==null?void 0:O.label)??a}),e.jsxs("span",{className:"vx-select__icons",children:[u&&O&&e.jsx("span",{className:"vx-select__clear",onClick:K,role:"button","aria-label":"Clear selection",children:e.jsx(le,{size:14})}),e.jsx(xe,{size:14,className:j("vx-select__chevron",h&&"vx-select__chevron--open")})]})]}),d?e.jsx("span",{className:"vx-field-group__error",children:d}):null,!d&&l?e.jsx("span",{className:"vx-field-group__hint",children:l}):null,h&&!A&&(()=>{const z=!!$,F=$?{top:$.top,bottom:$.bottom,left:$.left,width:$.width,pointerEvents:"auto"}:void 0,M=e.jsxs("div",{ref:E,className:j("vx-select__dropdown",($==null?void 0:$.direction)==="up"&&"vx-select__dropdown--up",!!I.current&&"vx-select__dropdown--in-dialog"),style:F,children:[U&&e.jsx("div",{className:"vx-select__search-wrap",children:e.jsx("input",{ref:R,type:"text",className:"vx-select__search",placeholder:i,value:x,onChange:B=>y(B.target.value),"aria-label":i})}),e.jsx("ul",{id:T,className:"vx-select__list",role:"listbox","aria-label":o??"Options",children:H.length===0?e.jsx("li",{className:"vx-select__empty",children:f}):H.map(B=>e.jsxs("li",{className:j("vx-select__option",B.value===v&&"vx-select__option--selected",B.disabled&&"vx-select__option--disabled"),role:"option","aria-selected":B.value===v,"aria-disabled":B.disabled,onClick:()=>W(B),children:[e.jsx("span",{children:B.label}),B.value===v?e.jsx(he,{size:14}):null]},B.value))})]});return z?oe.createPortal(M,I.current??document.body):M})(),A&&(N!==void 0?N:e.jsx(ue,{side:"bottom",open:h,onOpenChange:z=>{z||m(!1)},title:o||a,showConfirm:!0,confirmDisabled:X===void 0,onConfirm:Z,children:re}))]})}function Ra({className:t,label:n,description:r,indeterminate:s,...a}){return e.jsxs("label",{className:j("vx-checkbox",a.disabled&&"vx-checkbox--disabled"),children:[e.jsxs("span",{className:"vx-checkbox__control-wrap",children:[e.jsx("input",{type:"checkbox",className:j("vx-checkbox__input",t),ref:i=>{i&&(i.indeterminate=s??!1)},...a}),e.jsx("span",{className:"vx-checkbox__box","aria-hidden":"true",children:s?e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:e.jsx("path",{d:"M2 5h6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}):e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:e.jsx("path",{d:"M2 5l2.5 2.5L8 3",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),n?e.jsxs("span",{className:"vx-checkbox__copy",children:[e.jsx("span",{className:"vx-checkbox__label",children:n}),r?e.jsx("span",{className:"vx-checkbox__description",children:r}):null]}):null]})}function Fa({options:t,value:n,defaultValue:r,onChange:s,className:a,fullWidth:i,size:o="md"}){var g;const[l,d]=p.useState(r??((g=t[0])==null?void 0:g.value)),c=n!==void 0,u=c?n:l,[f,b]=p.useState({left:0,width:0,opacity:0}),w=p.useRef(null),N=p.useRef({});p.useEffect(()=>{requestAnimationFrame(()=>{const k=N.current[u];k&&b({left:k.offsetLeft,width:k.offsetWidth,opacity:1})})},[u,t,i,o]);const _=k=>{c||d(k),s==null||s(k)};return e.jsxs("div",{ref:w,className:j("vx-segmented-control",`vx-segmented-control--${o}`,i&&"vx-segmented-control--full",a),children:[e.jsx("div",{className:"vx-segmented-control__slider",style:{transform:`translateX(${f.left}px)`,width:`${f.width}px`,opacity:f.opacity}}),t.map(k=>{const v=u===k.value;return e.jsx("button",{ref:h=>{N.current[k.value]=h},type:"button",role:"radio","aria-checked":v,disabled:k.disabled,onClick:()=>!k.disabled&&_(k.value),className:j("vx-segmented-control__item",v&&"vx-segmented-control__item--active"),children:k.label},k.value)})]})}function Da({className:t,label:n,description:r,...s}){return e.jsxs("label",{className:j("vx-radio",s.disabled&&"vx-radio--disabled"),children:[e.jsxs("span",{className:"vx-radio__control-wrap",children:[e.jsx("input",{type:"radio",className:j("vx-radio__input",t),...s}),e.jsx("span",{className:"vx-radio__circle","aria-hidden":"true",children:e.jsx("span",{className:"vx-radio__dot"})})]}),n?e.jsxs("span",{className:"vx-radio__copy",children:[e.jsx("span",{className:"vx-radio__label",children:n}),r?e.jsx("span",{className:"vx-radio__description",children:r}):null]}):null]})}function La({label:t,children:n,className:r}){return e.jsxs("fieldset",{className:j("vx-radio-group",r),children:[t?e.jsx("legend",{className:"vx-field-group__label",children:t}):null,e.jsx("div",{className:"vx-radio-group__items",children:n})]})}function Ia({className:t,label:n,hint:r,resize:s="vertical",style:a,...i}){return e.jsxs("label",{className:"vx-field-group",children:[n?e.jsx("span",{className:"vx-field-group__label",children:n}):null,e.jsx("textarea",{className:j("vx-textarea",t),style:{resize:s,...a},...i}),r?e.jsx("span",{className:"vx-field-group__hint",children:r}):null]})}function Ma({className:t,label:n,showValue:r=!1,hint:s,value:a,defaultValue:i,...o}){const l=a??i??"";return e.jsxs("label",{className:"vx-field-group",children:[n||r?e.jsxs("span",{className:"vx-slider__header",children:[n?e.jsx("span",{className:"vx-field-group__label vx-slider__label",children:n}):null,r?e.jsx("span",{className:"vx-slider__value",children:l}):null]}):null,e.jsx("input",{type:"range",className:j("vx-slider",t),value:a,defaultValue:i,...o}),s?e.jsx("span",{className:"vx-field-group__hint",children:s}):null]})}const Oa={sm:16,md:24,lg:36};function $a({className:t,size:n="md",label:r="Loading…",...s}){const a=Oa[n];return e.jsx("span",{role:"status","aria-label":r,className:j("vx-spinner",`vx-spinner--${n}`,t),...s,children:e.jsx("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:e.jsx("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:"42 14"})})})}function za({className:t,value:n=0,max:r=100,label:s,showLabel:a=!1,size:i="md",variant:o="default",indeterminate:l=!1,...d}){const c=l?void 0:Math.min(100,Math.max(0,n/r*100));return e.jsxs("div",{className:j("vx-progress-wrap",t),...d,children:[s||a?e.jsxs("div",{className:"vx-progress__header",children:[s?e.jsx("span",{className:"vx-progress__label",children:s}):null,a&&!l?e.jsxs("span",{className:"vx-progress__value",children:[Math.round(c),"%"]}):null]}):null,e.jsx("div",{role:"progressbar","aria-valuenow":l?void 0:n,"aria-valuemin":0,"aria-valuemax":r,"aria-label":s,className:j("vx-progress",`vx-progress--${i}`,`vx-progress--${o}`,l&&"vx-progress--indeterminate"),children:e.jsx("div",{className:"vx-progress__bar",style:l?void 0:{width:`${c}%`}})})]})}const Ba={info:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M8 7v4M8 5.5v.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),success:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M5 8.5l2 2 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),warning:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[e.jsx("path",{d:"M8 2L14.5 13.5H1.5L8 2z",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"}),e.jsx("path",{d:"M8 6.5v3M8 11v.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),danger:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M10 6L6 10M6 6l4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})};function Ha({className:t,variant:n="info",title:r,icon:s,onClose:a,children:i,...o}){return e.jsxs("div",{role:"alert",className:j("vx-alert",`vx-alert--${n}`,t),...o,children:[e.jsx("span",{className:"vx-alert__icon",children:s??Ba[n]}),e.jsxs("div",{className:"vx-alert__body",children:[r?e.jsx("p",{className:"vx-alert__title",children:r}):null,i?e.jsx("div",{className:"vx-alert__content",children:i}):null]}),a?e.jsx("button",{type:"button",className:"vx-alert__close",onClick:a,"aria-label":"关闭",children:e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M1 1l12 12M13 1L1 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}):null]})}function Ua({className:t,width:n,height:r,variant:s="rect",lines:a=1,style:i,...o}){return s==="text"&&a>1?e.jsx("span",{className:j("vx-skeleton-text",t),...o,children:Array.from({length:a}).map((l,d)=>e.jsx("span",{className:"vx-skeleton vx-skeleton--text",style:d===a-1?{width:"70%"}:void 0},d))}):e.jsx("span",{className:j("vx-skeleton",`vx-skeleton--${s}`,t),style:{width:typeof n=="number"?`${n}px`:n,height:typeof r=="number"?`${r}px`:r,...i},...o})}function Ga({content:t,placement:n="top",delay:r=600,children:s,className:a}){const[i,o]=p.useState(!1),l=p.useRef(null),d=p.useCallback(()=>{l.current=setTimeout(()=>o(!0),r)},[r]),c=p.useCallback(()=>{l.current&&clearTimeout(l.current),o(!1)},[]);return p.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]),e.jsxs("span",{className:j("vx-tooltip-wrap",a),onMouseEnter:d,onMouseLeave:c,onFocus:d,onBlur:c,children:[s,i?e.jsx("span",{role:"tooltip",className:j("vx-tooltip",`vx-tooltip--${n}`),children:t}):null]})}function Va({content:t,placement:n="bottom",trigger:r="click",children:s,className:a,open:i,onOpenChange:o}){const[l,d]=p.useState(!1),c=i!==void 0,u=c?i:l,f=p.useRef(null),b=p.useCallback(_=>{c||d(_),o==null||o(_)},[c,o]),w=p.useCallback(()=>b(!u),[u,b]);p.useEffect(()=>{if(!u)return;const _=k=>{k.key==="Escape"&&b(!1)},g=k=>{f.current&&!f.current.contains(k.target)&&b(!1)};return document.addEventListener("keydown",_),document.addEventListener("mousedown",g),()=>{document.removeEventListener("keydown",_),document.removeEventListener("mousedown",g)}},[u,b]);const N=r==="click"?{onClick:w}:{onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1)};return e.jsxs("div",{ref:f,className:j("vx-popover-wrap",a),...N,children:[s,u?e.jsx("div",{className:j("vx-popover",`vx-popover--${n}`),role:"dialog",children:t}):null]})}function Wa({trigger:t,groups:n,items:r,align:s="left",className:a,open:i,onOpenChange:o}){const[l,d]=p.useState(!1),c=i!==void 0,u=c?i:l,f=p.useRef(null),b=p.useRef(null),[w,N]=p.useState(s);p.useLayoutEffect(()=>{u&&N(s)},[u,s]),p.useLayoutEffect(()=>{if(!u||!b.current)return;const v=b.current.getBoundingClientRect();if(v.width===0&&v.height===0)return;const h=8;w==="left"&&v.right>window.innerWidth-h?N("right"):w==="right"&&v.left<h&&N("left")},[u,w]);const _=p.useCallback(v=>{c||d(v),o==null||o(v)},[c,o]),g=p.useCallback(()=>_(!u),[u,_]);p.useEffect(()=>{if(!u)return;const v=m=>{m.key==="Escape"&&_(!1)},h=m=>{f.current&&!f.current.contains(m.target)&&_(!1)};return document.addEventListener("keydown",v),document.addEventListener("mousedown",h),()=>{document.removeEventListener("keydown",v),document.removeEventListener("mousedown",h)}},[u,_]);const k=n??(r?[{items:r}]:[]);return e.jsxs("div",{ref:f,className:j("vx-dropdown",u&&"vx-dropdown--open",a),children:[e.jsx("div",{className:"vx-dropdown__trigger",onClick:g,role:"button",tabIndex:0,onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&g()},children:t}),u?e.jsx("div",{ref:b,className:j("vx-dropdown__menu",`vx-dropdown__menu--${w}`),role:"menu",children:k.map((v,h)=>e.jsxs("div",{className:"vx-dropdown__group",children:[v.label?e.jsx("div",{className:"vx-dropdown__group-label",children:v.label}):null,h>0&&!v.label?e.jsx("div",{className:"vx-dropdown__separator",role:"separator"}):null,v.items.map((m,x)=>e.jsxs("button",{role:"menuitem",disabled:m.disabled,className:j("vx-dropdown__item",m.danger&&"vx-dropdown__item--danger",m.disabled&&"vx-dropdown__item--disabled"),onClick:()=>{var y;m.disabled||((y=m.onClick)==null||y.call(m),_(!1))},children:[m.icon?e.jsx("span",{className:"vx-dropdown__item-icon",children:m.icon}):null,e.jsx("span",{className:"vx-dropdown__item-label",children:m.label}),m.shortcut?e.jsx("kbd",{className:"vx-dropdown__shortcut",children:m.shortcut}):null]},x))]},h))}):null]})}const qa=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4.5 2.5L7.5 6l-3 3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function Ka({items:t,separator:n,className:r}){return e.jsx("nav",{"aria-label":"Breadcrumb",className:j("vx-breadcrumb",r),children:e.jsx("ol",{className:"vx-breadcrumb__list",children:t.map((s,a)=>{const i=a===t.length-1;return e.jsxs("li",{className:"vx-breadcrumb__item",children:[i?e.jsx("span",{className:"vx-breadcrumb__current","aria-current":"page",children:s.label}):s.href?e.jsx("a",{href:s.href,className:"vx-breadcrumb__link",children:s.label}):e.jsx("button",{type:"button",className:"vx-breadcrumb__link",onClick:s.onClick,children:s.label}),i?null:e.jsx("span",{className:"vx-breadcrumb__sep","aria-hidden":"true",children:n??e.jsx(qa,{})})]},a)})})})}function Se(t,n){return Array.from({length:n-t+1},(r,s)=>t+s)}function Ya({page:t,total:n,pageSize:r=10,siblingCount:s=1,onChange:a,className:i}){const o=Math.max(1,Math.ceil(n/r)),l=(()=>{const d=s*2+5;if(o<=d)return Se(1,o);const c=Math.max(t-s,1),u=Math.min(t+s,o),f=c>3,b=u<o-2;return!f&&b?[...Se(1,3+s*2),"…",o]:f&&!b?[1,"…",...Se(o-(2+s*2),o)]:[1,"…",...Se(c,u),"…",o]})();return e.jsxs("nav",{role:"navigation","aria-label":"Pagination",className:j("vx-pagination",i),children:[e.jsx("button",{type:"button",className:"vx-pagination__btn vx-pagination__btn--prev",disabled:t<=1,onClick:()=>a(t-1),"aria-label":"上一页",children:e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M9 11L5 7l4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),l.map((d,c)=>d==="…"?e.jsx("span",{className:"vx-pagination__ellipsis","aria-hidden":"true",children:"…"},`e-${c}`):e.jsx("button",{type:"button","aria-current":d===t?"page":void 0,className:j("vx-pagination__btn",d===t&&"vx-pagination__btn--active"),onClick:()=>a(d),children:d},d)),e.jsx("button",{type:"button",className:"vx-pagination__btn vx-pagination__btn--next",disabled:t>=o,onClick:()=>a(t+1),"aria-label":"下一页",children:e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M5 11l4-4-4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}function Xa({items:t,multiple:n=!1,defaultOpen:r=[],className:s}){const[a,i]=p.useState(new Set(r));function o(l){i(d=>{const c=new Set(n?d:[]);return d.has(l)?c.delete(l):c.add(l),c})}return e.jsx("div",{className:j("vx-accordion",s),children:t.map(l=>{const d=a.has(l.key);return e.jsxs("div",{className:j("vx-accordion__item",d&&"vx-accordion__item--open",l.disabled&&"vx-accordion__item--disabled"),children:[e.jsxs("button",{type:"button",disabled:l.disabled,"aria-expanded":d,className:"vx-accordion__trigger",onClick:()=>!l.disabled&&o(l.key),children:[e.jsx("span",{className:"vx-accordion__title",children:l.title}),e.jsx("span",{className:"vx-accordion__chevron","aria-hidden":"true",children:e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:e.jsx("path",{d:"M3 5l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),d?e.jsx("div",{className:"vx-accordion__content",children:l.content}):null]},l.key)})})}function Za({className:t,orientation:n="horizontal",decorative:r=!0,...s}){return e.jsx("hr",{role:r?"none":"separator","aria-orientation":r?void 0:n,className:j("vx-separator",`vx-separator--${n}`,t),...s})}function Qa(t){const n=t.trim().split(/\s+/);return n.length===1?n[0].slice(0,2).toUpperCase():(n[0][0]+n[n.length-1][0]).toUpperCase()}const ut=[0,30,60,120,160,200,240,270,300,340];function Ja(t){let n=0;for(let r=0;r<t.length;r++)n+=t.charCodeAt(r);return ut[n%ut.length]}function eo({src:t,name:n,size:r="md",shape:s="circle",fallback:a,className:i,alt:o,...l}){const[d,c]=p.useState(!1),u=t&&!d,f=n??o??"",b=f?Ja(f):200;return e.jsx("span",{className:j("vx-avatar",`vx-avatar--${r}`,`vx-avatar--${s}`,i),"aria-label":f||void 0,style:u?void 0:{"--vx-avatar-hue":b},children:u?e.jsx("img",{src:t,alt:o??n??"",className:"vx-avatar__img",onError:()=>c(!0),...l}):a?e.jsx("span",{className:"vx-avatar__fallback",children:a}):f?e.jsx("span",{className:"vx-avatar__initials",children:Qa(f)}):e.jsxs("svg",{className:"vx-avatar__placeholder",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"8",r:"4",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M4 20c0-4 3.58-7 8-7s8 3 8 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})})}function to({columns:t,data:n,size:r="md",striped:s=!1,hoverable:a=!0,bordered:i=!1,compact:o=!1,stickyHeader:l=!1,borderless:d=!1,headless:c=!1,rounded:u=!0,loading:f=!1,caption:b,emptyText:w="暂无数据",sortColumn:N,sortDirection:_,onSortChange:g,className:k,...v}){const h=o?"sm":r,[m,x]=p.useState(null),[y,S]=p.useState(null),P=N!==void 0,E=P?N:m,R=P?_??null:y,T=p.useCallback(A=>{let $;E!==A?$="asc":R==="asc"?$="desc":R==="desc"?$=null:$="asc",P||(x($===null?null:A),S($)),g==null||g(A,$)},[E,R,P,g]);return e.jsx("div",{className:j("vx-table-wrap",d&&"vx-table-wrap--borderless",!u&&"vx-table-wrap--square",k),...v,children:e.jsxs("table",{className:j("vx-table",s&&"vx-table--striped",a&&"vx-table--hoverable",i&&"vx-table--bordered",d&&"vx-table--borderless",h!=="md"&&`vx-table--${h}`,l&&"vx-table--sticky"),children:[b?e.jsx("caption",{className:"vx-table__caption",children:b}):null,c?null:e.jsx("thead",{children:e.jsx("tr",{children:t.map(A=>e.jsx("th",{className:j("vx-table__th",A.sortable&&"vx-table__th--sortable",A.align&&`vx-table__th--${A.align}`,A.className),style:{width:A.width},onClick:A.sortable?()=>T(A.key):void 0,"aria-sort":E===A.key?R==="asc"?"ascending":R==="desc"?"descending":"none":void 0,children:e.jsxs("span",{className:"vx-table__th-inner",children:[A.header,A.sortable?e.jsx("span",{className:"vx-table__sort-icon","aria-hidden":"true",children:E===A.key&&R==="asc"?"↑":E===A.key&&R==="desc"?"↓":"↕"}):null]})},A.key))})}),e.jsx("tbody",{className:j(f&&"vx-table__body--loading"),children:n.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:t.length,className:"vx-table__empty",children:w})}):n.map((A,$)=>e.jsx("tr",{className:"vx-table__row",children:t.map(D=>e.jsx("td",{className:j("vx-table__td",D.align&&`vx-table__td--${D.align}`,D.className),children:D.accessor(A)},D.key))},$))})]})})}function no({topBar:t,bottomNav:n,children:r,className:s}){return e.jsxs("div",{className:j("vxm-shell",s),children:[t&&e.jsx("div",{className:"vxm-shell__topbar",children:t}),e.jsx("main",{className:"vxm-shell__main",children:r}),n&&e.jsx("div",{className:"vxm-shell__bottomnav",children:n})]})}function ro({title:t,leading:n,trailing:r,className:s}){return e.jsxs("div",{className:j("vxm-topbar",s),children:[e.jsx("div",{className:"vxm-topbar__leading",children:n}),e.jsx("div",{className:"vxm-topbar__title",children:t}),e.jsx("div",{className:"vxm-topbar__trailing",children:r})]})}function so({label:t,className:n,children:r,...s}){return e.jsx("button",{type:"button",className:j("vxm-icon-btn",n),"aria-label":t,...s,children:r})}function ao({items:t,className:n}){const[r,s]=p.useState(null),a=r?t.find(o=>o.key===r):null,i=o=>{var l,d;(l=o.submenu)!=null&&l.length?s(c=>c===o.key?null:o.key):(s(null),(d=o.onSelect)==null||d.call(o))};return e.jsxs("div",{className:"vxm-bottomnav-wrap",children:[r&&(a==null?void 0:a.submenu)&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"vxm-bottomnav__scrim",onClick:()=>s(null),"aria-hidden":"true"}),e.jsx("div",{className:"vxm-bottomnav__submenu",role:"menu",children:a.submenu.map(o=>e.jsxs("button",{type:"button",role:"menuitem",className:"vxm-bottomnav__submenu-item",onClick:()=>{var l;(l=o.onSelect)==null||l.call(o),s(null)},children:[o.icon&&e.jsx("span",{className:"vxm-bottomnav__submenu-icon",children:o.icon}),e.jsx("span",{children:o.label})]},o.key))})]}),e.jsx("nav",{className:j("vxm-bottomnav",n),"aria-label":"底部导航",children:t.map(o=>{var l,d,c;return e.jsxs("button",{type:"button",className:j("vxm-bottomnav__item",o.active&&"vxm-bottomnav__item--active",!!((l=o.submenu)!=null&&l.length&&r===o.key)&&"vxm-bottomnav__item--submenu-open"),onClick:()=>i(o),"aria-current":o.active?"page":void 0,"aria-expanded":(d=o.submenu)!=null&&d.length?r===o.key:void 0,"aria-haspopup":(c=o.submenu)!=null&&c.length?"menu":void 0,children:[e.jsxs("span",{className:"vxm-bottomnav__icon",children:[o.icon,o.badge!=null&&e.jsx("span",{className:"vxm-bottomnav__badge","aria-label":`${o.badge} 条未读`,children:o.badge})]}),e.jsx("span",{className:"vxm-bottomnav__label",children:o.label})]},o.key)})})]})}function oo({className:t,...n}){return e.jsx("ul",{className:j("vxm-list",t),role:"list",...n})}function io({title:t,className:n,children:r,...s}){return e.jsxs("div",{className:j("vxm-list-section",n),...s,children:[t&&e.jsx("div",{className:"vxm-list-section__title",children:t}),r]})}function lo({leading:t,trailing:n,label:r,description:s,chevron:a,destructive:i,disabled:o,onClick:l,className:d}){const c=e.jsxs(e.Fragment,{children:[t&&e.jsx("span",{className:"vxm-list-item__leading",children:t}),e.jsxs("span",{className:"vxm-list-item__content",children:[e.jsx("span",{className:"vxm-list-item__label",children:r}),s&&e.jsx("span",{className:"vxm-list-item__description",children:s})]}),n&&e.jsx("span",{className:"vxm-list-item__trailing",children:n}),a&&e.jsx(be,{size:16,className:"vxm-list-item__chevron","aria-hidden":"true"})]});return e.jsx("li",{className:j("vxm-list-item",i&&"vxm-list-item--destructive",o&&"vxm-list-item--disabled",!l&&"vxm-list-item--static",d),children:e.jsx("button",{type:"button",className:"vxm-list-item__btn",onClick:o?void 0:l,disabled:o,tabIndex:l?0:-1,children:c})})}const co=p.forwardRef(function({className:n,required:r,children:s,...a},i){return e.jsxs("label",{ref:i,className:j("vx-label",n),...a,children:[s,r?e.jsx("span",{className:"vx-label__required","aria-hidden":"true",children:" *"}):null]})}),Bn=p.createContext({});function Hn(){return p.useContext(Bn)}function uo({className:t,...n}){return e.jsx("form",{noValidate:!0,className:j("vx-form",t),...n})}function po({error:t,children:n,className:r}){return e.jsx(Bn.Provider,{value:{error:t},children:e.jsx("div",{className:j("vx-form-field",t&&"vx-form-field--invalid",r),children:n})})}function mo({className:t,required:n,children:r,...s}){return e.jsxs("label",{className:j("vx-form-label",t),...s,children:[r,n?e.jsx("span",{className:"vx-form-label__required","aria-hidden":"true",children:" *"}):null]})}function fo({className:t,children:n,...r}){return e.jsx("p",{className:j("vx-form-description",t),...r,children:n})}function ho({className:t,children:n,...r}){const{error:s}=Hn(),a=s??n;return a?e.jsx("p",{className:j("vx-form-message",s&&"vx-form-message--error",t),...r,children:a}):null}function vo({className:t,label:n,hint:r,error:s,value:a,onChange:i,min:o,max:l,step:d=1,disabled:c,...u}){const f=p.useCallback(k=>{let v=k;return o!==void 0&&(v=Math.max(o,v)),l!==void 0&&(v=Math.min(l,v)),v},[o,l]),b=()=>{c||i==null||i(f((a??0)+d))},w=()=>{c||i==null||i(f((a??0)-d))},N=k=>{const v=parseFloat(k.target.value);isNaN(v)||i==null||i(f(v))},_=o!==void 0&&(a??0)<=o,g=l!==void 0&&(a??0)>=l;return e.jsxs("label",{className:"vx-field-group",children:[n?e.jsx("span",{className:"vx-field-group__label",children:n}):null,e.jsxs("span",{className:j("vx-number-input",s&&"vx-number-input--invalid",c&&"vx-number-input--disabled",t),children:[e.jsx("button",{type:"button",className:"vx-number-input__btn",onClick:w,disabled:c||_,"aria-label":"Decrease",tabIndex:-1,children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M2 6h8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),e.jsx("input",{type:"number",className:"vx-number-input__field",value:a??"",onChange:N,min:o,max:l,step:d,disabled:c,"aria-invalid":s?"true":void 0,...u}),e.jsx("button",{type:"button",className:"vx-number-input__btn",onClick:b,disabled:c||g,"aria-label":"Increase",tabIndex:-1,children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M6 2v8M2 6h8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),s?e.jsx("span",{className:"vx-field-group__error",children:s}):null,!s&&r?e.jsx("span",{className:"vx-field-group__hint",children:r}):null]})}function go(t,n){return new Date(t,n+1,0).getDate()}function xo(t,n){return new Date(t,n,1).getDay()}function pt(t,n){return t.getFullYear()===n.getFullYear()&&t.getMonth()===n.getMonth()&&t.getDate()===n.getDate()}function Ke({value:t,defaultValue:n,onChange:r,min:s,max:a,className:i,weekStartsOnMonday:o=!1}){const l=new Date,d=t!==void 0,[c,u]=p.useState(n),f=d?t:c,[b,w]=p.useState((f??l).getFullYear()),[N,_]=p.useState((f??l).getMonth()),g=go(b,N),k=xo(b,N),v=o?k===0?6:k-1:k,h=o?["Mo","Tu","We","Th","Fr","Sa","Su"]:["Su","Mo","Tu","We","Th","Fr","Sa"],m=()=>{N===0?(w(R=>R-1),_(11)):_(R=>R-1)},x=()=>{N===11?(w(R=>R+1),_(0)):_(R=>R+1)},y=p.useCallback(R=>{const T=new Date(b,N,R);if(s){const A=new Date(s.getFullYear(),s.getMonth(),s.getDate());if(T<A)return!0}if(a){const A=new Date(a.getFullYear(),a.getMonth(),a.getDate());if(T>A)return!0}return!1},[b,N,s,a]),S=R=>{if(y(R))return;const T=new Date(b,N,R);d||u(T),r==null||r(T)},P=new Date(b,N).toLocaleString("default",{month:"long"}),E=[...Array(v).fill(null),...Array.from({length:g},(R,T)=>T+1)];for(;E.length%7!==0;)E.push(null);return e.jsxs("div",{className:j("vx-calendar",i),children:[e.jsxs("div",{className:"vx-calendar__header",children:[e.jsx("button",{type:"button",className:"vx-calendar__nav-btn",onClick:m,"aria-label":"Previous month",children:e.jsx(Qt,{size:16})}),e.jsxs("span",{className:"vx-calendar__month-label",children:[P," ",b]}),e.jsx("button",{type:"button",className:"vx-calendar__nav-btn",onClick:x,"aria-label":"Next month",children:e.jsx(be,{size:16})})]}),e.jsxs("div",{className:"vx-calendar__grid",role:"grid","aria-label":`${P} ${b}`,children:[h.map(R=>e.jsx("div",{className:"vx-calendar__weekday",role:"columnheader",children:R},R)),E.map((R,T)=>{if(R===null)return e.jsx("div",{className:"vx-calendar__cell vx-calendar__cell--empty"},`e-${T}`);const A=new Date(b,N,R),$=pt(A,l),D=f?pt(A,f):!1,I=y(R);return e.jsx("button",{type:"button",role:"gridcell",className:j("vx-calendar__cell",$&&"vx-calendar__cell--today",D&&"vx-calendar__cell--selected",I&&"vx-calendar__cell--disabled"),onClick:()=>S(R),disabled:I,"aria-label":A.toLocaleDateString(),"aria-selected":D,children:R},R)})]})]})}function bo(t){return t.toLocaleDateString()}function yo(){return e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",children:[e.jsx("rect",{x:"1",y:"3",width:"13",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.2"}),e.jsx("path",{d:"M1 6.5h13",stroke:"currentColor",strokeWidth:"1.2"}),e.jsx("path",{d:"M5 1v3M10 1v3",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]})}function wo({value:t,defaultValue:n,onChange:r,placeholder:s="Select date",label:a,hint:i,error:o,min:l,max:d,disabled:c,weekStartsOnMonday:u,className:f}){const b=t!==void 0,[w,N]=p.useState(n),_=b?t:w,[g,k]=p.useState(!1),v=p.useRef(null),h=p.useRef(null),m=p.useRef(null),x=p.useRef(null),y=De(),[S,P]=p.useState(null);p.useEffect(()=>{if(!g||y)return;const I=H=>{var K,X;const U=(K=v.current)==null?void 0:K.contains(H.target),W=(X=m.current)==null?void 0:X.contains(H.target);!U&&!W&&k(!1)},O=H=>{H.key==="Escape"&&(H.preventDefault(),k(!1))};return document.addEventListener("mousedown",I),document.addEventListener("touchstart",I,{passive:!0}),document.addEventListener("keydown",O),()=>{document.removeEventListener("mousedown",I),document.removeEventListener("touchstart",I),document.removeEventListener("keydown",O)}},[g,y]),p.useEffect(()=>{ce(v.current)},[g]),p.useEffect(()=>{if(!g||!S)return;const I=x.current;if(I)return I.dataset.hasOpenPortal="1",()=>{delete I.dataset.hasOpenPortal}},[g,S]),p.useLayoutEffect(()=>{const{dialogContent:I,shouldInline:O}=ce(v.current);if(!g||!h.current||O||y){P(null),x.current=null;return}x.current=I;const H=h.current.getBoundingClientRect(),U=window.innerHeight-H.bottom,W=H.top,K=U<320&&W>U?"up":"down";P(K==="down"?{top:H.bottom+6,left:H.left,direction:K}:{bottom:window.innerHeight-H.top+6,left:H.left,direction:K})},[g,y]),p.useEffect(()=>{if(!g||!S)return;const I=O=>{var H;(H=m.current)!=null&&H.contains(O.target)||k(!1)};return window.addEventListener("scroll",I,{capture:!0,passive:!0}),window.addEventListener("resize",I),()=>{window.removeEventListener("scroll",I,{capture:!0}),window.removeEventListener("resize",I)}},[g,S]);const E=I=>{b||N(I),r==null||r(I),k(!1)},[R,T]=p.useState(_);p.useEffect(()=>{g&&y&&T(_)},[g,y,_]);const A=I=>{T(I)},$=()=>{b||N(R),r==null||r(R)},D=e.jsx(e.Fragment,{children:e.jsx(Ke,{value:R,onChange:A,min:l,max:d,weekStartsOnMonday:u})});return e.jsxs("div",{ref:v,className:j("vx-datepicker",f),children:[a?e.jsx("span",{className:"vx-field-group__label",children:a}):null,e.jsxs("button",{ref:h,type:"button",className:j("vx-datepicker__trigger",o&&"vx-datepicker__trigger--invalid",c&&"vx-datepicker__trigger--disabled"),onClick:()=>!c&&k(I=>!I),disabled:c,"aria-haspopup":"dialog","aria-expanded":g,children:[e.jsx(yo,{}),e.jsx("span",{className:j("vx-datepicker__value",!_&&"vx-datepicker__value--placeholder"),children:_?bo(_):s})]}),o?e.jsx("span",{className:"vx-field-group__error",children:o}):null,!o&&i?e.jsx("span",{className:"vx-field-group__hint",children:i}):null,g&&!y&&(()=>{const I=!!S,O=S?{position:"fixed",top:S.top,bottom:S.bottom,left:S.left,pointerEvents:"auto"}:void 0,H=e.jsx("div",{ref:m,className:j("vx-datepicker__popover",(S==null?void 0:S.direction)==="up"&&"vx-datepicker__popover--up",!!x.current&&"vx-datepicker__popover--in-dialog"),role:"dialog","aria-label":"Date picker",style:O,children:e.jsx(Ke,{value:_,onChange:E,min:l,max:d,weekStartsOnMonday:u})});return I?oe.createPortal(H,x.current??document.body):H})(),y&&g&&e.jsx(ue,{side:"bottom",open:g,onOpenChange:I=>{I||k(!1)},title:a||"Select date",showConfirm:!0,confirmDisabled:R===void 0,onConfirm:$,children:D})]})}function _o({options:t,value:n,defaultValue:r=[],onChange:s,placeholder:a="Select...",searchPlaceholder:i="Search...",label:o,hint:l,error:d,disabled:c,clearable:u=!1,emptyText:f="No results",maxDisplay:b,className:w}){const N=n!==void 0,[_,g]=p.useState(r),k=N?n:_,[v,h]=p.useState(!1),[m,x]=p.useState(""),y=p.useRef(null),S=p.useRef(null),P=p.useRef(null),E=p.useRef(null),R=p.useId(),T=De(),[A,$]=p.useState(null),D=p.useRef(null),I=t.filter(F=>F.label.toLowerCase().includes(m.toLowerCase()));p.useEffect(()=>{if(!v){x("");return}const M=setTimeout(()=>{var B;return(B=E.current)==null?void 0:B.focus()},T?350:0);return()=>clearTimeout(M)},[v,T]),p.useEffect(()=>{if(!v||T)return;const F=B=>{var G,te;const L=(G=y.current)==null?void 0:G.contains(B.target),V=(te=P.current)==null?void 0:te.contains(B.target);!L&&!V&&h(!1)},M=B=>{B.key==="Escape"&&(B.preventDefault(),h(!1))};return document.addEventListener("mousedown",F),document.addEventListener("touchstart",F,{passive:!0}),document.addEventListener("keydown",M),()=>{document.removeEventListener("mousedown",F),document.removeEventListener("touchstart",F),document.removeEventListener("keydown",M)}},[v,T]),p.useEffect(()=>{ce(y.current)},[v]),p.useEffect(()=>{if(!v||!A)return;const F=D.current;if(F)return F.dataset.hasOpenPortal="1",()=>{delete F.dataset.hasOpenPortal}},[v,A]),p.useLayoutEffect(()=>{const{dialogContent:F,shouldInline:M}=ce(y.current);if(!v||!S.current||M||T){$(null),D.current=null;return}D.current=F;const B=S.current.getBoundingClientRect(),L=window.innerHeight-B.bottom,V=B.top,G=L<300&&V>L?"up":"down";$(G==="down"?{top:B.bottom+4,left:B.left,width:B.width,direction:G}:{bottom:window.innerHeight-B.top+4,left:B.left,width:B.width,direction:G})},[v,T]),p.useEffect(()=>{if(!v||!A)return;const F=M=>{var B;(B=P.current)!=null&&B.contains(M.target)||h(!1)};return window.addEventListener("scroll",F,{capture:!0,passive:!0}),window.addEventListener("resize",F),()=>{window.removeEventListener("scroll",F,{capture:!0}),window.removeEventListener("resize",F)}},[v,A]);const O=F=>{if(F.disabled)return;const M=k.includes(F.value)?k.filter(B=>B!==F.value):[...k,F.value];N||g(M),s==null||s(M),h(!1)},H=(F,M)=>{F.stopPropagation();const B=k.filter(L=>L!==M);N||g(B),s==null||s(B)},U=F=>{F.stopPropagation(),N||g([]),s==null||s([])},W=b?k.slice(0,b):k,K=b?Math.max(0,k.length-b):0,X=t.reduce((F,M)=>(F[M.value]=M.label,F),{}),[q,ee]=p.useState(k);p.useEffect(()=>{v&&T&&ee(k)},[v,T,k]);const Z=F=>{F.disabled||ee(M=>M.includes(F.value)?M.filter(B=>B!==F.value):[...M,F.value])},re=()=>{N||g(q),s==null||s(q)},z=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"vx-multiselect__search-wrap",children:e.jsx("input",{ref:E,type:"text",className:"vx-multiselect__search",placeholder:i,value:m,onChange:F=>x(F.target.value),"aria-label":i})}),e.jsx("ul",{id:R,className:"vx-multiselect__list",role:"listbox","aria-multiselectable":"true","aria-label":o??"Options",children:I.length===0?e.jsx("li",{className:"vx-multiselect__empty",children:f}):I.map(F=>{const M=q.includes(F.value);return e.jsxs("li",{className:j("vx-multiselect__option",M&&"vx-multiselect__option--selected",F.disabled&&"vx-multiselect__option--disabled"),role:"option","aria-selected":M,"aria-disabled":F.disabled,onClick:()=>Z(F),children:[e.jsx("span",{className:j("vx-multiselect__checkbox",M&&"vx-multiselect__checkbox--checked"),children:M?e.jsx(he,{size:11}):null}),e.jsx("span",{children:F.label})]},F.value)})})]});return e.jsxs("div",{ref:y,className:j("vx-multiselect",v&&"vx-multiselect--open",w),children:[o?e.jsx("span",{className:"vx-field-group__label",children:o}):null,e.jsxs("button",{ref:S,type:"button",className:j("vx-multiselect__trigger",d&&"vx-multiselect__trigger--invalid",c&&"vx-multiselect__trigger--disabled"),onClick:()=>!c&&h(F=>!F),disabled:c,"aria-haspopup":"listbox","aria-expanded":v,"aria-controls":R,children:[e.jsx("span",{className:"vx-multiselect__tags",children:k.length===0?e.jsx("span",{className:"vx-multiselect__placeholder",children:a}):e.jsxs(e.Fragment,{children:[W.map(F=>e.jsxs("span",{className:"vx-multiselect__tag",children:[X[F]??F,!c&&e.jsx("span",{className:"vx-multiselect__tag-remove",role:"button","aria-label":`Remove ${X[F]??F}`,onClick:M=>H(M,F),children:e.jsx(le,{size:11})})]},F)),K>0&&e.jsxs("span",{className:"vx-multiselect__overflow",children:["+",K]})]})}),e.jsxs("span",{className:"vx-multiselect__icons",children:[u&&k.length>0&&e.jsx("span",{className:"vx-multiselect__clear",role:"button","aria-label":"Clear all",onClick:U,children:e.jsx(le,{size:14})}),e.jsx(xe,{size:14,className:j("vx-multiselect__chevron",v&&"vx-multiselect__chevron--open")})]})]}),d?e.jsx("span",{className:"vx-field-group__error",children:d}):null,!d&&l?e.jsx("span",{className:"vx-field-group__hint",children:l}):null,v&&!T&&(()=>{const F=!!A,M=F&&A?{top:A.top,bottom:A.bottom,left:A.left,width:A.width,pointerEvents:"auto"}:void 0,B=e.jsxs("div",{ref:P,className:j("vx-multiselect__dropdown",(A==null?void 0:A.direction)==="up"&&"vx-multiselect__dropdown--up",!!D.current&&"vx-multiselect__dropdown--in-dialog"),style:M,children:[e.jsx("div",{className:"vx-multiselect__search-wrap",children:e.jsx("input",{ref:E,type:"text",className:"vx-multiselect__search",placeholder:i,value:m,onChange:L=>x(L.target.value),"aria-label":i})}),e.jsx("ul",{id:R,className:"vx-multiselect__list",role:"listbox","aria-multiselectable":"true","aria-label":o??"Options",children:I.length===0?e.jsx("li",{className:"vx-multiselect__empty",children:f}):I.map(L=>{const V=k.includes(L.value);return e.jsxs("li",{className:j("vx-multiselect__option",V&&"vx-multiselect__option--selected",L.disabled&&"vx-multiselect__option--disabled"),role:"option","aria-selected":V,"aria-disabled":L.disabled,onClick:()=>O(L),children:[e.jsx("span",{className:j("vx-multiselect__checkbox",V&&"vx-multiselect__checkbox--checked"),children:V?e.jsx(he,{size:11}):null}),e.jsx("span",{children:L.label})]},L.value)})})]});return F?oe.createPortal(B,D.current??document.body):B})(),T&&e.jsx(ue,{side:"bottom",open:v,onOpenChange:F=>{F||h(!1)},title:o||a,showConfirm:!0,confirmDisabled:q.length===0,onConfirm:re,children:z})]})}function ae(t){return String(t).padStart(2,"0")}function $e(t){const n=t.split(":").map(Number);return{h:n[0]??0,m:n[1]??0,s:n[2]??0}}function mt(t,n,r,s){return s?`${ae(t)}:${ae(n)}:${ae(r)}`:`${ae(t)}:${ae(n)}`}function ko(){return e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"7.5",cy:"7.5",r:"6",stroke:"currentColor",strokeWidth:"1.2"}),e.jsx("path",{d:"M7.5 4v3.5l2.5 1.5",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function So({size:t=14}){return e.jsx("svg",{width:t,height:t,viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M3 9l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function No({size:t=14}){return e.jsx("svg",{width:t,height:t,viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M3 5l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function me({value:t,min:n,max:r,onChange:s,label:a}){const i=()=>s(t===n?r:t-1),o=()=>s(t===r?n:t+1),l=f=>{f.preventDefault(),f.deltaY>0?o():i()},d=f=>{f.key==="ArrowUp"&&(f.preventDefault(),i()),f.key==="ArrowDown"&&(f.preventDefault(),o())},c=t===n?r:t-1,u=t===r?n:t+1;return e.jsxs("div",{className:"vx-timepicker__col",role:"spinbutton","aria-label":a,"aria-valuenow":t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":ae(t),tabIndex:0,onKeyDown:d,onWheel:l,children:[e.jsx("button",{type:"button",className:"vx-timepicker__col-btn",onClick:i,"aria-label":`Decrease ${a}`,tabIndex:-1,children:e.jsx(So,{size:13})}),e.jsxs("div",{className:"vx-timepicker__col-items",children:[e.jsx("div",{className:"vx-timepicker__col-item vx-timepicker__col-item--adjacent",children:ae(c)}),e.jsx("div",{className:"vx-timepicker__col-item vx-timepicker__col-item--selected",children:ae(t)}),e.jsx("div",{className:"vx-timepicker__col-item vx-timepicker__col-item--adjacent",children:ae(u)})]}),e.jsx("button",{type:"button",className:"vx-timepicker__col-btn",onClick:o,"aria-label":`Increase ${a}`,tabIndex:-1,children:e.jsx(No,{size:13})})]})}function jo({value:t,defaultValue:n,onChange:r,placeholder:s="Select time",label:a,hint:i,error:o,disabled:l,seconds:d=!1,className:c}){const u=t!==void 0,[f,b]=p.useState(n),w=u?t:f,N=w?$e(w):{h:12,m:0,s:0},[_,g]=p.useState(N.h),[k,v]=p.useState(N.m),[h,m]=p.useState(N.s),[x,y]=p.useState(!1),S=p.useRef(null),P=p.useRef(null),E=p.useRef(null),R=p.useRef(null),T=De(),[A,$]=p.useState(null);p.useEffect(()=>{if(t){const L=$e(t);g(L.h),v(L.m),m(L.s)}},[t]),p.useEffect(()=>{if(!x||T)return;const L=G=>{var pe,rt;const te=(pe=S.current)==null?void 0:pe.contains(G.target),Le=(rt=E.current)==null?void 0:rt.contains(G.target);!te&&!Le&&y(!1)},V=G=>{G.key==="Escape"&&(G.preventDefault(),y(!1))};return document.addEventListener("mousedown",L),document.addEventListener("touchstart",L,{passive:!0}),document.addEventListener("keydown",V),()=>{document.removeEventListener("mousedown",L),document.removeEventListener("touchstart",L),document.removeEventListener("keydown",V)}},[x,T]),p.useEffect(()=>{ce(S.current)},[x]),p.useEffect(()=>{if(!x||!A)return;const L=R.current;if(L)return L.dataset.hasOpenPortal="1",()=>{delete L.dataset.hasOpenPortal}},[x,A]),p.useLayoutEffect(()=>{const{dialogContent:L,shouldInline:V}=ce(S.current);if(!x||!P.current||V||T){$(null),R.current=null;return}R.current=L;const G=P.current.getBoundingClientRect(),te=window.innerHeight-G.bottom,Le=G.top,pe=te<220&&Le>te?"up":"down";$(pe==="down"?{top:G.bottom+4,left:G.left,direction:pe}:{bottom:window.innerHeight-G.top+4,left:G.left,direction:pe})},[x,T]),p.useEffect(()=>{if(!x||!A)return;const L=V=>{var G;(G=E.current)!=null&&G.contains(V.target)||y(!1)};return window.addEventListener("scroll",L,{capture:!0,passive:!0}),window.addEventListener("resize",L),()=>{window.removeEventListener("scroll",L,{capture:!0}),window.removeEventListener("resize",L)}},[x,A]);const D=p.useCallback((L,V,G)=>{const te=mt(L,V,G,d);u||b(te),r==null||r(te)},[u,d,r]),I=L=>{g(L),D(L,k,h)},O=L=>{v(L),D(_,L,h)},H=L=>{m(L),D(_,k,L)},U=w??(x?mt(_,k,h,d):void 0),[W,K]=p.useState(N.h),[X,q]=p.useState(N.m),[ee,Z]=p.useState(N.s);p.useEffect(()=>{if(x&&T){const L=w?$e(w):{h:12,m:0,s:0};K(L.h),q(L.m),Z(L.s)}},[x,T,w]);const re=L=>K(L),z=L=>q(L),F=L=>Z(L),M=()=>{D(W,X,ee)},B=e.jsx(e.Fragment,{children:e.jsxs("div",{className:"vx-timepicker__columns",children:[e.jsx(me,{value:W,min:0,max:23,onChange:re,label:"Hours"}),e.jsx("span",{className:"vx-timepicker__sep",children:":"}),e.jsx(me,{value:X,min:0,max:59,onChange:z,label:"Minutes"}),d&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"vx-timepicker__sep",children:":"}),e.jsx(me,{value:ee,min:0,max:59,onChange:F,label:"Seconds"})]})]})});return e.jsxs("div",{ref:S,className:j("vx-timepicker",c),children:[a?e.jsx("span",{className:"vx-field-group__label",children:a}):null,e.jsxs("button",{ref:P,type:"button",className:j("vx-timepicker__trigger",o&&"vx-timepicker__trigger--invalid",l&&"vx-timepicker__trigger--disabled"),onClick:()=>!l&&y(L=>!L),disabled:l,"aria-haspopup":"dialog","aria-expanded":x,children:[e.jsx(ko,{}),e.jsx("span",{className:j("vx-timepicker__value",!U&&"vx-timepicker__value--placeholder"),children:U??s})]}),o?e.jsx("span",{className:"vx-field-group__error",children:o}):null,!o&&i?e.jsx("span",{className:"vx-field-group__hint",children:i}):null,x&&!T&&(()=>{const L=!!A,V=A?{position:"fixed",top:A.top,bottom:A.bottom,left:A.left,pointerEvents:"auto"}:void 0,G=e.jsxs("div",{ref:E,className:j("vx-timepicker__popover",(A==null?void 0:A.direction)==="up"&&"vx-timepicker__popover--up",!!R.current&&"vx-timepicker__popover--in-dialog"),role:"dialog","aria-label":"Time picker",style:V,children:[e.jsxs("div",{className:"vx-timepicker__columns",children:[e.jsx(me,{value:_,min:0,max:23,onChange:I,label:"Hours"}),e.jsx("span",{className:"vx-timepicker__sep",children:":"}),e.jsx(me,{value:k,min:0,max:59,onChange:O,label:"Minutes"}),d&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"vx-timepicker__sep",children:":"}),e.jsx(me,{value:h,min:0,max:59,onChange:H,label:"Seconds"})]})]}),e.jsx("div",{className:"vx-timepicker__footer",children:e.jsx("button",{type:"button",className:"vx-timepicker__done",onClick:()=>{w||D(_,k,h),y(!1)},children:"Done"})})]});return L?oe.createPortal(G,R.current??document.body):G})(),T&&x&&e.jsx(ue,{side:"bottom",open:x,onOpenChange:L=>{L||y(!1)},title:a||"Select time",showConfirm:!0,onConfirm:M,children:B})]})}function Co({label:t,hint:n,error:r,accept:s,multiple:a=!1,maxSize:i,disabled:o,onFiles:l,className:d}){const[c,u]=p.useState(!1),[f,b]=p.useState([]),[w,N]=p.useState(),_=p.useRef(null),g=p.useCallback(x=>{if(!x)return;const y=Array.from(x);if(i&&y.filter(R=>R.size>i).length>0){N(`File too large (max ${(i/1024/1024).toFixed(1)} MB)`);return}N(void 0);const S=y.map(E=>({file:E,id:crypto.randomUUID()})),P=a?[...f,...S]:S;b(P),l==null||l(P.map(E=>E.file))},[f,i,a,l]),k=x=>{x.preventDefault(),u(!1),o||g(x.dataTransfer.files)},v=x=>{x.preventDefault(),o||u(!0)},h=x=>{const y=f.filter(S=>S.id!==x);b(y),l==null||l(y.map(S=>S.file))},m=r??w;return e.jsxs("div",{className:j("vx-file-upload",d),children:[t?e.jsx("span",{className:"vx-field-group__label",children:t}):null,e.jsxs("div",{className:j("vx-file-upload__zone",c&&"vx-file-upload__zone--dragging",o&&"vx-file-upload__zone--disabled",m&&"vx-file-upload__zone--invalid"),onDrop:k,onDragOver:v,onDragLeave:()=>u(!1),onClick:()=>{var x;return!o&&((x=_.current)==null?void 0:x.click())},role:"button",tabIndex:o?-1:0,onKeyDown:x=>{var y;return x.key==="Enter"&&!o&&((y=_.current)==null?void 0:y.click())},"aria-label":"Upload files, click or drag and drop",children:[e.jsx(bs,{size:24,className:"vx-file-upload__icon"}),e.jsxs("p",{className:"vx-file-upload__text",children:[e.jsx("span",{className:"vx-file-upload__link",children:"Click to upload"})," or drag and drop"]}),n?e.jsx("p",{className:"vx-file-upload__hint",children:n}):null,e.jsx("input",{ref:_,type:"file",accept:s,multiple:a,disabled:o,className:"vx-file-upload__input",onChange:x=>g(x.target.files),"aria-hidden":"true",tabIndex:-1})]}),m?e.jsx("span",{className:"vx-field-group__error",children:m}):null,f.length>0&&e.jsx("ul",{className:"vx-file-upload__list",children:f.map(({id:x,file:y})=>e.jsxs("li",{className:"vx-file-upload__file",children:[e.jsx(cs,{size:14,className:"vx-file-upload__file-icon"}),e.jsx("span",{className:"vx-file-upload__file-name",children:y.name}),e.jsxs("span",{className:"vx-file-upload__file-size",children:[(y.size/1024).toFixed(0)," KB"]}),e.jsx("button",{type:"button",className:"vx-file-upload__remove",onClick:()=>h(x),"aria-label":`Remove ${y.name}`,children:e.jsx(le,{size:14})})]},x))})]})}function To({open:t,onClose:n,title:r,description:s,children:a,className:i}){const o=p.useRef(null),l=p.useRef(0),[d,c]=p.useState(!1),[u,f]=p.useState(0),b=p.useRef(0);p.useEffect(()=>{t||(f(0),b.current=0)},[t]),p.useEffect(()=>{if(!t)return;const g=k=>{k.key==="Escape"&&n()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[t,n]),p.useEffect(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[t]);const w=g=>{l.current=g.touches[0].clientY,b.current=0,c(!0)},N=g=>{const k=g.touches[0].clientY-l.current;k<0||(b.current=k,f(k))},_=()=>{c(!1);const g=o.current;if(!g)return;const k=g.offsetHeight*.32;b.current>k?n():f(0)};return t?e.jsx("div",{className:"vxm-actionsheet__overlay",onClick:n,role:"presentation","aria-hidden":"true",children:e.jsxs("div",{ref:o,className:j("vxm-actionsheet",i),style:{transform:`translateY(${u}px)`,transition:d?"none":"transform 280ms cubic-bezier(0.32, 0.72, 0, 1)"},onClick:g=>g.stopPropagation(),onTouchStart:w,onTouchMove:N,onTouchEnd:_,role:"dialog","aria-modal":!0,"aria-label":r??"Action sheet",children:[e.jsx("div",{className:"vxm-actionsheet__handle","aria-hidden":"true"}),(r||s)&&e.jsxs("div",{className:"vxm-actionsheet__header",children:[r&&e.jsx("h3",{className:"vxm-actionsheet__title",children:r}),s&&e.jsx("p",{className:"vxm-actionsheet__description",children:s})]}),e.jsx("div",{className:"vxm-actionsheet__body",children:a})]})}):null}function Eo({icon:t,destructive:n,className:r,children:s,...a}){return e.jsxs("button",{type:"button",className:j("vxm-actionsheet-item",n&&"vxm-actionsheet-item--destructive",r),...a,children:[t&&e.jsx("span",{className:"vxm-actionsheet-item__icon",children:t}),s]})}function Ao({open:t,onClose:n,width:r=280,header:s,footer:a,children:i,className:o}){const l=p.useRef(null),d=p.useRef(0),c=p.useRef(0),[u,f]=p.useState(!1),[b,w]=p.useState(0);p.useEffect(()=>{t||(w(0),c.current=0)},[t]),p.useEffect(()=>{if(!t)return;const h=m=>{m.key==="Escape"&&n()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[t,n]),p.useEffect(()=>(document.body.style.overflow=t?"hidden":"",()=>{document.body.style.overflow=""}),[t]);const N=h=>{d.current=h.touches[0].clientX,c.current=0,f(!0)},_=h=>{const m=h.touches[0].clientX-d.current;m>0||(c.current=m,w(m))},g=()=>{f(!1),Math.abs(c.current)>r*.3?n():w(0)};if(!t)return null;const v=.52*Math.max(0,1+b/r);return e.jsxs("div",{className:"vxm-drawer__overlay",style:{"--vxm-overlay-opacity":v},children:[e.jsx("div",{className:"vxm-drawer__scrim",onClick:n,"aria-hidden":"true"}),e.jsxs("div",{ref:l,className:j("vxm-drawer",o),style:{width:r,transform:`translateX(${b}px)`,transition:u?"none":"transform 280ms cubic-bezier(0.32, 0.72, 0, 1)"},onTouchStart:N,onTouchMove:_,onTouchEnd:g,role:"dialog","aria-modal":!0,"aria-label":"Navigation drawer",children:[s&&e.jsx("div",{className:"vxm-drawer__header",children:s}),e.jsx("div",{className:"vxm-drawer__body",children:i}),a&&e.jsx("div",{className:"vxm-drawer__footer",children:a})]})]})}function Po({icon:t,label:n,badge:r,active:s,onClick:a}){return e.jsxs("button",{type:"button",className:j("vxm-drawer-item",s&&"vxm-drawer-item--active"),onClick:a,"aria-current":s?"page":void 0,children:[t&&e.jsx("span",{className:"vxm-drawer-item__icon",children:t}),e.jsx("span",{className:"vxm-drawer-item__label",children:n}),r!=null&&e.jsx("span",{className:"vxm-drawer-item__badge",children:r})]})}function Ro({title:t,collapsible:n=!1,defaultOpen:r=!0,children:s}){const[a,i]=p.useState(r);return e.jsxs("div",{className:j("vxm-drawer-section",n&&"vxm-drawer-section--collapsible"),children:[t&&(n?e.jsxs("button",{type:"button",className:"vxm-drawer-section__header",onClick:()=>i(o=>!o),"aria-expanded":a,children:[e.jsx("span",{className:"vxm-drawer-section__title",children:t}),e.jsx(xe,{size:14,className:j("vxm-drawer-section__chevron",a&&"vxm-drawer-section__chevron--open")})]}):e.jsx("div",{className:"vxm-drawer-section__title",children:t})),e.jsx("div",{className:j("vxm-drawer-section__items-wrap",!a&&"vxm-drawer-section__items-wrap--closed"),children:e.jsx("div",{className:"vxm-drawer-section__items",children:s})})]})}function Fo({maxHeight:t,maxWidth:n,children:r,className:s,style:a,...i}){return e.jsx("div",{className:j("vx-scroll-area",s),style:{maxHeight:typeof t=="number"?`${t}px`:t,maxWidth:typeof n=="number"?`${n}px`:n,...a},...i,children:e.jsx("div",{className:"vx-scroll-area__viewport",children:r})})}function Do({pressed:t,defaultPressed:n=!1,onPressedChange:r,size:s="md",className:a,children:i,onClick:o,...l}){const[d,c]=p.useState(n),u=t!==void 0,f=u?t:d,b=w=>{u||c(N=>!N),r==null||r(!f),o==null||o(w)};return e.jsx("button",{type:"button","aria-pressed":f,className:j("vx-toggle",`vx-toggle--${s}`,f&&"vx-toggle--on",a),onClick:b,...l,children:i})}function Lo({items:t,value:n,defaultValue:r,onValueChange:s,type:a="single",size:i="md",className:o}){const[l,d]=p.useState(r??(a==="multiple"?[]:"")),c=n!==void 0,u=c?n:l,f=w=>Array.isArray(u)?u.includes(w):u===w,b=w=>{let N;if(a==="multiple"){const _=Array.isArray(u)?u:[];N=_.includes(w)?_.filter(g=>g!==w):[..._,w]}else N=u===w?"":w;c||d(N),s==null||s(N)};return e.jsx("div",{className:j("vx-toggle-group",o),role:"group",children:t.map(w=>e.jsx("button",{type:"button","aria-pressed":f(w.value),disabled:w.disabled,className:j("vx-toggle",`vx-toggle--${i}`,f(w.value)&&"vx-toggle--on","vx-toggle-group__item"),onClick:()=>!w.disabled&&b(w.value),children:w.label},w.value))})}function Io({groups:t,items:n,children:r,className:s}){const[a,i]=p.useState(null),o=p.useRef(null),l=t??(n?[{items:n}]:[]);p.useEffect(()=>{if(!a)return;const c=f=>{o.current&&!o.current.contains(f.target)&&i(null)},u=f=>{f.key==="Escape"&&i(null)};return document.addEventListener("mousedown",c),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("keydown",u)}},[a]);const d=p.useCallback(c=>{c.preventDefault(),i({x:c.clientX,y:c.clientY})},[]);return e.jsxs("div",{className:j("vx-context-menu-wrap",s),onContextMenu:d,children:[r,a&&e.jsx("div",{ref:o,className:"vx-dropdown__menu vx-context-menu",style:{position:"fixed",top:a.y,left:a.x},role:"menu",children:l.map((c,u)=>e.jsxs("div",{className:"vx-dropdown__group",children:[u>0&&e.jsx("div",{className:"vx-dropdown__separator"}),c.label&&e.jsx("div",{className:"vx-dropdown__group-label",children:c.label}),c.items.map((f,b)=>e.jsxs("button",{type:"button",role:"menuitem",disabled:f.disabled,className:j("vx-dropdown__item",f.danger&&"vx-dropdown__item--danger",f.disabled&&"vx-dropdown__item--disabled"),onClick:()=>{var w;(w=f.onClick)==null||w.call(f),i(null)},children:[f.icon&&e.jsx("span",{className:"vx-dropdown__item-icon",children:f.icon}),e.jsx("span",{className:"vx-dropdown__item-label",children:f.label}),f.shortcut&&e.jsx("span",{className:"vx-dropdown__shortcut",children:f.shortcut})]},b))]},u))})]})}function Mo({content:t,placement:n="bottom",delay:r=400,children:s,className:a}){const[i,o]=p.useState(!1),l=p.useRef(null),d=p.useCallback(()=>{l.current=setTimeout(()=>o(!0),r)},[r]),c=p.useCallback(()=>{l.current&&clearTimeout(l.current),o(!1)},[]);return e.jsxs("span",{className:j("vx-hovercard-wrap",a),onMouseEnter:d,onMouseLeave:c,onFocus:d,onBlur:c,children:[s,i&&e.jsx("div",{className:j("vx-hovercard",`vx-hovercard--${n}`),children:t})]})}function Oo({menus:t,className:n}){const[r,s]=p.useState(null),a=p.useRef(null);return p.useEffect(()=>{if(r===null)return;const i=l=>{a.current&&!a.current.contains(l.target)&&s(null)},o=l=>{l.key==="Escape"&&s(null)};return document.addEventListener("mousedown",i),document.addEventListener("keydown",o),()=>{document.removeEventListener("mousedown",i),document.removeEventListener("keydown",o)}},[r]),e.jsx("div",{ref:a,className:j("vx-menubar",n),role:"menubar",children:t.map((i,o)=>{const l=i.groups??(i.items?[{items:i.items}]:[]),d=r===o;return e.jsxs("div",{className:"vx-menubar__item-wrap",children:[e.jsx("button",{type:"button",role:"menuitem",className:j("vx-menubar__trigger",d&&"vx-menubar__trigger--open"),disabled:i.disabled,"aria-haspopup":"menu","aria-expanded":d,onClick:()=>s(d?null:o),onMouseEnter:()=>{r!==null&&s(o)},children:i.label}),d&&e.jsx("div",{className:"vx-dropdown__menu",role:"menu",children:l.map((c,u)=>e.jsxs("div",{className:"vx-dropdown__group",children:[u>0&&e.jsx("div",{className:"vx-dropdown__separator"}),c.label&&e.jsx("div",{className:"vx-dropdown__group-label",children:c.label}),c.items.map((f,b)=>e.jsxs("button",{type:"button",role:"menuitem",disabled:f.disabled,className:j("vx-dropdown__item",f.danger&&"vx-dropdown__item--danger",f.disabled&&"vx-dropdown__item--disabled"),onClick:()=>{var w;(w=f.onClick)==null||w.call(f),s(null)},children:[f.icon&&e.jsx("span",{className:"vx-dropdown__item-icon",children:f.icon}),e.jsx("span",{className:"vx-dropdown__item-label",children:f.label}),f.shortcut&&e.jsx("span",{className:"vx-dropdown__shortcut",children:f.shortcut})]},b))]},u))})]},o)})})}function $o({items:t,className:n}){const[r,s]=p.useState(null),a=p.useRef(null);return p.useEffect(()=>{if(r===null)return;const i=l=>{a.current&&!a.current.contains(l.target)&&s(null)},o=l=>{l.key==="Escape"&&s(null)};return document.addEventListener("mousedown",i),document.addEventListener("keydown",o),()=>{document.removeEventListener("mousedown",i),document.removeEventListener("keydown",o)}},[r]),e.jsx("nav",{ref:a,className:j("vx-nav-menu",n),"aria-label":"Main navigation",children:e.jsx("ul",{className:"vx-nav-menu__list",role:"list",children:t.map((i,o)=>{const l=i.items&&i.items.length>0,d=r===o;return e.jsxs("li",{className:"vx-nav-menu__item-wrap",children:[l?e.jsxs("button",{type:"button",className:j("vx-nav-menu__link",i.active&&"vx-nav-menu__link--active",d&&"vx-nav-menu__link--open"),"aria-haspopup":"true","aria-expanded":d,onClick:()=>s(d?null:o),children:[i.label,e.jsx(xe,{size:14,className:j("vx-nav-menu__chevron",d&&"vx-nav-menu__chevron--open")})]}):e.jsx("a",{href:i.href??"#",className:j("vx-nav-menu__link",i.active&&"vx-nav-menu__link--active"),onClick:i.onClick,children:i.label}),l&&d&&e.jsx("div",{className:"vx-nav-menu__dropdown",children:i.items.map((c,u)=>e.jsxs("a",{href:c.href??"#",className:"vx-nav-menu__sub-item",onClick:()=>{var f;(f=c.onClick)==null||f.call(c),s(null)},children:[c.icon&&e.jsx("span",{className:"vx-nav-menu__sub-icon",children:c.icon}),e.jsxs("span",{children:[e.jsx("span",{className:"vx-nav-menu__sub-label",children:c.label}),c.description&&e.jsx("span",{className:"vx-nav-menu__sub-desc",children:c.description})]})]},u))})]},o)})})})}function zo({steps:t,currentStep:n=0,orientation:r="horizontal",className:s}){return e.jsx("ol",{className:j("vx-stepper",`vx-stepper--${r}`,s),"aria-label":"Steps",children:t.map((a,i)=>{const o=a.status??(i<n?"completed":i===n?"active":"pending");return e.jsxs("li",{className:j("vx-stepper__step",`vx-stepper__step--${o}`),children:[e.jsx("div",{className:"vx-stepper__indicator","aria-hidden":"true",children:o==="completed"?e.jsx(he,{size:14}):e.jsx("span",{children:i+1})}),e.jsxs("div",{className:"vx-stepper__content",children:[e.jsx("span",{className:"vx-stepper__label",children:a.label}),a.description&&e.jsx("span",{className:"vx-stepper__description",children:a.description})]}),i<t.length-1&&e.jsx("div",{className:"vx-stepper__connector","aria-hidden":"true"})]},i)})})}function Bo({items:t,className:n}){return e.jsx("ol",{className:j("vx-timeline",n),"aria-label":"Timeline",children:t.map((r,s)=>e.jsxs("li",{className:j("vx-timeline__item",r.status&&`vx-timeline__item--${r.status}`),children:[e.jsx("div",{className:"vx-timeline__dot","aria-hidden":"true",children:r.icon??null}),e.jsxs("div",{className:"vx-timeline__body",children:[e.jsxs("div",{className:"vx-timeline__header",children:[e.jsx("span",{className:"vx-timeline__title",children:r.title}),r.time&&e.jsx("span",{className:"vx-timeline__time",children:r.time})]}),r.description&&e.jsx("p",{className:"vx-timeline__description",children:r.description})]})]},s))})}function Ho({icon:t,title:n,description:r,action:s,className:a}){return e.jsxs("div",{className:j("vx-empty-state",a),role:"status","aria-live":"polite",children:[t&&e.jsx("div",{className:"vx-empty-state__icon","aria-hidden":"true",children:t}),e.jsx("p",{className:"vx-empty-state__title",children:n}),r&&e.jsx("p",{className:"vx-empty-state__description",children:r}),s&&e.jsx("div",{className:"vx-empty-state__action",children:s})]})}function Uo({items:t,defaultIndex:n=0,index:r,onIndexChange:s,autoPlay:a=!1,interval:i=3e3,loop:o=!0,showDots:l=!0,showArrows:d=!0,className:c}){const u=r!==void 0,[f,b]=p.useState(n),w=u?r:f,N=t.length,_=p.useRef(null),g=p.useCallback(h=>{let m=h;o?m=(h%N+N)%N:m=Math.max(0,Math.min(h,N-1)),u||b(m),s==null||s(m)},[u,o,s,N]);p.useEffect(()=>{if(a)return _.current=setInterval(()=>g(w+1),i),()=>{_.current&&clearInterval(_.current)}},[a,w,g,i]);const k=()=>g(w-1),v=()=>g(w+1);return N===0?null:e.jsxs("div",{className:j("vx-carousel",c),role:"region","aria-roledescription":"carousel","aria-label":"Carousel",children:[e.jsx("div",{className:"vx-carousel__track-wrap",children:e.jsx("div",{className:"vx-carousel__track",style:{transform:`translateX(-${w*100}%)`},children:t.map((h,m)=>e.jsx("div",{className:"vx-carousel__slide",role:"group","aria-roledescription":"slide","aria-label":`Slide ${m+1} of ${N}`,"aria-hidden":m!==w,children:h},m))})}),d&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"vx-carousel__arrow vx-carousel__arrow--prev",onClick:k,disabled:!o&&w===0,"aria-label":"Previous slide",children:e.jsx(Qt,{size:20})}),e.jsx("button",{type:"button",className:"vx-carousel__arrow vx-carousel__arrow--next",onClick:v,disabled:!o&&w===N-1,"aria-label":"Next slide",children:e.jsx(be,{size:20})})]}),l&&e.jsx("div",{className:"vx-carousel__dots",role:"tablist","aria-label":"Slides",children:t.map((h,m)=>e.jsx("button",{type:"button",role:"tab",className:j("vx-carousel__dot",m===w&&"vx-carousel__dot--active"),onClick:()=>g(m),"aria-selected":m===w,"aria-label":`Go to slide ${m+1}`},m))})]})}function Go({filled:t,half:n}){return e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:n?e.jsxs(e.Fragment,{children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:"vx-star-half",children:[e.jsx("stop",{offset:"50%",stopColor:"currentColor"}),e.jsx("stop",{offset:"50%",stopColor:"none",stopOpacity:"0"})]})}),e.jsx("path",{d:"M10 1.5l2.39 4.84 5.34.78-3.87 3.77.91 5.32L10 13.77l-4.77 2.44.91-5.32L2.27 7.12l5.34-.78L10 1.5z",fill:"url(#vx-star-half)",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})]}):e.jsx("path",{d:"M10 1.5l2.39 4.84 5.34.78-3.87 3.77.91 5.32L10 13.77l-4.77 2.44.91-5.32L2.27 7.12l5.34-.78L10 1.5z",fill:t?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})})}function Vo({value:t,defaultValue:n=0,onChange:r,max:s=5,allowHalf:a=!1,disabled:i,readOnly:o,label:l,className:d,size:c="md"}){const u=t!==void 0,[f,b]=p.useState(n),w=u?t:f,[N,_]=p.useState(null),g=N??w,k=(m,x)=>{if(!a)return m;const y=x.currentTarget.getBoundingClientRect();return x.clientX-y.left<y.width/2?m-.5:m},v=(m,x)=>{if(i||o)return;const y=k(m,x);u||b(y),r==null||r(y)},h=(m,x)=>{i||o||_(k(m,x))};return e.jsx("div",{className:j("vx-rating",`vx-rating--${c}`,i&&"vx-rating--disabled",d),role:"group","aria-label":l??"Rating",children:Array.from({length:s},(m,x)=>{const y=x+1,S=g>=y,P=!S&&g>=y-.5;return e.jsx("button",{type:"button",className:j("vx-rating__star",(S||P)&&"vx-rating__star--active"),onClick:E=>v(y,E),onMouseMove:E=>h(y,E),onMouseLeave:()=>_(null),disabled:i,"aria-label":`${y} star${y!==1?"s":""}`,"aria-pressed":w>=y,tabIndex:o||i?-1:0,children:e.jsx(Go,{filled:S,half:P})},x)})})}function Un({node:t,depth:n,selected:r,expanded:s,onSelect:a,onToggle:i}){const o=t.children&&t.children.length>0,l=s.has(t.id),d=r===t.id,c=u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),t.disabled||a(t.id,t)),u.key==="ArrowRight"&&o&&!l&&(u.preventDefault(),i(t.id)),u.key==="ArrowLeft"&&l&&(u.preventDefault(),i(t.id))};return e.jsxs("li",{role:"treeitem","aria-selected":d,"aria-expanded":o?l:void 0,children:[e.jsxs("div",{className:j("vx-tree__node",d&&"vx-tree__node--selected",t.disabled&&"vx-tree__node--disabled"),style:{paddingLeft:`${8+n*20}px`},onClick:()=>{t.disabled||(a(t.id,t),o&&i(t.id))},onKeyDown:c,tabIndex:t.disabled?-1:0,role:"button","aria-label":typeof t.label=="string"?t.label:void 0,children:[e.jsx("span",{className:j("vx-tree__expand",!o&&"vx-tree__expand--hidden"),children:e.jsx(be,{size:14,className:j("vx-tree__chevron",l&&"vx-tree__chevron--open")})}),t.icon&&e.jsx("span",{className:"vx-tree__icon",children:t.icon}),e.jsx("span",{className:"vx-tree__label",children:t.label})]}),o&&l&&e.jsx("ul",{role:"group",className:"vx-tree__children",children:t.children.map(u=>e.jsx(Un,{node:u,depth:n+1,selected:r,expanded:s,onSelect:a,onToggle:i},u.id))})]})}function Wo({nodes:t,selected:n,defaultSelected:r,onSelect:s,defaultExpanded:a=[],expanded:i,onExpandedChange:o,className:l}){const d=n!==void 0,[c,u]=p.useState(r),f=d?n:c,b=i!==void 0,[w,N]=p.useState(new Set(a)),_=b?new Set(i):w,g=p.useCallback((v,h)=>{d||u(v),s==null||s(v,h)},[d,s]),k=p.useCallback(v=>{const h=new Set(_);h.has(v)?h.delete(v):h.add(v),b||N(h),o==null||o([...h])},[_,b,o]);return e.jsx("ul",{className:j("vx-tree",l),role:"tree","aria-multiselectable":"false",children:t.map(v=>e.jsx(Un,{node:v,depth:0,selected:f,expanded:_,onSelect:g,onToggle:k},v.id))})}function qo({value:t,defaultValue:n=[],onChange:r,label:s,hint:a,error:i,placeholder:o="Add tag...",confirmKeys:l=["Enter",","],maxTags:d,validate:c,disabled:u,className:f,...b}){const w=t!==void 0,[N,_]=p.useState(n),g=w?t:N,[k,v]=p.useState(""),[h,m]=p.useState(),x=p.useRef(null),y=T=>{w||_(T),r==null||r(T)},S=T=>{const A=T.trim();if(A){if(g.includes(A)){m("Tag already exists");return}if(d&&g.length>=d){m(`Max ${d} tags`);return}if(c){const $=c(A);if($===!1){m("Invalid tag");return}if(typeof $=="string"){m($);return}}m(void 0),y([...g,A]),v("")}},P=T=>{y(g.filter((A,$)=>$!==T))},E=T=>{l.includes(T.key)?(T.preventDefault(),S(k)):T.key==="Backspace"&&!k&&g.length>0&&P(g.length-1)},R=i??h;return e.jsxs("div",{className:j("vx-tag-input",f),children:[s?e.jsx("span",{className:"vx-field-group__label",children:s}):null,e.jsxs("div",{className:j("vx-tag-input__wrap",R&&"vx-tag-input__wrap--invalid",u&&"vx-tag-input__wrap--disabled"),onClick:()=>{var T;return(T=x.current)==null?void 0:T.focus()},children:[g.map((T,A)=>e.jsxs("span",{className:"vx-tag-input__tag",children:[T,!u&&e.jsx("button",{type:"button",className:"vx-tag-input__remove",onClick:$=>{$.stopPropagation(),P(A)},"aria-label":`Remove tag ${T}`,children:e.jsx(le,{size:11})})]},A)),e.jsx("input",{ref:x,className:"vx-tag-input__input",value:k,placeholder:g.length===0?o:"",disabled:u,onKeyDown:E,onChange:T=>{v(T.target.value),m(void 0)},onBlur:()=>{k.trim()&&S(k)},"aria-label":s??"Tag input",...b})]}),R?e.jsx("span",{className:"vx-field-group__error",children:R}):null,!R&&a?e.jsx("span",{className:"vx-field-group__hint",children:a}):null]})}function Ko(t){const n=parseInt(t.slice(1,3),16)/255,r=parseInt(t.slice(3,5),16)/255,s=parseInt(t.slice(5,7),16)/255,a=Math.max(n,r,s),i=Math.min(n,r,s),o=(a+i)/2;let l=0,d=0;if(a!==i){const c=a-i;switch(d=c/(o>.5?2-a-i:a+i),a){case n:l=((r-s)/c+(r<s?6:0))/6;break;case r:l=((s-n)/c+2)/6;break;case s:l=((n-r)/c+4)/6;break}}return[Math.round(l*360),Math.round(d*100),Math.round(o*100)]}function fe(t,n,r){const s=t/360,a=n/100,i=r/100,o=(f,b,w)=>{let N=w;return N<0&&(N+=1),N>1&&(N-=1),N<1/6?f+(b-f)*6*N:N<1/2?b:N<2/3?f+(b-f)*(2/3-N)*6:f};let l,d,c;if(a===0)l=d=c=i;else{const f=i<.5?i*(1+a):i+a-i*a,b=2*i-f;l=o(b,f,s+1/3),d=o(b,f,s),c=o(b,f,s-1/3)}const u=f=>Math.round(f*255).toString(16).padStart(2,"0");return`#${u(l)}${u(d)}${u(c)}`}function ft(t){return/^#[0-9a-f]{6}$/i.test(t)}const Yo=["#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899","#64748b","#0f172a","#ffffff","#f8fafc"];function Xo({value:t,defaultValue:n="#3b82f6",onChange:r,label:s,hint:a,error:i,disabled:o,presets:l=Yo,showPresets:d=!0,className:c}){const u=t!==void 0,[f,b]=p.useState(n),w=u?t:f,[N,_]=p.useState(w),[g,k]=p.useState(!1),v=p.useRef(null),h=p.useCallback(()=>typeof window>"u"?!1:window.innerWidth<=1e3&&window.innerHeight>window.innerWidth,[]),[m,x,y]=ft(w)?Ko(w):[0,0,50],S=p.useCallback(T=>{u||b(T),_(T),r==null||r(T)},[u,r]),P=T=>{const A=T.startsWith("#")?T:`#${T}`;_(A),ft(A)&&S(A)},E=e.jsxs("div",{className:j("vx-colorpicker__panel"),role:"dialog","aria-label":"Color picker",children:[e.jsx("div",{className:"vx-colorpicker__section-label",children:"Hue"}),e.jsx("input",{type:"range",className:"vx-colorpicker__hue-slider",min:"0",max:"360",value:m,onChange:T=>S(fe(Number(T.target.value),x,y)),"aria-label":"Hue"}),e.jsx("div",{className:"vx-colorpicker__section-label",children:"Saturation"}),e.jsx("input",{type:"range",className:"vx-colorpicker__sat-slider",min:"0",max:"100",value:x,style:{"--vx-cp-hue":m},onChange:T=>S(fe(m,Number(T.target.value),y)),"aria-label":"Saturation"}),e.jsx("div",{className:"vx-colorpicker__section-label",children:"Lightness"}),e.jsx("input",{type:"range",className:"vx-colorpicker__lit-slider",min:"0",max:"100",value:y,style:{"--vx-cp-hue":m,"--vx-cp-sat":`${x}%`},onChange:T=>S(fe(m,x,Number(T.target.value))),"aria-label":"Lightness"}),d&&e.jsx("div",{className:"vx-colorpicker__presets",children:l.map(T=>e.jsx("button",{type:"button",className:j("vx-colorpicker__preset",w.toLowerCase()===T.toLowerCase()&&"vx-colorpicker__preset--active"),style:{background:T},onClick:()=>S(T),"aria-label":T},T))}),e.jsx("button",{type:"button",className:"vx-colorpicker__close",onClick:()=>k(!1),children:"Done"})]}),R=e.jsxs("div",{className:"vxm-colorpicker__sheet",children:[e.jsx("div",{className:"vx-colorpicker__section-label",children:"Hue"}),e.jsx("input",{type:"range",className:"vx-colorpicker__hue-slider",min:"0",max:"360",value:m,onChange:T=>S(fe(Number(T.target.value),x,y)),"aria-label":"Hue"}),e.jsx("div",{className:"vx-colorpicker__section-label",children:"Saturation"}),e.jsx("input",{type:"range",className:"vx-colorpicker__sat-slider",min:"0",max:"100",value:x,style:{"--vx-cp-hue":m},onChange:T=>S(fe(m,Number(T.target.value),y)),"aria-label":"Saturation"}),e.jsx("div",{className:"vx-colorpicker__section-label",children:"Lightness"}),e.jsx("input",{type:"range",className:"vx-colorpicker__lit-slider",min:"0",max:"100",value:y,style:{"--vx-cp-hue":m,"--vx-cp-sat":`${x}%`},onChange:T=>S(fe(m,x,Number(T.target.value))),"aria-label":"Lightness"}),d&&e.jsx("div",{className:"vx-colorpicker__presets",children:l.map(T=>e.jsx("button",{type:"button",className:j("vx-colorpicker__preset",w.toLowerCase()===T.toLowerCase()&&"vx-colorpicker__preset--active"),style:{background:T},onClick:()=>S(T),"aria-label":T},T))})]});return e.jsxs("div",{ref:v,className:j("vx-colorpicker",c),children:[s?e.jsx("span",{className:"vx-field-group__label",children:s}):null,e.jsxs("div",{className:"vx-colorpicker__row",children:[e.jsx("button",{type:"button",className:j("vx-colorpicker__swatch-btn",o&&"vx-colorpicker__swatch-btn--disabled"),style:{"--vx-cp-color":w},onClick:()=>!o&&k(T=>!T),disabled:o,"aria-label":`Current color: ${w}. Click to open color picker.`,"aria-haspopup":"dialog","aria-expanded":g}),e.jsx("input",{type:"text",className:"vx-colorpicker__hex-input",value:N,onChange:T=>P(T.target.value),disabled:o,"aria-label":"Hex color value",maxLength:7})]}),i?e.jsx("span",{className:"vx-field-group__error",children:i}):null,!i&&a?e.jsx("span",{className:"vx-field-group__hint",children:a}):null,!h()&&g&&E,h()&&e.jsx(ue,{side:"bottom",open:g,onOpenChange:T=>{T||k(!1)},title:"颜色选择器",children:R})]})}function Zo({direction:t="horizontal",children:n,className:r}){return e.jsx("div",{className:j("vx-resizable-group",`vx-resizable-group--${t}`,r),children:n})}function Qo({children:t,defaultSize:n=50,minSize:r=10,maxSize:s=90,className:a,style:i}){return e.jsx("div",{className:j("vx-resizable-panel",a),style:{"--vx-panel-size":`${n}%`,...i},"data-min":r,"data-max":s,children:t})}function Jo({className:t,direction:n="horizontal"}){const r=p.useRef(!1),[s,a]=p.useState(!1),i=p.useCallback(o=>{const l=o.currentTarget,d=l.previousElementSibling,c=l.nextElementSibling;if(!d||!c)return;const u=l.parentElement,f=n==="horizontal",b=f?u.getBoundingClientRect().width:u.getBoundingClientRect().height,w=f?d.getBoundingClientRect().width:d.getBoundingClientRect().height,N=f?c.getBoundingClientRect().width:c.getBoundingClientRect().height,_=S=>"touches"in S?f?S.touches[0].clientX:S.touches[0].clientY:f?S.clientX:S.clientY,g=_(o.nativeEvent);r.current=!0,a(!0);const k=Number(d.dataset.min??10)/100*b,v=Number(d.dataset.max??90)/100*b,h=Number(c.dataset.min??10)/100*b,m=Number(c.dataset.max??90)/100*b,x=S=>{if(!r.current)return;const P=_(S)-g,E=Math.min(Math.max(w+P,k),v),R=Math.min(Math.max(N-P,h),m);d.style.flexBasis=`${E/b*100}%`,c.style.flexBasis=`${R/b*100}%`},y=()=>{r.current=!1,a(!1),document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",y),document.removeEventListener("touchmove",x),document.removeEventListener("touchend",y)};document.addEventListener("mousemove",x),document.addEventListener("mouseup",y),document.addEventListener("touchmove",x,{passive:!1}),document.addEventListener("touchend",y)},[n]);return e.jsx("div",{role:"separator","aria-orientation":n==="horizontal"?"vertical":"horizontal",className:j("vx-resizable-handle",`vx-resizable-handle--${n}`,s&&"vx-resizable-handle--active",t),onMouseDown:i,onTouchStart:i,children:e.jsx("span",{className:"vx-resizable-handle__bar","aria-hidden":"true"})})}function ht(t,n){if(!n)return t;const r=t.toLowerCase().indexOf(n.toLowerCase());return r===-1?t:e.jsxs(e.Fragment,{children:[t.slice(0,r),e.jsx("mark",{className:"vx-cmd__mark",children:t.slice(r,r+n.length)}),t.slice(r+n.length)]})}function ei(t,n){const r=n.toLowerCase(),s=t.title.toLowerCase(),a=t.section.toLowerCase(),i=t.description.toLowerCase(),o=(t.keywords??[]).join(" ").toLowerCase();return s===r?100:s.startsWith(r)?80:s.includes(r)?60:a.includes(r)?40:o.includes(r)?35:i.includes(r)?20:0}function ti({entries:t,open:n,onClose:r,onSelect:s,placeholder:a="Search components, pages, keywords…",ariaLabel:i="Search",emptyText:o=u=>`No results for "${u}"`,labelNavigate:l="Navigate",labelGo:d="Go",labelClose:c="Close"}){const[u,f]=p.useState(""),[b,w]=p.useState(0),N=p.useRef(null),_=p.useRef(null),g=u.trim()?t.map(m=>({entry:m,s:ei(m,u.trim())})).filter(m=>m.s>0).sort((m,x)=>x.s-m.s).map(m=>m.entry):t;p.useEffect(()=>{n&&(f(""),w(0),setTimeout(()=>{var m;return(m=N.current)==null?void 0:m.focus()},30))},[n]),p.useEffect(()=>{w(0)},[u]),p.useEffect(()=>{var x,y;const m=(x=_.current)==null?void 0:x.children[b];(y=m==null?void 0:m.scrollIntoView)==null||y.call(m,{block:"nearest"})},[b]);const k=p.useCallback(m=>{s(m),r()},[s,r]),v=p.useCallback(m=>{m.key==="ArrowDown"?(m.preventDefault(),w(x=>Math.min(x+1,g.length-1))):m.key==="ArrowUp"?(m.preventDefault(),w(x=>Math.max(x-1,0))):m.key==="Enter"?(m.preventDefault(),g[b]&&k(g[b].key)):m.key==="Escape"&&r()},[g,b,k,r]);if(!n)return null;const h=[];for(const m of g){const x=h[h.length-1];x&&x.section===m.section?x.items.push(m):h.push({section:m.section,items:[m]})}return e.jsx("div",{className:"vx-cmd__backdrop",onMouseDown:r,children:e.jsxs("div",{className:"vx-cmd",role:"dialog","aria-modal":"true","aria-label":i,onMouseDown:m=>m.stopPropagation(),children:[e.jsxs("div",{className:"vx-cmd__search",children:[e.jsxs("svg",{className:"vx-cmd__search-icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"6.5",cy:"6.5",r:"5",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M10.5 10.5L14 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),e.jsx("input",{ref:N,className:"vx-cmd__input",type:"text",placeholder:a,value:u,onChange:m=>f(m.target.value),onKeyDown:v,autoComplete:"off",spellCheck:!1}),u?e.jsx("button",{className:"vx-cmd__clear",onClick:()=>f(""),"aria-label":"清除",children:e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M1 1l12 12M13 1L1 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}):e.jsx("kbd",{className:"vx-cmd__esc",children:"esc"})]}),e.jsx("ul",{className:"vx-cmd__list",ref:_,role:"listbox",children:g.length===0?e.jsx("li",{className:"vx-cmd__empty",children:o(u)}):h.map(m=>m.items.map((x,y)=>{const S=g.indexOf(x),P=S===b;return e.jsxs("li",{role:"option","aria-selected":P,className:`vx-cmd__item${P?" vx-cmd__item--active":""}`,onMouseEnter:()=>w(S),onMouseDown:()=>k(x.key),children:[x.icon?e.jsx("span",{className:"vx-cmd__item-icon",children:x.icon}):e.jsx("span",{className:"vx-cmd__item-icon vx-cmd__item-icon--section",children:x.section.slice(0,1)}),e.jsxs("span",{className:"vx-cmd__item-body",children:[e.jsx("span",{className:"vx-cmd__item-title",children:ht(x.title,u)}),e.jsx("span",{className:"vx-cmd__item-sub",children:ht(x.section,u)})]}),P&&e.jsx("kbd",{className:"vx-cmd__enter",children:"↵"})]},x.key)}))}),e.jsxs("div",{className:"vx-cmd__footer",children:[e.jsxs("span",{children:[e.jsx("kbd",{children:"↑↓"})," ",l]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"↵"})," ",d]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"esc"})," ",c]})]})]})})}var vt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ni(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ze={exports:{}},gt;function ri(){return gt||(gt=1,(function(t){var n=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
141
97
|
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
142
98
|
*
|
|
143
99
|
* @license MIT <https://opensource.org/licenses/MIT>
|
|
144
100
|
* @author Lea Verou <https://lea.verou.me>
|
|
145
101
|
* @namespace
|
|
146
102
|
* @public
|
|
147
|
-
*/var r=(function(s){var a=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,l={},i={manual:s.Prism&&s.Prism.manual,disableWorkerMessageHandler:s.Prism&&s.Prism.disableWorkerMessageHandler,util:{encode:function p(m){return m instanceof u?new u(m.type,p(m.content),m.alias):Array.isArray(m)?m.map(p):m.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(p){return Object.prototype.toString.call(p).slice(8,-1)},objId:function(p){return p.__id||Object.defineProperty(p,"__id",{value:++o}),p.__id},clone:function p(m,v){v=v||{};var b,k;switch(i.util.type(m)){case"Object":if(k=i.util.objId(m),v[k])return v[k];b={},v[k]=b;for(var j in m)m.hasOwnProperty(j)&&(b[j]=p(m[j],v));return b;case"Array":return k=i.util.objId(m),v[k]?v[k]:(b=[],v[k]=b,m.forEach(function(T,E){b[E]=p(T,v)}),b);default:return m}},getLanguage:function(p){for(;p;){var m=a.exec(p.className);if(m)return m[1].toLowerCase();p=p.parentElement}return"none"},setLanguage:function(p,m){p.className=p.className.replace(RegExp(a,"gi"),""),p.classList.add("language-"+m)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(b){var p=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(b.stack)||[])[1];if(p){var m=document.getElementsByTagName("script");for(var v in m)if(m[v].src==p)return m[v]}return null}},isActive:function(p,m,v){for(var b="no-"+m;p;){var k=p.classList;if(k.contains(m))return!0;if(k.contains(b))return!1;p=p.parentElement}return!!v}},languages:{plain:l,plaintext:l,text:l,txt:l,extend:function(p,m){var v=i.util.clone(i.languages[p]);for(var b in m)v[b]=m[b];return v},insertBefore:function(p,m,v,b){b=b||i.languages;var k=b[p],j={};for(var T in k)if(k.hasOwnProperty(T)){if(T==m)for(var E in v)v.hasOwnProperty(E)&&(j[E]=v[E]);v.hasOwnProperty(T)||(j[T]=k[T])}var R=b[p];return b[p]=j,i.languages.DFS(i.languages,function(A,D){D===R&&A!=p&&(this[A]=j)}),j},DFS:function p(m,v,b,k){k=k||{};var j=i.util.objId;for(var T in m)if(m.hasOwnProperty(T)){v.call(m,T,m[T],b||T);var E=m[T],R=i.util.type(E);R==="Object"&&!k[j(E)]?(k[j(E)]=!0,p(E,v,null,k)):R==="Array"&&!k[j(E)]&&(k[j(E)]=!0,p(E,v,T,k))}}},plugins:{},highlightAll:function(p,m){i.highlightAllUnder(document,p,m)},highlightAllUnder:function(p,m,v){var b={callback:v,container:p,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",b),b.elements=Array.prototype.slice.apply(b.container.querySelectorAll(b.selector)),i.hooks.run("before-all-elements-highlight",b);for(var k=0,j;j=b.elements[k++];)i.highlightElement(j,m===!0,b.callback)},highlightElement:function(p,m,v){var b=i.util.getLanguage(p),k=i.languages[b];i.util.setLanguage(p,b);var j=p.parentElement;j&&j.nodeName.toLowerCase()==="pre"&&i.util.setLanguage(j,b);var T=p.textContent,E={element:p,language:b,grammar:k,code:T};function R(D){E.highlightedCode=D,i.hooks.run("before-insert",E),E.element.innerHTML=E.highlightedCode,i.hooks.run("after-highlight",E),i.hooks.run("complete",E),v&&v.call(E.element)}if(i.hooks.run("before-sanity-check",E),j=E.element.parentElement,j&&j.nodeName.toLowerCase()==="pre"&&!j.hasAttribute("tabindex")&&j.setAttribute("tabindex","0"),!E.code){i.hooks.run("complete",E),v&&v.call(E.element);return}if(i.hooks.run("before-highlight",E),!E.grammar){R(i.util.encode(E.code));return}if(m&&s.Worker){var A=new Worker(i.filename);A.onmessage=function(D){R(D.data)},A.postMessage(JSON.stringify({language:E.language,code:E.code,immediateClose:!0}))}else R(i.highlight(E.code,E.grammar,E.language))},highlight:function(p,m,v){var b={code:p,grammar:m,language:v};if(i.hooks.run("before-tokenize",b),!b.grammar)throw new Error('The language "'+b.language+'" has no grammar.');return b.tokens=i.tokenize(b.code,b.grammar),i.hooks.run("after-tokenize",b),u.stringify(i.util.encode(b.tokens),b.language)},tokenize:function(p,m){var v=m.rest;if(v){for(var b in v)m[b]=v[b];delete m.rest}var k=new f;return y(k,k.head,p),d(p,k,m,k.head,0),N(k)},hooks:{all:{},add:function(p,m){var v=i.hooks.all;v[p]=v[p]||[],v[p].push(m)},run:function(p,m){var v=i.hooks.all[p];if(!(!v||!v.length))for(var b=0,k;k=v[b++];)k(m)}},Token:u};s.Prism=i;function u(p,m,v,b){this.type=p,this.content=m,this.alias=v,this.length=(b||"").length|0}u.stringify=function p(m,v){if(typeof m=="string")return m;if(Array.isArray(m)){var b="";return m.forEach(function(R){b+=p(R,v)}),b}var k={type:m.type,content:p(m.content,v),tag:"span",classes:["token",m.type],attributes:{},language:v},j=m.alias;j&&(Array.isArray(j)?Array.prototype.push.apply(k.classes,j):k.classes.push(j)),i.hooks.run("wrap",k);var T="";for(var E in k.attributes)T+=" "+E+'="'+(k.attributes[E]||"").replace(/"/g,""")+'"';return"<"+k.tag+' class="'+k.classes.join(" ")+'"'+T+">"+k.content+"</"+k.tag+">"};function c(p,m,v,b){p.lastIndex=m;var k=p.exec(v);if(k&&b&&k[1]){var j=k[1].length;k.index+=j,k[0]=k[0].slice(j)}return k}function d(p,m,v,b,k,j){for(var T in v)if(!(!v.hasOwnProperty(T)||!v[T])){var E=v[T];E=Array.isArray(E)?E:[E];for(var R=0;R<E.length;++R){if(j&&j.cause==T+","+R)return;var A=E[R],D=A.inside,O=!!A.lookbehind,F=!!A.greedy,H=A.alias;if(F&&!A.pattern.global){var U=A.pattern.toString().match(/[imsuy]*$/)[0];A.pattern=RegExp(A.pattern.source,U+"g")}for(var K=A.pattern||A,L=b.next,I=k;L!==m.tail&&!(j&&I>=j.reach);I+=L.value.length,L=L.next){var $=L.value;if(m.length>p.length)return;if(!($ instanceof u)){var P=1,M;if(F){if(M=c(K,I,p,O),!M||M.index>=p.length)break;var Z=M.index,B=M.index+M[0].length,z=I;for(z+=L.value.length;Z>=z;)L=L.next,z+=L.value.length;if(z-=L.value.length,I=z,L.value instanceof u)continue;for(var V=L;V!==m.tail&&(z<B||typeof V.value=="string");V=V.next)P++,z+=V.value.length;P--,$=p.slice(I,z),M.index-=I}else if(M=c(K,0,$,O),!M)continue;var Z=M.index,ae=M[0],Ue=$.slice(0,Z),At=$.slice(Z+ae.length),We=I+$.length;j&&We>j.reach&&(j.reach=We);var ke=L.prev;Ue&&(ke=y(m,ke,Ue),I+=Ue.length),S(m,ke,P);var Ur=new u(T,D?i.tokenize(ae,D):ae,H,ae);if(L=y(m,ke,Ur),At&&y(m,L,At),P>1){var Ge={cause:T+","+R,reach:We};d(p,m,v,L.prev,I,Ge),j&&Ge.reach>j.reach&&(j.reach=Ge.reach)}}}}}}function f(){var p={value:null,prev:null,next:null},m={value:null,prev:p,next:null};p.next=m,this.head=p,this.tail=m,this.length=0}function y(p,m,v){var b=m.next,k={value:v,prev:m,next:b};return m.next=k,b.prev=k,p.length++,k}function S(p,m,v){for(var b=m.next,k=0;k<v&&b!==p.tail;k++)b=b.next;m.next=b,b.prev=m,p.length-=k}function N(p){for(var m=[],v=p.head.next;v!==p.tail;)m.push(v.value),v=v.next;return m}if(!s.document)return s.addEventListener&&(i.disableWorkerMessageHandler||s.addEventListener("message",function(p){var m=JSON.parse(p.data),v=m.language,b=m.code,k=m.immediateClose;s.postMessage(i.highlight(b,i.languages[v],v)),k&&s.close()},!1)),i;var g=i.util.currentScript();g&&(i.filename=g.src,g.hasAttribute("data-manual")&&(i.manual=!0));function h(){i.manual||i.highlightAll()}if(!i.manual){var w=document.readyState;w==="loading"||w==="interactive"&&g&&g.defer?document.addEventListener("DOMContentLoaded",h):window.requestAnimationFrame?window.requestAnimationFrame(h):window.setTimeout(h,16)}return i})(t);e.exports&&(e.exports=r),typeof en<"u"&&(en.Prism=r),r.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",function(s){s.type==="entity"&&(s.attributes.title=s.content.replace(/&/,"&"))}),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(a,o){var l={};l["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:r.languages[o]},l.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:l}};i["language-"+o]={pattern:/[\s\S]+/,inside:r.languages[o]};var u={};u[a]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:i},r.languages.insertBefore("markup","cdata",u)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(s,a){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+s+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[a,"language-"+a],inside:r.languages[a]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,(function(s){var a=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+a.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+a.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+a.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+a.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:a,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var o=s.languages.markup;o&&(o.tag.addInlined("style","css"),o.tag.addAttribute("style","css"))})(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,(function(){if(typeof r>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var s="Loading…",a=function(g,h){return"✖ Error "+g+" while fetching file: "+h},o="✖ Error: File does not exist or is empty",l={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},i="data-src-status",u="loading",c="loaded",d="failed",f="pre[data-src]:not(["+i+'="'+c+'"]):not(['+i+'="'+u+'"])';function y(g,h,w){var p=new XMLHttpRequest;p.open("GET",g,!0),p.onreadystatechange=function(){p.readyState==4&&(p.status<400&&p.responseText?h(p.responseText):p.status>=400?w(a(p.status,p.statusText)):w(o))},p.send(null)}function S(g){var h=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(g||"");if(h){var w=Number(h[1]),p=h[2],m=h[3];return p?m?[w,Number(m)]:[w,void 0]:[w,w]}}r.hooks.add("before-highlightall",function(g){g.selector+=", "+f}),r.hooks.add("before-sanity-check",function(g){var h=g.element;if(h.matches(f)){g.code="",h.setAttribute(i,u);var w=h.appendChild(document.createElement("CODE"));w.textContent=s;var p=h.getAttribute("data-src"),m=g.language;if(m==="none"){var v=(/\.(\w+)$/.exec(p)||[,"none"])[1];m=l[v]||v}r.util.setLanguage(w,m),r.util.setLanguage(h,m);var b=r.plugins.autoloader;b&&b.loadLanguages(m),y(p,function(k){h.setAttribute(i,c);var j=S(h.getAttribute("data-range"));if(j){var T=k.split(/\r\n?|\n/g),E=j[0],R=j[1]==null?T.length:j[1];E<0&&(E+=T.length),E=Math.max(0,Math.min(E-1,T.length)),R<0&&(R+=T.length),R=Math.max(0,Math.min(R,T.length)),k=T.slice(E,R).join(`
|
|
148
|
-
`),h.hasAttribute("data-start")||h.setAttribute("data-start",String(E+1))}w.textContent=k,r.highlightElement(w)},function(k){h.setAttribute(i,d),w.textContent=k})}}),r.plugins.fileHighlight={highlight:function(h){for(var w=(h||document).querySelectorAll(f),p=0,m;m=w[p++];)r.highlightElement(m)}};var N=!1;r.fileHighlight=function(){N||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),N=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(rt)),rt.exports}var nc=tc();const Re=ec(nc);Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,r){var s={};s["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[r]},s.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}};a["language-"+r]={pattern:/[\s\S]+/,inside:Prism.languages[r]};var o={};o[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:a},Prism.languages.insertBefore("markup","cdata",o)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;(function(e){var t=e.util.clone(e.languages.javascript),r=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,s=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,a=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(u,c){return u=u.replace(/<S>/g,function(){return r}).replace(/<BRACES>/g,function(){return s}).replace(/<SPREAD>/g,function(){return a}),RegExp(u,c)}a=o(a).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var l=function(u){return u?typeof u=="string"?u:typeof u.content=="string"?u.content:u.content.map(l).join(""):""},i=function(u){for(var c=[],d=0;d<u.length;d++){var f=u[d],y=!1;if(typeof f!="string"&&(f.type==="tag"&&f.content[0]&&f.content[0].type==="tag"?f.content[0].content[0].content==="</"?c.length>0&&c[c.length-1].tagName===l(f.content[0].content[1])&&c.pop():f.content[f.content.length-1].content==="/>"||c.push({tagName:l(f.content[0].content[1]),openedBraces:0}):c.length>0&&f.type==="punctuation"&&f.content==="{"?c[c.length-1].openedBraces++:c.length>0&&c[c.length-1].openedBraces>0&&f.type==="punctuation"&&f.content==="}"?c[c.length-1].openedBraces--:y=!0),(y||typeof f=="string")&&c.length>0&&c[c.length-1].openedBraces===0){var S=l(f);d<u.length-1&&(typeof u[d+1]=="string"||u[d+1].type==="plain-text")&&(S+=l(u[d+1]),u.splice(d+1,1)),d>0&&(typeof u[d-1]=="string"||u[d-1].type==="plain-text")&&(S=l(u[d-1])+S,u.splice(d-1,1),d--),u[d]=new e.Token("plain-text",S,null,S)}f.content&&typeof f.content!="string"&&i(f.content)}};e.hooks.add("after-tokenize",function(u){u.language!=="jsx"&&u.language!=="tsx"||i(u.tokens)})})(Prism);var nn={},rn;function rc(){return rn||(rn=1,(function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript})(Prism)),nn}rc();(function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var r=e.languages.tsx.tag;r.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+r.pattern.source+")",r.pattern.flags),r.lookbehind=!0})(Prism);(function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},s={bash:r,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:s},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:s},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:s.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:s.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=e.languages.bash;for(var a=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=s.variable[1].inside,l=0;l<a.length;l++)o[a[l]]=e.languages.bash[a[l]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;function sc({code:e,language:t="tsx",copyLabel:r,copiedLabel:s,onCopy:a}){const[o,l]=x.useState(!1),i=x.useRef(null),u=x.useMemo(()=>{const d=Re.languages[t]??Re.languages.tsx??Re.languages.typescript;return d?Re.highlight(e,d,t):e},[e,t]);x.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]);async function c(){await a(e)&&(l(!0),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{l(!1),i.current=null},1600))}return n.jsxs("div",{className:"vx-code-block-wrap","data-language":t,children:[n.jsxs(oe,{type:"button",size:"sm",variant:o?"solid":"secondary",className:o?"vx-code-block__copy vx-code-block__copy--copied":"vx-code-block__copy",onClick:()=>void c(),children:[o?n.jsx(Me,{size:14}):n.jsx(ls,{size:14}),o?s:r]}),n.jsx("pre",{className:"vx-code-block",children:n.jsx("code",{className:`vx-code-block__code language-${t}`,dangerouslySetInnerHTML:{__html:u}})})]})}const ac="1.3.5",oc={version:ac},Ie=`v${oc.version}`,Hr={locale:"en",label:"English",searchPlaceholder:"Search components, pages, keywords…",searchAriaLabel:"Search",searchEmpty:e=>`No results for "${e}"`,searchNavigate:"Navigate",searchGo:"Go",searchClose:"Close",sidebarCollapse:"Collapse",sidebarExpand:"Expand",sidebarCloseLabel:"Close sidebar",searchTrigger:"Search",versionLabel:Ie,mobilePreview:"Mobile Preview",nav:{gettingStarted:"Getting Started",layout:"Layout",components:"Components",feedback:"Feedback",navigation:"Navigation",mobile:"Responsive",templates:"Templates"},pages:{introduction:"Introduction","quick-start":"Quick Start","shell-sidebar":"Shell & Sidebar","grid-page":"Grid & Page",button:"Button",elements:"Elements","form-controls":"Form Controls","form-inputs":"Form Inputs",overlays:"Overlays","data-display":"Data Display",navigation:"Navigation","data-list":"Data List","empty-states":"Empty States",toasts:"Toasts",feedback:"Feedback Components","nav-layout":"Navigation & Layout",mobile:"Mobile Components","command-palette":"Command Palette","code-block":"Code Block","language-switcher":"Language Switcher","home-page":"Home Page","login-page":"Login Page","register-page":"Register Page","error-page":"Error Page","privacy-policy":"Privacy Policy","terms-of-service":"Terms of Service"},docs:{guidance:"Guidance",guidanceDesc:"Keep the implementation tight and let the design system do most of the visual work.",preview:"Preview",previewDesc:"A compact example of how this area should feel inside the system.",notes:"Notes",primaryTheme:"Primary Theme",primaryThemeDesc:"Blue-gray neutrals keep emphasis reserved for actions, not decoration.",tokenScale:"Token Scale",tokenScaleDesc:"Reuse the shared surface, border, and text variables before introducing page-specific styles.",themeStudio:"Theme Studio",themeStudioDesc:"Register named themes once, then switch every component with a single key.",liveControls:"Live Controls",liveControlsDesc:"A few reusable primitives are still available inside the docs surface.",searchDocs:"Search docs",searchDocsPlaceholder:"Buttons, tokens, layout...",compactDensity:"Compact density",compactDensityDesc:"Tighten the vertical rhythm for denser operator views.",systemPreview:"System Preview",openSection:"Open section"},intro:{tagline:"A lightweight, dependency-free UI framework for building clean admin interfaces. Design tokens, components, and a minimal SPA runtime live behind one consistent visual language.",getStarted:"Get Started",browseComponents:"Browse Components",atAGlance:"At a Glance",designTokens:"Design Tokens",designTokensLead:"All colors, spacing, and typography values are exposed as CSS custom properties under the vx namespace. Register named light and dark themes once, then swap the whole framework by theme key.",componentFamilies:"Component Families"},glance:{zeroDeps:"Zero dependencies",zeroDepsHint:"Original shell runtime does not require a build pipeline.",components:"Components",componentsHint:"Layout, form, feedback, and list primitives in one system.",coreCSS:"Core CSS",coreCSSHint:"Neutral tokens and structural styles stay compact.",darkMode:"Dark mode",darkModeHint:"Semantic variables keep the same components reusable."},tokens:{primary:"Primary",primaryDesc:"Accent color for primary actions, active navigation, and emphasis.",surface:"Surface",surfaceDesc:"Default panel and content background for documentation cards and shell regions.",border:"Border",borderDesc:"Light separators that keep the UI structured without adding visual weight.",text:"Text",textDesc:"Primary foreground used for headings, dense data, and body copy."},families:{layout:"Layout",layoutDesc:"App shell, sticky header, section rhythm, and responsive content framing.",elements:"Elements",elementsDesc:"Quiet primitives for actions, metadata, and structured content blocks.",forms:"Forms",formsDesc:"Inputs, switches, dialogs, and field composition patterns.",feedback:"Feedback",feedbackDesc:"Transient toasts and interruptive confirmation flows."},dataList:{name:"Name",kind:"Kind",updated:"Updated"},modeLabel:e=>`${e} mode`,publicPages:{navLogin:"Log in",navSignup:"Sign up",navDocs:"Docs",navLogout:"Log out",heroTag:`New · ${Ie}`,heroTitle:"Lightweight React UI library",heroLead:"Zero dependencies · 30+ components · Built-in theming & dark mode",heroCta:"Get started",heroCtaAlt:"Browse docs",previewLead:"",previewAccessTitle:"Access modes",previewAccessMember:"Sign in to keep a session and return to your workspace.",previewAccessGuest:"Open the docs as a guest when you just need to browse.",previewMobileTitle:"Mobile-ready",previewMobileLead:"Navigation and auth layouts adapt naturally on mobile.",featuresSectionTitle:"Why vxUI",feat1:"Zero dependencies",feat1Desc:"Pure CSS + TypeScript, no peer dependencies.",feat2:"30+ components",feat2Desc:"Layout, form, feedback and list primitives in one system.",feat3:"Themeable",feat3Desc:"CSS variable-driven, swap the whole theme with one key.",feat4:"Dark mode",feat4Desc:"Semantic tokens work across light and dark themes.",footerCopy:"© 2026 vxUI. All rights reserved.",footerPrivacy:"Privacy Policy",footerGithub:"GitHub",footerWebsite:"Website",loginTitle:"Welcome back",loginSubtitle:"Sign in to access the documentation.",loginEmail:"Email",loginEmailPlaceholder:"you@example.com",loginPassword:"Password",loginPasswordPlaceholder:"At least 8 characters",loginCta:"Sign in",loginNoAccount:"Don't have an account?",loginRegister:"Register",loginGuest:"Continue without an account →",rememberMe:"Remember this device",showPassword:"Show",hidePassword:"Hide",authInfoTitle:"Guest access is available",authInfoBody:"You can go straight to the docs without an account. Sign in only if you want a persisted session example.",registerTitle:"Create account",registerSubtitle:"Get started with vxUI today.",registerName:"Full name",registerNamePlaceholder:"Jane Smith",registerEmail:"Email",registerEmailPlaceholder:"jane@company.com",registerPassword:"Password",registerPasswordPlaceholder:"Create a strong password",registerTermsAgree:"I agree to the",registerTermsLink:"Terms of Service",registerTermsAnd:"and",registerPrivacyLink:"Privacy Policy",registerCta:"Create account",registerHasAccount:"Already have an account?",registerLogin:"Sign in",registerGuest:"Continue without an account →",validationNameRequired:"Enter your full name.",validationNameShort:"Use at least 2 characters for your name.",validationEmailRequired:"Enter your email address.",validationEmailInvalid:"Enter a valid email address.",validationPasswordRequired:"Enter your password.",validationPasswordShort:"Use at least 8 characters for the password.",validationTermsRequired:"You must agree to the terms before creating an account.",sessionLoginTitle:"Signed in",sessionLoginBody:"Your session is active. You can now browse the docs as a signed-in user.",sessionRegisterTitle:"Account created",sessionRegisterBody:"Your sample account is ready and the docs are now unlocked.",sessionGuestTitle:"Browsing as guest",sessionGuestBody:"You entered the docs without a saved account session.",sessionLogoutTitle:"Signed out",sessionLogoutBody:"Your persisted session was cleared. You are back on the public site.",signedInAs:"Signed in as",guestLabel:"Guest",backHome:"← Back to home",backToDocs:"Back to docs"},pageDefs:{introduction:{section:"Introduction",title:"Introduction",description:"A lightweight, dependency-free UI framework for building clean admin interfaces. Design tokens, components, and a minimal SPA runtime live behind one consistent visual language.",guidance:["Start from the shell and navigation rhythm before styling isolated controls.","Keep tokens semantic so a theme swap does not require page-specific overrides.","Treat documentation, examples, and production surfaces as the same design system."]},"quick-start":{section:"Installation",title:"Quick Start",description:"Install the package, wrap your app with providers, and mount a page shell before composing business screens.",guidance:["Import the shared stylesheet once near the application root.","Use AppShell for product chrome and keep page content inside the main slot.","Add ThemeProvider and ToastProvider only when the app needs them."]},"shell-sidebar":{section:"Components",title:"Shell & Sidebar",description:"The shell is responsible for sidebar hierarchy, sticky header spacing, and content width. Navigation items support nested sub-menus via the `children` prop — click a parent to expand or collapse its sub-items.",guidance:["Keep navigation labels short so collapsed mode stays scannable.","Use section titles to separate page groups instead of visual noise.","Add `children` to a nav item to make it expandable; set `defaultOpen: true` to start it expanded.","If any child is active, AppShell auto-opens the parent group.",'Customize the sidebar width via the `sidebarWidth` prop (e.g. `sidebarWidth={280}` or `"18rem"`).'],props:[{prop:"brand",type:"string",default:'"VXUI"',description:"Brand / product name shown in the sidebar header."},{prop:"brandCaption",type:"string",description:"Secondary subtitle displayed below the brand name."},{prop:"brandIcon",type:"ReactNode",description:"Logo element (image or icon) rendered in the sidebar header."},{prop:"title",type:"string",description:"Page title shown in the topbar."},{prop:"description",type:"string",description:"Page subtitle / description shown below the topbar title."},{prop:"breadcrumb",type:"ReactNode",description:"Breadcrumb element rendered in the topbar."},{prop:"navSections",type:"AppShellNavSection[]",description:"Structured navigation tree grouped by sections. Preferred over navItems."},{prop:"navItems",type:"AppShellNavItem[]",description:"Flat navigation list. Automatically wrapped in a single unnamed section."},{prop:"sidebarCollapsed",type:"boolean",default:"false",description:"Collapse sidebar to icon-only rail mode."},{prop:"sidebarWidth",type:"number | string",default:"240px",description:'Custom sidebar width. Pass a number for px (e.g. 280) or a CSS string (e.g. "18rem").'},{prop:"density",type:'"comfortable" | "compact"',description:'Layout density. "compact" tightens vertical rhythm for high-density operator UIs.'},{prop:"headerActions",type:"ReactNode",description:"Slot for right-aligned topbar actions (buttons, dropdowns, user menu, etc.)."},{prop:"sidebarFooter",type:"ReactNode",description:"Slot rendered at the bottom of the sidebar (user info, settings link, etc.)."},{prop:"mobileNavOpen",type:"boolean",default:"false",description:"Controls whether the mobile navigation overlay is visible."},{prop:"onSidebarToggle",type:"() => void",description:"Called when the collapse / expand button is clicked."},{prop:"onMobileNavToggle",type:"() => void",description:"Called when the mobile overlay toggle button is clicked. Required to enable mobile nav."},{prop:"children",type:"ReactNode",required:!0,description:"Main page content rendered inside ShellContent."}]},"grid-page":{section:"Components",title:"Grid & Page",description:"Use simple responsive grids for cards, tokens, and documentation blocks. The page surface should stay neutral and let content carry emphasis.",guidance:["Prefer 12 to 16 pixel gaps for dense documentation surfaces.","Reserve larger spacing for section boundaries, not every card.","Keep max width constrained so long paragraphs remain readable."]},button:{section:"Components",title:"Button",description:"Buttons carry the primary action hierarchy for the system. Variants, sizes, and width should communicate intent without requiring extra styling.",guidance:["Use the solid variant for the primary action in a given area.","Use secondary or ghost variants for supporting actions that should stay visually quieter.","Use fullWidth for stacked mobile actions or single-column forms."]},elements:{section:"Components",title:"Elements",description:"Button, Badge, Text, Heading, CodeBlock, and LanguageSwitcher form the atomic foundation of the UI.",guidance:["One primary action per area is usually enough.","Use badges for compact status or category metadata, not decoration.","Cards should organize content without feeling like dashboards by default."]},"form-controls":{section:"Components",title:"Form Controls",description:"A complete set of form primitives: single-line inputs, multi-line textarea, searchable single-select (Select), multi-select with tag display (MultiSelect), and time selection (TimePicker). All share the same label / hint / error layout system.",guidance:["Always pair form controls with visible labels in admin surfaces.","Use Select for single-select with optional search; set `searchable={N}` to show the search input only when options exceed N.","Use MultiSelect when users need to pick several values from a bounded list.","TimePicker supports 24-hour format and an optional seconds column via the `seconds` prop.","Short helper text is better than placeholder-only instruction."]},navigation:{section:"Components",title:"Navigation",description:"Navigation patterns should communicate location first, then available movement. Tabs work best for sibling views within a single page context.",guidance:["Mirror information architecture in the control structure.","Make the active state obvious without relying on color alone.","Avoid mixing route navigation and local view state in one control."]},"data-list":{section:"Components",title:"Data List",description:"Lists and tables should prioritize scanning over ornament. Use generous alignment, light separators, and action density only where needed.",guidance:["Align headers and row content precisely to reduce visual drift.","Use subtle borders instead of heavy card chrome around every row.","Reserve destructive affordances for row action groups, not inline text links."]},"empty-states":{section:"Components",title:"Empty States",description:"An empty state should explain what is missing, why it matters, and what the next action is. It should never feel like a dead end.",guidance:["Name the object that is absent so users know what they are looking at.","Offer one clear recovery action.","Keep the visual weight lighter than success or alert feedback."]},toasts:{section:"Components",title:"Toasts",description:"Toasts confirm short-lived events without interrupting task flow. Keep them brief, specific, and easy to dismiss.",guidance:["Use success and info to confirm background actions.","Escalate blocking or destructive states to dialogs instead of stacking toasts.","Avoid repeating the same message on every page transition."]},feedback:{section:"Components",title:"Feedback Components",description:"Alert, Progress, Skeleton, Spinner, Stepper, and Toast indicate application state without blocking layouts.",guidance:["Use Spinner for short indeterminate waits; Progress for deterministic operations.","Prefer Alert over toast for persistent or page-level status messages.","Skeleton should match the shape of the content it replaces to reduce layout shift."]},overlays:{section:"Components",title:"Overlays",description:"Dialog, AlertDialog, ContextMenu, HoverCard, Tooltip, Popover, and DropdownMenu layer transient content and actions above the page.",guidance:["Tooltips are for supplementary text only — never interactive content.","Popovers can contain forms and rich content; they require explicit close triggers.","DropdownMenus should group related actions and support keyboard navigation."]},"nav-layout":{section:"Components",title:"Navigation & Layout",description:"Tabs, Accordion, Breadcrumb, Menubar, NavigationMenu, ScrollArea, Separator, Resizable, and Sheet structure content hierarchically.",guidance:["Breadcrumb mirrors route depth — omit it on single-level pages.","Pagination should show page count so users understand the data set size.","Accordion works best for progressive disclosure, not primary navigation."]},"data-display":{section:"Components",title:"Data Display",description:"Avatar, Card, Badge, Table, Carousel, Timeline, TreeView, and EmptyState present rich data compactly.",guidance:["Avatar should always have an accessible label, even when showing an image.","Table supports sortable columns — delegate sort state up when the data is server-side.","Use striped rows in dense tables to help eyes track across long rows."]},"form-inputs":{section:"Components",title:"Form Inputs",description:"Select, Checkbox, Radio, Textarea, Switch, Slider, Input, Label, NumberInput, TagInput, ColorPicker, DatePicker, FileUpload, Rating, Toggle, SegmentedControl, and Calendar extend the form vocabulary beyond text inputs.",guidance:["Group radio buttons with RadioGroup to share name and semantics.","Slider is ideal for numeric ranges; pair it with showValue for immediate feedback.","Textarea defaults to vertical resize — disable resize only in fixed-height containers.","Use Switch for immediate state toggles (like settings), and Checkbox for form submissions or multi-selections."]},mobile:{section:"Responsive",title:"Responsive Patterns",description:"A single responsive system for phone, tablet, and desktop. One route tree, one content model, and one set of components adapt through layout instead of duplicate applications.",guidance:["Keep the route tree identical across breakpoints; only the shell and density should change.","Turn persistent side navigation into a drawer on narrow screens instead of forking the page implementation.","Design cards, forms, and tables to reflow from three columns to one without changing component ownership."]},"home-page":{section:"Templates",title:"Home Page",description:"A landing-style home page with a hero section, key feature highlights, and primary call-to-action buttons. Suitable for product sites, internal portals, and marketing pages.",guidance:["Keep the hero message to one compelling sentence — let the CTA do the work.","Feature cards should each solve one problem, not list all capabilities.","Balance a primary action with a softer secondary one to reduce decision fatigue."]},"login-page":{section:"Templates",title:"Login Page",description:"A minimal login form centered on the screen. Collect credentials with clear labels, visible error states, and a single primary action.",guidance:["Never hide the password label — placeholder text alone fails accessibility.","Show inline validation errors as soon as the field loses focus.","Offer a password-visible toggle to reduce login friction."]},"register-page":{section:"Templates",title:"Register Page",description:"A registration form that collects the minimum fields needed to create an account. Reduce friction by asking only what is essential at sign-up.",guidance:["Request only name, email, and password at registration — profile details can come later.","Show password strength inline without blocking submission on minor issues.","The terms-of-service checkbox must be explicit; do not pre-check it."]},"error-page":{section:"Templates",title:"Error Page",description:"A graceful fallback for 404, 500, and other error states. Give users a clear explanation and a direct path back to safety.",guidance:["State the error code and a plain-language explanation — avoid technical jargon.","Always provide a go-home action alongside a go-back option.","Match the error page visual weight to the rest of the product, not a generic OS page."]},"privacy-policy":{section:"Templates",title:"Privacy Policy",description:"A structured legal document page with section headings, readable prose, and clear separators. Designed to remain accessible and scannable without sacrificing completeness.",guidance:["Use headings to break long policy text into scannable sections.","Link directly to the relevant section from any consent flow that references the policy.","Version and date the policy at the top so users know when it was last updated."]},"terms-of-service":{section:"Templates",title:"Terms of Service",description:"A service terms page with clear headings, plain-language obligations, and a layout that stays readable from narrow phones to wide desktop viewports.",guidance:["State the usage permission, limitations, and disclaimer in separate sections to reduce legal ambiguity.","Keep the document scannable with short paragraphs and a compact summary rail.","Link to the terms directly from registration and pricing flows so consent is contextual."]},"command-palette":{section:"Components",title:"Command Palette",description:"A keyboard-driven search overlay that lets users jump to any page or action without leaving the keyboard. Render it globally, wire a hotkey, then pass a flat list of entries.",guidance:["Keep the entries list flat and label-searchable — avoid nesting pages under hidden categories.","Populate entries from the same nav data you use for the sidebar so the two surfaces stay in sync.","Combine with ⌘K (Mac) or Ctrl+K (Windows) for a familiar shortcut that power users expect."]},"code-block":{section:"Components",title:"Code Block",description:"A syntax-highlighted, read-only code display with optional filename label. Use it to render installation snippets, usage examples, or any formatted code string.",guidance:["Set the language prop to the language of the code — tsx, bash, json, etc. — for correct highlighting.","Pass a filename to give readers context on where the snippet belongs in a project.","Keep code snippets minimal; show only the lines needed to illustrate the concept being documented."]},"language-switcher":{section:"Components",title:"Language Switcher",description:"A locale toggle component that updates the entire UI copy when clicked. Drop it into any topbar or settings area — the i18n provider broadcasts the change automatically.",guidance:["Place the switcher in a persistent surface (topbar or settings page) so users can find it from anywhere.","The switcher reflects the current locale; no extra state wiring is needed beyond the i18n provider.","Use the inline variant for topbars and the default variant for settings pages to match visual density."]}}},ic={locale:"zh",label:"中文",searchPlaceholder:"搜索组件、页面、关键词…",searchAriaLabel:"搜索",searchEmpty:e=>`未找到与"${e}"匹配的结果`,searchNavigate:"导航",searchGo:"跳转",searchClose:"关闭",sidebarCollapse:"收起",sidebarExpand:"展开",sidebarCloseLabel:"关闭侧边栏",searchTrigger:"搜索",versionLabel:Ie,mobilePreview:"移动端预览",nav:{gettingStarted:"开始使用",layout:"布局",components:"组件",feedback:"反馈",navigation:"导航",mobile:"响应式",templates:"模板"},pages:{introduction:"简介","quick-start":"快速开始","shell-sidebar":"框架与侧边栏","grid-page":"网格与页面",button:"按钮",elements:"基础元素","form-controls":"表单控件","form-inputs":"表单输入",overlays:"浮层","data-display":"数据展示",navigation:"导航","data-list":"数据列表","empty-states":"空状态",toasts:"消息提示",feedback:"反馈组件","nav-layout":"导航与布局",mobile:"移动端组件","command-palette":"命令面板","code-block":"代码块","language-switcher":"语言切换器","home-page":"主页","login-page":"登录页","register-page":"注册页","error-page":"错误页","privacy-policy":"隐私政策","terms-of-service":"服务条款"},docs:{guidance:"使用指南",guidanceDesc:"保持实现简洁,让设计系统完成大部分视觉工作。",preview:"预览",previewDesc:"该区域在系统中呈现效果的精简示例。",notes:"备注",primaryTheme:"主色调",primaryThemeDesc:"蓝灰色中性调将视觉重点保留给操作,而非装饰。",tokenScale:"Token 体系",tokenScaleDesc:"在引入页面特定样式之前,优先复用共享的 surface、border 和 text 变量。",themeStudio:"主题工作室",themeStudioDesc:"一次注册命名主题,用单个 key 即可切换所有组件。",liveControls:"交互控件",liveControlsDesc:"文档界面中仍有若干可复用的基础原语。",searchDocs:"搜索文档",searchDocsPlaceholder:"按钮、Token、布局…",compactDensity:"紧凑模式",compactDensityDesc:"收紧垂直间距,适合高密度操作界面。",systemPreview:"系统预览",openSection:"打开章节"},intro:{tagline:"一个轻量无依赖的 UI 框架,用于构建简洁的后台管理界面。设计 Token、组件和极简 SPA 运行时,统一在一套一致的视觉语言之下。",getStarted:"开始使用",browseComponents:"浏览组件",atAGlance:"概览",designTokens:"设计 Token",designTokensLead:"所有颜色、间距和字体值均以 vx 命名空间下的 CSS 自定义属性暴露。一次注册命名的亮色和暗色主题,之后通过主题 key 即可切换整个框架。",componentFamilies:"组件系列"},glance:{zeroDeps:"零依赖",zeroDepsHint:"原始 shell 运行时无需构建流水线。",components:"组件数",componentsHint:"布局、表单、反馈和列表原语,一套搞定。",coreCSS:"核心 CSS",coreCSSHint:"中性 Token 和结构样式保持精简。",darkMode:"深色模式",darkModeHint:"语义变量让相同组件可在多主题下复用。"},tokens:{primary:"主色",primaryDesc:"用于主要操作、活跃导航和强调的点缀色。",surface:"表面色",surfaceDesc:"文档卡片和框架区域的默认面板与内容背景色。",border:"边框色",borderDesc:"保持 UI 结构清晰且不增加视觉重量的轻量分隔色。",text:"文字色",textDesc:"用于标题、密集数据和正文的主前景色。"},families:{layout:"布局",layoutDesc:"应用框架、固定顶栏、章节节奏和响应式内容框架。",elements:"基础元素",elementsDesc:"用于操作、元数据和结构化内容块的低调原语。",forms:"表单",formsDesc:"输入框、开关、对话框和字段组合模式。",feedback:"反馈",feedbackDesc:"短暂的消息提示与打断性确认流程。"},dataList:{name:"名称",kind:"类型",updated:"更新时间"},modeLabel:e=>`${{light:"浅色",dark:"深色",black:"纯黑"}[e]??e}模式`,publicPages:{navLogin:"登录",navSignup:"注册",navDocs:"文档",navLogout:"退出登录",heroTag:`最新 · ${Ie}`,heroTitle:"轻量 React 组件库",heroLead:"零依赖 · 30+ 组件 · 内置主题与深色模式",heroCta:"立即开始",heroCtaAlt:"浏览文档",previewLead:"",previewAccessTitle:"访问方式",previewAccessMember:"登录后保留会话状态,随时回到你的工作区。",previewAccessGuest:"无需登录,直接以访客身份访问文档。",previewMobileTitle:"移动端适配",previewMobileLead:"导航与认证布局在移动端自然适配。",featuresSectionTitle:"为什么选择 vxUI",feat1:"零依赖",feat1Desc:"纯 CSS + TypeScript,无第三方依赖。",feat2:"30+ 组件",feat2Desc:"布局、表单、反馈和列表,一套搞定。",feat3:"可主题化",feat3Desc:"CSS 变量驱动,一键切换整套主题。",feat4:"深色模式",feat4Desc:"语义化 Token,浅色与深色主题均适配。",footerCopy:"© 2026 vxUI. 保留所有权利。",footerPrivacy:"隐私政策",footerGithub:"GitHub",footerWebsite:"官网",loginTitle:"欢迎回来",loginSubtitle:"登录以访问文档。",loginEmail:"邮箱",loginEmailPlaceholder:"you@example.com",loginPassword:"密码",loginPasswordPlaceholder:"至少 8 位字符",loginCta:"登录",loginNoAccount:"还没有账号?",loginRegister:"注册",loginGuest:"无需登录,直接继续 →",rememberMe:"记住这台设备",showPassword:"显示",hidePassword:"隐藏",authInfoTitle:"支持访客访问",authInfoBody:"如果你只是想查看文档,可以不登录直接进入。登录仅用于演示持久化会话的真实流程。",registerTitle:"创建账号",registerSubtitle:"立即开始使用 vxUI。",registerName:"姓名",registerNamePlaceholder:"张三",registerEmail:"邮箱",registerEmailPlaceholder:"zhangsan@company.com",registerPassword:"密码",registerPasswordPlaceholder:"创建一个强密码",registerTermsAgree:"我同意",registerTermsLink:"服务条款",registerTermsAnd:"和",registerPrivacyLink:"隐私政策",registerCta:"创建账号",registerHasAccount:"已有账号?",registerLogin:"登录",registerGuest:"无需登录,直接继续 →",validationNameRequired:"请输入你的姓名。",validationNameShort:"姓名至少需要 2 个字符。",validationEmailRequired:"请输入邮箱地址。",validationEmailInvalid:"请输入有效的邮箱地址。",validationPasswordRequired:"请输入密码。",validationPasswordShort:"密码至少需要 8 位字符。",validationTermsRequired:"创建账号前必须同意条款。",sessionLoginTitle:"已登录",sessionLoginBody:"你的会话已生效,现在可以以登录用户身份查看文档。",sessionRegisterTitle:"账号已创建",sessionRegisterBody:"示例账号已创建完成,文档后台现已可用。",sessionGuestTitle:"当前为访客模式",sessionGuestBody:"你正在无账号状态下浏览文档。",sessionLogoutTitle:"已退出登录",sessionLogoutBody:"持久化会话已清除,你已返回公共首页。",signedInAs:"当前登录",guestLabel:"访客",backHome:"← 返回首页",backToDocs:"返回文档"},pageDefs:{introduction:{section:"介绍",title:"简介",description:"一个轻量无依赖的 UI 框架,用于构建简洁的后台管理界面。设计 Token、组件和极简 SPA 运行时,统一在一套一致的视觉语言之下。",guidance:["先从框架和导航节奏开始,再对独立控件进行样式调整。","保持 Token 语义化,主题切换时无需逐页覆盖样式。","将文档、示例和生产界面视为同一套设计系统。"]},"quick-start":{section:"安装",title:"快速开始",description:"安装包,用 Provider 包裹应用,在组合业务页面前先挂载页面框架。",guidance:["在应用根组件附近统一引入共享样式表。","使用 AppShell 承载产品外壳,页面内容保持在 main 插槽内。","仅在应用需要时才添加 ThemeProvider 和 ToastProvider。"]},"shell-sidebar":{section:"组件",title:"框架与侧边栏",description:"Shell 负责侧边栏层级、固定顶栏间距和内容宽度。导航项支持通过 `children` 字段嵌套子菜单,点击父级项可展开或折叠子项。",guidance:["保持导航标签简短,确保折叠模式下仍可快速扫读。","使用章节标题分隔页面分组,而非添加视觉噪音。","在导航项中添加 `children` 即可实现可展开子菜单;设置 `defaultOpen: true` 可默认展开。","如果某子项为 active 状态,AppShell 会自动展开对应父级分组。",'你可以通过 `sidebarWidth` 属性轻松配置侧边栏的固定宽度(例如 `sidebarWidth={280}` 或 `"18rem"`)。'],props:[{prop:"brand",type:"string",default:'"VXUI"',description:"侧边栏顶部显示的品牌/产品名称。"},{prop:"brandCaption",type:"string",description:"品牌名称下方显示的次级说明文字。"},{prop:"brandIcon",type:"ReactNode",description:"侧边栏顶部渲染的 Logo 元素(图片或图标)。"},{prop:"title",type:"string",description:"顶栏中显示的页面标题。"},{prop:"description",type:"string",description:"顶栏标题下方的页面副标题/描述。"},{prop:"breadcrumb",type:"ReactNode",description:"顶栏中渲染的面包屑元素。"},{prop:"navSections",type:"AppShellNavSection[]",description:"按章节分组的结构化导航树。推荐优先使用此属性。"},{prop:"navItems",type:"AppShellNavItem[]",description:"平铺导航列表,自动归入单个无标题章节。"},{prop:"sidebarCollapsed",type:"boolean",default:"false",description:"将侧边栏折叠为仅显示图标的窄轨模式。"},{prop:"sidebarWidth",type:"number | string",default:"240px",description:'自定义侧边栏宽度,数字为 px 单位(如 280),也可传入 CSS 字符串(如 "18rem")。'},{prop:"density",type:'"comfortable" | "compact"',description:'布局密度。"compact" 收紧垂直间距,适合高密度操作界面。'},{prop:"headerActions",type:"ReactNode",description:"顶栏右侧操作区插槽(按钮、下拉菜单、用户菜单等)。"},{prop:"sidebarFooter",type:"ReactNode",description:"侧边栏底部内容插槽(用户信息、设置链接等)。"},{prop:"mobileNavOpen",type:"boolean",default:"false",description:"控制移动端导航遮罩层是否显示。"},{prop:"onSidebarToggle",type:"() => void",description:"点击折叠/展开按钮时的回调。"},{prop:"onMobileNavToggle",type:"() => void",description:"移动端导航遮罩切换按钮的回调,提供后才会启用移动端导航。"},{prop:"children",type:"ReactNode",required:!0,description:"渲染在 ShellContent 内的主页面内容。"}]},"grid-page":{section:"组件",title:"网格与页面",description:"为卡片、Token 和文档块使用简单的响应式网格。页面表面应保持中性,由内容承载视觉重点。",guidance:["在密集文档界面中优先使用 12 至 16 像素的间距。","较大间距应保留给章节边界,而非每张卡片。","限制最大宽度,确保长段落保持可读性。"]},button:{section:"组件",title:"按钮",description:"按钮承担系统中的主操作层级。变体、尺寸和宽度应该直接表达操作意图,而不需要额外拼样式。",guidance:["在同一区域内,实心按钮通常只保留给一个主操作。","次级和幽灵按钮更适合辅助动作,避免和主操作竞争视觉优先级。","在移动端单列布局或堆叠表单中,优先使用 fullWidth 提升点击面积。"]},elements:{section:"组件",title:"基础元素",description:"Button、Badge、Text、Heading、CodeBlock 和 LanguageSwitcher 构成 UI 的原子基础。",guidance:["每个区域通常一个主操作就足够了。","徽章用于紧凑的状态或分类元数据,而非纯装饰。","卡片应组织内容,默认不应有仪表盘的感觉。"]},"form-controls":{section:"组件",title:"表单控件",description:"完整的表单原语集:单行输入框、多行文本域、可搜索单选下拉(Select)、带标签显示的多选下拉(MultiSelect)和时间选择器(TimePicker)。所有组件共享统一的 label / hint / error 布局体系。",guidance:["在管理界面中,表单控件始终应配有可见标签。","使用 Select 实现单选下拉;通过 `searchable={N}` 可设为仅当选项超过 N 条时显示搜索框。","当用户需要从有限列表中选择多个值时,使用 MultiSelect。","TimePicker 支持 24 小时制,通过 `seconds` prop 可启用秒选择列。","简短的辅助文本优于仅依赖 placeholder 的说明。"]},navigation:{section:"组件",title:"导航",description:"导航模式应首先传达位置,其次才是可用的移动方向。Tabs 最适合在单个页面上下文中切换兄弟视图。",guidance:["在控件结构中镜像信息架构。","使活跃状态明显,而不仅依赖颜色。","避免在一个控件中混用路由导航和本地视图状态。"]},"data-list":{section:"组件",title:"数据列表",description:"列表和表格应优先考虑扫读效率而非装饰。使用宽松的对齐、轻量分隔线,仅在需要时增加操作密度。",guidance:["精确对齐表头和行内容,减少视觉偏移。","使用细微边框而非为每一行添加重型卡片外壳。","将破坏性操作保留在行操作组中,而非内联文字链接。"]},"empty-states":{section:"组件",title:"空状态",description:"空状态应解释缺少什么、为何重要以及下一步操作是什么。它不应让用户感到走投无路。",guidance:["指明缺失的对象,让用户清楚自己在看什么。","提供一个清晰的恢复操作。","视觉重量应轻于成功或警告反馈。"]},toasts:{section:"组件",title:"消息提示",description:"Toast 在不打断任务流程的情况下确认短暂事件。保持简洁、具体且易于关闭。",guidance:["使用 success 和 info 确认后台操作。","将阻塞性或破坏性状态升级为对话框,而非堆叠 Toast。","避免在每次页面切换时重复相同消息。"]},feedback:{section:"组件",title:"反馈组件",description:"Alert、Progress、Skeleton、Spinner、Stepper 和 Toast 在不阻塞布局的情况下指示应用状态。",guidance:["对短暂的不确定等待使用 Spinner;对确定性操作使用 Progress。","对持久性或页面级状态消息,优先使用 Alert 而非 Toast。","Skeleton 应与其替代内容的形状匹配,以减少布局偏移。"]},overlays:{section:"组件",title:"浮层",description:"Dialog、AlertDialog、ContextMenu、HoverCard、Tooltip、Popover 和 DropdownMenu 在页面上方将临时内容和操作置于上方。",guidance:["Tooltip 仅用于补充文本,绝不放置可交互内容。","Popover 可包含表单和富内容;需要明确的关闭触发器。","DropdownMenu 应对相关操作分组,并支持键盘导航。"]},"nav-layout":{section:"组件",title:"导航与布局",description:"Tabs、Accordion、Breadcrumb、Menubar、NavigationMenu、ScrollArea、Separator、Resizable 和 Sheet 以层级方式构筑内容。",guidance:["Breadcrumb 反映路由深度——单层页面可省略。","Pagination 应显示总页数,让用户了解数据集大小。","Accordion 最适合渐进式披露,而非主导航。"]},"data-display":{section:"组件",title:"数据展示",description:"Avatar、Card、Badge、Table、Carousel、Timeline、TreeView 和 EmptyState 紧凑地呈现丰富数据。",guidance:["Avatar 即使在显示图片时也应始终具有无障碍标签。","Table 支持可排序列——数据来自服务端时应将排序状态提升。","在密集表格中使用斑马纹,帮助视线跨列追踪。"]},"form-inputs":{section:"组件",title:"表单输入",description:"Select、Checkbox、Radio、Textarea、Switch、Slider、Input、Label、NumberInput、TagInput、ColorPicker、DatePicker、FileUpload、Rating、Toggle、SegmentedControl 和 Calendar 将表单词汇扩展到文本输入之外。",guidance:["使用 RadioGroup 包裹单选按钮,共享 name 和语义。","Slider 适合数值范围;配合 showValue 可获得即时反馈。","Textarea 默认纵向可拖拽——仅在固定高度容器中禁用 resize。","使用 Switch 并在交互后立即生效(例如设置开启或关闭),使用 Checkbox 用于表单提交或多项选择。"]},mobile:{section:"响应式",title:"响应式布局",description:"一套同时覆盖手机、平板与桌面的响应式系统。通过布局与密度变化适配不同设备,而不是维护两套应用与两套页面树。",guidance:["保持所有断点上的路由树一致,只调整壳层结构和内容密度。","在窄屏上把常驻侧边导航转成抽屉,而不是复制一套页面实现。","让卡片、表单和表格从三列到单列平滑重排,不改变组件归属。"]},"home-page":{section:"模板",title:"主页",description:"带有 Hero 区块、核心功能亮点和主要行动召唤按钮的落地式主页。适用于产品官网、内部门户和营销页面。",guidance:["Hero 信息保持一句话——让行动召唤按钮来完成说服工作。","功能卡片各自聚焦一个问题,而非罗列所有能力。","主操作与次操作相配合,降低用户决策疲劳。"]},"login-page":{section:"模板",title:"登录页",description:"居中的极简登录表单。清晰的标签、可见的错误状态和单一主操作,降低登录摩擦。",guidance:["不要隐藏密码标签——仅靠 placeholder 无法满足无障碍要求。","字段失去焦点后立即显示内联校验错误。","提供密码可见切换,降低登录摩擦。"]},"register-page":{section:"模板",title:"注册页",description:"只收集创建账号所需最少字段的注册表单。通过仅询问必要信息来降低注册阻力。",guidance:["注册时只需姓名、邮箱和密码——个人资料可在之后完善。","内联显示密码强度,但不因细微问题阻止提交。","服务条款复选框必须明确,不得预先勾选。"]},"error-page":{section:"模板",title:"错误页",description:"404、500 及其他错误状态的优雅降级页面。给用户清晰的解释和直接返回的路径。",guidance:["说明错误码和通俗解释——避免技术术语。",'始终提供"返回首页"和"后退"两个操作。',"错误页的视觉风格应与产品保持一致,而非系统默认页。"]},"privacy-policy":{section:"模板",title:"隐私政策",description:"带有章节标题、可读段落和清晰分隔线的结构化法律文档页面。在不牺牲完整性的前提下保持无障碍和可扫读性。",guidance:["使用标题将长篇政策文本分成可扫读的章节。","从任何引用政策的同意流程中直接链接到相关章节。","在顶部注明政策版本和日期,让用户了解最近更新时间。"]},"terms-of-service":{section:"模板",title:"服务条款",description:"具备清晰标题、通俗义务说明且在手机到桌面端都保持可读性的服务条款页面。",guidance:["将许可范围、使用限制和免责声明拆成独立段落,降低法律歧义。","正文使用短段落与摘要侧栏,保证长文档依旧可扫读。","在注册和定价流程中直接链接条款页面,让同意动作具备上下文。"]},"command-palette":{section:"组件",title:"命令面板",description:"键盘驱动的搜索浮层,让用户无需离开键盘即可跳转到任意页面或触发任意操作。全局挂载、绑定快捷键,传入扁平的条目列表即可使用。",guidance:["保持条目列表扁平且按标签可搜索——避免隐藏分类嵌套。","从侧边栏导航数据同步填充条目,确保两个入口保持一致。","绑定 ⌘K(Mac)或 Ctrl+K(Windows)快捷键,满足高频用户的操作预期。"]},"code-block":{section:"组件",title:"代码块",description:"带语法高亮的只读代码展示组件,支持可选的文件名标签。用于渲染安装步骤、用法示例或任意格式化的代码字符串。",guidance:["通过 language 属性指定代码语言(tsx、bash、json 等),以获得正确高亮。","传入 filename 可为读者提供该代码片段在项目中所属位置的上下文。","保持示例代码精简——只展示说明当前概念所需的最少行数。"]},"language-switcher":{section:"组件",title:"语言切换器",description:"点击后即可更新整套 UI 文案的语言切换组件。放入任意顶栏或设置区域——i18n Provider 会自动广播变更,无需额外状态绑定。",guidance:["将切换器放置在持久性界面(顶栏或设置页)中,方便用户在任何位置找到它。","切换器自动反映当前语言,除 i18n Provider 外无需额外的状态绑定。","顶栏中使用 inline 变体,设置页中使用默认变体,以匹配对应场景的视觉密度。"]}}},sn={en:Hr,zh:ic},lc=x.createContext({t:Hr,locale:"en",setLocale:()=>{}});function cc(){return x.useContext(lc)}function uc({variant:e="inline",className:t}){const{locale:r,setLocale:s}=cc(),a=Object.entries(sn),o=sn[r],[l,i]=x.useState(!1),u=x.useRef(null);x.useEffect(()=>{if(!l)return;const d=f=>{u.current&&!u.current.contains(f.target)&&i(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[l]),x.useEffect(()=>{if(!l)return;const d=f=>{f.key==="Escape"&&i(!1)};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[l]);const c=e==="sidebar";return n.jsxs("div",{ref:u,className:C("vx-lang-drop",c&&"vx-lang-drop--sidebar",l&&"vx-lang-drop--open",t),children:[n.jsxs(oe,{variant:"outline",size:"sm",onClick:()=>i(d=>!d),"aria-haspopup":"listbox","aria-expanded":l,"aria-label":"Switch language",className:"vx-lang-drop__trigger-btn",style:{height:"36px"},children:[n.jsx(ps,{size:14,"aria-hidden":"true"}),(o==null?void 0:o.label)??r,n.jsx(ge,{size:14,className:"vx-lang-drop__chevron","aria-hidden":"true"})]}),l&&n.jsx("ul",{className:"vx-lang-drop__menu",role:"listbox","aria-label":"Language",children:a.map(([d,f])=>n.jsx("li",{role:"option","aria-selected":r===d,children:n.jsxs("button",{type:"button",className:C("vx-lang-drop__item",r===d&&"vx-lang-drop__item--active"),onClick:()=>{s(d),i(!1)},children:[f.label,r===d&&n.jsx("span",{className:"vx-lang-drop__check","aria-hidden":"true",children:"✓"})]})},d))})]})}exports.Accordion=Ki;exports.ActionSheet=rl;exports.ActionSheetItem=sl;exports.Alert=$i;exports.AlertDialog=xl;exports.AppShell=ws;exports.Avatar=Zi;exports.Badge=ks;exports.BottomNav=nl;exports.Breadcrumb=Gi;exports.Button=oe;exports.Calendar=Br;exports.Card=Ss;exports.CardContent=Cs;exports.CardDescription=Es;exports.CardHeader=Ns;exports.CardTitle=js;exports.Carousel=zl;exports.Checkbox=Ti;exports.CodeBlock=sc;exports.ColorPicker=ql;exports.CommandPalette=Jl;exports.ContextMenu=Fl;exports.DatePicker=kl;exports.Dialog=ao;exports.DialogClose=oo;exports.DrawerNavItem=cl;exports.DrawerNavSection=ul;exports.DropdownMenu=Ui;exports.EmptyState=Bl;exports.FileUpload=Tl;exports.Form=pl;exports.FormDescription=ml;exports.FormField=fl;exports.FormLabel=vl;exports.FormMessage=hl;exports.Heading=Ni;exports.HoverCard=Ll;exports.Input=io;exports.Label=dl;exports.LanguageSwitcher=uc;exports.Menubar=Il;exports.MobileDrawer=ll;exports.MobileIconButton=tl;exports.MobileList=al;exports.MobileListItem=il;exports.MobileListSection=ol;exports.MobileShell=Ji;exports.MobileTopBar=el;exports.MultiSelect=Sl;exports.NavigationMenu=Ml;exports.NumberInput=gl;exports.Pagination=Vi;exports.Popover=Hi;exports.Progress=Mi;exports.Radio=Ri;exports.RadioGroup=Pi;exports.Rating=Ul;exports.ResizableHandle=Zl;exports.ResizablePanel=Xl;exports.ResizablePanelGroup=Yl;exports.Responsive=Kr;exports.ScrollArea=Rl;exports.SegmentedControl=Ai;exports.Select=Ci;exports.Separator=qi;exports.Sheet=Al;exports.Shell=fn;exports.ShellContent=_n;exports.ShellMain=bn;exports.ShellNav=mn;exports.ShellNavItem=xn;exports.ShellNavSection=hn;exports.ShellOverlay=gn;exports.ShellSidebar=vn;exports.ShellTopbar=yn;exports.Skeleton=Bi;exports.Slider=Fi;exports.Spinner=Ii;exports.Stepper=Ol;exports.Switch=xo;exports.Table=Qi;exports.Tabs=Mo;exports.TabsContent=Bo;exports.TabsList=Oo;exports.TabsTrigger=$o;exports.TagInput=Gl;exports.Text=Si;exports.Textarea=Di;exports.ThemeProvider=Vo;exports.TimePicker=Cl;exports.Timeline=$l;exports.ToastProvider=wi;exports.Toggle=Pl;exports.ToggleGroup=Dl;exports.Tooltip=zi;exports.TreeView=Wl;exports.ViewportProvider=Vr;exports.createTheme=X;exports.themePresets=zo;exports.useFormField=$r;exports.useTheme=Ko;exports.useToast=ki;exports.useViewport=dt;
|
|
103
|
+
*/var r=(function(s){var a=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,o={},l={manual:s.Prism&&s.Prism.manual,disableWorkerMessageHandler:s.Prism&&s.Prism.disableWorkerMessageHandler,util:{encode:function v(h){return h instanceof d?new d(h.type,v(h.content),h.alias):Array.isArray(h)?h.map(v):h.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(v){return Object.prototype.toString.call(v).slice(8,-1)},objId:function(v){return v.__id||Object.defineProperty(v,"__id",{value:++i}),v.__id},clone:function v(h,m){m=m||{};var x,y;switch(l.util.type(h)){case"Object":if(y=l.util.objId(h),m[y])return m[y];x={},m[y]=x;for(var S in h)h.hasOwnProperty(S)&&(x[S]=v(h[S],m));return x;case"Array":return y=l.util.objId(h),m[y]?m[y]:(x=[],m[y]=x,h.forEach(function(P,E){x[E]=v(P,m)}),x);default:return h}},getLanguage:function(v){for(;v;){var h=a.exec(v.className);if(h)return h[1].toLowerCase();v=v.parentElement}return"none"},setLanguage:function(v,h){v.className=v.className.replace(RegExp(a,"gi"),""),v.classList.add("language-"+h)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(x){var v=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(x.stack)||[])[1];if(v){var h=document.getElementsByTagName("script");for(var m in h)if(h[m].src==v)return h[m]}return null}},isActive:function(v,h,m){for(var x="no-"+h;v;){var y=v.classList;if(y.contains(h))return!0;if(y.contains(x))return!1;v=v.parentElement}return!!m}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(v,h){var m=l.util.clone(l.languages[v]);for(var x in h)m[x]=h[x];return m},insertBefore:function(v,h,m,x){x=x||l.languages;var y=x[v],S={};for(var P in y)if(y.hasOwnProperty(P)){if(P==h)for(var E in m)m.hasOwnProperty(E)&&(S[E]=m[E]);m.hasOwnProperty(P)||(S[P]=y[P])}var R=x[v];return x[v]=S,l.languages.DFS(l.languages,function(T,A){A===R&&T!=v&&(this[T]=S)}),S},DFS:function v(h,m,x,y){y=y||{};var S=l.util.objId;for(var P in h)if(h.hasOwnProperty(P)){m.call(h,P,h[P],x||P);var E=h[P],R=l.util.type(E);R==="Object"&&!y[S(E)]?(y[S(E)]=!0,v(E,m,null,y)):R==="Array"&&!y[S(E)]&&(y[S(E)]=!0,v(E,m,P,y))}}},plugins:{},highlightAll:function(v,h){l.highlightAllUnder(document,v,h)},highlightAllUnder:function(v,h,m){var x={callback:m,container:v,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",x),x.elements=Array.prototype.slice.apply(x.container.querySelectorAll(x.selector)),l.hooks.run("before-all-elements-highlight",x);for(var y=0,S;S=x.elements[y++];)l.highlightElement(S,h===!0,x.callback)},highlightElement:function(v,h,m){var x=l.util.getLanguage(v),y=l.languages[x];l.util.setLanguage(v,x);var S=v.parentElement;S&&S.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(S,x);var P=v.textContent,E={element:v,language:x,grammar:y,code:P};function R(A){E.highlightedCode=A,l.hooks.run("before-insert",E),E.element.innerHTML=E.highlightedCode,l.hooks.run("after-highlight",E),l.hooks.run("complete",E),m&&m.call(E.element)}if(l.hooks.run("before-sanity-check",E),S=E.element.parentElement,S&&S.nodeName.toLowerCase()==="pre"&&!S.hasAttribute("tabindex")&&S.setAttribute("tabindex","0"),!E.code){l.hooks.run("complete",E),m&&m.call(E.element);return}if(l.hooks.run("before-highlight",E),!E.grammar){R(l.util.encode(E.code));return}if(h&&s.Worker){var T=new Worker(l.filename);T.onmessage=function(A){R(A.data)},T.postMessage(JSON.stringify({language:E.language,code:E.code,immediateClose:!0}))}else R(l.highlight(E.code,E.grammar,E.language))},highlight:function(v,h,m){var x={code:v,grammar:h,language:m};if(l.hooks.run("before-tokenize",x),!x.grammar)throw new Error('The language "'+x.language+'" has no grammar.');return x.tokens=l.tokenize(x.code,x.grammar),l.hooks.run("after-tokenize",x),d.stringify(l.util.encode(x.tokens),x.language)},tokenize:function(v,h){var m=h.rest;if(m){for(var x in m)h[x]=m[x];delete h.rest}var y=new f;return b(y,y.head,v),u(v,y,h,y.head,0),N(y)},hooks:{all:{},add:function(v,h){var m=l.hooks.all;m[v]=m[v]||[],m[v].push(h)},run:function(v,h){var m=l.hooks.all[v];if(!(!m||!m.length))for(var x=0,y;y=m[x++];)y(h)}},Token:d};s.Prism=l;function d(v,h,m,x){this.type=v,this.content=h,this.alias=m,this.length=(x||"").length|0}d.stringify=function v(h,m){if(typeof h=="string")return h;if(Array.isArray(h)){var x="";return h.forEach(function(R){x+=v(R,m)}),x}var y={type:h.type,content:v(h.content,m),tag:"span",classes:["token",h.type],attributes:{},language:m},S=h.alias;S&&(Array.isArray(S)?Array.prototype.push.apply(y.classes,S):y.classes.push(S)),l.hooks.run("wrap",y);var P="";for(var E in y.attributes)P+=" "+E+'="'+(y.attributes[E]||"").replace(/"/g,""")+'"';return"<"+y.tag+' class="'+y.classes.join(" ")+'"'+P+">"+y.content+"</"+y.tag+">"};function c(v,h,m,x){v.lastIndex=h;var y=v.exec(m);if(y&&x&&y[1]){var S=y[1].length;y.index+=S,y[0]=y[0].slice(S)}return y}function u(v,h,m,x,y,S){for(var P in m)if(!(!m.hasOwnProperty(P)||!m[P])){var E=m[P];E=Array.isArray(E)?E:[E];for(var R=0;R<E.length;++R){if(S&&S.cause==P+","+R)return;var T=E[R],A=T.inside,$=!!T.lookbehind,D=!!T.greedy,I=T.alias;if(D&&!T.pattern.global){var O=T.pattern.toString().match(/[imsuy]*$/)[0];T.pattern=RegExp(T.pattern.source,O+"g")}for(var H=T.pattern||T,U=x.next,W=y;U!==h.tail&&!(S&&W>=S.reach);W+=U.value.length,U=U.next){var K=U.value;if(h.length>v.length)return;if(!(K instanceof d)){var X=1,q;if(D){if(q=c(H,W,v,$),!q||q.index>=v.length)break;var z=q.index,ee=q.index+q[0].length,Z=W;for(Z+=U.value.length;z>=Z;)U=U.next,Z+=U.value.length;if(Z-=U.value.length,W=Z,U.value instanceof d)continue;for(var re=U;re!==h.tail&&(Z<ee||typeof re.value=="string");re=re.next)X++,Z+=re.value.length;X--,K=v.slice(W,Z),q.index-=W}else if(q=c(H,0,K,$),!q)continue;var z=q.index,F=q[0],M=K.slice(0,z),B=K.slice(z+F.length),L=W+K.length;S&&L>S.reach&&(S.reach=L);var V=U.prev;M&&(V=b(h,V,M),W+=M.length),w(h,V,X);var G=new d(P,A?l.tokenize(F,A):F,I,F);if(U=b(h,V,G),B&&b(h,U,B),X>1){var te={cause:P+","+R,reach:L};u(v,h,m,U.prev,W,te),S&&te.reach>S.reach&&(S.reach=te.reach)}}}}}}function f(){var v={value:null,prev:null,next:null},h={value:null,prev:v,next:null};v.next=h,this.head=v,this.tail=h,this.length=0}function b(v,h,m){var x=h.next,y={value:m,prev:h,next:x};return h.next=y,x.prev=y,v.length++,y}function w(v,h,m){for(var x=h.next,y=0;y<m&&x!==v.tail;y++)x=x.next;h.next=x,x.prev=h,v.length-=y}function N(v){for(var h=[],m=v.head.next;m!==v.tail;)h.push(m.value),m=m.next;return h}if(!s.document)return s.addEventListener&&(l.disableWorkerMessageHandler||s.addEventListener("message",function(v){var h=JSON.parse(v.data),m=h.language,x=h.code,y=h.immediateClose;s.postMessage(l.highlight(x,l.languages[m],m)),y&&s.close()},!1)),l;var _=l.util.currentScript();_&&(l.filename=_.src,_.hasAttribute("data-manual")&&(l.manual=!0));function g(){l.manual||l.highlightAll()}if(!l.manual){var k=document.readyState;k==="loading"||k==="interactive"&&_&&_.defer?document.addEventListener("DOMContentLoaded",g):window.requestAnimationFrame?window.requestAnimationFrame(g):window.setTimeout(g,16)}return l})(n);t.exports&&(t.exports=r),typeof vt<"u"&&(vt.Prism=r),r.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",function(s){s.type==="entity"&&(s.attributes.title=s.content.replace(/&/,"&"))}),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(a,i){var o={};o["language-"+i]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:r.languages[i]},o.cdata=/^<!\[CDATA\[|\]\]>$/i;var l={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:o}};l["language-"+i]={pattern:/[\s\S]+/,inside:r.languages[i]};var d={};d[a]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:l},r.languages.insertBefore("markup","cdata",d)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(s,a){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+s+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[a,"language-"+a],inside:r.languages[a]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,(function(s){var a=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+a.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+a.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+a.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+a.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:a,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var i=s.languages.markup;i&&(i.tag.addInlined("style","css"),i.tag.addAttribute("style","css"))})(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,(function(){if(typeof r>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var s="Loading…",a=function(_,g){return"✖ Error "+_+" while fetching file: "+g},i="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},l="data-src-status",d="loading",c="loaded",u="failed",f="pre[data-src]:not(["+l+'="'+c+'"]):not(['+l+'="'+d+'"])';function b(_,g,k){var v=new XMLHttpRequest;v.open("GET",_,!0),v.onreadystatechange=function(){v.readyState==4&&(v.status<400&&v.responseText?g(v.responseText):v.status>=400?k(a(v.status,v.statusText)):k(i))},v.send(null)}function w(_){var g=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(_||"");if(g){var k=Number(g[1]),v=g[2],h=g[3];return v?h?[k,Number(h)]:[k,void 0]:[k,k]}}r.hooks.add("before-highlightall",function(_){_.selector+=", "+f}),r.hooks.add("before-sanity-check",function(_){var g=_.element;if(g.matches(f)){_.code="",g.setAttribute(l,d);var k=g.appendChild(document.createElement("CODE"));k.textContent=s;var v=g.getAttribute("data-src"),h=_.language;if(h==="none"){var m=(/\.(\w+)$/.exec(v)||[,"none"])[1];h=o[m]||m}r.util.setLanguage(k,h),r.util.setLanguage(g,h);var x=r.plugins.autoloader;x&&x.loadLanguages(h),b(v,function(y){g.setAttribute(l,c);var S=w(g.getAttribute("data-range"));if(S){var P=y.split(/\r\n?|\n/g),E=S[0],R=S[1]==null?P.length:S[1];E<0&&(E+=P.length),E=Math.max(0,Math.min(E-1,P.length)),R<0&&(R+=P.length),R=Math.max(0,Math.min(R,P.length)),y=P.slice(E,R).join(`
|
|
104
|
+
`),g.hasAttribute("data-start")||g.setAttribute("data-start",String(E+1))}k.textContent=y,r.highlightElement(k)},function(y){g.setAttribute(l,u),k.textContent=y})}}),r.plugins.fileHighlight={highlight:function(g){for(var k=(g||document).querySelectorAll(f),v=0,h;h=k[v++];)r.highlightElement(h)}};var N=!1;r.fileHighlight=function(){N||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),N=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(ze)),ze.exports}var si=ri();const Ne=ni(si);Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.replace(/&/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(n,r){var s={};s["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[r]},s.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}};a["language-"+r]={pattern:/[\s\S]+/,inside:Prism.languages[r]};var i={};i[n]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:a},Prism.languages.insertBefore("markup","cdata",i)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(t,n){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:Prism.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;(function(t){var n=t.util.clone(t.languages.javascript),r=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,s=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,a=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function i(d,c){return d=d.replace(/<S>/g,function(){return r}).replace(/<BRACES>/g,function(){return s}).replace(/<SPREAD>/g,function(){return a}),RegExp(d,c)}a=i(a).source,t.languages.jsx=t.languages.extend("markup",n),t.languages.jsx.tag.pattern=i(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=n.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:i(/<SPREAD>/.source),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:i(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);var o=function(d){return d?typeof d=="string"?d:typeof d.content=="string"?d.content:d.content.map(o).join(""):""},l=function(d){for(var c=[],u=0;u<d.length;u++){var f=d[u],b=!1;if(typeof f!="string"&&(f.type==="tag"&&f.content[0]&&f.content[0].type==="tag"?f.content[0].content[0].content==="</"?c.length>0&&c[c.length-1].tagName===o(f.content[0].content[1])&&c.pop():f.content[f.content.length-1].content==="/>"||c.push({tagName:o(f.content[0].content[1]),openedBraces:0}):c.length>0&&f.type==="punctuation"&&f.content==="{"?c[c.length-1].openedBraces++:c.length>0&&c[c.length-1].openedBraces>0&&f.type==="punctuation"&&f.content==="}"?c[c.length-1].openedBraces--:b=!0),(b||typeof f=="string")&&c.length>0&&c[c.length-1].openedBraces===0){var w=o(f);u<d.length-1&&(typeof d[u+1]=="string"||d[u+1].type==="plain-text")&&(w+=o(d[u+1]),d.splice(u+1,1)),u>0&&(typeof d[u-1]=="string"||d[u-1].type==="plain-text")&&(w=o(d[u-1])+w,d.splice(u-1,1),u--),d[u]=new t.Token("plain-text",w,null,w)}f.content&&typeof f.content!="string"&&l(f.content)}};t.hooks.add("after-tokenize",function(d){d.language!=="jsx"&&d.language!=="tsx"||l(d.tokens)})})(Prism);var xt={},bt;function ai(){return bt||(bt=1,(function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var n=t.languages.extend("typescript",{});delete n["class-name"],t.languages.typescript["class-name"].inside=n,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n}}}}),t.languages.ts=t.languages.typescript})(Prism)),xt}ai();(function(t){var n=t.util.clone(t.languages.typescript);t.languages.tsx=t.languages.extend("jsx",n),delete t.languages.tsx.parameter,delete t.languages.tsx["literal-property"];var r=t.languages.tsx.tag;r.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+r.pattern.source+")",r.pattern.flags),r.lookbehind=!0})(Prism);(function(t){var n="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},s={bash:r,environment:{pattern:RegExp("\\$"+n),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+n),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};t.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+n),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:s},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:s},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:s.entity}}],environment:{pattern:RegExp("\\$?"+n),alias:"constant"},variable:s.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=t.languages.bash;for(var a=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=s.variable[1].inside,o=0;o<a.length;o++)i[a[o]]=t.languages.bash[a[o]];t.languages.sh=t.languages.bash,t.languages.shell=t.languages.bash})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;function oi({code:t,language:n="tsx",copyLabel:r,copiedLabel:s,onCopy:a}){const[i,o]=p.useState(!1),l=p.useRef(null),d=p.useMemo(()=>{const u=Ne.languages[n]??Ne.languages.tsx??Ne.languages.typescript;return u?Ne.highlight(t,u,n):t},[t,n]);p.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]);async function c(){await a(t)&&(o(!0),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{o(!1),l.current=null},1600))}return e.jsxs("div",{className:"vx-code-block-wrap","data-language":n,children:[e.jsxs(ye,{type:"button",size:"sm",variant:i?"solid":"secondary",className:i?"vx-code-block__copy vx-code-block__copy--copied":"vx-code-block__copy",onClick:()=>void c(),children:[i?e.jsx(he,{size:14}):e.jsx(is,{size:14}),i?s:r]}),e.jsx("pre",{className:"vx-code-block",children:e.jsx("code",{className:`vx-code-block__code language-${n}`,dangerouslySetInnerHTML:{__html:d}})})]})}const ii="1.3.7",li={version:ii},Te=`v${li.version}`,Gn={locale:"en",label:"English",searchPlaceholder:"Search components, pages, keywords…",searchAriaLabel:"Search",searchEmpty:t=>`No results for "${t}"`,searchNavigate:"Navigate",searchGo:"Go",searchClose:"Close",sidebarCollapse:"Collapse",sidebarExpand:"Expand",sidebarCloseLabel:"Close sidebar",searchTrigger:"Search",versionLabel:Te,mobilePreview:"Mobile Preview",nav:{gettingStarted:"Getting Started",layout:"Layout",content:"Content",forms:"Forms",components:"Components",overlays:"Overlays",navigation:"Navigation",feedback:"Feedback",templates:"Templates",mobile:"Responsive"},pages:{introduction:"Introduction","quick-start":"Quick Start","shell-sidebar":"Shell & Sidebar","grid-page":"Grid & Page","nav-layout":"Navigation & Layout","scroll-area":"ScrollArea",separator:"Separator",resizable:"Resizable",typography:"Typography","typography-base":"Typography Base",badge:"Badge",avatar:"Avatar",skeleton:"Skeleton",card:"Card","code-block":"Code Block","language-switcher":"Language Switcher",button:"Button",elements:"Elements","form-controls":"Form Controls","form-inputs":"Form Inputs",toggle:"Toggle",rating:"Rating",label:"Label","date-pickers":"Date Pickers","file-upload":"File Upload","color-picker":"Color Picker",form:"Form",accordion:"Accordion",tabs:"Tabs",breadcrumb:"Breadcrumb",pagination:"Pagination",stepper:"Stepper",progress:"Progress",spinner:"Spinner",alert:"Alert",toasts:"Toasts",table:"Table","data-list":"Data List",timeline:"Timeline","tree-view":"Tree View",carousel:"Carousel","empty-states":"Empty States",overlays:"Overlays","data-display":"Data Display",navigation:"Navigation",feedback:"Feedback",dialog:"Dialog","alert-dialog":"Alert Dialog",sheet:"Sheet",popover:"Popover",tooltip:"Tooltip","hover-card":"Hover Card","dropdown-menu":"Dropdown Menu","context-menu":"Context Menu","command-palette":"Command Palette","navigation-menu":"Navigation Menu",menubar:"Menubar",mobile:"Mobile Components","mobile-list":"Mobile List","home-page":"Home Page","login-page":"Login Page","register-page":"Register Page","error-page":"Error Page","privacy-policy":"Privacy Policy","terms-of-service":"Terms of Service"},docs:{guidance:"Guidance",guidanceDesc:"Keep the implementation tight and let the design system do most of the visual work.",preview:"Preview",previewDesc:"A compact example of how this area should feel inside the system.",notes:"Notes",primaryTheme:"Primary Theme",primaryThemeDesc:"Blue-gray neutrals keep emphasis reserved for actions, not decoration.",tokenScale:"Token Scale",tokenScaleDesc:"Reuse the shared surface, border, and text variables before introducing page-specific styles.",themeStudio:"Theme Studio",themeStudioDesc:"Register named themes once, then switch every component with a single key.",liveControls:"Live Controls",liveControlsDesc:"A few reusable primitives are still available inside the docs surface.",searchDocs:"Search docs",searchDocsPlaceholder:"Buttons, tokens, layout...",compactDensity:"Compact density",compactDensityDesc:"Tighten the vertical rhythm for denser operator views.",systemPreview:"System Preview",openSection:"Open section"},intro:{tagline:"A lightweight, dependency-free UI framework for building clean admin interfaces. Design tokens, components, and a minimal SPA runtime live behind one consistent visual language.",getStarted:"Get Started",browseComponents:"Browse Components",atAGlance:"At a Glance",designTokens:"Design Tokens",designTokensLead:"All colors, spacing, and typography values are exposed as CSS custom properties under the vx namespace. Register named light and dark themes once, then swap the whole framework by theme key.",componentFamilies:"Component Families"},glance:{zeroDeps:"Zero dependencies",zeroDepsHint:"Original shell runtime does not require a build pipeline.",components:"Components",componentsHint:"Layout, form, feedback, and list primitives in one system.",coreCSS:"Core CSS",coreCSSHint:"Neutral tokens and structural styles stay compact.",darkMode:"Dark mode",darkModeHint:"Semantic variables keep the same components reusable."},tokens:{primary:"Primary",primaryDesc:"Accent color for primary actions, active navigation, and emphasis.",surface:"Surface",surfaceDesc:"Default panel and content background for documentation cards and shell regions.",border:"Border",borderDesc:"Light separators that keep the UI structured without adding visual weight.",text:"Text",textDesc:"Primary foreground used for headings, dense data, and body copy."},families:{layout:"Layout",layoutDesc:"App shell, sticky header, section rhythm, and responsive content framing.",content:"Content",contentDesc:"Typography, badges, avatars, cards, and code blocks.",elements:"Elements",elementsDesc:"Quiet primitives for actions, metadata, and structured content blocks.",forms:"Forms",formsDesc:"Inputs, switches, dialogs, and field composition patterns.",inputs:"Inputs",inputsDesc:"Text inputs, selects, textareas, and number pickers.",overlays:"Overlays",overlaysDesc:"Modals, popovers, tooltips, and sheet panels.",navigation:"Navigation",navigationDesc:"Menus, nav bars, and breadcrumbs.",feedback:"Feedback",feedbackDesc:"Transient toasts and interruptive confirmation flows."},dataList:{name:"Name",kind:"Kind",updated:"Updated"},modeLabel:t=>`${t} mode`,publicPages:{navLogin:"Log in",navSignup:"Sign up",navDocs:"Docs",navLogout:"Log out",heroTag:`New · ${Te}`,heroTitle:"Lightweight React UI library",heroLead:"Zero dependencies · 30+ components · Built-in theming & dark mode",heroCta:"Get started",heroCtaAlt:"Browse docs",previewLead:"",previewAccessTitle:"Access modes",previewAccessMember:"Sign in to keep a session and return to your workspace.",previewAccessGuest:"Open the docs as a guest when you just need to browse.",previewMobileTitle:"Mobile-ready",previewMobileLead:"Navigation and auth layouts adapt naturally on mobile.",featuresSectionTitle:"Why vxUI",feat1:"Zero dependencies",feat1Desc:"Pure CSS + TypeScript, no peer dependencies.",feat2:"30+ components",feat2Desc:"Layout, form, feedback and list primitives in one system.",feat3:"Themeable",feat3Desc:"CSS variable-driven, swap the whole theme with one key.",feat4:"Dark mode",feat4Desc:"Semantic tokens work across light and dark themes.",footerCopy:"© 2026 vxUI. All rights reserved.",footerPrivacy:"Privacy Policy",footerGithub:"GitHub",footerWebsite:"Website",loginTitle:"Welcome back",loginSubtitle:"Sign in to access the documentation.",loginEmail:"Email",loginEmailPlaceholder:"you@example.com",loginPassword:"Password",loginPasswordPlaceholder:"At least 8 characters",loginCta:"Sign in",loginNoAccount:"Don't have an account?",loginRegister:"Register",loginGuest:"Continue without an account →",rememberMe:"Remember this device",showPassword:"Show",hidePassword:"Hide",authInfoTitle:"Guest access is available",authInfoBody:"You can go straight to the docs without an account. Sign in only if you want a persisted session example.",registerTitle:"Create account",registerSubtitle:"Get started with vxUI today.",registerName:"Full name",registerNamePlaceholder:"Jane Smith",registerEmail:"Email",registerEmailPlaceholder:"jane@company.com",registerPassword:"Password",registerPasswordPlaceholder:"Create a strong password",registerTermsAgree:"I agree to the",registerTermsLink:"Terms of Service",registerTermsAnd:"and",registerPrivacyLink:"Privacy Policy",registerCta:"Create account",registerHasAccount:"Already have an account?",registerLogin:"Sign in",registerGuest:"Continue without an account →",validationNameRequired:"Enter your full name.",validationNameShort:"Use at least 2 characters for your name.",validationEmailRequired:"Enter your email address.",validationEmailInvalid:"Enter a valid email address.",validationPasswordRequired:"Enter your password.",validationPasswordShort:"Use at least 8 characters for the password.",validationTermsRequired:"You must agree to the terms before creating an account.",sessionLoginTitle:"Signed in",sessionLoginBody:"Your session is active. You can now browse the docs as a signed-in user.",sessionRegisterTitle:"Account created",sessionRegisterBody:"Your sample account is ready and the docs are now unlocked.",sessionGuestTitle:"Browsing as guest",sessionGuestBody:"You entered the docs without a saved account session.",sessionLogoutTitle:"Signed out",sessionLogoutBody:"Your persisted session was cleared. You are back on the public site.",signedInAs:"Signed in as",guestLabel:"Guest",backHome:"← Back to home",backToDocs:"Back to docs"},pageDefs:{introduction:{section:"Introduction",title:"Introduction",description:"A lightweight, dependency-free UI framework for building clean admin interfaces. Design tokens, components, and a minimal SPA runtime live behind one consistent visual language.",guidance:["Start from the shell and navigation rhythm before styling isolated controls.","Keep tokens semantic so a theme swap does not require page-specific overrides.","Treat documentation, examples, and production surfaces as the same design system."]},"quick-start":{section:"Installation",title:"Quick Start",description:"Install the package, wrap your app with providers, and mount a page shell before composing business screens.",guidance:["Import the shared stylesheet once near the application root.","Use AppShell for product chrome and keep page content inside the main slot.","Add ThemeProvider and ToastProvider only when the app needs them."]},"shell-sidebar":{section:"Components",title:"Shell & Sidebar",description:"The shell is responsible for sidebar hierarchy, sticky header spacing, and content width. Navigation items support nested sub-menus via the `children` prop — click a parent to expand or collapse its sub-items.",guidance:["Keep navigation labels short so collapsed mode stays scannable.","Use section titles to separate page groups instead of visual noise.","Add `children` to a nav item to make it expandable; set `defaultOpen: true` to start it expanded.","If any child is active, AppShell auto-opens the parent group.",'Customize the sidebar width via the `sidebarWidth` prop (e.g. `sidebarWidth={280}` or `"18rem"`).'],props:[{prop:"brand",type:"string",default:'"VXUI"',description:"Brand / product name shown in the sidebar header."},{prop:"brandCaption",type:"string",description:"Secondary subtitle displayed below the brand name."},{prop:"brandIcon",type:"ReactNode",description:"Logo element (image or icon) rendered in the sidebar header."},{prop:"title",type:"string",description:"Page title shown in the topbar."},{prop:"description",type:"string",description:"Page subtitle / description shown below the topbar title."},{prop:"breadcrumb",type:"ReactNode",description:"Breadcrumb element rendered in the topbar."},{prop:"navSections",type:"AppShellNavSection[]",description:"Structured navigation tree grouped by sections. Preferred over navItems."},{prop:"navItems",type:"AppShellNavItem[]",description:"Flat navigation list. Automatically wrapped in a single unnamed section."},{prop:"sidebarCollapsed",type:"boolean",default:"false",description:"Collapse sidebar to icon-only rail mode."},{prop:"sidebarWidth",type:"number | string",default:"240px",description:'Custom sidebar width. Pass a number for px (e.g. 280) or a CSS string (e.g. "18rem").'},{prop:"density",type:'"comfortable" | "compact"',description:'Layout density. "compact" tightens vertical rhythm for high-density operator UIs.'},{prop:"headerActions",type:"ReactNode",description:"Slot for right-aligned topbar actions (buttons, dropdowns, user menu, etc.)."},{prop:"sidebarFooter",type:"ReactNode",description:"Slot rendered at the bottom of the sidebar (user info, settings link, etc.)."},{prop:"mobileNavOpen",type:"boolean",default:"false",description:"Controls whether the mobile navigation overlay is visible."},{prop:"onSidebarToggle",type:"() => void",description:"Called when the collapse / expand button is clicked."},{prop:"onMobileNavToggle",type:"() => void",description:"Called when the mobile overlay toggle button is clicked. Required to enable mobile nav."},{prop:"children",type:"ReactNode",required:!0,description:"Main page content rendered inside ShellContent."}]},"grid-page":{section:"Components",title:"Grid & Page",description:"Use simple responsive grids for cards, tokens, and documentation blocks. The page surface should stay neutral and let content carry emphasis.",guidance:["Prefer 12 to 16 pixel gaps for dense documentation surfaces.","Reserve larger spacing for section boundaries, not every card.","Keep max width constrained so long paragraphs remain readable."]},button:{section:"Components",title:"Button",description:"Buttons carry the primary action hierarchy for the system. Variants, sizes, and width should communicate intent without requiring extra styling.",guidance:["Use the solid variant for the primary action in a given area.","Use secondary or ghost variants for supporting actions that should stay visually quieter.","Use fullWidth for stacked mobile actions or single-column forms."]},elements:{section:"Components",title:"Elements",description:"Button forms the atomic foundation of actions. Other atomic components (Badge, Text, Heading, CodeBlock, LanguageSwitcher) each have their own dedicated pages under Content.",guidance:["One primary action per area is usually enough.","Use the solid variant for the primary action in a given area.","Use secondary or ghost variants for supporting actions."]},"form-controls":{section:"Components",title:"Form Controls",description:"A complete set of form primitives: single-line inputs, multi-line textarea, searchable single-select (Select), multi-select with tag display (MultiSelect), and time selection (TimePicker). All share the same label / hint / error layout system.",guidance:["Always pair form controls with visible labels in admin surfaces.","Use Select for single-select with optional search; set `searchable={N}` to show the search input only when options exceed N.","Use MultiSelect when users need to pick several values from a bounded list.","TimePicker supports 24-hour format and an optional seconds column via the `seconds` prop.","Short helper text is better than placeholder-only instruction."]},navigation:{section:"Components",title:"Navigation",description:"Navigation patterns should communicate location first, then available movement. Tabs work best for sibling views within a single page context.",guidance:["Mirror information architecture in the control structure.","Make the active state obvious without relying on color alone.","Avoid mixing route navigation and local view state in one control."]},"data-list":{section:"Components",title:"Data List",description:"Lists and tables should prioritize scanning over ornament. Use generous alignment, light separators, and action density only where needed.",guidance:["Align headers and row content precisely to reduce visual drift.","Use subtle borders instead of heavy card chrome around every row.","Reserve destructive affordances for row action groups, not inline text links."]},dialog:{section:"Overlays",title:"Dialog",description:"A modal dialog that interrupts the user to confirm an action or show critical information. Supports multiple sizes, placement options, and a close button.",guidance:["Use Dialog for confirmations that require a decision before continuing.",'Choose the appropriate size — "sm" for quick confirmations, "lg" for forms or details.',"Dialog traps focus and blocks interaction with the page behind it."]},popover:{section:"Overlays",title:"Popover",description:"A rich popup that can contain forms, buttons, and structured content. Unlike Tooltip, Popover can hold interactive elements and requires an explicit dismiss action.",guidance:["Popover can contain interactive content — forms, buttons, links.","Always provide a close mechanism (click outside or explicit close button).","Use Tooltip for read-only labels and Popover for interactive content."]},tooltip:{section:"Overlays",title:"Tooltip",description:"A short, non-interactive label that appears on hover or focus to describe a UI element. Tooltips contain text only — no links, buttons, or forms.",guidance:["Tooltips are for supplementary text only — never place interactive content inside.","Tooltips appear on hover and focus; they do not require a close action.","Keep tooltip text short — one to five words is ideal."]},"hover-card":{section:"Overlays",title:"Hover Card",description:"A card that appears on hover, showing a richer preview of a linked element. Useful for user profiles, document previews, or reference summaries.",guidance:["Use HoverCard to preview related content without navigating away.","HoverCard can contain richer content than Tooltip — images, metadata, links.","Ensure the HoverCard trigger area is large enough to reach without the card disappearing."]},"dropdown-menu":{section:"Overlays",title:"Dropdown Menu",description:"A menu that opens on click, presenting a list of grouped actions or navigation items. Supports nested groups, keyboard navigation, and disabled items.",guidance:["Group related actions under labeled menu groups.","Use separators between unrelated action groups.","DropdownMenu supports keyboard navigation — arrow keys, Enter, and Escape."]},"context-menu":{section:"Overlays",title:"Context Menu",description:"A right-click menu that provides actions relevant to the clicked element. Supports the same item and group API as DropdownMenu.",guidance:["Use ContextMenu to expose secondary actions that users discover through right-click.","Always provide an alternative way to access the same actions (toolbar, button).","Keep the menu short — long context menus are hard to scan at a glance."]},"command-palette":{section:"Overlays",title:"Command Palette",description:"A keyboard-driven search overlay that lets users jump to any page or action without leaving the keyboard. Render it globally, wire a hotkey, then pass a flat list of entries.",guidance:["Keep the entries list flat and label-searchable — avoid nesting pages under hidden categories.","Populate entries from the same nav data you use for the sidebar so the two surfaces stay in sync.","Bind to ⌘K (Mac) or Ctrl+K (Windows) for a familiar shortcut."]},"navigation-menu":{section:"Navigation",title:"Navigation Menu",description:"A horizontal navigation bar that supports multi-level dropdown menus on hover. Suitable for top-level site navigation with nested sections.",guidance:["Use NavigationMenu for site-level navigation with multiple tiers of content.","Each item can have sub-items for second-level navigation.","Keep the top-level items short — one or two words each."]},menubar:{section:"Navigation",title:"Menubar",description:"A horizontal menu bar typically used for application-level actions (File, Edit, View). Supports keyboard-driven navigation between menus.",guidance:["Menubar follows desktop application conventions — use it for app-level command menus.","Each menu can contain items, groups, and separators.","Arrow keys navigate between menus; Escape closes the current menu."]},resizable:{section:"Layout",title:"Resizable",description:"A set of three components — ResizablePanelGroup, ResizablePanel, ResizableHandle — for building split-panel layouts with draggable dividers. Supports horizontal and vertical arrangements.",guidance:["Use ResizablePanelGroup as the outer container, then nest ResizablePanel and ResizableHandle inside.",'Set direction to "horizontal" for side-by-side panels, "vertical" for stacked panels.',"Panels can be collapsed or resized by dragging the handle between them."]},"file-upload":{section:"Forms",title:"File Upload",description:"A drag-and-drop file upload area with click-to-browse fallback. Supports multiple files, previews, and removal.",guidance:["Accept multiple files with the multiple prop — each file renders a preview card.","Uploaded files are surfaced via the onChange callback with name, size, and file object.","The component handles its own drag state and visual feedback."]},"color-picker":{section:"Forms",title:"Color Picker",description:"A color selection control that opens a popup with hue, saturation, and brightness sliders. Supports predefined swatches and custom hex input.",guidance:["Use ColorPicker for brand color configuration, tag colors, or theme customization.","The component provides both a visual picker and a hex input for precision.","Swatches can be customized via the swatches prop for brand-specific palettes."]},accordion:{section:"Components",title:"Accordion",description:"A vertically stacked list of collapsible panels. Each panel has a header that toggles its content open or closed. Supports single and multiple open panels.",guidance:["Accordion is ideal for FAQ sections, settings panels, and progressive disclosure patterns.",'By default, only one panel is open at a time (type="single").',"For accordions where multiple panels should stay open simultaneously, allowMultiple enables independent toggling."]},tabs:{section:"Components",title:"Tabs",description:"A tabbed interface for switching between multiple content panels. Supports controlled and uncontrolled modes with keyboard navigation.",guidance:["Use Tabs to organize related content into separate panels without navigating to a new page.","TabsList holds the trigger buttons; TabsContent holds the panel content.","Use the defaultValue prop for uncontrolled usage, or value/onValueChange for controlled mode."]},breadcrumb:{section:"Components",title:"Breadcrumb",description:"A navigation aid that shows the user's location within the page hierarchy. Each segment is a link to the corresponding level.",guidance:["Breadcrumb reflects URL depth — single-level pages may omit it entirely.","Use the separator prop to customize the divider between segments.","The last segment should be the current page (not a link) for accessibility."]},pagination:{section:"Components",title:"Pagination",description:"A page navigation control that breaks large datasets into manageable pages. Shows page numbers with prev/next buttons and an optional page size selector.",guidance:["Show the total page count so users know the dataset size.","Use the siblings prop to control how many page numbers appear around the current page.","The onPageChange callback receives the new page number for external data fetching."]},stepper:{section:"Components",title:"Progress Steps",description:"A multi-step progress indicator that visualizes the user's current position in a linear workflow. Supports completed, active, pending, and error states.",guidance:["Use Stepper for multi-page forms, checkout flows, or setup wizards.",'Each step can be in "completed", "active", "pending", or "error" status.',"Steps with error status draw attention to the failed step so users can navigate back to fix it."]},progress:{section:"Components",title:"Progress Bar",description:"A horizontal progress bar that indicates the completion percentage of a deterministic operation. Supports labeled and unlabeled variants.",guidance:["Use Progress for deterministic operations where the duration is known (e.g., file upload, data export).","Use Spinner for indeterminate waits where the duration is unknown.","The value prop accepts 0-100; set to 100 for completion."]},spinner:{section:"Components",title:"Spinner",description:"A rotating indicator for indeterminate loading states. Use it while content is being fetched or processed without a known duration.",guidance:["Use Spinner for short, indeterminate waits where the remaining time is unknown.","Use Progress for deterministic operations with a known duration.",'Spinner accepts size prop ("sm", "md", "lg") to match the surrounding context.']},alert:{section:"Components",title:"Alert",description:"A prominent status message that communicates success, warning, danger, or informational states. Can optionally be dismissed by the user.",guidance:["Use Alert for persistent or page-level status messages — prefer it over Toasts for important information.",'Alert supports "info", "success", "warning", and "danger" variants.',"The dismissible prop adds a close button for user-dismissable alerts."]},table:{section:"Components",title:"Table",description:"A data table with sortable columns, optional row striping, and responsive overflow. Ideal for listing structured data with column-level sorting.",guidance:["Table supports sortable columns — delegate sort state up when the data comes from a server.","Use striped rows in dense tables to help eyes track across long rows.","The columns prop defines headers; each column can have a sortKey for client-side sorting."]},"empty-states":{section:"Components",title:"Empty States",description:"An empty state should explain what is missing, why it matters, and what the next action is. It should never feel like a dead end. The EmptyState component provides a consistent layout with icon, title, description, and an action slot.",guidance:["Name the object that is absent so users know what they are looking at.","Offer one clear recovery action via the action prop.","Keep the visual weight lighter than success or alert feedback."],props:[{prop:"icon",type:"ReactNode",description:"Illustration or icon displayed above the title."},{prop:"title",type:"string",required:!0,description:"Main heading explaining what is missing."},{prop:"description",type:"string",description:"Optional explanatory text below the title."},{prop:"action",type:"ReactNode",description:"Call-to-action button or link for recovery."}]},toasts:{section:"Components",title:"Toasts",description:"Toasts confirm short-lived events without interrupting task flow. Keep them brief, specific, and easy to dismiss.",guidance:["Use success and info to confirm background actions.","Escalate blocking or destructive states to dialogs instead of stacking toasts.","Avoid repeating the same message on every page transition."]},feedback:{section:"Feedback",title:"Feedback Components",description:"Alert, Progress, Spinner, Stepper, and Toast indicate application state without interrupting the layout.",guidance:["Use Spinner for short, indeterminate waits; use Progress for deterministic operations.","Prefer Alert over Toast for persistent or page-level status messages."]},overlays:{section:"Components",title:"Overlays",description:"Dialog, ContextMenu, HoverCard, Tooltip, Popover, and DropdownMenu layer transient content and actions above the page.",guidance:["Tooltips are for supplementary text only — never interactive content.","Popovers can contain forms and rich content; they require explicit close triggers.","DropdownMenus should group related actions and support keyboard navigation."]},"nav-layout":{section:"Components",title:"Navigation & Layout",description:"Tabs, Accordion, Breadcrumb, Menubar, NavigationMenu, ScrollArea, Separator, Resizable, and Sheet structure content hierarchically.",guidance:["Breadcrumb mirrors route depth — omit it on single-level pages.","Pagination should show page count so users understand the data set size.","Accordion works best for progressive disclosure, not primary navigation."]},"data-display":{section:"Components",title:"Data Display",description:"Table and EmptyState present structured data compactly. Other data components (Avatar, Badge, Card, Carousel, Timeline, TreeView) each have their own dedicated pages.",guidance:["Table supports sortable columns — delegate sort state up when the data is server-side.","Use striped rows in dense tables to help eyes track across long rows.","EmptyState should include a clear recovery action whenever possible."]},"form-inputs":{section:"Forms",title:"Form Inputs",description:"Checkbox, Radio, Switch, Slider, NumberInput, TagInput, SegmentedControl, and Input extend the form vocabulary beyond text inputs. Other form components (Label, Toggle, Rating, DatePicker) each have their own dedicated pages.",guidance:["Group radio buttons with RadioGroup to share name and semantics.","Slider is ideal for numeric ranges; pair it with showValue for immediate feedback.","Textarea defaults to vertical resize — disable resize only in fixed-height containers.","Use Switch for immediate state toggles (like settings), and Checkbox for form submissions or multi-selections."]},"mobile-list":{section:"Responsive",title:"Mobile List",description:"MobileList, MobileListSection, and MobileListItem provide a native-feeling list suitable for mobile navigation, settings, and data display. Each item supports leading icons, trailing content, chevron indicators, and destructive or disabled states.",guidance:["Use MobileListSection with a title prop to group related items under a section header.","Set chevron on items that navigate to a detail view — omit it for static or toggle items.","Use destructive for irreversible actions (delete, leave, remove) — the text turns red.","Disabled items render visually muted and block click events."],props:[{prop:"MobileList",type:"—",description:"Root <ul> element with list styling."},{prop:"MobileListSection.title",type:"string",description:"Section header text."},{prop:"MobileListItem.leading",type:"ReactNode",description:"Icon or avatar on the left side."},{prop:"MobileListItem.trailing",type:"ReactNode",description:"Custom content on the right (badge, value, etc.)."},{prop:"MobileListItem.label",type:"ReactNode",required:!0,description:"Primary label text."},{prop:"MobileListItem.description",type:"ReactNode",description:"Secondary descriptive text."},{prop:"MobileListItem.chevron",type:"boolean",default:"false",description:"Show a right chevron arrow."},{prop:"MobileListItem.destructive",type:"boolean",default:"false",description:"Style as destructive action (red text)."},{prop:"MobileListItem.disabled",type:"boolean",default:"false",description:"Disable the item."},{prop:"MobileListItem.onClick",type:"() => void",description:"Click handler."}]},mobile:{section:"Responsive",title:"Responsive Patterns",description:"A single responsive system for phone, tablet, and desktop. One route tree, one content model, and one set of components adapt through layout instead of duplicate applications.",guidance:["Keep the route tree identical across breakpoints; only the shell and density should change.","Turn persistent side navigation into a drawer on narrow screens instead of forking the page implementation.","Design cards, forms, and tables to reflow from three columns to one without changing component ownership."]},"home-page":{section:"Templates",title:"Home Page",description:"A landing-style home page with a hero section, key feature highlights, and primary call-to-action buttons. Suitable for product sites, internal portals, and marketing pages.",guidance:["Keep the hero message to one compelling sentence — let the CTA do the work.","Feature cards should each solve one problem, not list all capabilities.","Balance a primary action with a softer secondary one to reduce decision fatigue."]},"login-page":{section:"Templates",title:"Login Page",description:"A minimal login form centered on the screen. Collect credentials with clear labels, visible error states, and a single primary action.",guidance:["Never hide the password label — placeholder text alone fails accessibility.","Show inline validation errors as soon as the field loses focus.","Offer a password-visible toggle to reduce login friction."]},"register-page":{section:"Templates",title:"Register Page",description:"A registration form that collects the minimum fields needed to create an account. Reduce friction by asking only what is essential at sign-up.",guidance:["Request only name, email, and password at registration — profile details can come later.","Show password strength inline without blocking submission on minor issues.","The terms-of-service checkbox must be explicit; do not pre-check it."]},"error-page":{section:"Templates",title:"Error Page",description:"A graceful fallback for 404, 500, and other error states. Give users a clear explanation and a direct path back to safety.",guidance:["State the error code and a plain-language explanation — avoid technical jargon.","Always provide a go-home action alongside a go-back option.","Match the error page visual weight to the rest of the product, not a generic OS page."]},"privacy-policy":{section:"Templates",title:"Privacy Policy",description:"A structured legal document page with section headings, readable prose, and clear separators. Designed to remain accessible and scannable without sacrificing completeness.",guidance:["Use headings to break long policy text into scannable sections.","Link directly to the relevant section from any consent flow that references the policy.","Version and date the policy at the top so users know when it was last updated."]},"terms-of-service":{section:"Templates",title:"Terms of Service",description:"A service terms page with clear headings, plain-language obligations, and a layout that stays readable from narrow phones to wide desktop viewports.",guidance:["State the usage permission, limitations, and disclaimer in separate sections to reduce legal ambiguity.","Keep the document scannable with short paragraphs and a compact summary rail.","Link to the terms directly from registration and pricing flows so consent is contextual."]},"code-block":{section:"Components",title:"Code Block",description:"A syntax-highlighted, read-only code display with optional filename label. Use it to render installation snippets, usage examples, or any formatted code string.",guidance:["Set the language prop to the language of the code — tsx, bash, json, etc. — for correct highlighting.","Pass a filename to give readers context on where the snippet belongs in a project.","Keep code snippets minimal; show only the lines needed to illustrate the concept being documented."]},"language-switcher":{section:"Components",title:"Language Switcher",description:"A locale toggle component that updates the entire UI copy when clicked. Drop it into any topbar or settings area — the i18n provider broadcasts the change automatically.",guidance:["Place the switcher in a persistent surface (topbar or settings page) so users can find it from anywhere.","The switcher reflects the current locale; no extra state wiring is needed beyond the i18n provider.","Use the inline variant for topbars and the default variant for settings pages to match visual density."]},"scroll-area":{section:"Layout",title:"ScrollArea",description:"A scrollable container with custom-styled scrollbars. Use it to constrain overflowing content to a fixed viewport with maxHeight or maxWidth.",guidance:["Set maxHeight to constrain vertical overflow — all content outside the viewport scrolls inside.",'Pass a number for pixels or a string like "50vh" for relative sizing.',"ScrollArea is purely presentational; it does not virtualize or lazy-render children."],props:[{prop:"maxHeight",type:"string | number",description:"Maximum height before content scrolls. Numbers are treated as pixels."},{prop:"maxWidth",type:"string | number",description:"Maximum width before content scrolls. Numbers are treated as pixels."},{prop:"children",type:"ReactNode",required:!0,description:"Content inside the scrollable viewport."}]},separator:{section:"Layout",title:"Separator",description:"A visual divider that separates content sections. Renders as an <hr> element with horizontal or vertical orientation.",guidance:["Use horizontal separators between stacked sections; use vertical ones in toolbars or inline contexts.","The decorative prop controls the role attribute — set to false when the separator conveys semantic meaning.","Vertical separators need an explicit height to render visibly."],props:[{prop:"orientation",type:'"horizontal" | "vertical"',default:'"horizontal"',description:"The axis of the separator line."},{prop:"decorative",type:"boolean",default:"true",description:'When true, sets role="none"; when false, role="separator" with aria-orientation.'}]},timeline:{section:"Components",title:"Timeline",description:"A vertical list of chronologically ordered events. Each item shows a title, optional description, time, icon, and status indicator.",guidance:["Use Timeline for activity feeds, order tracking, or deployment history.",'Set status to "success", "warning", "danger", or "info" to color the timeline dot.',"Pass an icon on individual items to replace the default dot icon."],props:[{prop:"items",type:"TimelineItem[]",required:!0,description:"Array of timeline entries."},{prop:"items[].title",type:"string",required:!0,description:"Event title."},{prop:"items[].description",type:"string",description:"Optional event description."},{prop:"items[].time",type:"string",description:"Timestamp or date label."},{prop:"items[].icon",type:"ReactNode",description:"Custom icon replacing the default dot."},{prop:"items[].status",type:'"default" | "success" | "warning" | "danger" | "info"',description:"Visual status color for the dot."}]},"tree-view":{section:"Components",title:"Tree View",description:"A hierarchical tree control with expandable/collapsible nodes, keyboard navigation, and optional selection state. Suitable for file browsers, organization charts, or nested settings.",guidance:["Use defaultExpanded to pre-expand certain nodes on initial render.","Each node requires a unique id for selection and expansion tracking.","TreeView supports controlled (selected/expanded) or uncontrolled modes via the corresponding props.","Disabled nodes cannot be selected or expanded but remain visible."],props:[{prop:"nodes",type:"TreeNode[]",required:!0,description:"Root-level tree nodes."},{prop:"selected",type:"string",description:"Controlled selected node id."},{prop:"defaultSelected",type:"string",description:"Uncontrolled initial selected node id."},{prop:"onSelect",type:"(id: string, node: TreeNode) => void",description:"Called when a node is selected."},{prop:"expanded",type:"string[]",description:"Controlled expanded node ids."},{prop:"defaultExpanded",type:"string[]",description:"Uncontrolled initial expanded node ids."},{prop:"onExpandedChange",type:"(ids: string[]) => void",description:"Called when expansion state changes."}]},carousel:{section:"Components",title:"Carousel",description:"A slide-based carousel with dot indicators, arrow navigation, optional auto-play, and loop support. Each slide accepts arbitrary React content.",guidance:["Set autoPlay for unattended rotation — useful for hero banners or kiosks.","Disable loop for linear walkthroughs where users should not wrap around.","Carousel respects controlled index via the index prop for external pagination sync.","Hide arrows or dots with showArrows / showDots when building minimal variants."],props:[{prop:"items",type:"ReactNode[]",required:!0,description:"Array of slide content."},{prop:"defaultIndex",type:"number",default:"0",description:"Initial slide index (uncontrolled)."},{prop:"index",type:"number",description:"Controlled current slide index."},{prop:"onIndexChange",type:"(index: number) => void",description:"Called when the active slide changes."},{prop:"autoPlay",type:"boolean",default:"false",description:"Automatically advance slides on an interval."},{prop:"interval",type:"number",default:"3000",description:"Auto-play interval in milliseconds."},{prop:"loop",type:"boolean",default:"true",description:"Wrap from last slide back to first."},{prop:"showDots",type:"boolean",default:"true",description:"Show dot indicators."},{prop:"showArrows",type:"boolean",default:"true",description:"Show prev/next arrow buttons."}]},toggle:{section:"Forms",title:"Toggle",description:"A two-state button that toggles between pressed and unpressed. ToggleGroup extends this to single/multiple selection among a set of options.",guidance:["Use Toggle for toolbar toggles (bold/italic, filter pills) and ToggleGroup for view mode switching.",'ToggleGroup type="single" behaves like a radio group; type="multiple" allows any combination.',"Both controlled (pressed/value) and uncontrolled (defaultPressed/defaultValue) modes are supported."],props:[{prop:"Toggle.pressed",type:"boolean",description:"Controlled pressed state."},{prop:"Toggle.defaultPressed",type:"boolean",default:"false",description:"Uncontrolled initial pressed state."},{prop:"Toggle.onPressedChange",type:"(pressed: boolean) => void",description:"Called when pressed state changes."},{prop:"Toggle.size",type:'"sm" | "md" | "lg"',default:'"md"',description:"Button size."},{prop:"ToggleGroup.items",type:"ToggleGroupItem[]",required:!0,description:"Array of toggle options."},{prop:"ToggleGroup.value",type:"string | string[]",description:"Controlled selection value."},{prop:"ToggleGroup.defaultValue",type:"string | string[]",description:"Uncontrolled initial selection."},{prop:"ToggleGroup.onValueChange",type:"(value: string | string[]) => void",description:"Called when selection changes."},{prop:"ToggleGroup.type",type:'"single" | "multiple"',default:'"single"',description:"Selection mode."}]},rating:{section:"Forms",title:"Rating",description:"A star-based rating input that supports whole and half-star precision, controlled/uncontrolled modes, and read-only or disabled states.",guidance:["Set allowHalf to permit half-star precision for detailed feedback.","Use readOnly for display-only ratings (historical averages) and disabled when interaction should be blocked entirely.","The size prop adjusts star dimensions for different visual contexts."],props:[{prop:"value",type:"number",description:"Controlled rating value."},{prop:"defaultValue",type:"number",default:"0",description:"Uncontrolled initial value."},{prop:"onChange",type:"(value: number) => void",description:"Called when the rating changes."},{prop:"max",type:"number",default:"5",description:"Maximum number of stars."},{prop:"allowHalf",type:"boolean",default:"false",description:"Allow half-star values."},{prop:"disabled",type:"boolean",description:"Disable interaction."},{prop:"readOnly",type:"boolean",description:"Display-only mode."},{prop:"size",type:'"sm" | "md" | "lg"',default:'"md"',description:"Star size."},{prop:"label",type:"string",description:"Accessible label for the rating group."}]},label:{section:"Forms",title:"Label",description:"A styled <label> element with an optional required indicator. Use it alongside any form control to provide accessible labelling.",guidance:["Always associate a Label with its form control — either by wrapping the input or using htmlFor.","Set required to automatically append a red asterisk after the label text.","Label is a thin wrapper; it passes all standard label attributes to the underlying element."],props:[{prop:"required",type:"boolean",description:"Show a required indicator (red asterisk) after the label text."},{prop:"children",type:"ReactNode",required:!0,description:"Label text content."}]},avatar:{section:"Content",title:"Avatar",description:"Displays a user avatar with image, fallback initials, or a placeholder icon. Supports multiple sizes and shapes.",guidance:["Always provide an accessible label via the name or alt prop.","The src prop accepts an image URL; on load failure it falls back to initials or fallback text.","Initials are generated from the name prop (up to 2 characters).","The circle shape is the default; use square for data-dense layouts."],props:[{prop:"src",type:"string",description:"Image URL for the avatar."},{prop:"name",type:"string",description:"User name used for initials and accessible label."},{prop:"size",type:'"xs" | "sm" | "md" | "lg" | "xl"',default:'"md"',description:"Avatar size."},{prop:"shape",type:'"circle" | "square"',default:'"circle"',description:"Avatar shape."},{prop:"fallback",type:"string",description:"Custom fallback text when no image or name is provided."}]},badge:{section:"Content",title:"Badge",description:"A compact label for status, category, or metadata. Use it inline with text or inside buttons, cards, and table cells.",guidance:["Use badges for compact status or category metadata, not decoration.","The accent variant is reserved for the primary brand color; success and warning convey semantic states.","Badges are inline elements — they flow naturally alongside text and other inline content."],props:[{prop:"variant",type:'"neutral" | "accent" | "success" | "warning"',default:'"neutral"',description:"Visual style variant."}]},skeleton:{section:"Content",title:"Skeleton",description:"A placeholder that mimics content shape while data loads. Supports text, rectangle, and circle variants, as well as multi-line text blocks.",guidance:["Match the skeleton shape to the real content to reduce layout shift.",'Use variant="text" with lines > 1 to simulate a paragraph placeholder.',"The last line of a multi-line text skeleton is shorter (70% width) to look more natural."],props:[{prop:"variant",type:'"text" | "rect" | "circle"',default:'"rect"',description:"Shape variant."},{prop:"width",type:"string | number",description:"Width. Numbers are treated as pixels."},{prop:"height",type:"string | number",description:"Height. Numbers are treated as pixels."},{prop:"lines",type:"number",default:"1",description:"Number of lines for text variant."}]},typography:{section:"Content",title:"Typography",description:"Heading and Text provide the core typography system. Heading renders <h1>-<h6> with level-based sizing; Text renders <p>, <span>, or <div> with variant, size, and weight options.",guidance:["Use Heading for section titles and hierarchical content structure.",'Use Text with variant="secondary" or "muted" for lower-emphasis content.',"The truncate prop clips overflow with an ellipsis — useful for table cells and sidebars.","Set the as prop on Heading to override the rendered HTML element without changing visual style."],props:[{prop:"Heading.level",type:"1 | 2 | 3 | 4 | 5 | 6",default:"2",description:"Heading level determines font size."},{prop:"Heading.as",type:'"h1" | "h2" | "h3" | "h4" | "h5" | "h6"',description:"Override the rendered HTML element."},{prop:"Heading.variant",type:'"default" | "secondary"',default:'"default"',description:"Visual variant."},{prop:"Heading.weight",type:'"normal" | "medium" | "semibold" | "bold"',default:'"bold"',description:"Font weight."},{prop:"Heading.truncate",type:"boolean",default:"false",description:"Truncate with ellipsis on overflow."},{prop:"Text.as",type:'"p" | "span" | "div"',default:'"p"',description:"Rendered HTML element."},{prop:"Text.variant",type:'"default" | "secondary" | "muted" | "danger" | "success"',default:'"default"',description:"Color variant."},{prop:"Text.size",type:'"sm" | "base" | "lg" | "xl"',default:'"base"',description:"Font size."},{prop:"Text.weight",type:'"normal" | "medium" | "semibold" | "bold"',default:'"normal"',description:"Font weight."},{prop:"Text.truncate",type:"boolean",default:"false",description:"Truncate with ellipsis on overflow."}]},"typography-base":{section:"Content",title:"Typography Base",description:"Ready-to-use typography CSS utilities and React components inspired by Bootstrap naming conventions. Ideal for articles, documentation, and API reference pages.",guidance:['Typography styles are loaded automatically when you import "vxui-react".',"Use className directly (e.g., vx-article, vx-section) or use React components (e.g., Article, Section).","All colors use CSS variables and automatically adapt to light/dark themes.","Built-in responsive breakpoints ensure a consistent experience on mobile and desktop."],props:[{prop:"Article",type:"Component",description:"Article container with standard document layout."},{prop:"ArticleHeader",type:"Component",description:"Article header containing title and description."},{prop:"ArticleTitle",type:"Component",description:"Article title (h1)."},{prop:"ArticleBody",type:"Component",description:"Article body container."},{prop:"Section",type:"Component",description:"Document section with anchor support."},{prop:"SectionHeading",type:"Component",description:"Section heading (h2) with optional anchor link."},{prop:"Pager",type:"Component",description:"Previous/next page navigation."},{prop:"PropsTable",type:"Component",description:"API props reference table."},{prop:"ArticleEmptyState",type:"Component",description:"Empty state display."},{prop:"StatsGrid",type:"Component",description:"Statistics metrics grid."}]},"date-pickers":{section:"Forms",title:"Date Pickers",description:"DatePicker provides a text-input with a popup calendar for date selection. Calendar is the standalone month-grid component used internally by DatePicker.",guidance:["Use DatePicker for form fields; use Calendar directly when embedding a date grid into a custom widget.","Set min/max to constrain the selectable date range.","The weekStartsOnMonday prop changes the first day of the week — default is Sunday.","DatePicker falls back to a Sheet-based layout on mobile viewports automatically."],props:[{prop:"DatePicker.value",type:"Date",description:"Controlled selected date."},{prop:"DatePicker.defaultValue",type:"Date",description:"Uncontrolled initial date."},{prop:"DatePicker.onChange",type:"(date: Date | undefined) => void",description:"Called when the date changes."},{prop:"DatePicker.label",type:"string",description:"Input label."},{prop:"DatePicker.hint",type:"string",description:"Helper text below the input."},{prop:"DatePicker.error",type:"string",description:"Error message."},{prop:"DatePicker.min",type:"Date",description:"Minimum selectable date."},{prop:"DatePicker.max",type:"Date",description:"Maximum selectable date."},{prop:"DatePicker.disabled",type:"boolean",description:"Disable the date picker."},{prop:"DatePicker.weekStartsOnMonday",type:"boolean",default:"false",description:"Start the week on Monday instead of Sunday."},{prop:"Calendar.value",type:"Date",description:"Controlled selected date."},{prop:"Calendar.defaultValue",type:"Date",description:"Uncontrolled initial date."},{prop:"Calendar.onChange",type:"(date: Date) => void",description:"Called when a date is clicked."},{prop:"Calendar.min",type:"Date",description:"Minimum selectable date."},{prop:"Calendar.max",type:"Date",description:"Maximum selectable date."},{prop:"Calendar.weekStartsOnMonday",type:"boolean",default:"false",description:"Start the week on Monday."}]},card:{section:"Content",title:"Card",description:"A flexible content container with multiple visual variants. Use Card as the outer wrapper, then compose CardHeader, CardTitle, CardDescription, and CardContent inside.",guidance:["Use the elevated variant for interactive cards that invite clicks.","Set hoverable to add a lift effect on hover — ideal for gallery or dashboard tiles.","Padding defaults to the card’s internal spacing; use the padding prop to adjust for dense or spacious layouts.","Card itself is a <section> — always include a heading (CardTitle) for accessibility."],props:[{prop:"variant",type:'"default" | "flat" | "elevated" | "outlined" | "ghost" | "filled"',default:'"default"',description:"Visual style preset."},{prop:"padding",type:'"none" | "sm" | "md" | "lg"',description:"Inner padding size. Defaults to the card's internal spacing."},{prop:"hoverable",type:"boolean",default:"false",description:"Add a hover lift effect — useful for clickable cards."}]},form:{section:"Forms",title:"Form",description:"A form composition system built from Form, FormField, FormLabel, FormDescription, FormMessage, and useFormField. Works with any input component to provide consistent label, hint, and error layout.",guidance:["Wrap each logical field group in a FormField to share error state via context.","Use FormLabel with required to show a required indicator automatically.","FormMessage renders the error from FormField context — no manual prop drilling needed.","Form sets noValidate by default; handle validation yourself or with a library."],props:[{prop:"Form",type:"—",description:"Standard <form> wrapper with noValidate and vx-form class."},{prop:"FormField",type:"—",description:"Wraps a field group; provides error context to FormMessage."},{prop:"FormField.error",type:"string",description:"Error message shown by FormMessage in this field."},{prop:"FormLabel",type:"—",description:"Renders a <label> with an optional required asterisk."},{prop:"FormLabel.required",type:"boolean",description:"Shows a red asterisk after the label text."},{prop:"FormDescription",type:"—",description:"Helper text rendered below the label."},{prop:"FormMessage",type:"—",description:"Error or helper message; auto-reads error from FormField context."},{prop:"useFormField",type:"() => { error?: string }",description:"Hook to read the current field's error context."}]},sheet:{section:"Overlays",title:"Sheet",description:"A slide-out panel that enters from the left, right, top, or bottom edge. Supports title, description, optional confirm action, and controlled or uncontrolled open state.",guidance:["Use Sheet for secondary content that does not require a full page navigation.",'Set side to "right" for detail panels, "bottom" for mobile-like action sheets.','The variant="action" preset hides the close button and shows a confirm footer — suitable for destructive or confirm actions.',"Control open state with the open/onOpenChange props or use defaultOpen for uncontrolled usage."],props:[{prop:"trigger",type:"ReactNode",description:"Element that opens the sheet on click."},{prop:"children",type:"ReactNode",required:!0,description:"Sheet body content."},{prop:"side",type:'"left" | "right" | "top" | "bottom"',default:'"right"',description:"Edge from which the sheet slides in."},{prop:"variant",type:'"default" | "action"',default:'"default"',description:'"action" hides close button and shows a confirm footer.'},{prop:"title",type:"ReactNode",description:"Sheet header title."},{prop:"description",type:"ReactNode",description:"Sheet header description."},{prop:"header",type:"ReactNode",description:"Custom header content (replaces title/description)."},{prop:"footer",type:"ReactNode",description:"Custom footer content."},{prop:"open",type:"boolean",description:"Controlled open state."},{prop:"defaultOpen",type:"boolean",description:"Uncontrolled initial open state."},{prop:"onOpenChange",type:"(open: boolean) => void",description:"Callback when open state changes."},{prop:"showClose",type:"boolean",default:"true",description:"Show the close button in the header."},{prop:"closeOnOverlayClick",type:"boolean",default:"true",description:"Close when clicking the backdrop."},{prop:"showConfirm",type:"boolean",default:"false",description:"Show a confirm button in the footer."},{prop:"confirmText",type:"string",default:'"Confirm"',description:"Confirm button label."},{prop:"confirmDisabled",type:"boolean",default:"false",description:"Disable the confirm button."},{prop:"onConfirm",type:"() => void",description:"Callback when confirm is clicked."},{prop:"width",type:"number",description:"Custom panel width in pixels."}]}}},ci={locale:"zh",label:"中文",searchPlaceholder:"搜索组件、页面、关键词…",searchAriaLabel:"搜索",searchEmpty:t=>`未找到与"${t}"匹配的结果`,searchNavigate:"导航",searchGo:"跳转",searchClose:"关闭",sidebarCollapse:"收起",sidebarExpand:"展开",sidebarCloseLabel:"关闭侧边栏",searchTrigger:"搜索",versionLabel:Te,mobilePreview:"移动端预览",nav:{gettingStarted:"开始使用",layout:"布局",content:"内容",forms:"表单",components:"组件",overlays:"浮层",navigation:"导航",feedback:"反馈",templates:"模板",mobile:"响应式"},pages:{introduction:"简介","quick-start":"快速开始","shell-sidebar":"框架与侧边栏","grid-page":"网格与页面","nav-layout":"导航与布局","scroll-area":"滚动区域",separator:"分隔线",resizable:"可拖拽面板",typography:"排版","typography-base":"排版基础",badge:"徽章",avatar:"头像",skeleton:"骨架屏",card:"卡片","code-block":"代码块","language-switcher":"语言切换器",button:"按钮",elements:"基础元素","form-controls":"表单控件","form-inputs":"表单输入",toggle:"开关按钮",rating:"评分",label:"标签","date-pickers":"日期选择器","file-upload":"文件上传","color-picker":"颜色选择器",form:"表单组合",accordion:"折叠面板",tabs:"标签页",breadcrumb:"面包屑",pagination:"分页",stepper:"步骤条",progress:"进度条",spinner:"加载器",alert:"提示",toasts:"消息提示",table:"表格","data-list":"数据列表",timeline:"时间线","tree-view":"树形视图",carousel:"轮播","empty-states":"空状态",overlays:"浮层","data-display":"数据展示",navigation:"导航",feedback:"反馈组件",dialog:"弹窗","alert-dialog":"确认弹窗",sheet:"侧滑面板",popover:"弹出框",tooltip:"工具提示","hover-card":"悬停卡片","dropdown-menu":"下拉菜单","context-menu":"右键菜单","command-palette":"命令面板","navigation-menu":"导航菜单",menubar:"菜单栏",mobile:"移动端组件","mobile-list":"移动端列表","home-page":"主页","login-page":"登录页","register-page":"注册页","error-page":"错误页","privacy-policy":"隐私政策","terms-of-service":"服务条款"},docs:{guidance:"使用指南",guidanceDesc:"保持实现简洁,让设计系统完成大部分视觉工作。",preview:"预览",previewDesc:"该区域在系统中呈现效果的精简示例。",notes:"备注",primaryTheme:"主色调",primaryThemeDesc:"蓝灰色中性调将视觉重点保留给操作,而非装饰。",tokenScale:"Token 体系",tokenScaleDesc:"在引入页面特定样式之前,优先复用共享的 surface、border 和 text 变量。",themeStudio:"主题工作室",themeStudioDesc:"一次注册命名主题,用单个 key 即可切换所有组件。",liveControls:"交互控件",liveControlsDesc:"文档界面中仍有若干可复用的基础原语。",searchDocs:"搜索文档",searchDocsPlaceholder:"按钮、Token、布局…",compactDensity:"紧凑模式",compactDensityDesc:"收紧垂直间距,适合高密度操作界面。",systemPreview:"系统预览",openSection:"打开章节"},intro:{tagline:"一个轻量无依赖的 UI 框架,用于构建简洁的后台管理界面。设计 Token、组件和极简 SPA 运行时,统一在一套一致的视觉语言之下。",getStarted:"开始使用",browseComponents:"浏览组件",atAGlance:"概览",designTokens:"设计 Token",designTokensLead:"所有颜色、间距和字体值均以 vx 命名空间下的 CSS 自定义属性暴露。一次注册命名的亮色和暗色主题,之后通过主题 key 即可切换整个框架。",componentFamilies:"组件系列"},glance:{zeroDeps:"零依赖",zeroDepsHint:"原始 shell 运行时无需构建流水线。",components:"组件数",componentsHint:"布局、表单、反馈和列表原语,一套搞定。",coreCSS:"核心 CSS",coreCSSHint:"中性 Token 和结构样式保持精简。",darkMode:"深色模式",darkModeHint:"语义变量让相同组件可在多主题下复用。"},tokens:{primary:"主色",primaryDesc:"用于主要操作、活跃导航和强调的点缀色。",surface:"表面色",surfaceDesc:"文档卡片和框架区域的默认面板与内容背景色。",border:"边框色",borderDesc:"保持 UI 结构清晰且不增加视觉重量的轻量分隔色。",text:"文字色",textDesc:"用于标题、密集数据和正文的主前景色。"},families:{layout:"布局",layoutDesc:"应用框架、固定顶栏、章节节奏和响应式内容框架。",content:"内容展示",contentDesc:"排版、徽章、头像、卡片和代码块。",elements:"基础元素",elementsDesc:"用于操作、元数据和结构化内容块的低调原语。",forms:"表单",formsDesc:"输入框、开关、对话框和字段组合模式。",inputs:"输入类",inputsDesc:"文本输入框、下拉选择、文本域和数字选择器。",overlays:"浮层",overlaysDesc:"弹窗、弹出框、工具提示和侧滑面板。",navigation:"导航",navigationDesc:"菜单、导航栏和面包屑。",feedback:"反馈",feedbackDesc:"短暂的消息提示与打断性确认流程。"},dataList:{name:"名称",kind:"类型",updated:"更新时间"},modeLabel:t=>`${{light:"浅色",dark:"深色",black:"纯黑"}[t]??t}模式`,publicPages:{navLogin:"登录",navSignup:"注册",navDocs:"文档",navLogout:"退出登录",heroTag:`最新 · ${Te}`,heroTitle:"轻量 React 组件库",heroLead:"零依赖 · 30+ 组件 · 内置主题与深色模式",heroCta:"立即开始",heroCtaAlt:"浏览文档",previewLead:"",previewAccessTitle:"访问方式",previewAccessMember:"登录后保留会话状态,随时回到你的工作区。",previewAccessGuest:"无需登录,直接以访客身份访问文档。",previewMobileTitle:"移动端适配",previewMobileLead:"导航与认证布局在移动端自然适配。",featuresSectionTitle:"为什么选择 vxUI",feat1:"零依赖",feat1Desc:"纯 CSS + TypeScript,无第三方依赖。",feat2:"30+ 组件",feat2Desc:"布局、表单、反馈和列表,一套搞定。",feat3:"可主题化",feat3Desc:"CSS 变量驱动,一键切换整套主题。",feat4:"深色模式",feat4Desc:"语义化 Token,浅色与深色主题均适配。",footerCopy:"© 2026 vxUI. 保留所有权利。",footerPrivacy:"隐私政策",footerGithub:"GitHub",footerWebsite:"官网",loginTitle:"欢迎回来",loginSubtitle:"登录以访问文档。",loginEmail:"邮箱",loginEmailPlaceholder:"you@example.com",loginPassword:"密码",loginPasswordPlaceholder:"至少 8 位字符",loginCta:"登录",loginNoAccount:"还没有账号?",loginRegister:"注册",loginGuest:"无需登录,直接继续 →",rememberMe:"记住这台设备",showPassword:"显示",hidePassword:"隐藏",authInfoTitle:"支持访客访问",authInfoBody:"如果你只是想查看文档,可以不登录直接进入。登录仅用于演示持久化会话的真实流程。",registerTitle:"创建账号",registerSubtitle:"立即开始使用 vxUI。",registerName:"姓名",registerNamePlaceholder:"张三",registerEmail:"邮箱",registerEmailPlaceholder:"zhangsan@company.com",registerPassword:"密码",registerPasswordPlaceholder:"创建一个强密码",registerTermsAgree:"我同意",registerTermsLink:"服务条款",registerTermsAnd:"和",registerPrivacyLink:"隐私政策",registerCta:"创建账号",registerHasAccount:"已有账号?",registerLogin:"登录",registerGuest:"无需登录,直接继续 →",validationNameRequired:"请输入你的姓名。",validationNameShort:"姓名至少需要 2 个字符。",validationEmailRequired:"请输入邮箱地址。",validationEmailInvalid:"请输入有效的邮箱地址。",validationPasswordRequired:"请输入密码。",validationPasswordShort:"密码至少需要 8 位字符。",validationTermsRequired:"创建账号前必须同意条款。",sessionLoginTitle:"已登录",sessionLoginBody:"你的会话已生效,现在可以以登录用户身份查看文档。",sessionRegisterTitle:"账号已创建",sessionRegisterBody:"示例账号已创建完成,文档后台现已可用。",sessionGuestTitle:"当前为访客模式",sessionGuestBody:"你正在无账号状态下浏览文档。",sessionLogoutTitle:"已退出登录",sessionLogoutBody:"持久化会话已清除,你已返回公共首页。",signedInAs:"当前登录",guestLabel:"访客",backHome:"← 返回首页",backToDocs:"返回文档"},pageDefs:{introduction:{section:"介绍",title:"简介",description:"一个轻量无依赖的 UI 框架,用于构建简洁的后台管理界面。设计 Token、组件和极简 SPA 运行时,统一在一套一致的视觉语言之下。",guidance:["先从框架和导航节奏开始,再对独立控件进行样式调整。","保持 Token 语义化,主题切换时无需逐页覆盖样式。","将文档、示例和生产界面视为同一套设计系统。"]},"quick-start":{section:"安装",title:"快速开始",description:"安装包,用 Provider 包裹应用,在组合业务页面前先挂载页面框架。",guidance:["在应用根组件附近统一引入共享样式表。","使用 AppShell 承载产品外壳,页面内容保持在 main 插槽内。","仅在应用需要时才添加 ThemeProvider 和 ToastProvider。"]},"shell-sidebar":{section:"组件",title:"框架与侧边栏",description:"Shell 负责侧边栏层级、固定顶栏间距和内容宽度。导航项支持通过 `children` 字段嵌套子菜单,点击父级项可展开或折叠子项。",guidance:["保持导航标签简短,确保折叠模式下仍可快速扫读。","使用章节标题分隔页面分组,而非添加视觉噪音。","在导航项中添加 `children` 即可实现可展开子菜单;设置 `defaultOpen: true` 可默认展开。","如果某子项为 active 状态,AppShell 会自动展开对应父级分组。",'你可以通过 `sidebarWidth` 属性轻松配置侧边栏的固定宽度(例如 `sidebarWidth={280}` 或 `"18rem"`)。'],props:[{prop:"brand",type:"string",default:'"VXUI"',description:"侧边栏顶部显示的品牌/产品名称。"},{prop:"brandCaption",type:"string",description:"品牌名称下方显示的次级说明文字。"},{prop:"brandIcon",type:"ReactNode",description:"侧边栏顶部渲染的 Logo 元素(图片或图标)。"},{prop:"title",type:"string",description:"顶栏中显示的页面标题。"},{prop:"description",type:"string",description:"顶栏标题下方的页面副标题/描述。"},{prop:"breadcrumb",type:"ReactNode",description:"顶栏中渲染的面包屑元素。"},{prop:"navSections",type:"AppShellNavSection[]",description:"按章节分组的结构化导航树。推荐优先使用此属性。"},{prop:"navItems",type:"AppShellNavItem[]",description:"平铺导航列表,自动归入单个无标题章节。"},{prop:"sidebarCollapsed",type:"boolean",default:"false",description:"将侧边栏折叠为仅显示图标的窄轨模式。"},{prop:"sidebarWidth",type:"number | string",default:"240px",description:'自定义侧边栏宽度,数字为 px 单位(如 280),也可传入 CSS 字符串(如 "18rem")。'},{prop:"density",type:'"comfortable" | "compact"',description:'布局密度。"compact" 收紧垂直间距,适合高密度操作界面。'},{prop:"headerActions",type:"ReactNode",description:"顶栏右侧操作区插槽(按钮、下拉菜单、用户菜单等)。"},{prop:"sidebarFooter",type:"ReactNode",description:"侧边栏底部内容插槽(用户信息、设置链接等)。"},{prop:"mobileNavOpen",type:"boolean",default:"false",description:"控制移动端导航遮罩层是否显示。"},{prop:"onSidebarToggle",type:"() => void",description:"点击折叠/展开按钮时的回调。"},{prop:"onMobileNavToggle",type:"() => void",description:"移动端导航遮罩切换按钮的回调,提供后才会启用移动端导航。"},{prop:"children",type:"ReactNode",required:!0,description:"渲染在 ShellContent 内的主页面内容。"}]},"grid-page":{section:"组件",title:"网格与页面",description:"为卡片、Token 和文档块使用简单的响应式网格。页面表面应保持中性,由内容承载视觉重点。",guidance:["在密集文档界面中优先使用 12 至 16 像素的间距。","较大间距应保留给章节边界,而非每张卡片。","限制最大宽度,确保长段落保持可读性。"]},button:{section:"组件",title:"按钮",description:"按钮承担系统中的主操作层级。变体、尺寸和宽度应该直接表达操作意图,而不需要额外拼样式。",guidance:["在同一区域内,实心按钮通常只保留给一个主操作。","次级和幽灵按钮更适合辅助动作,避免和主操作竞争视觉优先级。","在移动端单列布局或堆叠表单中,优先使用 fullWidth 提升点击面积。"]},elements:{section:"组件",title:"基础元素",description:'Button 构成操作的原子基础。其他原子组件(Badge、Text、Heading、CodeBlock、LanguageSwitcher)各有独立文档页,位于"内容展示"分类下。',guidance:["每个区域通常一个主操作就足够了。","使用 solid 变体作为区域内的主操作。","使用 secondary 或 ghost 变体作为辅助操作。"]},"form-controls":{section:"组件",title:"表单控件",description:"完整的表单原语集:单行输入框、多行文本域、可搜索单选下拉(Select)、带标签显示的多选下拉(MultiSelect)和时间选择器(TimePicker)。所有组件共享统一的 label / hint / error 布局体系。",guidance:["在管理界面中,表单控件始终应配有可见标签。","使用 Select 实现单选下拉;通过 `searchable={N}` 可设为仅当选项超过 N 条时显示搜索框。","当用户需要从有限列表中选择多个值时,使用 MultiSelect。","TimePicker 支持 24 小时制,通过 `seconds` prop 可启用秒选择列。","简短的辅助文本优于仅依赖 placeholder 的说明。"]},navigation:{section:"组件",title:"导航",description:"导航模式应首先传达位置,其次才是可用的移动方向。Tabs 最适合在单个页面上下文中切换兄弟视图。",guidance:["在控件结构中镜像信息架构。","使活跃状态明显,而不仅依赖颜色。","避免在一个控件中混用路由导航和本地视图状态。"]},"data-list":{section:"组件",title:"数据列表",description:"列表和表格应优先考虑扫读效率而非装饰。使用宽松的对齐、轻量分隔线,仅在需要时增加操作密度。",guidance:["精确对齐表头和行内容,减少视觉偏移。","使用细微边框而非为每一行添加重型卡片外壳。","将破坏性操作保留在行操作组中,而非内联文字链接。"]},dialog:{section:"浮层",title:"弹窗",description:"中断用户操作以确认操作或展示关键信息的模态对话框。支持多种尺寸、放置选项和关闭按钮。",guidance:["在需要用户做出决定才能继续时使用 Dialog。",'"sm" 适用于快速确认,"lg" 适用于表单或详细信息展示。',"Dialog 会捕获焦点并阻止与背景页面的交互。"]},popover:{section:"浮层",title:"弹出框",description:"可包含表单、按钮和结构化内容的丰富弹出面板。与 Tooltip 不同,Popover 可包含交互元素,需要明确的关闭操作。",guidance:["Popover 可包含交互内容——表单、按钮、链接。","始终提供关闭机制(点击外部或显式关闭按钮)。","Tooltip 用于只读标签,Popover 用于交互内容。"]},tooltip:{section:"浮层",title:"工具提示",description:"悬停或聚焦时出现的简短非交互标签,用于描述 UI 元素。仅包含文本——无链接、按钮或表单。",guidance:["Tooltip 仅用于补充文本——绝不可放入交互内容。","Tooltip 在悬停和聚焦时出现,无需关闭操作。","保持 Tooltip 文本简短——一到五个词为最佳。"]},"hover-card":{section:"浮层",title:"悬停卡片",description:"悬停时出现的卡片,展示链接元素的更丰富预览。适用于用户资料、文档预览或引用摘要。",guidance:["使用 HoverCard 预览相关内容,无需导航离开。","HoverCard 可包含比 Tooltip 更丰富的内容——图片、元数据、链接。","确保触发器区域足够大,避免卡片在到达前消失。"]},"dropdown-menu":{section:"浮层",title:"下拉菜单",description:"点击时打开的菜单,展示分组操作或导航项列表。支持嵌套分组、键盘导航和禁用项。",guidance:["在带标签的菜单组中对相关操作分组。","在无关操作组之间使用分隔线。","支持键盘导航——方向键、Enter 和 Escape。"]},"context-menu":{section:"浮层",title:"右键菜单",description:"右键点击时出现的菜单,提供与点击元素相关的操作列表。支持与 DropdownMenu 相同的项和分组 API。",guidance:["使用 ContextMenu 公开用户通过右键发现的次要操作。","始终提供访问相同操作的替代方式(工具栏、按钮)。","保持菜单简短——长右键菜单难以快速扫读。"]},"command-palette":{section:"浮层",title:"命令面板",description:"键盘驱动的搜索浮层,让用户无需离开键盘即可跳转到任意页面或触发任意操作。全局挂载、绑定快捷键,传入扁平的条目列表即可使用。",guidance:["保持条目列表扁平且按标签可搜索——避免隐藏分类嵌套。","从与侧边栏相同的导航数据填充条目,保持两个入口同步。","绑定 ⌘K(Mac)或 Ctrl+K(Windows)快捷键。"]},"navigation-menu":{section:"导航",title:"导航菜单",description:"支持悬停时多级下拉菜单的横向导航栏。适用于具有嵌套章节的顶级站点导航。",guidance:["在具有多层内容的站点级导航中使用 NavigationMenu。","每个项可包含子项用于次级导航。","保持顶级项简短——每个一两个词即可。"]},menubar:{section:"导航",title:"菜单栏",description:"通常用于应用级操作(文件、编辑、视图)的横向菜单栏。支持菜单间的键盘导航。",guidance:["Menubar 遵循桌面应用惯例——用于应用级命令菜单。","每个菜单可包含项、分组和分隔线。","方向键在菜单间导航;Escape 关闭当前菜单。"]},resizable:{section:"布局",title:"可拖拽面板",description:"由 ResizablePanelGroup、ResizablePanel 和 ResizableHandle 组成的分割面板布局组件,支持水平和垂直排列且分隔线可拖拽。",guidance:["使用 ResizablePanelGroup 作为外层容器,内部嵌套 ResizablePanel 和 ResizableHandle。",'direction 设为 "horizontal" 实现左右布局,"vertical" 实现上下布局。',"面板之间的拖拽手柄可拖动调整各面板尺寸。"]},"file-upload":{section:"表单",title:"文件上传",description:"支持拖拽上传和点击浏览的文件上传区域。支持多文件上传、预览和移除。",guidance:["使用 multiple 属性接受多个文件——每个文件以预览卡片展示。","通过 onChange 回调获取上传文件的信息(名称、大小和文件对象)。","组件自带拖拽状态管理和视觉反馈。"]},"color-picker":{section:"表单",title:"颜色选择器",description:"弹出式颜色选择控件,包含色相、饱和度和亮度滑块。支持预设色板和自定义十六进制输入。",guidance:["适用于品牌颜色配置、标签颜色或主题自定义。","同时提供可视化选取器和精确十六进制输入。","可通过 swatches 属性定制品牌专属色板。"]},accordion:{section:"组件",title:"折叠面板",description:"垂直堆叠的可折叠面板列表。每个面板有可切换展开/折叠的标题区域。支持单面板和双面板同时展开。",guidance:["适用于 FAQ、设置面板和渐进式披露模式。",'默认每次只能展开一个面板(type="single")。',"设置 allowMultiple 可允许多个面板同时保持展开状态。"]},tabs:{section:"组件",title:"标签页",description:"用于在多个内容面板间切换的标签页组件。支持受控和非受控模式及键盘导航。",guidance:["使用 Tabs 将相关内容组织到独立面板中,无需跳转到新页面。","TabsList 存放触发按钮,TabsContent 存放面板内容。","非受控使用 defaultValue,受控模式使用 value/onValueChange。"]},breadcrumb:{section:"组件",title:"面包屑",description:"显示用户在页面层级中当前位置的导航辅助。每个分段对应相应层级的链接。",guidance:["面包屑反映 URL 深度——单层页面可完全省略。","使用 separator 属性自定义分段之间的分隔符。","最后一个分段应为当前页面(非链接),以确保无障碍。"]},pagination:{section:"组件",title:"分页",description:"将大数据集分页展示的导航控件。显示页码及上/下翻页按钮,可选页面大小选择器。",guidance:["显示总页数,让用户了解数据集大小。","使用 siblings 属性控制在当前页周围显示的页码数量。","onPageChange 回调返回新页码,用于外部数据加载。"]},stepper:{section:"组件",title:"步骤条",description:"在线性工作流中可视化用户当前位置的多步骤进度指示器。支持已完成、进行中、待处理和错误状态。",guidance:["适用于多页表单、结账流程或设置向导。",'每一步可以是 "completed"、"active"、"pending" 或 "error" 状态。',"错误状态的步骤将吸引注意力,方便用户导航回去修复。"]},progress:{section:"组件",title:"进度条",description:"指示确定性操作完成百分比的横向进度条。支持带标签和不带标签的变体。",guidance:["对已知持续时间的确定性操作使用 Progress(如文件上传、数据导出)。","对未知持续时间的等待使用 Spinner。","value 属性接受 0-100 范围的值,100 表示完成。"]},spinner:{section:"组件",title:"加载器",description:"用于不确定等待状态的旋转指示器。在内容正在加载或处理且时长未知时使用。",guidance:["对短暂且剩余时间未知的等待使用 Spinner。","对已知持续时间的确定性操作使用 Progress。",'Spinner 支持 size 属性("sm"、"md"、"lg")以匹配周围上下文。']},alert:{section:"组件",title:"提示",description:"传达成功、警告、危险或信息状态的重要状态消息。用户可选择关闭。",guidance:["对持久性或页面级状态消息使用 Alert——重要信息优先于 Toast。",'支持 "info"、"success"、"warning" 和 "danger" 变体。',"dismissible 属性可添加关闭按钮,用户可手动关闭提示。"]},table:{section:"组件",title:"表格",description:"支持可排序列、可选斑马纹和响应式溢出的数据表格。适用于以列排序方式列示结构化数据。",guidance:["Table 支持可排序列——后端数据时请将排序状态向上委托。","在密集表格中使用斑马纹可帮助视线跟踪对齐。","columns 属性定义表头;每列可设置 sortKey 实现客户端排序。"]},"empty-states":{section:"组件",title:"空状态",description:"空状态应解释缺少什么、为何重要以及下一步操作是什么。它不应让用户感到走投无路。EmptyState 组件提供了包含图标、标题、描述和操作插槽的一致布局。",guidance:["指明缺失的对象,让用户清楚自己在看什么。","通过 action 属性提供一个清晰的恢复操作。","视觉重量应轻于成功或警告反馈。"],props:[{prop:"icon",type:"ReactNode",description:"标题上方展示的插画或图标。"},{prop:"title",type:"string",required:!0,description:"解释缺失对象的主标题。"},{prop:"description",type:"string",description:"标题下方的可选说明文字。"},{prop:"action",type:"ReactNode",description:"用于恢复的操作按钮或链接。"}]},toasts:{section:"组件",title:"消息提示",description:"Toast 在不打断任务流程的情况下确认短暂事件。保持简洁、具体且易于关闭。",guidance:["使用 success 和 info 确认后台操作。","将阻塞性或破坏性状态升级为对话框,而非堆叠 Toast。","避免在每次页面切换时重复相同消息。"]},feedback:{section:"反馈",title:"反馈组件",description:"Alert、Progress、Spinner、Stepper 和 Toast 在不阻塞布局的情况下指示应用状态。",guidance:["对短暂的不确定等待使用 Spinner;对确定性操作使用 Progress。","对持久性或页面级状态消息,优先使用 Alert 而非 Toast。"]},overlays:{section:"组件",title:"浮层",description:"Dialog、ContextMenu、HoverCard、Tooltip、Popover 和 DropdownMenu 在页面上方将临时内容和操作置于上方。",guidance:["Tooltip 仅用于补充文本,绝不放置可交互内容。","Popover 可包含表单和富内容;需要明确的关闭触发器。","DropdownMenu 应对相关操作分组,并支持键盘导航。"]},"nav-layout":{section:"布局",title:"导航与布局",description:"Tabs、Accordion、Breadcrumb 和 Resizable 帮助结构化展示内容。其他布局组件(ScrollArea、Separator)各有独立文档页。",guidance:["Breadcrumb 反映路由深度——单层页面可省略。","Pagination 应显示总页数,让用户了解数据集大小。","Accordion 最适合渐进式披露,而非主导航。"]},"data-display":{section:"组件",title:"数据展示",description:"Table 和 EmptyState 以紧凑方式呈现结构化数据。其他数据组件(Avatar、Badge、Card、Carousel、Timeline、TreeView)各有独立文档页。",guidance:["Table 支持可排序列——后端数据时请将排序状态向上委托。","在密集表格中使用斑马纹可帮助视线在大段行间对齐追踪。","EmptyState 应尽可能包含一个明确的恢复操作。"]},"form-inputs":{section:"表单",title:"表单输入",description:"Checkbox、Radio、Switch、Slider、NumberInput、TagInput、SegmentedControl 和 Input 在文本输入框之外扩展了表单词汇。其他表单组件(Label、Toggle、Rating、DatePicker)各有独立文档页。",guidance:["使用 RadioGroup 对单选按钮分组,共享 name 和语义。","Slider 适合数值范围,配合 showValue 可提供即时反馈。","Textarea 默认可垂直调整尺寸——仅在固定高度容器中禁用调整。","Switch 用于即时状态切换(如设置开关),Checkbox 用于表单提交或多选。"]},"mobile-list":{section:"响应式",title:"移动端列表",description:"MobileList、MobileListSection 和 MobileListItem 提供原生感的列表,适用于移动端导航、设置和数据展示。每个条目支持前置图标、尾部内容、箭头指示器以及破坏性或禁用状态。",guidance:["使用 MobileListSection 的 title 属性对相关条目分组。","对于导航到详情页的条目设置 chevron 箭头——静态或切换条目省略。","对于不可逆操作(删除、退出、移除)使用 destructive 样式,文字变红。","禁用条目以低视觉权重渲染并阻止点击事件。"],props:[{prop:"MobileList",type:"—",description:"带列表样式的根 <ul> 元素。"},{prop:"MobileListSection.title",type:"string",description:"分组标题文字。"},{prop:"MobileListItem.leading",type:"ReactNode",description:"左侧图标或头像。"},{prop:"MobileListItem.trailing",type:"ReactNode",description:"右侧自定义内容(徽章、数值等)。"},{prop:"MobileListItem.label",type:"ReactNode",required:!0,description:"主标签文字。"},{prop:"MobileListItem.description",type:"ReactNode",description:"次要描述文字。"},{prop:"MobileListItem.chevron",type:"boolean",default:"false",description:"显示右侧箭头。"},{prop:"MobileListItem.destructive",type:"boolean",default:"false",description:"破坏性操作样式(红色文字)。"},{prop:"MobileListItem.disabled",type:"boolean",default:"false",description:"禁用条目。"},{prop:"MobileListItem.onClick",type:"() => void",description:"点击回调。"}]},mobile:{section:"响应式",title:"响应式布局",description:"一套同时覆盖手机、平板与桌面的响应式系统。通过布局与密度变化适配不同设备,而不是维护两套应用与两套页面树。",guidance:["保持所有断点上的路由树一致,只调整壳层结构和内容密度。","在窄屏上把常驻侧边导航转成抽屉,而不是复制一套页面实现。","让卡片、表单和表格从三列到单列平滑重排,不改变组件归属。"]},"home-page":{section:"模板",title:"主页",description:"带有 Hero 区块、核心功能亮点和主要行动召唤按钮的落地式主页。适用于产品官网、内部门户和营销页面。",guidance:["Hero 信息保持一句话——让行动召唤按钮来完成说服工作。","功能卡片各自聚焦一个问题,而非罗列所有能力。","主操作与次操作相配合,降低用户决策疲劳。"]},"login-page":{section:"模板",title:"登录页",description:"居中的极简登录表单。清晰的标签、可见的错误状态和单一主操作,降低登录摩擦。",guidance:["不要隐藏密码标签——仅靠 placeholder 无法满足无障碍要求。","字段失去焦点后立即显示内联校验错误。","提供密码可见切换,降低登录摩擦。"]},"register-page":{section:"模板",title:"注册页",description:"只收集创建账号所需最少字段的注册表单。通过仅询问必要信息来降低注册阻力。",guidance:["注册时只需姓名、邮箱和密码——个人资料可在之后完善。","内联显示密码强度,但不因细微问题阻止提交。","服务条款复选框必须明确,不得预先勾选。"]},"error-page":{section:"模板",title:"错误页",description:"404、500 及其他错误状态的优雅降级页面。给用户清晰的解释和直接返回的路径。",guidance:["说明错误码和通俗解释——避免技术术语。",'始终提供"返回首页"和"后退"两个操作。',"错误页的视觉风格应与产品保持一致,而非系统默认页。"]},"privacy-policy":{section:"模板",title:"隐私政策",description:"带有章节标题、可读段落和清晰分隔线的结构化法律文档页面。在不牺牲完整性的前提下保持无障碍和可扫读性。",guidance:["使用标题将长篇政策文本分成可扫读的章节。","从任何引用政策的同意流程中直接链接到相关章节。","在顶部注明政策版本和日期,让用户了解最近更新时间。"]},"terms-of-service":{section:"模板",title:"服务条款",description:"具备清晰标题、通俗义务说明且在手机到桌面端都保持可读性的服务条款页面。",guidance:["将许可范围、使用限制和免责声明拆成独立段落,降低法律歧义。","正文使用短段落与摘要侧栏,保证长文档依旧可扫读。","在注册和定价流程中直接链接条款页面,让同意动作具备上下文。"]},"code-block":{section:"组件",title:"代码块",description:"带语法高亮的只读代码展示组件,支持可选的文件名标签。用于渲染安装步骤、用法示例或任意格式化的代码字符串。",guidance:["通过 language 属性指定代码语言(tsx、bash、json 等),以获得正确高亮。","传入 filename 可为读者提供该代码片段在项目中所属位置的上下文。","保持示例代码精简——只展示说明当前概念所需的最少行数。"]},"language-switcher":{section:"组件",title:"语言切换器",description:"点击后即可更新整套 UI 文案的语言切换组件。放入任意顶栏或设置区域——i18n Provider 会自动广播变更,无需额外状态绑定。",guidance:["将切换器放置在持久性界面(顶栏或设置页)中,方便用户在任何位置找到它。","切换器自动反映当前语言,除 i18n Provider 外无需额外的状态绑定。","顶栏中使用 inline 变体,设置页中使用默认变体,以匹配对应场景的视觉密度。"]},"scroll-area":{section:"布局",title:"滚动区域",description:"一个带有自定义滚动条的滚动容器。使用 maxHeight 或 maxWidth 将溢出内容限制在固定视口内。",guidance:["设置 maxHeight 限制垂直溢出——超出视口的内容可在内部滚动。",'传入数字按像素计算,传入字符串如 "50vh" 按相对尺寸计算。',"ScrollArea 纯属展示性组件,不支持虚拟化或延迟渲染子元素。"],props:[{prop:"maxHeight",type:"string | number",description:"内容滚动前的最大高度,数字按像素处理。"},{prop:"maxWidth",type:"string | number",description:"内容滚动前的最大宽度,数字按像素处理。"},{prop:"children",type:"ReactNode",required:!0,description:"滚动视口内的内容。"}]},separator:{section:"布局",title:"分隔线",description:"用于分隔内容区域的视觉分割线。渲染为 <hr> 元素,支持水平或垂直方向。",guidance:["水平分隔线用于堆叠的章节之间;垂直分隔线用于工具栏或行内上下文。","decorative 属性控制 role 属性——当分隔线具有语义含义时应设为 false。","垂直分隔线需要指定显式高度才能正确渲染。"],props:[{prop:"orientation",type:'"horizontal" | "vertical"',default:'"horizontal"',description:"分隔线的方向。"},{prop:"decorative",type:"boolean",default:"true",description:'为 true 时设置 role="none",否则设置 role="separator"。'}]},timeline:{section:"组件",title:"时间线",description:"按时间顺序排列的垂直事件列表。每个条目显示标题、可选描述、时间、图标和状态指示器。",guidance:["适用于活动动态、订单跟踪或部署历史。",'将 status 设为 "success"、"warning"、"danger" 或 "info" 可设置时间点颜色。',"在条目中传入 icon 可替换默认的点图标。"],props:[{prop:"items",type:"TimelineItem[]",required:!0,description:"时间线条目数组。"},{prop:"items[].title",type:"string",required:!0,description:"事件标题。"},{prop:"items[].description",type:"string",description:"事件描述。"},{prop:"items[].time",type:"string",description:"时间戳或日期标签。"},{prop:"items[].icon",type:"ReactNode",description:"替换默认点的自定义图标。"},{prop:"items[].status",type:'"default" | "success" | "warning" | "danger" | "info"',description:"点的状态颜色。"}]},"tree-view":{section:"组件",title:"树形视图",description:"支持展开/折叠节点、键盘导航和可选选中状态的层级树控件。适用于文件浏览器、组织架构或嵌套设置。",guidance:["使用 defaultExpanded 在初始渲染时预展开某些节点。","每个节点需要唯一的 id 用于选择和展开状态跟踪。","TreeView 支持受控(selected/expanded)或非受控模式。","disabled 的节点不可选中或展开,但仍可见。"],props:[{prop:"nodes",type:"TreeNode[]",required:!0,description:"根级树节点。"},{prop:"selected",type:"string",description:"受控选中的节点 id。"},{prop:"defaultSelected",type:"string",description:"非受控初始选中节点 id。"},{prop:"onSelect",type:"(id: string, node: TreeNode) => void",description:"节点选中时调用。"},{prop:"expanded",type:"string[]",description:"受控展开的节点 id 数组。"},{prop:"defaultExpanded",type:"string[]",description:"非受控初始展开节点 id 数组。"},{prop:"onExpandedChange",type:"(ids: string[]) => void",description:"展开状态变化时调用。"}]},carousel:{section:"组件",title:"轮播",description:"基于滑块的轮播组件,支持圆点指示器、箭头导航、自动播放和循环。每个滑块可接受任意 React 内容。",guidance:["设置 autoPlay 实现无人值守轮播——适用于横幅广告或信息亭。","禁用 loop 用于线性引导流程,用户不应循环回到开头。","通过 index 属性支持受控索引,便于外部分页同步。","在构建极简变体时,使用 showArrows / showDots 隐藏箭头或圆点。"],props:[{prop:"items",type:"ReactNode[]",required:!0,description:"滑块内容数组。"},{prop:"defaultIndex",type:"number",default:"0",description:"初始滑块索引(非受控)。"},{prop:"index",type:"number",description:"受控的当前滑块索引。"},{prop:"onIndexChange",type:"(index: number) => void",description:"活动滑块变化时调用。"},{prop:"autoPlay",type:"boolean",default:"false",description:"按时间间隔自动前进滑块。"},{prop:"interval",type:"number",default:"3000",description:"自动播放间隔(毫秒)。"},{prop:"loop",type:"boolean",default:"true",description:"从最后一张循环回到第一张。"},{prop:"showDots",type:"boolean",default:"true",description:"显示圆点指示器。"},{prop:"showArrows",type:"boolean",default:"true",description:"显示上一张/下一张箭头按钮。"}]},toggle:{section:"表单",title:"开关按钮",description:"在按下和未按下状态之间切换的双状态按钮。ToggleGroup 将其扩展为一组选项间的单选/多选。",guidance:["Toggle 适用于工具栏开关(加粗/斜体、筛选标签),ToggleGroup 适用于视图模式切换。",'ToggleGroup type="single" 类似单选按钮组,type="multiple" 允许多选。',"同时支持受控(pressed/value)和非受控(defaultPressed/defaultValue)模式。"],props:[{prop:"Toggle.pressed",type:"boolean",description:"受控按下状态。"},{prop:"Toggle.defaultPressed",type:"boolean",default:"false",description:"非受控初始按下状态。"},{prop:"Toggle.onPressedChange",type:"(pressed: boolean) => void",description:"按下状态变化时调用。"},{prop:"Toggle.size",type:'"sm" | "md" | "lg"',default:'"md"',description:"按钮尺寸。"},{prop:"ToggleGroup.items",type:"ToggleGroupItem[]",required:!0,description:"开关选项数组。"},{prop:"ToggleGroup.value",type:"string | string[]",description:"受控选中值。"},{prop:"ToggleGroup.defaultValue",type:"string | string[]",description:"非受控初始选中值。"},{prop:"ToggleGroup.onValueChange",type:"(value: string | string[]) => void",description:"选中值变化时调用。"},{prop:"ToggleGroup.type",type:'"single" | "multiple"',default:'"single"',description:"选择模式。"}]},rating:{section:"表单",title:"评分",description:"基于星形的评分输入组件,支持整星和半星精度、受控/非受控模式和只读/禁用状态。",guidance:["设置 allowHalf 允许半星精度,用于需要精细反馈的场景。","使用 readOnly 作为仅展示评分(如历史平均值),disabled 完全阻止交互。","size 属性调整星形尺寸以适配不同的视觉语境。"],props:[{prop:"value",type:"number",description:"受控评分值。"},{prop:"defaultValue",type:"number",default:"0",description:"非受控初始值。"},{prop:"onChange",type:"(value: number) => void",description:"评分变化时调用。"},{prop:"max",type:"number",default:"5",description:"最大星数。"},{prop:"allowHalf",type:"boolean",default:"false",description:"允许半星值。"},{prop:"disabled",type:"boolean",description:"禁用交互。"},{prop:"readOnly",type:"boolean",description:"只读展示模式。"},{prop:"size",type:'"sm" | "md" | "lg"',default:'"md"',description:"星形尺寸。"},{prop:"label",type:"string",description:"评分组的无障碍标签。"}]},label:{section:"表单",title:"标签",description:"带可选必填标记的样式化 <label> 元素。与任意表单控件配合使用,提供无障碍标签。",guidance:["始终将 Label 与其表单控件关联——可以包裹输入组件或使用 htmlFor。","设置 required 可在标签文本后自动追加红色星号。","Label 是轻量封装,透传所有标准 label 属性到底层元素。"],props:[{prop:"required",type:"boolean",description:"在标签文本后显示必填标记(红色星号)。"},{prop:"children",type:"ReactNode",required:!0,description:"标签文本内容。"}]},avatar:{section:"内容展示",title:"头像",description:"显示用户头像,支持图片、首字母回退或占位图标。支持多种尺寸和形状。",guidance:["始终通过 name 或 alt 属性提供无障碍标签。","src 属性接受图片 URL;加载失败时自动回退为首字母或 fallback 文本。","首字母从 name 属性自动生成(最多 2 个字符)。","圆形为默认形状,数据密集布局可使用方形。"],props:[{prop:"src",type:"string",description:"头像图片 URL。"},{prop:"name",type:"string",description:"用户名,用于生成首字母和无障碍标签。"},{prop:"size",type:'"xs" | "sm" | "md" | "lg" | "xl"',default:'"md"',description:"头像尺寸。"},{prop:"shape",type:'"circle" | "square"',default:'"circle"',description:"头像形状。"},{prop:"fallback",type:"string",description:"当无图片和名称时的自定义回退文字。"}]},badge:{section:"内容展示",title:"徽章",description:"用于状态、分类或元数据的紧凑标签。可内联于文本中,或放在按钮、卡片和表格单元格内。",guidance:["徽章用于紧凑的状态或分类元数据,而非纯装饰。","accent 变体保留给品牌的颜色;success 和 warning 传达语义状态。","徽章是内联元素,与文本和其他内联内容自然排列。"],props:[{prop:"variant",type:'"neutral" | "accent" | "success" | "warning"',default:'"neutral"',description:"视觉样式变体。"}]},skeleton:{section:"内容展示",title:"骨架屏",description:"在数据加载时模拟内容形状的占位组件。支持文本、矩形和圆形变体,以及多行文本块。",guidance:["骨架屏形状与实际内容匹配,减少布局偏移。",'使用 variant="text" 配合 lines > 1 模拟段落占位。',"多行文本骨架屏的最后一行宽度为 70%,视觉效果更自然。"],props:[{prop:"variant",type:'"text" | "rect" | "circle"',default:'"rect"',description:"形状变体。"},{prop:"width",type:"string | number",description:"宽度,数字按像素计算。"},{prop:"height",type:"string | number",description:"高度,数字按像素计算。"},{prop:"lines",type:"number",default:"1",description:"文本变体的行数。"}]},typography:{section:"内容展示",title:"排版",description:"Heading 和 Text 提供核心排版系统。Heading 渲染 <h1>-<h6> 并基于级别调整字号;Text 渲染 <p>、<span> 或 <div>,支持变体、尺寸和字重选项。",guidance:["使用 Heading 作为章节标题和层级内容结构。",'使用 variant="secondary" 或 "muted" 降低内容强调程度。',"truncate 属性超出时以省略号截断——适用于表格单元格和侧边栏。","Heading 的 as 属性可覆盖渲染的 HTML 元素而不改变视觉样式。"],props:[{prop:"Heading.level",type:"1 | 2 | 3 | 4 | 5 | 6",default:"2",description:"标题级别,决定字号大小。"},{prop:"Heading.as",type:'"h1" | "h2" | "h3" | "h4" | "h5" | "h6"',description:"覆盖渲染的 HTML 元素。"},{prop:"Heading.variant",type:'"default" | "secondary"',default:'"default"',description:"视觉变体。"},{prop:"Heading.weight",type:'"normal" | "medium" | "semibold" | "bold"',default:'"bold"',description:"字重。"},{prop:"Heading.truncate",type:"boolean",default:"false",description:"超出时以省略号截断。"},{prop:"Text.as",type:'"p" | "span" | "div"',default:'"p"',description:"渲染的 HTML 元素。"},{prop:"Text.variant",type:'"default" | "secondary" | "muted" | "danger" | "success"',default:'"default"',description:"颜色变体。"},{prop:"Text.size",type:'"sm" | "base" | "lg" | "xl"',default:'"base"',description:"字号。"},{prop:"Text.weight",type:'"normal" | "medium" | "semibold" | "bold"',default:'"normal"',description:"字重。"},{prop:"Text.truncate",type:"boolean",default:"false",description:"超出时以省略号截断。"}]},"typography-base":{section:"内容展示",title:"排版基础",description:"开箱即用的排版 CSS 工具类和 React 组件,参考 Bootstrap 命名风格,适用于文章、文档、API 参考等页面。",guidance:['排版样式通过 import "vxui-react" 自动加载,无需额外配置。',"可直接使用 className(如 vx-article、vx-section),也可使用 React 组件(如 Article、Section)。","所有颜色使用 CSS 变量,自动适配亮/暗主题。","内置响应式断点,移动端和桌面端体验统一。"],props:[{prop:"Article",type:"Component",description:"文章容器,提供标准文档排版布局。"},{prop:"ArticleHeader",type:"Component",description:"文章头部,包含标题和描述。"},{prop:"ArticleTitle",type:"Component",description:"文章标题(h1)。"},{prop:"ArticleBody",type:"Component",description:"文章正文容器。"},{prop:"Section",type:"Component",description:"文档章节,支持锚点跳转。"},{prop:"SectionHeading",type:"Component",description:"章节标题(h2),可选锚点链接。"},{prop:"Pager",type:"Component",description:"上下页导航。"},{prop:"PropsTable",type:"Component",description:"API 属性表格。"},{prop:"ArticleEmptyState",type:"Component",description:"空状态展示。"},{prop:"StatsGrid",type:"Component",description:"统计指标网格。"}]},"date-pickers":{section:"表单",title:"日期选择器",description:"DatePicker 提供带弹出日历的文本输入框用于日期选择。Calendar 是独立的月历网格组件,由 DatePicker 内部使用。",guidance:["表单字段中使用 DatePicker;内嵌日历网格到自定义组件中使用 Calendar。","设置 min/max 限制可选日期范围。","weekStartsOnMonday 属性更改每周第一天——默认为周日。","DatePicker 在移动端视口自动切换为基于 Sheet 的布局。"],props:[{prop:"DatePicker.value",type:"Date",description:"受控选中日期。"},{prop:"DatePicker.defaultValue",type:"Date",description:"非受控初始日期。"},{prop:"DatePicker.onChange",type:"(date: Date | undefined) => void",description:"日期变化时调用。"},{prop:"DatePicker.label",type:"string",description:"输入框标签。"},{prop:"DatePicker.hint",type:"string",description:"输入框下方的帮助文字。"},{prop:"DatePicker.error",type:"string",description:"错误信息。"},{prop:"DatePicker.min",type:"Date",description:"最小可选日期。"},{prop:"DatePicker.max",type:"Date",description:"最大可选日期。"},{prop:"DatePicker.disabled",type:"boolean",description:"禁用日期选择器。"},{prop:"DatePicker.weekStartsOnMonday",type:"boolean",default:"false",description:"每周从周一开始而非周日。"},{prop:"Calendar.value",type:"Date",description:"受控选中日期。"},{prop:"Calendar.defaultValue",type:"Date",description:"非受控初始日期。"},{prop:"Calendar.onChange",type:"(date: Date) => void",description:"点击日期时调用。"},{prop:"Calendar.min",type:"Date",description:"最小可选日期。"},{prop:"Calendar.max",type:"Date",description:"最大可选日期。"},{prop:"Calendar.weekStartsOnMonday",type:"boolean",default:"false",description:"每周从周一开始。"}]},card:{section:"内容展示",title:"卡片",description:"灵活的内容容器,支持多种视觉变体。使用 Card 作为外层容器,内部组合 CardHeader、CardTitle、CardDescription 和 CardContent。",guidance:["对于可交互的卡片,使用 elevated 变体增强视觉层次。","设置 hoverable 可以在悬停时添加浮起效果,适用于图库或仪表盘磁贴。","padding 属性可调整内边距,适应密集或宽松的布局需求。","Card 本身是 <section> 元素,为无障碍考虑,始终应包含 CardTitle。"],props:[{prop:"variant",type:'"default" | "flat" | "elevated" | "outlined" | "ghost" | "filled"',default:'"default"',description:"视觉样式预设。"},{prop:"padding",type:'"none" | "sm" | "md" | "lg"',description:"内边距大小,默认为卡片的内部间距。"},{prop:"hoverable",type:"boolean",default:"false",description:"悬停时添加浮起效果,适用于可点击的卡片。"}]},form:{section:"表单",title:"表单组合",description:"由 Form、FormField、FormLabel、FormDescription、FormMessage 和 useFormField 构成的表单组合系统。可与任意输入组件配合,提供一致的标签、提示和错误布局。",guidance:["将每个逻辑字段组包裹在 FormField 中,通过 context 共享错误状态。","使用 FormLabel 的 required 属性可自动显示必填标记。","FormMessage 自动读取 FormField context 中的错误信息,无需手动传参。","Form 默认启用 noValidate,你需要自行处理验证逻辑或使用验证库。"],props:[{prop:"Form",type:"—",description:"表单根组件,携带 noValidate 和 vx-form 类名。"},{prop:"FormField",type:"—",description:"包裹字段组,向 FormMessage 提供错误上下文。"},{prop:"FormField.error",type:"string",description:"当前字段的错误信息,会被 FormMessage 显示。"},{prop:"FormLabel",type:"—",description:"渲染 <label>,支持可选的必填星号。"},{prop:"FormLabel.required",type:"boolean",description:"在标签文本后显示红色星号。"},{prop:"FormDescription",type:"—",description:"标签下方渲染的帮助提示文字。"},{prop:"FormMessage",type:"—",description:"错误或帮助提示消息,自动从 FormField context 读取错误。"},{prop:"useFormField",type:"() => { error?: string }",description:"Hook,用于读取当前字段的错误上下文。"}]},sheet:{section:"浮层",title:"侧滑面板",description:"从左侧、右侧、顶部或底部边缘滑出的面板。支持标题、描述、可选的确认操作,以及受控或非受控的打开状态。",guidance:["在需要展示次级内容但无需整页导航时使用 Sheet。",'将 side 设为 "right" 用于详情面板,"bottom" 用于类似移动端的操作面板。','variant="action" 预设隐藏关闭按钮并显示确认底部栏,适用于删除等破坏性操作。',"通过 open/onOpenChange 控制打开状态,或使用 defaultOpen 实现非受控使用。"],props:[{prop:"trigger",type:"ReactNode",description:"点击后打开面板的触发器元素。"},{prop:"children",type:"ReactNode",required:!0,description:"面板主体内容。"},{prop:"side",type:'"left" | "right" | "top" | "bottom"',default:'"right"',description:"面板滑入的起始边缘。"},{prop:"variant",type:'"default" | "action"',default:'"default"',description:'"action" 隐藏关闭按钮并显示确认底部栏。'},{prop:"title",type:"ReactNode",description:"面板标题。"},{prop:"description",type:"ReactNode",description:"面板描述。"},{prop:"header",type:"ReactNode",description:"自定义顶部内容(替换 title/description)。"},{prop:"footer",type:"ReactNode",description:"自定义底部内容。"},{prop:"open",type:"boolean",description:"受控打开状态。"},{prop:"defaultOpen",type:"boolean",description:"非受控初始打开状态。"},{prop:"onOpenChange",type:"(open: boolean) => void",description:"打开状态变化时的回调。"},{prop:"showClose",type:"boolean",default:"true",description:"是否显示关闭按钮。"},{prop:"closeOnOverlayClick",type:"boolean",default:"true",description:"点击遮罩层时是否关闭面板。"},{prop:"showConfirm",type:"boolean",default:"false",description:"是否在底部显示确认按钮。"},{prop:"confirmText",type:"string",default:'"确认"',description:"确认按钮的文字。"},{prop:"confirmDisabled",type:"boolean",default:"false",description:"是否禁用确认按钮。"},{prop:"onConfirm",type:"() => void",description:"确认按钮回调。"},{prop:"width",type:"number",description:"自定义面板宽度(像素)。"}]}}},yt={en:Gn,zh:ci},di=p.createContext({t:Gn,locale:"en",setLocale:()=>{}});function ui(){return p.useContext(di)}function pi({variant:t="inline",className:n}){const{locale:r,setLocale:s}=ui(),a=Object.entries(yt),i=yt[r],[o,l]=p.useState(!1),d=p.useRef(null);p.useEffect(()=>{if(!o)return;const u=f=>{d.current&&!d.current.contains(f.target)&&l(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[o]),p.useEffect(()=>{if(!o)return;const u=f=>{f.key==="Escape"&&l(!1)};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[o]);const c=t==="sidebar";return e.jsxs("div",{ref:d,className:j("vx-lang-drop",c&&"vx-lang-drop--sidebar",o&&"vx-lang-drop--open",n),children:[e.jsxs(ye,{variant:"outline",size:"sm",onClick:()=>l(u=>!u),"aria-haspopup":"listbox","aria-expanded":o,"aria-label":"Switch language",className:"vx-lang-drop__trigger-btn",style:{height:"36px"},children:[e.jsx(us,{size:14,"aria-hidden":"true"}),(i==null?void 0:i.label)??r,e.jsx(xe,{size:14,className:"vx-lang-drop__chevron","aria-hidden":"true"})]}),o&&e.jsx("ul",{className:"vx-lang-drop__menu",role:"listbox","aria-label":"Language",children:a.map(([u,f])=>e.jsx("li",{role:"option","aria-selected":r===u,children:e.jsxs("button",{type:"button",className:j("vx-lang-drop__item",r===u&&"vx-lang-drop__item--active"),onClick:()=>{s(u),l(!1)},children:[f.label,r===u&&e.jsx("span",{className:"vx-lang-drop__check","aria-hidden":"true",children:"✓"})]})},u))})]})}function mi({children:t,className:n="",...r}){return e.jsx("article",{className:`vx-article ${n}`.trim(),...r,children:t})}function fi({children:t,className:n="",...r}){return e.jsx("header",{className:`vx-article__header ${n}`.trim(),...r,children:t})}function hi({children:t,className:n="",...r}){return e.jsx("h1",{className:`vx-article__title ${n}`.trim(),...r,children:t})}function vi({children:t,className:n="",...r}){return e.jsx("div",{className:`vx-article__body ${n}`.trim(),...r,children:e.jsx("div",{className:"vx-article__content",children:t})})}function gi({children:t,className:n="",sectionId:r,...s}){return e.jsx("section",{id:r,className:`vx-section ${n}`.trim(),...s,children:t})}function xi({children:t,className:n="",anchor:r,...s}){return e.jsxs("h2",{className:`vx-section__heading ${n}`.trim(),...s,children:[t,r&&e.jsx("a",{href:r,className:"vx-section__anchor","aria-label":`Link to ${r}`,children:"#"})]})}function bi({prev:t,next:n,className:r=""}){return!t&&!n?null:e.jsxs("nav",{className:`vx-pager ${r}`.trim(),"aria-label":"Page navigation",children:[t?e.jsxs("button",{type:"button",className:"vx-pager__btn",onClick:t.onClick,children:[e.jsx("span",{className:"vx-pager__dir",children:"← Previous"}),e.jsx("span",{className:"vx-pager__label",children:t.label})]}):e.jsx("div",{}),n&&e.jsxs("button",{type:"button",className:"vx-pager__btn vx-pager__btn--next",onClick:n.onClick,children:[e.jsx("span",{className:"vx-pager__dir",children:"Next →"}),e.jsx("span",{className:"vx-pager__label",children:n.label})]})]})}function yi({columns:t,className:n=""}){return e.jsx("div",{className:`vx-props-table-wrapper ${n}`.trim(),children:e.jsxs("table",{className:"vx-props-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Prop"}),e.jsx("th",{children:"Type"}),e.jsx("th",{children:"Default"}),e.jsx("th",{children:"Description"})]})}),e.jsx("tbody",{children:t.map(r=>e.jsxs("tr",{children:[e.jsxs("td",{children:[e.jsx("code",{children:r.prop}),r.required&&e.jsx("span",{className:"vx-prop-required",title:"Required",children:"*"})]}),e.jsx("td",{children:e.jsx("code",{className:"vx-prop-type",children:r.type})}),e.jsx("td",{children:r.default?e.jsx("code",{children:r.default}):e.jsx("span",{className:"vx-prop-dash",children:"—"})}),e.jsx("td",{children:r.description})]},r.prop))})]})})}function wi({icon:t,title:n,description:r,action:s,className:a=""}){return e.jsxs("div",{className:`vx-empty ${a}`.trim(),children:[t&&e.jsx("div",{className:"vx-empty__icon",children:t}),e.jsx("strong",{children:n}),r&&e.jsx("p",{children:r}),s]})}function _i({items:t,className:n=""}){return e.jsx("div",{className:`vx-stats ${n}`.trim(),children:t.map(r=>e.jsxs("div",{className:"vx-stat",children:[e.jsxs("div",{className:"vx-stat__copy",children:[e.jsx("span",{className:"vx-stat__label",children:r.label}),e.jsx("strong",{className:"vx-stat__value",children:r.value}),r.hint&&e.jsx("small",{className:"vx-stat__hint",children:r.hint})]}),r.icon&&e.jsx("div",{className:"vx-stat__icon",children:r.icon})]},r.label))})}exports.Accordion=Xa;exports.ActionSheet=To;exports.ActionSheetItem=Eo;exports.Alert=Ha;exports.AppShell=Ns;exports.Article=mi;exports.ArticleBody=vi;exports.ArticleEmptyState=wi;exports.ArticleHeader=fi;exports.ArticleTitle=hi;exports.Avatar=eo;exports.BREAKPOINTS=kt;exports.Badge=js;exports.BottomNav=ao;exports.Breadcrumb=Ka;exports.Button=ye;exports.Calendar=Ke;exports.Card=Cs;exports.CardContent=Ps;exports.CardDescription=As;exports.CardHeader=Ts;exports.CardTitle=Es;exports.Carousel=Uo;exports.Checkbox=Ra;exports.CodeBlock=oi;exports.ColorPicker=Xo;exports.CommandPalette=ti;exports.ContextMenu=Io;exports.DatePicker=wo;exports.Dialog=Bs;exports.DialogClose=$s;exports.DrawerNavItem=Po;exports.DrawerNavSection=Ro;exports.DropdownMenu=Wa;exports.EmptyState=Ho;exports.FileUpload=Co;exports.Form=uo;exports.FormDescription=fo;exports.FormField=po;exports.FormLabel=mo;exports.FormMessage=ho;exports.Heading=Sa;exports.HoverCard=Mo;exports.Input=Hs;exports.Label=co;exports.LanguageSwitcher=pi;exports.Menubar=Oo;exports.MobileDrawer=Ao;exports.MobileIconButton=so;exports.MobileList=oo;exports.MobileListItem=lo;exports.MobileListSection=io;exports.MobileShell=no;exports.MobileTopBar=ro;exports.MultiSelect=_o;exports.NavigationMenu=$o;exports.NumberInput=vo;exports.PHONE_ASPECT_RATIO_THRESHOLD=St;exports.PHONE_MAX_WIDTH=Ye;exports.Pager=bi;exports.Pagination=Ya;exports.Popover=Va;exports.Progress=za;exports.PropsTable=yi;exports.Radio=Da;exports.RadioGroup=La;exports.Rating=Vo;exports.ResizableHandle=Jo;exports.ResizablePanel=Qo;exports.ResizablePanelGroup=Zo;exports.Responsive=Vn;exports.ScrollArea=Fo;exports.Section=gi;exports.SectionHeading=xi;exports.SegmentedControl=Fa;exports.Select=Pa;exports.Separator=Za;exports.Sheet=ue;exports.Shell=rn;exports.ShellContent=pn;exports.ShellMain=dn;exports.ShellNav=an;exports.ShellNavItem=ln;exports.ShellNavSection=on;exports.ShellOverlay=cn;exports.ShellSidebar=sn;exports.ShellTopbar=un;exports.Skeleton=Ua;exports.Slider=Ma;exports.Spinner=$a;exports.StatsGrid=_i;exports.Stepper=zo;exports.Switch=Zs;exports.TABLET_ASPECT_RATIO_THRESHOLD=Nt;exports.Table=to;exports.Tabs=ba;exports.TabsContent=_a;exports.TabsList=ya;exports.TabsTrigger=wa;exports.TagInput=qo;exports.Text=ka;exports.Textarea=Ia;exports.ThemeProvider=At;exports.TimePicker=jo;exports.Timeline=Bo;exports.ToastProvider=nn;exports.Toggle=Do;exports.ToggleGroup=Lo;exports.Tooltip=Ga;exports.TreeView=Wo;exports.VXUIProvider=Ss;exports.ViewportProvider=Ct;exports.createTheme=ne;exports.themePresets=Wn;exports.useFormField=Hn;exports.useTheme=Zn;exports.useToast=ks;exports.useViewport=Ee;
|