@nice2dev/ui-core 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +484 -0
  2. package/dist/core/NiceUserPreferences.d.ts +9 -2
  3. package/dist/core/a11y.d.ts +42 -5
  4. package/dist/core/hooks.d.ts +4 -0
  5. package/dist/core/spatialNav.d.ts +31 -8
  6. package/dist/core/useGamepad.d.ts +17 -4
  7. package/dist/index.cjs +25 -25
  8. package/dist/index.d.ts +1 -0
  9. package/dist/index.mjs +3655 -4412
  10. package/dist/input/bindings.d.ts +35 -0
  11. package/dist/input/elements.d.ts +71 -0
  12. package/dist/input/engine.d.ts +153 -0
  13. package/dist/input/focus/candidates.d.ts +18 -0
  14. package/dist/input/focus/navigator.d.ts +24 -0
  15. package/dist/input/focus/scopes.d.ts +44 -0
  16. package/dist/input/focus/spatial.d.ts +13 -0
  17. package/dist/input/gamepadFamily.d.ts +30 -0
  18. package/dist/input/gamepadPoller.d.ts +57 -0
  19. package/dist/input/index.d.ts +33 -0
  20. package/dist/input/osk/editing.d.ts +15 -0
  21. package/dist/input/osk/layouts.d.ts +47 -0
  22. package/dist/input/prompts/NiceButtonPrompt.d.ts +35 -0
  23. package/dist/input/prompts/NiceControlHint.d.ts +21 -0
  24. package/dist/input/prompts/NiceInputHintBar.d.ts +31 -0
  25. package/dist/input/prompts/NiceKeyCap.d.ts +18 -0
  26. package/dist/input/prompts/keys.d.ts +23 -0
  27. package/dist/input/react/NiceFocusScope.d.ts +14 -0
  28. package/dist/input/react/NiceInputProvider.d.ts +42 -0
  29. package/dist/input/react/actions.d.ts +48 -0
  30. package/dist/input/react/hints.d.ts +34 -0
  31. package/dist/input/react/hooks.d.ts +52 -0
  32. package/dist/input/react/useElementEffect.d.ts +7 -0
  33. package/dist/input/react/useGridFocus.d.ts +26 -0
  34. package/dist/input/react/useMenuButton.d.ts +29 -0
  35. package/dist/input/react/useOverlayFocus.d.ts +33 -0
  36. package/dist/input/react/useRovingFocus.d.ts +46 -0
  37. package/dist/input/react/useTreeFocus.d.ts +30 -0
  38. package/dist/input/tabEscape.d.ts +20 -0
  39. package/dist/input/types.d.ts +98 -0
  40. package/dist/input-layer-Hyi3G0IM.js +3911 -0
  41. package/dist/input-layer-Kez0PkmN.cjs +1 -0
  42. package/dist/input.cjs +1 -0
  43. package/dist/input.mjs +94 -0
  44. package/package.json +8 -2
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),S=require("react/jsx-runtime"),_=require("@nice2dev/i18n"),Bs={small:"sm",medium:"md",large:"lg"};function _s(e,t){return e?Bs[e]??e:"md"}function Ws(e){return e==="danger"?"error":e}/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),x=require("react/jsx-runtime"),N=require("./input-layer-Kez0PkmN.cjs"),j=require("@nice2dev/i18n"),zi={small:"sm",medium:"md",large:"lg"};function $i(e,t){return e?zi[e]??e:"md"}function Hi(e){return e==="danger"?"error":e}/**
2
2
  * @file themeVariants.ts
3
3
  * @description Extended theme variants - radius, shadows, fills, gradients, effects
4
4
  *
@@ -7,15 +7,15 @@
7
7
  * @version 1.0.0
8
8
  * @since 2026-03
9
9
  * @license MIT
10
- */const be={none:{xs:"0",sm:"0",md:"0",lg:"0",xl:"0",full:"0"},sm:{xs:"2px",sm:"3px",md:"4px",lg:"6px",xl:"8px",full:"9999px"},md:{xs:"4px",sm:"6px",md:"8px",lg:"12px",xl:"16px",full:"9999px"},lg:{xs:"6px",sm:"10px",md:"14px",lg:"20px",xl:"28px",full:"9999px"},xl:{xs:"10px",sm:"16px",md:"24px",lg:"32px",xl:"48px",full:"9999px"},"2xl":{xs:"16px",sm:"24px",md:"32px",lg:"48px",xl:"64px",full:"9999px"},full:{xs:"9999px",sm:"9999px",md:"9999px",lg:"9999px",xl:"9999px",full:"9999px"}},ze={none:"none",subtle:"0 1px 2px 0 var(--nice-overlay-5, rgba(0, 0, 0, 0.05))",md:"0 4px 6px -1px var(--nice-overlay-10, rgba(0, 0, 0, 0.1)), 0 2px 4px -2px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))",lg:"0 10px 15px -3px var(--nice-overlay-10, rgba(0, 0, 0, 0.1)), 0 4px 6px -4px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))",xl:"0 20px 25px -5px var(--nice-overlay-10, rgba(0, 0, 0, 0.1)), 0 8px 10px -6px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))",inner:"inset 0 2px 4px 0 var(--nice-overlay-5, rgba(0, 0, 0, 0.05))",colored:"0 4px 14px 0 var(--ntd-color-primary-alpha, rgba(99, 102, 241, 0.4))",glow:"0 0 20px var(--ntd-color-primary-alpha, rgba(99, 102, 241, 0.5))"},or={none:"none",subtle:"0 1px 2px 0 var(--nice-overlay-20, rgba(0, 0, 0, 0.2))",md:"0 4px 6px -1px var(--nice-overlay-30, rgba(0, 0, 0, 0.3)), 0 2px 4px -2px var(--nice-overlay-20, rgba(0, 0, 0, 0.2))",lg:"0 10px 15px -3px var(--nice-overlay-40, rgba(0, 0, 0, 0.4)), 0 4px 6px -4px var(--nice-overlay-30, rgba(0, 0, 0, 0.3))",xl:"0 20px 25px -5px var(--nice-overlay-50, rgba(0, 0, 0, 0.5)), 0 8px 10px -6px var(--nice-overlay-40, rgba(0, 0, 0, 0.4))",inner:"inset 0 2px 4px 0 var(--nice-overlay-30, rgba(0, 0, 0, 0.3))",colored:"0 4px 14px 0 var(--ntd-color-primary-alpha, rgba(99, 102, 241, 0.5))",glow:"0 0 30px var(--ntd-color-primary-alpha, rgba(99, 102, 241, 0.6))"},Se={compact:{paddingX:"8px",paddingY:"4px",gap:"4px",fontSize:"13px",lineHeight:"1.3",inputHeight:"28px",buttonHeight:"28px"},normal:{paddingX:"12px",paddingY:"8px",gap:"8px",fontSize:"14px",lineHeight:"1.5",inputHeight:"36px",buttonHeight:"36px"},comfortable:{paddingX:"16px",paddingY:"12px",gap:"12px",fontSize:"15px",lineHeight:"1.6",inputHeight:"44px",buttonHeight:"44px"},spacious:{paddingX:"24px",paddingY:"16px",gap:"16px",fontSize:"16px",lineHeight:"1.7",inputHeight:"52px",buttonHeight:"52px"}},Fe={none:{duration:"0ms",easing:"linear",hoverScale:"1",clickScale:"1",enterAnimation:"none",exitAnimation:"none"},subtle:{duration:"150ms",easing:"cubic-bezier(0.4, 0, 0.2, 1)",hoverScale:"1.01",clickScale:"0.99",enterAnimation:"ntd-fade-in 150ms ease-out",exitAnimation:"ntd-fade-out 100ms ease-in"},normal:{duration:"200ms",easing:"cubic-bezier(0.4, 0, 0.2, 1)",hoverScale:"1.02",clickScale:"0.98",enterAnimation:"ntd-slide-up 200ms ease-out",exitAnimation:"ntd-slide-down 150ms ease-in"},playful:{duration:"300ms",easing:"cubic-bezier(0.34, 1.56, 0.64, 1)",hoverScale:"1.05",clickScale:"0.95",enterAnimation:"ntd-bounce-in 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",exitAnimation:"ntd-bounce-out 200ms ease-in"},dramatic:{duration:"400ms",easing:"cubic-bezier(0.68, -0.55, 0.265, 1.55)",hoverScale:"1.08",clickScale:"0.92",enterAnimation:"ntd-zoom-in 400ms cubic-bezier(0.68, -0.55, 0.265, 1.55)",exitAnimation:"ntd-zoom-out 250ms ease-in"}};function Vs(e,t,r){switch(e){case"solid":return{background:t};case"gradient-linear":return{background:`linear-gradient(135deg, ${t} 0%, ${r||re(t,-20)} 100%)`};case"gradient-radial":return{background:`radial-gradient(circle at top left, ${t} 0%, ${r||re(t,-30)} 100%)`};case"glass":return{background:"var(--nice-overlay-light-10, rgba(255, 255, 255, 0.1))",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",border:"1px solid var(--nice-overlay-light-20, rgba(255, 255, 255, 0.2))"};case"frosted":return{background:"var(--nice-overlay-light-70, rgba(255, 255, 255, 0.7))",backdropFilter:"blur(20px) saturate(180%)",WebkitBackdropFilter:"blur(20px) saturate(180%)",border:"1px solid var(--nice-overlay-light-30, rgba(255, 255, 255, 0.3))"};case"pattern":return{backgroundImage:`url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='${encodeURIComponent(t)}' fill-opacity='0.05'%3E%3Cpath d='M0 0h20L10 10z'/%3E%3C/g%3E%3C/svg%3E")`,backgroundColor:"var(--ntd-bg-surface)"};case"texture":return{backgroundImage:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`,backgroundBlendMode:"overlay",backgroundColor:t};case"gradient-conic":return{background:`conic-gradient(from 180deg, ${t}, ${r||re(t,-20)}, ${t})`};case"mesh":return{background:`radial-gradient(at 40% 20%, ${t} 0%, transparent 50%), radial-gradient(at 80% 0%, ${r||re(t,30)} 0%, transparent 50%), radial-gradient(at 0% 50%, ${re(t,-20)} 0%, transparent 50%)`,backgroundColor:"var(--ntd-bg-surface, #fff)"};default:return{background:t}}}function ut(e,t){const r={transition:"all var(--ntd-transition-duration, 200ms) var(--ntd-transition-easing, ease)"};switch(e){case"flat":return{...r,background:t,boxShadow:"none",border:"none"};case"raised":return{...r,background:t,boxShadow:"0 2px 4px var(--nice-overlay-20, rgba(0, 0, 0, 0.2))",border:"none"};case"outlined":return{...r,background:"transparent",border:`2px solid ${t}`,color:t};case"ghost":return{...r,background:"transparent",border:"none",color:t};case"soft":return{...r,background:`${t}20`,border:"none",color:t};case"gradient":return{...r,background:`linear-gradient(135deg, ${t} 0%, ${re(t,-20)} 100%)`,border:"none",boxShadow:`0 4px 14px ${t}40`};case"3d":return{...r,background:t,border:"none",boxShadow:`0 4px 0 ${re(t,-30)}, 0 6px 10px var(--nice-overlay-20, rgba(0, 0, 0, 0.2))`,transform:"translateY(-2px)"};case"neumorphic":return{...r,background:"var(--ntd-bg-surface)",border:"none",boxShadow:"5px 5px 10px var(--nice-overlay-10, rgba(0, 0, 0, 0.1)), -5px -5px 10px var(--nice-overlay-light-80, rgba(255, 255, 255, 0.8))",color:t};case"pill":return{...r,background:t,border:"none",borderRadius:"9999px",paddingLeft:"24px",paddingRight:"24px"};case"link":return{...r,background:"transparent",border:"none",color:t,textDecoration:"underline",padding:"0"};case"brutal":return{...r,background:t,border:"3px solid var(--nice-border-color, #000)",boxShadow:"4px 4px 0 var(--nice-text, #000)",borderRadius:"0"};default:return r}}function ft(e){const t={transition:"all var(--ntd-transition-duration, 200ms) var(--ntd-transition-easing, ease)"};switch(e){case"bordered":return{...t,background:"var(--ntd-bg-input, var(--nice-bg-primary, transparent))",border:"1px solid var(--ntd-border-color, var(--nice-border-color, #3a3a3a))",borderRadius:"var(--ntd-radius-md, 8px)"};case"filled":return{...t,background:"var(--ntd-bg-input-filled, var(--nice-bg-secondary, rgba(255,255,255,0.06)))",border:"2px solid transparent",borderRadius:"var(--ntd-radius-md, 8px)"};case"underlined":return{...t,background:"transparent",border:"none",borderBottom:"2px solid var(--ntd-border-color, var(--nice-border-color, #3a3a3a))",borderRadius:"0",paddingLeft:"0",paddingRight:"0"};case"floating":return{...t,background:"var(--ntd-bg-input, var(--nice-bg-primary, transparent))",border:"1px solid var(--ntd-border-color, var(--nice-border-color, #3a3a3a))",borderRadius:"var(--ntd-radius-md, 8px)",paddingTop:"20px"};case"soft":return{...t,background:"var(--ntd-color-primary-alpha, rgba(99, 102, 241, 0.1))",border:"none",borderRadius:"var(--ntd-radius-md, 8px)"};case"neumorphic":return{...t,background:"var(--ntd-bg-surface, var(--nice-bg-primary, transparent))",border:"none",borderRadius:"var(--ntd-radius-md, 8px)",boxShadow:"inset 3px 3px 6px var(--nice-overlay-20, rgba(0, 0, 0, 0.2)), inset -3px -3px 6px var(--nice-overlay-light-5, rgba(255, 255, 255, 0.05))"};case"pill":return{...t,background:"var(--ntd-bg-input, var(--nice-bg-primary, transparent))",border:"1px solid var(--ntd-border-color, var(--nice-border-color, #3a3a3a))",borderRadius:"9999px",paddingLeft:"20px",paddingRight:"20px"};case"flush":return{...t,background:"transparent",border:"none",borderRadius:"0",padding:"0",outline:"none"};default:return t}}function mt(e){const t={transition:"all var(--ntd-transition-duration, 200ms) var(--ntd-transition-easing, ease)"};switch(e){case"flat":return{...t,background:"var(--ntd-bg-surface, var(--nice-bg-secondary, transparent))",border:"none",boxShadow:"none"};case"elevated":return{...t,background:"var(--ntd-bg-surface, var(--nice-bg-secondary, transparent))",border:"none",boxShadow:"var(--ntd-shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1))"};case"bordered":return{...t,background:"var(--ntd-bg-surface, var(--nice-bg-secondary, transparent))",border:"1px solid var(--ntd-border-color, var(--nice-border-color, #3a3a3a))",boxShadow:"none"};case"glass":return{...t,background:"var(--nice-overlay-light-10, rgba(255, 255, 255, 0.1))",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",border:"1px solid var(--nice-overlay-light-20, rgba(255, 255, 255, 0.2))",boxShadow:"0 8px 32px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))"};case"gradient":return{...t,background:"linear-gradient(135deg, var(--ntd-bg-surface) 0%, var(--ntd-bg-elevated) 100%)",border:"none",boxShadow:"var(--ntd-shadow-md)"};case"neumorphic":return{...t,background:"var(--ntd-bg-surface, var(--nice-bg-secondary, transparent))",border:"none",boxShadow:"8px 8px 16px var(--nice-overlay-20, rgba(0, 0, 0, 0.2)), -8px -8px 16px var(--nice-overlay-light-5, rgba(255, 255, 255, 0.05))"};case"outlined":return{...t,background:"transparent",border:"2px solid var(--ntd-border-color, var(--nice-border-color, #3a3a3a))",boxShadow:"none"};case"paper":return{...t,background:"var(--ntd-bg-surface, var(--nice-bg-secondary, transparent))",border:"none",boxShadow:"2px 3px 8px var(--nice-overlay-6, rgba(0, 0, 0, 0.06))",borderRadius:"2px"};default:return t}}function sr(e,t){const r={display:"inline-flex",alignItems:"center",fontSize:"0.75rem",fontWeight:"600",lineHeight:"1"};switch(e){case"solid":return{...r,background:t,color:"var(--nice-color-white, #fff)",padding:"2px 8px",borderRadius:"4px"};case"soft":return{...r,background:`${t}20`,color:t,padding:"2px 8px",borderRadius:"4px"};case"outlined":return{...r,background:"transparent",border:`1px solid ${t}`,color:t,padding:"2px 8px",borderRadius:"4px"};case"dot":return{...r,background:t,width:"8px",height:"8px",borderRadius:"50%",padding:"0"};case"pill":return{...r,background:t,color:"var(--nice-color-white, #fff)",padding:"2px 12px",borderRadius:"9999px"};case"gradient":return{...r,background:`linear-gradient(135deg, ${t}, ${re(t,-20)})`,color:"var(--nice-text-primary, #fff)",padding:"2px 8px",borderRadius:"4px"};default:return r}}function ir(e,t){switch(e){case"underline":return{borderBottom:`2px solid ${t}`,background:"transparent",color:t};case"pills":return{background:t,color:"var(--nice-color-white, #fff)",borderRadius:"9999px",padding:"6px 16px"};case"enclosed":return{background:"var(--ntd-bg-surface,#fff)",border:"1px solid var(--ntd-border-color,#e5e7eb)",borderBottom:"none",borderRadius:"8px 8px 0 0"};case"soft":return{background:`${t}15`,color:t,borderRadius:"6px",padding:"6px 16px"};case"lifted":return{background:"var(--ntd-bg-surface,#fff)",boxShadow:"0 -2px 8px var(--nice-overlay-6, rgba(0, 0, 0, 0.06))",borderRadius:"8px 8px 0 0",transform:"translateY(-2px)"};case"bordered":return{border:`2px solid ${t}`,borderBottom:"none",background:"transparent",borderRadius:"8px 8px 0 0"};default:return{}}}function cr(e){switch(e){case"default":return{borderRadius:"12px",width:"44px",height:"24px"};case"ios":return{borderRadius:"16px",width:"51px",height:"31px",boxShadow:"inset 0 0 0 1px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))"};case"flat":return{borderRadius:"4px",width:"40px",height:"22px"};case"pill":return{borderRadius:"9999px",width:"48px",height:"24px"};case"square":return{borderRadius:"0",width:"40px",height:"22px"};default:return{}}}function lr(e){switch(e){case"dark":return{background:"var(--nice-bg-secondary, #1f2937)",color:"var(--nice-text-primary, #f9fafb)",borderRadius:"6px",padding:"6px 12px",boxShadow:"0 4px 12px var(--nice-overlay-30, rgba(0, 0, 0, 0.3))"};case"light":return{background:"var(--nice-bg, #fff)",color:"var(--nice-text, #374151)",borderRadius:"6px",padding:"6px 12px",boxShadow:"0 4px 12px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))",border:"1px solid var(--nice-border, #e5e7eb)"};case"primary":return{background:"var(--nice-color-primary,#6366f1)",color:"var(--nice-text-on-primary, #fff)",borderRadius:"6px",padding:"6px 12px"};case"glass":return{background:"var(--nice-overlay-light-15, rgba(255, 255, 255, 0.15))",backdropFilter:"blur(12px)",color:"var(--nice-color-white, #fff)",borderRadius:"8px",padding:"8px 14px"};case"bordered":return{background:"var(--nice-bg, #fff)",color:"var(--nice-text, #374151)",borderRadius:"6px",padding:"6px 12px",border:"2px solid var(--nice-color-primary,#6366f1)"};default:return{}}}function dr(e){switch(e){case"default":return{borderCollapse:"collapse"};case"striped":return{borderCollapse:"collapse"};case"bordered":return{border:"1px solid var(--ntd-border-color,#e5e7eb)",borderCollapse:"collapse"};case"compact":return{borderCollapse:"collapse",fontSize:"0.8125rem"};case"hoverable":return{borderCollapse:"collapse"};case"minimal":return{borderCollapse:"collapse",borderBottom:"1px solid var(--ntd-border-color,#e5e7eb)"};default:return{}}}const J={radius:"md",shadow:"md",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"solid",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",modalStyle:"default",tableStyle:"default",menuStyle:"default",animation:"normal",density:"normal"},$e={minimal:{radius:"sm",shadow:"subtle",fill:"solid",buttonStyle:"flat",inputStyle:"underlined",cardStyle:"flat",badgeStyle:"soft",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"normal"},rounded:{radius:"xl",shadow:"md",fill:"solid",buttonStyle:"raised",inputStyle:"filled",cardStyle:"elevated",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"dark",tableStyle:"default",animation:"normal",density:"comfortable"},sharp:{radius:"none",shadow:"lg",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"square",tooltipStyle:"dark",tableStyle:"bordered",animation:"subtle",density:"compact"},glass:{radius:"lg",shadow:"none",fill:"glass",buttonStyle:"ghost",inputStyle:"soft",cardStyle:"glass",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"minimal",animation:"normal",density:"normal"},neumorphic:{radius:"lg",shadow:"none",fill:"solid",buttonStyle:"neumorphic",inputStyle:"neumorphic",cardStyle:"neumorphic",badgeStyle:"soft",tabStyle:"lifted",toggleStyle:"ios",tooltipStyle:"light",tableStyle:"default",animation:"subtle",density:"comfortable"},playful:{radius:"2xl",shadow:"colored",fill:"gradient-linear",buttonStyle:"gradient",inputStyle:"filled",cardStyle:"gradient",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"hoverable",animation:"playful",density:"comfortable"},enterprise:{radius:"sm",shadow:"subtle",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"outlined",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"striped",animation:"subtle",density:"compact"},modern3d:{radius:"lg",shadow:"xl",fill:"gradient-linear",buttonStyle:"3d",inputStyle:"filled",cardStyle:"elevated",badgeStyle:"gradient",tabStyle:"lifted",toggleStyle:"ios",tooltipStyle:"dark",tableStyle:"default",animation:"normal",density:"normal"},brutalist:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"brutal",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"normal"},luxe:{radius:"sm",shadow:"lg",fill:"gradient-linear",buttonStyle:"gradient",inputStyle:"floating",cardStyle:"elevated",badgeStyle:"gradient",tabStyle:"underline",toggleStyle:"ios",tooltipStyle:"dark",tableStyle:"hoverable",animation:"normal",density:"comfortable"},pill:{radius:"full",shadow:"md",fill:"solid",buttonStyle:"pill",inputStyle:"pill",cardStyle:"elevated",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"dark",tableStyle:"default",animation:"normal",density:"normal"},flat:{radius:"md",shadow:"none",fill:"solid",buttonStyle:"flat",inputStyle:"filled",cardStyle:"flat",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"normal"},editorial:{radius:"none",shadow:"subtle",fill:"solid",buttonStyle:"ghost",inputStyle:"underlined",cardStyle:"paper",badgeStyle:"outlined",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"comfortable"},dashboard:{radius:"md",shadow:"md",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"striped",animation:"subtle",density:"compact"},softCloud:{radius:"xl",shadow:"subtle",fill:"frosted",buttonStyle:"soft",inputStyle:"soft",cardStyle:"glass",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"hoverable",animation:"normal",density:"comfortable"},cosmic:{radius:"lg",shadow:"glow",fill:"mesh",buttonStyle:"gradient",inputStyle:"soft",cardStyle:"glass",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"hoverable",animation:"dramatic",density:"comfortable"},corporate:{radius:"sm",shadow:"subtle",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"outlined",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"striped",animation:"none",density:"compact"},bank:{radius:"none",shadow:"subtle",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"dark",tableStyle:"bordered",animation:"none",density:"compact"},government:{radius:"sm",shadow:"none",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"flat",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"striped",animation:"none",density:"normal"},military:{radius:"none",shadow:"lg",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"dark",tableStyle:"bordered",animation:"none",density:"compact"},legal:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"ghost",inputStyle:"underlined",cardStyle:"paper",badgeStyle:"outlined",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"none",density:"comfortable"},medical:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"soft",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"soft",tabStyle:"enclosed",toggleStyle:"ios",tooltipStyle:"light",tableStyle:"striped",animation:"subtle",density:"normal"},swiss:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"flat",inputStyle:"underlined",cardStyle:"flat",badgeStyle:"outlined",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"normal"},scandinavian:{radius:"lg",shadow:"subtle",fill:"solid",buttonStyle:"soft",inputStyle:"filled",cardStyle:"flat",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"ios",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"spacious"},bauhaus:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"normal"},notebook:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"ghost",inputStyle:"underlined",cardStyle:"paper",badgeStyle:"soft",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"comfortable"},terminal:{radius:"none",shadow:"glow",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"compact"},hacker:{radius:"none",shadow:"glow",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"outlined",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"subtle",density:"compact"},retro8bit:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"brutal",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"normal"},vapor:{radius:"lg",shadow:"glow",fill:"gradient-linear",buttonStyle:"gradient",inputStyle:"soft",cardStyle:"glass",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"glass",tableStyle:"hoverable",animation:"playful",density:"comfortable"},synthwave:{radius:"md",shadow:"glow",fill:"gradient-linear",buttonStyle:"3d",inputStyle:"filled",cardStyle:"glass",badgeStyle:"gradient",tabStyle:"lifted",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"hoverable",animation:"dramatic",density:"normal"},cyberpunk:{radius:"none",shadow:"glow",fill:"gradient-linear",buttonStyle:"brutal",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"dramatic",density:"compact"},steampunk:{radius:"sm",shadow:"inner",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"bordered",tableStyle:"bordered",animation:"subtle",density:"normal"},origami:{radius:"none",shadow:"md",fill:"solid",buttonStyle:"raised",inputStyle:"filled",cardStyle:"elevated",badgeStyle:"soft",tabStyle:"lifted",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"default",animation:"normal",density:"normal"},watercolor:{radius:"2xl",shadow:"subtle",fill:"frosted",buttonStyle:"soft",inputStyle:"soft",cardStyle:"glass",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"pill",tooltipStyle:"glass",tableStyle:"minimal",animation:"normal",density:"comfortable"},neon:{radius:"md",shadow:"glow",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"outlined",tabStyle:"bordered",toggleStyle:"default",tooltipStyle:"bordered",tableStyle:"bordered",animation:"dramatic",density:"normal"},candy:{radius:"2xl",shadow:"colored",fill:"gradient-linear",buttonStyle:"pill",inputStyle:"pill",cardStyle:"elevated",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"hoverable",animation:"playful",density:"comfortable"},bubblegum:{radius:"full",shadow:"colored",fill:"gradient-radial",buttonStyle:"pill",inputStyle:"pill",cardStyle:"elevated",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"hoverable",animation:"playful",density:"spacious"},cartoon:{radius:"xl",shadow:"colored",fill:"solid",buttonStyle:"brutal",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"pill",tooltipStyle:"bordered",tableStyle:"bordered",animation:"playful",density:"comfortable"},kawaii:{radius:"full",shadow:"colored",fill:"gradient-linear",buttonStyle:"pill",inputStyle:"pill",cardStyle:"gradient",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"hoverable",animation:"dramatic",density:"spacious"},circus:{radius:"full",shadow:"colored",fill:"gradient-conic",buttonStyle:"gradient",inputStyle:"filled",cardStyle:"gradient",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"striped",animation:"dramatic",density:"spacious"},paper:{radius:"sm",shadow:"md",fill:"solid",buttonStyle:"ghost",inputStyle:"underlined",cardStyle:"paper",badgeStyle:"soft",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"comfortable"},zen:{radius:"md",shadow:"none",fill:"solid",buttonStyle:"ghost",inputStyle:"underlined",cardStyle:"flat",badgeStyle:"soft",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"spacious"},monochrome:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"outlined",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"normal"},windows95:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"compact"},material:{radius:"md",shadow:"md",fill:"solid",buttonStyle:"raised",inputStyle:"filled",cardStyle:"elevated",badgeStyle:"solid",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"default",animation:"normal",density:"normal"},fluent:{radius:"md",shadow:"subtle",fill:"frosted",buttonStyle:"soft",inputStyle:"filled",cardStyle:"glass",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"hoverable",animation:"subtle",density:"normal"},cupertino:{radius:"xl",shadow:"md",fill:"frosted",buttonStyle:"soft",inputStyle:"filled",cardStyle:"glass",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"minimal",animation:"normal",density:"comfortable"},ant:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"solid",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"default",animation:"subtle",density:"normal"},bootstrap:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"pill",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"striped",animation:"subtle",density:"normal"},chakra:{radius:"md",shadow:"md",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"soft",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"default",animation:"normal",density:"normal"},notion:{radius:"sm",shadow:"none",fill:"solid",buttonStyle:"ghost",inputStyle:"flush",cardStyle:"flat",badgeStyle:"soft",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"normal"},linear:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"soft",inputStyle:"filled",cardStyle:"elevated",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"ios",tooltipStyle:"dark",tableStyle:"hoverable",animation:"subtle",density:"compact"},vercel:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"outlined",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"minimal",animation:"subtle",density:"normal"},gaming:{radius:"none",shadow:"glow",fill:"gradient-linear",buttonStyle:"3d",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"gradient",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"dramatic",density:"normal"},kiddo:{radius:"2xl",shadow:"colored",fill:"gradient-radial",buttonStyle:"pill",inputStyle:"pill",cardStyle:"gradient",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"hoverable",animation:"playful",density:"spacious"},disco:{radius:"full",shadow:"glow",fill:"gradient-conic",buttonStyle:"gradient",inputStyle:"filled",cardStyle:"gradient",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"glass",tableStyle:"hoverable",animation:"dramatic",density:"comfortable"},clown:{radius:"full",shadow:"colored",fill:"gradient-conic",buttonStyle:"brutal",inputStyle:"pill",cardStyle:"gradient",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"striped",animation:"dramatic",density:"spacious"}};function pt(e,t=":root"){const r=be[e.radius],a=e.shadow,n=Se[e.density],o=Fe[e.animation],i=[`${t} {`];for(const[s,l]of Object.entries(r))i.push(` --ntd-radius-${s}: ${l};`);i.push(` --ntd-shadow: ${ze[a]};`),i.push(` --ntd-shadow-dark: ${or[a]};`);for(const[s,l]of Object.entries(n)){const d=s.replace(/([A-Z])/g,"-$1").toLowerCase();i.push(` --ntd-${d}: ${l};`)}for(const[s,l]of Object.entries(o)){const d=s.replace(/([A-Z])/g,"-$1").toLowerCase();i.push(` --ntd-animation-${d}: ${l};`)}return e.backgroundImage&&i.push(` --ntd-bg-image: url('${e.backgroundImage}');`),e.backgroundOverlay&&i.push(` --ntd-bg-overlay: ${e.backgroundOverlay};`),i.push("}"),i.join(`
11
- `)}function gt(e,t=document.documentElement,r){const a=r?`[data-ntd-provider="${r}"]`:":root",n=r?`ntd-variant-styles-${r}`:"ntd-variant-styles",o=pt(e,a);let i=document.getElementById(n);i||(i=document.createElement("style"),i.id=n,document.head.appendChild(i)),i.textContent=o,r&&t.setAttribute("data-ntd-provider",r),t.dataset.ntdRadius=e.radius,t.dataset.ntdShadow=e.shadow,t.dataset.ntdFill=e.fill,t.dataset.ntdButton=e.buttonStyle,t.dataset.ntdInput=e.inputStyle,t.dataset.ntdCard=e.cardStyle,t.dataset.ntdAnimation=e.animation,t.dataset.ntdDensity=e.density,e.badgeStyle&&(t.dataset.ntdBadge=e.badgeStyle),e.tabStyle&&(t.dataset.ntdTab=e.tabStyle),e.toggleStyle&&(t.dataset.ntdToggle=e.toggleStyle),e.tooltipStyle&&(t.dataset.ntdTooltip=e.tooltipStyle),e.modalStyle&&(t.dataset.ntdModal=e.modalStyle),e.tableStyle&&(t.dataset.ntdTable=e.tableStyle),e.menuStyle&&(t.dataset.ntdMenu=e.menuStyle)}function ur(e,t){const r=document.getElementById(`ntd-variant-styles-${e}`);r&&r.remove(),t&&t.removeAttribute("data-ntd-provider")}function re(e,t){if(e.startsWith("#")){const r=e.slice(1),a=parseInt(r,16),n=Math.max(0,Math.min(255,(a>>16&255)+t)),o=Math.max(0,Math.min(255,(a>>8&255)+t)),i=Math.max(0,Math.min(255,(a&255)+t));return`#${(n<<16|o<<8|i).toString(16).padStart(6,"0")}`}return e}function Xs(e,t){const r={...J,...t};return{...e,variantConfig:r}}const Us=["default","minimal","rounded","sharp","glass","neumorphic","playful","enterprise","modern3d","brutalist","luxe","pill","flat","editorial","dashboard","softCloud","cosmic","corporate","bank","government","military","legal","medical","swiss","scandinavian","bauhaus","notebook","origami","watercolor","monochrome","paper","zen","terminal","hacker","retro8bit","synthwave","cyberpunk","steampunk","vapor","neon","windows95","material","fluent","cupertino","ant","bootstrap","chakra","notion","linear","vercel","candy","bubblegum","cartoon","kawaii","circus","gaming","kiddo","disco","clown"];function ve(e){return e==="default"?J:$e[e]??J}const Oe=c.createContext({displayStyle:"default",variantConfig:J,setDisplayStyle:()=>{}});function qs(){return c.useContext(Oe)}function xe(e){const t=c.useContext(Oe),r=e??t.displayStyle??"default",a=ve(r);return{style:r,config:a}}function Gs(e,t,r="var(--nice-color-primary, #6366f1)"){const{config:a}=xe(t);return fr(e,a,r)}function Ks(e,t){const{config:r}=xe(t);switch(e){case"button":return r.buttonStyle;case"input":return r.inputStyle;case"card":return r.cardStyle;case"badge":return r.badgeStyle??"solid";case"tab":return r.tabStyle??"underline";case"toggle":return r.toggleStyle??"default";case"tooltip":return r.tooltipStyle??"dark";case"modal":return r.modalStyle??"default";case"table":return r.tableStyle??"default";case"menu":return r.menuStyle??"default";default:return"default"}}function Js(e){const{config:t}=xe(e),r=Se[t.density];return{"--ntd-padding-x":r.paddingX,"--ntd-padding-y":r.paddingY,"--ntd-gap":r.gap,"--ntd-font-size":r.fontSize,"--ntd-line-height":r.lineHeight,"--ntd-input-height":r.inputHeight,"--ntd-button-height":r.buttonHeight}}function Ys(e){const{config:t}=xe(e),r=Fe[t.animation];return{"--ntd-anim-duration":r.duration,"--ntd-anim-easing":r.easing,"--ntd-hover-scale":r.hoverScale,"--ntd-click-scale":r.clickScale}}function fr(e,t,r="var(--nice-info, #6366f1)"){switch(e){case"button":return ut(t.buttonStyle,r);case"input":return ft(t.inputStyle);case"card":return mt(t.cardStyle);case"badge":return sr(t.badgeStyle??"solid",r);case"tab":return ir(t.tabStyle??"underline",r);case"toggle":return cr(t.toggleStyle??"default");case"tooltip":return lr(t.tooltipStyle??"dark");case"table":return dr(t.tableStyle??"default");case"menu":return{};case"modal":return{};default:return{}}}function mr(e){const t=ve(e);return{"data-ntd-display-style":e,"data-ntd-density":t.density,"data-ntd-animation":t.animation,"data-ntd-radius":t.radius,"data-ntd-button":t.buttonStyle,"data-ntd-input":t.inputStyle,"data-ntd-card":t.cardStyle}}const Qs=[{name:"default",label:"Default",description:"Standard balanced look",density:"normal",animation:"normal"},{name:"minimal",label:"Minimal",description:"Subtle shadows, underlined inputs",density:"normal",animation:"subtle"},{name:"rounded",label:"Rounded",description:"Large radii, pill tabs, filled inputs",density:"comfortable",animation:"normal"},{name:"sharp",label:"Sharp",description:"Zero radius, bordered cards, compact",density:"compact",animation:"subtle"},{name:"glass",label:"Glass",description:"Glassmorphism with frosted backdrops",density:"normal",animation:"normal"},{name:"neumorphic",label:"Neumorphic",description:"Soft raised and sunken surfaces",density:"comfortable",animation:"subtle"},{name:"playful",label:"Playful",description:"Gradients, bouncy animations, colorful",density:"comfortable",animation:"playful"},{name:"enterprise",label:"Enterprise",description:"Conservative, outlined, striped tables",density:"compact",animation:"subtle"},{name:"modern3d",label:"Modern 3D",description:"Deep shadows, 3D buttons, elevated",density:"normal",animation:"normal"},{name:"brutalist",label:"Brutalist",description:"Raw bold borders, no radius, no shadow",density:"normal",animation:"none"},{name:"luxe",label:"Luxe",description:"Premium feel with gradients and depth",density:"comfortable",animation:"normal"},{name:"pill",label:"Pill",description:"Full-radius pill shapes everywhere",density:"normal",animation:"normal"},{name:"flat",label:"Flat",description:"No shadows, filled inputs, soft badges",density:"normal",animation:"subtle"},{name:"editorial",label:"Editorial",description:"Clean typographic, paper cards",density:"comfortable",animation:"subtle"},{name:"dashboard",label:"Dashboard",description:"Data-dense, enclosed tabs, striped",density:"compact",animation:"subtle"},{name:"softCloud",label:"Soft Cloud",description:"Frosted glass, soft iOS-style toggles",density:"comfortable",animation:"normal"},{name:"cosmic",label:"Cosmic",description:"Mesh backgrounds, glowing shadows",density:"comfortable",animation:"dramatic"},{name:"corporate",label:"Corporate",description:"Safe, grey, no flair — boardroom ready",density:"compact",animation:"none"},{name:"bank",label:"Bank",description:"Ultra-conservative, heavy borders",density:"compact",animation:"none"},{name:"government",label:"Government",description:"Accessible, high-contrast, minimal",density:"normal",animation:"none"},{name:"military",label:"Military",description:"Dark, angular, no-nonsense tactical",density:"compact",animation:"none"},{name:"legal",label:"Legal",description:"Typographic, paper-like, document feel",density:"comfortable",animation:"none"},{name:"medical",label:"Medical",description:"Clean clinical, professional blue-toned",density:"normal",animation:"subtle"},{name:"swiss",label:"Swiss",description:"Grid-based, Helvetica spirit, precision",density:"normal",animation:"subtle"},{name:"scandinavian",label:"Scandinavian",description:"Warm, spacious, hygge-inspired calm",density:"spacious",animation:"subtle"},{name:"bauhaus",label:"Bauhaus",description:"Geometric, primary colours, strong lines",density:"normal",animation:"none"},{name:"notebook",label:"Notebook",description:"Handwritten feel, paper textures, ruled",density:"comfortable",animation:"subtle"},{name:"origami",label:"Origami",description:"Folded paper, subtle shadows, layered",density:"normal",animation:"normal"},{name:"watercolor",label:"Watercolor",description:"Soft bleeding edges, artistic, dreamy",density:"comfortable",animation:"normal"},{name:"monochrome",label:"Monochrome",description:"Pure black & white, typography focus",density:"normal",animation:"none"},{name:"paper",label:"Paper",description:"Minimal white, subtle shadows, like stationery",density:"comfortable",animation:"subtle"},{name:"zen",label:"Zen",description:"Ultra-minimal, whitespace, meditative calm",density:"spacious",animation:"subtle"},{name:"terminal",label:"Terminal",description:"Monospace, dark, retro-computing green",density:"compact",animation:"none"},{name:"hacker",label:"Hacker",description:"Matrix-style, neon green on black",density:"compact",animation:"subtle"},{name:"retro8bit",label:"8-bit Retro",description:"Pixel art, chunky borders, game boy era",density:"normal",animation:"none"},{name:"synthwave",label:"Synthwave",description:"80s synth, neon grids, chrome gradients",density:"normal",animation:"dramatic"},{name:"cyberpunk",label:"Cyberpunk",description:"Angular, neon, glitch aesthetics, dark",density:"compact",animation:"dramatic"},{name:"steampunk",label:"Steampunk",description:"Brass, gears, Victorian-era technology",density:"normal",animation:"subtle"},{name:"vapor",label:"Vaporwave",description:"80s/90s aesthetics, pink/teal gradients",density:"comfortable",animation:"playful"},{name:"neon",label:"Neon",description:"Bright glowing outlines on dark surfaces",density:"normal",animation:"dramatic"},{name:"windows95",label:"Windows 95",description:"Chunky beveled 3D, classic OS nostalgia",density:"compact",animation:"none"},{name:"material",label:"Material",description:"Google Material Design — depth & motion",density:"normal",animation:"normal"},{name:"fluent",label:"Fluent",description:"Microsoft Fluent — acrylic, reveal, depth",density:"normal",animation:"subtle"},{name:"cupertino",label:"Cupertino",description:"Apple iOS/macOS style — frosted, rounded",density:"comfortable",animation:"normal"},{name:"ant",label:"Ant Design",description:"Ant Design — clean, reliable, professional",density:"normal",animation:"subtle"},{name:"bootstrap",label:"Bootstrap",description:"Bootstrap-like — rounded, striped tables",density:"normal",animation:"subtle"},{name:"chakra",label:"Chakra",description:"Chakra UI — accessible, clean, modern",density:"normal",animation:"normal"},{name:"notion",label:"Notion",description:"Notion-like — text-focused, minimal chrome",density:"normal",animation:"subtle"},{name:"linear",label:"Linear",description:"Linear app — sleek, dark, polished",density:"compact",animation:"subtle"},{name:"vercel",label:"Vercel",description:"Vercel/Next.js — black/white, sharp, modern",density:"normal",animation:"subtle"},{name:"candy",label:"Candy",description:"Sweet pastels, rounded, sugar rush!",density:"comfortable",animation:"playful"},{name:"bubblegum",label:"Bubblegum",description:"Pink puffy bubbles, extremely round",density:"spacious",animation:"playful"},{name:"cartoon",label:"Cartoon",description:"Thick outlines, bold colours, exaggerated",density:"comfortable",animation:"playful"},{name:"kawaii",label:"Kawaii",description:"Cute, pastel, sparkly, UwU aesthetic",density:"spacious",animation:"dramatic"},{name:"circus",label:"Circus",description:"Bold stripes, loud, step right up!",density:"spacious",animation:"dramatic"},{name:"gaming",label:"Gaming",description:"Dark, neon accents, angular, RGB everything",density:"normal",animation:"dramatic"},{name:"kiddo",label:"Kiddo",description:"Colourful, puffy, child-friendly, big touch",density:"spacious",animation:"playful"},{name:"disco",label:"Disco",description:"Flashing, spinning, Saturday night fever",density:"comfortable",animation:"dramatic"},{name:"clown",label:"Clown",description:"Maximum chaos, honk honk, pure madness",density:"spacious",animation:"dramatic"}];function Zs({enabled:e,readOnly:t,disabled:r}){const[a,n]=c.useState(!1),o=c.useRef(!1),i=c.useCallback(()=>{t||r||!e||(o.current=!0,n(!0))},[t,r,e]),s=c.useCallback(()=>{n(!1)},[]),l=c.useCallback(d=>{d&&o.current&&(o.current=!1,requestAnimationFrame(()=>{if(d.focus(),d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement)try{d.select()}catch{}}))},[]);return c.useEffect(()=>{(t||r)&&a&&n(!1)},[t,r,a]),{isDisplay:!!e&&!a,enterEdit:i,exitEdit:s,autoFocusRef:l}}const ei=({value:e,placeholder:t,disabled:r,readOnly:a,onActivate:n,className:o,ariaLabel:i})=>{const s=e==null||e==="",l=d=>{r||a||(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),n())};return S.jsx("span",{role:"button",tabIndex:r?-1:0,className:`nice-display-value ${s?"nice-display-value--empty":""} ${r?"nice-display-value--disabled":""} ${a?"nice-display-value--readonly":""} ${o||""}`.trim(),onClick:()=>{!r&&!a&&n()},onKeyDown:l,"aria-label":i,"aria-disabled":r||void 0,children:s?t??"—":e})};function ti(e){if(!e)return"";let t=e;return t=t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,""),t=t.replace(/\s+on\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,""),t=t.replace(/(href|src|action)\s*=\s*(?:"javascript:[^"]*"|'javascript:[^']*')/gi,'$1=""'),t=t.replace(/(href|src|action)\s*=\s*(?:"vbscript:[^"]*"|'vbscript:[^']*')/gi,'$1=""'),t=t.replace(/<\/?(iframe|object|embed|form)\b[^>]*>/gi,""),t}function ri(e){const t=e.trim().toLowerCase();return!!(t.startsWith("http://")||t.startsWith("https://")||t.startsWith("blob:")||t.startsWith("data:image/")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../"))}const pr={"chevron-down":"M6 9l6 6 6-6","chevron-up":"M18 15l-6-6-6 6","chevron-left":"M15 18l-6-6 6-6","chevron-right":"M9 6l6 6-6 6","arrow-left":"M19 12H5m0 0l7 7m-7-7l7-7","arrow-right":"M5 12h14m0 0l-7-7m7 7l-7 7","arrow-up":"M12 19V5m0 0l-7 7m7-7l7 7","arrow-down":"M12 5v14m0 0l7-7m-7 7l-7-7",close:"M18 6L6 18M6 6l12 12",plus:"M12 5v14m-7-7h14",minus:"M5 12h14",check:"M5 13l4 4L19 7",edit:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7M18.5 2.5a2.121 2.121 0 113 3L12 15l-4 1 1-4 9.5-9.5z",trash:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16",copy:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",download:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4",upload:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12",refresh:"M4 4v5h5M20 20v-5h-5M20.49 9A9 9 0 005.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 013.51 15",search:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",filter:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z","sort-asc":"M3 4h13M3 8h9m-9 4h6m4 0l4-4m0 0l4 4m-4-4v12","sort-desc":"M3 4h13M3 8h9m-9 4h9m5-4v12m0 0l-4-4m4 4l4-4",sort:"M6 10l6-6 6 6M6 14l6 6 6-6",menu:"M4 6h16M4 12h16M4 18h16","more-vertical":"M12 5v.01M12 12v.01M12 19v.01","more-horizontal":"M5 12h.01M12 12h.01M19 12h.01",settings:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z",eye:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z M15 12a3 3 0 11-6 0 3 3 0 016 0z","eye-off":"M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24 M1 1l22 22",lock:"M19 11H5a2 2 0 00-2 2v7a2 2 0 002 2h14a2 2 0 002-2v-7a2 2 0 00-2-2zm-3-4a4 4 0 10-8 0v4h8V7z",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",warning:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",error:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",success:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",help:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",calendar:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",clock:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",file:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z",folder:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z",image:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",link:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1",mail:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",phone:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",smartphone:"M7 2h10a2 2 0 012 2v16a2 2 0 01-2 2H7a2 2 0 01-2-2V4a2 2 0 012-2z M11 18h2",user:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z",users:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",home:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",star:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z",heart:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z",bell:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",grip:"M4 6h2m4 0h2m4 0h2M4 12h2m4 0h2m4 0h2M4 18h2m4 0h2m4 0h2",hash:"M4 9h16M4 15h16M10 3L8 21M16 3l-2 18",list:"M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01",circle:"M12 21a9 9 0 100-18 9 9 0 000 18z",box:"M21 8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16V8z M3.27 6.96L12 12.01l8.73-5.05 M12 22.08V12",tabs:"M3 9h18v10H3z M7 9V5h6v4",columns:"M4 4h7v16H4z M13 4h7v16h-7z",grid:"M3 3h7v7H3z M14 3h7v7h-7z M14 14h7v7h-7z M3 14h7v7H3z",table:"M3 5h18v14H3z M3 10h18M3 15h18M9 5v14M15 5v14",heading:"M6 4v16M18 4v16M6 12h12",type:"M4 7V4h16v3M9 20h6M12 4v16","align-left":"M3 6h18M3 12h12M3 18h15",input:"M4 9h16a1 1 0 011 1v4a1 1 0 01-1 1H4a1 1 0 01-1-1v-4a1 1 0 011-1z M7 12h5",button:"M5 9h14a2 2 0 012 2v2a2 2 0 01-2 2H5a2 2 0 01-2-2v-2a2 2 0 012-2z",select:"M4 6h16a1 1 0 011 1v10a1 1 0 01-1 1H4a1 1 0 01-1-1V7a1 1 0 011-1z M15 11l-3 3-3-3","check-square":"M9 11l3 3L22 4 M21 12v7a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h11",video:"M23 7l-7 5 7 5V7z M16 5H3a2 2 0 00-2 2v10a2 2 0 002 2h13a2 2 0 002-2V7a2 2 0 00-2-2z",card:"M3 5h18a1 1 0 011 1v12a1 1 0 01-1 1H3a1 1 0 01-1-1V6a1 1 0 011-1z M3 10h18","bar-chart":"M6 20v-6M12 20V4M18 20v-10","line-chart":"M3 3v18h18 M7 15l4-4 3 3 5-6","area-chart":"M3 3v18h18 M7 17v-3l4-4 3 3 5-6v10z","pie-chart":"M21.21 15.89A10 10 0 118 2.83 M22 12A10 10 0 0012 2v10z","donut-chart":"M12 3a9 9 0 100 18 9 9 0 000-18z M12 8a4 4 0 100 8 4 4 0 000-8z","scatter-chart":"M3 3v18h18 M8 16h.01 M11 11h.01 M15 14h.01 M18 8h.01","bars-vertical":"M6 5v14M12 5v14M18 5v14",globe:"M12 3a9 9 0 100 18 9 9 0 000-18z M3 12h18 M12 3a14 14 0 010 18 M12 3a14 14 0 000 18",monitor:"M3 4h18a1 1 0 011 1v11a1 1 0 01-1 1H3a1 1 0 01-1-1V5a1 1 0 011-1z M8 21h8 M12 17v4",camera:"M23 19a2 2 0 01-2 2H3a2 2 0 01-2-2V8a2 2 0 012-2h3l2-3h6l2 3h3a2 2 0 012 2z M12 17a4 4 0 100-8 4 4 0 000 8z",plug:"M9 2v5 M15 2v5 M7 7h10v3a5 5 0 01-10 0V7z M12 15v7",save:"M19 21H5a2 2 0 01-2-2V5a2 2 0 012-2h11l5 5v11a2 2 0 01-2 2z M17 21v-8H7v8 M7 3v5h8",tag:"M20.59 13.41l-7.17 7.17a2 2 0 01-2.83 0L2 12V2h10l8.59 8.59a2 2 0 010 2.82z M7 7h.01",palette:"M12 2a10 10 0 000 20 2 2 0 002-2c0-.5-.2-1-.5-1.3a2 2 0 01-.5-1.2 2 2 0 012-2H17a5 5 0 005-5c0-5-4.5-9-10-9z M6.5 11.5h.01 M9.5 7.5h.01 M14.5 7.5h.01",book:"M4 19.5A2.5 2.5 0 016.5 17H20 M6.5 2H20v20H6.5A2.5 2.5 0 014 19.5v-15A2.5 2.5 0 016.5 2z",cloud:"M18 10h-1.26A8 8 0 109 20h9a5 5 0 000-10z",target:"M12 3a9 9 0 100 18 9 9 0 000-18z M12 7a5 5 0 100 10 5 5 0 000-10z M12 11a1 1 0 100 2 1 1 0 000-2z",message:"M21 11.5a8.5 8.5 0 01-8.5 8.5 8.4 8.4 0 01-3.8-.9L3 21l1.9-5.7a8.4 8.4 0 01-.9-3.8A8.5 8.5 0 0112.5 3 8.5 8.5 0 0121 11.5z",flask:"M9 2h6 M10 2v6.5L4.5 19a1 1 0 00.9 1.5h13.2a1 1 0 00.9-1.5L14 8.5V2 M7 15h10",rocket:"M12 15l-3-3a22 22 0 012-3.95A12.88 12.88 0 0122 2c0 2.72-.78 7.5-6 11a22 22 0 01-3.95 2z M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0 M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5 M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 00-2.91-.09z",music:"M9 18V5l12-2v13 M9 18a3 3 0 11-6 0 3 3 0 016 0z M21 16a3 3 0 11-6 0 3 3 0 016 0z",wifi:"M5 12.55a11 11 0 0114 0 M8.5 16.11a6 6 0 017 0 M12 20h.01 M2 8.82a15 15 0 0120 0",database:"M12 8c4.97 0 9-1.34 9-3s-4.03-3-9-3-9 1.34-9 3 4.03 3 9 3z M21 5v6c0 1.66-4.03 3-9 3s-9-1.34-9-3V5 M21 11v6c0 1.66-4.03 3-9 3s-9-1.34-9-3v-6",slash:"M12 3a9 9 0 100 18 9 9 0 000-18z M5.6 5.6l12.8 12.8",puzzle:"M19.4 13.6a1.6 1.6 0 10.2-3.2H19V7a2 2 0 00-2-2h-3.4v-.4a1.6 1.6 0 10-3.2 0V5H7a2 2 0 00-2 2v3.4h.4a1.6 1.6 0 100 3.2H5V17a2 2 0 002 2h3.4v.4a1.6 1.6 0 103.2 0V19H17a2 2 0 002-2v-3.4z",dollar:"M12 1v22 M17 5H9.5a3.5 3.5 0 000 7h5a3.5 3.5 0 010 7H6",printer:"M6 9V2h12v7 M6 18H4a2 2 0 01-2-2v-5a2 2 0 012-2h16a2 2 0 012 2v5a2 2 0 01-2 2h-2 M6 14h12v8H6z",scale:"M12 3v18 M5 21h14 M5 7l7-2 7 2 M2 13a3 3 0 006 0L5 7zm14 0a3 3 0 006 0L19 7z",accessibility:"M12 3a9 9 0 100 18 9 9 0 000-18z M12 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3z M7.5 10.5l4.5 1 4.5-1 M12 11.5v3.5l-2 3.5 M12 15l2 3.5",window:"M3 4h18a1 1 0 011 1v14a1 1 0 01-1 1H3a1 1 0 01-1-1V5a1 1 0 011-1z M2 9h20 M6 6.5h.01 M9 6.5h.01","map-pin":"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z M12 13a3 3 0 100-6 3 3 0 000 6z",cursor:"M5 3l14 7-6 2-2 6-6-15z",shuffle:"M16 3h5v5 M4 20L21 3 M21 16v5h-5 M15 15l6 6 M4 4l5 5",lightbulb:"M9 18h6 M10 22h4 M12 2a7 7 0 00-4 12.7c.6.5 1 1.3 1 2.1V18h6v-1.2c0-.8.4-1.6 1-2.1A7 7 0 0012 2z",server:"M3 4h18a1 1 0 011 1v4a1 1 0 01-1 1H3a1 1 0 01-1-1V5a1 1 0 011-1z M3 14h18a1 1 0 011 1v4a1 1 0 01-1 1H3a1 1 0 01-1-1v-4a1 1 0 011-1z M7 7h.01 M7 17h.01",terminal:"M4 17l6-6-6-6 M12 19h8","git-branch":"M6 3v12 M18 9a3 3 0 100-6 3 3 0 000 6z M6 21a3 3 0 100-6 3 3 0 000 6z M18 9a9 9 0 01-9 9",send:"M22 2L11 13 M22 2l-7 20-4-9-9-4 20-7z",play:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z M21 12a9 9 0 11-18 0 9 9 0 0118 0z",pause:"M10 9v6m4-6v6m7-3a9 9 0 11-18 0 9 9 0 0118 0z",stop:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z M9 10a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4z",mic:"M12 1a3 3 0 00-3 3v8a3 3 0 006 0V4a3 3 0 00-3-3zM19 10v2a7 7 0 01-14 0v-2M12 19v4M8 23h8",volume:"M11 5L6 9H2v6h4l5 4V5z M15.54 8.46a5 5 0 010 7.07 M19.07 4.93a10 10 0 010 14.14","volume-off":"M11 5L6 9H2v6h4l5 4V5z M23 9l-6 6 M17 9l6 6","skip-back":"M19 20L9 12l10-8v16z M5 19V5",expand:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4",collapse:"M9 9V5m0 4H5m4 0L4 4m11 5h4m-4 0V5m0 4l5-5M9 15v4m0-4H5m4 0l-5 5m15-5h-4m4 0v4m0-4l-5 5","external-link":"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",briefcase:"M20 7H4a2 2 0 00-2 2v9a2 2 0 002 2h16a2 2 0 002-2V9a2 2 0 00-2-2zM16 7V5a2 2 0 00-2-2h-4a2 2 0 00-2 2v2M2 12h20",building:"M4 22V4a2 2 0 012-2h12a2 2 0 012 2v18M4 22h16M9 22v-4h6v4M9 6h.01M15 6h.01M9 10h.01M15 10h.01M9 14h.01M15 14h.01",medal:"M15.477 12.89L17 22l-5-3-5 3 1.523-9.11M12 15a6 6 0 100-12 6 6 0 000 12z",clipboard:"M9 2h6a1 1 0 011 1v1a1 1 0 01-1 1H9a1 1 0 01-1-1V3a1 1 0 011-1zM16 4h2a2 2 0 012 2v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2h2","skip-forward":"M5 4l10 8-10 8V4zM19 5v14","at-sign":"M12 16a4 4 0 100-8 4 4 0 000 8zM16 12v1.5a2.5 2.5 0 005 0V12a9 9 0 10-3.5 7.14",gift:"M20 12v10H4V12M2 7h20v5H2zM12 22V7M12 7H7.5a2.5 2.5 0 010-5C11 2 12 7 12 7zM12 7h4.5a2.5 2.5 0 000-5C13 2 12 7 12 7z",archive:"M21 8v13H3V8M1 3h22v5H1zM10 12h4",reply:"M9 17l-5-5 5-5M4 12h11a4 4 0 014 4v2",forward:"M15 17l5-5-5-5M20 12H9a4 4 0 00-4 4v2",paperclip:"M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48",zap:"M13 2L3 14h9l-1 8 10-12h-9l1-8z",square:"M4 4h16v16H4z",triangle:"M12 4L3 20h18z",hexagon:"M7.5 3h9l4.5 9-4.5 9h-9L3 12z",diamond:"M12 2l10 10-10 10L2 12z",line:"M5 19L19 5",pen:"M12 19l7-7 3 3-7 7-3-3z M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z M11 11a2 2 0 100-4 2 2 0 000 4z",brush:"M9.06 11.9l8.07-8.06a2.85 2.85 0 114.03 4.03l-8.06 8.08 M7.07 14.94c-1.66 0-3 1.35-3 3.02 0 1.33-2.5 1.52-2 2.02 1.08 1.1 2.49 2.02 4 2.02 2.2 0 4-1.8 4-4.04a3.01 3.01 0 00-3-3.02z",droplet:"M12 2.69l5.66 5.66a8 8 0 11-11.31 0z",bucket:"M5 8h14l-1.5 11a2 2 0 01-2 1.8H8.5a2 2 0 01-2-1.8L5 8z M5 8l2-4h10l2 4",scissors:"M6 9a3 3 0 100-6 3 3 0 000 6z M6 21a3 3 0 100-6 3 3 0 000 6z M20 4L8.12 15.88 M14.47 14.48L20 20 M8.12 8.12L12 12",layers:"M12 2l9 5-9 5-9-5 9-5z M3 12l9 5 9-5 M3 17l9 5 9-5",crop:"M6 2v14a2 2 0 002 2h14 M2 6h14a2 2 0 012 2v14",eyedropper:"M2 22l1-1h3l9-9 M3 21v-3l9-9 M15 6l3.5-3.5a2.12 2.12 0 013 3L18 9l-3-3z",ruler:"M21.3 8.7l-6-6a1 1 0 00-1.4 0L2.7 13.9a1 1 0 000 1.4l6 6a1 1 0 001.4 0L21.3 10.1a1 1 0 000-1.4z M7.5 10.5l2 2 M11 7l2 2 M14.5 3.5l2 2",wand:"M15 4V2 M15 16v-2 M8 9h2 M20 9h2 M3 21l9-9 M12.2 6.2L11 5 M17.8 6.2L19 5 M17.8 11.8L19 13",move:"M5 9l-3 3 3 3 M9 5l3-3 3 3 M15 19l-3 3-3-3 M19 9l3 3-3 3 M2 12h20 M12 2v20",gamepad:"M6 12h4 M8 10v4 M15 13h.01 M18 11h.01 M2 12a4 4 0 014-4h12a4 4 0 014 4l-1.5 6a2 2 0 01-2 1.5H5.5a2 2 0 01-2-1.5L2 12z",eraser:"M7 21l-4.3-4.3a1 1 0 010-1.4l9.6-9.6a2 2 0 012.8 0l4.6 4.6a2 2 0 010 2.8L13 21H7z M22 21H7 M5 12l5 5",thermometer:"M14 14.76V3.5a2.5 2.5 0 00-5 0v11.26a4.5 4.5 0 105 0z",door:"M18 20V5a1 1 0 00-1-1H7a1 1 0 00-1 1v15 M3 20h18 M13 11.5h.01",stairs:"M3 20h3v-3h3v-3h3v-3h3v-3h3",elevator:"M5 3h14a1 1 0 011 1v16a1 1 0 01-1 1H5a1 1 0 01-1-1V4a1 1 0 011-1z M9.5 9L12 6.5 14.5 9 M9.5 15l2.5 2.5 2.5-2.5",bed:"M2 4v16 M2 8h18a2 2 0 012 2v10 M22 17H2 M6 8v4 M2 12h4",sofa:"M3 9V7a2 2 0 012-2h14a2 2 0 012 2v2 M21 9a2 2 0 00-2 2v3H5v-3a2 2 0 00-2-2 2 2 0 00-2 2v4a1 1 0 001 1h18a1 1 0 001-1v-4a2 2 0 00-2-2 M5 18v2 M19 18v2",chair:"M6 11V5a2 2 0 012-2h8a2 2 0 012 2v6 M5 11h14 M6 11l-1 8h14l-1-8 M6 19v2 M18 19v2",utensils:"M3 2v7a2 2 0 002 2 2 2 0 002-2V2 M5 2v20 M21 2v9c0 1-1 1.8-2 1.8h-1V20 M18 2v9",mountain:"M8 3l4 8 5-5 5 15H2L8 3z",tree:"M12 2L7 11h10L12 2z M9 11l3 5 3-5 M12 16v6",sun:"M12 17a5 5 0 100-10 5 5 0 000 10z M12 1v2 M12 21v2 M4.22 4.22l1.42 1.42 M18.36 18.36l1.42 1.42 M1 12h2 M21 12h2 M4.22 19.78l1.42-1.42 M18.36 5.64l1.42-1.42",moon:"M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z","list-ordered":"M10 6h11M10 12h11M10 18h11M4 6h1v4M4 10h2M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",unlink:"M18.84 12.25l1.72-1.71a5 5 0 0 0-7.07-7.07L11 5.78M3 3l18 18M9 15l3-3M14 11l3 3M14 21l-1.72-1.72a5 5 0 0 1-7.07-7.07L7 10.49",code:"M16 18l6-6-6-6M8 6l-6 6 6 6",quote:"M3 21c3-3 3-9 0-12M21 21c-3-3-3-9 0-12M9 7h6v6H9zM15 7h6v6h-6z",indent:"M3 8l4 4-4 4M7 6h14M7 12h14M3 18h18",outdent:"M7 8l-4 4 4 4M21 6H3M21 12H7M21 18H3","align-center":"M3 6h18M6 12h12M3 18h18","align-right":"M3 6h18M9 12h12M3 18h18","align-justify":"M3 6h18M3 12h18M3 18h18","align-top":"M4 4h16M9 8v12M15 8v7","align-middle":"M4 12h16M9 5v14M15 8v8","align-bottom":"M4 20h16M9 4v12M15 9v7","distribute-h":"M4 4v16M20 4v16M10 7h4v10h-4z","distribute-v":"M4 4h16M4 20h16M7 10h10v4H7z",parallelogram:"M7 5h14l-4 14H3z",barcode:"M4 5v14M6.5 5v14M10 5v14M13 5v14M15.5 5v14M19 5v14M20.5 5v14","qr-code":"M4 4h6v6H4z M14 4h6v6h-6z M4 14h6v6H4z M14 14h2v2h-2z M18 14h2v2h-2z M14 18h2v2h-2z M18 18h2v2h-2z",smile:"M12 22a10 10 0 1 1 0-20 10 10 0 0 1 0 20zM8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01",undo:"M9 14L4 9l5-5M4 9h10.5a5.5 5.5 0 010 11H11",redo:"M15 14l5-5-5-5M20 9H9.5a5.5 5.5 0 000 11H13",unlock:"M19 11H5a2 2 0 00-2 2v7a2 2 0 002 2h14a2 2 0 002-2v-7a2 2 0 00-2-2z M7 11V7a5 5 0 019.9-1",keyboard:"M4 6h16a2 2 0 012 2v8a2 2 0 01-2 2H4a2 2 0 01-2-2V8a2 2 0 012-2z M6 10h.01 M10 10h.01 M14 10h.01 M18 10h.01 M8 14h8","page-break":"M6 3v5h12V3 M6 21v-5h12v5 M2 12h3 M8 12h3 M13 12h3 M19 12h3",shield:"M12 2l8 3v6c0 5-3.4 9.4-8 11-4.6-1.6-8-6-8-11V5z",repeat:"M17 2l4 4-4 4 M3 11V9a4 4 0 014-4h14 M7 22l-4-4 4-4 M21 13v2a4 4 0 01-4 4H3",pin:"M12 17v5 M5 17h14l-1.5-3V8a2 2 0 00-2-2h-7a2 2 0 00-2 2v6z","mic-off":"M1 1l22 22 M9 9v3a3 3 0 005.12 2.12 M15 9.34V4a3 3 0 00-5.94-.6 M17 16.95A7 7 0 015 12v-2 M19 10v2a7 7 0 01-.11 1.23 M12 19v4 M8 23h8","log-out":"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4 M16 17l5-5-5-5 M21 12H9","chevrons-left":"M11 17l-5-5 5-5 M18 17l-5-5 5-5","chevrons-right":"M13 17l5-5-5-5 M6 17l5-5-5-5","zoom-in":"M11 4a7 7 0 100 14 7 7 0 000-14z M21 21l-4.35-4.35 M11 8v6 M8 11h6","zoom-out":"M11 4a7 7 0 100 14 7 7 0 000-14z M21 21l-4.35-4.35 M8 11h6",navigation:"M12 2l7 19-7-4-7 4z","refresh-ccw":"M1 4v6h6 M23 20v-6h-6 M20.49 9A9 9 0 005.64 5.64L1 10 M3.51 15a9 9 0 0014.85 3.36L23 14",minimize:"M4 14h6v6 M20 10h-6V4 M14 10l7-7 M3 21l7-7"},ai={xs:12,sm:16,md:20,lg:24,xl:32},ht=c.createContext({}),ni=({resolver:e,children:t})=>c.createElement(ht.Provider,{value:{resolver:e}},t);function oi({path:e,size:t,className:r,style:a,color:n,title:o,onClick:i}){return S.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:n||"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:`nice-icon ${r||""}`,style:a,role:o?"img":"presentation","aria-label":o,"aria-hidden":!o,onClick:i,children:[o&&S.jsx("title",{children:o}),S.jsx("path",{d:e})]})}const K=({name:e,size:t="md",className:r,style:a,color:n,title:o,onClick:i})=>{const{resolver:s}=c.useContext(ht),l=typeof t=="number"?t:ai[t];if(s){const u=s(e,l);if(u)return S.jsx("span",{className:`nice-icon-wrap ${r||""}`,style:a,onClick:i,children:u})}const d=pr[e];return d?S.jsx(oi,{path:d,size:l,className:r,style:a,color:n,title:o,onClick:i}):null};function si(){const{resolver:e}=c.useContext(ht);return{renderIcon:c.useCallback((r,a="md")=>r==null?null:typeof r!="string"?r:c.createElement(K,{name:r,size:a}),[e])}}const ii=Object.keys(pr),ci=({style:e})=>S.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:"0.3em",height:"0.6em",margin:"0 0.35em 0.15em 0.1em",borderRight:"0.12em solid currentColor",borderBottom:"0.12em solid currentColor",transform:"rotate(45deg)",...e}}),li=({style:e})=>S.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:"0.85em",height:"0.85em",borderRadius:"50%",border:"0.12em solid currentColor",borderTopColor:"transparent",transform:"rotate(-45deg)",...e}}),Bt={down:{transform:"rotate(45deg)",margin:"0 0 0.2em"},up:{transform:"rotate(-135deg)",margin:"0.2em 0 0"},left:{transform:"rotate(135deg)",margin:"0 0 0 0.2em"},right:{transform:"rotate(-45deg)",margin:"0 0.2em 0 0"}},di=({direction:e,style:t})=>S.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:"0.45em",height:"0.45em",margin:Bt[e].margin,borderRight:"0.12em solid currentColor",borderBottom:"0.12em solid currentColor",transform:Bt[e].transform,...t}}),ui=({style:e})=>S.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:"0.5em",height:"0.5em",borderRadius:"50%",background:"currentColor",...e}}),fi=({style:e})=>S.jsxs("span",{"aria-hidden":"true",style:{display:"inline-block",position:"relative",width:"0.7em",height:"0.7em",...e},children:[S.jsx("span",{style:{position:"absolute",top:"50%",left:0,width:"100%",height:"0.12em",background:"currentColor",transform:"translateY(-50%) rotate(45deg)"}}),S.jsx("span",{style:{position:"absolute",top:"50%",left:0,width:"100%",height:"0.12em",background:"currentColor",transform:"translateY(-50%) rotate(-45deg)"}})]});function mi(){const[e,t]=c.useState(()=>typeof window<"u"?window.matchMedia("(pointer: coarse)").matches:!1);return c.useEffect(()=>{const r=window.matchMedia("(pointer: coarse)");t(r.matches);const a=n=>t(n.matches);return r.addEventListener("change",a),()=>r.removeEventListener("change",a)},[]),e}function pi(){const[e,t]=c.useState(()=>typeof window<"u"&&window.matchMedia("(pointer: coarse)").matches?"touch":"mouse");return c.useEffect(()=>{const r=()=>t("touch"),a=n=>{n.pointerType==="mouse"&&t("mouse")};return window.addEventListener("touchstart",r,{passive:!0,capture:!0}),window.addEventListener("pointerdown",a,{capture:!0}),()=>{window.removeEventListener("touchstart",r,{capture:!0}),window.removeEventListener("pointerdown",a,{capture:!0})}},[]),e}function gi(e,t=500){const r=c.useRef(null),a=c.useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]);return{onPointerDown:c.useCallback(o=>{o.pointerType==="touch"&&(a(),r.current=setTimeout(e,t))},[e,t,a]),onPointerUp:a,onPointerCancel:a}}function hi(){const e=c.useRef(null),t=c.useCallback(()=>{e.current&&(clearTimeout(e.current),e.current=null)},[]),r=c.useCallback(a=>{t();let n=300;const o=()=>{a(),n=Math.max(30,n*.82),e.current=setTimeout(o,n)};e.current=setTimeout(o,400)},[t]);return c.useEffect(()=>t,[t]),{start:r,stop:t}}function yi(e){const t=c.useId();return e||t}function bi(e,t){const[r,a]=c.useState(e);return c.useEffect(()=>{const n=setTimeout(()=>a(e),t);return()=>clearTimeout(n)},[e,t]),r}function vi(e,t){c.useEffect(()=>{const r=a=>{!e.current||e.current.contains(a.target)||t()};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[e,t])}function Si(e,t){c.useEffect(()=>{if(!t||!e.current)return;const r=e.current,a=document.activeElement,n=r.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),o=n[0],i=n[n.length-1],s=l=>{l.key==="Tab"&&(l.shiftKey?document.activeElement===o&&(l.preventDefault(),i==null||i.focus()):document.activeElement===i&&(l.preventDefault(),o==null||o.focus()))};return o==null||o.focus(),r.addEventListener("keydown",s),()=>{var l;r.removeEventListener("keydown",s),(l=a==null?void 0:a.focus)==null||l.call(a)}},[e,t])}function xi(e={}){const{defaultMode:t="system",storageKey:r="nice-color-mode",darkClass:a="nice-dark",lightClass:n="nice-light"}=e,[o,i]=c.useState(()=>typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),[s,l]=c.useState(()=>{if(typeof window>"u")return t;const m=localStorage.getItem(r);return m==="light"||m==="dark"||m==="system"?m:t});c.useEffect(()=>{const m=window.matchMedia("(prefers-color-scheme: dark)"),p=g=>i(g.matches?"dark":"light");return m.addEventListener("change",p),()=>m.removeEventListener("change",p)},[]);const d=s==="system"?o==="dark":s==="dark";c.useEffect(()=>{const m=document.documentElement;return d?(m.classList.add(a),m.classList.remove(n)):(m.classList.add(n),m.classList.remove(a)),()=>{m.classList.remove(a,n)}},[d,a,n]),c.useEffect(()=>{localStorage.setItem(r,s)},[s,r]);const u=c.useCallback(()=>l("light"),[]),f=c.useCallback(()=>l("dark"),[]),h=c.useCallback(()=>l("system"),[]),y=c.useCallback(()=>l(m=>m==="system"?o==="dark"?"light":"dark":m==="dark"?"light":"dark"),[o]);return{isDark:d,mode:s,systemPreference:o,setLight:u,setDark:f,setSystem:h,toggle:y}}function wi(e,t={}){const{colorCount:r=5,quality:a=5}=t,[n,o]=c.useState(null),[i,s]=c.useState(!1),[l,d]=c.useState(null);return c.useEffect(()=>{if(!e){o(null);return}(async()=>{s(!0),d(null);try{let f;typeof e=="string"?(f=new Image,f.crossOrigin="anonymous",await new Promise((M,E)=>{f.onload=()=>M(),f.onerror=()=>E(new Error("Failed to load image")),f.src=e})):f=e;const h=document.createElement("canvas"),y=100,m=Math.min(y/f.width,y/f.height,1);h.width=f.width*m,h.height=f.height*m;const p=h.getContext("2d");if(!p)throw new Error("Canvas context unavailable");p.drawImage(f,0,0,h.width,h.height);const g=p.getImageData(0,0,h.width,h.height),v=[],b=Math.max(1,Math.floor(11-a));for(let M=0;M<g.data.length;M+=4*b){const E=g.data[M],L=g.data[M+1],T=g.data[M+2];if(g.data[M+3]>200){const R=(E+L+T)/3;R>20&&R<235&&v.push([E,L,T])}}if(v.length===0)throw new Error("No valid colors found in image");const w=ki(v,r).sort((M,E)=>{const L=Math.max(...M)-Math.min(...M);return Math.max(...E)-Math.min(...E)-L}),A=M=>"#"+M.map(E=>Math.round(E).toString(16).padStart(2,"0")).join(""),k=M=>(.299*M[0]+.587*M[1]+.114*M[2])/255>.5?"#000000":"#ffffff",C=w.slice();o({primary:A(C[0]||[100,100,100]),secondary:A(C[1]||C[0]||[150,150,150]),accent:A(w[0]||[100,100,100]),palette:C.map(A),primaryText:k(C[0]||[100,100,100]),secondaryText:k(C[1]||C[0]||[150,150,150])})}catch(f){d(f instanceof Error?f.message:"Unknown error"),o(null)}finally{s(!1)}})()},[e,r,a]),{colors:n,loading:i,error:l}}function ki(e,t,r=20){if(e.length<=t)return e;const a=[],n=new Set;for(;a.length<t;){const o=Math.floor(Math.random()*e.length);n.has(o)||(n.add(o),a.push([...e[o]]))}for(let o=0;o<r;o++){const i=Array.from({length:t},()=>[]);for(const l of e){let d=1/0,u=0;for(let f=0;f<t;f++){const h=Math.sqrt((l[0]-a[f][0])**2+(l[1]-a[f][1])**2+(l[2]-a[f][2])**2);h<d&&(d=h,u=f)}i[u].push(l)}let s=!1;for(let l=0;l<t;l++){if(i[l].length===0)continue;const d=[0,0,0];for(const u of i[l])d[0]+=u[0],d[1]+=u[1],d[2]+=u[2];d[0]/=i[l].length,d[1]/=i[l].length,d[2]/=i[l].length,(Math.abs(d[0]-a[l][0])>1||Math.abs(d[1]-a[l][1])>1||Math.abs(d[2]-a[l][2])>1)&&(s=!0),a[l]=d}if(!s)break}return a}function Mi(e){const t=e.replace("#",""),r=parseInt(t.slice(0,2),16),a=parseInt(t.slice(2,4),16),n=parseInt(t.slice(4,6),16),o=Math.max(r,a,n)/255,i=Math.min(r,a,n)/255;let s=0,l=0;const d=(o+i)/2;if(o!==i){const f=o-i;switch(l=d>.5?f/(2-o-i):f/(o+i),o){case r/255:s=((a/255-n/255)/f+(a<n?6:0))/6;break;case a/255:s=((n/255-r/255)/f+2)/6;break;case n/255:s=((r/255-a/255)/f+4)/6;break}}const u=(f,h,y)=>{const m=(w,A,k)=>(k<0&&(k+=1),k>1&&(k-=1),k<.16666666666666666?w+(A-w)*6*k:k<.5?A:k<.6666666666666666?w+(A-w)*(.6666666666666666-k)*6:w),p=y<.5?y*(1+h):y+h-y*h,g=2*y-p,v=Math.round(m(g,p,f+1/3)*255),b=Math.round(m(g,p,f)*255),x=Math.round(m(g,p,f-1/3)*255);return"#"+[v,b,x].map(w=>w.toString(16).padStart(2,"0")).join("")};return{lightest:u(s,Math.min(l*.3,1),.97),lighter:u(s,Math.min(l*.5,1),.9),light:u(s,Math.min(l*.7,1),.8),base:e,dark:u(s,Math.min(l*1.1,1),Math.max(d-.15,.1)),darker:u(s,Math.min(l*1.2,1),Math.max(d-.25,.05)),darkest:u(s,Math.min(l*1.3,1),Math.max(d-.35,.02)),text:d>.5?"#000000":"#ffffff",textInverse:d>.5?"#ffffff":"#000000"}}const me={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},le=["xs","sm","md","lg","xl","xxl"];function we(e=me){const[t,r]=c.useState(()=>typeof window<"u"?window.innerWidth:e.lg);c.useEffect(()=>{let s;const l=()=>{s&&cancelAnimationFrame(s),s=requestAnimationFrame(()=>r(window.innerWidth))};return window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l),s&&cancelAnimationFrame(s)}},[]);const a=c.useMemo(()=>{for(let s=le.length-1;s>=0;s--)if(t>=e[le[s]])return le[s];return"xs"},[t,e]),n=c.useCallback(s=>t>=e[s],[t,e]),o=c.useCallback(s=>t<e[s],[t,e]),i=c.useCallback((s,l)=>t>=e[s]&&t<e[l],[t,e]);return{current:a,width:t,isAbove:n,isBelow:o,isBetween:i,isMobile:t<e.md,isTablet:t>=e.md&&t<e.lg,isDesktop:t>=e.lg}}function Ie(e){const[t,r]=c.useState(()=>typeof window>"u"?!1:window.matchMedia(e).matches);return c.useEffect(()=>{const a=window.matchMedia(e);r(a.matches);const n=o=>r(o.matches);return a.addEventListener("change",n),()=>a.removeEventListener("change",n)},[e]),t}function Ci(e,t=me){const{current:r}=we(t);return c.useMemo(()=>{if(e==null||typeof e!="object"||Array.isArray(e))return e;const a=e,n=le.indexOf(r);for(let o=n;o>=0;o--){const i=a[le[o]];if(i!==void 0)return i}for(let o=n+1;o<le.length;o++){const i=a[le[o]];if(i!==void 0)return i}},[e,r])}function Ai(e){const[t,r]=c.useState({width:0,height:0});return c.useEffect(()=>{const a=e.current;if(!a)return;const n=new ResizeObserver(([o])=>{const{width:i,height:s}=o.contentRect;r({width:i,height:s})});return n.observe(a),()=>n.disconnect()},[e]),t}function gr(){const{width:e,isMobile:t}=we(),r=c.useMemo(()=>typeof window>"u"?!1:"ontouchstart"in window||navigator.maxTouchPoints>0,[]),a=Ie("(prefers-reduced-motion: reduce)"),n=Ie("(orientation: portrait)"),o=c.useMemo(()=>typeof window>"u"?1:window.devicePixelRatio||1,[]),i=t&&r,s=!t&&e<me.lg&&r,l=!r||e>=me.lg;return{isMobile:i||s,isTouch:r,isPhone:i,isTablet:s,isDesktop:l,prefersReducedMotion:a,isPortrait:n,pixelRatio:o}}function Ei(e={}){const{forceVariant:t,breakpoints:r=me}=e,{isMobile:a,isTablet:n,isDesktop:o}=we(r),i=gr();return t||(i.isPhone?"mobile":i.isTablet?"tablet":i.isDesktop?"desktop":a?"mobile":n?"tablet":"desktop")}function Ni(e={}){const{showAt:t,hideAt:r,mobileOnly:a,desktopOnly:n,tabletOnly:o}=e,{current:i,isMobile:s,isTablet:l,isDesktop:d}=we();return a?s:n?d:o?l:r&&r.includes(i)?!1:t?t.includes(i):!0}function Li(){return Ie("(orientation: portrait)")?"portrait":"landscape"}function Ti(){const[e,t]=c.useState({top:0,right:0,bottom:0,left:0});return c.useEffect(()=>{if(typeof window>"u"||!CSS.supports("padding-top","env(safe-area-inset-top)"))return;const r=()=>{getComputedStyle(document.documentElement);const a=document.createElement("div");a.style.cssText=`
10
+ */const be={none:{xs:"0",sm:"0",md:"0",lg:"0",xl:"0",full:"0"},sm:{xs:"2px",sm:"3px",md:"4px",lg:"6px",xl:"8px",full:"9999px"},md:{xs:"4px",sm:"6px",md:"8px",lg:"12px",xl:"16px",full:"9999px"},lg:{xs:"6px",sm:"10px",md:"14px",lg:"20px",xl:"28px",full:"9999px"},xl:{xs:"10px",sm:"16px",md:"24px",lg:"32px",xl:"48px",full:"9999px"},"2xl":{xs:"16px",sm:"24px",md:"32px",lg:"48px",xl:"64px",full:"9999px"},full:{xs:"9999px",sm:"9999px",md:"9999px",lg:"9999px",xl:"9999px",full:"9999px"}},De={none:"none",subtle:"0 1px 2px 0 var(--nice-overlay-5, rgba(0, 0, 0, 0.05))",md:"0 4px 6px -1px var(--nice-overlay-10, rgba(0, 0, 0, 0.1)), 0 2px 4px -2px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))",lg:"0 10px 15px -3px var(--nice-overlay-10, rgba(0, 0, 0, 0.1)), 0 4px 6px -4px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))",xl:"0 20px 25px -5px var(--nice-overlay-10, rgba(0, 0, 0, 0.1)), 0 8px 10px -6px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))",inner:"inset 0 2px 4px 0 var(--nice-overlay-5, rgba(0, 0, 0, 0.05))",colored:"0 4px 14px 0 var(--ntd-color-primary-alpha, rgba(99, 102, 241, 0.4))",glow:"0 0 20px var(--ntd-color-primary-alpha, rgba(99, 102, 241, 0.5))"},ir={none:"none",subtle:"0 1px 2px 0 var(--nice-overlay-20, rgba(0, 0, 0, 0.2))",md:"0 4px 6px -1px var(--nice-overlay-30, rgba(0, 0, 0, 0.3)), 0 2px 4px -2px var(--nice-overlay-20, rgba(0, 0, 0, 0.2))",lg:"0 10px 15px -3px var(--nice-overlay-40, rgba(0, 0, 0, 0.4)), 0 4px 6px -4px var(--nice-overlay-30, rgba(0, 0, 0, 0.3))",xl:"0 20px 25px -5px var(--nice-overlay-50, rgba(0, 0, 0, 0.5)), 0 8px 10px -6px var(--nice-overlay-40, rgba(0, 0, 0, 0.4))",inner:"inset 0 2px 4px 0 var(--nice-overlay-30, rgba(0, 0, 0, 0.3))",colored:"0 4px 14px 0 var(--ntd-color-primary-alpha, rgba(99, 102, 241, 0.5))",glow:"0 0 30px var(--ntd-color-primary-alpha, rgba(99, 102, 241, 0.6))"},ve={compact:{paddingX:"8px",paddingY:"4px",gap:"4px",fontSize:"13px",lineHeight:"1.3",inputHeight:"28px",buttonHeight:"28px"},normal:{paddingX:"12px",paddingY:"8px",gap:"8px",fontSize:"14px",lineHeight:"1.5",inputHeight:"36px",buttonHeight:"36px"},comfortable:{paddingX:"16px",paddingY:"12px",gap:"12px",fontSize:"15px",lineHeight:"1.6",inputHeight:"44px",buttonHeight:"44px"},spacious:{paddingX:"24px",paddingY:"16px",gap:"16px",fontSize:"16px",lineHeight:"1.7",inputHeight:"52px",buttonHeight:"52px"}},_e={none:{duration:"0ms",easing:"linear",hoverScale:"1",clickScale:"1",enterAnimation:"none",exitAnimation:"none"},subtle:{duration:"150ms",easing:"cubic-bezier(0.4, 0, 0.2, 1)",hoverScale:"1.01",clickScale:"0.99",enterAnimation:"ntd-fade-in 150ms ease-out",exitAnimation:"ntd-fade-out 100ms ease-in"},normal:{duration:"200ms",easing:"cubic-bezier(0.4, 0, 0.2, 1)",hoverScale:"1.02",clickScale:"0.98",enterAnimation:"ntd-slide-up 200ms ease-out",exitAnimation:"ntd-slide-down 150ms ease-in"},playful:{duration:"300ms",easing:"cubic-bezier(0.34, 1.56, 0.64, 1)",hoverScale:"1.05",clickScale:"0.95",enterAnimation:"ntd-bounce-in 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",exitAnimation:"ntd-bounce-out 200ms ease-in"},dramatic:{duration:"400ms",easing:"cubic-bezier(0.68, -0.55, 0.265, 1.55)",hoverScale:"1.08",clickScale:"0.92",enterAnimation:"ntd-zoom-in 400ms cubic-bezier(0.68, -0.55, 0.265, 1.55)",exitAnimation:"ntd-zoom-out 250ms ease-in"}};function _i(e,t,r){switch(e){case"solid":return{background:t};case"gradient-linear":return{background:`linear-gradient(135deg, ${t} 0%, ${r||ee(t,-20)} 100%)`};case"gradient-radial":return{background:`radial-gradient(circle at top left, ${t} 0%, ${r||ee(t,-30)} 100%)`};case"glass":return{background:"var(--nice-overlay-light-10, rgba(255, 255, 255, 0.1))",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",border:"1px solid var(--nice-overlay-light-20, rgba(255, 255, 255, 0.2))"};case"frosted":return{background:"var(--nice-overlay-light-70, rgba(255, 255, 255, 0.7))",backdropFilter:"blur(20px) saturate(180%)",WebkitBackdropFilter:"blur(20px) saturate(180%)",border:"1px solid var(--nice-overlay-light-30, rgba(255, 255, 255, 0.3))"};case"pattern":return{backgroundImage:`url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='${encodeURIComponent(t)}' fill-opacity='0.05'%3E%3Cpath d='M0 0h20L10 10z'/%3E%3C/g%3E%3C/svg%3E")`,backgroundColor:"var(--ntd-bg-surface)"};case"texture":return{backgroundImage:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`,backgroundBlendMode:"overlay",backgroundColor:t};case"gradient-conic":return{background:`conic-gradient(from 180deg, ${t}, ${r||ee(t,-20)}, ${t})`};case"mesh":return{background:`radial-gradient(at 40% 20%, ${t} 0%, transparent 50%), radial-gradient(at 80% 0%, ${r||ee(t,30)} 0%, transparent 50%), radial-gradient(at 0% 50%, ${ee(t,-20)} 0%, transparent 50%)`,backgroundColor:"var(--ntd-bg-surface, #fff)"};default:return{background:t}}}function mt(e,t){const r={transition:"all var(--ntd-transition-duration, 200ms) var(--ntd-transition-easing, ease)"};switch(e){case"flat":return{...r,background:t,boxShadow:"none",border:"none"};case"raised":return{...r,background:t,boxShadow:"0 2px 4px var(--nice-overlay-20, rgba(0, 0, 0, 0.2))",border:"none"};case"outlined":return{...r,background:"transparent",border:`2px solid ${t}`,color:t};case"ghost":return{...r,background:"transparent",border:"none",color:t};case"soft":return{...r,background:`${t}20`,border:"none",color:t};case"gradient":return{...r,background:`linear-gradient(135deg, ${t} 0%, ${ee(t,-20)} 100%)`,border:"none",boxShadow:`0 4px 14px ${t}40`};case"3d":return{...r,background:t,border:"none",boxShadow:`0 4px 0 ${ee(t,-30)}, 0 6px 10px var(--nice-overlay-20, rgba(0, 0, 0, 0.2))`,transform:"translateY(-2px)"};case"neumorphic":return{...r,background:"var(--ntd-bg-surface)",border:"none",boxShadow:"5px 5px 10px var(--nice-overlay-10, rgba(0, 0, 0, 0.1)), -5px -5px 10px var(--nice-overlay-light-80, rgba(255, 255, 255, 0.8))",color:t};case"pill":return{...r,background:t,border:"none",borderRadius:"9999px",paddingLeft:"24px",paddingRight:"24px"};case"link":return{...r,background:"transparent",border:"none",color:t,textDecoration:"underline",padding:"0"};case"brutal":return{...r,background:t,border:"3px solid var(--nice-border-color, #000)",boxShadow:"4px 4px 0 var(--nice-text, #000)",borderRadius:"0"};default:return r}}function pt(e){const t={transition:"all var(--ntd-transition-duration, 200ms) var(--ntd-transition-easing, ease)"};switch(e){case"bordered":return{...t,background:"var(--ntd-bg-input, var(--nice-bg-primary, transparent))",border:"1px solid var(--ntd-border-color, var(--nice-border-color, #3a3a3a))",borderRadius:"var(--ntd-radius-md, 8px)"};case"filled":return{...t,background:"var(--ntd-bg-input-filled, var(--nice-bg-secondary, rgba(255,255,255,0.06)))",border:"2px solid transparent",borderRadius:"var(--ntd-radius-md, 8px)"};case"underlined":return{...t,background:"transparent",border:"none",borderBottom:"2px solid var(--ntd-border-color, var(--nice-border-color, #3a3a3a))",borderRadius:"0",paddingLeft:"0",paddingRight:"0"};case"floating":return{...t,background:"var(--ntd-bg-input, var(--nice-bg-primary, transparent))",border:"1px solid var(--ntd-border-color, var(--nice-border-color, #3a3a3a))",borderRadius:"var(--ntd-radius-md, 8px)",paddingTop:"20px"};case"soft":return{...t,background:"var(--ntd-color-primary-alpha, rgba(99, 102, 241, 0.1))",border:"none",borderRadius:"var(--ntd-radius-md, 8px)"};case"neumorphic":return{...t,background:"var(--ntd-bg-surface, var(--nice-bg-primary, transparent))",border:"none",borderRadius:"var(--ntd-radius-md, 8px)",boxShadow:"inset 3px 3px 6px var(--nice-overlay-20, rgba(0, 0, 0, 0.2)), inset -3px -3px 6px var(--nice-overlay-light-5, rgba(255, 255, 255, 0.05))"};case"pill":return{...t,background:"var(--ntd-bg-input, var(--nice-bg-primary, transparent))",border:"1px solid var(--ntd-border-color, var(--nice-border-color, #3a3a3a))",borderRadius:"9999px",paddingLeft:"20px",paddingRight:"20px"};case"flush":return{...t,background:"transparent",border:"none",borderRadius:"0",padding:"0",outline:"none"};default:return t}}function gt(e){const t={transition:"all var(--ntd-transition-duration, 200ms) var(--ntd-transition-easing, ease)"};switch(e){case"flat":return{...t,background:"var(--ntd-bg-surface, var(--nice-bg-secondary, transparent))",border:"none",boxShadow:"none"};case"elevated":return{...t,background:"var(--ntd-bg-surface, var(--nice-bg-secondary, transparent))",border:"none",boxShadow:"var(--ntd-shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1))"};case"bordered":return{...t,background:"var(--ntd-bg-surface, var(--nice-bg-secondary, transparent))",border:"1px solid var(--ntd-border-color, var(--nice-border-color, #3a3a3a))",boxShadow:"none"};case"glass":return{...t,background:"var(--nice-overlay-light-10, rgba(255, 255, 255, 0.1))",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",border:"1px solid var(--nice-overlay-light-20, rgba(255, 255, 255, 0.2))",boxShadow:"0 8px 32px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))"};case"gradient":return{...t,background:"linear-gradient(135deg, var(--ntd-bg-surface) 0%, var(--ntd-bg-elevated) 100%)",border:"none",boxShadow:"var(--ntd-shadow-md)"};case"neumorphic":return{...t,background:"var(--ntd-bg-surface, var(--nice-bg-secondary, transparent))",border:"none",boxShadow:"8px 8px 16px var(--nice-overlay-20, rgba(0, 0, 0, 0.2)), -8px -8px 16px var(--nice-overlay-light-5, rgba(255, 255, 255, 0.05))"};case"outlined":return{...t,background:"transparent",border:"2px solid var(--ntd-border-color, var(--nice-border-color, #3a3a3a))",boxShadow:"none"};case"paper":return{...t,background:"var(--ntd-bg-surface, var(--nice-bg-secondary, transparent))",border:"none",boxShadow:"2px 3px 8px var(--nice-overlay-6, rgba(0, 0, 0, 0.06))",borderRadius:"2px"};default:return t}}function sr(e,t){const r={display:"inline-flex",alignItems:"center",fontSize:"0.75rem",fontWeight:"600",lineHeight:"1"};switch(e){case"solid":return{...r,background:t,color:"var(--nice-color-white, #fff)",padding:"2px 8px",borderRadius:"4px"};case"soft":return{...r,background:`${t}20`,color:t,padding:"2px 8px",borderRadius:"4px"};case"outlined":return{...r,background:"transparent",border:`1px solid ${t}`,color:t,padding:"2px 8px",borderRadius:"4px"};case"dot":return{...r,background:t,width:"8px",height:"8px",borderRadius:"50%",padding:"0"};case"pill":return{...r,background:t,color:"var(--nice-color-white, #fff)",padding:"2px 12px",borderRadius:"9999px"};case"gradient":return{...r,background:`linear-gradient(135deg, ${t}, ${ee(t,-20)})`,color:"var(--nice-text-primary, #fff)",padding:"2px 8px",borderRadius:"4px"};default:return r}}function cr(e,t){switch(e){case"underline":return{borderBottom:`2px solid ${t}`,background:"transparent",color:t};case"pills":return{background:t,color:"var(--nice-color-white, #fff)",borderRadius:"9999px",padding:"6px 16px"};case"enclosed":return{background:"var(--ntd-bg-surface,#fff)",border:"1px solid var(--ntd-border-color,#e5e7eb)",borderBottom:"none",borderRadius:"8px 8px 0 0"};case"soft":return{background:`${t}15`,color:t,borderRadius:"6px",padding:"6px 16px"};case"lifted":return{background:"var(--ntd-bg-surface,#fff)",boxShadow:"0 -2px 8px var(--nice-overlay-6, rgba(0, 0, 0, 0.06))",borderRadius:"8px 8px 0 0",transform:"translateY(-2px)"};case"bordered":return{border:`2px solid ${t}`,borderBottom:"none",background:"transparent",borderRadius:"8px 8px 0 0"};default:return{}}}function lr(e){switch(e){case"default":return{borderRadius:"12px",width:"44px",height:"24px"};case"ios":return{borderRadius:"16px",width:"51px",height:"31px",boxShadow:"inset 0 0 0 1px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))"};case"flat":return{borderRadius:"4px",width:"40px",height:"22px"};case"pill":return{borderRadius:"9999px",width:"48px",height:"24px"};case"square":return{borderRadius:"0",width:"40px",height:"22px"};default:return{}}}function dr(e){switch(e){case"dark":return{background:"var(--nice-bg-secondary, #1f2937)",color:"var(--nice-text-primary, #f9fafb)",borderRadius:"6px",padding:"6px 12px",boxShadow:"0 4px 12px var(--nice-overlay-30, rgba(0, 0, 0, 0.3))"};case"light":return{background:"var(--nice-bg, #fff)",color:"var(--nice-text, #374151)",borderRadius:"6px",padding:"6px 12px",boxShadow:"0 4px 12px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))",border:"1px solid var(--nice-border, #e5e7eb)"};case"primary":return{background:"var(--nice-color-primary,#6366f1)",color:"var(--nice-text-on-primary, #fff)",borderRadius:"6px",padding:"6px 12px"};case"glass":return{background:"var(--nice-overlay-light-15, rgba(255, 255, 255, 0.15))",backdropFilter:"blur(12px)",color:"var(--nice-color-white, #fff)",borderRadius:"8px",padding:"8px 14px"};case"bordered":return{background:"var(--nice-bg, #fff)",color:"var(--nice-text, #374151)",borderRadius:"6px",padding:"6px 12px",border:"2px solid var(--nice-color-primary,#6366f1)"};default:return{}}}function ur(e){switch(e){case"default":return{borderCollapse:"collapse"};case"striped":return{borderCollapse:"collapse"};case"bordered":return{border:"1px solid var(--ntd-border-color,#e5e7eb)",borderCollapse:"collapse"};case"compact":return{borderCollapse:"collapse",fontSize:"0.8125rem"};case"hoverable":return{borderCollapse:"collapse"};case"minimal":return{borderCollapse:"collapse",borderBottom:"1px solid var(--ntd-border-color,#e5e7eb)"};default:return{}}}const Y={radius:"md",shadow:"md",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"solid",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",modalStyle:"default",tableStyle:"default",menuStyle:"default",animation:"normal",density:"normal"},Oe={minimal:{radius:"sm",shadow:"subtle",fill:"solid",buttonStyle:"flat",inputStyle:"underlined",cardStyle:"flat",badgeStyle:"soft",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"normal"},rounded:{radius:"xl",shadow:"md",fill:"solid",buttonStyle:"raised",inputStyle:"filled",cardStyle:"elevated",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"dark",tableStyle:"default",animation:"normal",density:"comfortable"},sharp:{radius:"none",shadow:"lg",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"square",tooltipStyle:"dark",tableStyle:"bordered",animation:"subtle",density:"compact"},glass:{radius:"lg",shadow:"none",fill:"glass",buttonStyle:"ghost",inputStyle:"soft",cardStyle:"glass",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"minimal",animation:"normal",density:"normal"},neumorphic:{radius:"lg",shadow:"none",fill:"solid",buttonStyle:"neumorphic",inputStyle:"neumorphic",cardStyle:"neumorphic",badgeStyle:"soft",tabStyle:"lifted",toggleStyle:"ios",tooltipStyle:"light",tableStyle:"default",animation:"subtle",density:"comfortable"},playful:{radius:"2xl",shadow:"colored",fill:"gradient-linear",buttonStyle:"gradient",inputStyle:"filled",cardStyle:"gradient",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"hoverable",animation:"playful",density:"comfortable"},enterprise:{radius:"sm",shadow:"subtle",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"outlined",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"striped",animation:"subtle",density:"compact"},modern3d:{radius:"lg",shadow:"xl",fill:"gradient-linear",buttonStyle:"3d",inputStyle:"filled",cardStyle:"elevated",badgeStyle:"gradient",tabStyle:"lifted",toggleStyle:"ios",tooltipStyle:"dark",tableStyle:"default",animation:"normal",density:"normal"},brutalist:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"brutal",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"normal"},luxe:{radius:"sm",shadow:"lg",fill:"gradient-linear",buttonStyle:"gradient",inputStyle:"floating",cardStyle:"elevated",badgeStyle:"gradient",tabStyle:"underline",toggleStyle:"ios",tooltipStyle:"dark",tableStyle:"hoverable",animation:"normal",density:"comfortable"},pill:{radius:"full",shadow:"md",fill:"solid",buttonStyle:"pill",inputStyle:"pill",cardStyle:"elevated",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"dark",tableStyle:"default",animation:"normal",density:"normal"},flat:{radius:"md",shadow:"none",fill:"solid",buttonStyle:"flat",inputStyle:"filled",cardStyle:"flat",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"normal"},editorial:{radius:"none",shadow:"subtle",fill:"solid",buttonStyle:"ghost",inputStyle:"underlined",cardStyle:"paper",badgeStyle:"outlined",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"comfortable"},dashboard:{radius:"md",shadow:"md",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"striped",animation:"subtle",density:"compact"},softCloud:{radius:"xl",shadow:"subtle",fill:"frosted",buttonStyle:"soft",inputStyle:"soft",cardStyle:"glass",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"hoverable",animation:"normal",density:"comfortable"},cosmic:{radius:"lg",shadow:"glow",fill:"mesh",buttonStyle:"gradient",inputStyle:"soft",cardStyle:"glass",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"hoverable",animation:"dramatic",density:"comfortable"},corporate:{radius:"sm",shadow:"subtle",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"outlined",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"striped",animation:"none",density:"compact"},bank:{radius:"none",shadow:"subtle",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"dark",tableStyle:"bordered",animation:"none",density:"compact"},government:{radius:"sm",shadow:"none",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"flat",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"striped",animation:"none",density:"normal"},military:{radius:"none",shadow:"lg",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"dark",tableStyle:"bordered",animation:"none",density:"compact"},legal:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"ghost",inputStyle:"underlined",cardStyle:"paper",badgeStyle:"outlined",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"none",density:"comfortable"},medical:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"soft",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"soft",tabStyle:"enclosed",toggleStyle:"ios",tooltipStyle:"light",tableStyle:"striped",animation:"subtle",density:"normal"},swiss:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"flat",inputStyle:"underlined",cardStyle:"flat",badgeStyle:"outlined",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"normal"},scandinavian:{radius:"lg",shadow:"subtle",fill:"solid",buttonStyle:"soft",inputStyle:"filled",cardStyle:"flat",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"ios",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"spacious"},bauhaus:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"normal"},notebook:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"ghost",inputStyle:"underlined",cardStyle:"paper",badgeStyle:"soft",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"comfortable"},terminal:{radius:"none",shadow:"glow",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"compact"},hacker:{radius:"none",shadow:"glow",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"outlined",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"subtle",density:"compact"},retro8bit:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"brutal",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"normal"},vapor:{radius:"lg",shadow:"glow",fill:"gradient-linear",buttonStyle:"gradient",inputStyle:"soft",cardStyle:"glass",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"glass",tableStyle:"hoverable",animation:"playful",density:"comfortable"},synthwave:{radius:"md",shadow:"glow",fill:"gradient-linear",buttonStyle:"3d",inputStyle:"filled",cardStyle:"glass",badgeStyle:"gradient",tabStyle:"lifted",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"hoverable",animation:"dramatic",density:"normal"},cyberpunk:{radius:"none",shadow:"glow",fill:"gradient-linear",buttonStyle:"brutal",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"dramatic",density:"compact"},steampunk:{radius:"sm",shadow:"inner",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"bordered",tableStyle:"bordered",animation:"subtle",density:"normal"},origami:{radius:"none",shadow:"md",fill:"solid",buttonStyle:"raised",inputStyle:"filled",cardStyle:"elevated",badgeStyle:"soft",tabStyle:"lifted",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"default",animation:"normal",density:"normal"},watercolor:{radius:"2xl",shadow:"subtle",fill:"frosted",buttonStyle:"soft",inputStyle:"soft",cardStyle:"glass",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"pill",tooltipStyle:"glass",tableStyle:"minimal",animation:"normal",density:"comfortable"},neon:{radius:"md",shadow:"glow",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"outlined",tabStyle:"bordered",toggleStyle:"default",tooltipStyle:"bordered",tableStyle:"bordered",animation:"dramatic",density:"normal"},candy:{radius:"2xl",shadow:"colored",fill:"gradient-linear",buttonStyle:"pill",inputStyle:"pill",cardStyle:"elevated",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"hoverable",animation:"playful",density:"comfortable"},bubblegum:{radius:"full",shadow:"colored",fill:"gradient-radial",buttonStyle:"pill",inputStyle:"pill",cardStyle:"elevated",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"hoverable",animation:"playful",density:"spacious"},cartoon:{radius:"xl",shadow:"colored",fill:"solid",buttonStyle:"brutal",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"pill",tooltipStyle:"bordered",tableStyle:"bordered",animation:"playful",density:"comfortable"},kawaii:{radius:"full",shadow:"colored",fill:"gradient-linear",buttonStyle:"pill",inputStyle:"pill",cardStyle:"gradient",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"hoverable",animation:"dramatic",density:"spacious"},circus:{radius:"full",shadow:"colored",fill:"gradient-conic",buttonStyle:"gradient",inputStyle:"filled",cardStyle:"gradient",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"striped",animation:"dramatic",density:"spacious"},paper:{radius:"sm",shadow:"md",fill:"solid",buttonStyle:"ghost",inputStyle:"underlined",cardStyle:"paper",badgeStyle:"soft",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"comfortable"},zen:{radius:"md",shadow:"none",fill:"solid",buttonStyle:"ghost",inputStyle:"underlined",cardStyle:"flat",badgeStyle:"soft",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"spacious"},monochrome:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"outlined",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"normal"},windows95:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"compact"},material:{radius:"md",shadow:"md",fill:"solid",buttonStyle:"raised",inputStyle:"filled",cardStyle:"elevated",badgeStyle:"solid",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"default",animation:"normal",density:"normal"},fluent:{radius:"md",shadow:"subtle",fill:"frosted",buttonStyle:"soft",inputStyle:"filled",cardStyle:"glass",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"hoverable",animation:"subtle",density:"normal"},cupertino:{radius:"xl",shadow:"md",fill:"frosted",buttonStyle:"soft",inputStyle:"filled",cardStyle:"glass",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"minimal",animation:"normal",density:"comfortable"},ant:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"solid",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"default",animation:"subtle",density:"normal"},bootstrap:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"pill",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"striped",animation:"subtle",density:"normal"},chakra:{radius:"md",shadow:"md",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"soft",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"default",animation:"normal",density:"normal"},notion:{radius:"sm",shadow:"none",fill:"solid",buttonStyle:"ghost",inputStyle:"flush",cardStyle:"flat",badgeStyle:"soft",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"normal"},linear:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"soft",inputStyle:"filled",cardStyle:"elevated",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"ios",tooltipStyle:"dark",tableStyle:"hoverable",animation:"subtle",density:"compact"},vercel:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"outlined",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"minimal",animation:"subtle",density:"normal"},gaming:{radius:"none",shadow:"glow",fill:"gradient-linear",buttonStyle:"3d",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"gradient",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"dramatic",density:"normal"},kiddo:{radius:"2xl",shadow:"colored",fill:"gradient-radial",buttonStyle:"pill",inputStyle:"pill",cardStyle:"gradient",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"hoverable",animation:"playful",density:"spacious"},disco:{radius:"full",shadow:"glow",fill:"gradient-conic",buttonStyle:"gradient",inputStyle:"filled",cardStyle:"gradient",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"glass",tableStyle:"hoverable",animation:"dramatic",density:"comfortable"},clown:{radius:"full",shadow:"colored",fill:"gradient-conic",buttonStyle:"brutal",inputStyle:"pill",cardStyle:"gradient",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"striped",animation:"dramatic",density:"spacious"}};function yt(e,t=":root"){const r=be[e.radius],a=e.shadow,n=ve[e.density],o=_e[e.animation],s=[`${t} {`];for(const[i,c]of Object.entries(r))s.push(` --ntd-radius-${i}: ${c};`);s.push(` --ntd-shadow: ${De[a]};`),s.push(` --ntd-shadow-dark: ${ir[a]};`);for(const[i,c]of Object.entries(n)){const d=i.replace(/([A-Z])/g,"-$1").toLowerCase();s.push(` --ntd-${d}: ${c};`)}for(const[i,c]of Object.entries(o)){const d=i.replace(/([A-Z])/g,"-$1").toLowerCase();s.push(` --ntd-animation-${d}: ${c};`)}return e.backgroundImage&&s.push(` --ntd-bg-image: url('${e.backgroundImage}');`),e.backgroundOverlay&&s.push(` --ntd-bg-overlay: ${e.backgroundOverlay};`),s.push("}"),s.join(`
11
+ `)}function ht(e,t=document.documentElement,r){const a=r?`[data-ntd-provider="${r}"]`:":root",n=r?`ntd-variant-styles-${r}`:"ntd-variant-styles",o=yt(e,a);let s=document.getElementById(n);s||(s=document.createElement("style"),s.id=n,document.head.appendChild(s)),s.textContent=o,r&&t.setAttribute("data-ntd-provider",r),t.dataset.ntdRadius=e.radius,t.dataset.ntdShadow=e.shadow,t.dataset.ntdFill=e.fill,t.dataset.ntdButton=e.buttonStyle,t.dataset.ntdInput=e.inputStyle,t.dataset.ntdCard=e.cardStyle,t.dataset.ntdAnimation=e.animation,t.dataset.ntdDensity=e.density,e.badgeStyle&&(t.dataset.ntdBadge=e.badgeStyle),e.tabStyle&&(t.dataset.ntdTab=e.tabStyle),e.toggleStyle&&(t.dataset.ntdToggle=e.toggleStyle),e.tooltipStyle&&(t.dataset.ntdTooltip=e.tooltipStyle),e.modalStyle&&(t.dataset.ntdModal=e.modalStyle),e.tableStyle&&(t.dataset.ntdTable=e.tableStyle),e.menuStyle&&(t.dataset.ntdMenu=e.menuStyle)}function fr(e,t){const r=document.getElementById(`ntd-variant-styles-${e}`);r&&r.remove(),t&&t.removeAttribute("data-ntd-provider")}function ee(e,t){if(e.startsWith("#")){const r=e.slice(1),a=parseInt(r,16),n=Math.max(0,Math.min(255,(a>>16&255)+t)),o=Math.max(0,Math.min(255,(a>>8&255)+t)),s=Math.max(0,Math.min(255,(a&255)+t));return`#${(n<<16|o<<8|s).toString(16).padStart(6,"0")}`}return e}function Oi(e,t){const r={...Y,...t};return{...e,variantConfig:r}}const Bi=["default","minimal","rounded","sharp","glass","neumorphic","playful","enterprise","modern3d","brutalist","luxe","pill","flat","editorial","dashboard","softCloud","cosmic","corporate","bank","government","military","legal","medical","swiss","scandinavian","bauhaus","notebook","origami","watercolor","monochrome","paper","zen","terminal","hacker","retro8bit","synthwave","cyberpunk","steampunk","vapor","neon","windows95","material","fluent","cupertino","ant","bootstrap","chakra","notion","linear","vercel","candy","bubblegum","cartoon","kawaii","circus","gaming","kiddo","disco","clown"];function Se(e){return e==="default"?Y:Oe[e]??Y}const Be=l.createContext({displayStyle:"default",variantConfig:Y,setDisplayStyle:()=>{}});function ji(){return l.useContext(Be)}function xe(e){const t=l.useContext(Be),r=e??t.displayStyle??"default",a=Se(r);return{style:r,config:a}}function Wi(e,t,r="var(--nice-color-primary, #6366f1)"){const{config:a}=xe(t);return mr(e,a,r)}function Vi(e,t){const{config:r}=xe(t);switch(e){case"button":return r.buttonStyle;case"input":return r.inputStyle;case"card":return r.cardStyle;case"badge":return r.badgeStyle??"solid";case"tab":return r.tabStyle??"underline";case"toggle":return r.toggleStyle??"default";case"tooltip":return r.tooltipStyle??"dark";case"modal":return r.modalStyle??"default";case"table":return r.tableStyle??"default";case"menu":return r.menuStyle??"default";default:return"default"}}function Ki(e){const{config:t}=xe(e),r=ve[t.density];return{"--ntd-padding-x":r.paddingX,"--ntd-padding-y":r.paddingY,"--ntd-gap":r.gap,"--ntd-font-size":r.fontSize,"--ntd-line-height":r.lineHeight,"--ntd-input-height":r.inputHeight,"--ntd-button-height":r.buttonHeight}}function Ui(e){const{config:t}=xe(e),r=_e[t.animation];return{"--ntd-anim-duration":r.duration,"--ntd-anim-easing":r.easing,"--ntd-hover-scale":r.hoverScale,"--ntd-click-scale":r.clickScale}}function mr(e,t,r="var(--nice-info, #6366f1)"){switch(e){case"button":return mt(t.buttonStyle,r);case"input":return pt(t.inputStyle);case"card":return gt(t.cardStyle);case"badge":return sr(t.badgeStyle??"solid",r);case"tab":return cr(t.tabStyle??"underline",r);case"toggle":return lr(t.toggleStyle??"default");case"tooltip":return dr(t.tooltipStyle??"dark");case"table":return ur(t.tableStyle??"default");case"menu":return{};case"modal":return{};default:return{}}}function pr(e){const t=Se(e);return{"data-ntd-display-style":e,"data-ntd-density":t.density,"data-ntd-animation":t.animation,"data-ntd-radius":t.radius,"data-ntd-button":t.buttonStyle,"data-ntd-input":t.inputStyle,"data-ntd-card":t.cardStyle}}const Xi=[{name:"default",label:"Default",description:"Standard balanced look",density:"normal",animation:"normal"},{name:"minimal",label:"Minimal",description:"Subtle shadows, underlined inputs",density:"normal",animation:"subtle"},{name:"rounded",label:"Rounded",description:"Large radii, pill tabs, filled inputs",density:"comfortable",animation:"normal"},{name:"sharp",label:"Sharp",description:"Zero radius, bordered cards, compact",density:"compact",animation:"subtle"},{name:"glass",label:"Glass",description:"Glassmorphism with frosted backdrops",density:"normal",animation:"normal"},{name:"neumorphic",label:"Neumorphic",description:"Soft raised and sunken surfaces",density:"comfortable",animation:"subtle"},{name:"playful",label:"Playful",description:"Gradients, bouncy animations, colorful",density:"comfortable",animation:"playful"},{name:"enterprise",label:"Enterprise",description:"Conservative, outlined, striped tables",density:"compact",animation:"subtle"},{name:"modern3d",label:"Modern 3D",description:"Deep shadows, 3D buttons, elevated",density:"normal",animation:"normal"},{name:"brutalist",label:"Brutalist",description:"Raw bold borders, no radius, no shadow",density:"normal",animation:"none"},{name:"luxe",label:"Luxe",description:"Premium feel with gradients and depth",density:"comfortable",animation:"normal"},{name:"pill",label:"Pill",description:"Full-radius pill shapes everywhere",density:"normal",animation:"normal"},{name:"flat",label:"Flat",description:"No shadows, filled inputs, soft badges",density:"normal",animation:"subtle"},{name:"editorial",label:"Editorial",description:"Clean typographic, paper cards",density:"comfortable",animation:"subtle"},{name:"dashboard",label:"Dashboard",description:"Data-dense, enclosed tabs, striped",density:"compact",animation:"subtle"},{name:"softCloud",label:"Soft Cloud",description:"Frosted glass, soft iOS-style toggles",density:"comfortable",animation:"normal"},{name:"cosmic",label:"Cosmic",description:"Mesh backgrounds, glowing shadows",density:"comfortable",animation:"dramatic"},{name:"corporate",label:"Corporate",description:"Safe, grey, no flair — boardroom ready",density:"compact",animation:"none"},{name:"bank",label:"Bank",description:"Ultra-conservative, heavy borders",density:"compact",animation:"none"},{name:"government",label:"Government",description:"Accessible, high-contrast, minimal",density:"normal",animation:"none"},{name:"military",label:"Military",description:"Dark, angular, no-nonsense tactical",density:"compact",animation:"none"},{name:"legal",label:"Legal",description:"Typographic, paper-like, document feel",density:"comfortable",animation:"none"},{name:"medical",label:"Medical",description:"Clean clinical, professional blue-toned",density:"normal",animation:"subtle"},{name:"swiss",label:"Swiss",description:"Grid-based, Helvetica spirit, precision",density:"normal",animation:"subtle"},{name:"scandinavian",label:"Scandinavian",description:"Warm, spacious, hygge-inspired calm",density:"spacious",animation:"subtle"},{name:"bauhaus",label:"Bauhaus",description:"Geometric, primary colours, strong lines",density:"normal",animation:"none"},{name:"notebook",label:"Notebook",description:"Handwritten feel, paper textures, ruled",density:"comfortable",animation:"subtle"},{name:"origami",label:"Origami",description:"Folded paper, subtle shadows, layered",density:"normal",animation:"normal"},{name:"watercolor",label:"Watercolor",description:"Soft bleeding edges, artistic, dreamy",density:"comfortable",animation:"normal"},{name:"monochrome",label:"Monochrome",description:"Pure black & white, typography focus",density:"normal",animation:"none"},{name:"paper",label:"Paper",description:"Minimal white, subtle shadows, like stationery",density:"comfortable",animation:"subtle"},{name:"zen",label:"Zen",description:"Ultra-minimal, whitespace, meditative calm",density:"spacious",animation:"subtle"},{name:"terminal",label:"Terminal",description:"Monospace, dark, retro-computing green",density:"compact",animation:"none"},{name:"hacker",label:"Hacker",description:"Matrix-style, neon green on black",density:"compact",animation:"subtle"},{name:"retro8bit",label:"8-bit Retro",description:"Pixel art, chunky borders, game boy era",density:"normal",animation:"none"},{name:"synthwave",label:"Synthwave",description:"80s synth, neon grids, chrome gradients",density:"normal",animation:"dramatic"},{name:"cyberpunk",label:"Cyberpunk",description:"Angular, neon, glitch aesthetics, dark",density:"compact",animation:"dramatic"},{name:"steampunk",label:"Steampunk",description:"Brass, gears, Victorian-era technology",density:"normal",animation:"subtle"},{name:"vapor",label:"Vaporwave",description:"80s/90s aesthetics, pink/teal gradients",density:"comfortable",animation:"playful"},{name:"neon",label:"Neon",description:"Bright glowing outlines on dark surfaces",density:"normal",animation:"dramatic"},{name:"windows95",label:"Windows 95",description:"Chunky beveled 3D, classic OS nostalgia",density:"compact",animation:"none"},{name:"material",label:"Material",description:"Google Material Design — depth & motion",density:"normal",animation:"normal"},{name:"fluent",label:"Fluent",description:"Microsoft Fluent — acrylic, reveal, depth",density:"normal",animation:"subtle"},{name:"cupertino",label:"Cupertino",description:"Apple iOS/macOS style — frosted, rounded",density:"comfortable",animation:"normal"},{name:"ant",label:"Ant Design",description:"Ant Design — clean, reliable, professional",density:"normal",animation:"subtle"},{name:"bootstrap",label:"Bootstrap",description:"Bootstrap-like — rounded, striped tables",density:"normal",animation:"subtle"},{name:"chakra",label:"Chakra",description:"Chakra UI — accessible, clean, modern",density:"normal",animation:"normal"},{name:"notion",label:"Notion",description:"Notion-like — text-focused, minimal chrome",density:"normal",animation:"subtle"},{name:"linear",label:"Linear",description:"Linear app — sleek, dark, polished",density:"compact",animation:"subtle"},{name:"vercel",label:"Vercel",description:"Vercel/Next.js — black/white, sharp, modern",density:"normal",animation:"subtle"},{name:"candy",label:"Candy",description:"Sweet pastels, rounded, sugar rush!",density:"comfortable",animation:"playful"},{name:"bubblegum",label:"Bubblegum",description:"Pink puffy bubbles, extremely round",density:"spacious",animation:"playful"},{name:"cartoon",label:"Cartoon",description:"Thick outlines, bold colours, exaggerated",density:"comfortable",animation:"playful"},{name:"kawaii",label:"Kawaii",description:"Cute, pastel, sparkly, UwU aesthetic",density:"spacious",animation:"dramatic"},{name:"circus",label:"Circus",description:"Bold stripes, loud, step right up!",density:"spacious",animation:"dramatic"},{name:"gaming",label:"Gaming",description:"Dark, neon accents, angular, RGB everything",density:"normal",animation:"dramatic"},{name:"kiddo",label:"Kiddo",description:"Colourful, puffy, child-friendly, big touch",density:"spacious",animation:"playful"},{name:"disco",label:"Disco",description:"Flashing, spinning, Saturday night fever",density:"comfortable",animation:"dramatic"},{name:"clown",label:"Clown",description:"Maximum chaos, honk honk, pure madness",density:"spacious",animation:"dramatic"}];function Gi({enabled:e,readOnly:t,disabled:r}){const[a,n]=l.useState(!1),o=l.useRef(!1),s=l.useCallback(()=>{t||r||!e||(o.current=!0,n(!0))},[t,r,e]),i=l.useCallback(()=>{n(!1)},[]),c=l.useCallback(d=>{d&&o.current&&(o.current=!1,requestAnimationFrame(()=>{if(d.focus(),d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement)try{d.select()}catch{}}))},[]);return l.useEffect(()=>{(t||r)&&a&&n(!1)},[t,r,a]),{isDisplay:!!e&&!a,enterEdit:s,exitEdit:i,autoFocusRef:c}}const qi=({value:e,placeholder:t,disabled:r,readOnly:a,onActivate:n,className:o,ariaLabel:s})=>{const i=e==null||e==="",c=d=>{r||a||(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),n())};return x.jsx("span",{role:"button",tabIndex:r?-1:0,className:`nice-display-value ${i?"nice-display-value--empty":""} ${r?"nice-display-value--disabled":""} ${a?"nice-display-value--readonly":""} ${o||""}`.trim(),onClick:()=>{!r&&!a&&n()},onKeyDown:c,"aria-label":s,"aria-disabled":r||void 0,children:i?t??"—":e})};function Yi(e){if(!e)return"";let t=e;return t=t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,""),t=t.replace(/\s+on\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,""),t=t.replace(/(href|src|action)\s*=\s*(?:"javascript:[^"]*"|'javascript:[^']*')/gi,'$1=""'),t=t.replace(/(href|src|action)\s*=\s*(?:"vbscript:[^"]*"|'vbscript:[^']*')/gi,'$1=""'),t=t.replace(/<\/?(iframe|object|embed|form)\b[^>]*>/gi,""),t}function Ji(e){const t=e.trim().toLowerCase();return!!(t.startsWith("http://")||t.startsWith("https://")||t.startsWith("blob:")||t.startsWith("data:image/")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../"))}const Qi=({style:e})=>x.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:"0.3em",height:"0.6em",margin:"0 0.35em 0.15em 0.1em",borderRight:"0.12em solid currentColor",borderBottom:"0.12em solid currentColor",transform:"rotate(45deg)",...e}}),Zi=({style:e})=>x.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:"0.85em",height:"0.85em",borderRadius:"50%",border:"0.12em solid currentColor",borderTopColor:"transparent",transform:"rotate(-45deg)",...e}}),jt={down:{transform:"rotate(45deg)",margin:"0 0 0.2em"},up:{transform:"rotate(-135deg)",margin:"0.2em 0 0"},left:{transform:"rotate(135deg)",margin:"0 0 0 0.2em"},right:{transform:"rotate(-45deg)",margin:"0 0.2em 0 0"}},es=({direction:e,style:t})=>x.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:"0.45em",height:"0.45em",margin:jt[e].margin,borderRight:"0.12em solid currentColor",borderBottom:"0.12em solid currentColor",transform:jt[e].transform,...t}}),ts=({style:e})=>x.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:"0.5em",height:"0.5em",borderRadius:"50%",background:"currentColor",...e}}),rs=({style:e})=>x.jsxs("span",{"aria-hidden":"true",style:{display:"inline-block",position:"relative",width:"0.7em",height:"0.7em",...e},children:[x.jsx("span",{style:{position:"absolute",top:"50%",left:0,width:"100%",height:"0.12em",background:"currentColor",transform:"translateY(-50%) rotate(45deg)"}}),x.jsx("span",{style:{position:"absolute",top:"50%",left:0,width:"100%",height:"0.12em",background:"currentColor",transform:"translateY(-50%) rotate(-45deg)"}})]});function as(){const[e,t]=l.useState(()=>typeof window<"u"?window.matchMedia("(pointer: coarse)").matches:!1);return l.useEffect(()=>{const r=window.matchMedia("(pointer: coarse)");t(r.matches);const a=n=>t(n.matches);return r.addEventListener("change",a),()=>r.removeEventListener("change",a)},[]),e}function ns(){const[e,t]=l.useState(()=>typeof window<"u"&&window.matchMedia("(pointer: coarse)").matches?"touch":"mouse");return l.useEffect(()=>{const r=()=>t("touch"),a=n=>{n.pointerType==="mouse"&&t("mouse")};return window.addEventListener("touchstart",r,{passive:!0,capture:!0}),window.addEventListener("pointerdown",a,{capture:!0}),()=>{window.removeEventListener("touchstart",r,{capture:!0}),window.removeEventListener("pointerdown",a,{capture:!0})}},[]),e}function os(e,t=500){const r=l.useRef(null),a=l.useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]);return{onPointerDown:l.useCallback(o=>{o.pointerType==="touch"&&(a(),r.current=setTimeout(e,t))},[e,t,a]),onPointerUp:a,onPointerCancel:a}}function is(){const e=l.useRef(null),t=l.useCallback(()=>{e.current&&(clearTimeout(e.current),e.current=null)},[]),r=l.useCallback(a=>{t();let n=300;const o=()=>{a(),n=Math.max(30,n*.82),e.current=setTimeout(o,n)};e.current=setTimeout(o,400)},[t]);return l.useEffect(()=>t,[t]),{start:r,stop:t}}function ss(e){const t=l.useId();return e||t}function cs(e,t){const[r,a]=l.useState(e);return l.useEffect(()=>{const n=setTimeout(()=>a(e),t);return()=>clearTimeout(n)},[e,t]),r}function ls(e,t){l.useEffect(()=>{const r=a=>{!e.current||e.current.contains(a.target)||t()};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[e,t])}function ds(e,t){N.useOverlayFocus(e,{open:t,modal:!0})}function us(e={}){const{defaultMode:t="system",storageKey:r="nice-color-mode",darkClass:a="nice-dark",lightClass:n="nice-light"}=e,[o,s]=l.useState(()=>typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),[i,c]=l.useState(()=>{if(typeof window>"u")return t;const p=localStorage.getItem(r);return p==="light"||p==="dark"||p==="system"?p:t});l.useEffect(()=>{const p=window.matchMedia("(prefers-color-scheme: dark)"),m=g=>s(g.matches?"dark":"light");return p.addEventListener("change",m),()=>p.removeEventListener("change",m)},[]);const d=i==="system"?o==="dark":i==="dark";l.useEffect(()=>{const p=document.documentElement;return d?(p.classList.add(a),p.classList.remove(n)):(p.classList.add(n),p.classList.remove(a)),()=>{p.classList.remove(a,n)}},[d,a,n]),l.useEffect(()=>{localStorage.setItem(r,i)},[i,r]);const u=l.useCallback(()=>c("light"),[]),f=l.useCallback(()=>c("dark"),[]),h=l.useCallback(()=>c("system"),[]),b=l.useCallback(()=>c(p=>p==="system"?o==="dark"?"light":"dark":p==="dark"?"light":"dark"),[o]);return{isDark:d,mode:i,systemPreference:o,setLight:u,setDark:f,setSystem:h,toggle:b}}function fs(e,t={}){const{t:r}=j.useNiceTranslation(),{colorCount:a=5,quality:n=5}=t,[o,s]=l.useState(null),[i,c]=l.useState(!1),[d,u]=l.useState(null);return l.useEffect(()=>{if(!e){s(null);return}(async()=>{c(!0),u(null);try{let h;typeof e=="string"?(h=new Image,h.crossOrigin="anonymous",await new Promise((M,I)=>{h.onload=()=>M(),h.onerror=()=>I(new Error("Failed to load image")),h.src=e})):h=e;const b=document.createElement("canvas"),p=100,m=Math.min(p/h.width,p/h.height,1);b.width=h.width*m,b.height=h.height*m;const g=b.getContext("2d");if(!g)throw new Error("Canvas context unavailable");g.drawImage(h,0,0,b.width,b.height);const S=g.getImageData(0,0,b.width,b.height),y=[],v=Math.max(1,Math.floor(11-n));for(let M=0;M<S.data.length;M+=4*v){const I=S.data[M],$=S.data[M+1],T=S.data[M+2];if(S.data[M+3]>200){const F=(I+$+T)/3;F>20&&F<235&&y.push([I,$,T])}}if(y.length===0)throw new Error("No valid colors found in image");const E=ms(y,a).sort((M,I)=>{const $=Math.max(...M)-Math.min(...M);return Math.max(...I)-Math.min(...I)-$}),w=M=>"#"+M.map(I=>Math.round(I).toString(16).padStart(2,"0")).join(""),C=M=>(.299*M[0]+.587*M[1]+.114*M[2])/255>.5?"#000000":"#ffffff",A=E.slice();s({primary:w(A[0]||[100,100,100]),secondary:w(A[1]||A[0]||[150,150,150]),accent:w(E[0]||[100,100,100]),palette:A.map(w),primaryText:C(A[0]||[100,100,100]),secondaryText:C(A[1]||A[0]||[150,150,150])})}catch(h){u(h instanceof Error?h.message:r("brandColors.unknownError","Unknown error")),s(null)}finally{c(!1)}})()},[e,a,n,r]),{colors:o,loading:i,error:d}}function ms(e,t,r=20){if(e.length<=t)return e;const a=[],n=new Set;for(;a.length<t;){const o=Math.floor(Math.random()*e.length);n.has(o)||(n.add(o),a.push([...e[o]]))}for(let o=0;o<r;o++){const s=Array.from({length:t},()=>[]);for(const c of e){let d=1/0,u=0;for(let f=0;f<t;f++){const h=Math.sqrt((c[0]-a[f][0])**2+(c[1]-a[f][1])**2+(c[2]-a[f][2])**2);h<d&&(d=h,u=f)}s[u].push(c)}let i=!1;for(let c=0;c<t;c++){if(s[c].length===0)continue;const d=[0,0,0];for(const u of s[c])d[0]+=u[0],d[1]+=u[1],d[2]+=u[2];d[0]/=s[c].length,d[1]/=s[c].length,d[2]/=s[c].length,(Math.abs(d[0]-a[c][0])>1||Math.abs(d[1]-a[c][1])>1||Math.abs(d[2]-a[c][2])>1)&&(i=!0),a[c]=d}if(!i)break}return a}function ps(e){const t=e.replace("#",""),r=parseInt(t.slice(0,2),16),a=parseInt(t.slice(2,4),16),n=parseInt(t.slice(4,6),16),o=Math.max(r,a,n)/255,s=Math.min(r,a,n)/255;let i=0,c=0;const d=(o+s)/2;if(o!==s){const f=o-s;switch(c=d>.5?f/(2-o-s):f/(o+s),o){case r/255:i=((a/255-n/255)/f+(a<n?6:0))/6;break;case a/255:i=((n/255-r/255)/f+2)/6;break;case n/255:i=((r/255-a/255)/f+4)/6;break}}const u=(f,h,b)=>{const p=(k,E,w)=>(w<0&&(w+=1),w>1&&(w-=1),w<.16666666666666666?k+(E-k)*6*w:w<.5?E:w<.6666666666666666?k+(E-k)*(.6666666666666666-w)*6:k),m=b<.5?b*(1+h):b+h-b*h,g=2*b-m,S=Math.round(p(g,m,f+1/3)*255),y=Math.round(p(g,m,f)*255),v=Math.round(p(g,m,f-1/3)*255);return"#"+[S,y,v].map(k=>k.toString(16).padStart(2,"0")).join("")};return{lightest:u(i,Math.min(c*.3,1),.97),lighter:u(i,Math.min(c*.5,1),.9),light:u(i,Math.min(c*.7,1),.8),base:e,dark:u(i,Math.min(c*1.1,1),Math.max(d-.15,.1)),darker:u(i,Math.min(c*1.2,1),Math.max(d-.25,.05)),darkest:u(i,Math.min(c*1.3,1),Math.max(d-.35,.02)),text:d>.5?"#000000":"#ffffff",textInverse:d>.5?"#ffffff":"#000000"}}const fe={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},se=["xs","sm","md","lg","xl","xxl"];function we(e=fe){const[t,r]=l.useState(()=>typeof window<"u"?window.innerWidth:e.lg);l.useEffect(()=>{let i;const c=()=>{i&&cancelAnimationFrame(i),i=requestAnimationFrame(()=>r(window.innerWidth))};return window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c),i&&cancelAnimationFrame(i)}},[]);const a=l.useMemo(()=>{for(let i=se.length-1;i>=0;i--)if(t>=e[se[i]])return se[i];return"xs"},[t,e]),n=l.useCallback(i=>t>=e[i],[t,e]),o=l.useCallback(i=>t<e[i],[t,e]),s=l.useCallback((i,c)=>t>=e[i]&&t<e[c],[t,e]);return{current:a,width:t,isAbove:n,isBelow:o,isBetween:s,isMobile:t<e.md,isTablet:t>=e.md&&t<e.lg,isDesktop:t>=e.lg}}function Pe(e){const[t,r]=l.useState(()=>typeof window>"u"?!1:window.matchMedia(e).matches);return l.useEffect(()=>{const a=window.matchMedia(e);r(a.matches);const n=o=>r(o.matches);return a.addEventListener("change",n),()=>a.removeEventListener("change",n)},[e]),t}function gs(e,t=fe){const{current:r}=we(t);return l.useMemo(()=>{if(e==null||typeof e!="object"||Array.isArray(e))return e;const a=e,n=se.indexOf(r);for(let o=n;o>=0;o--){const s=a[se[o]];if(s!==void 0)return s}for(let o=n+1;o<se.length;o++){const s=a[se[o]];if(s!==void 0)return s}},[e,r])}function ys(e){const[t,r]=l.useState({width:0,height:0});return l.useEffect(()=>{const a=e.current;if(!a)return;const n=new ResizeObserver(([o])=>{const{width:s,height:i}=o.contentRect;r({width:s,height:i})});return n.observe(a),()=>n.disconnect()},[e]),t}function gr(){const{width:e,isMobile:t}=we(),r=l.useMemo(()=>typeof window>"u"?!1:"ontouchstart"in window||navigator.maxTouchPoints>0,[]),a=Pe("(prefers-reduced-motion: reduce)"),n=Pe("(orientation: portrait)"),o=l.useMemo(()=>typeof window>"u"?1:window.devicePixelRatio||1,[]),s=t&&r,i=!t&&e<fe.lg&&r,c=!r||e>=fe.lg;return{isMobile:s||i,isTouch:r,isPhone:s,isTablet:i,isDesktop:c,prefersReducedMotion:a,isPortrait:n,pixelRatio:o}}function hs(e={}){const{forceVariant:t,breakpoints:r=fe}=e,{isMobile:a,isTablet:n,isDesktop:o}=we(r),s=gr();return t||(s.isPhone?"mobile":s.isTablet?"tablet":s.isDesktop?"desktop":a?"mobile":n?"tablet":"desktop")}function bs(e={}){const{showAt:t,hideAt:r,mobileOnly:a,desktopOnly:n,tabletOnly:o}=e,{current:s,isMobile:i,isTablet:c,isDesktop:d}=we();return a?i:n?d:o?c:r&&r.includes(s)?!1:t?t.includes(s):!0}function Ss(){return Pe("(orientation: portrait)")?"portrait":"landscape"}function vs(){const[e,t]=l.useState({top:0,right:0,bottom:0,left:0});return l.useEffect(()=>{if(typeof window>"u"||!CSS.supports("padding-top","env(safe-area-inset-top)"))return;const r=()=>{getComputedStyle(document.documentElement);const a=document.createElement("div");a.style.cssText=`
12
12
  position: fixed;
13
13
  top: 0;
14
14
  left: 0;
15
15
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
16
16
  visibility: hidden;
17
17
  pointer-events: none;
18
- `,document.body.appendChild(a);const n=getComputedStyle(a);t({top:parseInt(n.paddingTop,10)||0,right:parseInt(n.paddingRight,10)||0,bottom:parseInt(n.paddingBottom,10)||0,left:parseInt(n.paddingLeft,10)||0}),document.body.removeChild(a)};return r(),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),()=>{window.removeEventListener("resize",r),window.removeEventListener("orientationchange",r)}},[]),e}function hr(e="normal"){return typeof e=="number"?e:e==="fast"?120:e==="slow"?300:200}const et={fade:"nice-anim-fade-enter",slideUp:"nice-anim-slide-up-enter",slideDown:"nice-anim-slide-down-enter",slideLeft:"nice-anim-slide-left-enter",slideRight:"nice-anim-slide-right-enter",scaleUp:"nice-anim-scale-up-enter",scaleDown:"nice-anim-scale-down-enter",zoom:"nice-anim-zoom-enter",flip:"nice-anim-flip-enter",none:""},yr={fade:"nice-anim-fade-exit",slideUp:"nice-anim-slide-up-exit",slideDown:"nice-anim-slide-down-exit",slideLeft:"nice-anim-slide-left-exit",slideRight:"nice-anim-slide-right-exit",scaleUp:"nice-anim-scale-up-exit",scaleDown:"nice-anim-scale-down-exit",zoom:"nice-anim-zoom-exit",flip:"nice-anim-flip-exit",none:""};function Ri(e){const{visible:t,animation:r="fade",duration:a="normal",onEntered:n,onExited:o}=e,[i,s]=c.useState(t?"entered":"exited"),[l,d]=c.useState(t),u=c.useRef(void 0),f=hr(a),h=c.useMemo(()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,[]),y=h||r==="none"?0:f;c.useEffect(()=>(u.current&&clearTimeout(u.current),t?(d(!0),s("entering"),u.current=setTimeout(()=>{s("entered"),n==null||n()},y)):(s("exiting"),u.current=setTimeout(()=>{s("exited"),d(!1),o==null||o()},y)),()=>{u.current&&clearTimeout(u.current)}),[t,y]);const m=c.useMemo(()=>r==="none"||h?"":i==="entering"?et[r]:i==="exiting"?yr[r]:i==="entered"?`${et[r]} nice-anim-active`:"",[r,i,h]),p=c.useMemo(()=>({animationDuration:`${y}ms`,transitionDuration:`${y}ms`}),[y]);return{state:i,shouldRender:l,className:m,style:p}}function zi(e,t){const{expanded:r,duration:a="normal"}=t,[n,o]=c.useState(r?"auto":0),i=hr(a);return c.useEffect(()=>{const s=e.current;if(s)if(r){const l=s.scrollHeight;o(l);const d=setTimeout(()=>o("auto"),i);return()=>clearTimeout(d)}else{const l=s.scrollHeight;o(l),requestAnimationFrame(()=>{requestAnimationFrame(()=>o(0))})}},[r,i,e]),{overflow:"hidden",height:typeof n=="number"?`${n}px`:n,transition:`height ${i}ms ease`}}function Ii(e,t=50){return`${e*t}ms`}function Pi(e,t){return t==="enter"?et[e]:yr[e]}const br=c.createContext({direction:"ltr",isRTL:!1,flip:e=>e,flipStyle:(e,t)=>({[e]:t})}),vr=({direction:e,children:t})=>{const r=c.useMemo(()=>e!=="auto"?e:typeof document<"u"&&document.documentElement.getAttribute("dir")==="rtl"?"rtl":"ltr",[e]),a=r==="rtl";c.useEffect(()=>(e!=="auto"&&(document.documentElement.setAttribute("dir",r),document.documentElement.style.direction=r),()=>{e!=="auto"&&(document.documentElement.removeAttribute("dir"),document.documentElement.style.direction="")}),[e,r]);const n=c.useCallback(s=>a?{left:"right",right:"left",start:"end",end:"start"}[s]??s:s,[a]),o=c.useCallback((s,l)=>a?{[{paddingLeft:"paddingRight",paddingRight:"paddingLeft",marginLeft:"marginRight",marginRight:"marginLeft"}[s]||s]:l}:{[s]:l},[a]),i=c.useMemo(()=>({direction:r,isRTL:a,flip:n,flipStyle:o}),[r,a,n,o]);return S.jsx(br.Provider,{value:i,children:S.jsx("div",{dir:r,style:{direction:r,display:"contents"},children:t})})};process.env.NODE_ENV!=="production"&&(vr.displayName="NiceRTLProvider");function Di(){return c.useContext(br)}const Hi={marginStart:"marginInlineStart",marginEnd:"marginInlineEnd",paddingStart:"paddingInlineStart",paddingEnd:"paddingInlineEnd",borderStart:"borderInlineStart",borderEnd:"borderInlineEnd",insetStart:"insetInlineStart",insetEnd:"insetInlineEnd",start:"insetInlineStart",end:"insetInlineEnd",textAlign:{start:"start",end:"end"}},Sr=c.createContext({permissions:{},getAccessMode:()=>"full"}),xr=({permissions:e,children:t})=>{const r=c.useMemo(()=>({permissions:e,getAccessMode:(a,n)=>{var o,i;return n&&a&&((o=e.fields)!=null&&o[`${a}.${n}`])?e.fields[`${a}.${n}`]:a&&((i=e.components)!=null&&i[a])?e.components[a]:e.defaultMode??"full"}}),[e]);return S.jsx(Sr.Provider,{value:r,children:t})};process.env.NODE_ENV!=="production"&&(xr.displayName="NiceAccessControl");function Fi(e,t,r){const a=c.useContext(Sr);return e||a.getAccessMode(t,r)}function $i(e){switch(e){case"disabled":return{disabled:!0,"aria-disabled":!0,tabIndex:-1};case"readOnly":return{readOnly:!0};default:return{}}}function Oi(e={}){const{threshold:t=50,maxDuration:r=300,onSwipe:a,onSwipeLeft:n,onSwipeRight:o,onSwipeUp:i,onSwipeDown:s,enabled:l=!0}=e,d=c.useRef(null),[u,f]=c.useState(!1),[h,y]=c.useState(null),m=c.useRef(null);return c.useEffect(()=>{const p=d.current;if(!p||!l)return;const g=w=>{if(w.touches.length!==1)return;const A=w.touches[0];m.current={x:A.clientX,y:A.clientY,timestamp:Date.now()},f(!0),y(null)},v=w=>{if(!m.current||w.touches.length!==1)return;const A=w.touches[0],k=A.clientX-m.current.x,C=A.clientY-m.current.y;Math.abs(k)>Math.abs(C)?y(k>0?"right":"left"):y(C>0?"down":"up")},b=w=>{if(!m.current)return;const A=w.changedTouches[0],k={x:A.clientX,y:A.clientY,timestamp:Date.now()},C=k.x-m.current.x,M=k.y-m.current.y,E=k.timestamp-m.current.timestamp,L=Math.sqrt(C*C+M*M),T=L/E;if(f(!1),E<=r&&L>=t){let N;Math.abs(C)>Math.abs(M)?N=C>0?"right":"left":N=M>0?"down":"up";const R={direction:N,distance:L,velocity:T,duration:E};switch(a==null||a(R),N){case"left":n==null||n(R);break;case"right":o==null||o(R);break;case"up":i==null||i(R);break;case"down":s==null||s(R);break}}m.current=null,y(null)},x=()=>{m.current=null,f(!1),y(null)};return p.addEventListener("touchstart",g,{passive:!0}),p.addEventListener("touchmove",v,{passive:!0}),p.addEventListener("touchend",b,{passive:!0}),p.addEventListener("touchcancel",x,{passive:!0}),()=>{p.removeEventListener("touchstart",g),p.removeEventListener("touchmove",v),p.removeEventListener("touchend",b),p.removeEventListener("touchcancel",x)}},[l,t,r,a,n,o,i,s]),{ref:d,isSwiping:u,swipeDirection:h}}function ji(e={}){const{onPinch:t,onPinchStart:r,onPinchEnd:a,minScale:n=.5,maxScale:o=3,enabled:i=!0}=e,s=c.useRef(null),[l,d]=c.useState(1),[u,f]=c.useState(!1),h=c.useRef(null),y=c.useRef(1);return c.useEffect(()=>{const m=s.current;if(!m||!i)return;const p=(w,A)=>{const k=w.clientX-A.clientX,C=w.clientY-A.clientY;return Math.sqrt(k*k+C*C)},g=(w,A)=>({x:(w.clientX+A.clientX)/2,y:(w.clientY+A.clientY)/2}),v=w=>{w.touches.length===2&&(h.current=p(w.touches[0],w.touches[1]),y.current=l,f(!0),r==null||r())},b=w=>{if(w.touches.length!==2||!h.current)return;const A=p(w.touches[0],w.touches[1]),k=Math.min(o,Math.max(n,y.current*(A/h.current)));d(k),t==null||t({scale:k,center:g(w.touches[0],w.touches[1])})},x=()=>{u&&(f(!1),a==null||a(l),h.current=null)};return m.addEventListener("touchstart",v,{passive:!0}),m.addEventListener("touchmove",b,{passive:!0}),m.addEventListener("touchend",x,{passive:!0}),m.addEventListener("touchcancel",x,{passive:!0}),()=>{m.removeEventListener("touchstart",v),m.removeEventListener("touchmove",b),m.removeEventListener("touchend",x),m.removeEventListener("touchcancel",x)}},[i,l,u,n,o,t,r,a]),{ref:s,scale:l,isPinching:u}}function Bi(e={}){const{onPan:t,onPanStart:r,onPanEnd:a,enabled:n=!0}=e,o=c.useRef(null),[i,s]=c.useState(!1),[l,d]=c.useState(0),[u,f]=c.useState(0),h=c.useRef(null),y=c.useRef(null);return c.useEffect(()=>{const m=o.current;if(!m||!n)return;const p=b=>{if(b.touches.length!==1)return;const x=b.touches[0],w={x:x.clientX,y:x.clientY,timestamp:Date.now()};h.current=w,y.current=w,s(!0),d(0),f(0),r==null||r()},g=b=>{if(!h.current||!y.current||b.touches.length!==1)return;const x=b.touches[0],w=Date.now(),A={x:x.clientX,y:x.clientY,timestamp:w},k=A.x-h.current.x,C=A.y-h.current.y,M=A.timestamp-y.current.timestamp||1,E=(A.x-y.current.x)/M,L=(A.y-y.current.y)/M;d(k),f(C),t==null||t({deltaX:k,deltaY:C,velocityX:E,velocityY:L}),y.current=A},v=()=>{if(!i||!h.current||!y.current)return;const b=l,x=u,w=y.current.timestamp-h.current.timestamp||1;a==null||a({deltaX:b,deltaY:x,velocityX:b/w,velocityY:x/w}),s(!1),h.current=null,y.current=null};return m.addEventListener("touchstart",p,{passive:!0}),m.addEventListener("touchmove",g,{passive:!0}),m.addEventListener("touchend",v,{passive:!0}),m.addEventListener("touchcancel",v,{passive:!0}),()=>{m.removeEventListener("touchstart",p),m.removeEventListener("touchmove",g),m.removeEventListener("touchend",v),m.removeEventListener("touchcancel",v)}},[n,i,l,u,t,r,a]),{ref:o,isPanning:i,deltaX:l,deltaY:u}}function wr(e){const{onRefresh:t,threshold:r=80,maxPull:a=120,enabled:n=!0}=e,o=c.useRef(null),[i,s]=c.useState(!1),[l,d]=c.useState(!1),[u,f]=c.useState(0),h=c.useRef(null),y=Math.min(1,u/r);return c.useEffect(()=>{const m=o.current;if(!m||!n||l)return;const p=b=>{m.scrollTop>0||b.touches.length===1&&(h.current=b.touches[0].clientY)},g=b=>{if(h.current===null||b.touches.length!==1)return;const w=b.touches[0].clientY-h.current;if(w<=0){f(0),s(!1);return}const k=Math.min(a,w*.5);f(k),s(k>0),k>0&&b.preventDefault()},v=async()=>{if(u>=r&&!l){d(!0),f(r);try{await t()}finally{d(!1),f(0)}}else f(0);s(!1),h.current=null};return m.addEventListener("touchstart",p,{passive:!0}),m.addEventListener("touchmove",g,{passive:!1}),m.addEventListener("touchend",v,{passive:!0}),m.addEventListener("touchcancel",v,{passive:!0}),()=>{m.removeEventListener("touchstart",p),m.removeEventListener("touchmove",g),m.removeEventListener("touchend",v),m.removeEventListener("touchcancel",v)}},[n,l,u,r,a,t]),{ref:o,isPulling:i,isRefreshing:l,pullDistance:u,pullProgress:y}}const _i=({children:e,leftActions:t=[],rightActions:r=[],actionWidth:a=80,maxSwipe:n=1.5,threshold:o=.5,className:i,style:s})=>{const l=c.useRef(null),d=c.useRef(null),[u,f]=c.useState(0),[h,y]=c.useState(!1),m=c.useRef(0),p=c.useRef(0),g=t.length*a,v=r.length*a,b=g*n,x=v*n,w=c.useCallback(E=>{y(!1),m.current=E.touches[0].clientX,p.current=u},[u]),A=c.useCallback(E=>{const L=E.touches[0].clientX-m.current;let T=p.current+L;T>b?T=b+(T-b)*.2:T<-x&&(T=-x+(T+x)*.2),!(T>0&&t.length===0)&&(T<0&&r.length===0||f(T))},[b,x,t.length,r.length]),k=c.useCallback(()=>{y(!0),u>g*o?f(g):u<-v*o?f(-v):f(0)},[u,g,v,o]),C=c.useCallback(E=>{y(!0),f(0),E.onAction()},[]),M=c.useCallback(()=>{y(!0),f(0)},[]);return S.jsxs("div",{ref:l,className:`nice-swipeable ${i||""}`,style:{...s,position:"relative",overflow:"hidden"},children:[S.jsx("div",{className:"nice-swipeable__actions nice-swipeable__actions--left",style:{position:"absolute",left:0,top:0,bottom:0,display:"flex",width:g},children:t.map(E=>S.jsx("button",{className:"nice-swipeable__action",style:{width:a,background:E.color,border:"none",color:"var(--nice-color-white, #fff)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onClick:()=>C(E),children:E.content},E.key))}),S.jsx("div",{className:"nice-swipeable__actions nice-swipeable__actions--right",style:{position:"absolute",right:0,top:0,bottom:0,display:"flex",width:v},children:r.map(E=>S.jsx("button",{className:"nice-swipeable__action",style:{width:a,background:E.color,border:"none",color:"var(--nice-color-white, #fff)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onClick:()=>C(E),children:E.content},E.key))}),S.jsx("div",{ref:d,className:"nice-swipeable__content",style:{transform:`translateX(${u}px)`,transition:h?"transform 0.3s ease-out":"none",background:"var(--nice-bg-primary, #fff)",position:"relative",zIndex:1},onTouchStart:w,onTouchMove:A,onTouchEnd:k,onClick:u!==0?M:void 0,children:e})]})},Wi=({children:e,onRefresh:t,threshold:r=80,pullingContent:a,refreshingContent:n,enabled:o=!0,className:i,style:s})=>{const{ref:l,isPulling:d,isRefreshing:u,pullDistance:f,pullProgress:h}=wr({onRefresh:t,threshold:r,enabled:o});return S.jsxs("div",{ref:l,className:`nice-pull-refresh ${i||""}`,style:{...s,position:"relative",overflow:"auto",overscrollBehavior:"contain"},children:[S.jsx("div",{className:"nice-pull-refresh__indicator",style:{position:"absolute",top:0,left:0,right:0,display:"flex",justifyContent:"center",alignItems:"center",height:f,overflow:"hidden",transition:d?"none":"height 0.2s ease-out"},children:u?n||S.jsx("div",{className:"nice-pull-refresh__spinner",children:S.jsx("div",{className:"nice-spinner nice-spinner--sm"})}):a||S.jsx("div",{className:"nice-pull-refresh__arrow",style:{transform:`rotate(${h>=1?180:0}deg)`,transition:"transform 0.2s ease",opacity:h},children:S.jsx(K,{name:"arrow-up",size:24})})}),S.jsx("div",{className:"nice-pull-refresh__content",style:{transform:`translateY(${f}px)`,transition:d?"none":"transform 0.2s ease-out"},children:e})]})};function kr(e="light"){if(!("vibrate"in navigator))return;const t={light:10,medium:20,heavy:30,selection:5,success:[10,30,10],warning:[20,20,20],error:[30,30,30,30]};try{navigator.vibrate(t[e])}catch{}}function Vi(){return c.useCallback((e="light")=>{kr(e)},[])}const Xi=({minSize:e=44,children:t,className:r,style:a,onClick:n})=>S.jsx("div",{className:`nice-touch-target ${r||""}`,style:{...a,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:e,minHeight:e,cursor:n?"pointer":void 0},onClick:n,children:t});function Ui(){const[e,t]=c.useState(!1),[r,a]=c.useState(0),n=c.useRef(typeof window<"u"?window.innerHeight:0);return c.useEffect(()=>{if(typeof window>"u")return;if("visualViewport"in window&&window.visualViewport){const i=window.visualViewport,s=()=>{const l=n.current-i.height,d=150;t(l>d),a(l>d?l:0)};return i.addEventListener("resize",s),()=>i.removeEventListener("resize",s)}const o=()=>{const i=n.current-window.innerHeight,s=150;t(i>s),a(i>s?i:0)};return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),{isKeyboardVisible:e,keyboardHeight:r}}const qi=[],Mr={announceChanges:!0,reduceMotion:"auto",highContrast:"auto",focusStyle:"auto",keyboardShortcuts:!0,minTouchTarget:44},Cr=c.createContext(null),Ar=({config:e,children:t})=>{const r=c.useMemo(()=>({...Mr,...e}),[e]),a=c.useRef(null),n=c.useRef(null),[o,i]=c.useState(!1);c.useEffect(()=>{const y=window.matchMedia("(prefers-reduced-motion: reduce)");i(y.matches);const m=p=>i(p.matches);return y.addEventListener("change",m),()=>y.removeEventListener("change",m)},[]);const[s,l]=c.useState(!1);c.useEffect(()=>{const y=window.matchMedia("(prefers-contrast: more)");l(y.matches);const m=p=>l(p.matches);return y.addEventListener("change",m),()=>y.removeEventListener("change",m)},[]);const d=r.reduceMotion==="always"?!0:r.reduceMotion==="never"?!1:o,u=r.highContrast==="always"?!0:r.highContrast==="never"?!1:s,f=c.useCallback((y,m="polite")=>{if(!r.announceChanges)return;const p=m==="assertive"?n.current:a.current;p&&(p.textContent="",requestAnimationFrame(()=>{p.textContent=y}))},[r.announceChanges]),h=c.useMemo(()=>({config:r,announce:f,prefersReducedMotion:d,prefersHighContrast:u}),[r,f,d,u]);return S.jsxs(Cr.Provider,{value:h,children:[t,S.jsx("div",{ref:a,role:"status","aria-live":"polite","aria-atomic":"true",style:tt}),S.jsx("div",{ref:n,role:"alert","aria-live":"assertive","aria-atomic":"true",style:tt})]})};process.env.NODE_ENV!=="production"&&(Ar.displayName="NiceA11yProvider");function Gi(){const e=c.useContext(Cr);return e||{config:Mr,announce:()=>{},prefersReducedMotion:!1,prefersHighContrast:!1}}const tt={position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0};function Er(...e){const t=e.filter(Boolean);return t.length>0?t.join(" "):void 0}function Ki(e){const t=e.error?`${e.id}-error`:void 0,r=e.helperText?`${e.id}-helper`:void 0;return{"aria-invalid":e.error?!0:void 0,"aria-required":e.required||void 0,"aria-disabled":e.disabled||void 0,"aria-readonly":e.readOnly||void 0,"aria-describedby":Er(t,r),"aria-errormessage":t}}function Ji(e,t){const{direction:r,wrap:a=!0,itemSelector:n='[role="option"], [role="tab"], [role="menuitem"], [role="radio"], button, a, [tabindex]'}=t;c.useEffect(()=>{const o=e.current;if(!o)return;const i=()=>Array.from(o.querySelectorAll(n)).filter(l=>!l.hasAttribute("disabled")&&l.getAttribute("aria-disabled")!=="true"),s=l=>{var p;const d=i();if(d.length===0)return;const u=document.activeElement,f=d.indexOf(u);if(f===-1)return;let h=-1;const y=r==="horizontal"||r==="both"||r==="grid",m=r==="vertical"||r==="both"||r==="grid";if(y&&l.key==="ArrowRight")h=f+1;else if(y&&l.key==="ArrowLeft")h=f-1;else if(m&&l.key==="ArrowDown")h=f+1;else if(m&&l.key==="ArrowUp")h=f-1;else if(l.key==="Home")h=0;else if(l.key==="End")h=d.length-1;else return;l.preventDefault(),a?h=(h%d.length+d.length)%d.length:h=Math.max(0,Math.min(d.length-1,h)),d.forEach((g,v)=>{g.tabIndex=v===h?0:-1}),(p=d[h])==null||p.focus()};return o.addEventListener("keydown",s),()=>o.removeEventListener("keydown",s)},[e,r,a,n])}function Yi(e){const t=c.useRef(null);c.useEffect(()=>(e&&(t.current=document.activeElement),()=>{e&&t.current&&typeof t.current.focus=="function"&&t.current.focus()}),[e])}const Nr=({children:e,as:t="span"})=>c.createElement(t,{style:tt},e);process.env.NODE_ENV!=="production"&&(Nr.displayName="NiceVisuallyHidden");const Lr=({targetId:e,children:t="Skip to main content"})=>S.jsx("a",{href:`#${e}`,className:"nice-skip-link",onClick:r=>{r.preventDefault();const a=document.getElementById(e);a&&(a.tabIndex=-1,a.focus())},children:t});process.env.NODE_ENV!=="production"&&(Lr.displayName="NiceSkipLink");const Qi={submit:{key:"Enter",description:"Submit / Confirm",descriptionKey:"shortcuts.submit"},cancel:{key:"Escape",description:"Cancel / Close",descriptionKey:"shortcuts.cancel"},clear:{key:"Delete",description:"Clear value",descriptionKey:"shortcuts.clear",modifiers:["ctrl"]},moveUp:{key:"ArrowUp",description:"Move up",descriptionKey:"shortcuts.moveUp"},moveDown:{key:"ArrowDown",description:"Move down",descriptionKey:"shortcuts.moveDown"},moveLeft:{key:"ArrowLeft",description:"Move left",descriptionKey:"shortcuts.moveLeft"},moveRight:{key:"ArrowRight",description:"Move right",descriptionKey:"shortcuts.moveRight"},first:{key:"Home",description:"Go to first",descriptionKey:"shortcuts.first"},last:{key:"End",description:"Go to last",descriptionKey:"shortcuts.last"},pageUp:{key:"PageUp",description:"Page up",descriptionKey:"shortcuts.pageUp"},pageDown:{key:"PageDown",description:"Page down",descriptionKey:"shortcuts.pageDown"},selectAll:{key:"A",description:"Select all",descriptionKey:"shortcuts.selectAll",modifiers:["ctrl"]},toggleSelect:{key:"Space",description:"Toggle selection",descriptionKey:"shortcuts.toggleSelect"},undo:{key:"Z",description:"Undo",descriptionKey:"shortcuts.undo",modifiers:["ctrl"]},redo:{key:"Y",description:"Redo",descriptionKey:"shortcuts.redo",modifiers:["ctrl"]},copy:{key:"C",description:"Copy",descriptionKey:"shortcuts.copy",modifiers:["ctrl"]},paste:{key:"V",description:"Paste",descriptionKey:"shortcuts.paste",modifiers:["ctrl"]},cut:{key:"X",description:"Cut",descriptionKey:"shortcuts.cut",modifiers:["ctrl"]},edit:{key:"Enter",description:"Edit cell",descriptionKey:"shortcuts.edit"},tab:{key:"Tab",description:"Next cell",descriptionKey:"shortcuts.tab"},shiftTab:{key:"Tab",description:"Previous cell",descriptionKey:"shortcuts.shiftTab",modifiers:["shift"]},open:{key:"ArrowDown",description:"Open dropdown",descriptionKey:"shortcuts.open"},close:{key:"Escape",description:"Close popup",descriptionKey:"shortcuts.close"},increment:{key:"ArrowUp",description:"Increase value",descriptionKey:"shortcuts.increment"},decrement:{key:"ArrowDown",description:"Decrease value",descriptionKey:"shortcuts.decrement"},incrementBig:{key:"PageUp",description:"Increase by 10",descriptionKey:"shortcuts.incrementBig"},decrementBig:{key:"PageDown",description:"Decrease by 10",descriptionKey:"shortcuts.decrementBig"}};function Tr(e){var r,a,n,o;const t=[];return(r=e.modifiers)!=null&&r.includes("ctrl")&&t.push("Ctrl"),(a=e.modifiers)!=null&&a.includes("alt")&&t.push("Alt"),(n=e.modifiers)!=null&&n.includes("shift")&&t.push("Shift"),(o=e.modifiers)!=null&&o.includes("meta")&&t.push("⌘"),t.push(e.key),t.join("+")}function Zi(e,t){if(!(e.key===t.key||e.key.toLowerCase()===t.key.toLowerCase()))return!1;const a=t.modifiers??[];return!(a.includes("ctrl")!==(e.ctrlKey||e.metaKey)||a.includes("alt")!==e.altKey||a.includes("shift")!==e.shiftKey)}const Rr=({shortcuts:e=qi,position:t="top",icon:r,size:a="sm",className:n})=>{const{t:o}=_.useNiceTranslation(),[i,s]=c.useState(!1),l=c.useRef(null),[d,u]=c.useState({top:0,left:0}),f=c.useCallback(()=>{if(!l.current)return;const m=l.current.getBoundingClientRect(),p=8;let g=0,v=0;switch(t){case"top":g=m.top-p,v=m.left+m.width/2;break;case"bottom":g=m.bottom+p,v=m.left+m.width/2;break;case"left":g=m.top+m.height/2,v=m.left-p;break;case"right":g=m.top+m.height/2,v=m.right+p;break}u({top:g,left:v})},[t]),h=c.useCallback(()=>{f(),s(!0)},[f]),y=c.useCallback(()=>{f(),s(!0)},[f]);return e.length===0?null:S.jsxs(S.Fragment,{children:[S.jsx("button",{ref:l,type:"button",className:`nice-keyboard-hint nice-keyboard-hint--${a} ${n||""}`,onMouseEnter:h,onMouseLeave:()=>s(!1),onFocus:y,onBlur:()=>s(!1),"aria-label":o("a11y.keyboardShortcuts","Keyboard shortcuts"),tabIndex:-1,children:r||"?"}),i&&S.jsxs("div",{className:`nice-keyboard-hint__tooltip nice-keyboard-hint__tooltip--${t}`,style:{position:"fixed",top:d.top,left:d.left,transform:t==="top"?"translate(-50%, -100%)":t==="bottom"?"translate(-50%, 0)":t==="left"?"translate(-100%, -50%)":"translate(0, -50%)"},role:"tooltip",children:[S.jsx("div",{className:"nice-keyboard-hint__title",children:o("a11y.keyboardShortcuts2","Keyboard Shortcuts")}),S.jsx("ul",{className:"nice-keyboard-hint__list",children:e.map((m,p)=>S.jsxs("li",{className:"nice-keyboard-hint__item",children:[S.jsx("kbd",{className:"nice-keyboard-hint__key",children:Tr(m)}),S.jsx("span",{className:"nice-keyboard-hint__desc",children:m.description})]},p))})]})]})};process.env.NODE_ENV!=="production"&&(Rr.displayName="NiceKeyboardHint");function ec(e={}){const{enabled:t=!1,onSubmit:r,preventDefault:a=!0,requireCtrl:n=!1,skipTextarea:o=!0}=e;return c.useCallback(i=>{!t||!r||i.key==="Enter"&&(n&&!i.ctrlKey&&!i.metaKey||o&&i.target.tagName==="TEXTAREA"||(a&&i.preventDefault(),r()))},[t,r,a,n,o])}function tc(e={}){const{onClick:t,disabled:r=!1,role:a,tabIndex:n,triggerOnSpace:o=!0,as:i,selected:s}=e,l=a??i??"button",d=c.useCallback(h=>{r||t==null||t(h)},[r,t]),u=c.useCallback(h=>{if(r)return;const y=o&&(h.key===" "||h.key==="Spacebar");(h.key==="Enter"||y)&&(h.preventDefault(),t==null||t(h))},[r,t,o]),f={role:l,tabIndex:n??(r?-1:0),onClick:d,onKeyDown:u};return r&&(f["aria-disabled"]=!0),s!==void 0&&(l==="option"||l==="tab"||l==="row")&&(f["aria-selected"]=s),f}function rc(e={}){const[t,r]=c.useState(!1),[a,n]=c.useState(""),o=c.useRef(null),i=typeof window<"u"&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window),s=c.useCallback(u=>{if(!e.commands)return;const f=u.toLowerCase().trim();for(const h of e.commands)if(typeof h.phrase=="string"){if(f===h.phrase.toLowerCase()){h.action([],u);return}}else{const y=u.match(h.phrase);if(y){h.action(Array.from(y),u);return}}},[e.commands]),l=c.useCallback(()=>{if(!i||t)return;const u=window.SpeechRecognition??window.webkitSpeechRecognition,f=new u;f.lang=e.language??"en-US",f.continuous=e.continuous??!0,f.interimResults=e.interimResults??!1,f.onresult=h=>{var g;const y=h.results[h.results.length-1],m=y[0].transcript,p=y.isFinal;n(m),(g=e.onTranscript)==null||g.call(e,m,p),p&&s(m)},f.onerror=h=>{var y;(y=e.onError)==null||y.call(e,h.error),h.error==="not-allowed"&&r(!1)},f.onend=()=>{if(t&&e.continuous)try{f.start()}catch{r(!1)}else r(!1)},o.current=f,f.start(),r(!0)},[i,t,e.language,e.continuous]),d=c.useCallback(()=>{var u;(u=o.current)==null||u.stop(),o.current=null,r(!1)},[]);return c.useEffect(()=>()=>d(),[]),{isListening:t,isSupported:i,start:l,stop:d,transcript:a}}function zr(e={}){const[t,r]=c.useState(""),a=c.useRef(void 0),n=c.useCallback(i=>{r(""),requestAnimationFrame(()=>{r(i),e.clearAfterMs&&(a.current&&clearTimeout(a.current),a.current=setTimeout(()=>r(""),e.clearAfterMs))})},[e.clearAfterMs]);c.useEffect(()=>()=>{a.current&&clearTimeout(a.current)},[]);const o={role:"status","aria-live":e.politeness??"polite","aria-atomic":e.atomic??!0,"aria-relevant":e.relevant??"additions text",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap"}};return{message:t,announce:n,regionProps:o}}function ac(){const{announce:e,regionProps:t,message:r}=zr({politeness:"assertive",clearAfterMs:3e3});return{announcePageChange:c.useCallback(n=>{e(`Nawigacja do: ${n}`),typeof document<"u"&&(document.title=n)},[e]),regionProps:t,message:r}}function nc(){const e=c.useRef(null),t=c.useCallback(()=>{var o;const n=(o=e.current)==null?void 0:o.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');n==null||n.focus()},[]),r=c.useCallback(n=>{var o,i;(i=(o=e.current)==null?void 0:o.querySelector(n))==null||i.focus()},[]),a=c.useCallback(()=>e.current?Array.from(e.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')):[],[]);return{containerRef:e,focusFirst:t,focusElement:r,getFocusableElements:a}}const _t={simplifiedMode:!1,increasedSpacing:!1,readingGuide:!1,enhancedFocus:!1,reduceMotion:!1,iconLabels:!1,largeTargets:!1,dyslexiaFont:!1,lineSpacing:1.5,wordSpacing:1};function oc(e=_t){const[t,r]=c.useState({..._t,...e}),a=c.useCallback((s,l)=>{r(d=>({...d,[s]:l}))},[]),n=sc(t),o=[t.simplifiedMode&&"nice-a11y-simplified",t.increasedSpacing&&"nice-a11y-spacing",t.enhancedFocus&&"nice-a11y-enhanced-focus",t.reduceMotion&&"nice-a11y-reduce-motion",t.iconLabels&&"nice-a11y-icon-labels",t.largeTargets&&"nice-a11y-large-targets",t.dyslexiaFont&&"nice-a11y-dyslexia"].filter(Boolean).join(" "),i={};return t.lineSpacing&&t.lineSpacing!==1.5&&(i.lineHeight=String(t.lineSpacing)),t.wordSpacing&&t.wordSpacing!==1&&(i.wordSpacing=`${(t.wordSpacing-1)*.25}em`),{settings:t,updateSetting:a,css:n,rootClasses:o,rootStyle:i}}function sc(e){const t=[];return e.simplifiedMode&&t.push(`
18
+ `,document.body.appendChild(a);const n=getComputedStyle(a);t({top:parseInt(n.paddingTop,10)||0,right:parseInt(n.paddingRight,10)||0,bottom:parseInt(n.paddingBottom,10)||0,left:parseInt(n.paddingLeft,10)||0}),document.body.removeChild(a)};return r(),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),()=>{window.removeEventListener("resize",r),window.removeEventListener("orientationchange",r)}},[]),e}function yr(e="normal"){return typeof e=="number"?e:e==="fast"?120:e==="slow"?300:200}const rt={fade:"nice-anim-fade-enter",slideUp:"nice-anim-slide-up-enter",slideDown:"nice-anim-slide-down-enter",slideLeft:"nice-anim-slide-left-enter",slideRight:"nice-anim-slide-right-enter",scaleUp:"nice-anim-scale-up-enter",scaleDown:"nice-anim-scale-down-enter",zoom:"nice-anim-zoom-enter",flip:"nice-anim-flip-enter",none:""},hr={fade:"nice-anim-fade-exit",slideUp:"nice-anim-slide-up-exit",slideDown:"nice-anim-slide-down-exit",slideLeft:"nice-anim-slide-left-exit",slideRight:"nice-anim-slide-right-exit",scaleUp:"nice-anim-scale-up-exit",scaleDown:"nice-anim-scale-down-exit",zoom:"nice-anim-zoom-exit",flip:"nice-anim-flip-exit",none:""};function xs(e){const{visible:t,animation:r="fade",duration:a="normal",onEntered:n,onExited:o}=e,[s,i]=l.useState(t?"entered":"exited"),[c,d]=l.useState(t),u=l.useRef(void 0),f=yr(a),h=l.useMemo(()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,[]),b=h||r==="none"?0:f;l.useEffect(()=>(u.current&&clearTimeout(u.current),t?(d(!0),i("entering"),u.current=setTimeout(()=>{i("entered"),n==null||n()},b)):(i("exiting"),u.current=setTimeout(()=>{i("exited"),d(!1),o==null||o()},b)),()=>{u.current&&clearTimeout(u.current)}),[t,b]);const p=l.useMemo(()=>r==="none"||h?"":s==="entering"?rt[r]:s==="exiting"?hr[r]:s==="entered"?`${rt[r]} nice-anim-active`:"",[r,s,h]),m=l.useMemo(()=>({animationDuration:`${b}ms`,transitionDuration:`${b}ms`}),[b]);return{state:s,shouldRender:c,className:p,style:m}}function ws(e,t){const{expanded:r,duration:a="normal"}=t,[n,o]=l.useState(r?"auto":0),s=yr(a);return l.useEffect(()=>{const i=e.current;if(i)if(r){const c=i.scrollHeight;o(c);const d=setTimeout(()=>o("auto"),s);return()=>clearTimeout(d)}else{const c=i.scrollHeight;o(c),requestAnimationFrame(()=>{requestAnimationFrame(()=>o(0))})}},[r,s,e]),{overflow:"hidden",height:typeof n=="number"?`${n}px`:n,transition:`height ${s}ms ease`}}function ks(e,t=50){return`${e*t}ms`}function Cs(e,t){return t==="enter"?rt[e]:hr[e]}const br=l.createContext({direction:"ltr",isRTL:!1,flip:e=>e,flipStyle:(e,t)=>({[e]:t})}),Sr=({direction:e,children:t})=>{const r=l.useMemo(()=>e!=="auto"?e:typeof document<"u"&&document.documentElement.getAttribute("dir")==="rtl"?"rtl":"ltr",[e]),a=r==="rtl";l.useEffect(()=>(e!=="auto"&&(document.documentElement.setAttribute("dir",r),document.documentElement.style.direction=r),()=>{e!=="auto"&&(document.documentElement.removeAttribute("dir"),document.documentElement.style.direction="")}),[e,r]);const n=l.useCallback(i=>a?{left:"right",right:"left",start:"end",end:"start"}[i]??i:i,[a]),o=l.useCallback((i,c)=>a?{[{paddingLeft:"paddingRight",paddingRight:"paddingLeft",marginLeft:"marginRight",marginRight:"marginLeft"}[i]||i]:c}:{[i]:c},[a]),s=l.useMemo(()=>({direction:r,isRTL:a,flip:n,flipStyle:o}),[r,a,n,o]);return x.jsx(br.Provider,{value:s,children:x.jsx("div",{dir:r,style:{direction:r,display:"contents"},children:t})})};process.env.NODE_ENV!=="production"&&(Sr.displayName="NiceRTLProvider");function Es(){return l.useContext(br)}const Ns={marginStart:"marginInlineStart",marginEnd:"marginInlineEnd",paddingStart:"paddingInlineStart",paddingEnd:"paddingInlineEnd",borderStart:"borderInlineStart",borderEnd:"borderInlineEnd",insetStart:"insetInlineStart",insetEnd:"insetInlineEnd",start:"insetInlineStart",end:"insetInlineEnd",textAlign:{start:"start",end:"end"}},vr=l.createContext({permissions:{},getAccessMode:()=>"full"}),xr=({permissions:e,children:t})=>{const r=l.useMemo(()=>({permissions:e,getAccessMode:(a,n)=>{var o,s;return n&&a&&((o=e.fields)!=null&&o[`${a}.${n}`])?e.fields[`${a}.${n}`]:a&&((s=e.components)!=null&&s[a])?e.components[a]:e.defaultMode??"full"}}),[e]);return x.jsx(vr.Provider,{value:r,children:t})};process.env.NODE_ENV!=="production"&&(xr.displayName="NiceAccessControl");function As(e,t,r){const a=l.useContext(vr);return e||a.getAccessMode(t,r)}function Ms(e){switch(e){case"disabled":return{disabled:!0,"aria-disabled":!0,tabIndex:-1};case"readOnly":return{readOnly:!0};default:return{}}}function Ts(e={}){const{threshold:t=50,maxDuration:r=300,onSwipe:a,onSwipeLeft:n,onSwipeRight:o,onSwipeUp:s,onSwipeDown:i,enabled:c=!0}=e,d=l.useRef(null),[u,f]=l.useState(!1),[h,b]=l.useState(null),p=l.useRef(null);return l.useEffect(()=>{const m=d.current;if(!m||!c)return;const g=k=>{if(k.touches.length!==1)return;const E=k.touches[0];p.current={x:E.clientX,y:E.clientY,timestamp:Date.now()},f(!0),b(null)},S=k=>{if(!p.current||k.touches.length!==1)return;const E=k.touches[0],w=E.clientX-p.current.x,C=E.clientY-p.current.y;Math.abs(w)>Math.abs(C)?b(w>0?"right":"left"):b(C>0?"down":"up")},y=k=>{if(!p.current)return;const E=k.changedTouches[0],w={x:E.clientX,y:E.clientY,timestamp:Date.now()},C=w.x-p.current.x,A=w.y-p.current.y,M=w.timestamp-p.current.timestamp,I=Math.sqrt(C*C+A*A),$=I/M;if(f(!1),M<=r&&I>=t){let T;Math.abs(C)>Math.abs(A)?T=C>0?"right":"left":T=A>0?"down":"up";const D={direction:T,distance:I,velocity:$,duration:M};switch(a==null||a(D),T){case"left":n==null||n(D);break;case"right":o==null||o(D);break;case"up":s==null||s(D);break;case"down":i==null||i(D);break}}p.current=null,b(null)},v=()=>{p.current=null,f(!1),b(null)};return m.addEventListener("touchstart",g,{passive:!0}),m.addEventListener("touchmove",S,{passive:!0}),m.addEventListener("touchend",y,{passive:!0}),m.addEventListener("touchcancel",v,{passive:!0}),()=>{m.removeEventListener("touchstart",g),m.removeEventListener("touchmove",S),m.removeEventListener("touchend",y),m.removeEventListener("touchcancel",v)}},[c,t,r,a,n,o,s,i]),{ref:d,isSwiping:u,swipeDirection:h}}function Is(e={}){const{onPinch:t,onPinchStart:r,onPinchEnd:a,minScale:n=.5,maxScale:o=3,enabled:s=!0}=e,i=l.useRef(null),[c,d]=l.useState(1),[u,f]=l.useState(!1),h=l.useRef(null),b=l.useRef(1);return l.useEffect(()=>{const p=i.current;if(!p||!s)return;const m=(k,E)=>{const w=k.clientX-E.clientX,C=k.clientY-E.clientY;return Math.sqrt(w*w+C*C)},g=(k,E)=>({x:(k.clientX+E.clientX)/2,y:(k.clientY+E.clientY)/2}),S=k=>{k.touches.length===2&&(h.current=m(k.touches[0],k.touches[1]),b.current=c,f(!0),r==null||r())},y=k=>{if(k.touches.length!==2||!h.current)return;const E=m(k.touches[0],k.touches[1]),w=Math.min(o,Math.max(n,b.current*(E/h.current)));d(w),t==null||t({scale:w,center:g(k.touches[0],k.touches[1])})},v=()=>{u&&(f(!1),a==null||a(c),h.current=null)};return p.addEventListener("touchstart",S,{passive:!0}),p.addEventListener("touchmove",y,{passive:!0}),p.addEventListener("touchend",v,{passive:!0}),p.addEventListener("touchcancel",v,{passive:!0}),()=>{p.removeEventListener("touchstart",S),p.removeEventListener("touchmove",y),p.removeEventListener("touchend",v),p.removeEventListener("touchcancel",v)}},[s,c,u,n,o,t,r,a]),{ref:i,scale:c,isPinching:u}}function Rs(e={}){const{onPan:t,onPanStart:r,onPanEnd:a,enabled:n=!0}=e,o=l.useRef(null),[s,i]=l.useState(!1),[c,d]=l.useState(0),[u,f]=l.useState(0),h=l.useRef(null),b=l.useRef(null);return l.useEffect(()=>{const p=o.current;if(!p||!n)return;const m=y=>{if(y.touches.length!==1)return;const v=y.touches[0],k={x:v.clientX,y:v.clientY,timestamp:Date.now()};h.current=k,b.current=k,i(!0),d(0),f(0),r==null||r()},g=y=>{if(!h.current||!b.current||y.touches.length!==1)return;const v=y.touches[0],k=Date.now(),E={x:v.clientX,y:v.clientY,timestamp:k},w=E.x-h.current.x,C=E.y-h.current.y,A=E.timestamp-b.current.timestamp||1,M=(E.x-b.current.x)/A,I=(E.y-b.current.y)/A;d(w),f(C),t==null||t({deltaX:w,deltaY:C,velocityX:M,velocityY:I}),b.current=E},S=()=>{if(!s||!h.current||!b.current)return;const y=c,v=u,k=b.current.timestamp-h.current.timestamp||1;a==null||a({deltaX:y,deltaY:v,velocityX:y/k,velocityY:v/k}),i(!1),h.current=null,b.current=null};return p.addEventListener("touchstart",m,{passive:!0}),p.addEventListener("touchmove",g,{passive:!0}),p.addEventListener("touchend",S,{passive:!0}),p.addEventListener("touchcancel",S,{passive:!0}),()=>{p.removeEventListener("touchstart",m),p.removeEventListener("touchmove",g),p.removeEventListener("touchend",S),p.removeEventListener("touchcancel",S)}},[n,s,c,u,t,r,a]),{ref:o,isPanning:s,deltaX:c,deltaY:u}}function wr(e){const{onRefresh:t,threshold:r=80,maxPull:a=120,enabled:n=!0}=e,o=l.useRef(null),[s,i]=l.useState(!1),[c,d]=l.useState(!1),[u,f]=l.useState(0),h=l.useRef(null),b=Math.min(1,u/r);return l.useEffect(()=>{const p=o.current;if(!p||!n||c)return;const m=y=>{p.scrollTop>0||y.touches.length===1&&(h.current=y.touches[0].clientY)},g=y=>{if(h.current===null||y.touches.length!==1)return;const k=y.touches[0].clientY-h.current;if(k<=0){f(0),i(!1);return}const w=Math.min(a,k*.5);f(w),i(w>0),w>0&&y.preventDefault()},S=async()=>{if(u>=r&&!c){d(!0),f(r);try{await t()}finally{d(!1),f(0)}}else f(0);i(!1),h.current=null};return p.addEventListener("touchstart",m,{passive:!0}),p.addEventListener("touchmove",g,{passive:!1}),p.addEventListener("touchend",S,{passive:!0}),p.addEventListener("touchcancel",S,{passive:!0}),()=>{p.removeEventListener("touchstart",m),p.removeEventListener("touchmove",g),p.removeEventListener("touchend",S),p.removeEventListener("touchcancel",S)}},[n,c,u,r,a,t]),{ref:o,isPulling:s,isRefreshing:c,pullDistance:u,pullProgress:b}}const Ls=({children:e,leftActions:t=[],rightActions:r=[],actionWidth:a=80,maxSwipe:n=1.5,threshold:o=.5,className:s,style:i})=>{const c=l.useRef(null),d=l.useRef(null),[u,f]=l.useState(0),[h,b]=l.useState(!1),p=l.useRef(0),m=l.useRef(0),g=t.length*a,S=r.length*a,y=g*n,v=S*n,k=l.useCallback(M=>{b(!1),p.current=M.touches[0].clientX,m.current=u},[u]),E=l.useCallback(M=>{const I=M.touches[0].clientX-p.current;let $=m.current+I;$>y?$=y+($-y)*.2:$<-v&&($=-v+($+v)*.2),!($>0&&t.length===0)&&($<0&&r.length===0||f($))},[y,v,t.length,r.length]),w=l.useCallback(()=>{b(!0),u>g*o?f(g):u<-S*o?f(-S):f(0)},[u,g,S,o]),C=l.useCallback(M=>{b(!0),f(0),M.onAction()},[]),A=l.useCallback(()=>{b(!0),f(0)},[]);return x.jsxs("div",{ref:c,className:`nice-swipeable ${s||""}`,style:{...i,position:"relative",overflow:"hidden"},children:[x.jsx("div",{className:"nice-swipeable__actions nice-swipeable__actions--left",style:{position:"absolute",left:0,top:0,bottom:0,display:"flex",width:g},children:t.map(M=>x.jsx("button",{className:"nice-swipeable__action",style:{width:a,background:M.color,border:"none",color:"var(--nice-color-white, #fff)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onClick:()=>C(M),children:M.content},M.key))}),x.jsx("div",{className:"nice-swipeable__actions nice-swipeable__actions--right",style:{position:"absolute",right:0,top:0,bottom:0,display:"flex",width:S},children:r.map(M=>x.jsx("button",{className:"nice-swipeable__action",style:{width:a,background:M.color,border:"none",color:"var(--nice-color-white, #fff)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onClick:()=>C(M),children:M.content},M.key))}),x.jsx("div",{role:"presentation",ref:d,className:"nice-swipeable__content",style:{transform:`translateX(${u}px)`,transition:h?"transform 0.3s ease-out":"none",background:"var(--nice-bg-primary, #fff)",position:"relative",zIndex:1},onTouchStart:k,onTouchMove:E,onTouchEnd:w,onClick:u!==0?A:void 0,children:e})]})},Fs=({children:e,onRefresh:t,threshold:r=80,pullingContent:a,refreshingContent:n,enabled:o=!0,className:s,style:i})=>{const{ref:c,isPulling:d,isRefreshing:u,pullDistance:f,pullProgress:h}=wr({onRefresh:t,threshold:r,enabled:o});return x.jsxs("div",{ref:c,className:`nice-pull-refresh ${s||""}`,style:{...i,position:"relative",overflow:"auto",overscrollBehavior:"contain"},children:[x.jsx("div",{className:"nice-pull-refresh__indicator",style:{position:"absolute",top:0,left:0,right:0,display:"flex",justifyContent:"center",alignItems:"center",height:f,overflow:"hidden",transition:d?"none":"height 0.2s ease-out"},children:u?n||x.jsx("div",{className:"nice-pull-refresh__spinner",children:x.jsx("div",{className:"nice-spinner nice-spinner--sm"})}):a||x.jsx("div",{className:"nice-pull-refresh__arrow",style:{transform:`rotate(${h>=1?180:0}deg)`,transition:"transform 0.2s ease",opacity:h},children:x.jsx(N.NiceIcon,{name:"arrow-up",size:24})})}),x.jsx("div",{className:"nice-pull-refresh__content",style:{transform:`translateY(${f}px)`,transition:d?"none":"transform 0.2s ease-out"},children:e})]})};function kr(e="light"){if(!("vibrate"in navigator))return;const t={light:10,medium:20,heavy:30,selection:5,success:[10,30,10],warning:[20,20,20],error:[30,30,30,30]};try{navigator.vibrate(t[e])}catch{}}function Ds(){return l.useCallback((e="light")=>{kr(e)},[])}const Ps=({minSize:e=44,children:t,className:r,style:a,onClick:n})=>x.jsx("div",{role:n?"button":void 0,tabIndex:n?0:void 0,onKeyDown:n?N.clickOnActivationKey:void 0,className:`nice-touch-target ${r||""}`,style:{...a,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:e,minHeight:e,cursor:n?"pointer":void 0},onClick:n,children:t});function zs(){const[e,t]=l.useState(!1),[r,a]=l.useState(0),n=l.useRef(typeof window<"u"?window.innerHeight:0);return l.useEffect(()=>{if(typeof window>"u")return;if("visualViewport"in window&&window.visualViewport){const s=window.visualViewport,i=()=>{const c=n.current-s.height,d=150;t(c>d),a(c>d?c:0)};return s.addEventListener("resize",i),()=>s.removeEventListener("resize",i)}const o=()=>{const s=n.current-window.innerHeight,i=150;t(s>i),a(s>i?s:0)};return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),{isKeyboardVisible:e,keyboardHeight:r}}const $s=[],Cr={announceChanges:!0,reduceMotion:"auto",highContrast:"auto",focusStyle:"auto",keyboardShortcuts:!0,minTouchTarget:44},Er=l.createContext(null),Nr=({config:e,children:t})=>{const r=l.useMemo(()=>({...Cr,...e}),[e]),a=l.useRef(null),n=l.useRef(null),[o,s]=l.useState(!1);l.useEffect(()=>{const b=window.matchMedia("(prefers-reduced-motion: reduce)");s(b.matches);const p=m=>s(m.matches);return b.addEventListener("change",p),()=>b.removeEventListener("change",p)},[]);const[i,c]=l.useState(!1);l.useEffect(()=>{const b=window.matchMedia("(prefers-contrast: more)");c(b.matches);const p=m=>c(m.matches);return b.addEventListener("change",p),()=>b.removeEventListener("change",p)},[]);const d=r.reduceMotion==="always"?!0:r.reduceMotion==="never"?!1:o,u=r.highContrast==="always"?!0:r.highContrast==="never"?!1:i,f=l.useCallback((b,p="polite")=>{if(!r.announceChanges)return;const m=p==="assertive"?n.current:a.current;m&&(m.textContent="",requestAnimationFrame(()=>{m.textContent=b}))},[r.announceChanges]),h=l.useMemo(()=>({config:r,announce:f,prefersReducedMotion:d,prefersHighContrast:u}),[r,f,d,u]);return x.jsxs(Er.Provider,{value:h,children:[t,x.jsx("div",{ref:a,role:"status","aria-live":"polite","aria-atomic":"true",style:at}),x.jsx("div",{ref:n,role:"alert","aria-live":"assertive","aria-atomic":"true",style:at})]})};process.env.NODE_ENV!=="production"&&(Nr.displayName="NiceA11yProvider");function Hs(){const e=l.useContext(Er);return e||{config:Cr,announce:()=>{},prefersReducedMotion:!1,prefersHighContrast:!1}}const at={position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0};function Ar(...e){const t=e.filter(Boolean);return t.length>0?t.join(" "):void 0}function _s(e){const t=e.error?`${e.id}-error`:void 0,r=e.helperText?`${e.id}-helper`:void 0;return{"aria-invalid":e.error?!0:void 0,"aria-required":e.required||void 0,"aria-disabled":e.disabled||void 0,"aria-readonly":e.readOnly||void 0,"aria-describedby":Ar(t,r),"aria-errormessage":t}}function Os(e,t){const{direction:r,wrap:a=!0,itemSelector:n='[role="option"], [role="tab"], [role="menuitem"], [role="radio"], button, a, [tabindex]'}=t;N.useRovingFocus(e,{orientation:r,wrap:a,itemSelector:n})}function Bs(e){const t=l.useRef(null);l.useEffect(()=>(e&&(t.current=document.activeElement),()=>{e&&t.current&&typeof t.current.focus=="function"&&t.current.focus()}),[e])}const Mr=({children:e,as:t="span"})=>l.createElement(t,{style:at},e);process.env.NODE_ENV!=="production"&&(Mr.displayName="NiceVisuallyHidden");const Tr=({targetId:e,children:t})=>{const{t:r}=j.useNiceTranslation();return x.jsx("a",{href:`#${e}`,className:"nice-skip-link",onClick:a=>{a.preventDefault();const n=document.getElementById(e);n&&(n.tabIndex=-1,n.focus())},children:t??r("a11y.skipToMain","Skip to main content")})};process.env.NODE_ENV!=="production"&&(Tr.displayName="NiceSkipLink");const js={submit:{intent:"activate",key:"Enter",description:"Submit / Confirm",descriptionKey:"shortcuts.submit"},cancel:{intent:"back",key:"Escape",description:"Cancel / Close",descriptionKey:"shortcuts.cancel"},clear:{key:"Delete",description:"Clear value",descriptionKey:"shortcuts.clear",modifiers:["ctrl"]},moveUp:{intent:"navigate",direction:"up",key:"ArrowUp",description:"Move up",descriptionKey:"shortcuts.moveUp"},moveDown:{intent:"navigate",direction:"down",key:"ArrowDown",description:"Move down",descriptionKey:"shortcuts.moveDown"},moveLeft:{intent:"navigate",direction:"left",key:"ArrowLeft",description:"Move left",descriptionKey:"shortcuts.moveLeft"},moveRight:{intent:"navigate",direction:"right",key:"ArrowRight",description:"Move right",descriptionKey:"shortcuts.moveRight"},first:{intent:"first",key:"Home",description:"Go to first",descriptionKey:"shortcuts.first"},last:{intent:"last",key:"End",description:"Go to last",descriptionKey:"shortcuts.last"},pageUp:{intent:"pagePrev",key:"PageUp",description:"Page up",descriptionKey:"shortcuts.pageUp"},pageDown:{intent:"pageNext",key:"PageDown",description:"Page down",descriptionKey:"shortcuts.pageDown"},selectAll:{key:"A",description:"Select all",descriptionKey:"shortcuts.selectAll",modifiers:["ctrl"]},toggleSelect:{intent:"activate",key:"Space",description:"Toggle selection",descriptionKey:"shortcuts.toggleSelect"},undo:{key:"Z",description:"Undo",descriptionKey:"shortcuts.undo",modifiers:["ctrl"]},redo:{key:"Y",description:"Redo",descriptionKey:"shortcuts.redo",modifiers:["ctrl"]},copy:{key:"C",description:"Copy",descriptionKey:"shortcuts.copy",modifiers:["ctrl"]},paste:{key:"V",description:"Paste",descriptionKey:"shortcuts.paste",modifiers:["ctrl"]},cut:{key:"X",description:"Cut",descriptionKey:"shortcuts.cut",modifiers:["ctrl"]},edit:{intent:"activate",key:"Enter",description:"Edit cell",descriptionKey:"shortcuts.edit"},tab:{key:"Tab",description:"Next cell",descriptionKey:"shortcuts.tab"},shiftTab:{key:"Tab",description:"Previous cell",descriptionKey:"shortcuts.shiftTab",modifiers:["shift"]},open:{intent:"activate",key:"ArrowDown",description:"Open dropdown",descriptionKey:"shortcuts.open"},close:{intent:"back",key:"Escape",description:"Close popup",descriptionKey:"shortcuts.close"},increment:{intent:"navigate",direction:"up",key:"ArrowUp",description:"Increase value",descriptionKey:"shortcuts.increment"},decrement:{intent:"navigate",direction:"down",key:"ArrowDown",description:"Decrease value",descriptionKey:"shortcuts.decrement"},incrementBig:{intent:"sectionNext",key:"PageUp",description:"Increase by 10",descriptionKey:"shortcuts.incrementBig"},decrementBig:{intent:"sectionPrev",key:"PageDown",description:"Decrease by 10",descriptionKey:"shortcuts.decrementBig"}};function Ws(e){var r,a,n,o;const t=[];return(r=e.modifiers)!=null&&r.includes("ctrl")&&t.push("Ctrl"),(a=e.modifiers)!=null&&a.includes("alt")&&t.push("Alt"),(n=e.modifiers)!=null&&n.includes("shift")&&t.push("Shift"),(o=e.modifiers)!=null&&o.includes("meta")&&t.push("⌘"),t.push(e.key),t.join("+")}function Vs(e,t){if(!(e.key===t.key||e.key.toLowerCase()===t.key.toLowerCase()))return!1;const a=t.modifiers??[];return!(a.includes("ctrl")!==(e.ctrlKey||e.metaKey)||a.includes("alt")!==e.altKey||a.includes("shift")!==e.shiftKey)}function Ks(e){return[...(e.modifiers??[]).map(r=>r.charAt(0).toUpperCase()+r.slice(1)),e.key].join("+")}const Ir=({shortcuts:e=$s,position:t="top",icon:r,size:a="sm",className:n})=>{const{t:o}=j.useNiceTranslation(),s=N.useInputMethod(),i=s==="gamepad"||s==="remote",[c,d]=l.useState(!1),u=l.useRef(null),[f,h]=l.useState({top:0,left:0}),b=l.useCallback(()=>{if(!u.current)return;const g=u.current.getBoundingClientRect(),S=8;let y=0,v=0;switch(t){case"top":y=g.top-S,v=g.left+g.width/2;break;case"bottom":y=g.bottom+S,v=g.left+g.width/2;break;case"left":y=g.top+g.height/2,v=g.left-S;break;case"right":y=g.top+g.height/2,v=g.right+S;break}h({top:y,left:v})},[t]),p=l.useCallback(()=>{b(),d(!0)},[b]),m=l.useCallback(()=>{b(),d(!0)},[b]);return e.length===0?null:x.jsxs(x.Fragment,{children:[x.jsx("button",{ref:u,type:"button",className:`nice-keyboard-hint nice-keyboard-hint--${a} ${n||""}`,onMouseEnter:p,onMouseLeave:()=>d(!1),onFocus:m,onBlur:()=>d(!1),"aria-label":o("a11y.keyboardShortcuts","Keyboard shortcuts"),children:r??x.jsx(N.NiceIcon,{name:"keyboard",size:a==="sm"?14:18})}),c&&x.jsxs("div",{className:`nice-keyboard-hint__tooltip nice-keyboard-hint__tooltip--${t}`,style:{position:"fixed",top:f.top,left:f.left,transform:t==="top"?"translate(-50%, -100%)":t==="bottom"?"translate(-50%, 0)":t==="left"?"translate(-100%, -50%)":"translate(0, -50%)"},role:"tooltip",children:[x.jsx("div",{className:"nice-keyboard-hint__title",children:o("a11y.keyboardShortcuts2","Keyboard Shortcuts")}),x.jsx("ul",{className:"nice-keyboard-hint__list",children:e.map((g,S)=>x.jsxs("li",{className:"nice-keyboard-hint__item",children:[i&&g.intent?x.jsx(N.NiceButtonPrompt,{intent:g.intent,direction:g.direction,size:"sm"}):x.jsx(N.NiceKeyCap,{keys:Ks(g),size:"sm"}),x.jsx("span",{className:"nice-keyboard-hint__desc",children:g.descriptionKey?o(g.descriptionKey,g.description):g.description})]},S))})]})]})};process.env.NODE_ENV!=="production"&&(Ir.displayName="NiceKeyboardHint");function Us(e={}){const{enabled:t=!1,onSubmit:r,preventDefault:a=!0,requireCtrl:n=!1,skipTextarea:o=!0}=e;return l.useCallback(s=>{!t||!r||s.key==="Enter"&&(n&&!s.ctrlKey&&!s.metaKey||o&&s.target.tagName==="TEXTAREA"||(a&&s.preventDefault(),r()))},[t,r,a,n,o])}function Xs(e={}){const{onClick:t,disabled:r=!1,role:a,tabIndex:n,triggerOnSpace:o=!0,as:s,selected:i}=e,c=a??s??"button",d=l.useCallback(h=>{r||t==null||t(h)},[r,t]),u=l.useCallback(h=>{if(r)return;const b=o&&(h.key===" "||h.key==="Spacebar");(h.key==="Enter"||b)&&(h.preventDefault(),t==null||t(h))},[r,t,o]),f={role:c,tabIndex:n??(r?-1:0),onClick:d,onKeyDown:u};return r&&(f["aria-disabled"]=!0),i!==void 0&&(c==="option"||c==="tab"||c==="row")&&(f["aria-selected"]=i),f}function Gs(e={}){const[t,r]=l.useState(!1),[a,n]=l.useState(""),o=l.useRef(null),s=typeof window<"u"&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window),i=l.useCallback(b=>{if(!e.commands)return;const p=b.toLowerCase().trim();for(const m of e.commands)if(typeof m.phrase=="string"){if(p===m.phrase.toLowerCase()){m.action([],b);return}}else{const g=b.match(m.phrase);if(g){m.action(Array.from(g),b);return}}},[e.commands]),c=l.useRef(e);c.current=e;const d=l.useRef(i);d.current=i;const u=l.useRef(!1),f=l.useCallback(()=>{if(!s||u.current)return;const b=window.SpeechRecognition??window.webkitSpeechRecognition,p=c.current,m=new b;m.lang=p.language??"en-US",m.continuous=p.continuous??!0,m.interimResults=p.interimResults??!1,m.onresult=g=>{var k,E;const S=g.results[g.results.length-1],y=S[0].transcript,v=S.isFinal;n(y),(E=(k=c.current).onTranscript)==null||E.call(k,y,v),v&&d.current(y)},m.onerror=g=>{var S,y;(y=(S=c.current).onError)==null||y.call(S,g.error),g.error==="not-allowed"&&(u.current=!1,r(!1))},m.onend=()=>{if(u.current&&c.current.continuous)try{m.start()}catch{u.current=!1,r(!1)}else u.current=!1,r(!1)},o.current=m,m.start(),u.current=!0,r(!0)},[s]),h=l.useCallback(()=>{var b;u.current=!1,(b=o.current)==null||b.stop(),o.current=null,r(!1)},[]);return l.useEffect(()=>()=>h(),[h]),{isListening:t,isSupported:s,start:f,stop:h,transcript:a}}function Rr(e={}){const[t,r]=l.useState(""),a=l.useRef(void 0),n=l.useCallback(s=>{r(""),requestAnimationFrame(()=>{r(s),e.clearAfterMs&&(a.current&&clearTimeout(a.current),a.current=setTimeout(()=>r(""),e.clearAfterMs))})},[e.clearAfterMs]);l.useEffect(()=>()=>{a.current&&clearTimeout(a.current)},[]);const o={role:"status","aria-live":e.politeness??"polite","aria-atomic":e.atomic??!0,"aria-relevant":e.relevant??"additions text",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap"}};return{message:t,announce:n,regionProps:o}}function qs(){const{t:e}=j.useNiceTranslation(),{announce:t,regionProps:r,message:a}=Rr({politeness:"assertive",clearAfterMs:3e3});return{announcePageChange:l.useCallback(o=>{t(e("a11y.navigatedTo","Navigated to: {pageTitle}").replace("{pageTitle}",String(o))),typeof document<"u"&&(document.title=o)},[t,e]),regionProps:r,message:a}}function Ys(){const e=l.useRef(null),t=l.useCallback(()=>{var o;const n=(o=e.current)==null?void 0:o.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');n==null||n.focus()},[]),r=l.useCallback(n=>{var o,s;(s=(o=e.current)==null?void 0:o.querySelector(n))==null||s.focus()},[]),a=l.useCallback(()=>e.current?Array.from(e.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')):[],[]);return{containerRef:e,focusFirst:t,focusElement:r,getFocusableElements:a}}const Wt={simplifiedMode:!1,increasedSpacing:!1,readingGuide:!1,enhancedFocus:!1,reduceMotion:!1,iconLabels:!1,largeTargets:!1,dyslexiaFont:!1,lineSpacing:1.5,wordSpacing:1};function Js(e=Wt){const[t,r]=l.useState({...Wt,...e}),a=l.useCallback((i,c)=>{r(d=>({...d,[i]:c}))},[]),n=Qs(t),o=[t.simplifiedMode&&"nice-a11y-simplified",t.increasedSpacing&&"nice-a11y-spacing",t.enhancedFocus&&"nice-a11y-enhanced-focus",t.reduceMotion&&"nice-a11y-reduce-motion",t.iconLabels&&"nice-a11y-icon-labels",t.largeTargets&&"nice-a11y-large-targets",t.dyslexiaFont&&"nice-a11y-dyslexia"].filter(Boolean).join(" "),s={};return t.lineSpacing&&t.lineSpacing!==1.5&&(s.lineHeight=String(t.lineSpacing)),t.wordSpacing&&t.wordSpacing!==1&&(s.wordSpacing=`${(t.wordSpacing-1)*.25}em`),{settings:t,updateSetting:a,css:n,rootClasses:o,rootStyle:s}}function Qs(e){const t=[];return e.simplifiedMode&&t.push(`
19
19
  .nice-a11y-simplified .nice-secondary,
20
20
  .nice-a11y-simplified .nice-decorative,
21
21
  .nice-a11y-simplified [role="presentation"] { display: none !important; }
@@ -35,9 +35,9 @@
35
35
  min-height: 56px !important; min-width: 56px !important; font-size: 18px !important;
36
36
  }`),e.dyslexiaFont&&t.push(`
37
37
  .nice-a11y-dyslexia { font-family: 'OpenDyslexic', 'Comic Sans MS', sans-serif !important; letter-spacing: 0.05em !important; }`),t.join(`
38
- `)}function ic(e,t,r=!1){const a=Vt(Wt(e)),n=Vt(Wt(t)),o=lc(a,n),i=r?4.5:7;return{rule:"1.4.6",level:"AAA",passed:o>=i,message:`Contrast ratio ${o.toFixed(2)}:1 (requires ${i}:1 for AAA${r?" large text":""})`}}function cc(){if(typeof document>"u")return[];const e=[];return document.querySelectorAll("a").forEach(r=>{var i;const a=((i=r.textContent)==null?void 0:i.trim())??"",n=!!r.getAttribute("aria-label");["click here","read more","learn more","here","link"].includes(a.toLowerCase())&&!n&&e.push({rule:"2.4.9",level:"AAA",passed:!1,message:`Link with generic text "${a}" lacks descriptive label`,element:r.outerHTML.slice(0,100)})}),document.querySelectorAll("h1, h2, h3, h4, h5, h6"),document.querySelectorAll("section, article, main, aside").forEach(r=>{r.querySelector("h1, h2, h3, h4, h5, h6")||e.push({rule:"2.4.10",level:"AAA",passed:!1,message:`<${r.tagName.toLowerCase()}> lacks a heading element`,element:r.tagName.toLowerCase()})}),document.querySelectorAll("p, li, td, span").forEach(r=>{const a=window.getComputedStyle(r),n=parseFloat(a.width),o=parseFloat(a.fontSize);o>0&&n/o>80&&e.push({rule:"1.4.8",level:"AAA",passed:!1,message:`Text block exceeds 80 character width (${Math.round(n/o)} chars)`,element:r.tagName.toLowerCase()})}),document.querySelectorAll('input[type="checkbox"], input[type="radio"], select').forEach(r=>{r.hasAttribute("onchange")&&e.push({rule:"3.2.5",level:"AAA",passed:!1,message:"Form control has inline onchange handler — may cause unexpected context change",element:r.tagName.toLowerCase()})}),document.querySelectorAll("video[autoplay], audio[autoplay]").forEach(r=>{e.push({rule:"2.2.3",level:"AAA",passed:!1,message:"Auto-playing media found — user should control timing",element:r.tagName.toLowerCase()})}),e}function Wt(e){if(e.startsWith("#")){const t=e.slice(1),r=parseInt(t.slice(0,2),16)/255,a=parseInt(t.slice(2,4),16)/255,n=parseInt(t.slice(4,6),16)/255;return[r,a,n]}return[0,0,0]}function Vt([e,t,r]){const a=n=>n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4);return .2126*a(e)+.7152*a(t)+.0722*a(r)}function lc(e,t){const r=Math.max(e,t),a=Math.min(e,t);return(r+.05)/(a+.05)}const dc=["none","protanopia","protanomaly","deuteranopia","deuteranomaly","tritanopia","tritanomaly","achromatopsia","achromatomaly"],Xt="nice2dev-color-blind-filters",Ut="nice2dev-color-blind-styles",rt={protanopia:"0.567 0.433 0 0 0 0.558 0.442 0 0 0 0 0.242 0.758 0 0 0 0 0 1 0",protanomaly:"0.817 0.183 0 0 0 0.333 0.667 0 0 0 0 0.125 0.875 0 0 0 0 0 1 0",deuteranopia:"0.625 0.375 0 0 0 0.7 0.3 0 0 0 0 0.3 0.7 0 0 0 0 0 1 0",deuteranomaly:"0.8 0.2 0 0 0 0.258 0.742 0 0 0 0 0.142 0.858 0 0 0 0 0 1 0",tritanopia:"0.95 0.05 0 0 0 0 0.433 0.567 0 0 0 0.475 0.525 0 0 0 0 0 1 0",tritanomaly:"0.967 0.033 0 0 0 0 0.733 0.267 0 0 0 0.183 0.817 0 0 0 0 0 1 0",achromatopsia:"0.299 0.587 0.114 0 0 0.299 0.587 0.114 0 0 0.299 0.587 0.114 0 0 0 0 0 1 0",achromatomaly:"0.618 0.320 0.062 0 0 0.163 0.775 0.062 0 0 0.163 0.320 0.516 0 0 0 0 0 1 0"};function uc(){if(typeof document>"u"||document.getElementById(Xt))return;const e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.id=Xt,t.setAttribute("aria-hidden","true"),t.setAttribute("focusable","false"),t.style.position="absolute",t.style.width="0",t.style.height="0",t.style.overflow="hidden";const r=document.createElementNS(e,"defs");for(const[a,n]of Object.entries(rt)){const o=document.createElementNS(e,"filter");o.id=`nice-cb-${a}`,o.setAttribute("color-interpolation-filters","sRGB");const i=document.createElementNS(e,"feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("values",n),o.appendChild(i),r.appendChild(o)}if(t.appendChild(r),document.body.appendChild(t),!document.getElementById(Ut)){const a=document.createElement("style");a.id=Ut,a.textContent=Object.keys(rt).map(n=>`.nice-color-blind-${n}{filter:url(#nice-cb-${n})!important;}`).join(""),document.head.appendChild(a)}}function yt(e){for(const t of Object.keys(rt))e.classList.remove(`nice-color-blind-${t}`)}function bt(e,t=typeof document<"u"?document.documentElement:null){t&&(uc(),yt(t),e!=="none"&&t.classList.add(`nice-color-blind-${e}`))}function Ir(e,t={}){const{target:r}=t,a=c.useRef(null);c.useEffect(()=>{const n=r??(typeof document<"u"?document.documentElement:null);return a.current=n,bt(e,n),()=>{const o=a.current;o&&yt(o)}},[e,r])}function fc(e,t){if(typeof window>"u")return null;try{if(t==="cookie"){const a=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"=([^;]*)"));return a?decodeURIComponent(a[1]):null}const r=window[t].getItem(e);return r||null}catch{return null}}function mc(e,t,r,a){if(!(typeof window>"u"))try{if(r==="cookie"){document.cookie=`${e}=${encodeURIComponent(t)};path=/;max-age=${a};SameSite=Lax`;return}window[r].setItem(e,t)}catch{}}function pc(e={}){const{storageKey:t="nice2dev.a11y.cvd",storage:r="localStorage",defaultMode:a="none",target:n,cookieMaxAgeSeconds:o=3600*24*60}=e,i=c.useCallback(y=>{if(typeof window>"u"||r==="cookie")return()=>{};const m=p=>{p.key===t&&y()};return window.addEventListener("storage",m),()=>window.removeEventListener("storage",m)},[r,t]),s=c.useCallback(()=>fc(t,r)??a,[r,t,a]),l=c.useCallback(()=>a,[a]),d=c.useSyncExternalStore(i,s,l),[u,f]=c.useState(d);c.useEffect(()=>{d!==u&&f(d)},[d]),Ir(u,{target:n});const h=c.useCallback(y=>{f(y),mc(t,y,r,o)},[r,t,o]);return[u,h]}function gc(e=typeof document<"u"?document.documentElement:null){return{set:t=>bt(t,e),clear:()=>{e&&yt(e)}}}function Pr(e,t){var i;if(typeof document>"u"||typeof getComputedStyle>"u")return Dr(e);const r=e.trim().match(/^var\(\s*([^,\s)]+)\s*(?:,\s*(.+))?\)$/);if(!r)return e;const a=typeof Element<"u"&&t instanceof Element&&t.isConnected?t:document.documentElement,n=getComputedStyle(a).getPropertyValue(r[1]).trim();if(n)return n;const o=(i=r[2])==null?void 0:i.trim();return o?Pr(o,t):e}function Dr(e){const t=e.trim().match(/^var\(\s*[^,\s)]+\s*(?:,\s*(.+))?\)$/);return t!=null&&t[1]?Dr(t[1]):e}function hc(){const e=globalThis.crypto;if(typeof(e==null?void 0:e.randomUUID)=="function")return e.randomUUID();const t=new Uint8Array(16);if(typeof(e==null?void 0:e.getRandomValues)=="function")e.getRandomValues(t);else for(let a=0;a<t.length;a++)t[a]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;const r=Array.from(t,a=>a.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`}const yc=e=>[...e],bc=()=>{const e=new Map;return{getItem:t=>Promise.resolve(e.get(t)),setItem:(t,r)=>(e.set(t,r),Promise.resolve())}};function vc(e={}){var h,y;const t=e.permissionPolicy??yc,r=e.storage;let a;r&&typeof r.getItem=="function"&&typeof r.setItem=="function"?a={getItem:r.getItem,setItem:r.setItem}:a=bc();const n=(h=e.permissions)==null?void 0:h.canActivate,o={user:(y=e.permissions)==null?void 0:y.user},i=e.logger,s=new Map,l=new Map,d=new Map,u=(m,p)=>{const g=d.get(m);if(g)for(const v of g)try{v(p)}catch{}},f=(m,p,g)=>{const v=new Set(p);return{permissions:v,log:(b,...x)=>{i&&i(m.id,b,x)},on:(b,x)=>{let w=l.get(b);w||(w=new Set,l.set(b,w)),w.add(x);const A=()=>{w.delete(x)};return g.push(A),A},emit:(b,x)=>{if(!v.has("events:emit"))return;const w=l.get(b);if(w)for(const A of w)try{A(x)}catch{}},setItem:async(b,x)=>{v.has("storage:write")&&await a.setItem(`${m.id}:${b}`,x)},getItem:async b=>{if(v.has("storage:read"))return await a.getItem(`${m.id}:${b}`)}}};return{register(m){const p=m.manifest.id;if(s.has(p))throw new Error(`Plugin "${p}" already registered`);const g={manifest:m.manifest,status:"registered"};return s.set(p,{plugin:m,record:g,cleanups:[]}),u("register",g),g},unregister(m){return s.get(m)?(s.delete(m),!0):!1},async activate(m){const p=s.get(m);if(!p)throw new Error(`Unknown plugin "${m}"`);if(p.record.status==="active")return p.record;for(const g of p.plugin.manifest.dependsOn??[]){const v=s.get(g);if(!v)throw p.record.status="error",p.record.error=`Missing dependency: ${g}`,u("error",p.record),new Error(p.record.error);v.record.status!=="active"&&await this.activate(g)}p.record.status="activating";try{if(n&&!n(p.plugin.manifest,o))throw p.record.status="error",p.record.error="permission-denied",u("error",p.record),new Error(p.record.error);const g=t(p.plugin.manifest.permissions??[],p.plugin.manifest),v=f(p.plugin.manifest,g,p.cleanups);await p.plugin.activate(v),p.record.status="active",p.record.activatedAt=Date.now(),p.record.error=void 0,u("activate",p.record)}catch(g){throw p.record.status="error",p.record.error=g instanceof Error?g.message:String(g),u("error",p.record),g}return p.record},async deactivate(m){var g,v;const p=s.get(m);if(!p)throw new Error(`Unknown plugin "${m}"`);if(p.record.status!=="active")return p.record;p.record.status="deactivating";try{await((v=(g=p.plugin).deactivate)==null?void 0:v.call(g));for(const b of p.cleanups.splice(0))await b();p.record.status="inactive",u("deactivate",p.record)}catch(b){throw p.record.status="error",p.record.error=b instanceof Error?b.message:String(b),u("error",p.record),b}return p.record},list(){return[...s.values()].map(m=>({...m.record}))},get(m){const p=s.get(m);return p?{...p.record}:void 0},on(m,p){let g=d.get(m);return g||(g=new Set,d.set(m,g)),g.add(p),()=>{g.delete(p)}},events:{on(m,p){const v={"plugin:registered":"register","plugin:activated":"activate","plugin:deactivated":"deactivate","plugin:error":"error"}[m];let b=d.get(v);return b||(b=new Set,d.set(v,b)),b.add(p),()=>{b.delete(p)}},emit(m,p){const g=l.get(m);if(g)for(const v of g)try{v(p)}catch{}}}}}const Hr={"colors.primary":"--color-primary","colors.primaryHover":"--color-primary-hover","colors.success":"--color-success","colors.warning":"--color-warning","colors.error":"--color-error","colors.info":"--color-info","colors.accent":"--color-accent","colors.accentHover":"--color-accent-hover","colors.link":"--color-link","colors.linkHover":"--color-link-hover","colors.focus":"--color-focus","colors.overlay":"--color-overlay","colors.surface":"--color-surface","colors.surfaceHover":"--color-surface-hover","colors.disabled":"--color-disabled","colors.disabledText":"--color-disabled-text","backgrounds.primary":"--bg-primary","backgrounds.secondary":"--bg-secondary","backgrounds.tertiary":"--bg-tertiary","backgrounds.hover":"--hover-bg","backgrounds.elevated":"--bg-elevated","backgrounds.inset":"--bg-inset","backgrounds.canvas":"--bg-canvas","text.primary":"--text-primary","text.secondary":"--text-secondary","text.muted":"--text-muted","text.inverse":"--text-inverse","text.onPrimary":"--text-on-primary","text.onAccent":"--text-on-accent","text.onSuccess":"--text-on-success","text.onError":"--text-on-error","text.onInfo":"--text-on-info","text.onWarning":"--text-on-warning","borders.color":"--border-color","borders.radiusSm":"--nice-radius-sm","borders.radiusMd":"--nice-radius-md","borders.radiusLg":"--nice-radius-lg","borders.radiusXl":"--nice-radius-xl","borders.radiusFull":"--nice-radius-full","borders.width":"--border-width","borders.focusColor":"--border-focus-color","borders.divider":"--border-divider","shadows.sm":"--shadow-sm","shadows.md":"--shadow-md","shadows.lg":"--shadow-lg","shadows.xl":"--shadow-xl","shadows.inner":"--shadow-inner","shadows.glow":"--shadow-glow","spacing.space1":"--nice-space-1","spacing.space2":"--nice-space-2","spacing.space3":"--nice-space-3","spacing.space4":"--nice-space-4","spacing.space5":"--nice-space-5","spacing.space6":"--nice-space-6","spacing.space8":"--nice-space-8","spacing.space10":"--nice-space-10","spacing.space12":"--nice-space-12","spacing.space16":"--nice-space-16","typography.fontFamily":"--nice-font-family","typography.fontSizeXs":"--nice-font-size-xs","typography.fontSizeSm":"--nice-font-size-sm","typography.fontSizeMd":"--nice-font-size-md","typography.fontSizeLg":"--nice-font-size-lg","typography.fontSizeXl":"--nice-font-size-xl","typography.fontSize2xl":"--nice-font-size-2xl","typography.fontSize3xl":"--nice-font-size-3xl","typography.fontWeightNormal":"--nice-font-weight-normal","typography.fontWeightMedium":"--nice-font-weight-medium","typography.fontWeightSemibold":"--nice-font-weight-semibold","typography.fontWeightBold":"--nice-font-weight-bold","typography.lineHeight":"--nice-line-height","typography.headingFontFamily":"--nice-heading-font-family","typography.monoFontFamily":"--nice-mono-font-family","typography.letterSpacing":"--nice-letter-spacing","typography.headingLetterSpacing":"--nice-heading-letter-spacing","transitions.fast":"--nice-transition-fast","transitions.normal":"--nice-transition","transitions.slow":"--nice-transition-slow"};function Sc(e,t){return t.split(".").reduce((r,a)=>{if(r&&typeof r=="object")return r[a]},e)}function Fr(e){return e.startsWith("--nice-")?null:`--nice-${e.slice(2)}`}function Pe(e){var r;const t={};for(const[a,n]of Object.entries(Hr)){const o=Sc(e,a);if(o!==void 0){t[n]=String(o);const i=Fr(n);i&&(t[i]=String(o))}}if(e.nesting)for(const a of["sidebar","menu","tree"]){const n=e.nesting[a];if(!n)continue;const o=e.backgrounds.secondary||e.backgrounds.primary||"#ffffff",i=((r=e.text)==null?void 0:r.primary)||"#111111";Object.assign(t,zc(a,n,o,i))}return t}function xc(e,t){const r=t??document.documentElement,a=Pe(e);for(const[n,o]of Object.entries(a))r.style.setProperty(n,o);kc(e.backgroundImage,r),e.darkMode&&(r.dataset.ntdColorScheme=e.darkMode)}const wc={dots:'<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1" fill="currentColor" opacity="0.15"/></svg>',grid:'<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><path d="M20 0H0v20" fill="none" stroke="currentColor" stroke-opacity="0.08"/></svg>',diagonal:'<svg width="10" height="10" xmlns="http://www.w3.org/2000/svg"><path d="M0 10L10 0" stroke="currentColor" stroke-opacity="0.08"/></svg>',"cross-hatch":'<svg width="10" height="10" xmlns="http://www.w3.org/2000/svg"><path d="M0 10L10 0M-1 1L1 -1M9 11L11 9" stroke="currentColor" stroke-opacity="0.06"/></svg>',waves:'<svg width="40" height="12" xmlns="http://www.w3.org/2000/svg"><path d="M0 6c5 0 5-6 10-6s5 6 10 6 5-6 10-6 5 6 10 6" fill="none" stroke="currentColor" stroke-opacity="0.08"/></svg>',hexagons:'<svg width="28" height="49" xmlns="http://www.w3.org/2000/svg"><path d="M14 0l14 8.5v16L14 33 0 24.5v-16z" fill="none" stroke="currentColor" stroke-opacity="0.06"/></svg>',triangles:'<svg width="20" height="17" xmlns="http://www.w3.org/2000/svg"><path d="M0 17L10 0l10 17z" fill="none" stroke="currentColor" stroke-opacity="0.06"/></svg>',circles:'<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="6" fill="none" stroke="currentColor" stroke-opacity="0.06"/></svg>',zigzag:'<svg width="20" height="12" xmlns="http://www.w3.org/2000/svg"><path d="M0 6l5-6 5 6 5-6 5 6" fill="none" stroke="currentColor" stroke-opacity="0.08"/></svg>',noise:'<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency=".9" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(#n)"/></svg>'};function kc(e,t){if(t.style.removeProperty("--ntd-bg-image"),t.style.removeProperty("--ntd-bg-image-size"),t.style.removeProperty("--ntd-bg-image-position"),t.style.removeProperty("--ntd-bg-image-attachment"),t.style.removeProperty("--ntd-bg-image-repeat"),t.style.removeProperty("--ntd-bg-image-opacity"),t.style.removeProperty("--ntd-bg-image-blend"),!(!e||e.type==="none")){if(e.type==="gradient"&&e.gradient)t.style.setProperty("--ntd-bg-image",e.gradient);else if(e.type==="image"&&e.imageUrl)t.style.setProperty("--ntd-bg-image",`url("${e.imageUrl}")`),e.imageSize&&t.style.setProperty("--ntd-bg-image-size",e.imageSize),e.imagePosition&&t.style.setProperty("--ntd-bg-image-position",e.imagePosition),e.imageAttachment&&t.style.setProperty("--ntd-bg-image-attachment",e.imageAttachment),e.imageRepeat&&t.style.setProperty("--ntd-bg-image-repeat",e.imageRepeat);else if(e.type==="pattern"&&e.pattern){const r=wc[e.pattern];if(r){const a=`url("data:image/svg+xml,${encodeURIComponent(r)}")`;t.style.setProperty("--ntd-bg-image",a),t.style.setProperty("--ntd-bg-image-repeat","repeat")}}e.opacity!==void 0&&t.style.setProperty("--ntd-bg-image-opacity",String(e.opacity)),e.blendMode&&t.style.setProperty("--ntd-bg-image-blend",e.blendMode)}}function $r(e){const t=e??document.documentElement;for(const r of Object.values(Hr)){t.style.removeProperty(r);const a=Fr(r);a&&t.style.removeProperty(a)}for(const r of["--ntd-bg-image","--ntd-bg-image-size","--ntd-bg-image-position","--ntd-bg-image-attachment","--ntd-bg-image-repeat","--ntd-bg-image-opacity","--ntd-bg-image-blend"])t.style.removeProperty(r);delete t.dataset.ntdColorScheme,delete t.dataset.theme,t.classList.remove("nice-dark");for(const r of["sidebar","menu","tree"]){t.style.removeProperty(`--nice-${r}-levels`);for(let a=1;a<=10;a++)t.style.removeProperty(`--nice-${r}-level-${a}-bg`),t.style.removeProperty(`--nice-${r}-level-${a}-text`),t.style.removeProperty(`--nice-${r}-level-${a}-hover-bg`),t.style.removeProperty(`--nice-${r}-level-${a}-active-bg`),t.style.removeProperty(`--nice-${r}-level-${a}-border`)}}function Mc(e){const t=e??document.documentElement,r=getComputedStyle(t),a=i=>r.getPropertyValue(i).trim(),n=i=>parseFloat(r.getPropertyValue(i))||0,o=i=>a(i)||void 0;return{name:"Current",colors:{primary:a("--color-primary"),primaryHover:a("--color-primary-hover"),success:a("--color-success"),warning:a("--color-warning"),error:a("--color-error"),info:a("--color-info"),accent:o("--color-accent"),accentHover:o("--color-accent-hover"),link:o("--color-link"),linkHover:o("--color-link-hover"),focus:o("--color-focus"),overlay:o("--color-overlay"),surface:o("--color-surface"),surfaceHover:o("--color-surface-hover"),disabled:o("--color-disabled"),disabledText:o("--color-disabled-text")},backgrounds:{primary:a("--bg-primary"),secondary:a("--bg-secondary"),tertiary:a("--bg-tertiary"),hover:a("--hover-bg"),elevated:o("--bg-elevated"),inset:o("--bg-inset"),canvas:o("--bg-canvas")},text:{primary:a("--text-primary"),secondary:a("--text-secondary"),muted:a("--text-muted"),inverse:o("--text-inverse"),onPrimary:o("--text-on-primary"),onAccent:o("--text-on-accent"),onSuccess:o("--text-on-success"),onError:o("--text-on-error"),onInfo:o("--text-on-info"),onWarning:o("--text-on-warning")},borders:{color:a("--border-color"),radiusSm:a("--nice-radius-sm"),radiusMd:a("--nice-radius-md"),radiusLg:a("--nice-radius-lg"),radiusXl:a("--nice-radius-xl"),radiusFull:a("--nice-radius-full"),width:o("--border-width"),focusColor:o("--border-focus-color"),divider:o("--border-divider")},shadows:{sm:a("--shadow-sm"),md:a("--shadow-md"),lg:a("--shadow-lg"),xl:a("--shadow-xl"),inner:o("--shadow-inner"),glow:o("--shadow-glow")},spacing:{space1:a("--nice-space-1"),space2:a("--nice-space-2"),space3:a("--nice-space-3"),space4:a("--nice-space-4"),space5:a("--nice-space-5"),space6:a("--nice-space-6"),space8:a("--nice-space-8"),space10:o("--nice-space-10"),space12:o("--nice-space-12"),space16:o("--nice-space-16")},typography:{fontFamily:a("--nice-font-family"),fontSizeXs:a("--nice-font-size-xs"),fontSizeSm:a("--nice-font-size-sm"),fontSizeMd:a("--nice-font-size-md"),fontSizeLg:a("--nice-font-size-lg"),fontSizeXl:a("--nice-font-size-xl"),fontWeightNormal:n("--nice-font-weight-normal"),fontWeightMedium:n("--nice-font-weight-medium"),fontWeightSemibold:n("--nice-font-weight-semibold"),fontWeightBold:n("--nice-font-weight-bold"),lineHeight:n("--nice-line-height"),headingFontFamily:o("--nice-heading-font-family"),monoFontFamily:o("--nice-mono-font-family"),fontSize2xl:o("--nice-font-size-2xl"),fontSize3xl:o("--nice-font-size-3xl"),letterSpacing:o("--nice-letter-spacing"),headingLetterSpacing:o("--nice-heading-letter-spacing")},transitions:{fast:a("--nice-transition-fast"),normal:a("--nice-transition"),slow:a("--nice-transition-slow")},darkMode:t.dataset.ntdColorScheme??void 0}}function Cc(e){return JSON.stringify(e,null,2)}function Ac(e){const t=JSON.parse(e);if(!t||typeof t!="object"||!t.name||!t.colors||!t.backgrounds)throw new Error("Invalid theme format: missing required fields (name, colors, backgrounds)");return t}const Ec=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,Nc=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i;function at(e){if(!e)return null;const t=e.trim();let r=t.match(Nc);if(r)return{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)};if(r=t.match(Ec),r)return{r:parseInt(r[1]+r[1],16),g:parseInt(r[2]+r[2],16),b:parseInt(r[3]+r[3],16)};const a=t.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i);return a?{r:+a[1],g:+a[2],b:+a[3]}:null}function Lc({r:e,g:t,b:r}){const a=n=>Math.max(0,Math.min(255,Math.round(n))).toString(16).padStart(2,"0");return`#${a(e)}${a(t)}${a(r)}`}function vt(e,t,r){const a=at(e),n=at(t);return!a||!n?e:Lc({r:a.r+(n.r-a.r)*r,g:a.g+(n.g-a.g)*r,b:a.b+(n.b-a.b)*r})}function nt(e,t){return vt(e,"#ffffff",t)}function ot(e,t){return vt(e,"#000000",t)}function st(e){const t=at(e);if(!t)return 1;const r=a=>{const n=a/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)};return .2126*r(t.r)+.7152*r(t.g)+.0722*r(t.b)}function Tc(e,t,r){return st(e)>.5?r:t}function Rc(e,t,r){const a=t.palette??[],n=t.bgStep??.06,o=a[0]??r;switch(t.bgDerivation??"tint"){case"palette":return a.length===0?r:a[(e-1)%a.length];case"shade":return ot(o,Math.min(.9,n*(e-1)));case"mix-surface":return vt(o,r,Math.min(1,n*(e-1)));case"tint":default:return nt(o,Math.min(.9,n*(e-1)))}}function zc(e,t,r,a){var i;const n={},o=Math.max(1,Math.min(10,t.levels??5));for(let s=1;s<=o;s++){const l=(i=t.overrides)==null?void 0:i[s],d=(l==null?void 0:l.background)??Rc(s,t,r),u=(l==null?void 0:l.text)??Tc(d,"#ffffff",a),f=(l==null?void 0:l.hoverBackground)??(st(d)>.5?ot(d,.06):nt(d,.08)),h=(l==null?void 0:l.activeBackground)??(st(d)>.5?ot(d,.12):nt(d,.16)),y=l==null?void 0:l.border;n[`--nice-${e}-level-${s}-bg`]=d,n[`--nice-${e}-level-${s}-text`]=u,n[`--nice-${e}-level-${s}-hover-bg`]=f,n[`--nice-${e}-level-${s}-active-bg`]=h,y&&(n[`--nice-${e}-level-${s}-border`]=y)}return n[`--nice-${e}-levels`]=String(o),n}const St=c.createContext(null);function Ic(){const e=c.useContext(St);if(!e)throw new Error("useNiceTheme must be used within a NiceThemeProvider");return e}const ke={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},Me={fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.125rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5},Ce={fast:"120ms ease",normal:"200ms ease",slow:"300ms ease"},xt=e=>({color:e,radiusSm:"4px",radiusMd:"6px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"}),Or={sm:"0 1px 2px rgba(0,0,0,0.05)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"},Pc={sm:"0 1px 2px rgba(0,0,0,0.3)",md:"0 4px 6px -1px rgba(0,0,0,0.4)",lg:"0 10px 15px -3px rgba(0,0,0,0.4)",xl:"0 20px 25px -5px rgba(0,0,0,0.4)"};function z(e,t,r,a,n){return{name:e,darkMode:"light",colors:{...t,surface:t.surface??r.primary,surfaceHover:t.surfaceHover??r.secondary},backgrounds:{...r,elevated:r.elevated??r.primary,inset:r.inset??r.tertiary,canvas:r.canvas??r.primary},text:{...a,inverse:a.inverse??"#ffffff"},borders:xt(n),shadows:Or,spacing:ke,typography:Me,transitions:Ce}}function B(e,t,r,a,n){return{name:e,darkMode:"dark",colors:{...t,surface:t.surface??r.secondary,surfaceHover:t.surfaceHover??r.tertiary},backgrounds:{...r,elevated:r.elevated??r.secondary,inset:r.inset??r.primary,canvas:r.canvas??r.primary},text:{...a,inverse:a.inverse??"#0f172a"},borders:xt(n),shadows:Pc,spacing:ke,typography:Me,transitions:Ce}}const jr=z("Slate",{primary:"#64748b",primaryHover:"#475569",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#1e293b",secondary:"#475569",muted:"#94a3b8"},"#cbd5e1"),Br=z("Zinc",{primary:"#71717a",primaryHover:"#52525b",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fafafa",secondary:"#f4f4f5",tertiary:"#e4e4e7",hover:"#e4e4e7"},{primary:"#18181b",secondary:"#3f3f46",muted:"#a1a1aa"},"#d4d4d8"),_r=z("Stone",{primary:"#78716c",primaryHover:"#57534e",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#fafaf9",secondary:"#f5f5f4",tertiary:"#e7e5e4",hover:"#e7e5e4"},{primary:"#1c1917",secondary:"#44403c",muted:"#a8a29e"},"#d6d3d1"),Wr=z("Cool Gray",{primary:"#6b7280",primaryHover:"#4b5563",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#3b82f6"},{primary:"#f9fafb",secondary:"#f3f4f6",tertiary:"#e5e7eb",hover:"#e5e7eb"},{primary:"#111827",secondary:"#374151",muted:"#9ca3af"},"#d1d5db"),Vr=z("Warm Gray",{primary:"#7c7568",primaryHover:"#5c564c",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf9f7",secondary:"#f5f4f0",tertiary:"#e8e6e1",hover:"#e8e6e1"},{primary:"#1f1d19",secondary:"#4a463d",muted:"#a09888"},"#d4d0c8"),Xr=z("Silver",{primary:"#94a3b8",primaryHover:"#64748b",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#38bdf8"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#334155",secondary:"#64748b",muted:"#94a3b8"},"#cbd5e1"),Ur=z("Charcoal",{primary:"#374151",primaryHover:"#1f2937",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f9fafb",secondary:"#f3f4f6",tertiary:"#e5e7eb",hover:"#e5e7eb"},{primary:"#111827",secondary:"#374151",muted:"#6b7280"},"#d1d5db"),qr=z("Ivory",{primary:"#92876d",primaryHover:"#7a6f55",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fffef7",secondary:"#faf6eb",tertiary:"#f0ead6",hover:"#f0ead6"},{primary:"#2b2517",secondary:"#5c5340",muted:"#9c9280"},"#ddd8c4"),Gr=z("Rose",{primary:"#e11d48",primaryHover:"#be123c",success:"#16a34a",warning:"#ea580c",error:"#dc2626",info:"#0891b2"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#f43f5e"},"#fda4af"),Kr=z("Emerald",{primary:"#059669",primaryHover:"#047857",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#34d399"},"#6ee7b7"),Jr=z("Amber",{primary:"#d97706",primaryHover:"#b45309",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0284c7"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#78350f",muted:"#f59e0b"},"#fcd34d"),Yr=z("Violet",{primary:"#7c3aed",primaryHover:"#6d28d9",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f5f3ff",secondary:"#ede9fe",tertiary:"#ddd6fe",hover:"#ede9fe"},{primary:"#2e1065",secondary:"#4c1d95",muted:"#a78bfa"},"#c4b5fd"),Qr=z("Teal",{primary:"#0d9488",primaryHover:"#0f766e",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0fdfa",secondary:"#ccfbf1",tertiary:"#99f6e4",hover:"#ccfbf1"},{primary:"#134e4a",secondary:"#115e59",muted:"#2dd4bf"},"#5eead4"),Zr=z("Indigo",{primary:"#4f46e5",primaryHover:"#4338ca",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#eef2ff",secondary:"#e0e7ff",tertiary:"#c7d2fe",hover:"#e0e7ff"},{primary:"#1e1b4b",secondary:"#312e81",muted:"#818cf8"},"#a5b4fc"),ea=z("Cyan",{primary:"#0891b2",primaryHover:"#0e7490",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#0284c7"},{primary:"#ecfeff",secondary:"#cffafe",tertiary:"#a5f3fc",hover:"#cffafe"},{primary:"#164e63",secondary:"#155e75",muted:"#22d3ee"},"#67e8f9"),ta=z("Lime",{primary:"#65a30d",primaryHover:"#4d7c0f",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#f7fee7",secondary:"#ecfccb",tertiary:"#d9f99d",hover:"#ecfccb"},{primary:"#1a2e05",secondary:"#365314",muted:"#84cc16"},"#bef264"),ra=z("Pink",{primary:"#db2777",primaryHover:"#be185d",success:"#10b981",warning:"#f59e0b",error:"#dc2626",info:"#06b6d4"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#500724",secondary:"#831843",muted:"#f472b6"},"#f9a8d4"),aa=z("Orange",{primary:"#ea580c",primaryHover:"#c2410c",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#7c2d12",muted:"#fb923c"},"#fdba74"),na=z("Fuchsia",{primary:"#c026d3",primaryHover:"#a21caf",success:"#10b981",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fdf4ff",secondary:"#fae8ff",tertiary:"#f5d0fe",hover:"#fae8ff"},{primary:"#4a044e",secondary:"#701a75",muted:"#d946ef"},"#e879f9"),oa=z("Sky",{primary:"#0284c7",primaryHover:"#0369a1",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#075985",muted:"#38bdf8"},"#7dd3fc"),sa=z("Ruby",{primary:"#be123c",primaryHover:"#9f1239",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#fb7185"},"#fda4af"),ia=z("Coral",{primary:"#f97316",primaryHover:"#ea580c",success:"#10b981",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#9a3412",muted:"#fb923c"},"#fdba74"),ca=B("Midnight",{primary:"#818cf8",primaryHover:"#6366f1",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#020617",secondary:"#0f172a",tertiary:"#1e293b",hover:"#1e293b"},{primary:"#f1f5f9",secondary:"#94a3b8",muted:"#475569"},"#1e293b"),la=B("Obsidian",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#facc15",error:"#fb7185",info:"#38bdf8"},{primary:"#09090b",secondary:"#18181b",tertiary:"#27272a",hover:"#27272a"},{primary:"#fafafa",secondary:"#a1a1aa",muted:"#52525b"},"#3f3f46"),da=B("Eclipse",{primary:"#c084fc",primaryHover:"#a855f7",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#67e8f9"},{primary:"#0c0a1d",secondary:"#1a1533",tertiary:"#2a2248",hover:"#2a2248"},{primary:"#f5f3ff",secondary:"#a78bfa",muted:"#6d5eac"},"#3b3266"),ua=B("Onyx",{primary:"#60a5fa",primaryHover:"#3b82f6",success:"#4ade80",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#000000",secondary:"#0a0a0a",tertiary:"#171717",hover:"#171717"},{primary:"#ffffff",secondary:"#a3a3a3",muted:"#525252"},"#262626"),fa=B("Carbon",{primary:"#38bdf8",primaryHover:"#0ea5e9",success:"#4ade80",warning:"#facc15",error:"#f87171",info:"#67e8f9"},{primary:"#161616",secondary:"#262626",tertiary:"#393939",hover:"#393939"},{primary:"#f4f4f4",secondary:"#c6c6c6",muted:"#6f6f6f"},"#525252"),ma=B("Cosmos",{primary:"#6366f1",primaryHover:"#4f46e5",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#030712",secondary:"#111827",tertiary:"#1f2937",hover:"#1f2937"},{primary:"#e5e7eb",secondary:"#9ca3af",muted:"#4b5563",onPrimary:"#ffffff"},"#374151"),pa=B("Nebula",{primary:"#e879f9",primaryHover:"#d946ef",success:"#4ade80",warning:"#fbbf24",error:"#fb7185",info:"#67e8f9"},{primary:"#0d0117",secondary:"#1a0533",tertiary:"#2d0a52",hover:"#2d0a52"},{primary:"#fae8ff",secondary:"#d8b4fe",muted:"#7c3aed"},"#581c87"),ga=B("Abyss",{primary:"#22d3ee",primaryHover:"#06b6d4",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#38bdf8"},{primary:"#001219",secondary:"#002a3a",tertiary:"#003e54",hover:"#003e54"},{primary:"#e0f2fe",secondary:"#7dd3fc",muted:"#0369a1"},"#075985"),ha=B("Shadow",{primary:"#a3a3a3",primaryHover:"#737373",success:"#4ade80",warning:"#facc15",error:"#f87171",info:"#38bdf8"},{primary:"#171717",secondary:"#1f1f1f",tertiary:"#2a2a2a",hover:"#2a2a2a"},{primary:"#e5e5e5",secondary:"#a3a3a3",muted:"#525252"},"#404040"),ya=B("Emerald Dark",{primary:"#34d399",primaryHover:"#10b981",success:"#4ade80",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#022c22",secondary:"#064e3b",tertiary:"#065f46",hover:"#065f46"},{primary:"#ecfdf5",secondary:"#6ee7b7",muted:"#047857"},"#047857"),ba=z("Forest",{primary:"#166534",primaryHover:"#14532d",success:"#22c55e",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#052e16",secondary:"#166534",muted:"#4ade80"},"#86efac"),va=z("Ocean",{primary:"#0369a1",primaryHover:"#075985",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#38bdf8"},"#7dd3fc"),Sa=z("Desert",{primary:"#b45309",primaryHover:"#92400e",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fefce8",secondary:"#fef9c3",tertiary:"#fef08a",hover:"#fef9c3"},{primary:"#422006",secondary:"#713f12",muted:"#ca8a04"},"#fde047"),xa=z("Sunset",{primary:"#ea580c",primaryHover:"#c2410c",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#9a3412",muted:"#f97316"},"#fdba74"),wa=z("Aurora",{primary:"#0d9488",primaryHover:"#0f766e",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#f0fdfa",secondary:"#ccfbf1",tertiary:"#99f6e4",hover:"#ccfbf1"},{primary:"#134e4a",secondary:"#115e59",muted:"#2dd4bf"},"#5eead4"),ka=z("Lavender",{primary:"#7e22ce",primaryHover:"#6b21a8",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#faf5ff",secondary:"#f3e8ff",tertiary:"#e9d5ff",hover:"#f3e8ff"},{primary:"#3b0764",secondary:"#581c87",muted:"#a855f7"},"#d8b4fe"),Ma=z("Autumn",{primary:"#c2410c",primaryHover:"#9a3412",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fef2f2",secondary:"#fee2e2",tertiary:"#fecaca",hover:"#fee2e2"},{primary:"#450a0a",secondary:"#7f1d1d",muted:"#f87171"},"#fca5a5"),Ca=z("Spring",{primary:"#16a34a",primaryHover:"#15803d",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#14532d",secondary:"#166534",muted:"#4ade80"},"#86efac"),Aa=z("Arctic",{primary:"#0ea5e9",primaryHover:"#0284c7",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#7dd3fc"},"#bae6fd"),Ea=z("Tropical",{primary:"#0d9488",primaryHover:"#0f766e",success:"#16a34a",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#6ee7b7"},"#a7f3d0"),Na=z("Pastel Rose",{primary:"#f472b6",primaryHover:"#ec4899",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#831843",secondary:"#9d174d",muted:"#f9a8d4"},"#f9a8d4"),La=z("Pastel Sky",{primary:"#38bdf8",primaryHover:"#0ea5e9",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#075985",secondary:"#0369a1",muted:"#7dd3fc"},"#bae6fd"),Ta=z("Pastel Mint",{primary:"#34d399",primaryHover:"#10b981",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#065f46",secondary:"#047857",muted:"#6ee7b7"},"#a7f3d0"),Ra=z("Pastel Peach",{primary:"#fb923c",primaryHover:"#f97316",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#7c2d12",secondary:"#9a3412",muted:"#fdba74"},"#fed7aa"),za=z("Pastel Lavender",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f5f3ff",secondary:"#ede9fe",tertiary:"#ddd6fe",hover:"#ede9fe"},{primary:"#4c1d95",secondary:"#5b21b6",muted:"#c4b5fd"},"#ddd6fe"),Ia=z("Pastel Lemon",{primary:"#facc15",primaryHover:"#eab308",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fefce8",secondary:"#fef9c3",tertiary:"#fef08a",hover:"#fef9c3"},{primary:"#713f12",secondary:"#854d0e",muted:"#fde047"},"#fef08a"),Pa=z("Pastel Sage",{primary:"#86efac",primaryHover:"#4ade80",success:"#22c55e",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#166534",secondary:"#15803d",muted:"#86efac"},"#bbf7d0"),Da=z("Pastel Coral",{primary:"#fb7185",primaryHover:"#f43f5e",success:"#4ade80",warning:"#fcd34d",error:"#ef4444",info:"#67e8f9"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#881337",secondary:"#9f1239",muted:"#fda4af"},"#fecdd3"),Ha=z("Banking",{primary:"#1e3a5f",primaryHover:"#152c4a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#0f172a",secondary:"#334155",muted:"#94a3b8"},"#cbd5e1"),Fa=z("Healthcare",{primary:"#0891b2",primaryHover:"#0e7490",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0fdfa",secondary:"#e0f7fa",tertiary:"#b2ebf2",hover:"#e0f7fa"},{primary:"#134e4a",secondary:"#1a6b6a",muted:"#80cbc4"},"#b2dfdb"),$a=z("Legal",{primary:"#1e293b",primaryHover:"#0f172a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#fafaf9",secondary:"#f5f5f4",tertiary:"#e7e5e4",hover:"#e7e5e4"},{primary:"#0f172a",secondary:"#44403c",muted:"#a8a29e"},"#d6d3d1"),Oa=z("Tech Startup",{primary:"#7c3aed",primaryHover:"#6d28d9",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#faf5ff",secondary:"#f3e8ff",tertiary:"#e9d5ff",hover:"#f3e8ff"},{primary:"#1e1b4b",secondary:"#4c1d95",muted:"#a78bfa"},"#c4b5fd"),ja=z("Enterprise",{primary:"#1e40af",primaryHover:"#1e3a8a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#eff6ff",secondary:"#dbeafe",tertiary:"#bfdbfe",hover:"#dbeafe"},{primary:"#1e3a5f",secondary:"#1e40af",muted:"#60a5fa"},"#93c5fd"),Ba=z("Government",{primary:"#1d4ed8",primaryHover:"#1e40af",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#0f172a",secondary:"#1e293b",muted:"#64748b"},"#cbd5e1"),_a=z("Education",{primary:"#059669",primaryHover:"#047857",success:"#16a34a",warning:"#f59e0b",error:"#ef4444",info:"#0891b2"},{primary:"#f0fdf9",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#6ee7b7"},"#a7f3d0"),Wa=z("Real Estate",{primary:"#92400e",primaryHover:"#78350f",success:"#059669",warning:"#b45309",error:"#dc2626",info:"#0891b2"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#422006",secondary:"#713f12",muted:"#d97706"},"#fcd34d"),Va=z("Nord",{primary:"#5e81ac",primaryHover:"#4c6b90",success:"#a3be8c",warning:"#ebcb8b",error:"#bf616a",info:"#88c0d0"},{primary:"#eceff4",secondary:"#e5e9f0",tertiary:"#d8dee9",hover:"#d8dee9"},{primary:"#2e3440",secondary:"#3b4252",muted:"#4c566a"},"#d8dee9"),Xa=B("Dracula",{primary:"#bd93f9",primaryHover:"#9d79d9",success:"#50fa7b",warning:"#f1fa8c",error:"#ff5555",info:"#8be9fd"},{primary:"#282a36",secondary:"#343746",tertiary:"#44475a",hover:"#44475a"},{primary:"#f8f8f2",secondary:"#c0c0c0",muted:"#6272a4"},"#44475a"),Ua=z("Solarized Light",{primary:"#268bd2",primaryHover:"#1a6da0",success:"#859900",warning:"#b58900",error:"#dc322f",info:"#2aa198"},{primary:"#fdf6e3",secondary:"#eee8d5",tertiary:"#e0dbc7",hover:"#eee8d5"},{primary:"#073642",secondary:"#586e75",muted:"#93a1a1"},"#eee8d5"),qa=B("Solarized Dark",{primary:"#268bd2",primaryHover:"#3d98db",success:"#859900",warning:"#b58900",error:"#dc322f",info:"#2aa198"},{primary:"#002b36",secondary:"#073642",tertiary:"#0a4858",hover:"#073642"},{primary:"#eee8d5",secondary:"#93a1a1",muted:"#586e75",onError:"#ffffff"},"#073642"),Ga=B("Monokai",{primary:"#66d9ef",primaryHover:"#45c0d6",success:"#a6e22e",warning:"#e6db74",error:"#f92672",info:"#66d9ef"},{primary:"#272822",secondary:"#34352e",tertiary:"#3e3d32",hover:"#3e3d32"},{primary:"#f8f8f2",secondary:"#cfcfc2",muted:"#75715e"},"#3e3d32"),Ka=B("One Dark",{primary:"#61afef",primaryHover:"#4b9ee0",success:"#98c379",warning:"#e5c07b",error:"#e06c75",info:"#56b6c2"},{primary:"#282c34",secondary:"#2c313a",tertiary:"#353b45",hover:"#353b45"},{primary:"#abb2bf",secondary:"#828997",muted:"#545862"},"#3e4452"),Ja=B("Synthwave",{primary:"#ff7edb",primaryHover:"#e660c2",success:"#72f1b8",warning:"#fede5d",error:"#fe4450",info:"#36f9f6"},{primary:"#241b2f",secondary:"#2d2140",tertiary:"#362a50",hover:"#362a50"},{primary:"#f0e4fc",secondary:"#b4a0cc",muted:"#6c5c84"},"#4a3866"),Ya=z("Vaporwave",{primary:"#ff71ce",primaryHover:"#e655b5",success:"#78dcca",warning:"#ffb86c",error:"#ff5555",info:"#76e8fc"},{primary:"#fce4f7",secondary:"#e8d0f4",tertiary:"#d4bcf0",hover:"#e8d0f4"},{primary:"#4a1a4e",secondary:"#7b3f7d",muted:"#c080c0"},"#d8a8e8"),Qa=B("Terminal Green",{primary:"#00ff41",primaryHover:"#00cc34",success:"#00ff41",warning:"#ffff00",error:"#ff0000",info:"#00ffff"},{primary:"#0a0a0a",secondary:"#0d1a0d",tertiary:"#1a2e1a",hover:"#1a2e1a"},{primary:"#00ff41",secondary:"#00cc33",muted:"#008822"},"#003300"),Za=z("Sepia",{primary:"#8b6914",primaryHover:"#704f10",success:"#6b8e23",warning:"#cd853f",error:"#b22222",info:"#5f9ea0"},{primary:"#faf0e6",secondary:"#f5e6d3",tertiary:"#eddcc7",hover:"#f5e6d3"},{primary:"#3e2723",secondary:"#5d4037",muted:"#a1887f"},"#d7ccc8"),en=z("Vintage",{primary:"#8d6e63",primaryHover:"#6d4c41",success:"#66bb6a",warning:"#ffb300",error:"#e53935",info:"#29b6f6"},{primary:"#efebe9",secondary:"#d7ccc8",tertiary:"#bcaaa4",hover:"#d7ccc8"},{primary:"#3e2723",secondary:"#5d4037",muted:"#a1887f"},"#bcaaa4"),tn=B("Cyberpunk",{primary:"#00f0ff",primaryHover:"#00c8d4",success:"#39ff14",warning:"#ffff00",error:"#ff003c",info:"#bf00ff"},{primary:"#0a0e17",secondary:"#131824",tertiary:"#1c2333",hover:"#1c2333"},{primary:"#e0fbfc",secondary:"#80d4dd",muted:"#3a6b72",onInfo:"#ffffff"},"#1c3a44"),rn=B("Neon",{primary:"#ff00ff",primaryHover:"#cc00cc",success:"#00ff00",warning:"#ffff00",error:"#ff0000",info:"#00ffff"},{primary:"#0d0d0d",secondary:"#1a1a1a",tertiary:"#262626",hover:"#262626"},{primary:"#ffffff",secondary:"#cccccc",muted:"#666666"},"#333333"),an=B("Retrowave",{primary:"#f77fbe",primaryHover:"#e462a3",success:"#72f1b8",warning:"#ffe261",error:"#ff4444",info:"#79e8fb"},{primary:"#1b0a2e",secondary:"#261440",tertiary:"#321e52",hover:"#321e52"},{primary:"#ffe6f7",secondary:"#c9a0c9",muted:"#6b4c7a"},"#4a2d66"),nn=z("Christmas",{primary:"#c41e3a",primaryHover:"#a01830",success:"#228b22",warning:"#ffd700",error:"#dc2626",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fde8e8",tertiary:"#f8d0d0",hover:"#fde8e8"},{primary:"#3b0a0a",secondary:"#7f1d1d",muted:"#dc6868"},"#e8a0a0"),on=B("Halloween",{primary:"#ff6600",primaryHover:"#e05500",success:"#4ade80",warning:"#fbbf24",error:"#ff0000",info:"#9333ea"},{primary:"#1a0a00",secondary:"#2d1500",tertiary:"#402000",hover:"#402000"},{primary:"#ffedd5",secondary:"#fdba74",muted:"#9a5c28",onInfo:"#ffffff"},"#5c3400"),sn=z("Valentine",{primary:"#e11d48",primaryHover:"#be123c",success:"#10b981",warning:"#f59e0b",error:"#dc2626",info:"#ec4899"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#f9a8d4"},"#fda4af"),cn=z("Easter",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fef9ff",secondary:"#f3e8ff",tertiary:"#e8d5ff",hover:"#f3e8ff"},{primary:"#581c87",secondary:"#6d28d9",muted:"#c4b5fd"},"#ddd6fe"),ln=z("Summer Beach",{primary:"#0ea5e9",primaryHover:"#0284c7",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#7dd3fc"},"#fcd34d"),dn=z("Winter Frost",{primary:"#3b82f6",primaryHover:"#2563eb",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#1e3a5f",secondary:"#1e40af",muted:"#93c5fd"},"#bfdbfe"),un=z("Cherry Blossom",{primary:"#ec4899",primaryHover:"#db2777",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#831843",secondary:"#9d174d",muted:"#f9a8d4"},"#fbcfe8"),fn=z("Harvest",{primary:"#b45309",primaryHover:"#92400e",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#78350f",muted:"#d97706"},"#fcd34d"),mn=z("Japanese Zen",{primary:"#6b7280",primaryHover:"#4b5563",success:"#6b8e23",warning:"#d4a017",error:"#c0392b",info:"#5f9ea0"},{primary:"#faf9f6",secondary:"#f0ece3",tertiary:"#e6e0d4",hover:"#f0ece3"},{primary:"#2c2c2c",secondary:"#5c5c5c",muted:"#a0998a"},"#d5cec0"),pn=z("Moroccan",{primary:"#c2410c",primaryHover:"#9a3412",success:"#15803d",warning:"#ca8a04",error:"#b91c1c",info:"#0e7490"},{primary:"#fffbf0",secondary:"#fef3e0",tertiary:"#fde6c4",hover:"#fef3e0"},{primary:"#3a1a00",secondary:"#7c2d12",muted:"#d97706"},"#f5d0a0"),gn=z("Scandinavian",{primary:"#4b5563",primaryHover:"#374151",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#ffffff",secondary:"#f9fafb",tertiary:"#f3f4f6",hover:"#f3f4f6"},{primary:"#111827",secondary:"#374151",muted:"#9ca3af"},"#e5e7eb"),hn=z("Mediterranean",{primary:"#1e40af",primaryHover:"#1e3a8a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#eff6ff",secondary:"#dbeafe",tertiary:"#bfdbfe",hover:"#dbeafe"},{primary:"#1e3a5f",secondary:"#2563eb",muted:"#93c5fd"},"#bfdbfe"),yn=z("Chinese New Year",{primary:"#dc2626",primaryHover:"#b91c1c",success:"#16a34a",warning:"#d4a017",error:"#ef4444",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fee2e2",tertiary:"#fecaca",hover:"#fee2e2"},{primary:"#450a0a",secondary:"#991b1b",muted:"#f87171"},"#fca5a5"),bn=z("Indian Festive",{primary:"#d97706",primaryHover:"#b45309",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#7c3aed"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#92400e",muted:"#f59e0b"},"#fcd34d"),vn=z("Brazilian Carnival",{primary:"#16a34a",primaryHover:"#15803d",success:"#22c55e",warning:"#facc15",error:"#ef4444",info:"#0ea5e9"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#052e16",secondary:"#166534",muted:"#4ade80"},"#86efac"),Sn=z("African Earth",{primary:"#92400e",primaryHover:"#78350f",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf5f0",secondary:"#f0e6d6",tertiary:"#e6d5bb",hover:"#f0e6d6"},{primary:"#2b1a0e",secondary:"#5c3d1e",muted:"#a08060"},"#d4b896"),xn=B("High Contrast Dark",{primary:"#ffff00",primaryHover:"#cccc00",success:"#00ff00",warning:"#ff8c00",error:"#ff0000",info:"#00ffff"},{primary:"#000000",secondary:"#1a1a1a",tertiary:"#333333",hover:"#333333"},{primary:"#ffffff",secondary:"#ffffff",muted:"#cccccc"},"#ffffff"),wn=z("Monochrome",{primary:"#404040",primaryHover:"#262626",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fafafa",secondary:"#f0f0f0",tertiary:"#e0e0e0",hover:"#e0e0e0"},{primary:"#1a1a1a",secondary:"#404040",muted:"#808080"},"#c0c0c0"),kn=z("Enhanced Contrast",{primary:"#0050b3",primaryHover:"#003d8c",success:"#006400",warning:"#cc7000",error:"#cc0000",info:"#006680"},{primary:"#ffffff",secondary:"#f5f5f5",tertiary:"#ebebeb",hover:"#ebebeb"},{primary:"#000000",secondary:"#1a1a1a",muted:"#595959"},"#8c8c8c"),Mn={name:"Large Text",darkMode:"light",colors:{primary:"#2563eb",primaryHover:"#1d4ed8",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2",surface:"#ffffff",surfaceHover:"#f8fafc"},backgrounds:{primary:"#ffffff",secondary:"#f8fafc",tertiary:"#f1f5f9",hover:"#f1f5f9",elevated:"#ffffff",inset:"#f1f5f9",canvas:"#ffffff"},text:{primary:"#0f172a",secondary:"#475569",muted:"#94a3b8",inverse:"#ffffff"},borders:xt("#e2e8f0"),shadows:Or,spacing:{space1:"6px",space2:"12px",space3:"16px",space4:"20px",space5:"24px",space6:"32px",space8:"40px"},typography:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontSizeXs:"0.875rem",fontSizeSm:"1rem",fontSizeMd:"1.125rem",fontSizeLg:"1.25rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.6},transitions:Ce},Cn={name:"Glassmorphism",darkMode:"light",colors:{primary:"#6366f1",primaryHover:"#4f46e5",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4",surface:"rgba(255,255,255,0.7)",surfaceHover:"rgba(255,255,255,0.5)"},backgrounds:{primary:"rgba(255,255,255,0.7)",secondary:"rgba(255,255,255,0.5)",tertiary:"rgba(255,255,255,0.3)",hover:"rgba(255,255,255,0.5)",elevated:"rgba(255,255,255,0.8)",inset:"rgba(255,255,255,0.3)",canvas:"rgba(255,255,255,0.7)"},text:{primary:"#1e293b",secondary:"#475569",muted:"#94a3b8",inverse:"#ffffff"},borders:{color:"rgba(255,255,255,0.3)",radiusSm:"8px",radiusMd:"12px",radiusLg:"16px",radiusXl:"24px",radiusFull:"9999px"},shadows:{sm:"0 2px 8px rgba(0,0,0,0.04)",md:"0 4px 16px rgba(0,0,0,0.08)",lg:"0 8px 32px rgba(0,0,0,0.12)",xl:"0 16px 48px rgba(0,0,0,0.16)"},spacing:ke,typography:Me,transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},An={name:"Neumorphism Light",darkMode:"light",colors:{primary:"#6366f1",primaryHover:"#4f46e5",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4",surface:"#e0e5ec",surfaceHover:"#d5dae2"},backgrounds:{primary:"#e0e5ec",secondary:"#d5dae2",tertiary:"#ccd1d9",hover:"#d5dae2",elevated:"#e0e5ec",inset:"#ccd1d9",canvas:"#e0e5ec"},text:{primary:"#2d3748",secondary:"#4a5568",muted:"#718096",inverse:"#ffffff"},borders:{color:"#d0d5dd",radiusSm:"8px",radiusMd:"12px",radiusLg:"16px",radiusXl:"20px",radiusFull:"9999px"},shadows:{sm:"3px 3px 6px #b8bec7, -3px -3px 6px #ffffff",md:"5px 5px 10px #b8bec7, -5px -5px 10px #ffffff",lg:"8px 8px 16px #b8bec7, -8px -8px 16px #ffffff",xl:"12px 12px 24px #b8bec7, -12px -12px 24px #ffffff"},spacing:ke,typography:Me,transitions:Ce},En={name:"Neumorphism Dark",darkMode:"dark",colors:{primary:"#818cf8",primaryHover:"#6366f1",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#22d3ee",surface:"#283141",surfaceHover:"#232b3a"},backgrounds:{primary:"#2d3748",secondary:"#283141",tertiary:"#232b3a",hover:"#283141",elevated:"#283141",inset:"#2d3748",canvas:"#2d3748"},text:{primary:"#e2e8f0",secondary:"#a0aec0",muted:"#718096",inverse:"#0f172a"},borders:{color:"#3a4556",radiusSm:"8px",radiusMd:"12px",radiusLg:"16px",radiusXl:"20px",radiusFull:"9999px"},shadows:{sm:"3px 3px 6px #1a202c, -3px -3px 6px #404d64",md:"5px 5px 10px #1a202c, -5px -5px 10px #404d64",lg:"8px 8px 16px #1a202c, -8px -8px 16px #404d64",xl:"12px 12px 24px #1a202c, -12px -12px 24px #404d64"},spacing:ke,typography:Me,transitions:Ce},Nn=z("Minimalist",{primary:"#18181b",primaryHover:"#27272a",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#3b82f6"},{primary:"#ffffff",secondary:"#fafafa",tertiary:"#f5f5f5",hover:"#f5f5f5"},{primary:"#0a0a0a",secondary:"#404040",muted:"#a3a3a3"},"#e5e5e5"),Ln=B("Warm Dark",{primary:"#f59e0b",primaryHover:"#d97706",success:"#10b981",warning:"#fbbf24",error:"#f87171",info:"#38bdf8"},{primary:"#1c1917",secondary:"#292524",tertiary:"#44403c",hover:"#44403c"},{primary:"#fafaf9",secondary:"#d6d3d1",muted:"#78716c"},"#57534e"),Tn=B("Soft Dark",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#34d399",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#1e1e2e",secondary:"#262637",tertiary:"#313147",hover:"#313147"},{primary:"#e8e8f0",secondary:"#a0a0b8",muted:"#5c5c74"},"#3e3e58"),Rn=z("Coffee",{primary:"#6f4e37",primaryHover:"#5c3d28",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf6f1",secondary:"#f0e8dc",tertiary:"#e6d8c6",hover:"#f0e8dc"},{primary:"#2c1a0e",secondary:"#5c3d28",muted:"#a08868"},"#d4c4a8"),zn=z("Wine",{primary:"#7f1d1d",primaryHover:"#641717",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fde8e8",tertiary:"#f8d0d0",hover:"#fde8e8"},{primary:"#3b0a0a",secondary:"#7f1d1d",muted:"#dc6868"},"#e8a0a0"),In=[jr,Br,_r,Wr,Vr,Xr,Ur,qr,Gr,Kr,Jr,Yr,Qr,Zr,ea,ta,ra,aa,na,oa,sa,ia,ca,la,da,ua,fa,ma,pa,ga,ha,ya,ba,va,Sa,xa,wa,ka,Ma,Ca,Aa,Ea,Na,La,Ta,Ra,za,Ia,Pa,Da,Ha,Fa,$a,Oa,ja,Ba,_a,Wa,Va,Xa,Ua,qa,Ga,Ka,Ja,Ya,Qa,Za,en,tn,rn,an,nn,on,sn,cn,ln,dn,un,fn,mn,pn,gn,hn,yn,bn,vn,Sn,xn,wn,kn,Mn,Cn,An,En,Nn,Ln,Tn,Rn,zn],de={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},je={fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.125rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5},Ae={color:"#e2e8f0",radiusSm:"4px",radiusMd:"6px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"},Ee={fast:"120ms ease",normal:"200ms ease",slow:"300ms ease"},wt={name:"Light",darkMode:"light",colors:{primary:"#2563eb",primaryHover:"#1d4ed8",success:"#047857",warning:"#f59e0b",error:"#dc2626",info:"#0e7490",surface:"#ffffff",surfaceHover:"#f8fafc"},backgrounds:{primary:"#ffffff",secondary:"#f8fafc",tertiary:"#f1f5f9",hover:"#f1f5f9",elevated:"#ffffff",inset:"#f1f5f9",canvas:"#f8fafc"},text:{primary:"#0f172a",secondary:"#475569",muted:"#64748b",inverse:"#ffffff"},borders:Ae,shadows:{sm:"0 1px 2px rgba(0,0,0,0.05)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"},spacing:de,typography:je,transitions:Ee},Pn=(function(){return{name:"Dark",darkMode:"dark",colors:{primary:"#3b82f6",primaryHover:"#60a5fa",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4",surface:"#141414",surfaceHover:"#1e1e1e"},backgrounds:{primary:"#0a0a0a",secondary:"#141414",tertiary:"#1e1e1e",hover:"#1a1a1a",elevated:"#141414",inset:"#0a0a0a",canvas:"#0a0a0a"},text:{primary:"#ffffff",secondary:"#a1a1a1",muted:"#858585",inverse:"#0f172a"},borders:{...Ae,color:"#2a2a2a"},shadows:{sm:"0 1px 2px rgba(0,0,0,0.5)",md:"0 4px 6px -1px rgba(0,0,0,0.6)",lg:"0 10px 15px -3px rgba(0,0,0,0.6)",xl:"0 20px 25px -5px rgba(0,0,0,0.6)"},spacing:de,typography:je,transitions:Ee}})(),Dn=(function(){return{name:"Blue",colors:{primary:"#1d4ed8",primaryHover:"#1e40af",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2",surface:"#eff6ff",surfaceHover:"#dbeafe"},backgrounds:{primary:"#eff6ff",secondary:"#dbeafe",tertiary:"#bfdbfe",hover:"#dbeafe",elevated:"#ffffff",inset:"#dbeafe",canvas:"#eff6ff"},text:{primary:"#1e3a5f",secondary:"#3b628a",muted:"#7da0c4",inverse:"#ffffff"},borders:{...Ae,color:"#93c5fd"},shadows:{sm:"0 1px 2px rgba(29,78,216,0.08)",md:"0 4px 6px -1px rgba(29,78,216,0.12)",lg:"0 10px 15px -3px rgba(29,78,216,0.15)",xl:"0 20px 25px -5px rgba(29,78,216,0.18)"},spacing:de,typography:je,transitions:Ee}})(),Hn=(function(){return{name:"High Contrast",colors:{primary:"#0000ff",primaryHover:"#0000cc",success:"#008000",warning:"#ff8c00",error:"#ff0000",info:"#008b8b",surface:"#ffffff",surfaceHover:"#f0f0f0"},backgrounds:{primary:"#ffffff",secondary:"#f0f0f0",tertiary:"#e0e0e0",hover:"#e0e0e0",elevated:"#ffffff",inset:"#e0e0e0",canvas:"#ffffff"},text:{primary:"#000000",secondary:"#1a1a1a",muted:"#4d4d4d",inverse:"#ffffff"},borders:{...Ae,color:"#000000"},shadows:{sm:"0 1px 2px rgba(0,0,0,0.15)",md:"0 4px 6px rgba(0,0,0,0.2)",lg:"0 10px 15px rgba(0,0,0,0.25)",xl:"0 20px 25px rgba(0,0,0,0.3)"},spacing:de,typography:je,transitions:Ee}})(),Fn=(function(){return{name:"Material",colors:{primary:"#6750a4",primaryHover:"#4f378b",success:"#386a20",warning:"#7c5800",error:"#ba1a1a",info:"#00629e",surface:"#fffbfe",surfaceHover:"#f6edff"},backgrounds:{primary:"#fffbfe",secondary:"#f6edff",tertiary:"#ece6f0",hover:"#eaddff",elevated:"#ffffff",inset:"#ece6f0",canvas:"#fffbfe"},text:{primary:"#1c1b1f",secondary:"#49454f",muted:"#79747e",inverse:"#ffffff"},borders:{...Ae,color:"#cac4d0",radiusSm:"8px",radiusMd:"12px",radiusLg:"16px",radiusXl:"28px",radiusFull:"9999px"},shadows:{sm:"0 1px 2px rgba(0,0,0,0.3), 0 1px 3px rgba(0,0,0,0.15)",md:"0 1px 2px rgba(0,0,0,0.3), 0 2px 6px 2px rgba(0,0,0,0.15)",lg:"0 4px 8px 3px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.3)",xl:"0 6px 10px 4px rgba(0,0,0,0.15), 0 2px 3px rgba(0,0,0,0.3)"},spacing:de,typography:{fontFamily:"'Roboto', 'Noto Sans', system-ui, sans-serif",fontSizeXs:"0.6875rem",fontSizeSm:"0.75rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.375rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5},transitions:{fast:"100ms cubic-bezier(0.2,0,0,1)",normal:"200ms cubic-bezier(0.2,0,0,1)",slow:"300ms cubic-bezier(0.2,0,0,1)"}}})(),$n={name:"Bootstrap",colors:{primary:"#0d6efd",primaryHover:"#0b5ed7",success:"#198754",warning:"#ffc107",error:"#dc3545",info:"#0dcaf0",surface:"#ffffff",surfaceHover:"#f8f9fa"},backgrounds:{primary:"#ffffff",secondary:"#f8f9fa",tertiary:"#e9ecef",hover:"#e9ecef",elevated:"#ffffff",inset:"#e9ecef",canvas:"#f8f9fa"},text:{primary:"#212529",secondary:"#6c757d",muted:"#adb5bd",inverse:"#ffffff"},borders:{color:"#dee2e6",radiusSm:"4px",radiusMd:"6px",radiusLg:"8px",radiusXl:"16px",radiusFull:"50rem"},shadows:{sm:"0 0.125rem 0.25rem rgba(0,0,0,0.075)",md:"0 0.5rem 1rem rgba(0,0,0,0.15)",lg:"0 1rem 3rem rgba(0,0,0,0.175)",xl:"0 1rem 3rem rgba(0,0,0,0.25)"},spacing:de,typography:{fontFamily:"system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', sans-serif",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.25rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5},transitions:Ee},On={name:"Fluent",colors:{primary:"#0078d4",primaryHover:"#106ebe",success:"#107c10",warning:"#fce100",error:"#d13438",info:"#00b7c3",surface:"#ffffff",surfaceHover:"#faf9f8"},backgrounds:{primary:"#ffffff",secondary:"#faf9f8",tertiary:"#f3f2f1",hover:"#edebe9",elevated:"#ffffff",inset:"#f3f2f1",canvas:"#faf9f8"},text:{primary:"#323130",secondary:"#605e5c",muted:"#a19f9d",inverse:"#ffffff"},borders:{color:"#e1dfdd",radiusSm:"2px",radiusMd:"4px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"},shadows:{sm:"0 1.6px 3.6px 0 rgba(0,0,0,0.132), 0 0.3px 0.9px 0 rgba(0,0,0,0.108)",md:"0 3.2px 7.2px 0 rgba(0,0,0,0.132), 0 0.6px 1.8px 0 rgba(0,0,0,0.108)",lg:"0 6.4px 14.4px 0 rgba(0,0,0,0.132), 0 1.2px 3.6px 0 rgba(0,0,0,0.108)",xl:"0 25.6px 57.6px 0 rgba(0,0,0,0.22), 0 4.8px 14.4px 0 rgba(0,0,0,0.18)"},spacing:de,typography:{fontFamily:"'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, sans-serif",fontSizeXs:"10px",fontSizeSm:"12px",fontSizeMd:"14px",fontSizeLg:"16px",fontSizeXl:"20px",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.42857},transitions:{fast:"100ms cubic-bezier(0.1,0.9,0.2,1)",normal:"200ms cubic-bezier(0.1,0.9,0.2,1)",slow:"300ms cubic-bezier(0.1,0.9,0.2,1)"}},it=(function(){return[wt,Pn,Dn,Hn,Fn,$n,On,...In]})(),Dc=["primary","primary-hover","primary-light","primary-bg","success","warning","error","info","accent","surface","surface-hover"];function Hc(e,t){return e??t.recommendedDisplayStyle??"default"}function qt(e){return e.toLowerCase().replace(/[\s_-]+/g,"")}function Gt(e){if(e&&typeof e=="object")return e;if(typeof e=="string"){const t=qt(e),r=it.find(a=>qt(a.name)===t);if(r)return r;process.env.NODE_ENV!=="production"&&console.warn(`[@nice2dev/ui] <NiceThemeProvider theme="${e}"> — unknown preset name. Falling back to 'Light'. Available: ${it.map(a=>a.name).join(", ")}.`)}return wt}const kt=({theme:e,darkTheme:t,variantConfig:r,darkMode:a,displayStyle:n,animateTransitions:o=!0,children:i})=>{const s=c.useMemo(()=>Gt(e),[e]),l=c.useMemo(()=>t===void 0?void 0:Gt(t),[t]),d=c.useId(),u=c.useMemo(()=>`p${d.replace(/:/g,"")}`,[d]),f=c.useRef(null),h=c.useRef(null),[y,m]=c.useState(null),[p,g]=c.useState(s),[v,b]=c.useState(!1),[x,w]=c.useState(()=>Hc(n,s));c.useEffect(()=>{n!==void 0?w(n):s.recommendedDisplayStyle&&w(s.recommendedDisplayStyle)},[n,s.recommendedDisplayStyle]),c.useEffect(()=>{const N=window.matchMedia("(prefers-color-scheme: dark)");b(N.matches);const R=I=>b(I.matches);return N.addEventListener("change",R),()=>N.removeEventListener("change",R)},[]);const A=a??s.darkMode??"light",k=A==="dark"||A==="auto"&&v;c.useEffect(()=>{g(k&&l?l:s)},[s,l,k]),c.useEffect(()=>{if(typeof document>"u")return;const N=document.createElement("div");return N.className="nice-theme-scope nice-theme-portal-host",N.dataset.ntdProvider=u,N.style.display="contents",document.body.appendChild(N),h.current=N,m(N),()=>{N.parentNode&&N.parentNode.removeChild(N),h.current=null,m(null)}},[u]),c.useEffect(()=>{const N=f.current;if(!N)return;o&&(N.style.transition="background-color 300ms ease, color 300ms ease");const R=Pe(p);for(const[P,F]of Object.entries(R))N.style.setProperty(P,F);const I=h.current;if(I)for(const[P,F]of Object.entries(R))I.style.setProperty(P,F);N.style.colorScheme=k?"dark":"light",N.dataset.ntdColorScheme=k?"dark":"light",N.dataset.theme=k?"dark":"light",k?N.classList.add("nice-dark"):N.classList.remove("nice-dark"),I&&(I.style.colorScheme=k?"dark":"light",I.dataset.ntdColorScheme=k?"dark":"light",I.dataset.theme=k?"dark":"light",k?I.classList.add("nice-dark"):I.classList.remove("nice-dark"));const D=p.backgroundImage;return D&&D.type!=="none"&&D.type==="gradient"&&D.gradient&&N.style.setProperty("--ntd-bg-image",D.gradient),()=>{N&&$r(N)}},[p,k,o,y]);const C=c.useRef(new Set);c.useEffect(()=>{if(process.env.NODE_ENV==="production"||typeof window>"u"||typeof document>"u")return;const N=window.setTimeout(()=>{const R=Pe(p),I=["--color-primary","--nice-primary","--bg-primary","--text-primary"].find(se=>R[se])??Object.keys(R)[0];if(!I)return;const D=String(R[I]??"").trim();if(!D)return;const P=getComputedStyle(document.documentElement).getPropertyValue(I).trim();if(!P||P===D)return;const F=`${u}::${p.name??"unnamed"}::${I}`;C.current.has(F)||(C.current.add(F),console.warn(`[NiceThemeProvider] CSS var "${I}" on documentElement (${P}) does not match the active provider pack "${p.name??"unnamed"}" (${D}). An external applyTheme(...) call (or other code) is overriding the provider — portaled overlays and components reading from :root will look inconsistent. Either remove the external applyTheme call or wrap your app entirely in a single NiceThemeProvider.`))},0);return()=>window.clearTimeout(N)},[p,u]);const M=c.useRef(!1);c.useEffect(()=>{if(process.env.NODE_ENV==="production"||M.current||typeof window>"u"||typeof document>"u")return;const N=window.setTimeout(()=>{const R=getComputedStyle(document.documentElement);if(!R.getPropertyValue("--nice-overlay-8").trim())return;const I=Dc.filter(D=>!R.getPropertyValue(`--nice-${D}`).trim()&&!R.getPropertyValue(`--nice-color-${D}`).trim());I.length!==0&&(M.current=!0,console.warn(`[NiceThemeProvider] ${I.map(D=>`--nice-${D} / --nice-color-${D}`).join(", ")} resolve to nothing on :root, so dropdowns, dialogs and anything else outside this provider fall back to their built-in colours. Usually an alias cycle in your CSS: the stylesheet already points each --nice-<name> at --nice-color-<name>, so declaring --nice-color-<name> in terms of --nice-<name> closes a loop. Set the --nice-color-* tokens to real values (or use the theme) instead.`))},0);return()=>window.clearTimeout(N)},[p]),c.useEffect(()=>{const N=f.current;if(!N)return;const R=r?{...J,...r}:ve(x);gt(R,N,u);const I=mr(x);for(const[D,P]of Object.entries(I))N.setAttribute(D,P);return()=>{ur(u,N)}},[r,x,u]);const E=c.useCallback(N=>{g(N)},[]),L=c.useMemo(()=>({theme:p,setTheme:E,portalTarget:y}),[p,E,y]),T=c.useMemo(()=>({displayStyle:x,variantConfig:ve(x),setDisplayStyle:w}),[x]);return S.jsx(St.Provider,{value:L,children:S.jsx(Oe.Provider,{value:T,children:S.jsx("div",{ref:f,className:"nice-theme-scope","data-ntd-provider":u,style:{display:"contents"},children:i})})})};process.env.NODE_ENV!=="production"&&(kt.displayName="NiceThemeProvider");function Fc(...e){return e.join("-")}const $c={button:e=>e?`nice-button-${e}`:"nice-button",textInput:e=>e?`nice-text-input-${e}`:"nice-text-input",numberInput:e=>e?`nice-number-input-${e}`:"nice-number-input",select:e=>e?`nice-select-${e}`:"nice-select",checkbox:e=>e?`nice-checkbox-${e}`:"nice-checkbox",toggle:e=>e?`nice-toggle-${e}`:"nice-toggle",datePicker:e=>e?`nice-date-picker-${e}`:"nice-date-picker",dataGrid:e=>e?`nice-datagrid-${e}`:"nice-datagrid",table:e=>e?`nice-table-${e}`:"nice-table",list:e=>e?`nice-list-${e}`:"nice-list",treeView:e=>e?`nice-tree-${e}`:"nice-tree",modal:e=>e?`nice-modal-${e}`:"nice-modal",drawer:e=>e?`nice-drawer-${e}`:"nice-drawer",form:e=>e?`nice-form-${e}`:"nice-form",tabs:e=>e?`nice-tabs-${e}`:"nice-tabs",menu:e=>e?`nice-menu-${e}`:"nice-menu",chart:e=>e?`nice-chart-${e}`:"nice-chart",scheduler:e=>e?`nice-scheduler-${e}`:"nice-scheduler"},jn=({children:e,theme:t,direction:r="ltr",t:a})=>{let n=c.createElement("div",{dir:r,"data-testid":"nice-test-root",style:{direction:r}},e);return a&&(n=c.createElement(_.NiceI18nLazyProvider,{t:a,children:n})),t&&(n=c.createElement(kt,{theme:t,children:n})),n};process.env.NODE_ENV!=="production"&&(jn.displayName="NiceTestWrapper");function Oc(e,t,r){const a=new KeyboardEvent("keydown",{key:t,bubbles:!0,cancelable:!0,...r});e.dispatchEvent(a)}function jc(e,t){var a,n;const r=((a=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:a.set)||((n=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value"))==null?void 0:n.set);r&&r.call(e,t),e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0}))}function Bc(e){const{data:t,delay:r=0,keyField:a="id"}=e;let n=[...t];return{key:a,load:async()=>(r>0&&await new Promise(o=>setTimeout(o,r)),{data:[...n],totalCount:n.length}),insert:async o=>(n.push(o),o),update:async(o,i)=>{const s=n.findIndex(l=>l[a]===o);s>=0&&(n[s]={...n[s],...i})},remove:async o=>{n=n.filter(i=>i[a]!==o)},getData:()=>[...n],reset:()=>{n=[...t]}}}function _c(e){const t=[];return e.querySelectorAll('button, input, select, textarea, [role="button"], [role="link"], [role="checkbox"], [role="radio"]').forEach(o=>{var s;o.getAttribute("aria-label")||o.getAttribute("aria-labelledby")||((s=o.textContent)==null?void 0:s.trim())||o.getAttribute("title")||t.push(`${o.tagName.toLowerCase()}${o.id?"#"+o.id:""} missing accessible name`)}),e.querySelectorAll("img").forEach(o=>{!o.alt&&o.getAttribute("role")!=="presentation"&&t.push(`img${o.src?'[src="'+o.src.substring(0,40)+'..."]':""} missing alt text`)}),e.querySelectorAll('input:not([type="hidden"]), select, textarea').forEach(o=>{const i=o.id&&e.querySelector(`label[for="${o.id}"]`),s=o.getAttribute("aria-label")||o.getAttribute("aria-labelledby");!i&&!s&&t.push(`${o.tagName.toLowerCase()}${o.name?'[name="'+o.name+'"]':""} missing label`)}),t}const Bn=process.env.NODE_ENV==="development";let $={enabled:Bn,logToConsole:!1,slowRenderThreshold:16,samplingRate:1,enableUserTiming:!0,trackPropsChanges:!1};const Be=[],Y=new Map,_e=new Map;let Wc=1;function _n(e){$={...$,...e}}function Wn(){return new Map(Y)}function Vn(e){return Y.get(e)}function Vc(e=100){return Be.slice(-e)}function Mt(){Be.length=0,Y.clear(),_e.clear()}function Ct(e){const t=e??$.slowRenderThreshold??16;return Be.filter(r=>r.actualDuration>t)}function Xc(){return Math.random()<($.samplingRate??1)}function Uc(e){const t=Y.get(e.componentName);t?(t.renderCount++,e.phase==="mount"?t.mountCount++:t.updateCount++,t.totalRenderTime+=e.actualDuration,t.avgRenderTime=t.totalRenderTime/t.renderCount,t.maxRenderTime=Math.max(t.maxRenderTime,e.actualDuration),t.minRenderTime=Math.min(t.minRenderTime,e.actualDuration),t.lastRenderAt=e.timestamp,e.actualDuration>($.slowRenderThreshold??16)&&t.slowRenderCount++):Y.set(e.componentName,{componentName:e.componentName,renderCount:1,mountCount:e.phase==="mount"?1:0,updateCount:e.phase==="mount"?0:1,avgRenderTime:e.actualDuration,maxRenderTime:e.actualDuration,minRenderTime:e.actualDuration,totalRenderTime:e.actualDuration,lastRenderAt:e.timestamp,slowRenderCount:e.actualDuration>($.slowRenderThreshold??16)?1:0})}function G(e){return e<1?`${(e*1e3).toFixed(0)}μs`:e<1e3?`${e.toFixed(2)}ms`:`${(e/1e3).toFixed(2)}s`}const qc=({id:e,children:t,onRender:r,onSlowRender:a,slowThreshold:n,logToConsole:o})=>{const i=c.useCallback((s,l,d,u,f,h)=>{var g,v,b;if(!$.enabled||!Xc()||(g=$.ignoreComponents)!=null&&g.includes(s))return;const y={componentName:s,renderId:`render-${Wc++}`,phase:l,actualDuration:d,baseDuration:u,startTime:f,commitTime:h,interactions:new Set,timestamp:Date.now()};if(Be.push(y),Uc(y),$.enableUserTiming)try{performance.measure(`Nice:${s}:${l}`,{start:f,duration:d})}catch{}if(o??$.logToConsole){const x=n??$.slowRenderThreshold??16,w=d>x;console.log(`%c[Profile] ${s} ${l}`,`color: ${w?"var(--nice-color-error, #dc2626)":"var(--nice-color-success, #22c55e)"}; font-weight: ${w?"bold":"normal"}`,{actual:G(d),base:G(u),savings:`${((1-d/u)*100).toFixed(1)}%`})}r==null||r(y),(v=$.onRender)==null||v.call($,y);const p=n??$.slowRenderThreshold??16;d>p&&(a==null||a(y),(b=$.onSlowRender)==null||b.call($,y))},[e,r,a,n,o]);return $.enabled?S.jsx(c.Profiler,{id:e,onRender:i,children:t}):S.jsx(S.Fragment,{children:t})};function Xn(e,t){const r=c.useRef(void 0),a=c.useRef(0);c.useEffect(()=>{if(!$.enabled||!$.trackPropsChanges)return;if(a.current++,a.current===1){r.current=t;return}const n=r.current,o=[],i=new Set([...Object.keys(n||{}),...Object.keys(t)]);for(const s of i){const l=n==null?void 0:n[s],d=t[s];Object.is(l,d)||o.push({propName:s,oldValue:l,newValue:d,timestamp:Date.now()})}o.length>0&&$.logToConsole&&console.log(`%c[Why render?] ${e}`,"color: var(--nice-info, #6366f1); font-weight: bold",`Render #${a.current}`,o.map(s=>({prop:s.propName,from:s.oldValue,to:s.newValue,type:typeof s.newValue}))),r.current=t})}function Gc(e,t){const r=t||e.displayName||e.name||"Unknown",a=n=>(Xn(r,n),S.jsx(e,{...n}));return a.displayName=`WhyDidYouRender(${r})`,a}function Kc(e){const t=c.useRef(0);return t.current++,c.useEffect(()=>{$.enabled&&$.logToConsole&&e&&console.log(`%c[Render count] ${e}: ${t.current}`,`color: ${t.current>10?"var(--nice-color-warning, #f59e0b)":"var(--nice-color-success, #22c55e)"}`)}),t.current}function We(e,t){if(!$.enabled)return;const r={name:e,startTime:performance.now(),detail:t};if(_e.set(e,r),$.enableUserTiming)try{performance.mark(`Nice:${e}:start`,{detail:t})}catch{}}function Ve(e){if(!$.enabled)return 0;const t=_e.get(e);if(!t)return console.warn(`[Profile] No mark found for: ${e}`),0;const r=performance.now()-t.startTime;if(t.duration=r,$.enableUserTiming)try{performance.mark(`Nice:${e}:end`),performance.measure(`Nice:${e}`,`Nice:${e}:start`,`Nice:${e}:end`)}catch{}return $.logToConsole&&console.log(`%c[Measure] ${e}: ${G(r)}`,`color: ${r>100?"var(--nice-color-warning, #f59e0b)":"var(--nice-color-success, #22c55e)"}`),r}async function Jc(e,t,r){We(e,r);try{return await t()}finally{Ve(e)}}function Yc(e,t,r){We(e,r);try{return t()}finally{Ve(e)}}function Qc(e,t,r){c.useEffect(()=>{We(e);const a=t();return Ve(e),a},r)}function Un(){const e=Array.from(Y.values()),t=Ct(),r=e.reduce((o,i)=>o+i.renderCount,0),a=e.length>0?e.reduce((o,i)=>o+i.avgRenderTime,0)/e.length:0,n=Array.from(_e.values());return{stats:e,slowRenders:t,totalRenders:r,avgRenderTime:a,marks:n}}function At(){const e=Un();console.group("%c[Nice2Dev Performance Report]","color: var(--nice-info, #6366f1); font-weight: bold; font-size: 14px"),console.log(`Total renders: ${e.totalRenders}`),console.log(`Average render time: ${G(e.avgRenderTime)}`),console.log(`Slow renders: ${e.slowRenders.length}`),console.group("Component Stats"),console.table(e.stats.sort((t,r)=>r.totalRenderTime-t.totalRenderTime).map(t=>({Name:t.componentName,Renders:t.renderCount,"Avg Time":G(t.avgRenderTime),"Max Time":G(t.maxRenderTime),"Total Time":G(t.totalRenderTime),"Slow Renders":t.slowRenderCount}))),console.groupEnd(),e.slowRenders.length>0&&(console.group("Slow Renders (last 10)"),console.table(e.slowRenders.slice(-10).map(t=>({Component:t.componentName,Phase:t.phase,Duration:G(t.actualDuration),Time:new Date(t.timestamp).toLocaleTimeString()}))),console.groupEnd()),e.marks.length>0&&(console.group("Custom Marks"),console.table(e.marks.filter(t=>t.duration).map(t=>({Name:t.name,Duration:G(t.duration)}))),console.groupEnd()),console.groupEnd()}const qn=new Map;function Gn(){for(const[e,t]of Y)qn.set(e,{...t});console.log("[Profile] Baseline saved")}function Kn(e=20){const t=[];for(const[r,a]of Y){const n=qn.get(r);if(!n)continue;const o=(a.avgRenderTime-n.avgRenderTime)/n.avgRenderTime*100;o>e&&t.push({componentName:r,metric:"avgRenderTime",baseline:n.avgRenderTime,current:a.avgRenderTime,changePercent:o});const i=(a.maxRenderTime-n.maxRenderTime)/n.maxRenderTime*100;i>e&&t.push({componentName:r,metric:"maxRenderTime",baseline:n.maxRenderTime,current:a.maxRenderTime,changePercent:i})}return t.length>0&&$.logToConsole&&console.warn("%c[Regression] Performance regressions detected!","color: var(--nice-danger-dark, #dc2626); font-weight: bold",t),t}const Zc=Object.assign(c.memo(({position:e="bottom-right",defaultCollapsed:t=!0})=>{const{t:r}=_.useNiceTranslation(),[a,n]=c.useState(t),[o,i]=c.useState([]),[s,l]=c.useState({used:0,total:0});if(c.useEffect(()=>{const u=()=>{const h=Array.from(Y.values());i(h.sort((m,p)=>p.totalRenderTime-m.totalRenderTime).slice(0,10));const y=window.performance;y.memory&&l({used:y.memory.usedJSHeapSize/1024/1024,total:y.memory.totalJSHeapSize/1024/1024})};u();const f=setInterval(u,2e3);return()=>clearInterval(f)},[]),!$.enabled)return null;const d={position:"fixed",zIndex:99999,...e.includes("top")?{top:8}:{bottom:8},...e.includes("left")?{left:8}:{right:8}};return S.jsxs("div",{style:{...d,background:"var(--nice-overlay-85, rgba(0, 0, 0, 0.85))",color:"var(--nice-color-white, #fff)",borderRadius:8,fontSize:11,fontFamily:"Monaco, Consolas, monospace",padding:a?"4px 8px":8,maxWidth:a?"auto":300,maxHeight:a?"auto":400,overflow:"auto"},children:[S.jsxs("div",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:8},onClick:()=>n(u=>!u),children:[S.jsx("span",{"aria-hidden":"true",style:{width:8,height:8,borderRadius:"50%",background:"var(--nice-color-success, #22c55e)"}}),S.jsx("span",{children:r("profiling.profiler","Profiler")}),s.used>0&&S.jsxs("span",{style:{color:s.used>100?"var(--nice-color-warning, #f59e0b)":"var(--nice-text-muted, #64748b)"},children:[s.used.toFixed(0),"MB"]}),S.jsx("span",{style:{marginLeft:"auto",opacity:.5,display:"inline-flex"},children:S.jsx(K,{name:a?"chevron-down":"chevron-up",size:12})})]}),!a&&S.jsxs("div",{style:{marginTop:8},children:[S.jsx("div",{style:{borderBottom:"1px solid var(--nice-border-color, #333)",paddingBottom:4,marginBottom:8},children:S.jsx("strong",{children:r("profiling.topComponents","Top Components")})}),o.map(u=>S.jsxs("div",{style:{marginBottom:4,display:"flex",gap:8},children:[S.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:u.componentName}),S.jsx("span",{style:{color:u.avgRenderTime>16?"var(--nice-color-warning, #f59e0b)":"var(--nice-color-success, #22c55e)"},children:G(u.avgRenderTime)}),S.jsxs("span",{style:{color:"var(--nice-text-muted, #64748b)",minWidth:30,textAlign:"right"},children:["x",u.renderCount]})]},u.componentName)),S.jsxs("div",{style:{marginTop:8,display:"flex",gap:8},children:[S.jsx("button",{onClick:At,style:{flex:1,padding:"4px 8px",background:"var(--nice-bg-tertiary, #333)",border:"none",borderRadius:4,color:"var(--nice-text-primary, #fff)",cursor:"pointer",fontSize:10},children:r("profiling.printReport","Print Report")}),S.jsx("button",{onClick:Mt,style:{flex:1,padding:"4px 8px",background:"var(--nice-bg-tertiary, #333)",border:"none",borderRadius:4,color:"var(--nice-text-primary, #fff)",cursor:"pointer",fontSize:10},children:r("profiling.clear","Clear")})]})]})]})}),{displayName:"ProfilerOverlay"});function el(){Bn&&(window.__NICE2DEV_PROFILER__={getStats:Wn,getComponentStats:Vn,getSlowRenders:Ct,printReport:At,clear:Mt,saveBaseline:Gn,checkRegression:Kn,configure:_n},console.log("%c[Nice2Dev Profiler] DevTools integration ready. Use __NICE2DEV_PROFILER__ in console.","color: var(--nice-info, #6366f1)"))}const Et=process.env.NODE_ENV==="development";let O={enabled:Et,logToConsole:!0,samplingRate:1,trackDetachedNodes:!1,closureSizeThreshold:1024*1024};const Xe=[],De=new Map,Je=new Map,Kt=new WeakMap;let tl=1;function rl(){return Math.random()<(O.samplingRate??1)}function Ue(){var e;try{throw new Error}catch(t){return((e=t.stack)==null?void 0:e.split(`
38
+ `)}function Zs(e,t,r=!1){const a=Kt(Vt(e)),n=Kt(Vt(t)),o=tc(a,n),s=r?4.5:7;return{rule:"1.4.6",level:"AAA",passed:o>=s,message:`Contrast ratio ${o.toFixed(2)}:1 (requires ${s}:1 for AAA${r?" large text":""})`}}function ec(){if(typeof document>"u")return[];const e=[];return document.querySelectorAll("a").forEach(r=>{var s;const a=((s=r.textContent)==null?void 0:s.trim())??"",n=!!r.getAttribute("aria-label");["click here","read more","learn more","here","link"].includes(a.toLowerCase())&&!n&&e.push({rule:"2.4.9",level:"AAA",passed:!1,message:`Link with generic text "${a}" lacks descriptive label`,element:r.outerHTML.slice(0,100)})}),document.querySelectorAll("h1, h2, h3, h4, h5, h6"),document.querySelectorAll("section, article, main, aside").forEach(r=>{r.querySelector("h1, h2, h3, h4, h5, h6")||e.push({rule:"2.4.10",level:"AAA",passed:!1,message:`<${r.tagName.toLowerCase()}> lacks a heading element`,element:r.tagName.toLowerCase()})}),document.querySelectorAll("p, li, td, span").forEach(r=>{const a=window.getComputedStyle(r),n=parseFloat(a.width),o=parseFloat(a.fontSize);o>0&&n/o>80&&e.push({rule:"1.4.8",level:"AAA",passed:!1,message:`Text block exceeds 80 character width (${Math.round(n/o)} chars)`,element:r.tagName.toLowerCase()})}),document.querySelectorAll('input[type="checkbox"], input[type="radio"], select').forEach(r=>{r.hasAttribute("onchange")&&e.push({rule:"3.2.5",level:"AAA",passed:!1,message:"Form control has inline onchange handler — may cause unexpected context change",element:r.tagName.toLowerCase()})}),document.querySelectorAll("video[autoplay], audio[autoplay]").forEach(r=>{e.push({rule:"2.2.3",level:"AAA",passed:!1,message:"Auto-playing media found — user should control timing",element:r.tagName.toLowerCase()})}),e}function Vt(e){if(e.startsWith("#")){const t=e.slice(1),r=parseInt(t.slice(0,2),16)/255,a=parseInt(t.slice(2,4),16)/255,n=parseInt(t.slice(4,6),16)/255;return[r,a,n]}return[0,0,0]}function Kt([e,t,r]){const a=n=>n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4);return .2126*a(e)+.7152*a(t)+.0722*a(r)}function tc(e,t){const r=Math.max(e,t),a=Math.min(e,t);return(r+.05)/(a+.05)}const rc=["none","protanopia","protanomaly","deuteranopia","deuteranomaly","tritanopia","tritanomaly","achromatopsia","achromatomaly"],Ut="nice2dev-color-blind-filters",Xt="nice2dev-color-blind-styles",nt={protanopia:"0.567 0.433 0 0 0 0.558 0.442 0 0 0 0 0.242 0.758 0 0 0 0 0 1 0",protanomaly:"0.817 0.183 0 0 0 0.333 0.667 0 0 0 0 0.125 0.875 0 0 0 0 0 1 0",deuteranopia:"0.625 0.375 0 0 0 0.7 0.3 0 0 0 0 0.3 0.7 0 0 0 0 0 1 0",deuteranomaly:"0.8 0.2 0 0 0 0.258 0.742 0 0 0 0 0.142 0.858 0 0 0 0 0 1 0",tritanopia:"0.95 0.05 0 0 0 0 0.433 0.567 0 0 0 0.475 0.525 0 0 0 0 0 1 0",tritanomaly:"0.967 0.033 0 0 0 0 0.733 0.267 0 0 0 0.183 0.817 0 0 0 0 0 1 0",achromatopsia:"0.299 0.587 0.114 0 0 0.299 0.587 0.114 0 0 0.299 0.587 0.114 0 0 0 0 0 1 0",achromatomaly:"0.618 0.320 0.062 0 0 0.163 0.775 0.062 0 0 0.163 0.320 0.516 0 0 0 0 0 1 0"};function ac(){if(typeof document>"u"||document.getElementById(Ut))return;const e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.id=Ut,t.setAttribute("aria-hidden","true"),t.setAttribute("focusable","false"),t.style.position="absolute",t.style.width="0",t.style.height="0",t.style.overflow="hidden";const r=document.createElementNS(e,"defs");for(const[a,n]of Object.entries(nt)){const o=document.createElementNS(e,"filter");o.id=`nice-cb-${a}`,o.setAttribute("color-interpolation-filters","sRGB");const s=document.createElementNS(e,"feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("values",n),o.appendChild(s),r.appendChild(o)}if(t.appendChild(r),document.body.appendChild(t),!document.getElementById(Xt)){const a=document.createElement("style");a.id=Xt,a.textContent=Object.keys(nt).map(n=>`.nice-color-blind-${n}{filter:url(#nice-cb-${n})!important;}`).join(""),document.head.appendChild(a)}}function bt(e){for(const t of Object.keys(nt))e.classList.remove(`nice-color-blind-${t}`)}function St(e,t=typeof document<"u"?document.documentElement:null){t&&(ac(),bt(t),e!=="none"&&t.classList.add(`nice-color-blind-${e}`))}function Lr(e,t={}){const{target:r}=t,a=l.useRef(null);l.useEffect(()=>{const n=r??(typeof document<"u"?document.documentElement:null);return a.current=n,St(e,n),()=>{const o=a.current;o&&bt(o)}},[e,r])}function nc(e,t){if(typeof window>"u")return null;try{if(t==="cookie"){const a=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"=([^;]*)"));return a?decodeURIComponent(a[1]):null}const r=window[t].getItem(e);return r||null}catch{return null}}function oc(e,t,r,a){if(!(typeof window>"u"))try{if(r==="cookie"){document.cookie=`${e}=${encodeURIComponent(t)};path=/;max-age=${a};SameSite=Lax`;return}window[r].setItem(e,t)}catch{}}function ic(e={}){const{storageKey:t="nice2dev.a11y.cvd",storage:r="localStorage",defaultMode:a="none",target:n,cookieMaxAgeSeconds:o=3600*24*60}=e,s=l.useCallback(b=>{if(typeof window>"u"||r==="cookie")return()=>{};const p=m=>{m.key===t&&b()};return window.addEventListener("storage",p),()=>window.removeEventListener("storage",p)},[r,t]),i=l.useCallback(()=>nc(t,r)??a,[r,t,a]),c=l.useCallback(()=>a,[a]),d=l.useSyncExternalStore(s,i,c),[u,f]=l.useState(d);l.useEffect(()=>{d!==u&&f(d)},[d]),Lr(u,{target:n});const h=l.useCallback(b=>{f(b),oc(t,b,r,o)},[r,t,o]);return[u,h]}function sc(e=typeof document<"u"?document.documentElement:null){return{set:t=>St(t,e),clear:()=>{e&&bt(e)}}}function Fr(e,t){var s;if(typeof document>"u"||typeof getComputedStyle>"u")return Dr(e);const r=e.trim().match(/^var\(\s*([^,\s)]+)\s*(?:,\s*(.+))?\)$/);if(!r)return e;const a=typeof Element<"u"&&t instanceof Element&&t.isConnected?t:document.documentElement,n=getComputedStyle(a).getPropertyValue(r[1]).trim();if(n)return n;const o=(s=r[2])==null?void 0:s.trim();return o?Fr(o,t):e}function Dr(e){const t=e.trim().match(/^var\(\s*[^,\s)]+\s*(?:,\s*(.+))?\)$/);return t!=null&&t[1]?Dr(t[1]):e}function cc(){const e=globalThis.crypto;if(typeof(e==null?void 0:e.randomUUID)=="function")return e.randomUUID();const t=new Uint8Array(16);if(typeof(e==null?void 0:e.getRandomValues)=="function")e.getRandomValues(t);else for(let a=0;a<t.length;a++)t[a]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;const r=Array.from(t,a=>a.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`}const lc=e=>[...e],dc=()=>{const e=new Map;return{getItem:t=>Promise.resolve(e.get(t)),setItem:(t,r)=>(e.set(t,r),Promise.resolve())}};function uc(e={}){var h,b;const t=e.permissionPolicy??lc,r=e.storage;let a;r&&typeof r.getItem=="function"&&typeof r.setItem=="function"?a={getItem:r.getItem,setItem:r.setItem}:a=dc();const n=(h=e.permissions)==null?void 0:h.canActivate,o={user:(b=e.permissions)==null?void 0:b.user},s=e.logger,i=new Map,c=new Map,d=new Map,u=(p,m)=>{const g=d.get(p);if(g)for(const S of g)try{S(m)}catch{}},f=(p,m,g)=>{const S=new Set(m);return{permissions:S,log:(y,...v)=>{s&&s(p.id,y,v)},on:(y,v)=>{let k=c.get(y);k||(k=new Set,c.set(y,k)),k.add(v);const E=()=>{k.delete(v)};return g.push(E),E},emit:(y,v)=>{if(!S.has("events:emit"))return;const k=c.get(y);if(k)for(const E of k)try{E(v)}catch{}},setItem:async(y,v)=>{S.has("storage:write")&&await a.setItem(`${p.id}:${y}`,v)},getItem:async y=>{if(S.has("storage:read"))return await a.getItem(`${p.id}:${y}`)}}};return{register(p){const m=p.manifest.id;if(i.has(m))throw new Error(`Plugin "${m}" already registered`);const g={manifest:p.manifest,status:"registered"};return i.set(m,{plugin:p,record:g,cleanups:[]}),u("register",g),g},unregister(p){return i.get(p)?(i.delete(p),!0):!1},async activate(p){const m=i.get(p);if(!m)throw new Error(`Unknown plugin "${p}"`);if(m.record.status==="active")return m.record;for(const g of m.plugin.manifest.dependsOn??[]){const S=i.get(g);if(!S)throw m.record.status="error",m.record.error=`Missing dependency: ${g}`,u("error",m.record),new Error(m.record.error);S.record.status!=="active"&&await this.activate(g)}m.record.status="activating";try{if(n&&!n(m.plugin.manifest,o))throw m.record.status="error",m.record.error="permission-denied",u("error",m.record),new Error(m.record.error);const g=t(m.plugin.manifest.permissions??[],m.plugin.manifest),S=f(m.plugin.manifest,g,m.cleanups);await m.plugin.activate(S),m.record.status="active",m.record.activatedAt=Date.now(),m.record.error=void 0,u("activate",m.record)}catch(g){throw m.record.status="error",m.record.error=g instanceof Error?g.message:String(g),u("error",m.record),g}return m.record},async deactivate(p){var g,S;const m=i.get(p);if(!m)throw new Error(`Unknown plugin "${p}"`);if(m.record.status!=="active")return m.record;m.record.status="deactivating";try{await((S=(g=m.plugin).deactivate)==null?void 0:S.call(g));for(const y of m.cleanups.splice(0))await y();m.record.status="inactive",u("deactivate",m.record)}catch(y){throw m.record.status="error",m.record.error=y instanceof Error?y.message:String(y),u("error",m.record),y}return m.record},list(){return[...i.values()].map(p=>({...p.record}))},get(p){const m=i.get(p);return m?{...m.record}:void 0},on(p,m){let g=d.get(p);return g||(g=new Set,d.set(p,g)),g.add(m),()=>{g.delete(m)}},events:{on(p,m){const S={"plugin:registered":"register","plugin:activated":"activate","plugin:deactivated":"deactivate","plugin:error":"error"}[p];let y=d.get(S);return y||(y=new Set,d.set(S,y)),y.add(m),()=>{y.delete(m)}},emit(p,m){const g=c.get(p);if(g)for(const S of g)try{S(m)}catch{}}}}}const Pr={"colors.primary":"--color-primary","colors.primaryHover":"--color-primary-hover","colors.success":"--color-success","colors.warning":"--color-warning","colors.error":"--color-error","colors.info":"--color-info","colors.accent":"--color-accent","colors.accentHover":"--color-accent-hover","colors.link":"--color-link","colors.linkHover":"--color-link-hover","colors.focus":"--color-focus","colors.overlay":"--color-overlay","colors.surface":"--color-surface","colors.surfaceHover":"--color-surface-hover","colors.disabled":"--color-disabled","colors.disabledText":"--color-disabled-text","backgrounds.primary":"--bg-primary","backgrounds.secondary":"--bg-secondary","backgrounds.tertiary":"--bg-tertiary","backgrounds.hover":"--hover-bg","backgrounds.elevated":"--bg-elevated","backgrounds.inset":"--bg-inset","backgrounds.canvas":"--bg-canvas","text.primary":"--text-primary","text.secondary":"--text-secondary","text.muted":"--text-muted","text.inverse":"--text-inverse","text.onPrimary":"--text-on-primary","text.onAccent":"--text-on-accent","text.onSuccess":"--text-on-success","text.onError":"--text-on-error","text.onInfo":"--text-on-info","text.onWarning":"--text-on-warning","borders.color":"--border-color","borders.radiusSm":"--nice-radius-sm","borders.radiusMd":"--nice-radius-md","borders.radiusLg":"--nice-radius-lg","borders.radiusXl":"--nice-radius-xl","borders.radiusFull":"--nice-radius-full","borders.width":"--border-width","borders.focusColor":"--border-focus-color","borders.divider":"--border-divider","shadows.sm":"--shadow-sm","shadows.md":"--shadow-md","shadows.lg":"--shadow-lg","shadows.xl":"--shadow-xl","shadows.inner":"--shadow-inner","shadows.glow":"--shadow-glow","spacing.space1":"--nice-space-1","spacing.space2":"--nice-space-2","spacing.space3":"--nice-space-3","spacing.space4":"--nice-space-4","spacing.space5":"--nice-space-5","spacing.space6":"--nice-space-6","spacing.space8":"--nice-space-8","spacing.space10":"--nice-space-10","spacing.space12":"--nice-space-12","spacing.space16":"--nice-space-16","typography.fontFamily":"--nice-font-family","typography.fontSizeXs":"--nice-font-size-xs","typography.fontSizeSm":"--nice-font-size-sm","typography.fontSizeMd":"--nice-font-size-md","typography.fontSizeLg":"--nice-font-size-lg","typography.fontSizeXl":"--nice-font-size-xl","typography.fontSize2xl":"--nice-font-size-2xl","typography.fontSize3xl":"--nice-font-size-3xl","typography.fontWeightNormal":"--nice-font-weight-normal","typography.fontWeightMedium":"--nice-font-weight-medium","typography.fontWeightSemibold":"--nice-font-weight-semibold","typography.fontWeightBold":"--nice-font-weight-bold","typography.lineHeight":"--nice-line-height","typography.headingFontFamily":"--nice-heading-font-family","typography.monoFontFamily":"--nice-mono-font-family","typography.letterSpacing":"--nice-letter-spacing","typography.headingLetterSpacing":"--nice-heading-letter-spacing","transitions.fast":"--nice-transition-fast","transitions.normal":"--nice-transition","transitions.slow":"--nice-transition-slow"};function fc(e,t){return t.split(".").reduce((r,a)=>{if(r&&typeof r=="object")return r[a]},e)}function zr(e){return e.startsWith("--nice-")?null:`--nice-${e.slice(2)}`}function ze(e){var r;const t={};for(const[a,n]of Object.entries(Pr)){const o=fc(e,a);if(o!==void 0){t[n]=String(o);const s=zr(n);s&&(t[s]=String(o))}}if(e.nesting)for(const a of["sidebar","menu","tree"]){const n=e.nesting[a];if(!n)continue;const o=e.backgrounds.secondary||e.backgrounds.primary||"#ffffff",s=((r=e.text)==null?void 0:r.primary)||"#111111";Object.assign(t,Cc(a,n,o,s))}return t}function mc(e,t){const r=t??document.documentElement,a=ze(e);for(const[n,o]of Object.entries(a))r.style.setProperty(n,o);gc(e.backgroundImage,r),e.darkMode&&(r.dataset.ntdColorScheme=e.darkMode)}const pc={dots:'<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1" fill="currentColor" opacity="0.15"/></svg>',grid:'<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><path d="M20 0H0v20" fill="none" stroke="currentColor" stroke-opacity="0.08"/></svg>',diagonal:'<svg width="10" height="10" xmlns="http://www.w3.org/2000/svg"><path d="M0 10L10 0" stroke="currentColor" stroke-opacity="0.08"/></svg>',"cross-hatch":'<svg width="10" height="10" xmlns="http://www.w3.org/2000/svg"><path d="M0 10L10 0M-1 1L1 -1M9 11L11 9" stroke="currentColor" stroke-opacity="0.06"/></svg>',waves:'<svg width="40" height="12" xmlns="http://www.w3.org/2000/svg"><path d="M0 6c5 0 5-6 10-6s5 6 10 6 5-6 10-6 5 6 10 6" fill="none" stroke="currentColor" stroke-opacity="0.08"/></svg>',hexagons:'<svg width="28" height="49" xmlns="http://www.w3.org/2000/svg"><path d="M14 0l14 8.5v16L14 33 0 24.5v-16z" fill="none" stroke="currentColor" stroke-opacity="0.06"/></svg>',triangles:'<svg width="20" height="17" xmlns="http://www.w3.org/2000/svg"><path d="M0 17L10 0l10 17z" fill="none" stroke="currentColor" stroke-opacity="0.06"/></svg>',circles:'<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="6" fill="none" stroke="currentColor" stroke-opacity="0.06"/></svg>',zigzag:'<svg width="20" height="12" xmlns="http://www.w3.org/2000/svg"><path d="M0 6l5-6 5 6 5-6 5 6" fill="none" stroke="currentColor" stroke-opacity="0.08"/></svg>',noise:'<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency=".9" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(#n)"/></svg>'};function gc(e,t){if(t.style.removeProperty("--ntd-bg-image"),t.style.removeProperty("--ntd-bg-image-size"),t.style.removeProperty("--ntd-bg-image-position"),t.style.removeProperty("--ntd-bg-image-attachment"),t.style.removeProperty("--ntd-bg-image-repeat"),t.style.removeProperty("--ntd-bg-image-opacity"),t.style.removeProperty("--ntd-bg-image-blend"),!(!e||e.type==="none")){if(e.type==="gradient"&&e.gradient)t.style.setProperty("--ntd-bg-image",e.gradient);else if(e.type==="image"&&e.imageUrl)t.style.setProperty("--ntd-bg-image",`url("${e.imageUrl}")`),e.imageSize&&t.style.setProperty("--ntd-bg-image-size",e.imageSize),e.imagePosition&&t.style.setProperty("--ntd-bg-image-position",e.imagePosition),e.imageAttachment&&t.style.setProperty("--ntd-bg-image-attachment",e.imageAttachment),e.imageRepeat&&t.style.setProperty("--ntd-bg-image-repeat",e.imageRepeat);else if(e.type==="pattern"&&e.pattern){const r=pc[e.pattern];if(r){const a=`url("data:image/svg+xml,${encodeURIComponent(r)}")`;t.style.setProperty("--ntd-bg-image",a),t.style.setProperty("--ntd-bg-image-repeat","repeat")}}e.opacity!==void 0&&t.style.setProperty("--ntd-bg-image-opacity",String(e.opacity)),e.blendMode&&t.style.setProperty("--ntd-bg-image-blend",e.blendMode)}}function $r(e){const t=e??document.documentElement;for(const r of Object.values(Pr)){t.style.removeProperty(r);const a=zr(r);a&&t.style.removeProperty(a)}for(const r of["--ntd-bg-image","--ntd-bg-image-size","--ntd-bg-image-position","--ntd-bg-image-attachment","--ntd-bg-image-repeat","--ntd-bg-image-opacity","--ntd-bg-image-blend"])t.style.removeProperty(r);delete t.dataset.ntdColorScheme,delete t.dataset.theme,t.classList.remove("nice-dark");for(const r of["sidebar","menu","tree"]){t.style.removeProperty(`--nice-${r}-levels`);for(let a=1;a<=10;a++)t.style.removeProperty(`--nice-${r}-level-${a}-bg`),t.style.removeProperty(`--nice-${r}-level-${a}-text`),t.style.removeProperty(`--nice-${r}-level-${a}-hover-bg`),t.style.removeProperty(`--nice-${r}-level-${a}-active-bg`),t.style.removeProperty(`--nice-${r}-level-${a}-border`)}}function yc(e){const t=e??document.documentElement,r=getComputedStyle(t),a=s=>r.getPropertyValue(s).trim(),n=s=>parseFloat(r.getPropertyValue(s))||0,o=s=>a(s)||void 0;return{name:"Current",colors:{primary:a("--color-primary"),primaryHover:a("--color-primary-hover"),success:a("--color-success"),warning:a("--color-warning"),error:a("--color-error"),info:a("--color-info"),accent:o("--color-accent"),accentHover:o("--color-accent-hover"),link:o("--color-link"),linkHover:o("--color-link-hover"),focus:o("--color-focus"),overlay:o("--color-overlay"),surface:o("--color-surface"),surfaceHover:o("--color-surface-hover"),disabled:o("--color-disabled"),disabledText:o("--color-disabled-text")},backgrounds:{primary:a("--bg-primary"),secondary:a("--bg-secondary"),tertiary:a("--bg-tertiary"),hover:a("--hover-bg"),elevated:o("--bg-elevated"),inset:o("--bg-inset"),canvas:o("--bg-canvas")},text:{primary:a("--text-primary"),secondary:a("--text-secondary"),muted:a("--text-muted"),inverse:o("--text-inverse"),onPrimary:o("--text-on-primary"),onAccent:o("--text-on-accent"),onSuccess:o("--text-on-success"),onError:o("--text-on-error"),onInfo:o("--text-on-info"),onWarning:o("--text-on-warning")},borders:{color:a("--border-color"),radiusSm:a("--nice-radius-sm"),radiusMd:a("--nice-radius-md"),radiusLg:a("--nice-radius-lg"),radiusXl:a("--nice-radius-xl"),radiusFull:a("--nice-radius-full"),width:o("--border-width"),focusColor:o("--border-focus-color"),divider:o("--border-divider")},shadows:{sm:a("--shadow-sm"),md:a("--shadow-md"),lg:a("--shadow-lg"),xl:a("--shadow-xl"),inner:o("--shadow-inner"),glow:o("--shadow-glow")},spacing:{space1:a("--nice-space-1"),space2:a("--nice-space-2"),space3:a("--nice-space-3"),space4:a("--nice-space-4"),space5:a("--nice-space-5"),space6:a("--nice-space-6"),space8:a("--nice-space-8"),space10:o("--nice-space-10"),space12:o("--nice-space-12"),space16:o("--nice-space-16")},typography:{fontFamily:a("--nice-font-family"),fontSizeXs:a("--nice-font-size-xs"),fontSizeSm:a("--nice-font-size-sm"),fontSizeMd:a("--nice-font-size-md"),fontSizeLg:a("--nice-font-size-lg"),fontSizeXl:a("--nice-font-size-xl"),fontWeightNormal:n("--nice-font-weight-normal"),fontWeightMedium:n("--nice-font-weight-medium"),fontWeightSemibold:n("--nice-font-weight-semibold"),fontWeightBold:n("--nice-font-weight-bold"),lineHeight:n("--nice-line-height"),headingFontFamily:o("--nice-heading-font-family"),monoFontFamily:o("--nice-mono-font-family"),fontSize2xl:o("--nice-font-size-2xl"),fontSize3xl:o("--nice-font-size-3xl"),letterSpacing:o("--nice-letter-spacing"),headingLetterSpacing:o("--nice-heading-letter-spacing")},transitions:{fast:a("--nice-transition-fast"),normal:a("--nice-transition"),slow:a("--nice-transition-slow")},darkMode:t.dataset.ntdColorScheme??void 0}}function hc(e){return JSON.stringify(e,null,2)}function bc(e){const t=JSON.parse(e);if(!t||typeof t!="object"||!t.name||!t.colors||!t.backgrounds)throw new Error("Invalid theme format: missing required fields (name, colors, backgrounds)");return t}const Sc=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,vc=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i;function ot(e){if(!e)return null;const t=e.trim();let r=t.match(vc);if(r)return{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)};if(r=t.match(Sc),r)return{r:parseInt(r[1]+r[1],16),g:parseInt(r[2]+r[2],16),b:parseInt(r[3]+r[3],16)};const a=t.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i);return a?{r:+a[1],g:+a[2],b:+a[3]}:null}function xc({r:e,g:t,b:r}){const a=n=>Math.max(0,Math.min(255,Math.round(n))).toString(16).padStart(2,"0");return`#${a(e)}${a(t)}${a(r)}`}function vt(e,t,r){const a=ot(e),n=ot(t);return!a||!n?e:xc({r:a.r+(n.r-a.r)*r,g:a.g+(n.g-a.g)*r,b:a.b+(n.b-a.b)*r})}function it(e,t){return vt(e,"#ffffff",t)}function st(e,t){return vt(e,"#000000",t)}function ct(e){const t=ot(e);if(!t)return 1;const r=a=>{const n=a/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)};return .2126*r(t.r)+.7152*r(t.g)+.0722*r(t.b)}function wc(e,t,r){return ct(e)>.5?r:t}function kc(e,t,r){const a=t.palette??[],n=t.bgStep??.06,o=a[0]??r;switch(t.bgDerivation??"tint"){case"palette":return a.length===0?r:a[(e-1)%a.length];case"shade":return st(o,Math.min(.9,n*(e-1)));case"mix-surface":return vt(o,r,Math.min(1,n*(e-1)));case"tint":default:return it(o,Math.min(.9,n*(e-1)))}}function Cc(e,t,r,a){var s;const n={},o=Math.max(1,Math.min(10,t.levels??5));for(let i=1;i<=o;i++){const c=(s=t.overrides)==null?void 0:s[i],d=(c==null?void 0:c.background)??kc(i,t,r),u=(c==null?void 0:c.text)??wc(d,"#ffffff",a),f=(c==null?void 0:c.hoverBackground)??(ct(d)>.5?st(d,.06):it(d,.08)),h=(c==null?void 0:c.activeBackground)??(ct(d)>.5?st(d,.12):it(d,.16)),b=c==null?void 0:c.border;n[`--nice-${e}-level-${i}-bg`]=d,n[`--nice-${e}-level-${i}-text`]=u,n[`--nice-${e}-level-${i}-hover-bg`]=f,n[`--nice-${e}-level-${i}-active-bg`]=h,b&&(n[`--nice-${e}-level-${i}-border`]=b)}return n[`--nice-${e}-levels`]=String(o),n}const xt=l.createContext(null);function Ec(){const e=l.useContext(xt);if(!e)throw new Error("useNiceTheme must be used within a NiceThemeProvider");return e}const ke={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},Ce={fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.125rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5},Ee={fast:"120ms ease",normal:"200ms ease",slow:"300ms ease"},wt=e=>({color:e,radiusSm:"4px",radiusMd:"6px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"}),Hr={sm:"0 1px 2px rgba(0,0,0,0.05)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"},Nc={sm:"0 1px 2px rgba(0,0,0,0.3)",md:"0 4px 6px -1px rgba(0,0,0,0.4)",lg:"0 10px 15px -3px rgba(0,0,0,0.4)",xl:"0 20px 25px -5px rgba(0,0,0,0.4)"};function R(e,t,r,a,n){return{name:e,darkMode:"light",colors:{...t,surface:t.surface??r.primary,surfaceHover:t.surfaceHover??r.secondary},backgrounds:{...r,elevated:r.elevated??r.primary,inset:r.inset??r.tertiary,canvas:r.canvas??r.primary},text:{...a,inverse:a.inverse??"#ffffff"},borders:wt(n),shadows:Hr,spacing:ke,typography:Ce,transitions:Ee}}function W(e,t,r,a,n){return{name:e,darkMode:"dark",colors:{...t,surface:t.surface??r.secondary,surfaceHover:t.surfaceHover??r.tertiary},backgrounds:{...r,elevated:r.elevated??r.secondary,inset:r.inset??r.primary,canvas:r.canvas??r.primary},text:{...a,inverse:a.inverse??"#0f172a"},borders:wt(n),shadows:Nc,spacing:ke,typography:Ce,transitions:Ee}}const _r=R("Slate",{primary:"#64748b",primaryHover:"#475569",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#1e293b",secondary:"#475569",muted:"#94a3b8"},"#cbd5e1"),Or=R("Zinc",{primary:"#71717a",primaryHover:"#52525b",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fafafa",secondary:"#f4f4f5",tertiary:"#e4e4e7",hover:"#e4e4e7"},{primary:"#18181b",secondary:"#3f3f46",muted:"#a1a1aa"},"#d4d4d8"),Br=R("Stone",{primary:"#78716c",primaryHover:"#57534e",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#fafaf9",secondary:"#f5f5f4",tertiary:"#e7e5e4",hover:"#e7e5e4"},{primary:"#1c1917",secondary:"#44403c",muted:"#a8a29e"},"#d6d3d1"),jr=R("Cool Gray",{primary:"#6b7280",primaryHover:"#4b5563",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#3b82f6"},{primary:"#f9fafb",secondary:"#f3f4f6",tertiary:"#e5e7eb",hover:"#e5e7eb"},{primary:"#111827",secondary:"#374151",muted:"#9ca3af"},"#d1d5db"),Wr=R("Warm Gray",{primary:"#7c7568",primaryHover:"#5c564c",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf9f7",secondary:"#f5f4f0",tertiary:"#e8e6e1",hover:"#e8e6e1"},{primary:"#1f1d19",secondary:"#4a463d",muted:"#a09888"},"#d4d0c8"),Vr=R("Silver",{primary:"#94a3b8",primaryHover:"#64748b",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#38bdf8"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#334155",secondary:"#64748b",muted:"#94a3b8"},"#cbd5e1"),Kr=R("Charcoal",{primary:"#374151",primaryHover:"#1f2937",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f9fafb",secondary:"#f3f4f6",tertiary:"#e5e7eb",hover:"#e5e7eb"},{primary:"#111827",secondary:"#374151",muted:"#6b7280"},"#d1d5db"),Ur=R("Ivory",{primary:"#92876d",primaryHover:"#7a6f55",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fffef7",secondary:"#faf6eb",tertiary:"#f0ead6",hover:"#f0ead6"},{primary:"#2b2517",secondary:"#5c5340",muted:"#9c9280"},"#ddd8c4"),Xr=R("Rose",{primary:"#e11d48",primaryHover:"#be123c",success:"#16a34a",warning:"#ea580c",error:"#dc2626",info:"#0891b2"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#f43f5e"},"#fda4af"),Gr=R("Emerald",{primary:"#059669",primaryHover:"#047857",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#34d399"},"#6ee7b7"),qr=R("Amber",{primary:"#d97706",primaryHover:"#b45309",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0284c7"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#78350f",muted:"#f59e0b"},"#fcd34d"),Yr=R("Violet",{primary:"#7c3aed",primaryHover:"#6d28d9",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f5f3ff",secondary:"#ede9fe",tertiary:"#ddd6fe",hover:"#ede9fe"},{primary:"#2e1065",secondary:"#4c1d95",muted:"#a78bfa"},"#c4b5fd"),Jr=R("Teal",{primary:"#0d9488",primaryHover:"#0f766e",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0fdfa",secondary:"#ccfbf1",tertiary:"#99f6e4",hover:"#ccfbf1"},{primary:"#134e4a",secondary:"#115e59",muted:"#2dd4bf"},"#5eead4"),Qr=R("Indigo",{primary:"#4f46e5",primaryHover:"#4338ca",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#eef2ff",secondary:"#e0e7ff",tertiary:"#c7d2fe",hover:"#e0e7ff"},{primary:"#1e1b4b",secondary:"#312e81",muted:"#818cf8"},"#a5b4fc"),Zr=R("Cyan",{primary:"#0891b2",primaryHover:"#0e7490",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#0284c7"},{primary:"#ecfeff",secondary:"#cffafe",tertiary:"#a5f3fc",hover:"#cffafe"},{primary:"#164e63",secondary:"#155e75",muted:"#22d3ee"},"#67e8f9"),ea=R("Lime",{primary:"#65a30d",primaryHover:"#4d7c0f",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#f7fee7",secondary:"#ecfccb",tertiary:"#d9f99d",hover:"#ecfccb"},{primary:"#1a2e05",secondary:"#365314",muted:"#84cc16"},"#bef264"),ta=R("Pink",{primary:"#db2777",primaryHover:"#be185d",success:"#10b981",warning:"#f59e0b",error:"#dc2626",info:"#06b6d4"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#500724",secondary:"#831843",muted:"#f472b6"},"#f9a8d4"),ra=R("Orange",{primary:"#ea580c",primaryHover:"#c2410c",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#7c2d12",muted:"#fb923c"},"#fdba74"),aa=R("Fuchsia",{primary:"#c026d3",primaryHover:"#a21caf",success:"#10b981",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fdf4ff",secondary:"#fae8ff",tertiary:"#f5d0fe",hover:"#fae8ff"},{primary:"#4a044e",secondary:"#701a75",muted:"#d946ef"},"#e879f9"),na=R("Sky",{primary:"#0284c7",primaryHover:"#0369a1",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#075985",muted:"#38bdf8"},"#7dd3fc"),oa=R("Ruby",{primary:"#be123c",primaryHover:"#9f1239",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#fb7185"},"#fda4af"),ia=R("Coral",{primary:"#f97316",primaryHover:"#ea580c",success:"#10b981",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#9a3412",muted:"#fb923c"},"#fdba74"),sa=W("Midnight",{primary:"#818cf8",primaryHover:"#6366f1",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#020617",secondary:"#0f172a",tertiary:"#1e293b",hover:"#1e293b"},{primary:"#f1f5f9",secondary:"#94a3b8",muted:"#475569"},"#1e293b"),ca=W("Obsidian",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#facc15",error:"#fb7185",info:"#38bdf8"},{primary:"#09090b",secondary:"#18181b",tertiary:"#27272a",hover:"#27272a"},{primary:"#fafafa",secondary:"#a1a1aa",muted:"#52525b"},"#3f3f46"),la=W("Eclipse",{primary:"#c084fc",primaryHover:"#a855f7",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#67e8f9"},{primary:"#0c0a1d",secondary:"#1a1533",tertiary:"#2a2248",hover:"#2a2248"},{primary:"#f5f3ff",secondary:"#a78bfa",muted:"#6d5eac"},"#3b3266"),da=W("Onyx",{primary:"#60a5fa",primaryHover:"#3b82f6",success:"#4ade80",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#000000",secondary:"#0a0a0a",tertiary:"#171717",hover:"#171717"},{primary:"#ffffff",secondary:"#a3a3a3",muted:"#525252"},"#262626"),ua=W("Carbon",{primary:"#38bdf8",primaryHover:"#0ea5e9",success:"#4ade80",warning:"#facc15",error:"#f87171",info:"#67e8f9"},{primary:"#161616",secondary:"#262626",tertiary:"#393939",hover:"#393939"},{primary:"#f4f4f4",secondary:"#c6c6c6",muted:"#6f6f6f"},"#525252"),fa=W("Cosmos",{primary:"#6366f1",primaryHover:"#4f46e5",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#030712",secondary:"#111827",tertiary:"#1f2937",hover:"#1f2937"},{primary:"#e5e7eb",secondary:"#9ca3af",muted:"#4b5563",onPrimary:"#ffffff"},"#374151"),ma=W("Nebula",{primary:"#e879f9",primaryHover:"#d946ef",success:"#4ade80",warning:"#fbbf24",error:"#fb7185",info:"#67e8f9"},{primary:"#0d0117",secondary:"#1a0533",tertiary:"#2d0a52",hover:"#2d0a52"},{primary:"#fae8ff",secondary:"#d8b4fe",muted:"#7c3aed"},"#581c87"),pa=W("Abyss",{primary:"#22d3ee",primaryHover:"#06b6d4",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#38bdf8"},{primary:"#001219",secondary:"#002a3a",tertiary:"#003e54",hover:"#003e54"},{primary:"#e0f2fe",secondary:"#7dd3fc",muted:"#0369a1"},"#075985"),ga=W("Shadow",{primary:"#a3a3a3",primaryHover:"#737373",success:"#4ade80",warning:"#facc15",error:"#f87171",info:"#38bdf8"},{primary:"#171717",secondary:"#1f1f1f",tertiary:"#2a2a2a",hover:"#2a2a2a"},{primary:"#e5e5e5",secondary:"#a3a3a3",muted:"#525252"},"#404040"),ya=W("Emerald Dark",{primary:"#34d399",primaryHover:"#10b981",success:"#4ade80",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#022c22",secondary:"#064e3b",tertiary:"#065f46",hover:"#065f46"},{primary:"#ecfdf5",secondary:"#6ee7b7",muted:"#047857"},"#047857"),ha=R("Forest",{primary:"#166534",primaryHover:"#14532d",success:"#22c55e",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#052e16",secondary:"#166534",muted:"#4ade80"},"#86efac"),ba=R("Ocean",{primary:"#0369a1",primaryHover:"#075985",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#38bdf8"},"#7dd3fc"),Sa=R("Desert",{primary:"#b45309",primaryHover:"#92400e",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fefce8",secondary:"#fef9c3",tertiary:"#fef08a",hover:"#fef9c3"},{primary:"#422006",secondary:"#713f12",muted:"#ca8a04"},"#fde047"),va=R("Sunset",{primary:"#ea580c",primaryHover:"#c2410c",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#9a3412",muted:"#f97316"},"#fdba74"),xa=R("Aurora",{primary:"#0d9488",primaryHover:"#0f766e",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#f0fdfa",secondary:"#ccfbf1",tertiary:"#99f6e4",hover:"#ccfbf1"},{primary:"#134e4a",secondary:"#115e59",muted:"#2dd4bf"},"#5eead4"),wa=R("Lavender",{primary:"#7e22ce",primaryHover:"#6b21a8",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#faf5ff",secondary:"#f3e8ff",tertiary:"#e9d5ff",hover:"#f3e8ff"},{primary:"#3b0764",secondary:"#581c87",muted:"#a855f7"},"#d8b4fe"),ka=R("Autumn",{primary:"#c2410c",primaryHover:"#9a3412",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fef2f2",secondary:"#fee2e2",tertiary:"#fecaca",hover:"#fee2e2"},{primary:"#450a0a",secondary:"#7f1d1d",muted:"#f87171"},"#fca5a5"),Ca=R("Spring",{primary:"#16a34a",primaryHover:"#15803d",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#14532d",secondary:"#166534",muted:"#4ade80"},"#86efac"),Ea=R("Arctic",{primary:"#0ea5e9",primaryHover:"#0284c7",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#7dd3fc"},"#bae6fd"),Na=R("Tropical",{primary:"#0d9488",primaryHover:"#0f766e",success:"#16a34a",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#6ee7b7"},"#a7f3d0"),Aa=R("Pastel Rose",{primary:"#f472b6",primaryHover:"#ec4899",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#831843",secondary:"#9d174d",muted:"#f9a8d4"},"#f9a8d4"),Ma=R("Pastel Sky",{primary:"#38bdf8",primaryHover:"#0ea5e9",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#075985",secondary:"#0369a1",muted:"#7dd3fc"},"#bae6fd"),Ta=R("Pastel Mint",{primary:"#34d399",primaryHover:"#10b981",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#065f46",secondary:"#047857",muted:"#6ee7b7"},"#a7f3d0"),Ia=R("Pastel Peach",{primary:"#fb923c",primaryHover:"#f97316",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#7c2d12",secondary:"#9a3412",muted:"#fdba74"},"#fed7aa"),Ra=R("Pastel Lavender",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f5f3ff",secondary:"#ede9fe",tertiary:"#ddd6fe",hover:"#ede9fe"},{primary:"#4c1d95",secondary:"#5b21b6",muted:"#c4b5fd"},"#ddd6fe"),La=R("Pastel Lemon",{primary:"#facc15",primaryHover:"#eab308",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fefce8",secondary:"#fef9c3",tertiary:"#fef08a",hover:"#fef9c3"},{primary:"#713f12",secondary:"#854d0e",muted:"#fde047"},"#fef08a"),Fa=R("Pastel Sage",{primary:"#86efac",primaryHover:"#4ade80",success:"#22c55e",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#166534",secondary:"#15803d",muted:"#86efac"},"#bbf7d0"),Da=R("Pastel Coral",{primary:"#fb7185",primaryHover:"#f43f5e",success:"#4ade80",warning:"#fcd34d",error:"#ef4444",info:"#67e8f9"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#881337",secondary:"#9f1239",muted:"#fda4af"},"#fecdd3"),Pa=R("Banking",{primary:"#1e3a5f",primaryHover:"#152c4a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#0f172a",secondary:"#334155",muted:"#94a3b8"},"#cbd5e1"),za=R("Healthcare",{primary:"#0891b2",primaryHover:"#0e7490",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0fdfa",secondary:"#e0f7fa",tertiary:"#b2ebf2",hover:"#e0f7fa"},{primary:"#134e4a",secondary:"#1a6b6a",muted:"#80cbc4"},"#b2dfdb"),$a=R("Legal",{primary:"#1e293b",primaryHover:"#0f172a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#fafaf9",secondary:"#f5f5f4",tertiary:"#e7e5e4",hover:"#e7e5e4"},{primary:"#0f172a",secondary:"#44403c",muted:"#a8a29e"},"#d6d3d1"),Ha=R("Tech Startup",{primary:"#7c3aed",primaryHover:"#6d28d9",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#faf5ff",secondary:"#f3e8ff",tertiary:"#e9d5ff",hover:"#f3e8ff"},{primary:"#1e1b4b",secondary:"#4c1d95",muted:"#a78bfa"},"#c4b5fd"),_a=R("Enterprise",{primary:"#1e40af",primaryHover:"#1e3a8a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#eff6ff",secondary:"#dbeafe",tertiary:"#bfdbfe",hover:"#dbeafe"},{primary:"#1e3a5f",secondary:"#1e40af",muted:"#60a5fa"},"#93c5fd"),Oa=R("Government",{primary:"#1d4ed8",primaryHover:"#1e40af",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#0f172a",secondary:"#1e293b",muted:"#64748b"},"#cbd5e1"),Ba=R("Education",{primary:"#059669",primaryHover:"#047857",success:"#16a34a",warning:"#f59e0b",error:"#ef4444",info:"#0891b2"},{primary:"#f0fdf9",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#6ee7b7"},"#a7f3d0"),ja=R("Real Estate",{primary:"#92400e",primaryHover:"#78350f",success:"#059669",warning:"#b45309",error:"#dc2626",info:"#0891b2"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#422006",secondary:"#713f12",muted:"#d97706"},"#fcd34d"),Wa=R("Nord",{primary:"#5e81ac",primaryHover:"#4c6b90",success:"#a3be8c",warning:"#ebcb8b",error:"#bf616a",info:"#88c0d0"},{primary:"#eceff4",secondary:"#e5e9f0",tertiary:"#d8dee9",hover:"#d8dee9"},{primary:"#2e3440",secondary:"#3b4252",muted:"#4c566a"},"#d8dee9"),Va=W("Dracula",{primary:"#bd93f9",primaryHover:"#9d79d9",success:"#50fa7b",warning:"#f1fa8c",error:"#ff5555",info:"#8be9fd"},{primary:"#282a36",secondary:"#343746",tertiary:"#44475a",hover:"#44475a"},{primary:"#f8f8f2",secondary:"#c0c0c0",muted:"#6272a4"},"#44475a"),Ka=R("Solarized Light",{primary:"#268bd2",primaryHover:"#1a6da0",success:"#859900",warning:"#b58900",error:"#dc322f",info:"#2aa198"},{primary:"#fdf6e3",secondary:"#eee8d5",tertiary:"#e0dbc7",hover:"#eee8d5"},{primary:"#073642",secondary:"#586e75",muted:"#93a1a1"},"#eee8d5"),Ua=W("Solarized Dark",{primary:"#268bd2",primaryHover:"#3d98db",success:"#859900",warning:"#b58900",error:"#dc322f",info:"#2aa198"},{primary:"#002b36",secondary:"#073642",tertiary:"#0a4858",hover:"#073642"},{primary:"#eee8d5",secondary:"#93a1a1",muted:"#586e75",onError:"#ffffff"},"#073642"),Xa=W("Monokai",{primary:"#66d9ef",primaryHover:"#45c0d6",success:"#a6e22e",warning:"#e6db74",error:"#f92672",info:"#66d9ef"},{primary:"#272822",secondary:"#34352e",tertiary:"#3e3d32",hover:"#3e3d32"},{primary:"#f8f8f2",secondary:"#cfcfc2",muted:"#75715e"},"#3e3d32"),Ga=W("One Dark",{primary:"#61afef",primaryHover:"#4b9ee0",success:"#98c379",warning:"#e5c07b",error:"#e06c75",info:"#56b6c2"},{primary:"#282c34",secondary:"#2c313a",tertiary:"#353b45",hover:"#353b45"},{primary:"#abb2bf",secondary:"#828997",muted:"#545862"},"#3e4452"),qa=W("Synthwave",{primary:"#ff7edb",primaryHover:"#e660c2",success:"#72f1b8",warning:"#fede5d",error:"#fe4450",info:"#36f9f6"},{primary:"#241b2f",secondary:"#2d2140",tertiary:"#362a50",hover:"#362a50"},{primary:"#f0e4fc",secondary:"#b4a0cc",muted:"#6c5c84"},"#4a3866"),Ya=R("Vaporwave",{primary:"#ff71ce",primaryHover:"#e655b5",success:"#78dcca",warning:"#ffb86c",error:"#ff5555",info:"#76e8fc"},{primary:"#fce4f7",secondary:"#e8d0f4",tertiary:"#d4bcf0",hover:"#e8d0f4"},{primary:"#4a1a4e",secondary:"#7b3f7d",muted:"#c080c0"},"#d8a8e8"),Ja=W("Terminal Green",{primary:"#00ff41",primaryHover:"#00cc34",success:"#00ff41",warning:"#ffff00",error:"#ff0000",info:"#00ffff"},{primary:"#0a0a0a",secondary:"#0d1a0d",tertiary:"#1a2e1a",hover:"#1a2e1a"},{primary:"#00ff41",secondary:"#00cc33",muted:"#008822"},"#003300"),Qa=R("Sepia",{primary:"#8b6914",primaryHover:"#704f10",success:"#6b8e23",warning:"#cd853f",error:"#b22222",info:"#5f9ea0"},{primary:"#faf0e6",secondary:"#f5e6d3",tertiary:"#eddcc7",hover:"#f5e6d3"},{primary:"#3e2723",secondary:"#5d4037",muted:"#a1887f"},"#d7ccc8"),Za=R("Vintage",{primary:"#8d6e63",primaryHover:"#6d4c41",success:"#66bb6a",warning:"#ffb300",error:"#e53935",info:"#29b6f6"},{primary:"#efebe9",secondary:"#d7ccc8",tertiary:"#bcaaa4",hover:"#d7ccc8"},{primary:"#3e2723",secondary:"#5d4037",muted:"#a1887f"},"#bcaaa4"),en=W("Cyberpunk",{primary:"#00f0ff",primaryHover:"#00c8d4",success:"#39ff14",warning:"#ffff00",error:"#ff003c",info:"#bf00ff"},{primary:"#0a0e17",secondary:"#131824",tertiary:"#1c2333",hover:"#1c2333"},{primary:"#e0fbfc",secondary:"#80d4dd",muted:"#3a6b72",onInfo:"#ffffff"},"#1c3a44"),tn=W("Neon",{primary:"#ff00ff",primaryHover:"#cc00cc",success:"#00ff00",warning:"#ffff00",error:"#ff0000",info:"#00ffff"},{primary:"#0d0d0d",secondary:"#1a1a1a",tertiary:"#262626",hover:"#262626"},{primary:"#ffffff",secondary:"#cccccc",muted:"#666666"},"#333333"),rn=W("Retrowave",{primary:"#f77fbe",primaryHover:"#e462a3",success:"#72f1b8",warning:"#ffe261",error:"#ff4444",info:"#79e8fb"},{primary:"#1b0a2e",secondary:"#261440",tertiary:"#321e52",hover:"#321e52"},{primary:"#ffe6f7",secondary:"#c9a0c9",muted:"#6b4c7a"},"#4a2d66"),an=R("Christmas",{primary:"#c41e3a",primaryHover:"#a01830",success:"#228b22",warning:"#ffd700",error:"#dc2626",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fde8e8",tertiary:"#f8d0d0",hover:"#fde8e8"},{primary:"#3b0a0a",secondary:"#7f1d1d",muted:"#dc6868"},"#e8a0a0"),nn=W("Halloween",{primary:"#ff6600",primaryHover:"#e05500",success:"#4ade80",warning:"#fbbf24",error:"#ff0000",info:"#9333ea"},{primary:"#1a0a00",secondary:"#2d1500",tertiary:"#402000",hover:"#402000"},{primary:"#ffedd5",secondary:"#fdba74",muted:"#9a5c28",onInfo:"#ffffff"},"#5c3400"),on=R("Valentine",{primary:"#e11d48",primaryHover:"#be123c",success:"#10b981",warning:"#f59e0b",error:"#dc2626",info:"#ec4899"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#f9a8d4"},"#fda4af"),sn=R("Easter",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fef9ff",secondary:"#f3e8ff",tertiary:"#e8d5ff",hover:"#f3e8ff"},{primary:"#581c87",secondary:"#6d28d9",muted:"#c4b5fd"},"#ddd6fe"),cn=R("Summer Beach",{primary:"#0ea5e9",primaryHover:"#0284c7",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#7dd3fc"},"#fcd34d"),ln=R("Winter Frost",{primary:"#3b82f6",primaryHover:"#2563eb",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#1e3a5f",secondary:"#1e40af",muted:"#93c5fd"},"#bfdbfe"),dn=R("Cherry Blossom",{primary:"#ec4899",primaryHover:"#db2777",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#831843",secondary:"#9d174d",muted:"#f9a8d4"},"#fbcfe8"),un=R("Harvest",{primary:"#b45309",primaryHover:"#92400e",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#78350f",muted:"#d97706"},"#fcd34d"),fn=R("Japanese Zen",{primary:"#6b7280",primaryHover:"#4b5563",success:"#6b8e23",warning:"#d4a017",error:"#c0392b",info:"#5f9ea0"},{primary:"#faf9f6",secondary:"#f0ece3",tertiary:"#e6e0d4",hover:"#f0ece3"},{primary:"#2c2c2c",secondary:"#5c5c5c",muted:"#a0998a"},"#d5cec0"),mn=R("Moroccan",{primary:"#c2410c",primaryHover:"#9a3412",success:"#15803d",warning:"#ca8a04",error:"#b91c1c",info:"#0e7490"},{primary:"#fffbf0",secondary:"#fef3e0",tertiary:"#fde6c4",hover:"#fef3e0"},{primary:"#3a1a00",secondary:"#7c2d12",muted:"#d97706"},"#f5d0a0"),pn=R("Scandinavian",{primary:"#4b5563",primaryHover:"#374151",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#ffffff",secondary:"#f9fafb",tertiary:"#f3f4f6",hover:"#f3f4f6"},{primary:"#111827",secondary:"#374151",muted:"#9ca3af"},"#e5e7eb"),gn=R("Mediterranean",{primary:"#1e40af",primaryHover:"#1e3a8a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#eff6ff",secondary:"#dbeafe",tertiary:"#bfdbfe",hover:"#dbeafe"},{primary:"#1e3a5f",secondary:"#2563eb",muted:"#93c5fd"},"#bfdbfe"),yn=R("Chinese New Year",{primary:"#dc2626",primaryHover:"#b91c1c",success:"#16a34a",warning:"#d4a017",error:"#ef4444",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fee2e2",tertiary:"#fecaca",hover:"#fee2e2"},{primary:"#450a0a",secondary:"#991b1b",muted:"#f87171"},"#fca5a5"),hn=R("Indian Festive",{primary:"#d97706",primaryHover:"#b45309",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#7c3aed"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#92400e",muted:"#f59e0b"},"#fcd34d"),bn=R("Brazilian Carnival",{primary:"#16a34a",primaryHover:"#15803d",success:"#22c55e",warning:"#facc15",error:"#ef4444",info:"#0ea5e9"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#052e16",secondary:"#166534",muted:"#4ade80"},"#86efac"),Sn=R("African Earth",{primary:"#92400e",primaryHover:"#78350f",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf5f0",secondary:"#f0e6d6",tertiary:"#e6d5bb",hover:"#f0e6d6"},{primary:"#2b1a0e",secondary:"#5c3d1e",muted:"#a08060"},"#d4b896"),vn=W("High Contrast Dark",{primary:"#ffff00",primaryHover:"#cccc00",success:"#00ff00",warning:"#ff8c00",error:"#ff0000",info:"#00ffff"},{primary:"#000000",secondary:"#1a1a1a",tertiary:"#333333",hover:"#333333"},{primary:"#ffffff",secondary:"#ffffff",muted:"#cccccc"},"#ffffff"),xn=R("Monochrome",{primary:"#404040",primaryHover:"#262626",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fafafa",secondary:"#f0f0f0",tertiary:"#e0e0e0",hover:"#e0e0e0"},{primary:"#1a1a1a",secondary:"#404040",muted:"#808080"},"#c0c0c0"),wn=R("Enhanced Contrast",{primary:"#0050b3",primaryHover:"#003d8c",success:"#006400",warning:"#cc7000",error:"#cc0000",info:"#006680"},{primary:"#ffffff",secondary:"#f5f5f5",tertiary:"#ebebeb",hover:"#ebebeb"},{primary:"#000000",secondary:"#1a1a1a",muted:"#595959"},"#8c8c8c"),kn={name:"Large Text",darkMode:"light",colors:{primary:"#2563eb",primaryHover:"#1d4ed8",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2",surface:"#ffffff",surfaceHover:"#f8fafc"},backgrounds:{primary:"#ffffff",secondary:"#f8fafc",tertiary:"#f1f5f9",hover:"#f1f5f9",elevated:"#ffffff",inset:"#f1f5f9",canvas:"#ffffff"},text:{primary:"#0f172a",secondary:"#475569",muted:"#94a3b8",inverse:"#ffffff"},borders:wt("#e2e8f0"),shadows:Hr,spacing:{space1:"6px",space2:"12px",space3:"16px",space4:"20px",space5:"24px",space6:"32px",space8:"40px"},typography:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontSizeXs:"0.875rem",fontSizeSm:"1rem",fontSizeMd:"1.125rem",fontSizeLg:"1.25rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.6},transitions:Ee},Cn={name:"Glassmorphism",darkMode:"light",colors:{primary:"#6366f1",primaryHover:"#4f46e5",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4",surface:"rgba(255,255,255,0.7)",surfaceHover:"rgba(255,255,255,0.5)"},backgrounds:{primary:"rgba(255,255,255,0.7)",secondary:"rgba(255,255,255,0.5)",tertiary:"rgba(255,255,255,0.3)",hover:"rgba(255,255,255,0.5)",elevated:"rgba(255,255,255,0.8)",inset:"rgba(255,255,255,0.3)",canvas:"rgba(255,255,255,0.7)"},text:{primary:"#1e293b",secondary:"#475569",muted:"#94a3b8",inverse:"#ffffff"},borders:{color:"rgba(255,255,255,0.3)",radiusSm:"8px",radiusMd:"12px",radiusLg:"16px",radiusXl:"24px",radiusFull:"9999px"},shadows:{sm:"0 2px 8px rgba(0,0,0,0.04)",md:"0 4px 16px rgba(0,0,0,0.08)",lg:"0 8px 32px rgba(0,0,0,0.12)",xl:"0 16px 48px rgba(0,0,0,0.16)"},spacing:ke,typography:Ce,transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},En={name:"Neumorphism Light",darkMode:"light",colors:{primary:"#6366f1",primaryHover:"#4f46e5",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4",surface:"#e0e5ec",surfaceHover:"#d5dae2"},backgrounds:{primary:"#e0e5ec",secondary:"#d5dae2",tertiary:"#ccd1d9",hover:"#d5dae2",elevated:"#e0e5ec",inset:"#ccd1d9",canvas:"#e0e5ec"},text:{primary:"#2d3748",secondary:"#4a5568",muted:"#718096",inverse:"#ffffff"},borders:{color:"#d0d5dd",radiusSm:"8px",radiusMd:"12px",radiusLg:"16px",radiusXl:"20px",radiusFull:"9999px"},shadows:{sm:"3px 3px 6px #b8bec7, -3px -3px 6px #ffffff",md:"5px 5px 10px #b8bec7, -5px -5px 10px #ffffff",lg:"8px 8px 16px #b8bec7, -8px -8px 16px #ffffff",xl:"12px 12px 24px #b8bec7, -12px -12px 24px #ffffff"},spacing:ke,typography:Ce,transitions:Ee},Nn={name:"Neumorphism Dark",darkMode:"dark",colors:{primary:"#818cf8",primaryHover:"#6366f1",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#22d3ee",surface:"#283141",surfaceHover:"#232b3a"},backgrounds:{primary:"#2d3748",secondary:"#283141",tertiary:"#232b3a",hover:"#283141",elevated:"#283141",inset:"#2d3748",canvas:"#2d3748"},text:{primary:"#e2e8f0",secondary:"#a0aec0",muted:"#718096",inverse:"#0f172a"},borders:{color:"#3a4556",radiusSm:"8px",radiusMd:"12px",radiusLg:"16px",radiusXl:"20px",radiusFull:"9999px"},shadows:{sm:"3px 3px 6px #1a202c, -3px -3px 6px #404d64",md:"5px 5px 10px #1a202c, -5px -5px 10px #404d64",lg:"8px 8px 16px #1a202c, -8px -8px 16px #404d64",xl:"12px 12px 24px #1a202c, -12px -12px 24px #404d64"},spacing:ke,typography:Ce,transitions:Ee},An=R("Minimalist",{primary:"#18181b",primaryHover:"#27272a",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#3b82f6"},{primary:"#ffffff",secondary:"#fafafa",tertiary:"#f5f5f5",hover:"#f5f5f5"},{primary:"#0a0a0a",secondary:"#404040",muted:"#a3a3a3"},"#e5e5e5"),Mn=W("Warm Dark",{primary:"#f59e0b",primaryHover:"#d97706",success:"#10b981",warning:"#fbbf24",error:"#f87171",info:"#38bdf8"},{primary:"#1c1917",secondary:"#292524",tertiary:"#44403c",hover:"#44403c"},{primary:"#fafaf9",secondary:"#d6d3d1",muted:"#78716c"},"#57534e"),Tn=W("Soft Dark",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#34d399",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#1e1e2e",secondary:"#262637",tertiary:"#313147",hover:"#313147"},{primary:"#e8e8f0",secondary:"#a0a0b8",muted:"#5c5c74"},"#3e3e58"),In=R("Coffee",{primary:"#6f4e37",primaryHover:"#5c3d28",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf6f1",secondary:"#f0e8dc",tertiary:"#e6d8c6",hover:"#f0e8dc"},{primary:"#2c1a0e",secondary:"#5c3d28",muted:"#a08868"},"#d4c4a8"),Rn=R("Wine",{primary:"#7f1d1d",primaryHover:"#641717",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fde8e8",tertiary:"#f8d0d0",hover:"#fde8e8"},{primary:"#3b0a0a",secondary:"#7f1d1d",muted:"#dc6868"},"#e8a0a0"),Ln=[_r,Or,Br,jr,Wr,Vr,Kr,Ur,Xr,Gr,qr,Yr,Jr,Qr,Zr,ea,ta,ra,aa,na,oa,ia,sa,ca,la,da,ua,fa,ma,pa,ga,ya,ha,ba,Sa,va,xa,wa,ka,Ca,Ea,Na,Aa,Ma,Ta,Ia,Ra,La,Fa,Da,Pa,za,$a,Ha,_a,Oa,Ba,ja,Wa,Va,Ka,Ua,Xa,Ga,qa,Ya,Ja,Qa,Za,en,tn,rn,an,nn,on,sn,cn,ln,dn,un,fn,mn,pn,gn,yn,hn,bn,Sn,vn,xn,wn,kn,Cn,En,Nn,An,Mn,Tn,In,Rn],ce={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},je={fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.125rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5},Ne={color:"#e2e8f0",radiusSm:"4px",radiusMd:"6px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"},Ae={fast:"120ms ease",normal:"200ms ease",slow:"300ms ease"},kt={name:"Light",darkMode:"light",colors:{primary:"#2563eb",primaryHover:"#1d4ed8",success:"#047857",warning:"#f59e0b",error:"#dc2626",info:"#0e7490",surface:"#ffffff",surfaceHover:"#f8fafc"},backgrounds:{primary:"#ffffff",secondary:"#f8fafc",tertiary:"#f1f5f9",hover:"#f1f5f9",elevated:"#ffffff",inset:"#f1f5f9",canvas:"#f8fafc"},text:{primary:"#0f172a",secondary:"#475569",muted:"#64748b",inverse:"#ffffff"},borders:Ne,shadows:{sm:"0 1px 2px rgba(0,0,0,0.05)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"},spacing:ce,typography:je,transitions:Ae},Fn=(function(){return{name:"Dark",darkMode:"dark",colors:{primary:"#3b82f6",primaryHover:"#60a5fa",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4",surface:"#141414",surfaceHover:"#1e1e1e"},backgrounds:{primary:"#0a0a0a",secondary:"#141414",tertiary:"#1e1e1e",hover:"#1a1a1a",elevated:"#141414",inset:"#0a0a0a",canvas:"#0a0a0a"},text:{primary:"#ffffff",secondary:"#a1a1a1",muted:"#858585",inverse:"#0f172a"},borders:{...Ne,color:"#2a2a2a"},shadows:{sm:"0 1px 2px rgba(0,0,0,0.5)",md:"0 4px 6px -1px rgba(0,0,0,0.6)",lg:"0 10px 15px -3px rgba(0,0,0,0.6)",xl:"0 20px 25px -5px rgba(0,0,0,0.6)"},spacing:ce,typography:je,transitions:Ae}})(),Dn=(function(){return{name:"Blue",colors:{primary:"#1d4ed8",primaryHover:"#1e40af",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2",surface:"#eff6ff",surfaceHover:"#dbeafe"},backgrounds:{primary:"#eff6ff",secondary:"#dbeafe",tertiary:"#bfdbfe",hover:"#dbeafe",elevated:"#ffffff",inset:"#dbeafe",canvas:"#eff6ff"},text:{primary:"#1e3a5f",secondary:"#3b628a",muted:"#7da0c4",inverse:"#ffffff"},borders:{...Ne,color:"#93c5fd"},shadows:{sm:"0 1px 2px rgba(29,78,216,0.08)",md:"0 4px 6px -1px rgba(29,78,216,0.12)",lg:"0 10px 15px -3px rgba(29,78,216,0.15)",xl:"0 20px 25px -5px rgba(29,78,216,0.18)"},spacing:ce,typography:je,transitions:Ae}})(),Pn=(function(){return{name:"High Contrast",colors:{primary:"#0000ff",primaryHover:"#0000cc",success:"#008000",warning:"#ff8c00",error:"#ff0000",info:"#008b8b",surface:"#ffffff",surfaceHover:"#f0f0f0"},backgrounds:{primary:"#ffffff",secondary:"#f0f0f0",tertiary:"#e0e0e0",hover:"#e0e0e0",elevated:"#ffffff",inset:"#e0e0e0",canvas:"#ffffff"},text:{primary:"#000000",secondary:"#1a1a1a",muted:"#4d4d4d",inverse:"#ffffff"},borders:{...Ne,color:"#000000"},shadows:{sm:"0 1px 2px rgba(0,0,0,0.15)",md:"0 4px 6px rgba(0,0,0,0.2)",lg:"0 10px 15px rgba(0,0,0,0.25)",xl:"0 20px 25px rgba(0,0,0,0.3)"},spacing:ce,typography:je,transitions:Ae}})(),zn=(function(){return{name:"Material",colors:{primary:"#6750a4",primaryHover:"#4f378b",success:"#386a20",warning:"#7c5800",error:"#ba1a1a",info:"#00629e",surface:"#fffbfe",surfaceHover:"#f6edff"},backgrounds:{primary:"#fffbfe",secondary:"#f6edff",tertiary:"#ece6f0",hover:"#eaddff",elevated:"#ffffff",inset:"#ece6f0",canvas:"#fffbfe"},text:{primary:"#1c1b1f",secondary:"#49454f",muted:"#79747e",inverse:"#ffffff"},borders:{...Ne,color:"#cac4d0",radiusSm:"8px",radiusMd:"12px",radiusLg:"16px",radiusXl:"28px",radiusFull:"9999px"},shadows:{sm:"0 1px 2px rgba(0,0,0,0.3), 0 1px 3px rgba(0,0,0,0.15)",md:"0 1px 2px rgba(0,0,0,0.3), 0 2px 6px 2px rgba(0,0,0,0.15)",lg:"0 4px 8px 3px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.3)",xl:"0 6px 10px 4px rgba(0,0,0,0.15), 0 2px 3px rgba(0,0,0,0.3)"},spacing:ce,typography:{fontFamily:"'Roboto', 'Noto Sans', system-ui, sans-serif",fontSizeXs:"0.6875rem",fontSizeSm:"0.75rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.375rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5},transitions:{fast:"100ms cubic-bezier(0.2,0,0,1)",normal:"200ms cubic-bezier(0.2,0,0,1)",slow:"300ms cubic-bezier(0.2,0,0,1)"}}})(),$n={name:"Bootstrap",colors:{primary:"#0d6efd",primaryHover:"#0b5ed7",success:"#198754",warning:"#ffc107",error:"#dc3545",info:"#0dcaf0",surface:"#ffffff",surfaceHover:"#f8f9fa"},backgrounds:{primary:"#ffffff",secondary:"#f8f9fa",tertiary:"#e9ecef",hover:"#e9ecef",elevated:"#ffffff",inset:"#e9ecef",canvas:"#f8f9fa"},text:{primary:"#212529",secondary:"#6c757d",muted:"#adb5bd",inverse:"#ffffff"},borders:{color:"#dee2e6",radiusSm:"4px",radiusMd:"6px",radiusLg:"8px",radiusXl:"16px",radiusFull:"50rem"},shadows:{sm:"0 0.125rem 0.25rem rgba(0,0,0,0.075)",md:"0 0.5rem 1rem rgba(0,0,0,0.15)",lg:"0 1rem 3rem rgba(0,0,0,0.175)",xl:"0 1rem 3rem rgba(0,0,0,0.25)"},spacing:ce,typography:{fontFamily:"system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', sans-serif",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.25rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5},transitions:Ae},Hn={name:"Fluent",colors:{primary:"#0078d4",primaryHover:"#106ebe",success:"#107c10",warning:"#fce100",error:"#d13438",info:"#00b7c3",surface:"#ffffff",surfaceHover:"#faf9f8"},backgrounds:{primary:"#ffffff",secondary:"#faf9f8",tertiary:"#f3f2f1",hover:"#edebe9",elevated:"#ffffff",inset:"#f3f2f1",canvas:"#faf9f8"},text:{primary:"#323130",secondary:"#605e5c",muted:"#a19f9d",inverse:"#ffffff"},borders:{color:"#e1dfdd",radiusSm:"2px",radiusMd:"4px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"},shadows:{sm:"0 1.6px 3.6px 0 rgba(0,0,0,0.132), 0 0.3px 0.9px 0 rgba(0,0,0,0.108)",md:"0 3.2px 7.2px 0 rgba(0,0,0,0.132), 0 0.6px 1.8px 0 rgba(0,0,0,0.108)",lg:"0 6.4px 14.4px 0 rgba(0,0,0,0.132), 0 1.2px 3.6px 0 rgba(0,0,0,0.108)",xl:"0 25.6px 57.6px 0 rgba(0,0,0,0.22), 0 4.8px 14.4px 0 rgba(0,0,0,0.18)"},spacing:ce,typography:{fontFamily:"'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, sans-serif",fontSizeXs:"10px",fontSizeSm:"12px",fontSizeMd:"14px",fontSizeLg:"16px",fontSizeXl:"20px",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.42857},transitions:{fast:"100ms cubic-bezier(0.1,0.9,0.2,1)",normal:"200ms cubic-bezier(0.1,0.9,0.2,1)",slow:"300ms cubic-bezier(0.1,0.9,0.2,1)"}},lt=(function(){return[kt,Fn,Dn,Pn,zn,$n,Hn,...Ln]})(),Ac=["primary","primary-hover","primary-light","primary-bg","success","warning","error","info","accent","surface","surface-hover"];function Mc(e,t){return e??t.recommendedDisplayStyle??"default"}function Gt(e){return e.toLowerCase().replace(/[\s_-]+/g,"")}function qt(e){if(e&&typeof e=="object")return e;if(typeof e=="string"){const t=Gt(e),r=lt.find(a=>Gt(a.name)===t);if(r)return r;process.env.NODE_ENV!=="production"&&console.warn(`[@nice2dev/ui] <NiceThemeProvider theme="${e}"> — unknown preset name. Falling back to 'Light'. Available: ${lt.map(a=>a.name).join(", ")}.`)}return kt}const Ct=({theme:e,darkTheme:t,variantConfig:r,darkMode:a,displayStyle:n,animateTransitions:o=!0,children:s})=>{const i=l.useMemo(()=>qt(e),[e]),c=l.useMemo(()=>t===void 0?void 0:qt(t),[t]),d=l.useId(),u=l.useMemo(()=>`p${d.replace(/:/g,"")}`,[d]),f=l.useRef(null),h=l.useRef(null),[b,p]=l.useState(null),[m,g]=l.useState(i),[S,y]=l.useState(!1),[v,k]=l.useState(()=>Mc(n,i));l.useEffect(()=>{n!==void 0?k(n):i.recommendedDisplayStyle&&k(i.recommendedDisplayStyle)},[n,i.recommendedDisplayStyle]),l.useEffect(()=>{const T=window.matchMedia("(prefers-color-scheme: dark)");y(T.matches);const D=F=>y(F.matches);return T.addEventListener("change",D),()=>T.removeEventListener("change",D)},[]);const E=a??i.darkMode??"light",w=E==="dark"||E==="auto"&&S;l.useEffect(()=>{g(w&&c?c:i)},[i,c,w]),l.useEffect(()=>{if(typeof document>"u")return;const T=document.createElement("div");return T.className="nice-theme-scope nice-theme-portal-host",T.dataset.ntdProvider=u,T.style.display="contents",document.body.appendChild(T),h.current=T,p(T),()=>{T.parentNode&&T.parentNode.removeChild(T),h.current=null,p(null)}},[u]),l.useEffect(()=>{const T=f.current;if(!T)return;o&&(T.style.transition="background-color 300ms ease, color 300ms ease");const D=ze(m);for(const[L,O]of Object.entries(D))T.style.setProperty(L,O);const F=h.current;if(F)for(const[L,O]of Object.entries(D))F.style.setProperty(L,O);T.style.colorScheme=w?"dark":"light",T.dataset.ntdColorScheme=w?"dark":"light",T.dataset.theme=w?"dark":"light",w?T.classList.add("nice-dark"):T.classList.remove("nice-dark"),F&&(F.style.colorScheme=w?"dark":"light",F.dataset.ntdColorScheme=w?"dark":"light",F.dataset.theme=w?"dark":"light",w?F.classList.add("nice-dark"):F.classList.remove("nice-dark"));const P=m.backgroundImage;return P&&P.type!=="none"&&P.type==="gradient"&&P.gradient&&T.style.setProperty("--ntd-bg-image",P.gradient),()=>{T&&$r(T)}},[m,w,o,b]);const C=l.useRef(new Set);l.useEffect(()=>{if(process.env.NODE_ENV==="production"||typeof window>"u"||typeof document>"u")return;const T=window.setTimeout(()=>{const D=ze(m),F=["--color-primary","--nice-primary","--bg-primary","--text-primary"].find(V=>D[V])??Object.keys(D)[0];if(!F)return;const P=String(D[F]??"").trim();if(!P)return;const L=getComputedStyle(document.documentElement).getPropertyValue(F).trim();if(!L||L===P)return;const O=`${u}::${m.name??"unnamed"}::${F}`;C.current.has(O)||(C.current.add(O),console.warn(`[NiceThemeProvider] CSS var "${F}" on documentElement (${L}) does not match the active provider pack "${m.name??"unnamed"}" (${P}). An external applyTheme(...) call (or other code) is overriding the provider — portaled overlays and components reading from :root will look inconsistent. Either remove the external applyTheme call or wrap your app entirely in a single NiceThemeProvider.`))},0);return()=>window.clearTimeout(T)},[m,u]);const A=l.useRef(!1);l.useEffect(()=>{if(process.env.NODE_ENV==="production"||A.current||typeof window>"u"||typeof document>"u")return;const T=window.setTimeout(()=>{const D=getComputedStyle(document.documentElement);if(!D.getPropertyValue("--nice-overlay-8").trim())return;const F=Ac.filter(P=>!D.getPropertyValue(`--nice-${P}`).trim()&&!D.getPropertyValue(`--nice-color-${P}`).trim());F.length!==0&&(A.current=!0,console.warn(`[NiceThemeProvider] ${F.map(P=>`--nice-${P} / --nice-color-${P}`).join(", ")} resolve to nothing on :root, so dropdowns, dialogs and anything else outside this provider fall back to their built-in colours. Usually an alias cycle in your CSS: the stylesheet already points each --nice-<name> at --nice-color-<name>, so declaring --nice-color-<name> in terms of --nice-<name> closes a loop. Set the --nice-color-* tokens to real values (or use the theme) instead.`))},0);return()=>window.clearTimeout(T)},[m]),l.useEffect(()=>{const T=f.current;if(!T)return;const D=r?{...Y,...r}:Se(v);ht(D,T,u);const F=pr(v);for(const[P,L]of Object.entries(F))T.setAttribute(P,L);return()=>{fr(u,T)}},[r,v,u]);const M=l.useCallback(T=>{g(T)},[]),I=l.useMemo(()=>({theme:m,setTheme:M,portalTarget:b}),[m,M,b]),$=l.useMemo(()=>({displayStyle:v,variantConfig:Se(v),setDisplayStyle:k}),[v]);return x.jsx(xt.Provider,{value:I,children:x.jsx(Be.Provider,{value:$,children:x.jsx("div",{ref:f,className:"nice-theme-scope","data-ntd-provider":u,style:{display:"contents"},children:s})})})};process.env.NODE_ENV!=="production"&&(Ct.displayName="NiceThemeProvider");function Tc(...e){return e.join("-")}const Ic={button:e=>e?`nice-button-${e}`:"nice-button",textInput:e=>e?`nice-text-input-${e}`:"nice-text-input",numberInput:e=>e?`nice-number-input-${e}`:"nice-number-input",select:e=>e?`nice-select-${e}`:"nice-select",checkbox:e=>e?`nice-checkbox-${e}`:"nice-checkbox",toggle:e=>e?`nice-toggle-${e}`:"nice-toggle",datePicker:e=>e?`nice-date-picker-${e}`:"nice-date-picker",dataGrid:e=>e?`nice-datagrid-${e}`:"nice-datagrid",table:e=>e?`nice-table-${e}`:"nice-table",list:e=>e?`nice-list-${e}`:"nice-list",treeView:e=>e?`nice-tree-${e}`:"nice-tree",modal:e=>e?`nice-modal-${e}`:"nice-modal",drawer:e=>e?`nice-drawer-${e}`:"nice-drawer",form:e=>e?`nice-form-${e}`:"nice-form",tabs:e=>e?`nice-tabs-${e}`:"nice-tabs",menu:e=>e?`nice-menu-${e}`:"nice-menu",chart:e=>e?`nice-chart-${e}`:"nice-chart",scheduler:e=>e?`nice-scheduler-${e}`:"nice-scheduler"},_n=({children:e,theme:t,direction:r="ltr",t:a})=>{let n=l.createElement("div",{dir:r,"data-testid":"nice-test-root",style:{direction:r}},e);return a&&(n=l.createElement(j.NiceI18nLazyProvider,{t:a,children:n})),t&&(n=l.createElement(Ct,{theme:t,children:n})),n};process.env.NODE_ENV!=="production"&&(_n.displayName="NiceTestWrapper");function Rc(e,t,r){const a=new KeyboardEvent("keydown",{key:t,bubbles:!0,cancelable:!0,...r});e.dispatchEvent(a)}function Lc(e,t){var a,n;const r=((a=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:a.set)||((n=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value"))==null?void 0:n.set);r&&r.call(e,t),e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0}))}function Fc(e){const{data:t,delay:r=0,keyField:a="id"}=e;let n=[...t];return{key:a,load:async()=>(r>0&&await new Promise(o=>setTimeout(o,r)),{data:[...n],totalCount:n.length}),insert:async o=>(n.push(o),o),update:async(o,s)=>{const i=n.findIndex(c=>c[a]===o);i>=0&&(n[i]={...n[i],...s})},remove:async o=>{n=n.filter(s=>s[a]!==o)},getData:()=>[...n],reset:()=>{n=[...t]}}}function Dc(e){const t=[];return e.querySelectorAll('button, input, select, textarea, [role="button"], [role="link"], [role="checkbox"], [role="radio"]').forEach(o=>{var i;o.getAttribute("aria-label")||o.getAttribute("aria-labelledby")||((i=o.textContent)==null?void 0:i.trim())||o.getAttribute("title")||t.push(`${o.tagName.toLowerCase()}${o.id?"#"+o.id:""} missing accessible name`)}),e.querySelectorAll("img").forEach(o=>{!o.alt&&o.getAttribute("role")!=="presentation"&&t.push(`img${o.src?'[src="'+o.src.substring(0,40)+'..."]':""} missing alt text`)}),e.querySelectorAll('input:not([type="hidden"]), select, textarea').forEach(o=>{const s=o.id&&e.querySelector(`label[for="${o.id}"]`),i=o.getAttribute("aria-label")||o.getAttribute("aria-labelledby");!s&&!i&&t.push(`${o.tagName.toLowerCase()}${o.name?'[name="'+o.name+'"]':""} missing label`)}),t}const On=process.env.NODE_ENV==="development";let H={enabled:On,logToConsole:!1,slowRenderThreshold:16,samplingRate:1,enableUserTiming:!0,trackPropsChanges:!1};const We=[],J=new Map,Ve=new Map;let Pc=1;function Bn(e){H={...H,...e}}function jn(){return new Map(J)}function Wn(e){return J.get(e)}function zc(e=100){return We.slice(-e)}function Et(){We.length=0,J.clear(),Ve.clear()}function Nt(e){const t=e??H.slowRenderThreshold??16;return We.filter(r=>r.actualDuration>t)}function $c(){return Math.random()<(H.samplingRate??1)}function Hc(e){const t=J.get(e.componentName);t?(t.renderCount++,e.phase==="mount"?t.mountCount++:t.updateCount++,t.totalRenderTime+=e.actualDuration,t.avgRenderTime=t.totalRenderTime/t.renderCount,t.maxRenderTime=Math.max(t.maxRenderTime,e.actualDuration),t.minRenderTime=Math.min(t.minRenderTime,e.actualDuration),t.lastRenderAt=e.timestamp,e.actualDuration>(H.slowRenderThreshold??16)&&t.slowRenderCount++):J.set(e.componentName,{componentName:e.componentName,renderCount:1,mountCount:e.phase==="mount"?1:0,updateCount:e.phase==="mount"?0:1,avgRenderTime:e.actualDuration,maxRenderTime:e.actualDuration,minRenderTime:e.actualDuration,totalRenderTime:e.actualDuration,lastRenderAt:e.timestamp,slowRenderCount:e.actualDuration>(H.slowRenderThreshold??16)?1:0})}function q(e){return e<1?`${(e*1e3).toFixed(0)}μs`:e<1e3?`${e.toFixed(2)}ms`:`${(e/1e3).toFixed(2)}s`}const _c=({id:e,children:t,onRender:r,onSlowRender:a,slowThreshold:n,logToConsole:o})=>{const s=l.useCallback((i,c,d,u,f,h)=>{var g,S,y;if(!H.enabled||!$c()||(g=H.ignoreComponents)!=null&&g.includes(i))return;const b={componentName:i,renderId:`render-${Pc++}`,phase:c,actualDuration:d,baseDuration:u,startTime:f,commitTime:h,interactions:new Set,timestamp:Date.now()};if(We.push(b),Hc(b),H.enableUserTiming)try{performance.measure(`Nice:${i}:${c}`,{start:f,duration:d})}catch{}if(o??H.logToConsole){const v=n??H.slowRenderThreshold??16,k=d>v;console.log(`%c[Profile] ${i} ${c}`,`color: ${k?"var(--nice-color-error, #dc2626)":"var(--nice-color-success, #22c55e)"}; font-weight: ${k?"bold":"normal"}`,{actual:q(d),base:q(u),savings:`${((1-d/u)*100).toFixed(1)}%`})}r==null||r(b),(S=H.onRender)==null||S.call(H,b);const m=n??H.slowRenderThreshold??16;d>m&&(a==null||a(b),(y=H.onSlowRender)==null||y.call(H,b))},[r,a,n,o]);return H.enabled?x.jsx(l.Profiler,{id:e,onRender:s,children:t}):x.jsx(x.Fragment,{children:t})};function Vn(e,t){const r=l.useRef(void 0),a=l.useRef(0);l.useEffect(()=>{if(!H.enabled||!H.trackPropsChanges)return;if(a.current++,a.current===1){r.current=t;return}const n=r.current,o=[],s=new Set([...Object.keys(n||{}),...Object.keys(t)]);for(const i of s){const c=n==null?void 0:n[i],d=t[i];Object.is(c,d)||o.push({propName:i,oldValue:c,newValue:d,timestamp:Date.now()})}o.length>0&&H.logToConsole&&console.log(`%c[Why render?] ${e}`,"color: var(--nice-info, #6366f1); font-weight: bold",`Render #${a.current}`,o.map(i=>({prop:i.propName,from:i.oldValue,to:i.newValue,type:typeof i.newValue}))),r.current=t})}function Oc(e,t){const r=t||e.displayName||e.name||"Unknown",a=n=>(Vn(r,n),x.jsx(e,{...n}));return a.displayName=`WhyDidYouRender(${r})`,a}function Bc(e){const t=l.useRef(0);return t.current++,l.useEffect(()=>{H.enabled&&H.logToConsole&&e&&console.log(`%c[Render count] ${e}: ${t.current}`,`color: ${t.current>10?"var(--nice-color-warning, #f59e0b)":"var(--nice-color-success, #22c55e)"}`)}),t.current}function Ke(e,t){if(!H.enabled)return;const r={name:e,startTime:performance.now(),detail:t};if(Ve.set(e,r),H.enableUserTiming)try{performance.mark(`Nice:${e}:start`,{detail:t})}catch{}}function Ue(e){if(!H.enabled)return 0;const t=Ve.get(e);if(!t)return console.warn(`[Profile] No mark found for: ${e}`),0;const r=performance.now()-t.startTime;if(t.duration=r,H.enableUserTiming)try{performance.mark(`Nice:${e}:end`),performance.measure(`Nice:${e}`,`Nice:${e}:start`,`Nice:${e}:end`)}catch{}return H.logToConsole&&console.log(`%c[Measure] ${e}: ${q(r)}`,`color: ${r>100?"var(--nice-color-warning, #f59e0b)":"var(--nice-color-success, #22c55e)"}`),r}async function jc(e,t,r){Ke(e,r);try{return await t()}finally{Ue(e)}}function Wc(e,t,r){Ke(e,r);try{return t()}finally{Ue(e)}}function Vc(e,t,r){l.useEffect(()=>{Ke(e);const a=t();return Ue(e),a},r)}function Kn(){const e=Array.from(J.values()),t=Nt(),r=e.reduce((o,s)=>o+s.renderCount,0),a=e.length>0?e.reduce((o,s)=>o+s.avgRenderTime,0)/e.length:0,n=Array.from(Ve.values());return{stats:e,slowRenders:t,totalRenders:r,avgRenderTime:a,marks:n}}function At(){const e=Kn();console.group("%c[Nice2Dev Performance Report]","color: var(--nice-info, #6366f1); font-weight: bold; font-size: 14px"),console.log(`Total renders: ${e.totalRenders}`),console.log(`Average render time: ${q(e.avgRenderTime)}`),console.log(`Slow renders: ${e.slowRenders.length}`),console.group("Component Stats"),console.table(e.stats.sort((t,r)=>r.totalRenderTime-t.totalRenderTime).map(t=>({Name:t.componentName,Renders:t.renderCount,"Avg Time":q(t.avgRenderTime),"Max Time":q(t.maxRenderTime),"Total Time":q(t.totalRenderTime),"Slow Renders":t.slowRenderCount}))),console.groupEnd(),e.slowRenders.length>0&&(console.group("Slow Renders (last 10)"),console.table(e.slowRenders.slice(-10).map(t=>({Component:t.componentName,Phase:t.phase,Duration:q(t.actualDuration),Time:new Date(t.timestamp).toLocaleTimeString()}))),console.groupEnd()),e.marks.length>0&&(console.group("Custom Marks"),console.table(e.marks.filter(t=>t.duration).map(t=>({Name:t.name,Duration:q(t.duration)}))),console.groupEnd()),console.groupEnd()}const Un=new Map;function Xn(){for(const[e,t]of J)Un.set(e,{...t});console.log("[Profile] Baseline saved")}function Gn(e=20){const t=[];for(const[r,a]of J){const n=Un.get(r);if(!n)continue;const o=(a.avgRenderTime-n.avgRenderTime)/n.avgRenderTime*100;o>e&&t.push({componentName:r,metric:"avgRenderTime",baseline:n.avgRenderTime,current:a.avgRenderTime,changePercent:o});const s=(a.maxRenderTime-n.maxRenderTime)/n.maxRenderTime*100;s>e&&t.push({componentName:r,metric:"maxRenderTime",baseline:n.maxRenderTime,current:a.maxRenderTime,changePercent:s})}return t.length>0&&H.logToConsole&&console.warn("%c[Regression] Performance regressions detected!","color: var(--nice-danger-dark, #dc2626); font-weight: bold",t),t}const Kc=Object.assign(l.memo(({position:e="bottom-right",defaultCollapsed:t=!0})=>{const{t:r}=j.useNiceTranslation(),[a,n]=l.useState(t),[o,s]=l.useState([]),[i,c]=l.useState({used:0,total:0});if(l.useEffect(()=>{const u=()=>{const h=Array.from(J.values());s(h.sort((p,m)=>m.totalRenderTime-p.totalRenderTime).slice(0,10));const b=window.performance;b.memory&&c({used:b.memory.usedJSHeapSize/1024/1024,total:b.memory.totalJSHeapSize/1024/1024})};u();const f=setInterval(u,2e3);return()=>clearInterval(f)},[]),!H.enabled)return null;const d={position:"fixed",zIndex:99999,...e.includes("top")?{top:8}:{bottom:8},...e.includes("left")?{left:8}:{right:8}};return x.jsxs("div",{style:{...d,background:"var(--nice-overlay-85, rgba(0, 0, 0, 0.85))",color:"var(--nice-color-white, #fff)",borderRadius:8,fontSize:11,fontFamily:"Monaco, Consolas, monospace",padding:a?"4px 8px":8,maxWidth:a?"auto":300,maxHeight:a?"auto":400,overflow:"auto"},children:[x.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":!a,onKeyDown:N.clickOnActivationKey,style:{cursor:"pointer",display:"flex",alignItems:"center",gap:8},onClick:()=>n(u=>!u),children:[x.jsx("span",{"aria-hidden":"true",style:{width:8,height:8,borderRadius:"50%",background:"var(--nice-color-success, #22c55e)"}}),x.jsx("span",{children:r("profiling.profiler","Profiler")}),i.used>0&&x.jsxs("span",{style:{color:i.used>100?"var(--nice-color-warning, #f59e0b)":"var(--nice-text-muted, #64748b)"},children:[i.used.toFixed(0),"MB"]}),x.jsx("span",{style:{marginLeft:"auto",opacity:.5,display:"inline-flex"},children:x.jsx(N.NiceIcon,{name:a?"chevron-down":"chevron-up",size:12})})]}),!a&&x.jsxs("div",{style:{marginTop:8},children:[x.jsx("div",{style:{borderBottom:"1px solid var(--nice-border-color, #333)",paddingBottom:4,marginBottom:8},children:x.jsx("strong",{children:r("profiling.topComponents","Top Components")})}),o.map(u=>x.jsxs("div",{style:{marginBottom:4,display:"flex",gap:8},children:[x.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:u.componentName}),x.jsx("span",{style:{color:u.avgRenderTime>16?"var(--nice-color-warning, #f59e0b)":"var(--nice-color-success, #22c55e)"},children:q(u.avgRenderTime)}),x.jsxs("span",{style:{color:"var(--nice-text-muted, #64748b)",minWidth:30,textAlign:"right"},children:["x",u.renderCount]})]},u.componentName)),x.jsxs("div",{style:{marginTop:8,display:"flex",gap:8},children:[x.jsx("button",{onClick:At,style:{flex:1,padding:"4px 8px",background:"var(--nice-bg-tertiary, #333)",border:"none",borderRadius:4,color:"var(--nice-text-primary, #fff)",cursor:"pointer",fontSize:10},children:r("profiling.printReport","Print Report")}),x.jsx("button",{onClick:Et,style:{flex:1,padding:"4px 8px",background:"var(--nice-bg-tertiary, #333)",border:"none",borderRadius:4,color:"var(--nice-text-primary, #fff)",cursor:"pointer",fontSize:10},children:r("profiling.clear","Clear")})]})]})]})}),{displayName:"ProfilerOverlay"});function Uc(){On&&(window.__NICE2DEV_PROFILER__={getStats:jn,getComponentStats:Wn,getSlowRenders:Nt,printReport:At,clear:Et,saveBaseline:Xn,checkRegression:Gn,configure:Bn},console.log("%c[Nice2Dev Profiler] DevTools integration ready. Use __NICE2DEV_PROFILER__ in console.","color: var(--nice-info, #6366f1)"))}const Mt=process.env.NODE_ENV==="development";let _={enabled:Mt,logToConsole:!0,samplingRate:1,trackDetachedNodes:!1,closureSizeThreshold:1024*1024};const Xe=[],$e=new Map,Qe=new Map,Yt=new WeakMap;let Xc=1;function Gc(){return Math.random()<(_.samplingRate??1)}function Ge(){var e;try{throw new Error}catch(t){return((e=t.stack)==null?void 0:e.split(`
39
39
  `).slice(3).join(`
40
- `))??""}}function Ye(e,t,r){return`${e.__ntd_id??Math.random()}-${t}-${r.toString().slice(0,50)}`}function ne(e,t,r="warning",a,n){var i,s;if(!O.enabled||!rl()||a&&((i=O.ignoreComponents)!=null&&i.includes(a)))return;const o={id:`leak-${tl++}`,type:e,severity:r,componentName:a,message:t,stack:Ue(),timestamp:Date.now(),data:n};Xe.push(o),O.logToConsole&&console[r==="critical"?"error":r==="warning"?"warn":"info"](`%c[NTD Leak Detector] ${e}`,`color: ${r==="critical"?"var(--nice-color-error, #dc2626)":r==="warning"?"var(--nice-color-warning, #f59e0b)":"var(--nice-color-primary, #3b82f6)"}; font-weight: bold`,t,a?`(${a})`:"",""),(s=O.onLeak)==null||s.call(O,o)}function al(e){O={...O,...e}}function nl(){return[...Xe]}function ol(){Xe.length=0}function Jn(){return Xe.reduce((e,t)=>(e[t.type]=(e[t.type]||0)+1,e),{})}function sl(e,t){const[r,a]=c.useState(e),n=c.useRef(!0),o=c.useRef(t);c.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]);const i=c.useCallback(s=>{n.current?a(s):O.enabled&&ne("setState-after-unmount","setState called on unmounted component","warning",o.current)},[]);return[r,i]}function il(e){const t=c.useRef(null),r=c.useRef(e),a=c.useCallback(()=>{t.current&&(clearTimeout(t.current),O.enabled&&De.delete(t.current),t.current=null)},[]),n=c.useCallback((o,i)=>{a(),t.current=setTimeout(o,i),O.enabled&&De.set(t.current,{id:t.current,type:"timeout",componentName:r.current,stack:Ue(),createdAt:Date.now()})},[a]);return c.useEffect(()=>{const o=r.current;return()=>{t.current&&(O.enabled&&ne("timer-not-cleared","Timeout would have leaked without cleanup","info",o),a())}},[a]),[n,a]}function cl(e){const t=c.useRef(null),r=c.useRef(e),a=c.useCallback(()=>{t.current&&(clearInterval(t.current),O.enabled&&De.delete(t.current),t.current=null)},[]),n=c.useCallback((o,i)=>{a(),t.current=setInterval(o,i),O.enabled&&De.set(t.current,{id:t.current,type:"interval",componentName:r.current,stack:Ue(),createdAt:Date.now()})},[a]);return c.useEffect(()=>{const o=r.current;return()=>{t.current&&(O.enabled&&ne("timer-not-cleared","Interval would have leaked without cleanup","warning",o),a())}},[a]),[n,a]}function ll(e){const t=c.useRef([]),r=c.useRef(e);return c.useEffect(()=>{const a=t.current,n=r.current;return()=>{for(const{target:o,type:i,listener:s,options:l}of a)if(o.removeEventListener(i,s,l),O.enabled){const d=Ye(o,i,s);Je.delete(d)}a.length>0&&O.enabled&&ne("listener-not-removed",`${a.length} event listener(s) would have leaked without cleanup`,"info",n),t.current=[]}},[]),c.useCallback((a,n,o,i)=>{if(a.addEventListener(n,o,i),t.current.push({target:a,type:n,listener:o,options:i}),O.enabled){const s=Ye(a,n,o);Je.set(s,{target:a,type:n,listener:o,componentName:r.current,stack:Ue(),createdAt:Date.now()})}return()=>{if(a.removeEventListener(n,o,i),t.current=t.current.filter(s=>s.target!==a||s.type!==n||s.listener!==o),O.enabled){const s=Ye(a,n,o);Je.delete(s)}}},[])}function Yn(e){const t=c.useRef(null),r=c.useRef(e);return c.useEffect(()=>{const a=r.current;return()=>{t.current&&!t.current.signal.aborted&&(t.current.abort(),O.enabled&&ne("abort-controller-not-aborted","AbortController was auto-aborted on unmount (fetch may have leaked)","info",a))}},[]),c.useCallback(()=>(t.current&&t.current.abort(),t.current=new AbortController,t.current.signal),[])}function dl(e){const t=Yn(e);return c.useCallback((r,a)=>{const n=t();return fetch(r,{...a,signal:n})},[t])}function ul(e){const t=c.useRef([]),r=c.useRef(e);return c.useEffect(()=>{const a=t.current,n=r.current;return()=>{for(const o of a)try{o()}catch(i){console.error("Error during subscription cleanup:",i)}a.length>0&&O.enabled&&ne("subscription-not-unsubscribed",`${a.length} subscription(s) would have leaked without cleanup`,"info",n),t.current=[]}},[]),c.useCallback(a=>{typeof a=="function"?t.current.push(a):a&&typeof a.unsubscribe=="function"&&t.current.push(()=>a.unsubscribe())},[])}function fl(e,t,r){const[a,n]=c.useState(null),[o,i]=c.useState(WebSocket.CLOSED),s=c.useRef(r);c.useEffect(()=>{if(!e)return;const u=new WebSocket(e,t);n(u);const f=s.current;return u.onopen=()=>i(u.readyState),u.onclose=()=>i(u.readyState),u.onerror=()=>i(u.readyState),()=>{(u.readyState===WebSocket.OPEN||u.readyState===WebSocket.CONNECTING)&&(u.close(),O.enabled&&ne("websocket-not-closed","WebSocket was auto-closed on unmount","info",f))}},[e,t]);const l=c.useCallback(u=>{(a==null?void 0:a.readyState)===WebSocket.OPEN&&a.send(u)},[a]),d=c.useCallback((u,f)=>{a==null||a.close(u,f)},[a]);return{socket:a,readyState:o,send:l,close:d}}function ml(e,t){const r=t||e.displayName||e.name||"Unknown",a=n=>{const o=c.useRef({});return c.useEffect(()=>{if(!O.enabled)return;const i=o.current;return Kt.set(i,{name:r,mountedAt:Date.now()}),()=>{Kt.delete(i)}},[]),S.jsx(e,{...n})};return a.displayName=`LeakTracked(${r})`,a}function pl(e){const t=c.useRef(Date.now());c.useEffect(()=>{O.enabled&&O.logToConsole&&console.log(`%c[NTD] ${e} mounted`,"color: var(--nice-success, #22c55e)");const r=t.current;return()=>{if(O.enabled&&O.logToConsole){const a=Date.now()-r;console.log(`%c[NTD] ${e} unmounted (lifetime: ${a}ms)`,"color: var(--nice-warning, #f59e0b)")}}},[e])}async function gl(e){if(!Et)return;const t=window.performance;if(t.memory){const r=t.memory;console.log(`%c[Memory Snapshot${e?`: ${e}`:""}]`,"color: var(--nice-info, #6366f1); font-weight: bold",{usedJSHeapSize:`${(r.usedJSHeapSize/1024/1024).toFixed(2)} MB`,totalJSHeapSize:`${(r.totalJSHeapSize/1024/1024).toFixed(2)} MB`,jsHeapSizeLimit:`${(r.jsHeapSizeLimit/1024/1024).toFixed(2)} MB`})}console.log("%cTip: Use Chrome DevTools Memory tab for detailed heap snapshots","color: var(--nice-text-secondary, #64748b); font-style: italic")}function hl(){Et&&(window.gc?(window.gc(),console.log("%c[GC] Forced garbage collection","color: var(--nice-success, #22c55e)")):console.log("%c[GC] gc() not available. Run Chrome with --expose-gc flag","color: var(--nice-warning, #f59e0b)"))}function yl(e=5e3,t=100){const[r,a]=c.useState({usedMB:0,totalMB:0,limitMB:0,isWarning:!1});return c.useEffect(()=>{const n=window.performance;if(!n.memory)return;const o=()=>{const s=n.memory;if(!s)return;const l=s.usedJSHeapSize/1024/1024,d=s.totalJSHeapSize/1024/1024,u=s.jsHeapSizeLimit/1024/1024,f=l>t;a({usedMB:l,totalMB:d,limitMB:u,isWarning:f}),f&&O.enabled&&ne("large-closure",`Memory usage exceeded ${t}MB (${l.toFixed(2)}MB)`,"warning")};o();const i=setInterval(o,e);return()=>clearInterval(i)},[e,t]),r}const bl=Object.assign(()=>{const e=c.useMemo(()=>Jn(),[]),t=Object.values(e).reduce((r,a)=>r+a,0);return!O.enabled||t===0,null},{displayName:"NiceLeakDetectorStatus"});function vl(e){const t=()=>{var r;(r=e.queryClient)==null||r.invalidateQueries({queryKey:e.queryKey})};return{load:r=>e.queryFn(r),insert:e.mutationFn?async r=>{const a=await e.mutationFn(r);return t(),a}:void 0,update:e.updateMutationFn?async(r,a)=>{const n=await e.updateMutationFn({key:r,values:a});return t(),n}:void 0,remove:e.deleteMutationFn?async r=>{await e.deleteMutationFn(r),t()}:void 0}}function Sl(e,t){return{load:async()=>t.getData(e.getState()),insert:t.addItem?async r=>{const a=e.getState();return t.addItem(a)(r),r}:void 0,update:t.updateItem?async(r,a)=>{const n=e.getState();return t.updateItem(n)(r,a),{...a}}:void 0,remove:t.removeItem?async r=>{const a=e.getState();t.removeItem(a)(r)}:void 0}}function xl(e={}){const t=e.actionPrefix??"nice";return r=>a=>n=>{const o=a(n);if(n.type.startsWith(`${t}/grid/`)){const s=n.type.split("/")[2];s&&e.onGridStateChange&&e.onGridStateChange(s,n.payload)}if(n.type.startsWith(`${t}/form/`)){const s=n.type.split("/")[2];s&&e.onFormStateChange&&e.onFormStateChange(s,n.payload)}return o}}function wl(e="nice"){return{setGridState:(t,r)=>({type:`${e}/grid/${t}/setState`,payload:r}),setGridFilter:(t,r)=>({type:`${e}/grid/${t}/setFilter`,payload:r}),setGridSort:(t,r)=>({type:`${e}/grid/${t}/setSort`,payload:r}),setFormValues:(t,r)=>({type:`${e}/form/${t}/setValues`,payload:r}),resetForm:t=>({type:`${e}/form/${t}/reset`})}}function kl(e="nice"){return(t={},r)=>{if(!r.type.startsWith(`${e}/`))return t;const a=r.type.split("/"),[,n,o,i]=a;if(!n||!o)return t;const s=`${n}/${o}`;switch(i){case"setState":return{...t,[s]:{...t[s]??{},...r.payload}};case"setFilter":case"setSort":case"setValues":return{...t,[s]:{...t[s]??{},[i]:r.payload}};case"reset":return{...t,[s]:{}};default:return t}}}function Ml(e){let t=null,r=[];return{load:async()=>{if(r.length>0)return r;const o=await e.queryFn();return r=o,o},subscribe:()=>(t=new WebSocket(e.url,"graphql-ws"),t.onopen=()=>{t.send(JSON.stringify({type:"connection_init",payload:e.connectionParams??{}})),t.send(JSON.stringify({type:"start",id:"1",payload:{query:e.query,variables:e.variables}}))},t.onmessage=o=>{var i,s;try{const l=JSON.parse(o.data);l.type==="data"&&((i=l.payload)!=null&&i.data)&&(r=(e.extractData??(u=>{const f=u,h=Object.keys(f)[0];return h?f[h]:[]}))(l.payload.data),(s=e.onData)==null||s.call(e,r))}catch{}},()=>{t==null||t.close(),t=null}),unsubscribe:()=>{t==null||t.close(),t=null}}}async function Cl(e,t){var d;const r=await fetch(e);if(!r.ok)throw new Error(`OpenAPI fetch failed: ${r.status}`);const a=await r.json(),o=(((d=a.components)==null?void 0:d.schemas)??a.definitions??{})[t];if(!o)throw new Error(`Schema "${t}" not found in OpenAPI spec`);const i=new Set(o.required??[]),s=[],l=[];for(const[u,f]of Object.entries(o.properties??{})){const h=Nt(f),y=f.title??Lt(u);s.push({dataField:u,caption:y,dataType:h,allowEditing:!f.readOnly,visible:!u.toLowerCase().endsWith("id")||u==="id",...f.enum?{lookup:{dataSource:f.enum,valueExpr:"this",displayExpr:"this"}}:{}}),l.push({dataField:u,label:y,editorType:Qn(f,h),isRequired:i.has(u),editorOptions:Zn(f),...i.has(u)?{validationRules:[{type:"required",message:`${y} jest wymagane`}]}:{}})}return{columns:s,formFields:l,schema:o}}function Al(e){const t=[];for(const[r,a]of Object.entries(e.properties??{}))t.push({dataField:r,caption:a.title??Lt(r),dataType:Nt(a),allowEditing:!a.readOnly});return t}function El(e){const t=new Set(e.required??[]),r=[];for(const[a,n]of Object.entries(e.properties??{})){const o=Nt(n);r.push({dataField:a,label:n.title??Lt(a),editorType:Qn(n,o),isRequired:t.has(a),editorOptions:Zn(n)})}return r}function Nt(e){return e.type==="integer"||e.type==="number"?"number":e.type==="boolean"?"boolean":e.format==="date"?"date":e.format==="date-time"?"datetime":e.type==="object"||e.type==="array"?"object":"string"}function Qn(e,t){return e.enum?"NiceSelect":e.format==="email"||e.format==="uri"||e.format==="url"?"NiceTextInput":e.format==="password"?"NicePasswordInput":t==="number"?"NiceNumberInput":t==="boolean"?"NiceToggle":t==="date"||t==="datetime"?"NiceDateTimePicker":e.maxLength&&e.maxLength>200?"NiceTextArea":"NiceTextInput"}function Zn(e){const t={};return e.minimum!==void 0&&(t.min=e.minimum),e.maximum!==void 0&&(t.max=e.maximum),e.minLength!==void 0&&(t.minLength=e.minLength),e.maxLength!==void 0&&(t.maxLength=e.maxLength),e.pattern&&(t.pattern=e.pattern),e.enum&&(t.items=e.enum.map(r=>({label:r,value:r}))),e.description&&(t.hint=e.description),Object.keys(t).length>0?t:{}}function Lt(e){return e.replace(/([A-Z])/g," $1").replace(/[_-]/g," ").replace(/\b\w/g,t=>t.toUpperCase()).trim()}const eo={enabled:!0,defaultExpanded:!1,showHelpIcon:!0,position:"tooltip",locale:"en"},Nl=async(e,t)=>{try{return null}catch{return null}},to=c.createContext(null),ro=({children:e,config:t,helpContent:r})=>{const[a,n]=c.useState({...eo,...t}),[o,i]=c.useState(new Set),[s,l]=c.useState(()=>new Map(Object.entries(r||{}))),d=c.useCallback(g=>{n(v=>({...v,...g}))},[]),u=c.useCallback(()=>{n(g=>({...g,enabled:!g.enabled}))},[]),f=c.useCallback(g=>{i(v=>new Set(v).add(g))},[]),h=c.useCallback(g=>{i(v=>{const b=new Set(v);return b.delete(g),b})},[]),y=c.useCallback(g=>a.enabled&&!o.has(g),[a.enabled,o]),m=c.useCallback(async g=>{if(s.has(g))return s.get(g)||null;const b=await(a.contentLoader||Nl)(g,a.locale);return b&&l(x=>new Map(x).set(g,b)),b},[s,a.contentLoader,a.locale]),p=c.useMemo(()=>({config:a,setConfig:d,toggleGlobalHelp:u,disabledComponents:o,disableComponentHelp:f,enableComponentHelp:h,isHelpEnabled:y,getHelpContent:m,helpCache:s}),[a,d,u,o,f,h,y,m,s]);return S.jsx(to.Provider,{value:p,children:e})};process.env.NODE_ENV!=="production"&&(ro.displayName="NiceHelpProvider");function ao(){const e=c.useContext(to);return e||{config:eo,setConfig:()=>{},toggleGlobalHelp:()=>{},disabledComponents:new Set,disableComponentHelp:()=>{},enableComponentHelp:()=>{},isHelpEnabled:()=>!0,getHelpContent:async()=>null,helpCache:new Map}}function no(e){const{isHelpEnabled:t,getHelpContent:r,helpCache:a,config:n}=ao(),[o,i]=c.useState(a.get(e)||null),[s,l]=c.useState(!1),d=t(e),u=c.useCallback(async()=>{if(!d)return;l(!0);const f=await r(e);i(f),l(!1)},[d,e,r]);return{content:o,loading:s,enabled:d,loadContent:u,position:n.position,defaultExpanded:n.defaultExpanded,showHelpIcon:n.showHelpIcon}}const oo=({props:e,compact:t})=>{const{t:r}=_.useNiceTranslation();return!e||e.length===0?null:t?S.jsxs("div",{className:"nice-help__props-compact",children:[e.slice(0,5).map(a=>S.jsxs("div",{className:"nice-help__prop-chip",children:[S.jsx("code",{children:a.name}),a.required&&S.jsx("span",{className:"nice-help__required",children:"*"})]},a.name)),e.length>5&&S.jsxs("span",{className:"nice-help__more",children:["+",e.length-5," ",r("help.moreProps","more")]})]}):S.jsxs("div",{className:"nice-help__props",children:[S.jsx("h4",{className:"nice-help__section-title",children:r("help.props","Properties")}),S.jsxs("table",{className:"nice-help__props-table",children:[S.jsx("thead",{children:S.jsxs("tr",{children:[S.jsx("th",{children:r("help.propName","Name")}),S.jsx("th",{children:r("help.propType","Type")}),S.jsx("th",{children:r("help.propDefault","Default")}),S.jsx("th",{children:r("help.propDescription","Description")})]})}),S.jsx("tbody",{children:e.map(a=>S.jsxs("tr",{children:[S.jsxs("td",{children:[S.jsx("code",{children:a.name}),a.required&&S.jsx("span",{className:"nice-help__required",title:r("help.required","Required"),children:"*"})]}),S.jsx("td",{children:S.jsx("code",{className:"nice-help__type",children:a.type})}),S.jsx("td",{children:a.default!==void 0?S.jsx("code",{children:String(a.default)}):"—"}),S.jsx("td",{children:a.description})]},a.name))})]})]})},ct=({tips:e})=>{const{t}=_.useNiceTranslation();return!e||e.length===0?null:S.jsxs("div",{className:"nice-help__tips",children:[S.jsx("h4",{className:"nice-help__section-title",children:t("help.tips","Tips")}),S.jsx("ul",{children:e.map((r,a)=>S.jsxs("li",{children:[S.jsx("span",{className:"nice-help__tip-icon",children:S.jsx(K,{name:"lightbulb",size:14})}),r]},a))})]})},Ll=({examples:e})=>{var n,o;const{t}=_.useNiceTranslation(),[r,a]=c.useState(0);return!e||e.length===0?null:S.jsxs("div",{className:"nice-help__examples",children:[S.jsx("h4",{className:"nice-help__section-title",children:t("help.examples","Examples")}),e.length>1&&S.jsx("div",{className:"nice-help__example-tabs",children:e.map((i,s)=>S.jsx("button",{className:`nice-help__example-tab ${r===s?"nice-help__example-tab--active":""}`,onClick:()=>a(s),children:i.title},s))}),S.jsx("pre",{className:"nice-help__code",children:S.jsx("code",{className:`language-${((n=e[r])==null?void 0:n.language)||"tsx"}`,children:(o=e[r])==null?void 0:o.code})})]})},so=({componentName:e,content:t,children:r,position:a,defaultExpanded:n,disabled:o=!1,className:i,icon:s,title:l,showProps:d=!0,showExamples:u=!1,showTips:f=!0,compact:h=!1})=>{const{t:y}=_.useNiceTranslation(),{content:m,loading:p,enabled:g,loadContent:v,position:b,defaultExpanded:x,showHelpIcon:w}=no(e),A=t||m,k=a||b,C=n??x,[M,E]=c.useState(C);return c.useEffect(()=>{g&&!t&&!m&&v()},[g,t,m,v]),o||!g?S.jsx(S.Fragment,{children:r}):k==="tooltip"?S.jsxs("div",{className:`nice-help-tooltip-wrapper ${i||""}`,children:[r,w&&A&&S.jsx("button",{className:"nice-help__trigger",onClick:()=>E(!M),"aria-label":y("help.toggle","Toggle help"),"aria-expanded":M,children:s||S.jsx(K,{name:"help",size:16})}),M&&A&&S.jsx("div",{className:"nice-help__tooltip",children:S.jsxs("div",{className:"nice-help__tooltip-content",children:[S.jsx("h3",{className:"nice-help__title",children:l||A.name}),S.jsx("p",{className:"nice-help__description",children:A.description}),f&&A.tips&&S.jsx(ct,{tips:A.tips}),d&&A.props&&S.jsx(oo,{props:A.props,compact:!0})]})})]}):S.jsxs("div",{className:`nice-help ${k==="bottom"?"nice-help--bottom":""} ${i||""}`,children:[k==="top"&&A&&S.jsx(Jt,{content:A,expanded:M,onToggle:()=>E(!M),loading:p,title:l,showProps:d,showExamples:u,showTips:f,compact:h}),r,k==="bottom"&&A&&S.jsx(Jt,{content:A,expanded:M,onToggle:()=>E(!M),loading:p,title:l,showProps:d,showExamples:u,showTips:f,compact:h}),k==="inline"&&A&&M&&S.jsxs("div",{className:"nice-help__inline",children:[S.jsx("p",{className:"nice-help__description",children:A.description}),f&&A.tips&&S.jsx(ct,{tips:A.tips})]})]})};process.env.NODE_ENV!=="production"&&(so.displayName="NiceInlineHelp");const Jt=({content:e,expanded:t,onToggle:r,loading:a,title:n,showProps:o,showExamples:i,showTips:s,compact:l})=>{const{t:d}=_.useNiceTranslation();return a?S.jsx("div",{className:"nice-help__panel nice-help__panel--loading",children:S.jsx("div",{className:"nice-spinner nice-spinner--sm"})}):S.jsxs("div",{className:`nice-help__panel ${t?"nice-help__panel--expanded":""}`,children:[S.jsxs("button",{className:"nice-help__panel-header",onClick:r,"aria-expanded":t,children:[S.jsx("span",{className:"nice-help__panel-icon",children:S.jsx(K,{name:t?"chevron-down":"chevron-right",size:14})}),S.jsxs("span",{className:"nice-help__panel-title",children:[n||d("help.about","About")," ",e.name]}),e.status&&S.jsx("span",{className:`nice-help__status nice-help__status--${e.status}`,children:e.status})]}),t&&S.jsxs("div",{className:"nice-help__panel-content",children:[S.jsx("p",{className:"nice-help__description",children:e.description}),s&&e.tips&&S.jsx(ct,{tips:e.tips}),o&&e.props&&S.jsx(oo,{props:e.props,compact:l}),i&&e.examples&&S.jsx(Ll,{examples:e.examples}),e.seeAlso&&e.seeAlso.length>0&&S.jsxs("div",{className:"nice-help__see-also",children:[S.jsx("h4",{className:"nice-help__section-title",children:d("help.seeAlso","See Also")}),S.jsx("ul",{children:e.seeAlso.map((u,f)=>S.jsx("li",{children:S.jsx("code",{children:u})},f))})]})]})]})},io=({text:e,position:t="top",className:r,children:a})=>{const[n,o]=c.useState(!1);return S.jsxs("span",{className:`nice-quick-help nice-quick-help--${t} ${r||""}`,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),onFocus:()=>o(!0),onBlur:()=>o(!1),children:[a,n&&S.jsx("span",{className:"nice-quick-help__popup",role:"tooltip",children:e})]})};process.env.NODE_ENV!=="production"&&(io.displayName="NiceQuickHelp");const co=({content:e,size:t="sm",className:r,onOpen:a})=>{const{t:n}=_.useNiceTranslation(),[o,i]=c.useState(!1),s=c.useCallback(()=>{i(!o),!o&&a&&a()},[o,a]),l=typeof e=="string"?e:e.description,d=typeof e=="string"?void 0:e.name;return S.jsxs("span",{className:`nice-help-icon nice-help-icon--${t} ${r||""}`,children:[S.jsx("button",{className:"nice-help-icon__btn",onClick:s,"aria-label":n("help.showHelp","Show help"),"aria-expanded":o,children:S.jsx(K,{name:"help",size:16})}),o&&S.jsxs("div",{className:"nice-help-icon__popup",children:[d&&S.jsx("strong",{children:d}),S.jsx("p",{children:l}),S.jsx("button",{"aria-label":n("help.close","Close"),className:"nice-help-icon__close",onClick:()=>i(!1),children:S.jsx(K,{name:"close",size:14})})]})]})};process.env.NODE_ENV!=="production"&&(co.displayName="NiceHelpIcon");const Tt=c.createContext({enabled:!0,active:!1,run:()=>{}}),Tl=({enabled:e=!0,active:t=!1,onRun:r,children:a})=>{const n=c.useMemo(()=>({enabled:e,active:t,run:r??(()=>{})}),[e,t,r]);return S.jsx(Tt.Provider,{value:n,children:a})};function lo(){return c.useContext(Tt)}function Rl(){return c.useContext(Tt).enabled}function zl(e,t){if(!e)return null;if(e===!0)return t&&t.length>0?t:null;if(Array.isArray(e))return e.length>0?e:null;const r=e.steps??t;return r&&r.length>0?r:null}function uo(e,t){return e.map(r=>({target:r.target,title:r.titleKey?t(r.titleKey,r.title??""):r.title??"",content:r.contentKey?t(r.contentKey,r.content??""):r.content??"",placement:r.placement,highlightPadding:r.highlightPadding,showArrow:r.showArrow,scrollIntoView:r.scrollIntoView,disableInteraction:r.disableInteraction}))}const Il=({steps:e,autoStart:t,label:r,size:a="md",className:n,style:o,"data-testid":i})=>{Pl();const{enabled:s,run:l}=lo(),{t:d}=_.useNiceTranslation();if(!s||!e||e.length===0)return null;const u=r??d("tutorial.startAria","Start tutorial");return S.jsx("button",{type:"button",className:`nice-tutorial-button nice-tutorial-button--${a}`+(n?` ${n}`:""),style:o,"data-testid":i,"aria-label":u,title:u,onClick:()=>l(uo(e,d),{autoStart:t}),children:"?"})},Yt="nice-tutorial-button-styles";function Pl(){if(typeof document>"u"||document.getElementById(Yt))return;const e=document.createElement("style");e.id=Yt,e.textContent=`
40
+ `))??""}}function Ze(e,t,r){return`${e.__ntd_id??Math.random()}-${t}-${r.toString().slice(0,50)}`}function re(e,t,r="warning",a,n){var s,i;if(!_.enabled||!Gc()||a&&((s=_.ignoreComponents)!=null&&s.includes(a)))return;const o={id:`leak-${Xc++}`,type:e,severity:r,componentName:a,message:t,stack:Ge(),timestamp:Date.now(),data:n};Xe.push(o),_.logToConsole&&console[r==="critical"?"error":r==="warning"?"warn":"info"](`%c[NTD Leak Detector] ${e}`,`color: ${r==="critical"?"var(--nice-color-error, #dc2626)":r==="warning"?"var(--nice-color-warning, #f59e0b)":"var(--nice-color-primary, #3b82f6)"}; font-weight: bold`,t,a?`(${a})`:"",""),(i=_.onLeak)==null||i.call(_,o)}function qc(e){_={..._,...e}}function Yc(){return[...Xe]}function Jc(){Xe.length=0}function qn(){return Xe.reduce((e,t)=>(e[t.type]=(e[t.type]||0)+1,e),{})}function Qc(e,t){const[r,a]=l.useState(e),n=l.useRef(!0),o=l.useRef(t);l.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]);const s=l.useCallback(i=>{n.current?a(i):_.enabled&&re("setState-after-unmount","setState called on unmounted component","warning",o.current)},[]);return[r,s]}function Zc(e){const t=l.useRef(null),r=l.useRef(e),a=l.useCallback(()=>{t.current&&(clearTimeout(t.current),_.enabled&&$e.delete(t.current),t.current=null)},[]),n=l.useCallback((o,s)=>{a(),t.current=setTimeout(o,s),_.enabled&&$e.set(t.current,{id:t.current,type:"timeout",componentName:r.current,stack:Ge(),createdAt:Date.now()})},[a]);return l.useEffect(()=>{const o=r.current;return()=>{t.current&&(_.enabled&&re("timer-not-cleared","Timeout would have leaked without cleanup","info",o),a())}},[a]),[n,a]}function el(e){const t=l.useRef(null),r=l.useRef(e),a=l.useCallback(()=>{t.current&&(clearInterval(t.current),_.enabled&&$e.delete(t.current),t.current=null)},[]),n=l.useCallback((o,s)=>{a(),t.current=setInterval(o,s),_.enabled&&$e.set(t.current,{id:t.current,type:"interval",componentName:r.current,stack:Ge(),createdAt:Date.now()})},[a]);return l.useEffect(()=>{const o=r.current;return()=>{t.current&&(_.enabled&&re("timer-not-cleared","Interval would have leaked without cleanup","warning",o),a())}},[a]),[n,a]}function tl(e){const t=l.useRef([]),r=l.useRef(e);return l.useEffect(()=>{const a=t.current,n=r.current;return()=>{for(const{target:o,type:s,listener:i,options:c}of a)if(o.removeEventListener(s,i,c),_.enabled){const d=Ze(o,s,i);Qe.delete(d)}a.length>0&&_.enabled&&re("listener-not-removed",`${a.length} event listener(s) would have leaked without cleanup`,"info",n),t.current=[]}},[]),l.useCallback((a,n,o,s)=>{if(a.addEventListener(n,o,s),t.current.push({target:a,type:n,listener:o,options:s}),_.enabled){const i=Ze(a,n,o);Qe.set(i,{target:a,type:n,listener:o,componentName:r.current,stack:Ge(),createdAt:Date.now()})}return()=>{if(a.removeEventListener(n,o,s),t.current=t.current.filter(i=>i.target!==a||i.type!==n||i.listener!==o),_.enabled){const i=Ze(a,n,o);Qe.delete(i)}}},[])}function Yn(e){const t=l.useRef(null),r=l.useRef(e);return l.useEffect(()=>{const a=r.current;return()=>{t.current&&!t.current.signal.aborted&&(t.current.abort(),_.enabled&&re("abort-controller-not-aborted","AbortController was auto-aborted on unmount (fetch may have leaked)","info",a))}},[]),l.useCallback(()=>(t.current&&t.current.abort(),t.current=new AbortController,t.current.signal),[])}function rl(e){const t=Yn(e);return l.useCallback((r,a)=>{const n=t();return fetch(r,{...a,signal:n})},[t])}function al(e){const t=l.useRef([]),r=l.useRef(e);return l.useEffect(()=>{const a=t.current,n=r.current;return()=>{for(const o of a)try{o()}catch(s){console.error("Error during subscription cleanup:",s)}a.length>0&&_.enabled&&re("subscription-not-unsubscribed",`${a.length} subscription(s) would have leaked without cleanup`,"info",n),t.current=[]}},[]),l.useCallback(a=>{typeof a=="function"?t.current.push(a):a&&typeof a.unsubscribe=="function"&&t.current.push(()=>a.unsubscribe())},[])}function nl(e,t,r){const[a,n]=l.useState(null),[o,s]=l.useState(WebSocket.CLOSED),i=l.useRef(r);l.useEffect(()=>{if(!e)return;const u=new WebSocket(e,t);n(u);const f=i.current;return u.onopen=()=>s(u.readyState),u.onclose=()=>s(u.readyState),u.onerror=()=>s(u.readyState),()=>{(u.readyState===WebSocket.OPEN||u.readyState===WebSocket.CONNECTING)&&(u.close(),_.enabled&&re("websocket-not-closed","WebSocket was auto-closed on unmount","info",f))}},[e,t]);const c=l.useCallback(u=>{(a==null?void 0:a.readyState)===WebSocket.OPEN&&a.send(u)},[a]),d=l.useCallback((u,f)=>{a==null||a.close(u,f)},[a]);return{socket:a,readyState:o,send:c,close:d}}function ol(e,t){const r=t||e.displayName||e.name||"Unknown",a=n=>{const o=l.useRef({});return l.useEffect(()=>{if(!_.enabled)return;const s=o.current;return Yt.set(s,{name:r,mountedAt:Date.now()}),()=>{Yt.delete(s)}},[]),x.jsx(e,{...n})};return a.displayName=`LeakTracked(${r})`,a}function il(e){const t=l.useRef(Date.now());l.useEffect(()=>{_.enabled&&_.logToConsole&&console.log(`%c[NTD] ${e} mounted`,"color: var(--nice-success, #22c55e)");const r=t.current;return()=>{if(_.enabled&&_.logToConsole){const a=Date.now()-r;console.log(`%c[NTD] ${e} unmounted (lifetime: ${a}ms)`,"color: var(--nice-warning, #f59e0b)")}}},[e])}async function sl(e){if(!Mt)return;const t=window.performance;if(t.memory){const r=t.memory;console.log(`%c[Memory Snapshot${e?`: ${e}`:""}]`,"color: var(--nice-info, #6366f1); font-weight: bold",{usedJSHeapSize:`${(r.usedJSHeapSize/1024/1024).toFixed(2)} MB`,totalJSHeapSize:`${(r.totalJSHeapSize/1024/1024).toFixed(2)} MB`,jsHeapSizeLimit:`${(r.jsHeapSizeLimit/1024/1024).toFixed(2)} MB`})}console.log("%cTip: Use Chrome DevTools Memory tab for detailed heap snapshots","color: var(--nice-text-secondary, #64748b); font-style: italic")}function cl(){Mt&&(window.gc?(window.gc(),console.log("%c[GC] Forced garbage collection","color: var(--nice-success, #22c55e)")):console.log("%c[GC] gc() not available. Run Chrome with --expose-gc flag","color: var(--nice-warning, #f59e0b)"))}function ll(e=5e3,t=100){const[r,a]=l.useState({usedMB:0,totalMB:0,limitMB:0,isWarning:!1});return l.useEffect(()=>{const n=window.performance;if(!n.memory)return;const o=()=>{const i=n.memory;if(!i)return;const c=i.usedJSHeapSize/1024/1024,d=i.totalJSHeapSize/1024/1024,u=i.jsHeapSizeLimit/1024/1024,f=c>t;a({usedMB:c,totalMB:d,limitMB:u,isWarning:f}),f&&_.enabled&&re("large-closure",`Memory usage exceeded ${t}MB (${c.toFixed(2)}MB)`,"warning")};o();const s=setInterval(o,e);return()=>clearInterval(s)},[e,t]),r}const dl=Object.assign(()=>{const e=l.useMemo(()=>qn(),[]),t=Object.values(e).reduce((r,a)=>r+a,0);return!_.enabled||t===0,null},{displayName:"NiceLeakDetectorStatus"});function ul(e){const t=()=>{var r;(r=e.queryClient)==null||r.invalidateQueries({queryKey:e.queryKey})};return{load:r=>e.queryFn(r),insert:e.mutationFn?async r=>{const a=await e.mutationFn(r);return t(),a}:void 0,update:e.updateMutationFn?async(r,a)=>{const n=await e.updateMutationFn({key:r,values:a});return t(),n}:void 0,remove:e.deleteMutationFn?async r=>{await e.deleteMutationFn(r),t()}:void 0}}function fl(e,t){return{load:async()=>t.getData(e.getState()),insert:t.addItem?async r=>{const a=e.getState();return t.addItem(a)(r),r}:void 0,update:t.updateItem?async(r,a)=>{const n=e.getState();return t.updateItem(n)(r,a),{...a}}:void 0,remove:t.removeItem?async r=>{const a=e.getState();t.removeItem(a)(r)}:void 0}}function ml(e={}){const t=e.actionPrefix??"nice";return r=>a=>n=>{const o=a(n);if(n.type.startsWith(`${t}/grid/`)){const i=n.type.split("/")[2];i&&e.onGridStateChange&&e.onGridStateChange(i,n.payload)}if(n.type.startsWith(`${t}/form/`)){const i=n.type.split("/")[2];i&&e.onFormStateChange&&e.onFormStateChange(i,n.payload)}return o}}function pl(e="nice"){return{setGridState:(t,r)=>({type:`${e}/grid/${t}/setState`,payload:r}),setGridFilter:(t,r)=>({type:`${e}/grid/${t}/setFilter`,payload:r}),setGridSort:(t,r)=>({type:`${e}/grid/${t}/setSort`,payload:r}),setFormValues:(t,r)=>({type:`${e}/form/${t}/setValues`,payload:r}),resetForm:t=>({type:`${e}/form/${t}/reset`})}}function gl(e="nice"){return(t={},r)=>{if(!r.type.startsWith(`${e}/`))return t;const a=r.type.split("/"),[,n,o,s]=a;if(!n||!o)return t;const i=`${n}/${o}`;switch(s){case"setState":return{...t,[i]:{...t[i]??{},...r.payload}};case"setFilter":case"setSort":case"setValues":return{...t,[i]:{...t[i]??{},[s]:r.payload}};case"reset":return{...t,[i]:{}};default:return t}}}function yl(e){let t=null,r=[];return{load:async()=>{if(r.length>0)return r;const o=await e.queryFn();return r=o,o},subscribe:()=>(t=new WebSocket(e.url,"graphql-ws"),t.onopen=()=>{t.send(JSON.stringify({type:"connection_init",payload:e.connectionParams??{}})),t.send(JSON.stringify({type:"start",id:"1",payload:{query:e.query,variables:e.variables}}))},t.onmessage=o=>{var s,i;try{const c=JSON.parse(o.data);c.type==="data"&&((s=c.payload)!=null&&s.data)&&(r=(e.extractData??(u=>{const f=u,h=Object.keys(f)[0];return h?f[h]:[]}))(c.payload.data),(i=e.onData)==null||i.call(e,r))}catch{}},()=>{t==null||t.close(),t=null}),unsubscribe:()=>{t==null||t.close(),t=null}}}async function hl(e,t){var d;const r=await fetch(e);if(!r.ok)throw new Error(`OpenAPI fetch failed: ${r.status}`);const a=await r.json(),o=(((d=a.components)==null?void 0:d.schemas)??a.definitions??{})[t];if(!o)throw new Error(`Schema "${t}" not found in OpenAPI spec`);const s=new Set(o.required??[]),i=[],c=[];for(const[u,f]of Object.entries(o.properties??{})){const h=Tt(f),b=f.title??It(u);i.push({dataField:u,caption:b,dataType:h,allowEditing:!f.readOnly,visible:!u.toLowerCase().endsWith("id")||u==="id",...f.enum?{lookup:{dataSource:f.enum,valueExpr:"this",displayExpr:"this"}}:{}}),c.push({dataField:u,label:b,editorType:Jn(f,h),isRequired:s.has(u),editorOptions:Qn(f),...s.has(u)?{validationRules:[{type:"required",message:`${b} jest wymagane`}]}:{}})}return{columns:i,formFields:c,schema:o}}function bl(e){const t=[];for(const[r,a]of Object.entries(e.properties??{}))t.push({dataField:r,caption:a.title??It(r),dataType:Tt(a),allowEditing:!a.readOnly});return t}function Sl(e){const t=new Set(e.required??[]),r=[];for(const[a,n]of Object.entries(e.properties??{})){const o=Tt(n);r.push({dataField:a,label:n.title??It(a),editorType:Jn(n,o),isRequired:t.has(a),editorOptions:Qn(n)})}return r}function Tt(e){return e.type==="integer"||e.type==="number"?"number":e.type==="boolean"?"boolean":e.format==="date"?"date":e.format==="date-time"?"datetime":e.type==="object"||e.type==="array"?"object":"string"}function Jn(e,t){return e.enum?"NiceSelect":e.format==="email"||e.format==="uri"||e.format==="url"?"NiceTextInput":e.format==="password"?"NicePasswordInput":t==="number"?"NiceNumberInput":t==="boolean"?"NiceToggle":t==="date"||t==="datetime"?"NiceDateTimePicker":e.maxLength&&e.maxLength>200?"NiceTextArea":"NiceTextInput"}function Qn(e){const t={};return e.minimum!==void 0&&(t.min=e.minimum),e.maximum!==void 0&&(t.max=e.maximum),e.minLength!==void 0&&(t.minLength=e.minLength),e.maxLength!==void 0&&(t.maxLength=e.maxLength),e.pattern&&(t.pattern=e.pattern),e.enum&&(t.items=e.enum.map(r=>({label:r,value:r}))),e.description&&(t.hint=e.description),Object.keys(t).length>0?t:{}}function It(e){return e.replace(/([A-Z])/g," $1").replace(/[_-]/g," ").replace(/\b\w/g,t=>t.toUpperCase()).trim()}const Zn={enabled:!0,defaultExpanded:!1,showHelpIcon:!0,position:"tooltip",locale:"en"},vl=async(e,t)=>{try{return null}catch{return null}},eo=l.createContext(null),to=({children:e,config:t,helpContent:r})=>{const[a,n]=l.useState({...Zn,...t}),[o,s]=l.useState(new Set),[i,c]=l.useState(()=>new Map(Object.entries(r||{}))),d=l.useCallback(g=>{n(S=>({...S,...g}))},[]),u=l.useCallback(()=>{n(g=>({...g,enabled:!g.enabled}))},[]),f=l.useCallback(g=>{s(S=>new Set(S).add(g))},[]),h=l.useCallback(g=>{s(S=>{const y=new Set(S);return y.delete(g),y})},[]),b=l.useCallback(g=>a.enabled&&!o.has(g),[a.enabled,o]),p=l.useCallback(async g=>{if(i.has(g))return i.get(g)||null;const y=await(a.contentLoader||vl)(g,a.locale);return y&&c(v=>new Map(v).set(g,y)),y},[i,a.contentLoader,a.locale]),m=l.useMemo(()=>({config:a,setConfig:d,toggleGlobalHelp:u,disabledComponents:o,disableComponentHelp:f,enableComponentHelp:h,isHelpEnabled:b,getHelpContent:p,helpCache:i}),[a,d,u,o,f,h,b,p,i]);return x.jsx(eo.Provider,{value:m,children:e})};process.env.NODE_ENV!=="production"&&(to.displayName="NiceHelpProvider");function ro(){const e=l.useContext(eo);return e||{config:Zn,setConfig:()=>{},toggleGlobalHelp:()=>{},disabledComponents:new Set,disableComponentHelp:()=>{},enableComponentHelp:()=>{},isHelpEnabled:()=>!0,getHelpContent:async()=>null,helpCache:new Map}}function ao(e){const{isHelpEnabled:t,getHelpContent:r,helpCache:a,config:n}=ro(),[o,s]=l.useState(a.get(e)||null),[i,c]=l.useState(!1),d=t(e),u=l.useCallback(async()=>{if(!d)return;c(!0);const f=await r(e);s(f),c(!1)},[d,e,r]);return{content:o,loading:i,enabled:d,loadContent:u,position:n.position,defaultExpanded:n.defaultExpanded,showHelpIcon:n.showHelpIcon}}const no=({props:e,compact:t})=>{const{t:r}=j.useNiceTranslation();return!e||e.length===0?null:t?x.jsxs("div",{className:"nice-help__props-compact",children:[e.slice(0,5).map(a=>x.jsxs("div",{className:"nice-help__prop-chip",children:[x.jsx("code",{children:a.name}),a.required&&x.jsx("span",{className:"nice-help__required",children:"*"})]},a.name)),e.length>5&&x.jsxs("span",{className:"nice-help__more",children:["+",e.length-5," ",r("help.moreProps","more")]})]}):x.jsxs("div",{className:"nice-help__props",children:[x.jsx("h4",{className:"nice-help__section-title",children:r("help.props","Properties")}),x.jsxs("table",{className:"nice-help__props-table",children:[x.jsx("thead",{children:x.jsxs("tr",{children:[x.jsx("th",{children:r("help.propName","Name")}),x.jsx("th",{children:r("help.propType","Type")}),x.jsx("th",{children:r("help.propDefault","Default")}),x.jsx("th",{children:r("help.propDescription","Description")})]})}),x.jsx("tbody",{children:e.map(a=>x.jsxs("tr",{children:[x.jsxs("td",{children:[x.jsx("code",{children:a.name}),a.required&&x.jsx("span",{className:"nice-help__required",title:r("help.required","Required"),children:"*"})]}),x.jsx("td",{children:x.jsx("code",{className:"nice-help__type",children:a.type})}),x.jsx("td",{children:a.default!==void 0?x.jsx("code",{children:String(a.default)}):"—"}),x.jsx("td",{children:a.description})]},a.name))})]})]})},dt=({tips:e})=>{const{t}=j.useNiceTranslation();return!e||e.length===0?null:x.jsxs("div",{className:"nice-help__tips",children:[x.jsx("h4",{className:"nice-help__section-title",children:t("help.tips","Tips")}),x.jsx("ul",{children:e.map((r,a)=>x.jsxs("li",{children:[x.jsx("span",{className:"nice-help__tip-icon",children:x.jsx(N.NiceIcon,{name:"lightbulb",size:14})}),r]},a))})]})},xl=({examples:e})=>{var n,o;const{t}=j.useNiceTranslation(),[r,a]=l.useState(0);return!e||e.length===0?null:x.jsxs("div",{className:"nice-help__examples",children:[x.jsx("h4",{className:"nice-help__section-title",children:t("help.examples","Examples")}),e.length>1&&x.jsx("div",{className:"nice-help__example-tabs",children:e.map((s,i)=>x.jsx("button",{className:`nice-help__example-tab ${r===i?"nice-help__example-tab--active":""}`,onClick:()=>a(i),children:s.title},i))}),x.jsx("pre",{className:"nice-help__code",children:x.jsx("code",{className:`language-${((n=e[r])==null?void 0:n.language)||"tsx"}`,children:(o=e[r])==null?void 0:o.code})})]})},oo=({componentName:e,content:t,children:r,position:a,defaultExpanded:n,disabled:o=!1,className:s,icon:i,title:c,showProps:d=!0,showExamples:u=!1,showTips:f=!0,compact:h=!1})=>{const{t:b}=j.useNiceTranslation(),{content:p,loading:m,enabled:g,loadContent:S,position:y,defaultExpanded:v,showHelpIcon:k}=ao(e),E=t||p,w=a||y,C=n??v,[A,M]=l.useState(C);return l.useEffect(()=>{g&&!t&&!p&&S()},[g,t,p,S]),o||!g?x.jsx(x.Fragment,{children:r}):w==="tooltip"?x.jsxs("div",{className:`nice-help-tooltip-wrapper ${s||""}`,children:[r,k&&E&&x.jsx("button",{className:"nice-help__trigger",onClick:()=>M(!A),"aria-label":b("help.toggle","Toggle help"),"aria-expanded":A,children:i||x.jsx(N.NiceIcon,{name:"help",size:16})}),A&&E&&x.jsx("div",{className:"nice-help__tooltip",children:x.jsxs("div",{className:"nice-help__tooltip-content",children:[x.jsx("h3",{className:"nice-help__title",children:c||E.name}),x.jsx("p",{className:"nice-help__description",children:E.description}),f&&E.tips&&x.jsx(dt,{tips:E.tips}),d&&E.props&&x.jsx(no,{props:E.props,compact:!0})]})})]}):x.jsxs("div",{className:`nice-help ${w==="bottom"?"nice-help--bottom":""} ${s||""}`,children:[w==="top"&&E&&x.jsx(Jt,{content:E,expanded:A,onToggle:()=>M(!A),loading:m,title:c,showProps:d,showExamples:u,showTips:f,compact:h}),r,w==="bottom"&&E&&x.jsx(Jt,{content:E,expanded:A,onToggle:()=>M(!A),loading:m,title:c,showProps:d,showExamples:u,showTips:f,compact:h}),w==="inline"&&E&&A&&x.jsxs("div",{className:"nice-help__inline",children:[x.jsx("p",{className:"nice-help__description",children:E.description}),f&&E.tips&&x.jsx(dt,{tips:E.tips})]})]})};process.env.NODE_ENV!=="production"&&(oo.displayName="NiceInlineHelp");const Jt=({content:e,expanded:t,onToggle:r,loading:a,title:n,showProps:o,showExamples:s,showTips:i,compact:c})=>{const{t:d}=j.useNiceTranslation();return a?x.jsx("div",{className:"nice-help__panel nice-help__panel--loading",children:x.jsx("div",{className:"nice-spinner nice-spinner--sm"})}):x.jsxs("div",{className:`nice-help__panel ${t?"nice-help__panel--expanded":""}`,children:[x.jsxs("button",{className:"nice-help__panel-header",onClick:r,"aria-expanded":t,children:[x.jsx("span",{className:"nice-help__panel-icon",children:x.jsx(N.NiceIcon,{name:t?"chevron-down":"chevron-right",size:14})}),x.jsxs("span",{className:"nice-help__panel-title",children:[n||d("help.about","About")," ",e.name]}),e.status&&x.jsx("span",{className:`nice-help__status nice-help__status--${e.status}`,children:e.status})]}),t&&x.jsxs("div",{className:"nice-help__panel-content",children:[x.jsx("p",{className:"nice-help__description",children:e.description}),i&&e.tips&&x.jsx(dt,{tips:e.tips}),o&&e.props&&x.jsx(no,{props:e.props,compact:c}),s&&e.examples&&x.jsx(xl,{examples:e.examples}),e.seeAlso&&e.seeAlso.length>0&&x.jsxs("div",{className:"nice-help__see-also",children:[x.jsx("h4",{className:"nice-help__section-title",children:d("help.seeAlso","See Also")}),x.jsx("ul",{children:e.seeAlso.map((u,f)=>x.jsx("li",{children:x.jsx("code",{children:u})},f))})]})]})]})},io=({text:e,position:t="top",className:r,children:a})=>{const[n,o]=l.useState(!1);return x.jsxs("span",{className:`nice-quick-help nice-quick-help--${t} ${r||""}`,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),onFocus:()=>o(!0),onBlur:()=>o(!1),children:[a,n&&x.jsx("span",{className:"nice-quick-help__popup",role:"tooltip",children:e})]})};process.env.NODE_ENV!=="production"&&(io.displayName="NiceQuickHelp");const so=({content:e,size:t="sm",className:r,onOpen:a})=>{const{t:n}=j.useNiceTranslation(),[o,s]=l.useState(!1),i=l.useCallback(()=>{s(!o),!o&&a&&a()},[o,a]),c=typeof e=="string"?e:e.description,d=typeof e=="string"?void 0:e.name;return x.jsxs("span",{className:`nice-help-icon nice-help-icon--${t} ${r||""}`,children:[x.jsx("button",{className:"nice-help-icon__btn",onClick:i,"aria-label":n("help.showHelp","Show help"),"aria-expanded":o,children:x.jsx(N.NiceIcon,{name:"help",size:16})}),o&&x.jsxs("div",{className:"nice-help-icon__popup",children:[d&&x.jsx("strong",{children:d}),x.jsx("p",{children:c}),x.jsx("button",{"aria-label":n("help.close","Close"),className:"nice-help-icon__close",onClick:()=>s(!1),children:x.jsx(N.NiceIcon,{name:"close",size:14})})]})]})};process.env.NODE_ENV!=="production"&&(so.displayName="NiceHelpIcon");const Rt=l.createContext({enabled:!0,active:!1,run:()=>{}}),wl=({enabled:e=!0,active:t=!1,onRun:r,children:a})=>{const n=l.useMemo(()=>({enabled:e,active:t,run:r??(()=>{})}),[e,t,r]);return x.jsx(Rt.Provider,{value:n,children:a})};function co(){return l.useContext(Rt)}function kl(){return l.useContext(Rt).enabled}function Cl(e,t){if(!e)return null;if(e===!0)return t&&t.length>0?t:null;if(Array.isArray(e))return e.length>0?e:null;const r=e.steps??t;return r&&r.length>0?r:null}function lo(e,t){return e.map(r=>({target:r.target,title:r.titleKey?t(r.titleKey,r.title??""):r.title??"",content:r.contentKey?t(r.contentKey,r.content??""):r.content??"",placement:r.placement,highlightPadding:r.highlightPadding,showArrow:r.showArrow,scrollIntoView:r.scrollIntoView,disableInteraction:r.disableInteraction}))}const El=({steps:e,autoStart:t,label:r,size:a="md",className:n,style:o,"data-testid":s})=>{Nl();const{enabled:i,run:c}=co(),{t:d}=j.useNiceTranslation();if(!i||!e||e.length===0)return null;const u=r??d("tutorial.startAria","Start tutorial");return x.jsx("button",{type:"button",className:`nice-tutorial-button nice-tutorial-button--${a}`+(n?` ${n}`:""),style:o,"data-testid":s,"aria-label":u,title:u,onClick:()=>c(lo(e,d),{autoStart:t}),children:"?"})},Qt="nice-tutorial-button-styles";function Nl(){if(typeof document>"u"||document.getElementById(Qt))return;const e=document.createElement("style");e.id=Qt,e.textContent=`
41
41
  .nice-tutorial-button {
42
42
  display: inline-flex;
43
43
  align-items: center;
@@ -63,8 +63,8 @@
63
63
  }
64
64
  .nice-tutorial-button--sm { width: 16px; height: 16px; font-size: 11px; }
65
65
  .nice-tutorial-button--md { width: 20px; height: 20px; font-size: 12px; }
66
- `,document.head.appendChild(e)}class fo{constructor(t="ntd-user-preferences"){this.key=t}async load(){try{const t=localStorage.getItem(this.key);return t?JSON.parse(t):null}catch{return null}}async save(t){localStorage.setItem(this.key,JSON.stringify(t))}async clear(){localStorage.removeItem(this.key)}}class Dl{constructor(t="ntd-preferences",r="preferences"){this.db=null,this.dbName=t,this.storeName=r}async getDB(){return this.db?this.db:new Promise((t,r)=>{const a=indexedDB.open(this.dbName,1);a.onerror=()=>r(a.error),a.onsuccess=()=>{this.db=a.result,t(this.db)},a.onupgradeneeded=n=>{const o=n.target.result;o.objectStoreNames.contains(this.storeName)||o.createObjectStore(this.storeName,{keyPath:"id"})}})}async load(){const t=await this.getDB();return new Promise((r,a)=>{const i=t.transaction(this.storeName,"readonly").objectStore(this.storeName).get("user-preferences");i.onerror=()=>a(i.error),i.onsuccess=()=>{var s;return r(((s=i.result)==null?void 0:s.data)||null)}})}async save(t){const r=await this.getDB();return new Promise((a,n)=>{const s=r.transaction(this.storeName,"readwrite").objectStore(this.storeName).put({id:"user-preferences",data:t});s.onerror=()=>n(s.error),s.onsuccess=()=>a()})}async clear(){const t=await this.getDB();return new Promise((r,a)=>{const i=t.transaction(this.storeName,"readwrite").objectStore(this.storeName).delete("user-preferences");i.onerror=()=>a(i.error),i.onsuccess=()=>r()})}}class Hl{constructor(t,r){this.baseUrl=t,this.getAuthHeaders=r}getHeaders(){var t;return{"Content-Type":"application/json",...((t=this.getAuthHeaders)==null?void 0:t.call(this))||{}}}async fetch(){const t=await fetch(`${this.baseUrl}/preferences`,{method:"GET",headers:this.getHeaders()});if(!t.ok){if(t.status===404)return null;throw new Error(`Failed to fetch preferences: ${t.statusText}`)}return t.json()}async push(t){const r=await fetch(`${this.baseUrl}/preferences`,{method:"PUT",headers:this.getHeaders(),body:JSON.stringify(t)});if(!r.ok)throw new Error(`Failed to save preferences: ${r.statusText}`)}async getServerTimestamp(){const t=await fetch(`${this.baseUrl}/preferences/timestamp`,{method:"GET",headers:this.getHeaders()});return t.ok&&(await t.json()).timestamp||0}}const mo=c.createContext(null);function Rt(){const e=c.useContext(mo);if(!e)throw new Error("useUserPreferences must be used within NiceUserPreferencesProvider");return e}function zt(e,t){const{getControlPreferences:r,setControlPreferences:a,updateControlPreferences:n}=Rt(),o=r(e,t),i=c.useCallback(l=>a(e,t,l),[e,t,a]),s=c.useCallback(l=>n(e,t,l),[e,t,n]);return[o,i,s]}function Fl(e){return zt(e,"grid")}function $l(e){return zt(e,"chart")}const Qt={version:1,global:{},controls:{}};function Ol({storage:e=new fo,syncAdapter:t,autoSyncInterval:r=0,saveDebounce:a=500,children:n}){const[o,i]=c.useState(Qt),[s,l]=c.useState(!0),[d,u]=c.useState(!1),[f,h]=c.useState(null),y=c.useRef(void 0),m=c.useRef(void 0);c.useEffect(()=>{let T=!0;return(async()=>{try{const R=await e.load();T&&R&&i(R)}catch(R){T&&h(R instanceof Error?R:new Error("Failed to load preferences"))}finally{T&&l(!1)}})(),()=>{T=!1}},[e]);const p=c.useCallback(T=>{y.current&&clearTimeout(y.current),y.current=setTimeout(async()=>{try{await e.save(T)}catch(N){h(N instanceof Error?N:new Error("Failed to save preferences"))}},a)},[e,a]);c.useEffect(()=>{s||p(o)},[o,s,p]),c.useEffect(()=>{if(t&&r>0)return m.current=setInterval(()=>{k()},r),()=>{m.current&&clearInterval(m.current)}},[t,r]),c.useEffect(()=>()=>{y.current&&clearTimeout(y.current),m.current&&clearInterval(m.current)},[]);const g=c.useCallback((T,N)=>{var R;return(R=o.controls[T])==null?void 0:R[N]},[o]),v=c.useCallback((T,N,R)=>{i(I=>({...I,controls:{...I.controls,[T]:{...I.controls[T],[N]:R,lastModified:Date.now()}}}))},[]),b=c.useCallback((T,N,R)=>{i(I=>{var F;const D=(F=I.controls[T])==null?void 0:F[N],P=typeof D=="object"&&D!==null?{...D,...R}:R;return{...I,controls:{...I.controls,[T]:{...I.controls[T],[N]:P,lastModified:Date.now()}}}})},[]),x=c.useCallback((T,N)=>{i(R=>{if(N){const{[N]:P,...F}=R.controls[T]||{};return{...R,controls:{...R.controls,[T]:F}}}const{[T]:I,...D}=R.controls;return{...R,controls:D}})},[]),w=c.useCallback(T=>o.global[T],[o]),A=c.useCallback((T,N)=>{i(R=>({...R,global:{...R.global,[T]:N}}))},[]),k=c.useCallback(async()=>{if(t){u(!0),h(null);try{const T=await t.getServerTimestamp(),N=o.lastSync||0;if(T>N){const R=await t.fetch();R&&(i({...R,lastSync:Date.now()}),await e.save(R))}else{const R={...o,lastSync:Date.now()};await t.push(R),i(R)}}catch(T){h(T instanceof Error?T:new Error("Sync failed"))}finally{u(!1)}}},[t,o,e]),C=c.useCallback(()=>JSON.stringify(o,null,2),[o]),M=c.useCallback(T=>{try{const N=JSON.parse(T);if(typeof N.version!="number"||!N.controls)throw new Error("Invalid preferences format");i(N)}catch(N){h(N instanceof Error?N:new Error("Import failed"))}},[]),E=c.useCallback(()=>{i(Qt),e.clear()},[e]),L=c.useMemo(()=>({preferences:o,isLoading:s,isSyncing:d,error:f,getControlPreferences:g,setControlPreferences:v,updateControlPreferences:b,clearControlPreferences:x,getGlobalPreferences:w,setGlobalPreferences:A,sync:k,exportPreferences:C,importPreferences:M,resetAllPreferences:E}),[o,s,d,f,g,v,b,x,w,A,k,C,M,E]);return S.jsx(mo.Provider,{value:L,children:n})}function jl({showGlobal:e=!0,showControls:t=!0,showExportImport:r=!0,showSync:a=!0,className:n,style:o}){var A,k,C,M;const{t:i}=_.useNiceTranslation(),{preferences:s,isLoading:l,isSyncing:d,error:u,sync:f,exportPreferences:h,importPreferences:y,resetAllPreferences:m,setGlobalPreferences:p,clearControlPreferences:g}=Rt(),v=c.useRef(null),b=()=>{const E=h(),L=new Blob([E],{type:"application/json"}),T=URL.createObjectURL(L),N=document.createElement("a");N.href=T,N.download="nice2dev-preferences.json",N.click(),URL.revokeObjectURL(T)},x=E=>{var N;const L=(N=E.target.files)==null?void 0:N[0];if(!L)return;const T=new FileReader;T.onload=()=>{y(T.result)},T.readAsText(L)};if(l)return S.jsx("div",{className:n,style:o,children:i("userPreferences.loadingPreferences","Loading preferences...")});const w=Object.keys(s.controls);return S.jsxs("div",{className:`ntd-preferences-panel ${n||""}`,style:{fontFamily:"system-ui, sans-serif",fontSize:"14px",padding:"16px",...o},children:[u&&S.jsx("div",{style:{padding:"12px",marginBottom:"16px",background:"var(--nice-danger-bg, #fef2f2)",border:"1px solid var(--nice-danger-bg, #fecaca)",borderRadius:"6px",color:"var(--nice-color-error, #dc2626)"},children:u.message}),S.jsxs("div",{style:{display:"flex",gap:"8px",marginBottom:"20px",flexWrap:"wrap"},children:[a&&S.jsx("button",{onClick:f,disabled:d,style:{padding:"8px 16px",border:"1px solid var(--nice-border-color, #e5e7eb)",borderRadius:"6px",background:"var(--nice-bg-primary, #fff)",cursor:d?"wait":"pointer"},children:d?"Syncing...":"Sync"}),r&&S.jsxs(S.Fragment,{children:[S.jsx("button",{onClick:b,style:{padding:"8px 16px",border:"1px solid var(--nice-border-color, #e5e7eb)",borderRadius:"6px",background:"var(--nice-bg-primary, #fff)",cursor:"pointer"},children:i("userPreferences.export","Export")}),S.jsx("button",{onClick:()=>{var E;return(E=v.current)==null?void 0:E.click()},style:{padding:"8px 16px",border:"1px solid var(--nice-border-color, #e5e7eb)",borderRadius:"6px",background:"var(--nice-bg-primary, #fff)",cursor:"pointer"},children:i("userPreferences.import","Import")}),S.jsx("input",{ref:v,type:"file",accept:".json",onChange:x,style:{display:"none"}})]}),S.jsx("button",{onClick:m,style:{padding:"8px 16px",border:"1px solid var(--nice-danger-dark, #dc2626)",borderRadius:"6px",background:"var(--nice-danger-bg, #fef2f2)",color:"var(--nice-color-error, #dc2626)",cursor:"pointer",marginLeft:"auto"},children:i("userPreferences.resetAll","Reset All")})]}),e&&S.jsxs("div",{style:{marginBottom:"24px"},children:[S.jsx("h3",{style:{margin:"0 0 12px",fontSize:"16px",fontWeight:600},children:i("userPreferences.globalPreferences","Global Preferences")}),S.jsxs("div",{style:{display:"grid",gap:"12px"},children:[S.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[S.jsx("input",{type:"checkbox",checked:((A=s.global.display)==null?void 0:A.reducedMotion)||!1,onChange:E=>p("display",{...s.global.display,reducedMotion:E.target.checked})}),i("userPreferences.reducedMotion","Reduced motion")]}),S.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[S.jsx("input",{type:"checkbox",checked:((k=s.global.display)==null?void 0:k.highContrast)||!1,onChange:E=>p("display",{...s.global.display,highContrast:E.target.checked})}),i("userPreferences.highContrast","High contrast")]}),S.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"8px"},children:["Font scale:",S.jsx("input",{type:"range",min:"0.8",max:"1.5",step:"0.1",value:((C=s.global.display)==null?void 0:C.fontScale)||1,onChange:E=>p("display",{...s.global.display,fontScale:parseFloat(E.target.value)}),style:{flex:1}}),S.jsxs("span",{children:[((((M=s.global.display)==null?void 0:M.fontScale)||1)*100).toFixed(0),"%"]})]})]})]}),t&&w.length>0&&S.jsxs("div",{children:[S.jsxs("h3",{style:{margin:"0 0 12px",fontSize:"16px",fontWeight:600},children:["Control Preferences (",w.length,")"]}),S.jsx("div",{style:{display:"grid",gap:"8px"},children:w.map(E=>{const L=s.controls[E],T=Object.keys(L).filter(N=>N!=="lastModified");return S.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 12px",background:"var(--nice-bg-secondary, #f9fafb)",borderRadius:"6px"},children:[S.jsxs("div",{children:[S.jsx("div",{style:{fontWeight:500},children:E}),S.jsx("div",{style:{fontSize:"12px",color:"var(--nice-text-muted, #6b7280)"},children:T.join(", ")})]}),S.jsx("button",{onClick:()=>g(E),style:{padding:"4px 8px",border:"none",borderRadius:"4px",background:"var(--nice-border-color, #e5e7eb)",cursor:"pointer",fontSize:"12px"},children:i("userPreferences.clear","Clear")})]},E)})})]}),t&&w.length===0&&S.jsx("div",{style:{color:"var(--nice-text-muted, #6b7280)",fontStyle:"italic"},children:i("userPreferences.noControlPreferencesSavedYet","No control preferences saved yet.")})]})}const Bl={cookiesAllowed:!1,localStorageAllowed:!1,sessionStorageAllowed:!1,strictAuthCookieOnly:!1,effectiveMode:"traceless",source:"default",requiresConsentBanner:!1,resolvedAt:Date.now(),version:"1.0.0"},po={traceless:{cookiesAllowed:!1,localStorageAllowed:!1,sessionStorageAllowed:!1,strictAuthCookieOnly:!1,effectiveMode:"traceless",requiresConsentBanner:!1},ephemeral:{cookiesAllowed:!1,localStorageAllowed:!1,sessionStorageAllowed:!0,strictAuthCookieOnly:!1,effectiveMode:"ephemeral",requiresConsentBanner:!1},private:{cookiesAllowed:!1,localStorageAllowed:!1,sessionStorageAllowed:!0,strictAuthCookieOnly:!0,effectiveMode:"private",requiresConsentBanner:!1},balanced:{cookiesAllowed:!1,localStorageAllowed:!0,sessionStorageAllowed:!0,strictAuthCookieOnly:!1,effectiveMode:"balanced",requiresConsentBanner:!0},full:{cookiesAllowed:!0,localStorageAllowed:!0,sessionStorageAllowed:!0,strictAuthCookieOnly:!1,effectiveMode:"full",requiresConsentBanner:!0},custom:{cookiesAllowed:!1,localStorageAllowed:!1,sessionStorageAllowed:!1,strictAuthCookieOnly:!1,effectiveMode:"custom",requiresConsentBanner:!1}},pe=["traceless","ephemeral","private","balanced","full","custom"];function _l(e,t){const r=pe.indexOf(e),a=pe.indexOf(t);return r<=a?e:t}function Te(e,t){const r=pe.indexOf(e),a=pe.indexOf(t);return r<=a}function Wl(e,t,r,a){let n=e.defaultMode,o="instance";t&&e.allowTenantOverride&&Te(t.mode,n)&&(n=t.mode,o="tenant"),r&&(t!=null&&t.allowGroupOverride)&&Te(r.mode,n)&&(n=r.mode,o="group"),a&&(t!=null&&t.allowUserOverride||r!=null&&r.allowUserLockdown)&&Te(a.preferredMode,n)&&(n=a.preferredMode,o="user");const i=po[n],s={...i,cookiesAllowed:i.cookiesAllowed&&e.maxCookies,localStorageAllowed:i.localStorageAllowed&&e.maxLocalStorage,sessionStorageAllowed:i.sessionStorageAllowed&&e.maxSessionStorage,source:o,resolvedAt:Date.now(),version:"1.0.0"};return a&&(a.restrictCookies&&(s.cookiesAllowed=!1),a.restrictLocalStorage&&(s.localStorageAllowed=!1),a.restrictSessionStorage&&(s.sessionStorageAllowed=!1)),s.effectiveMode=It(s),s.requiresConsentBanner=go(s),s}function It(e){const{cookiesAllowed:t,localStorageAllowed:r,sessionStorageAllowed:a,strictAuthCookieOnly:n}=e;return!t&&!r&&!a?"traceless":!t&&!r&&a&&!n?"ephemeral":!t&&!r&&a&&n?"private":!t&&r&&a?"balanced":t&&r&&a?"full":"custom"}function go(e){return!e.cookiesAllowed&&!e.localStorageAllowed?!1:e.effectiveMode==="full"||e.effectiveMode==="balanced"}const ho=new Map;class yo{constructor(t,r="nice2dev",a="local"){this.policy=t,this.namespace=r,this.defaultBackend=a}getBackend(t){const r=t||this.defaultBackend;if(r==="local"&&this.policy.localStorageAllowed)try{if(typeof localStorage<"u")return localStorage}catch{}if((r==="session"||r==="local")&&this.policy.sessionStorageAllowed)try{if(typeof sessionStorage<"u")return sessionStorage}catch{}return ho}getKey(t){return`${this.namespace}:${t}`}get(t,r){const a=this.getBackend(r),n=this.getKey(t);try{const o=a instanceof Map?a.get(n):a.getItem(n);if(o==null)return null;try{return JSON.parse(o)}catch{return o}}catch{return null}}set(t,r,a){const n=this.getBackend(a),o=this.getKey(t);try{const i=typeof r=="string"?r:JSON.stringify(r);return n instanceof Map?n.set(o,i):n.setItem(o,i),!0}catch{return!1}}remove(t,r){const a=this.getBackend(r),n=this.getKey(t);try{return a instanceof Map?a.delete(n):(a.removeItem(n),!0)}catch{return!1}}clear(t){const r=this.getBackend(t),a=`${this.namespace}:`;try{if(r instanceof Map)for(const n of r.keys())n.startsWith(a)&&r.delete(n);else{const n=[];for(let o=0;o<r.length;o++){const i=r.key(o);i&&i.startsWith(a)&&n.push(i)}n.forEach(o=>r.removeItem(o))}}catch{}}keys(t){const r=this.getBackend(t),a=`${this.namespace}:`,n=[];try{if(r instanceof Map)for(const o of r.keys())o.startsWith(a)&&n.push(o.slice(a.length));else for(let o=0;o<r.length;o++){const i=r.key(o);i&&i.startsWith(a)&&n.push(i.slice(a.length))}}catch{}return n}has(t,r){return this.get(t,r)!==null}getCapabilities(){return{canUseCookies:this.policy.cookiesAllowed,canUseLocalStorage:this.policy.localStorageAllowed,canUseSessionStorage:this.policy.sessionStorageAllowed,canPersist:this.policy.localStorageAllowed,effectiveMode:this.policy.effectiveMode,actualBackend:this.getActualBackendType()}}getActualBackendType(){const t=this.getBackend();return t instanceof Map?"memory":t===sessionStorage?"session":"local"}updatePolicy(t){this.policy=t}}function Vl(e,t){const{cookies:r,localStorage:a,storageMode:n}=t,o={...e};if(n&&n!=="auto")switch(n){case"traceless":o.cookiesAllowed=!1,o.localStorageAllowed=!1,o.sessionStorageAllowed=!1;break;case"ephemeral":o.cookiesAllowed=!1,o.localStorageAllowed=!1;break}return r===!1&&(o.cookiesAllowed=!1),a===!1&&(o.localStorageAllowed=!1),o.effectiveMode=It(o),o.source="control",o}function Xl(e,t,r){return{generatedAt:new Date().toISOString(),instanceId:t,tenantId:r,effectiveMode:e.effectiveMode,cookies:{count:0,allowed:e.cookiesAllowed,strictAuthOnly:e.strictAuthCookieOnly,thirdParty:!1,tracking:!1},localStorage:{bytesUsed:0,allowed:e.localStorageAllowed,keysCount:0},sessionStorage:{bytesUsed:0,allowed:e.sessionStorageAllowed,keysCount:0},consentBanner:{required:e.requiresConsentBanner,shown:e.requiresConsentBanner},compliance:{ePrivacyCompliant:!e.cookiesAllowed||e.requiresConsentBanner,gdprCompliant:!0,pecrCompliant:!e.cookiesAllowed||e.requiresConsentBanner},statement:Ul(e)}}function Ul(e){return e.effectiveMode==="traceless"?"This OmniVerk instance operates in Traceless™ mode. No cookies are set (0), no data is saved to localStorage (0), and no sessionStorage is used (0). No cookie consent banner is required under ePrivacy Directive Art. 5(3) as no similar technologies are employed.":e.effectiveMode==="ephemeral"?"This OmniVerk instance operates in Ephemeral mode. No cookies are set, no localStorage is used. sessionStorage is used for session-only data that is automatically cleared when the browser tab is closed. No cookie consent banner is required.":e.effectiveMode==="private"?"This OmniVerk instance operates in Private mode. One strictly necessary httpOnly authentication cookie may be set. sessionStorage is used for session preferences. No consent banner is required as only strictly necessary technologies are used.":e.effectiveMode==="balanced"?"This OmniVerk instance operates in Balanced mode. localStorage is used for user preferences. sessionStorage is used for session data. No cookies are set. Depending on jurisdiction, a consent banner may be shown.":"This OmniVerk instance operates in Full mode. Cookies, localStorage, and sessionStorage are enabled. A consent banner is displayed to users before any non-essential storage is used."}function ql(e){const{effectiveMode:t}=e;switch(t){case"traceless":return{mode:"traceless",icon:"eye-off",color:"var(--nice-success, #10b981)",label:"Traceless™",tooltip:"Your data is not stored on this device. Zero cookies, zero localStorage, zero traces.",cssClass:"nice-traceless-badge--traceless"};case"ephemeral":return{mode:"ephemeral",icon:"clock",color:"var(--nice-primary, #3b82f6)",label:"Ephemeral",tooltip:"Session-only storage. Data is cleared when you close this tab.",cssClass:"nice-traceless-badge--ephemeral"};case"private":return{mode:"private",icon:"lock",color:"var(--nice-warning, #eab308)",label:"Private",tooltip:"Minimal storage with one secure authentication cookie.",cssClass:"nice-traceless-badge--private"};case"balanced":return{mode:"balanced",icon:"scale",color:"var(--nice-warning, #f97316)",label:"Balanced",tooltip:"Preferences are saved locally. No tracking cookies.",cssClass:"nice-traceless-badge--balanced"};case"full":return{mode:"full",icon:"database",color:"var(--nice-danger, #ef4444)",label:"Full",tooltip:"All storage enabled including analytics. You control what is stored via consent.",cssClass:"nice-traceless-badge--full"};case"custom":default:return{mode:"custom",icon:"settings",color:"var(--nice-text-secondary, #6b7280)",label:"Custom",tooltip:"Custom storage configuration.",cssClass:"nice-traceless-badge--custom"}}}function Gl(e,t){const r=e.localStorageAllowed,a=e.sessionStorageAllowed,o={preferences:{message:"Your preferences will reset when you close this tab.",key:"traceless.warning.preferences"},draft:{message:"Unsaved draft will be lost if you close or refresh this page.",key:"traceless.warning.draft"},history:{message:"Search history is not saved in this privacy mode.",key:"traceless.warning.history"},auth:{message:"You will need to log in again each time you visit.",key:"traceless.warning.auth"},"grid-state":{message:"Table settings (sorting, filtering, columns) will reset on page refresh.",key:"traceless.warning.gridState"}}[t];return!r&&!a?{canPersist:!1,canSession:!1,warningMessage:o.message,warningKey:o.key}:!r&&a?{canPersist:!1,canSession:!0,warningMessage:t!=="auth"?o.message:void 0,warningKey:t!=="auth"?o.key:void 0}:{canPersist:!0,canSession:!0}}const Kl="X-OmniVerk-Storage-Policy";function Jl(e){const t=e.toLowerCase().trim();return pe.includes(t)?t:null}function Yl(e){return e.effectiveMode}function Ql(e,t){return new yo(e,t)}function Zl(e){return{maxCookies:!1,maxLocalStorage:!1,maxSessionStorage:!0,defaultMode:"ephemeral",allowTenantOverride:!1,instanceId:e}}function ed(e){return{maxCookies:!0,maxLocalStorage:!0,maxSessionStorage:!0,defaultMode:"balanced",allowTenantOverride:!0,instanceId:e}}function td(){if(typeof document<"u"){const e=document.cookie.split(";");for(const t of e){const r=t.split("=")[0].trim();document.cookie=`${r}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`}}try{typeof localStorage<"u"&&localStorage.clear()}catch{}try{typeof sessionStorage<"u"&&sessionStorage.clear()}catch{}ho.clear()}function rd(e){const t=[];if(!e.cookiesAllowed&&typeof document<"u"){const r=document.cookie;r&&r.length>0&&t.push({type:"cookie",severity:"high",message:`Cookies found but not allowed: ${r.split(";").length} cookie(s)`,data:r})}if(!e.localStorageAllowed)try{typeof localStorage<"u"&&localStorage.length>0&&t.push({type:"localStorage",severity:"high",message:`localStorage has ${localStorage.length} item(s) but not allowed`})}catch{}if(!e.sessionStorageAllowed)try{typeof sessionStorage<"u"&&sessionStorage.length>0&&t.push({type:"sessionStorage",severity:"medium",message:`sessionStorage has ${sessionStorage.length} item(s) but not allowed`})}catch{}return{compliant:t.length===0,violations:t,auditedAt:Date.now(),policy:e.effectiveMode}}const bo=c.createContext(null),ad=({config:e,children:t})=>{const[r,a]=c.useState(!1),[n,o]=c.useState(null),i=c.useRef(null);c.useEffect(()=>()=>{var m;(m=i.current)==null||m.abort()},[]);const s=c.useCallback(()=>{var m;(m=i.current)==null||m.abort(),i.current=null,a(!1)},[]),l=async(m,p,g)=>{var x,w,A,k,C,M;const v=new TextDecoder;let b="";for(;;){const{done:E,value:L}=await m.read();if(E)break;b+=v.decode(L,{stream:!0});const T=b.split(`
67
- `);b=T.pop()||"";for(const N of T)if(N.startsWith("data: ")){const R=N.slice(6).trim();if(R==="[DONE]"){p({content:"",done:!0});return}try{const I=JSON.parse(R);let D="",P=!1;g==="openai"||g==="azure-openai"?(D=((A=(w=(x=I.choices)==null?void 0:x[0])==null?void 0:w.delta)==null?void 0:A.content)||"",P=((C=(k=I.choices)==null?void 0:k[0])==null?void 0:C.finish_reason)==="stop"):g==="anthropic"&&(I.type==="content_block_delta"?D=((M=I.delta)==null?void 0:M.text)||"":I.type==="message_stop"&&(P=!0)),(D||P)&&p({content:D,done:P})}catch{}}}p({content:"",done:!0})},d=(m,p)=>{var g;return{model:p.model||e.defaultModel||"gpt-4",messages:p.systemPrompt?[{role:"system",content:p.systemPrompt},...m]:m,temperature:p.temperature??.7,max_tokens:p.maxTokens,stop:p.stop,stream:p.stream??!1,tools:(g=p.tools)==null?void 0:g.map(v=>({type:"function",function:{name:v.name,description:v.description,parameters:v.parameters}}))}},u=(m,p)=>{var b;const g=p.systemPrompt||((b=m.find(x=>x.role==="system"))==null?void 0:b.content),v=m.filter(x=>x.role!=="system");return{model:p.model||e.defaultModel||"claude-3-opus-20240229",max_tokens:p.maxTokens||4096,system:g,messages:v.map(x=>({role:x.role==="assistant"?"assistant":"user",content:x.content})),temperature:p.temperature??.7,stop_sequences:p.stop,stream:p.stream??!1}},f=c.useCallback(async(m,p={})=>{var g,v,b,x,w,A;if(e.provider==="custom"&&e.customHandler)return e.customHandler(m,p);a(!0),o(null),i.current=new AbortController;try{let k,C,M;if(e.provider==="openai")k=e.endpoint||"https://api.openai.com/v1/chat/completions",C={"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`,...e.organizationId&&{"OpenAI-Organization":e.organizationId},...e.headers},M=d(m,{...p,stream:!1});else if(e.provider==="azure-openai")k=e.endpoint||"",C={"Content-Type":"application/json","api-key":e.apiKey||"",...e.headers},M=d(m,{...p,stream:!1});else if(e.provider==="anthropic")k=e.endpoint||"https://api.anthropic.com/v1/messages",C={"Content-Type":"application/json","x-api-key":e.apiKey||"","anthropic-version":"2023-06-01",...e.headers},M=u(m,{...p,stream:!1});else throw new Error(`Unsupported provider: ${e.provider}`);const E=await fetch(k,{method:"POST",headers:C,body:JSON.stringify(M),signal:i.current.signal});if(!E.ok){const N=await E.text();throw new Error(`AI request failed: ${E.status} ${N}`)}const L=await E.json();let T;if(e.provider==="openai"||e.provider==="azure-openai"){const N=(g=L.choices)==null?void 0:g[0];T={content:((v=N==null?void 0:N.message)==null?void 0:v.content)||"",finishReason:(N==null?void 0:N.finish_reason)||"stop",toolCalls:(x=(b=N==null?void 0:N.message)==null?void 0:b.tool_calls)==null?void 0:x.map(R=>({id:R.id,name:R.function.name,arguments:JSON.parse(R.function.arguments)})),usage:L.usage&&{promptTokens:L.usage.prompt_tokens,completionTokens:L.usage.completion_tokens,totalTokens:L.usage.total_tokens}}}else e.provider==="anthropic"?T={content:((A=(w=L.content)==null?void 0:w[0])==null?void 0:A.text)||"",finishReason:L.stop_reason||"stop",usage:L.usage&&{promptTokens:L.usage.input_tokens,completionTokens:L.usage.output_tokens,totalTokens:L.usage.input_tokens+L.usage.output_tokens}}:T={content:"",finishReason:"stop"};return T}catch(k){throw k.name==="AbortError"?new Error("Request cancelled"):(o(k),k)}finally{a(!1)}},[e]),h=c.useCallback(async(m,p,g={})=>{if(e.provider==="custom"&&e.customStreamHandler)return e.customStreamHandler(m,g,p);a(!0),o(null),i.current=new AbortController;try{let v,b,x;if(e.provider==="openai")v=e.endpoint||"https://api.openai.com/v1/chat/completions",b={"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`,...e.organizationId&&{"OpenAI-Organization":e.organizationId},...e.headers},x=d(m,{...g,stream:!0});else if(e.provider==="azure-openai")v=e.endpoint||"",b={"Content-Type":"application/json","api-key":e.apiKey||"",...e.headers},x=d(m,{...g,stream:!0});else if(e.provider==="anthropic")v=e.endpoint||"https://api.anthropic.com/v1/messages",b={"Content-Type":"application/json","x-api-key":e.apiKey||"","anthropic-version":"2023-06-01",...e.headers},x=u(m,{...g,stream:!0});else throw new Error(`Unsupported provider: ${e.provider}`);const w=await fetch(v,{method:"POST",headers:b,body:JSON.stringify(x),signal:i.current.signal});if(!w.ok){const k=await w.text();throw new Error(`AI request failed: ${w.status} ${k}`)}if(!w.body)throw new Error("Response body is null");const A=w.body.getReader();await l(A,p,e.provider)}catch(v){if(v.name==="AbortError"){p({content:"",done:!0});return}throw o(v),v}finally{a(!1)}},[e]),y={isConfigured:!!e.apiKey||e.provider==="custom"||e.provider==="local",provider:e.provider,defaultModel:e.defaultModel||null,complete:f,stream:h,cancel:s,isLoading:r,error:n};return S.jsx(bo.Provider,{value:y,children:t})};function ue(){const e=c.useContext(bo);if(!e)throw new Error("useNiceAI must be used within a NiceAIProvider");return e}function nd(e={}){const t=ue(),[r,a]=c.useState(""),[n,o]=c.useState([]),[i,s]=c.useState(!1),[l,d]=c.useState(null),u=c.useCallback(async p=>{s(!0),d(null),a("");const g=[...n,{role:"user",content:p}];try{const v=await t.complete(g,{systemPrompt:e.systemPrompt,model:e.model,temperature:e.temperature});return o([...g,{role:"assistant",content:v.content}]),a(v.content),v.content}catch(v){throw d(v),v}finally{s(!1)}},[t,n,e]),f=c.useCallback(async(p,g)=>{s(!0),d(null),a("");const v=[...n,{role:"user",content:p}];try{let b="";return await t.stream(v,x=>{x.done||(b+=x.content,a(b),g==null||g(x.content))},{systemPrompt:e.systemPrompt,model:e.model,temperature:e.temperature}),o([...v,{role:"assistant",content:b}]),b}catch(b){throw d(b),b}finally{s(!1)}},[t,n,e]),h=c.useCallback(()=>{a(""),d(null)},[]),y=c.useCallback(()=>{o([]),a(""),d(null)},[]),m=c.useCallback(()=>{t.cancel(),s(!1)},[t]);return{response:r,isLoading:i,error:l,send:u,sendStreaming:f,clear:h,cancel:m,history:n,clearHistory:y}}function od(e={}){const t=ue(),[r,a]=c.useState(""),[n,o]=c.useState(!1),i=c.useCallback(async(u,f="")=>{o(!0),a("");try{const y=(await t.complete([{role:"user",content:`Complete the following ${e.language||""} code. Return ONLY the completion text, no explanation.
66
+ `,document.head.appendChild(e)}const Al={cookiesAllowed:!1,localStorageAllowed:!1,sessionStorageAllowed:!1,strictAuthCookieOnly:!1,effectiveMode:"traceless",source:"default",requiresConsentBanner:!1,resolvedAt:Date.now(),version:"1.0.0"},uo={traceless:{cookiesAllowed:!1,localStorageAllowed:!1,sessionStorageAllowed:!1,strictAuthCookieOnly:!1,effectiveMode:"traceless",requiresConsentBanner:!1},ephemeral:{cookiesAllowed:!1,localStorageAllowed:!1,sessionStorageAllowed:!0,strictAuthCookieOnly:!1,effectiveMode:"ephemeral",requiresConsentBanner:!1},private:{cookiesAllowed:!1,localStorageAllowed:!1,sessionStorageAllowed:!0,strictAuthCookieOnly:!0,effectiveMode:"private",requiresConsentBanner:!1},balanced:{cookiesAllowed:!1,localStorageAllowed:!0,sessionStorageAllowed:!0,strictAuthCookieOnly:!1,effectiveMode:"balanced",requiresConsentBanner:!0},full:{cookiesAllowed:!0,localStorageAllowed:!0,sessionStorageAllowed:!0,strictAuthCookieOnly:!1,effectiveMode:"full",requiresConsentBanner:!0},custom:{cookiesAllowed:!1,localStorageAllowed:!1,sessionStorageAllowed:!1,strictAuthCookieOnly:!1,effectiveMode:"custom",requiresConsentBanner:!1}},me=["traceless","ephemeral","private","balanced","full","custom"];function Ml(e,t){const r=me.indexOf(e),a=me.indexOf(t);return r<=a?e:t}function Le(e,t){const r=me.indexOf(e),a=me.indexOf(t);return r<=a}function Tl(e,t,r,a){let n=e.defaultMode,o="instance";t&&e.allowTenantOverride&&Le(t.mode,n)&&(n=t.mode,o="tenant"),r&&(t!=null&&t.allowGroupOverride)&&Le(r.mode,n)&&(n=r.mode,o="group"),a&&(t!=null&&t.allowUserOverride||r!=null&&r.allowUserLockdown)&&Le(a.preferredMode,n)&&(n=a.preferredMode,o="user");const s=uo[n],i={...s,cookiesAllowed:s.cookiesAllowed&&e.maxCookies,localStorageAllowed:s.localStorageAllowed&&e.maxLocalStorage,sessionStorageAllowed:s.sessionStorageAllowed&&e.maxSessionStorage,source:o,resolvedAt:Date.now(),version:"1.0.0"};return a&&(a.restrictCookies&&(i.cookiesAllowed=!1),a.restrictLocalStorage&&(i.localStorageAllowed=!1),a.restrictSessionStorage&&(i.sessionStorageAllowed=!1)),i.effectiveMode=Lt(i),i.requiresConsentBanner=fo(i),i}function Lt(e){const{cookiesAllowed:t,localStorageAllowed:r,sessionStorageAllowed:a,strictAuthCookieOnly:n}=e;return!t&&!r&&!a?"traceless":!t&&!r&&a&&!n?"ephemeral":!t&&!r&&a&&n?"private":!t&&r&&a?"balanced":t&&r&&a?"full":"custom"}function fo(e){return!e.cookiesAllowed&&!e.localStorageAllowed?!1:e.effectiveMode==="full"||e.effectiveMode==="balanced"}const mo=new Map;class po{constructor(t,r="nice2dev",a="local"){this.policy=t,this.namespace=r,this.defaultBackend=a}getBackend(t){const r=t||this.defaultBackend;if(r==="local"&&this.policy.localStorageAllowed)try{if(typeof localStorage<"u")return localStorage}catch{}if((r==="session"||r==="local")&&this.policy.sessionStorageAllowed)try{if(typeof sessionStorage<"u")return sessionStorage}catch{}return mo}getKey(t){return`${this.namespace}:${t}`}get(t,r){const a=this.getBackend(r),n=this.getKey(t);try{const o=a instanceof Map?a.get(n):a.getItem(n);if(o==null)return null;try{return JSON.parse(o)}catch{return o}}catch{return null}}set(t,r,a){const n=this.getBackend(a),o=this.getKey(t);try{const s=typeof r=="string"?r:JSON.stringify(r);return n instanceof Map?n.set(o,s):n.setItem(o,s),!0}catch{return!1}}remove(t,r){const a=this.getBackend(r),n=this.getKey(t);try{return a instanceof Map?a.delete(n):(a.removeItem(n),!0)}catch{return!1}}clear(t){const r=this.getBackend(t),a=`${this.namespace}:`;try{if(r instanceof Map)for(const n of r.keys())n.startsWith(a)&&r.delete(n);else{const n=[];for(let o=0;o<r.length;o++){const s=r.key(o);s&&s.startsWith(a)&&n.push(s)}n.forEach(o=>r.removeItem(o))}}catch{}}keys(t){const r=this.getBackend(t),a=`${this.namespace}:`,n=[];try{if(r instanceof Map)for(const o of r.keys())o.startsWith(a)&&n.push(o.slice(a.length));else for(let o=0;o<r.length;o++){const s=r.key(o);s&&s.startsWith(a)&&n.push(s.slice(a.length))}}catch{}return n}has(t,r){return this.get(t,r)!==null}getCapabilities(){return{canUseCookies:this.policy.cookiesAllowed,canUseLocalStorage:this.policy.localStorageAllowed,canUseSessionStorage:this.policy.sessionStorageAllowed,canPersist:this.policy.localStorageAllowed,effectiveMode:this.policy.effectiveMode,actualBackend:this.getActualBackendType()}}getActualBackendType(){const t=this.getBackend();return t instanceof Map?"memory":t===sessionStorage?"session":"local"}updatePolicy(t){this.policy=t}}function Il(e,t){const{cookies:r,localStorage:a,storageMode:n}=t,o={...e};if(n&&n!=="auto")switch(n){case"traceless":o.cookiesAllowed=!1,o.localStorageAllowed=!1,o.sessionStorageAllowed=!1;break;case"ephemeral":o.cookiesAllowed=!1,o.localStorageAllowed=!1;break}return r===!1&&(o.cookiesAllowed=!1),a===!1&&(o.localStorageAllowed=!1),o.effectiveMode=Lt(o),o.source="control",o}function Rl(e,t,r){return{generatedAt:new Date().toISOString(),instanceId:t,tenantId:r,effectiveMode:e.effectiveMode,cookies:{count:0,allowed:e.cookiesAllowed,strictAuthOnly:e.strictAuthCookieOnly,thirdParty:!1,tracking:!1},localStorage:{bytesUsed:0,allowed:e.localStorageAllowed,keysCount:0},sessionStorage:{bytesUsed:0,allowed:e.sessionStorageAllowed,keysCount:0},consentBanner:{required:e.requiresConsentBanner,shown:e.requiresConsentBanner},compliance:{ePrivacyCompliant:!e.cookiesAllowed||e.requiresConsentBanner,gdprCompliant:!0,pecrCompliant:!e.cookiesAllowed||e.requiresConsentBanner},statement:Ll(e)}}function Ll(e){return e.effectiveMode==="traceless"?"This OmniVerk instance operates in Traceless™ mode. No cookies are set (0), no data is saved to localStorage (0), and no sessionStorage is used (0). No cookie consent banner is required under ePrivacy Directive Art. 5(3) as no similar technologies are employed.":e.effectiveMode==="ephemeral"?"This OmniVerk instance operates in Ephemeral mode. No cookies are set, no localStorage is used. sessionStorage is used for session-only data that is automatically cleared when the browser tab is closed. No cookie consent banner is required.":e.effectiveMode==="private"?"This OmniVerk instance operates in Private mode. One strictly necessary httpOnly authentication cookie may be set. sessionStorage is used for session preferences. No consent banner is required as only strictly necessary technologies are used.":e.effectiveMode==="balanced"?"This OmniVerk instance operates in Balanced mode. localStorage is used for user preferences. sessionStorage is used for session data. No cookies are set. Depending on jurisdiction, a consent banner may be shown.":"This OmniVerk instance operates in Full mode. Cookies, localStorage, and sessionStorage are enabled. A consent banner is displayed to users before any non-essential storage is used."}function Fl(e){const{effectiveMode:t}=e;switch(t){case"traceless":return{mode:"traceless",icon:"eye-off",color:"var(--nice-success, #10b981)",label:"Traceless™",tooltip:"Your data is not stored on this device. Zero cookies, zero localStorage, zero traces.",cssClass:"nice-traceless-badge--traceless"};case"ephemeral":return{mode:"ephemeral",icon:"clock",color:"var(--nice-primary, #3b82f6)",label:"Ephemeral",tooltip:"Session-only storage. Data is cleared when you close this tab.",cssClass:"nice-traceless-badge--ephemeral"};case"private":return{mode:"private",icon:"lock",color:"var(--nice-warning, #eab308)",label:"Private",tooltip:"Minimal storage with one secure authentication cookie.",cssClass:"nice-traceless-badge--private"};case"balanced":return{mode:"balanced",icon:"scale",color:"var(--nice-warning, #f97316)",label:"Balanced",tooltip:"Preferences are saved locally. No tracking cookies.",cssClass:"nice-traceless-badge--balanced"};case"full":return{mode:"full",icon:"database",color:"var(--nice-danger, #ef4444)",label:"Full",tooltip:"All storage enabled including analytics. You control what is stored via consent.",cssClass:"nice-traceless-badge--full"};case"custom":default:return{mode:"custom",icon:"settings",color:"var(--nice-text-secondary, #6b7280)",label:"Custom",tooltip:"Custom storage configuration.",cssClass:"nice-traceless-badge--custom"}}}function Dl(e,t){const r=e.localStorageAllowed,a=e.sessionStorageAllowed,o={preferences:{message:"Your preferences will reset when you close this tab.",key:"traceless.warning.preferences"},draft:{message:"Unsaved draft will be lost if you close or refresh this page.",key:"traceless.warning.draft"},history:{message:"Search history is not saved in this privacy mode.",key:"traceless.warning.history"},auth:{message:"You will need to log in again each time you visit.",key:"traceless.warning.auth"},"grid-state":{message:"Table settings (sorting, filtering, columns) will reset on page refresh.",key:"traceless.warning.gridState"}}[t];return!r&&!a?{canPersist:!1,canSession:!1,warningMessage:o.message,warningKey:o.key}:!r&&a?{canPersist:!1,canSession:!0,warningMessage:t!=="auth"?o.message:void 0,warningKey:t!=="auth"?o.key:void 0}:{canPersist:!0,canSession:!0}}const Pl="X-OmniVerk-Storage-Policy";function zl(e){const t=e.toLowerCase().trim();return me.includes(t)?t:null}function $l(e){return e.effectiveMode}function Hl(e,t){return new po(e,t)}function _l(e){return{maxCookies:!1,maxLocalStorage:!1,maxSessionStorage:!0,defaultMode:"ephemeral",allowTenantOverride:!1,instanceId:e}}function Ol(e){return{maxCookies:!0,maxLocalStorage:!0,maxSessionStorage:!0,defaultMode:"balanced",allowTenantOverride:!0,instanceId:e}}function Bl(){if(typeof document<"u"){const e=document.cookie.split(";");for(const t of e){const r=t.split("=")[0].trim();document.cookie=`${r}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`}}try{typeof localStorage<"u"&&localStorage.clear()}catch{}try{typeof sessionStorage<"u"&&sessionStorage.clear()}catch{}mo.clear()}function jl(e){const t=[];if(!e.cookiesAllowed&&typeof document<"u"){const r=document.cookie;r&&r.length>0&&t.push({type:"cookie",severity:"high",message:`Cookies found but not allowed: ${r.split(";").length} cookie(s)`,data:r})}if(!e.localStorageAllowed)try{typeof localStorage<"u"&&localStorage.length>0&&t.push({type:"localStorage",severity:"high",message:`localStorage has ${localStorage.length} item(s) but not allowed`})}catch{}if(!e.sessionStorageAllowed)try{typeof sessionStorage<"u"&&sessionStorage.length>0&&t.push({type:"sessionStorage",severity:"medium",message:`sessionStorage has ${sessionStorage.length} item(s) but not allowed`})}catch{}return{compliant:t.length===0,violations:t,auditedAt:Date.now(),policy:e.effectiveMode}}const go=l.createContext(null),Wl=({config:e,children:t})=>{const[r,a]=l.useState(!1),[n,o]=l.useState(null),s=l.useRef(null);l.useEffect(()=>()=>{var p;(p=s.current)==null||p.abort()},[]);const i=l.useCallback(()=>{var p;(p=s.current)==null||p.abort(),s.current=null,a(!1)},[]),c=async(p,m,g)=>{var v,k,E,w,C,A;const S=new TextDecoder;let y="";for(;;){const{done:M,value:I}=await p.read();if(M)break;y+=S.decode(I,{stream:!0});const $=y.split(`
67
+ `);y=$.pop()||"";for(const T of $)if(T.startsWith("data: ")){const D=T.slice(6).trim();if(D==="[DONE]"){m({content:"",done:!0});return}try{const F=JSON.parse(D);let P="",L=!1;g==="openai"||g==="azure-openai"?(P=((E=(k=(v=F.choices)==null?void 0:v[0])==null?void 0:k.delta)==null?void 0:E.content)||"",L=((C=(w=F.choices)==null?void 0:w[0])==null?void 0:C.finish_reason)==="stop"):g==="anthropic"&&(F.type==="content_block_delta"?P=((A=F.delta)==null?void 0:A.text)||"":F.type==="message_stop"&&(L=!0)),(P||L)&&m({content:P,done:L})}catch{}}}m({content:"",done:!0})},d=l.useCallback((p,m)=>{var g;return{model:m.model||e.defaultModel||"gpt-4",messages:m.systemPrompt?[{role:"system",content:m.systemPrompt},...p]:p,temperature:m.temperature??.7,max_tokens:m.maxTokens,stop:m.stop,stream:m.stream??!1,tools:(g=m.tools)==null?void 0:g.map(S=>({type:"function",function:{name:S.name,description:S.description,parameters:S.parameters}}))}},[e.defaultModel]),u=l.useCallback((p,m)=>{var y;const g=m.systemPrompt||((y=p.find(v=>v.role==="system"))==null?void 0:y.content),S=p.filter(v=>v.role!=="system");return{model:m.model||e.defaultModel||"claude-3-opus-20240229",max_tokens:m.maxTokens||4096,system:g,messages:S.map(v=>({role:v.role==="assistant"?"assistant":"user",content:v.content})),temperature:m.temperature??.7,stop_sequences:m.stop,stream:m.stream??!1}},[e.defaultModel]),f=l.useCallback(async(p,m={})=>{var g,S,y,v,k,E;if(e.provider==="custom"&&e.customHandler)return e.customHandler(p,m);a(!0),o(null),s.current=new AbortController;try{let w,C,A;if(e.provider==="openai")w=e.endpoint||"https://api.openai.com/v1/chat/completions",C={"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`,...e.organizationId&&{"OpenAI-Organization":e.organizationId},...e.headers},A=d(p,{...m,stream:!1});else if(e.provider==="azure-openai")w=e.endpoint||"",C={"Content-Type":"application/json","api-key":e.apiKey||"",...e.headers},A=d(p,{...m,stream:!1});else if(e.provider==="anthropic")w=e.endpoint||"https://api.anthropic.com/v1/messages",C={"Content-Type":"application/json","x-api-key":e.apiKey||"","anthropic-version":"2023-06-01",...e.headers},A=u(p,{...m,stream:!1});else throw new Error(`Unsupported provider: ${e.provider}`);const M=await fetch(w,{method:"POST",headers:C,body:JSON.stringify(A),signal:s.current.signal});if(!M.ok){const T=await M.text();throw new Error(`AI request failed: ${M.status} ${T}`)}const I=await M.json();let $;if(e.provider==="openai"||e.provider==="azure-openai"){const T=(g=I.choices)==null?void 0:g[0];$={content:((S=T==null?void 0:T.message)==null?void 0:S.content)||"",finishReason:(T==null?void 0:T.finish_reason)||"stop",toolCalls:(v=(y=T==null?void 0:T.message)==null?void 0:y.tool_calls)==null?void 0:v.map(D=>({id:D.id,name:D.function.name,arguments:JSON.parse(D.function.arguments)})),usage:I.usage&&{promptTokens:I.usage.prompt_tokens,completionTokens:I.usage.completion_tokens,totalTokens:I.usage.total_tokens}}}else e.provider==="anthropic"?$={content:((E=(k=I.content)==null?void 0:k[0])==null?void 0:E.text)||"",finishReason:I.stop_reason||"stop",usage:I.usage&&{promptTokens:I.usage.input_tokens,completionTokens:I.usage.output_tokens,totalTokens:I.usage.input_tokens+I.usage.output_tokens}}:$={content:"",finishReason:"stop"};return $}catch(w){throw w.name==="AbortError"?new Error("Request cancelled"):(o(w),w)}finally{a(!1)}},[e,d,u]),h=l.useCallback(async(p,m,g={})=>{if(e.provider==="custom"&&e.customStreamHandler)return e.customStreamHandler(p,g,m);a(!0),o(null),s.current=new AbortController;try{let S,y,v;if(e.provider==="openai")S=e.endpoint||"https://api.openai.com/v1/chat/completions",y={"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`,...e.organizationId&&{"OpenAI-Organization":e.organizationId},...e.headers},v=d(p,{...g,stream:!0});else if(e.provider==="azure-openai")S=e.endpoint||"",y={"Content-Type":"application/json","api-key":e.apiKey||"",...e.headers},v=d(p,{...g,stream:!0});else if(e.provider==="anthropic")S=e.endpoint||"https://api.anthropic.com/v1/messages",y={"Content-Type":"application/json","x-api-key":e.apiKey||"","anthropic-version":"2023-06-01",...e.headers},v=u(p,{...g,stream:!0});else throw new Error(`Unsupported provider: ${e.provider}`);const k=await fetch(S,{method:"POST",headers:y,body:JSON.stringify(v),signal:s.current.signal});if(!k.ok){const w=await k.text();throw new Error(`AI request failed: ${k.status} ${w}`)}if(!k.body)throw new Error("Response body is null");const E=k.body.getReader();await c(E,m,e.provider)}catch(S){if(S.name==="AbortError"){m({content:"",done:!0});return}throw o(S),S}finally{a(!1)}},[e,d,u]),b={isConfigured:!!e.apiKey||e.provider==="custom"||e.provider==="local",provider:e.provider,defaultModel:e.defaultModel||null,complete:f,stream:h,cancel:i,isLoading:r,error:n};return x.jsx(go.Provider,{value:b,children:t})};function le(){const e=l.useContext(go);if(!e)throw new Error("useNiceAI must be used within a NiceAIProvider");return e}function Vl(e={}){const t=le(),[r,a]=l.useState(""),[n,o]=l.useState([]),[s,i]=l.useState(!1),[c,d]=l.useState(null),u=l.useCallback(async m=>{i(!0),d(null),a("");const g=[...n,{role:"user",content:m}];try{const S=await t.complete(g,{systemPrompt:e.systemPrompt,model:e.model,temperature:e.temperature});return o([...g,{role:"assistant",content:S.content}]),a(S.content),S.content}catch(S){throw d(S),S}finally{i(!1)}},[t,n,e]),f=l.useCallback(async(m,g)=>{i(!0),d(null),a("");const S=[...n,{role:"user",content:m}];try{let y="";return await t.stream(S,v=>{v.done||(y+=v.content,a(y),g==null||g(v.content))},{systemPrompt:e.systemPrompt,model:e.model,temperature:e.temperature}),o([...S,{role:"assistant",content:y}]),y}catch(y){throw d(y),y}finally{i(!1)}},[t,n,e]),h=l.useCallback(()=>{a(""),d(null)},[]),b=l.useCallback(()=>{o([]),a(""),d(null)},[]),p=l.useCallback(()=>{t.cancel(),i(!1)},[t]);return{response:r,isLoading:s,error:c,send:u,sendStreaming:f,clear:h,cancel:p,history:n,clearHistory:b}}function Kl(e={}){const t=le(),[r,a]=l.useState(""),[n,o]=l.useState(!1),s=l.useCallback(async(u,f="")=>{o(!0),a("");try{const b=(await t.complete([{role:"user",content:`Complete the following ${e.language||""} code. Return ONLY the completion text, no explanation.
68
68
 
69
69
  Code before cursor:
70
70
  \`\`\`
@@ -76,11 +76,11 @@ Code after cursor:
76
76
  ${f}
77
77
  \`\`\`
78
78
 
79
- Completion:`}],{model:e.model,temperature:.2,maxTokens:200})).content.trim();return a(y),y}catch{return""}finally{o(!1)}},[t,e]),s=c.useCallback(async u=>{o(!0);try{return(await t.complete([{role:"user",content:`Explain the following ${e.language||""} code concisely:
79
+ Completion:`}],{model:e.model,temperature:.2,maxTokens:200})).content.trim();return a(b),b}catch{return""}finally{o(!1)}},[t,e]),i=l.useCallback(async u=>{o(!0);try{return(await t.complete([{role:"user",content:`Explain the following ${e.language||""} code concisely:
80
80
 
81
81
  \`\`\`
82
82
  ${u}
83
- \`\`\``}],{model:e.model,temperature:.3})).content}finally{o(!1)}},[t,e]),l=c.useCallback(async(u,f)=>{o(!0);try{const h=await t.complete([{role:"user",content:`Refactor the following ${e.language||""} code according to the instruction. Return ONLY the refactored code.
83
+ \`\`\``}],{model:e.model,temperature:.3})).content}finally{o(!1)}},[t,e]),c=l.useCallback(async(u,f)=>{o(!0);try{const h=await t.complete([{role:"user",content:`Refactor the following ${e.language||""} code according to the instruction. Return ONLY the refactored code.
84
84
 
85
85
  Code:
86
86
  \`\`\`
@@ -89,37 +89,37 @@ ${u}
89
89
 
90
90
  Instruction: ${f}
91
91
 
92
- Refactored code:`}],{model:e.model,temperature:.2}),y=h.content.match(/```[\w]*\n?([\s\S]*?)```/);return y?y[1].trim():h.content.trim()}finally{o(!1)}},[t,e]),d=c.useCallback(async u=>{o(!0);try{const f=await t.complete([{role:"user",content:`Generate ${e.language||""} code from this comment/description. Return ONLY the code.
92
+ Refactored code:`}],{model:e.model,temperature:.2}),b=h.content.match(/```[\w]*\n?([\s\S]*?)```/);return b?b[1].trim():h.content.trim()}finally{o(!1)}},[t,e]),d=l.useCallback(async u=>{o(!0);try{const f=await t.complete([{role:"user",content:`Generate ${e.language||""} code from this comment/description. Return ONLY the code.
93
93
 
94
94
  Description: ${u}
95
95
 
96
- Code:`}],{model:e.model,temperature:.3}),h=f.content.match(/```[\w]*\n?([\s\S]*?)```/);return h?h[1].trim():f.content.trim()}finally{o(!1)}},[t,e]);return{suggestion:r,isLoading:n,complete:i,explain:s,refactor:l,generateFromComment:d}}function sd(){const e=ue(),[t,r]=c.useState(!1);return{parseFilter:c.useCallback(async(n,o)=>{r(!0);try{const i=await e.complete([{role:"user",content:`Convert this natural language query to filter conditions. Available columns: ${JSON.stringify(o)}
96
+ Code:`}],{model:e.model,temperature:.3}),h=f.content.match(/```[\w]*\n?([\s\S]*?)```/);return h?h[1].trim():f.content.trim()}finally{o(!1)}},[t,e]);return{suggestion:r,isLoading:n,complete:s,explain:i,refactor:c,generateFromComment:d}}function Ul(){const e=le(),[t,r]=l.useState(!1);return{parseFilter:l.useCallback(async(n,o)=>{r(!0);try{const s=await e.complete([{role:"user",content:`Convert this natural language query to filter conditions. Available columns: ${JSON.stringify(o)}
97
97
 
98
98
  Query: "${n}"
99
99
 
100
100
  Return a JSON array of filter objects with: field, operator (eq, ne, gt, gte, lt, lte, contains, startsWith, endsWith), value.
101
- Only return the JSON array, no explanation.`}],{temperature:.1,maxTokens:500});try{const s=JSON.parse(i.content);return Array.isArray(s)?s:[]}catch{return[]}}finally{r(!1)}},[e]),isLoading:t}}function id(){const e=ue(),[t,r]=c.useState(!1),a=c.useCallback(async(o,i)=>{r(!0);try{const s=o.slice(0,5),l=await e.complete([{role:"user",content:`Analyze this data and suggest the best chart type. Data sample: ${JSON.stringify(s)}
102
- ${i?`Context: ${i}`:""}
101
+ Only return the JSON array, no explanation.`}],{temperature:.1,maxTokens:500});try{const i=JSON.parse(s.content);return Array.isArray(i)?i:[]}catch{return[]}}finally{r(!1)}},[e]),isLoading:t}}function Xl(){const e=le(),[t,r]=l.useState(!1),a=l.useCallback(async(o,s)=>{r(!0);try{const i=o.slice(0,5),c=await e.complete([{role:"user",content:`Analyze this data and suggest the best chart type. Data sample: ${JSON.stringify(i)}
102
+ ${s?`Context: ${s}`:""}
103
103
 
104
104
  Return JSON with: type (line, bar, pie, scatter, area, donut), reason (brief explanation), config (suggested chart configuration like xField, yField, etc.)
105
- Only return JSON.`}],{temperature:.2,maxTokens:500});try{return JSON.parse(l.content)}catch{return{type:"bar",reason:"Default chart type",config:{}}}}finally{r(!1)}},[e]),n=c.useCallback(async(o,i)=>{r(!0);try{const s=await e.complete([{role:"user",content:`Analyze this ${i} chart data and provide 3-5 key insights. Data: ${JSON.stringify(o.slice(0,20))}
105
+ Only return JSON.`}],{temperature:.2,maxTokens:500});try{return JSON.parse(c.content)}catch{return{type:"bar",reason:"Default chart type",config:{}}}}finally{r(!1)}},[e]),n=l.useCallback(async(o,s)=>{r(!0);try{const i=await e.complete([{role:"user",content:`Analyze this ${s} chart data and provide 3-5 key insights. Data: ${JSON.stringify(o.slice(0,20))}
106
106
 
107
- Return a JSON array of insight strings.`}],{temperature:.3,maxTokens:500});try{return JSON.parse(s.content)}catch{return[]}}finally{r(!1)}},[e]);return{suggestChartType:a,generateInsights:n,isLoading:t}}function cd(){const e=ue(),[t,r]=c.useState(!1);return{generateForm:c.useCallback(async n=>{r(!0);try{const o=await e.complete([{role:"user",content:`Generate a form definition from this description: "${n}"
107
+ Return a JSON array of insight strings.`}],{temperature:.3,maxTokens:500});try{return JSON.parse(i.content)}catch{return[]}}finally{r(!1)}},[e]);return{suggestChartType:a,generateInsights:n,isLoading:t}}function Gl(){const e=le(),[t,r]=l.useState(!1);return{generateForm:l.useCallback(async n=>{r(!0);try{const o=await e.complete([{role:"user",content:`Generate a form definition from this description: "${n}"
108
108
 
109
109
  Return a JSON array of field objects with: label, field (camelCase), type (text, number, email, date, select, checkbox, textarea), required (boolean), options (for select type).
110
- Only return JSON.`}],{temperature:.3,maxTokens:1e3});try{return JSON.parse(o.content)}catch{return[]}}finally{r(!1)}},[e]),isLoading:t}}function ld(){const e=ue(),[t,r]=c.useState(!1),a=c.useCallback(async(i,s)=>{r(!0);try{return(await e.complete([{role:"user",content:`Improve this text to be more ${s||"professional"}. Keep the same meaning. Return only the improved text.
110
+ Only return JSON.`}],{temperature:.3,maxTokens:1e3});try{return JSON.parse(o.content)}catch{return[]}}finally{r(!1)}},[e]),isLoading:t}}function ql(){const e=le(),[t,r]=l.useState(!1),a=l.useCallback(async(s,i)=>{r(!0);try{return(await e.complete([{role:"user",content:`Improve this text to be more ${i||"professional"}. Keep the same meaning. Return only the improved text.
111
111
 
112
- Text: ${i}
112
+ Text: ${s}
113
113
 
114
- Improved:`}],{temperature:.4})).content.trim()}finally{r(!1)}},[e]),n=c.useCallback(async(i,s)=>{r(!0);try{return(await e.complete([{role:"user",content:`Translate this text to ${s}. Return only the translation.
114
+ Improved:`}],{temperature:.4})).content.trim()}finally{r(!1)}},[e]),n=l.useCallback(async(s,i)=>{r(!0);try{return(await e.complete([{role:"user",content:`Translate this text to ${i}. Return only the translation.
115
115
 
116
- Text: ${i}
116
+ Text: ${s}
117
117
 
118
- Translation:`}],{temperature:.2})).content.trim()}finally{r(!1)}},[e]),o=c.useCallback(async i=>{r(!0);try{const s=await e.complete([{role:"user",content:`Generate clean semantic HTML from this prompt. Use proper tags (h1-h6, p, ul, ol, table, etc.). Return only HTML.
118
+ Translation:`}],{temperature:.2})).content.trim()}finally{r(!1)}},[e]),o=l.useCallback(async s=>{r(!0);try{const i=await e.complete([{role:"user",content:`Generate clean semantic HTML from this prompt. Use proper tags (h1-h6, p, ul, ol, table, etc.). Return only HTML.
119
119
 
120
- Prompt: ${i}
120
+ Prompt: ${s}
121
121
 
122
- HTML:`}],{temperature:.3}),l=s.content.match(/```html?\n?([\s\S]*?)```/);return l?l[1].trim():s.content.trim()}finally{r(!1)}},[e]);return{improveText:a,translate:n,generateHtml:o,isLoading:t}}class qe{constructor(){this._listeners=new Map}on(t,r){return this._listeners.has(t)||this._listeners.set(t,new Set),this._listeners.get(t).add(r),()=>{var a;(a=this._listeners.get(t))==null||a.delete(r)}}emit(t,...r){var a;(a=this._listeners.get(t))==null||a.forEach(n=>{try{n(...r)}catch{}})}}function dd(e,t){const r=e[t.field],a=t.value;switch(t.operator){case"=":return r==a;case"<>":return r!=a;case"<":return r<a;case"<=":return r<=a;case">":return r>a;case">=":return r>=a;case"contains":return String(r??"").toLowerCase().includes(String(a??"").toLowerCase());case"notcontains":return!String(r??"").toLowerCase().includes(String(a??"").toLowerCase());case"startswith":return String(r??"").toLowerCase().startsWith(String(a??"").toLowerCase());case"endswith":return String(r??"").toLowerCase().endsWith(String(a??"").toLowerCase());case"isblank":return r==null||r==="";case"isnotblank":return r!=null&&r!=="";default:return!0}}function vo(e,t){if(t.items.length===0)return!0;const r=a=>a.type==="condition"?dd(e,a):vo(e,a);return t.logic==="and"?t.items.every(r):t.items.some(r)}function ud(e,t){var n;let r=[...e];if(t.filter&&(r=r.filter(o=>vo(o,t.filter))),t.search){const o=t.search.toLowerCase(),i=t.searchFields;r=r.filter(s=>(i?i.map(d=>s[d]):Object.values(s)).some(d=>String(d??"").toLowerCase().includes(o)))}const a=r.length;if((n=t.sort)!=null&&n.length&&r.sort((o,i)=>{for(const s of t.sort){const l=o[s.field]??"",d=i[s.field]??"",u=typeof l=="number"&&typeof d=="number"?l-d:String(l).localeCompare(String(d));if(u!==0)return s.direction==="desc"?-u:u}return 0}),t.skip!=null||t.take!=null){const o=t.skip??0,i=t.take??r.length;r=r.slice(o,o+i)}return{data:r,totalCount:a}}function fd(e){const t=e.keyField??"id";let r=[...e.data];const a=new qe;return{keyField:t,writable:!0,async load(o={}){a.emit("loading",!0);try{const i=ud(r,o);return a.emit("loaded",i),a.emit("loading",!1),i}catch(i){throw a.emit("error",i instanceof Error?i:new Error(String(i))),a.emit("loading",!1),i}},async byKey(o){return r.find(i=>i[t]===o)},async insert(o){const i={...o};return r=[...r,i],a.emit("changed"),i},async update(o,i){const s=r.findIndex(d=>d[t]===o);if(s===-1)throw new Error(`Record not found: ${o}`);const l={...r[s],...i};return r=r.map((d,u)=>u===s?l:d),a.emit("changed"),l},async remove(o){r=r.filter(i=>i[t]!==o),a.emit("changed")},on:a.on.bind(a)}}async function md(e){const t={"Content-Type":"application/json"};if(!e.headers)return t;const r=typeof e.headers=="function"?await e.headers():e.headers;return{...t,...r}}function Qe(e,t,r){return typeof e=="function"?e(r):e||`${t}/${encodeURIComponent(String(r))}`}function pd(e){var r,a,n;const t={};return e.skip!=null&&(t.skip=String(e.skip)),e.take!=null&&(t.take=String(e.take)),e.search&&(t.search=e.search),(r=e.sort)!=null&&r.length&&(t.sort=e.sort.map(o=>`${o.field} ${o.direction}`).join(",")),e.filter&&(t.filter=JSON.stringify(e.filter)),(a=e.select)!=null&&a.length&&(t.select=e.select.join(",")),(n=e.expand)!=null&&n.length&&(t.expand=e.expand.join(",")),t}function gd(e){if(Array.isArray(e))return{data:e,totalCount:e.length};const t=e,r=t.data??t.items??t.value??t.results??[],a=t.totalCount??t.total??t.count??t["@odata.count"]??r.length;return{data:r,totalCount:a}}function So(e){const t=e.keyField??"id",r=new qe;async function a(o,i){const s=await md(e),l=await fetch(o,{...e.fetchOptions,...i,headers:{...s,...i==null?void 0:i.headers}});if(!l.ok){const u=await l.text().catch(()=>l.statusText);throw new Error(`HTTP ${l.status}: ${u}`)}return(l.headers.get("content-type")??"").includes("json")?l.json():l.text()}return{keyField:t,writable:!0,async load(o={}){var i;r.emit("loading",!0);try{const s=e.loadUrl??e.url,l=e.mapLoadParams?e.mapLoadParams(o):pd(o),d=new URLSearchParams(l).toString(),u=d?`${s}?${d}`:s,f=await a(u),h=e.extractLoadResult?e.extractLoadResult(f):gd(f);return r.emit("loaded",h),r.emit("loading",!1),h}catch(s){const l=s instanceof Error?s:new Error(String(s));throw r.emit("error",l),r.emit("loading",!1),(i=e.onError)==null||i.call(e,l,"load"),l}},async byKey(o){const i=Qe(e.byKeyUrl,e.url,o),s=await a(i);return e.extractItem?e.extractItem(s):s},async insert(o){const i=e.insertUrl??e.url,s=e.prepareInsertBody?e.prepareInsertBody(o):o,l=await a(i,{method:"POST",body:JSON.stringify(s)}),d=e.extractItem?e.extractItem(l):l;return r.emit("changed"),d},async update(o,i){const s=Qe(e.updateUrl,e.url,o),l=e.prepareUpdateBody?e.prepareUpdateBody(o,i):i,d=await a(s,{method:e.updateMethod??"PUT",body:JSON.stringify(l)}),u=e.extractItem?e.extractItem(d):d;return r.emit("changed"),u},async remove(o){const i=Qe(e.deleteUrl,e.url,o);await a(i,{method:"DELETE"}),r.emit("changed")},on:r.on.bind(r)}}function hd(e,t){const r=e.field,a=typeof e.value=="string"?`'${e.value.replace(/'/g,"''")}'`:String(e.value??"null");switch(e.operator){case"=":return`${r} eq ${a}`;case"<>":return`${r} ne ${a}`;case"<":return`${r} lt ${a}`;case"<=":return`${r} le ${a}`;case">":return`${r} gt ${a}`;case">=":return`${r} ge ${a}`;case"contains":return t>=4?`contains(${r},${a})`:`substringof(${a},${r})`;case"notcontains":return t>=4?`not contains(${r},${a})`:`not substringof(${a},${r})`;case"startswith":return`startswith(${r},${a})`;case"endswith":return`endswith(${r},${a})`;case"isblank":return`${r} eq null`;case"isnotblank":return`${r} ne null`;default:return"true"}}function xo(e,t){return e.items.length===0?"":e.items.map(a=>a.type==="condition"?hd(a,t):`(${xo(a,t)})`).join(e.logic==="and"?" and ":" or ")}function yd(e){const t=e.version??4,r={url:e.url,keyField:e.keyField,headers:e.headers,fetchOptions:e.fetchOptions,onError:e.onError,updateMethod:"PATCH",mapLoadParams(a){var o,i,s;const n={};if(t>=4&&(n.$count="true"),a.skip!=null&&(n.$skip=String(a.skip)),a.take!=null&&(n.$top=String(a.take)),(o=a.sort)!=null&&o.length&&(n.$orderby=a.sort.map(l=>`${l.field} ${l.direction}`).join(",")),a.filter){const l=xo(a.filter,t);l&&(n.$filter=l)}return a.search&&(n.$search=`"${a.search}"`),(i=a.select)!=null&&i.length&&(n.$select=a.select.join(",")),(s=a.expand)!=null&&s.length&&(n.$expand=a.expand.join(",")),n},extractLoadResult(a){var s,l;const n=a,o=n.value??((s=n.d)==null?void 0:s.results)??[],i=n["@odata.count"]??((l=n.d)==null?void 0:l.__count)??o.length;return{data:o,totalCount:i}},byKeyUrl:a=>{const n=typeof a=="number"?a:`'${String(a).replace(/'/g,"''")}'`;return`${e.url}(${n})`}};return So(r)}function bd(e){const t=e.keyField??"id",r=new qe;async function a(l,d){var m;const u={"Content-Type":"application/json"},f=e.headers?typeof e.headers=="function"?await e.headers():e.headers:{},h=await fetch(e.url,{method:"POST",headers:{...u,...f},body:JSON.stringify({query:l,variables:d})});if(!h.ok){const p=await h.text().catch(()=>h.statusText);throw new Error(`GraphQL HTTP ${h.status}: ${p}`)}const y=await h.json();if((m=y.errors)!=null&&m.length)throw new Error(y.errors.map(p=>p.message).join("; "));return y.data}function n(l){var u;const d={};return l.skip!=null&&(d.skip=l.skip),l.take!=null&&(d.take=l.take),l.search&&(d.search=l.search),(u=l.sort)!=null&&u.length&&(d.sort=l.sort),l.filter&&(d.filter=l.filter),d}function o(l){if(!l||typeof l!="object")return{data:[],totalCount:0};const d=Object.values(l)[0];if(!d)return{data:[],totalCount:0};if(Array.isArray(d))return{data:d,totalCount:d.length};const u=d.items??d.nodes??d.edges??d.data??[],f=d.totalCount??d.total??d.count??u.length;return{data:u,totalCount:f}}function i(l){return!l||typeof l!="object"?l:Object.values(l)[0]}return{keyField:t,writable:!!(e.queries.insert||e.queries.update||e.queries.remove),async load(l={}){var d;r.emit("loading",!0);try{const u=e.mapVariables?e.mapVariables(l):n(l),f=await a(e.queries.load,u),h=e.extractLoadResult?e.extractLoadResult(f):o(f);return r.emit("loaded",h),r.emit("loading",!1),h}catch(u){const f=u instanceof Error?u:new Error(String(u));throw r.emit("error",f),r.emit("loading",!1),(d=e.onError)==null||d.call(e,f,"load"),f}},async byKey(l){if(!e.queries.byKey)throw new Error("byKey query not configured");const d=await a(e.queries.byKey,{[t]:l});return e.extractItem?e.extractItem(d):i(d)},insert:e.queries.insert?async l=>{const d=await a(e.queries.insert,{input:l}),u=e.extractItem?e.extractItem(d):i(d);return r.emit("changed"),u}:void 0,update:e.queries.update?async(l,d)=>{const u=await a(e.queries.update,{[t]:l,input:d}),f=e.extractItem?e.extractItem(u):i(u);return r.emit("changed"),f}:void 0,remove:e.queries.remove?async l=>{await a(e.queries.remove,{[t]:l}),r.emit("changed")}:void 0,on:r.on.bind(r)}}function vd(e){const t=e.keyField??"id",r=new qe;return{keyField:t,writable:!!(e.insert||e.update||e.remove),async load(n={}){r.emit("loading",!0);try{const o=await e.load(n);return r.emit("loaded",o),r.emit("loading",!1),o}catch(o){const i=o instanceof Error?o:new Error(String(o));throw r.emit("error",i),r.emit("loading",!1),i}},async byKey(n){if(!e.byKey)throw new Error("byKey handler not configured");return e.byKey(n)},insert:e.insert?async n=>{const o=await e.insert(n);return r.emit("changed"),o}:void 0,update:e.update?async(n,o)=>{const i=await e.update(n,o);return r.emit("changed"),i}:void 0,remove:e.remove?async n=>{await e.remove(n),r.emit("changed")}:void 0,on:r.on.bind(r)}}function wo(e){return/^[A-Za-z_][A-Za-z0-9_.]*$/.test(e)?e:`"${e.replace(/"/g,'""')}"`}function Sd(e,t={}){const r=[],a=t.placeholder??(()=>"?"),n=t.quoteField??wo,o=l=>(r.push(l),a(r.length-1)),i=l=>{const d=n(l.field);switch(l.operator){case"=":case"<>":case"<":case"<=":case">":case">=":return`${d} ${l.operator} ${o(l.value)}`;case"contains":return`${d} LIKE ${o(`%${String(l.value)}%`)}`;case"notcontains":return`${d} NOT LIKE ${o(`%${String(l.value)}%`)}`;case"startswith":return`${d} LIKE ${o(`${String(l.value)}%`)}`;case"endswith":return`${d} LIKE ${o(`%${String(l.value)}`)}`;case"between":{const u=Array.isArray(l.value)?l.value:[l.value,l.value];return`${d} BETWEEN ${o(u[0])} AND ${o(u[1])}`}case"isblank":return`(${d} IS NULL OR ${d} = ${o("")})`;case"isnotblank":return`(${d} IS NOT NULL AND ${d} <> ${o("")})`;case"in":{const u=Array.isArray(l.value)?l.value:[l.value];return u.length?`${d} IN (${u.map(o).join(", ")})`:"1 = 0"}default:return`${d} = ${o(l.value)}`}},s=l=>{const d=[];for(const u of l.items)if(u.type==="group"){const f=s(u);f&&d.push(`(${f})`)}else d.push(i(u));return d.join(l.logic==="or"?" OR ":" AND ")};return{sql:s(e),params:r}}function xd(e,t={}){const r=t.quoteField??wo;return e.filter(a=>a.field).map(a=>`${r(a.field)} ${a.direction==="desc"?"DESC":"ASC"}`).join(", ")}function te(e){return String(e??"").toLowerCase()}function ko(e,t){const r=e[t.field],a=t.value;switch(t.operator){case"=":return r==a;case"<>":return r!=a;case"<":return r<a;case"<=":return r<=a;case">":return r>a;case">=":return r>=a;case"contains":return te(r).includes(te(a));case"notcontains":return!te(r).includes(te(a));case"startswith":return te(r).startsWith(te(a));case"endswith":return te(r).endsWith(te(a));case"between":{const n=Array.isArray(a)?a:[a,a];return r>=n[0]&&r<=n[1]}case"isblank":return r==null||r==="";case"isnotblank":return r!=null&&r!=="";case"in":return(Array.isArray(a)?a:[a]).some(o=>r==o);default:return!0}}function Pt(e,t){if(!t.items.length)return!0;const r=a=>a.type==="condition"?ko(e,a):Pt(e,a);return t.logic==="or"?t.items.some(r):t.items.every(r)}function Zt(e){return e==null||e===""}const wd=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function kd(e){const t=String(e);try{return new URL(t),!0}catch{return/^https?:\/\/[^\s]+$/.test(t)}}function V(e){return typeof e=="number"?e:parseFloat(String(e))}function Mo(e){const t=e.field;switch(e.op){case"required":return`${t} is required`;case"minLength":return`${t} must be at least ${e.value} characters`;case"maxLength":return`${t} must be at most ${e.value} characters`;case"min":return`${t} must be ≥ ${e.value}`;case"max":return`${t} must be ≤ ${e.value}`;case"pattern":return`${t} has an invalid format`;case"email":return`${t} must be a valid email`;case"url":return`${t} must be a valid URL`;case"equals":return`${t} must equal ${e.value}`;case"notEquals":return`${t} must not equal ${e.value}`;case"greaterThan":return`${t} must be greater than ${e.value}`;case"lessThan":return`${t} must be less than ${e.value}`;case"matchesField":return`${t} must match ${e.compareField}`;case"greaterThanField":return`${t} must be greater than ${e.compareField}`;case"lessThanField":return`${t} must be less than ${e.compareField}`;default:return`${t} is invalid`}}function Co(e,t){const r=t[e.field];if(e.op==="required")return!Zt(r);if(Zt(r))return!0;const a=e.compareField!=null?t[e.compareField]:void 0;switch(e.op){case"minLength":return String(r).length>=V(e.value);case"maxLength":return String(r).length<=V(e.value);case"min":return V(r)>=V(e.value);case"max":return V(r)<=V(e.value);case"pattern":try{return new RegExp(String(e.value)).test(String(r))}catch{return!0}case"email":return wd.test(String(r));case"url":return kd(r);case"equals":return r===e.value;case"notEquals":return r!==e.value;case"greaterThan":return V(r)>V(e.value);case"lessThan":return V(r)<V(e.value);case"matchesField":return r===a;case"greaterThanField":return V(r)>V(a);case"lessThanField":return V(r)<V(a);case"custom":return e.validate?e.validate(r,t):!0;default:return!0}}function Ao(e,t){const r=[];for(const a of e??[])a.when&&!Pt(t,a.when)||Co(a,t)||r.push({field:a.field,message:a.message??Mo(a),severity:a.severity??"error",ruleId:a.id});return r}function Md(e,t){return Ao(e,t).every(r=>r.severity!=="error")}class lt{constructor(t={}){this.cache=new Map,this.ttl=t.ttl??6e4,this.maxSize=t.maxSize??100}get(t){const r=this.cache.get(t);if(r){if(Date.now()>r.expiresAt){this.cache.delete(t);return}return this.cache.delete(t),this.cache.set(t,r),r.data}}set(t,r,a){if(this.cache.size>=this.maxSize){const n=this.cache.keys().next().value;n&&this.cache.delete(n)}this.cache.set(t,{data:r,timestamp:Date.now(),expiresAt:Date.now()+(a??this.ttl)})}has(t){return this.get(t)!==void 0}invalidate(t){this.cache.delete(t)}invalidateAll(){this.cache.clear()}invalidateMatching(t){for(const r of this.cache.keys())t.test(r)&&this.cache.delete(r)}}class Eo{constructor(){this.pending=new Map}async dedupe(t,r){const a=this.pending.get(t);if(a)return a;const n=r().finally(()=>{this.pending.delete(t)});return this.pending.set(t,n),n}hasPending(t){return this.pending.has(t)}cancelAll(){this.pending.clear()}}function Cd(e,t={}){const r=new lt(t),a=new lt(t),n=new Eo,o=t.generateKey??(l=>JSON.stringify(l)),i=t.cacheLoads!==!1,s=t.cacheByKey!==!1;return{...e,cache:r,async load(l={}){const d=`load:${o(l)}`;if(i){const u=r.get(d);if(u)return u}return n.dedupe(d,async()=>{const u=await e.load(l);return i&&r.set(d,u),u})},async byKey(l){const d=`byKey:${String(l)}`;if(s){const u=a.get(d);if(u)return u}return n.dedupe(d,async()=>{const u=await e.byKey(l);return s&&u&&a.set(d,u),u})},async insert(l){const d=await e.insert(l);return r.invalidateAll(),d},async update(l,d){const u=await e.update(l,d);return r.invalidateAll(),a.invalidate(`byKey:${String(l)}`),u},async remove(l){await e.remove(l),r.invalidateAll(),a.invalidate(`byKey:${String(l)}`)},invalidateCache(){r.invalidateAll(),a.invalidateAll()}}}function Ad(e,t){const{cursorField:r,pageSize:a=20,direction:n="asc"}=t;return{async loadPage(o={}){var g;const i=o.pageSize??a,s=o.direction??"forward",l=o.cursor?{type:"condition",field:r,operator:s==="forward"?n==="asc"?">":"<":n==="asc"?"<":">",value:Ed(o.cursor)}:null,d=l?{type:"group",logic:"and",items:[...((g=o.filter)==null?void 0:g.items)??[],l]}:o.filter,u=[{field:r,direction:s==="forward"?n:n==="asc"?"desc":"asc"},...o.sort??[]],f=await e.load({...o,filter:d,sort:u,take:i+1}),h=f.data.length>i,y=h?f.data.slice(0,i):f.data;s==="backward"&&y.reverse();const m=y[y.length-1],p=y[0];return{data:y,nextCursor:h&&m?Ze(m[r]):null,prevCursor:p&&o.cursor?Ze(p[r]):null,hasMore:h}},async*loadAll(o={}){let i=null;do{const s=await e.load({...o,...i?{cursor:i}:{}});if(s.data.length===0)break;yield s.data;const l=s.data[s.data.length-1];i=l?Ze(l[r]):null}while(i)}}}function Ze(e){return btoa(JSON.stringify(e))}function Ed(e){try{return JSON.parse(atob(e))}catch{return e}}function Nd(e,t={}){const{pageSize:r=50,threshold:a=200,initialPage:n=0}=t;let o={items:[],isLoading:!1,hasMore:!0,error:null,page:n,totalCount:0};const i=new Set;function s(){i.forEach(y=>y(o))}function l(y){o={...o,...y},s()}let d={};async function u(){if(!(o.isLoading||!o.hasMore)){l({isLoading:!0,error:null});try{const y=await e.load({...d,skip:o.page*r,take:r}),m=[...o.items,...y.data],p=m.length<y.totalCount;l({items:m,page:o.page+1,totalCount:y.totalCount,hasMore:p,isLoading:!1})}catch(y){l({error:y instanceof Error?y:new Error(String(y)),isLoading:!1})}}}function f(y={}){d=y,o={items:[],isLoading:!1,hasMore:!0,error:null,page:0,totalCount:0},s()}function h(y){const m=y.target;if(!m)return;m.scrollHeight-m.scrollTop-m.clientHeight<a&&u()}return{get state(){return o},loadMore:u,reset:f,handleScroll:h,subscribe(y){return i.add(y),()=>i.delete(y)},setOptions(y){d=y}}}function Ld(e){const{url:t,baseSource:r,keyField:a=r.keyField,reconnectDelay:n=3e3,maxReconnects:o=10,heartbeatInterval:i=3e4}=e;let s=null,l=0,d=null,u=[];const f=new Map;function h(k,...C){var M;(M=f.get(k))==null||M.forEach(E=>E(...C))}function y(k){if(e.parseMessage)return e.parseMessage(k);try{return JSON.parse(k.data)}catch{return null}}function m(k){return e.serializeMessage?e.serializeMessage(k):JSON.stringify(k)}function p(k){switch(k.type){case"insert":k.data&&(u=[...u,k.data],h("changed"));break;case"update":k.key&&k.changes&&(u=u.map(C=>C[a]===k.key?{...C,...k.changes}:C),h("changed"));break;case"remove":k.key&&(u=u.filter(C=>C[a]!==k.key),h("changed"));break;case"refresh":case"sync":A.load().catch(()=>{});break}}function g(){(s==null?void 0:s.readyState)!==WebSocket.OPEN&&(s=new WebSocket(t),s.onopen=()=>{l=0,h("connected"),b()},s.onmessage=k=>{const C=y(k);C&&(p(C),h("message",C))},s.onerror=k=>{h("error",new Error("WebSocket error"))},s.onclose=()=>{x(),h("disconnected"),l<o&&(l++,setTimeout(g,n*Math.min(l,5)))})}function v(){x(),s&&(s.close(),s=null)}function b(){x(),d=window.setInterval(()=>{(s==null?void 0:s.readyState)===WebSocket.OPEN&&s.send(JSON.stringify({type:"ping"}))},i)}function x(){d&&(clearInterval(d),d=null)}function w(k){(s==null?void 0:s.readyState)===WebSocket.OPEN&&s.send(m(k))}const A={keyField:a,writable:r.writable,async load(k={}){h("loading",!0);try{const C=await r.load(k);return u=C.data,h("loaded",C),h("loading",!1),C}catch(C){throw h("error",C),h("loading",!1),C}},async byKey(k){const C=u.find(M=>M[a]===k);return C||r.byKey(k)},async insert(k){const C=await r.insert(k);return w({type:"insert",data:C}),C},async update(k,C){const M=await r.update(k,C);return w({type:"update",key:k,changes:C}),M},async remove(k){await r.remove(k),w({type:"remove",key:k})},on(k,C){return f.has(k)||f.set(k,new Set),f.get(k).add(C),()=>{var M;return(M=f.get(k))==null?void 0:M.delete(C)}},connect:g,disconnect:v,isConnected:()=>(s==null?void 0:s.readyState)===WebSocket.OPEN,sendMessage:w};return A}function Td(e){const{connection:t,baseSource:r}=e,a={onInsert:"OnInsert",onUpdate:"OnUpdate",onRemove:"OnRemove",onRefresh:"OnRefresh",insert:"Insert",update:"Update",remove:"Remove",...e.methods},n=r.keyField;let o=[];const i=new Map;function s(f,...h){var y;(y=i.get(f))==null||y.forEach(m=>m(...h))}const l=f=>{o=[...o,f],s("changed")},d=(f,h)=>{o=o.map(y=>y[n]===f?{...y,...h}:y),s("changed")},u=f=>{o=o.filter(h=>h[n]!==f),s("changed")};return{keyField:n,writable:r.writable,async load(f={}){s("loading",!0);try{const h=await r.load(f);return o=h.data,s("loaded",h),s("loading",!1),h}catch(h){throw s("error",h),s("loading",!1),h}},async byKey(f){const h=o.find(y=>y[n]===f);return h||r.byKey(f)},async insert(f){return await t.invoke(a.insert,f)},async update(f,h){return await t.invoke(a.update,f,h)},async remove(f){await t.invoke(a.remove,f)},on(f,h){return i.has(f)||i.set(f,new Set),i.get(f).add(h),()=>{var y;return(y=i.get(f))==null?void 0:y.delete(h)}},async connect(){t.on(a.onInsert,l),t.on(a.onUpdate,d),t.on(a.onRemove,u),t.on(a.onRefresh,()=>this.load()),await t.start()},async disconnect(){t.off(a.onInsert,l),t.off(a.onUpdate,d),t.off(a.onRemove,u),t.off(a.onRefresh,()=>{}),await t.stop()}}}function Rd(e,t={}){const r=e.keyField;let a=[];const n=new Map;let o=0;const i=new Map;function s(d,...u){var f;(f=i.get(d))==null||f.forEach(h=>h(...u))}function l(){return`op_${++o}_${Date.now()}`}return{keyField:r,writable:!0,async load(d={}){const u=await e.load(d);return a=u.data,u},async byKey(d){return a.find(u=>u[r]===d)??e.byKey(d)},async insert(d){var h,y,m;const u=l(),f={...d};a=[...a,f],n.set(u,{id:u,action:"insert",item:f}),(h=t.onOptimisticApply)==null||h.call(t,f,"insert"),s("changed");try{const p=await e.insert(d);return a=a.map(g=>g===f?p:g),n.delete(u),(y=t.onConfirm)==null||y.call(t,p,"insert"),s("changed"),p}catch(p){throw a=a.filter(g=>g!==f),n.delete(u),(m=t.onRollback)==null||m.call(t,f,"insert",p instanceof Error?p:new Error(String(p))),s("changed"),p}},async update(d,u){var p,g,v;const f=l(),h=a.findIndex(b=>b[r]===d);if(h===-1)return e.update(d,u);const y=a[h],m={...y,...u};a=a.map((b,x)=>x===h?m:b),n.set(f,{id:f,action:"update",key:d,originalItem:y}),(p=t.onOptimisticApply)==null||p.call(t,m,"update"),s("changed");try{const b=await e.update(d,u);return a=a.map((x,w)=>w===h?b:x),n.delete(f),(g=t.onConfirm)==null||g.call(t,b,"update"),s("changed"),b}catch(b){throw a=a.map((x,w)=>w===h?y:x),n.delete(f),(v=t.onRollback)==null||v.call(t,y,"update",b instanceof Error?b:new Error(String(b))),s("changed"),b}},async remove(d){var h,y,m;const u=l(),f=a.find(p=>p[r]===d);if(!f)return e.remove(d);a=a.filter(p=>p!==f),n.set(u,{id:u,action:"remove",key:d,originalItem:f}),(h=t.onOptimisticApply)==null||h.call(t,f,"remove"),s("changed");try{await e.remove(d),n.delete(u),(y=t.onConfirm)==null||y.call(t,f,"remove")}catch(p){throw a=[...a,f],n.delete(u),(m=t.onRollback)==null||m.call(t,f,"remove",p instanceof Error?p:new Error(String(p))),s("changed"),p}},on(d,u){return i.has(d)||i.set(d,new Set),i.get(d).add(u),()=>{var f;return(f=i.get(d))==null?void 0:f.delete(u)}},hasPendingChanges:()=>n.size>0,getPendingCount:()=>n.size}}function No(e,t,r){const a=new Map(e.map(d=>[d[r],d])),n=new Map(t.map(d=>[d[r],d])),o=[],i=[],s=[],l=[];for(const[d,u]of n){const f=a.get(d);if(!f)o.push(u);else if(Lo(f,u))l.push(u);else{const h={};for(const y of Object.keys(u))f[y]!==u[y]&&(h[y]=u[y]);i.push({key:d,changes:h,oldItem:f,newItem:u})}}for(const[d,u]of a)n.has(d)||s.push(u);return{inserted:o,updated:i,removed:s,unchanged:l}}function Lo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e===null||t===null||typeof e!="object")return e===t;const r=e,a=t,n=new Set([...Object.keys(r),...Object.keys(a)]);for(const o of n)if(!Lo(r[o],a[o]))return!1;return!0}function zd(e,t={}){const{interval:r=5e3,autoStart:a=!1,pauseWhenHidden:n=!0,onDataChange:o}=t;let i=r,s=null,l=[],d={};const u=new Map;function f(g,...v){var b;(b=u.get(g))==null||b.forEach(x=>x(...v))}async function h(){if(!(n&&document.hidden))try{const g=await e.load(d),v=No(l,g.data,e.keyField);(v.inserted.length||v.updated.length||v.removed.length)&&(l=g.data,f("changed"),o==null||o(v))}catch{}}function y(){s||(s=window.setInterval(h,i))}function m(){s&&(clearInterval(s),s=null)}n&&document.addEventListener("visibilitychange",()=>{document.hidden||s&&h()});const p={...e,async load(g={}){d=g;const v=await e.load(g);return l=v.data,v},on(g,v){u.has(g)||u.set(g,new Set),u.get(g).add(v);const b=e.on(g,v);return()=>{var x;(x=u.get(g))==null||x.delete(v),b()}},startPolling:y,stopPolling:m,isPolling:()=>s!==null,setInterval(g){i=g,s&&(m(),y())}};return a&&y(),p}function Id(e){const{url:t,baseSource:r,keyField:a=r.keyField,reconnectDelay:n=3e3,maxReconnects:o=10,withCredentials:i=!1}=e;let s=null,l=0,d=null,u=[];const f=new Map;function h(b,...x){var w;(w=f.get(b))==null||w.forEach(A=>A(...x))}function y(b){if(e.parseEvent)return e.parseEvent(b);try{return JSON.parse(b.data)}catch{return null}}function m(b){switch(b.type){case"insert":b.data&&(u=[...u,b.data],h("changed"));break;case"update":b.key&&b.changes&&(u=u.map(x=>x[a]===b.key?{...x,...b.changes}:x),h("changed"));break;case"remove":b.key&&(u=u.filter(x=>x[a]!==b.key),h("changed"));break;case"snapshot":Array.isArray(b.data)&&(u=b.data,h("changed"));break;case"refresh":v.load().catch(()=>{});break}}function p(){(s==null?void 0:s.readyState)!==EventSource.OPEN&&(g(),s=new EventSource(t,{withCredentials:i}),s.onopen=()=>{l=0,h("connected")},s.onmessage=b=>{const x=y(b);x&&(m(x),h("message",x))},s.onerror=()=>{if(h("error",new Error("SSE connection error")),(s==null?void 0:s.readyState)===EventSource.CLOSED&&(h("disconnected"),s=null,l<o)){l++;const b=n*Math.min(l,5);d=setTimeout(p,b)}})}function g(){d&&(clearTimeout(d),d=null),s&&(s.close(),s=null)}const v={keyField:a,writable:r.writable,async load(b={}){h("loading",!0);try{const x=await r.load(b);return u=x.data,h("loaded",x),h("loading",!1),x}catch(x){throw h("error",x),h("loading",!1),x}},async byKey(b){const x=u.find(w=>w[a]===b);return x||r.byKey(b)},async insert(b){return r.insert(b)},async update(b,x){return r.update(b,x)},async remove(b){return r.remove(b)},on(b,x){return f.has(b)||f.set(b,new Set),f.get(b).add(x),()=>{var w;return(w=f.get(b))==null?void 0:w.delete(x)}},connect:p,disconnect:g,isConnected:()=>(s==null?void 0:s.readyState)===EventSource.OPEN};return v}function ae(e,t){const r={};for(const a of t){const n=e.map(i=>i[a.field]).filter(i=>i!=null),o=a.alias??`${a.fn}_${a.field}`;switch(a.fn){case"sum":r[o]=n.reduce((i,s)=>Number(i)+Number(s),0);break;case"avg":r[o]=n.length?n.reduce((i,s)=>Number(i)+Number(s),0)/n.length:0;break;case"min":r[o]=n.length?Math.min(...n.map(Number)):null;break;case"max":r[o]=n.length?Math.max(...n.map(Number)):null;break;case"count":r[o]=n.length;break;case"first":r[o]=n[0]??null;break;case"last":r[o]=n[n.length-1]??null;break;case"distinct":r[o]=[...new Set(n)];break}}return r}function Dt(e,t){const{groupBy:r,aggregates:a=[],includeItems:n=!1,sortGroups:o}=t;if(r.length===0)return[{key:{},count:e.length,aggregates:ae(e,a),items:n?e:void 0}];const i=new Map;for(const l of e){const d={};for(const f of r)d[f]=l[f];const u=JSON.stringify(d);i.has(u)||i.set(u,{key:d,items:[]}),i.get(u).items.push(l)}const s=[];for(const[,l]of i)s.push({key:l.key,count:l.items.length,aggregates:ae(l.items,a),items:n?l.items:void 0});return o!=null&&o.length&&s.sort((l,d)=>{for(const u of o){const f=l.key[u.field]??l.aggregates[u.field],h=d.key[u.field]??d.aggregates[u.field],y=typeof f=="number"&&typeof h=="number"?f-h:String(f??"").localeCompare(String(h??""));if(y!==0)return u.direction==="desc"?-y:y}return 0}),s}function To(e,t,r=[]){if(t.length===0)return[{key:{},count:e.length,aggregates:ae(e,r),items:e}];const[a,...n]=t,o=Dt(e,{groupBy:[a],aggregates:r,includeItems:!0});if(n.length>0)for(const i of o)i.groups=To(i.items,n,r),delete i.items;return o}function Pd(e,t){const{rows:r,columns:a,values:n,aggregateFunction:o="sum",rowTotals:i=!0,columnTotals:s=!0,grandTotal:l=!0}=t,d=[...new Set(e.map(m=>String(m[a])))].sort(),u=Dt(e,{groupBy:r,includeItems:!0}),f=[];for(const m of u){const p={rowKey:m.key,values:{}};for(const g of d){const v=m.items.filter(x=>String(x[a])===g),b=ae(v,[{field:n,fn:o}]);p.values[g]=b[`${o}_${n}`]??null}if(i){const g=ae(m.items,[{field:n,fn:o}]);p.rowTotal=g[`${o}_${n}`]}f.push(p)}let h;if(s){h={};for(const m of d){const p=e.filter(v=>String(v[a])===m),g=ae(p,[{field:n,fn:o}]);h[m]=g[`${o}_${n}`]}}let y;return l&&(y=ae(e,[{field:n,fn:o}])[`${o}_${n}`]),{columnHeaders:d,rows:f,columnTotals:h,grandTotal:y}}function Dd(e,t){return e.map((r,a)=>{const n={...r};for(const o of t)n[o.name]=o.formula(r,a,e);return n})}const Hd={runningSum:e=>(t,r,a)=>a.slice(0,r+1).reduce((n,o)=>n+Number(o[e]??0),0),runningAvg:e=>(t,r,a)=>{const n=a.slice(0,r+1);return n.reduce((o,i)=>o+Number(i[e]??0),0)/n.length},percentOfTotal:e=>(t,r,a)=>{const n=a.reduce((o,i)=>o+Number(i[e]??0),0);return n?Number(t[e]??0)/n*100:0},rank:(e,t="desc")=>(r,a,n)=>[...n].sort((i,s)=>{const l=Number(i[e]??0)-Number(s[e]??0);return t==="desc"?-l:l}).findIndex(i=>i===r)+1,diffFromPrevious:e=>(t,r,a)=>r===0?null:Number(t[e]??0)-Number(a[r-1][e]??0),percentChange:e=>(t,r,a)=>{if(r===0)return null;const n=Number(a[r-1][e]??0);return n===0?null:(Number(t[e]??0)-n)/n*100},movingAverage:(e,t)=>(r,a,n)=>{const o=Math.max(0,a-t+1),i=n.slice(o,a+1);return i.reduce((s,l)=>s+Number(l[e]??0),0)/i.length},conditional:(e,t,r)=>a=>e(a)?t:r,concat:(...e)=>t=>e.map(r=>t[r]??"").join(" "),formatDate:(e,t="medium")=>r=>{const a=r[e];return a?new Date(a).toLocaleDateString(void 0,{dateStyle:t}):""}};function Fd(e,t){const r=[],a=new Map,n=new Map;for(let s=0;s<e.length;s++){const l=e[s];for(const d of t)if(!d.validate(l,s,e)){const u=typeof d.message=="function"?d.message(l):d.message,f={index:s,rule:d.name,message:u,severity:d.severity??"error",fields:d.fields??[],item:l};r.push(f),a.has(s)||a.set(s,[]),a.get(s).push(f);for(const h of f.fields)n.has(h)||n.set(h,[]),n.get(h).push(f)}}const o=r.filter(s=>s.severity==="error").length,i=r.filter(s=>s.severity==="warning").length;return{isValid:o===0,errorCount:o,warningCount:i,errors:r,byIndex:a,byField:n}}const $d={required:e=>({name:`required_${String(e)}`,validate:t=>t[e]!=null&&t[e]!=="",message:`${String(e)} is required`,fields:[String(e)]}),minLength:(e,t)=>({name:`minLength_${String(e)}`,validate:r=>String(r[e]??"").length>=t,message:`${String(e)} must be at least ${t} characters`,fields:[String(e)]}),maxLength:(e,t)=>({name:`maxLength_${String(e)}`,validate:r=>String(r[e]??"").length<=t,message:`${String(e)} must be at most ${t} characters`,fields:[String(e)]}),min:(e,t)=>({name:`min_${String(e)}`,validate:r=>Number(r[e])>=t,message:`${String(e)} must be at least ${t}`,fields:[String(e)]}),max:(e,t)=>({name:`max_${String(e)}`,validate:r=>Number(r[e])<=t,message:`${String(e)} must be at most ${t}`,fields:[String(e)]}),email:e=>({name:`email_${String(e)}`,validate:t=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(t[e]??"")),message:`${String(e)} must be a valid email`,fields:[String(e)]}),pattern:(e,t,r)=>({name:`pattern_${String(e)}`,validate:a=>t.test(String(a[e]??"")),message:r??`${String(e)} has invalid format`,fields:[String(e)]}),unique:e=>({name:`unique_${String(e)}`,validate:(t,r,a)=>{const n=t[e];return a.findIndex(o=>o[e]===n)===r},message:`${String(e)} must be unique`,fields:[String(e)]}),custom:(e,t,r,a)=>({name:e,validate:t,message:r,fields:a})},Od=(function(){return{async updateWhere(e,t,r){return e.map(a=>{if(!t(a))return a;const n=typeof r=="function"?r(a):r;return{...a,...n}})},async removeWhere(e,t){const r=[],a=[];for(const n of e)t(n)?a.push(n):r.push(n);return{remaining:r,removed:a}},async transform(e,t,r={}){const{parallel:a=!1,batchSize:n=10}=r,o=[],i=[];let s=0;if(a)for(let l=0;l<e.length;l+=n){const d=e.slice(l,l+n),u=await Promise.allSettled(d.map((f,h)=>t(f,l+h)));for(let f=0;f<u.length;f++){const h=u[f];h.status==="fulfilled"?(o.push(h.value),s++):i.push({index:l+f,item:d[f],error:h.reason})}}else for(let l=0;l<e.length;l++)try{const d=await t(e[l],l);o.push(d),s++}catch(d){i.push({index:l,item:e[l],error:d instanceof Error?d:new Error(String(d))})}return{succeeded:s,failed:i.length,errors:i,results:o}},deduplicate(e,t){const r=new Set;return e.filter(a=>{const n=a[t];return r.has(n)?!1:(r.add(n),!0)})},merge(e,t,r,a={}){const{updateExisting:n=!0,addNew:o=!0}=a,i=new Map(e.map(l=>[l[r],l])),s=[...e];for(const l of t){const d=l[r],u=i.get(d);if(u){if(n){const f=s.indexOf(u);s[f]={...u,...l}}}else o&&s.push(l)}return s}}})();function jd(e,t){const r=(t==null?void 0:t.autoLoad)??!0,a=(t==null?void 0:t.defaultPageSize)??20,[n,o]=c.useState([]),[i,s]=c.useState(0),[l,d]=c.useState(!1),[u,f]=c.useState(null),[h,y]=c.useState(1),[m,p]=c.useState(a),[g,v]=c.useState((t==null?void 0:t.defaultSort)??[]),[b,x]=c.useState(t==null?void 0:t.defaultFilter),[w,A]=c.useState((t==null?void 0:t.defaultSearch)??""),k=c.useRef(0),C=t==null?void 0:t.loadOptions,M=c.useCallback(async()=>{if(!e)return;const P=++k.current;d(!0),f(null);try{const F=await e.load({skip:(h-1)*m,take:m,sort:g.length?g:void 0,filter:b,search:w||void 0,...C});if(P!==k.current)return;o(F.data),s(F.totalCount)}catch(F){if(P!==k.current)return;f(F instanceof Error?F.message:String(F))}finally{P===k.current&&d(!1)}},[e,h,m,g,b,w,C]);c.useEffect(()=>{r&&M()},[M,r]),c.useEffect(()=>{if(e)return e.on("changed",()=>{M()})},[e,M]);const E=c.useCallback((P,F)=>{v([{field:P,direction:F}]),y(1)},[]),L=c.useCallback(P=>{x(P),y(1)},[]),T=c.useCallback(P=>{A(P),y(1)},[]),N=c.useCallback(P=>{p(P),y(1)},[]),R=c.useCallback(async P=>{if(!(e!=null&&e.insert))throw new Error("DataSource is not writable");await e.insert(P)},[e]),I=c.useCallback(async(P,F)=>{if(!(e!=null&&e.update))throw new Error("DataSource is not writable");await e.update(P,F)},[e]),D=c.useCallback(async P=>{if(!(e!=null&&e.remove))throw new Error("DataSource is not writable");await e.remove(P)},[e]);return{data:n,totalCount:i,loading:l,error:u,page:h,pageSize:m,sort:g,filter:b,search:w,setPage:y,setPageSize:N,setSort:v,setSortField:E,setFilter:L,setSearch:T,reload:M,insert:R,update:I,remove:D}}function Ro(e,t){const[r,a]=c.useState(void 0),[n,o]=c.useState({}),[i,s]=c.useState(!1),[l,d]=c.useState(null),u=c.useRef(0),f=c.useCallback(async()=>{if(!e||t==null){a(void 0);return}const b=++u.current;s(!0),d(null);try{const x=await e.byKey(t);if(b!==u.current)return;a(x),o({})}catch(x){if(b!==u.current)return;d(x instanceof Error?x.message:String(x))}finally{b===u.current&&s(!1)}},[e,t]);c.useEffect(()=>{f()},[f]),c.useEffect(()=>{if(e)return e.on("changed",()=>{f()})},[e,f]);const h=c.useMemo(()=>({...r??{},...n}),[r,n]),y=Object.keys(n).length>0,m=c.useCallback((b,x)=>{o(w=>({...w,[b]:x}))},[]),p=c.useCallback(b=>{o(x=>({...x,...b}))},[]),g=c.useCallback(async()=>{if(!(e!=null&&e.update))throw new Error("DataSource is not writable");y&&await e.update(t,n)},[e,t,n,y]),v=c.useCallback(()=>{o({})},[]);return{data:r,editData:h,loading:i,error:l,changes:n,isDirty:y,set:m,setMany:p,save:g,reload:f,reset:v}}function Bd(e,t,r){const a=Ro(e,t),n=a.editData[r],o=c.useCallback(s=>{a.set(r,s)},[a,r]),i=c.useCallback(async()=>{if(!(e!=null&&e.update))throw new Error("DataSource is not writable");const s={[r]:a.editData[r]};await e.update(t,s)},[e,t,r,a.editData]);return{value:n,setValue:o,loading:a.loading,error:a.error,isDirty:r in a.changes,save:i}}function _d(e,t,r,a){const n=(a==null?void 0:a.autoLoad)??!0,o=(a==null?void 0:a.take)??200,[i,s]=c.useState([]),[l,d]=c.useState(!1),[u,f]=c.useState(null),h=c.useRef(0),y=c.useCallback(async g=>{if(!e)return;const v=++h.current;d(!0),f(null);try{const b=await e.load({take:o,search:g||void 0,searchFields:a==null?void 0:a.searchFields});if(v!==h.current)return;s(b.data)}catch(b){if(v!==h.current)return;f(b instanceof Error?b.message:String(b))}finally{v===h.current&&d(!1)}},[e,o,a==null?void 0:a.searchFields]);c.useEffect(()=>{n&&y()},[y,n]);const m=c.useMemo(()=>i.map(g=>{const v=g,b={value:String(v[t]??""),label:String(v[r]??"")};return a!=null&&a.iconField&&v[a.iconField]!=null&&(b.icon=v[a.iconField]),a!=null&&a.descriptionField&&v[a.descriptionField]!=null&&(b.description=String(v[a.descriptionField])),a!=null&&a.groupField&&v[a.groupField]!=null&&(b.group=String(v[a.groupField])),b}),[i,t,r,a==null?void 0:a.iconField,a==null?void 0:a.descriptionField,a==null?void 0:a.groupField]),p=c.useCallback(g=>{y(g)},[y]);return{options:m,loading:l,error:u,search:p,reload:()=>y()}}function dt(e){const{dbName:t,storeName:r,keyField:a="id",version:n=1,indexes:o=[]}=e;let i=null;const s=new Map;function l(m,...p){var g;(g=s.get(m))==null||g.forEach(v=>v(...p))}async function d(){return i||new Promise((m,p)=>{const g=indexedDB.open(t,n);g.onerror=()=>p(g.error),g.onsuccess=()=>{i=g.result,m(i)},g.onupgradeneeded=v=>{const b=v.target.result;if(!b.objectStoreNames.contains(r)){const x=b.createObjectStore(r,{keyPath:a});for(const w of o)x.createIndex(w.name,w.keyPath,{unique:w.unique??!1})}}})}async function u(m,p){const g=await d();return new Promise((v,b)=>{const w=g.transaction(r,m).objectStore(r),A=p(w);A.onsuccess=()=>v(A.result),A.onerror=()=>b(A.error)})}async function f(m,p,g){const v=await d();return new Promise((b,x)=>{var I;const A=v.transaction(r,m).objectStore(r),k=[];let C=A,M="next";if((I=p.sort)!=null&&I.length){const D=p.sort[0].field,P=p.sort[0].direction;A.indexNames.contains(D)&&(C=A.index(D)),M=P==="desc"?"prev":"next"}const E=C.openCursor(null,M);let L=0,T=0;const N=p.skip??0,R=p.take??1/0;E.onsuccess=()=>{const D=E.result;if(!D||T>=R){b(k);return}const P=D.value;if(p.filter&&!h(P,p.filter)){D.continue();return}if(p.search&&!y(P,p.search,p.searchFields)){D.continue();return}if(L<N){L++,D.continue();return}k.push(P),T++,D.continue()},E.onerror=()=>x(E.error)})}function h(m,p){if(!p.items.length)return!0;const g=v=>{if(v.type==="group")return h(m,v);const b=m[v.field],x=v.value;switch(v.operator){case"=":return b==x;case"<>":return b!=x;case"<":return b<x;case"<=":return b<=x;case">":return b>x;case">=":return b>=x;case"contains":return String(b??"").toLowerCase().includes(String(x??"").toLowerCase());case"notcontains":return!String(b??"").toLowerCase().includes(String(x??"").toLowerCase());case"startswith":return String(b??"").toLowerCase().startsWith(String(x??"").toLowerCase());case"endswith":return String(b??"").toLowerCase().endsWith(String(x??"").toLowerCase());case"isblank":return b==null||b==="";case"isnotblank":return b!=null&&b!=="";default:return!0}};return p.logic==="and"?p.items.every(g):p.items.some(g)}function y(m,p,g){const v=p.toLowerCase();return(g?g.map(x=>m[x]):Object.values(m)).some(x=>String(x??"").toLowerCase().includes(v))}return{keyField:a,writable:!0,async load(m={}){var p;l("loading",!0);try{const g=await f("readonly",m,()=>{});(p=m.sort)!=null&&p.length&&g.sort((x,w)=>{for(const A of m.sort){const k=x[A.field]??"",C=w[A.field]??"",M=typeof k=="number"&&typeof C=="number"?k-C:String(k).localeCompare(String(C));if(M!==0)return A.direction==="desc"?-M:M}return 0});const v=await this.count(),b={data:g,totalCount:v};return l("loaded",b),l("loading",!1),b}catch(g){throw l("error",g),l("loading",!1),g}},async byKey(m){return u("readonly",p=>p.get(m))},async insert(m){return await u("readwrite",p=>p.add(m)),l("changed"),m},async update(m,p){const g=await this.byKey(m);if(!g)throw new Error(`Record not found: ${m}`);const v={...g,...p};return await u("readwrite",b=>b.put(v)),l("changed"),v},async remove(m){await u("readwrite",p=>p.delete(m)),l("changed")},on(m,p){return s.has(m)||s.set(m,new Set),s.get(m).add(p),()=>{var g;return(g=s.get(m))==null?void 0:g.delete(p)}},async clear(){await u("readwrite",m=>m.clear()),l("changed")},async count(){return u("readonly",m=>m.count())},async getAll(){return u("readonly",m=>m.getAll())},async bulkInsert(m){const p=await d();return new Promise((g,v)=>{const b=p.transaction(r,"readwrite"),x=b.objectStore(r);for(const w of m)x.put(w);b.oncomplete=()=>{l("changed"),g()},b.onerror=()=>v(b.error)})},async bulkDelete(m){const p=await d();return new Promise((g,v)=>{const b=p.transaction(r,"readwrite"),x=b.objectStore(r);for(const w of m)x.delete(w);b.oncomplete=()=>{l("changed"),g()},b.onerror=()=>v(b.error)})},async exportData(){return this.getAll()},async importData(m){await this.clear(),await this.bulkInsert(m)}}}function Wd(e){const{remoteSource:t,offlineConfig:r,syncStrategy:a="remote-first",onConflict:n,onSync:o,autoSyncInterval:i=0}=e,s=r.keyField??t.keyField,l=dt({...r,keyField:s}),d=dt({dbName:r.dbName,storeName:`${r.storeName}_pending`,keyField:"id"});let u=navigator.onLine,f=0;const h=new Map;function y(g,...v){var b;(b=h.get(g))==null||b.forEach(x=>x(...v))}window.addEventListener("online",()=>{u=!0,y("online"),p()}),window.addEventListener("offline",()=>{u=!1,y("offline")});async function m(g,v,b){const x={id:`pending_${++f}_${Date.now()}`,action:g,key:v,data:b,timestamp:Date.now(),retries:0};await d.insert(x)}async function p(){if(u){y("syncing",!0);try{let g=0,v=0,b=0;const x=await d.load();for(const w of x.data)try{switch(w.action){case"insert":await t.insert(w.data),g++;break;case"update":await t.update(w.key,w.data),v++;break;case"remove":await t.remove(w.key),b++;break}await d.remove(w.id)}catch{w.retries<3&&await d.update(w.id,{retries:w.retries+1})}if(a!=="local-first"){const w=await t.load();if(a==="remote-first")await l.importData(w.data);else if(a==="merge"&&n){const A=await l.load(),k=new Map(A.data.map(M=>[M[s],M])),C=[];for(const M of w.data){const E=k.get(M[s]);E?C.push(n(E,M)):C.push(M)}await l.importData(C)}}y("synced",{added:g,updated:v,removed:b}),o==null||o({added:g,updated:v,removed:b})}catch(g){y("syncError",g)}finally{y("syncing",!1)}}}return i>0&&window.setInterval(p,i),{keyField:s,writable:!0,async load(g={}){if(u&&a==="remote-first")try{const v=await t.load(g);return await l.bulkInsert(v.data),v}catch{}return l.load(g)},async byKey(g){if(u)try{const v=await t.byKey(g);return v&&await l.update(g,v).catch(()=>l.insert(v)),v}catch{}return l.byKey(g)},async insert(g){const v=await l.insert(g);if(u)try{return await t.insert(g)}catch{await m("insert",void 0,g)}else await m("insert",void 0,g);return y("changed"),v},async update(g,v){const b=await l.update(g,v);if(u)try{return await t.update(g,v)}catch{await m("update",g,v)}else await m("update",g,v);return y("changed"),b},async remove(g){if(await l.remove(g),u)try{await t.remove(g)}catch{await m("remove",g)}else await m("remove",g);y("changed")},on(g,v){return h.has(g)||h.set(g,new Set),h.get(g).add(v),()=>{var b;return(b=h.get(g))==null?void 0:b.delete(v)}},sync:p,isOnline:()=>u,async getPendingChanges(){return(await d.load()).data},async clearPendingChanges(){await d.clear()}}}function Vd(e){const{channelName:t,source:r}=e,a=new BroadcastChannel(t),n=new Map;function o(s,...l){var d;(d=n.get(s))==null||d.forEach(u=>u(...l))}a.onmessage=s=>{const l=s.data;switch(l.type){case"insert":case"update":case"remove":o("changed"),o("crossTabChange",l);break;case"refresh":o("refresh");break;case"request-sync":r.load().then(d=>{a.postMessage({type:"sync-data",data:d.data})});break}};function i(s){a.postMessage(s)}return{...r,async insert(s){const l=await r.insert(s);return i({type:"insert",data:l}),l},async update(s,l){const d=await r.update(s,l);return i({type:"update",key:s,changes:l}),d},async remove(s){await r.remove(s),i({type:"remove",key:s})},on(s,l){n.has(s)||n.set(s,new Set),n.get(s).add(l);const d=r.on(s,l);return()=>{var u;(u=n.get(s))==null||u.delete(l),d()}},broadcast:i,requestSync(){i({type:"request-sync"})}}}function Xd(e={}){const{prefix:t="",persist:r={filter:!0,sort:!0,page:!0,search:!0},useHash:a=!1}=e;function n(){return a?new URLSearchParams(window.location.hash.slice(1)):new URLSearchParams(window.location.search)}function o(s){if(a)window.location.hash=s.toString();else{const l=new URL(window.location.href);l.search=s.toString(),window.history.replaceState({},"",l.toString())}}function i(s){return t?`${t}_${s}`:s}return{read(){const s=n(),l={};if(r.filter){const d=s.get(i("filter"));if(d)try{l.filter=JSON.parse(d)}catch{}}if(r.sort){const d=s.get(i("sort"));if(d)try{l.sort=JSON.parse(d)}catch{}}if(r.page){const d=s.get(i("skip")),u=s.get(i("take"));d&&(l.skip=parseInt(d,10)),u&&(l.take=parseInt(u,10))}if(r.search){const d=s.get(i("search"));d&&(l.search=d)}return l},write(s){const l=n();r.filter&&(s.filter&&s.filter.items.length>0?l.set(i("filter"),JSON.stringify(s.filter)):l.delete(i("filter"))),r.sort&&(s.sort&&s.sort.length>0?l.set(i("sort"),JSON.stringify(s.sort)):l.delete(i("sort"))),r.page&&(s.skip?l.set(i("skip"),String(s.skip)):l.delete(i("skip")),s.take?l.set(i("take"),String(s.take)):l.delete(i("take"))),r.search&&(s.search?l.set(i("search"),s.search):l.delete(i("search"))),o(l)},clear(){const s=n();s.delete(i("filter")),s.delete(i("sort")),s.delete(i("skip")),s.delete(i("take")),s.delete(i("search")),o(s)},toLoadOptions(){const s=this.read();return{filter:s.filter,sort:s.sort,skip:s.skip,take:s.take,search:s.search}}}}const Ud={async exportToJSON(e,t){const r=await e.load(),a={version:"1.0",timestamp:Date.now(),data:r.data,metadata:t};return JSON.stringify(a,null,2)},async importFromJSON(e,t,r={}){const n=JSON.parse(t).data;let o=0,i=0;r.replace&&"clear"in e&&await e.clear();for(const s of n){if(r.validate&&!r.validate(s)){i++;continue}try{await e.insert(s),o++}catch{i++}}return{imported:o,skipped:i}},async downloadAsJSON(e,t="export.json"){const r=await this.exportToJSON(e),a=new Blob([r],{type:"application/json"}),n=URL.createObjectURL(a),o=document.createElement("a");o.href=n,o.download=t,o.click(),URL.revokeObjectURL(n)},async importFromFile(e,t,r){const a=await t.text();return this.importFromJSON(e,a,r)}};function qd(e="nice_user_prefs"){let t=null;function r(){if(t)return t;try{const n=localStorage.getItem(e);t=n?JSON.parse(n):{}}catch{t={}}return t}function a(n){t=n,localStorage.setItem(e,JSON.stringify(n))}return{get(n,o){return r()[n]??o},set(n,o){const i=r();i[n]=o,a(i)},remove(n){const o=r();delete o[n],a(o)},getAll(){return{...r()}},setAll(n){a(n)},clear(){t={},localStorage.removeItem(e)},merge(n){a({...r(),...n})}}}const Gd=["https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600&display=swap","https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Archivo+Black&family=Archivo:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&family=Rajdhani:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Work+Sans:wght@400;500;600&display=swap","https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&family=Nunito:wght@400;600;700;800&display=swap","https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;600&display=swap","https://fonts.googleapis.com/css2?family=Libre+Caslon+Text:wght@400;700&family=DM+Sans:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap"],Kd={space1:"2px",space2:"4px",space3:"8px",space4:"12px",space5:"16px",space6:"20px",space8:"28px"},oe={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},Ht={space1:"6px",space2:"12px",space3:"16px",space4:"24px",space5:"32px",space6:"40px",space8:"56px"},zo={meta:{id:"obsidianEditorial",name:"Obsidian Editorial",tagline:"Dark-mode magazine — serif display, razor borders, grain.",tags:["dark","editorial","serif"]},theme:{name:"Obsidian Editorial",darkMode:"dark",colors:{primary:"#e8dcc4",primaryHover:"#d4c29c",success:"#7fb069",warning:"#e6aa68",error:"#d65a5a",info:"#88aabb",accent:"#c98a5b",focus:"#e8dcc4",surface:"#1a1715",surfaceHover:"#221e1b"},backgrounds:{primary:"#0e0c0b",secondary:"#1a1715",tertiary:"#221e1b",hover:"#2a2522",elevated:"#1a1715",inset:"#0b0908",canvas:"#0e0c0b"},text:{primary:"#ede4d1",secondary:"#a39787",muted:"#6b6055",inverse:"#0e0c0b"},borders:{color:"#332d28",radiusSm:"0",radiusMd:"1px",radiusLg:"2px",radiusXl:"3px",radiusFull:"9999px",width:"1px",divider:"#28231f"},shadows:{sm:"none",md:"0 1px 0 0 rgba(232,220,196,0.04)",lg:"0 2px 0 0 rgba(232,220,196,0.06)",xl:"0 4px 0 0 rgba(232,220,196,0.08)"},spacing:Ht,typography:{fontFamily:"'Inter', -apple-system, sans-serif",headingFontFamily:"'Fraunces', 'Playfair Display', Georgia, serif",monoFontFamily:"'JetBrains Mono', ui-monospace, monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.375rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.65,letterSpacing:"0.005em",headingLetterSpacing:"-0.02em"},transitions:{fast:"80ms cubic-bezier(0.4,0,0.2,1)",normal:"140ms cubic-bezier(0.4,0,0.2,1)",slow:"220ms cubic-bezier(0.4,0,0.2,1)"},backgroundImage:{type:"pattern",pattern:"noise",opacity:.35,blendMode:"overlay"}},displayStyle:"editorial",variantConfig:{density:"comfortable",animation:"subtle"}},Io={meta:{id:"neonArcade",name:"Neon Arcade",tagline:"Phosphor-green terminal glow on absolute black.",tags:["dark","retro","mono","terminal"]},theme:{name:"Neon Arcade",darkMode:"dark",colors:{primary:"#39ff14",primaryHover:"#50ff35",success:"#39ff14",warning:"#ffcc00",error:"#ff3355",info:"#00e5ff",accent:"#ff00aa",focus:"#39ff14",surface:"#060a06",surfaceHover:"#0b140b"},backgrounds:{primary:"#000000",secondary:"#060a06",tertiary:"#0b140b",hover:"#12241a",elevated:"#060a06",inset:"#000000",canvas:"#000000"},text:{primary:"#c8ffb8",secondary:"#7be368",muted:"#3e7a39",inverse:"#000000"},borders:{color:"#1d3a1d",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"0",width:"1px",divider:"#143014",focusColor:"#39ff14"},shadows:{sm:"0 0 4px rgba(57,255,20,0.3)",md:"0 0 10px rgba(57,255,20,0.35), 0 0 2px rgba(57,255,20,0.6)",lg:"0 0 22px rgba(57,255,20,0.4), 0 0 4px rgba(57,255,20,0.7)",xl:"0 0 40px rgba(57,255,20,0.5), 0 0 8px rgba(57,255,20,0.8)",glow:"0 0 30px #39ff14, 0 0 60px rgba(57,255,20,0.4)"},spacing:oe,typography:{fontFamily:"'JetBrains Mono', 'Fira Code', ui-monospace, monospace",headingFontFamily:"'JetBrains Mono', monospace",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.25rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:700,fontWeightBold:700,lineHeight:1.5,letterSpacing:"0.02em",headingLetterSpacing:"0.08em"},transitions:{fast:"60ms steps(4, end)",normal:"120ms steps(6, end)",slow:"200ms steps(8, end)"},backgroundImage:{type:"pattern",pattern:"grid",opacity:.25}},displayStyle:"terminal",variantConfig:{radius:"none",shadow:"glow",density:"compact",animation:"subtle"}},Po={meta:{id:"hyggeScandinavian",name:"Hygge Scandinavian",tagline:"Warm cream, generous breathing room, soft serif display.",tags:["light","warm","serif","spacious"]},theme:{name:"Hygge Scandinavian",darkMode:"light",colors:{primary:"#8b6f47",primaryHover:"#6f5738",success:"#6b8e4e",warning:"#d49a3e",error:"#b84c4c",info:"#6a8aad",accent:"#c98754",focus:"#8b6f47",surface:"#fbf6ed",surfaceHover:"#f3ecdf"},backgrounds:{primary:"#fdf9f1",secondary:"#f5eee0",tertiary:"#ede3d0",hover:"#e8ddc8",elevated:"#ffffff",inset:"#f0e7d4",canvas:"#fdf9f1"},text:{primary:"#3a2f22",secondary:"#6a5845",muted:"#9c8c76",inverse:"#fdf9f1"},borders:{color:"#d9cbb0",radiusSm:"8px",radiusMd:"14px",radiusLg:"22px",radiusXl:"32px",radiusFull:"9999px",width:"1px",divider:"#e8ddc8"},shadows:{sm:"0 1px 2px rgba(122,92,58,0.05)",md:"0 6px 16px -4px rgba(122,92,58,0.08)",lg:"0 16px 32px -10px rgba(122,92,58,0.10)",xl:"0 28px 56px -18px rgba(122,92,58,0.14)"},spacing:Ht,typography:{fontFamily:"'Work Sans', -apple-system, sans-serif",headingFontFamily:"'Cormorant Garamond', Georgia, serif",monoFontFamily:"ui-monospace, 'SF Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.7,letterSpacing:"0",headingLetterSpacing:"-0.01em"},transitions:{fast:"160ms cubic-bezier(0.16,1,0.3,1)",normal:"260ms cubic-bezier(0.16,1,0.3,1)",slow:"400ms cubic-bezier(0.16,1,0.3,1)"}},displayStyle:"scandinavian",variantConfig:{density:"spacious",animation:"normal"}},Do={meta:{id:"brutalistRaw",name:"Brutalist Raw",tagline:"Paper + ink + hard shadows — zero blur, zero mercy.",tags:["light","brutalist","experimental"]},theme:{name:"Brutalist Raw",darkMode:"light",colors:{primary:"#ff3b30",primaryHover:"#000000",success:"#00aa55",warning:"#ffcc00",error:"#ff0000",info:"#0066ff",accent:"#ffcc00",focus:"#ff3b30",surface:"#ffffff",surfaceHover:"#f5f3ee"},backgrounds:{primary:"#f5f3ee",secondary:"#ffffff",tertiary:"#e8e4d8",hover:"#e0dcd0",elevated:"#ffffff",inset:"#e8e4d8",canvas:"#f5f3ee"},text:{primary:"#000000",secondary:"#1a1a1a",muted:"#555555",inverse:"#ffffff"},borders:{color:"#000000",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"0",width:"2px",divider:"#000000"},shadows:{sm:"3px 3px 0 0 #000000",md:"6px 6px 0 0 #000000",lg:"10px 10px 0 0 #000000",xl:"14px 14px 0 0 #000000"},spacing:oe,typography:{fontFamily:"'Archivo', -apple-system, sans-serif",headingFontFamily:"'Archivo Black', 'Archivo', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.75rem",fontWeightNormal:500,fontWeightMedium:700,fontWeightSemibold:700,fontWeightBold:900,lineHeight:1.4,letterSpacing:"-0.01em",headingLetterSpacing:"-0.04em"},transitions:{fast:"0ms linear",normal:"80ms cubic-bezier(0.2,0,0,1)",slow:"140ms cubic-bezier(0.2,0,0,1)"}},displayStyle:"brutalist",variantConfig:{radius:"none",shadow:"lg",density:"normal",animation:"subtle"}},Ho={meta:{id:"glassAurora",name:"Glass Aurora",tagline:"Frosted translucency floating over aurora light.",tags:["light","glass","modern","gradient"]},theme:{name:"Glass Aurora",darkMode:"light",colors:{primary:"#5b5bff",primaryHover:"#4343e8",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4",accent:"#ec4899",focus:"#5b5bff",surface:"rgba(255,255,255,0.55)",surfaceHover:"rgba(255,255,255,0.75)"},backgrounds:{primary:"rgba(255,255,255,0.55)",secondary:"rgba(255,255,255,0.35)",tertiary:"rgba(255,255,255,0.22)",hover:"rgba(255,255,255,0.7)",elevated:"rgba(255,255,255,0.8)",inset:"rgba(255,255,255,0.3)",canvas:"#e8d6ff"},text:{primary:"#1a1440",secondary:"#443c78",muted:"#8b83b8",inverse:"#ffffff"},borders:{color:"rgba(255,255,255,0.6)",radiusSm:"10px",radiusMd:"16px",radiusLg:"24px",radiusXl:"36px",radiusFull:"9999px",width:"1px",divider:"rgba(255,255,255,0.4)"},shadows:{sm:"0 2px 12px rgba(91,91,255,0.08)",md:"0 8px 32px rgba(91,91,255,0.12)",lg:"0 18px 56px rgba(236,72,153,0.18)",xl:"0 32px 80px rgba(91,91,255,0.22)"},spacing:oe,typography:{fontFamily:"'Outfit', -apple-system, sans-serif",headingFontFamily:"'Outfit', sans-serif",monoFontFamily:"ui-monospace, monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.375rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.55,letterSpacing:"-0.005em",headingLetterSpacing:"-0.025em"},transitions:{fast:"140ms cubic-bezier(0.4,0,0.2,1)",normal:"240ms cubic-bezier(0.4,0,0.2,1)",slow:"400ms cubic-bezier(0.4,0,0.2,1)"},backgroundImage:{type:"gradient",gradient:"radial-gradient(at 12% 18%, #ffd6e8 0%, transparent 48%), radial-gradient(at 88% 22%, #c8d8ff 0%, transparent 52%), radial-gradient(at 42% 86%, #d8ffe8 0%, transparent 50%), linear-gradient(180deg, #eee4ff 0%, #ffe8f2 100%)"}},displayStyle:"glass",variantConfig:{density:"normal",animation:"normal"}},Fo={meta:{id:"candyPop",name:"Candy Pop",tagline:"Bubblegum pastels, pill shapes, bouncy easing.",tags:["light","playful","pastel","pill"]},theme:{name:"Candy Pop",darkMode:"light",colors:{primary:"#ff4fa3",primaryHover:"#ff2d8e",success:"#3dd68c",warning:"#ffd63d",error:"#ff5577",info:"#4ec8ff",accent:"#b85bff",focus:"#ff4fa3",surface:"#ffffff",surfaceHover:"#fff5fa"},backgrounds:{primary:"#fff5fa",secondary:"#ffeaf3",tertiary:"#ffd8e9",hover:"#ffc4dc",elevated:"#ffffff",inset:"#ffeaf3",canvas:"#fff8f5"},text:{primary:"#531645",secondary:"#8b3a70",muted:"#c678a8",inverse:"#ffffff"},borders:{color:"#ffc4dc",radiusSm:"9999px",radiusMd:"9999px",radiusLg:"9999px",radiusXl:"9999px",radiusFull:"9999px",width:"2px",divider:"#ffd8e9"},shadows:{sm:"0 2px 0 0 #ffc4dc",md:"0 4px 0 0 #ffa3c7",lg:"0 6px 16px rgba(255,79,163,0.2), 0 3px 0 0 #ff4fa3",xl:"0 12px 28px rgba(255,79,163,0.25)"},spacing:oe,typography:{fontFamily:"'Quicksand', -apple-system, sans-serif",headingFontFamily:"'Nunito', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.125rem",fontSizeXl:"1.5rem",fontWeightNormal:500,fontWeightMedium:600,fontWeightSemibold:700,fontWeightBold:800,lineHeight:1.55,letterSpacing:"0",headingLetterSpacing:"-0.01em"},transitions:{fast:"140ms cubic-bezier(0.34,1.56,0.64,1)",normal:"240ms cubic-bezier(0.34,1.56,0.64,1)",slow:"380ms cubic-bezier(0.34,1.56,0.64,1)"}},displayStyle:"pill",variantConfig:{radius:"full",density:"comfortable",animation:"playful"}},$o={meta:{id:"newspaperBroadsheet",name:"Newspaper Broadsheet",tagline:"Ivory paper, hairline rules, serif gravity.",tags:["light","editorial","serif","print"]},theme:{name:"Newspaper Broadsheet",darkMode:"light",colors:{primary:"#1a1a1a",primaryHover:"#000000",success:"#2d5016",warning:"#8b6914",error:"#8b0000",info:"#1d3a5f",accent:"#8b0000",focus:"#1a1a1a",surface:"#fbf7ee",surfaceHover:"#f3ecdd"},backgrounds:{primary:"#fbf7ee",secondary:"#f5eedb",tertiary:"#ede4cc",hover:"#e8ddbe",elevated:"#fbf7ee",inset:"#f0e7d0",canvas:"#fbf7ee"},text:{primary:"#14110c",secondary:"#3d362a",muted:"#7a6f58",inverse:"#fbf7ee"},borders:{color:"#14110c",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px",width:"1px",divider:"#14110c"},shadows:{sm:"none",md:"none",lg:"none",xl:"none"},spacing:oe,typography:{fontFamily:"'Fraunces', 'Source Serif Pro', Georgia, serif",headingFontFamily:"'Fraunces', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.65,letterSpacing:"0.01em",headingLetterSpacing:"-0.025em"},transitions:{fast:"0ms",normal:"100ms linear",slow:"180ms linear"},backgroundImage:{type:"pattern",pattern:"noise",opacity:.18,blendMode:"multiply"}},displayStyle:"editorial",variantConfig:{radius:"none",shadow:"none",density:"normal"}},Oo={meta:{id:"synthwave84",name:"Synthwave 84",tagline:"Magenta & cyan pulse over deep navy — 1984 forever.",tags:["dark","retro","neon","80s"]},theme:{name:"Synthwave 84",darkMode:"dark",colors:{primary:"#ff3ca8",primaryHover:"#ff6bc1",success:"#72f1b8",warning:"#ffcc33",error:"#fe4450",info:"#36f9f6",accent:"#36f9f6",focus:"#ff3ca8",surface:"#2a1a4f",surfaceHover:"#332260"},backgrounds:{primary:"#1a0933",secondary:"#241443",tertiary:"#2d1a52",hover:"#382266",elevated:"#2a1a4f",inset:"#120626",canvas:"#0e0524"},text:{primary:"#f5e8ff",secondary:"#c9a7ff",muted:"#8063b0",inverse:"#0e0524"},borders:{color:"#553388",radiusSm:"2px",radiusMd:"4px",radiusLg:"6px",radiusXl:"8px",radiusFull:"9999px",width:"1px",divider:"#3d2270",focusColor:"#36f9f6"},shadows:{sm:"0 0 8px rgba(255,60,168,0.4)",md:"0 0 18px rgba(255,60,168,0.45), 0 2px 0 0 #36f9f6",lg:"0 0 36px rgba(255,60,168,0.55), 0 4px 0 0 #36f9f6",xl:"0 0 60px rgba(255,60,168,0.6), 0 6px 0 0 #36f9f6",glow:"0 0 28px #ff3ca8, 0 0 56px rgba(255,60,168,0.5)"},spacing:oe,typography:{fontFamily:"'Rajdhani', -apple-system, sans-serif",headingFontFamily:"'Orbitron', 'Rajdhani', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:700,fontWeightBold:900,lineHeight:1.5,letterSpacing:"0.02em",headingLetterSpacing:"0.08em"},transitions:{fast:"120ms cubic-bezier(0.23,1,0.32,1)",normal:"200ms cubic-bezier(0.23,1,0.32,1)",slow:"360ms cubic-bezier(0.23,1,0.32,1)"},backgroundImage:{type:"gradient",gradient:"linear-gradient(180deg, #0e0524 0%, #1a0933 55%, #2d1a52 100%), repeating-linear-gradient(0deg, rgba(54,249,246,0.04) 0 1px, transparent 1px 3px)"}},displayStyle:"synthwave",variantConfig:{shadow:"glow",animation:"dramatic",density:"normal"}},jo={meta:{id:"zenMinimal",name:"Zen Minimal",tagline:"Whisper-light type, hairlines, oceans of whitespace.",tags:["light","minimal","airy"]},theme:{name:"Zen Minimal",darkMode:"light",colors:{primary:"#0a0a0a",primaryHover:"#262626",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#2563eb",accent:"#737373",focus:"#0a0a0a",surface:"#ffffff",surfaceHover:"#fafafa"},backgrounds:{primary:"#ffffff",secondary:"#fafafa",tertiary:"#f5f5f5",hover:"#f0f0f0",elevated:"#ffffff",inset:"#fafafa",canvas:"#ffffff"},text:{primary:"#171717",secondary:"#525252",muted:"#a3a3a3",inverse:"#ffffff"},borders:{color:"#ededed",radiusSm:"2px",radiusMd:"3px",radiusLg:"4px",radiusXl:"6px",radiusFull:"9999px",width:"1px",divider:"#f0f0f0"},shadows:{sm:"none",md:"0 0 0 1px rgba(0,0,0,0.04)",lg:"0 1px 2px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.05)",xl:"0 4px 8px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.06)"},spacing:Ht,typography:{fontFamily:"'Manrope', -apple-system, sans-serif",headingFontFamily:"'Manrope', sans-serif",monoFontFamily:"ui-monospace, monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.25rem",fontWeightNormal:300,fontWeightMedium:400,fontWeightSemibold:500,fontWeightBold:600,lineHeight:1.6,letterSpacing:"-0.005em",headingLetterSpacing:"-0.03em"},transitions:{fast:"100ms ease",normal:"180ms ease",slow:"280ms ease"}},displayStyle:"minimal",variantConfig:{density:"spacious",animation:"subtle"}},Bo={meta:{id:"claymorphism",name:"Claymorphism",tagline:"Soft-clay 3D surfaces — pressable, friendly, tactile.",tags:["light","playful","neumorphic","3d"]},theme:{name:"Claymorphism",darkMode:"light",colors:{primary:"#8b7ef5",primaryHover:"#7469ec",success:"#6ed6a5",warning:"#ffc771",error:"#ff8b8b",info:"#7ec4f5",accent:"#ffb3d9",focus:"#8b7ef5",surface:"#f3efff",surfaceHover:"#ebe4ff"},backgrounds:{primary:"#f6f0ff",secondary:"#ede4ff",tertiary:"#dfd3fc",hover:"#d3c5fa",elevated:"#ffffff",inset:"#e5daff",canvas:"#f6f0ff"},text:{primary:"#2a1f5e",secondary:"#584a8e",muted:"#9388bd",inverse:"#ffffff"},borders:{color:"rgba(139,126,245,0.15)",radiusSm:"14px",radiusMd:"22px",radiusLg:"32px",radiusXl:"48px",radiusFull:"9999px",width:"0px",divider:"rgba(139,126,245,0.12)"},shadows:{sm:"-3px -3px 6px rgba(255,255,255,0.8), 3px 3px 8px rgba(139,126,245,0.18), inset 0 0 0 rgba(255,255,255,0)",md:"-5px -5px 12px rgba(255,255,255,0.9), 6px 6px 18px rgba(139,126,245,0.22), inset 1px 1px 1px rgba(255,255,255,0.6)",lg:"-8px -8px 20px rgba(255,255,255,0.95), 10px 10px 32px rgba(139,126,245,0.28), inset 2px 2px 2px rgba(255,255,255,0.7)",xl:"-14px -14px 32px rgba(255,255,255,1), 16px 16px 48px rgba(139,126,245,0.34), inset 3px 3px 4px rgba(255,255,255,0.8)",inner:"inset 4px 4px 10px rgba(139,126,245,0.2), inset -4px -4px 10px rgba(255,255,255,0.9)"},spacing:oe,typography:{fontFamily:"'Nunito', -apple-system, sans-serif",headingFontFamily:"'Nunito', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.375rem",fontWeightNormal:500,fontWeightMedium:600,fontWeightSemibold:700,fontWeightBold:800,lineHeight:1.55,letterSpacing:"0",headingLetterSpacing:"-0.015em"},transitions:{fast:"160ms cubic-bezier(0.4,0,0.2,1.4)",normal:"260ms cubic-bezier(0.4,0,0.2,1.4)",slow:"400ms cubic-bezier(0.4,0,0.2,1.4)"}},displayStyle:"neumorphic",variantConfig:{radius:"2xl",density:"comfortable",animation:"normal"}},_o={meta:{id:"bauhaus",name:"Bauhaus",tagline:"Primary palette, geometric rigour, grid as foundation.",tags:["light","geometric","primary","design"]},theme:{name:"Bauhaus",darkMode:"light",colors:{primary:"#d62828",primaryHover:"#a81e1e",success:"#2a9d8f",warning:"#fcbf49",error:"#d62828",info:"#1d4e89",accent:"#fcbf49",focus:"#1d4e89",surface:"#faf5e8",surfaceHover:"#f2ead3"},backgrounds:{primary:"#faf5e8",secondary:"#f5ecd3",tertiary:"#ede0be",hover:"#e5d5a8",elevated:"#ffffff",inset:"#f0e3c0",canvas:"#faf5e8"},text:{primary:"#1a1a1a",secondary:"#3d3d3d",muted:"#7a7a7a",inverse:"#faf5e8"},borders:{color:"#1a1a1a",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px",width:"3px",divider:"#1a1a1a"},shadows:{sm:"0 2px 0 0 #1a1a1a",md:"4px 4px 0 0 #1a1a1a",lg:"6px 6px 0 0 #1d4e89",xl:"8px 8px 0 0 #d62828"},spacing:oe,typography:{fontFamily:"'Archivo', -apple-system, sans-serif",headingFontFamily:"'Archivo Black', 'Archivo', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.75rem",fontWeightNormal:500,fontWeightMedium:700,fontWeightSemibold:800,fontWeightBold:900,lineHeight:1.4,letterSpacing:"0",headingLetterSpacing:"-0.02em"},transitions:{fast:"60ms linear",normal:"120ms linear",slow:"200ms linear"},backgroundImage:{type:"pattern",pattern:"grid",opacity:.35}},displayStyle:"bauhaus",variantConfig:{radius:"none",shadow:"md",density:"normal",animation:"subtle"}},Wo={meta:{id:"bankVault",name:"Bank Vault",tagline:"Navy, gilt accents, serif gravitas — trusted by institutions.",tags:["light","corporate","serif","conservative"]},theme:{name:"Bank Vault",darkMode:"light",colors:{primary:"#0b2545",primaryHover:"#163969",success:"#2d6a4f",warning:"#b08d2e",error:"#8b1a1a",info:"#1d4e89",accent:"#b08d2e",focus:"#0b2545",surface:"#ffffff",surfaceHover:"#f7f4ec"},backgrounds:{primary:"#fbfaf6",secondary:"#f4f0e4",tertiary:"#ebe5d2",hover:"#e3dcc4",elevated:"#ffffff",inset:"#efeadb",canvas:"#fbfaf6"},text:{primary:"#0b2545",secondary:"#3a4b65",muted:"#7a8399",inverse:"#fbfaf6"},borders:{color:"#c9bfa3",radiusSm:"1px",radiusMd:"2px",radiusLg:"3px",radiusXl:"4px",radiusFull:"9999px",width:"1px",divider:"#d4c9a8"},shadows:{sm:"0 1px 0 0 rgba(11,37,69,0.08)",md:"0 1px 3px rgba(11,37,69,0.08), 0 0 0 1px rgba(176,141,46,0.12)",lg:"0 4px 10px rgba(11,37,69,0.1)",xl:"0 12px 24px rgba(11,37,69,0.12)"},spacing:Kd,typography:{fontFamily:"'DM Sans', -apple-system, sans-serif",headingFontFamily:"'Libre Caslon Text', 'DM Serif Display', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.25rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.55,letterSpacing:"0.005em",headingLetterSpacing:"-0.01em"},transitions:{fast:"90ms cubic-bezier(0.4,0,0.2,1)",normal:"160ms cubic-bezier(0.4,0,0.2,1)",slow:"260ms cubic-bezier(0.4,0,0.2,1)"}},displayStyle:"bank",variantConfig:{radius:"sm",shadow:"subtle",density:"compact",animation:"none"}},Ft={obsidianEditorial:zo,neonArcade:Io,hyggeScandinavian:Po,brutalistRaw:Do,glassAurora:Ho,candyPop:Fo,newspaperBroadsheet:$o,synthwave84:Oo,zenMinimal:jo,claymorphism:Bo,bauhaus:_o,bankVault:Wo},Vo=Object.values(Ft);function Jd(e){return Ft[e]}function Yd(e){return Vo.filter(t=>t.meta.tags.includes(e))}const Qd=["https://fonts.googleapis.com/css2?family=Spectral:wght@300;400;500;600;700&family=Lora:wght@400;500;600;700&display=swap","https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@300;400;500;700&family=Noto+Sans+JP:wght@300;400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Cairo:wght@400;500;600;700&display=swap","https://fonts.googleapis.com/css2?family=Poiret+One&family=Cormorant+Garamond:wght@300;400;500;600&display=swap","https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Roboto+Condensed:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Space+Grotesk:wght@400;500;600;700&display=swap","https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Space+Mono:wght@400;700&display=swap","https://fonts.googleapis.com/css2?family=VT323&display=swap","https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&family=Special+Elite&display=swap","https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&display=swap","https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800;900&display=swap","https://fonts.googleapis.com/css2?family=Bangers&display=swap","https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap","https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Rubik+Mono+One&family=Rubik:wght@400;500;700;800&display=swap"],Xo={space1:"2px",space2:"4px",space3:"8px",space4:"12px",space5:"16px",space6:"20px",space8:"28px"},X={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},Ne={space1:"6px",space2:"12px",space3:"16px",space4:"24px",space5:"32px",space6:"40px",space8:"56px"},Ge={space1:"8px",space2:"16px",space3:"24px",space4:"32px",space5:"44px",space6:"56px",space8:"80px"},Uo={meta:{id:"forestCanopy",name:"Forest Canopy",tagline:"Moss on bark, dappled light — organic radii, earth serif.",tags:["light","nature","serif","organic"]},theme:{name:"Forest Canopy",darkMode:"light",recommendedDisplayStyle:"scandinavian",colors:{primary:"#3d5a40",primaryHover:"#2d4430",success:"#4a7c3a",warning:"#c88d3e",error:"#a63c3c",info:"#5a7c8a",accent:"#8ba878",focus:"#3d5a40",surface:"#f4f1e8",surfaceHover:"#ebe7d5"},backgrounds:{primary:"#f7f4e9",secondary:"#ede8d4",tertiary:"#dfd8be",hover:"#d5cdae",elevated:"#fcfaf1",inset:"#e5ddc5",canvas:"#f0ece0"},text:{primary:"#1e2a1c",secondary:"#3d4a36",muted:"#7a8570",inverse:"#f7f4e9"},borders:{color:"#c4bda0",width:"1px",divider:"#d8d0b5",radiusSm:"3px",radiusMd:"7px",radiusLg:"14px",radiusXl:"22px",radiusFull:"9999px"},shadows:{sm:"0 1px 2px rgba(61,90,64,0.06)",md:"0 4px 12px -2px rgba(61,90,64,0.12), 0 2px 4px rgba(61,90,64,0.05)",lg:"0 10px 24px -6px rgba(61,90,64,0.16)",xl:"0 20px 40px -12px rgba(61,90,64,0.22)"},spacing:Ne,typography:{fontFamily:"'Lora', Georgia, serif",headingFontFamily:"'Spectral', 'Lora', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.625rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.7,letterSpacing:"0",headingLetterSpacing:"-0.01em"},transitions:{fast:"180ms cubic-bezier(0.16,1,0.3,1)",normal:"280ms cubic-bezier(0.16,1,0.3,1)",slow:"420ms cubic-bezier(0.16,1,0.3,1)"},backgroundImage:{type:"pattern",pattern:"dots",opacity:.25}},displayStyle:"scandinavian",variantConfig:{density:"spacious",animation:"normal"}},qo={meta:{id:"desertDune",name:"Desert Dune",tagline:"Ochre horizons, warm grain, serif that suns itself.",tags:["light","nature","serif","warm"]},theme:{name:"Desert Dune",darkMode:"light",recommendedDisplayStyle:"softCloud",colors:{primary:"#c8732f",primaryHover:"#a65a1c",success:"#7a8c3a",warning:"#e0a83a",error:"#b34747",info:"#7a8fa6",accent:"#e8a863",focus:"#c8732f",surface:"#fbf3e5",surfaceHover:"#f4e8d0"},backgrounds:{primary:"#fdf7ea",secondary:"#f6ebd3",tertiary:"#eeddb6",hover:"#e5cfa0",elevated:"#ffffff",inset:"#f0dfb8",canvas:"#fdf5e6"},text:{primary:"#3a2413",secondary:"#6b4823",muted:"#a88860",inverse:"#fdf7ea"},borders:{color:"#dcc08c",width:"1px",divider:"#e8d0a5",radiusSm:"12px",radiusMd:"18px",radiusLg:"28px",radiusXl:"40px",radiusFull:"9999px"},shadows:{sm:"0 2px 6px -2px rgba(200,115,47,0.1)",md:"0 8px 20px -6px rgba(200,115,47,0.15)",lg:"0 18px 36px -10px rgba(200,115,47,0.2)",xl:"0 32px 56px -18px rgba(200,115,47,0.28)"},spacing:Ne,typography:{fontFamily:"'DM Sans', -apple-system, sans-serif",headingFontFamily:"'DM Serif Display', Georgia, serif",monoFontFamily:"'Space Mono', ui-monospace, monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.75rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.65,letterSpacing:"0",headingLetterSpacing:"-0.025em"},transitions:{fast:"160ms ease-out",normal:"280ms cubic-bezier(0.22,1,0.36,1)",slow:"460ms cubic-bezier(0.22,1,0.36,1)"},backgroundImage:{type:"gradient",gradient:"linear-gradient(175deg, #fbecc5 0%, #f6ddaf 40%, #eec28a 100%), radial-gradient(ellipse at 80% 10%, #fff4d9 0%, transparent 60%)"}},displayStyle:"softCloud",variantConfig:{radius:"xl",density:"comfortable",animation:"normal"}},Go={meta:{id:"arcticCrystal",name:"Arctic Crystal",tagline:"Facets of ice, lean typography, surgical whitespace.",tags:["light","nature","minimal","cold"]},theme:{name:"Arctic Crystal",darkMode:"light",recommendedDisplayStyle:"minimal",colors:{primary:"#2a6a8c",primaryHover:"#1e5374",success:"#4a8a6a",warning:"#d0a040",error:"#c24848",info:"#5a9fc0",accent:"#a8d4e8",focus:"#2a6a8c",surface:"#ffffff",surfaceHover:"#f0f6fa"},backgrounds:{primary:"#f5fafd",secondary:"#eaf2f7",tertiary:"#d8e5ed",hover:"#cfdce6",elevated:"#ffffff",inset:"#e3eef5",canvas:"#f0f7fb"},text:{primary:"#0a2030",secondary:"#3a5468",muted:"#7a95a8",inverse:"#ffffff"},borders:{color:"#cfdde8",width:"1px",divider:"#e0ebf3",radiusSm:"2px",radiusMd:"3px",radiusLg:"4px",radiusXl:"6px",radiusFull:"9999px"},shadows:{sm:"1px 1px 0 rgba(42,106,140,0.06), -1px 0 0 rgba(42,106,140,0.04)",md:"2px 2px 0 rgba(42,106,140,0.08), -2px 0 0 rgba(42,106,140,0.04), 0 4px 8px -2px rgba(42,106,140,0.1)",lg:"4px 4px 0 rgba(42,106,140,0.1), 0 10px 16px -4px rgba(42,106,140,0.14)",xl:"0 24px 40px -12px rgba(42,106,140,0.2)"},spacing:Ge,typography:{fontFamily:"'Inter', -apple-system, sans-serif",headingFontFamily:"'Inter', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.375rem",fontWeightNormal:200,fontWeightMedium:300,fontWeightSemibold:500,fontWeightBold:600,lineHeight:1.6,letterSpacing:"0.01em",headingLetterSpacing:"-0.02em"},transitions:{fast:"90ms ease",normal:"160ms ease",slow:"260ms ease"}},displayStyle:"minimal",variantConfig:{radius:"sm",shadow:"subtle",density:"spacious",animation:"subtle"}},Ko={meta:{id:"autumnFoliage",name:"Autumn Foliage",tagline:"Ember glow, Fraunces serif, woodsmoke warmth.",tags:["light","nature","serif","warm"]},theme:{name:"Autumn Foliage",darkMode:"light",recommendedDisplayStyle:"editorial",colors:{primary:"#a83828",primaryHover:"#842818",success:"#6b7c2c",warning:"#c48020",error:"#8a2020",info:"#7a5a3a",accent:"#d89040",focus:"#a83828",surface:"#fbf1e3",surfaceHover:"#f2e4ce"},backgrounds:{primary:"#fdf5e8",secondary:"#f4e5cc",tertiary:"#e8d2aa",hover:"#dec295",elevated:"#fff9ee",inset:"#eedab5",canvas:"#faeed6"},text:{primary:"#2a140a",secondary:"#5a3020",muted:"#997860",inverse:"#fdf5e8"},borders:{color:"#d4b890",width:"1px",divider:"#e0c8a0",radiusSm:"4px",radiusMd:"8px",radiusLg:"14px",radiusXl:"22px",radiusFull:"9999px"},shadows:{sm:"0 1px 2px rgba(168,56,40,0.08)",md:"0 4px 10px -2px rgba(168,56,40,0.12), 0 2px 4px rgba(168,56,40,0.08)",lg:"0 12px 24px -6px rgba(168,56,40,0.18)",xl:"0 24px 48px -16px rgba(168,56,40,0.24)"},spacing:X,typography:{fontFamily:"'Work Sans', sans-serif",headingFontFamily:"'Fraunces', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.625rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.65,letterSpacing:"0.005em",headingLetterSpacing:"-0.02em"},transitions:{fast:"140ms ease",normal:"220ms ease",slow:"360ms ease"}},displayStyle:"editorial",variantConfig:{density:"comfortable",animation:"normal"}},Jo={meta:{id:"japaneseWashi",name:"Japanese Washi",tagline:"Sumi ink on cream — quiet serif, paper grain, zero excess.",tags:["light","cultural","serif","minimal"]},theme:{name:"Japanese Washi",darkMode:"light",recommendedDisplayStyle:"zen",colors:{primary:"#1d3557",primaryHover:"#0d2545",success:"#4a7042",warning:"#a8803e",error:"#8b2a2a",info:"#3a5a78",accent:"#c83a3a",focus:"#1d3557",surface:"#faf6ea",surfaceHover:"#f2ebd7"},backgrounds:{primary:"#fdf9ee",secondary:"#f5ecd5",tertiary:"#ecdfbd",hover:"#e4d5aa",elevated:"#ffffff",inset:"#f0e5c8",canvas:"#fbf6e7"},text:{primary:"#1a1610",secondary:"#3d352a",muted:"#8a7f64",inverse:"#fdf9ee"},borders:{color:"#1a1610",width:"1px",divider:"#d4c89e",radiusSm:"0",radiusMd:"1px",radiusLg:"2px",radiusXl:"3px",radiusFull:"9999px"},shadows:{sm:"none",md:"0 1px 0 0 rgba(26,22,16,0.08)",lg:"0 2px 0 0 rgba(26,22,16,0.1)",xl:"0 4px 12px rgba(26,22,16,0.08)"},spacing:Ge,typography:{fontFamily:"'Noto Sans JP', 'Inter', sans-serif",headingFontFamily:"'Noto Serif JP', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.375rem",fontWeightNormal:300,fontWeightMedium:400,fontWeightSemibold:500,fontWeightBold:700,lineHeight:1.75,letterSpacing:"0.02em",headingLetterSpacing:"0.01em"},transitions:{fast:"120ms ease",normal:"220ms ease",slow:"340ms ease"},backgroundImage:{type:"pattern",pattern:"noise",opacity:.22,blendMode:"multiply"}},displayStyle:"zen",variantConfig:{radius:"none",shadow:"none",density:"spacious",animation:"subtle"}},Yo={meta:{id:"moroccanMosaic",name:"Moroccan Mosaic",tagline:"Zellige geometry — terracotta, teal, saffron in tiled rhythm.",tags:["light","cultural","geometric","warm"]},theme:{name:"Moroccan Mosaic",darkMode:"light",recommendedDisplayStyle:"bauhaus",colors:{primary:"#0f6b5c",primaryHover:"#0a5246",success:"#5a8a3a",warning:"#e0a03a",error:"#c2522a",info:"#3a7090",accent:"#e8a840",focus:"#0f6b5c",surface:"#f9f1dc",surfaceHover:"#f0e5c2"},backgrounds:{primary:"#fbf3e0",secondary:"#f2e4c2",tertiary:"#e6d2a0",hover:"#dac38a",elevated:"#fdf7e8",inset:"#ecd8b2",canvas:"#f8edd3"},text:{primary:"#2a1608",secondary:"#5a3a20",muted:"#a08860",inverse:"#fbf3e0"},borders:{color:"#2a1608",width:"2px",divider:"#b89868",radiusSm:"3px",radiusMd:"6px",radiusLg:"10px",radiusXl:"14px",radiusFull:"9999px"},shadows:{sm:"2px 2px 0 rgba(42,22,8,0.12)",md:"3px 3px 0 #0f6b5c, 6px 6px 0 rgba(42,22,8,0.08)",lg:"4px 4px 0 #0f6b5c, 8px 8px 0 #e8a840",xl:"6px 6px 0 #c2522a, 12px 12px 0 rgba(42,22,8,0.1)"},spacing:X,typography:{fontFamily:"'Cairo', 'Inter', sans-serif",headingFontFamily:"'Amiri', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.625rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.55,letterSpacing:"0",headingLetterSpacing:"-0.01em"},transitions:{fast:"120ms linear",normal:"200ms linear",slow:"320ms linear"},backgroundImage:{type:"pattern",pattern:"hexagons",opacity:.2}},displayStyle:"bauhaus",variantConfig:{radius:"sm",shadow:"md",density:"normal",animation:"subtle"}},Qo={meta:{id:"artDecoGatsby",name:"Art Deco Gatsby",tagline:"Gold, emerald, onyx — geometric glamour, thin gilt lines.",tags:["dark","cultural","luxury","geometric"]},theme:{name:"Art Deco Gatsby",darkMode:"dark",recommendedDisplayStyle:"luxe",colors:{primary:"#d4af37",primaryHover:"#e8c850",success:"#4a9c7a",warning:"#e8c850",error:"#c24040",info:"#70a8c0",accent:"#1e5c4a",focus:"#d4af37",surface:"#0f1a16",surfaceHover:"#16251e"},backgrounds:{primary:"#0a0f0c",secondary:"#0f1a16",tertiary:"#16251e",hover:"#1c3028",elevated:"#0f1a16",inset:"#050908",canvas:"#080c0a"},text:{primary:"#f0e4c2",secondary:"#c0b080",muted:"#706448",inverse:"#0a0f0c"},borders:{color:"#6b5828",width:"1px",divider:"#4a3c18",focusColor:"#d4af37",radiusSm:"0",radiusMd:"1px",radiusLg:"2px",radiusXl:"3px",radiusFull:"9999px"},shadows:{sm:"0 0 0 1px rgba(212,175,55,0.15)",md:"0 2px 8px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,175,55,0.2)",lg:"0 8px 24px rgba(0,0,0,0.6), 0 0 0 1px rgba(212,175,55,0.3), inset 0 1px 0 rgba(212,175,55,0.1)",xl:"0 20px 48px rgba(0,0,0,0.7), 0 0 0 1px rgba(212,175,55,0.4)",glow:"0 0 16px rgba(212,175,55,0.3)"},spacing:Ne,typography:{fontFamily:"'Cormorant Garamond', Georgia, serif",headingFontFamily:"'Poiret One', 'Cormorant Garamond', serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.75rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.6,letterSpacing:"0.04em",headingLetterSpacing:"0.12em"},transitions:{fast:"140ms cubic-bezier(0.4,0,0.2,1)",normal:"240ms cubic-bezier(0.4,0,0.2,1)",slow:"380ms cubic-bezier(0.4,0,0.2,1)"}},displayStyle:"luxe",variantConfig:{radius:"none",shadow:"lg",density:"comfortable",animation:"subtle"}},Zo={meta:{id:"sovietConstructivist",name:"Soviet Constructivist",tagline:"Rodchenko red — slab type, hard angles, propaganda poise.",tags:["light","cultural","brutalist","geometric"]},theme:{name:"Soviet Constructivist",darkMode:"light",recommendedDisplayStyle:"brutalist",colors:{primary:"#c41e1e",primaryHover:"#8a1414",success:"#3a6a3a",warning:"#d08028",error:"#8a1414",info:"#2a4060",accent:"#1a1a1a",focus:"#c41e1e",surface:"#f0ead8",surfaceHover:"#e5dcc0"},backgrounds:{primary:"#f4efde",secondary:"#e8dec4",tertiary:"#d8c9a4",hover:"#ccbb90",elevated:"#faf5e5",inset:"#dccda8",canvas:"#f0ead5"},text:{primary:"#1a1a1a",secondary:"#3d3d3d",muted:"#706d5a",inverse:"#f4efde"},borders:{color:"#1a1a1a",width:"3px",divider:"#1a1a1a",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px"},shadows:{sm:"4px 0 0 0 #c41e1e",md:"6px 6px 0 0 #1a1a1a, 8px 8px 0 0 #c41e1e",lg:"10px 10px 0 0 #c41e1e",xl:"12px -4px 0 0 #1a1a1a, 16px 0 0 0 #c41e1e"},spacing:X,typography:{fontFamily:"'Roboto Condensed', 'Archivo', sans-serif",headingFontFamily:"'Alfa Slab One', 'Archivo Black', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.875rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:700,fontWeightBold:700,lineHeight:1.35,letterSpacing:"0.02em",headingLetterSpacing:"-0.005em"},transitions:{fast:"0ms linear",normal:"80ms linear",slow:"160ms linear"}},displayStyle:"brutalist",variantConfig:{radius:"none",shadow:"lg",density:"normal",animation:"subtle"}},es={meta:{id:"blueprint",name:"Blueprint",tagline:"Cyanotype drafting — white lines, grid paper, technical mono.",tags:["dark","tech","technical","mono"]},theme:{name:"Blueprint",darkMode:"dark",recommendedDisplayStyle:"dashboard",colors:{primary:"#f0f4f8",primaryHover:"#ffffff",success:"#88e0b8",warning:"#ffcc66",error:"#ff8888",info:"#88c8ff",accent:"#6eb0e0",focus:"#ffffff",surface:"#18456a",surfaceHover:"#1f527e"},backgrounds:{primary:"#0e3356",secondary:"#124066",tertiary:"#184d79",hover:"#1e5a8c",elevated:"#18456a",inset:"#082540",canvas:"#0a2d4a"},text:{primary:"#f0f4f8",secondary:"#b5c8da",muted:"#6e8aa4",inverse:"#0e3356"},borders:{color:"#3870a0",width:"1px",divider:"#2a5680",focusColor:"#ffffff",radiusSm:"1px",radiusMd:"2px",radiusLg:"3px",radiusXl:"4px",radiusFull:"9999px"},shadows:{sm:"0 0 0 1px rgba(240,244,248,0.05)",md:"0 1px 0 0 rgba(240,244,248,0.1), 0 4px 8px rgba(0,0,0,0.3)",lg:"0 1px 0 0 rgba(240,244,248,0.14), 0 10px 20px rgba(0,0,0,0.4)",xl:"0 20px 40px rgba(0,0,0,0.5)"},spacing:X,typography:{fontFamily:"'IBM Plex Mono', ui-monospace, monospace",headingFontFamily:"'Space Grotesk', 'IBM Plex Sans', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.25rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5,letterSpacing:"0.02em",headingLetterSpacing:"-0.01em"},transitions:{fast:"80ms linear",normal:"140ms linear",slow:"220ms linear"},backgroundImage:{type:"pattern",pattern:"grid",opacity:.4}},displayStyle:"dashboard",variantConfig:{radius:"sm",shadow:"subtle",density:"compact",animation:"subtle"}},ts={meta:{id:"hologramUI",name:"Hologram UI",tagline:"Iridescent light-leaks, translucent layers, futurist geometry.",tags:["dark","tech","glass","neon"]},theme:{name:"Hologram UI",darkMode:"dark",recommendedDisplayStyle:"cosmic",colors:{primary:"#8be9fd",primaryHover:"#a8f0ff",success:"#50fa7b",warning:"#f1fa8c",error:"#ff5555",info:"#bd93f9",accent:"#ff79c6",focus:"#8be9fd",surface:"rgba(40,30,70,0.5)",surfaceHover:"rgba(50,40,85,0.6)"},backgrounds:{primary:"rgba(30,20,55,0.6)",secondary:"rgba(40,30,70,0.5)",tertiary:"rgba(55,40,90,0.4)",hover:"rgba(65,50,105,0.55)",elevated:"rgba(50,38,82,0.7)",inset:"rgba(25,18,45,0.6)",canvas:"#0a0618"},text:{primary:"#f0e8ff",secondary:"#b0a0e0",muted:"#6a5a94",inverse:"#0a0618"},borders:{color:"rgba(139,233,253,0.25)",width:"1px",divider:"rgba(139,233,253,0.15)",focusColor:"#8be9fd",radiusSm:"4px",radiusMd:"8px",radiusLg:"14px",radiusXl:"20px",radiusFull:"9999px"},shadows:{sm:"0 0 12px rgba(139,233,253,0.2)",md:"0 4px 20px rgba(189,147,249,0.3), 0 0 1px rgba(139,233,253,0.4)",lg:"0 8px 40px rgba(255,121,198,0.35), 0 0 2px rgba(139,233,253,0.5), inset 0 1px 0 rgba(255,255,255,0.08)",xl:"0 20px 60px rgba(139,233,253,0.4), inset 0 1px 0 rgba(255,255,255,0.1)",glow:"0 0 32px rgba(139,233,253,0.6), 0 0 64px rgba(255,121,198,0.3)"},spacing:X,typography:{fontFamily:"'Rajdhani', -apple-system, sans-serif",headingFontFamily:"'Orbitron', 'Rajdhani', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5,letterSpacing:"0.02em",headingLetterSpacing:"0.06em"},transitions:{fast:"160ms cubic-bezier(0.4,0,0.2,1)",normal:"280ms cubic-bezier(0.4,0,0.2,1)",slow:"440ms cubic-bezier(0.4,0,0.2,1)"},backgroundImage:{type:"gradient",gradient:"radial-gradient(at 15% 20%, rgba(139,233,253,0.25) 0%, transparent 50%), radial-gradient(at 85% 25%, rgba(255,121,198,0.25) 0%, transparent 50%), radial-gradient(at 50% 90%, rgba(189,147,249,0.3) 0%, transparent 55%), linear-gradient(135deg, #0a0618 0%, #1a0e38 100%)"}},displayStyle:"cosmic",variantConfig:{shadow:"glow",density:"normal",animation:"normal"}},rs={meta:{id:"deepSea",name:"Deep Sea",tagline:"Midnight blue abyss, bioluminescent accents in the dark.",tags:["dark","tech","organic"]},theme:{name:"Deep Sea",darkMode:"dark",recommendedDisplayStyle:"modern3d",colors:{primary:"#00d9c4",primaryHover:"#2feedc",success:"#5af0b0",warning:"#f0c858",error:"#ff6a82",info:"#60c0ff",accent:"#a878f0",focus:"#00d9c4",surface:"#0a1524",surfaceHover:"#0e1c30"},backgrounds:{primary:"#05101c",secondary:"#0a1524",tertiary:"#0f1f34",hover:"#163044",elevated:"#0e1c30",inset:"#030810",canvas:"#030810"},text:{primary:"#d8f0f5",secondary:"#88b8c8",muted:"#4a7080",inverse:"#030810"},borders:{color:"#183548",width:"1px",divider:"#0f2638",focusColor:"#00d9c4",radiusSm:"8px",radiusMd:"14px",radiusLg:"22px",radiusXl:"32px",radiusFull:"9999px"},shadows:{sm:"0 2px 8px rgba(0,217,196,0.08)",md:"0 6px 20px rgba(0,217,196,0.12), 0 2px 4px rgba(0,0,0,0.5)",lg:"0 14px 40px rgba(0,217,196,0.18), 0 4px 8px rgba(0,0,0,0.6)",xl:"0 28px 64px rgba(0,217,196,0.22), 0 8px 16px rgba(0,0,0,0.7)",glow:"0 0 24px rgba(0,217,196,0.5)"},spacing:X,typography:{fontFamily:"'IBM Plex Sans', -apple-system, sans-serif",headingFontFamily:"'IBM Plex Sans', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.375rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.6,letterSpacing:"0",headingLetterSpacing:"-0.02em"},transitions:{fast:"160ms cubic-bezier(0.22,1,0.36,1)",normal:"280ms cubic-bezier(0.22,1,0.36,1)",slow:"440ms cubic-bezier(0.22,1,0.36,1)"},backgroundImage:{type:"gradient",gradient:"radial-gradient(at 20% 30%, rgba(0,217,196,0.08) 0%, transparent 60%), radial-gradient(at 80% 80%, rgba(168,120,240,0.06) 0%, transparent 55%), linear-gradient(180deg, #030810 0%, #05101c 100%)"}},displayStyle:"modern3d",variantConfig:{radius:"xl",density:"comfortable",animation:"normal"}},as={meta:{id:"analog70s",name:"Analog 70s",tagline:"Mustard, rust, walnut — chunky, warm, turntable energy.",tags:["light","retro","warm","serif"]},theme:{name:"Analog 70s",darkMode:"light",recommendedDisplayStyle:"rounded",colors:{primary:"#c8621e",primaryHover:"#a04d14",success:"#7a8a2a",warning:"#d8a030",error:"#a03030",info:"#6a7a8a",accent:"#d8a830",focus:"#c8621e",surface:"#f5ead2",surfaceHover:"#ecdfc0"},backgrounds:{primary:"#f7ecd6",secondary:"#eeddb8",tertiary:"#e2c998",hover:"#d8bc80",elevated:"#fbf2de",inset:"#e8cfa5",canvas:"#f2e4c8"},text:{primary:"#2a1608",secondary:"#5a2e14",muted:"#a07852",inverse:"#f7ecd6"},borders:{color:"#b89868",width:"2px",divider:"#ccb285",radiusSm:"10px",radiusMd:"16px",radiusLg:"24px",radiusXl:"34px",radiusFull:"9999px"},shadows:{sm:"0 2px 0 0 rgba(42,22,8,0.12)",md:"0 4px 0 0 rgba(42,22,8,0.15), 0 6px 10px rgba(200,98,30,0.12)",lg:"0 6px 0 0 rgba(42,22,8,0.18), 0 10px 20px rgba(200,98,30,0.2)",xl:"0 8px 0 0 rgba(42,22,8,0.22), 0 20px 40px rgba(200,98,30,0.28)"},spacing:X,typography:{fontFamily:"'Work Sans', sans-serif",headingFontFamily:"'Abril Fatface', Georgia, serif",monoFontFamily:"'Space Mono', ui-monospace, monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.9375rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"2rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.55,letterSpacing:"0",headingLetterSpacing:"-0.02em"},transitions:{fast:"180ms cubic-bezier(0.34,1.56,0.64,1)",normal:"280ms cubic-bezier(0.34,1.56,0.64,1)",slow:"440ms cubic-bezier(0.34,1.56,0.64,1)"}},displayStyle:"rounded",variantConfig:{radius:"xl",shadow:"md",density:"comfortable",animation:"playful"}},ns={meta:{id:"vhsTracking",name:"VHS Tracking",tagline:"Chromatic smear, scan-line haze, pixel type from another decade.",tags:["dark","retro","pixel","experimental"]},theme:{name:"VHS Tracking",darkMode:"dark",recommendedDisplayStyle:"retro8bit",colors:{primary:"#ff3eb5",primaryHover:"#ff5fc5",success:"#3eff90",warning:"#ffe83e",error:"#ff3e3e",info:"#3ee0ff",accent:"#3eff90",focus:"#ff3eb5",surface:"#120818",surfaceHover:"#1a0c24"},backgrounds:{primary:"#0a0412",secondary:"#120818",tertiary:"#1a0c24",hover:"#241230",elevated:"#120818",inset:"#050208",canvas:"#0a0412"},text:{primary:"#f8e8ff",secondary:"#c888d8",muted:"#605070",inverse:"#0a0412"},borders:{color:"#4a2864",width:"1px",divider:"#2a1840",focusColor:"#ff3eb5",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"0"},shadows:{sm:"-2px 0 0 rgba(255,62,181,0.5), 2px 0 0 rgba(62,224,255,0.5)",md:"-3px 0 0 rgba(255,62,181,0.6), 3px 0 0 rgba(62,224,255,0.6), 0 4px 12px rgba(0,0,0,0.6)",lg:"-4px 0 0 rgba(255,62,181,0.7), 4px 0 0 rgba(62,224,255,0.7), 0 8px 24px rgba(0,0,0,0.7)",xl:"-6px 0 0 rgba(255,62,181,0.8), 6px 0 0 rgba(62,224,255,0.8)",glow:"0 0 20px rgba(255,62,181,0.6)"},spacing:X,typography:{fontFamily:"'VT323', 'JetBrains Mono', monospace",headingFontFamily:"'VT323', monospace",monoFontFamily:"'VT323', monospace",fontSizeXs:"0.9375rem",fontSizeSm:"1rem",fontSizeMd:"1.125rem",fontSizeLg:"1.375rem",fontSizeXl:"2rem",fontWeightNormal:400,fontWeightMedium:400,fontWeightSemibold:400,fontWeightBold:400,lineHeight:1.35,letterSpacing:"0.01em",headingLetterSpacing:"0.04em"},transitions:{fast:"40ms steps(3)",normal:"100ms steps(5)",slow:"180ms steps(8)"},backgroundImage:{type:"gradient",gradient:"linear-gradient(180deg, #0a0412 0%, #120818 100%), repeating-linear-gradient(0deg, rgba(255,62,181,0.03) 0 2px, transparent 2px 4px)"}},displayStyle:"retro8bit",variantConfig:{radius:"none",shadow:"md",density:"normal",animation:"subtle"}},os={meta:{id:"typewriterPress",name:"Typewriter Press",tagline:"Ribbon red on cream — Courier bones, stamped display.",tags:["light","retro","mono","editorial"]},theme:{name:"Typewriter Press",darkMode:"light",recommendedDisplayStyle:"editorial",colors:{primary:"#b02020",primaryHover:"#8a1818",success:"#4a7038",warning:"#b08018",error:"#8a1818",info:"#3a5068",accent:"#1a1a1a",focus:"#b02020",surface:"#faf3df",surfaceHover:"#f0e7c6"},backgrounds:{primary:"#fbf5e3",secondary:"#f3e9c8",tertiary:"#ebdcab",hover:"#e2cf8f",elevated:"#fffae7",inset:"#efe0b0",canvas:"#fbf5e3"},text:{primary:"#1a1a1a",secondary:"#3d3428",muted:"#7a6f4a",inverse:"#fbf5e3"},borders:{color:"#1a1a1a",width:"1px",divider:"#c8b880",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px"},shadows:{sm:"0 0 0 rgba(26,26,26,0), 1px 1px 0 rgba(26,26,26,0.12)",md:"1px 1px 0 rgba(26,26,26,0.15), 2px 2px 0 rgba(176,32,32,0.1)",lg:"2px 2px 0 rgba(26,26,26,0.2), 4px 4px 0 rgba(176,32,32,0.12)",xl:"3px 3px 0 rgba(26,26,26,0.25)"},spacing:X,typography:{fontFamily:"'Courier Prime', 'Courier New', monospace",headingFontFamily:"'Special Elite', 'Courier Prime', monospace",monoFontFamily:"'Courier Prime', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:400,fontWeightSemibold:700,fontWeightBold:700,lineHeight:1.6,letterSpacing:"0.01em",headingLetterSpacing:"0.04em"},transitions:{fast:"40ms linear",normal:"80ms linear",slow:"140ms linear"},backgroundImage:{type:"pattern",pattern:"noise",opacity:.2,blendMode:"multiply"}},displayStyle:"editorial",variantConfig:{radius:"none",shadow:"subtle",density:"normal",animation:"none"}},ss={meta:{id:"y2kAqua",name:"Y2K Aqua",tagline:"Chrome and aqua — iMac blue, optimistic futurism, 2001 energy.",tags:["light","retro","glass"]},theme:{name:"Y2K Aqua",darkMode:"light",recommendedDisplayStyle:"modern3d",colors:{primary:"#0a84ff",primaryHover:"#0066cc",success:"#34c759",warning:"#ff9500",error:"#ff3b30",info:"#5ac8fa",accent:"#5ac8fa",focus:"#0a84ff",surface:"#f0f5fc",surfaceHover:"#e0ecfa"},backgrounds:{primary:"#e8f2fc",secondary:"#d8e8f8",tertiary:"#c0d8f0",hover:"#a8c8e8",elevated:"#ffffff",inset:"#c8dcf4",canvas:"#dce8f4"},text:{primary:"#0a1a30",secondary:"#304868",muted:"#6a88a8",inverse:"#ffffff"},borders:{color:"#a0c0e0",width:"1px",divider:"#c0d8f0",radiusSm:"6px",radiusMd:"10px",radiusLg:"16px",radiusXl:"24px",radiusFull:"9999px"},shadows:{sm:"inset 0 1px 0 rgba(255,255,255,0.8), 0 1px 2px rgba(10,132,255,0.15)",md:"inset 0 1px 0 rgba(255,255,255,0.9), inset 0 -1px 2px rgba(10,132,255,0.2), 0 2px 6px rgba(10,132,255,0.25), 0 4px 12px rgba(10,132,255,0.15)",lg:"inset 0 1px 0 rgba(255,255,255,0.95), 0 4px 12px rgba(10,132,255,0.3), 0 10px 24px rgba(90,200,250,0.25)",xl:"inset 0 2px 0 rgba(255,255,255,1), 0 8px 24px rgba(10,132,255,0.35), 0 20px 48px rgba(90,200,250,0.3)"},spacing:X,typography:{fontFamily:"'Chakra Petch', -apple-system, sans-serif",headingFontFamily:"'Chakra Petch', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5,letterSpacing:"0.01em",headingLetterSpacing:"-0.005em"},transitions:{fast:"140ms cubic-bezier(0.4,0,0.2,1)",normal:"240ms cubic-bezier(0.4,0,0.2,1)",slow:"380ms cubic-bezier(0.4,0,0.2,1)"},backgroundImage:{type:"gradient",gradient:"linear-gradient(180deg, #f0f7ff 0%, #d8e8f8 60%, #bcd6f0 100%)"}},displayStyle:"modern3d",variantConfig:{radius:"lg",shadow:"lg",density:"normal",animation:"normal"}},is={meta:{id:"vogueDidone",name:"Vogue Didone",tagline:"Didone serif, arctic whitespace, one red heartbeat.",tags:["light","editorial","serif","luxury"]},theme:{name:"Vogue Didone",darkMode:"light",recommendedDisplayStyle:"editorial",colors:{primary:"#000000",primaryHover:"#1a1a1a",success:"#1f6a3a",warning:"#8a6a1a",error:"#c40018",info:"#2a4068",accent:"#c40018",focus:"#c40018",surface:"#ffffff",surfaceHover:"#f7f7f7"},backgrounds:{primary:"#ffffff",secondary:"#fafafa",tertiary:"#f2f2f2",hover:"#ededed",elevated:"#ffffff",inset:"#f5f5f5",canvas:"#ffffff"},text:{primary:"#000000",secondary:"#2a2a2a",muted:"#808080",inverse:"#ffffff"},borders:{color:"#000000",width:"1px",divider:"#dcdcdc",radiusSm:"0",radiusMd:"0",radiusLg:"1px",radiusXl:"2px",radiusFull:"9999px"},shadows:{sm:"none",md:"none",lg:"0 1px 0 0 #000000",xl:"0 2px 0 0 #000000"},spacing:Ge,typography:{fontFamily:"'Inter', -apple-system, sans-serif",headingFontFamily:"'Playfair Display', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"2rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:900,lineHeight:1.7,letterSpacing:"0.02em",headingLetterSpacing:"-0.03em"},transitions:{fast:"120ms ease",normal:"220ms ease",slow:"360ms ease"}},displayStyle:"editorial",variantConfig:{radius:"none",shadow:"none",density:"spacious",animation:"subtle"}},cs={meta:{id:"comicHalftone",name:"Comic Halftone",tagline:"CMYK pop — halftone dots, action type, offset ink shadows.",tags:["light","editorial","playful"]},theme:{name:"Comic Halftone",darkMode:"light",recommendedDisplayStyle:"playful",colors:{primary:"#e8182c",primaryHover:"#c01020",success:"#1ea862",warning:"#f0c820",error:"#e8182c",info:"#1878c8",accent:"#1878c8",focus:"#e8182c",surface:"#fffdf4",surfaceHover:"#fff8d8"},backgrounds:{primary:"#fffef0",secondary:"#fff6b8",tertiary:"#ffe870",hover:"#ffd838",elevated:"#ffffff",inset:"#fff090",canvas:"#fffdec"},text:{primary:"#0a0a0a",secondary:"#2a2a2a",muted:"#707070",inverse:"#fffef0"},borders:{color:"#0a0a0a",width:"3px",divider:"#0a0a0a",radiusSm:"2px",radiusMd:"4px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"},shadows:{sm:"3px 3px 0 0 #0a0a0a",md:"5px 5px 0 0 #0a0a0a",lg:"6px 6px 0 0 #e8182c, 10px 10px 0 0 #0a0a0a",xl:"8px 8px 0 0 #1878c8, 12px 12px 0 0 #0a0a0a"},spacing:X,typography:{fontFamily:"'Archivo', -apple-system, sans-serif",headingFontFamily:"'Bangers', 'Archivo Black', cursive",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.9375rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"2.125rem",fontWeightNormal:500,fontWeightMedium:600,fontWeightSemibold:700,fontWeightBold:800,lineHeight:1.45,letterSpacing:"0",headingLetterSpacing:"0.03em"},transitions:{fast:"100ms cubic-bezier(0.34,1.56,0.64,1)",normal:"200ms cubic-bezier(0.34,1.56,0.64,1)",slow:"320ms cubic-bezier(0.34,1.56,0.64,1)"},backgroundImage:{type:"pattern",pattern:"dots",opacity:.5}},displayStyle:"playful",variantConfig:{radius:"sm",shadow:"lg",density:"normal",animation:"playful"}},ls={meta:{id:"zinePunk",name:"Zine Punk",tagline:"Photocopier grain, marker headlines, cut-and-paste attitude.",tags:["light","editorial","experimental","brutalist"]},theme:{name:"Zine Punk",darkMode:"light",recommendedDisplayStyle:"brutalist",colors:{primary:"#0a0a0a",primaryHover:"#000000",success:"#1a1a1a",warning:"#2a2a2a",error:"#0a0a0a",info:"#1a1a1a",accent:"#0a0a0a",focus:"#0a0a0a",surface:"#f5f3ee",surfaceHover:"#e8e4d8"},backgrounds:{primary:"#efece0",secondary:"#e3dfd0",tertiary:"#d4d0c0",hover:"#c8c4b4",elevated:"#f5f3ee",inset:"#e0dcc8",canvas:"#ede8d8"},text:{primary:"#0a0a0a",secondary:"#1a1a1a",muted:"#505050",inverse:"#efece0"},borders:{color:"#0a0a0a",width:"2px",divider:"#0a0a0a",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px"},shadows:{sm:"2px 3px 0 rgba(10,10,10,0.9)",md:"4px 6px 0 rgba(10,10,10,0.9), -2px 2px 0 rgba(10,10,10,0.3)",lg:"6px 10px 0 rgba(10,10,10,1), -4px 2px 0 rgba(10,10,10,0.4)",xl:"10px 14px 0 rgba(10,10,10,1)"},spacing:X,typography:{fontFamily:"'Special Elite', 'Courier Prime', monospace",headingFontFamily:"'Permanent Marker', 'Special Elite', cursive",monoFontFamily:"'Courier Prime', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.9375rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.875rem",fontWeightNormal:400,fontWeightMedium:400,fontWeightSemibold:400,fontWeightBold:400,lineHeight:1.5,letterSpacing:"0.02em",headingLetterSpacing:"0.01em"},transitions:{fast:"20ms linear",normal:"60ms linear",slow:"120ms linear"},backgroundImage:{type:"pattern",pattern:"noise",opacity:.3,blendMode:"multiply"}},displayStyle:"brutalist",variantConfig:{radius:"none",shadow:"lg",density:"normal",animation:"none"}},ds={meta:{id:"watercolorWash",name:"Watercolor Wash",tagline:"Soft pastel bleeds, handwritten headings, paper gentleness.",tags:["light","artistic","pastel","organic"]},theme:{name:"Watercolor Wash",darkMode:"light",recommendedDisplayStyle:"softCloud",colors:{primary:"#9d7bc4",primaryHover:"#8262ab",success:"#7bb88a",warning:"#e0a868",error:"#d47878",info:"#7ba8c4",accent:"#e0a0c0",focus:"#9d7bc4",surface:"rgba(255,250,245,0.8)",surfaceHover:"rgba(250,240,238,0.9)"},backgrounds:{primary:"#fdf8f4",secondary:"#f8eee6",tertiary:"#f0e0d4",hover:"#e8d2c0",elevated:"#ffffff",inset:"#f4e4d8",canvas:"#fdf8f4"},text:{primary:"#3a2845",secondary:"#6a5868",muted:"#a89ca4",inverse:"#fdf8f4"},borders:{color:"#e8d4c8",width:"1px",divider:"#f0e0d4",radiusSm:"10px",radiusMd:"18px",radiusLg:"30px",radiusXl:"44px",radiusFull:"9999px"},shadows:{sm:"0 2px 10px rgba(157,123,196,0.08)",md:"0 6px 24px rgba(157,123,196,0.12), 0 2px 4px rgba(224,160,192,0.06)",lg:"0 16px 40px rgba(157,123,196,0.18), 0 6px 12px rgba(224,160,192,0.1)",xl:"0 30px 64px rgba(157,123,196,0.22)"},spacing:Ne,typography:{fontFamily:"'Quicksand', -apple-system, sans-serif",headingFontFamily:"'Caveat', 'Quicksand', cursive",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.9375rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"2rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.65,letterSpacing:"0",headingLetterSpacing:"-0.005em"},transitions:{fast:"220ms cubic-bezier(0.22,1,0.36,1)",normal:"380ms cubic-bezier(0.22,1,0.36,1)",slow:"600ms cubic-bezier(0.22,1,0.36,1)"},backgroundImage:{type:"gradient",gradient:"radial-gradient(at 18% 22%, rgba(232,208,220,0.5) 0%, transparent 40%), radial-gradient(at 82% 28%, rgba(200,220,240,0.45) 0%, transparent 45%), radial-gradient(at 35% 80%, rgba(232,228,200,0.4) 0%, transparent 50%), linear-gradient(180deg, #fdf8f4 0%, #f8eee6 100%)"}},displayStyle:"softCloud",variantConfig:{radius:"xl",density:"comfortable",animation:"normal"}},us={meta:{id:"memphis80s",name:"Memphis 80s",tagline:"Squiggle chaos — cyan, pink, yellow, serious typography, no.",tags:["light","artistic","playful"]},theme:{name:"Memphis 80s",darkMode:"light",recommendedDisplayStyle:"playful",colors:{primary:"#f02080",primaryHover:"#c81868",success:"#28c868",warning:"#f8d820",error:"#f02040",info:"#20b8e8",accent:"#f8d820",focus:"#20b8e8",surface:"#fffffa",surfaceHover:"#fff7d0"},backgrounds:{primary:"#fffceb",secondary:"#fff2d0",tertiary:"#ffe8b4",hover:"#ffdd98",elevated:"#ffffff",inset:"#fff0c0",canvas:"#fffbe0"},text:{primary:"#0a0a1a",secondary:"#2a2a3a",muted:"#6a6a7a",inverse:"#fffceb"},borders:{color:"#0a0a1a",width:"2px",divider:"#0a0a1a",radiusSm:"4px",radiusMd:"6px",radiusLg:"10px",radiusXl:"14px",radiusFull:"9999px"},shadows:{sm:"3px 3px 0 0 #20b8e8",md:"4px 4px 0 0 #f02080, 8px 8px 0 0 #f8d820",lg:"5px 5px 0 0 #28c868, 10px 10px 0 0 #20b8e8, 15px 15px 0 0 #f02080",xl:"6px 6px 0 0 #f8d820, 12px 12px 0 0 #f02080, 18px 18px 0 0 #20b8e8"},spacing:X,typography:{fontFamily:"'Rubik', -apple-system, sans-serif",headingFontFamily:"'Rubik Mono One', 'Rubik', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.9375rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.875rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:700,fontWeightBold:800,lineHeight:1.4,letterSpacing:"0",headingLetterSpacing:"-0.01em"},transitions:{fast:"120ms cubic-bezier(0.68,-0.55,0.27,1.55)",normal:"220ms cubic-bezier(0.68,-0.55,0.27,1.55)",slow:"360ms cubic-bezier(0.68,-0.55,0.27,1.55)"},backgroundImage:{type:"pattern",pattern:"zigzag",opacity:.3}},displayStyle:"playful",variantConfig:{radius:"sm",shadow:"lg",density:"normal",animation:"playful"}},fs={meta:{id:"inkSumie",name:"Ink Sumi-e",tagline:"Charcoal brush on rice paper — vast silence, one red seal.",tags:["light","artistic","serif","minimal"]},theme:{name:"Ink Sumi-e",darkMode:"light",recommendedDisplayStyle:"zen",colors:{primary:"#1a1a1a",primaryHover:"#000000",success:"#2a4a2a",warning:"#705820",error:"#b82020",info:"#2a4060",accent:"#b82020",focus:"#1a1a1a",surface:"#ffffff",surfaceHover:"#f8f7f3"},backgrounds:{primary:"#fdfcf7",secondary:"#f5f3eb",tertiary:"#ebe8dc",hover:"#dfdbcc",elevated:"#ffffff",inset:"#f0edde",canvas:"#fdfcf7"},text:{primary:"#1a1a1a",secondary:"#3a3a3a",muted:"#888482",inverse:"#fdfcf7"},borders:{color:"#1a1a1a",width:"1px",divider:"#d8d4c4",radiusSm:"0",radiusMd:"0",radiusLg:"1px",radiusXl:"2px",radiusFull:"9999px"},shadows:{sm:"none",md:"none",lg:"none",xl:"0 0 0 1px #1a1a1a"},spacing:Ge,typography:{fontFamily:"'Noto Sans JP', -apple-system, sans-serif",headingFontFamily:"'Noto Serif JP', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.625rem",fontWeightNormal:300,fontWeightMedium:400,fontWeightSemibold:500,fontWeightBold:700,lineHeight:1.85,letterSpacing:"0.04em",headingLetterSpacing:"0"},transitions:{fast:"200ms ease",normal:"340ms ease",slow:"520ms ease"}},displayStyle:"zen",variantConfig:{radius:"none",shadow:"none",density:"spacious",animation:"subtle"}},ms={meta:{id:"dieterRams",name:"Dieter Rams",tagline:"Less-but-better — warm gray, single yellow dot, measured everything.",tags:["light","minimal","industrial"]},theme:{name:"Dieter Rams",darkMode:"light",recommendedDisplayStyle:"swiss",colors:{primary:"#1a1a1a",primaryHover:"#0a0a0a",success:"#3a7840",warning:"#e8c020",error:"#c83028",info:"#3868a0",accent:"#e8c020",focus:"#1a1a1a",surface:"#ffffff",surfaceHover:"#f8f8f8"},backgrounds:{primary:"#fbfbf9",secondary:"#f2f2ee",tertiary:"#e8e8e2",hover:"#dedeD6",elevated:"#ffffff",inset:"#ededE7",canvas:"#f5f5f1"},text:{primary:"#0a0a0a",secondary:"#3a3a38",muted:"#888880",inverse:"#fbfbf9"},borders:{color:"#d4d4ce",width:"1px",divider:"#e0e0da",radiusSm:"1px",radiusMd:"2px",radiusLg:"3px",radiusXl:"4px",radiusFull:"9999px"},shadows:{sm:"0 1px 0 0 rgba(0,0,0,0.04)",md:"0 1px 0 0 rgba(0,0,0,0.06), 0 4px 8px -2px rgba(0,0,0,0.06)",lg:"0 2px 0 0 rgba(0,0,0,0.08), 0 10px 20px -6px rgba(0,0,0,0.1)",xl:"0 20px 40px -12px rgba(0,0,0,0.14)"},spacing:Xo,typography:{fontFamily:"'IBM Plex Sans', -apple-system, sans-serif",headingFontFamily:"'IBM Plex Sans', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.375rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.55,letterSpacing:"0",headingLetterSpacing:"-0.015em"},transitions:{fast:"100ms cubic-bezier(0.4,0,0.2,1)",normal:"180ms cubic-bezier(0.4,0,0.2,1)",slow:"280ms cubic-bezier(0.4,0,0.2,1)"}},displayStyle:"swiss",variantConfig:{radius:"sm",shadow:"subtle",density:"compact",animation:"subtle"}},ps={meta:{id:"blackTieGala",name:"Black Tie Gala",tagline:"Absolute black, hand-gilded detail, whispered serif elegance.",tags:["dark","luxury","serif"]},theme:{name:"Black Tie Gala",darkMode:"dark",recommendedDisplayStyle:"luxe",colors:{primary:"#c89848",primaryHover:"#e0b868",success:"#68a878",warning:"#e0b050",error:"#c85858",info:"#8aa8d0",accent:"#e8d0a0",focus:"#c89848",surface:"#0e0e0e",surfaceHover:"#161616"},backgrounds:{primary:"#050505",secondary:"#0e0e0e",tertiary:"#161616",hover:"#1e1e1e",elevated:"#0e0e0e",inset:"#020202",canvas:"#030303"},text:{primary:"#f0ead8",secondary:"#a89870",muted:"#605848",inverse:"#050505"},borders:{color:"#3a2e18",width:"1px",divider:"#241a0c",focusColor:"#c89848",radiusSm:"1px",radiusMd:"2px",radiusLg:"3px",radiusXl:"4px",radiusFull:"9999px"},shadows:{sm:"0 0 0 1px rgba(200,152,72,0.1)",md:"0 4px 16px rgba(0,0,0,0.8), 0 0 0 1px rgba(200,152,72,0.15)",lg:"0 10px 32px rgba(0,0,0,0.9), 0 0 0 1px rgba(200,152,72,0.25), inset 0 1px 0 rgba(232,208,160,0.08)",xl:"0 24px 56px rgba(0,0,0,1), 0 0 0 1px rgba(200,152,72,0.35)",glow:"0 0 24px rgba(200,152,72,0.25)"},spacing:Ne,typography:{fontFamily:"'Cormorant Garamond', Georgia, serif",headingFontFamily:"'Cormorant Garamond', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.75rem",fontWeightNormal:300,fontWeightMedium:400,fontWeightSemibold:500,fontWeightBold:600,lineHeight:1.65,letterSpacing:"0.05em",headingLetterSpacing:"0.08em"},transitions:{fast:"180ms cubic-bezier(0.4,0,0.2,1)",normal:"320ms cubic-bezier(0.4,0,0.2,1)",slow:"500ms cubic-bezier(0.4,0,0.2,1)"}},displayStyle:"luxe",variantConfig:{radius:"sm",shadow:"lg",density:"spacious",animation:"subtle"}},gs={meta:{id:"swissGrid",name:"Swiss Grid",tagline:"Akzidenz rigor — white, black, one red, grid discipline.",tags:["light","minimal","editorial"]},theme:{name:"Swiss Grid",darkMode:"light",recommendedDisplayStyle:"swiss",colors:{primary:"#e30613",primaryHover:"#b8040f",success:"#00683d",warning:"#b8700a",error:"#e30613",info:"#004c98",accent:"#e30613",focus:"#e30613",surface:"#ffffff",surfaceHover:"#f5f5f5"},backgrounds:{primary:"#ffffff",secondary:"#f5f5f5",tertiary:"#ebebeb",hover:"#e0e0e0",elevated:"#ffffff",inset:"#f0f0f0",canvas:"#ffffff"},text:{primary:"#0a0a0a",secondary:"#2a2a2a",muted:"#707070",inverse:"#ffffff"},borders:{color:"#0a0a0a",width:"1px",divider:"#d0d0d0",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px"},shadows:{sm:"none",md:"0 1px 0 0 rgba(10,10,10,0.1)",lg:"0 2px 0 0 rgba(10,10,10,0.12)",xl:"0 4px 0 0 rgba(10,10,10,0.15)"},spacing:Xo,typography:{fontFamily:"'Inter', 'Helvetica Neue', sans-serif",headingFontFamily:"'Inter', 'Helvetica Neue', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:700,fontWeightBold:700,lineHeight:1.45,letterSpacing:"0",headingLetterSpacing:"-0.03em"},transitions:{fast:"60ms linear",normal:"120ms linear",slow:"200ms linear"}},displayStyle:"swiss",variantConfig:{radius:"none",shadow:"none",density:"compact",animation:"subtle"}},$t={forestCanopy:Uo,desertDune:qo,arcticCrystal:Go,autumnFoliage:Ko,japaneseWashi:Jo,moroccanMosaic:Yo,artDecoGatsby:Qo,sovietConstructivist:Zo,blueprint:es,hologramUI:ts,deepSea:rs,analog70s:as,vhsTracking:ns,typewriterPress:os,y2kAqua:ss,vogueDidone:is,comicHalftone:cs,zinePunk:ls,watercolorWash:ds,memphis80s:us,inkSumie:fs,dieterRams:ms,blackTieGala:ps,swissGrid:gs},hs=Object.values($t);function Zd(e){return $t[e]}function eu(e){return hs.filter(t=>t.meta.tags.includes(e))}const ys=c.createContext(null);function bs(){const e=c.useContext(ys);if(!e)throw new Error("useThemeVariants must be used within NiceThemeVariantProvider");return e}function tu({initialConfig:e,storageKey:t="ntd-variant-config",autoApply:r=!0,children:a}){const[n,o]=c.useState(()=>{if(typeof window<"u"&&t){const d=localStorage.getItem(t);if(d)try{return{...J,...JSON.parse(d)}}catch{}}return{...J,...e}});c.useEffect(()=>{r&&typeof window<"u"&&gt(n)},[n,r]),c.useEffect(()=>{typeof window<"u"&&t&&localStorage.setItem(t,JSON.stringify(n))},[n,t]);const i=c.useCallback(d=>{o(u=>({...u,...d}))},[]),s=c.useCallback(d=>{const u=$e[d];u&&o(u)},[]),l=c.useCallback(()=>{o(J)},[]);return S.jsx(ys.Provider,{value:{config:n,setConfig:i,applyPreset:s,reset:l},children:a})}function ru({showPresets:e=!0,showPreview:t=!0,showCSS:r=!1,collapsible:a=!0,className:n,style:o}){const{t:i}=_.useNiceTranslation(),{config:s,setConfig:l,applyPreset:d,reset:u}=bs(),[f,h]=c.useState(new Set(["presets","radius","shadow"])),y=p=>{a&&h(g=>{const v=new Set(g);return v.has(p)?v.delete(p):v.add(p),v})},m=p=>!a||f.has(p);return S.jsxs("div",{className:`ntd-theme-variant-configurator ${n||""}`,style:{fontFamily:"system-ui, sans-serif",fontSize:"14px",...o},children:[e&&S.jsx(q,{title:i("themeVariants.presets","Presets"),expanded:m("presets"),onToggle:()=>y("presets"),children:S.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px"},children:[Object.keys($e).map(p=>S.jsx("button",{onClick:()=>d(p),style:{padding:"6px 12px",border:"1px solid var(--nice-border-color, #e5e7eb)",borderRadius:"6px",background:"var(--nice-bg-secondary, #f9fafb)",cursor:"pointer",textTransform:"capitalize"},children:p},p)),S.jsx("button",{onClick:u,style:{padding:"6px 12px",border:"1px solid var(--nice-danger-dark, #dc2626)",borderRadius:"6px",background:"var(--nice-danger-bg, #fef2f2)",color:"var(--nice-color-error, #dc2626)",cursor:"pointer"},children:i("themeVariants.reset","Reset")})]})}),S.jsx(q,{title:i("themeVariants.borderRadius","Border Radius"),expanded:m("radius"),onToggle:()=>y("radius"),children:S.jsx(ce,{options:Object.keys(be),value:s.radius,onChange:p=>l({radius:p}),renderPreview:p=>S.jsx("div",{style:{width:"24px",height:"24px",background:"var(--nice-color-accent, #6366f1)",borderRadius:be[p].md}})})}),S.jsx(q,{title:i("themeVariants.shadows","Shadows"),expanded:m("shadow"),onToggle:()=>y("shadow"),children:S.jsx(ce,{options:Object.keys(ze),value:s.shadow,onChange:p=>l({shadow:p}),renderPreview:p=>S.jsx("div",{style:{width:"24px",height:"24px",background:"var(--nice-bg-primary, #fff)",borderRadius:"4px",boxShadow:ze[p]}})})}),S.jsx(q,{title:i("themeVariants.buttonStyle","Button Style"),expanded:m("button"),onToggle:()=>y("button"),children:S.jsx(ce,{options:["flat","raised","outlined","ghost","soft","gradient","3d","neumorphic"],value:s.buttonStyle,onChange:p=>l({buttonStyle:p})})}),S.jsx(q,{title:i("themeVariants.inputStyle","Input Style"),expanded:m("input"),onToggle:()=>y("input"),children:S.jsx(ce,{options:["bordered","filled","underlined","floating","soft","neumorphic"],value:s.inputStyle,onChange:p=>l({inputStyle:p})})}),S.jsx(q,{title:i("themeVariants.cardStyle","Card Style"),expanded:m("card"),onToggle:()=>y("card"),children:S.jsx(ce,{options:["flat","elevated","bordered","glass","gradient","neumorphic"],value:s.cardStyle,onChange:p=>l({cardStyle:p})})}),S.jsx(q,{title:i("themeVariants.animation","Animation"),expanded:m("animation"),onToggle:()=>y("animation"),children:S.jsx(ce,{options:Object.keys(Fe),value:s.animation,onChange:p=>l({animation:p})})}),S.jsx(q,{title:i("themeVariants.density","Density"),expanded:m("density"),onToggle:()=>y("density"),children:S.jsx(ce,{options:Object.keys(Se),value:s.density,onChange:p=>l({density:p})})}),t&&S.jsx(q,{title:i("themeVariants.preview","Preview"),expanded:m("preview"),onToggle:()=>y("preview"),children:S.jsx(au,{config:s})}),r&&S.jsx(q,{title:i("themeVariants.generatedCss","Generated CSS"),expanded:m("css"),onToggle:()=>y("css"),children:S.jsx("pre",{style:{background:"var(--nice-text-primary, #1f2937)",color:"var(--nice-text-inverse, #e5e7eb)",padding:"12px",borderRadius:"6px",fontSize:"12px",overflow:"auto",maxHeight:"200px"},children:pt(s)})})]})}function q({title:e,expanded:t,onToggle:r,children:a}){return S.jsxs("div",{style:{marginBottom:"16px"},children:[S.jsxs("button",{onClick:r,style:{display:"flex",alignItems:"center",gap:"8px",width:"100%",padding:"8px 0",border:"none",background:"transparent",cursor:"pointer",fontSize:"14px",fontWeight:600,color:"var(--nice-text-secondary, #374151)",textAlign:"left"},children:[S.jsx("span",{style:{display:"inline-flex",transform:t?"rotate(90deg)":"none",transition:"transform 150ms"},children:S.jsx(K,{name:"chevron-right",size:14})}),e]}),t&&S.jsx("div",{style:{paddingLeft:"20px",paddingTop:"8px"},children:a})]})}function ce({options:e,value:t,onChange:r,renderPreview:a}){return S.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px"},children:e.map(n=>S.jsxs("button",{onClick:()=>r(n),style:{display:"flex",alignItems:"center",gap:"6px",padding:"6px 12px",border:t===n?"2px solid var(--nice-info, #6366f1)":"1px solid var(--nice-border-color, #e5e7eb)",borderRadius:"6px",background:t===n?"var(--nice-primary-bg, #eef2ff)":"var(--nice-bg-primary, #fff)",cursor:"pointer",textTransform:"capitalize",fontSize:"13px"},children:[a&&a(n),n]},n))})}function au({config:e}){const{t}=_.useNiceTranslation(),r=ut(e.buttonStyle,"var(--nice-color-accent, #6366f1)"),a=ft(e.inputStyle),n=mt(e.cardStyle),o=be[e.radius],i=Se[e.density];return S.jsxs("div",{style:{padding:"20px",background:"var(--nice-bg-secondary, #f9fafb)",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"16px"},children:[S.jsxs("div",{style:{padding:i.paddingX,borderRadius:o.lg,...n},children:[S.jsx("h4",{style:{margin:"0 0 12px",fontSize:i.fontSize},children:t("themeVariants.cardPreview","Card Preview")}),S.jsxs("div",{style:{display:"flex",gap:i.gap,marginBottom:"12px"},children:[S.jsx("button",{style:{padding:`${i.paddingY} ${i.paddingX}`,borderRadius:o.md,color:"var(--nice-text-primary, #fff)",fontSize:i.fontSize,cursor:"pointer",...r},children:t("themeVariants.primary","Primary")}),S.jsx("button",{style:{padding:`${i.paddingY} ${i.paddingX}`,borderRadius:o.md,background:"var(--nice-border-color, #e5e7eb)",border:"none",fontSize:i.fontSize,cursor:"pointer"},children:t("themeVariants.secondary","Secondary")})]}),S.jsx("input",{type:"text",placeholder:t("themeVariants.inputPreview","Input preview..."),style:{width:"100%",height:i.inputHeight,padding:`0 ${i.paddingX}`,fontSize:i.fontSize,outline:"none",boxSizing:"border-box",...a}})]}),S.jsx("div",{style:{display:"flex",gap:"8px",flexWrap:"wrap"},children:["Info","Success","Warning","Error"].map(s=>S.jsx("span",{style:{padding:"4px 10px",borderRadius:o.full,background:"var(--nice-border-color, #e5e7eb)",fontSize:"12px"},children:s},s))})]})}function nu(e){const[t,r]=c.useState(()=>typeof window>"u"?!1:er());return c.useEffect(()=>{var d,u,f;if(typeof window>"u")return;const a=()=>(e==null?void 0:e.current)??document.documentElement,n=()=>r(er(a()));n();const o=new MutationObserver(n),i={attributes:!0,attributeFilter:["data-theme","class","style"]};o.observe(document.documentElement,i);const s=(u=(d=e==null?void 0:e.current)==null?void 0:d.closest)==null?void 0:u.call(d,"[data-theme], .nice-dark, .nice-light, .dark");s&&s!==document.documentElement&&o.observe(s,i);const l=window.matchMedia("(prefers-color-scheme: dark)");return(f=l.addEventListener)==null||f.call(l,"change",n),()=>{var h;o.disconnect(),(h=l.removeEventListener)==null||h.call(l,"change",n)}},[e]),t}function er(e=document.documentElement){var t,r;try{const a=((t=e.closest)==null?void 0:t.call(e,"[data-theme], .nice-dark, .nice-light, .dark"))??document.documentElement,n=a.getAttribute("data-theme");if(n==="dark")return!0;if(n==="light")return!1;if(a.classList.contains("nice-dark")||a.classList.contains("dark"))return!0;if(a.classList.contains("nice-light"))return!1;const o=getComputedStyle(e),i=o.getPropertyValue("--text-primary").trim()||o.color;if(i){const s=i.match(/rgba?\(([^)]+)\)/);if(s){const[l,d,u]=s[1].split(",").map(f=>parseFloat(f.trim()));return(.299*l+.587*d+.114*u)/255>.5}if(/^#([0-9a-f]{3,8})$/i.test(i)){const l=i.replace("#",""),d=l.length===3?l.split("").map(y=>y+y).join(""):l.slice(0,6),u=parseInt(d.slice(0,2),16),f=parseInt(d.slice(2,4),16),h=parseInt(d.slice(4,6),16);return(.299*u+.587*f+.114*h)/255>.5}}return((r=window.matchMedia)==null?void 0:r.call(window,"(prefers-color-scheme: dark)").matches)??!1}catch{return!1}}const ou=["NiceTextInput","NiceTextArea","NiceNumberInput","NiceDateTimePicker","NiceSelect","NiceCheckbox","NiceToggle","NiceRadioGroup","NiceSlider","NiceColorPicker","NiceAutocomplete","NiceLookup","NiceCalendar","NiceDateRangeBox","NiceTagBox","NiceRangeSlider","NiceDropDownBox","NiceHtmlEditor","NiceForm","NiceRating","NiceOtpInput","NiceMentionInput","NiceTreeSelect","NiceMaskedInput","NiceKnob","NicePickList","NiceInlineEdit","NiceButton","NiceButtonGroup","NiceDropDownButton","NiceSpeedDialAction","NiceTable","NiceDataGrid","NiceList","NiceTreeView","NiceTreeList","NiceTileView","NicePivotGrid","NiceKanbanBoard","NiceSpreadsheet","NiceBadge","NiceTag","NiceAvatar","NiceAvatarGroup","NiceProgress","NiceDivider","NiceTooltip","NiceSkeleton","NiceSpinner","NiceEmpty","NiceTimeline","NiceCarousel","NiceVirtualScroller","NiceAlert","NiceModal","NiceDrawer","NiceToastContainer","NiceConfirmDialog","NiceCookieConsent","NiceTabs","NiceAccordion","NiceBreadcrumb","NicePagination","NiceCard","NiceMenu","NiceContextMenu","NiceSplitter","NiceAppLayout","NiceDashboardLayout","NiceDesktop","NiceConsole","NiceChart","NicePieChart","NicePolarChart","NiceCircularGauge","NiceLinearGauge","NiceBarGauge","NiceSparkline","NiceBullet","NiceFunnel","NiceSankey","NiceRangeSelector","NiceVectorMap","NiceHeatMap","NiceTreeMap","NiceStockChart","NiceOrganizationChart","NiceActionSheet","NicePopover","NiceLoadPanel","NiceWindow","NiceBlockUI","NiceScheduler","NiceGantt","NiceDiagram","NiceStepper","NiceBox","NiceResponsiveBox","NiceResizable","NiceScrollView","NiceChat","NiceUpload","NiceFileManager","NiceFilterBuilder","NiceGallery","NiceMap","div","span","row","column","stack","container"];function su(e){const t=[];vs(e.root,t,"root");const r=new Set((e.dataSources??[]).map(a=>a.id));return Ss(e.root,r,t),t}function vs(e,t,r){if((!e.type||e.type.trim()==="")&&t.push(`${r}: type is empty`),e.children)for(let a=0;a<e.children.length;a++)vs(e.children[a],t,`${r}.children[${a}]`)}function Ss(e,t,r){if(e.bindings)for(const[a,n]of Object.entries(e.bindings)){const o=n.split(".")[0];!t.has(o)&&o!=="form"&&o!=="route"&&r.push(`Binding "${a}" references unknown data source "${o}"`)}if(e.children)for(const a of e.children)Ss(a,t,r)}function iu(e,t){const r=cu(t,e.field);switch(e.operator){case"eq":return r===e.value;case"neq":return r!==e.value;case"gt":return r>e.value;case"gte":return r>=e.value;case"lt":return r<e.value;case"lte":return r<=e.value;case"contains":return String(r).includes(String(e.value));case"empty":return r==null||String(r)==="";case"notEmpty":return r!=null&&String(r)!=="";default:return!0}}function cu(e,t){const r=t.split(".");let a=e;for(const n of r)if(a&&typeof a=="object"&&n in a)a=a[n];else return;return a}function xs(e){const{itemCount:t,itemHeight:r,containerHeight:a,overscan:n=3,initialScrollTop:o=0}=e,[i,s]=c.useState(o),[l,d]=c.useState(!1),u=c.useRef(void 0),f=c.useMemo(()=>{if(typeof r=="number")return null;const k=new Array(t+1);k[0]=0;for(let C=0;C<t;C++)k[C+1]=k[C]+r(C);return k},[t,r]),h=c.useMemo(()=>typeof r=="number"?t*r:f?f[t]:0,[t,r,f]),y=c.useCallback(k=>typeof r=="number"?r:r(k),[r]),m=c.useCallback(k=>typeof r=="number"?k*r:f?f[k]:0,[r,f]),p=c.useCallback(k=>{if(typeof r=="number")return Math.floor(k/r);if(!f)return 0;let C=0,M=t-1;for(;C<=M;){const E=Math.floor((C+M)/2),L=f[E];if(L===k)return E;L<k?C=E+1:M=E-1}return Math.max(0,C-1)},[t,r,f]),{startIndex:g,endIndex:v,visibleItems:b}=c.useMemo(()=>{const k=Math.max(0,p(i)-n);let C=k,M=m(k);for(;C<t&&M<i+a;)M+=y(C),C++;C=Math.min(t,C+n);const E=[];for(let L=k;L<C;L++)E.push({index:L,offset:m(L),height:y(L),key:L});return{startIndex:k,endIndex:C,visibleItems:E}},[i,a,t,n,p,m,y]),x=c.useCallback(k=>{const C=k.currentTarget;s(C.scrollTop),d(!0),u.current&&window.clearTimeout(u.current),u.current=window.setTimeout(()=>{d(!1)},150)},[]),w=c.useCallback((k,C="start")=>{const M=m(k),E=y(k);let L;switch(C){case"center":L=M-a/2+E/2;break;case"end":L=M-a+E;break;default:L=M}s(Math.max(0,Math.min(L,h-a)))},[m,y,a,h]),A=c.useCallback(k=>{s(Math.max(0,Math.min(k,h-a)))},[h,a]);return c.useEffect(()=>()=>{u.current&&window.clearTimeout(u.current)},[]),{visibleItems:b,totalHeight:h,scrollTop:i,scrollToIndex:w,scrollTo:A,onScroll:x,startIndex:g,endIndex:v,isScrolling:l}}function lu(e){const{rowCount:t,columnCount:r,rowHeight:a,columnWidth:n,containerHeight:o,containerWidth:i,overscan:s=2}=e,[l,d]=c.useState(0),[u,f]=c.useState(0),[h,y]=c.useState(!1),m=c.useRef(void 0),p=c.useMemo(()=>{if(typeof a=="number")return t*a;let x=0;for(let w=0;w<t;w++)x+=a(w);return x},[t,a]),g=c.useMemo(()=>{if(typeof n=="number")return r*n;let x=0;for(let w=0;w<r;w++)x+=n(w);return x},[r,n]),v=c.useMemo(()=>{const x=[];let w=0,A=0;if(typeof a=="number")w=Math.floor(l/a),A=w*a;else for(;w<t&&A+a(w)<l;)A+=a(w),w++;w=Math.max(0,w-s);let k=w,C=typeof a=="number"?w*a:A;for(;k<t&&C<l+o;)C+=typeof a=="number"?a:a(k),k++;k=Math.min(t,k+s);let M=0,E=0;if(typeof n=="number")M=Math.floor(u/n),E=M*n;else for(;M<r&&E+n(M)<u;)E+=n(M),M++;M=Math.max(0,M-s);let L=M,T=typeof n=="number"?M*n:E;for(;L<r&&T<u+i;)T+=typeof n=="number"?n:n(L),L++;L=Math.min(r,L+s);let N=typeof a=="number"?w*a:(()=>{let R=0;for(let I=0;I<w;I++)R+=a(I);return R})();for(let R=w;R<k;R++){const I=typeof a=="number"?a:a(R);let D=typeof n=="number"?M*n:(()=>{let P=0;for(let F=0;F<M;F++)P+=n(F);return P})();for(let P=M;P<L;P++){const F=typeof n=="number"?n:n(P);x.push({rowIndex:R,columnIndex:P,top:N,left:D,width:F,height:I,key:`${R}:${P}`}),D+=F}N+=I}return x},[l,u,t,r,a,n,o,i,s]),b=c.useCallback(x=>{const w=x.currentTarget;d(w.scrollTop),f(w.scrollLeft),y(!0),m.current&&window.clearTimeout(m.current),m.current=window.setTimeout(()=>{y(!1)},150)},[]);return c.useEffect(()=>()=>{m.current&&window.clearTimeout(m.current)},[]),{visibleCells:v,totalWidth:g,totalHeight:p,onScroll:b,scrollTop:l,scrollLeft:u,isScrolling:h}}function du(e,t,r,a=3){const n=xs({itemCount:e.length,itemHeight:r,containerHeight:t,overscan:a}),o=c.useCallback(i=>e[i.index],[e]);return{...n,getItemData:o,containerStyle:{height:t,overflow:"auto"},innerStyle:{height:n.totalHeight,position:"relative"},getItemStyle:i=>({position:"absolute",top:i.offset,left:0,right:0,height:i.height})}}function uu(e){const{items:t,searchFn:r,debounce:a=0,minLength:n=0}=e,[o,i]=c.useState(""),s=c.useDeferredValue(o),[l,d]=c.useState(""),u=c.useRef(void 0);c.useEffect(()=>{if(a>0)return u.current=window.setTimeout(()=>{d(o)},a),()=>{u.current&&window.clearTimeout(u.current)};d(o)},[o,a]);const f=c.useDeferredValue(l),h=c.useMemo(()=>f.length<n?t:t.filter(m=>r(m,f)),[t,f,r,n]);return{query:o,setQuery:i,results:h,isStale:f!==s,deferredQuery:f}}function fu(e){const[t,r]=c.useState(e),[a,n]=c.useState(e),[o,i]=c.useTransition(),s=c.useCallback(d=>{const u=typeof d=="function"?d(t):d;n(u),i(()=>{r(u)})},[t]),l=c.useCallback(d=>{const u=typeof d=="function"?d(t):d;n(u),r(u)},[t]);return{value:t,pendingValue:a,isPending:o,setValue:s,setValueImmediate:l}}function mu(e){const{data:t,processFn:r,chunkSize:a=1e3,priority:n="user-visible"}=e,[o,i]=c.useState(null),[s,l]=c.useState(0),[d,u]=c.useState(!1),f=c.useRef(!1),h=c.useCallback(async()=>{if(t.length===0){i([]);return}u(!0),l(0),f.current=!1;const m=[],p=t.length;for(let g=0;g<p&&!f.current;g+=a){const v=t.slice(g,g+a),b=v.map((w,A)=>r(w,g+A));m.push(...b);const x=Math.min(100,(g+v.length)/p*100);n==="background"?await new Promise(w=>{"requestIdleCallback"in window?window.requestIdleCallback(w):setTimeout(w,0)}):n==="user-visible"&&await new Promise(w=>requestAnimationFrame(w)),c.startTransition(()=>{l(x)})}i(m),u(!1),l(100)},[t,r,a,n]),y=c.useCallback(()=>{f.current=!0},[]);return c.useEffect(()=>(h(),()=>{f.current=!0}),[h]),{result:o,progress:s,isProcessing:d,process:h,cancel:y}}function pu(e,t={}){const{initialCount:r=20,batchSize:a=50,batchDelay:n=16}=t,[o,i]=c.useState(Math.min(r,e.length)),[s,l]=c.useState(e.length<=r);return c.useEffect(()=>{if(o>=e.length){l(!0);return}const u=setTimeout(()=>{c.startTransition(()=>{i(f=>Math.min(f+a,e.length))})},n);return()=>clearTimeout(u)},[o,e.length,a,n]),c.useEffect(()=>{i(Math.min(r,e.length)),l(e.length<=r)},[e,r]),{visibleItems:c.useMemo(()=>e.slice(0,o),[e,o]),visibleCount:o,totalCount:e.length,isComplete:s,progress:o/e.length*100}}function gu(e){const{initial:t,mutate:r,rollbackOnError:a=!0}=e,[n,o]=c.useState(t),[i,s]=c.useState(!1),[l,d]=c.useState(null),u=c.useRef(t),f=c.useCallback(async y=>{u.current=n,d(null),o(y),s(!0);try{const m=await r(y);o(m)}catch(m){d(m instanceof Error?m:new Error(String(m))),a&&o(u.current)}finally{s(!1)}},[n,r,a]),h=c.useCallback(()=>{o(t),d(null),s(!1)},[t]);return{value:n,update:f,isPending:i,error:l,reset:h}}function hu(e){const{workerScript:t,idleTimeout:r=3e4}=e,[a,n]=c.useState(null),[o,i]=c.useState(!1),[s,l]=c.useState(null),d=c.useRef(null),u=c.useRef(0),f=c.useRef(null),h=c.useRef(void 0),y=c.useCallback(()=>{if(!d.current){if(typeof t=="function"){const b=new Blob([`(${t.toString()})()`],{type:"application/javascript"});d.current=new Worker(URL.createObjectURL(b))}else d.current=new Worker(t,{type:"module"});d.current.onmessage=b=>{const x=b.data;x.id===f.current&&(x.type==="result"?(n(x.result??null),i(!1),f.current=null,m()):x.type==="error"&&(l(new Error(x.error)),i(!1),f.current=null,m()))},d.current.onerror=b=>{l(new Error(b.message)),i(!1),f.current=null}}return d.current},[t]),m=c.useCallback(()=>{h.current&&window.clearTimeout(h.current),r>0&&(h.current=window.setTimeout(()=>{d.current&&!f.current&&(d.current.terminate(),d.current=null)},r))},[r]),p=c.useCallback(b=>new Promise((x,w)=>{const A=y(),k=`task-${++u.current}`;f.current=k,i(!0),l(null);const C=A.onmessage;A.onmessage=M=>{C==null||C.call(A,M),M.data.id===k&&(M.data.type==="result"?x(M.data.result):M.data.type==="error"&&w(new Error(M.data.error)))},A.postMessage({type:"task",id:k,data:b})}),[y]),g=c.useCallback(()=>{d.current&&f.current&&(d.current.postMessage({type:"cancel",id:f.current}),f.current=null,i(!1))},[]),v=c.useCallback(()=>{d.current&&(d.current.terminate(),d.current=null),h.current&&window.clearTimeout(h.current),f.current=null,i(!1)},[]);return c.useEffect(()=>()=>{v()},[v]),{result:a,isProcessing:o,error:s,execute:p,cancel:g,terminate:v}}function yu(e){const{workerScript:t,poolSize:r=navigator.hardwareConcurrency||4,idleTimeout:a=6e4}=e,n=c.useRef([]),o=c.useRef([]),i=c.useRef(0),s=c.useRef(void 0),l=c.useCallback(()=>{if(typeof t=="function"){const g=new Blob([`(${t.toString()})()`],{type:"application/javascript"});return new Worker(URL.createObjectURL(g))}return new Worker(t,{type:"module"})},[t]),d=c.useCallback(()=>{const g=n.current.find(v=>!v.busy);if(g)return g;if(n.current.length<r){const b={worker:l(),busy:!1,taskId:null};return n.current.push(b),b}return null},[l,r]),u=c.useCallback(()=>{for(;o.current.length>0;){const g=d();if(!g)break;const v=o.current.shift();g.busy=!0,g.taskId=v.id,g.worker.onmessage=b=>{const x=b.data;x.id===v.id&&(g.busy=!1,g.taskId=null,x.type==="result"?v.resolve(x.result):x.type==="error"&&v.reject(new Error(x.error)),u(),f())},g.worker.onerror=b=>{g.busy=!1,g.taskId=null,v.reject(new Error(b.message)),u()},g.worker.postMessage({type:"task",id:v.id,data:v.data})}},[d]),f=c.useCallback(()=>{s.current&&window.clearTimeout(s.current),a>0&&(s.current=window.setTimeout(()=>{n.current.filter(v=>!v.busy).forEach(v=>{v.worker.terminate(),n.current=n.current.filter(b=>b!==v)})},a))},[a]),h=c.useCallback(g=>new Promise((v,b)=>{const x=`pool-task-${++i.current}`;o.current.push({id:x,data:g,resolve:v,reject:b}),u()}),[u]),y=c.useCallback(g=>Promise.all(g.map(v=>h(v))),[h]),m=c.useCallback(()=>{n.current.forEach(g=>g.worker.terminate()),n.current=[],o.current=[],s.current&&window.clearTimeout(s.current)},[]),p=c.useCallback(()=>({total:n.current.length,busy:n.current.filter(g=>g.busy).length,idle:n.current.filter(g=>!g.busy).length,queued:o.current.length}),[]);return c.useEffect(()=>()=>{m()},[m]),{execute:h,executeAll:y,terminateAll:m,getStats:p}}function bu(e){const t=`
122
+ HTML:`}],{temperature:.3}),c=i.content.match(/```html?\n?([\s\S]*?)```/);return c?c[1].trim():i.content.trim()}finally{r(!1)}},[e]);return{improveText:a,translate:n,generateHtml:o,isLoading:t}}class qe{constructor(){this._listeners=new Map}on(t,r){return this._listeners.has(t)||this._listeners.set(t,new Set),this._listeners.get(t).add(r),()=>{var a;(a=this._listeners.get(t))==null||a.delete(r)}}emit(t,...r){var a;(a=this._listeners.get(t))==null||a.forEach(n=>{try{n(...r)}catch{}})}}function Yl(e,t){const r=e[t.field],a=t.value;switch(t.operator){case"=":return r==a;case"<>":return r!=a;case"<":return r<a;case"<=":return r<=a;case">":return r>a;case">=":return r>=a;case"contains":return String(r??"").toLowerCase().includes(String(a??"").toLowerCase());case"notcontains":return!String(r??"").toLowerCase().includes(String(a??"").toLowerCase());case"startswith":return String(r??"").toLowerCase().startsWith(String(a??"").toLowerCase());case"endswith":return String(r??"").toLowerCase().endsWith(String(a??"").toLowerCase());case"isblank":return r==null||r==="";case"isnotblank":return r!=null&&r!=="";default:return!0}}function yo(e,t){if(t.items.length===0)return!0;const r=a=>a.type==="condition"?Yl(e,a):yo(e,a);return t.logic==="and"?t.items.every(r):t.items.some(r)}function Jl(e,t){var n;let r=[...e];if(t.filter&&(r=r.filter(o=>yo(o,t.filter))),t.search){const o=t.search.toLowerCase(),s=t.searchFields;r=r.filter(i=>(s?s.map(d=>i[d]):Object.values(i)).some(d=>String(d??"").toLowerCase().includes(o)))}const a=r.length;if((n=t.sort)!=null&&n.length&&r.sort((o,s)=>{for(const i of t.sort){const c=o[i.field]??"",d=s[i.field]??"",u=typeof c=="number"&&typeof d=="number"?c-d:String(c).localeCompare(String(d));if(u!==0)return i.direction==="desc"?-u:u}return 0}),t.skip!=null||t.take!=null){const o=t.skip??0,s=t.take??r.length;r=r.slice(o,o+s)}return{data:r,totalCount:a}}function Ql(e){const t=e.keyField??"id";let r=[...e.data];const a=new qe;return{keyField:t,writable:!0,async load(o={}){a.emit("loading",!0);try{const s=Jl(r,o);return a.emit("loaded",s),a.emit("loading",!1),s}catch(s){throw a.emit("error",s instanceof Error?s:new Error(String(s))),a.emit("loading",!1),s}},async byKey(o){return r.find(s=>s[t]===o)},async insert(o){const s={...o};return r=[...r,s],a.emit("changed"),s},async update(o,s){const i=r.findIndex(d=>d[t]===o);if(i===-1)throw new Error(`Record not found: ${o}`);const c={...r[i],...s};return r=r.map((d,u)=>u===i?c:d),a.emit("changed"),c},async remove(o){r=r.filter(s=>s[t]!==o),a.emit("changed")},on:a.on.bind(a)}}async function Zl(e){const t={"Content-Type":"application/json"};if(!e.headers)return t;const r=typeof e.headers=="function"?await e.headers():e.headers;return{...t,...r}}function et(e,t,r){return typeof e=="function"?e(r):e||`${t}/${encodeURIComponent(String(r))}`}function ed(e){var r,a,n;const t={};return e.skip!=null&&(t.skip=String(e.skip)),e.take!=null&&(t.take=String(e.take)),e.search&&(t.search=e.search),(r=e.sort)!=null&&r.length&&(t.sort=e.sort.map(o=>`${o.field} ${o.direction}`).join(",")),e.filter&&(t.filter=JSON.stringify(e.filter)),(a=e.select)!=null&&a.length&&(t.select=e.select.join(",")),(n=e.expand)!=null&&n.length&&(t.expand=e.expand.join(",")),t}function td(e){if(Array.isArray(e))return{data:e,totalCount:e.length};const t=e,r=t.data??t.items??t.value??t.results??[],a=t.totalCount??t.total??t.count??t["@odata.count"]??r.length;return{data:r,totalCount:a}}function ho(e){const t=e.keyField??"id",r=new qe;async function a(o,s){const i=await Zl(e),c=await fetch(o,{...e.fetchOptions,...s,headers:{...i,...s==null?void 0:s.headers}});if(!c.ok){const u=await c.text().catch(()=>c.statusText);throw new Error(`HTTP ${c.status}: ${u}`)}return(c.headers.get("content-type")??"").includes("json")?c.json():c.text()}return{keyField:t,writable:!0,async load(o={}){var s;r.emit("loading",!0);try{const i=e.loadUrl??e.url,c=e.mapLoadParams?e.mapLoadParams(o):ed(o),d=new URLSearchParams(c).toString(),u=d?`${i}?${d}`:i,f=await a(u),h=e.extractLoadResult?e.extractLoadResult(f):td(f);return r.emit("loaded",h),r.emit("loading",!1),h}catch(i){const c=i instanceof Error?i:new Error(String(i));throw r.emit("error",c),r.emit("loading",!1),(s=e.onError)==null||s.call(e,c,"load"),c}},async byKey(o){const s=et(e.byKeyUrl,e.url,o),i=await a(s);return e.extractItem?e.extractItem(i):i},async insert(o){const s=e.insertUrl??e.url,i=e.prepareInsertBody?e.prepareInsertBody(o):o,c=await a(s,{method:"POST",body:JSON.stringify(i)}),d=e.extractItem?e.extractItem(c):c;return r.emit("changed"),d},async update(o,s){const i=et(e.updateUrl,e.url,o),c=e.prepareUpdateBody?e.prepareUpdateBody(o,s):s,d=await a(i,{method:e.updateMethod??"PUT",body:JSON.stringify(c)}),u=e.extractItem?e.extractItem(d):d;return r.emit("changed"),u},async remove(o){const s=et(e.deleteUrl,e.url,o);await a(s,{method:"DELETE"}),r.emit("changed")},on:r.on.bind(r)}}function rd(e,t){const r=e.field,a=typeof e.value=="string"?`'${e.value.replace(/'/g,"''")}'`:String(e.value??"null");switch(e.operator){case"=":return`${r} eq ${a}`;case"<>":return`${r} ne ${a}`;case"<":return`${r} lt ${a}`;case"<=":return`${r} le ${a}`;case">":return`${r} gt ${a}`;case">=":return`${r} ge ${a}`;case"contains":return t>=4?`contains(${r},${a})`:`substringof(${a},${r})`;case"notcontains":return t>=4?`not contains(${r},${a})`:`not substringof(${a},${r})`;case"startswith":return`startswith(${r},${a})`;case"endswith":return`endswith(${r},${a})`;case"isblank":return`${r} eq null`;case"isnotblank":return`${r} ne null`;default:return"true"}}function bo(e,t){return e.items.length===0?"":e.items.map(a=>a.type==="condition"?rd(a,t):`(${bo(a,t)})`).join(e.logic==="and"?" and ":" or ")}function ad(e){const t=e.version??4,r={url:e.url,keyField:e.keyField,headers:e.headers,fetchOptions:e.fetchOptions,onError:e.onError,updateMethod:"PATCH",mapLoadParams(a){var o,s,i;const n={};if(t>=4&&(n.$count="true"),a.skip!=null&&(n.$skip=String(a.skip)),a.take!=null&&(n.$top=String(a.take)),(o=a.sort)!=null&&o.length&&(n.$orderby=a.sort.map(c=>`${c.field} ${c.direction}`).join(",")),a.filter){const c=bo(a.filter,t);c&&(n.$filter=c)}return a.search&&(n.$search=`"${a.search}"`),(s=a.select)!=null&&s.length&&(n.$select=a.select.join(",")),(i=a.expand)!=null&&i.length&&(n.$expand=a.expand.join(",")),n},extractLoadResult(a){var i,c;const n=a,o=n.value??((i=n.d)==null?void 0:i.results)??[],s=n["@odata.count"]??((c=n.d)==null?void 0:c.__count)??o.length;return{data:o,totalCount:s}},byKeyUrl:a=>{const n=typeof a=="number"?a:`'${String(a).replace(/'/g,"''")}'`;return`${e.url}(${n})`}};return ho(r)}function nd(e){const t=e.keyField??"id",r=new qe;async function a(c,d){var p;const u={"Content-Type":"application/json"},f=e.headers?typeof e.headers=="function"?await e.headers():e.headers:{},h=await fetch(e.url,{method:"POST",headers:{...u,...f},body:JSON.stringify({query:c,variables:d})});if(!h.ok){const m=await h.text().catch(()=>h.statusText);throw new Error(`GraphQL HTTP ${h.status}: ${m}`)}const b=await h.json();if((p=b.errors)!=null&&p.length)throw new Error(b.errors.map(m=>m.message).join("; "));return b.data}function n(c){var u;const d={};return c.skip!=null&&(d.skip=c.skip),c.take!=null&&(d.take=c.take),c.search&&(d.search=c.search),(u=c.sort)!=null&&u.length&&(d.sort=c.sort),c.filter&&(d.filter=c.filter),d}function o(c){if(!c||typeof c!="object")return{data:[],totalCount:0};const d=Object.values(c)[0];if(!d)return{data:[],totalCount:0};if(Array.isArray(d))return{data:d,totalCount:d.length};const u=d.items??d.nodes??d.edges??d.data??[],f=d.totalCount??d.total??d.count??u.length;return{data:u,totalCount:f}}function s(c){return!c||typeof c!="object"?c:Object.values(c)[0]}return{keyField:t,writable:!!(e.queries.insert||e.queries.update||e.queries.remove),async load(c={}){var d;r.emit("loading",!0);try{const u=e.mapVariables?e.mapVariables(c):n(c),f=await a(e.queries.load,u),h=e.extractLoadResult?e.extractLoadResult(f):o(f);return r.emit("loaded",h),r.emit("loading",!1),h}catch(u){const f=u instanceof Error?u:new Error(String(u));throw r.emit("error",f),r.emit("loading",!1),(d=e.onError)==null||d.call(e,f,"load"),f}},async byKey(c){if(!e.queries.byKey)throw new Error("byKey query not configured");const d=await a(e.queries.byKey,{[t]:c});return e.extractItem?e.extractItem(d):s(d)},insert:e.queries.insert?async c=>{const d=await a(e.queries.insert,{input:c}),u=e.extractItem?e.extractItem(d):s(d);return r.emit("changed"),u}:void 0,update:e.queries.update?async(c,d)=>{const u=await a(e.queries.update,{[t]:c,input:d}),f=e.extractItem?e.extractItem(u):s(u);return r.emit("changed"),f}:void 0,remove:e.queries.remove?async c=>{await a(e.queries.remove,{[t]:c}),r.emit("changed")}:void 0,on:r.on.bind(r)}}function od(e){const t=e.keyField??"id",r=new qe;return{keyField:t,writable:!!(e.insert||e.update||e.remove),async load(n={}){r.emit("loading",!0);try{const o=await e.load(n);return r.emit("loaded",o),r.emit("loading",!1),o}catch(o){const s=o instanceof Error?o:new Error(String(o));throw r.emit("error",s),r.emit("loading",!1),s}},async byKey(n){if(!e.byKey)throw new Error("byKey handler not configured");return e.byKey(n)},insert:e.insert?async n=>{const o=await e.insert(n);return r.emit("changed"),o}:void 0,update:e.update?async(n,o)=>{const s=await e.update(n,o);return r.emit("changed"),s}:void 0,remove:e.remove?async n=>{await e.remove(n),r.emit("changed")}:void 0,on:r.on.bind(r)}}function So(e){return/^[A-Za-z_][A-Za-z0-9_.]*$/.test(e)?e:`"${e.replace(/"/g,'""')}"`}function id(e,t={}){const r=[],a=t.placeholder??(()=>"?"),n=t.quoteField??So,o=c=>(r.push(c),a(r.length-1)),s=c=>{const d=n(c.field);switch(c.operator){case"=":case"<>":case"<":case"<=":case">":case">=":return`${d} ${c.operator} ${o(c.value)}`;case"contains":return`${d} LIKE ${o(`%${String(c.value)}%`)}`;case"notcontains":return`${d} NOT LIKE ${o(`%${String(c.value)}%`)}`;case"startswith":return`${d} LIKE ${o(`${String(c.value)}%`)}`;case"endswith":return`${d} LIKE ${o(`%${String(c.value)}`)}`;case"between":{const u=Array.isArray(c.value)?c.value:[c.value,c.value];return`${d} BETWEEN ${o(u[0])} AND ${o(u[1])}`}case"isblank":return`(${d} IS NULL OR ${d} = ${o("")})`;case"isnotblank":return`(${d} IS NOT NULL AND ${d} <> ${o("")})`;case"in":{const u=Array.isArray(c.value)?c.value:[c.value];return u.length?`${d} IN (${u.map(o).join(", ")})`:"1 = 0"}default:return`${d} = ${o(c.value)}`}},i=c=>{const d=[];for(const u of c.items)if(u.type==="group"){const f=i(u);f&&d.push(`(${f})`)}else d.push(s(u));return d.join(c.logic==="or"?" OR ":" AND ")};return{sql:i(e),params:r}}function sd(e,t={}){const r=t.quoteField??So;return e.filter(a=>a.field).map(a=>`${r(a.field)} ${a.direction==="desc"?"DESC":"ASC"}`).join(", ")}function Z(e){return String(e??"").toLowerCase()}function vo(e,t){const r=e[t.field],a=t.value;switch(t.operator){case"=":return r==a;case"<>":return r!=a;case"<":return r<a;case"<=":return r<=a;case">":return r>a;case">=":return r>=a;case"contains":return Z(r).includes(Z(a));case"notcontains":return!Z(r).includes(Z(a));case"startswith":return Z(r).startsWith(Z(a));case"endswith":return Z(r).endsWith(Z(a));case"between":{const n=Array.isArray(a)?a:[a,a];return r>=n[0]&&r<=n[1]}case"isblank":return r==null||r==="";case"isnotblank":return r!=null&&r!=="";case"in":return(Array.isArray(a)?a:[a]).some(o=>r==o);default:return!0}}function Ft(e,t){if(!t.items.length)return!0;const r=a=>a.type==="condition"?vo(e,a):Ft(e,a);return t.logic==="or"?t.items.some(r):t.items.every(r)}function Zt(e){return e==null||e===""}const cd=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function ld(e){const t=String(e);try{return new URL(t),!0}catch{return/^https?:\/\/[^\s]+$/.test(t)}}function K(e){return typeof e=="number"?e:parseFloat(String(e))}function xo(e){const t=e.field;switch(e.op){case"required":return`${t} is required`;case"minLength":return`${t} must be at least ${e.value} characters`;case"maxLength":return`${t} must be at most ${e.value} characters`;case"min":return`${t} must be ≥ ${e.value}`;case"max":return`${t} must be ≤ ${e.value}`;case"pattern":return`${t} has an invalid format`;case"email":return`${t} must be a valid email`;case"url":return`${t} must be a valid URL`;case"equals":return`${t} must equal ${e.value}`;case"notEquals":return`${t} must not equal ${e.value}`;case"greaterThan":return`${t} must be greater than ${e.value}`;case"lessThan":return`${t} must be less than ${e.value}`;case"matchesField":return`${t} must match ${e.compareField}`;case"greaterThanField":return`${t} must be greater than ${e.compareField}`;case"lessThanField":return`${t} must be less than ${e.compareField}`;default:return`${t} is invalid`}}function wo(e,t){const r=t[e.field];if(e.op==="required")return!Zt(r);if(Zt(r))return!0;const a=e.compareField!=null?t[e.compareField]:void 0;switch(e.op){case"minLength":return String(r).length>=K(e.value);case"maxLength":return String(r).length<=K(e.value);case"min":return K(r)>=K(e.value);case"max":return K(r)<=K(e.value);case"pattern":try{return new RegExp(String(e.value)).test(String(r))}catch{return!0}case"email":return cd.test(String(r));case"url":return ld(r);case"equals":return r===e.value;case"notEquals":return r!==e.value;case"greaterThan":return K(r)>K(e.value);case"lessThan":return K(r)<K(e.value);case"matchesField":return r===a;case"greaterThanField":return K(r)>K(a);case"lessThanField":return K(r)<K(a);case"custom":return e.validate?e.validate(r,t):!0;default:return!0}}function ko(e,t){const r=[];for(const a of e??[])a.when&&!Ft(t,a.when)||wo(a,t)||r.push({field:a.field,message:a.message??xo(a),severity:a.severity??"error",ruleId:a.id});return r}function dd(e,t){return ko(e,t).every(r=>r.severity!=="error")}class ut{constructor(t={}){this.cache=new Map,this.ttl=t.ttl??6e4,this.maxSize=t.maxSize??100}get(t){const r=this.cache.get(t);if(r){if(Date.now()>r.expiresAt){this.cache.delete(t);return}return this.cache.delete(t),this.cache.set(t,r),r.data}}set(t,r,a){if(this.cache.size>=this.maxSize){const n=this.cache.keys().next().value;n&&this.cache.delete(n)}this.cache.set(t,{data:r,timestamp:Date.now(),expiresAt:Date.now()+(a??this.ttl)})}has(t){return this.get(t)!==void 0}invalidate(t){this.cache.delete(t)}invalidateAll(){this.cache.clear()}invalidateMatching(t){for(const r of this.cache.keys())t.test(r)&&this.cache.delete(r)}}class Co{constructor(){this.pending=new Map}async dedupe(t,r){const a=this.pending.get(t);if(a)return a;const n=r().finally(()=>{this.pending.delete(t)});return this.pending.set(t,n),n}hasPending(t){return this.pending.has(t)}cancelAll(){this.pending.clear()}}function ud(e,t={}){const r=new ut(t),a=new ut(t),n=new Co,o=t.generateKey??(c=>JSON.stringify(c)),s=t.cacheLoads!==!1,i=t.cacheByKey!==!1;return{...e,cache:r,async load(c={}){const d=`load:${o(c)}`;if(s){const u=r.get(d);if(u)return u}return n.dedupe(d,async()=>{const u=await e.load(c);return s&&r.set(d,u),u})},async byKey(c){const d=`byKey:${String(c)}`;if(i){const u=a.get(d);if(u)return u}return n.dedupe(d,async()=>{const u=await e.byKey(c);return i&&u&&a.set(d,u),u})},async insert(c){const d=await e.insert(c);return r.invalidateAll(),d},async update(c,d){const u=await e.update(c,d);return r.invalidateAll(),a.invalidate(`byKey:${String(c)}`),u},async remove(c){await e.remove(c),r.invalidateAll(),a.invalidate(`byKey:${String(c)}`)},invalidateCache(){r.invalidateAll(),a.invalidateAll()}}}function fd(e,t){const{cursorField:r,pageSize:a=20,direction:n="asc"}=t;return{async loadPage(o={}){var g;const s=o.pageSize??a,i=o.direction??"forward",c=o.cursor?{type:"condition",field:r,operator:i==="forward"?n==="asc"?">":"<":n==="asc"?"<":">",value:md(o.cursor)}:null,d=c?{type:"group",logic:"and",items:[...((g=o.filter)==null?void 0:g.items)??[],c]}:o.filter,u=[{field:r,direction:i==="forward"?n:n==="asc"?"desc":"asc"},...o.sort??[]],f=await e.load({...o,filter:d,sort:u,take:s+1}),h=f.data.length>s,b=h?f.data.slice(0,s):f.data;i==="backward"&&b.reverse();const p=b[b.length-1],m=b[0];return{data:b,nextCursor:h&&p?tt(p[r]):null,prevCursor:m&&o.cursor?tt(m[r]):null,hasMore:h}},async*loadAll(o={}){let s=null;do{const i=await e.load({...o,...s?{cursor:s}:{}});if(i.data.length===0)break;yield i.data;const c=i.data[i.data.length-1];s=c?tt(c[r]):null}while(s)}}}function tt(e){return btoa(JSON.stringify(e))}function md(e){try{return JSON.parse(atob(e))}catch{return e}}function pd(e,t={}){const{pageSize:r=50,threshold:a=200,initialPage:n=0}=t;let o={items:[],isLoading:!1,hasMore:!0,error:null,page:n,totalCount:0};const s=new Set;function i(){s.forEach(b=>b(o))}function c(b){o={...o,...b},i()}let d={};async function u(){if(!(o.isLoading||!o.hasMore)){c({isLoading:!0,error:null});try{const b=await e.load({...d,skip:o.page*r,take:r}),p=[...o.items,...b.data],m=p.length<b.totalCount;c({items:p,page:o.page+1,totalCount:b.totalCount,hasMore:m,isLoading:!1})}catch(b){c({error:b instanceof Error?b:new Error(String(b)),isLoading:!1})}}}function f(b={}){d=b,o={items:[],isLoading:!1,hasMore:!0,error:null,page:0,totalCount:0},i()}function h(b){const p=b.target;if(!p)return;p.scrollHeight-p.scrollTop-p.clientHeight<a&&u()}return{get state(){return o},loadMore:u,reset:f,handleScroll:h,subscribe(b){return s.add(b),()=>s.delete(b)},setOptions(b){d=b}}}function gd(e){const{url:t,baseSource:r,keyField:a=r.keyField,reconnectDelay:n=3e3,maxReconnects:o=10,heartbeatInterval:s=3e4}=e;let i=null,c=0,d=null,u=[];const f=new Map;function h(w,...C){var A;(A=f.get(w))==null||A.forEach(M=>M(...C))}function b(w){if(e.parseMessage)return e.parseMessage(w);try{return JSON.parse(w.data)}catch{return null}}function p(w){return e.serializeMessage?e.serializeMessage(w):JSON.stringify(w)}function m(w){switch(w.type){case"insert":w.data&&(u=[...u,w.data],h("changed"));break;case"update":w.key&&w.changes&&(u=u.map(C=>C[a]===w.key?{...C,...w.changes}:C),h("changed"));break;case"remove":w.key&&(u=u.filter(C=>C[a]!==w.key),h("changed"));break;case"refresh":case"sync":E.load().catch(()=>{});break}}function g(){(i==null?void 0:i.readyState)!==WebSocket.OPEN&&(i=new WebSocket(t),i.onopen=()=>{c=0,h("connected"),y()},i.onmessage=w=>{const C=b(w);C&&(m(C),h("message",C))},i.onerror=w=>{h("error",new Error("WebSocket error"))},i.onclose=()=>{v(),h("disconnected"),c<o&&(c++,setTimeout(g,n*Math.min(c,5)))})}function S(){v(),i&&(i.close(),i=null)}function y(){v(),d=window.setInterval(()=>{(i==null?void 0:i.readyState)===WebSocket.OPEN&&i.send(JSON.stringify({type:"ping"}))},s)}function v(){d&&(clearInterval(d),d=null)}function k(w){(i==null?void 0:i.readyState)===WebSocket.OPEN&&i.send(p(w))}const E={keyField:a,writable:r.writable,async load(w={}){h("loading",!0);try{const C=await r.load(w);return u=C.data,h("loaded",C),h("loading",!1),C}catch(C){throw h("error",C),h("loading",!1),C}},async byKey(w){const C=u.find(A=>A[a]===w);return C||r.byKey(w)},async insert(w){const C=await r.insert(w);return k({type:"insert",data:C}),C},async update(w,C){const A=await r.update(w,C);return k({type:"update",key:w,changes:C}),A},async remove(w){await r.remove(w),k({type:"remove",key:w})},on(w,C){return f.has(w)||f.set(w,new Set),f.get(w).add(C),()=>{var A;return(A=f.get(w))==null?void 0:A.delete(C)}},connect:g,disconnect:S,isConnected:()=>(i==null?void 0:i.readyState)===WebSocket.OPEN,sendMessage:k};return E}function yd(e){const{connection:t,baseSource:r}=e,a={onInsert:"OnInsert",onUpdate:"OnUpdate",onRemove:"OnRemove",onRefresh:"OnRefresh",insert:"Insert",update:"Update",remove:"Remove",...e.methods},n=r.keyField;let o=[];const s=new Map;function i(f,...h){var b;(b=s.get(f))==null||b.forEach(p=>p(...h))}const c=f=>{o=[...o,f],i("changed")},d=(f,h)=>{o=o.map(b=>b[n]===f?{...b,...h}:b),i("changed")},u=f=>{o=o.filter(h=>h[n]!==f),i("changed")};return{keyField:n,writable:r.writable,async load(f={}){i("loading",!0);try{const h=await r.load(f);return o=h.data,i("loaded",h),i("loading",!1),h}catch(h){throw i("error",h),i("loading",!1),h}},async byKey(f){const h=o.find(b=>b[n]===f);return h||r.byKey(f)},async insert(f){return await t.invoke(a.insert,f)},async update(f,h){return await t.invoke(a.update,f,h)},async remove(f){await t.invoke(a.remove,f)},on(f,h){return s.has(f)||s.set(f,new Set),s.get(f).add(h),()=>{var b;return(b=s.get(f))==null?void 0:b.delete(h)}},async connect(){t.on(a.onInsert,c),t.on(a.onUpdate,d),t.on(a.onRemove,u),t.on(a.onRefresh,()=>this.load()),await t.start()},async disconnect(){t.off(a.onInsert,c),t.off(a.onUpdate,d),t.off(a.onRemove,u),t.off(a.onRefresh,()=>{}),await t.stop()}}}function hd(e,t={}){const r=e.keyField;let a=[];const n=new Map;let o=0;const s=new Map;function i(d,...u){var f;(f=s.get(d))==null||f.forEach(h=>h(...u))}function c(){return`op_${++o}_${Date.now()}`}return{keyField:r,writable:!0,async load(d={}){const u=await e.load(d);return a=u.data,u},async byKey(d){return a.find(u=>u[r]===d)??e.byKey(d)},async insert(d){var h,b,p;const u=c(),f={...d};a=[...a,f],n.set(u,{id:u,action:"insert",item:f}),(h=t.onOptimisticApply)==null||h.call(t,f,"insert"),i("changed");try{const m=await e.insert(d);return a=a.map(g=>g===f?m:g),n.delete(u),(b=t.onConfirm)==null||b.call(t,m,"insert"),i("changed"),m}catch(m){throw a=a.filter(g=>g!==f),n.delete(u),(p=t.onRollback)==null||p.call(t,f,"insert",m instanceof Error?m:new Error(String(m))),i("changed"),m}},async update(d,u){var m,g,S;const f=c(),h=a.findIndex(y=>y[r]===d);if(h===-1)return e.update(d,u);const b=a[h],p={...b,...u};a=a.map((y,v)=>v===h?p:y),n.set(f,{id:f,action:"update",key:d,originalItem:b}),(m=t.onOptimisticApply)==null||m.call(t,p,"update"),i("changed");try{const y=await e.update(d,u);return a=a.map((v,k)=>k===h?y:v),n.delete(f),(g=t.onConfirm)==null||g.call(t,y,"update"),i("changed"),y}catch(y){throw a=a.map((v,k)=>k===h?b:v),n.delete(f),(S=t.onRollback)==null||S.call(t,b,"update",y instanceof Error?y:new Error(String(y))),i("changed"),y}},async remove(d){var h,b,p;const u=c(),f=a.find(m=>m[r]===d);if(!f)return e.remove(d);a=a.filter(m=>m!==f),n.set(u,{id:u,action:"remove",key:d,originalItem:f}),(h=t.onOptimisticApply)==null||h.call(t,f,"remove"),i("changed");try{await e.remove(d),n.delete(u),(b=t.onConfirm)==null||b.call(t,f,"remove")}catch(m){throw a=[...a,f],n.delete(u),(p=t.onRollback)==null||p.call(t,f,"remove",m instanceof Error?m:new Error(String(m))),i("changed"),m}},on(d,u){return s.has(d)||s.set(d,new Set),s.get(d).add(u),()=>{var f;return(f=s.get(d))==null?void 0:f.delete(u)}},hasPendingChanges:()=>n.size>0,getPendingCount:()=>n.size}}function Eo(e,t,r){const a=new Map(e.map(d=>[d[r],d])),n=new Map(t.map(d=>[d[r],d])),o=[],s=[],i=[],c=[];for(const[d,u]of n){const f=a.get(d);if(!f)o.push(u);else if(No(f,u))c.push(u);else{const h={};for(const b of Object.keys(u))f[b]!==u[b]&&(h[b]=u[b]);s.push({key:d,changes:h,oldItem:f,newItem:u})}}for(const[d,u]of a)n.has(d)||i.push(u);return{inserted:o,updated:s,removed:i,unchanged:c}}function No(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e===null||t===null||typeof e!="object")return e===t;const r=e,a=t,n=new Set([...Object.keys(r),...Object.keys(a)]);for(const o of n)if(!No(r[o],a[o]))return!1;return!0}function bd(e,t={}){const{interval:r=5e3,autoStart:a=!1,pauseWhenHidden:n=!0,onDataChange:o}=t;let s=r,i=null,c=[],d={};const u=new Map;function f(g,...S){var y;(y=u.get(g))==null||y.forEach(v=>v(...S))}async function h(){if(!(n&&document.hidden))try{const g=await e.load(d),S=Eo(c,g.data,e.keyField);(S.inserted.length||S.updated.length||S.removed.length)&&(c=g.data,f("changed"),o==null||o(S))}catch{}}function b(){i||(i=window.setInterval(h,s))}function p(){i&&(clearInterval(i),i=null)}n&&document.addEventListener("visibilitychange",()=>{document.hidden||i&&h()});const m={...e,async load(g={}){d=g;const S=await e.load(g);return c=S.data,S},on(g,S){u.has(g)||u.set(g,new Set),u.get(g).add(S);const y=e.on(g,S);return()=>{var v;(v=u.get(g))==null||v.delete(S),y()}},startPolling:b,stopPolling:p,isPolling:()=>i!==null,setInterval(g){s=g,i&&(p(),b())}};return a&&b(),m}function Sd(e){const{url:t,baseSource:r,keyField:a=r.keyField,reconnectDelay:n=3e3,maxReconnects:o=10,withCredentials:s=!1}=e;let i=null,c=0,d=null,u=[];const f=new Map;function h(y,...v){var k;(k=f.get(y))==null||k.forEach(E=>E(...v))}function b(y){if(e.parseEvent)return e.parseEvent(y);try{return JSON.parse(y.data)}catch{return null}}function p(y){switch(y.type){case"insert":y.data&&(u=[...u,y.data],h("changed"));break;case"update":y.key&&y.changes&&(u=u.map(v=>v[a]===y.key?{...v,...y.changes}:v),h("changed"));break;case"remove":y.key&&(u=u.filter(v=>v[a]!==y.key),h("changed"));break;case"snapshot":Array.isArray(y.data)&&(u=y.data,h("changed"));break;case"refresh":S.load().catch(()=>{});break}}function m(){(i==null?void 0:i.readyState)!==EventSource.OPEN&&(g(),i=new EventSource(t,{withCredentials:s}),i.onopen=()=>{c=0,h("connected")},i.onmessage=y=>{const v=b(y);v&&(p(v),h("message",v))},i.onerror=()=>{if(h("error",new Error("SSE connection error")),(i==null?void 0:i.readyState)===EventSource.CLOSED&&(h("disconnected"),i=null,c<o)){c++;const y=n*Math.min(c,5);d=setTimeout(m,y)}})}function g(){d&&(clearTimeout(d),d=null),i&&(i.close(),i=null)}const S={keyField:a,writable:r.writable,async load(y={}){h("loading",!0);try{const v=await r.load(y);return u=v.data,h("loaded",v),h("loading",!1),v}catch(v){throw h("error",v),h("loading",!1),v}},async byKey(y){const v=u.find(k=>k[a]===y);return v||r.byKey(y)},async insert(y){return r.insert(y)},async update(y,v){return r.update(y,v)},async remove(y){return r.remove(y)},on(y,v){return f.has(y)||f.set(y,new Set),f.get(y).add(v),()=>{var k;return(k=f.get(y))==null?void 0:k.delete(v)}},connect:m,disconnect:g,isConnected:()=>(i==null?void 0:i.readyState)===EventSource.OPEN};return S}function te(e,t){const r={};for(const a of t){const n=e.map(s=>s[a.field]).filter(s=>s!=null),o=a.alias??`${a.fn}_${a.field}`;switch(a.fn){case"sum":r[o]=n.reduce((s,i)=>Number(s)+Number(i),0);break;case"avg":r[o]=n.length?n.reduce((s,i)=>Number(s)+Number(i),0)/n.length:0;break;case"min":r[o]=n.length?Math.min(...n.map(Number)):null;break;case"max":r[o]=n.length?Math.max(...n.map(Number)):null;break;case"count":r[o]=n.length;break;case"first":r[o]=n[0]??null;break;case"last":r[o]=n[n.length-1]??null;break;case"distinct":r[o]=[...new Set(n)];break}}return r}function Dt(e,t){const{groupBy:r,aggregates:a=[],includeItems:n=!1,sortGroups:o}=t;if(r.length===0)return[{key:{},count:e.length,aggregates:te(e,a),items:n?e:void 0}];const s=new Map;for(const c of e){const d={};for(const f of r)d[f]=c[f];const u=JSON.stringify(d);s.has(u)||s.set(u,{key:d,items:[]}),s.get(u).items.push(c)}const i=[];for(const[,c]of s)i.push({key:c.key,count:c.items.length,aggregates:te(c.items,a),items:n?c.items:void 0});return o!=null&&o.length&&i.sort((c,d)=>{for(const u of o){const f=c.key[u.field]??c.aggregates[u.field],h=d.key[u.field]??d.aggregates[u.field],b=typeof f=="number"&&typeof h=="number"?f-h:String(f??"").localeCompare(String(h??""));if(b!==0)return u.direction==="desc"?-b:b}return 0}),i}function Ao(e,t,r=[]){if(t.length===0)return[{key:{},count:e.length,aggregates:te(e,r),items:e}];const[a,...n]=t,o=Dt(e,{groupBy:[a],aggregates:r,includeItems:!0});if(n.length>0)for(const s of o)s.groups=Ao(s.items,n,r),delete s.items;return o}function vd(e,t){const{rows:r,columns:a,values:n,aggregateFunction:o="sum",rowTotals:s=!0,columnTotals:i=!0,grandTotal:c=!0}=t,d=[...new Set(e.map(p=>String(p[a])))].sort(),u=Dt(e,{groupBy:r,includeItems:!0}),f=[];for(const p of u){const m={rowKey:p.key,values:{}};for(const g of d){const S=p.items.filter(v=>String(v[a])===g),y=te(S,[{field:n,fn:o}]);m.values[g]=y[`${o}_${n}`]??null}if(s){const g=te(p.items,[{field:n,fn:o}]);m.rowTotal=g[`${o}_${n}`]}f.push(m)}let h;if(i){h={};for(const p of d){const m=e.filter(S=>String(S[a])===p),g=te(m,[{field:n,fn:o}]);h[p]=g[`${o}_${n}`]}}let b;return c&&(b=te(e,[{field:n,fn:o}])[`${o}_${n}`]),{columnHeaders:d,rows:f,columnTotals:h,grandTotal:b}}function xd(e,t){return e.map((r,a)=>{const n={...r};for(const o of t)n[o.name]=o.formula(r,a,e);return n})}const wd={runningSum:e=>(t,r,a)=>a.slice(0,r+1).reduce((n,o)=>n+Number(o[e]??0),0),runningAvg:e=>(t,r,a)=>{const n=a.slice(0,r+1);return n.reduce((o,s)=>o+Number(s[e]??0),0)/n.length},percentOfTotal:e=>(t,r,a)=>{const n=a.reduce((o,s)=>o+Number(s[e]??0),0);return n?Number(t[e]??0)/n*100:0},rank:(e,t="desc")=>(r,a,n)=>[...n].sort((s,i)=>{const c=Number(s[e]??0)-Number(i[e]??0);return t==="desc"?-c:c}).findIndex(s=>s===r)+1,diffFromPrevious:e=>(t,r,a)=>r===0?null:Number(t[e]??0)-Number(a[r-1][e]??0),percentChange:e=>(t,r,a)=>{if(r===0)return null;const n=Number(a[r-1][e]??0);return n===0?null:(Number(t[e]??0)-n)/n*100},movingAverage:(e,t)=>(r,a,n)=>{const o=Math.max(0,a-t+1),s=n.slice(o,a+1);return s.reduce((i,c)=>i+Number(c[e]??0),0)/s.length},conditional:(e,t,r)=>a=>e(a)?t:r,concat:(...e)=>t=>e.map(r=>t[r]??"").join(" "),formatDate:(e,t="medium")=>r=>{const a=r[e];return a?new Date(a).toLocaleDateString(void 0,{dateStyle:t}):""}};function kd(e,t){const r=[],a=new Map,n=new Map;for(let i=0;i<e.length;i++){const c=e[i];for(const d of t)if(!d.validate(c,i,e)){const u=typeof d.message=="function"?d.message(c):d.message,f={index:i,rule:d.name,message:u,severity:d.severity??"error",fields:d.fields??[],item:c};r.push(f),a.has(i)||a.set(i,[]),a.get(i).push(f);for(const h of f.fields)n.has(h)||n.set(h,[]),n.get(h).push(f)}}const o=r.filter(i=>i.severity==="error").length,s=r.filter(i=>i.severity==="warning").length;return{isValid:o===0,errorCount:o,warningCount:s,errors:r,byIndex:a,byField:n}}const Cd={required:e=>({name:`required_${String(e)}`,validate:t=>t[e]!=null&&t[e]!=="",message:`${String(e)} is required`,fields:[String(e)]}),minLength:(e,t)=>({name:`minLength_${String(e)}`,validate:r=>String(r[e]??"").length>=t,message:`${String(e)} must be at least ${t} characters`,fields:[String(e)]}),maxLength:(e,t)=>({name:`maxLength_${String(e)}`,validate:r=>String(r[e]??"").length<=t,message:`${String(e)} must be at most ${t} characters`,fields:[String(e)]}),min:(e,t)=>({name:`min_${String(e)}`,validate:r=>Number(r[e])>=t,message:`${String(e)} must be at least ${t}`,fields:[String(e)]}),max:(e,t)=>({name:`max_${String(e)}`,validate:r=>Number(r[e])<=t,message:`${String(e)} must be at most ${t}`,fields:[String(e)]}),email:e=>({name:`email_${String(e)}`,validate:t=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(t[e]??"")),message:`${String(e)} must be a valid email`,fields:[String(e)]}),pattern:(e,t,r)=>({name:`pattern_${String(e)}`,validate:a=>t.test(String(a[e]??"")),message:r??`${String(e)} has invalid format`,fields:[String(e)]}),unique:e=>({name:`unique_${String(e)}`,validate:(t,r,a)=>{const n=t[e];return a.findIndex(o=>o[e]===n)===r},message:`${String(e)} must be unique`,fields:[String(e)]}),custom:(e,t,r,a)=>({name:e,validate:t,message:r,fields:a})},Ed=(function(){return{async updateWhere(e,t,r){return e.map(a=>{if(!t(a))return a;const n=typeof r=="function"?r(a):r;return{...a,...n}})},async removeWhere(e,t){const r=[],a=[];for(const n of e)t(n)?a.push(n):r.push(n);return{remaining:r,removed:a}},async transform(e,t,r={}){const{parallel:a=!1,batchSize:n=10}=r,o=[],s=[];let i=0;if(a)for(let c=0;c<e.length;c+=n){const d=e.slice(c,c+n),u=await Promise.allSettled(d.map((f,h)=>t(f,c+h)));for(let f=0;f<u.length;f++){const h=u[f];h.status==="fulfilled"?(o.push(h.value),i++):s.push({index:c+f,item:d[f],error:h.reason})}}else for(let c=0;c<e.length;c++)try{const d=await t(e[c],c);o.push(d),i++}catch(d){s.push({index:c,item:e[c],error:d instanceof Error?d:new Error(String(d))})}return{succeeded:i,failed:s.length,errors:s,results:o}},deduplicate(e,t){const r=new Set;return e.filter(a=>{const n=a[t];return r.has(n)?!1:(r.add(n),!0)})},merge(e,t,r,a={}){const{updateExisting:n=!0,addNew:o=!0}=a,s=new Map(e.map(c=>[c[r],c])),i=[...e];for(const c of t){const d=c[r],u=s.get(d);if(u){if(n){const f=i.indexOf(u);i[f]={...u,...c}}}else o&&i.push(c)}return i}}})();function Nd(e,t){const r=(t==null?void 0:t.autoLoad)??!0,a=(t==null?void 0:t.defaultPageSize)??20,[n,o]=l.useState([]),[s,i]=l.useState(0),[c,d]=l.useState(!1),[u,f]=l.useState(null),[h,b]=l.useState(1),[p,m]=l.useState(a),[g,S]=l.useState((t==null?void 0:t.defaultSort)??[]),[y,v]=l.useState(t==null?void 0:t.defaultFilter),[k,E]=l.useState((t==null?void 0:t.defaultSearch)??""),w=l.useRef(0),C=t==null?void 0:t.loadOptions,A=l.useCallback(async()=>{if(!e)return;const L=++w.current;d(!0),f(null);try{const O=await e.load({skip:(h-1)*p,take:p,sort:g.length?g:void 0,filter:y,search:k||void 0,...C});if(L!==w.current)return;o(O.data),i(O.totalCount)}catch(O){if(L!==w.current)return;f(O instanceof Error?O.message:String(O))}finally{L===w.current&&d(!1)}},[e,h,p,g,y,k,C]);l.useEffect(()=>{r&&A()},[A,r]),l.useEffect(()=>{if(e)return e.on("changed",()=>{A()})},[e,A]);const M=l.useCallback((L,O)=>{S([{field:L,direction:O}]),b(1)},[]),I=l.useCallback(L=>{v(L),b(1)},[]),$=l.useCallback(L=>{E(L),b(1)},[]),T=l.useCallback(L=>{m(L),b(1)},[]),D=l.useCallback(async L=>{if(!(e!=null&&e.insert))throw new Error("DataSource is not writable");await e.insert(L)},[e]),F=l.useCallback(async(L,O)=>{if(!(e!=null&&e.update))throw new Error("DataSource is not writable");await e.update(L,O)},[e]),P=l.useCallback(async L=>{if(!(e!=null&&e.remove))throw new Error("DataSource is not writable");await e.remove(L)},[e]);return{data:n,totalCount:s,loading:c,error:u,page:h,pageSize:p,sort:g,filter:y,search:k,setPage:b,setPageSize:T,setSort:S,setSortField:M,setFilter:I,setSearch:$,reload:A,insert:D,update:F,remove:P}}function Mo(e,t){const[r,a]=l.useState(void 0),[n,o]=l.useState({}),[s,i]=l.useState(!1),[c,d]=l.useState(null),u=l.useRef(0),f=l.useCallback(async()=>{if(!e||t==null){a(void 0);return}const y=++u.current;i(!0),d(null);try{const v=await e.byKey(t);if(y!==u.current)return;a(v),o({})}catch(v){if(y!==u.current)return;d(v instanceof Error?v.message:String(v))}finally{y===u.current&&i(!1)}},[e,t]);l.useEffect(()=>{f()},[f]),l.useEffect(()=>{if(e)return e.on("changed",()=>{f()})},[e,f]);const h=l.useMemo(()=>({...r??{},...n}),[r,n]),b=Object.keys(n).length>0,p=l.useCallback((y,v)=>{o(k=>({...k,[y]:v}))},[]),m=l.useCallback(y=>{o(v=>({...v,...y}))},[]),g=l.useCallback(async()=>{if(!(e!=null&&e.update))throw new Error("DataSource is not writable");b&&await e.update(t,n)},[e,t,n,b]),S=l.useCallback(()=>{o({})},[]);return{data:r,editData:h,loading:s,error:c,changes:n,isDirty:b,set:p,setMany:m,save:g,reload:f,reset:S}}function Ad(e,t,r){const a=Mo(e,t),n=a.editData[r],o=l.useCallback(i=>{a.set(r,i)},[a,r]),s=l.useCallback(async()=>{if(!(e!=null&&e.update))throw new Error("DataSource is not writable");const i={[r]:a.editData[r]};await e.update(t,i)},[e,t,r,a.editData]);return{value:n,setValue:o,loading:a.loading,error:a.error,isDirty:r in a.changes,save:s}}function Md(e,t,r,a){const n=(a==null?void 0:a.autoLoad)??!0,o=(a==null?void 0:a.take)??200,[s,i]=l.useState([]),[c,d]=l.useState(!1),[u,f]=l.useState(null),h=l.useRef(0),b=l.useCallback(async g=>{if(!e)return;const S=++h.current;d(!0),f(null);try{const y=await e.load({take:o,search:g||void 0,searchFields:a==null?void 0:a.searchFields});if(S!==h.current)return;i(y.data)}catch(y){if(S!==h.current)return;f(y instanceof Error?y.message:String(y))}finally{S===h.current&&d(!1)}},[e,o,a==null?void 0:a.searchFields]);l.useEffect(()=>{n&&b()},[b,n]);const p=l.useMemo(()=>s.map(g=>{const S=g,y={value:String(S[t]??""),label:String(S[r]??"")};return a!=null&&a.iconField&&S[a.iconField]!=null&&(y.icon=S[a.iconField]),a!=null&&a.descriptionField&&S[a.descriptionField]!=null&&(y.description=String(S[a.descriptionField])),a!=null&&a.groupField&&S[a.groupField]!=null&&(y.group=String(S[a.groupField])),y}),[s,t,r,a==null?void 0:a.iconField,a==null?void 0:a.descriptionField,a==null?void 0:a.groupField]),m=l.useCallback(g=>{b(g)},[b]);return{options:p,loading:c,error:u,search:m,reload:()=>b()}}function ft(e){const{dbName:t,storeName:r,keyField:a="id",version:n=1,indexes:o=[]}=e;let s=null;const i=new Map;function c(p,...m){var g;(g=i.get(p))==null||g.forEach(S=>S(...m))}async function d(){return s||new Promise((p,m)=>{const g=indexedDB.open(t,n);g.onerror=()=>m(g.error),g.onsuccess=()=>{s=g.result,p(s)},g.onupgradeneeded=S=>{const y=S.target.result;if(!y.objectStoreNames.contains(r)){const v=y.createObjectStore(r,{keyPath:a});for(const k of o)v.createIndex(k.name,k.keyPath,{unique:k.unique??!1})}}})}async function u(p,m){const g=await d();return new Promise((S,y)=>{const k=g.transaction(r,p).objectStore(r),E=m(k);E.onsuccess=()=>S(E.result),E.onerror=()=>y(E.error)})}async function f(p,m,g){const S=await d();return new Promise((y,v)=>{var F;const E=S.transaction(r,p).objectStore(r),w=[];let C=E,A="next";if((F=m.sort)!=null&&F.length){const P=m.sort[0].field,L=m.sort[0].direction;E.indexNames.contains(P)&&(C=E.index(P)),A=L==="desc"?"prev":"next"}const M=C.openCursor(null,A);let I=0,$=0;const T=m.skip??0,D=m.take??1/0;M.onsuccess=()=>{const P=M.result;if(!P||$>=D){y(w);return}const L=P.value;if(m.filter&&!h(L,m.filter)){P.continue();return}if(m.search&&!b(L,m.search,m.searchFields)){P.continue();return}if(I<T){I++,P.continue();return}w.push(L),$++,P.continue()},M.onerror=()=>v(M.error)})}function h(p,m){if(!m.items.length)return!0;const g=S=>{if(S.type==="group")return h(p,S);const y=p[S.field],v=S.value;switch(S.operator){case"=":return y==v;case"<>":return y!=v;case"<":return y<v;case"<=":return y<=v;case">":return y>v;case">=":return y>=v;case"contains":return String(y??"").toLowerCase().includes(String(v??"").toLowerCase());case"notcontains":return!String(y??"").toLowerCase().includes(String(v??"").toLowerCase());case"startswith":return String(y??"").toLowerCase().startsWith(String(v??"").toLowerCase());case"endswith":return String(y??"").toLowerCase().endsWith(String(v??"").toLowerCase());case"isblank":return y==null||y==="";case"isnotblank":return y!=null&&y!=="";default:return!0}};return m.logic==="and"?m.items.every(g):m.items.some(g)}function b(p,m,g){const S=m.toLowerCase();return(g?g.map(v=>p[v]):Object.values(p)).some(v=>String(v??"").toLowerCase().includes(S))}return{keyField:a,writable:!0,async load(p={}){var m;c("loading",!0);try{const g=await f("readonly",p,()=>{});(m=p.sort)!=null&&m.length&&g.sort((v,k)=>{for(const E of p.sort){const w=v[E.field]??"",C=k[E.field]??"",A=typeof w=="number"&&typeof C=="number"?w-C:String(w).localeCompare(String(C));if(A!==0)return E.direction==="desc"?-A:A}return 0});const S=await this.count(),y={data:g,totalCount:S};return c("loaded",y),c("loading",!1),y}catch(g){throw c("error",g),c("loading",!1),g}},async byKey(p){return u("readonly",m=>m.get(p))},async insert(p){return await u("readwrite",m=>m.add(p)),c("changed"),p},async update(p,m){const g=await this.byKey(p);if(!g)throw new Error(`Record not found: ${p}`);const S={...g,...m};return await u("readwrite",y=>y.put(S)),c("changed"),S},async remove(p){await u("readwrite",m=>m.delete(p)),c("changed")},on(p,m){return i.has(p)||i.set(p,new Set),i.get(p).add(m),()=>{var g;return(g=i.get(p))==null?void 0:g.delete(m)}},async clear(){await u("readwrite",p=>p.clear()),c("changed")},async count(){return u("readonly",p=>p.count())},async getAll(){return u("readonly",p=>p.getAll())},async bulkInsert(p){const m=await d();return new Promise((g,S)=>{const y=m.transaction(r,"readwrite"),v=y.objectStore(r);for(const k of p)v.put(k);y.oncomplete=()=>{c("changed"),g()},y.onerror=()=>S(y.error)})},async bulkDelete(p){const m=await d();return new Promise((g,S)=>{const y=m.transaction(r,"readwrite"),v=y.objectStore(r);for(const k of p)v.delete(k);y.oncomplete=()=>{c("changed"),g()},y.onerror=()=>S(y.error)})},async exportData(){return this.getAll()},async importData(p){await this.clear(),await this.bulkInsert(p)}}}function Td(e){const{remoteSource:t,offlineConfig:r,syncStrategy:a="remote-first",onConflict:n,onSync:o,autoSyncInterval:s=0}=e,i=r.keyField??t.keyField,c=ft({...r,keyField:i}),d=ft({dbName:r.dbName,storeName:`${r.storeName}_pending`,keyField:"id"});let u=navigator.onLine,f=0;const h=new Map;function b(g,...S){var y;(y=h.get(g))==null||y.forEach(v=>v(...S))}window.addEventListener("online",()=>{u=!0,b("online"),m()}),window.addEventListener("offline",()=>{u=!1,b("offline")});async function p(g,S,y){const v={id:`pending_${++f}_${Date.now()}`,action:g,key:S,data:y,timestamp:Date.now(),retries:0};await d.insert(v)}async function m(){if(u){b("syncing",!0);try{let g=0,S=0,y=0;const v=await d.load();for(const k of v.data)try{switch(k.action){case"insert":await t.insert(k.data),g++;break;case"update":await t.update(k.key,k.data),S++;break;case"remove":await t.remove(k.key),y++;break}await d.remove(k.id)}catch{k.retries<3&&await d.update(k.id,{retries:k.retries+1})}if(a!=="local-first"){const k=await t.load();if(a==="remote-first")await c.importData(k.data);else if(a==="merge"&&n){const E=await c.load(),w=new Map(E.data.map(A=>[A[i],A])),C=[];for(const A of k.data){const M=w.get(A[i]);M?C.push(n(M,A)):C.push(A)}await c.importData(C)}}b("synced",{added:g,updated:S,removed:y}),o==null||o({added:g,updated:S,removed:y})}catch(g){b("syncError",g)}finally{b("syncing",!1)}}}return s>0&&window.setInterval(m,s),{keyField:i,writable:!0,async load(g={}){if(u&&a==="remote-first")try{const S=await t.load(g);return await c.bulkInsert(S.data),S}catch{}return c.load(g)},async byKey(g){if(u)try{const S=await t.byKey(g);return S&&await c.update(g,S).catch(()=>c.insert(S)),S}catch{}return c.byKey(g)},async insert(g){const S=await c.insert(g);if(u)try{return await t.insert(g)}catch{await p("insert",void 0,g)}else await p("insert",void 0,g);return b("changed"),S},async update(g,S){const y=await c.update(g,S);if(u)try{return await t.update(g,S)}catch{await p("update",g,S)}else await p("update",g,S);return b("changed"),y},async remove(g){if(await c.remove(g),u)try{await t.remove(g)}catch{await p("remove",g)}else await p("remove",g);b("changed")},on(g,S){return h.has(g)||h.set(g,new Set),h.get(g).add(S),()=>{var y;return(y=h.get(g))==null?void 0:y.delete(S)}},sync:m,isOnline:()=>u,async getPendingChanges(){return(await d.load()).data},async clearPendingChanges(){await d.clear()}}}function Id(e){const{channelName:t,source:r}=e,a=new BroadcastChannel(t),n=new Map;function o(i,...c){var d;(d=n.get(i))==null||d.forEach(u=>u(...c))}a.onmessage=i=>{const c=i.data;switch(c.type){case"insert":case"update":case"remove":o("changed"),o("crossTabChange",c);break;case"refresh":o("refresh");break;case"request-sync":r.load().then(d=>{a.postMessage({type:"sync-data",data:d.data})});break}};function s(i){a.postMessage(i)}return{...r,async insert(i){const c=await r.insert(i);return s({type:"insert",data:c}),c},async update(i,c){const d=await r.update(i,c);return s({type:"update",key:i,changes:c}),d},async remove(i){await r.remove(i),s({type:"remove",key:i})},on(i,c){n.has(i)||n.set(i,new Set),n.get(i).add(c);const d=r.on(i,c);return()=>{var u;(u=n.get(i))==null||u.delete(c),d()}},broadcast:s,requestSync(){s({type:"request-sync"})}}}function Rd(e={}){const{prefix:t="",persist:r={filter:!0,sort:!0,page:!0,search:!0},useHash:a=!1}=e;function n(){return a?new URLSearchParams(window.location.hash.slice(1)):new URLSearchParams(window.location.search)}function o(i){if(a)window.location.hash=i.toString();else{const c=new URL(window.location.href);c.search=i.toString(),window.history.replaceState({},"",c.toString())}}function s(i){return t?`${t}_${i}`:i}return{read(){const i=n(),c={};if(r.filter){const d=i.get(s("filter"));if(d)try{c.filter=JSON.parse(d)}catch{}}if(r.sort){const d=i.get(s("sort"));if(d)try{c.sort=JSON.parse(d)}catch{}}if(r.page){const d=i.get(s("skip")),u=i.get(s("take"));d&&(c.skip=parseInt(d,10)),u&&(c.take=parseInt(u,10))}if(r.search){const d=i.get(s("search"));d&&(c.search=d)}return c},write(i){const c=n();r.filter&&(i.filter&&i.filter.items.length>0?c.set(s("filter"),JSON.stringify(i.filter)):c.delete(s("filter"))),r.sort&&(i.sort&&i.sort.length>0?c.set(s("sort"),JSON.stringify(i.sort)):c.delete(s("sort"))),r.page&&(i.skip?c.set(s("skip"),String(i.skip)):c.delete(s("skip")),i.take?c.set(s("take"),String(i.take)):c.delete(s("take"))),r.search&&(i.search?c.set(s("search"),i.search):c.delete(s("search"))),o(c)},clear(){const i=n();i.delete(s("filter")),i.delete(s("sort")),i.delete(s("skip")),i.delete(s("take")),i.delete(s("search")),o(i)},toLoadOptions(){const i=this.read();return{filter:i.filter,sort:i.sort,skip:i.skip,take:i.take,search:i.search}}}}const Ld={async exportToJSON(e,t){const r=await e.load(),a={version:"1.0",timestamp:Date.now(),data:r.data,metadata:t};return JSON.stringify(a,null,2)},async importFromJSON(e,t,r={}){const n=JSON.parse(t).data;let o=0,s=0;r.replace&&"clear"in e&&await e.clear();for(const i of n){if(r.validate&&!r.validate(i)){s++;continue}try{await e.insert(i),o++}catch{s++}}return{imported:o,skipped:s}},async downloadAsJSON(e,t="export.json"){const r=await this.exportToJSON(e),a=new Blob([r],{type:"application/json"}),n=URL.createObjectURL(a),o=document.createElement("a");o.href=n,o.download=t,o.click(),URL.revokeObjectURL(n)},async importFromFile(e,t,r){const a=await t.text();return this.importFromJSON(e,a,r)}};function Fd(e="nice_user_prefs"){let t=null;function r(){if(t)return t;try{const n=localStorage.getItem(e);t=n?JSON.parse(n):{}}catch{t={}}return t}function a(n){t=n,localStorage.setItem(e,JSON.stringify(n))}return{get(n,o){return r()[n]??o},set(n,o){const s=r();s[n]=o,a(s)},remove(n){const o=r();delete o[n],a(o)},getAll(){return{...r()}},setAll(n){a(n)},clear(){t={},localStorage.removeItem(e)},merge(n){a({...r(),...n})}}}const Dd=["https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600&display=swap","https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Archivo+Black&family=Archivo:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&family=Rajdhani:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Work+Sans:wght@400;500;600&display=swap","https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&family=Nunito:wght@400;600;700;800&display=swap","https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;600&display=swap","https://fonts.googleapis.com/css2?family=Libre+Caslon+Text:wght@400;700&family=DM+Sans:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap"],Pd={space1:"2px",space2:"4px",space3:"8px",space4:"12px",space5:"16px",space6:"20px",space8:"28px"},ae={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},Pt={space1:"6px",space2:"12px",space3:"16px",space4:"24px",space5:"32px",space6:"40px",space8:"56px"},To={meta:{id:"obsidianEditorial",name:"Obsidian Editorial",tagline:"Dark-mode magazine — serif display, razor borders, grain.",tags:["dark","editorial","serif"]},theme:{name:"Obsidian Editorial",darkMode:"dark",colors:{primary:"#e8dcc4",primaryHover:"#d4c29c",success:"#7fb069",warning:"#e6aa68",error:"#d65a5a",info:"#88aabb",accent:"#c98a5b",focus:"#e8dcc4",surface:"#1a1715",surfaceHover:"#221e1b"},backgrounds:{primary:"#0e0c0b",secondary:"#1a1715",tertiary:"#221e1b",hover:"#2a2522",elevated:"#1a1715",inset:"#0b0908",canvas:"#0e0c0b"},text:{primary:"#ede4d1",secondary:"#a39787",muted:"#6b6055",inverse:"#0e0c0b"},borders:{color:"#332d28",radiusSm:"0",radiusMd:"1px",radiusLg:"2px",radiusXl:"3px",radiusFull:"9999px",width:"1px",divider:"#28231f"},shadows:{sm:"none",md:"0 1px 0 0 rgba(232,220,196,0.04)",lg:"0 2px 0 0 rgba(232,220,196,0.06)",xl:"0 4px 0 0 rgba(232,220,196,0.08)"},spacing:Pt,typography:{fontFamily:"'Inter', -apple-system, sans-serif",headingFontFamily:"'Fraunces', 'Playfair Display', Georgia, serif",monoFontFamily:"'JetBrains Mono', ui-monospace, monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.375rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.65,letterSpacing:"0.005em",headingLetterSpacing:"-0.02em"},transitions:{fast:"80ms cubic-bezier(0.4,0,0.2,1)",normal:"140ms cubic-bezier(0.4,0,0.2,1)",slow:"220ms cubic-bezier(0.4,0,0.2,1)"},backgroundImage:{type:"pattern",pattern:"noise",opacity:.35,blendMode:"overlay"}},displayStyle:"editorial",variantConfig:{density:"comfortable",animation:"subtle"}},Io={meta:{id:"neonArcade",name:"Neon Arcade",tagline:"Phosphor-green terminal glow on absolute black.",tags:["dark","retro","mono","terminal"]},theme:{name:"Neon Arcade",darkMode:"dark",colors:{primary:"#39ff14",primaryHover:"#50ff35",success:"#39ff14",warning:"#ffcc00",error:"#ff3355",info:"#00e5ff",accent:"#ff00aa",focus:"#39ff14",surface:"#060a06",surfaceHover:"#0b140b"},backgrounds:{primary:"#000000",secondary:"#060a06",tertiary:"#0b140b",hover:"#12241a",elevated:"#060a06",inset:"#000000",canvas:"#000000"},text:{primary:"#c8ffb8",secondary:"#7be368",muted:"#3e7a39",inverse:"#000000"},borders:{color:"#1d3a1d",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"0",width:"1px",divider:"#143014",focusColor:"#39ff14"},shadows:{sm:"0 0 4px rgba(57,255,20,0.3)",md:"0 0 10px rgba(57,255,20,0.35), 0 0 2px rgba(57,255,20,0.6)",lg:"0 0 22px rgba(57,255,20,0.4), 0 0 4px rgba(57,255,20,0.7)",xl:"0 0 40px rgba(57,255,20,0.5), 0 0 8px rgba(57,255,20,0.8)",glow:"0 0 30px #39ff14, 0 0 60px rgba(57,255,20,0.4)"},spacing:ae,typography:{fontFamily:"'JetBrains Mono', 'Fira Code', ui-monospace, monospace",headingFontFamily:"'JetBrains Mono', monospace",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.25rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:700,fontWeightBold:700,lineHeight:1.5,letterSpacing:"0.02em",headingLetterSpacing:"0.08em"},transitions:{fast:"60ms steps(4, end)",normal:"120ms steps(6, end)",slow:"200ms steps(8, end)"},backgroundImage:{type:"pattern",pattern:"grid",opacity:.25}},displayStyle:"terminal",variantConfig:{radius:"none",shadow:"glow",density:"compact",animation:"subtle"}},Ro={meta:{id:"hyggeScandinavian",name:"Hygge Scandinavian",tagline:"Warm cream, generous breathing room, soft serif display.",tags:["light","warm","serif","spacious"]},theme:{name:"Hygge Scandinavian",darkMode:"light",colors:{primary:"#8b6f47",primaryHover:"#6f5738",success:"#6b8e4e",warning:"#d49a3e",error:"#b84c4c",info:"#6a8aad",accent:"#c98754",focus:"#8b6f47",surface:"#fbf6ed",surfaceHover:"#f3ecdf"},backgrounds:{primary:"#fdf9f1",secondary:"#f5eee0",tertiary:"#ede3d0",hover:"#e8ddc8",elevated:"#ffffff",inset:"#f0e7d4",canvas:"#fdf9f1"},text:{primary:"#3a2f22",secondary:"#6a5845",muted:"#9c8c76",inverse:"#fdf9f1"},borders:{color:"#d9cbb0",radiusSm:"8px",radiusMd:"14px",radiusLg:"22px",radiusXl:"32px",radiusFull:"9999px",width:"1px",divider:"#e8ddc8"},shadows:{sm:"0 1px 2px rgba(122,92,58,0.05)",md:"0 6px 16px -4px rgba(122,92,58,0.08)",lg:"0 16px 32px -10px rgba(122,92,58,0.10)",xl:"0 28px 56px -18px rgba(122,92,58,0.14)"},spacing:Pt,typography:{fontFamily:"'Work Sans', -apple-system, sans-serif",headingFontFamily:"'Cormorant Garamond', Georgia, serif",monoFontFamily:"ui-monospace, 'SF Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.7,letterSpacing:"0",headingLetterSpacing:"-0.01em"},transitions:{fast:"160ms cubic-bezier(0.16,1,0.3,1)",normal:"260ms cubic-bezier(0.16,1,0.3,1)",slow:"400ms cubic-bezier(0.16,1,0.3,1)"}},displayStyle:"scandinavian",variantConfig:{density:"spacious",animation:"normal"}},Lo={meta:{id:"brutalistRaw",name:"Brutalist Raw",tagline:"Paper + ink + hard shadows — zero blur, zero mercy.",tags:["light","brutalist","experimental"]},theme:{name:"Brutalist Raw",darkMode:"light",colors:{primary:"#ff3b30",primaryHover:"#000000",success:"#00aa55",warning:"#ffcc00",error:"#ff0000",info:"#0066ff",accent:"#ffcc00",focus:"#ff3b30",surface:"#ffffff",surfaceHover:"#f5f3ee"},backgrounds:{primary:"#f5f3ee",secondary:"#ffffff",tertiary:"#e8e4d8",hover:"#e0dcd0",elevated:"#ffffff",inset:"#e8e4d8",canvas:"#f5f3ee"},text:{primary:"#000000",secondary:"#1a1a1a",muted:"#555555",inverse:"#ffffff"},borders:{color:"#000000",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"0",width:"2px",divider:"#000000"},shadows:{sm:"3px 3px 0 0 #000000",md:"6px 6px 0 0 #000000",lg:"10px 10px 0 0 #000000",xl:"14px 14px 0 0 #000000"},spacing:ae,typography:{fontFamily:"'Archivo', -apple-system, sans-serif",headingFontFamily:"'Archivo Black', 'Archivo', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.75rem",fontWeightNormal:500,fontWeightMedium:700,fontWeightSemibold:700,fontWeightBold:900,lineHeight:1.4,letterSpacing:"-0.01em",headingLetterSpacing:"-0.04em"},transitions:{fast:"0ms linear",normal:"80ms cubic-bezier(0.2,0,0,1)",slow:"140ms cubic-bezier(0.2,0,0,1)"}},displayStyle:"brutalist",variantConfig:{radius:"none",shadow:"lg",density:"normal",animation:"subtle"}},Fo={meta:{id:"glassAurora",name:"Glass Aurora",tagline:"Frosted translucency floating over aurora light.",tags:["light","glass","modern","gradient"]},theme:{name:"Glass Aurora",darkMode:"light",colors:{primary:"#5b5bff",primaryHover:"#4343e8",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4",accent:"#ec4899",focus:"#5b5bff",surface:"rgba(255,255,255,0.55)",surfaceHover:"rgba(255,255,255,0.75)"},backgrounds:{primary:"rgba(255,255,255,0.55)",secondary:"rgba(255,255,255,0.35)",tertiary:"rgba(255,255,255,0.22)",hover:"rgba(255,255,255,0.7)",elevated:"rgba(255,255,255,0.8)",inset:"rgba(255,255,255,0.3)",canvas:"#e8d6ff"},text:{primary:"#1a1440",secondary:"#443c78",muted:"#8b83b8",inverse:"#ffffff"},borders:{color:"rgba(255,255,255,0.6)",radiusSm:"10px",radiusMd:"16px",radiusLg:"24px",radiusXl:"36px",radiusFull:"9999px",width:"1px",divider:"rgba(255,255,255,0.4)"},shadows:{sm:"0 2px 12px rgba(91,91,255,0.08)",md:"0 8px 32px rgba(91,91,255,0.12)",lg:"0 18px 56px rgba(236,72,153,0.18)",xl:"0 32px 80px rgba(91,91,255,0.22)"},spacing:ae,typography:{fontFamily:"'Outfit', -apple-system, sans-serif",headingFontFamily:"'Outfit', sans-serif",monoFontFamily:"ui-monospace, monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.375rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.55,letterSpacing:"-0.005em",headingLetterSpacing:"-0.025em"},transitions:{fast:"140ms cubic-bezier(0.4,0,0.2,1)",normal:"240ms cubic-bezier(0.4,0,0.2,1)",slow:"400ms cubic-bezier(0.4,0,0.2,1)"},backgroundImage:{type:"gradient",gradient:"radial-gradient(at 12% 18%, #ffd6e8 0%, transparent 48%), radial-gradient(at 88% 22%, #c8d8ff 0%, transparent 52%), radial-gradient(at 42% 86%, #d8ffe8 0%, transparent 50%), linear-gradient(180deg, #eee4ff 0%, #ffe8f2 100%)"}},displayStyle:"glass",variantConfig:{density:"normal",animation:"normal"}},Do={meta:{id:"candyPop",name:"Candy Pop",tagline:"Bubblegum pastels, pill shapes, bouncy easing.",tags:["light","playful","pastel","pill"]},theme:{name:"Candy Pop",darkMode:"light",colors:{primary:"#ff4fa3",primaryHover:"#ff2d8e",success:"#3dd68c",warning:"#ffd63d",error:"#ff5577",info:"#4ec8ff",accent:"#b85bff",focus:"#ff4fa3",surface:"#ffffff",surfaceHover:"#fff5fa"},backgrounds:{primary:"#fff5fa",secondary:"#ffeaf3",tertiary:"#ffd8e9",hover:"#ffc4dc",elevated:"#ffffff",inset:"#ffeaf3",canvas:"#fff8f5"},text:{primary:"#531645",secondary:"#8b3a70",muted:"#c678a8",inverse:"#ffffff"},borders:{color:"#ffc4dc",radiusSm:"9999px",radiusMd:"9999px",radiusLg:"9999px",radiusXl:"9999px",radiusFull:"9999px",width:"2px",divider:"#ffd8e9"},shadows:{sm:"0 2px 0 0 #ffc4dc",md:"0 4px 0 0 #ffa3c7",lg:"0 6px 16px rgba(255,79,163,0.2), 0 3px 0 0 #ff4fa3",xl:"0 12px 28px rgba(255,79,163,0.25)"},spacing:ae,typography:{fontFamily:"'Quicksand', -apple-system, sans-serif",headingFontFamily:"'Nunito', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.125rem",fontSizeXl:"1.5rem",fontWeightNormal:500,fontWeightMedium:600,fontWeightSemibold:700,fontWeightBold:800,lineHeight:1.55,letterSpacing:"0",headingLetterSpacing:"-0.01em"},transitions:{fast:"140ms cubic-bezier(0.34,1.56,0.64,1)",normal:"240ms cubic-bezier(0.34,1.56,0.64,1)",slow:"380ms cubic-bezier(0.34,1.56,0.64,1)"}},displayStyle:"pill",variantConfig:{radius:"full",density:"comfortable",animation:"playful"}},Po={meta:{id:"newspaperBroadsheet",name:"Newspaper Broadsheet",tagline:"Ivory paper, hairline rules, serif gravity.",tags:["light","editorial","serif","print"]},theme:{name:"Newspaper Broadsheet",darkMode:"light",colors:{primary:"#1a1a1a",primaryHover:"#000000",success:"#2d5016",warning:"#8b6914",error:"#8b0000",info:"#1d3a5f",accent:"#8b0000",focus:"#1a1a1a",surface:"#fbf7ee",surfaceHover:"#f3ecdd"},backgrounds:{primary:"#fbf7ee",secondary:"#f5eedb",tertiary:"#ede4cc",hover:"#e8ddbe",elevated:"#fbf7ee",inset:"#f0e7d0",canvas:"#fbf7ee"},text:{primary:"#14110c",secondary:"#3d362a",muted:"#7a6f58",inverse:"#fbf7ee"},borders:{color:"#14110c",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px",width:"1px",divider:"#14110c"},shadows:{sm:"none",md:"none",lg:"none",xl:"none"},spacing:ae,typography:{fontFamily:"'Fraunces', 'Source Serif Pro', Georgia, serif",headingFontFamily:"'Fraunces', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.65,letterSpacing:"0.01em",headingLetterSpacing:"-0.025em"},transitions:{fast:"0ms",normal:"100ms linear",slow:"180ms linear"},backgroundImage:{type:"pattern",pattern:"noise",opacity:.18,blendMode:"multiply"}},displayStyle:"editorial",variantConfig:{radius:"none",shadow:"none",density:"normal"}},zo={meta:{id:"synthwave84",name:"Synthwave 84",tagline:"Magenta & cyan pulse over deep navy — 1984 forever.",tags:["dark","retro","neon","80s"]},theme:{name:"Synthwave 84",darkMode:"dark",colors:{primary:"#ff3ca8",primaryHover:"#ff6bc1",success:"#72f1b8",warning:"#ffcc33",error:"#fe4450",info:"#36f9f6",accent:"#36f9f6",focus:"#ff3ca8",surface:"#2a1a4f",surfaceHover:"#332260"},backgrounds:{primary:"#1a0933",secondary:"#241443",tertiary:"#2d1a52",hover:"#382266",elevated:"#2a1a4f",inset:"#120626",canvas:"#0e0524"},text:{primary:"#f5e8ff",secondary:"#c9a7ff",muted:"#8063b0",inverse:"#0e0524"},borders:{color:"#553388",radiusSm:"2px",radiusMd:"4px",radiusLg:"6px",radiusXl:"8px",radiusFull:"9999px",width:"1px",divider:"#3d2270",focusColor:"#36f9f6"},shadows:{sm:"0 0 8px rgba(255,60,168,0.4)",md:"0 0 18px rgba(255,60,168,0.45), 0 2px 0 0 #36f9f6",lg:"0 0 36px rgba(255,60,168,0.55), 0 4px 0 0 #36f9f6",xl:"0 0 60px rgba(255,60,168,0.6), 0 6px 0 0 #36f9f6",glow:"0 0 28px #ff3ca8, 0 0 56px rgba(255,60,168,0.5)"},spacing:ae,typography:{fontFamily:"'Rajdhani', -apple-system, sans-serif",headingFontFamily:"'Orbitron', 'Rajdhani', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:700,fontWeightBold:900,lineHeight:1.5,letterSpacing:"0.02em",headingLetterSpacing:"0.08em"},transitions:{fast:"120ms cubic-bezier(0.23,1,0.32,1)",normal:"200ms cubic-bezier(0.23,1,0.32,1)",slow:"360ms cubic-bezier(0.23,1,0.32,1)"},backgroundImage:{type:"gradient",gradient:"linear-gradient(180deg, #0e0524 0%, #1a0933 55%, #2d1a52 100%), repeating-linear-gradient(0deg, rgba(54,249,246,0.04) 0 1px, transparent 1px 3px)"}},displayStyle:"synthwave",variantConfig:{shadow:"glow",animation:"dramatic",density:"normal"}},$o={meta:{id:"zenMinimal",name:"Zen Minimal",tagline:"Whisper-light type, hairlines, oceans of whitespace.",tags:["light","minimal","airy"]},theme:{name:"Zen Minimal",darkMode:"light",colors:{primary:"#0a0a0a",primaryHover:"#262626",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#2563eb",accent:"#737373",focus:"#0a0a0a",surface:"#ffffff",surfaceHover:"#fafafa"},backgrounds:{primary:"#ffffff",secondary:"#fafafa",tertiary:"#f5f5f5",hover:"#f0f0f0",elevated:"#ffffff",inset:"#fafafa",canvas:"#ffffff"},text:{primary:"#171717",secondary:"#525252",muted:"#a3a3a3",inverse:"#ffffff"},borders:{color:"#ededed",radiusSm:"2px",radiusMd:"3px",radiusLg:"4px",radiusXl:"6px",radiusFull:"9999px",width:"1px",divider:"#f0f0f0"},shadows:{sm:"none",md:"0 0 0 1px rgba(0,0,0,0.04)",lg:"0 1px 2px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.05)",xl:"0 4px 8px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.06)"},spacing:Pt,typography:{fontFamily:"'Manrope', -apple-system, sans-serif",headingFontFamily:"'Manrope', sans-serif",monoFontFamily:"ui-monospace, monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.25rem",fontWeightNormal:300,fontWeightMedium:400,fontWeightSemibold:500,fontWeightBold:600,lineHeight:1.6,letterSpacing:"-0.005em",headingLetterSpacing:"-0.03em"},transitions:{fast:"100ms ease",normal:"180ms ease",slow:"280ms ease"}},displayStyle:"minimal",variantConfig:{density:"spacious",animation:"subtle"}},Ho={meta:{id:"claymorphism",name:"Claymorphism",tagline:"Soft-clay 3D surfaces — pressable, friendly, tactile.",tags:["light","playful","neumorphic","3d"]},theme:{name:"Claymorphism",darkMode:"light",colors:{primary:"#8b7ef5",primaryHover:"#7469ec",success:"#6ed6a5",warning:"#ffc771",error:"#ff8b8b",info:"#7ec4f5",accent:"#ffb3d9",focus:"#8b7ef5",surface:"#f3efff",surfaceHover:"#ebe4ff"},backgrounds:{primary:"#f6f0ff",secondary:"#ede4ff",tertiary:"#dfd3fc",hover:"#d3c5fa",elevated:"#ffffff",inset:"#e5daff",canvas:"#f6f0ff"},text:{primary:"#2a1f5e",secondary:"#584a8e",muted:"#9388bd",inverse:"#ffffff"},borders:{color:"rgba(139,126,245,0.15)",radiusSm:"14px",radiusMd:"22px",radiusLg:"32px",radiusXl:"48px",radiusFull:"9999px",width:"0px",divider:"rgba(139,126,245,0.12)"},shadows:{sm:"-3px -3px 6px rgba(255,255,255,0.8), 3px 3px 8px rgba(139,126,245,0.18), inset 0 0 0 rgba(255,255,255,0)",md:"-5px -5px 12px rgba(255,255,255,0.9), 6px 6px 18px rgba(139,126,245,0.22), inset 1px 1px 1px rgba(255,255,255,0.6)",lg:"-8px -8px 20px rgba(255,255,255,0.95), 10px 10px 32px rgba(139,126,245,0.28), inset 2px 2px 2px rgba(255,255,255,0.7)",xl:"-14px -14px 32px rgba(255,255,255,1), 16px 16px 48px rgba(139,126,245,0.34), inset 3px 3px 4px rgba(255,255,255,0.8)",inner:"inset 4px 4px 10px rgba(139,126,245,0.2), inset -4px -4px 10px rgba(255,255,255,0.9)"},spacing:ae,typography:{fontFamily:"'Nunito', -apple-system, sans-serif",headingFontFamily:"'Nunito', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.375rem",fontWeightNormal:500,fontWeightMedium:600,fontWeightSemibold:700,fontWeightBold:800,lineHeight:1.55,letterSpacing:"0",headingLetterSpacing:"-0.015em"},transitions:{fast:"160ms cubic-bezier(0.4,0,0.2,1.4)",normal:"260ms cubic-bezier(0.4,0,0.2,1.4)",slow:"400ms cubic-bezier(0.4,0,0.2,1.4)"}},displayStyle:"neumorphic",variantConfig:{radius:"2xl",density:"comfortable",animation:"normal"}},_o={meta:{id:"bauhaus",name:"Bauhaus",tagline:"Primary palette, geometric rigour, grid as foundation.",tags:["light","geometric","primary","design"]},theme:{name:"Bauhaus",darkMode:"light",colors:{primary:"#d62828",primaryHover:"#a81e1e",success:"#2a9d8f",warning:"#fcbf49",error:"#d62828",info:"#1d4e89",accent:"#fcbf49",focus:"#1d4e89",surface:"#faf5e8",surfaceHover:"#f2ead3"},backgrounds:{primary:"#faf5e8",secondary:"#f5ecd3",tertiary:"#ede0be",hover:"#e5d5a8",elevated:"#ffffff",inset:"#f0e3c0",canvas:"#faf5e8"},text:{primary:"#1a1a1a",secondary:"#3d3d3d",muted:"#7a7a7a",inverse:"#faf5e8"},borders:{color:"#1a1a1a",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px",width:"3px",divider:"#1a1a1a"},shadows:{sm:"0 2px 0 0 #1a1a1a",md:"4px 4px 0 0 #1a1a1a",lg:"6px 6px 0 0 #1d4e89",xl:"8px 8px 0 0 #d62828"},spacing:ae,typography:{fontFamily:"'Archivo', -apple-system, sans-serif",headingFontFamily:"'Archivo Black', 'Archivo', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.75rem",fontWeightNormal:500,fontWeightMedium:700,fontWeightSemibold:800,fontWeightBold:900,lineHeight:1.4,letterSpacing:"0",headingLetterSpacing:"-0.02em"},transitions:{fast:"60ms linear",normal:"120ms linear",slow:"200ms linear"},backgroundImage:{type:"pattern",pattern:"grid",opacity:.35}},displayStyle:"bauhaus",variantConfig:{radius:"none",shadow:"md",density:"normal",animation:"subtle"}},Oo={meta:{id:"bankVault",name:"Bank Vault",tagline:"Navy, gilt accents, serif gravitas — trusted by institutions.",tags:["light","corporate","serif","conservative"]},theme:{name:"Bank Vault",darkMode:"light",colors:{primary:"#0b2545",primaryHover:"#163969",success:"#2d6a4f",warning:"#b08d2e",error:"#8b1a1a",info:"#1d4e89",accent:"#b08d2e",focus:"#0b2545",surface:"#ffffff",surfaceHover:"#f7f4ec"},backgrounds:{primary:"#fbfaf6",secondary:"#f4f0e4",tertiary:"#ebe5d2",hover:"#e3dcc4",elevated:"#ffffff",inset:"#efeadb",canvas:"#fbfaf6"},text:{primary:"#0b2545",secondary:"#3a4b65",muted:"#7a8399",inverse:"#fbfaf6"},borders:{color:"#c9bfa3",radiusSm:"1px",radiusMd:"2px",radiusLg:"3px",radiusXl:"4px",radiusFull:"9999px",width:"1px",divider:"#d4c9a8"},shadows:{sm:"0 1px 0 0 rgba(11,37,69,0.08)",md:"0 1px 3px rgba(11,37,69,0.08), 0 0 0 1px rgba(176,141,46,0.12)",lg:"0 4px 10px rgba(11,37,69,0.1)",xl:"0 12px 24px rgba(11,37,69,0.12)"},spacing:Pd,typography:{fontFamily:"'DM Sans', -apple-system, sans-serif",headingFontFamily:"'Libre Caslon Text', 'DM Serif Display', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.25rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.55,letterSpacing:"0.005em",headingLetterSpacing:"-0.01em"},transitions:{fast:"90ms cubic-bezier(0.4,0,0.2,1)",normal:"160ms cubic-bezier(0.4,0,0.2,1)",slow:"260ms cubic-bezier(0.4,0,0.2,1)"}},displayStyle:"bank",variantConfig:{radius:"sm",shadow:"subtle",density:"compact",animation:"none"}},zt={obsidianEditorial:To,neonArcade:Io,hyggeScandinavian:Ro,brutalistRaw:Lo,glassAurora:Fo,candyPop:Do,newspaperBroadsheet:Po,synthwave84:zo,zenMinimal:$o,claymorphism:Ho,bauhaus:_o,bankVault:Oo},Bo=Object.values(zt);function zd(e){return zt[e]}function $d(e){return Bo.filter(t=>t.meta.tags.includes(e))}const Hd=["https://fonts.googleapis.com/css2?family=Spectral:wght@300;400;500;600;700&family=Lora:wght@400;500;600;700&display=swap","https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@300;400;500;700&family=Noto+Sans+JP:wght@300;400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Cairo:wght@400;500;600;700&display=swap","https://fonts.googleapis.com/css2?family=Poiret+One&family=Cormorant+Garamond:wght@300;400;500;600&display=swap","https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Roboto+Condensed:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Space+Grotesk:wght@400;500;600;700&display=swap","https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Space+Mono:wght@400;700&display=swap","https://fonts.googleapis.com/css2?family=VT323&display=swap","https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&family=Special+Elite&display=swap","https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&display=swap","https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800;900&display=swap","https://fonts.googleapis.com/css2?family=Bangers&display=swap","https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap","https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Rubik+Mono+One&family=Rubik:wght@400;500;700;800&display=swap"],jo={space1:"2px",space2:"4px",space3:"8px",space4:"12px",space5:"16px",space6:"20px",space8:"28px"},U={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},Me={space1:"6px",space2:"12px",space3:"16px",space4:"24px",space5:"32px",space6:"40px",space8:"56px"},Ye={space1:"8px",space2:"16px",space3:"24px",space4:"32px",space5:"44px",space6:"56px",space8:"80px"},Wo={meta:{id:"forestCanopy",name:"Forest Canopy",tagline:"Moss on bark, dappled light — organic radii, earth serif.",tags:["light","nature","serif","organic"]},theme:{name:"Forest Canopy",darkMode:"light",recommendedDisplayStyle:"scandinavian",colors:{primary:"#3d5a40",primaryHover:"#2d4430",success:"#4a7c3a",warning:"#c88d3e",error:"#a63c3c",info:"#5a7c8a",accent:"#8ba878",focus:"#3d5a40",surface:"#f4f1e8",surfaceHover:"#ebe7d5"},backgrounds:{primary:"#f7f4e9",secondary:"#ede8d4",tertiary:"#dfd8be",hover:"#d5cdae",elevated:"#fcfaf1",inset:"#e5ddc5",canvas:"#f0ece0"},text:{primary:"#1e2a1c",secondary:"#3d4a36",muted:"#7a8570",inverse:"#f7f4e9"},borders:{color:"#c4bda0",width:"1px",divider:"#d8d0b5",radiusSm:"3px",radiusMd:"7px",radiusLg:"14px",radiusXl:"22px",radiusFull:"9999px"},shadows:{sm:"0 1px 2px rgba(61,90,64,0.06)",md:"0 4px 12px -2px rgba(61,90,64,0.12), 0 2px 4px rgba(61,90,64,0.05)",lg:"0 10px 24px -6px rgba(61,90,64,0.16)",xl:"0 20px 40px -12px rgba(61,90,64,0.22)"},spacing:Me,typography:{fontFamily:"'Lora', Georgia, serif",headingFontFamily:"'Spectral', 'Lora', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.625rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.7,letterSpacing:"0",headingLetterSpacing:"-0.01em"},transitions:{fast:"180ms cubic-bezier(0.16,1,0.3,1)",normal:"280ms cubic-bezier(0.16,1,0.3,1)",slow:"420ms cubic-bezier(0.16,1,0.3,1)"},backgroundImage:{type:"pattern",pattern:"dots",opacity:.25}},displayStyle:"scandinavian",variantConfig:{density:"spacious",animation:"normal"}},Vo={meta:{id:"desertDune",name:"Desert Dune",tagline:"Ochre horizons, warm grain, serif that suns itself.",tags:["light","nature","serif","warm"]},theme:{name:"Desert Dune",darkMode:"light",recommendedDisplayStyle:"softCloud",colors:{primary:"#c8732f",primaryHover:"#a65a1c",success:"#7a8c3a",warning:"#e0a83a",error:"#b34747",info:"#7a8fa6",accent:"#e8a863",focus:"#c8732f",surface:"#fbf3e5",surfaceHover:"#f4e8d0"},backgrounds:{primary:"#fdf7ea",secondary:"#f6ebd3",tertiary:"#eeddb6",hover:"#e5cfa0",elevated:"#ffffff",inset:"#f0dfb8",canvas:"#fdf5e6"},text:{primary:"#3a2413",secondary:"#6b4823",muted:"#a88860",inverse:"#fdf7ea"},borders:{color:"#dcc08c",width:"1px",divider:"#e8d0a5",radiusSm:"12px",radiusMd:"18px",radiusLg:"28px",radiusXl:"40px",radiusFull:"9999px"},shadows:{sm:"0 2px 6px -2px rgba(200,115,47,0.1)",md:"0 8px 20px -6px rgba(200,115,47,0.15)",lg:"0 18px 36px -10px rgba(200,115,47,0.2)",xl:"0 32px 56px -18px rgba(200,115,47,0.28)"},spacing:Me,typography:{fontFamily:"'DM Sans', -apple-system, sans-serif",headingFontFamily:"'DM Serif Display', Georgia, serif",monoFontFamily:"'Space Mono', ui-monospace, monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.75rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.65,letterSpacing:"0",headingLetterSpacing:"-0.025em"},transitions:{fast:"160ms ease-out",normal:"280ms cubic-bezier(0.22,1,0.36,1)",slow:"460ms cubic-bezier(0.22,1,0.36,1)"},backgroundImage:{type:"gradient",gradient:"linear-gradient(175deg, #fbecc5 0%, #f6ddaf 40%, #eec28a 100%), radial-gradient(ellipse at 80% 10%, #fff4d9 0%, transparent 60%)"}},displayStyle:"softCloud",variantConfig:{radius:"xl",density:"comfortable",animation:"normal"}},Ko={meta:{id:"arcticCrystal",name:"Arctic Crystal",tagline:"Facets of ice, lean typography, surgical whitespace.",tags:["light","nature","minimal","cold"]},theme:{name:"Arctic Crystal",darkMode:"light",recommendedDisplayStyle:"minimal",colors:{primary:"#2a6a8c",primaryHover:"#1e5374",success:"#4a8a6a",warning:"#d0a040",error:"#c24848",info:"#5a9fc0",accent:"#a8d4e8",focus:"#2a6a8c",surface:"#ffffff",surfaceHover:"#f0f6fa"},backgrounds:{primary:"#f5fafd",secondary:"#eaf2f7",tertiary:"#d8e5ed",hover:"#cfdce6",elevated:"#ffffff",inset:"#e3eef5",canvas:"#f0f7fb"},text:{primary:"#0a2030",secondary:"#3a5468",muted:"#7a95a8",inverse:"#ffffff"},borders:{color:"#cfdde8",width:"1px",divider:"#e0ebf3",radiusSm:"2px",radiusMd:"3px",radiusLg:"4px",radiusXl:"6px",radiusFull:"9999px"},shadows:{sm:"1px 1px 0 rgba(42,106,140,0.06), -1px 0 0 rgba(42,106,140,0.04)",md:"2px 2px 0 rgba(42,106,140,0.08), -2px 0 0 rgba(42,106,140,0.04), 0 4px 8px -2px rgba(42,106,140,0.1)",lg:"4px 4px 0 rgba(42,106,140,0.1), 0 10px 16px -4px rgba(42,106,140,0.14)",xl:"0 24px 40px -12px rgba(42,106,140,0.2)"},spacing:Ye,typography:{fontFamily:"'Inter', -apple-system, sans-serif",headingFontFamily:"'Inter', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.375rem",fontWeightNormal:200,fontWeightMedium:300,fontWeightSemibold:500,fontWeightBold:600,lineHeight:1.6,letterSpacing:"0.01em",headingLetterSpacing:"-0.02em"},transitions:{fast:"90ms ease",normal:"160ms ease",slow:"260ms ease"}},displayStyle:"minimal",variantConfig:{radius:"sm",shadow:"subtle",density:"spacious",animation:"subtle"}},Uo={meta:{id:"autumnFoliage",name:"Autumn Foliage",tagline:"Ember glow, Fraunces serif, woodsmoke warmth.",tags:["light","nature","serif","warm"]},theme:{name:"Autumn Foliage",darkMode:"light",recommendedDisplayStyle:"editorial",colors:{primary:"#a83828",primaryHover:"#842818",success:"#6b7c2c",warning:"#c48020",error:"#8a2020",info:"#7a5a3a",accent:"#d89040",focus:"#a83828",surface:"#fbf1e3",surfaceHover:"#f2e4ce"},backgrounds:{primary:"#fdf5e8",secondary:"#f4e5cc",tertiary:"#e8d2aa",hover:"#dec295",elevated:"#fff9ee",inset:"#eedab5",canvas:"#faeed6"},text:{primary:"#2a140a",secondary:"#5a3020",muted:"#997860",inverse:"#fdf5e8"},borders:{color:"#d4b890",width:"1px",divider:"#e0c8a0",radiusSm:"4px",radiusMd:"8px",radiusLg:"14px",radiusXl:"22px",radiusFull:"9999px"},shadows:{sm:"0 1px 2px rgba(168,56,40,0.08)",md:"0 4px 10px -2px rgba(168,56,40,0.12), 0 2px 4px rgba(168,56,40,0.08)",lg:"0 12px 24px -6px rgba(168,56,40,0.18)",xl:"0 24px 48px -16px rgba(168,56,40,0.24)"},spacing:U,typography:{fontFamily:"'Work Sans', sans-serif",headingFontFamily:"'Fraunces', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.625rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.65,letterSpacing:"0.005em",headingLetterSpacing:"-0.02em"},transitions:{fast:"140ms ease",normal:"220ms ease",slow:"360ms ease"}},displayStyle:"editorial",variantConfig:{density:"comfortable",animation:"normal"}},Xo={meta:{id:"japaneseWashi",name:"Japanese Washi",tagline:"Sumi ink on cream — quiet serif, paper grain, zero excess.",tags:["light","cultural","serif","minimal"]},theme:{name:"Japanese Washi",darkMode:"light",recommendedDisplayStyle:"zen",colors:{primary:"#1d3557",primaryHover:"#0d2545",success:"#4a7042",warning:"#a8803e",error:"#8b2a2a",info:"#3a5a78",accent:"#c83a3a",focus:"#1d3557",surface:"#faf6ea",surfaceHover:"#f2ebd7"},backgrounds:{primary:"#fdf9ee",secondary:"#f5ecd5",tertiary:"#ecdfbd",hover:"#e4d5aa",elevated:"#ffffff",inset:"#f0e5c8",canvas:"#fbf6e7"},text:{primary:"#1a1610",secondary:"#3d352a",muted:"#8a7f64",inverse:"#fdf9ee"},borders:{color:"#1a1610",width:"1px",divider:"#d4c89e",radiusSm:"0",radiusMd:"1px",radiusLg:"2px",radiusXl:"3px",radiusFull:"9999px"},shadows:{sm:"none",md:"0 1px 0 0 rgba(26,22,16,0.08)",lg:"0 2px 0 0 rgba(26,22,16,0.1)",xl:"0 4px 12px rgba(26,22,16,0.08)"},spacing:Ye,typography:{fontFamily:"'Noto Sans JP', 'Inter', sans-serif",headingFontFamily:"'Noto Serif JP', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.375rem",fontWeightNormal:300,fontWeightMedium:400,fontWeightSemibold:500,fontWeightBold:700,lineHeight:1.75,letterSpacing:"0.02em",headingLetterSpacing:"0.01em"},transitions:{fast:"120ms ease",normal:"220ms ease",slow:"340ms ease"},backgroundImage:{type:"pattern",pattern:"noise",opacity:.22,blendMode:"multiply"}},displayStyle:"zen",variantConfig:{radius:"none",shadow:"none",density:"spacious",animation:"subtle"}},Go={meta:{id:"moroccanMosaic",name:"Moroccan Mosaic",tagline:"Zellige geometry — terracotta, teal, saffron in tiled rhythm.",tags:["light","cultural","geometric","warm"]},theme:{name:"Moroccan Mosaic",darkMode:"light",recommendedDisplayStyle:"bauhaus",colors:{primary:"#0f6b5c",primaryHover:"#0a5246",success:"#5a8a3a",warning:"#e0a03a",error:"#c2522a",info:"#3a7090",accent:"#e8a840",focus:"#0f6b5c",surface:"#f9f1dc",surfaceHover:"#f0e5c2"},backgrounds:{primary:"#fbf3e0",secondary:"#f2e4c2",tertiary:"#e6d2a0",hover:"#dac38a",elevated:"#fdf7e8",inset:"#ecd8b2",canvas:"#f8edd3"},text:{primary:"#2a1608",secondary:"#5a3a20",muted:"#a08860",inverse:"#fbf3e0"},borders:{color:"#2a1608",width:"2px",divider:"#b89868",radiusSm:"3px",radiusMd:"6px",radiusLg:"10px",radiusXl:"14px",radiusFull:"9999px"},shadows:{sm:"2px 2px 0 rgba(42,22,8,0.12)",md:"3px 3px 0 #0f6b5c, 6px 6px 0 rgba(42,22,8,0.08)",lg:"4px 4px 0 #0f6b5c, 8px 8px 0 #e8a840",xl:"6px 6px 0 #c2522a, 12px 12px 0 rgba(42,22,8,0.1)"},spacing:U,typography:{fontFamily:"'Cairo', 'Inter', sans-serif",headingFontFamily:"'Amiri', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.625rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.55,letterSpacing:"0",headingLetterSpacing:"-0.01em"},transitions:{fast:"120ms linear",normal:"200ms linear",slow:"320ms linear"},backgroundImage:{type:"pattern",pattern:"hexagons",opacity:.2}},displayStyle:"bauhaus",variantConfig:{radius:"sm",shadow:"md",density:"normal",animation:"subtle"}},qo={meta:{id:"artDecoGatsby",name:"Art Deco Gatsby",tagline:"Gold, emerald, onyx — geometric glamour, thin gilt lines.",tags:["dark","cultural","luxury","geometric"]},theme:{name:"Art Deco Gatsby",darkMode:"dark",recommendedDisplayStyle:"luxe",colors:{primary:"#d4af37",primaryHover:"#e8c850",success:"#4a9c7a",warning:"#e8c850",error:"#c24040",info:"#70a8c0",accent:"#1e5c4a",focus:"#d4af37",surface:"#0f1a16",surfaceHover:"#16251e"},backgrounds:{primary:"#0a0f0c",secondary:"#0f1a16",tertiary:"#16251e",hover:"#1c3028",elevated:"#0f1a16",inset:"#050908",canvas:"#080c0a"},text:{primary:"#f0e4c2",secondary:"#c0b080",muted:"#706448",inverse:"#0a0f0c"},borders:{color:"#6b5828",width:"1px",divider:"#4a3c18",focusColor:"#d4af37",radiusSm:"0",radiusMd:"1px",radiusLg:"2px",radiusXl:"3px",radiusFull:"9999px"},shadows:{sm:"0 0 0 1px rgba(212,175,55,0.15)",md:"0 2px 8px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,175,55,0.2)",lg:"0 8px 24px rgba(0,0,0,0.6), 0 0 0 1px rgba(212,175,55,0.3), inset 0 1px 0 rgba(212,175,55,0.1)",xl:"0 20px 48px rgba(0,0,0,0.7), 0 0 0 1px rgba(212,175,55,0.4)",glow:"0 0 16px rgba(212,175,55,0.3)"},spacing:Me,typography:{fontFamily:"'Cormorant Garamond', Georgia, serif",headingFontFamily:"'Poiret One', 'Cormorant Garamond', serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.75rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.6,letterSpacing:"0.04em",headingLetterSpacing:"0.12em"},transitions:{fast:"140ms cubic-bezier(0.4,0,0.2,1)",normal:"240ms cubic-bezier(0.4,0,0.2,1)",slow:"380ms cubic-bezier(0.4,0,0.2,1)"}},displayStyle:"luxe",variantConfig:{radius:"none",shadow:"lg",density:"comfortable",animation:"subtle"}},Yo={meta:{id:"sovietConstructivist",name:"Soviet Constructivist",tagline:"Rodchenko red — slab type, hard angles, propaganda poise.",tags:["light","cultural","brutalist","geometric"]},theme:{name:"Soviet Constructivist",darkMode:"light",recommendedDisplayStyle:"brutalist",colors:{primary:"#c41e1e",primaryHover:"#8a1414",success:"#3a6a3a",warning:"#d08028",error:"#8a1414",info:"#2a4060",accent:"#1a1a1a",focus:"#c41e1e",surface:"#f0ead8",surfaceHover:"#e5dcc0"},backgrounds:{primary:"#f4efde",secondary:"#e8dec4",tertiary:"#d8c9a4",hover:"#ccbb90",elevated:"#faf5e5",inset:"#dccda8",canvas:"#f0ead5"},text:{primary:"#1a1a1a",secondary:"#3d3d3d",muted:"#706d5a",inverse:"#f4efde"},borders:{color:"#1a1a1a",width:"3px",divider:"#1a1a1a",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px"},shadows:{sm:"4px 0 0 0 #c41e1e",md:"6px 6px 0 0 #1a1a1a, 8px 8px 0 0 #c41e1e",lg:"10px 10px 0 0 #c41e1e",xl:"12px -4px 0 0 #1a1a1a, 16px 0 0 0 #c41e1e"},spacing:U,typography:{fontFamily:"'Roboto Condensed', 'Archivo', sans-serif",headingFontFamily:"'Alfa Slab One', 'Archivo Black', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.875rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:700,fontWeightBold:700,lineHeight:1.35,letterSpacing:"0.02em",headingLetterSpacing:"-0.005em"},transitions:{fast:"0ms linear",normal:"80ms linear",slow:"160ms linear"}},displayStyle:"brutalist",variantConfig:{radius:"none",shadow:"lg",density:"normal",animation:"subtle"}},Jo={meta:{id:"blueprint",name:"Blueprint",tagline:"Cyanotype drafting — white lines, grid paper, technical mono.",tags:["dark","tech","technical","mono"]},theme:{name:"Blueprint",darkMode:"dark",recommendedDisplayStyle:"dashboard",colors:{primary:"#f0f4f8",primaryHover:"#ffffff",success:"#88e0b8",warning:"#ffcc66",error:"#ff8888",info:"#88c8ff",accent:"#6eb0e0",focus:"#ffffff",surface:"#18456a",surfaceHover:"#1f527e"},backgrounds:{primary:"#0e3356",secondary:"#124066",tertiary:"#184d79",hover:"#1e5a8c",elevated:"#18456a",inset:"#082540",canvas:"#0a2d4a"},text:{primary:"#f0f4f8",secondary:"#b5c8da",muted:"#6e8aa4",inverse:"#0e3356"},borders:{color:"#3870a0",width:"1px",divider:"#2a5680",focusColor:"#ffffff",radiusSm:"1px",radiusMd:"2px",radiusLg:"3px",radiusXl:"4px",radiusFull:"9999px"},shadows:{sm:"0 0 0 1px rgba(240,244,248,0.05)",md:"0 1px 0 0 rgba(240,244,248,0.1), 0 4px 8px rgba(0,0,0,0.3)",lg:"0 1px 0 0 rgba(240,244,248,0.14), 0 10px 20px rgba(0,0,0,0.4)",xl:"0 20px 40px rgba(0,0,0,0.5)"},spacing:U,typography:{fontFamily:"'IBM Plex Mono', ui-monospace, monospace",headingFontFamily:"'Space Grotesk', 'IBM Plex Sans', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.25rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5,letterSpacing:"0.02em",headingLetterSpacing:"-0.01em"},transitions:{fast:"80ms linear",normal:"140ms linear",slow:"220ms linear"},backgroundImage:{type:"pattern",pattern:"grid",opacity:.4}},displayStyle:"dashboard",variantConfig:{radius:"sm",shadow:"subtle",density:"compact",animation:"subtle"}},Qo={meta:{id:"hologramUI",name:"Hologram UI",tagline:"Iridescent light-leaks, translucent layers, futurist geometry.",tags:["dark","tech","glass","neon"]},theme:{name:"Hologram UI",darkMode:"dark",recommendedDisplayStyle:"cosmic",colors:{primary:"#8be9fd",primaryHover:"#a8f0ff",success:"#50fa7b",warning:"#f1fa8c",error:"#ff5555",info:"#bd93f9",accent:"#ff79c6",focus:"#8be9fd",surface:"rgba(40,30,70,0.5)",surfaceHover:"rgba(50,40,85,0.6)"},backgrounds:{primary:"rgba(30,20,55,0.6)",secondary:"rgba(40,30,70,0.5)",tertiary:"rgba(55,40,90,0.4)",hover:"rgba(65,50,105,0.55)",elevated:"rgba(50,38,82,0.7)",inset:"rgba(25,18,45,0.6)",canvas:"#0a0618"},text:{primary:"#f0e8ff",secondary:"#b0a0e0",muted:"#6a5a94",inverse:"#0a0618"},borders:{color:"rgba(139,233,253,0.25)",width:"1px",divider:"rgba(139,233,253,0.15)",focusColor:"#8be9fd",radiusSm:"4px",radiusMd:"8px",radiusLg:"14px",radiusXl:"20px",radiusFull:"9999px"},shadows:{sm:"0 0 12px rgba(139,233,253,0.2)",md:"0 4px 20px rgba(189,147,249,0.3), 0 0 1px rgba(139,233,253,0.4)",lg:"0 8px 40px rgba(255,121,198,0.35), 0 0 2px rgba(139,233,253,0.5), inset 0 1px 0 rgba(255,255,255,0.08)",xl:"0 20px 60px rgba(139,233,253,0.4), inset 0 1px 0 rgba(255,255,255,0.1)",glow:"0 0 32px rgba(139,233,253,0.6), 0 0 64px rgba(255,121,198,0.3)"},spacing:U,typography:{fontFamily:"'Rajdhani', -apple-system, sans-serif",headingFontFamily:"'Orbitron', 'Rajdhani', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5,letterSpacing:"0.02em",headingLetterSpacing:"0.06em"},transitions:{fast:"160ms cubic-bezier(0.4,0,0.2,1)",normal:"280ms cubic-bezier(0.4,0,0.2,1)",slow:"440ms cubic-bezier(0.4,0,0.2,1)"},backgroundImage:{type:"gradient",gradient:"radial-gradient(at 15% 20%, rgba(139,233,253,0.25) 0%, transparent 50%), radial-gradient(at 85% 25%, rgba(255,121,198,0.25) 0%, transparent 50%), radial-gradient(at 50% 90%, rgba(189,147,249,0.3) 0%, transparent 55%), linear-gradient(135deg, #0a0618 0%, #1a0e38 100%)"}},displayStyle:"cosmic",variantConfig:{shadow:"glow",density:"normal",animation:"normal"}},Zo={meta:{id:"deepSea",name:"Deep Sea",tagline:"Midnight blue abyss, bioluminescent accents in the dark.",tags:["dark","tech","organic"]},theme:{name:"Deep Sea",darkMode:"dark",recommendedDisplayStyle:"modern3d",colors:{primary:"#00d9c4",primaryHover:"#2feedc",success:"#5af0b0",warning:"#f0c858",error:"#ff6a82",info:"#60c0ff",accent:"#a878f0",focus:"#00d9c4",surface:"#0a1524",surfaceHover:"#0e1c30"},backgrounds:{primary:"#05101c",secondary:"#0a1524",tertiary:"#0f1f34",hover:"#163044",elevated:"#0e1c30",inset:"#030810",canvas:"#030810"},text:{primary:"#d8f0f5",secondary:"#88b8c8",muted:"#4a7080",inverse:"#030810"},borders:{color:"#183548",width:"1px",divider:"#0f2638",focusColor:"#00d9c4",radiusSm:"8px",radiusMd:"14px",radiusLg:"22px",radiusXl:"32px",radiusFull:"9999px"},shadows:{sm:"0 2px 8px rgba(0,217,196,0.08)",md:"0 6px 20px rgba(0,217,196,0.12), 0 2px 4px rgba(0,0,0,0.5)",lg:"0 14px 40px rgba(0,217,196,0.18), 0 4px 8px rgba(0,0,0,0.6)",xl:"0 28px 64px rgba(0,217,196,0.22), 0 8px 16px rgba(0,0,0,0.7)",glow:"0 0 24px rgba(0,217,196,0.5)"},spacing:U,typography:{fontFamily:"'IBM Plex Sans', -apple-system, sans-serif",headingFontFamily:"'IBM Plex Sans', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.375rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.6,letterSpacing:"0",headingLetterSpacing:"-0.02em"},transitions:{fast:"160ms cubic-bezier(0.22,1,0.36,1)",normal:"280ms cubic-bezier(0.22,1,0.36,1)",slow:"440ms cubic-bezier(0.22,1,0.36,1)"},backgroundImage:{type:"gradient",gradient:"radial-gradient(at 20% 30%, rgba(0,217,196,0.08) 0%, transparent 60%), radial-gradient(at 80% 80%, rgba(168,120,240,0.06) 0%, transparent 55%), linear-gradient(180deg, #030810 0%, #05101c 100%)"}},displayStyle:"modern3d",variantConfig:{radius:"xl",density:"comfortable",animation:"normal"}},ei={meta:{id:"analog70s",name:"Analog 70s",tagline:"Mustard, rust, walnut — chunky, warm, turntable energy.",tags:["light","retro","warm","serif"]},theme:{name:"Analog 70s",darkMode:"light",recommendedDisplayStyle:"rounded",colors:{primary:"#c8621e",primaryHover:"#a04d14",success:"#7a8a2a",warning:"#d8a030",error:"#a03030",info:"#6a7a8a",accent:"#d8a830",focus:"#c8621e",surface:"#f5ead2",surfaceHover:"#ecdfc0"},backgrounds:{primary:"#f7ecd6",secondary:"#eeddb8",tertiary:"#e2c998",hover:"#d8bc80",elevated:"#fbf2de",inset:"#e8cfa5",canvas:"#f2e4c8"},text:{primary:"#2a1608",secondary:"#5a2e14",muted:"#a07852",inverse:"#f7ecd6"},borders:{color:"#b89868",width:"2px",divider:"#ccb285",radiusSm:"10px",radiusMd:"16px",radiusLg:"24px",radiusXl:"34px",radiusFull:"9999px"},shadows:{sm:"0 2px 0 0 rgba(42,22,8,0.12)",md:"0 4px 0 0 rgba(42,22,8,0.15), 0 6px 10px rgba(200,98,30,0.12)",lg:"0 6px 0 0 rgba(42,22,8,0.18), 0 10px 20px rgba(200,98,30,0.2)",xl:"0 8px 0 0 rgba(42,22,8,0.22), 0 20px 40px rgba(200,98,30,0.28)"},spacing:U,typography:{fontFamily:"'Work Sans', sans-serif",headingFontFamily:"'Abril Fatface', Georgia, serif",monoFontFamily:"'Space Mono', ui-monospace, monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.9375rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"2rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.55,letterSpacing:"0",headingLetterSpacing:"-0.02em"},transitions:{fast:"180ms cubic-bezier(0.34,1.56,0.64,1)",normal:"280ms cubic-bezier(0.34,1.56,0.64,1)",slow:"440ms cubic-bezier(0.34,1.56,0.64,1)"}},displayStyle:"rounded",variantConfig:{radius:"xl",shadow:"md",density:"comfortable",animation:"playful"}},ti={meta:{id:"vhsTracking",name:"VHS Tracking",tagline:"Chromatic smear, scan-line haze, pixel type from another decade.",tags:["dark","retro","pixel","experimental"]},theme:{name:"VHS Tracking",darkMode:"dark",recommendedDisplayStyle:"retro8bit",colors:{primary:"#ff3eb5",primaryHover:"#ff5fc5",success:"#3eff90",warning:"#ffe83e",error:"#ff3e3e",info:"#3ee0ff",accent:"#3eff90",focus:"#ff3eb5",surface:"#120818",surfaceHover:"#1a0c24"},backgrounds:{primary:"#0a0412",secondary:"#120818",tertiary:"#1a0c24",hover:"#241230",elevated:"#120818",inset:"#050208",canvas:"#0a0412"},text:{primary:"#f8e8ff",secondary:"#c888d8",muted:"#605070",inverse:"#0a0412"},borders:{color:"#4a2864",width:"1px",divider:"#2a1840",focusColor:"#ff3eb5",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"0"},shadows:{sm:"-2px 0 0 rgba(255,62,181,0.5), 2px 0 0 rgba(62,224,255,0.5)",md:"-3px 0 0 rgba(255,62,181,0.6), 3px 0 0 rgba(62,224,255,0.6), 0 4px 12px rgba(0,0,0,0.6)",lg:"-4px 0 0 rgba(255,62,181,0.7), 4px 0 0 rgba(62,224,255,0.7), 0 8px 24px rgba(0,0,0,0.7)",xl:"-6px 0 0 rgba(255,62,181,0.8), 6px 0 0 rgba(62,224,255,0.8)",glow:"0 0 20px rgba(255,62,181,0.6)"},spacing:U,typography:{fontFamily:"'VT323', 'JetBrains Mono', monospace",headingFontFamily:"'VT323', monospace",monoFontFamily:"'VT323', monospace",fontSizeXs:"0.9375rem",fontSizeSm:"1rem",fontSizeMd:"1.125rem",fontSizeLg:"1.375rem",fontSizeXl:"2rem",fontWeightNormal:400,fontWeightMedium:400,fontWeightSemibold:400,fontWeightBold:400,lineHeight:1.35,letterSpacing:"0.01em",headingLetterSpacing:"0.04em"},transitions:{fast:"40ms steps(3)",normal:"100ms steps(5)",slow:"180ms steps(8)"},backgroundImage:{type:"gradient",gradient:"linear-gradient(180deg, #0a0412 0%, #120818 100%), repeating-linear-gradient(0deg, rgba(255,62,181,0.03) 0 2px, transparent 2px 4px)"}},displayStyle:"retro8bit",variantConfig:{radius:"none",shadow:"md",density:"normal",animation:"subtle"}},ri={meta:{id:"typewriterPress",name:"Typewriter Press",tagline:"Ribbon red on cream — Courier bones, stamped display.",tags:["light","retro","mono","editorial"]},theme:{name:"Typewriter Press",darkMode:"light",recommendedDisplayStyle:"editorial",colors:{primary:"#b02020",primaryHover:"#8a1818",success:"#4a7038",warning:"#b08018",error:"#8a1818",info:"#3a5068",accent:"#1a1a1a",focus:"#b02020",surface:"#faf3df",surfaceHover:"#f0e7c6"},backgrounds:{primary:"#fbf5e3",secondary:"#f3e9c8",tertiary:"#ebdcab",hover:"#e2cf8f",elevated:"#fffae7",inset:"#efe0b0",canvas:"#fbf5e3"},text:{primary:"#1a1a1a",secondary:"#3d3428",muted:"#7a6f4a",inverse:"#fbf5e3"},borders:{color:"#1a1a1a",width:"1px",divider:"#c8b880",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px"},shadows:{sm:"0 0 0 rgba(26,26,26,0), 1px 1px 0 rgba(26,26,26,0.12)",md:"1px 1px 0 rgba(26,26,26,0.15), 2px 2px 0 rgba(176,32,32,0.1)",lg:"2px 2px 0 rgba(26,26,26,0.2), 4px 4px 0 rgba(176,32,32,0.12)",xl:"3px 3px 0 rgba(26,26,26,0.25)"},spacing:U,typography:{fontFamily:"'Courier Prime', 'Courier New', monospace",headingFontFamily:"'Special Elite', 'Courier Prime', monospace",monoFontFamily:"'Courier Prime', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:400,fontWeightSemibold:700,fontWeightBold:700,lineHeight:1.6,letterSpacing:"0.01em",headingLetterSpacing:"0.04em"},transitions:{fast:"40ms linear",normal:"80ms linear",slow:"140ms linear"},backgroundImage:{type:"pattern",pattern:"noise",opacity:.2,blendMode:"multiply"}},displayStyle:"editorial",variantConfig:{radius:"none",shadow:"subtle",density:"normal",animation:"none"}},ai={meta:{id:"y2kAqua",name:"Y2K Aqua",tagline:"Chrome and aqua — iMac blue, optimistic futurism, 2001 energy.",tags:["light","retro","glass"]},theme:{name:"Y2K Aqua",darkMode:"light",recommendedDisplayStyle:"modern3d",colors:{primary:"#0a84ff",primaryHover:"#0066cc",success:"#34c759",warning:"#ff9500",error:"#ff3b30",info:"#5ac8fa",accent:"#5ac8fa",focus:"#0a84ff",surface:"#f0f5fc",surfaceHover:"#e0ecfa"},backgrounds:{primary:"#e8f2fc",secondary:"#d8e8f8",tertiary:"#c0d8f0",hover:"#a8c8e8",elevated:"#ffffff",inset:"#c8dcf4",canvas:"#dce8f4"},text:{primary:"#0a1a30",secondary:"#304868",muted:"#6a88a8",inverse:"#ffffff"},borders:{color:"#a0c0e0",width:"1px",divider:"#c0d8f0",radiusSm:"6px",radiusMd:"10px",radiusLg:"16px",radiusXl:"24px",radiusFull:"9999px"},shadows:{sm:"inset 0 1px 0 rgba(255,255,255,0.8), 0 1px 2px rgba(10,132,255,0.15)",md:"inset 0 1px 0 rgba(255,255,255,0.9), inset 0 -1px 2px rgba(10,132,255,0.2), 0 2px 6px rgba(10,132,255,0.25), 0 4px 12px rgba(10,132,255,0.15)",lg:"inset 0 1px 0 rgba(255,255,255,0.95), 0 4px 12px rgba(10,132,255,0.3), 0 10px 24px rgba(90,200,250,0.25)",xl:"inset 0 2px 0 rgba(255,255,255,1), 0 8px 24px rgba(10,132,255,0.35), 0 20px 48px rgba(90,200,250,0.3)"},spacing:U,typography:{fontFamily:"'Chakra Petch', -apple-system, sans-serif",headingFontFamily:"'Chakra Petch', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5,letterSpacing:"0.01em",headingLetterSpacing:"-0.005em"},transitions:{fast:"140ms cubic-bezier(0.4,0,0.2,1)",normal:"240ms cubic-bezier(0.4,0,0.2,1)",slow:"380ms cubic-bezier(0.4,0,0.2,1)"},backgroundImage:{type:"gradient",gradient:"linear-gradient(180deg, #f0f7ff 0%, #d8e8f8 60%, #bcd6f0 100%)"}},displayStyle:"modern3d",variantConfig:{radius:"lg",shadow:"lg",density:"normal",animation:"normal"}},ni={meta:{id:"vogueDidone",name:"Vogue Didone",tagline:"Didone serif, arctic whitespace, one red heartbeat.",tags:["light","editorial","serif","luxury"]},theme:{name:"Vogue Didone",darkMode:"light",recommendedDisplayStyle:"editorial",colors:{primary:"#000000",primaryHover:"#1a1a1a",success:"#1f6a3a",warning:"#8a6a1a",error:"#c40018",info:"#2a4068",accent:"#c40018",focus:"#c40018",surface:"#ffffff",surfaceHover:"#f7f7f7"},backgrounds:{primary:"#ffffff",secondary:"#fafafa",tertiary:"#f2f2f2",hover:"#ededed",elevated:"#ffffff",inset:"#f5f5f5",canvas:"#ffffff"},text:{primary:"#000000",secondary:"#2a2a2a",muted:"#808080",inverse:"#ffffff"},borders:{color:"#000000",width:"1px",divider:"#dcdcdc",radiusSm:"0",radiusMd:"0",radiusLg:"1px",radiusXl:"2px",radiusFull:"9999px"},shadows:{sm:"none",md:"none",lg:"0 1px 0 0 #000000",xl:"0 2px 0 0 #000000"},spacing:Ye,typography:{fontFamily:"'Inter', -apple-system, sans-serif",headingFontFamily:"'Playfair Display', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"2rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:900,lineHeight:1.7,letterSpacing:"0.02em",headingLetterSpacing:"-0.03em"},transitions:{fast:"120ms ease",normal:"220ms ease",slow:"360ms ease"}},displayStyle:"editorial",variantConfig:{radius:"none",shadow:"none",density:"spacious",animation:"subtle"}},oi={meta:{id:"comicHalftone",name:"Comic Halftone",tagline:"CMYK pop — halftone dots, action type, offset ink shadows.",tags:["light","editorial","playful"]},theme:{name:"Comic Halftone",darkMode:"light",recommendedDisplayStyle:"playful",colors:{primary:"#e8182c",primaryHover:"#c01020",success:"#1ea862",warning:"#f0c820",error:"#e8182c",info:"#1878c8",accent:"#1878c8",focus:"#e8182c",surface:"#fffdf4",surfaceHover:"#fff8d8"},backgrounds:{primary:"#fffef0",secondary:"#fff6b8",tertiary:"#ffe870",hover:"#ffd838",elevated:"#ffffff",inset:"#fff090",canvas:"#fffdec"},text:{primary:"#0a0a0a",secondary:"#2a2a2a",muted:"#707070",inverse:"#fffef0"},borders:{color:"#0a0a0a",width:"3px",divider:"#0a0a0a",radiusSm:"2px",radiusMd:"4px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"},shadows:{sm:"3px 3px 0 0 #0a0a0a",md:"5px 5px 0 0 #0a0a0a",lg:"6px 6px 0 0 #e8182c, 10px 10px 0 0 #0a0a0a",xl:"8px 8px 0 0 #1878c8, 12px 12px 0 0 #0a0a0a"},spacing:U,typography:{fontFamily:"'Archivo', -apple-system, sans-serif",headingFontFamily:"'Bangers', 'Archivo Black', cursive",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.9375rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"2.125rem",fontWeightNormal:500,fontWeightMedium:600,fontWeightSemibold:700,fontWeightBold:800,lineHeight:1.45,letterSpacing:"0",headingLetterSpacing:"0.03em"},transitions:{fast:"100ms cubic-bezier(0.34,1.56,0.64,1)",normal:"200ms cubic-bezier(0.34,1.56,0.64,1)",slow:"320ms cubic-bezier(0.34,1.56,0.64,1)"},backgroundImage:{type:"pattern",pattern:"dots",opacity:.5}},displayStyle:"playful",variantConfig:{radius:"sm",shadow:"lg",density:"normal",animation:"playful"}},ii={meta:{id:"zinePunk",name:"Zine Punk",tagline:"Photocopier grain, marker headlines, cut-and-paste attitude.",tags:["light","editorial","experimental","brutalist"]},theme:{name:"Zine Punk",darkMode:"light",recommendedDisplayStyle:"brutalist",colors:{primary:"#0a0a0a",primaryHover:"#000000",success:"#1a1a1a",warning:"#2a2a2a",error:"#0a0a0a",info:"#1a1a1a",accent:"#0a0a0a",focus:"#0a0a0a",surface:"#f5f3ee",surfaceHover:"#e8e4d8"},backgrounds:{primary:"#efece0",secondary:"#e3dfd0",tertiary:"#d4d0c0",hover:"#c8c4b4",elevated:"#f5f3ee",inset:"#e0dcc8",canvas:"#ede8d8"},text:{primary:"#0a0a0a",secondary:"#1a1a1a",muted:"#505050",inverse:"#efece0"},borders:{color:"#0a0a0a",width:"2px",divider:"#0a0a0a",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px"},shadows:{sm:"2px 3px 0 rgba(10,10,10,0.9)",md:"4px 6px 0 rgba(10,10,10,0.9), -2px 2px 0 rgba(10,10,10,0.3)",lg:"6px 10px 0 rgba(10,10,10,1), -4px 2px 0 rgba(10,10,10,0.4)",xl:"10px 14px 0 rgba(10,10,10,1)"},spacing:U,typography:{fontFamily:"'Special Elite', 'Courier Prime', monospace",headingFontFamily:"'Permanent Marker', 'Special Elite', cursive",monoFontFamily:"'Courier Prime', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.9375rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.875rem",fontWeightNormal:400,fontWeightMedium:400,fontWeightSemibold:400,fontWeightBold:400,lineHeight:1.5,letterSpacing:"0.02em",headingLetterSpacing:"0.01em"},transitions:{fast:"20ms linear",normal:"60ms linear",slow:"120ms linear"},backgroundImage:{type:"pattern",pattern:"noise",opacity:.3,blendMode:"multiply"}},displayStyle:"brutalist",variantConfig:{radius:"none",shadow:"lg",density:"normal",animation:"none"}},si={meta:{id:"watercolorWash",name:"Watercolor Wash",tagline:"Soft pastel bleeds, handwritten headings, paper gentleness.",tags:["light","artistic","pastel","organic"]},theme:{name:"Watercolor Wash",darkMode:"light",recommendedDisplayStyle:"softCloud",colors:{primary:"#9d7bc4",primaryHover:"#8262ab",success:"#7bb88a",warning:"#e0a868",error:"#d47878",info:"#7ba8c4",accent:"#e0a0c0",focus:"#9d7bc4",surface:"rgba(255,250,245,0.8)",surfaceHover:"rgba(250,240,238,0.9)"},backgrounds:{primary:"#fdf8f4",secondary:"#f8eee6",tertiary:"#f0e0d4",hover:"#e8d2c0",elevated:"#ffffff",inset:"#f4e4d8",canvas:"#fdf8f4"},text:{primary:"#3a2845",secondary:"#6a5868",muted:"#a89ca4",inverse:"#fdf8f4"},borders:{color:"#e8d4c8",width:"1px",divider:"#f0e0d4",radiusSm:"10px",radiusMd:"18px",radiusLg:"30px",radiusXl:"44px",radiusFull:"9999px"},shadows:{sm:"0 2px 10px rgba(157,123,196,0.08)",md:"0 6px 24px rgba(157,123,196,0.12), 0 2px 4px rgba(224,160,192,0.06)",lg:"0 16px 40px rgba(157,123,196,0.18), 0 6px 12px rgba(224,160,192,0.1)",xl:"0 30px 64px rgba(157,123,196,0.22)"},spacing:Me,typography:{fontFamily:"'Quicksand', -apple-system, sans-serif",headingFontFamily:"'Caveat', 'Quicksand', cursive",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.9375rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"2rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.65,letterSpacing:"0",headingLetterSpacing:"-0.005em"},transitions:{fast:"220ms cubic-bezier(0.22,1,0.36,1)",normal:"380ms cubic-bezier(0.22,1,0.36,1)",slow:"600ms cubic-bezier(0.22,1,0.36,1)"},backgroundImage:{type:"gradient",gradient:"radial-gradient(at 18% 22%, rgba(232,208,220,0.5) 0%, transparent 40%), radial-gradient(at 82% 28%, rgba(200,220,240,0.45) 0%, transparent 45%), radial-gradient(at 35% 80%, rgba(232,228,200,0.4) 0%, transparent 50%), linear-gradient(180deg, #fdf8f4 0%, #f8eee6 100%)"}},displayStyle:"softCloud",variantConfig:{radius:"xl",density:"comfortable",animation:"normal"}},ci={meta:{id:"memphis80s",name:"Memphis 80s",tagline:"Squiggle chaos — cyan, pink, yellow, serious typography, no.",tags:["light","artistic","playful"]},theme:{name:"Memphis 80s",darkMode:"light",recommendedDisplayStyle:"playful",colors:{primary:"#f02080",primaryHover:"#c81868",success:"#28c868",warning:"#f8d820",error:"#f02040",info:"#20b8e8",accent:"#f8d820",focus:"#20b8e8",surface:"#fffffa",surfaceHover:"#fff7d0"},backgrounds:{primary:"#fffceb",secondary:"#fff2d0",tertiary:"#ffe8b4",hover:"#ffdd98",elevated:"#ffffff",inset:"#fff0c0",canvas:"#fffbe0"},text:{primary:"#0a0a1a",secondary:"#2a2a3a",muted:"#6a6a7a",inverse:"#fffceb"},borders:{color:"#0a0a1a",width:"2px",divider:"#0a0a1a",radiusSm:"4px",radiusMd:"6px",radiusLg:"10px",radiusXl:"14px",radiusFull:"9999px"},shadows:{sm:"3px 3px 0 0 #20b8e8",md:"4px 4px 0 0 #f02080, 8px 8px 0 0 #f8d820",lg:"5px 5px 0 0 #28c868, 10px 10px 0 0 #20b8e8, 15px 15px 0 0 #f02080",xl:"6px 6px 0 0 #f8d820, 12px 12px 0 0 #f02080, 18px 18px 0 0 #20b8e8"},spacing:U,typography:{fontFamily:"'Rubik', -apple-system, sans-serif",headingFontFamily:"'Rubik Mono One', 'Rubik', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.9375rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.875rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:700,fontWeightBold:800,lineHeight:1.4,letterSpacing:"0",headingLetterSpacing:"-0.01em"},transitions:{fast:"120ms cubic-bezier(0.68,-0.55,0.27,1.55)",normal:"220ms cubic-bezier(0.68,-0.55,0.27,1.55)",slow:"360ms cubic-bezier(0.68,-0.55,0.27,1.55)"},backgroundImage:{type:"pattern",pattern:"zigzag",opacity:.3}},displayStyle:"playful",variantConfig:{radius:"sm",shadow:"lg",density:"normal",animation:"playful"}},li={meta:{id:"inkSumie",name:"Ink Sumi-e",tagline:"Charcoal brush on rice paper — vast silence, one red seal.",tags:["light","artistic","serif","minimal"]},theme:{name:"Ink Sumi-e",darkMode:"light",recommendedDisplayStyle:"zen",colors:{primary:"#1a1a1a",primaryHover:"#000000",success:"#2a4a2a",warning:"#705820",error:"#b82020",info:"#2a4060",accent:"#b82020",focus:"#1a1a1a",surface:"#ffffff",surfaceHover:"#f8f7f3"},backgrounds:{primary:"#fdfcf7",secondary:"#f5f3eb",tertiary:"#ebe8dc",hover:"#dfdbcc",elevated:"#ffffff",inset:"#f0edde",canvas:"#fdfcf7"},text:{primary:"#1a1a1a",secondary:"#3a3a3a",muted:"#888482",inverse:"#fdfcf7"},borders:{color:"#1a1a1a",width:"1px",divider:"#d8d4c4",radiusSm:"0",radiusMd:"0",radiusLg:"1px",radiusXl:"2px",radiusFull:"9999px"},shadows:{sm:"none",md:"none",lg:"none",xl:"0 0 0 1px #1a1a1a"},spacing:Ye,typography:{fontFamily:"'Noto Sans JP', -apple-system, sans-serif",headingFontFamily:"'Noto Serif JP', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.625rem",fontWeightNormal:300,fontWeightMedium:400,fontWeightSemibold:500,fontWeightBold:700,lineHeight:1.85,letterSpacing:"0.04em",headingLetterSpacing:"0"},transitions:{fast:"200ms ease",normal:"340ms ease",slow:"520ms ease"}},displayStyle:"zen",variantConfig:{radius:"none",shadow:"none",density:"spacious",animation:"subtle"}},di={meta:{id:"dieterRams",name:"Dieter Rams",tagline:"Less-but-better — warm gray, single yellow dot, measured everything.",tags:["light","minimal","industrial"]},theme:{name:"Dieter Rams",darkMode:"light",recommendedDisplayStyle:"swiss",colors:{primary:"#1a1a1a",primaryHover:"#0a0a0a",success:"#3a7840",warning:"#e8c020",error:"#c83028",info:"#3868a0",accent:"#e8c020",focus:"#1a1a1a",surface:"#ffffff",surfaceHover:"#f8f8f8"},backgrounds:{primary:"#fbfbf9",secondary:"#f2f2ee",tertiary:"#e8e8e2",hover:"#dedeD6",elevated:"#ffffff",inset:"#ededE7",canvas:"#f5f5f1"},text:{primary:"#0a0a0a",secondary:"#3a3a38",muted:"#888880",inverse:"#fbfbf9"},borders:{color:"#d4d4ce",width:"1px",divider:"#e0e0da",radiusSm:"1px",radiusMd:"2px",radiusLg:"3px",radiusXl:"4px",radiusFull:"9999px"},shadows:{sm:"0 1px 0 0 rgba(0,0,0,0.04)",md:"0 1px 0 0 rgba(0,0,0,0.06), 0 4px 8px -2px rgba(0,0,0,0.06)",lg:"0 2px 0 0 rgba(0,0,0,0.08), 0 10px 20px -6px rgba(0,0,0,0.1)",xl:"0 20px 40px -12px rgba(0,0,0,0.14)"},spacing:jo,typography:{fontFamily:"'IBM Plex Sans', -apple-system, sans-serif",headingFontFamily:"'IBM Plex Sans', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.375rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.55,letterSpacing:"0",headingLetterSpacing:"-0.015em"},transitions:{fast:"100ms cubic-bezier(0.4,0,0.2,1)",normal:"180ms cubic-bezier(0.4,0,0.2,1)",slow:"280ms cubic-bezier(0.4,0,0.2,1)"}},displayStyle:"swiss",variantConfig:{radius:"sm",shadow:"subtle",density:"compact",animation:"subtle"}},ui={meta:{id:"blackTieGala",name:"Black Tie Gala",tagline:"Absolute black, hand-gilded detail, whispered serif elegance.",tags:["dark","luxury","serif"]},theme:{name:"Black Tie Gala",darkMode:"dark",recommendedDisplayStyle:"luxe",colors:{primary:"#c89848",primaryHover:"#e0b868",success:"#68a878",warning:"#e0b050",error:"#c85858",info:"#8aa8d0",accent:"#e8d0a0",focus:"#c89848",surface:"#0e0e0e",surfaceHover:"#161616"},backgrounds:{primary:"#050505",secondary:"#0e0e0e",tertiary:"#161616",hover:"#1e1e1e",elevated:"#0e0e0e",inset:"#020202",canvas:"#030303"},text:{primary:"#f0ead8",secondary:"#a89870",muted:"#605848",inverse:"#050505"},borders:{color:"#3a2e18",width:"1px",divider:"#241a0c",focusColor:"#c89848",radiusSm:"1px",radiusMd:"2px",radiusLg:"3px",radiusXl:"4px",radiusFull:"9999px"},shadows:{sm:"0 0 0 1px rgba(200,152,72,0.1)",md:"0 4px 16px rgba(0,0,0,0.8), 0 0 0 1px rgba(200,152,72,0.15)",lg:"0 10px 32px rgba(0,0,0,0.9), 0 0 0 1px rgba(200,152,72,0.25), inset 0 1px 0 rgba(232,208,160,0.08)",xl:"0 24px 56px rgba(0,0,0,1), 0 0 0 1px rgba(200,152,72,0.35)",glow:"0 0 24px rgba(200,152,72,0.25)"},spacing:Me,typography:{fontFamily:"'Cormorant Garamond', Georgia, serif",headingFontFamily:"'Cormorant Garamond', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.75rem",fontWeightNormal:300,fontWeightMedium:400,fontWeightSemibold:500,fontWeightBold:600,lineHeight:1.65,letterSpacing:"0.05em",headingLetterSpacing:"0.08em"},transitions:{fast:"180ms cubic-bezier(0.4,0,0.2,1)",normal:"320ms cubic-bezier(0.4,0,0.2,1)",slow:"500ms cubic-bezier(0.4,0,0.2,1)"}},displayStyle:"luxe",variantConfig:{radius:"sm",shadow:"lg",density:"spacious",animation:"subtle"}},fi={meta:{id:"swissGrid",name:"Swiss Grid",tagline:"Akzidenz rigor — white, black, one red, grid discipline.",tags:["light","minimal","editorial"]},theme:{name:"Swiss Grid",darkMode:"light",recommendedDisplayStyle:"swiss",colors:{primary:"#e30613",primaryHover:"#b8040f",success:"#00683d",warning:"#b8700a",error:"#e30613",info:"#004c98",accent:"#e30613",focus:"#e30613",surface:"#ffffff",surfaceHover:"#f5f5f5"},backgrounds:{primary:"#ffffff",secondary:"#f5f5f5",tertiary:"#ebebeb",hover:"#e0e0e0",elevated:"#ffffff",inset:"#f0f0f0",canvas:"#ffffff"},text:{primary:"#0a0a0a",secondary:"#2a2a2a",muted:"#707070",inverse:"#ffffff"},borders:{color:"#0a0a0a",width:"1px",divider:"#d0d0d0",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px"},shadows:{sm:"none",md:"0 1px 0 0 rgba(10,10,10,0.1)",lg:"0 2px 0 0 rgba(10,10,10,0.12)",xl:"0 4px 0 0 rgba(10,10,10,0.15)"},spacing:jo,typography:{fontFamily:"'Inter', 'Helvetica Neue', sans-serif",headingFontFamily:"'Inter', 'Helvetica Neue', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:700,fontWeightBold:700,lineHeight:1.45,letterSpacing:"0",headingLetterSpacing:"-0.03em"},transitions:{fast:"60ms linear",normal:"120ms linear",slow:"200ms linear"}},displayStyle:"swiss",variantConfig:{radius:"none",shadow:"none",density:"compact",animation:"subtle"}},$t={forestCanopy:Wo,desertDune:Vo,arcticCrystal:Ko,autumnFoliage:Uo,japaneseWashi:Xo,moroccanMosaic:Go,artDecoGatsby:qo,sovietConstructivist:Yo,blueprint:Jo,hologramUI:Qo,deepSea:Zo,analog70s:ei,vhsTracking:ti,typewriterPress:ri,y2kAqua:ai,vogueDidone:ni,comicHalftone:oi,zinePunk:ii,watercolorWash:si,memphis80s:ci,inkSumie:li,dieterRams:di,blackTieGala:ui,swissGrid:fi},mi=Object.values($t);function _d(e){return $t[e]}function Od(e){return mi.filter(t=>t.meta.tags.includes(e))}const pi=l.createContext(null);function gi(){const e=l.useContext(pi);if(!e)throw new Error("useThemeVariants must be used within NiceThemeVariantProvider");return e}function Bd({initialConfig:e,storageKey:t="ntd-variant-config",autoApply:r=!0,children:a}){const[n,o]=l.useState(()=>{if(typeof window<"u"&&t){const d=localStorage.getItem(t);if(d)try{return{...Y,...JSON.parse(d)}}catch{}}return{...Y,...e}});l.useEffect(()=>{r&&typeof window<"u"&&ht(n)},[n,r]),l.useEffect(()=>{typeof window<"u"&&t&&localStorage.setItem(t,JSON.stringify(n))},[n,t]);const s=l.useCallback(d=>{o(u=>({...u,...d}))},[]),i=l.useCallback(d=>{const u=Oe[d];u&&o(u)},[]),c=l.useCallback(()=>{o(Y)},[]);return x.jsx(pi.Provider,{value:{config:n,setConfig:s,applyPreset:i,reset:c},children:a})}function jd({showPresets:e=!0,showPreview:t=!0,showCSS:r=!1,collapsible:a=!0,className:n,style:o}){const{t:s}=j.useNiceTranslation(),{config:i,setConfig:c,applyPreset:d,reset:u}=gi(),[f,h]=l.useState(new Set(["presets","radius","shadow"])),b=m=>{a&&h(g=>{const S=new Set(g);return S.has(m)?S.delete(m):S.add(m),S})},p=m=>!a||f.has(m);return x.jsxs("div",{className:`ntd-theme-variant-configurator ${n||""}`,style:{fontFamily:"system-ui, sans-serif",fontSize:"14px",...o},children:[e&&x.jsx(G,{title:s("themeVariants.presets","Presets"),expanded:p("presets"),onToggle:()=>b("presets"),children:x.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px"},children:[Object.keys(Oe).map(m=>x.jsx("button",{onClick:()=>d(m),style:{padding:"6px 12px",border:"1px solid var(--nice-border-color, #e5e7eb)",borderRadius:"6px",background:"var(--nice-bg-secondary, #f9fafb)",cursor:"pointer",textTransform:"capitalize"},children:m},m)),x.jsx("button",{onClick:u,style:{padding:"6px 12px",border:"1px solid var(--nice-danger-dark, #dc2626)",borderRadius:"6px",background:"var(--nice-danger-bg, #fef2f2)",color:"var(--nice-color-error, #dc2626)",cursor:"pointer"},children:s("themeVariants.reset","Reset")})]})}),x.jsx(G,{title:s("themeVariants.borderRadius","Border Radius"),expanded:p("radius"),onToggle:()=>b("radius"),children:x.jsx(ie,{options:Object.keys(be),value:i.radius,onChange:m=>c({radius:m}),renderPreview:m=>x.jsx("div",{style:{width:"24px",height:"24px",background:"var(--nice-color-accent, #6366f1)",borderRadius:be[m].md}})})}),x.jsx(G,{title:s("themeVariants.shadows","Shadows"),expanded:p("shadow"),onToggle:()=>b("shadow"),children:x.jsx(ie,{options:Object.keys(De),value:i.shadow,onChange:m=>c({shadow:m}),renderPreview:m=>x.jsx("div",{style:{width:"24px",height:"24px",background:"var(--nice-bg-primary, #fff)",borderRadius:"4px",boxShadow:De[m]}})})}),x.jsx(G,{title:s("themeVariants.buttonStyle","Button Style"),expanded:p("button"),onToggle:()=>b("button"),children:x.jsx(ie,{options:["flat","raised","outlined","ghost","soft","gradient","3d","neumorphic"],value:i.buttonStyle,onChange:m=>c({buttonStyle:m})})}),x.jsx(G,{title:s("themeVariants.inputStyle","Input Style"),expanded:p("input"),onToggle:()=>b("input"),children:x.jsx(ie,{options:["bordered","filled","underlined","floating","soft","neumorphic"],value:i.inputStyle,onChange:m=>c({inputStyle:m})})}),x.jsx(G,{title:s("themeVariants.cardStyle","Card Style"),expanded:p("card"),onToggle:()=>b("card"),children:x.jsx(ie,{options:["flat","elevated","bordered","glass","gradient","neumorphic"],value:i.cardStyle,onChange:m=>c({cardStyle:m})})}),x.jsx(G,{title:s("themeVariants.animation","Animation"),expanded:p("animation"),onToggle:()=>b("animation"),children:x.jsx(ie,{options:Object.keys(_e),value:i.animation,onChange:m=>c({animation:m})})}),x.jsx(G,{title:s("themeVariants.density","Density"),expanded:p("density"),onToggle:()=>b("density"),children:x.jsx(ie,{options:Object.keys(ve),value:i.density,onChange:m=>c({density:m})})}),t&&x.jsx(G,{title:s("themeVariants.preview","Preview"),expanded:p("preview"),onToggle:()=>b("preview"),children:x.jsx(Wd,{config:i})}),r&&x.jsx(G,{title:s("themeVariants.generatedCss","Generated CSS"),expanded:p("css"),onToggle:()=>b("css"),children:x.jsx("pre",{style:{background:"var(--nice-text-primary, #1f2937)",color:"var(--nice-text-inverse, #e5e7eb)",padding:"12px",borderRadius:"6px",fontSize:"12px",overflow:"auto",maxHeight:"200px"},children:yt(i)})})]})}function G({title:e,expanded:t,onToggle:r,children:a}){return x.jsxs("div",{style:{marginBottom:"16px"},children:[x.jsxs("button",{onClick:r,style:{display:"flex",alignItems:"center",gap:"8px",width:"100%",padding:"8px 0",border:"none",background:"transparent",cursor:"pointer",fontSize:"14px",fontWeight:600,color:"var(--nice-text-secondary, #374151)",textAlign:"left"},children:[x.jsx("span",{style:{display:"inline-flex",transform:t?"rotate(90deg)":"none",transition:"transform 150ms"},children:x.jsx(N.NiceIcon,{name:"chevron-right",size:14})}),e]}),t&&x.jsx("div",{style:{paddingLeft:"20px",paddingTop:"8px"},children:a})]})}function ie({options:e,value:t,onChange:r,renderPreview:a}){return x.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px"},children:e.map(n=>x.jsxs("button",{onClick:()=>r(n),style:{display:"flex",alignItems:"center",gap:"6px",padding:"6px 12px",border:t===n?"2px solid var(--nice-info, #6366f1)":"1px solid var(--nice-border-color, #e5e7eb)",borderRadius:"6px",background:t===n?"var(--nice-primary-bg, #eef2ff)":"var(--nice-bg-primary, #fff)",cursor:"pointer",textTransform:"capitalize",fontSize:"13px"},children:[a&&a(n),n]},n))})}function Wd({config:e}){const{t}=j.useNiceTranslation(),r=mt(e.buttonStyle,"var(--nice-color-accent, #6366f1)"),a=pt(e.inputStyle),n=gt(e.cardStyle),o=be[e.radius],s=ve[e.density];return x.jsxs("div",{style:{padding:"20px",background:"var(--nice-bg-secondary, #f9fafb)",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"16px"},children:[x.jsxs("div",{style:{padding:s.paddingX,borderRadius:o.lg,...n},children:[x.jsx("h4",{style:{margin:"0 0 12px",fontSize:s.fontSize},children:t("themeVariants.cardPreview","Card Preview")}),x.jsxs("div",{style:{display:"flex",gap:s.gap,marginBottom:"12px"},children:[x.jsx("button",{style:{padding:`${s.paddingY} ${s.paddingX}`,borderRadius:o.md,color:"var(--nice-text-primary, #fff)",fontSize:s.fontSize,cursor:"pointer",...r},children:t("themeVariants.primary","Primary")}),x.jsx("button",{style:{padding:`${s.paddingY} ${s.paddingX}`,borderRadius:o.md,background:"var(--nice-border-color, #e5e7eb)",border:"none",fontSize:s.fontSize,cursor:"pointer"},children:t("themeVariants.secondary","Secondary")})]}),x.jsx("input",{type:"text",placeholder:t("themeVariants.inputPreview","Input preview..."),style:{width:"100%",height:s.inputHeight,padding:`0 ${s.paddingX}`,fontSize:s.fontSize,outline:"none",boxSizing:"border-box",...a}})]}),x.jsx("div",{style:{display:"flex",gap:"8px",flexWrap:"wrap"},children:["Info","Success","Warning","Error"].map(i=>x.jsx("span",{style:{padding:"4px 10px",borderRadius:o.full,background:"var(--nice-border-color, #e5e7eb)",fontSize:"12px"},children:i},i))})]})}function Vd(e){const[t,r]=l.useState(()=>typeof window>"u"?!1:er());return l.useEffect(()=>{var d,u,f;if(typeof window>"u")return;const a=()=>(e==null?void 0:e.current)??document.documentElement,n=()=>r(er(a()));n();const o=new MutationObserver(n),s={attributes:!0,attributeFilter:["data-theme","class","style"]};o.observe(document.documentElement,s);const i=(u=(d=e==null?void 0:e.current)==null?void 0:d.closest)==null?void 0:u.call(d,"[data-theme], .nice-dark, .nice-light, .dark");i&&i!==document.documentElement&&o.observe(i,s);const c=window.matchMedia("(prefers-color-scheme: dark)");return(f=c.addEventListener)==null||f.call(c,"change",n),()=>{var h;o.disconnect(),(h=c.removeEventListener)==null||h.call(c,"change",n)}},[e]),t}function er(e=document.documentElement){var t,r;try{const a=((t=e.closest)==null?void 0:t.call(e,"[data-theme], .nice-dark, .nice-light, .dark"))??document.documentElement,n=a.getAttribute("data-theme");if(n==="dark")return!0;if(n==="light")return!1;if(a.classList.contains("nice-dark")||a.classList.contains("dark"))return!0;if(a.classList.contains("nice-light"))return!1;const o=getComputedStyle(e),s=o.getPropertyValue("--text-primary").trim()||o.color;if(s){const i=s.match(/rgba?\(([^)]+)\)/);if(i){const[c,d,u]=i[1].split(",").map(f=>parseFloat(f.trim()));return(.299*c+.587*d+.114*u)/255>.5}if(/^#([0-9a-f]{3,8})$/i.test(s)){const c=s.replace("#",""),d=c.length===3?c.split("").map(b=>b+b).join(""):c.slice(0,6),u=parseInt(d.slice(0,2),16),f=parseInt(d.slice(2,4),16),h=parseInt(d.slice(4,6),16);return(.299*u+.587*f+.114*h)/255>.5}}return((r=window.matchMedia)==null?void 0:r.call(window,"(prefers-color-scheme: dark)").matches)??!1}catch{return!1}}const Kd=["NiceTextInput","NiceTextArea","NiceNumberInput","NiceDateTimePicker","NiceSelect","NiceCheckbox","NiceToggle","NiceRadioGroup","NiceSlider","NiceColorPicker","NiceAutocomplete","NiceLookup","NiceCalendar","NiceDateRangeBox","NiceTagBox","NiceRangeSlider","NiceDropDownBox","NiceHtmlEditor","NiceForm","NiceRating","NiceOtpInput","NiceMentionInput","NiceTreeSelect","NiceMaskedInput","NiceKnob","NicePickList","NiceInlineEdit","NiceButton","NiceButtonGroup","NiceDropDownButton","NiceSpeedDialAction","NiceTable","NiceDataGrid","NiceList","NiceTreeView","NiceTreeList","NiceTileView","NicePivotGrid","NiceKanbanBoard","NiceSpreadsheet","NiceBadge","NiceTag","NiceAvatar","NiceAvatarGroup","NiceProgress","NiceDivider","NiceTooltip","NiceSkeleton","NiceSpinner","NiceEmpty","NiceTimeline","NiceCarousel","NiceVirtualScroller","NiceAlert","NiceModal","NiceDrawer","NiceToastContainer","NiceConfirmDialog","NiceCookieConsent","NiceTabs","NiceAccordion","NiceBreadcrumb","NicePagination","NiceCard","NiceMenu","NiceContextMenu","NiceSplitter","NiceAppLayout","NiceDashboardLayout","NiceDesktop","NiceConsole","NiceChart","NicePieChart","NicePolarChart","NiceCircularGauge","NiceLinearGauge","NiceBarGauge","NiceSparkline","NiceBullet","NiceFunnel","NiceSankey","NiceRangeSelector","NiceVectorMap","NiceHeatMap","NiceTreeMap","NiceStockChart","NiceOrganizationChart","NiceActionSheet","NicePopover","NiceLoadPanel","NiceWindow","NiceBlockUI","NiceScheduler","NiceGantt","NiceDiagram","NiceStepper","NiceBox","NiceResponsiveBox","NiceResizable","NiceScrollView","NiceChat","NiceUpload","NiceFileManager","NiceFilterBuilder","NiceGallery","NiceMap","div","span","row","column","stack","container"];function Ud(e){const t=[];yi(e.root,t,"root");const r=new Set((e.dataSources??[]).map(a=>a.id));return hi(e.root,r,t),t}function yi(e,t,r){if((!e.type||e.type.trim()==="")&&t.push(`${r}: type is empty`),e.children)for(let a=0;a<e.children.length;a++)yi(e.children[a],t,`${r}.children[${a}]`)}function hi(e,t,r){if(e.bindings)for(const[a,n]of Object.entries(e.bindings)){const o=n.split(".")[0];!t.has(o)&&o!=="form"&&o!=="route"&&r.push(`Binding "${a}" references unknown data source "${o}"`)}if(e.children)for(const a of e.children)hi(a,t,r)}function Xd(e,t){const r=Gd(t,e.field);switch(e.operator){case"eq":return r===e.value;case"neq":return r!==e.value;case"gt":return r>e.value;case"gte":return r>=e.value;case"lt":return r<e.value;case"lte":return r<=e.value;case"contains":return String(r).includes(String(e.value));case"empty":return r==null||String(r)==="";case"notEmpty":return r!=null&&String(r)!=="";default:return!0}}function Gd(e,t){const r=t.split(".");let a=e;for(const n of r)if(a&&typeof a=="object"&&n in a)a=a[n];else return;return a}function bi(e){const{itemCount:t,itemHeight:r,containerHeight:a,overscan:n=3,initialScrollTop:o=0}=e,[s,i]=l.useState(o),[c,d]=l.useState(!1),u=l.useRef(void 0),f=l.useMemo(()=>{if(typeof r=="number")return null;const w=new Array(t+1);w[0]=0;for(let C=0;C<t;C++)w[C+1]=w[C]+r(C);return w},[t,r]),h=l.useMemo(()=>typeof r=="number"?t*r:f?f[t]:0,[t,r,f]),b=l.useCallback(w=>typeof r=="number"?r:r(w),[r]),p=l.useCallback(w=>typeof r=="number"?w*r:f?f[w]:0,[r,f]),m=l.useCallback(w=>{if(typeof r=="number")return Math.floor(w/r);if(!f)return 0;let C=0,A=t-1;for(;C<=A;){const M=Math.floor((C+A)/2),I=f[M];if(I===w)return M;I<w?C=M+1:A=M-1}return Math.max(0,C-1)},[t,r,f]),{startIndex:g,endIndex:S,visibleItems:y}=l.useMemo(()=>{const w=Math.max(0,m(s)-n);let C=w,A=p(w);for(;C<t&&A<s+a;)A+=b(C),C++;C=Math.min(t,C+n);const M=[];for(let I=w;I<C;I++)M.push({index:I,offset:p(I),height:b(I),key:I});return{startIndex:w,endIndex:C,visibleItems:M}},[s,a,t,n,m,p,b]),v=l.useCallback(w=>{const C=w.currentTarget;i(C.scrollTop),d(!0),u.current&&window.clearTimeout(u.current),u.current=window.setTimeout(()=>{d(!1)},150)},[]),k=l.useCallback((w,C="start")=>{const A=p(w),M=b(w);let I;switch(C){case"center":I=A-a/2+M/2;break;case"end":I=A-a+M;break;default:I=A}i(Math.max(0,Math.min(I,h-a)))},[p,b,a,h]),E=l.useCallback(w=>{i(Math.max(0,Math.min(w,h-a)))},[h,a]);return l.useEffect(()=>()=>{u.current&&window.clearTimeout(u.current)},[]),{visibleItems:y,totalHeight:h,scrollTop:s,scrollToIndex:k,scrollTo:E,onScroll:v,startIndex:g,endIndex:S,isScrolling:c}}function qd(e){const{rowCount:t,columnCount:r,rowHeight:a,columnWidth:n,containerHeight:o,containerWidth:s,overscan:i=2}=e,[c,d]=l.useState(0),[u,f]=l.useState(0),[h,b]=l.useState(!1),p=l.useRef(void 0),m=l.useMemo(()=>{if(typeof a=="number")return t*a;let v=0;for(let k=0;k<t;k++)v+=a(k);return v},[t,a]),g=l.useMemo(()=>{if(typeof n=="number")return r*n;let v=0;for(let k=0;k<r;k++)v+=n(k);return v},[r,n]),S=l.useMemo(()=>{const v=[];let k=0,E=0;if(typeof a=="number")k=Math.floor(c/a),E=k*a;else for(;k<t&&E+a(k)<c;)E+=a(k),k++;k=Math.max(0,k-i);let w=k,C=typeof a=="number"?k*a:E;for(;w<t&&C<c+o;)C+=typeof a=="number"?a:a(w),w++;w=Math.min(t,w+i);let A=0,M=0;if(typeof n=="number")A=Math.floor(u/n),M=A*n;else for(;A<r&&M+n(A)<u;)M+=n(A),A++;A=Math.max(0,A-i);let I=A,$=typeof n=="number"?A*n:M;for(;I<r&&$<u+s;)$+=typeof n=="number"?n:n(I),I++;I=Math.min(r,I+i);let T=typeof a=="number"?k*a:(()=>{let D=0;for(let F=0;F<k;F++)D+=a(F);return D})();for(let D=k;D<w;D++){const F=typeof a=="number"?a:a(D);let P=typeof n=="number"?A*n:(()=>{let L=0;for(let O=0;O<A;O++)L+=n(O);return L})();for(let L=A;L<I;L++){const O=typeof n=="number"?n:n(L);v.push({rowIndex:D,columnIndex:L,top:T,left:P,width:O,height:F,key:`${D}:${L}`}),P+=O}T+=F}return v},[c,u,t,r,a,n,o,s,i]),y=l.useCallback(v=>{const k=v.currentTarget;d(k.scrollTop),f(k.scrollLeft),b(!0),p.current&&window.clearTimeout(p.current),p.current=window.setTimeout(()=>{b(!1)},150)},[]);return l.useEffect(()=>()=>{p.current&&window.clearTimeout(p.current)},[]),{visibleCells:S,totalWidth:g,totalHeight:m,onScroll:y,scrollTop:c,scrollLeft:u,isScrolling:h}}function Yd(e,t,r,a=3){const n=bi({itemCount:e.length,itemHeight:r,containerHeight:t,overscan:a}),o=l.useCallback(s=>e[s.index],[e]);return{...n,getItemData:o,containerStyle:{height:t,overflow:"auto"},innerStyle:{height:n.totalHeight,position:"relative"},getItemStyle:s=>({position:"absolute",top:s.offset,left:0,right:0,height:s.height})}}function Jd(e){const{items:t,searchFn:r,debounce:a=0,minLength:n=0}=e,[o,s]=l.useState(""),i=l.useDeferredValue(o),[c,d]=l.useState(""),u=l.useRef(void 0);l.useEffect(()=>{if(a>0)return u.current=window.setTimeout(()=>{d(o)},a),()=>{u.current&&window.clearTimeout(u.current)};d(o)},[o,a]);const f=l.useDeferredValue(c),h=l.useMemo(()=>f.length<n?t:t.filter(p=>r(p,f)),[t,f,r,n]);return{query:o,setQuery:s,results:h,isStale:f!==i,deferredQuery:f}}function Qd(e){const[t,r]=l.useState(e),[a,n]=l.useState(e),[o,s]=l.useTransition(),i=l.useCallback(d=>{const u=typeof d=="function"?d(t):d;n(u),s(()=>{r(u)})},[t]),c=l.useCallback(d=>{const u=typeof d=="function"?d(t):d;n(u),r(u)},[t]);return{value:t,pendingValue:a,isPending:o,setValue:i,setValueImmediate:c}}function Zd(e){const{data:t,processFn:r,chunkSize:a=1e3,priority:n="user-visible"}=e,[o,s]=l.useState(null),[i,c]=l.useState(0),[d,u]=l.useState(!1),f=l.useRef(!1),h=l.useCallback(async()=>{if(t.length===0){s([]);return}u(!0),c(0),f.current=!1;const p=[],m=t.length;for(let g=0;g<m&&!f.current;g+=a){const S=t.slice(g,g+a),y=S.map((k,E)=>r(k,g+E));p.push(...y);const v=Math.min(100,(g+S.length)/m*100);n==="background"?await new Promise(k=>{"requestIdleCallback"in window?window.requestIdleCallback(k):setTimeout(k,0)}):n==="user-visible"&&await new Promise(k=>requestAnimationFrame(k)),l.startTransition(()=>{c(v)})}s(p),u(!1),c(100)},[t,r,a,n]),b=l.useCallback(()=>{f.current=!0},[]);return l.useEffect(()=>(h(),()=>{f.current=!0}),[h]),{result:o,progress:i,isProcessing:d,process:h,cancel:b}}function eu(e,t={}){const{initialCount:r=20,batchSize:a=50,batchDelay:n=16}=t,[o,s]=l.useState(Math.min(r,e.length)),[i,c]=l.useState(e.length<=r);return l.useEffect(()=>{if(o>=e.length){c(!0);return}const u=setTimeout(()=>{l.startTransition(()=>{s(f=>Math.min(f+a,e.length))})},n);return()=>clearTimeout(u)},[o,e.length,a,n]),l.useEffect(()=>{s(Math.min(r,e.length)),c(e.length<=r)},[e,r]),{visibleItems:l.useMemo(()=>e.slice(0,o),[e,o]),visibleCount:o,totalCount:e.length,isComplete:i,progress:o/e.length*100}}function tu(e){const{initial:t,mutate:r,rollbackOnError:a=!0}=e,[n,o]=l.useState(t),[s,i]=l.useState(!1),[c,d]=l.useState(null),u=l.useRef(t),f=l.useCallback(async b=>{u.current=n,d(null),o(b),i(!0);try{const p=await r(b);o(p)}catch(p){d(p instanceof Error?p:new Error(String(p))),a&&o(u.current)}finally{i(!1)}},[n,r,a]),h=l.useCallback(()=>{o(t),d(null),i(!1)},[t]);return{value:n,update:f,isPending:s,error:c,reset:h}}function ru(e){const{workerScript:t,idleTimeout:r=3e4}=e,[a,n]=l.useState(null),[o,s]=l.useState(!1),[i,c]=l.useState(null),d=l.useRef(null),u=l.useRef(0),f=l.useRef(null),h=l.useRef(void 0),b=l.useRef(()=>{}),p=l.useCallback(()=>{if(!d.current){if(typeof t=="function"){const v=new Blob([`(${t.toString()})()`],{type:"application/javascript"});d.current=new Worker(URL.createObjectURL(v))}else d.current=new Worker(t,{type:"module"});d.current.onmessage=v=>{const k=v.data;k.id===f.current&&(k.type==="result"?(n(k.result??null),s(!1),f.current=null,b.current()):k.type==="error"&&(c(new Error(k.error)),s(!1),f.current=null,b.current()))},d.current.onerror=v=>{c(new Error(v.message)),s(!1),f.current=null}}return d.current},[t]),m=l.useCallback(()=>{h.current&&window.clearTimeout(h.current),r>0&&(h.current=window.setTimeout(()=>{d.current&&!f.current&&(d.current.terminate(),d.current=null)},r))},[r]);b.current=m;const g=l.useCallback(v=>new Promise((k,E)=>{const w=p(),C=`task-${++u.current}`;f.current=C,s(!0),c(null);const A=w.onmessage;w.onmessage=M=>{A==null||A.call(w,M),M.data.id===C&&(M.data.type==="result"?k(M.data.result):M.data.type==="error"&&E(new Error(M.data.error)))},w.postMessage({type:"task",id:C,data:v})}),[p]),S=l.useCallback(()=>{d.current&&f.current&&(d.current.postMessage({type:"cancel",id:f.current}),f.current=null,s(!1))},[]),y=l.useCallback(()=>{d.current&&(d.current.terminate(),d.current=null),h.current&&window.clearTimeout(h.current),f.current=null,s(!1)},[]);return l.useEffect(()=>()=>{y()},[y]),{result:a,isProcessing:o,error:i,execute:g,cancel:S,terminate:y}}function au(e){const{workerScript:t,poolSize:r=navigator.hardwareConcurrency||4,idleTimeout:a=6e4}=e,n=l.useRef([]),o=l.useRef([]),s=l.useRef(0),i=l.useRef(void 0),c=l.useCallback(()=>{if(typeof t=="function"){const S=new Blob([`(${t.toString()})()`],{type:"application/javascript"});return new Worker(URL.createObjectURL(S))}return new Worker(t,{type:"module"})},[t]),d=l.useCallback(()=>{const S=n.current.find(y=>!y.busy);if(S)return S;if(n.current.length<r){const v={worker:c(),busy:!1,taskId:null};return n.current.push(v),v}return null},[c,r]),u=l.useRef(()=>{}),f=l.useCallback(()=>{for(;o.current.length>0;){const S=d();if(!S)break;const y=o.current.shift();S.busy=!0,S.taskId=y.id,S.worker.onmessage=v=>{const k=v.data;k.id===y.id&&(S.busy=!1,S.taskId=null,k.type==="result"?y.resolve(k.result):k.type==="error"&&y.reject(new Error(k.error)),f(),u.current())},S.worker.onerror=v=>{S.busy=!1,S.taskId=null,y.reject(new Error(v.message)),f()},S.worker.postMessage({type:"task",id:y.id,data:y.data})}},[d]),h=l.useCallback(()=>{i.current&&window.clearTimeout(i.current),a>0&&(i.current=window.setTimeout(()=>{n.current.filter(y=>!y.busy).forEach(y=>{y.worker.terminate(),n.current=n.current.filter(v=>v!==y)})},a))},[a]);u.current=h;const b=l.useCallback(S=>new Promise((y,v)=>{const k=`pool-task-${++s.current}`;o.current.push({id:k,data:S,resolve:y,reject:v}),f()}),[f]),p=l.useCallback(S=>Promise.all(S.map(y=>b(y))),[b]),m=l.useCallback(()=>{n.current.forEach(S=>S.worker.terminate()),n.current=[],o.current=[],i.current&&window.clearTimeout(i.current)},[]),g=l.useCallback(()=>({total:n.current.length,busy:n.current.filter(S=>S.busy).length,idle:n.current.filter(S=>!S.busy).length,queued:o.current.length}),[]);return l.useEffect(()=>()=>{m()},[m]),{execute:b,executeAll:p,terminateAll:m,getStats:g}}function nu(e){const t=`
123
123
  self.onmessage = function(e) {
124
124
  const msg = e.data;
125
125
 
@@ -142,7 +142,7 @@ HTML:`}],{temperature:.3}),l=s.content.match(/```html?\n?([\s\S]*?)```/);return
142
142
  }
143
143
  }
144
144
  };
145
- `,r=new Blob([t],{type:"application/javascript"});return new URL(URL.createObjectURL(r))}function vu(e){const t=[],r=a=>{a instanceof ArrayBuffer||a instanceof MessagePort?t.push(a):"buffer"in a&&a.buffer instanceof ArrayBuffer?t.push(a.buffer):a instanceof ImageBitmap?t.push(a):Array.isArray(a)?a.forEach(r):a&&typeof a=="object"&&Object.values(a).forEach(r)};return r(e),t}function Su(){const e=new WeakMap;return{get:t=>e.get(t),set:(t,r)=>{e.set(t,r)},has:t=>e.has(t),delete:t=>e.delete(t)}}function xu(e={}){const{maxSize:t=1e3,ttl:r}=e,a=new Map,n=i=>r?Date.now()-i.timestamp>r:!1,o=()=>{if(a.size<=t)return;const i=[];for(const[s,l]of a.entries())if((n(l)||a.size-i.length>t)&&i.push(s),a.size-i.length<=t)break;i.forEach(s=>a.delete(s))};return{get:i=>{const s=a.get(i);if(s){if(n(s)){a.delete(i);return}return a.delete(i),a.set(i,{...s,timestamp:Date.now()}),s.value}},set:(i,s)=>{a.delete(i),a.set(i,{value:s,timestamp:Date.now()}),o()},has:i=>{const s=a.get(i);return s?n(s)?(a.delete(i),!1):!0:!1},delete:i=>a.delete(i),clear:()=>a.clear(),size:()=>a.size,keys:()=>Array.from(a.keys())}}function wu(){const e=new Map,t=new FinalizationRegistry(r=>{e.delete(r)});return{get:r=>{const a=e.get(r);if(!a)return;const n=a.deref();return n===void 0&&e.delete(r),n},set:(r,a)=>{const n=e.get(r);if(n){const o=n.deref();o&&t.unregister(o)}e.set(r,new WeakRef(a)),t.register(a,r,a)},has:r=>{const a=e.get(r);return a?a.deref()!==void 0:!1},delete:r=>{const a=e.get(r);if(a){const n=a.deref();n&&t.unregister(n)}return e.delete(r)},clear:()=>e.clear(),size:()=>{let r=0;for(const a of e.values())a.deref()!==void 0&&r++;return r}}}function ku(){const e=c.useRef([]),t=c.useCallback((n,o,i,s)=>{n.addEventListener(o,i,s),e.current.push({target:n,event:o,handler:i,options:s})},[]),r=c.useCallback(()=>{e.current.forEach(({target:n,event:o,handler:i,options:s})=>{n.removeEventListener(o,i,s)}),e.current=[]},[]),a=c.useCallback(()=>e.current.length,[]);return c.useEffect(()=>()=>{r()},[r]),{add:t,removeAll:r,count:a}}function Mu(){const e=[];return{add:(t,r,a,n)=>{t.addEventListener(r,a,n),e.push({target:t,event:r,handler:a,options:n})},removeAll:()=>{e.forEach(({target:t,event:r,handler:a,options:n})=>{t.removeEventListener(r,a,n)}),e.length=0},count:()=>e.length,dispose:()=>{e.forEach(({target:t,event:r,handler:a,options:n})=>{t.removeEventListener(r,a,n)}),e.length=0}}}function Re(){const e=window.performance;if(!e.memory)return{jsHeapSizeLimit:0,totalJSHeapSize:0,usedJSHeapSize:0,usedPercent:0,isSupported:!1};const{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:a}=e.memory;return{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:a,usedPercent:a/t*100,isSupported:!0}}function Cu(e={}){const{warningThreshold:t=75,pollInterval:r=1e4,onHighUsage:a}=e,[n,o]=c.useState(Re),[i,s]=c.useState(!1);return c.useEffect(()=>{if(!Re().isSupported)return;const d=setInterval(()=>{const u=Re();o(u);const f=u.usedPercent>t;s(f),f&&a&&a(u)},r);return()=>clearInterval(d)},[t,r,a]),{stats:n,isHighUsage:i}}function Au(e){const{src:t,rootMargin:r="200px",threshold:a=0,placeholder:n,progressive:o}=e,i=c.useRef(null),[s,l]=c.useState(!1),[d,u]=c.useState(!1),[f,h]=c.useState(n||"");return c.useEffect(()=>{const y=i.current;if(!y)return;const m=new IntersectionObserver(([p])=>{p.isIntersecting&&(l(!0),m.disconnect())},{rootMargin:r,threshold:a});return m.observe(y),()=>m.disconnect()},[r,a]),c.useEffect(()=>{if(!s)return;const y=new Image;return y.onload=()=>{h(t),u(!0)},y.src=t,()=>{y.onload=null}},[s,t,o]),{ref:i,isInView:s,isLoaded:d,currentSrc:f}}function Eu(e){const{create:t,reset:r,maxSize:a=100}=e,n=[];return{acquire:()=>n.length>0?n.pop():t(),release:o=>{n.length<a&&(r&&r(o),n.push(o))},preallocate:o=>{const i=Math.min(o,a-n.length);for(let s=0;s<i;s++)n.push(t())},clear:()=>{n.length=0},size:()=>n.length}}const ye={avif:null,webp:null};async function He(e){if(ye[e]!==null)return ye[e];const t={avif:"data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKBzgABhAQ0AIy0IEAAAAAAAAAAMHN",webp:"data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"};return new Promise(r=>{const a=new Image;a.onload=()=>{ye[e]=a.width>0&&a.height>0,r(ye[e])},a.onerror=()=>{ye[e]=!1,r(!1)},a.src=t[e]})}function ws(){const[e,t]=c.useState({avif:!1,webp:!1,jpg:!0,png:!0,gif:!0}),[r,a]=c.useState(!0);return c.useEffect(()=>{Promise.all([He("avif"),He("webp")]).then(([n,o])=>{t(i=>({...i,avif:n,webp:o})),a(!1)})},[]),{formats:e,isChecking:r}}function ks(e){return e.map(t=>`${t.src} ${t.width}w`).join(", ")}function Ms(e,t){const r=e.map(a=>`(max-width: ${a.maxWidth}px) ${a.size}`);return r.push(t),r.join(", ")}function Cs(e,t,r=window.devicePixelRatio){const a=t*r,n=[...e].sort((o,i)=>o.width-i.width);for(const o of n)if(o.width>=a)return o;return n[n.length-1]}function As(e){const{src:t,lqip:r,rootMargin:a="200px",threshold:n=0,blurRadius:o=20,delay:i=0,priority:s="auto",onLoad:l,onError:d}=e,u=c.useRef(null),[f,h]=c.useState({currentSrc:r||null,thumbnailSrc:r||null,fullSrc:t,stage:"idle",isLoaded:!1,isInView:!1,error:null});c.useEffect(()=>{if(s==="high"){h(g=>({...g,isInView:!0}));return}const m=u.current;if(!m)return;const p=new IntersectionObserver(([g])=>{g.isIntersecting&&(h(v=>({...v,isInView:!0})),p.disconnect())},{rootMargin:a,threshold:n});return p.observe(m),()=>p.disconnect()},[a,n,s]),c.useEffect(()=>{if(!f.isInView||f.isLoaded)return;h(g=>({...g,stage:r?"thumbnail":"loading"}));const m=i>0?setTimeout(p,i):null;m||p();function p(){const g=new Image;g.onload=()=>{h(v=>({...v,currentSrc:t,stage:"loaded",isLoaded:!0})),l==null||l()},g.onerror=()=>{const v=new Error(`Failed to load image: ${t}`);h(b=>({...b,stage:"error",error:v})),d==null||d(v)},g.src=t}return()=>{m&&clearTimeout(m)}},[f.isInView,f.isLoaded,t,r,i,l,d]);const y={filter:f.stage==="thumbnail"?`blur(${o}px)`:"none",transition:"filter 0.3s ease-out",...f.stage==="thumbnail"&&{transform:"scale(1.05)"}};return{ref:u,...f,style:y}}function Es(e){return Promise.all(e.map(t=>new Promise((r,a)=>{const n=new Image;n.onload=()=>r(),n.onerror=()=>a(new Error(`Failed to preload: ${t}`)),n.src=t})))}function Ns(e){const[t,r]=c.useState({loaded:0,total:e.length,isComplete:!1,errors:[]});return c.useEffect(()=>{if(e.length===0){r({loaded:0,total:0,isComplete:!0,errors:[]});return}let a=0;const n=[];e.forEach(i=>{const s=new Image;s.onload=()=>{a++,o()},s.onerror=()=>{a++,n.push(i),o()},s.src=i});function o(){r({loaded:a,total:e.length,isComplete:a===e.length,errors:n})}},[e]),t}async function Ot(e){const t=new Image;return t.src=e,typeof t.decode=="function"?await t.decode():await new Promise((r,a)=>{t.onload=()=>r(),t.onerror=()=>a(new Error(`Failed to load: ${e}`))}),t}function Ls(e){const[t,r]=c.useState(null),[a,n]=c.useState(!1),[o,i]=c.useState(null);return c.useEffect(()=>{if(!e){r(null);return}let s=!1;return n(!0),i(null),Ot(e).then(l=>{s||(r(l),n(!1))}).catch(l=>{s||(i(l),n(!1))}),()=>{s=!0}},[e]),{image:t,isLoading:a,error:o}}function Ts(e={}){const t=new Map,r=new IntersectionObserver(a=>{a.forEach(n=>{const o=t.get(n.target);o&&n.isIntersecting&&o(n)})},e);return{observe:(a,n)=>{t.set(a,n),r.observe(a)},unobserve:a=>{t.delete(a),r.unobserve(a)},disconnect:()=>{t.clear(),r.disconnect()}}}function Rs(e,t){const r=c.useRef(null),[a,n]=c.useState(!1);return c.useEffect(()=>{const o=r.current;if(o)return e.observe(o,()=>{n(!0),t(),e.unobserve(o)}),()=>{e.unobserve(o)}},[e,t]),{ref:r,isInView:a}}function zs(e,t=10,r=10){const a=`<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${r}"><rect width="100%" height="100%" fill="${e}"/></svg>`;return`data:image/svg+xml,${encodeURIComponent(a)}`}function Is(e,t="vertical",r=10,a=10){const s=`<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${a}">
145
+ `,r=new Blob([t],{type:"application/javascript"});return new URL(URL.createObjectURL(r))}function ou(e){const t=[],r=a=>{a instanceof ArrayBuffer||a instanceof MessagePort?t.push(a):"buffer"in a&&a.buffer instanceof ArrayBuffer?t.push(a.buffer):a instanceof ImageBitmap?t.push(a):Array.isArray(a)?a.forEach(r):a&&typeof a=="object"&&Object.values(a).forEach(r)};return r(e),t}function iu(){const e=new WeakMap;return{get:t=>e.get(t),set:(t,r)=>{e.set(t,r)},has:t=>e.has(t),delete:t=>e.delete(t)}}function su(e={}){const{maxSize:t=1e3,ttl:r}=e,a=new Map,n=s=>r?Date.now()-s.timestamp>r:!1,o=()=>{if(a.size<=t)return;const s=[];for(const[i,c]of a.entries())if((n(c)||a.size-s.length>t)&&s.push(i),a.size-s.length<=t)break;s.forEach(i=>a.delete(i))};return{get:s=>{const i=a.get(s);if(i){if(n(i)){a.delete(s);return}return a.delete(s),a.set(s,{...i,timestamp:Date.now()}),i.value}},set:(s,i)=>{a.delete(s),a.set(s,{value:i,timestamp:Date.now()}),o()},has:s=>{const i=a.get(s);return i?n(i)?(a.delete(s),!1):!0:!1},delete:s=>a.delete(s),clear:()=>a.clear(),size:()=>a.size,keys:()=>Array.from(a.keys())}}function cu(){const e=new Map,t=new FinalizationRegistry(r=>{e.delete(r)});return{get:r=>{const a=e.get(r);if(!a)return;const n=a.deref();return n===void 0&&e.delete(r),n},set:(r,a)=>{const n=e.get(r);if(n){const o=n.deref();o&&t.unregister(o)}e.set(r,new WeakRef(a)),t.register(a,r,a)},has:r=>{const a=e.get(r);return a?a.deref()!==void 0:!1},delete:r=>{const a=e.get(r);if(a){const n=a.deref();n&&t.unregister(n)}return e.delete(r)},clear:()=>e.clear(),size:()=>{let r=0;for(const a of e.values())a.deref()!==void 0&&r++;return r}}}function lu(){const e=l.useRef([]),t=l.useCallback((n,o,s,i)=>{n.addEventListener(o,s,i),e.current.push({target:n,event:o,handler:s,options:i})},[]),r=l.useCallback(()=>{e.current.forEach(({target:n,event:o,handler:s,options:i})=>{n.removeEventListener(o,s,i)}),e.current=[]},[]),a=l.useCallback(()=>e.current.length,[]);return l.useEffect(()=>()=>{r()},[r]),{add:t,removeAll:r,count:a}}function du(){const e=[];return{add:(t,r,a,n)=>{t.addEventListener(r,a,n),e.push({target:t,event:r,handler:a,options:n})},removeAll:()=>{e.forEach(({target:t,event:r,handler:a,options:n})=>{t.removeEventListener(r,a,n)}),e.length=0},count:()=>e.length,dispose:()=>{e.forEach(({target:t,event:r,handler:a,options:n})=>{t.removeEventListener(r,a,n)}),e.length=0}}}function Fe(){const e=window.performance;if(!e.memory)return{jsHeapSizeLimit:0,totalJSHeapSize:0,usedJSHeapSize:0,usedPercent:0,isSupported:!1};const{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:a}=e.memory;return{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:a,usedPercent:a/t*100,isSupported:!0}}function uu(e={}){const{warningThreshold:t=75,pollInterval:r=1e4,onHighUsage:a}=e,[n,o]=l.useState(Fe),[s,i]=l.useState(!1);return l.useEffect(()=>{if(!Fe().isSupported)return;const d=setInterval(()=>{const u=Fe();o(u);const f=u.usedPercent>t;i(f),f&&a&&a(u)},r);return()=>clearInterval(d)},[t,r,a]),{stats:n,isHighUsage:s}}function fu(e){const{src:t,rootMargin:r="200px",threshold:a=0,placeholder:n,progressive:o}=e,s=l.useRef(null),[i,c]=l.useState(!1),[d,u]=l.useState(!1),[f,h]=l.useState(n||"");return l.useEffect(()=>{const b=s.current;if(!b)return;const p=new IntersectionObserver(([m])=>{m.isIntersecting&&(c(!0),p.disconnect())},{rootMargin:r,threshold:a});return p.observe(b),()=>p.disconnect()},[r,a]),l.useEffect(()=>{if(!i)return;const b=new Image;return b.onload=()=>{h(t),u(!0)},b.src=t,()=>{b.onload=null}},[i,t,o]),{ref:s,isInView:i,isLoaded:d,currentSrc:f}}function mu(e){const{create:t,reset:r,maxSize:a=100}=e,n=[];return{acquire:()=>n.length>0?n.pop():t(),release:o=>{n.length<a&&(r&&r(o),n.push(o))},preallocate:o=>{const s=Math.min(o,a-n.length);for(let i=0;i<s;i++)n.push(t())},clear:()=>{n.length=0},size:()=>n.length}}const he={avif:null,webp:null};async function He(e){if(he[e]!==null)return he[e];const t={avif:"data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKBzgABhAQ0AIy0IEAAAAAAAAAAMHN",webp:"data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"};return new Promise(r=>{const a=new Image;a.onload=()=>{he[e]=a.width>0&&a.height>0,r(he[e])},a.onerror=()=>{he[e]=!1,r(!1)},a.src=t[e]})}function Si(){const[e,t]=l.useState({avif:!1,webp:!1,jpg:!0,png:!0,gif:!0}),[r,a]=l.useState(!0);return l.useEffect(()=>{Promise.all([He("avif"),He("webp")]).then(([n,o])=>{t(s=>({...s,avif:n,webp:o})),a(!1)})},[]),{formats:e,isChecking:r}}function vi(e){return e.map(t=>`${t.src} ${t.width}w`).join(", ")}function xi(e,t){const r=e.map(a=>`(max-width: ${a.maxWidth}px) ${a.size}`);return r.push(t),r.join(", ")}function wi(e,t,r=window.devicePixelRatio){const a=t*r,n=[...e].sort((o,s)=>o.width-s.width);for(const o of n)if(o.width>=a)return o;return n[n.length-1]}function ki(e){const{src:t,lqip:r,rootMargin:a="200px",threshold:n=0,blurRadius:o=20,delay:s=0,priority:i="auto",onLoad:c,onError:d}=e,u=l.useRef(null),[f,h]=l.useState({currentSrc:r||null,thumbnailSrc:r||null,fullSrc:t,stage:"idle",isLoaded:!1,isInView:!1,error:null});l.useEffect(()=>{if(i==="high"){h(g=>({...g,isInView:!0}));return}const p=u.current;if(!p)return;const m=new IntersectionObserver(([g])=>{g.isIntersecting&&(h(S=>({...S,isInView:!0})),m.disconnect())},{rootMargin:a,threshold:n});return m.observe(p),()=>m.disconnect()},[a,n,i]),l.useEffect(()=>{if(!f.isInView||f.isLoaded)return;h(g=>({...g,stage:r?"thumbnail":"loading"}));const p=s>0?setTimeout(m,s):null;p||m();function m(){const g=new Image;g.onload=()=>{h(S=>({...S,currentSrc:t,stage:"loaded",isLoaded:!0})),c==null||c()},g.onerror=()=>{const S=new Error(`Failed to load image: ${t}`);h(y=>({...y,stage:"error",error:S})),d==null||d(S)},g.src=t}return()=>{p&&clearTimeout(p)}},[f.isInView,f.isLoaded,t,r,s,c,d]);const b={filter:f.stage==="thumbnail"?`blur(${o}px)`:"none",transition:"filter 0.3s ease-out",...f.stage==="thumbnail"&&{transform:"scale(1.05)"}};return{ref:u,...f,style:b}}function Ci(e){return Promise.all(e.map(t=>new Promise((r,a)=>{const n=new Image;n.onload=()=>r(),n.onerror=()=>a(new Error(`Failed to preload: ${t}`)),n.src=t})))}function Ei(e){const[t,r]=l.useState({loaded:0,total:e.length,isComplete:!1,errors:[]});return l.useEffect(()=>{if(e.length===0){r({loaded:0,total:0,isComplete:!0,errors:[]});return}let a=0;const n=[];e.forEach(s=>{const i=new Image;i.onload=()=>{a++,o()},i.onerror=()=>{a++,n.push(s),o()},i.src=s});function o(){r({loaded:a,total:e.length,isComplete:a===e.length,errors:n})}},[e]),t}async function Ht(e){const t=new Image;return t.src=e,typeof t.decode=="function"?await t.decode():await new Promise((r,a)=>{t.onload=()=>r(),t.onerror=()=>a(new Error(`Failed to load: ${e}`))}),t}function Ni(e){const[t,r]=l.useState(null),[a,n]=l.useState(!1),[o,s]=l.useState(null);return l.useEffect(()=>{if(!e){r(null);return}let i=!1;return n(!0),s(null),Ht(e).then(c=>{i||(r(c),n(!1))}).catch(c=>{i||(s(c),n(!1))}),()=>{i=!0}},[e]),{image:t,isLoading:a,error:o}}function Ai(e={}){const t=new Map,r=new IntersectionObserver(a=>{a.forEach(n=>{const o=t.get(n.target);o&&n.isIntersecting&&o(n)})},e);return{observe:(a,n)=>{t.set(a,n),r.observe(a)},unobserve:a=>{t.delete(a),r.unobserve(a)},disconnect:()=>{t.clear(),r.disconnect()}}}function Mi(e,t){const r=l.useRef(null),[a,n]=l.useState(!1);return l.useEffect(()=>{const o=r.current;if(o)return e.observe(o,()=>{n(!0),t(),e.unobserve(o)}),()=>{e.unobserve(o)}},[e,t]),{ref:r,isInView:a}}function Ti(e,t=10,r=10){const a=`<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${r}"><rect width="100%" height="100%" fill="${e}"/></svg>`;return`data:image/svg+xml,${encodeURIComponent(a)}`}function Ii(e,t="vertical",r=10,a=10){const i=`<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${a}">
146
146
  <defs>
147
147
  <linearGradient id="g" x1="0%" y1="0%" x2="${t==="horizontal"?"100%":"0%"}" y2="${t==="vertical"?"100%":"0%"}">
148
148
  <stop offset="0%" style="stop-color:${e[0]}"/>
@@ -150,4 +150,4 @@ HTML:`}],{temperature:.3}),l=s.content.match(/```html?\n?([\s\S]*?)```/);return
150
150
  </linearGradient>
151
151
  </defs>
152
152
  <rect width="100%" height="100%" fill="url(#g)"/>
153
- </svg>`;return`data:image/svg+xml,${encodeURIComponent(s)}`}const Nu={checkFormatSupport:He,useImageFormats:ws,generateSrcset:ks,generateSizes:Ms,selectOptimalSource:Cs,useProgressiveImage:As,preloadImages:Es,useImagePreload:Ns,loadAndDecodeImage:Ot,useDecodedImage:Ls,createImageObserver:Ts,useSharedImageObserver:Rs,generateColorPlaceholder:zs,generateGradientPlaceholder:Is};function Lu(e){return e["data-testid"]??e.testId}function jt(e){return e.error||e.status==="error"?"error":e.warning||e.status==="warning"?"warning":e.success||e.status==="success"?"success":e.status??"idle"}function Tu(e){const t=jt(e),r={};return t==="error"&&(r["aria-invalid"]=!0),e.required&&(r["aria-required"]=!0),e.disabled&&(r["aria-disabled"]=!0),e.readOnly&&(r["aria-readonly"]=!0),e.describedById&&(r["aria-describedby"]=e.describedById),r}const tr=new Set;function Ps(e,t,r){process.env.NODE_ENV!=="production"&&t!==void 0&&r!==void 0&&!tr.has(e)&&(tr.add(e),console.warn(`[Nice2Dev] <${e}> received both \`value\` and \`defaultValue\`. Use one or the other (controlled XOR uncontrolled).`))}const rr=new Set;function Ds(e,t){process.env.NODE_ENV!=="production"&&(rr.has(e)||(rr.add(e),t()))}function Hs(e){const{componentName:t,prop:r,replacement:a,removeIn:n,reason:o}=e;Ds(`prop:${t}.${r}`,()=>{const i=[`[Nice2Dev] Prop \`${r}\` on <${t}> is deprecated.`,a?`Use \`${a}\` instead.`:"",n?`Will be removed in ${n}.`:"",o?`Reason: ${o}`:""].filter(Boolean);console.warn(i.join(" "))})}function Ru(e){const{symbol:t,replacement:r,removeIn:a,reason:n}=e;Ds(`symbol:${t}`,()=>{const o=[`[Nice2Dev] \`${t}\` is deprecated.`,r?`Use \`${r}\` instead.`:"",a?`Will be removed in ${a}.`:"",n?`Reason: ${n}`:""].filter(Boolean);console.warn(o.join(" "))})}function zu(e){return e.value!==void 0&&e.newValue===void 0&&Hs({componentName:e.componentName,prop:e.prop,replacement:e.replacement,removeIn:e.removeIn}),e.newValue??e.value}const ar=new Set;function Iu(e){const{value:t,defaultValue:r,fallbackValue:a,onChange:n,componentName:o="Component"}=e,i=t!==void 0,[s,l]=c.useState(()=>r!==void 0?r:a),d=c.useRef(i);process.env.NODE_ENV!=="production"&&(d.current!==i&&!ar.has(o)&&(ar.add(o),console.warn(`[Nice2Dev] <${o}> switched between controlled and uncontrolled. A component should not change between the two over its lifetime.`)),d.current=i,Ps(o,t,r));const u=i?t:s,f=c.useRef(u);f.current=u;const h=c.useCallback((y,m)=>{const p=typeof y=="function"?y(f.current):y;f.current=p,i||l(p),m===void 0?n==null||n(p):n==null||n(p,m)},[i,n]);return[u,h,i]}const Pu={idle:"nice-field-status nice-field-status--idle",success:"nice-field-status nice-field-status--success",warning:"nice-field-status nice-field-status--warning",error:"nice-field-status nice-field-status--error"};function Du(e){const t=jt(e),r=t==="error"&&(typeof e.error=="string"?e.error:void 0)||t==="warning"&&e.warning||t==="success"&&e.success||e.helperText||null;return r?S.jsx("div",{id:e.id,role:t==="error"?"alert":void 0,"aria-live":t==="error"?"assertive":"polite","data-testid":e.testId,className:[Pu[t],e.className].filter(Boolean).join(" "),children:r}):null}const Fs={0:"A",1:"B",2:"X",3:"Y",4:"LB",5:"RB",6:"LT",7:"RT",8:"Back",9:"Start",10:"LS",11:"RS",12:"DpadUp",13:"DpadDown",14:"DpadLeft",15:"DpadRight",16:"Home"},Hu={0:"LeftX",1:"LeftY",2:"RightX",3:"RightY"},Fu={Cross:"A",Circle:"B",Square:"X",Triangle:"Y",L1:"LB",R1:"RB",L2:"LT",R2:"RT",Share:"Back",Options:"Start",L3:"LS",R3:"RS",PS:"Home"},$s=Object.values(Fs);function Os(e={}){const{index:t=0,deadzone:r=.15,pollRate:a=16,actions:n={},enabled:o=!0,onButtonDown:i,onButtonUp:s}=e,[l,d]=c.useState({connected:!1,id:"",buttons:Le(),axes:{LeftX:0,LeftY:0,RightX:0,RightY:0},leftTrigger:0,rightTrigger:0,vibrate:()=>{}}),u=c.useRef(Le()),f=c.useRef(new Map),h=c.useRef(n);h.current=n;const y=c.useRef({onButtonDown:i,onButtonUp:s});y.current={onButtonDown:i,onButtonUp:s};const m=c.useRef({left:0,right:0}),p=c.useCallback((v,b=.5,x=.5)=>{var k,C;const A=navigator.getGamepads()[t];A!=null&&A.vibrationActuator&&((C=(k=A.vibrationActuator).playEffect)==null||C.call(k,"dual-rumble",{startDelay:0,duration:v,weakMagnitude:b,strongMagnitude:x}))},[t]),g=c.useCallback(v=>{if(Math.abs(v)<r)return 0;const b=v>0?1:-1,x=(Math.abs(v)-r)/(1-r);return b*x},[r]);return c.useEffect(()=>{if(!o)return;let v,b=0,x=!1;const w=A=>{var P,F,se,ge,he,W,fe,ie;if(A-b<a){v=requestAnimationFrame(w);return}b=A;const C=navigator.getGamepads()[t];if(!C){x&&(x=!1,u.current=Le(),d(j=>({...j,connected:!1,id:""}))),v=requestAnimationFrame(w);return}x=!0;const M=Le();for(let j=0;j<C.buttons.length;j++){const H=Fs[j];H&&(M[H]=C.buttons[j].pressed)}const E={LeftX:0,LeftY:0,RightX:0,RightY:0};for(let j=0;j<Math.min(C.axes.length,4);j++){const H=Hu[j];H&&(E[H]=g(C.axes[j]))}const L=((P=C.buttons[6])==null?void 0:P.value)??0,T=((F=C.buttons[7])==null?void 0:F.value)??0,{onButtonDown:N,onButtonUp:R}=y.current;if(N||R)for(const j of $s)M[j]&&!u.current[j]?N==null||N(j):!M[j]&&u.current[j]&&(R==null||R(j));const I=Date.now(),D=h.current;for(const[j,H]of Object.entries(D)){if(H.button||H.buttons){const U=H.buttons||[H.button],Q=U.every(ee=>M[ee]),Z=U.every(ee=>u.current[ee]);if(Q&&!Z)(se=H.onPress)==null||se.call(H),f.current.set(j,{startTime:I,lastRepeat:I});else if(!Q&&Z)(ge=H.onRelease)==null||ge.call(H),f.current.delete(j);else if(Q&&((he=H.onHold)==null||he.call(H),H.repeatDelay!==void 0&&H.repeatRate!==void 0)){const ee=f.current.get(j);ee&&I-ee.startTime>H.repeatDelay&&I-ee.lastRepeat>=H.repeatRate&&((W=H.onPress)==null||W.call(H),ee.lastRepeat=I)}}if(H.axis&&H.onAxisChange){const U=E[H.axis];H.axisDirection?H.axisDirection==="positive"&&U>0?H.onAxisChange(U):H.axisDirection==="negative"&&U<0&&H.onAxisChange(Math.abs(U)):H.onAxisChange(U)}if(H.trigger){const U=H.trigger==="LT"?L:T,Q=H.trigger==="LT"?m.current.left>.5:m.current.right>.5,Z=U>.5;Z&&!Q?(fe=H.onPress)==null||fe.call(H):!Z&&Q&&((ie=H.onRelease)==null||ie.call(H))}}u.current=M,m.current={left:L,right:T},d({connected:!0,id:C.id,buttons:M,axes:E,leftTrigger:L,rightTrigger:T,vibrate:p}),v=requestAnimationFrame(w)};return v=requestAnimationFrame(w),()=>cancelAnimationFrame(v)},[o,t,a,g,p]),c.useEffect(()=>{if(!o)return;const v=x=>{x.gamepad.index===t&&d(w=>({...w,connected:!0,id:x.gamepad.id}))},b=x=>{x.gamepad.index===t&&d(w=>({...w,connected:!1,id:""}))};return window.addEventListener("gamepadconnected",v),window.addEventListener("gamepaddisconnected",b),()=>{window.removeEventListener("gamepadconnected",v),window.removeEventListener("gamepaddisconnected",b)}},[o,t]),l}function Le(){return{A:!1,B:!1,X:!1,Y:!1,LB:!1,RB:!1,LT:!1,RT:!1,Back:!1,Start:!1,LS:!1,RS:!1,DpadUp:!1,DpadDown:!1,DpadLeft:!1,DpadRight:!1,Home:!1}}function $u(e){const t={};return e.onNavigateUp&&(t.navUp={button:"DpadUp",onPress:e.onNavigateUp,repeatDelay:400,repeatRate:100},t.navUpStick={axis:"LeftY",axisDirection:"negative",onAxisChange:r=>{var a;r>.8&&((a=e.onNavigateUp)==null||a.call(e))}}),e.onNavigateDown&&(t.navDown={button:"DpadDown",onPress:e.onNavigateDown,repeatDelay:400,repeatRate:100},t.navDownStick={axis:"LeftY",axisDirection:"positive",onAxisChange:r=>{var a;r>.8&&((a=e.onNavigateDown)==null||a.call(e))}}),e.onNavigateLeft&&(t.navLeft={button:"DpadLeft",onPress:e.onNavigateLeft,repeatDelay:400,repeatRate:100}),e.onNavigateRight&&(t.navRight={button:"DpadRight",onPress:e.onNavigateRight,repeatDelay:400,repeatRate:100}),e.onConfirm&&(t.confirm={button:"A",onPress:e.onConfirm}),e.onCancel&&(t.cancel={button:"B",onPress:e.onCancel}),e.onTabNext&&(t.tabNext={button:"RB",onPress:e.onTabNext}),e.onTabPrev&&(t.tabPrev={button:"LB",onPress:e.onTabPrev}),e.onMenu&&(t.menu={button:"Start",onPress:e.onMenu}),t}const Ke=c.createContext(null);function nr(e){if(!e)return null;const t=e.getBoundingClientRect();return t.width===0&&t.height===0?null:{x:t.left+t.width/2,y:t.top+t.height/2}}const Ou=({keyboard:e=!0,gamepad:t=!0,gamepadIndex:r=0,children:a})=>{const[n,o]=c.useState([]),[i,s]=c.useState(null),l=c.useRef([]),d=c.useRef(null),u=c.useRef([]),f=c.useRef(0);c.useEffect(()=>{l.current=n},[n]),c.useEffect(()=>{d.current=i},[i]);const h=c.useCallback(()=>{f.current+=1},[]),y=c.useCallback(()=>{f.current=Math.max(0,f.current-1)},[]),m=c.useCallback((M,E)=>{u.current=[...u.current,{prefix:M,onDismiss:E}]},[]),p=c.useCallback(()=>{var L;const M=u.current;if(M.length===0)return;const E=M[M.length-1];u.current=M.slice(0,-1),(L=E.onDismiss)==null||L.call(E)},[]),g=c.useCallback(M=>{o(E=>E.some(L=>L.id===M.id)?E:[...E,M])},[]),v=c.useCallback(M=>{o(E=>{var T;const L=E.filter(N=>N.id!==M);if(d.current===M){const N=((T=L[0])==null?void 0:T.id)??null;s(N),d.current=N}return L})},[]),b=c.useCallback(M=>{s(M),d.current=M},[]),x=c.useCallback((M,E)=>{var ge,he;if(f.current>0)return;const L=l.current.filter(W=>!W.disabled);if(L.length===0)return;const T=d.current,N=T?L.find(W=>W.id===T):void 0;if(!N){const W=L[0];b(W.id),(ge=W.ref.current)==null||ge.focus();return}const R=u.current,I=R.length>0?R[R.length-1]:void 0,D=L.filter(W=>W.id!==T&&(!I||W.id.startsWith(I.prefix))),P=nr(N.ref.current);if(!P||D.length===0)return;let F=null,se=1/0;for(const W of D){const fe=nr(W.ref.current);if(!fe)continue;const ie=fe.x-P.x,j=fe.y-P.y,H=M*ie+E*j;if(H<=0)continue;const U=H,Q=Math.abs(M*j-E*ie),Z=Math.sqrt(ie*ie+j*j)+Q*2-U*.001;Z<se&&(se=Z,F=W)}F&&(b(F.id),(he=F.ref.current)==null||he.focus())},[b]),w=c.useCallback(M=>{var T;if(f.current>0)return;const E=M??d.current;if(!E)return;const L=l.current.find(N=>N.id===E);L&&(L.onActivate?L.onActivate():(T=L.ref.current)==null||T.click())},[]);c.useEffect(()=>{if(!e)return;const M=E=>{if(!(f.current>0))switch(E.key){case"ArrowUp":x(0,-1),E.preventDefault();break;case"ArrowDown":x(0,1),E.preventDefault();break;case"ArrowLeft":x(-1,0),E.preventDefault();break;case"ArrowRight":x(1,0),E.preventDefault();break;case"Enter":case" ":d.current&&(w(),E.preventDefault());break;case"Escape":p();break}};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[e,x,w,p]);const A=c.useRef({x:!0,y:!0}),k=c.useMemo(()=>({navUp:{button:"DpadUp",onPress:()=>x(0,-1),repeatDelay:400,repeatRate:120},navDown:{button:"DpadDown",onPress:()=>x(0,1),repeatDelay:400,repeatRate:120},navLeft:{button:"DpadLeft",onPress:()=>x(-1,0),repeatDelay:400,repeatRate:120},navRight:{button:"DpadRight",onPress:()=>x(1,0),repeatDelay:400,repeatRate:120},confirm:{button:"A",onPress:()=>w()},cancel:{button:"B",onPress:()=>p()},stickX:{axis:"LeftX",onAxisChange:M=>{Math.abs(M)>.6&&A.current.x?(A.current.x=!1,x(Math.sign(M),0)):Math.abs(M)<.3&&(A.current.x=!0)}},stickY:{axis:"LeftY",onAxisChange:M=>{Math.abs(M)>.6&&A.current.y?(A.current.y=!1,x(0,Math.sign(M))):Math.abs(M)<.3&&(A.current.y=!0)}}}),[x,w,p]);Os({index:r,enabled:t,actions:k});const C=c.useMemo(()=>({register:g,unregister:v,moveFocus:x,activate:w,setActive:b,activeId:i,focusables:n,pushFocusTrap:m,popFocusTrap:p,pauseNavigation:h,resumeNavigation:y}),[g,v,x,w,b,i,n,m,p,h,y]);return S.jsx(Ke.Provider,{value:C,children:a})};function ju(){return c.useContext(Ke)}function Bu(){const e=c.useContext(Ke);if(!e)throw new Error("useSpatialNav must be used inside a NiceSpatialNavProvider");return e}function js(e,t){const r=c.useContext(Ke),{id:a,onActivate:n,disabled:o}=t,i=c.useRef(n);i.current=n;const s=r==null?void 0:r.register,l=r==null?void 0:r.unregister,d=r==null?void 0:r.setActive;c.useEffect(()=>{if(!(!s||!l||o))return s({id:a,ref:e,onActivate:()=>{var f;return(f=i.current)==null?void 0:f.call(i)},disabled:o}),()=>l(a)},[s,l,a,o,e]),c.useEffect(()=>{const f=e.current;if(!f||!d||o)return;const h=()=>d(a);return f.addEventListener("focus",h),()=>f.removeEventListener("focus",h)},[d,a,o,e]);const u=(r==null?void 0:r.activeId)===a;return c.useEffect(()=>{const f=e.current;f&&(u?f.dataset.active="true":delete f.dataset.active)},[u,e]),{active:u}}const _u=({focusId:e,onActivate:t,disabled:r,as:a="div",className:n,style:o,children:i,...s})=>{const l=c.useRef(null),{active:d}=js(l,{id:e,onActivate:t,disabled:r});return S.jsx(a,{ref:l,tabIndex:r?-1:0,className:`nice-focusable${d?" nice-focusable--active":""}${n?` ${n}`:""}`,style:o,onClick:t,...s,children:i})};Object.defineProperty(exports,"NICE_SUPPORTED_LANGS",{enumerable:!0,get:()=>_.NICE_SUPPORTED_LANGS});Object.defineProperty(exports,"NiceI18nLazyProvider",{enumerable:!0,get:()=>_.NiceI18nLazyProvider});Object.defineProperty(exports,"NiceI18nProvider",{enumerable:!0,get:()=>_.NiceI18nProvider});Object.defineProperty(exports,"createICUTranslator",{enumerable:!0,get:()=>_.createICUTranslator});Object.defineProperty(exports,"formatICU",{enumerable:!0,get:()=>_.formatICU});Object.defineProperty(exports,"getLoadedNiceDictionary",{enumerable:!0,get:()=>_.getLoadedNiceDictionary});Object.defineProperty(exports,"loadNiceDictionary",{enumerable:!0,get:()=>_.loadNiceDictionary});Object.defineProperty(exports,"useNiceTranslation",{enumerable:!0,get:()=>_.useNiceTranslation});exports.ANIMATION_VALUES=Fe;exports.BatchOperations=Od;exports.COMMON_SHORTCUTS=Qi;exports.CheckMark=ci;exports.ChevronMark=di;exports.CloseMark=fi;exports.ColumnFormulas=Hd;exports.DEFAULT_TRACELESS_POLICY=Bl;exports.DEFAULT_VARIANT_CONFIG=J;exports.DENSITY_VALUES=Se;exports.DisplayModeView=ei;exports.DotMark=ui;exports.GAMEPAD_BUTTONS=$s;exports.ImageOptimization=Nu;exports.IndexedDBAdapter=Dl;exports.LeakDetectorStatus=bl;exports.LocalStorageAdapter=fo;exports.NICE_BREAKPOINTS=me;exports.NICE_BUILTIN_ICONS=ii;exports.NICE_COLOR_BLIND_MODES=dc;exports.NICE_DISPLAY_STYLES=Us;exports.NICE_DISPLAY_STYLE_INFO=Qs;exports.NICE_THEME_GALLERY=In;exports.NICE_THEME_PACKS=Ft;exports.NICE_THEME_PACKS_EXTENDED=$t;exports.NICE_THEME_PACK_FONT_LINKS=Gd;exports.NICE_THEME_PACK_FONT_LINKS_EXTENDED=Qd;exports.NICE_THEME_PACK_LIST=Vo;exports.NICE_THEME_PACK_LIST_EXTENDED=hs;exports.NICE_THEME_PRESETS=it;exports.NICE_VIEW_COMPONENT_TYPES=ou;exports.NiceA11yProvider=Ar;exports.NiceAIProvider=ad;exports.NiceAccessControl=xr;exports.NiceDataCache=lt;exports.NiceDisplayStyleContext=Oe;exports.NiceFieldStatus=Du;exports.NiceFocusable=_u;exports.NiceHelpIcon=co;exports.NiceHelpProvider=ro;exports.NiceIcon=K;exports.NiceIconProvider=ni;exports.NiceInlineHelp=so;exports.NiceKeyboardHint=Rr;exports.NicePreferencesPanel=jl;exports.NiceProfiler=qc;exports.NicePullToRefresh=Wi;exports.NiceQuickHelp=io;exports.NiceRTLProvider=vr;exports.NiceRequestDeduplicator=Eo;exports.NiceSkipLink=Lr;exports.NiceSpatialNavProvider=Ou;exports.NiceStateIO=Ud;exports.NiceSwipeableListItem=_i;exports.NiceTestWrapper=jn;exports.NiceThemeContext=St;exports.NiceThemeProvider=kt;exports.NiceThemeVariantConfigurator=ru;exports.NiceThemeVariantProvider=tu;exports.NiceTouchTarget=Xi;exports.NiceTutorialButton=Il;exports.NiceTutorialsProvider=Tl;exports.NiceUserPreferencesProvider=Ol;exports.NiceVisuallyHidden=Nr;exports.PRIVACY_LEVEL_ORDER=pe;exports.PS_BUTTON_ALIASES=Fu;exports.ProfilerOverlay=Zc;exports.RADIUS_VALUES=be;exports.RefreshMark=li;exports.RestAPISyncAdapter=Hl;exports.SHADOW_DARK_MODE_VALUES=or;exports.SHADOW_VALUES=ze;exports.StorageAdapter=yo;exports.TRACELESS_MODE_PRESETS=po;exports.TRACELESS_POLICY_HEADER=Kl;exports.VARIANT_PRESETS=$e;exports.ValidationRules=$d;exports.accessModeAttrs=$i;exports.aggregate=ae;exports.analog70s=as;exports.applyColorBlindMode=bt;exports.applyTheme=xc;exports.applyVariantConfig=gt;exports.applyVariantsToTheme=Xs;exports.arcticCrystal=Go;exports.artDecoGatsby=Qo;exports.auditStorageCompliance=rd;exports.auditWCAG22AAA=cc;exports.autumnFoliage=Ko;exports.bankVault=Wo;exports.bauhaus=_o;exports.blackTieGala=ps;exports.blueprint=es;exports.brutalistRaw=Do;exports.buildAriaDescribedBy=Er;exports.buildFieldA11y=Tu;exports.buildFormFieldAria=Ki;exports.calculateDataDiff=No;exports.candyPop=Fo;exports.checkAriaCompliance=_c;exports.checkContrastAAA=ic;exports.checkFormatSupport=He;exports.checkRegression=Kn;exports.claymorphism=Bo;exports.clearAllClientStorage=td;exports.clearLeakReports=ol;exports.clearProfilingData=Mt;exports.comicHalftone=cs;exports.configureLeakDetector=al;exports.configureProfiler=_n;exports.createArrayDataSource=fd;exports.createColorBlindController=gc;exports.createCustomDataSource=vd;exports.createEventCleanup=Mu;exports.createGraphQLDataSource=bd;exports.createGraphQLSubscriptionSource=Ml;exports.createId=hc;exports.createImageObserver=Ts;exports.createIndexedDBDataSource=dt;exports.createInfiniteScroll=Nd;exports.createInlineWorker=bu;exports.createLRUCache=xu;exports.createMockDataSource=Bc;exports.createNavigationActions=$u;exports.createNicePluginSystem=vc;exports.createNiceReduxMiddleware=xl;exports.createODataDataSource=yd;exports.createObjectPool=Eu;exports.createOfflineFirstDataSource=Wd;exports.createPermissiveInstanceCeiling=ed;exports.createPolicyHeader=Yl;exports.createReactQueryAdapter=vl;exports.createRestDataSource=So;exports.createRestrictiveInstanceCeiling=Zl;exports.createSSEDataSource=Id;exports.createSignalRDataSource=Td;exports.createStorageAdapter=Ql;exports.createURLStateManager=Xd;exports.createUserPreferencesStore=qd;exports.createWeakCache=Su;exports.createWeakRefCache=wu;exports.createWebSocketDataSource=Ld;exports.createZustandAdapter=Sl;exports.deepSea=rs;exports.defaultValidationMessage=Mo;exports.deprecateProp=Hs;exports.deprecateSymbol=Ru;exports.deriveMode=It;exports.deserializeTheme=Ac;exports.desertDune=qo;exports.dieterRams=ms;exports.endMark=Ve;exports.evaluateCondition=iu;exports.evaluateValidation=Ao;exports.evaluateValidationRule=Co;exports.filterGroupToWhere=Sd;exports.filterNiceThemePacksByTag=Yd;exports.filterNiceThemePacksExtendedByTag=eu;exports.forceGC=hl;exports.forestCanopy=Uo;exports.formatShortcut=Tr;exports.forwardDeprecated=zu;exports.generateBadgeStyles=sr;exports.generateButtonStyles=ut;exports.generateCardStyles=mt;exports.generateColorPlaceholder=zs;exports.generateColumnsFromSchema=Al;exports.generateFillStyles=Vs;exports.generateFormFieldsFromSchema=El;exports.generateFromOpenAPI=Cl;exports.generateGradientPlaceholder=Is;exports.generateInputStyles=ft;exports.generatePaletteFromColor=Mi;exports.generateSizes=Ms;exports.generateSrcset=ks;exports.generateTabStyles=ir;exports.generateTableStyles=dr;exports.generateToggleStyles=cr;exports.generateTooltipStyles=lr;exports.generateTracelessComplianceReport=Xl;exports.generateVariantCSS=pt;exports.getComponentStats=Vn;exports.getComponentStyleFromConfig=fr;exports.getComputedTheme=Mc;exports.getDisplayStyleDataAttrs=mr;exports.getGracefulDegradationInfo=Gl;exports.getLeakReports=nl;exports.getLeakSummary=Jn;exports.getMemoryStats=Re;exports.getMorePrivateMode=_l;exports.getNiceAnimationClass=Pi;exports.getNiceThemePack=Jd;exports.getNiceThemePackExtended=Zd;exports.getPerformanceReport=Un;exports.getProfilingStats=Wn;exports.getRecentTimings=Vc;exports.getSlowRenders=Ct;exports.getTracelessBadgeInfo=ql;exports.getTransferables=vu;exports.glassAurora=Ho;exports.groupBy=Dt;exports.groupByHierarchical=To;exports.hologramUI=ts;exports.hyggeScandinavian=Po;exports.inkSumie=fs;exports.isAtLeastAsPrivate=Te;exports.isRecordValid=Md;exports.isSafeUrl=ri;exports.japaneseWashi=Jo;exports.loadAndDecodeImage=Ot;exports.logicalProps=Hi;exports.matchesFilterCondition=ko;exports.matchesFilterGroup=Pt;exports.matchesShortcut=Zi;exports.measureAsync=Jc;exports.measureSync=Yc;exports.memphis80s=us;exports.moroccanMosaic=Yo;exports.neonArcade=Io;exports.newspaperBroadsheet=$o;exports.niceReduxActions=wl;exports.niceReduxReducer=kl;exports.niceSelectors=$c;exports.niceStaggerDelay=Ii;exports.niceThemeBlue=Dn;exports.niceThemeBootstrap=$n;exports.niceThemeDark=Pn;exports.niceThemeFluent=On;exports.niceThemeHighContrast=Hn;exports.niceThemeLight=wt;exports.niceThemeMaterial=Fn;exports.normalizeSize=_s;exports.normalizeVariant=Ws;exports.obsidianEditorial=zo;exports.parsePolicyFromHeader=Jl;exports.pivot=Pd;exports.preloadImages=Es;exports.printPerformanceReport=At;exports.removeTheme=$r;exports.removeVariantConfig=ur;exports.resolveControlStoragePermissions=Vl;exports.resolveCssColor=Pr;exports.resolveDisplayStyleConfig=ve;exports.resolveStatus=jt;exports.resolveStepsI18n=uo;exports.resolveTestId=Lu;exports.resolveTracelessPolicy=Wl;exports.resolveTutorial=zl;exports.sanitizeHtml=ti;exports.saveBaseline=Gn;exports.selectOptimalSource=Cs;exports.serializeTheme=Cc;exports.setupReactDevToolsIntegration=el;exports.shouldShowConsentBanner=go;exports.simulateKeyboard=Oc;exports.simulateType=jc;exports.sortModelToOrderBy=xd;exports.sovietConstructivist=Zo;exports.startMark=We;exports.swissGrid=gs;exports.synthwave84=Oo;exports.takeMemorySnapshot=gl;exports.testId=Fc;exports.themeAbyss=ga;exports.themeAfricanEarth=Sn;exports.themeAmber=Jr;exports.themeArctic=Aa;exports.themeAurora=wa;exports.themeAutumn=Ma;exports.themeBanking=Ha;exports.themeBrazilianCarnival=vn;exports.themeCarbon=fa;exports.themeCharcoal=Ur;exports.themeCherryBlossom=un;exports.themeChineseNewYear=yn;exports.themeChristmas=nn;exports.themeCoffee=Rn;exports.themeCoolGray=Wr;exports.themeCoral=ia;exports.themeCosmos=ma;exports.themeCyan=ea;exports.themeCyberpunk=tn;exports.themeDesert=Sa;exports.themeDracula=Xa;exports.themeEaster=cn;exports.themeEclipse=da;exports.themeEducation=_a;exports.themeEmerald=Kr;exports.themeEmeraldDark=ya;exports.themeEnhancedContrast=kn;exports.themeEnterprise=ja;exports.themeForest=ba;exports.themeFuchsia=na;exports.themeGlassmorphism=Cn;exports.themeGovernment=Ba;exports.themeHalloween=on;exports.themeHarvest=fn;exports.themeHealthcare=Fa;exports.themeHighContrastDark=xn;exports.themeIndianFestive=bn;exports.themeIndigo=Zr;exports.themeIvory=qr;exports.themeJapaneseZen=mn;exports.themeLargeText=Mn;exports.themeLavender=ka;exports.themeLegal=$a;exports.themeLime=ta;exports.themeMediterranean=hn;exports.themeMidnight=ca;exports.themeMinimalist=Nn;exports.themeMonochrome=wn;exports.themeMonokai=Ga;exports.themeMoroccan=pn;exports.themeNebula=pa;exports.themeNeon=rn;exports.themeNeumorphismDark=En;exports.themeNeumorphismLight=An;exports.themeNord=Va;exports.themeObsidian=la;exports.themeOcean=va;exports.themeOneDark=Ka;exports.themeOnyx=ua;exports.themeOrange=aa;exports.themePastelCoral=Da;exports.themePastelLavender=za;exports.themePastelLemon=Ia;exports.themePastelMint=Ta;exports.themePastelPeach=Ra;exports.themePastelRose=Na;exports.themePastelSage=Pa;exports.themePastelSky=La;exports.themePink=ra;exports.themeRealEstate=Wa;exports.themeRetrowave=an;exports.themeRose=Gr;exports.themeRuby=sa;exports.themeScandinavian=gn;exports.themeSepia=Za;exports.themeShadow=ha;exports.themeSilver=Xr;exports.themeSky=oa;exports.themeSlate=jr;exports.themeSoftDark=Tn;exports.themeSolarizedDark=qa;exports.themeSolarizedLight=Ua;exports.themeSpring=Ca;exports.themeStone=_r;exports.themeSummerBeach=ln;exports.themeSunset=xa;exports.themeSynthwave=Ja;exports.themeTeal=Qr;exports.themeTechStartup=Oa;exports.themeTerminalGreen=Qa;exports.themeToCssVars=Pe;exports.themeTropical=Ea;exports.themeValentine=sn;exports.themeVaporwave=Ya;exports.themeVintage=en;exports.themeViolet=Yr;exports.themeWarmDark=Ln;exports.themeWarmGray=Vr;exports.themeWine=zn;exports.themeWinterFrost=dn;exports.themeZinc=Br;exports.triggerHaptic=kr;exports.typewriterPress=os;exports.useAICompletion=nd;exports.useAccessibleClick=tc;exports.useAdaptiveVariant=Ei;exports.useBrandColors=wi;exports.useBreakpoint=we;exports.useChartPreferences=$l;exports.useChartSuggestion=id;exports.useChunkedProcessor=mu;exports.useClickOutside=vi;exports.useCodeCompletion=od;exports.useCognitiveAccessibility=oc;exports.useColorBlindMode=Ir;exports.useColorBlindModePersisted=pc;exports.useComponentDisplayClass=Ks;exports.useComponentDisplayStyle=Gs;exports.useComponentHelp=no;exports.useContainerSize=Ai;exports.useControlId=yi;exports.useControlPreferences=zt;exports.useControllableState=Iu;exports.useDarkMode=xi;exports.useDebouncedValue=bi;exports.useDecodedImage=Ls;exports.useDeferredList=pu;exports.useDeferredSearch=uu;exports.useDevice=gr;exports.useDisplayAnimation=Ys;exports.useDisplayDensity=Js;exports.useDisplayModeEdit=Zs;exports.useEventCleanup=ku;exports.useFocusManagement=nc;exports.useFocusTrap=Si;exports.useFormGeneration=cd;exports.useGamepad=Os;exports.useGridPreferences=Fl;exports.useHaptic=Vi;exports.useHoldRepeat=hi;exports.useImageFormats=ws;exports.useImagePreload=Ns;exports.useInputMode=pi;exports.useIsTouchDevice=mi;exports.useLazyImage=Au;exports.useLiveAnnouncement=zr;exports.useLongPress=gi;exports.useMeasureEffect=Qc;exports.useMediaQuery=Ie;exports.useMemoryMonitor=yl;exports.useMemoryMonitorPerf=Cu;exports.useNaturalLanguageFilter=sd;exports.useNiceA11y=Gi;exports.useNiceAI=ue;exports.useNiceAccessMode=Fi;exports.useNiceCollapse=zi;exports.useNiceDataSource=jd;exports.useNiceDisplayStyle=qs;exports.useNiceField=Bd;exports.useNiceHelp=ao;exports.useNiceIcon=si;exports.useNiceLookupSource=_d;exports.useNiceRTL=Di;exports.useNiceRecord=Ro;exports.useNiceTheme=Ic;exports.useNiceTransition=Ri;exports.useNiceTutorials=lo;exports.useNiceTutorialsEnabled=Rl;exports.useOptimistic=gu;exports.useOrientation=Li;exports.usePan=Bi;exports.usePinch=ji;exports.useProgressiveImage=As;exports.usePullToRefresh=wr;exports.useRenderCount=Kc;exports.useResolvedDisplayStyle=xe;exports.useResponsiveValue=Ci;exports.useRestoreFocus=Yi;exports.useRouteAnnouncement=ac;exports.useRovingTabIndex=Ji;exports.useSafeAbortController=Yn;exports.useSafeAreaInsets=Ti;exports.useSafeEventListener=ll;exports.useSafeFetch=dl;exports.useSafeInterval=cl;exports.useSafeState=sl;exports.useSafeSubscription=ul;exports.useSafeTimeout=il;exports.useSafeWebSocket=fl;exports.useSharedImageObserver=Rs;exports.useShowAt=Ni;exports.useSpatialFocusable=js;exports.useSpatialNav=Bu;exports.useSpatialNavOptional=ju;exports.useSubmitOnEnter=ec;exports.useSwipe=Oi;exports.useTextImprovement=ld;exports.useThemeIsDark=nu;exports.useThemeVariants=bs;exports.useTransitionState=fu;exports.useUnmountLog=pl;exports.useUserPreferences=Rt;exports.useVirtualGrid=lu;exports.useVirtualKeyboard=Ui;exports.useVirtualScroll=xs;exports.useVoiceControl=rc;exports.useWhyDidYouRender=Xn;exports.useWindowedList=du;exports.useWorker=hu;exports.useWorkerPool=yu;exports.validateData=Fd;exports.validateViewDocument=su;exports.vhsTracking=ns;exports.vogueDidone=is;exports.warnControlledClash=Ps;exports.watercolorWash=ds;exports.withCaching=Cd;exports.withCalculatedColumns=Dd;exports.withCrossTabSync=Vd;exports.withCursorPagination=Ad;exports.withLeakTracking=ml;exports.withOptimisticUpdates=Rd;exports.withPolling=zd;exports.withWhyDidYouRender=Gc;exports.y2kAqua=ss;exports.zenMinimal=jo;exports.zinePunk=ls;
153
+ </svg>`;return`data:image/svg+xml,${encodeURIComponent(i)}`}const pu={checkFormatSupport:He,useImageFormats:Si,generateSrcset:vi,generateSizes:xi,selectOptimalSource:wi,useProgressiveImage:ki,preloadImages:Ci,useImagePreload:Ei,loadAndDecodeImage:Ht,useDecodedImage:Ni,createImageObserver:Ai,useSharedImageObserver:Mi,generateColorPlaceholder:Ti,generateGradientPlaceholder:Ii};function gu(e){return e["data-testid"]??e.testId}function _t(e){return e.error||e.status==="error"?"error":e.warning||e.status==="warning"?"warning":e.success||e.status==="success"?"success":e.status??"idle"}function yu(e){const t=_t(e),r={};return t==="error"&&(r["aria-invalid"]=!0),e.required&&(r["aria-required"]=!0),e.disabled&&(r["aria-disabled"]=!0),e.readOnly&&(r["aria-readonly"]=!0),e.describedById&&(r["aria-describedby"]=e.describedById),r}const tr=new Set;function Ri(e,t,r){process.env.NODE_ENV!=="production"&&t!==void 0&&r!==void 0&&!tr.has(e)&&(tr.add(e),console.warn(`[Nice2Dev] <${e}> received both \`value\` and \`defaultValue\`. Use one or the other (controlled XOR uncontrolled).`))}const rr=new Set;function Li(e,t){process.env.NODE_ENV!=="production"&&(rr.has(e)||(rr.add(e),t()))}function Fi(e){const{componentName:t,prop:r,replacement:a,removeIn:n,reason:o}=e;Li(`prop:${t}.${r}`,()=>{const s=[`[Nice2Dev] Prop \`${r}\` on <${t}> is deprecated.`,a?`Use \`${a}\` instead.`:"",n?`Will be removed in ${n}.`:"",o?`Reason: ${o}`:""].filter(Boolean);console.warn(s.join(" "))})}function hu(e){const{symbol:t,replacement:r,removeIn:a,reason:n}=e;Li(`symbol:${t}`,()=>{const o=[`[Nice2Dev] \`${t}\` is deprecated.`,r?`Use \`${r}\` instead.`:"",a?`Will be removed in ${a}.`:"",n?`Reason: ${n}`:""].filter(Boolean);console.warn(o.join(" "))})}function bu(e){return e.value!==void 0&&e.newValue===void 0&&Fi({componentName:e.componentName,prop:e.prop,replacement:e.replacement,removeIn:e.removeIn}),e.newValue??e.value}const ar=new Set;function Su(e){const{value:t,defaultValue:r,fallbackValue:a,onChange:n,componentName:o="Component"}=e,s=t!==void 0,[i,c]=l.useState(()=>r!==void 0?r:a),d=l.useRef(s);process.env.NODE_ENV!=="production"&&(d.current!==s&&!ar.has(o)&&(ar.add(o),console.warn(`[Nice2Dev] <${o}> switched between controlled and uncontrolled. A component should not change between the two over its lifetime.`)),d.current=s,Ri(o,t,r));const u=s?t:i,f=l.useRef(u);f.current=u;const h=l.useCallback((b,p)=>{const m=typeof b=="function"?b(f.current):b;f.current=m,s||c(m),p===void 0?n==null||n(m):n==null||n(m,p)},[s,n]);return[u,h,s]}const vu={idle:"nice-field-status nice-field-status--idle",success:"nice-field-status nice-field-status--success",warning:"nice-field-status nice-field-status--warning",error:"nice-field-status nice-field-status--error"};function xu(e){const t=_t(e),r=t==="error"&&(typeof e.error=="string"?e.error:void 0)||t==="warning"&&e.warning||t==="success"&&e.success||e.helperText||null;return r?x.jsx("div",{id:e.id,role:t==="error"?"alert":void 0,"aria-live":t==="error"?"assertive":"polite","data-testid":e.testId,className:[vu[t],e.className].filter(Boolean).join(" "),children:r}):null}const Di={0:"A",1:"B",2:"X",3:"Y",4:"LB",5:"RB",6:"LT",7:"RT",8:"Back",9:"Start",10:"LS",11:"RS",12:"DpadUp",13:"DpadDown",14:"DpadLeft",15:"DpadRight",16:"Home"},wu={0:"LeftX",1:"LeftY",2:"RightX",3:"RightY"},ku={Cross:"A",Circle:"B",Square:"X",Triangle:"Y",L1:"LB",R1:"RB",L2:"LT",R2:"RT",Share:"Back",Options:"Start",L3:"LS",R3:"RS",PS:"Home"},Ot=Object.values(Di);function Cu(e,t){if(e.connected!==t.connected||e.id!==t.id||e.leftTrigger!==t.leftTrigger||e.rightTrigger!==t.rightTrigger)return!1;for(const r of Ot)if(e.buttons[r]!==t.buttons[r])return!1;return Object.keys(e.axes).every(r=>e.axes[r]===t.axes[r])}function Eu(e={}){const{index:t=0,deadzone:r=.15,pollRate:a=16,actions:n={},enabled:o=!0,onButtonDown:s,onButtonUp:i}=e,[c,d]=l.useState({connected:!1,id:"",buttons:Re(),axes:{LeftX:0,LeftY:0,RightX:0,RightY:0},leftTrigger:0,rightTrigger:0,vibrate:()=>{}}),u=l.useRef(Re()),f=l.useRef(new Map),h=l.useRef(n);h.current=n;const b=l.useRef({onButtonDown:s,onButtonUp:i});b.current={onButtonDown:s,onButtonUp:i};const p=l.useRef({left:0,right:0}),m=l.useCallback((S,y=.5,v=.5)=>{typeof window<"u"&&N.getInputEngine().rumble(t,S,y,v)},[t]),g=l.useCallback(S=>{if(Math.abs(S)<r)return 0;const y=S>0?1:-1,v=(Math.abs(S)-r)/(1-r);return y*v},[r]);return l.useEffect(()=>{if(!o||typeof window>"u")return;const S=N.getInputEngine();let y=-1/0;const v=(C,A)=>{var de,ne,oe,pe,Te,Ie,ge,Bt;if(A-y<a)return;y=A;const M=C.find(B=>B.index===t);if(!M)return;const I=Re();for(let B=0;B<M.buttons.length;B++){const z=Di[B];z&&(I[z]=M.buttons[B].pressed)}const $={LeftX:0,LeftY:0,RightX:0,RightY:0};for(let B=0;B<Math.min(M.axes.length,4);B++){const z=wu[B];z&&($[z]=g(M.axes[B]))}const T=((de=M.buttons[6])==null?void 0:de.value)??0,D=((ne=M.buttons[7])==null?void 0:ne.value)??0,{onButtonDown:F,onButtonUp:P}=b.current;if(F||P)for(const B of Ot)I[B]&&!u.current[B]?F==null||F(B):!I[B]&&u.current[B]&&(P==null||P(B));const L=Date.now(),O=h.current;for(const[B,z]of Object.entries(O)){if(z.button||z.buttons){const X=z.buttons||[z.button],ue=X.every(Q=>I[Q]),ye=X.every(Q=>u.current[Q]);if(ue&&!ye)(oe=z.onPress)==null||oe.call(z),f.current.set(B,{startTime:L,lastRepeat:L});else if(!ue&&ye)(pe=z.onRelease)==null||pe.call(z),f.current.delete(B);else if(ue&&((Te=z.onHold)==null||Te.call(z),z.repeatDelay!==void 0&&z.repeatRate!==void 0)){const Q=f.current.get(B);Q&&L-Q.startTime>z.repeatDelay&&L-Q.lastRepeat>=z.repeatRate&&((Ie=z.onPress)==null||Ie.call(z),Q.lastRepeat=L)}}if(z.axis&&z.onAxisChange){const X=$[z.axis];z.axisDirection?z.axisDirection==="positive"&&X>0?z.onAxisChange(X):z.axisDirection==="negative"&&X<0&&z.onAxisChange(Math.abs(X)):z.onAxisChange(X)}if(z.trigger){const X=z.trigger==="LT"?T:D,ue=z.trigger==="LT"?p.current.left>.5:p.current.right>.5,ye=X>.5;ye&&!ue?(ge=z.onPress)==null||ge.call(z):!ye&&ue&&((Bt=z.onRelease)==null||Bt.call(z))}}u.current=I,p.current={left:T,right:D};const V={connected:!0,id:M.id,buttons:I,axes:$,leftTrigger:T,rightTrigger:D,vibrate:m};d(B=>Cu(B,V)&&B.vibrate===m?B:V)},k=()=>{const C=S.getState().pads.find(A=>A.index===t);C||(u.current=Re()),d(A=>A.connected===!!C&&A.id===((C==null?void 0:C.id)??"")?A:{...A,connected:!!C,id:(C==null?void 0:C.id)??"",vibrate:m})},E=S.subscribeGamepadFrames(v),w=S.subscribe(k);return k(),()=>{E(),w()}},[o,t,a,g,m]),c}function Re(){return{A:!1,B:!1,X:!1,Y:!1,LB:!1,RB:!1,LT:!1,RT:!1,Back:!1,Start:!1,LS:!1,RS:!1,DpadUp:!1,DpadDown:!1,DpadLeft:!1,DpadRight:!1,Home:!1}}function nr(e){let t=!0;return r=>{r>.8&&t?(t=!1,e()):r<.3&&(t=!0)}}function Nu(e){const t={};return e.onNavigateUp&&(t.navUp={button:"DpadUp",onPress:e.onNavigateUp,repeatDelay:400,repeatRate:100},t.navUpStick={axis:"LeftY",axisDirection:"negative",onAxisChange:nr(()=>{var r;return(r=e.onNavigateUp)==null?void 0:r.call(e)})}),e.onNavigateDown&&(t.navDown={button:"DpadDown",onPress:e.onNavigateDown,repeatDelay:400,repeatRate:100},t.navDownStick={axis:"LeftY",axisDirection:"positive",onAxisChange:nr(()=>{var r;return(r=e.onNavigateDown)==null?void 0:r.call(e)})}),e.onNavigateLeft&&(t.navLeft={button:"DpadLeft",onPress:e.onNavigateLeft,repeatDelay:400,repeatRate:100}),e.onNavigateRight&&(t.navRight={button:"DpadRight",onPress:e.onNavigateRight,repeatDelay:400,repeatRate:100}),e.onConfirm&&(t.confirm={button:"A",onPress:e.onConfirm}),e.onCancel&&(t.cancel={button:"B",onPress:e.onCancel}),e.onTabNext&&(t.tabNext={button:"RB",onPress:e.onTabNext}),e.onTabPrev&&(t.tabPrev={button:"LB",onPress:e.onTabPrev}),e.onMenu&&(t.menu={button:"Start",onPress:e.onMenu}),t}const Je=l.createContext(null);function or(e){if(!e)return null;const t=e.getBoundingClientRect();return t.width===0&&t.height===0?null:{x:t.left+t.width/2,y:t.top+t.height/2}}const Au={up:[0,-1],down:[0,1],left:[-1,0],right:[1,0]},Mu=({keyboard:e=!0,gamepad:t=!0,children:r})=>{const[a,n]=l.useState([]),[o,s]=l.useState(null),i=l.useRef([]),c=l.useRef(null),d=l.useRef([]),u=l.useRef(0);l.useEffect(()=>{i.current=a},[a]),l.useEffect(()=>{c.current=o},[o]);const f=l.useCallback(()=>{u.current+=1},[]),h=l.useCallback(()=>{u.current=Math.max(0,u.current-1)},[]),b=l.useCallback((E,w)=>{d.current=[...d.current,{prefix:E,onDismiss:w}]},[]),p=l.useCallback(()=>{var C;const E=d.current;if(E.length===0)return;const w=E[E.length-1];d.current=E.slice(0,-1),(C=w.onDismiss)==null||C.call(w)},[]),m=l.useCallback(E=>{n(w=>w.some(C=>C.id===E.id)?w:[...w,E])},[]),g=l.useCallback(E=>{n(w=>{var A;const C=w.filter(M=>M.id!==E);if(c.current===E){const M=((A=C[0])==null?void 0:A.id)??null;s(M),c.current=M}return C})},[]),S=l.useCallback(E=>{s(E),c.current=E},[]),y=l.useCallback((E,w)=>{var L,O;if(u.current>0)return;const C=i.current.filter(V=>!V.disabled);if(C.length===0)return;const A=c.current,M=A?C.find(V=>V.id===A):void 0;if(!M){const V=C[0];S(V.id),(L=V.ref.current)==null||L.focus();return}const I=d.current,$=I.length>0?I[I.length-1]:void 0,T=C.filter(V=>V.id!==A&&(!$||V.id.startsWith($.prefix))),D=or(M.ref.current);if(!D||T.length===0)return;let F=null,P=1/0;for(const V of T){const de=or(V.ref.current);if(!de)continue;const ne=de.x-D.x,oe=de.y-D.y,pe=E*ne+w*oe;if(pe<=0)continue;const Te=pe,Ie=Math.abs(E*oe-w*ne),ge=Math.sqrt(ne*ne+oe*oe)+Ie*2-Te*.001;ge<P&&(P=ge,F=V)}F&&(S(F.id),(O=F.ref.current)==null||O.focus())},[S]),v=l.useCallback(E=>{var A;if(u.current>0)return;const w=E??c.current;if(!w)return;const C=i.current.find(M=>M.id===w);C&&(C.onActivate?C.onActivate():(A=C.ref.current)==null||A.click())},[]);N.useIntent(["navigate","activate","back"],E=>{if(u.current>0)return!1;const w=E.source==="keyboard";if(w&&!e||!w&&!t)return!1;if(E.intent==="navigate"){if(i.current.length===0||!E.direction)return!1;const[C,A]=Au[E.direction];return y(C,A),!0}return E.intent==="activate"?c.current?(v(),!0):!1:d.current.length===0?!1:(p(),!0)});const k=l.useMemo(()=>({register:m,unregister:g,moveFocus:y,activate:v,setActive:S,activeId:o,focusables:a,pushFocusTrap:b,popFocusTrap:p,pauseNavigation:f,resumeNavigation:h}),[m,g,y,v,S,o,a,b,p,f,h]);return x.jsx(Je.Provider,{value:k,children:r})};function Tu(){return l.useContext(Je)}function Iu(){const e=l.useContext(Je);if(!e)throw new Error("useSpatialNav must be used inside a NiceSpatialNavProvider");return e}function Pi(e,t){const r=l.useContext(Je),{id:a,onActivate:n,disabled:o}=t,s=l.useRef(n);s.current=n;const i=r==null?void 0:r.register,c=r==null?void 0:r.unregister,d=r==null?void 0:r.setActive;l.useEffect(()=>{if(!(!i||!c||o))return i({id:a,ref:e,onActivate:()=>{var f;return(f=s.current)==null?void 0:f.call(s)},disabled:o}),()=>c(a)},[i,c,a,o,e]),l.useEffect(()=>{const f=e.current;if(!f||!d||o)return;const h=()=>d(a);return f.addEventListener("focus",h),()=>f.removeEventListener("focus",h)},[d,a,o,e]);const u=(r==null?void 0:r.activeId)===a;return l.useEffect(()=>{const f=e.current;f&&(u?f.dataset.active="true":delete f.dataset.active)},[u,e]),{active:u}}const Ru=({focusId:e,onActivate:t,disabled:r,as:a="div",className:n,style:o,children:s,...i})=>{const c=l.useRef(null),{active:d}=Pi(c,{id:e,onActivate:t,disabled:r});return x.jsx(a,{ref:c,tabIndex:r?-1:0,className:`nice-focusable${d?" nice-focusable--active":""}${n?` ${n}`:""}`,style:o,onClick:t,...i,children:s})};exports.IndexedDBAdapter=N.IndexedDBAdapter;exports.LocalStorageAdapter=N.LocalStorageAdapter;exports.NICE_BUILTIN_ICONS=N.NICE_BUILTIN_ICONS;exports.NICE_DEFAULT_GAMEPAD_BINDINGS=N.NICE_DEFAULT_GAMEPAD_BINDINGS;exports.NICE_DEFAULT_KEYBOARD_BINDINGS=N.NICE_DEFAULT_KEYBOARD_BINDINGS;exports.NICE_ENGAGE_EVENT=N.NICE_ENGAGE_EVENT;exports.NICE_GAMEPAD_BUTTONS=N.NICE_GAMEPAD_BUTTONS;exports.NICE_INPUT_DEFAULTS=N.NICE_INPUT_DEFAULTS;exports.NICE_INTENTS=N.NICE_INTENTS;exports.NICE_INTENT_EVENT=N.NICE_INTENT_EVENT;exports.NICE_KEYBOARD_LAYOUTS=N.NICE_KEYBOARD_LAYOUTS;exports.NICE_KEYBOARD_NUMERIC=N.NICE_KEYBOARD_NUMERIC;exports.NICE_KEYBOARD_NUMPAD=N.NICE_KEYBOARD_NUMPAD;exports.NICE_KEYBOARD_PHONE=N.NICE_KEYBOARD_PHONE;exports.NICE_KEYBOARD_PIN=N.NICE_KEYBOARD_PIN;exports.NICE_KEY_BACKSPACE=N.NICE_KEY_BACKSPACE;exports.NICE_KEY_CAPS=N.NICE_KEY_CAPS;exports.NICE_KEY_ENTER=N.NICE_KEY_ENTER;exports.NICE_KEY_SHIFT=N.NICE_KEY_SHIFT;exports.NICE_KEY_SPACE=N.NICE_KEY_SPACE;exports.NICE_KEY_TAB=N.NICE_KEY_TAB;exports.NICE_ROVING_ITEMS=N.NICE_ROVING_ITEMS;exports.NiceButtonPrompt=N.NiceButtonPrompt;exports.NiceControlHint=N.NiceControlHint;exports.NiceFocusScope=N.NiceFocusScope;exports.NiceGamepadPoller=N.NiceGamepadPoller;exports.NiceIcon=N.NiceIcon;exports.NiceIconProvider=N.NiceIconProvider;exports.NiceInputEngine=N.NiceInputEngine;exports.NiceInputHintBar=N.NiceInputHintBar;exports.NiceInputProvider=N.NiceInputProvider;exports.NiceKeyCap=N.NiceKeyCap;exports.NicePreferencesPanel=N.NicePreferencesPanel;exports.NiceUserPreferencesProvider=N.NiceUserPreferencesProvider;exports.RestAPISyncAdapter=N.RestAPISyncAdapter;exports.applyFocusScope=N.applyFocusScope;exports.buildKeyboardRows=N.buildKeyboardRows;exports.chordMatches=N.chordMatches;exports.chordToString=N.chordToString;exports.clickElement=N.clickElement;exports.clickOnActivationKey=N.clickOnActivationKey;exports.confirmButtonFor=N.confirmButtonFor;exports.createTabEscape=N.createTabEscape;exports.deleteBeforeCaret=N.deleteBeforeCaret;exports.detectGamepadFamily=N.detectGamepadFamily;exports.engageKindOf=N.engageKindOf;exports.findFocusTarget=N.findFocusTarget;exports.findRegionTarget=N.findRegionTarget;exports.focusCandidates=N.focusCandidates;exports.gamepadButtonLabel=N.gamepadButtonLabel;exports.gamepadGlyphName=N.gamepadGlyphName;exports.gamepadIntentMap=N.gamepadIntentMap;exports.getInputEngine=N.getInputEngine;exports.hintsForFocus=N.hintsForFocus;exports.insertAtCaret=N.insertAtCaret;exports.intentFromKey=N.intentFromKey;exports.isClickActivatable=N.isClickActivatable;exports.isEngaged=N.isEngaged;exports.isFocusCandidate=N.isFocusCandidate;exports.isMacPlatform=N.isMacPlatform;exports.isRtlKeyboardLanguage=N.isRtlKeyboardLanguage;exports.isTextInput=N.isTextInput;exports.keyFace=N.keyFace;exports.moveTextCaret=N.moveTextCaret;exports.normalizeKey=N.normalizeKey;exports.parseKeyChord=N.parseKeyChord;exports.pickInDirection=N.pickInDirection;exports.readScope=N.readScope;exports.rectOf=N.rectOf;exports.remoteIntent=N.remoteIntent;exports.resolveGamepadBindings=N.resolveGamepadBindings;exports.resolveKeyboardBindings=N.resolveKeyboardBindings;exports.restoresOnCancel=N.restoresOnCancel;exports.setFieldText=N.setFieldText;exports.setInputHints=N.setInputHints;exports.spatialScore=N.spatialScore;exports.splitChord=N.splitChord;exports.toAriaKeyShortcuts=N.toAriaKeyShortcuts;exports.toGamepadButton=N.toGamepadButton;exports.triggerNiceAction=N.triggerNiceAction;exports.useChartPreferences=N.useChartPreferences;exports.useConnectedGamepads=N.useConnectedGamepads;exports.useControlPreferences=N.useControlPreferences;exports.useEngage=N.useEngage;exports.useFocusScope=N.useFocusScope;exports.useFocusedElement=N.useFocusedElement;exports.useGamepadFamily=N.useGamepadFamily;exports.useGridFocus=N.useGridFocus;exports.useGridPreferences=N.useGridPreferences;exports.useHintsVisible=N.useHintsVisible;exports.useInputEngine=N.useInputEngine;exports.useInputHints=N.useInputHints;exports.useInputMethod=N.useInputMethod;exports.useInputPreferences=N.useInputPreferences;exports.useInputState=N.useInputState;exports.useIntent=N.useIntent;exports.useMenuButton=N.useMenuButton;exports.useNiceAction=N.useNiceAction;exports.useNiceActions=N.useNiceActions;exports.useNiceIcon=N.useNiceIcon;exports.useOverlayFocus=N.useOverlayFocus;exports.useRovingFocus=N.useRovingFocus;exports.useTreeFocus=N.useTreeFocus;exports.useUserPreferences=N.useUserPreferences;exports.useUserPreferencesOptional=N.useUserPreferencesOptional;Object.defineProperty(exports,"NICE_SUPPORTED_LANGS",{enumerable:!0,get:()=>j.NICE_SUPPORTED_LANGS});Object.defineProperty(exports,"NiceI18nLazyProvider",{enumerable:!0,get:()=>j.NiceI18nLazyProvider});Object.defineProperty(exports,"NiceI18nProvider",{enumerable:!0,get:()=>j.NiceI18nProvider});Object.defineProperty(exports,"createICUTranslator",{enumerable:!0,get:()=>j.createICUTranslator});Object.defineProperty(exports,"formatICU",{enumerable:!0,get:()=>j.formatICU});Object.defineProperty(exports,"getLoadedNiceDictionary",{enumerable:!0,get:()=>j.getLoadedNiceDictionary});Object.defineProperty(exports,"loadNiceDictionary",{enumerable:!0,get:()=>j.loadNiceDictionary});Object.defineProperty(exports,"useNiceTranslation",{enumerable:!0,get:()=>j.useNiceTranslation});exports.ANIMATION_VALUES=_e;exports.BatchOperations=Ed;exports.COMMON_SHORTCUTS=js;exports.CheckMark=Qi;exports.ChevronMark=es;exports.CloseMark=rs;exports.ColumnFormulas=wd;exports.DEFAULT_TRACELESS_POLICY=Al;exports.DEFAULT_VARIANT_CONFIG=Y;exports.DENSITY_VALUES=ve;exports.DisplayModeView=qi;exports.DotMark=ts;exports.GAMEPAD_BUTTONS=Ot;exports.ImageOptimization=pu;exports.LeakDetectorStatus=dl;exports.NICE_BREAKPOINTS=fe;exports.NICE_COLOR_BLIND_MODES=rc;exports.NICE_DISPLAY_STYLES=Bi;exports.NICE_DISPLAY_STYLE_INFO=Xi;exports.NICE_THEME_GALLERY=Ln;exports.NICE_THEME_PACKS=zt;exports.NICE_THEME_PACKS_EXTENDED=$t;exports.NICE_THEME_PACK_FONT_LINKS=Dd;exports.NICE_THEME_PACK_FONT_LINKS_EXTENDED=Hd;exports.NICE_THEME_PACK_LIST=Bo;exports.NICE_THEME_PACK_LIST_EXTENDED=mi;exports.NICE_THEME_PRESETS=lt;exports.NICE_VIEW_COMPONENT_TYPES=Kd;exports.NiceA11yProvider=Nr;exports.NiceAIProvider=Wl;exports.NiceAccessControl=xr;exports.NiceDataCache=ut;exports.NiceDisplayStyleContext=Be;exports.NiceFieldStatus=xu;exports.NiceFocusable=Ru;exports.NiceHelpIcon=so;exports.NiceHelpProvider=to;exports.NiceInlineHelp=oo;exports.NiceKeyboardHint=Ir;exports.NiceProfiler=_c;exports.NicePullToRefresh=Fs;exports.NiceQuickHelp=io;exports.NiceRTLProvider=Sr;exports.NiceRequestDeduplicator=Co;exports.NiceSkipLink=Tr;exports.NiceSpatialNavProvider=Mu;exports.NiceStateIO=Ld;exports.NiceSwipeableListItem=Ls;exports.NiceTestWrapper=_n;exports.NiceThemeContext=xt;exports.NiceThemeProvider=Ct;exports.NiceThemeVariantConfigurator=jd;exports.NiceThemeVariantProvider=Bd;exports.NiceTouchTarget=Ps;exports.NiceTutorialButton=El;exports.NiceTutorialsProvider=wl;exports.NiceVisuallyHidden=Mr;exports.PRIVACY_LEVEL_ORDER=me;exports.PS_BUTTON_ALIASES=ku;exports.ProfilerOverlay=Kc;exports.RADIUS_VALUES=be;exports.RefreshMark=Zi;exports.SHADOW_DARK_MODE_VALUES=ir;exports.SHADOW_VALUES=De;exports.StorageAdapter=po;exports.TRACELESS_MODE_PRESETS=uo;exports.TRACELESS_POLICY_HEADER=Pl;exports.VARIANT_PRESETS=Oe;exports.ValidationRules=Cd;exports.accessModeAttrs=Ms;exports.aggregate=te;exports.analog70s=ei;exports.applyColorBlindMode=St;exports.applyTheme=mc;exports.applyVariantConfig=ht;exports.applyVariantsToTheme=Oi;exports.arcticCrystal=Ko;exports.artDecoGatsby=qo;exports.auditStorageCompliance=jl;exports.auditWCAG22AAA=ec;exports.autumnFoliage=Uo;exports.bankVault=Oo;exports.bauhaus=_o;exports.blackTieGala=ui;exports.blueprint=Jo;exports.brutalistRaw=Lo;exports.buildAriaDescribedBy=Ar;exports.buildFieldA11y=yu;exports.buildFormFieldAria=_s;exports.calculateDataDiff=Eo;exports.candyPop=Do;exports.checkAriaCompliance=Dc;exports.checkContrastAAA=Zs;exports.checkFormatSupport=He;exports.checkRegression=Gn;exports.claymorphism=Ho;exports.clearAllClientStorage=Bl;exports.clearLeakReports=Jc;exports.clearProfilingData=Et;exports.comicHalftone=oi;exports.configureLeakDetector=qc;exports.configureProfiler=Bn;exports.createArrayDataSource=Ql;exports.createColorBlindController=sc;exports.createCustomDataSource=od;exports.createEventCleanup=du;exports.createGraphQLDataSource=nd;exports.createGraphQLSubscriptionSource=yl;exports.createId=cc;exports.createImageObserver=Ai;exports.createIndexedDBDataSource=ft;exports.createInfiniteScroll=pd;exports.createInlineWorker=nu;exports.createLRUCache=su;exports.createMockDataSource=Fc;exports.createNavigationActions=Nu;exports.createNicePluginSystem=uc;exports.createNiceReduxMiddleware=ml;exports.createODataDataSource=ad;exports.createObjectPool=mu;exports.createOfflineFirstDataSource=Td;exports.createPermissiveInstanceCeiling=Ol;exports.createPolicyHeader=$l;exports.createReactQueryAdapter=ul;exports.createRestDataSource=ho;exports.createRestrictiveInstanceCeiling=_l;exports.createSSEDataSource=Sd;exports.createSignalRDataSource=yd;exports.createStorageAdapter=Hl;exports.createURLStateManager=Rd;exports.createUserPreferencesStore=Fd;exports.createWeakCache=iu;exports.createWeakRefCache=cu;exports.createWebSocketDataSource=gd;exports.createZustandAdapter=fl;exports.deepSea=Zo;exports.defaultValidationMessage=xo;exports.deprecateProp=Fi;exports.deprecateSymbol=hu;exports.deriveMode=Lt;exports.deserializeTheme=bc;exports.desertDune=Vo;exports.dieterRams=di;exports.endMark=Ue;exports.evaluateCondition=Xd;exports.evaluateValidation=ko;exports.evaluateValidationRule=wo;exports.filterGroupToWhere=id;exports.filterNiceThemePacksByTag=$d;exports.filterNiceThemePacksExtendedByTag=Od;exports.forceGC=cl;exports.forestCanopy=Wo;exports.formatShortcut=Ws;exports.forwardDeprecated=bu;exports.generateBadgeStyles=sr;exports.generateButtonStyles=mt;exports.generateCardStyles=gt;exports.generateColorPlaceholder=Ti;exports.generateColumnsFromSchema=bl;exports.generateFillStyles=_i;exports.generateFormFieldsFromSchema=Sl;exports.generateFromOpenAPI=hl;exports.generateGradientPlaceholder=Ii;exports.generateInputStyles=pt;exports.generatePaletteFromColor=ps;exports.generateSizes=xi;exports.generateSrcset=vi;exports.generateTabStyles=cr;exports.generateTableStyles=ur;exports.generateToggleStyles=lr;exports.generateTooltipStyles=dr;exports.generateTracelessComplianceReport=Rl;exports.generateVariantCSS=yt;exports.getComponentStats=Wn;exports.getComponentStyleFromConfig=mr;exports.getComputedTheme=yc;exports.getDisplayStyleDataAttrs=pr;exports.getGracefulDegradationInfo=Dl;exports.getLeakReports=Yc;exports.getLeakSummary=qn;exports.getMemoryStats=Fe;exports.getMorePrivateMode=Ml;exports.getNiceAnimationClass=Cs;exports.getNiceThemePack=zd;exports.getNiceThemePackExtended=_d;exports.getPerformanceReport=Kn;exports.getProfilingStats=jn;exports.getRecentTimings=zc;exports.getSlowRenders=Nt;exports.getTracelessBadgeInfo=Fl;exports.getTransferables=ou;exports.glassAurora=Fo;exports.groupBy=Dt;exports.groupByHierarchical=Ao;exports.hologramUI=Qo;exports.hyggeScandinavian=Ro;exports.inkSumie=li;exports.isAtLeastAsPrivate=Le;exports.isRecordValid=dd;exports.isSafeUrl=Ji;exports.japaneseWashi=Xo;exports.loadAndDecodeImage=Ht;exports.logicalProps=Ns;exports.matchesFilterCondition=vo;exports.matchesFilterGroup=Ft;exports.matchesShortcut=Vs;exports.measureAsync=jc;exports.measureSync=Wc;exports.memphis80s=ci;exports.moroccanMosaic=Go;exports.neonArcade=Io;exports.newspaperBroadsheet=Po;exports.niceReduxActions=pl;exports.niceReduxReducer=gl;exports.niceSelectors=Ic;exports.niceStaggerDelay=ks;exports.niceThemeBlue=Dn;exports.niceThemeBootstrap=$n;exports.niceThemeDark=Fn;exports.niceThemeFluent=Hn;exports.niceThemeHighContrast=Pn;exports.niceThemeLight=kt;exports.niceThemeMaterial=zn;exports.normalizeSize=$i;exports.normalizeVariant=Hi;exports.obsidianEditorial=To;exports.parsePolicyFromHeader=zl;exports.pivot=vd;exports.preloadImages=Ci;exports.printPerformanceReport=At;exports.removeTheme=$r;exports.removeVariantConfig=fr;exports.resolveControlStoragePermissions=Il;exports.resolveCssColor=Fr;exports.resolveDisplayStyleConfig=Se;exports.resolveStatus=_t;exports.resolveStepsI18n=lo;exports.resolveTestId=gu;exports.resolveTracelessPolicy=Tl;exports.resolveTutorial=Cl;exports.sanitizeHtml=Yi;exports.saveBaseline=Xn;exports.selectOptimalSource=wi;exports.serializeTheme=hc;exports.setupReactDevToolsIntegration=Uc;exports.shouldShowConsentBanner=fo;exports.simulateKeyboard=Rc;exports.simulateType=Lc;exports.sortModelToOrderBy=sd;exports.sovietConstructivist=Yo;exports.startMark=Ke;exports.swissGrid=fi;exports.synthwave84=zo;exports.takeMemorySnapshot=sl;exports.testId=Tc;exports.themeAbyss=pa;exports.themeAfricanEarth=Sn;exports.themeAmber=qr;exports.themeArctic=Ea;exports.themeAurora=xa;exports.themeAutumn=ka;exports.themeBanking=Pa;exports.themeBrazilianCarnival=bn;exports.themeCarbon=ua;exports.themeCharcoal=Kr;exports.themeCherryBlossom=dn;exports.themeChineseNewYear=yn;exports.themeChristmas=an;exports.themeCoffee=In;exports.themeCoolGray=jr;exports.themeCoral=ia;exports.themeCosmos=fa;exports.themeCyan=Zr;exports.themeCyberpunk=en;exports.themeDesert=Sa;exports.themeDracula=Va;exports.themeEaster=sn;exports.themeEclipse=la;exports.themeEducation=Ba;exports.themeEmerald=Gr;exports.themeEmeraldDark=ya;exports.themeEnhancedContrast=wn;exports.themeEnterprise=_a;exports.themeForest=ha;exports.themeFuchsia=aa;exports.themeGlassmorphism=Cn;exports.themeGovernment=Oa;exports.themeHalloween=nn;exports.themeHarvest=un;exports.themeHealthcare=za;exports.themeHighContrastDark=vn;exports.themeIndianFestive=hn;exports.themeIndigo=Qr;exports.themeIvory=Ur;exports.themeJapaneseZen=fn;exports.themeLargeText=kn;exports.themeLavender=wa;exports.themeLegal=$a;exports.themeLime=ea;exports.themeMediterranean=gn;exports.themeMidnight=sa;exports.themeMinimalist=An;exports.themeMonochrome=xn;exports.themeMonokai=Xa;exports.themeMoroccan=mn;exports.themeNebula=ma;exports.themeNeon=tn;exports.themeNeumorphismDark=Nn;exports.themeNeumorphismLight=En;exports.themeNord=Wa;exports.themeObsidian=ca;exports.themeOcean=ba;exports.themeOneDark=Ga;exports.themeOnyx=da;exports.themeOrange=ra;exports.themePastelCoral=Da;exports.themePastelLavender=Ra;exports.themePastelLemon=La;exports.themePastelMint=Ta;exports.themePastelPeach=Ia;exports.themePastelRose=Aa;exports.themePastelSage=Fa;exports.themePastelSky=Ma;exports.themePink=ta;exports.themeRealEstate=ja;exports.themeRetrowave=rn;exports.themeRose=Xr;exports.themeRuby=oa;exports.themeScandinavian=pn;exports.themeSepia=Qa;exports.themeShadow=ga;exports.themeSilver=Vr;exports.themeSky=na;exports.themeSlate=_r;exports.themeSoftDark=Tn;exports.themeSolarizedDark=Ua;exports.themeSolarizedLight=Ka;exports.themeSpring=Ca;exports.themeStone=Br;exports.themeSummerBeach=cn;exports.themeSunset=va;exports.themeSynthwave=qa;exports.themeTeal=Jr;exports.themeTechStartup=Ha;exports.themeTerminalGreen=Ja;exports.themeToCssVars=ze;exports.themeTropical=Na;exports.themeValentine=on;exports.themeVaporwave=Ya;exports.themeVintage=Za;exports.themeViolet=Yr;exports.themeWarmDark=Mn;exports.themeWarmGray=Wr;exports.themeWine=Rn;exports.themeWinterFrost=ln;exports.themeZinc=Or;exports.triggerHaptic=kr;exports.typewriterPress=ri;exports.useAICompletion=Vl;exports.useAccessibleClick=Xs;exports.useAdaptiveVariant=hs;exports.useBrandColors=fs;exports.useBreakpoint=we;exports.useChartSuggestion=Xl;exports.useChunkedProcessor=Zd;exports.useClickOutside=ls;exports.useCodeCompletion=Kl;exports.useCognitiveAccessibility=Js;exports.useColorBlindMode=Lr;exports.useColorBlindModePersisted=ic;exports.useComponentDisplayClass=Vi;exports.useComponentDisplayStyle=Wi;exports.useComponentHelp=ao;exports.useContainerSize=ys;exports.useControlId=ss;exports.useControllableState=Su;exports.useDarkMode=us;exports.useDebouncedValue=cs;exports.useDecodedImage=Ni;exports.useDeferredList=eu;exports.useDeferredSearch=Jd;exports.useDevice=gr;exports.useDisplayAnimation=Ui;exports.useDisplayDensity=Ki;exports.useDisplayModeEdit=Gi;exports.useEventCleanup=lu;exports.useFocusManagement=Ys;exports.useFocusTrap=ds;exports.useFormGeneration=Gl;exports.useGamepad=Eu;exports.useHaptic=Ds;exports.useHoldRepeat=is;exports.useImageFormats=Si;exports.useImagePreload=Ei;exports.useInputMode=ns;exports.useIsTouchDevice=as;exports.useLazyImage=fu;exports.useLiveAnnouncement=Rr;exports.useLongPress=os;exports.useMeasureEffect=Vc;exports.useMediaQuery=Pe;exports.useMemoryMonitor=ll;exports.useMemoryMonitorPerf=uu;exports.useNaturalLanguageFilter=Ul;exports.useNiceA11y=Hs;exports.useNiceAI=le;exports.useNiceAccessMode=As;exports.useNiceCollapse=ws;exports.useNiceDataSource=Nd;exports.useNiceDisplayStyle=ji;exports.useNiceField=Ad;exports.useNiceHelp=ro;exports.useNiceLookupSource=Md;exports.useNiceRTL=Es;exports.useNiceRecord=Mo;exports.useNiceTheme=Ec;exports.useNiceTransition=xs;exports.useNiceTutorials=co;exports.useNiceTutorialsEnabled=kl;exports.useOptimistic=tu;exports.useOrientation=Ss;exports.usePan=Rs;exports.usePinch=Is;exports.useProgressiveImage=ki;exports.usePullToRefresh=wr;exports.useRenderCount=Bc;exports.useResolvedDisplayStyle=xe;exports.useResponsiveValue=gs;exports.useRestoreFocus=Bs;exports.useRouteAnnouncement=qs;exports.useRovingTabIndex=Os;exports.useSafeAbortController=Yn;exports.useSafeAreaInsets=vs;exports.useSafeEventListener=tl;exports.useSafeFetch=rl;exports.useSafeInterval=el;exports.useSafeState=Qc;exports.useSafeSubscription=al;exports.useSafeTimeout=Zc;exports.useSafeWebSocket=nl;exports.useSharedImageObserver=Mi;exports.useShowAt=bs;exports.useSpatialFocusable=Pi;exports.useSpatialNav=Iu;exports.useSpatialNavOptional=Tu;exports.useSubmitOnEnter=Us;exports.useSwipe=Ts;exports.useTextImprovement=ql;exports.useThemeIsDark=Vd;exports.useThemeVariants=gi;exports.useTransitionState=Qd;exports.useUnmountLog=il;exports.useVirtualGrid=qd;exports.useVirtualKeyboard=zs;exports.useVirtualScroll=bi;exports.useVoiceControl=Gs;exports.useWhyDidYouRender=Vn;exports.useWindowedList=Yd;exports.useWorker=ru;exports.useWorkerPool=au;exports.validateData=kd;exports.validateViewDocument=Ud;exports.vhsTracking=ti;exports.vogueDidone=ni;exports.warnControlledClash=Ri;exports.watercolorWash=si;exports.withCaching=ud;exports.withCalculatedColumns=xd;exports.withCrossTabSync=Id;exports.withCursorPagination=fd;exports.withLeakTracking=ol;exports.withOptimisticUpdates=hd;exports.withPolling=bd;exports.withWhyDidYouRender=Oc;exports.y2kAqua=ai;exports.zenMinimal=$o;exports.zinePunk=ii;