@omni-design/components 0.7.10 → 0.8.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.
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import e,{useState as r,useId as t,useRef as a,useCallback as i,useEffect as o,useContext as n,createContext as l,useMemo as s,forwardRef as d,Children as c,isValidElement as u}from"react";import{Box as h,Badge as p,GlobalStyles as m,Button as f,Avatar as g,Checkbox as x,FormControlLabel as b,TextField as v,InputAdornment as y,FormHelperText as S,Stack as k,Tooltip as B,IconButton as w,Typography as C,Grid as T,Alert as z,Switch as A,ToggleButton as I,ToggleButtonGroup as R,Radio as W,FormControl as D,FormLabel as L,RadioGroup as F,Slider as H,Chip as P,Container as M,Tabs as E,Tab as O,Paper as N,Dialog as Q,DialogTitle as V,DialogContent as j,DialogContentText as G,DialogActions as U,Zoom as X,Grow as Y,Fade as Z,Slide as q,AppBar as J,Toolbar as K,List as $,ListItem as _,ListItemButton as ee,ListItemIcon as re,ListItemText as te,Collapse as ae,Divider as ie,Drawer as oe,useTheme as ne,useMediaQuery as le}from"@mui/material";import{jsx as se,jsxs as de,Fragment as ce}from"react/jsx-runtime";import ue from"@mui/icons-material/ContentCopy";import he from"@mui/icons-material/Check";import pe from"@mui/icons-material/Person";import me from"@mui/icons-material/Remove";import fe from"@mui/icons-material/CheckCircleOutline";import ge from"@mui/icons-material/WarningAmber";import xe from"@mui/icons-material/ErrorOutline";import be from"@mui/icons-material/InfoOutlined";import ve from"react-dom";import ye from"@mui/icons-material/ExpandMore";import Se from"@mui/icons-material/Favorite";import ke from"@mui/icons-material/Home";import Be from"@mui/icons-material/Delete";import we from"@mui/icons-material/Settings";import Ce from"@mui/icons-material/Search";import Te from"@mui/icons-material/Star";import ze from"@mui/icons-material/Notifications";import Ae from"@mui/icons-material/Visibility";import Ie from"@mui/icons-material/ShoppingCart";import Re from"@mui/icons-material/Lock";import We from"@mui/icons-material/Info";import De from"@mui/icons-material/HomeOutlined";import Le from"@mui/icons-material/FavoriteBorderOutlined";import Fe from"@mui/icons-material/DeleteOutlined";import He from"@mui/icons-material/SettingsOutlined";import Pe from"@mui/icons-material/StarOutline";import Me from"@mui/icons-material/PersonOutlined";import Ee from"@mui/icons-material/NotificationsOutlined";import Oe from"@mui/icons-material/VisibilityOutlined";import Ne from"@mui/icons-material/ShoppingCartOutlined";import Qe from"@mui/icons-material/LockOutlined";import Ve from"@mui/icons-material/HomeRounded";import je from"@mui/icons-material/FavoriteRounded";import Ge from"@mui/icons-material/DeleteRounded";import Ue from"@mui/icons-material/SettingsRounded";import Xe from"@mui/icons-material/SearchRounded";import Ye from"@mui/icons-material/StarRounded";import Ze from"@mui/icons-material/PersonRounded";import qe from"@mui/icons-material/NotificationsRounded";import Je from"@mui/icons-material/VisibilityRounded";import Ke from"@mui/icons-material/ShoppingCartRounded";import $e from"@mui/icons-material/LockRounded";import _e from"@mui/icons-material/InfoRounded";import er from"@mui/icons-material/HomeTwoTone";import rr from"@mui/icons-material/FavoriteTwoTone";import tr from"@mui/icons-material/DeleteTwoTone";import ar from"@mui/icons-material/SettingsTwoTone";import ir from"@mui/icons-material/SearchTwoTone";import or from"@mui/icons-material/StarTwoTone";import nr from"@mui/icons-material/PersonTwoTone";import lr from"@mui/icons-material/NotificationsTwoTone";import sr from"@mui/icons-material/VisibilityTwoTone";import dr from"@mui/icons-material/ShoppingCartTwoTone";import cr from"@mui/icons-material/LockTwoTone";import ur from"@mui/icons-material/InfoTwoTone";import hr from"@mui/icons-material/HomeSharp";import pr from"@mui/icons-material/FavoriteSharp";import mr from"@mui/icons-material/DeleteSharp";import fr from"@mui/icons-material/SettingsSharp";import gr from"@mui/icons-material/SearchSharp";import xr from"@mui/icons-material/StarSharp";import br from"@mui/icons-material/PersonSharp";import vr from"@mui/icons-material/NotificationsSharp";import yr from"@mui/icons-material/VisibilitySharp";import Sr from"@mui/icons-material/ShoppingCartSharp";import kr from"@mui/icons-material/LockSharp";import Br from"@mui/icons-material/InfoSharp";import wr from"@mui/icons-material/Code";import Cr from"@mui/icons-material/GridView";import Tr from"@mui/icons-material/Computer";import zr from"@mui/icons-material/Add";import*as Ar from"@mui/icons-material";import{Settings as Ir,Close as Rr}from"@mui/icons-material";import Wr from"@mui/icons-material/Menu";import Dr from"@mui/icons-material/Close";import Lr from"@mui/icons-material/FormatBold";import Fr from"@mui/icons-material/FormatItalic";import Hr from"@mui/icons-material/FormatUnderlined";import Pr from"@mui/icons-material/FormatAlignLeft";import Mr from"@mui/icons-material/FormatAlignCenter";import Er from"@mui/icons-material/KeyboardArrowUp";import Or from"@mui/icons-material/KeyboardArrowDown";import"@mui/icons-material/FormatAlignRight";import"@mui/icons-material/ViewList";import"@mui/icons-material/ViewModule";import Nr from"@mui/material/CircularProgress";import"@mui/icons-material/StarBorder";import Qr from"@mui/icons-material/StarHalf";import Vr from"@mui/icons-material/Cancel";import jr from"@mui/icons-material/ExpandLess";import Gr from"@mui/icons-material/Image";import Ur from"@mui/icons-material/ChevronLeft";import Xr from"@mui/icons-material/ChevronRight";import Yr from"@mui/icons-material/FirstPage";import Zr from"@mui/icons-material/LastPage";import qr from"@mui/icons-material/Explore";import Jr from"@mui/icons-material/Radio";import Kr from"@mui/icons-material/LibraryMusic";import $r from"@mui/icons-material/Bookmark";import _r from"@mui/icons-material/Edit";import et from"@mui/icons-material/Share";import"@mui/icons-material/FavoriteBorder";import"@mui/icons-material/DeleteOutline";import rt from"@mui/icons-material/CloudUpload";import tt from"@mui/icons-material/Mail";import"@mui/icons-material/Inbox";import at from"@mui/icons-material/Folder";import"@mui/icons-material/MoreVert";import"@mui/icons-material/ImageOutlined";import it from"@mui/icons-material/ArrowBack";import ot from"@mui/icons-material/AccountCircle";import nt from"@mui/icons-material/Twitter";import lt from"@mui/icons-material/GitHub";import st from"@mui/icons-material/LinkedIn";import dt from"@mui/icons-material/Help";import ct from"@mui/icons-material/FolderOpen";import ut from"@mui/icons-material/InsertDriveFile";import ht from"@mui/icons-material/PictureAsPdf";import pt from"@mui/icons-material/VideoLibrary";const mt=e=>`var(--${e}-Font-Family)`,ft="var(--Font-Family-Display, var(--Font-Family-Header, var(--Header-Font-Family)))",gt="var(--Font-Family-Eyebrow, var(--Decorative-Font-Family))",xt=(e,r)=>`var(--${e}-Font-Family, ${r})`,bt="var(--Font-Variation-Header, normal)",vt=(e,r)=>`var(--Eyebrow-${e}-${r}, var(--Overline-${e}-${r}))`,yt=e=>vt(e,"Font-Size"),St=e=>vt(e,"Font-Weight"),kt=e=>vt(e,"Line-Height"),Bt=e=>vt(e,"Letter-Spacing"),wt=e=>`var(--${e}-Font-Size)`,Ct=e=>`var(--${e}-Font-Weight)`,Tt=e=>`calc(var(--${e}-Line-Height) * var(--Cognitive-Multiplier, 1))`,zt=e=>`var(--${e}-Line-Height)`,At=e=>`var(--${e}-Letter-Spacing)`,It={"display-large":{component:"h1",fontFamily:xt("Display-Large",ft),fontSize:wt("Display-Large"),fontWeight:Ct("Display-Large"),lineHeight:Tt("Display-Large"),letterSpacing:At("Display-Large"),defaultColor:"header",defaultWidth:"fill"},"display-medium":{component:"h1",fontFamily:xt("Display-Medium",ft),fontSize:wt("Display-Medium"),fontWeight:Ct("Display-Medium"),lineHeight:Tt("Display-Medium"),letterSpacing:At("Display-Medium"),defaultColor:"header",defaultWidth:"fill"},"display-small":{component:"h2",fontFamily:xt("Display-Small",ft),fontSize:wt("Display-Small"),fontWeight:Ct("Display-Small"),lineHeight:Tt("Display-Small"),letterSpacing:At("Display-Small"),defaultColor:"header",defaultWidth:"fill"},h1:{component:"h1",fontFamily:mt("Header"),fontVariationSettings:bt,fontSize:wt("H1"),fontWeight:Ct("H1"),lineHeight:Tt("H1"),letterSpacing:At("H1"),defaultColor:"header",defaultWidth:"fill"},h2:{component:"h2",fontFamily:mt("Header"),fontVariationSettings:bt,fontSize:wt("H2"),fontWeight:Ct("H2"),lineHeight:Tt("H2"),letterSpacing:At("H2"),defaultColor:"header",defaultWidth:"fill"},h3:{component:"h3",fontFamily:mt("Header"),fontVariationSettings:bt,fontSize:wt("H3"),fontWeight:Ct("H3"),lineHeight:Tt("H3"),letterSpacing:At("H3"),defaultColor:"header",defaultWidth:"fill"},h4:{component:"h4",fontFamily:mt("Header"),fontVariationSettings:bt,fontSize:wt("H4"),fontWeight:Ct("H4"),lineHeight:Tt("H4"),letterSpacing:At("H4"),defaultColor:"standard",defaultWidth:"fill"},h5:{component:"h5",fontFamily:mt("Header"),fontVariationSettings:bt,fontSize:wt("H5"),fontWeight:Ct("H5"),lineHeight:Tt("H5"),letterSpacing:At("H5"),defaultColor:"standard",defaultWidth:"fill"},h6:{component:"h6",fontFamily:mt("Header"),fontVariationSettings:bt,fontSize:wt("H6"),fontWeight:Ct("H6"),lineHeight:Tt("H6"),letterSpacing:At("H6"),defaultColor:"standard",defaultWidth:"fill"},"subtitle-large":{component:"p",fontFamily:mt("Body"),fontSize:wt("Subtitle-Large"),fontWeight:Ct("Subtitle-Large"),lineHeight:Tt("Subtitle-Large"),letterSpacing:At("Subtitle-Large"),defaultColor:"header",defaultWidth:"fill"},subtitle:{component:"p",fontFamily:mt("Body"),fontSize:wt("Subtitle-Medium"),fontWeight:Ct("Subtitle-Medium"),lineHeight:Tt("Subtitle-Medium"),letterSpacing:At("Subtitle-Medium"),defaultColor:"header",defaultWidth:"fill"},"subtitle-small":{component:"p",fontFamily:mt("Body"),fontSize:wt("Subtitle-Small"),fontWeight:Ct("Subtitle-Small"),lineHeight:Tt("Subtitle-Small"),letterSpacing:At("Subtitle-Small"),defaultColor:"header",defaultWidth:"fill"},"body-small":{component:"p",fontFamily:mt("Body"),fontSize:wt("Body-Small"),fontWeight:Ct("Body-Small"),lineHeight:Tt("Body-Small"),letterSpacing:At("Body-Small"),defaultColor:"standard",defaultWidth:"fill"},"body-small-semibold":{component:"p",fontFamily:mt("Body"),fontSize:wt("Body-Small"),fontWeight:Ct("Body-Small-Semibold"),lineHeight:Tt("Body-Small"),letterSpacing:At("Body-Small"),defaultColor:"standard",defaultWidth:"fill"},body:{component:"p",fontFamily:mt("Body"),fontSize:wt("Body-Medium"),fontWeight:Ct("Body-Medium"),lineHeight:Tt("Body-Medium"),letterSpacing:At("Body-Medium"),defaultColor:"standard",defaultWidth:"fill"},"body-medium":{component:"p",fontFamily:mt("Body"),fontSize:wt("Body-Medium"),fontWeight:Ct("Body-Medium"),lineHeight:Tt("Body-Medium"),letterSpacing:At("Body-Medium"),defaultColor:"standard",defaultWidth:"fill"},"body-semibold":{component:"p",fontFamily:mt("Body"),fontSize:wt("Body-Medium"),fontWeight:Ct("Body-Medium-Semibold"),lineHeight:Tt("Body-Medium"),letterSpacing:At("Body-Medium"),defaultColor:"standard",defaultWidth:"fill"},"body-medium-semibold":{component:"p",fontFamily:mt("Body"),fontSize:wt("Body-Medium"),fontWeight:Ct("Body-Medium-Semibold"),lineHeight:Tt("Body-Medium"),letterSpacing:At("Body-Medium"),defaultColor:"standard",defaultWidth:"fill"},"body-large":{component:"p",fontFamily:mt("Body"),fontSize:wt("Body-Large"),fontWeight:Ct("Body-Large"),lineHeight:Tt("Body-Large"),letterSpacing:At("Body-Large"),defaultColor:"standard",defaultWidth:"fill"},"body-large-semibold":{component:"p",fontFamily:mt("Body"),fontSize:wt("Body-Large"),fontWeight:Ct("Body-Large-Semibold"),lineHeight:Tt("Body-Large"),letterSpacing:At("Body-Large"),defaultColor:"standard",defaultWidth:"fill"},caption:{component:"span",fontFamily:mt("Body"),fontSize:wt("Caption"),fontWeight:Ct("Caption"),lineHeight:Tt("Caption"),letterSpacing:At("Caption"),defaultColor:"quiet",defaultWidth:"hug"},"caption-bold":{component:"span",fontFamily:mt("Body"),fontSize:wt("Caption"),fontWeight:Ct("Caption-Bold"),lineHeight:Tt("Caption"),letterSpacing:At("Caption"),defaultColor:"quiet",defaultWidth:"hug"},"label-extra-small":{component:"label",fontFamily:mt("Body"),fontSize:wt("Label-ExtraSmall"),fontWeight:Ct("Label-ExtraSmall"),lineHeight:zt("Label-ExtraSmall"),letterSpacing:At("Label-ExtraSmall"),defaultColor:"standard",defaultWidth:"hug"},"label-small":{component:"label",fontFamily:mt("Body"),fontSize:wt("Label-Small"),fontWeight:Ct("Label-Small"),lineHeight:zt("Label-Small"),letterSpacing:At("Label-Small"),defaultColor:"standard",defaultWidth:"hug"},label:{component:"label",fontFamily:mt("Body"),fontSize:wt("Label-Medium"),fontWeight:Ct("Label-Medium"),lineHeight:zt("Label-Medium"),letterSpacing:At("Label-Medium"),defaultColor:"standard",defaultWidth:"hug"},"label-medium":{component:"label",fontFamily:mt("Body"),fontSize:wt("Label-Medium"),fontWeight:Ct("Label-Medium"),lineHeight:zt("Label-Medium"),letterSpacing:At("Label-Medium"),defaultColor:"standard",defaultWidth:"hug"},"label-large":{component:"label",fontFamily:mt("Body"),fontSize:wt("Label-Large"),fontWeight:Ct("Label-Large"),lineHeight:zt("Label-Large"),letterSpacing:At("Label-Large"),defaultColor:"standard",defaultWidth:"hug"},legal:{component:"span",fontFamily:mt("Body"),fontSize:wt("Legal"),fontWeight:Ct("Legal"),lineHeight:Tt("Legal"),letterSpacing:At("Legal"),defaultColor:"quiet",defaultWidth:"hug"},"legal-semibold":{component:"span",fontFamily:mt("Body"),fontSize:wt("Legal"),fontWeight:Ct("Legal-Semibold"),lineHeight:Tt("Legal"),letterSpacing:At("Legal"),defaultColor:"quiet",defaultWidth:"hug"},"eyebrow-small":{component:"span",fontFamily:gt,fontSize:yt("Small"),fontWeight:St("Small"),lineHeight:kt("Small"),letterSpacing:Bt("Small"),textTransform:"uppercase",defaultColor:"eyebrow",defaultWidth:"hug"},eyebrow:{component:"span",fontFamily:gt,fontSize:yt("Medium"),fontWeight:St("Medium"),lineHeight:kt("Medium"),letterSpacing:Bt("Medium"),textTransform:"uppercase",defaultColor:"eyebrow",defaultWidth:"hug"},"eyebrow-large":{component:"span",fontFamily:gt,fontSize:yt("Large"),fontWeight:St("Large"),lineHeight:kt("Large"),letterSpacing:Bt("Large"),textTransform:"uppercase",defaultColor:"eyebrow",defaultWidth:"hug"},"number-small":{component:"span",fontFamily:mt("Body"),fontSize:wt("Number-Small"),fontWeight:Ct("Number-Small"),lineHeight:zt("Number-Small"),letterSpacing:At("Number-Small"),fontVariantNumeric:"tabular-nums",defaultColor:"standard",defaultWidth:"hug"},"number-medium":{component:"span",fontFamily:mt("Body"),fontSize:wt("Number-Medium"),fontWeight:Ct("Number-Medium"),lineHeight:zt("Number-Medium"),letterSpacing:At("Number-Medium"),fontVariantNumeric:"tabular-nums",defaultColor:"standard",defaultWidth:"hug"},"number-large":{component:"span",fontFamily:mt("Body"),fontSize:wt("Number-Large"),fontWeight:Ct("Number-Large"),lineHeight:zt("Number-Large"),letterSpacing:At("Number-Large"),fontVariantNumeric:"tabular-nums",defaultColor:"standard",defaultWidth:"hug"},"button-extra-small":{component:"span",fontFamily:mt("Body"),fontSize:wt("Button-ExtraSmall"),fontWeight:Ct("Button-ExtraSmall"),lineHeight:zt("Button-ExtraSmall"),letterSpacing:At("Button-ExtraSmall"),defaultColor:"standard",defaultWidth:"hug"},"button-small":{component:"span",fontFamily:mt("Body"),fontSize:wt("Button-Small"),fontWeight:Ct("Button-Small"),lineHeight:zt("Button-Small"),letterSpacing:At("Button-Small"),defaultColor:"standard",defaultWidth:"hug"},button:{component:"span",fontFamily:mt("Body"),fontSize:"var(--Button-Standard-Font-Size, var(--Button-Font-Size))",fontWeight:"var(--Button-Standard-Font-Weight, var(--Body-Font-Weight))",lineHeight:zt("Button-Standard"),letterSpacing:At("Button-Standard"),defaultColor:"standard",defaultWidth:"hug"},"button-standard":{component:"span",fontFamily:mt("Body"),fontSize:"var(--Button-Standard-Font-Size, var(--Button-Font-Size))",fontWeight:"var(--Button-Standard-Font-Weight, var(--Body-Font-Weight))",lineHeight:zt("Button-Standard"),letterSpacing:At("Button-Standard"),defaultColor:"standard",defaultWidth:"hug"}},Rt={"overline-small":"eyebrow-small",overline:"eyebrow","overline-medium":"eyebrow","overline-large":"eyebrow-large","eyebrow-medium":"eyebrow","body-small-bold":"body-small-semibold","body-bold":"body-semibold","body-medium-bold":"body-semibold","body-large-bold":"body-large-semibold","subtitle-medium":"subtitle"},Wt={"eyebrow-small":"overline-small",eyebrow:"overline","eyebrow-large":"overline-large"},Dt={header:"var(--Header)",default:"var(--Header)",primary:"var(--Header-Primary)",secondary:"var(--Header-Secondary)",tertiary:"var(--Header-Tertiary)",neutral:"var(--Header-Neutral)",info:"var(--Header-Info)",success:"var(--Header-Success)",warning:"var(--Header-Warning)",error:"var(--Header-Error)"},Lt={standard:"var(--Text)",default:"var(--Text)",quiet:"var(--Quiet)",eyebrow:"var(--Eyebrow, var(--Quiet))",primary:"var(--Text-Primary)",secondary:"var(--Text-Secondary)",tertiary:"var(--Text-Tertiary)",neutral:"var(--Text-Neutral)",info:"var(--Text-Info)",success:"var(--Text-Success)",warning:"var(--Text-Warning)",error:"var(--Text-Error)"},Ft=new Set(["h1","h2","h3","h4","h5","h6","display-large","display-medium","display-small","subtitle-large","subtitle","subtitle-small"]);function Ht({children:e,textStyle:r="body",color:t,width:a,component:i,noWrap:o=!1,gutterBottom:n=!1,className:l="",sx:s={},...d}){const c=Rt[r]||r,u=It[c]||It.body,p="string"==typeof u.fontSize?u.fontSize.match(/--([\w-]+)-Font-Size/):null,m=p?p[1]:null,f=m?"var(--"+m+"-Text-Decoration, "+(u.textDecoration||"none")+")":u.textDecoration||"none",g=m?"var(--"+m+"-Text-Transform, "+(u.textTransform||"none")+")":u.textTransform||"none",x=function(e,r,t){const a=Ft.has(e);return(a?Dt:Lt)[r||t]||(a?Dt.header:Lt.standard)}(c,t,u.defaultColor),b=a||u.defaultWidth,v="fill"===b,y=i||u.component,S=t||u.defaultColor;return se(h,{component:y,className:"typography typography-"+c+(Wt[c]?" typography-"+Wt[c]:"")+" typography-color-"+S+" typography-width-"+b+" "+l,sx:{fontFamily:u.fontFamily,fontVariationSettings:u.fontVariationSettings||"normal",fontSize:u.fontSize,fontWeight:u.fontWeight,lineHeight:u.lineHeight,letterSpacing:u.letterSpacing,textDecoration:f,textTransform:g,fontVariantNumeric:u.fontVariantNumeric||"normal",color:x,display:v?"block":"inline",width:v?"100%":"auto",margin:0,marginBottom:n?"0.5em":0,padding:0,...o&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},...s},...d,children:e})}const Pt={"@supports (text-box-edge: cap alphabetic)":{textBoxTrim:"trim-both",textBoxEdge:"cap alphabetic",paddingTop:0,paddingBottom:0}},Mt=e=>se(Ht,{textStyle:"display-large",...e}),Et=e=>se(Ht,{textStyle:"display-medium",...e}),Ot=e=>se(Ht,{textStyle:"display-small",...e}),Nt=e=>se(Ht,{textStyle:"h1",...e}),Qt=e=>se(Ht,{textStyle:"h2",...e}),Vt=e=>se(Ht,{textStyle:"h3",...e}),jt=e=>se(Ht,{textStyle:"h4",...e}),Gt=e=>se(Ht,{textStyle:"h5",...e}),Ut=e=>se(Ht,{textStyle:"h6",...e}),Xt=jt,Yt=e=>se(Ht,{textStyle:"subtitle-large",...e}),Zt=e=>se(Ht,{textStyle:"subtitle",...e}),qt=e=>se(Ht,{textStyle:"subtitle-small",...e}),Jt=e=>se(Ht,{textStyle:"subtitle",...e}),Kt=Yt,$t=Zt,_t=e=>se(Ht,{textStyle:"body-small",...e}),ea=e=>se(Ht,{textStyle:"body-small-semibold",...e}),ra=e=>se(Ht,{textStyle:"body-small-bold",...e}),ta=e=>se(Ht,{textStyle:"body",...e}),aa=e=>se(Ht,{textStyle:"body-semibold",...e}),ia=e=>se(Ht,{textStyle:"body-bold",...e}),oa=ta,na=_t,la=e=>se(Ht,{textStyle:"body-large",...e}),sa=e=>se(Ht,{textStyle:"body-large-semibold",...e}),da=e=>se(Ht,{textStyle:"body-large-bold",...e}),ca=e=>se(Ht,{textStyle:"caption",...e}),ua=e=>se(Ht,{textStyle:"caption-bold",...e}),ha=e=>se(Ht,{textStyle:"label-extra-small",...e}),pa=e=>se(Ht,{textStyle:"label-small",...e}),ma=e=>se(Ht,{textStyle:"label",...e}),fa=e=>se(Ht,{textStyle:"label-large",...e}),ga=e=>se(Ht,{textStyle:"legal",...e}),xa=e=>se(Ht,{textStyle:"legal-semibold",...e}),ba=e=>se(Ht,{textStyle:"eyebrow-small",...e}),va=e=>se(Ht,{textStyle:"eyebrow",...e}),ya=e=>se(Ht,{textStyle:"eyebrow",...e}),Sa=e=>se(Ht,{textStyle:"eyebrow-large",...e}),ka=ba,Ba=va,wa=ya,Ca=Sa,Ta=e=>se(Ht,{textStyle:"number-small",...e}),za=e=>se(Ht,{textStyle:"number-medium",...e}),Aa=e=>se(Ht,{textStyle:"number-large",...e}),Ia=e=>se(Ht,{textStyle:"button-extra-small",...e}),Ra=e=>se(Ht,{textStyle:"button-small",...e}),Wa=e=>se(Ht,{textStyle:"button",...e}),Da={default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},La={xs:"12px",small:"16px",medium:"24px",large:"32px"};function Fa({children:e,color:r="default",size:t="medium",fontSize:a,disabled:i=!1,twoTone:o=!1,className:n="",sx:l={},"aria-label":s,...d}){const c=Da[r]||"Default";return se(h,{component:"span",className:"icon icon-"+r+" icon-"+t+(i?" icon-disabled":"")+(o?" icon-twotone":"")+(n?" "+n:""),"aria-hidden":s?void 0:"true","aria-label":s||void 0,role:s?"img":void 0,sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:"custom"===t&&a?"number"==typeof a?a+"px":a:La[t]||La.medium,color:"default"===r?"inherit":"var(--Icons-"+c+")",opacity:i?.38:1,cursor:i?"not-allowed":"inherit",lineHeight:1,flexShrink:0,...o&&{"--twotone-variant":"var(--Icons-Variant-"+c+")"},"& .MuiSvgIcon-root":{fontSize:"inherit",color:"inherit"},...l},...d,children:e})}const Ha="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAIdpAAQAAAABAAAATgAAAAAAAACQAAAAAQAAAJAAAAABAAOShgAHAAAAEgAAAHigAgAEAAAAAQAAAKCgAwAEAAAAAQAAAKAAAAAAQVNDSUkAAABTY3JlZW5zaG90/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/iAihJQ0NfUFJPRklMRQABAQAAAhhhcHBsBAAAAG1udHJSR0IgWFlaIAfmAAEAAQAAAAAAAGFjc3BBUFBMAAAAAEFQUEwAAAAAAAAAAAAAAAAAAAAAAAD21gABAAAAANMtYXBwbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACmRlc2MAAAD8AAAAMGNwcnQAAAEsAAAAUHd0cHQAAAF8AAAAFHJYWVoAAAGQAAAAFGdYWVoAAAGkAAAAFGJYWVoAAAG4AAAAFHJUUkMAAAHMAAAAIGNoYWQAAAHsAAAALGJUUkMAAAHMAAAAIGdUUkMAAAHMAAAAIG1sdWMAAAAAAAAAAQAAAAxlblVTAAAAFAAAABwARABpAHMAcABsAGEAeQAgAFAAM21sdWMAAAAAAAAAAQAAAAxlblVTAAAANAAAABwAQwBvAHAAeQByAGkAZwBoAHQAIABBAHAAcABsAGUAIABJAG4AYwAuACwAIAAyADAAMgAyWFlaIAAAAAAAAPbVAAEAAAAA0yxYWVogAAAAAAAAg98AAD2/////u1hZWiAAAAAAAABKvwAAsTcAAAq5WFlaIAAAAAAAACg4AAARCwAAyLlwYXJhAAAAAAADAAAAAmZmAADypwAADVkAABPQAAAKW3NmMzIAAAAAAAEMQgAABd7///MmAAAHkwAA/ZD///ui///9owAAA9wAAMBu/8AAEQgAoACgAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/bAEMAAgICAgICAwICAwQDAwMEBQQEBAQFBgUFBQUFBggGBgYGBgYICAgICAgICAkJCQkJCQsLCwsLDAwMDAwMDAwMDP/bAEMBAgICAwMDBQMDBQwIBwgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDP/dAAQACv/aAAwDAQACEQMRAD8A8zt1v/D0/m2bbo85K9q664XRPGNl5N0iicc7W9R3FeO2vjF5FAmPB9eldRYvFfqJrWYJIOeDivntTvnRvqeleHfEupeA3EciBoYz8rgcjHr/AI/nXpdt+0p4sd1s7RozEw+V88/lXjlldedEbLVsOCMb+9XPCmk6f4S1yPWvs631uj+Z5bcjI54zU3a1izmlTVmpI+kbLxp8SdcjWVkuzHJ0ZIXCn6MRiultfD3i/UcPdgx57zSgfoMmufb9oZ9WgGl6dAqsw27OWZMf7IFT2XiDxJfKWbcPYkLn6dTXZSrJ/E2zza9Fp+6kj1bRPhjZXKeZr2sLCv8AcgAz/wB9Of6VrX/hL4M6NC39pOb9scieZnBx/sx7R+lebaXYatqlwEupRbx/xMSXP4ZIFehR+C/BUKBtRup7p2/g8zaCT22xgH9a7ou6uor5nJ5XPzw+LkHgGy+INld+AbH7MfPUXMSBlikywwVDd+xxX1HDe3Z8Norx2yIEzsz85z36Yr1SP4cfC6fVTqV1o0U7w4wsrLshDHZmUMeCfU89MDvU+peGPCWsWlxb+H4bG3iRWZhBOu2LaM7pmOQFC5/iABJr57MI1ZS5qTW/Q+lwFCPskqi6dT8o5LC78RfEqG32kRR3h83A6KG5Az7V+pfhHwl8MptKhgvIGhlVAN6yOjdO+Dj9K8W8KfDHTbXUrnWrh4BDCXnnkYjy1UOFwjcjAzksT9AOa9vtbLSJYhJHIsaFFZZEYeWQRwQR8pHoe9d2Fq3Wxw46hK99TtU+Evgu7XOm6tcRE9AWSQfqAf1rOufghqGC+maxBJ6eZGyH81J/lWF9ju4Rvs5xKuNwPXP5Uh1vX9PHyPIO3yOcV1upC2sTg9mZWqfDv4oaKrSWcomVeht7n/2V8Vwdj41+IXhzW44fEMV+0LkRwxNHnfIT03DjHvXp6+OvEtveRRyxzyLJwocDaD6sewFT+NfEVjDp/wBvuJ0a4WPk8dT2UfpXn1nztqDOyjTUFcf4h8TTHS/tWpzLG+zJTPyx8dPc+9fGHjTxve6o8lnp8jLbkkE92/wFWPFnja/1tjBJJ5cA/hHf3NeVahrVhZRNucZqU7LlR1KnzS5mMimitW3yH5qyNb8XW9vHtMn4Dk1w2qeKbaRyfOWJM9erH6CtXw5oN34iuo5Rp8ws2/5bSDG4+oBo6HZGkf/QwfiB+y3N4f8AEotfDV5P/Z8oJ8qRt+wjnhuuK8A1zS9b8AagYLhZvJzgSlG2ZHbdiv0u1v4m6Xd66BfW0tqckbZlIPT3roptF8MeLdKMN1bwvFOhIDBf0zXz9RLmbiz2I6o/MDT/ABdJcSJHc7lJ6HoDXsGhXk6qG3iSNux6V698RfgRZ3enqnhqNIZwBtYLnmvDh8OPiV4YuI4TD9pcuFAUAJ1xli3AHqTwO9Q3Zakzpp6I9M0ZLaC5+2aZARck44GdxPavYvDGqanqF2LGKDFwcfIFbHPfgGuG8AeDr7UZvMvNV0/yIZsTeTMZFjOSrI7KByCOzZz2HWvZF1/TtE8XQeFtE0+BnhgWSTU72VkTEoYL5UUfLuSrAAsT3GetEZq6S3OV4KUrtrQ9H0iPRZXuNPl1GKa7sYhPexwuZBARx5biLJDMx4GCeD71Q8MePvhh4i1K+tPDF6up3mmukUscKldsj7s4MhwdmDuP8ODmvz5+Ofjl/BvhrWdQ8KreafDreurCL1hMvmi2iLsVWQEBEclgqFgN3JB68d+zxJ8RNM8EeLvjHoTxARLKWminiVrydMzXBMZJEQXhdyozN0A446FJyjdM3hhIRkotH1j8fPF9kllq3g7whdBNUa3F5LOitJMktuXMUaPFl8bo2BJCjkEZya+dvhD8d7Pw14WiPjOS5thcM9qr2saTC4s5A8hZo2ILKkxkTgNgHuOvwp45+K/izxlq11rJ1W4im1SFxcMj7HXLncCqYxu2gEdx164Ot4s+IWh6p4I0e006eddSit4Ld5HVVmR7bAXBA5AYZUZzySevESwknbm6s3+tU4+7Doj7yv8A44aP4Ztv7XmS81WHTIv7LgW7uWSJDcPHIjFY2wzrGd0e8FMYBAJOOf8AEX7SenLYqLIRyWlhukkmIKzF5CGffGrbMYxhVJ6N2Ffnd4l8U3upaZJfapYPOLpk2XbthlKJ8v3RtAOe/PHUViXOvW1xp9o81x/pLoBNHsAiZFwFwoYkt0y20Z549dYYO0VF9zKpilJvTofo5pP7Sniy3TzNA2/2fIrNG/zMmBncNjA4Kngj8q9Z8B/tXQ3Rlg8Y+XmLHliFfLZnOQMh+AAQMkkAA5r8tfDfj3xB4dtTYaPIt7aEeY8arux3JAwD7EH0zmvR9a16x8XaLBFusE1WdoRO4QQzIgBzGuGAfsWcjIOBiieGlF6PQwUqc1qtT9d5fihpniLRRf6Msm6ZcASrg7lyCVI4Zc9COCOa8W1vVNQuyZdSdio6KTwK8K8EeKINAuNGsdNuXu7JbZ7a6gZyNlyER1YK3IO3J+XII7nFe66T4d1LxrK0sgMVucgHPII6+2PT2riUteXqU8PZ3Wx4zruvNJO1raQMcdTXKaVoOseKpLj7NalYoDh3kJJJPYV7zf8AgCPwnqMk05MkbDJZ+e3vXQ+Ar/Slgu7S3iJllkO3auR0PU1UV71mdEYKKufPPhz4bWk3iyyS+TcqkkoeQDmvvPUtA03SPD0DWsCJsTOAAD2r540T4d/EHW/HTGxT7PEWLJJt3fKT1xx/OvsvTPg/r0NvFca7eyXRC4KsQF/BRx+ta0acnfqTVrw0sf/R/Q3XfAeh61q8t1cWqM4zhiorirj4YvcPs02RoCgIRlzxXQzfEq1GoPGtvJyxHT+dddp3i7SoY1kkY72GTx09q82UISmzqi/d0PLn8J6/oNuqiRrx+24Z5/SvGfHeg+NZZXutZkkXS4Ip5VihkKyzufLJWQZXKqA+1RuP8q+yZfEVjdRl4sbirbN4IBIHH4V+dPxC+PE3/CRnwL8SC0D6deGOa7jgQQRGdd9uQN6yOAPuvsKk8MRXFjIx5LRuztwnNz7nKeLrzwjb2unQ6dqUumhJDqT6XZ3geSRIPmbzkuH2gyou3mPIHJU8g+M6P+0/4U0vxLcy6/oLMiGZkmQlbn7QS+RNvUhdhIjXyyAMkqQDXjVtHZa54k13xD4bsbmSSyYA3V1dC4uGmuDlmSzUIArqGUBWzlslj2+U9aW91XX7l55tl0JHEyMNpVBgAfgAAR1GMHnNTRwcG3FvU3qYycEpJHXeJ/iNqHijxTd3N8815pMt27w2k1w5jXzeApDPkjKjPPRRwM10ui/ErVNH8LyaPYzR2q299PcC1jbaGSVVyRnO3HIG3AINeD30yTXEv2oKs8TLtZMDKYIzxxnoSeppYLy08pVXAnAIQlSGZ2IyWY54AHAFet7OPLyW0PL9rPn529SzqkhglW6kO6Vi5bnlQcbVPJxgHIqCJ7htKMyyDBmO1CcnJ7gHgdvrVS6a4mm8hgGZgMkYJLeue+K7mfwwdO0uy1OaRJobmMMsUfytvZcnPGDt785HFVKrGKSfUzhRnNtxWxzlzr+oDTY9HS9lNqHVli3YCyAfewee5x+NczNEVl8xxtU9McfMOuB+NdTqWmtbi4tROsqQlcMY9hLNzt3dcj361z8jGaw3kFmQg5649eauEotXXUiaknyy6Fq01CS3xHbM2+UOH2k5KsMEfjXX6Fd3NhItxbgrcJkiUrvYLjJ2qxIyM4rzeKeaNy8R2kgKSOOK6jT2t5I+J/Ll+VlUA8PkYG4jGT+X0onEIaM+i/D3j6/XTLg5+ZrmO5WSUok0bx42vgEDAwM4zxnpzj78+D+s+N/HWmWl14VIsNNtIJklZCZpJriTJ+ZSCBswOBk7elfl3Zx2flpOsuJQC8kbIfmXBGM5/pivsn9nL4v3Xw+s5rW7kZ7e9bzPJ2hRvjG3b84G3C5JYHBXpzXlYmlFe8ejSqSasj9ErjwPqVzOq65+9Vo0DMeAWwM/L2r0DwJ8NdD0uOa6SBNzv1I7e1cL4b+JD+LdCW+UwTbxmOa1LNEY/wCEksASfU9Dxjiu+8N6l4imjkgEJCITlj0Yn0q6MYXuctST2Z6d4YXS7DVtoCq2MD869a1q+tU0/cGXha+SrHw9451HxGWs5Fjjbnc2fl59O9exXHg7xULZft995mRjaBgV1UpPlasZyldn/9L9DbTRdPkeSR4lDFj2rf0Dw/p5kZ3jBGT1ryOTxNrc8/8AoMGFzyT2Feg6LrOs3VssUMezAIY45zjk157cednRFpxR0t/o1iLrjai898fLjoPevy9/a3+IujW+vTWNvpdtNd6NLHGPNs4Z5PKZM5888xttKsi7WwRz6V9k+OvGGoaMIb6YyzJE2x54ULrEHwhfAHQElQTxuPoCR+JXx18earca441LdI96Z7p7iRm8y6EhCRNMdzbmRI1U5OQR6dfOlL21TkjpY9KnFUo88jz++8YavFJqFzpTrY2FzgSxWsmzeY+InfnJYMMjgHNeIXl/LLeS3gXMjPl5GYkvnk5/HrWjot6bnV3M5zHsfCnkHPt9RmsfVpBBeSxRgbW7V6tOmo6HDVqOauU5ZvtNz5qIF3YyoHHFem+DvAN9411Yi1hZI2YhSQSobHTgdMkYxXmkUS3V/aWsB5kZIzj1Y81+pXwn8EeLItJtx4I03TxHbJ+8vdTYhHl4+WJFILBe5PGeleXnGNnQhGnS+KXV9EetkeAp15yqVvhj0W7OD8B/seXmqXEF94lVBb4CTRRbl3YxhlOAeec8fSvojxf+zNoeu6Na6bZQrbS6euIcLgEYwN2wqeOo/kc16b4e8W/GjQtRisfEOlaHqVgdqvJprtFIgx94BmbcfbA+tfQKyfbbKC/EXkl1JdD1UgZIzXyOIxFeU1OVW7XbZH2mGw2GUHCNKye91qz8yvEv7JM7WNvMwBS0Dm4lLHc67SVAGCWO4ADOMAnrXxv4y+Gl54MWO6XesBn2TAjIVTkAkZHGcfSv1v8AiH4m+KV9ObPwzJpuiaah2yXF6qyyOc9QGyoXHtnPevnPXfhJ4w8SRXWfGel6lPcK6m0MMaDBHJUopw3oTxmurBZjWpSi3WTj1Tv/AJHDj8toVozUaLT6NW/zPy+v7KOK5KQ8q3I9OvOK0rW3jEqzXEyCFCCEQ5Yn/PU103xQ8JzeDNch06RHhLJ8yyfeDA85wSCPQivO5G3Dev314/CvuKNaNaCqQejPz+vQlRqOnPdHcx6qq3wufJbyy7CJRzgtnhfck/SvU/DNxp2oajYW2q3Vwbj7THCq7gCF2lSitwByRnLAHkcV45eRWcmjW0qExyptYgZKyZwMZ9R1H5V654E1CBNYs9K1WGJdO1VVtbmPJkVPMO1ZgGy0bq2GJHbpWdZJxNaUmnqfqZ8ENZ17V/Ar2tutlLBpg+xMsEbJcrJEo8l3y5BRkGBtGPlr68+F1zef2RG+p4ErDO0nkZr8yfCeq3vwr0DzrxdU0rUbK6iglWS1cWN2pnKxRvcqCjeYu9UPUHoOtfpL4Wae8it7iWB7M3caskZbLIxXOxxgbWHcc1y0GlLUVdNarY998O6hZR6kVJXcQK9J1OeFrcEEcjNfN2jeFNXu9Y8+K5ZFxz9favRtV03XbC2yLozbR90jFd8JPl2MG9T/0/0LtNNWwh/fqvua6XSoorGwa8kKkHLBCcZFed3Wq6prw8mAeVGeDtH9a6fw/p1zJD5V3LnZ8oyewrgk7z0OiL0Pj34meJm0/wAVa1o99dCWbULYtZWnmGJAturTKDjHLpuADHnaSvSvyG+LemWtzb3t8bc29zPdNcRvseOKZJixY7JDhWBwAF4wM85Jr9zfH/wD8B614ztfHWtRE3dtt3ESMqP5Cv5fnKpAdEDNnPQZxxxX4rftR6jpHiTx5J/wht3JNpaSfZIhIrogKudzRhudm4nDNztGTXmYfDuFa99z1J11Oi48uyPnPSrTT4ra3YtItxI75P8ACwCHAAwD1Gc59iOa5zVopjqOH4LEAFuBnjua7bxVZNoVxHp9pew3z2DG2ae3O+GR4mwzxt3UnODxkc9CK47WLv7ZiaTaspP3UG0AdOnTrXsxbep5k0krGj4Nt/P8aaRFKOHu0GMDHX8q/Wu98GeNfESaRa6dqA0rQbZN06wny5ZTtx8rlXReefmRs+3Wvyj+HsAl8beH/LdTK95ENmTnJOMnsP51/Rj8PtBs20O386NXXy16+hFfJcQJvGUrdE99Vv2PsuGUvqlXm79NHt3Pz9+HPw5+KWmeKftup6098kNwv+rEpiNsAQ6Odg3OeNuCFUjpzx98adNqd54enjZCskY+Xd97kHA/Suu1G40nTX+yW6orMMYUDJ/xo0W3kurC7kKlUchACMEdQTXkVf3lXdX1vZWPoaMFTpW1tpa7bf4nwz8RPCviDxrb/ZopLmBbVpWY25YSFnTETqykEeWecY+bp615f4a+CHi23sre8k8Q3L6ta3huTc7bgFoyADCY5maMDqSwyxPGcV9sC5Tw5qU41RCsQPlmRgApOeOenI5Fei6fa6Pf27T2aIGZeWGOa4sPiKkaToKS+5HTicLTlVVdxbfq7fdc/E/9rXSLiz1LSL29O6ZjJC8g/i2jIP19a+QQWjYNjgg/Lmv0V/b3tI7ZtFCBQRcycA5GNpx/Svzul3SToQv+sVcKenNfc8PN/UYJ9Lr8WfnXEkUsfO3W35HbaS9rPo8sNw2FOSpZgAhzlRt69e4p1hcxRXSTwyMNx4DA/Lt6+uRXORYitpreRmEn3QM/KwBz0retbQXVlBPAXEtuWzwCu3r6j/8AVmvWaR5EW3Y+8PCnijWPH3wiuNJtlN1baJqVm95cSSsXt48s4LR7TiMYYB84DkE4FfqF8L/EV34i0q11/V7GSzmDOiRs25GRflSZcAZVhyrEZwa/Mn9hjxTeaX44n0drC1kstUj8i8uXbbMmFbywqkgMmR8/Bxkc84r9jPDtjpMFkbWyiihijyqRxKERR6Ko4A+lclOPvtGldvY67wp4isF1Aws65xXa6zeRzshjYbSOea8Ts/C8bag90jlcHscZ5roru21WxgM4cuiDgHriuqMnynM276n/1P05fw3eabpRv5IREoXds4BA+naquneIPD1vpJLMryuCztnkHsPbFc9498W+Pp/DUktroz28Ey4LyMA6of4tg/rWt8MtG0VPAtut8iST3iu8zOAWJLEdfYdK4HK87R7HXGOiPmz4rWfi74jeFb3Q/DOsNod1JIDFdEZRoslXhkGDlJFOGxX5hfFr9mHWfhZLp+p39/Nq+iwqZL0wRkSvIsW9hAzmRUVmzgMM4HTPNfq5r2v6To8lzHd4jihkbaCcZCnivkj9pHSvFXxKOkaL4V1JbffbzSCBLhViYeW0nmGWMOSxUbBGQevOOTXn1ZWXM5WOug/e5Ern443iWl9qBS0LRWylm8uRs4QcYyByegzgc1zWpoUcKRtAyPY46EGvWvih4Zg8DRado6zTnUpYxd6isiBGjknUMkWfvcJjOcZJJxzXlF2oa1hk37mOeCecegGM/nXp0ZqSUlsclZWbT3GaJqsuh61Ya1B9+xuYbhffynDY/HGK/oi8LfEO2h8F2uqWzb4ZbZJoSOjI67lOfoa/nKIPfvX6i/sifFex8U+CT8M9cmUanoan7KHPM9iTxjPUxE7SP7u014PE+GnOlHEU943T9H/k/wAz6ThXFwhWlQqbS1Xqv+B+R90+EtV1DWbh/Ed/CSWIaFDzsQ/Mu4ZwCeCRWZrfxU8SaTdTxXzh1ckxpBHtRAPu8gnJ9c/pXI2fgrS08Q6f4iup7qW2tmMN1YrdTR2lzE3AMkaMBvXPyuMEcZyOK9dTT/gBFEP7Q8Paktx50eUieWcYX5nIYS/dOec4PHFfLYbB89FONS3e/wDwx91LENT5nSlL/Ck/1v8AgePx+ONS1mznh1q9hlhmO9UuvKiZRznLZ5HpnmuO8NfEDW9K12PStNuU1HS597RyRkSeXtO3yy4OGXnIZfTGa9O8eWXw18Q+Hr/wx4X8Mw2lpqaSW8tzdYku5I3LZWL5mMe5W25zkD0xmuE1K18P+CtOW7kENhp+lWhBOAkcUMa849gBXJjMMqdnGXNI3VSSV5x5F2dr/NbL77+h8N/tseIbrWtb8PWUyhJZUmuCnopYRr/I18XSRus0eBsKIjADqSRkfp1ruvit8Qbv4neP7zxNGpjtgRb2ERH+rtos7Mj1bJZvc1wSSKQ2QAy4IY+nXGK/SMsw0sPhadKe+79W7n5Lm+KjiMXUqx26eiVi0sr3Mwyg3RbmZgOcgd+36V7j8MtI8NeKZ7vTvFkxt5JLQm2mgBEjTj/VJhSAQxOCANxPTpXielRpLI8pJyPvLycqRyT7Z4/GvX/DOnWuq3linhmSaXVrYxMlvHG6tJeNKuI0HXbGoJaRsDnr0z0V37rRx0d7n1z+zf8ADr4geGfG0euTQPbQC8NtLDcRiSWKzKmXewJz8+1cMPuk5OeRX6l+G/EkSM9sPm2knNec/DjTrz4hxaLrDWqWEraFHFdGSZGmSaCU/u1jU/KpLEhm6kAZ5ruLb4e+L9DmuLyW0+02Zdm8xOGC+6+1cNKc2+YVVxb16HpWheJIbu/+zq2cHkV6vfywSWYUY5FfCl/4huvDWsm5hyV3ZI/GvY9F+KUOqw+VIcFFGc11wrx+FmfLJavY/9X9afiJq+nWPh27jbaSYWVQfUivheL4xWnhOx+y3c+1hkAZ6Z9KpfFD4u/6PJH55nkYcKDxXxlewah4pvmubtyATwOwrza9RJprc6YSctFsek+M/G8Xi+7kWFyImY8g9a1vBlwbeS3S5mkn+zktalySIHYBHZQeAWXgk9v15rQfB8KbQx4r2jRPD1lCF6ZGK4pU/aO7LVT2atFn5v8Ax7+FOo3/AMYdcnt7Wa7sI7Q6zdT3JEcRSIKLkxS5wyCVgvHzgHgHivlDxjZWMOraja6YIDaxTtJCIHZkjjb59gZxuO37ue+K/bL4veAl1/QpLTRdFW+OpSxrdSSSF3jKMWWSSJE3Tx7ifMQYbBBByAR8RXX7DfxBn1u3ksrm3bSpLgGRLjKzeU0mSPlU4bbjIdsjpu9OmhNr4h1KkWtD885EYwxRtxgEjPX5uRWj4X1jVvDfiTTda0Sd7W+tbhHikQ4I5wVI7qwyCDwQcGvs34v/ALLXi7wZoM/ia+RYYBqMFlBa2yCbebhtvmKV5VBtA+fozKuTya+ufhj+x/8AB/4W+FYPFfxTuFvPF8+mvPDp19PGojuHRiqxWo+ZnXIBJLAEGt5VlyO66MyjpOPI9bqx638O9ZtvFujRNc7Y7low0sR4BBHJUHt/k1T1z4aTPcmWHWJLeNjkRg5x9MnNcb4fsTpsaLbyFTGF27TgjHpV3XLnxC4LQ3bOuM5PUe1fltaskmtmfs2FnOm7xbOs0DwlYaMjXlxePcSjd88zD5dvoOgHevi/9qvxbc674YvdH0xythEu5mU489kcEn/cHb1PNezXF3rV2sltcXDurnDKMgHHX/JrzLx54Vs9X0uW2uukg25B6A8VWAxcYV4SlrZpmOZ0Z1qNTXVpo/L+3cI+WU9OoOKt+V5is8YOwYGeTyegzivpPwh8H/DSeNrnw74lvmt5jFv06S5hH2BpHbEf2qRXDBc8HC45yTivorw7+xh408SeOdOt9W8mHwfFIWu59P8ALgDbf3hECb5TIjMTGkjMTjkYGBX6jHERqRVSOz2fc/H61P2U3TqaNbo+H/Cuh65qMsj6Fbbj5MkU2SMtlGZgEOM/KMjg4xmvo74I/Bjxlr/hu/8AiV4Pkn0z+xbm3S4luIWZXilbEk9tMuQPLIIlVlZVX5icZx7N8KfBQ8e/tNatJp+kweFk8Nx3cjW8lu4WdI5fssDNEWAbd95mBXPUA9a/S/4f+F9K+Hdjf2dhHCBqs5ubtIIhFbvIVCHbDkqoKjBHfvWVSTlpbQlzUUrPU7v4P+F9Y0Twdp6axa2lrcKmAtoWZTAp/dBmcZY4ycjjnj1r6Ut9RtZbD7JgAsuCK8f0iS91S3WC0YQxooVVHACgYAUdgOwrTTw9q0b+Z9qYH0zU0/cXuoi99T51+J/wZ1+61KW+8NzNOJXZzbso+XJz8pHb61x2neF9W0lTHqtlJaS9ywIViPQ19y+H4Xs5M30hkPqx6VV+JSWF9oE8FtEstwyZjC4zuHSh0k1zItVJKPK3of/W4WGzm1NhJcyFifU12eleHUyuys3S7cnHBr0bSYnBXC14drnZJ2WhraZ4f2gZrvNP0kIAB2qtp8cgUZWvX/BfgrU/Ege5V47WzhO155emeuFUcsf85reFNyfLFHLOaW5zlrYEDg12+ieEfEGtOF02zkdSeZGG2MfV2wK9csNM8FeFIBO8QvJY8brm4AZQfZPuqPzrRHxR0l38hZ44lXgFvkXA9Pwr06WWVGrtHDPGUouzkcNrHhTwr4M8NX2v+N1j1YWUJufsoUNBlOmd3Lc+wH1r8ktMuJvGHxa8X+M9emNxe6jcRrZmQ5EFkY12QxDoqBlccd6/Qv8AaR8Yyx+Cb660i50+8S7hNuY42drhVYjcRn5eOOMV+YtpcXFrcw6lpZzeW4IMLjaZIyQWRh+AII6EA+orqx+QTxGW1IYfSe687dPn+Zllmf08LmdOddXgtH5X6/L8rn0lDEsEW2UfIpBXHHI6VV1G4gcPGZChIPBHIwKz7Xxt4av4oluLpIJ3Cjy5MoQxGeM8cdDg4Bpt1bwXypMkiyRsMqyMDkE+1fhePo1adR06kWn2aP33A1qVWmqlOSa7pmOIowpMS7tx+83b8KxtVsoEt5JrogRLlnJ4AAGa6TV9U8O6CIop7je5PMcYLt07hen44rx7xd4nXVJBHGGtrFMbYmOWduu9wucew5A9fT18g4Yx+YVVyQah1k1ovTu/JfhueFxDxXgcupNTmpT6RT1fr2XmzyPxNMJ7t7oJh7hlSJT1WIEgZ9zkn8favdv2ffjTqvwwfWbbVY21fQIrqMvaMxDRK/ytJC3Yg4JHQivDmgl1DUxMykKhG0ew79a6nwxZFTq8GwSJPC52n+LackE/T0r99wmUUaOHjhoL3Yq39efU/nrHZzWr154mcvek7/8AA/Q/QNfH/wAF/DXimHUNPgTSYPGCi9XU0JlgmuHwskdw+A0cgI6MCuDkGvb7nTl2q275XUOjD7rKRkMp7g9iK/LbTLH7VoM+gXh8y0fDwZ6wuOm3PftX1t+z/wDFy8i0VPhr4uZZ5tNJ/s+Wck+ZDknySTyMfwkHjpXJjOG0481DR9jTB8QtS5MQrrufUOjatcaNIFSTKk969KTWPtVv5r3Ww46DFeURW9p4kSSfQsJLHnfbOfmyDzsJJz9K5i4ku4i0LSum0kFTkEEdjXymJw1XDzcKisfU4bFU60Oem7o9M1bxBHakt9sbj3rmbL4i6TaXbfbp9/HAZ64l9BfUx80rt9Oa569+HNhM2Z2m/WuKTad0dJ//187TYpMjBr0PTFlUDFZ9lDaKBgV1tqsGBt614kYnROXQ7Hw1p9xql/DZmTy1c5kc9EReWb8BXdeMvixFpEC6R4dUR2NvCyK2cEleCSPUnqa4eyujp+g6rfxnDLEsQPoHOW/QV4Ncap9qtry3lf5iLjac90VZFH4gGvt+HMDB03Xmr3Pjc/x1RT9hTdjt4Pibrd5dOsVyzgjlSxII7jGe9RX+vXN9cB3k8tgPurwufXj2rwjwXqMlzO8q4LBsEentXrYiOFYKAfavrHSitUj5ZVG9zE8X3L3kMVtK7Og7Z4x9K8tl0SEEugwSeK9N135ihYZOD26VzLqGUENnOefpSS0NE7nK3fh+HUolgnRJDkAMQC/oRnr6Vw2vaNrelTTzz6gWt72SC0srZSf3ZyC7AEcHYrcivZ7GNPtiBuhPHfJzXK/E2EnUfDTpkILqfd9fJO3+uK4q+CoTalOCbv8A8A7KWNr0ouMJtKxjDScxq79cDBBP9c1nXWhJKcu2fXj8K6+MnIwu7jGeuMU+SINwO3YV1W6HFdvU4e08PW0cudpIxnNbMFpFZTM8a4J57elavlBA29SfQ8VWniBjLKCPx6UEPzHNpv7v7TYMSMAsnUjvxUSu6yR3qny7iE7lYcEEVWF3LZSbuSQB064BplzqEE5MqnacYI6VtGSMZQ7H0b4A+I9zZ7JJpWWUSH5snHQcD+de+/8ACbeHvEMSxapGIZ26XUOBID6kdGH1r84xq5tFljQkHBkB64K49PUVt6Z4/u4tqSSMdpHP0HX+VcOLw1GuuWornbhK9ak+anKx+jmjO+jzpMZVu7KQgLPH0Gezr1U/ofWvXo9MsNRgFxGAcjtX58eCvilNZzKrSbo3O1kblWHoe1fWXhjxxa29vHdxvm0kwME52MRnafb0NfEZrkzw37ynrH8j7LK82Vf93UVpfmf/0PQbTS4yOR+ZrorawjXGP51x8GoS4Azx9K3rW/c8Bv0rx00as3PEzC28HXdpEcSXSzYx1zHGCP1NfJcWsm8tkuY2OX+YrxnJQxsPXv2r6D8carLZ6dpMhPyyz3EWTxklAVz+K4r4vn1ZdA8Q3WnSFhBKxurUHPMZb94nHUqeor9LyNKOCh5/5s/O87beMnb+tEexfCaCE+C11fAZ7i7mVjjJ+RsBa9WWTdGA3yrzxjvXzp8ONek0PQdSsZWL20WrEW6j/aUyEj8CteswaxdahH5gVkGM8ivYjO8UmeR7Np6GlrBV281Tnadtc66gDCnoRW7h5ItkhyQAx4HWsiXH3CBgZ9fz9qnyLRn7XE6snU88DJ/AetcJ4ofXUh0ka1LG0k+otJaRohDxxJHIH3Z6nBXJx34zXq9hbrJcHOPlGQMevH9a818WSjUfiRBaf8s9IsAOenm3J3t+O1VrGrC8otN6fj6m0aloSi0tfw9DSgSQoM85A9c0oABOSR7danKgAHdwDjgY9BTWCopcgDuM8dK1Mio7rsx8x64qhLKNjE9yCen4VYMhkYrhhz15we9UZVyCucEn2PH9KlkmNdzoFO5eexPUj/8AVXKXlx1MRGe3OK6W7kRWI547dMnvjiuP1FfMLDA74HANZTdkVCN2YT6rP9o8pmyNrDkdcj8KiW7MROGPJ6isqcPBdKX4XnPqOD9aha5Vmyh24BAB/WvPnNt6npQgktDvdN16a2dVD4H97+or6r+FvjqJm/s29cPb3ACMHPHsR/SvhVZ2RgSc4OcV2uh6hcMcW8vluOR2yaOdTTpzV0w5XBqcWf/Z",Pa={default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral"},Ma={"xxx-small":{size:16,iconSize:10},"xx-small":{size:24,iconSize:14},"x-small":{size:32,iconSize:18},small:{size:40,iconSize:22},medium:{size:56,iconSize:28},large:{size:64,iconSize:32},"x-large":{size:80,iconSize:40},"xx-large":{size:160,iconSize:80}};const Ea="var(--Button-Border-Width, 1px)";function Oa({src:e,defaultPhoto:t=!0,alt:a,initials:i,icon:o,color:n="default",size:l="x-small",customSize:s,clickable:d=!1,onClick:c,insideButton:u=!1,className:p="",sx:m={},...f}){const[g,x]=r(!1),b="custom"===l&&s?{size:s}:Ma[l]||Ma.medium,v=Pa[n]||Pa.default,y=e||(!t||i||o?void 0:Ha),S=y&&!g,k=!S&&i,B=!S&&!k,w=d||!!c,C=S?"transparent":"var(--Buttons-"+v+"-Button)",T="var(--Buttons-"+v+"-Border)",z="var(--Buttons-"+v+"-Text)";return de(h,{component:w?"button":"div",type:w?"button":void 0,role:w?"button":"img","aria-label":a||i||"Avatar",tabIndex:w?0:void 0,onClick:w?c:void 0,className:"avatar avatar-"+l+" avatar-"+n+(w?" avatar-clickable":"")+(S?" avatar-image":k?" avatar-initials":" avatar-fallback")+(p?" "+p:""),sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:b.size+"px",height:b.size+"px",borderRadius:"50%",backgroundColor:C,color:z,fontFamily:"inherit",fontWeight:600,overflow:"hidden",flexShrink:0,border:S?Ea+" solid var(--Border)":k?Ea+" solid "+T:"none",...u&&{marginLeft:"2px",marginRight:"2px"},...w&&{cursor:"pointer",outline:"none",padding:0,transition:"background-color 0.15s ease, border-color 0.15s ease","&:hover":{backgroundColor:S?"rgba(0,0,0,0.08)":"var(--Buttons-Default-Hover)"},"&:active":{backgroundColor:S?"rgba(0,0,0,0.15)":"var(--Buttons-Default-Pressed)"},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"2px"}},...m},...f,children:[S&&se(h,{component:"img",src:y,alt:a||"Avatar",onError:()=>x(!0),sx:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"50%"}}),k&&(()=>{const e=function(e){switch(e){case"xxx-small":case"xx-small":case"x-small":case"small":return Ta;case"medium":case"large":default:return za;case"x-large":case"xx-large":return Aa}}(l);return se(e,{sx:{color:"inherit",fontSize:(r=b.size,Math.round(7*r/12)+"px"),lineHeight:1,textAlign:"center",...Pt},"aria-hidden":"true",children:i.slice(0,2).toUpperCase()});var r})(),B&&se(Fa,{size:l,sx:{color:"inherit"},children:o||se(pe,{})})]})}function Na({children:r,max:t=5,size:a="medium",spacing:i=-8,className:o="",sx:n={},...l}){const s=e.Children.toArray(r),d=s.slice(0,t),c=s.length-t;return de(h,{role:"group","aria-label":"Avatar group, "+s.length+" avatars",className:"avatar-group "+o,sx:{display:"inline-flex",alignItems:"center","& > *:not(:first-of-type)":{marginLeft:i+"px"},...n},...l,children:[d,c>0&&se(Oa,{initials:"+"+c,size:a,color:"neutral",sx:{border:"2px solid var(--Background)",zIndex:0}})]})}const Qa=["primary","secondary","tertiary","neutral","info","success","warning","error"],Va=e=>e.charAt(0).toUpperCase()+e.slice(1);function ja(){const e={};return Qa.forEach(r=>{e[r]=function(e){const r=Va(e);return{bg:"var(--Buttons-"+r+"-Button)",text:"var(--Buttons-"+r+"-Text)",border:"none"}}(r),e[r+"-outline"]=function(e){return{bg:"var(--Background)",text:"var(--Text)",border:"1px solid var(--Buttons-"+Va(e)+"-Border)"}}(r),e[r+"-light"]=function(e){const r=Va(e);return{bg:"var(--Buttons-"+r+"-Button)",text:"var(--Buttons-"+r+"-Text)",border:"1px solid var(--Buttons-"+r+"-Border)"}}(r)}),e}const Ga={small:{size:"var(--Sizing-2)",padX:"var(--Sizing-Half)",dot:"var(--Sizing-1)",digits:"var(--Sm-Button-Numbers)"},medium:{size:"var(--Sizing-2-and-Half)",padX:"6px",dot:"10px",digits:"var(--Button-Numbers)"},large:{size:"var(--Sizing-3)",padX:"var(--Sizing-1)",dot:"var(--Sizing-1-and-Half)",digits:"var(--Lg-Button-Numbers)"}};function Ua({variant:e="primary",size:r="medium",badgeContent:t,max:a=99,showZero:i=!1,invisible:o=!1,dot:n=!1,overlap:l="rectangular",anchorOrigin:s={vertical:"top",horizontal:"right"},children:d,className:c="",sx:u={},...h}){const m=ja(),f=m[e]||m.primary,g=Ga[r]||Ga.medium;let x=t;n?x="":"number"==typeof t&&t>a&&(x=a+"+");const b=o||!n&&!i&&(0===t||null==t),v={"& .MuiBadge-badge":{minWidth:n?g.dot:g.size,height:n?g.dot:g.size,padding:n?0:"0 "+g.padX,fontFamily:"var(--Button-Small-Font-Family)",fontWeight:"var(--Button-Small-Font-Weight)",lineHeight:"var(--Button-Small-Line-Height)",letterSpacing:"var(--Button-Small-Letter-Spacing)",fontSize:g.digits,borderRadius:n?g.dot:g.size,backgroundColor:f.bg,color:f.text,border:f.border,boxSizing:"border-box",boxShadow:"0 0 0 1px var(--Background)",transition:"transform 0.2s ease, opacity 0.2s ease"},...u};return se(p,{badgeContent:n?"":x,max:a,showZero:i,invisible:b,overlap:l,anchorOrigin:s,variant:n?"dot":"standard",className:"badge-"+e+" "+c,sx:v,...h,children:d})}const Xa={1:[[.3,.5,.7,0,.41],[1.3,2.5,3.4,-1.2,.205]],2:[[.3,.5,.7,0,.41],[.6,1.2,1.6,-1.2,.273],[3,6,8.1,-2.5,.137]],3:[[.3,.5,.7,0,.41],[.3,.7,.9,-.6,.328],[1,2,2.7,-1.2,.246],[2.8,5.6,7.5,-1.9,.164],[6.3,12.5,16.9,-2.5,.082]],4:[[.3,.5,.7,0,.41],[.4,.7,1,-.5,.342],[1.2,2.4,3.2,-1,.273],[3.4,6.9,9.3,-1.5,.205],[7.8,15.6,21.1,-2,.137],[15,30,40.5,-2.5,.068]],5:[[.3,.5,.7,0,.41],[.4,.7,1,-.4,.359],[1.1,2.2,3,-.7,.308],[3.1,6.3,8.5,-1.1,.256],[7.1,14.2,19.2,-1.4,.205],[13.6,27.3,36.8,-1.8,.154],[23.4,46.8,63.2,-2.1,.103],[37,74,99.9,-2.5,.051]]};function Ya(e){return Xa[e].map(function(e){return e[0]+"px "+e[1]+"px "+e[2]+"px "+e[3]+"px rgba(var(--Dropshadow-Color, 20, 20, 20), "+e[4]+")"}).join(", ")}const Za=(e,r)=>0===e?"none":"var(--Effect-Level-"+e+", "+r+")",qa=Za(1,Ya(1)),Ja=Za(2,Ya(2)),Ka=Za(3,Ya(3)),$a=Za(4,Ya(4)),_a=Za(5,Ya(5)),ei={0:"none",1:qa,2:Ja,3:Ka,4:$a,5:_a},ri={"black-white":"BlackWhite"},ti=e=>{return ri[e]||(r=e).charAt(0).toUpperCase()+r.slice(1);var r},ai={small:"Sm-",medium:"",large:"Lg-"};function ii(e,r){const t=ti(e),a=(e,r)=>`color-mix(in srgb, rgb(var(${e}, ${r})) calc(var(--Button-Bevel-Opacity, 0.5) * 100%), transparent)`,i="var(--_bevel)",o="calc(-1 * var(--_bevel))",n=ai[r],l=void 0===n?(e,r)=>r:(e,r)=>`var(--${n}Button-${e}, ${r})`;return[`inset ${l("Lowlight-Offset-x",o)} ${l("Lowlight-Offset-y",o)} ${l("Lowlight-Blur-Radius",i)} ${l("Lowlight-Spread",o)} `+a(`--Buttons-${t}-Lowlight`,"0 0 0"),`inset ${l("Highlight-Offset-x",i)} ${l("Highlight-Offset-y",i)} ${l("Highlight-Blur-Radius",i)} ${l("Highlight-Spread",o)} `+a(`--Buttons-${t}-Highlight`,"255 255 255")].join(", ")}const oi={small:"var(--Sm-Button-Text-Padding)",medium:"var(--Button-Text-Padding)",large:"var(--Lg-Button-Text-Padding)"},ni=e=>"small"===e?"var(--Sm-Avatar-Text)":"large"===e?"var(--Lg-Avatar-Text)":"var(--Avatar-Text)",li={small:{avatar:"xxx-small",icon:"small"},medium:{avatar:"xx-small",icon:"medium"},large:{avatar:"small",icon:"large"}};function si(r,t){if(!e.isValidElement(r))return r;const a=li[t]||li.medium;return r.type===Oa?e.cloneElement(r,{size:a.avatar,insideButton:!0}):r.type===Fa?e.cloneElement(r,{size:a.icon}):r}const di=["default","primary","secondary","tertiary","neutral","info","success","warning","error"],ci=ti;function ui(e,r=!1,t=!1,a="medium"){const i=ci(e),o=ii(e,a),n=r?qa:"none";return{backgroundColor:`var(--Buttons-${i}-Button)`,color:`var(--Buttons-${i}-Text)`,border:`var(--Button-Border-Width) solid var(--Buttons-${i}-Border)`,boxShadow:"none"===n?o:`${o}, ${n}`,position:"relative",zIndex:1,"& .MuiTouchRipple-rippleVisible":{color:`var(--Buttons-${i}-Hover)`,zIndex:-1},"&:hover":{backgroundColor:`var(--Buttons-${i}-Hover)`,boxShadow:`${o}, ${r?Ja:qa}`,...!t&&{transform:"translateY(-1px)"}},"&:active":{backgroundColor:`var(--Buttons-${i}-Pressed)`,boxShadow:o,...!t&&{transform:"translateY(0)"}},"&.Mui-focusVisible":{backgroundColor:`var(--Buttons-${i}-Button)`,outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"},"& .MuiTouchRipple-root":{zIndex:-1},"& .MuiTypography-root":{zIndex:1},"& .MuiButton-icon":{zIndex:1}}}function hi(e,r=!1){return{backgroundColor:"transparent",color:"var(--Text)",border:`var(--Button-Border-Width) solid var(--Buttons-${ci(e)}-Border)`,boxShadow:"none","& .MuiTouchRipple-rippleVisible":{color:"var(--Hover)"},"&:hover":{backgroundColor:"var(--Hover)",boxShadow:"none",...!r&&{transform:"translateY(-1px)"}},"&:active":{backgroundColor:"var(--Pressed)",...!r&&{transform:"translateY(0)"}},"&.Mui-focusVisible":{backgroundColor:"transparent",outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"}}}function pi(e,r=!1){return{backgroundColor:"transparent",color:e?"var(--Hotlink)":"var(--Quiet)",border:"var(--Button-Border-Width) solid transparent",boxShadow:"none",textDecoration:"none",...e&&{"& .btn-text-content":{textDecoration:"underline"}},"& .MuiTouchRipple-rippleVisible":{color:"var(--Hover)"},"&:hover":{backgroundColor:"var(--Hover)",boxShadow:"none",...!r&&{transform:"translateY(-1px)"},...e?{"& .btn-text-content":{textDecoration:"none"}}:{color:"var(--Text)"}},"&:active":{backgroundColor:"var(--Pressed)",...!r&&{transform:"translateY(0)"},...e?{"& .btn-text-content":{textDecoration:"none"}}:{color:"var(--Text)"}},"&.Mui-focusVisible":{backgroundColor:"transparent",outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px",...e&&{"& .btn-text-content":{textDecoration:"none"}}}}}const mi=/-light$/,fi=new Set;const gi={small:"var(--Small-Button-Height)",medium:"var(--Button-Height)",large:"var(--Large-Button-Height)"},xi={small:{minHeight:"var(--Small-Button-Height)",minWidth:"var(--Button-Min-Width)",fontSize:"var(--Sm-Button-Text)","--_height":"var(--Small-Button-Height)"},large:{minHeight:"var(--Large-Button-Height)",minWidth:"var(--Lg-Button-Min-Width, var(--Button-Min-Width))",fontSize:"var(--Lg-Button-Text)","--_height":"var(--Large-Button-Height)"},medium:{minHeight:"var(--Button-Height)",minWidth:"var(--Button-Min-Width)",fontSize:"var(--Button-Text)","--_height":"var(--Button-Height)"}};function bi({variant:r="default",size:t="medium",elevated:a=!1,selected:i=!1,fullWidth:o=!1,disabled:n=!1,iconOnly:l=!1,letterNumber:s=!1,avatar:d=!1,swatch:c=!1,swatchColor:u,startIcon:p,endIcon:x,startDecorator:b,endDecorator:v,badge:y=!1,badgeContent:S,badgeVariant:k="error",badgeSize:B,badgeDot:w=!1,badgeMax:C=99,badgeAnchorOrigin:T={vertical:"top",horizontal:"right"},children:z,className:A="",sx:I={},...R}){const W=l||d||c,D=W||s;if("production"!==process.env.NODE_ENV){const r=R["aria-label"]||R["aria-labelledby"]||R.title;D&&!r&&console.error('[OmniDesign] A <Button> with no visible text has no accessible name. A screen reader announces it as just "button" — or, for letterNumber, reads the characters ("123") as if they were the label. Add aria-label="…" describing the ACTION ("Your account"), not the content ("JD") or the icon ("trash").'),r&&e.Children.forEach(z,e=>{const t=e?.props?.["aria-label"]||e?.props?.titleAccess;t&&console.error('[OmniDesign] <Button> is labelled "'+r+'" but also contains an icon labelled "'+t+"\". A screen reader reads both. Remove the icon's label — the button owns the name.")})}const L=!W,F=o&&!W&&!s,H=function(e){const r=String(e||"default");if(!mi.test(r))return r;const t=r.replace(mi,"");return"production"===process.env.NODE_ENV||fi.has(r)||(fi.add(r),console.warn('[Button] variant="'+r+'" — the -light shape was removed. Rendering variant="'+t+'" (solid). Use a Buttons mode for colour and solid / -outline / ghost / text for shape.')),t}(!d&&!c||"ghost"!==r&&"text"!==r?r:"primary"),P=function(e,r=!1,t=!1,a="medium"){const i={};return di.forEach(e=>{i[e]=ui(e,r,t,a),i[`${e}-outline`]=hi(e,t)}),i["black-white"]=ui("black-white",r,t,a),i["black-white-outline"]=hi("black-white",t),i.danger=ui("error",r,t,a),i.outline=hi("default",t),i.ghost=pi(e,t),i.text=pi(e,t),i}(L,a,i,t),M=P[H]||P.default,E=function({size:e,iconOnly:r,letterNumber:t,avatar:a}){const i=xi[e]||xi.medium,o=gi[e]||gi.medium;if(r)return{height:o,width:o,minWidth:"unset",minHeight:"unset",fontSize:a?ni(e):"small"===e?"0.875rem":i.fontSize,padding:"0","--_height":o};return t?{...i,minHeight:o,minWidth:o,padding:"0"}:{...i,padding:"large"===e?"0 var(--Lg-Button-Padding)":"0 var(--Button-Padding)"}}({size:t,iconOnly:W,letterNumber:s,avatar:d}),O="small"===t?Ra:Wa,N=void 0!==b?si(b,t):void 0,Q=void 0!==v?si(v,t):void 0,V=B||("small"===t?"small":"large"===t?"large":"medium"),j=de(ce,{children:[se(m,{styles:{'[class*="btn-"] .MuiButton-startIcon, [class*="btn-"] .MuiButton-icon':{marginLeft:"0px !important",marginRight:"2px !important"},'[class*="btn-"] .MuiButton-endIcon':{marginLeft:"2px !important",marginRight:"0px !important"},'[class*="btn-"] .MuiButton-iconSizeSmall .MuiSvgIcon-root, [class*="btn-"] .MuiButton-iconSizeSmall > *':{fontSize:"var(--Sm-Button-Icon) !important"},'[class*="btn-"] .MuiButton-iconSizeMedium .MuiSvgIcon-root, [class*="btn-"] .MuiButton-iconSizeMedium > *':{fontSize:"var(--Button-Icon) !important"},'[class*="btn-"] .MuiButton-iconSizeLarge .MuiSvgIcon-root, [class*="btn-"] .MuiButton-iconSizeLarge > *':{fontSize:"var(--Lg-Button-Icon) !important"}}}),se(f,{size:t,...F&&{fullWidth:!0},disabled:n,startIcon:void 0!==N?N:d?(()=>{if(d&&z){const e=gi[t]||gi.medium,r=ni(t);return se(g,{sx:{width:e,height:e,backgroundColor:"inherit",color:"inherit",fontSize:r},children:z})}return p})():p,endIcon:void 0!==Q?Q:x,className:`btn-${r} ${A}`,role:"button",sx:{borderRadius:d?"var(--Large-Button-Height)":l||c?"small"===t?"var(--Sm-Button-Icon-Radius, var(--Button-Icon-Radius))":"large"===t?"var(--Lg-Button-Icon-Radius, var(--Button-Icon-Radius))":"var(--Button-Icon-Radius)":"small"===t?"var(--Sm-Button-Radius, var(--Button-Radius))":"large"===t?"var(--Lg-Button-Radius, var(--Button-Radius))":"var(--Button-Radius)",textTransform:"none",fontWeight:"inherit",lineHeight:1,whiteSpace:"nowrap",flexShrink:0,transition:"background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, transform 0.15s ease-in-out","--_bevel":"min(calc(var(--Button-Bevel) * var(--_height) / 100), calc(var(--_height) / 5))",..."small"===t&&{position:"relative","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:"var(--Target, 0px)",minHeight:"var(--Target, 0px)"}},...E,...M,"&.MuiButton-root":{padding:E.padding??"0 var(--Sizing-1)"},"& .MuiButton-startIcon":{display:"inherit",color:"inherit",marginLeft:"0px !important",marginRight:d?"0px !important":"2px !important"},...d&&{"& .MuiAvatar-root":{fontSize:ni(t)}},"& .MuiButton-endIcon":{display:"inherit",color:"inherit",marginLeft:"2px !important",marginRight:"0px !important"},"& .MuiSvgIcon-root":{color:"inherit"},"&:focus-visible, &.Mui-focusVisible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"},"&.Mui-disabled":{opacity:.6,cursor:"not-allowed",pointerEvents:"none",backgroundColor:M.backgroundColor,color:M.color,border:M.border,boxShadow:"none"},...c&&{border:"var(--Button-Border-Width) solid var(--Border)",padding:"1px",width:gi[t]||gi.medium,height:gi[t]||gi.medium,minWidth:"unset",minHeight:"unset",boxShadow:"none","--_bevel":"0",backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important",boxShadow:"none"},"&:active":{boxShadow:"none"},"&:hover .btn-swatch-inner":{filter:"brightness(0.9)"}},...F&&{width:"100%"},...I},...R,...c?{style:{backgroundColor:"transparent"}}:{},children:d?null:c?se(h,{className:"btn-swatch-inner",style:{width:"100%",height:"100%",borderRadius:"small"===t?"var(--Sm-Button-Icon-Inner-Radius, calc(var(--Button-Icon-Radius) - 2px))":"large"===t?"var(--Lg-Button-Icon-Inner-Radius, calc(var(--Button-Icon-Radius) - 2px))":"var(--Button-Icon-Inner-Radius, calc(var(--Button-Icon-Radius) - 2px))",...u?{backgroundColor:u}:{}}}):(()=>{if(W)return z;if(s){return se("small"===t?Ia:O,{component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"4px",color:"inherit",lineHeight:1,...Pt},children:z})}return"string"==typeof z||"number"==typeof z?se(h,{component:"span",className:"btn-text-content",sx:{display:"inline-flex",alignItems:"center",padding:oi[t]||oi.medium},children:se(O,{component:"span",sx:{color:"inherit",...Pt},children:z})}):z})()})]});return y?se(Ua,{variant:k,size:V,badgeContent:S,dot:w,max:C,anchorOrigin:T,showZero:0===S,children:j}):j}const vi=["default","primary","secondary","tertiary","neutral","info","success","warning","error","black-white"],yi=e=>"Default"===e?"var(--Quiet)":"var(--Buttons-"+e+"-Border)";function Si(){const e={};return vi.forEach(r=>{e[r]=function(e){const r=ti(e);return{color:r,borderToken:yi(r),icon:"var(--Buttons-"+r+"-Border)"}}(r)}),e}const ki=/-(outline|light|solid)$/,Bi=new Set;function wi(e){const r=Si();return r[function(e){const r=String(e||"default");if(!ki.test(r))return r;const t=r.replace(ki,"");return"production"===process.env.NODE_ENV||Bi.has(r)||(Bi.add(r),console.warn('[Checkbox] variant="'+r+'" — the -outline/-light/-solid shapes were removed; a Checkbox has one look and `variant` selects colour only. Rendering variant="'+t+'". Update the call site.')),t}(e)]||r.default}const Ci={small:{box:16,icon:12,labelSize:"13px",gap:6,touchTarget:24},medium:{box:20,icon:14,labelSize:"15px",gap:8,touchTarget:24},large:{box:24,icon:18,labelSize:"17px",gap:10,touchTarget:24}};function Ti({size:e,variant:r,checked:t,indeterminate:a}){const i=wi(r),o=Ci[e]||Ci.medium,n=t||a,l=i.borderToken,s="small"===e?"var(--Sm-Checkbox-Radius, 3.2px)":"large"===e?"var(--Lg-Checkbox-Radius, 4.8px)":"var(--Checkbox-Radius, 4px)";return se(h,{className:"chk-box-icon",sx:{width:o.box,height:o.box,boxSizing:"border-box",borderRadius:s,border:"2px solid "+l,overflow:"hidden",flexShrink:0,transition:"border-color 0.15s ease-in-out"},children:se(h,{sx:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--Background)",color:"var(--Text)",transition:"background-color 0.15s ease-in-out"},children:n&&se(a?me:he,{sx:{fontSize:o.icon,color:i.icon}})})})}function zi({size:e,variant:r}){return se(Ti,{size:e,variant:r,checked:!1,indeterminate:!1})}function Ai({size:e,variant:r}){return se(Ti,{size:e,variant:r,checked:!0,indeterminate:!1})}function Ii({size:e,variant:r}){return se(Ti,{size:e,variant:r,checked:!1,indeterminate:!0})}function Ri({variant:e="primary",size:r="medium",label:t,checked:a,defaultChecked:i,indeterminate:o=!1,disabled:n=!1,onChange:l,name:s,value:d,className:c="",sx:u={},"aria-label":h,"aria-labelledby":p,"aria-describedby":m,inputProps:f={},...g}){wi(e);const v=Ci[r]||Ci.medium,y="small"===r?_t:ta,S={...f,...h&&{"aria-label":h},...p&&{"aria-labelledby":p},...m&&{"aria-describedby":m}},k=se(x,{checked:a,defaultChecked:i,indeterminate:o,disabled:n,onChange:l,name:s,value:d,icon:se(zi,{size:r,variant:e}),checkedIcon:se(Ai,{size:r,variant:e}),indeterminateIcon:se(Ii,{size:r,variant:e}),className:"chk-"+e+" "+c,inputProps:S,disableRipple:!0,sx:{padding:(v.touchTarget-v.box)/2+"px",minWidth:24,minHeight:24,borderRadius:"var(--Checkbox-Radius, 4px)",color:"inherit",transition:"background-color 0.15s ease-in-out","&.Mui-checked, &.MuiCheckbox-indeterminate":{color:"inherit"},"&:hover":{backgroundColor:"transparent"},"&.Mui-focusVisible .chk-box-icon":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"},"&.Mui-disabled":{opacity:.6,cursor:"not-allowed",pointerEvents:"none"},...u},...g});return t?se(b,{control:k,label:se(y,{component:"span",sx:{color:n?"var(--Text-Quiet)":"var(--Text)",fontSize:v.labelSize,lineHeight:1.4,userSelect:"none"},children:t}),disabled:n,sx:{marginLeft:0,marginRight:0,gap:v.gap+"px",alignItems:"center","&.Mui-disabled .MuiTypography-root":{color:"var(--Text-Quiet)",opacity:.6}}}):k}const Wi=["primary","secondary","tertiary","neutral","info","success","warning","error"],Di=e=>e.charAt(0).toUpperCase()+e.slice(1);function Li(e){return{bg:"var(--Hover)",border:"var(--Buttons-"+Di(e)+"-Border)",text:"var(--Text)",focusBg:"var(--Hover)"}}function Fi(e){const r=Di(e);return{bg:"var(--Buttons-"+r+"-Light-Button, var(--Hover))",border:"var(--Buttons-"+r+"-Border)",text:"var(--Text)",focusBg:"var(--Buttons-"+r+"-Light-Button, var(--Hover))"}}const Hi={small:{height:"var(--Small-Button-Height)",fontSize:"13px",labelSize:"13px",padding:"4px var(--Input-Padding, 8px)",iconSize:16},medium:{height:"var(--Button-Height)",fontSize:"15px",labelSize:"15px",padding:"4px var(--Input-Padding, 12px)",iconSize:18},large:{height:"var(--Large-Button-Height)",fontSize:"17px",labelSize:"17px",padding:"4px var(--Input-Padding, 16px)",iconSize:20}},Pi={small:{height:"48px",fontSize:"13px",labelSize:"11px",padding:"20px var(--Input-Padding, 12px) 4px",padTop:20,padBottom:4,leftPad:12,iconSize:16},medium:{height:"56px",fontSize:"15px",labelSize:"12px",padding:"22px var(--Input-Padding, 14px) 6px",padTop:22,padBottom:6,leftPad:14,iconSize:18},large:{height:"64px",fontSize:"17px",labelSize:"14px",padding:"24px var(--Input-Padding, 16px) 6px",padTop:24,padBottom:6,leftPad:16,iconSize:20}},Mi={small:{resting:"Body-Small",shrunk:"Label-ExtraSmall"},medium:{resting:"Body-Medium",shrunk:"Label-Small"},large:{resting:"Body-Large",shrunk:"Label-Medium"}},Ei=e=>({fontSize:"var(--"+e+"-Font-Size)",fontWeight:"var(--"+e+"-Font-Weight)",letterSpacing:"var(--"+e+"-Letter-Spacing)"});const Oi={info:be,success:fe,warning:ge,error:xe},Ni={info:{border:"var(--Buttons-Info-Border)",icon:"var(--Icons-Info)",text:"var(--Hotlink)"},success:{border:"var(--Buttons-Success-Border)",icon:"var(--Icons-Success)",text:"var(--Text-Success)"},warning:{border:"var(--Buttons-Warning-Border)",icon:"var(--Icons-Warning)",text:"var(--Text-Warning)"},error:{border:"var(--Buttons-Error-Border)",icon:"var(--Icons-Error)",text:"var(--Text-Error)"}};function Qi({variant:e="primary-outline",size:r="medium",label:a,labelPosition:i="standard",placeholder:o,helperText:n,validation:l,validationMessage:s,disabled:d=!1,id:c,value:u,defaultValue:p,onChange:m,name:f,type:g="text",multiline:x=!1,rows:b,maxRows:k,resize:B="vertical",startAdornment:w,endAdornment:C,fullWidth:T=!1,className:z="",sx:A={},"aria-label":I,"aria-labelledby":R,"aria-describedby":W,"aria-required":D,"aria-invalid":L,inputProps:F={},...H}){const P=function(){const e={};return Wi.forEach(r=>{e[r+"-outline"]=Li(r),e[r+"-light"]=Fi(r)}),e.outline=Li("primary"),e.light=Fi("primary"),e}(),M=P[e]||P["primary-outline"],E="floating"===i;e.endsWith("-light");const O=E?Pi[r]||Pi.medium:Hi[r]||Hi.medium,N=t(),Q=c||N,{labelX:V,padX:j,restingY:G,shrunkY:U}=function(e,r){const t=parseInt(e.height,10)||56,a=parseInt(e.fontSize,10)||15,i="var(--Input-Padding, "+(e.leftPad||14)+"px)",o=(e.iconSize||18)+8;return{labelX:r?"calc("+i+" + "+o+"px)":i,padX:i,clearance:r?o:0,restingY:Math.round((t-1.4375*a)/2),shrunkY:6}}(O,!!w),X=Mi[r]||Mi.medium,Y=e.replace(/-outline$/,"").replace(/-light$/,"");Di(Y);const Z="var(--Text)",q=l?Ni[l]:null,J=l?Oi[l]:null,K=q?q.border:M.border,$={...F,...I&&{"aria-label":I},...R&&{"aria-labelledby":R},...W&&{"aria-describedby":W},...D&&{"aria-required":D},...L&&{"aria-invalid":L}};return de(h,{className:"inp-"+e+" "+z,sx:{width:T?"100%":"auto",...A},children:[(()=>{if(!a||E)return null;return se("small"===r?_t:ta,{component:"label",htmlFor:Q,sx:{display:"block",marginBottom:"6px",color:d?"var(--Quiet)":"var(--Text)",fontSize:O.labelSize,fontWeight:500,opacity:d?.6:1},children:a})})(),se(h,{sx:{border:"1px solid "+K,borderRadius:"small"===r?"var(--Sm-Input-Radius, var(--Input-Radius, var(--Style-Border-Radius)))":"large"===r?"var(--Lg-Input-Radius, var(--Input-Radius, var(--Style-Border-Radius)))":"var(--Input-Radius, var(--Style-Border-Radius))",overflow:"hidden",transition:"border-color 0.15s ease-in-out",boxShadow:"none","&:focus-within":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"}},children:se(h,{children:se(v,{value:u,defaultValue:p,onChange:m,name:f,type:g,disabled:d,placeholder:o,id:Q,multiline:x,rows:b,maxRows:k,fullWidth:!0,label:E?a:void 0,variant:"outlined",size:"small"===r?"small":"medium",inputProps:$,InputProps:{startAdornment:w?se(y,{position:"start",children:w}):void 0,endAdornment:(()=>{if(C)return se(y,{position:"end",children:C})})()},sx:{"& .MuiOutlinedInput-root":{backgroundColor:"var(--Hover)",color:"var(--Quiet)",fontSize:O.fontSize,minHeight:x?"auto":O.height,padding:0,borderRadius:0,transition:"color 0.15s ease-in-out",...E&&{alignItems:"stretch"},"& fieldset":{border:"none"},"&.Mui-focused":{color:Z},"&:not(.Mui-focused) .MuiOutlinedInput-input:not(:placeholder-shown)":{color:Z},"&.Mui-disabled":{opacity:.6,cursor:"not-allowed"},"& input":{padding:O.padding,color:"inherit","&::placeholder":{color:"var(--Quiet)",opacity:1}},"& textarea":{padding:O.padding,color:"inherit",resize:B,"&::placeholder":{color:"var(--Quiet)",opacity:1}},"& .MuiInputAdornment-root":{color:"var(--Quiet)"},...E&&{"& .MuiInputAdornment-root":{maxHeight:"none",height:"auto",alignSelf:"stretch",alignItems:"center",paddingTop:O.padTop+"px",paddingBottom:O.padBottom+"px",marginTop:0,marginBottom:0},"& .MuiInputAdornment-positionStart":{marginLeft:j,marginRight:"8px",width:O.iconSize+"px",minWidth:O.iconSize+"px",justifyContent:"center"},"& .MuiInputAdornment-positionEnd":{marginRight:"8px"},...w&&{"& input":{paddingLeft:0},"& textarea":{paddingLeft:0}}}},"& .MuiInputLabel-root":{color:"var(--Quiet)",fontFamily:"var(--Font-Families-Body, var(--Body-Font-Family))",...Ei(X.resting),transformOrigin:"top left",transition:"transform 0.15s ease, font-size 0.15s ease, color 0.15s ease",transform:"translate("+V+", "+G+"px)","&.MuiInputLabel-shrink":{transform:"translate("+V+", "+U+"px)",...Ei(X.shrunk),color:"var(--Quiet)"},"&.Mui-focused":{color:Z},"&.Mui-disabled":{color:"var(--Quiet)",opacity:.6}},"& .MuiOutlinedInput-notchedOutline legend":{display:"none"},"& .MuiOutlinedInput-notchedOutline":{top:0},"& .MuiOutlinedInput-root.Mui-focused":{outline:"none"},"& .MuiOutlinedInput-root:focus-within":{outline:"none"}},...H})})}),l&&s?de(h,{sx:{display:"flex",alignItems:"center",gap:"6px",marginTop:"4px",marginLeft:"2px"},children:[J&&se(J,{sx:{fontSize:O.iconSize,color:q.icon,flexShrink:0}}),se(S,{sx:{color:q.text,fontSize:"small"===r?"11px":"12px",margin:0},children:s})]}):n?se(S,{sx:{color:"var(--Quiet)",fontSize:"small"===r?"11px":"12px",marginTop:"4px",marginLeft:"2px"},children:n}):null]})}const Vi=e=>e.charAt(0).toUpperCase()+e.slice(1),ji={small:{height:"var(--Small-Button-Height)",fontSize:"13px",padding:"4px 8px",iconSize:16},medium:{height:"var(--Button-Height)",fontSize:"14px",padding:"6px 12px",iconSize:18},large:{height:"var(--Large-Button-Height)",fontSize:"16px",padding:"8px 16px",iconSize:20}},Gi={small:{height:48,fontSize:"13px",padding:"20px 12px 4px",labelSize:"11px",leftPad:12},medium:{height:56,fontSize:"14px",padding:"22px 14px 6px",labelSize:"12px",leftPad:14},large:{height:64,fontSize:"16px",padding:"24px 16px 6px",labelSize:"14px",leftPad:16}};function Ui({options:t=[],value:n,defaultValue:l="",onChange:s,label:d,labelPosition:c="top",size:u="medium",variant:p="outline",color:m="primary",selectionStyle:f="default",mode:g="standard",placeholder:x="Select…",showDividers:b=!1,showColorLabels:v=!0,startDecoration:y,disabled:S=!1,fullWidth:k=!1,className:B="",sx:w={},...C}){const T="default"===m?"primary":m,z=Vi(T),A="var(--Buttons-"+z+"-Border)",I="default"===m?"var(--Text)":"var(--Text-"+z+")",[R,W]=r(l),[D,L]=r(!1),[F,H]=r(!1),[P,M]=r({top:0,left:0,width:0,direction:"down"}),E=a(null),O=a(null),[N,Q]=r(null),[V,j]=r(null),G=void 0!==n,U=G?n:R,X=t.flatMap(e=>e&&Array.isArray(e.options)?e.options:[e]).find(e=>("string"==typeof e?e:e.value)===U),Y=X?"string"==typeof X?X:X.label:"",Z=""!==U&&null!=U,q="floating"===c,J="top"===c,K="color"===g,$=q?Gi[u]||Gi.medium:ji[u]||ji.medium,_=i(e=>{G||W(e),s?.(e),L(!1),O.current?.focus()},[G,s]),ee=i(()=>{if(!O.current)return{top:0,left:0,width:0};const e=O.current.getBoundingClientRect(),r=window.innerHeight-e.bottom,t=e.top,a=r>=240||r>=t?"down":"up";return{top:"down"===a?e.bottom+4:void 0,bottom:"up"===a?window.innerHeight-e.top+4:void 0,left:e.left,width:e.width,direction:a}},[]),re=i(()=>{S||L(e=>(e||M(ee()),!e))},[S,ee]);o(()=>{if(!D)return;const e=e=>{!E.current||E.current.contains(e.target)||e.target.closest("[data-select-dropdown]")||L(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[D]),o(()=>{if(!D||!O.current)return;const e=O.current.closest("[data-theme]"),r=O.current.closest("[data-surface]");Q(e?.getAttribute("data-theme")||null),j(r?.getAttribute("data-surface")||null);const t=()=>M(ee());return window.addEventListener("scroll",t,!0),window.addEventListener("resize",t),()=>{window.removeEventListener("scroll",t,!0),window.removeEventListener("resize",t)}},[D,ee]);const te=a(null),ae=i(e=>{const r=te.current;if(!r)return;const t=r.querySelectorAll('[role="option"]');if(!t.length)return;const a=r.querySelector('[role="option"]:focus');let i=Array.prototype.indexOf.call(t,a);i="down"===e?i<t.length-1?i+1:0:i>0?i-1:t.length-1,t[i].focus()},[]);o(()=>{D&&requestAnimationFrame(()=>{const e=te.current;if(!e)return;const r=e.querySelector('[aria-selected="true"]'),t=e.querySelector('[role="option"]');(r||t)?.focus()})},[D]);const ie=D?ve.createPortal(se(h,{ref:te,"data-select-dropdown":!0,"data-theme":N||void 0,role:"listbox","aria-label":d||"Options",sx:{position:"fixed",top:P.top??"unset",bottom:P.bottom??"unset",left:P.left,width:P.width+"px",backgroundColor:"var(--Hover)",border:"1px solid var(--Buttons-Default-Border)",borderRadius:"var(--Dropdown-Frame-Radius, var(--Input-Radius, var(--Style-Border-Radius, 4px)))",boxShadow:"none",zIndex:99999,maxHeight:"240px",overflowY:"auto",py:.5},children:(()=>{const r=(r,t,a)=>{const i="string"==typeof r?r:r.value,o="string"==typeof r?r:r.label,n="object"==typeof r?r.color:null,l=i===U,s=function(e,r,t){const a=Vi(t||"default");return r?"solid"===e?{backgroundColor:"var(--Buttons-"+a+"-Button)",color:"var(--Buttons-"+a+"-Text)",border:"1px solid var(--Buttons-"+a+"-Border)",fontWeight:600}:"light"===e?{backgroundColor:"var(--Buttons-"+a+"-Light-Button)",color:"var(--Buttons-"+a+"-Light-Text)",border:"1px solid var(--Buttons-"+a+"-Light-Border)",fontWeight:600}:{backgroundColor:"var(--Buttons-"+a+"-Button)",color:"var(--Buttons-"+a+"-Text)",border:"1px solid var(--Buttons-"+a+"-Border)",fontWeight:600}:{color:"var(--Text)",backgroundColor:"transparent",border:"1px solid transparent"}}(f,l,T),d=t===a-1;return de(e.Fragment,{children:[de(h,{role:"option",tabIndex:-1,"aria-selected":l,"aria-label":K&&!v?o:void 0,onClick:()=>_(i),onKeyDown:e=>((e,r)=>{if("Enter"===e.key||" "===e.key)return e.preventDefault(),void _(r);"ArrowDown"===e.key&&(e.preventDefault(),ae("down")),"ArrowUp"===e.key&&(e.preventDefault(),ae("up")),"Escape"===e.key&&(L(!1),O.current?.focus())})(e,i),sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:0,mx:.5,my:"1px",minHeight:$.height,cursor:"pointer",fontSize:$.fontSize,fontFamily:"inherit",borderRadius:"4px",outline:"none",...s,transition:"background-color 0.1s ease","&:hover":l?{}:{backgroundColor:"var(--Buttons-"+z+"-Hover)",color:"var(--Buttons-"+z+"-Text)"},"&:active":l?{}:{backgroundColor:"var(--Buttons-"+z+"-Pressed)",color:"var(--Buttons-"+z+"-Text)"},"&:focus-visible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"}},children:[K&&n&&se(h,{sx:{height:"calc("+$.height+" - 8px)",width:"calc("+$.height+" - 8px)",borderRadius:"var(--Input-Swatch-Radius, var(--Button-Radius))",backgroundColor:n,border:"1px solid "+(l?"var(--Buttons-"+z+"-Border)":"var(--Border)"),flexShrink:0}}),(!K||v)&&se(_t,{style:{flex:1,color:"inherit",fontWeight:"inherit"},children:o}),l&&se(Fa,{size:"small",sx:{opacity:.6,flexShrink:0},children:se(he,{})})]}),b&&!d&&se(h,{"aria-hidden":"true",sx:{height:"1px",backgroundColor:"var(--Border)",mx:1,my:.25}})]},i)};return t.map((a,i)=>{if(a&&Array.isArray(a.options)){const t=a.options;return de(e.Fragment,{children:[se(h,{role:"presentation",sx:{px:1.5,pt:0===i?.75:1.25,pb:.5,fontSize:"11px",fontFamily:"inherit",fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--Text-Quiet)"},children:a.label}),t.map((e,a)=>r(e,a,t.length))]},"group-"+(a.label||i))}return r(a,i,t.length)})})()}),document.body):null;return de(h,{ref:E,className:"select-wrapper select-"+u+" select-label-"+c+" select-style-"+f+" select-variant-"+p+(D?" select-open":"")+(S?" select-disabled":"")+(B?" "+B:""),sx:{position:"relative",width:k?"100%":"auto",display:"inline-block",fontFamily:"inherit",...w},...C,children:[J&&d&&se("small"===u?_t:ta,{component:"label",style:{display:"block",marginBottom:"6px",color:S?"var(--Quiet)":"var(--Text)",fontWeight:500,opacity:S?.6:1},children:d}),se(h,{sx:{border:"1px solid "+A,borderRadius:"var(--Input-Radius, var(--Style-Border-Radius))",overflow:"hidden",transition:"border-color 0.15s ease",boxShadow:"none","&:focus-within":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"}},children:se(h,{children:de(h,{ref:O,component:"button",type:"button",role:"combobox","aria-expanded":D,"aria-haspopup":"listbox","aria-label":d||x,tabIndex:S?-1:0,onClick:re,onKeyDown:e=>"Escape"===e.key?(L(!1),void O.current?.focus()):"Enter"===e.key||" "===e.key?(e.preventDefault(),void re()):D||"ArrowDown"!==e.key&&"ArrowUp"!==e.key?(D&&"ArrowDown"===e.key&&(e.preventDefault(),ae("down")),void(D&&"ArrowUp"===e.key&&(e.preventDefault(),ae("up")))):(e.preventDefault(),void L(!0)),onFocus:()=>H(!0),onBlur:()=>H(!1),sx:{display:"flex",alignItems:"center",gap:1,width:"100%",minWidth:140,height:$.height,padding:$.padding,backgroundColor:"var(--Hover)",border:"none",borderRadius:0,color:Z||D?I:"var(--Quiet)",fontSize:$.fontSize,fontFamily:"inherit",cursor:S?"not-allowed":"pointer",opacity:S?.5:1,outline:"none",textAlign:"left",position:"relative",transition:"color 0.15s ease"},children:[y&&se(h,{sx:{display:"flex",alignItems:"center",flexShrink:0,color:"var(--Text-Quiet)"},children:y}),q&&d&&se(h,{sx:{position:"absolute",top:Z||D?"6px":"50%",left:($.leftPad||14)+(y?32:0)+"px",transform:Z||D?"scale(0.75)":"translateY(-50%)",transformOrigin:"top left",color:D?I:"var(--Quiet)",fontSize:$.fontSize,fontWeight:400,pointerEvents:"none",transition:"top 0.15s ease, transform 0.15s ease, color 0.15s ease"},children:d}),se(h,{sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...q&&{mt:Z||D?"8px":0}},children:K&&Z?de(h,{sx:{display:"flex",alignItems:"center",gap:1},children:[se(h,{sx:{height:"calc("+$.height+" - 8px)",width:"calc("+$.height+" - 8px)",borderRadius:"var(--Input-Swatch-Radius, var(--Button-Radius))",backgroundColor:X&&"string"!=typeof X&&X.color||"transparent",border:"1px solid var(--Border)",flexShrink:0}}),v&&se(_t,{style:{color:"inherit",padding:0},children:Y})]}):se(_t,{style:{color:"inherit",padding:0},children:Z?Y:q&&d?"":x})}),se(ye,{sx:{fontSize:($.iconSize||18)+"px",color:"var(--Text-Quiet)",transform:D?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease",flexShrink:0}})]})})}),ie]})}const Xi={default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},Yi={default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},Zi={default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},qi={small:{px:"var(--Sm-Button-Padding, 8px)",fontSize:"var(--Sm-Button-Text, 14px)",iconSize:"var(--Sm-Button-Icon, 20px)",textPad:"var(--Sm-Button-Text-Padding, 4px)",indicatorThickness:"2px",minHeight:"var(--Sm-Button-Height, 24px)"},medium:{px:"var(--Button-Padding, 8px)",fontSize:"var(--Button-Text, 16px)",iconSize:"var(--Button-Icon, 20px)",textPad:"var(--Button-Text-Padding, 4px)",indicatorThickness:"2px",minHeight:"var(--Button-Height, 32px)"},large:{px:"var(--Lg-Button-Padding, 16px)",fontSize:"var(--Lg-Button-Text, 20px)",iconSize:"var(--Lg-Button-Icon, 32px)",textPad:"var(--Lg-Button-Text-Padding, 8px)",indicatorThickness:"2px",minHeight:"var(--Lg-Button-Height, 56px)"}},Ji=l({value:0,setValue:()=>{},variant:"standard",color:"primary",size:"medium",orientation:"horizontal",scrollable:!1,tabsId:""}),Ki=()=>n(Ji);function $i({children:e,defaultValue:a=0,value:o,onChange:n,variant:l="standard",color:s="primary",size:d="medium",orientation:c="horizontal",scrollable:u=!1,className:p="",sx:m={},...f}){const[g,x]=r(a),b=void 0!==o,v=b?o:g,y=t(),S=i(e=>{b||x(e),n?.(e)},[b,n]);return se(Ji.Provider,{value:{value:v,setValue:S,variant:l,color:s,size:d,orientation:c,scrollable:u,tabsId:y},children:se(h,{className:"tabs tabs-"+c+" tabs-"+d+" tabs-"+l+("standard"!==l?" tabs-"+s:"")+(u?" tabs-scrollable":"")+" "+p,sx:{display:"flex",flexDirection:"horizontal"===c?"column":"row",width:"100%",overflow:"hidden",...m},...f,children:e})})}function _i({children:t,rounded:n=!1,className:l="",sx:s={},...d}){const{variant:c,color:u,size:p,orientation:m,scrollable:f,tabsId:g}=Ki(),x=a(null),b=a(null),[v,y]=r(!1),[S,k]=r(!1),B="horizontal"===m,w="standard"===c,C="light"===c,T="dark"===c,z=w?void 0:"solid"===c?Xi[u]:C?Yi[u]:T?Zi[u]:void 0,A=w?void 0:T?"Surface-Dimmest":C?"Surface-Brightest":"Surface",I=i(()=>{const e=b.current;e&&f&&B&&(y(e.scrollLeft>1),k(e.scrollLeft<e.scrollWidth-e.clientWidth-1))},[f,B]);o(()=>{I();const e=b.current;if(!e||!f)return;e.addEventListener("scroll",I,{passive:!0});const r=new ResizeObserver(I);return r.observe(e),()=>{e.removeEventListener("scroll",I),r.disconnect()}},[f,I]);const R=e=>{const r=b.current;if(!r)return;const t=.6*r.clientWidth;r.scrollBy({left:e*t,behavior:"smooth"})},W={display:"inline-flex",alignItems:"center",justifyContent:"center",width:"28px",minWidth:"28px",border:"none",backgroundColor:"transparent",color:"var(--Text-Quiet)",cursor:"pointer",fontSize:"16px",fontFamily:"inherit",lineHeight:1,flexShrink:0,transition:"color 0.15s ease, background-color 0.15s ease","&:hover":{color:"var(--Text)",backgroundColor:"var(--Hover)"},"&:active":{backgroundColor:"var(--Pressed)"},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"-3px"},"&:disabled":{opacity:.3,cursor:"default","&:hover":{backgroundColor:"transparent",color:"var(--Text-Quiet)"}}},D=e.Children.toArray(t).filter(e.isValidElement).map((r,t)=>e.cloneElement(r,{_index:t,key:r.key||t}));return de(h,{ref:x,"data-theme":z||void 0,"data-surface":A||void 0,className:"tab-list tab-list-"+c+" tab-list-"+p+" tab-list-"+m+(f?" tab-list-scrollable":"")+" "+l,onKeyDown:e=>{const r=f?b.current:x.current,t=r?.querySelectorAll('[role="tab"]:not([aria-disabled="true"])');if(!t?.length)return;const a=Array.from(t).indexOf(document.activeElement);if(a<0)return;const i=B?"ArrowRight":"ArrowDown",o=B?"ArrowLeft":"ArrowUp";if(e.key===i){e.preventDefault();const r=t[(a+1)%t.length];r.focus(),f&&r.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})}else if(e.key===o){e.preventDefault();const r=t[(a-1+t.length)%t.length];r.focus(),f&&r.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})}else"Home"===e.key?(e.preventDefault(),t[0].focus(),f&&t[0].scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})):"End"===e.key&&(e.preventDefault(),t[t.length-1].focus(),f&&t[t.length-1].scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"}))},sx:{display:"flex",flexDirection:B?"row":"column",gap:0,position:"relative",backgroundColor:"var(--Background)",padding:"4px",overflow:"hidden",borderRadius:n?"var(--Style-Border-Radius)":0,...s},...d,children:[f&&B&&se(h,{component:"button","aria-label":"Scroll tabs left",onClick:()=>R(-1),disabled:!v,className:"tab-list-scroll-btn tab-list-scroll-btn-left",sx:W,children:"‹"}),se(h,f&&B?{ref:b,role:"tablist","aria-orientation":m,className:"tab-list-scroll-container",sx:{display:"flex",flexDirection:"row",overflowX:"auto",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},flex:1,minWidth:0},children:D}:{ref:b,role:"tablist","aria-orientation":m,sx:{display:"flex",flexDirection:B?"row":"column",flex:1},children:D}),f&&B&&se(h,{component:"button","aria-label":"Scroll tabs right",onClick:()=>R(1),disabled:!S,className:"tab-list-scroll-btn tab-list-scroll-btn-right",sx:W,children:"›"})]})}function eo({children:e,value:r,_index:t=0,disabled:a=!1,startDecorator:i,endDecorator:o,iconOnly:n=!1,className:l="",sx:s={},...d}){const{value:c,setValue:u,variant:p,color:m,size:f,orientation:g,tabsId:x}=Ki(),b=qi[f]||qi.medium,v="horizontal"===g,y="standard"===p,S="light"===p,k="dark"===p,B=void 0!==r?r:t,w=c===B,C=y?"var(--Buttons-"+({default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"}[m]||"Default")+"-Border)":"var(--Text)";return de(h,{component:"button",role:"tab",id:"tab-"+x+"-"+B,"data-theme":(y?void 0:"solid"===p?Xi[m]:S?Yi[m]:k?Zi[m]:void 0)||void 0,"data-surface":(y?void 0:k?"Surface-Dimmest":S?"Surface-Brightest":"Surface")||void 0,"aria-selected":w,"aria-controls":"tabpanel-"+x+"-"+B,"aria-disabled":a||void 0,tabIndex:w?0:-1,onClick:()=>{a||u(B)},className:"tab tab-"+f+(w?" tab-selected":"")+(a?" tab-disabled":"")+(n?" tab-icon-only":"")+" "+l,sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"2px",padding:"0 "+(n?"0":b.px),minHeight:b.minHeight,fontSize:b.fontSize,fontFamily:"inherit",fontWeight:500,lineHeight:1.3,color:w?"var(--Text)":"var(--Quiet)",backgroundColor:"transparent",border:"none",borderBottom:v?w?b.indicatorThickness+" solid "+C:b.indicatorThickness+" solid transparent":"none",borderRight:v?"none":w?b.indicatorThickness+" solid "+C:b.indicatorThickness+" solid transparent",cursor:a?"not-allowed":"pointer",opacity:a?.5:1,position:"relative",outline:"none",transition:"color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease",flexShrink:0,whiteSpace:"nowrap",...!a&&{"&:hover":{backgroundColor:"var(--Hover)"},"&:active":{backgroundColor:"var(--Pressed)"},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"-3px"}},...s},...d,children:[i&&se(h,{className:"tab-start-decorator",sx:{display:"inline-flex",fontSize:b.iconSize,lineHeight:1,flexShrink:0},children:i}),!n&&e&&(()=>{const r="small"===f?ca:_t;return se(h,{className:"tab-label",sx:{display:"inline-flex",alignItems:"center",padding:"4px "+b.textPad},children:se(r,{style:{color:"inherit",fontWeight:"inherit"},children:e})})})(),o&&se(h,{className:"tab-end-decorator",sx:{display:"inline-flex",fontSize:b.iconSize,lineHeight:1,flexShrink:0},children:o})]})}function ro({children:e,value:r,className:t="",sx:a={},...i}){const{value:o,size:n,tabsId:l}=Ki();return o===r?se(h,{role:"tabpanel",id:"tabpanel-"+l+"-"+r,"aria-labelledby":"tab-"+l+"-"+r,className:"tab-panel tab-panel-"+n+" "+t,sx:{paddingTop:"16px",fontSize:(qi[n]||qi.medium).fontSize,fontFamily:"inherit",color:"var(--Text)",...a},...i,children:e}):null}const to=e.forwardRef(function({theme:e=null,surface:r="Surface",children:t,minHeight:a=160,sx:i={}},o){return se(h,{ref:o,"data-theme":e||void 0,"data-surface":r,sx:{p:4,display:"flex",alignItems:"center",justifyContent:"center",minHeight:a,backgroundColor:"var(--Background)",borderBottom:"1px solid var(--Border)",...i},children:t})}),ao="__null__",io=[{label:"Default",value:ao},{label:"Primary",value:"Primary"},{label:"Secondary",value:"Secondary"},{label:"Tertiary",value:"Tertiary"},{label:"Neutral",value:"Neutral"},{label:"Info",value:"Info"},{label:"Success",value:"Success"},{label:"Warning",value:"Warning"},{label:"Error",value:"Error"}],oo=["Surface-Dimmest","Surface-Dim","Surface","Surface-Bright","Surface-Brightest","Container","Container-Highest","Container-High","Container-Low","Container-Lowest"];function no({theme:e=null,onThemeChange:r,surface:t="Surface",onSurfaceChange:a,surfaces:i=oo,size:o="small"}){const n=i.map(e=>({value:e,label:e}));return de(k,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[se(h,{sx:{width:160},children:se(Ui,{options:io,value:e??ao,onChange:e=>r?.(e===ao?null:e),labelPosition:"none",size:o,variant:"outline",color:"default","aria-label":"Background theme",fullWidth:!0})}),se(h,{sx:{width:180},children:se(Ui,{options:n,value:t,onChange:e=>a?.(e),labelPosition:"none",size:o,variant:"outline",color:"default","aria-label":"Surface",fullWidth:!0})})]})}function lo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var so,co={exports:{}},uo={exports:{}},ho={};var po,mo,fo,go,xo,bo,vo,yo,So,ko,Bo,wo,Co,To,zo={};
1
+ import e,{useState as r,useId as t,useRef as a,useCallback as i,useEffect as o,useContext as n,createContext as l,useMemo as s,forwardRef as d,Children as c,isValidElement as u}from"react";import{Box as h,Badge as p,GlobalStyles as m,Button as f,Avatar as g,Checkbox as x,FormControlLabel as b,TextField as v,InputAdornment as y,FormHelperText as S,Stack as k,Tooltip as B,Typography as w,Grid as C,Alert as T,Switch as z,ToggleButton as A,ToggleButtonGroup as I,Radio as R,FormControl as W,FormLabel as D,RadioGroup as P,Slider as F,Chip as L,Container as H,Tabs as M,Tab as E,Paper as O,Dialog as N,DialogTitle as Q,DialogContent as V,DialogContentText as j,DialogActions as G,Zoom as U,Grow as X,Fade as Y,Slide as q,List as Z,ListItem as J,ListItemButton as K,ListItemIcon as $,ListItemText as _,Collapse as ee,Divider as re,Drawer as te,useTheme as ae,useMediaQuery as ie,AppBar as oe,Toolbar as ne}from"@mui/material";import{jsx as le,Fragment as se,jsxs as de}from"react/jsx-runtime";import ce from"@mui/icons-material/ContentCopy";import ue from"@mui/icons-material/Check";import he from"@mui/icons-material/Person";import pe from"@mui/icons-material/Remove";import me from"@mui/icons-material/CheckCircleOutline";import fe from"@mui/icons-material/WarningAmber";import ge from"@mui/icons-material/ErrorOutline";import xe from"@mui/icons-material/InfoOutlined";import be from"react-dom";import ve from"@mui/icons-material/ExpandMore";import ye from"@mui/icons-material/Favorite";import Se from"@mui/icons-material/Home";import ke from"@mui/icons-material/Delete";import Be from"@mui/icons-material/Settings";import we from"@mui/icons-material/Search";import Ce from"@mui/icons-material/Star";import Te from"@mui/icons-material/Notifications";import ze from"@mui/icons-material/Visibility";import Ae from"@mui/icons-material/ShoppingCart";import Ie from"@mui/icons-material/Lock";import Re from"@mui/icons-material/Info";import We from"@mui/icons-material/HomeOutlined";import De from"@mui/icons-material/FavoriteBorderOutlined";import Pe from"@mui/icons-material/DeleteOutlined";import Fe from"@mui/icons-material/SettingsOutlined";import Le from"@mui/icons-material/StarOutline";import He from"@mui/icons-material/PersonOutlined";import Me from"@mui/icons-material/NotificationsOutlined";import Ee from"@mui/icons-material/VisibilityOutlined";import Oe from"@mui/icons-material/ShoppingCartOutlined";import Ne from"@mui/icons-material/LockOutlined";import Qe from"@mui/icons-material/HomeRounded";import Ve from"@mui/icons-material/FavoriteRounded";import je from"@mui/icons-material/DeleteRounded";import Ge from"@mui/icons-material/SettingsRounded";import Ue from"@mui/icons-material/SearchRounded";import Xe from"@mui/icons-material/StarRounded";import Ye from"@mui/icons-material/PersonRounded";import qe from"@mui/icons-material/NotificationsRounded";import Ze from"@mui/icons-material/VisibilityRounded";import Je from"@mui/icons-material/ShoppingCartRounded";import Ke from"@mui/icons-material/LockRounded";import $e from"@mui/icons-material/InfoRounded";import _e from"@mui/icons-material/HomeTwoTone";import er from"@mui/icons-material/FavoriteTwoTone";import rr from"@mui/icons-material/DeleteTwoTone";import tr from"@mui/icons-material/SettingsTwoTone";import ar from"@mui/icons-material/SearchTwoTone";import ir from"@mui/icons-material/StarTwoTone";import or from"@mui/icons-material/PersonTwoTone";import nr from"@mui/icons-material/NotificationsTwoTone";import lr from"@mui/icons-material/VisibilityTwoTone";import sr from"@mui/icons-material/ShoppingCartTwoTone";import dr from"@mui/icons-material/LockTwoTone";import cr from"@mui/icons-material/InfoTwoTone";import ur from"@mui/icons-material/HomeSharp";import hr from"@mui/icons-material/FavoriteSharp";import pr from"@mui/icons-material/DeleteSharp";import mr from"@mui/icons-material/SettingsSharp";import fr from"@mui/icons-material/SearchSharp";import gr from"@mui/icons-material/StarSharp";import xr from"@mui/icons-material/PersonSharp";import br from"@mui/icons-material/NotificationsSharp";import vr from"@mui/icons-material/VisibilitySharp";import yr from"@mui/icons-material/ShoppingCartSharp";import Sr from"@mui/icons-material/LockSharp";import kr from"@mui/icons-material/InfoSharp";import Br from"@mui/icons-material/Code";import wr from"@mui/icons-material/GridView";import Cr from"@mui/icons-material/Computer";import Tr from"@mui/icons-material/Add";import*as zr from"@mui/icons-material";import{Settings as Ar,Close as Ir}from"@mui/icons-material";import Rr from"@mui/icons-material/Menu";import Wr from"@mui/icons-material/Close";import Dr from"@mui/icons-material/FormatBold";import Pr from"@mui/icons-material/FormatItalic";import Fr from"@mui/icons-material/FormatUnderlined";import Lr from"@mui/icons-material/FormatAlignLeft";import Hr from"@mui/icons-material/FormatAlignCenter";import Mr from"@mui/icons-material/KeyboardArrowUp";import Er from"@mui/icons-material/KeyboardArrowDown";import"@mui/icons-material/FormatAlignRight";import"@mui/icons-material/ViewList";import"@mui/icons-material/ViewModule";import Or from"@mui/material/CircularProgress";import"@mui/icons-material/StarBorder";import Nr from"@mui/icons-material/StarHalf";import Qr from"@mui/icons-material/Cancel";import Vr from"@mui/icons-material/ExpandLess";import jr from"@mui/icons-material/Image";import Gr from"@mui/icons-material/ChevronLeft";import Ur from"@mui/icons-material/ChevronRight";import Xr from"@mui/icons-material/FirstPage";import Yr from"@mui/icons-material/LastPage";import qr from"@mui/icons-material/Explore";import Zr from"@mui/icons-material/Radio";import Jr from"@mui/icons-material/LibraryMusic";import Kr from"@mui/icons-material/Bookmark";import $r from"@mui/icons-material/Edit";import _r from"@mui/icons-material/Share";import"@mui/icons-material/FavoriteBorder";import"@mui/icons-material/DeleteOutline";import et from"@mui/icons-material/CloudUpload";import rt from"@mui/icons-material/Mail";import"@mui/icons-material/Inbox";import tt from"@mui/icons-material/Folder";import"@mui/icons-material/MoreVert";import"@mui/icons-material/ImageOutlined";import at from"@mui/icons-material/ArrowBack";import it from"@mui/icons-material/AccountCircle";import ot from"@mui/icons-material/Twitter";import nt from"@mui/icons-material/GitHub";import lt from"@mui/icons-material/LinkedIn";import st from"@mui/icons-material/Help";import dt from"@mui/icons-material/FolderOpen";import ct from"@mui/icons-material/InsertDriveFile";import ut from"@mui/icons-material/PictureAsPdf";import ht from"@mui/icons-material/VideoLibrary";import pt from"@mui/icons-material/InboxOutlined";import mt from"@mui/icons-material/SearchOffOutlined";import ft from"@mui/icons-material/ErrorOutlineOutlined";const gt=e.createContext(null);function xt(){return e.useContext(gt)}function bt({radius:e="var(--Ghost-Radius, 4px)",animate:r=!0}={}){return{backgroundColor:"var(--Border-Variant)",borderRadius:e,color:"transparent",userSelect:"none",pointerEvents:"none",...r&&{backgroundImage:"linear-gradient(90deg, transparent 0%, var(--Background) 50%, transparent 100%)",backgroundSize:"200% 100%",backgroundRepeat:"no-repeat",animation:"omni-ghost-sweep 1.4s linear infinite","@media (prefers-reduced-motion: reduce)":{backgroundImage:"none",animation:"none"}}}}function vt({active:e=!0,animate:r=!0,label:t="Loading",children:a,...i}){return e?de(gt.Provider,{value:{animate:r},children:[le("style",{children:"\n@keyframes omni-ghost-sweep {\n 0% { background-position: 200% 0; }\n 100% { background-position: -200% 0; }\n}\n"}),de("div",{"aria-busy":"true","data-ghost":"true",...i,children:[le("span",{style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap"},children:t}),le("div",{"aria-hidden":"true",children:a})]})]}):le(se,{children:a})}const yt=e=>`var(--${e}-Font-Family)`,St="var(--Font-Family-Display, var(--Font-Family-Header, var(--Header-Font-Family)))",kt="var(--Font-Family-Eyebrow, var(--Decorative-Font-Family))",Bt=(e,r)=>`var(--${e}-Font-Family, ${r})`,wt="var(--Font-Variation-Header, normal)",Ct=(e,r)=>`var(--Eyebrow-${e}-${r}, var(--Overline-${e}-${r}))`,Tt=e=>Ct(e,"Font-Size"),zt=e=>Ct(e,"Font-Weight"),At=e=>Ct(e,"Line-Height"),It=e=>Ct(e,"Letter-Spacing"),Rt=e=>`var(--${e}-Font-Size)`,Wt=e=>`var(--${e}-Font-Weight)`,Dt=e=>`calc(var(--${e}-Line-Height) * var(--Cognitive-Multiplier, 1))`,Pt=e=>`var(--${e}-Line-Height)`,Ft=e=>`var(--${e}-Letter-Spacing)`,Lt={"display-large":{component:"h1",fontFamily:Bt("Display-Large",St),fontSize:Rt("Display-Large"),fontWeight:Wt("Display-Large"),lineHeight:Dt("Display-Large"),letterSpacing:Ft("Display-Large"),defaultColor:"header",defaultWidth:"fill"},"display-medium":{component:"h1",fontFamily:Bt("Display-Medium",St),fontSize:Rt("Display-Medium"),fontWeight:Wt("Display-Medium"),lineHeight:Dt("Display-Medium"),letterSpacing:Ft("Display-Medium"),defaultColor:"header",defaultWidth:"fill"},"display-small":{component:"h2",fontFamily:Bt("Display-Small",St),fontSize:Rt("Display-Small"),fontWeight:Wt("Display-Small"),lineHeight:Dt("Display-Small"),letterSpacing:Ft("Display-Small"),defaultColor:"header",defaultWidth:"fill"},h1:{component:"h1",fontFamily:yt("Header"),fontVariationSettings:wt,fontSize:Rt("H1"),fontWeight:Wt("H1"),lineHeight:Dt("H1"),letterSpacing:Ft("H1"),defaultColor:"header",defaultWidth:"fill"},h2:{component:"h2",fontFamily:yt("Header"),fontVariationSettings:wt,fontSize:Rt("H2"),fontWeight:Wt("H2"),lineHeight:Dt("H2"),letterSpacing:Ft("H2"),defaultColor:"header",defaultWidth:"fill"},h3:{component:"h3",fontFamily:yt("Header"),fontVariationSettings:wt,fontSize:Rt("H3"),fontWeight:Wt("H3"),lineHeight:Dt("H3"),letterSpacing:Ft("H3"),defaultColor:"header",defaultWidth:"fill"},h4:{component:"h4",fontFamily:yt("Header"),fontVariationSettings:wt,fontSize:Rt("H4"),fontWeight:Wt("H4"),lineHeight:Dt("H4"),letterSpacing:Ft("H4"),defaultColor:"standard",defaultWidth:"fill"},h5:{component:"h5",fontFamily:yt("Header"),fontVariationSettings:wt,fontSize:Rt("H5"),fontWeight:Wt("H5"),lineHeight:Dt("H5"),letterSpacing:Ft("H5"),defaultColor:"standard",defaultWidth:"fill"},h6:{component:"h6",fontFamily:yt("Header"),fontVariationSettings:wt,fontSize:Rt("H6"),fontWeight:Wt("H6"),lineHeight:Dt("H6"),letterSpacing:Ft("H6"),defaultColor:"standard",defaultWidth:"fill"},"subtitle-large":{component:"p",fontFamily:yt("Body"),fontSize:Rt("Subtitle-Large"),fontWeight:Wt("Subtitle-Large"),lineHeight:Dt("Subtitle-Large"),letterSpacing:Ft("Subtitle-Large"),defaultColor:"header",defaultWidth:"fill"},subtitle:{component:"p",fontFamily:yt("Body"),fontSize:Rt("Subtitle-Medium"),fontWeight:Wt("Subtitle-Medium"),lineHeight:Dt("Subtitle-Medium"),letterSpacing:Ft("Subtitle-Medium"),defaultColor:"header",defaultWidth:"fill"},"subtitle-small":{component:"p",fontFamily:yt("Body"),fontSize:Rt("Subtitle-Small"),fontWeight:Wt("Subtitle-Small"),lineHeight:Dt("Subtitle-Small"),letterSpacing:Ft("Subtitle-Small"),defaultColor:"header",defaultWidth:"fill"},"body-small":{component:"p",fontFamily:yt("Body"),fontSize:Rt("Body-Small"),fontWeight:Wt("Body-Small"),lineHeight:Dt("Body-Small"),letterSpacing:Ft("Body-Small"),defaultColor:"standard",defaultWidth:"fill"},"body-small-semibold":{component:"p",fontFamily:yt("Body"),fontSize:Rt("Body-Small"),fontWeight:Wt("Body-Small-Semibold"),lineHeight:Dt("Body-Small"),letterSpacing:Ft("Body-Small"),defaultColor:"standard",defaultWidth:"fill"},body:{component:"p",fontFamily:yt("Body"),fontSize:Rt("Body-Medium"),fontWeight:Wt("Body-Medium"),lineHeight:Dt("Body-Medium"),letterSpacing:Ft("Body-Medium"),defaultColor:"standard",defaultWidth:"fill"},"body-medium":{component:"p",fontFamily:yt("Body"),fontSize:Rt("Body-Medium"),fontWeight:Wt("Body-Medium"),lineHeight:Dt("Body-Medium"),letterSpacing:Ft("Body-Medium"),defaultColor:"standard",defaultWidth:"fill"},"body-semibold":{component:"p",fontFamily:yt("Body"),fontSize:Rt("Body-Medium"),fontWeight:Wt("Body-Medium-Semibold"),lineHeight:Dt("Body-Medium"),letterSpacing:Ft("Body-Medium"),defaultColor:"standard",defaultWidth:"fill"},"body-medium-semibold":{component:"p",fontFamily:yt("Body"),fontSize:Rt("Body-Medium"),fontWeight:Wt("Body-Medium-Semibold"),lineHeight:Dt("Body-Medium"),letterSpacing:Ft("Body-Medium"),defaultColor:"standard",defaultWidth:"fill"},"body-large":{component:"p",fontFamily:yt("Body"),fontSize:Rt("Body-Large"),fontWeight:Wt("Body-Large"),lineHeight:Dt("Body-Large"),letterSpacing:Ft("Body-Large"),defaultColor:"standard",defaultWidth:"fill"},"body-large-semibold":{component:"p",fontFamily:yt("Body"),fontSize:Rt("Body-Large"),fontWeight:Wt("Body-Large-Semibold"),lineHeight:Dt("Body-Large"),letterSpacing:Ft("Body-Large"),defaultColor:"standard",defaultWidth:"fill"},caption:{component:"span",fontFamily:yt("Body"),fontSize:Rt("Caption"),fontWeight:Wt("Caption"),lineHeight:Dt("Caption"),letterSpacing:Ft("Caption"),defaultColor:"quiet",defaultWidth:"hug"},"caption-bold":{component:"span",fontFamily:yt("Body"),fontSize:Rt("Caption"),fontWeight:Wt("Caption-Bold"),lineHeight:Dt("Caption"),letterSpacing:Ft("Caption"),defaultColor:"quiet",defaultWidth:"hug"},"label-extra-small":{component:"label",fontFamily:yt("Body"),fontSize:Rt("Label-ExtraSmall"),fontWeight:Wt("Label-ExtraSmall"),lineHeight:Pt("Label-ExtraSmall"),letterSpacing:Ft("Label-ExtraSmall"),defaultColor:"standard",defaultWidth:"hug"},"label-small":{component:"label",fontFamily:yt("Body"),fontSize:Rt("Label-Small"),fontWeight:Wt("Label-Small"),lineHeight:Pt("Label-Small"),letterSpacing:Ft("Label-Small"),defaultColor:"standard",defaultWidth:"hug"},label:{component:"label",fontFamily:yt("Body"),fontSize:Rt("Label-Medium"),fontWeight:Wt("Label-Medium"),lineHeight:Pt("Label-Medium"),letterSpacing:Ft("Label-Medium"),defaultColor:"standard",defaultWidth:"hug"},"label-medium":{component:"label",fontFamily:yt("Body"),fontSize:Rt("Label-Medium"),fontWeight:Wt("Label-Medium"),lineHeight:Pt("Label-Medium"),letterSpacing:Ft("Label-Medium"),defaultColor:"standard",defaultWidth:"hug"},"label-large":{component:"label",fontFamily:yt("Body"),fontSize:Rt("Label-Large"),fontWeight:Wt("Label-Large"),lineHeight:Pt("Label-Large"),letterSpacing:Ft("Label-Large"),defaultColor:"standard",defaultWidth:"hug"},legal:{component:"span",fontFamily:yt("Body"),fontSize:Rt("Legal"),fontWeight:Wt("Legal"),lineHeight:Dt("Legal"),letterSpacing:Ft("Legal"),defaultColor:"quiet",defaultWidth:"hug"},"legal-semibold":{component:"span",fontFamily:yt("Body"),fontSize:Rt("Legal"),fontWeight:Wt("Legal-Semibold"),lineHeight:Dt("Legal"),letterSpacing:Ft("Legal"),defaultColor:"quiet",defaultWidth:"hug"},"eyebrow-small":{component:"span",fontFamily:kt,fontSize:Tt("Small"),fontWeight:zt("Small"),lineHeight:At("Small"),letterSpacing:It("Small"),textTransform:"uppercase",defaultColor:"eyebrow",defaultWidth:"hug"},eyebrow:{component:"span",fontFamily:kt,fontSize:Tt("Medium"),fontWeight:zt("Medium"),lineHeight:At("Medium"),letterSpacing:It("Medium"),textTransform:"uppercase",defaultColor:"eyebrow",defaultWidth:"hug"},"eyebrow-large":{component:"span",fontFamily:kt,fontSize:Tt("Large"),fontWeight:zt("Large"),lineHeight:At("Large"),letterSpacing:It("Large"),textTransform:"uppercase",defaultColor:"eyebrow",defaultWidth:"hug"},"number-small":{component:"span",fontFamily:yt("Body"),fontSize:Rt("Number-Small"),fontWeight:Wt("Number-Small"),lineHeight:Pt("Number-Small"),letterSpacing:Ft("Number-Small"),fontVariantNumeric:"tabular-nums",defaultColor:"standard",defaultWidth:"hug"},"number-medium":{component:"span",fontFamily:yt("Body"),fontSize:Rt("Number-Medium"),fontWeight:Wt("Number-Medium"),lineHeight:Pt("Number-Medium"),letterSpacing:Ft("Number-Medium"),fontVariantNumeric:"tabular-nums",defaultColor:"standard",defaultWidth:"hug"},"number-large":{component:"span",fontFamily:yt("Body"),fontSize:Rt("Number-Large"),fontWeight:Wt("Number-Large"),lineHeight:Pt("Number-Large"),letterSpacing:Ft("Number-Large"),fontVariantNumeric:"tabular-nums",defaultColor:"standard",defaultWidth:"hug"},"button-extra-small":{component:"span",fontFamily:yt("Body"),fontSize:Rt("Button-ExtraSmall"),fontWeight:Wt("Button-ExtraSmall"),lineHeight:Pt("Button-ExtraSmall"),letterSpacing:Ft("Button-ExtraSmall"),defaultColor:"standard",defaultWidth:"hug"},"button-small":{component:"span",fontFamily:yt("Body"),fontSize:Rt("Button-Small"),fontWeight:Wt("Button-Small"),lineHeight:Pt("Button-Small"),letterSpacing:Ft("Button-Small"),defaultColor:"standard",defaultWidth:"hug"},button:{component:"span",fontFamily:yt("Body"),fontSize:"var(--Button-Standard-Font-Size, var(--Button-Font-Size))",fontWeight:"var(--Button-Standard-Font-Weight, var(--Body-Font-Weight))",lineHeight:Pt("Button-Standard"),letterSpacing:Ft("Button-Standard"),defaultColor:"standard",defaultWidth:"hug"},"button-standard":{component:"span",fontFamily:yt("Body"),fontSize:"var(--Button-Standard-Font-Size, var(--Button-Font-Size))",fontWeight:"var(--Button-Standard-Font-Weight, var(--Body-Font-Weight))",lineHeight:Pt("Button-Standard"),letterSpacing:Ft("Button-Standard"),defaultColor:"standard",defaultWidth:"hug"}},Ht={"overline-small":"eyebrow-small",overline:"eyebrow","overline-medium":"eyebrow","overline-large":"eyebrow-large","eyebrow-medium":"eyebrow","body-small-bold":"body-small-semibold","body-bold":"body-semibold","body-medium-bold":"body-semibold","body-large-bold":"body-large-semibold","subtitle-medium":"subtitle"},Mt={"eyebrow-small":"overline-small",eyebrow:"overline","eyebrow-large":"overline-large"},Et={header:"var(--Header)",default:"var(--Header)",primary:"var(--Header-Primary)",secondary:"var(--Header-Secondary)",tertiary:"var(--Header-Tertiary)",neutral:"var(--Header-Neutral)",info:"var(--Header-Info)",success:"var(--Header-Success)",warning:"var(--Header-Warning)",error:"var(--Header-Error)"},Ot={standard:"var(--Text)",default:"var(--Text)",quiet:"var(--Quiet)",eyebrow:"var(--Eyebrow, var(--Quiet))",primary:"var(--Text-Primary)",secondary:"var(--Text-Secondary)",tertiary:"var(--Text-Tertiary)",neutral:"var(--Text-Neutral)",info:"var(--Text-Info)",success:"var(--Text-Success)",warning:"var(--Text-Warning)",error:"var(--Text-Error)"},Nt=new Set(["h1","h2","h3","h4","h5","h6","display-large","display-medium","display-small","subtitle-large","subtitle","subtitle-small"]);function Qt({children:e,textStyle:r="body",color:t,width:a,component:i,noWrap:o=!1,gutterBottom:n=!1,className:l="",sx:s={},...d}){const c=Ht[r]||r,u=Lt[c]||Lt.body,p="string"==typeof u.fontSize?u.fontSize.match(/--([\w-]+)-Font-Size/):null,m=p?p[1]:null,f=m?"var(--"+m+"-Text-Decoration, "+(u.textDecoration||"none")+")":u.textDecoration||"none",g=m?"var(--"+m+"-Text-Transform, "+(u.textTransform||"none")+")":u.textTransform||"none",x=xt(),b=function(e,r,t){const a=Nt.has(e);return(a?Et:Ot)[r||t]||(a?Et.header:Ot.standard)}(c,t,u.defaultColor),v=a||u.defaultWidth,y="fill"===v,S=i||u.component,k=t||u.defaultColor;return le(h,{component:S,className:"typography typography-"+c+(Mt[c]?" typography-"+Mt[c]:"")+" typography-color-"+k+" typography-width-"+v+" "+l,sx:{fontFamily:u.fontFamily,fontVariationSettings:u.fontVariationSettings||"normal",fontSize:u.fontSize,fontWeight:u.fontWeight,lineHeight:u.lineHeight,letterSpacing:u.letterSpacing,textDecoration:f,textTransform:g,fontVariantNumeric:u.fontVariantNumeric||"normal",color:b,display:y?"block":"inline",width:y?"100%":"auto",margin:0,marginBottom:n?"0.5em":0,padding:0,...o&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},...x?bt({animate:x.animate}):{},...s},...d,children:e})}const Vt={"@supports (text-box-edge: cap alphabetic)":{textBoxTrim:"trim-both",textBoxEdge:"cap alphabetic",paddingTop:0,paddingBottom:0}},jt=e=>le(Qt,{textStyle:"display-large",...e}),Gt=e=>le(Qt,{textStyle:"display-medium",...e}),Ut=e=>le(Qt,{textStyle:"display-small",...e}),Xt=e=>le(Qt,{textStyle:"h1",...e}),Yt=e=>le(Qt,{textStyle:"h2",...e}),qt=e=>le(Qt,{textStyle:"h3",...e}),Zt=e=>le(Qt,{textStyle:"h4",...e}),Jt=e=>le(Qt,{textStyle:"h5",...e}),Kt=e=>le(Qt,{textStyle:"h6",...e}),$t=Zt,_t=e=>le(Qt,{textStyle:"subtitle-large",...e}),ea=e=>le(Qt,{textStyle:"subtitle",...e}),ra=e=>le(Qt,{textStyle:"subtitle-small",...e}),ta=e=>le(Qt,{textStyle:"subtitle",...e}),aa=_t,ia=ea,oa=e=>le(Qt,{textStyle:"body-small",...e}),na=e=>le(Qt,{textStyle:"body-small-semibold",...e}),la=e=>le(Qt,{textStyle:"body-small-bold",...e}),sa=e=>le(Qt,{textStyle:"body",...e}),da=e=>le(Qt,{textStyle:"body-semibold",...e}),ca=e=>le(Qt,{textStyle:"body-bold",...e}),ua=sa,ha=oa,pa=e=>le(Qt,{textStyle:"body-large",...e}),ma=e=>le(Qt,{textStyle:"body-large-semibold",...e}),fa=e=>le(Qt,{textStyle:"body-large-bold",...e}),ga=e=>le(Qt,{textStyle:"caption",...e}),xa=e=>le(Qt,{textStyle:"caption-bold",...e}),ba=e=>le(Qt,{textStyle:"label-extra-small",...e}),va=e=>le(Qt,{textStyle:"label-small",...e}),ya=e=>le(Qt,{textStyle:"label",...e}),Sa=e=>le(Qt,{textStyle:"label-large",...e}),ka=e=>le(Qt,{textStyle:"legal",...e}),Ba=e=>le(Qt,{textStyle:"legal-semibold",...e}),wa=e=>le(Qt,{textStyle:"eyebrow-small",...e}),Ca=e=>le(Qt,{textStyle:"eyebrow",...e}),Ta=e=>le(Qt,{textStyle:"eyebrow",...e}),za=e=>le(Qt,{textStyle:"eyebrow-large",...e}),Aa=wa,Ia=Ca,Ra=Ta,Wa=za,Da=e=>le(Qt,{textStyle:"number-small",...e}),Pa=e=>le(Qt,{textStyle:"number-medium",...e}),Fa=e=>le(Qt,{textStyle:"number-large",...e}),La=e=>le(Qt,{textStyle:"button-extra-small",...e}),Ha=e=>le(Qt,{textStyle:"button-small",...e}),Ma=e=>le(Qt,{textStyle:"button",...e}),Ea={default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},Oa={xs:"12px",small:"16px",medium:"24px",large:"32px"};function Na({children:e,color:r="default",size:t="medium",fontSize:a,disabled:i=!1,twoTone:o=!1,className:n="",sx:l={},"aria-label":s,...d}){const c=xt(),u=Ea[r]||"Default",p="custom"===t&&a?"number"==typeof a?a+"px":a:Oa[t]||Oa.medium;return le(h,{component:"span",className:"icon icon-"+r+" icon-"+t+(i?" icon-disabled":"")+(o?" icon-twotone":"")+(n?" "+n:""),"aria-hidden":s?void 0:"true","aria-label":s||void 0,role:s?"img":void 0,sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:p,color:"default"===r?"inherit":"var(--Icons-"+u+")",opacity:i?"var(--Disabled, 0.38)":1,cursor:i?"not-allowed":"inherit",lineHeight:1,flexShrink:0,...o&&{"--twotone-variant":"var(--Icons-Variant-"+u+")"},...c?{...bt({animate:c.animate}),width:p,height:p,"& .MuiSvgIcon-root":{visibility:"hidden"}}:{},"& .MuiSvgIcon-root":{fontSize:"inherit",color:"inherit"},...l},...d,children:e})}const Qa="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QCSRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAIdpAAQAAAABAAAATgAAAAAAAACQAAAAAQAAAJAAAAABAAOShgAHAAAAEgAAAHigAgAEAAAAAQAAAKCgAwAEAAAAAQAAAKAAAAAAQVNDSUkAAABTY3JlZW5zaG90/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/iAihJQ0NfUFJPRklMRQABAQAAAhhhcHBsBAAAAG1udHJSR0IgWFlaIAfmAAEAAQAAAAAAAGFjc3BBUFBMAAAAAEFQUEwAAAAAAAAAAAAAAAAAAAAAAAD21gABAAAAANMtYXBwbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACmRlc2MAAAD8AAAAMGNwcnQAAAEsAAAAUHd0cHQAAAF8AAAAFHJYWVoAAAGQAAAAFGdYWVoAAAGkAAAAFGJYWVoAAAG4AAAAFHJUUkMAAAHMAAAAIGNoYWQAAAHsAAAALGJUUkMAAAHMAAAAIGdUUkMAAAHMAAAAIG1sdWMAAAAAAAAAAQAAAAxlblVTAAAAFAAAABwARABpAHMAcABsAGEAeQAgAFAAM21sdWMAAAAAAAAAAQAAAAxlblVTAAAANAAAABwAQwBvAHAAeQByAGkAZwBoAHQAIABBAHAAcABsAGUAIABJAG4AYwAuACwAIAAyADAAMgAyWFlaIAAAAAAAAPbVAAEAAAAA0yxYWVogAAAAAAAAg98AAD2/////u1hZWiAAAAAAAABKvwAAsTcAAAq5WFlaIAAAAAAAACg4AAARCwAAyLlwYXJhAAAAAAADAAAAAmZmAADypwAADVkAABPQAAAKW3NmMzIAAAAAAAEMQgAABd7///MmAAAHkwAA/ZD///ui///9owAAA9wAAMBu/8AAEQgAoACgAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/bAEMAAgICAgICAwICAwQDAwMEBQQEBAQFBgUFBQUFBggGBgYGBgYICAgICAgICAkJCQkJCQsLCwsLDAwMDAwMDAwMDP/bAEMBAgICAwMDBQMDBQwIBwgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDP/dAAQACv/aAAwDAQACEQMRAD8A8zt1v/D0/m2bbo85K9q664XRPGNl5N0iicc7W9R3FeO2vjF5FAmPB9eldRYvFfqJrWYJIOeDivntTvnRvqeleHfEupeA3EciBoYz8rgcjHr/AI/nXpdt+0p4sd1s7RozEw+V88/lXjlldedEbLVsOCMb+9XPCmk6f4S1yPWvs631uj+Z5bcjI54zU3a1izmlTVmpI+kbLxp8SdcjWVkuzHJ0ZIXCn6MRiultfD3i/UcPdgx57zSgfoMmufb9oZ9WgGl6dAqsw27OWZMf7IFT2XiDxJfKWbcPYkLn6dTXZSrJ/E2zza9Fp+6kj1bRPhjZXKeZr2sLCv8AcgAz/wB9Of6VrX/hL4M6NC39pOb9scieZnBx/sx7R+lebaXYatqlwEupRbx/xMSXP4ZIFehR+C/BUKBtRup7p2/g8zaCT22xgH9a7ou6uor5nJ5XPzw+LkHgGy+INld+AbH7MfPUXMSBlikywwVDd+xxX1HDe3Z8Norx2yIEzsz85z36Yr1SP4cfC6fVTqV1o0U7w4wsrLshDHZmUMeCfU89MDvU+peGPCWsWlxb+H4bG3iRWZhBOu2LaM7pmOQFC5/iABJr57MI1ZS5qTW/Q+lwFCPskqi6dT8o5LC78RfEqG32kRR3h83A6KG5Az7V+pfhHwl8MptKhgvIGhlVAN6yOjdO+Dj9K8W8KfDHTbXUrnWrh4BDCXnnkYjy1UOFwjcjAzksT9AOa9vtbLSJYhJHIsaFFZZEYeWQRwQR8pHoe9d2Fq3Wxw46hK99TtU+Evgu7XOm6tcRE9AWSQfqAf1rOufghqGC+maxBJ6eZGyH81J/lWF9ju4Rvs5xKuNwPXP5Uh1vX9PHyPIO3yOcV1upC2sTg9mZWqfDv4oaKrSWcomVeht7n/2V8Vwdj41+IXhzW44fEMV+0LkRwxNHnfIT03DjHvXp6+OvEtveRRyxzyLJwocDaD6sewFT+NfEVjDp/wBvuJ0a4WPk8dT2UfpXn1nztqDOyjTUFcf4h8TTHS/tWpzLG+zJTPyx8dPc+9fGHjTxve6o8lnp8jLbkkE92/wFWPFnja/1tjBJJ5cA/hHf3NeVahrVhZRNucZqU7LlR1KnzS5mMimitW3yH5qyNb8XW9vHtMn4Dk1w2qeKbaRyfOWJM9erH6CtXw5oN34iuo5Rp8ws2/5bSDG4+oBo6HZGkf/QwfiB+y3N4f8AEotfDV5P/Z8oJ8qRt+wjnhuuK8A1zS9b8AagYLhZvJzgSlG2ZHbdiv0u1v4m6Xd66BfW0tqckbZlIPT3roptF8MeLdKMN1bwvFOhIDBf0zXz9RLmbiz2I6o/MDT/ABdJcSJHc7lJ6HoDXsGhXk6qG3iSNux6V698RfgRZ3enqnhqNIZwBtYLnmvDh8OPiV4YuI4TD9pcuFAUAJ1xli3AHqTwO9Q3Zakzpp6I9M0ZLaC5+2aZARck44GdxPavYvDGqanqF2LGKDFwcfIFbHPfgGuG8AeDr7UZvMvNV0/yIZsTeTMZFjOSrI7KByCOzZz2HWvZF1/TtE8XQeFtE0+BnhgWSTU72VkTEoYL5UUfLuSrAAsT3GetEZq6S3OV4KUrtrQ9H0iPRZXuNPl1GKa7sYhPexwuZBARx5biLJDMx4GCeD71Q8MePvhh4i1K+tPDF6up3mmukUscKldsj7s4MhwdmDuP8ODmvz5+Ofjl/BvhrWdQ8KreafDreurCL1hMvmi2iLsVWQEBEclgqFgN3JB68d+zxJ8RNM8EeLvjHoTxARLKWminiVrydMzXBMZJEQXhdyozN0A446FJyjdM3hhIRkotH1j8fPF9kllq3g7whdBNUa3F5LOitJMktuXMUaPFl8bo2BJCjkEZya+dvhD8d7Pw14WiPjOS5thcM9qr2saTC4s5A8hZo2ILKkxkTgNgHuOvwp45+K/izxlq11rJ1W4im1SFxcMj7HXLncCqYxu2gEdx164Ot4s+IWh6p4I0e006eddSit4Ld5HVVmR7bAXBA5AYZUZzySevESwknbm6s3+tU4+7Doj7yv8A44aP4Ztv7XmS81WHTIv7LgW7uWSJDcPHIjFY2wzrGd0e8FMYBAJOOf8AEX7SenLYqLIRyWlhukkmIKzF5CGffGrbMYxhVJ6N2Ffnd4l8U3upaZJfapYPOLpk2XbthlKJ8v3RtAOe/PHUViXOvW1xp9o81x/pLoBNHsAiZFwFwoYkt0y20Z549dYYO0VF9zKpilJvTofo5pP7Sniy3TzNA2/2fIrNG/zMmBncNjA4Kngj8q9Z8B/tXQ3Rlg8Y+XmLHliFfLZnOQMh+AAQMkkAA5r8tfDfj3xB4dtTYaPIt7aEeY8arux3JAwD7EH0zmvR9a16x8XaLBFusE1WdoRO4QQzIgBzGuGAfsWcjIOBiieGlF6PQwUqc1qtT9d5fihpniLRRf6Msm6ZcASrg7lyCVI4Zc9COCOa8W1vVNQuyZdSdio6KTwK8K8EeKINAuNGsdNuXu7JbZ7a6gZyNlyER1YK3IO3J+XII7nFe66T4d1LxrK0sgMVucgHPII6+2PT2riUteXqU8PZ3Wx4zruvNJO1raQMcdTXKaVoOseKpLj7NalYoDh3kJJJPYV7zf8AgCPwnqMk05MkbDJZ+e3vXQ+Ar/Slgu7S3iJllkO3auR0PU1UV71mdEYKKufPPhz4bWk3iyyS+TcqkkoeQDmvvPUtA03SPD0DWsCJsTOAAD2r540T4d/EHW/HTGxT7PEWLJJt3fKT1xx/OvsvTPg/r0NvFca7eyXRC4KsQF/BRx+ta0acnfqTVrw0sf/R/Q3XfAeh61q8t1cWqM4zhiorirj4YvcPs02RoCgIRlzxXQzfEq1GoPGtvJyxHT+dddp3i7SoY1kkY72GTx09q82UISmzqi/d0PLn8J6/oNuqiRrx+24Z5/SvGfHeg+NZZXutZkkXS4Ip5VihkKyzufLJWQZXKqA+1RuP8q+yZfEVjdRl4sbirbN4IBIHH4V+dPxC+PE3/CRnwL8SC0D6deGOa7jgQQRGdd9uQN6yOAPuvsKk8MRXFjIx5LRuztwnNz7nKeLrzwjb2unQ6dqUumhJDqT6XZ3geSRIPmbzkuH2gyou3mPIHJU8g+M6P+0/4U0vxLcy6/oLMiGZkmQlbn7QS+RNvUhdhIjXyyAMkqQDXjVtHZa54k13xD4bsbmSSyYA3V1dC4uGmuDlmSzUIArqGUBWzlslj2+U9aW91XX7l55tl0JHEyMNpVBgAfgAAR1GMHnNTRwcG3FvU3qYycEpJHXeJ/iNqHijxTd3N8815pMt27w2k1w5jXzeApDPkjKjPPRRwM10ui/ErVNH8LyaPYzR2q299PcC1jbaGSVVyRnO3HIG3AINeD30yTXEv2oKs8TLtZMDKYIzxxnoSeppYLy08pVXAnAIQlSGZ2IyWY54AHAFet7OPLyW0PL9rPn529SzqkhglW6kO6Vi5bnlQcbVPJxgHIqCJ7htKMyyDBmO1CcnJ7gHgdvrVS6a4mm8hgGZgMkYJLeue+K7mfwwdO0uy1OaRJobmMMsUfytvZcnPGDt785HFVKrGKSfUzhRnNtxWxzlzr+oDTY9HS9lNqHVli3YCyAfewee5x+NczNEVl8xxtU9McfMOuB+NdTqWmtbi4tROsqQlcMY9hLNzt3dcj361z8jGaw3kFmQg5649eauEotXXUiaknyy6Fq01CS3xHbM2+UOH2k5KsMEfjXX6Fd3NhItxbgrcJkiUrvYLjJ2qxIyM4rzeKeaNy8R2kgKSOOK6jT2t5I+J/Ll+VlUA8PkYG4jGT+X0onEIaM+i/D3j6/XTLg5+ZrmO5WSUok0bx42vgEDAwM4zxnpzj78+D+s+N/HWmWl14VIsNNtIJklZCZpJriTJ+ZSCBswOBk7elfl3Zx2flpOsuJQC8kbIfmXBGM5/pivsn9nL4v3Xw+s5rW7kZ7e9bzPJ2hRvjG3b84G3C5JYHBXpzXlYmlFe8ejSqSasj9ErjwPqVzOq65+9Vo0DMeAWwM/L2r0DwJ8NdD0uOa6SBNzv1I7e1cL4b+JD+LdCW+UwTbxmOa1LNEY/wCEksASfU9Dxjiu+8N6l4imjkgEJCITlj0Yn0q6MYXuctST2Z6d4YXS7DVtoCq2MD869a1q+tU0/cGXha+SrHw9451HxGWs5Fjjbnc2fl59O9exXHg7xULZft995mRjaBgV1UpPlasZyldn/9L9DbTRdPkeSR4lDFj2rf0Dw/p5kZ3jBGT1ryOTxNrc8/8AoMGFzyT2Feg6LrOs3VssUMezAIY45zjk157cednRFpxR0t/o1iLrjai898fLjoPevy9/a3+IujW+vTWNvpdtNd6NLHGPNs4Z5PKZM5888xttKsi7WwRz6V9k+OvGGoaMIb6YyzJE2x54ULrEHwhfAHQElQTxuPoCR+JXx18earca441LdI96Z7p7iRm8y6EhCRNMdzbmRI1U5OQR6dfOlL21TkjpY9KnFUo88jz++8YavFJqFzpTrY2FzgSxWsmzeY+InfnJYMMjgHNeIXl/LLeS3gXMjPl5GYkvnk5/HrWjot6bnV3M5zHsfCnkHPt9RmsfVpBBeSxRgbW7V6tOmo6HDVqOauU5ZvtNz5qIF3YyoHHFem+DvAN9411Yi1hZI2YhSQSobHTgdMkYxXmkUS3V/aWsB5kZIzj1Y81+pXwn8EeLItJtx4I03TxHbJ+8vdTYhHl4+WJFILBe5PGeleXnGNnQhGnS+KXV9EetkeAp15yqVvhj0W7OD8B/seXmqXEF94lVBb4CTRRbl3YxhlOAeec8fSvojxf+zNoeu6Na6bZQrbS6euIcLgEYwN2wqeOo/kc16b4e8W/GjQtRisfEOlaHqVgdqvJprtFIgx94BmbcfbA+tfQKyfbbKC/EXkl1JdD1UgZIzXyOIxFeU1OVW7XbZH2mGw2GUHCNKye91qz8yvEv7JM7WNvMwBS0Dm4lLHc67SVAGCWO4ADOMAnrXxv4y+Gl54MWO6XesBn2TAjIVTkAkZHGcfSv1v8AiH4m+KV9ObPwzJpuiaah2yXF6qyyOc9QGyoXHtnPevnPXfhJ4w8SRXWfGel6lPcK6m0MMaDBHJUopw3oTxmurBZjWpSi3WTj1Tv/AJHDj8toVozUaLT6NW/zPy+v7KOK5KQ8q3I9OvOK0rW3jEqzXEyCFCCEQ5Yn/PU103xQ8JzeDNch06RHhLJ8yyfeDA85wSCPQivO5G3Dev314/CvuKNaNaCqQejPz+vQlRqOnPdHcx6qq3wufJbyy7CJRzgtnhfck/SvU/DNxp2oajYW2q3Vwbj7THCq7gCF2lSitwByRnLAHkcV45eRWcmjW0qExyptYgZKyZwMZ9R1H5V654E1CBNYs9K1WGJdO1VVtbmPJkVPMO1ZgGy0bq2GJHbpWdZJxNaUmnqfqZ8ENZ17V/Ar2tutlLBpg+xMsEbJcrJEo8l3y5BRkGBtGPlr68+F1zef2RG+p4ErDO0nkZr8yfCeq3vwr0DzrxdU0rUbK6iglWS1cWN2pnKxRvcqCjeYu9UPUHoOtfpL4Wae8it7iWB7M3caskZbLIxXOxxgbWHcc1y0GlLUVdNarY998O6hZR6kVJXcQK9J1OeFrcEEcjNfN2jeFNXu9Y8+K5ZFxz9favRtV03XbC2yLozbR90jFd8JPl2MG9T/0/0LtNNWwh/fqvua6XSoorGwa8kKkHLBCcZFed3Wq6prw8mAeVGeDtH9a6fw/p1zJD5V3LnZ8oyewrgk7z0OiL0Pj34meJm0/wAVa1o99dCWbULYtZWnmGJAturTKDjHLpuADHnaSvSvyG+LemWtzb3t8bc29zPdNcRvseOKZJixY7JDhWBwAF4wM85Jr9zfH/wD8B614ztfHWtRE3dtt3ESMqP5Cv5fnKpAdEDNnPQZxxxX4rftR6jpHiTx5J/wht3JNpaSfZIhIrogKudzRhudm4nDNztGTXmYfDuFa99z1J11Oi48uyPnPSrTT4ra3YtItxI75P8ACwCHAAwD1Gc59iOa5zVopjqOH4LEAFuBnjua7bxVZNoVxHp9pew3z2DG2ae3O+GR4mwzxt3UnODxkc9CK47WLv7ZiaTaspP3UG0AdOnTrXsxbep5k0krGj4Nt/P8aaRFKOHu0GMDHX8q/Wu98GeNfESaRa6dqA0rQbZN06wny5ZTtx8rlXReefmRs+3Wvyj+HsAl8beH/LdTK95ENmTnJOMnsP51/Rj8PtBs20O386NXXy16+hFfJcQJvGUrdE99Vv2PsuGUvqlXm79NHt3Pz9+HPw5+KWmeKftup6098kNwv+rEpiNsAQ6Odg3OeNuCFUjpzx98adNqd54enjZCskY+Xd97kHA/Suu1G40nTX+yW6orMMYUDJ/xo0W3kurC7kKlUchACMEdQTXkVf3lXdX1vZWPoaMFTpW1tpa7bf4nwz8RPCviDxrb/ZopLmBbVpWY25YSFnTETqykEeWecY+bp615f4a+CHi23sre8k8Q3L6ta3huTc7bgFoyADCY5maMDqSwyxPGcV9sC5Tw5qU41RCsQPlmRgApOeOenI5Fei6fa6Pf27T2aIGZeWGOa4sPiKkaToKS+5HTicLTlVVdxbfq7fdc/E/9rXSLiz1LSL29O6ZjJC8g/i2jIP19a+QQWjYNjgg/Lmv0V/b3tI7ZtFCBQRcycA5GNpx/Svzul3SToQv+sVcKenNfc8PN/UYJ9Lr8WfnXEkUsfO3W35HbaS9rPo8sNw2FOSpZgAhzlRt69e4p1hcxRXSTwyMNx4DA/Lt6+uRXORYitpreRmEn3QM/KwBz0retbQXVlBPAXEtuWzwCu3r6j/8AVmvWaR5EW3Y+8PCnijWPH3wiuNJtlN1baJqVm95cSSsXt48s4LR7TiMYYB84DkE4FfqF8L/EV34i0q11/V7GSzmDOiRs25GRflSZcAZVhyrEZwa/Mn9hjxTeaX44n0drC1kstUj8i8uXbbMmFbywqkgMmR8/Bxkc84r9jPDtjpMFkbWyiihijyqRxKERR6Ko4A+lclOPvtGldvY67wp4isF1Aws65xXa6zeRzshjYbSOea8Ts/C8bag90jlcHscZ5roru21WxgM4cuiDgHriuqMnynM276n/1P05fw3eabpRv5IREoXds4BA+naquneIPD1vpJLMryuCztnkHsPbFc9498W+Pp/DUktroz28Ey4LyMA6of4tg/rWt8MtG0VPAtut8iST3iu8zOAWJLEdfYdK4HK87R7HXGOiPmz4rWfi74jeFb3Q/DOsNod1JIDFdEZRoslXhkGDlJFOGxX5hfFr9mHWfhZLp+p39/Nq+iwqZL0wRkSvIsW9hAzmRUVmzgMM4HTPNfq5r2v6To8lzHd4jihkbaCcZCnivkj9pHSvFXxKOkaL4V1JbffbzSCBLhViYeW0nmGWMOSxUbBGQevOOTXn1ZWXM5WOug/e5Ern443iWl9qBS0LRWylm8uRs4QcYyByegzgc1zWpoUcKRtAyPY46EGvWvih4Zg8DRado6zTnUpYxd6isiBGjknUMkWfvcJjOcZJJxzXlF2oa1hk37mOeCecegGM/nXp0ZqSUlsclZWbT3GaJqsuh61Ya1B9+xuYbhffynDY/HGK/oi8LfEO2h8F2uqWzb4ZbZJoSOjI67lOfoa/nKIPfvX6i/sifFex8U+CT8M9cmUanoan7KHPM9iTxjPUxE7SP7u014PE+GnOlHEU943T9H/k/wAz6ThXFwhWlQqbS1Xqv+B+R90+EtV1DWbh/Ed/CSWIaFDzsQ/Mu4ZwCeCRWZrfxU8SaTdTxXzh1ckxpBHtRAPu8gnJ9c/pXI2fgrS08Q6f4iup7qW2tmMN1YrdTR2lzE3AMkaMBvXPyuMEcZyOK9dTT/gBFEP7Q8Paktx50eUieWcYX5nIYS/dOec4PHFfLYbB89FONS3e/wDwx91LENT5nSlL/Ck/1v8AgePx+ONS1mznh1q9hlhmO9UuvKiZRznLZ5HpnmuO8NfEDW9K12PStNuU1HS597RyRkSeXtO3yy4OGXnIZfTGa9O8eWXw18Q+Hr/wx4X8Mw2lpqaSW8tzdYku5I3LZWL5mMe5W25zkD0xmuE1K18P+CtOW7kENhp+lWhBOAkcUMa849gBXJjMMqdnGXNI3VSSV5x5F2dr/NbL77+h8N/tseIbrWtb8PWUyhJZUmuCnopYRr/I18XSRus0eBsKIjADqSRkfp1ruvit8Qbv4neP7zxNGpjtgRb2ERH+rtos7Mj1bJZvc1wSSKQ2QAy4IY+nXGK/SMsw0sPhadKe+79W7n5Lm+KjiMXUqx26eiVi0sr3Mwyg3RbmZgOcgd+36V7j8MtI8NeKZ7vTvFkxt5JLQm2mgBEjTj/VJhSAQxOCANxPTpXielRpLI8pJyPvLycqRyT7Z4/GvX/DOnWuq3linhmSaXVrYxMlvHG6tJeNKuI0HXbGoJaRsDnr0z0V37rRx0d7n1z+zf8ADr4geGfG0euTQPbQC8NtLDcRiSWKzKmXewJz8+1cMPuk5OeRX6l+G/EkSM9sPm2knNec/DjTrz4hxaLrDWqWEraFHFdGSZGmSaCU/u1jU/KpLEhm6kAZ5ruLb4e+L9DmuLyW0+02Zdm8xOGC+6+1cNKc2+YVVxb16HpWheJIbu/+zq2cHkV6vfywSWYUY5FfCl/4huvDWsm5hyV3ZI/GvY9F+KUOqw+VIcFFGc11wrx+FmfLJavY/9X9afiJq+nWPh27jbaSYWVQfUivheL4xWnhOx+y3c+1hkAZ6Z9KpfFD4u/6PJH55nkYcKDxXxlewah4pvmubtyATwOwrza9RJprc6YSctFsek+M/G8Xi+7kWFyImY8g9a1vBlwbeS3S5mkn+zktalySIHYBHZQeAWXgk9v15rQfB8KbQx4r2jRPD1lCF6ZGK4pU/aO7LVT2atFn5v8Ax7+FOo3/AMYdcnt7Wa7sI7Q6zdT3JEcRSIKLkxS5wyCVgvHzgHgHivlDxjZWMOraja6YIDaxTtJCIHZkjjb59gZxuO37ue+K/bL4veAl1/QpLTRdFW+OpSxrdSSSF3jKMWWSSJE3Tx7ifMQYbBBByAR8RXX7DfxBn1u3ksrm3bSpLgGRLjKzeU0mSPlU4bbjIdsjpu9OmhNr4h1KkWtD885EYwxRtxgEjPX5uRWj4X1jVvDfiTTda0Sd7W+tbhHikQ4I5wVI7qwyCDwQcGvs34v/ALLXi7wZoM/ia+RYYBqMFlBa2yCbebhtvmKV5VBtA+fozKuTya+ufhj+x/8AB/4W+FYPFfxTuFvPF8+mvPDp19PGojuHRiqxWo+ZnXIBJLAEGt5VlyO66MyjpOPI9bqx638O9ZtvFujRNc7Y7low0sR4BBHJUHt/k1T1z4aTPcmWHWJLeNjkRg5x9MnNcb4fsTpsaLbyFTGF27TgjHpV3XLnxC4LQ3bOuM5PUe1fltaskmtmfs2FnOm7xbOs0DwlYaMjXlxePcSjd88zD5dvoOgHevi/9qvxbc674YvdH0xythEu5mU489kcEn/cHb1PNezXF3rV2sltcXDurnDKMgHHX/JrzLx54Vs9X0uW2uukg25B6A8VWAxcYV4SlrZpmOZ0Z1qNTXVpo/L+3cI+WU9OoOKt+V5is8YOwYGeTyegzivpPwh8H/DSeNrnw74lvmt5jFv06S5hH2BpHbEf2qRXDBc8HC45yTivorw7+xh408SeOdOt9W8mHwfFIWu59P8ALgDbf3hECb5TIjMTGkjMTjkYGBX6jHERqRVSOz2fc/H61P2U3TqaNbo+H/Cuh65qMsj6Fbbj5MkU2SMtlGZgEOM/KMjg4xmvo74I/Bjxlr/hu/8AiV4Pkn0z+xbm3S4luIWZXilbEk9tMuQPLIIlVlZVX5icZx7N8KfBQ8e/tNatJp+kweFk8Nx3cjW8lu4WdI5fssDNEWAbd95mBXPUA9a/S/4f+F9K+Hdjf2dhHCBqs5ubtIIhFbvIVCHbDkqoKjBHfvWVSTlpbQlzUUrPU7v4P+F9Y0Twdp6axa2lrcKmAtoWZTAp/dBmcZY4ycjjnj1r6Ut9RtZbD7JgAsuCK8f0iS91S3WC0YQxooVVHACgYAUdgOwrTTw9q0b+Z9qYH0zU0/cXuoi99T51+J/wZ1+61KW+8NzNOJXZzbso+XJz8pHb61x2neF9W0lTHqtlJaS9ywIViPQ19y+H4Xs5M30hkPqx6VV+JSWF9oE8FtEstwyZjC4zuHSh0k1zItVJKPK3of/W4WGzm1NhJcyFifU12eleHUyuys3S7cnHBr0bSYnBXC14drnZJ2WhraZ4f2gZrvNP0kIAB2qtp8cgUZWvX/BfgrU/Ege5V47WzhO155emeuFUcsf85reFNyfLFHLOaW5zlrYEDg12+ieEfEGtOF02zkdSeZGG2MfV2wK9csNM8FeFIBO8QvJY8brm4AZQfZPuqPzrRHxR0l38hZ44lXgFvkXA9Pwr06WWVGrtHDPGUouzkcNrHhTwr4M8NX2v+N1j1YWUJufsoUNBlOmd3Lc+wH1r8ktMuJvGHxa8X+M9emNxe6jcRrZmQ5EFkY12QxDoqBlccd6/Qv8AaR8Yyx+Cb660i50+8S7hNuY42drhVYjcRn5eOOMV+YtpcXFrcw6lpZzeW4IMLjaZIyQWRh+AII6EA+orqx+QTxGW1IYfSe687dPn+Zllmf08LmdOddXgtH5X6/L8rn0lDEsEW2UfIpBXHHI6VV1G4gcPGZChIPBHIwKz7Xxt4av4oluLpIJ3Cjy5MoQxGeM8cdDg4Bpt1bwXypMkiyRsMqyMDkE+1fhePo1adR06kWn2aP33A1qVWmqlOSa7pmOIowpMS7tx+83b8KxtVsoEt5JrogRLlnJ4AAGa6TV9U8O6CIop7je5PMcYLt07hen44rx7xd4nXVJBHGGtrFMbYmOWduu9wucew5A9fT18g4Yx+YVVyQah1k1ovTu/JfhueFxDxXgcupNTmpT6RT1fr2XmzyPxNMJ7t7oJh7hlSJT1WIEgZ9zkn8favdv2ffjTqvwwfWbbVY21fQIrqMvaMxDRK/ytJC3Yg4JHQivDmgl1DUxMykKhG0ew79a6nwxZFTq8GwSJPC52n+LackE/T0r99wmUUaOHjhoL3Yq39efU/nrHZzWr154mcvek7/8AA/Q/QNfH/wAF/DXimHUNPgTSYPGCi9XU0JlgmuHwskdw+A0cgI6MCuDkGvb7nTl2q275XUOjD7rKRkMp7g9iK/LbTLH7VoM+gXh8y0fDwZ6wuOm3PftX1t+z/wDFy8i0VPhr4uZZ5tNJ/s+Wck+ZDknySTyMfwkHjpXJjOG0481DR9jTB8QtS5MQrrufUOjatcaNIFSTKk969KTWPtVv5r3Ww46DFeURW9p4kSSfQsJLHnfbOfmyDzsJJz9K5i4ku4i0LSum0kFTkEEdjXymJw1XDzcKisfU4bFU60Oem7o9M1bxBHakt9sbj3rmbL4i6TaXbfbp9/HAZ64l9BfUx80rt9Oa569+HNhM2Z2m/WuKTad0dJ//187TYpMjBr0PTFlUDFZ9lDaKBgV1tqsGBt614kYnROXQ7Hw1p9xql/DZmTy1c5kc9EReWb8BXdeMvixFpEC6R4dUR2NvCyK2cEleCSPUnqa4eyujp+g6rfxnDLEsQPoHOW/QV4Ncap9qtry3lf5iLjac90VZFH4gGvt+HMDB03Xmr3Pjc/x1RT9hTdjt4Pibrd5dOsVyzgjlSxII7jGe9RX+vXN9cB3k8tgPurwufXj2rwjwXqMlzO8q4LBsEentXrYiOFYKAfavrHSitUj5ZVG9zE8X3L3kMVtK7Og7Z4x9K8tl0SEEugwSeK9N135ihYZOD26VzLqGUENnOefpSS0NE7nK3fh+HUolgnRJDkAMQC/oRnr6Vw2vaNrelTTzz6gWt72SC0srZSf3ZyC7AEcHYrcivZ7GNPtiBuhPHfJzXK/E2EnUfDTpkILqfd9fJO3+uK4q+CoTalOCbv8A8A7KWNr0ouMJtKxjDScxq79cDBBP9c1nXWhJKcu2fXj8K6+MnIwu7jGeuMU+SINwO3YV1W6HFdvU4e08PW0cudpIxnNbMFpFZTM8a4J57elavlBA29SfQ8VWniBjLKCPx6UEPzHNpv7v7TYMSMAsnUjvxUSu6yR3qny7iE7lYcEEVWF3LZSbuSQB064BplzqEE5MqnacYI6VtGSMZQ7H0b4A+I9zZ7JJpWWUSH5snHQcD+de+/8ACbeHvEMSxapGIZ26XUOBID6kdGH1r84xq5tFljQkHBkB64K49PUVt6Z4/u4tqSSMdpHP0HX+VcOLw1GuuWornbhK9ak+anKx+jmjO+jzpMZVu7KQgLPH0Gezr1U/ofWvXo9MsNRgFxGAcjtX58eCvilNZzKrSbo3O1kblWHoe1fWXhjxxa29vHdxvm0kwME52MRnafb0NfEZrkzw37ynrH8j7LK82Vf93UVpfmf/0PQbTS4yOR+ZrorawjXGP51x8GoS4Azx9K3rW/c8Bv0rx00as3PEzC28HXdpEcSXSzYx1zHGCP1NfJcWsm8tkuY2OX+YrxnJQxsPXv2r6D8carLZ6dpMhPyyz3EWTxklAVz+K4r4vn1ZdA8Q3WnSFhBKxurUHPMZb94nHUqeor9LyNKOCh5/5s/O87beMnb+tEexfCaCE+C11fAZ7i7mVjjJ+RsBa9WWTdGA3yrzxjvXzp8ONek0PQdSsZWL20WrEW6j/aUyEj8CteswaxdahH5gVkGM8ivYjO8UmeR7Np6GlrBV281Tnadtc66gDCnoRW7h5ItkhyQAx4HWsiXH3CBgZ9fz9qnyLRn7XE6snU88DJ/AetcJ4ofXUh0ka1LG0k+otJaRohDxxJHIH3Z6nBXJx34zXq9hbrJcHOPlGQMevH9a818WSjUfiRBaf8s9IsAOenm3J3t+O1VrGrC8otN6fj6m0aloSi0tfw9DSgSQoM85A9c0oABOSR7danKgAHdwDjgY9BTWCopcgDuM8dK1Mio7rsx8x64qhLKNjE9yCen4VYMhkYrhhz15we9UZVyCucEn2PH9KlkmNdzoFO5eexPUj/8AVXKXlx1MRGe3OK6W7kRWI547dMnvjiuP1FfMLDA74HANZTdkVCN2YT6rP9o8pmyNrDkdcj8KiW7MROGPJ6isqcPBdKX4XnPqOD9aha5Vmyh24BAB/WvPnNt6npQgktDvdN16a2dVD4H97+or6r+FvjqJm/s29cPb3ACMHPHsR/SvhVZ2RgSc4OcV2uh6hcMcW8vluOR2yaOdTTpzV0w5XBqcWf/Z",Va={default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral"},ja={"xxx-small":{size:16,iconSize:10},"xx-small":{size:24,iconSize:14},"x-small":{size:32,iconSize:18},small:{size:40,iconSize:22},medium:{size:56,iconSize:28},large:{size:64,iconSize:32},"x-large":{size:80,iconSize:40},"xx-large":{size:160,iconSize:80}};const Ga="var(--Button-Border-Width, 1px)";function Ua({src:e,defaultPhoto:t=!0,alt:a,initials:i,icon:o,color:n="default",size:l="x-small",customSize:s,clickable:d=!1,onClick:c,insideButton:u=!1,className:p="",sx:m={},...f}){const g=xt(),[x,b]=r(!1),v="custom"===l&&s?{size:s}:ja[l]||ja.medium,y=Va[n]||Va.default,S=e||(!t||i||o?void 0:Qa),k=S&&!x,B=!k&&i,w=!k&&!B,C=d||!!c,T=k?"transparent":"var(--Buttons-"+y+"-Button)",z="var(--Buttons-"+y+"-Border)",A="var(--Buttons-"+y+"-Text)";return de(h,{component:C?"button":"div",type:C?"button":void 0,role:C?"button":"img","aria-label":a||i||"Avatar",tabIndex:C?0:void 0,onClick:C?c:void 0,...g?{"data-ghost-block":"true"}:{},className:"avatar avatar-"+l+" avatar-"+n+(C?" avatar-clickable":"")+(k?" avatar-image":B?" avatar-initials":" avatar-fallback")+(p?" "+p:""),sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:v.size+"px",height:v.size+"px",borderRadius:"50%",backgroundColor:T,color:A,...g?bt({radius:"50%",animate:g.animate}):{},fontFamily:"inherit",fontWeight:600,overflow:"hidden",flexShrink:0,border:k?Ga+" solid var(--Border)":B?Ga+" solid "+z:"none",...u&&{marginLeft:"2px",marginRight:"2px"},...C&&{cursor:"pointer",outline:"none",padding:0,transition:"background-color 0.15s ease, border-color 0.15s ease","&:hover":{backgroundColor:k?"rgba(0,0,0,0.08)":"var(--Buttons-Default-Hover)"},"&:active":{backgroundColor:k?"rgba(0,0,0,0.15)":"var(--Buttons-Default-Pressed)"},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"2px"}},...m},...f,children:[k&&le(h,{component:"img",src:S,alt:a||"Avatar",onError:()=>b(!0),sx:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"50%"}}),B&&(()=>{const e=function(e){switch(e){case"xxx-small":case"xx-small":case"x-small":case"small":return Da;case"medium":case"large":default:return Pa;case"x-large":case"xx-large":return Fa}}(l);return le(e,{sx:{color:"inherit",fontSize:(r=v.size,Math.round(7*r/12)+"px"),lineHeight:1,textAlign:"center",...Vt},"aria-hidden":"true",children:i.slice(0,2).toUpperCase()});var r})(),w&&le(Na,{size:l,sx:{color:"inherit"},children:o||le(he,{})})]})}function Xa({children:r,max:t=5,size:a="medium",spacing:i=-8,className:o="",sx:n={},...l}){const s=e.Children.toArray(r),d=s.slice(0,t),c=s.length-t;return de(h,{role:"group","aria-label":"Avatar group, "+s.length+" avatars",className:"avatar-group "+o,sx:{display:"inline-flex",alignItems:"center","& > *:not(:first-of-type)":{marginLeft:i+"px"},...n},...l,children:[d,c>0&&le(Ua,{initials:"+"+c,size:a,color:"neutral",sx:{border:"2px solid var(--Background)",zIndex:0}})]})}const Ya=["primary","secondary","tertiary","neutral","info","success","warning","error"],qa=e=>e.charAt(0).toUpperCase()+e.slice(1);function Za(){const e={};return Ya.forEach(r=>{e[r]=function(e){const r=qa(e);return{bg:"var(--Buttons-"+r+"-Button)",text:"var(--Buttons-"+r+"-Text)",border:"none"}}(r),e[r+"-outline"]=function(e){return{bg:"var(--Background)",text:"var(--Text)",border:"1px solid var(--Buttons-"+qa(e)+"-Border)"}}(r),e[r+"-light"]=function(e){const r=qa(e);return{bg:"var(--Buttons-"+r+"-Button)",text:"var(--Buttons-"+r+"-Text)",border:"1px solid var(--Buttons-"+r+"-Border)"}}(r)}),e}const Ja={small:{size:"var(--Sizing-2)",padX:"var(--Sizing-Half)",dot:"var(--Sizing-1)",digits:"var(--Sm-Button-Numbers)"},medium:{size:"var(--Sizing-2-and-Half)",padX:"6px",dot:"10px",digits:"var(--Button-Numbers)"},large:{size:"var(--Sizing-3)",padX:"var(--Sizing-1)",dot:"var(--Sizing-1-and-Half)",digits:"var(--Lg-Button-Numbers)"}};function Ka({variant:e="primary",size:r="medium",badgeContent:t,max:a=99,showZero:i=!1,invisible:o=!1,dot:n=!1,overlap:l="rectangular",anchorOrigin:s={vertical:"top",horizontal:"right"},children:d,className:c="",sx:u={},...h}){const m=Za(),f=m[e]||m.primary,g=Ja[r]||Ja.medium;let x=t;n?x="":"number"==typeof t&&t>a&&(x=a+"+");const b=o||!n&&!i&&(0===t||null==t),v={"& .MuiBadge-badge":{minWidth:n?g.dot:g.size,height:n?g.dot:g.size,padding:n?0:"0 "+g.padX,fontFamily:"var(--Button-Small-Font-Family)",fontWeight:"var(--Button-Small-Font-Weight)",lineHeight:"var(--Button-Small-Line-Height)",letterSpacing:"var(--Button-Small-Letter-Spacing)",fontSize:g.digits,borderRadius:n?g.dot:g.size,backgroundColor:f.bg,color:f.text,border:f.border,boxSizing:"border-box",boxShadow:"0 0 0 1px var(--Background)",transition:"transform 0.2s ease, opacity 0.2s ease"},...u};return le(p,{badgeContent:n?"":x,max:a,showZero:i,invisible:b,overlap:l,anchorOrigin:s,variant:n?"dot":"standard",className:"badge-"+e+" "+c,sx:v,...h,children:d})}const $a={1:[[.3,.5,.7,0,.41],[1.3,2.5,3.4,-1.2,.205]],2:[[.3,.5,.7,0,.41],[.6,1.2,1.6,-1.2,.273],[3,6,8.1,-2.5,.137]],3:[[.3,.5,.7,0,.41],[.3,.7,.9,-.6,.328],[1,2,2.7,-1.2,.246],[2.8,5.6,7.5,-1.9,.164],[6.3,12.5,16.9,-2.5,.082]],4:[[.3,.5,.7,0,.41],[.4,.7,1,-.5,.342],[1.2,2.4,3.2,-1,.273],[3.4,6.9,9.3,-1.5,.205],[7.8,15.6,21.1,-2,.137],[15,30,40.5,-2.5,.068]],5:[[.3,.5,.7,0,.41],[.4,.7,1,-.4,.359],[1.1,2.2,3,-.7,.308],[3.1,6.3,8.5,-1.1,.256],[7.1,14.2,19.2,-1.4,.205],[13.6,27.3,36.8,-1.8,.154],[23.4,46.8,63.2,-2.1,.103],[37,74,99.9,-2.5,.051]]};function _a(e){return $a[e].map(function(e){return e[0]+"px "+e[1]+"px "+e[2]+"px "+e[3]+"px rgba(var(--Dropshadow-Color, 20, 20, 20), "+e[4]+")"}).join(", ")}const ei=(e,r)=>0===e?"none":"var(--Effect-Level-"+e+", "+r+")",ri=ei(1,_a(1)),ti=ei(2,_a(2)),ai=ei(3,_a(3)),ii=ei(4,_a(4)),oi=ei(5,_a(5)),ni={0:"none",1:ri,2:ti,3:ai,4:ii,5:oi},li={"black-white":"BlackWhite"},si=e=>{return li[e]||(r=e).charAt(0).toUpperCase()+r.slice(1);var r},di={small:"Sm-",medium:"",large:"Lg-"};function ci(e,r){const t=si(e),a=(e,r)=>`color-mix(in srgb, rgb(var(${e}, ${r})) calc(var(--Button-Bevel-Opacity, 0.5) * 100%), transparent)`,i="var(--_bevel)",o="calc(-1 * var(--_bevel))",n=di[r],l=void 0===n?(e,r)=>r:(e,r)=>`var(--${n}Button-${e}, ${r})`;return[`inset ${l("Lowlight-Offset-x",o)} ${l("Lowlight-Offset-y",o)} ${l("Lowlight-Blur-Radius",i)} ${l("Lowlight-Spread",o)} `+a(`--Buttons-${t}-Lowlight`,"0 0 0"),`inset ${l("Highlight-Offset-x",i)} ${l("Highlight-Offset-y",i)} ${l("Highlight-Blur-Radius",i)} ${l("Highlight-Spread",o)} `+a(`--Buttons-${t}-Highlight`,"255 255 255")].join(", ")}const ui={small:"var(--Sm-Button-Text-Padding)",medium:"var(--Button-Text-Padding)",large:"var(--Lg-Button-Text-Padding)"},hi=e=>"small"===e?"var(--Sm-Avatar-Text)":"large"===e?"var(--Lg-Avatar-Text)":"var(--Avatar-Text)",pi={small:{avatar:"xxx-small",icon:"small"},medium:{avatar:"xx-small",icon:"medium"},large:{avatar:"small",icon:"large"}};function mi(r,t){if(!e.isValidElement(r))return r;const a=pi[t]||pi.medium;return r.type===Ua?e.cloneElement(r,{size:a.avatar,insideButton:!0}):r.type===Na?e.cloneElement(r,{size:a.icon}):r}const fi=["default","primary","secondary","tertiary","neutral","info","success","warning","error"],gi=si;function xi(e,r=!1,t=!1,a="medium"){const i=gi(e),o=ci(e,a),n=r?ri:"none";return{backgroundColor:`var(--Buttons-${i}-Button)`,color:`var(--Buttons-${i}-Text)`,border:`var(--Button-Border-Width) solid var(--Buttons-${i}-Border)`,boxShadow:"none"===n?o:`${o}, ${n}`,position:"relative",zIndex:1,"& .MuiTouchRipple-rippleVisible":{color:`var(--Buttons-${i}-Hover)`,zIndex:-1},"&:hover":{backgroundColor:`var(--Buttons-${i}-Hover)`,boxShadow:`${o}, ${r?ti:ri}`,...!t&&{transform:"translateY(-1px)"}},"&:active":{backgroundColor:`var(--Buttons-${i}-Pressed)`,boxShadow:o,...!t&&{transform:"translateY(0)"}},"&.Mui-focusVisible":{backgroundColor:`var(--Buttons-${i}-Button)`,outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"},"& .MuiTouchRipple-root":{zIndex:-1},"& .MuiTypography-root":{zIndex:1},"& .MuiButton-icon":{zIndex:1}}}function bi(e,r=!1){return{backgroundColor:"transparent",color:"var(--Text)",border:`var(--Button-Border-Width) solid var(--Buttons-${gi(e)}-Border)`,boxShadow:"none","& .MuiTouchRipple-rippleVisible":{color:"var(--Hover)"},"&:hover":{backgroundColor:"var(--Hover)",boxShadow:"none",...!r&&{transform:"translateY(-1px)"}},"&:active":{backgroundColor:"var(--Pressed)",...!r&&{transform:"translateY(0)"}},"&.Mui-focusVisible":{backgroundColor:"transparent",outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"}}}function vi(e,r=!1){return{backgroundColor:"transparent",color:e?"var(--Hotlink)":"var(--Quiet)",border:"var(--Button-Border-Width) solid transparent",boxShadow:"none",textDecoration:"none",...e&&{"& .btn-text-content":{textDecoration:"underline"}},"& .MuiTouchRipple-rippleVisible":{color:"var(--Hover)"},"&:hover":{backgroundColor:"var(--Hover)",boxShadow:"none",...!r&&{transform:"translateY(-1px)"},...e?{"& .btn-text-content":{textDecoration:"none"}}:{color:"var(--Text)"}},"&:active":{backgroundColor:"var(--Pressed)",...!r&&{transform:"translateY(0)"},...e?{"& .btn-text-content":{textDecoration:"none"}}:{color:"var(--Text)"}},"&.Mui-focusVisible":{backgroundColor:"transparent",outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px",...e&&{"& .btn-text-content":{textDecoration:"none"}}}}}const yi=/-light$/,Si=new Set;const ki={small:"var(--Small-Button-Height)",medium:"var(--Button-Height)",large:"var(--Large-Button-Height)"},Bi={small:{minHeight:"var(--Small-Button-Height)",minWidth:"var(--Button-Min-Width)",fontSize:"var(--Sm-Button-Text)","--_height":"var(--Small-Button-Height)"},large:{minHeight:"var(--Large-Button-Height)",minWidth:"var(--Lg-Button-Min-Width, var(--Button-Min-Width))",fontSize:"var(--Lg-Button-Text)","--_height":"var(--Large-Button-Height)"},medium:{minHeight:"var(--Button-Height)",minWidth:"var(--Button-Min-Width)",fontSize:"var(--Button-Text)","--_height":"var(--Button-Height)"}};function wi({variant:r="default",size:t="medium",elevated:a=!1,selected:i=!1,fullWidth:o=!1,disabled:n=!1,iconOnly:l=!1,letterNumber:s=!1,avatar:d=!1,swatch:c=!1,swatchColor:u,startIcon:p,endIcon:x,startDecorator:b,endDecorator:v,badge:y=!1,badgeContent:S,badgeVariant:k="error",badgeSize:B,badgeDot:w=!1,badgeMax:C=99,badgeAnchorOrigin:T={vertical:"top",horizontal:"right"},children:z,className:A="",sx:I={},...R}){const W=l||d||c,D=W||s;if("production"!==process.env.NODE_ENV){const r=R["aria-label"]||R["aria-labelledby"]||R.title;D&&!r&&console.error('[OmniDesign] A <Button> with no visible text has no accessible name. A screen reader announces it as just "button" — or, for letterNumber, reads the characters ("123") as if they were the label. Add aria-label="…" describing the ACTION ("Your account"), not the content ("JD") or the icon ("trash").'),r&&e.Children.forEach(z,e=>{const t=e?.props?.["aria-label"]||e?.props?.titleAccess;t&&console.error('[OmniDesign] <Button> is labelled "'+r+'" but also contains an icon labelled "'+t+"\". A screen reader reads both. Remove the icon's label — the button owns the name.")})}const P=!W,F=o&&!W&&!s,L=function(e){const r=String(e||"default");if(!yi.test(r))return r;const t=r.replace(yi,"");return"production"===process.env.NODE_ENV||Si.has(r)||(Si.add(r),console.warn('[Button] variant="'+r+'" — the -light shape was removed. Rendering variant="'+t+'" (solid). Use a Buttons mode for colour and solid / -outline / ghost / text for shape.')),t}(!d&&!c||"ghost"!==r&&"text"!==r?r:"primary"),H=function(e,r=!1,t=!1,a="medium"){const i={};return fi.forEach(e=>{i[e]=xi(e,r,t,a),i[`${e}-outline`]=bi(e,t)}),i["black-white"]=xi("black-white",r,t,a),i["black-white-outline"]=bi("black-white",t),i.danger=xi("error",r,t,a),i.outline=bi("default",t),i.ghost=vi(e,t),i.text=vi(e,t),i}(P,a,i,t),M=H[L]||H.default,E=function({size:e,iconOnly:r,letterNumber:t,avatar:a}){const i=Bi[e]||Bi.medium,o=ki[e]||ki.medium;if(r)return{height:o,width:o,minWidth:"unset",minHeight:"unset",fontSize:a?hi(e):"small"===e?"0.875rem":i.fontSize,padding:"0","--_height":o};return t?{...i,minHeight:o,minWidth:o,padding:"0"}:{...i,padding:"large"===e?"0 var(--Lg-Button-Padding)":"0 var(--Button-Padding)"}}({size:t,iconOnly:W,letterNumber:s,avatar:d}),O="small"===t?Ha:Ma,N=void 0!==b?mi(b,t):void 0,Q=void 0!==v?mi(v,t):void 0,V=B||("small"===t?"small":"large"===t?"large":"medium"),j=de(se,{children:[le(m,{styles:{'[class*="btn-"] .MuiButton-startIcon, [class*="btn-"] .MuiButton-icon':{marginLeft:"0px !important",marginRight:"2px !important"},'[class*="btn-"] .MuiButton-endIcon':{marginLeft:"2px !important",marginRight:"0px !important"},'[class*="btn-"] .MuiButton-iconSizeSmall .MuiSvgIcon-root, [class*="btn-"] .MuiButton-iconSizeSmall > *':{fontSize:"var(--Sm-Button-Icon) !important"},'[class*="btn-"] .MuiButton-iconSizeMedium .MuiSvgIcon-root, [class*="btn-"] .MuiButton-iconSizeMedium > *':{fontSize:"var(--Button-Icon) !important"},'[class*="btn-"] .MuiButton-iconSizeLarge .MuiSvgIcon-root, [class*="btn-"] .MuiButton-iconSizeLarge > *':{fontSize:"var(--Lg-Button-Icon) !important"}}}),le(f,{size:t,...F&&{fullWidth:!0},disabled:n,startIcon:void 0!==N?N:d?(()=>{if(d&&z){const e=ki[t]||ki.medium,r=hi(t);return le(g,{sx:{width:e,height:e,backgroundColor:"inherit",color:"inherit",fontSize:r},children:z})}return p})():p,endIcon:void 0!==Q?Q:x,className:`btn-${r} ${A}`,role:"button",sx:{borderRadius:d?"var(--Large-Button-Height)":l||c?"small"===t?"var(--Sm-Button-Icon-Radius, var(--Button-Icon-Radius))":"large"===t?"var(--Lg-Button-Icon-Radius, var(--Button-Icon-Radius))":"var(--Button-Icon-Radius)":"small"===t?"var(--Sm-Button-Radius, var(--Button-Radius))":"large"===t?"var(--Lg-Button-Radius, var(--Button-Radius))":"var(--Button-Radius)",textTransform:"none",fontWeight:"inherit",lineHeight:1,whiteSpace:"nowrap",flexShrink:0,transition:"background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, transform 0.15s ease-in-out","--_bevel":"min(calc(var(--Button-Bevel) * var(--_height) / 100), calc(var(--_height) / 5))",..."small"===t&&{position:"relative","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:"var(--Target, 0px)",minHeight:"var(--Target, 0px)"}},...E,...M,"&.MuiButton-root":{padding:E.padding??"0 var(--Sizing-1)"},"& .MuiButton-startIcon":{display:"inherit",color:"inherit",marginLeft:"0px !important",marginRight:d?"0px !important":"2px !important"},...d&&{"& .MuiAvatar-root":{fontSize:hi(t)}},"& .MuiButton-endIcon":{display:"inherit",color:"inherit",marginLeft:"2px !important",marginRight:"0px !important"},"& .MuiSvgIcon-root":{color:"inherit"},"&:focus-visible, &.Mui-focusVisible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"},"&.Mui-disabled":{opacity:"var(--Disabled, 0.38)",cursor:"not-allowed",pointerEvents:"none",backgroundColor:M.backgroundColor,color:M.color,border:M.border,boxShadow:"none"},...c&&{border:"var(--Button-Border-Width) solid var(--Border)",padding:"1px",width:ki[t]||ki.medium,height:ki[t]||ki.medium,minWidth:"unset",minHeight:"unset",boxShadow:"none","--_bevel":"0",backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important",boxShadow:"none"},"&:active":{boxShadow:"none"},"&:hover .btn-swatch-inner":{filter:"brightness(0.9)"}},...F&&{width:"100%"},...I},...R,...c?{style:{backgroundColor:"transparent"}}:{},children:d?null:c?le(h,{className:"btn-swatch-inner",style:{width:"100%",height:"100%",borderRadius:"small"===t?"var(--Sm-Button-Icon-Inner-Radius, calc(var(--Button-Icon-Radius) - 2px))":"large"===t?"var(--Lg-Button-Icon-Inner-Radius, calc(var(--Button-Icon-Radius) - 2px))":"var(--Button-Icon-Inner-Radius, calc(var(--Button-Icon-Radius) - 2px))",...u?{backgroundColor:u}:{}}}):(()=>{if(W)return z;if(s){return le("small"===t?La:O,{component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"4px",color:"inherit",lineHeight:1,...Vt},children:z})}return"string"==typeof z||"number"==typeof z?le(h,{component:"span",className:"btn-text-content",sx:{display:"inline-flex",alignItems:"center",padding:ui[t]||ui.medium},children:le(O,{component:"span",sx:{color:"inherit",...Vt},children:z})}):z})()})]});return y?le(Ka,{variant:k,size:V,badgeContent:S,dot:w,max:C,anchorOrigin:T,showZero:0===S,children:j}):j}const Ci=e=>le(wi,{iconOnly:!0,...e}),Ti=["default","primary","secondary","tertiary","neutral","info","success","warning","error","black-white"],zi=e=>"Default"===e?"var(--Quiet)":"var(--Buttons-"+e+"-Border)";function Ai(){const e={};return Ti.forEach(r=>{e[r]=function(e){const r=si(e);return{color:r,borderToken:zi(r),icon:"var(--Buttons-"+r+"-Border)"}}(r)}),e}const Ii=/-(outline|light|solid)$/,Ri=new Set;function Wi(e){const r=Ai();return r[function(e){const r=String(e||"default");if(!Ii.test(r))return r;const t=r.replace(Ii,"");return"production"===process.env.NODE_ENV||Ri.has(r)||(Ri.add(r),console.warn('[Checkbox] variant="'+r+'" — the -outline/-light/-solid shapes were removed; a Checkbox has one look and `variant` selects colour only. Rendering variant="'+t+'". Update the call site.')),t}(e)]||r.default}const Di={small:{box:16,icon:12,labelSize:"13px",gap:6,touchTarget:24},medium:{box:20,icon:14,labelSize:"15px",gap:8,touchTarget:24},large:{box:24,icon:18,labelSize:"17px",gap:10,touchTarget:24}};function Pi({size:e,variant:r,checked:t,indeterminate:a}){const i=Wi(r),o=Di[e]||Di.medium,n=t||a,l=i.borderToken,s="small"===e?"var(--Sm-Checkbox-Radius, 3.2px)":"large"===e?"var(--Lg-Checkbox-Radius, 4.8px)":"var(--Checkbox-Radius, 4px)";return le(h,{className:"chk-box-icon",sx:{width:o.box,height:o.box,boxSizing:"border-box",borderRadius:s,border:"2px solid "+l,overflow:"hidden",flexShrink:0,transition:"border-color 0.15s ease-in-out"},children:le(h,{sx:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--Background)",color:"var(--Text)",transition:"background-color 0.15s ease-in-out"},children:n&&le(a?pe:ue,{sx:{fontSize:o.icon,color:i.icon}})})})}function Fi({size:e,variant:r}){return le(Pi,{size:e,variant:r,checked:!1,indeterminate:!1})}function Li({size:e,variant:r}){return le(Pi,{size:e,variant:r,checked:!0,indeterminate:!1})}function Hi({size:e,variant:r}){return le(Pi,{size:e,variant:r,checked:!1,indeterminate:!0})}function Mi({variant:e="primary",size:r="medium",label:t,checked:a,defaultChecked:i,indeterminate:o=!1,disabled:n=!1,onChange:l,name:s,value:d,className:c="",sx:u={},"aria-label":h,"aria-labelledby":p,"aria-describedby":m,inputProps:f={},...g}){Wi(e);const v=Di[r]||Di.medium,y="small"===r?oa:sa,S={...f,...h&&{"aria-label":h},...p&&{"aria-labelledby":p},...m&&{"aria-describedby":m}},k=le(x,{checked:a,defaultChecked:i,indeterminate:o,disabled:n,onChange:l,name:s,value:d,icon:le(Fi,{size:r,variant:e}),checkedIcon:le(Li,{size:r,variant:e}),indeterminateIcon:le(Hi,{size:r,variant:e}),className:"chk-"+e+" "+c,inputProps:S,disableRipple:!0,sx:{padding:(v.touchTarget-v.box)/2+"px",minWidth:24,minHeight:24,borderRadius:"var(--Checkbox-Radius, 4px)",color:"inherit",transition:"background-color 0.15s ease-in-out","&.Mui-checked, &.MuiCheckbox-indeterminate":{color:"inherit"},"&:hover":{backgroundColor:"transparent"},"&:hover .chk-box-icon":{borderColor:"var(--Text)"},"&:active .chk-box-icon":{borderColor:"var(--Text)",backgroundColor:"var(--Pressed)"},"&.Mui-disabled .chk-box-icon":{opacity:"var(--Disabled, 0.38)"},"&.Mui-focusVisible .chk-box-icon":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"},"&.Mui-disabled":{opacity:"var(--Disabled, 0.38)",cursor:"not-allowed",pointerEvents:"none"},...u},...g});return t?le(b,{control:k,label:le(y,{component:"span",sx:{color:n?"var(--Text-Quiet)":"var(--Text)",fontSize:v.labelSize,lineHeight:1.4,userSelect:"none"},children:t}),disabled:n,sx:{marginLeft:0,marginRight:0,gap:v.gap+"px",alignItems:"center","&.Mui-disabled .MuiTypography-root":{color:"var(--Text-Quiet)",opacity:.6}}}):k}const Ei=["primary","secondary","tertiary","neutral","info","success","warning","error"];function Oi(e){const r=(t=e).charAt(0).toUpperCase()+t.slice(1);var t;return{bg:"var(--Hover)",border:"var(--Buttons-"+r+"-Border)",hoverBorder:"var(--Buttons-"+r+"-Hover)",pressedBorder:"var(--Buttons-"+r+"-Pressed)",text:"var(--Text)",focusBg:"var(--Hover)"}}const Ni={small:{height:"var(--Small-Button-Height)",fontSize:"13px",labelSize:"13px",padding:"4px var(--Input-Padding, 8px)",iconSize:16},medium:{height:"var(--Button-Height)",fontSize:"15px",labelSize:"15px",padding:"4px var(--Input-Padding, 12px)",iconSize:18},large:{height:"var(--Large-Button-Height)",fontSize:"17px",labelSize:"17px",padding:"4px var(--Input-Padding, 16px)",iconSize:20}},Qi={small:{height:"48px",fontSize:"13px",labelSize:"11px",padding:"20px var(--Input-Padding, 12px) 4px",padTop:20,padBottom:4,leftPad:12,iconSize:16},medium:{height:"56px",fontSize:"15px",labelSize:"12px",padding:"22px var(--Input-Padding, 14px) 6px",padTop:22,padBottom:6,leftPad:14,iconSize:18},large:{height:"64px",fontSize:"17px",labelSize:"14px",padding:"24px var(--Input-Padding, 16px) 6px",padTop:24,padBottom:6,leftPad:16,iconSize:20}},Vi={small:{resting:"Body-Small",shrunk:"Label-ExtraSmall"},medium:{resting:"Body-Medium",shrunk:"Label-Small"},large:{resting:"Body-Large",shrunk:"Label-Medium"}},ji=e=>({fontSize:"var(--"+e+"-Font-Size)",fontWeight:"var(--"+e+"-Font-Weight)",letterSpacing:"var(--"+e+"-Letter-Spacing)"});const Gi={info:xe,success:me,warning:fe,error:ge},Ui={info:{border:"var(--Buttons-Info-Border)",hoverBorder:"var(--Buttons-Info-Hover)",pressedBorder:"var(--Buttons-Info-Pressed)",icon:"var(--Icons-Info)",text:"var(--Hotlink)"},success:{border:"var(--Buttons-Success-Border)",hoverBorder:"var(--Buttons-Success-Hover)",pressedBorder:"var(--Buttons-Success-Pressed)",icon:"var(--Icons-Success)",text:"var(--Text-Success)"},warning:{border:"var(--Buttons-Warning-Border)",hoverBorder:"var(--Buttons-Warning-Hover)",pressedBorder:"var(--Buttons-Warning-Pressed)",icon:"var(--Icons-Warning)",text:"var(--Text-Warning)"},error:{border:"var(--Buttons-Error-Border)",hoverBorder:"var(--Buttons-Error-Hover)",pressedBorder:"var(--Buttons-Error-Pressed)",icon:"var(--Icons-Error)",text:"var(--Text-Error)"}};function Xi({variant:e="primary-outline",size:r="medium",label:a,labelPosition:i="standard",placeholder:o,helperText:n,validation:l,validationMessage:s,disabled:d=!1,id:c,value:u,defaultValue:p,onChange:m,name:f,type:g="text",multiline:x=!1,rows:b,maxRows:k,resize:B="vertical",startAdornment:w,endAdornment:C,fullWidth:T=!1,className:z="",sx:A={},"aria-label":I,"aria-labelledby":R,"aria-describedby":W,"aria-required":D,"aria-invalid":P,inputProps:F={},...L}){const H=function(){const e={};return Ei.forEach(r=>{e[r+"-outline"]=Oi(r)}),e.outline=Oi("primary"),e}(),M=H[e]||H["primary-outline"],E="floating"===i;"production"!==process.env.NODE_ENV&&/-light$|^light$/.test(e)&&console.warn('[Input] variant="'+e+'" was removed. It differed from "'+e.replace(/-?light$/,"")+'-outline" only by a token no design system publishes, so the two rendered identically. For a lighter field use data-surface="Surface-Brightest" on its container.');const O=E?Qi[r]||Qi.medium:Ni[r]||Ni.medium,N=t(),Q=c||N,{labelX:V,padX:j,restingY:G,shrunkY:U}=function(e,r){const t=parseInt(e.height,10)||56,a=parseInt(e.fontSize,10)||15,i="var(--Input-Padding, "+(e.leftPad||14)+"px)",o=(e.iconSize||18)+8;return{labelX:r?"calc("+i+" + "+o+"px)":i,padX:i,clearance:r?o:0,restingY:Math.round((t-1.4375*a)/2),shrunkY:6}}(O,!!w),X=Vi[r]||Vi.medium,Y="var(--Text)",q=l?Ui[l]:null,Z=l?Gi[l]:null,J=q||M,K=J.border,$={...F,...I&&{"aria-label":I},...R&&{"aria-labelledby":R},...W&&{"aria-describedby":W},...D&&{"aria-required":D},...P&&{"aria-invalid":P}};return de(h,{className:"inp-"+e+" "+z,sx:{width:T?"100%":"auto",...A},children:[(()=>{if(!a||E)return null;return le("small"===r?oa:sa,{component:"label",htmlFor:Q,sx:{display:"block",marginBottom:"6px",color:d?"var(--Quiet)":"var(--Text)",fontSize:O.labelSize,fontWeight:500,opacity:d?"var(--Disabled, 0.38)":1},children:a})})(),le(h,{sx:{border:"1px solid "+K,borderRadius:"small"===r?"var(--Sm-Input-Radius, var(--Input-Radius, var(--Style-Border-Radius)))":"large"===r?"var(--Lg-Input-Radius, var(--Input-Radius, var(--Style-Border-Radius)))":"var(--Input-Radius, var(--Style-Border-Radius))",overflow:"hidden",transition:"border-color 0.15s ease-in-out",boxShadow:"none",...!d&&{"&:hover":{borderColor:J.hoverBorder},"&:active":{borderColor:J.pressedBorder}},"&:focus-within":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"}},children:le(h,{children:le(v,{value:u,defaultValue:p,onChange:m,name:f,type:g,disabled:d,placeholder:o,id:Q,multiline:x,rows:b,maxRows:k,fullWidth:!0,label:E?a:void 0,variant:"outlined",size:"small"===r?"small":"medium",inputProps:$,InputProps:{startAdornment:w?le(y,{position:"start",children:w}):void 0,endAdornment:(()=>{if(C)return le(y,{position:"end",children:C})})()},sx:{"& .MuiOutlinedInput-root":{backgroundColor:"var(--Hover)",color:"var(--Quiet)",fontSize:O.fontSize,minHeight:x?"auto":O.height,padding:0,borderRadius:0,transition:"color 0.15s ease-in-out",...E&&{alignItems:"stretch"},"& fieldset":{border:"none"},"&.Mui-focused":{color:Y},"&:not(.Mui-focused) .MuiOutlinedInput-input:not(:placeholder-shown)":{color:Y},"&.Mui-disabled":{opacity:"var(--Disabled, 0.38)",cursor:"not-allowed"},"& input":{padding:O.padding,color:"inherit","&::placeholder":{color:"var(--Quiet)",opacity:1}},"& textarea":{padding:O.padding,color:"inherit",resize:B,"&::placeholder":{color:"var(--Quiet)",opacity:1}},"& .MuiInputAdornment-root":{color:"var(--Quiet)"},...E&&{"& .MuiInputAdornment-root":{maxHeight:"none",height:"auto",alignSelf:"stretch",alignItems:"center",paddingTop:O.padTop+"px",paddingBottom:O.padBottom+"px",marginTop:0,marginBottom:0},"& .MuiInputAdornment-positionStart":{marginLeft:j,marginRight:"8px",width:O.iconSize+"px",minWidth:O.iconSize+"px",justifyContent:"center"},"& .MuiInputAdornment-positionEnd":{marginRight:"8px"},...w&&{"& input":{paddingLeft:0},"& textarea":{paddingLeft:0}}}},"& .MuiInputLabel-root":{color:"var(--Quiet)",fontFamily:"var(--Font-Families-Body, var(--Body-Font-Family))",...ji(X.resting),transformOrigin:"top left",transition:"transform 0.15s ease, font-size 0.15s ease, color 0.15s ease",transform:"translate("+V+", "+G+"px)","&.MuiInputLabel-shrink":{transform:"translate("+V+", "+U+"px)",...ji(X.shrunk),color:"var(--Quiet)"},"&.Mui-focused":{color:Y},"&.Mui-disabled":{color:"var(--Quiet)",opacity:"var(--Disabled, 0.38)"}},"& .MuiOutlinedInput-notchedOutline legend":{display:"none"},"& .MuiOutlinedInput-notchedOutline":{top:0},"& .MuiOutlinedInput-root.Mui-focused":{outline:"none"},"& .MuiOutlinedInput-root:focus-within":{outline:"none"}},...L})})}),l&&s?de(h,{sx:{display:"flex",alignItems:"center",gap:"6px",marginTop:"4px",marginLeft:"2px"},children:[Z&&le(Z,{sx:{fontSize:O.iconSize,color:q.icon,flexShrink:0}}),le(S,{sx:{color:q.text,fontSize:"small"===r?"11px":"12px",margin:0},children:s})]}):n?le(S,{sx:{color:"var(--Quiet)",fontSize:"small"===r?"11px":"12px",marginTop:"4px",marginLeft:"2px"},children:n}):null]})}const Yi=e=>e.charAt(0).toUpperCase()+e.slice(1),qi={small:{height:"var(--Small-Button-Height)",fontSize:"13px",padding:"4px 8px",iconSize:16},medium:{height:"var(--Button-Height)",fontSize:"14px",padding:"6px 12px",iconSize:18},large:{height:"var(--Large-Button-Height)",fontSize:"16px",padding:"8px 16px",iconSize:20}},Zi={small:{height:48,fontSize:"13px",padding:"20px 12px 4px",labelSize:"11px",leftPad:12},medium:{height:56,fontSize:"14px",padding:"22px 14px 6px",labelSize:"12px",leftPad:14},large:{height:64,fontSize:"16px",padding:"24px 16px 6px",labelSize:"14px",leftPad:16}};function Ji({options:t=[],value:n,defaultValue:l="",onChange:s,label:d,labelPosition:c="top",size:u="medium",variant:p="outline",color:m="primary",selectionStyle:f="default",mode:g="standard",placeholder:x="Select…",showDividers:b=!1,showColorLabels:v=!0,startDecoration:y,disabled:S=!1,fullWidth:k=!1,className:B="",sx:w={},...C}){const T="default"===m?"primary":m,z=Yi(T),A="var(--Buttons-"+z+"-Border)";"production"!==process.env.NODE_ENV&&("light"===p&&console.warn('[Select] variant="light" was removed and had never done anything — it was read by no code path. Rendering outline. For a lighter Select, use data-surface="Surface-Brightest" on its container.'),"light"===f&&console.warn('[Select] selectionStyle="light" was removed with the -Light button shades. It named --Buttons-{C}-Light-{Button,Text,Border}, which no design system publishes, and carried no fallbacks — a selected option rendered with no fill, no text colour and no border. Rendering default.'));const I="light"===p?"outline":p,R="light"===f?"default":f,W="default"===m?"var(--Text)":"var(--Text-"+z+")",[D,P]=r(l),[F,L]=r(!1),[H,M]=r(!1),[E,O]=r({top:0,left:0,width:0,direction:"down"}),N=a(null),Q=a(null),[V,j]=r(null),[G,U]=r(null),X=void 0!==n,Y=X?n:D,q=t.flatMap(e=>e&&Array.isArray(e.options)?e.options:[e]).find(e=>("string"==typeof e?e:e.value)===Y),Z=q?"string"==typeof q?q:q.label:"",J=""!==Y&&null!=Y,K="floating"===c,$="top"===c,_="color"===g,ee=K?Zi[u]||Zi.medium:qi[u]||qi.medium,re=i(e=>{X||P(e),s?.(e),L(!1),Q.current?.focus()},[X,s]),te=i(()=>{if(!Q.current)return{top:0,left:0,width:0};const e=Q.current.getBoundingClientRect(),r=window.innerHeight-e.bottom,t=e.top,a=r>=240||r>=t?"down":"up";return{top:"down"===a?e.bottom+4:void 0,bottom:"up"===a?window.innerHeight-e.top+4:void 0,left:e.left,width:e.width,direction:a}},[]),ae=i(()=>{S||L(e=>(e||O(te()),!e))},[S,te]);o(()=>{if(!F)return;const e=e=>{!N.current||N.current.contains(e.target)||e.target.closest("[data-select-dropdown]")||L(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[F]),o(()=>{if(!F||!Q.current)return;const e=Q.current.closest("[data-theme]"),r=Q.current.closest("[data-surface]");j(e?.getAttribute("data-theme")||null),U(r?.getAttribute("data-surface")||null);const t=()=>O(te());return window.addEventListener("scroll",t,!0),window.addEventListener("resize",t),()=>{window.removeEventListener("scroll",t,!0),window.removeEventListener("resize",t)}},[F,te]);const ie=a(null),oe=i(e=>{const r=ie.current;if(!r)return;const t=r.querySelectorAll('[role="option"]');if(!t.length)return;const a=r.querySelector('[role="option"]:focus');let i=Array.prototype.indexOf.call(t,a);i="down"===e?i<t.length-1?i+1:0:i>0?i-1:t.length-1,t[i].focus()},[]);o(()=>{F&&requestAnimationFrame(()=>{const e=ie.current;if(!e)return;const r=e.querySelector('[aria-selected="true"]'),t=e.querySelector('[role="option"]');(r||t)?.focus()})},[F]);const ne=F?be.createPortal(le(h,{ref:ie,"data-select-dropdown":!0,"data-theme":V||void 0,role:"listbox","aria-label":d||"Options",sx:{position:"fixed",top:E.top??"unset",bottom:E.bottom??"unset",left:E.left,width:E.width+"px",backgroundColor:"var(--Hover)",border:"1px solid var(--Buttons-Default-Border)",borderRadius:"var(--Dropdown-Frame-Radius, var(--Input-Radius, var(--Style-Border-Radius, 4px)))",boxShadow:"none",zIndex:99999,maxHeight:"240px",overflowY:"auto",py:.5},children:(()=>{const r=(r,t,a)=>{const i="string"==typeof r?r:r.value,o="string"==typeof r?r:r.label,n="object"==typeof r?r.color:null,l=i===Y,s=function(e,r,t){const a=Yi(t||"default");return r?{backgroundColor:"var(--Buttons-"+a+"-Button)",color:"var(--Buttons-"+a+"-Text)",border:"1px solid var(--Buttons-"+a+"-Border)",fontWeight:600}:{color:"var(--Text)",backgroundColor:"transparent",border:"1px solid transparent"}}(0,l,T),d=t===a-1;return de(e.Fragment,{children:[de(h,{role:"option",tabIndex:-1,"aria-selected":l,"aria-label":_&&!v?o:void 0,onClick:()=>re(i),onKeyDown:e=>((e,r)=>{if("Enter"===e.key||" "===e.key)return e.preventDefault(),void re(r);"ArrowDown"===e.key&&(e.preventDefault(),oe("down")),"ArrowUp"===e.key&&(e.preventDefault(),oe("up")),"Escape"===e.key&&(L(!1),Q.current?.focus())})(e,i),sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:0,mx:.5,my:"1px",minHeight:ee.height,cursor:"pointer",fontSize:ee.fontSize,fontFamily:"inherit",borderRadius:"4px",outline:"none",...s,transition:"background-color 0.1s ease","&:hover":l?{}:{backgroundColor:"var(--Buttons-"+z+"-Hover)",color:"var(--Buttons-"+z+"-Text)"},"&:active":l?{}:{backgroundColor:"var(--Buttons-"+z+"-Pressed)",color:"var(--Buttons-"+z+"-Text)"},"&:focus-visible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"}},children:[_&&n&&le(h,{sx:{height:"calc("+ee.height+" - 8px)",width:"calc("+ee.height+" - 8px)",borderRadius:"var(--Input-Swatch-Radius, var(--Button-Radius))",backgroundColor:n,border:"1px solid "+(l?"var(--Buttons-"+z+"-Border)":"var(--Border)"),flexShrink:0}}),(!_||v)&&le(oa,{style:{flex:1,color:"inherit",fontWeight:"inherit"},children:o}),l&&le(Na,{size:"small",sx:{opacity:.6,flexShrink:0},children:le(ue,{})})]}),b&&!d&&le(h,{"aria-hidden":"true",sx:{height:"1px",backgroundColor:"var(--Border)",mx:1,my:.25}})]},i)};return t.map((a,i)=>{if(a&&Array.isArray(a.options)){const t=a.options;return de(e.Fragment,{children:[le(h,{role:"presentation",sx:{px:1.5,pt:0===i?.75:1.25,pb:.5,fontSize:"11px",fontFamily:"inherit",fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--Text-Quiet)"},children:a.label}),t.map((e,a)=>r(e,a,t.length))]},"group-"+(a.label||i))}return r(a,i,t.length)})})()}),document.body):null;return de(h,{ref:N,className:"select-wrapper select-"+u+" select-label-"+c+" select-style-"+R+" select-variant-"+I+(F?" select-open":"")+(S?" select-disabled":"")+(B?" "+B:""),sx:{position:"relative",width:k?"100%":"auto",display:"inline-block",fontFamily:"inherit",...w},...C,children:[$&&d&&le("small"===u?oa:sa,{component:"label",style:{display:"block",marginBottom:"6px",color:S?"var(--Quiet)":"var(--Text)",fontWeight:500,opacity:S?"var(--Disabled, 0.38)":1},children:d}),le(h,{sx:{border:"1px solid "+A,borderRadius:"var(--Input-Radius, var(--Style-Border-Radius))",overflow:"hidden",transition:"border-color 0.15s ease",boxShadow:"none","&:focus-within":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"}},children:le(h,{children:de(h,{ref:Q,component:"button",type:"button",role:"combobox","aria-expanded":F,"aria-haspopup":"listbox","aria-label":d||x,tabIndex:S?-1:0,onClick:ae,onKeyDown:e=>"Escape"===e.key?(L(!1),void Q.current?.focus()):"Enter"===e.key||" "===e.key?(e.preventDefault(),void ae()):F||"ArrowDown"!==e.key&&"ArrowUp"!==e.key?(F&&"ArrowDown"===e.key&&(e.preventDefault(),oe("down")),void(F&&"ArrowUp"===e.key&&(e.preventDefault(),oe("up")))):(e.preventDefault(),void L(!0)),onFocus:()=>M(!0),onBlur:()=>M(!1),sx:{display:"flex",alignItems:"center",gap:1,width:"100%",minWidth:140,height:ee.height,padding:ee.padding,backgroundColor:"var(--Hover)",border:"none",borderRadius:0,color:J||F?W:"var(--Quiet)",fontSize:ee.fontSize,fontFamily:"inherit",cursor:S?"not-allowed":"pointer",opacity:S?"var(--Disabled, 0.38)":1,outline:"none",textAlign:"left",position:"relative",transition:"color 0.15s ease"},children:[y&&le(h,{sx:{display:"flex",alignItems:"center",flexShrink:0,color:"var(--Text-Quiet)"},children:y}),K&&d&&le(h,{sx:{position:"absolute",top:J||F?"6px":"50%",left:(ee.leftPad||14)+(y?32:0)+"px",transform:J||F?"scale(0.75)":"translateY(-50%)",transformOrigin:"top left",color:F?W:"var(--Quiet)",fontSize:ee.fontSize,fontWeight:400,pointerEvents:"none",transition:"top 0.15s ease, transform 0.15s ease, color 0.15s ease"},children:d}),le(h,{sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...K&&{mt:J||F?"8px":0}},children:_&&J?de(h,{sx:{display:"flex",alignItems:"center",gap:1},children:[le(h,{sx:{height:"calc("+ee.height+" - 8px)",width:"calc("+ee.height+" - 8px)",borderRadius:"var(--Input-Swatch-Radius, var(--Button-Radius))",backgroundColor:q&&"string"!=typeof q&&q.color||"transparent",border:"1px solid var(--Border)",flexShrink:0}}),v&&le(oa,{style:{color:"inherit",padding:0},children:Z})]}):le(oa,{style:{color:"inherit",padding:0},children:J?Z:K&&d?"":x})}),le(ve,{sx:{fontSize:(ee.iconSize||18)+"px",color:"var(--Text-Quiet)",transform:F?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease",flexShrink:0}})]})})}),ne]})}const Ki={default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},$i={default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},_i={default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},eo={small:{px:"var(--Sm-Button-Padding, 8px)",fontSize:"var(--Sm-Button-Text, 14px)",iconSize:"var(--Sm-Button-Icon, 20px)",textPad:"var(--Sm-Button-Text-Padding, 4px)",indicatorThickness:"2px",minHeight:"var(--Sm-Button-Height, 24px)"},medium:{px:"var(--Button-Padding, 8px)",fontSize:"var(--Button-Text, 16px)",iconSize:"var(--Button-Icon, 20px)",textPad:"var(--Button-Text-Padding, 4px)",indicatorThickness:"2px",minHeight:"var(--Button-Height, 32px)"},large:{px:"var(--Lg-Button-Padding, 16px)",fontSize:"var(--Lg-Button-Text, 20px)",iconSize:"var(--Lg-Button-Icon, 32px)",textPad:"var(--Lg-Button-Text-Padding, 8px)",indicatorThickness:"2px",minHeight:"var(--Lg-Button-Height, 56px)"}},ro=l({value:0,setValue:()=>{},variant:"standard",color:"primary",size:"medium",orientation:"horizontal",scrollable:!1,tabsId:""}),to=()=>n(ro);function ao({children:e,defaultValue:a=0,value:o,onChange:n,variant:l="standard",color:s="primary",size:d="medium",orientation:c="horizontal",scrollable:u=!1,className:p="",sx:m={},...f}){const[g,x]=r(a),b=void 0!==o,v=b?o:g,y=t(),S=i(e=>{b||x(e),n?.(e)},[b,n]);return le(ro.Provider,{value:{value:v,setValue:S,variant:l,color:s,size:d,orientation:c,scrollable:u,tabsId:y},children:le(h,{className:"tabs tabs-"+c+" tabs-"+d+" tabs-"+l+("standard"!==l?" tabs-"+s:"")+(u?" tabs-scrollable":"")+" "+p,sx:{display:"flex",flexDirection:"horizontal"===c?"column":"row",width:"100%",overflow:"hidden",...m},...f,children:e})})}function io({children:t,rounded:n=!1,className:l="",sx:s={},...d}){const{variant:c,color:u,size:p,orientation:m,scrollable:f,tabsId:g}=to(),x=a(null),b=a(null),[v,y]=r(!1),[S,k]=r(!1),B="horizontal"===m,w="standard"===c,C="light"===c,T="dark"===c,z=w?void 0:"solid"===c?Ki[u]:C?$i[u]:T?_i[u]:void 0,A=w?void 0:T?"Surface-Dimmest":C?"Surface-Brightest":"Surface",I=i(()=>{const e=b.current;e&&f&&B&&(y(e.scrollLeft>1),k(e.scrollLeft<e.scrollWidth-e.clientWidth-1))},[f,B]);o(()=>{I();const e=b.current;if(!e||!f)return;e.addEventListener("scroll",I,{passive:!0});const r=new ResizeObserver(I);return r.observe(e),()=>{e.removeEventListener("scroll",I),r.disconnect()}},[f,I]);const R=e=>{const r=b.current;if(!r)return;const t=.6*r.clientWidth;r.scrollBy({left:e*t,behavior:"smooth"})},W={display:"inline-flex",alignItems:"center",justifyContent:"center",width:"28px",minWidth:"28px",border:"none",backgroundColor:"transparent",color:"var(--Text-Quiet)",cursor:"pointer",fontSize:"16px",fontFamily:"inherit",lineHeight:1,flexShrink:0,transition:"color 0.15s ease, background-color 0.15s ease","&:hover":{color:"var(--Text)",backgroundColor:"var(--Hover)"},"&:active":{backgroundColor:"var(--Pressed)"},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"-3px"},"&:disabled":{opacity:"var(--Disabled, 0.38)",cursor:"default","&:hover":{backgroundColor:"transparent",color:"var(--Text-Quiet)"}}},D=e.Children.toArray(t).filter(e.isValidElement).map((r,t)=>e.cloneElement(r,{_index:t,key:r.key||t}));return de(h,{ref:x,"data-theme":z||void 0,"data-surface":A||void 0,className:"tab-list tab-list-"+c+" tab-list-"+p+" tab-list-"+m+(f?" tab-list-scrollable":"")+" "+l,onKeyDown:e=>{const r=f?b.current:x.current,t=r?.querySelectorAll('[role="tab"]:not([aria-disabled="true"])');if(!t?.length)return;const a=Array.from(t).indexOf(document.activeElement);if(a<0)return;const i=B?"ArrowRight":"ArrowDown",o=B?"ArrowLeft":"ArrowUp";if(e.key===i){e.preventDefault();const r=t[(a+1)%t.length];r.focus(),f&&r.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})}else if(e.key===o){e.preventDefault();const r=t[(a-1+t.length)%t.length];r.focus(),f&&r.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})}else"Home"===e.key?(e.preventDefault(),t[0].focus(),f&&t[0].scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})):"End"===e.key&&(e.preventDefault(),t[t.length-1].focus(),f&&t[t.length-1].scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"}))},sx:{display:"flex",flexDirection:B?"row":"column",gap:0,position:"relative",backgroundColor:"var(--Background)",padding:"4px",overflow:"hidden",borderRadius:n?"var(--Style-Border-Radius)":0,...s},...d,children:[f&&B&&le(h,{component:"button","aria-label":"Scroll tabs left",onClick:()=>R(-1),disabled:!v,className:"tab-list-scroll-btn tab-list-scroll-btn-left",sx:W,children:"‹"}),le(h,f&&B?{ref:b,role:"tablist","aria-orientation":m,className:"tab-list-scroll-container",sx:{display:"flex",flexDirection:"row",overflowX:"auto",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},flex:1,minWidth:0},children:D}:{ref:b,role:"tablist","aria-orientation":m,sx:{display:"flex",flexDirection:B?"row":"column",flex:1},children:D}),f&&B&&le(h,{component:"button","aria-label":"Scroll tabs right",onClick:()=>R(1),disabled:!S,className:"tab-list-scroll-btn tab-list-scroll-btn-right",sx:W,children:"›"})]})}function oo({children:e,value:r,_index:t=0,disabled:a=!1,startDecorator:i,endDecorator:o,iconOnly:n=!1,className:l="",sx:s={},...d}){const{value:c,setValue:u,variant:p,color:m,size:f,orientation:g,tabsId:x}=to(),b=eo[f]||eo.medium,v="horizontal"===g,y="standard"===p,S="light"===p,k="dark"===p,B=void 0!==r?r:t,w=c===B,C=y?"var(--Buttons-"+({default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"}[m]||"Default")+"-Border)":"var(--Text)";return de(h,{component:"button",role:"tab",id:"tab-"+x+"-"+B,"data-theme":(y?void 0:"solid"===p?Ki[m]:S?$i[m]:k?_i[m]:void 0)||void 0,"data-surface":(y?void 0:k?"Surface-Dimmest":S?"Surface-Brightest":"Surface")||void 0,"aria-selected":w,"aria-controls":"tabpanel-"+x+"-"+B,"aria-disabled":a||void 0,tabIndex:w?0:-1,onClick:()=>{a||u(B)},className:"tab tab-"+f+(w?" tab-selected":"")+(a?" tab-disabled":"")+(n?" tab-icon-only":"")+" "+l,sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"2px",padding:"0 "+(n?"0":b.px),minHeight:b.minHeight,fontSize:b.fontSize,fontFamily:"inherit",fontWeight:500,lineHeight:1.3,color:w?"var(--Text)":"var(--Quiet)",backgroundColor:"transparent",border:"none",borderBottom:v?w?b.indicatorThickness+" solid "+C:b.indicatorThickness+" solid transparent":"none",borderRight:v?"none":w?b.indicatorThickness+" solid "+C:b.indicatorThickness+" solid transparent",cursor:a?"not-allowed":"pointer",opacity:a?"var(--Disabled, 0.38)":1,position:"relative",outline:"none",transition:"color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease",flexShrink:0,whiteSpace:"nowrap",...!a&&{"&:hover":{backgroundColor:"var(--Hover)"},"&:active":{backgroundColor:"var(--Pressed)"},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"-3px"}},...s},...d,children:[i&&le(h,{className:"tab-start-decorator",sx:{display:"inline-flex",fontSize:b.iconSize,lineHeight:1,flexShrink:0},children:i}),!n&&e&&(()=>{const r="small"===f?ga:oa;return le(h,{className:"tab-label",sx:{display:"inline-flex",alignItems:"center",padding:"4px "+b.textPad},children:le(r,{style:{color:"inherit",fontWeight:"inherit"},children:e})})})(),o&&le(h,{className:"tab-end-decorator",sx:{display:"inline-flex",fontSize:b.iconSize,lineHeight:1,flexShrink:0},children:o})]})}function no({children:e,value:r,className:t="",sx:a={},...i}){const{value:o,size:n,tabsId:l}=to();return o===r?le(h,{role:"tabpanel",id:"tabpanel-"+l+"-"+r,"aria-labelledby":"tab-"+l+"-"+r,className:"tab-panel tab-panel-"+n+" "+t,sx:{paddingTop:"16px",fontSize:(eo[n]||eo.medium).fontSize,fontFamily:"inherit",color:"var(--Text)",...a},...i,children:e}):null}const lo=e.forwardRef(function({theme:e=null,surface:r="Surface",children:t,minHeight:a=160,sx:i={}},o){return le(h,{ref:o,"data-theme":e||void 0,"data-surface":r,sx:{p:4,display:"flex",alignItems:"center",justifyContent:"center",minHeight:a,backgroundColor:"var(--Background)",borderBottom:"1px solid var(--Border)",...i},children:t})}),so="__null__",co=[{label:"Default",value:so},{label:"Primary",value:"Primary"},{label:"Secondary",value:"Secondary"},{label:"Tertiary",value:"Tertiary"},{label:"Neutral",value:"Neutral"},{label:"Info",value:"Info"},{label:"Success",value:"Success"},{label:"Warning",value:"Warning"},{label:"Error",value:"Error"}],uo=["Surface-Dimmest","Surface-Dim","Surface","Surface-Bright","Surface-Brightest","Container","Container-Highest","Container-High","Container-Low","Container-Lowest"];function ho({theme:e=null,onThemeChange:r,surface:t="Surface",onSurfaceChange:a,surfaces:i=uo,size:o="small"}){const n=i.map(e=>({value:e,label:e}));return de(k,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[le(h,{sx:{width:160},children:le(Ji,{options:co,value:e??so,onChange:e=>r?.(e===so?null:e),labelPosition:"none",size:o,variant:"outline",color:"default","aria-label":"Background theme",fullWidth:!0})}),le(h,{sx:{width:180},children:le(Ji,{options:n,value:t,onChange:e=>a?.(e),labelPosition:"none",size:o,variant:"outline",color:"default","aria-label":"Surface",fullWidth:!0})})]})}function po(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mo,fo={exports:{}},go={exports:{}},xo={};var bo,vo,yo,So,ko,Bo,wo,Co,To,zo,Ao,Io,Ro,Wo,Do={};
2
2
  /** @license React v16.13.1
3
3
  * react-is.development.js
4
4
  *
@@ -6,10 +6,10 @@ import e,{useState as r,useId as t,useRef as a,useCallback as i,useEffect as o,u
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */function Ao(){return mo||(mo=1,"production"===process.env.NODE_ENV?uo.exports=function(){if(so)return ho;so=1;var e="function"==typeof Symbol&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,n=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case r:switch(e=e.type){case s:case d:case a:case o:case i:case u:return e;default:switch(e=e&&e.$$typeof){case l:case c:case m:case p:case n:return e;default:return h}}case t:return h}}}function y(e){return v(e)===d}return ho.AsyncMode=s,ho.ConcurrentMode=d,ho.ContextConsumer=l,ho.ContextProvider=n,ho.Element=r,ho.ForwardRef=c,ho.Fragment=a,ho.Lazy=m,ho.Memo=p,ho.Portal=t,ho.Profiler=o,ho.StrictMode=i,ho.Suspense=u,ho.isAsyncMode=function(e){return y(e)||v(e)===s},ho.isConcurrentMode=y,ho.isContextConsumer=function(e){return v(e)===l},ho.isContextProvider=function(e){return v(e)===n},ho.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},ho.isForwardRef=function(e){return v(e)===c},ho.isFragment=function(e){return v(e)===a},ho.isLazy=function(e){return v(e)===m},ho.isMemo=function(e){return v(e)===p},ho.isPortal=function(e){return v(e)===t},ho.isProfiler=function(e){return v(e)===o},ho.isStrictMode=function(e){return v(e)===i},ho.isSuspense=function(e){return v(e)===u},ho.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===o||e===i||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===p||e.$$typeof===n||e.$$typeof===l||e.$$typeof===c||e.$$typeof===g||e.$$typeof===x||e.$$typeof===b||e.$$typeof===f)},ho.typeOf=v,ho}():uo.exports=(po||(po=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,n=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case r:var f=e.type;switch(f){case s:case d:case a:case o:case i:case u:return f;default:var g=f&&f.$$typeof;switch(g){case l:case c:case m:case p:case n:return g;default:return h}}case t:return h}}}var y=s,S=d,k=l,B=n,w=r,C=c,T=a,z=m,A=p,I=t,R=o,W=i,D=u,L=!1;function F(e){return v(e)===d}zo.AsyncMode=y,zo.ConcurrentMode=S,zo.ContextConsumer=k,zo.ContextProvider=B,zo.Element=w,zo.ForwardRef=C,zo.Fragment=T,zo.Lazy=z,zo.Memo=A,zo.Portal=I,zo.Profiler=R,zo.StrictMode=W,zo.Suspense=D,zo.isAsyncMode=function(e){return L||(L=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),F(e)||v(e)===s},zo.isConcurrentMode=F,zo.isContextConsumer=function(e){return v(e)===l},zo.isContextProvider=function(e){return v(e)===n},zo.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},zo.isForwardRef=function(e){return v(e)===c},zo.isFragment=function(e){return v(e)===a},zo.isLazy=function(e){return v(e)===m},zo.isMemo=function(e){return v(e)===p},zo.isPortal=function(e){return v(e)===t},zo.isProfiler=function(e){return v(e)===o},zo.isStrictMode=function(e){return v(e)===i},zo.isSuspense=function(e){return v(e)===u},zo.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===o||e===i||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===p||e.$$typeof===n||e.$$typeof===l||e.$$typeof===c||e.$$typeof===g||e.$$typeof===x||e.$$typeof===b||e.$$typeof===f)},zo.typeOf=v}()),zo)),uo.exports}
9
+ */function Po(){return vo||(vo=1,"production"===process.env.NODE_ENV?go.exports=function(){if(mo)return xo;mo=1;var e="function"==typeof Symbol&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,n=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case r:switch(e=e.type){case s:case d:case a:case o:case i:case u:return e;default:switch(e=e&&e.$$typeof){case l:case c:case m:case p:case n:return e;default:return h}}case t:return h}}}function y(e){return v(e)===d}return xo.AsyncMode=s,xo.ConcurrentMode=d,xo.ContextConsumer=l,xo.ContextProvider=n,xo.Element=r,xo.ForwardRef=c,xo.Fragment=a,xo.Lazy=m,xo.Memo=p,xo.Portal=t,xo.Profiler=o,xo.StrictMode=i,xo.Suspense=u,xo.isAsyncMode=function(e){return y(e)||v(e)===s},xo.isConcurrentMode=y,xo.isContextConsumer=function(e){return v(e)===l},xo.isContextProvider=function(e){return v(e)===n},xo.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},xo.isForwardRef=function(e){return v(e)===c},xo.isFragment=function(e){return v(e)===a},xo.isLazy=function(e){return v(e)===m},xo.isMemo=function(e){return v(e)===p},xo.isPortal=function(e){return v(e)===t},xo.isProfiler=function(e){return v(e)===o},xo.isStrictMode=function(e){return v(e)===i},xo.isSuspense=function(e){return v(e)===u},xo.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===o||e===i||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===p||e.$$typeof===n||e.$$typeof===l||e.$$typeof===c||e.$$typeof===g||e.$$typeof===x||e.$$typeof===b||e.$$typeof===f)},xo.typeOf=v,xo}():go.exports=(bo||(bo=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,n=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case r:var f=e.type;switch(f){case s:case d:case a:case o:case i:case u:return f;default:var g=f&&f.$$typeof;switch(g){case l:case c:case m:case p:case n:return g;default:return h}}case t:return h}}}var y=s,S=d,k=l,B=n,w=r,C=c,T=a,z=m,A=p,I=t,R=o,W=i,D=u,P=!1;function F(e){return v(e)===d}Do.AsyncMode=y,Do.ConcurrentMode=S,Do.ContextConsumer=k,Do.ContextProvider=B,Do.Element=w,Do.ForwardRef=C,Do.Fragment=T,Do.Lazy=z,Do.Memo=A,Do.Portal=I,Do.Profiler=R,Do.StrictMode=W,Do.Suspense=D,Do.isAsyncMode=function(e){return P||(P=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),F(e)||v(e)===s},Do.isConcurrentMode=F,Do.isContextConsumer=function(e){return v(e)===l},Do.isContextProvider=function(e){return v(e)===n},Do.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},Do.isForwardRef=function(e){return v(e)===c},Do.isFragment=function(e){return v(e)===a},Do.isLazy=function(e){return v(e)===m},Do.isMemo=function(e){return v(e)===p},Do.isPortal=function(e){return v(e)===t},Do.isProfiler=function(e){return v(e)===o},Do.isStrictMode=function(e){return v(e)===i},Do.isSuspense=function(e){return v(e)===u},Do.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===o||e===i||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===p||e.$$typeof===n||e.$$typeof===l||e.$$typeof===c||e.$$typeof===g||e.$$typeof===x||e.$$typeof===b||e.$$typeof===f)},Do.typeOf=v}()),Do)),go.exports}
10
10
  /*
11
11
  object-assign
12
12
  (c) Sindre Sorhus
13
13
  @license MIT
14
- */function Io(){if(go)return fo;go=1;var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;return fo=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map(function(e){return r[e]}).join(""))return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(e){a[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(e){return!1}}()?Object.assign:function(a,i){for(var o,n,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(a),s=1;s<arguments.length;s++){for(var d in o=Object(arguments[s]))r.call(o,d)&&(l[d]=o[d]);if(e){n=e(o);for(var c=0;c<n.length;c++)t.call(o,n[c])&&(l[n[c]]=o[n[c]])}}return l},fo}function Ro(){if(bo)return xo;bo=1;return xo="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Wo(){return yo?vo:(yo=1,vo=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var Do=Ao();co.exports=function(){if(wo)return Bo;wo=1;var e=Ao(),r=Io(),t=Ro(),a=Wo(),i=function(){if(ko)return So;ko=1;var e=function(){};if("production"!==process.env.NODE_ENV){var r=Ro(),t={},a=Wo();e=function(e){var r="Warning: "+e;"undefined"!=typeof console&&console.error(r);try{throw new Error(r)}catch(e){}}}function i(i,o,n,l,s){if("production"!==process.env.NODE_ENV)for(var d in i)if(a(i,d)){var c;try{if("function"!=typeof i[d]){var u=Error((l||"React class")+": "+n+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}c=i[d](o,d,l,n,null,r)}catch(e){c=e}if(!c||c instanceof Error||e((l||"React class")+": type specification of "+n+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in t)){t[c.message]=!0;var h=s?s():"";e("Failed "+n+" type: "+c.message+(null!=h?h:""))}}}return i.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(t={})},So=i}(),o=function(){};function n(){return null}return"production"!==process.env.NODE_ENV&&(o=function(e){var r="Warning: "+e;"undefined"!=typeof console&&console.error(r);try{throw new Error(r)}catch(e){}}),Bo=function(l,s){var d="function"==typeof Symbol&&Symbol.iterator,c="<<anonymous>>",u={array:f("array"),bigint:f("bigint"),bool:f("boolean"),func:f("function"),number:f("number"),object:f("object"),string:f("string"),symbol:f("symbol"),any:m(n),arrayOf:function(e){return m(function(r,a,i,o,n){if("function"!=typeof e)return new p("Property `"+n+"` of component `"+i+"` has invalid PropType notation inside arrayOf.");var l=r[a];if(!Array.isArray(l))return new p("Invalid "+o+" `"+n+"` of type `"+b(l)+"` supplied to `"+i+"`, expected an array.");for(var s=0;s<l.length;s++){var d=e(l,s,i,o,n+"["+s+"]",t);if(d instanceof Error)return d}return null})},element:m(function(e,r,t,a,i){var o=e[r];return l(o)?null:new p("Invalid "+a+" `"+i+"` of type `"+b(o)+"` supplied to `"+t+"`, expected a single ReactElement.")}),elementType:m(function(r,t,a,i,o){var n=r[t];return e.isValidElementType(n)?null:new p("Invalid "+i+" `"+o+"` of type `"+b(n)+"` supplied to `"+a+"`, expected a single ReactElement type.")}),instanceOf:function(e){return m(function(r,t,a,i,o){if(!(r[t]instanceof e)){var n=e.name||c;return new p("Invalid "+i+" `"+o+"` of type `"+((l=r[t]).constructor&&l.constructor.name?l.constructor.name:c)+"` supplied to `"+a+"`, expected instance of `"+n+"`.")}var l;return null})},node:m(function(e,r,t,a,i){return x(e[r])?null:new p("Invalid "+a+" `"+i+"` supplied to `"+t+"`, expected a ReactNode.")}),objectOf:function(e){return m(function(r,i,o,n,l){if("function"!=typeof e)return new p("Property `"+l+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var s=r[i],d=b(s);if("object"!==d)return new p("Invalid "+n+" `"+l+"` of type `"+d+"` supplied to `"+o+"`, expected an object.");for(var c in s)if(a(s,c)){var u=e(s,c,o,n,l+"."+c,t);if(u instanceof Error)return u}return null})},oneOf:function(e){return Array.isArray(e)?m(function(r,t,a,i,o){for(var n=r[t],l=0;l<e.length;l++)if(h(n,e[l]))return null;var s=JSON.stringify(e,function(e,r){return"symbol"===v(r)?String(r):r});return new p("Invalid "+i+" `"+o+"` of value `"+String(n)+"` supplied to `"+a+"`, expected one of "+s+".")}):("production"!==process.env.NODE_ENV&&o(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),n)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&o("Invalid argument supplied to oneOfType, expected an instance of array."),n;for(var r=0;r<e.length;r++){var i=e[r];if("function"!=typeof i)return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+y(i)+" at index "+r+"."),n}return m(function(r,i,o,n,l){for(var s=[],d=0;d<e.length;d++){var c=(0,e[d])(r,i,o,n,l,t);if(null==c)return null;c.data&&a(c.data,"expectedType")&&s.push(c.data.expectedType)}return new p("Invalid "+n+" `"+l+"` supplied to `"+o+"`"+(s.length>0?", expected one of type ["+s.join(", ")+"]":"")+".")})},shape:function(e){return m(function(r,a,i,o,n){var l=r[a],s=b(l);if("object"!==s)return new p("Invalid "+o+" `"+n+"` of type `"+s+"` supplied to `"+i+"`, expected `object`.");for(var d in e){var c=e[d];if("function"!=typeof c)return g(i,o,n,d,v(c));var u=c(l,d,i,o,n+"."+d,t);if(u)return u}return null})},exact:function(e){return m(function(i,o,n,l,s){var d=i[o],c=b(d);if("object"!==c)return new p("Invalid "+l+" `"+s+"` of type `"+c+"` supplied to `"+n+"`, expected `object`.");var u=r({},i[o],e);for(var h in u){var m=e[h];if(a(e,h)&&"function"!=typeof m)return g(n,l,s,h,v(m));if(!m)return new p("Invalid "+l+" `"+s+"` key `"+h+"` supplied to `"+n+"`.\nBad object: "+JSON.stringify(i[o],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var f=m(d,h,n,l,s+"."+h,t);if(f)return f}return null})}};function h(e,r){return e===r?0!==e||1/e==1/r:e!=e&&r!=r}function p(e,r){this.message=e,this.data=r&&"object"==typeof r?r:{},this.stack=""}function m(e){if("production"!==process.env.NODE_ENV)var r={},a=0;function i(i,n,l,d,u,h,m){if(d=d||c,h=h||l,m!==t){if(s){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=d+":"+l;!r[g]&&a<3&&(o("You are manually calling a React.PropTypes validation function for the `"+h+"` prop on `"+d+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),r[g]=!0,a++)}}return null==n[l]?i?null===n[l]?new p("The "+u+" `"+h+"` is marked as required in `"+d+"`, but its value is `null`."):new p("The "+u+" `"+h+"` is marked as required in `"+d+"`, but its value is `undefined`."):null:e(n,l,d,u,h)}var n=i.bind(null,!1);return n.isRequired=i.bind(null,!0),n}function f(e){return m(function(r,t,a,i,o,n){var l=r[t];return b(l)!==e?new p("Invalid "+i+" `"+o+"` of type `"+v(l)+"` supplied to `"+a+"`, expected `"+e+"`.",{expectedType:e}):null})}function g(e,r,t,a,i){return new p((e||"React class")+": "+r+" type `"+t+"."+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function x(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(x);if(null===e||l(e))return!0;var r=function(e){var r=e&&(d&&e[d]||e["@@iterator"]);if("function"==typeof r)return r}(e);if(!r)return!1;var t,a=r.call(e);if(r!==e.entries){for(;!(t=a.next()).done;)if(!x(t.value))return!1}else for(;!(t=a.next()).done;){var i=t.value;if(i&&!x(i[1]))return!1}return!0;default:return!1}}function b(e){var r=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,r){return"symbol"===e||!!r&&("Symbol"===r["@@toStringTag"]||"function"==typeof Symbol&&r instanceof Symbol)}(r,e)?"symbol":r}function v(e){if(null==e)return""+e;var r=b(e);if("object"===r){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return r}function y(e){var r=v(e);switch(r){case"array":case"object":return"an "+r;case"boolean":case"date":case"regexp":return"a "+r;default:return r}}return p.prototype=Error.prototype,u.checkPropTypes=i,u.resetWarningCache=i.resetWarningCache,u.PropTypes=u,u},Bo}()(Do.isElement,!0)}else co.exports=function(){if(To)return Co;To=1;var e=Ro();function r(){}function t(){}return t.resetWarningCache=r,Co=function(){function a(r,t,a,i,o,n){if(n!==e){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function i(){return a}a.isRequired=a;var o={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:i,element:a,elementType:a,instanceOf:i,node:a,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:t,resetWarningCache:r};return o.PropTypes=o,o}}()();var Lo=lo(co.exports);function Fo({code:e,label:t="Copy code"}){const[a,i]=r(!1);return se(B,{title:a?"Copied!":t,children:se(w,{size:"small",onClick:async()=>{try{await navigator.clipboard.writeText(e),i(!0),setTimeout(()=>i(!1),2e3)}catch(e){console.error("Copy failed:",e)}},"aria-label":a?"Copied":t,sx:{color:a?"var(--Icons-Success, var(--Text))":"var(--Quiet)","&:hover":{backgroundColor:"var(--Hover)",color:"var(--Text)"},"&:focus-visible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"}},children:se(a?he:ue,{fontSize:"small"})})})}Fo.propTypes={code:Lo.string.isRequired,label:Lo.string};function Ho({code:e="",language:r="JSX",showCopy:t=!0,showHeader:a=!0,maxHeight:i,wrap:o=!1,sx:n={},...l}){return de(h,{"data-theme":"Neutral","data-surface":"Surface-Dimmest",sx:{backgroundColor:"var(--Background)",borderRadius:"min(var(--Card-Radius, var(--Style-Border-Radius)), 12px)",overflow:"hidden",...n},...l,children:[a&&(r||t)&&de(h,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,px:2,py:1,borderBottom:"1px solid var(--Border)",minHeight:40},children:[se(ca,{color:"quiet",children:r}),t&&e?se(Fo,{code:e}):null]}),se(h,{sx:{p:2,overflow:"auto",maxHeight:i},children:se(h,{component:"pre",sx:{margin:0,fontFamily:"inherit"},children:se(h,{component:"code",sx:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",fontSize:"13px",lineHeight:1.6,color:"var(--Text)",whiteSpace:o?"pre-wrap":"pre",wordBreak:o?"break-word":"normal",display:"block"},children:e})})})]})}function Po(e){if(!e)return null;const r=e.trim();if(/^#[0-9a-f]{3}$/i.test(r))return{r:parseInt(r[1]+r[1],16),g:parseInt(r[2]+r[2],16),b:parseInt(r[3]+r[3],16),a:1};if(/^#[0-9a-f]{6}$/i.test(r))return{r:parseInt(r.substring(1,3),16),g:parseInt(r.substring(3,5),16),b:parseInt(r.substring(5,7),16),a:1};if(/^#[0-9a-f]{8}$/i.test(r))return{r:parseInt(r.substring(1,3),16),g:parseInt(r.substring(3,5),16),b:parseInt(r.substring(5,7),16),a:parseInt(r.substring(7,9),16)/255};const t=r.match(/rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:[,\s/]+([\d.]+%?))?\s*\)/);if(t){let e=1;return void 0!==t[4]&&(e=t[4].endsWith("%")?parseFloat(t[4])/100:parseFloat(t[4])),{r:Math.round(parseFloat(t[1])),g:Math.round(parseFloat(t[2])),b:Math.round(parseFloat(t[3])),a:e}}return null}function Mo(e,r){if(!e||!r)return e||r;if(e.a>=1)return e;const t=e.a;return{r:Math.round(e.r*t+r.r*(1-t)),g:Math.round(e.g*t+r.g*(1-t)),b:Math.round(e.b*t+r.b*(1-t)),a:1}}function Eo(e){const r=e=>e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4);return.2126*r(e.r/255)+.7152*r(e.g/255)+.0722*r(e.b/255)}function Oo(e,r,t){const a=Po(e),i=Po(r),o=Po(t);if(!a||!i)return null;const n=o?Mo(i,o):i.a<1?null:i;if(!n)return null;const l=Mo(a,n);if(!l)return null;const s=Eo(l),d=Eo(n);return((Math.max(s,d)+.05)/(Math.min(s,d)+.05)).toFixed(2)}function No(e){return"undefined"==typeof window?null:getComputedStyle(document.documentElement).getPropertyValue(e).trim()}Ho.propTypes={code:Lo.string,language:Lo.string,showCopy:Lo.bool,showHeader:Lo.bool,maxHeight:Lo.oneOfType([Lo.number,Lo.string]),wrap:Lo.bool,sx:Lo.object};const Qo={"display-large":"Display Large","display-medium":"Display Medium","display-small":"Display Small",h1:"H1",h2:"H2",h3:"H3",h4:"H4",h5:"H5",h6:"H6","subtitle-small":"Subtitle Small",subtitle:"Subtitle Medium","subtitle-large":"Subtitle Large","body-small":"Body Small","body-small-semibold":"Body Small Semibold",body:"Body Medium","body-semibold":"Body Medium Semibold","body-large":"Body Large","body-large-semibold":"Body Large Semibold",label:"Label","label-small":"Label Small","label-large":"Label Large",caption:"Caption","caption-bold":"Caption Bold",legal:"Legal","legal-semibold":"Legal Semibold",eyebrow:"Eyebrow Medium","eyebrow-small":"Eyebrow Small","eyebrow-large":"Eyebrow Large",button:"Button Standard","button-small":"Button Small","button-extra-small":"Button Extra Small","number-large":"Number Large","number-medium":"Number Medium","number-small":"Number Small"};function Vo(){const e=({color:e})=>de(h,{sx:{textAlign:"center"},children:[se(h,{sx:{width:"80px",height:"80px",backgroundColor:`var(${e.var})`,borderRadius:"8px",border:"1px solid var(--Border)",mb:1,mx:"auto"}}),se(C,{variant:"body2",sx:{fontWeight:600,fontSize:"12px",color:"var(--Text)",mb:.5,wordBreak:"break-word"},children:e.name}),se(C,{variant:"caption",sx:{color:"var(--Text-Secondary)",display:"block",fontSize:"10px",fontFamily:"monospace",wordBreak:"break-all"},children:e.var})]});return de(k,{spacing:6,children:[de(h,{children:[se(C,{variant:"h5",sx:{mb:3,fontWeight:700},children:"Brand Colors (Static)"}),se(k,{direction:"row",spacing:3,sx:{justifyContent:"center",flexWrap:"wrap",gap:3},children:[{name:"Primary",var:"--Primary-Color-11"},{name:"Secondary",var:"--Secondary-Color-11"},{name:"Tertiary",var:"--Tertiary-Color-11"}].map(r=>se(e,{color:r},r.var))})]}),de(h,{children:[se(C,{variant:"h5",sx:{mb:3,fontWeight:700},children:"Background Colors (Dynamic)"}),se(C,{variant:"body2",sx:{mb:3,color:"var(--Text-Secondary)"},children:"Update based on selected Background variant and Mode"}),se(T,{container:!0,spacing:2,sx:{justifyContent:"center"},children:[{name:"Default Background",cssVar:"var(--Theme-Default-Surfaces-Surface)"},{name:"Primary Background",cssVar:"var(--Theme-Primary-Surfaces-Surface)"},{name:"Secondary Background",cssVar:"var(--Theme-Secondary-Surfaces-Surface)"},{name:"Tertiary Background",cssVar:"var(--Theme-Tertiary-Surfaces-Surface)"},{name:"Neutral Background",cssVar:"var(--Theme-Neutral-Surfaces-Surface)"},{name:"Neutral-Variant Background",cssVar:"var(--Theme-Neutral-Variant-Surfaces-Surface)"}].map(e=>se(T,{item:!0,sx:{display:"flex",justifyContent:"center"},children:de(h,{sx:{textAlign:"center"},children:[se(h,{sx:{minWidth:"max(var(--Button-Height), var(--Min-Button-Width))",minHeight:"var(--Button-Height)",backgroundColor:e.cssVar,borderRadius:"var(--Style-Border-Radius)",border:"2px solid var(--Border)",mb:1}}),se(C,{variant:"body2",sx:{fontWeight:600,fontSize:"12px",color:"var(--Text)",wordBreak:"break-word"},children:e.name})]})},e.name))})]}),de(h,{children:[se(C,{variant:"h5",sx:{mb:3,fontWeight:700},children:"Dynamic Colors (Update with Mode, Background & Surface)"}),se(z,{severity:"info",sx:{backgroundColor:"var(--Container-Low)",mb:3,border:"1px solid var(--Border)"},children:de(C,{variant:"body2",children:["Most colors update automatically based on the current"," ",se("strong",{children:"Mode"})," (Light/Dark), ",se("strong",{children:"Background"})," ","variant, and ",se("strong",{children:"Surface"})," theme. Only Primary, Secondary, and Tertiary colors are fixed brand colors."]})}),se(C,{variant:"body2",sx:{mb:3,color:"var(--Text-Secondary)"},children:"These colors automatically adapt based on:"}),de(k,{spacing:1,sx:{mb:4},children:[de(h,{sx:{display:"flex",gap:2},children:[se(C,{variant:"body2",sx:{fontWeight:600,minWidth:80},children:"Mode:"}),se(C,{variant:"body2",children:"Light or Dark theme"})]}),de(h,{sx:{display:"flex",gap:2},children:[se(C,{variant:"body2",sx:{fontWeight:600,minWidth:80},children:"Background:"}),se(C,{variant:"body2",children:"Default, Primary, Secondary, Tertiary, Neutral, or Neutral-Variant"})]}),de(h,{sx:{display:"flex",gap:2},children:[se(C,{variant:"body2",sx:{fontWeight:600,minWidth:80},children:"Surface:"}),se(C,{variant:"body2",children:"Theme surface layer selection"})]})]}),se(k,{spacing:4,children:[{name:"Layout & Surfaces",colors:[{name:"Background",var:"--Background"},{name:"Border",var:"--Border"},{name:"Border-Variant",var:"--Border-Variant"}]},{name:"Text & Links",colors:[{name:"Header",var:"--Header"},{name:"Text",var:"--Text"},{name:"Text-Quiet",var:"--Text-Quiet"},{name:"Hotlink",var:"--Hotlink"},{name:"Hotlink-Visited",var:"--Hotlink-Visited"}]},{name:"Buttons - Primary",colors:[{name:"Button BG",var:"--Button-Primary-Button"},{name:"Button Text",var:"--Button-Primary-Text"},{name:"Button Hover",var:"--Button-Primary-Hover"},{name:"Button Active",var:"--Button-Primary-Pressed"},{name:"Focus-Visible",var:"--Focus-Visible"}]},{name:"Buttons - Secondary",colors:[{name:"Button BG",var:"--Button-Secondary-Button"},{name:"Button Text",var:"--Button-Secondary-Text"},{name:"Button Hover",var:"--Button-Secondary-Hover"},{name:"Button Active",var:"--Button-Secondary-Pressed"},{name:"Focus-Visible",var:"--Focus-Visible"}]},{name:"Buttons - State",colors:[{name:"Info Button",var:"--Button-Info-Button"},{name:"Success Button",var:"--Button-Success-Button"},{name:"Warning Button",var:"--Button-Warning-Button"},{name:"Error Button",var:"--Button-Error-Button"}]},{name:"Icons",colors:[{name:"Default",var:"--Icons-Default"},{name:"Primary",var:"--Icons-Primary"},{name:"Secondary",var:"--Icons-Secondary"},{name:"Tertiary",var:"--Icons-Tertiary"},{name:"Neutral",var:"--Icons-Neutral"},{name:"Info",var:"--Icons-Info"},{name:"Success",var:"--Icons-Success"},{name:"Warning",var:"--Icons-Warning"},{name:"Error",var:"--Icons-Error"}]},{name:"Chips & Badges",colors:[{name:"Primary BG",var:"--Tags-Primary-BG"},{name:"Primary Text",var:"--Tags-Primary-Text"},{name:"Secondary BG",var:"--Tags-Secondary-BG"},{name:"Secondary Text",var:"--Tags-Secondary-Text"},{name:"Tertiary BG",var:"--Tags-Tertiary-BG"},{name:"Tertiary Text",var:"--Tags-Tertiary-Text"},{name:"Neutral BG",var:"--Tags-Neutral-BG"},{name:"Neutral Text",var:"--Tags-Neutral-Text"},{name:"Info BG",var:"--Tags-Info-BG"},{name:"Info Text",var:"--Tags-Info-Text"},{name:"Success BG",var:"--Tags-Success-BG"},{name:"Success Text",var:"--Tags-Success-Text"},{name:"Warning BG",var:"--Tags-Warning-BG"},{name:"Warning Text",var:"--Tags-Warning-Text"},{name:"Error BG",var:"--Tags-Error-BG"},{name:"Error Text",var:"--Tags-Error-Text"}]}].map(r=>de(h,{children:[se(C,{variant:"h6",sx:{mb:2,fontWeight:600},children:r.name}),se(T,{container:!0,spacing:2,sx:{justifyContent:"center"},children:r.colors.map(r=>se(T,{item:!0,sx:{display:"flex",justifyContent:"center"},children:se(e,{color:r})},r.var))})]},r.name))})]}),de(h,{sx:{pt:4,borderTop:"1px solid var(--Border)"},children:[se(C,{variant:"h5",sx:{mb:2,fontWeight:700},children:"How to Use"}),de(k,{spacing:2,children:[de(h,{children:[se(C,{variant:"h6",sx:{fontWeight:600,mb:1},children:"Static Colors"}),de(C,{variant:"body2",sx:{color:"var(--Text-Secondary)"},children:["Use brand colors (",se("code",{style:{backgroundColor:"var(--Container)",padding:"2px 4px",borderRadius:"4px"},children:"--Primary-Color-11"}),","," ",se("code",{style:{backgroundColor:"var(--Container)",padding:"2px 4px",borderRadius:"4px"},children:"--Secondary-Color-11"}),","," ",se("code",{style:{backgroundColor:"var(--Container)",padding:"2px 4px",borderRadius:"4px"},children:"--Tertiary-Color-11"}),") for brand elements that should never change."]})]}),de(h,{children:[se(C,{variant:"h6",sx:{fontWeight:600,mb:1},children:"Dynamic Colors"}),se(C,{variant:"body2",sx:{color:"var(--Text-Secondary)"},children:"Use dynamic color variables for all UI elements. They will automatically update when users change Mode, Background, or Surface settings."})]}),de(h,{children:[se(C,{variant:"h6",sx:{fontWeight:600,mb:1},children:"Example Usage"}),se(h,{component:"pre",sx:{backgroundColor:"var(--Container)",p:2,borderRadius:"8px",overflow:"auto",fontSize:"12px",border:"1px solid var(--Border)",color:"var(--Text)"},children:"/* Dynamic - updates with theme changes */\ncolor: var(--Text);\nbackgroundColor: var(--Background);\nborderColor: var(--Border);\n\n/* Static - brand colors stay the same */\naccentColor: var(--Primary-Color-11);"})]})]})]})]})}function jo(){const e=({name:e,varName:r,baseValue:t})=>se(h,{sx:{mb:2},children:de(h,{sx:{display:"flex",alignItems:"center",gap:2,mb:1},children:[se(h,{"aria-hidden":"true",sx:{width:`var(${r})`,minWidth:20,height:24,backgroundColor:"var(--Buttons-Primary-Button)",borderRadius:.5,border:"1px solid var(--Border)"}}),de(k,{spacing:.5,children:[se(C,{variant:"subtitle2",sx:{fontWeight:600},children:e}),se(C,{variant:"caption",sx:{color:"var(--Text-Secondary)"},children:r}),de(C,{variant:"caption",sx:{color:"var(--Text-Secondary)"},children:["Base: ",t," (with cognitive multiplier)"]})]})]})}),r=({name:e,varName:r,value:t})=>de(h,{sx:{mb:2},children:[se(h,{"aria-hidden":"true",sx:{width:100,height:t,backgroundColor:"var(--Buttons-Primary-Button)",borderRadius:1,border:"1px solid var(--Border)",mb:1}}),se(C,{variant:"subtitle2",sx:{fontWeight:600},children:e}),se(C,{variant:"caption",sx:{color:"var(--Text-Secondary)",display:"block"},children:r}),se(C,{variant:"caption",sx:{color:"var(--Text-Secondary)"},children:t})]});return de(k,{spacing:3,sx:{p:2},children:[de("section",{children:[se(C,{variant:"h5",component:"h2",sx:{mb:2,fontWeight:700},children:"Spacing Scale"}),se(C,{variant:"body2",sx:{mb:3,color:"var(--Text-Secondary)"},children:"Spacing values are multiplied by the cognitive multiplier for accessibility. Each spacing value includes a visual reference and text label for clarity."}),se(k,{spacing:1,children:[{name:"Quarter",var:"--Spacing-Quarter",baseValue:"2px"},{name:"Half",var:"--Spacing-Half",baseValue:"4px"},{name:"1-and-Half",var:"--Spacing-1-and-Half",baseValue:"12px"},{name:"1",var:"--Spacing-1",baseValue:"8px"},{name:"2",var:"--Spacing-2",baseValue:"16px"},{name:"3",var:"--Spacing-3",baseValue:"24px"},{name:"4",var:"--Spacing-4",baseValue:"32px"},{name:"5",var:"--Spacing-5",baseValue:"40px"},{name:"6",var:"--Spacing-6",baseValue:"48px"},{name:"7",var:"--Spacing-7",baseValue:"56px"},{name:"8",var:"--Spacing-8",baseValue:"64px"},{name:"9",var:"--Spacing-9",baseValue:"72px"},{name:"10",var:"--Spacing-10",baseValue:"80px"}].map(r=>se(e,{name:r.name,varName:r.var,baseValue:r.baseValue},r.var))})]}),de("section",{children:[se(C,{variant:"h5",component:"h2",sx:{mb:2,fontWeight:700},children:"Sizing Scale"}),se(C,{variant:"body2",sx:{mb:3,color:"var(--Text-Secondary)"},children:"Fixed sizing values for components and layouts. Each size is labeled with its CSS variable and pixel value."}),se(T,{container:!0,spacing:3,children:[{name:"Quarter",var:"--Sizing-Quarter",value:"2px"},{name:"Half",var:"--Sizing-Half",value:"4px"},{name:"1-and-Half",var:"--Sizing-1-and-Half",value:"12px"},{name:"1",var:"--Sizing-1",value:"8px"},{name:"2",var:"--Sizing-2",value:"16px"},{name:"3",var:"--Sizing-3",value:"24px"},{name:"4",var:"--Sizing-4",value:"32px"},{name:"5",var:"--Sizing-5",value:"40px"},{name:"6",var:"--Sizing-6",value:"48px"},{name:"7",var:"--Sizing-7",value:"56px"},{name:"8",var:"--Sizing-8",value:"64px"},{name:"9",var:"--Sizing-9",value:"72px"},{name:"10",var:"--Sizing-10",value:"80px"},{name:"11",var:"--Sizing-11",value:"88px"},{name:"12",var:"--Sizing-12",value:"96px"},{name:"13",var:"--Sizing-13",value:"104px"},{name:"14",var:"--Sizing-14",value:"112px"},{name:"15",var:"--Sizing-15",value:"160px"},{name:"16",var:"--Sizing-16",value:"240px"},{name:"17",var:"--Sizing-17",value:"320px"},{name:"18",var:"--Sizing-18",value:"480px"}].map(e=>se(T,{item:!0,xs:12,sm:6,md:4,lg:3,children:se(r,{name:e.name,varName:e.var,value:e.value})},e.var))})]}),de("section",{children:[se(C,{variant:"h5",component:"h2",sx:{mb:2,fontWeight:700},children:"Negative Sizing"}),se(C,{variant:"body2",sx:{mb:3,color:"var(--Text-Secondary)"},children:"Negative values for margins and offsets. Use these to reduce or remove default spacing when needed."}),se(T,{container:!0,spacing:3,children:[{name:"Negative-Quarter",var:"--Sizing-Negative-Quarter",value:"-2px"},{name:"Negative-Half",var:"--Sizing-Negative-Half",value:"-4px"},{name:"Negative-1-and-Half",var:"--Sizing-Negative-1-and-Half",value:"-12px"},{name:"Negative-1",var:"--Sizing-Negative-1",value:"-8px"}].map(e=>se(T,{item:!0,xs:12,sm:6,md:4,lg:3,children:de(h,{children:[se(C,{variant:"subtitle2",sx:{fontWeight:600},children:e.name}),se(C,{variant:"caption",sx:{color:"var(--Text-Secondary)",display:"block"},children:e.var}),se(C,{variant:"caption",sx:{color:"var(--Text-Secondary)"},children:e.value})]})},e.var))})]}),de("section",{style:{paddingTop:24,borderTop:"1px solid var(--Border)"},children:[se(C,{variant:"h5",component:"h2",sx:{mb:2,fontWeight:700},children:"Container Padding"}),de(h,{sx:{p:"var(--Spacing-3)",backgroundColor:"var(--Container-Low)",border:"2px dashed var(--Buttons-Primary-Button)",borderRadius:1},children:[de(C,{variant:"body2",children:["Default container padding: ",se("strong",{children:"var(--Spacing-3)"})," = 24px"]}),se(C,{variant:"caption",sx:{color:"var(--Text-Secondary)",display:"block",mt:1},children:"Use this variable for consistent padding around main content areas."})]})]}),de("section",{style:{paddingTop:24,borderTop:"1px solid var(--Border)"},children:[se(C,{variant:"h5",component:"h2",sx:{mb:3,fontWeight:700},children:"Practical Examples"}),de("article",{children:[se(C,{variant:"h6",component:"h3",sx:{mb:2,fontWeight:600},children:"Padding Examples"}),se(C,{variant:"caption",sx:{color:"var(--Text-Secondary)",mb:2,display:"block"},children:"Different padding values create different visual breathing room."}),se(T,{container:!0,spacing:2,sx:{mb:4},children:["var(--Spacing-1)","var(--Spacing-2)","var(--Spacing-3)","var(--Spacing-4)"].map(e=>se(T,{item:!0,xs:12,sm:6,children:de(h,{sx:{p:e,backgroundColor:"var(--Container)",border:"1px solid var(--Border)",borderRadius:1},children:[de(C,{variant:"subtitle2",children:["Padding: ",e]}),se(C,{variant:"caption",sx:{display:"block",mt:1,color:"var(--Text-Secondary)"},children:"Content with spacing applied"})]})},e))})]}),de("article",{children:[se(C,{variant:"h6",component:"h3",sx:{mb:2,fontWeight:600},children:"Gap Examples"}),se(C,{variant:"caption",sx:{color:"var(--Text-Secondary)",mb:2,display:"block"},children:"Gap controls spacing between flex/grid children without adding extra elements."}),se(k,{spacing:3,children:["var(--Spacing-1)","var(--Spacing-2)","var(--Spacing-3)"].map(e=>de(h,{children:[se(k,{direction:"row",spacing:e,sx:{mb:1},children:[1,2,3].map(e=>se(h,{"aria-hidden":"true",sx:{width:60,height:60,backgroundColor:"var(--Buttons-Primary-Button)",borderRadius:1,flexShrink:0}},e))}),de(C,{variant:"caption",sx:{color:"var(--Text-Secondary)"},children:["Gap: ",e]})]},e))})]})]}),de(h,{role:"note",sx:{p:2,backgroundColor:"var(--Container-Low)",borderRadius:1,borderLeft:"4px solid var(--Buttons-Primary-Button)",mt:3},children:[se(C,{variant:"subtitle2",sx:{fontWeight:600,mb:1},children:"✓ Accessibility Best Practices Used"}),de("ul",{style:{margin:"0.5rem 0",paddingLeft:"1.5rem"},children:[se("li",{children:de(C,{variant:"caption",children:[se("strong",{children:'aria-hidden="true"'})," on purely decorative visual elements"]})}),se("li",{children:se(C,{variant:"caption",children:"All spacing information conveyed through text labels and values"})}),se("li",{children:de(C,{variant:"caption",children:["No empty decorative ",se("code",{children:"<div>"})," elements in DOM"]})}),se("li",{children:de(C,{variant:"caption",children:["Semantic HTML: ",se("code",{children:"<section>"})," and ",se("code",{children:"<article>"})," for structure"]})}),se("li",{children:se(C,{variant:"caption",children:"CSS-based spacing (padding/margin) for actual layout, not decorative divs"})}),se("li",{children:se(C,{variant:"caption",children:"Full keyboard navigation and screen reader support"})})]})]})]})}Object.entries({Display:["display-large","display-medium","display-small"],Headings:["h1","h2","h3","h4","h5","h6"],Subtitle:["subtitle-small","subtitle","subtitle-large"],Body:["body-small","body-small-semibold","body","body-semibold","body-large","body-large-semibold"],Label:["label","label-small","label-large"],Caption:["caption","caption-bold"],Legal:["legal","legal-semibold"],Eyebrow:["eyebrow-small","eyebrow","eyebrow-large"],Button:["button-extra-small","button-small","button"],Number:["number-large","number-medium","number-small"]}).map(([e,r])=>({label:e,options:r.map(e=>({value:e,label:Qo[e]}))}));const Go=["default","primary","secondary","tertiary","neutral","info","success","warning","error"],Uo=e=>e.charAt(0).toUpperCase()+e.slice(1);function Xo(e){const r=Uo(e);return{type:"outline",color:r,trackOff:"var(--Background)",trackOffBorder:"var(--Border-Variant)",trackOn:"var(--Buttons-"+r+"-Button)",trackOnBorder:"var(--Buttons-"+r+"-Border)",dotOff:"var(--Quiet)",dotOn:"var(--Buttons-"+r+"-Text)",iconOff:"var(--Background)",iconOn:"var(--Buttons-"+r+"-Button)"}}function Yo(e){const r=Uo(e);return{type:"light",color:r,trackOff:"var(--Border-Variant)",trackOffBorder:"transparent",trackOn:"var(--"+r+"-Color-11)",trackOnBorder:"var(--Buttons-"+r+"-Border)",dotOff:"var(--Quiet)",dotOn:"var(--Buttons-"+r+"-Border)",iconOff:"var(--Border-Variant)",iconOn:"var(--"+r+"-Color-11)",dataTheme:r,dataSurface:"Surface-Brightest"}}const Zo={small:{trackW:28,trackH:16,dotRadius:"var(--Sizing-2, 16px)",icon:8},medium:{trackW:40,trackH:24,dotRadius:"var(--Sizing-2-and-Half, 20px)",icon:16},large:{trackW:56,trackH:32,dotRadius:"var(--Sizing-2-and-Half, 20px)",icon:16}};function qo({variant:e="default",size:r="medium",checked:t,defaultChecked:a,onChange:i,disabled:o=!1,label:n,labelPlacement:l="end",name:s,value:d,icon:c,iconOn:u,iconOff:h,className:p="",sx:m={},"aria-label":f,"aria-labelledby":g,...x}){const v=function(){const e={};return Go.forEach(r=>{e[r+"-outline"]=Xo(r),e[r+"-light"]=Yo(r)}),e.default={type:"themed",trackOff:"var(--Background)",trackOffBorder:"var(--Quiet)",trackOn:"var(--Buttons-Default-Button)",trackOnBorder:"var(--Buttons-Default-Border)",dotOff:"var(--Quiet)",dotOn:"var(--Buttons-Default-Text)",iconOff:"var(--Background)",iconOn:"var(--Buttons-Default-Button)"},e["default-outline"]={type:"themed",trackOff:"var(--Background)",trackOffBorder:"var(--Quiet)",trackOn:"var(--Buttons-Default-Button)",trackOnBorder:"var(--Buttons-Default-Border)",dotOff:"var(--Quiet)",dotOn:"var(--Buttons-Default-Text)",iconOff:"var(--Background)",iconOn:"var(--Buttons-Default-Button)"},e.outline={type:"themed",trackOff:"var(--Background)",trackOffBorder:"var(--Quiet)",trackOn:"var(--Buttons-Default-Button)",trackOnBorder:"var(--Buttons-Default-Border)",dotOff:"var(--Quiet)",dotOn:"var(--Buttons-Default-Text)",iconOff:"var(--Background)",iconOn:"var(--Buttons-Default-Button)"},e.primary=Xo("primary"),e.light=Yo("primary"),e}(),y=v[e]||v.default,S=Zo[r]||Zo.medium,k="small"===r?_t:ta,B=S.trackH-4,w=Math.max(24,S.trackW),C=Math.max(24,S.trackH),T=(C-S.trackH)/2,z={width:B,height:B,borderRadius:S.dotRadius,boxShadow:"none",border:"none",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color var(--Motion-Duration-Fast, 150ms) var(--Motion-Easing-Standard, cubic-bezier(0.2, 0, 0, 1))","& > *":{width:S.icon,height:S.icon,display:"block"}},I={width:S.trackW,minWidth:24,height:C,minHeight:24,padding:0,overflow:"visible",opacity:o?"var(--Disabled, 0.38)":1,"& .MuiSwitch-switchBase":{position:"absolute",top:0,left:0,width:"100%",height:"100%",display:"flex",justifyContent:"flex-start",alignItems:"center",paddingTop:0,paddingBottom:0,paddingLeft:"2px",paddingRight:w-S.trackW+2+"px",color:"transparent",transition:"justify-content var(--Motion-Duration-Instant, 100ms) var(--Motion-Easing-Standard, cubic-bezier(0.2, 0, 0, 1))",transform:"none","& .MuiSwitch-input":{left:0,top:0,width:"100%",height:"100%",margin:0},"& .MuiSwitch-thumb":{...z,backgroundColor:y.dotOff,color:y.iconOff},"&.Mui-checked":{justifyContent:"flex-end",transform:"none","& .MuiSwitch-thumb":{...z,backgroundColor:y.dotOn,color:y.iconOn},"& + .MuiSwitch-track":{backgroundColor:y.trackOn,borderColor:y.trackOnBorder,opacity:1}},"&:hover, &.Mui-checked:hover":{backgroundColor:"transparent"},"&:hover + .MuiSwitch-track":{boxShadow:Ja},"&:active + .MuiSwitch-track":{boxShadow:qa},"&.Mui-focusVisible + .MuiSwitch-track":{outline:"1px solid var(--Focus-Visible)",outlineOffset:"2px"},"&.Mui-disabled + .MuiSwitch-track":{opacity:1}},"& .MuiSwitch-track":{width:S.trackW,height:S.trackH,borderRadius:"var(--Sizing-3, 24px)",backgroundColor:y.trackOff,border:"1px solid "+y.trackOffBorder,boxSizing:"border-box",opacity:1,position:"absolute",top:T,left:0,transition:"background-color var(--Motion-Duration-Fast, 150ms) var(--Motion-Easing-Standard, cubic-bezier(0.2, 0, 0, 1)), border-color var(--Motion-Duration-Fast, 150ms) var(--Motion-Easing-Standard, cubic-bezier(0.2, 0, 0, 1)), box-shadow var(--Motion-Duration-Fast, 150ms) var(--Motion-Easing-Standard, cubic-bezier(0.2, 0, 0, 1))"},...m},R=e.includes("-light")||"light"===e,W=void 0!==h?h:c,D=void 0!==u?u:c,L=e=>se("span",{className:"MuiSwitch-thumb",children:e}),F=se(A,{...void 0!==W||void 0!==D?{icon:L(W),checkedIcon:L(D)}:{},checked:t,defaultChecked:a,onChange:i,disabled:o,name:s,value:d,slotProps:{input:{...f?{"aria-label":f}:{},...g?{"aria-labelledby":g}:{}}},className:"switch-"+e+" "+p,sx:I,disableRipple:!0,...R&&y.dataTheme?{"data-theme":y.dataTheme,"data-surface":y.dataSurface||"Surface-Dim"}:{},...x});return n?se(b,{control:F,label:se(k,{component:"span",sx:{color:o?"var(--Text-Quiet)":"var(--Text)",fontSize:"small"===r?"13px":"15px",fontWeight:500,opacity:o?.6:1},children:n}),labelPlacement:l,sx:{gap:"8px",marginLeft:0,marginRight:0}}):F}const Jo=qo,Ko=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",$o={default:"Default",quiet:"Quiet",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},_o=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}],en=["filled","outlined","rounded","twotone","sharp"],rn={filled:"Filled",outlined:"Outlined",rounded:"Rounded",twotone:"Two Tone",sharp:"Sharp"},tn={Home:{filled:ke,outlined:De,rounded:Ve,twotone:er,sharp:hr},Favorite:{filled:Se,outlined:Le,rounded:je,twotone:rr,sharp:pr},Delete:{filled:Be,outlined:Fe,rounded:Ge,twotone:tr,sharp:mr},Settings:{filled:we,outlined:He,rounded:Ue,twotone:ar,sharp:fr},Search:{filled:Ce,outlined:Ce,rounded:Xe,twotone:ir,sharp:gr},Star:{filled:Te,outlined:Pe,rounded:Ye,twotone:or,sharp:xr},Person:{filled:pe,outlined:Me,rounded:Ze,twotone:nr,sharp:br},Notifications:{filled:ze,outlined:Ee,rounded:qe,twotone:lr,sharp:vr},Visibility:{filled:Ae,outlined:Oe,rounded:Je,twotone:sr,sharp:yr},ShoppingCart:{filled:Ie,outlined:Ne,rounded:Ke,twotone:dr,sharp:Sr},Lock:{filled:Re,outlined:Qe,rounded:$e,twotone:cr,sharp:kr},Info:{filled:We,outlined:be,rounded:_e,twotone:ur,sharp:Br}};function an({ratio:e,threshold:r}){if(!e)return se(ca,{style:{color:"var(--Text-Quiet)"},children:"--"});const t=parseFloat(e)>=r;return de(h,{sx:{display:"inline-flex",alignItems:"center",gap:.5},children:[de(h,{sx:{px:1,py:.25,borderRadius:"4px",fontSize:"11px",fontWeight:700,backgroundColor:t?"var(--Tags-Success-BG)":"var(--Tags-Error-BG)",color:t?"var(--Tags-Success-Text)":"var(--Tags-Error-Text)"},children:[e,":1"]}),se(ca,{style:{color:t?"var(--Tags-Success-Text)":"var(--Tags-Error-Text)"},children:t?"Pass":"Fail"})]})}function on({label:e,ratio:r,threshold:t,note:a}){return de(h,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(h,{sx:{flex:1},children:[se(_t,{style:{color:"var(--Text)"},children:e}),a&&se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:a})]}),se(an,{ratio:r,threshold:t})]})}function nn({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"primary":"primary-outline",size:"small",onClick:t,children:e})}function ln(){const[e,t]=r("filled"),[a,i]=r("default"),[n,l]=r("medium"),[s,d]=r("40"),[c,u]=r(!1),[p,m]=r("Home"),[f,g]=r(""),[x,b]=r({}),v=$o[a]||"Default",y="twotone"===e,S="custom"===n?(parseInt(s,10)||40)+"px":{xs:"12px",small:"16px",medium:"24px",large:"36px"}[n]||"24px",B=function(e,r){return tn[e]?.[r]||tn[e]?.filled||ke}(p,e),w=function(e){return{outlined:"Outlined",rounded:"Rounded",twotone:"TwoTone",sharp:"Sharp"}[e]||""}(e),C=p+w+"Icon",z=f.trim().length>0,A="<Icon>\n <"+C+' />\n</Icon>\n{/* aria-hidden="true" by default */}',I='<Icon aria-label="'+(z?f.trim():p+" icon")+'">\n <'+C+' />\n</Icon>\n{/* role="img" added automatically */}';return o(()=>{b({background:No("--Background"),iconColor:No("--Icons-"+v),iconVariant:No("--Icons-Variant-"+v)})},[a,v]),de(h,{sx:{pb:8},children:[se(Vt,{children:"Icon"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(h,{sx:{p:4,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:200,backgroundColor:"var(--Background)",borderBottom:"1px solid var(--Border)",gap:2},children:se(Fa,{color:a,size:n,fontSize:"custom"===n?parseInt(s,10)||40:void 0,disabled:c,twoTone:y,"aria-label":z?f.trim():void 0,children:se(B,{})})}),se(Ho,{code:(()=>{const e=[];"default"!==a&&e.push('color="'+a+'"'),"custom"===n?(e.push('size="custom"'),e.push("fontSize={"+(parseInt(s,10)||40)+"}")):"medium"!==n&&e.push('size="'+n+'"'),y&&e.push("twoTone"),c&&e.push("disabled"),z&&e.push('aria-label="'+f.trim()+'"');const r=e.length?" "+e.join(" "):"";return"import "+C+" from '@mui/icons-material/"+p+(w||"")+"';\n\n<Icon"+r+">\n <"+C+" />\n</Icon>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"ICON"}),se(h,{component:"input",type:"text",value:p,onChange:e=>m(e.target.value),placeholder:"e.g. Home, Favorite, Delete",sx:{width:"100%",padding:"6px 10px",fontSize:"13px",fontFamily:"inherit",border:"1px solid var(--Border)",borderRadius:"4px",backgroundColor:"var(--Background)",color:"var(--Text)",boxSizing:"border-box","&:focus":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"1px",borderColor:"var(--Focus-Visible)"}}}),de(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:["Enter a MUI icon name."," ",se(h,{component:"a",href:"https://mui.com/material-ui/material-icons/",target:"_blank",rel:"noopener noreferrer",sx:{color:"var(--Text-Primary)",textDecoration:"underline","&:hover":{color:"var(--Header-Primary)"}},children:"Browse MUI Icons ↗"})]})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:en.map(r=>se(nn,{label:rn[r],selected:e===r,onClick:()=>t(r)},r))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{spacing:1.5,children:_o.map(e=>de(h,{children:[se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:e.label}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:e.colors.map(e=>{const r=$o[e],t=a===e;return se(h,{component:"button",onClick:()=>i(e),"aria-label":"Select "+Ko(e),"aria-pressed":t,title:Ko(e),sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Icons-"+r+")",border:t?"2px solid var(--Text)":"1px solid var(--Border)",outline:t?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:t&&se(he,{sx:{fontSize:16,color:"var(--Background)",pointerEvents:"none"}})},e)})})]},e.label))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:["xs","small","medium","large","custom"].map(e=>se(nn,{label:"xs"===e?"XS":Ko(e),selected:n===e,onClick:()=>l(e)},e))}),"custom"===n&&de(h,{sx:{display:"flex",alignItems:"center",gap:1,mt:1.5},children:[se(h,{component:"input",type:"number",value:s,onChange:e=>d(e.target.value),"aria-label":"Custom font size in pixels",sx:{width:72,padding:"4px 8px",fontSize:"13px",fontFamily:"inherit",border:"1px solid var(--Border)",borderRadius:"4px",backgroundColor:"var(--Background)",color:"var(--Text)",outline:"none","&:focus":{borderColor:"var(--Focus-Visible)"}}}),se(ca,{style:{color:"var(--Text-Quiet)"},children:"px"})]})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"ARIA LABEL"}),se(h,{component:"input",type:"text",value:f,onChange:e=>g(e.target.value),placeholder:"Leave empty for decorative (aria-hidden)",sx:{width:"100%",padding:"6px 10px",fontSize:"13px",fontFamily:"inherit",border:"1px solid var(--Border)",borderRadius:"4px",backgroundColor:"var(--Background)",color:"var(--Text)",boxSizing:"border-box","&:focus":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"1px",borderColor:"var(--Focus-Visible)"}}}),se(ca,{style:{color:z?"var(--Tags-Success-Text)":"var(--Text-Quiet)",display:"block",marginTop:6},children:z?'✓ Meaningful — role="img" aria-label="'+f.trim()+'"':'Decorative — aria-hidden="true" (invisible to screen readers)'})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Disabled"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Reduces opacity to 0.38"})]}),se(qo,{checked:c,onChange:e=>u(e.target.checked),size:"small","aria-label":"Toggle disabled"})]})]})}),se(ro,{value:1,children:de(h,{sx:{p:3},children:[de(_t,{color:"quiet",style:{marginBottom:24},children:[rn[e]," / ",Ko(a)," / ","custom"===n?s+"px":n,z?" / meaningful":" / decorative"]}),de(k,{spacing:3,children:[de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"Icon Contrast (WCAG 1.4.11 — 3:1)"}),se(_t,{color:"quiet",style:{marginBottom:16},children:"Non-text elements must contrast 3:1 against the page background."}),se(on,{label:"var(--Icons-"+v+") vs. var(--Background)",ratio:Oo(x.iconColor,x.background),threshold:3,note:C+" at "+S+" in "+Ko(a)+" color"}),y&&se(on,{label:"var(--Icons-Variant-"+v+") vs. var(--Background)",ratio:Oo(x.iconVariant,x.background),threshold:3,note:"Two-tone secondary fill — must also meet 3:1"})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),de(k,{spacing:0,children:[de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)",backgroundColor:z?"var(--Tags-Success-BG, rgba(0,200,0,0.05))":"transparent",px:1,borderRadius:"4px"},children:[de(_t,{style:{fontWeight:600},children:["Current icon — ",z?"meaningful ✓":"decorative"]}),se(h,{component:"pre",sx:{fontFamily:"monospace",fontSize:"11px",color:"var(--Text-Quiet)",mt:.5,whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0},children:z?I:A})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Decorative (no aria-label):"}),se(ca,{style:{color:"var(--Text-Quiet)"},children:'aria-hidden="true" is applied automatically. The icon is invisible to screen readers. Use this when the icon is purely visual — e.g. a decorative bullet or inline illustration.'}),se(h,{component:"pre",sx:{fontFamily:"monospace",fontSize:"11px",color:"var(--Text-Quiet)",mt:.5,whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0},children:A})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Meaningful (with aria-label):"}),se(ca,{style:{color:"var(--Text-Quiet)"},children:'role="img" is added automatically. The label is announced by screen readers. Use this when the icon conveys information that is not present in surrounding text.'}),se(h,{component:"pre",sx:{fontFamily:"monospace",fontSize:"11px",color:"var(--Text-Quiet)",mt:.5,whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0},children:I})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(_t,{children:["Disabled state",c?" ← current":"",":"]}),se(ca,{style:{color:"var(--Text-Quiet)"},children:"Opacity 0.38 — visual cue only. To disable an action, disable the wrapping interactive element (button, link), not the icon itself."})]}),y&&de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(_t,{children:["Two-tone",y?" ← current":"",":"]}),de(ca,{style:{color:"var(--Text-Quiet)"},children:["Secondary fill uses var(--Icons-Variant-",v,"). Both the primary and secondary fills must meet 3:1 contrast independently."]})]}),de(h,{sx:{py:1.5},children:[de(_t,{children:["Touch target — ",S," icon","small"===n?" ⚠":" ✓",":"]}),se(ca,{style:{color:"var(--Text-Quiet)"},children:"small"===n?"Small icons (20px) need a 24px minimum target area around them (WCAG 2.5.5). Wrap in a button with padding.":"Icon is "+S+" — meets 24px minimum. Ensure the wrapping interactive element also meets 24×24px."})]})]})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"Size Reference"}),se(k,{spacing:0,children:[{label:"Small",s:"small",px:"20px",note:"Inline text, compact UI"},{label:"Medium",s:"medium",px:"24px",note:"Standard UI — default"},{label:"Large",s:"large",px:"36px",note:"Emphasis, empty states, hero areas"},{label:"Custom",s:"custom",px:"any",note:"Ensure 24×24px minimum touch target (WCAG 2.5.5)"}].map(({label:e,s:r,px:t,note:a},i,o)=>de(h,{sx:{py:1.5,borderBottom:i<o.length-1?"1px solid var(--Border)":"none",display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[de(h,{children:[de(_t,{children:[e," — ",t]}),se(ca,{style:{color:"var(--Text-Quiet)"},children:a})]}),n===r&&se(h,{sx:{px:1,py:.25,borderRadius:"4px",fontSize:"11px",fontWeight:700,backgroundColor:"var(--Tags-Success-BG)",color:"var(--Tags-Success-Text)"},children:"current"})]},e))})]})]})]})})]})})})]})]})}const sn={default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},dn={small:{size:32,iconSize:"16px",borderRadius:"8px"},medium:{size:40,iconSize:"20px",borderRadius:"10px"},large:{size:48,iconSize:"24px",borderRadius:"12px"}};function cn({children:e,color:r="primary",variant:t="solid",size:a="medium",className:i="",sx:o={},...n}){const l=dn[a]||dn.medium,s=sn[r]||sn.primary;let d,c;switch(t){case"light":d=s,c="Surface-Brightest";break;case"dark":d=s,c="Surface-Dimmest";break;default:d=s,c="Surface"}return se(h,{"data-theme":d,"data-surface":c,className:"icon-badge icon-badge-"+t+" icon-badge-"+a+" icon-badge-"+r+" "+i,sx:{width:l.size,height:l.size,borderRadius:l.borderRadius,backgroundColor:"var(--Background)",color:"var(--Text)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,"& svg":{width:l.iconSize,height:l.iconSize,fontSize:l.iconSize,color:"inherit",stroke:"currentColor"},...o},...n,children:e})}function un({variant:t="outlined",color:a="default",size:i="medium",disabled:o=!1,orientation:n="horizontal",spacing:l=0,fit:s,fullWidth:d=!1,equalWidth:c=!1,multiple:u=!1,value:p,defaultValue:m,onChange:f,children:g,className:x="",sx:b={},"aria-label":v,...y}){const[S,k]=r(m??(u?[]:null)),B=void 0!==p,w=B?p:S,C=u?Array.isArray(w)?w:null==w?[]:[w]:null,T="horizontal"===n,z=0===l,A="light"===t,I="ghost"===t,R=s??(d?"fill":c?"equal":"hug"),W="fill"===R,D="equal"===R&&T,L=(F=a).charAt(0).toUpperCase()+F.slice(1);var F;const H="var(--Buttons-"+L+"-Border)",P="var(--Buttons-"+L+"-Button)",M="var(--Buttons-"+L+"-Text)",E="default"===a?void 0:L,O=e.Children.toArray(g).filter(Boolean),N=O.length,Q=(e,r)=>t=>{const a=u?C.includes(e)?C.filter(r=>r!==e):[...C,e]:e;B||k(a),f?.(a,t),r?.(t)},V=O.map((r,t)=>{if(!e.isValidElement(r))return r;const n=0===t,l=t===N-1,s=r.props.value??t,d=(c=s,u?C.includes(c):w===c);var c;let p;if(z&&N>1){const e="var(--Style-Border-Radius)";p=T?n&&l?e:n?e+" 0 0 "+e:l?"0 "+e+" "+e+" 0":"0":n&&l?e:n?e+" "+e+" 0 0":l?"0 0 "+e+" "+e:"0"}const m={...z&&N>1?{borderRadius:p,...!n&&(T?{marginLeft:"calc(-1 * var(--Button-Border-Width))"}:{marginTop:"calc(-1 * var(--Button-Border-Width))"}),position:"relative","&:hover, &:focus-visible":{zIndex:1}}:{},transform:"none !important","&:hover, &:active, &:focus-visible":{transform:"none !important"},...d?{backgroundColor:P+" !important",color:M+" !important",borderColor:H+" !important","&:hover, &:active, &.Mui-focusVisible, &:focus-visible":{backgroundColor:P+" !important",color:M+" !important",borderColor:H+" !important"}}:{},...d?{}:{color:"var(--Quiet)",backgroundColor:"transparent","&:hover":{backgroundColor:"var(--Hover)",color:"var(--Text)",zIndex:1},"&:active":{backgroundColor:"var(--Pressed)",color:"var(--Text)"}},...I?{border:"none !important","&:hover":{border:"none !important"}}:{},"&:focus-visible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px",zIndex:2},...r.props.sx},f=e.cloneElement(r,{variant:r.props.variant??(I?"ghost":d?a:a+"-outline"),size:r.props.size??i,disabled:r.props.disabled??o,onClick:Q(s,r.props.onClick),"aria-pressed":d,sx:m});return A&&!d?se(h,{"data-theme":E,"data-surface":"Surface-Brightest",sx:{display:"contents"},children:f},t):e.cloneElement(f,{key:t})});return se(h,{role:"group","aria-label":v,className:"btn-group btn-group-"+t+" btn-group-"+a+" "+x,sx:{...D?{display:W?"grid":"inline-grid",gridAutoFlow:"column",gridAutoColumns:"1fr",justifyItems:"stretch",alignItems:"stretch",width:W?"100%":"fit-content"}:{display:W?"flex":"inline-flex",flexDirection:T?"row":"column",alignItems:"stretch",width:W?"100%":"auto"},gap:z?0:l,border:"none",borderRadius:"var(--Style-Border-Radius)",...b},...y,children:V})}const hn=["Link","Chip","Badge","Caption","Label","Tag","BodySmall","LegalSemibold","Legal","LabelSmall","LabelExtraSmall","EyebrowSmall","ButtonSmall"];function pn(r){let t=!1;return e.Children.forEach(r,r=>{(function(r){if(!e.isValidElement(r))return!1;const t=r.props||{};if("small"===t.size)return!0;if("small"===t["data-size"])return!0;if(24===t.height||24===t.minHeight)return!0;if("24px"===t.height||"24px"===t.minHeight)return!0;if(t.sx){const e=t.sx.minHeight||t.sx.height;if(24===e||"24px"===e)return!0}const a=r.type;if(a){const e=a.displayName||a.name||"";if(hn.some(r=>e.includes(r)))return!0}return!1})(r)&&(t=!0)}),t}function mn({children:e,gap:r,spacing:t,direction:a="column",enforceMinGap:i=!0,minGapToken:o="--min-stack-gap",divider:n,flexWrap:l,useFlexGap:d=!0,alignItems:c,justifyContent:u,sx:h={},className:p="",...m}){const f=void 0!==r?r:t,g=i&&pn(e),x=s(()=>{if(!g)return f;const e=function(e,r=8){return null==e?0:"number"==typeof e?e*r:"string"==typeof e?e.endsWith("px")?parseFloat(e):e.endsWith("rem")?parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize||"16"):parseFloat(e)*r||0:0}(f),r=function(e,r=8){if("undefined"==typeof window)return r;const t=getComputedStyle(document.documentElement).getPropertyValue(e).trim();return t?t.endsWith("rem")?parseFloat(t)*parseFloat(getComputedStyle(document.documentElement).fontSize):parseFloat(t)||r:r}(o,8);return e>=r?f:"var("+o+", "+r+"px)"},[g,f,o]);return se(k,{direction:a,spacing:d?void 0:x,gap:d?x:void 0,divider:n,flexWrap:l,useFlexGap:d,alignItems:c,justifyContent:u,className:"omni-stack"+(g?" omni-stack-min-gap-enforced":"")+(p?" "+p:""),sx:{...m["data-surface"]||m["data-theme"]?{background:"var(--Background)"}:{},boxSizing:"border-box",...g?{"&::before":{display:"none"}}:{},...h},"data-min-gap-enforced":g?"true":void 0,...m,children:e})}const fn=e=>se(mn,{direction:"row",alignItems:"center",...e}),gn=e=>se(mn,{direction:"column",...e}),xn=e=>se(mn,{direction:"column",alignItems:"center",justifyContent:"center",...e}),bn=e=>se(mn,{direction:"row",alignItems:"center",justifyContent:"space-between",...e}),vn=e=>se(mn,{direction:"row",flexWrap:"wrap",...e}),yn=({breakpoint:e="sm",...r})=>se(mn,{direction:{xs:"column",[e]:"row"},...r}),Sn=mn,kn=vn,Bn=e=>se(h,{sx:{borderBottom:"1px solid var(--Border)",width:"100%"},...e}),wn=({sx:e,...r})=>se(mn,{sx:{px:2,...e},...r}),Cn=({sx:e,...r})=>se(mn,{sx:{overflowY:"auto",...e},...r}),Tn={default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},zn={small:{gap:"8px",fontSize:"13px",padding:"var(--Card-Padding)"},medium:{gap:"12px",fontSize:"14px",padding:"var(--Card-Padding)"},large:{gap:"16px",fontSize:"16px",padding:"var(--Card-Padding)"}},An=l({variant:"default",color:"primary",size:"medium",orientation:"vertical"});function In({children:e,variant:r="solid",color:t="default",surface:a,size:i="medium",orientation:o="vertical",clickable:n=!1,selected:l=!1,elevated:s=!1,draggable:d=!1,onClick:c,href:u,className:p="",sx:m={},...f}){const g="default"===t,x=g?"":Tn[t],b=a||(g?"Container":"dark"===r?"Surface-Dimmest":"light"===r?"Surface-Brightest":"Surface"),v=zn[i]||zn.medium,y="horizontal"===o,S=!!d,k=n||!!c||!!u||l||S,B=u?"a":"div",w=l?`var(--Buttons-${(e=>e.charAt(0).toUpperCase()+e.slice(1))("default"===t?"Default":t)}-Border)`:"var(--Buttons-Default-Border)",C=k?l?`2px solid ${w}`:"1px solid var(--Buttons-Default-Border)":"1px solid var(--Border-Variant)",T=s?Ka:Ja,z=s?$a:Ka,A=s?Ja:qa;return se(An.Provider,{value:{variant:r,color:t,size:i,orientation:o},children:se(h,{component:B,href:u||void 0,onClick:k?c:void 0,role:k?"button":void 0,tabIndex:k?0:void 0,"aria-pressed":!!l||void 0,draggable:S||void 0,className:"card card-"+r+" card-"+i+" card-"+o+(k?" card-clickable":"")+(l?" card-selected":"")+(s?" card-elevated":"")+(S?" card-draggable":"")+" "+p,sx:{display:"flex",border:C,borderRadius:"var(--Card-Radius)",boxShadow:T,overflow:"hidden",textDecoration:"none",transition:"box-shadow 0.2s ease, border-color 0.2s ease, transform 0.1s ease",...k&&!S&&{cursor:"pointer","&:hover":{borderColor:"var(--Buttons-Default-Border)",boxShadow:z,transform:"translateY(-1px)"},"&:active":{transform:"translateY(0) scale(0.995)",boxShadow:A},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"3px",borderRadius:"calc(var(--Card-Radius) + 3px)"}},...S&&{cursor:"grab","&:hover":{borderColor:"var(--Buttons-Default-Border)",boxShadow:z},"&:active":{cursor:"grabbing",zIndex:10,boxShadow:$a,transform:"scale(1.02)",borderWidth:"2px",borderColor:"var(--Buttons-Primary-Border)"},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"3px"}},...m},onKeyDown:k?e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),c?.())}:void 0,...f,children:se(h,{"data-theme":x||void 0,"data-surface":b,sx:{display:"flex",flexDirection:y?"row":"column",gap:v.gap,padding:v.padding,backgroundColor:"var(--Background)",color:"var(--Text)",fontSize:v.fontSize,fontFamily:"inherit",borderRadius:"inherit",position:"relative",flex:1,minWidth:0,overflow:"hidden"},children:e})})})}function Rn({children:e,className:r="",sx:t={},...a}){const{size:i}=n(An);return se(h,{className:"card-content "+r,sx:{display:"flex",flexDirection:"column",gap:(zn[i]||zn.medium).gap,flex:1,minWidth:0,...t},...a,children:e})}const Wn=e=>se(In,{clickable:!0,selected:e.selected,...e}),Dn=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",Ln=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary"]},{label:"State",colors:["info","success","warning","error"]}],Fn=[ke,wr,fe,Te,Cr,Tr];function Hn(){const[e,t]=r("primary"),[a,i]=r("solid"),[o,n]=r("medium"),l=Fn[0];return de(gn,{spacing:4,style:{paddingBottom:64},children:[se(Vt,{children:"Icon Badge"}),de("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24},children:[se(In,{padding:"medium",children:de(gn,{spacing:4,alignItems:"center",children:[se("div",{style:{padding:40},children:se(cn,{color:e,variant:a,size:o,children:se(l,{})})}),se(fn,{spacing:4,alignItems:"flex-end",children:["small","medium","large"].map(r=>de(gn,{spacing:1,alignItems:"center",children:[se(cn,{color:e,variant:a,size:r,children:se(l,{})}),se(_t,{style:{color:"var(--Quiet)"},children:Dn(r)})]},r))}),de(gn,{spacing:1,alignItems:"center",children:[se(_t,{style:{color:"var(--Quiet)",fontWeight:600,fontSize:"0.7rem"},children:"Variants"}),se(fn,{spacing:3,children:["solid","light","dark"].map(r=>de(gn,{spacing:1,alignItems:"center",children:[se(cn,{color:e,variant:r,size:"medium",children:se(l,{})}),se(_t,{style:{color:"var(--Quiet)",fontSize:"0.65rem"},children:Dn(r)})]},r))})]}),de(gn,{spacing:1,alignItems:"center",children:[se(_t,{style:{color:"var(--Quiet)",fontWeight:600,fontSize:"0.7rem"},children:"All Colors"}),se(fn,{spacing:2,style:{flexWrap:"wrap",justifyContent:"center"},children:Ln.flatMap(e=>e.colors).map(e=>de(gn,{spacing:0,alignItems:"center",children:[se(cn,{color:e,variant:a,size:"small",children:se(l,{})}),se(_t,{style:{color:"var(--Quiet)",fontSize:"0.55rem"},children:Dn(e)})]},e))})]})]})}),se(In,{padding:"medium",children:de(gn,{spacing:4,children:[se(Vt,{style:{fontSize:"1rem"},children:"Playground"}),de(gn,{spacing:2,children:[se(ma,{children:"Color"}),Ln.map(r=>de(gn,{spacing:1,children:[se(_t,{style:{color:"var(--Quiet)",fontWeight:600,fontSize:"0.7rem"},children:r.label}),se(fn,{spacing:1,children:r.colors.map(r=>se(bi,{variant:e===r?"default":"outline",size:"small",onClick:()=>t(r),children:Dn(r)},r))})]},r.label))]}),de(gn,{spacing:1,children:[se(ma,{children:"Variant"}),se(un,{size:"small",children:["solid","light","dark"].map(e=>se(bi,{variant:a===e?"default":"outline",size:"small",onClick:()=>i(e),children:Dn(e)},e))})]}),de(gn,{spacing:1,children:[se(ma,{children:"Size"}),se(un,{size:"small",children:["small","medium","large"].map(e=>se(bi,{variant:o===e?"default":"outline",size:"small",onClick:()=>n(e),children:Dn(e)},e))})]}),de(gn,{spacing:0,children:[de(_t,{style:{color:"var(--Quiet)"},children:["data-theme: ",Dn(e),"light"===a?"-Light":""]}),de(_t,{style:{color:"var(--Quiet)"},children:["data-surface: ","dark"===a?"Surface-Dimmest":"Surface"]}),se(_t,{style:{color:"var(--Quiet)"},children:"bg: var(--Background)"}),se(_t,{style:{color:"var(--Quiet)"},children:"icon: var(--Text)"})]})]})})]})]})}const Pn={primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},Mn={small:{size:32,iconSize:16,fontSize:"13px",px:12,gap:6},medium:{size:48,iconSize:24,fontSize:"14px",px:16,gap:8},large:{size:56,iconSize:36,fontSize:"15px",px:20,gap:10}};function En({children:e,icon:r,label:t,variant:a="solid",color:i="primary",size:o="medium",extended:n=!1,animate:l=!1,disabled:s=!1,onClick:d,ariaLabel:c,className:u="",sx:p={},...m}){const f=function(e,r){const t=Pn[r]||"Primary";return"light"===e?{bg:"var(--Buttons-"+t+"-Light-Button)",text:"var(--Buttons-"+t+"-Light-Text)",border:"var(--Buttons-"+t+"-Light-Border)",hover:"var(--Buttons-"+t+"-Light-Hover)",active:"var(--Buttons-"+t+"-Light-Pressed)"}:{bg:"var(--Buttons-"+t+"-Button)",text:"var(--Buttons-"+t+"-Text)",border:"var(--Buttons-"+t+"-Border)",hover:"var(--Buttons-"+t+"-Hover)",active:"var(--Buttons-"+t+"-Pressed)"}}(a,i),g=Mn[o]||Mn.medium,x=r||e||se(zr,{sx:{fontSize:g.iconSize}}),b=c||t||"Action";return de(ce,{children:[l&&se("style",{children:"\n@keyframes fab-pulse {\n 0% { box-shadow: 0 0 0 0 rgba(var(--pulse-rgb, 0,0,0), 0.4); }\n 70% { box-shadow: 0 0 0 12px rgba(var(--pulse-rgb, 0,0,0), 0); }\n 100% { box-shadow: 0 0 0 0 rgba(var(--pulse-rgb, 0,0,0), 0); }\n}\n"}),de(h,{component:"button",type:"button",role:"button","aria-label":b,onClick:d,disabled:s,className:"fab fab-"+a+" fab-"+i+" fab-"+o+(n?" fab-extended":"")+(l?" fab-animate":"")+(s?" fab-disabled":"")+(u?" "+u:""),sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:n?g.gap+"px":0,...n?{height:g.size+"px",borderRadius:g.size/2+"px",px:g.px+"px"}:{width:g.size+"px",height:g.size+"px",borderRadius:"50%"},backgroundColor:f.bg,color:f.text,border:"var(--Button-Border-Width) solid "+f.border,"--_height":g.size+"px","--_bevel":"min(calc(var(--Button-Bevel) * var(--_height) / 100), calc(var(--_height) / 5))",boxShadow:`${ii(i)}, ${Ka}`,fontSize:g.fontSize,fontFamily:"inherit",fontWeight:600,cursor:s?"not-allowed":"pointer",opacity:s?.5:1,outline:"none",flexShrink:0,transition:"background-color 0.15s ease, box-shadow 0.2s ease, transform 0.1s ease","&:hover":s?{}:{backgroundColor:f.hover,boxShadow:`${ii(i)}, ${$a}`},"&:active":s?{}:{backgroundColor:f.active,transform:"scale(0.96)",boxShadow:ii(i)},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"2px"},...l&&!s&&{animation:"fab-pulse 2s infinite"},...p},...m,children:[se(h,{sx:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:g.iconSize+"px",color:"inherit","& .MuiSvgIcon-root":{fontSize:"inherit",color:"inherit"}},children:x}),n&&t&&se(h,{component:"span",sx:{whiteSpace:"nowrap",lineHeight:1},children:t})]})]})}const On=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",Nn=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}],Qn={default:"Tertiary",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"};function Vn({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function jn({color:e,selected:r,onClick:t}){const a=Qn[e]||"Primary";return se(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+On(e),"aria-pressed":r,title:On(e),sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&se(he,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function Gn({value:e,onChange:r,placeholder:t,label:a}){return de(h,{children:[a&&se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4},children:a}),se(h,{component:"input",type:"text",value:e,onChange:e=>r(e.target.value),placeholder:t,sx:{width:"100%",padding:"6px 10px",fontSize:"13px",fontFamily:"inherit",border:"1px solid var(--Border)",borderRadius:"4px",backgroundColor:"var(--Background)",color:"var(--Text)",outline:"none","&:focus":{borderColor:"var(--Focus-Visible)"}}})]})}function Un(){const[e,t]=r("default"),[a,i]=r("medium"),[o,n]=r("Add"),[l,s]=r(!1),[d,c]=r("Create"),[u,p]=r(!1),[m,f]=r(!1),[g,x]=r(null),[b,v]=r("Surface"),y="default"===e?"tertiary":e;return de(h,{sx:{pb:8},children:[se(Vt,{children:"Floating Action Button"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{theme:g,children:se(En,{color:y,size:a,icon:(()=>{const e=Ar[o]||Ar.Add;return se(Fa,{size:"medium",children:se(e,{})})})(),extended:l,label:d,animate:u,disabled:m,ariaLabel:l?d:o})}),se(Ho,{code:(()=>{const r=[];return"default"!==e&&r.push('color="'+e+'"'),"medium"!==a&&r.push('size="'+a+'"'),r.push("icon={<"+o+"Icon />}"),l&&(r.push("extended"),r.push('label="'+d+'"')),u&&r.push("animate"),m&&r.push("disabled"),r.push('ariaLabel="'+(l?d:o)+'"'),"<Fab\n "+r.join("\n ")+"\n/>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[se(h,{sx:{mb:3},children:se(no,{theme:g,onThemeChange:x,surface:b,onSurfaceChange:v})}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{spacing:1.5,children:Nn.map(r=>de(h,{children:[se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:r.label}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:r.colors.map(r=>se(jn,{color:r,selected:e===r,onClick:t},r))})]},r.label))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),se(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>se(Vn,{label:On(e),selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3},children:[se(Gn,{label:"Icon Name",value:o,onChange:n,placeholder:"Add"}),de(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:4},children:[se("a",{href:"https://mui.com/material-ui/material-icons/",target:"_blank",rel:"noopener noreferrer",style:{color:"var(--Hotlink)"},children:"Material icon"})," name (e.g. Add, Edit, Favorite, Share)"]})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"OPTIONS"}),de(h,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Extended"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Pill shape with icon + text label"})]}),se(qo,{checked:l,onChange:e=>s(e.target.checked),size:"small","aria-label":"Extended"})]}),l&&se(h,{sx:{mt:1.5},children:se(Gn,{label:"Label Text",value:d,onChange:c,placeholder:"Create"})}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Animation"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Pulse ring effect to draw attention"})]}),se(qo,{checked:u,onChange:e=>p(e.target.checked),size:"small","aria-label":"Animation"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Disabled"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Non-interactive state"})]}),se(qo,{checked:m,onChange:e=>f(e.target.checked),size:"small","aria-label":"Disabled"})]})]})]})}),se(ro,{value:1,children:se(h,{sx:{p:3},children:de(k,{spacing:3,children:[de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),de(k,{spacing:0,children:[de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Role:"}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:'<button role="button" aria-label="...">'})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Label:"}),se(ca,{style:{color:"var(--Text-Quiet)"},children:l?"Extended: visible label provides accessible name.":"Icon-only: aria-label is required."})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Focus:"}),se(ca,{style:{color:"var(--Text-Quiet)"},children:"3px solid var(--Focus-Visible) with 2px offset."})]}),de(h,{sx:{py:1.5},children:[se(_t,{children:"Disabled:"}),se(ca,{style:{color:"var(--Text-Quiet)"},children:"HTML disabled attribute. 50% opacity, removed from tab order."})]})]})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"Best Practices"}),de(k,{spacing:0,children:[de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"One per screen:"}),se(ca,{style:{color:"var(--Text-Quiet)"},children:"FABs represent the primary action. Use at most one per view."})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Extended for clarity:"}),se(ca,{style:{color:"var(--Text-Quiet)"},children:"Use extended variant when the icon alone may be ambiguous."})]}),de(h,{sx:{py:1.5},children:[se(_t,{children:"Animation:"}),se(ca,{style:{color:"var(--Text-Quiet)"},children:"Use sparingly. Respect prefers-reduced-motion."})]})]})]})]})})})]})})})]})]})}const Xn={small:"var(--Sm-Rail-Width, 72px)",medium:"var(--Rail-Width, 80px)",large:"var(--Lg-Rail-Width, 96px)"},Yn="var(--Icon-Size, 24px)",Zn="var(--Sizing-Half, 4px)",qn="var(--Button-Height, 32px)";function Jn({items:e=[],sections:t,value:a,defaultValue:o=0,onChange:n,expandable:l=!1,expandedWidth:s="partial",defaultExpanded:d=!1,fabAction:c,labelStyle:u="contained",size:p="medium",className:m="",sx:f={},...g}){const[x,b]=r(o),[v,y]=r(d),S=void 0!==a,k=S?a:x,B=i(e=>{S||b(e),n?.(e)},[S,n]),w=l&&v;return de(h,{component:"nav",role:"navigation","aria-label":"Navigation rail","data-theme":"Default","data-surface":"Surface-Dim",className:"rail"+(l?" rail-expandable":" rail-fixed")+(w?" rail-expanded":" rail-collapsed")+" rail-label-"+("outside"===u?"outside":"contained")+" rail-"+(Xn[p]?p:"medium")+" "+m,sx:{display:"flex",flexDirection:"column",width:w?("full"===s?320:240)+"px":Xn[p]||Xn.medium,minHeight:"100%",gap:w?0:"var(--Sizing-1, 8px)",backgroundColor:"var(--Background)",borderRight:"1px solid var(--Border)",fontFamily:"inherit",transition:"width 0.25s ease",overflow:"hidden",flexShrink:0,...f},...g,children:[l&&se(h,{sx:{display:"flex",justifyContent:w?"flex-start":"center",px:w?1.5:0,height:56,alignItems:"center"},children:se(bi,{iconOnly:!0,variant:"ghost",size:"small",onClick:()=>y(e=>!e),"aria-label":w?"Collapse menu":"Expand menu",children:se(Fa,{size:"small",sx:{color:"inherit"},children:se(w?Dr:Wr,{})})})}),c&&se(h,{sx:{px:w?2:1,py:1,flexShrink:0},children:se(bi,{variant:"primary-light",size:"medium",onClick:c.onClick,"aria-label":c.label||"Action",startIcon:c.icon?se(Fa,{size:"small",sx:{color:"inherit"},children:c.icon}):void 0,sx:{width:w?"100%":56,borderRadius:w?"28px":"var(--Style-Border-Radius)",justifyContent:w?"flex-start":"center",transition:"all 0.2s ease"},children:w?c.label:null})}),se(h,{role:"tablist","aria-orientation":"vertical",sx:{flex:1,overflowY:"auto",overflowX:"hidden",display:"flex",flexDirection:"column",alignItems:"center",gap:w?0:"var(--Sizing-1-and-Half, 12px)",px:w?0:"var(--Sizing-1, 8px)",width:"100%"},children:(()=>{if(t&&t.length>0){const e=[];let r=0;return t.forEach((t,a)=>{a>0&&e.push(se(h,{"aria-hidden":"true",sx:{height:"1px",width:"100%",backgroundColor:"var(--Border-Variant)"}},"divider-"+a)),t.items.forEach(t=>{const a=r;e.push(se(Kn,{item:t,selected:k===a,expanded:w,labelStyle:u,onClick:()=>B(a)},"item-"+a)),r++})}),e}return e.map((e,r)=>se(Kn,{item:e,selected:k===r,expanded:w,labelStyle:u,onClick:()=>B(r)},r))})()})]})}function Kn({item:e,selected:r,expanded:t,labelStyle:a,onClick:i}){const{icon:o,avatar:n,label:l,badge:s,disabled:d}=e,c=r?"var(--Button)":"transparent",u=r||t?"var(--Text)":"var(--Quiet)",p="outside"!==a,m=p&&!t,f=d?{}:{"&:hover":{backgroundColor:"var(--Hover)","& .rail-item-label":{color:"var(--Text)"}},"&:active":{backgroundColor:"var(--Pressed)","& .rail-item-label":{color:"var(--Text)"}},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"-3px","& .rail-item-label":{color:"var(--Text)"}}};return de(h,{component:"button",type:"button",role:"tab","aria-selected":r,"aria-label":l,"aria-disabled":d||void 0,disabled:d||void 0,onClick:d?void 0:i,className:"rail-item"+(r?" rail-item-selected":""),sx:{display:"flex",flexDirection:t?"row":"column",alignItems:"center",justifyContent:t?"flex-start":"center",gap:t?"var(--Sizing-1-and-Half, 12px)":"2px",width:t?"100%":44,minWidth:t?void 0:Yn,minHeight:Yn,px:t?2.5:0,py:m?Zn:0,border:r&&m?"1px solid var(--Border)":"1px solid transparent",borderRadius:t?0:"8px",backgroundColor:m||t?c:"transparent",boxShadow:r&&m?"var(--Shadow-1, none)":"none",color:"inherit",cursor:d?"not-allowed":"pointer",opacity:d?"calc(var(--Disabled, 38) / 100)":1,fontFamily:"inherit",textAlign:t?"left":"center",transition:"background-color 0.15s ease, color 0.15s ease",outline:"none",...m||t?f:{}},children:[de(h,{sx:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...t?{flexShrink:0}:{width:p?"100%":qn,height:p?"auto":qn,py:p?Zn:0,borderRadius:p?"8px":qn,backgroundColor:p?"transparent":c,border:!p&&r?"1px solid var(--Border)":void 0,transition:"background-color 0.2s ease",...p?{}:f}},children:[n?se(h,{sx:{display:"flex",width:Yn,height:Yn},children:n}):se(Fa,{size:"small",sx:{color:"inherit"},children:o}),s&&se($n,{value:s})]}),l&&se(h,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"center",width:"100%"},children:se(ha,{className:"rail-item-label",style:{color:u,textAlign:"center",whiteSpace:t?"nowrap":"normal",overflow:"hidden",textOverflow:"ellipsis",...t?{flex:1}:{maxWidth:"100%"}},children:l})})]})}function $n({value:e}){return se(h,{sx:{position:"absolute",top:-4,right:-6,minWidth:16,height:16,borderRadius:"8px",backgroundColor:"var(--Tags-Error-BG)",color:"var(--Tags-Error-Text)",fontSize:"10px",fontWeight:700,px:.5,display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1},children:e})}const _n=[{icon:se(ke,{}),label:"Home"},{icon:se(Ce,{}),label:"Search"},{icon:se(Se,{}),label:"Favorites",badge:3},{icon:se(pe,{}),label:"Profile"},{icon:se(we,{}),label:"Settings"}];function el({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function rl(){const[e,t]=r(!0),[a,i]=r("partial"),[o,n]=r(!1),[l,s]=r(null),[d,c]=r("Surface");return de(h,{sx:{pb:8},children:[se(Vt,{children:"Rail"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[de(to,{theme:l,surface:d,sx:{minHeight:400,alignItems:"stretch",p:0},children:[se(Jn,{items:_n,expandable:e,expandedWidth:a,fabAction:o?{icon:se(zr,{}),label:"Create",onClick:()=>{}}:void 0}),se(h,{sx:{flex:1,p:3},children:se(_t,{style:{color:"var(--Quiet)"},children:"Main content area"})})]}),se(Ho,{code:(()=>{const r=["items={items}"];return e&&(r.push("expandable"),"partial"!==a&&r.push('expandedWidth="full"')),o&&r.push('fabAction={{ icon: <AddIcon />, label: "Create", onClick: handleCreate }}'),r.push("value={activeIndex}"),r.push("onChange={setActiveIndex}"),"<Rail\n "+r.join("\n ")+"\n/>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[se(h,{sx:{mb:3},children:se(no,{theme:l,onThemeChange:s,surface:d,onSurfaceChange:c})}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"EXPANDED WIDTH"}),se(k,{direction:"row",spacing:1,children:["partial","full"].map(e=>{return se(el,{label:(r=e,r?r.charAt(0).toUpperCase()+r.slice(1):""),selected:a===e,onClick:()=>i(e)},e);var r})})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Expandable"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Toggle between collapsed and expanded"})]}),se(qo,{variant:"default-outline",checked:e,onChange:e=>t(e.target.checked),size:"small","aria-label":"Expandable"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"FAB Action"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Show create button at top"})]}),se(qo,{variant:"default-outline",checked:o,onChange:e=>n(e.target.checked),size:"small","aria-label":"FAB action"})]})]})}),se(ro,{value:1,children:se(h,{sx:{p:3},children:se(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),se(k,{spacing:0,children:[{label:"Nav",value:'<nav role="navigation" aria-label="Navigation rail">'},{label:"Items",value:'role="tab" aria-selected on each item'},{label:"TabList",value:'role="tablist" aria-orientation="vertical"'},{label:"Toggle",value:'aria-label="Expand/Collapse menu"'},{label:"Focus",value:"outline: 3px solid var(--Focus-Visible); outline-offset: -3px"},{label:"Badge",value:"Visual only — announced via aria-label on parent item"}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(_t,{children:[e,":"]}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const tl={default:{theme:"Default"},primary:{theme:"Primary"},"primary-light":{theme:"Primary",surface:"Surface-Brightest"},white:{theme:"Neutral",surface:"Surface-Brightest"},black:{theme:"Neutral",surface:"Surface-Dimmest"}};function al({items:e=[],value:t,defaultValue:a,onChange:o,type:n="floating",orientation:l="horizontal",color:s="default",fab:d,className:c="",sx:u={},...p}){const[m,f]=r(a??null),g=void 0!==t,x=g?t:m,b=i(e=>{const r=x===e?null:e;g||f(r),o?.(r)},[g,x,o]),v=tl[s]||tl.default,y=v.theme,S=v.surface,k="vertical"===l,B="floating"===n,w=se(h,{role:"toolbar","aria-orientation":l,"aria-label":"Toolbar","data-theme":y,"data-surface":S||"Surface",className:"toolbar toolbar-"+n+" toolbar-"+l+" toolbar-"+s+" "+c,sx:{display:"inline-flex",flexDirection:k?"column":"row",alignItems:"center",gap:"4px",backgroundColor:"var(--Background)",border:"1px solid var(--Border-Variant)",borderRadius:B?"56px":"var(--Style-Border-Radius)",padding:B?"8px 16px":"8px",fontFamily:"inherit",flexShrink:0,...B&&{boxShadow:Ja},...u},...p,children:e.map((e,r)=>{const t=x===r;return se(bi,{iconOnly:!0,variant:t?"default":"ghost",size:"small",onClick:()=>b(r),"aria-label":e.label,"aria-checked":t,role:"radio",children:se(Fa,{size:"small",sx:{color:"inherit"},children:e.icon})},e.key||r)})});return d&&B?de(h,{sx:{display:"inline-flex",flexDirection:k?"column":"row",alignItems:"center",gap:1},children:[w,se(bi,{iconOnly:!0,variant:"default",size:"large",onClick:d.onClick,"aria-label":d.label||"Action",sx:{borderRadius:"50%",width:56,height:56,minWidth:"unset",minHeight:"unset"},children:se(Fa,{size:"medium",sx:{color:"inherit"},children:d.icon})})]}):w}const il=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",ol=[{icon:se(Lr,{}),label:"Bold"},{icon:se(Fr,{}),label:"Italic"},{icon:se(Hr,{}),label:"Underline"},{icon:se(Pr,{}),label:"Align left"},{icon:se(Mr,{}),label:"Align center"}];function nl({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function ll(){const[e,t]=r("floating"),[a,i]=r("default"),[o,n]=r("horizontal"),[l,s]=r(!1),[d,c]=r(null),[u,p]=r("Surface");return de(h,{sx:{pb:8},children:[se(Vt,{children:"Toolbar"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{theme:d,surface:u,sx:{minHeight:200},children:se(al,{items:ol,type:e,color:a,orientation:o,fab:l&&"floating"===e?{icon:se(zr,{}),label:"Create",onClick:()=>{}}:void 0})}),se(Ho,{code:(()=>{const r=["items={items}"];return"floating"!==e&&r.push('type="contextual"'),"default"!==a&&r.push('color="'+a+'"'),"horizontal"!==o&&r.push('orientation="vertical"'),l&&r.push('fab={{ icon: <AddIcon />, label: "Create", onClick: handleCreate }}'),r.push("value={selected}"),r.push("onChange={setSelected}"),"<Toolbar\n "+r.join("\n ")+"\n/>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[se(h,{sx:{mb:3},children:se(no,{theme:d,onThemeChange:c,surface:u,onSurfaceChange:p})}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"TYPE"}),se(k,{direction:"row",spacing:1,children:["floating","contextual"].map(r=>se(nl,{label:il(r),selected:e===r,onClick:()=>t(r)},r))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:["default","primary","primary-light","white","black"].map(e=>se(nl,{label:il(e),selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"ORIENTATION"}),se(k,{direction:"row",spacing:1,children:["horizontal","vertical"].map(e=>se(nl,{label:il(e),selected:o===e,onClick:()=>n(e)},e))})]}),"floating"===e&&de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"FAB Button"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Add FAB to the right of toolbar"})]}),se(qo,{variant:"default-outline",checked:l,onChange:e=>s(e.target.checked),size:"small","aria-label":"FAB button"})]})]})}),se(ro,{value:1,children:se(h,{sx:{p:3},children:se(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),se(k,{spacing:0,children:[{label:"Role",value:'role="toolbar" aria-orientation aria-label'},{label:"Items",value:'role="radio" aria-checked on each icon button'},{label:"Selection",value:"Toggle — click selected again to deselect"},{label:"Focus",value:"Uses Button component focus styles"},{label:"Floating",value:"borderRadius 56px, padding 16px, Effect-Level-2 shadow"},{label:"Contextual",value:"Standard border-radius, padding 8px, no shadow"}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(_t,{children:[e,":"]}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const sl={small:{height:"var(--Small-Button-Height)",fontSize:"13px",padding:"4px 8px",iconSize:16,btnSize:28},medium:{height:"var(--Button-Height)",fontSize:"14px",padding:"6px 12px",iconSize:18,btnSize:36},large:{height:"var(--Large-Button-Height)",fontSize:"16px",padding:"8px 16px",iconSize:20,btnSize:44}};function dl({value:e,defaultValue:t=0,onChange:n,min:l,max:s,step:d=1,variant:c="outlined",style:u="outline",color:p="default",size:m="medium",label:f,labelPosition:g="top",placeholder:x,helperText:b,disabled:v=!1,fullWidth:y=!1,className:S="",sx:k={},...B}){const[w,C]=r(t),[T,z]=r(!1),A=a(null),I=void 0!==e,R=I?e:w,W=""!==R&&null!=R,D=(L="default"===p?"primary":p).charAt(0).toUpperCase()+L.slice(1);var L;const F="default"===p?"var(--Border)":"var(--Buttons-"+D+"-Border)",H="default"===p?"var(--Background)":"var(--Buttons-"+D+"-Light-Button, var(--Background))",P="default"===p?"var(--Text)":"var(--Text-"+D+")",M="outlined"===c,E="floating"===g,O="top"===g,N=sl[m]||sl.medium,Q="small"===m?_t:ta,V=i(e=>{let r="number"==typeof e?e:parseFloat(e);isNaN(r)&&(r=0),void 0!==l&&r<l&&(r=l),void 0!==s&&r>s&&(r=s),I||C(r),n?.(r)},[I,n,l,s]),j=a(R);j.current=R;const G=i(e=>{if(v)return;const r="number"==typeof j.current?j.current:parseFloat(j.current)||0;void 0!==l&&e<0&&r<=l||void 0!==s&&e>0&&r>=s||V(r+e*d)},[v,d,l,s,V]),U=void 0!==l&&R<=l,X=void 0!==s&&R>=s,Y=a(null),Z=a(null),q=i(()=>{Y.current&&(clearTimeout(Y.current),Y.current=null),Z.current&&(clearInterval(Z.current),Z.current=null)},[]),J=i(e=>{v||(q(),G(e),Y.current=setTimeout(()=>{let r=120,t=0;const a=()=>{G(e),t+=1,10===t&&r>60?(clearInterval(Z.current),r=60,Z.current=setInterval(a,r)):30===t&&r>30&&(clearInterval(Z.current),r=30,Z.current=setInterval(a,r))};Z.current=setInterval(a,r)},400))},[v,G,q]);o(()=>q,[q]);const K=a(!1),$=e=>({onPointerDown:r=>{if(void 0===r.button||0===r.button){r.preventDefault();try{r.currentTarget.setPointerCapture?.(r.pointerId)}catch(e){}K.current=!0,J(e)}},onClick:()=>{K.current?K.current=!1:G(e)},onPointerUp:e=>{try{e.currentTarget.releasePointerCapture?.(e.pointerId)}catch(e){}q()},onPointerCancel:q,onPointerLeave:q,onKeyDown:r=>{"Enter"!==r.key&&" "!==r.key||r.repeat||(r.preventDefault(),J(e))},onKeyUp:e=>{"Enter"!==e.key&&" "!==e.key||q()},onBlur:q}),_=e=>{const r=e.target.value;if(""===r||"-"===r)return void(I||C(r));const t=parseFloat(r);isNaN(t)||V(t)},ee=e=>{"ArrowUp"===e.key&&(e.preventDefault(),G(1)),"ArrowDown"===e.key&&(e.preventDefault(),G(-1))},re={display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",color:"default"===p?"var(--Text)":"var(--Text-"+D+")",cursor:"pointer",outline:"none",flexShrink:0,border:"none",padding:0,borderRadius:"var(--Button-Icon-Radius, 0)",transition:"background-color 0.15s ease","&:hover:not(:disabled)":{backgroundColor:"var(--Hover)"},"&:active:not(:disabled)":{backgroundColor:"var(--Pressed)"},"&:focus-visible":{outline:"none",boxShadow:"inset 0 0 0 1px var(--Focus-Visible)"},"&:disabled":{opacity:"var(--Disabled, 0.38)",cursor:"not-allowed"}},te={},ae=()=>O&&f?se(Q,{component:"label",style:{display:"block",marginBottom:"6px",color:v?"var(--Quiet)":"var(--Text)",fontWeight:500,opacity:v?.6:1},children:f}):null;return de(h,M?{className:"numberfield numberfield-outlined"+(v?" numberfield-disabled":"")+(S?" "+S:""),sx:{width:y?"100%":"auto",fontFamily:"inherit",...k},...B,children:[ae(),se(h,{sx:{border:"1px solid "+F,borderRadius:"small"===m?"var(--Sm-Input-Radius, var(--Input-Radius, var(--Style-Border-Radius)))":"large"===m?"var(--Lg-Input-Radius, var(--Input-Radius, var(--Style-Border-Radius)))":"var(--Input-Radius, var(--Style-Border-Radius))",overflow:"hidden",transition:"border-color 0.15s ease",boxShadow:"none",opacity:v?.5:1,"&:focus-within":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"}},children:se(h,{...te,children:de(h,{sx:{position:"relative",display:"flex",alignItems:"stretch",minHeight:"max("+N.height+", calc(var(--Sizing-3, 24px) * 2 + 1px))",backgroundColor:H},children:[E&&f&&se(h,{sx:{position:"absolute",top:W||T?"6px":"50%",left:N.padding.split(" ")[1]||"14px",transform:W||T?"none":"translateY(-50%)",transformOrigin:"top left",color:T?P:"var(--Quiet)",fontFamily:"var(--Font-Families-Body, var(--Body-Font-Family))",...W||T?{fontSize:"var(--"+(Mi[m]||Mi.medium).shrunk+"-Font-Size)",fontWeight:"var(--"+(Mi[m]||Mi.medium).shrunk+"-Font-Weight)",letterSpacing:"var(--"+(Mi[m]||Mi.medium).shrunk+"-Letter-Spacing)"}:{fontSize:"var(--"+(Mi[m]||Mi.medium).resting+"-Font-Size)",fontWeight:"var(--"+(Mi[m]||Mi.medium).resting+"-Font-Weight)",letterSpacing:"var(--"+(Mi[m]||Mi.medium).resting+"-Letter-Spacing)"},pointerEvents:"none",transition:"top 0.15s ease, font-size 0.15s ease, color 0.15s ease",zIndex:1},children:f}),se(h,{component:"input",ref:A,type:"text",inputMode:"numeric",role:"spinbutton","aria-valuenow":"number"==typeof R?R:void 0,"aria-valuemin":l,"aria-valuemax":s,"aria-label":f||"Number",value:R,onChange:_,onKeyDown:ee,onFocus:()=>z(!0),onBlur:()=>z(!1),disabled:v,placeholder:E?void 0:x||"",sx:{flex:1,border:"none",outline:"none",backgroundColor:"transparent",color:W||T?P:"var(--Quiet)",fontSize:N.fontSize,fontFamily:"var(--Body-Font-Family)",fontWeight:"var(--Body-Font-Weight)",padding:E?"22px 14px 6px":N.padding,minWidth:0,"&::placeholder":{color:"var(--Quiet)",opacity:1},"&:disabled":{cursor:"not-allowed"}}}),de(h,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"stretch",borderLeft:"1px solid "+F,flexShrink:0},children:[se(h,{component:"button",type:"button","aria-label":"Increase",...$(1),disabled:v||X,sx:{...re,width:"var(--Sizing-4, 32px)",height:"var(--Sizing-3, 24px)"},children:se(Fa,{size:"medium",children:se(Er,{})})}),se(h,{"aria-hidden":"true",sx:{height:"1px",backgroundColor:F,flexShrink:0}}),se(h,{component:"button",type:"button","aria-label":"Decrease",...$(-1),disabled:v||U,sx:{...re,width:"var(--Sizing-4, 32px)",height:"var(--Sizing-3, 24px)"},children:se(Fa,{size:"medium",children:se(Or,{})})})]})]})})}),b&&se(_t,{style:{color:"var(--Quiet)",marginTop:"4px",marginLeft:"2px"},children:b})]}:{className:"numberfield numberfield-spinner"+(v?" numberfield-disabled":"")+(S?" "+S:""),sx:{fontFamily:"inherit",...k},...B,children:[ae(),de(h,{sx:{display:"inline-flex",alignItems:"center",gap:"small"===m?.5:1,opacity:v?.5:1},children:[se(h,{component:"button",type:"button","aria-label":"Decrease",...$(-1),disabled:v||U,sx:{...re,width:N.btnSize,height:N.btnSize,borderRadius:"small"===m?"var(--Sm-Button-Icon-Radius, var(--Button-Icon-Radius, var(--Style-Border-Radius)))":"large"===m?"var(--Lg-Button-Icon-Radius, var(--Button-Icon-Radius, var(--Style-Border-Radius)))":"var(--Button-Icon-Radius, var(--Style-Border-Radius))",border:"1px solid "+F},children:se(Fa,{size:"small",children:se(me,{})})}),se(h,{sx:{border:"1px solid "+F,borderRadius:"small"===m?"var(--Sm-Input-Radius, var(--Input-Radius, var(--Style-Border-Radius)))":"large"===m?"var(--Lg-Input-Radius, var(--Input-Radius, var(--Style-Border-Radius)))":"var(--Input-Radius, var(--Style-Border-Radius))",overflow:"hidden","&:focus-within":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"}},children:se(h,{...te,children:se(h,{component:"input",ref:A,type:"text",inputMode:"numeric",role:"spinbutton","aria-valuenow":"number"==typeof R?R:void 0,"aria-valuemin":l,"aria-valuemax":s,"aria-label":f||"Number",value:R,onChange:_,onKeyDown:ee,onFocus:()=>z(!0),onBlur:()=>z(!1),disabled:v,sx:{width:"small"===m?40:56,minHeight:N.height,textAlign:"center",border:"none",outline:"none",backgroundColor:"var(--Hover)",color:"var(--Text)",fontSize:N.fontSize,fontFamily:"var(--Body-Font-Family)",fontWeight:600,"&:disabled":{cursor:"not-allowed"}}})})}),se(h,{component:"button",type:"button","aria-label":"Increase",...$(1),disabled:v||X,sx:{...re,width:N.btnSize,height:N.btnSize,borderRadius:"small"===m?"var(--Sm-Button-Icon-Radius, var(--Button-Icon-Radius, var(--Style-Border-Radius)))":"large"===m?"var(--Lg-Button-Icon-Radius, var(--Button-Icon-Radius, var(--Style-Border-Radius)))":"var(--Button-Icon-Radius, var(--Style-Border-Radius))",border:"1px solid "+F},children:se(Fa,{size:"small",children:se(zr,{})})})]}),b&&se(_t,{style:{color:"var(--Quiet)",marginTop:"4px",marginLeft:"2px"},children:b})]})}const cl=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",ul=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}];function hl({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function pl({color:e,selected:r,onClick:t}){const a=cl(e);return se(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&se(he,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function ml(){const[e,t]=r("outlined"),[a,i]=r("outline"),[o,n]=r("default"),[l,s]=r("medium"),[d,c]=r("top"),[u,p]=r(!0),[m,f]=r(!1),[g,x]=r(!1),[b,v]=r(null),[y,S]=r("Surface");return de(h,{sx:{pb:8},children:[se(Vt,{children:"Number Field"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{theme:b,surface:y,children:se(h,{sx:{width:"100%",maxWidth:"outlined"===e?300:"auto"},children:se(dl,{variant:e,style:a,color:o,size:l,label:u?"Quantity":void 0,labelPosition:d,min:0,max:100,disabled:m,fullWidth:g&&"outlined"===e})})}),se(Ho,{code:(()=>{const r=['variant="'+e+'"'];return"outline"!==a&&r.push('style="'+a+'"'),"default"!==o&&r.push('color="'+o+'"'),"medium"!==l&&r.push('size="'+l+'"'),u&&r.push('label="Quantity"'),"top"!==d&&r.push('labelPosition="'+d+'"'),r.push("min={0}"),r.push("max={100}"),m&&r.push("disabled"),g&&"outlined"===e&&r.push("fullWidth"),r.push("value={value}"),r.push("onChange={setValue}"),"<NumberField\n "+r.join("\n ")+"\n/>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[se(h,{sx:{mb:3},children:se(no,{theme:b,onThemeChange:v,surface:y,onSurfaceChange:S})}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"VARIANT"}),se(k,{direction:"row",spacing:1,children:["outlined","spinner"].map(r=>se(hl,{label:cl(r),selected:e===r,onClick:()=>t(r)},r))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),se(k,{direction:"row",spacing:1,children:["outline","light"].map(e=>se(hl,{label:cl(e),selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{spacing:1.5,children:ul.map(e=>de(h,{children:[se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:e.label}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:e.colors.map(e=>se(pl,{color:e,selected:o===e,onClick:n},e))})]},e.label))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),se(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>se(hl,{label:cl(e),selected:l===e,onClick:()=>s(e)},e))})]}),"outlined"===e&&de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"LABEL"}),se(k,{direction:"row",spacing:1,children:["top","floating","none"].map(e=>se(hl,{label:"none"===e?"None":cl(e),selected:d===e,onClick:()=>c(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Show Label"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Text label above field"})]}),se(qo,{variant:"default-outline",checked:u,onChange:e=>p(e.target.checked),size:"small","aria-label":"Show label"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Disabled"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Non-interactive state"})]}),se(qo,{variant:"default-outline",checked:m,onChange:e=>f(e.target.checked),size:"small","aria-label":"Disabled"})]}),"outlined"===e&&de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Full Width"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Stretch to container"})]}),se(qo,{variant:"default-outline",checked:g,onChange:e=>x(e.target.checked),size:"small","aria-label":"Full width"})]})]})}),se(ro,{value:1,children:se(h,{sx:{p:3},children:se(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),se(k,{spacing:0,children:[{label:"Role",value:'role="spinbutton" with aria-valuenow, aria-valuemin, aria-valuemax'},{label:"Label",value:"aria-label from label prop. Always provide a label."},{label:"Keyboard",value:"ArrowUp/Down increment/decrement. Direct text entry supported."},{label:"Steppers",value:'aria-label="Increase" / "Decrease" on stepper buttons'},{label:"Focus",value:"outline: 2px solid var(--Focus-Visible); outline-offset: 2px"},{label:"Disabled",value:"HTML disabled. Steppers also disabled at min/max bounds."}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(_t,{children:[e,":"]}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}function fl({children:e,selected:r=!1,onChange:t,value:a,sx:i={},...o}){return se(I,{value:a,selected:r,onChange:t,sx:{border:"1px solid var(--Border)",color:"var(--Text)",backgroundColor:r?"var(--Buttons-Primary-Button)":"transparent","&:hover":{backgroundColor:r?"var(--Buttons-Primary-Button)":"var(--Container-High)"},"&.Mui-selected":{backgroundColor:"var(--Buttons-Primary-Button)",color:"#fff","&:hover":{backgroundColor:"var(--Buttons-Primary-Button)"}},textTransform:"none",fontWeight:500,...i},...o,children:e})}const gl=["default","primary","secondary","tertiary","neutral","black-white","info","success","warning","error"],xl=["fill","outline","ghost"];function bl(){const e={};return gl.forEach(r=>{xl.forEach(t=>{e["fill"===t?r:r+"-"+t]=function(e,r){const t=ti(e),a={color:e,style:r,bg:"transparent",text:"var(--Quiet)",hover:"var(--Buttons-"+t+"-Hover)",hoverText:"var(--Buttons-"+t+"-Text)"};return"ghost"===r?{...a,border:"transparent",selectedBg:"transparent",selectedText:"var(--Buttons-"+t+"-Border)",selectedRing:"inset 0 0 0 2px var(--Buttons-"+t+"-Border)",bevel:!1}:"outline"===r?{...a,border:"var(--Buttons-"+t+"-Border)",selectedBg:"transparent",selectedText:"var(--Buttons-"+t+"-Border)",selectedRing:"inset 0 0 0 2px var(--Buttons-"+t+"-Border)",bevel:!1}:{...a,border:"var(--Buttons-"+t+"-Border)",selectedBg:"var(--Buttons-"+t+"-Button)",selectedText:"var(--Buttons-"+t+"-Text)",selectedRing:null,bevel:!0}}(r,t)})}),e}const vl={small:{height:"var(--Small-Button-Height)",fontSize:"13px",padding:"4px 10px",iconSize:16,gap:4,swatchRadius:"var(--Sm-Input-Swatch-Radius, 18px)"},medium:{height:"var(--Button-Height)",fontSize:"15px",padding:"6px 14px",iconSize:18,gap:6,swatchRadius:"var(--Input-Swatch-Radius, 26px)"},large:{height:"var(--Large-Button-Height)",fontSize:"17px",padding:"8px 18px",iconSize:20,gap:8,swatchRadius:"var(--Lg-Input-Swatch-Radius, 50px)"}};function yl({variant:e="primary",size:r="medium",value:t,defaultValue:a,onChange:i,exclusive:o=!0,orientation:n="horizontal",disabled:l=!1,fullWidth:s=!1,children:d,className:c="",sx:u={},"aria-label":h,...p}){const m=bl(),f=m[e]||m.default,g=vl[r]||vl.medium,x="vertical"===n,b={gap:0,border:"ghost"===f.style?"none":"1px solid "+f.border,borderRadius:"var(--Style-Border-Radius)",overflow:"hidden",...s&&{width:"100%"},display:"grid",gridAutoFlow:x?"row":"column",...x?{gridAutoRows:"1fr"}:{gridAutoColumns:"1fr"},"& .MuiToggleButtonGroup-grouped":{margin:0,borderLeft:0,borderTop:0,"&.Mui-selected + &.Mui-selected":{marginLeft:0,marginTop:0,borderLeft:0,borderTop:0}},"& .MuiToggleButton-root":{height:g.height,fontSize:g.fontSize,padding:g.padding,fontFamily:"inherit",fontWeight:500,textTransform:"none",letterSpacing:"0",lineHeight:1.4,backgroundColor:f.bg,color:f.text,border:"none",borderRadius:0,transition:"background-color 0.15s ease, color 0.15s ease","& .tbtn-start, & .tbtn-end":{display:"inline-flex",alignItems:"center",flexShrink:0,"& > *":{width:g.iconSize,height:g.iconSize,display:"block"}},"& .tbtn-start":{marginRight:"2px"},"& .tbtn-end":{marginLeft:"2px"},"& .tbtn-swatch":{display:"block",flexShrink:0,width:g.iconSize,height:g.iconSize,borderRadius:g.swatchRadius,border:"1px solid var(--Border-Variant)"},"& .tbtn-swatch:not(:only-child)":{marginRight:"2px"},"--_height":g.height,"--_bevel":"var(--Button-Bevel-Px, min(calc(var(--Button-Bevel, 0) * var(--_height) / 100), calc(var(--_height) / 5)))",...s&&{flex:1},..."ghost"===f.style?{}:x?{"&:not(:last-of-type)":{borderBottom:"1px solid "+f.border}}:{"&:not(:last-of-type)":{borderRight:"1px solid "+f.border}},"&:hover":{backgroundColor:f.hover,color:f.hoverText},"&.Mui-selected":{backgroundColor:f.selectedBg,color:f.selectedText,...f.bevel?{boxShadow:ii(f.color)}:{},...f.selectedRing?{boxShadow:f.selectedRing}:{}},"&.Mui-selected:hover":{backgroundColor:f.selectedBg,color:f.selectedText,...f.bevel?{boxShadow:ii(f.color)}:{},...f.selectedRing?{boxShadow:f.selectedRing}:{}},"&.Mui-focusVisible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"-2px",zIndex:1},"&.Mui-disabled":{opacity:.6,color:f.text,backgroundColor:f.bg},"&.Mui-disabled.Mui-selected":{opacity:.6,backgroundColor:f.selectedBg,color:f.selectedText},"& .MuiSvgIcon-root":{fontSize:g.iconSize},"& > *:not(:only-child)":{marginRight:g.gap/2,marginLeft:g.gap/2}},...u};return se(R,{value:t,defaultValue:a,onChange:i,exclusive:o,orientation:n,disabled:l,className:"toggle-group-"+e+" "+c,sx:b,"aria-label":h,...p,children:d})}const Sl=e=>se(yl,{variant:"default",...e}),kl=e=>se(yl,{variant:"primary",...e}),Bl=e=>se(yl,{variant:"secondary",...e}),wl=e=>se(yl,{variant:"tertiary",...e}),Cl=e=>se(yl,{variant:"neutral",...e}),Tl=e=>se(yl,{variant:"black-white",...e}),zl=e=>se(yl,{variant:"info",...e}),Al=e=>se(yl,{variant:"success",...e}),Il=e=>se(yl,{variant:"warning",...e}),Rl=e=>se(yl,{variant:"error",...e});function Wl({label:e,value:t="",onChange:a,placeholder:i,error:o=!1,errorMessage:n="",disabled:l=!1,helperText:s="",variant:d="outlined",size:c="medium",type:u="text",required:p=!1,fullWidth:m=!0,startAdornment:f,endAdornment:g,sx:x={},"aria-label":b,"aria-labelledby":k,onFocus:B,onBlur:w,...C}){const[T,z]=r(!1),A=o?"var(--Buttons-Error-Border)":T?"var(--Buttons-Primary-Border)":"var(--Border)",I=o||T?"var(--Text)":"var(--Text-Quiet)",R="var(--Text)";return de(h,{sx:{width:m?"100%":"auto"},children:[se(v,{label:e,value:t,onChange:a,placeholder:i,disabled:l,variant:d,size:c,type:u,required:p,onFocus:e=>{z(!0),B?.(e)},onBlur:e=>{z(!1),w?.(e)},error:o,fullWidth:m,slotProps:{htmlInput:{...b?{"aria-label":b}:{},...k?{"aria-labelledby":k}:{}},input:{"data-surface":l?"Container-Low":"Container",style:{color:R},startAdornment:f?se(y,{position:"start",children:f}):void 0,endAdornment:g?se(y,{position:"end",children:g}):void 0}},sx:{width:m?"100%":"auto","& .MuiOutlinedInput-root":{backgroundColor:"var(--Background)",transition:"all 0.2s ease-in-out",color:R,"& fieldset":{borderColor:A,transition:"border-color 0.2s ease-in-out"},"&:hover fieldset":{borderColor:o?"var(--Buttons-Error-Border)":"var(--Buttons-Primary-Border)"},"&.Mui-focused fieldset":{borderColor:o?"var(--Buttons-Error-Border)":"var(--Buttons-Primary-Border)",borderWidth:"2px"},"&.Mui-disabled":{backgroundColor:"var(--Background)",opacity:.6}},"& .MuiInputLabel-root":{color:I,transition:"all 0.2s ease-in-out",fontSize:"14px",fontWeight:500,"&.Mui-focused":{color:"var(--Text)",fontWeight:600},"&.Mui-error":{color:"var(--Text)"},"&.Mui-disabled":{color:"var(--Text-Secondary)",opacity:.6}},"& .MuiFormHelperText-root":{color:o?"var(--Buttons-Error-Border)":"var(--Text-Secondary)",marginTop:"4px",fontSize:"12px"},...x},...C}),o&&n&&se(S,{error:!0,sx:{color:"var(--Buttons-Error-Border)",marginTop:"4px",fontSize:"12px",fontWeight:500},children:n})]})}function Dl({label:e="Email",...r}){return se(Wl,{label:e,type:"email",placeholder:"user@example.com",...r})}function Ll({label:e="Password",...r}){return se(Wl,{label:e,type:"password",...r})}function Fl({label:e="Search",placeholder:r="Type to search...",...t}){return se(Wl,{label:e,type:"search",placeholder:r,...t})}function Hl({label:e="Number",...r}){return se(Wl,{label:e,type:"number",...r})}function Pl({label:e="Phone",placeholder:r="(555) 123-4567",...t}){return se(Wl,{label:e,type:"tel",placeholder:r,...t})}function Ml({label:e="Website",placeholder:r="https://example.com",...t}){return se(Wl,{label:e,type:"url",placeholder:r,...t})}function El({error:e=!1,errorMessage:r="",rows:t=4,fullWidth:a=!0,...i}){return se(Qi,{multiline:!0,rows:t,fullWidth:a,...e&&{validation:"error",validationMessage:r},...i})}function Ol({fields:e=[],spacing:r=2,sx:t={},...a}){return se(h,{sx:{display:"flex",flexDirection:"column",gap:`var(--Spacing-${r})`,width:"100%",...t},...a,children:e.map(e=>se(Wl,{...e},e.id))})}const Nl=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",Ql=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}],Vl=[{value:"apple",label:"Apple"},{value:"banana",label:"Banana"},{value:"cherry",label:"Cherry"},{value:"date",label:"Date"},{value:"elderberry",label:"Elderberry"}],jl=[{value:"primary",label:"Primary",color:"var(--Buttons-Primary-Button)"},{value:"secondary",label:"Secondary",color:"var(--Buttons-Secondary-Button)"},{value:"tertiary",label:"Tertiary",color:"var(--Buttons-Tertiary-Button)"},{value:"neutral",label:"Neutral",color:"var(--Buttons-Neutral-Button)"},{value:"info",label:"Info",color:"var(--Buttons-Info-Button)"},{value:"success",label:"Success",color:"var(--Buttons-Success-Button)"},{value:"warning",label:"Warning",color:"var(--Buttons-Warning-Button)"},{value:"error",label:"Error",color:"var(--Buttons-Error-Button)"}];function Gl({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Ul({color:e,selected:r,onClick:t}){const a=Nl(e);return se(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&se(he,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function Xl(){const[e,t]=r("outline"),[a,i]=r("default"),[o,n]=r("medium"),[l,s]=r("top"),[d,c]=r("Fruit"),[u,p]=r(!1),[m,f]=r(!1),[g,x]=r(!0),[b,v]=r(!1),[y,S]=r("Search"),[B,w]=r(""),[C,z]=r(null),[A,I]=r("Surface"),[R,W]=r(!1),[D,L]=r(!0);return de(h,{sx:{pb:8},children:[se(Vt,{children:"Select"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{theme:C,surface:A,children:se(h,{sx:{width:"100%",maxWidth:360},children:se(Ui,{variant:e,color:a,size:o,label:d,labelPosition:l,mode:R?"color":void 0,showColorLabels:R?D:void 0,options:R?jl:Vl,value:B,onChange:w,showDividers:u,disabled:m,fullWidth:g,startDecoration:b?(()=>{const e=Ar[y]||Ar.Search;return se(Fa,{size:"small",children:se(e,{})})})():void 0})})}),se(Ho,{code:(()=>{const r=[];return"outline"!==e&&r.push('variant="'+e+'"'),"default"!==a&&r.push('color="'+a+'"'),"medium"!==o&&r.push('size="'+o+'"'),d&&r.push('label="'+d+'"'),"top"!==l&&r.push('labelPosition="'+l+'"'),R&&r.push('mode="color"'),R&&!D&&r.push("showColorLabels={false}"),u&&r.push("showDividers"),m&&r.push("disabled"),g&&r.push("fullWidth"),b&&r.push("startDecoration={<Icon><"+y+"Icon /></Icon>}"),r.push("options={options}"),r.push("value={value}"),r.push("onChange={setValue}"),"<Select\n "+r.join("\n ")+"\n/>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[se(h,{sx:{mb:3},children:se(no,{theme:C,onThemeChange:z,surface:A,onSurfaceChange:I})}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),se(k,{direction:"row",spacing:1,children:["outline","light"].map(r=>se(Gl,{label:Nl(r),selected:e===r,onClick:()=>t(r)},r))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{spacing:1.5,children:Ql.map(e=>de(h,{children:[se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:e.label}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:e.colors.map(e=>se(Ul,{color:e,selected:a===e,onClick:i},e))})]},e.label))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),se(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>se(Gl,{label:Nl(e),selected:o===e,onClick:()=>n(e)},e))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"LABEL"}),se(k,{direction:"row",spacing:1,children:["top","floating","none"].map(e=>se(Gl,{label:"none"===e?"None":Nl(e),selected:l===e,onClick:()=>s(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Start Icon"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Icon rendered before the value"})]}),se(qo,{checked:b,onChange:e=>v(e.target.checked),size:"small","aria-label":"Start icon"})]}),b&&de(h,{sx:{mt:2},children:[se(Qi,{label:"Icon Name",value:y,onChange:e=>S(e.target.value),placeholder:"Search",variant:"primary-outline",size:"small",fullWidth:!0}),de(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:4},children:[se("a",{href:"https://mui.com/material-ui/material-icons/",target:"_blank",rel:"noopener noreferrer",style:{color:"var(--Hotlink)"},children:"Material icon"})," name (e.g. Search, Add, Edit, Filter, Sort, Star)"]})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Dividers"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Lines between options"})]}),se(qo,{checked:u,onChange:e=>p(e.target.checked),size:"small","aria-label":"Show dividers"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Disabled"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Non-interactive state"})]}),se(qo,{checked:m,onChange:e=>f(e.target.checked),size:"small","aria-label":"Disabled"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Color Mode"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Render swatches alongside each option. Swatch size scales to Select height, radius follows the brand's button radius."})]}),se(qo,{checked:R,onChange:e=>W(e.target.checked),size:"small","aria-label":"Color mode"})]}),R&&de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Show Color Labels"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Hide to render a swatch-only trigger (no text). Useful for compact color pickers."})]}),se(qo,{checked:D,onChange:e=>L(e.target.checked),size:"small","aria-label":"Show color labels"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Full Width"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Stretch to container width"})]}),se(qo,{checked:g,onChange:e=>x(e.target.checked),size:"small","aria-label":"Full width"})]})]})}),se(ro,{value:1,children:se(h,{sx:{p:3},children:se(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),se(k,{spacing:0,children:[{label:"Trigger",value:'role="combobox" aria-expanded="true|false" aria-haspopup="listbox"'},{label:"Dropdown",value:'role="listbox" aria-label="..."'},{label:"Options",value:'role="option" aria-selected="true|false"'},{label:"Label",value:"aria-label from label prop. Always provide a label."},{label:"Keyboard",value:"Enter/Space opens. Escape closes. Arrow keys when open."},{label:"Focus",value:"outline: 2px solid var(--Focus-Visible); outline-offset: 2px (on outer shell)"}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(_t,{children:[e,":"]}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const Yl={small:{height:"var(--Small-Button-Height)",fontSize:"13px",padding:"4px 8px",iconSize:16},medium:{height:"var(--Button-Height)",fontSize:"14px",padding:"6px 12px",iconSize:18},large:{height:"var(--Large-Button-Height)",fontSize:"16px",padding:"8px 16px",iconSize:20}},Zl={small:{height:"48px",fontSize:"13px",padding:"20px 12px 4px",leftPad:12},medium:{height:"56px",fontSize:"14px",padding:"22px 14px 6px",leftPad:14},large:{height:"64px",fontSize:"16px",padding:"24px 16px 6px",leftPad:16}};function ql({options:e=[],value:t,defaultValue:n=null,onChange:l,inputValue:s,onInputChange:d,label:c,labelPosition:u="top",placeholder:p="Type to search",helperText:m,size:f="medium",variant:g="outline",color:x="primary",loading:b=!1,loadingText:v="Loading…",noOptionsText:y="No options",freeSolo:S=!1,clearable:k=!0,disabled:B=!1,fullWidth:w=!1,className:C="",sx:T={},...z}){const A=(I="default"===x?"primary":x).charAt(0).toUpperCase()+I.slice(1);var I;const R="var(--Buttons-"+A+"-Border)",W="default"===x?"var(--Text)":"var(--Text-"+A+")",[D,L]=r(n),[F,H]=r(n?"string"==typeof n?n:n.label||"":""),[P,M]=r(!1),[E,O]=r(!1),[N,Q]=r(-1),V=a(null),j=a(null),G=void 0!==t,U=void 0!==s,X=G?t:D,Y=U?s:F,Z="floating"===u,q="top"===u,J=""!==Y,K=Z?Zl[f]||Zl.medium:Yl[f]||Yl.medium,$=Y?e.filter(e=>("string"==typeof e?e:e.label).toLowerCase().includes(Y.toLowerCase())):e,_=i(e=>{U||H(e),d?.(e)},[U,d]),ee=i(e=>{const r="string"==typeof e?e:e.label;G||L(e),_(r),l?.(e),M(!1),Q(-1),j.current?.focus()},[G,l,_]);o(()=>{if(!P)return;const e=e=>{V.current&&!V.current.contains(e.target)&&M(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[P]);return de(h,{ref:V,className:"autocomplete autocomplete-"+f+" autocomplete-variant-"+g+(P?" autocomplete-open":"")+(B?" autocomplete-disabled":"")+(C?" "+C:""),sx:{position:"relative",width:w?"100%":"auto",display:"inline-block",fontFamily:"inherit",...T},...z,children:[q&&c&&se("small"===f?_t:ta,{component:"label",style:{display:"block",marginBottom:"6px",color:B?"var(--Quiet)":"var(--Text)",fontWeight:500,opacity:B?.6:1},children:c}),se(h,{sx:{border:"1px solid "+R,borderRadius:"small"===f?"var(--Sm-Input-Radius, var(--Input-Radius, var(--Style-Border-Radius)))":"large"===f?"var(--Lg-Input-Radius, var(--Input-Radius, var(--Style-Border-Radius)))":"var(--Input-Radius, var(--Style-Border-Radius))",overflow:"hidden",transition:"border-color 0.15s ease",boxShadow:"none",opacity:B?.5:1,"&:focus-within":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"}},children:se(h,{children:de(h,{sx:{position:"relative",display:"flex",alignItems:"center",minHeight:K.height,backgroundColor:"var(--Hover)"},children:[Z&&c&&se(h,{sx:{position:"absolute",top:J||E?"6px":"50%",left:(K.leftPad||14)+"px",transform:J||E?"scale(0.75)":"translateY(-50%)",transformOrigin:"top left",color:E?W:"var(--Quiet)",fontSize:K.fontSize,fontWeight:400,pointerEvents:"none",zIndex:1,transition:"top 0.15s ease, transform 0.15s ease, color 0.15s ease"},children:c}),se(h,{component:"input",ref:j,type:"text",role:"combobox","aria-expanded":P,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-label":c||p,autoComplete:"off",value:Y,onChange:e=>{_(e.target.value),P||M(!0),Q(-1)},onKeyDown:e=>{if("Escape"!==e.key){if("ArrowDown"===e.key){if(e.preventDefault(),!P)return void M(!0);Q(e=>Math.min(e+1,$.length-1))}"ArrowUp"===e.key&&(e.preventDefault(),Q(e=>Math.max(e-1,0))),"Enter"===e.key&&P&&N>=0&&$[N]&&(e.preventDefault(),ee($[N]))}else M(!1)},onFocus:()=>{O(!0),M(!0)},onBlur:()=>O(!1),disabled:B,placeholder:Z?void 0:p,sx:{flex:1,border:"none",outline:"none",backgroundColor:"transparent",color:J||E?W:"var(--Quiet)",fontSize:K.fontSize,fontFamily:"var(--Body-Font-Family)",fontWeight:"var(--Body-Font-Weight)",padding:K.padding,minWidth:0,"&::placeholder":{color:"var(--Quiet)",opacity:1,fontFamily:"var(--Body-Font-Family)",fontWeight:"var(--Body-Font-Weight)"},"&:disabled":{cursor:"not-allowed"}}}),b&&P&&se(Nr,{size:16,sx:{mr:1,color:"var(--Quiet)"}}),k&&Y&&!B&&se(h,{component:"button",type:"button","aria-label":"Clear",onClick:()=>{G||L(null),_(""),l?.(null),j.current?.focus()},sx:{display:"flex",alignItems:"center",justifyContent:"center",width:20,height:20,borderRadius:"50%",mr:.5,border:"none",backgroundColor:"transparent",color:"var(--Quiet)",cursor:"pointer","&:hover":{color:"var(--Text)",backgroundColor:"var(--Hover)"},"&:focus-visible":{outline:"2px solid var(--Focus-Visible)"}},children:se(Dr,{sx:{fontSize:14}})}),se(h,{component:"button",type:"button","aria-label":P?"Close":"Open",tabIndex:-1,onClick:()=>{B||M(!P)},sx:{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:"100%",border:"none",backgroundColor:"transparent",color:"var(--Quiet)",cursor:B?"not-allowed":"pointer"},children:se(ye,{sx:{fontSize:(K.iconSize||18)+"px",transform:P?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}})})]})})}),m&&se(h,{sx:{fontSize:"12px",color:"var(--Quiet)",mt:"4px",ml:"2px"},children:m}),P&&se(h,{role:"listbox","aria-label":c||"Options",sx:{position:"absolute",top:"100%",left:0,right:0,mt:.5,backgroundColor:"var(--Hover)",border:"1px solid var(--Buttons-Default-Border)",borderRadius:"var(--Style-Border-Radius)",boxShadow:"none",zIndex:9999,maxHeight:240,overflowY:"auto",py:.5},children:b?se(h,{sx:{px:1.5,py:2,textAlign:"center",fontSize:K.fontSize,color:"var(--Quiet)"},children:v}):0===$.length?se(h,{sx:{px:1.5,py:2,textAlign:"center",fontSize:K.fontSize,color:"var(--Quiet)"},children:y}):$.map((e,r)=>{const t="string"==typeof e?e:e.label,a="string"==typeof e?e:e.value,i=t===(X?"string"==typeof X?X:X.label:null),o=function(e,r){return r?{backgroundColor:"transparent",color:"var(--Text)",fontWeight:600}:e?{backgroundColor:"var(--Hover)",color:"var(--Text)"}:{backgroundColor:"transparent",color:"var(--Text-Quiet)"}}(r===N,i);return de(h,{role:"option","aria-selected":i,onClick:()=>ee(e),onMouseEnter:()=>Q(r),sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:0,mx:.5,minHeight:K.height,borderRadius:"4px",cursor:"pointer",fontSize:K.fontSize,fontFamily:"inherit",...o,transition:"background-color 0.1s ease","&:active":{backgroundColor:"var(--Pressed)"}},children:[se(_t,{style:{flex:1,color:"inherit",fontWeight:"inherit"},children:t}),i&&se(Fa,{size:"small",sx:{opacity:.6,flexShrink:0},children:se(he,{})})]},a||t)})})]})}const Jl=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",Kl=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}],$l=[{value:"apple",label:"Apple"},{value:"banana",label:"Banana"},{value:"cherry",label:"Cherry"},{value:"date",label:"Date"},{value:"elderberry",label:"Elderberry"},{value:"fig",label:"Fig"},{value:"grape",label:"Grape"}];function _l({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function es({color:e,selected:r,onClick:t}){const a=Jl(e);return se(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&se(he,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function rs(){const[e,t]=r("outline"),[a,i]=r("default"),[o,n]=r("medium"),[l,s]=r("top"),[d,c]=r("Fruit"),[u,p]=r(!0),[m,f]=r(!1),[g,x]=r(!0),[b,v]=r(null),[y,S]=r("Surface");return de(h,{sx:{pb:8},children:[se(Vt,{children:"Autocomplete"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{theme:b,surface:y,children:se(h,{sx:{width:"100%",maxWidth:360},children:se(ql,{variant:e,color:a,size:o,label:d,labelPosition:l,options:$l,clearable:u,disabled:m,fullWidth:g})})}),se(Ho,{code:(()=>{const r=[];return"outline"!==e&&r.push('variant="'+e+'"'),"default"!==a&&r.push('color="'+a+'"'),"medium"!==o&&r.push('size="'+o+'"'),d&&r.push('label="'+d+'"'),"top"!==l&&r.push('labelPosition="'+l+'"'),u||r.push("clearable={false}"),m&&r.push("disabled"),g&&r.push("fullWidth"),r.push("options={options}"),r.push("onChange={handleChange}"),"<Autocomplete\n "+r.join("\n ")+"\n/>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[se(h,{sx:{mb:3},children:se(no,{theme:b,onThemeChange:v,surface:y,onSurfaceChange:S})}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),se(k,{direction:"row",spacing:1,children:["outline","light"].map(r=>se(_l,{label:Jl(r),selected:e===r,onClick:()=>t(r)},r))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{spacing:1.5,children:Kl.map(e=>de(h,{children:[se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:e.label}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:e.colors.map(e=>se(es,{color:e,selected:a===e,onClick:i},e))})]},e.label))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),se(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>se(_l,{label:Jl(e),selected:o===e,onClick:()=>n(e)},e))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"LABEL"}),se(k,{direction:"row",spacing:1,children:["top","floating","none"].map(e=>se(_l,{label:"none"===e?"None":Jl(e),selected:l===e,onClick:()=>s(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Clearable"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Show clear button when has value"})]}),se(qo,{checked:u,onChange:e=>p(e.target.checked),size:"small","aria-label":"Clearable"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Disabled"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Non-interactive state"})]}),se(qo,{checked:m,onChange:e=>f(e.target.checked),size:"small","aria-label":"Disabled"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Full Width"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Stretch to container width"})]}),se(qo,{checked:g,onChange:e=>x(e.target.checked),size:"small","aria-label":"Full width"})]})]})}),se(ro,{value:1,children:se(h,{sx:{p:3},children:se(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),se(k,{spacing:0,children:[{label:"Input",value:'role="combobox" aria-expanded aria-haspopup="listbox" aria-autocomplete="list"'},{label:"Dropdown",value:'role="listbox" aria-label="..."'},{label:"Options",value:'role="option" aria-selected="true|false"'},{label:"Label",value:"aria-label from label prop. Always provide a label."},{label:"Keyboard",value:"Arrow keys navigate, Enter selects, Escape closes."},{label:"Focus",value:"outline: 2px solid var(--Focus-Visible); outline-offset: 2px (on outer shell)"}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(_t,{children:[e,":"]}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const ts=["default","primary","secondary","tertiary","neutral","info","success","warning","error","black-white"],as=ti,is={small:{touchTarget:24,box:16,dot:8,gap:4,LabelComp:_t},medium:{touchTarget:24,box:20,dot:9.5,gap:8,LabelComp:ta},large:{touchTarget:24,box:24,dot:9.5,gap:12,LabelComp:la}};function os({size:e,color:r,checked:t}){const a=as(r),i="Default"===a?"var(--Quiet)":"var(--Buttons-"+a+"-Border)",o="var(--Buttons-"+a+"-Border)",n=is[e]||is.medium;return se(h,{className:"radio-circle-icon",sx:{width:n.box,height:n.box,boxSizing:"border-box",borderRadius:"50%",border:"2px solid "+i,overflow:"hidden",flexShrink:0,backgroundColor:"var(--Background)",display:"flex",alignItems:"center",justifyContent:"center",transition:"border-color 0.15s ease-in-out"},children:t&&se(h,{sx:{width:n.dot,height:n.dot,borderRadius:"50%",backgroundColor:o,transition:"transform 0.15s ease-in-out"}})})}function ns({color:e="primary",size:r="medium",label:t,labelPlacement:a="end",checked:i,disabled:o=!1,onChange:n,name:l,value:s,className:d="",sx:c={},"aria-label":u,"aria-labelledby":h,"aria-describedby":p,inputProps:m={},...f}){const g=ts.includes(e)?e:"primary",x=is[r]||is.medium,v=x.LabelComp,y=(x.touchTarget-x.box)/2,S={...m,...u&&{"aria-label":u},...h&&{"aria-labelledby":h},...p&&{"aria-describedby":p}},k=se(W,{checked:i,disabled:o,onChange:n,name:l,value:s,icon:se(os,{size:r,color:g,checked:!1}),checkedIcon:se(os,{size:r,color:g,checked:!0}),className:"radio-"+g+" "+d,inputProps:S,disableRipple:!0,sx:{padding:y+"px",width:x.touchTarget,height:x.touchTarget,minWidth:x.touchTarget,minHeight:x.touchTarget,boxSizing:"border-box",borderRadius:"50%",color:"inherit",transition:"background-color 0.15s ease-in-out","&.Mui-checked":{color:"inherit"},"&:hover":{backgroundColor:"transparent"},"&.Mui-focusVisible .radio-circle-icon":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"},"&.Mui-disabled":{opacity:.6,cursor:"not-allowed",pointerEvents:"none"},...c},...f});return t?se(b,{control:k,label:se(v,{component:"span",sx:{color:o?"var(--Text-Quiet)":"var(--Text)",lineHeight:1.4,userSelect:"none"},children:t}),labelPlacement:a,disabled:o,sx:{marginLeft:0,marginRight:0,gap:x.gap+"px",alignItems:"center","&.Mui-disabled .MuiTypography-root":{color:"var(--Text-Quiet)",opacity:.6}}}):k}function ls({color:e="primary",size:r="medium",label:t,options:a=[],value:i,onChange:o,orientation:n="vertical",labelPlacement:l="end",disabled:s=!1,spacing:d=1,name:c,className:u="",sx:h={},"aria-label":p,"aria-labelledby":m,...f}){return de(D,{component:"fieldset",disabled:s,className:"radio-group-"+e+" "+u,sx:h,children:[t&&se(L,{component:"legend",sx:{color:s?"var(--Text-Quiet)":"var(--Text)",fontSize:"small"===r?"13px":"15px",fontWeight:500,mb:1,"&.Mui-focused":{color:"var(--Text)"},"&.Mui-disabled":{color:"var(--Text-Quiet)",opacity:.6}},children:t}),se(F,{value:i,onChange:o,name:c,"aria-label":p,"aria-labelledby":m,row:"horizontal"===n,sx:{display:"flex",flexDirection:"horizontal"===n?"row":"column",flexWrap:"horizontal"===n?"wrap":"nowrap",alignItems:"horizontal"===n?"center":"flex-start",gap:d},...f,children:a.map(t=>se(ns,{color:e,size:r,label:t.label,labelPlacement:l,value:t.value,disabled:t.disabled||s},t.value))})]})}const ss=ns,ds=["default","primary","secondary","tertiary","neutral","info","success","warning","error"];const cs={small:{visual:12,track:2,labelSize:11},medium:{visual:16,track:4,labelSize:12},large:{visual:20,track:6,labelSize:13}};function us({variant:e="primary",size:r="medium",value:t,defaultValue:a,onChange:i,onChangeCommitted:o,min:n=0,max:l=100,step:s=1,marks:d=!1,valueLabelDisplay:c="off",orientation:u="horizontal",track:p="normal",disabled:m=!1,label:f,name:g,className:x="",sx:b={},"aria-label":v,"aria-labelledby":y,...S}){const k=function(){const e={};return ds.forEach(r=>{e[r]=function(e){const r=(t=e).charAt(0).toUpperCase()+t.slice(1);var t;return{thumb:"var(--Border)",thumbBorder:"1px solid var(--Background)",track:"default"===e?"var(--Button)":"var(--Buttons-"+r+"-Button)",trackBorder:"1px solid var(--Border)",rail:"var(--Background)",railBorder:"1px solid var(--Border)",valueLabel:"var(--Text)",valueLabelText:"var(--Background)"}}(r)}),e}(),B=k[e]||k.primary,w=cs[r]||cs.medium,C="vertical"===u,T=Array.isArray(t)||Array.isArray(a),z="inverted"===p,A="small"===r?_t:ta,I=w.track+2,R=z?B.track:B.rail,W=B.railBorder,D=z?B.rail:B.track,L=B.trackBorder,F={color:"transparent"===B.track?B.thumb:B.track,height:C?void 0:I,width:C?I:void 0,"& .MuiSlider-rail":{backgroundColor:R,border:W||"none",boxSizing:W?"content-box":"border-box",opacity:1,height:C?void 0:W?w.track:I,width:C?W?w.track:I:void 0,borderRadius:I/2},"& .MuiSlider-track":{boxSizing:L?"content-box":"border-box",backgroundColor:D,border:L||"none",height:C?void 0:L?w.track:I,width:C?L?w.track:I:void 0,borderRadius:I/2},"& .MuiSlider-thumb":{width:24,height:24,backgroundColor:"transparent",border:"none",boxShadow:"none",transition:"none","--_height":w.visual+"px","--_bevel":"min(calc(var(--Button-Bevel) * var(--_height) / 100), calc(var(--_height) / 5))","&::after":{display:"none"},"&::before":{content:'""',position:"absolute",width:w.visual,height:w.visual,borderRadius:"50%",backgroundColor:B.thumb,border:B.thumbBorder||"none",boxShadow:`${ii(e)}, ${qa}`,transition:"box-shadow 0.15s ease-in-out",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},"&:hover::before":{boxShadow:`${ii(e)}, ${Ja}`},"&.Mui-focusVisible::before, &:focus-visible::before":{boxShadow:`${ii(e)}, ${Ja}, 0 0 0 1px var(--Focus-Visible)`},"&.Mui-active::before":{boxShadow:ii(e)},"&.Mui-focusVisible":{outline:"none",borderRadius:"50%"},"&.Mui-focusVisible::before":{boxShadow:`${ii(e)}, ${Ja}`}},...T?C?{'& .MuiSlider-thumb[data-index="0"]::before':{top:0,left:"50%",transform:"translateX(-50%)"},'& .MuiSlider-thumb[data-index="1"]::before':{top:"auto",bottom:0,left:"50%",transform:"translateX(-50%)"}}:{'& .MuiSlider-thumb[data-index="0"]::before':{left:"auto",right:0,top:"50%",transform:"translateY(-50%)"},'& .MuiSlider-thumb[data-index="1"]::before':{left:0,right:"auto",top:"50%",transform:"translateY(-50%)"}}:{},"& .MuiSlider-valueLabel":{backgroundColor:B.valueLabel,color:B.valueLabelText,fontFamily:"var(--Font-Families-Body, var(--Body-Font-Family))",fontSize:"var(--Label-ExtraSmall-Font-Size)",fontWeight:"var(--Label-ExtraSmall-Font-Weight)",letterSpacing:"var(--Label-ExtraSmall-Letter-Spacing)",lineHeight:"var(--Label-ExtraSmall-Line-Height)",borderRadius:"var(--Sizing-1, 8px)",padding:"var(--Sizing-Half, 4px) var(--Sizing-1, 8px)","&::before":{backgroundColor:B.valueLabel}},"& .MuiSlider-mark":{backgroundColor:B.rail,width:C?I:2,height:C?2:I,borderRadius:1},"& .MuiSlider-markActive":{backgroundColor:B.thumb,opacity:.6},"& .MuiSlider-markLabel":{color:"var(--Text-Quiet)",fontSize:w.labelSize},"&.Mui-disabled":{opacity:.6,cursor:"not-allowed",pointerEvents:"none","& .MuiSlider-thumb::before":{boxShadow:"none"}},...b},P=se(H,{value:t,defaultValue:a,onChange:i,onChangeCommitted:o,min:n,max:l,step:s,marks:d,valueLabelDisplay:c,orientation:u,track:"inverted"===p?"inverted":!1!==p&&"normal",disabled:m,name:g,"aria-label":v,"aria-labelledby":y,slotProps:m?{input:{"aria-disabled":"true"}}:void 0,className:"slider-"+e+" "+x,sx:F,...S});return f?de(h,{sx:{width:C?"auto":"100%",height:C?"100%":"auto",display:"flex",flexDirection:"column",gap:"4px"},children:[se(A,{component:"label",sx:{color:m?"var(--Text-Quiet)":"var(--Text)",fontSize:"small"===r?"13px":"15px",fontWeight:500,opacity:m?.6:1},children:f}),P]}):P}const hs=us,ps=us,ms={default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},fs={small:{iconSize:16,minHit:24,gap:0,focusInset:-3,focusWidth:3},medium:{iconSize:24,minHit:24,gap:0,focusInset:-3,focusWidth:3},large:{iconSize:36,minHit:void 0,gap:2,focusInset:2,focusWidth:2}};function gs({value:e,defaultValue:t,onChange:a,max:i=5,precision:o=1,color:n="default",size:l="medium",readOnly:s=!1,disabled:d=!1,emptyLabel:c="No rating",className:u="",sx:p={},...m}){const[f,g]=r(t??null),[x,b]=r(null),v=void 0!==e,y=v?e:f,S=null!==x?x:y,k=.5===o,B=!s&&!d,w=ms[n]||ms.default,C=fs[l]||fs.medium,T="var(--Buttons-"+w+"-Button)",z="var(--Buttons-"+w+"-Border)",A=e=>{if(!B)return;const r=e===y?null:e;v||g(r),a?.(r)},I=(e,r)=>{if(!B||!k)return;b(r?e+.5:e+1)},R=B?{"&:hover":{filter:"drop-shadow(0 2px 4px rgba(var(--Dropshadow-Color), 0.22)) drop-shadow(0 1px 2px rgba(var(--Dropshadow-Color), 0.28))","& .MuiSvgIcon-root":{stroke:"var(--Buttons-"+w+"-Border)",strokeWidth:1}}}:{},W=e=>{const r=e+1,t=e+.5,a=null!==S&&r<=S,n=null!==S&&!a&&k&&t<=S,l=n?Qr:Te,s=((e,r)=>e||r?{color:T,filter:"drop-shadow(0 1px 2px rgba(var(--Dropshadow-Color), 0.28))",transition:"filter 0.15s ease","& .MuiSvgIcon-root":{stroke:z,strokeWidth:.5}}:{color:"transparent","& .MuiSvgIcon-root":{stroke:"var(--Quiet)",strokeWidth:1}})(a,n);return k&&B?de(h,{sx:{position:"relative",display:"inline-flex",cursor:"pointer",...s,...R},onMouseLeave:()=>b(null),children:[se(h,{sx:{position:"absolute",left:0,top:0,width:"50%",height:"100%",zIndex:1,cursor:"pointer"},onMouseEnter:()=>I(e,!0),onClick:()=>A(t)}),se(h,{sx:{position:"absolute",right:0,top:0,width:"50%",height:"100%",zIndex:1,cursor:"pointer"},onMouseEnter:()=>I(e,!1),onClick:()=>A(r)}),se(l,{sx:{fontSize:C.iconSize,transition:"color 0.1s ease, filter 0.1s ease"}})]},e):se(h,{component:B?"button":"span",type:B?"button":void 0,role:B?"radio":void 0,"aria-checked":a,"aria-label":r+" star"+(1!==r?"s":""),tabIndex:B?0:-1,onClick:()=>A(r),onMouseEnter:()=>B&&b(r),onMouseLeave:()=>B&&b(null),onKeyDown:e=>{if(B&&("ArrowRight"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),A(Math.min((y||0)+o,i))),"ArrowLeft"===e.key||"ArrowDown"===e.key)){e.preventDefault();const r=Math.max((y||0)-o,0);A(r||null)}},sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none",backgroundColor:"transparent",padding:0,...C.minHit&&{minWidth:C.minHit+"px",minHeight:C.minHit+"px"},cursor:d?"not-allowed":B?"pointer":"default",outline:"none",transition:"transform 0.1s ease",...s,...R,"&:active":B?{transform:"scale(0.95)"}:{},"&:focus-visible":B?{outline:C.focusWidth+"px solid var(--Focus-Visible)",outlineOffset:C.focusInset+"px",borderRadius:"2px"}:{},"&:disabled":{cursor:"not-allowed",opacity:.5}},children:se(l,{sx:{fontSize:C.iconSize,transition:"color 0.1s ease, filter 0.1s ease"}})},e)};return de(h,{role:B?"radiogroup":"img","aria-label":"Rating"+(null!==y?": "+y+" of "+i+" stars":": "+c),className:"rating rating-"+n+" rating-"+l+(s?" rating-readonly":"")+(d?" rating-disabled":"")+(null===y?" rating-empty":"")+(u?" "+u:""),sx:{display:"inline-flex",alignItems:"center",gap:C.gap+"px",opacity:d?.5:1,fontFamily:"inherit",...p},...m,children:[Array.from({length:i},(e,r)=>W(r)),null===y&&!x&&se(ca,{style:{color:"var(--Quiet)",marginLeft:4},children:c})]})}const xs={small:{height:"var(--Small-Button-Height)",fontSize:"13px",iconSize:18,px:12},medium:{height:"var(--Button-Height)",fontSize:"14px",iconSize:20,px:16},large:{height:"var(--Large-Button-Height)",fontSize:"15px",iconSize:22,px:16}};function bs({value:e,defaultValue:t="",onChange:i,onFocus:o,onBlur:n,onClear:l,onSubmit:s,placeholder:d="Search…",size:c="medium",color:u="default",showClearButton:p=!0,disabled:m=!1,ariaLabel:f="Search",className:g="",sx:x={},...b}){const[v,y]=r(t),[S,k]=r(!1),B=a(null),w=void 0!==e,C=w?e:v,T=C.length>0,z=S||T,A=(e=>e.charAt(0).toUpperCase()+e.slice(1))("default"===u?"primary":u),I="default"===u?"var(--Text)":"var(--Text-"+A+")",R=xs[c]||xs.medium,W=()=>{w||y(""),i?.(""),l?.(),B.current?.focus()};return se(h,{className:"search-field search-field-"+c+(S?" search-field-focused":"")+(T?" search-field-filled":"")+(m?" search-field-disabled":"")+(g?" "+g:""),sx:{display:"flex",boxSizing:"border-box",...x},...b,children:se(h,{sx:{border:"1px solid "+("var(--Buttons-"+A+"-Border)"),borderRadius:"small"===c?"var(--Sm-Input-Radius, var(--Input-Radius, var(--Style-Border-Radius)))":"large"===c?"var(--Lg-Input-Radius, var(--Input-Radius, var(--Style-Border-Radius)))":"var(--Input-Radius, var(--Style-Border-Radius))",overflow:"hidden",opacity:m?.5:1,transition:"border-color 0.15s ease, box-shadow 0.15s ease",boxShadow:"none",width:"100%","&:focus-within":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"}},children:de(h,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%",boxSizing:"border-box",minHeight:R.height,px:R.px+"px",backgroundColor:"var(--Hover)"},children:[se(Fa,{size:"small",sx:{color:z?I:"var(--Quiet)",flexShrink:0,transition:"color 0.15s ease"},children:se(Ce,{})}),se(h,{component:"input",ref:B,type:"text",role:"searchbox","aria-label":f,value:C,onChange:e=>{const r=e.target.value;w||y(r),i?.(r,e)},onFocus:e=>{k(!0),o?.(e)},onBlur:e=>{k(!1),n?.(e)},onKeyDown:e=>{"Enter"===e.key&&s?.(C,e),"Escape"===e.key&&T&&W()},placeholder:d,disabled:m,sx:{flex:1,border:"none",outline:"none",backgroundColor:"transparent",color:z?I:"var(--Quiet)",fontSize:R.fontSize,fontFamily:"var(--Body-Font-Family)",fontWeight:"var(--Body-Font-Weight)",minWidth:0,"&::placeholder":{color:"var(--Quiet)",opacity:1,fontFamily:"var(--Body-Font-Family)",fontWeight:"var(--Body-Font-Weight)"},"&:disabled":{cursor:"not-allowed"}}}),p&&T&&!m&&se(h,{component:"button",type:"button","aria-label":"Clear search",onClick:W,sx:{display:"flex",alignItems:"center",justifyContent:"center",width:R.iconSize+4,height:R.iconSize+4,borderRadius:"50%",border:"none",backgroundColor:"transparent",color:"var(--Quiet)",cursor:"pointer",flexShrink:0,padding:0,transition:"color 0.15s ease, background-color 0.15s ease","&:hover":{backgroundColor:"var(--Hover)",color:I},"&:focus-visible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"1px"}},children:se(Fa,{size:"small",children:se(Dr,{})})})]})})})}const vs=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",ys=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}];function Ss({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function ks({color:e,selected:r,onClick:t}){const a=vs(e);return se(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&se(he,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function Bs(){const[e,t]=r("default"),[a,i]=r("medium"),[o,n]=r(!1),[l,s]=r(!0),[d,c]=r(null),[u,p]=r("Surface");return de(h,{sx:{pb:8},children:[se(Vt,{children:"Search Field"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{theme:d,surface:u,children:se(h,{sx:{width:"100%",maxWidth:400},children:se(bs,{color:e,size:a,disabled:o,showClearButton:l,placeholder:"Search..."})})}),se(Ho,{code:(()=>{const r=[];return"default"!==e&&r.push('color="'+e+'"'),"medium"!==a&&r.push('size="'+a+'"'),l||r.push("showClearButton={false}"),o&&r.push("disabled"),r.push('placeholder="Search..."'),r.push("onChange={handleSearch}"),"<SearchField\n "+r.join("\n ")+"\n/>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[se(h,{sx:{mb:3},children:se(no,{theme:d,onThemeChange:c,surface:u,onSurfaceChange:p})}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{spacing:1.5,children:ys.map(r=>de(h,{children:[se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:r.label}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:r.colors.map(r=>se(ks,{color:r,selected:e===r,onClick:t},r))})]},r.label))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),se(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>se(Ss,{label:vs(e),selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Clear Button"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Show clear when has value"})]}),se(qo,{variant:"default-outline",checked:l,onChange:e=>s(e.target.checked),size:"small","aria-label":"Clear button"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Disabled"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Non-interactive state"})]}),se(qo,{variant:"default-outline",checked:o,onChange:e=>n(e.target.checked),size:"small","aria-label":"Disabled"})]})]})}),se(ro,{value:1,children:se(h,{sx:{p:3},children:se(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),se(k,{spacing:0,children:[{label:"Role",value:'role="searchbox" on the input element'},{label:"Label",value:'aria-label="Search" (configurable via ariaLabel prop)'},{label:"Clear",value:'aria-label="Clear search" on clear button'},{label:"Keyboard",value:"Enter submits, Escape clears"},{label:"Focus",value:"outline: 2px solid var(--Focus-Visible); outline-offset: 2px"}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(_t,{children:[e,":"]}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const ws=["primary","secondary","tertiary","neutral","info","success","warning","error"],Cs=e=>e.charAt(0).toUpperCase()+e.slice(1);function Ts(){const e={};return ws.forEach(r=>{e[r]=function(e){const r=Cs(e);return{bg:"var(--Buttons-"+r+"-Button)",text:"var(--Buttons-"+r+"-Text)",border:"none",hoverBg:"var(--Buttons-"+r+"-Hover)",activeBg:"var(--Buttons-"+r+"-Pressed)"}}(r),e[r+"-outline"]=function(e){return{bg:"var(--Background)",text:"var(--Text)",border:"1px solid var(--Buttons-"+Cs(e)+"-Border)",hoverBg:"var(--Hover)",activeBg:"var(--Hover)"}}(r),e[r+"-light"]=function(e){const r=Cs(e);return{bg:"var(--Buttons-"+r+"-Button)",text:"var(--Buttons-"+r+"-Text)",border:"1px solid var(--Buttons-"+r+"-Border)",hoverBg:"var(--Buttons-"+r+"-Hover)",activeBg:"var(--Buttons-"+r+"-Pressed)"}}(r)}),e}const zs={small:{height:24,fontSize:"12px",iconSize:16,padding:"0 8px",deleteSize:16,gap:4},medium:{height:32,fontSize:"13px",iconSize:18,padding:"0 12px",deleteSize:18,gap:6},large:{height:40,fontSize:"14px",iconSize:20,padding:"0 16px",deleteSize:24,gap:8}},As=d(function({size:e,onClick:r,...t},a){const i="large"===e?24:"medium"===e?18:16;return se(h,{ref:a,component:"button",onClick:e=>{e.stopPropagation(),r&&r(e)},onKeyDown:e=>{"Enter"!==e.key&&"Backspace"!==e.key&&"Delete"!==e.key||(e.stopPropagation(),r&&r(e))},"aria-label":"Remove",role:"button",tabIndex:0,sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:24,minHeight:24,width:i,height:i,padding:0,margin:0,marginLeft:"2px",marginRight:"-4px",border:"none",borderRadius:"50%",backgroundColor:"transparent",color:"inherit",opacity:.7,cursor:"pointer",position:"relative",flexShrink:0,transition:"opacity 0.15s ease, background-color 0.15s ease","&:hover":{opacity:1,backgroundColor:"rgba(0,0,0,0.08)"},"&:focus-visible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"1px"},...i<24&&{"&::after":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",minWidth:24,minHeight:24}}},...t,children:se(Vr,{sx:{fontSize:i,pointerEvents:"none"}})})});function Is({variant:e="primary",size:r="medium",label:t,clickable:a=!1,disabled:i=!1,selected:o=!1,selectionMode:n,onDelete:l,onClick:s,startDecorator:d,endDecorator:c,children:u,className:p="",sx:m={},...f}){const g=Ts(),x=g[e]||g.primary,b=l?"large":r,v=zs[b]||zs.medium,y=a||!!s||!!n,S={};"radio"===n?(S.role="radio",S["aria-checked"]=o):"checkbox"===n&&(S.role="checkbox",S["aria-checked"]=o);const k=o?{outline:"2px solid var(--Buttons-Primary-Button)",outlineOffset:"1px"}:{},B=t||u,w={height:v.height,fontSize:v.fontSize,fontWeight:500,fontFamily:"inherit",borderRadius:v.height/2+"px",padding:v.padding,boxSizing:"border-box",position:"relative",backgroundColor:x.bg,color:x.text,border:x.border,...k,..."small"===b&&{"&::after":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",minWidth:24,minHeight:24,width:"100%",height:"100%"}},...y&&!i?{cursor:"pointer",transition:"background-color 0.15s ease, outline 0.15s ease","&:hover":{backgroundColor:x.hoverBg},"&:active":{backgroundColor:x.activeBg}}:{},"&:focus-visible, &.Mui-focusVisible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"},...i?{opacity:.5,cursor:"not-allowed",pointerEvents:"none"}:{},boxShadow:"none","& .MuiChip-label":{padding:0,fontSize:"inherit",fontWeight:"inherit",fontFamily:"inherit",lineHeight:1.2,display:"flex",alignItems:"center",gap:v.gap+"px"},"& .MuiChip-icon":{margin:0,marginLeft:"-2px",color:"inherit",fontSize:v.iconSize},"& .MuiChip-deleteIcon":{display:"none"},...m},C=de(h,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:v.gap+"px",lineHeight:1},children:[d&&se(h,{component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,"& .MuiSvgIcon-root":{fontSize:v.iconSize},"& .MuiAvatar-root":{width:v.iconSize+4,height:v.iconSize+4,fontSize:Math.round(.65*v.iconSize)+"px"}},children:d}),B,c&&se(h,{component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,"& .MuiSvgIcon-root":{fontSize:v.iconSize},"& .MuiAvatar-root":{width:v.iconSize+4,height:v.iconSize+4,fontSize:Math.round(.65*v.iconSize)+"px"}},children:c}),l&&se(As,{size:b,onClick:l})]});return se(P,{label:C,clickable:y&&!i,disabled:i,onClick:y?s:void 0,className:"chip-"+e+" "+p,sx:w,...S,...f})}const Rs={body:{fontFamily:"var(--Body-Font-Family)",lineHeight:"calc(var(--Body-Line-Height) * var(--Cognitive-Multiplier, 1))",fontSize:"var(--Body-Font-Size)",fontWeight:"var(--Body-Font-Weight)",letterSpacing:"var(--Body-Letter-Spacing)"},"body-small":{fontFamily:"var(--Body-Font-Family)",lineHeight:"calc(var(--Body-Small-Line-Height) * var(--Cognitive-Multiplier, 1))",fontSize:"var(--Body-Small-Font-Size)",fontWeight:"var(--Body-Font-Weight)",letterSpacing:"var(--Body-Small-Letter-Spacing)"},"body-large":{fontFamily:"var(--Body-Font-Family)",lineHeight:"calc(var(--Body-Large-Line-Height) * var(--Cognitive-Multiplier, 1))",fontSize:"var(--Body-Large-Font-Size)",fontWeight:"var(--Body-Font-Weight)",letterSpacing:"var(--Body-Large-Letter-Spacing)"},"body-semibold":{fontFamily:"var(--Body-Font-Family)",lineHeight:"calc(var(--Body-Line-Height) * var(--Cognitive-Multiplier, 1))",fontSize:"var(--Body-Font-Size)",fontWeight:"var(--Body-Semibold-Font-Weight)",letterSpacing:"var(--Body-Letter-Spacing)"},"body-bold":{fontFamily:"var(--Body-Font-Family)",lineHeight:"calc(var(--Body-Line-Height) * var(--Cognitive-Multiplier, 1))",fontSize:"var(--Body-Font-Size)",fontWeight:"var(--Body-Bold-Font-Weight)",letterSpacing:"var(--Body-Letter-Spacing)"},button:{fontFamily:"var(--Body-Font-Family)",lineHeight:"var(--Button-Line-Height)",fontSize:"var(--Button-Font-Size)",fontWeight:"var(--Button-Font-Weight)",letterSpacing:"var(--Button-Letter-Spacing)"},label:{fontFamily:"var(--Body-Font-Family)",lineHeight:"var(--Label-Line-Height)",fontSize:"var(--Label-Font-Size)",fontWeight:"var(--Label-Font-Weight)",letterSpacing:"var(--Label-Letter-Spacing)"},caption:{fontFamily:"var(--Body-Font-Family)",lineHeight:"calc(var(--Body-Small-Line-Height) * var(--Cognitive-Multiplier, 1))",fontSize:"var(--Body-Small-Font-Size)",fontWeight:"var(--Body-Font-Weight)",letterSpacing:"var(--Body-Small-Letter-Spacing)"}},Ws="var(--Link-Visited, var(--Hotlink-Visited))",Ds={primary:{base:"var(--Link, var(--Hotlink))",visited:Ws},standard:{base:"var(--Text)",visited:Ws},quiet:{base:"var(--Text-Quiet)",visited:Ws}};function Ls({children:e,href:r,target:t,rel:a,textStyle:i="body",color:o="primary",disabled:n=!1,onClick:l,className:s="",sx:d={},...c}){const u=Rs[i]||Rs.body,p=Ds[o]||Ds.primary;return se(h,{component:"a",href:n?void 0:r,target:t,rel:"_blank"===t?a||"noopener noreferrer":a,onClick:n?e=>e.preventDefault():l,"aria-disabled":n||void 0,tabIndex:n?-1:void 0,className:"link link-"+i+" link-color-"+o+(n?" link-disabled":"")+" "+s,sx:{fontFamily:u.fontFamily,lineHeight:u.lineHeight,fontSize:u.fontSize,fontWeight:u.fontWeight,letterSpacing:u.letterSpacing,textDecoration:"underline",textUnderlineOffset:"3px",textDecorationThickness:"1px",color:p.base,cursor:n?"not-allowed":"pointer",opacity:n?.5:1,pointerEvents:n?"none":"auto",display:"inline-flex",alignItems:"center",minHeight:"24px",minWidth:"24px",transition:"color 0.15s ease, text-decoration-color 0.15s ease",...!n&&{"&:hover":{textDecorationThickness:"2px"},"&:visited":{color:p.visited},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"2px",borderRadius:"2px"},"&:active":{textDecorationThickness:"2px"}},...d},...c,children:e})}function Fs({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"primary":"primary-outline",size:"small",onClick:t,children:e})}function Hs({code:e}){return se(Ho,{code:e,language:"JSX",wrap:!0,sx:{mt:1}})}function Ps({passes:e}){return de(h,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1.5,py:.5,borderRadius:"20px",backgroundColor:e?"var(--Tags-Success-BG)":"var(--Tags-Error-BG)",color:e?"var(--Tags-Success-Text)":"var(--Tags-Error-Text)",fontSize:"12px",fontWeight:600},children:[se(e?fe:ge,{sx:{fontSize:14}}),e?"WCAG Pass":"WCAG Fail"]})}function Ms({leftLabel:e,rightLabel:r,leftContent:t,rightContent:a,leftCode:i,rightCode:o,leftPasses:n,rightPasses:l}){return de(T,{container:!0,spacing:3,children:[se(T,{item:!0,xs:12,md:6,children:de(h,{sx:{p:2,border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)",backgroundColor:"var(--Background)",height:"100%"},children:[de(h,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[se(_t,{style:{fontWeight:600},children:e}),se(Ps,{passes:n})]}),se(h,{sx:{p:2,backgroundColor:"var(--Surface-Dim, var(--Surface))",borderRadius:"var(--Style-Border-Radius)",minHeight:80},children:t}),se(Hs,{code:i})]})}),se(T,{item:!0,xs:12,md:6,children:de(h,{sx:{p:2,border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)",backgroundColor:"var(--Background)",height:"100%"},children:[de(h,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[se(_t,{style:{fontWeight:600},children:r}),se(Ps,{passes:l})]}),se(h,{sx:{p:2,backgroundColor:"var(--Surface-Dim, var(--Surface))",borderRadius:"var(--Style-Border-Radius)",minHeight:80},children:a}),se(Hs,{code:o})]})})]})}function Es(){const[e,t]=r("column"),[a,i]=r(.5),[o,n]=r("small"),[l,s]=r(!0),[d,c]=r(!1),[u,p]=r(null),[m,f]=r("Surface"),g={small:{label:"Small links ⚡",content:de(ce,{children:[se(Ls,{href:"#",size:"small",children:"Terms of Service"}),se(Ls,{href:"#",size:"small",children:"Privacy Policy"}),se(Ls,{href:"#",size:"small",children:"Cookie Settings"})]})},chips:{label:"Chips ⚡",content:de(ce,{children:[se(Is,{label:"React",size:"small"}),se(Is,{label:"TypeScript",size:"small"}),se(Is,{label:"Design System",size:"small"})]})},normal:{label:"Normal buttons",content:de(ce,{children:[se(bi,{variant:"primary",size:"medium",children:"Primary"}),se(bi,{variant:"secondary",size:"medium",children:"Secondary"})]})},mixed:{label:"Mixed ⚡",content:de(ce,{children:[se(bi,{variant:"primary",size:"medium",children:"Save changes"}),se(Ls,{href:"#",size:"small",children:"Or discard"})]})}},x=["small","chips","mixed"].includes(o),b=l&&x;return de(T,{container:!0,spacing:3,sx:{mt:1},children:[de(T,{item:!0,xs:12,md:7,children:[se(to,{theme:u,children:de(h,{sx:{width:"100%"},children:[b&&de(h,{sx:{mb:2,px:2,py:1,borderRadius:"var(--Style-Border-Radius)",backgroundColor:"var(--Tags-Warning-BG)",color:"var(--Tags-Warning-Text)",fontSize:"12px",fontWeight:600,display:"flex",alignItems:"center",gap:1},children:[se(ge,{sx:{fontSize:16}}),"Small child detected — gap raised to var(--min-stack-gap)"]}),se(mn,{direction:e,gap:a,enforceMinGap:l,flexWrap:d?"wrap":void 0,children:g[o].content})]})}),se(Hs,{code:(()=>{const r=["<OmniStack"];return"column"!==e&&r.push(' direction="'+e+'"'),r.push(" gap={"+a+"}"),l||r.push(" enforceMinGap={false}"),d&&r.push(' flexWrap="wrap"'),r.push(">"),r.push(" {children}"),r.push("</OmniStack>"),r.join("\n")})()})]}),se(T,{item:!0,xs:12,md:5,children:de(h,{sx:{display:"flex",flexDirection:"column",gap:3},children:[se(no,{theme:u,onThemeChange:p,surface:m,onSurfaceChange:f}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"CHILDREN"}),se(h,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:Object.entries(g).map(([e,{label:r}])=>se(Fs,{label:r,selected:o===e,onClick:()=>n(e)},e))})]}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"DIRECTION"}),se(h,{sx:{display:"flex",gap:1},children:["row","column"].map(r=>{return se(Fs,{label:(a=r,a?a.charAt(0).toUpperCase()+a.slice(1):""),selected:e===r,onClick:()=>t(r)},r);var a})})]}),de(h,{children:[de(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:["GAP — ",a," unit",b?" → raised to var(--min-stack-gap)":""]}),de(h,{sx:{display:"flex",alignItems:"center",gap:2},children:[se(h,{component:"input",type:"range",min:0,max:6,step:.5,value:a,onChange:e=>i(Number(e.target.value)),sx:{flex:1,accentColor:"var(--Primary-Color-10)"}}),se(ca,{style:{color:"var(--Text)",minWidth:24,textAlign:"right"},children:a})]})]}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"OPTIONS"}),de(h,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[de(h,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between"},children:[de(h,{children:[se(_t,{children:"Enforce min gap"}),se(ca,{style:{color:b?"var(--Tags-Warning-Text)":"var(--Text-Quiet)",display:"block"},children:b?"⚡ Active — small child detected":x?"Off — WCAG 2.5.8 risk":"No small children detected"})]}),se(qo,{checked:l,onChange:e=>s(e.target.checked),size:"small"})]}),de(h,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[se(_t,{children:"Flex wrap"}),se(qo,{checked:d,onChange:e=>c(e.target.checked),size:"small"})]})]})]})]})})]})}function Os(){return de(h,{sx:{pb:8},children:[se(Vt,{children:"Stack"}),se(ta,{style:{color:"var(--Text-Quiet)",marginTop:8,marginBottom:32,maxWidth:640},children:"OmniStack is a layout primitive built on MUI Stack with one intelligent addition: it automatically enforces a minimum gap between children when it detects small (24px) interactive components — protecting WCAG 2.5.8 compliance without any extra developer effort."}),de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Why it matters"}),se(eo,{children:"Playground"}),se(eo,{children:"API"})]}),se(ro,{value:0,children:de(h,{sx:{pt:3,display:"flex",flexDirection:"column",gap:4},children:[de(h,{sx:{p:3,backgroundColor:"var(--Background)",border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)"},children:[se(Vt,{children:"The problem"}),se(ta,{style:{color:"var(--Text-Quiet)",marginTop:8,marginBottom:16},children:"WCAG 2.5.8 requires that small interactive targets (24px) have enough surrounding space that they don’t overlap adjacent targets. Every layout library leaves this entirely to the developer — meaning it’s silently violated constantly."}),se(Ms,{leftLabel:"Plain MUI Stack — gap too small",rightLabel:"OmniStack — gap auto-enforced",leftPasses:!1,rightPasses:!0,leftContent:de(h,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:[se(Ls,{href:"#",size:"small",children:"Terms of Service"}),se(Ls,{href:"#",size:"small",children:"Privacy Policy"}),se(Ls,{href:"#",size:"small",children:"Cookie Settings"})]}),rightContent:de(mn,{gap:.5,children:[se(Ls,{href:"#",size:"small",children:"Terms of Service"}),se(Ls,{href:"#",size:"small",children:"Privacy Policy"}),se(Ls,{href:"#",size:"small",children:"Cookie Settings"})]}),leftCode:'<Stack gap={0.5}>\n <Link size="small">Terms of Service</Link>\n <Link size="small">Privacy Policy</Link>\n <Link size="small">Cookie Settings</Link>\n</Stack>\n// ⚠ gap=4px — targets overlap',rightCode:'<OmniStack gap={0.5}>\n <Link size="small">Terms of Service</Link>\n <Link size="small">Privacy Policy</Link>\n <Link size="small">Cookie Settings</Link>\n</OmniStack>\n// ✓ small child detected → gap enforced'})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)"},children:[se(Vt,{children:"Mixed component sizes"}),se(ta,{style:{color:"var(--Text-Quiet)",marginTop:8,marginBottom:16},children:"One small child is enough to trigger enforcement for the whole stack — the most common case is a normal button paired with a small cancel link."}),se(Ms,{leftLabel:"Without enforcement",rightLabel:"With enforcement",leftPasses:!1,rightPasses:!0,leftContent:de(h,{sx:{display:"flex",flexDirection:"column",gap:"2px"},children:[se(bi,{variant:"primary",size:"medium",children:"Save changes"}),se(Ls,{href:"#",size:"small",children:"Or discard"})]}),rightContent:de(mn,{gap:.25,children:[se(bi,{variant:"primary",size:"medium",children:"Save changes"}),se(Ls,{href:"#",size:"small",children:"Or discard"})]}),leftCode:'<Stack gap={0.25}>\n <Button size="medium">Save changes</Button>\n <Link size="small">Or discard</Link>\n</Stack>\n// ⚠ Link is 24px — gap too tight',rightCode:'<OmniStack gap={0.25}>\n <Button size="medium">Save changes</Button>\n <Link size="small">Or discard</Link>\n</OmniStack>\n// ✓ Link detected → gap enforced'})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)"},children:[se(Vt,{children:"How detection works"}),se(ta,{style:{color:"var(--Text-Quiet)",marginTop:8,marginBottom:16},children:"OmniStack inspects children at render time using a priority-ordered signal chain. Any one signal is enough to trigger enforcement."}),se(h,{sx:{display:"flex",flexDirection:"column"},children:[{signal:'size="small" prop',example:'<Link size="small" />'},{signal:'data-size="small"',example:'<div data-size="small" />'},{signal:"height={24}",example:"<Box height={24} />"},{signal:"minHeight={24}",example:"<Box minHeight={24} />"},{signal:"sx.minHeight: 24",example:"<Box sx={{ minHeight: 24 }} />"},{signal:"Known component name",example:"Link, Chip, Badge, Caption…"}].map(({signal:e,example:r},t,a)=>de(h,{sx:{display:"flex",alignItems:"center",gap:2,py:1.5,borderBottom:t<a.length-1?"1px solid var(--Border)":"none"},children:[se(h,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"var(--Primary-Color-10)",flexShrink:0}}),se(_t,{style:{flex:"0 0 200px"},children:e}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)"},children:[se(Vt,{children:"Token-driven minimum"}),se(ta,{style:{color:"var(--Text-Quiet)",marginTop:8,marginBottom:16},children:"The minimum gap is a CSS custom property, not a hardcoded value — so it respects your brand spacing scale and responds to theme changes without re-rendering."}),se(Hs,{code:":root {\n --min-stack-gap: 8px; /* Set in your theme.css */\n}\n\n/* OmniStack substitutes the variable, not the value: */\ngap: var(--min-stack-gap, 8px);\n\n/* Dark mode, brand overrides, and media queries\n all work automatically — no re-render needed. */"})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)"},children:[se(Vt,{children:"Auditable opt-out"}),de(ta,{style:{color:"var(--Text-Quiet)",marginTop:8,marginBottom:16},children:["Use ",se("code",{children:"enforceMinGap={false}"})," to opt out. This creates a searchable pattern accessibility audits can grep for — a conscious waiver, not a silent violation."]}),se(Hs,{code:'<OmniStack gap={0.5} enforceMinGap={false}>\n {/* Explicitly waived — auditors can grep:\n enforceMinGap={false}\n to find all waivers in the codebase. */}\n <Link size="small">Terms</Link>\n <Link size="small">Privacy</Link>\n</OmniStack>'})]})]})}),se(ro,{value:1,children:se(Es,{})}),se(ro,{value:2,children:de(h,{sx:{pt:3},children:[se(Vt,{children:"OmniStack props"}),se(ta,{style:{color:"var(--Text-Quiet)",marginTop:4,marginBottom:16},children:"All standard MUI Stack props are supported. These are OmniStack additions:"}),se(h,{sx:{border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)",overflow:"hidden",mb:4},children:[{prop:"enforceMinGap",type:"boolean",default:"true",desc:"Enable/disable smart gap enforcement."},{prop:"minGapToken",type:"string",default:'"--min-stack-gap"',desc:"CSS variable name for the minimum gap value."},{prop:"gap",type:"number|string",default:"undefined",desc:"Desired gap. Enforced against minGapToken when small children detected."},{prop:"direction",type:"string|object",default:'"column"',desc:"Stack direction. Supports responsive breakpoint objects."},{prop:"flexWrap",type:"string",default:"undefined",desc:'"wrap" | "nowrap" | "wrap-reverse"'},{prop:"divider",type:"ReactNode",default:"undefined",desc:"Element rendered between each child."}].map(({prop:e,type:r,default:t,desc:a},i,o)=>de(h,{sx:{display:"grid",gridTemplateColumns:"160px 160px 1fr",gap:2,px:2,py:1.5,alignItems:"start",borderBottom:i<o.length-1?"1px solid var(--Border)":"none",backgroundColor:i%2==0?"transparent":"var(--Surface-Dim, var(--Surface))"},children:[se(ca,{style:{fontFamily:"monospace",color:"var(--Primary-Color-10)",fontWeight:600},children:e}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r}),de(h,{children:[se(ca,{style:{color:"var(--Text)"},children:a}),de(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:2},children:["Default: ",t]})]})]},e))}),se(Vt,{children:"Convenience exports"}),se(h,{sx:{border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)",overflow:"hidden",mb:4},children:[{name:"Stack",desc:"Alias for OmniStack — drop-in MUI Stack replacement"},{name:"HStack",desc:'direction="row" alignItems="center"'},{name:"VStack",desc:'direction="column"'},{name:"CenteredStack",desc:'direction="column" alignItems="center" justifyContent="center"'},{name:"SpaceBetweenStack",desc:'direction="row" justifyContent="space-between"'},{name:"WrapStack",desc:'direction="row" flexWrap="wrap"'},{name:"ResponsiveStack",desc:"column on xs, row on sm+ (breakpoint configurable)"},{name:"GridStack",desc:"Alias for WrapStack"},{name:"InsetStack",desc:"OmniStack with px: 2 horizontal padding"},{name:"ScrollStack",desc:"OmniStack with overflowY: auto"}].map(({name:e,desc:r},t,a)=>de(h,{sx:{display:"grid",gridTemplateColumns:"200px 1fr",gap:2,px:2,py:1.5,borderBottom:t<a.length-1?"1px solid var(--Border)":"none",backgroundColor:t%2==0?"transparent":"var(--Surface-Dim, var(--Surface))"},children:[se(ca,{style:{fontFamily:"monospace",color:"var(--Primary-Color-10)",fontWeight:600},children:e}),se(ca,{style:{color:"var(--Text-Quiet)"},children:r})]},e))}),se(Vt,{children:"Debug attributes"}),se(Hs,{code:'/* When enforcement is active, OmniStack adds: */\nclassName="omni-stack omni-stack-min-gap-enforced"\ndata-min-gap-enforced="true"\n\n/* Target in CSS: */\n.omni-stack-min-gap-enforced { outline: 2px dashed orange; }\n\n/* Query in tests: */\ncontainer.querySelector(\'[data-min-gap-enforced="true"]\')'})]})})]})]})}const Ns={none:void 0,small:"var(--Sm-Card-Radius, var(--Card-Radius))",medium:"var(--Card-Radius)",large:"var(--Lg-Card-Radius, var(--Card-Radius))"};function Qs({children:e,theme:r,surface:t,radius:a="none",elevation:i=0,component:o="div",className:n="",sx:l={},style:s,...d}){const c=Math.max(0,Math.min(5,0|i)),u=Ns[a];if(!c)return se(h,{component:o,"data-theme":r||void 0,"data-surface":t||void 0,className:"omni-box"+(n?" "+n:""),sx:{background:"var(--Background)",boxSizing:"border-box",...u?{borderRadius:u}:{},...l},style:s,...d,children:e});const p=s||{},{width:m,height:f,minWidth:g,minHeight:x,maxWidth:b,maxHeight:v,borderRadius:y,margin:S,marginTop:k,marginRight:B,marginBottom:w,marginLeft:C,...T}=p,z={width:m,height:f,minWidth:g,minHeight:x,maxWidth:b,maxHeight:v,borderRadius:y,margin:S,marginTop:k,marginRight:B,marginBottom:w,marginLeft:C},{width:A,height:I,borderRadius:R,...W}=l;return se(h,{component:o,className:"omni-box-elevation"+(n?" "+n:""),"data-elevation":c,sx:{boxShadow:ei[c],boxSizing:"border-box",width:A,height:I,borderRadius:void 0!==R?R:u},style:z,...d,children:se(h,{"data-theme":r||void 0,"data-surface":t||void 0,className:"omni-box",sx:{width:"100%",height:"100%",background:"var(--Background)",borderRadius:"inherit",boxSizing:"border-box",...W},style:T,children:e})})}const Vs=["Surface","Surface-Dim","Surface-Bright","Container","Container-Low","Container-Lowest","Container-High"],js=["Default","Primary","Primary-Light","Secondary","Secondary-Light","Tertiary","Tertiary-Light","Neutral","Neutral-Light","Info-Light","Success-Light","Warning-Light","Error-Light"];function Gs({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Us(){const[e,t]=r(""),[a,i]=r(""),[o,n]=r(null),[l,s]=r("Surface");return de(Qs,{sx:{pb:8},children:[se(Vt,{children:"Box"}),de(ta,{color:"quiet",style:{marginTop:8,marginBottom:24,maxWidth:720},children:["Bare layout primitive — a slot that participates in the design-system cascade (",se("code",{children:"data-theme"})," / ",se("code",{children:"data-surface"}),") without carrying any chrome. Reach for ",se("code",{children:"<Ratio>"})," or",se("code",{children:" <Card>"})," when you need padding, borders, or shadow."]}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{theme:o,surface:l,children:se(Qs,{sx:{width:"100%",maxWidth:400},children:se(Qs,{theme:e||void 0,surface:a||void 0,children:de(Qs,{sx:{padding:3,backgroundColor:"var(--Background)",color:"var(--Text)",borderRadius:"var(--Style-Border-Radius)",border:"1px dashed var(--Border-Variant)"},children:[se(Gt,{children:"Box content"}),se(ta,{style:{color:"var(--Text-Quiet)",marginTop:6},children:"Anything dropped inside resolves tokens against the Box's theme / surface, if you set them."})]})})})}),se(Ho,{code:(()=>{const r=[];e&&r.push('theme="'+e+'"'),a&&r.push('surface="'+a+'"');return"<Box"+(r.length?" "+r.join(" "):"")+">\n {/* anything */}\n</Box>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(Qs,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"When to use"})]}),se(ro,{value:0,children:de(Qs,{sx:{p:3},children:[se(Qs,{sx:{mb:3},children:se(no,{theme:o,onThemeChange:n,surface:l,onSurfaceChange:s})}),de(Qs,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"THEME (optional)"}),de(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:[se(Gs,{label:"None",selected:!e,onClick:()=>t("")}),js.map(r=>se(Gs,{label:r,selected:e===r,onClick:()=>t(r)},r))]})]}),de(Qs,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SURFACE (optional)"}),de(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:[se(Gs,{label:"None",selected:!a,onClick:()=>i("")}),Vs.map(e=>se(Gs,{label:e,selected:a===e,onClick:()=>i(e)},e))]}),de(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:["Both props are pass-throughs to ",se("code",{children:"data-theme"})," ","and ",se("code",{children:"data-surface"}),". Leave empty to inherit from the parent zone."]})]})]})}),se(ro,{value:1,children:se(Qs,{sx:{p:3},children:de(k,{spacing:2,children:[de(Qs,{children:[se(_t,{style:{fontWeight:700},children:"Reach for Box when…"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:4},children:"you need a wrapper to scope a theme / surface zone, or you want a typed JSX root without painting any visual styling."})]}),de(Qs,{children:[se(_t,{style:{fontWeight:700},children:"Use Ratio when…"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:4},children:"the container needs a fixed proportion (image, video, embed, hero tile) — it carries the same theme / color shell Box used to."})]}),de(Qs,{children:[se(_t,{style:{fontWeight:700},children:"Use Card when…"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:4},children:"the container has a title, body, and actions — Card handles the standard 2-layer chrome plus header / footer slots."})]})]})})})]})})})]})]})}function Xs({children:e,maxWidth:r="lg",disableGutters:t=!1,sx:a={},...i}){return se(M,{maxWidth:r,disableGutters:t,"data-surface":"Surface",sx:{backgroundColor:"var(--Background)",color:"var(--Text)",transition:"all 0.2s ease-in-out",...a},...i,children:e})}function Ys({children:e,container:r=!1,item:t=!1,spacing:a=2,sx:i={},...o}){return se(T,{container:r,item:t,spacing:a,sx:{transition:"all 0.2s ease-in-out",...i},...o,children:e})}function Zs({theme:e,surface:r="Surface",as:t="section",padding:a,className:i,style:o,children:n,...l}){return se(t,{...e?{"data-theme":e}:{},"data-surface":r,className:i,style:{background:"var(--Background)",color:"var(--Text)",...void 0!==a?{padding:a}:{},...o},...l,children:n})}function qs(){return de("div",{children:[se(Vt,{style:{marginBottom:12},children:"Section"}),de(ta,{color:"quiet",style:{marginBottom:32,maxWidth:720},children:[se("code",{children:"<Section>"})," bundles ",se("code",{children:"data-theme"})," +"," ",se("code",{children:"data-surface"})," + background paint into one component. Use anywhere you'd otherwise reach for"," ",se("code",{children:"<section data-theme data-surface style={{ background: var(--Background) }}>"}),". For wrapping without painting (e.g. AppBar's themed zone), use"," ",se("code",{children:"<ThemedZone>"}),"."]}),se(Vt,{style:{marginTop:24,marginBottom:12},children:"Theme + surface"}),se(_t,{color:"quiet",style:{marginBottom:16,display:"block"},children:'Sets data-theme="Primary-Light" + data-surface="Surface", paints --Background.'}),de(Zs,{theme:"Primary-Light",surface:"Surface",padding:"32px",style:{borderRadius:8},children:[se(Vt,{children:"Primary-Light surface"}),se(ta,{children:"Body text picks up --Text automatically."}),se(_t,{color:"quiet",children:"Quiet text picks up --Text-Quiet."}),se("div",{style:{marginTop:12},children:se(bi,{variant:"primary",children:"Primary button"})})]}),se(Vt,{style:{marginTop:32,marginBottom:12},children:"Container surface"}),de(Zs,{surface:"Container",padding:"32px",style:{borderRadius:8},children:[se(Vt,{children:"Container surface (inherits theme)"}),se(ta,{children:"Useful for card-like regions."})]}),se(Vt,{style:{marginTop:32,marginBottom:12},children:"Different element"}),de(_t,{color:"quiet",style:{marginBottom:16,display:"block"},children:["Pass ",se("code",{children:'as="article"'}),", ",se("code",{children:'as="footer"'}),", etc."]}),de(Zs,{as:"article",theme:"Neutral-Dark",surface:"Surface",padding:"32px",style:{borderRadius:8},children:[se(Vt,{children:"Neutral-Dark article"}),se(ta,{children:"Renders as an <article> element."})]})]})}const Js=["1:1","3:4","4:3","16:9","9:16","2:3","3:2","1:2","2:1","9:21","21:9","5:7","7:5","4:5","5:4","5:3","3:5","16:10","10:16","Golden-Horizontal","Golden-Vertical"],Ks="1.618034",$s={"1:1":"1 / 1","3:4":"3 / 4","4:3":"4 / 3","16:9":"16 / 9","9:16":"9 / 16","2:3":"2 / 3","3:2":"3 / 2","1:2":"1 / 2","2:1":"2 / 1","9:21":"9 / 21","21:9":"21 / 9","5:7":"5 / 7","7:5":"7 / 5","4:5":"4 / 5","5:4":"5 / 4","5:3":"5 / 3","3:5":"3 / 5","16:10":"16 / 10","10:16":"10 / 16","Golden-Horizontal":Ks+" / 1","Golden-Vertical":"1 / "+Ks},_s={none:0,xs:1,sm:2,md:3,lg:4,xl:6};function ed({ratio:r="1:1",children:t,variant:a="default",color:i="default",padding:o="none",fit:n="width",placeholder:l=!0,elevated:s=!1,clickable:d=!1,onClick:c,maxWidth:u,maxHeight:p,component:m="div",className:f="",sx:g={},...x}){const b=$s[r]||$s["1:1"],v=(y="default"===i?"Default":i).charAt(0).toUpperCase()+y.slice(1);var y;const S=l&&0===e.Children.count(t),k="default"===i?void 0:v,B="dark"===a?"Surface-Dimmest":"light"===a?"Surface-Brightest":void 0,w=void 0!==_s[o]?_s[o]:_s.none,C=d||!!c,T="default"===a,z=s?Ka:Ja,A=s?$a:Ka;return se(h,{component:m,onClick:C?c:void 0,role:C?"button":void 0,tabIndex:C?0:void 0,className:"ratio ratio-"+r.toLowerCase()+" ratio-"+a+(C?" ratio-clickable":"")+(s?" ratio-elevated":"")+(f?" "+f:""),sx:{aspectRatio:b,flex:"0 0 auto",..."height"===n?{height:"100%",width:"auto",minHeight:24}:{width:"100%",height:"auto",minWidth:24},...void 0!==u&&{maxWidth:u},...void 0!==p&&{maxHeight:p},border:T?"none":"1px solid var(--Border-Variant)",borderRadius:T?0:"var(--Style-Border-Radius)",boxShadow:T?"none":z,overflow:"hidden",transition:"box-shadow 0.2s ease, border-color 0.2s ease",...C&&{cursor:"pointer","&:hover":{borderColor:"var(--Buttons-Default-Border)",boxShadow:A},"&:active":{transform:"scale(0.995)"},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"3px"}},...!C&&!T&&{"&:hover":{boxShadow:A}},...g},...x,children:se(h,{"data-theme":k||void 0,"data-surface":B,sx:{width:"100%",height:"100%",padding:w,backgroundColor:S?"var(--Border)":"var(--Background)",color:"var(--Text)",fontFamily:"inherit",borderRadius:T?0:"calc(var(--Style-Border-Radius) - 1px)",...S?{display:"flex",alignItems:"center",justifyContent:"center"}:{"& > *":{width:"100%",height:"100%"}}},children:S?se(Fa,{size:"large",sx:{color:"var(--Background)"},children:se(Gr,{})}):t})})}const rd=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",td=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}],ad=["default","solid","light","dark"],id=["none","xs","sm","md","lg","xl"];function od({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function nd({color:e,selected:r,onClick:t,variant:a}){const i=rd(e);return se(Qs,{component:"button","data-theme":{solid:i,light:i+"-Light",dark:i,default:void 0}[a],"data-surface":{solid:"Surface",light:"Surface",dark:"Surface-Dimmest",default:"Surface"}[a],onClick:()=>t(e),"aria-label":"Select "+i,"aria-pressed":r,title:i,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Background)",border:r?"2px solid var(--Text)":"2px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&se(he,{sx:{fontSize:16,color:"var(--Text)",pointerEvents:"none"}})})}function ld(){const[e,t]=r("1:1"),[a,i]=r("solid"),[o,n]=r("primary"),[l,s]=r("none"),[d,c]=r(!1),[u,h]=r(!1),[p,m]=r(null),[f,g]=r("Surface");return de(Qs,{sx:{pb:8},children:[se(Vt,{children:"Ratio"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{theme:p,surface:f,children:se(Qs,{sx:{width:"100%",maxWidth:480},children:se(ed,{ratio:e,variant:a,color:o,padding:l,elevated:d,clickable:u})})}),se(Ho,{code:(()=>{const r=['ratio="'+e+'"'];return"default"!==a&&r.push('variant="'+a+'"'),"default"!==o&&r.push('color="'+o+'"'),"none"!==l&&r.push('padding="'+l+'"'),d&&r.push("elevated"),u&&r.push("clickable onClick={handleClick}"),"<Ratio "+r.join(" ")+">\n {/* your content */}\n</Ratio>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(Qs,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Reference"})]}),se(ro,{value:0,children:de(Qs,{sx:{p:3},children:[se(Qs,{sx:{mb:3},children:se(no,{theme:p,onThemeChange:m,surface:f,onSurfaceChange:g})}),de(Qs,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"VARIANT"}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:ad.map(e=>se(od,{label:rd(e),selected:a===e,onClick:()=>i(e)},e))})]}),de(Qs,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{spacing:1.5,children:td.map(e=>de(Qs,{children:[se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:e.label}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:e.colors.map(e=>se(nd,{color:e,selected:o===e,onClick:n,variant:"default"===a?"solid":a},e))})]},e.label))})]}),de(Qs,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"PADDING"}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:id.map(e=>se(od,{label:"none"===e?"None":e.toUpperCase(),selected:l===e,onClick:()=>s(e)},e))})]}),de(Qs,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"RATIO"}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:Js.map(r=>se(od,{label:r,selected:e===r,onClick:()=>t(r)},r))})]}),de(Qs,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(Qs,{children:[se(ma,{children:"Elevated"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Bumps the shadow up one level"})]}),se(qo,{checked:d,onChange:e=>c(e.target.checked),size:"small","aria-label":"Elevated"})]}),de(Qs,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(Qs,{children:[se(ma,{children:"Clickable"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Adds hover, press, and focus-visible"})]}),se(qo,{checked:u,onChange:e=>h(e.target.checked),size:"small","aria-label":"Clickable"})]})]})}),se(ro,{value:1,children:se(Qs,{sx:{p:3},children:de(k,{spacing:3,children:[de(Qs,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"Common use cases"}),se(k,{spacing:0,children:[{label:"1:1",value:"Square thumbnails, avatars, product tiles"},{label:"16:9",value:"Video, hero images, modern displays"},{label:"4:3",value:"Classic photo, presentation slides"},{label:"3:2",value:"DSLR photography, print frames"},{label:"21:9",value:"Cinematic ultrawide"},{label:"9:16 / 4:5 / 5:7",value:"Portrait social media (Stories, Reels, prints)"},{label:"16:10",value:"Laptop / monitor displays"},{label:"Golden-Horizontal",value:"φ : 1 — design framing for cards, hero blocks"},{label:"Golden-Vertical",value:"1 : φ — vertical posters, sidebars"}].map(({label:e,value:r})=>de(Qs,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:e}),se(ca,{style:{color:"var(--Text-Quiet)"},children:r})]},e))})]}),de(ta,{color:"quiet",children:["Built on native CSS ",se("code",{children:"aspect-ratio"}),". The themed shell mirrors Box — pick a variant + color to paint the frame, or keep ",se("code",{children:'variant="default"'}),"for a borderless ratio container."]})]})})})]})})})]})]})}const sd=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",dd=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}],cd=[{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}];function ud({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function hd({color:e,selected:r,onClick:t}){const a=sd(e);return se(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&se(he,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function pd(){const[e,t]=r("standard"),[a,i]=r("default"),[o,n]=r("medium"),[l,s]=r("horizontal"),[d,c]=r(null),[u,p]=r("Surface"),[m,f]=r(!1),g="standard"===e?dd:cd;return de(h,{sx:{pb:8},children:[se(Vt,{children:"Tabs"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{theme:d,surface:u,children:se(h,{sx:{width:"100%",maxWidth:"vertical"===l?500:"100%",display:"flex",flexDirection:"vertical"===l?"row":"column"},children:de($i,{defaultValue:0,variant:e,color:a,size:o,orientation:l,children:[de(_i,{rounded:m,children:[se(eo,{children:"Overview"}),se(eo,{children:"Features"}),se(eo,{children:"Pricing"})]}),se(ro,{value:0,children:se(h,{sx:{p:2},children:se(ta,{style:{color:"var(--Quiet)"},children:"Overview content goes here."})})}),se(ro,{value:1,children:se(h,{sx:{p:2},children:se(ta,{style:{color:"var(--Quiet)"},children:"Features content goes here."})})}),se(ro,{value:2,children:se(h,{sx:{p:2},children:se(ta,{style:{color:"var(--Quiet)"},children:"Pricing content goes here."})})})]})})}),se(Ho,{code:(()=>{const r=[];return"standard"!==e&&r.push('variant="'+e+'"'),"default"!==a&&r.push('color="'+a+'"'),"medium"!==o&&r.push('size="'+o+'"'),"horizontal"!==l&&r.push('orientation="vertical"'),"<Tabs defaultValue={0}"+(r.length?" "+r.join(" "):"")+">\n <TabList"+(m?" rounded":"")+">\n <Tab>Overview</Tab>\n <Tab>Features</Tab>\n <Tab>Pricing</Tab>\n </TabList>\n <TabPanel value={0}>Overview content</TabPanel>\n <TabPanel value={1}>Features content</TabPanel>\n <TabPanel value={2}>Pricing content</TabPanel>\n</Tabs>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[se(h,{sx:{mb:3},children:se(no,{theme:d,onThemeChange:c,surface:u,onSurfaceChange:p})}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:["standard","solid","light","dark"].map(r=>se(ud,{label:sd("standard"===r?"default":r),selected:e===r,onClick:()=>(e=>{t(e),"standard"!==e&&"default"===a&&i("primary")})(r)},r))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{spacing:1.5,children:g.map(e=>de(h,{children:[se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:e.label}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:e.colors.map(e=>se(hd,{color:e,selected:a===e,onClick:i},e))})]},e.label))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),se(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>se(ud,{label:sd(e),selected:o===e,onClick:()=>n(e)},e))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"ORIENTATION"}),se(k,{direction:"row",spacing:1,children:["horizontal","vertical"].map(e=>se(ud,{label:sd(e),selected:l===e,onClick:()=>s(e)},e))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SHAPE"}),se(qo,{label:"Rounded corners",checked:m,onChange:e=>f(e.target.checked)}),de(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:["Off by default. When on, the TabList applies"," ",se("code",{children:"var(--Style-Border-Radius)"})," and clips the active tab's background to fit the rounded shell (",se("code",{children:"overflow: hidden"})," is always on)."]})]})]})}),se(ro,{value:1,children:se(h,{sx:{p:3},children:se(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),se(k,{spacing:0,children:[{label:"TabList",value:'role="tablist" aria-orientation'},{label:"Tab",value:'role="tab" aria-selected aria-controls={panelId}'},{label:"TabPanel",value:'role="tabpanel" aria-labelledby={tabId}'},{label:"Keyboard",value:"Arrow keys navigate tabs. Home/End jump to first/last."},{label:"Focus",value:"outline: 3px solid var(--Focus-Visible); outline-offset: -3px"},{label:"Indicator",value:"Standard: var(--Buttons-{C}-Border). Themed: var(--Text)."}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(_t,{children:[e,":"]}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const md={small:{fontSize:"var(--Body-Small-Font-Size)",gap:"6px",py:"4px"},medium:{fontSize:"var(--Body-Font-Size)",gap:"8px",py:"6px"},large:{fontSize:"var(--Body-Large-Font-Size)",gap:"10px",py:"8px"}};function fd({children:r,separator:t="/",size:a="medium",condense:i=!1,maxItems:o=4,itemsBeforeCollapse:n=1,itemsAfterCollapse:l=1,backOnlyMobile:s=!1,onExpand:d,className:p="",sx:m={},...f}){const g=md[a]||md.medium,x=c.toArray(r).filter(u),b=x.length,v=i&&b>o;let y=x;const[S,k]=e.useState(!1);if(v&&!S){const e=x.slice(0,n),r=x.slice(b-l);y=[...e,se(h,{component:"button",onClick:()=>{k(!0),d?.()},"aria-label":"Show full breadcrumb trail",className:"breadcrumb-ellipsis",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",padding:"2px 4px",cursor:"pointer",fontFamily:"inherit",fontSize:"inherit",color:"var(--Quiet)",borderRadius:"4px","&:hover":{backgroundColor:"var(--Hover)",color:"var(--Text)"},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"1px"}},children:"…"},"__breadcrumb-ellipsis"),...r]}const B=[];y.forEach((e,r)=>{const a=v&&!S?r===y.length-1:r===b-1;B.push(se(h,{component:"li",className:"breadcrumb-item"+(a?" breadcrumb-current":""),sx:{display:"inline-flex",alignItems:"center",...a&&{color:"var(--Text)",fontWeight:600},...!a&&{color:"var(--Quiet)"},maxWidth:"200px","& > *":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},...a?{"aria-current":"page"}:{},children:e},"crumb-"+r)),r<y.length-1&&B.push(se(h,{component:"li",role:"presentation","aria-hidden":"true",className:"breadcrumb-separator",sx:{display:"inline-flex",alignItems:"center",color:"var(--Quiet)",userSelect:"none",fontSize:"inherit",lineHeight:1,flexShrink:0},children:t},"sep-"+r))});const w=b>=2?x[b-2]:null;return de(h,{component:"nav","aria-label":"Breadcrumb",className:"breadcrumbs breadcrumbs-"+a+" "+p,sx:{fontSize:g.fontSize,fontFamily:"var(--Body-Font-Family)",lineHeight:1.5,...m},...f,children:[se(h,{component:"ol",className:"breadcrumbs-list",sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:g.gap,listStyle:"none",margin:0,padding:0,...s&&{"@media (max-width: 600px)":{display:"none"}}},children:B}),s&&w&&de(h,{className:"breadcrumbs-back-mobile",sx:{display:"none","@media (max-width: 600px)":{display:"flex",alignItems:"center",gap:"4px",fontSize:g.fontSize,color:"var(--Link)"}},children:[se(h,{component:"span","aria-hidden":"true",sx:{fontSize:"1.1em",lineHeight:1},children:"←"}),e.cloneElement(w,{style:{...w.props?.style||{},textDecoration:"underline",textUnderlineOffset:"3px"}})]})]})}function gd({children:e,href:r,className:t="",sx:a={},...i}){const o=!!r;return se(h,{component:o?"a":"span",href:r||void 0,className:"breadcrumb-link "+t,sx:{color:"inherit",textDecoration:o?"underline":"none",textUnderlineOffset:"3px",textDecorationThickness:"1px",cursor:o?"pointer":"default",transition:"color 0.15s ease",...o&&{"&:hover":{color:"var(--Link-Hover)",textDecorationThickness:"2px"},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"2px",borderRadius:"2px"}},...a},...i,children:e})}const xd=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"";function bd({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function vd(){const[e,t]=r("medium"),[a,i]=r("/"),[o,n]=r(!1),[l,s]=r(null),[d,c]=r("Surface");return de(h,{sx:{pb:8},children:[se(Vt,{children:"Breadcrumbs"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{theme:l,surface:d,children:de(fd,{size:e,separator:a,condense:o,maxItems:3,children:[se(gd,{href:"#",children:"Home"}),se(gd,{href:"#",children:"Products"}),se(gd,{href:"#",children:"Shoes"}),se(gd,{children:"Running Shoes"})]})}),se(Ho,{code:(()=>{const r=[];return"medium"!==e&&r.push('size="'+e+'"'),"/"!==a&&r.push('separator="'+a+'"'),o&&r.push("condense maxItems={3}"),"<Breadcrumbs"+(r.length?" "+r.join(" "):"")+'>\n <BreadcrumbItem href="/">Home</BreadcrumbItem>\n <BreadcrumbItem href="/products">Products</BreadcrumbItem>\n <BreadcrumbItem href="/products/shoes">Shoes</BreadcrumbItem>\n <BreadcrumbItem>Running Shoes</BreadcrumbItem>\n</Breadcrumbs>'})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[se(h,{sx:{mb:3},children:se(no,{theme:l,onThemeChange:s,surface:d,onSurfaceChange:c})}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),se(k,{direction:"row",spacing:1,children:["small","medium","large"].map(r=>se(bd,{label:xd(r),selected:e===r,onClick:()=>t(r)},r))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SEPARATOR"}),se(k,{direction:"row",spacing:1,children:["/","›","→","·","|"].map(e=>se(bd,{label:e,selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Condense"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Collapse middle items into ellipsis"})]}),se(qo,{variant:"default-outline",checked:o,onChange:e=>n(e.target.checked),size:"small","aria-label":"Condense"})]})]})}),se(ro,{value:1,children:se(h,{sx:{p:3},children:se(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),se(k,{spacing:0,children:[{label:"Nav",value:'<nav aria-label="Breadcrumb">'},{label:"List",value:"<ol> with <li> for each crumb"},{label:"Current",value:'aria-current="page" on the last item'},{label:"Links",value:"BreadcrumbItem renders <a> when href is provided"},{label:"Ellipsis",value:'Expandable button with aria-label="Show full breadcrumb trail"'},{label:"Separator",value:'aria-hidden="true" — decorative only'}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(_t,{children:[e,":"]}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const yd={small:{btnSize:"small",fontSize:"13px",gap:"2px"},medium:{btnSize:"medium",fontSize:"14px",gap:"4px"},large:{btnSize:"large",fontSize:"16px",gap:"4px"}};function Sd({count:e=10,page:t,defaultPage:a=1,onChange:o,color:n="default",size:l="medium",siblingCount:s=1,boundaryCount:d=1,disabled:c=!1,showFirstButton:u=!1,showLastButton:p=!1,className:m="",sx:f={},...g}){const[x,b]=r(a),v=void 0!==t,y=v?t:x;(e=>{e.charAt(0).toUpperCase(),e.slice(1)})("default"===n?"Default":n);const S=yd[l]||yd.medium,k=i(r=>{const t=Math.max(1,Math.min(e,r));v||b(t),o?.(t)},[e,v,o]),B=function({count:e,page:r,siblingCount:t=1,boundaryCount:a=1}){const i=(e,r)=>Array.from({length:r-e+1},(r,t)=>e+t);if(2*t+3+2*a>=e)return i(1,e);const o=Math.max(r-t,a+1),n=Math.min(r+t,e-a),l=o>a+2,s=n<e-a-1;if(!l&&s)return[...i(1,Math.min(3+2*t+a,e)),"ellipsis-right",...i(e-a+1,e)];if(l&&!s){const r=i(Math.max(e-(3+2*t+a)+1,1),e);return[...i(1,a),"ellipsis-left",...r]}return l&&s?[...i(1,a),"ellipsis-left",...i(o,n),"ellipsis-right",...i(e-a+1,e)]:i(1,e)}({count:e,page:y,siblingCount:s,boundaryCount:d}),w="default"===n?"default":n;return se(h,{component:"nav","aria-label":"Pagination",className:"pagination pagination-"+n+" pagination-"+l+" "+m,sx:{display:"inline-flex",...f},...g,children:de(h,{component:"ul",sx:{display:"flex",alignItems:"center",gap:S.gap,listStyle:"none",m:0,p:0,flexWrap:"wrap"},children:[u&&se(h,{component:"li",children:se(bi,{iconOnly:!0,variant:w+"-outline",size:S.btnSize,disabled:c||1===y,onClick:()=>k(1),"aria-label":"Go to first page",children:se(Fa,{size:"small",children:se(Yr,{})})})}),se(h,{component:"li",children:se(bi,{iconOnly:!0,variant:w+"-outline",size:S.btnSize,disabled:c||1===y,onClick:()=>k(y-1),"aria-label":"Go to previous page",children:se(Fa,{size:"small",children:se(Ur,{})})})}),B.map((e,r)=>{if("string"==typeof e)return se(h,{component:"li",children:se(ca,{style:{color:"var(--Quiet)",padding:"0 4px"},"aria-hidden":"true",children:"…"})},e+"-"+r);const t=e===y;return se(h,{component:"li",children:se(bi,{variant:t?w:w+"-outline",size:S.btnSize,disabled:c,onClick:()=>k(e),"aria-label":"Page "+e,"aria-current":t?"page":void 0,letterNumber:!0,children:e})},e)}),se(h,{component:"li",children:se(bi,{iconOnly:!0,variant:w+"-outline",size:S.btnSize,disabled:c||y===e,onClick:()=>k(y+1),"aria-label":"Go to next page",children:se(Fa,{size:"small",children:se(Xr,{})})})}),p&&se(h,{component:"li",children:se(bi,{iconOnly:!0,variant:w+"-outline",size:S.btnSize,disabled:c||y===e,onClick:()=>k(e),"aria-label":"Go to last page",children:se(Fa,{size:"small",children:se(Zr,{})})})})]})})}const kd=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",Bd=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}];function wd({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Cd({color:e,selected:r,onClick:t}){const a=kd(e);return se(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&se(he,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function Td(){const[e,t]=r("default"),[a,i]=r("medium"),[o,n]=r(10),[l,s]=r(!1),[d,c]=r(!1),[u,p]=r(!1),[m,f]=r(null),[g,x]=r("Surface");return de(h,{sx:{pb:8},children:[se(Vt,{children:"Pagination"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{theme:m,surface:g,children:se(Sd,{color:e,size:a,count:o,showFirstButton:l,showLastButton:d,disabled:u})}),se(Ho,{code:(()=>{const r=[];return"default"!==e&&r.push('color="'+e+'"'),"medium"!==a&&r.push('size="'+a+'"'),10!==o&&r.push("count={"+o+"}"),l&&r.push("showFirstButton"),d&&r.push("showLastButton"),u&&r.push("disabled"),r.push("onChange={handlePageChange}"),1===r.length?"<Pagination onChange={handlePageChange} />":"<Pagination\n "+r.join("\n ")+"\n/>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[se(h,{sx:{mb:3},children:se(no,{theme:m,onThemeChange:f,surface:g,onSurfaceChange:x})}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{spacing:1.5,children:Bd.map(r=>de(h,{children:[se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:r.label}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:r.colors.map(r=>se(Cd,{color:r,selected:e===r,onClick:t},r))})]},r.label))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),se(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>se(wd,{label:kd(e),selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"PAGES"}),se(k,{direction:"row",spacing:1,children:[5,10,20,50].map(e=>se(wd,{label:String(e),selected:o===e,onClick:()=>n(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"First/Last Buttons"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Show jump to first/last page"})]}),se(qo,{variant:"default-outline",checked:l,onChange:e=>{s(e.target.checked),c(e.target.checked)},size:"small","aria-label":"First/last buttons"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Disabled"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Non-interactive state"})]}),se(qo,{variant:"default-outline",checked:u,onChange:e=>p(e.target.checked),size:"small","aria-label":"Disabled"})]})]})}),se(ro,{value:1,children:se(h,{sx:{p:3},children:se(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),se(k,{spacing:0,children:[{label:"Nav",value:'<nav aria-label="Pagination">'},{label:"List",value:"<ol> with <li> for each button"},{label:"Current",value:'aria-current="page" on selected page'},{label:"Labels",value:'aria-label="Page N", "Go to previous/next/first/last page"'},{label:"Keyboard",value:"Tab navigates between buttons"},{label:"Focus",value:"Uses Button component focus styles"}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(_t,{children:[e,":"]}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const zd=e=>e.charAt(0).toUpperCase()+e.slice(1),Ad={small:{py:"var(--Sizing-Half)",itemPx:"var(--Sizing-1)",itemPy:"var(--Sizing-Half)",fontSize:"var(--Sm-Button-Text)",minWidth:"140px"},medium:{py:"6px",itemPx:"var(--Sizing-1-and-Half)",itemPy:"6px",fontSize:"var(--Button-Text)",minWidth:"160px"},large:{py:"var(--Sizing-1)",itemPx:"var(--Sizing-2)",itemPy:"var(--Sizing-1)",fontSize:"var(--Lg-Button-Text)",minWidth:"180px"}},Id=l({open:!1,setOpen:()=>{},anchorRef:{current:null},menuId:"",buttonId:"",variant:"outline",color:"default",size:"medium"}),Rd=()=>n(Id);function Wd({children:e,variant:o="outline",color:n="default",size:l="medium",open:s,onOpenChange:d,...c}){const[u,p]=r(!1),m=void 0!==s,f=m?s:u,g=a(null),x=t(),b="menu-"+x,v="menubtn-"+x,y=i(e=>{const r="function"==typeof e?e(f):e;m?d?.(r):p(r)},[m,f,d]);return se(Id.Provider,{value:{open:f,setOpen:y,anchorRef:g,menuId:b,buttonId:v,variant:o,color:n,size:l},children:se(h,{sx:{display:"inline-flex",position:"relative"},...c,children:e})})}function Dd({children:e,className:r="",sx:t={},...a}){const{open:i,setOpen:o,anchorRef:n,menuId:l,buttonId:s,size:d,color:c}=Rd(),u=Ad[d]||Ad.medium,p=zd("default"===c?"Default":c);return de(h,{component:"button",ref:n,id:s,"aria-haspopup":"true","aria-expanded":i,"aria-controls":i?l:void 0,onClick:()=>o(e=>!e),className:"menu-button "+r,sx:{display:"inline-flex",alignItems:"center",gap:"6px",padding:u.itemPy+" "+u.itemPx,fontSize:u.fontSize,fontFamily:"inherit",fontWeight:600,color:"var(--Text)",backgroundColor:"var(--Background)",border:"1px solid var(--Buttons-"+p+"-Border)",borderRadius:"var(--Style-Border-Radius)",cursor:"pointer",boxShadow:"none",transition:"box-shadow 0.15s ease","&:focus-visible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"},...t},onKeyDown:e=>{"ArrowDown"!==e.key&&"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),o(!0))},...a,children:["string"==typeof e?se("small"===d?_t:ta,{style:{color:"inherit",fontWeight:600},children:e}):e,se(Fa,{size:"small",sx:{color:"var(--Quiet)",transition:"transform 0.2s ease",transform:i?"rotate(180deg)":"rotate(0deg)"},children:se(ye,{})})]})}function Ld({children:e,className:r="",placement:t="bottom-start",sx:i={},...n}){const{open:l,setOpen:s,anchorRef:d,menuId:c,buttonId:u,variant:p,color:m,size:f}=Rd(),g=a(null),x=Ad[f]||Ad.medium,b=zd("default"===m?"Default":m),v="var(--Buttons-"+b+"-Border)",y="light"===p?"default"===m?"Default":b:"solid"===p?b:void 0,S="light"===p?"Surface-Brightest":"solid"===p?"Surface":void 0;return o(()=>{if(l&&g.current){const e=g.current.querySelector('[role="menuitem"]:not([aria-disabled="true"])');e&&e.focus()}},[l]),o(()=>{if(!l)return;const e=e=>{g.current&&!g.current.contains(e.target)&&d.current&&!d.current.contains(e.target)&&s(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[l,s,d]),o(()=>{if(!l)return;const e=e=>{"Escape"===e.key&&(s(!1),d.current?.focus())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[l,s,d]),l?se(h,{className:"menu menu-"+p+" "+r,sx:{position:"absolute",top:"100%",left:"bottom-end"===t?"auto":0,right:"bottom-end"===t?0:"auto",zIndex:99999,marginTop:"4px",border:"1px solid "+v,borderRadius:"var(--Dropdown-Frame-Radius, var(--Input-Radius, var(--Style-Border-Radius, 4px)))",boxShadow:"none",overflow:"hidden",...i},children:se(h,{ref:g,id:c,role:"menu","aria-labelledby":u,"data-theme":y,"data-surface":S,sx:{minWidth:x.minWidth,backgroundColor:"var(--Background)",color:"var(--Text)",fontSize:x.fontSize,fontFamily:"inherit",padding:x.py+" 0",outline:"none",borderRadius:"calc(var(--Dropdown-Frame-Radius, var(--Input-Radius, var(--Style-Border-Radius, 4px))) - 1px)"},onKeyDown:e=>{const r=g.current?.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])');if(!r?.length)return;const t=Array.from(r).indexOf(document.activeElement);"ArrowDown"===e.key?(e.preventDefault(),r[(t+1)%r.length].focus()):"ArrowUp"===e.key?(e.preventDefault(),r[(t-1+r.length)%r.length].focus()):"Home"===e.key?(e.preventDefault(),r[0].focus()):"End"===e.key?(e.preventDefault(),r[r.length-1].focus()):"Tab"===e.key&&s(!1)},...n,children:e})}):null}function Fd({children:e,onClick:r,selected:t=!1,disabled:a=!1,className:i="",sx:o={},...n}){const{setOpen:l,size:s}=Rd(),d=Ad[s]||Ad.medium,c=t?"small"===s?qt:Zt:"small"===s?_t:ta,u=()=>{a||(r?.(),l(!1))};return se(h,{role:"menuitem",tabIndex:a?-1:0,"aria-disabled":a||void 0,"aria-selected":t||void 0,onClick:u,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),u())},className:"menu-item"+(t?" menu-item-selected":"")+" "+i,sx:{display:"flex",alignItems:"center",gap:"var(--Sizing-1)",padding:d.itemPy+" "+d.itemPx,fontSize:d.fontSize,color:a?"var(--Quiet)":t?"var(--Text)":"var(--Quiet)",backgroundColor:t?"var(--Hover)":"transparent",cursor:a?"not-allowed":"pointer",opacity:a?.5:1,outline:"none",transition:"background-color 0.1s ease, color 0.1s ease",userSelect:"none",...!a&&{"&:hover":{backgroundColor:"var(--Hover)",color:"var(--Text)"},"&:focus-visible":{backgroundColor:"var(--Hover)",color:"var(--Text)",outline:"3px solid var(--Focus-Visible)",outlineOffset:"-3px"}},...o},...n,children:se(c,{color:"standard",style:{color:"inherit"},children:e})})}function Hd({className:e="",sx:r={},...t}){return se(h,{component:"hr",role:"separator",className:"menu-divider "+e,sx:{border:"none",borderTop:"1px solid var(--Border)",margin:"4px 0",...r},...t})}const Pd=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",Md=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}];function Ed({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Od({color:e,selected:r,onClick:t}){const a=Pd(e);return se(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&se(he,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function Nd(){const[e,t]=r("outline"),[a,i]=r("default"),[o,n]=r("medium"),[l,s]=r(null),[d,c]=r("Surface");return de(h,{sx:{pb:8},children:[se(Vt,{children:"Menu"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{theme:l,surface:d,sx:{minHeight:250,alignItems:"flex-start",pt:6},children:de(Wd,{variant:e,color:a,size:o,children:[se(Dd,{children:"Actions"}),de(Ld,{children:[se(Fd,{children:"Edit"}),se(Fd,{children:"Duplicate"}),se(Fd,{selected:!0,children:"Archive"}),se(Hd,{}),se(Fd,{disabled:!0,children:"Delete"})]})]})}),se(Ho,{code:(()=>{const r=[];return"outline"!==e&&r.push('variant="'+e+'"'),"default"!==a&&r.push('color="'+a+'"'),"medium"!==o&&r.push('size="'+o+'"'),"<Dropdown "+r.join(" ")+">\n <MenuButton>Actions</MenuButton>\n <Menu>\n <MenuItem>Edit</MenuItem>\n <MenuItem>Duplicate</MenuItem>\n <MenuDivider />\n <MenuItem>Delete</MenuItem>\n </Menu>\n</Dropdown>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[se(h,{sx:{mb:3},children:se(no,{theme:l,onThemeChange:s,surface:d,onSurfaceChange:c})}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),se(k,{direction:"row",spacing:1,children:["outline","solid","light"].map(r=>se(Ed,{label:Pd(r),selected:e===r,onClick:()=>t(r)},r))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{spacing:1.5,children:Md.map(e=>de(h,{children:[se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:e.label}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:e.colors.map(e=>se(Od,{color:e,selected:a===e,onClick:i},e))})]},e.label))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),se(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>se(Ed,{label:Pd(e),selected:o===e,onClick:()=>n(e)},e))})]})]})}),se(ro,{value:1,children:se(h,{sx:{p:3},children:se(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),se(k,{spacing:0,children:[{label:"Button",value:'aria-haspopup="true" aria-expanded aria-controls'},{label:"Menu",value:'role="menu" aria-labelledby={buttonId}'},{label:"Items",value:'role="menuitem" with tabIndex'},{label:"Selected",value:'aria-selected="true" on active item'},{label:"Disabled",value:'aria-disabled="true", not focusable'},{label:"Keyboard",value:"Arrow keys navigate. Enter/Space selects. Escape closes."},{label:"Focus",value:"First item focused on open. Focus returns to button on close."}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(_t,{children:[e,":"]}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}let Qd=0;const Vd={default:"Nav-Bar",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},jd="var(--Sizing-1, 8px)",Gd="40px",Ud="var(--Icon-Size, 24px)",Xd="var(--Sizing-Half, 4px)",Yd={horizontal:{px:"var(--Button-Height, 32px)",py:"12px"},vertical:{px:"var(--Sizing-1-and-Half, 12px)",py:"var(--Sizing-2, 16px)"}},Zd={px:0,py:0};function qd({items:e=[],value:t,defaultValue:o=0,onChange:n,showLabels:l=!0,variant:s="fixed",orientation:d="horizontal",barColor:c="default",fabAction:u,fabPosition:p="end",fixed:m=!0,"aria-label":f="Bottom navigation",className:g="",sx:x={},...b}){const[v,y]=r(o),S=void 0!==t,k=S?t:v,B=i(e=>{S||y(e),n?.(e)},[S,n]),w="vertical"===d,C="floating"===s,T=Vd[c]||Vd.default,z=C?w?Yd.vertical:Yd.horizontal:Zd,A=a(null);null===A.current&&(A.current="bottom-nav-"+Qd++);const I=e=>A.current+"-tab-"+e,R=!!u;return de(h,{component:"nav","data-theme":T,"data-surface":"Surface-Dim","aria-label":f,className:"bottom-nav bottom-nav-"+c+" bottom-nav-style-"+(C?"floating":"fixed")+" bottom-nav-bar-"+d+(l?" bottom-nav-labels":" bottom-nav-no-labels")+(m?" bottom-nav-fixed":"")+(g?" "+g:""),sx:{display:"flex",flexDirection:w?"column":"row",alignItems:"center",justifyContent:"center",backgroundColor:"var(--Background)",borderRadius:C?"83px":0,fontFamily:"inherit",width:w?"fit-content":"100%",px:z.px,py:z.py,...m&&{position:"fixed",zIndex:1100,...w?{top:"50%",left:0,transform:"translateY(-50%)"}:{bottom:0,left:0,right:0}},...x},...b,children:[R&&se(h,{role:"tablist","aria-orientation":w?"vertical":"horizontal","aria-owns":e.map((e,r)=>I(r)).join(" "),sx:{position:"absolute",width:0,height:0,overflow:"hidden"}}),de(h,{role:R?void 0:"tablist","aria-orientation":R?void 0:w?"vertical":"horizontal",sx:{display:"flex",flexDirection:w?"column":"row",alignItems:"center",justifyContent:w?"flex-start":"space-between",gap:w?"10px":0,width:w?"auto":"100%",maxWidth:w?void 0:600},children:[e.map((e,r)=>se(Jd,{id:R?I(r):void 0,icon:e.icon,label:e.label,selected:r===k,showLabel:l,onClick:()=>B(r),ariaLabel:e.label||e.ariaLabel},e.key||r)).flatMap((e,r,t)=>{if(!u)return[e];return r===("center"===p?Math.ceil(t.length/2):t.length)-1?[e,se($d,{...u,showLabel:l,position:p},"fab")]:[e]}),u&&0===e.length&&se($d,{...u,showLabel:l,position:p},"fab")]})]})}function Jd({id:e,icon:r,label:t,selected:a,showLabel:i,onClick:o,ariaLabel:n}){return de(h,{component:"button",type:"button",role:"tab",id:e,"aria-selected":a,"aria-label":n,onClick:o,className:"bottom-nav-item"+(a?" bottom-nav-item-selected":""),sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:Xd,width:40,flexShrink:0,border:"none",backgroundColor:"transparent",cursor:"pointer",padding:0,fontFamily:"inherit",outline:"none","&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"2px",borderRadius:"8px"}},children:[se(h,{sx:{display:"flex",alignItems:"center",justifyContent:"center",minWidth:32,minHeight:32,padding:jd,borderRadius:Gd,backgroundColor:a?"var(--Text)":"transparent",color:a?"var(--Background)":"var(--Quiet)",fontSize:Ud,transition:"background-color 0.2s ease, color 0.15s ease","& .MuiSvgIcon-root":{fontSize:"inherit",color:"inherit"},".bottom-nav-item:hover &":a?{}:{color:"var(--Text)"}},children:r}),i&&t&&se(ha,{className:"bottom-nav-label",style:{color:a?"var(--Text)":"var(--Quiet)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},children:t})]})}const Kd=32;function $d({icon:e,label:t,onClick:i,showLabel:n,actions:l,position:s="end"}){const d=Array.isArray(l)&&l.length>0,[c,u]=r(!1),p=a(null);o(()=>{if(!c)return;const e=e=>{p.current&&!p.current.contains(e.target)&&u(!1)},r=e=>{"Escape"===e.key&&u(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",r),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",r)}},[c]);const m=e=>({display:"flex",alignItems:"center",justifyContent:"center",minWidth:e,minHeight:e,boxSizing:"border-box",borderRadius:Gd,borderWidth:"var(--Button-Border-Width, 1px)",borderStyle:"solid",borderColor:"var(--Buttons-Default-Border)",color:"var(--Buttons-Default-Border)",backgroundColor:"transparent","& .MuiSvgIcon-root":{fontSize:"inherit",color:"inherit"}}),f="center"!==s;return de(h,{ref:p,sx:{position:"relative",display:"flex",flexShrink:0},children:[de(h,{component:"button",type:"button","aria-label":t||"Action",onClick:e=>{d&&u(e=>!e),i?.(e)},...d?{"aria-haspopup":"menu","aria-expanded":c}:{},className:"bottom-nav-fab"+(c?" bottom-nav-fab-open":""),sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:Xd,width:40,flexShrink:0,border:"none",backgroundColor:"transparent",cursor:"pointer",padding:0,fontFamily:"inherit",outline:"none","&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"2px",borderRadius:"8px"}},children:[se(h,{sx:{...m(32),padding:jd,fontSize:Ud,transition:"background-color 0.15s ease, transform 0.2s ease",transform:c?"rotate(45deg)":"none",".bottom-nav-fab:hover &":{backgroundColor:"var(--Hover)"},".bottom-nav-fab:active &":{backgroundColor:"var(--Pressed)"}},children:e||se(zr,{})}),n&&t&&se(ha,{className:"bottom-nav-label",style:{color:"var(--Buttons-Default-Border)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},children:t})]}),d&&c&&se(h,{role:"menu","aria-label":t||"Actions",className:"bottom-nav-dial","data-surface":"Surface-Brightest",sx:{position:"absolute",bottom:"calc(100% + var(--Sizing-1, 8px))",...f?{right:0}:{left:0},zIndex:1,display:"flex",flexDirection:"column-reverse",padding:"var(--Sizing-1, 8px)",gap:"var(--Sizing-1, 8px)",backgroundColor:"var(--Background)",color:"var(--Text)",border:"1px solid var(--Border)",borderRadius:"var(--Dropdown-Frame-Radius, var(--Input-Radius, var(--Style-Border-Radius, 4px)))",boxShadow:"var(--Effect-Level-3, none)",whiteSpace:"nowrap"},children:l.map((e,r)=>de(h,{component:"button",type:"button",role:"menuitem","aria-label":e.label,className:"bottom-nav-dial-item",onClick:r=>{u(!1),e.onClick?.(r)},sx:{display:"flex",alignItems:"center",gap:"var(--Sizing-1, 8px)",flexDirection:f?"row-reverse":"row",border:"none",backgroundColor:"transparent",cursor:"pointer",padding:0,fontFamily:"inherit",color:"inherit",outline:"none",borderRadius:Gd,"&:hover":{backgroundColor:"var(--Hover)"},"&:active":{backgroundColor:"var(--Pressed)"},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"2px"}},children:[se(h,{sx:{width:40,display:"flex",justifyContent:"center",flexShrink:0},children:se(h,{sx:{...m(Kd),fontSize:"var(--Icon-Size-Small, 16px)"},children:e.icon||se(zr,{})})}),se(pa,{style:{color:"inherit"},children:e.label})]},e.key||r))})]})}const _d={Home:se(ke,{sx:{fontSize:"inherit"}}),Explore:se(qr,{sx:{fontSize:"inherit"}}),Radio:se(Jr,{sx:{fontSize:"inherit"}}),Library:se(Kr,{sx:{fontSize:"inherit"}}),Favorite:se(Se,{sx:{fontSize:"inherit"}}),Person:se(pe,{sx:{fontSize:"inherit"}}),Search:se(Ce,{sx:{fontSize:"inherit"}}),Settings:se(we,{sx:{fontSize:"inherit"}}),Notifications:se(ze,{sx:{fontSize:"inherit"}}),Cart:se(Ie,{sx:{fontSize:"inherit"}}),Star:se(Te,{sx:{fontSize:"inherit"}}),Bookmark:se($r,{sx:{fontSize:"inherit"}})},ec=Object.keys(_d),rc=[{icon:"Home",label:"Home"},{icon:"Explore",label:"Browse"},{icon:"Radio",label:"Radio"},{icon:"Library",label:"Library"}],tc=[{value:"default",label:"Default",desc:'data-theme="Nav-Bar"'},{value:"primary",label:"Primary",desc:'data-theme="Primary"'},{value:"primary-light",label:"Primary Light",desc:'data-theme="Primary-Light"'},{value:"primary-medium",label:"Primary Medium",desc:'data-theme="Primary-Medium"'},{value:"primary-dark",label:"Primary Dark",desc:'data-theme="Primary-Dark"'},{value:"white",label:"White",desc:'data-theme="White"'},{value:"black",label:"Black",desc:'data-theme="Black"'}];function ac({label:e,selected:r,onClick:t,disabled:a}){return se(h,{component:"button",onClick:t,disabled:a,sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:a?"not-allowed":"pointer",border:"2px solid var(--Buttons-Primary-Button)",borderRadius:"var(--Style-Border-Radius)",backgroundColor:r?"var(--Buttons-Primary-Button)":"transparent",color:r?"var(--Buttons-Primary-Text)":"var(--Text)",padding:"4px 12px",fontSize:"14px",fontFamily:"inherit",fontWeight:500,whiteSpace:"nowrap",flexShrink:0,opacity:a?.4:1,transition:"background-color 0.15s ease, color 0.15s ease","&:hover":{backgroundColor:a?"transparent":r?"var(--Buttons-Primary-Hover)":"var(--Surface-Dim)"},"&:focus-visible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"}},children:e})}function ic({value:e,onChange:r,placeholder:t,sx:a}){return se(h,{component:"input",type:"text",value:e,onChange:e=>r(e.target.value),placeholder:t,sx:{flex:1,padding:"4px 8px",fontSize:"13px",fontFamily:"inherit",border:"1px solid var(--Border)",borderRadius:"4px",backgroundColor:"var(--Background)",color:"var(--Text)",outline:"none",minWidth:0,"&:focus":{borderColor:"var(--Focus-Visible)"},...a}})}function oc({value:e,onChange:r,options:t,label:a}){return se(h,{component:"select",value:e,onChange:e=>r(e.target.value),"aria-label":a,sx:{padding:"4px 6px",fontSize:"13px",fontFamily:"inherit",border:"1px solid var(--Border)",borderRadius:"4px",backgroundColor:"var(--Background)",color:"var(--Text)",outline:"none",cursor:"pointer","&:focus":{borderColor:"var(--Focus-Visible)"}},children:t.map(e=>se("option",{value:"string"==typeof e?e:e.value,children:"string"==typeof e?e:e.label},"string"==typeof e?e:e.value))})}function nc({value:e,onChange:r,min:t,max:a,label:i}){return de(h,{sx:{display:"flex",alignItems:"center",gap:1},children:[se(ca,{style:{color:"var(--Text-Quiet)",flexShrink:0,width:90},children:i}),se("button",{type:"button",onClick:()=>{e>t&&r(e-1)},disabled:e<=t,style:{width:28,height:28,display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--Border)",borderRadius:"4px",backgroundColor:"var(--Background)",color:"var(--Text)",cursor:e<=t?"not-allowed":"pointer",fontSize:"14px",opacity:e<=t?.4:1,fontFamily:"inherit"},children:"−"}),se(h,{sx:{fontWeight:700,fontSize:"14px",minWidth:24,textAlign:"center"},children:e}),se("button",{type:"button",onClick:()=>{e<a&&r(e+1)},disabled:e>=a,style:{width:28,height:28,display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--Border)",borderRadius:"4px",backgroundColor:"var(--Background)",color:"var(--Text)",cursor:e>=a?"not-allowed":"pointer",fontSize:"14px",opacity:e>=a?.4:1,fontFamily:"inherit"},children:"+"})]})}function lc({label:e,checked:r,onChange:t,caption:a,disabled:i}){return de(h,{sx:{py:.5,opacity:i?.4:1},children:[se(b,{control:se(x,{checked:r,onChange:e=>t(e.target.checked),size:"small",disabled:i,sx:{color:"var(--Text-Quiet)","&.Mui-checked":{color:"var(--Buttons-Primary-Button)"}}}),label:se(ma,{children:e}),sx:{m:0}}),a&&se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginLeft:32},children:a})]})}function sc(){const[e,t]=r(0),[a,i]=r(0),[n,l]=r(!0),[s,d]=r(!0),[c,u]=r("fixed"),[p,m]=r("horizontal"),[f,g]=r("default"),[x,b]=r(4),[v,y]=r(rc.map(e=>({icon:e.icon,label:e.label})));o(()=>{y(e=>{const r=[],t=[{icon:"Favorite",label:"Favorites"},{icon:"Person",label:"Profile"}];for(let a=0;a<x;a++)if(e[a])r.push(e[a]);else{const e=t[a-rc.length]||{icon:ec[a%ec.length],label:ec[a%ec.length]};r.push(e)}return r}),i(e=>Math.min(e,x-1))},[x]);const S=(e,r,t)=>{y(a=>{const i=[...a];return i[e]={...i[e],[r]:t},i})},B=v.slice(0,x).map(e=>({icon:_d[e.icon]||_d.Home,label:e.label}));return de(h,{sx:{pb:8},children:[se(Vt,{children:"Bottom Navigation"}),de(E,{value:e,onChange:(e,r)=>t(r),sx:{mt:3,mb:0,borderBottom:"1px solid var(--Border)","& .MuiTabs-indicator":{backgroundColor:"var(--Buttons-Primary-Button)",height:3},"& .MuiTab-root":{color:"var(--Text-Quiet)",textTransform:"none",fontWeight:500,"&.Mui-selected":{color:"var(--Text)"}}},children:[se(O,{label:"Playground"}),se(O,{label:"Accessibility"})]}),0===e&&de(T,{container:!0,sx:{minHeight:400},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"calc((100vw - 432px) / 2)"},flexShrink:0},children:[de(h,{sx:{p:4,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:300,backgroundColor:"var(--Background)",borderBottom:"1px solid var(--Border)",gap:4},children:[se(h,{sx:{width:"100%",maxWidth:500,overflow:"hidden",boxShadow:"0 2px 12px rgba(0,0,0,0.08)"},children:se(qd,{items:B,value:a,onChange:i,showLabels:s,variant:c,orientation:p,barColor:f,fixed:!1},"bn-"+x+"-"+c+"-"+p+"-"+s+"-"+f)}),de(ca,{style:{color:"var(--Text-Quiet)",textAlign:"center"},children:[x," items · ",s?"Labels":"Icons only"," · ","floating"===c?"Floating":"Fixed"," · ","vertical"===p?"Vertical":"Horizontal"," · ",(tc.find(e=>e.value===f)||tc[0]).label]})]}),se(Ho,{code:(()=>{const e=[];e.push("const items = ["),B.forEach((r,t)=>{const a=v[t];e.push(" { icon: <"+a.icon+"Icon />, label: '"+a.label+"' },")}),e.push("];"),e.push("");const r=[];return r.push("items={items}"),"default"!==f&&r.push('barColor="'+f+'"'),s||r.push("showLabels={false}"),"fixed"!==c&&r.push('variant="'+c+'"'),"horizontal"!==p&&r.push('orientation="'+p+'"'),n||r.push("fixed={false}"),e.push("<BottomNavigation"),r.forEach(r=>e.push(" "+r)),e.push("/>"),e.join("\n")})(),language:"JSX",sx:{borderRadius:0,borderBottom:"1px solid var(--Border)"}})]}),de(T,{item:!0,sx:{width:{xs:"calc(100vw - 432px)",md:"calc((100vw - 432px) / 2)"},flexShrink:0,p:3,backgroundColor:"var(--Container)",overflowY:"auto"},children:[se(jt,{children:"Playground"}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"BAR COLOR"}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:tc.map(e=>se(ac,{label:e.label,selected:f===e.value,onClick:()=>g(e.value)},e.value))}),de(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:[(tc.find(e=>e.value===f)||tc[0]).desc,' · data-surface="Surface-Dim" · bg: var(--Background)']})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"OPTIONS"}),de(k,{spacing:0,children:[se(lc,{label:"Fixed",checked:n,onChange:l,caption:"Position fixed to bottom of viewport."}),se(lc,{label:"Labels",checked:s,onChange:d,caption:"Show text labels with icons."}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Selected paints a filled circle in var(--Text) with the icon reversed out of it. Not a choice — the design has one selected state, so there is no switch for it."})]})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),de(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:[se(ac,{label:"Fixed",selected:"fixed"===c,onClick:()=>u("fixed")}),se(ac,{label:"Floating",selected:"floating"===c,onClick:()=>u("floating")})]}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:"floating"===c?"A pill, rounded to its own height so the ends stay semicircular at any length.":"A square band, edge to edge."}),se(ba,{style:{color:"var(--Text-Quiet)",display:"block",margin:"16px 0 8px"},children:"ORIENTATION"}),de(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:[se(ac,{label:"Horizontal",selected:"horizontal"===p,onClick:()=>m("horizontal")}),se(ac,{label:"Vertical",selected:"vertical"===p,onClick:()=>m("vertical")})]}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:"The BAR's direction, not the label's — the label is always under the icon. Vertical is a rail of actions down one side."})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"NAVIGATION ITEMS"}),se(nc,{label:"Count",value:x,onChange:b,min:3,max:6}),se(k,{spacing:1.5,sx:{mt:2},children:v.slice(0,x).map((e,r)=>de(h,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"nowrap"},children:[se(ca,{style:{color:"var(--Text-Quiet)",flexShrink:0,width:16,textAlign:"right"},children:r+1}),se(oc,{value:e.icon,onChange:e=>S(r,"icon",e),options:ec,label:"Item "+(r+1)+" icon"}),s&&se(ic,{value:e.label,onChange:e=>S(r,"label",e),placeholder:"Label"})]},r))})]})]})]}),1===e&&de(h,{sx:{p:4},children:[se(jt,{children:"Accessibility Requirements"}),de(_t,{color:"quiet",style:{marginBottom:32},children:[x," items · ",s?"Labels":"Icons only"," · ","floating"===c?"Floating":"Fixed"," · ","vertical"===p?"Vertical":"Horizontal"," · ",(tc.find(e=>e.value===f)||tc[0]).label]}),de(k,{spacing:4,children:[de(h,{sx:{p:3,backgroundColor:"var(--Container)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),de(k,{spacing:0,children:[de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Landmark:"}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:'<nav role="navigation" aria-label="Bottom navigation">'})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Tab list:"}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:'role="tablist"'})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Tab items:"}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:'role="tab", aria-selected, aria-label'})]}),de(h,{sx:{py:1.5},children:[se(_t,{children:"Focus:"}),se(ca,{style:{color:"var(--Text-Quiet)"},children:"3px solid var(--Focus-Visible) on :focus-visible."})]})]})]}),de(h,{sx:{p:3,backgroundColor:"var(--Container)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"Token Reference"}),de(k,{spacing:0,children:[de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Bar:"}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:'Always: data-surface="Surface-Dim" · bg: var(--Background). Theme set by data-theme (Nav-Bar, Primary, Primary-Light, etc.).'})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Unselected icon/label:"}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:"var(--Text-Quiet)"})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Selected:"}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:"var(--Text)"})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Selected pill:"}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:"bg: var(--Buttons-Primary-Button) · border: 1px solid var(--Buttons-Primary-Border) · icon/text: var(--Buttons-Primary-Text)"})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Backfill + horizontal label:"}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:"Label inside pill: var(--Buttons-Primary-Text)"})]}),de(h,{sx:{py:1.5},children:[se(_t,{children:"Backfill + vertical label:"}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:"Label below pill: var(--Text)"})]})]})]}),de(h,{sx:{p:3,backgroundColor:"var(--Container)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"Best Practices"}),de(k,{spacing:0,children:[de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Item count:"}),se(ca,{style:{color:"var(--Text-Quiet)"},children:"3–5 recommended. 6 maximum."})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Horizontal layout:"}),se(ca,{style:{color:"var(--Text-Quiet)"},children:"Only available with 4 or fewer items."})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Labels:"}),se(ca,{style:{color:"var(--Text-Quiet)"},children:"Always recommended for clarity."})]}),de(h,{sx:{py:1.5},children:[se(_t,{children:"Fixed:"}),se(ca,{style:{color:"var(--Text-Quiet)"},children:"Add bottom padding to main content to avoid overlap."})]})]})]})]})]})]})}const dc={default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},cc={small:{indicator:24,fontSize:"11px",labelFontSize:"13px",connectorThickness:2,gap:0},medium:{indicator:32,fontSize:"13px",labelFontSize:"14px",connectorThickness:2,gap:0},large:{indicator:40,fontSize:"16px",labelFontSize:"16px",connectorThickness:2,gap:0}},uc=l({orientation:"horizontal",size:"medium",color:"primary",activeStep:0,clickable:!1,onStepClick:null,dashedIncomplete:!1,totalSteps:0}),hc=()=>n(uc);function pc({children:r,orientation:t="horizontal",size:a="medium",color:i="primary",activeStep:o=0,clickable:n=!1,onStepClick:l,dashedIncomplete:s=!1,className:d="",sx:c={},...u}){const p=e.Children.toArray(r).filter(e.isValidElement),m=p.length,f="horizontal"===t;return se(uc.Provider,{value:{orientation:t,size:a,color:i,activeStep:o,clickable:n,onStepClick:l,dashedIncomplete:s,totalSteps:m},children:se(h,{component:"ol",role:"list","aria-label":"Progress",className:"stepper stepper-"+t+" stepper-"+a+" stepper-"+i+" "+d,sx:{display:"flex",flexDirection:f?"row":"column",alignItems:f?"flex-start":"stretch",listStyle:"none",margin:0,padding:0,width:"100%",gap:0,...c},...u,children:p.map((r,t)=>e.cloneElement(r,{_index:t,key:r.key||t}))})})}function mc({children:e,icon:r,label:t,_index:a=0,className:i="",sx:o={},...n}){const{orientation:l,size:s,color:d,activeStep:c,clickable:u,onStepClick:p,dashedIncomplete:m,totalSteps:f}=hc(),g=cc[s]||cc.medium,x=dc[d]||"Primary",b="horizontal"===l,v=a===c,y=a<c,S=a>c,k=a===f-1,B=r||a+1,w=t||e,C="var(--Buttons-"+x+"-Border)",T=v||y?"var(--Buttons-"+x+"-Button)":"transparent",z=v||y?"var(--Buttons-"+x+"-Text)":"var(--Text)",A=v||y?"var(--Buttons-"+x+"-Hover)":"var(--Hover)",I=v||y?"var(--Buttons-"+x+"-Pressed)":"var(--Pressed)",R=se(h,{component:u?"button":"div",onClick:u?()=>p?.(a):void 0,onKeyDown:u?e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),p?.(a))}:void 0,tabIndex:u?0:void 0,role:u?"button":void 0,"aria-label":u?"Go to step "+(a+1):void 0,"aria-current":v?"step":void 0,className:"step-indicator step-indicator-"+s+(v?" step-indicator-active":"")+(y?" step-indicator-completed":"")+(S?" step-indicator-incomplete":"")+(u?" step-indicator-clickable":""),sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:g.indicator+"px",height:g.indicator+"px",minWidth:g.indicator+"px",minHeight:g.indicator+"px",borderRadius:"50%",border:(v?"2px":"1px")+" solid "+C,backgroundColor:T,color:z,fontSize:g.fontSize,fontFamily:"inherit",fontWeight:700,lineHeight:1,flexShrink:0,position:"relative",transition:"background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease",cursor:u?"pointer":"default",outline:"none",padding:0,..."small"===s&&{"&::after":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"24px",height:"24px",borderRadius:"50%"}},...u&&{"&:hover":{backgroundColor:A},"&:active":{backgroundColor:I},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"2px"}}},children:B}),W=k?null:se(h,{className:"step-connector"+(y?" step-connector-completed":"")+(S?" step-connector-incomplete":"")+(m&&S?" step-connector-dashed":""),"aria-hidden":"true",sx:{flex:1,...b?{height:g.connectorThickness+"px",minWidth:"20px",alignSelf:"flex-start",marginTop:g.indicator/2-g.connectorThickness/2+"px",marginLeft:"8px",marginRight:"8px"}:{width:g.connectorThickness+"px",minHeight:"24px",marginLeft:g.indicator/2-g.connectorThickness/2+"px",marginTop:"4px",marginBottom:"4px"},backgroundColor:y?"var(--Buttons-"+x+"-Button)":"var(--Border)",...m&&S&&{backgroundColor:"transparent",backgroundImage:b?"repeating-linear-gradient(90deg, var(--Border) 0px, var(--Border) 6px, transparent 6px, transparent 12px)":"repeating-linear-gradient(180deg, var(--Border) 0px, var(--Border) 6px, transparent 6px, transparent 12px)",backgroundSize:b?"12px 100%":"100% 12px"},transition:"background-color 0.15s ease"}}),D=w?se("small"===s?ca:_t,{style:{fontWeight:v?600:400,color:v||y?"var(--Text)":"var(--Quiet)",textAlign:b?"center":"left",whiteSpace:"nowrap",lineHeight:1.3},children:w}):null;return de(h,b?{component:"li",className:"step step-"+s+" step-horizontal"+(v?" step-active":"")+(y?" step-completed":"")+(S?" step-incomplete":"")+" "+i,sx:{display:"flex",alignItems:"center",flex:k?"none":1,...o},...n,children:[de(h,{sx:{display:"flex",flexDirection:"column",alignItems:"center",flexShrink:0},children:[R,D&&se(h,{sx:{mt:"4px"},children:D})]}),W]}:{component:"li",className:"step step-"+s+" step-vertical"+(v?" step-active":"")+(y?" step-completed":"")+(S?" step-incomplete":"")+" "+i,sx:{display:"flex",flexDirection:"column",alignItems:"flex-start",...o},...n,children:[de(h,{sx:{display:"flex",alignItems:"center",gap:"8px"},children:[R,D]}),W]})}const fc=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",gc=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}],xc=["Account","Details","Review","Confirm","Complete","Done"];function bc({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function vc({color:e,selected:r,onClick:t}){const a=fc(e);return se(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&se(he,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function yc(){const[e,t]=r("default"),[a,i]=r("medium"),[o,n]=r("horizontal"),[l,s]=r(4),[d,c]=r(1),[u,p]=r(!1),[m,f]=r(!1),[g,x]=r(null),[b,v]=r("Surface");return de(h,{sx:{pb:8},children:[se(Vt,{children:"Stepper"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{theme:g,surface:b,children:se(h,{sx:{width:"100%",maxWidth:"vertical"===o?300:"100%"},children:se(pc,{color:e,size:a,orientation:o,activeStep:d,clickable:u,onStepClick:u?c:void 0,dashedIncomplete:m,children:xc.slice(0,l).map(e=>se(mc,{label:e},e))})})}),se(Ho,{code:(()=>{const r=[];return"default"!==e&&r.push('color="'+e+'"'),"medium"!==a&&r.push('size="'+a+'"'),"horizontal"!==o&&r.push('orientation="vertical"'),r.push("activeStep={"+d+"}"),u&&r.push("clickable onStepClick={setActiveStep}"),m&&r.push("dashedIncomplete"),"<Stepper "+r.join(" ")+">\n"+xc.slice(0,l).map(e=>' <Step label="'+e+'" />').join("\n")+"\n</Stepper>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[se(h,{sx:{mb:3},children:se(no,{theme:g,onThemeChange:x,surface:b,onSurfaceChange:v})}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STEPS"}),se(k,{direction:"row",spacing:1,children:[2,3,4,5,6].map(e=>se(bc,{label:String(e),selected:l===e,onClick:()=>{s(e),d>=e&&c(e-1)}},e))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"ACTIVE STEP"}),se(k,{direction:"row",spacing:1,children:xc.slice(0,l).map((e,r)=>se(bc,{label:String(r+1),selected:d===r,onClick:()=>c(r)},r))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{spacing:1.5,children:gc.map(r=>de(h,{children:[se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:r.label}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:r.colors.map(r=>se(vc,{color:r,selected:e===r,onClick:t},r))})]},r.label))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),se(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>se(bc,{label:fc(e),selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"ORIENTATION"}),se(k,{direction:"row",spacing:1,children:["horizontal","vertical"].map(e=>se(bc,{label:fc(e),selected:o===e,onClick:()=>n(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Clickable"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Steps are interactive buttons"})]}),se(qo,{variant:"default-outline",checked:u,onChange:e=>p(e.target.checked),size:"small","aria-label":"Clickable"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Dashed Incomplete"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Dashed connector for future steps"})]}),se(qo,{variant:"default-outline",checked:m,onChange:e=>f(e.target.checked),size:"small","aria-label":"Dashed incomplete"})]})]})}),se(ro,{value:1,children:se(h,{sx:{p:3},children:se(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),se(k,{spacing:0,children:[{label:"Container",value:'<ol role="list" aria-label="Progress">'},{label:"Steps",value:"<li> elements with step state classes"},{label:"Active",value:'aria-current="step" on the active indicator'},{label:"Clickable",value:'role="button" aria-label="Go to step N" with tabIndex'},{label:"Focus",value:"outline: 3px solid var(--Focus-Visible); outline-offset: 2px"},{label:"Connectors",value:'aria-hidden="true" — decorative only'}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(_t,{children:[e,":"]}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}function Sc({actions:e=[],variant:t="solid",color:n="default",direction:l="up",speed:s=50,showTooltips:d=!0,open:c,onOpen:u,onClose:p,icon:m,ariaLabel:f="Speed Dial",className:g="",sx:x={},...b}){const[v,y]=r(!1),S=void 0!==c,k=S?c:v,w=a(null),C=t,T=i(()=>{k?(S||y(!1),p?.()):(S||y(!0),u?.())},[k,S,u,p]),z=i((e,r)=>{e.onClick?.(r),S||y(!1),p?.()},[S,p]);o(()=>{if(!k)return;const e=e=>{w.current&&!w.current.contains(e.target)&&(S||y(!1),p?.())};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[k,S,p]),o(()=>{if(!k)return;const e=e=>{"Escape"===e.key&&(S||y(!1),p?.())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[k,S,p]);const A="up"===l||"down"===l,I="up"===l||"down"===l?"left":"top";return de(h,{ref:w,className:"speed-dial speed-dial-"+t+" speed-dial-"+n+" speed-dial-"+l+" "+g,sx:{position:"relative",display:"inline-flex",overflow:"visible",width:A?"56px":"auto",height:A?"auto":"56px",...x},...b,children:[se(En,{size:"large",variant:C,color:n,onClick:T,"aria-label":f,"aria-expanded":k,"aria-haspopup":"menu",sx:{position:"relative",zIndex:2},children:se(h,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",transition:"transform 0.3s ease",transform:k?"rotate(45deg)":"rotate(0deg)"},children:m||se(zr,{})})}),se(h,{role:"menu",sx:{position:"absolute",inset:0,pointerEvents:"none",overflow:"visible"},children:e.map((e,r)=>{const t=(e=>{const r=56+44*e;switch(l){case"up":default:return{bottom:r+"px",left:"12px"};case"down":return{top:r+"px",left:"12px"};case"left":return{right:r+"px",top:"12px"};case"right":return{left:r+"px",top:"12px"}}})(r),a=r*s,i=se(En,{size:"small",variant:C,color:n,role:"menuitem","aria-label":e.name||"Action "+(r+1),onClick:()=>z(e,r),sx:{position:"absolute",...t,opacity:k?1:0,transform:k?"scale(1)":"scale(0.3)",transition:"opacity 0.2s ease, transform 0.2s ease",transitionDelay:k?a+"ms":"0ms",pointerEvents:k?"auto":"none"},children:e.icon||se(zr,{})},e.key||r);return d&&e.name?se(B,{title:e.name,placement:I,arrow:!0,open:!!k&&void 0,slotProps:{tooltip:{sx:{backgroundColor:"var(--Container)",color:"var(--Text)",fontSize:"12px",fontWeight:500,border:"1px solid var(--Border)",boxShadow:"0 2px 8px rgba(0,0,0,0.12)"}},arrow:{sx:{color:"var(--Container)"}}},children:i},e.key||r):i})})]})}const kc=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",Bc=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}],wc=[{name:"Edit",icon:se(Fa,{size:"small",sx:{color:"inherit"},children:se(_r,{})})},{name:"Share",icon:se(Fa,{size:"small",sx:{color:"inherit"},children:se(et,{})})},{name:"Delete",icon:se(Fa,{size:"small",sx:{color:"inherit"},children:se(Be,{})})},{name:"Favorite",icon:se(Fa,{size:"small",sx:{color:"inherit"},children:se(Se,{})})}];function Cc({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Tc({color:e,selected:r,onClick:t}){const a=kc(e);return se(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&se(he,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function zc(){const[e,t]=r("solid"),[a,i]=r("default"),[o,n]=r("up"),[l,s]=r(!0),[d,c]=r(null),[u,p]=r("Surface");return de(h,{sx:{pb:8},children:[se(Vt,{children:"Speed Dial"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{theme:d,surface:u,sx:{minHeight:300,alignItems:"flex-end",justifyContent:"center"},children:se(Sc,{variant:e,color:a,direction:o,showTooltips:l,actions:wc,ariaLabel:"Quick actions"})}),se(Ho,{code:(()=>{const r=[];return"solid"!==e&&r.push('variant="'+e+'"'),"default"!==a&&r.push('color="'+a+'"'),"up"!==o&&r.push('direction="'+o+'"'),l||r.push("showTooltips={false}"),r.push("actions={actions}"),r.push('ariaLabel="Quick actions"'),"<SpeedDial\n "+r.join("\n ")+"\n/>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[se(h,{sx:{mb:3},children:se(no,{theme:d,onThemeChange:c,surface:u,onSurfaceChange:p})}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),se(k,{direction:"row",spacing:1,children:["solid","outline"].map(r=>se(Cc,{label:kc(r),selected:e===r,onClick:()=>t(r)},r))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{spacing:1.5,children:Bc.map(e=>de(h,{children:[se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:e.label}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:e.colors.map(e=>se(Tc,{color:e,selected:a===e,onClick:i},e))})]},e.label))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"DIRECTION"}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:["up","down","left","right"].map(e=>se(Cc,{label:kc(e),selected:o===e,onClick:()=>n(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Tooltips"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Show labels beside actions"})]}),se(qo,{variant:"default-outline",checked:l,onChange:e=>s(e.target.checked),size:"small","aria-label":"Show tooltips"})]})]})}),se(ro,{value:1,children:se(h,{sx:{p:3},children:se(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),se(k,{spacing:0,children:[{label:"FAB",value:'aria-expanded, aria-haspopup="menu", aria-label'},{label:"Actions",value:'role="menu" container, role="menuitem" on each action'},{label:"Labels",value:"aria-label on each action from name prop"},{label:"Keyboard",value:"Escape closes. Click outside closes."},{label:"Focus",value:"outline: 3px solid var(--Focus-Visible); outline-offset: 2px"}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(_t,{children:[e,":"]}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const Ac={primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",black:"BW",white:"BW"};function Ic(e,r){return"var(--"+(Ac[e]||"Primary")+"-Color-"+r+")"}const Rc={primary:{linear:[{family:"primary",tone:8,position:0},{family:"primary",tone:11,position:100}],radial:[{family:"primary",tone:8,position:0},{family:"primary",tone:11,position:100}],mesh:[{family:"primary",tone:8,x:20,y:20,spread:60},{family:"primary",tone:9,x:80,y:30,spread:50},{family:"primary",tone:10,x:50,y:80,spread:55}],meshCard:[{family:"primary",tone:3,x:10,y:10,spread:60},{family:"primary",tone:6,x:80,y:20,spread:50},{family:"primary",tone:9,x:40,y:80,spread:55}]},secondary:{linear:[{family:"secondary",tone:7,position:0},{family:"secondary",tone:10,position:100}],radial:[{family:"secondary",tone:7,position:0},{family:"secondary",tone:10,position:100}],mesh:[{family:"secondary",tone:7,x:15,y:25,spread:55},{family:"secondary",tone:9,x:75,y:35,spread:50},{family:"secondary",tone:11,x:45,y:75,spread:60}],meshCard:[{family:"secondary",tone:2,x:15,y:15,spread:55},{family:"secondary",tone:5,x:85,y:25,spread:50},{family:"secondary",tone:8,x:50,y:75,spread:60}]},tertiary:{linear:[{family:"tertiary",tone:8,position:0},{family:"tertiary",tone:11,position:100}],radial:[{family:"tertiary",tone:8,position:0},{family:"tertiary",tone:11,position:100}],mesh:[{family:"tertiary",tone:8,x:25,y:15,spread:55},{family:"tertiary",tone:10,x:70,y:40,spread:50},{family:"tertiary",tone:11,x:40,y:85,spread:55}],meshCard:[{family:"tertiary",tone:3,x:20,y:10,spread:60},{family:"tertiary",tone:7,x:75,y:30,spread:50},{family:"tertiary",tone:10,x:45,y:80,spread:55}]},black:{linear:[{family:"black",tone:10,position:0},{family:"neutral",tone:3,position:100}],radial:[{family:"black",tone:10,position:0},{family:"neutral",tone:3,position:100}],mesh:[{family:"black",tone:10,x:0,y:0,spread:100},{family:"primary",tone:3,x:25,y:25,spread:50},{family:"secondary",tone:4,x:75,y:35,spread:45},{family:"tertiary",tone:3,x:50,y:80,spread:50}],meshCard:[{family:"black",tone:11,x:0,y:0,spread:100},{family:"primary",tone:5,x:20,y:20,spread:55},{family:"secondary",tone:8,x:80,y:30,spread:45},{family:"tertiary",tone:10,x:45,y:80,spread:50}]},white:{linear:[{family:"white",tone:2,position:0},{family:"neutral",tone:9,position:100}],radial:[{family:"white",tone:2,position:0},{family:"neutral",tone:9,position:100}],mesh:[{family:"white",tone:2,x:0,y:0,spread:100},{family:"primary",tone:9,x:25,y:25,spread:50},{family:"secondary",tone:8,x:75,y:35,spread:45},{family:"tertiary",tone:9,x:50,y:80,spread:50}],meshCard:[{family:"white",tone:1,x:0,y:0,spread:100},{family:"primary",tone:4,x:20,y:20,spread:55},{family:"secondary",tone:7,x:80,y:30,spread:45},{family:"tertiary",tone:10,x:45,y:80,spread:50}]}};function Wc(e,r){const t=Rc[e]||Rc.primary;return(t[r]||t.linear).map(e=>({...e}))}function Dc({variant:e="linear",color:r="primary",angle:t=135,stops:a=null,position:i=null,blobs:o=null,cardProps:n={},minHeight:l=300,children:s,className:d="",sx:c={},...u}){const p="meshCard"===e,m="mesh"===e||p,f="radial"===e,g="linear"===e||f,x=a||Wc(r,f?"radial":"linear"),b=o||Wc(r,p?"meshCard":"mesh"),v=m?function(e){if(!e||0===e.length)return"none";const r=e.map(e=>{const r=Ic(e.family,e.tone),t=e.spread||40;return"radial-gradient(circle at "+e.x+"% "+e.y+"%, "+r+" 0%, transparent "+t+"%)"}),t=Ic(e[0].family,e[0].tone);return r.push(t),r.join(", ")}(b):f?function(e,r){if(!e||0===e.length)return"none";const t=[...e].sort((e,r)=>e.position-r.position).map(e=>Ic(e.family,e.tone)+" "+e.position+"%"),a=r||{x:50,y:50};return"radial-gradient(circle at "+a.x+"% "+a.y+"%, "+t.join(", ")+")"}(x,i||{x:50,y:50}):function(e,r){return e&&0!==e.length?"linear-gradient("+r+"deg, "+[...e].sort((e,r)=>e.position-r.position).map(e=>Ic(e.family,e.tone)+" "+e.position+"%").join(", ")+")":"none"}(x,t),y=g?x[0]:b[0];var S,k;const B=function(e){return"dark"===e?"var(--BW-Color-1)":"var(--BW-Color-6)"}((S=y?.tone||8,"black"===(k=y?.family||"primary")||"white"===k?S<=5?"light":"dark":S<=5?"dark":"light"));return se(h,p?{className:"gradient gradient-mesh-card "+d,sx:{background:v,minHeight:l,borderRadius:"var(--Card-Radius)",display:"flex",alignItems:"center",justifyContent:"center",padding:"var(--Card-Padding)",position:"relative",overflow:"hidden",...c},...u,children:se(In,{variant:"solid",...n,children:se(Rn,{children:s})})}:{className:"gradient gradient-"+e+" "+d,sx:{background:v,minHeight:l,borderRadius:"var(--Card-Radius)",color:B,display:"flex",alignItems:"center",justifyContent:"center",position:"relative",overflow:"hidden",...c},...u,children:s})}const Lc=e=>se(Dc,{variant:"linear",...e}),Fc=e=>se(Dc,{variant:"radial",...e}),Hc=e=>se(Dc,{variant:"mesh",...e}),Pc=e=>se(Dc,{variant:"meshCard",...e});function Mc({children:e,surface:r="Container",outlined:t=!1,variant:a=(t?"outlined":"elevation"),sx:i={},...o}){const{dataSurface:n,elevation:l}=function(e="Container"){const r={"Container-Lowest":{elevation:0,zIndex:0},"Container-Low":{elevation:1,zIndex:100},Container:{elevation:4,zIndex:200},"Container-High":{elevation:8,zIndex:300},"Container-Highest":{elevation:12,zIndex:400}},t=r[e]||r.Container;return{dataSurface:e,elevation:t.elevation,zIndex:t.zIndex}}(r);return se(N,{variant:a,elevation:t?0:l,"data-surface":n,sx:{padding:2,borderRadius:"8px",transition:"all 0.2s ease-in-out",...i},...o,children:e})}function Ec({open:e=!1,onClose:t,anchorRef:i,placement:n="bottom-end",theme:l="Default",surface:s="Surface-Bright",width:d=320,maxHeight:c=400,children:u,sx:p={}}){const m=a(null),[f,g]=r({top:0,left:0,right:"auto"});return o(()=>{if(!e||!i?.current)return;const r=i.current.getBoundingClientRect();g("bottom-end"===n?{top:r.bottom+6,right:window.innerWidth-r.right,left:"auto"}:{top:r.bottom+6,left:r.left,right:"auto"})},[e,i,n]),o(()=>{if(!e)return;const r=e=>{m.current?.contains(e.target)||i?.current?.contains(e.target)||t?.()};return document.addEventListener("pointerdown",r),()=>document.removeEventListener("pointerdown",r)},[e,t,i]),o(()=>{if(!e)return;const r=e=>{"Escape"===e.key&&t?.()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e,t]),e?ve.createPortal(se(h,{ref:m,"data-theme":l,"data-surface":s,sx:{position:"fixed",top:f.top,left:f.left,right:f.right,zIndex:2e9,width:d,maxHeight:c,overflowY:"auto",backgroundColor:"var(--Background)",border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)",boxShadow:$a,...p},children:u}),document.body):null}["default","primary","secondary","tertiary","neutral"].map(e=>{return{value:e,label:(r=e,r?r.charAt(0).toUpperCase()+r.slice(1):"")};var r});const Oc=l(null),Nc=["Default","Primary","Secondary","Tertiary","Neutral","Info","Success","Warning","Error","App-Bar","Nav-Bar","Status"],Qc=["Professional","Modern","Bold","Playful"],Vc=["Surface-Dimmest","Surface-Dim","Surface","Surface-Bright","Surface-Brightest","Container","Container-Low","Container-Lowest","Container-High","Container-Highest"],jc={"light-tonal":{theme:"Primary",rootSurface:"Surface-Brightest"},"grey-professional":{theme:"Neutral",rootSurface:"Surface"},"dark-professional":{theme:"Neutral",rootSurface:"Surface-Dimmest"}},Gc="omni-foundation",Uc="omni-core",Xc="omni-typography",Yc="omni-mode",Zc="omni-base",qc="omni-styles";function Jc(e){document.getElementById(e)?.remove()}function Kc(e,r,t){return r?function(e){return!(!e||"string"!=typeof e)&&(e.startsWith("http")||e.startsWith("/")||e.endsWith(".css"))}(r)?function(e,r,t){const a=document.getElementById(e);return a?"LINK"===a.tagName&&a.getAttribute("href")!==r?new Promise((e,t)=>{a.onload=()=>e(a),a.onerror=()=>t(new Error(`OmniDesignProvider: failed to load ${r}`)),a.setAttribute("href",r)}):Promise.resolve(a):new Promise((a,i)=>{const o=document.createElement("link");o.id=e,o.rel="stylesheet",o.setAttribute("data-omni","true"),o.onload=()=>a(o),o.onerror=()=>i(new Error(`OmniDesignProvider: failed to load ${r}`)),o.href=r;const n=t?document.getElementById(t):null;n?document.head.insertBefore(o,n):document.head.appendChild(o)})}(e,r,t):function(e,r,t){if(!r)return Promise.resolve(null);const a=document.getElementById(e);if(a)return a.textContent=r,Promise.resolve(a);const i=document.createElement("style");i.id=e,i.setAttribute("data-omni","true"),i.textContent=r;const o=t?document.getElementById(t):null;return o?document.head.insertBefore(i,o):document.head.appendChild(i),Promise.resolve(i)}(e,r,t):Promise.resolve(null)}function $c({themeURL:e,foundationCSS:t,coreCSS:n,typographyCSS:l,lightModeCSS:d,darkModeCSS:c,baseCSS:u,stylesCSS:h,defaultTheme:p="Default",defaultStyle:m="Modern",defaultSurface:f="Surface",surfaceStyle:g,defaultDarkMode:x=!1,darkTheme:b="Neutral",darkMode:v,onDarkModeChange:y,className:S,style:k,fullHeight:B=!0,children:w}){const[C,T]=r(x),z=void 0!==v,A=z?v:C,[I,R]=r({foundation:t??null,core:n??null,typography:l??null,lightMode:d??null,darkMode:c??null,base:u??null,styles:h??null}),[W,D]=r({}),L=a(!0);o(()=>(L.current=!0,()=>{L.current=!1}),[]),o(()=>{e&&(X("loading"),async function(e){const r=/\.json(\?|$)/.test(e)?e:`${e.replace(/\/$/,"")}/theme.json`,t=e.replace(/\/$/,"").replace(/\/theme\.json(\?.*)?$/,""),a=await fetch(r);if(!a.ok)throw new Error(`OmniDesignProvider: could not load theme manifest from ${r} (${a.status})`);const i=await a.json(),o=e=>e?/^https?:\/\//i.test(e)?e:`${t}/${e}`:null;return{foundationURL:o(i.foundation),coreURL:o(i.core),typographyURL:o(i.typography),lightModeURL:o(i.lightMode),darkModeURL:o(i.darkMode),baseURL:o(i.base),stylesURL:o(i.styles),defaultTheme:i.defaultTheme??null,defaultStyle:i.defaultStyle??null,defaultSurface:i.defaultSurface??null,darkTheme:i.darkTheme??null,name:i.name??null}}(e).then(e=>{L.current&&(R({foundation:t??e.foundationURL,core:n??e.coreURL,typography:l??e.typographyURL,lightMode:d??e.lightModeURL,darkMode:c??e.darkModeURL,base:u??e.baseURL,styles:h??e.stylesURL}),D({defaultTheme:e.defaultTheme,defaultStyle:e.defaultStyle,defaultSurface:e.defaultSurface,darkTheme:e.darkTheme,name:e.name}))}).catch(e=>{L.current&&(console.error("OmniDesignProvider: manifest error:",e),Z(e.message),X("error"))}))},[e]);const F=g?jc[g]?.theme??p:"Default"!==p?p:W.defaultTheme??p,H=g?jc[g]?.rootSurface??f:W.defaultSurface??f,P=W.defaultStyle??m,M="Neutral"!==b?b:W.darkTheme??b,[E,O]=r(F),[N,Q]=r(P),[V,j]=r(H),G=!!(e||t||n||l||d||c||u||h),[U,X]=r(G?"loading":"ready"),[Y,Z]=r(null);o(()=>{const{foundation:e,core:r,typography:t,base:a,styles:i}=I;if(e||r||t||a||i)return X("loading"),Z(null),Promise.all([Kc(Gc,e),Kc(Uc,r),Kc(Xc,t).catch(e=>{console.warn("OmniDesignProvider: typography CSS did not load —",e.message)}),Kc(Zc,a),Kc(qc,i)]).then(()=>{L.current&&X("ready")}).catch(e=>{L.current&&(console.error("OmniDesignProvider CSS error:",e),Z(e.message),X("error"))}),()=>{Jc(Gc),Jc(Uc),Jc(Xc),Jc(Zc),Jc(qc)};X("ready")},[I.foundation,I.core,I.typography,I.base,I.styles]),o(()=>{const e=A?I.darkMode:I.lightMode;e&&Kc(Yc,e,Zc).catch(e=>console.error("OmniDesignProvider mode CSS error:",e))},[A,I.lightMode,I.darkMode]),o(()=>()=>Jc(Yc),[]);const q=A?M:E,J=i(()=>{z?y?.(!A):T(e=>!e)},[z,A,y]),K=i(e=>{Nc.includes(e)||console.warn(`OmniDesignProvider: unknown theme "${e}"`),O(e)},[]),$=i(e=>{Qc.includes(e)||console.warn(`OmniDesignProvider: unknown style "${e}"`),Q(e)},[]),_=i(e=>{Vc.includes(e)||console.warn(`OmniDesignProvider: unknown surface "${e}"`),j(e)},[]),ee=s(()=>({theme:q,style:N,surface:V,isDark:A,cssStatus:U,cssError:Y,setTheme:K,setStyle:$,setSurface:_,toggleDarkMode:J,themes:Nc,styles:Qc,surfaces:Vc,name:W.name??null}),[q,N,V,A,U,Y,K,$,_,J,W.name]);return de(Oc.Provider,{value:ee,children:[se("style",{"data-omni":"hide-during-load",children:'[data-omni-css="loading"]{visibility:hidden}'}),se("div",{"data-theme":q,"data-style":N,"data-surface":V,"data-omni-css":U,className:S,style:{...B?{minHeight:"100vh"}:{},...k},children:w})]})}function _c(){const e=n(Oc);if(!e)throw new Error("useOmniDesign must be used inside a <OmniDesignProvider>");return e}function eu({theme:e,surface:r,as:t="div",children:a,className:i,style:o,...n}){return se(t,{"data-theme":e,"data-surface":r,className:i,style:o,...n,children:a})}function ru({surface:e,as:r="div",children:t,className:a,style:i,...o}){return se(r,{"data-surface":e,className:a,style:i,...o,children:t})}const tu=e=>d(function(r,t){return se(q,{direction:e,ref:t,...r})}),au={fade:d(function(e,r){return se(Z,{ref:r,...e})}),grow:d(function(e,r){return se(Y,{ref:r,...e})}),zoom:d(function(e,r){return se(X,{ref:r,...e})}),"slide-up":tu("up"),"slide-down":tu("down"),"slide-left":tu("left"),"slide-right":tu("right")},iu={backgroundColor:"var(--Background)",color:"var(--Text)",border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)",boxShadow:"0 8px 32px rgba(0,0,0,0.18)"},ou={color:"var(--Text)",fontWeight:600,fontSize:"18px",fontFamily:"inherit",borderBottom:"1px solid var(--Border)",display:"flex",justifyContent:"space-between",alignItems:"center",py:1.5,px:3},nu={color:"var(--Text)",fontFamily:"inherit",fontSize:"14px",lineHeight:1.6,py:3,px:3},lu={borderTop:"1px solid var(--Border)",px:3,py:1.5,gap:1},su={fontFamily:"inherit",fontWeight:500,fontSize:"14px",borderRadius:"var(--Style-Border-Radius)",padding:"6px 16px",cursor:"pointer",border:"none",transition:"background-color 0.15s, color 0.15s","&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"1px"}},du={primary:{...su,backgroundColor:"var(--Buttons-Primary-Button)",color:"var(--Buttons-Primary-Text)",border:"1px solid var(--Buttons-Primary-Border)","&:hover":{backgroundColor:"var(--Buttons-Primary-Hover)"}},outline:{...su,backgroundColor:"transparent",color:"var(--Text)",border:"1px solid var(--Border)","&:hover":{backgroundColor:"var(--Hover)"}}};function cu({open:e=!1,onClose:r,title:t,children:a,actions:i,maxWidth:o="sm",fullScreen:n=!1,scroll:l="body",alert:s=!1,nonModal:d=!1,transition:c,transitionDuration:u=300,titleId:p="dialog-title",contentId:m="dialog-description",className:f="",sx:g={},PaperProps:x={},...b}){const v=c?au[c]:void 0;let y;try{y=_c()}catch{y=null}const S=y?.theme||"Default",k=y?.style||"Modern",B=y?.surface||"Surface";return de(Q,{open:e,onClose:(e,t)=>{s&&"backdropClick"===t||s&&"escapeKeyDown"===t||r?.(e,t)},maxWidth:!n&&o,fullScreen:n,fullWidth:!n,scroll:l,hideBackdrop:d,disableEnforceFocus:d,disableEscapeKeyDown:s,TransitionComponent:v,transitionDuration:u,"aria-labelledby":p,"aria-describedby":m,className:"dialog dialog-"+o+(n?" dialog-fullscreen":"")+(s?" dialog-alert":"")+(f?" "+f:""),style:{zIndex:1e7},slotProps:{backdrop:{sx:{backgroundColor:d?"transparent":"rgba(0,0,0,0.5)"}}},PaperProps:{...x,"data-theme":S,"data-style":k,"data-surface":B,sx:{...iu,...n&&{borderRadius:0,border:"none"},...x.sx},role:s?"alertdialog":"dialog"},...b,children:[t&&de(V,{id:p,sx:ou,children:[t,!s&&r&&se(w,{"aria-label":"Close dialog",onClick:e=>r(e,"closeButton"),size:"small",sx:{color:"var(--Text-Quiet)","&:hover":{backgroundColor:"var(--Hover)"}},children:se(Dr,{fontSize:"small"})})]}),se(j,{dividers:"paper"===l,sx:{...nu,..."paper"===l&&{maxHeight:n?"none":"400px",overflowY:"auto",borderColor:"var(--Border)"}},children:s?se(G,{id:m,sx:{color:"var(--Text)",fontFamily:"inherit",fontSize:"14px",lineHeight:1.6},children:a}):se(h,{id:m,children:a})}),i&&se(U,{sx:lu,children:i})]})}function uu({open:e,onClose:r,title:t,children:a,confirmText:i="Confirm",cancelText:o="Cancel",onConfirm:n,onCancel:l,...s}){return se(cu,{open:e,onClose:r,title:t,alert:!0,...s,actions:de(ce,{children:[se(h,{component:"button",type:"button",onClick:l||r,sx:du.outline,children:o}),se(h,{component:"button",type:"button",onClick:n||r,sx:du.primary,children:i})]}),children:a})}function hu({open:e,onClose:r,title:t,children:a,submitText:i="Submit",cancelText:o="Cancel",onSubmit:n,...l}){return se(cu,{open:e,onClose:r,title:t,...l,actions:de(ce,{children:[se(h,{component:"button",type:"button",onClick:r,sx:du.outline,children:o}),se(h,{component:"button",type:"button",onClick:n,sx:du.primary,children:i})]}),children:a})}function pu({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function mu(){const[e,t]=r(!1),[a,i]=r("sm"),[o,n]=r(!1),[l,s]=r("none"),[d,c]=r(!1),[u,p]=r(!1),[m,f]=r(null),[g,x]=r("Surface");return de(h,{sx:{pb:8},children:[se(Vt,{children:"Dialog"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{theme:m,surface:g,children:se(bi,{variant:"default",onClick:()=>t(!0),children:"Open Dialog"})}),se(Ho,{code:(()=>{const e=["open={open}","onClose={handleClose}"];return"sm"!==a&&e.push('maxWidth="'+a+'"'),o&&e.push("fullScreen"),d&&e.push("alert"),u&&e.push("nonModal"),"none"!==l&&e.push('transition="'+l+'"'),e.push('title="Dialog Title"'),e.push('actions={<><Button variant="default-outline" onClick={handleClose}>Cancel</Button><Button variant="default" onClick={handleClose}>Confirm</Button></>}'),"<Dialog\n "+e.join("\n ")+"\n>\n Dialog content goes here.\n</Dialog>"})(),language:"JSX",wrap:!0,sx:{mt:2}}),se(cu,{open:e,onClose:(e,r)=>{d&&"backdropClick"===r||t(!1)},maxWidth:a,fullScreen:o,alert:d,nonModal:u,transition:"none"!==l?l:void 0,title:"Dialog Title",actions:de(ce,{children:[se(bi,{variant:"default-outline",size:"small",onClick:()=>t(!1),children:"Cancel"}),se(bi,{variant:"default",size:"small",onClick:()=>t(!1),children:"Confirm"})]}),children:se(ta,{children:"This is the dialog content. You can put any information here that requires user attention or action."})})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[se(h,{sx:{mb:3},children:se(no,{theme:m,onThemeChange:f,surface:g,onSurfaceChange:x})}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),de(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:[["xs","sm","md","lg","xl"].map(e=>se(pu,{label:e.toUpperCase(),selected:a===e,onClick:()=>{i(e),n(!1)}},e)),se(pu,{label:"Full Screen",selected:o,onClick:()=>n(!o)})]})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"TRANSITION"}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:["none","slide-up","slide-down","grow","fade","zoom"].map(e=>{return se(pu,{label:(r=e,r?r.charAt(0).toUpperCase()+r.slice(1):""),selected:l===e,onClick:()=>s(e)},e);var r})})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Alert"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"No backdrop dismiss, no Escape"})]}),se(qo,{variant:"default-outline",checked:d,onChange:e=>c(e.target.checked),size:"small","aria-label":"Alert mode"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Non-Modal"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"No backdrop, interact with content behind"})]}),se(qo,{variant:"default-outline",checked:u,onChange:e=>p(e.target.checked),size:"small","aria-label":"Non-modal"})]})]})}),se(ro,{value:1,children:se(h,{sx:{p:3},children:se(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),se(k,{spacing:0,children:[{label:"Role",value:'role="dialog" (standard) or role="alertdialog" (alert mode)'},{label:"Label",value:"aria-labelledby links to title, aria-describedby links to content"},{label:"Focus",value:"Focus trapped inside dialog. Returns to trigger on close."},{label:"Keyboard",value:"Escape closes (unless alert). Tab cycles through focusable elements."},{label:"Backdrop",value:"Click closes (unless alert or non-modal)"},{label:"Close",value:'Close button with aria-label="Close dialog"'}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(_t,{children:[e,":"]}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const fu={primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},gu={default:"Container-High",solid:"Container-High",soft:"Surface-Brightest"},xu={small:{maxWidth:400,padding:"24px"},medium:{maxWidth:560,padding:"32px"},large:{maxWidth:720,padding:"40px"}},bu={fade:{enter:{from:{opacity:0},to:{opacity:1}},name:"modal-fade"},"slide-up":{enter:{from:{opacity:0,transform:"translateY(40px)"},to:{opacity:1,transform:"translateY(0)"}},name:"modal-slide-up"},"slide-down":{enter:{from:{opacity:0,transform:"translateY(-40px)"},to:{opacity:1,transform:"translateY(0)"}},name:"modal-slide-down"},zoom:{enter:{from:{opacity:0,transform:"scale(0.85)"},to:{opacity:1,transform:"scale(1)"}},name:"modal-zoom"}};function vu(e){const r=bu[e];if(!r)return"";const{from:t,to:a}=r.enter,i=Object.entries(t).map(([e,r])=>e+":"+r).join(";"),o=Object.entries(a).map(([e,r])=>e+":"+r).join(";");return"@keyframes "+r.name+" { from {"+i+"} to {"+o+"} }@keyframes "+r.name+"-backdrop { from { opacity: 0 } to { opacity: 1 } }"}function yu({open:e,onClose:t,children:i,title:n,variant:l="default",color:s="primary",size:d="medium",layout:c="center",transition:u="fade",transitionSpeed:p=250,closeOnBackdrop:m=!0,showCloseButton:f=!0,className:g="",sx:x={},...b}){const v=a(null),y=a(null),[S,k]=r(!1);let B;try{B=_c()}catch{B=null}const w=B?.style||"Modern",C="soft"===l,T="solid"===l,z="fullscreen"===c,A=T||C?fu[s]:null,I=gu[l]||gu.default,R=xu[d]||xu.medium,W=bu[u],D=W?W.name:void 0,L=p+"ms";return o(()=>(e?(y.current=document.activeElement,k(!0),requestAnimationFrame(()=>{v.current?.focus()}),document.body.style.overflow="hidden"):(k(!1),document.body.style.overflow="",y.current?.focus()),()=>{document.body.style.overflow=""}),[e]),o(()=>{if(!e)return;const r=e=>{"Escape"===e.key&&t?.()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e,t]),e||S?de(ce,{children:["none"!==u&&se("style",{children:vu(u)}),se(h,{"aria-hidden":"true",onClick:m?t:void 0,sx:{position:"fixed",inset:0,zIndex:1e7,backgroundColor:"rgba(0,0,0,0.5)",...D&&{animation:D+"-backdrop "+L+" ease-out forwards"}}}),de(h,{role:"dialog","aria-modal":"true","aria-label":n||"Modal",ref:v,tabIndex:-1,"data-surface":I,"data-theme":A||void 0,"data-style":w,className:"modal modal-"+l+" modal-"+d+" modal-"+c+(C||T?" modal-"+s:"")+(g?" "+g:""),sx:{position:"fixed",zIndex:10000001,outline:"none",fontFamily:"inherit",...z?{inset:0,borderRadius:0}:{top:"50%",left:"50%",transform:"translate(-50%, -50%)",maxWidth:R.maxWidth+"px",width:"calc(100% - 32px)",maxHeight:"calc(100vh - 64px)",borderRadius:"var(--Modal-Radius, var(--Style-Border-Radius))"},backgroundColor:"var(--Background)",color:"var(--Text)",boxShadow:"0 8px 32px rgba(0,0,0,0.24)",display:"flex",flexDirection:"column",overflow:"hidden",...D&&{animation:D+" "+L+" ease-out forwards"},...x},...b,children:[(n||f)&&de(h,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:z?4:R.padding,pt:z?3:R.padding,pb:0,flexShrink:0},children:[n&&se(h,{sx:{fontSize:"small"===d?"18px":"large"===d?"24px":"20px",fontWeight:700,color:"var(--Text)",flex:1},children:n}),f&&se(h,{component:"button",type:"button","aria-label":"Close modal",onClick:t,sx:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,borderRadius:"50%",border:"none",backgroundColor:"transparent",color:"var(--Text-Quiet)",cursor:"pointer",flexShrink:0,ml:1,transition:"background-color 0.15s ease, color 0.15s ease","&:hover":{backgroundColor:"var(--Hover)",color:"var(--Text)"},"&:focus-visible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"}},children:se(Dr,{sx:{fontSize:20}})})]}),se(h,{sx:{flex:1,overflowY:"auto",px:z?4:R.padding,pt:z?3:"16px",pb:z?3:R.padding,color:"var(--Text)",fontSize:"small"===d?"13px":"14px",lineHeight:1.6},children:i})]})]}):null}const Su={small:{width:"240px",height:"200px"},medium:{width:"320px",height:"280px"},large:{width:"420px",height:"380px"}},ku={left:{borderRight:"1px solid var(--Border)"},right:{borderLeft:"1px solid var(--Border)"},top:{borderBottom:"1px solid var(--Border)"},bottom:{borderTop:"1px solid var(--Border)"}},Bu={left:{top:0,left:0,bottom:0},right:{top:0,right:0,bottom:0},top:{top:0,left:0,right:0},bottom:{bottom:0,left:0,right:0}},wu={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"};function Cu({children:e,open:r=!1,onClose:t,size:n="medium",anchor:l="left",hideBackdrop:s=!1,className:d="",sx:c={},...u}){const p=a(null),m=a(null),f="left"===l||"right"===l;let g;try{g=_c()}catch{g=null}const x=g?.theme||"Default",b=g?.style||"Modern",v=Su[n]||Su.medium;o(()=>{if(!r)return;const e=e=>{"Escape"===e.key&&t?.()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r,t]),o(()=>{r?(m.current=document.activeElement,requestAnimationFrame(()=>{const e=p.current?.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');e?e.focus():p.current?.focus()})):m.current&&(m.current.focus(),m.current=null)},[r]),o(()=>{if(r){const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[r]);const y=i(e=>{if("Tab"!==e.key||!p.current)return;const r=p.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(!r.length)return;const t=r[0],a=r[r.length-1];e.shiftKey?document.activeElement===t&&(e.preventDefault(),a.focus()):document.activeElement===a&&(e.preventDefault(),t.focus())},[]);return r?de(ce,{children:[!s&&se(h,{onClick:()=>t?.(),"aria-hidden":"true",sx:{position:"fixed",inset:0,zIndex:1e7,backgroundColor:"rgba(0, 0, 0, 0.5)",transition:"opacity 0.3s ease"}}),se(h,{ref:p,role:"dialog","aria-modal":"true",tabIndex:-1,"data-theme":x,"data-style":b,"data-surface":"Surface-Dim",onKeyDown:y,className:"drawer drawer-"+n+" drawer-"+l+" "+d,sx:{position:"fixed",zIndex:10000001,...Bu[l],...f?{width:v.width,height:"100%"}:{height:v.height,width:"100%"},backgroundColor:"var(--Background)",color:"var(--Text)",...ku[l],boxShadow:Ka,display:"flex",flexDirection:"column",outline:"none",overflow:"hidden",animation:"drawer-slide-in 0.3s ease forwards","@keyframes drawer-slide-in":{from:{transform:wu[l]},to:{transform:"translate(0, 0)"}},...c},...u,children:e})]}):null}function Tu({onClick:e,className:r="",sx:t={},...a}){return se(h,{sx:{position:"absolute",top:"12px",right:"12px",zIndex:1,...t},className:r,...a,children:se(bi,{iconOnly:!0,variant:"ghost",size:"small",onClick:e,"aria-label":"Close drawer",children:se(Fa,{size:"small",children:se(Dr,{})})})})}function zu({children:e,className:r="",sx:t={},...a}){return se(h,{className:"drawer-header "+r,sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px",borderBottom:"1px solid var(--Border)",flexShrink:0,...t},...a,children:e})}function Au({children:e,className:r="",sx:t={},...a}){return se(h,{className:"drawer-content "+r,sx:{flex:1,overflowY:"auto",padding:"16px",...t},...a,children:e})}const Iu={compact:{minHeight:"24px",fontSize:"13px",iconSize:16,gap:"6px"},default:{minHeight:"32px",fontSize:"14px",iconSize:18,gap:"8px"}},Ru={none:void 0,slide:"omni-tree-slide 0.25s ease",spring:"omni-tree-slide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1)"},Wu={"@keyframes omni-tree-slide":{from:{opacity:0,transform:"translateY(-4px)"},to:{opacity:1,transform:"none"}}};function Du(e,r,t=1,a=[]){return e.forEach((i,o)=>{a.push({item:i,level:t,index:o,siblings:e.length}),i.children?.length&&r.includes(i.id)&&Du(i.children,r,t+1,a)}),a}function Lu(e,r,t=null){for(const a of e){if(a.id===r)return t;if(a.children?.length){const e=Lu(a.children,r,a.id);if(null!=e)return e;if(null===e&&a.children.some(e=>e.id===r))return a.id}}return null}function Fu({node:e,density:r,expanded:t,selected:a,focusedId:i,multiSelect:o,checkboxSelection:n,disableSelection:l,disabledItemsFocusable:s,collapseIcon:d,expandIcon:c,animation:u,onToggle:p,onSelect:m,onFocusItem:f,registerRef:g}){const{item:x,level:b,index:v,siblings:y}=e,S=Iu[r]||Iu.default,k="compact"===r?ca:_t,B=!!x.children?.length,w=B&&t.includes(x.id),C=a.includes(x.id),T=!!x.disabled,z=!T||s;return de(h,{component:"li",role:"treeitem","aria-expanded":B?w:void 0,"aria-selected":l?void 0:C,"aria-disabled":T||void 0,"aria-level":b,"aria-setsize":y,"aria-posinset":v+1,tabIndex:i===x.id&&z?0:-1,ref:e=>g(x.id,e),onFocus:e=>{e.stopPropagation(),f(x.id)},sx:{outline:"none",listStyle:"none",...x.sx||{}},children:[de(h,{className:"omni-tree-content",onClick:e=>{T||(e.stopPropagation(),B&&p(e,x.id),l||m(e,x.id))},sx:{display:"flex",alignItems:"center",gap:S.gap,minHeight:S.minHeight,padding:"0 8px",marginLeft:0,borderRadius:"var(--Style-Border-Radius)",border:"1px solid transparent",color:C?"var(--Text)":"var(--Quiet)",fontWeight:C?600:400,backgroundColor:C?"var(--Pressed)":"transparent",cursor:T?"not-allowed":"pointer",opacity:T?.45:1,transition:"color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease",...T?{}:{"&:hover":{color:"var(--Text)",backgroundColor:"var(--Hover)"},"&:active":{color:"var(--Text)",backgroundColor:"var(--Pressed)"}},"li:focus-visible > &":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"-3px"}},children:[se(h,{"aria-hidden":"true",sx:{width:S.iconSize,height:S.iconSize,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",color:"inherit"},children:B&&(w?d:c)}),n&&!l&&se(Ri,{checked:C,disabled:T,size:"small","aria-hidden":"true",tabIndex:-1,onChange:()=>{}}),x.icon&&se(Fa,{size:"small",sx:{color:"inherit",flexShrink:0},children:x.icon}),se(k,{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"inherit",fontWeight:"inherit"},children:x.label}),x.badge&&se(h,{sx:{flexShrink:0},children:x.badge})]}),B&&w&&se(h,{component:"ul",role:"group",sx:{margin:0,padding:0,paddingLeft:"8px",marginLeft:"12px",borderLeft:"1px solid var(--Border)",listStyle:"none",animation:Ru[u]},children:x.children.map((e,h)=>se(Fu,{node:{item:e,level:b+1,index:h,siblings:x.children.length},density:r,expanded:t,selected:a,focusedId:i,multiSelect:o,checkboxSelection:n,disableSelection:l,disabledItemsFocusable:s,collapseIcon:d,expandIcon:c,animation:u,onToggle:p,onSelect:m,onFocusItem:f,registerRef:g},e.id))})]})}function Hu({color:e="default",variant:t="solid",surface:o,density:n="default",animation:l="slide",selectionStyle:d,items:c=Pu,selectionMode:u="single",checkboxSelection:p=!1,disableSelection:m=!1,disabledItemsFocusable:f=!1,defaultExpandedItems:g,expandedItems:x,onExpandedItemsChange:b,selectedItems:v,onSelectedItemsChange:y,onItemExpansionToggle:S,onItemSelectionToggle:k,slots:B,"aria-label":w="Tree view",className:C="",sx:T={},...z}){const A=d||t,I="multi"===u,[R,W]=r(g||[]),D=void 0!==x?x:R,[L,F]=r(v||(I?[]:null)),H=void 0!==v?v:L,P=Array.isArray(H)?H:H?[H]:[],M=s(()=>Du(c,D),[c,D]),[E,O]=r(null),N=E??M[0]?.item.id??null,Q=a({}),V=i((e,r)=>{r?Q.current[e]=r:delete Q.current[e]},[]),j=i(e=>{O(e),Q.current[e]?.focus()},[]),G=i((e,r)=>{const t=D.includes(r),a=t?D.filter(e=>e!==r):[...D,r];void 0===x&&W(a),b?.(e,a),S?.(e,r,!t)},[D,x,b,S]),U=i((e,r)=>{const t=P.includes(r),a=I?t?P.filter(e=>e!==r):[...P,r]:[r],i=I?a:a[0]??null;void 0===v&&F(i),y?.(e,i),k?.(e,r,!I||!t)},[P,I,v,y,k]),X=i(e=>{const r=M.filter(e=>!e.item.disabled||f),t=r.findIndex(e=>e.item.id===N),a=r[t];if(!a)return;const{item:i}=a,o=!!i.children?.length,n=o&&D.includes(i.id),l=t=>{const a=r[Math.max(0,Math.min(r.length-1,t))];a&&(e.preventDefault(),j(a.item.id))};switch(e.key){case"ArrowDown":l(t+1);break;case"ArrowUp":l(t-1);break;case"Home":l(0);break;case"End":l(r.length-1);break;case"ArrowRight":o&&!n?(e.preventDefault(),G(e,i.id)):n&&l(t+1);break;case"ArrowLeft":if(n)e.preventDefault(),G(e,i.id);else{const r=Lu(c,i.id);r&&(e.preventDefault(),j(r))}break;case"Enter":case" ":e.preventDefault(),m?o&&G(e,i.id):U(e,i.id)}},[M,N,D,c,f,m,j,G,U]),Y=(Z=e).charAt(0).toUpperCase()+Z.slice(1);var Z;const q="default"===A?void 0:Y,J=o||("light"===A?"Surface-Brightest":"Surface-Dim"),K=B?.collapseIcon?se(B.collapseIcon,{}):se(Fa,{size:"small",sx:{color:"inherit",transform:"rotate(90deg)"},children:se(Xr,{})}),$=B?.expandIcon?se(B.expandIcon,{}):se(Fa,{size:"small",sx:{color:"inherit"},children:se(Xr,{})});return se(h,{"data-theme":q,"data-surface":J,className:"omni-treeview omni-treeview-"+A+" omni-treeview-"+e+" omni-treeview-"+n+(C?" "+C:""),sx:{backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",overflow:"hidden",...Wu,...T},children:se(h,{component:"ul",role:"tree","aria-label":w,"aria-multiselectable":I||void 0,onKeyDown:X,sx:{margin:0,padding:"8px",listStyle:"none",fontFamily:"inherit"},...z,children:c.map((e,r)=>se(Fu,{node:{item:e,level:1,index:r,siblings:c.length},density:n,expanded:D,selected:P,focusedId:N,multiSelect:I,checkboxSelection:p,disableSelection:m,disabledItemsFocusable:f,collapseIcon:K,expandIcon:$,animation:l,onToggle:G,onSelect:U,onFocusItem:O,registerRef:V},e.id))})})}const Pu=[{id:"1",label:"Design System",children:[{id:"1-1",label:"Foundations",children:[{id:"1-1-1",label:"Colors"},{id:"1-1-2",label:"Typography"},{id:"1-1-3",label:"Spacing"}]},{id:"1-2",label:"Components",children:[{id:"1-2-1",label:"Buttons"},{id:"1-2-2",label:"Inputs"},{id:"1-2-3",label:"Navigation",disabled:!0}]}]},{id:"2",label:"Tokens",children:[{id:"2-1",label:"Light Mode"},{id:"2-2",label:"Dark Mode"}]},{id:"3",label:"Changelog"}],Mu=e=>se(Hu,{variant:"solid",...e}),Eu=e=>se(Hu,{variant:"light",...e}),Ou=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",Nu=[{id:"home",label:"Home"},{id:"products",label:"Products",children:[{id:"featured",label:"Featured"},{id:"new",label:"New Arrivals"},{id:"sale",label:"On Sale"}]},{id:"about",label:"About"},{id:"contact",label:"Contact"}];function Qu({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Vu(){const[e,t]=r(!1),[a,i]=r("medium"),[o,n]=r("left"),[l,s]=r(null),[d,c]=r("Surface");return de(h,{sx:{pb:8},children:[se(Vt,{children:"Drawer"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{theme:l,surface:d,children:se(bi,{variant:"default",onClick:()=>t(!0),children:"Open Drawer"})}),se(Ho,{code:(()=>{const e=["open={open}","onClose={handleClose}"];return"medium"!==a&&e.push('size="'+a+'"'),"left"!==o&&e.push('anchor="'+o+'"'),"<Drawer "+e.join(" ")+">\n <DrawerHeader>\n <H5>Navigation</H5>\n <DrawerClose onClick={handleClose} />\n </DrawerHeader>\n <DrawerContent>\n <OmniTreeView items={navItems} />\n </DrawerContent>\n</Drawer>"})(),language:"JSX",wrap:!0,sx:{mt:2}}),de(Cu,{open:e,onClose:()=>t(!1),size:a,anchor:o,children:[de(zu,{children:[se(Gt,{children:"Navigation"}),se(Tu,{onClick:()=>t(!1)})]}),se(Au,{children:se(Hu,{items:Nu,variant:"solid",color:"default",defaultExpandedItems:["products"],sx:{border:"none",borderRadius:0}})})]})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[se(h,{sx:{mb:3},children:se(no,{theme:l,onThemeChange:s,surface:d,onSurfaceChange:c})}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),se(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>se(Qu,{label:Ou(e),selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"ANCHOR"}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:["left","right","top","bottom"].map(e=>se(Qu,{label:Ou(e),selected:o===e,onClick:()=>n(e)},e))})]})]})}),se(ro,{value:1,children:se(h,{sx:{p:3},children:se(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),se(k,{spacing:0,children:[{label:"Role",value:'role="dialog" aria-modal="true"'},{label:"Focus",value:"Focus trapped inside drawer. Returns to trigger on close."},{label:"Keyboard",value:"Escape closes. Tab cycles focusable elements."},{label:"Backdrop",value:"Click closes. Body scroll locked while open."},{label:"Close",value:'Button with aria-label="Close drawer"'}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(_t,{children:[e,":"]}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const ju={small:{minHeight:"120px",padding:"16px",iconSize:"20px",gap:1},medium:{minHeight:"200px",padding:"32px 24px",iconSize:"32px",gap:2},large:{minHeight:"300px",padding:"48px 24px",iconSize:"48px",gap:3}};function Gu({onFiles:e,accept:t,multiple:o=!1,size:n="medium",disabled:l=!1,icon:s,label:d,sublabel:c,children:u,className:p="",sx:m={},...f}){const[g,x]=r(!1),b=a(null),v=a(0),y=ju[n]||ju.medium,S=i(r=>{!l&&r?.length&&e?.(Array.from(r))},[l,e]),k=i(e=>{e.preventDefault(),e.stopPropagation(),v.current=0,x(!1),l||S(e.dataTransfer.files)},[l,S]),B=i(e=>{e.preventDefault(),e.stopPropagation()},[]),w=i(e=>{e.preventDefault(),e.stopPropagation(),v.current++,l||x(!0)},[l]),C=i(e=>{e.preventDefault(),e.stopPropagation(),v.current--,0===v.current&&x(!1)},[]),T=i(()=>{l||b.current?.click()},[l]),z=i(e=>{l||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),b.current?.click())},[l]),A=i(e=>{S(e.target.files),e.target.value=""},[S]),I=s||rt,R=o?"Drag and drop files here":"Drag and drop file here";return de(h,{role:"button",tabIndex:l?-1:0,"aria-label":d||R,"aria-disabled":l||void 0,onClick:T,onKeyDown:z,onDrop:k,onDragOver:B,onDragEnter:w,onDragLeave:C,className:"drop-zone drop-zone-"+n+(g?" drop-zone-dragging":"")+(l?" drop-zone-disabled":"")+" "+p,sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:y.gap,minHeight:y.minHeight,padding:y.padding,border:"2px dashed",borderColor:g?"var(--Buttons-Primary-Border)":"var(--Buttons-Default-Border)",borderRadius:"32px",backgroundColor:g?"var(--Hover)":"transparent",color:"var(--Text)",cursor:l?"not-allowed":"pointer",opacity:l?.5:1,outline:"none",transition:"background-color 0.2s ease, border-color 0.2s ease",textAlign:"center",...!l&&{"&:hover":{backgroundColor:"var(--Hover)",borderColor:"var(--Buttons-Primary-Border)"},"&:active":{backgroundColor:"var(--Pressed)",borderColor:"var(--Buttons-Primary-Border)"},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"2px",borderColor:"var(--Buttons-Primary-Border)"}},...m},...f,children:[se("input",{ref:b,type:"file",accept:t,multiple:o,onChange:A,style:{display:"none"},"aria-hidden":"true",tabIndex:-1}),u||de(ce,{children:[se(I,{sx:{fontSize:y.iconSize,color:"var(--Text-Quiet)"}}),se(_t,{style:{color:"var(--Text)"},children:d||R}),se(ca,{style:{color:"var(--Text-Quiet)"},children:c||"or click to browse"})]})]})}const Uu={small:{px:"12px",py:"8px",fontSize:"13px",iconSize:"18px",gap:"8px"},medium:{px:"16px",py:"12px",fontSize:"14px",iconSize:"20px",gap:"10px"},large:{px:"20px",py:"14px",fontSize:"16px",iconSize:"22px",gap:"12px"}};function Xu({children:e,variant:r="light",surface:t,color:a="info",size:i="medium",startDecorator:o,endDecorator:n,className:l="",sx:s={},...d}){const c=(e=>e.charAt(0).toUpperCase()+e.slice(1))("default"===a?"Default":a),u=Uu[i]||Uu.medium,p="default"===a?"Default":c,m=t||("light"===r?"Surface-Brightest":"Surface"),f="var(--Buttons-"+c+"-Border)",g=de(ce,{children:[o&&se(h,{className:"alert-start-decorator",sx:{display:"inline-flex",alignItems:"center",fontSize:u.iconSize,lineHeight:1,flexShrink:0,mt:"2px"},children:o}),se(h,{className:"alert-message",sx:{flex:1,minWidth:0},children:"string"==typeof e?se("small"===i?_t:ta,{children:e}):e}),n&&se(h,{className:"alert-end-decorator",sx:{display:"inline-flex",alignItems:"flex-start",flexShrink:0,gap:u.gap,paddingTop:"2px"},children:n})]});return se(h,{role:"alert",className:"alert alert-"+r+" alert-"+i+" alert-"+a+" "+l,sx:{border:"1px solid "+f,borderRadius:"var(--Style-Border-Radius)",overflow:"hidden",boxShadow:Ka,...s},...d,children:se(h,{"data-theme":p,"data-surface":m,className:"alert-inner",sx:{display:"flex",alignItems:"flex-start",gap:u.gap,padding:u.py+" "+u.px,fontSize:u.fontSize,fontFamily:"inherit",lineHeight:1.5,color:"var(--Text)",backgroundColor:"var(--Background)",borderRadius:"calc(var(--Style-Border-Radius) - 1px)"},children:g})})}const Yu=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",Zu=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}],qu={info:se(be,{}),success:se(fe,{}),warning:se(ge,{}),error:se(xe,{})};function Ju({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Ku({color:e,selected:r,onClick:t}){const a=Yu(e);return se(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&se(he,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function $u(){const[e,t]=r("light"),[a,i]=r("info"),[o,n]=r("medium"),[l,s]=r(!0),[d,c]=r(null),[u,p]=r("Surface"),m=l&&qu[a]?se(Fa,{size:"small",sx:{color:"inherit"},children:qu[a]}):void 0;return de(h,{sx:{pb:8},children:[se(Vt,{children:"Alert"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{theme:d,surface:u,children:se(h,{sx:{width:"100%",maxWidth:480},children:se(Xu,{variant:e,color:a,size:o,startDecorator:m,children:"This is an alert message. Check the details for more information."})})}),se(Ho,{code:(()=>{const r=['variant="'+e+'"'];return"info"!==a&&r.push('color="'+a+'"'),"medium"!==o&&r.push('size="'+o+'"'),l&&qu[a]&&r.push("startDecorator={<Icon><"+Yu(a)+"Icon /></Icon>}"),"<Alert "+r.join(" ")+">\n This is an alert message.\n</Alert>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[se(h,{sx:{mb:3},children:se(no,{theme:d,onThemeChange:c,surface:u,onSurfaceChange:p})}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),se(k,{direction:"row",spacing:1,children:["solid","light"].map(r=>se(Ju,{label:Yu(r),selected:e===r,onClick:()=>t(r)},r))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{spacing:1.5,children:Zu.map(e=>de(h,{children:[se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:e.label}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:e.colors.map(e=>se(Ku,{color:e,selected:a===e,onClick:i},e))})]},e.label))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),se(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>se(Ju,{label:Yu(e),selected:o===e,onClick:()=>n(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Show Icon"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Start decorator icon"})]}),se(qo,{variant:"default-outline",checked:l,onChange:e=>s(e.target.checked),size:"small","aria-label":"Show icon"})]})]})}),se(ro,{value:1,children:se(h,{sx:{p:3},children:se(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),se(k,{spacing:0,children:[{label:"Role",value:'role="alert" — live region, announced immediately'},{label:"Border",value:"var(--Buttons-{Color}-Border) on outer shell"},{label:"Shadow",value:"var(--Effect-Level-3)"},{label:"Icons",value:"Decorative — aria-hidden by default via Icon component"}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(_t,{children:[e,":"]}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const _u={small:{px:"12px",py:"8px",fontSize:"13px",gap:"8px",minWidth:"240px"},medium:{px:"16px",py:"10px",fontSize:"14px",gap:"12px",minWidth:"300px"},large:{px:"20px",py:"14px",fontSize:"16px",gap:"16px",minWidth:"360px"}};function eh({children:e,open:r=!1,onClose:t,variant:n="light",surface:l,color:s="info",size:d="medium",anchor:c="bottom",autoHideDuration:u,startDecorator:p,endDecorator:m,action:f,className:g="",sx:x={},...b}){const v=a(null),y=(e=>e.charAt(0).toUpperCase()+e.slice(1))("default"===s?"Default":s),S=_u[d]||_u.medium,k="small"===d?_t:ta,B="default"===s?"Default":y,w=l||("light"===n?"Surface-Brightest":"Surface"),C="var(--Buttons-"+y+"-Border)";o(()=>{if(r&&u&&u>0)return v.current=setTimeout(()=>{t?.({},"timeout")},u),()=>clearTimeout(v.current)},[r,u,t]),o(()=>{if(!r)return;const e=e=>{"Escape"===e.key&&t?.(e,"escapeKeyDown")};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r,t]);const T=i(()=>{v.current&&clearTimeout(v.current)},[]),z=i(()=>{r&&u&&u>0&&(v.current=setTimeout(()=>{t?.({},"timeout")},u))},[r,u,t]),A="top"===c?{from:{transform:"translateX(-50%) translateY(-120%)"},to:{transform:"translateX(-50%) translateY(0)"}}:{from:{transform:"translateX(-50%) translateY(120%)"},to:{transform:"translateX(-50%) translateY(0)"}};return r?se(h,{role:"alert","aria-live":"polite","aria-atomic":"true",onMouseEnter:T,onMouseLeave:z,className:"snackbar snackbar-"+n+" snackbar-"+d+" snackbar-"+c+" snackbar-"+s+" "+g,sx:{position:"fixed",left:"50%",transform:"translateX(-50%)",..."top"===c?{top:"16px"}:{bottom:"16px"},zIndex:1400,minWidth:S.minWidth,maxWidth:"min(560px, calc(100vw - 32px))",border:"1px solid "+C,borderRadius:"var(--Style-Border-Radius)",boxShadow:Ka,overflow:"hidden",animation:"snackbar-slide-in 0.3s ease forwards","@keyframes snackbar-slide-in":A,...x},...b,children:de(h,{"data-theme":B,"data-surface":w,sx:{display:"flex",alignItems:"center",gap:S.gap,padding:S.py+" "+S.px,fontSize:S.fontSize,fontFamily:"inherit",lineHeight:1.4,color:"var(--Text)",backgroundColor:"var(--Background)",borderRadius:"calc(var(--Style-Border-Radius) - 1px)"},children:[p&&se(h,{sx:{display:"inline-flex",flexShrink:0,lineHeight:1},children:p}),se(h,{sx:{flex:1,minWidth:0},children:"string"==typeof e?se(k,{children:e}):e}),f&&se(h,{sx:{display:"inline-flex",flexShrink:0},children:f}),m&&se(h,{sx:{display:"inline-flex",flexShrink:0,lineHeight:1},children:m}),t&&se(bi,{iconOnly:!0,variant:"ghost",size:"small",onClick:e=>t(e,"closeClick"),"aria-label":"Close notification",sx:{flexShrink:0,ml:"4px"},children:se(Fa,{size:"small",children:se(Dr,{})})})]})}):null}const rh=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",th=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}],ah={info:se(be,{}),success:se(fe,{}),warning:se(ge,{}),error:se(xe,{})};function ih({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function oh({color:e,selected:r,onClick:t}){const a=rh(e);return se(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&se(he,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function nh(){const[e,t]=r("light"),[a,i]=r("info"),[o,n]=r("medium"),[l,s]=r("bottom"),[d,c]=r(!0),[u,p]=r(!0),[m,f]=r(!1),[g,x]=r(null),[b,v]=r("Surface"),y=d&&ah[a]?se(Fa,{size:"small",sx:{color:"inherit"},children:ah[a]}):void 0;return de(h,{sx:{pb:8},children:[se(Vt,{children:"Snackbar"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{theme:g,surface:b,children:se(bi,{variant:"default",onClick:()=>f(!0),children:"Show Snackbar"})}),se(Ho,{code:(()=>{const r=["open={open}"];return r.push('variant="'+e+'"'),"info"!==a&&r.push('color="'+a+'"'),"medium"!==o&&r.push('size="'+o+'"'),"bottom"!==l&&r.push('anchor="top"'),u&&r.push("onClose={handleClose}"),d&&ah[a]&&r.push("startDecorator={<Icon><"+rh(a)+"Icon /></Icon>}"),"<Snackbar\n "+r.join("\n ")+"\n>\n Operation completed successfully.\n</Snackbar>"})(),language:"JSX",wrap:!0,sx:{mt:2}}),se(eh,{open:m,onClose:u?()=>f(!1):void 0,variant:e,color:a,size:o,anchor:l,autoHideDuration:4e3,startDecorator:y,children:"Operation completed successfully."})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[se(h,{sx:{mb:3},children:se(no,{theme:g,onThemeChange:x,surface:b,onSurfaceChange:v})}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),se(k,{direction:"row",spacing:1,children:["solid","light"].map(r=>se(ih,{label:rh(r),selected:e===r,onClick:()=>t(r)},r))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{spacing:1.5,children:th.map(e=>de(h,{children:[se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:e.label}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:e.colors.map(e=>se(oh,{color:e,selected:a===e,onClick:i},e))})]},e.label))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),se(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>se(ih,{label:rh(e),selected:o===e,onClick:()=>n(e)},e))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"ANCHOR"}),se(k,{direction:"row",spacing:1,children:["top","bottom"].map(e=>se(ih,{label:rh(e),selected:l===e,onClick:()=>s(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Show Icon"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Start decorator icon"})]}),se(qo,{variant:"default-outline",checked:d,onChange:e=>c(e.target.checked),size:"small","aria-label":"Show icon"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Close Button"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Show dismiss button"})]}),se(qo,{variant:"default-outline",checked:u,onChange:e=>p(e.target.checked),size:"small","aria-label":"Close button"})]})]})}),se(ro,{value:1,children:se(h,{sx:{p:3},children:se(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),se(k,{spacing:0,children:[{label:"Role",value:'role="alert" aria-live="polite" aria-atomic="true"'},{label:"Close",value:'Button with aria-label="Close notification"'},{label:"Keyboard",value:"Escape closes. Auto-hides after duration."},{label:"Hover",value:"Pauses auto-hide timer on mouse enter"},{label:"Border",value:"var(--Buttons-{Color}-Border) on outer shell"},{label:"Shadow",value:"var(--Effect-Level-3)"}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(_t,{children:[e,":"]}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const lh={default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",white:"Neutral",black:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},sh={small:{diameter:24,thickness:3,fontSize:"9px",labelSize:"0px"},medium:{diameter:40,thickness:4,fontSize:"12px",labelSize:"12px"},large:{diameter:56,thickness:5,fontSize:"14px",labelSize:"14px"}};function dh({value:e,color:r="primary",size:a="medium",thickness:i,showValue:o=!1,children:n,className:l="",sx:s={},...d}){const c=lh[r]||"Primary",u="number"==typeof a?{diameter:a,thickness:Math.max(2,Math.round(a/11)),fontSize:Math.max(8,Math.round(a/3.3))+"px"}:sh[a]||sh.medium,p=i||u.thickness,m=null!=e,f=m?Math.min(100,Math.max(0,e)):0,g=(u.diameter-p)/2,x=2*Math.PI*g,b=m?x-f/100*x:.75*x,v="var(--Buttons-"+c+"-Border)",y="cp-grad-"+t().replace(/:/g,"");return de(h,{role:"progressbar","aria-valuenow":m?Math.round(f):void 0,"aria-valuemin":m?0:void 0,"aria-valuemax":m?100:void 0,"aria-label":m?Math.round(f)+"% progress":"Loading",className:"circular-progress circular-progress-"+a+" circular-progress-"+r+(m?" circular-progress-value":" circular-progress-indeterminate")+" "+l,sx:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:u.diameter+"px",height:u.diameter+"px",flexShrink:0,...!m&&{animation:"circular-progress-spin 1.2s linear infinite","@keyframes circular-progress-spin":{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}},...s},...d,children:[de("svg",{viewBox:"0 0 "+u.diameter+" "+u.diameter,width:u.diameter,height:u.diameter,style:{position:"absolute",top:0,left:0,transform:"rotate(-90deg)"},children:[se("defs",{children:de("linearGradient",{id:y,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[se("stop",{offset:"0%",stopColor:v,stopOpacity:"0"}),se("stop",{offset:"100%",stopColor:v,stopOpacity:"1"})]})}),se("circle",{cx:u.diameter/2,cy:u.diameter/2,r:g,fill:"none",stroke:"var(--Border-Variant)",strokeWidth:p,className:"circular-progress-track"}),se("circle",{cx:u.diameter/2,cy:u.diameter/2,r:g,fill:"none",stroke:"url(#"+y+")",strokeWidth:p,strokeDasharray:x,strokeDashoffset:b,strokeLinecap:"round",className:"circular-progress-indicator",style:{transition:m?"stroke-dashoffset 0.4s ease":"none"}})]}),(o||n)&&m&&se(h,{className:"circular-progress-label","aria-hidden":"true",sx:{position:"relative",zIndex:1,fontSize:u.fontSize,fontWeight:700,fontFamily:"inherit",lineHeight:1,color:"var(--Text)",userSelect:"none"},children:n||Math.round(f)+"%"})]})}const ch=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",uh=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}];function hh({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function ph({color:e,selected:r,onClick:t}){const a=ch(e);return se(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&se(he,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function mh(){const[e,t]=r("default"),[a,i]=r("medium"),[o,n]=r(!1),[l,s]=r(65),[d,c]=r(!1),[u,p]=r(null),[m,f]=r("Surface");return de(h,{sx:{pb:8},children:[se(Vt,{children:"Circular Progress"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{theme:u,children:se(dh,{color:e,size:a,value:o?l:void 0,showValue:o&&d})}),se(Ho,{code:(()=>{const r=[];return"default"!==e&&r.push('color="'+e+'"'),"medium"!==a&&r.push('size="'+a+'"'),o&&(r.push("value={"+l+"}"),d&&r.push("showValue")),0===r.length?"<CircularProgress />":"<CircularProgress\n "+r.join("\n ")+"\n/>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[se(h,{sx:{mb:3},children:se(no,{theme:u,onThemeChange:p,surface:m,onSurfaceChange:f})}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{spacing:1.5,children:uh.map(r=>de(h,{children:[se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:r.label}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:r.colors.map(r=>se(ph,{color:r,selected:e===r,onClick:t},r))})]},r.label))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),se(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>se(hh,{label:ch(e),selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Determinate"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Show a static arc at a specific value"})]}),se(qo,{checked:o,onChange:e=>n(e.target.checked),size:"small","aria-label":"Determinate"})]}),o&&de(ce,{children:[se(h,{sx:{mt:2},children:se(us,{label:"Value",min:0,max:100,value:l,onChange:(e,r)=>s(r),size:"small",valueLabelDisplay:"auto"})}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Show Label"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Center percentage text"})]}),se(qo,{checked:d,onChange:e=>c(e.target.checked),size:"small","aria-label":"Show label"})]})]})]})}),se(ro,{value:1,children:se(h,{sx:{p:3},children:de(k,{spacing:3,children:[de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),de(k,{spacing:0,children:[de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Role:"}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:'role="progressbar"'})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Determinate:"}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:'aria-valuenow, aria-valuemin="0", aria-valuemax="100"'})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Indeterminate:"}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:'aria-label="Loading" (no value attributes)'})]}),de(h,{sx:{py:1.5},children:[se(_t,{children:"Label:"}),se(ca,{style:{color:"var(--Text-Quiet)"},children:"Center percentage label is aria-hidden — screen readers use aria-valuenow."})]})]})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"Token Reference"}),de(k,{spacing:0,children:[de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Track (back circle):"}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:"var(--Border-Variant)"})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Fill (progress arc):"}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:"var(--Buttons-{Color}-Border)"})]}),de(h,{sx:{py:1.5},children:[se(_t,{children:"Center label:"}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:"var(--Text)"})]})]})]})]})})})]})})})]})]})}const fh={default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},gh={small:{height:"4px",borderRadius:"2px"},medium:{height:"6px",borderRadius:"3px"},large:{height:"8px",borderRadius:"4px"}};function xh({value:e,color:r="primary",size:t="medium",className:a="",sx:i={},...o}){const n=fh[r]||"Primary",l=gh[t]||gh.medium,s=null!=e,d=s?Math.min(100,Math.max(0,e)):0,c="var(--Buttons-"+n+"-Border)";return se(h,{role:"progressbar","aria-valuenow":s?Math.round(d):void 0,"aria-valuemin":s?0:void 0,"aria-valuemax":s?100:void 0,"aria-label":s?Math.round(d)+"% progress":"Loading",className:"linear-progress linear-progress-"+t+" linear-progress-"+r+(s?" linear-progress-determinate":" linear-progress-indeterminate")+" "+a,sx:{position:"relative",width:"100%",height:l.height,borderRadius:l.borderRadius,backgroundColor:"var(--Border-Variant)",overflow:"hidden",flexShrink:0,...i},...o,children:se(h,{className:"linear-progress-bar",sx:{position:"absolute",top:0,left:0,height:"100%",borderRadius:"inherit",backgroundColor:c,...s?{width:d+"%",transition:"width 0.4s ease"}:{width:"40%",animation:"linear-progress-slide 1.5s ease-in-out infinite","@keyframes linear-progress-slide":{"0%":{left:"-40%",width:"40%"},"50%":{left:"30%",width:"50%"},"100%":{left:"100%",width:"40%"}}}}})})}const bh=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",vh=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}];function yh({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Sh({color:e,selected:r,onClick:t}){const a=bh(e);return se(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&se(he,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function kh(){const[e,t]=r("default"),[a,i]=r("medium"),[o,n]=r(!1),[l,s]=r(65),[d,c]=r(null),[u,p]=r("Surface");return de(h,{sx:{pb:8},children:[se(Vt,{children:"Linear Progress"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{theme:d,surface:u,children:se(h,{sx:{width:"100%",maxWidth:400},children:se(xh,{color:e,size:a,value:o?l:void 0})})}),se(Ho,{code:(()=>{const r=[];return"default"!==e&&r.push('color="'+e+'"'),"medium"!==a&&r.push('size="'+a+'"'),o&&r.push("value={"+l+"}"),0===r.length?"<LinearProgress />":"<LinearProgress\n "+r.join("\n ")+"\n/>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[se(h,{sx:{mb:3},children:se(no,{theme:d,onThemeChange:c,surface:u,onSurfaceChange:p})}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{spacing:1.5,children:vh.map(r=>de(h,{children:[se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:r.label}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:r.colors.map(r=>se(Sh,{color:r,selected:e===r,onClick:t},r))})]},r.label))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),se(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>se(yh,{label:bh(e),selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Determinate"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Show a static bar at a specific value"})]}),se(qo,{variant:"default-outline",checked:o,onChange:e=>n(e.target.checked),size:"small","aria-label":"Determinate"})]}),o&&se(h,{sx:{mt:2},children:se(us,{label:"Value",min:0,max:100,value:l,onChange:(e,r)=>s(r),size:"small",valueLabelDisplay:"auto"})})]})}),se(ro,{value:1,children:se(h,{sx:{p:3},children:se(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),se(k,{spacing:0,children:[{label:"Role",value:'role="progressbar"'},{label:"Determinate",value:'aria-valuenow, aria-valuemin="0", aria-valuemax="100"'},{label:"Indeterminate",value:'aria-label="Loading" (no value attributes)'},{label:"Track",value:"var(--Border-Variant)"},{label:"Fill",value:"var(--Buttons-{Color}-Border)"}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(_t,{children:[e,":"]}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const Bh=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]}],wh=["photo","icon","initials"],Ch={photo:"Photo",icon:"Icon",initials:"Initials"},Th=["xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"],zh={"xxx-small":"XXXS","xx-small":"XXS","x-small":"XS",small:"Small",medium:"Medium",large:"Large","x-large":"XL","xx-large":"XXL"};function Ah({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Ih({color:e,selected:r,onClick:t}){const a=(i=e)?i.charAt(0).toUpperCase()+i.slice(1):"";var i;return se(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&se(he,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function Rh(){const[e,t]=r("default"),[a,i]=r("medium"),[o,n]=r("initials"),[l,s]=r(!1),[d,c]=r(!1),[u,p]=r(!1),[m,f]=r(null),[g,x]=r("Surface"),b="photo"===o,v=()=>{const r={size:a,clickable:l,insideButton:d};return b||(r.color=e),"initials"===o&&(r.initials="LN"),"photo"===o&&(r.src="https://i.pravatar.cc/150?img=3",r.alt="User avatar"),r};return de(h,{sx:{pb:8},children:[se(Vt,{children:"Avatar"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{theme:m,surface:g,children:u?de(Na,{max:3,size:a,children:[se(Oa,{...v()}),se(Oa,{color:e,size:a,initials:"AB"}),se(Oa,{color:e,size:a,initials:"CD"}),se(Oa,{color:e,size:a,initials:"EF"})]}):se(Oa,{...v()})}),se(Ho,{code:(()=>{const r=[];return b||"default"===e||r.push('color="'+e+'"'),"medium"!==a&&r.push('size="'+a+'"'),"initials"===o&&r.push('initials="LN"'),"photo"===o&&r.push('src="..." alt="User avatar"'),l&&r.push("clickable onClick={handleClick}"),d&&r.push("insideButton"),u?"<AvatarGroup max={3}>\n <Avatar "+r.join(" ")+' />\n <Avatar initials="AB" />\n <Avatar initials="CD" />\n <Avatar initials="EF" />\n</AvatarGroup>':"<Avatar "+r.join(" ")+" />"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[se(h,{sx:{mb:3},children:se(no,{theme:m,onThemeChange:f,surface:g,onSurfaceChange:x})}),de(h,{sx:{opacity:b?.4:1,pointerEvents:b?"none":"auto"},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{spacing:1.5,children:Bh.map(r=>de(h,{children:[se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:r.label}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:r.colors.map(r=>se(Ih,{color:r,selected:e===r,onClick:t},r))})]},r.label))}),b&&se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:8},children:"Color is ignored when the avatar shows a photo — the image carries the visual."})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:Th.map(e=>se(Ah,{label:zh[e],selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"CONTENT"}),se(k,{direction:"row",spacing:1,children:wh.map(e=>se(Ah,{label:Ch[e],selected:o===e,onClick:()=>n(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Clickable"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Interactive with hover/focus states"})]}),se(qo,{variant:"default-outline",checked:l,onChange:e=>s(e.target.checked),size:"small","aria-label":"Clickable"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Inside Button"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Adds 2px horizontal margin so the avatar sits cleanly in a Button"})]}),se(qo,{variant:"default-outline",checked:d,onChange:e=>c(e.target.checked),size:"small","aria-label":"Inside Button"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Group"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Show as AvatarGroup with overflow"})]}),se(qo,{variant:"default-outline",checked:u,onChange:e=>p(e.target.checked),size:"small","aria-label":"Show group"})]})]})}),se(ro,{value:1,children:se(h,{sx:{p:3},children:se(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),se(k,{spacing:0,children:[{label:"Role",value:'role="img" (static) or role="button" (clickable)'},{label:"Label",value:'aria-label from alt, initials, or "Avatar"'},{label:"Image",value:"alt text on <img>. Falls back to initials or icon on error."},{label:"Clickable",value:"Rendered as <button>. Focus ring: 3px solid var(--Focus-Visible)."},{label:"Group",value:'role="group" aria-label="Avatar group, N avatars"'}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(_t,{children:[e,":"]}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const Wh=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",Dh=["primary","secondary","tertiary","neutral","info","success","warning","error"];function Lh({ratio:e,threshold:r}){if(!e)return se(ca,{style:{color:"var(--Text-Quiet)"},children:"--"});const t=parseFloat(e)>=r;return de(h,{sx:{display:"inline-flex",alignItems:"center",gap:.5},children:[de(h,{sx:{px:1,py:.25,borderRadius:"4px",backgroundColor:t?"var(--Tags-Success-BG)":"var(--Tags-Error-BG)",color:t?"var(--Tags-Success-Text)":"var(--Tags-Error-Text)",fontSize:"11px",fontWeight:700},children:[e,":1"]}),se(ca,{style:{color:t?"var(--Tags-Success-Text)":"var(--Tags-Error-Text)"},children:t?"Pass":"Fail"})]})}function Fh({label:e,ratio:r,threshold:t,note:a}){return de(h,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(h,{sx:{flex:1},children:[se(_t,{style:{color:"var(--Text)"},children:e}),a&&se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:a})]}),se(Lh,{ratio:r,threshold:t})]})}function Hh({color:e,selected:r,onClick:t}){const a=Wh(e);return se(B,{title:a,arrow:!0,children:se(h,{onClick:()=>t(e),role:"button","aria-label":"Select "+a+" color","aria-pressed":r,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{transform:"scale(1.1)"}},children:r&&se(he,{sx:{fontSize:24,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})})}function Ph({label:e,selected:r,onClick:t}){return se(h,{component:"button",onClick:t,sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"2px solid var(--Buttons-Primary-Button)",borderRadius:"var(--Style-Border-Radius)",backgroundColor:r?"var(--Buttons-Primary-Button)":"transparent",color:r?"var(--Buttons-Primary-Text)":"var(--Text)",padding:"4px 12px",fontSize:"14px",fontFamily:"inherit",fontWeight:500,whiteSpace:"nowrap",flexShrink:0,transition:"background-color 0.15s ease, color 0.15s ease","&:hover":{backgroundColor:r?"var(--Buttons-Primary-Hover)":"var(--Surface-Dim)"},"&:focus-visible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"}},children:e})}function Mh(){const[e,t]=r(0),[a,i]=r("solid"),[n,l]=r("primary"),[s,d]=r("medium"),[c,u]=r("5"),[p,m]=r(!1),[f,g]=r(!1),[y,S]=r({}),B=()=>"solid"===a?n:n+"-"+a,w=()=>{if(p)return;const e=parseInt(c,10);return isNaN(e)||String(e)!==c.trim()?c||void 0:e};o(()=>{const e=Wh(n),r={};"solid"===a?(r.badgeBg=No("--Buttons-"+e+"-Button"),r.badgeText=No("--Buttons-"+e+"-Text"),r.badgeBorder=null):"outline"===a?(r.badgeBg=No("--Background"),r.badgeText=No("--Text"),r.badgeBorder=No("--Buttons-"+e+"-Border")):"light"===a&&(r.badgeBg=No("--Buttons-"+e+"-Button"),r.badgeText=No("--Buttons-"+e+"-Text"),r.badgeBorder=No("--Buttons-"+e+"-Border")),r.background=No("--Background"),r.focusVisible=No("--Focus-Visible"),S(r)},[a,n]);const C={small:{badge:"16px",dot:"8px",font:"10px"},medium:{badge:"20px",dot:"10px",font:"12px"},large:{badge:"24px",dot:"12px",font:"14px"}};return de(h,{sx:{width:"100%"},children:[se(Vt,{style:{marginBottom:8},children:"Badge"}),se(ta,{color:"quiet",style:{marginBottom:24},children:"Small label attached to an element showing status or count. Solid, outline, and light variants across all 8 colors."}),de(E,{value:e,onChange:(e,r)=>t(r),sx:{borderBottom:"1px solid var(--Border)",mb:0},children:[se(O,{label:"Playground"}),se(O,{label:"Accessibility"})]}),0===e&&de(T,{container:!0,sx:{minHeight:400},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"calc((100vw - 432px) / 2)"},flexShrink:0},children:[se(h,{sx:{p:4,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:200,backgroundColor:"var(--Background)",borderBottom:"1px solid var(--Border)"},children:de(k,{direction:"row",spacing:6,alignItems:"center",children:[se(Ua,{variant:B(),size:s,badgeContent:w(),dot:p,showZero:f,children:se(tt,{sx:{fontSize:32,color:"var(--Text-Quiet)"}})}),se(Ua,{variant:B(),size:s,badgeContent:w(),dot:p,showZero:f,children:se(ze,{sx:{fontSize:32,color:"var(--Text-Quiet)"}})}),se(Ua,{variant:B(),size:s,badgeContent:w(),dot:p,showZero:f,children:se(Ie,{sx:{fontSize:32,color:"var(--Text-Quiet)"}})})]})}),se(Ho,{code:(()=>{const e=['variant="'+B()+'"','size="'+s+'"'];if(p)e.push("dot");else{const r=w();"number"==typeof r?e.push("badgeContent={"+r+"}"):r&&e.push('badgeContent="'+r+'"')}return f&&e.push("showZero"),"<Badge "+e.join(" ")+">\n <MailIcon />\n</Badge>"})(),language:"JSX",sx:{borderRadius:0,borderBottom:"1px solid var(--Border)"}})]}),de(T,{item:!0,sx:{width:{xs:"calc(100vw - 432px)",md:"calc((100vw - 432px) / 2)"},flexShrink:0,p:3,backgroundColor:"var(--Container)",overflowY:"auto"},children:[se(jt,{children:"Playground"}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),se(k,{direction:"row",spacing:1,flexWrap:"wrap",sx:{gap:1},children:["solid","outline","light"].map(e=>se(Ph,{label:Wh(e),selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:Dh.map(e=>se(Hh,{color:e,selected:n===e,onClick:l},e))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),se(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>se(Ph,{label:Wh(e),selected:s===e,onClick:()=>d(e)},e))}),de(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:["Badge ",C[s]?.badge," · Dot ",C[s]?.dot," · Font ",C[s]?.font]})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"BADGE CONTENT"}),se(v,{size:"small",value:c,onChange:e=>u(e.target.value),placeholder:"Number or text",disabled:p,sx:{width:"160px","& .MuiOutlinedInput-root":{fontFamily:"inherit",fontSize:"14px",backgroundColor:"var(--Background)","& fieldset":{borderColor:"var(--Border)"},"&:hover fieldset":{borderColor:"var(--Border)"},"&.Mui-focused fieldset":{borderColor:"var(--Buttons-Primary-Border)"}},"& .MuiOutlinedInput-input":{color:"var(--Text)",padding:"6px 12px"}}})]}),de(h,{sx:{mt:3},children:[se(b,{control:se(x,{checked:p,onChange:e=>m(e.target.checked),size:"small"}),label:se(_t,{children:"Dot (no content)"})}),se(b,{control:se(x,{checked:f,onChange:e=>g(e.target.checked),size:"small"}),label:se(_t,{children:"Show zero"})})]})]})]}),1===e&&de(h,{sx:{p:4},children:[se(jt,{children:"Accessibility Requirements"}),de(_t,{color:"quiet",style:{marginBottom:32},children:["Based on current Playground settings: ",a," · ",n," · ",s]}),de(k,{spacing:4,children:[de(h,{sx:{p:3,backgroundColor:"var(--Container)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"Badge Text Contrast"}),se(_t,{color:"quiet",style:{marginBottom:16},children:"Badge text must have ≥ 4.5:1 contrast against badge background (WCAG 1.4.3 AA)"}),se(Fh,{label:"Badge Text vs. Badge Background",ratio:Oo(y.badgeText,y.badgeBg),threshold:4.5,note:"solid"===a?"var(--Buttons-{C}-Text) vs var(--Buttons-{C}-Button)":"outline"===a?"var(--Text) vs var(--Background)":"var(--Buttons-{C}-Text) vs var(--Buttons-{C}-Button)"})]}),de(h,{sx:{p:3,backgroundColor:"var(--Container)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"Badge Visibility"}),se(_t,{color:"quiet",style:{marginBottom:16},children:"Badge background (or border) must have ≥ 3:1 contrast against page background (WCAG 1.4.11)"}),(()=>{const e=Oo(y.badgeBg,y.background),r=y.badgeBorder?Oo(y.badgeBorder,y.background):null;return se(Fh,{label:"Badge vs. Page Background",ratio:(t=e,i=r,t||i?t?i?parseFloat(t)>=parseFloat(i)?t:i:t:i:null),threshold:3.1,note:"outline"===a?"Border "+(r||"--")+":1 — outline relies on border contrast":"BG "+(e||"--")+":1"});var t,i})()]}),de(h,{sx:{p:3,backgroundColor:"var(--Container)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"Badge Sizing"}),se(_t,{color:"quiet",style:{marginBottom:16},children:"Badge dimensions per size setting"}),se(h,{sx:{display:"flex",justifyContent:"space-between",py:1.5,borderBottom:"1px solid var(--Border)"},children:de(h,{children:[de(_t,{children:["Badge height (",s,")"]}),de(ca,{style:{color:"var(--Text-Quiet)"},children:[C[s]?.badge," height · ",C[s]?.font," font · pill shape"]})]})}),se(h,{sx:{display:"flex",justifyContent:"space-between",py:1.5,borderBottom:"1px solid var(--Border)"},children:de(h,{children:[de(_t,{children:["Dot size (",s,")"]}),de(ca,{style:{color:"var(--Text-Quiet)"},children:[C[s]?.dot," diameter circle"]})]})})]}),de(h,{sx:{p:3,backgroundColor:"var(--Container)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA & Semantics"}),de(k,{spacing:0,children:[de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{style:{display:"block",marginBottom:2},children:"Screenreader support:"}),se(ca,{style:{color:"var(--Text-Quiet)"},children:'MUI Badge renders badge content in a visually-hidden span for assistive technology. Numeric content is announced (e.g. "5 notifications").'})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{style:{display:"block",marginBottom:2},children:"Dot variant:"}),se(ca,{style:{color:"var(--Text-Quiet)"},children:"Dot badges are purely decorative. Ensure the parent element conveys status to assistive tech via aria-label or similar."})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{style:{display:"block",marginBottom:2},children:"Max overflow:"}),se(ca,{style:{color:"var(--Text-Quiet)"},children:'When content exceeds max (default 99), displays "99+" visually but announces the actual number to screenreaders.'})]})]})]})]})]})]})}const Eh=e=>e.charAt(0).toUpperCase()+e.slice(1);function Oh(e){return e&&"default"!==e&&"border-variant"!==e?"border"===e?"var(--Border)":"var(--Icons-"+Eh(e)+")":"var(--Border-Variant)"}function Nh(e,r){const t=e&&!["default","border","border-variant"].includes(e)?Eh(e):"Default",a=Oh(e);return"light"===r?{bg:"var(--Tag-"+t+"-BG)",text:"var(--Tag-"+t+"-Text)",border:"1px solid "+a}:{bg:"var(--Background)",text:"var(--Text)",border:"1px solid "+a}}const Qh={small:1,medium:2,large:4};function Vh({color:e="default",orientation:r="horizontal",size:t="small",children:a,indicatorText:i,indicatorStyle:o="outline",textAlign:n="center",className:l="",sx:s={},...d}){const c=Oh(e),u=Qh[t]||Qh.small,p=!(!a&&!i),m=a||i,f="vertical"===r;if(f&&!p)return se(h,{role:"separator","aria-orientation":"vertical",className:"divider-vertical divider-"+e+" "+l,sx:{display:"inline-block",width:u+"px",alignSelf:"stretch",minHeight:24,backgroundColor:c,flexShrink:0,...s},...d});if(f&&p){const r=Nh(e,o),t="top"===n?"0 0 10%":"1 1 auto",a="top"===n?"1 1 auto":"bottom"===n?"0 0 10%":"1 1 auto";return de(h,{role:"separator","aria-orientation":"vertical",className:"divider-vertical divider-"+e+" divider-indicator "+l,sx:{display:"inline-flex",flexDirection:"column",alignItems:"center",alignSelf:"stretch",minHeight:24,flexShrink:0,...s},...d,children:[se(h,{sx:{flex:t,width:u+"px",backgroundColor:c}}),se(h,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,my:1,px:.75,py:.5,borderRadius:"12px",fontSize:"11px",fontWeight:500,fontFamily:"inherit",lineHeight:1.2,whiteSpace:"nowrap",backgroundColor:r.bg,color:r.text,border:r.border,boxSizing:"border-box"},children:m}),se(h,{sx:{flex:a,width:u+"px",backgroundColor:c}})]})}if(!p)return se(h,{role:"separator","aria-orientation":"horizontal",className:"divider-horizontal divider-"+e+" "+l,sx:{width:"100%",height:u+"px",backgroundColor:c,flexShrink:0,...s},...d});const g=Nh(e,o),x="left"===n?"0 0 10%":"1 1 auto",b="left"===n?"1 1 auto":"right"===n?"0 0 10%":"1 1 auto";return de(h,{role:"separator","aria-orientation":"horizontal",className:"divider-horizontal divider-"+e+" divider-indicator "+l,sx:{display:"flex",alignItems:"center",width:"100%",...s},...d,children:[se(h,{sx:{flex:x,height:u+"px",backgroundColor:c}}),se(h,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,mx:2,px:1.5,py:.5,borderRadius:"12px",fontSize:"12px",fontWeight:500,fontFamily:"inherit",lineHeight:1.2,whiteSpace:"nowrap",backgroundColor:g.bg,color:g.text,border:g.border,boxSizing:"border-box"},children:m}),se(h,{sx:{flex:b,height:u+"px",backgroundColor:c}})]})}const jh={eyebrow:ba,title:ta,secondary:ea},Gh={primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},Uh={small:{py:.5,px:1.5,fontSize:"13px",iconSize:16,decoratorSize:28,gap:1,checkSize:"small"},medium:{py:1,px:1,fontSize:"14px",iconSize:20,decoratorSize:36,gap:1.5,checkSize:"small"},large:{py:1.5,px:2.5,fontSize:"16px",iconSize:24,decoratorSize:40,gap:2,checkSize:"medium"}};function Xh({children:e,size:r="medium",isButton:t=!1,onAction:a,ariaLabel:i}){return se(h,t?{component:"button",role:"button",tabIndex:0,"aria-label":i||"Action",onClick:e=>{e.stopPropagation(),a?.(e)},onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),a?.(e))},className:"list-item-decorator-button",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,padding:0,border:"none",backgroundColor:"transparent",borderRadius:"50%",cursor:"pointer",color:"inherit",transition:"background-color 0.15s ease","&:hover":{backgroundColor:"rgba(128,128,128,0.15)"},"&:active":{backgroundColor:"rgba(128,128,128,0.25)"},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"-3px"}},children:e}:{className:"list-item-decorator",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e})}function Yh({children:e,startDecorator:r,endDecorator:t,startDecoratorIsButton:a=!1,endDecoratorIsButton:i=!1,onStartDecoratorAction:o,onEndDecoratorAction:n,startDecoratorAriaLabel:l,endDecoratorAriaLabel:s,size:d="medium",variant:c="default",color:u,eyebrow:p,overline:m,secondary:f,clickable:g=!1,disabled:b=!1,selected:v=!1,selectionMode:y="none",onSelect:S,onClick:k,bottomBorder:B=!1,rightBorder:w=!1,sx:C={},...T}){const z=Uh[d]||Uh.medium,A=g||!!k,I="checkbox"===y||"radio"===y,R=(A||I)&&!b,D=e=>{b||(I&&S?.(e),k?.(e))};return de(h,{component:"li",role:I?"option":A?"button":"listitem",tabIndex:R?0:void 0,"aria-disabled":b||void 0,"aria-selected":I?v:v||void 0,"aria-checked":"checkbox"===y?v:void 0,onClick:D,onKeyDown:R?e=>{b||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),D(e))}:void 0,className:"list-item"+(v?" list-item-selected":"")+(b?" list-item-disabled":"")+(A?" list-item-clickable":"")+(I?" list-item-selectable":""),sx:{display:"flex",flexDirection:"row",alignItems:"flex-start",justifyContent:"flex-start",width:"100%",boxSizing:"border-box",gap:"var(--Sizing-1-and-Half)",py:z.py,px:z.px,minHeight:"32px",fontSize:z.fontSize,fontFamily:"inherit",color:"var(--Text)",listStyle:"none",cursor:R?"pointer":"default",opacity:b?.5:1,position:"relative",transition:"background-color 0.15s ease, box-shadow 0.15s ease",...A?{border:"1px solid var(--Border)",boxShadow:"var(--Effect-Level-1)",padding:"var(--Sizing-1)",borderRadius:"var(--Input-Radius)"}:{},...!A&&B?{borderBottom:"1px solid var(--Border-Variant)"}:{},...!A&&w?{borderRight:"1px solid var(--Border-Variant)"}:{},backgroundColor:v?"var(--Hover)":"transparent","&:hover":R?{backgroundColor:"var(--Hover)",boxShadow:"var(--Effect-Level-2)"}:{},"&:active":R?{backgroundColor:"var(--Pressed)",boxShadow:"var(--Effect-Level-1)"}:{},"&:focus-visible":{outline:"none"},"&:focus-visible::after":{content:'""',position:"absolute",inset:"1px",border:"3px solid var(--Focus-Visible)",borderRadius:"var(--Input-Inner-Focus-Visible)",pointerEvents:"none"},...C},...T,children:["checkbox"===y&&se(x,{checked:v,disabled:b,size:z.checkSize,tabIndex:-1,onClick:e=>e.stopPropagation(),onChange:()=>S?.(),sx:{p:0,mr:0,color:"inherit","&.Mui-checked":{color:"inherit"}},inputProps:{"aria-label":"Select "+("string"==typeof e?e:"item")}}),"radio"===y&&se(W,{checked:v,disabled:b,size:z.checkSize,tabIndex:-1,onClick:e=>e.stopPropagation(),onChange:()=>S?.(),sx:{p:0,mr:0,color:"inherit","&.Mui-checked":{color:"inherit"}},inputProps:{"aria-label":"Select "+("string"==typeof e?e:"item")}}),r&&se(Xh,{size:d,isButton:a,onAction:o,ariaLabel:l,children:r}),(()=>{const r=jh,t=p??m,a={display:"block",width:"100%",wordBreak:"break-word",overflowWrap:"anywhere"};return de(h,{sx:{flex:"1 1 auto",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:[t&&se(r.eyebrow,{style:{...a,color:"var(--Quiet)"},children:t}),null!=e&&se(r.title,{style:{...a,color:"var(--Text)"},children:e}),f&&se(r.secondary,{style:{...a,color:"var(--Quiet)"},children:f})]})})(),t&&se(Xh,{size:d,isButton:i,onAction:n,ariaLabel:s,children:t})]})}function Zh({children:r,items:t,variant:a="default",color:i="primary",size:o="medium",orientation:n="vertical",dividers:l=!1,selectionMode:s="none",selectedIndices:d=[],onSelectionChange:c,clickable:u=!1,component:p="ul",className:m="",sx:f={},...g}){const x="horizontal"===n,b="checkbox"===s||"radio"===s,v="light"===a,y="default"===a,S={};("solid"===a||v)&&Gh[i]&&(S["data-theme"]=Gh[i],v&&(S["data-surface"]="Surface-Brightest"));return se(h,{component:p,role:b?"listbox":"list","aria-multiselectable":"checkbox"===s||void 0,...S,className:"list-container list-"+a+" list-"+i+" "+m,sx:{display:"flex",flexDirection:x?"row":"column",boxSizing:"border-box",alignItems:"stretch",gap:u?"var(--Sizing-1)":0,m:0,p:y?0:1,backgroundColor:y?"transparent":"var(--Background)",color:"var(--Text)",borderRadius:y?0:"var(--Style-Border-Radius)",width:"100%",listStyle:"none",...x?{"& > .list-item":{flex:"1 1 0",width:"auto"}}:{},...f},...g,children:(()=>{if(t&&t.length>0){const e=[];return t.forEach((r,n)=>{e.push(se(Yh,{size:o,variant:a,color:i,startDecorator:r.startDecorator,endDecorator:r.endDecorator,startDecoratorIsButton:r.startDecoratorIsButton,endDecoratorIsButton:r.endDecoratorIsButton,onStartDecoratorAction:r.onStartDecoratorAction,onEndDecoratorAction:r.onEndDecoratorAction,startDecoratorAriaLabel:r.startDecoratorAriaLabel,endDecoratorAriaLabel:r.endDecoratorAriaLabel,eyebrow:r.eyebrow??r.overline,secondary:r.secondary,clickable:u||r.clickable,disabled:r.disabled,bottomBorder:r.bottomBorder,rightBorder:r.rightBorder,selected:b?d.includes(n):r.selected,selectionMode:s,onSelect:()=>(e=>{if(c)if("radio"===s)c([e]);else{const r=d.includes(e)?d.filter(r=>r!==e):[...d,e];c(r)}})(n),onClick:r.onClick,children:r.label||r.children},"item-"+n)),l&&n<t.length-1&&e.push(se(h,{component:"li",role:"separator","aria-hidden":"true",sx:x?{width:"1px",alignSelf:"stretch",backgroundColor:"var(--Border)",flexShrink:0}:{height:"1px",backgroundColor:"var(--Border)"}},"div-"+n))}),e}if(r){const t=e.Children.toArray(r);if(!l)return t;const a=[];return t.forEach((e,r)=>{a.push(e),r<t.length-1&&a.push(se(h,{component:"li",role:"separator","aria-hidden":"true",sx:x?{width:"1px",alignSelf:"stretch",backgroundColor:"var(--Border)",flexShrink:0}:{height:"1px",backgroundColor:"var(--Border)"}},"div-"+r))}),a}return null})()})}const qh={small:{py:"4px",px:"8px",fontSize:"13px",headerFontSize:"12px"},medium:{py:"8px",px:"12px",fontSize:"14px",headerFontSize:"13px"},large:{py:"12px",px:"16px",fontSize:"16px",headerFontSize:"14px"}};function Jh({children:e,columns:r,rows:t,footerRows:a,variant:i="default",color:o="primary",size:n="medium",stripe:l="none",stickyHeader:s=!1,stickyFooter:d=!1,className:c="",sx:u={},...p}){const m=qh[n]||qh.medium,f="solid"===i,g="outlined"===i,x="light"===i,b=(e=>e.charAt(0).toUpperCase()+e.slice(1))(o),v=g?"1px solid var(--Buttons-"+b+"-Border)":"none",y={};f&&(y["data-theme"]=b+"-Medium");const S=()=>{const e={fontWeight:600,fontSize:m.headerFontSize,textAlign:"left",padding:m.py+" "+m.px,borderBottom:"2px solid var(--Border)",color:"var(--Text)",whiteSpace:"nowrap"};return x?(e.backgroundColor="var(--Buttons-"+b+"-Button)",e.color="var(--Buttons-"+b+"-Text)"):e.backgroundColor=f?"var(--Hover)":"var(--Background)",s&&(e.position="sticky",e.top=0,e.zIndex=2),e},k=()=>{const e={fontWeight:600,fontSize:m.headerFontSize,textAlign:"left",padding:m.py+" "+m.px,borderTop:"2px solid var(--Border)",color:"var(--Text)",whiteSpace:"nowrap"};return x?(e.backgroundColor="var(--Buttons-"+b+"-Button)",e.color="var(--Buttons-"+b+"-Text)"):e.backgroundColor=f?"var(--Hover)":"var(--Background)",d&&(e.position="sticky",e.bottom=0,e.zIndex=2),e},B=e=>"none"===l?"Surface":"odd"===l?e%2==0?"Surface":"Surface-Dim":"even"===l&&e%2==0?"Surface-Dim":"Surface",w=()=>({padding:m.py+" "+m.px,fontSize:m.fontSize,color:"var(--Text)",borderBottom:"1px solid var(--Border)",textAlign:"left"});return se(h,{className:"table-wrapper table-"+i+(f||x||g?" table-"+o:"")+" "+c,...y,sx:{width:"100%",overflow:"auto",border:v,borderRadius:g||x?"var(--Style-Border-Radius)":0,...u},children:se(h,{component:"table",sx:{width:"100%",borderCollapse:"collapse",tableLayout:"fixed",fontFamily:"inherit","& thead th":S(),"& tbody td":w(),"& tfoot td, & tfoot th":k(),...s?{"& thead th":{...S(),position:"sticky",top:0,zIndex:2}}:{},...d?{"& tfoot td, & tfoot th":{...k(),position:"sticky",bottom:0,zIndex:2}}:{}},...p,children:r&&t?r&&t?de(ce,{children:[se(h,{component:"thead",children:se(h,{component:"tr",children:r.map((e,r)=>se(h,{component:"th",sx:{...S(),...e.width?{width:e.width}:{},...e.align?{textAlign:e.align}:{}},children:e.label||e.header||e},"h-"+r))})}),se(h,{component:"tbody",children:t.map((e,t)=>se(h,{component:"tr","data-surface":B(t),sx:{backgroundColor:"var(--"+B(t)+")"},children:(Array.isArray(e)?e:r.map(r=>e[r.field||r.key])).map((e,a)=>se(h,{component:"td",sx:{...w(),...r[a]&&r[a].align?{textAlign:r[a].align}:{}},children:e},"c-"+t+"-"+a))},"r-"+t))}),a&&a.length>0&&se(h,{component:"tfoot",children:a.map((e,t)=>se(h,{component:"tr",children:(Array.isArray(e)?e:r.map(r=>e[r.field||r.key])).map((e,a)=>se(h,{component:"td",sx:{...k(),...r[a]&&r[a].align?{textAlign:r[a].align}:{}},children:e},"fc-"+t+"-"+a))},"f-"+t))})]}):null:e})})}const Kh={primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},$h={primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},_h={small:{fontSize:"12px",py:"4px",px:"8px",maxWidth:200,arrowSize:6},medium:{fontSize:"13px",py:"6px",px:"12px",maxWidth:280,arrowSize:8},large:{fontSize:"14px",py:"8px",px:"16px",maxWidth:360,arrowSize:10}};function ep({children:e,title:r,variant:t="solid",color:a="primary",size:i="medium",placement:o="bottom",arrow:n=!1,open:l,enterDelay:s=100,leaveDelay:d=0,describeChild:c=!1,className:u="",sx:p={},...m}){const f=_h[i]||_h.medium,g="solid"===t,x="light"===t,b="outline"===t,v=(e=>e.charAt(0).toUpperCase()+e.slice(1))(a),y="var(--Background)",S=void 0===l?{}:{open:l};return se(B,{title:r?se(h,{"data-theme":(g?Kh[a]:x?$h[a]:null)||void 0,"data-surface":x?"Surface-Brightest":g?"Surface":void 0,className:"tooltip-content tooltip-"+t+" tooltip-"+a+" tooltip-"+i+" "+u,sx:{backgroundColor:"var(--Background)",color:"var(--Text)",border:b?"1px solid var(--Buttons-"+v+"-Border)":"none",borderRadius:"var(--Style-Border-Radius)",fontSize:f.fontSize,lineHeight:1.5,fontFamily:"inherit",padding:f.py+" "+f.px,maxWidth:f.maxWidth+"px",boxShadow:"0 2px 8px rgba(0,0,0,0.15)",...p},children:r}):"",placement:o,arrow:n,enterDelay:s,leaveDelay:d,describeChild:c,...S,componentsProps:{tooltip:{sx:{backgroundColor:"transparent",padding:0,maxWidth:"none",boxShadow:"none"}},arrow:{sx:{color:y,"&::before":{border:b?"1px solid var(--Buttons-"+v+"-Border)":"none",backgroundColor:y,boxSizing:"border-box"},fontSize:f.arrowSize+"px"}}},...m,children:e})}const rp={default:{theme:"App-Bar"},primary:{theme:"Primary"},"primary-light":{theme:"Primary",surface:"Surface-Brightest"},white:{theme:"Neutral",surface:"Surface-Brightest"},black:{theme:"Neutral",surface:"Surface-Dimmest"}};function tp({children:e,onClick:r,ariaLabel:t}){return se(bi,{iconOnly:!0,variant:"ghost",size:"medium",onClick:r,"aria-label":t,children:e})}function ap({barColor:t="default",surface:a="Surface",loginType:i="login",menuType:o="hamburger",brandType:n="name",searchPosition:l="right",companyName:s="Company",navLinks:d=["Home","Products","About"],rightButtons:c=[],showRightButtons:u=!1,onMenuClick:p,user:m,onLogin:f,onSignOut:g,brand:x,onBrandClick:b,centerSlot:v,endSlot:y,searchValue:S,onSearchChange:k,searchPlaceholder:B="Search...",children:w,className:C="",sx:T={}}){const[z,A]=r(!1),I=rp[t]||rp.default,R=I.theme,W=I.surface||a,D="expanded"===o&&d.length>3?"hamburger":o,L=se(bs,{placeholder:B,size:"medium",value:S,onChange:k,sx:{flex:"left"===l?"0 1 400px":"0 1 280px",minWidth:0}});return de(ce,{children:[se(h,{component:"header",role:"banner","data-theme":R,"data-surface":W,className:"appbar appbar-desktop appbar-"+t+(C?" "+C:""),sx:{display:"flex",alignItems:"center",height:64,px:2,gap:2,backgroundColor:"var(--Background)",color:"var(--Text)",boxShadow:qa,fontFamily:"inherit",...T},children:w||de(ce,{children:["hamburger"===D&&se(tp,{ariaLabel:"Open navigation menu",onClick:p||(()=>A(!0)),children:se(Wr,{sx:{fontSize:"inherit"}})}),se(h,void 0!==x?b?{component:"button",type:"button",onClick:b,sx:{background:"transparent",border:"none",padding:0,cursor:"pointer",color:"inherit",font:"inherit",fontWeight:700,fontSize:"18px",whiteSpace:"nowrap",flexShrink:0},children:x}:{sx:{fontWeight:700,fontSize:"18px",whiteSpace:"nowrap",flexShrink:0},children:x}:"logo"===n?{sx:{width:32,height:32,borderRadius:"6px",backgroundColor:"var(--Text)",opacity:.8,flexShrink:0},"aria-label":"Company logo"}:{sx:{fontWeight:700,fontSize:"18px",whiteSpace:"nowrap",flexShrink:0},children:s}),de(ce,void 0!==v?{children:[se(h,{sx:{flex:1}}),se(h,{sx:{display:"flex",alignItems:"center",flexShrink:0},children:v}),se(h,{sx:{flex:1}})]}:{children:["left"===l&&L,"expanded"===D&&se($i,{defaultValue:0,variant:"standard",color:"default",sx:{ml:2,minHeight:0},children:se(_i,{"aria-label":"Main navigation",children:d.map(e=>se(eo,{children:e},e))})}),se(h,{sx:{flex:1}}),"right"===l&&L]}),void 0!==y?se(h,{sx:{display:"flex",alignItems:"center",gap:1},children:y}):de(ce,{children:[u&&c.length>0&&se(h,{sx:{display:"flex",alignItems:"center",gap:.5},children:c.map((r,t)=>r.raw?se(e.Fragment,{children:r.icon},t):se(tp,{ariaLabel:r.label||"Action "+(t+1),children:r.icon},t))}),m?se(bi,{variant:"ghost",size:"small",onClick:g,"aria-label":"Sign out",startIcon:m.photoURL?se(h,{component:"img",src:m.photoURL,alt:"",sx:{width:24,height:24,borderRadius:"50%"}}):se(ot,{sx:{fontSize:24}}),children:m.displayName?.split(" ")[0]||"Account"}):f?se(bi,{variant:"default-outline",size:"small",onClick:f,children:"Login"}):"avatar"===i?se(bi,{iconOnly:!0,variant:"ghost",size:"medium","aria-label":"Account",children:se(ot,{sx:{fontSize:28}})}):null]})]})}),se(Cu,{open:z,onClose:()=>A(!1),anchor:"left",size:"small",children:se(h,{component:"nav","aria-label":"Main navigation",sx:{display:"flex",flexDirection:"column",gap:.5,py:1},children:d.map(e=>se(bi,{variant:"ghost",size:"medium",onClick:()=>A(!1),sx:{justifyContent:"flex-start",width:"100%"},children:e},e))})})]})}function ip({mobileVariant:e="search",barColor:t="default",surface:a="Surface",title:i="Page Title",subtitle:o="Subtitle text",actionIcon:n,companyName:l="Company",navLinks:s=["Home","Products","About"],className:d="",sx:c={}}){const[u,p]=r(!1),m=rp[t]||rp.default,f=m.theme,g=m.surface||a,x={backgroundColor:"var(--Background)",color:"var(--Text)",boxShadow:qa,fontFamily:"inherit",width:"100%",maxWidth:420,...c},b={"data-theme":f,"data-surface":g},v=se(Cu,{open:u,onClose:()=>p(!1),anchor:"left",size:"small",children:se(h,{component:"nav","aria-label":"Main navigation",sx:{display:"flex",flexDirection:"column",gap:.5,py:1},children:s.map(e=>se(bi,{variant:"ghost",size:"medium",onClick:()=>p(!1),sx:{justifyContent:"flex-start",width:"100%"},children:e},e))})});return"search"===e?de(ce,{children:[de(h,{component:"header",role:"banner",className:"appbar appbar-mobile appbar-mobile-search appbar-"+t+" "+d,...b,sx:{...x,display:"flex",alignItems:"center",height:64,px:1.5,gap:1.5},children:[se(tp,{ariaLabel:"Open navigation menu",onClick:()=>p(!0),children:se(Wr,{sx:{fontSize:"inherit"}})}),se(bs,{placeholder:"Search "+l,size:"small",sx:{flex:1,minWidth:0}}),se(bi,{iconOnly:!0,variant:"ghost",size:"medium","aria-label":"Account",children:se(ot,{sx:{fontSize:28}})})]}),v]}):de(h,"small"===e?{component:"header",role:"banner",className:"appbar appbar-mobile appbar-mobile-small appbar-"+t+" "+d,...b,sx:{...x,display:"flex",alignItems:"center",height:64,px:1.5,gap:1},children:[se(tp,{ariaLabel:"Back",children:se(it,{sx:{fontSize:"inherit"}})}),de(h,{sx:{flex:1,minWidth:0},children:[se(h,{sx:{fontWeight:600,fontSize:"16px",lineHeight:1.3,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i}),o&&se(h,{sx:{fontSize:"12px",opacity:.7,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o})]}),n&&se(tp,{ariaLabel:"Action",children:n})]}:"medium"===e?{component:"header",role:"banner",className:"appbar appbar-mobile appbar-mobile-medium appbar-"+t+" "+d,...b,sx:{...x,px:1.5,pb:2},children:[de(h,{sx:{display:"flex",alignItems:"center",height:56,gap:1},children:[se(tp,{ariaLabel:"Back",children:se(it,{sx:{fontSize:"inherit"}})}),se(h,{sx:{flex:1}}),n&&se(tp,{ariaLabel:"Action",children:n})]}),de(h,{sx:{px:1.5},children:[se(h,{sx:{fontWeight:600,fontSize:"24px",lineHeight:1.2},children:i}),o&&se(h,{sx:{fontSize:"14px",opacity:.7,mt:.5},children:o})]})]}:{component:"header",role:"banner",className:"appbar appbar-mobile appbar-mobile-large appbar-"+t+" "+d,...b,sx:{...x,px:1.5,pb:3},children:[de(h,{sx:{display:"flex",alignItems:"center",height:56,gap:1},children:[se(tp,{ariaLabel:"Back",children:se(it,{sx:{fontSize:"inherit"}})}),se(h,{sx:{flex:1}}),n&&se(tp,{ariaLabel:"Action",children:n})]}),de(h,{sx:{px:1.5,mt:1},children:[se(h,{sx:{fontWeight:600,fontSize:"36px",lineHeight:1.1},children:i}),o&&se(h,{sx:{fontSize:"14px",opacity:.7,mt:.5},children:o})]})]})}function op({mode:e="desktop",...r}){return se("mobile"===e?ip:ap,{...r})}const np=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",lp=["default","primary","primary-light","white","black"],sp=["Surface","Surface-Bright","Surface-Dim","Surface-Dimmest"],dp={default:{theme:"App-Bar"},primary:{theme:"Primary"},"primary-light":{theme:"Primary",surface:"Surface-Brightest"},white:{theme:"Neutral",surface:"Surface-Brightest"},black:{theme:"Neutral",surface:"Surface-Dimmest"}};function cp({ratio:e,threshold:r}){if(!e)return se(ca,{style:{color:"var(--Text-Quiet)"},children:"--"});const t=parseFloat(e)>=r;return de(h,{sx:{display:"inline-flex",alignItems:"center",gap:.5},children:[de(h,{sx:{px:1,py:.25,borderRadius:"4px",fontSize:"11px",fontWeight:700,backgroundColor:t?"var(--Tags-Success-BG)":"var(--Tags-Error-BG)",color:t?"var(--Tags-Success-Text)":"var(--Tags-Error-Text)"},children:[e,":1"]}),se(ca,{style:{color:t?"var(--Tags-Success-Text)":"var(--Tags-Error-Text)"},children:t?"Pass":"Fail"})]})}function up({label:e,ratio:r,threshold:t,note:a}){return de(h,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(h,{sx:{flex:1},children:[se(_t,{style:{color:"var(--Text)"},children:e}),a&&se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:a})]}),se(cp,{ratio:r,threshold:t})]})}function hp({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function pp({color:e,selected:r,onClick:t}){const a=dp[e]||dp.default;return se(h,{component:"button","data-theme":a.theme,"data-surface":a.surface||"Surface",onClick:()=>t(e),"aria-label":"Select "+e,"aria-pressed":r,title:e,sx:{width:"var(--Button-Height, 36px)",height:"var(--Button-Height, 36px)",borderRadius:"4px",backgroundColor:"var(--Background)",border:r?"2px solid var(--Text)":"2px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&se(he,{sx:{fontSize:16,color:"var(--Text)",pointerEvents:"none"}})})}function mp(){const[e,t]=r("desktop"),[a,i]=r("default"),[n,l]=r("Surface"),[s,d]=r("login"),[c,u]=r("hamburger"),[p,m]=r("name"),[f,g]=r("right"),[x,b]=r("search"),[v,y]=r(null),[S,B]=r("Surface"),[w,C]=r({}),z="desktop"===e,A=dp[a]||dp.default,I=A.theme,R=A.surface||n;return o(()=>{const e={};e.text=No("--Text"),e.textQuiet=No("--Text-Quiet"),e.background=No("--Background"),e.border=No("--Border"),e.focusVisible=No("--Focus-Visible"),e.hover=No("--Hover"),e.active=No("--Pressed"),C(e)},[a,n,e]),de(h,{sx:{pb:8},children:[se(Vt,{children:"App Bar"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{theme:v,children:se(h,{sx:{width:"100%",maxWidth:z?"100%":420,overflow:"hidden"},children:z?se(ap,{barColor:a,surface:n,loginType:s,menuType:c,brandType:p,searchPosition:f,companyName:"My App",navLinks:["Home","Products","About"]}):se(ip,{barColor:a,surface:n,mobileVariant:x,companyName:"My App",title:"Page Title",subtitle:"Subtitle text"})})}),se(Ho,{code:(()=>{if(z){const e=[];"default"!==a&&e.push('barColor="'+a+'"'),"Surface"!==n&&e.push('surface="'+n+'"'),"login"!==s&&e.push('loginType="'+s+'"'),"hamburger"!==c&&e.push('menuType="'+c+'"'),"name"!==p&&e.push('brandType="'+p+'"'),"right"!==f&&e.push('searchPosition="'+f+'"');const r=e.length?"\n "+e.join("\n ")+"\n":"";return'<AppBar mode="desktop"'+(r||" ")+'companyName="My App" />'}{const e=['mode="mobile"','mobileVariant="'+x+'"'];return"default"!==a&&e.push('barColor="'+a+'"'),"Surface"!==n&&e.push('surface="'+n+'"'),"<AppBar\n "+e.join("\n ")+'\n title="Page Title"\n/>'}})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[se(h,{sx:{mb:3},children:se(no,{theme:v,onThemeChange:y,surface:S,onSurfaceChange:B})}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"MODE"}),se(k,{direction:"row",spacing:1,children:["desktop","mobile"].map(r=>se(hp,{label:np(r),selected:e===r,onClick:()=>t(r)},r))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"BAR COLOR"}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:lp.map(e=>se(pp,{color:e,selected:a===e,onClick:i},e))}),de(ca,{style:{color:"var(--Text-Quiet)",marginTop:6,display:"block"},children:['data-theme="',I,'"']})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SURFACE"}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:sp.map(e=>se(hp,{label:e.replace("Surface-","").replace("Surface","Default"),selected:n===e,onClick:()=>l(e)},e))}),de(ca,{style:{color:"var(--Text-Quiet)",marginTop:6,display:"block"},children:['data-surface="',n,'"']})]}),z&&de(ce,{children:[de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"MENU TYPE"}),se(k,{direction:"row",spacing:1,children:["hamburger","expanded"].map(e=>se(hp,{label:np(e),selected:c===e,onClick:()=>u(e)},e))}),se(ca,{style:{color:"var(--Text-Quiet)",marginTop:4,display:"block"},children:"Expanded auto-falls back to hamburger when nav > 3 links"})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"BRAND"}),se(k,{direction:"row",spacing:1,children:["name","logo"].map(e=>se(hp,{label:np(e),selected:p===e,onClick:()=>m(e)},e))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SEARCH POSITION"}),se(k,{direction:"row",spacing:1,children:["left","right"].map(e=>se(hp,{label:np(e),selected:f===e,onClick:()=>g(e)},e))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"LOGIN TYPE"}),se(k,{direction:"row",spacing:1,children:["login","avatar"].map(e=>se(hp,{label:np(e),selected:s===e,onClick:()=>d(e)},e))})]})]}),!z&&de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"MOBILE VARIANT"}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:["search","small","medium","large"].map(e=>se(hp,{label:np(e),selected:x===e,onClick:()=>b(e)},e))})]})]})}),se(ro,{value:1,children:de(h,{sx:{p:3},children:[de(_t,{color:"quiet",style:{marginBottom:24},children:[e," / ",a," / ",n,z?"":" / "+x,' — data-theme="',I,'" data-surface="',R,'"']}),de(k,{spacing:3,children:[de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"Text Contrast (WCAG 1.4.3 — 4.5:1)"}),se(_t,{color:"quiet",style:{marginBottom:16},children:"All text and icons must have 4.5:1 contrast against the AppBar background."}),se(up,{label:"Resting: var(--Text) vs. var(--Background)",ratio:Oo(w.text,w.background),threshold:4.5,note:'data-theme="'+I+'" data-surface="'+R+'"'}),se(up,{label:"On hover: var(--Text) vs. var(--Hover)",ratio:Oo(w.text,w.hover),threshold:4.5,note:"Icon buttons use var(--Hover) on hover"}),se(up,{label:"On active: var(--Text) vs. var(--Pressed)",ratio:Oo(w.text,w.active),threshold:4.5,note:"Icon buttons use var(--Pressed) on press"})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"Focus Indicator (WCAG 2.4.11 — 3:1)"}),se(up,{label:"var(--Focus-Visible) vs. var(--Background)",ratio:Oo(w.focusVisible,w.background),threshold:3,note:"outline: 3px solid var(--Focus-Visible); outline-offset: 1px"})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"Touch Target Area (WCAG 2.5.5)"}),[{label:"Icon button",size:40,note:"width: 40px, height: 40px"},{label:"AppBar (desktop)",size:64,note:"height: 64px"},{label:"AppBar (mobile)",size:64,note:"height: 64px"}].map(({label:e,size:r,note:t})=>{const a=r>=24,i=r>=44,o=r>=48;return de(h,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(h,{sx:{flex:1},children:[de(_t,{style:{color:"var(--Text)"},children:[e," — ",r,"px"]}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:t})]}),de(h,{sx:{display:"flex",gap:.5,flexWrap:"wrap",justifyContent:"flex-end"},children:[de(h,{sx:{px:1,py:.25,borderRadius:"4px",fontSize:"11px",fontWeight:700,backgroundColor:a?"var(--Tags-Success-BG)":"var(--Tags-Error-BG)",color:a?"var(--Tags-Success-Text)":"var(--Tags-Error-Text)"},children:["Desktop ",a?"Y":"N"]}),de(h,{sx:{px:1,py:.25,borderRadius:"4px",fontSize:"11px",fontWeight:700,backgroundColor:i?"var(--Tags-Success-BG)":"var(--Tags-Warning-BG)",color:i?"var(--Tags-Success-Text)":"var(--Tags-Warning-Text)"},children:["iOS ",i?"Y":"~"]}),de(h,{sx:{px:1,py:.25,borderRadius:"4px",fontSize:"11px",fontWeight:700,backgroundColor:o?"var(--Tags-Success-BG)":"var(--Tags-Warning-BG)",color:o?"var(--Tags-Success-Text)":"var(--Tags-Warning-Text)"},children:["Android ",o?"Y":"~"]})]})]},e)})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),de(k,{spacing:0,children:[de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Landmark:"}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:'<header role="banner">'})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Navigation (expanded menu):"}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:'<nav aria-label="Main navigation">'})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Theme + Surface:"}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:'data-theme="'+I+'" data-surface="'+R+'"'})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Shadow:"}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:"box-shadow: var(--Effect-Level-1)"})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[se(_t,{children:"Icon buttons:"}),se(ca,{style:{color:"var(--Text-Quiet)"},children:"All icon buttons have aria-label. Focus visible on keyboard navigation."})]}),de(h,{sx:{py:1.5},children:[se(_t,{children:"Keyboard:"}),se(ca,{style:{color:"var(--Text-Quiet)"},children:"Tab navigates all interactive elements. Enter/Space activates buttons."})]})]})]})]})]})})]})})})]})]})}function fp({title:e="My App",mode:r="light",navItems:t=[{label:"HOME",href:"#"},{label:"ABOUT",href:"#"},{label:"SERVICES",href:"#"},{label:"CONTACT",href:"#"}],rightContent:a,sx:i={},...o}){return se(J,{position:"fixed",sx:{background:"var(--Background)",color:"var(--Text)",boxShadow:"0 1px 3px rgba(0,0,0,0.1)",borderBottom:"1px solid var(--Border-Variant)",transition:"all 0.2s ease-in-out",zIndex:1201,...i},...o,children:se(M,{maxWidth:"lg",children:de(K,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",px:0},children:[se(C,{variant:"h6",sx:{fontWeight:700,color:"var(--Text)",mr:"auto",transition:"color 0.2s ease-in-out"},children:e}),se(h,{sx:{display:{xs:"none",md:"flex"},gap:3,flex:1,justifyContent:"center"},children:t.map((e,r)=>se(C,{component:"a",href:e.href,variant:"body2",sx:{textDecoration:"none",color:"var(--Text)",transition:"color 0.2s ease-in-out","&:hover":{color:"var(--Primary-Color-11)"}},children:e.label},r))}),se(k,{direction:"row",spacing:1,alignItems:"center",children:a})]})})})}const gp={default:{bg:"var(--Primary-Color-1)",fg:"var(--Primary-Color-12)"},primary:{theme:"Primary",surface:"Surface-Dim"},"primary-dark":{bg:"var(--Primary-Color-1)",fg:"var(--Primary-Color-12)"},white:{bg:"var(--Neutral-Color-11)",fg:"var(--Neutral-Color-3)"},black:{bg:"var(--Neutral-Color-1)",fg:"var(--Neutral-Color-12)"}};function xp({color:e="default",companyName:r="",year:t=(new Date).getFullYear(),rights:a="All rights reserved",children:i,className:o,style:n,...l}){const s=i??`© ${t}${r?" "+r:""}.${a?" "+a+".":""}`,d=gp[e]||gp.default,c=d.theme?{"data-theme":d.theme,"data-surface":d.surface||"Surface-Dim"}:{},u=d.theme?{background:"var(--Background)",color:"var(--Text)"}:{background:d.bg,color:d.fg};return se("div",{...c,className:["dino-copyright",o].filter(Boolean).join(" "),style:{padding:"14px 24px",textAlign:"center",...u,...n},...l,children:se(_t,{style:{color:"inherit",opacity:.85},children:s})})}const bp={default:{bg:"var(--Primary-Color-2)",fg:"var(--Primary-Color-12)"},primary:{theme:"Primary",surface:"Surface"},"primary-dark":{theme:"Primary",surface:"Surface-Dimmest"},white:{bg:"var(--Neutral-Color-12)",fg:"var(--Neutral-Color-2)"},black:{bg:"var(--Neutral-Color-1)",fg:"var(--Neutral-Color-12)"}};function vp({color:e="default",brand:r,address:t,columns:a=[],socialLinks:i=[],subscribe:o,copyrightName:n,copyrightYear:l,className:s,style:d,...c}){const u=a.slice(0,3),h=bp[e]||bp.default,p=h.theme?{"data-theme":h.theme,"data-surface":h.surface||"Surface"}:{},m=h.theme?{background:"var(--Background)",color:"var(--Text)"}:{background:h.bg,color:h.fg};return de("footer",{...p,className:["dino-footer",s].filter(Boolean).join(" "),style:{...m,...d},...c,children:[de("div",{style:{maxWidth:1200,margin:"0 auto",padding:"40px 24px 56px"},children:[r&&se("div",{style:{marginBottom:36},children:r}),de("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(280px, 1fr))",gap:40},children:[se(yp,{address:t}),u.map((e,r)=>se(Sp,{...e},r))]}),(i.length>0||o)&&de("div",{style:{marginTop:48,paddingTop:32,borderTop:"1px solid rgba(255, 255, 255, 0.10)",display:"flex",flexWrap:"wrap",gap:32,alignItems:"flex-start",justifyContent:"space-between"},children:[i.length>0&&se(kp,{links:i}),o&&se(Bp,{...o})]})]}),se(xp,{color:e,companyName:n,year:l})]})}function yp({address:e}){if(!e)return se("div",{});const{company:r,lines:t=[],email:a,phone:i}=e,o=[...r?[r]:[],...t,...i?[i]:[]];return de("div",{children:[o.map((e,r)=>se(_t,{style:{color:"inherit",opacity:.85,display:"block"},children:e},r)),a&&se("div",{style:{marginTop:12},children:se(_t,{style:{color:"inherit",opacity:.85,display:"block"},children:se(Ls,{href:"mailto:"+a,color:"standard",style:{color:"inherit"},children:a})})})]})}function Sp({title:e,links:r=[]}){return de("div",{children:[e&&se(jt,{style:{color:"inherit",marginBottom:12},children:e}),se("ul",{style:{listStyle:"none",margin:0,padding:0},children:r.map((e,r)=>se("li",{style:{marginBottom:8},children:se(Ls,{href:e.href,onClick:e.onClick,color:"standard",style:{color:"inherit",opacity:.85},children:e.label})},r))})]})}function kp({links:e}){return se("div",{style:{display:"flex",gap:16,alignItems:"center"},children:e.map((e,r)=>se("a",{href:e.url,target:"_blank",rel:"noopener noreferrer","aria-label":e.label||"Social link",style:{color:"inherit",opacity:.85,display:"inline-flex",alignItems:"center",justifyContent:"center",width:36,height:36,borderRadius:"50%",border:"1px solid rgba(255, 255, 255, 0.18)",textDecoration:"none",transition:"opacity 150ms ease, border-color 150ms ease"},onMouseEnter:e=>{e.currentTarget.style.opacity="1"},onMouseLeave:e=>{e.currentTarget.style.opacity="0.85"},children:e.icon},r))})}function Bp({title:e="Stay in the loop",description:t,placeholder:a="your@email.com",buttonLabel:i="Subscribe",onSubscribe:o}){const[n,l]=r(""),[s,d]=r(!1);return de("form",{onSubmit:async e=>{if(e&&e.preventDefault(),n&&!s){d(!0);try{await(o?.(n)),l("")}finally{d(!1)}}},style:{minWidth:260,maxWidth:360,flex:"1 1 260px"},children:[se(jt,{style:{color:"inherit",marginBottom:6},children:e}),t&&se(_t,{style:{color:"inherit",opacity:.85,marginBottom:12,display:"block"},children:t}),de("div",{style:{display:"flex",gap:8},children:[se(Wl,{type:"email",value:n,onChange:e=>l(e.target.value),placeholder:a,size:"small",fullWidth:!0,"aria-label":"Email address"}),se(bi,{type:"submit",variant:"primary",size:"small",disabled:s||!n,children:i})]})]})}function wp(e){const r=e.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);return r?[Number(r[1]),Number(r[2]),Number(r[3])]:null}function Cp(e){return e?"#"+e.map(e=>e.toString(16).padStart(2,"0")).join(""):"—"}function Tp([e,r,t]){const a=[e,r,t].map(e=>(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4));return.2126*a[0]+.7152*a[1]+.0722*a[2]}function zp({targetRef:e,label:t,deps:a=[]}){const[i,n]=r(null),[l,s]=r(null);o(()=>{if(!e.current)return;const r=requestAnimationFrame(()=>{if(!e.current)return;const r=getComputedStyle(e.current);n(wp(r.backgroundColor)),s(wp(r.color))});return()=>cancelAnimationFrame(r)},a);const d=function(e,r){if(!e||!r)return null;const t=Tp(e),a=Tp(r);return(Math.max(t,a)+.05)/(Math.min(t,a)+.05)}(i,l),c=null!==d&&d>=4.5,u=null===d?"—":null!==d&&d>=7?"AAA":c?"AA":"Fail",h=null===d?"var(--Text-Quiet)":c?"var(--Text-Success)":"var(--Text-Error)";return de("div",{style:{display:"flex",alignItems:"center",gap:16,padding:"12px 16px",borderRadius:8,background:"var(--Container)",border:"1px solid var(--Border)"},children:[de("div",{style:{flex:1,minWidth:0},children:[se(_t,{style:{fontWeight:600},children:t}),de(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Background ",Cp(i)," · Text ",Cp(l)]})]}),de("div",{style:{display:"flex",alignItems:"center",gap:6,borderRadius:999,padding:"4px 10px",background:"var(--Background)",border:"1px solid var(--Border)"},children:[se("span",{style:{fontWeight:700,fontSize:12,color:h},children:u}),se(ca,{style:{color:"var(--Text-Quiet)"},children:null!==d?d.toFixed(2)+":1":"—"})]})]})}const Ap={company:"DinoDesign",lines:["123 Market Street","San Francisco, CA 94103"],email:"hello@dinodesign.dev",phone:"+1 (555) 010-0000"},Ip=[{title:"Product",links:[{label:"Features",href:"#"},{label:"Pricing",href:"#"},{label:"Add-ons",href:"#"}]},{title:"Company",links:[{label:"About",href:"#"},{label:"Careers",href:"#"},{label:"Contact",href:"#"}]},{title:"Resources",links:[{label:"Docs",href:"#"},{label:"Changelog",href:"#"},{label:"Status",href:"#"}]}],Rp=[{icon:se(nt,{fontSize:"small"}),url:"https://twitter.com",label:"Twitter"},{icon:se(lt,{fontSize:"small"}),url:"https://github.com",label:"GitHub"},{icon:se(st,{fontSize:"small"}),url:"https://linkedin.com",label:"LinkedIn"}],Wp=[{value:"default",label:"Default"},{value:"primary",label:"Primary"},{value:"primary-dark",label:"Primary Dark"},{value:"white",label:"White"},{value:"black",label:"Black"}];function Dp({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Lp(){const[e,t]=r(4),[i,n]=r(!0),[l,s]=r(!0),[d,c]=r("default"),u=a(null),[p,m]=r(null),[f,g]=r(null);o(()=>{u.current&&(m({current:u.current.querySelector(".dino-footer")}),g({current:u.current.querySelector(".dino-copyright")}))},[d,e,i,l]);const x=Ip.slice(0,Math.max(0,e-1)),b=i?Rp:[],v=l?{title:"Stay in the loop",description:"Monthly updates on new components and tips.",onSubscribe:async e=>console.log("subscribed:",e)}:void 0;return de(h,{children:[se(Vt,{style:{marginBottom:12},children:"Footer"}),de(ta,{color:"quiet",style:{marginBottom:24,maxWidth:720},children:["Configurable 1–4 column footer. The first column is always the company address / contact. Optional ",se("code",{children:"socialLinks"})," and"," ",se("code",{children:"subscribe"})," sit above the auto-generated copyright strip."]}),se(h,{ref:u,sx:{borderRadius:1,overflow:"hidden",mb:4},children:se(vp,{color:d,address:Ap,columns:x,socialLinks:b,subscribe:v,copyrightName:"DinoDesign"})}),de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(k,{spacing:3,sx:{p:3,maxWidth:560},children:[de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLUMNS"}),se(k,{direction:"row",spacing:1,children:[1,2,3,4].map(r=>se(Dp,{label:String(r),selected:e===r,onClick:()=>t(r)},r))}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:"First column is always the address / contact. Up to 3 more link columns."})]}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{direction:"row",spacing:1,sx:{flexWrap:"wrap",rowGap:1},children:Wp.map(e=>se(Dp,{label:e.label,selected:d===e.value,onClick:()=>c(e.value)},e.value))}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:'"Default" hardcodes Primary tone 2 (auto-derived in a future iteration).'})]}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SOCIAL LINKS"}),se(Jo,{label:"Show social media row",checked:i,onChange:e=>n(e.target.checked)}),de(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:["When on, the Footer renders the ",se("code",{children:"socialLinks"})," row (icons linking out). In your app, supply the icon + url pairs from your data store."]})]}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SUBSCRIBE"}),se(Jo,{label:"Show email subscribe form",checked:l,onChange:e=>s(e.target.checked)}),de(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:["When on, the Footer renders an email subscribe form. Hook it up via"," ",se("code",{children:"subscribe.onSubscribe(email)"}),"."]})]})]})}),se(ro,{value:1,children:de(k,{spacing:2,sx:{p:3,maxWidth:560},children:[se(ca,{style:{color:"var(--Text-Quiet)"},children:"Live WCAG 2.1 contrast against the painted background. AA needs 4.5:1 for normal text; AAA needs 7:1."}),p&&se(zp,{targetRef:p,label:"Footer body",deps:[d,e,i,l]}),f&&se(zp,{targetRef:f,label:"Copyright strip",deps:[d,e,i,l]})]})})]})]})}const Fp=[{value:"default",label:"Default"},{value:"primary",label:"Primary"},{value:"primary-dark",label:"Primary Dark"},{value:"white",label:"White"},{value:"black",label:"Black"}];function Hp({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Pp(){const[e,t]=r("DinoDesign"),[i,n]=r((new Date).getFullYear()),[l,s]=r("All rights reserved"),[d,c]=r(""),[u,p]=r(!1),[m,f]=r("default"),g=a(null),[x,b]=r(null);return o(()=>{g.current&&b({current:g.current.querySelector(".dino-copyright")})},[m,u,e,i,l,d]),de(h,{children:[se(Vt,{style:{marginBottom:12},children:"Copyright"}),de(ta,{color:"quiet",style:{marginBottom:24,maxWidth:720},children:["Standalone copyright strip used at the bottom of pages. Defaults to"," ",de("code",{children:["© ","{year}"," ","{companyName}",". ","{rights}","."]})," Pass"," ",se("code",{children:"children"})," to override the entire text."]}),se(h,{ref:g,sx:{borderRadius:1,overflow:"hidden",mb:4},children:se(xp,u?{color:m,children:d||"Type a custom message →"}:{color:m,companyName:e,year:Number(i)||(new Date).getFullYear(),rights:l})}),de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(k,{spacing:3,sx:{p:3,maxWidth:560},children:[de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"TEXT MODE"}),de(k,{direction:"row",spacing:1,children:[se(Hp,{label:"Auto-generated",selected:!u,onClick:()=>p(!1)}),se(Hp,{label:"Custom",selected:u,onClick:()=>p(!0)})]})]}),!u&&de(ce,{children:[se(Qi,{label:"Company name",value:e,onChange:e=>t(e.target.value),placeholder:"DinoDesign",size:"medium"}),se(dl,{label:"Year",value:Number(i),onChange:e=>n(e),min:1900,max:2100}),se(Qi,{label:"Rights text",value:l,onChange:e=>s(e.target.value),placeholder:"All rights reserved",size:"medium"}),se(ca,{style:{color:"var(--Text-Quiet)"},children:'Leave Rights blank to omit "All rights reserved." entirely.'})]}),u&&de(ce,{children:[se(Qi,{label:"Custom text",value:d,onChange:e=>c(e.target.value),placeholder:"© 2026 DinoDesign · MIT License · Built with love",size:"medium",multiline:!0}),se(ca,{style:{color:"var(--Text-Quiet)"},children:"Pass any string (or React node) as children to fully override the auto text."})]}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{direction:"row",spacing:1,sx:{flexWrap:"wrap",rowGap:1},children:Fp.map(e=>se(Hp,{label:e.label,selected:m===e.value,onClick:()=>f(e.value)},e.value))}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:"Matches the Footer color presets so the two stack cleanly."})]})]})}),se(ro,{value:1,children:de(k,{spacing:2,sx:{p:3,maxWidth:560},children:[se(ca,{style:{color:"var(--Text-Quiet)"},children:"Live WCAG 2.1 contrast against the painted background. AA needs 4.5:1 for normal text; AAA needs 7:1."}),x&&se(zp,{targetRef:x,label:"Copyright strip",deps:[m,u,e,i,l,d]})]})})]})]})}const Mp=["Default","Primary","Secondary","Tertiary","Neutral"],Ep={Classic:{name:"Classic",description:"Raised + soft shadow",angle:135,bevel:!0,depth:5,softness:1,shadow:!0,shadowDistance:6,shadowBlur:8,shadowOpacity:.6},Carved:{name:"Carved",description:"Deep inset, no shadow",angle:135,bevel:!0,depth:10,softness:2,shadow:!1,shadowDistance:4,shadowBlur:4,shadowOpacity:.4},Embossed:{name:"Embossed",description:"Inset + heavy shadow",angle:135,bevel:!0,depth:7,softness:1.5,shadow:!0,shadowDistance:10,shadowBlur:14,shadowOpacity:.7},Stamp:{name:"Stamp",description:"Reversed light + shadow",angle:315,bevel:!0,depth:6,softness:1,shadow:!0,shadowDistance:5,shadowBlur:6,shadowOpacity:.8},"Night Cut":{name:"Night Cut",description:"Inset on dark background",angle:135,bevel:!0,depth:8,softness:2,shadow:!1,shadowDistance:6,shadowBlur:8,shadowOpacity:.6},"Shadow Only":{name:"Shadow Only",description:"Flat fill + drop shadow",angle:135,bevel:!1,depth:4,softness:1,shadow:!0,shadowDistance:8,shadowBlur:12,shadowOpacity:.5}},Op=Object.keys(Ep);function Np(e,r){if("custom"===e)return{...Ep.Classic,name:"Custom",description:"Custom",...r||{}};const t=Ep[e];return t?{...t}:{...Ep.Classic}}function Qp(e,r){const t=e||"Primary";return"base"===r?"var(--Buttons-"+t+"-Button)":"highlight"===r?"rgb(var(--Buttons-"+t+"-Highlight))":"lowlight"===r?"rgb(var(--Buttons-"+t+"-Lowlight))":void 0}function Vp(e){const r=e||"Primary";return"Default"===r?"var(--Text)":"var(--Text-"+r+")"}function jp(e,r){const t=(e-90)*Math.PI/180;return{dx:Math.cos(t)*r,dy:Math.sin(t)*r}}const Gp={"display-large":{fontFamily:"var(--Header-Font-Family)",fontSize:"var(--Display-Large-Font-Size)",fontWeight:"var(--Display-Large-Font-Weight)",letterSpacing:"var(--Display-Large-Letter-Spacing)",pxHint:64},"display-small":{fontFamily:"var(--Header-Font-Family)",fontSize:"var(--Display-Small-Font-Size)",fontWeight:"var(--Display-Small-Font-Weight)",letterSpacing:"var(--Display-Small-Letter-Spacing)",pxHint:48}};function Up({text:r="Your Brand. Perfected.",curves:t,arc:a=160,radius:i=300,direction:o="up",rotation:n=0,autoCrop:l=!0,textStyle:s="display-large",fontSize:d,fontFamily:c,fontWeight:u,letterSpacing:h,color:p="var(--Text, #1a1a1a)",bevel:m=!1,bevelTheme:f="Primary",bevelPreset:g,bevelCustom:x,className:b,style:v,...y}){const S=g?Np(g,x):null,k=S?!!S.bevel:!!m,B=Gp[s]||Gp["display-large"],w=c??B.fontFamily,C=d??B.fontSize,T=u??B.fontWeight,z=h??B.letterSpacing,A="number"==typeof d?d:B.pxHint,I=t&&t.length>0?t:[{arc:a,radius:i,direction:o}],{d:R,width:W,upMax:D,downMax:L,pathId:F}=function(r){return e.useMemo(()=>{const e="dino-curved-text-"+Math.random().toString(36).slice(2,9);let t=0;const a=0;let i="M "+t+" "+a,o=0,n=0;for(const{arc:e,radius:l,direction:s}of r){const r=Xp(e,1,359),d=Math.max(10,l),c=r*Math.PI/180,u=2*d*Math.sin(c/2),h=d*(1-Math.cos(c/2));t+=u,i+=" A "+d+" "+d+" 0 "+(r>180?1:0)+" "+("up"===s?1:0)+" "+t+" "+a,"up"===s?o=Math.max(o,h):n=Math.max(n,h)}return{d:i,width:t,upMax:o,downMax:n,pathId:e}},[JSON.stringify(r)])}(I),H=Math.ceil(D+A),P=Math.ceil(L+A),M=Math.ceil(A),E=Math.ceil(W+2*M),O=H+P,N=M,Q=H,V=n?"rotate("+n+" "+E/2+" "+O/2+")":void 0,j=e.useRef(null),[G,U]=e.useState(null),[X,Y]=e.useState(A);e.useEffect(()=>{if(!j.current||"undefined"==typeof ResizeObserver)return;const e=j.current,r=()=>{const r=e.getBoundingClientRect(),t=G?G.width:E;if(!t||!r.width)return;const a=r.width/t;Y(A*a)};r();const t=new ResizeObserver(r);return t.observe(e),()=>t.disconnect()},[E,A,G]);const Z=k&&X>=19;e.useLayoutEffect(()=>{if(!l)return void U(null);const e=j.current;if(!e)return;const r=e.querySelector("text");if(!r)return;let t;try{t=r.getBBox()}catch(e){return}if(!t||!t.width||!t.height)return;const a=E/2,i=O/2,o=n*Math.PI/180,s=Math.cos(o),d=Math.sin(o),c=(e,r)=>{const t=e-a,o=r-i;return{x:a+t*s-o*d,y:i+t*d+o*s}},u=[c(t.x,t.y),c(t.x+t.width,t.y),c(t.x,t.y+t.height),c(t.x+t.width,t.y+t.height)],h=Math.min(...u.map(e=>e.x)),p=Math.max(...u.map(e=>e.x)),m=Math.min(...u.map(e=>e.y)),f=Math.max(...u.map(e=>e.y)),g=.12*A,x={x:h-g,y:m-g,width:p-h+2*g,height:f-m+2*g};U(e=>e&&Math.abs(e.x-x.x)<.5&&Math.abs(e.y-x.y)<.5&&Math.abs(e.width-x.width)<.5&&Math.abs(e.height-x.height)<.5?e:x)},[l,r,JSON.stringify(I),n,A,z,w,T,k,f,g,JSON.stringify(x)]);const q=G?G.x+" "+G.y+" "+G.width+" "+G.height:"0 0 "+E+" "+O,J=G?G.width:E,K=G?G.height:O;return de("svg",{ref:j,viewBox:q,width:J,height:K,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",style:{display:"block",maxWidth:"100%",height:"auto",overflow:"visible",...v},"aria-label":r,role:"img",className:["dino-curved-text",b].filter(Boolean).join(" "),...y,children:[se("defs",{children:se("path",{id:F,d:R,transform:"translate("+N+" "+Q+")"})}),de("g",{transform:V,children:[Z&&(()=>{const e=S?S.depth/96:.045,t=Math.max(2,Math.round(A*e)),a=Math.max(1,Math.round(A*e*.67)),i={fontFamily:w,fontSize:"number"==typeof C?C+"px":C,fontWeight:T,letterSpacing:"number"==typeof z?z+"px":z};return de(ce,{children:[se("text",{className:"dino-bevel-layer dino-bevel-layer--lowlight",fill:"rgb(var(--Buttons-"+f+"-Lowlight))",transform:"translate(0 "+t+")",style:i,children:se("textPath",{href:"#"+F,startOffset:"50%",textAnchor:"middle",children:r})}),se("text",{className:"dino-bevel-layer dino-bevel-layer--highlight",fill:"rgb(var(--Buttons-"+f+"-Highlight))",transform:"translate(0 -"+a+")",style:i,children:se("textPath",{href:"#"+F,startOffset:"50%",textAnchor:"middle",children:r})})]})})(),se("text",{className:"dino-curved-text__base",fill:Z?"var(--Buttons-"+f+"-Button)":k?Vp(f):p,style:{fontFamily:w,fontSize:"number"==typeof C?C+"px":C,fontWeight:T,letterSpacing:"number"==typeof z?z+"px":z},children:se("textPath",{href:"#"+F,startOffset:"50%",textAnchor:"middle",children:r})})]})]})}function Xp(e,r,t){return Math.max(r,Math.min(t,e))}const Yp=[{value:"display-large",label:"Display Large"},{value:"display-small",label:"Display Small"}],Zp=[{value:"text",label:"Text",css:"var(--Text)"},{value:"primary",label:"Primary",css:"var(--Text-Primary)"},{value:"secondary",label:"Secondary",css:"var(--Text-Secondary)"},{value:"tertiary",label:"Tertiary",css:"var(--Text-Tertiary)"}],qp=Mp.map(e=>({value:e,label:e}));function Jp({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Kp(){const[e,t]=r("Your Brand. Perfected."),[i,n]=r("display-large"),[l,s]=r("primary"),[d,c]=r([(u="up",{arc:140,radius:340,direction:u})]);var u;const[p,m]=r(0),[f,g]=r(8),[x,b]=r(700),[v,y]=r(!1),[S,B]=r("Primary"),[w,C]=r("Classic"),T=a(null),[z,A]=r(null);o(()=>{T.current&&A({current:T.current.querySelector("text")})},[l,i,d,p,f,x,v,S,w]);const I=Zp.find(e=>e.value===l)?.css||Zp[0].css;function R(e,r){c(t=>t.map((t,a)=>a===e?{...t,...r}:t))}return de(h,{children:[se(Vt,{style:{marginBottom:12},children:"Curved Display Text"}),se(ta,{color:"quiet",style:{marginBottom:24,maxWidth:720},children:"Decorative text laid along an SVG arc. Chain multiple arcs to build a wave — each curve gets its own radius, arc sweep, and direction. Uses your design system's decorative font + text tokens."}),de(h,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(360px, 1fr))",gap:3,alignItems:"start"},children:[se(h,{sx:{minWidth:0},children:se(h,{ref:T,"data-surface":"Container",sx:{background:"var(--Background)",borderRadius:2,p:3,display:"flex",alignItems:"center",justifyContent:"center",overflow:"auto",position:"sticky",top:16},children:se(Up,{text:e,curves:d,textStyle:i,rotation:p,letterSpacing:f,fontWeight:x,bevel:v,bevelTheme:S,bevelPreset:v?w:void 0,color:I})})}),se(h,{sx:{minWidth:0,alignSelf:"flex-start"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(k,{spacing:3,sx:{p:3,maxWidth:720},children:[se(Qi,{label:"Text",value:e,onChange:e=>t(e.target.value),placeholder:"Your headline…",size:"medium"}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"CURVES"}),se(k,{direction:"row",spacing:1,children:[1,2].map(e=>se(Jp,{label:String(e),selected:d.length===e,onClick:()=>function(e){c(r=>{if(e===r.length)return r;if(e>r.length){const t=[...r];for(;t.length<e;){const e=t[t.length-1];t.push({arc:e.arc,radius:e.radius,direction:"up"===e.direction?"down":"up"})}return t}return r.slice(0,e)})}(e)},e))}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:"One curve is an arch. Two curves chain end-to-end for a wave."})]}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:12},children:"PER-CURVE SETTINGS"}),se(k,{spacing:2,children:d.map((e,r)=>de(h,{"data-surface":"Container",style:{background:"var(--Background)",border:"1px solid var(--Border)",borderRadius:8,padding:12},children:[de(k,{direction:"row",alignItems:"center",spacing:2,sx:{mb:1},children:[de(ca,{style:{fontWeight:700},children:["Curve ",r+1]}),se("div",{style:{flex:1}}),de(k,{direction:"row",spacing:1,children:[se(Jp,{label:"⌢ Up",selected:"up"===e.direction,onClick:()=>R(r,{direction:"up"})}),se(Jp,{label:"⌣ Down",selected:"down"===e.direction,onClick:()=>R(r,{direction:"down"})})]})]}),de(k,{spacing:1,children:[de("div",{children:[de(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Radius",de("span",{style:{float:"right"},children:[e.radius,"px"]})]}),se(us,{min:100,max:600,step:10,value:e.radius,onChange:(e,t)=>R(r,{radius:t})})]}),de("div",{children:[de(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Arc sweep",de("span",{style:{float:"right"},children:[e.arc,"°"]})]}),se(us,{min:40,max:280,step:5,value:e.arc,onChange:(e,t)=>R(r,{arc:t})})]})]})]},r))})]}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"TYPOGRAPHY"}),se(k,{direction:"row",spacing:1,sx:{flexWrap:"wrap",rowGap:1},children:Yp.map(e=>se(Jp,{label:e.label,selected:i===e.value,onClick:()=>n(e.value)},e.value))}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:"Uses the lib's DisplayLarge / DisplaySmall tokens (font-family, size, weight, letter-spacing)."})]}),de(h,{children:[de(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:["LETTER SPACING",de("span",{style:{float:"right"},children:[f,"px"]})]}),se(us,{min:-4,max:40,step:1,value:f,onChange:(e,r)=>g(r)}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:"Adjusts the gap between characters along the wave."})]}),de(h,{children:[de(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:["FONT WEIGHT",se("span",{style:{float:"right"},children:x})]}),se(us,{min:100,max:900,step:100,value:x,onChange:(e,r)=>b(r)}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:"Heavier weights read better at decorative sizes. Available weights depend on the loaded display font."})]}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"BEVEL"}),se(Jo,{label:"3D bevel effect",checked:v,onChange:e=>y(e.target.checked)}),v&&de(h,{sx:{mt:1.5},children:[se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:6},children:"Preset"}),se(k,{direction:"row",spacing:1,sx:{flexWrap:"wrap",rowGap:1,mb:1.5},children:Op.map(e=>se(Jp,{label:e,selected:w===e,onClick:()=>C(e)},e))}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:6},children:"Bevel theme"}),se(k,{direction:"row",spacing:1,sx:{flexWrap:"wrap",rowGap:1},children:qp.map(e=>se(Jp,{label:e.label,selected:S===e.value,onClick:()=>B(e.value)},e.value))})]}),de(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:["Bevel layers use ",de("code",{children:["--Buttons-","{Theme}","-Button"]})," for the fill, with ",se("code",{children:"Highlight"})," + ",se("code",{children:"Lowlight"}),"tokens for the bright/shadow stripes. CurvedText honors a preset's ",se("em",{children:"depth"})," only — angle, softness, and drop-shadow fields are stacked-rendering limitations and are ignored here (the full filter pipeline lives in ",se("code",{children:"<BevelText>"}),"). Shadow-only presets render no effect. Auto-hides below 19px so the 3:1 bevel contrast doesn't compromise small-text legibility."]})]}),de(h,{children:[de(k,{direction:"row",alignItems:"center",sx:{mb:1},children:[de(ba,{style:{color:"var(--Text-Quiet)",flex:1},children:["ROTATION",de("span",{style:{float:"right",marginRight:12},children:[p,"°"]})]}),se(bi,{variant:"default-outline",size:"small",onClick:function(){const r=T.current?.querySelector("svg");if(!r)return;const t=r.querySelector("path"),a=r.querySelector("text");if(!t||!a)return;const i=t.getTotalLength();if(!i)return;let o=0;try{o=a.getComputedTextLength?.()||0}catch(e){}o||(o=Math.min(i,18*e.length));const n=Math.max(0,(i-o)/2),l=Math.min(i,n+o),s=t.getPointAtLength(n),d=t.getPointAtLength(l),c=180*Math.atan2(d.y-s.y,d.x-s.x)/Math.PI,u=Math.max(-45,Math.min(45,Math.round(-c)));m(u)},children:"Auto-level"})]}),se(us,{min:-45,max:45,step:1,value:p,onChange:(e,r)=>m(r)}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:'Tilts the whole text block around its center. "Auto-level" rotates so the text\'s start and end sit on the same horizontal line — useful when a multi-curve wave makes the reading line slant.'})]}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{direction:"row",spacing:1,sx:{flexWrap:"wrap",rowGap:1},children:Zp.map(e=>se(Jp,{label:e.label,selected:l===e.value,onClick:()=>s(e.value)},e.value))})]})]})}),se(ro,{value:1,children:de(k,{spacing:2,sx:{p:3,maxWidth:560},children:[se(ca,{style:{color:"var(--Text-Quiet)"},children:"Live WCAG 2.1 contrast against the painted background. Decorative display text counts as large text — AA needs 3:1, AAA needs 4.5:1 — but DinoDesign defaults to 4.5:1 across the board."}),z&&se(zp,{targetRef:z,label:"Curved text",deps:[l,i,JSON.stringify(d),p,f]}),de(_t,{color:"quiet",children:["The SVG sets ",se("code",{children:'role="img"'})," and"," ",se("code",{children:"aria-label"})," to the rendered text so screen readers announce it as a labeled image, not a stream of individual glyphs."]})]})})]})})})]})]})}const $p={"display-large":{fontFamily:"var(--Header-Font-Family)",fontSize:"var(--Display-Large-Font-Size)",fontWeight:"var(--Display-Large-Font-Weight)",letterSpacing:"var(--Display-Large-Letter-Spacing)",pxHint:96},"display-small":{fontFamily:"var(--Header-Font-Family)",fontSize:"var(--Display-Small-Font-Size)",fontWeight:"var(--Display-Small-Font-Weight)",letterSpacing:"var(--Display-Small-Letter-Spacing)",pxHint:64}};function _p({text:r="DinoDesign",theme:t="Primary",preset:a="Classic",custom:i,textStyle:o="display-large",fontSize:n,fontFamily:l,fontWeight:s,letterSpacing:d,className:c,style:u,...h}){const p=$p[o]||$p["display-large"],m=l??p.fontFamily,f=n??p.fontSize,g=s??p.fontWeight,x=d??p.letterSpacing,b="number"==typeof n?n:p.pxHint,v=Np(a,i),y="dino-bevel-"+e.useId().replace(/:/g,""),S=y+"-s",k=e.useRef(null),[B,w]=e.useState(b),C=.6*b,T=Math.max(400,r.length*C+80),z=1.9*b,A=T/2,I=.7*z;e.useEffect(()=>{if(!k.current||"undefined"==typeof ResizeObserver)return;const e=k.current,r=()=>{const r=e.getBoundingClientRect();T&&r.width&&w(b*(r.width/T))};r();const t=new ResizeObserver(r);return t.observe(e),()=>t.disconnect()},[T,b]);const R=B>=19,W=v.bevel?jp(v.angle+180,v.depth):{dx:0,dy:0},D=v.bevel?jp(v.angle,v.depth):{dx:0,dy:0},L=v.shadow?jp(v.angle,v.shadowDistance??6):{dx:0,dy:0},F=R?Qp(t,"base"):Vp(t),H=Qp(t,"highlight"),P=Qp(t,"lowlight"),M={fontFamily:m,fontSize:"number"==typeof f?f+"px":f,fontWeight:g,letterSpacing:"number"==typeof x?x+"px":x},E=v.bevel&&R?"url(#"+y+")":void 0,O=v.shadow&&R?"url(#"+S+")":void 0;return de("svg",{ref:k,viewBox:"0 0 "+T+" "+z,width:T,height:z,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",style:{display:"block",maxWidth:"100%",height:"auto",overflow:"visible",...u},"aria-label":r,role:"img",className:["dino-bevel-text",c].filter(Boolean).join(" "),...h,children:[de("defs",{children:[v.shadow&&se("filter",{id:S,x:"-30%",y:"-30%",width:"160%",height:"160%",children:se("feDropShadow",{dx:L.dx.toFixed(2),dy:L.dy.toFixed(2),stdDeviation:v.shadowBlur??8,style:{floodColor:P,floodOpacity:v.shadowOpacity??.6}})}),v.bevel&&de("filter",{id:y,x:"-5%",y:"-5%",width:"110%",height:"110%",colorInterpolationFilters:"sRGB",children:[se("feGaussianBlur",{in:"SourceAlpha",stdDeviation:(v.softness??1)+.5,result:"blur-alpha"}),se("feOffset",{in:"blur-alpha",dx:D.dx.toFixed(2),dy:D.dy.toFixed(2),result:"shadow-offset"}),se("feFlood",{style:{floodColor:P,floodOpacity:.95},result:"shadow-flood"}),se("feComposite",{in:"shadow-flood",in2:"shadow-offset",operator:"in",result:"shadow-shaped"}),se("feComposite",{in:"shadow-shaped",in2:"SourceAlpha",operator:"in",result:"shadow-clipped"}),se("feOffset",{in:"blur-alpha",dx:W.dx.toFixed(2),dy:W.dy.toFixed(2),result:"hi-offset"}),se("feFlood",{style:{floodColor:H,floodOpacity:.95},result:"hi-flood"}),se("feComposite",{in:"hi-flood",in2:"hi-offset",operator:"in",result:"hi-shaped"}),se("feComposite",{in:"hi-shaped",in2:"SourceAlpha",operator:"in",result:"hi-clipped"}),de("feMerge",{children:[se("feMergeNode",{in:"SourceGraphic"}),se("feMergeNode",{in:"shadow-clipped"}),se("feMergeNode",{in:"hi-clipped"})]})]})]}),v.shadow&&R&&se("text",{className:"dino-bevel-layer dino-bevel-layer--shadow",x:A,y:I,textAnchor:"middle",fill:F,filter:O,style:M,"aria-hidden":"true",children:r}),se("text",{className:v.bevel?"dino-bevel-text__base dino-bevel-layer":"dino-bevel-text__base",x:A,y:I,textAnchor:"middle",fill:F,filter:E,style:M,children:r})]})}const em=[...Op.map(e=>({value:e,label:e,description:Ep[e].description})),{value:"custom",label:"Custom",description:"Tune every knob"}],rm=[{value:"light",label:"Light",css:"var(--Surface)"},{value:"warm",label:"Warm",css:"var(--Surface-Dim)"},{value:"dark",label:"Dark",css:"var(--Container-High)"}];function tm({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function am({option:e,active:r,onClick:t}){return de(h,{onClick:t,role:"button",tabIndex:0,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t())},sx:{flex:"1 1 140px",minWidth:130,cursor:"pointer",border:"1.5px solid",borderColor:r?"var(--Buttons-Primary-Border)":"var(--Border)",background:r?"rgb(var(--Buttons-Primary-Highlight) / 0.18)":"var(--Background)",borderRadius:"var(--Style-Border-Radius)",p:1.5,transition:"border-color 0.15s, background 0.15s",textAlign:"center","&:hover":{borderColor:"var(--Buttons-Primary-Border)"},"&:focus-visible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:2}},children:[se(ca,{style:{fontWeight:600,color:"var(--Text)"},children:e.label}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:2},children:e.description})]})}function im(){const[e,t]=r("DinoDesign"),[a,i]=r("Primary"),[o,n]=r("Classic"),[l,s]=r("light"),[d,c]=r(135),[u,p]=r(5),[m,f]=r(1),[g,x]=r(!0),[b,v]=r(!0),[y,S]=r(6),[B,w]=r(8),[C,T]=r(60),[z,A]=r(96),[I,R]=r(900),[W,D]=r(0),L="custom"===o,F=L?{angle:d,depth:u,softness:m,bevel:g,shadow:b,shadowDistance:y,shadowBlur:B,shadowOpacity:C/100}:void 0;const H=rm.find(e=>e.value===l)?.css||rm[0].css;return de(h,{children:[se(Vt,{style:{marginBottom:12},children:"Bevel Display Text"}),se(ta,{color:"quiet",style:{marginBottom:24,maxWidth:720},children:"Straight-line display text with an SVG inset-bevel and optional drop shadow. Colors are locked to the active button-palette tokens (Button / Highlight / Lowlight) so the same preset reads correctly under any theme."}),de(h,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(360px, 1fr))",gap:3,alignItems:"start"},children:[se(h,{sx:{minWidth:0},children:se(h,{"data-surface":"Container",sx:{background:H,borderRadius:2,p:4,display:"flex",alignItems:"center",justifyContent:"center",minHeight:240,overflow:"auto",position:"sticky",top:16,transition:"background 0.2s"},children:se(_p,{text:e,theme:a,preset:o,custom:F,fontSize:z,fontWeight:I,letterSpacing:W})})}),se(h,{sx:{minWidth:0,alignSelf:"flex-start"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(k,{spacing:3,sx:{p:3,maxWidth:720},children:[se(Qi,{label:"Text",value:e,onChange:e=>t(e.target.value),placeholder:"Your headline…",size:"medium"}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"THEME"}),se(k,{direction:"row",spacing:1,sx:{flexWrap:"wrap",rowGap:1},children:Mp.map(e=>se(tm,{label:e,selected:a===e,onClick:()=>i(e)},e))}),de(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:["Resolves to ",de("code",{children:["--Buttons-","{Theme}","-Button"]})," ","(fill), ",se("code",{children:"-Highlight"})," (light edge), and"," ",se("code",{children:"-Lowlight"})," (shadow edge)."]})]}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"PRESETS"}),se(h,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:em.map(e=>se(am,{option:e,active:o===e.value,onClick:()=>function(e){if(n(e),"custom"!==e){const r=Np(e);c(r.angle),p(r.depth??5),f(r.softness??1),x(r.bevel),v(r.shadow),S(r.shadowDistance??6),w(r.shadowBlur??8),T(Math.round(100*(r.shadowOpacity??.6)))}}(e.value)},e.value))})]}),L&&de(h,{sx:{border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)",p:2},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:12},children:"CUSTOM"}),de(k,{spacing:2,children:[de("div",{children:[de(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Light angle",de("span",{style:{float:"right"},children:[d,"°"]})]}),se(us,{min:0,max:360,step:5,value:d,onChange:(e,r)=>c(r)})]}),de(h,{sx:{border:"1px solid var(--Border-Variant)",borderRadius:1,p:1.5},children:[se(Jo,{label:"Inset bevel",checked:g,onChange:e=>x(e.target.checked)}),g&&de(k,{spacing:1.5,sx:{mt:1.5},children:[de("div",{children:[de(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Depth",de("span",{style:{float:"right"},children:[u,"px"]})]}),se(us,{min:1,max:16,step:1,value:u,onChange:(e,r)=>p(r)})]}),de("div",{children:[de(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Softness",de("span",{style:{float:"right"},children:[m,"px"]})]}),se(us,{min:0,max:6,step:.5,value:m,onChange:(e,r)=>f(r)})]})]})]}),de(h,{sx:{border:"1px solid var(--Border-Variant)",borderRadius:1,p:1.5},children:[se(Jo,{label:"Drop shadow",checked:b,onChange:e=>v(e.target.checked)}),b&&de(k,{spacing:1.5,sx:{mt:1.5},children:[de("div",{children:[de(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Distance",de("span",{style:{float:"right"},children:[y,"px"]})]}),se(us,{min:1,max:24,step:1,value:y,onChange:(e,r)=>S(r)})]}),de("div",{children:[de(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Blur",de("span",{style:{float:"right"},children:[B,"px"]})]}),se(us,{min:0,max:24,step:1,value:B,onChange:(e,r)=>w(r)})]}),de("div",{children:[de(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Opacity",de("span",{style:{float:"right"},children:[C,"%"]})]}),se(us,{min:10,max:100,step:5,value:C,onChange:(e,r)=>T(r)})]})]})]})]})]}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"TYPOGRAPHY"}),de(k,{spacing:2,children:[de("div",{children:[de(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Font size",de("span",{style:{float:"right"},children:[z,"px"]})]}),se(us,{min:32,max:160,step:4,value:z,onChange:(e,r)=>A(r)})]}),de("div",{children:[de(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Font weight",se("span",{style:{float:"right"},children:I})]}),se(us,{min:400,max:900,step:100,value:I,onChange:(e,r)=>R(r)})]}),de("div",{children:[de(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Letter spacing",de("span",{style:{float:"right"},children:[W,"px"]})]}),se(us,{min:-2,max:20,step:1,value:W,onChange:(e,r)=>D(r)})]})]})]}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"PREVIEW BACKGROUND"}),se(k,{direction:"row",spacing:1,children:rm.map(e=>se(tm,{label:e.label,selected:l===e.value,onClick:()=>s(e.value)},e.value))}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:"Showcase-only — doesn't affect the emitted code."})]})]})}),se(ro,{value:1,children:de(k,{spacing:2,sx:{p:3,maxWidth:560},children:[de(ca,{style:{color:"var(--Text-Quiet)"},children:["BevelText uses the same Highlight / Lowlight token pair as button bevels, which target the WCAG 2.1 large-text minimum (3:1). Bevel text is decorative display — the SVG sets"," ",se("code",{children:'role="img"'})," and ",se("code",{children:"aria-label"})," to the rendered string so screen readers announce it as a labeled image, not a stream of glyphs."]}),se(_t,{color:"quiet",children:"Keep the rendered glyph height above ~24px when the bevel is on — at smaller sizes the highlight / lowlight stripes optically reduce the legible stroke width and the 3:1 contrast no longer feels comfortable."})]})})]})})})]})]})}function om({open:e,onClose:t,items:a=[],onItemClick:i,width:o=280,variant:n="temporary",header:l,footer:s,sx:d={},...c}){const[u,m]=r(null),[f,g]=r({}),x=(e,r)=>{m(r),i?.(e),"temporary"===n&&t?.()},b="permanent"===n?"permanent":"standard"===n?"standard":"temporary",v=de(h,{sx:{display:"flex",flexDirection:"column",height:"100%",backgroundColor:"var(--Container)",color:"var(--Text)"},children:[l&&se(h,{sx:{p:2,borderBottom:"1px solid var(--Border-Variant)"},children:"string"==typeof l?se(C,{variant:"h6",sx:{fontWeight:700},children:l}):l}),se($,{sx:{flex:1,overflow:"auto",py:1},children:a.map((e,r)=>{const t=u===r,a=e.submenu&&e.submenu.length>0,i=f[r];return de(h,{children:[se(B,{title:e.tooltip||"",placement:"right",children:se(_,{disablePadding:!0,children:de(ee,{onClick:()=>{a?(e=>{g(r=>({...r,[e]:!r[e]}))})(r):x(e,r)},selected:t&&!a,sx:{backgroundColor:t&&!a?"var(--Buttons-Primary-Button)":"transparent",color:t&&!a?"var(--Buttons-Primary-Text)":"var(--Text)","&:hover":{backgroundColor:t&&!a?"var(--Buttons-Primary-Button)":"var(--Container-High)"},"&.Mui-selected":{backgroundColor:"var(--Buttons-Primary-Button)",color:"var(--Buttons-Primary-Text)","&:hover":{backgroundColor:"var(--Buttons-Primary-Button)"}},transition:"all 0.2s ease-in-out"},children:[e.icon&&se(re,{sx:{color:t&&!a?"var(--Buttons-Primary-Text)":"var(--Icons-Primary)",minWidth:40},children:e.badge?se(p,{badgeContent:e.badge,color:"error",children:e.icon}):e.icon}),se(te,{primary:e.label,primaryTypographyProps:{variant:"body2",fontWeight:t&&!a?600:500}}),a&&se(h,{sx:{ml:1},children:se(i?jr:ye,{})})]})})}),a&&se(ae,{in:i,timeout:"auto",unmountOnExit:!0,children:se($,{component:"div",disablePadding:!0,children:e.submenu.map((e,r)=>se(_,{disablePadding:!0,children:de(ee,{onClick:()=>x(e,r),sx:{pl:4,backgroundColor:"transparent",color:"var(--Text)","&:hover":{backgroundColor:"var(--Container-High)"},"&.Mui-selected":{backgroundColor:"var(--Buttons-Primary-Button)",color:"var(--Buttons-Primary-Text)"}},children:[e.icon&&se(re,{sx:{color:"var(--Icons-Primary)",minWidth:40},children:e.icon}),se(te,{primary:e.label})]})},r))})}),e.divider&&se(ie,{sx:{my:1,borderColor:"var(--Border-Variant)"}})]},r)})}),s&&se(h,{sx:{borderTop:"1px solid var(--Border-Variant)",p:2},children:"string"==typeof s?se(C,{variant:"caption",sx:{color:"var(--Text-Quiet)"},children:s}):s})]});return"permanent"===n?se(h,{sx:{width:o,flexShrink:0,...d},children:v}):se(oe,{variant:b,open:e,onClose:t,PaperProps:{sx:{width:o,backgroundColor:"var(--Container)",color:"var(--Text)",...d}},...c,children:v})}function nm({layout:e="side",navItems:t=[{label:"Home",icon:se(ke,{}),path:"/"},{label:"About",icon:se(We,{}),path:"/about"},{label:"Settings",icon:se(we,{}),path:"/settings"},{label:"Help",icon:se(dt,{}),path:"/help"}],title:a="My App",children:i,onLayoutChange:o,onNavigate:n,sx:l={},...s}){const d=ne(),c=le(d.breakpoints.down("md"));le(d.breakpoints.down("lg"));const[u,p]=r(!1),[m,f]=r(!1),g=c?"top":e,x=({compact:e=!1})=>se($,{sx:{py:1},children:t.map((r,t)=>se(B,{title:e?r.label:"",placement:"right",children:de(ee,{onClick:()=>{n?.(r),p(!1)},sx:{color:"var(--Text)","&:hover":{backgroundColor:"var(--Container-High)"},transition:"all 0.2s ease-in-out",justifyContent:e?"center":"flex-start",px:e?1:2},children:[se(re,{sx:{color:"var(--Icons-Primary)",minWidth:e?"auto":40,mr:e?0:1},children:r.icon}),!e&&se(te,{primary:r.label})]})},t))});return de(h,{sx:{minHeight:"100vh",backgroundColor:"var(--Background)",color:"var(--Text)",display:"flex",flexDirection:"column",...l},...s,children:[se(J,{position:"static",sx:{backgroundColor:"var(--Header)",color:"var(--Text)",boxShadow:"0 1px 3px rgba(0,0,0,0.12)",borderBottom:"1px solid var(--Border-Variant)"},children:de(K,{children:[c&&"rail"!==g&&se(w,{edge:"start",color:"inherit",onClick:()=>p(!u),sx:{mr:2},children:se(u?Dr:Wr,{})}),se(C,{variant:"h6",sx:{flex:1,fontWeight:700},children:a}),!c&&o&&de(R,{value:e,exclusive:!0,onChange:(e,r)=>{r&&o(r)},size:"small",sx:{"& .MuiToggleButton-root":{color:"var(--Text)",border:"1px solid var(--Border)","&.Mui-selected":{backgroundColor:"var(--Button-Primary-Button)",color:"#fff",borderColor:"var(--Button-Primary-Button)"}}},children:[se(I,{value:"side","aria-label":"side nav",children:"☰ Side"}),se(I,{value:"rail","aria-label":"rail nav",children:"⫷ Rail"}),se(I,{value:"side-rail","aria-label":"side-rail nav",children:"☰⫷ Both"})]})]})}),de(h,{sx:{display:"flex",flex:1},children:[("rail"===g||"side-rail"===g)&&!c&&se(h,{sx:{width:80,backgroundColor:"var(--Container)",borderRight:"1px solid var(--Border-Variant)",display:"flex",flexDirection:"column",py:2},children:se(x,{compact:!0})}),("side"===g||"side-rail"===g)&&!c&&de(h,{sx:{width:m?80:280,backgroundColor:"var(--Container)",borderRight:"1px solid var(--Border-Variant)",transition:"width 0.3s ease-in-out",display:"flex",flexDirection:"column"},children:[de(h,{sx:{p:2,display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid var(--Border-Variant)",minHeight:64},children:[!m&&se(C,{variant:"h6",sx:{fontWeight:700,color:"var(--Text)"},children:"Menu"}),se(w,{size:"small",onClick:()=>f(!m),sx:{color:"var(--Icons-Primary)"},children:m?"›":"‹"})]}),se(x,{compact:m})]}),c&&de(oe,{anchor:"left",open:u,onClose:()=>p(!1),sx:{"& .MuiDrawer-paper":{backgroundColor:"var(--Container)",width:280}},children:[se(h,{sx:{p:2,borderBottom:"1px solid var(--Border-Variant)"},children:se(C,{variant:"h6",sx:{fontWeight:700},children:"Menu"})}),se(x,{compact:!1})]}),se(h,{sx:{flex:1,overflow:"auto",backgroundColor:"var(--Background)"},children:se(M,{maxWidth:"lg",sx:{py:4},children:i})})]})]})}const lm={small:{summaryPadding:"var(--Sizing-Half) var(--Sizing-Half) var(--Sizing-Half) var(--Sizing-1-and-Half)",gap:"var(--Sizing-Half)",detailsPy:"var(--Sizing-1-and-Half)",detailsPx:"var(--Sizing-1-and-Half)",iconSize:"small"},medium:{summaryPadding:"var(--Sizing-1) var(--Sizing-1) var(--Sizing-1) var(--Sizing-2)",gap:"var(--Sizing-1)",detailsPy:"var(--Sizing-2)",detailsPx:"var(--Sizing-2)",iconSize:"medium"},large:{summaryPadding:"var(--Sizing-1-and-Half) var(--Sizing-1-and-Half) var(--Sizing-1-and-Half) var(--Sizing-2-and-Half)",gap:"var(--Sizing-1-and-Half)",detailsPy:"var(--Sizing-2-and-Half)",detailsPx:"var(--Sizing-2-and-Half)",iconSize:"large"}},sm=l({variant:"solid",color:"default",size:"medium",spacing:0}),dm=l({expanded:!1,toggle:()=>{},disabled:!1,accordionId:""}),cm="var(--Accordion-Radius, var(--Button-Radius))";function um({children:e,variant:r="solid",surface:t,color:a="default",size:i="medium",spacing:o=0,className:n="",sx:l={},...s}){const d="default"===a?"Default":(c=a).charAt(0).toUpperCase()+c.slice(1);var c;const u=0===o,p="default"===a?"Default":d,m=t||("dark"===r?"Surface-Dimmest":"light"===r?"Surface-Brightest":"Surface");return se(sm.Provider,u?{value:{variant:r,color:a,size:i,spacing:o,dataTheme:p,dataSurface:m},children:se(h,{role:"presentation",className:"accordion-group accordion-group-connected accordion-group-"+r+" "+n,sx:{display:"flex",flexDirection:"column","& > .accordion-segment":{borderRadius:0,marginBottom:"-1px",boxShadow:"none"},"& > .accordion-segment:first-of-type":{borderTopLeftRadius:cm,borderTopRightRadius:cm},"& > .accordion-segment:last-of-type":{borderBottomLeftRadius:cm,borderBottomRightRadius:cm,marginBottom:0},...l},...s,children:e})}:{value:{variant:r,color:a,size:i,spacing:o,dataTheme:p,dataSurface:m},children:se(h,{role:"presentation",className:"accordion-group accordion-group-"+r+" accordion-group-spaced "+n,sx:{display:"flex",flexDirection:"column",gap:.5===o?"var(--Sizing-Half)":1===o?"var(--Sizing-1)":1.5===o?"var(--Sizing-1-and-Half)":2===o?"var(--Sizing-2)":8*o+"px",...l},...s,children:e})})}function hm({children:e,expanded:t,defaultExpanded:a=!1,onChange:i,disabled:o=!1,className:l="",sx:s={},...d}){const[c,u]=r(a),p=void 0!==t,m=p?t:c,{dataTheme:f,dataSurface:g}=n(sm),[x]=r(()=>"accordion-"+Math.random().toString(36).substring(2,9));return se(dm.Provider,{value:{expanded:m,toggle:()=>{if(o)return;const e=!m;p||u(e),i?.(e)},disabled:o,accordionId:x},children:se(h,{className:"accordion-segment accordion"+(m?" accordion-expanded":"")+(o?" accordion-disabled":"")+" "+l,"data-theme":f,"data-surface":g,sx:{border:"1px solid var(--Border-Variant)",borderRadius:cm,backgroundColor:"var(--Background)",overflow:"hidden",boxShadow:Ja,opacity:o?.5:1,...s},...d,children:e})})}const pm={small:_t,medium:ta,large:la},mm={small:_t,medium:ta,large:la};function fm({children:e,startDecorator:r,endDecorator:t,eyebrow:a,overline:i,secondary:o,expandIcon:l,className:s="",sx:d={},...c}){const{expanded:u,toggle:p,disabled:m,accordionId:f}=n(dm),{size:g}=n(sm),x=lm[g]||lm.medium,b=pm[g]||pm.medium,v=l||se(Fa,{size:x.iconSize,sx:{color:u?"var(--Text)":"var(--Quiet)",transition:"color 0.15s ease"},children:se(ye,{})}),y={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"};return de(h,{component:"button",role:"button","aria-expanded":u,"aria-controls":f+"-content",id:f+"-header",tabIndex:m?-1:0,onClick:p,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),p())},className:"accordion-summary"+(u?" accordion-summary-expanded":"")+" "+s,sx:{display:"flex",flexDirection:"row",alignItems:"flex-start",justifyContent:"flex-start",width:"100%",gap:x.gap,padding:x.summaryPadding,border:"none",backgroundColor:"transparent",color:u?"var(--Text)":"var(--Quiet)",fontFamily:"inherit",cursor:m?"not-allowed":"pointer",textAlign:"left",transition:"color 0.2s ease, background-color 0.15s ease",borderRadius:0,"&:hover":m?{}:{color:"var(--Text)","& .omni-icon":{color:"var(--Text)"}},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"-3px"},...d},...c,children:[r&&se(h,{className:"accordion-summary-start",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:r}),de(h,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:"var(--Sizing-Half)"},children:[(a??i)&&se(ba,{style:{...y,color:"var(--Text-Quiet)"},children:a??i}),null!=e&&se(b,{style:{...y,color:"inherit",fontWeight:600},children:e}),o&&se(_t,{style:{...y,color:"var(--Text-Quiet)"},children:o})]}),t&&se(h,{className:"accordion-summary-end",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:t}),se(h,{sx:{display:"flex",alignItems:"center",justifyContent:"center",transform:u?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.25s ease",flexShrink:0},children:v})]})}function gm({children:e,className:r="",sx:t={},...a}){const{expanded:i,accordionId:o}=n(dm),{size:l}=n(sm),s=lm[l]||lm.medium,d=mm[l]||mm.medium;return i?se(h,{role:"region",id:o+"-content","aria-labelledby":o+"-header",className:"accordion-details "+r,sx:{padding:"0 "+s.detailsPx+" "+s.detailsPy+" "+s.detailsPx,color:"var(--Text)",fontFamily:"inherit",lineHeight:1.6,...t},...a,children:"string"==typeof e||"number"==typeof e?se(d,{children:e}):e}):null}const xm={1:{padLeft:0,togglePadLeft:0},2:{padLeft:24,togglePadLeft:4},3:{padLeft:48,togglePadLeft:0},4:{padLeft:72,togglePadLeft:0},5:{padLeft:88,togglePadLeft:4}},bm={0:{padLeft:8},1:{padLeft:48},2:{padLeft:56,slotPadLeft:4},3:{padLeft:64,slotPadLeft:4},4:{padLeft:88,slotPadLeft:4},5:{padLeft:112},6:{padLeft:128}};function vm({label:e,icon:r,level:t=0,toggle:a="none",onToggle:i,disabled:o=!1,size:n="small",className:l="",sx:s={},children:d,...c}){const u=6===t&&"none"!==a?"none":a,p="on"===u,m="none"!==u,f=m?xm[t]||{padLeft:0,togglePadLeft:0}:bm[t]||bm[0],g={paddingTop:"8px",paddingRight:"8px",paddingBottom:"8px",paddingLeft:(f.padLeft??8)+"px"};return de(h,{className:"tree-branch tree-branch-"+n+" tree-branch-level-"+t+" tree-branch-toggle-"+u+(o?" tree-branch-disabled":"")+(l?" "+l:""),sx:{width:"100%",...s},...c,children:[de(h,{component:"button",type:"button",role:"treeitem","aria-expanded":m?p:void 0,"aria-disabled":o||void 0,tabIndex:o?-1:0,onClick:e=>{o||m&&(e.stopPropagation(),i?.(p?"off":"on"))},disabled:o,sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px",width:"100%",minHeight:"24px",...g,border:"none",backgroundColor:"transparent",fontFamily:"inherit",color:"inherit",textAlign:"left",cursor:o?"not-allowed":"pointer",opacity:o?.5:1,outline:"none",transition:"background-color 0.15s ease, color 0.15s ease","&:hover":o?{}:{backgroundColor:"var(--Hover)"},"&:active":o?{}:{backgroundColor:"var(--Pressed)"},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"-2px"}},children:[m&&se(h,{className:"tree-branch-toggle",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,paddingLeft:(f.togglePadLeft??0)+"px"},children:se(h,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",transform:p?"rotate(-90deg)":"rotate(0deg)"},children:se(Fa,{size:"small",children:se(Xr,{})})})}),de(h,{className:"tree-branch-slot",sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px",flex:1,minWidth:0,...void 0!==f.slotPadLeft&&{paddingLeft:f.slotPadLeft+"px"}},children:[r&&se(h,{sx:{display:"inline-flex",alignItems:"center",flexShrink:0},children:se(Fa,{size:"small",children:r})}),null!=e&&se(ea,{style:{color:"inherit",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block",flex:1,minWidth:0},children:e})]})]}),p&&d&&se(h,{role:"group",sx:{display:"flex",flexDirection:"column"},children:d})]})}const ym=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",Sm=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}],km=e=>se(h,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:e,flexShrink:0}}),Bm=[{id:"1",label:"Documents",icon:se(at,{}),badge:km("var(--Warning-Text, orange)"),children:[{id:"1-1",label:"Company",icon:se(ct,{}),badge:km("var(--Warning-Text, orange)"),children:[{id:"1-1-1",label:"Invoice",icon:se(ht,{})},{id:"1-1-2",label:"Meeting notes",icon:se(ut,{})},{id:"1-1-3",label:"Tasks list",icon:se(ut,{})},{id:"1-1-4",label:"Equipment",icon:se(ht,{})},{id:"1-1-5",label:"Video conference",icon:se(pt,{})}]},{id:"1-2",label:"Personal",icon:se(at,{})},{id:"1-3",label:"Group photo",icon:se(Gr,{})}]},{id:"2",label:"Bookmarked",icon:se($r,{}),children:[{id:"2-1",label:"Favourites",icon:se(ut,{})}]},{id:"3",label:"History",icon:se(at,{})},{id:"4",label:"Trash",icon:se(Be,{}),disabled:!0}],wm=JSON.stringify(Pu,null,2);function Cm({ratio:e,threshold:r}){if(!e)return se(ca,{style:{color:"var(--Text-Quiet)"},children:"--"});const t=parseFloat(e)>=r;return de(h,{sx:{display:"inline-flex",alignItems:"center",gap:.5},children:[de(h,{sx:{px:1,py:.25,borderRadius:"4px",fontSize:"11px",fontWeight:700,backgroundColor:t?"var(--Tags-Success-BG)":"var(--Tags-Error-BG)",color:t?"var(--Tags-Success-Text)":"var(--Tags-Error-Text)"},children:[e,":1"]}),se(ca,{style:{color:t?"var(--Tags-Success-Text)":"var(--Tags-Error-Text)"},children:t?"Pass":"Fail"})]})}function Tm({label:e,ratio:r,threshold:t,note:a}){return de(h,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(h,{sx:{flex:1},children:[se(_t,{style:{color:"var(--Text)"},children:e}),a&&se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:a})]}),se(Cm,{ratio:r,threshold:t})]})}function zm({label:e,selected:r,onClick:t}){return se(bi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Am({color:e,selected:r,onClick:t}){const a=ym(e);return se(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&se(he,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function Im({value:e,onChange:t}){const[a,i]=r(e),[o,n]=r(null);return de(h,{children:[de(h,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1},children:[se(ba,{style:{color:"var(--Text-Quiet)"},children:"TREE DATA (JSON)"}),se(bi,{variant:"ghost",size:"small",onClick:()=>{i(wm),n(null),t(Pu)},children:"Reset"})]}),se(h,{component:"textarea",value:a,onChange:e=>{i(e.target.value);try{const r=JSON.parse(e.target.value);n(null),t(r)}catch(e){n(e.message)}},spellCheck:!1,rows:10,sx:{width:"100%",fontFamily:"monospace",fontSize:"11px",backgroundColor:"#1e1e1e",color:o?"#f87171":"#e5e7eb",border:"1px solid "+(o?"#f87171":"#333"),borderRadius:"6px",padding:"10px",resize:"vertical",outline:"none",boxSizing:"border-box",lineHeight:1.5,"&:focus":{borderColor:"var(--Focus-Visible)"}}}),o&&de(ca,{style:{color:"#f87171",display:"block",marginTop:4},children:["JSON error: ",o]})]})}function Rm(){const[e,t]=r("solid"),[n,l]=r("primary"),[s,d]=r("default"),[c,u]=r("slide"),[p,m]=r("single"),[f,g]=r(!1),[x,b]=r(!1),[v,y]=r(!1),[S,B]=r(Pu),[w,C]=r(null),[z,A]=r("Surface"),[I,R]=r({}),W=a(null),D=ym(n),L=v?Bm:S,F=i((e,r)=>e&&getComputedStyle(e).getPropertyValue(r).trim()||null,[]);o(()=>{const e=setTimeout(()=>{const e=W.current;R({text:F(e,"--Text"),textQuiet:F(e,"--Text-Quiet"),background:F(e,"--Background"),border:F(e,"--Border"),focusVisible:F(e,"--Focus-Visible"),activeBtn:F(e,"--Buttons-"+D+"-Button"),activeBorder:F(e,"--Buttons-"+D+"-Border")})},50);return()=>clearTimeout(e)},[n,w,F,D]);return de(h,{sx:{pb:8},children:[se(Vt,{children:"Tree View"}),de(T,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(T,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[se(to,{ref:W,theme:w,children:se(h,{sx:{width:"100%",maxWidth:360},children:se(Hu,{color:n,variant:e,density:s,animation:c,selectionMode:p,checkboxSelection:f,disableSelection:x,items:L,defaultExpandedItems:["1","1-1","2"]})})}),se(Ho,{code:(()=>{const r=["<OmniTreeView"];return"default"!==n&&r.push(' color="'+n+'"'),"default"!==e&&r.push(' variant="'+e+'"'),"default"!==s&&r.push(' density="'+s+'"'),"slide"!==c&&r.push(' animation="'+c+'"'),"single"!==p&&r.push(' selectionMode="'+p+'"'),f&&r.push(" checkboxSelection"),x&&r.push(" disableSelection"),r.push(" items={treeData}"),r.push("/>"),r.join("\n")})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),se(T,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:se(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de($i,{defaultValue:0,variant:"standard",color:"primary",children:[de(_i,{children:[se(eo,{children:"Playground"}),se(eo,{children:"Accessibility"})]}),se(ro,{value:0,children:de(h,{sx:{p:3},children:[se(h,{sx:{mb:3},children:se(no,{theme:w,onThemeChange:C,surface:z,onSurfaceChange:A})}),de(h,{children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),de(k,{direction:"row",spacing:1,children:[se(zm,{label:"Solid",selected:"solid"===e,onClick:()=>t("solid")}),se(zm,{label:"Light",selected:"light"===e,onClick:()=>t("light")})]})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),se(k,{spacing:1.5,children:Sm.map(e=>de(h,{children:[se(ca,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:e.label}),se(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:e.colors.map(e=>se(Am,{color:e,selected:n===e,onClick:l},e))})]},e.label))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"DENSITY"}),de(k,{direction:"row",spacing:1,children:[se(zm,{label:"Compact",selected:"compact"===s,onClick:()=>d("compact")}),se(zm,{label:"Default",selected:"default"===s,onClick:()=>d("default")})]})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"ANIMATION"}),se(k,{direction:"row",spacing:1,children:["none","slide","spring"].map(e=>se(zm,{label:ym(e),selected:c===e,onClick:()=>u(e)},e))})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SELECTION MODE"}),de(k,{direction:"row",spacing:1,children:[se(zm,{label:"Single",selected:"single"===p,onClick:()=>m("single")}),se(zm,{label:"Multi",selected:"multi"===p,onClick:()=>m("multi")})]})]}),de(h,{sx:{mt:3},children:[se(ba,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"OPTIONS"}),de(h,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Show Icons"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Load sample data with icons and badges"})]}),se(qo,{checked:v,onChange:e=>y(e.target.checked),size:"small","aria-label":"Show icons"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Checkbox Selection"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Show checkboxes for each item"})]}),se(qo,{checked:f,onChange:e=>g(e.target.checked),size:"small","aria-label":"Checkbox selection"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[se(ma,{children:"Disable Selection"}),se(ca,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Items are not selectable"})]}),se(qo,{checked:x,onChange:e=>b(e.target.checked),size:"small","aria-label":"Disable selection"})]})]}),!v&&se(h,{sx:{mt:3},children:se(Im,{value:wm,onChange:B})})]})}),se(ro,{value:1,children:se(h,{sx:{p:3},children:de(k,{spacing:3,children:[de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"Text Contrast (WCAG 1.4.3 — 4.5:1)"}),se(Tm,{label:"Resting: var(--Text-Quiet) vs. background",ratio:Oo(I.textQuiet,I.background),threshold:4.5,note:"Unselected items use Text-Quiet"}),se(Tm,{label:"Hover: var(--Text) vs. background",ratio:Oo(I.text,I.background),threshold:4.5,note:"Hovered items use var(--Text)"}),se(Tm,{label:"Active (solid): var(--Text) vs. var(--Buttons-"+D+"-Button)",ratio:Oo(I.text,I.activeBtn),threshold:4.5,note:"Selected item with solid fill"})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"Focus Indicator (WCAG 2.4.11 — 3:1)"}),se(Tm,{label:"var(--Focus-Visible) vs. background",ratio:Oo(I.focusVisible,I.background),threshold:3,note:"outline: 2px solid var(--Focus-Visible); outline-offset: -2px"})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[se(Gt,{children:"ARIA and Semantics"}),se(k,{spacing:0,children:[{label:"Role",value:'role="tree" on root, role="treeitem" on each node'},{label:"Expansion",value:'aria-expanded="true/false" on parent items'},{label:"Selection",value:"aria-selected on selected items"},{label:"Disabled",value:'aria-disabled="true" on disabled items'},{label:"Icons",value:"Icon elements are aria-hidden — label carries the accessible name"},{label:"Keyboard",value:"Arrow keys navigate, Enter/Space selects, * expands all siblings"}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(_t,{children:[e,":"]}),se(ca,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})]})})})]})})})]})]})}function Wm(e,r){if(document.getElementById(r))return;const t=document.createElement("link");t.rel="stylesheet",t.href=e,t.id=r,document.head.appendChild(t)}const Dm=[{value:"desktop",label:"Desktop",note:"32px touch targets (WCAG)"},{value:"ios-mobile",label:"iOS Mobile",note:"44px touch targets (HIG)"},{value:"ios-tablet",label:"iOS Tablet",note:"44px touch targets (HIG)"},{value:"android",label:"Android",note:"48px touch targets (M3)"}],Lm={desktop:"32px","ios-mobile":"44px","ios-tablet":"44px",android:"48px"};function Fm(){const{mode:e,switchMode:t}=function(e="light"){const[t,a]=r(e);return o(()=>{Wm("/styles/foundation.css","css-foundation"),Wm("/styles/core.css","css-core"),Wm("/styles/Light-Mode.css","css-mode"),Wm("/styles/base.css","css-base"),Wm("/styles/typography-tokens.css","css-typography-tokens")},[]),{mode:t,switchMode:e=>{const r=document.getElementById("css-mode");r&&(r.href="dark"===e?"/styles/Dark-Mode.css":"/styles/Light-Mode.css"),a(e),localStorage.setItem("themeMode",e)}}}("light"),[a,i]=r(!1),[n,l]=r("desktop");o(()=>{const e=localStorage.getItem("dino-platform")||"desktop",r=localStorage.getItem("themeMode")||"light";l(e),document.documentElement.style.setProperty("--Button-Height",Lm[e]||"32px"),"dark"===r&&t("dark")},[]);const s=e=>{l(e),localStorage.setItem("dino-platform",e),document.documentElement.style.setProperty("--Button-Height",Lm[e]||"32px")};return de(ce,{children:[se(h,{onClick:()=>i(!0),role:"button","aria-label":"Open settings",sx:{position:"fixed",bottom:24,right:24,width:52,height:52,borderRadius:"50%",backgroundColor:"var(--Buttons-Tertiary-Button)",color:"var(--Buttons-Tertiary-Text)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",zIndex:999,transition:"transform 0.15s ease, box-shadow 0.15s ease","&:hover":{transform:"scale(1.08)",boxShadow:"0 6px 16px rgba(0,0,0,0.2)"}},children:se(Ir,{sx:{fontSize:24}})}),se(Cu,{anchor:"right",open:a,onClose:()=>i(!1),hideBackdrop:!0,size:"small",sx:{width:320,zIndex:99999999},children:de(h,{sx:{p:3,height:"100%",display:"flex",flexDirection:"column"},children:[de(h,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[se(Gt,{children:"Settings"}),se(bi,{iconOnly:!0,variant:"ghost",size:"small",onClick:()=>i(!1),"aria-label":"Close settings",children:se(Rr,{fontSize:"small"})})]}),se(ie,{sx:{mb:3,borderColor:"var(--Border)"}}),se(h,{sx:{flex:1,overflowY:"auto"},children:de(k,{spacing:4,children:[de(h,{children:[se(ba,{style:{color:"var(--Text)",opacity:.85,display:"block",marginBottom:12,fontWeight:600},children:"MODE"}),de(k,{direction:"row",spacing:1,children:[se(bi,{variant:"light"===e?"primary":"primary-outline",size:"small",onClick:()=>t("light"),sx:{flex:1},children:"Light"}),se(bi,{variant:"dark"===e?"primary":"primary-outline",size:"small",onClick:()=>t("dark"),sx:{flex:1},children:"Dark"})]})]}),de(h,{children:[se(ba,{style:{color:"var(--Text)",opacity:.85,display:"block",marginBottom:12,fontWeight:600},children:"PLATFORM"}),se(k,{spacing:1,children:Dm.map(({value:e,label:r,note:t})=>{const a=n===e;return de(h,{onClick:()=>s(e),sx:{p:1.5,borderRadius:"var(--Style-Border-Radius)",cursor:"pointer",border:a?"2px solid var(--Buttons-Primary-Button)":"1px solid var(--Border)",backgroundColor:a?"var(--Background)":"transparent",display:"flex",justifyContent:"space-between",alignItems:"center",transition:"all 0.15s ease","&:hover":{backgroundColor:"var(--Hover)"}},children:[de(h,{children:[se(_t,{style:{color:a?"var(--Buttons-Primary-Button)":"var(--Text)",fontWeight:a?600:400},children:r}),se(ca,{style:{color:"var(--Text)",opacity:.7},children:t})]}),a&&se(h,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"var(--Buttons-Primary-Button)",flexShrink:0}})]},e)})})]})]})}),se(ie,{sx:{my:3,borderColor:"var(--Border)"}}),se(bi,{variant:"primary-outline",size:"small",onClick:()=>{s("desktop"),t("light")},sx:{width:"100%"},children:"Reset to Defaults"})]})})]})}const Hm=e=>(e||[]).map(e=>{const r="number"==typeof e?e:Number(e?.value);return Number.isFinite(r)?r:0}),Pm=e=>(e||[]).map((e,r)=>"number"==typeof e?String(r+1):e?.label??String(r+1));function Mm(e,{fromZero:r=!0}={}){if(!e.length)return{min:0,max:1};let t=Math.min(...e),a=Math.max(...e);return r&&(t=Math.min(0,t)),a===t&&(a=t+1),{min:t,max:a}}const Em=(e,{min:r,max:t},a,i)=>a+i-(e-r)/(t-r)*i;function Om(e,r,t,{inset:a=0}={}){if(e<=0)return[];if(1===e)return[r+t/2];const i=(t-2*a)/(e-1);return Array.from({length:e},(e,t)=>r+a+t*i)}function Nm(e,r,t,{gapRatio:a=.4}={}){if(e<=0)return{centres:[],bandWidth:0};const i=t/e,o=i*(1-a);return{centres:Array.from({length:e},(e,t)=>r+i*t+i/2),bandWidth:o}}const Qm=e=>e.length?e.map((e,r)=>`${r?"L":"M"}${e.x} ${e.y}`).join(" "):"";function Vm(e,{tension:r=0}={}){if(e.length<2)return Qm(e);const t=(1-r)/6;let a=`M${e[0].x} ${e[0].y}`;for(let r=0;r<e.length-1;r++){const i=e[r-1]||e[r],o=e[r],n=e[r+1],l=e[r+2]||n,s={x:o.x+(n.x-i.x)*t,y:o.y+(n.y-i.y)*t},d={x:n.x-(l.x-o.x)*t,y:n.y-(l.y-o.y)*t};a+=` C${s.x} ${s.y} ${d.x} ${d.y} ${n.x} ${n.y}`}return a}const jm=(e,r,t)=>e&&r.length?`${e} L${r[r.length-1].x} ${t} L${r[0].x} ${t} Z`:"";function Gm(e,r,t,a,i,o){const n=o-i;if(n>=2*Math.PI-1e-9){const o=i+Math.PI;return Gm(e,r,t,a,i,o)+" "+Gm(e,r,t,a,o,i+2*Math.PI)}const l=(t,a)=>({x:e+t*Math.sin(a),y:r-t*Math.cos(a)}),s=n>Math.PI?1:0,d=l(a,i),c=l(a,o);if(t<=0)return`M${e} ${r} L${d.x} ${d.y} A${a} ${a} 0 ${s} 1 ${c.x} ${c.y} Z`;const u=l(t,o),h=l(t,i);return`M${d.x} ${d.y} A${a} ${a} 0 ${s} 1 ${c.x} ${c.y} L${u.x} ${u.y} A${t} ${t} 0 ${s} 0 ${h.x} ${h.y} Z`}function Um(e,{startAngle:r=0}={}){const t=e.map(e=>e>0?e:0),a=t.reduce((e,r)=>e+r,0),i=e.filter(e=>e<=0).length;if(a<=0)return{slices:[],total:0,dropped:i};let o=r;return{slices:t.map(e=>{const r=e/a*Math.PI*2,t={start:o,end:o+r,value:e,fraction:e/a};return o+=r,t}),total:a,dropped:i}}function Xm({min:e,max:r},t=4){if(t<1)return[];const a=(r-e)/t,i=Math.pow(10,Math.floor(Math.log10(Math.abs(a)||1))),o=[1,2,2.5,5,10].map(e=>e*i).find(e=>e>=a)??10*i,n=[];for(let t=Math.ceil(e/o)*o;t<=r+1e-9;t+=o)n.push(Number(t.toFixed(10)));return n}var Ym=Object.freeze({__proto__:null,arcPath:Gm,areaPath:jm,bands:Om,extent:Mm,linePath:Qm,scaleY:Em,sliceAngles:Um,slots:Nm,smoothPath:Vm,ticks:Xm,toLabels:Pm,toNumbers:Hm});const Zm={fill:"var(--Icons-Primary)",track:"var(--Border-Variant)",line:"var(--Border-Variant)",quietLabel:"var(--Quiet)",label:"var(--Text)",gradient:"var(--Icons-Primary-Variant)"},qm=["Primary","Secondary","Tertiary","Neutral","Info","Success","Warning","Error"],Jm={fontFamily:"var(--Label-Small-Font-Family)",fontSize:"var(--Label-Small-Font-Size)",fontWeight:"var(--Label-Small-Font-Weight)",letterSpacing:"var(--Label-Small-Letter-Spacing)"},Km={position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function $m({caption:e,labels:r,values:t,valueHeader:a="Value"}){return de(h,{component:"table",sx:Km,children:[se("caption",{children:e}),se("thead",{children:de("tr",{children:[se("th",{scope:"col",children:"Category"}),se("th",{scope:"col",children:a})]})}),se("tbody",{children:t.map((e,t)=>de("tr",{children:[se("th",{scope:"row",children:r[t]}),se("td",{children:e})]},t))})]})}const _m="var(--Motion-Duration-Slow, 300ms) var(--Motion-Easing-Enter, cubic-bezier(0, 0, 0, 1))",ef="var(--Motion-Duration-Fast, 150ms) var(--Motion-Easing-Standard, cubic-bezier(0.2, 0, 0, 1))";function rf(r){const[t,a]=e.useState(-1),i=e.useCallback(e=>({onMouseEnter:()=>a(e),onMouseLeave:()=>a(r=>r===e?-1:r),onFocus:()=>a(e),onBlur:()=>a(r=>r===e?-1:r)}),[]);return e.useEffect(()=>{a(e=>e>=r?-1:e)},[r]),{active:t,setActive:a,handlers:i}}function tf({count:e,width:r,centres:t,bandWidth:a,labels:i,values:o,handlers:n}){return e?se(h,{sx:{position:"absolute",inset:0,display:"block",pointerEvents:"none"},children:Array.from({length:e},(e,l)=>se(h,{component:"button",type:"button","aria-label":`${i[l]}: ${o[l]}`,...n(l),sx:{position:"absolute",top:0,height:"100%",left:(t[l]-a/2)/r*100+"%",width:a/r*100+"%",padding:0,margin:0,border:0,background:"transparent",cursor:"pointer",pointerEvents:"auto","&:focus-visible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"-2px",borderRadius:"4px"}}},l))}):null}function af({x:e,y:r,text:t,width:a,tokens:i}){if(null==t)return null;const o=Math.max(28,8*String(t).length+14),n=Math.min(Math.max(e,o/2+2),a-o/2-2),l=r-26>=2?r-26:r+6;return de("g",{pointerEvents:"none",children:[se("rect",{x:n-o/2,y:l,width:o,height:20,rx:6,fill:i.fill}),se("text",{x:n,y:l+14,textAnchor:"middle",fill:"var(--Icons-On-Primary)",style:{fontFamily:"var(--Label-Small-Font-Family)",fontSize:"var(--Label-Small-Font-Size)",fontWeight:"var(--Label-Small-Font-Weight)"},children:t})]})}function of({data:e=[],showTrack:t=!0,rounded:a=!0,showValues:i=!1,showLabels:n=!0,animate:l=!0,interactive:s=!0,height:d=200,gapRatio:c=.4,label:u,className:p="",sx:m={},...f}){const g=Hm(e),x=Pm(e),{active:b,handlers:v}=rf(g.length),[y,S]=r(!l);o(()=>{if(!l)return;const e=requestAnimationFrame(()=>S(!0));return()=>cancelAnimationFrame(e)},[l]);const k=320,B=i?20:8,w=n?22:8,C=Math.max(0,d-B-w),T=Mm(g,{fromZero:!0}),{centres:z,bandWidth:A}=Nm(g.length,0,k,{gapRatio:c}),I=B+C,R=a?A/2:0,W=g.length?k/g.length:0;return de(h,{component:"figure",className:"bar-chart "+p,sx:{display:"block",width:"100%",m:0,position:"relative",...m},...f,children:[de("svg",{viewBox:`0 0 320 ${d}`,width:"100%",height:d,preserveAspectRatio:"none",focusable:"false","aria-hidden":"true",children:[s&&b>=0&&se("rect",{x:z[b]-W/2,y:0,width:W,height:d,fill:"var(--Hover)",rx:6}),g.map((e,r)=>{const a=z[r]-A/2,i=Em(e,T,B,C),o=Math.max(0,I-i);return de("g",{children:[t&&se("rect",{x:a,y:B,width:A,height:C,rx:R,ry:R,fill:Zm.track}),o>0&&se("rect",{x:a,y:i,width:A,height:o,rx:Math.min(R,o/2),ry:Math.min(R,o/2),fill:Zm.fill,style:{transformBox:"fill-box",transformOrigin:"bottom",transform:y?"scaleY(1)":"scaleY(0)",transition:`transform ${_m}`}})]},r)}),i&&g.map((e,r)=>se("text",{x:z[r],y:Em(e,T,B,C)-6,textAnchor:"middle",fill:Zm.label,...Jm,children:e},"v"+r)),n&&x.map((e,r)=>se("text",{x:z[r],y:d-6,textAnchor:"middle",fill:Zm.quietLabel,...Jm,children:e},"l"+r)),s&&b>=0&&!i&&se(af,{x:z[b],y:Em(g[b],T,B,C),text:g[b],width:k,tokens:Zm})]}),s&&se(tf,{count:g.length,width:k,centres:z,bandWidth:W,labels:x,values:g,handlers:v}),se($m,{caption:u||`Bar chart, ${g.length} values`,labels:x,values:g})]})}function nf({data:e=[],curve:a="smooth",gradient:i=!0,fromZero:n=!1,showGrid:l=!1,showLabels:s=!1,animate:d=!0,interactive:c=!0,height:u=200,strokeWidth:p=3,tension:m=0,label:f,className:g="",sx:x={},...b}){const v="lc-"+t().replace(/:/g,""),y=Hm(e),S=Pm(e),{active:k,handlers:B}=rf(y.length),[w,C]=r(!d);o(()=>{if(!d)return;const e=requestAnimationFrame(()=>C(!0));return()=>cancelAnimationFrame(e)},[d]);const T=320,z=s?22:8,A=Math.max(0,u-8-z),I=Mm(y,{fromZero:n}),R=Om(y.length,0,T,{inset:p}),W=y.map((e,r)=>({x:R[r],y:Em(e,I,8,A)})),D="straight"===a?Qm(W):Vm(W,{tension:m}),L=8+A;return de(h,{component:"figure",className:"line-chart "+g,sx:{display:"block",width:"100%",m:0,position:"relative",...x},...b,children:[de("svg",{viewBox:`0 0 320 ${u}`,width:"100%",height:u,preserveAspectRatio:"none",focusable:"false","aria-hidden":"true",children:[i&&se("defs",{children:de("linearGradient",{id:v,x1:"0",y1:"0",x2:"0",y2:"1",children:[se("stop",{offset:"0%",stopColor:Zm.gradient,stopOpacity:"1"}),se("stop",{offset:"100%",stopColor:Zm.gradient,stopOpacity:"0"})]})}),l&&Xm(I,4).map(e=>se("line",{x1:0,x2:T,y1:Em(e,I,8,A),y2:Em(e,I,8,A),stroke:Zm.line,strokeWidth:"1"},e)),i&&W.length>1&&se("path",{d:jm(D,W,L),fill:`url(#${v})`,style:{opacity:w?1:0,transition:`opacity ${_m}`}}),W.length>1&&se("path",{d:D,fill:"none",stroke:Zm.fill,strokeWidth:p,strokeLinecap:"round",strokeLinejoin:"round",pathLength:"1",style:{strokeDasharray:1,strokeDashoffset:w?0:1,transition:`stroke-dashoffset ${_m}`}}),1===W.length&&se("circle",{cx:W[0].x,cy:W[0].y,r:p,fill:Zm.fill}),c&&k>=0&&de(ce,{children:[se("line",{x1:R[k],x2:R[k],y1:8,y2:L,stroke:Zm.line,strokeWidth:"1"}),se("circle",{cx:W[k].x,cy:W[k].y,r:p+1,fill:Zm.fill,stroke:"var(--Background)",strokeWidth:"2"}),se(af,{x:W[k].x,y:W[k].y,text:y[k],width:T,tokens:Zm})]}),s&&S.map((e,r)=>se("text",{x:R[r],y:u-6,textAnchor:"middle",fill:Zm.quietLabel,...Jm,children:e},r))]}),c&&se(tf,{count:y.length,width:T,centres:R,bandWidth:y.length?T/y.length:0,labels:S,values:y,handlers:B}),se($m,{caption:f||`Line chart, ${y.length} points`,labels:S,values:y})]})}function lf({data:e=[],donut:t=!1,donutRatio:a=.6,colors:i=qm,separatorWidth:n=2,size:l=200,showLabels:s=!1,animate:d=!0,interactive:c=!0,label:u,className:p="",sx:m={},...f}){const g=Hm(e),x=Pm(e),{slices:b,total:v,dropped:y}=Um(g),{active:S,handlers:k}=rf(g.length),[B,w]=r(!d);o(()=>{if(!d)return;const e=requestAnimationFrame(()=>w(!0));return()=>cancelAnimationFrame(e)},[d]);const C=l/2,T=l/2,z=l/2-1,A=t?z*a:0,I=e=>{return{fill:`var(--Icons-${r=i[e%i.length]})`,onFill:`var(--Icons-On-${r})`};var r};return de(h,{component:"figure",className:"pie-chart "+p,sx:{display:"block",m:0,position:"relative",...m},...f,children:[de("svg",{viewBox:`0 0 ${l} ${l}`,width:l,height:l,focusable:"false","aria-hidden":"true",children:[b.map((e,r)=>{const t=(e.start+e.end)/2,a=c&&S===r?4:0;return se("path",{d:Gm(C,T,A,z,e.start,e.end),fill:I(r).fill,stroke:"var(--Background)",strokeWidth:n,strokeLinejoin:"round",...c?k(r):{},style:{transform:`translate(${a*Math.sin(t)}px, ${-a*Math.cos(t)}px) scale(${B?1:0})`,transformOrigin:`${C}px ${T}px`,transformBox:"view-box",transition:`transform ${B?ef:_m}`}},r)}),s&&b.map((e,r)=>{const t=(e.start+e.end)/2,a=A+.62*(z-A);return e.fraction<.07?null:se("text",{x:C+a*Math.sin(t),y:T-a*Math.cos(t),textAnchor:"middle",dominantBaseline:"middle",fill:I(r).onFill,...Jm,children:x[r]},r)})]}),se($m,{caption:(u||`${t?"Donut":"Pie"} chart, ${b.length} segments`)+(y?`, ${y} non-positive values omitted`:""),labels:x,values:g})]})}var sf={};export{hm as Accordion,gm as AccordionDetails,um as AccordionGroup,fm as AccordionSummary,Xu as Alert,uu as AlertDialog,$u as AlertShowcase,op as AppBar,mp as AppBarShowcase,ql as Autocomplete,rs as AutocompleteShowcase,Oa as Avatar,Na as AvatarGroup,Rh as AvatarShowcase,Ua as Badge,Mh as BadgeShowcase,of as BarChart,_p as BevelText,im as BevelTextShowcase,Tl as BlackWhiteToggleButtonGroup,ta as Body,oa as Body1,na as Body2,ia as BodyBold,la as BodyLarge,da as BodyLargeBold,sa as BodyLargeSemibold,aa as BodySemibold,_t as BodySmall,ra as BodySmallBold,ea as BodySmallSemibold,qd as BottomNavigation,sc as BottomNavigationShowcase,Qs as Box,Us as BoxShowcase,gd as BreadcrumbItem,fd as Breadcrumbs,vd as BreadcrumbsShowcase,bi as Button,un as ButtonGroup,Ra as ButtonSmall,Wa as ButtonText,Pt as CAP_HEIGHT_TRIM,Jm as CHART_LABEL_TYPE,Zm as CHART_TOKENS,ca as Caption,ua as CaptionBold,In as Card,xn as CenteredStack,Ri as Checkbox,Is as Chip,dh as CircularProgress,mh as CircularProgressShowcase,Ho as CodeBlock,Vo as Colors,Xs as Container,Fo as CopyButton,xp as Copyright,Pp as CopyrightShowcase,Up as CurvedText,Kp as CurvedTextShowcase,Ha as DEFAULT_AVATAR_SRC,Pu as DEFAULT_ITEMS,Sl as DefaultToggleButtonGroup,ap as DesktopAppBar,cu as Dialog,mu as DialogShowcase,Mt as DisplayLarge,Et as DisplayMedium,Ot as DisplaySmall,Vh as Divider,Cu as Drawer,Tu as DrawerClose,Au as DrawerContent,zu as DrawerHeader,Vu as DrawerShowcase,Gu as DropZone,Wd as Dropdown,mn as DynoStack,Hu as DynoTreeView,Dl as EmailTextField,Rl as ErrorToggleButtonGroup,va as Eyebrow,Sa as EyebrowLarge,ya as EyebrowMedium,ba as EyebrowSmall,En as Fab,Un as FabShowcase,vp as Footer,Lp as FooterShowcase,hu as FormDialog,Dc as Gradient,Ys as Grid,kn as GridStack,Nt as H1,Qt as H2,Vt as H3,jt as H4,Gt as H5,Ut as H6,fn as HStack,fp as Header,Xt as Heading,Fa as Icon,cn as IconBadge,Hn as IconBadgeShowcase,ln as IconShowcase,zl as InfoToggleButtonGroup,wn as InsetStack,ma as Label,ha as LabelExtraSmall,fa as LabelLarge,pa as LabelSmall,ga as Legal,xa as LegalSemibold,Eu as LightTreeView,nf as LineChart,Lc as LinearGradient,xh as LinearProgress,kh as LinearProgressShowcase,Ls as Link,Zh as List,Yh as ListItem,Xh as ListItemDecorator,nm as MainLayout,Ld as Menu,Dd as MenuButton,Hd as MenuDivider,Fd as MenuItem,Nd as MenuShowcase,Pc as MeshCardGradient,Hc as MeshGradient,ip as MobileAppBar,yu as Modal,Cl as NeutralToggleButtonGroup,dl as NumberField,ml as NumberFieldShowcase,Aa as NumberLarge,za as NumberMedium,Ta as NumberSmall,Hl as NumberTextField,$c as OmniDesignProvider,mn as OmniStack,Hu as OmniTreeView,Ba as Overline,Ca as OverlineLarge,wa as OverlineMedium,ka as OverlineSmall,Sd as Pagination,Td as PaginationShowcase,Mc as Paper,Ll as PasswordTextField,Pl as PhoneTextField,lf as PieChart,Ec as Popover,kl as PrimaryToggleButtonGroup,Js as RATIO_NAMES,Fc as RadialGradient,ns as Radio,ls as RadioGroup,ss as RadioInput,Jn as Rail,rl as RailShowcase,ps as RangeSlider,gs as Rating,gs as RatingInput,ed as Ratio,ld as RatioShowcase,yn as ResponsiveStack,Cn as ScrollStack,bs as SearchField,Bs as SearchFieldShowcase,Fl as SearchTextField,Bl as SecondaryToggleButtonGroup,Zs as Section,qs as SectionShowcase,Ui as Select,Xl as SelectShowcase,Wn as SelectableCard,Fm as SettingsPanel,om as Sidebar,hs as Slider,hs as SliderInput,eh as Snackbar,nh as SnackbarShowcase,Mu as SolidTreeView,bn as SpaceBetweenStack,jo as Spacing,Sc as SpeedDial,zc as SpeedDialShowcase,Sn as Stack,Bn as StackDivider,Os as StackShowcase,mc as Step,pc as Stepper,yc as StepperShowcase,Zt as Subtitle,Kt as Subtitle1,$t as Subtitle2,Yt as SubtitleLarge,Jt as SubtitleMedium,qt as SubtitleSmall,Al as SuccessToggleButtonGroup,ru as Surfaced,Jo as Switch,Jo as SwitchInput,eo as Tab,_i as TabList,ro as TabPanel,Jh as Table,$i as Tabs,pd as TabsShowcase,wl as TertiaryToggleButtonGroup,El as TextArea,Wl as TextField,Ol as TextFieldGroup,Qi as TextInput,eu as ThemedZone,fl as ToggleButton,yl as ToggleButtonGroup,al as Toolbar,ll as ToolbarShowcase,ep as Tooltip,vm as TreeBranch,Rm as TreeViewShowcase,Ht as Typography,Ml as URLTextField,gn as VStack,Il as WarningToggleButtonGroup,vn as WrapStack,Ym as chartGeometry,sf as default,_c as useOmniDesign,hc as useStepperContext,Ki as useTabsContext};
14
+ */function Fo(){if(So)return yo;So=1;var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;return yo=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map(function(e){return r[e]}).join(""))return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(e){a[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(e){return!1}}()?Object.assign:function(a,i){for(var o,n,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(a),s=1;s<arguments.length;s++){for(var d in o=Object(arguments[s]))r.call(o,d)&&(l[d]=o[d]);if(e){n=e(o);for(var c=0;c<n.length;c++)t.call(o,n[c])&&(l[n[c]]=o[n[c]])}}return l},yo}function Lo(){if(Bo)return ko;Bo=1;return ko="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Ho(){return Co?wo:(Co=1,wo=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var Mo=Po();fo.exports=function(){if(Io)return Ao;Io=1;var e=Po(),r=Fo(),t=Lo(),a=Ho(),i=function(){if(zo)return To;zo=1;var e=function(){};if("production"!==process.env.NODE_ENV){var r=Lo(),t={},a=Ho();e=function(e){var r="Warning: "+e;"undefined"!=typeof console&&console.error(r);try{throw new Error(r)}catch(e){}}}function i(i,o,n,l,s){if("production"!==process.env.NODE_ENV)for(var d in i)if(a(i,d)){var c;try{if("function"!=typeof i[d]){var u=Error((l||"React class")+": "+n+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}c=i[d](o,d,l,n,null,r)}catch(e){c=e}if(!c||c instanceof Error||e((l||"React class")+": type specification of "+n+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in t)){t[c.message]=!0;var h=s?s():"";e("Failed "+n+" type: "+c.message+(null!=h?h:""))}}}return i.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(t={})},To=i}(),o=function(){};function n(){return null}return"production"!==process.env.NODE_ENV&&(o=function(e){var r="Warning: "+e;"undefined"!=typeof console&&console.error(r);try{throw new Error(r)}catch(e){}}),Ao=function(l,s){var d="function"==typeof Symbol&&Symbol.iterator,c="<<anonymous>>",u={array:f("array"),bigint:f("bigint"),bool:f("boolean"),func:f("function"),number:f("number"),object:f("object"),string:f("string"),symbol:f("symbol"),any:m(n),arrayOf:function(e){return m(function(r,a,i,o,n){if("function"!=typeof e)return new p("Property `"+n+"` of component `"+i+"` has invalid PropType notation inside arrayOf.");var l=r[a];if(!Array.isArray(l))return new p("Invalid "+o+" `"+n+"` of type `"+b(l)+"` supplied to `"+i+"`, expected an array.");for(var s=0;s<l.length;s++){var d=e(l,s,i,o,n+"["+s+"]",t);if(d instanceof Error)return d}return null})},element:m(function(e,r,t,a,i){var o=e[r];return l(o)?null:new p("Invalid "+a+" `"+i+"` of type `"+b(o)+"` supplied to `"+t+"`, expected a single ReactElement.")}),elementType:m(function(r,t,a,i,o){var n=r[t];return e.isValidElementType(n)?null:new p("Invalid "+i+" `"+o+"` of type `"+b(n)+"` supplied to `"+a+"`, expected a single ReactElement type.")}),instanceOf:function(e){return m(function(r,t,a,i,o){if(!(r[t]instanceof e)){var n=e.name||c;return new p("Invalid "+i+" `"+o+"` of type `"+((l=r[t]).constructor&&l.constructor.name?l.constructor.name:c)+"` supplied to `"+a+"`, expected instance of `"+n+"`.")}var l;return null})},node:m(function(e,r,t,a,i){return x(e[r])?null:new p("Invalid "+a+" `"+i+"` supplied to `"+t+"`, expected a ReactNode.")}),objectOf:function(e){return m(function(r,i,o,n,l){if("function"!=typeof e)return new p("Property `"+l+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var s=r[i],d=b(s);if("object"!==d)return new p("Invalid "+n+" `"+l+"` of type `"+d+"` supplied to `"+o+"`, expected an object.");for(var c in s)if(a(s,c)){var u=e(s,c,o,n,l+"."+c,t);if(u instanceof Error)return u}return null})},oneOf:function(e){return Array.isArray(e)?m(function(r,t,a,i,o){for(var n=r[t],l=0;l<e.length;l++)if(h(n,e[l]))return null;var s=JSON.stringify(e,function(e,r){return"symbol"===v(r)?String(r):r});return new p("Invalid "+i+" `"+o+"` of value `"+String(n)+"` supplied to `"+a+"`, expected one of "+s+".")}):("production"!==process.env.NODE_ENV&&o(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),n)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&o("Invalid argument supplied to oneOfType, expected an instance of array."),n;for(var r=0;r<e.length;r++){var i=e[r];if("function"!=typeof i)return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+y(i)+" at index "+r+"."),n}return m(function(r,i,o,n,l){for(var s=[],d=0;d<e.length;d++){var c=(0,e[d])(r,i,o,n,l,t);if(null==c)return null;c.data&&a(c.data,"expectedType")&&s.push(c.data.expectedType)}return new p("Invalid "+n+" `"+l+"` supplied to `"+o+"`"+(s.length>0?", expected one of type ["+s.join(", ")+"]":"")+".")})},shape:function(e){return m(function(r,a,i,o,n){var l=r[a],s=b(l);if("object"!==s)return new p("Invalid "+o+" `"+n+"` of type `"+s+"` supplied to `"+i+"`, expected `object`.");for(var d in e){var c=e[d];if("function"!=typeof c)return g(i,o,n,d,v(c));var u=c(l,d,i,o,n+"."+d,t);if(u)return u}return null})},exact:function(e){return m(function(i,o,n,l,s){var d=i[o],c=b(d);if("object"!==c)return new p("Invalid "+l+" `"+s+"` of type `"+c+"` supplied to `"+n+"`, expected `object`.");var u=r({},i[o],e);for(var h in u){var m=e[h];if(a(e,h)&&"function"!=typeof m)return g(n,l,s,h,v(m));if(!m)return new p("Invalid "+l+" `"+s+"` key `"+h+"` supplied to `"+n+"`.\nBad object: "+JSON.stringify(i[o],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var f=m(d,h,n,l,s+"."+h,t);if(f)return f}return null})}};function h(e,r){return e===r?0!==e||1/e==1/r:e!=e&&r!=r}function p(e,r){this.message=e,this.data=r&&"object"==typeof r?r:{},this.stack=""}function m(e){if("production"!==process.env.NODE_ENV)var r={},a=0;function i(i,n,l,d,u,h,m){if(d=d||c,h=h||l,m!==t){if(s){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=d+":"+l;!r[g]&&a<3&&(o("You are manually calling a React.PropTypes validation function for the `"+h+"` prop on `"+d+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),r[g]=!0,a++)}}return null==n[l]?i?null===n[l]?new p("The "+u+" `"+h+"` is marked as required in `"+d+"`, but its value is `null`."):new p("The "+u+" `"+h+"` is marked as required in `"+d+"`, but its value is `undefined`."):null:e(n,l,d,u,h)}var n=i.bind(null,!1);return n.isRequired=i.bind(null,!0),n}function f(e){return m(function(r,t,a,i,o,n){var l=r[t];return b(l)!==e?new p("Invalid "+i+" `"+o+"` of type `"+v(l)+"` supplied to `"+a+"`, expected `"+e+"`.",{expectedType:e}):null})}function g(e,r,t,a,i){return new p((e||"React class")+": "+r+" type `"+t+"."+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function x(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(x);if(null===e||l(e))return!0;var r=function(e){var r=e&&(d&&e[d]||e["@@iterator"]);if("function"==typeof r)return r}(e);if(!r)return!1;var t,a=r.call(e);if(r!==e.entries){for(;!(t=a.next()).done;)if(!x(t.value))return!1}else for(;!(t=a.next()).done;){var i=t.value;if(i&&!x(i[1]))return!1}return!0;default:return!1}}function b(e){var r=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,r){return"symbol"===e||!!r&&("Symbol"===r["@@toStringTag"]||"function"==typeof Symbol&&r instanceof Symbol)}(r,e)?"symbol":r}function v(e){if(null==e)return""+e;var r=b(e);if("object"===r){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return r}function y(e){var r=v(e);switch(r){case"array":case"object":return"an "+r;case"boolean":case"date":case"regexp":return"a "+r;default:return r}}return p.prototype=Error.prototype,u.checkPropTypes=i,u.resetWarningCache=i.resetWarningCache,u.PropTypes=u,u},Ao}()(Mo.isElement,!0)}else fo.exports=function(){if(Wo)return Ro;Wo=1;var e=Lo();function r(){}function t(){}return t.resetWarningCache=r,Ro=function(){function a(r,t,a,i,o,n){if(n!==e){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function i(){return a}a.isRequired=a;var o={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:i,element:a,elementType:a,instanceOf:i,node:a,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:t,resetWarningCache:r};return o.PropTypes=o,o}}()();var Eo=po(fo.exports);function Oo({code:e,label:t="Copy code"}){const[a,i]=r(!1);return le(B,{title:a?"Copied!":t,children:le(Ci,{size:"small",onClick:async()=>{try{await navigator.clipboard.writeText(e),i(!0),setTimeout(()=>i(!1),2e3)}catch(e){console.error("Copy failed:",e)}},"aria-label":a?"Copied":t,sx:{color:a?"var(--Icons-Success, var(--Text))":"var(--Quiet)"},children:le(a?ue:ce,{fontSize:"small"})})})}Oo.propTypes={code:Eo.string.isRequired,label:Eo.string};function No({code:e="",language:r="JSX",showCopy:t=!0,showHeader:a=!0,maxHeight:i,wrap:o=!1,sx:n={},...l}){return de(h,{"data-theme":"Neutral","data-surface":"Surface-Dimmest",sx:{backgroundColor:"var(--Background)",borderRadius:"min(var(--Card-Radius, var(--Style-Border-Radius)), 12px)",overflow:"hidden",...n},...l,children:[a&&(r||t)&&de(h,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,px:2,py:1,borderBottom:"1px solid var(--Border)",minHeight:40},children:[le(ga,{color:"quiet",children:r}),t&&e?le(Oo,{code:e}):null]}),le(h,{sx:{p:2,overflow:"auto",maxHeight:i},children:le(h,{component:"pre",sx:{margin:0,fontFamily:"inherit"},children:le(h,{component:"code",sx:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",fontSize:"13px",lineHeight:1.6,color:"var(--Text)",whiteSpace:o?"pre-wrap":"pre",wordBreak:o?"break-word":"normal",display:"block"},children:e})})})]})}function Qo(e){if(!e)return null;const r=e.trim();if(/^#[0-9a-f]{3}$/i.test(r))return{r:parseInt(r[1]+r[1],16),g:parseInt(r[2]+r[2],16),b:parseInt(r[3]+r[3],16),a:1};if(/^#[0-9a-f]{6}$/i.test(r))return{r:parseInt(r.substring(1,3),16),g:parseInt(r.substring(3,5),16),b:parseInt(r.substring(5,7),16),a:1};if(/^#[0-9a-f]{8}$/i.test(r))return{r:parseInt(r.substring(1,3),16),g:parseInt(r.substring(3,5),16),b:parseInt(r.substring(5,7),16),a:parseInt(r.substring(7,9),16)/255};const t=r.match(/rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:[,\s/]+([\d.]+%?))?\s*\)/);if(t){let e=1;return void 0!==t[4]&&(e=t[4].endsWith("%")?parseFloat(t[4])/100:parseFloat(t[4])),{r:Math.round(parseFloat(t[1])),g:Math.round(parseFloat(t[2])),b:Math.round(parseFloat(t[3])),a:e}}return null}function Vo(e,r){if(!e||!r)return e||r;if(e.a>=1)return e;const t=e.a;return{r:Math.round(e.r*t+r.r*(1-t)),g:Math.round(e.g*t+r.g*(1-t)),b:Math.round(e.b*t+r.b*(1-t)),a:1}}function jo(e){const r=e=>e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4);return.2126*r(e.r/255)+.7152*r(e.g/255)+.0722*r(e.b/255)}function Go(e,r,t){const a=Qo(e),i=Qo(r),o=Qo(t);if(!a||!i)return null;const n=o?Vo(i,o):i.a<1?null:i;if(!n)return null;const l=Vo(a,n);if(!l)return null;const s=jo(l),d=jo(n);return((Math.max(s,d)+.05)/(Math.min(s,d)+.05)).toFixed(2)}function Uo(e){return"undefined"==typeof window?null:getComputedStyle(document.documentElement).getPropertyValue(e).trim()}No.propTypes={code:Eo.string,language:Eo.string,showCopy:Eo.bool,showHeader:Eo.bool,maxHeight:Eo.oneOfType([Eo.number,Eo.string]),wrap:Eo.bool,sx:Eo.object};const Xo={"display-large":"Display Large","display-medium":"Display Medium","display-small":"Display Small",h1:"H1",h2:"H2",h3:"H3",h4:"H4",h5:"H5",h6:"H6","subtitle-small":"Subtitle Small",subtitle:"Subtitle Medium","subtitle-large":"Subtitle Large","body-small":"Body Small","body-small-semibold":"Body Small Semibold",body:"Body Medium","body-semibold":"Body Medium Semibold","body-large":"Body Large","body-large-semibold":"Body Large Semibold",label:"Label","label-small":"Label Small","label-large":"Label Large",caption:"Caption","caption-bold":"Caption Bold",legal:"Legal","legal-semibold":"Legal Semibold",eyebrow:"Eyebrow Medium","eyebrow-small":"Eyebrow Small","eyebrow-large":"Eyebrow Large",button:"Button Standard","button-small":"Button Small","button-extra-small":"Button Extra Small","number-large":"Number Large","number-medium":"Number Medium","number-small":"Number Small"};function Yo(){const e=({color:e})=>de(h,{sx:{textAlign:"center"},children:[le(h,{sx:{width:"80px",height:"80px",backgroundColor:`var(${e.var})`,borderRadius:"8px",border:"1px solid var(--Border)",mb:1,mx:"auto"}}),le(w,{variant:"body2",sx:{fontWeight:600,fontSize:"12px",color:"var(--Text)",mb:.5,wordBreak:"break-word"},children:e.name}),le(w,{variant:"caption",sx:{color:"var(--Text-Secondary)",display:"block",fontSize:"10px",fontFamily:"monospace",wordBreak:"break-all"},children:e.var})]});return de(k,{spacing:6,children:[de(h,{children:[le(w,{variant:"h5",sx:{mb:3,fontWeight:700},children:"Brand Colors (Static)"}),le(k,{direction:"row",spacing:3,sx:{justifyContent:"center",flexWrap:"wrap",gap:3},children:[{name:"Primary",var:"--Primary-Color-11"},{name:"Secondary",var:"--Secondary-Color-11"},{name:"Tertiary",var:"--Tertiary-Color-11"}].map(r=>le(e,{color:r},r.var))})]}),de(h,{children:[le(w,{variant:"h5",sx:{mb:3,fontWeight:700},children:"Background Colors (Dynamic)"}),le(w,{variant:"body2",sx:{mb:3,color:"var(--Text-Secondary)"},children:"Update based on selected Background variant and Mode"}),le(C,{container:!0,spacing:2,sx:{justifyContent:"center"},children:[{name:"Default Background",cssVar:"var(--Theme-Default-Surfaces-Surface)"},{name:"Primary Background",cssVar:"var(--Theme-Primary-Surfaces-Surface)"},{name:"Secondary Background",cssVar:"var(--Theme-Secondary-Surfaces-Surface)"},{name:"Tertiary Background",cssVar:"var(--Theme-Tertiary-Surfaces-Surface)"},{name:"Neutral Background",cssVar:"var(--Theme-Neutral-Surfaces-Surface)"},{name:"Neutral-Variant Background",cssVar:"var(--Theme-Neutral-Variant-Surfaces-Surface)"}].map(e=>le(C,{item:!0,sx:{display:"flex",justifyContent:"center"},children:de(h,{sx:{textAlign:"center"},children:[le(h,{sx:{minWidth:"max(var(--Button-Height), var(--Min-Button-Width))",minHeight:"var(--Button-Height)",backgroundColor:e.cssVar,borderRadius:"var(--Style-Border-Radius)",border:"2px solid var(--Border)",mb:1}}),le(w,{variant:"body2",sx:{fontWeight:600,fontSize:"12px",color:"var(--Text)",wordBreak:"break-word"},children:e.name})]})},e.name))})]}),de(h,{children:[le(w,{variant:"h5",sx:{mb:3,fontWeight:700},children:"Dynamic Colors (Update with Mode, Background & Surface)"}),le(T,{severity:"info",sx:{backgroundColor:"var(--Container-Low)",mb:3,border:"1px solid var(--Border)"},children:de(w,{variant:"body2",children:["Most colors update automatically based on the current"," ",le("strong",{children:"Mode"})," (Light/Dark), ",le("strong",{children:"Background"})," ","variant, and ",le("strong",{children:"Surface"})," theme. Only Primary, Secondary, and Tertiary colors are fixed brand colors."]})}),le(w,{variant:"body2",sx:{mb:3,color:"var(--Text-Secondary)"},children:"These colors automatically adapt based on:"}),de(k,{spacing:1,sx:{mb:4},children:[de(h,{sx:{display:"flex",gap:2},children:[le(w,{variant:"body2",sx:{fontWeight:600,minWidth:80},children:"Mode:"}),le(w,{variant:"body2",children:"Light or Dark theme"})]}),de(h,{sx:{display:"flex",gap:2},children:[le(w,{variant:"body2",sx:{fontWeight:600,minWidth:80},children:"Background:"}),le(w,{variant:"body2",children:"Default, Primary, Secondary, Tertiary, Neutral, or Neutral-Variant"})]}),de(h,{sx:{display:"flex",gap:2},children:[le(w,{variant:"body2",sx:{fontWeight:600,minWidth:80},children:"Surface:"}),le(w,{variant:"body2",children:"Theme surface layer selection"})]})]}),le(k,{spacing:4,children:[{name:"Layout & Surfaces",colors:[{name:"Background",var:"--Background"},{name:"Border",var:"--Border"},{name:"Border-Variant",var:"--Border-Variant"}]},{name:"Text & Links",colors:[{name:"Header",var:"--Header"},{name:"Text",var:"--Text"},{name:"Text-Quiet",var:"--Text-Quiet"},{name:"Hotlink",var:"--Hotlink"},{name:"Hotlink-Visited",var:"--Hotlink-Visited"}]},{name:"Buttons - Primary",colors:[{name:"Button BG",var:"--Button-Primary-Button"},{name:"Button Text",var:"--Button-Primary-Text"},{name:"Button Hover",var:"--Button-Primary-Hover"},{name:"Button Active",var:"--Button-Primary-Pressed"},{name:"Focus-Visible",var:"--Focus-Visible"}]},{name:"Buttons - Secondary",colors:[{name:"Button BG",var:"--Button-Secondary-Button"},{name:"Button Text",var:"--Button-Secondary-Text"},{name:"Button Hover",var:"--Button-Secondary-Hover"},{name:"Button Active",var:"--Button-Secondary-Pressed"},{name:"Focus-Visible",var:"--Focus-Visible"}]},{name:"Buttons - State",colors:[{name:"Info Button",var:"--Button-Info-Button"},{name:"Success Button",var:"--Button-Success-Button"},{name:"Warning Button",var:"--Button-Warning-Button"},{name:"Error Button",var:"--Button-Error-Button"}]},{name:"Icons",colors:[{name:"Default",var:"--Icons-Default"},{name:"Primary",var:"--Icons-Primary"},{name:"Secondary",var:"--Icons-Secondary"},{name:"Tertiary",var:"--Icons-Tertiary"},{name:"Neutral",var:"--Icons-Neutral"},{name:"Info",var:"--Icons-Info"},{name:"Success",var:"--Icons-Success"},{name:"Warning",var:"--Icons-Warning"},{name:"Error",var:"--Icons-Error"}]},{name:"Chips & Badges",colors:[{name:"Primary BG",var:"--Tags-Primary-BG"},{name:"Primary Text",var:"--Tags-Primary-Text"},{name:"Secondary BG",var:"--Tags-Secondary-BG"},{name:"Secondary Text",var:"--Tags-Secondary-Text"},{name:"Tertiary BG",var:"--Tags-Tertiary-BG"},{name:"Tertiary Text",var:"--Tags-Tertiary-Text"},{name:"Neutral BG",var:"--Tags-Neutral-BG"},{name:"Neutral Text",var:"--Tags-Neutral-Text"},{name:"Info BG",var:"--Tags-Info-BG"},{name:"Info Text",var:"--Tags-Info-Text"},{name:"Success BG",var:"--Tags-Success-BG"},{name:"Success Text",var:"--Tags-Success-Text"},{name:"Warning BG",var:"--Tags-Warning-BG"},{name:"Warning Text",var:"--Tags-Warning-Text"},{name:"Error BG",var:"--Tags-Error-BG"},{name:"Error Text",var:"--Tags-Error-Text"}]}].map(r=>de(h,{children:[le(w,{variant:"h6",sx:{mb:2,fontWeight:600},children:r.name}),le(C,{container:!0,spacing:2,sx:{justifyContent:"center"},children:r.colors.map(r=>le(C,{item:!0,sx:{display:"flex",justifyContent:"center"},children:le(e,{color:r})},r.var))})]},r.name))})]}),de(h,{sx:{pt:4,borderTop:"1px solid var(--Border)"},children:[le(w,{variant:"h5",sx:{mb:2,fontWeight:700},children:"How to Use"}),de(k,{spacing:2,children:[de(h,{children:[le(w,{variant:"h6",sx:{fontWeight:600,mb:1},children:"Static Colors"}),de(w,{variant:"body2",sx:{color:"var(--Text-Secondary)"},children:["Use brand colors (",le("code",{style:{backgroundColor:"var(--Container)",padding:"2px 4px",borderRadius:"4px"},children:"--Primary-Color-11"}),","," ",le("code",{style:{backgroundColor:"var(--Container)",padding:"2px 4px",borderRadius:"4px"},children:"--Secondary-Color-11"}),","," ",le("code",{style:{backgroundColor:"var(--Container)",padding:"2px 4px",borderRadius:"4px"},children:"--Tertiary-Color-11"}),") for brand elements that should never change."]})]}),de(h,{children:[le(w,{variant:"h6",sx:{fontWeight:600,mb:1},children:"Dynamic Colors"}),le(w,{variant:"body2",sx:{color:"var(--Text-Secondary)"},children:"Use dynamic color variables for all UI elements. They will automatically update when users change Mode, Background, or Surface settings."})]}),de(h,{children:[le(w,{variant:"h6",sx:{fontWeight:600,mb:1},children:"Example Usage"}),le(h,{component:"pre",sx:{backgroundColor:"var(--Container)",p:2,borderRadius:"8px",overflow:"auto",fontSize:"12px",border:"1px solid var(--Border)",color:"var(--Text)"},children:"/* Dynamic - updates with theme changes */\ncolor: var(--Text);\nbackgroundColor: var(--Background);\nborderColor: var(--Border);\n\n/* Static - brand colors stay the same */\naccentColor: var(--Primary-Color-11);"})]})]})]})]})}function qo(){const e=({name:e,varName:r,baseValue:t})=>le(h,{sx:{mb:2},children:de(h,{sx:{display:"flex",alignItems:"center",gap:2,mb:1},children:[le(h,{"aria-hidden":"true",sx:{width:`var(${r})`,minWidth:20,height:24,backgroundColor:"var(--Buttons-Primary-Button)",borderRadius:.5,border:"1px solid var(--Border)"}}),de(k,{spacing:.5,children:[le(w,{variant:"subtitle2",sx:{fontWeight:600},children:e}),le(w,{variant:"caption",sx:{color:"var(--Text-Secondary)"},children:r}),de(w,{variant:"caption",sx:{color:"var(--Text-Secondary)"},children:["Base: ",t," (with cognitive multiplier)"]})]})]})}),r=({name:e,varName:r,value:t})=>de(h,{sx:{mb:2},children:[le(h,{"aria-hidden":"true",sx:{width:100,height:t,backgroundColor:"var(--Buttons-Primary-Button)",borderRadius:1,border:"1px solid var(--Border)",mb:1}}),le(w,{variant:"subtitle2",sx:{fontWeight:600},children:e}),le(w,{variant:"caption",sx:{color:"var(--Text-Secondary)",display:"block"},children:r}),le(w,{variant:"caption",sx:{color:"var(--Text-Secondary)"},children:t})]});return de(k,{spacing:3,sx:{p:2},children:[de("section",{children:[le(w,{variant:"h5",component:"h2",sx:{mb:2,fontWeight:700},children:"Spacing Scale"}),le(w,{variant:"body2",sx:{mb:3,color:"var(--Text-Secondary)"},children:"Spacing values are multiplied by the cognitive multiplier for accessibility. Each spacing value includes a visual reference and text label for clarity."}),le(k,{spacing:1,children:[{name:"Quarter",var:"--Spacing-Quarter",baseValue:"2px"},{name:"Half",var:"--Spacing-Half",baseValue:"4px"},{name:"1-and-Half",var:"--Spacing-1-and-Half",baseValue:"12px"},{name:"1",var:"--Spacing-1",baseValue:"8px"},{name:"2",var:"--Spacing-2",baseValue:"16px"},{name:"3",var:"--Spacing-3",baseValue:"24px"},{name:"4",var:"--Spacing-4",baseValue:"32px"},{name:"5",var:"--Spacing-5",baseValue:"40px"},{name:"6",var:"--Spacing-6",baseValue:"48px"},{name:"7",var:"--Spacing-7",baseValue:"56px"},{name:"8",var:"--Spacing-8",baseValue:"64px"},{name:"9",var:"--Spacing-9",baseValue:"72px"},{name:"10",var:"--Spacing-10",baseValue:"80px"}].map(r=>le(e,{name:r.name,varName:r.var,baseValue:r.baseValue},r.var))})]}),de("section",{children:[le(w,{variant:"h5",component:"h2",sx:{mb:2,fontWeight:700},children:"Sizing Scale"}),le(w,{variant:"body2",sx:{mb:3,color:"var(--Text-Secondary)"},children:"Fixed sizing values for components and layouts. Each size is labeled with its CSS variable and pixel value."}),le(C,{container:!0,spacing:3,children:[{name:"Quarter",var:"--Sizing-Quarter",value:"2px"},{name:"Half",var:"--Sizing-Half",value:"4px"},{name:"1-and-Half",var:"--Sizing-1-and-Half",value:"12px"},{name:"1",var:"--Sizing-1",value:"8px"},{name:"2",var:"--Sizing-2",value:"16px"},{name:"3",var:"--Sizing-3",value:"24px"},{name:"4",var:"--Sizing-4",value:"32px"},{name:"5",var:"--Sizing-5",value:"40px"},{name:"6",var:"--Sizing-6",value:"48px"},{name:"7",var:"--Sizing-7",value:"56px"},{name:"8",var:"--Sizing-8",value:"64px"},{name:"9",var:"--Sizing-9",value:"72px"},{name:"10",var:"--Sizing-10",value:"80px"},{name:"11",var:"--Sizing-11",value:"88px"},{name:"12",var:"--Sizing-12",value:"96px"},{name:"13",var:"--Sizing-13",value:"104px"},{name:"14",var:"--Sizing-14",value:"112px"},{name:"15",var:"--Sizing-15",value:"160px"},{name:"16",var:"--Sizing-16",value:"240px"},{name:"17",var:"--Sizing-17",value:"320px"},{name:"18",var:"--Sizing-18",value:"480px"}].map(e=>le(C,{item:!0,xs:12,sm:6,md:4,lg:3,children:le(r,{name:e.name,varName:e.var,value:e.value})},e.var))})]}),de("section",{children:[le(w,{variant:"h5",component:"h2",sx:{mb:2,fontWeight:700},children:"Negative Sizing"}),le(w,{variant:"body2",sx:{mb:3,color:"var(--Text-Secondary)"},children:"Negative values for margins and offsets. Use these to reduce or remove default spacing when needed."}),le(C,{container:!0,spacing:3,children:[{name:"Negative-Quarter",var:"--Sizing-Negative-Quarter",value:"-2px"},{name:"Negative-Half",var:"--Sizing-Negative-Half",value:"-4px"},{name:"Negative-1-and-Half",var:"--Sizing-Negative-1-and-Half",value:"-12px"},{name:"Negative-1",var:"--Sizing-Negative-1",value:"-8px"}].map(e=>le(C,{item:!0,xs:12,sm:6,md:4,lg:3,children:de(h,{children:[le(w,{variant:"subtitle2",sx:{fontWeight:600},children:e.name}),le(w,{variant:"caption",sx:{color:"var(--Text-Secondary)",display:"block"},children:e.var}),le(w,{variant:"caption",sx:{color:"var(--Text-Secondary)"},children:e.value})]})},e.var))})]}),de("section",{style:{paddingTop:24,borderTop:"1px solid var(--Border)"},children:[le(w,{variant:"h5",component:"h2",sx:{mb:2,fontWeight:700},children:"Container Padding"}),de(h,{sx:{p:"var(--Spacing-3)",backgroundColor:"var(--Container-Low)",border:"2px dashed var(--Buttons-Primary-Button)",borderRadius:1},children:[de(w,{variant:"body2",children:["Default container padding: ",le("strong",{children:"var(--Spacing-3)"})," = 24px"]}),le(w,{variant:"caption",sx:{color:"var(--Text-Secondary)",display:"block",mt:1},children:"Use this variable for consistent padding around main content areas."})]})]}),de("section",{style:{paddingTop:24,borderTop:"1px solid var(--Border)"},children:[le(w,{variant:"h5",component:"h2",sx:{mb:3,fontWeight:700},children:"Practical Examples"}),de("article",{children:[le(w,{variant:"h6",component:"h3",sx:{mb:2,fontWeight:600},children:"Padding Examples"}),le(w,{variant:"caption",sx:{color:"var(--Text-Secondary)",mb:2,display:"block"},children:"Different padding values create different visual breathing room."}),le(C,{container:!0,spacing:2,sx:{mb:4},children:["var(--Spacing-1)","var(--Spacing-2)","var(--Spacing-3)","var(--Spacing-4)"].map(e=>le(C,{item:!0,xs:12,sm:6,children:de(h,{sx:{p:e,backgroundColor:"var(--Container)",border:"1px solid var(--Border)",borderRadius:1},children:[de(w,{variant:"subtitle2",children:["Padding: ",e]}),le(w,{variant:"caption",sx:{display:"block",mt:1,color:"var(--Text-Secondary)"},children:"Content with spacing applied"})]})},e))})]}),de("article",{children:[le(w,{variant:"h6",component:"h3",sx:{mb:2,fontWeight:600},children:"Gap Examples"}),le(w,{variant:"caption",sx:{color:"var(--Text-Secondary)",mb:2,display:"block"},children:"Gap controls spacing between flex/grid children without adding extra elements."}),le(k,{spacing:3,children:["var(--Spacing-1)","var(--Spacing-2)","var(--Spacing-3)"].map(e=>de(h,{children:[le(k,{direction:"row",spacing:e,sx:{mb:1},children:[1,2,3].map(e=>le(h,{"aria-hidden":"true",sx:{width:60,height:60,backgroundColor:"var(--Buttons-Primary-Button)",borderRadius:1,flexShrink:0}},e))}),de(w,{variant:"caption",sx:{color:"var(--Text-Secondary)"},children:["Gap: ",e]})]},e))})]})]}),de(h,{role:"note",sx:{p:2,backgroundColor:"var(--Container-Low)",borderRadius:1,borderLeft:"4px solid var(--Buttons-Primary-Button)",mt:3},children:[le(w,{variant:"subtitle2",sx:{fontWeight:600,mb:1},children:"✓ Accessibility Best Practices Used"}),de("ul",{style:{margin:"0.5rem 0",paddingLeft:"1.5rem"},children:[le("li",{children:de(w,{variant:"caption",children:[le("strong",{children:'aria-hidden="true"'})," on purely decorative visual elements"]})}),le("li",{children:le(w,{variant:"caption",children:"All spacing information conveyed through text labels and values"})}),le("li",{children:de(w,{variant:"caption",children:["No empty decorative ",le("code",{children:"<div>"})," elements in DOM"]})}),le("li",{children:de(w,{variant:"caption",children:["Semantic HTML: ",le("code",{children:"<section>"})," and ",le("code",{children:"<article>"})," for structure"]})}),le("li",{children:le(w,{variant:"caption",children:"CSS-based spacing (padding/margin) for actual layout, not decorative divs"})}),le("li",{children:le(w,{variant:"caption",children:"Full keyboard navigation and screen reader support"})})]})]})]})}Object.entries({Display:["display-large","display-medium","display-small"],Headings:["h1","h2","h3","h4","h5","h6"],Subtitle:["subtitle-small","subtitle","subtitle-large"],Body:["body-small","body-small-semibold","body","body-semibold","body-large","body-large-semibold"],Label:["label","label-small","label-large"],Caption:["caption","caption-bold"],Legal:["legal","legal-semibold"],Eyebrow:["eyebrow-small","eyebrow","eyebrow-large"],Button:["button-extra-small","button-small","button"],Number:["number-large","number-medium","number-small"]}).map(([e,r])=>({label:e,options:r.map(e=>({value:e,label:Xo[e]}))}));const Zo=["default","primary","secondary","tertiary","neutral","info","success","warning","error"],Jo=e=>e.charAt(0).toUpperCase()+e.slice(1);function Ko(e){const r=Jo(e);return{type:"outline",color:r,trackOff:"var(--Background)",trackOffBorder:"var(--Border-Variant)",trackOn:"var(--Buttons-"+r+"-Button)",trackOnBorder:"var(--Buttons-"+r+"-Border)",dotOff:"var(--Quiet)",dotOn:"var(--Buttons-"+r+"-Text)",iconOff:"var(--Background)",iconOn:"var(--Buttons-"+r+"-Button)"}}function $o(e){const r=Jo(e);return{type:"light",color:r,trackOff:"var(--Border-Variant)",trackOffBorder:"transparent",trackOn:"var(--"+r+"-Color-11)",trackOnBorder:"var(--Buttons-"+r+"-Border)",dotOff:"var(--Quiet)",dotOn:"var(--Buttons-"+r+"-Border)",iconOff:"var(--Border-Variant)",iconOn:"var(--"+r+"-Color-11)",dataTheme:r,dataSurface:"Surface-Brightest"}}const _o={small:{trackW:28,trackH:16,dotRadius:"var(--Sizing-2, 16px)",icon:8},medium:{trackW:40,trackH:24,dotRadius:"var(--Sizing-2-and-Half, 20px)",icon:16},large:{trackW:56,trackH:32,dotRadius:"var(--Sizing-2-and-Half, 20px)",icon:16}};function en({variant:e="default",size:r="medium",checked:t,defaultChecked:a,onChange:i,disabled:o=!1,label:n,labelPlacement:l="end",name:s,value:d,icon:c,iconOn:u,iconOff:h,className:p="",sx:m={},"aria-label":f,"aria-labelledby":g,...x}){const v=function(){const e={};return Zo.forEach(r=>{e[r+"-outline"]=Ko(r),e[r+"-light"]=$o(r)}),e.default={type:"themed",trackOff:"var(--Background)",trackOffBorder:"var(--Quiet)",trackOn:"var(--Buttons-Default-Button)",trackOnBorder:"var(--Buttons-Default-Border)",dotOff:"var(--Quiet)",dotOn:"var(--Buttons-Default-Text)",iconOff:"var(--Background)",iconOn:"var(--Buttons-Default-Button)"},e["default-outline"]={type:"themed",trackOff:"var(--Background)",trackOffBorder:"var(--Quiet)",trackOn:"var(--Buttons-Default-Button)",trackOnBorder:"var(--Buttons-Default-Border)",dotOff:"var(--Quiet)",dotOn:"var(--Buttons-Default-Text)",iconOff:"var(--Background)",iconOn:"var(--Buttons-Default-Button)"},e.outline={type:"themed",trackOff:"var(--Background)",trackOffBorder:"var(--Quiet)",trackOn:"var(--Buttons-Default-Button)",trackOnBorder:"var(--Buttons-Default-Border)",dotOff:"var(--Quiet)",dotOn:"var(--Buttons-Default-Text)",iconOff:"var(--Background)",iconOn:"var(--Buttons-Default-Button)"},e.primary=Ko("primary"),e.light=$o("primary"),e}(),y=v[e]||v.default,S=_o[r]||_o.medium,k="small"===r?oa:sa,B=S.trackH-4,w=Math.max(24,S.trackW),C=Math.max(24,S.trackH),T=(C-S.trackH)/2,A={width:B,height:B,borderRadius:S.dotRadius,boxShadow:"none",border:"none",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color var(--Motion-Duration-Fast, 150ms) var(--Motion-Easing-Standard, cubic-bezier(0.2, 0, 0, 1))","& > *":{width:S.icon,height:S.icon,display:"block"}},I={width:S.trackW,minWidth:24,height:C,minHeight:24,padding:0,overflow:"visible",opacity:o?"var(--Disabled, 0.38)":1,"& .MuiSwitch-switchBase":{position:"absolute",top:0,left:0,width:"100%",height:"100%",display:"flex",justifyContent:"flex-start",alignItems:"center",paddingTop:0,paddingBottom:0,paddingLeft:"2px",paddingRight:w-S.trackW+2+"px",color:"transparent",transition:"justify-content var(--Motion-Duration-Instant, 100ms) var(--Motion-Easing-Standard, cubic-bezier(0.2, 0, 0, 1))",transform:"none","& .MuiSwitch-input":{left:0,top:0,width:"100%",height:"100%",margin:0},"& .MuiSwitch-thumb":{...A,backgroundColor:y.dotOff,color:y.iconOff},"&.Mui-checked":{justifyContent:"flex-end",transform:"none","& .MuiSwitch-thumb":{...A,backgroundColor:y.dotOn,color:y.iconOn},"& + .MuiSwitch-track":{backgroundColor:y.trackOn,borderColor:y.trackOnBorder,opacity:1}},"&:hover, &.Mui-checked:hover":{backgroundColor:"transparent"},"&:hover + .MuiSwitch-track":{boxShadow:ti},"&:active + .MuiSwitch-track":{boxShadow:ri},"&.Mui-focusVisible + .MuiSwitch-track":{outline:"1px solid var(--Focus-Visible)",outlineOffset:"2px"},"&.Mui-disabled + .MuiSwitch-track":{opacity:1}},"& .MuiSwitch-track":{width:S.trackW,height:S.trackH,borderRadius:"var(--Sizing-3, 24px)",backgroundColor:y.trackOff,border:"1px solid "+y.trackOffBorder,boxSizing:"border-box",opacity:1,position:"absolute",top:T,left:0,transition:"background-color var(--Motion-Duration-Fast, 150ms) var(--Motion-Easing-Standard, cubic-bezier(0.2, 0, 0, 1)), border-color var(--Motion-Duration-Fast, 150ms) var(--Motion-Easing-Standard, cubic-bezier(0.2, 0, 0, 1)), box-shadow var(--Motion-Duration-Fast, 150ms) var(--Motion-Easing-Standard, cubic-bezier(0.2, 0, 0, 1))"},...m},R=e.includes("-light")||"light"===e,W=void 0!==h?h:c,D=void 0!==u?u:c,P=e=>le("span",{className:"MuiSwitch-thumb",children:e}),F=le(z,{...void 0!==W||void 0!==D?{icon:P(W),checkedIcon:P(D)}:{},checked:t,defaultChecked:a,onChange:i,disabled:o,name:s,value:d,slotProps:{input:{...f?{"aria-label":f}:{},...g?{"aria-labelledby":g}:{}}},className:"switch-"+e+" "+p,sx:I,disableRipple:!0,...R&&y.dataTheme?{"data-theme":y.dataTheme,"data-surface":y.dataSurface||"Surface-Dim"}:{},...x});return n?le(b,{control:F,label:le(k,{component:"span",sx:{color:o?"var(--Text-Quiet)":"var(--Text)",fontSize:"small"===r?"13px":"15px",fontWeight:500,opacity:o?"var(--Disabled, 0.38)":1},children:n}),labelPlacement:l,sx:{gap:"8px",marginLeft:0,marginRight:0}}):F}const rn=en,tn=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",an={default:"Default",quiet:"Quiet",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},on=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}],nn=["filled","outlined","rounded","twotone","sharp"],ln={filled:"Filled",outlined:"Outlined",rounded:"Rounded",twotone:"Two Tone",sharp:"Sharp"},sn={Home:{filled:Se,outlined:We,rounded:Qe,twotone:_e,sharp:ur},Favorite:{filled:ye,outlined:De,rounded:Ve,twotone:er,sharp:hr},Delete:{filled:ke,outlined:Pe,rounded:je,twotone:rr,sharp:pr},Settings:{filled:Be,outlined:Fe,rounded:Ge,twotone:tr,sharp:mr},Search:{filled:we,outlined:we,rounded:Ue,twotone:ar,sharp:fr},Star:{filled:Ce,outlined:Le,rounded:Xe,twotone:ir,sharp:gr},Person:{filled:he,outlined:He,rounded:Ye,twotone:or,sharp:xr},Notifications:{filled:Te,outlined:Me,rounded:qe,twotone:nr,sharp:br},Visibility:{filled:ze,outlined:Ee,rounded:Ze,twotone:lr,sharp:vr},ShoppingCart:{filled:Ae,outlined:Oe,rounded:Je,twotone:sr,sharp:yr},Lock:{filled:Ie,outlined:Ne,rounded:Ke,twotone:dr,sharp:Sr},Info:{filled:Re,outlined:xe,rounded:$e,twotone:cr,sharp:kr}};function dn({ratio:e,threshold:r}){if(!e)return le(ga,{style:{color:"var(--Text-Quiet)"},children:"--"});const t=parseFloat(e)>=r;return de(h,{sx:{display:"inline-flex",alignItems:"center",gap:.5},children:[de(h,{sx:{px:1,py:.25,borderRadius:"4px",fontSize:"11px",fontWeight:700,backgroundColor:t?"var(--Tags-Success-BG)":"var(--Tags-Error-BG)",color:t?"var(--Tags-Success-Text)":"var(--Tags-Error-Text)"},children:[e,":1"]}),le(ga,{style:{color:t?"var(--Tags-Success-Text)":"var(--Tags-Error-Text)"},children:t?"Pass":"Fail"})]})}function cn({label:e,ratio:r,threshold:t,note:a}){return de(h,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(h,{sx:{flex:1},children:[le(oa,{style:{color:"var(--Text)"},children:e}),a&&le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:a})]}),le(dn,{ratio:r,threshold:t})]})}function un({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"primary":"primary-outline",size:"small",onClick:t,children:e})}function hn(){const[e,t]=r("filled"),[a,i]=r("default"),[n,l]=r("medium"),[s,d]=r("40"),[c,u]=r(!1),[p,m]=r("Home"),[f,g]=r(""),[x,b]=r({}),v=an[a]||"Default",y="twotone"===e,S="custom"===n?(parseInt(s,10)||40)+"px":{xs:"12px",small:"16px",medium:"24px",large:"36px"}[n]||"24px",B=function(e,r){return sn[e]?.[r]||sn[e]?.filled||Se}(p,e),w=function(e){return{outlined:"Outlined",rounded:"Rounded",twotone:"TwoTone",sharp:"Sharp"}[e]||""}(e),T=p+w+"Icon",z=f.trim().length>0,A="<Icon>\n <"+T+' />\n</Icon>\n{/* aria-hidden="true" by default */}',I='<Icon aria-label="'+(z?f.trim():p+" icon")+'">\n <'+T+' />\n</Icon>\n{/* role="img" added automatically */}';return o(()=>{b({background:Uo("--Background"),iconColor:Uo("--Icons-"+v),iconVariant:Uo("--Icons-Variant-"+v)})},[a,v]),de(h,{sx:{pb:8},children:[le(qt,{children:"Icon"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(h,{sx:{p:4,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:200,backgroundColor:"var(--Background)",borderBottom:"1px solid var(--Border)",gap:2},children:le(Na,{color:a,size:n,fontSize:"custom"===n?parseInt(s,10)||40:void 0,disabled:c,twoTone:y,"aria-label":z?f.trim():void 0,children:le(B,{})})}),le(No,{code:(()=>{const e=[];"default"!==a&&e.push('color="'+a+'"'),"custom"===n?(e.push('size="custom"'),e.push("fontSize={"+(parseInt(s,10)||40)+"}")):"medium"!==n&&e.push('size="'+n+'"'),y&&e.push("twoTone"),c&&e.push("disabled"),z&&e.push('aria-label="'+f.trim()+'"');const r=e.length?" "+e.join(" "):"";return"import "+T+" from '@mui/icons-material/"+p+(w||"")+"';\n\n<Icon"+r+">\n <"+T+" />\n</Icon>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"ICON"}),le(h,{component:"input",type:"text",value:p,onChange:e=>m(e.target.value),placeholder:"e.g. Home, Favorite, Delete",sx:{width:"100%",padding:"6px 10px",fontSize:"13px",fontFamily:"inherit",border:"1px solid var(--Border)",borderRadius:"4px",backgroundColor:"var(--Background)",color:"var(--Text)",boxSizing:"border-box","&:focus":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"1px",borderColor:"var(--Focus-Visible)"}}}),de(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:["Enter a MUI icon name."," ",le(h,{component:"a",href:"https://mui.com/material-ui/material-icons/",target:"_blank",rel:"noopener noreferrer",sx:{color:"var(--Text-Primary)",textDecoration:"underline","&:hover":{color:"var(--Header-Primary)"}},children:"Browse MUI Icons ↗"})]})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:nn.map(r=>le(un,{label:ln[r],selected:e===r,onClick:()=>t(r)},r))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{spacing:1.5,children:on.map(e=>de(h,{children:[le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:e.label}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:e.colors.map(e=>{const r=an[e],t=a===e;return le(h,{component:"button",onClick:()=>i(e),"aria-label":"Select "+tn(e),"aria-pressed":t,title:tn(e),sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Icons-"+r+")",border:t?"2px solid var(--Text)":"1px solid var(--Border)",outline:t?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:t&&le(ue,{sx:{fontSize:16,color:"var(--Background)",pointerEvents:"none"}})},e)})})]},e.label))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:["xs","small","medium","large","custom"].map(e=>le(un,{label:"xs"===e?"XS":tn(e),selected:n===e,onClick:()=>l(e)},e))}),"custom"===n&&de(h,{sx:{display:"flex",alignItems:"center",gap:1,mt:1.5},children:[le(h,{component:"input",type:"number",value:s,onChange:e=>d(e.target.value),"aria-label":"Custom font size in pixels",sx:{width:72,padding:"4px 8px",fontSize:"13px",fontFamily:"inherit",border:"1px solid var(--Border)",borderRadius:"4px",backgroundColor:"var(--Background)",color:"var(--Text)",outline:"none","&:focus":{borderColor:"var(--Focus-Visible)"}}}),le(ga,{style:{color:"var(--Text-Quiet)"},children:"px"})]})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"ARIA LABEL"}),le(h,{component:"input",type:"text",value:f,onChange:e=>g(e.target.value),placeholder:"Leave empty for decorative (aria-hidden)",sx:{width:"100%",padding:"6px 10px",fontSize:"13px",fontFamily:"inherit",border:"1px solid var(--Border)",borderRadius:"4px",backgroundColor:"var(--Background)",color:"var(--Text)",boxSizing:"border-box","&:focus":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"1px",borderColor:"var(--Focus-Visible)"}}}),le(ga,{style:{color:z?"var(--Tags-Success-Text)":"var(--Text-Quiet)",display:"block",marginTop:6},children:z?'✓ Meaningful — role="img" aria-label="'+f.trim()+'"':'Decorative — aria-hidden="true" (invisible to screen readers)'})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Disabled"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Reduces opacity to 0.38"})]}),le(en,{checked:c,onChange:e=>u(e.target.checked),size:"small","aria-label":"Toggle disabled"})]})]})}),le(no,{value:1,children:de(h,{sx:{p:3},children:[de(oa,{color:"quiet",style:{marginBottom:24},children:[ln[e]," / ",tn(a)," / ","custom"===n?s+"px":n,z?" / meaningful":" / decorative"]}),de(k,{spacing:3,children:[de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"Icon Contrast (WCAG 1.4.11 — 3:1)"}),le(oa,{color:"quiet",style:{marginBottom:16},children:"Non-text elements must contrast 3:1 against the page background."}),le(cn,{label:"var(--Icons-"+v+") vs. var(--Background)",ratio:Go(x.iconColor,x.background),threshold:3,note:T+" at "+S+" in "+tn(a)+" color"}),y&&le(cn,{label:"var(--Icons-Variant-"+v+") vs. var(--Background)",ratio:Go(x.iconVariant,x.background),threshold:3,note:"Two-tone secondary fill — must also meet 3:1"})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),de(k,{spacing:0,children:[de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)",backgroundColor:z?"var(--Tags-Success-BG, rgba(0,200,0,0.05))":"transparent",px:1,borderRadius:"4px"},children:[de(oa,{style:{fontWeight:600},children:["Current icon — ",z?"meaningful ✓":"decorative"]}),le(h,{component:"pre",sx:{fontFamily:"monospace",fontSize:"11px",color:"var(--Text-Quiet)",mt:.5,whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0},children:z?I:A})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Decorative (no aria-label):"}),le(ga,{style:{color:"var(--Text-Quiet)"},children:'aria-hidden="true" is applied automatically. The icon is invisible to screen readers. Use this when the icon is purely visual — e.g. a decorative bullet or inline illustration.'}),le(h,{component:"pre",sx:{fontFamily:"monospace",fontSize:"11px",color:"var(--Text-Quiet)",mt:.5,whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0},children:A})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Meaningful (with aria-label):"}),le(ga,{style:{color:"var(--Text-Quiet)"},children:'role="img" is added automatically. The label is announced by screen readers. Use this when the icon conveys information that is not present in surrounding text.'}),le(h,{component:"pre",sx:{fontFamily:"monospace",fontSize:"11px",color:"var(--Text-Quiet)",mt:.5,whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0},children:I})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(oa,{children:["Disabled state",c?" ← current":"",":"]}),le(ga,{style:{color:"var(--Text-Quiet)"},children:"Opacity 0.38 — visual cue only. To disable an action, disable the wrapping interactive element (button, link), not the icon itself."})]}),y&&de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(oa,{children:["Two-tone",y?" ← current":"",":"]}),de(ga,{style:{color:"var(--Text-Quiet)"},children:["Secondary fill uses var(--Icons-Variant-",v,"). Both the primary and secondary fills must meet 3:1 contrast independently."]})]}),de(h,{sx:{py:1.5},children:[de(oa,{children:["Touch target — ",S," icon","small"===n?" ⚠":" ✓",":"]}),le(ga,{style:{color:"var(--Text-Quiet)"},children:"small"===n?"Small icons (20px) need a 24px minimum target area around them (WCAG 2.5.5). Wrap in a button with padding.":"Icon is "+S+" — meets 24px minimum. Ensure the wrapping interactive element also meets 24×24px."})]})]})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"Size Reference"}),le(k,{spacing:0,children:[{label:"Small",s:"small",px:"20px",note:"Inline text, compact UI"},{label:"Medium",s:"medium",px:"24px",note:"Standard UI — default"},{label:"Large",s:"large",px:"36px",note:"Emphasis, empty states, hero areas"},{label:"Custom",s:"custom",px:"any",note:"Ensure 24×24px minimum touch target (WCAG 2.5.5)"}].map(({label:e,s:r,px:t,note:a},i,o)=>de(h,{sx:{py:1.5,borderBottom:i<o.length-1?"1px solid var(--Border)":"none",display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[de(h,{children:[de(oa,{children:[e," — ",t]}),le(ga,{style:{color:"var(--Text-Quiet)"},children:a})]}),n===r&&le(h,{sx:{px:1,py:.25,borderRadius:"4px",fontSize:"11px",fontWeight:700,backgroundColor:"var(--Tags-Success-BG)",color:"var(--Tags-Success-Text)"},children:"current"})]},e))})]})]})]})})]})})})]})]})}const pn={default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},mn={small:{size:32,iconSize:"16px",borderRadius:"8px"},medium:{size:40,iconSize:"20px",borderRadius:"10px"},large:{size:48,iconSize:"24px",borderRadius:"12px"}};function fn({children:e,color:r="primary",variant:t="solid",size:a="medium",className:i="",sx:o={},...n}){const l=mn[a]||mn.medium,s=pn[r]||pn.primary;let d,c;switch(t){case"light":d=s,c="Surface-Brightest";break;case"dark":d=s,c="Surface-Dimmest";break;default:d=s,c="Surface"}return le(h,{"data-theme":d,"data-surface":c,className:"icon-badge icon-badge-"+t+" icon-badge-"+a+" icon-badge-"+r+" "+i,sx:{width:l.size,height:l.size,borderRadius:l.borderRadius,backgroundColor:"var(--Background)",color:"var(--Text)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,"& svg":{width:l.iconSize,height:l.iconSize,fontSize:l.iconSize,color:"inherit",stroke:"currentColor"},...o},...n,children:e})}function gn({variant:t="outlined",color:a="default",size:i="medium",disabled:o=!1,orientation:n="horizontal",spacing:l=0,fit:s,fullWidth:d=!1,equalWidth:c=!1,multiple:u=!1,value:p,defaultValue:m,onChange:f,children:g,className:x="",sx:b={},"aria-label":v,...y}){const[S,k]=r(m??(u?[]:null)),B=void 0!==p,w=B?p:S,C=u?Array.isArray(w)?w:null==w?[]:[w]:null,T="horizontal"===n,z=0===l,A="light"===t,I="ghost"===t,R=s??(d?"fill":c?"equal":"hug"),W="fill"===R,D="equal"===R&&T,P=(F=a).charAt(0).toUpperCase()+F.slice(1);var F;const L="var(--Buttons-"+P+"-Border)",H="var(--Buttons-"+P+"-Button)",M="var(--Buttons-"+P+"-Text)",E="default"===a?void 0:P,O=e.Children.toArray(g).filter(Boolean),N=O.length,Q=(e,r)=>t=>{const a=u?C.includes(e)?C.filter(r=>r!==e):[...C,e]:e;B||k(a),f?.(a,t),r?.(t)},V=O.map((r,t)=>{if(!e.isValidElement(r))return r;const n=0===t,l=t===N-1,s=r.props.value??t,d=(c=s,u?C.includes(c):w===c);var c;let p;if(z&&N>1){const e="var(--Style-Border-Radius)";p=T?n&&l?e:n?e+" 0 0 "+e:l?"0 "+e+" "+e+" 0":"0":n&&l?e:n?e+" "+e+" 0 0":l?"0 0 "+e+" "+e:"0"}const m={...z&&N>1?{borderRadius:p,...!n&&(T?{marginLeft:"calc(-1 * var(--Button-Border-Width))"}:{marginTop:"calc(-1 * var(--Button-Border-Width))"}),position:"relative","&:hover, &:focus-visible":{zIndex:1}}:{},transform:"none !important","&:hover, &:active, &:focus-visible":{transform:"none !important"},...d?{backgroundColor:H+" !important",color:M+" !important",borderColor:L+" !important","&:hover, &:active, &.Mui-focusVisible, &:focus-visible":{backgroundColor:H+" !important",color:M+" !important",borderColor:L+" !important"}}:{},...d?{}:{color:"var(--Quiet)",backgroundColor:"transparent","&:hover":{backgroundColor:"var(--Hover)",color:"var(--Text)",zIndex:1},"&:active":{backgroundColor:"var(--Pressed)",color:"var(--Text)"}},...I?{border:"none !important","&:hover":{border:"none !important"}}:{},"&:focus-visible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px",zIndex:2},...r.props.sx},f=e.cloneElement(r,{variant:r.props.variant??(I?"ghost":d?a:a+"-outline"),size:r.props.size??i,disabled:r.props.disabled??o,onClick:Q(s,r.props.onClick),"aria-pressed":d,sx:m});return A&&!d?le(h,{"data-theme":E,"data-surface":"Surface-Brightest",sx:{display:"contents"},children:f},t):e.cloneElement(f,{key:t})});return le(h,{role:"group","aria-label":v,className:"btn-group btn-group-"+t+" btn-group-"+a+" "+x,sx:{...D?{display:W?"grid":"inline-grid",gridAutoFlow:"column",gridAutoColumns:"1fr",justifyItems:"stretch",alignItems:"stretch",width:W?"100%":"fit-content"}:{display:W?"flex":"inline-flex",flexDirection:T?"row":"column",alignItems:"stretch",width:W?"100%":"auto"},gap:z?0:l,border:"none",borderRadius:"var(--Style-Border-Radius)",...b},...y,children:V})}const xn=["Link","Chip","Badge","Caption","Label","Tag","BodySmall","LegalSemibold","Legal","LabelSmall","LabelExtraSmall","EyebrowSmall","ButtonSmall"];function bn(r){let t=!1;return e.Children.forEach(r,r=>{(function(r){if(!e.isValidElement(r))return!1;const t=r.props||{};if("small"===t.size)return!0;if("small"===t["data-size"])return!0;if(24===t.height||24===t.minHeight)return!0;if("24px"===t.height||"24px"===t.minHeight)return!0;if(t.sx){const e=t.sx.minHeight||t.sx.height;if(24===e||"24px"===e)return!0}const a=r.type;if(a){const e=a.displayName||a.name||"";if(xn.some(r=>e.includes(r)))return!0}return!1})(r)&&(t=!0)}),t}function vn({children:e,gap:r,spacing:t,direction:a="column",enforceMinGap:i=!0,minGapToken:o="--min-stack-gap",divider:n,flexWrap:l,useFlexGap:d=!0,alignItems:c,justifyContent:u,sx:h={},className:p="",...m}){const f=void 0!==r?r:t,g=i&&bn(e),x=s(()=>{if(!g)return f;const e=function(e,r=8){return null==e?0:"number"==typeof e?e*r:"string"==typeof e?e.endsWith("px")?parseFloat(e):e.endsWith("rem")?parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize||"16"):parseFloat(e)*r||0:0}(f),r=function(e,r=8){if("undefined"==typeof window)return r;const t=getComputedStyle(document.documentElement).getPropertyValue(e).trim();return t?t.endsWith("rem")?parseFloat(t)*parseFloat(getComputedStyle(document.documentElement).fontSize):parseFloat(t)||r:r}(o,8);return e>=r?f:"var("+o+", "+r+"px)"},[g,f,o]);return le(k,{direction:a,spacing:d?void 0:x,gap:d?x:void 0,divider:n,flexWrap:l,useFlexGap:d,alignItems:c,justifyContent:u,className:"omni-stack"+(g?" omni-stack-min-gap-enforced":"")+(p?" "+p:""),sx:{...m["data-surface"]||m["data-theme"]?{background:"var(--Background)"}:{},boxSizing:"border-box",...g?{"&::before":{display:"none"}}:{},...h},"data-min-gap-enforced":g?"true":void 0,...m,children:e})}const yn=e=>le(vn,{direction:"row",alignItems:"center",...e}),Sn=e=>le(vn,{direction:"column",...e}),kn=e=>le(vn,{direction:"column",alignItems:"center",justifyContent:"center",...e}),Bn=e=>le(vn,{direction:"row",alignItems:"center",justifyContent:"space-between",...e}),wn=e=>le(vn,{direction:"row",flexWrap:"wrap",...e}),Cn=({breakpoint:e="sm",...r})=>le(vn,{direction:{xs:"column",[e]:"row"},...r}),Tn=vn,zn=wn,An=e=>le(h,{sx:{borderBottom:"1px solid var(--Border)",width:"100%"},...e}),In=({sx:e,...r})=>le(vn,{sx:{px:2,...e},...r}),Rn=({sx:e,...r})=>le(vn,{sx:{overflowY:"auto",...e},...r}),Wn={default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},Dn={small:{gap:"8px",fontSize:"13px",padding:"var(--Card-Padding)"},medium:{gap:"12px",fontSize:"14px",padding:"var(--Card-Padding)"},large:{gap:"16px",fontSize:"16px",padding:"var(--Card-Padding)"}},Pn=l({variant:"default",color:"primary",size:"medium",orientation:"vertical"});function Fn({children:e,variant:r="solid",color:t="default",surface:a,size:i="medium",orientation:o="vertical",clickable:n=!1,selected:l=!1,elevated:s=!1,draggable:d=!1,onClick:c,disabled:u=!1,href:p,className:m="",sx:f={},...g}){const x="default"===t,b=x?"":Wn[t],v=a||(x?"Container":"dark"===r?"Surface-Dimmest":"light"===r?"Surface-Brightest":"Surface"),y=Dn[i]||Dn.medium,S="horizontal"===o,k=!!d,B=!u&&(n||!!c||!!p||l||k),w=p?"a":"div",C=l?`var(--Buttons-${(e=>e.charAt(0).toUpperCase()+e.slice(1))("default"===t?"Default":t)}-Border)`:"var(--Buttons-Default-Border)",T=B?l?`2px solid ${C}`:"1px solid var(--Buttons-Default-Border)":"1px solid var(--Border-Variant)",z=s?ai:ti,A=s?ii:ai,I=s?ti:ri;return le(Pn.Provider,{value:{variant:r,color:t,size:i,orientation:o},children:le(h,{component:w,href:p||void 0,onClick:B?c:void 0,role:B?"button":void 0,tabIndex:B?0:void 0,"aria-pressed":!!l||void 0,"aria-disabled":u||void 0,draggable:k||void 0,className:"card card-"+r+" card-"+i+" card-"+o+(B?" card-clickable":"")+(l?" card-selected":"")+(s?" card-elevated":"")+(k?" card-draggable":"")+" "+m,sx:{display:"flex",border:T,borderRadius:"var(--Card-Radius)",boxShadow:z,overflow:"hidden",textDecoration:"none",transition:"box-shadow 0.2s ease, border-color 0.2s ease, transform 0.1s ease",...u&&{opacity:"var(--Disabled, 0.38)",cursor:"not-allowed",pointerEvents:"none"},...B&&!k&&{cursor:"pointer","&:hover":{borderColor:"var(--Buttons-Default-Border)",boxShadow:A,transform:"translateY(-1px)"},"&:active":{transform:"translateY(0) scale(0.995)",boxShadow:I},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"3px",borderRadius:"calc(var(--Card-Radius) + 3px)"}},...k&&{cursor:"grab","&:hover":{borderColor:"var(--Buttons-Default-Border)",boxShadow:A},"&:active":{cursor:"grabbing",zIndex:10,boxShadow:ii,transform:"scale(1.02)",borderWidth:"2px",borderColor:"var(--Buttons-Primary-Border)"},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"3px"}},...f},onKeyDown:B?e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),c?.())}:void 0,...g,children:le(h,{"data-theme":b||void 0,"data-surface":v,sx:{display:"flex",flexDirection:S?"row":"column",gap:y.gap,padding:y.padding,backgroundColor:"var(--Background)",color:"var(--Text)",fontSize:y.fontSize,fontFamily:"inherit",borderRadius:"inherit",position:"relative",flex:1,minWidth:0,overflow:"hidden"},children:e})})})}function Ln({children:e,className:r="",sx:t={},...a}){const{size:i}=n(Pn);return le(h,{className:"card-content "+r,sx:{display:"flex",flexDirection:"column",gap:(Dn[i]||Dn.medium).gap,flex:1,minWidth:0,...t},...a,children:e})}const Hn=e=>le(Fn,{clickable:!0,selected:e.selected,...e}),Mn=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",En=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary"]},{label:"State",colors:["info","success","warning","error"]}],On=[Se,Br,me,Ce,wr,Cr];function Nn(){const[e,t]=r("primary"),[a,i]=r("solid"),[o,n]=r("medium"),l=On[0];return de(Sn,{spacing:4,style:{paddingBottom:64},children:[le(qt,{children:"Icon Badge"}),de("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24},children:[le(Fn,{padding:"medium",children:de(Sn,{spacing:4,alignItems:"center",children:[le("div",{style:{padding:40},children:le(fn,{color:e,variant:a,size:o,children:le(l,{})})}),le(yn,{spacing:4,alignItems:"flex-end",children:["small","medium","large"].map(r=>de(Sn,{spacing:1,alignItems:"center",children:[le(fn,{color:e,variant:a,size:r,children:le(l,{})}),le(oa,{style:{color:"var(--Quiet)"},children:Mn(r)})]},r))}),de(Sn,{spacing:1,alignItems:"center",children:[le(oa,{style:{color:"var(--Quiet)",fontWeight:600,fontSize:"0.7rem"},children:"Variants"}),le(yn,{spacing:3,children:["solid","light","dark"].map(r=>de(Sn,{spacing:1,alignItems:"center",children:[le(fn,{color:e,variant:r,size:"medium",children:le(l,{})}),le(oa,{style:{color:"var(--Quiet)",fontSize:"0.65rem"},children:Mn(r)})]},r))})]}),de(Sn,{spacing:1,alignItems:"center",children:[le(oa,{style:{color:"var(--Quiet)",fontWeight:600,fontSize:"0.7rem"},children:"All Colors"}),le(yn,{spacing:2,style:{flexWrap:"wrap",justifyContent:"center"},children:En.flatMap(e=>e.colors).map(e=>de(Sn,{spacing:0,alignItems:"center",children:[le(fn,{color:e,variant:a,size:"small",children:le(l,{})}),le(oa,{style:{color:"var(--Quiet)",fontSize:"0.55rem"},children:Mn(e)})]},e))})]})]})}),le(Fn,{padding:"medium",children:de(Sn,{spacing:4,children:[le(qt,{style:{fontSize:"1rem"},children:"Playground"}),de(Sn,{spacing:2,children:[le(ya,{children:"Color"}),En.map(r=>de(Sn,{spacing:1,children:[le(oa,{style:{color:"var(--Quiet)",fontWeight:600,fontSize:"0.7rem"},children:r.label}),le(yn,{spacing:1,children:r.colors.map(r=>le(wi,{variant:e===r?"default":"outline",size:"small",onClick:()=>t(r),children:Mn(r)},r))})]},r.label))]}),de(Sn,{spacing:1,children:[le(ya,{children:"Variant"}),le(gn,{size:"small",children:["solid","light","dark"].map(e=>le(wi,{variant:a===e?"default":"outline",size:"small",onClick:()=>i(e),children:Mn(e)},e))})]}),de(Sn,{spacing:1,children:[le(ya,{children:"Size"}),le(gn,{size:"small",children:["small","medium","large"].map(e=>le(wi,{variant:o===e?"default":"outline",size:"small",onClick:()=>n(e),children:Mn(e)},e))})]}),de(Sn,{spacing:0,children:[de(oa,{style:{color:"var(--Quiet)"},children:["data-theme: ",Mn(e),"light"===a?"-Light":""]}),de(oa,{style:{color:"var(--Quiet)"},children:["data-surface: ","dark"===a?"Surface-Dimmest":"Surface"]}),le(oa,{style:{color:"var(--Quiet)"},children:"bg: var(--Background)"}),le(oa,{style:{color:"var(--Quiet)"},children:"icon: var(--Text)"})]})]})})]})]})}const Qn={primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},Vn={small:{size:32,iconSize:16,fontSize:"13px",px:12,gap:6},medium:{size:48,iconSize:24,fontSize:"14px",px:16,gap:8},large:{size:56,iconSize:36,fontSize:"15px",px:20,gap:10}};function jn({children:e,icon:r,label:t,variant:a="solid",color:i="primary",size:o="medium",extended:n=!1,animate:l=!1,disabled:s=!1,onClick:d,ariaLabel:c,className:u="",sx:p={},...m}){"production"!==process.env.NODE_ENV&&"solid"!==a&&console.warn('[Fab] variant="'+a+'" is not a Fab variant; rendering solid. The light variant was removed with the -Light button shades — it named tokens no design system publishes, so it rendered as an unstyled box. For a lighter FAB, put it on data-surface="Surface-Brightest".');const f=function(e){const r=Qn[e]||"Primary";return{bg:"var(--Buttons-"+r+"-Button)",text:"var(--Buttons-"+r+"-Text)",border:"var(--Buttons-"+r+"-Border)",hover:"var(--Buttons-"+r+"-Hover)",active:"var(--Buttons-"+r+"-Pressed)"}}(i),g=Vn[o]||Vn.medium,x=r||e||le(Tr,{sx:{fontSize:g.iconSize}}),b=c||t||"Action";return de(se,{children:[l&&le("style",{children:"\n@keyframes fab-pulse {\n 0% { box-shadow: 0 0 0 0 rgba(var(--pulse-rgb, 0,0,0), 0.4); }\n 70% { box-shadow: 0 0 0 12px rgba(var(--pulse-rgb, 0,0,0), 0); }\n 100% { box-shadow: 0 0 0 0 rgba(var(--pulse-rgb, 0,0,0), 0); }\n}\n"}),de(h,{component:"button",type:"button",role:"button","aria-label":b,onClick:d,disabled:s,className:"fab fab-solid fab-"+i+" fab-"+o+(n?" fab-extended":"")+(l?" fab-animate":"")+(s?" fab-disabled":"")+(u?" "+u:""),sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:n?g.gap+"px":0,...n?{height:g.size+"px",borderRadius:g.size/2+"px",px:g.px+"px"}:{width:g.size+"px",height:g.size+"px",borderRadius:"50%"},backgroundColor:f.bg,color:f.text,border:"var(--Button-Border-Width) solid "+f.border,"--_height":g.size+"px","--_bevel":"min(calc(var(--Button-Bevel) * var(--_height) / 100), calc(var(--_height) / 5))",boxShadow:`${ci(i)}, ${ai}`,fontSize:g.fontSize,fontFamily:"inherit",fontWeight:600,cursor:s?"not-allowed":"pointer",opacity:s?"var(--Disabled, 0.38)":1,outline:"none",flexShrink:0,transition:"background-color 0.15s ease, box-shadow 0.2s ease, transform 0.1s ease","&:hover":s?{}:{backgroundColor:f.hover,boxShadow:`${ci(i)}, ${ii}`},"&:active":s?{}:{backgroundColor:f.active,transform:"scale(0.96)",boxShadow:ci(i)},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"2px"},...l&&!s&&{animation:"fab-pulse 2s infinite"},...p},...m,children:[le(h,{sx:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:g.iconSize+"px",color:"inherit","& .MuiSvgIcon-root":{fontSize:"inherit",color:"inherit"}},children:x}),n&&t&&le(h,{component:"span",sx:{whiteSpace:"nowrap",lineHeight:1},children:t})]})]})}const Gn=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",Un=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}],Xn={default:"Tertiary",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"};function Yn({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function qn({color:e,selected:r,onClick:t}){const a=Xn[e]||"Primary";return le(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+Gn(e),"aria-pressed":r,title:Gn(e),sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&le(ue,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function Zn({value:e,onChange:r,placeholder:t,label:a}){return de(h,{children:[a&&le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4},children:a}),le(h,{component:"input",type:"text",value:e,onChange:e=>r(e.target.value),placeholder:t,sx:{width:"100%",padding:"6px 10px",fontSize:"13px",fontFamily:"inherit",border:"1px solid var(--Border)",borderRadius:"4px",backgroundColor:"var(--Background)",color:"var(--Text)",outline:"none","&:focus":{borderColor:"var(--Focus-Visible)"}}})]})}function Jn(){const[e,t]=r("default"),[a,i]=r("medium"),[o,n]=r("Add"),[l,s]=r(!1),[d,c]=r("Create"),[u,p]=r(!1),[m,f]=r(!1),[g,x]=r(null),[b,v]=r("Surface"),y="default"===e?"tertiary":e;return de(h,{sx:{pb:8},children:[le(qt,{children:"Floating Action Button"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{theme:g,children:le(jn,{color:y,size:a,icon:(()=>{const e=zr[o]||zr.Add;return le(Na,{size:"medium",children:le(e,{})})})(),extended:l,label:d,animate:u,disabled:m,ariaLabel:l?d:o})}),le(No,{code:(()=>{const r=[];return"default"!==e&&r.push('color="'+e+'"'),"medium"!==a&&r.push('size="'+a+'"'),r.push("icon={<"+o+"Icon />}"),l&&(r.push("extended"),r.push('label="'+d+'"')),u&&r.push("animate"),m&&r.push("disabled"),r.push('ariaLabel="'+(l?d:o)+'"'),"<Fab\n "+r.join("\n ")+"\n/>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[le(h,{sx:{mb:3},children:le(ho,{theme:g,onThemeChange:x,surface:b,onSurfaceChange:v})}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{spacing:1.5,children:Un.map(r=>de(h,{children:[le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:r.label}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:r.colors.map(r=>le(qn,{color:r,selected:e===r,onClick:t},r))})]},r.label))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),le(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>le(Yn,{label:Gn(e),selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3},children:[le(Zn,{label:"Icon Name",value:o,onChange:n,placeholder:"Add"}),de(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:4},children:[le("a",{href:"https://mui.com/material-ui/material-icons/",target:"_blank",rel:"noopener noreferrer",style:{color:"var(--Hotlink)"},children:"Material icon"})," name (e.g. Add, Edit, Favorite, Share)"]})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"OPTIONS"}),de(h,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Extended"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Pill shape with icon + text label"})]}),le(en,{checked:l,onChange:e=>s(e.target.checked),size:"small","aria-label":"Extended"})]}),l&&le(h,{sx:{mt:1.5},children:le(Zn,{label:"Label Text",value:d,onChange:c,placeholder:"Create"})}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Animation"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Pulse ring effect to draw attention"})]}),le(en,{checked:u,onChange:e=>p(e.target.checked),size:"small","aria-label":"Animation"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Disabled"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Non-interactive state"})]}),le(en,{checked:m,onChange:e=>f(e.target.checked),size:"small","aria-label":"Disabled"})]})]})]})}),le(no,{value:1,children:le(h,{sx:{p:3},children:de(k,{spacing:3,children:[de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),de(k,{spacing:0,children:[de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Role:"}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:'<button role="button" aria-label="...">'})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Label:"}),le(ga,{style:{color:"var(--Text-Quiet)"},children:l?"Extended: visible label provides accessible name.":"Icon-only: aria-label is required."})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Focus:"}),le(ga,{style:{color:"var(--Text-Quiet)"},children:"3px solid var(--Focus-Visible) with 2px offset."})]}),de(h,{sx:{py:1.5},children:[le(oa,{children:"Disabled:"}),le(ga,{style:{color:"var(--Text-Quiet)"},children:"HTML disabled attribute. 50% opacity, removed from tab order."})]})]})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"Best Practices"}),de(k,{spacing:0,children:[de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"One per screen:"}),le(ga,{style:{color:"var(--Text-Quiet)"},children:"FABs represent the primary action. Use at most one per view."})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Extended for clarity:"}),le(ga,{style:{color:"var(--Text-Quiet)"},children:"Use extended variant when the icon alone may be ambiguous."})]}),de(h,{sx:{py:1.5},children:[le(oa,{children:"Animation:"}),le(ga,{style:{color:"var(--Text-Quiet)"},children:"Use sparingly. Respect prefers-reduced-motion."})]})]})]})]})})})]})})})]})]})}const Kn={small:"var(--Sm-Rail-Width, 72px)",medium:"var(--Rail-Width, 80px)",large:"var(--Lg-Rail-Width, 96px)"},$n="var(--Icon-Size, 24px)",_n="var(--Sizing-Half, 4px)",el="var(--Button-Height, 32px)";function rl({items:e=[],sections:t,value:a,defaultValue:o=0,onChange:n,expandable:l=!1,expandedWidth:s="partial",defaultExpanded:d=!1,fabAction:c,labelStyle:u="contained",size:p="medium",className:m="",sx:f={},...g}){const[x,b]=r(o),[v,y]=r(d),S=void 0!==a,k=S?a:x,B=i(e=>{S||b(e),n?.(e)},[S,n]),w=l&&v;return de(h,{component:"nav",role:"navigation","aria-label":"Navigation rail","data-theme":"Default","data-surface":"Surface-Dim",className:"rail"+(l?" rail-expandable":" rail-fixed")+(w?" rail-expanded":" rail-collapsed")+" rail-label-"+("outside"===u?"outside":"contained")+" rail-"+(Kn[p]?p:"medium")+" "+m,sx:{display:"flex",flexDirection:"column",width:w?("full"===s?320:240)+"px":Kn[p]||Kn.medium,minHeight:"100%",gap:w?0:"var(--Sizing-1, 8px)",backgroundColor:"var(--Background)",borderRight:"1px solid var(--Border)",fontFamily:"inherit",transition:"width 0.25s ease",overflow:"hidden",flexShrink:0,...f},...g,children:[l&&le(h,{sx:{display:"flex",justifyContent:w?"flex-start":"center",px:w?1.5:0,height:56,alignItems:"center"},children:le(wi,{iconOnly:!0,variant:"ghost",size:"small",onClick:()=>y(e=>!e),"aria-label":w?"Collapse menu":"Expand menu",children:le(Na,{size:"small",sx:{color:"inherit"},children:le(w?Wr:Rr,{})})})}),c&&le(h,{sx:{px:w?2:1,py:1,flexShrink:0},children:le(wi,{variant:"primary-light",size:"medium",onClick:c.onClick,"aria-label":c.label||"Action",startIcon:c.icon?le(Na,{size:"small",sx:{color:"inherit"},children:c.icon}):void 0,sx:{width:w?"100%":56,borderRadius:w?"28px":"var(--Style-Border-Radius)",justifyContent:w?"flex-start":"center",transition:"all 0.2s ease"},children:w?c.label:null})}),le(h,{role:"tablist","aria-orientation":"vertical",sx:{flex:1,overflowY:"auto",overflowX:"hidden",display:"flex",flexDirection:"column",alignItems:"center",gap:w?0:"var(--Sizing-1-and-Half, 12px)",px:w?0:"var(--Sizing-1, 8px)",width:"100%",boxSizing:"border-box"},children:(()=>{if(t&&t.length>0){const e=[];let r=0;return t.forEach((t,a)=>{a>0&&e.push(le(h,{"aria-hidden":"true",sx:{height:"1px",width:"100%",backgroundColor:"var(--Border-Variant)"}},"divider-"+a)),t.items.forEach(t=>{const a=r;e.push(le(tl,{item:t,selected:k===a,expanded:w,labelStyle:u,onClick:()=>B(a)},"item-"+a)),r++})}),e}return e.map((e,r)=>le(tl,{item:e,selected:k===r,expanded:w,labelStyle:u,onClick:()=>B(r)},r))})()})]})}function tl({item:e,selected:r,expanded:t,labelStyle:a,onClick:i}){const{icon:o,avatar:n,label:l,badge:s,disabled:d}=e,c=r?"var(--Button)":"transparent",u=r||t?"var(--Text)":"var(--Quiet)",p="outside"!==a,m=p&&!t,f=d?{}:{"&:hover":{backgroundColor:"var(--Hover)","& .rail-item-label":{color:"var(--Text)"}},"&:active":{backgroundColor:"var(--Pressed)","& .rail-item-label":{color:"var(--Text)"}},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"-3px","& .rail-item-label":{color:"var(--Text)"}}};return de(h,{component:"button",type:"button",role:"tab","aria-selected":r,"aria-label":l,"aria-disabled":d||void 0,disabled:d||void 0,onClick:d?void 0:i,className:"rail-item"+(r?" rail-item-selected":""),sx:{display:"flex",flexDirection:t?"row":"column",alignItems:"center",justifyContent:t?"flex-start":"center",gap:t?"var(--Sizing-1-and-Half, 12px)":"2px",width:t?"100%":44,minWidth:t?void 0:$n,minHeight:$n,px:t?2.5:0,py:m?_n:0,border:r&&m?"1px solid var(--Border)":"1px solid transparent",borderRadius:t?0:"8px",backgroundColor:m||t?c:"transparent",boxShadow:r&&m?"var(--Shadow-1, none)":"none",color:"inherit",cursor:d?"not-allowed":"pointer",opacity:d?"var(--Disabled, 0.38)":1,fontFamily:"inherit",textAlign:t?"left":"center",transition:"background-color 0.15s ease, color 0.15s ease",outline:"none",...m||t?f:{}},children:[de(h,{sx:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...t?{flexShrink:0}:{width:p?"100%":el,height:p?"auto":el,py:p?_n:0,borderRadius:p?"8px":el,backgroundColor:p?"transparent":c,border:!p&&r?"1px solid var(--Border)":void 0,transition:"background-color 0.2s ease",...p?{}:f}},children:[n?le(h,{sx:{display:"flex",width:$n,height:$n},children:n}):le(Na,{size:"small",sx:{color:"inherit"},children:o}),s&&le(al,{value:s})]}),l&&le(h,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"center",width:"100%"},children:le(ba,{className:"rail-item-label",style:{color:u,textAlign:"center",whiteSpace:t?"nowrap":"normal",overflow:"hidden",textOverflow:"ellipsis",...t?{flex:1}:{maxWidth:"100%"}},children:l})})]})}function al({value:e}){return le(h,{sx:{position:"absolute",top:-4,right:-6,minWidth:16,height:16,borderRadius:"8px",backgroundColor:"var(--Tags-Error-BG)",color:"var(--Tags-Error-Text)",fontSize:"10px",fontWeight:700,px:.5,display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1},children:e})}const il=[{icon:le(Se,{}),label:"Home"},{icon:le(we,{}),label:"Search"},{icon:le(ye,{}),label:"Favorites",badge:3},{icon:le(he,{}),label:"Profile"},{icon:le(Be,{}),label:"Settings"}];function ol({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function nl(){const[e,t]=r(!0),[a,i]=r("partial"),[o,n]=r(!1),[l,s]=r(null),[d,c]=r("Surface");return de(h,{sx:{pb:8},children:[le(qt,{children:"Rail"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[de(lo,{theme:l,surface:d,sx:{minHeight:400,alignItems:"stretch",p:0},children:[le(rl,{items:il,expandable:e,expandedWidth:a,fabAction:o?{icon:le(Tr,{}),label:"Create",onClick:()=>{}}:void 0}),le(h,{sx:{flex:1,p:3},children:le(oa,{style:{color:"var(--Quiet)"},children:"Main content area"})})]}),le(No,{code:(()=>{const r=["items={items}"];return e&&(r.push("expandable"),"partial"!==a&&r.push('expandedWidth="full"')),o&&r.push('fabAction={{ icon: <AddIcon />, label: "Create", onClick: handleCreate }}'),r.push("value={activeIndex}"),r.push("onChange={setActiveIndex}"),"<Rail\n "+r.join("\n ")+"\n/>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[le(h,{sx:{mb:3},children:le(ho,{theme:l,onThemeChange:s,surface:d,onSurfaceChange:c})}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"EXPANDED WIDTH"}),le(k,{direction:"row",spacing:1,children:["partial","full"].map(e=>{return le(ol,{label:(r=e,r?r.charAt(0).toUpperCase()+r.slice(1):""),selected:a===e,onClick:()=>i(e)},e);var r})})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Expandable"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Toggle between collapsed and expanded"})]}),le(en,{variant:"default-outline",checked:e,onChange:e=>t(e.target.checked),size:"small","aria-label":"Expandable"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"FAB Action"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Show create button at top"})]}),le(en,{variant:"default-outline",checked:o,onChange:e=>n(e.target.checked),size:"small","aria-label":"FAB action"})]})]})}),le(no,{value:1,children:le(h,{sx:{p:3},children:le(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),le(k,{spacing:0,children:[{label:"Nav",value:'<nav role="navigation" aria-label="Navigation rail">'},{label:"Items",value:'role="tab" aria-selected on each item'},{label:"TabList",value:'role="tablist" aria-orientation="vertical"'},{label:"Toggle",value:'aria-label="Expand/Collapse menu"'},{label:"Focus",value:"outline: 3px solid var(--Focus-Visible); outline-offset: -3px"},{label:"Badge",value:"Visual only — announced via aria-label on parent item"}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(oa,{children:[e,":"]}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const ll={default:{theme:"Default"},primary:{theme:"Primary"},"primary-light":{theme:"Primary",surface:"Surface-Brightest"},white:{theme:"Neutral",surface:"Surface-Brightest"},black:{theme:"Neutral",surface:"Surface-Dimmest"}};function sl({items:e=[],value:t,defaultValue:a,onChange:o,type:n="floating",orientation:l="horizontal",color:s="default",fab:d,className:c="",sx:u={},...p}){const[m,f]=r(a??null),g=void 0!==t,x=g?t:m,b=i(e=>{const r=x===e?null:e;g||f(r),o?.(r)},[g,x,o]),v=ll[s]||ll.default,y=v.theme,S=v.surface,k="vertical"===l,B="floating"===n,w=le(h,{role:"toolbar","aria-orientation":l,"aria-label":"Toolbar","data-theme":y,"data-surface":S||"Surface",className:"toolbar toolbar-"+n+" toolbar-"+l+" toolbar-"+s+" "+c,sx:{display:"inline-flex",flexDirection:k?"column":"row",alignItems:"center",gap:"4px",backgroundColor:"var(--Background)",border:"1px solid var(--Border-Variant)",borderRadius:B?"56px":"var(--Style-Border-Radius)",padding:B?"8px 16px":"8px",fontFamily:"inherit",flexShrink:0,...B&&{boxShadow:ti},...u},...p,children:e.map((e,r)=>{const t=x===r;return le(wi,{iconOnly:!0,variant:t?"default":"ghost",size:"small",onClick:()=>b(r),"aria-label":e.label,"aria-checked":t,role:"radio",children:le(Na,{size:"small",sx:{color:"inherit"},children:e.icon})},e.key||r)})});return d&&B?de(h,{sx:{display:"inline-flex",flexDirection:k?"column":"row",alignItems:"center",gap:1},children:[w,le(wi,{iconOnly:!0,variant:"default",size:"large",onClick:d.onClick,"aria-label":d.label||"Action",sx:{borderRadius:"50%",width:56,height:56,minWidth:"unset",minHeight:"unset"},children:le(Na,{size:"medium",sx:{color:"inherit"},children:d.icon})})]}):w}const dl=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",cl=[{icon:le(Dr,{}),label:"Bold"},{icon:le(Pr,{}),label:"Italic"},{icon:le(Fr,{}),label:"Underline"},{icon:le(Lr,{}),label:"Align left"},{icon:le(Hr,{}),label:"Align center"}];function ul({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function hl(){const[e,t]=r("floating"),[a,i]=r("default"),[o,n]=r("horizontal"),[l,s]=r(!1),[d,c]=r(null),[u,p]=r("Surface");return de(h,{sx:{pb:8},children:[le(qt,{children:"Toolbar"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{theme:d,surface:u,sx:{minHeight:200},children:le(sl,{items:cl,type:e,color:a,orientation:o,fab:l&&"floating"===e?{icon:le(Tr,{}),label:"Create",onClick:()=>{}}:void 0})}),le(No,{code:(()=>{const r=["items={items}"];return"floating"!==e&&r.push('type="contextual"'),"default"!==a&&r.push('color="'+a+'"'),"horizontal"!==o&&r.push('orientation="vertical"'),l&&r.push('fab={{ icon: <AddIcon />, label: "Create", onClick: handleCreate }}'),r.push("value={selected}"),r.push("onChange={setSelected}"),"<Toolbar\n "+r.join("\n ")+"\n/>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[le(h,{sx:{mb:3},children:le(ho,{theme:d,onThemeChange:c,surface:u,onSurfaceChange:p})}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"TYPE"}),le(k,{direction:"row",spacing:1,children:["floating","contextual"].map(r=>le(ul,{label:dl(r),selected:e===r,onClick:()=>t(r)},r))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:["default","primary","primary-light","white","black"].map(e=>le(ul,{label:dl(e),selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"ORIENTATION"}),le(k,{direction:"row",spacing:1,children:["horizontal","vertical"].map(e=>le(ul,{label:dl(e),selected:o===e,onClick:()=>n(e)},e))})]}),"floating"===e&&de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"FAB Button"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Add FAB to the right of toolbar"})]}),le(en,{variant:"default-outline",checked:l,onChange:e=>s(e.target.checked),size:"small","aria-label":"FAB button"})]})]})}),le(no,{value:1,children:le(h,{sx:{p:3},children:le(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),le(k,{spacing:0,children:[{label:"Role",value:'role="toolbar" aria-orientation aria-label'},{label:"Items",value:'role="radio" aria-checked on each icon button'},{label:"Selection",value:"Toggle — click selected again to deselect"},{label:"Focus",value:"Uses Button component focus styles"},{label:"Floating",value:"borderRadius 56px, padding 16px, Effect-Level-2 shadow"},{label:"Contextual",value:"Standard border-radius, padding 8px, no shadow"}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(oa,{children:[e,":"]}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const pl={small:{height:"var(--Small-Button-Height)",fontSize:"13px",padding:"4px 8px",iconSize:16,btnSize:28},medium:{height:"var(--Button-Height)",fontSize:"14px",padding:"6px 12px",iconSize:18,btnSize:36},large:{height:"var(--Large-Button-Height)",fontSize:"16px",padding:"8px 16px",iconSize:20,btnSize:44}};function ml({value:e,defaultValue:t=0,onChange:n,min:l,max:s,step:d=1,variant:c="outlined",style:u="outline",color:p="default",size:m="medium",label:f,labelPosition:g="top",placeholder:x,helperText:b,disabled:v=!1,fullWidth:y=!1,className:S="",sx:k={},...B}){const[w,C]=r(t),[T,z]=r(!1),A=a(null),I=void 0!==e,R=I?e:w,W=""!==R&&null!=R,D=(P="default"===p?"primary":p).charAt(0).toUpperCase()+P.slice(1);var P;"production"!==process.env.NODE_ENV&&"light"===u&&console.warn('[NumberField] style="light" was removed and had never done anything — it was read by no code path. For a lighter field use data-surface="Surface-Brightest" on its container.');const F="default"===p?"var(--Border)":"var(--Buttons-"+D+"-Border)",L="default"===p?"var(--Text)":"var(--Text-"+D+")",H="outlined"===c,M="floating"===g,E="top"===g,O=pl[m]||pl.medium,N="small"===m?oa:sa,Q=i(e=>{let r="number"==typeof e?e:parseFloat(e);isNaN(r)&&(r=0),void 0!==l&&r<l&&(r=l),void 0!==s&&r>s&&(r=s),I||C(r),n?.(r)},[I,n,l,s]),V=a(R);V.current=R;const j=i(e=>{if(v)return;const r="number"==typeof V.current?V.current:parseFloat(V.current)||0;void 0!==l&&e<0&&r<=l||void 0!==s&&e>0&&r>=s||Q(r+e*d)},[v,d,l,s,Q]),G=void 0!==l&&R<=l,U=void 0!==s&&R>=s,X=a(null),Y=a(null),q=i(()=>{X.current&&(clearTimeout(X.current),X.current=null),Y.current&&(clearInterval(Y.current),Y.current=null)},[]),Z=i(e=>{v||(q(),j(e),X.current=setTimeout(()=>{let r=120,t=0;const a=()=>{j(e),t+=1,10===t&&r>60?(clearInterval(Y.current),r=60,Y.current=setInterval(a,r)):30===t&&r>30&&(clearInterval(Y.current),r=30,Y.current=setInterval(a,r))};Y.current=setInterval(a,r)},400))},[v,j,q]);o(()=>q,[q]);const J=a(!1),K=e=>({onPointerDown:r=>{if(void 0===r.button||0===r.button){r.preventDefault();try{r.currentTarget.setPointerCapture?.(r.pointerId)}catch(e){}J.current=!0,Z(e)}},onClick:()=>{J.current?J.current=!1:j(e)},onPointerUp:e=>{try{e.currentTarget.releasePointerCapture?.(e.pointerId)}catch(e){}q()},onPointerCancel:q,onPointerLeave:q,onKeyDown:r=>{"Enter"!==r.key&&" "!==r.key||r.repeat||(r.preventDefault(),Z(e))},onKeyUp:e=>{"Enter"!==e.key&&" "!==e.key||q()},onBlur:q}),$=e=>{const r=e.target.value;if(""===r||"-"===r)return void(I||C(r));const t=parseFloat(r);isNaN(t)||Q(t)},_=e=>{"ArrowUp"===e.key&&(e.preventDefault(),j(1)),"ArrowDown"===e.key&&(e.preventDefault(),j(-1))},ee={display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",color:"default"===p?"var(--Text)":"var(--Text-"+D+")",cursor:"pointer",outline:"none",flexShrink:0,border:"none",padding:0,borderRadius:"var(--Button-Icon-Radius, 0)",transition:"background-color 0.15s ease","&:hover:not(:disabled)":{backgroundColor:"var(--Hover)"},"&:active:not(:disabled)":{backgroundColor:"var(--Pressed)"},"&:focus-visible":{outline:"none",boxShadow:"inset 0 0 0 1px var(--Focus-Visible)"},"&:disabled":{opacity:"var(--Disabled, 0.38)",cursor:"not-allowed"}},re={},te=()=>E&&f?le(N,{component:"label",style:{display:"block",marginBottom:"6px",color:v?"var(--Quiet)":"var(--Text)",fontWeight:500,opacity:v?"var(--Disabled, 0.38)":1},children:f}):null;return de(h,H?{className:"numberfield numberfield-outlined"+(v?" numberfield-disabled":"")+(S?" "+S:""),sx:{width:y?"100%":"auto",fontFamily:"inherit",...k},...B,children:[te(),le(h,{sx:{border:"1px solid "+F,borderRadius:"small"===m?"var(--Sm-Input-Radius, var(--Input-Radius, var(--Style-Border-Radius)))":"large"===m?"var(--Lg-Input-Radius, var(--Input-Radius, var(--Style-Border-Radius)))":"var(--Input-Radius, var(--Style-Border-Radius))",overflow:"hidden",transition:"border-color 0.15s ease",boxShadow:"none",opacity:v?"var(--Disabled, 0.38)":1,"&:focus-within":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"}},children:le(h,{...re,children:de(h,{sx:{position:"relative",display:"flex",alignItems:"stretch",minHeight:"max("+O.height+", calc(var(--Sizing-3, 24px) * 2 + 1px))",backgroundColor:"var(--Background)"},children:[M&&f&&le(h,{sx:{position:"absolute",top:W||T?"6px":"50%",left:O.padding.split(" ")[1]||"14px",transform:W||T?"none":"translateY(-50%)",transformOrigin:"top left",color:T?L:"var(--Quiet)",fontFamily:"var(--Font-Families-Body, var(--Body-Font-Family))",...W||T?{fontSize:"var(--"+(Vi[m]||Vi.medium).shrunk+"-Font-Size)",fontWeight:"var(--"+(Vi[m]||Vi.medium).shrunk+"-Font-Weight)",letterSpacing:"var(--"+(Vi[m]||Vi.medium).shrunk+"-Letter-Spacing)"}:{fontSize:"var(--"+(Vi[m]||Vi.medium).resting+"-Font-Size)",fontWeight:"var(--"+(Vi[m]||Vi.medium).resting+"-Font-Weight)",letterSpacing:"var(--"+(Vi[m]||Vi.medium).resting+"-Letter-Spacing)"},pointerEvents:"none",transition:"top 0.15s ease, font-size 0.15s ease, color 0.15s ease",zIndex:1},children:f}),le(h,{component:"input",ref:A,type:"text",inputMode:"numeric",role:"spinbutton","aria-valuenow":"number"==typeof R?R:void 0,"aria-valuemin":l,"aria-valuemax":s,"aria-label":f||"Number",value:R,onChange:$,onKeyDown:_,onFocus:()=>z(!0),onBlur:()=>z(!1),disabled:v,placeholder:M?void 0:x||"",sx:{flex:1,border:"none",outline:"none",backgroundColor:"transparent",color:W||T?L:"var(--Quiet)",fontSize:O.fontSize,fontFamily:"var(--Body-Font-Family)",fontWeight:"var(--Body-Font-Weight)",padding:M?"22px 14px 6px":O.padding,minWidth:0,"&::placeholder":{color:"var(--Quiet)",opacity:1},"&:disabled":{cursor:"not-allowed"}}}),de(h,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"stretch",borderLeft:"1px solid "+F,flexShrink:0},children:[le(h,{component:"button",type:"button","aria-label":"Increase",...K(1),disabled:v||U,sx:{...ee,width:"var(--Sizing-4, 32px)",height:"var(--Sizing-3, 24px)"},children:le(Na,{size:"medium",children:le(Mr,{})})}),le(h,{"aria-hidden":"true",sx:{height:"1px",backgroundColor:F,flexShrink:0}}),le(h,{component:"button",type:"button","aria-label":"Decrease",...K(-1),disabled:v||G,sx:{...ee,width:"var(--Sizing-4, 32px)",height:"var(--Sizing-3, 24px)"},children:le(Na,{size:"medium",children:le(Er,{})})})]})]})})}),b&&le(oa,{style:{color:"var(--Quiet)",marginTop:"4px",marginLeft:"2px"},children:b})]}:{className:"numberfield numberfield-spinner"+(v?" numberfield-disabled":"")+(S?" "+S:""),sx:{fontFamily:"inherit",...k},...B,children:[te(),de(h,{sx:{display:"inline-flex",alignItems:"center",gap:"small"===m?.5:1,opacity:v?"var(--Disabled, 0.38)":1},children:[le(h,{component:"button",type:"button","aria-label":"Decrease",...K(-1),disabled:v||G,sx:{...ee,width:O.btnSize,height:O.btnSize,borderRadius:"small"===m?"var(--Sm-Button-Icon-Radius, var(--Button-Icon-Radius, var(--Style-Border-Radius)))":"large"===m?"var(--Lg-Button-Icon-Radius, var(--Button-Icon-Radius, var(--Style-Border-Radius)))":"var(--Button-Icon-Radius, var(--Style-Border-Radius))",border:"1px solid "+F},children:le(Na,{size:"small",children:le(pe,{})})}),le(h,{sx:{border:"1px solid "+F,borderRadius:"small"===m?"var(--Sm-Input-Radius, var(--Input-Radius, var(--Style-Border-Radius)))":"large"===m?"var(--Lg-Input-Radius, var(--Input-Radius, var(--Style-Border-Radius)))":"var(--Input-Radius, var(--Style-Border-Radius))",overflow:"hidden","&:focus-within":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"}},children:le(h,{...re,children:le(h,{component:"input",ref:A,type:"text",inputMode:"numeric",role:"spinbutton","aria-valuenow":"number"==typeof R?R:void 0,"aria-valuemin":l,"aria-valuemax":s,"aria-label":f||"Number",value:R,onChange:$,onKeyDown:_,onFocus:()=>z(!0),onBlur:()=>z(!1),disabled:v,sx:{width:"small"===m?40:56,minHeight:O.height,textAlign:"center",border:"none",outline:"none",backgroundColor:"var(--Hover)",color:"var(--Text)",fontSize:O.fontSize,fontFamily:"var(--Body-Font-Family)",fontWeight:600,"&:disabled":{cursor:"not-allowed"}}})})}),le(h,{component:"button",type:"button","aria-label":"Increase",...K(1),disabled:v||U,sx:{...ee,width:O.btnSize,height:O.btnSize,borderRadius:"small"===m?"var(--Sm-Button-Icon-Radius, var(--Button-Icon-Radius, var(--Style-Border-Radius)))":"large"===m?"var(--Lg-Button-Icon-Radius, var(--Button-Icon-Radius, var(--Style-Border-Radius)))":"var(--Button-Icon-Radius, var(--Style-Border-Radius))",border:"1px solid "+F},children:le(Na,{size:"small",children:le(Tr,{})})})]}),b&&le(oa,{style:{color:"var(--Quiet)",marginTop:"4px",marginLeft:"2px"},children:b})]})}const fl=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",gl=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}];function xl({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function bl({color:e,selected:r,onClick:t}){const a=fl(e);return le(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&le(ue,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function vl(){const[e,t]=r("outlined"),[a,i]=r("outline"),[o,n]=r("default"),[l,s]=r("medium"),[d,c]=r("top"),[u,p]=r(!0),[m,f]=r(!1),[g,x]=r(!1),[b,v]=r(null),[y,S]=r("Surface");return de(h,{sx:{pb:8},children:[le(qt,{children:"Number Field"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{theme:b,surface:y,children:le(h,{sx:{width:"100%",maxWidth:"outlined"===e?300:"auto"},children:le(ml,{variant:e,style:a,color:o,size:l,label:u?"Quantity":void 0,labelPosition:d,min:0,max:100,disabled:m,fullWidth:g&&"outlined"===e})})}),le(No,{code:(()=>{const r=['variant="'+e+'"'];return"outline"!==a&&r.push('style="'+a+'"'),"default"!==o&&r.push('color="'+o+'"'),"medium"!==l&&r.push('size="'+l+'"'),u&&r.push('label="Quantity"'),"top"!==d&&r.push('labelPosition="'+d+'"'),r.push("min={0}"),r.push("max={100}"),m&&r.push("disabled"),g&&"outlined"===e&&r.push("fullWidth"),r.push("value={value}"),r.push("onChange={setValue}"),"<NumberField\n "+r.join("\n ")+"\n/>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[le(h,{sx:{mb:3},children:le(ho,{theme:b,onThemeChange:v,surface:y,onSurfaceChange:S})}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"VARIANT"}),le(k,{direction:"row",spacing:1,children:["outlined","spinner"].map(r=>le(xl,{label:fl(r),selected:e===r,onClick:()=>t(r)},r))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),le(k,{direction:"row",spacing:1,children:["outline","light"].map(e=>le(xl,{label:fl(e),selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{spacing:1.5,children:gl.map(e=>de(h,{children:[le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:e.label}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:e.colors.map(e=>le(bl,{color:e,selected:o===e,onClick:n},e))})]},e.label))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),le(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>le(xl,{label:fl(e),selected:l===e,onClick:()=>s(e)},e))})]}),"outlined"===e&&de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"LABEL"}),le(k,{direction:"row",spacing:1,children:["top","floating","none"].map(e=>le(xl,{label:"none"===e?"None":fl(e),selected:d===e,onClick:()=>c(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Show Label"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Text label above field"})]}),le(en,{variant:"default-outline",checked:u,onChange:e=>p(e.target.checked),size:"small","aria-label":"Show label"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Disabled"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Non-interactive state"})]}),le(en,{variant:"default-outline",checked:m,onChange:e=>f(e.target.checked),size:"small","aria-label":"Disabled"})]}),"outlined"===e&&de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Full Width"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Stretch to container"})]}),le(en,{variant:"default-outline",checked:g,onChange:e=>x(e.target.checked),size:"small","aria-label":"Full width"})]})]})}),le(no,{value:1,children:le(h,{sx:{p:3},children:le(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),le(k,{spacing:0,children:[{label:"Role",value:'role="spinbutton" with aria-valuenow, aria-valuemin, aria-valuemax'},{label:"Label",value:"aria-label from label prop. Always provide a label."},{label:"Keyboard",value:"ArrowUp/Down increment/decrement. Direct text entry supported."},{label:"Steppers",value:'aria-label="Increase" / "Decrease" on stepper buttons'},{label:"Focus",value:"outline: 2px solid var(--Focus-Visible); outline-offset: 2px"},{label:"Disabled",value:"HTML disabled. Steppers also disabled at min/max bounds."}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(oa,{children:[e,":"]}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const yl={color:"var(--Text)",backgroundColor:"transparent",textTransform:"none",fontWeight:500,"&:hover":{backgroundColor:"var(--Hover)"},"&:active":{backgroundColor:"var(--Pressed)"},"&.Mui-focusVisible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px",zIndex:1},"&.Mui-disabled":{color:"var(--Quiet)",opacity:"var(--Disabled, 0.38)"},"&.Mui-selected":{backgroundColor:"var(--Buttons-Primary-Button)",color:"var(--Buttons-Primary-Text)","&:hover":{backgroundColor:"var(--Buttons-Primary-Hover)"},"&:active":{backgroundColor:"var(--Buttons-Primary-Pressed)"}}};function Sl({children:e,selected:r=!1,onChange:t,value:a,sx:i={},...o}){return le(A,{value:a,selected:r,onChange:t,sx:{border:"1px solid var(--Border)",...yl,...i},...o,children:e})}const kl=["default","primary","secondary","tertiary","neutral","black-white","info","success","warning","error"],Bl=["fill","outline","ghost"];function wl(){const e={};return kl.forEach(r=>{Bl.forEach(t=>{e["fill"===t?r:r+"-"+t]=function(e,r){const t=si(e),a={color:e,style:r,bg:"transparent",text:"var(--Quiet)",hover:"var(--Buttons-"+t+"-Hover)",hoverText:"var(--Buttons-"+t+"-Text)",pressed:"var(--Buttons-"+t+"-Pressed)"};return"ghost"===r?{...a,border:"transparent",selectedBg:"transparent",selectedText:"var(--Buttons-"+t+"-Border)",selectedRing:"inset 0 0 0 2px var(--Buttons-"+t+"-Border)",bevel:!1}:"outline"===r?{...a,border:"var(--Buttons-"+t+"-Border)",selectedBg:"transparent",selectedText:"var(--Buttons-"+t+"-Border)",selectedRing:"inset 0 0 0 2px var(--Buttons-"+t+"-Border)",bevel:!1}:{...a,border:"var(--Buttons-"+t+"-Border)",selectedBg:"var(--Buttons-"+t+"-Button)",selectedText:"var(--Buttons-"+t+"-Text)",selectedRing:null,bevel:!0}}(r,t)})}),e}const Cl={small:{height:"var(--Small-Button-Height)",fontSize:"13px",padding:"4px 10px",iconSize:16,gap:4,swatchRadius:"var(--Sm-Input-Swatch-Radius, 18px)"},medium:{height:"var(--Button-Height)",fontSize:"15px",padding:"6px 14px",iconSize:18,gap:6,swatchRadius:"var(--Input-Swatch-Radius, 26px)"},large:{height:"var(--Large-Button-Height)",fontSize:"17px",padding:"8px 18px",iconSize:20,gap:8,swatchRadius:"var(--Lg-Input-Swatch-Radius, 50px)"}};function Tl({variant:e="primary",size:r="medium",value:t,defaultValue:a,onChange:i,exclusive:o=!0,orientation:n="horizontal",disabled:l=!1,fullWidth:s=!1,children:d,className:c="",sx:u={},"aria-label":h,...p}){const m=wl(),f=m[e]||m.default,g=Cl[r]||Cl.medium,x="vertical"===n,b={gap:0,border:"ghost"===f.style?"none":"1px solid "+f.border,borderRadius:"var(--Style-Border-Radius)",overflow:"hidden",...s&&{width:"100%"},display:"grid",gridAutoFlow:x?"row":"column",...x?{gridAutoRows:"1fr"}:{gridAutoColumns:"1fr"},"& .MuiToggleButtonGroup-grouped":{margin:0,borderLeft:0,borderTop:0,"&.Mui-selected + &.Mui-selected":{marginLeft:0,marginTop:0,borderLeft:0,borderTop:0}},"& .MuiToggleButton-root":{height:g.height,fontSize:g.fontSize,padding:g.padding,fontFamily:"inherit",fontWeight:500,textTransform:"none",letterSpacing:"0",lineHeight:1.4,backgroundColor:f.bg,color:f.text,border:"none",borderRadius:0,transition:"background-color 0.15s ease, color 0.15s ease","& .tbtn-start, & .tbtn-end":{display:"inline-flex",alignItems:"center",flexShrink:0,"& > *":{width:g.iconSize,height:g.iconSize,display:"block"}},"& .tbtn-start":{marginRight:"2px"},"& .tbtn-end":{marginLeft:"2px"},"& .tbtn-swatch":{display:"block",flexShrink:0,width:g.iconSize,height:g.iconSize,borderRadius:g.swatchRadius,border:"1px solid var(--Border-Variant)"},"& .tbtn-swatch:not(:only-child)":{marginRight:"2px"},"--_height":g.height,"--_bevel":"var(--Button-Bevel-Px, min(calc(var(--Button-Bevel, 0) * var(--_height) / 100), calc(var(--_height) / 5)))",...s&&{flex:1},..."ghost"===f.style?{}:x?{"&:not(:last-of-type)":{borderBottom:"1px solid "+f.border}}:{"&:not(:last-of-type)":{borderRight:"1px solid "+f.border}},"&:hover":{backgroundColor:f.hover,color:f.hoverText},"&:active":{backgroundColor:f.pressed,color:f.hoverText},"&.Mui-selected":{backgroundColor:f.selectedBg,color:f.selectedText,...f.bevel?{boxShadow:ci(f.color)}:{},...f.selectedRing?{boxShadow:f.selectedRing}:{}},"&.Mui-selected:hover":{backgroundColor:f.selectedRing?"var(--Hover)":f.hover,color:f.selectedText,...f.bevel?{boxShadow:ci(f.color)}:{},...f.selectedRing?{boxShadow:f.selectedRing}:{}},"&.Mui-selected:active":{backgroundColor:f.selectedRing?"var(--Pressed)":f.pressed,color:f.selectedText,...f.bevel?{boxShadow:ci(f.color)}:{},...f.selectedRing?{boxShadow:f.selectedRing}:{}},"&.Mui-focusVisible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"-2px",zIndex:1},"&.Mui-disabled":{opacity:"var(--Disabled, 0.38)",color:f.text,backgroundColor:f.bg},"&.Mui-disabled.Mui-selected":{opacity:.6,backgroundColor:f.selectedBg,color:f.selectedText},"& .MuiSvgIcon-root":{fontSize:g.iconSize},"& > *:not(:only-child)":{marginRight:g.gap/2,marginLeft:g.gap/2}},...u};return le(I,{value:t,defaultValue:a,onChange:i,exclusive:o,orientation:n,disabled:l,className:"toggle-group-"+e+" "+c,sx:b,"aria-label":h,...p,children:d})}const zl=e=>le(Tl,{variant:"default",...e}),Al=e=>le(Tl,{variant:"primary",...e}),Il=e=>le(Tl,{variant:"secondary",...e}),Rl=e=>le(Tl,{variant:"tertiary",...e}),Wl=e=>le(Tl,{variant:"neutral",...e}),Dl=e=>le(Tl,{variant:"black-white",...e}),Pl=e=>le(Tl,{variant:"info",...e}),Fl=e=>le(Tl,{variant:"success",...e}),Ll=e=>le(Tl,{variant:"warning",...e}),Hl=e=>le(Tl,{variant:"error",...e});function Ml({label:e,value:t="",onChange:a,placeholder:i,error:o=!1,errorMessage:n="",disabled:l=!1,helperText:s="",variant:d="outlined",size:c="medium",type:u="text",required:p=!1,fullWidth:m=!0,startAdornment:f,endAdornment:g,sx:x={},"aria-label":b,"aria-labelledby":k,onFocus:B,onBlur:w,...C}){const[T,z]=r(!1),A=o?"var(--Buttons-Error-Border)":T?"var(--Buttons-Primary-Border)":"var(--Border)",I=o||T?"var(--Text)":"var(--Text-Quiet)",R="var(--Text)";return de(h,{sx:{width:m?"100%":"auto"},children:[le(v,{label:e,value:t,onChange:a,placeholder:i,disabled:l,variant:d,size:c,type:u,required:p,onFocus:e=>{z(!0),B?.(e)},onBlur:e=>{z(!1),w?.(e)},error:o,fullWidth:m,slotProps:{htmlInput:{...b?{"aria-label":b}:{},...k?{"aria-labelledby":k}:{}},input:{"data-surface":l?"Container-Low":"Container",style:{color:R},startAdornment:f?le(y,{position:"start",children:f}):void 0,endAdornment:g?le(y,{position:"end",children:g}):void 0}},sx:{width:m?"100%":"auto","& .MuiOutlinedInput-root":{backgroundColor:"var(--Background)",transition:"all 0.2s ease-in-out",color:R,"& fieldset":{borderColor:A,transition:"border-color 0.2s ease-in-out"},"&:hover fieldset":{borderColor:o?"var(--Buttons-Error-Border)":"var(--Buttons-Primary-Border)"},"&.Mui-focused fieldset":{borderColor:o?"var(--Buttons-Error-Border)":"var(--Buttons-Primary-Border)",borderWidth:"2px"},"&.Mui-disabled":{backgroundColor:"var(--Background)",opacity:"var(--Disabled, 0.38)"}},"& .MuiInputLabel-root":{color:I,transition:"all 0.2s ease-in-out",fontSize:"14px",fontWeight:500,"&.Mui-focused":{color:"var(--Text)",fontWeight:600},"&.Mui-error":{color:"var(--Text)"},"&.Mui-disabled":{color:"var(--Text-Secondary)",opacity:"var(--Disabled, 0.38)"}},"& .MuiFormHelperText-root":{color:o?"var(--Buttons-Error-Border)":"var(--Text-Secondary)",marginTop:"4px",fontSize:"12px"},...x},...C}),o&&n&&le(S,{error:!0,sx:{color:"var(--Buttons-Error-Border)",marginTop:"4px",fontSize:"12px",fontWeight:500},children:n})]})}function El({label:e="Email",...r}){return le(Ml,{label:e,type:"email",placeholder:"user@example.com",...r})}function Ol({label:e="Password",...r}){return le(Ml,{label:e,type:"password",...r})}function Nl({label:e="Search",placeholder:r="Type to search...",...t}){return le(Ml,{label:e,type:"search",placeholder:r,...t})}function Ql({label:e="Number",...r}){return le(Ml,{label:e,type:"number",...r})}function Vl({label:e="Phone",placeholder:r="(555) 123-4567",...t}){return le(Ml,{label:e,type:"tel",placeholder:r,...t})}function jl({label:e="Website",placeholder:r="https://example.com",...t}){return le(Ml,{label:e,type:"url",placeholder:r,...t})}function Gl({error:e=!1,errorMessage:r="",rows:t=4,fullWidth:a=!0,...i}){return le(Xi,{multiline:!0,rows:t,fullWidth:a,...e&&{validation:"error",validationMessage:r},...i})}function Ul({fields:e=[],spacing:r=2,sx:t={},...a}){return le(h,{sx:{display:"flex",flexDirection:"column",gap:`var(--Spacing-${r})`,width:"100%",...t},...a,children:e.map(e=>le(Ml,{...e},e.id))})}const Xl=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",Yl=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}],ql=[{value:"apple",label:"Apple"},{value:"banana",label:"Banana"},{value:"cherry",label:"Cherry"},{value:"date",label:"Date"},{value:"elderberry",label:"Elderberry"}],Zl=[{value:"primary",label:"Primary",color:"var(--Buttons-Primary-Button)"},{value:"secondary",label:"Secondary",color:"var(--Buttons-Secondary-Button)"},{value:"tertiary",label:"Tertiary",color:"var(--Buttons-Tertiary-Button)"},{value:"neutral",label:"Neutral",color:"var(--Buttons-Neutral-Button)"},{value:"info",label:"Info",color:"var(--Buttons-Info-Button)"},{value:"success",label:"Success",color:"var(--Buttons-Success-Button)"},{value:"warning",label:"Warning",color:"var(--Buttons-Warning-Button)"},{value:"error",label:"Error",color:"var(--Buttons-Error-Button)"}];function Jl({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Kl({color:e,selected:r,onClick:t}){const a=Xl(e);return le(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&le(ue,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function $l(){const[e,t]=r("outline"),[a,i]=r("default"),[o,n]=r("medium"),[l,s]=r("top"),[d,c]=r("Fruit"),[u,p]=r(!1),[m,f]=r(!1),[g,x]=r(!0),[b,v]=r(!1),[y,S]=r("Search"),[B,w]=r(""),[T,z]=r(null),[A,I]=r("Surface"),[R,W]=r(!1),[D,P]=r(!0);return de(h,{sx:{pb:8},children:[le(qt,{children:"Select"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{theme:T,surface:A,children:le(h,{sx:{width:"100%",maxWidth:360},children:le(Ji,{variant:e,color:a,size:o,label:d,labelPosition:l,mode:R?"color":void 0,showColorLabels:R?D:void 0,options:R?Zl:ql,value:B,onChange:w,showDividers:u,disabled:m,fullWidth:g,startDecoration:b?(()=>{const e=zr[y]||zr.Search;return le(Na,{size:"small",children:le(e,{})})})():void 0})})}),le(No,{code:(()=>{const r=[];return"outline"!==e&&r.push('variant="'+e+'"'),"default"!==a&&r.push('color="'+a+'"'),"medium"!==o&&r.push('size="'+o+'"'),d&&r.push('label="'+d+'"'),"top"!==l&&r.push('labelPosition="'+l+'"'),R&&r.push('mode="color"'),R&&!D&&r.push("showColorLabels={false}"),u&&r.push("showDividers"),m&&r.push("disabled"),g&&r.push("fullWidth"),b&&r.push("startDecoration={<Icon><"+y+"Icon /></Icon>}"),r.push("options={options}"),r.push("value={value}"),r.push("onChange={setValue}"),"<Select\n "+r.join("\n ")+"\n/>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[le(h,{sx:{mb:3},children:le(ho,{theme:T,onThemeChange:z,surface:A,onSurfaceChange:I})}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),le(k,{direction:"row",spacing:1,children:["outline","light"].map(r=>le(Jl,{label:Xl(r),selected:e===r,onClick:()=>t(r)},r))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{spacing:1.5,children:Yl.map(e=>de(h,{children:[le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:e.label}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:e.colors.map(e=>le(Kl,{color:e,selected:a===e,onClick:i},e))})]},e.label))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),le(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>le(Jl,{label:Xl(e),selected:o===e,onClick:()=>n(e)},e))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"LABEL"}),le(k,{direction:"row",spacing:1,children:["top","floating","none"].map(e=>le(Jl,{label:"none"===e?"None":Xl(e),selected:l===e,onClick:()=>s(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Start Icon"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Icon rendered before the value"})]}),le(en,{checked:b,onChange:e=>v(e.target.checked),size:"small","aria-label":"Start icon"})]}),b&&de(h,{sx:{mt:2},children:[le(Xi,{label:"Icon Name",value:y,onChange:e=>S(e.target.value),placeholder:"Search",variant:"primary-outline",size:"small",fullWidth:!0}),de(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:4},children:[le("a",{href:"https://mui.com/material-ui/material-icons/",target:"_blank",rel:"noopener noreferrer",style:{color:"var(--Hotlink)"},children:"Material icon"})," name (e.g. Search, Add, Edit, Filter, Sort, Star)"]})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Dividers"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Lines between options"})]}),le(en,{checked:u,onChange:e=>p(e.target.checked),size:"small","aria-label":"Show dividers"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Disabled"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Non-interactive state"})]}),le(en,{checked:m,onChange:e=>f(e.target.checked),size:"small","aria-label":"Disabled"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Color Mode"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Render swatches alongside each option. Swatch size scales to Select height, radius follows the brand's button radius."})]}),le(en,{checked:R,onChange:e=>W(e.target.checked),size:"small","aria-label":"Color mode"})]}),R&&de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Show Color Labels"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Hide to render a swatch-only trigger (no text). Useful for compact color pickers."})]}),le(en,{checked:D,onChange:e=>P(e.target.checked),size:"small","aria-label":"Show color labels"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Full Width"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Stretch to container width"})]}),le(en,{checked:g,onChange:e=>x(e.target.checked),size:"small","aria-label":"Full width"})]})]})}),le(no,{value:1,children:le(h,{sx:{p:3},children:le(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),le(k,{spacing:0,children:[{label:"Trigger",value:'role="combobox" aria-expanded="true|false" aria-haspopup="listbox"'},{label:"Dropdown",value:'role="listbox" aria-label="..."'},{label:"Options",value:'role="option" aria-selected="true|false"'},{label:"Label",value:"aria-label from label prop. Always provide a label."},{label:"Keyboard",value:"Enter/Space opens. Escape closes. Arrow keys when open."},{label:"Focus",value:"outline: 2px solid var(--Focus-Visible); outline-offset: 2px (on outer shell)"}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(oa,{children:[e,":"]}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const _l={small:{height:"var(--Small-Button-Height)",fontSize:"13px",padding:"4px 8px",iconSize:16},medium:{height:"var(--Button-Height)",fontSize:"14px",padding:"6px 12px",iconSize:18},large:{height:"var(--Large-Button-Height)",fontSize:"16px",padding:"8px 16px",iconSize:20}},es={small:{height:"48px",fontSize:"13px",padding:"20px 12px 4px",leftPad:12},medium:{height:"56px",fontSize:"14px",padding:"22px 14px 6px",leftPad:14},large:{height:"64px",fontSize:"16px",padding:"24px 16px 6px",leftPad:16}};function rs({options:e=[],value:t,defaultValue:n=null,onChange:l,inputValue:s,onInputChange:d,label:c,labelPosition:u="top",placeholder:p="Type to search",helperText:m,size:f="medium",variant:g="outline",color:x="primary",loading:b=!1,loadingText:v="Loading…",noOptionsText:y="No options",freeSolo:S=!1,clearable:k=!0,disabled:B=!1,fullWidth:w=!1,className:C="",sx:T={},...z}){const A=(I="default"===x?"primary":x).charAt(0).toUpperCase()+I.slice(1);var I;"production"!==process.env.NODE_ENV&&"light"===g&&console.warn('[Autocomplete] variant="light" was removed and had never done anything — it was read by no code path. For a lighter Autocomplete use data-surface="Surface-Brightest" on its container.');const R="light"===g?"outline":g,W="var(--Buttons-"+A+"-Border)",D="default"===x?"var(--Text)":"var(--Text-"+A+")",[P,F]=r(n),[L,H]=r(n?"string"==typeof n?n:n.label||"":""),[M,E]=r(!1),[O,N]=r(!1),[Q,V]=r(-1),j=a(null),G=a(null),U=void 0!==t,X=void 0!==s,Y=U?t:P,q=X?s:L,Z="floating"===u,J="top"===u,K=""!==q,$=Z?es[f]||es.medium:_l[f]||_l.medium,_=q?e.filter(e=>("string"==typeof e?e:e.label).toLowerCase().includes(q.toLowerCase())):e,ee=i(e=>{X||H(e),d?.(e)},[X,d]),re=i(e=>{const r="string"==typeof e?e:e.label;U||F(e),ee(r),l?.(e),E(!1),V(-1),G.current?.focus()},[U,l,ee]);o(()=>{if(!M)return;const e=e=>{j.current&&!j.current.contains(e.target)&&E(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[M]);return de(h,{ref:j,className:"autocomplete autocomplete-"+f+" autocomplete-variant-"+R+(M?" autocomplete-open":"")+(B?" autocomplete-disabled":"")+(C?" "+C:""),sx:{position:"relative",width:w?"100%":"auto",display:"inline-block",fontFamily:"inherit",...T},...z,children:[J&&c&&le("small"===f?oa:sa,{component:"label",style:{display:"block",marginBottom:"6px",color:B?"var(--Quiet)":"var(--Text)",fontWeight:500,opacity:B?"var(--Disabled, 0.38)":1},children:c}),le(h,{sx:{border:"1px solid "+W,borderRadius:"small"===f?"var(--Sm-Input-Radius, var(--Input-Radius, var(--Style-Border-Radius)))":"large"===f?"var(--Lg-Input-Radius, var(--Input-Radius, var(--Style-Border-Radius)))":"var(--Input-Radius, var(--Style-Border-Radius))",overflow:"hidden",transition:"border-color 0.15s ease",boxShadow:"none",opacity:B?"var(--Disabled, 0.38)":1,"&:focus-within":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"}},children:le(h,{children:de(h,{sx:{position:"relative",display:"flex",alignItems:"center",minHeight:$.height,backgroundColor:"var(--Hover)"},children:[Z&&c&&le(h,{sx:{position:"absolute",top:K||O?"6px":"50%",left:($.leftPad||14)+"px",transform:K||O?"scale(0.75)":"translateY(-50%)",transformOrigin:"top left",color:O?D:"var(--Quiet)",fontSize:$.fontSize,fontWeight:400,pointerEvents:"none",zIndex:1,transition:"top 0.15s ease, transform 0.15s ease, color 0.15s ease"},children:c}),le(h,{component:"input",ref:G,type:"text",role:"combobox","aria-expanded":M,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-label":c||p,autoComplete:"off",value:q,onChange:e=>{ee(e.target.value),M||E(!0),V(-1)},onKeyDown:e=>{if("Escape"!==e.key){if("ArrowDown"===e.key){if(e.preventDefault(),!M)return void E(!0);V(e=>Math.min(e+1,_.length-1))}"ArrowUp"===e.key&&(e.preventDefault(),V(e=>Math.max(e-1,0))),"Enter"===e.key&&M&&Q>=0&&_[Q]&&(e.preventDefault(),re(_[Q]))}else E(!1)},onFocus:()=>{N(!0),E(!0)},onBlur:()=>N(!1),disabled:B,placeholder:Z?void 0:p,sx:{flex:1,border:"none",outline:"none",backgroundColor:"transparent",color:K||O?D:"var(--Quiet)",fontSize:$.fontSize,fontFamily:"var(--Body-Font-Family)",fontWeight:"var(--Body-Font-Weight)",padding:$.padding,minWidth:0,"&::placeholder":{color:"var(--Quiet)",opacity:1,fontFamily:"var(--Body-Font-Family)",fontWeight:"var(--Body-Font-Weight)"},"&:disabled":{cursor:"not-allowed"}}}),b&&M&&le(Or,{size:16,sx:{mr:1,color:"var(--Quiet)"}}),k&&q&&!B&&le(h,{component:"button",type:"button","aria-label":"Clear",onClick:()=>{U||F(null),ee(""),l?.(null),G.current?.focus()},sx:{display:"flex",alignItems:"center",justifyContent:"center",width:20,height:20,borderRadius:"50%",mr:.5,border:"none",backgroundColor:"transparent",color:"var(--Quiet)",cursor:"pointer","&:hover":{color:"var(--Text)",backgroundColor:"var(--Hover)"},"&:focus-visible":{outline:"2px solid var(--Focus-Visible)"}},children:le(Wr,{sx:{fontSize:14}})}),le(h,{component:"button",type:"button","aria-label":M?"Close":"Open",tabIndex:-1,onClick:()=>{B||E(!M)},sx:{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:"100%",border:"none",backgroundColor:"transparent",color:"var(--Quiet)",cursor:B?"not-allowed":"pointer"},children:le(ve,{sx:{fontSize:($.iconSize||18)+"px",transform:M?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}})})]})})}),m&&le(h,{sx:{fontSize:"12px",color:"var(--Quiet)",mt:"4px",ml:"2px"},children:m}),M&&le(h,{role:"listbox","aria-label":c||"Options",sx:{position:"absolute",top:"100%",left:0,right:0,mt:.5,backgroundColor:"var(--Hover)",border:"1px solid var(--Buttons-Default-Border)",borderRadius:"var(--Style-Border-Radius)",boxShadow:"none",zIndex:9999,maxHeight:240,overflowY:"auto",py:.5},children:b?le(h,{sx:{px:1.5,py:2,textAlign:"center",fontSize:$.fontSize,color:"var(--Quiet)"},children:v}):0===_.length?le(h,{sx:{px:1.5,py:2,textAlign:"center",fontSize:$.fontSize,color:"var(--Quiet)"},children:y}):_.map((e,r)=>{const t="string"==typeof e?e:e.label,a="string"==typeof e?e:e.value,i=t===(Y?"string"==typeof Y?Y:Y.label:null),o=function(e,r){return r?{backgroundColor:"transparent",color:"var(--Text)",fontWeight:600}:e?{backgroundColor:"var(--Hover)",color:"var(--Text)"}:{backgroundColor:"transparent",color:"var(--Text-Quiet)"}}(r===Q,i);return de(h,{role:"option","aria-selected":i,onClick:()=>re(e),onMouseEnter:()=>V(r),sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:0,mx:.5,minHeight:$.height,borderRadius:"4px",cursor:"pointer",fontSize:$.fontSize,fontFamily:"inherit",...o,transition:"background-color 0.1s ease","&:active":{backgroundColor:"var(--Pressed)"}},children:[le(oa,{style:{flex:1,color:"inherit",fontWeight:"inherit"},children:t}),i&&le(Na,{size:"small",sx:{opacity:.6,flexShrink:0},children:le(ue,{})})]},a||t)})})]})}const ts=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",as=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}],is=[{value:"apple",label:"Apple"},{value:"banana",label:"Banana"},{value:"cherry",label:"Cherry"},{value:"date",label:"Date"},{value:"elderberry",label:"Elderberry"},{value:"fig",label:"Fig"},{value:"grape",label:"Grape"}];function os({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function ns({color:e,selected:r,onClick:t}){const a=ts(e);return le(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&le(ue,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function ls(){const[e,t]=r("outline"),[a,i]=r("default"),[o,n]=r("medium"),[l,s]=r("top"),[d,c]=r("Fruit"),[u,p]=r(!0),[m,f]=r(!1),[g,x]=r(!0),[b,v]=r(null),[y,S]=r("Surface");return de(h,{sx:{pb:8},children:[le(qt,{children:"Autocomplete"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{theme:b,surface:y,children:le(h,{sx:{width:"100%",maxWidth:360},children:le(rs,{variant:e,color:a,size:o,label:d,labelPosition:l,options:is,clearable:u,disabled:m,fullWidth:g})})}),le(No,{code:(()=>{const r=[];return"outline"!==e&&r.push('variant="'+e+'"'),"default"!==a&&r.push('color="'+a+'"'),"medium"!==o&&r.push('size="'+o+'"'),d&&r.push('label="'+d+'"'),"top"!==l&&r.push('labelPosition="'+l+'"'),u||r.push("clearable={false}"),m&&r.push("disabled"),g&&r.push("fullWidth"),r.push("options={options}"),r.push("onChange={handleChange}"),"<Autocomplete\n "+r.join("\n ")+"\n/>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[le(h,{sx:{mb:3},children:le(ho,{theme:b,onThemeChange:v,surface:y,onSurfaceChange:S})}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),le(k,{direction:"row",spacing:1,children:["outline","light"].map(r=>le(os,{label:ts(r),selected:e===r,onClick:()=>t(r)},r))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{spacing:1.5,children:as.map(e=>de(h,{children:[le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:e.label}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:e.colors.map(e=>le(ns,{color:e,selected:a===e,onClick:i},e))})]},e.label))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),le(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>le(os,{label:ts(e),selected:o===e,onClick:()=>n(e)},e))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"LABEL"}),le(k,{direction:"row",spacing:1,children:["top","floating","none"].map(e=>le(os,{label:"none"===e?"None":ts(e),selected:l===e,onClick:()=>s(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Clearable"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Show clear button when has value"})]}),le(en,{checked:u,onChange:e=>p(e.target.checked),size:"small","aria-label":"Clearable"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Disabled"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Non-interactive state"})]}),le(en,{checked:m,onChange:e=>f(e.target.checked),size:"small","aria-label":"Disabled"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Full Width"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Stretch to container width"})]}),le(en,{checked:g,onChange:e=>x(e.target.checked),size:"small","aria-label":"Full width"})]})]})}),le(no,{value:1,children:le(h,{sx:{p:3},children:le(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),le(k,{spacing:0,children:[{label:"Input",value:'role="combobox" aria-expanded aria-haspopup="listbox" aria-autocomplete="list"'},{label:"Dropdown",value:'role="listbox" aria-label="..."'},{label:"Options",value:'role="option" aria-selected="true|false"'},{label:"Label",value:"aria-label from label prop. Always provide a label."},{label:"Keyboard",value:"Arrow keys navigate, Enter selects, Escape closes."},{label:"Focus",value:"outline: 2px solid var(--Focus-Visible); outline-offset: 2px (on outer shell)"}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(oa,{children:[e,":"]}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const ss=["default","primary","secondary","tertiary","neutral","info","success","warning","error","black-white"],ds=si,cs={small:{touchTarget:24,box:16,dot:8,gap:4,LabelComp:oa},medium:{touchTarget:24,box:20,dot:9.5,gap:8,LabelComp:sa},large:{touchTarget:24,box:24,dot:9.5,gap:12,LabelComp:pa}};function us({size:e,color:r,checked:t}){const a=ds(r),i="Default"===a?"var(--Quiet)":"var(--Buttons-"+a+"-Border)",o="var(--Buttons-"+a+"-Border)",n=cs[e]||cs.medium;return le(h,{className:"radio-circle-icon",sx:{width:n.box,height:n.box,boxSizing:"border-box",borderRadius:"50%",border:"2px solid "+i,overflow:"hidden",flexShrink:0,backgroundColor:"var(--Background)",display:"flex",alignItems:"center",justifyContent:"center",transition:"border-color 0.15s ease-in-out"},children:t&&le(h,{sx:{width:n.dot,height:n.dot,borderRadius:"50%",backgroundColor:o,transition:"transform 0.15s ease-in-out"}})})}function hs({color:e="primary",size:r="medium",label:t,labelPlacement:a="end",checked:i,disabled:o=!1,onChange:n,name:l,value:s,className:d="",sx:c={},"aria-label":u,"aria-labelledby":h,"aria-describedby":p,inputProps:m={},...f}){const g=ss.includes(e)?e:"primary",x=cs[r]||cs.medium,v=x.LabelComp,y=(x.touchTarget-x.box)/2,S={...m,...u&&{"aria-label":u},...h&&{"aria-labelledby":h},...p&&{"aria-describedby":p}},k=le(R,{checked:i,disabled:o,onChange:n,name:l,value:s,icon:le(us,{size:r,color:g,checked:!1}),checkedIcon:le(us,{size:r,color:g,checked:!0}),className:"radio-"+g+" "+d,inputProps:S,disableRipple:!0,sx:{padding:y+"px",width:x.touchTarget,height:x.touchTarget,minWidth:x.touchTarget,minHeight:x.touchTarget,boxSizing:"border-box",borderRadius:"50%",color:"inherit",transition:"background-color 0.15s ease-in-out","&.Mui-checked":{color:"inherit"},"&:hover":{backgroundColor:"transparent"},"&:hover .radio-circle-icon":{borderColor:"var(--Text)"},"&:active .radio-circle-icon":{borderColor:"var(--Text)",backgroundColor:"var(--Pressed)"},"&.Mui-disabled .radio-circle-icon":{opacity:"var(--Disabled, 0.38)"},"&.Mui-focusVisible .radio-circle-icon":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"},"&.Mui-disabled":{opacity:"var(--Disabled, 0.38)",cursor:"not-allowed",pointerEvents:"none"},...c},...f});return t?le(b,{control:k,label:le(v,{component:"span",sx:{color:o?"var(--Text-Quiet)":"var(--Text)",lineHeight:1.4,userSelect:"none"},children:t}),labelPlacement:a,disabled:o,sx:{marginLeft:0,marginRight:0,gap:x.gap+"px",alignItems:"center","&.Mui-disabled .MuiTypography-root":{color:"var(--Text-Quiet)",opacity:.6}}}):k}function ps({color:e="primary",size:r="medium",label:t,options:a=[],value:i,onChange:o,orientation:n="vertical",labelPlacement:l="end",disabled:s=!1,spacing:d=1,name:c,className:u="",sx:h={},"aria-label":p,"aria-labelledby":m,...f}){return de(W,{component:"fieldset",disabled:s,className:"radio-group-"+e+" "+u,sx:h,children:[t&&le(D,{component:"legend",sx:{color:s?"var(--Text-Quiet)":"var(--Text)",fontSize:"small"===r?"13px":"15px",fontWeight:500,mb:1,"&.Mui-focused":{color:"var(--Text)"},"&.Mui-disabled":{color:"var(--Text-Quiet)",opacity:"var(--Disabled, 0.38)"}},children:t}),le(P,{value:i,onChange:o,name:c,"aria-label":p,"aria-labelledby":m,row:"horizontal"===n,sx:{display:"flex",flexDirection:"horizontal"===n?"row":"column",flexWrap:"horizontal"===n?"wrap":"nowrap",alignItems:"horizontal"===n?"center":"flex-start",gap:d},...f,children:a.map(t=>le(hs,{color:e,size:r,label:t.label,labelPlacement:l,value:t.value,disabled:t.disabled||s},t.value))})]})}const ms=hs,fs=["default","primary","secondary","tertiary","neutral","info","success","warning","error"];const gs={small:{visual:12,track:2,labelSize:11},medium:{visual:16,track:4,labelSize:12},large:{visual:20,track:6,labelSize:13}};function xs({variant:e="primary",size:r="medium",value:t,defaultValue:a,onChange:i,onChangeCommitted:o,min:n=0,max:l=100,step:s=1,marks:d=!1,valueLabelDisplay:c="off",orientation:u="horizontal",track:p="normal",disabled:m=!1,label:f,name:g,className:x="",sx:b={},"aria-label":v,"aria-labelledby":y,...S}){const k=function(){const e={};return fs.forEach(r=>{e[r]=function(e){const r=(t=e).charAt(0).toUpperCase()+t.slice(1);var t;return{thumb:"var(--Border)",thumbBorder:"1px solid var(--Background)",track:"default"===e?"var(--Button)":"var(--Buttons-"+r+"-Button)",trackBorder:"1px solid var(--Border)",rail:"var(--Background)",railBorder:"1px solid var(--Border)",valueLabel:"var(--Text)",valueLabelText:"var(--Background)"}}(r)}),e}(),B=k[e]||k.primary,w=gs[r]||gs.medium,C="vertical"===u,T=Array.isArray(t)||Array.isArray(a),z="inverted"===p,A="small"===r?oa:sa,I=w.track+2,R=z?B.track:B.rail,W=B.railBorder,D=z?B.rail:B.track,P=B.trackBorder,L={color:"transparent"===B.track?B.thumb:B.track,height:C?void 0:I,width:C?I:void 0,"& .MuiSlider-rail":{backgroundColor:R,border:W||"none",boxSizing:W?"content-box":"border-box",opacity:1,height:C?void 0:W?w.track:I,width:C?W?w.track:I:void 0,borderRadius:I/2},"& .MuiSlider-track":{boxSizing:P?"content-box":"border-box",backgroundColor:D,border:P||"none",height:C?void 0:P?w.track:I,width:C?P?w.track:I:void 0,borderRadius:I/2},"& .MuiSlider-thumb":{width:24,height:24,backgroundColor:"transparent",border:"none",boxShadow:"none",transition:"none","--_height":w.visual+"px","--_bevel":"min(calc(var(--Button-Bevel) * var(--_height) / 100), calc(var(--_height) / 5))","&::after":{display:"none"},"&::before":{content:'""',position:"absolute",width:w.visual,height:w.visual,borderRadius:"50%",backgroundColor:B.thumb,border:B.thumbBorder||"none",boxShadow:`${ci(e)}, ${ri}`,transition:"box-shadow 0.15s ease-in-out",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},"&:hover::before":{boxShadow:`${ci(e)}, ${ti}`},"&.Mui-focusVisible::before, &:focus-visible::before":{boxShadow:`${ci(e)}, ${ti}, 0 0 0 1px var(--Focus-Visible)`},"&.Mui-active::before":{boxShadow:ci(e)},"&.Mui-focusVisible":{outline:"none",borderRadius:"50%"},"&.Mui-focusVisible::before":{boxShadow:`${ci(e)}, ${ti}`}},...T?C?{'& .MuiSlider-thumb[data-index="0"]::before':{top:0,left:"50%",transform:"translateX(-50%)"},'& .MuiSlider-thumb[data-index="1"]::before':{top:"auto",bottom:0,left:"50%",transform:"translateX(-50%)"}}:{'& .MuiSlider-thumb[data-index="0"]::before':{left:"auto",right:0,top:"50%",transform:"translateY(-50%)"},'& .MuiSlider-thumb[data-index="1"]::before':{left:0,right:"auto",top:"50%",transform:"translateY(-50%)"}}:{},"& .MuiSlider-valueLabel":{backgroundColor:B.valueLabel,color:B.valueLabelText,fontFamily:"var(--Font-Families-Body, var(--Body-Font-Family))",fontSize:"var(--Label-ExtraSmall-Font-Size)",fontWeight:"var(--Label-ExtraSmall-Font-Weight)",letterSpacing:"var(--Label-ExtraSmall-Letter-Spacing)",lineHeight:"var(--Label-ExtraSmall-Line-Height)",borderRadius:"var(--Sizing-1, 8px)",padding:"var(--Sizing-Half, 4px) var(--Sizing-1, 8px)","&::before":{backgroundColor:B.valueLabel}},"& .MuiSlider-mark":{backgroundColor:B.rail,width:C?I:2,height:C?2:I,borderRadius:1},"& .MuiSlider-markActive":{backgroundColor:B.thumb,opacity:.6},"& .MuiSlider-markLabel":{color:"var(--Text-Quiet)",fontSize:w.labelSize},"&.Mui-disabled":{opacity:"var(--Disabled, 0.38)",cursor:"not-allowed",pointerEvents:"none","& .MuiSlider-thumb::before":{boxShadow:"none"}},...b},H=le(F,{value:t,defaultValue:a,onChange:i,onChangeCommitted:o,min:n,max:l,step:s,marks:d,valueLabelDisplay:c,orientation:u,track:"inverted"===p?"inverted":!1!==p&&"normal",disabled:m,name:g,"aria-label":v,"aria-labelledby":y,slotProps:m?{input:{"aria-disabled":"true"}}:void 0,className:"slider-"+e+" "+x,sx:L,...S});return f?de(h,{sx:{width:C?"auto":"100%",height:C?"100%":"auto",display:"flex",flexDirection:"column",gap:"4px"},children:[le(A,{component:"label",sx:{color:m?"var(--Text-Quiet)":"var(--Text)",fontSize:"small"===r?"13px":"15px",fontWeight:500,opacity:m?"var(--Disabled, 0.38)":1},children:f}),H]}):H}const bs=xs,vs=xs,ys={default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},Ss={small:{iconSize:16,minHit:24,gap:0,focusInset:-3,focusWidth:3},medium:{iconSize:24,minHit:24,gap:0,focusInset:-3,focusWidth:3},large:{iconSize:36,minHit:void 0,gap:2,focusInset:2,focusWidth:2}};function ks({value:e,defaultValue:t,onChange:a,max:i=5,precision:o=1,color:n="default",size:l="medium",readOnly:s=!1,disabled:d=!1,emptyLabel:c="No rating",className:u="",sx:p={},...m}){const[f,g]=r(t??null),[x,b]=r(null),v=void 0!==e,y=v?e:f,S=null!==x?x:y,k=.5===o,B=!s&&!d,w=ys[n]||ys.default,C=Ss[l]||Ss.medium,T="var(--Buttons-"+w+"-Button)",z="var(--Buttons-"+w+"-Border)",A=e=>{if(!B)return;const r=e===y?null:e;v||g(r),a?.(r)},I=(e,r)=>{if(!B||!k)return;b(r?e+.5:e+1)},R=B?{"&:hover":{filter:"drop-shadow(0 2px 4px rgba(var(--Dropshadow-Color), 0.22)) drop-shadow(0 1px 2px rgba(var(--Dropshadow-Color), 0.28))","& .MuiSvgIcon-root":{stroke:"var(--Buttons-"+w+"-Border)",strokeWidth:1}}}:{},W=e=>{const r=e+1,t=e+.5,a=null!==S&&r<=S,n=null!==S&&!a&&k&&t<=S,l=n?Nr:Ce,s=((e,r)=>e||r?{color:T,filter:"drop-shadow(0 1px 2px rgba(var(--Dropshadow-Color), 0.28))",transition:"filter 0.15s ease","& .MuiSvgIcon-root":{stroke:z,strokeWidth:.5}}:{color:"transparent","& .MuiSvgIcon-root":{stroke:"var(--Quiet)",strokeWidth:1}})(a,n);return k&&B?de(h,{sx:{position:"relative",display:"inline-flex",cursor:"pointer",...s,...R},onMouseLeave:()=>b(null),children:[le(h,{sx:{position:"absolute",left:0,top:0,width:"50%",height:"100%",zIndex:1,cursor:"pointer"},onMouseEnter:()=>I(e,!0),onClick:()=>A(t)}),le(h,{sx:{position:"absolute",right:0,top:0,width:"50%",height:"100%",zIndex:1,cursor:"pointer"},onMouseEnter:()=>I(e,!1),onClick:()=>A(r)}),le(l,{sx:{fontSize:C.iconSize,transition:"color 0.1s ease, filter 0.1s ease"}})]},e):le(h,{component:B?"button":"span",type:B?"button":void 0,role:B?"radio":void 0,"aria-checked":a,"aria-label":r+" star"+(1!==r?"s":""),tabIndex:B?0:-1,onClick:()=>A(r),onMouseEnter:()=>B&&b(r),onMouseLeave:()=>B&&b(null),onKeyDown:e=>{if(B&&("ArrowRight"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),A(Math.min((y||0)+o,i))),"ArrowLeft"===e.key||"ArrowDown"===e.key)){e.preventDefault();const r=Math.max((y||0)-o,0);A(r||null)}},sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none",backgroundColor:"transparent",padding:0,...C.minHit&&{minWidth:C.minHit+"px",minHeight:C.minHit+"px"},cursor:d?"not-allowed":B?"pointer":"default",outline:"none",transition:"transform 0.1s ease",...s,...R,"&:active":B?{transform:"scale(0.95)"}:{},"&:focus-visible":B?{outline:C.focusWidth+"px solid var(--Focus-Visible)",outlineOffset:C.focusInset+"px",borderRadius:"2px"}:{},"&:disabled":{cursor:"not-allowed",opacity:"var(--Disabled, 0.38)"}},children:le(l,{sx:{fontSize:C.iconSize,transition:"color 0.1s ease, filter 0.1s ease"}})},e)};return de(h,{role:B?"radiogroup":"img","aria-label":"Rating"+(null!==y?": "+y+" of "+i+" stars":": "+c),className:"rating rating-"+n+" rating-"+l+(s?" rating-readonly":"")+(d?" rating-disabled":"")+(null===y?" rating-empty":"")+(u?" "+u:""),sx:{display:"inline-flex",alignItems:"center",gap:C.gap+"px",opacity:d?"var(--Disabled, 0.38)":1,fontFamily:"inherit",...p},...m,children:[Array.from({length:i},(e,r)=>W(r)),null===y&&!x&&le(ga,{style:{color:"var(--Quiet)",marginLeft:4},children:c})]})}const Bs={small:{height:"var(--Small-Button-Height)",fontSize:"13px",iconSize:18,px:12},medium:{height:"var(--Button-Height)",fontSize:"14px",iconSize:20,px:16},large:{height:"var(--Large-Button-Height)",fontSize:"15px",iconSize:22,px:16}};function ws({value:e,defaultValue:t="",onChange:i,onFocus:o,onBlur:n,onClear:l,onSubmit:s,placeholder:d="Search…",size:c="medium",color:u="default",showClearButton:p=!0,disabled:m=!1,ariaLabel:f="Search",className:g="",sx:x={},...b}){const[v,y]=r(t),[S,k]=r(!1),B=a(null),w=void 0!==e,C=w?e:v,T=C.length>0,z=S||T,A=(e=>e.charAt(0).toUpperCase()+e.slice(1))("default"===u?"primary":u),I="default"===u?"var(--Text)":"var(--Text-"+A+")",R=Bs[c]||Bs.medium,W=()=>{w||y(""),i?.(""),l?.(),B.current?.focus()};return le(h,{className:"search-field search-field-"+c+(S?" search-field-focused":"")+(T?" search-field-filled":"")+(m?" search-field-disabled":"")+(g?" "+g:""),sx:{display:"flex",boxSizing:"border-box",...x},...b,children:le(h,{sx:{border:"1px solid "+("var(--Buttons-"+A+"-Border)"),borderRadius:"small"===c?"var(--Sm-Input-Radius, var(--Input-Radius, var(--Style-Border-Radius)))":"large"===c?"var(--Lg-Input-Radius, var(--Input-Radius, var(--Style-Border-Radius)))":"var(--Input-Radius, var(--Style-Border-Radius))",overflow:"hidden",opacity:m?"var(--Disabled, 0.38)":1,transition:"border-color 0.15s ease, box-shadow 0.15s ease",boxShadow:"none",width:"100%",...!m&&{"&:hover":{borderColor:"var(--Buttons-"+A+"-Hover)"},"&:active":{borderColor:"var(--Buttons-"+A+"-Pressed)"}},"&:focus-within":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"}},children:de(h,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%",boxSizing:"border-box",minHeight:R.height,px:R.px+"px",backgroundColor:"var(--Hover)"},children:[le(Na,{size:"small",sx:{color:z?I:"var(--Quiet)",flexShrink:0,transition:"color 0.15s ease"},children:le(we,{})}),le(h,{component:"input",ref:B,type:"text",role:"searchbox","aria-label":f,value:C,onChange:e=>{const r=e.target.value;w||y(r),i?.(r,e)},onFocus:e=>{k(!0),o?.(e)},onBlur:e=>{k(!1),n?.(e)},onKeyDown:e=>{"Enter"===e.key&&s?.(C,e),"Escape"===e.key&&T&&W()},placeholder:d,disabled:m,sx:{flex:1,border:"none",outline:"none",backgroundColor:"transparent",color:z?I:"var(--Quiet)",fontSize:R.fontSize,fontFamily:"var(--Body-Font-Family)",fontWeight:"var(--Body-Font-Weight)",minWidth:0,"&::placeholder":{color:"var(--Quiet)",opacity:1,fontFamily:"var(--Body-Font-Family)",fontWeight:"var(--Body-Font-Weight)"},"&:disabled":{cursor:"not-allowed"}}}),p&&T&&!m&&le(h,{component:"button",type:"button","aria-label":"Clear search",onClick:W,sx:{display:"flex",alignItems:"center",justifyContent:"center",width:R.iconSize+4,height:R.iconSize+4,borderRadius:"50%",border:"none",backgroundColor:"transparent",color:"var(--Quiet)",cursor:"pointer",flexShrink:0,padding:0,transition:"color 0.15s ease, background-color 0.15s ease","&:hover":{backgroundColor:"var(--Hover)",color:I},"&:active":{backgroundColor:"var(--Pressed)",color:I},"&:focus-visible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"1px"}},children:le(Na,{size:"small",children:le(Wr,{})})})]})})})}const Cs=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",Ts=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}];function zs({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function As({color:e,selected:r,onClick:t}){const a=Cs(e);return le(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&le(ue,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function Is(){const[e,t]=r("default"),[a,i]=r("medium"),[o,n]=r(!1),[l,s]=r(!0),[d,c]=r(null),[u,p]=r("Surface");return de(h,{sx:{pb:8},children:[le(qt,{children:"Search Field"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{theme:d,surface:u,children:le(h,{sx:{width:"100%",maxWidth:400},children:le(ws,{color:e,size:a,disabled:o,showClearButton:l,placeholder:"Search..."})})}),le(No,{code:(()=>{const r=[];return"default"!==e&&r.push('color="'+e+'"'),"medium"!==a&&r.push('size="'+a+'"'),l||r.push("showClearButton={false}"),o&&r.push("disabled"),r.push('placeholder="Search..."'),r.push("onChange={handleSearch}"),"<SearchField\n "+r.join("\n ")+"\n/>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[le(h,{sx:{mb:3},children:le(ho,{theme:d,onThemeChange:c,surface:u,onSurfaceChange:p})}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{spacing:1.5,children:Ts.map(r=>de(h,{children:[le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:r.label}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:r.colors.map(r=>le(As,{color:r,selected:e===r,onClick:t},r))})]},r.label))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),le(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>le(zs,{label:Cs(e),selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Clear Button"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Show clear when has value"})]}),le(en,{variant:"default-outline",checked:l,onChange:e=>s(e.target.checked),size:"small","aria-label":"Clear button"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Disabled"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Non-interactive state"})]}),le(en,{variant:"default-outline",checked:o,onChange:e=>n(e.target.checked),size:"small","aria-label":"Disabled"})]})]})}),le(no,{value:1,children:le(h,{sx:{p:3},children:le(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),le(k,{spacing:0,children:[{label:"Role",value:'role="searchbox" on the input element'},{label:"Label",value:'aria-label="Search" (configurable via ariaLabel prop)'},{label:"Clear",value:'aria-label="Clear search" on clear button'},{label:"Keyboard",value:"Enter submits, Escape clears"},{label:"Focus",value:"outline: 2px solid var(--Focus-Visible); outline-offset: 2px"}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(oa,{children:[e,":"]}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const Rs=["primary","secondary","tertiary","neutral","info","success","warning","error"],Ws=e=>e.charAt(0).toUpperCase()+e.slice(1);function Ds(){const e={};return Rs.forEach(r=>{e[r]=function(e){const r=Ws(e);return{bg:"var(--Buttons-"+r+"-Button)",text:"var(--Buttons-"+r+"-Text)",border:"none",hoverBg:"var(--Buttons-"+r+"-Hover)",activeBg:"var(--Buttons-"+r+"-Pressed)"}}(r),e[r+"-outline"]=function(e){return{bg:"var(--Background)",text:"var(--Text)",border:"1px solid var(--Buttons-"+Ws(e)+"-Border)",hoverBg:"var(--Hover)",activeBg:"var(--Hover)"}}(r),e[r+"-light"]=function(e){const r=Ws(e);return{bg:"var(--Buttons-"+r+"-Button)",text:"var(--Buttons-"+r+"-Text)",border:"1px solid var(--Buttons-"+r+"-Border)",hoverBg:"var(--Buttons-"+r+"-Hover)",activeBg:"var(--Buttons-"+r+"-Pressed)"}}(r)}),e}const Ps={small:{height:24,fontSize:"12px",iconSize:16,padding:"0 8px",deleteSize:16,gap:4},medium:{height:32,fontSize:"13px",iconSize:18,padding:"0 12px",deleteSize:18,gap:6},large:{height:40,fontSize:"14px",iconSize:20,padding:"0 16px",deleteSize:24,gap:8}},Fs=d(function({size:e,onClick:r,...t},a){const i="large"===e?24:"medium"===e?18:16;return le(h,{ref:a,component:"button",onClick:e=>{e.stopPropagation(),r&&r(e)},onKeyDown:e=>{"Enter"!==e.key&&"Backspace"!==e.key&&"Delete"!==e.key||(e.stopPropagation(),r&&r(e))},"aria-label":"Remove",role:"button",tabIndex:0,sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:24,minHeight:24,width:i,height:i,padding:0,margin:0,marginLeft:"2px",marginRight:"-4px",border:"none",borderRadius:"50%",backgroundColor:"transparent",color:"inherit",opacity:.7,cursor:"pointer",position:"relative",flexShrink:0,transition:"opacity 0.15s ease, background-color 0.15s ease","&:hover":{opacity:1,backgroundColor:"rgba(0,0,0,0.08)"},"&:focus-visible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"1px"},...i<24&&{"&::after":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",minWidth:24,minHeight:24}}},...t,children:le(Qr,{sx:{fontSize:i,pointerEvents:"none"}})})});function Ls({variant:e="primary",size:r="medium",label:t,clickable:a=!1,disabled:i=!1,selected:o=!1,selectionMode:n,onDelete:l,onClick:s,startDecorator:d,endDecorator:c,children:u,className:p="",sx:m={},...f}){const g=Ds(),x=g[e]||g.primary,b=l?"large":r,v=Ps[b]||Ps.medium,y=a||!!s||!!n,S={};"radio"===n?(S.role="radio",S["aria-checked"]=o):"checkbox"===n&&(S.role="checkbox",S["aria-checked"]=o);const k=o?{outline:"2px solid var(--Buttons-Primary-Button)",outlineOffset:"1px"}:{},B=t||u,w={height:v.height,fontSize:v.fontSize,fontWeight:500,fontFamily:"inherit",borderRadius:v.height/2+"px",padding:v.padding,boxSizing:"border-box",position:"relative",backgroundColor:x.bg,color:x.text,border:x.border,...k,..."small"===b&&{"&::after":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",minWidth:24,minHeight:24,width:"100%",height:"100%"}},...y&&!i?{cursor:"pointer",transition:"background-color 0.15s ease, outline 0.15s ease","&:hover":{backgroundColor:x.hoverBg},"&:active":{backgroundColor:x.activeBg}}:{},"&:focus-visible, &.Mui-focusVisible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"},...i?{opacity:.5,cursor:"not-allowed",pointerEvents:"none"}:{},boxShadow:"none","& .MuiChip-label":{padding:0,fontSize:"inherit",fontWeight:"inherit",fontFamily:"inherit",lineHeight:1.2,display:"flex",alignItems:"center",gap:v.gap+"px"},"& .MuiChip-icon":{margin:0,marginLeft:"-2px",color:"inherit",fontSize:v.iconSize},"& .MuiChip-deleteIcon":{display:"none"},...m},C=de(h,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:v.gap+"px",lineHeight:1},children:[d&&le(h,{component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,"& .MuiSvgIcon-root":{fontSize:v.iconSize},"& .MuiAvatar-root":{width:v.iconSize+4,height:v.iconSize+4,fontSize:Math.round(.65*v.iconSize)+"px"}},children:d}),B,c&&le(h,{component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,"& .MuiSvgIcon-root":{fontSize:v.iconSize},"& .MuiAvatar-root":{width:v.iconSize+4,height:v.iconSize+4,fontSize:Math.round(.65*v.iconSize)+"px"}},children:c}),l&&le(Fs,{size:b,onClick:l})]});return le(L,{label:C,clickable:y&&!i,disabled:i,onClick:y?s:void 0,className:"chip-"+e+" "+p,sx:w,...S,...f})}const Hs={body:{fontFamily:"var(--Body-Font-Family)",lineHeight:"calc(var(--Body-Line-Height) * var(--Cognitive-Multiplier, 1))",fontSize:"var(--Body-Font-Size)",fontWeight:"var(--Body-Font-Weight)",letterSpacing:"var(--Body-Letter-Spacing)"},"body-small":{fontFamily:"var(--Body-Font-Family)",lineHeight:"calc(var(--Body-Small-Line-Height) * var(--Cognitive-Multiplier, 1))",fontSize:"var(--Body-Small-Font-Size)",fontWeight:"var(--Body-Font-Weight)",letterSpacing:"var(--Body-Small-Letter-Spacing)"},"body-large":{fontFamily:"var(--Body-Font-Family)",lineHeight:"calc(var(--Body-Large-Line-Height) * var(--Cognitive-Multiplier, 1))",fontSize:"var(--Body-Large-Font-Size)",fontWeight:"var(--Body-Font-Weight)",letterSpacing:"var(--Body-Large-Letter-Spacing)"},"body-semibold":{fontFamily:"var(--Body-Font-Family)",lineHeight:"calc(var(--Body-Line-Height) * var(--Cognitive-Multiplier, 1))",fontSize:"var(--Body-Font-Size)",fontWeight:"var(--Body-Semibold-Font-Weight)",letterSpacing:"var(--Body-Letter-Spacing)"},"body-bold":{fontFamily:"var(--Body-Font-Family)",lineHeight:"calc(var(--Body-Line-Height) * var(--Cognitive-Multiplier, 1))",fontSize:"var(--Body-Font-Size)",fontWeight:"var(--Body-Bold-Font-Weight)",letterSpacing:"var(--Body-Letter-Spacing)"},button:{fontFamily:"var(--Body-Font-Family)",lineHeight:"var(--Button-Line-Height)",fontSize:"var(--Button-Font-Size)",fontWeight:"var(--Button-Font-Weight)",letterSpacing:"var(--Button-Letter-Spacing)"},label:{fontFamily:"var(--Body-Font-Family)",lineHeight:"var(--Label-Line-Height)",fontSize:"var(--Label-Font-Size)",fontWeight:"var(--Label-Font-Weight)",letterSpacing:"var(--Label-Letter-Spacing)"},caption:{fontFamily:"var(--Body-Font-Family)",lineHeight:"calc(var(--Body-Small-Line-Height) * var(--Cognitive-Multiplier, 1))",fontSize:"var(--Body-Small-Font-Size)",fontWeight:"var(--Body-Font-Weight)",letterSpacing:"var(--Body-Small-Letter-Spacing)"}},Ms="var(--Link-Visited, var(--Hotlink-Visited))",Es={primary:{base:"var(--Link, var(--Hotlink))",visited:Ms},standard:{base:"var(--Text)",visited:Ms},quiet:{base:"var(--Text-Quiet)",visited:Ms}};function Os({children:e,href:r,target:t,rel:a,textStyle:i="body",color:o="primary",disabled:n=!1,onClick:l,className:s="",sx:d={},...c}){const u=Hs[i]||Hs.body,p=Es[o]||Es.primary;return le(h,{component:"a",href:n?void 0:r,target:t,rel:"_blank"===t?a||"noopener noreferrer":a,onClick:n?e=>e.preventDefault():l,"aria-disabled":n||void 0,tabIndex:n?-1:void 0,className:"link link-"+i+" link-color-"+o+(n?" link-disabled":"")+" "+s,sx:{fontFamily:u.fontFamily,lineHeight:u.lineHeight,fontSize:u.fontSize,fontWeight:u.fontWeight,letterSpacing:u.letterSpacing,textDecoration:"underline",textUnderlineOffset:"3px",textDecorationThickness:"1px",color:p.base,cursor:n?"not-allowed":"pointer",opacity:n?"var(--Disabled, 0.38)":1,pointerEvents:n?"none":"auto",display:"inline-flex",alignItems:"center",minHeight:"24px",minWidth:"24px",transition:"color 0.15s ease, text-decoration-color 0.15s ease",...!n&&{"&:hover":{textDecorationThickness:"2px"},"&:visited":{color:p.visited},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"2px",borderRadius:"2px"},"&:active":{textDecorationThickness:"2px"}},...d},...c,children:e})}function Ns({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"primary":"primary-outline",size:"small",onClick:t,children:e})}function Qs({code:e}){return le(No,{code:e,language:"JSX",wrap:!0,sx:{mt:1}})}function Vs({passes:e}){return de(h,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1.5,py:.5,borderRadius:"20px",backgroundColor:e?"var(--Tags-Success-BG)":"var(--Tags-Error-BG)",color:e?"var(--Tags-Success-Text)":"var(--Tags-Error-Text)",fontSize:"12px",fontWeight:600},children:[le(e?me:fe,{sx:{fontSize:14}}),e?"WCAG Pass":"WCAG Fail"]})}function js({leftLabel:e,rightLabel:r,leftContent:t,rightContent:a,leftCode:i,rightCode:o,leftPasses:n,rightPasses:l}){return de(C,{container:!0,spacing:3,children:[le(C,{item:!0,xs:12,md:6,children:de(h,{sx:{p:2,border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)",backgroundColor:"var(--Background)",height:"100%"},children:[de(h,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[le(oa,{style:{fontWeight:600},children:e}),le(Vs,{passes:n})]}),le(h,{sx:{p:2,backgroundColor:"var(--Surface-Dim, var(--Surface))",borderRadius:"var(--Style-Border-Radius)",minHeight:80},children:t}),le(Qs,{code:i})]})}),le(C,{item:!0,xs:12,md:6,children:de(h,{sx:{p:2,border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)",backgroundColor:"var(--Background)",height:"100%"},children:[de(h,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[le(oa,{style:{fontWeight:600},children:r}),le(Vs,{passes:l})]}),le(h,{sx:{p:2,backgroundColor:"var(--Surface-Dim, var(--Surface))",borderRadius:"var(--Style-Border-Radius)",minHeight:80},children:a}),le(Qs,{code:o})]})})]})}function Gs(){const[e,t]=r("column"),[a,i]=r(.5),[o,n]=r("small"),[l,s]=r(!0),[d,c]=r(!1),[u,p]=r(null),[m,f]=r("Surface"),g={small:{label:"Small links ⚡",content:de(se,{children:[le(Os,{href:"#",size:"small",children:"Terms of Service"}),le(Os,{href:"#",size:"small",children:"Privacy Policy"}),le(Os,{href:"#",size:"small",children:"Cookie Settings"})]})},chips:{label:"Chips ⚡",content:de(se,{children:[le(Ls,{label:"React",size:"small"}),le(Ls,{label:"TypeScript",size:"small"}),le(Ls,{label:"Design System",size:"small"})]})},normal:{label:"Normal buttons",content:de(se,{children:[le(wi,{variant:"primary",size:"medium",children:"Primary"}),le(wi,{variant:"secondary",size:"medium",children:"Secondary"})]})},mixed:{label:"Mixed ⚡",content:de(se,{children:[le(wi,{variant:"primary",size:"medium",children:"Save changes"}),le(Os,{href:"#",size:"small",children:"Or discard"})]})}},x=["small","chips","mixed"].includes(o),b=l&&x;return de(C,{container:!0,spacing:3,sx:{mt:1},children:[de(C,{item:!0,xs:12,md:7,children:[le(lo,{theme:u,children:de(h,{sx:{width:"100%"},children:[b&&de(h,{sx:{mb:2,px:2,py:1,borderRadius:"var(--Style-Border-Radius)",backgroundColor:"var(--Tags-Warning-BG)",color:"var(--Tags-Warning-Text)",fontSize:"12px",fontWeight:600,display:"flex",alignItems:"center",gap:1},children:[le(fe,{sx:{fontSize:16}}),"Small child detected — gap raised to var(--min-stack-gap)"]}),le(vn,{direction:e,gap:a,enforceMinGap:l,flexWrap:d?"wrap":void 0,children:g[o].content})]})}),le(Qs,{code:(()=>{const r=["<OmniStack"];return"column"!==e&&r.push(' direction="'+e+'"'),r.push(" gap={"+a+"}"),l||r.push(" enforceMinGap={false}"),d&&r.push(' flexWrap="wrap"'),r.push(">"),r.push(" {children}"),r.push("</OmniStack>"),r.join("\n")})()})]}),le(C,{item:!0,xs:12,md:5,children:de(h,{sx:{display:"flex",flexDirection:"column",gap:3},children:[le(ho,{theme:u,onThemeChange:p,surface:m,onSurfaceChange:f}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"CHILDREN"}),le(h,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:Object.entries(g).map(([e,{label:r}])=>le(Ns,{label:r,selected:o===e,onClick:()=>n(e)},e))})]}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"DIRECTION"}),le(h,{sx:{display:"flex",gap:1},children:["row","column"].map(r=>{return le(Ns,{label:(a=r,a?a.charAt(0).toUpperCase()+a.slice(1):""),selected:e===r,onClick:()=>t(r)},r);var a})})]}),de(h,{children:[de(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:["GAP — ",a," unit",b?" → raised to var(--min-stack-gap)":""]}),de(h,{sx:{display:"flex",alignItems:"center",gap:2},children:[le(h,{component:"input",type:"range",min:0,max:6,step:.5,value:a,onChange:e=>i(Number(e.target.value)),sx:{flex:1,accentColor:"var(--Primary-Color-10)"}}),le(ga,{style:{color:"var(--Text)",minWidth:24,textAlign:"right"},children:a})]})]}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"OPTIONS"}),de(h,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[de(h,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between"},children:[de(h,{children:[le(oa,{children:"Enforce min gap"}),le(ga,{style:{color:b?"var(--Tags-Warning-Text)":"var(--Text-Quiet)",display:"block"},children:b?"⚡ Active — small child detected":x?"Off — WCAG 2.5.8 risk":"No small children detected"})]}),le(en,{checked:l,onChange:e=>s(e.target.checked),size:"small"})]}),de(h,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[le(oa,{children:"Flex wrap"}),le(en,{checked:d,onChange:e=>c(e.target.checked),size:"small"})]})]})]})]})})]})}function Us(){return de(h,{sx:{pb:8},children:[le(qt,{children:"Stack"}),le(sa,{style:{color:"var(--Text-Quiet)",marginTop:8,marginBottom:32,maxWidth:640},children:"OmniStack is a layout primitive built on MUI Stack with one intelligent addition: it automatically enforces a minimum gap between children when it detects small (24px) interactive components — protecting WCAG 2.5.8 compliance without any extra developer effort."}),de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Why it matters"}),le(oo,{children:"Playground"}),le(oo,{children:"API"})]}),le(no,{value:0,children:de(h,{sx:{pt:3,display:"flex",flexDirection:"column",gap:4},children:[de(h,{sx:{p:3,backgroundColor:"var(--Background)",border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)"},children:[le(qt,{children:"The problem"}),le(sa,{style:{color:"var(--Text-Quiet)",marginTop:8,marginBottom:16},children:"WCAG 2.5.8 requires that small interactive targets (24px) have enough surrounding space that they don’t overlap adjacent targets. Every layout library leaves this entirely to the developer — meaning it’s silently violated constantly."}),le(js,{leftLabel:"Plain MUI Stack — gap too small",rightLabel:"OmniStack — gap auto-enforced",leftPasses:!1,rightPasses:!0,leftContent:de(h,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:[le(Os,{href:"#",size:"small",children:"Terms of Service"}),le(Os,{href:"#",size:"small",children:"Privacy Policy"}),le(Os,{href:"#",size:"small",children:"Cookie Settings"})]}),rightContent:de(vn,{gap:.5,children:[le(Os,{href:"#",size:"small",children:"Terms of Service"}),le(Os,{href:"#",size:"small",children:"Privacy Policy"}),le(Os,{href:"#",size:"small",children:"Cookie Settings"})]}),leftCode:'<Stack gap={0.5}>\n <Link size="small">Terms of Service</Link>\n <Link size="small">Privacy Policy</Link>\n <Link size="small">Cookie Settings</Link>\n</Stack>\n// ⚠ gap=4px — targets overlap',rightCode:'<OmniStack gap={0.5}>\n <Link size="small">Terms of Service</Link>\n <Link size="small">Privacy Policy</Link>\n <Link size="small">Cookie Settings</Link>\n</OmniStack>\n// ✓ small child detected → gap enforced'})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)"},children:[le(qt,{children:"Mixed component sizes"}),le(sa,{style:{color:"var(--Text-Quiet)",marginTop:8,marginBottom:16},children:"One small child is enough to trigger enforcement for the whole stack — the most common case is a normal button paired with a small cancel link."}),le(js,{leftLabel:"Without enforcement",rightLabel:"With enforcement",leftPasses:!1,rightPasses:!0,leftContent:de(h,{sx:{display:"flex",flexDirection:"column",gap:"2px"},children:[le(wi,{variant:"primary",size:"medium",children:"Save changes"}),le(Os,{href:"#",size:"small",children:"Or discard"})]}),rightContent:de(vn,{gap:.25,children:[le(wi,{variant:"primary",size:"medium",children:"Save changes"}),le(Os,{href:"#",size:"small",children:"Or discard"})]}),leftCode:'<Stack gap={0.25}>\n <Button size="medium">Save changes</Button>\n <Link size="small">Or discard</Link>\n</Stack>\n// ⚠ Link is 24px — gap too tight',rightCode:'<OmniStack gap={0.25}>\n <Button size="medium">Save changes</Button>\n <Link size="small">Or discard</Link>\n</OmniStack>\n// ✓ Link detected → gap enforced'})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)"},children:[le(qt,{children:"How detection works"}),le(sa,{style:{color:"var(--Text-Quiet)",marginTop:8,marginBottom:16},children:"OmniStack inspects children at render time using a priority-ordered signal chain. Any one signal is enough to trigger enforcement."}),le(h,{sx:{display:"flex",flexDirection:"column"},children:[{signal:'size="small" prop',example:'<Link size="small" />'},{signal:'data-size="small"',example:'<div data-size="small" />'},{signal:"height={24}",example:"<Box height={24} />"},{signal:"minHeight={24}",example:"<Box minHeight={24} />"},{signal:"sx.minHeight: 24",example:"<Box sx={{ minHeight: 24 }} />"},{signal:"Known component name",example:"Link, Chip, Badge, Caption…"}].map(({signal:e,example:r},t,a)=>de(h,{sx:{display:"flex",alignItems:"center",gap:2,py:1.5,borderBottom:t<a.length-1?"1px solid var(--Border)":"none"},children:[le(h,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"var(--Primary-Color-10)",flexShrink:0}}),le(oa,{style:{flex:"0 0 200px"},children:e}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)"},children:[le(qt,{children:"Token-driven minimum"}),le(sa,{style:{color:"var(--Text-Quiet)",marginTop:8,marginBottom:16},children:"The minimum gap is a CSS custom property, not a hardcoded value — so it respects your brand spacing scale and responds to theme changes without re-rendering."}),le(Qs,{code:":root {\n --min-stack-gap: 8px; /* Set in your theme.css */\n}\n\n/* OmniStack substitutes the variable, not the value: */\ngap: var(--min-stack-gap, 8px);\n\n/* Dark mode, brand overrides, and media queries\n all work automatically — no re-render needed. */"})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)"},children:[le(qt,{children:"Auditable opt-out"}),de(sa,{style:{color:"var(--Text-Quiet)",marginTop:8,marginBottom:16},children:["Use ",le("code",{children:"enforceMinGap={false}"})," to opt out. This creates a searchable pattern accessibility audits can grep for — a conscious waiver, not a silent violation."]}),le(Qs,{code:'<OmniStack gap={0.5} enforceMinGap={false}>\n {/* Explicitly waived — auditors can grep:\n enforceMinGap={false}\n to find all waivers in the codebase. */}\n <Link size="small">Terms</Link>\n <Link size="small">Privacy</Link>\n</OmniStack>'})]})]})}),le(no,{value:1,children:le(Gs,{})}),le(no,{value:2,children:de(h,{sx:{pt:3},children:[le(qt,{children:"OmniStack props"}),le(sa,{style:{color:"var(--Text-Quiet)",marginTop:4,marginBottom:16},children:"All standard MUI Stack props are supported. These are OmniStack additions:"}),le(h,{sx:{border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)",overflow:"hidden",mb:4},children:[{prop:"enforceMinGap",type:"boolean",default:"true",desc:"Enable/disable smart gap enforcement."},{prop:"minGapToken",type:"string",default:'"--min-stack-gap"',desc:"CSS variable name for the minimum gap value."},{prop:"gap",type:"number|string",default:"undefined",desc:"Desired gap. Enforced against minGapToken when small children detected."},{prop:"direction",type:"string|object",default:'"column"',desc:"Stack direction. Supports responsive breakpoint objects."},{prop:"flexWrap",type:"string",default:"undefined",desc:'"wrap" | "nowrap" | "wrap-reverse"'},{prop:"divider",type:"ReactNode",default:"undefined",desc:"Element rendered between each child."}].map(({prop:e,type:r,default:t,desc:a},i,o)=>de(h,{sx:{display:"grid",gridTemplateColumns:"160px 160px 1fr",gap:2,px:2,py:1.5,alignItems:"start",borderBottom:i<o.length-1?"1px solid var(--Border)":"none",backgroundColor:i%2==0?"transparent":"var(--Surface-Dim, var(--Surface))"},children:[le(ga,{style:{fontFamily:"monospace",color:"var(--Primary-Color-10)",fontWeight:600},children:e}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r}),de(h,{children:[le(ga,{style:{color:"var(--Text)"},children:a}),de(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:2},children:["Default: ",t]})]})]},e))}),le(qt,{children:"Convenience exports"}),le(h,{sx:{border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)",overflow:"hidden",mb:4},children:[{name:"Stack",desc:"Alias for OmniStack — drop-in MUI Stack replacement"},{name:"HStack",desc:'direction="row" alignItems="center"'},{name:"VStack",desc:'direction="column"'},{name:"CenteredStack",desc:'direction="column" alignItems="center" justifyContent="center"'},{name:"SpaceBetweenStack",desc:'direction="row" justifyContent="space-between"'},{name:"WrapStack",desc:'direction="row" flexWrap="wrap"'},{name:"ResponsiveStack",desc:"column on xs, row on sm+ (breakpoint configurable)"},{name:"GridStack",desc:"Alias for WrapStack"},{name:"InsetStack",desc:"OmniStack with px: 2 horizontal padding"},{name:"ScrollStack",desc:"OmniStack with overflowY: auto"}].map(({name:e,desc:r},t,a)=>de(h,{sx:{display:"grid",gridTemplateColumns:"200px 1fr",gap:2,px:2,py:1.5,borderBottom:t<a.length-1?"1px solid var(--Border)":"none",backgroundColor:t%2==0?"transparent":"var(--Surface-Dim, var(--Surface))"},children:[le(ga,{style:{fontFamily:"monospace",color:"var(--Primary-Color-10)",fontWeight:600},children:e}),le(ga,{style:{color:"var(--Text-Quiet)"},children:r})]},e))}),le(qt,{children:"Debug attributes"}),le(Qs,{code:'/* When enforcement is active, OmniStack adds: */\nclassName="omni-stack omni-stack-min-gap-enforced"\ndata-min-gap-enforced="true"\n\n/* Target in CSS: */\n.omni-stack-min-gap-enforced { outline: 2px dashed orange; }\n\n/* Query in tests: */\ncontainer.querySelector(\'[data-min-gap-enforced="true"]\')'})]})})]})]})}const Xs={none:void 0,small:"var(--Sm-Card-Radius, var(--Card-Radius))",medium:"var(--Card-Radius)",large:"var(--Lg-Card-Radius, var(--Card-Radius))"};function Ys({children:e,theme:r,surface:t,radius:a="none",elevation:i=0,component:o="div",className:n="",sx:l={},style:s,...d}){const c=Math.max(0,Math.min(5,0|i)),u=Xs[a];if(!c)return le(h,{component:o,"data-theme":r||void 0,"data-surface":t||void 0,className:"omni-box"+(n?" "+n:""),sx:{background:"var(--Background)",boxSizing:"border-box",...u?{borderRadius:u}:{},...l},style:s,...d,children:e});const p=s||{},{width:m,height:f,minWidth:g,minHeight:x,maxWidth:b,maxHeight:v,borderRadius:y,margin:S,marginTop:k,marginRight:B,marginBottom:w,marginLeft:C,...T}=p,z={width:m,height:f,minWidth:g,minHeight:x,maxWidth:b,maxHeight:v,borderRadius:y,margin:S,marginTop:k,marginRight:B,marginBottom:w,marginLeft:C},{width:A,height:I,borderRadius:R,...W}=l;return le(h,{component:o,className:"omni-box-elevation"+(n?" "+n:""),"data-elevation":c,sx:{boxShadow:ni[c],boxSizing:"border-box",width:A,height:I,borderRadius:void 0!==R?R:u},style:z,...d,children:le(h,{"data-theme":r||void 0,"data-surface":t||void 0,className:"omni-box",sx:{width:"100%",height:"100%",background:"var(--Background)",borderRadius:"inherit",boxSizing:"border-box",...W},style:T,children:e})})}const qs=["Surface","Surface-Dim","Surface-Bright","Container","Container-Low","Container-Lowest","Container-High"],Zs=["Default","Primary","Primary-Light","Secondary","Secondary-Light","Tertiary","Tertiary-Light","Neutral","Neutral-Light","Info-Light","Success-Light","Warning-Light","Error-Light"];function Js({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Ks(){const[e,t]=r(""),[a,i]=r(""),[o,n]=r(null),[l,s]=r("Surface");return de(Ys,{sx:{pb:8},children:[le(qt,{children:"Box"}),de(sa,{color:"quiet",style:{marginTop:8,marginBottom:24,maxWidth:720},children:["Bare layout primitive — a slot that participates in the design-system cascade (",le("code",{children:"data-theme"})," / ",le("code",{children:"data-surface"}),") without carrying any chrome. Reach for ",le("code",{children:"<Ratio>"})," or",le("code",{children:" <Card>"})," when you need padding, borders, or shadow."]}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{theme:o,surface:l,children:le(Ys,{sx:{width:"100%",maxWidth:400},children:le(Ys,{theme:e||void 0,surface:a||void 0,children:de(Ys,{sx:{padding:3,backgroundColor:"var(--Background)",color:"var(--Text)",borderRadius:"var(--Style-Border-Radius)",border:"1px dashed var(--Border-Variant)"},children:[le(Jt,{children:"Box content"}),le(sa,{style:{color:"var(--Text-Quiet)",marginTop:6},children:"Anything dropped inside resolves tokens against the Box's theme / surface, if you set them."})]})})})}),le(No,{code:(()=>{const r=[];e&&r.push('theme="'+e+'"'),a&&r.push('surface="'+a+'"');return"<Box"+(r.length?" "+r.join(" "):"")+">\n {/* anything */}\n</Box>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(Ys,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"When to use"})]}),le(no,{value:0,children:de(Ys,{sx:{p:3},children:[le(Ys,{sx:{mb:3},children:le(ho,{theme:o,onThemeChange:n,surface:l,onSurfaceChange:s})}),de(Ys,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"THEME (optional)"}),de(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:[le(Js,{label:"None",selected:!e,onClick:()=>t("")}),Zs.map(r=>le(Js,{label:r,selected:e===r,onClick:()=>t(r)},r))]})]}),de(Ys,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SURFACE (optional)"}),de(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:[le(Js,{label:"None",selected:!a,onClick:()=>i("")}),qs.map(e=>le(Js,{label:e,selected:a===e,onClick:()=>i(e)},e))]}),de(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:["Both props are pass-throughs to ",le("code",{children:"data-theme"})," ","and ",le("code",{children:"data-surface"}),". Leave empty to inherit from the parent zone."]})]})]})}),le(no,{value:1,children:le(Ys,{sx:{p:3},children:de(k,{spacing:2,children:[de(Ys,{children:[le(oa,{style:{fontWeight:700},children:"Reach for Box when…"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:4},children:"you need a wrapper to scope a theme / surface zone, or you want a typed JSX root without painting any visual styling."})]}),de(Ys,{children:[le(oa,{style:{fontWeight:700},children:"Use Ratio when…"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:4},children:"the container needs a fixed proportion (image, video, embed, hero tile) — it carries the same theme / color shell Box used to."})]}),de(Ys,{children:[le(oa,{style:{fontWeight:700},children:"Use Card when…"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:4},children:"the container has a title, body, and actions — Card handles the standard 2-layer chrome plus header / footer slots."})]})]})})})]})})})]})]})}function $s({children:e,maxWidth:r="lg",disableGutters:t=!1,sx:a={},...i}){return le(H,{maxWidth:r,disableGutters:t,"data-surface":"Surface",sx:{backgroundColor:"var(--Background)",color:"var(--Text)",transition:"all 0.2s ease-in-out",...a},...i,children:e})}function _s({children:e,container:r=!1,item:t=!1,spacing:a=2,sx:i={},...o}){return le(C,{container:r,item:t,spacing:a,sx:{transition:"all 0.2s ease-in-out",...i},...o,children:e})}function ed({theme:e,surface:r="Surface",as:t="section",padding:a,className:i,style:o,children:n,...l}){return le(t,{...e?{"data-theme":e}:{},"data-surface":r,className:i,style:{background:"var(--Background)",color:"var(--Text)",...void 0!==a?{padding:a}:{},...o},...l,children:n})}function rd(){return de("div",{children:[le(qt,{style:{marginBottom:12},children:"Section"}),de(sa,{color:"quiet",style:{marginBottom:32,maxWidth:720},children:[le("code",{children:"<Section>"})," bundles ",le("code",{children:"data-theme"})," +"," ",le("code",{children:"data-surface"})," + background paint into one component. Use anywhere you'd otherwise reach for"," ",le("code",{children:"<section data-theme data-surface style={{ background: var(--Background) }}>"}),". For wrapping without painting (e.g. AppBar's themed zone), use"," ",le("code",{children:"<ThemedZone>"}),"."]}),le(qt,{style:{marginTop:24,marginBottom:12},children:"Theme + surface"}),le(oa,{color:"quiet",style:{marginBottom:16,display:"block"},children:'Sets data-theme="Primary-Light" + data-surface="Surface", paints --Background.'}),de(ed,{theme:"Primary-Light",surface:"Surface",padding:"32px",style:{borderRadius:8},children:[le(qt,{children:"Primary-Light surface"}),le(sa,{children:"Body text picks up --Text automatically."}),le(oa,{color:"quiet",children:"Quiet text picks up --Text-Quiet."}),le("div",{style:{marginTop:12},children:le(wi,{variant:"primary",children:"Primary button"})})]}),le(qt,{style:{marginTop:32,marginBottom:12},children:"Container surface"}),de(ed,{surface:"Container",padding:"32px",style:{borderRadius:8},children:[le(qt,{children:"Container surface (inherits theme)"}),le(sa,{children:"Useful for card-like regions."})]}),le(qt,{style:{marginTop:32,marginBottom:12},children:"Different element"}),de(oa,{color:"quiet",style:{marginBottom:16,display:"block"},children:["Pass ",le("code",{children:'as="article"'}),", ",le("code",{children:'as="footer"'}),", etc."]}),de(ed,{as:"article",theme:"Neutral-Dark",surface:"Surface",padding:"32px",style:{borderRadius:8},children:[le(qt,{children:"Neutral-Dark article"}),le(sa,{children:"Renders as an <article> element."})]})]})}const td=["1:1","3:4","4:3","16:9","9:16","2:3","3:2","1:2","2:1","9:21","21:9","5:7","7:5","4:5","5:4","5:3","3:5","16:10","10:16","Golden-Horizontal","Golden-Vertical"],ad="1.618034",id={"1:1":"1 / 1","3:4":"3 / 4","4:3":"4 / 3","16:9":"16 / 9","9:16":"9 / 16","2:3":"2 / 3","3:2":"3 / 2","1:2":"1 / 2","2:1":"2 / 1","9:21":"9 / 21","21:9":"21 / 9","5:7":"5 / 7","7:5":"7 / 5","4:5":"4 / 5","5:4":"5 / 4","5:3":"5 / 3","3:5":"3 / 5","16:10":"16 / 10","10:16":"10 / 16","Golden-Horizontal":ad+" / 1","Golden-Vertical":"1 / "+ad},od={none:0,xs:1,sm:2,md:3,lg:4,xl:6};function nd({ratio:r="1:1",children:t,variant:a="default",color:i="default",padding:o="none",fit:n="width",placeholder:l=!0,elevated:s=!1,clickable:d=!1,onClick:c,maxWidth:u,maxHeight:p,component:m="div",className:f="",sx:g={},...x}){const b=id[r]||id["1:1"],v=(y="default"===i?"Default":i).charAt(0).toUpperCase()+y.slice(1);var y;const S=l&&0===e.Children.count(t),k="default"===i?void 0:v,B="dark"===a?"Surface-Dimmest":"light"===a?"Surface-Brightest":void 0,w=void 0!==od[o]?od[o]:od.none,C=d||!!c,T="default"===a,z=s?ai:ti,A=s?ii:ai;return le(h,{component:m,onClick:C?c:void 0,role:C?"button":void 0,tabIndex:C?0:void 0,className:"ratio ratio-"+r.toLowerCase()+" ratio-"+a+(C?" ratio-clickable":"")+(s?" ratio-elevated":"")+(f?" "+f:""),sx:{aspectRatio:b,flex:"0 0 auto",..."height"===n?{height:"100%",width:"auto",minHeight:24}:{width:"100%",height:"auto",minWidth:24},...void 0!==u&&{maxWidth:u},...void 0!==p&&{maxHeight:p},border:T?"none":"1px solid var(--Border-Variant)",borderRadius:T?0:"var(--Style-Border-Radius)",boxShadow:T?"none":z,overflow:"hidden",transition:"box-shadow 0.2s ease, border-color 0.2s ease",...C&&{cursor:"pointer","&:hover":{borderColor:"var(--Buttons-Default-Border)",boxShadow:A},"&:active":{transform:"scale(0.995)"},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"3px"}},...!C&&!T&&{"&:hover":{boxShadow:A}},...g},...x,children:le(h,{"data-theme":k||void 0,"data-surface":B,sx:{width:"100%",height:"100%",padding:w,backgroundColor:S?"var(--Border)":"var(--Background)",color:"var(--Text)",fontFamily:"inherit",borderRadius:T?0:"calc(var(--Style-Border-Radius) - 1px)",...S?{display:"flex",alignItems:"center",justifyContent:"center"}:{"& > *":{width:"100%",height:"100%"}}},children:S?le(Na,{size:"large",sx:{color:"var(--Background)"},children:le(jr,{})}):t})})}const ld=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",sd=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}],dd=["default","solid","light","dark"],cd=["none","xs","sm","md","lg","xl"];function ud({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function hd({color:e,selected:r,onClick:t,variant:a}){const i=ld(e);return le(Ys,{component:"button","data-theme":{solid:i,light:i+"-Light",dark:i,default:void 0}[a],"data-surface":{solid:"Surface",light:"Surface",dark:"Surface-Dimmest",default:"Surface"}[a],onClick:()=>t(e),"aria-label":"Select "+i,"aria-pressed":r,title:i,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Background)",border:r?"2px solid var(--Text)":"2px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&le(ue,{sx:{fontSize:16,color:"var(--Text)",pointerEvents:"none"}})})}function pd(){const[e,t]=r("1:1"),[a,i]=r("solid"),[o,n]=r("primary"),[l,s]=r("none"),[d,c]=r(!1),[u,h]=r(!1),[p,m]=r(null),[f,g]=r("Surface");return de(Ys,{sx:{pb:8},children:[le(qt,{children:"Ratio"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{theme:p,surface:f,children:le(Ys,{sx:{width:"100%",maxWidth:480},children:le(nd,{ratio:e,variant:a,color:o,padding:l,elevated:d,clickable:u})})}),le(No,{code:(()=>{const r=['ratio="'+e+'"'];return"default"!==a&&r.push('variant="'+a+'"'),"default"!==o&&r.push('color="'+o+'"'),"none"!==l&&r.push('padding="'+l+'"'),d&&r.push("elevated"),u&&r.push("clickable onClick={handleClick}"),"<Ratio "+r.join(" ")+">\n {/* your content */}\n</Ratio>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(Ys,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Reference"})]}),le(no,{value:0,children:de(Ys,{sx:{p:3},children:[le(Ys,{sx:{mb:3},children:le(ho,{theme:p,onThemeChange:m,surface:f,onSurfaceChange:g})}),de(Ys,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"VARIANT"}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:dd.map(e=>le(ud,{label:ld(e),selected:a===e,onClick:()=>i(e)},e))})]}),de(Ys,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{spacing:1.5,children:sd.map(e=>de(Ys,{children:[le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:e.label}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:e.colors.map(e=>le(hd,{color:e,selected:o===e,onClick:n,variant:"default"===a?"solid":a},e))})]},e.label))})]}),de(Ys,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"PADDING"}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:cd.map(e=>le(ud,{label:"none"===e?"None":e.toUpperCase(),selected:l===e,onClick:()=>s(e)},e))})]}),de(Ys,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"RATIO"}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:td.map(r=>le(ud,{label:r,selected:e===r,onClick:()=>t(r)},r))})]}),de(Ys,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(Ys,{children:[le(ya,{children:"Elevated"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Bumps the shadow up one level"})]}),le(en,{checked:d,onChange:e=>c(e.target.checked),size:"small","aria-label":"Elevated"})]}),de(Ys,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(Ys,{children:[le(ya,{children:"Clickable"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Adds hover, press, and focus-visible"})]}),le(en,{checked:u,onChange:e=>h(e.target.checked),size:"small","aria-label":"Clickable"})]})]})}),le(no,{value:1,children:le(Ys,{sx:{p:3},children:de(k,{spacing:3,children:[de(Ys,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"Common use cases"}),le(k,{spacing:0,children:[{label:"1:1",value:"Square thumbnails, avatars, product tiles"},{label:"16:9",value:"Video, hero images, modern displays"},{label:"4:3",value:"Classic photo, presentation slides"},{label:"3:2",value:"DSLR photography, print frames"},{label:"21:9",value:"Cinematic ultrawide"},{label:"9:16 / 4:5 / 5:7",value:"Portrait social media (Stories, Reels, prints)"},{label:"16:10",value:"Laptop / monitor displays"},{label:"Golden-Horizontal",value:"φ : 1 — design framing for cards, hero blocks"},{label:"Golden-Vertical",value:"1 : φ — vertical posters, sidebars"}].map(({label:e,value:r})=>de(Ys,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:e}),le(ga,{style:{color:"var(--Text-Quiet)"},children:r})]},e))})]}),de(sa,{color:"quiet",children:["Built on native CSS ",le("code",{children:"aspect-ratio"}),". The themed shell mirrors Box — pick a variant + color to paint the frame, or keep ",le("code",{children:'variant="default"'}),"for a borderless ratio container."]})]})})})]})})})]})]})}const md=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",fd=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}],gd=[{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}];function xd({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function bd({color:e,selected:r,onClick:t}){const a=md(e);return le(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&le(ue,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function vd(){const[e,t]=r("standard"),[a,i]=r("default"),[o,n]=r("medium"),[l,s]=r("horizontal"),[d,c]=r(null),[u,p]=r("Surface"),[m,f]=r(!1),g="standard"===e?fd:gd;return de(h,{sx:{pb:8},children:[le(qt,{children:"Tabs"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{theme:d,surface:u,children:le(h,{sx:{width:"100%",maxWidth:"vertical"===l?500:"100%",display:"flex",flexDirection:"vertical"===l?"row":"column"},children:de(ao,{defaultValue:0,variant:e,color:a,size:o,orientation:l,children:[de(io,{rounded:m,children:[le(oo,{children:"Overview"}),le(oo,{children:"Features"}),le(oo,{children:"Pricing"})]}),le(no,{value:0,children:le(h,{sx:{p:2},children:le(sa,{style:{color:"var(--Quiet)"},children:"Overview content goes here."})})}),le(no,{value:1,children:le(h,{sx:{p:2},children:le(sa,{style:{color:"var(--Quiet)"},children:"Features content goes here."})})}),le(no,{value:2,children:le(h,{sx:{p:2},children:le(sa,{style:{color:"var(--Quiet)"},children:"Pricing content goes here."})})})]})})}),le(No,{code:(()=>{const r=[];return"standard"!==e&&r.push('variant="'+e+'"'),"default"!==a&&r.push('color="'+a+'"'),"medium"!==o&&r.push('size="'+o+'"'),"horizontal"!==l&&r.push('orientation="vertical"'),"<Tabs defaultValue={0}"+(r.length?" "+r.join(" "):"")+">\n <TabList"+(m?" rounded":"")+">\n <Tab>Overview</Tab>\n <Tab>Features</Tab>\n <Tab>Pricing</Tab>\n </TabList>\n <TabPanel value={0}>Overview content</TabPanel>\n <TabPanel value={1}>Features content</TabPanel>\n <TabPanel value={2}>Pricing content</TabPanel>\n</Tabs>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[le(h,{sx:{mb:3},children:le(ho,{theme:d,onThemeChange:c,surface:u,onSurfaceChange:p})}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:["standard","solid","light","dark"].map(r=>le(xd,{label:md("standard"===r?"default":r),selected:e===r,onClick:()=>(e=>{t(e),"standard"!==e&&"default"===a&&i("primary")})(r)},r))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{spacing:1.5,children:g.map(e=>de(h,{children:[le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:e.label}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:e.colors.map(e=>le(bd,{color:e,selected:a===e,onClick:i},e))})]},e.label))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),le(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>le(xd,{label:md(e),selected:o===e,onClick:()=>n(e)},e))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"ORIENTATION"}),le(k,{direction:"row",spacing:1,children:["horizontal","vertical"].map(e=>le(xd,{label:md(e),selected:l===e,onClick:()=>s(e)},e))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SHAPE"}),le(en,{label:"Rounded corners",checked:m,onChange:e=>f(e.target.checked)}),de(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:["Off by default. When on, the TabList applies"," ",le("code",{children:"var(--Style-Border-Radius)"})," and clips the active tab's background to fit the rounded shell (",le("code",{children:"overflow: hidden"})," is always on)."]})]})]})}),le(no,{value:1,children:le(h,{sx:{p:3},children:le(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),le(k,{spacing:0,children:[{label:"TabList",value:'role="tablist" aria-orientation'},{label:"Tab",value:'role="tab" aria-selected aria-controls={panelId}'},{label:"TabPanel",value:'role="tabpanel" aria-labelledby={tabId}'},{label:"Keyboard",value:"Arrow keys navigate tabs. Home/End jump to first/last."},{label:"Focus",value:"outline: 3px solid var(--Focus-Visible); outline-offset: -3px"},{label:"Indicator",value:"Standard: var(--Buttons-{C}-Border). Themed: var(--Text)."}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(oa,{children:[e,":"]}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const yd={small:{fontSize:"var(--Body-Small-Font-Size)",gap:"6px",py:"4px"},medium:{fontSize:"var(--Body-Font-Size)",gap:"8px",py:"6px"},large:{fontSize:"var(--Body-Large-Font-Size)",gap:"10px",py:"8px"}};function Sd({children:r,separator:t="/",size:a="medium",condense:i=!1,maxItems:o=4,itemsBeforeCollapse:n=1,itemsAfterCollapse:l=1,backOnlyMobile:s=!1,onExpand:d,className:p="",sx:m={},...f}){const g=yd[a]||yd.medium,x=c.toArray(r).filter(u),b=x.length,v=i&&b>o;let y=x;const[S,k]=e.useState(!1);if(v&&!S){const e=x.slice(0,n),r=x.slice(b-l);y=[...e,le(h,{component:"button",onClick:()=>{k(!0),d?.()},"aria-label":"Show full breadcrumb trail",className:"breadcrumb-ellipsis",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",padding:"2px 4px",cursor:"pointer",fontFamily:"inherit",fontSize:"inherit",color:"var(--Quiet)",borderRadius:"4px","&:hover":{backgroundColor:"var(--Hover)",color:"var(--Text)"},"&:active":{backgroundColor:"var(--Pressed)",color:"var(--Text)"},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"1px"}},children:"…"},"__breadcrumb-ellipsis"),...r]}const B=[];y.forEach((e,r)=>{const a=v&&!S?r===y.length-1:r===b-1;B.push(le(h,{component:"li",className:"breadcrumb-item"+(a?" breadcrumb-current":""),sx:{display:"inline-flex",alignItems:"center",...a&&{color:"var(--Text)",fontWeight:600},...!a&&{color:"var(--Quiet)"},maxWidth:"200px","& > *":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},...a?{"aria-current":"page"}:{},children:e},"crumb-"+r)),r<y.length-1&&B.push(le(h,{component:"li",role:"presentation","aria-hidden":"true",className:"breadcrumb-separator",sx:{display:"inline-flex",alignItems:"center",color:"var(--Quiet)",userSelect:"none",fontSize:"inherit",lineHeight:1,flexShrink:0},children:t},"sep-"+r))});const w=b>=2?x[b-2]:null;return de(h,{component:"nav","aria-label":"Breadcrumb",className:"breadcrumbs breadcrumbs-"+a+" "+p,sx:{fontSize:g.fontSize,fontFamily:"var(--Body-Font-Family)",lineHeight:1.5,...m},...f,children:[le(h,{component:"ol",className:"breadcrumbs-list",sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:g.gap,listStyle:"none",margin:0,padding:0,...s&&{"@media (max-width: 600px)":{display:"none"}}},children:B}),s&&w&&de(h,{className:"breadcrumbs-back-mobile",sx:{display:"none","@media (max-width: 600px)":{display:"flex",alignItems:"center",gap:"4px",fontSize:g.fontSize,color:"var(--Link)"}},children:[le(h,{component:"span","aria-hidden":"true",sx:{fontSize:"1.1em",lineHeight:1},children:"←"}),e.cloneElement(w,{style:{...w.props?.style||{},textDecoration:"underline",textUnderlineOffset:"3px"}})]})]})}function kd({children:e,href:r,className:t="",sx:a={},...i}){const o=!!r;return le(h,{component:o?"a":"span",href:r||void 0,className:"breadcrumb-link "+t,sx:{color:"inherit",textDecoration:o?"underline":"none",textUnderlineOffset:"3px",textDecorationThickness:"1px",cursor:o?"pointer":"default",transition:"color 0.15s ease",...o&&{"&:hover":{textDecorationThickness:"2px"},"&:active":{textDecorationThickness:"3px"},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"2px",borderRadius:"2px"}},...a},...i,children:e})}const Bd=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"";function wd({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Cd(){const[e,t]=r("medium"),[a,i]=r("/"),[o,n]=r(!1),[l,s]=r(null),[d,c]=r("Surface");return de(h,{sx:{pb:8},children:[le(qt,{children:"Breadcrumbs"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{theme:l,surface:d,children:de(Sd,{size:e,separator:a,condense:o,maxItems:3,children:[le(kd,{href:"#",children:"Home"}),le(kd,{href:"#",children:"Products"}),le(kd,{href:"#",children:"Shoes"}),le(kd,{children:"Running Shoes"})]})}),le(No,{code:(()=>{const r=[];return"medium"!==e&&r.push('size="'+e+'"'),"/"!==a&&r.push('separator="'+a+'"'),o&&r.push("condense maxItems={3}"),"<Breadcrumbs"+(r.length?" "+r.join(" "):"")+'>\n <BreadcrumbItem href="/">Home</BreadcrumbItem>\n <BreadcrumbItem href="/products">Products</BreadcrumbItem>\n <BreadcrumbItem href="/products/shoes">Shoes</BreadcrumbItem>\n <BreadcrumbItem>Running Shoes</BreadcrumbItem>\n</Breadcrumbs>'})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[le(h,{sx:{mb:3},children:le(ho,{theme:l,onThemeChange:s,surface:d,onSurfaceChange:c})}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),le(k,{direction:"row",spacing:1,children:["small","medium","large"].map(r=>le(wd,{label:Bd(r),selected:e===r,onClick:()=>t(r)},r))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SEPARATOR"}),le(k,{direction:"row",spacing:1,children:["/","›","→","·","|"].map(e=>le(wd,{label:e,selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Condense"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Collapse middle items into ellipsis"})]}),le(en,{variant:"default-outline",checked:o,onChange:e=>n(e.target.checked),size:"small","aria-label":"Condense"})]})]})}),le(no,{value:1,children:le(h,{sx:{p:3},children:le(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),le(k,{spacing:0,children:[{label:"Nav",value:'<nav aria-label="Breadcrumb">'},{label:"List",value:"<ol> with <li> for each crumb"},{label:"Current",value:'aria-current="page" on the last item'},{label:"Links",value:"BreadcrumbItem renders <a> when href is provided"},{label:"Ellipsis",value:'Expandable button with aria-label="Show full breadcrumb trail"'},{label:"Separator",value:'aria-hidden="true" — decorative only'}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(oa,{children:[e,":"]}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const Td={small:{btnSize:"small",fontSize:"13px",gap:"2px"},medium:{btnSize:"medium",fontSize:"14px",gap:"4px"},large:{btnSize:"large",fontSize:"16px",gap:"4px"}};function zd({count:e=10,page:t,defaultPage:a=1,onChange:o,color:n="default",size:l="medium",siblingCount:s=1,boundaryCount:d=1,disabled:c=!1,showFirstButton:u=!1,showLastButton:p=!1,className:m="",sx:f={},...g}){const[x,b]=r(a),v=void 0!==t,y=v?t:x;(e=>{e.charAt(0).toUpperCase(),e.slice(1)})("default"===n?"Default":n);const S=Td[l]||Td.medium,k=i(r=>{const t=Math.max(1,Math.min(e,r));v||b(t),o?.(t)},[e,v,o]),B=function({count:e,page:r,siblingCount:t=1,boundaryCount:a=1}){const i=(e,r)=>Array.from({length:r-e+1},(r,t)=>e+t);if(2*t+3+2*a>=e)return i(1,e);const o=Math.max(r-t,a+1),n=Math.min(r+t,e-a),l=o>a+2,s=n<e-a-1;if(!l&&s)return[...i(1,Math.min(3+2*t+a,e)),"ellipsis-right",...i(e-a+1,e)];if(l&&!s){const r=i(Math.max(e-(3+2*t+a)+1,1),e);return[...i(1,a),"ellipsis-left",...r]}return l&&s?[...i(1,a),"ellipsis-left",...i(o,n),"ellipsis-right",...i(e-a+1,e)]:i(1,e)}({count:e,page:y,siblingCount:s,boundaryCount:d}),w="default"===n?"default":n;return le(h,{component:"nav","aria-label":"Pagination",className:"pagination pagination-"+n+" pagination-"+l+" "+m,sx:{display:"inline-flex",...f},...g,children:de(h,{component:"ul",sx:{display:"flex",alignItems:"center",gap:S.gap,listStyle:"none",m:0,p:0,flexWrap:"wrap"},children:[u&&le(h,{component:"li",children:le(wi,{iconOnly:!0,variant:w+"-outline",size:S.btnSize,disabled:c||1===y,onClick:()=>k(1),"aria-label":"Go to first page",children:le(Na,{size:"small",children:le(Xr,{})})})}),le(h,{component:"li",children:le(wi,{iconOnly:!0,variant:w+"-outline",size:S.btnSize,disabled:c||1===y,onClick:()=>k(y-1),"aria-label":"Go to previous page",children:le(Na,{size:"small",children:le(Gr,{})})})}),B.map((e,r)=>{if("string"==typeof e)return le(h,{component:"li",children:le(ga,{style:{color:"var(--Quiet)",padding:"0 4px"},"aria-hidden":"true",children:"…"})},e+"-"+r);const t=e===y;return le(h,{component:"li",children:le(wi,{variant:t?w:w+"-outline",size:S.btnSize,disabled:c,onClick:()=>k(e),"aria-label":"Page "+e,"aria-current":t?"page":void 0,letterNumber:!0,children:e})},e)}),le(h,{component:"li",children:le(wi,{iconOnly:!0,variant:w+"-outline",size:S.btnSize,disabled:c||y===e,onClick:()=>k(y+1),"aria-label":"Go to next page",children:le(Na,{size:"small",children:le(Ur,{})})})}),p&&le(h,{component:"li",children:le(wi,{iconOnly:!0,variant:w+"-outline",size:S.btnSize,disabled:c||y===e,onClick:()=>k(e),"aria-label":"Go to last page",children:le(Na,{size:"small",children:le(Yr,{})})})})]})})}const Ad=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",Id=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}];function Rd({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Wd({color:e,selected:r,onClick:t}){const a=Ad(e);return le(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&le(ue,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function Dd(){const[e,t]=r("default"),[a,i]=r("medium"),[o,n]=r(10),[l,s]=r(!1),[d,c]=r(!1),[u,p]=r(!1),[m,f]=r(null),[g,x]=r("Surface");return de(h,{sx:{pb:8},children:[le(qt,{children:"Pagination"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{theme:m,surface:g,children:le(zd,{color:e,size:a,count:o,showFirstButton:l,showLastButton:d,disabled:u})}),le(No,{code:(()=>{const r=[];return"default"!==e&&r.push('color="'+e+'"'),"medium"!==a&&r.push('size="'+a+'"'),10!==o&&r.push("count={"+o+"}"),l&&r.push("showFirstButton"),d&&r.push("showLastButton"),u&&r.push("disabled"),r.push("onChange={handlePageChange}"),1===r.length?"<Pagination onChange={handlePageChange} />":"<Pagination\n "+r.join("\n ")+"\n/>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[le(h,{sx:{mb:3},children:le(ho,{theme:m,onThemeChange:f,surface:g,onSurfaceChange:x})}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{spacing:1.5,children:Id.map(r=>de(h,{children:[le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:r.label}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:r.colors.map(r=>le(Wd,{color:r,selected:e===r,onClick:t},r))})]},r.label))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),le(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>le(Rd,{label:Ad(e),selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"PAGES"}),le(k,{direction:"row",spacing:1,children:[5,10,20,50].map(e=>le(Rd,{label:String(e),selected:o===e,onClick:()=>n(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"First/Last Buttons"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Show jump to first/last page"})]}),le(en,{variant:"default-outline",checked:l,onChange:e=>{s(e.target.checked),c(e.target.checked)},size:"small","aria-label":"First/last buttons"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Disabled"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Non-interactive state"})]}),le(en,{variant:"default-outline",checked:u,onChange:e=>p(e.target.checked),size:"small","aria-label":"Disabled"})]})]})}),le(no,{value:1,children:le(h,{sx:{p:3},children:le(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),le(k,{spacing:0,children:[{label:"Nav",value:'<nav aria-label="Pagination">'},{label:"List",value:"<ol> with <li> for each button"},{label:"Current",value:'aria-current="page" on selected page'},{label:"Labels",value:'aria-label="Page N", "Go to previous/next/first/last page"'},{label:"Keyboard",value:"Tab navigates between buttons"},{label:"Focus",value:"Uses Button component focus styles"}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(oa,{children:[e,":"]}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const Pd=e=>e.charAt(0).toUpperCase()+e.slice(1),Fd={small:{py:"var(--Sizing-Half)",itemPx:"var(--Sizing-1)",itemPy:"var(--Sizing-Half)",fontSize:"var(--Sm-Button-Text)",minWidth:"140px"},medium:{py:"6px",itemPx:"var(--Sizing-1-and-Half)",itemPy:"6px",fontSize:"var(--Button-Text)",minWidth:"160px"},large:{py:"var(--Sizing-1)",itemPx:"var(--Sizing-2)",itemPy:"var(--Sizing-1)",fontSize:"var(--Lg-Button-Text)",minWidth:"180px"}},Ld=l({open:!1,setOpen:()=>{},anchorRef:{current:null},menuId:"",buttonId:"",variant:"outline",color:"default",size:"medium"}),Hd=()=>n(Ld);function Md({children:e,variant:o="outline",color:n="default",size:l="medium",open:s,onOpenChange:d,...c}){const[u,p]=r(!1),m=void 0!==s,f=m?s:u,g=a(null),x=t(),b="menu-"+x,v="menubtn-"+x,y=i(e=>{const r="function"==typeof e?e(f):e;m?d?.(r):p(r)},[m,f,d]);return le(Ld.Provider,{value:{open:f,setOpen:y,anchorRef:g,menuId:b,buttonId:v,variant:o,color:n,size:l},children:le(h,{sx:{display:"inline-flex",position:"relative"},...c,children:e})})}function Ed({children:e,className:r="",sx:t={},...a}){const{open:i,setOpen:o,anchorRef:n,menuId:l,buttonId:s,size:d,color:c}=Hd(),u=Fd[d]||Fd.medium,p=Pd("default"===c?"Default":c);return de(h,{component:"button",ref:n,id:s,"aria-haspopup":"true","aria-expanded":i,"aria-controls":i?l:void 0,onClick:()=>o(e=>!e),className:"menu-button "+r,sx:{display:"inline-flex",alignItems:"center",gap:"6px",padding:u.itemPy+" "+u.itemPx,fontSize:u.fontSize,fontFamily:"inherit",fontWeight:600,color:"var(--Text)",backgroundColor:"var(--Background)",border:"1px solid var(--Buttons-"+p+"-Border)",borderRadius:"var(--Style-Border-Radius)",cursor:"pointer",boxShadow:"none",transition:"box-shadow 0.15s ease","&:focus-visible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"},...t},onKeyDown:e=>{"ArrowDown"!==e.key&&"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),o(!0))},...a,children:["string"==typeof e?le("small"===d?oa:sa,{style:{color:"inherit",fontWeight:600},children:e}):e,le(Na,{size:"small",sx:{color:"var(--Quiet)",transition:"transform 0.2s ease",transform:i?"rotate(180deg)":"rotate(0deg)"},children:le(ve,{})})]})}function Od({children:e,className:r="",placement:t="bottom-start",sx:i={},...n}){const{open:l,setOpen:s,anchorRef:d,menuId:c,buttonId:u,variant:p,color:m,size:f}=Hd(),g=a(null),x=Fd[f]||Fd.medium,b=Pd("default"===m?"Default":m),v="var(--Buttons-"+b+"-Border)",y="light"===p?"default"===m?"Default":b:"solid"===p?b:void 0,S="light"===p?"Surface-Brightest":"solid"===p?"Surface":void 0;return o(()=>{if(l&&g.current){const e=g.current.querySelector('[role="menuitem"]:not([aria-disabled="true"])');e&&e.focus()}},[l]),o(()=>{if(!l)return;const e=e=>{g.current&&!g.current.contains(e.target)&&d.current&&!d.current.contains(e.target)&&s(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[l,s,d]),o(()=>{if(!l)return;const e=e=>{"Escape"===e.key&&(s(!1),d.current?.focus())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[l,s,d]),l?le(h,{className:"menu menu-"+p+" "+r,sx:{position:"absolute",top:"100%",left:"bottom-end"===t?"auto":0,right:"bottom-end"===t?0:"auto",zIndex:99999,marginTop:"4px",border:"1px solid "+v,borderRadius:"var(--Dropdown-Frame-Radius, var(--Input-Radius, var(--Style-Border-Radius, 4px)))",boxShadow:"none",overflow:"hidden",...i},children:le(h,{ref:g,id:c,role:"menu","aria-labelledby":u,"data-theme":y,"data-surface":S,sx:{minWidth:x.minWidth,backgroundColor:"var(--Background)",color:"var(--Text)",fontSize:x.fontSize,fontFamily:"inherit",padding:x.py+" 0",outline:"none",borderRadius:"calc(var(--Dropdown-Frame-Radius, var(--Input-Radius, var(--Style-Border-Radius, 4px))) - 1px)"},onKeyDown:e=>{const r=g.current?.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])');if(!r?.length)return;const t=Array.from(r).indexOf(document.activeElement);"ArrowDown"===e.key?(e.preventDefault(),r[(t+1)%r.length].focus()):"ArrowUp"===e.key?(e.preventDefault(),r[(t-1+r.length)%r.length].focus()):"Home"===e.key?(e.preventDefault(),r[0].focus()):"End"===e.key?(e.preventDefault(),r[r.length-1].focus()):"Tab"===e.key&&s(!1)},...n,children:e})}):null}function Nd({children:e,onClick:r,selected:t=!1,disabled:a=!1,className:i="",sx:o={},...n}){const{setOpen:l,size:s}=Hd(),d=Fd[s]||Fd.medium,c=t?"small"===s?ra:ea:"small"===s?oa:sa,u=()=>{a||(r?.(),l(!1))};return le(h,{role:"menuitem",tabIndex:a?-1:0,"aria-disabled":a||void 0,"aria-selected":t||void 0,onClick:u,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),u())},className:"menu-item"+(t?" menu-item-selected":"")+" "+i,sx:{display:"flex",alignItems:"center",gap:"var(--Sizing-1)",padding:d.itemPy+" "+d.itemPx,fontSize:d.fontSize,color:a?"var(--Quiet)":t?"var(--Text)":"var(--Quiet)",backgroundColor:t?"var(--Hover)":"transparent",cursor:a?"not-allowed":"pointer",opacity:a?"var(--Disabled, 0.38)":1,outline:"none",transition:"background-color 0.1s ease, color 0.1s ease",userSelect:"none",...!a&&{"&:hover":{backgroundColor:"var(--Hover)",color:"var(--Text)"},"&:active":{backgroundColor:"var(--Pressed)",color:"var(--Text)"},"&:focus-visible":{backgroundColor:"var(--Hover)",color:"var(--Text)",outline:"3px solid var(--Focus-Visible)",outlineOffset:"-3px"}},...o},...n,children:le(c,{color:"standard",style:{color:"inherit"},children:e})})}function Qd({className:e="",sx:r={},...t}){return le(h,{component:"hr",role:"separator",className:"menu-divider "+e,sx:{border:"none",borderTop:"1px solid var(--Border)",margin:"4px 0",...r},...t})}const Vd=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",jd=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}];function Gd({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Ud({color:e,selected:r,onClick:t}){const a=Vd(e);return le(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&le(ue,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function Xd(){const[e,t]=r("outline"),[a,i]=r("default"),[o,n]=r("medium"),[l,s]=r(null),[d,c]=r("Surface");return de(h,{sx:{pb:8},children:[le(qt,{children:"Menu"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{theme:l,surface:d,sx:{minHeight:250,alignItems:"flex-start",pt:6},children:de(Md,{variant:e,color:a,size:o,children:[le(Ed,{children:"Actions"}),de(Od,{children:[le(Nd,{children:"Edit"}),le(Nd,{children:"Duplicate"}),le(Nd,{selected:!0,children:"Archive"}),le(Qd,{}),le(Nd,{disabled:!0,children:"Delete"})]})]})}),le(No,{code:(()=>{const r=[];return"outline"!==e&&r.push('variant="'+e+'"'),"default"!==a&&r.push('color="'+a+'"'),"medium"!==o&&r.push('size="'+o+'"'),"<Dropdown "+r.join(" ")+">\n <MenuButton>Actions</MenuButton>\n <Menu>\n <MenuItem>Edit</MenuItem>\n <MenuItem>Duplicate</MenuItem>\n <MenuDivider />\n <MenuItem>Delete</MenuItem>\n </Menu>\n</Dropdown>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[le(h,{sx:{mb:3},children:le(ho,{theme:l,onThemeChange:s,surface:d,onSurfaceChange:c})}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),le(k,{direction:"row",spacing:1,children:["outline","solid","light"].map(r=>le(Gd,{label:Vd(r),selected:e===r,onClick:()=>t(r)},r))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{spacing:1.5,children:jd.map(e=>de(h,{children:[le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:e.label}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:e.colors.map(e=>le(Ud,{color:e,selected:a===e,onClick:i},e))})]},e.label))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),le(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>le(Gd,{label:Vd(e),selected:o===e,onClick:()=>n(e)},e))})]})]})}),le(no,{value:1,children:le(h,{sx:{p:3},children:le(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),le(k,{spacing:0,children:[{label:"Button",value:'aria-haspopup="true" aria-expanded aria-controls'},{label:"Menu",value:'role="menu" aria-labelledby={buttonId}'},{label:"Items",value:'role="menuitem" with tabIndex'},{label:"Selected",value:'aria-selected="true" on active item'},{label:"Disabled",value:'aria-disabled="true", not focusable'},{label:"Keyboard",value:"Arrow keys navigate. Enter/Space selects. Escape closes."},{label:"Focus",value:"First item focused on open. Focus returns to button on close."}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(oa,{children:[e,":"]}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}let Yd=0;const qd={default:"Nav-Bar",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},Zd="var(--Sizing-1, 8px)",Jd="40px",Kd="var(--Icon-Size, 24px)",$d="var(--Sizing-Half, 4px)",_d={horizontal:{px:"var(--Button-Height, 32px)",py:"12px"},vertical:{px:"var(--Sizing-1-and-Half, 12px)",py:"var(--Sizing-2, 16px)"}},ec={px:0,py:0};function rc({items:e=[],value:t,defaultValue:o=0,onChange:n,showLabels:l=!0,variant:s="fixed",orientation:d="horizontal",barColor:c="default",fabAction:u,fabPosition:p="end",fixed:m=!0,"aria-label":f="Bottom navigation",className:g="",sx:x={},...b}){const[v,y]=r(o),S=void 0!==t,k=S?t:v,B=i(e=>{S||y(e),n?.(e)},[S,n]),w="vertical"===d,C="floating"===s,T=qd[c]||qd.default,z=C?w?_d.vertical:_d.horizontal:ec,A=a(null);null===A.current&&(A.current="bottom-nav-"+Yd++);const I=e=>A.current+"-tab-"+e,R=!!u;return de(h,{component:"nav","data-theme":T,"data-surface":"Surface-Dim","aria-label":f,className:"bottom-nav bottom-nav-"+c+" bottom-nav-style-"+(C?"floating":"fixed")+" bottom-nav-bar-"+d+(l?" bottom-nav-labels":" bottom-nav-no-labels")+(m?" bottom-nav-fixed":"")+(g?" "+g:""),sx:{display:"flex",flexDirection:w?"column":"row",alignItems:"center",justifyContent:"center",backgroundColor:"var(--Background)",borderRadius:C?"83px":0,fontFamily:"inherit",width:w?"fit-content":"100%",px:z.px,py:z.py,...m&&{position:"fixed",zIndex:1100,...w?{top:"50%",left:0,transform:"translateY(-50%)"}:{bottom:0,left:0,right:0}},...x},...b,children:[R&&le(h,{role:"tablist","aria-orientation":w?"vertical":"horizontal","aria-owns":e.map((e,r)=>I(r)).join(" "),sx:{position:"absolute",width:0,height:0,overflow:"hidden"}}),de(h,{role:R?void 0:"tablist","aria-orientation":R?void 0:w?"vertical":"horizontal",sx:{display:"flex",flexDirection:w?"column":"row",alignItems:"center",justifyContent:w?"flex-start":"space-between",gap:w?"10px":0,width:w?"auto":"100%",maxWidth:w?void 0:600},children:[e.map((e,r)=>le(tc,{id:R?I(r):void 0,icon:e.icon,label:e.label,selected:r===k,showLabel:l,onClick:()=>B(r),ariaLabel:e.label||e.ariaLabel,disabled:e.disabled},e.key||r)).flatMap((e,r,t)=>{if(!u)return[e];return r===("center"===p?Math.ceil(t.length/2):t.length)-1?[e,le(ic,{...u,showLabel:l,position:p},"fab")]:[e]}),u&&0===e.length&&le(ic,{...u,showLabel:l,position:p},"fab")]})]})}function tc({id:e,icon:r,label:t,selected:a,showLabel:i,onClick:o,ariaLabel:n,disabled:l}){return de(h,{component:"button",type:"button",role:"tab",id:e,"aria-selected":a,"aria-label":n,onClick:o,disabled:l,"aria-disabled":l||void 0,className:"bottom-nav-item"+(a?" bottom-nav-item-selected":""),sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:$d,width:40,flexShrink:0,border:"none",backgroundColor:"transparent",cursor:"pointer",padding:0,fontFamily:"inherit",outline:"none","&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"2px",borderRadius:"8px"},"&:disabled":{opacity:"var(--Disabled, 0.38)",cursor:"not-allowed"}},children:[le(h,{sx:{display:"flex",alignItems:"center",justifyContent:"center",minWidth:32,minHeight:32,padding:Zd,borderRadius:Jd,backgroundColor:a?"var(--Text)":"transparent",color:a?"var(--Background)":"var(--Quiet)",fontSize:Kd,transition:"background-color 0.2s ease, color 0.15s ease","& .MuiSvgIcon-root":{fontSize:"inherit",color:"inherit"},".bottom-nav-item:hover &":a?{backgroundColor:"var(--Text)"}:{color:"var(--Text)",backgroundColor:"var(--Hover)"},".bottom-nav-item:active &":a?{backgroundColor:"var(--Text)"}:{color:"var(--Text)",backgroundColor:"var(--Pressed)"},".bottom-nav-item:disabled:hover &":{backgroundColor:"transparent"}},children:r}),i&&t&&le(ba,{className:"bottom-nav-label",style:{color:a?"var(--Text)":"var(--Quiet)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},children:t})]})}const ac=32;function ic({icon:e,label:t,onClick:i,showLabel:n,actions:l,position:s="end"}){const d=Array.isArray(l)&&l.length>0,[c,u]=r(!1),p=a(null);o(()=>{if(!c)return;const e=e=>{p.current&&!p.current.contains(e.target)&&u(!1)},r=e=>{"Escape"===e.key&&u(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",r),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",r)}},[c]);const m=e=>({display:"flex",alignItems:"center",justifyContent:"center",minWidth:e,minHeight:e,boxSizing:"border-box",borderRadius:Jd,borderWidth:"var(--Button-Border-Width, 1px)",borderStyle:"solid",borderColor:"var(--Buttons-Default-Border)",color:"var(--Buttons-Default-Border)",backgroundColor:"transparent","& .MuiSvgIcon-root":{fontSize:"inherit",color:"inherit"}}),f="center"!==s;return de(h,{ref:p,sx:{position:"relative",display:"flex",flexShrink:0},children:[de(h,{component:"button",type:"button","aria-label":t||"Action",onClick:e=>{d&&u(e=>!e),i?.(e)},...d?{"aria-haspopup":"menu","aria-expanded":c}:{},className:"bottom-nav-fab"+(c?" bottom-nav-fab-open":""),sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:$d,width:40,flexShrink:0,border:"none",backgroundColor:"transparent",cursor:"pointer",padding:0,fontFamily:"inherit",outline:"none","&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"2px",borderRadius:"8px"}},children:[le(h,{sx:{...m(32),padding:Zd,fontSize:Kd,transition:"background-color 0.15s ease, transform 0.2s ease",transform:c?"rotate(45deg)":"none",".bottom-nav-fab:hover &":{backgroundColor:"var(--Hover)"},".bottom-nav-fab:active &":{backgroundColor:"var(--Pressed)"}},children:e||le(Tr,{})}),n&&t&&le(ba,{className:"bottom-nav-label",style:{color:"var(--Buttons-Default-Border)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},children:t})]}),d&&c&&le(h,{role:"menu","aria-label":t||"Actions",className:"bottom-nav-dial","data-surface":"Surface-Brightest",sx:{position:"absolute",bottom:"calc(100% + var(--Sizing-1, 8px))",...f?{right:0}:{left:0},zIndex:1,display:"flex",flexDirection:"column-reverse",padding:"var(--Sizing-1, 8px)",gap:"var(--Sizing-1, 8px)",backgroundColor:"var(--Background)",color:"var(--Text)",border:"1px solid var(--Border)",borderRadius:"var(--Dropdown-Frame-Radius, var(--Input-Radius, var(--Style-Border-Radius, 4px)))",boxShadow:"var(--Effect-Level-3, none)",whiteSpace:"nowrap"},children:l.map((e,r)=>de(h,{component:"button",type:"button",role:"menuitem","aria-label":e.label,className:"bottom-nav-dial-item",onClick:r=>{u(!1),e.onClick?.(r)},sx:{display:"flex",alignItems:"center",gap:"var(--Sizing-1, 8px)",flexDirection:f?"row-reverse":"row",border:"none",backgroundColor:"transparent",cursor:"pointer",padding:0,fontFamily:"inherit",color:"inherit",outline:"none",borderRadius:Jd,"&:hover":{backgroundColor:"var(--Hover)"},"&:active":{backgroundColor:"var(--Pressed)"},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"2px"},"&:disabled":{opacity:"var(--Disabled, 0.38)",cursor:"not-allowed"}},children:[le(h,{sx:{width:40,display:"flex",justifyContent:"center",flexShrink:0},children:le(h,{sx:{...m(ac),fontSize:"var(--Icon-Size-Small, 16px)"},children:e.icon||le(Tr,{})})}),le(va,{style:{color:"inherit"},children:e.label})]},e.key||r))})]})}const oc={Home:le(Se,{sx:{fontSize:"inherit"}}),Explore:le(qr,{sx:{fontSize:"inherit"}}),Radio:le(Zr,{sx:{fontSize:"inherit"}}),Library:le(Jr,{sx:{fontSize:"inherit"}}),Favorite:le(ye,{sx:{fontSize:"inherit"}}),Person:le(he,{sx:{fontSize:"inherit"}}),Search:le(we,{sx:{fontSize:"inherit"}}),Settings:le(Be,{sx:{fontSize:"inherit"}}),Notifications:le(Te,{sx:{fontSize:"inherit"}}),Cart:le(Ae,{sx:{fontSize:"inherit"}}),Star:le(Ce,{sx:{fontSize:"inherit"}}),Bookmark:le(Kr,{sx:{fontSize:"inherit"}})},nc=Object.keys(oc),lc=[{icon:"Home",label:"Home"},{icon:"Explore",label:"Browse"},{icon:"Radio",label:"Radio"},{icon:"Library",label:"Library"}],sc=[{value:"default",label:"Default",desc:'data-theme="Nav-Bar"'},{value:"primary",label:"Primary",desc:'data-theme="Primary"'},{value:"primary-light",label:"Primary Light",desc:'data-theme="Primary-Light"'},{value:"primary-medium",label:"Primary Medium",desc:'data-theme="Primary-Medium"'},{value:"primary-dark",label:"Primary Dark",desc:'data-theme="Primary-Dark"'},{value:"white",label:"White",desc:'data-theme="White"'},{value:"black",label:"Black",desc:'data-theme="Black"'}];function dc({label:e,selected:r,onClick:t,disabled:a}){return le(h,{component:"button",onClick:t,disabled:a,sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:a?"not-allowed":"pointer",border:"2px solid var(--Buttons-Primary-Button)",borderRadius:"var(--Style-Border-Radius)",backgroundColor:r?"var(--Buttons-Primary-Button)":"transparent",color:r?"var(--Buttons-Primary-Text)":"var(--Text)",padding:"4px 12px",fontSize:"14px",fontFamily:"inherit",fontWeight:500,whiteSpace:"nowrap",flexShrink:0,opacity:a?.4:1,transition:"background-color 0.15s ease, color 0.15s ease","&:hover":{backgroundColor:a?"transparent":r?"var(--Buttons-Primary-Hover)":"var(--Surface-Dim)"},"&:focus-visible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"}},children:e})}function cc({value:e,onChange:r,placeholder:t,sx:a}){return le(h,{component:"input",type:"text",value:e,onChange:e=>r(e.target.value),placeholder:t,sx:{flex:1,padding:"4px 8px",fontSize:"13px",fontFamily:"inherit",border:"1px solid var(--Border)",borderRadius:"4px",backgroundColor:"var(--Background)",color:"var(--Text)",outline:"none",minWidth:0,"&:focus":{borderColor:"var(--Focus-Visible)"},...a}})}function uc({value:e,onChange:r,options:t,label:a}){return le(h,{component:"select",value:e,onChange:e=>r(e.target.value),"aria-label":a,sx:{padding:"4px 6px",fontSize:"13px",fontFamily:"inherit",border:"1px solid var(--Border)",borderRadius:"4px",backgroundColor:"var(--Background)",color:"var(--Text)",outline:"none",cursor:"pointer","&:focus":{borderColor:"var(--Focus-Visible)"}},children:t.map(e=>le("option",{value:"string"==typeof e?e:e.value,children:"string"==typeof e?e:e.label},"string"==typeof e?e:e.value))})}function hc({value:e,onChange:r,min:t,max:a,label:i}){return de(h,{sx:{display:"flex",alignItems:"center",gap:1},children:[le(ga,{style:{color:"var(--Text-Quiet)",flexShrink:0,width:90},children:i}),le("button",{type:"button",onClick:()=>{e>t&&r(e-1)},disabled:e<=t,style:{width:28,height:28,display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--Border)",borderRadius:"4px",backgroundColor:"var(--Background)",color:"var(--Text)",cursor:e<=t?"not-allowed":"pointer",fontSize:"14px",opacity:e<=t?.4:1,fontFamily:"inherit"},children:"−"}),le(h,{sx:{fontWeight:700,fontSize:"14px",minWidth:24,textAlign:"center"},children:e}),le("button",{type:"button",onClick:()=>{e<a&&r(e+1)},disabled:e>=a,style:{width:28,height:28,display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--Border)",borderRadius:"4px",backgroundColor:"var(--Background)",color:"var(--Text)",cursor:e>=a?"not-allowed":"pointer",fontSize:"14px",opacity:e>=a?.4:1,fontFamily:"inherit"},children:"+"})]})}function pc({label:e,checked:r,onChange:t,caption:a,disabled:i}){return de(h,{sx:{py:.5,opacity:i?.4:1},children:[le(b,{control:le(x,{checked:r,onChange:e=>t(e.target.checked),size:"small",disabled:i,sx:{color:"var(--Text-Quiet)","&.Mui-checked":{color:"var(--Buttons-Primary-Button)"}}}),label:le(ya,{children:e}),sx:{m:0}}),a&&le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginLeft:32},children:a})]})}function mc(){const[e,t]=r(0),[a,i]=r(0),[n,l]=r(!0),[s,d]=r(!0),[c,u]=r("fixed"),[p,m]=r("horizontal"),[f,g]=r("default"),[x,b]=r(4),[v,y]=r(lc.map(e=>({icon:e.icon,label:e.label})));o(()=>{y(e=>{const r=[],t=[{icon:"Favorite",label:"Favorites"},{icon:"Person",label:"Profile"}];for(let a=0;a<x;a++)if(e[a])r.push(e[a]);else{const e=t[a-lc.length]||{icon:nc[a%nc.length],label:nc[a%nc.length]};r.push(e)}return r}),i(e=>Math.min(e,x-1))},[x]);const S=(e,r,t)=>{y(a=>{const i=[...a];return i[e]={...i[e],[r]:t},i})},B=v.slice(0,x).map(e=>({icon:oc[e.icon]||oc.Home,label:e.label}));return de(h,{sx:{pb:8},children:[le(qt,{children:"Bottom Navigation"}),de(M,{value:e,onChange:(e,r)=>t(r),sx:{mt:3,mb:0,borderBottom:"1px solid var(--Border)","& .MuiTabs-indicator":{backgroundColor:"var(--Buttons-Primary-Button)",height:3},"& .MuiTab-root":{color:"var(--Text-Quiet)",textTransform:"none",fontWeight:500,"&.Mui-selected":{color:"var(--Text)"}}},children:[le(E,{label:"Playground"}),le(E,{label:"Accessibility"})]}),0===e&&de(C,{container:!0,sx:{minHeight:400},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"calc((100vw - 432px) / 2)"},flexShrink:0},children:[de(h,{sx:{p:4,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:300,backgroundColor:"var(--Background)",borderBottom:"1px solid var(--Border)",gap:4},children:[le(h,{sx:{width:"100%",maxWidth:500,overflow:"hidden",boxShadow:"0 2px 12px rgba(0,0,0,0.08)"},children:le(rc,{items:B,value:a,onChange:i,showLabels:s,variant:c,orientation:p,barColor:f,fixed:!1},"bn-"+x+"-"+c+"-"+p+"-"+s+"-"+f)}),de(ga,{style:{color:"var(--Text-Quiet)",textAlign:"center"},children:[x," items · ",s?"Labels":"Icons only"," · ","floating"===c?"Floating":"Fixed"," · ","vertical"===p?"Vertical":"Horizontal"," · ",(sc.find(e=>e.value===f)||sc[0]).label]})]}),le(No,{code:(()=>{const e=[];e.push("const items = ["),B.forEach((r,t)=>{const a=v[t];e.push(" { icon: <"+a.icon+"Icon />, label: '"+a.label+"' },")}),e.push("];"),e.push("");const r=[];return r.push("items={items}"),"default"!==f&&r.push('barColor="'+f+'"'),s||r.push("showLabels={false}"),"fixed"!==c&&r.push('variant="'+c+'"'),"horizontal"!==p&&r.push('orientation="'+p+'"'),n||r.push("fixed={false}"),e.push("<BottomNavigation"),r.forEach(r=>e.push(" "+r)),e.push("/>"),e.join("\n")})(),language:"JSX",sx:{borderRadius:0,borderBottom:"1px solid var(--Border)"}})]}),de(C,{item:!0,sx:{width:{xs:"calc(100vw - 432px)",md:"calc((100vw - 432px) / 2)"},flexShrink:0,p:3,backgroundColor:"var(--Container)",overflowY:"auto"},children:[le(Zt,{children:"Playground"}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"BAR COLOR"}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:sc.map(e=>le(dc,{label:e.label,selected:f===e.value,onClick:()=>g(e.value)},e.value))}),de(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:[(sc.find(e=>e.value===f)||sc[0]).desc,' · data-surface="Surface-Dim" · bg: var(--Background)']})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"OPTIONS"}),de(k,{spacing:0,children:[le(pc,{label:"Fixed",checked:n,onChange:l,caption:"Position fixed to bottom of viewport."}),le(pc,{label:"Labels",checked:s,onChange:d,caption:"Show text labels with icons."}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Selected paints a filled circle in var(--Text) with the icon reversed out of it. Not a choice — the design has one selected state, so there is no switch for it."})]})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),de(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:[le(dc,{label:"Fixed",selected:"fixed"===c,onClick:()=>u("fixed")}),le(dc,{label:"Floating",selected:"floating"===c,onClick:()=>u("floating")})]}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:"floating"===c?"A pill, rounded to its own height so the ends stay semicircular at any length.":"A square band, edge to edge."}),le(wa,{style:{color:"var(--Text-Quiet)",display:"block",margin:"16px 0 8px"},children:"ORIENTATION"}),de(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:[le(dc,{label:"Horizontal",selected:"horizontal"===p,onClick:()=>m("horizontal")}),le(dc,{label:"Vertical",selected:"vertical"===p,onClick:()=>m("vertical")})]}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:"The BAR's direction, not the label's — the label is always under the icon. Vertical is a rail of actions down one side."})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"NAVIGATION ITEMS"}),le(hc,{label:"Count",value:x,onChange:b,min:3,max:6}),le(k,{spacing:1.5,sx:{mt:2},children:v.slice(0,x).map((e,r)=>de(h,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"nowrap"},children:[le(ga,{style:{color:"var(--Text-Quiet)",flexShrink:0,width:16,textAlign:"right"},children:r+1}),le(uc,{value:e.icon,onChange:e=>S(r,"icon",e),options:nc,label:"Item "+(r+1)+" icon"}),s&&le(cc,{value:e.label,onChange:e=>S(r,"label",e),placeholder:"Label"})]},r))})]})]})]}),1===e&&de(h,{sx:{p:4},children:[le(Zt,{children:"Accessibility Requirements"}),de(oa,{color:"quiet",style:{marginBottom:32},children:[x," items · ",s?"Labels":"Icons only"," · ","floating"===c?"Floating":"Fixed"," · ","vertical"===p?"Vertical":"Horizontal"," · ",(sc.find(e=>e.value===f)||sc[0]).label]}),de(k,{spacing:4,children:[de(h,{sx:{p:3,backgroundColor:"var(--Container)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),de(k,{spacing:0,children:[de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Landmark:"}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:'<nav role="navigation" aria-label="Bottom navigation">'})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Tab list:"}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:'role="tablist"'})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Tab items:"}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:'role="tab", aria-selected, aria-label'})]}),de(h,{sx:{py:1.5},children:[le(oa,{children:"Focus:"}),le(ga,{style:{color:"var(--Text-Quiet)"},children:"3px solid var(--Focus-Visible) on :focus-visible."})]})]})]}),de(h,{sx:{p:3,backgroundColor:"var(--Container)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"Token Reference"}),de(k,{spacing:0,children:[de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Bar:"}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:'Always: data-surface="Surface-Dim" · bg: var(--Background). Theme set by data-theme (Nav-Bar, Primary, Primary-Light, etc.).'})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Unselected icon/label:"}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:"var(--Text-Quiet)"})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Selected:"}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:"var(--Text)"})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Selected pill:"}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:"bg: var(--Buttons-Primary-Button) · border: 1px solid var(--Buttons-Primary-Border) · icon/text: var(--Buttons-Primary-Text)"})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Backfill + horizontal label:"}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:"Label inside pill: var(--Buttons-Primary-Text)"})]}),de(h,{sx:{py:1.5},children:[le(oa,{children:"Backfill + vertical label:"}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:"Label below pill: var(--Text)"})]})]})]}),de(h,{sx:{p:3,backgroundColor:"var(--Container)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"Best Practices"}),de(k,{spacing:0,children:[de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Item count:"}),le(ga,{style:{color:"var(--Text-Quiet)"},children:"3–5 recommended. 6 maximum."})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Horizontal layout:"}),le(ga,{style:{color:"var(--Text-Quiet)"},children:"Only available with 4 or fewer items."})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Labels:"}),le(ga,{style:{color:"var(--Text-Quiet)"},children:"Always recommended for clarity."})]}),de(h,{sx:{py:1.5},children:[le(oa,{children:"Fixed:"}),le(ga,{style:{color:"var(--Text-Quiet)"},children:"Add bottom padding to main content to avoid overlap."})]})]})]})]})]})]})}const fc={default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},gc={small:{indicator:24,fontSize:"11px",labelFontSize:"13px",connectorThickness:2,gap:0},medium:{indicator:32,fontSize:"13px",labelFontSize:"14px",connectorThickness:2,gap:0},large:{indicator:40,fontSize:"16px",labelFontSize:"16px",connectorThickness:2,gap:0}},xc=l({orientation:"horizontal",size:"medium",color:"primary",activeStep:0,clickable:!1,onStepClick:null,dashedIncomplete:!1,totalSteps:0}),bc=()=>n(xc);function vc({children:r,orientation:t="horizontal",size:a="medium",color:i="primary",activeStep:o=0,clickable:n=!1,onStepClick:l,dashedIncomplete:s=!1,className:d="",sx:c={},...u}){const p=e.Children.toArray(r).filter(e.isValidElement),m=p.length,f="horizontal"===t;return le(xc.Provider,{value:{orientation:t,size:a,color:i,activeStep:o,clickable:n,onStepClick:l,dashedIncomplete:s,totalSteps:m},children:le(h,{component:"ol",role:"list","aria-label":"Progress",className:"stepper stepper-"+t+" stepper-"+a+" stepper-"+i+" "+d,sx:{display:"flex",flexDirection:f?"row":"column",alignItems:f?"flex-start":"stretch",listStyle:"none",margin:0,padding:0,width:"100%",gap:0,...c},...u,children:p.map((r,t)=>e.cloneElement(r,{_index:t,key:r.key||t}))})})}function yc({children:e,icon:r,label:t,disabled:a=!1,_index:i=0,className:o="",sx:n={},...l}){const{orientation:s,size:d,color:c,activeStep:u,clickable:p,onStepClick:m,dashedIncomplete:f,totalSteps:g}=bc(),x=p&&!a,b=gc[d]||gc.medium,v=fc[c]||"Primary",y="horizontal"===s,S=i===u,k=i<u,B=i>u,w=i===g-1,C=r||i+1,T=t||e,z="var(--Buttons-"+v+"-Border)",A=S||k?"var(--Buttons-"+v+"-Button)":"transparent",I=S||k?"var(--Buttons-"+v+"-Text)":"var(--Text)",R=S||k?"var(--Buttons-"+v+"-Hover)":"var(--Hover)",W=S||k?"var(--Buttons-"+v+"-Pressed)":"var(--Pressed)",D=le(h,{component:x?"button":"div",onClick:x?()=>m?.(i):void 0,onKeyDown:x?e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),m?.(i))}:void 0,tabIndex:x?0:void 0,role:x?"button":void 0,"aria-label":x?"Go to step "+(i+1):void 0,"aria-current":S?"step":void 0,"aria-disabled":a||void 0,className:"step-indicator step-indicator-"+d+(S?" step-indicator-active":"")+(k?" step-indicator-completed":"")+(B?" step-indicator-incomplete":"")+(x?" step-indicator-clickable":""),sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:b.indicator+"px",height:b.indicator+"px",minWidth:b.indicator+"px",minHeight:b.indicator+"px",borderRadius:"50%",border:(S?"2px":"1px")+" solid "+z,backgroundColor:A,color:I,fontSize:b.fontSize,fontFamily:"inherit",fontWeight:700,lineHeight:1,flexShrink:0,position:"relative",transition:"background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease",cursor:a?"not-allowed":x?"pointer":"default",outline:"none",padding:0,...a&&{opacity:"var(--Disabled, 0.38)"},..."small"===d&&{"&::after":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"24px",height:"24px",borderRadius:"50%"}},...x&&{"&:hover":{backgroundColor:R},"&:active":{backgroundColor:W},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"2px"}}},children:C}),P=w?null:le(h,{className:"step-connector"+(k?" step-connector-completed":"")+(B?" step-connector-incomplete":"")+(f&&B?" step-connector-dashed":""),"aria-hidden":"true",sx:{flex:1,...y?{height:b.connectorThickness+"px",minWidth:"20px",alignSelf:"flex-start",marginTop:b.indicator/2-b.connectorThickness/2+"px",marginLeft:"8px",marginRight:"8px"}:{width:b.connectorThickness+"px",minHeight:"24px",marginLeft:b.indicator/2-b.connectorThickness/2+"px",marginTop:"4px",marginBottom:"4px"},backgroundColor:k?"var(--Buttons-"+v+"-Button)":"var(--Border)",...f&&B&&{backgroundColor:"transparent",backgroundImage:y?"repeating-linear-gradient(90deg, var(--Border) 0px, var(--Border) 6px, transparent 6px, transparent 12px)":"repeating-linear-gradient(180deg, var(--Border) 0px, var(--Border) 6px, transparent 6px, transparent 12px)",backgroundSize:y?"12px 100%":"100% 12px"},transition:"background-color 0.15s ease"}}),F=T?le("small"===d?ga:oa,{style:{fontWeight:S?600:400,color:S||k?"var(--Text)":"var(--Quiet)",textAlign:y?"center":"left",whiteSpace:"nowrap",lineHeight:1.3},children:T}):null;return de(h,y?{component:"li",className:"step step-"+d+" step-horizontal"+(S?" step-active":"")+(k?" step-completed":"")+(B?" step-incomplete":"")+" "+o,sx:{display:"flex",alignItems:"center",flex:w?"none":1,...n},...l,children:[de(h,{sx:{display:"flex",flexDirection:"column",alignItems:"center",flexShrink:0},children:[D,F&&le(h,{sx:{mt:"4px"},children:F})]}),P]}:{component:"li",className:"step step-"+d+" step-vertical"+(S?" step-active":"")+(k?" step-completed":"")+(B?" step-incomplete":"")+" "+o,sx:{display:"flex",flexDirection:"column",alignItems:"flex-start",...n},...l,children:[de(h,{sx:{display:"flex",alignItems:"center",gap:"8px"},children:[D,F]}),P]})}const Sc=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",kc=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}],Bc=["Account","Details","Review","Confirm","Complete","Done"];function wc({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Cc({color:e,selected:r,onClick:t}){const a=Sc(e);return le(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&le(ue,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function Tc(){const[e,t]=r("default"),[a,i]=r("medium"),[o,n]=r("horizontal"),[l,s]=r(4),[d,c]=r(1),[u,p]=r(!1),[m,f]=r(!1),[g,x]=r(null),[b,v]=r("Surface");return de(h,{sx:{pb:8},children:[le(qt,{children:"Stepper"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{theme:g,surface:b,children:le(h,{sx:{width:"100%",maxWidth:"vertical"===o?300:"100%"},children:le(vc,{color:e,size:a,orientation:o,activeStep:d,clickable:u,onStepClick:u?c:void 0,dashedIncomplete:m,children:Bc.slice(0,l).map(e=>le(yc,{label:e},e))})})}),le(No,{code:(()=>{const r=[];return"default"!==e&&r.push('color="'+e+'"'),"medium"!==a&&r.push('size="'+a+'"'),"horizontal"!==o&&r.push('orientation="vertical"'),r.push("activeStep={"+d+"}"),u&&r.push("clickable onStepClick={setActiveStep}"),m&&r.push("dashedIncomplete"),"<Stepper "+r.join(" ")+">\n"+Bc.slice(0,l).map(e=>' <Step label="'+e+'" />').join("\n")+"\n</Stepper>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[le(h,{sx:{mb:3},children:le(ho,{theme:g,onThemeChange:x,surface:b,onSurfaceChange:v})}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STEPS"}),le(k,{direction:"row",spacing:1,children:[2,3,4,5,6].map(e=>le(wc,{label:String(e),selected:l===e,onClick:()=>{s(e),d>=e&&c(e-1)}},e))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"ACTIVE STEP"}),le(k,{direction:"row",spacing:1,children:Bc.slice(0,l).map((e,r)=>le(wc,{label:String(r+1),selected:d===r,onClick:()=>c(r)},r))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{spacing:1.5,children:kc.map(r=>de(h,{children:[le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:r.label}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:r.colors.map(r=>le(Cc,{color:r,selected:e===r,onClick:t},r))})]},r.label))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),le(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>le(wc,{label:Sc(e),selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"ORIENTATION"}),le(k,{direction:"row",spacing:1,children:["horizontal","vertical"].map(e=>le(wc,{label:Sc(e),selected:o===e,onClick:()=>n(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Clickable"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Steps are interactive buttons"})]}),le(en,{variant:"default-outline",checked:u,onChange:e=>p(e.target.checked),size:"small","aria-label":"Clickable"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Dashed Incomplete"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Dashed connector for future steps"})]}),le(en,{variant:"default-outline",checked:m,onChange:e=>f(e.target.checked),size:"small","aria-label":"Dashed incomplete"})]})]})}),le(no,{value:1,children:le(h,{sx:{p:3},children:le(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),le(k,{spacing:0,children:[{label:"Container",value:'<ol role="list" aria-label="Progress">'},{label:"Steps",value:"<li> elements with step state classes"},{label:"Active",value:'aria-current="step" on the active indicator'},{label:"Clickable",value:'role="button" aria-label="Go to step N" with tabIndex'},{label:"Focus",value:"outline: 3px solid var(--Focus-Visible); outline-offset: 2px"},{label:"Connectors",value:'aria-hidden="true" — decorative only'}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(oa,{children:[e,":"]}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}function zc({actions:e=[],variant:t="solid",color:n="default",direction:l="up",speed:s=50,showTooltips:d=!0,open:c,onOpen:u,onClose:p,icon:m,ariaLabel:f="Speed Dial",className:g="",sx:x={},...b}){const[v,y]=r(!1),S=void 0!==c,k=S?c:v,w=a(null),C=t,T=i(()=>{k?(S||y(!1),p?.()):(S||y(!0),u?.())},[k,S,u,p]),z=i((e,r)=>{e.onClick?.(r),S||y(!1),p?.()},[S,p]);o(()=>{if(!k)return;const e=e=>{w.current&&!w.current.contains(e.target)&&(S||y(!1),p?.())};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[k,S,p]),o(()=>{if(!k)return;const e=e=>{"Escape"===e.key&&(S||y(!1),p?.())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[k,S,p]);const A="up"===l||"down"===l,I="up"===l||"down"===l?"left":"top";return de(h,{ref:w,className:"speed-dial speed-dial-"+t+" speed-dial-"+n+" speed-dial-"+l+" "+g,sx:{position:"relative",display:"inline-flex",overflow:"visible",width:A?"56px":"auto",height:A?"auto":"56px",...x},...b,children:[le(jn,{size:"large",variant:C,color:n,onClick:T,"aria-label":f,"aria-expanded":k,"aria-haspopup":"menu",sx:{position:"relative",zIndex:2},children:le(h,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",transition:"transform 0.3s ease",transform:k?"rotate(45deg)":"rotate(0deg)"},children:m||le(Tr,{})})}),le(h,{role:"menu",sx:{position:"absolute",inset:0,pointerEvents:"none",overflow:"visible"},children:e.map((e,r)=>{const t=(e=>{const r=56+44*e;switch(l){case"up":default:return{bottom:r+"px",left:"12px"};case"down":return{top:r+"px",left:"12px"};case"left":return{right:r+"px",top:"12px"};case"right":return{left:r+"px",top:"12px"}}})(r),a=r*s,i=le(jn,{size:"small",variant:C,color:n,role:"menuitem","aria-label":e.name||"Action "+(r+1),onClick:()=>z(e,r),sx:{position:"absolute",...t,opacity:k?1:0,transform:k?"scale(1)":"scale(0.3)",transition:"opacity 0.2s ease, transform 0.2s ease",transitionDelay:k?a+"ms":"0ms",pointerEvents:k?"auto":"none"},children:e.icon||le(Tr,{})},e.key||r);return d&&e.name?le(B,{title:e.name,placement:I,arrow:!0,open:!!k&&void 0,slotProps:{tooltip:{sx:{backgroundColor:"var(--Container)",color:"var(--Text)",fontSize:"12px",fontWeight:500,border:"1px solid var(--Border)",boxShadow:"0 2px 8px rgba(0,0,0,0.12)"}},arrow:{sx:{color:"var(--Container)"}}},children:i},e.key||r):i})})]})}const Ac=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",Ic=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}],Rc=[{name:"Edit",icon:le(Na,{size:"small",sx:{color:"inherit"},children:le($r,{})})},{name:"Share",icon:le(Na,{size:"small",sx:{color:"inherit"},children:le(_r,{})})},{name:"Delete",icon:le(Na,{size:"small",sx:{color:"inherit"},children:le(ke,{})})},{name:"Favorite",icon:le(Na,{size:"small",sx:{color:"inherit"},children:le(ye,{})})}];function Wc({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Dc({color:e,selected:r,onClick:t}){const a=Ac(e);return le(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&le(ue,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function Pc(){const[e,t]=r("solid"),[a,i]=r("default"),[o,n]=r("up"),[l,s]=r(!0),[d,c]=r(null),[u,p]=r("Surface");return de(h,{sx:{pb:8},children:[le(qt,{children:"Speed Dial"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{theme:d,surface:u,sx:{minHeight:300,alignItems:"flex-end",justifyContent:"center"},children:le(zc,{variant:e,color:a,direction:o,showTooltips:l,actions:Rc,ariaLabel:"Quick actions"})}),le(No,{code:(()=>{const r=[];return"solid"!==e&&r.push('variant="'+e+'"'),"default"!==a&&r.push('color="'+a+'"'),"up"!==o&&r.push('direction="'+o+'"'),l||r.push("showTooltips={false}"),r.push("actions={actions}"),r.push('ariaLabel="Quick actions"'),"<SpeedDial\n "+r.join("\n ")+"\n/>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[le(h,{sx:{mb:3},children:le(ho,{theme:d,onThemeChange:c,surface:u,onSurfaceChange:p})}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),le(k,{direction:"row",spacing:1,children:["solid","outline"].map(r=>le(Wc,{label:Ac(r),selected:e===r,onClick:()=>t(r)},r))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{spacing:1.5,children:Ic.map(e=>de(h,{children:[le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:e.label}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:e.colors.map(e=>le(Dc,{color:e,selected:a===e,onClick:i},e))})]},e.label))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"DIRECTION"}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:["up","down","left","right"].map(e=>le(Wc,{label:Ac(e),selected:o===e,onClick:()=>n(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Tooltips"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Show labels beside actions"})]}),le(en,{variant:"default-outline",checked:l,onChange:e=>s(e.target.checked),size:"small","aria-label":"Show tooltips"})]})]})}),le(no,{value:1,children:le(h,{sx:{p:3},children:le(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),le(k,{spacing:0,children:[{label:"FAB",value:'aria-expanded, aria-haspopup="menu", aria-label'},{label:"Actions",value:'role="menu" container, role="menuitem" on each action'},{label:"Labels",value:"aria-label on each action from name prop"},{label:"Keyboard",value:"Escape closes. Click outside closes."},{label:"Focus",value:"outline: 3px solid var(--Focus-Visible); outline-offset: 2px"}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(oa,{children:[e,":"]}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const Fc={primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",black:"BW",white:"BW"};function Lc(e,r){return"var(--"+(Fc[e]||"Primary")+"-Color-"+r+")"}const Hc={primary:{linear:[{family:"primary",tone:8,position:0},{family:"primary",tone:11,position:100}],radial:[{family:"primary",tone:8,position:0},{family:"primary",tone:11,position:100}],mesh:[{family:"primary",tone:8,x:20,y:20,spread:60},{family:"primary",tone:9,x:80,y:30,spread:50},{family:"primary",tone:10,x:50,y:80,spread:55}],meshCard:[{family:"primary",tone:3,x:10,y:10,spread:60},{family:"primary",tone:6,x:80,y:20,spread:50},{family:"primary",tone:9,x:40,y:80,spread:55}]},secondary:{linear:[{family:"secondary",tone:7,position:0},{family:"secondary",tone:10,position:100}],radial:[{family:"secondary",tone:7,position:0},{family:"secondary",tone:10,position:100}],mesh:[{family:"secondary",tone:7,x:15,y:25,spread:55},{family:"secondary",tone:9,x:75,y:35,spread:50},{family:"secondary",tone:11,x:45,y:75,spread:60}],meshCard:[{family:"secondary",tone:2,x:15,y:15,spread:55},{family:"secondary",tone:5,x:85,y:25,spread:50},{family:"secondary",tone:8,x:50,y:75,spread:60}]},tertiary:{linear:[{family:"tertiary",tone:8,position:0},{family:"tertiary",tone:11,position:100}],radial:[{family:"tertiary",tone:8,position:0},{family:"tertiary",tone:11,position:100}],mesh:[{family:"tertiary",tone:8,x:25,y:15,spread:55},{family:"tertiary",tone:10,x:70,y:40,spread:50},{family:"tertiary",tone:11,x:40,y:85,spread:55}],meshCard:[{family:"tertiary",tone:3,x:20,y:10,spread:60},{family:"tertiary",tone:7,x:75,y:30,spread:50},{family:"tertiary",tone:10,x:45,y:80,spread:55}]},black:{linear:[{family:"black",tone:10,position:0},{family:"neutral",tone:3,position:100}],radial:[{family:"black",tone:10,position:0},{family:"neutral",tone:3,position:100}],mesh:[{family:"black",tone:10,x:0,y:0,spread:100},{family:"primary",tone:3,x:25,y:25,spread:50},{family:"secondary",tone:4,x:75,y:35,spread:45},{family:"tertiary",tone:3,x:50,y:80,spread:50}],meshCard:[{family:"black",tone:11,x:0,y:0,spread:100},{family:"primary",tone:5,x:20,y:20,spread:55},{family:"secondary",tone:8,x:80,y:30,spread:45},{family:"tertiary",tone:10,x:45,y:80,spread:50}]},white:{linear:[{family:"white",tone:2,position:0},{family:"neutral",tone:9,position:100}],radial:[{family:"white",tone:2,position:0},{family:"neutral",tone:9,position:100}],mesh:[{family:"white",tone:2,x:0,y:0,spread:100},{family:"primary",tone:9,x:25,y:25,spread:50},{family:"secondary",tone:8,x:75,y:35,spread:45},{family:"tertiary",tone:9,x:50,y:80,spread:50}],meshCard:[{family:"white",tone:1,x:0,y:0,spread:100},{family:"primary",tone:4,x:20,y:20,spread:55},{family:"secondary",tone:7,x:80,y:30,spread:45},{family:"tertiary",tone:10,x:45,y:80,spread:50}]}};function Mc(e,r){const t=Hc[e]||Hc.primary;return(t[r]||t.linear).map(e=>({...e}))}function Ec({variant:e="linear",color:r="primary",angle:t=135,stops:a=null,position:i=null,blobs:o=null,cardProps:n={},minHeight:l=300,children:s,className:d="",sx:c={},...u}){const p="meshCard"===e,m="mesh"===e||p,f="radial"===e,g="linear"===e||f,x=a||Mc(r,f?"radial":"linear"),b=o||Mc(r,p?"meshCard":"mesh"),v=m?function(e){if(!e||0===e.length)return"none";const r=e.map(e=>{const r=Lc(e.family,e.tone),t=e.spread||40;return"radial-gradient(circle at "+e.x+"% "+e.y+"%, "+r+" 0%, transparent "+t+"%)"}),t=Lc(e[0].family,e[0].tone);return r.push(t),r.join(", ")}(b):f?function(e,r){if(!e||0===e.length)return"none";const t=[...e].sort((e,r)=>e.position-r.position).map(e=>Lc(e.family,e.tone)+" "+e.position+"%"),a=r||{x:50,y:50};return"radial-gradient(circle at "+a.x+"% "+a.y+"%, "+t.join(", ")+")"}(x,i||{x:50,y:50}):function(e,r){return e&&0!==e.length?"linear-gradient("+r+"deg, "+[...e].sort((e,r)=>e.position-r.position).map(e=>Lc(e.family,e.tone)+" "+e.position+"%").join(", ")+")":"none"}(x,t),y=g?x[0]:b[0];var S,k;const B=function(e){return"dark"===e?"var(--BW-Color-1)":"var(--BW-Color-6)"}((S=y?.tone||8,"black"===(k=y?.family||"primary")||"white"===k?S<=5?"light":"dark":S<=5?"dark":"light"));return le(h,p?{className:"gradient gradient-mesh-card "+d,sx:{background:v,minHeight:l,borderRadius:"var(--Card-Radius)",display:"flex",alignItems:"center",justifyContent:"center",padding:"var(--Card-Padding)",position:"relative",overflow:"hidden",...c},...u,children:le(Fn,{variant:"solid",...n,children:le(Ln,{children:s})})}:{className:"gradient gradient-"+e+" "+d,sx:{background:v,minHeight:l,borderRadius:"var(--Card-Radius)",color:B,display:"flex",alignItems:"center",justifyContent:"center",position:"relative",overflow:"hidden",...c},...u,children:s})}const Oc=e=>le(Ec,{variant:"linear",...e}),Nc=e=>le(Ec,{variant:"radial",...e}),Qc=e=>le(Ec,{variant:"mesh",...e}),Vc=e=>le(Ec,{variant:"meshCard",...e});function jc({children:e,surface:r="Container",outlined:t=!1,variant:a=(t?"outlined":"elevation"),sx:i={},...o}){const{dataSurface:n,elevation:l}=function(e="Container"){const r={"Container-Lowest":{elevation:0,zIndex:0},"Container-Low":{elevation:1,zIndex:100},Container:{elevation:4,zIndex:200},"Container-High":{elevation:8,zIndex:300},"Container-Highest":{elevation:12,zIndex:400}},t=r[e]||r.Container;return{dataSurface:e,elevation:t.elevation,zIndex:t.zIndex}}(r);return le(O,{variant:a,elevation:t?0:l,"data-surface":n,sx:{padding:2,borderRadius:"8px",transition:"all 0.2s ease-in-out",...i},...o,children:e})}function Gc({open:e=!1,onClose:t,anchorRef:i,placement:n="bottom-end",theme:l="Default",surface:s="Surface-Bright",width:d=320,maxHeight:c=400,children:u,sx:p={}}){const m=a(null),[f,g]=r({top:0,left:0,right:"auto"});return o(()=>{if(!e||!i?.current)return;const r=i.current.getBoundingClientRect();g("bottom-end"===n?{top:r.bottom+6,right:window.innerWidth-r.right,left:"auto"}:{top:r.bottom+6,left:r.left,right:"auto"})},[e,i,n]),o(()=>{if(!e)return;const r=e=>{m.current?.contains(e.target)||i?.current?.contains(e.target)||t?.()};return document.addEventListener("pointerdown",r),()=>document.removeEventListener("pointerdown",r)},[e,t,i]),o(()=>{if(!e)return;const r=e=>{"Escape"===e.key&&t?.()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e,t]),e?be.createPortal(le(h,{ref:m,"data-theme":l,"data-surface":s,sx:{position:"fixed",top:f.top,left:f.left,right:f.right,zIndex:2e9,width:d,maxHeight:c,overflowY:"auto",backgroundColor:"var(--Background)",border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)",boxShadow:ii,...p},children:u}),document.body):null}["default","primary","secondary","tertiary","neutral"].map(e=>{return{value:e,label:(r=e,r?r.charAt(0).toUpperCase()+r.slice(1):"")};var r});const Uc=l(null),Xc=["Default","Primary","Secondary","Tertiary","Neutral","Info","Success","Warning","Error","App-Bar","Nav-Bar","Status"],Yc=["Professional","Modern","Bold","Playful"],qc=["Surface-Dimmest","Surface-Dim","Surface","Surface-Bright","Surface-Brightest","Container","Container-Low","Container-Lowest","Container-High","Container-Highest"],Zc={"light-tonal":{theme:"Primary",rootSurface:"Surface-Brightest"},"grey-professional":{theme:"Neutral",rootSurface:"Surface"},"dark-professional":{theme:"Neutral",rootSurface:"Surface-Dimmest"}},Jc="omni-foundation",Kc="omni-core",$c="omni-typography",_c="omni-mode",eu="omni-base",ru="omni-styles";function tu(e){document.getElementById(e)?.remove()}function au(e,r,t){return r?function(e){return!(!e||"string"!=typeof e)&&(e.startsWith("http")||e.startsWith("/")||e.endsWith(".css"))}(r)?function(e,r,t){const a=document.getElementById(e);return a?"LINK"===a.tagName&&a.getAttribute("href")!==r?new Promise((e,t)=>{a.onload=()=>e(a),a.onerror=()=>t(new Error(`OmniDesignProvider: failed to load ${r}`)),a.setAttribute("href",r)}):Promise.resolve(a):new Promise((a,i)=>{const o=document.createElement("link");o.id=e,o.rel="stylesheet",o.setAttribute("data-omni","true"),o.onload=()=>a(o),o.onerror=()=>i(new Error(`OmniDesignProvider: failed to load ${r}`)),o.href=r;const n=t?document.getElementById(t):null;n?document.head.insertBefore(o,n):document.head.appendChild(o)})}(e,r,t):function(e,r,t){if(!r)return Promise.resolve(null);const a=document.getElementById(e);if(a)return a.textContent=r,Promise.resolve(a);const i=document.createElement("style");i.id=e,i.setAttribute("data-omni","true"),i.textContent=r;const o=t?document.getElementById(t):null;return o?document.head.insertBefore(i,o):document.head.appendChild(i),Promise.resolve(i)}(e,r,t):Promise.resolve(null)}function iu({themeURL:e,foundationCSS:t,coreCSS:n,typographyCSS:l,lightModeCSS:d,darkModeCSS:c,baseCSS:u,stylesCSS:h,defaultTheme:p="Default",defaultStyle:m="Modern",defaultSurface:f="Surface",surfaceStyle:g,defaultDarkMode:x=!1,darkTheme:b="Neutral",darkMode:v,onDarkModeChange:y,className:S,style:k,fullHeight:B=!0,children:w}){const[C,T]=r(x),z=void 0!==v,A=z?v:C,[I,R]=r({foundation:t??null,core:n??null,typography:l??null,lightMode:d??null,darkMode:c??null,base:u??null,styles:h??null}),[W,D]=r({}),P=a(!0);o(()=>(P.current=!0,()=>{P.current=!1}),[]),o(()=>{e&&(X("loading"),async function(e){const r=/\.json(\?|$)/.test(e)?e:`${e.replace(/\/$/,"")}/theme.json`,t=e.replace(/\/$/,"").replace(/\/theme\.json(\?.*)?$/,""),a=await fetch(r);if(!a.ok)throw new Error(`OmniDesignProvider: could not load theme manifest from ${r} (${a.status})`);const i=await a.json(),o=e=>e?/^https?:\/\//i.test(e)?e:`${t}/${e}`:null;return{foundationURL:o(i.foundation),coreURL:o(i.core),typographyURL:o(i.typography),lightModeURL:o(i.lightMode),darkModeURL:o(i.darkMode),baseURL:o(i.base),stylesURL:o(i.styles),defaultTheme:i.defaultTheme??null,defaultStyle:i.defaultStyle??null,defaultSurface:i.defaultSurface??null,darkTheme:i.darkTheme??null,name:i.name??null}}(e).then(e=>{P.current&&(R({foundation:t??e.foundationURL,core:n??e.coreURL,typography:l??e.typographyURL,lightMode:d??e.lightModeURL,darkMode:c??e.darkModeURL,base:u??e.baseURL,styles:h??e.stylesURL}),D({defaultTheme:e.defaultTheme,defaultStyle:e.defaultStyle,defaultSurface:e.defaultSurface,darkTheme:e.darkTheme,name:e.name}))}).catch(e=>{P.current&&(console.error("OmniDesignProvider: manifest error:",e),q(e.message),X("error"))}))},[e]);const F=g?Zc[g]?.theme??p:"Default"!==p?p:W.defaultTheme??p,L=g?Zc[g]?.rootSurface??f:W.defaultSurface??f,H=W.defaultStyle??m,M="Neutral"!==b?b:W.darkTheme??b,[E,O]=r(F),[N,Q]=r(H),[V,j]=r(L),G=!!(e||t||n||l||d||c||u||h),[U,X]=r(G?"loading":"ready"),[Y,q]=r(null);o(()=>{const{foundation:e,core:r,typography:t,base:a,styles:i}=I;if(e||r||t||a||i)return X("loading"),q(null),Promise.all([au(Jc,e),au(Kc,r),au($c,t).catch(e=>{console.warn("OmniDesignProvider: typography CSS did not load —",e.message)}),au(eu,a),au(ru,i)]).then(()=>{P.current&&X("ready")}).catch(e=>{P.current&&(console.error("OmniDesignProvider CSS error:",e),q(e.message),X("error"))}),()=>{tu(Jc),tu(Kc),tu($c),tu(eu),tu(ru)};X("ready")},[I.foundation,I.core,I.typography,I.base,I.styles]),o(()=>{const e=A?I.darkMode:I.lightMode;e&&au(_c,e,eu).catch(e=>console.error("OmniDesignProvider mode CSS error:",e))},[A,I.lightMode,I.darkMode]),o(()=>()=>tu(_c),[]);const Z=A?M:E,J=i(()=>{z?y?.(!A):T(e=>!e)},[z,A,y]),K=i(e=>{Xc.includes(e)||console.warn(`OmniDesignProvider: unknown theme "${e}"`),O(e)},[]),$=i(e=>{Yc.includes(e)||console.warn(`OmniDesignProvider: unknown style "${e}"`),Q(e)},[]),_=i(e=>{qc.includes(e)||console.warn(`OmniDesignProvider: unknown surface "${e}"`),j(e)},[]),ee=s(()=>({theme:Z,style:N,surface:V,isDark:A,cssStatus:U,cssError:Y,setTheme:K,setStyle:$,setSurface:_,toggleDarkMode:J,themes:Xc,styles:Yc,surfaces:qc,name:W.name??null}),[Z,N,V,A,U,Y,K,$,_,J,W.name]);return de(Uc.Provider,{value:ee,children:[le("style",{"data-omni":"hide-during-load",children:'[data-omni-css="loading"]{visibility:hidden}'}),le("div",{"data-theme":Z,"data-style":N,"data-surface":V,"data-omni-css":U,className:S,style:{...B?{minHeight:"100vh"}:{},...k},children:w})]})}function ou(){const e=n(Uc);if(!e)throw new Error("useOmniDesign must be used inside a <OmniDesignProvider>");return e}function nu({theme:e,surface:r,as:t="div",children:a,className:i,style:o,...n}){return le(t,{"data-theme":e,"data-surface":r,className:i,style:o,...n,children:a})}function lu({surface:e,as:r="div",children:t,className:a,style:i,...o}){return le(r,{"data-surface":e,className:a,style:i,...o,children:t})}const su=e=>d(function(r,t){return le(q,{direction:e,ref:t,...r})}),du={fade:d(function(e,r){return le(Y,{ref:r,...e})}),grow:d(function(e,r){return le(X,{ref:r,...e})}),zoom:d(function(e,r){return le(U,{ref:r,...e})}),"slide-up":su("up"),"slide-down":su("down"),"slide-left":su("left"),"slide-right":su("right")},cu={backgroundColor:"var(--Background)",color:"var(--Text)",border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)",boxShadow:"0 8px 32px rgba(0,0,0,0.18)"},uu={color:"var(--Text)",fontWeight:600,fontSize:"18px",fontFamily:"inherit",borderBottom:"1px solid var(--Border)",display:"flex",justifyContent:"space-between",alignItems:"center",py:1.5,px:3},hu={color:"var(--Text)",fontFamily:"inherit",fontSize:"14px",lineHeight:1.6,py:3,px:3},pu={borderTop:"1px solid var(--Border)",px:3,py:1.5,gap:1},mu={fontFamily:"inherit",fontWeight:500,fontSize:"14px",borderRadius:"var(--Style-Border-Radius)",padding:"6px 16px",cursor:"pointer",border:"none",transition:"background-color 0.15s, color 0.15s","&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"1px"}},fu={primary:{...mu,backgroundColor:"var(--Buttons-Primary-Button)",color:"var(--Buttons-Primary-Text)",border:"1px solid var(--Buttons-Primary-Border)","&:hover":{backgroundColor:"var(--Buttons-Primary-Hover)"},"&:active":{backgroundColor:"var(--Buttons-Primary-Pressed)"},"&:disabled":{opacity:"var(--Disabled, 0.38)",cursor:"not-allowed"}},outline:{...mu,backgroundColor:"transparent",color:"var(--Text)",border:"1px solid var(--Border)","&:hover":{backgroundColor:"var(--Hover)"},"&:active":{backgroundColor:"var(--Pressed)"},"&:disabled":{opacity:"var(--Disabled, 0.38)",cursor:"not-allowed"}}};function gu({open:e=!1,onClose:r,title:t,children:a,actions:i,maxWidth:o="sm",fullScreen:n=!1,scroll:l="body",alert:s=!1,nonModal:d=!1,transition:c,transitionDuration:u=300,titleId:p="dialog-title",contentId:m="dialog-description",className:f="",sx:g={},PaperProps:x={},...b}){const v=c?du[c]:void 0;let y;try{y=ou()}catch{y=null}const S=y?.theme||"Default",k=y?.style||"Modern",B=y?.surface||"Surface";return de(N,{open:e,onClose:(e,t)=>{s&&"backdropClick"===t||s&&"escapeKeyDown"===t||r?.(e,t)},maxWidth:!n&&o,fullScreen:n,fullWidth:!n,scroll:l,hideBackdrop:d,disableEnforceFocus:d,disableEscapeKeyDown:s,TransitionComponent:v,transitionDuration:u,"aria-labelledby":p,"aria-describedby":m,className:"dialog dialog-"+o+(n?" dialog-fullscreen":"")+(s?" dialog-alert":"")+(f?" "+f:""),style:{zIndex:1e7},slotProps:{backdrop:{sx:{backgroundColor:d?"transparent":"rgba(0,0,0,0.5)"}}},PaperProps:{...x,"data-theme":S,"data-style":k,"data-surface":B,sx:{...cu,...n&&{borderRadius:0,border:"none"},...x.sx},role:s?"alertdialog":"dialog"},...b,children:[t&&de(Q,{id:p,sx:uu,children:[t,!s&&r&&le(Ci,{"aria-label":"Close dialog",onClick:e=>r(e,"closeButton"),size:"small",variant:"ghost",sx:{color:"var(--Text-Quiet)"},children:le(Wr,{fontSize:"small"})})]}),le(V,{dividers:"paper"===l,sx:{...hu,..."paper"===l&&{maxHeight:n?"none":"400px",overflowY:"auto",borderColor:"var(--Border)"}},children:s?le(j,{id:m,sx:{color:"var(--Text)",fontFamily:"inherit",fontSize:"14px",lineHeight:1.6},children:a}):le(h,{id:m,children:a})}),i&&le(G,{sx:pu,children:i})]})}function xu({open:e,onClose:r,title:t,children:a,confirmText:i="Confirm",cancelText:o="Cancel",onConfirm:n,onCancel:l,...s}){return le(gu,{open:e,onClose:r,title:t,alert:!0,...s,actions:de(se,{children:[le(h,{component:"button",type:"button",onClick:l||r,sx:fu.outline,children:o}),le(h,{component:"button",type:"button",onClick:n||r,sx:fu.primary,children:i})]}),children:a})}function bu({open:e,onClose:r,title:t,children:a,submitText:i="Submit",cancelText:o="Cancel",onSubmit:n,...l}){return le(gu,{open:e,onClose:r,title:t,...l,actions:de(se,{children:[le(h,{component:"button",type:"button",onClick:r,sx:fu.outline,children:o}),le(h,{component:"button",type:"button",onClick:n,sx:fu.primary,children:i})]}),children:a})}function vu({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function yu(){const[e,t]=r(!1),[a,i]=r("sm"),[o,n]=r(!1),[l,s]=r("none"),[d,c]=r(!1),[u,p]=r(!1),[m,f]=r(null),[g,x]=r("Surface");return de(h,{sx:{pb:8},children:[le(qt,{children:"Dialog"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{theme:m,surface:g,children:le(wi,{variant:"default",onClick:()=>t(!0),children:"Open Dialog"})}),le(No,{code:(()=>{const e=["open={open}","onClose={handleClose}"];return"sm"!==a&&e.push('maxWidth="'+a+'"'),o&&e.push("fullScreen"),d&&e.push("alert"),u&&e.push("nonModal"),"none"!==l&&e.push('transition="'+l+'"'),e.push('title="Dialog Title"'),e.push('actions={<><Button variant="default-outline" onClick={handleClose}>Cancel</Button><Button variant="default" onClick={handleClose}>Confirm</Button></>}'),"<Dialog\n "+e.join("\n ")+"\n>\n Dialog content goes here.\n</Dialog>"})(),language:"JSX",wrap:!0,sx:{mt:2}}),le(gu,{open:e,onClose:(e,r)=>{d&&"backdropClick"===r||t(!1)},maxWidth:a,fullScreen:o,alert:d,nonModal:u,transition:"none"!==l?l:void 0,title:"Dialog Title",actions:de(se,{children:[le(wi,{variant:"default-outline",size:"small",onClick:()=>t(!1),children:"Cancel"}),le(wi,{variant:"default",size:"small",onClick:()=>t(!1),children:"Confirm"})]}),children:le(sa,{children:"This is the dialog content. You can put any information here that requires user attention or action."})})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[le(h,{sx:{mb:3},children:le(ho,{theme:m,onThemeChange:f,surface:g,onSurfaceChange:x})}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),de(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:[["xs","sm","md","lg","xl"].map(e=>le(vu,{label:e.toUpperCase(),selected:a===e,onClick:()=>{i(e),n(!1)}},e)),le(vu,{label:"Full Screen",selected:o,onClick:()=>n(!o)})]})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"TRANSITION"}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:["none","slide-up","slide-down","grow","fade","zoom"].map(e=>{return le(vu,{label:(r=e,r?r.charAt(0).toUpperCase()+r.slice(1):""),selected:l===e,onClick:()=>s(e)},e);var r})})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Alert"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"No backdrop dismiss, no Escape"})]}),le(en,{variant:"default-outline",checked:d,onChange:e=>c(e.target.checked),size:"small","aria-label":"Alert mode"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Non-Modal"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"No backdrop, interact with content behind"})]}),le(en,{variant:"default-outline",checked:u,onChange:e=>p(e.target.checked),size:"small","aria-label":"Non-modal"})]})]})}),le(no,{value:1,children:le(h,{sx:{p:3},children:le(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),le(k,{spacing:0,children:[{label:"Role",value:'role="dialog" (standard) or role="alertdialog" (alert mode)'},{label:"Label",value:"aria-labelledby links to title, aria-describedby links to content"},{label:"Focus",value:"Focus trapped inside dialog. Returns to trigger on close."},{label:"Keyboard",value:"Escape closes (unless alert). Tab cycles through focusable elements."},{label:"Backdrop",value:"Click closes (unless alert or non-modal)"},{label:"Close",value:'Close button with aria-label="Close dialog"'}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(oa,{children:[e,":"]}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const Su={primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},ku={default:"Container-High",solid:"Container-High",soft:"Surface-Brightest"},Bu={small:{maxWidth:400,padding:"24px"},medium:{maxWidth:560,padding:"32px"},large:{maxWidth:720,padding:"40px"}},wu={fade:{enter:{from:{opacity:0},to:{opacity:1}},name:"modal-fade"},"slide-up":{enter:{from:{opacity:0,transform:"translateY(40px)"},to:{opacity:1,transform:"translateY(0)"}},name:"modal-slide-up"},"slide-down":{enter:{from:{opacity:0,transform:"translateY(-40px)"},to:{opacity:1,transform:"translateY(0)"}},name:"modal-slide-down"},zoom:{enter:{from:{opacity:0,transform:"scale(0.85)"},to:{opacity:1,transform:"scale(1)"}},name:"modal-zoom"}};function Cu(e){const r=wu[e];if(!r)return"";const{from:t,to:a}=r.enter,i=Object.entries(t).map(([e,r])=>e+":"+r).join(";"),o=Object.entries(a).map(([e,r])=>e+":"+r).join(";");return"@keyframes "+r.name+" { from {"+i+"} to {"+o+"} }@keyframes "+r.name+"-backdrop { from { opacity: 0 } to { opacity: 1 } }"}function Tu({open:e,onClose:t,children:i,title:n,variant:l="default",color:s="primary",size:d="medium",layout:c="center",transition:u="fade",transitionSpeed:p=250,closeOnBackdrop:m=!0,showCloseButton:f=!0,className:g="",sx:x={},...b}){const v=a(null),y=a(null),[S,k]=r(!1);let B;try{B=ou()}catch{B=null}const w=B?.style||"Modern",C="soft"===l,T="solid"===l,z="fullscreen"===c,A=T||C?Su[s]:null,I=ku[l]||ku.default,R=Bu[d]||Bu.medium,W=wu[u],D=W?W.name:void 0,P=p+"ms";return o(()=>(e?(y.current=document.activeElement,k(!0),requestAnimationFrame(()=>{v.current?.focus()}),document.body.style.overflow="hidden"):(k(!1),document.body.style.overflow="",y.current?.focus()),()=>{document.body.style.overflow=""}),[e]),o(()=>{if(!e)return;const r=e=>{"Escape"===e.key&&t?.()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e,t]),e||S?de(se,{children:["none"!==u&&le("style",{children:Cu(u)}),le(h,{"aria-hidden":"true",onClick:m?t:void 0,sx:{position:"fixed",inset:0,zIndex:1e7,backgroundColor:"rgba(0,0,0,0.5)",...D&&{animation:D+"-backdrop "+P+" ease-out forwards"}}}),de(h,{role:"dialog","aria-modal":"true","aria-label":n||"Modal",ref:v,tabIndex:-1,"data-surface":I,"data-theme":A||void 0,"data-style":w,className:"modal modal-"+l+" modal-"+d+" modal-"+c+(C||T?" modal-"+s:"")+(g?" "+g:""),sx:{position:"fixed",zIndex:10000001,outline:"none",fontFamily:"inherit",...z?{inset:0,borderRadius:0}:{top:"50%",left:"50%",transform:"translate(-50%, -50%)",maxWidth:R.maxWidth+"px",width:"calc(100% - 32px)",maxHeight:"calc(100vh - 64px)",borderRadius:"var(--Modal-Radius, var(--Style-Border-Radius))"},backgroundColor:"var(--Background)",color:"var(--Text)",boxShadow:"0 8px 32px rgba(0,0,0,0.24)",display:"flex",flexDirection:"column",overflow:"hidden",...D&&{animation:D+" "+P+" ease-out forwards"},...x},...b,children:[(n||f)&&de(h,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:z?4:R.padding,pt:z?3:R.padding,pb:0,flexShrink:0},children:[n&&le(h,{sx:{fontSize:"small"===d?"18px":"large"===d?"24px":"20px",fontWeight:700,color:"var(--Text)",flex:1},children:n}),f&&le(h,{component:"button",type:"button","aria-label":"Close modal",onClick:t,sx:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,borderRadius:"50%",border:"none",backgroundColor:"transparent",color:"var(--Text-Quiet)",cursor:"pointer",flexShrink:0,ml:1,transition:"background-color 0.15s ease, color 0.15s ease","&:hover":{backgroundColor:"var(--Hover)",color:"var(--Text)"},"&:active":{backgroundColor:"var(--Pressed)",color:"var(--Text)"},"&:focus-visible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"},"&:disabled":{opacity:"var(--Disabled, 0.38)",cursor:"not-allowed"}},children:le(Wr,{sx:{fontSize:20}})})]}),le(h,{sx:{flex:1,overflowY:"auto",px:z?4:R.padding,pt:z?3:"16px",pb:z?3:R.padding,color:"var(--Text)",fontSize:"small"===d?"13px":"14px",lineHeight:1.6},children:i})]})]}):null}const zu={small:{width:"240px",height:"200px"},medium:{width:"320px",height:"280px"},large:{width:"420px",height:"380px"}},Au={left:{borderRight:"1px solid var(--Border)"},right:{borderLeft:"1px solid var(--Border)"},top:{borderBottom:"1px solid var(--Border)"},bottom:{borderTop:"1px solid var(--Border)"}},Iu={left:{top:0,left:0,bottom:0},right:{top:0,right:0,bottom:0},top:{top:0,left:0,right:0},bottom:{bottom:0,left:0,right:0}},Ru={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"};function Wu({children:e,open:r=!1,onClose:t,size:n="medium",anchor:l="left",hideBackdrop:s=!1,className:d="",sx:c={},...u}){const p=a(null),m=a(null),f="left"===l||"right"===l;let g;try{g=ou()}catch{g=null}const x=g?.theme||"Default",b=g?.style||"Modern",v=zu[n]||zu.medium;o(()=>{if(!r)return;const e=e=>{"Escape"===e.key&&t?.()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r,t]),o(()=>{r?(m.current=document.activeElement,requestAnimationFrame(()=>{const e=p.current?.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');e?e.focus():p.current?.focus()})):m.current&&(m.current.focus(),m.current=null)},[r]),o(()=>{if(r){const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[r]);const y=i(e=>{if("Tab"!==e.key||!p.current)return;const r=p.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(!r.length)return;const t=r[0],a=r[r.length-1];e.shiftKey?document.activeElement===t&&(e.preventDefault(),a.focus()):document.activeElement===a&&(e.preventDefault(),t.focus())},[]);return r?de(se,{children:[!s&&le(h,{onClick:()=>t?.(),"aria-hidden":"true",sx:{position:"fixed",inset:0,zIndex:1e7,backgroundColor:"rgba(0, 0, 0, 0.5)",transition:"opacity 0.3s ease"}}),le(h,{ref:p,role:"dialog","aria-modal":"true",tabIndex:-1,"data-theme":x,"data-style":b,"data-surface":"Surface-Dim",onKeyDown:y,className:"drawer drawer-"+n+" drawer-"+l+" "+d,sx:{position:"fixed",zIndex:10000001,...Iu[l],...f?{width:v.width,height:"100%"}:{height:v.height,width:"100%"},backgroundColor:"var(--Background)",color:"var(--Text)",...Au[l],boxShadow:ai,display:"flex",flexDirection:"column",outline:"none",overflow:"hidden",animation:"drawer-slide-in 0.3s ease forwards","@keyframes drawer-slide-in":{from:{transform:Ru[l]},to:{transform:"translate(0, 0)"}},...c},...u,children:e})]}):null}function Du({onClick:e,className:r="",sx:t={},...a}){return le(h,{sx:{position:"absolute",top:"12px",right:"12px",zIndex:1,...t},className:r,...a,children:le(wi,{iconOnly:!0,variant:"ghost",size:"small",onClick:e,"aria-label":"Close drawer",children:le(Na,{size:"small",children:le(Wr,{})})})})}function Pu({children:e,className:r="",sx:t={},...a}){return le(h,{className:"drawer-header "+r,sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px",borderBottom:"1px solid var(--Border)",flexShrink:0,...t},...a,children:e})}function Fu({children:e,className:r="",sx:t={},...a}){return le(h,{className:"drawer-content "+r,sx:{flex:1,overflowY:"auto",padding:"16px",...t},...a,children:e})}const Lu={compact:{minHeight:"24px",fontSize:"13px",iconSize:16,gap:"6px"},default:{minHeight:"32px",fontSize:"14px",iconSize:18,gap:"8px"}},Hu={none:void 0,slide:"omni-tree-slide 0.25s ease",spring:"omni-tree-slide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1)"},Mu={"@keyframes omni-tree-slide":{from:{opacity:0,transform:"translateY(-4px)"},to:{opacity:1,transform:"none"}}};function Eu(e,r,t=1,a=[]){return e.forEach((i,o)=>{a.push({item:i,level:t,index:o,siblings:e.length}),i.children?.length&&r.includes(i.id)&&Eu(i.children,r,t+1,a)}),a}function Ou(e,r,t=null){for(const a of e){if(a.id===r)return t;if(a.children?.length){const e=Ou(a.children,r,a.id);if(null!=e)return e;if(null===e&&a.children.some(e=>e.id===r))return a.id}}return null}function Nu({node:e,density:r,expanded:t,selected:a,focusedId:i,multiSelect:o,checkboxSelection:n,disableSelection:l,disabledItemsFocusable:s,collapseIcon:d,expandIcon:c,animation:u,onToggle:p,onSelect:m,onFocusItem:f,registerRef:g}){const{item:x,level:b,index:v,siblings:y}=e,S=Lu[r]||Lu.default,k="compact"===r?ga:oa,B=!!x.children?.length,w=B&&t.includes(x.id),C=a.includes(x.id),T=!!x.disabled,z=!T||s;return de(h,{component:"li",role:"treeitem","aria-expanded":B?w:void 0,"aria-selected":l?void 0:C,"aria-disabled":T||void 0,"aria-level":b,"aria-setsize":y,"aria-posinset":v+1,tabIndex:i===x.id&&z?0:-1,ref:e=>g(x.id,e),onFocus:e=>{e.stopPropagation(),f(x.id)},sx:{outline:"none",listStyle:"none",...x.sx||{}},children:[de(h,{className:"omni-tree-content",onClick:e=>{T||(e.stopPropagation(),B&&p(e,x.id),l||m(e,x.id))},sx:{display:"flex",alignItems:"center",gap:S.gap,minHeight:S.minHeight,padding:"0 8px",marginLeft:0,borderRadius:"var(--Style-Border-Radius)",border:"1px solid transparent",color:C?"var(--Text)":"var(--Quiet)",fontWeight:C?600:400,backgroundColor:C?"var(--Pressed)":"transparent",cursor:T?"not-allowed":"pointer",opacity:T?"var(--Disabled, 0.38)":1,transition:"color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease",...T?{}:{"&:hover":{color:"var(--Text)",backgroundColor:"var(--Hover)"},"&:active":{color:"var(--Text)",backgroundColor:"var(--Pressed)"}},"li:focus-visible > &":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"-3px"}},children:[le(h,{"aria-hidden":"true",sx:{width:S.iconSize,height:S.iconSize,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",color:"inherit"},children:B&&(w?d:c)}),n&&!l&&le(Mi,{checked:C,disabled:T,size:"small","aria-hidden":"true",tabIndex:-1,onChange:()=>{}}),x.icon&&le(Na,{size:"small",sx:{color:"inherit",flexShrink:0},children:x.icon}),le(k,{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"inherit",fontWeight:"inherit"},children:x.label}),x.badge&&le(h,{sx:{flexShrink:0},children:x.badge})]}),B&&w&&le(h,{component:"ul",role:"group",sx:{margin:0,padding:0,paddingLeft:"8px",marginLeft:"12px",borderLeft:"1px solid var(--Border)",listStyle:"none",animation:Hu[u]},children:x.children.map((e,h)=>le(Nu,{node:{item:e,level:b+1,index:h,siblings:x.children.length},density:r,expanded:t,selected:a,focusedId:i,multiSelect:o,checkboxSelection:n,disableSelection:l,disabledItemsFocusable:s,collapseIcon:d,expandIcon:c,animation:u,onToggle:p,onSelect:m,onFocusItem:f,registerRef:g},e.id))})]})}function Qu({color:e="default",variant:t="solid",surface:o,density:n="default",animation:l="slide",selectionStyle:d,items:c=Vu,selectionMode:u="single",checkboxSelection:p=!1,disableSelection:m=!1,disabledItemsFocusable:f=!1,defaultExpandedItems:g,expandedItems:x,onExpandedItemsChange:b,selectedItems:v,onSelectedItemsChange:y,onItemExpansionToggle:S,onItemSelectionToggle:k,slots:B,"aria-label":w="Tree view",className:C="",sx:T={},...z}){const A=d||t,I="multi"===u,[R,W]=r(g||[]),D=void 0!==x?x:R,[P,F]=r(v||(I?[]:null)),L=void 0!==v?v:P,H=Array.isArray(L)?L:L?[L]:[],M=s(()=>Eu(c,D),[c,D]),[E,O]=r(null),N=E??M[0]?.item.id??null,Q=a({}),V=i((e,r)=>{r?Q.current[e]=r:delete Q.current[e]},[]),j=i(e=>{O(e),Q.current[e]?.focus()},[]),G=i((e,r)=>{const t=D.includes(r),a=t?D.filter(e=>e!==r):[...D,r];void 0===x&&W(a),b?.(e,a),S?.(e,r,!t)},[D,x,b,S]),U=i((e,r)=>{const t=H.includes(r),a=I?t?H.filter(e=>e!==r):[...H,r]:[r],i=I?a:a[0]??null;void 0===v&&F(i),y?.(e,i),k?.(e,r,!I||!t)},[H,I,v,y,k]),X=i(e=>{const r=M.filter(e=>!e.item.disabled||f),t=r.findIndex(e=>e.item.id===N),a=r[t];if(!a)return;const{item:i}=a,o=!!i.children?.length,n=o&&D.includes(i.id),l=t=>{const a=r[Math.max(0,Math.min(r.length-1,t))];a&&(e.preventDefault(),j(a.item.id))};switch(e.key){case"ArrowDown":l(t+1);break;case"ArrowUp":l(t-1);break;case"Home":l(0);break;case"End":l(r.length-1);break;case"ArrowRight":o&&!n?(e.preventDefault(),G(e,i.id)):n&&l(t+1);break;case"ArrowLeft":if(n)e.preventDefault(),G(e,i.id);else{const r=Ou(c,i.id);r&&(e.preventDefault(),j(r))}break;case"Enter":case" ":e.preventDefault(),m?o&&G(e,i.id):U(e,i.id)}},[M,N,D,c,f,m,j,G,U]),Y=(q=e).charAt(0).toUpperCase()+q.slice(1);var q;const Z="default"===A?void 0:Y,J=o||("light"===A?"Surface-Brightest":"Surface-Dim"),K=B?.collapseIcon?le(B.collapseIcon,{}):le(Na,{size:"small",sx:{color:"inherit",transform:"rotate(90deg)"},children:le(Ur,{})}),$=B?.expandIcon?le(B.expandIcon,{}):le(Na,{size:"small",sx:{color:"inherit"},children:le(Ur,{})});return le(h,{"data-theme":Z,"data-surface":J,className:"omni-treeview omni-treeview-"+A+" omni-treeview-"+e+" omni-treeview-"+n+(C?" "+C:""),sx:{backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",overflow:"hidden",...Mu,...T},children:le(h,{component:"ul",role:"tree","aria-label":w,"aria-multiselectable":I||void 0,onKeyDown:X,sx:{margin:0,padding:"8px",listStyle:"none",fontFamily:"inherit"},...z,children:c.map((e,r)=>le(Nu,{node:{item:e,level:1,index:r,siblings:c.length},density:n,expanded:D,selected:H,focusedId:N,multiSelect:I,checkboxSelection:p,disableSelection:m,disabledItemsFocusable:f,collapseIcon:K,expandIcon:$,animation:l,onToggle:G,onSelect:U,onFocusItem:O,registerRef:V},e.id))})})}const Vu=[{id:"1",label:"Design System",children:[{id:"1-1",label:"Foundations",children:[{id:"1-1-1",label:"Colors"},{id:"1-1-2",label:"Typography"},{id:"1-1-3",label:"Spacing"}]},{id:"1-2",label:"Components",children:[{id:"1-2-1",label:"Buttons"},{id:"1-2-2",label:"Inputs"},{id:"1-2-3",label:"Navigation",disabled:!0}]}]},{id:"2",label:"Tokens",children:[{id:"2-1",label:"Light Mode"},{id:"2-2",label:"Dark Mode"}]},{id:"3",label:"Changelog"}],ju=e=>le(Qu,{variant:"solid",...e}),Gu=e=>le(Qu,{variant:"light",...e}),Uu=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",Xu=[{id:"home",label:"Home"},{id:"products",label:"Products",children:[{id:"featured",label:"Featured"},{id:"new",label:"New Arrivals"},{id:"sale",label:"On Sale"}]},{id:"about",label:"About"},{id:"contact",label:"Contact"}];function Yu({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function qu(){const[e,t]=r(!1),[a,i]=r("medium"),[o,n]=r("left"),[l,s]=r(null),[d,c]=r("Surface");return de(h,{sx:{pb:8},children:[le(qt,{children:"Drawer"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{theme:l,surface:d,children:le(wi,{variant:"default",onClick:()=>t(!0),children:"Open Drawer"})}),le(No,{code:(()=>{const e=["open={open}","onClose={handleClose}"];return"medium"!==a&&e.push('size="'+a+'"'),"left"!==o&&e.push('anchor="'+o+'"'),"<Drawer "+e.join(" ")+">\n <DrawerHeader>\n <H5>Navigation</H5>\n <DrawerClose onClick={handleClose} />\n </DrawerHeader>\n <DrawerContent>\n <OmniTreeView items={navItems} />\n </DrawerContent>\n</Drawer>"})(),language:"JSX",wrap:!0,sx:{mt:2}}),de(Wu,{open:e,onClose:()=>t(!1),size:a,anchor:o,children:[de(Pu,{children:[le(Jt,{children:"Navigation"}),le(Du,{onClick:()=>t(!1)})]}),le(Fu,{children:le(Qu,{items:Xu,variant:"solid",color:"default",defaultExpandedItems:["products"],sx:{border:"none",borderRadius:0}})})]})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[le(h,{sx:{mb:3},children:le(ho,{theme:l,onThemeChange:s,surface:d,onSurfaceChange:c})}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),le(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>le(Yu,{label:Uu(e),selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"ANCHOR"}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:["left","right","top","bottom"].map(e=>le(Yu,{label:Uu(e),selected:o===e,onClick:()=>n(e)},e))})]})]})}),le(no,{value:1,children:le(h,{sx:{p:3},children:le(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),le(k,{spacing:0,children:[{label:"Role",value:'role="dialog" aria-modal="true"'},{label:"Focus",value:"Focus trapped inside drawer. Returns to trigger on close."},{label:"Keyboard",value:"Escape closes. Tab cycles focusable elements."},{label:"Backdrop",value:"Click closes. Body scroll locked while open."},{label:"Close",value:'Button with aria-label="Close drawer"'}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(oa,{children:[e,":"]}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const Zu={small:{minHeight:"120px",padding:"16px",iconSize:"20px",gap:1},medium:{minHeight:"200px",padding:"32px 24px",iconSize:"32px",gap:2},large:{minHeight:"300px",padding:"48px 24px",iconSize:"48px",gap:3}};function Ju({onFiles:e,accept:t,multiple:o=!1,size:n="medium",disabled:l=!1,icon:s,label:d,sublabel:c,children:u,className:p="",sx:m={},...f}){const[g,x]=r(!1),b=a(null),v=a(0),y=Zu[n]||Zu.medium,S=i(r=>{!l&&r?.length&&e?.(Array.from(r))},[l,e]),k=i(e=>{e.preventDefault(),e.stopPropagation(),v.current=0,x(!1),l||S(e.dataTransfer.files)},[l,S]),B=i(e=>{e.preventDefault(),e.stopPropagation()},[]),w=i(e=>{e.preventDefault(),e.stopPropagation(),v.current++,l||x(!0)},[l]),C=i(e=>{e.preventDefault(),e.stopPropagation(),v.current--,0===v.current&&x(!1)},[]),T=i(()=>{l||b.current?.click()},[l]),z=i(e=>{l||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),b.current?.click())},[l]),A=i(e=>{S(e.target.files),e.target.value=""},[S]),I=s||et,R=o?"Drag and drop files here":"Drag and drop file here";return de(h,{role:"button",tabIndex:l?-1:0,"aria-label":d||R,"aria-disabled":l||void 0,onClick:T,onKeyDown:z,onDrop:k,onDragOver:B,onDragEnter:w,onDragLeave:C,className:"drop-zone drop-zone-"+n+(g?" drop-zone-dragging":"")+(l?" drop-zone-disabled":"")+" "+p,sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:y.gap,minHeight:y.minHeight,padding:y.padding,border:"2px dashed",borderColor:g?"var(--Buttons-Primary-Border)":"var(--Buttons-Default-Border)",borderRadius:"32px",backgroundColor:g?"var(--Hover)":"transparent",color:"var(--Text)",cursor:l?"not-allowed":"pointer",opacity:l?"var(--Disabled, 0.38)":1,outline:"none",transition:"background-color 0.2s ease, border-color 0.2s ease",textAlign:"center",...!l&&{"&:hover":{backgroundColor:"var(--Hover)",borderColor:"var(--Buttons-Primary-Border)"},"&:active":{backgroundColor:"var(--Pressed)",borderColor:"var(--Buttons-Primary-Border)"},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"2px",borderColor:"var(--Buttons-Primary-Border)"}},...m},...f,children:[le("input",{ref:b,type:"file",accept:t,multiple:o,onChange:A,style:{display:"none"},"aria-hidden":"true",tabIndex:-1}),u||de(se,{children:[le(I,{sx:{fontSize:y.iconSize,color:"var(--Text-Quiet)"}}),le(oa,{style:{color:"var(--Text)"},children:d||R}),le(ga,{style:{color:"var(--Text-Quiet)"},children:c||"or click to browse"})]})]})}const Ku={small:{px:"12px",py:"8px",fontSize:"13px",iconSize:"18px",gap:"8px"},medium:{px:"16px",py:"12px",fontSize:"14px",iconSize:"20px",gap:"10px"},large:{px:"20px",py:"14px",fontSize:"16px",iconSize:"22px",gap:"12px"}};function $u({children:e,variant:r="light",surface:t,color:a="info",size:i="medium",startDecorator:o,endDecorator:n,className:l="",sx:s={},...d}){const c=(e=>e.charAt(0).toUpperCase()+e.slice(1))("default"===a?"Default":a),u=Ku[i]||Ku.medium,p="default"===a?"Default":c,m=t||("light"===r?"Surface-Brightest":"Surface"),f="var(--Buttons-"+c+"-Border)",g=de(se,{children:[o&&le(h,{className:"alert-start-decorator",sx:{display:"inline-flex",alignItems:"center",fontSize:u.iconSize,lineHeight:1,flexShrink:0,mt:"2px"},children:o}),le(h,{className:"alert-message",sx:{flex:1,minWidth:0},children:"string"==typeof e?le("small"===i?oa:sa,{children:e}):e}),n&&le(h,{className:"alert-end-decorator",sx:{display:"inline-flex",alignItems:"flex-start",flexShrink:0,gap:u.gap,paddingTop:"2px"},children:n})]});return le(h,{role:"alert",className:"alert alert-"+r+" alert-"+i+" alert-"+a+" "+l,sx:{border:"1px solid "+f,borderRadius:"var(--Style-Border-Radius)",overflow:"hidden",boxShadow:ai,...s},...d,children:le(h,{"data-theme":p,"data-surface":m,className:"alert-inner",sx:{display:"flex",alignItems:"flex-start",gap:u.gap,padding:u.py+" "+u.px,fontSize:u.fontSize,fontFamily:"inherit",lineHeight:1.5,color:"var(--Text)",backgroundColor:"var(--Background)",borderRadius:"calc(var(--Style-Border-Radius) - 1px)"},children:g})})}const _u=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",eh=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}],rh={info:le(xe,{}),success:le(me,{}),warning:le(fe,{}),error:le(ge,{})};function th({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function ah({color:e,selected:r,onClick:t}){const a=_u(e);return le(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&le(ue,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function ih(){const[e,t]=r("light"),[a,i]=r("info"),[o,n]=r("medium"),[l,s]=r(!0),[d,c]=r(null),[u,p]=r("Surface"),m=l&&rh[a]?le(Na,{size:"small",sx:{color:"inherit"},children:rh[a]}):void 0;return de(h,{sx:{pb:8},children:[le(qt,{children:"Alert"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{theme:d,surface:u,children:le(h,{sx:{width:"100%",maxWidth:480},children:le($u,{variant:e,color:a,size:o,startDecorator:m,children:"This is an alert message. Check the details for more information."})})}),le(No,{code:(()=>{const r=['variant="'+e+'"'];return"info"!==a&&r.push('color="'+a+'"'),"medium"!==o&&r.push('size="'+o+'"'),l&&rh[a]&&r.push("startDecorator={<Icon><"+_u(a)+"Icon /></Icon>}"),"<Alert "+r.join(" ")+">\n This is an alert message.\n</Alert>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[le(h,{sx:{mb:3},children:le(ho,{theme:d,onThemeChange:c,surface:u,onSurfaceChange:p})}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),le(k,{direction:"row",spacing:1,children:["solid","light"].map(r=>le(th,{label:_u(r),selected:e===r,onClick:()=>t(r)},r))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{spacing:1.5,children:eh.map(e=>de(h,{children:[le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:e.label}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:e.colors.map(e=>le(ah,{color:e,selected:a===e,onClick:i},e))})]},e.label))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),le(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>le(th,{label:_u(e),selected:o===e,onClick:()=>n(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Show Icon"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Start decorator icon"})]}),le(en,{variant:"default-outline",checked:l,onChange:e=>s(e.target.checked),size:"small","aria-label":"Show icon"})]})]})}),le(no,{value:1,children:le(h,{sx:{p:3},children:le(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),le(k,{spacing:0,children:[{label:"Role",value:'role="alert" — live region, announced immediately'},{label:"Border",value:"var(--Buttons-{Color}-Border) on outer shell"},{label:"Shadow",value:"var(--Effect-Level-3)"},{label:"Icons",value:"Decorative — aria-hidden by default via Icon component"}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(oa,{children:[e,":"]}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const oh={small:{px:"12px",py:"8px",fontSize:"13px",gap:"8px",minWidth:"240px"},medium:{px:"16px",py:"10px",fontSize:"14px",gap:"12px",minWidth:"300px"},large:{px:"20px",py:"14px",fontSize:"16px",gap:"16px",minWidth:"360px"}};function nh({children:e,open:r=!1,onClose:t,variant:n="light",surface:l,color:s="info",size:d="medium",anchor:c="bottom",autoHideDuration:u,startDecorator:p,endDecorator:m,action:f,className:g="",sx:x={},...b}){const v=a(null),y=(e=>e.charAt(0).toUpperCase()+e.slice(1))("default"===s?"Default":s),S=oh[d]||oh.medium,k="small"===d?oa:sa,B="default"===s?"Default":y,w=l||("light"===n?"Surface-Brightest":"Surface"),C="var(--Buttons-"+y+"-Border)";o(()=>{if(r&&u&&u>0)return v.current=setTimeout(()=>{t?.({},"timeout")},u),()=>clearTimeout(v.current)},[r,u,t]),o(()=>{if(!r)return;const e=e=>{"Escape"===e.key&&t?.(e,"escapeKeyDown")};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r,t]);const T=i(()=>{v.current&&clearTimeout(v.current)},[]),z=i(()=>{r&&u&&u>0&&(v.current=setTimeout(()=>{t?.({},"timeout")},u))},[r,u,t]),A="top"===c?{from:{transform:"translateX(-50%) translateY(-120%)"},to:{transform:"translateX(-50%) translateY(0)"}}:{from:{transform:"translateX(-50%) translateY(120%)"},to:{transform:"translateX(-50%) translateY(0)"}};return r?le(h,{role:"alert","aria-live":"polite","aria-atomic":"true",onMouseEnter:T,onMouseLeave:z,className:"snackbar snackbar-"+n+" snackbar-"+d+" snackbar-"+c+" snackbar-"+s+" "+g,sx:{position:"fixed",left:"50%",transform:"translateX(-50%)",..."top"===c?{top:"16px"}:{bottom:"16px"},zIndex:1400,minWidth:S.minWidth,maxWidth:"min(560px, calc(100vw - 32px))",border:"1px solid "+C,borderRadius:"var(--Style-Border-Radius)",boxShadow:ai,overflow:"hidden",animation:"snackbar-slide-in 0.3s ease forwards","@keyframes snackbar-slide-in":A,...x},...b,children:de(h,{"data-theme":B,"data-surface":w,sx:{display:"flex",alignItems:"center",gap:S.gap,padding:S.py+" "+S.px,fontSize:S.fontSize,fontFamily:"inherit",lineHeight:1.4,color:"var(--Text)",backgroundColor:"var(--Background)",borderRadius:"calc(var(--Style-Border-Radius) - 1px)"},children:[p&&le(h,{sx:{display:"inline-flex",flexShrink:0,lineHeight:1},children:p}),le(h,{sx:{flex:1,minWidth:0},children:"string"==typeof e?le(k,{children:e}):e}),f&&le(h,{sx:{display:"inline-flex",flexShrink:0},children:f}),m&&le(h,{sx:{display:"inline-flex",flexShrink:0,lineHeight:1},children:m}),t&&le(wi,{iconOnly:!0,variant:"ghost",size:"small",onClick:e=>t(e,"closeClick"),"aria-label":"Close notification",sx:{flexShrink:0,ml:"4px"},children:le(Na,{size:"small",children:le(Wr,{})})})]})}):null}const lh=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",sh=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}],dh={info:le(xe,{}),success:le(me,{}),warning:le(fe,{}),error:le(ge,{})};function ch({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function uh({color:e,selected:r,onClick:t}){const a=lh(e);return le(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&le(ue,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function hh(){const[e,t]=r("light"),[a,i]=r("info"),[o,n]=r("medium"),[l,s]=r("bottom"),[d,c]=r(!0),[u,p]=r(!0),[m,f]=r(!1),[g,x]=r(null),[b,v]=r("Surface"),y=d&&dh[a]?le(Na,{size:"small",sx:{color:"inherit"},children:dh[a]}):void 0;return de(h,{sx:{pb:8},children:[le(qt,{children:"Snackbar"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{theme:g,surface:b,children:le(wi,{variant:"default",onClick:()=>f(!0),children:"Show Snackbar"})}),le(No,{code:(()=>{const r=["open={open}"];return r.push('variant="'+e+'"'),"info"!==a&&r.push('color="'+a+'"'),"medium"!==o&&r.push('size="'+o+'"'),"bottom"!==l&&r.push('anchor="top"'),u&&r.push("onClose={handleClose}"),d&&dh[a]&&r.push("startDecorator={<Icon><"+lh(a)+"Icon /></Icon>}"),"<Snackbar\n "+r.join("\n ")+"\n>\n Operation completed successfully.\n</Snackbar>"})(),language:"JSX",wrap:!0,sx:{mt:2}}),le(nh,{open:m,onClose:u?()=>f(!1):void 0,variant:e,color:a,size:o,anchor:l,autoHideDuration:4e3,startDecorator:y,children:"Operation completed successfully."})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[le(h,{sx:{mb:3},children:le(ho,{theme:g,onThemeChange:x,surface:b,onSurfaceChange:v})}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),le(k,{direction:"row",spacing:1,children:["solid","light"].map(r=>le(ch,{label:lh(r),selected:e===r,onClick:()=>t(r)},r))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{spacing:1.5,children:sh.map(e=>de(h,{children:[le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:e.label}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:e.colors.map(e=>le(uh,{color:e,selected:a===e,onClick:i},e))})]},e.label))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),le(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>le(ch,{label:lh(e),selected:o===e,onClick:()=>n(e)},e))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"ANCHOR"}),le(k,{direction:"row",spacing:1,children:["top","bottom"].map(e=>le(ch,{label:lh(e),selected:l===e,onClick:()=>s(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Show Icon"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Start decorator icon"})]}),le(en,{variant:"default-outline",checked:d,onChange:e=>c(e.target.checked),size:"small","aria-label":"Show icon"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Close Button"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Show dismiss button"})]}),le(en,{variant:"default-outline",checked:u,onChange:e=>p(e.target.checked),size:"small","aria-label":"Close button"})]})]})}),le(no,{value:1,children:le(h,{sx:{p:3},children:le(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),le(k,{spacing:0,children:[{label:"Role",value:'role="alert" aria-live="polite" aria-atomic="true"'},{label:"Close",value:'Button with aria-label="Close notification"'},{label:"Keyboard",value:"Escape closes. Auto-hides after duration."},{label:"Hover",value:"Pauses auto-hide timer on mouse enter"},{label:"Border",value:"var(--Buttons-{Color}-Border) on outer shell"},{label:"Shadow",value:"var(--Effect-Level-3)"}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(oa,{children:[e,":"]}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const ph={default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",white:"Neutral",black:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},mh={small:{diameter:24,thickness:3,fontSize:"9px",labelSize:"0px"},medium:{diameter:40,thickness:4,fontSize:"12px",labelSize:"12px"},large:{diameter:56,thickness:5,fontSize:"14px",labelSize:"14px"}};function fh({value:e,color:r="primary",size:a="medium",thickness:i,showValue:o=!1,children:n,className:l="",sx:s={},...d}){const c=ph[r]||"Primary",u="number"==typeof a?{diameter:a,thickness:Math.max(2,Math.round(a/11)),fontSize:Math.max(8,Math.round(a/3.3))+"px"}:mh[a]||mh.medium,p=i||u.thickness,m=null!=e,f=m?Math.min(100,Math.max(0,e)):0,g=(u.diameter-p)/2,x=2*Math.PI*g,b=m?x-f/100*x:.75*x,v="var(--Buttons-"+c+"-Border)",y="cp-grad-"+t().replace(/:/g,"");return de(h,{role:"progressbar","aria-valuenow":m?Math.round(f):void 0,"aria-valuemin":m?0:void 0,"aria-valuemax":m?100:void 0,"aria-label":m?Math.round(f)+"% progress":"Loading",className:"circular-progress circular-progress-"+a+" circular-progress-"+r+(m?" circular-progress-value":" circular-progress-indeterminate")+" "+l,sx:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:u.diameter+"px",height:u.diameter+"px",flexShrink:0,...!m&&{animation:"circular-progress-spin 1.2s linear infinite","@keyframes circular-progress-spin":{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}},...s},...d,children:[de("svg",{viewBox:"0 0 "+u.diameter+" "+u.diameter,width:u.diameter,height:u.diameter,style:{position:"absolute",top:0,left:0,transform:"rotate(-90deg)"},children:[le("defs",{children:de("linearGradient",{id:y,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[le("stop",{offset:"0%",stopColor:v,stopOpacity:"0"}),le("stop",{offset:"100%",stopColor:v,stopOpacity:"1"})]})}),le("circle",{cx:u.diameter/2,cy:u.diameter/2,r:g,fill:"none",stroke:"var(--Border-Variant)",strokeWidth:p,className:"circular-progress-track"}),le("circle",{cx:u.diameter/2,cy:u.diameter/2,r:g,fill:"none",stroke:"url(#"+y+")",strokeWidth:p,strokeDasharray:x,strokeDashoffset:b,strokeLinecap:"round",className:"circular-progress-indicator",style:{transition:m?"stroke-dashoffset 0.4s ease":"none"}})]}),(o||n)&&m&&le(h,{className:"circular-progress-label","aria-hidden":"true",sx:{position:"relative",zIndex:1,fontSize:u.fontSize,fontWeight:700,fontFamily:"inherit",lineHeight:1,color:"var(--Text)",userSelect:"none"},children:n||Math.round(f)+"%"})]})}const gh=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",xh=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}];function bh({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function vh({color:e,selected:r,onClick:t}){const a=gh(e);return le(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&le(ue,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function yh(){const[e,t]=r("default"),[a,i]=r("medium"),[o,n]=r(!1),[l,s]=r(65),[d,c]=r(!1),[u,p]=r(null),[m,f]=r("Surface");return de(h,{sx:{pb:8},children:[le(qt,{children:"Circular Progress"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{theme:u,children:le(fh,{color:e,size:a,value:o?l:void 0,showValue:o&&d})}),le(No,{code:(()=>{const r=[];return"default"!==e&&r.push('color="'+e+'"'),"medium"!==a&&r.push('size="'+a+'"'),o&&(r.push("value={"+l+"}"),d&&r.push("showValue")),0===r.length?"<CircularProgress />":"<CircularProgress\n "+r.join("\n ")+"\n/>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[le(h,{sx:{mb:3},children:le(ho,{theme:u,onThemeChange:p,surface:m,onSurfaceChange:f})}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{spacing:1.5,children:xh.map(r=>de(h,{children:[le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:r.label}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:r.colors.map(r=>le(vh,{color:r,selected:e===r,onClick:t},r))})]},r.label))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),le(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>le(bh,{label:gh(e),selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Determinate"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Show a static arc at a specific value"})]}),le(en,{checked:o,onChange:e=>n(e.target.checked),size:"small","aria-label":"Determinate"})]}),o&&de(se,{children:[le(h,{sx:{mt:2},children:le(xs,{label:"Value",min:0,max:100,value:l,onChange:(e,r)=>s(r),size:"small",valueLabelDisplay:"auto"})}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Show Label"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Center percentage text"})]}),le(en,{checked:d,onChange:e=>c(e.target.checked),size:"small","aria-label":"Show label"})]})]})]})}),le(no,{value:1,children:le(h,{sx:{p:3},children:de(k,{spacing:3,children:[de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),de(k,{spacing:0,children:[de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Role:"}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:'role="progressbar"'})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Determinate:"}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:'aria-valuenow, aria-valuemin="0", aria-valuemax="100"'})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Indeterminate:"}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:'aria-label="Loading" (no value attributes)'})]}),de(h,{sx:{py:1.5},children:[le(oa,{children:"Label:"}),le(ga,{style:{color:"var(--Text-Quiet)"},children:"Center percentage label is aria-hidden — screen readers use aria-valuenow."})]})]})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"Token Reference"}),de(k,{spacing:0,children:[de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Track (back circle):"}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:"var(--Border-Variant)"})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Fill (progress arc):"}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:"var(--Buttons-{Color}-Border)"})]}),de(h,{sx:{py:1.5},children:[le(oa,{children:"Center label:"}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:"var(--Text)"})]})]})]})]})})})]})})})]})]})}const Sh={default:"Default",primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},kh={small:{height:"4px",borderRadius:"2px"},medium:{height:"6px",borderRadius:"3px"},large:{height:"8px",borderRadius:"4px"}};function Bh({value:e,color:r="primary",size:t="medium",className:a="",sx:i={},...o}){const n=Sh[r]||"Primary",l=kh[t]||kh.medium,s=null!=e,d=s?Math.min(100,Math.max(0,e)):0,c="var(--Buttons-"+n+"-Border)";return le(h,{role:"progressbar","aria-valuenow":s?Math.round(d):void 0,"aria-valuemin":s?0:void 0,"aria-valuemax":s?100:void 0,"aria-label":s?Math.round(d)+"% progress":"Loading",className:"linear-progress linear-progress-"+t+" linear-progress-"+r+(s?" linear-progress-determinate":" linear-progress-indeterminate")+" "+a,sx:{position:"relative",width:"100%",height:l.height,borderRadius:l.borderRadius,backgroundColor:"var(--Border-Variant)",overflow:"hidden",flexShrink:0,...i},...o,children:le(h,{className:"linear-progress-bar",sx:{position:"absolute",top:0,left:0,height:"100%",borderRadius:"inherit",backgroundColor:c,...s?{width:d+"%",transition:"width 0.4s ease"}:{width:"40%",animation:"linear-progress-slide 1.5s ease-in-out infinite","@keyframes linear-progress-slide":{"0%":{left:"-40%",width:"40%"},"50%":{left:"30%",width:"50%"},"100%":{left:"100%",width:"40%"}}}}})})}const wh=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",Ch=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}];function Th({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function zh({color:e,selected:r,onClick:t}){const a=wh(e);return le(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&le(ue,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function Ah(){const[e,t]=r("default"),[a,i]=r("medium"),[o,n]=r(!1),[l,s]=r(65),[d,c]=r(null),[u,p]=r("Surface");return de(h,{sx:{pb:8},children:[le(qt,{children:"Linear Progress"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{theme:d,surface:u,children:le(h,{sx:{width:"100%",maxWidth:400},children:le(Bh,{color:e,size:a,value:o?l:void 0})})}),le(No,{code:(()=>{const r=[];return"default"!==e&&r.push('color="'+e+'"'),"medium"!==a&&r.push('size="'+a+'"'),o&&r.push("value={"+l+"}"),0===r.length?"<LinearProgress />":"<LinearProgress\n "+r.join("\n ")+"\n/>"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[le(h,{sx:{mb:3},children:le(ho,{theme:d,onThemeChange:c,surface:u,onSurfaceChange:p})}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{spacing:1.5,children:Ch.map(r=>de(h,{children:[le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:r.label}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:r.colors.map(r=>le(zh,{color:r,selected:e===r,onClick:t},r))})]},r.label))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),le(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>le(Th,{label:wh(e),selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Determinate"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Show a static bar at a specific value"})]}),le(en,{variant:"default-outline",checked:o,onChange:e=>n(e.target.checked),size:"small","aria-label":"Determinate"})]}),o&&le(h,{sx:{mt:2},children:le(xs,{label:"Value",min:0,max:100,value:l,onChange:(e,r)=>s(r),size:"small",valueLabelDisplay:"auto"})})]})}),le(no,{value:1,children:le(h,{sx:{p:3},children:le(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),le(k,{spacing:0,children:[{label:"Role",value:'role="progressbar"'},{label:"Determinate",value:'aria-valuenow, aria-valuemin="0", aria-valuemax="100"'},{label:"Indeterminate",value:'aria-label="Loading" (no value attributes)'},{label:"Track",value:"var(--Border-Variant)"},{label:"Fill",value:"var(--Buttons-{Color}-Border)"}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(oa,{children:[e,":"]}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const Ih=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]}],Rh=["photo","icon","initials"],Wh={photo:"Photo",icon:"Icon",initials:"Initials"},Dh=["xxx-small","xx-small","x-small","small","medium","large","x-large","xx-large"],Ph={"xxx-small":"XXXS","xx-small":"XXS","x-small":"XS",small:"Small",medium:"Medium",large:"Large","x-large":"XL","xx-large":"XXL"};function Fh({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Lh({color:e,selected:r,onClick:t}){const a=(i=e)?i.charAt(0).toUpperCase()+i.slice(1):"";var i;return le(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&le(ue,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function Hh(){const[e,t]=r("default"),[a,i]=r("medium"),[o,n]=r("initials"),[l,s]=r(!1),[d,c]=r(!1),[u,p]=r(!1),[m,f]=r(null),[g,x]=r("Surface"),b="photo"===o,v=()=>{const r={size:a,clickable:l,insideButton:d};return b||(r.color=e),"initials"===o&&(r.initials="LN"),"photo"===o&&(r.src="https://i.pravatar.cc/150?img=3",r.alt="User avatar"),r};return de(h,{sx:{pb:8},children:[le(qt,{children:"Avatar"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{theme:m,surface:g,children:u?de(Xa,{max:3,size:a,children:[le(Ua,{...v()}),le(Ua,{color:e,size:a,initials:"AB"}),le(Ua,{color:e,size:a,initials:"CD"}),le(Ua,{color:e,size:a,initials:"EF"})]}):le(Ua,{...v()})}),le(No,{code:(()=>{const r=[];return b||"default"===e||r.push('color="'+e+'"'),"medium"!==a&&r.push('size="'+a+'"'),"initials"===o&&r.push('initials="LN"'),"photo"===o&&r.push('src="..." alt="User avatar"'),l&&r.push("clickable onClick={handleClick}"),d&&r.push("insideButton"),u?"<AvatarGroup max={3}>\n <Avatar "+r.join(" ")+' />\n <Avatar initials="AB" />\n <Avatar initials="CD" />\n <Avatar initials="EF" />\n</AvatarGroup>':"<Avatar "+r.join(" ")+" />"})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[le(h,{sx:{mb:3},children:le(ho,{theme:m,onThemeChange:f,surface:g,onSurfaceChange:x})}),de(h,{sx:{opacity:b?.4:1,pointerEvents:b?"none":"auto"},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{spacing:1.5,children:Ih.map(r=>de(h,{children:[le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:r.label}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:r.colors.map(r=>le(Lh,{color:r,selected:e===r,onClick:t},r))})]},r.label))}),b&&le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:8},children:"Color is ignored when the avatar shows a photo — the image carries the visual."})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:Dh.map(e=>le(Fh,{label:Ph[e],selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"CONTENT"}),le(k,{direction:"row",spacing:1,children:Rh.map(e=>le(Fh,{label:Wh[e],selected:o===e,onClick:()=>n(e)},e))})]}),de(h,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Clickable"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Interactive with hover/focus states"})]}),le(en,{variant:"default-outline",checked:l,onChange:e=>s(e.target.checked),size:"small","aria-label":"Clickable"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Inside Button"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Adds 2px horizontal margin so the avatar sits cleanly in a Button"})]}),le(en,{variant:"default-outline",checked:d,onChange:e=>c(e.target.checked),size:"small","aria-label":"Inside Button"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Group"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Show as AvatarGroup with overflow"})]}),le(en,{variant:"default-outline",checked:u,onChange:e=>p(e.target.checked),size:"small","aria-label":"Show group"})]})]})}),le(no,{value:1,children:le(h,{sx:{p:3},children:le(k,{spacing:3,children:de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),le(k,{spacing:0,children:[{label:"Role",value:'role="img" (static) or role="button" (clickable)'},{label:"Label",value:'aria-label from alt, initials, or "Avatar"'},{label:"Image",value:"alt text on <img>. Falls back to initials or icon on error."},{label:"Clickable",value:"Rendered as <button>. Focus ring: 3px solid var(--Focus-Visible)."},{label:"Group",value:'role="group" aria-label="Avatar group, N avatars"'}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(oa,{children:[e,":"]}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})})})})]})})})]})]})}const Mh=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",Eh=["primary","secondary","tertiary","neutral","info","success","warning","error"];function Oh({ratio:e,threshold:r}){if(!e)return le(ga,{style:{color:"var(--Text-Quiet)"},children:"--"});const t=parseFloat(e)>=r;return de(h,{sx:{display:"inline-flex",alignItems:"center",gap:.5},children:[de(h,{sx:{px:1,py:.25,borderRadius:"4px",backgroundColor:t?"var(--Tags-Success-BG)":"var(--Tags-Error-BG)",color:t?"var(--Tags-Success-Text)":"var(--Tags-Error-Text)",fontSize:"11px",fontWeight:700},children:[e,":1"]}),le(ga,{style:{color:t?"var(--Tags-Success-Text)":"var(--Tags-Error-Text)"},children:t?"Pass":"Fail"})]})}function Nh({label:e,ratio:r,threshold:t,note:a}){return de(h,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(h,{sx:{flex:1},children:[le(oa,{style:{color:"var(--Text)"},children:e}),a&&le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:a})]}),le(Oh,{ratio:r,threshold:t})]})}function Qh({color:e,selected:r,onClick:t}){const a=Mh(e);return le(B,{title:a,arrow:!0,children:le(h,{onClick:()=>t(e),role:"button","aria-label":"Select "+a+" color","aria-pressed":r,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{transform:"scale(1.1)"}},children:r&&le(ue,{sx:{fontSize:24,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})})}function Vh({label:e,selected:r,onClick:t}){return le(h,{component:"button",onClick:t,sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"2px solid var(--Buttons-Primary-Button)",borderRadius:"var(--Style-Border-Radius)",backgroundColor:r?"var(--Buttons-Primary-Button)":"transparent",color:r?"var(--Buttons-Primary-Text)":"var(--Text)",padding:"4px 12px",fontSize:"14px",fontFamily:"inherit",fontWeight:500,whiteSpace:"nowrap",flexShrink:0,transition:"background-color 0.15s ease, color 0.15s ease","&:hover":{backgroundColor:r?"var(--Buttons-Primary-Hover)":"var(--Surface-Dim)"},"&:focus-visible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"}},children:e})}function jh(){const[e,t]=r(0),[a,i]=r("solid"),[n,l]=r("primary"),[s,d]=r("medium"),[c,u]=r("5"),[p,m]=r(!1),[f,g]=r(!1),[y,S]=r({}),B=()=>"solid"===a?n:n+"-"+a,w=()=>{if(p)return;const e=parseInt(c,10);return isNaN(e)||String(e)!==c.trim()?c||void 0:e};o(()=>{const e=Mh(n),r={};"solid"===a?(r.badgeBg=Uo("--Buttons-"+e+"-Button"),r.badgeText=Uo("--Buttons-"+e+"-Text"),r.badgeBorder=null):"outline"===a?(r.badgeBg=Uo("--Background"),r.badgeText=Uo("--Text"),r.badgeBorder=Uo("--Buttons-"+e+"-Border")):"light"===a&&(r.badgeBg=Uo("--Buttons-"+e+"-Button"),r.badgeText=Uo("--Buttons-"+e+"-Text"),r.badgeBorder=Uo("--Buttons-"+e+"-Border")),r.background=Uo("--Background"),r.focusVisible=Uo("--Focus-Visible"),S(r)},[a,n]);const T={small:{badge:"16px",dot:"8px",font:"10px"},medium:{badge:"20px",dot:"10px",font:"12px"},large:{badge:"24px",dot:"12px",font:"14px"}};return de(h,{sx:{width:"100%"},children:[le(qt,{style:{marginBottom:8},children:"Badge"}),le(sa,{color:"quiet",style:{marginBottom:24},children:"Small label attached to an element showing status or count. Solid, outline, and light variants across all 8 colors."}),de(M,{value:e,onChange:(e,r)=>t(r),sx:{borderBottom:"1px solid var(--Border)",mb:0},children:[le(E,{label:"Playground"}),le(E,{label:"Accessibility"})]}),0===e&&de(C,{container:!0,sx:{minHeight:400},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"calc((100vw - 432px) / 2)"},flexShrink:0},children:[le(h,{sx:{p:4,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:200,backgroundColor:"var(--Background)",borderBottom:"1px solid var(--Border)"},children:de(k,{direction:"row",spacing:6,alignItems:"center",children:[le(Ka,{variant:B(),size:s,badgeContent:w(),dot:p,showZero:f,children:le(rt,{sx:{fontSize:32,color:"var(--Text-Quiet)"}})}),le(Ka,{variant:B(),size:s,badgeContent:w(),dot:p,showZero:f,children:le(Te,{sx:{fontSize:32,color:"var(--Text-Quiet)"}})}),le(Ka,{variant:B(),size:s,badgeContent:w(),dot:p,showZero:f,children:le(Ae,{sx:{fontSize:32,color:"var(--Text-Quiet)"}})})]})}),le(No,{code:(()=>{const e=['variant="'+B()+'"','size="'+s+'"'];if(p)e.push("dot");else{const r=w();"number"==typeof r?e.push("badgeContent={"+r+"}"):r&&e.push('badgeContent="'+r+'"')}return f&&e.push("showZero"),"<Badge "+e.join(" ")+">\n <MailIcon />\n</Badge>"})(),language:"JSX",sx:{borderRadius:0,borderBottom:"1px solid var(--Border)"}})]}),de(C,{item:!0,sx:{width:{xs:"calc(100vw - 432px)",md:"calc((100vw - 432px) / 2)"},flexShrink:0,p:3,backgroundColor:"var(--Container)",overflowY:"auto"},children:[le(Zt,{children:"Playground"}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),le(k,{direction:"row",spacing:1,flexWrap:"wrap",sx:{gap:1},children:["solid","outline","light"].map(e=>le(Vh,{label:Mh(e),selected:a===e,onClick:()=>i(e)},e))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:Eh.map(e=>le(Qh,{color:e,selected:n===e,onClick:l},e))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SIZE"}),le(k,{direction:"row",spacing:1,children:["small","medium","large"].map(e=>le(Vh,{label:Mh(e),selected:s===e,onClick:()=>d(e)},e))}),de(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:["Badge ",T[s]?.badge," · Dot ",T[s]?.dot," · Font ",T[s]?.font]})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"BADGE CONTENT"}),le(v,{size:"small",value:c,onChange:e=>u(e.target.value),placeholder:"Number or text",disabled:p,sx:{width:"160px","& .MuiOutlinedInput-root":{fontFamily:"inherit",fontSize:"14px",backgroundColor:"var(--Background)","& fieldset":{borderColor:"var(--Border)"},"&:hover fieldset":{borderColor:"var(--Border)"},"&.Mui-focused fieldset":{borderColor:"var(--Buttons-Primary-Border)"}},"& .MuiOutlinedInput-input":{color:"var(--Text)",padding:"6px 12px"}}})]}),de(h,{sx:{mt:3},children:[le(b,{control:le(x,{checked:p,onChange:e=>m(e.target.checked),size:"small"}),label:le(oa,{children:"Dot (no content)"})}),le(b,{control:le(x,{checked:f,onChange:e=>g(e.target.checked),size:"small"}),label:le(oa,{children:"Show zero"})})]})]})]}),1===e&&de(h,{sx:{p:4},children:[le(Zt,{children:"Accessibility Requirements"}),de(oa,{color:"quiet",style:{marginBottom:32},children:["Based on current Playground settings: ",a," · ",n," · ",s]}),de(k,{spacing:4,children:[de(h,{sx:{p:3,backgroundColor:"var(--Container)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"Badge Text Contrast"}),le(oa,{color:"quiet",style:{marginBottom:16},children:"Badge text must have ≥ 4.5:1 contrast against badge background (WCAG 1.4.3 AA)"}),le(Nh,{label:"Badge Text vs. Badge Background",ratio:Go(y.badgeText,y.badgeBg),threshold:4.5,note:"solid"===a?"var(--Buttons-{C}-Text) vs var(--Buttons-{C}-Button)":"outline"===a?"var(--Text) vs var(--Background)":"var(--Buttons-{C}-Text) vs var(--Buttons-{C}-Button)"})]}),de(h,{sx:{p:3,backgroundColor:"var(--Container)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"Badge Visibility"}),le(oa,{color:"quiet",style:{marginBottom:16},children:"Badge background (or border) must have ≥ 3:1 contrast against page background (WCAG 1.4.11)"}),(()=>{const e=Go(y.badgeBg,y.background),r=y.badgeBorder?Go(y.badgeBorder,y.background):null;return le(Nh,{label:"Badge vs. Page Background",ratio:(t=e,i=r,t||i?t?i?parseFloat(t)>=parseFloat(i)?t:i:t:i:null),threshold:3.1,note:"outline"===a?"Border "+(r||"--")+":1 — outline relies on border contrast":"BG "+(e||"--")+":1"});var t,i})()]}),de(h,{sx:{p:3,backgroundColor:"var(--Container)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"Badge Sizing"}),le(oa,{color:"quiet",style:{marginBottom:16},children:"Badge dimensions per size setting"}),le(h,{sx:{display:"flex",justifyContent:"space-between",py:1.5,borderBottom:"1px solid var(--Border)"},children:de(h,{children:[de(oa,{children:["Badge height (",s,")"]}),de(ga,{style:{color:"var(--Text-Quiet)"},children:[T[s]?.badge," height · ",T[s]?.font," font · pill shape"]})]})}),le(h,{sx:{display:"flex",justifyContent:"space-between",py:1.5,borderBottom:"1px solid var(--Border)"},children:de(h,{children:[de(oa,{children:["Dot size (",s,")"]}),de(ga,{style:{color:"var(--Text-Quiet)"},children:[T[s]?.dot," diameter circle"]})]})})]}),de(h,{sx:{p:3,backgroundColor:"var(--Container)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA & Semantics"}),de(k,{spacing:0,children:[de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{style:{display:"block",marginBottom:2},children:"Screenreader support:"}),le(ga,{style:{color:"var(--Text-Quiet)"},children:'MUI Badge renders badge content in a visually-hidden span for assistive technology. Numeric content is announced (e.g. "5 notifications").'})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{style:{display:"block",marginBottom:2},children:"Dot variant:"}),le(ga,{style:{color:"var(--Text-Quiet)"},children:"Dot badges are purely decorative. Ensure the parent element conveys status to assistive tech via aria-label or similar."})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{style:{display:"block",marginBottom:2},children:"Max overflow:"}),le(ga,{style:{color:"var(--Text-Quiet)"},children:'When content exceeds max (default 99), displays "99+" visually but announces the actual number to screenreaders.'})]})]})]})]})]})]})}const Gh=e=>e.charAt(0).toUpperCase()+e.slice(1);function Uh(e){return e&&"default"!==e&&"border-variant"!==e?"border"===e?"var(--Border)":"var(--Icons-"+Gh(e)+")":"var(--Border-Variant)"}function Xh(e,r){const t=e&&!["default","border","border-variant"].includes(e)?Gh(e):"Default",a=Uh(e);return"light"===r?{bg:"var(--Tag-"+t+"-BG)",text:"var(--Tag-"+t+"-Text)",border:"1px solid "+a}:{bg:"var(--Background)",text:"var(--Text)",border:"1px solid "+a}}const Yh={small:1,medium:2,large:4};function qh({color:e="default",orientation:r="horizontal",size:t="small",children:a,indicatorText:i,indicatorStyle:o="outline",textAlign:n="center",className:l="",sx:s={},...d}){const c=Uh(e),u=Yh[t]||Yh.small,p=!(!a&&!i),m=a||i,f="vertical"===r;if(f&&!p)return le(h,{role:"separator","aria-orientation":"vertical",className:"divider-vertical divider-"+e+" "+l,sx:{display:"inline-block",width:u+"px",alignSelf:"stretch",minHeight:24,backgroundColor:c,flexShrink:0,...s},...d});if(f&&p){const r=Xh(e,o),t="top"===n?"0 0 10%":"1 1 auto",a="top"===n?"1 1 auto":"bottom"===n?"0 0 10%":"1 1 auto";return de(h,{role:"separator","aria-orientation":"vertical",className:"divider-vertical divider-"+e+" divider-indicator "+l,sx:{display:"inline-flex",flexDirection:"column",alignItems:"center",alignSelf:"stretch",minHeight:24,flexShrink:0,...s},...d,children:[le(h,{sx:{flex:t,width:u+"px",backgroundColor:c}}),le(h,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,my:1,px:.75,py:.5,borderRadius:"12px",fontSize:"11px",fontWeight:500,fontFamily:"inherit",lineHeight:1.2,whiteSpace:"nowrap",backgroundColor:r.bg,color:r.text,border:r.border,boxSizing:"border-box"},children:m}),le(h,{sx:{flex:a,width:u+"px",backgroundColor:c}})]})}if(!p)return le(h,{role:"separator","aria-orientation":"horizontal",className:"divider-horizontal divider-"+e+" "+l,sx:{width:"100%",height:u+"px",backgroundColor:c,flexShrink:0,...s},...d});const g=Xh(e,o),x="left"===n?"0 0 10%":"1 1 auto",b="left"===n?"1 1 auto":"right"===n?"0 0 10%":"1 1 auto";return de(h,{role:"separator","aria-orientation":"horizontal",className:"divider-horizontal divider-"+e+" divider-indicator "+l,sx:{display:"flex",alignItems:"center",width:"100%",...s},...d,children:[le(h,{sx:{flex:x,height:u+"px",backgroundColor:c}}),le(h,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,mx:2,px:1.5,py:.5,borderRadius:"12px",fontSize:"12px",fontWeight:500,fontFamily:"inherit",lineHeight:1.2,whiteSpace:"nowrap",backgroundColor:g.bg,color:g.text,border:g.border,boxSizing:"border-box"},children:m}),le(h,{sx:{flex:b,height:u+"px",backgroundColor:c}})]})}const Zh={eyebrow:wa,title:sa,secondary:na},Jh={primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},Kh={small:{py:.5,px:1.5,fontSize:"13px",iconSize:16,decoratorSize:28,gap:1,checkSize:"small"},medium:{py:1,px:1,fontSize:"14px",iconSize:20,decoratorSize:36,gap:1.5,checkSize:"small"},large:{py:1.5,px:2.5,fontSize:"16px",iconSize:24,decoratorSize:40,gap:2,checkSize:"medium"}};function $h({children:e,size:r="medium",isButton:t=!1,onAction:a,ariaLabel:i}){return le(h,t?{component:"button",role:"button",tabIndex:0,"aria-label":i||"Action",onClick:e=>{e.stopPropagation(),a?.(e)},onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),a?.(e))},className:"list-item-decorator-button",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,padding:0,border:"none",backgroundColor:"transparent",borderRadius:"50%",cursor:"pointer",color:"inherit",transition:"background-color 0.15s ease","&:hover":{backgroundColor:"rgba(128,128,128,0.15)"},"&:active":{backgroundColor:"rgba(128,128,128,0.25)"},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"-3px"}},children:e}:{className:"list-item-decorator",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e})}function _h({children:e,startDecorator:r,endDecorator:t,startDecoratorIsButton:a=!1,endDecoratorIsButton:i=!1,onStartDecoratorAction:o,onEndDecoratorAction:n,startDecoratorAriaLabel:l,endDecoratorAriaLabel:s,size:d="medium",variant:c="default",color:u,eyebrow:p,overline:m,secondary:f,clickable:g=!1,disabled:b=!1,selected:v=!1,selectionMode:y="none",onSelect:S,onClick:k,bottomBorder:B=!1,rightBorder:w=!1,sx:C={},...T}){const z=Kh[d]||Kh.medium,A=g||!!k,I="checkbox"===y||"radio"===y,W=(A||I)&&!b,D=e=>{b||(I&&S?.(e),k?.(e))};return de(h,{component:"li",role:I?"option":A?"button":"listitem",tabIndex:W?0:void 0,"aria-disabled":b||void 0,"aria-selected":I?v:v||void 0,"aria-checked":"checkbox"===y?v:void 0,onClick:D,onKeyDown:W?e=>{b||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),D(e))}:void 0,className:"list-item"+(v?" list-item-selected":"")+(b?" list-item-disabled":"")+(A?" list-item-clickable":"")+(I?" list-item-selectable":""),sx:{display:"flex",flexDirection:"row",alignItems:"flex-start",justifyContent:"flex-start",width:"100%",boxSizing:"border-box",gap:"var(--Sizing-1-and-Half)",py:z.py,px:z.px,minHeight:"32px",fontSize:z.fontSize,fontFamily:"inherit",color:"var(--Text)",listStyle:"none",cursor:W?"pointer":"default",opacity:b?"var(--Disabled, 0.38)":1,position:"relative",transition:"background-color 0.15s ease, box-shadow 0.15s ease",...A?{border:"1px solid var(--Border)",boxShadow:"var(--Effect-Level-1)",padding:"var(--Sizing-1)",borderRadius:"var(--Input-Radius)"}:{},...!A&&B?{borderBottom:"1px solid var(--Border-Variant)"}:{},...!A&&w?{borderRight:"1px solid var(--Border-Variant)"}:{},backgroundColor:v?"var(--Hover)":"transparent","&:hover":W?{backgroundColor:"var(--Hover)",boxShadow:"var(--Effect-Level-2)"}:{},"&:active":W?{backgroundColor:"var(--Pressed)",boxShadow:"var(--Effect-Level-1)"}:{},"&:focus-visible":{outline:"none"},"&:focus-visible::after":{content:'""',position:"absolute",inset:"1px",border:"3px solid var(--Focus-Visible)",borderRadius:"var(--Input-Inner-Focus-Visible)",pointerEvents:"none"},...C},...T,children:["checkbox"===y&&le(x,{checked:v,disabled:b,size:z.checkSize,tabIndex:-1,onClick:e=>e.stopPropagation(),onChange:()=>S?.(),sx:{p:0,mr:0,color:"inherit","&.Mui-checked":{color:"inherit"}},inputProps:{"aria-label":"Select "+("string"==typeof e?e:"item")}}),"radio"===y&&le(R,{checked:v,disabled:b,size:z.checkSize,tabIndex:-1,onClick:e=>e.stopPropagation(),onChange:()=>S?.(),sx:{p:0,mr:0,color:"inherit","&.Mui-checked":{color:"inherit"}},inputProps:{"aria-label":"Select "+("string"==typeof e?e:"item")}}),r&&le($h,{size:d,isButton:a,onAction:o,ariaLabel:l,children:r}),(()=>{const r=Zh,t=p??m,a={display:"block",width:"100%",wordBreak:"break-word",overflowWrap:"anywhere"};return de(h,{sx:{flex:"1 1 auto",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:[t&&le(r.eyebrow,{style:{...a,color:"var(--Quiet)"},children:t}),null!=e&&le(r.title,{style:{...a,color:"var(--Text)"},children:e}),f&&le(r.secondary,{style:{...a,color:"var(--Quiet)"},children:f})]})})(),t&&le($h,{size:d,isButton:i,onAction:n,ariaLabel:s,children:t})]})}function ep({children:r,items:t,variant:a="default",color:i="primary",size:o="medium",orientation:n="vertical",dividers:l=!1,selectionMode:s="none",loading:d=!1,skeletonRows:c=3,empty:u,error:p,selectedIndices:m=[],onSelectionChange:f,clickable:g=!1,component:x="ul",className:b="",sx:v={},...y}){const S="horizontal"===n,k="checkbox"===s||"radio"===s,B="light"===a,w="default"===a,C={};("solid"===a||B)&&Jh[i]&&(C["data-theme"]=Jh[i],B&&(C["data-surface"]="Surface-Brightest"));const T=p?"error":d?"loading":t&&0===t.length&&u?"empty":null;return le(h,{component:x,role:k?"listbox":"list","aria-busy":"loading"===T?"true":void 0,"aria-multiselectable":"checkbox"===s||void 0,...C,className:"list-container list-"+a+" list-"+i+" "+b,sx:{display:"flex",flexDirection:S?"row":"column",boxSizing:"border-box",alignItems:"stretch",gap:g?"var(--Sizing-1)":0,m:0,p:w?0:1,backgroundColor:w?"transparent":"var(--Background)",color:"var(--Text)",borderRadius:w?0:"var(--Style-Border-Radius)",width:"100%",listStyle:"none",...S?{"& > .list-item":{flex:"1 1 0",width:"auto"}}:{},...v},...y,children:(()=>{if("loading"===T)return le(h,{component:"li",sx:{listStyle:"none"},children:le(vt,{label:"Loading",children:Array.from({length:c}).map((e,r)=>le(_h,{size:o,variant:a,color:i,children:"        "},"sk-"+r))})});if("error"===T)return le(h,{component:"li",sx:{listStyle:"none"},children:p});if("empty"===T)return le(h,{component:"li",sx:{listStyle:"none"},children:u});if(t&&t.length>0){const e=[];return t.forEach((r,n)=>{e.push(le(_h,{size:o,variant:a,color:i,startDecorator:r.startDecorator,endDecorator:r.endDecorator,startDecoratorIsButton:r.startDecoratorIsButton,endDecoratorIsButton:r.endDecoratorIsButton,onStartDecoratorAction:r.onStartDecoratorAction,onEndDecoratorAction:r.onEndDecoratorAction,startDecoratorAriaLabel:r.startDecoratorAriaLabel,endDecoratorAriaLabel:r.endDecoratorAriaLabel,eyebrow:r.eyebrow??r.overline,secondary:r.secondary,clickable:g||r.clickable,disabled:r.disabled,bottomBorder:r.bottomBorder,rightBorder:r.rightBorder,selected:k?m.includes(n):r.selected,selectionMode:s,onSelect:()=>(e=>{if(f)if("radio"===s)f([e]);else{const r=m.includes(e)?m.filter(r=>r!==e):[...m,e];f(r)}})(n),onClick:r.onClick,children:r.label||r.children},"item-"+n)),l&&n<t.length-1&&e.push(le(h,{component:"li",role:"separator","aria-hidden":"true",sx:S?{width:"1px",alignSelf:"stretch",backgroundColor:"var(--Border)",flexShrink:0}:{height:"1px",backgroundColor:"var(--Border)"}},"div-"+n))}),e}if(r){const t=e.Children.toArray(r);if(!l)return t;const a=[];return t.forEach((e,r)=>{a.push(e),r<t.length-1&&a.push(le(h,{component:"li",role:"separator","aria-hidden":"true",sx:S?{width:"1px",alignSelf:"stretch",backgroundColor:"var(--Border)",flexShrink:0}:{height:"1px",backgroundColor:"var(--Border)"}},"div-"+r))}),a}return null})()})}const rp={primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},tp={small:{py:"4px",px:"8px",fontSize:"13px",headerFontSize:"12px"},medium:{py:"8px",px:"12px",fontSize:"14px",headerFontSize:"13px"},large:{py:"12px",px:"16px",fontSize:"16px",headerFontSize:"14px"}};function ap({children:e,columns:r,rows:t,footerRows:a,variant:i="default",color:o="primary",loading:n=!1,skeletonRows:l=3,empty:s,error:d,size:c="medium",stripe:u="none",stickyHeader:p=!1,stickyFooter:m=!1,className:f="",sx:g={},...x}){const b=tp[c]||tp.medium,v="solid"===i,y="outlined"===i,S="light"===i,k=(e=>e.charAt(0).toUpperCase()+e.slice(1))(o),B=y?"1px solid var(--Buttons-"+k+"-Border)":"none",w={};v&&rp[o]&&(w["data-theme"]=rp[o]);const C=()=>{const e={fontWeight:600,fontSize:b.headerFontSize,textAlign:"left",padding:b.py+" "+b.px,borderBottom:"2px solid var(--Border)",color:"var(--Text)",whiteSpace:"nowrap"};return S?(e.backgroundColor="var(--Buttons-"+k+"-Button)",e.color="var(--Buttons-"+k+"-Text)"):e.backgroundColor=v?"var(--Hover)":"var(--Background)",p&&(e.position="sticky",e.top=0,e.zIndex=2),e},T=()=>{const e={fontWeight:600,fontSize:b.headerFontSize,textAlign:"left",padding:b.py+" "+b.px,borderTop:"2px solid var(--Border)",color:"var(--Text)",whiteSpace:"nowrap"};return S?(e.backgroundColor="var(--Buttons-"+k+"-Button)",e.color="var(--Buttons-"+k+"-Text)"):e.backgroundColor=v?"var(--Hover)":"var(--Background)",m&&(e.position="sticky",e.bottom=0,e.zIndex=2),e},z=e=>"none"===u?"Surface":"odd"===u?e%2==0?"Surface":"Surface-Dim":"even"===u&&e%2==0?"Surface-Dim":"Surface",A=()=>({padding:b.py+" "+b.px,fontSize:b.fontSize,color:"var(--Text)",borderBottom:"1px solid var(--Border)",textAlign:"left"}),I=d?"error":n?"loading":t&&0===t.length&&s?"empty":null,R=Boolean(a&&a.length>0)&&"error"!==I,W=e=>le(h,{component:"tbody",children:le(h,{component:"tr",children:le(h,{component:"td",colSpan:r?r.length:1,sx:{padding:0,border:"none"},children:e})})});return le(h,{className:"table-wrapper table-"+i+(v||S||y?" table-"+o:"")+" "+f,...w,"aria-busy":"loading"===I?"true":void 0,sx:{width:"100%",overflow:"auto",border:B,borderRadius:y||S?"var(--Style-Border-Radius)":0,...g},children:le(h,{component:"table",sx:{width:"100%",borderCollapse:"collapse",tableLayout:"fixed",fontFamily:"inherit","& thead th":C(),"& tbody td":A(),"& tfoot td, & tfoot th":T(),...p?{"& thead th":{...C(),position:"sticky",top:0,zIndex:2}}:{},...m?{"& tfoot td, & tfoot th":{...T(),position:"sticky",bottom:0,zIndex:2}}:{}},...x,children:r&&t?r&&(t||I)?de(se,{children:[le(h,{component:"thead",children:le(h,{component:"tr",children:r.map((e,r)=>le(h,{component:"th",sx:{...C(),...e.width?{width:e.width}:{},...e.align?{textAlign:e.align}:{}},children:e.label||e.header||e},"h-"+r))})}),"loading"===I&&W(le(vt,{label:"Loading",children:le(h,{component:"table",sx:{width:"100%",borderCollapse:"collapse",tableLayout:"fixed"},children:le(h,{component:"tbody",children:Array.from({length:l}).map((e,t)=>le(h,{component:"tr","data-surface":z(t),children:r.map((e,r)=>le(h,{component:"td",sx:A(),children:"        "},"skc-"+t+"-"+r))},"sk-"+t))})})})),"error"===I&&W(d),"empty"===I&&W(s),!I&&t&&le(h,{component:"tbody",children:t.map((e,t)=>le(h,{component:"tr","data-surface":z(t),sx:{backgroundColor:"var(--"+z(t)+")"},children:(Array.isArray(e)?e:r.map(r=>e[r.field||r.key])).map((e,a)=>le(h,{component:"td",sx:{...A(),...r[a]&&r[a].align?{textAlign:r[a].align}:{}},children:e},"c-"+t+"-"+a))},"r-"+t))}),'/* The footer is decided PER STATE, not dropped wholesale. loading — ghosted, not hidden. A total that vanishes and reappears moves the table\'s height twice, which is the reflow the header is already kept to avoid; and the total genuinely IS loading, so a placeholder is the honest thing to show rather than a gap. empty — SHOWN as given. This is the case the first version got wrong. A filtered view with no matching invoices has a real total: zero. Hiding it makes the user wonder whether the filter or the sum failed, when the answer is simply "none, and they add up to nothing". error — dropped, and this is the one that must stay dropped. A total computed over data that failed to arrive is not missing, it is WRONG, and a wrong number shown confidently is worse than no number. Partial failures are the sharp case: some rows land, the sum looks plausible, and nothing on screen says it is short. */',R&&le(h,{component:"tfoot",children:a.map((e,t)=>le(h,{component:"tr",children:(Array.isArray(e)?e:r.map(r=>e[r.field||r.key])).map((e,a)=>le(h,{component:"td",sx:{...T(),...r[a]&&r[a].align?{textAlign:r[a].align}:{},..."loading"===I?bt():{}},children:e},"fc-"+t+"-"+a))},"f-"+t))})]}):null:e})})}const ip={primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},op={primary:"Primary",secondary:"Secondary",tertiary:"Tertiary",neutral:"Neutral",info:"Info",success:"Success",warning:"Warning",error:"Error"},np={small:{fontSize:"12px",py:"4px",px:"8px",maxWidth:200,arrowSize:6},medium:{fontSize:"13px",py:"6px",px:"12px",maxWidth:280,arrowSize:8},large:{fontSize:"14px",py:"8px",px:"16px",maxWidth:360,arrowSize:10}};function lp({children:e,title:r,variant:t="solid",color:a="primary",size:i="medium",placement:o="bottom",arrow:n=!1,open:l,enterDelay:s=100,leaveDelay:d=0,describeChild:c=!1,className:u="",sx:p={},...m}){const f=np[i]||np.medium,g="solid"===t,x="light"===t,b="outline"===t,v=(e=>e.charAt(0).toUpperCase()+e.slice(1))(a),y="var(--Background)",S=void 0===l?{}:{open:l};return le(B,{title:r?le(h,{"data-theme":(g?ip[a]:x?op[a]:null)||void 0,"data-surface":x?"Surface-Brightest":g?"Surface":void 0,className:"tooltip-content tooltip-"+t+" tooltip-"+a+" tooltip-"+i+" "+u,sx:{backgroundColor:"var(--Background)",color:"var(--Text)",border:b?"1px solid var(--Buttons-"+v+"-Border)":"none",borderRadius:"var(--Style-Border-Radius)",fontSize:f.fontSize,lineHeight:1.5,fontFamily:"inherit",padding:f.py+" "+f.px,maxWidth:f.maxWidth+"px",boxShadow:"0 2px 8px rgba(0,0,0,0.15)",...p},children:r}):"",placement:o,arrow:n,enterDelay:s,leaveDelay:d,describeChild:c,...S,componentsProps:{tooltip:{sx:{backgroundColor:"transparent",padding:0,maxWidth:"none",boxShadow:"none"}},arrow:{sx:{color:y,"&::before":{border:b?"1px solid var(--Buttons-"+v+"-Border)":"none",backgroundColor:y,boxSizing:"border-box"},fontSize:f.arrowSize+"px"}}},...m,children:e})}const sp={default:{theme:"App-Bar"},primary:{theme:"Primary"},"primary-light":{theme:"Primary",surface:"Surface-Brightest"},white:{theme:"Neutral",surface:"Surface-Brightest"},black:{theme:"Neutral",surface:"Surface-Dimmest"}};function dp({children:e,onClick:r,ariaLabel:t}){return le(wi,{iconOnly:!0,variant:"ghost",size:"medium",onClick:r,"aria-label":t,children:e})}function cp({barColor:t="default",surface:a="Surface",loginType:i="login",menuType:o="hamburger",brandType:n="name",searchPosition:l="right",companyName:s="Company",navLinks:d=["Home","Products","About"],rightButtons:c=[],showRightButtons:u=!1,onMenuClick:p,user:m,onLogin:f,onSignOut:g,brand:x,onBrandClick:b,centerSlot:v,endSlot:y,searchValue:S,onSearchChange:k,searchPlaceholder:B="Search...",children:w,className:C="",sx:T={}}){const[z,A]=r(!1),I=sp[t]||sp.default,R=I.theme,W=I.surface||a,D="expanded"===o&&d.length>3?"hamburger":o,P=le(ws,{placeholder:B,size:"medium",value:S,onChange:k,sx:{flex:"left"===l?"0 1 400px":"0 1 280px",minWidth:0}});return de(se,{children:[le(h,{component:"header",role:"banner","data-theme":R,"data-surface":W,className:"appbar appbar-desktop appbar-"+t+(C?" "+C:""),sx:{display:"flex",alignItems:"center",height:64,px:2,gap:2,backgroundColor:"var(--Background)",color:"var(--Text)",boxShadow:ri,fontFamily:"inherit",...T},children:w||de(se,{children:["hamburger"===D&&le(dp,{ariaLabel:"Open navigation menu",onClick:p||(()=>A(!0)),children:le(Rr,{sx:{fontSize:"inherit"}})}),le(h,void 0!==x?b?{component:"button",type:"button",onClick:b,sx:{background:"transparent",border:"none",padding:0,cursor:"pointer",color:"inherit",font:"inherit",fontWeight:700,fontSize:"18px",whiteSpace:"nowrap",flexShrink:0},children:x}:{sx:{fontWeight:700,fontSize:"18px",whiteSpace:"nowrap",flexShrink:0},children:x}:"logo"===n?{sx:{width:32,height:32,borderRadius:"6px",backgroundColor:"var(--Text)",opacity:.8,flexShrink:0},"aria-label":"Company logo"}:{sx:{fontWeight:700,fontSize:"18px",whiteSpace:"nowrap",flexShrink:0},children:s}),de(se,void 0!==v?{children:[le(h,{sx:{flex:1}}),le(h,{sx:{display:"flex",alignItems:"center",flexShrink:0},children:v}),le(h,{sx:{flex:1}})]}:{children:["left"===l&&P,"expanded"===D&&le(ao,{defaultValue:0,variant:"standard",color:"default",sx:{ml:2,minHeight:0},children:le(io,{"aria-label":"Main navigation",children:d.map(e=>le(oo,{children:e},e))})}),le(h,{sx:{flex:1}}),"right"===l&&P]}),void 0!==y?le(h,{sx:{display:"flex",alignItems:"center",gap:1},children:y}):de(se,{children:[u&&c.length>0&&le(h,{sx:{display:"flex",alignItems:"center",gap:.5},children:c.map((r,t)=>r.raw?le(e.Fragment,{children:r.icon},t):le(dp,{ariaLabel:r.label||"Action "+(t+1),children:r.icon},t))}),m?le(wi,{variant:"ghost",size:"small",onClick:g,"aria-label":"Sign out",startIcon:m.photoURL?le(h,{component:"img",src:m.photoURL,alt:"",sx:{width:24,height:24,borderRadius:"50%"}}):le(it,{sx:{fontSize:24}}),children:m.displayName?.split(" ")[0]||"Account"}):f?le(wi,{variant:"default-outline",size:"small",onClick:f,children:"Login"}):"avatar"===i?le(wi,{iconOnly:!0,variant:"ghost",size:"medium","aria-label":"Account",children:le(it,{sx:{fontSize:28}})}):null]})]})}),le(Wu,{open:z,onClose:()=>A(!1),anchor:"left",size:"small",children:le(h,{component:"nav","aria-label":"Main navigation",sx:{display:"flex",flexDirection:"column",gap:.5,py:1},children:d.map(e=>le(wi,{variant:"ghost",size:"medium",onClick:()=>A(!1),sx:{justifyContent:"flex-start",width:"100%"},children:e},e))})})]})}function up({mobileVariant:e="search",barColor:t="default",surface:a="Surface",title:i="Page Title",subtitle:o="Subtitle text",actionIcon:n,companyName:l="Company",navLinks:s=["Home","Products","About"],className:d="",sx:c={}}){const[u,p]=r(!1),m=sp[t]||sp.default,f=m.theme,g=m.surface||a,x={backgroundColor:"var(--Background)",color:"var(--Text)",boxShadow:ri,fontFamily:"inherit",width:"100%",maxWidth:420,...c},b={"data-theme":f,"data-surface":g},v=le(Wu,{open:u,onClose:()=>p(!1),anchor:"left",size:"small",children:le(h,{component:"nav","aria-label":"Main navigation",sx:{display:"flex",flexDirection:"column",gap:.5,py:1},children:s.map(e=>le(wi,{variant:"ghost",size:"medium",onClick:()=>p(!1),sx:{justifyContent:"flex-start",width:"100%"},children:e},e))})});return"search"===e?de(se,{children:[de(h,{component:"header",role:"banner",className:"appbar appbar-mobile appbar-mobile-search appbar-"+t+" "+d,...b,sx:{...x,display:"flex",alignItems:"center",height:64,px:1.5,gap:1.5},children:[le(dp,{ariaLabel:"Open navigation menu",onClick:()=>p(!0),children:le(Rr,{sx:{fontSize:"inherit"}})}),le(ws,{placeholder:"Search "+l,size:"small",sx:{flex:1,minWidth:0}}),le(wi,{iconOnly:!0,variant:"ghost",size:"medium","aria-label":"Account",children:le(it,{sx:{fontSize:28}})})]}),v]}):de(h,"small"===e?{component:"header",role:"banner",className:"appbar appbar-mobile appbar-mobile-small appbar-"+t+" "+d,...b,sx:{...x,display:"flex",alignItems:"center",height:64,px:1.5,gap:1},children:[le(dp,{ariaLabel:"Back",children:le(at,{sx:{fontSize:"inherit"}})}),de(h,{sx:{flex:1,minWidth:0},children:[le(h,{sx:{fontWeight:600,fontSize:"16px",lineHeight:1.3,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i}),o&&le(h,{sx:{fontSize:"12px",opacity:.7,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o})]}),n&&le(dp,{ariaLabel:"Action",children:n})]}:"medium"===e?{component:"header",role:"banner",className:"appbar appbar-mobile appbar-mobile-medium appbar-"+t+" "+d,...b,sx:{...x,px:1.5,pb:2},children:[de(h,{sx:{display:"flex",alignItems:"center",height:56,gap:1},children:[le(dp,{ariaLabel:"Back",children:le(at,{sx:{fontSize:"inherit"}})}),le(h,{sx:{flex:1}}),n&&le(dp,{ariaLabel:"Action",children:n})]}),de(h,{sx:{px:1.5},children:[le(h,{sx:{fontWeight:600,fontSize:"24px",lineHeight:1.2},children:i}),o&&le(h,{sx:{fontSize:"14px",opacity:.7,mt:.5},children:o})]})]}:{component:"header",role:"banner",className:"appbar appbar-mobile appbar-mobile-large appbar-"+t+" "+d,...b,sx:{...x,px:1.5,pb:3},children:[de(h,{sx:{display:"flex",alignItems:"center",height:56,gap:1},children:[le(dp,{ariaLabel:"Back",children:le(at,{sx:{fontSize:"inherit"}})}),le(h,{sx:{flex:1}}),n&&le(dp,{ariaLabel:"Action",children:n})]}),de(h,{sx:{px:1.5,mt:1},children:[le(h,{sx:{fontWeight:600,fontSize:"36px",lineHeight:1.1},children:i}),o&&le(h,{sx:{fontSize:"14px",opacity:.7,mt:.5},children:o})]})]})}function hp({mode:e="desktop",...r}){return le("mobile"===e?up:cp,{...r})}const pp=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",mp=["default","primary","primary-light","white","black"],fp=["Surface","Surface-Bright","Surface-Dim","Surface-Dimmest"],gp={default:{theme:"App-Bar"},primary:{theme:"Primary"},"primary-light":{theme:"Primary",surface:"Surface-Brightest"},white:{theme:"Neutral",surface:"Surface-Brightest"},black:{theme:"Neutral",surface:"Surface-Dimmest"}};function xp({ratio:e,threshold:r}){if(!e)return le(ga,{style:{color:"var(--Text-Quiet)"},children:"--"});const t=parseFloat(e)>=r;return de(h,{sx:{display:"inline-flex",alignItems:"center",gap:.5},children:[de(h,{sx:{px:1,py:.25,borderRadius:"4px",fontSize:"11px",fontWeight:700,backgroundColor:t?"var(--Tags-Success-BG)":"var(--Tags-Error-BG)",color:t?"var(--Tags-Success-Text)":"var(--Tags-Error-Text)"},children:[e,":1"]}),le(ga,{style:{color:t?"var(--Tags-Success-Text)":"var(--Tags-Error-Text)"},children:t?"Pass":"Fail"})]})}function bp({label:e,ratio:r,threshold:t,note:a}){return de(h,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(h,{sx:{flex:1},children:[le(oa,{style:{color:"var(--Text)"},children:e}),a&&le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:a})]}),le(xp,{ratio:r,threshold:t})]})}function vp({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function yp({color:e,selected:r,onClick:t}){const a=gp[e]||gp.default;return le(h,{component:"button","data-theme":a.theme,"data-surface":a.surface||"Surface",onClick:()=>t(e),"aria-label":"Select "+e,"aria-pressed":r,title:e,sx:{width:"var(--Button-Height, 36px)",height:"var(--Button-Height, 36px)",borderRadius:"4px",backgroundColor:"var(--Background)",border:r?"2px solid var(--Text)":"2px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&le(ue,{sx:{fontSize:16,color:"var(--Text)",pointerEvents:"none"}})})}function Sp(){const[e,t]=r("desktop"),[a,i]=r("default"),[n,l]=r("Surface"),[s,d]=r("login"),[c,u]=r("hamburger"),[p,m]=r("name"),[f,g]=r("right"),[x,b]=r("search"),[v,y]=r(null),[S,B]=r("Surface"),[w,T]=r({}),z="desktop"===e,A=gp[a]||gp.default,I=A.theme,R=A.surface||n;return o(()=>{const e={};e.text=Uo("--Text"),e.textQuiet=Uo("--Text-Quiet"),e.background=Uo("--Background"),e.border=Uo("--Border"),e.focusVisible=Uo("--Focus-Visible"),e.hover=Uo("--Hover"),e.active=Uo("--Pressed"),T(e)},[a,n,e]),de(h,{sx:{pb:8},children:[le(qt,{children:"App Bar"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{theme:v,children:le(h,{sx:{width:"100%",maxWidth:z?"100%":420,overflow:"hidden"},children:z?le(cp,{barColor:a,surface:n,loginType:s,menuType:c,brandType:p,searchPosition:f,companyName:"My App",navLinks:["Home","Products","About"]}):le(up,{barColor:a,surface:n,mobileVariant:x,companyName:"My App",title:"Page Title",subtitle:"Subtitle text"})})}),le(No,{code:(()=>{if(z){const e=[];"default"!==a&&e.push('barColor="'+a+'"'),"Surface"!==n&&e.push('surface="'+n+'"'),"login"!==s&&e.push('loginType="'+s+'"'),"hamburger"!==c&&e.push('menuType="'+c+'"'),"name"!==p&&e.push('brandType="'+p+'"'),"right"!==f&&e.push('searchPosition="'+f+'"');const r=e.length?"\n "+e.join("\n ")+"\n":"";return'<AppBar mode="desktop"'+(r||" ")+'companyName="My App" />'}{const e=['mode="mobile"','mobileVariant="'+x+'"'];return"default"!==a&&e.push('barColor="'+a+'"'),"Surface"!==n&&e.push('surface="'+n+'"'),"<AppBar\n "+e.join("\n ")+'\n title="Page Title"\n/>'}})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[le(h,{sx:{mb:3},children:le(ho,{theme:v,onThemeChange:y,surface:S,onSurfaceChange:B})}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"MODE"}),le(k,{direction:"row",spacing:1,children:["desktop","mobile"].map(r=>le(vp,{label:pp(r),selected:e===r,onClick:()=>t(r)},r))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"BAR COLOR"}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:mp.map(e=>le(yp,{color:e,selected:a===e,onClick:i},e))}),de(ga,{style:{color:"var(--Text-Quiet)",marginTop:6,display:"block"},children:['data-theme="',I,'"']})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SURFACE"}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:fp.map(e=>le(vp,{label:e.replace("Surface-","").replace("Surface","Default"),selected:n===e,onClick:()=>l(e)},e))}),de(ga,{style:{color:"var(--Text-Quiet)",marginTop:6,display:"block"},children:['data-surface="',n,'"']})]}),z&&de(se,{children:[de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"MENU TYPE"}),le(k,{direction:"row",spacing:1,children:["hamburger","expanded"].map(e=>le(vp,{label:pp(e),selected:c===e,onClick:()=>u(e)},e))}),le(ga,{style:{color:"var(--Text-Quiet)",marginTop:4,display:"block"},children:"Expanded auto-falls back to hamburger when nav > 3 links"})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"BRAND"}),le(k,{direction:"row",spacing:1,children:["name","logo"].map(e=>le(vp,{label:pp(e),selected:p===e,onClick:()=>m(e)},e))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SEARCH POSITION"}),le(k,{direction:"row",spacing:1,children:["left","right"].map(e=>le(vp,{label:pp(e),selected:f===e,onClick:()=>g(e)},e))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"LOGIN TYPE"}),le(k,{direction:"row",spacing:1,children:["login","avatar"].map(e=>le(vp,{label:pp(e),selected:s===e,onClick:()=>d(e)},e))})]})]}),!z&&de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"MOBILE VARIANT"}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:["search","small","medium","large"].map(e=>le(vp,{label:pp(e),selected:x===e,onClick:()=>b(e)},e))})]})]})}),le(no,{value:1,children:de(h,{sx:{p:3},children:[de(oa,{color:"quiet",style:{marginBottom:24},children:[e," / ",a," / ",n,z?"":" / "+x,' — data-theme="',I,'" data-surface="',R,'"']}),de(k,{spacing:3,children:[de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"Text Contrast (WCAG 1.4.3 — 4.5:1)"}),le(oa,{color:"quiet",style:{marginBottom:16},children:"All text and icons must have 4.5:1 contrast against the AppBar background."}),le(bp,{label:"Resting: var(--Text) vs. var(--Background)",ratio:Go(w.text,w.background),threshold:4.5,note:'data-theme="'+I+'" data-surface="'+R+'"'}),le(bp,{label:"On hover: var(--Text) vs. var(--Hover)",ratio:Go(w.text,w.hover),threshold:4.5,note:"Icon buttons use var(--Hover) on hover"}),le(bp,{label:"On active: var(--Text) vs. var(--Pressed)",ratio:Go(w.text,w.active),threshold:4.5,note:"Icon buttons use var(--Pressed) on press"})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"Focus Indicator (WCAG 2.4.11 — 3:1)"}),le(bp,{label:"var(--Focus-Visible) vs. var(--Background)",ratio:Go(w.focusVisible,w.background),threshold:3,note:"outline: 3px solid var(--Focus-Visible); outline-offset: 1px"})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"Touch Target Area (WCAG 2.5.5)"}),[{label:"Icon button",size:40,note:"width: 40px, height: 40px"},{label:"AppBar (desktop)",size:64,note:"height: 64px"},{label:"AppBar (mobile)",size:64,note:"height: 64px"}].map(({label:e,size:r,note:t})=>{const a=r>=24,i=r>=44,o=r>=48;return de(h,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(h,{sx:{flex:1},children:[de(oa,{style:{color:"var(--Text)"},children:[e," — ",r,"px"]}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:t})]}),de(h,{sx:{display:"flex",gap:.5,flexWrap:"wrap",justifyContent:"flex-end"},children:[de(h,{sx:{px:1,py:.25,borderRadius:"4px",fontSize:"11px",fontWeight:700,backgroundColor:a?"var(--Tags-Success-BG)":"var(--Tags-Error-BG)",color:a?"var(--Tags-Success-Text)":"var(--Tags-Error-Text)"},children:["Desktop ",a?"Y":"N"]}),de(h,{sx:{px:1,py:.25,borderRadius:"4px",fontSize:"11px",fontWeight:700,backgroundColor:i?"var(--Tags-Success-BG)":"var(--Tags-Warning-BG)",color:i?"var(--Tags-Success-Text)":"var(--Tags-Warning-Text)"},children:["iOS ",i?"Y":"~"]}),de(h,{sx:{px:1,py:.25,borderRadius:"4px",fontSize:"11px",fontWeight:700,backgroundColor:o?"var(--Tags-Success-BG)":"var(--Tags-Warning-BG)",color:o?"var(--Tags-Success-Text)":"var(--Tags-Warning-Text)"},children:["Android ",o?"Y":"~"]})]})]},e)})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),de(k,{spacing:0,children:[de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Landmark:"}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:'<header role="banner">'})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Navigation (expanded menu):"}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:'<nav aria-label="Main navigation">'})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Theme + Surface:"}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:'data-theme="'+I+'" data-surface="'+R+'"'})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Shadow:"}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:"box-shadow: var(--Effect-Level-1)"})]}),de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[le(oa,{children:"Icon buttons:"}),le(ga,{style:{color:"var(--Text-Quiet)"},children:"All icon buttons have aria-label. Focus visible on keyboard navigation."})]}),de(h,{sx:{py:1.5},children:[le(oa,{children:"Keyboard:"}),le(ga,{style:{color:"var(--Text-Quiet)"},children:"Tab navigates all interactive elements. Enter/Space activates buttons."})]})]})]})]})]})})]})})})]})]})}const kp={default:{bg:"var(--Primary-Color-1)",fg:"var(--Primary-Color-12)"},primary:{theme:"Primary",surface:"Surface-Dim"},"primary-dark":{bg:"var(--Primary-Color-1)",fg:"var(--Primary-Color-12)"},white:{bg:"var(--Neutral-Color-11)",fg:"var(--Neutral-Color-3)"},black:{bg:"var(--Neutral-Color-1)",fg:"var(--Neutral-Color-12)"}};function Bp({color:e="default",companyName:r="",year:t=(new Date).getFullYear(),rights:a="All rights reserved",children:i,className:o,style:n,...l}){const s=i??`© ${t}${r?" "+r:""}.${a?" "+a+".":""}`,d=kp[e]||kp.default,c=d.theme?{"data-theme":d.theme,"data-surface":d.surface||"Surface-Dim"}:{},u=d.theme?{background:"var(--Background)",color:"var(--Text)"}:{background:d.bg,color:d.fg};return le("div",{...c,className:["dino-copyright",o].filter(Boolean).join(" "),style:{padding:"14px 24px",textAlign:"center",...u,...n},...l,children:le(oa,{style:{color:"inherit",opacity:.85},children:s})})}const wp={default:{bg:"var(--Primary-Color-2)",fg:"var(--Primary-Color-12)"},primary:{theme:"Primary",surface:"Surface"},"primary-dark":{theme:"Primary",surface:"Surface-Dimmest"},white:{bg:"var(--Neutral-Color-12)",fg:"var(--Neutral-Color-2)"},black:{bg:"var(--Neutral-Color-1)",fg:"var(--Neutral-Color-12)"}};function Cp({color:e="default",brand:r,address:t,columns:a=[],socialLinks:i=[],subscribe:o,copyrightName:n,copyrightYear:l,className:s,style:d,...c}){const u=a.slice(0,3),h=wp[e]||wp.default,p=h.theme?{"data-theme":h.theme,"data-surface":h.surface||"Surface"}:{},m=h.theme?{background:"var(--Background)",color:"var(--Text)"}:{background:h.bg,color:h.fg};return de("footer",{...p,className:["dino-footer",s].filter(Boolean).join(" "),style:{...m,...d},...c,children:[de("div",{style:{maxWidth:1200,margin:"0 auto",padding:"40px 24px 56px"},children:[r&&le("div",{style:{marginBottom:36},children:r}),de("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(280px, 1fr))",gap:40},children:[le(Tp,{address:t}),u.map((e,r)=>le(zp,{...e},r))]}),(i.length>0||o)&&de("div",{style:{marginTop:48,paddingTop:32,borderTop:"1px solid rgba(255, 255, 255, 0.10)",display:"flex",flexWrap:"wrap",gap:32,alignItems:"flex-start",justifyContent:"space-between"},children:[i.length>0&&le(Ap,{links:i}),o&&le(Ip,{...o})]})]}),le(Bp,{color:e,companyName:n,year:l})]})}function Tp({address:e}){if(!e)return le("div",{});const{company:r,lines:t=[],email:a,phone:i}=e,o=[...r?[r]:[],...t,...i?[i]:[]];return de("div",{children:[o.map((e,r)=>le(oa,{style:{color:"inherit",opacity:.85,display:"block"},children:e},r)),a&&le("div",{style:{marginTop:12},children:le(oa,{style:{color:"inherit",opacity:.85,display:"block"},children:le(Os,{href:"mailto:"+a,color:"standard",style:{color:"inherit"},children:a})})})]})}function zp({title:e,links:r=[]}){return de("div",{children:[e&&le(Zt,{style:{color:"inherit",marginBottom:12},children:e}),le("ul",{style:{listStyle:"none",margin:0,padding:0},children:r.map((e,r)=>le("li",{style:{marginBottom:8},children:le(Os,{href:e.href,onClick:e.onClick,color:"standard",style:{color:"inherit",opacity:.85},children:e.label})},r))})]})}function Ap({links:e}){return le("div",{style:{display:"flex",gap:16,alignItems:"center"},children:e.map((e,r)=>le("a",{href:e.url,target:"_blank",rel:"noopener noreferrer","aria-label":e.label||"Social link",style:{color:"inherit",opacity:.85,display:"inline-flex",alignItems:"center",justifyContent:"center",width:36,height:36,borderRadius:"50%",border:"1px solid rgba(255, 255, 255, 0.18)",textDecoration:"none",transition:"opacity 150ms ease, border-color 150ms ease"},onMouseEnter:e=>{e.currentTarget.style.opacity="1"},onMouseLeave:e=>{e.currentTarget.style.opacity="0.85"},children:e.icon},r))})}function Ip({title:e="Stay in the loop",description:t,placeholder:a="your@email.com",buttonLabel:i="Subscribe",onSubscribe:o}){const[n,l]=r(""),[s,d]=r(!1);return de("form",{onSubmit:async e=>{if(e&&e.preventDefault(),n&&!s){d(!0);try{await(o?.(n)),l("")}finally{d(!1)}}},style:{minWidth:260,maxWidth:360,flex:"1 1 260px"},children:[le(Zt,{style:{color:"inherit",marginBottom:6},children:e}),t&&le(oa,{style:{color:"inherit",opacity:.85,marginBottom:12,display:"block"},children:t}),de("div",{style:{display:"flex",gap:8},children:[le(Ml,{type:"email",value:n,onChange:e=>l(e.target.value),placeholder:a,size:"small",fullWidth:!0,"aria-label":"Email address"}),le(wi,{type:"submit",variant:"primary",size:"small",disabled:s||!n,children:i})]})]})}function Rp(e){const r=e.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);return r?[Number(r[1]),Number(r[2]),Number(r[3])]:null}function Wp(e){return e?"#"+e.map(e=>e.toString(16).padStart(2,"0")).join(""):"—"}function Dp([e,r,t]){const a=[e,r,t].map(e=>(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4));return.2126*a[0]+.7152*a[1]+.0722*a[2]}function Pp({targetRef:e,label:t,deps:a=[]}){const[i,n]=r(null),[l,s]=r(null);o(()=>{if(!e.current)return;const r=requestAnimationFrame(()=>{if(!e.current)return;const r=getComputedStyle(e.current);n(Rp(r.backgroundColor)),s(Rp(r.color))});return()=>cancelAnimationFrame(r)},a);const d=function(e,r){if(!e||!r)return null;const t=Dp(e),a=Dp(r);return(Math.max(t,a)+.05)/(Math.min(t,a)+.05)}(i,l),c=null!==d&&d>=4.5,u=null===d?"—":null!==d&&d>=7?"AAA":c?"AA":"Fail",h=null===d?"var(--Text-Quiet)":c?"var(--Text-Success)":"var(--Text-Error)";return de("div",{style:{display:"flex",alignItems:"center",gap:16,padding:"12px 16px",borderRadius:8,background:"var(--Container)",border:"1px solid var(--Border)"},children:[de("div",{style:{flex:1,minWidth:0},children:[le(oa,{style:{fontWeight:600},children:t}),de(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Background ",Wp(i)," · Text ",Wp(l)]})]}),de("div",{style:{display:"flex",alignItems:"center",gap:6,borderRadius:999,padding:"4px 10px",background:"var(--Background)",border:"1px solid var(--Border)"},children:[le("span",{style:{fontWeight:700,fontSize:12,color:h},children:u}),le(ga,{style:{color:"var(--Text-Quiet)"},children:null!==d?d.toFixed(2)+":1":"—"})]})]})}const Fp={company:"DinoDesign",lines:["123 Market Street","San Francisco, CA 94103"],email:"hello@dinodesign.dev",phone:"+1 (555) 010-0000"},Lp=[{title:"Product",links:[{label:"Features",href:"#"},{label:"Pricing",href:"#"},{label:"Add-ons",href:"#"}]},{title:"Company",links:[{label:"About",href:"#"},{label:"Careers",href:"#"},{label:"Contact",href:"#"}]},{title:"Resources",links:[{label:"Docs",href:"#"},{label:"Changelog",href:"#"},{label:"Status",href:"#"}]}],Hp=[{icon:le(ot,{fontSize:"small"}),url:"https://twitter.com",label:"Twitter"},{icon:le(nt,{fontSize:"small"}),url:"https://github.com",label:"GitHub"},{icon:le(lt,{fontSize:"small"}),url:"https://linkedin.com",label:"LinkedIn"}],Mp=[{value:"default",label:"Default"},{value:"primary",label:"Primary"},{value:"primary-dark",label:"Primary Dark"},{value:"white",label:"White"},{value:"black",label:"Black"}];function Ep({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Op(){const[e,t]=r(4),[i,n]=r(!0),[l,s]=r(!0),[d,c]=r("default"),u=a(null),[p,m]=r(null),[f,g]=r(null);o(()=>{u.current&&(m({current:u.current.querySelector(".dino-footer")}),g({current:u.current.querySelector(".dino-copyright")}))},[d,e,i,l]);const x=Lp.slice(0,Math.max(0,e-1)),b=i?Hp:[],v=l?{title:"Stay in the loop",description:"Monthly updates on new components and tips.",onSubscribe:async e=>console.log("subscribed:",e)}:void 0;return de(h,{children:[le(qt,{style:{marginBottom:12},children:"Footer"}),de(sa,{color:"quiet",style:{marginBottom:24,maxWidth:720},children:["Configurable 1–4 column footer. The first column is always the company address / contact. Optional ",le("code",{children:"socialLinks"})," and"," ",le("code",{children:"subscribe"})," sit above the auto-generated copyright strip."]}),le(h,{ref:u,sx:{borderRadius:1,overflow:"hidden",mb:4},children:le(Cp,{color:d,address:Fp,columns:x,socialLinks:b,subscribe:v,copyrightName:"DinoDesign"})}),de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(k,{spacing:3,sx:{p:3,maxWidth:560},children:[de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLUMNS"}),le(k,{direction:"row",spacing:1,children:[1,2,3,4].map(r=>le(Ep,{label:String(r),selected:e===r,onClick:()=>t(r)},r))}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:"First column is always the address / contact. Up to 3 more link columns."})]}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{direction:"row",spacing:1,sx:{flexWrap:"wrap",rowGap:1},children:Mp.map(e=>le(Ep,{label:e.label,selected:d===e.value,onClick:()=>c(e.value)},e.value))}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:'"Default" hardcodes Primary tone 2 (auto-derived in a future iteration).'})]}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SOCIAL LINKS"}),le(rn,{label:"Show social media row",checked:i,onChange:e=>n(e.target.checked)}),de(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:["When on, the Footer renders the ",le("code",{children:"socialLinks"})," row (icons linking out). In your app, supply the icon + url pairs from your data store."]})]}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SUBSCRIBE"}),le(rn,{label:"Show email subscribe form",checked:l,onChange:e=>s(e.target.checked)}),de(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:["When on, the Footer renders an email subscribe form. Hook it up via"," ",le("code",{children:"subscribe.onSubscribe(email)"}),"."]})]})]})}),le(no,{value:1,children:de(k,{spacing:2,sx:{p:3,maxWidth:560},children:[le(ga,{style:{color:"var(--Text-Quiet)"},children:"Live WCAG 2.1 contrast against the painted background. AA needs 4.5:1 for normal text; AAA needs 7:1."}),p&&le(Pp,{targetRef:p,label:"Footer body",deps:[d,e,i,l]}),f&&le(Pp,{targetRef:f,label:"Copyright strip",deps:[d,e,i,l]})]})})]})]})}const Np=[{value:"default",label:"Default"},{value:"primary",label:"Primary"},{value:"primary-dark",label:"Primary Dark"},{value:"white",label:"White"},{value:"black",label:"Black"}];function Qp({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Vp(){const[e,t]=r("DinoDesign"),[i,n]=r((new Date).getFullYear()),[l,s]=r("All rights reserved"),[d,c]=r(""),[u,p]=r(!1),[m,f]=r("default"),g=a(null),[x,b]=r(null);return o(()=>{g.current&&b({current:g.current.querySelector(".dino-copyright")})},[m,u,e,i,l,d]),de(h,{children:[le(qt,{style:{marginBottom:12},children:"Copyright"}),de(sa,{color:"quiet",style:{marginBottom:24,maxWidth:720},children:["Standalone copyright strip used at the bottom of pages. Defaults to"," ",de("code",{children:["© ","{year}"," ","{companyName}",". ","{rights}","."]})," Pass"," ",le("code",{children:"children"})," to override the entire text."]}),le(h,{ref:g,sx:{borderRadius:1,overflow:"hidden",mb:4},children:le(Bp,u?{color:m,children:d||"Type a custom message →"}:{color:m,companyName:e,year:Number(i)||(new Date).getFullYear(),rights:l})}),de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(k,{spacing:3,sx:{p:3,maxWidth:560},children:[de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"TEXT MODE"}),de(k,{direction:"row",spacing:1,children:[le(Qp,{label:"Auto-generated",selected:!u,onClick:()=>p(!1)}),le(Qp,{label:"Custom",selected:u,onClick:()=>p(!0)})]})]}),!u&&de(se,{children:[le(Xi,{label:"Company name",value:e,onChange:e=>t(e.target.value),placeholder:"DinoDesign",size:"medium"}),le(ml,{label:"Year",value:Number(i),onChange:e=>n(e),min:1900,max:2100}),le(Xi,{label:"Rights text",value:l,onChange:e=>s(e.target.value),placeholder:"All rights reserved",size:"medium"}),le(ga,{style:{color:"var(--Text-Quiet)"},children:'Leave Rights blank to omit "All rights reserved." entirely.'})]}),u&&de(se,{children:[le(Xi,{label:"Custom text",value:d,onChange:e=>c(e.target.value),placeholder:"© 2026 DinoDesign · MIT License · Built with love",size:"medium",multiline:!0}),le(ga,{style:{color:"var(--Text-Quiet)"},children:"Pass any string (or React node) as children to fully override the auto text."})]}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{direction:"row",spacing:1,sx:{flexWrap:"wrap",rowGap:1},children:Np.map(e=>le(Qp,{label:e.label,selected:m===e.value,onClick:()=>f(e.value)},e.value))}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:"Matches the Footer color presets so the two stack cleanly."})]})]})}),le(no,{value:1,children:de(k,{spacing:2,sx:{p:3,maxWidth:560},children:[le(ga,{style:{color:"var(--Text-Quiet)"},children:"Live WCAG 2.1 contrast against the painted background. AA needs 4.5:1 for normal text; AAA needs 7:1."}),x&&le(Pp,{targetRef:x,label:"Copyright strip",deps:[m,u,e,i,l,d]})]})})]})]})}const jp=["Default","Primary","Secondary","Tertiary","Neutral"],Gp={Classic:{name:"Classic",description:"Raised + soft shadow",angle:135,bevel:!0,depth:5,softness:1,shadow:!0,shadowDistance:6,shadowBlur:8,shadowOpacity:.6},Carved:{name:"Carved",description:"Deep inset, no shadow",angle:135,bevel:!0,depth:10,softness:2,shadow:!1,shadowDistance:4,shadowBlur:4,shadowOpacity:.4},Embossed:{name:"Embossed",description:"Inset + heavy shadow",angle:135,bevel:!0,depth:7,softness:1.5,shadow:!0,shadowDistance:10,shadowBlur:14,shadowOpacity:.7},Stamp:{name:"Stamp",description:"Reversed light + shadow",angle:315,bevel:!0,depth:6,softness:1,shadow:!0,shadowDistance:5,shadowBlur:6,shadowOpacity:.8},"Night Cut":{name:"Night Cut",description:"Inset on dark background",angle:135,bevel:!0,depth:8,softness:2,shadow:!1,shadowDistance:6,shadowBlur:8,shadowOpacity:.6},"Shadow Only":{name:"Shadow Only",description:"Flat fill + drop shadow",angle:135,bevel:!1,depth:4,softness:1,shadow:!0,shadowDistance:8,shadowBlur:12,shadowOpacity:.5}},Up=Object.keys(Gp);function Xp(e,r){if("custom"===e)return{...Gp.Classic,name:"Custom",description:"Custom",...r||{}};const t=Gp[e];return t?{...t}:{...Gp.Classic}}function Yp(e,r){const t=e||"Primary";return"base"===r?"var(--Buttons-"+t+"-Button)":"highlight"===r?"rgb(var(--Buttons-"+t+"-Highlight))":"lowlight"===r?"rgb(var(--Buttons-"+t+"-Lowlight))":void 0}function qp(e){const r=e||"Primary";return"Default"===r?"var(--Text)":"var(--Text-"+r+")"}function Zp(e,r){const t=(e-90)*Math.PI/180;return{dx:Math.cos(t)*r,dy:Math.sin(t)*r}}const Jp={"display-large":{fontFamily:"var(--Header-Font-Family)",fontSize:"var(--Display-Large-Font-Size)",fontWeight:"var(--Display-Large-Font-Weight)",letterSpacing:"var(--Display-Large-Letter-Spacing)",pxHint:64},"display-small":{fontFamily:"var(--Header-Font-Family)",fontSize:"var(--Display-Small-Font-Size)",fontWeight:"var(--Display-Small-Font-Weight)",letterSpacing:"var(--Display-Small-Letter-Spacing)",pxHint:48}};function Kp({text:r="Your Brand. Perfected.",curves:t,arc:a=160,radius:i=300,direction:o="up",rotation:n=0,autoCrop:l=!0,textStyle:s="display-large",fontSize:d,fontFamily:c,fontWeight:u,letterSpacing:h,color:p="var(--Text, #1a1a1a)",bevel:m=!1,bevelTheme:f="Primary",bevelPreset:g,bevelCustom:x,className:b,style:v,...y}){const S=g?Xp(g,x):null,k=S?!!S.bevel:!!m,B=Jp[s]||Jp["display-large"],w=c??B.fontFamily,C=d??B.fontSize,T=u??B.fontWeight,z=h??B.letterSpacing,A="number"==typeof d?d:B.pxHint,I=t&&t.length>0?t:[{arc:a,radius:i,direction:o}],{d:R,width:W,upMax:D,downMax:P,pathId:F}=function(r){return e.useMemo(()=>{const e="dino-curved-text-"+Math.random().toString(36).slice(2,9);let t=0;const a=0;let i="M "+t+" "+a,o=0,n=0;for(const{arc:e,radius:l,direction:s}of r){const r=$p(e,1,359),d=Math.max(10,l),c=r*Math.PI/180,u=2*d*Math.sin(c/2),h=d*(1-Math.cos(c/2));t+=u,i+=" A "+d+" "+d+" 0 "+(r>180?1:0)+" "+("up"===s?1:0)+" "+t+" "+a,"up"===s?o=Math.max(o,h):n=Math.max(n,h)}return{d:i,width:t,upMax:o,downMax:n,pathId:e}},[JSON.stringify(r)])}(I),L=Math.ceil(D+A),H=Math.ceil(P+A),M=Math.ceil(A),E=Math.ceil(W+2*M),O=L+H,N=M,Q=L,V=n?"rotate("+n+" "+E/2+" "+O/2+")":void 0,j=e.useRef(null),[G,U]=e.useState(null),[X,Y]=e.useState(A);e.useEffect(()=>{if(!j.current||"undefined"==typeof ResizeObserver)return;const e=j.current,r=()=>{const r=e.getBoundingClientRect(),t=G?G.width:E;if(!t||!r.width)return;const a=r.width/t;Y(A*a)};r();const t=new ResizeObserver(r);return t.observe(e),()=>t.disconnect()},[E,A,G]);const q=k&&X>=19;e.useLayoutEffect(()=>{if(!l)return void U(null);const e=j.current;if(!e)return;const r=e.querySelector("text");if(!r)return;let t;try{t=r.getBBox()}catch(e){return}if(!t||!t.width||!t.height)return;const a=E/2,i=O/2,o=n*Math.PI/180,s=Math.cos(o),d=Math.sin(o),c=(e,r)=>{const t=e-a,o=r-i;return{x:a+t*s-o*d,y:i+t*d+o*s}},u=[c(t.x,t.y),c(t.x+t.width,t.y),c(t.x,t.y+t.height),c(t.x+t.width,t.y+t.height)],h=Math.min(...u.map(e=>e.x)),p=Math.max(...u.map(e=>e.x)),m=Math.min(...u.map(e=>e.y)),f=Math.max(...u.map(e=>e.y)),g=.12*A,x={x:h-g,y:m-g,width:p-h+2*g,height:f-m+2*g};U(e=>e&&Math.abs(e.x-x.x)<.5&&Math.abs(e.y-x.y)<.5&&Math.abs(e.width-x.width)<.5&&Math.abs(e.height-x.height)<.5?e:x)},[l,r,JSON.stringify(I),n,A,z,w,T,k,f,g,JSON.stringify(x)]);const Z=G?G.x+" "+G.y+" "+G.width+" "+G.height:"0 0 "+E+" "+O,J=G?G.width:E,K=G?G.height:O;return de("svg",{ref:j,viewBox:Z,width:J,height:K,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",style:{display:"block",maxWidth:"100%",height:"auto",overflow:"visible",...v},"aria-label":r,role:"img",className:["dino-curved-text",b].filter(Boolean).join(" "),...y,children:[le("defs",{children:le("path",{id:F,d:R,transform:"translate("+N+" "+Q+")"})}),de("g",{transform:V,children:[q&&(()=>{const e=S?S.depth/96:.045,t=Math.max(2,Math.round(A*e)),a=Math.max(1,Math.round(A*e*.67)),i={fontFamily:w,fontSize:"number"==typeof C?C+"px":C,fontWeight:T,letterSpacing:"number"==typeof z?z+"px":z};return de(se,{children:[le("text",{className:"dino-bevel-layer dino-bevel-layer--lowlight",fill:"rgb(var(--Buttons-"+f+"-Lowlight))",transform:"translate(0 "+t+")",style:i,children:le("textPath",{href:"#"+F,startOffset:"50%",textAnchor:"middle",children:r})}),le("text",{className:"dino-bevel-layer dino-bevel-layer--highlight",fill:"rgb(var(--Buttons-"+f+"-Highlight))",transform:"translate(0 -"+a+")",style:i,children:le("textPath",{href:"#"+F,startOffset:"50%",textAnchor:"middle",children:r})})]})})(),le("text",{className:"dino-curved-text__base",fill:q?"var(--Buttons-"+f+"-Button)":k?qp(f):p,style:{fontFamily:w,fontSize:"number"==typeof C?C+"px":C,fontWeight:T,letterSpacing:"number"==typeof z?z+"px":z},children:le("textPath",{href:"#"+F,startOffset:"50%",textAnchor:"middle",children:r})})]})]})}function $p(e,r,t){return Math.max(r,Math.min(t,e))}const _p=[{value:"display-large",label:"Display Large"},{value:"display-small",label:"Display Small"}],em=[{value:"text",label:"Text",css:"var(--Text)"},{value:"primary",label:"Primary",css:"var(--Text-Primary)"},{value:"secondary",label:"Secondary",css:"var(--Text-Secondary)"},{value:"tertiary",label:"Tertiary",css:"var(--Text-Tertiary)"}],rm=jp.map(e=>({value:e,label:e}));function tm({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function am(){const[e,t]=r("Your Brand. Perfected."),[i,n]=r("display-large"),[l,s]=r("primary"),[d,c]=r([(u="up",{arc:140,radius:340,direction:u})]);var u;const[p,m]=r(0),[f,g]=r(8),[x,b]=r(700),[v,y]=r(!1),[S,B]=r("Primary"),[w,C]=r("Classic"),T=a(null),[z,A]=r(null);o(()=>{T.current&&A({current:T.current.querySelector("text")})},[l,i,d,p,f,x,v,S,w]);const I=em.find(e=>e.value===l)?.css||em[0].css;function R(e,r){c(t=>t.map((t,a)=>a===e?{...t,...r}:t))}return de(h,{children:[le(qt,{style:{marginBottom:12},children:"Curved Display Text"}),le(sa,{color:"quiet",style:{marginBottom:24,maxWidth:720},children:"Decorative text laid along an SVG arc. Chain multiple arcs to build a wave — each curve gets its own radius, arc sweep, and direction. Uses your design system's decorative font + text tokens."}),de(h,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(360px, 1fr))",gap:3,alignItems:"start"},children:[le(h,{sx:{minWidth:0},children:le(h,{ref:T,"data-surface":"Container",sx:{background:"var(--Background)",borderRadius:2,p:3,display:"flex",alignItems:"center",justifyContent:"center",overflow:"auto",position:"sticky",top:16},children:le(Kp,{text:e,curves:d,textStyle:i,rotation:p,letterSpacing:f,fontWeight:x,bevel:v,bevelTheme:S,bevelPreset:v?w:void 0,color:I})})}),le(h,{sx:{minWidth:0,alignSelf:"flex-start"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(k,{spacing:3,sx:{p:3,maxWidth:720},children:[le(Xi,{label:"Text",value:e,onChange:e=>t(e.target.value),placeholder:"Your headline…",size:"medium"}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"CURVES"}),le(k,{direction:"row",spacing:1,children:[1,2].map(e=>le(tm,{label:String(e),selected:d.length===e,onClick:()=>function(e){c(r=>{if(e===r.length)return r;if(e>r.length){const t=[...r];for(;t.length<e;){const e=t[t.length-1];t.push({arc:e.arc,radius:e.radius,direction:"up"===e.direction?"down":"up"})}return t}return r.slice(0,e)})}(e)},e))}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:"One curve is an arch. Two curves chain end-to-end for a wave."})]}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:12},children:"PER-CURVE SETTINGS"}),le(k,{spacing:2,children:d.map((e,r)=>de(h,{"data-surface":"Container",style:{background:"var(--Background)",border:"1px solid var(--Border)",borderRadius:8,padding:12},children:[de(k,{direction:"row",alignItems:"center",spacing:2,sx:{mb:1},children:[de(ga,{style:{fontWeight:700},children:["Curve ",r+1]}),le("div",{style:{flex:1}}),de(k,{direction:"row",spacing:1,children:[le(tm,{label:"⌢ Up",selected:"up"===e.direction,onClick:()=>R(r,{direction:"up"})}),le(tm,{label:"⌣ Down",selected:"down"===e.direction,onClick:()=>R(r,{direction:"down"})})]})]}),de(k,{spacing:1,children:[de("div",{children:[de(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Radius",de("span",{style:{float:"right"},children:[e.radius,"px"]})]}),le(xs,{min:100,max:600,step:10,value:e.radius,onChange:(e,t)=>R(r,{radius:t})})]}),de("div",{children:[de(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Arc sweep",de("span",{style:{float:"right"},children:[e.arc,"°"]})]}),le(xs,{min:40,max:280,step:5,value:e.arc,onChange:(e,t)=>R(r,{arc:t})})]})]})]},r))})]}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"TYPOGRAPHY"}),le(k,{direction:"row",spacing:1,sx:{flexWrap:"wrap",rowGap:1},children:_p.map(e=>le(tm,{label:e.label,selected:i===e.value,onClick:()=>n(e.value)},e.value))}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:"Uses the lib's DisplayLarge / DisplaySmall tokens (font-family, size, weight, letter-spacing)."})]}),de(h,{children:[de(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:["LETTER SPACING",de("span",{style:{float:"right"},children:[f,"px"]})]}),le(xs,{min:-4,max:40,step:1,value:f,onChange:(e,r)=>g(r)}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:"Adjusts the gap between characters along the wave."})]}),de(h,{children:[de(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:["FONT WEIGHT",le("span",{style:{float:"right"},children:x})]}),le(xs,{min:100,max:900,step:100,value:x,onChange:(e,r)=>b(r)}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:"Heavier weights read better at decorative sizes. Available weights depend on the loaded display font."})]}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"BEVEL"}),le(rn,{label:"3D bevel effect",checked:v,onChange:e=>y(e.target.checked)}),v&&de(h,{sx:{mt:1.5},children:[le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:6},children:"Preset"}),le(k,{direction:"row",spacing:1,sx:{flexWrap:"wrap",rowGap:1,mb:1.5},children:Up.map(e=>le(tm,{label:e,selected:w===e,onClick:()=>C(e)},e))}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:6},children:"Bevel theme"}),le(k,{direction:"row",spacing:1,sx:{flexWrap:"wrap",rowGap:1},children:rm.map(e=>le(tm,{label:e.label,selected:S===e.value,onClick:()=>B(e.value)},e.value))})]}),de(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:["Bevel layers use ",de("code",{children:["--Buttons-","{Theme}","-Button"]})," for the fill, with ",le("code",{children:"Highlight"})," + ",le("code",{children:"Lowlight"}),"tokens for the bright/shadow stripes. CurvedText honors a preset's ",le("em",{children:"depth"})," only — angle, softness, and drop-shadow fields are stacked-rendering limitations and are ignored here (the full filter pipeline lives in ",le("code",{children:"<BevelText>"}),"). Shadow-only presets render no effect. Auto-hides below 19px so the 3:1 bevel contrast doesn't compromise small-text legibility."]})]}),de(h,{children:[de(k,{direction:"row",alignItems:"center",sx:{mb:1},children:[de(wa,{style:{color:"var(--Text-Quiet)",flex:1},children:["ROTATION",de("span",{style:{float:"right",marginRight:12},children:[p,"°"]})]}),le(wi,{variant:"default-outline",size:"small",onClick:function(){const r=T.current?.querySelector("svg");if(!r)return;const t=r.querySelector("path"),a=r.querySelector("text");if(!t||!a)return;const i=t.getTotalLength();if(!i)return;let o=0;try{o=a.getComputedTextLength?.()||0}catch(e){}o||(o=Math.min(i,18*e.length));const n=Math.max(0,(i-o)/2),l=Math.min(i,n+o),s=t.getPointAtLength(n),d=t.getPointAtLength(l),c=180*Math.atan2(d.y-s.y,d.x-s.x)/Math.PI,u=Math.max(-45,Math.min(45,Math.round(-c)));m(u)},children:"Auto-level"})]}),le(xs,{min:-45,max:45,step:1,value:p,onChange:(e,r)=>m(r)}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:'Tilts the whole text block around its center. "Auto-level" rotates so the text\'s start and end sit on the same horizontal line — useful when a multi-curve wave makes the reading line slant.'})]}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{direction:"row",spacing:1,sx:{flexWrap:"wrap",rowGap:1},children:em.map(e=>le(tm,{label:e.label,selected:l===e.value,onClick:()=>s(e.value)},e.value))})]})]})}),le(no,{value:1,children:de(k,{spacing:2,sx:{p:3,maxWidth:560},children:[le(ga,{style:{color:"var(--Text-Quiet)"},children:"Live WCAG 2.1 contrast against the painted background. Decorative display text counts as large text — AA needs 3:1, AAA needs 4.5:1 — but DinoDesign defaults to 4.5:1 across the board."}),z&&le(Pp,{targetRef:z,label:"Curved text",deps:[l,i,JSON.stringify(d),p,f]}),de(oa,{color:"quiet",children:["The SVG sets ",le("code",{children:'role="img"'})," and"," ",le("code",{children:"aria-label"})," to the rendered text so screen readers announce it as a labeled image, not a stream of individual glyphs."]})]})})]})})})]})]})}const im={"display-large":{fontFamily:"var(--Header-Font-Family)",fontSize:"var(--Display-Large-Font-Size)",fontWeight:"var(--Display-Large-Font-Weight)",letterSpacing:"var(--Display-Large-Letter-Spacing)",pxHint:96},"display-small":{fontFamily:"var(--Header-Font-Family)",fontSize:"var(--Display-Small-Font-Size)",fontWeight:"var(--Display-Small-Font-Weight)",letterSpacing:"var(--Display-Small-Letter-Spacing)",pxHint:64}};function om({text:r="DinoDesign",theme:t="Primary",preset:a="Classic",custom:i,textStyle:o="display-large",fontSize:n,fontFamily:l,fontWeight:s,letterSpacing:d,className:c,style:u,...h}){const p=im[o]||im["display-large"],m=l??p.fontFamily,f=n??p.fontSize,g=s??p.fontWeight,x=d??p.letterSpacing,b="number"==typeof n?n:p.pxHint,v=Xp(a,i),y="dino-bevel-"+e.useId().replace(/:/g,""),S=y+"-s",k=e.useRef(null),[B,w]=e.useState(b),C=.6*b,T=Math.max(400,r.length*C+80),z=1.9*b,A=T/2,I=.7*z;e.useEffect(()=>{if(!k.current||"undefined"==typeof ResizeObserver)return;const e=k.current,r=()=>{const r=e.getBoundingClientRect();T&&r.width&&w(b*(r.width/T))};r();const t=new ResizeObserver(r);return t.observe(e),()=>t.disconnect()},[T,b]);const R=B>=19,W=v.bevel?Zp(v.angle+180,v.depth):{dx:0,dy:0},D=v.bevel?Zp(v.angle,v.depth):{dx:0,dy:0},P=v.shadow?Zp(v.angle,v.shadowDistance??6):{dx:0,dy:0},F=R?Yp(t,"base"):qp(t),L=Yp(t,"highlight"),H=Yp(t,"lowlight"),M={fontFamily:m,fontSize:"number"==typeof f?f+"px":f,fontWeight:g,letterSpacing:"number"==typeof x?x+"px":x},E=v.bevel&&R?"url(#"+y+")":void 0,O=v.shadow&&R?"url(#"+S+")":void 0;return de("svg",{ref:k,viewBox:"0 0 "+T+" "+z,width:T,height:z,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",style:{display:"block",maxWidth:"100%",height:"auto",overflow:"visible",...u},"aria-label":r,role:"img",className:["dino-bevel-text",c].filter(Boolean).join(" "),...h,children:[de("defs",{children:[v.shadow&&le("filter",{id:S,x:"-30%",y:"-30%",width:"160%",height:"160%",children:le("feDropShadow",{dx:P.dx.toFixed(2),dy:P.dy.toFixed(2),stdDeviation:v.shadowBlur??8,style:{floodColor:H,floodOpacity:v.shadowOpacity??.6}})}),v.bevel&&de("filter",{id:y,x:"-5%",y:"-5%",width:"110%",height:"110%",colorInterpolationFilters:"sRGB",children:[le("feGaussianBlur",{in:"SourceAlpha",stdDeviation:(v.softness??1)+.5,result:"blur-alpha"}),le("feOffset",{in:"blur-alpha",dx:D.dx.toFixed(2),dy:D.dy.toFixed(2),result:"shadow-offset"}),le("feFlood",{style:{floodColor:H,floodOpacity:.95},result:"shadow-flood"}),le("feComposite",{in:"shadow-flood",in2:"shadow-offset",operator:"in",result:"shadow-shaped"}),le("feComposite",{in:"shadow-shaped",in2:"SourceAlpha",operator:"in",result:"shadow-clipped"}),le("feOffset",{in:"blur-alpha",dx:W.dx.toFixed(2),dy:W.dy.toFixed(2),result:"hi-offset"}),le("feFlood",{style:{floodColor:L,floodOpacity:.95},result:"hi-flood"}),le("feComposite",{in:"hi-flood",in2:"hi-offset",operator:"in",result:"hi-shaped"}),le("feComposite",{in:"hi-shaped",in2:"SourceAlpha",operator:"in",result:"hi-clipped"}),de("feMerge",{children:[le("feMergeNode",{in:"SourceGraphic"}),le("feMergeNode",{in:"shadow-clipped"}),le("feMergeNode",{in:"hi-clipped"})]})]})]}),v.shadow&&R&&le("text",{className:"dino-bevel-layer dino-bevel-layer--shadow",x:A,y:I,textAnchor:"middle",fill:F,filter:O,style:M,"aria-hidden":"true",children:r}),le("text",{className:v.bevel?"dino-bevel-text__base dino-bevel-layer":"dino-bevel-text__base",x:A,y:I,textAnchor:"middle",fill:F,filter:E,style:M,children:r})]})}const nm=[...Up.map(e=>({value:e,label:e,description:Gp[e].description})),{value:"custom",label:"Custom",description:"Tune every knob"}],lm=[{value:"light",label:"Light",css:"var(--Surface)"},{value:"warm",label:"Warm",css:"var(--Surface-Dim)"},{value:"dark",label:"Dark",css:"var(--Container-High)"}];function sm({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function dm({option:e,active:r,onClick:t}){return de(h,{onClick:t,role:"button",tabIndex:0,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t())},sx:{flex:"1 1 140px",minWidth:130,cursor:"pointer",border:"1.5px solid",borderColor:r?"var(--Buttons-Primary-Border)":"var(--Border)",background:r?"rgb(var(--Buttons-Primary-Highlight) / 0.18)":"var(--Background)",borderRadius:"var(--Style-Border-Radius)",p:1.5,transition:"border-color 0.15s, background 0.15s",textAlign:"center","&:hover":{borderColor:"var(--Buttons-Primary-Border)"},"&:focus-visible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:2}},children:[le(ga,{style:{fontWeight:600,color:"var(--Text)"},children:e.label}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:2},children:e.description})]})}function cm(){const[e,t]=r("DinoDesign"),[a,i]=r("Primary"),[o,n]=r("Classic"),[l,s]=r("light"),[d,c]=r(135),[u,p]=r(5),[m,f]=r(1),[g,x]=r(!0),[b,v]=r(!0),[y,S]=r(6),[B,w]=r(8),[C,T]=r(60),[z,A]=r(96),[I,R]=r(900),[W,D]=r(0),P="custom"===o,F=P?{angle:d,depth:u,softness:m,bevel:g,shadow:b,shadowDistance:y,shadowBlur:B,shadowOpacity:C/100}:void 0;const L=lm.find(e=>e.value===l)?.css||lm[0].css;return de(h,{children:[le(qt,{style:{marginBottom:12},children:"Bevel Display Text"}),le(sa,{color:"quiet",style:{marginBottom:24,maxWidth:720},children:"Straight-line display text with an SVG inset-bevel and optional drop shadow. Colors are locked to the active button-palette tokens (Button / Highlight / Lowlight) so the same preset reads correctly under any theme."}),de(h,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(360px, 1fr))",gap:3,alignItems:"start"},children:[le(h,{sx:{minWidth:0},children:le(h,{"data-surface":"Container",sx:{background:L,borderRadius:2,p:4,display:"flex",alignItems:"center",justifyContent:"center",minHeight:240,overflow:"auto",position:"sticky",top:16,transition:"background 0.2s"},children:le(om,{text:e,theme:a,preset:o,custom:F,fontSize:z,fontWeight:I,letterSpacing:W})})}),le(h,{sx:{minWidth:0,alignSelf:"flex-start"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(k,{spacing:3,sx:{p:3,maxWidth:720},children:[le(Xi,{label:"Text",value:e,onChange:e=>t(e.target.value),placeholder:"Your headline…",size:"medium"}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"THEME"}),le(k,{direction:"row",spacing:1,sx:{flexWrap:"wrap",rowGap:1},children:jp.map(e=>le(sm,{label:e,selected:a===e,onClick:()=>i(e)},e))}),de(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:["Resolves to ",de("code",{children:["--Buttons-","{Theme}","-Button"]})," ","(fill), ",le("code",{children:"-Highlight"})," (light edge), and"," ",le("code",{children:"-Lowlight"})," (shadow edge)."]})]}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"PRESETS"}),le(h,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:nm.map(e=>le(dm,{option:e,active:o===e.value,onClick:()=>function(e){if(n(e),"custom"!==e){const r=Xp(e);c(r.angle),p(r.depth??5),f(r.softness??1),x(r.bevel),v(r.shadow),S(r.shadowDistance??6),w(r.shadowBlur??8),T(Math.round(100*(r.shadowOpacity??.6)))}}(e.value)},e.value))})]}),P&&de(h,{sx:{border:"1px solid var(--Border)",borderRadius:"var(--Style-Border-Radius)",p:2},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:12},children:"CUSTOM"}),de(k,{spacing:2,children:[de("div",{children:[de(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Light angle",de("span",{style:{float:"right"},children:[d,"°"]})]}),le(xs,{min:0,max:360,step:5,value:d,onChange:(e,r)=>c(r)})]}),de(h,{sx:{border:"1px solid var(--Border-Variant)",borderRadius:1,p:1.5},children:[le(rn,{label:"Inset bevel",checked:g,onChange:e=>x(e.target.checked)}),g&&de(k,{spacing:1.5,sx:{mt:1.5},children:[de("div",{children:[de(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Depth",de("span",{style:{float:"right"},children:[u,"px"]})]}),le(xs,{min:1,max:16,step:1,value:u,onChange:(e,r)=>p(r)})]}),de("div",{children:[de(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Softness",de("span",{style:{float:"right"},children:[m,"px"]})]}),le(xs,{min:0,max:6,step:.5,value:m,onChange:(e,r)=>f(r)})]})]})]}),de(h,{sx:{border:"1px solid var(--Border-Variant)",borderRadius:1,p:1.5},children:[le(rn,{label:"Drop shadow",checked:b,onChange:e=>v(e.target.checked)}),b&&de(k,{spacing:1.5,sx:{mt:1.5},children:[de("div",{children:[de(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Distance",de("span",{style:{float:"right"},children:[y,"px"]})]}),le(xs,{min:1,max:24,step:1,value:y,onChange:(e,r)=>S(r)})]}),de("div",{children:[de(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Blur",de("span",{style:{float:"right"},children:[B,"px"]})]}),le(xs,{min:0,max:24,step:1,value:B,onChange:(e,r)=>w(r)})]}),de("div",{children:[de(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Opacity",de("span",{style:{float:"right"},children:[C,"%"]})]}),le(xs,{min:10,max:100,step:5,value:C,onChange:(e,r)=>T(r)})]})]})]})]})]}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"TYPOGRAPHY"}),de(k,{spacing:2,children:[de("div",{children:[de(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Font size",de("span",{style:{float:"right"},children:[z,"px"]})]}),le(xs,{min:32,max:160,step:4,value:z,onChange:(e,r)=>A(r)})]}),de("div",{children:[de(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Font weight",le("span",{style:{float:"right"},children:I})]}),le(xs,{min:400,max:900,step:100,value:I,onChange:(e,r)=>R(r)})]}),de("div",{children:[de(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:["Letter spacing",de("span",{style:{float:"right"},children:[W,"px"]})]}),le(xs,{min:-2,max:20,step:1,value:W,onChange:(e,r)=>D(r)})]})]})]}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"PREVIEW BACKGROUND"}),le(k,{direction:"row",spacing:1,children:lm.map(e=>le(sm,{label:e.label,selected:l===e.value,onClick:()=>s(e.value)},e.value))}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginTop:6},children:"Showcase-only — doesn't affect the emitted code."})]})]})}),le(no,{value:1,children:de(k,{spacing:2,sx:{p:3,maxWidth:560},children:[de(ga,{style:{color:"var(--Text-Quiet)"},children:["BevelText uses the same Highlight / Lowlight token pair as button bevels, which target the WCAG 2.1 large-text minimum (3:1). Bevel text is decorative display — the SVG sets"," ",le("code",{children:'role="img"'})," and ",le("code",{children:"aria-label"})," to the rendered string so screen readers announce it as a labeled image, not a stream of glyphs."]}),le(oa,{color:"quiet",children:"Keep the rendered glyph height above ~24px when the bevel is on — at smaller sizes the highlight / lowlight stripes optically reduce the legible stroke width and the 3:1 contrast no longer feels comfortable."})]})})]})})})]})]})}const um={outline:"2px solid var(--Focus-Visible)",outlineOffset:"2px"},hm={opacity:"var(--Disabled, 0.38)",cursor:"not-allowed"};function pm(e={}){const{selectedBg:r,selectedText:t,selectedHover:a,selectedPressed:i,muiPrefix:o}=e,n=o?"&.Mui-disabled":"&:disabled",l=o?"&.Mui-focusVisible":"&:focus-visible",s={"&:hover":{backgroundColor:"var(--Hover)"},"&:active":{backgroundColor:"var(--Pressed)"},[l]:um,[n]:{...hm,color:"var(--Quiet)"}};return r?{...s,"&.Mui-selected":{backgroundColor:r,...t?{color:t}:{},"&:hover":{backgroundColor:a||"var(--Hover)"},"&:active":{backgroundColor:i||"var(--Pressed)"}}}:s}function mm({open:e,onClose:t,items:a=[],onItemClick:i,width:o=280,variant:n="temporary",header:l,footer:s,sx:d={},...c}){const[u,m]=r(null),[f,g]=r({}),x=(e,r)=>{m(r),i?.(e),"temporary"===n&&t?.()},b="permanent"===n?"permanent":"standard"===n?"standard":"temporary",v=de(h,{sx:{display:"flex",flexDirection:"column",height:"100%",backgroundColor:"var(--Container)",color:"var(--Text)"},children:[l&&le(h,{sx:{p:2,borderBottom:"1px solid var(--Border-Variant)"},children:"string"==typeof l?le(w,{variant:"h6",sx:{fontWeight:700},children:l}):l}),le(Z,{sx:{flex:1,overflow:"auto",py:1},children:a.map((e,r)=>{const t=u===r,a=e.submenu&&e.submenu.length>0,i=f[r];return de(h,{children:[le(B,{title:e.tooltip||"",placement:"right",children:le(J,{disablePadding:!0,children:de(K,{onClick:()=>{a?(e=>{g(r=>({...r,[e]:!r[e]}))})(r):x(e,r)},selected:t&&!a,sx:{backgroundColor:t&&!a?"var(--Buttons-Primary-Button)":"transparent",color:t&&!a?"var(--Buttons-Primary-Text)":"var(--Text)",...pm({muiPrefix:!0,selectedBg:"var(--Buttons-Primary-Button)",selectedText:"var(--Buttons-Primary-Text)",selectedHover:"var(--Buttons-Primary-Hover)",selectedPressed:"var(--Buttons-Primary-Pressed)"}),transition:"all 0.2s ease-in-out"},children:[e.icon&&le($,{sx:{color:t&&!a?"var(--Buttons-Primary-Text)":"var(--Icons-Primary)",minWidth:40},children:e.badge?le(p,{badgeContent:e.badge,color:"error",children:e.icon}):e.icon}),le(_,{primary:e.label,primaryTypographyProps:{variant:"body2",fontWeight:t&&!a?600:500}}),a&&le(h,{sx:{ml:1},children:le(i?Vr:ve,{})})]})})}),a&&le(ee,{in:i,timeout:"auto",unmountOnExit:!0,children:le(Z,{component:"div",disablePadding:!0,children:e.submenu.map((e,r)=>le(J,{disablePadding:!0,children:de(K,{onClick:()=>x(e,r),sx:{pl:4,backgroundColor:"transparent",color:"var(--Text)",...pm({muiPrefix:!0,selectedBg:"var(--Buttons-Primary-Button)",selectedText:"var(--Buttons-Primary-Text)",selectedHover:"var(--Buttons-Primary-Hover)",selectedPressed:"var(--Buttons-Primary-Pressed)"})},children:[e.icon&&le($,{sx:{color:"var(--Icons-Primary)",minWidth:40},children:e.icon}),le(_,{primary:e.label})]})},r))})}),e.divider&&le(re,{sx:{my:1,borderColor:"var(--Border-Variant)"}})]},r)})}),s&&le(h,{sx:{borderTop:"1px solid var(--Border-Variant)",p:2},children:"string"==typeof s?le(w,{variant:"caption",sx:{color:"var(--Text-Quiet)"},children:s}):s})]});return"permanent"===n?le(h,{sx:{width:o,flexShrink:0,...d},children:v}):le(te,{variant:b,open:e,onClose:t,PaperProps:{sx:{width:o,backgroundColor:"var(--Container)",color:"var(--Text)",...d}},...c,children:v})}function fm({layout:e="side",navItems:t=[{label:"Home",icon:le(Se,{}),path:"/"},{label:"About",icon:le(Re,{}),path:"/about"},{label:"Settings",icon:le(Be,{}),path:"/settings"},{label:"Help",icon:le(st,{}),path:"/help"}],title:a="My App",children:i,onLayoutChange:o,onNavigate:n,sx:l={},...s}){const d=ae(),c=ie(d.breakpoints.down("md"));ie(d.breakpoints.down("lg"));const[u,p]=r(!1),[m,f]=r(!1),g=c?"top":e,x=({compact:e=!1})=>le(Z,{sx:{py:1},children:t.map((r,t)=>le(B,{title:e?r.label:"",placement:"right",children:de(K,{onClick:()=>{n?.(r),p(!1)},sx:{color:"var(--Text)",...pm({muiPrefix:!0}),transition:"all 0.2s ease-in-out",justifyContent:e?"center":"flex-start",px:e?1:2},children:[le($,{sx:{color:"var(--Icons-Primary)",minWidth:e?"auto":40,mr:e?0:1},children:r.icon}),!e&&le(_,{primary:r.label})]})},t))});return de(h,{sx:{minHeight:"100vh",backgroundColor:"var(--Background)",color:"var(--Text)",display:"flex",flexDirection:"column",...l},...s,children:[le(oe,{position:"static",sx:{backgroundColor:"var(--Header)",color:"var(--Text)",boxShadow:"0 1px 3px rgba(0,0,0,0.12)",borderBottom:"1px solid var(--Border-Variant)"},children:de(ne,{children:[c&&"rail"!==g&&le(Ci,{variant:"ghost",onClick:()=>p(!u),"aria-label":u?"Close navigation":"Open navigation",sx:{mr:2},children:le(u?Wr:Rr,{})}),le(w,{variant:"h6",sx:{flex:1,fontWeight:700},children:a}),!c&&o&&de(I,{value:e,exclusive:!0,onChange:(e,r)=>{r&&o(r)},size:"small",sx:{"& .MuiToggleButton-root":{color:"var(--Text)",border:"1px solid var(--Border)","&.Mui-selected":{backgroundColor:"var(--Button-Primary-Button)",color:"#fff",borderColor:"var(--Button-Primary-Button)"}}},children:[le(A,{value:"side","aria-label":"side nav",children:"☰ Side"}),le(A,{value:"rail","aria-label":"rail nav",children:"⫷ Rail"}),le(A,{value:"side-rail","aria-label":"side-rail nav",children:"☰⫷ Both"})]})]})}),de(h,{sx:{display:"flex",flex:1},children:[("rail"===g||"side-rail"===g)&&!c&&le(h,{sx:{width:80,backgroundColor:"var(--Container)",borderRight:"1px solid var(--Border-Variant)",display:"flex",flexDirection:"column",py:2},children:le(x,{compact:!0})}),("side"===g||"side-rail"===g)&&!c&&de(h,{sx:{width:m?80:280,backgroundColor:"var(--Container)",borderRight:"1px solid var(--Border-Variant)",transition:"width 0.3s ease-in-out",display:"flex",flexDirection:"column"},children:[de(h,{sx:{p:2,display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid var(--Border-Variant)",minHeight:64},children:[!m&&le(w,{variant:"h6",sx:{fontWeight:700,color:"var(--Text)"},children:"Menu"}),le(Ci,{size:"small",variant:"ghost",onClick:()=>f(!m),"aria-label":m?"Expand navigation":"Collapse navigation",sx:{color:"var(--Icons-Primary)"},children:m?"›":"‹"})]}),le(x,{compact:m})]}),c&&de(te,{anchor:"left",open:u,onClose:()=>p(!1),sx:{"& .MuiDrawer-paper":{backgroundColor:"var(--Container)",width:280}},children:[le(h,{sx:{p:2,borderBottom:"1px solid var(--Border-Variant)"},children:le(w,{variant:"h6",sx:{fontWeight:700},children:"Menu"})}),le(x,{compact:!1})]}),le(h,{sx:{flex:1,overflow:"auto",backgroundColor:"var(--Background)"},children:le(H,{maxWidth:"lg",sx:{py:4},children:i})})]})]})}const gm={small:{summaryPadding:"var(--Sizing-Half) var(--Sizing-Half) var(--Sizing-Half) var(--Sizing-1-and-Half)",gap:"var(--Sizing-Half)",detailsPy:"var(--Sizing-1-and-Half)",detailsPx:"var(--Sizing-1-and-Half)",iconSize:"small"},medium:{summaryPadding:"var(--Sizing-1) var(--Sizing-1) var(--Sizing-1) var(--Sizing-2)",gap:"var(--Sizing-1)",detailsPy:"var(--Sizing-2)",detailsPx:"var(--Sizing-2)",iconSize:"medium"},large:{summaryPadding:"var(--Sizing-1-and-Half) var(--Sizing-1-and-Half) var(--Sizing-1-and-Half) var(--Sizing-2-and-Half)",gap:"var(--Sizing-1-and-Half)",detailsPy:"var(--Sizing-2-and-Half)",detailsPx:"var(--Sizing-2-and-Half)",iconSize:"large"}},xm=l({variant:"solid",color:"default",size:"medium",spacing:0}),bm=l({expanded:!1,toggle:()=>{},disabled:!1,accordionId:""}),vm="var(--Accordion-Radius, var(--Button-Radius))";function ym({children:e,variant:r="solid",surface:t,color:a="default",size:i="medium",spacing:o=0,className:n="",sx:l={},...s}){const d="default"===a?"Default":(c=a).charAt(0).toUpperCase()+c.slice(1);var c;const u=0===o,p="default"===a?"Default":d,m=t||("dark"===r?"Surface-Dimmest":"light"===r?"Surface-Brightest":"Surface");return le(xm.Provider,u?{value:{variant:r,color:a,size:i,spacing:o,dataTheme:p,dataSurface:m},children:le(h,{role:"presentation",className:"accordion-group accordion-group-connected accordion-group-"+r+" "+n,sx:{display:"flex",flexDirection:"column","& > .accordion-segment":{borderRadius:0,marginBottom:"-1px",boxShadow:"none"},"& > .accordion-segment:first-of-type":{borderTopLeftRadius:vm,borderTopRightRadius:vm},"& > .accordion-segment:last-of-type":{borderBottomLeftRadius:vm,borderBottomRightRadius:vm,marginBottom:0},...l},...s,children:e})}:{value:{variant:r,color:a,size:i,spacing:o,dataTheme:p,dataSurface:m},children:le(h,{role:"presentation",className:"accordion-group accordion-group-"+r+" accordion-group-spaced "+n,sx:{display:"flex",flexDirection:"column",gap:.5===o?"var(--Sizing-Half)":1===o?"var(--Sizing-1)":1.5===o?"var(--Sizing-1-and-Half)":2===o?"var(--Sizing-2)":8*o+"px",...l},...s,children:e})})}function Sm({children:e,expanded:t,defaultExpanded:a=!1,onChange:i,disabled:o=!1,className:l="",sx:s={},...d}){const[c,u]=r(a),p=void 0!==t,m=p?t:c,{dataTheme:f,dataSurface:g}=n(xm),[x]=r(()=>"accordion-"+Math.random().toString(36).substring(2,9));return le(bm.Provider,{value:{expanded:m,toggle:()=>{if(o)return;const e=!m;p||u(e),i?.(e)},disabled:o,accordionId:x},children:le(h,{className:"accordion-segment accordion"+(m?" accordion-expanded":"")+(o?" accordion-disabled":"")+" "+l,"data-theme":f,"data-surface":g,sx:{border:"1px solid var(--Border-Variant)",borderRadius:vm,backgroundColor:"var(--Background)",overflow:"hidden",boxShadow:ti,opacity:o?"var(--Disabled, 0.38)":1,...s},...d,children:e})})}const km={small:oa,medium:sa,large:pa},Bm={small:oa,medium:sa,large:pa};function wm({children:e,startDecorator:r,endDecorator:t,eyebrow:a,overline:i,secondary:o,expandIcon:l,className:s="",sx:d={},...c}){const{expanded:u,toggle:p,disabled:m,accordionId:f}=n(bm),{size:g}=n(xm),x=gm[g]||gm.medium,b=km[g]||km.medium,v=l||le(Na,{size:x.iconSize,sx:{color:u?"var(--Text)":"var(--Quiet)",transition:"color 0.15s ease"},children:le(ve,{})}),y={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"};return de(h,{component:"button",role:"button","aria-expanded":u,"aria-controls":f+"-content",id:f+"-header",tabIndex:m?-1:0,onClick:p,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),p())},className:"accordion-summary"+(u?" accordion-summary-expanded":"")+" "+s,sx:{display:"flex",flexDirection:"row",alignItems:"flex-start",justifyContent:"flex-start",width:"100%",gap:x.gap,padding:x.summaryPadding,border:"none",backgroundColor:"transparent",color:u?"var(--Text)":"var(--Quiet)",fontFamily:"inherit",cursor:m?"not-allowed":"pointer",textAlign:"left",transition:"color 0.2s ease, background-color 0.15s ease",borderRadius:0,"&:hover":m?{}:{color:"var(--Text)",backgroundColor:"var(--Hover)","& .omni-icon":{color:"var(--Text)"}},"&:active":m?{}:{color:"var(--Text)",backgroundColor:"var(--Pressed)","& .omni-icon":{color:"var(--Text)"}},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"-3px"},...d},...c,children:[r&&le(h,{className:"accordion-summary-start",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:r}),de(h,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:"var(--Sizing-Half)"},children:[(a??i)&&le(wa,{style:{...y,color:"var(--Text-Quiet)"},children:a??i}),null!=e&&le(b,{style:{...y,color:"inherit",fontWeight:600},children:e}),o&&le(oa,{style:{...y,color:"var(--Text-Quiet)"},children:o})]}),t&&le(h,{className:"accordion-summary-end",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:t}),le(h,{sx:{display:"flex",alignItems:"center",justifyContent:"center",transform:u?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.25s ease",flexShrink:0},children:v})]})}function Cm({children:e,className:r="",sx:t={},...a}){const{expanded:i,accordionId:o}=n(bm),{size:l}=n(xm),s=gm[l]||gm.medium,d=Bm[l]||Bm.medium;return i?le(h,{role:"region",id:o+"-content","aria-labelledby":o+"-header",className:"accordion-details "+r,sx:{padding:"0 "+s.detailsPx+" "+s.detailsPy+" "+s.detailsPx,color:"var(--Text)",fontFamily:"inherit",lineHeight:1.6,...t},...a,children:"string"==typeof e||"number"==typeof e?le(d,{children:e}):e}):null}const Tm={1:{padLeft:0,togglePadLeft:0},2:{padLeft:24,togglePadLeft:4},3:{padLeft:48,togglePadLeft:0},4:{padLeft:72,togglePadLeft:0},5:{padLeft:88,togglePadLeft:4}},zm={0:{padLeft:8},1:{padLeft:48},2:{padLeft:56,slotPadLeft:4},3:{padLeft:64,slotPadLeft:4},4:{padLeft:88,slotPadLeft:4},5:{padLeft:112},6:{padLeft:128}};function Am({label:e,icon:r,level:t=0,toggle:a="none",onToggle:i,disabled:o=!1,size:n="small",className:l="",sx:s={},children:d,...c}){const u=6===t&&"none"!==a?"none":a,p="on"===u,m="none"!==u,f=m?Tm[t]||{padLeft:0,togglePadLeft:0}:zm[t]||zm[0],g={paddingTop:"8px",paddingRight:"8px",paddingBottom:"8px",paddingLeft:(f.padLeft??8)+"px"};return de(h,{className:"tree-branch tree-branch-"+n+" tree-branch-level-"+t+" tree-branch-toggle-"+u+(o?" tree-branch-disabled":"")+(l?" "+l:""),sx:{width:"100%",...s},...c,children:[de(h,{component:"button",type:"button",role:"treeitem","aria-expanded":m?p:void 0,"aria-disabled":o||void 0,tabIndex:o?-1:0,onClick:e=>{o||m&&(e.stopPropagation(),i?.(p?"off":"on"))},disabled:o,sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px",width:"100%",minHeight:"24px",...g,border:"none",backgroundColor:"transparent",fontFamily:"inherit",color:"inherit",textAlign:"left",cursor:o?"not-allowed":"pointer",opacity:o?"var(--Disabled, 0.38)":1,outline:"none",transition:"background-color 0.15s ease, color 0.15s ease","&:hover":o?{}:{backgroundColor:"var(--Hover)"},"&:active":o?{}:{backgroundColor:"var(--Pressed)"},"&:focus-visible":{outline:"3px solid var(--Focus-Visible)",outlineOffset:"-2px"}},children:[m&&le(h,{className:"tree-branch-toggle",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,paddingLeft:(f.togglePadLeft??0)+"px"},children:le(h,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",transform:p?"rotate(-90deg)":"rotate(0deg)"},children:le(Na,{size:"small",children:le(Ur,{})})})}),de(h,{className:"tree-branch-slot",sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px",flex:1,minWidth:0,...void 0!==f.slotPadLeft&&{paddingLeft:f.slotPadLeft+"px"}},children:[r&&le(h,{sx:{display:"inline-flex",alignItems:"center",flexShrink:0},children:le(Na,{size:"small",children:r})}),null!=e&&le(na,{style:{color:"inherit",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block",flex:1,minWidth:0},children:e})]})]}),p&&d&&le(h,{role:"group",sx:{display:"flex",flexDirection:"column"},children:d})]})}const Im=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",Rm=[{label:"Default",colors:["default"]},{label:"Theme",colors:["primary","secondary","tertiary","neutral"]},{label:"State",colors:["info","success","warning","error"]}],Wm=e=>le(h,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:e,flexShrink:0}}),Dm=[{id:"1",label:"Documents",icon:le(tt,{}),badge:Wm("var(--Warning-Text, orange)"),children:[{id:"1-1",label:"Company",icon:le(dt,{}),badge:Wm("var(--Warning-Text, orange)"),children:[{id:"1-1-1",label:"Invoice",icon:le(ut,{})},{id:"1-1-2",label:"Meeting notes",icon:le(ct,{})},{id:"1-1-3",label:"Tasks list",icon:le(ct,{})},{id:"1-1-4",label:"Equipment",icon:le(ut,{})},{id:"1-1-5",label:"Video conference",icon:le(ht,{})}]},{id:"1-2",label:"Personal",icon:le(tt,{})},{id:"1-3",label:"Group photo",icon:le(jr,{})}]},{id:"2",label:"Bookmarked",icon:le(Kr,{}),children:[{id:"2-1",label:"Favourites",icon:le(ct,{})}]},{id:"3",label:"History",icon:le(tt,{})},{id:"4",label:"Trash",icon:le(ke,{}),disabled:!0}],Pm=JSON.stringify(Vu,null,2);function Fm({ratio:e,threshold:r}){if(!e)return le(ga,{style:{color:"var(--Text-Quiet)"},children:"--"});const t=parseFloat(e)>=r;return de(h,{sx:{display:"inline-flex",alignItems:"center",gap:.5},children:[de(h,{sx:{px:1,py:.25,borderRadius:"4px",fontSize:"11px",fontWeight:700,backgroundColor:t?"var(--Tags-Success-BG)":"var(--Tags-Error-BG)",color:t?"var(--Tags-Success-Text)":"var(--Tags-Error-Text)"},children:[e,":1"]}),le(ga,{style:{color:t?"var(--Tags-Success-Text)":"var(--Tags-Error-Text)"},children:t?"Pass":"Fail"})]})}function Lm({label:e,ratio:r,threshold:t,note:a}){return de(h,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(h,{sx:{flex:1},children:[le(oa,{style:{color:"var(--Text)"},children:e}),a&&le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:a})]}),le(Fm,{ratio:r,threshold:t})]})}function Hm({label:e,selected:r,onClick:t}){return le(wi,{selected:r,variant:r?"default":"default-outline",size:"small",onClick:t,children:e})}function Mm({color:e,selected:r,onClick:t}){const a=Im(e);return le(h,{component:"button",onClick:()=>t(e),"aria-label":"Select "+a,"aria-pressed":r,title:a,sx:{width:"var(--Button-Height)",height:"var(--Button-Height)",borderRadius:"4px",backgroundColor:"var(--Buttons-"+a+"-Button)",border:r?"2px solid var(--Text)":"1px solid var(--Border)",outline:r?"2px solid var(--Focus-Visible)":"2px solid transparent",outlineOffset:"1px",cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.1s ease","&:hover":{transform:"scale(1.1)"}},children:r&&le(ue,{sx:{fontSize:16,color:"var(--Buttons-"+a+"-Text)",pointerEvents:"none"}})})}function Em({value:e,onChange:t}){const[a,i]=r(e),[o,n]=r(null);return de(h,{children:[de(h,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1},children:[le(wa,{style:{color:"var(--Text-Quiet)"},children:"TREE DATA (JSON)"}),le(wi,{variant:"ghost",size:"small",onClick:()=>{i(Pm),n(null),t(Vu)},children:"Reset"})]}),le(h,{component:"textarea",value:a,onChange:e=>{i(e.target.value);try{const r=JSON.parse(e.target.value);n(null),t(r)}catch(e){n(e.message)}},spellCheck:!1,rows:10,sx:{width:"100%",fontFamily:"monospace",fontSize:"11px",backgroundColor:"#1e1e1e",color:o?"#f87171":"#e5e7eb",border:"1px solid "+(o?"#f87171":"#333"),borderRadius:"6px",padding:"10px",resize:"vertical",outline:"none",boxSizing:"border-box",lineHeight:1.5,"&:focus":{borderColor:"var(--Focus-Visible)"}}}),o&&de(ga,{style:{color:"#f87171",display:"block",marginTop:4},children:["JSON error: ",o]})]})}function Om(){const[e,t]=r("solid"),[n,l]=r("primary"),[s,d]=r("default"),[c,u]=r("slide"),[p,m]=r("single"),[f,g]=r(!1),[x,b]=r(!1),[v,y]=r(!1),[S,B]=r(Vu),[w,T]=r(null),[z,A]=r("Surface"),[I,R]=r({}),W=a(null),D=Im(n),P=v?Dm:S,F=i((e,r)=>e&&getComputedStyle(e).getPropertyValue(r).trim()||null,[]);o(()=>{const e=setTimeout(()=>{const e=W.current;R({text:F(e,"--Text"),textQuiet:F(e,"--Text-Quiet"),background:F(e,"--Background"),border:F(e,"--Border"),focusVisible:F(e,"--Focus-Visible"),activeBtn:F(e,"--Buttons-"+D+"-Button"),activeBorder:F(e,"--Buttons-"+D+"-Border")})},50);return()=>clearTimeout(e)},[n,w,F,D]);return de(h,{sx:{pb:8},children:[le(qt,{children:"Tree View"}),de(C,{container:!0,sx:{mt:2,alignItems:"flex-start",flexWrap:"wrap"},children:[de(C,{item:!0,sx:{width:{xs:"100%",md:"55%"},flexShrink:0,pr:{md:3}},children:[le(lo,{ref:W,theme:w,children:le(h,{sx:{width:"100%",maxWidth:360},children:le(Qu,{color:n,variant:e,density:s,animation:c,selectionMode:p,checkboxSelection:f,disableSelection:x,items:P,defaultExpandedItems:["1","1-1","2"]})})}),le(No,{code:(()=>{const r=["<OmniTreeView"];return"default"!==n&&r.push(' color="'+n+'"'),"default"!==e&&r.push(' variant="'+e+'"'),"default"!==s&&r.push(' density="'+s+'"'),"slide"!==c&&r.push(' animation="'+c+'"'),"single"!==p&&r.push(' selectionMode="'+p+'"'),f&&r.push(" checkboxSelection"),x&&r.push(" disableSelection"),r.push(" items={treeData}"),r.push("/>"),r.join("\n")})(),language:"JSX",wrap:!0,sx:{mt:2}})]}),le(C,{item:!0,sx:{width:{xs:"100%",md:"45%"},flexShrink:0,alignSelf:"flex-start",minWidth:0,overflow:"hidden"},children:le(h,{sx:{backgroundColor:"var(--Background)",overflow:"hidden"},children:de(ao,{defaultValue:0,variant:"standard",color:"primary",children:[de(io,{children:[le(oo,{children:"Playground"}),le(oo,{children:"Accessibility"})]}),le(no,{value:0,children:de(h,{sx:{p:3},children:[le(h,{sx:{mb:3},children:le(ho,{theme:w,onThemeChange:T,surface:z,onSurfaceChange:A})}),de(h,{children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"STYLE"}),de(k,{direction:"row",spacing:1,children:[le(Hm,{label:"Solid",selected:"solid"===e,onClick:()=>t("solid")}),le(Hm,{label:"Light",selected:"light"===e,onClick:()=>t("light")})]})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"COLOR"}),le(k,{spacing:1.5,children:Rm.map(e=>de(h,{children:[le(ga,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:4,fontWeight:600},children:e.label}),le(k,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:e.colors.map(e=>le(Mm,{color:e,selected:n===e,onClick:l},e))})]},e.label))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"DENSITY"}),de(k,{direction:"row",spacing:1,children:[le(Hm,{label:"Compact",selected:"compact"===s,onClick:()=>d("compact")}),le(Hm,{label:"Default",selected:"default"===s,onClick:()=>d("default")})]})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"ANIMATION"}),le(k,{direction:"row",spacing:1,children:["none","slide","spring"].map(e=>le(Hm,{label:Im(e),selected:c===e,onClick:()=>u(e)},e))})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"SELECTION MODE"}),de(k,{direction:"row",spacing:1,children:[le(Hm,{label:"Single",selected:"single"===p,onClick:()=>m("single")}),le(Hm,{label:"Multi",selected:"multi"===p,onClick:()=>m("multi")})]})]}),de(h,{sx:{mt:3},children:[le(wa,{style:{color:"var(--Text-Quiet)",display:"block",marginBottom:8},children:"OPTIONS"}),de(h,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Show Icons"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Load sample data with icons and badges"})]}),le(en,{checked:v,onChange:e=>y(e.target.checked),size:"small","aria-label":"Show icons"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Checkbox Selection"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Show checkboxes for each item"})]}),le(en,{checked:f,onChange:e=>g(e.target.checked),size:"small","aria-label":"Checkbox selection"})]}),de(h,{sx:{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[de(h,{children:[le(ya,{children:"Disable Selection"}),le(ga,{style:{color:"var(--Text-Quiet)",display:"block"},children:"Items are not selectable"})]}),le(en,{checked:x,onChange:e=>b(e.target.checked),size:"small","aria-label":"Disable selection"})]})]}),!v&&le(h,{sx:{mt:3},children:le(Em,{value:Pm,onChange:B})})]})}),le(no,{value:1,children:le(h,{sx:{p:3},children:de(k,{spacing:3,children:[de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"Text Contrast (WCAG 1.4.3 — 4.5:1)"}),le(Lm,{label:"Resting: var(--Text-Quiet) vs. background",ratio:Go(I.textQuiet,I.background),threshold:4.5,note:"Unselected items use Text-Quiet"}),le(Lm,{label:"Hover: var(--Text) vs. background",ratio:Go(I.text,I.background),threshold:4.5,note:"Hovered items use var(--Text)"}),le(Lm,{label:"Active (solid): var(--Text) vs. var(--Buttons-"+D+"-Button)",ratio:Go(I.text,I.activeBtn),threshold:4.5,note:"Selected item with solid fill"})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"Focus Indicator (WCAG 2.4.11 — 3:1)"}),le(Lm,{label:"var(--Focus-Visible) vs. background",ratio:Go(I.focusVisible,I.background),threshold:3,note:"outline: 2px solid var(--Focus-Visible); outline-offset: -2px"})]}),de(h,{sx:{p:3,backgroundColor:"var(--Background)",borderRadius:"var(--Style-Border-Radius)",border:"1px solid var(--Border)"},children:[le(Jt,{children:"ARIA and Semantics"}),le(k,{spacing:0,children:[{label:"Role",value:'role="tree" on root, role="treeitem" on each node'},{label:"Expansion",value:'aria-expanded="true/false" on parent items'},{label:"Selection",value:"aria-selected on selected items"},{label:"Disabled",value:'aria-disabled="true" on disabled items'},{label:"Icons",value:"Icon elements are aria-hidden — label carries the accessible name"},{label:"Keyboard",value:"Arrow keys navigate, Enter/Space selects, * expands all siblings"}].map(({label:e,value:r})=>de(h,{sx:{py:1.5,borderBottom:"1px solid var(--Border)"},children:[de(oa,{children:[e,":"]}),le(ga,{style:{color:"var(--Text-Quiet)",fontFamily:"monospace"},children:r})]},e))})]})]})})})]})})})]})]})}function Nm(e,r){if(document.getElementById(r))return;const t=document.createElement("link");t.rel="stylesheet",t.href=e,t.id=r,document.head.appendChild(t)}const Qm=[{value:"desktop",label:"Desktop",note:"32px touch targets (WCAG)"},{value:"ios-mobile",label:"iOS Mobile",note:"44px touch targets (HIG)"},{value:"ios-tablet",label:"iOS Tablet",note:"44px touch targets (HIG)"},{value:"android",label:"Android",note:"48px touch targets (M3)"}],Vm={desktop:"32px","ios-mobile":"44px","ios-tablet":"44px",android:"48px"};function jm(){const{mode:e,switchMode:t}=function(e="light"){const[t,a]=r(e);return o(()=>{Nm("/styles/foundation.css","css-foundation"),Nm("/styles/core.css","css-core"),Nm("/styles/Light-Mode.css","css-mode"),Nm("/styles/base.css","css-base"),Nm("/styles/typography-tokens.css","css-typography-tokens")},[]),{mode:t,switchMode:e=>{const r=document.getElementById("css-mode");r&&(r.href="dark"===e?"/styles/Dark-Mode.css":"/styles/Light-Mode.css"),a(e),localStorage.setItem("themeMode",e)}}}("light"),[a,i]=r(!1),[n,l]=r("desktop");o(()=>{const e=localStorage.getItem("dino-platform")||"desktop",r=localStorage.getItem("themeMode")||"light";l(e),document.documentElement.style.setProperty("--Button-Height",Vm[e]||"32px"),"dark"===r&&t("dark")},[]);const s=e=>{l(e),localStorage.setItem("dino-platform",e),document.documentElement.style.setProperty("--Button-Height",Vm[e]||"32px")};return de(se,{children:[le(h,{onClick:()=>i(!0),role:"button","aria-label":"Open settings",sx:{position:"fixed",bottom:24,right:24,width:52,height:52,borderRadius:"50%",backgroundColor:"var(--Buttons-Tertiary-Button)",color:"var(--Buttons-Tertiary-Text)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",zIndex:999,transition:"transform 0.15s ease, box-shadow 0.15s ease","&:hover":{transform:"scale(1.08)",boxShadow:"0 6px 16px rgba(0,0,0,0.2)"}},children:le(Ar,{sx:{fontSize:24}})}),le(Wu,{anchor:"right",open:a,onClose:()=>i(!1),hideBackdrop:!0,size:"small",sx:{width:320,zIndex:99999999},children:de(h,{sx:{p:3,height:"100%",display:"flex",flexDirection:"column"},children:[de(h,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[le(Jt,{children:"Settings"}),le(wi,{iconOnly:!0,variant:"ghost",size:"small",onClick:()=>i(!1),"aria-label":"Close settings",children:le(Ir,{fontSize:"small"})})]}),le(re,{sx:{mb:3,borderColor:"var(--Border)"}}),le(h,{sx:{flex:1,overflowY:"auto"},children:de(k,{spacing:4,children:[de(h,{children:[le(wa,{style:{color:"var(--Text)",opacity:.85,display:"block",marginBottom:12,fontWeight:600},children:"MODE"}),de(k,{direction:"row",spacing:1,children:[le(wi,{variant:"light"===e?"primary":"primary-outline",size:"small",onClick:()=>t("light"),sx:{flex:1},children:"Light"}),le(wi,{variant:"dark"===e?"primary":"primary-outline",size:"small",onClick:()=>t("dark"),sx:{flex:1},children:"Dark"})]})]}),de(h,{children:[le(wa,{style:{color:"var(--Text)",opacity:.85,display:"block",marginBottom:12,fontWeight:600},children:"PLATFORM"}),le(k,{spacing:1,children:Qm.map(({value:e,label:r,note:t})=>{const a=n===e;return de(h,{onClick:()=>s(e),sx:{p:1.5,borderRadius:"var(--Style-Border-Radius)",cursor:"pointer",border:a?"2px solid var(--Buttons-Primary-Button)":"1px solid var(--Border)",backgroundColor:a?"var(--Background)":"transparent",display:"flex",justifyContent:"space-between",alignItems:"center",transition:"all 0.15s ease","&:hover":{backgroundColor:"var(--Hover)"}},children:[de(h,{children:[le(oa,{style:{color:a?"var(--Buttons-Primary-Button)":"var(--Text)",fontWeight:a?600:400},children:r}),le(ga,{style:{color:"var(--Text)",opacity:.7},children:t})]}),a&&le(h,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"var(--Buttons-Primary-Button)",flexShrink:0}})]},e)})})]})]})}),le(re,{sx:{my:3,borderColor:"var(--Border)"}}),le(wi,{variant:"primary-outline",size:"small",onClick:()=>{s("desktop"),t("light")},sx:{width:"100%"},children:"Reset to Defaults"})]})})]})}const Gm=e=>(e||[]).map(e=>{const r="number"==typeof e?e:Number(e?.value);return Number.isFinite(r)?r:0}),Um=e=>(e||[]).map((e,r)=>"number"==typeof e?String(r+1):e?.label??String(r+1));function Xm(e,{fromZero:r=!0}={}){if(!e.length)return{min:0,max:1};let t=Math.min(...e),a=Math.max(...e);return r&&(t=Math.min(0,t)),a===t&&(a=t+1),{min:t,max:a}}const Ym=(e,{min:r,max:t},a,i)=>a+i-(e-r)/(t-r)*i;function qm(e,r,t,{inset:a=0}={}){if(e<=0)return[];if(1===e)return[r+t/2];const i=(t-2*a)/(e-1);return Array.from({length:e},(e,t)=>r+a+t*i)}function Zm(e,r,t,{gapRatio:a=.4}={}){if(e<=0)return{centres:[],bandWidth:0};const i=t/e,o=i*(1-a);return{centres:Array.from({length:e},(e,t)=>r+i*t+i/2),bandWidth:o}}const Jm=e=>e.length?e.map((e,r)=>`${r?"L":"M"}${e.x} ${e.y}`).join(" "):"";function Km(e,{tension:r=0}={}){if(e.length<2)return Jm(e);const t=(1-r)/6;let a=`M${e[0].x} ${e[0].y}`;for(let r=0;r<e.length-1;r++){const i=e[r-1]||e[r],o=e[r],n=e[r+1],l=e[r+2]||n,s={x:o.x+(n.x-i.x)*t,y:o.y+(n.y-i.y)*t},d={x:n.x-(l.x-o.x)*t,y:n.y-(l.y-o.y)*t};a+=` C${s.x} ${s.y} ${d.x} ${d.y} ${n.x} ${n.y}`}return a}const $m=(e,r,t)=>e&&r.length?`${e} L${r[r.length-1].x} ${t} L${r[0].x} ${t} Z`:"";function _m(e,r,t,a,i,o){const n=o-i;if(n>=2*Math.PI-1e-9){const o=i+Math.PI;return _m(e,r,t,a,i,o)+" "+_m(e,r,t,a,o,i+2*Math.PI)}const l=(t,a)=>({x:e+t*Math.sin(a),y:r-t*Math.cos(a)}),s=n>Math.PI?1:0,d=l(a,i),c=l(a,o);if(t<=0)return`M${e} ${r} L${d.x} ${d.y} A${a} ${a} 0 ${s} 1 ${c.x} ${c.y} Z`;const u=l(t,o),h=l(t,i);return`M${d.x} ${d.y} A${a} ${a} 0 ${s} 1 ${c.x} ${c.y} L${u.x} ${u.y} A${t} ${t} 0 ${s} 0 ${h.x} ${h.y} Z`}function ef(e,{startAngle:r=0}={}){const t=e.map(e=>e>0?e:0),a=t.reduce((e,r)=>e+r,0),i=e.filter(e=>e<=0).length;if(a<=0)return{slices:[],total:0,dropped:i};let o=r;return{slices:t.map(e=>{const r=e/a*Math.PI*2,t={start:o,end:o+r,value:e,fraction:e/a};return o+=r,t}),total:a,dropped:i}}function rf({min:e,max:r},t=4){if(t<1)return[];const a=(r-e)/t,i=Math.pow(10,Math.floor(Math.log10(Math.abs(a)||1))),o=[1,2,2.5,5,10].map(e=>e*i).find(e=>e>=a)??10*i,n=[];for(let t=Math.ceil(e/o)*o;t<=r+1e-9;t+=o)n.push(Number(t.toFixed(10)));return n}var tf=Object.freeze({__proto__:null,arcPath:_m,areaPath:$m,bands:qm,extent:Xm,linePath:Jm,scaleY:Ym,sliceAngles:ef,slots:Zm,smoothPath:Km,ticks:rf,toLabels:Um,toNumbers:Gm});const af={fill:"var(--Icons-Primary)",track:"var(--Border-Variant)",line:"var(--Border-Variant)",quietLabel:"var(--Quiet)",label:"var(--Text)",gradient:"var(--Icons-Primary-Variant)"},of=["Primary","Secondary","Tertiary","Neutral","Info","Success","Warning","Error"],nf={fontFamily:"var(--Label-Small-Font-Family)",fontSize:"var(--Label-Small-Font-Size)",fontWeight:"var(--Label-Small-Font-Weight)",letterSpacing:"var(--Label-Small-Letter-Spacing)"},lf={position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function sf({caption:e,labels:r,values:t,valueHeader:a="Value"}){return de(h,{component:"table",sx:lf,children:[le("caption",{children:e}),le("thead",{children:de("tr",{children:[le("th",{scope:"col",children:"Category"}),le("th",{scope:"col",children:a})]})}),le("tbody",{children:t.map((e,t)=>de("tr",{children:[le("th",{scope:"row",children:r[t]}),le("td",{children:e})]},t))})]})}const df="var(--Motion-Duration-Slow, 300ms) var(--Motion-Easing-Enter, cubic-bezier(0, 0, 0, 1))",cf="var(--Motion-Duration-Fast, 150ms) var(--Motion-Easing-Standard, cubic-bezier(0.2, 0, 0, 1))";function uf(r){const[t,a]=e.useState(-1),i=e.useCallback(e=>({onMouseEnter:()=>a(e),onMouseLeave:()=>a(r=>r===e?-1:r),onFocus:()=>a(e),onBlur:()=>a(r=>r===e?-1:r)}),[]);return e.useEffect(()=>{a(e=>e>=r?-1:e)},[r]),{active:t,setActive:a,handlers:i}}function hf({count:e,width:r,centres:t,bandWidth:a,labels:i,values:o,handlers:n}){return e?le(h,{sx:{position:"absolute",inset:0,display:"block",pointerEvents:"none"},children:Array.from({length:e},(e,l)=>le(h,{component:"button",type:"button","aria-label":`${i[l]}: ${o[l]}`,...n(l),sx:{position:"absolute",top:0,height:"100%",left:(t[l]-a/2)/r*100+"%",width:a/r*100+"%",padding:0,margin:0,border:0,background:"transparent",cursor:"pointer",pointerEvents:"auto","&:focus-visible":{outline:"2px solid var(--Focus-Visible)",outlineOffset:"-2px",borderRadius:"4px"}}},l))}):null}function pf({x:e,y:r,text:t,width:a,tokens:i}){if(null==t)return null;const o=Math.max(28,8*String(t).length+14),n=Math.min(Math.max(e,o/2+2),a-o/2-2),l=r-26>=2?r-26:r+6;return de("g",{pointerEvents:"none",children:[le("rect",{x:n-o/2,y:l,width:o,height:20,rx:6,fill:i.fill}),le("text",{x:n,y:l+14,textAnchor:"middle",fill:"var(--Icons-On-Primary)",style:{fontFamily:"var(--Label-Small-Font-Family)",fontSize:"var(--Label-Small-Font-Size)",fontWeight:"var(--Label-Small-Font-Weight)"},children:t})]})}function mf({data:e=[],showTrack:t=!0,rounded:a=!0,showValues:i=!1,showLabels:n=!0,animate:l=!0,interactive:s=!0,height:d=200,gapRatio:c=.4,label:u,className:p="",sx:m={},...f}){const g=Gm(e),x=Um(e),{active:b,handlers:v}=uf(g.length),[y,S]=r(!l);o(()=>{if(!l)return;const e=requestAnimationFrame(()=>S(!0));return()=>cancelAnimationFrame(e)},[l]);const k=320,B=i?20:8,w=n?22:8,C=Math.max(0,d-B-w),T=Xm(g,{fromZero:!0}),{centres:z,bandWidth:A}=Zm(g.length,0,k,{gapRatio:c}),I=B+C,R=a?A/2:0,W=g.length?k/g.length:0;return de(h,{component:"figure",className:"bar-chart "+p,sx:{display:"block",width:"100%",m:0,position:"relative",...m},...f,children:[de("svg",{viewBox:`0 0 320 ${d}`,width:"100%",height:d,preserveAspectRatio:"none",focusable:"false","aria-hidden":"true",children:[s&&b>=0&&le("rect",{x:z[b]-W/2,y:0,width:W,height:d,fill:"var(--Hover)",rx:6}),g.map((e,r)=>{const a=z[r]-A/2,i=Ym(e,T,B,C),o=Math.max(0,I-i);return de("g",{children:[t&&le("rect",{x:a,y:B,width:A,height:C,rx:R,ry:R,fill:af.track}),o>0&&le("rect",{x:a,y:i,width:A,height:o,rx:Math.min(R,o/2),ry:Math.min(R,o/2),fill:af.fill,style:{transformBox:"fill-box",transformOrigin:"bottom",transform:y?"scaleY(1)":"scaleY(0)",transition:`transform ${df}`}})]},r)}),i&&g.map((e,r)=>le("text",{x:z[r],y:Ym(e,T,B,C)-6,textAnchor:"middle",fill:af.label,...nf,children:e},"v"+r)),n&&x.map((e,r)=>le("text",{x:z[r],y:d-6,textAnchor:"middle",fill:af.quietLabel,...nf,children:e},"l"+r)),s&&b>=0&&!i&&le(pf,{x:z[b],y:Ym(g[b],T,B,C),text:g[b],width:k,tokens:af})]}),s&&le(hf,{count:g.length,width:k,centres:z,bandWidth:W,labels:x,values:g,handlers:v}),le(sf,{caption:u||`Bar chart, ${g.length} values`,labels:x,values:g})]})}function ff({data:e=[],curve:a="smooth",gradient:i=!0,fromZero:n=!1,showGrid:l=!1,showLabels:s=!1,animate:d=!0,interactive:c=!0,height:u=200,strokeWidth:p=3,tension:m=0,label:f,className:g="",sx:x={},...b}){const v="lc-"+t().replace(/:/g,""),y=Gm(e),S=Um(e),{active:k,handlers:B}=uf(y.length),[w,C]=r(!d);o(()=>{if(!d)return;const e=requestAnimationFrame(()=>C(!0));return()=>cancelAnimationFrame(e)},[d]);const T=320,z=s?22:8,A=Math.max(0,u-8-z),I=Xm(y,{fromZero:n}),R=qm(y.length,0,T,{inset:p}),W=y.map((e,r)=>({x:R[r],y:Ym(e,I,8,A)})),D="straight"===a?Jm(W):Km(W,{tension:m}),P=8+A;return de(h,{component:"figure",className:"line-chart "+g,sx:{display:"block",width:"100%",m:0,position:"relative",...x},...b,children:[de("svg",{viewBox:`0 0 320 ${u}`,width:"100%",height:u,preserveAspectRatio:"none",focusable:"false","aria-hidden":"true",children:[i&&le("defs",{children:de("linearGradient",{id:v,x1:"0",y1:"0",x2:"0",y2:"1",children:[le("stop",{offset:"0%",stopColor:af.gradient,stopOpacity:"1"}),le("stop",{offset:"100%",stopColor:af.gradient,stopOpacity:"0"})]})}),l&&rf(I,4).map(e=>le("line",{x1:0,x2:T,y1:Ym(e,I,8,A),y2:Ym(e,I,8,A),stroke:af.line,strokeWidth:"1"},e)),i&&W.length>1&&le("path",{d:$m(D,W,P),fill:`url(#${v})`,style:{opacity:w?1:0,transition:`opacity ${df}`}}),W.length>1&&le("path",{d:D,fill:"none",stroke:af.fill,strokeWidth:p,strokeLinecap:"round",strokeLinejoin:"round",pathLength:"1",style:{strokeDasharray:1,strokeDashoffset:w?0:1,transition:`stroke-dashoffset ${df}`}}),1===W.length&&le("circle",{cx:W[0].x,cy:W[0].y,r:p,fill:af.fill}),c&&k>=0&&de(se,{children:[le("line",{x1:R[k],x2:R[k],y1:8,y2:P,stroke:af.line,strokeWidth:"1"}),le("circle",{cx:W[k].x,cy:W[k].y,r:p+1,fill:af.fill,stroke:"var(--Background)",strokeWidth:"2"}),le(pf,{x:W[k].x,y:W[k].y,text:y[k],width:T,tokens:af})]}),s&&S.map((e,r)=>le("text",{x:R[r],y:u-6,textAnchor:"middle",fill:af.quietLabel,...nf,children:e},r))]}),c&&le(hf,{count:y.length,width:T,centres:R,bandWidth:y.length?T/y.length:0,labels:S,values:y,handlers:B}),le(sf,{caption:f||`Line chart, ${y.length} points`,labels:S,values:y})]})}function gf({data:e=[],donut:t=!1,donutRatio:a=.6,colors:i=of,separatorWidth:n=2,size:l=200,showLabels:s=!1,animate:d=!0,interactive:c=!0,label:u,className:p="",sx:m={},...f}){const g=Gm(e),x=Um(e),{slices:b,total:v,dropped:y}=ef(g),{active:S,handlers:k}=uf(g.length),[B,w]=r(!d);o(()=>{if(!d)return;const e=requestAnimationFrame(()=>w(!0));return()=>cancelAnimationFrame(e)},[d]);const C=l/2,T=l/2,z=l/2-1,A=t?z*a:0,I=e=>{return{fill:`var(--Icons-${r=i[e%i.length]})`,onFill:`var(--Icons-On-${r})`};var r};return de(h,{component:"figure",className:"pie-chart "+p,sx:{display:"block",m:0,position:"relative",...m},...f,children:[de("svg",{viewBox:`0 0 ${l} ${l}`,width:l,height:l,focusable:"false","aria-hidden":"true",children:[b.map((e,r)=>{const t=(e.start+e.end)/2,a=c&&S===r?4:0;return le("path",{d:_m(C,T,A,z,e.start,e.end),fill:I(r).fill,stroke:"var(--Background)",strokeWidth:n,strokeLinejoin:"round",...c?k(r):{},style:{transform:`translate(${a*Math.sin(t)}px, ${-a*Math.cos(t)}px) scale(${B?1:0})`,transformOrigin:`${C}px ${T}px`,transformBox:"view-box",transition:`transform ${B?cf:df}`}},r)}),s&&b.map((e,r)=>{const t=(e.start+e.end)/2,a=A+.62*(z-A);return e.fraction<.07?null:le("text",{x:C+a*Math.sin(t),y:T-a*Math.cos(t),textAnchor:"middle",dominantBaseline:"middle",fill:I(r).onFill,...nf,children:x[r]},r)})]}),le(sf,{caption:(u||`${t?"Donut":"Pie"} chart, ${b.length} segments`)+(y?`, ${y} non-positive values omitted`:""),labels:x,values:g})]})}const xf={empty:{icon:le(pt,{}),iconColor:"quiet",titleColor:"header",role:void 0},"no-results":{icon:le(mt,{}),iconColor:"quiet",titleColor:"header",role:void 0},error:{icon:le(ft,{}),iconColor:"error",titleColor:"error",role:"alert"}},bf={small:{icon:"medium",pad:"24px 16px",gap:"8px",maxWidth:"36ch"},medium:{icon:"large",pad:"48px 24px",gap:"12px",maxWidth:"40ch"},large:{icon:"large",pad:"80px 24px",gap:"16px",maxWidth:"44ch"}};function vf({type:e="empty",icon:r,title:a,body:i,action:o,size:n="medium",className:l="",sx:s={},...d}){const c=xf[e]||xf.empty,u=bf[n]||bf.medium,p="small"===n?oa:sa,m=t(),f=a?m+"-title":void 0,g=i?m+"-body":void 0;return"production"===process.env.NODE_ENV||a||console.warn("[StateMessage] needs a `title`. A state message with no words is an empty box, which is the thing it exists to replace."),de(h,{className:"state-message state-message-"+e+" state-message-"+n+" "+l,role:c.role||"group","aria-labelledby":f,"aria-describedby":g,sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:u.gap,padding:u.pad,width:"100%",boxSizing:"border-box",...s},...d,children:[le(Na,{size:u.icon,color:c.iconColor,"aria-hidden":"true",children:r||c.icon}),a&&le(ea,{id:f,color:c.titleColor,children:a}),i&&le(p,{id:g,color:"quiet",sx:{maxWidth:u.maxWidth},children:i}),o&&le(h,{sx:{marginTop:"4px"},children:o})]})}var yf={};export{Sm as Accordion,Cm as AccordionDetails,ym as AccordionGroup,wm as AccordionSummary,$u as Alert,xu as AlertDialog,ih as AlertShowcase,hp as AppBar,Sp as AppBarShowcase,rs as Autocomplete,ls as AutocompleteShowcase,Ua as Avatar,Xa as AvatarGroup,Hh as AvatarShowcase,Ka as Badge,jh as BadgeShowcase,mf as BarChart,om as BevelText,cm as BevelTextShowcase,Dl as BlackWhiteToggleButtonGroup,sa as Body,ua as Body1,ha as Body2,ca as BodyBold,pa as BodyLarge,fa as BodyLargeBold,ma as BodyLargeSemibold,da as BodySemibold,oa as BodySmall,la as BodySmallBold,na as BodySmallSemibold,rc as BottomNavigation,mc as BottomNavigationShowcase,Ys as Box,Ks as BoxShowcase,kd as BreadcrumbItem,Sd as Breadcrumbs,Cd as BreadcrumbsShowcase,wi as Button,gn as ButtonGroup,Ha as ButtonSmall,Ma as ButtonText,Vt as CAP_HEIGHT_TRIM,nf as CHART_LABEL_TYPE,af as CHART_TOKENS,ga as Caption,xa as CaptionBold,Fn as Card,kn as CenteredStack,Mi as Checkbox,Ls as Chip,fh as CircularProgress,yh as CircularProgressShowcase,No as CodeBlock,Yo as Colors,$s as Container,Oo as CopyButton,Bp as Copyright,Vp as CopyrightShowcase,Kp as CurvedText,am as CurvedTextShowcase,Qa as DEFAULT_AVATAR_SRC,Vu as DEFAULT_ITEMS,zl as DefaultToggleButtonGroup,cp as DesktopAppBar,gu as Dialog,yu as DialogShowcase,jt as DisplayLarge,Gt as DisplayMedium,Ut as DisplaySmall,qh as Divider,Wu as Drawer,Du as DrawerClose,Fu as DrawerContent,Pu as DrawerHeader,qu as DrawerShowcase,Ju as DropZone,Md as Dropdown,vn as DynoStack,Qu as DynoTreeView,El as EmailTextField,Hl as ErrorToggleButtonGroup,Ca as Eyebrow,za as EyebrowLarge,Ta as EyebrowMedium,wa as EyebrowSmall,jn as Fab,Jn as FabShowcase,Cp as Footer,Op as FooterShowcase,bu as FormDialog,vt as Ghost,Ec as Gradient,_s as Grid,zn as GridStack,Xt as H1,Yt as H2,qt as H3,Zt as H4,Jt as H5,Kt as H6,yn as HStack,$t as Heading,Na as Icon,fn as IconBadge,Nn as IconBadgeShowcase,hn as IconShowcase,Pl as InfoToggleButtonGroup,In as InsetStack,ya as Label,ba as LabelExtraSmall,Sa as LabelLarge,va as LabelSmall,ka as Legal,Ba as LegalSemibold,Gu as LightTreeView,ff as LineChart,Oc as LinearGradient,Bh as LinearProgress,Ah as LinearProgressShowcase,Os as Link,ep as List,_h as ListItem,$h as ListItemDecorator,fm as MainLayout,Od as Menu,Ed as MenuButton,Qd as MenuDivider,Nd as MenuItem,Xd as MenuShowcase,Vc as MeshCardGradient,Qc as MeshGradient,up as MobileAppBar,Tu as Modal,Wl as NeutralToggleButtonGroup,ml as NumberField,vl as NumberFieldShowcase,Fa as NumberLarge,Pa as NumberMedium,Da as NumberSmall,Ql as NumberTextField,iu as OmniDesignProvider,vn as OmniStack,Qu as OmniTreeView,Ia as Overline,Wa as OverlineLarge,Ra as OverlineMedium,Aa as OverlineSmall,zd as Pagination,Dd as PaginationShowcase,jc as Paper,Ol as PasswordTextField,Vl as PhoneTextField,gf as PieChart,Gc as Popover,Al as PrimaryToggleButtonGroup,td as RATIO_NAMES,Nc as RadialGradient,hs as Radio,ps as RadioGroup,ms as RadioInput,rl as Rail,nl as RailShowcase,vs as RangeSlider,ks as Rating,ks as RatingInput,nd as Ratio,pd as RatioShowcase,Cn as ResponsiveStack,Rn as ScrollStack,ws as SearchField,Is as SearchFieldShowcase,Nl as SearchTextField,Il as SecondaryToggleButtonGroup,ed as Section,rd as SectionShowcase,Ji as Select,$l as SelectShowcase,Hn as SelectableCard,jm as SettingsPanel,mm as Sidebar,bs as Slider,bs as SliderInput,nh as Snackbar,hh as SnackbarShowcase,ju as SolidTreeView,Bn as SpaceBetweenStack,qo as Spacing,zc as SpeedDial,Pc as SpeedDialShowcase,Tn as Stack,An as StackDivider,Us as StackShowcase,vf as StateMessage,yc as Step,vc as Stepper,Tc as StepperShowcase,ea as Subtitle,aa as Subtitle1,ia as Subtitle2,_t as SubtitleLarge,ta as SubtitleMedium,ra as SubtitleSmall,Fl as SuccessToggleButtonGroup,lu as Surfaced,rn as Switch,rn as SwitchInput,oo as Tab,io as TabList,no as TabPanel,ap as Table,ao as Tabs,vd as TabsShowcase,Rl as TertiaryToggleButtonGroup,Gl as TextArea,Ml as TextField,Ul as TextFieldGroup,Xi as TextInput,nu as ThemedZone,Sl as ToggleButton,Tl as ToggleButtonGroup,sl as Toolbar,hl as ToolbarShowcase,lp as Tooltip,Am as TreeBranch,Om as TreeViewShowcase,Qt as Typography,jl as URLTextField,Sn as VStack,Ll as WarningToggleButtonGroup,wn as WrapStack,tf as chartGeometry,yf as default,bt as ghostBlockSx,xt as useGhost,ou as useOmniDesign,bc as useStepperContext,to as useTabsContext};
15
15
  //# sourceMappingURL=index.esm.js.map