@gradeui/ui 1.0.0 → 1.2.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.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- 'use strict';var zod=require('zod'),w=require('react'),Be=require('@radix-ui/react-accordion'),lucideReact=require('lucide-react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),classVarianceAuthority=require('class-variance-authority'),reactSlot=require('@radix-ui/react-slot'),nt=require('@radix-ui/react-avatar'),reactDayPicker=require('react-day-picker'),md=require('embla-carousel-react'),mo=require('@radix-ui/react-checkbox'),dateFns=require('date-fns'),Ue=require('@radix-ui/react-popover'),X=require('@radix-ui/react-dialog'),A=require('@radix-ui/react-dropdown-menu'),Lr=require('@radix-ui/react-label'),fo=require('@radix-ui/react-progress'),cmdk=require('cmdk'),zr=require('@radix-ui/react-separator'),ht=require('@radix-ui/react-radio-group'),Kt=require('react-resizable-panels'),Ge=require('@radix-ui/react-scroll-area'),F=require('@radix-ui/react-select'),it=require('@radix-ui/react-slider'),core=require('@dnd-kit/core'),sortable=require('@dnd-kit/sortable'),utilities=require('@dnd-kit/utilities'),wo=require('@radix-ui/react-switch'),qe=require('@radix-ui/react-tabs'),Ke=require('@radix-ui/react-tooltip'),qr=require('@radix-ui/react-toggle'),qt=require('@radix-ui/react-toggle-group'),reactDom=require('react-dom'),Z=require('three'),postprocessing=require('postprocessing'),Rm=require('lenis');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var w__namespace=/*#__PURE__*/_interopNamespace(w);var Be__namespace=/*#__PURE__*/_interopNamespace(Be);var nt__namespace=/*#__PURE__*/_interopNamespace(nt);var md__default=/*#__PURE__*/_interopDefault(md);var mo__namespace=/*#__PURE__*/_interopNamespace(mo);var Ue__namespace=/*#__PURE__*/_interopNamespace(Ue);var X__namespace=/*#__PURE__*/_interopNamespace(X);var A__namespace=/*#__PURE__*/_interopNamespace(A);var Lr__namespace=/*#__PURE__*/_interopNamespace(Lr);var fo__namespace=/*#__PURE__*/_interopNamespace(fo);var zr__namespace=/*#__PURE__*/_interopNamespace(zr);var ht__namespace=/*#__PURE__*/_interopNamespace(ht);var Kt__namespace=/*#__PURE__*/_interopNamespace(Kt);var Ge__namespace=/*#__PURE__*/_interopNamespace(Ge);var F__namespace=/*#__PURE__*/_interopNamespace(F);var it__namespace=/*#__PURE__*/_interopNamespace(it);var wo__namespace=/*#__PURE__*/_interopNamespace(wo);var qe__namespace=/*#__PURE__*/_interopNamespace(qe);var Ke__namespace=/*#__PURE__*/_interopNamespace(Ke);var qr__namespace=/*#__PURE__*/_interopNamespace(qr);var qt__namespace=/*#__PURE__*/_interopNamespace(qt);var Z__namespace=/*#__PURE__*/_interopNamespace(Z);var Rm__default=/*#__PURE__*/_interopDefault(Rm);var Tl=Object.defineProperty;var Ao=(e,t)=>()=>(e&&(t=e(e=0)),t);var vr=(e,t)=>{for(var o in t)Tl(e,o,{get:t[o],enumerable:true});};var mr,Qs,el=Ao(()=>{mr="2pMfyvhpuKonkf7h8HzH",Qs=()=>mr!=="YOUR_KEY_HERE"&&mr.length>0;});var rl={};vr(rl,{createMaplibreAdapter:()=>hp});function fp(){if(typeof document>"u"||document.getElementById(ol))return;let e=document.createElement("link");e.id=ol,e.rel="stylesheet",e.href=gp,document.head.appendChild(e);}var up,tl,gp,ol,hp,al=Ao(()=>{el();up={light:"dataviz-light",dark:"dataviz-dark",satellite:"satellite"},tl=(e,t)=>`https://api.maptiler.com/maps/${up[e]}/style.json?key=${encodeURIComponent(t)}`,gp="https://unpkg.com/maplibre-gl@4/dist/maplibre-gl.css",ol="gds-maplibre-gl-css";hp=async(e,t,o)=>{fp();let r;try{r=await import('maplibre-gl'),r.default&&(r=r.default);}catch(c){throw o.onError({code:"sdk-missing",message:'@gradeui/ui Map: `maplibre-gl` is not installed. Run `pnpm add maplibre-gl` (or your package manager\'s equivalent) to use provider="maplibre".',cause:c}),c}let i=t.tilerKey??mr;process.env.NODE_ENV!=="production"&&!t.tilerKey&&!Qs()&&console.warn("@gradeui/ui Map: no `tilerKey` prop and the bundled MapTiler demo key is unset. Tile requests will 403. Set `tilerKey` or paste a key into demo-config.ts.");let a=t.styleUrl??tl(t.appearance,i),d=new r.Map({container:e,style:a,center:t.center,zoom:t.zoom,interactive:t.interactive,attributionControl:{compact:true}});t.bounds&&d.fitBounds([t.bounds[0],t.bounds[1]],{animate:false}),await new Promise(c=>{d.once("load",()=>c());}),o.onLoad(),d.on("error",c=>{let l=String(c?.error?.message??c?.message??"MapLibre error"),p=l.toLowerCase().includes("style");o.onError({code:p?"style-load-failed":"tile-load-failed",message:l,cause:c?.error??c});});let m=new globalThis.Map;return {setCenter:c=>d.setCenter(c),setZoom:c=>d.setZoom(c),setBounds:(c,l)=>d.fitBounds([c,l],{animate:false}),setAppearance:c=>{let l=t.styleUrl??tl(c,i);d.setStyle(l,{diff:false});},setInteractive:c=>{let l=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"];for(let p of l){let g=d[p];g&&(c?g.enable():g.disable());}},flyTo:(c,l)=>d.flyTo({center:c,zoom:l?.zoom,duration:l?.durationMs??800}),panTo:(c,l)=>d.panTo(c,{duration:l?.durationMs??600}),fitBounds:(c,l)=>{if(c.length===0)return;let p=1/0,g=1/0,u=-1/0,b=-1/0;for(let[f,h]of c)f<p&&(p=f),h<g&&(g=h),f>u&&(u=f),h>b&&(b=h);d.fitBounds([[p,g],[u,b]],{padding:l?.paddingPx??40,duration:l?.durationMs??800});},getCenter:()=>{let c=d.getCenter();return [c.lng,c.lat]},getZoom:()=>d.getZoom(),getBounds:()=>{let c=d.getBounds();return [[c.getWest(),c.getSouth()],[c.getEast(),c.getNorth()]]},addMarker:(c,l,p)=>{let g=document.createElement("div");g.dataset.gdsPart="map-marker",g.dataset.gdsState="idle",g.style.cursor="pointer",g.addEventListener("mouseenter",()=>o.onMarkerHover(c)),g.addEventListener("mouseleave",()=>o.onMarkerHover(null)),g.addEventListener("click",f=>{o.onMarkerClick(c,b.coords,f);});let u=new r.Marker({element:g,anchor:p==="center"?"center":"bottom"}).setLngLat(l).addTo(d),b={element:g,coords:l,setHovered:f=>{g.dataset.gdsState=f?"hovered":"idle",g.style.zIndex=f?"10":"1";},setPosition:f=>{b.coords=f,u.setLngLat(f);},remove:()=>{u.remove(),m.delete(c);}};return m.set(c,{marker:u,handle:b}),b},destroy:()=>{m.forEach(({marker:c})=>c.remove()),m.clear(),d.remove();},instance:d}};});var sl={};vr(sl,{createMapboxAdapter:()=>yp});function vp(){if(typeof document>"u"||document.getElementById(il))return;let e=document.createElement("link");e.id=il,e.rel="stylesheet",e.href=bp,document.head.appendChild(e);}var nl,bp,il,yp,ll=Ao(()=>{nl={light:"mapbox://styles/mapbox/light-v11",dark:"mapbox://styles/mapbox/dark-v11",satellite:"mapbox://styles/mapbox/satellite-streets-v12"},bp="https://unpkg.com/mapbox-gl@3/dist/mapbox-gl.css",il="gds-mapbox-gl-css";yp=async(e,t,o)=>{if(!t.accessToken)throw o.onError({code:"api-key-missing",message:'@gradeui/ui Map: provider="mapbox" requires an `accessToken` prop.'}),new Error("mapbox accessToken missing");vp();let r;try{r=await import('mapbox-gl'),r.default&&(r=r.default);}catch(s){throw o.onError({code:"sdk-missing",message:'@gradeui/ui Map: `mapbox-gl` is not installed. Run `pnpm add mapbox-gl` to use provider="mapbox".',cause:s}),s}r.accessToken=t.accessToken;let i=t.styleUrl??nl[t.appearance],a=new r.Map({container:e,style:i,center:t.center,zoom:t.zoom,interactive:t.interactive});t.bounds&&a.fitBounds([t.bounds[0],t.bounds[1]],{animate:false}),await new Promise(s=>{a.once("load",()=>s());}),o.onLoad(),a.on("error",s=>{let c=String(s?.error?.message??s?.message??"Mapbox error"),l=c.toLowerCase().includes("style");o.onError({code:l?"style-load-failed":"tile-load-failed",message:c,cause:s?.error??s});});let d=new globalThis.Map;return {setCenter:s=>a.setCenter(s),setZoom:s=>a.setZoom(s),setBounds:(s,c)=>a.fitBounds([s,c],{animate:false}),setAppearance:s=>{let c=t.styleUrl??nl[s];a.setStyle(c,{diff:false});},setInteractive:s=>{let c=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"];for(let l of c){let p=a[l];p&&(s?p.enable():p.disable());}},flyTo:(s,c)=>a.flyTo({center:s,zoom:c?.zoom,duration:c?.durationMs??800}),panTo:(s,c)=>a.panTo(s,{duration:c?.durationMs??600}),fitBounds:(s,c)=>{if(s.length===0)return;let l=1/0,p=1/0,g=-1/0,u=-1/0;for(let[b,f]of s)b<l&&(l=b),f<p&&(p=f),b>g&&(g=b),f>u&&(u=f);a.fitBounds([[l,p],[g,u]],{padding:c?.paddingPx??40,duration:c?.durationMs??800});},getCenter:()=>{let s=a.getCenter();return [s.lng,s.lat]},getZoom:()=>a.getZoom(),getBounds:()=>{let s=a.getBounds();return [[s.getWest(),s.getSouth()],[s.getEast(),s.getNorth()]]},addMarker:(s,c,l)=>{let p=document.createElement("div");p.dataset.gdsPart="map-marker",p.dataset.gdsState="idle",p.style.cursor="pointer",p.addEventListener("mouseenter",()=>o.onMarkerHover(s)),p.addEventListener("mouseleave",()=>o.onMarkerHover(null)),p.addEventListener("click",b=>{o.onMarkerClick(s,u.coords,b);});let g=new r.Marker({element:p,anchor:l==="center"?"center":"bottom"}).setLngLat(c).addTo(a),u={element:p,coords:c,setHovered:b=>{p.dataset.gdsState=b?"hovered":"idle",p.style.zIndex=b?"10":"1";},setPosition:b=>{u.coords=b,g.setLngLat(b);},remove:()=>{g.remove(),d.delete(s);}};return d.set(s,{marker:g,handle:u}),u},destroy:()=>{d.forEach(({marker:s})=>s.remove()),d.clear(),a.remove();},instance:a}};});var cl={};vr(cl,{createGoogleAdapter:()=>Rp});var wp,xp,dl,Rp,pl=Ao(()=>{wp=[{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"transit",stylers:[{visibility:"simplified"}]}],xp=[{elementType:"geometry",stylers:[{color:"#1a1a1a"}]},{elementType:"labels.text.stroke",stylers:[{color:"#1a1a1a"}]},{elementType:"labels.text.fill",stylers:[{color:"#9ca3af"}]},{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#262626"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca3af"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#0f172a"}]},{featureType:"transit",stylers:[{visibility:"simplified"},{color:"#3a3a3a"}]}],dl=e=>e==="dark"?xp:wp,Rp=async(e,t,o)=>{if(!t.apiKey)throw o.onError({code:"api-key-missing",message:'@gradeui/ui Map: provider="google" requires an `apiKey` prop.'}),new Error("google apiKey missing");let r;try{let l=await import('@googlemaps/js-api-loader');r=l.Loader??l.default?.Loader;}catch(l){throw o.onError({code:"sdk-missing",message:'@gradeui/ui Map: `@googlemaps/js-api-loader` is not installed. Run `pnpm add @googlemaps/js-api-loader` to use provider="google".',cause:l}),l}let i=new r({apiKey:t.apiKey,version:"weekly",libraries:["maps","marker"]}),a;try{a=await i.load();}catch(l){throw o.onError({code:"provider-init-failed",message:"@gradeui/ui Map: Google Maps loader failed.",cause:l}),l}let d=t.appearance==="satellite",m=new a.maps.Map(e,{center:{lat:t.center[1],lng:t.center[0]},zoom:t.zoom,mapTypeId:d?a.maps.MapTypeId.HYBRID:a.maps.MapTypeId.ROADMAP,mapId:t.mapId,styles:d?void 0:dl(t.appearance==="dark"?"dark":"light"),disableDefaultUI:!t.interactive,gestureHandling:t.interactive?"auto":"none",keyboardShortcuts:t.interactive});if(t.bounds){let l=new a.maps.LatLngBounds({lat:t.bounds[0][1],lng:t.bounds[0][0]},{lat:t.bounds[1][1],lng:t.bounds[1][0]});m.fitBounds(l);}await new Promise(l=>{a.maps.event.addListenerOnce(m,"idle",()=>l());}),o.onLoad();let s=new globalThis.Map;return {setCenter:l=>m.setCenter({lat:l[1],lng:l[0]}),setZoom:l=>m.setZoom(l),setBounds:(l,p)=>{let g=new a.maps.LatLngBounds({lat:l[1],lng:l[0]},{lat:p[1],lng:p[0]});m.fitBounds(g);},setAppearance:l=>{l==="satellite"?(m.setMapTypeId(a.maps.MapTypeId.HYBRID),m.setOptions({styles:void 0})):(m.setMapTypeId(a.maps.MapTypeId.ROADMAP),m.setOptions({styles:dl(l)}));},setInteractive:l=>{m.setOptions({disableDefaultUI:!l,gestureHandling:l?"auto":"none",keyboardShortcuts:l});},flyTo:(l,p)=>{m.panTo({lat:l[1],lng:l[0]}),p?.zoom!=null&&m.setZoom(p.zoom);},panTo:l=>m.panTo({lat:l[1],lng:l[0]}),fitBounds:(l,p)=>{if(l.length===0)return;let g=new a.maps.LatLngBounds;for(let[u,b]of l)g.extend({lat:b,lng:u});m.fitBounds(g,p?.paddingPx??40);},getCenter:()=>{let l=m.getCenter();return l?[l.lng(),l.lat()]:[0,0]},getZoom:()=>m.getZoom()??0,getBounds:()=>{let l=m.getBounds();if(!l)return [[0,0],[0,0]];let p=l.getSouthWest(),g=l.getNorthEast();return [[p.lng(),p.lat()],[g.lng(),g.lat()]]},addMarker:(l,p,g)=>{let u=document.createElement("div");u.dataset.gdsPart="map-marker",u.dataset.gdsState="idle",u.style.cursor="pointer",g==="center"&&(u.style.transform="translateY(50%)"),u.addEventListener("mouseenter",()=>o.onMarkerHover(l)),u.addEventListener("mouseleave",()=>o.onMarkerHover(null)),u.addEventListener("click",h=>{o.onMarkerClick(l,f.coords,h);});let b=new a.maps.marker.AdvancedMarkerElement({map:m,position:{lat:p[1],lng:p[0]},content:u}),f={element:u,coords:p,setHovered:h=>{u.dataset.gdsState=h?"hovered":"idle",b.zIndex=h?10:1;},setPosition:h=>{f.coords=h,b.position={lat:h[1],lng:h[0]};},remove:()=>{b.map=null,s.delete(l);}};return s.set(l,{marker:b,handle:f}),f},destroy:()=>{s.forEach(({marker:l})=>{l.map=null;}),s.clear();},instance:m}};});var Ca={name:"Accordion",description:`Long-form content that would overwhelm if shown all at once \u2014 FAQs, settings groups, "what's included" sections, nested help. For tab-style peer views with one always visible, reach for Tabs. For a single show/hide reveal use Collapsible.`,import:"@gradeui/ui",aliases:["accordion","faq","expand","collapse list","disclosure list","disclosure group","outline group","expandable list","sectionlist"],subcomponents:["AccordionItem","AccordionTrigger","AccordionContent"],composesWith:["Card (as a faq inside a card body)","Section primitives"],props:{type:{schema:zod.z.enum(["single","multiple"]),design:"knob",description:"single keeps one open at a time, multiple lets several be open at once"},collapsible:{schema:zod.z.boolean().optional(),design:"knob",description:'only valid with type="single"; allows the open item to be toggled shut'},defaultValue:{schema:zod.z.string().optional(),design:"content",description:"initial open item(s)"},value:{schema:zod.z.string().optional(),design:"content",description:"controlled"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},children:{schema:zod.z.unknown(),design:"plumbing",description:"the row label users click to expand"}}};var ka={name:"AiChat",description:'A flexible chat block \u2014 header + scrollable message list + composer. Out of the box it looks like a polished "AI panel"; under it, every region is a slot so hosts can compose richer chat surfaces (e.g. Studio\'s left column with selection chip + settings panel above the composer, an error banner inline, per-message usage / refs / actions). Per-turn token usage, refs, and actions are optional and gated by `showUsage` / `showRefs` / `showActions` \u2014 leave them off for product-facing chats, turn them on for developer-facing ones where transparency matters. Composes with [[AIChatComposer]] (rendered internally; can be slotted in with custom props via `composerSlot`).',import:"@gradeui/ui",aliases:["ai chat","chat panel","chat block","llm chat","assistant panel","copilot chat","ai assistant"],composesWith:["Card (host in a sidebar panel)","Sheet (mobile drawer)","Stack (place above other content)","AIChatComposer (internal composer; slot to override)"],props:{messages:{schema:zod.z.unknown().optional(),design:"plumbing",description:'`{ id, role: "user" | "assistant", content, timestamp, thinking?, steps?, usage?, refs?, actions?, duration? }`; defaults to empty'},onSendMessage:{schema:zod.z.unknown().optional(),design:"event",description:"fires when the user submits via the default composer; ignored if `composerSlot` is set"},isLoading:{schema:zod.z.boolean().optional(),design:"knob",description:"shows a typing indicator at the bottom of the message list"},placeholder:{schema:zod.z.string().optional(),design:"content",description:"composer placeholder text (ignored if `composerSlot` is set)"},title:{schema:zod.z.string().optional(),design:"plumbing",description:'header title; defaults to "AI Assistant"'},titleIcon:{schema:zod.z.unknown().optional(),design:"plumbing",description:"optional icon rendered before the title (e.g. `<Sparkles />`)"},headerTokens:{schema:zod.z.number().optional(),design:"knob",description:'optional session-level token total shown on the right of the header; rendered as "N tokens" with a small gauge icon when set'},headerEnd:{schema:zod.z.unknown().optional(),design:"plumbing",description:"optional arbitrary content appended after `headerTokens` on the right of the header"},showUsage:{schema:zod.z.boolean().optional(),design:"knob",description:"show the per-turn `usage` strip below the assistant bubble; default false"},showRefs:{schema:zod.z.boolean().optional(),design:"knob",description:"show the per-turn `refs` strip below the assistant bubble; default false"},showActions:{schema:zod.z.boolean().optional(),design:"knob",description:"render per-turn `actions` chips when a message has them; default true"},showDuration:{schema:zod.z.boolean().optional(),design:"knob",description:'render the per-turn wall-clock duration ("2.3s") below the assistant bubble when a message carries `duration`; default false'},showThinking:{schema:zod.z.boolean().optional(),design:"knob",description:'render the per-turn reasoning ("Thoughts") disclosure above the assistant prose when a message carries `thinking`; collapsed by default, click to expand; default false'},showSteps:{schema:zod.z.boolean().optional(),design:"knob",description:'render the per-turn step timeline above the assistant prose when a message carries `steps`; collapsed view shows the current running step (or "N steps completed"), click to expand the vertical timeline with status glyphs; default false'},thinkingPhrase:{schema:zod.z.string().optional(),design:"content",description:'override the "Thinking" label in the loading indicator'},suggestedPrompts:{schema:zod.z.unknown().optional(),design:"plumbing",description:"empty-state quick prompts (ignored if `emptyStateSlot` is set)"},emptyStateSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:"replaces the default empty state entirely"},errorSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:"rendered after the messages list (typically an error banner)"},composerAboveSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:"rendered between the messages and the composer (selection chip, settings panel)"},composerBelowSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:"rendered below the composer (disclaimer, char counter)"},composerSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:"full override of the composer; when provided, `onSendMessage` + `placeholder` are unused"},bare:{schema:zod.z.boolean().optional(),design:"knob",description:"strip the outer card chrome (background, border, rounded corners) so the chat takes the surface of its container; default false (keeps the canned card look)"},assistantBubble:{schema:zod.z.boolean().optional(),design:"knob",description:"whether assistant messages render with a bubble (background + border + padding + rounded corners); default true. Set false for a Claude.ai-style chromeless transcript where assistant text sits on the surface and only user turns wear a bubble."},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var Ta={name:"AiChatComposer",description:"The reusable \"input card\" for any chat surface \u2014 auto-growing textarea, image attachments via paperclip and clipboard paste, attachment chips with previews, Send/Stop toggle, controlled value. Drop in below any messages list. Use this when you want the input affordances of `<AIChat>` but you're rendering your own messages list / scrollarea / header (e.g. Studio's left-column chat, where SelectionChip and SettingsPanel sit between messages and composer). For the full canned chat block, use `<AIChat>` instead.",import:"@gradeui/ui",aliases:["chat composer","chat input","prompt composer","message input"],composesWith:["AIChat (uses this internally)","Card (host above)","ScrollArea (place messages above)"],props:{value:{schema:zod.z.string(),design:"content",description:"controlled textarea value"},onChange:{schema:zod.z.unknown(),design:"event",description:"fires for every textarea change"},onSend:{schema:zod.z.unknown(),design:"event",description:"fires when the user submits (Enter or click Send); composer validates that text or attachments exist before firing"},isLoading:{schema:zod.z.boolean().optional(),design:"knob",description:"disables the textarea + paperclip and swaps Send for Stop"},onStop:{schema:zod.z.unknown().optional(),design:"event",description:"fires when the user clicks Stop; without this, Stop renders disabled"},placeholder:{schema:zod.z.string().optional(),design:"content"},maxLength:{schema:zod.z.number().optional(),design:"knob",description:"hard cap passed to the underlying `<textarea>`"},showHint:{schema:zod.z.boolean().optional(),design:"knob",description:'show the "Press Enter\u2026 \xB7 Paste images" hint below the card; default true, set false when the host renders its own footer'},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var Pa={name:"AppShell",description:`The top-level page scaffold for any app-like or marketing layout. Reach for AppShell
2
+ 'use strict';var zod=require('zod'),S=require('react'),nt=require('@radix-ui/react-accordion'),lucideReact=require('lucide-react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),classVarianceAuthority=require('class-variance-authority'),reactSlot=require('@radix-ui/react-slot'),Et=require('@radix-ui/react-avatar'),reactDayPicker=require('react-day-picker'),Pc=require('embla-carousel-react'),Yo=require('@radix-ui/react-checkbox'),prismReactRenderer=require('prism-react-renderer'),react=require('motion/react'),LexicalComposer=require('@lexical/react/LexicalComposer'),LexicalRichTextPlugin=require('@lexical/react/LexicalRichTextPlugin'),LexicalContentEditable=require('@lexical/react/LexicalContentEditable'),LexicalErrorBoundary=require('@lexical/react/LexicalErrorBoundary'),LexicalHistoryPlugin=require('@lexical/react/LexicalHistoryPlugin'),LexicalOnChangePlugin=require('@lexical/react/LexicalOnChangePlugin'),LexicalListPlugin=require('@lexical/react/LexicalListPlugin'),LexicalLinkPlugin=require('@lexical/react/LexicalLinkPlugin'),LexicalComposerContext=require('@lexical/react/LexicalComposerContext'),richText=require('@lexical/rich-text'),list=require('@lexical/list'),link=require('@lexical/link'),code=require('@lexical/code'),selection=require('@lexical/selection'),utils=require('@lexical/utils'),lexical=require('lexical'),lexicalBeautifulMentions=require('lexical-beautiful-mentions'),dateFns=require('date-fns'),ft=require('@radix-ui/react-popover'),ye=require('@radix-ui/react-dialog'),U=require('@radix-ui/react-dropdown-menu'),Sa=require('@radix-ui/react-label'),er=require('@radix-ui/react-progress'),cmdk=require('cmdk'),Na=require('@radix-ui/react-separator'),Kt=require('@radix-ui/react-radio-group'),Po=require('react-resizable-panels'),it=require('@radix-ui/react-scroll-area'),K=require('@radix-ui/react-select'),It=require('@radix-ui/react-slider'),core=require('@dnd-kit/core'),sortable=require('@dnd-kit/sortable'),utilities=require('@dnd-kit/utilities'),nr=require('@radix-ui/react-switch'),vt=require('@radix-ui/react-tabs'),bt=require('@radix-ui/react-tooltip'),Va=require('@radix-ui/react-toggle'),Mo=require('@radix-ui/react-toggle-group'),reactDom=require('react-dom'),fe=require('three'),postprocessing=require('postprocessing'),Xg=require('lenis');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var S__namespace=/*#__PURE__*/_interopNamespace(S);var nt__namespace=/*#__PURE__*/_interopNamespace(nt);var Et__namespace=/*#__PURE__*/_interopNamespace(Et);var Pc__default=/*#__PURE__*/_interopDefault(Pc);var Yo__namespace=/*#__PURE__*/_interopNamespace(Yo);var ft__namespace=/*#__PURE__*/_interopNamespace(ft);var ye__namespace=/*#__PURE__*/_interopNamespace(ye);var U__namespace=/*#__PURE__*/_interopNamespace(U);var Sa__namespace=/*#__PURE__*/_interopNamespace(Sa);var er__namespace=/*#__PURE__*/_interopNamespace(er);var Na__namespace=/*#__PURE__*/_interopNamespace(Na);var Kt__namespace=/*#__PURE__*/_interopNamespace(Kt);var Po__namespace=/*#__PURE__*/_interopNamespace(Po);var it__namespace=/*#__PURE__*/_interopNamespace(it);var K__namespace=/*#__PURE__*/_interopNamespace(K);var It__namespace=/*#__PURE__*/_interopNamespace(It);var nr__namespace=/*#__PURE__*/_interopNamespace(nr);var vt__namespace=/*#__PURE__*/_interopNamespace(vt);var bt__namespace=/*#__PURE__*/_interopNamespace(bt);var Va__namespace=/*#__PURE__*/_interopNamespace(Va);var Mo__namespace=/*#__PURE__*/_interopNamespace(Mo);var fe__namespace=/*#__PURE__*/_interopNamespace(fe);var Xg__default=/*#__PURE__*/_interopDefault(Xg);var Fd=Object.defineProperty;var vr=(e,t)=>()=>(e&&(t=e(e=0)),t);var ca=(e,t)=>{for(var o in t)Fd(e,o,{get:t[o],enumerable:true});};var oa,sd,ld=vr(()=>{oa="2pMfyvhpuKonkf7h8HzH",sd=()=>oa!=="YOUR_KEY_HERE"&&oa.length>0;});var pd={};ca(pd,{createMaplibreAdapter:()=>ju});function Uu(){if(typeof document>"u"||document.getElementById(cd))return;let e=document.createElement("link");e.id=cd,e.rel="stylesheet",e.href=Wu,document.head.appendChild(e);}var Gu,dd,Wu,cd,ju,md=vr(()=>{ld();Gu={light:"dataviz-light",dark:"dataviz-dark",satellite:"satellite"},dd=(e,t)=>`https://api.maptiler.com/maps/${Gu[e]}/style.json?key=${encodeURIComponent(t)}`,Wu="https://unpkg.com/maplibre-gl@4/dist/maplibre-gl.css",cd="gds-maplibre-gl-css";ju=async(e,t,o)=>{Uu();let r;try{r=await import('maplibre-gl'),r.default&&(r=r.default);}catch(c){throw o.onError({code:"sdk-missing",message:'@gradeui/ui Map: `maplibre-gl` is not installed. Run `pnpm add maplibre-gl` (or your package manager\'s equivalent) to use provider="maplibre".',cause:c}),c}let n=t.tilerKey??oa;process.env.NODE_ENV!=="production"&&!t.tilerKey&&!sd()&&console.warn("@gradeui/ui Map: no `tilerKey` prop and the bundled MapTiler demo key is unset. Tile requests will 403. Set `tilerKey` or paste a key into demo-config.ts.");let a=t.styleUrl??dd(t.appearance,n),l=new r.Map({container:e,style:a,center:t.center,zoom:t.zoom,interactive:t.interactive,attributionControl:{compact:true}});t.bounds&&l.fitBounds([t.bounds[0],t.bounds[1]],{animate:false}),await new Promise(c=>{l.once("load",()=>c());}),o.onLoad(),l.on("error",c=>{let d=String(c?.error?.message??c?.message??"MapLibre error"),m=d.toLowerCase().includes("style");o.onError({code:m?"style-load-failed":"tile-load-failed",message:d,cause:c?.error??c});});let p=new globalThis.Map;return {setCenter:c=>l.setCenter(c),setZoom:c=>l.setZoom(c),setBounds:(c,d)=>l.fitBounds([c,d],{animate:false}),setAppearance:c=>{let d=t.styleUrl??dd(c,n);l.setStyle(d,{diff:false});},setInteractive:c=>{let d=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"];for(let m of d){let g=l[m];g&&(c?g.enable():g.disable());}},flyTo:(c,d)=>l.flyTo({center:c,zoom:d?.zoom,duration:d?.durationMs??800}),panTo:(c,d)=>l.panTo(c,{duration:d?.durationMs??600}),fitBounds:(c,d)=>{if(c.length===0)return;let m=1/0,g=1/0,u=-1/0,b=-1/0;for(let[h,f]of c)h<m&&(m=h),f<g&&(g=f),h>u&&(u=h),f>b&&(b=f);l.fitBounds([[m,g],[u,b]],{padding:d?.paddingPx??40,duration:d?.durationMs??800});},getCenter:()=>{let c=l.getCenter();return [c.lng,c.lat]},getZoom:()=>l.getZoom(),getBounds:()=>{let c=l.getBounds();return [[c.getWest(),c.getSouth()],[c.getEast(),c.getNorth()]]},addMarker:(c,d,m)=>{let g=document.createElement("div");g.dataset.gdsPart="map-marker",g.dataset.gdsState="idle",g.style.cursor="pointer",g.addEventListener("mouseenter",()=>o.onMarkerHover(c)),g.addEventListener("mouseleave",()=>o.onMarkerHover(null)),g.addEventListener("click",h=>{o.onMarkerClick(c,b.coords,h);});let u=new r.Marker({element:g,anchor:m==="center"?"center":"bottom"}).setLngLat(d).addTo(l),b={element:g,coords:d,setHovered:h=>{g.dataset.gdsState=h?"hovered":"idle",g.style.zIndex=h?"10":"1";},setPosition:h=>{b.coords=h,u.setLngLat(h);},remove:()=>{u.remove(),p.delete(c);}};return p.set(c,{marker:u,handle:b}),b},destroy:()=>{p.forEach(({marker:c})=>c.remove()),p.clear(),l.remove();},instance:l}};});var fd={};ca(fd,{createMapboxAdapter:()=>qu});function Ku(){if(typeof document>"u"||document.getElementById(gd))return;let e=document.createElement("link");e.id=gd,e.rel="stylesheet",e.href=$u,document.head.appendChild(e);}var ud,$u,gd,qu,hd=vr(()=>{ud={light:"mapbox://styles/mapbox/light-v11",dark:"mapbox://styles/mapbox/dark-v11",satellite:"mapbox://styles/mapbox/satellite-streets-v12"},$u="https://unpkg.com/mapbox-gl@3/dist/mapbox-gl.css",gd="gds-mapbox-gl-css";qu=async(e,t,o)=>{if(!t.accessToken)throw o.onError({code:"api-key-missing",message:'@gradeui/ui Map: provider="mapbox" requires an `accessToken` prop.'}),new Error("mapbox accessToken missing");Ku();let r;try{r=await import('mapbox-gl'),r.default&&(r=r.default);}catch(i){throw o.onError({code:"sdk-missing",message:'@gradeui/ui Map: `mapbox-gl` is not installed. Run `pnpm add mapbox-gl` to use provider="mapbox".',cause:i}),i}r.accessToken=t.accessToken;let n=t.styleUrl??ud[t.appearance],a=new r.Map({container:e,style:n,center:t.center,zoom:t.zoom,interactive:t.interactive});t.bounds&&a.fitBounds([t.bounds[0],t.bounds[1]],{animate:false}),await new Promise(i=>{a.once("load",()=>i());}),o.onLoad(),a.on("error",i=>{let c=String(i?.error?.message??i?.message??"Mapbox error"),d=c.toLowerCase().includes("style");o.onError({code:d?"style-load-failed":"tile-load-failed",message:c,cause:i?.error??i});});let l=new globalThis.Map;return {setCenter:i=>a.setCenter(i),setZoom:i=>a.setZoom(i),setBounds:(i,c)=>a.fitBounds([i,c],{animate:false}),setAppearance:i=>{let c=t.styleUrl??ud[i];a.setStyle(c,{diff:false});},setInteractive:i=>{let c=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"];for(let d of c){let m=a[d];m&&(i?m.enable():m.disable());}},flyTo:(i,c)=>a.flyTo({center:i,zoom:c?.zoom,duration:c?.durationMs??800}),panTo:(i,c)=>a.panTo(i,{duration:c?.durationMs??600}),fitBounds:(i,c)=>{if(i.length===0)return;let d=1/0,m=1/0,g=-1/0,u=-1/0;for(let[b,h]of i)b<d&&(d=b),h<m&&(m=h),b>g&&(g=b),h>u&&(u=h);a.fitBounds([[d,m],[g,u]],{padding:c?.paddingPx??40,duration:c?.durationMs??800});},getCenter:()=>{let i=a.getCenter();return [i.lng,i.lat]},getZoom:()=>a.getZoom(),getBounds:()=>{let i=a.getBounds();return [[i.getWest(),i.getSouth()],[i.getEast(),i.getNorth()]]},addMarker:(i,c,d)=>{let m=document.createElement("div");m.dataset.gdsPart="map-marker",m.dataset.gdsState="idle",m.style.cursor="pointer",m.addEventListener("mouseenter",()=>o.onMarkerHover(i)),m.addEventListener("mouseleave",()=>o.onMarkerHover(null)),m.addEventListener("click",b=>{o.onMarkerClick(i,u.coords,b);});let g=new r.Marker({element:m,anchor:d==="center"?"center":"bottom"}).setLngLat(c).addTo(a),u={element:m,coords:c,setHovered:b=>{m.dataset.gdsState=b?"hovered":"idle",m.style.zIndex=b?"10":"1";},setPosition:b=>{u.coords=b,g.setLngLat(b);},remove:()=>{g.remove(),l.delete(i);}};return l.set(i,{marker:g,handle:u}),u},destroy:()=>{l.forEach(({marker:i})=>i.remove()),l.clear(),a.remove();},instance:a}};});var vd={};ca(vd,{createGoogleAdapter:()=>Xu});var Yu,Zu,bd,Xu,yd=vr(()=>{Yu=[{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"transit",stylers:[{visibility:"simplified"}]}],Zu=[{elementType:"geometry",stylers:[{color:"#1a1a1a"}]},{elementType:"labels.text.stroke",stylers:[{color:"#1a1a1a"}]},{elementType:"labels.text.fill",stylers:[{color:"#9ca3af"}]},{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#262626"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca3af"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#0f172a"}]},{featureType:"transit",stylers:[{visibility:"simplified"},{color:"#3a3a3a"}]}],bd=e=>e==="dark"?Zu:Yu,Xu=async(e,t,o)=>{if(!t.apiKey)throw o.onError({code:"api-key-missing",message:'@gradeui/ui Map: provider="google" requires an `apiKey` prop.'}),new Error("google apiKey missing");let r;try{let d=await import('@googlemaps/js-api-loader');r=d.Loader??d.default?.Loader;}catch(d){throw o.onError({code:"sdk-missing",message:'@gradeui/ui Map: `@googlemaps/js-api-loader` is not installed. Run `pnpm add @googlemaps/js-api-loader` to use provider="google".',cause:d}),d}let n=new r({apiKey:t.apiKey,version:"weekly",libraries:["maps","marker"]}),a;try{a=await n.load();}catch(d){throw o.onError({code:"provider-init-failed",message:"@gradeui/ui Map: Google Maps loader failed.",cause:d}),d}let l=t.appearance==="satellite",p=new a.maps.Map(e,{center:{lat:t.center[1],lng:t.center[0]},zoom:t.zoom,mapTypeId:l?a.maps.MapTypeId.HYBRID:a.maps.MapTypeId.ROADMAP,mapId:t.mapId,styles:l?void 0:bd(t.appearance==="dark"?"dark":"light"),disableDefaultUI:!t.interactive,gestureHandling:t.interactive?"auto":"none",keyboardShortcuts:t.interactive});if(t.bounds){let d=new a.maps.LatLngBounds({lat:t.bounds[0][1],lng:t.bounds[0][0]},{lat:t.bounds[1][1],lng:t.bounds[1][0]});p.fitBounds(d);}await new Promise(d=>{a.maps.event.addListenerOnce(p,"idle",()=>d());}),o.onLoad();let i=new globalThis.Map;return {setCenter:d=>p.setCenter({lat:d[1],lng:d[0]}),setZoom:d=>p.setZoom(d),setBounds:(d,m)=>{let g=new a.maps.LatLngBounds({lat:d[1],lng:d[0]},{lat:m[1],lng:m[0]});p.fitBounds(g);},setAppearance:d=>{d==="satellite"?(p.setMapTypeId(a.maps.MapTypeId.HYBRID),p.setOptions({styles:void 0})):(p.setMapTypeId(a.maps.MapTypeId.ROADMAP),p.setOptions({styles:bd(d)}));},setInteractive:d=>{p.setOptions({disableDefaultUI:!d,gestureHandling:d?"auto":"none",keyboardShortcuts:d});},flyTo:(d,m)=>{p.panTo({lat:d[1],lng:d[0]}),m?.zoom!=null&&p.setZoom(m.zoom);},panTo:d=>p.panTo({lat:d[1],lng:d[0]}),fitBounds:(d,m)=>{if(d.length===0)return;let g=new a.maps.LatLngBounds;for(let[u,b]of d)g.extend({lat:b,lng:u});p.fitBounds(g,m?.paddingPx??40);},getCenter:()=>{let d=p.getCenter();return d?[d.lng(),d.lat()]:[0,0]},getZoom:()=>p.getZoom()??0,getBounds:()=>{let d=p.getBounds();if(!d)return [[0,0],[0,0]];let m=d.getSouthWest(),g=d.getNorthEast();return [[m.lng(),m.lat()],[g.lng(),g.lat()]]},addMarker:(d,m,g)=>{let u=document.createElement("div");u.dataset.gdsPart="map-marker",u.dataset.gdsState="idle",u.style.cursor="pointer",g==="center"&&(u.style.transform="translateY(50%)"),u.addEventListener("mouseenter",()=>o.onMarkerHover(d)),u.addEventListener("mouseleave",()=>o.onMarkerHover(null)),u.addEventListener("click",f=>{o.onMarkerClick(d,h.coords,f);});let b=new a.maps.marker.AdvancedMarkerElement({map:p,position:{lat:m[1],lng:m[0]},content:u}),h={element:u,coords:m,setHovered:f=>{u.dataset.gdsState=f?"hovered":"idle",b.zIndex=f?10:1;},setPosition:f=>{h.coords=f,b.position={lat:f[1],lng:f[0]};},remove:()=>{b.map=null,i.delete(d);}};return i.set(d,{marker:b,handle:h}),h},destroy:()=>{i.forEach(({marker:d})=>{d.map=null;}),i.clear();},instance:p}};});var fn={name:"Accordion",description:`Long-form content that would overwhelm if shown all at once \u2014 FAQs, settings groups, "what's included" sections, nested help. For tab-style peer views with one always visible, reach for Tabs. For a single show/hide reveal use Collapsible.`,import:"@gradeui/ui",aliases:["accordion","faq","expand","collapse list","disclosure list","disclosure group","outline group","expandable list","sectionlist"],subcomponents:["AccordionItem","AccordionTrigger","AccordionContent"],composesWith:["Card (as a faq inside a card body)","Section primitives"],props:{type:{schema:zod.z.enum(["single","multiple"]),design:"knob",description:"single keeps one open at a time, multiple lets several be open at once"},collapsible:{schema:zod.z.boolean().optional(),design:"knob",description:'only valid with type="single"; allows the open item to be toggled shut'},defaultValue:{schema:zod.z.string().optional(),design:"content",description:"initial open item(s)"},value:{schema:zod.z.string().optional(),design:"content",description:"controlled"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},children:{schema:zod.z.unknown(),design:"plumbing",description:"the row label users click to expand"}}};var hn={name:"AiChat",description:'A flexible chat block \u2014 header + scrollable message list + composer. Out of the box it looks like a polished "AI panel"; under it, every region is a slot so hosts can compose richer chat surfaces (e.g. Studio\'s left column with selection chip + settings panel above the composer, an error banner inline, per-message usage / refs / actions). Per-turn token usage, refs, and actions are optional and gated by `showUsage` / `showRefs` / `showActions` \u2014 leave them off for product-facing chats, turn them on for developer-facing ones where transparency matters. Composes with [[AIChatComposer]] (rendered internally; can be slotted in with custom props via `composerSlot`).',import:"@gradeui/ui",aliases:["ai chat","chat panel","chat block","llm chat","assistant panel","copilot chat","ai assistant"],composesWith:["Card (host in a sidebar panel)","Sheet (mobile drawer)","Stack (place above other content)","AIChatComposer (internal composer; slot to override)"],props:{messages:{schema:zod.z.unknown().optional(),design:"plumbing",description:'`{ id, role: "user" | "assistant", content, timestamp, thinking?, steps?, usage?, refs?, actions?, duration? }`; defaults to empty'},onSendMessage:{schema:zod.z.unknown().optional(),design:"event",description:"fires when the user submits via the default composer; ignored if `composerSlot` is set"},isLoading:{schema:zod.z.boolean().optional(),design:"knob",description:"shows a typing indicator at the bottom of the message list"},placeholder:{schema:zod.z.string().optional(),design:"content",description:"composer placeholder text (ignored if `composerSlot` is set)"},title:{schema:zod.z.string().optional(),design:"plumbing",description:'header title; defaults to "AI Assistant"'},titleIcon:{schema:zod.z.unknown().optional(),design:"plumbing",description:"optional icon rendered before the title (e.g. `<Sparkles />`)"},headerTokens:{schema:zod.z.number().optional(),design:"knob",description:'optional session-level token total shown on the right of the header; rendered as "N tokens" with a small gauge icon when set'},headerEnd:{schema:zod.z.unknown().optional(),design:"plumbing",description:"optional arbitrary content appended after `headerTokens` on the right of the header"},showUsage:{schema:zod.z.boolean().optional(),design:"knob",description:"show the per-turn `usage` strip below the assistant bubble; default false"},showRefs:{schema:zod.z.boolean().optional(),design:"knob",description:"show the per-turn `refs` strip below the assistant bubble; default false"},showActions:{schema:zod.z.boolean().optional(),design:"knob",description:"render per-turn `actions` chips when a message has them; default true"},showDuration:{schema:zod.z.boolean().optional(),design:"knob",description:'render the per-turn wall-clock duration ("2.3s") below the assistant bubble when a message carries `duration`; default false'},showThinking:{schema:zod.z.boolean().optional(),design:"knob",description:'render the per-turn reasoning ("Thoughts") disclosure above the assistant prose when a message carries `thinking`; collapsed by default, click to expand; default false'},showSteps:{schema:zod.z.boolean().optional(),design:"knob",description:'render the per-turn step timeline above the assistant prose when a message carries `steps`; collapsed view shows the current running step (or "N steps completed"), click to expand the vertical timeline with status glyphs; default false'},thinkingPhrase:{schema:zod.z.string().optional(),design:"content",description:'override the "Thinking" label in the loading indicator'},suggestedPrompts:{schema:zod.z.unknown().optional(),design:"plumbing",description:"empty-state quick prompts (ignored if `emptyStateSlot` is set)"},emptyStateSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:"replaces the default empty state entirely"},errorSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:"rendered after the messages list (typically an error banner)"},composerAboveSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:"rendered between the messages and the composer (selection chip, settings panel)"},composerBelowSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:"rendered below the composer (disclaimer, char counter)"},composerSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:"full override of the composer; when provided, `onSendMessage` + `placeholder` are unused"},bare:{schema:zod.z.boolean().optional(),design:"knob",description:"strip the outer card chrome (background, border, rounded corners) so the chat takes the surface of its container; default false (keeps the canned card look)"},assistantBubble:{schema:zod.z.boolean().optional(),design:"knob",description:"whether assistant messages render with a bubble (background + border + padding + rounded corners); default true. Set false for a Claude.ai-style chromeless transcript where assistant text sits on the surface and only user turns wear a bubble."},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var bn={name:"AiChatComposer",description:"The reusable \"input card\" for any chat surface \u2014 auto-growing textarea, image attachments via paperclip and clipboard paste, attachment chips with previews, Send/Stop toggle, controlled value. Drop in below any messages list. Use this when you want the input affordances of `<AIChat>` but you're rendering your own messages list / scrollarea / header (e.g. Studio's left-column chat, where SelectionChip and SettingsPanel sit between messages and composer). For the full canned chat block, use `<AIChat>` instead.",import:"@gradeui/ui",aliases:["chat composer","chat input","prompt composer","message input"],composesWith:["AIChat (uses this internally)","Card (host above)","ScrollArea (place messages above)"],props:{value:{schema:zod.z.string(),design:"content",description:"controlled textarea value"},onChange:{schema:zod.z.unknown(),design:"event",description:"fires for every textarea change"},onSend:{schema:zod.z.unknown(),design:"event",description:"fires when the user submits (Enter or click Send); composer validates that text or attachments exist before firing"},isLoading:{schema:zod.z.boolean().optional(),design:"knob",description:"disables the textarea + paperclip and swaps Send for Stop"},onStop:{schema:zod.z.unknown().optional(),design:"event",description:"fires when the user clicks Stop; without this, Stop renders disabled"},placeholder:{schema:zod.z.string().optional(),design:"content"},maxLength:{schema:zod.z.number().optional(),design:"knob",description:"hard cap passed to the underlying `<textarea>`"},showHint:{schema:zod.z.boolean().optional(),design:"knob",description:'show the "Press Enter\u2026 \xB7 Paste images" hint below the card; default true, set false when the host renders its own footer'},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var vn={name:"AppShell",description:`The top-level page scaffold for any app-like or marketing layout. Reach for AppShell
3
3
  instead of hand-rolling \`grid grid-cols-[auto_1fr]\` so the layout shape (top nav,
4
4
  side nav, three-pane Slack/Mail/Notion shape, constrained vs full-width main) is a
5
5
  prop the settings panel can mutate. Don't compose top-level layouts from raw grid
@@ -14,7 +14,51 @@ Pick the \`nav\` variant from the source:
14
14
  shape. ANY time you see a vertical icon rail next to
15
15
  a separate list/sidebar, this is the answer \u2014 don't
16
16
  reach for raw \`<div className="grid">\` with three
17
- column tracks.`,import:"@gradeui/ui",subcomponents:["AppShellHeader","AppShellNav","AppShellAside","AppShellMain","AppShellFooter"],composesWith:["Stack","Row","Card","Button","Separator","Sidebar","Toolbar","any page content"],props:{nav:{schema:zod.z.enum(["none","top","side","three-pane"]).optional(),design:"knob",description:"layout structure",default:"none"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing"}}};var Ma={name:"Avatar",description:"User/entity identity for PEOPLE \u2014 profile pictures, author rows, member lists, account headers. Circular by default; the AvatarFallback initials read as a person's name. Always include AvatarFallback so load failure doesn't leave a gap.",import:"@gradeui/ui",aliases:["profile picture","user image","account image","avatar","person glyph","user avatar","profile image","react native avatar"],subcomponents:["AvatarImage","AvatarFallback"],composesWith:["Card (in CardHeader)","Table cells","Badge (placed next to for status)","Skeleton (loading state)"],props:{className:{schema:zod.z.unknown().optional(),design:"plumbing",description:"set size via utilities (default h-10 w-10)"},src:{schema:zod.z.unknown(),design:"plumbing"},initials:{schema:zod.z.unknown(),design:"plumbing"}}};var Ea={name:"Badge",description:"Compact status chips, counts, tags, pills. For higher-signal inline status \u2192 use Callout. For solid CTAs \u2192 Button. Soft/outline variants are quieter; solid variants are loud.",import:"@gradeui/ui",aliases:["chip","tag","pill","label chip","badge","tag view","status pill","token","count badge"],composesWith:["Card","Table (inside a cell)","Avatar (next to it)","anywhere inline"],props:{variant:{schema:zod.z.enum(["see list above"]).optional(),design:"knob"},rounded:{schema:zod.z.enum(["default","full"]).optional(),design:"knob",description:'"full" gives a pill shape'}}};var La={name:"Breadcrumb",description:'Reach for Breadcrumb whenever a screen sits inside a hierarchy and you want the path back to the top to be visible. Common spots: above page titles in admin/CMS screens, top of Settings detail pages, after a router redirect when the URL implies depth. Use the current page as a <BreadcrumbPage> (non-clickable) and prior levels as <BreadcrumbLink>. For a horizontal "top nav" of peer destinations use Side Menu or Tabs instead \u2014 Breadcrumb is strictly for hierarchical path.',import:"@gradeui/ui",aliases:["breadcrumb","breadcrumbs","crumbs","path","page hierarchy","path bar","navigation trail","finder path"],subcomponents:["BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbPage","BreadcrumbSeparator","BreadcrumbEllipsis"],composesWith:["AppShellMain","Card (in CardHeader)","Dialog"],props:{"aria-label":{schema:zod.z.unknown().optional(),design:"plumbing",description:"passed to the underlying <nav>"},separator:{schema:zod.z.unknown().optional(),design:"plumbing",description:'**tree-wide default** for every <BreadcrumbSeparator/> inside. Pass a string ("/", "\u203A", "\u2022"), a lucide icon (`<Slash/>`, `<ChevronRight/>`), or any ReactNode. Default: `<ChevronRight/>`. Set once on the root; every separator below picks it up via context.'},className:{schema:zod.z.unknown().optional(),design:"plumbing",description:"the <ol> wrapper; usually no overrides needed"},href:{schema:zod.z.unknown().optional(),design:"plumbing",description:"renders as <a> when set, <button> when not; asChild? wraps a custom element"},children:{schema:zod.z.unknown().optional(),design:"plumbing",description:"per-instance override of the separator glyph. When set, beats the root's `separator` prop for this one slot. When not set, falls back to the root's `separator`, then to `<ChevronRight/>`."}}};var Ha={name:"Button",description:'Any clickable action. Use size="icon" for square icon-only buttons, variant="link" for inline links that should look like Button. A Button placed next to a TabsList of the same size lines up edge-to-edge without per-call overrides.',import:"@gradeui/ui",aliases:["button","push button","plain button","bordered button","destructive button","capsule button","link button","action button","cta"],composesWith:["Dialog","DropdownMenu","Tooltip","Card (in CardFooter)","Row","Form controls"],props:{variant:{schema:zod.z.enum(["default","destructive","outline","secondary","ghost","link"]).optional(),design:"knob"},size:{schema:zod.z.enum(["sm","md","lg","icon"]).optional(),design:"knob",description:"t-shirt scale aligned with Tabs/ToggleGroup heights (sm=h-7, md=h-8, lg=h-10). `default` still works as an alias for `md`."},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"renders as the child element (use to wrap <a>/<Link>)"},disabled:{schema:zod.z.boolean().optional(),design:"knob"}}};var Da={name:"Calendar",description:'An inline date grid \u2014 date-of-birth pickers in profile forms, scheduling screens with a month view, range selection in reporting filters. For a compact trigger-and-popover input, use DatePicker / DateRangePicker (which wrap Calendar internally). For one-off relative dates ("yesterday", "last week") use a Select instead.',import:"@gradeui/ui",aliases:["calendar","date grid","month view","scheduler grid","calendar view","multidate picker","react native calendars"],subcomponents:["CalendarDayButton"],composesWith:["Popover (DatePicker composes them)","Card (inline scheduling card)","Dialog (full-screen mobile date pick)"],props:{mode:{schema:zod.z.enum(["single","multiple","range"]).optional(),design:"knob",description:"picks one date, several dates, or a [from, to] range"},selected:{schema:zod.z.unknown().optional(),design:"plumbing",description:"controlled selection; shape matches `mode`"},onSelect:{schema:zod.z.unknown().optional(),design:"event",description:"fires with the new selection"},month:{schema:zod.z.unknown().optional(),design:"plumbing",description:"controlled displayed month"},defaultMonth:{schema:zod.z.unknown().optional(),design:"plumbing",description:"uncontrolled initial month"},onMonthChange:{schema:zod.z.unknown().optional(),design:"event"},numberOfMonths:{schema:zod.z.number().optional(),design:"knob",description:"render multiple months side by side, useful for range pickers"},disabled:{schema:zod.z.unknown().optional(),design:"plumbing"},captionLayout:{schema:zod.z.enum(["label","dropdown","dropdown-months","dropdown-years"]).optional(),design:"knob"},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var Aa={name:"Callout",description:"Inline, ambient, non-blocking status/feedback that sits inside the layout flow. Form-level validation summaries, settings-page notices, page-level banners. NOT a toast (use Sonner for transient). NOT a modal (use Dialog when the user must respond). Put an icon as first child \u2014 it's auto-positioned; CalloutTitle + CalloutDescription follow.",import:"@gradeui/ui",aliases:["callout","banner","notice","inline alert","in-app notification","status banner","info banner","info callout","warning callout","success callout"],subcomponents:["CalloutTitle","CalloutDescription"],composesWith:["lucide-react icons as first child","Button (inside CalloutDescription)","Card (as a section callout)"],props:{variant:{schema:zod.z.enum(["default","destructive","success","warning","info"]).optional(),design:"knob",description:"semantic colouring; `default` is neutral"}}};var Fa={name:"Card",description:"Grouped content with a distinct surface \u2014 settings panels, dashboard tiles, list-of-cards layouts. Pair CardHeader (title + description) with CardContent and optional CardFooter (actions).",import:"@gradeui/ui",aliases:["card","group box","groupbox","panel","tile","surface"],subcomponents:["CardHeader","CardTitle","CardDescription","CardContent","CardFooter"],composesWith:["Button (in CardFooter)","Badge","Separator","Avatar","any form controls"],props:{Each:{schema:zod.z.unknown(),design:"plumbing"},No:{schema:zod.z.unknown(),design:"plumbing",description:"Card is a flexible container surface"}}};var Ml=zod.z.enum(["start","center","end"]),Nl=zod.z.object({delay:zod.z.number().int().positive().optional(),pauseOnHover:zod.z.boolean().optional(),pauseWhenOffscreen:zod.z.boolean().optional()}),El=zod.z.union([zod.z.boolean(),Nl]),za={name:"Carousel",description:"Token-driven slideshow primitive. Embla under the hood, custom autoplay loop with per-slide duration overrides, and a VideoSlide variant that autoplays muted+loop with a poster fallback. Reach for it for marketing hero rotations, app onboarding tours, image galleries, TV/streaming featured rails \u2014 anywhere a horizontal stack of slides cycles automatically or on user input.",import:"@gradeui/ui",aliases:["carousel","slideshow","slider","hero rotation","image gallery","featured row","swipe deck"],subcomponents:["Carousel.Slide","Carousel.VideoSlide","Carousel.Dots","Carousel.Arrows","Carousel.Prev","Carousel.Next"],composesWith:["MediaSurface (inside Carousel.Slide for posters / album art)","Card (slide content)","Stack / Row (slide composition)"],props:{loop:{schema:zod.z.boolean().optional(),design:"knob",label:"Loop",default:true,description:"Wrap from the last slide back to the first. Default true \u2014 the natural fit for hero rotations. Turn off for finite onboarding sequences."},align:{schema:Ml.optional(),design:"knob",control:"toggle-group",label:"Slide alignment",default:"start",description:"How slides line up inside the viewport when not at 100% width. 'start' is full-bleed; 'center' gives the 'peek of neighbours' carousel look."},slidesPerView:{schema:zod.z.number().int().positive().optional(),design:"knob",label:"Slides per view",default:1,description:"How many slides show at once. 1 for hero rotations; 3 for thumbnail strips; etc. For media-query responsive layouts, leave this at 1 and override `--gds-carousel-slide-basis` on each Slide via CSS."},autoplay:{schema:El.optional(),design:"structured",label:"Autoplay",default:false,description:"`true` for sensible defaults (5s, pause on hover, pause offscreen). Object form: `{ delay, pauseOnHover, pauseWhenOffscreen }`. Per-slide overrides go on `<Carousel.Slide duration={ms}>`."},draggable:{schema:zod.z.boolean().optional(),design:"knob",label:"Drag to swipe",default:true,description:"Disable when slide content (a Map, a chart, a draggable card) needs to swallow drag events."},onSlideChange:{schema:zod.z.function().optional(),design:"event",description:"Fires with the new slide index whenever the active slide changes (programmatic, autoplay, or user swipe)."},className:{schema:zod.z.string().optional(),design:"plumbing"},style:{schema:zod.z.record(zod.z.string(),zod.z.unknown()).optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing",description:"Carousel.Slide / Carousel.VideoSlide children, plus optionally Carousel.Dots and Carousel.Arrows."}}};var Ba={name:"Chart",description:"Reporting dashboards, single-purpose analytics cards (revenue, conversions, active users), or anywhere you'd otherwise hand-roll a Recharts setup. Bring the actual chart type from `recharts` \u2014 ChartContainer doesn't pick the chart shape for you, it themes whatever you nest. For sparkline-style decorative trends consider just rendering a small SVG line directly; ChartContainer is overkill for non-interactive ornament.",import:"@gradeui/ui",aliases:["chart","charts","graph","bar chart","line chart","area chart","recharts","analytics chart","swift chart","swiftui chart","victory chart","victory native"],subcomponents:["ChartTooltip","ChartTooltipContent","ChartLegend","ChartLegendContent","ChartStyle"],composesWith:["Card (chart-in-a-card pattern)","Tabs (multi-metric switcher)","Recharts components (Bar","Line","Area","Pie",'Radar from "recharts")'],props:{config:{schema:zod.z.unknown(),design:"plumbing",description:'`{ [seriesKey]: { label: string; color?: string; theme?: { light: string; dark: string } } }`; the keys here are the names you reference in your Recharts <Bar dataKey="\u2026" /> calls'},id:{schema:zod.z.string().optional(),design:"plumbing",description:"used for the inlined <style> tag"},children:{schema:zod.z.unknown(),design:"plumbing",description:"typically a single Recharts ResponsiveContainer or chart"},passes:{schema:zod.z.unknown(),design:"plumbing",description:"pair with `content={<ChartTooltipContent />}`"},indicator:{schema:zod.z.enum(["dot","line","dashed"]).optional(),design:"knob"},ChartLegend:{schema:zod.z.unknown(),design:"plumbing"}}};var Ga={name:"Checkbox",description:"Binary on/off tied to a list (select multiple, agree to terms). Single on/off that controls a setting is better with Switch.",import:"@gradeui/ui",aliases:["checkbox","tickbox","tick box","check","multi-select item"],composesWith:["Label (via htmlFor)","Card","Form rows","Table (for row selection)"],props:{checked:{schema:zod.z.boolean().optional(),design:"knob"},onCheckedChange:{schema:zod.z.unknown().optional(),design:"event"},defaultChecked:{schema:zod.z.boolean().optional(),design:"knob"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},id:{schema:zod.z.string().optional(),design:"plumbing",description:"bind a Label's htmlFor to this"}}};var Oa={name:"Collapsible",description:'A single show/hide reveal \u2014 "Show advanced settings" rows, expandable inline help, "More details" sections inside cards. For multiple rows of expandable content where one-at-a-time matters, reach for Accordion. For a separate panel that floats above content, use Popover.',import:"@gradeui/ui",aliases:["collapsible","expand","show more","disclosure","advanced settings","disclosure group","expandable section","expandable view","show hide"],subcomponents:["CollapsibleTrigger","CollapsibleContent"],composesWith:["Button (as the trigger","asChild)","Card (expandable settings group)","Row (header + chevron)"],props:{open:{schema:zod.z.boolean().optional(),design:"knob",description:"controlled open state"},defaultOpen:{schema:zod.z.boolean().optional(),design:"knob",description:"uncontrolled initial state"},onOpenChange:{schema:zod.z.unknown().optional(),design:"event"},children:{schema:zod.z.unknown(),design:"plumbing",description:"the clickable header (often a Button asChild)"}}};var Va={name:"Command",description:'A searchable list of actions or destinations \u2014 global \u2318K palettes, "jump to" inputs, account switchers with filter. Wrap in CommandDialog when it should pop over the entire app on a hotkey. For straight forms with filter, prefer a Select with a search input. For free-text autocomplete tied to a single value, prefer Combobox built on Popover + Command.',import:"@gradeui/ui",aliases:["command palette","command menu","cmd k","quick switcher","action menu","spotlight","spotlight search","quick open","fuzzy finder"],subcomponents:["CommandInput","CommandList","CommandEmpty","CommandGroup","CommandItem","CommandSeparator","CommandShortcut","CommandDialog"],composesWith:["Dialog (CommandDialog wraps it)","Popover (inline combobox)","Tooltip"],props:{value:{schema:zod.z.string().optional(),design:"content",description:"controlled active item value"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},placeholder:{schema:zod.z.string().optional(),design:"content"},children:{schema:zod.z.unknown(),design:"plumbing",description:"wraps groups and empty state"},heading:{schema:zod.z.string().optional(),design:"content"},onSelect:{schema:zod.z.unknown().optional(),design:"event"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},open:{schema:zod.z.unknown(),design:"plumbing",description:"when you want the command palette mounted in a modal (cmd+k pattern)"}}};var _a={name:"DatePicker",description:'Any date or date-range entry. Use DatePicker for a single date (DOB, due date, booking). Use DateRangePicker for a span (report period, stay dates, filter window). Prefer these over <Input type="date"> \u2014 consistent theming, keyboard nav, a11y, and no browser-native UI drift.',import:"@gradeui/ui",aliases:["datepicker","calendar input","date field","date range","datepickerios","react native date picker","calendar input field","date field control"],subcomponents:["DateRangePicker"],composesWith:["Label","Form","Card (in CardContent)","Button (form submit)"],props:{value:{schema:zod.z.unknown().optional(),design:"plumbing"},onChange:{schema:zod.z.unknown().optional(),design:"event",description:"called on select or clear"},placeholder:{schema:zod.z.string().optional(),design:"content",description:'trigger label when empty (default "Pick a date" / "Pick a date range")'},disabled:{schema:zod.z.boolean().optional(),design:"knob"},format:{schema:zod.z.string().optional(),design:"content",description:'date-fns format token for the trigger label (default "PPP" single, "LLL dd, y" range)'},align:{schema:zod.z.enum(["start","center","end"]).optional(),design:"knob",description:'popover align (default "start")'},side:{schema:zod.z.enum(["top","right","bottom","left"]).optional(),design:"knob",description:"popover side"},captionLayout:{schema:zod.z.enum(["label","dropdown","dropdown-months","dropdown-years"]).optional(),design:"knob"},className:{schema:zod.z.string().optional(),design:"plumbing",description:"on the trigger button"},contentClassName:{schema:zod.z.string().optional(),design:"content",description:"on the PopoverContent"},icon:{schema:zod.z.unknown().optional(),design:"plumbing",description:"replaces the default CalendarIcon"},numberOfMonths:{schema:zod.z.number().optional(),design:"knob",description:"DateRangePicker only, default 2"}}};var Wa={name:"Dialog",description:'Modal interruptions \u2014 confirmations, focused forms, detail views. Dialog is the right primitive for Apple HIG / React Native "Alert" (modal) semantics. For non-blocking inline messaging use Callout; for transient notifications use Toaster (Sonner). Always include DialogTitle (a11y requirement).',import:"@gradeui/ui",aliases:["modal","popup","overlay","alert","system alert","alert dialog","modal dialog","confirm dialog","react native modal","rn alert"],subcomponents:["DialogTrigger","DialogContent","DialogHeader","DialogTitle","DialogDescription","DialogFooter","DialogClose"],composesWith:["Button (as DialogTrigger asChild","and inside DialogFooter)","Input/Textarea/Select inside DialogContent"],props:{open:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Radix controlled/uncontrolled pattern"},asChild:{schema:zod.z.enum(["wrap a Button"]).optional(),design:"plumbing"},accepts:{schema:zod.z.unknown(),design:"plumbing"},used:{schema:zod.z.unknown(),design:"plumbing"}}};var $a={name:"DropdownMenu",description:'A small action menu attached to a trigger \u2014 overflow "\u2026" buttons on cards, user-avatar menus in headers, "Insert" menus in editors. For a full searchable list, use Command. For ONE primary action plus a secondary, use a Button next to a smaller ghost Button instead of a dropdown.',import:"@gradeui/ui",aliases:["dropdown","dropdown menu","overflow menu","kebab menu","more menu","action menu","context-style menu","menu","pull-down menu","pulldown menu","context menu","popup menu","actions menu"],subcomponents:["DropdownMenuTrigger","DropdownMenuContent","DropdownMenuItem","DropdownMenuCheckboxItem","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuGroup","DropdownMenuSub","DropdownMenuSubTrigger","DropdownMenuSubContent"],composesWith:["Button (as trigger asChild)","Avatar (user menu)","Card (overflow on a tile)","Tooltip (on the trigger)"],props:{open:{schema:zod.z.unknown().optional(),design:"plumbing"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"usually wraps a Button"},align:{schema:zod.z.enum(["start","center","end","top","right","bottom","left"]).optional(),design:"knob"},onSelect:{schema:zod.z.unknown().optional(),design:"event"},DropdownMenuCheckboxItem:{schema:zod.z.unknown(),design:"plumbing"},DropdownMenuSub:{schema:zod.z.unknown(),design:"plumbing",description:"sub-trigger shows children, sub-content holds the deeper items"},children:{schema:zod.z.unknown(),design:"plumbing",description:"right-aligned kbd hint"}}};var Ua={name:"Flex",description:"The unopinionated flexbox primitive \u2014 reach for Flex when Stack, Row, or Grid don't quite fit. Specifically when you need reverse direction (`row-reverse` / `col-reverse`), CSS defaults instead of Row's baked-in `items-center gap-md`, or baseline alignment. Otherwise prefer Stack / Row / Grid \u2014 they're easier to read and tuned for the 95% case. Flex is the escape hatch, not the default.",import:"@gradeui/ui",aliases:["flex","flexbox","flex container","hstack","vstack","horizontal","vertical","generic container","layout view"],composesWith:["any content component"],props:{direction:{schema:zod.z.enum(["row","col","row-reverse","col-reverse"]).optional(),design:"knob",description:"main-axis direction",default:"row"},gap:{schema:zod.z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between children",default:"none"},align:{schema:zod.z.enum(["start","center","end","stretch","baseline"]).optional(),design:"knob",description:"cross-axis alignment",default:"stretch"},justify:{schema:zod.z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:"main-axis distribution",default:"start"},wrap:{schema:zod.z.enum(["nowrap","wrap","wrap-reverse"]).optional(),design:"knob",description:"wrap behaviour when children overflow",default:"nowrap"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing"}}};var ja={name:"Grid",description:"2D layouts where Stack (vertical) and Row (horizontal) don't fit \u2014 stat-card grids, feature tiles, pricing columns, photo grids. Reach for Grid over hand-rolled `grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4` so the column count is a prop the settings panel can mutate and the responsive ladder stays consistent across designs.",import:"@gradeui/ui",aliases:["grid","tiles","cards grid","stat grid","columns","feature grid","grid view","lazy v grid","lazyvgrid","lazy h grid","lazyhgrid","tile grid","masonry"],composesWith:["Card","Stack (inside each cell)","Row","Button","any content component"],props:{cols:{schema:zod.z.enum(["1","2","3","4","5","6","12"]).optional(),design:"knob",description:'desktop column count; each value has a baked-in responsive ladder (e.g. "4" \u2192 1 col mobile, 2 tablet, 4 desktop)',default:"3"},gap:{schema:zod.z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between grid cells (same scale as Stack/Row)",default:"md"},align:{schema:zod.z.enum(["start","center","end","stretch"]).optional(),design:"knob",description:"cross-axis alignment of cells",default:"stretch"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing"}}};var Ka={name:"HoverCard",description:"Rich preview content surfaced on hover \u2014 user profile mini-cards on @-mentions, link previews, definition popups. Pointer-only by design (no touch-friendly trigger); pair with a click target for touch devices, or fall back to Popover. NEVER use HoverCard for critical info \u2014 if the user can't reach it via keyboard or touch, it might as well not exist for accessibility.",import:"@gradeui/ui",aliases:["hover card","hover preview","mention preview","profile peek","link preview","rich tooltip","link preview card","profile hover","peek card"],subcomponents:["HoverCardTrigger","HoverCardContent"],composesWith:["Avatar (user preview)","Card (richer content)","Link (the trigger)"],props:{open:{schema:zod.z.unknown().optional(),design:"plumbing"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"usually a Link or Button"},side:{schema:zod.z.unknown().optional(),design:"plumbing"}}};var qa={name:"Input",description:"Any single-line text entry. Always pair with a Label for accessibility.",import:"@gradeui/ui",aliases:["text field","textbox","textfield","form field","text input","secure field","search field","url field","number field","textinput","text input field","react native textinput"],composesWith:["Label","Form","Card (in CardContent)","Button (form submit)"],props:{type:{schema:zod.z.string().optional(),design:"content"}}};var Ya={name:"Label",description:"Every Input / Textarea / Checkbox / Switch / RadioGroup. Always use htmlFor so clicking the label focuses the control.",import:"@gradeui/ui",aliases:["label","form label","field label","caption"],composesWith:["Input","Textarea","Checkbox","Switch","RadioGroup","Select"],props:{htmlFor:{schema:zod.z.string().optional(),design:"content",description:"binds to the input's id"}}};var Za={name:"Map",description:"Any layout that needs a real map \u2014 listings (real estate, Airbnb-style), fleet/logistics dashboards, store locators, anywhere a user picks a location from a viewport. Reach for the controlled `hoveredId` prop when a sibling list and the map need to highlight each other.",import:"@gradeui/ui",aliases:["map","maps","mapbox","maplibre","google maps","geo","location","latlng","coordinates","marker","pin","airbnb","listings","fleet","real estate","logistics","map view","mapkit","mapview","react native maps","rn maps"],subcomponents:["MapMarker"],composesWith:["Card (as marker content)","Badge","Avatar","Button","Row","Stack","Skeleton"],props:{provider:{schema:zod.z.unknown(),design:"plumbing",description:'"maplibre" (default, free, no key) | "mapbox" (needs accessToken) | "google" (needs apiKey). Switching is one prop change.'},center:{schema:zod.z.unknown(),design:"plumbing",description:"`[lng, lat]` tuple. ALWAYS lng first. Required."},zoom:{schema:zod.z.unknown(),design:"plumbing",description:"number, 0\u201322. Required."},bounds:{schema:zod.z.unknown(),design:"plumbing",description:"`[[swLng, swLat], [neLng, neLat]]`. When set, takes precedence over center+zoom."},appearance:{schema:zod.z.unknown(),design:"plumbing",description:'"light" | "dark" | "satellite" | "auto" (default "auto", follows GradeThemeProvider mode).'},hoveredId:{schema:zod.z.unknown(),design:"plumbing",description:'controlled string id, pairs with onHoveredIdChange. The matching MapMarker gets `data-gds-state="hovered"` automatically. This is how you build list \u2194 map two-way sync.'},interactive:{schema:zod.z.unknown(),design:"plumbing",description:"false freezes pan/zoom, useful for static cards."},onLoad:{schema:zod.z.unknown(),design:"event",description:"handle exposes flyTo, panTo, fitBounds, getCenter, getZoom, getBounds, instance."},tilerKey:{schema:zod.z.enum(["maplibre"]),design:"knob",description:"only needed off `gradeui.com`/`localhost`. Default key is referrer-locked."},accessToken:{schema:zod.z.enum(["mapbox), apiKey (google"]),design:"knob",description:"required for those providers."}}};var Dl=zod.z.object({kind:zod.z.literal("album"),artist:zod.z.string(),title:zod.z.string(),year:zod.z.number().optional(),description:zod.z.string().optional()}),Al=zod.z.object({kind:zod.z.literal("tv-show"),title:zod.z.string(),year:zod.z.number().optional(),description:zod.z.string().optional()}),Il=zod.z.object({kind:zod.z.literal("movie"),title:zod.z.string(),year:zod.z.number().optional(),description:zod.z.string().optional()}),Fl=zod.z.object({kind:zod.z.literal("game"),title:zod.z.string(),description:zod.z.string().optional()}),zl=zod.z.object({kind:zod.z.literal("book"),title:zod.z.string().optional(),author:zod.z.string().optional(),isbn:zod.z.string().optional(),description:zod.z.string().optional()}),Bl=zod.z.object({kind:zod.z.literal("poster"),title:zod.z.string(),year:zod.z.number().optional(),description:zod.z.string().optional()}),Gl=zod.z.object({kind:zod.z.literal("portrait"),name:zod.z.string().optional(),role:zod.z.string().optional()}),Ol=zod.z.object({kind:zod.z.literal("landscape"),location:zod.z.string().optional(),mood:zod.z.string().optional()}),Vl=zod.z.object({kind:zod.z.literal("product"),name:zod.z.string().optional(),brand:zod.z.string().optional()}),_l=zod.z.object({kind:zod.z.literal("food"),dish:zod.z.string().optional(),cuisine:zod.z.string().optional()}),Wl=zod.z.object({kind:zod.z.literal("generic"),prompt:zod.z.string()}),$l=zod.z.union([zod.z.object({kind:zod.z.literal("video")}),zod.z.object({kind:zod.z.literal("audio")}),zod.z.object({kind:zod.z.literal("embed")}),zod.z.object({kind:zod.z.literal("3d")})]),Ul=zod.z.union([Dl,Al,Il,Fl,zl,Bl,Gl,Ol,Vl,_l,Wl,$l]),jl=zod.z.enum(["video","square","portrait","wide","auto"]),Kl=zod.z.enum(["none","sm","md","lg","xl"]),ql=zod.z.enum(["album","tv-show","movie","game","book","portrait","landscape","poster","product","food","video","audio","embed","3d","generic"]),Yl=zod.z.union([zod.z.literal("auto"),zod.z.literal("icon"),zod.z.literal("none")]),xr={name:"MediaSurface",description:"The canonical media slot for ALL non-person imagery \u2014 album art, posters, hero images, landscape photos, video and 3D containers.",when:"Pass `hint` + `alt` + (optionally) `source` so the empty-state placeholder is meaningful and the generation pipeline can later fill the slot with a real image. Use directly for declarative slots; the higher-level VideoPlayer / RivePlayer / ThreeScene wrap this for runtime-heavy media.",antipatterns:["Don't wrap <Avatar> inside <MediaSurface> to get an initials fallback. Set `alt` + `hint` on MediaSurface directly \u2014 the placeholder renders initials at small sizes derived from `alt`.","Don't use <Avatar> for album art, posters, products, food, landscapes, etc. Avatar is for PEOPLE only.","Don't inline manual gradient backgrounds (`bg-gradient-to-br \u2026`) on MediaSurface as a 'placeholder vibe' \u2014 the empty-state is already styled via `--gds-media-placeholder-bg/-fg` tokens."],composesWith:["Card","CardBlock","MediaBlock","VideoPlayer","RivePlayer","ThreeScene"],aliases:["media","image slot","media slot","image placeholder","cover","thumbnail","poster slot"],import:"@gradeui/ui",props:{hint:{schema:ql.optional(),design:"knob",control:"glyph-picker",label:"Slot kind",description:"Picks the placeholder glyph + the default aspect + the future generation provider. Defaults to 'generic'.",default:"generic",examples:["album","portrait","landscape","poster"]},aspect:{schema:jl.optional(),design:"knob",control:"toggle-group",label:"Aspect ratio",description:"Override the slot's natural framing. When omitted, derived from `hint`: album/product/food \u2192 square, portrait/poster \u2192 portrait, landscape \u2192 wide, video/audio/embed/generic \u2192 video."},radius:{schema:Kl.optional(),design:"knob",control:"toggle-group",label:"Corner radius",default:"lg",description:"Driven by the `--gds-media-radius` CSS variable."},border:{schema:zod.z.boolean().optional(),design:"knob",label:"Show border",default:false},loading:{schema:zod.z.boolean().optional(),design:"knob",label:"Loading state",default:false,description:"Overlays the muted-pulse skeleton on top of the slot."},emptyState:{schema:Yl.optional(),design:"knob",control:"select",label:"Empty state",default:"auto",description:"'auto' renders the size-tiered placeholder (initials \u2192 glyph \u2192 glyph + caption). 'icon' is a legacy alias. 'none' renders a truly empty surface."},alt:{schema:zod.z.string().optional(),design:"content",control:"text",label:"Alt text",description:"Becomes the eventual `<img alt>`. Also drives the placeholder caption (>160px slots) and the 2-letter initials fallback (<64px slots).",examples:["Travelling Without Moving \u2014 Jamiroquai","Sunset over Mount Fuji"]},src:{schema:zod.z.string().url().optional(),design:"content",control:"url",label:"Image URL",description:"When set, renders an `<img>` filling the slot via object-cover. The wrapper keeps its aspect/radius/border. Generators patch this prop; manual values always win."},source:{schema:Ul.optional(),design:"structured",label:"Source descriptor",description:"Structured metadata for the generation pipeline. Opaque to MediaSurface itself; read by the resolver to look up real imagery from the right provider (MusicBrainz / Pollinations / etc.).",perKindFields:{album:{artist:"string",title:"string",year:"number?"},poster:{title:"string",year:"number?"},portrait:{name:"string?",role:"string?"},landscape:{location:"string?",mood:"string?"},product:{name:"string?",brand:"string?"},food:{dish:"string?",cuisine:"string?"},generic:{prompt:"string"},video:{},audio:{},embed:{},"3d":{}}},className:{schema:zod.z.string().optional(),design:"plumbing"},style:{schema:zod.z.record(zod.z.string(),zod.z.unknown()).optional(),design:"plumbing"},children:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Escape hatch for putting a custom <video>, <canvas>, Rive runtime, etc. inside. When supplied, the placeholder is suppressed."},overlay:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Decorative layer rendered ABOVE the media/placeholder (play buttons, hover gradients, corner badges). Does NOT suppress the placeholder."},glyph:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Per-instance override of the hint-derived placeholder glyph. Most consumers should pick a `hint` and let the map decide."},fallback:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Custom node shown while `loading` is true."},onVisibilityChange:{schema:zod.z.function().optional(),design:"event",description:"Fires when the surface enters / leaves the viewport (IntersectionObserver)."}},actions:{fill:{label:"Fill image",icon:"Sparkles",description:"Resolve this slot's source via the free providers (MusicBrainz \u2192 Pollinations \u2192 Picsum) and patch the result into the runtime URL map.",kind:"resolve-media-source",enabledWhen:{propPresent:"source"}},refresh:{label:"Refresh",icon:"RotateCw",description:"Re-fetch this slot's resolved URL (cache-busts the browser AND the local URL map). Useful when a Pollinations URL failed to load on first hit \u2014 Pollinations has typically finished its cold-start by now, so a retry usually succeeds.",kind:"refresh-media-source",enabledWhen:{propPresent:"source"}}}};var Xa={name:"MultiSelect",description:`Picking multiple items from a finite list \u2014 tag selectors, filter chips,
17
+ column tracks.`,import:"@gradeui/ui",subcomponents:["AppShellHeader","AppShellNav","AppShellAside","AppShellMain","AppShellFooter"],composesWith:["Stack","Row","Card","Button","Separator","Sidebar","Toolbar","any page content"],props:{nav:{schema:zod.z.enum(["none","top","side","three-pane"]).optional(),design:"knob",description:"layout structure",default:"none"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing"}}};var yn={name:"Avatar",description:"User/entity identity for PEOPLE \u2014 profile pictures, author rows, member lists, account headers. Circular by default; the AvatarFallback initials read as a person's name. Always include AvatarFallback so load failure doesn't leave a gap.",import:"@gradeui/ui",aliases:["profile picture","user image","account image","avatar","person glyph","user avatar","profile image","react native avatar"],subcomponents:["AvatarImage","AvatarFallback"],composesWith:["Card (in CardHeader)","Table cells","Badge (placed next to for status)","Skeleton (loading state)"],props:{className:{schema:zod.z.unknown().optional(),design:"plumbing",description:"set size via utilities (default h-10 w-10)"},src:{schema:zod.z.unknown(),design:"plumbing"},initials:{schema:zod.z.unknown(),design:"plumbing"}}};var wn={name:"Badge",description:"Compact status chips, counts, tags, pills. For higher-signal inline status \u2192 use Callout. For solid CTAs \u2192 Button. Soft/outline variants are quieter; solid variants are loud.",import:"@gradeui/ui",aliases:["chip","tag","pill","label chip","badge","tag view","status pill","token","count badge"],composesWith:["Card","Table (inside a cell)","Avatar (next to it)","anywhere inline"],props:{variant:{schema:zod.z.enum(["see list above"]).optional(),design:"knob"},rounded:{schema:zod.z.enum(["default","full"]).optional(),design:"knob",description:'"full" gives a pill shape'}}};var Rn={name:"Banner",description:`A full-width horizontal strip surfacing system-level state, announcements, or first-run guidance \u2014 "you're previewing a draft", "investigating incident", "new feature available", "send your design to Figma". Distinct from Callout (inline boxed message in the layout flow), Toast (transient floating notification), Dialog (modal interrupt). Banner is what lives at the TOP of an AppShellHeader, page, or panel.`,import:"@gradeui/ui",aliases:["banner","notification banner","system banner","header banner","announcement bar","top bar","status bar","promo banner","incident banner","draft banner","first run banner","glass banner","sticky banner"],composesWith:["AppShellHeader (most common host \u2014 banner sits ABOVE the header content)","Button (in the action slot)","Link (inside the content)","Lucide icons (in the icon slot)"],props:{variant:{schema:zod.z.enum(["default","info","success","warning","destructive","announcement"]).optional(),design:"knob",description:'intent + tonal direction. `default` is a calm muted strip; `announcement` is a low-alpha brand tint for "new feature" messaging; status variants pick up the soft+deep token pairs.'},surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"material applied over the variant tint. `glass` for banners that sit over imagery / generative backdrops."},align:{schema:zod.z.enum(["start","center","between"]).optional(),design:"knob",description:"justify behaviour of the inner flex row. Defaults to `between` so the action / dismiss button right-align."},sticky:{schema:zod.z.boolean().optional(),design:"knob",description:"stick to the top of the scroll container."},dismissible:{schema:zod.z.boolean().optional(),design:"knob",description:"render the trailing X close button. Pair with `onDismiss` to react."},onDismiss:{schema:zod.z.unknown().optional(),design:"event"},icon:{schema:zod.z.unknown().optional(),design:"plumbing",description:"leading icon slot. NOT inferred from variant; pass what fits the message."},action:{schema:zod.z.unknown().optional(),design:"plumbing",description:'trailing slot before dismiss. Usually a `<Button size="sm">` or `<a>`.'},role:{schema:zod.z.string().optional(),design:"plumbing",description:"overrides the automatic role mapping (warning/destructive \u2192 alert, others \u2192 status)."}}};var Sn={name:"Breadcrumb",description:'Reach for Breadcrumb whenever a screen sits inside a hierarchy and you want the path back to the top to be visible. Common spots: above page titles in admin/CMS screens, top of Settings detail pages, after a router redirect when the URL implies depth. Use the current page as a <BreadcrumbPage> (non-clickable) and prior levels as <BreadcrumbLink>. For a horizontal "top nav" of peer destinations use Side Menu or Tabs instead \u2014 Breadcrumb is strictly for hierarchical path.',import:"@gradeui/ui",aliases:["breadcrumb","breadcrumbs","crumbs","path","page hierarchy","path bar","navigation trail","finder path"],subcomponents:["BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbPage","BreadcrumbSeparator","BreadcrumbEllipsis"],composesWith:["AppShellMain","Card (in CardHeader)","Dialog"],props:{"aria-label":{schema:zod.z.unknown().optional(),design:"plumbing",description:"passed to the underlying <nav>"},separator:{schema:zod.z.unknown().optional(),design:"plumbing",description:'**tree-wide default** for every <BreadcrumbSeparator/> inside. Pass a string ("/", "\u203A", "\u2022"), a lucide icon (`<Slash/>`, `<ChevronRight/>`), or any ReactNode. Default: `<ChevronRight/>`. Set once on the root; every separator below picks it up via context.'},className:{schema:zod.z.unknown().optional(),design:"plumbing",description:"the <ol> wrapper; usually no overrides needed"},href:{schema:zod.z.unknown().optional(),design:"plumbing",description:"renders as <a> when set, <button> when not; asChild? wraps a custom element"},children:{schema:zod.z.unknown().optional(),design:"plumbing",description:"per-instance override of the separator glyph. When set, beats the root's `separator` prop for this one slot. When not set, falls back to the root's `separator`, then to `<ChevronRight/>`."}}};var Cn={name:"Button",description:'Any clickable action. Use size="icon" for square icon-only buttons, variant="link" for inline links that should look like Button, variant="raised" for high-commitment / weighty actions where the chrome can afford a tactile "physical key" treatment. A Button placed next to a TabsList of the same size lines up edge-to-edge without per-call overrides.',import:"@gradeui/ui",aliases:["button","push button","plain button","bordered button","destructive button","capsule button","link button","action button","cta","raised button","pill button","key button"],composesWith:["Dialog","DropdownMenu","Tooltip","Card (in CardFooter)","Row","Form controls"],props:{variant:{schema:zod.z.enum(["default","destructive","outline","secondary","ghost","link","raised"]).optional(),design:"knob"},size:{schema:zod.z.enum(["sm","md","lg","icon"]).optional(),design:"knob",description:"t-shirt scale aligned with Tabs/ToggleGroup heights (sm=h-7, md=h-8, lg=h-10). `default` still works as an alias for `md`."},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"renders as the child element (use to wrap <a>/<Link>)"},disabled:{schema:zod.z.boolean().optional(),design:"knob"}}};var kn={name:"Calendar",description:'An inline date grid \u2014 date-of-birth pickers in profile forms, scheduling screens with a month view, range selection in reporting filters. For a compact trigger-and-popover input, use DatePicker / DateRangePicker (which wrap Calendar internally). For one-off relative dates ("yesterday", "last week") use a Select instead.',import:"@gradeui/ui",aliases:["calendar","date grid","month view","scheduler grid","calendar view","multidate picker","react native calendars"],subcomponents:["CalendarDayButton"],composesWith:["Popover (DatePicker composes them)","Card (inline scheduling card)","Dialog (full-screen mobile date pick)"],props:{mode:{schema:zod.z.enum(["single","multiple","range"]).optional(),design:"knob",description:"picks one date, several dates, or a [from, to] range"},selected:{schema:zod.z.unknown().optional(),design:"plumbing",description:"controlled selection; shape matches `mode`"},onSelect:{schema:zod.z.unknown().optional(),design:"event",description:"fires with the new selection"},month:{schema:zod.z.unknown().optional(),design:"plumbing",description:"controlled displayed month"},defaultMonth:{schema:zod.z.unknown().optional(),design:"plumbing",description:"uncontrolled initial month"},onMonthChange:{schema:zod.z.unknown().optional(),design:"event"},numberOfMonths:{schema:zod.z.number().optional(),design:"knob",description:"render multiple months side by side, useful for range pickers"},disabled:{schema:zod.z.unknown().optional(),design:"plumbing"},captionLayout:{schema:zod.z.enum(["label","dropdown","dropdown-months","dropdown-years"]).optional(),design:"knob"},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var Tn={name:"Callout",description:"Inline, ambient, non-blocking status/feedback that sits inside the layout flow. Form-level validation summaries, settings-page notices, page-level banners. NOT a toast (use Sonner for transient). NOT a modal (use Dialog when the user must respond). Put an icon as first child \u2014 it's auto-positioned; CalloutTitle + CalloutDescription follow.",import:"@gradeui/ui",aliases:["callout","banner","notice","inline alert","in-app notification","status banner","info banner","info callout","warning callout","success callout"],subcomponents:["CalloutTitle","CalloutDescription"],composesWith:["lucide-react icons as first child","Button (inside CalloutDescription)","Card (as a section callout)"],props:{variant:{schema:zod.z.enum(["default","destructive","success","warning","info"]).optional(),design:"knob",description:"semantic colouring; `default` is neutral"}}};var Mn={name:"Card",description:'Grouped content with a distinct surface \u2014 settings panels, dashboard tiles, list-of-cards layouts, marketing hero containers, AI suggestion overlays. Pair CardHeader (title + description) with CardContent and optional CardFooter (actions). Reach for `surface="glass"` whenever the card sits over a busy backdrop (gradient mesh, dot grid, generative art, image hero).',import:"@gradeui/ui",aliases:["card","group box","groupbox","panel","tile","surface","glass card","frosted card","floating panel","hero card","ai suggestion card","dashboard tile","settings panel"],subcomponents:["CardHeader","CardTitle","CardDescription","CardContent","CardFooter"],composesWith:["Button (in CardFooter)","Badge","Separator","Avatar","Code","MediaSurface","any form controls"],props:{surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the card surface is *made of*. `solid` is the default opaque `bg-card`. `translucent` is ~82% opacity for menu sheets. `glass` is ~58% opacity + 14px blur + edge highlight for floating panels. `glass-strong` is ~42% + 24px blur for full-page overlays. Composes with `shadow-elevation-*` (depth) and `gds-aura-*` (state signal)."},Each:{schema:zod.z.unknown(),design:"plumbing"}}};var zd=zod.z.enum(["start","center","end"]),Od=zod.z.object({delay:zod.z.number().int().positive().optional(),pauseOnHover:zod.z.boolean().optional(),pauseWhenOffscreen:zod.z.boolean().optional()}),Vd=zod.z.union([zod.z.boolean(),Od]),Nn={name:"Carousel",description:"Token-driven slideshow primitive. Embla under the hood, custom autoplay loop with per-slide duration overrides, and a VideoSlide variant that autoplays muted+loop with a poster fallback. Reach for it for marketing hero rotations, app onboarding tours, image galleries, TV/streaming featured rails \u2014 anywhere a horizontal stack of slides cycles automatically or on user input.",import:"@gradeui/ui",aliases:["carousel","slideshow","slider","hero rotation","image gallery","featured row","swipe deck"],subcomponents:["Carousel.Slide","Carousel.VideoSlide","Carousel.Dots","Carousel.Arrows","Carousel.Prev","Carousel.Next"],composesWith:["MediaSurface (inside Carousel.Slide for posters / album art)","Card (slide content)","Stack / Row (slide composition)"],props:{loop:{schema:zod.z.boolean().optional(),design:"knob",label:"Loop",default:true,description:"Wrap from the last slide back to the first. Default true \u2014 the natural fit for hero rotations. Turn off for finite onboarding sequences."},align:{schema:zd.optional(),design:"knob",control:"toggle-group",label:"Slide alignment",default:"start",description:"How slides line up inside the viewport when not at 100% width. 'start' is full-bleed; 'center' gives the 'peek of neighbours' carousel look."},slidesPerView:{schema:zod.z.number().int().positive().optional(),design:"knob",label:"Slides per view",default:1,description:"How many slides show at once. 1 for hero rotations; 3 for thumbnail strips; etc. For media-query responsive layouts, leave this at 1 and override `--gds-carousel-slide-basis` on each Slide via CSS."},autoplay:{schema:Vd.optional(),design:"structured",label:"Autoplay",default:false,description:"`true` for sensible defaults (5s, pause on hover, pause offscreen). Object form: `{ delay, pauseOnHover, pauseWhenOffscreen }`. Per-slide overrides go on `<Carousel.Slide duration={ms}>`."},draggable:{schema:zod.z.boolean().optional(),design:"knob",label:"Drag to swipe",default:true,description:"Disable when slide content (a Map, a chart, a draggable card) needs to swallow drag events."},onSlideChange:{schema:zod.z.function().optional(),design:"event",description:"Fires with the new slide index whenever the active slide changes (programmatic, autoplay, or user swipe)."},className:{schema:zod.z.string().optional(),design:"plumbing"},style:{schema:zod.z.record(zod.z.string(),zod.z.unknown()).optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing",description:"Carousel.Slide / Carousel.VideoSlide children, plus optionally Carousel.Dots and Carousel.Arrows."}}};var En={name:"Chart",description:"Reporting dashboards, single-purpose analytics cards (revenue, conversions, active users), or anywhere you'd otherwise hand-roll a Recharts setup. Bring the actual chart type from `recharts` \u2014 ChartContainer doesn't pick the chart shape for you, it themes whatever you nest. For sparkline-style decorative trends consider just rendering a small SVG line directly; ChartContainer is overkill for non-interactive ornament.",import:"@gradeui/ui",aliases:["chart","charts","graph","bar chart","line chart","area chart","recharts","analytics chart","swift chart","swiftui chart","victory chart","victory native"],subcomponents:["ChartTooltip","ChartTooltipContent","ChartLegend","ChartLegendContent","ChartStyle"],composesWith:["Card (chart-in-a-card pattern)","Tabs (multi-metric switcher)","Recharts components (Bar","Line","Area","Pie",'Radar from "recharts")'],props:{config:{schema:zod.z.unknown(),design:"plumbing",description:'`{ [seriesKey]: { label: string; color?: string; theme?: { light: string; dark: string } } }`; the keys here are the names you reference in your Recharts <Bar dataKey="\u2026" /> calls'},id:{schema:zod.z.string().optional(),design:"plumbing",description:"used for the inlined <style> tag"},children:{schema:zod.z.unknown(),design:"plumbing",description:"typically a single Recharts ResponsiveContainer or chart"},passes:{schema:zod.z.unknown(),design:"plumbing",description:"pair with `content={<ChartTooltipContent />}`"},indicator:{schema:zod.z.enum(["dot","line","dashed"]).optional(),design:"knob"},ChartLegend:{schema:zod.z.unknown(),design:"plumbing"}}};var Ln={name:"Checkbox",description:"Binary on/off tied to a list (select multiple, agree to terms). Single on/off that controls a setting is better with Switch.",import:"@gradeui/ui",aliases:["checkbox","tickbox","tick box","check","multi-select item"],composesWith:["Label (via htmlFor)","Card","Form rows","Table (for row selection)"],props:{checked:{schema:zod.z.boolean().optional(),design:"knob"},onCheckedChange:{schema:zod.z.unknown().optional(),design:"event"},defaultChecked:{schema:zod.z.boolean().optional(),design:"knob"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},id:{schema:zod.z.string().optional(),design:"plumbing",description:"bind a Label's htmlFor to this"}}};var Dn={name:"Code",description:'Read-only code surface for marketing heroes, docs, changelog entries, AI-output displays. Use `diff` for the "diff hero" pattern (before/after side-by-side or stacked). Use `reveal="lines"` with `trigger="inView"` for scroll-driven marketing pages. Use `reveal="typewriter"` for AI-output / chat-style displays. Use `bare` for inline code inside prose. NOT a code editor \u2014 for editable code, reach for an external editor primitive (CodeMirror / Monaco).',import:"@gradeui/ui",aliases:["code block","code","code snippet","code surface","syntax highlighted code","diff hero","diff view","diff block","changelog code","before after code","scroll-triggered code","typewriter code"],composesWith:["SectionBlock","Card","Tabs (for multi-file examples)","Carousel (slide-to-slide code progression)"],props:{source:{schema:zod.z.string(),design:"content",description:"the code to render"},language:{schema:zod.z.enum(["tsx","jsx","ts","js","html","css","json","bash","md","py","go","rust"]).optional(),design:"knob",description:"Prism language id; defaults to `tsx`"},highlight:{schema:zod.z.unknown().optional(),design:"plumbing",description:"1-indexed line number, array of numbers, or array of `[start, end]` ranges to emphasise"},diff:{schema:zod.z.unknown().optional(),design:"plumbing",description:"`{ added?: number[]; removed?: number[] }` \u2014 1-indexed lines for diff hero / changelog mode"},reveal:{schema:zod.z.enum(["none","lines","typewriter","diff"]).optional(),design:"knob",description:"entrance animation; defaults to `none`"},trigger:{schema:zod.z.enum(["mount","inView","manual"]).optional(),design:"knob",description:"what kicks the reveal off; defaults to `mount`"},play:{schema:zod.z.boolean().optional(),design:"knob",description:'for `trigger="manual"`, set true to play'},speed:{schema:zod.z.enum(["slow","normal","fast"]).optional(),design:"knob",description:"animation feel preset. `normal` (default) maps to the canonical 50ms/22ms staggers + 180ms pre-delay. Pick a feel; don't tune individual numbers unless you have to."},delay:{schema:zod.z.number().optional(),design:"knob",description:"explicit delay before reveal starts (ms) \u2014 overrides the `speed` preset"},stagger:{schema:zod.z.number().optional(),design:"knob",description:"explicit per-line stagger for `lines`/`diff`, per-token for `typewriter` (ms) \u2014 overrides the `speed` preset"},prompt:{schema:zod.z.string().optional(),design:"content",description:'string prepended to each line. Use for terminal emulation: `prompt="$ "` for bash, `prompt="> "` for PowerShell, `prompt=">>> "` for Python REPL. Prompt characters render in muted token colour, don\'t pick up the typewriter stagger, and are hidden from screen readers.'},showLineNumbers:{schema:zod.z.boolean().optional(),design:"knob"},filename:{schema:zod.z.string().optional(),design:"content",description:"optional label rendered in the header chrome"},wrap:{schema:zod.z.boolean().optional(),design:"knob",description:"wrap long lines instead of horizontal scroll"},bare:{schema:zod.z.boolean().optional(),design:"knob",description:"drop chrome (border, header, padding) \u2014 for inline use"},size:{schema:zod.z.enum(["xs","sm","md"]).optional(),design:"knob",description:"type-scale preset. `xs` (12px) for dense changelog cards / inline blocks; `sm` (14px, default) for marketing heroes and docs; `md` (16px) for focal-point displays."},height:{schema:zod.z.enum(["auto","number","string"]).optional(),design:"knob",description:'container sizing. `auto` (default) grows with content. Number = pixels (`300` \u2192 `300px`). String passes through as CSS (`"20rem"`, `"50vh"`).'},maxLines:{schema:zod.z.number().optional(),design:"knob",description:"cap the visible line count at exactly N line-heights. Wins over `height`. Inherits the current size's line-height automatically."}}};var An={name:"Collapsible",description:'A single show/hide reveal \u2014 "Show advanced settings" rows, expandable inline help, "More details" sections inside cards. For multiple rows of expandable content where one-at-a-time matters, reach for Accordion. For a separate panel that floats above content, use Popover.',import:"@gradeui/ui",aliases:["collapsible","expand","show more","disclosure","advanced settings","disclosure group","expandable section","expandable view","show hide"],subcomponents:["CollapsibleTrigger","CollapsibleContent"],composesWith:["Button (as the trigger","asChild)","Card (expandable settings group)","Row (header + chevron)"],props:{open:{schema:zod.z.boolean().optional(),design:"knob",description:"controlled open state"},defaultOpen:{schema:zod.z.boolean().optional(),design:"knob",description:"uncontrolled initial state"},onOpenChange:{schema:zod.z.unknown().optional(),design:"event"},children:{schema:zod.z.unknown(),design:"plumbing",description:"the clickable header (often a Button asChild)"}}};var Hn={name:"Command",description:'A searchable list of actions or destinations \u2014 global \u2318K palettes, "jump to" inputs, account switchers with filter. Wrap in CommandDialog when it should pop over the entire app on a hotkey. For straight forms with filter, prefer a Select with a search input. For free-text autocomplete tied to a single value, prefer Combobox built on Popover + Command.',import:"@gradeui/ui",aliases:["command palette","command menu","cmd k","quick switcher","action menu","spotlight","spotlight search","quick open","fuzzy finder"],subcomponents:["CommandInput","CommandList","CommandEmpty","CommandGroup","CommandItem","CommandSeparator","CommandShortcut","CommandDialog"],composesWith:["Dialog (CommandDialog wraps it)","Popover (inline combobox)","Tooltip"],props:{value:{schema:zod.z.string().optional(),design:"content",description:"controlled active item value"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},placeholder:{schema:zod.z.string().optional(),design:"content"},children:{schema:zod.z.unknown(),design:"plumbing",description:"wraps groups and empty state"},heading:{schema:zod.z.string().optional(),design:"content"},onSelect:{schema:zod.z.unknown().optional(),design:"event"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},open:{schema:zod.z.unknown(),design:"plumbing",description:"when you want the command palette mounted in a modal (cmd+k pattern)"}}};var In={name:"Composer",description:`THE PRIMITIVE for any text composition surface \u2014 Slack / Discord /
18
+ Teams chat input, AI chat / copilot prompt box, comment thread input,
19
+ GitHub / Linear / Jira comment box, Reddit / Twitter reply box,
20
+ Notion / Linear document body, email composer, post body, anywhere
21
+ a user types text and submits.
22
+
23
+ CONCRETE TEST \u2014 if you find yourself writing a \`<textarea>\` (or
24
+ \`<Input>\` styled tall) with a row of \`<Bold>\` / \`<Italic>\` /
25
+ \`<Paperclip>\` / \`<Send>\` buttons below or beside it, STOP. That is
26
+ \`<Composer>\`. Use it.
27
+
28
+ Common shapes:
29
+ Chat input with formatting + attachments + send
30
+ \u2192 <Composer formats={["bold","italic","code"]} toolbar attachments />
31
+ AI prompt box with paperclip + send
32
+ \u2192 <AIChatComposer /> (preset wrapping Composer)
33
+ Comment / reply input
34
+ \u2192 <ComposerReply triggers={[{char:"@", items: people}]} />
35
+ Document body editor
36
+ \u2192 <Composer toolbar formats={[...]} bare />
37
+
38
+ Built on Lexical for rich text, mentions, slash commands. The
39
+ \`attachments\` prop wires image paste + paperclip + chip preview row
40
+ with object URL lifecycle handled internally \u2014 don't roll that
41
+ plumbing yourself. The \`triggers\` prop wires @mentions and /slash
42
+ commands with a typeahead popover. The \`formats\` array picks which
43
+ toolbar buttons render when \`toolbar\` is on.
44
+
45
+ Shares the lib/demo step vocabulary with <Code> so scripted
46
+ typing/format/mention demos animate in the same rhythm as your
47
+ terminal demos.`,import:"@gradeui/ui",composesWith:["AIChatComposer (preset wrapping this with paperclip + send + attachments)","ComposerReply (preset for comment threads)","AIChat (uses AIChatComposer internally)","Card (host above for reply boxes)",'Avatar (in leftActions slot for "your" avatar next to the input)'],props:{placeholder:{schema:zod.z.string().optional(),design:"content"},initialText:{schema:zod.z.string().optional(),design:"content",description:"plain text content to seed on mount"},initialJson:{schema:zod.z.string().optional(),design:"content",description:"Lexical state JSON (from a previous onSubmit round-trip)"},formats:{schema:zod.z.unknown().optional(),design:"plumbing",description:"available formats (defaults to bold/italic/underline/strikethrough/code/h1/h2/blockquote/ul/ol); pass false for plain text only"},toolbar:{schema:zod.z.boolean().optional(),design:"knob",description:"show the formatting toolbar above the editor; default false"},triggers:{schema:zod.z.unknown().optional(),design:"plumbing",description:'mention/slash configs, eg. `[{ char: "@", items: people }, { char: "/", items: commands }]`'},attachments:{schema:zod.z.boolean().optional(),design:"knob",description:"enable image paste + paperclip when true/object; default off"},onSubmit:{schema:zod.z.unknown().optional(),design:"event"},isLoading:{schema:zod.z.boolean().optional(),design:"knob",description:"disables editor, swaps default Send for Stop"},onStop:{schema:zod.z.unknown().optional(),design:"event"},maxLength:{schema:zod.z.number().optional(),design:"knob"},autoFocus:{schema:zod.z.boolean().optional(),design:"plumbing"},submitOnEnter:{schema:zod.z.boolean().optional(),design:"knob",description:"default true (Shift-Enter still inserts newline)"},leftActions:{schema:zod.z.unknown().optional(),design:"plumbing",description:"override the default paperclip"},rightActions:{schema:zod.z.unknown().optional(),design:"plumbing",description:"override the default Send/Stop"},hideSend:{schema:zod.z.boolean().optional(),design:"knob",description:"hide the default Send without replacing it"},steps:{schema:zod.z.unknown().optional(),design:"plumbing",description:"scripted demo sequence"},trigger:{schema:zod.z.unknown().optional(),design:"plumbing",description:'"mount" | "inView" | "manual"; default "mount"'},play:{schema:zod.z.boolean().optional(),design:"knob",description:'for trigger="manual"'},speed:{schema:zod.z.unknown().optional(),design:"plumbing",description:'"slow" | "normal" | "fast"; default "normal"'},loop:{schema:zod.z.boolean().optional(),design:"knob"},loopDelay:{schema:zod.z.number().optional(),design:"knob",description:"ms between loop iterations, default 2000"},readOnly:{schema:zod.z.boolean().optional(),design:"knob",description:"disables editing AND focusability; programmatic playback still works; use for marketing demos so the script doesn't steal focus"},bare:{schema:zod.z.boolean().optional(),design:"knob",description:"strip the card chrome"},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var Fn={name:"DatePicker",description:'Any date or date-range entry. Use DatePicker for a single date (DOB, due date, booking). Use DateRangePicker for a span (report period, stay dates, filter window). Prefer these over <Input type="date"> \u2014 consistent theming, keyboard nav, a11y, and no browser-native UI drift.',import:"@gradeui/ui",aliases:["datepicker","calendar input","date field","date range","datepickerios","react native date picker","calendar input field","date field control"],subcomponents:["DateRangePicker"],composesWith:["Label","Form","Card (in CardContent)","Button (form submit)"],props:{value:{schema:zod.z.unknown().optional(),design:"plumbing"},onChange:{schema:zod.z.unknown().optional(),design:"event",description:"called on select or clear"},placeholder:{schema:zod.z.string().optional(),design:"content",description:'trigger label when empty (default "Pick a date" / "Pick a date range")'},disabled:{schema:zod.z.boolean().optional(),design:"knob"},format:{schema:zod.z.string().optional(),design:"content",description:'date-fns format token for the trigger label (default "PPP" single, "LLL dd, y" range)'},align:{schema:zod.z.enum(["start","center","end"]).optional(),design:"knob",description:'popover align (default "start")'},side:{schema:zod.z.enum(["top","right","bottom","left"]).optional(),design:"knob",description:"popover side"},captionLayout:{schema:zod.z.enum(["label","dropdown","dropdown-months","dropdown-years"]).optional(),design:"knob"},className:{schema:zod.z.string().optional(),design:"plumbing",description:"on the trigger button"},contentClassName:{schema:zod.z.string().optional(),design:"content",description:"on the PopoverContent"},icon:{schema:zod.z.unknown().optional(),design:"plumbing",description:"replaces the default CalendarIcon"},numberOfMonths:{schema:zod.z.number().optional(),design:"knob",description:"DateRangePicker only, default 2"}}};var Bn={name:"Dialog",description:'Modal interruptions \u2014 confirmations, focused forms, detail views, AI suggestion sheets. Dialog is the right primitive for Apple HIG / React Native "Alert" (modal) semantics. For non-blocking inline messaging use Callout; for transient notifications use Toaster (Sonner). Always include DialogTitle (a11y requirement).',import:"@gradeui/ui",aliases:["modal","popup","overlay","alert","system alert","alert dialog","modal dialog","confirm dialog","react native modal","rn alert","glass modal","frosted modal","ai suggestion modal"],subcomponents:["DialogTrigger","DialogContent","DialogHeader","DialogTitle","DialogDescription","DialogFooter","DialogClose"],composesWith:["Button (as DialogTrigger asChild","and inside DialogFooter)","Input/Textarea/Select inside DialogContent","Code (for changelog / diff modals)","MediaSurface (for image / preview modals)"],props:{open:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Radix controlled/uncontrolled pattern"},asChild:{schema:zod.z.enum(["wrap a Button"]).optional(),design:"plumbing"},surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the modal panel is *made of*. Defaults to `solid` (opaque `bg-background`). `glass` lets the page show through softly \u2014 pairs with rich backdrops or AI-suggestion modals."},accepts:{schema:zod.z.unknown(),design:"plumbing"},used:{schema:zod.z.unknown(),design:"plumbing"}}};var zn={name:"DropdownMenu",description:'A small action menu attached to a trigger \u2014 overflow "\u2026" buttons on cards, user-avatar menus in headers, "Insert" menus in editors. For a full searchable list, use Command. For ONE primary action plus a secondary, use a Button next to a smaller ghost Button instead of a dropdown.',import:"@gradeui/ui",aliases:["dropdown","dropdown menu","overflow menu","kebab menu","more menu","action menu","context-style menu","menu","pull-down menu","pulldown menu","context menu","popup menu","actions menu","glass menu","frosted menu","ios menu","hig menu"],subcomponents:["DropdownMenuTrigger","DropdownMenuContent","DropdownMenuItem","DropdownMenuCheckboxItem","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuGroup","DropdownMenuSub","DropdownMenuSubTrigger","DropdownMenuSubContent"],composesWith:["Button (as trigger asChild)","Avatar (user menu)","Card (overflow on a tile)","Tooltip (on the trigger)"],props:{open:{schema:zod.z.unknown().optional(),design:"plumbing"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"usually wraps a Button"},align:{schema:zod.z.enum(["start","center","end","top","right","bottom","left"]).optional(),design:"knob"},surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the menu surface is *made of*. `solid` (default) is `bg-popover`. `translucent` matches Apple HIG / iOS menu sheets. `glass` for menus floating over rich canvases."},onSelect:{schema:zod.z.unknown().optional(),design:"event"},DropdownMenuCheckboxItem:{schema:zod.z.unknown(),design:"plumbing"},DropdownMenuSub:{schema:zod.z.unknown(),design:"plumbing",description:"sub-trigger shows children, sub-content holds the deeper items"},children:{schema:zod.z.unknown(),design:"plumbing",description:"right-aligned kbd hint"}}};var On={name:"Flex",description:"The unopinionated flexbox primitive \u2014 reach for Flex when Stack, Row, or Grid don't quite fit. Specifically when you need reverse direction (`row-reverse` / `col-reverse`), CSS defaults instead of Row's baked-in `items-center gap-md`, or baseline alignment. Otherwise prefer Stack / Row / Grid \u2014 they're easier to read and tuned for the 95% case. Flex is the escape hatch, not the default.",import:"@gradeui/ui",aliases:["flex","flexbox","flex container","hstack","vstack","horizontal","vertical","generic container","layout view"],composesWith:["any content component"],props:{direction:{schema:zod.z.enum(["row","col","row-reverse","col-reverse"]).optional(),design:"knob",description:"main-axis direction",default:"row"},gap:{schema:zod.z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between children",default:"none"},align:{schema:zod.z.enum(["start","center","end","stretch","baseline"]).optional(),design:"knob",description:"cross-axis alignment",default:"stretch"},justify:{schema:zod.z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:"main-axis distribution",default:"start"},wrap:{schema:zod.z.enum(["nowrap","wrap","wrap-reverse"]).optional(),design:"knob",description:"wrap behaviour when children overflow",default:"nowrap"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing"}}};var Vn={name:"Grid",description:"2D layouts where Stack (vertical) and Row (horizontal) don't fit \u2014 stat-card grids, feature tiles, pricing columns, photo grids. Reach for Grid over hand-rolled `grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4` so the column count is a prop the settings panel can mutate and the responsive ladder stays consistent across designs.",import:"@gradeui/ui",aliases:["grid","tiles","cards grid","stat grid","columns","feature grid","grid view","lazy v grid","lazyvgrid","lazy h grid","lazyhgrid","tile grid","masonry"],composesWith:["Card","Stack (inside each cell)","Row","Button","any content component"],props:{cols:{schema:zod.z.enum(["1","2","3","4","5","6","12"]).optional(),design:"knob",description:'desktop column count; each value has a baked-in responsive ladder (e.g. "4" \u2192 1 col mobile, 2 tablet, 4 desktop)',default:"3"},gap:{schema:zod.z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between grid cells (same scale as Stack/Row)",default:"md"},align:{schema:zod.z.enum(["start","center","end","stretch"]).optional(),design:"knob",description:"cross-axis alignment of cells",default:"stretch"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing"}}};var _n={name:"HoverCard",description:"Rich preview content surfaced on hover \u2014 user profile mini-cards on @-mentions, link previews, definition popups, layer-thumbnail peeks. Pointer-only by design (no touch-friendly trigger); pair with a click target for touch devices, or fall back to Popover. NEVER use HoverCard for critical info \u2014 if the user can't reach it via keyboard or touch, it might as well not exist for accessibility.",import:"@gradeui/ui",aliases:["hover card","hover preview","mention preview","profile peek","link preview","rich tooltip","link preview card","profile hover","peek card","glass preview","frosted preview"],subcomponents:["HoverCardTrigger","HoverCardContent"],composesWith:["Avatar (user preview)","Card (richer content)","Link (the trigger)","MediaSurface (link/layer previews)","Code (snippet previews)"],props:{open:{schema:zod.z.unknown().optional(),design:"plumbing"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"usually a Link or Button"},side:{schema:zod.z.unknown().optional(),design:"plumbing"},surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the preview surface is *made of*. `solid` (default) is `bg-popover`. `glass` for hover previews over rich content (a media feed, a layout canvas)."}}};var Gn={name:"Input",description:"Any single-line text entry. Always pair with a Label for accessibility.",import:"@gradeui/ui",aliases:["text field","textbox","textfield","form field","text input","secure field","search field","url field","number field","textinput","text input field","react native textinput"],composesWith:["Label","Form","Card (in CardContent)","Button (form submit)"],props:{type:{schema:zod.z.string().optional(),design:"content"}}};var Wn={name:"Label",description:"Every Input / Textarea / Checkbox / Switch / RadioGroup. Always use htmlFor so clicking the label focuses the control.",import:"@gradeui/ui",aliases:["label","form label","field label","caption"],composesWith:["Input","Textarea","Checkbox","Switch","RadioGroup","Select"],props:{htmlFor:{schema:zod.z.string().optional(),design:"content",description:"binds to the input's id"}}};var Un={name:"Map",description:"Any layout that needs a real map \u2014 listings (real estate, Airbnb-style), fleet/logistics dashboards, store locators, anywhere a user picks a location from a viewport. Reach for the controlled `hoveredId` prop when a sibling list and the map need to highlight each other.",import:"@gradeui/ui",aliases:["map","maps","mapbox","maplibre","google maps","geo","location","latlng","coordinates","marker","pin","airbnb","listings","fleet","real estate","logistics","map view","mapkit","mapview","react native maps","rn maps"],subcomponents:["MapMarker"],composesWith:["Card (as marker content)","Badge","Avatar","Button","Row","Stack","Skeleton"],props:{provider:{schema:zod.z.unknown(),design:"plumbing",description:'"maplibre" (default, free, no key) | "mapbox" (needs accessToken) | "google" (needs apiKey). Switching is one prop change.'},center:{schema:zod.z.unknown(),design:"plumbing",description:"`[lng, lat]` tuple. ALWAYS lng first. Required."},zoom:{schema:zod.z.unknown(),design:"plumbing",description:"number, 0\u201322. Required."},bounds:{schema:zod.z.unknown(),design:"plumbing",description:"`[[swLng, swLat], [neLng, neLat]]`. When set, takes precedence over center+zoom."},appearance:{schema:zod.z.unknown(),design:"plumbing",description:'"light" | "dark" | "satellite" | "auto" (default "auto", follows GradeThemeProvider mode).'},hoveredId:{schema:zod.z.unknown(),design:"plumbing",description:'controlled string id, pairs with onHoveredIdChange. The matching MapMarker gets `data-gds-state="hovered"` automatically. This is how you build list \u2194 map two-way sync.'},interactive:{schema:zod.z.unknown(),design:"plumbing",description:"false freezes pan/zoom, useful for static cards."},onLoad:{schema:zod.z.unknown(),design:"event",description:"handle exposes flyTo, panTo, fitBounds, getCenter, getZoom, getBounds, instance."},tilerKey:{schema:zod.z.enum(["maplibre"]),design:"knob",description:"only needed off `gradeui.com`/`localhost`. Default key is referrer-locked."},accessToken:{schema:zod.z.enum(["mapbox), apiKey (google"]),design:"knob",description:"required for those providers."}}};var Wd=zod.z.object({kind:zod.z.literal("album"),artist:zod.z.string(),title:zod.z.string(),year:zod.z.number().optional(),description:zod.z.string().optional()}),Ud=zod.z.object({kind:zod.z.literal("tv-show"),title:zod.z.string(),year:zod.z.number().optional(),description:zod.z.string().optional()}),jd=zod.z.object({kind:zod.z.literal("movie"),title:zod.z.string(),year:zod.z.number().optional(),description:zod.z.string().optional()}),$d=zod.z.object({kind:zod.z.literal("game"),title:zod.z.string(),description:zod.z.string().optional()}),Kd=zod.z.object({kind:zod.z.literal("book"),title:zod.z.string().optional(),author:zod.z.string().optional(),isbn:zod.z.string().optional(),description:zod.z.string().optional()}),qd=zod.z.object({kind:zod.z.literal("poster"),title:zod.z.string(),year:zod.z.number().optional(),description:zod.z.string().optional()}),Yd=zod.z.object({kind:zod.z.literal("portrait"),name:zod.z.string().optional(),role:zod.z.string().optional()}),Zd=zod.z.object({kind:zod.z.literal("landscape"),location:zod.z.string().optional(),mood:zod.z.string().optional()}),Xd=zod.z.object({kind:zod.z.literal("product"),name:zod.z.string().optional(),brand:zod.z.string().optional()}),Jd=zod.z.object({kind:zod.z.literal("food"),dish:zod.z.string().optional(),cuisine:zod.z.string().optional()}),Qd=zod.z.object({kind:zod.z.literal("generic"),prompt:zod.z.string()}),ec=zod.z.union([zod.z.object({kind:zod.z.literal("video")}),zod.z.object({kind:zod.z.literal("audio")}),zod.z.object({kind:zod.z.literal("embed")}),zod.z.object({kind:zod.z.literal("3d")})]),tc=zod.z.union([Wd,Ud,jd,$d,Kd,qd,Yd,Zd,Xd,Jd,Qd,ec]),oc=zod.z.enum(["video","square","portrait","wide","auto"]),rc=zod.z.enum(["none","sm","md","lg","xl"]),ac=zod.z.enum(["album","tv-show","movie","game","book","portrait","landscape","poster","product","food","video","audio","embed","3d","generic"]),nc=zod.z.union([zod.z.literal("auto"),zod.z.literal("icon"),zod.z.literal("none")]),ma={name:"MediaSurface",description:"The canonical media slot for ALL non-person imagery \u2014 album art, posters, hero images, landscape photos, video and 3D containers.",when:"Pass `hint` + `alt` + (optionally) `source` so the empty-state placeholder is meaningful and the generation pipeline can later fill the slot with a real image. Use directly for declarative slots; the higher-level VideoPlayer / RivePlayer / ThreeScene wrap this for runtime-heavy media.",antipatterns:["Don't wrap <Avatar> inside <MediaSurface> to get an initials fallback. Set `alt` + `hint` on MediaSurface directly \u2014 the placeholder renders initials at small sizes derived from `alt`.","Don't use <Avatar> for album art, posters, products, food, landscapes, etc. Avatar is for PEOPLE only.","Don't inline manual gradient backgrounds (`bg-gradient-to-br \u2026`) on MediaSurface as a 'placeholder vibe' \u2014 the empty-state is already styled via `--gds-media-placeholder-bg/-fg` tokens."],composesWith:["Card","CardBlock","MediaBlock","VideoPlayer","RivePlayer","ThreeScene"],aliases:["media","image slot","media slot","image placeholder","cover","thumbnail","poster slot"],import:"@gradeui/ui",props:{hint:{schema:ac.optional(),design:"knob",control:"glyph-picker",label:"Slot kind",description:"Picks the placeholder glyph + the default aspect + the future generation provider. Defaults to 'generic'.",default:"generic",examples:["album","portrait","landscape","poster"]},aspect:{schema:oc.optional(),design:"knob",control:"toggle-group",label:"Aspect ratio",description:"Override the slot's natural framing. When omitted, derived from `hint`: album/product/food \u2192 square, portrait/poster \u2192 portrait, landscape \u2192 wide, video/audio/embed/generic \u2192 video."},radius:{schema:rc.optional(),design:"knob",control:"toggle-group",label:"Corner radius",default:"lg",description:"Driven by the `--gds-media-radius` CSS variable."},border:{schema:zod.z.boolean().optional(),design:"knob",label:"Show border",default:false},loading:{schema:zod.z.boolean().optional(),design:"knob",label:"Loading state",default:false,description:"Overlays the muted-pulse skeleton on top of the slot."},emptyState:{schema:nc.optional(),design:"knob",control:"select",label:"Empty state",default:"auto",description:"'auto' renders the size-tiered placeholder (initials \u2192 glyph \u2192 glyph + caption). 'icon' is a legacy alias. 'none' renders a truly empty surface."},alt:{schema:zod.z.string().optional(),design:"content",control:"text",label:"Alt text",description:"Becomes the eventual `<img alt>`. Also drives the placeholder caption (>160px slots) and the 2-letter initials fallback (<64px slots).",examples:["Travelling Without Moving \u2014 Jamiroquai","Sunset over Mount Fuji"]},src:{schema:zod.z.string().url().optional(),design:"content",control:"url",label:"Image URL",description:"When set, renders an `<img>` filling the slot via object-cover. The wrapper keeps its aspect/radius/border. Generators patch this prop; manual values always win."},source:{schema:tc.optional(),design:"structured",label:"Source descriptor",description:"Structured metadata for the generation pipeline. Opaque to MediaSurface itself; read by the resolver to look up real imagery from the right provider (MusicBrainz / Pollinations / etc.).",perKindFields:{album:{artist:"string",title:"string",year:"number?"},poster:{title:"string",year:"number?"},portrait:{name:"string?",role:"string?"},landscape:{location:"string?",mood:"string?"},product:{name:"string?",brand:"string?"},food:{dish:"string?",cuisine:"string?"},generic:{prompt:"string"},video:{},audio:{},embed:{},"3d":{}}},className:{schema:zod.z.string().optional(),design:"plumbing"},style:{schema:zod.z.record(zod.z.string(),zod.z.unknown()).optional(),design:"plumbing"},children:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Escape hatch for putting a custom <video>, <canvas>, Rive runtime, etc. inside. When supplied, the placeholder is suppressed."},overlay:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Decorative layer rendered ABOVE the media/placeholder (play buttons, hover gradients, corner badges). Does NOT suppress the placeholder."},glyph:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Per-instance override of the hint-derived placeholder glyph. Most consumers should pick a `hint` and let the map decide."},fallback:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Custom node shown while `loading` is true."},onVisibilityChange:{schema:zod.z.function().optional(),design:"event",description:"Fires when the surface enters / leaves the viewport (IntersectionObserver)."}},actions:{fill:{label:"Fill image",icon:"Sparkles",description:"Resolve this slot's source via the free providers (MusicBrainz \u2192 Pollinations \u2192 Picsum) and patch the result into the runtime URL map.",kind:"resolve-media-source",enabledWhen:{propPresent:"source"}},refresh:{label:"Refresh",icon:"RotateCw",description:"Re-fetch this slot's resolved URL (cache-busts the browser AND the local URL map). Useful when a Pollinations URL failed to load on first hit \u2014 Pollinations has typically finished its cold-start by now, so a retry usually succeeds.",kind:"refresh-media-source",enabledWhen:{propPresent:"source"}}}};var jn={name:"Message",description:`The canonical "avatar + author + timestamp + body" row. THE PRIMITIVE
48
+ for any chat surface, comment thread, post-reply, activity log, or
49
+ notification feed that follows the people-and-text shape.
50
+
51
+ CONCRETE TEST \u2014 if you find yourself composing an \`<Avatar>\` followed
52
+ by a \`<Row>\` of author name + timestamp, with a \`<p>\` or \`<span>\`
53
+ body below, STOP. That is \`<Message>\`. Reach for it directly.
54
+
55
+ Slack-style channel feed, Discord messages, Teams chat, Linear /
56
+ GitHub / Jira comments, Reddit replies, Twitter/X posts in a thread,
57
+ Notion comment sidebars, in-app activity logs, notification rows \u2014
58
+ every one of these IS \`<Message>\`. Do not roll the layout inline.
59
+
60
+ For non-people activity (system events, log lines, status pings) use
61
+ Callout or a plain Row instead \u2014 Message implies a human author.`,import:"@gradeui/ui",composesWith:['Avatar (in the avatar slot \u2014 pair with AvatarFallback tone="..." for stable per-author colour)',"Badge (in the badge slot for role / OP / bot tags)","Button (in actions",'typically size="icon" + variant="ghost")',"Stack (host multiple Messages in a thread)","Card (wrap a Stack of Messages for a comment-thread block)"],props:{author:{schema:zod.z.string(),design:"content",description:"display name of the message author"},timestamp:{schema:zod.z.unknown().optional(),design:"plumbing",description:'string ("11:24", "2 hours ago") or any node for custom formatting'},avatar:{schema:zod.z.unknown().optional(),design:"plumbing",description:"slot for any `<Avatar>` composition; omit for grouped messages from the same author"},badge:{schema:zod.z.unknown().optional(),design:"plumbing",description:"small chip(s) next to the author name (OP, Bot, Admin, role tag)"},edited:{schema:zod.z.boolean().optional(),design:"knob",description:'renders "(edited)" hint next to timestamp; pass a string to customise ("(edited 2 minutes ago)")'},pinned:{schema:zod.z.boolean().optional(),design:"knob",description:'renders a pin glyph + "Pinned" label above the header row for sticky / pinned messages'},actions:{schema:zod.z.unknown().optional(),design:"plumbing",description:"end-of-header slot, typically hover-revealed icon buttons (reply / react / more)"},reactions:{schema:zod.z.unknown().optional(),design:"plumbing",description:"slot below the body, typically a Row of reaction chips (emoji + count)"},threadCount:{schema:zod.z.number().optional(),design:"knob",description:'renders a "N replies" link affordance below the body'},onThreadClick:{schema:zod.z.unknown().optional(),design:"event",description:"handler for the threadCount affordance"},align:{schema:zod.z.enum(["start","end"]).optional(),design:"knob",description:'`start` (default) puts the avatar on the left; `end` mirrors for "your messages" in DM threads'},children:{schema:zod.z.unknown(),design:"plumbing",description:"body content (plain text or rich nodes)"},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var $n={name:"MultiSelect",description:`Picking multiple items from a finite list \u2014 tag selectors, filter chips,
18
62
  "share with N people", multi-region settings.
19
63
 
20
64
  **This is the answer for ANY "removable-chips-inside-an-input" pattern.**
@@ -32,7 +76,7 @@ already covers the trigger-with-badges shape.
32
76
 
33
77
  Use \`<Select>\` instead for SINGLE selection. Use \`<Command>\` directly
34
78
  (no MultiSelect wrapper) when the option set is unbounded or async
35
- (users to @-mention, email recipients, search-as-you-type API results).`,import:"@gradeui/ui",composesWith:["Popover","Command","Badge","Checkbox-style row indicator","Separator"],props:{options:{schema:zod.z.unknown(),design:"plumbing"},value:{schema:zod.z.string().optional(),design:"content",description:"controlled selection"},defaultValue:{schema:zod.z.string().optional(),design:"content",description:"uncontrolled initial selection"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},placeholder:{schema:zod.z.string().optional(),design:"content",default:"Select\u2026"},searchPlaceholder:{schema:zod.z.string().optional(),design:"content",default:"Search\u2026"},emptyMessage:{schema:zod.z.string().optional(),design:"content",default:"Nothing matches."},maxCount:{schema:zod.z.number().optional(),design:"knob",description:'badges shown on the trigger before collapsing to "+N more"'},searchable:{schema:zod.z.boolean().optional(),design:"knob",description:"hide for short option lists",default:true},badgeDismissible:{schema:zod.z.boolean().optional(),design:"knob",description:"show \xD7 on each selected badge",default:true},disabled:{schema:zod.z.boolean().optional(),design:"knob"},modalPopover:{schema:zod.z.boolean().optional(),design:"knob",description:"Popover modal mode",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var Ja={name:"Popover",description:'A floating panel anchored to a trigger that contains interactive content \u2014 date pickers, color pickers, filter pickers, "more info" panels, inline forms. Differs from Tooltip (hover-only, no focusable content) and Dialog (modal, blocks the page). DatePicker, DateRangePicker, and the Combobox pattern all compose Popover internally.',import:"@gradeui/ui",aliases:["popover","dropdown panel","floating panel","inline editor","attached panel","filter pop","popover view","popoverpresentation","attached popover"],subcomponents:["PopoverTrigger","PopoverContent","PopoverAnchor"],composesWith:["Button (as trigger)","Calendar (date picker)","Command (combobox)","Form controls (inline edit popover)"],props:{open:{schema:zod.z.unknown().optional(),design:"plumbing"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"usually a Button"},side:{schema:zod.z.enum(["top","right","bottom","left","start","center","end"]).optional(),design:"knob"}}};var Qa={name:"Progress",description:"Determinate progress \u2014 file uploads, multi-step forms, quota meters. Indeterminate state \u2192 use Skeleton or animated Loader icon.",import:"@gradeui/ui",aliases:["progress","progress view","progress indicator","progress bar","determinate progress","loading bar","completion bar"],composesWith:["Card (as a section)","Badge (showing % next to it)","Label (describing what's loading)"],props:{value:{schema:zod.z.number().optional(),design:"knob",description:"percent complete"},max:{schema:zod.z.number().optional(),design:"knob"},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var en={name:"RadioGroup",description:"A small set of mutually-exclusive options where the user needs to SEE all of them at once \u2014 pricing tiers (3-4 options), shipping speed, payment method radio cards. For 5+ options use Select. For a segmented control as part of a toolbar use ToggleGroup. For yes/no use Switch.",import:"@gradeui/ui",aliases:["radio group","radio buttons","single-choice","pricing options","payment method","radio buttons","radio control","single-select"],subcomponents:["RadioGroupItem"],composesWith:["Label (paired with each item via htmlFor)","Stack (vertical list)","Card (radio card pattern)"],props:{value:{schema:zod.z.string().optional(),design:"content",description:"controlled selection"},defaultValue:{schema:zod.z.string().optional(),design:"content",description:"uncontrolled initial"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},orientation:{schema:zod.z.enum(["horizontal","vertical"]).optional(),design:"knob",default:"vertical"},name:{schema:zod.z.string().optional(),design:"content",description:"form name when posting natively"},id:{schema:zod.z.string().optional(),design:"plumbing",description:"pair with a <Label htmlFor> for click-on-label"}}};var tn={name:"Resizable",description:`A multi-pane layout where the user wants to drag the divider \u2014 Slack/Mail-style list+detail, IDE editor+terminal, side-by-side compare view. Static layouts shouldn't use this \u2014 reach for AppShell with nav="three-pane" (fixed widths) or Grid (responsive ladder). Built on react-resizable-panels under the hood.`,import:"@gradeui/ui",aliases:["resizable","splitter","split pane","drag divider","adjustable panels","resizer","split view","draggable divider","split pane resizer","ns split view"],subcomponents:["ResizablePanelGroup","ResizablePanel","ResizableHandle"],composesWith:["AppShellMain (host the splitter inside main)","ScrollArea (each panel's content)","Card"],props:{direction:{schema:zod.z.enum(["horizontal","vertical"]),design:"knob",description:"required; sets the axis the user drags along"},autoSaveId:{schema:zod.z.string().optional(),design:"content",description:"persists user-adjusted sizes to localStorage under this id"},onLayout:{schema:zod.z.unknown().optional(),design:"event"},defaultSize:{schema:zod.z.number().optional(),design:"knob",description:"percent of group (0-100); siblings should sum to ~100"},minSize:{schema:zod.z.unknown().optional(),design:"plumbing",description:"percent bounds"},collapsible:{schema:zod.z.boolean().optional(),design:"knob",description:"allow this panel to collapse to zero"},collapsedSize:{schema:zod.z.unknown().optional(),design:"plumbing",description:"collapse behaviour controls"},withHandle:{schema:zod.z.boolean().optional(),design:"knob",description:"show a visible drag affordance (default just a hit-zone)"}}};var on={name:"RivePlayer",description:"Rive runtime wrapped in the shared media surface. Reach for Rive when you need interactive state-machine animations driven by scroll/hover/input. For non-interactive looping video, use VideoPlayer; for shader-driven backgrounds, use ThreeScene.",import:"@gradeui/ui",aliases:["rive","riv","animation","animated","lottie"],composesWith:["MediaSurface (internal)","Card","any container"],props:{src:{schema:zod.z.string(),design:"content",description:"URL or path to the .riv file"},stateMachines:{schema:zod.z.string().optional(),design:"content",description:"state machine(s) to run"},artboard:{schema:zod.z.string().optional(),design:"content",description:"artboard name; omit to use default"},controls:{schema:zod.z.boolean().optional(),design:"knob",description:"viewer mode by default; set true for play/pause overlay",default:false},autoPlay:{schema:zod.z.boolean().optional(),design:"knob",description:"respects reduced-motion",default:true},loop:{schema:zod.z.boolean().optional(),design:"knob",default:true},pauseOffscreen:{schema:zod.z.boolean().optional(),design:"knob",default:true},fit:{schema:zod.z.enum(["contain","cover","fill","fitWidth","fitHeight","none"]).optional(),design:"knob",default:"contain"},stateMachineInputs:{schema:zod.z.unknown().optional(),design:"plumbing"},aspect:{schema:zod.z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"square"},radius:{schema:zod.z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",default:"lg"},poster:{schema:zod.z.string().optional(),design:"content",description:"image shown while the runtime loads"}}};var rn={name:"Row",description:"Horizontal composition \u2014 button groups, inline form rows, logo + nav rows, anything on one line. Reach for Row instead of `flex items-center gap-*` so the alignment and spacing are editable through the settings panel. For two-pane layouts with an explicit ratio (sidebar + content, 1/3 + 2/3) use Split instead \u2014 Row evenly flows whatever children it holds.",import:"@gradeui/ui",aliases:["row","hstack","horizontal","inline","horizontal layout","hstack","h-stack","horizontal stack","lazyhstack"],composesWith:["Button","Input","NavItem","Stack (can wrap a Row)","any content component"],props:{gap:{schema:zod.z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between children",default:"md"},align:{schema:zod.z.enum(["start","center","end","stretch","baseline"]).optional(),design:"knob",description:"cross-axis (vertical) alignment",default:"center"},justify:{schema:zod.z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:"main-axis distribution",default:"start"},wrap:{schema:zod.z.boolean().optional(),design:"knob",description:"allow children to wrap onto additional lines when they overflow",default:false},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing"}}};var an={name:"ScrollArea",description:"Bounded content that needs custom scroll chrome \u2014 sidebars with long item lists, chat transcripts, table panels inside a dashboard, anywhere the OS scrollbar would feel out of place against the design tokens. The wrapping element has to have a height constraint (`h-`, `max-h-`, or grid row sizing) or nothing scrolls \u2014 scroll-area can't infer a bound on its own. For body-level scrolling, leave the document to the browser.",import:"@gradeui/ui",aliases:["scroll area","scroll container","custom scrollbar","sidebar scroll","panel scroll","scroll view","scrollview","react native scrollview"],subcomponents:["ScrollBar"],composesWith:["Card (long card body)","AppShellNav (long sidebar)","Sheet (long modal body)","Table (sticky-header scrolling list)"],props:{type:{schema:zod.z.enum(["auto","always","scroll","hover"]).optional(),design:"knob",description:"when the scrollbar shows"},scrollHideDelay:{schema:zod.z.number().optional(),design:"knob",description:'ms before "scroll"/"hover" scrollbars fade'},dir:{schema:zod.z.enum(["ltr","rtl"]).optional(),design:"plumbing"},className:{schema:zod.z.string().optional(),design:"plumbing",description:"set a height/max-height here, otherwise nothing scrolls"},orientation:{schema:zod.z.enum(["vertical","horizontal"]).optional(),design:"knob",default:"vertical"}}};var nn={name:"Select",description:"Single-choice from 3+ known options. Fewer than 3 \u2192 RadioGroup. Huge list with search \u2192 use a Combobox (not in DS yet). Multi-select \u2192 not supported by this primitive.",import:"@gradeui/ui",aliases:["dropdown","combobox","picker","select","pop-up button","popup button","popup picker","picker view","rnpickerselect","react native picker","native picker"],subcomponents:["SelectTrigger","SelectValue","SelectContent","SelectItem","SelectGroup","SelectLabel","SelectSeparator"],composesWith:["Label (above SelectTrigger)","Form","Card"],props:{value:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Radix root"},wraps:{schema:zod.z.unknown(),design:"plumbing"},placeholder:{schema:zod.z.string().optional(),design:"content",description:"text when nothing is selected"},accepts:{schema:zod.z.unknown(),design:"plumbing"}}};var sn={name:"Separator",description:"Light divider between sibling blocks in a Card, list, or header. For section-level partition use extra spacing instead.",import:"@gradeui/ui",aliases:["divider","rule","hr","line","horizontal rule"],composesWith:["Card (between CardHeader/Content/Footer)","navigation menus","any vertical stacks"],props:{orientation:{schema:zod.z.enum(["horizontal","vertical"]).optional(),design:"knob",description:'default "horizontal"'},decorative:{schema:zod.z.boolean().optional(),design:"knob",description:"hide from a11y tree",default:true},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var ln={name:"ShaderPresetPicker",description:"Runtime gallery of shader presets \u2014 click to select. Use with ThreeScene as a controlled input so the user can pick a background shader. For a single preview card, use ShaderPresetPreview directly.",import:"@gradeui/ui",aliases:["shader picker","preset picker","shader gallery","preset gallery"],composesWith:["ShaderPresetPreview (internal)","ThreeScene (the typical downstream consumer)"],props:{value:{schema:zod.z.string().optional(),design:"content",description:"currently selected preset id (controlled)"},onChange:{schema:zod.z.unknown().optional(),design:"event",description:"called when the user clicks a preset card"},filterTags:{schema:zod.z.string().optional(),design:"content",description:'only show presets matching at least one tag ("space" | "retro" | "motion" | "hero" | "background" \u2026)'},live:{schema:zod.z.enum(["never","hover","always"]).optional(),design:"knob",description:"thumbnail render mode",default:"hover"},postPreset:{schema:zod.z.string().optional(),design:"content",description:"shared post-FX preset applied to every thumbnail"},palette:{schema:zod.z.unknown().optional(),design:"plumbing",description:"shared palette applied to every thumbnail"},columns:{schema:zod.z.unknown().optional(),design:"plumbing",description:"grid columns at md+ breakpoint"}}};var dn={name:"ShaderPresetPreview",description:"Thumbnail-sized preview card for a shader preset. Defaults to a cheap static placeholder until hovered, at which point the live WebGL render kicks in. Use directly when you want a single preset card; use ShaderPresetPicker for a filterable grid.",import:"@gradeui/ui",aliases:["shader preview","preset preview","shader card"],composesWith:["ThreeScene (internal)","ShaderPresetPicker (wraps this)"],props:{preset:{schema:zod.z.string(),design:"content",description:"shader preset id from the registry"},live:{schema:zod.z.enum(["never","hover","always"]).optional(),design:"knob",description:"when to run the live WebGL render",default:"hover"},postPreset:{schema:zod.z.string().optional(),design:"content",description:"override the preset's default post-FX"},palette:{schema:zod.z.unknown().optional(),design:"plumbing",description:"palette overrides for the preview"},aspect:{schema:zod.z.enum(["video","square","portrait","wide"]).optional(),design:"knob",default:"video"},hideLabel:{schema:zod.z.boolean().optional(),design:"knob",description:"hide the label strip under the preview",default:false},onClick:{schema:zod.z.unknown().optional(),design:"event"}}};var cn={name:"Sheet",description:"A panel that slides in from a screen edge \u2014 mobile nav drawers, side panels for editing a single record without leaving the list, filter trays on small viewports. For a centered focus modal use Dialog. For a transient announcement use Toast (Sonner). For inline reveals use Collapsible.",import:"@gradeui/ui",aliases:["sheet","drawer","side panel","slide-in","nav drawer","mobile drawer","slide-over","action sheet","modal sheet","bottom sheet","side sheet","react native modal sheet","bottom-sheet","ios action sheet"],subcomponents:["SheetTrigger","SheetContent","SheetHeader","SheetTitle","SheetDescription","SheetFooter","SheetClose"],composesWith:["Form controls (an inline edit sheet)","Button (trigger + close)","AppShellNav (mobile-only swap)"],props:{open:{schema:zod.z.unknown().optional(),design:"plumbing"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing"},side:{schema:zod.z.enum(["top","right","bottom","left"]).optional(),design:"knob",default:"right"},className:{schema:zod.z.string().optional(),design:"plumbing",description:"usually set a width (right/left) or height (top/bottom)"},SheetTitle:{schema:zod.z.unknown(),design:"plumbing"}}};var pn={name:"Sidebar",description:'Vertical app navigation. Drop inside `<AppShellNav placement="side">` for full-page layouts. Compound API \u2014 `<SidebarHeader>` for brand, `<SidebarContent>` for the scrollable body of `<SidebarSection>` + `<SidebarItem>` rows, `<SidebarFooter>` for user / settings chrome. For top nav reach for TopMenu; for command-palette style search reach for Command.',import:"@gradeui/ui",aliases:["sidebar","side menu","sidemenu","navigation sidebar","app sidebar","side nav","side nav rail","master pane","sidebarmenu","navigation rail","react native drawer"],subcomponents:["SidebarHeader","SidebarContent","SidebarFooter","SidebarSection","SidebarItem"],composesWith:["AppShell (inside AppShellNav)","Avatar (in Footer)","Tooltip (auto-wrapped on collapsed items)","Button (asChild for custom routing)"],props:{collapsed:{schema:zod.z.boolean().optional(),design:"knob",description:"controlled collapsed state (wire onCollapsedChange when set)"},defaultCollapsed:{schema:zod.z.boolean().optional(),design:"knob",description:"uncontrolled initial value (default false)"},onCollapsedChange:{schema:zod.z.unknown().optional(),design:"event"},collapsible:{schema:zod.z.boolean().optional(),design:"knob",description:"show the affordance for the user to collapse (default true)"},variant:{schema:zod.z.enum(["rail","panel"]).optional(),design:"knob",description:"outer chrome \u2014 `rail` (default) sits flush against an adjacent surface with a single right-border + tracked width; `panel` is a card-style floating sidebar with full border + rounded corners and width inherited from the parent flex/grid track."},any:{schema:zod.z.unknown(),design:"plumbing",description:"brand / logo / org switcher; hides nothing when collapsed (centred)"},title:{schema:zod.z.unknown().optional(),design:"plumbing",description:'group label; **uppercase tracking-wide muted** styling auto-applied (Notion / Linear / Slack-style "GAMES", "FAVORITES", "WORKSPACE" headers); hidden when sidebar is collapsed'},icon:{schema:zod.z.unknown().optional(),design:"plumbing",description:"optional icon beside the title"},trailing:{schema:zod.z.unknown().optional(),design:"plumbing",description:`Right-edge action slot. On **SidebarSection**: the canonical "+" / "..." header affordance (Notion's "+ Add page", Linear's "+" next to Favorites). On **SidebarTreeItem**: a sibling-of-button slot for settings cog / more-actions / '+ add child'; vertically centered against the row; click events stopPropagation'd so taps don't toggle expand. Branch row exposes \`group/row\` named-group, so consumer can use \`hidden group-hover/row:flex\` for hover-only visibility scoped to the branch alone.`},defaultExpanded:{schema:zod.z.boolean().optional(),design:"knob",description:"initial open state (default true)"},badge:{schema:zod.z.unknown().optional(),design:"plumbing",description:"trailing count / label (hidden when collapsed)"},active:{schema:zod.z.boolean().optional(),design:"knob",description:'current route; adds aria-current="page"'},href:{schema:zod.z.string().optional(),design:"content",description:"renders as <a>; for routing use `asChild` with your link component"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"wrap a custom link (<Link href> from Next.js etc.) via Radix Slot"},asButton:{schema:zod.z.boolean().optional(),design:"knob",description:"render as <button> for action rows (open dialog, log out)"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},collapsedLabel:{schema:zod.z.unknown().optional(),design:"plumbing",description:"tooltip override when sidebar is collapsed (defaults to children text)"},size:{schema:zod.z.enum(["sm","md"]).optional(),design:"knob",description:"row size \u2014 `md` (default) is the standard `text-sm font-medium` nav row; `sm` is `text-xs` + lighter weight + tighter padding for visually subordinate rows (nested screens, sub-pages). Active state still wins on color + weight."},description:{schema:zod.z.unknown().optional(),design:"plumbing",description:"secondary line under the label \u2014 `Edited 2m ago`, `12 items`, etc. Layout stacks label + description; icon vertically centered against stack; badge stays trailing. Hidden when sidebar collapsed."}}};var mn={name:"Skeleton",description:'Loading placeholder for content whose shape you know. Set width/height via className to mimic the real content (e.g. "h-4 w-32"). Not a spinner \u2014 use it where the real thing will drop in.',import:"@gradeui/ui",aliases:["placeholder","shimmer","loader","loading state","redacted","redacted placeholder","shimmer placeholder","content placeholder","lottie placeholder"],composesWith:["Card","Avatar (inside a Skeleton for avatar loading)","any layout"],props:{className:{schema:zod.z.string().optional(),design:"plumbing",description:"required in practice; supply width/height utilities"}}};var un={name:"Slider",description:'A continuous-ish numeric pick \u2014 volume, opacity, font size, price-range filters. Use a single-thumb slider for one value, two-thumb for a range. For a small set of discrete options (1-5 stars, sm/md/lg) prefer ToggleGroup. For free-text numeric entry use an Input type="number".',import:"@gradeui/ui",aliases:["slider","range slider","range input","volume","opacity slider","scrub","drag value","slider control","value slider","react native slider"],composesWith:["Label (mandatory above)","Row (label + current value display)","Card (settings rows)"],props:{value:{schema:zod.z.number().optional(),design:"knob",description:"controlled value; ALWAYS an array even for a single-thumb slider (`[50]`)"},defaultValue:{schema:zod.z.number().optional(),design:"knob",description:"uncontrolled initial; `[20, 80]` for a two-thumb range"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},min:{schema:zod.z.number().optional(),design:"knob"},max:{schema:zod.z.number().optional(),design:"knob"},step:{schema:zod.z.number().optional(),design:"knob"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},orientation:{schema:zod.z.enum(["horizontal","vertical"]).optional(),design:"knob",default:"horizontal"},dir:{schema:zod.z.enum(["ltr","rtl"]).optional(),design:"plumbing"},inverted:{schema:zod.z.boolean().optional(),design:"knob",description:"flip the visual direction"},name:{schema:zod.z.string().optional(),design:"content",description:"form name when posting natively"}}};var gn={name:"Sortable",description:"Drag-to-reorder lists, kanban-column reordering, sortable shelves, tab strips the user can rearrange. Pairs with any layout primitive \u2014 Stack for vertical lists, Row for horizontal strips, Grid for 2D card walls. For cross-container drag (drag a card from one column to another) hand-roll DndContext at the page level \u2014 Sortable v1 covers single-list reorder; Sortable.Group for cross-container is a planned follow-up. Reach for raw `@dnd-kit/core` if you need custom collision detection, drag overlays with arbitrary chrome, or non-list use cases (kanban swimlanes, draggable canvas nodes).",import:"@gradeui/ui",aliases:["sortable","reorder","drag and drop","dnd","draggable list","sortable list","kanban","drag to reorder","drag-drop","dragdroplist","drag handle","react native draggable flatlist"],subcomponents:["Sortable.Item","Sortable.Handle"],composesWith:["Stack (vertical lists)","Row (horizontal strips)","Grid (2D card walls)","Card (typical item content)","Button (as Sortable.Handle asChild)"],props:{values:{schema:zod.z.unknown(),design:"plumbing",description:"ordered list of unique ids; the source of truth for the order"},onReorder:{schema:zod.z.unknown().optional(),design:"event",description:"fires with the new order after a drag that changed it"},strategy:{schema:zod.z.enum(["vertical","horizontal","grid"]).optional(),design:"knob",description:"match the layout your items render in",default:"vertical"},disabled:{schema:zod.z.boolean().optional(),design:"knob",description:"disable drag on every item"},Sortable:{schema:zod.z.unknown(),design:"plumbing",description:"must match one entry in the parent `values` array (identity, not React key)"}}};var fn={name:"Stack",description:"Default top-level layout inside the main slot when composing two or more stacked regions (hero + content + footer, auth card + subtext, etc.). Prefer Stack over hand-rolled `flex flex-col gap-*` so the vertical rhythm is editable through the settings panel.",import:"@gradeui/ui",aliases:["stack","vstack","vertical","column","vertical layout","v-stack","vertical stack","lazyvstack"],composesWith:["Section","Row","Split","Hero","any content component"],props:{gap:{schema:zod.z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"vertical gap between children",default:"md"},align:{schema:zod.z.enum(["start","center","end","stretch"]).optional(),design:"knob",description:"cross-axis (horizontal) alignment of children",default:"stretch"},justify:{schema:zod.z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:'main-axis (vertical) distribution. Reach for this on absolute-positioned overlays (`justify="end"` pins children to the bottom) and split footers (`justify="between"`).',default:"start"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot, so `<Stack asChild><section>\u2026</section></Stack>` stamps Stack's classes onto the `<section>` rather than nesting a wrapper div",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing"}}};var hn={name:"Switch",description:'Instant on/off setting ("Enable notifications", "Dark mode"). Commits on toggle \u2014 no submit button needed. For selecting-from-a-list use Checkbox.',import:"@gradeui/ui",aliases:["toggle","switch","on/off switch","ios toggle","toggle switch","switch control","react native switch"],composesWith:["Label (via htmlFor)","Card (settings rows)"],props:{checked:{schema:zod.z.boolean().optional(),design:"knob"},onCheckedChange:{schema:zod.z.unknown().optional(),design:"event"},defaultChecked:{schema:zod.z.boolean().optional(),design:"knob"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},id:{schema:zod.z.string().optional(),design:"plumbing"}}};var vn={name:"Table",description:"Structured tabular data \u2014 rows \xD7 columns with alignment requirements. NOT a layout grid \u2014 for that use div+Tailwind grid utilities. Keep to <100 rows; larger datasets need virtualisation (not in DS).",import:"@gradeui/ui",aliases:["table","table view","data table","datatable","grid view","data grid","rows and columns"],subcomponents:["TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption"],composesWith:["Card (wrap the table)","Badge (inside TableCell for status)","Checkbox (row selection)","Button (row actions)"],props:{Each:{schema:zod.z.unknown(),design:"plumbing"},No:{schema:zod.z.unknown(),design:"plumbing",description:"styling follows the active theme tokens"}}};var yn={name:"Tabs",description:'A small set of peer views within one surface (2\u20135 tabs). For primary nav use Side Menu/routing. For filters use a filter control, not tabs. Pick `variant="pill"` for app chrome (settings panels, in-card tab strips). Pick `variant="underlined"` for marketing/docs pages and browser-tab-style treatments.',import:"@gradeui/ui",aliases:["tabs","tab strip","tab bar","tab view","tabbed interface","pageviewcontroller","react native tab view","underlined tabs","page tabs","segment switcher","simple tabs"],subcomponents:["TabsList","TabsTrigger","TabsContent"],composesWith:["Card (tabs inside a card body)","Dialog","TooltipProvider (required for tooltip prop)"],props:{defaultValue:{schema:zod.z.unknown().optional(),design:"plumbing"},size:{schema:zod.z.enum(["sm","md","lg, default md"]).optional(),design:"knob",description:"t-shirt scale aligned with Button/ToggleGroup heights; cascades to every TabsTrigger via context so set it once on the list"},variant:{schema:zod.z.enum(["pill","underlined, default pill"]).optional(),design:"knob",description:"`pill` is the shadcn chip-on-muted look; `underlined` is the minimal text + bottom-border treatment (formerly the separate SimpleTabs component, collapsed into Tabs in May 2026). Cascades to triggers."},value:{schema:zod.z.string(),design:"content",description:"matches a TabsContent value; tooltip?: string \u2014 when set, wraps the trigger in the design-system Tooltip and auto-applies aria-label (useful for icon-only triggers); requires a TooltipProvider somewhere above the tabs"}}};var wn={name:"Textarea",description:"Multi-line text entry (descriptions, messages, comments). Pair with a Label. Single-line input \u2192 use Input instead.",import:"@gradeui/ui",aliases:["text area","multiline","comment box","message field","text editor","multi-line text","multiline input","multiline text field","comments box","multiline textinput"],composesWith:["Label","Form","Card (in CardContent)"],props:{}};var xn={name:"ThreeScene",description:"WebGL primitive for shader backgrounds, generative visuals, and bespoke three.js scenes. Three authoring paths, in order of preference \u2014 (1) pick a `preset` id; (2) if nothing in the registry fits, write a `fragmentShader` against the fixed uniform contract; (3) only as a last resort, pass a full `createScene` factory. For looping video, use VideoPlayer; for interactive animations, use RivePlayer.",import:"@gradeui/ui",aliases:["three","threejs","webgl","shader","scene","3d","generative","hero background","fragment shader","glsl"],composesWith:["MediaSurface (internal)","foreground content stacked above with `position: absolute/relative z-10`"],props:{preset:{schema:zod.z.enum(["space","plasma","voronoi","synthwave"]).optional(),design:"knob",description:"shader preset id from the registry"},fragmentShader:{schema:zod.z.string().optional(),design:"content",description:"user-authored GLSL body; takes precedence over preset"},onShaderError:{schema:zod.z.unknown().optional(),design:"event",description:'fires on compile failure; scene falls back to `preset="space"`'},postPreset:{schema:zod.z.enum(["none","vhs","cinematic","synthwave","crt"]).optional(),design:"knob",description:"post-processing pass",default:"vhs"},palette:{schema:zod.z.unknown().optional(),design:"plumbing",description:"any CSS-legal colour string per slot. Re-tints automatically when the theme changes. Unset slots fall back to defaults."},createScene:{schema:zod.z.unknown().optional(),design:"plumbing",description:"custom full scene factory; takes precedence over preset AND fragmentShader"},controls:{schema:zod.z.boolean().optional(),design:"knob",description:"play/pause overlay",default:false},autoPlay:{schema:zod.z.boolean().optional(),design:"knob",description:"respects reduced-motion",default:true},pauseOffscreen:{schema:zod.z.boolean().optional(),design:"knob",description:"big win for WebGL battery life",default:true},aspect:{schema:zod.z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"video"},maxDpr:{schema:zod.z.number().optional(),design:"knob",description:"lower for thumbnails / low-end devices"},radius:{schema:zod.z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",default:"lg"}}};var Rn={name:"Toast",description:'Transient, non-blocking feedback that confirms or warns about an action \u2014 "Saved", "Failed to upload", "Copied to clipboard", "Invitation sent". For permanent inline messages reach for Callout. For confirmations that block until acknowledged use Dialog. Mount <Toaster /> ONCE at the root of the app; everywhere else, call the `toast` helper.',import:"@gradeui/ui",aliases:["toast","toaster","sonner","notification","snackbar","alert toast","transient alert","transient banner","banner notification","toastandroid"],composesWith:["App root layout (single <Toaster /> mount)","Form submit handlers (success/error toasts)","Async actions"],props:{position:{schema:zod.z.enum(["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"]).optional(),design:"knob",default:"bottom-right"},theme:{schema:zod.z.enum(["light","dark","system"]).optional(),design:"knob"},richColors:{schema:zod.z.boolean().optional(),design:"knob",description:"colored variants for success/error/warning/info"},expand:{schema:zod.z.boolean().optional(),design:"knob",description:"keep multiple toasts visually separated rather than stacked"},visibleToasts:{schema:zod.z.number().optional(),design:"knob",description:"max concurrent toasts on screen (default 3)"},duration:{schema:zod.z.number().optional(),design:"knob",description:"default ms before auto-dismiss"}}};var Sn={name:"Toggle",description:`A standalone on/off button \u2014 Bold/Italic in a toolbar, "Show grid" in a header, single binary toggle that doesn't belong inside a Switch row. For two-or-more mutually-exclusive options use ToggleGroup. For a labeled settings switch ("Active: on/off") use Switch.`,import:"@gradeui/ui",aliases:["toggle","toggle button","press button","bold button","italic button"],composesWith:["Tooltip (wrap an icon-only Toggle)","Row","TabsList (sibling)"],props:{variant:{schema:zod.z.enum(["default","outline"]).optional(),design:"knob",description:"outline adds a border, default is borderless and ghost-like"},size:{schema:zod.z.enum(["default","sm","lg"]).optional(),design:"knob"},pressed:{schema:zod.z.boolean().optional(),design:"knob",description:"controlled pressed state"},defaultPressed:{schema:zod.z.boolean().optional(),design:"knob",description:"uncontrolled initial state"},onPressedChange:{schema:zod.z.unknown().optional(),design:"event"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},children:{schema:zod.z.unknown(),design:"plumbing",description:"usually an icon or short label"}}};var Cn={name:"ToggleGroup",description:'A small set of mutually-exclusive (`type="single"`) or independent (`type="multiple"`) binary options that live side-by-side as a segmented control \u2014 viewport size picker (Mobile/Tablet/Desktop), text alignment, view density. Reads identically to a TabsList of the same size; reach for ToggleGroup when each option emits a value (like a form input) rather than swapping panels. Use Tabs for panel switching, Toggle for a single on/off.',import:"@gradeui/ui",aliases:["toggle group","segmented control","segmented buttons","button group","pill group","view selector","segmented picker","segmentedcontrolios","segmented buttons group","rn segmented control"],subcomponents:["ToggleGroupItem"],composesWith:["Card (header controls)","Row","AppShellHeader chrome","settings panels"],props:{type:{schema:zod.z.enum(["single","multiple"]),design:"knob",description:"single picks one, multiple picks any number"},value:{schema:zod.z.string().optional(),design:"content",description:"controlled; matches `type` (string for single, string[] for multiple)"},defaultValue:{schema:zod.z.string().optional(),design:"content",description:"uncontrolled initial"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},size:{schema:zod.z.enum(["sm","md","lg, default md"]).optional(),design:"knob",description:"cascades to every ToggleGroupItem via context, matches Tabs/Button heights"},variant:{schema:zod.z.enum(["default","outline"]).optional(),design:"knob"},tooltip:{schema:zod.z.unknown().optional(),design:"plumbing",description:"when set, wraps the item in a Tooltip; required for icon-only items where the visible chrome doesn't carry a label"},tooltipSide:{schema:zod.z.enum(["top","right","bottom",'left", default "top']).optional(),design:"knob",description:"side the tooltip renders on"},tooltipDelay:{schema:zod.z.number().optional(),design:"knob",description:"per-item delay override; falls back to the upstream TooltipProvider's delayDuration"}}};var kn={name:"Toolbar",description:`ANY three-region chrome bar \u2014 the leading/center/trailing pattern Apple HIG
79
+ (users to @-mention, email recipients, search-as-you-type API results).`,import:"@gradeui/ui",composesWith:["Popover","Command","Badge","Checkbox-style row indicator","Separator"],props:{options:{schema:zod.z.unknown(),design:"plumbing"},value:{schema:zod.z.string().optional(),design:"content",description:"controlled selection"},defaultValue:{schema:zod.z.string().optional(),design:"content",description:"uncontrolled initial selection"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},placeholder:{schema:zod.z.string().optional(),design:"content",default:"Select\u2026"},searchPlaceholder:{schema:zod.z.string().optional(),design:"content",default:"Search\u2026"},emptyMessage:{schema:zod.z.string().optional(),design:"content",default:"Nothing matches."},maxCount:{schema:zod.z.number().optional(),design:"knob",description:'badges shown on the trigger before collapsing to "+N more"'},searchable:{schema:zod.z.boolean().optional(),design:"knob",description:"hide for short option lists",default:true},badgeDismissible:{schema:zod.z.boolean().optional(),design:"knob",description:"show \xD7 on each selected badge",default:true},disabled:{schema:zod.z.boolean().optional(),design:"knob"},modalPopover:{schema:zod.z.boolean().optional(),design:"knob",description:"Popover modal mode",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var Kn={name:"Popover",description:'A floating panel anchored to a trigger that contains interactive content \u2014 date pickers, color pickers, filter pickers, "more info" panels, inline forms. Differs from Tooltip (hover-only, no focusable content) and Dialog (modal, blocks the page). DatePicker, DateRangePicker, and the Combobox pattern all compose Popover internally.',import:"@gradeui/ui",aliases:["popover","dropdown panel","floating panel","inline editor","attached panel","filter pop","popover view","popoverpresentation","attached popover","glass popover","frosted popover","inspector popover"],subcomponents:["PopoverTrigger","PopoverContent","PopoverAnchor"],composesWith:["Button (as trigger)","Calendar (date picker)","Command (combobox)","Form controls (inline edit popover)","Code (code-detail popovers)"],props:{open:{schema:zod.z.unknown().optional(),design:"plumbing"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"usually a Button"},side:{schema:zod.z.enum(["top","right","bottom","left","start","center","end"]).optional(),design:"knob"},surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the popover surface is *made of*. `solid` is the default opaque `bg-popover`. `translucent` is the Apple HIG menu-sheet feel. `glass` for floating panels over rich canvases (Studio inspector, image-tool palette)."}}};var qn={name:"Progress",description:"Determinate progress \u2014 file uploads, multi-step forms, quota meters. Indeterminate state \u2192 use Skeleton or animated Loader icon.",import:"@gradeui/ui",aliases:["progress","progress view","progress indicator","progress bar","determinate progress","loading bar","completion bar"],composesWith:["Card (as a section)","Badge (showing % next to it)","Label (describing what's loading)"],props:{value:{schema:zod.z.number().optional(),design:"knob",description:"percent complete"},max:{schema:zod.z.number().optional(),design:"knob"},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var Yn={name:"RadioGroup",description:"A small set of mutually-exclusive options where the user needs to SEE all of them at once \u2014 pricing tiers (3-4 options), shipping speed, payment method radio cards. For 5+ options use Select. For a segmented control as part of a toolbar use ToggleGroup. For yes/no use Switch.",import:"@gradeui/ui",aliases:["radio group","radio buttons","single-choice","pricing options","payment method","radio buttons","radio control","single-select"],subcomponents:["RadioGroupItem"],composesWith:["Label (paired with each item via htmlFor)","Stack (vertical list)","Card (radio card pattern)"],props:{value:{schema:zod.z.string().optional(),design:"content",description:"controlled selection"},defaultValue:{schema:zod.z.string().optional(),design:"content",description:"uncontrolled initial"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},orientation:{schema:zod.z.enum(["horizontal","vertical"]).optional(),design:"knob",default:"vertical"},name:{schema:zod.z.string().optional(),design:"content",description:"form name when posting natively"},id:{schema:zod.z.string().optional(),design:"plumbing",description:"pair with a <Label htmlFor> for click-on-label"}}};var Zn={name:"Resizable",description:`A multi-pane layout where the user wants to drag the divider \u2014 Slack/Mail-style list+detail, IDE editor+terminal, side-by-side compare view. Static layouts shouldn't use this \u2014 reach for AppShell with nav="three-pane" (fixed widths) or Grid (responsive ladder). Built on react-resizable-panels under the hood.`,import:"@gradeui/ui",aliases:["resizable","splitter","split pane","drag divider","adjustable panels","resizer","split view","draggable divider","split pane resizer","ns split view"],subcomponents:["ResizablePanelGroup","ResizablePanel","ResizableHandle"],composesWith:["AppShellMain (host the splitter inside main)","ScrollArea (each panel's content)","Card"],props:{direction:{schema:zod.z.enum(["horizontal","vertical"]),design:"knob",description:"required; sets the axis the user drags along"},autoSaveId:{schema:zod.z.string().optional(),design:"content",description:"persists user-adjusted sizes to localStorage under this id"},onLayout:{schema:zod.z.unknown().optional(),design:"event"},defaultSize:{schema:zod.z.number().optional(),design:"knob",description:"percent of group (0-100); siblings should sum to ~100"},minSize:{schema:zod.z.unknown().optional(),design:"plumbing",description:"percent bounds"},collapsible:{schema:zod.z.boolean().optional(),design:"knob",description:"allow this panel to collapse to zero"},collapsedSize:{schema:zod.z.unknown().optional(),design:"plumbing",description:"collapse behaviour controls"},withHandle:{schema:zod.z.boolean().optional(),design:"knob",description:"show a visible drag affordance (default just a hit-zone)"}}};var Xn={name:"RivePlayer",description:"Rive runtime wrapped in the shared media surface. Reach for Rive when you need interactive state-machine animations driven by scroll/hover/input. For non-interactive looping video, use VideoPlayer; for shader-driven backgrounds, use ThreeScene.",import:"@gradeui/ui",aliases:["rive","riv","animation","animated","lottie"],composesWith:["MediaSurface (internal)","Card","any container"],props:{src:{schema:zod.z.string(),design:"content",description:"URL or path to the .riv file"},stateMachines:{schema:zod.z.string().optional(),design:"content",description:"state machine(s) to run"},artboard:{schema:zod.z.string().optional(),design:"content",description:"artboard name; omit to use default"},controls:{schema:zod.z.boolean().optional(),design:"knob",description:"viewer mode by default; set true for play/pause overlay",default:false},autoPlay:{schema:zod.z.boolean().optional(),design:"knob",description:"respects reduced-motion",default:true},loop:{schema:zod.z.boolean().optional(),design:"knob",default:true},pauseOffscreen:{schema:zod.z.boolean().optional(),design:"knob",default:true},fit:{schema:zod.z.enum(["contain","cover","fill","fitWidth","fitHeight","none"]).optional(),design:"knob",default:"contain"},stateMachineInputs:{schema:zod.z.unknown().optional(),design:"plumbing"},aspect:{schema:zod.z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"square"},radius:{schema:zod.z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",default:"lg"},poster:{schema:zod.z.string().optional(),design:"content",description:"image shown while the runtime loads"}}};var Jn={name:"Row",description:"Horizontal composition \u2014 button groups, inline form rows, logo + nav rows, anything on one line. Reach for Row instead of `flex items-center gap-*` so the alignment and spacing are editable through the settings panel. For two-pane layouts with an explicit ratio (sidebar + content, 1/3 + 2/3) use Split instead \u2014 Row evenly flows whatever children it holds.",import:"@gradeui/ui",aliases:["row","hstack","horizontal","inline","horizontal layout","hstack","h-stack","horizontal stack","lazyhstack"],composesWith:["Button","Input","NavItem","Stack (can wrap a Row)","any content component"],props:{gap:{schema:zod.z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between children",default:"md"},align:{schema:zod.z.enum(["start","center","end","stretch","baseline"]).optional(),design:"knob",description:"cross-axis (vertical) alignment",default:"center"},justify:{schema:zod.z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:"main-axis distribution",default:"start"},wrap:{schema:zod.z.boolean().optional(),design:"knob",description:"allow children to wrap onto additional lines when they overflow",default:false},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing"}}};var Qn={name:"ScrollArea",description:"Bounded content that needs custom scroll chrome \u2014 sidebars with long item lists, chat transcripts, table panels inside a dashboard, anywhere the OS scrollbar would feel out of place against the design tokens. The wrapping element has to have a height constraint (`h-`, `max-h-`, or grid row sizing) or nothing scrolls \u2014 scroll-area can't infer a bound on its own. For body-level scrolling, leave the document to the browser.",import:"@gradeui/ui",aliases:["scroll area","scroll container","custom scrollbar","sidebar scroll","panel scroll","scroll view","scrollview","react native scrollview"],subcomponents:["ScrollBar"],composesWith:["Card (long card body)","AppShellNav (long sidebar)","Sheet (long modal body)","Table (sticky-header scrolling list)"],props:{type:{schema:zod.z.enum(["auto","always","scroll","hover"]).optional(),design:"knob",description:"when the scrollbar shows"},scrollHideDelay:{schema:zod.z.number().optional(),design:"knob",description:'ms before "scroll"/"hover" scrollbars fade'},dir:{schema:zod.z.enum(["ltr","rtl"]).optional(),design:"plumbing"},className:{schema:zod.z.string().optional(),design:"plumbing",description:"set a height/max-height here, otherwise nothing scrolls"},orientation:{schema:zod.z.enum(["vertical","horizontal"]).optional(),design:"knob",default:"vertical"}}};var ei={name:"SectionBlock",description:'The top-level container for a marketing page section \u2014 hero, feature row, pricing table, testimonial strip, FAQ section. Always reach for SectionBlock over a hand-rolled `<section>` so vertical rhythm, container width, and tonal background stay consistent across the page. Pair `background="gradient"` + `surface="glass"` inner Cards for the "modern marketing hero" pattern.',import:"@gradeui/ui",aliases:["section","section block","hero section","marketing section","page section","content section","container section","feature section","hero","page hero","marketing hero","glass section","gradient section","mesh hero"],composesWith:['Card (the most common child \u2014 especially with surface="glass")',"Grid (feature rows)","Stack (hero column)","MediaSurface (hero imagery)","Code (developer hero)","Carousel (logo strips)"],props:{padding:{schema:zod.z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"vertical rhythm. Defaults to `lg`."},background:{schema:zod.z.enum(["transparent","muted","card","primary","gradient"]).optional(),design:"knob",description:"tonal direction of the section bg."},surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the section is *made of*. Orthogonal to `background`. Use `glass` for hero sections that float over a generative backdrop / image / dot grid."},container:{schema:zod.z.enum(["default","wide","narrow","full"]).optional(),design:"knob",description:"max-width of the inner content."},alignment:{schema:zod.z.enum(["left","center","right"]).optional(),design:"knob",description:"header / CTA alignment."},titleSize:{schema:zod.z.enum(["sm","md","lg","xl"]).optional(),design:"knob"},title:{schema:zod.z.string().optional(),design:"plumbing"},subtitle:{schema:zod.z.string().optional(),design:"content"},cta1:{schema:zod.z.unknown().optional(),design:"plumbing",description:"string or `{ text, variant, href, onClick }` config"},backgroundImage:{schema:zod.z.string().optional(),design:"content",description:"direct CSS background image url"},as:{schema:zod.z.enum(["section","div","article"]).optional(),design:"knob",description:"semantic root"},fullBleed:{schema:zod.z.boolean().optional(),design:"knob"}}};var ti={name:"Select",description:"Single-choice from 3+ known options. Fewer than 3 \u2192 RadioGroup. Huge list with search \u2192 use a Combobox (not in DS yet). Multi-select \u2192 not supported by this primitive.",import:"@gradeui/ui",aliases:["dropdown","combobox","picker","select","pop-up button","popup button","popup picker","picker view","rnpickerselect","react native picker","native picker"],subcomponents:["SelectTrigger","SelectValue","SelectContent","SelectItem","SelectGroup","SelectLabel","SelectSeparator"],composesWith:["Label (above SelectTrigger)","Form","Card"],props:{value:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Radix root"},wraps:{schema:zod.z.unknown(),design:"plumbing"},placeholder:{schema:zod.z.string().optional(),design:"content",description:"text when nothing is selected"},accepts:{schema:zod.z.unknown(),design:"plumbing"}}};var oi={name:"Separator",description:"Light divider between sibling blocks in a Card, list, or header. For section-level partition use extra spacing instead.",import:"@gradeui/ui",aliases:["divider","rule","hr","line","horizontal rule"],composesWith:["Card (between CardHeader/Content/Footer)","navigation menus","any vertical stacks"],props:{orientation:{schema:zod.z.enum(["horizontal","vertical"]).optional(),design:"knob",description:'default "horizontal"'},decorative:{schema:zod.z.boolean().optional(),design:"knob",description:"hide from a11y tree",default:true},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var ri={name:"ShaderPresetPicker",description:"Runtime gallery of shader presets \u2014 click to select. Use with ThreeScene as a controlled input so the user can pick a background shader. For a single preview card, use ShaderPresetPreview directly.",import:"@gradeui/ui",aliases:["shader picker","preset picker","shader gallery","preset gallery"],composesWith:["ShaderPresetPreview (internal)","ThreeScene (the typical downstream consumer)"],props:{value:{schema:zod.z.string().optional(),design:"content",description:"currently selected preset id (controlled)"},onChange:{schema:zod.z.unknown().optional(),design:"event",description:"called when the user clicks a preset card"},filterTags:{schema:zod.z.string().optional(),design:"content",description:'only show presets matching at least one tag ("space" | "retro" | "motion" | "hero" | "background" \u2026)'},live:{schema:zod.z.enum(["never","hover","always"]).optional(),design:"knob",description:"thumbnail render mode",default:"hover"},postPreset:{schema:zod.z.string().optional(),design:"content",description:"shared post-FX preset applied to every thumbnail"},palette:{schema:zod.z.unknown().optional(),design:"plumbing",description:"shared palette applied to every thumbnail"},columns:{schema:zod.z.unknown().optional(),design:"plumbing",description:"grid columns at md+ breakpoint"}}};var ai={name:"ShaderPresetPreview",description:"Thumbnail-sized preview card for a shader preset. Defaults to a cheap static placeholder until hovered, at which point the live WebGL render kicks in. Use directly when you want a single preset card; use ShaderPresetPicker for a filterable grid.",import:"@gradeui/ui",aliases:["shader preview","preset preview","shader card"],composesWith:["ThreeScene (internal)","ShaderPresetPicker (wraps this)"],props:{preset:{schema:zod.z.string(),design:"content",description:"shader preset id from the registry"},live:{schema:zod.z.enum(["never","hover","always"]).optional(),design:"knob",description:"when to run the live WebGL render",default:"hover"},postPreset:{schema:zod.z.string().optional(),design:"content",description:"override the preset's default post-FX"},palette:{schema:zod.z.unknown().optional(),design:"plumbing",description:"palette overrides for the preview"},aspect:{schema:zod.z.enum(["video","square","portrait","wide"]).optional(),design:"knob",default:"video"},hideLabel:{schema:zod.z.boolean().optional(),design:"knob",description:"hide the label strip under the preview",default:false},onClick:{schema:zod.z.unknown().optional(),design:"event"}}};var ni={name:"Sheet",description:"A panel that slides in from a screen edge \u2014 mobile nav drawers, side panels for editing a single record without leaving the list, filter trays on small viewports, Studio-style inspector panels. For a centered focus modal use Dialog. For a transient announcement use Toast (Sonner). For inline reveals use Collapsible.",import:"@gradeui/ui",aliases:["sheet","drawer","side panel","slide-in","nav drawer","mobile drawer","slide-over","action sheet","modal sheet","bottom sheet","side sheet","react native modal sheet","bottom-sheet","ios action sheet","inspector panel","glass sheet","frosted drawer"],subcomponents:["SheetTrigger","SheetContent","SheetHeader","SheetTitle","SheetDescription","SheetFooter","SheetClose"],composesWith:["Form controls (an inline edit sheet)","Button (trigger + close)","AppShellNav (mobile-only swap)","Code (changelog drawers)","MediaSurface (image-detail sheets)"],props:{open:{schema:zod.z.unknown().optional(),design:"plumbing"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing"},side:{schema:zod.z.enum(["top","right","bottom","left"]).optional(),design:"knob",default:"right"},surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the sheet panel is *made of*. `solid` is the default opaque `bg-background`. Reach for `glass` whenever the canvas behind the sheet (a layout in progress, a media gallery, a dashboard) should remain visible."},className:{schema:zod.z.string().optional(),design:"plumbing",description:"usually set a width (right/left) or height (top/bottom)"},SheetTitle:{schema:zod.z.unknown(),design:"plumbing"}}};var ii={name:"Sidebar",description:'Vertical app navigation. Drop inside `<AppShellNav placement="side">` for full-page layouts. Compound API \u2014 `<SidebarHeader>` for brand, `<SidebarContent>` for the scrollable body of `<SidebarSection>` + `<SidebarItem>` rows, `<SidebarFooter>` for user / settings chrome. For top nav reach for TopMenu; for command-palette style search reach for Command.',import:"@gradeui/ui",aliases:["sidebar","side menu","sidemenu","navigation sidebar","app sidebar","side nav","side nav rail","master pane","sidebarmenu","navigation rail","react native drawer"],subcomponents:["SidebarHeader","SidebarContent","SidebarFooter","SidebarSection","SidebarItem"],composesWith:["AppShell (inside AppShellNav)","Avatar (in Footer)","Tooltip (auto-wrapped on collapsed items)","Button (asChild for custom routing)"],props:{collapsed:{schema:zod.z.boolean().optional(),design:"knob",description:"controlled collapsed state (wire onCollapsedChange when set)"},defaultCollapsed:{schema:zod.z.boolean().optional(),design:"knob",description:"uncontrolled initial value (default false)"},onCollapsedChange:{schema:zod.z.unknown().optional(),design:"event"},collapsible:{schema:zod.z.boolean().optional(),design:"knob",description:"show the affordance for the user to collapse (default true)"},variant:{schema:zod.z.enum(["rail","panel"]).optional(),design:"knob",description:'outer chrome treatment. `rail` (default) is the classic nav rail with a single right-border + tracked width via `--gds-sidebar-width`; drops cleanly into `<AppShellNav placement="side">`. `panel` is a card-style floating sidebar with full border + rounded corners + parent-controlled width; use when the sidebar is one of several adjacent panes in a body row (e.g. Projects | Canvas | Settings). The compound children (Header/Content/Footer/Section/Item) are identical in both treatments.'},any:{schema:zod.z.unknown(),design:"plumbing",description:"brand / logo / org switcher; hides nothing when collapsed (centred)"},title:{schema:zod.z.unknown().optional(),design:"plumbing",description:'group label; **uppercase tracking-wide muted** styling auto-applied (Notion / Linear / Slack-style "GAMES", "FAVORITES", "WORKSPACE" headers); hidden when sidebar is collapsed'},icon:{schema:zod.z.unknown().optional(),design:"plumbing",description:"optional icon beside the title"},trailing:{schema:zod.z.unknown().optional(),design:"plumbing",description:`**action(s) on the right edge of the header** \u2014 the canonical "+" / "..." slot (Notion's "+ Add page" next to Pages, Linear's "+" next to Favorites, Slack's "+" next to Channels). Pointer events isolated so a Button here doesn't toggle collapse.`},defaultExpanded:{schema:zod.z.boolean().optional(),design:"knob",description:"initial open state (default true)"},badge:{schema:zod.z.unknown().optional(),design:"plumbing",description:"trailing count / label (hidden when collapsed)"},active:{schema:zod.z.boolean().optional(),design:"knob",description:'current route; adds aria-current="page"'},href:{schema:zod.z.string().optional(),design:"content",description:"renders as <a>; for routing use `asChild` with your link component"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"wrap a custom link (<Link href> from Next.js etc.) via Radix Slot"},asButton:{schema:zod.z.boolean().optional(),design:"knob",description:"render as <button> for action rows (open dialog, log out)"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},collapsedLabel:{schema:zod.z.unknown().optional(),design:"plumbing",description:"tooltip override when sidebar is collapsed (defaults to children text)"},size:{schema:zod.z.enum(["sm","md"]).optional(),design:"knob",description:"row size. `md` (default) is the standard `text-sm font-medium` nav row; `sm` is `text-xs` + lighter weight + tighter padding for visually subordinate rows (nested screens under a project, sub-pages under a section). Active state still wins on color + weight so the current row pops at either size."},description:{schema:zod.z.unknown().optional(),design:"plumbing",description:"secondary line beneath the label (metadata like 'Edited 2m ago', '12 items', a brief description). Row layout adapts: label + description stacked vertically; icon vertically-centered against the stack; badge stays on trailing edge. Hidden when sidebar collapsed."}}};var si={name:"Skeleton",description:'Loading placeholder for content whose shape you know. Set width/height via className to mimic the real content (e.g. "h-4 w-32"). Not a spinner \u2014 use it where the real thing will drop in.',import:"@gradeui/ui",aliases:["placeholder","shimmer","loader","loading state","redacted","redacted placeholder","shimmer placeholder","content placeholder","lottie placeholder"],composesWith:["Card","Avatar (inside a Skeleton for avatar loading)","any layout"],props:{className:{schema:zod.z.string().optional(),design:"plumbing",description:"required in practice; supply width/height utilities"}}};var li={name:"Slider",description:'A continuous-ish numeric pick \u2014 volume, opacity, font size, price-range filters. Use a single-thumb slider for one value, two-thumb for a range. For a small set of discrete options (1-5 stars, sm/md/lg) prefer ToggleGroup. For free-text numeric entry use an Input type="number".',import:"@gradeui/ui",aliases:["slider","range slider","range input","volume","opacity slider","scrub","drag value","slider control","value slider","react native slider"],composesWith:["Label (mandatory above)","Row (label + current value display)","Card (settings rows)"],props:{value:{schema:zod.z.number().optional(),design:"knob",description:"controlled value; ALWAYS an array even for a single-thumb slider (`[50]`)"},defaultValue:{schema:zod.z.number().optional(),design:"knob",description:"uncontrolled initial; `[20, 80]` for a two-thumb range"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},min:{schema:zod.z.number().optional(),design:"knob"},max:{schema:zod.z.number().optional(),design:"knob"},step:{schema:zod.z.number().optional(),design:"knob"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},orientation:{schema:zod.z.enum(["horizontal","vertical"]).optional(),design:"knob",default:"horizontal"},dir:{schema:zod.z.enum(["ltr","rtl"]).optional(),design:"plumbing"},inverted:{schema:zod.z.boolean().optional(),design:"knob",description:"flip the visual direction"},name:{schema:zod.z.string().optional(),design:"content",description:"form name when posting natively"}}};var di={name:"Sortable",description:"Drag-to-reorder lists, kanban-column reordering, sortable shelves, tab strips the user can rearrange. Pairs with any layout primitive \u2014 Stack for vertical lists, Row for horizontal strips, Grid for 2D card walls. For cross-container drag (drag a card from one column to another) hand-roll DndContext at the page level \u2014 Sortable v1 covers single-list reorder; Sortable.Group for cross-container is a planned follow-up. Reach for raw `@dnd-kit/core` if you need custom collision detection, drag overlays with arbitrary chrome, or non-list use cases (kanban swimlanes, draggable canvas nodes).",import:"@gradeui/ui",aliases:["sortable","reorder","drag and drop","dnd","draggable list","sortable list","kanban","drag to reorder","drag-drop","dragdroplist","drag handle","react native draggable flatlist"],subcomponents:["Sortable.Item","Sortable.Handle"],composesWith:["Stack (vertical lists)","Row (horizontal strips)","Grid (2D card walls)","Card (typical item content)","Button (as Sortable.Handle asChild)"],props:{values:{schema:zod.z.unknown(),design:"plumbing",description:"ordered list of unique ids; the source of truth for the order"},onReorder:{schema:zod.z.unknown().optional(),design:"event",description:"fires with the new order after a drag that changed it"},strategy:{schema:zod.z.enum(["vertical","horizontal","grid"]).optional(),design:"knob",description:"match the layout your items render in",default:"vertical"},disabled:{schema:zod.z.boolean().optional(),design:"knob",description:"disable drag on every item"},Sortable:{schema:zod.z.unknown(),design:"plumbing",description:"must match one entry in the parent `values` array (identity, not React key)"}}};var ci={name:"Stack",description:"Default top-level layout inside the main slot when composing two or more stacked regions (hero + content + footer, auth card + subtext, etc.). Prefer Stack over hand-rolled `flex flex-col gap-*` so the vertical rhythm is editable through the settings panel.",import:"@gradeui/ui",aliases:["stack","vstack","vertical","column","vertical layout","v-stack","vertical stack","lazyvstack"],composesWith:["Section","Row","Split","Hero","any content component"],props:{gap:{schema:zod.z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"vertical gap between children",default:"md"},align:{schema:zod.z.enum(["start","center","end","stretch"]).optional(),design:"knob",description:"cross-axis (horizontal) alignment of children",default:"stretch"},justify:{schema:zod.z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:'main-axis (vertical) distribution. Reach for this on absolute-positioned overlays (`justify="end"` pins children to the bottom) and split footers (`justify="between"`).',default:"start"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot, so `<Stack asChild><section>\u2026</section></Stack>` stamps Stack's classes onto the `<section>` rather than nesting a wrapper div",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing"}}};var pi={name:"Switch",description:'Instant on/off setting ("Enable notifications", "Dark mode"). Commits on toggle \u2014 no submit button needed. For selecting-from-a-list use Checkbox.',import:"@gradeui/ui",aliases:["toggle","switch","on/off switch","ios toggle","toggle switch","switch control","react native switch"],composesWith:["Label (via htmlFor)","Card (settings rows)"],props:{checked:{schema:zod.z.boolean().optional(),design:"knob"},onCheckedChange:{schema:zod.z.unknown().optional(),design:"event"},defaultChecked:{schema:zod.z.boolean().optional(),design:"knob"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},id:{schema:zod.z.string().optional(),design:"plumbing"}}};var ui={name:"Table",description:"Structured tabular data \u2014 rows \xD7 columns with alignment requirements. NOT a layout grid \u2014 for that use div+Tailwind grid utilities. Keep to <100 rows; larger datasets need virtualisation (not in DS).",import:"@gradeui/ui",aliases:["table","table view","data table","datatable","grid view","data grid","rows and columns"],subcomponents:["TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption"],composesWith:["Card (wrap the table)","Badge (inside TableCell for status)","Checkbox (row selection)","Button (row actions)"],props:{Each:{schema:zod.z.unknown(),design:"plumbing"},No:{schema:zod.z.unknown(),design:"plumbing",description:"styling follows the active theme tokens"}}};var gi={name:"Tabs",description:'A small set of peer views within one surface (2\u20135 tabs). For primary nav use Side Menu/routing. For filters use a filter control, not tabs. Pick `variant="pill"` for app chrome (settings panels, in-card tab strips). Pick `variant="underlined"` for marketing/docs pages and browser-tab-style treatments.',import:"@gradeui/ui",aliases:["tabs","tab strip","tab bar","tab view","tabbed interface","pageviewcontroller","react native tab view","underlined tabs","page tabs","segment switcher","simple tabs"],subcomponents:["TabsList","TabsTrigger","TabsContent"],composesWith:["Card (tabs inside a card body)","Dialog","TooltipProvider (required for tooltip prop)"],props:{defaultValue:{schema:zod.z.unknown().optional(),design:"plumbing"},size:{schema:zod.z.enum(["sm","md","lg, default md"]).optional(),design:"knob",description:"t-shirt scale aligned with Button/ToggleGroup heights; cascades to every TabsTrigger via context so set it once on the list"},variant:{schema:zod.z.enum(["pill","underlined, default pill"]).optional(),design:"knob",description:"`pill` is the shadcn chip-on-muted look; `underlined` is the minimal text + bottom-border treatment (formerly the separate SimpleTabs component, collapsed into Tabs in May 2026). Cascades to triggers."},value:{schema:zod.z.string(),design:"content",description:"matches a TabsContent value; tooltip?: string \u2014 when set, wraps the trigger in the design-system Tooltip and auto-applies aria-label (useful for icon-only triggers); requires a TooltipProvider somewhere above the tabs"}}};var fi={name:"Textarea",description:"Multi-line text entry (descriptions, messages, comments). Pair with a Label. Single-line input \u2192 use Input instead.",import:"@gradeui/ui",aliases:["text area","multiline","comment box","message field","text editor","multi-line text","multiline input","multiline text field","comments box","multiline textinput"],composesWith:["Label","Form","Card (in CardContent)"],props:{}};var hi={name:"ThreeScene",description:"WebGL primitive for shader backgrounds, generative visuals, and bespoke three.js scenes. Three authoring paths, in order of preference \u2014 (1) pick a `preset` id; (2) if nothing in the registry fits, write a `fragmentShader` against the fixed uniform contract; (3) only as a last resort, pass a full `createScene` factory. For looping video, use VideoPlayer; for interactive animations, use RivePlayer.",import:"@gradeui/ui",aliases:["three","threejs","webgl","shader","scene","3d","generative","hero background","fragment shader","glsl"],composesWith:["MediaSurface (internal)","foreground content stacked above with `position: absolute/relative z-10`"],props:{preset:{schema:zod.z.enum(["space","plasma","voronoi","synthwave"]).optional(),design:"knob",description:"shader preset id from the registry"},fragmentShader:{schema:zod.z.string().optional(),design:"content",description:"user-authored GLSL body; takes precedence over preset"},onShaderError:{schema:zod.z.unknown().optional(),design:"event",description:'fires on compile failure; scene falls back to `preset="space"`'},postPreset:{schema:zod.z.enum(["none","vhs","cinematic","synthwave","crt"]).optional(),design:"knob",description:"post-processing pass",default:"vhs"},palette:{schema:zod.z.unknown().optional(),design:"plumbing",description:"any CSS-legal colour string per slot. Re-tints automatically when the theme changes. Unset slots fall back to defaults."},createScene:{schema:zod.z.unknown().optional(),design:"plumbing",description:"custom full scene factory; takes precedence over preset AND fragmentShader"},controls:{schema:zod.z.boolean().optional(),design:"knob",description:"play/pause overlay",default:false},autoPlay:{schema:zod.z.boolean().optional(),design:"knob",description:"respects reduced-motion",default:true},pauseOffscreen:{schema:zod.z.boolean().optional(),design:"knob",description:"big win for WebGL battery life",default:true},aspect:{schema:zod.z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"video"},maxDpr:{schema:zod.z.number().optional(),design:"knob",description:"lower for thumbnails / low-end devices"},radius:{schema:zod.z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",default:"lg"}}};var bi={name:"Toast",description:'Transient, non-blocking feedback that confirms or warns about an action \u2014 "Saved", "Failed to upload", "Copied to clipboard", "Invitation sent". For permanent inline messages reach for Callout. For confirmations that block until acknowledged use Dialog. Mount <Toaster /> ONCE at the root of the app; everywhere else, call the `toast` helper.',import:"@gradeui/ui",aliases:["toast","toaster","sonner","notification","snackbar","alert toast","transient alert","transient banner","banner notification","toastandroid"],composesWith:["App root layout (single <Toaster /> mount)","Form submit handlers (success/error toasts)","Async actions"],props:{position:{schema:zod.z.enum(["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"]).optional(),design:"knob",default:"bottom-right"},theme:{schema:zod.z.enum(["light","dark","system"]).optional(),design:"knob"},richColors:{schema:zod.z.boolean().optional(),design:"knob",description:"colored variants for success/error/warning/info"},expand:{schema:zod.z.boolean().optional(),design:"knob",description:"keep multiple toasts visually separated rather than stacked"},visibleToasts:{schema:zod.z.number().optional(),design:"knob",description:"max concurrent toasts on screen (default 3)"},duration:{schema:zod.z.number().optional(),design:"knob",description:"default ms before auto-dismiss"}}};var vi={name:"Toggle",description:`A standalone on/off button \u2014 Bold/Italic in a toolbar, "Show grid" in a header, single binary toggle that doesn't belong inside a Switch row. For two-or-more mutually-exclusive options use ToggleGroup. For a labeled settings switch ("Active: on/off") use Switch.`,import:"@gradeui/ui",aliases:["toggle","toggle button","press button","bold button","italic button"],composesWith:["Tooltip (wrap an icon-only Toggle)","Row","TabsList (sibling)"],props:{variant:{schema:zod.z.enum(["default","outline"]).optional(),design:"knob",description:"outline adds a border, default is borderless and ghost-like"},size:{schema:zod.z.enum(["default","sm","lg"]).optional(),design:"knob"},pressed:{schema:zod.z.boolean().optional(),design:"knob",description:"controlled pressed state"},defaultPressed:{schema:zod.z.boolean().optional(),design:"knob",description:"uncontrolled initial state"},onPressedChange:{schema:zod.z.unknown().optional(),design:"event"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},children:{schema:zod.z.unknown(),design:"plumbing",description:"usually an icon or short label"}}};var yi={name:"ToggleGroup",description:'A small set of mutually-exclusive (`type="single"`) or independent (`type="multiple"`) binary options that live side-by-side as a segmented control \u2014 viewport size picker (Mobile/Tablet/Desktop), text alignment, view density. Reads identically to a TabsList of the same size; reach for ToggleGroup when each option emits a value (like a form input) rather than swapping panels. Use Tabs for panel switching, Toggle for a single on/off.',import:"@gradeui/ui",aliases:["toggle group","segmented control","segmented buttons","button group","pill group","view selector","segmented picker","segmentedcontrolios","segmented buttons group","rn segmented control"],subcomponents:["ToggleGroupItem"],composesWith:["Card (header controls)","Row","AppShellHeader chrome","settings panels"],props:{type:{schema:zod.z.enum(["single","multiple"]),design:"knob",description:"single picks one, multiple picks any number"},value:{schema:zod.z.string().optional(),design:"content",description:"controlled; matches `type` (string for single, string[] for multiple)"},defaultValue:{schema:zod.z.string().optional(),design:"content",description:"uncontrolled initial"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},size:{schema:zod.z.enum(["sm","md","lg, default md"]).optional(),design:"knob",description:"cascades to every ToggleGroupItem via context, matches Tabs/Button heights"},variant:{schema:zod.z.enum(["default","outline"]).optional(),design:"knob"},tooltip:{schema:zod.z.unknown().optional(),design:"plumbing",description:"when set, wraps the item in a Tooltip; required for icon-only items where the visible chrome doesn't carry a label"},tooltipSide:{schema:zod.z.enum(["top","right","bottom",'left", default "top']).optional(),design:"knob",description:"side the tooltip renders on"},tooltipDelay:{schema:zod.z.number().optional(),design:"knob",description:"per-item delay override; falls back to the upstream TooltipProvider's delayDuration"}}};var xi={name:"Toolbar",description:`ANY three-region chrome bar \u2014 the leading/center/trailing pattern Apple HIG
36
80
  describes as a "Toolbar." App window chrome (Reddit, Twitter, GitHub, Linear,
37
81
  most desktop apps), section toolbars inside Cards or panels, bottom action
38
82
  bars on mobile layouts, persistent footer toolbars.
@@ -60,9 +104,18 @@ Use directly inside a Card or page section for section-scoped toolbars:
60
104
  <Card>
61
105
  <Toolbar size="sm" variant="subtle" leading={...} trailing={...} />
62
106
  {content}
63
- </Card>`,import:"@gradeui/ui",subcomponents:["ToolbarSlot"],composesWith:["Button","Avatar","Input","Logo","Badge","AppShellHeader","Card","Row","Stack"],props:{leading:{schema:zod.z.unknown().optional(),design:"plumbing",description:"left-aligned region (logo + primary nav)"},center:{schema:zod.z.unknown().optional(),design:"plumbing",description:"center region (search, page title, segmented control)"},trailing:{schema:zod.z.unknown().optional(),design:"plumbing",description:"right-aligned region (action icons, avatar, primary CTA)"},children:{schema:zod.z.unknown().optional(),design:"plumbing",description:"escape hatch; bypasses slot layout"},position:{schema:zod.z.enum(["top","bottom","inline"]).optional(),design:"knob",description:"border placement",default:"top"},variant:{schema:zod.z.enum(["default","subtle","transparent"]).optional(),design:"knob",default:"default"},size:{schema:zod.z.enum(["sm","md","lg"]).optional(),design:"knob",description:"height + padding",default:"md"},sticky:{schema:zod.z.boolean().optional(),design:"knob",description:"pin to top/bottom of scroll container",default:false},"aria-label":{schema:zod.z.string().optional(),design:"content",description:"required by WAI-ARIA toolbar pattern",default:"Toolbar"},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var Tn={name:"Tooltip",description:"A short, non-essential label that explains a control on hover/focus \u2014 icon-only buttons in toolbars, abbreviated column headers, status dots. NEVER hide critical info inside a tooltip \u2014 they're invisible on touch and can be skipped by screen readers if implemented carelessly. For richer hover content use HoverCard. For inline help text that's always visible, use a description paragraph.",import:"@gradeui/ui",aliases:["tooltip","tip","hover tip","hint","label on hover","help tag","hint","helper text bubble","info tip"],subcomponents:["TooltipTrigger","TooltipContent","TooltipProvider"],composesWith:["Button (icon-only)","Toggle","TabsTrigger (the canonical tabs already have a `tooltip` prop that wraps this)","Avatar (status badge meaning)"],props:{delayDuration:{schema:zod.z.number().optional(),design:"knob",description:"ms hover before show; mount ONCE near the app root"},skipDelayDuration:{schema:zod.z.number().optional(),design:"knob",description:'ms gap that still feels like "same hover"'},open:{schema:zod.z.unknown().optional(),design:"plumbing"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"usually wraps a Button or icon"},side:{schema:zod.z.enum(["top","right","bottom","left","start","center","end"]).optional(),design:"knob",default:"top"}}};var Pn={name:"VideoPlayer",description:"HTML5 video wrapped in the shared media surface. Controls-on for a standard player, controls-off (+ autoplay/muted/loop) for hero / background video. Prefer Rive for anything interactive, Three Scene for shader backgrounds.",import:"@gradeui/ui",aliases:["video","mp4","movie","webm","clip","video view","av player","react native video","video element"],composesWith:["MediaSurface (internal)","Card (wrap for thumbnail grids)"],props:{src:{schema:zod.z.string(),design:"content",description:"video URL"},controls:{schema:zod.z.boolean().optional(),design:"knob",description:"show native controls; false for chromeless hero/background video",default:true},autoPlay:{schema:zod.z.boolean().optional(),design:"knob",description:"forces muted=true (browser restriction)",default:false},loop:{schema:zod.z.boolean().optional(),design:"knob",default:false},muted:{schema:zod.z.boolean().optional(),design:"knob",default:false},pauseOffscreen:{schema:zod.z.boolean().optional(),design:"knob",description:"pause when scrolled out of viewport",default:true},aspect:{schema:zod.z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"video"},radius:{schema:zod.z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"driven by `--gds-media-radius`",default:"lg"},objectFit:{schema:zod.z.enum(["cover","contain","fill"]).optional(),design:"knob",default:"cover"},poster:{schema:zod.z.string().optional(),design:"content",description:'image shown before playback. Always rendered as a `loading="lazy"` `<img>` overlay (not the native `poster` attribute, which fetches eagerly).'},playbackRate:{schema:zod.z.number().optional(),design:"knob"}}};var kr={Accordion:Ca,AiChat:ka,AiChatComposer:Ta,AppShell:Pa,Avatar:Ma,Badge:Ea,Breadcrumb:La,Button:Ha,Calendar:Da,Callout:Aa,Card:Fa,Carousel:za,Chart:Ba,Checkbox:Ga,Collapsible:Oa,Command:Va,DatePicker:_a,Dialog:Wa,DropdownMenu:$a,Flex:Ua,Grid:ja,HoverCard:Ka,Input:qa,Label:Ya,Map:Za,MediaSurface:xr,MultiSelect:Xa,Popover:Ja,Progress:Qa,RadioGroup:en,Resizable:tn,RivePlayer:on,Row:rn,ScrollArea:an,Select:nn,Separator:sn,ShaderPresetPicker:ln,ShaderPresetPreview:dn,Sheet:cn,Sidebar:pn,Skeleton:mn,Slider:un,Sortable:gn,Stack:fn,Switch:hn,Table:vn,Tabs:yn,Textarea:wn,ThreeScene:xn,Toast:Rn,Toggle:Sn,ToggleGroup:Cn,Toolbar:kn,Tooltip:Tn,VideoPlayer:Pn};function Xl(e){return e?kr[e]??null:null}function Jl(){return Object.keys(kr)}function n(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var od=Be__namespace.Root,Mn=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(Be__namespace.Item,{ref:o,className:n("border-b",e),...t}));Mn.displayName="AccordionItem";var Nn=w__namespace.forwardRef(({className:e,children:t,...o},r)=>w__namespace.createElement(Be__namespace.Header,{className:"flex"},w__namespace.createElement(Be__namespace.Trigger,{ref:r,className:n("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...o},t,w__namespace.createElement(lucideReact.ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"}))));Nn.displayName=Be__namespace.Trigger.displayName;var En=w__namespace.forwardRef(({className:e,children:t,...o},r)=>w__namespace.createElement(Be__namespace.Content,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o},w__namespace.createElement("div",{className:n("pb-4 pt-0",e)},t)));En.displayName=Be__namespace.Content.displayName;var Ln=classVarianceAuthority.cva("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4",{variants:{variant:{default:"bg-background text-foreground [&>svg]:text-foreground",destructive:"border-destructive/30 bg-destructive-soft text-destructive-deep [&>svg]:text-destructive-deep",success:"border-success/30 bg-success-soft text-success-deep [&>svg]:text-success-deep",warning:"border-warning/30 bg-warning-soft text-warning-deep [&>svg]:text-warning-deep",info:"border-info/30 bg-info-soft text-info-deep [&>svg]:text-info-deep"}},defaultVariants:{variant:"default"}}),ad={destructive:"alert",warning:"alert",info:"status",success:"status",default:"status"},Hn=w__namespace.forwardRef(({className:e,variant:t,role:o,...r},i)=>w__namespace.createElement("div",{ref:i,role:o??ad[t??"default"],"data-gds-part":"callout",className:n(Ln({variant:t}),e),...r}));Hn.displayName="Callout";var Dn=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement("h5",{ref:o,"data-gds-part":"callout-title",className:n("mb-1 font-medium leading-none tracking-tight",e),...t}));Dn.displayName="CalloutTitle";var An=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement("div",{ref:o,"data-gds-part":"callout-description",className:n("text-sm [&_p]:leading-relaxed",e),...t}));An.displayName="CalloutDescription";var In=classVarianceAuthority.cva("gds-app-shell min-h-screen w-full bg-background text-foreground grid",{variants:{nav:{none:"",top:"",side:"","three-pane":""}},defaultVariants:{nav:"none"}}),Fn=classVarianceAuthority.cva("gds-app-shell-header",{variants:{sticky:{true:"sticky top-0 z-30",false:""}},defaultVariants:{sticky:false}}),zn=classVarianceAuthority.cva("gds-app-shell-nav",{variants:{placement:{top:"border-b bg-background",side:"border-r bg-background",none:"hidden"},sticky:{true:"",false:""}},compoundVariants:[{placement:"top",sticky:true,className:"sticky top-0 z-30"},{placement:"side",sticky:true,className:"sticky top-0 h-screen self-start"}],defaultVariants:{placement:"top",sticky:true}}),Bn=classVarianceAuthority.cva("gds-app-shell-aside min-w-0 border-r bg-background",{variants:{sticky:{true:"sticky top-0 h-screen self-start",false:""}},defaultVariants:{sticky:false}}),Gn=classVarianceAuthority.cva("gds-app-shell-main min-w-0",{variants:{maxWidth:{full:"w-full",container:"w-full mx-auto max-w-7xl px-4 md:px-6 lg:px-8"}},defaultVariants:{maxWidth:"full"}}),On=classVarianceAuthority.cva("gds-app-shell-footer border-t bg-background"),Vn=w__namespace.forwardRef(({className:e,nav:t,asChild:o=false,...r},i)=>w__namespace.createElement(o?reactSlot.Slot:"div",{ref:i,"data-gds-part":"app-shell","data-nav":t??"none",className:n(In({nav:t,className:e})),...r}));Vn.displayName="AppShell";var _n=w__namespace.forwardRef(({className:e,sticky:t,asChild:o=false,...r},i)=>w__namespace.createElement(o?reactSlot.Slot:"header",{ref:i,"data-gds-part":"app-shell-header",className:n(Fn({sticky:t,className:e})),...r}));_n.displayName="AppShellHeader";var Wn=w__namespace.forwardRef(({className:e,placement:t,sticky:o,asChild:r=false,...i},a)=>w__namespace.createElement(r?reactSlot.Slot:"nav",{ref:a,"data-gds-part":"app-shell-nav","data-placement":t??"top",className:n(zn({placement:t,sticky:o,className:e})),...i}));Wn.displayName="AppShellNav";var $n=w__namespace.forwardRef(({className:e,sticky:t,asChild:o=false,...r},i)=>w__namespace.createElement(o?reactSlot.Slot:"aside",{ref:i,"data-gds-part":"app-shell-aside",className:n(Bn({sticky:t,className:e})),...r}));$n.displayName="AppShellAside";var Un=w__namespace.forwardRef(({className:e,maxWidth:t,asChild:o=false,...r},i)=>w__namespace.createElement(o?reactSlot.Slot:"main",{ref:i,"data-gds-part":"app-shell-main",className:n(Gn({maxWidth:t,className:e})),...r}));Un.displayName="AppShellMain";var jn=w__namespace.forwardRef(({className:e,asChild:t=false,...o},r)=>w__namespace.createElement(t?reactSlot.Slot:"footer",{ref:r,"data-gds-part":"app-shell-footer",className:n(On({className:e})),...o}));jn.displayName="AppShellFooter";var Kn=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(nt__namespace.Root,{ref:o,className:n("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Kn.displayName=nt__namespace.Root.displayName;var qn=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(nt__namespace.Image,{ref:o,className:n("aspect-square h-full w-full",e),...t}));qn.displayName=nt__namespace.Image.displayName;var Yn=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(nt__namespace.Fallback,{ref:o,className:n("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Yn.displayName=nt__namespace.Fallback.displayName;var Xn=classVarianceAuthority.cva("inline-flex items-center gap-1 border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 [&_svg]:size-3 [&_svg]:shrink-0",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",highlight:"border-transparent bg-gds-yellow-400 text-gds-gray-900 shadow hover:bg-gds-yellow-500",success:"border-transparent bg-gds-green-500 text-gds-gray-900 shadow hover:bg-gds-green-600",warning:"border-transparent bg-orange-500 text-white shadow hover:bg-orange-600",info:"border-transparent bg-blue-500 text-white shadow hover:bg-blue-600","success-soft":"border-gds-green-500/20 bg-gds-green-500/10 text-gds-green-600 dark:text-gds-green-400","warning-soft":"border-orange-500/20 bg-orange-500/10 text-orange-600 dark:text-orange-400","destructive-soft":"border-destructive/20 bg-destructive/10 text-destructive dark:text-red-400","info-soft":"border-blue-500/20 bg-blue-500/10 text-blue-600 dark:text-blue-400","highlight-soft":"border-gds-yellow-500/20 bg-gds-yellow-400/10 text-gds-yellow-600 dark:text-gds-yellow-400","success-outline":"border-gds-green-500/50 bg-transparent text-gds-green-600 dark:text-gds-green-400","warning-outline":"border-orange-500/50 bg-transparent text-orange-600 dark:text-orange-400","destructive-outline":"border-destructive/50 bg-transparent text-destructive dark:text-red-400","info-outline":"border-blue-500/50 bg-transparent text-blue-600 dark:text-blue-400"},rounded:{default:"rounded-md",full:"rounded-full"}},defaultVariants:{variant:"default",rounded:"default"}});function Vo({className:e,variant:t,rounded:o,...r}){return w__namespace.createElement("div",{className:n(Xn({variant:t,rounded:o}),e),...r})}var so=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",raised:"gds-button-raised"},size:{sm:"h-7 gap-1.5 px-2.5 text-xs [&_svg]:size-3.5",md:"h-8 gap-1.5 px-3 text-xs [&_svg]:size-3.5",default:"h-8 gap-1.5 px-3 text-xs [&_svg]:size-3.5",lg:"h-10 gap-2 px-4 text-sm [&_svg]:size-4",icon:"h-8 w-8 [&_svg]:size-3.5"}},defaultVariants:{variant:"default",size:"md"}}),xe=w__namespace.forwardRef(({className:e,variant:t,size:o,asChild:r=false,...i},a)=>w__namespace.createElement(r?reactSlot.Slot:"button",{"data-gds-part":"button",className:n("gds-button",so({variant:t,size:o,className:e})),ref:a,...i}));xe.displayName="Button";function Wo({className:e,classNames:t,showOutsideDays:o=true,captionLayout:r="label",buttonVariant:i="ghost",formatters:a,components:d,...m}){let s=reactDayPicker.getDefaultClassNames();return w__namespace.createElement(reactDayPicker.DayPicker,{showOutsideDays:o,className:n("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:c=>c.toLocaleString("default",{month:"short"}),...a},classNames:{root:n("w-fit",s.root),months:n("relative flex flex-col gap-4 md:flex-row",s.months),month:n("flex w-full flex-col gap-4",s.month),nav:n("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",s.nav),button_previous:n(so({variant:i}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",s.button_previous),button_next:n(so({variant:i}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",s.button_next),month_caption:n("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",s.month_caption),dropdowns:n("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",s.dropdowns),dropdown_root:n("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",s.dropdown_root),dropdown:n("bg-popover absolute inset-0 opacity-0",s.dropdown),caption_label:n("select-none font-medium",r==="label"?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",s.caption_label),table:"w-full border-collapse",weekdays:n("flex",s.weekdays),weekday:n("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",s.weekday),week:n("mt-2 flex w-full",s.week),week_number_header:n("w-[--cell-size] select-none",s.week_number_header),week_number:n("text-muted-foreground select-none text-[0.8rem]",s.week_number),day:n("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",s.day),range_start:n("bg-accent rounded-l-md",s.range_start),range_middle:n("rounded-none",s.range_middle),range_end:n("bg-accent rounded-r-md",s.range_end),today:n("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",s.today),outside:n("text-muted-foreground aria-selected:text-muted-foreground",s.outside),disabled:n("text-muted-foreground opacity-50",s.disabled),hidden:n("invisible",s.hidden),...t},components:{Root:({className:c,rootRef:l,...p})=>w__namespace.createElement("div",{"data-slot":"calendar",ref:l,className:n(c),...p}),Chevron:({className:c,orientation:l,...p})=>l==="left"?w__namespace.createElement(lucideReact.ChevronLeftIcon,{className:n("size-4",c),...p}):l==="right"?w__namespace.createElement(lucideReact.ChevronRightIcon,{className:n("size-4",c),...p}):w__namespace.createElement(lucideReact.ChevronDownIcon,{className:n("size-4",c),...p}),DayButton:Qn,WeekNumber:({children:c,...l})=>w__namespace.createElement("td",{...l},w__namespace.createElement("div",{className:"flex size-[--cell-size] items-center justify-center text-center"},c)),...d},...m})}function Qn({className:e,day:t,modifiers:o,...r}){let i=reactDayPicker.getDefaultClassNames(),a=w__namespace.useRef(null);return w__namespace.useEffect(()=>{o.focused&&a.current?.focus();},[o.focused]),w__namespace.createElement(xe,{ref:a,variant:"ghost",size:"icon","data-day":`${t.date.getFullYear()}-${String(t.date.getMonth()+1).padStart(2,"0")}-${String(t.date.getDate()).padStart(2,"0")}`,"data-selected-single":o.selected&&!o.range_start&&!o.range_end&&!o.range_middle,"data-range-start":o.range_start,"data-range-end":o.range_end,"data-range-middle":o.range_middle,className:n("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",i.day,e),...r})}var Tr=w__namespace.createContext(null);function po(e){let t=w__namespace.useContext(Tr);if(!t)throw new Error(`<${e}> must be rendered inside a <Carousel> root.`);return t}var fd=5e3,gt=w__namespace.forwardRef(({loop:e=true,align:t="start",slidesPerView:o=1,autoplay:r=false,draggable:i=true,onSlideChange:a,className:d,style:m,children:s,...c},l)=>{let p=w__namespace.useMemo(()=>({loop:e,align:t,slidesToScroll:1,watchDrag:i,containScroll:e?false:"trimSnaps"}),[e,t,i]),[g,u]=md__default.default(p),[b,f]=w__namespace.useState(0),[h,P]=w__namespace.useState(0),[S,R]=w__namespace.useState(false),[C,k]=w__namespace.useState(false),B=w__namespace.useRef(new Map),H=w__namespace.useRef(a);H.current=a;let I=w__namespace.useMemo(()=>r?r===true?{}:r:null,[r]);w__namespace.useEffect(()=>{if(!u)return;let v=()=>{f(u.selectedScrollSnap()),P(u.scrollSnapList().length),R(u.canScrollPrev()),k(u.canScrollNext()),H.current?.(u.selectedScrollSnap());};return v(),u.on("select",v),u.on("reInit",v),()=>{u.off("select",v),u.off("reInit",v);}},[u]);let V=w__namespace.useCallback(v=>{u&&u.selectedScrollSnap()===v&&u.scrollNext();},[u]),Pe=w__namespace.useRef(false),ee=w__namespace.useRef(true),ye=w__namespace.useRef(null);w__namespace.useImperativeHandle(l,()=>ye.current),w__namespace.useEffect(()=>{if(!I?.pauseWhenOffscreen){ee.current=true;return}let v=ye.current;if(!v||typeof IntersectionObserver>"u")return;let O=new IntersectionObserver(D=>{ee.current=D.some(te=>te.isIntersecting);},{threshold:.25});return O.observe(v),()=>O.disconnect()},[I?.pauseWhenOffscreen]),w__namespace.useEffect(()=>{if(!u||!I)return;let v=null,O=()=>{v&&clearTimeout(v);let fe=u.selectedScrollSnap(),ne=B.current.get(fe)??I.delay??fd;v=setTimeout(()=>{if(Pe.current||!ee.current){O();return}u.scrollNext();},ne);},D=()=>O(),te=()=>{v&&clearTimeout(v);},Me=()=>O();return u.on("select",D),u.on("pointerDown",te),u.on("settle",Me),O(),()=>{v&&clearTimeout(v),u.off("select",D),u.off("pointerDown",te),u.off("settle",Me);}},[u,I]);let G=()=>{I?.pauseOnHover!==false&&(Pe.current=true);},ge=()=>{Pe.current=false;},Ae=w__namespace.useMemo(()=>({api:u,selectedIndex:b,slideCount:h,canScrollPrev:S,canScrollNext:C,durationsRef:B,advanceFromSlide:V}),[u,b,h,S,C,V]),we=`calc(100% / ${o})`;return w__namespace.createElement(Tr.Provider,{value:Ae},w__namespace.createElement("div",{ref:ye,"data-gds-part":"carousel",className:n("relative",d),style:{"--gds-carousel-slide-basis":we,...m},onMouseEnter:G,onMouseLeave:ge,...c},w__namespace.createElement("div",{ref:g,"data-gds-part":"carousel-viewport",className:"overflow-hidden",style:{borderRadius:"var(--gds-carousel-radius, var(--gds-media-radius, 0.5rem))"}},w__namespace.createElement("div",{"data-gds-part":"carousel-track",className:"flex",style:{gap:"var(--gds-carousel-gap, 0)",touchAction:"pan-y pinch-zoom"}},s))))});gt.displayName="Carousel";var $o=w__namespace.forwardRef(({duration:e,className:t,style:o,children:r,...i},a)=>{let{durationsRef:d}=po("Carousel.Slide"),m=w__namespace.useRef(null);return w__namespace.useImperativeHandle(a,()=>m.current),w__namespace.useEffect(()=>{if(e==null)return;let s=m.current;if(!s?.parentElement)return;let c=Array.from(s.parentElement.children).indexOf(s);if(c<0)return;let l=d.current;return l.set(c,e),()=>{l.delete(c);}},[e,d]),w__namespace.createElement("div",{ref:m,"data-gds-part":"carousel-slide",className:n("min-w-0 shrink-0 grow-0",t),style:{flexBasis:"var(--gds-carousel-slide-basis, 100%)",...o},...i},r)});$o.displayName="Carousel.Slide";var Pr=w__namespace.forwardRef(({src:e,poster:t,alt:o,controls:r=false,loop:i=true,fit:a="cover",duration:d,className:m,style:s,...c},l)=>{let{api:p,selectedIndex:g,advanceFromSlide:u}=po("Carousel.VideoSlide"),b=w__namespace.useRef(null),f=w__namespace.useRef(null);w__namespace.useImperativeHandle(l,()=>b.current);let[h,P]=w__namespace.useState(null);w__namespace.useEffect(()=>{let R=b.current;R?.parentElement&&P(Array.from(R.parentElement.children).indexOf(R));},[p]);let S=h!=null&&h===g;return w__namespace.useEffect(()=>{let R=f.current;if(R)if(S){let C=R.play();C&&typeof C.catch=="function"&&C.catch(()=>{});}else R.pause(),R.currentTime=0;},[S]),w__namespace.createElement($o,{ref:b,duration:d,className:n("relative overflow-hidden bg-[var(--gds-media-placeholder-bg)]",m),style:s,"data-gds-part":"carousel-video-slide",...c},t&&w__namespace.createElement("img",{src:t,alt:o??"","aria-hidden":S,className:"absolute inset-0 h-full w-full",style:{objectFit:a,opacity:S?0:1,transition:"opacity var(--gds-carousel-fade-ms, 200ms) ease-out"}}),w__namespace.createElement("video",{ref:f,src:e,muted:true,playsInline:true,loop:i,controls:r,preload:"metadata","aria-label":o,className:"block h-full w-full",style:{objectFit:a,opacity:S?1:0,transition:"opacity var(--gds-carousel-fade-ms, 200ms) ease-out"},onEnded:()=>{i||h!=null&&u(h);}}))});Pr.displayName="Carousel.VideoSlide";var Mr=w__namespace.forwardRef(({position:e="below",renderDot:t,className:o,style:r,...i},a)=>{let{api:d,selectedIndex:m,slideCount:s}=po("Carousel.Dots");if(s<=1)return null;let c=Array.from({length:s},(p,g)=>g),l=e==="overlay"?{position:"absolute",insetInlineStart:0,insetInlineEnd:0,bottom:"var(--gds-carousel-dots-inset, 0.75rem)",zIndex:1}:{marginBlockStart:"var(--gds-carousel-dots-gap, 0.75rem)"};return w__namespace.createElement("div",{ref:a,"data-gds-part":"carousel-dots",className:n("flex items-center justify-center",o),style:{gap:"var(--gds-carousel-dots-spacing, 0.5rem)",...l,...r},...i},c.map(p=>{let g=p===m,u=()=>d?.scrollTo(p);return t?t({index:p,active:g,onClick:u}):w__namespace.createElement("button",{key:p,type:"button",onClick:u,"aria-label":`Go to slide ${p+1}`,"aria-current":g?"true":void 0,"data-active":g||void 0,className:"rounded-full transition-all",style:{width:g?"var(--gds-carousel-dot-active-width, 1.25rem)":"var(--gds-carousel-dot-size, 0.5rem)",height:"var(--gds-carousel-dot-size, 0.5rem)",background:g?"var(--gds-carousel-dot-active-color, oklch(var(--primary)))":"var(--gds-carousel-dot-color, oklch(var(--muted-foreground) / 0.4))"}})}))});Mr.displayName="Carousel.Dots";var Nr=w__namespace.forwardRef(({position:e="overlay",className:t,style:o,...r},i)=>e==="outside"?w__namespace.createElement("div",{ref:i,"data-gds-part":"carousel-arrows",className:n("flex items-center justify-end gap-2 pt-2",t),style:o,...r},w__namespace.createElement(lo,null),w__namespace.createElement(co,null)):w__namespace.createElement("div",{ref:i,"data-gds-part":"carousel-arrows",className:n("pointer-events-none absolute inset-0 z-[1]",t),style:o,...r},w__namespace.createElement(lo,{className:"pointer-events-auto absolute left-[var(--gds-carousel-arrow-inset,0.75rem)] top-1/2 -translate-y-1/2"}),w__namespace.createElement(co,{className:"pointer-events-auto absolute right-[var(--gds-carousel-arrow-inset,0.75rem)] top-1/2 -translate-y-1/2"})));Nr.displayName="Carousel.Arrows";var lo=w__namespace.forwardRef(({className:e,style:t,children:o,...r},i)=>{let{api:a,canScrollPrev:d}=po("Carousel.Prev");return w__namespace.createElement("button",{ref:i,type:"button","data-gds-part":"carousel-prev","aria-label":"Previous slide",disabled:!d,onClick:()=>a?.scrollPrev(),className:n("inline-flex items-center justify-center rounded-full","transition disabled:opacity-40 disabled:cursor-not-allowed","hover:[background:var(--gds-carousel-arrow-hover-bg,oklch(var(--background)))]",e),style:{width:"var(--gds-carousel-arrow-size, 2.25rem)",height:"var(--gds-carousel-arrow-size, 2.25rem)",background:"var(--gds-carousel-arrow-bg, oklch(var(--background) / 0.85))",color:"var(--gds-carousel-arrow-fg, oklch(var(--foreground)))",backdropFilter:"var(--gds-carousel-arrow-backdrop, blur(6px))",boxShadow:"var(--gds-carousel-arrow-shadow, 0 2px 8px oklch(0 0 0 / 0.12))",...t},...r},o??w__namespace.createElement(lucideReact.ChevronLeft,{className:"h-4 w-4","aria-hidden":true}))});lo.displayName="Carousel.Prev";var co=w__namespace.forwardRef(({className:e,style:t,children:o,...r},i)=>{let{api:a,canScrollNext:d}=po("Carousel.Next");return w__namespace.createElement("button",{ref:i,type:"button","data-gds-part":"carousel-next","aria-label":"Next slide",disabled:!d,onClick:()=>a?.scrollNext(),className:n("inline-flex items-center justify-center rounded-full","transition disabled:opacity-40 disabled:cursor-not-allowed","hover:[background:var(--gds-carousel-arrow-hover-bg,oklch(var(--background)))]",e),style:{width:"var(--gds-carousel-arrow-size, 2.25rem)",height:"var(--gds-carousel-arrow-size, 2.25rem)",background:"var(--gds-carousel-arrow-bg, oklch(var(--background) / 0.85))",color:"var(--gds-carousel-arrow-fg, oklch(var(--foreground)))",backdropFilter:"var(--gds-carousel-arrow-backdrop, blur(6px))",boxShadow:"var(--gds-carousel-arrow-shadow, 0 2px 8px oklch(0 0 0 / 0.12))",...t},...r},o??w__namespace.createElement(lucideReact.ChevronRight,{className:"h-4 w-4","aria-hidden":true}))});co.displayName="Carousel.Next";gt.Slide=$o;gt.VideoSlide=Pr;gt.Dots=Mr;gt.Arrows=Nr;gt.Prev=lo;gt.Next=co;var hd=gt;function bd(){return w__namespace.useContext(Tr)?.api}var ei=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement("div",{ref:o,"data-gds-part":"card",className:n("gds-card rounded-xl border bg-card text-card-foreground shadow",e),...t}));ei.displayName="Card";var ti=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement("div",{ref:o,"data-gds-part":"card-header",className:n("flex flex-col space-y-1.5 p-6",e),...t}));ti.displayName="CardHeader";var oi=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement("div",{ref:o,"data-gds-part":"card-title",className:n("font-semibold leading-none tracking-tight",e),...t}));oi.displayName="CardTitle";var ri=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement("div",{ref:o,"data-gds-part":"card-description",className:n("text-sm text-muted-foreground",e),...t}));ri.displayName="CardDescription";var ai=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement("div",{ref:o,"data-gds-part":"card-content",className:n("p-6 pt-0",e),...t}));ai.displayName="CardContent";var ni=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement("div",{ref:o,"data-gds-part":"card-footer",className:n("flex items-center p-6 pt-0",e),...t}));ni.displayName="CardFooter";var ii=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(mo__namespace.Root,{ref:o,className:n("gds-checkbox peer h-4 w-4 shrink-0 rounded-[3px] border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t},w__namespace.createElement(mo__namespace.Indicator,{className:n("flex items-center justify-center text-current")},w__namespace.createElement(lucideReact.Check,{className:"h-4 w-4"}))));ii.displayName=mo__namespace.Root.displayName;var Je=Ue__namespace.Root,Qe=Ue__namespace.Trigger,yd=Ue__namespace.Anchor,je=w__namespace.forwardRef(({className:e,align:t="center",sideOffset:o=4,...r},i)=>w__namespace.createElement(Ue__namespace.Portal,null,w__namespace.createElement(Ue__namespace.Content,{ref:i,align:t,sideOffset:o,className:n("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",e),...r})));je.displayName=Ue__namespace.Content.displayName;var wd="PPP",xd="LLL dd, y";function Rd({value:e,onChange:t,placeholder:o="Pick a date",disabled:r,className:i,contentClassName:a,align:d="start",side:m,format:s=wd,captionLayout:c,icon:l,"aria-label":p}){return w__namespace.createElement(Je,null,w__namespace.createElement(Qe,{asChild:true},w__namespace.createElement(xe,{type:"button",variant:"outline",disabled:r,"aria-label":p??(e?void 0:o),"data-empty":!e,className:n("w-[280px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",i)},l??w__namespace.createElement(lucideReact.CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?dateFns.format(e,s):w__namespace.createElement("span",null,o))),w__namespace.createElement(je,{className:n("w-auto p-0",a),align:d,side:m},w__namespace.createElement(Wo,{mode:"single",selected:e,onSelect:t,captionLayout:c,initialFocus:true})))}function Sd({value:e,onChange:t,placeholder:o="Pick a date range",disabled:r,className:i,contentClassName:a,align:d="start",side:m,format:s=xd,captionLayout:c,icon:l,numberOfMonths:p=2,"aria-label":g}){let u=!!e?.from;return w__namespace.createElement(Je,null,w__namespace.createElement(Qe,{asChild:true},w__namespace.createElement(xe,{type:"button",variant:"outline",disabled:r,"aria-label":g??(u?void 0:o),"data-empty":!u,className:n("w-[300px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",i)},l??w__namespace.createElement(lucideReact.CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?.from?e.to?w__namespace.createElement(w__namespace.Fragment,null,dateFns.format(e.from,s)," \u2013"," ",dateFns.format(e.to,s)):dateFns.format(e.from,s):w__namespace.createElement("span",null,o))),w__namespace.createElement(je,{className:n("w-auto p-0",a),align:d,side:m},w__namespace.createElement(Wo,{mode:"range",selected:e,onSelect:t,defaultMonth:e?.from,numberOfMonths:p,captionLayout:c,initialFocus:true})))}var kd=X__namespace.Root,Td=X__namespace.Trigger,li=X__namespace.Portal,Pd=X__namespace.Close,Er=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(X__namespace.Overlay,{ref:o,className:n("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Er.displayName=X__namespace.Overlay.displayName;var di=w__namespace.forwardRef(({className:e,children:t,...o},r)=>w__namespace.createElement(li,null,w__namespace.createElement(Er,null),w__namespace.createElement(X__namespace.Content,{ref:r,className:n("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o},t,w__namespace.createElement(X__namespace.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},w__namespace.createElement(lucideReact.X,{className:"h-4 w-4"}),w__namespace.createElement("span",{className:"sr-only"},"Close")))));di.displayName=X__namespace.Content.displayName;var ci=({className:e,...t})=>w__namespace.createElement("div",{className:n("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ci.displayName="DialogHeader";var pi=({className:e,...t})=>w__namespace.createElement("div",{className:n("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});pi.displayName="DialogFooter";var mi=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(X__namespace.Title,{ref:o,className:n("text-lg font-semibold leading-none tracking-tight",e),...t}));mi.displayName=X__namespace.Title.displayName;var ui=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(X__namespace.Description,{ref:o,className:n("text-sm text-muted-foreground",e),...t}));ui.displayName=X__namespace.Description.displayName;var Ld=A__namespace.Root,Hd=A__namespace.Trigger,Dd=A__namespace.Group,Ad=A__namespace.Portal,Id=A__namespace.Sub,Fd=A__namespace.RadioGroup,gi=w__namespace.forwardRef(({className:e,inset:t,children:o,...r},i)=>w__namespace.createElement(A__namespace.SubTrigger,{ref:i,className:n("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r},o,w__namespace.createElement(lucideReact.ChevronRight,{className:"ml-auto"})));gi.displayName=A__namespace.SubTrigger.displayName;var fi=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(A__namespace.SubContent,{ref:o,className:n("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));fi.displayName=A__namespace.SubContent.displayName;var hi=w__namespace.forwardRef(({className:e,sideOffset:t=4,...o},r)=>w__namespace.createElement(A__namespace.Portal,null,w__namespace.createElement(A__namespace.Content,{ref:r,sideOffset:t,className:n("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...o})));hi.displayName=A__namespace.Content.displayName;var bi=w__namespace.forwardRef(({className:e,inset:t,...o},r)=>w__namespace.createElement(A__namespace.Item,{ref:r,className:n("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));bi.displayName=A__namespace.Item.displayName;var vi=w__namespace.forwardRef(({className:e,children:t,checked:o,...r},i)=>w__namespace.createElement(A__namespace.CheckboxItem,{ref:i,className:n("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...r},w__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},w__namespace.createElement(A__namespace.ItemIndicator,null,w__namespace.createElement(lucideReact.Check,{className:"h-4 w-4"}))),t));vi.displayName=A__namespace.CheckboxItem.displayName;var yi=w__namespace.forwardRef(({className:e,children:t,...o},r)=>w__namespace.createElement(A__namespace.RadioItem,{ref:r,className:n("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o},w__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},w__namespace.createElement(A__namespace.ItemIndicator,null,w__namespace.createElement(lucideReact.Circle,{className:"h-2 w-2 fill-current"}))),t));yi.displayName=A__namespace.RadioItem.displayName;var wi=w__namespace.forwardRef(({className:e,inset:t,...o},r)=>w__namespace.createElement(A__namespace.Label,{ref:r,className:n("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));wi.displayName=A__namespace.Label.displayName;var xi=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(A__namespace.Separator,{ref:o,className:n("-mx-1 my-1 h-px bg-muted",e),...t}));xi.displayName=A__namespace.Separator.displayName;var Ri=({className:e,...t})=>w__namespace.createElement("span",{className:n("ml-auto text-xs tracking-widest opacity-60",e),...t});Ri.displayName="DropdownMenuShortcut";var Bd=classVarianceAuthority.cva("flex w-full rounded-md border border-input bg-transparent shadow-sm transition-colors file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{default:"h-9 pl-3 pr-3 py-1 text-base file:text-sm md:text-sm",sm:"h-8 pl-2 pr-2 py-1 text-xs file:text-xs"}},defaultVariants:{size:"default"}}),Si=w__namespace.forwardRef(({className:e,type:t,size:o="default",...r},i)=>w__namespace.createElement("input",{type:t,className:n(Bd({size:o}),e),ref:i,...r}));Si.displayName="Input";var Od=classVarianceAuthority.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ci=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(Lr__namespace.Root,{ref:o,className:n(Od(),e),...t}));Ci.displayName=Lr__namespace.Root.displayName;var ki=w__namespace.forwardRef(({className:e,value:t,...o},r)=>w__namespace.createElement(fo__namespace.Root,{ref:r,className:n("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...o},w__namespace.createElement(fo__namespace.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})));ki.displayName=fo__namespace.Root.displayName;var Hr=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(cmdk.Command,{ref:o,className:n("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Hr.displayName=cmdk.Command.displayName;var Dr=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":""},w__namespace.createElement(lucideReact.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),w__namespace.createElement(cmdk.Command.Input,{ref:o,className:n("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})));Dr.displayName=cmdk.Command.Input.displayName;var Ar=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(cmdk.Command.List,{ref:o,className:n("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Ar.displayName=cmdk.Command.List.displayName;var Ir=w__namespace.forwardRef((e,t)=>w__namespace.createElement(cmdk.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Ir.displayName=cmdk.Command.Empty.displayName;var qo=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(cmdk.Command.Group,{ref:o,className:n("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));qo.displayName=cmdk.Command.Group.displayName;var Fr=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(cmdk.Command.Separator,{ref:o,className:n("-mx-1 h-px bg-border",e),...t}));Fr.displayName=cmdk.Command.Separator.displayName;var jt=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(cmdk.Command.Item,{ref:o,className:n("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));jt.displayName=cmdk.Command.Item.displayName;var ho=w__namespace.forwardRef(({className:e,orientation:t="horizontal",decorative:o=true,...r},i)=>w__namespace.createElement(zr__namespace.Root,{ref:i,decorative:o,orientation:t,className:n("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));ho.displayName=zr__namespace.Root.displayName;var Kd=3,Ti=w__namespace.forwardRef(function({options:t,value:o,defaultValue:r,onValueChange:i,placeholder:a="Select\u2026",searchPlaceholder:d="Search\u2026",emptyMessage:m="Nothing matches.",maxCount:s=Kd,searchable:c=true,badgeDismissible:l=true,disabled:p=false,modalPopover:g=false,className:u,id:b,"aria-label":f,...h},P){let S=o!==void 0,[R,C]=w__namespace.useState(r??[]),k=S?o:R,[B,H]=w__namespace.useState(false),I=w__namespace.useMemo(()=>{let v=new Map;for(let O of t)v.set(O.value,O);return v},[t]),V=w__namespace.useCallback(v=>{S||C(v),i?.(v);},[S,i]),Pe=v=>{k.includes(v)?V(k.filter(O=>O!==v)):V([...k,v]);},ee=(v,O)=>{v.preventDefault(),v.stopPropagation(),V(k.filter(D=>D!==O));},ye=v=>{v?.preventDefault(),v?.stopPropagation(),V([]);},G=()=>{let v=t.filter(O=>!O.disabled).map(O=>O.value);V(v);},ge=t.length>0&&t.filter(v=>!v.disabled).every(v=>k.includes(v.value)),Ae=k.slice(0,s),we=Math.max(0,k.length-s);return w__namespace.createElement(Je,{open:B,onOpenChange:H,modal:g},w__namespace.createElement(Qe,{asChild:true},w__namespace.createElement("button",{ref:P,type:"button",id:b,role:"combobox","aria-expanded":B,"aria-haspopup":"listbox","aria-label":f,disabled:p,"data-gds-part":"multi-select",className:n("flex min-h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-transparent pl-2 pr-2 text-sm shadow-sm","ring-offset-background placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50","[&[data-state=open]]:ring-1 [&[data-state=open]]:ring-ring",u)},k.length===0?w__namespace.createElement("span",{className:"text-muted-foreground px-1"},a):w__namespace.createElement("div",{className:"flex flex-1 flex-wrap items-center gap-1 py-1","data-gds-part":"multi-select-badges"},Ae.map(v=>{let O=I.get(v);if(!O)return null;let D=O.icon;return w__namespace.createElement(Vo,{key:v,variant:"secondary",className:"gap-1 pr-1","data-gds-part":"multi-select-badge"},D?w__namespace.createElement(D,{className:"h-3 w-3"}):null,w__namespace.createElement("span",{className:"truncate max-w-[12rem]"},O.label),l&&!p&&w__namespace.createElement("span",{role:"button","aria-label":`Remove ${O.label}`,tabIndex:0,onClick:te=>ee(te,v),onKeyDown:te=>{(te.key==="Enter"||te.key===" ")&&ee(te,v);},className:"ml-0.5 inline-flex h-4 w-4 cursor-pointer items-center justify-center rounded-sm hover:bg-muted-foreground/20"},w__namespace.createElement(lucideReact.X,{className:"h-3 w-3","aria-hidden":true})))}),we>0&&w__namespace.createElement(Vo,{variant:"outline",className:"text-muted-foreground","data-gds-part":"multi-select-overflow",title:k.slice(s).map(v=>I.get(v)?.label??v).join(", ")},"+",we," more")),w__namespace.createElement("div",{className:"flex shrink-0 items-center gap-1"},k.length>0&&!p&&w__namespace.createElement("span",{role:"button","aria-label":"Clear all",tabIndex:0,onClick:v=>ye(v),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&ye(v);},className:"inline-flex h-5 w-5 cursor-pointer items-center justify-center rounded-sm text-muted-foreground hover:text-foreground hover:bg-muted"},w__namespace.createElement(lucideReact.XCircle,{className:"h-3.5 w-3.5","aria-hidden":true})),w__namespace.createElement(lucideReact.ChevronDown,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":true})))),w__namespace.createElement(je,{align:"start",className:"w-[var(--radix-popover-trigger-width)] p-0","data-gds-part":"multi-select-content"},w__namespace.createElement(Hr,null,c&&w__namespace.createElement(Dr,{placeholder:d}),w__namespace.createElement(Ar,null,w__namespace.createElement(Ir,null,m),w__namespace.createElement(qo,null,t.map(v=>{let O=v.icon,D=k.includes(v.value);return w__namespace.createElement(jt,{key:v.value,value:v.label,onSelect:()=>Pe(v.value),disabled:v.disabled,"data-gds-part":"multi-select-item","data-selected":D||void 0},w__namespace.createElement("div",{className:n("mr-2 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border border-primary",D?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),"aria-hidden":true},w__namespace.createElement(lucideReact.Check,{className:"h-3 w-3"})),O?w__namespace.createElement(O,{className:"mr-2 h-4 w-4 text-muted-foreground"}):null,w__namespace.createElement("span",{className:"truncate"},v.label))})),w__namespace.createElement(Fr,null),w__namespace.createElement(qo,null,w__namespace.createElement("div",{className:"flex items-center justify-between gap-1 p-1"},w__namespace.createElement(jt,{onSelect:G,className:"flex-1 justify-center text-xs",disabled:ge},"Select all"),w__namespace.createElement(ho,{orientation:"vertical",className:"h-5"}),w__namespace.createElement(jt,{onSelect:()=>ye(),className:"flex-1 justify-center text-xs",disabled:k.length===0},"Clear"),w__namespace.createElement(ho,{orientation:"vertical",className:"h-5"}),w__namespace.createElement(jt,{onSelect:()=>H(false),className:"flex-1 justify-center text-xs"},"Close")))))))});Ti.displayName="MultiSelect";var Pi=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(ht__namespace.Root,{className:n("grid gap-2",e),...t,ref:o}));Pi.displayName=ht__namespace.Root.displayName;var Mi=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(ht__namespace.Item,{ref:o,className:n("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t},w__namespace.createElement(ht__namespace.Indicator,{className:"flex items-center justify-center"},w__namespace.createElement(lucideReact.Circle,{className:"h-2.5 w-2.5 fill-current text-current"}))));Mi.displayName=ht__namespace.Item.displayName;var Zd=({className:e,...t})=>w__namespace.createElement(Kt__namespace.PanelGroup,{"data-gds-part":"resizable-panel-group",className:n("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t}),Xd=Kt__namespace.Panel,Jd=({withHandle:e,className:t,...o})=>w__namespace.createElement(Kt__namespace.PanelResizeHandle,{"data-gds-part":"resizable-handle",className:n("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...o},e&&w__namespace.createElement("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border"},w__namespace.createElement(lucideReact.GripVertical,{className:"h-2.5 w-2.5"})));var Ni=classVarianceAuthority.cva("gds-row flex flex-row",{variants:{gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{true:"flex-wrap",false:"flex-nowrap"}},defaultVariants:{gap:"md",align:"center",justify:"start",wrap:false}}),Ei=w__namespace.forwardRef(({className:e,gap:t,align:o,justify:r,wrap:i,asChild:a=false,...d},m)=>w__namespace.createElement(a?reactSlot.Slot:"div",{ref:m,"data-gds-part":"row",className:n(Ni({gap:t,align:o,justify:r,wrap:i,className:e})),...d}));Ei.displayName="Row";var Li=classVarianceAuthority.cva("gds-grid grid",{variants:{cols:{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 md:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",5:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-5",6:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-6",12:"grid-cols-4 md:grid-cols-6 lg:grid-cols-12"},gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"}},defaultVariants:{cols:"3",gap:"md",align:"stretch"}}),Hi=w__namespace.forwardRef(({className:e,cols:t,gap:o,align:r,asChild:i=false,...a},d)=>w__namespace.createElement(i?reactSlot.Slot:"div",{ref:d,"data-gds-part":"grid",className:n(Li({cols:t,gap:o,align:r,className:e})),...a}));Hi.displayName="Grid";var Di=classVarianceAuthority.cva("gds-flex flex",{variants:{direction:{row:"flex-row",col:"flex-col","row-reverse":"flex-row-reverse","col-reverse":"flex-col-reverse"},gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"}},defaultVariants:{direction:"row",gap:"none",align:"stretch",justify:"start",wrap:"nowrap"}}),Ai=w__namespace.forwardRef(({className:e,direction:t,gap:o,align:r,justify:i,wrap:a,asChild:d=false,...m},s)=>w__namespace.createElement(d?reactSlot.Slot:"div",{ref:s,"data-gds-part":"flex",className:n(Di({direction:t,gap:o,align:r,justify:i,wrap:a,className:e})),...m}));Ai.displayName="Flex";var Ii=w__namespace.forwardRef(({className:e,children:t,...o},r)=>w__namespace.createElement(Ge__namespace.Root,{ref:r,className:n("relative overflow-hidden",e),...o},w__namespace.createElement(Ge__namespace.Viewport,{className:"h-full w-full rounded-[inherit]"},t),w__namespace.createElement(Br,null),w__namespace.createElement(Ge__namespace.Corner,null)));Ii.displayName=Ge__namespace.Root.displayName;var Br=w__namespace.forwardRef(({className:e,orientation:t="vertical",...o},r)=>w__namespace.createElement(Ge__namespace.ScrollAreaScrollbar,{ref:r,orientation:t,className:n("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o},w__namespace.createElement(Ge__namespace.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})));Br.displayName=Ge__namespace.ScrollAreaScrollbar.displayName;var lc=F__namespace.Root,dc=F__namespace.Group,cc=F__namespace.Value,pc=classVarianceAuthority.cva("flex w-full items-center justify-between rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",{variants:{size:{default:"h-10 px-3 py-2 text-sm",sm:"h-8 px-2 py-1 text-xs"}},defaultVariants:{size:"default"}}),zi=w__namespace.forwardRef(({className:e,children:t,size:o="default",...r},i)=>w__namespace.createElement(F__namespace.Trigger,{ref:i,className:n(pc({size:o}),e),...r},t,w__namespace.createElement(F__namespace.Icon,{asChild:true},w__namespace.createElement(lucideReact.ChevronDown,{className:n("opacity-50",o==="sm"?"h-3.5 w-3.5":"h-4 w-4")}))));zi.displayName=F__namespace.Trigger.displayName;var Gr=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(F__namespace.ScrollUpButton,{ref:o,className:n("flex cursor-default items-center justify-center py-1",e),...t},w__namespace.createElement(lucideReact.ChevronUp,{className:"h-4 w-4"})));Gr.displayName=F__namespace.ScrollUpButton.displayName;var Or=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(F__namespace.ScrollDownButton,{ref:o,className:n("flex cursor-default items-center justify-center py-1",e),...t},w__namespace.createElement(lucideReact.ChevronDown,{className:"h-4 w-4"})));Or.displayName=F__namespace.ScrollDownButton.displayName;var Bi=w__namespace.forwardRef(({className:e,children:t,position:o="popper",...r},i)=>w__namespace.createElement(F__namespace.Portal,null,w__namespace.createElement(F__namespace.Content,{ref:i,className:n("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:o,...r},w__namespace.createElement(Gr,null),w__namespace.createElement(F__namespace.Viewport,{className:n("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},t),w__namespace.createElement(Or,null))));Bi.displayName=F__namespace.Content.displayName;var Gi=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(F__namespace.Label,{ref:o,className:n("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Gi.displayName=F__namespace.Label.displayName;var Oi=w__namespace.forwardRef(({className:e,children:t,...o},r)=>w__namespace.createElement(F__namespace.Item,{ref:r,className:n("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o},w__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},w__namespace.createElement(F__namespace.ItemIndicator,null,w__namespace.createElement(lucideReact.Check,{className:"h-4 w-4"}))),w__namespace.createElement(F__namespace.ItemText,null,t)));Oi.displayName=F__namespace.Item.displayName;var Vi=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(F__namespace.Separator,{ref:o,className:n("-mx-1 my-1 h-px bg-muted",e),...t}));Vi.displayName=F__namespace.Separator.displayName;var gc=X__namespace.Root,fc=X__namespace.Trigger,hc=X__namespace.Close,_i=X__namespace.Portal,Vr=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(X__namespace.Overlay,{className:n("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));Vr.displayName=X__namespace.Overlay.displayName;var bc=classVarianceAuthority.cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Wi=w__namespace.forwardRef(({side:e="right",className:t,children:o,...r},i)=>w__namespace.createElement(_i,null,w__namespace.createElement(Vr,null),w__namespace.createElement(X__namespace.Content,{ref:i,className:n(bc({side:e}),t),...r},o,w__namespace.createElement(X__namespace.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary"},w__namespace.createElement(lucideReact.X,{className:"h-4 w-4"}),w__namespace.createElement("span",{className:"sr-only"},"Close")))));Wi.displayName=X__namespace.Content.displayName;var $i=({className:e,...t})=>w__namespace.createElement("div",{className:n("flex flex-col space-y-2 text-center sm:text-left",e),...t});$i.displayName="SheetHeader";var Ui=({className:e,...t})=>w__namespace.createElement("div",{className:n("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ui.displayName="SheetFooter";var ji=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(X__namespace.Title,{ref:o,className:n("text-lg font-semibold text-foreground",e),...t}));ji.displayName=X__namespace.Title.displayName;var Ki=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(X__namespace.Description,{ref:o,className:n("text-sm text-muted-foreground",e),...t}));Ki.displayName=X__namespace.Description.displayName;function vc({className:e,...t}){return React.createElement("div",{className:n("animate-pulse rounded-md bg-muted",e),...t})}var qi=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(it__namespace.Root,{ref:o,className:n("relative flex w-full touch-none select-none items-center",e),...t},w__namespace.createElement(it__namespace.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary"},w__namespace.createElement(it__namespace.Range,{className:"absolute h-full bg-primary"})),w__namespace.createElement(it__namespace.Thumb,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})));qi.displayName=it__namespace.Root.displayName;var Mc={vertical:sortable.verticalListSortingStrategy,horizontal:sortable.horizontalListSortingStrategy,grid:sortable.rectSortingStrategy},_r=w__namespace.createContext(null),os=w__namespace.createContext(null),Wr=w__namespace.forwardRef(function({disabled:t=false,className:o,children:r,...i},a){let d=w__namespace.useRef(new Map),m=w__namespace.useCallback(p=>(d.current.set(p.id,p),()=>{d.current.delete(p.id);}),[]),s=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:4}}),core.useSensor(core.KeyboardSensor,{coordinateGetter:sortable.sortableKeyboardCoordinates})),c=p=>{let g=d.current,u=g.get(String(p));if(u)return u;for(let b of g.values())if(b.values.some(f=>f===p))return b;return null},l=w__namespace.useCallback(p=>{if(t)return;let{active:g,over:u}=p;if(!u)return;let b=c(g.id),f=c(u.id);if(!b||!f)return;if(b.id===f.id){if(g.id===u.id)return;let R=b.values.findIndex(k=>k===g.id),C=b.values.findIndex(k=>k===u.id);if(R===-1||C===-1)return;b.onReorder?.(sortable.arrayMove(b.values,R,C));return}let h=b.values.filter(R=>R!==g.id),P=u.id===f.id?f.values.length:Math.max(0,f.values.findIndex(R=>R===u.id)),S=[...f.values.slice(0,P),g.id,...f.values.slice(P)];b.onReorder?.(h),f.onReorder?.(S);},[t]);return w__namespace.createElement(os.Provider,{value:{registerContainer:m}},w__namespace.createElement(core.DndContext,{sensors:s,collisionDetection:core.closestCorners,onDragEnd:l},w__namespace.createElement("div",{ref:a,"data-gds-part":"sortable-group","data-disabled":t||void 0,className:n(o),...i},r)))});Wr.displayName="Sortable.Group";var vo=w__namespace.forwardRef(function({values:t,onReorder:o,strategy:r="vertical",disabled:i=false,id:a,className:d,children:m,...s},c){let l=w__namespace.useContext(os),p=l!==null,g=w__namespace.useId(),u=a??g;w__namespace.useEffect(()=>{if(p)return l.registerContainer({id:u,values:t,onReorder:o})},[p,l,u,t,o]);let b=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:4}}),core.useSensor(core.KeyboardSensor,{coordinateGetter:sortable.sortableKeyboardCoordinates})),f=w__namespace.useCallback(S=>{let{active:R,over:C}=S;if(!C||R.id===C.id)return;let k=t.findIndex(H=>H===R.id),B=t.findIndex(H=>H===C.id);k===-1||B===-1||o?.(sortable.arrayMove(t,k,B));},[t,o]),h=w__namespace.useMemo(()=>({disabled:i}),[i]),P=w__namespace.createElement(sortable.SortableContext,{items:t,strategy:Mc[r]},w__namespace.createElement(Nc,{id:u,enabled:p,forwardedRef:c,strategy:r,disabled:i,className:d,...s},m));return p?w__namespace.createElement(_r.Provider,{value:h},P):w__namespace.createElement(_r.Provider,{value:h},w__namespace.createElement(core.DndContext,{sensors:b,collisionDetection:core.closestCenter,onDragEnd:f},P))});vo.displayName="Sortable";function Nc({id:e,enabled:t,forwardedRef:o,strategy:r,disabled:i,className:a,children:d,...m}){let s=core.useDroppable({id:e,disabled:!t}),c=w__namespace.useCallback(l=>{t&&s.setNodeRef(l),typeof o=="function"?o(l):o&&(o.current=l);},[t,s,o]);return w__namespace.createElement("div",{ref:c,"data-gds-part":"sortable","data-strategy":r,"data-disabled":i||void 0,className:n(a),...m},d)}var rs=w__namespace.createContext(null),$r=w__namespace.forwardRef(function({value:t,asChild:o=false,disabled:r,className:i,style:a,children:d,...m},s){let c=w__namespace.useContext(_r);if(!c)throw new Error("<Sortable.Item> must be rendered inside <Sortable>.");let l=c.disabled||r||false,{attributes:p,listeners:g,setNodeRef:u,setActivatorNodeRef:b,transform:f,transition:h,isDragging:P}=sortable.useSortable({id:t,disabled:l}),S=w__namespace.useRef(false),R=w__namespace.useCallback(H=>{u(H),typeof s=="function"?s(H):s&&(s.current=H);},[u,s]),C=w__namespace.useMemo(()=>({listeners:g,setActivatorNodeRef:b,hasHandle:S,disabled:l}),[g,b,l]),k={transform:utilities.CSS.Transform.toString(f),transition:h,zIndex:P?1:void 0,cursor:l?"default":S.current?void 0:"grab",...a},B=o?reactSlot.Slot:"div";return w__namespace.createElement(rs.Provider,{value:C},w__namespace.createElement(B,{ref:R,"data-gds-part":"sortable-item","data-value":String(t),"data-dragging":P||void 0,className:n(i),style:k,...p,...S.current?{}:g,...m},d))});$r.displayName="Sortable.Item";var Ur=w__namespace.forwardRef(function({asChild:t=false,className:o,children:r,...i},a){let d=w__namespace.useContext(rs);if(!d)throw new Error("<Sortable.Handle> must be rendered inside <Sortable.Item>.");w__namespace.useLayoutEffect(()=>(d.hasHandle.current=true,()=>{d.hasHandle.current=false;}),[d.hasHandle]);let m=w__namespace.useCallback(c=>{d.setActivatorNodeRef(c),typeof a=="function"?a(c):a&&(a.current=c);},[d,a]),s={"data-gds-part":"sortable-handle","aria-label":"Drag to reorder",className:n("cursor-grab touch-none select-none",d.disabled&&"cursor-default opacity-50",o),...d.disabled?{}:d.listeners,...i};return t?w__namespace.createElement(reactSlot.Slot,{ref:m,...s},r):w__namespace.createElement("button",{type:"button",ref:m,...s},r)});Ur.displayName="Sortable.Handle";vo.Item=$r;vo.Handle=Ur;vo.Group=Wr;var Ec=vo;var as=classVarianceAuthority.cva("gds-stack flex flex-col",{variants:{gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}},defaultVariants:{gap:"md",align:"stretch",justify:"start"}}),ns=w__namespace.forwardRef(({className:e,gap:t,align:o,justify:r,asChild:i=false,...a},d)=>w__namespace.createElement(i?reactSlot.Slot:"div",{ref:d,"data-gds-part":"stack",className:n(as({gap:t,align:o,justify:r,className:e})),...a}));ns.displayName="Stack";var is=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(wo__namespace.Root,{className:n("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:o},w__namespace.createElement(wo__namespace.Thumb,{className:n("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})));is.displayName=wo__namespace.Root.displayName;var ss=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement("div",{className:"relative w-full overflow-auto"},w__namespace.createElement("table",{ref:o,className:n("w-full caption-bottom text-sm",e),...t})));ss.displayName="Table";var ls=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement("thead",{ref:o,className:n("[&_tr]:border-b",e),...t}));ls.displayName="TableHeader";var ds=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement("tbody",{ref:o,className:n("[&_tr:last-child]:border-0",e),...t}));ds.displayName="TableBody";var cs=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement("tfoot",{ref:o,className:n("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));cs.displayName="TableFooter";var ps=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement("tr",{ref:o,className:n("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));ps.displayName="TableRow";var ms=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement("th",{ref:o,className:n("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));ms.displayName="TableHead";var us=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement("td",{ref:o,className:n("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));us.displayName="TableCell";var gs=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement("caption",{ref:o,className:n("mt-4 text-sm text-muted-foreground",e),...t}));gs.displayName="TableCaption";var fs=w__namespace.createContext(w__namespace.createElement(lucideReact.ChevronRight,null)),hs=w__namespace.forwardRef(({separator:e,children:t,...o},r)=>w__namespace.createElement(fs.Provider,{value:e??w__namespace.createElement(lucideReact.ChevronRight,null)},w__namespace.createElement("nav",{ref:r,"aria-label":"breadcrumb",...o},t)));hs.displayName="Breadcrumb";var bs=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement("ol",{ref:o,className:n("flex flex-wrap items-center gap-1.5 break-words text-xs text-muted-foreground",e),...t}));bs.displayName="BreadcrumbList";var vs=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement("li",{ref:o,className:n("inline-flex items-center gap-1.5",e),...t}));vs.displayName="BreadcrumbItem";var tr=n("inline-flex items-center gap-1.5 rounded-md px-1.5 py-0.5 text-xs","transition-colors hover:text-foreground hover:bg-muted/60","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","[&_svg]:pointer-events-none [&_svg]:size-3.5 [&_svg]:shrink-0"),ys=w__namespace.forwardRef(({asChild:e,className:t,href:o,...r},i)=>e?w__namespace.createElement("span",{ref:i,className:n(tr,t),...r}):o?w__namespace.createElement("a",{ref:i,href:o,className:n(tr,t),...r}):w__namespace.createElement("button",{ref:i,type:"button",className:n(tr,t),...r}));ys.displayName="BreadcrumbLink";var ws=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement("span",{ref:o,role:"link","aria-disabled":"true","aria-current":"page",className:n("inline-flex items-center gap-1.5 px-0.5 text-xs font-medium text-foreground","[&_svg]:pointer-events-none [&_svg]:size-3.5 [&_svg]:shrink-0",e),...t}));ws.displayName="BreadcrumbPage";var xs=({children:e,className:t,...o})=>{let r=w__namespace.useContext(fs);return w__namespace.createElement("li",{role:"presentation","aria-hidden":"true",className:n("[&_svg]:size-3 [&_svg]:shrink-0 text-muted-foreground/60",t),...o},e??r)};xs.displayName="BreadcrumbSeparator";var Rs=({className:e,...t})=>w__namespace.createElement("span",{role:"presentation","aria-hidden":"true",className:n("flex h-5 w-5 items-center justify-center",e),...t},w__namespace.createElement(lucideReact.MoreHorizontal,{className:"h-3.5 w-3.5"}),w__namespace.createElement("span",{className:"sr-only"},"More"));Rs.displayName="BreadcrumbEllipsis";var Ss=w__namespace.forwardRef(({label:e,items:t,onSelect:o,onSelectLabel:r,current:i,className:a},d)=>{let[m,s]=w__namespace.useState(false);return w__namespace.createElement(Je,{open:m,onOpenChange:s},w__namespace.createElement(Qe,{asChild:true},w__namespace.createElement("button",{ref:d,type:"button",className:n(tr,i&&"font-medium text-foreground",a),onClick:()=>{r?r():s(c=>!c);}},w__namespace.createElement("span",null,e),w__namespace.createElement(lucideReact.ChevronDown,{className:n("h-3 w-3 text-muted-foreground transition-transform",m&&"rotate-180"),onClick:c=>{c.stopPropagation(),s(l=>!l);},role:"button","aria-label":`Show ${e} children`}))),w__namespace.createElement(je,{align:"start",className:"w-64 p-1 max-h-80 overflow-y-auto"},t.length===0?w__namespace.createElement("p",{className:"px-2 py-1.5 text-xs text-muted-foreground"},"No items here yet."):w__namespace.createElement("ul",{className:"flex flex-col gap-0.5"},t.map(c=>w__namespace.createElement("li",{key:c.id},w__namespace.createElement("button",{type:"button",onClick:()=>{o(c.id),s(false);},className:n("w-full text-left rounded-md px-2 py-1.5","flex items-start gap-2","hover:bg-muted transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",c.active&&"bg-muted/60")},w__namespace.createElement("span",{className:"flex-1 min-w-0"},w__namespace.createElement("span",{className:"flex items-center gap-1.5"},w__namespace.createElement("span",{className:"text-xs font-medium text-foreground truncate"},c.label),c.active&&w__namespace.createElement(lucideReact.Check,{className:"h-3 w-3 text-primary shrink-0"})),c.summary&&w__namespace.createElement("span",{className:"block text-[10px] text-muted-foreground leading-snug truncate"},c.summary)),c.hasChildren&&w__namespace.createElement(lucideReact.ChevronRight,{className:"h-3 w-3 text-muted-foreground/70 shrink-0 mt-0.5"})))))))});Ss.displayName="BreadcrumbMenuTrigger";var Kr=Ke__namespace.Provider,Lt=Ke__namespace.Root,Ht=Ke__namespace.Trigger,bt=w__namespace.forwardRef(({className:e,sideOffset:t=4,...o},r)=>w__namespace.createElement(Ke__namespace.Portal,null,w__namespace.createElement(Ke__namespace.Content,{ref:r,sideOffset:t,className:n("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...o})));bt.displayName=Ke__namespace.Content.displayName;var ks=w__namespace.createContext({size:"md",variant:"pill"}),Fc=qe__namespace.Root,zc=classVarianceAuthority.cva("inline-flex items-center text-muted-foreground",{variants:{variant:{pill:"justify-center rounded-lg bg-muted",underlined:"justify-start border-b border-border"},size:{sm:"",md:"",lg:""}},compoundVariants:[{variant:"pill",size:"sm",className:"h-7 p-0.5"},{variant:"pill",size:"md",className:"h-8 p-0.5"},{variant:"pill",size:"lg",className:"h-10 p-1"},{variant:"underlined",size:"sm",className:"gap-3"},{variant:"underlined",size:"md",className:"gap-4"},{variant:"underlined",size:"lg",className:"gap-6"}],defaultVariants:{variant:"pill",size:"md"}}),Bc=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{pill:"rounded-md data-[state=active]:bg-background data-[state=active]:text-foreground",underlined:"rounded-none bg-transparent border-b-2 border-transparent -mb-px hover:text-foreground data-[state=active]:border-primary data-[state=active]:text-primary"},size:{sm:"text-[11px] gap-1 [&_svg]:size-3",md:"text-xs gap-1.5 [&_svg]:size-3.5",lg:"text-sm gap-2 [&_svg]:size-4"}},compoundVariants:[{variant:"pill",size:"sm",className:"h-6 px-1.5"},{variant:"pill",size:"md",className:"h-7 px-2"},{variant:"pill",size:"lg",className:"h-8 px-2.5"},{variant:"underlined",size:"sm",className:"pb-1.5 pt-1 px-1"},{variant:"underlined",size:"md",className:"pb-2 pt-1.5 px-1.5"},{variant:"underlined",size:"lg",className:"pb-2.5 pt-2 px-2"}],defaultVariants:{variant:"pill",size:"md"}}),Ts=w__namespace.forwardRef(({className:e,size:t="md",variant:o="pill",children:r,...i},a)=>w__namespace.createElement(ks.Provider,{value:{size:t??"md",variant:o??"pill"}},w__namespace.createElement(qe__namespace.List,{ref:a,className:n(zc({size:t,variant:o}),e),...i},r)));Ts.displayName=qe__namespace.List.displayName;var Ps=w__namespace.forwardRef(({className:e,size:t,variant:o,tooltip:r,...i},a)=>{let d=w__namespace.useContext(ks),m=t??d.size,s=o??d.variant,c=i["aria-label"]??(typeof r=="string"?r:void 0),l=w__namespace.createElement(qe__namespace.Trigger,{ref:a,className:n(Bc({size:m,variant:s}),e),"aria-label":c,...i});return r?w__namespace.createElement(Lt,null,w__namespace.createElement(Ht,{asChild:true},l),w__namespace.createElement(bt,null,r)):l});Ps.displayName=qe__namespace.Trigger.displayName;var Ms=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement(qe__namespace.Content,{ref:o,className:n("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Ms.displayName=qe__namespace.Content.displayName;var Ns=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement("textarea",{className:n("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));Ns.displayName="Textarea";var Es=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ls=w__namespace.forwardRef(({className:e,variant:t,size:o,...r},i)=>w__namespace.createElement(qr__namespace.Root,{ref:i,className:n(Es({variant:t,size:o,className:e})),...r}));Ls.displayName=qr__namespace.Root.displayName;var Ds=w__namespace.createContext("md"),Oc=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-lg bg-muted text-muted-foreground",{variants:{size:{sm:"h-7 p-0.5",md:"h-8 p-0.5",lg:"h-10 p-1"}},defaultVariants:{size:"md"}}),Vc=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 data-[state=on]:bg-background data-[state=on]:text-foreground",{variants:{size:{sm:"h-6 px-1.5 text-[11px] gap-1 [&_svg]:size-3",md:"h-7 px-2 text-xs gap-1.5 [&_svg]:size-3.5",lg:"h-8 px-2.5 text-sm gap-2 [&_svg]:size-4"}},defaultVariants:{size:"md"}}),As=w__namespace.forwardRef(({className:e,size:t="md",children:o,...r},i)=>w__namespace.createElement(Ds.Provider,{value:t??"md"},w__namespace.createElement(qt__namespace.Root,{ref:i,className:n(Oc({size:t}),e),...r},o)));As.displayName=qt__namespace.Root.displayName;var Is=w__namespace.forwardRef(({className:e,size:t,tooltip:o,tooltipSide:r="top",tooltipDelay:i,"aria-label":a,...d},m)=>{let s=w__namespace.useContext(Ds),c=t??s,l=a??(typeof o=="string"?o:void 0),p=w__namespace.createElement(qt__namespace.Item,{ref:m,className:n(Vc({size:c}),e),"aria-label":l,...d});return o==null?p:w__namespace.createElement(Lt,{delayDuration:i},w__namespace.createElement(Ht,{asChild:true},w__namespace.createElement("span",{className:"inline-flex"},p)),w__namespace.createElement(bt,{side:r},o))});Is.displayName=qt__namespace.Item.displayName;var Wc=classVarianceAuthority.cva("grid items-center w-full gap-3 [grid-template-columns:auto_1fr_auto]",{variants:{position:{top:"border-b border-border",bottom:"border-t border-border",inline:""},variant:{default:"bg-background",subtle:"bg-muted/30",transparent:"bg-transparent"},size:{sm:"min-h-10 px-3",md:"min-h-12 px-4",lg:"min-h-14 px-6"},sticky:{true:"",false:""}},compoundVariants:[{sticky:true,position:"top",className:"sticky top-0 z-20"},{sticky:true,position:"bottom",className:"sticky bottom-0 z-20"}],defaultVariants:{position:"top",variant:"default",size:"md",sticky:false}}),Fs=w__namespace.forwardRef(({className:e,position:t,variant:o,size:r,sticky:i,leading:a,center:d,trailing:m,children:s,"aria-label":c,...l},p)=>{let g=s==null;return w__namespace.createElement("div",{ref:p,role:"toolbar","aria-label":c??"Toolbar","data-gds-part":"toolbar","data-position":t??"top",className:n(Wc({position:t,variant:o,size:r,sticky:i}),e),...l},g?w__namespace.createElement(w__namespace.Fragment,null,w__namespace.createElement("div",{"data-gds-part":"toolbar-leading",className:"flex items-center min-w-0"},a),w__namespace.createElement("div",{"data-gds-part":"toolbar-center",className:"flex items-center min-w-0 justify-center"},d),w__namespace.createElement("div",{"data-gds-part":"toolbar-trailing",className:"flex items-center min-w-0 justify-end"},m)):s)});Fs.displayName="Toolbar";var zs=w__namespace.forwardRef(({className:e,align:t="leading",...o},r)=>w__namespace.createElement("div",{ref:r,"data-gds-part":`toolbar-${t}`,className:n("flex items-center min-w-0",t==="center"&&"justify-center",t==="trailing"&&"justify-end",e),...o}));zs.displayName="ToolbarSlot";var Gs=w__namespace.createContext(null),Yr=w__namespace.createContext(0);function Os(){return w__namespace.useContext(Yr)}function Ro(e){let t=w__namespace.useContext(Gs);if(!t)throw new Error(`<${e}> must be rendered inside a <Sidebar> root.`);return t}var vt=w__namespace.forwardRef(({collapsed:e,defaultCollapsed:t=false,onCollapsedChange:o,collapsible:r=true,variant:i="rail",className:a,style:d,children:m,...s},c)=>{let l=e!==void 0,[p,g]=w__namespace.useState(t),u=l?e:p,b=i==="panel",f=()=>{let h=!u;l||g(h),o?.(h);};return w__namespace.createElement(Kr,{delayDuration:0},w__namespace.createElement(Gs.Provider,{value:{collapsed:u}},w__namespace.createElement("aside",{ref:c,"data-gds-part":"sidebar","data-collapsed":u||void 0,"data-variant":i,className:n("relative flex h-full flex-col bg-card text-card-foreground",b?"w-full border border-border rounded-lg overflow-hidden":"border-r border-border transition-[width] duration-200 ease-out",a),style:b?d:{width:u?"var(--gds-sidebar-collapsed-width, 4rem)":"var(--gds-sidebar-width, 16rem)",...d},...s},m,r&&!b&&w__namespace.createElement("button",{type:"button",onClick:f,"aria-label":u?"Expand sidebar":"Collapse sidebar","data-gds-part":"sidebar-collapse-toggle",className:n("absolute -right-3 top-6 z-10 flex h-6 w-6 items-center justify-center","rounded-full border border-border bg-card text-muted-foreground shadow-sm","hover:text-foreground hover:bg-muted transition-colors")},u?w__namespace.createElement(lucideReact.ChevronRight,{className:"h-3 w-3"}):w__namespace.createElement(lucideReact.ChevronLeft,{className:"h-3 w-3"})))))});vt.displayName="Sidebar";var Xr=w__namespace.forwardRef(({className:e,...t},o)=>{let{collapsed:r}=Ro("SidebarHeader");return w__namespace.createElement("div",{ref:o,"data-gds-part":"sidebar-header","data-collapsed":r||void 0,className:n("flex shrink-0 items-center border-b border-border",r?"justify-center px-2":"px-3","h-[var(--gds-sidebar-header-height,3.25rem)]",e),...t})});Xr.displayName="SidebarHeader";var Jr=w__namespace.forwardRef(({className:e,...t},o)=>w__namespace.createElement("nav",{ref:o,"data-gds-part":"sidebar-content",className:n("flex-1 overflow-y-auto overflow-x-hidden","py-[var(--gds-sidebar-content-py,0.5rem)]",e),...t}));Jr.displayName="SidebarContent";var Qr=w__namespace.forwardRef(({className:e,...t},o)=>{let{collapsed:r}=Ro("SidebarFooter");return w__namespace.createElement("div",{ref:o,"data-gds-part":"sidebar-footer","data-collapsed":r||void 0,className:n("shrink-0 border-t border-border",r?"px-2 py-2":"px-3 py-2",e),...t})});Qr.displayName="SidebarFooter";var ea=w__namespace.forwardRef(({title:e,icon:t,trailing:o,collapsible:r=true,defaultExpanded:i=true,className:a,children:d,...m},s)=>{let{collapsed:c}=Ro("SidebarSection"),[l,p]=w__namespace.useState(i),g=!!e&&r;return c?w__namespace.createElement("div",{ref:s,"data-gds-part":"sidebar-section",className:n("px-[var(--gds-sidebar-section-px,0.5rem)] space-y-[var(--gds-sidebar-section-gap,0.125rem)]",a),...m},d):w__namespace.createElement("div",{ref:s,"data-gds-part":"sidebar-section",className:n("px-[var(--gds-sidebar-section-px,0.5rem)] pb-1",a),...m},e&&(g?w__namespace.createElement("div",{className:n("group/header flex w-full items-center gap-1 rounded-md px-2 py-1.5 text-xs font-medium uppercase tracking-wide","text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors")},w__namespace.createElement("button",{type:"button",onClick:()=>p(u=>!u),"aria-expanded":l,className:"flex flex-1 items-center gap-2 text-left min-w-0"},t,w__namespace.createElement("span",{className:"flex-1 text-left normal-case truncate"},e),l?w__namespace.createElement(lucideReact.ChevronDown,{className:"h-3 w-3 shrink-0",strokeWidth:1.5}):w__namespace.createElement(lucideReact.ChevronRight,{className:"h-3 w-3 shrink-0",strokeWidth:1.5})),o&&w__namespace.createElement("span",{className:"flex items-center shrink-0",onClick:u=>u.stopPropagation(),onKeyDown:u=>u.stopPropagation()},o)):w__namespace.createElement("div",{className:n("flex items-center gap-2 px-2 py-1.5 text-xs font-medium uppercase tracking-wide","text-muted-foreground")},t,w__namespace.createElement("span",{className:"flex-1 truncate"},e),o&&w__namespace.createElement("span",{className:"shrink-0"},o))),l&&w__namespace.createElement("div",{className:n("mt-[var(--gds-sidebar-section-gap,0.125rem)]","space-y-[var(--gds-sidebar-section-gap,0.125rem)]")},d))});ea.displayName="SidebarSection";var ta=w__namespace.forwardRef(({icon:e,badge:t,active:o=false,asButton:r=false,asChild:i=false,disabled:a=false,collapsedLabel:d,size:m="md",description:s,className:c,children:l,...p},g)=>{let{collapsed:u}=Ro("SidebarItem"),b=Os(),f=!u&&b>0?{paddingLeft:`calc(0.5rem + ${b} * var(--gds-sidebar-tree-indent, 1.5rem))`}:void 0,h=m==="sm",P=h?"text-xs px-2 py-1":"text-sm px-2 py-1.5",S=h&&!o?"font-normal":"font-medium",R=o?"bg-primary/10 text-primary":h?"text-muted-foreground hover:bg-muted hover:text-foreground":"text-foreground/80 hover:bg-muted hover:text-foreground",C=!u&&s!=null,k=n("group flex items-center gap-2.5 rounded-md transition-colors",P,S,C&&(h?"py-1.5":"py-2"),u?"justify-center px-2 py-2":null,R,a&&"opacity-50 pointer-events-none",c),B=C?w__namespace.createElement("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5 text-left leading-tight"},w__namespace.createElement("span",{className:"truncate"},l),w__namespace.createElement("span",{className:n("truncate font-normal text-muted-foreground",h?"text-[10px]":"text-[11px]")},s)):w__namespace.createElement("span",{className:"flex-1 truncate text-left"},l),H=w__namespace.createElement(w__namespace.Fragment,null,e&&w__namespace.createElement("span",{className:"shrink-0 [&>svg]:h-4 [&>svg]:w-4","aria-hidden":true},e),!u&&B,!u&&t!==void 0&&t!==null&&w__namespace.createElement("span",{className:"ml-auto inline-flex items-center justify-center rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground"},t)),I;if(i)I=w__namespace.createElement(reactSlot.Slot,{"data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,className:k,style:f},l);else if(r){let{href:Pe,target:ee,rel:ye,download:G,hrefLang:ge,ping:Ae,referrerPolicy:we,type:v,...O}=p;I=w__namespace.createElement("button",{type:"button","data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,disabled:a,className:n(k,"w-full text-left"),style:f,...O},H);}else I=w__namespace.createElement("a",{ref:g,"data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,"aria-disabled":a||void 0,className:k,style:f,...p},H);if(!u)return I;let V=d??(typeof l=="string"?l:null);return V?w__namespace.createElement(Lt,null,w__namespace.createElement(Ht,{asChild:true},I),w__namespace.createElement(bt,{side:"right",sideOffset:8},V,t!=null&&w__namespace.createElement("span",{className:"ml-2 inline-flex items-center justify-center rounded bg-foreground/10 px-1.5 py-0 text-[10px]"},t))):I});ta.displayName="SidebarItem";var oa=w__namespace.forwardRef(function({label:t,icon:o,badge:r,active:i=false,defaultExpanded:a=true,expanded:d,onExpandedChange:m,disabled:s,description:c,trailing:l,className:p,style:g,children:u,...b},f){let{collapsed:h}=Ro("SidebarTreeItem"),P=Os(),S=d!==void 0,[R,C]=w__namespace.useState(a),k=S?d:R,B=()=>{let I=!k;S||C(I),m?.(I);};if(h)return w__namespace.createElement(Yr.Provider,{value:P},u);let H=P*1.5;return w__namespace.createElement("div",{"data-gds-part":"sidebar-tree-item"},w__namespace.createElement("div",{className:"group/row relative"},w__namespace.createElement("button",{ref:f,type:"button",onClick:B,"aria-expanded":k,"aria-current":i?"page":void 0,"data-active":i||void 0,disabled:s,className:n("group flex w-full items-center gap-1.5 rounded-md py-1 text-sm font-medium transition-colors",i?"bg-primary/10 text-primary":"text-foreground/80 hover:bg-muted hover:text-foreground",s&&"opacity-50 pointer-events-none",l!=null&&"pr-12",p),style:{paddingLeft:`calc(0.25rem + ${H}rem)`,paddingRight:l!=null?"3rem":"0.5rem",...g},...b},w__namespace.createElement("span",{className:"inline-flex h-4 w-4 items-center justify-center text-muted-foreground shrink-0","aria-hidden":true},k?w__namespace.createElement(lucideReact.ChevronDown,{className:"h-3 w-3"}):w__namespace.createElement(lucideReact.ChevronRight,{className:"h-3 w-3"})),o&&w__namespace.createElement("span",{className:"shrink-0 [&>svg]:h-4 [&>svg]:w-4","aria-hidden":true},o),c!=null?w__namespace.createElement("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5 text-left leading-tight"},w__namespace.createElement("span",{className:"truncate"},t),w__namespace.createElement("span",{className:"truncate text-[11px] font-normal text-muted-foreground"},c)):w__namespace.createElement("span",{className:"flex-1 truncate text-left"},t),r!=null&&w__namespace.createElement("span",{className:"ml-auto inline-flex items-center justify-center rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground"},r)),l!=null&&w__namespace.createElement("div",{onClick:I=>I.stopPropagation(),className:"pointer-events-auto absolute inset-y-0 right-1.5 flex items-center gap-0.5"},l)),k&&u&&w__namespace.createElement(Yr.Provider,{value:P+1},w__namespace.createElement("div",{className:"space-y-[var(--gds-sidebar-section-gap,0.125rem)]"},u)))});oa.displayName="SidebarTreeItem";vt.Header=Xr;vt.Content=Jr;vt.Footer=Qr;vt.Section=ea;vt.Item=ta;vt.TreeItem=oa;var yt=[50,100,200,300,400,500,600,700,800,900,950],Vs=[.985,.955,.895,.82,.72,.61,.51,.415,.325,.245,.17],jc=[.015,.04,.075,.11,.14,.17,.17,.15,.12,.08,.04];function ar({hue:e,chromaScale:t=1}){let o=(e%360+360)%360,r={};for(let i=0;i<yt.length;i++){let a=Vs[i],d=jc[i]*t;r[yt[i]]=`${a.toFixed(4)} ${d.toFixed(4)} ${o.toFixed(2)}`;}return r}function _s(){let e={};for(let t=0;t<yt.length;t++){let o=Vs[t];e[yt[t]]=`${o.toFixed(4)} 0 0`;}return e}var ra={light:{destructive:"0.560 0.220 27.0",destructiveFg:"0.990 0.005 27.0",success:"0.610 0.180 145.0",warning:"0.720 0.180 60.0",info:"0.580 0.200 240.0",highlight:"0.860 0.180 95.0"},dark:{destructive:"0.680 0.220 27.0",destructiveFg:"0.990 0.005 27.0",success:"0.720 0.180 145.0",warning:"0.800 0.180 60.0",info:"0.700 0.200 240.0",highlight:"0.880 0.180 95.0"}},So="1 0 0",Ws="0 0 0";function Yt(e,t){let[,o,r]=e.split(/\s+/).map(l=>l.trim()),i=Number(o),a=r;if(t==="light"){let p=Math.min(i*.22,.045),g=.38,u=i;return {soft:`${.965.toFixed(3)} ${p.toFixed(3)} ${a}`,deep:`${g.toFixed(3)} ${u.toFixed(3)} ${a}`}}let d=.22,m=Math.min(i*.45,.075),s=.82,c=i*.9;return {soft:`${d.toFixed(3)} ${m.toFixed(3)} ${a}`,deep:`${s.toFixed(3)} ${c.toFixed(3)} ${a}`}}var nr={geist:"var(--font-geist), system-ui, sans-serif",inter:"var(--font-inter), system-ui, sans-serif",manrope:"var(--font-manrope), system-ui, sans-serif",figtree:"var(--font-figtree), system-ui, sans-serif",dmSans:"var(--font-dm-sans), system-ui, sans-serif",lexend:"var(--font-lexend), system-ui, sans-serif",outfit:"var(--font-outfit), system-ui, sans-serif",plusJakarta:"var(--font-plus-jakarta), system-ui, sans-serif",spaceGrotesk:"var(--font-space-grotesk), system-ui, sans-serif",fraunces:"var(--font-fraunces), Georgia, serif",instrumentSerif:"var(--font-instrument-serif), Georgia, serif",sourceSerif:"var(--font-source-serif), Georgia, serif",jetbrainsMono:"var(--font-jetbrains-mono), ui-monospace, monospace",geistMono:"var(--font-geist-mono), ui-monospace, monospace",ibmPlexMono:"var(--font-ibm-plex-mono), ui-monospace, monospace",system:"system-ui, -apple-system, sans-serif",serif:"Georgia, 'Times New Roman', serif",mono:"ui-monospace, Menlo, monospace"};var Kc=["superLight","light","dark","superDark"],qc={muted:.6,default:1,vibrant:1.3};function Yc(e,t,o){let r=t.primary*o,i=t.accent*o,a=(r+i)/2*.8,d=m=>(m%360+360)%360;return {1:`0.600 ${(.17*r).toFixed(4)} ${e.primary.toFixed(2)}`,2:`0.640 ${(.17*a).toFixed(4)} ${d(e.primary+140).toFixed(2)}`,3:`0.580 ${(.17*a).toFixed(4)} ${d(e.primary+220).toFixed(2)}`,4:`0.510 0.0250 ${e.neutral.toFixed(2)}`,5:`0.620 ${(.17*i).toFixed(4)} ${e.accent.toFixed(2)}`}}var L=e=>({source:"neutral",step:e}),Ve=e=>({source:"primary",step:e}),wt=e=>({source:"accent",step:e}),Co=e=>({source:"pure",value:e}),Zc={superLight:{background:L(50),foreground:L(800),card:Co(So),cardForeground:L(800),popover:Co(So),popoverForeground:L(800),primary:Ve(600),primaryForeground:Ve(50),secondary:L(100),secondaryForeground:L(700),muted:L(100),mutedForeground:L(500),accent:wt(600),accentForeground:wt(50),border:L(200),input:L(200),ring:Ve(500)},light:{background:L(50),foreground:L(950),card:Co(So),cardForeground:L(950),popover:Co(So),popoverForeground:L(950),primary:Ve(500),primaryForeground:Ve(50),secondary:L(100),secondaryForeground:L(700),muted:L(100),mutedForeground:L(500),accent:wt(500),accentForeground:wt(50),border:L(200),input:L(200),ring:Ve(500)},dark:{background:L(950),foreground:L(50),card:L(900),cardForeground:L(50),popover:L(900),popoverForeground:L(50),primary:Ve(400),primaryForeground:Ve(950),secondary:L(800),secondaryForeground:L(200),muted:L(800),mutedForeground:L(400),accent:wt(400),accentForeground:wt(950),border:L(800),input:L(800),ring:Ve(400)},superDark:{background:Co(Ws),foreground:L(100),card:L(950),cardForeground:L(100),popover:L(950),popoverForeground:L(100),primary:Ve(300),primaryForeground:Ve(950),secondary:L(900),secondaryForeground:L(300),muted:L(900),mutedForeground:L(500),accent:wt(300),accentForeground:wt(950),border:L(900),input:L(900),ring:Ve(300)}};function ce(e,t){return e.source==="pure"?e.value:t[e.source][e.step]}function Xc(e,t){let o=Zc[t],r=t==="superLight"||t==="light",i=r?ra.light:ra.dark;return {background:ce(o.background,e),foreground:ce(o.foreground,e),card:ce(o.card,e),cardForeground:ce(o.cardForeground,e),popover:ce(o.popover,e),popoverForeground:ce(o.popoverForeground,e),primary:ce(o.primary,e),primaryForeground:ce(o.primaryForeground,e),secondary:ce(o.secondary,e),secondaryForeground:ce(o.secondaryForeground,e),muted:ce(o.muted,e),mutedForeground:ce(o.mutedForeground,e),accent:ce(o.accent,e),accentForeground:ce(o.accentForeground,e),border:ce(o.border,e),input:ce(o.input,e),ring:ce(o.ring,e),destructive:i.destructive,destructiveForeground:i.destructiveFg,success:i.success,warning:i.warning,info:i.info,highlight:i.highlight,...(()=>{let a=r?"light":"dark",d=Yt(i.destructive,a),m=Yt(i.success,a),s=Yt(i.warning,a),c=Yt(i.info,a),l=Yt(i.highlight,a);return {destructiveSoft:d.soft,destructiveDeep:d.deep,successSoft:m.soft,successDeep:m.deep,warningSoft:s.soft,warningDeep:s.deep,infoSoft:c.soft,infoDeep:c.deep,highlightSoft:l.soft,highlightDeep:l.deep}})()}}var st={display:3.75,h1:2.5,h2:2,h3:1.5,h4:1.25,h5:1.125,h6:1,body:1,bodySm:.875},Jc={compact:.85,default:1,spacious:1.18};function Qc(e){let t=Jc[e.scale],o=r=>`${(r*t).toFixed(3)}rem`;return {fontSans:nr[e.body],fontMono:nr[e.mono],fontDisplay:nr[e.display],headingWeight:e.headingWeight??600,bodyWeight:e.bodyWeight??400,headingTracking:e.headingTracking??"-0.01em",scale:{display:o(st.display),h1:o(st.h1),h2:o(st.h2),h3:o(st.h3),h4:o(st.h4),h5:o(st.h5),h6:o(st.h6),body:o(st.body),bodySm:o(st.bodySm)}}}var ep={sharp:0,subtle:.25,soft:.5,round:.875,pill:1.25};function tp(e){let t=ep[e.style],o=r=>`${r.toFixed(3)}rem`;return {base:o(t),sm:o(Math.max(0,t-.25)),md:o(t),lg:o(t+.25),xl:o(t+.5),"2xl":o(t+1),full:"9999px"}}var op={tight:.85,default:1,roomy:1.2};function rp(e){return {baseUnit:"1rem",densityFactor:op[e.density]}}var ap={none:{sm:"none",md:"none",lg:"none",xl:"none","2xl":"none",inner:"none"},subtle:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.03)",md:"0 2px 4px -1px rgb(0 0 0 / 0.04), 0 1px 2px -1px rgb(0 0 0 / 0.03)",lg:"0 6px 14px -2px rgb(0 0 0 / 0.05)",xl:"0 12px 24px -4px rgb(0 0 0 / 0.06)","2xl":"0 24px 48px -12px rgb(0 0 0 / 0.12)",inner:"inset 0 1px 2px 0 rgb(0 0 0 / 0.03)"},default:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},dramatic:{sm:"0 2px 4px 0 rgb(0 0 0 / 0.12)",md:"0 8px 16px -2px rgb(0 0 0 / 0.18), 0 4px 8px -4px rgb(0 0 0 / 0.12)",lg:"0 20px 32px -4px rgb(0 0 0 / 0.22), 0 8px 16px -8px rgb(0 0 0 / 0.18)",xl:"0 32px 48px -6px rgb(0 0 0 / 0.28), 0 12px 24px -10px rgb(0 0 0 / 0.22)","2xl":"0 48px 80px -16px rgb(0 0 0 / 0.45)",inner:"inset 0 4px 8px 0 rgb(0 0 0 / 0.1)"}};function np(e){let t=e?.shadows??"default",o=e?.motionIntensity??1,r=i=>`${Math.round(i*o)}ms`;return {shadows:ap[t],motion:{fast:r(150),base:r(200),slow:r(300),slower:r(500)},borderWidth:e?.borderWidth??"1px"}}function Dt(e){let t=qc[e.intensity??"default"],o=e.neutralPureGray??false,r=(e.chroma?.neutral??.08)*t,i=(e.chroma?.primary??1)*t,a=(e.chroma?.accent??1)*t,d=o?_s():ar({hue:e.hues.neutral,chromaScale:r}),m=ar({hue:e.hues.primary,chromaScale:i}),s=ar({hue:e.hues.accent,chromaScale:a}),c={neutral:d,primary:m,accent:s},l=Yc(e.hues,{primary:i,accent:a},t),p=Object.fromEntries(Kc.map(P=>[P,Xc(c,P)])),g=Qc(e.typography),u=tp(e.radius),b=rp(e.spacing),f=np(e.effects),h={buttonShape:e.components?.buttonShape??"default",inputStyle:e.components?.inputStyle??"outlined",cardStyle:e.components?.cardStyle??"flat"};return {id:e.id,name:e.name,description:e.description,tagline:e.tagline,input:e,ramps:c,colors:p,chart:l,typography:g,radius:u,spacing:b,effects:f,components:h}}var ko={id:"calm",name:"Calm",description:"Warm neutrals, terracotta primary, serif typography.",tagline:"Signature",hues:{neutral:40,primary:20,accent:40},chroma:{neutral:.15,primary:.75,accent:.8},intensity:"muted",typography:{display:"fraunces",body:"fraunces",mono:"jetbrainsMono",scale:"default",headingWeight:600,headingTracking:"-0.02em"},spacing:{density:"roomy"},radius:{style:"round"},effects:{shadows:"subtle",motionIntensity:1.25},components:{buttonShape:"pill",inputStyle:"outlined",cardStyle:"outlined"}},aa={id:"energy",name:"Energy",description:"Teal + indigo \u2014 punchy, cool-tone, modern sans.",tagline:"Alternate",hues:{neutral:175,primary:175,accent:235},chroma:{neutral:.08,primary:1,accent:1},intensity:"vibrant",typography:{display:"geist",body:"geist",mono:"geistMono",scale:"default",headingWeight:600},spacing:{density:"default"},radius:{style:"soft"},effects:{shadows:"default",motionIntensity:1},components:{buttonShape:"default",inputStyle:"outlined",cardStyle:"flat"}},ir=[ko,aa];function ip(e){return {"--background":e.background,"--foreground":e.foreground,"--card":e.card,"--card-foreground":e.cardForeground,"--popover":e.popover,"--popover-foreground":e.popoverForeground,"--primary":e.primary,"--primary-foreground":e.primaryForeground,"--secondary":e.secondary,"--secondary-foreground":e.secondaryForeground,"--muted":e.muted,"--muted-foreground":e.mutedForeground,"--accent":e.accent,"--accent-foreground":e.accentForeground,"--destructive":e.destructive,"--destructive-foreground":e.destructiveForeground,"--border":e.border,"--input":e.input,"--ring":e.ring,"--success":e.success,"--warning":e.warning,"--info":e.info,"--highlight":e.highlight,"--destructive-soft":e.destructiveSoft,"--destructive-deep":e.destructiveDeep,"--success-soft":e.successSoft,"--success-deep":e.successDeep,"--warning-soft":e.warningSoft,"--warning-deep":e.warningDeep,"--info-soft":e.infoSoft,"--info-deep":e.infoDeep,"--highlight-soft":e.highlightSoft,"--highlight-deep":e.highlightDeep}}function ia(e,t){let o=e.colors[t];return {...ip(o),...na("neutral",e.ramps.neutral),...na("primary",e.ramps.primary),...na("accent",e.ramps.accent),"--chart-1":e.chart[1],"--chart-2":e.chart[2],"--chart-3":e.chart[3],"--chart-4":e.chart[4],"--chart-5":e.chart[5],"--font-sans":e.typography.fontSans,"--font-mono":e.typography.fontMono,"--font-display":e.typography.fontDisplay,"--font-heading-weight":String(e.typography.headingWeight),"--font-body-weight":String(e.typography.bodyWeight),"--font-heading-tracking":e.typography.headingTracking,"--text-display":e.typography.scale.display,"--text-h1":e.typography.scale.h1,"--text-h2":e.typography.scale.h2,"--text-h3":e.typography.scale.h3,"--text-h4":e.typography.scale.h4,"--text-h5":e.typography.scale.h5,"--text-h6":e.typography.scale.h6,"--text-body":e.typography.scale.body,"--text-body-sm":e.typography.scale.bodySm,"--radius":e.radius.base,"--gds-radius-sm":e.radius.sm,"--gds-radius-md":e.radius.md,"--gds-radius-lg":e.radius.lg,"--gds-radius-xl":e.radius.xl,"--gds-radius-2xl":e.radius["2xl"],"--gds-radius-full":e.radius.full,"--gds-density":String(e.spacing.densityFactor),"--gds-shadow-sm":e.effects.shadows.sm,"--gds-shadow-md":e.effects.shadows.md,"--gds-shadow-lg":e.effects.shadows.lg,"--gds-shadow-xl":e.effects.shadows.xl,"--gds-shadow-2xl":e.effects.shadows["2xl"],"--gds-shadow-inner":e.effects.shadows.inner,"--gds-transition-fast":e.effects.motion.fast,"--gds-transition-base":e.effects.motion.base,"--gds-transition-slow":e.effects.motion.slow,"--gds-transition-slower":e.effects.motion.slower,"--gds-border-width":e.effects.borderWidth}}function na(e,t){let o={};for(let r of yt)o[`--ramp-${e}-${r}`]=t[r];return o}function sr(e,t){if(typeof document>"u")return;let o=document.documentElement,r=ia(e,t);for(let[i,a]of Object.entries(r))o.style.setProperty(i,a);o.setAttribute("data-grade-theme",e.id),o.setAttribute("data-mode",t),o.setAttribute("data-button-shape",e.components.buttonShape??"default"),o.setAttribute("data-input-style",e.components.inputStyle??"outlined"),o.setAttribute("data-card-style",e.components.cardStyle??"flat");}function To(e){if(typeof document>"u")return "";let t=document.createElement("span");t.style.color=`oklch(${e})`,t.style.position="absolute",t.style.visibility="hidden",document.body.appendChild(t);let o=getComputedStyle(t).color;document.body.removeChild(t);let r=o.match(/\d+/g);if(!r||r.length<3)return "";let[i,a,d]=r.slice(0,3).map(Number);return "#"+[i,a,d].map(m=>Math.max(0,Math.min(255,m)).toString(16).padStart(2,"0")).join("").toUpperCase()}function sp(e){let t=e.trim().split(/\s+/);if(t.length<3)return {oklch:e,hex:""};let[o,r,i]=t.map(Number),a=`${o.toFixed(3)} ${r.toFixed(3)} ${Math.round(i)}`,d=To(e);return {oklch:a,hex:d}}function sa(e,t,o){let r=[`### ${e} ramp (hue ${Math.round(o)}\xB0)`,"","| Step | OKLCH | Hex |","|------|-------|-----|"];for(let i of yt){let{oklch:a,hex:d}=sp(t[i]);r.push(`| ${i} | \`${a}\` | \`${d||"\u2014"}\` |`);}return r.join(`
64
- `)}function $s(e,t){let o=[`### ${e}`,"","| Token | Usage | Light (hex) | Dark (hex) |","|-------|-------|-------------|------------|"];for(let r of t){let i=To(r.light)||"\u2014",a=To(r.dark)||"\u2014";o.push(`| \`--${r.token}\` | ${r.usage} | \`${i}\` (\`${r.light}\`) | \`${a}\` (\`${r.dark}\`) |`);}return o.join(`
65
- `)}function Us(e){return JSON.stringify(e.input,null,2)}function js(e){let{input:t,ramps:o,colors:r,chart:i,typography:a,radius:d,spacing:m,effects:s,components:c}=e,l=t.intensity??"default",p=f=>({token:f,usage:lp[f]??"",light:r.light[f],dark:r.dark[f]}),g=["background","foreground","card","cardForeground","popover","popoverForeground","primary","primaryForeground","secondary","secondaryForeground","muted","mutedForeground","accent","accentForeground","border","input","ring"].map(p),u=["destructive","destructiveForeground","success","warning","info","highlight"].map(p),b=[1,2,3,4,5].map(f=>{let h=i[f];return {slot:f,triplet:h,hex:To(h)||"\u2014"}});return `# ${e.name} \u2014 Grade Design System Theme
107
+ </Card>`,import:"@gradeui/ui",subcomponents:["ToolbarSlot"],composesWith:["Button","Avatar","Input","Logo","Badge","AppShellHeader","Card","Row","Stack"],props:{leading:{schema:zod.z.unknown().optional(),design:"plumbing",description:"left-aligned region (logo + primary nav)"},center:{schema:zod.z.unknown().optional(),design:"plumbing",description:"center region (search, page title, segmented control)"},trailing:{schema:zod.z.unknown().optional(),design:"plumbing",description:"right-aligned region (action icons, avatar, primary CTA)"},children:{schema:zod.z.unknown().optional(),design:"plumbing",description:"escape hatch; bypasses slot layout"},position:{schema:zod.z.enum(["top","bottom","inline"]).optional(),design:"knob",description:"border placement",default:"top"},variant:{schema:zod.z.enum(["default","subtle","transparent"]).optional(),design:"knob",default:"default"},size:{schema:zod.z.enum(["sm","md","lg"]).optional(),design:"knob",description:"height + padding",default:"md"},sticky:{schema:zod.z.boolean().optional(),design:"knob",description:"pin to top/bottom of scroll container",default:false},"aria-label":{schema:zod.z.string().optional(),design:"content",description:"required by WAI-ARIA toolbar pattern",default:"Toolbar"},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var wi={name:"Tooltip",description:"A short, non-essential label that explains a control on hover/focus \u2014 icon-only buttons in toolbars, abbreviated column headers, status dots. NEVER hide critical info inside a tooltip \u2014 they're invisible on touch and can be skipped by screen readers if implemented carelessly. For richer hover content use HoverCard. For inline help text that's always visible, use a description paragraph.",import:"@gradeui/ui",aliases:["tooltip","tip","hover tip","hint","label on hover","help tag","hint","helper text bubble","info tip"],subcomponents:["TooltipTrigger","TooltipContent","TooltipProvider"],composesWith:["Button (icon-only)","Toggle","TabsTrigger (the canonical tabs already have a `tooltip` prop that wraps this)","Avatar (status badge meaning)"],props:{delayDuration:{schema:zod.z.number().optional(),design:"knob",description:"ms hover before show; mount ONCE near the app root"},skipDelayDuration:{schema:zod.z.number().optional(),design:"knob",description:'ms gap that still feels like "same hover"'},open:{schema:zod.z.unknown().optional(),design:"plumbing"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"usually wraps a Button or icon"},side:{schema:zod.z.enum(["top","right","bottom","left","start","center","end"]).optional(),design:"knob",default:"top"}}};var Ri={name:"VideoPlayer",description:"HTML5 video wrapped in the shared media surface. Controls-on for a standard player, controls-off (+ autoplay/muted/loop) for hero / background video. Prefer Rive for anything interactive, Three Scene for shader backgrounds.",import:"@gradeui/ui",aliases:["video","mp4","movie","webm","clip","video view","av player","react native video","video element"],composesWith:["MediaSurface (internal)","Card (wrap for thumbnail grids)"],props:{src:{schema:zod.z.string(),design:"content",description:"video URL"},controls:{schema:zod.z.boolean().optional(),design:"knob",description:"show native controls; false for chromeless hero/background video",default:true},autoPlay:{schema:zod.z.boolean().optional(),design:"knob",description:"forces muted=true (browser restriction)",default:false},loop:{schema:zod.z.boolean().optional(),design:"knob",default:false},muted:{schema:zod.z.boolean().optional(),design:"knob",default:false},pauseOffscreen:{schema:zod.z.boolean().optional(),design:"knob",description:"pause when scrolled out of viewport",default:true},aspect:{schema:zod.z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"video"},radius:{schema:zod.z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"driven by `--gds-media-radius`",default:"lg"},objectFit:{schema:zod.z.enum(["cover","contain","fill"]).optional(),design:"knob",default:"cover"},poster:{schema:zod.z.string().optional(),design:"content",description:'image shown before playback. Always rendered as a `loading="lazy"` `<img>` overlay (not the native `poster` attribute, which fetches eagerly).'},playbackRate:{schema:zod.z.number().optional(),design:"knob"}}};var fa={Accordion:fn,AiChat:hn,AiChatComposer:bn,AppShell:vn,Avatar:yn,Badge:wn,Banner:Rn,Breadcrumb:Sn,Button:Cn,Calendar:kn,Callout:Tn,Card:Mn,Carousel:Nn,Chart:En,Checkbox:Ln,Code:Dn,Collapsible:An,Command:Hn,Composer:In,DatePicker:Fn,Dialog:Bn,DropdownMenu:zn,Flex:On,Grid:Vn,HoverCard:_n,Input:Gn,Label:Wn,Map:Un,MediaSurface:ma,Message:jn,MultiSelect:$n,Popover:Kn,Progress:qn,RadioGroup:Yn,Resizable:Zn,RivePlayer:Xn,Row:Jn,ScrollArea:Qn,SectionBlock:ei,Select:ti,Separator:oi,ShaderPresetPicker:ri,ShaderPresetPreview:ai,Sheet:ni,Sidebar:ii,Skeleton:si,Slider:li,Sortable:di,Stack:ci,Switch:pi,Table:ui,Tabs:gi,Textarea:fi,ThreeScene:hi,Toast:bi,Toggle:vi,ToggleGroup:yi,Toolbar:xi,Tooltip:wi,VideoPlayer:Ri};function sc(e){return e?fa[e]??null:null}function lc(){return Object.keys(fa)}function s(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var mc=nt__namespace.Root,Si=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(nt__namespace.Item,{ref:o,className:s("border-b",e),...t}));Si.displayName="AccordionItem";var Ci=S__namespace.forwardRef(({className:e,children:t,...o},r)=>S__namespace.createElement(nt__namespace.Header,{className:"flex"},S__namespace.createElement(nt__namespace.Trigger,{ref:r,className:s("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...o},t,S__namespace.createElement(lucideReact.ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"}))));Ci.displayName=nt__namespace.Trigger.displayName;var ki=S__namespace.forwardRef(({className:e,children:t,...o},r)=>S__namespace.createElement(nt__namespace.Content,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o},S__namespace.createElement("div",{className:s("pb-4 pt-0",e)},t)));ki.displayName=nt__namespace.Content.displayName;var Ti=classVarianceAuthority.cva("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4",{variants:{variant:{default:"bg-background text-foreground [&>svg]:text-foreground",destructive:"border-destructive/30 bg-destructive-soft text-destructive-deep [&>svg]:text-destructive-deep",success:"border-success/30 bg-success-soft text-success-deep [&>svg]:text-success-deep",warning:"border-warning/30 bg-warning-soft text-warning-deep [&>svg]:text-warning-deep",info:"border-info/30 bg-info-soft text-info-deep [&>svg]:text-info-deep"}},defaultVariants:{variant:"default"}}),gc={destructive:"alert",warning:"alert",info:"status",success:"status",default:"status"},Pi=S__namespace.forwardRef(({className:e,variant:t,role:o,...r},n)=>S__namespace.createElement("div",{ref:n,role:o??gc[t??"default"],"data-gds-part":"callout",className:s(Ti({variant:t}),e),...r}));Pi.displayName="Callout";var Mi=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement("h5",{ref:o,"data-gds-part":"callout-title",className:s("mb-1 font-medium leading-none tracking-tight",e),...t}));Mi.displayName="CalloutTitle";var Ni=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement("div",{ref:o,"data-gds-part":"callout-description",className:s("text-sm [&_p]:leading-relaxed",e),...t}));Ni.displayName="CalloutDescription";var Ei=classVarianceAuthority.cva("gds-app-shell min-h-screen w-full bg-background text-foreground grid",{variants:{nav:{none:"",top:"",side:"","three-pane":""}},defaultVariants:{nav:"none"}}),Li=classVarianceAuthority.cva("gds-app-shell-header",{variants:{sticky:{true:"sticky top-0 z-30",false:""}},defaultVariants:{sticky:false}}),Di=classVarianceAuthority.cva("gds-app-shell-nav",{variants:{placement:{top:"border-b bg-background",side:"border-r bg-background",none:"hidden"},sticky:{true:"",false:""}},compoundVariants:[{placement:"top",sticky:true,className:"sticky top-0 z-30"},{placement:"side",sticky:true,className:"sticky top-0 h-screen self-start"}],defaultVariants:{placement:"top",sticky:true}}),Ai=classVarianceAuthority.cva("gds-app-shell-aside min-w-0 border-r bg-background",{variants:{sticky:{true:"sticky top-0 h-screen self-start",false:""}},defaultVariants:{sticky:false}}),Hi=classVarianceAuthority.cva("gds-app-shell-main min-w-0",{variants:{maxWidth:{full:"w-full",container:"w-full mx-auto max-w-7xl px-4 md:px-6 lg:px-8"}},defaultVariants:{maxWidth:"full"}}),Ii=classVarianceAuthority.cva("gds-app-shell-footer border-t bg-background"),Fi=S__namespace.forwardRef(({className:e,nav:t,asChild:o=false,...r},n)=>S__namespace.createElement(o?reactSlot.Slot:"div",{ref:n,"data-gds-part":"app-shell","data-nav":t??"none",className:s(Ei({nav:t,className:e})),...r}));Fi.displayName="AppShell";var Bi=S__namespace.forwardRef(({className:e,sticky:t,asChild:o=false,...r},n)=>S__namespace.createElement(o?reactSlot.Slot:"header",{ref:n,"data-gds-part":"app-shell-header",className:s(Li({sticky:t,className:e})),...r}));Bi.displayName="AppShellHeader";var zi=S__namespace.forwardRef(({className:e,placement:t,sticky:o,asChild:r=false,...n},a)=>S__namespace.createElement(r?reactSlot.Slot:"nav",{ref:a,"data-gds-part":"app-shell-nav","data-placement":t??"top",className:s(Di({placement:t,sticky:o,className:e})),...n}));zi.displayName="AppShellNav";var Oi=S__namespace.forwardRef(({className:e,sticky:t,asChild:o=false,...r},n)=>S__namespace.createElement(o?reactSlot.Slot:"aside",{ref:n,"data-gds-part":"app-shell-aside",className:s(Ai({sticky:t,className:e})),...r}));Oi.displayName="AppShellAside";var Vi=S__namespace.forwardRef(({className:e,maxWidth:t,asChild:o=false,...r},n)=>S__namespace.createElement(o?reactSlot.Slot:"main",{ref:n,"data-gds-part":"app-shell-main",className:s(Hi({maxWidth:t,className:e})),...r}));Vi.displayName="AppShellMain";var _i=S__namespace.forwardRef(({className:e,asChild:t=false,...o},r)=>S__namespace.createElement(t?reactSlot.Slot:"footer",{ref:r,"data-gds-part":"app-shell-footer",className:s(Ii({className:e})),...o}));_i.displayName="AppShellFooter";var fc=classVarianceAuthority.cva("relative flex shrink-0 overflow-hidden rounded-full",{variants:{size:{xs:"h-6 w-6",sm:"h-7 w-7",md:"h-10 w-10",lg:"h-14 w-14",xl:"h-20 w-20"}},defaultVariants:{size:"md"}}),Wi=S__namespace.forwardRef(({className:e,size:t,...o},r)=>S__namespace.createElement(Et__namespace.Root,{ref:r,"data-gds-part":"avatar","data-gds-size":t??"md",className:s(fc({size:t}),e),...o}));Wi.displayName=Et__namespace.Root.displayName;var Ui=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(Et__namespace.Image,{ref:o,"data-gds-part":"avatar-image",className:s("aspect-square h-full w-full",e),...t}));Ui.displayName=Et__namespace.Image.displayName;var hc=classVarianceAuthority.cva("flex h-full w-full items-center justify-center rounded-full font-semibold",{variants:{tone:{muted:"bg-muted text-foreground",primary:"bg-primary/15 text-primary",violet:"bg-violet-500/20 text-violet-600 dark:text-violet-400",amber:"bg-amber-500/20 text-amber-600 dark:text-amber-400",emerald:"bg-emerald-500/20 text-emerald-600 dark:text-emerald-400",sky:"bg-sky-500/20 text-sky-600 dark:text-sky-400",rose:"bg-rose-500/20 text-rose-600 dark:text-rose-400",plum:"bg-fuchsia-500/20 text-fuchsia-600 dark:text-fuchsia-400",lime:"bg-lime-500/20 text-lime-600 dark:text-lime-400"}},defaultVariants:{tone:"muted"}}),ji=S__namespace.forwardRef(({className:e,tone:t,...o},r)=>S__namespace.createElement(Et__namespace.Fallback,{ref:r,"data-gds-part":"avatar-fallback","data-gds-tone":t??"muted",className:s(hc({tone:t}),e),...o}));ji.displayName=Et__namespace.Fallback.displayName;var Ki=classVarianceAuthority.cva("inline-flex items-center gap-1 border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 [&_svg]:size-3 [&_svg]:shrink-0",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",highlight:"border-transparent bg-gds-yellow-400 text-gds-gray-900 shadow hover:bg-gds-yellow-500",success:"border-transparent bg-gds-green-500 text-gds-gray-900 shadow hover:bg-gds-green-600",warning:"border-transparent bg-orange-500 text-white shadow hover:bg-orange-600",info:"border-transparent bg-blue-500 text-white shadow hover:bg-blue-600","success-soft":"border-gds-green-500/20 bg-gds-green-500/10 text-gds-green-600 dark:text-gds-green-400","warning-soft":"border-orange-500/20 bg-orange-500/10 text-orange-600 dark:text-orange-400","destructive-soft":"border-destructive/20 bg-destructive/10 text-destructive dark:text-red-400","info-soft":"border-blue-500/20 bg-blue-500/10 text-blue-600 dark:text-blue-400","highlight-soft":"border-gds-yellow-500/20 bg-gds-yellow-400/10 text-gds-yellow-600 dark:text-gds-yellow-400","success-outline":"border-gds-green-500/50 bg-transparent text-gds-green-600 dark:text-gds-green-400","warning-outline":"border-orange-500/50 bg-transparent text-orange-600 dark:text-orange-400","destructive-outline":"border-destructive/50 bg-transparent text-destructive dark:text-red-400","info-outline":"border-blue-500/50 bg-transparent text-blue-600 dark:text-blue-400"},rounded:{default:"rounded-md",full:"rounded-full"}},defaultVariants:{variant:"default",rounded:"default"}});function Tr({className:e,variant:t,rounded:o,...r}){return S__namespace.createElement("div",{className:s(Ki({variant:t,rounded:o}),e),...r})}var Xe={solid:"",translucent:"gds-surface-translucent",glass:"gds-surface-glass","glass-strong":"gds-surface-glass-strong"};function gt(e,t){return e==="solid"?t:""}var qi=classVarianceAuthority.cva("relative flex items-center gap-3 px-4 py-2.5 text-sm leading-relaxed border-b",{variants:{variant:{default:"bg-muted text-foreground border-border [&>svg]:text-muted-foreground",info:"bg-info-soft text-info-deep border-info/30 [&>svg]:text-info-deep",success:"bg-success-soft text-success-deep border-success/30 [&>svg]:text-success-deep",warning:"bg-warning-soft text-warning-deep border-warning/30 [&>svg]:text-warning-deep",destructive:"bg-destructive-soft text-destructive-deep border-destructive/30 [&>svg]:text-destructive-deep",announcement:"bg-[oklch(var(--primary)_/_0.06)] text-foreground border-[oklch(var(--primary)_/_0.18)] [&>svg]:text-primary"},align:{start:"justify-start",center:"justify-center",between:"justify-between"},sticky:{true:"sticky top-0 z-30",false:""}},defaultVariants:{variant:"default",align:"between",sticky:false}}),xc={destructive:"alert",warning:"alert",info:"status",success:"status",default:"status",announcement:"status"},Yi=S__namespace.forwardRef(({className:e,variant:t="default",align:o,sticky:r,surface:n="solid",dismissible:a,onDismiss:l,icon:p,action:i,role:c,children:d,...m},g)=>{let u=t??"default",b=c??xc[u];return S__namespace.createElement("div",{ref:g,role:b,"data-gds-part":"banner","data-variant":u,"data-surface":n,className:s(qi({variant:t,align:o,sticky:r}),Xe[n],e),...m},p?S__namespace.createElement("span",{"data-gds-part":"banner-icon","aria-hidden":true,className:"shrink-0"},p):null,S__namespace.createElement("div",{"data-gds-part":"banner-content",className:"flex-1 min-w-0"},d),i?S__namespace.createElement("span",{"data-gds-part":"banner-action",className:"shrink-0"},i):null,a?S__namespace.createElement("button",{type:"button","data-gds-part":"banner-dismiss",onClick:l,"aria-label":"Dismiss",className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md opacity-70 hover:opacity-100 hover:bg-black/5 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 transition-opacity"},S__namespace.createElement(lucideReact.X,{className:"h-4 w-4"})):null)});Yi.displayName="Banner";var jo=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",raised:"gds-button-raised"},size:{sm:"h-7 gap-1.5 px-2.5 text-xs [&_svg]:size-3.5",md:"h-8 gap-1.5 px-3 text-xs [&_svg]:size-3.5",default:"h-8 gap-1.5 px-3 text-xs [&_svg]:size-3.5",lg:"h-10 gap-2 px-4 text-sm [&_svg]:size-4",icon:"h-8 w-8 [&_svg]:size-3.5"}},defaultVariants:{variant:"default",size:"md"}}),We=S__namespace.forwardRef(({className:e,variant:t,size:o,asChild:r=false,...n},a)=>S__namespace.createElement(r?reactSlot.Slot:"button",{"data-gds-part":"button",className:s("gds-button",jo({variant:t,size:o,className:e})),ref:a,...n}));We.displayName="Button";function Mr({className:e,classNames:t,showOutsideDays:o=true,captionLayout:r="label",buttonVariant:n="ghost",formatters:a,components:l,...p}){let i=reactDayPicker.getDefaultClassNames();return S__namespace.createElement(reactDayPicker.DayPicker,{showOutsideDays:o,className:s("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:c=>c.toLocaleString("default",{month:"short"}),...a},classNames:{root:s("w-fit",i.root),months:s("relative flex flex-col gap-4 md:flex-row",i.months),month:s("flex w-full flex-col gap-4",i.month),nav:s("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",i.nav),button_previous:s(jo({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",i.button_previous),button_next:s(jo({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",i.button_next),month_caption:s("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",i.month_caption),dropdowns:s("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",i.dropdowns),dropdown_root:s("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",i.dropdown_root),dropdown:s("bg-popover absolute inset-0 opacity-0",i.dropdown),caption_label:s("select-none font-medium",r==="label"?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",i.caption_label),table:"w-full border-collapse",weekdays:s("flex",i.weekdays),weekday:s("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",i.weekday),week:s("mt-2 flex w-full",i.week),week_number_header:s("w-[--cell-size] select-none",i.week_number_header),week_number:s("text-muted-foreground select-none text-[0.8rem]",i.week_number),day:s("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",i.day),range_start:s("bg-accent rounded-l-md",i.range_start),range_middle:s("rounded-none",i.range_middle),range_end:s("bg-accent rounded-r-md",i.range_end),today:s("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",i.today),outside:s("text-muted-foreground aria-selected:text-muted-foreground",i.outside),disabled:s("text-muted-foreground opacity-50",i.disabled),hidden:s("invisible",i.hidden),...t},components:{Root:({className:c,rootRef:d,...m})=>S__namespace.createElement("div",{"data-slot":"calendar",ref:d,className:s(c),...m}),Chevron:({className:c,orientation:d,...m})=>d==="left"?S__namespace.createElement(lucideReact.ChevronLeftIcon,{className:s("size-4",c),...m}):d==="right"?S__namespace.createElement(lucideReact.ChevronRightIcon,{className:s("size-4",c),...m}):S__namespace.createElement(lucideReact.ChevronDownIcon,{className:s("size-4",c),...m}),DayButton:Xi,WeekNumber:({children:c,...d})=>S__namespace.createElement("td",{...d},S__namespace.createElement("div",{className:"flex size-[--cell-size] items-center justify-center text-center"},c)),...l},...p})}function Xi({className:e,day:t,modifiers:o,...r}){let n=reactDayPicker.getDefaultClassNames(),a=S__namespace.useRef(null);return S__namespace.useEffect(()=>{o.focused&&a.current?.focus();},[o.focused]),S__namespace.createElement(We,{ref:a,variant:"ghost",size:"icon","data-day":`${t.date.getFullYear()}-${String(t.date.getMonth()+1).padStart(2,"0")}-${String(t.date.getDate()).padStart(2,"0")}`,"data-selected-single":o.selected&&!o.range_start&&!o.range_end&&!o.range_middle,"data-range-start":o.range_start,"data-range-end":o.range_end,"data-range-middle":o.range_middle,className:s("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",n.day,e),...r})}var ha=S__namespace.createContext(null);function qo(e){let t=S__namespace.useContext(ha);if(!t)throw new Error(`<${e}> must be rendered inside a <Carousel> root.`);return t}var Ec=5e3,Ut=S__namespace.forwardRef(({loop:e=true,align:t="start",slidesPerView:o=1,autoplay:r=false,draggable:n=true,onSlideChange:a,className:l,style:p,children:i,...c},d)=>{let m=S__namespace.useMemo(()=>({loop:e,align:t,slidesToScroll:1,watchDrag:n,containScroll:e?false:"trimSnaps"}),[e,t,n]),[g,u]=Pc__default.default(m),[b,h]=S__namespace.useState(0),[f,y]=S__namespace.useState(0),[R,x]=S__namespace.useState(false),[k,T]=S__namespace.useState(false),O=S__namespace.useRef(new Map),D=S__namespace.useRef(a);D.current=a;let E=S__namespace.useMemo(()=>r?r===true?{}:r:null,[r]);S__namespace.useEffect(()=>{if(!u)return;let v=()=>{h(u.selectedScrollSnap()),y(u.scrollSnapList().length),x(u.canScrollPrev()),T(u.canScrollNext()),D.current?.(u.selectedScrollSnap());};return v(),u.on("select",v),u.on("reInit",v),()=>{u.off("select",v),u.off("reInit",v);}},[u]);let $=S__namespace.useCallback(v=>{u&&u.selectedScrollSnap()===v&&u.scrollNext();},[u]),H=S__namespace.useRef(false),F=S__namespace.useRef(true),j=S__namespace.useRef(null);S__namespace.useImperativeHandle(d,()=>j.current),S__namespace.useEffect(()=>{if(!E?.pauseWhenOffscreen){F.current=true;return}let v=j.current;if(!v||typeof IntersectionObserver>"u")return;let W=new IntersectionObserver(I=>{F.current=I.some(le=>le.isIntersecting);},{threshold:.25});return W.observe(v),()=>W.disconnect()},[E?.pauseWhenOffscreen]),S__namespace.useEffect(()=>{if(!u||!E)return;let v=null,W=()=>{v&&clearTimeout(v);let he=u.selectedScrollSnap(),ne=O.current.get(he)??E.delay??Ec;v=setTimeout(()=>{if(H.current||!F.current){W();return}u.scrollNext();},ne);},I=()=>W(),le=()=>{v&&clearTimeout(v);},J=()=>W();return u.on("select",I),u.on("pointerDown",le),u.on("settle",J),W(),()=>{v&&clearTimeout(v),u.off("select",I),u.off("pointerDown",le),u.off("settle",J);}},[u,E]);let N=()=>{E?.pauseOnHover!==false&&(H.current=true);},X=()=>{H.current=false;},L=S__namespace.useMemo(()=>({api:u,selectedIndex:b,slideCount:f,canScrollPrev:R,canScrollNext:k,durationsRef:O,advanceFromSlide:$}),[u,b,f,R,k,$]),Y=`calc(100% / ${o})`;return S__namespace.createElement(ha.Provider,{value:L},S__namespace.createElement("div",{ref:j,"data-gds-part":"carousel",className:s("relative",l),style:{"--gds-carousel-slide-basis":Y,...p},onMouseEnter:N,onMouseLeave:X,...c},S__namespace.createElement("div",{ref:g,"data-gds-part":"carousel-viewport",className:"overflow-hidden",style:{borderRadius:"var(--gds-carousel-radius, var(--gds-media-radius, 0.5rem))"}},S__namespace.createElement("div",{"data-gds-part":"carousel-track",className:"flex",style:{gap:"var(--gds-carousel-gap, 0)",touchAction:"pan-y pinch-zoom"}},i))))});Ut.displayName="Carousel";var Nr=S__namespace.forwardRef(({duration:e,className:t,style:o,children:r,...n},a)=>{let{durationsRef:l}=qo("Carousel.Slide"),p=S__namespace.useRef(null);return S__namespace.useImperativeHandle(a,()=>p.current),S__namespace.useEffect(()=>{if(e==null)return;let i=p.current;if(!i?.parentElement)return;let c=Array.from(i.parentElement.children).indexOf(i);if(c<0)return;let d=l.current;return d.set(c,e),()=>{d.delete(c);}},[e,l]),S__namespace.createElement("div",{ref:p,"data-gds-part":"carousel-slide",className:s("min-w-0 shrink-0 grow-0",t),style:{flexBasis:"var(--gds-carousel-slide-basis, 100%)",...o},...n},r)});Nr.displayName="Carousel.Slide";var ba=S__namespace.forwardRef(({src:e,poster:t,alt:o,controls:r=false,loop:n=true,fit:a="cover",duration:l,className:p,style:i,...c},d)=>{let{api:m,selectedIndex:g,advanceFromSlide:u}=qo("Carousel.VideoSlide"),b=S__namespace.useRef(null),h=S__namespace.useRef(null);S__namespace.useImperativeHandle(d,()=>b.current);let[f,y]=S__namespace.useState(null);S__namespace.useEffect(()=>{let x=b.current;x?.parentElement&&y(Array.from(x.parentElement.children).indexOf(x));},[m]);let R=f!=null&&f===g;return S__namespace.useEffect(()=>{let x=h.current;if(x)if(R){let k=x.play();k&&typeof k.catch=="function"&&k.catch(()=>{});}else x.pause(),x.currentTime=0;},[R]),S__namespace.createElement(Nr,{ref:b,duration:l,className:s("relative overflow-hidden bg-[var(--gds-media-placeholder-bg)]",p),style:i,"data-gds-part":"carousel-video-slide",...c},t&&S__namespace.createElement("img",{src:t,alt:o??"","aria-hidden":R,className:"absolute inset-0 h-full w-full",style:{objectFit:a,opacity:R?0:1,transition:"opacity var(--gds-carousel-fade-ms, 200ms) ease-out"}}),S__namespace.createElement("video",{ref:h,src:e,muted:true,playsInline:true,loop:n,controls:r,preload:"metadata","aria-label":o,className:"block h-full w-full",style:{objectFit:a,opacity:R?1:0,transition:"opacity var(--gds-carousel-fade-ms, 200ms) ease-out"},onEnded:()=>{n||f!=null&&u(f);}}))});ba.displayName="Carousel.VideoSlide";var va=S__namespace.forwardRef(({position:e="below",renderDot:t,className:o,style:r,...n},a)=>{let{api:l,selectedIndex:p,slideCount:i}=qo("Carousel.Dots");if(i<=1)return null;let c=Array.from({length:i},(m,g)=>g),d=e==="overlay"?{position:"absolute",insetInlineStart:0,insetInlineEnd:0,bottom:"var(--gds-carousel-dots-inset, 0.75rem)",zIndex:1}:{marginBlockStart:"var(--gds-carousel-dots-gap, 0.75rem)"};return S__namespace.createElement("div",{ref:a,"data-gds-part":"carousel-dots",className:s("flex items-center justify-center",o),style:{gap:"var(--gds-carousel-dots-spacing, 0.5rem)",...d,...r},...n},c.map(m=>{let g=m===p,u=()=>l?.scrollTo(m);return t?t({index:m,active:g,onClick:u}):S__namespace.createElement("button",{key:m,type:"button",onClick:u,"aria-label":`Go to slide ${m+1}`,"aria-current":g?"true":void 0,"data-active":g||void 0,className:"rounded-full transition-all",style:{width:g?"var(--gds-carousel-dot-active-width, 1.25rem)":"var(--gds-carousel-dot-size, 0.5rem)",height:"var(--gds-carousel-dot-size, 0.5rem)",background:g?"var(--gds-carousel-dot-active-color, oklch(var(--primary)))":"var(--gds-carousel-dot-color, oklch(var(--muted-foreground) / 0.4))"}})}))});va.displayName="Carousel.Dots";var ya=S__namespace.forwardRef(({position:e="overlay",className:t,style:o,...r},n)=>e==="outside"?S__namespace.createElement("div",{ref:n,"data-gds-part":"carousel-arrows",className:s("flex items-center justify-end gap-2 pt-2",t),style:o,...r},S__namespace.createElement($o,null),S__namespace.createElement(Ko,null)):S__namespace.createElement("div",{ref:n,"data-gds-part":"carousel-arrows",className:s("pointer-events-none absolute inset-0 z-[1]",t),style:o,...r},S__namespace.createElement($o,{className:"pointer-events-auto absolute left-[var(--gds-carousel-arrow-inset,0.75rem)] top-1/2 -translate-y-1/2"}),S__namespace.createElement(Ko,{className:"pointer-events-auto absolute right-[var(--gds-carousel-arrow-inset,0.75rem)] top-1/2 -translate-y-1/2"})));ya.displayName="Carousel.Arrows";var $o=S__namespace.forwardRef(({className:e,style:t,children:o,...r},n)=>{let{api:a,canScrollPrev:l}=qo("Carousel.Prev");return S__namespace.createElement("button",{ref:n,type:"button","data-gds-part":"carousel-prev","aria-label":"Previous slide",disabled:!l,onClick:()=>a?.scrollPrev(),className:s("inline-flex items-center justify-center rounded-full","transition disabled:opacity-40 disabled:cursor-not-allowed","hover:[background:var(--gds-carousel-arrow-hover-bg,oklch(var(--background)))]",e),style:{width:"var(--gds-carousel-arrow-size, 2.25rem)",height:"var(--gds-carousel-arrow-size, 2.25rem)",background:"var(--gds-carousel-arrow-bg, oklch(var(--background) / 0.85))",color:"var(--gds-carousel-arrow-fg, oklch(var(--foreground)))",backdropFilter:"var(--gds-carousel-arrow-backdrop, blur(6px))",boxShadow:"var(--gds-carousel-arrow-shadow, 0 2px 8px oklch(0 0 0 / 0.12))",...t},...r},o??S__namespace.createElement(lucideReact.ChevronLeft,{className:"h-4 w-4","aria-hidden":true}))});$o.displayName="Carousel.Prev";var Ko=S__namespace.forwardRef(({className:e,style:t,children:o,...r},n)=>{let{api:a,canScrollNext:l}=qo("Carousel.Next");return S__namespace.createElement("button",{ref:n,type:"button","data-gds-part":"carousel-next","aria-label":"Next slide",disabled:!l,onClick:()=>a?.scrollNext(),className:s("inline-flex items-center justify-center rounded-full","transition disabled:opacity-40 disabled:cursor-not-allowed","hover:[background:var(--gds-carousel-arrow-hover-bg,oklch(var(--background)))]",e),style:{width:"var(--gds-carousel-arrow-size, 2.25rem)",height:"var(--gds-carousel-arrow-size, 2.25rem)",background:"var(--gds-carousel-arrow-bg, oklch(var(--background) / 0.85))",color:"var(--gds-carousel-arrow-fg, oklch(var(--foreground)))",backdropFilter:"var(--gds-carousel-arrow-backdrop, blur(6px))",boxShadow:"var(--gds-carousel-arrow-shadow, 0 2px 8px oklch(0 0 0 / 0.12))",...t},...r},o??S__namespace.createElement(lucideReact.ChevronRight,{className:"h-4 w-4","aria-hidden":true}))});Ko.displayName="Carousel.Next";Ut.Slide=Nr;Ut.VideoSlide=ba;Ut.Dots=va;Ut.Arrows=ya;Ut.Prev=$o;Ut.Next=Ko;var Lc=Ut;function Dc(){return S__namespace.useContext(ha)?.api}var Ji=S__namespace.forwardRef(({className:e,surface:t="solid",...o},r)=>S__namespace.createElement("div",{ref:r,"data-gds-part":"card","data-surface":t,className:s("gds-card rounded-xl border text-card-foreground shadow",gt(t,"bg-card"),Xe[t],e),...o}));Ji.displayName="Card";var Qi=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement("div",{ref:o,"data-gds-part":"card-header",className:s("flex flex-col space-y-1.5 p-6",e),...t}));Qi.displayName="CardHeader";var es=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement("div",{ref:o,"data-gds-part":"card-title",className:s("font-semibold leading-none tracking-tight",e),...t}));es.displayName="CardTitle";var ts=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement("div",{ref:o,"data-gds-part":"card-description",className:s("text-sm text-muted-foreground",e),...t}));ts.displayName="CardDescription";var os=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement("div",{ref:o,"data-gds-part":"card-content",className:s("p-6 pt-0",e),...t}));os.displayName="CardContent";var rs=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement("div",{ref:o,"data-gds-part":"card-footer",className:s("flex items-center p-6 pt-0",e),...t}));rs.displayName="CardFooter";var as=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(Yo__namespace.Root,{ref:o,className:s("gds-checkbox peer h-4 w-4 shrink-0 rounded-[3px] border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t},S__namespace.createElement(Yo__namespace.Indicator,{className:s("flex items-center justify-center text-current")},S__namespace.createElement(lucideReact.Check,{className:"h-4 w-4"}))));as.displayName=Yo__namespace.Root.displayName;var ko={slow:{tokenStagger:70,lineStagger:200,preDelay:500,fadeMs:480},normal:{tokenStagger:22,lineStagger:55,preDelay:200,fadeMs:280},fast:{tokenStagger:8,lineStagger:18,preDelay:60,fadeMs:160}},xa=.55;function re(e,t){return e<=0?Promise.resolve():new Promise((o,r)=>{if(t?.aborted){r(new DOMException("Aborted","AbortError"));return}let n=window.setTimeout(()=>{t?.removeEventListener("abort",a),o();},e),a=()=>{window.clearTimeout(n),r(new DOMException("Aborted","AbortError"));};t?.addEventListener("abort",a,{once:true});})}async function Er(e,t,o=22,r){for(let n=1;n<=e.length;n++)t(e.slice(0,n)),n<e.length&&await re(o,r);}function wa(e){return e instanceof DOMException&&e.name==="AbortError"}var Ic=2e3;function jt(e){let{steps:t,interpret:o,speed:r="normal",trigger:n="mount",play:a,loop:l=false,loopDelay:p=Ic,containerRef:i,onComplete:c,onLoopReset:d}=e,m=ko[r],[g,u]=S__namespace.useState(false),[b,h]=S__namespace.useState(false),[f,y]=S__namespace.useState(-1),R=S__namespace.useRef(null),x=react.useInView(i??R,{once:true,amount:xa}),[k,T]=S__namespace.useState(0),O=S__namespace.useMemo(()=>n==="mount"?true:n==="inView"?x:!!a||k>0,[n,x,a,k]),D=S__namespace.useRef(o);D.current=o;let E=S__namespace.useRef(c);E.current=c;let $=S__namespace.useRef(d);$.current=d;let H=S__namespace.useRef(null),F=S__namespace.useRef(null),j=S__namespace.useCallback(()=>{H.current?.abort(),H.current=null,F.current!==null&&(window.clearTimeout(F.current),F.current=null),u(false);},[]),N=S__namespace.useCallback(()=>{T(L=>L+1);},[]),X=S__namespace.useCallback((L=0)=>{if(H.current?.abort(),H.current=null,F.current!==null&&(window.clearTimeout(F.current),F.current=null),L>0){F.current=window.setTimeout(()=>{F.current=null,T(Y=>Y+1);},L);return}T(Y=>Y+1);},[]);return S__namespace.useEffect(()=>()=>{F.current!==null&&(window.clearTimeout(F.current),F.current=null);},[]),S__namespace.useEffect(()=>{if(!t||t.length===0||!O)return;let L=new AbortController;H.current=L;let{signal:Y}=L,W={speed:m,signal:Y,cancelled:()=>Y.aborted},I=true;return (async()=>{do{u(true),h(false),y(-1);try{await re(n==="inView"?m.preDelay:0,Y);for(let J=0;J<t.length;J++){if(Y.aborted)return;y(J),await D.current(t[J],W);}if(Y.aborted)return;if(y(-1),h(!0),E.current?.(),!l){u(!1);return}if(await re(p,Y),Y.aborted)return;$.current?.();}catch(J){if(wa(J))return;process.env.NODE_ENV!=="production"&&console.error("[useScriptedDemo] step error:",J),u(false);return}}while(I&&l&&!Y.aborted)})(),()=>{I=false,L.abort(),H.current===L&&(H.current=null);}},[t,O,l,p,m,n,k]),{isPlaying:g,isComplete:b,currentIndex:f,play:N,stop:j,restart:X}}var Dr=S__namespace.forwardRef(function({variant:t="inline",className:o,...r},n){return S__namespace.createElement("span",{ref:n,"data-gds-part":"demo-cursor","data-gds-variant":t,"aria-hidden":true,className:s("gds-demo-cursor",o),...r})});var ns=S__namespace.createContext({visible:new Set,hasStage:false,reducedMotion:false,defaultAnimation:"fade-up"});function is({steps:e,speed:t="normal",trigger:o="mount",play:r,loop:n=false,defaultAnimation:a="fade-up",visibleWhenIdle:l=true,className:p,children:i}){let c=react.useReducedMotion()??false,d=S__namespace.useRef(null),[m,g]=S__namespace.useState(()=>new Set),u=!!(e&&e.length);jt({steps:u?e:void 0,speed:t,trigger:o,play:r,loop:n,containerRef:d,onLoopReset:()=>g(new Set),interpret:async(f,y)=>{if(f.type==="wait")return re(f.ms,y.signal);if(f.type==="reset")return g(new Set),re(y.speed.preDelay,y.signal);if(f.type==="reveal")return g(R=>{if(R.has(f.target))return R;let x=new Set(R);return x.add(f.target),x}),re(y.speed.lineStagger,y.signal);if(f.type==="reveal-all")return g(R=>{let x=new Set(R);return x.add("__all__"),x}),re(y.speed.lineStagger,y.signal);if(f.type==="hide")return g(R=>{if(!R.has(f.target))return R;let x=new Set(R);return x.delete(f.target),x}),re(y.speed.fadeMs,y.signal)}});let b=S__namespace.useMemo(()=>({visible:u?m:new Set(["__all__"]),hasStage:true,reducedMotion:c,defaultAnimation:a}),[u,m,c,a]),h=!u&&!l?{...b,visible:new Set}:b;return S__namespace.createElement("div",{ref:d,"data-gds-part":"demo-stage","data-gds-stage-playing":u?"true":"false",className:p},S__namespace.createElement(ns.Provider,{value:h},i))}var zc={fade:{initial:{opacity:0},animate:{opacity:1}},"fade-up":{initial:{opacity:0,y:12},animate:{opacity:1,y:0}},"fade-down":{initial:{opacity:0,y:-12},animate:{opacity:1,y:0}},"fade-left":{initial:{opacity:0,x:12},animate:{opacity:1,x:0}},"fade-right":{initial:{opacity:0,x:-12},animate:{opacity:1,x:0}},scale:{initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1}},none:{initial:{opacity:1},animate:{opacity:1}}};function ss({id:e,animation:t,durationMs:o,hideOutsideStage:r=false,onReveal:n,onHide:a,className:l,children:p}){let i=S__namespace.useContext(ns),c=i.hasStage?i.visible.has("__all__")||i.visible.has(e):!r,d=S__namespace.useRef(c),m=S__namespace.useRef(n),g=S__namespace.useRef(a);m.current=n,g.current=a,S__namespace.useEffect(()=>{c!==d.current&&(d.current=c,c?m.current?.():g.current?.());},[c]);let u=t??i.defaultAnimation,b=zc[u],h=(o??280)/1e3;return i.reducedMotion?S__namespace.createElement("div",{"data-gds-part":"reveal","data-gds-reveal-id":e,"data-gds-revealed":c?"true":"false",className:l,style:{opacity:c?1:0}},p):S__namespace.createElement(react.motion.div,{"data-gds-part":"reveal","data-gds-reveal-id":e,"data-gds-revealed":c?"true":"false",className:l,initial:b.initial,animate:c?b.animate:b.initial,transition:{duration:h,ease:[.22,1,.36,1]}},p)}var _c={xs:"text-xs",sm:"text-sm",md:"text-base"},Gc={slow:{lineStagger:200,tokenStagger:70,preDelay:500,fadeMs:480},normal:{lineStagger:55,tokenStagger:22,preDelay:200,fadeMs:280},fast:{lineStagger:18,tokenStagger:8,preDelay:60,fadeMs:160}},Wc={plain:{color:"var(--gds-code-fg)",backgroundColor:"transparent"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"var(--gds-code-comment)",fontStyle:"normal"}},{types:["punctuation"],style:{color:"var(--gds-code-punctuation)"}},{types:["property","constant","symbol","deleted"],style:{color:"var(--gds-code-property)"}},{types:["boolean","number"],style:{color:"var(--gds-code-number)"}},{types:["selector","attr-name","string","char","builtin","inserted"],style:{color:"var(--gds-code-string)"}},{types:["operator","entity","url"],style:{color:"var(--gds-code-operator)"}},{types:["atrule","keyword"],style:{color:"var(--gds-code-keyword)"}},{types:["function","class-name"],style:{color:"var(--gds-code-function)"}},{types:["regex","important","variable"],style:{color:"var(--gds-code-variable)"}},{types:["tag"],style:{color:"var(--gds-code-tag)"}},{types:["attr-name"],style:{color:"var(--gds-code-attr-name)"}},{types:["attr-value"],style:{color:"var(--gds-code-attr-value)"}}]};function Uc(e){let t=new Set;if(e==null)return t;let o=Array.isArray(e)?e:[e];for(let r of o)if(typeof r=="number")t.add(r);else if(Array.isArray(r)&&r.length===2){let[n,a]=r;for(let l=n;l<=a;l++)t.add(l);}return t}function jc(e,t,o){return t?.added?.includes(e)?"added":t?.removed?.includes(e)?"removed":o.has(e)?"highlight":"default"}var ds=S__namespace.forwardRef(function({source:t,language:o="tsx",highlight:r,diff:n,reveal:a="none",trigger:l="mount",play:p,speed:i="normal",delay:c,stagger:d,showLineNumbers:m=false,filename:g,wrap:u=false,bare:b=false,prompt:h,cursor:f,steps:y,loop:R=false,size:x="sm",height:k,maxLines:T,className:O,style:D,...E},$){let H=Gc[i],F=c??0,j=d??(a==="typewriter"?H.tokenStagger:H.lineStagger),N=!!(y&&y.length),[X,L]=S__namespace.useState(""),[Y,v]=S__namespace.useState(()=>new Set),W=N?X:t??"",I=S__namespace.useMemo(()=>W.replace(/\n$/,""),[W]),le=S__namespace.useMemo(()=>Uc(r),[r]),J=!!(n?.added?.length||n?.removed?.length),he=m||J,ne=S__namespace.useRef(null);S__namespace.useImperativeHandle($,()=>ne.current);let[be,Be]=S__namespace.useState(a==="none"),A=react.useInView(ne,{once:true,amount:.55}),ce=l==="inView"?H.preDelay:0,Q=l==="mount"?true:l==="inView"?A:!!p,Ge=j,oe=I.split(`
108
+ `).length,Re=a==="typewriter"?I.replace(/\s+/g," ").split(" ").length:oe,Z=ce+F+Re*Ge+280;S__namespace.useEffect(()=>{if(N)return;if(!Q||a==="none"){Be(a==="none");return}Be(false);let ge=window.setTimeout(()=>Be(true),Z);return ()=>window.clearTimeout(ge)},[Q,a,Z,N]);let ie=S__namespace.useRef(""),ze=S__namespace.useRef(new Set),to=S__namespace.useCallback(ge=>{ie.current=ge,L(ge);},[]),la=S__namespace.useCallback(ge=>{ze.current=ge,v(ge);},[]),{isComplete:gn}=jt({steps:N?y:void 0,speed:i,trigger:"manual",play:Q,loop:R,containerRef:ne,onLoopReset:()=>{to(""),la(new Set),Be(false);},interpret:async(ge,br)=>{let Bt=br.signal;if(ge.type==="wait")return re(ge.ms,Bt);if(ge.type==="clear"){to(""),la(new Set);return}if(ge.type==="output"){let Oe=ie.current,ct=Oe.length>0&&!Oe.endsWith(`
109
+ `)?Oe+`
110
+ `:Oe,Io=ct+ge.text,Fo=ct.split(`
111
+ `).length,da=ge.text.split(`
112
+ `).length,Bo=new Set(ze.current);for(let fo=0;fo<da;fo++)Bo.add(Fo+fo);return to(Io),la(Bo),to(Io+(Io.endsWith(`
113
+ `)?"":`
114
+ `)),re(240,Bt)}let Ao=ge.speed?ko[ge.speed].tokenStagger:br.speed.tokenStagger,dt=ie.current,Ho=dt.length>0&&!dt.endsWith(`
115
+ `)?dt+`
116
+ `:dt;await re(60,Bt);for(let Oe=0;Oe<ge.text.length;Oe++){if(Bt.aborted)return;let ct=Ho+ge.text.slice(0,Oe+1);to(ct),Oe<ge.text.length-1&&await re(Ao,Bt);}}});S__namespace.useEffect(()=>{N&&Be(gn);},[N,gn]);let Ad=f??(a==="typewriter"||N);return S__namespace.createElement("div",{ref:ne,"data-gds-part":"code","data-gds-reveal":a,"data-gds-trigger":l,"data-gds-size":x,className:s("gds-code relative w-full overflow-hidden",_c[x],!b&&["rounded-lg border bg-[var(--gds-code-bg)] text-[var(--gds-code-fg)]","border-border/60"],O),style:D,...E},g&&!b?S__namespace.createElement("div",{"data-gds-part":"code-header",className:"flex items-center justify-between border-b border-border/60 px-4 py-2 text-xs text-muted-foreground"},S__namespace.createElement("span",{className:"font-mono"},g),o?S__namespace.createElement("span",{className:"uppercase tracking-wider opacity-60"},o):null):null,S__namespace.createElement(prismReactRenderer.Highlight,{code:I,language:o,theme:Wc},({tokens:ge,getLineProps:br,getTokenProps:Bt})=>S__namespace.createElement("pre",{"data-gds-part":"code-pre",className:s("font-mono leading-relaxed",b?"p-0":"px-0 py-3",u?"whitespace-pre-wrap break-words":"overflow-x-auto whitespace-pre",(k!==void 0||T!==void 0)&&"overflow-y-auto"),style:{background:"transparent",margin:0,...T!==void 0?{height:`calc(${T} * 1lh + 0.5rem)`}:k!==void 0&&k!=="auto"?{height:typeof k=="number"?`${k}px`:k}:null}},ge.map((Ao,dt)=>{let Ho=dt+1,Oe=jc(Ho,n,le),ct=br({line:Ao}),Io=dt===ge.length-1,Fo=N&&Y.has(Ho),da=Ad&&Io&&(!be||f===true),Bo=s("flex w-full pr-4",b?"pl-0":"pl-4",Oe==="added"&&"bg-[var(--gds-code-diff-added-bg)] text-[var(--gds-code-diff-added-fg)]",Oe==="removed"&&"bg-[var(--gds-code-diff-removed-bg)] text-[var(--gds-code-diff-removed-fg)]",Oe==="highlight"&&"bg-[var(--gds-code-line-highlight-bg)] shadow-[inset_2px_0_0_0_var(--gds-code-line-highlight-marker)]"),fo=S__namespace.createElement(S__namespace.Fragment,null,he?S__namespace.createElement("span",{"data-gds-part":"code-gutter",className:s("select-none pr-3 text-right font-mono text-xs leading-relaxed opacity-60",J?"w-10":"w-8"),"aria-hidden":true},J?S__namespace.createElement("span",{className:"inline-block w-3 text-center"},Oe==="added"?"+":Oe==="removed"?"-":" "):null,m?S__namespace.createElement("span",{className:"ml-1 tabular-nums"},Ho):null):null,S__namespace.createElement("span",{className:"flex-1",style:Fo?{color:"var(--gds-code-comment)"}:void 0},h&&!Fo?S__namespace.createElement("span",{"data-gds-part":"code-prompt","aria-hidden":true,className:"select-none opacity-60",style:{color:"var(--gds-code-comment)"}},h):null,a==="typewriter"&&Q&&!N?S__namespace.createElement($c,{line:Ao,getTokenProps:Bt,delay:ce+F+dt*Ge,stagger:Ge}):Ao.map((Hd,Id)=>S__namespace.createElement("span",{key:Id,...Bt({token:Hd})})),da&&!Fo?S__namespace.createElement(Dr,{"data-gds-part":"code-cursor"}):null));return a==="none"||a==="typewriter"||N||!Q?S__namespace.createElement("div",{key:dt,...ct,className:s(ct.className,Bo),style:{...ct.style,opacity:l!=="mount"&&!Q&&a!=="none"?0:void 0}},fo):S__namespace.createElement(react.motion.div,{key:dt,...ct,className:s(ct.className,Bo),initial:{opacity:0,y:a==="diff"?Oe==="removed"?-4:6:4},animate:{opacity:1,y:0},transition:{delay:(ce+F+dt*Ge)/1e3,duration:H.fadeMs/1e3,ease:[.22,1,.36,1]},style:ct.style},fo)}))))});ds.displayName="Code";function $c({line:e,getTokenProps:t,delay:o,stagger:r}){let n=0;return S__namespace.createElement(S__namespace.Fragment,null,e.map((a,l)=>{let p=/^\s*$/.test(a.content),i=t({token:a});if(p)return S__namespace.createElement("span",{key:l,...i});let c=n++;return S__namespace.createElement(react.motion.span,{key:l,...i,initial:{opacity:0},animate:{opacity:1},transition:{delay:(o+c*r)/1e3,duration:.12}})}))}var Kc=S__namespace.forwardRef(function({author:t,timestamp:o,avatar:r,badge:n,edited:a,pinned:l,actions:p,reactions:i,threadCount:c,onThreadClick:d,align:m="start",className:g,children:u,...b},h){let f=m==="end",y=a===true?"(edited)":a||void 0;return S__namespace.createElement("div",{ref:h,"data-gds-part":"message","data-gds-align":m,"data-gds-pinned":l?"true":void 0,className:s("flex items-start gap-3",f&&"flex-row-reverse",g),...b},r&&S__namespace.createElement("div",{"data-gds-part":"message-avatar",className:"flex-shrink-0"},r),S__namespace.createElement("div",{"data-gds-part":"message-content",className:s("flex-1 min-w-0 space-y-1",f&&"text-right")},l&&S__namespace.createElement("div",{"data-gds-part":"message-pinned",className:s("flex items-center gap-1 text-[10px] uppercase tracking-wider text-muted-foreground",f&&"flex-row-reverse")},S__namespace.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3 w-3",fill:"currentColor"},S__namespace.createElement("path",{d:"M9.828.722a.5.5 0 0 1 .707 0l4.743 4.743a.5.5 0 0 1 0 .707l-2.121 2.121a.5.5 0 0 1-.354.146h-1.792l-3.586 3.586v2.293a.5.5 0 0 1-.854.354L4.146 12.39 1 15.535V14.12l3.146-3.146-1.293-1.293a.5.5 0 0 1 .354-.854h2.293l3.586-3.586V3.45a.5.5 0 0 1 .146-.354L9.828.722Z"})),"Pinned"),S__namespace.createElement("div",{"data-gds-part":"message-header",className:s("flex items-baseline gap-2 flex-wrap",f&&"flex-row-reverse")},S__namespace.createElement("span",{"data-gds-part":"message-author",className:"text-sm font-semibold"},t),n&&S__namespace.createElement("div",{"data-gds-part":"message-badge"},n),o&&S__namespace.createElement("span",{"data-gds-part":"message-timestamp",className:"text-xs text-muted-foreground"},o),y&&S__namespace.createElement("span",{"data-gds-part":"message-edited",className:"text-xs text-muted-foreground"},y),p&&S__namespace.createElement("div",{"data-gds-part":"message-actions",className:s(f?"mr-auto":"ml-auto")},p)),S__namespace.createElement("div",{"data-gds-part":"message-body",className:"text-sm leading-relaxed"},u),i&&S__namespace.createElement("div",{"data-gds-part":"message-reactions",className:s("flex flex-wrap gap-1 pt-1",f&&"justify-end")},i),typeof c=="number"&&c>0&&S__namespace.createElement("button",{type:"button","data-gds-part":"message-thread",onClick:d,className:s("inline-flex items-center gap-1 text-xs font-medium","text-primary hover:underline","focus:outline-none focus-visible:ring-2 focus-visible:ring-primary rounded",f&&"flex-row-reverse")},S__namespace.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3 w-3",fill:"currentColor"},S__namespace.createElement("path",{d:"M2 3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H6.414l-2.707 2.707A1 1 0 0 1 2 12V3Z"})),c," ",c===1?"reply":"replies")))});function zp({onSubmit:e,enabled:t}){let[o]=LexicalComposerContext.useLexicalComposerContext();return S__namespace.useEffect(()=>{if(t)return o.registerCommand(lexical.KEY_ENTER_COMMAND,r=>r&&r.shiftKey?false:(r?.preventDefault(),e(),true),lexical.COMMAND_PRIORITY_HIGH)},[o,t,e]),null}function Op({onImageFiles:e,enabled:t}){let[o]=LexicalComposerContext.useLexicalComposerContext();return S__namespace.useEffect(()=>{if(!t)return;let r=o.getRootElement();if(!r)return;let n=a=>{let p=Array.from(a.clipboardData?.items??[]).filter(i=>i.kind==="file"&&i.type.startsWith("image/")).map(i=>i.getAsFile()).filter(i=>i!==null);p.length>0&&(a.preventDefault(),e(p));};return r.addEventListener("paste",n),()=>r.removeEventListener("paste",n)},[o,t,e]),null}function Vp({enabled:e}){let[t]=LexicalComposerContext.useLexicalComposerContext();return S__namespace.useEffect(()=>{e&&t.focus();},[t,e]),null}var ps={bold:"bold",italic:"italic",underline:"underline",strikethrough:"strikethrough",code:"code"};function ms(e,t){let o=ps[t];if(o){e.dispatchCommand(lexical.FORMAT_TEXT_COMMAND,o);return}if(t==="ul"){e.dispatchCommand(list.INSERT_UNORDERED_LIST_COMMAND,void 0);return}if(t==="ol"){e.dispatchCommand(list.INSERT_ORDERED_LIST_COMMAND,void 0);return}e.update(()=>{let r=lexical.$getSelection();if(lexical.$isRangeSelection(r)){if(t==="h1"||t==="h2"||t==="h3"){let n=t;selection.$setBlocksType(r,()=>richText.$createHeadingNode(n));return}(t==="blockquote"||t==="pullquote")&&selection.$setBlocksType(r,()=>{let n=richText.$createQuoteNode();return t==="pullquote"&&(n.__pullquote=true),n});}});}function _p(e,t,o,r){e.update(()=>{let n=lexical.$getSelection();if(!lexical.$isRangeSelection(n))return;let a=lexicalBeautifulMentions.$createBeautifulMentionNode(t,o,r);n.insertNodes([a]),n.insertText(" ");});}function Gp(e,t){let o=false;return e.update(()=>{let r=lexical.$getRoot(),a=r.getTextContent().indexOf(t);if(a===-1)return;let l=0,p=null,i=0,c=null,d=0,m=g=>{if(!(p&&c)){if(g.getType()==="text"){let u=g,b=u.getTextContentSize(),h=l,f=l+b;!p&&a>=h&&a<f&&(p=u,i=a-h);let y=a+t.length;!c&&y>h&&y<=f&&(c=u,d=y-h),l=f;return}if("getChildren"in g)for(let u of g.getChildren())m(u);else l+=g.getTextContentSize();}};if(m(r),p&&c){let g=p,u=c;g.select(i,0).focus.set(u.getKey(),d,"text"),o=true;}}),o}function Zo(e){e.update(()=>{let t=lexical.$getRoot();t.clear();let o=lexical.$createParagraphNode();t.append(o),o.select();});}function us(e){let t="",o="",r=[];return e.getEditorState().read(()=>{t=lexical.$getRoot().getTextContent(),o=JSON.stringify(e.getEditorState().toJSON());let n=a=>{if(a.getType()==="beautifulMention"){let l=a;r.push({trigger:l.getTrigger(),value:l.getValue(),data:l.getData()});}if("getChildren"in a)for(let l of a.getChildren())n(l);};n(lexical.$getRoot());}),{text:t,json:o,mentions:r}}var Wp=[{format:"bold",icon:lucideReact.Bold,label:"Bold"},{format:"italic",icon:lucideReact.Italic,label:"Italic"},{format:"underline",icon:lucideReact.Underline,label:"Underline"},{format:"strikethrough",icon:lucideReact.Strikethrough,label:"Strikethrough"},{format:"code",icon:lucideReact.Code,label:"Inline code"},{format:"h1",icon:lucideReact.Heading1,label:"Heading 1"},{format:"h2",icon:lucideReact.Heading2,label:"Heading 2"},{format:"h3",icon:lucideReact.Heading3,label:"Heading 3"},{format:"blockquote",icon:lucideReact.Quote,label:"Blockquote"},{format:"ul",icon:lucideReact.List,label:"Bulleted list"},{format:"ol",icon:lucideReact.ListOrdered,label:"Numbered list"}];function Up({formats:e}){let[t]=LexicalComposerContext.useLexicalComposerContext(),[o,r]=S__namespace.useState(()=>new Set);S__namespace.useEffect(()=>utils.mergeRegister(t.registerUpdateListener(({editorState:a})=>{a.read(()=>{let l=lexical.$getSelection();if(!lexical.$isRangeSelection(l))return;let p=new Set;for(let i of ["bold","italic","underline","strikethrough","code"])l.hasFormat(i)&&p.add(i);r(p);});})),[t]);let n=Wp.filter(a=>e.includes(a.format));return S__namespace.createElement("div",{"data-gds-part":"composer-toolbar",className:s("flex flex-wrap items-center gap-0.5","px-2 py-1")},n.map(({format:a,icon:l,label:p})=>{let i=ps[a],c=i?o.has(i):false;return S__namespace.createElement("button",{key:a,type:"button","aria-label":p,title:p,"data-gds-part":"composer-toolbar-button","data-gds-active":c?"true":"false",onClick:()=>ms(t,a),className:s("h-7 w-7 inline-flex items-center justify-center rounded","text-[var(--gds-composer-toolbar-fg)]","hover:bg-[var(--gds-composer-toolbar-hover-bg)]","focus:outline-none focus:ring-2 focus:ring-primary",c&&"bg-[var(--gds-composer-toolbar-active-bg)] text-[var(--gds-composer-toolbar-active-fg)]")},S__namespace.createElement(l,{className:"h-3.5 w-3.5"}))}))}function jp({attachments:e,onRemove:t}){return S__namespace.createElement(react.AnimatePresence,{initial:false},e.length>0&&S__namespace.createElement(react.motion.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.18},className:"overflow-hidden"},S__namespace.createElement("div",{"data-gds-part":"composer-attachments",className:"flex flex-wrap gap-2 px-2 py-2"},e.map(o=>S__namespace.createElement("div",{key:o.id,className:"relative group"},o.file.type.startsWith("image/")?S__namespace.createElement("img",{src:o.previewUrl,alt:o.name,className:"h-14 w-14 rounded-md object-cover border border-[var(--gds-composer-border)]"}):S__namespace.createElement("div",{className:"h-14 w-14 rounded-md border border-[var(--gds-composer-border)] flex items-center justify-center text-xs px-1 text-center text-[var(--gds-composer-muted-fg)]"},o.name.slice(0,18)),S__namespace.createElement("button",{type:"button",onClick:()=>t(o.id),"aria-label":`Remove ${o.name}`,className:s("absolute -top-1.5 -right-1.5 h-5 w-5 rounded-full","bg-[var(--gds-composer-chip-remove-bg)]","text-[var(--gds-composer-chip-remove-fg)]","flex items-center justify-center","opacity-0 group-hover:opacity-100 focus:opacity-100","focus:outline-none focus:ring-2 focus:ring-primary","transition-opacity")},S__namespace.createElement(lucideReact.X,{className:"w-3 h-3"})))))))}function $p({placeholder:e,triggers:t,attachmentsCfg:o,formatList:r,showToolbar:n,isLoading:a,onStop:l,maxLength:p,autoFocus:i,submitOnEnter:c=true,leftActions:d,rightActions:m,hideSend:g,steps:u,trigger:b="mount",play:h,speed:f="normal",loop:y=false,loopDelay:R,onLoopReset:x,bare:k,className:T,onSubmit:O,onChange:D,readOnly:E,handleEditorReady:$,submitRef:H,restartRef:F,attachments:j,setAttachments:N,ingestImages:X}){let[L]=LexicalComposerContext.useLexicalComposerContext(),Y=S__namespace.useRef(null),v=S__namespace.useRef(null),[W,I]=S__namespace.useState(false);S__namespace.useEffect(()=>{$(L);},[L,$]),S__namespace.useEffect(()=>{L.setEditable(!E);},[L,E]);let le=S__namespace.useRef(D);le.current=D,S__namespace.useEffect(()=>L.registerUpdateListener(({editorState:A})=>{A.read(()=>{let ce=lexical.$getRoot().getTextContent();I(ce.trim().length>0),le.current?.(ce);});}),[L]);let J=S__namespace.useCallback(()=>{if(a)return;let A=us(L),ce=A.text.trim().length>0,Q=j.length>0;!ce&&!Q||(O?.(A,Q?j:void 0),Zo(L),j.forEach(Ge=>URL.revokeObjectURL(Ge.previewUrl)),N([]));},[L,a,j,O,N]);H.current=J;let{restart:he}=jt({steps:u,speed:f,trigger:b,play:h,loop:y,loopDelay:R,containerRef:Y,onLoopReset:()=>{Zo(L),x?.();},interpret:async(A,ce)=>{let Q=ce.signal;if(A.type==="wait")return re(A.ms,Q);if(A.type==="clear")return Zo(L),re(120,Q);if(A.type==="newline")return L.update(()=>{let oe=lexical.$getSelection();lexical.$isRangeSelection(oe)&&oe.insertParagraph();}),re(60,Q);if(A.type==="submit")return J(),re(120,Q);if(A.type==="format")return ms(L,A.format),L.update(()=>{let oe=lexical.$getSelection();if(!lexical.$isRangeSelection(oe)||oe.isCollapsed())return;let Re=oe.focus;oe.anchor.set(Re.key,Re.offset,Re.type);}),re(80,Q);if(A.type==="select")return Gp(L,A.text),re(120,Q);if(A.type==="mention")return A.query&&(L.update(()=>{let oe=lexical.$getSelection();lexical.$isRangeSelection(oe)&&oe.insertText(A.trigger);}),await Er(A.query,oe=>{L.update(()=>{let Re=lexical.$getRoot(),Z=Re.getTextContent(),ie=Z.slice(0,Z.length-A.trigger.length-(oe.length-1));Re.clear();let ze=lexical.$createParagraphNode();ie&&ze.append(lexical.$createTextNode(ie)),ze.append(lexical.$createTextNode(A.trigger+oe)),Re.append(ze);});},ce.speed.tokenStagger,Q),await re(180,Q),L.update(()=>{let oe=lexical.$getRoot(),Re=oe.getTextContent(),Z=A.trigger.length+A.query.length,ie=Re.slice(0,Re.length-Z);oe.clear();let ze=lexical.$createParagraphNode();ie&&ze.append(lexical.$createTextNode(ie)),oe.append(ze),ze.select();})),_p(L,A.trigger,A.value),re(120,Q);let Ge=A.speed?{slow:70,normal:22,fast:8}[A.speed]:ce.speed.tokenStagger;for(let oe=0;oe<A.text.length;oe++){if(Q.aborted)return;let Re=A.text[oe];L.update(()=>{let Z=lexical.$getSelection();if(!lexical.$isRangeSelection(Z)){lexical.$getRoot().selectEnd();let ie=lexical.$getSelection();lexical.$isRangeSelection(ie)&&ie.insertText(Re);return}Z.insertText(Re);}),oe<A.text.length-1&&await re(Ge,Q);}}});S__namespace.useEffect(()=>{F.current=A=>{Zo(L),he(A);};},[L,he,F]);let ne=!E&&!m&&!g,be=!E&&!d&&o!==null,Be=!E&&(be||d||ne||m);return S__namespace.createElement("div",{ref:Y,"data-gds-part":"composer","data-gds-loading":a?"true":"false",className:s("w-full",!k&&["rounded-md","bg-transparent","border border-input","shadow-sm","focus-within:outline-none focus-within:ring-1 focus-within:ring-ring","transition-colors"],T)},n&&S__namespace.createElement(Up,{formats:r}),o&&S__namespace.createElement(jp,{attachments:j,onRemove:A=>{N(ce=>{let Q=ce.find(Ge=>Ge.id===A);return Q&&URL.revokeObjectURL(Q.previewUrl),ce.filter(Ge=>Ge.id!==A)});}}),S__namespace.createElement("div",{className:"relative"},S__namespace.createElement(LexicalRichTextPlugin.RichTextPlugin,{contentEditable:S__namespace.createElement(LexicalContentEditable.ContentEditable,{"data-gds-part":"composer-editor",className:s("outline-none","px-3 sm:px-4 py-3","text-sm text-[var(--gds-composer-fg)]","min-h-[44px] max-h-[300px] overflow-y-auto","[&_p]:m-0 [&_p+p]:mt-2","[&_h1]:text-xl [&_h1]:font-semibold [&_h1]:mt-2","[&_h2]:text-lg [&_h2]:font-semibold [&_h2]:mt-2","[&_h3]:text-base [&_h3]:font-semibold [&_h3]:mt-2","[&_ul]:list-disc [&_ul]:pl-5 [&_ol]:list-decimal [&_ol]:pl-5","[&_blockquote]:border-l-2 [&_blockquote]:border-[var(--gds-composer-border)] [&_blockquote]:pl-3 [&_blockquote]:italic","[&_code]:bg-[var(--gds-composer-toolbar-active-bg)] [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_code]:text-xs [&_code]:font-mono",a&&"opacity-60 pointer-events-none"),"aria-placeholder":e??"",placeholder:S__namespace.createElement("div",{"data-gds-part":"composer-placeholder",className:"absolute top-3 left-3 sm:left-4 text-sm text-[var(--gds-composer-muted-fg)] pointer-events-none select-none"},e),spellCheck:true}),ErrorBoundary:LexicalErrorBoundary.LexicalErrorBoundary}),S__namespace.createElement(LexicalHistoryPlugin.HistoryPlugin,null),S__namespace.createElement(LexicalListPlugin.ListPlugin,null),S__namespace.createElement(LexicalLinkPlugin.LinkPlugin,null),S__namespace.createElement(LexicalOnChangePlugin.OnChangePlugin,{onChange:()=>{}}),S__namespace.createElement(Vp,{enabled:!!i}),S__namespace.createElement(zp,{onSubmit:J,enabled:c}),o&&S__namespace.createElement(Op,{onImageFiles:X,enabled:true}),t.length>0&&S__namespace.createElement(lexicalBeautifulMentions.BeautifulMentionsPlugin,{items:t.reduce((A,ce)=>(typeof ce.items=="function"||(A[ce.char]=ce.items.map(Q=>({value:Q.value}))),A),{})})),Be&&S__namespace.createElement("div",{"data-gds-part":"composer-actions",className:"flex items-center justify-between gap-2 px-2 pb-2 pt-1"},S__namespace.createElement("div",{className:"flex items-center gap-1"},d??(be&&S__namespace.createElement("button",{type:"button",onClick:()=>v.current?.click(),disabled:a,"aria-label":"Attach image",title:"Attach image",className:s("h-8 w-8 rounded-lg flex items-center justify-center","text-[var(--gds-composer-action-fg)]","hover:text-[var(--gds-composer-fg)]","hover:bg-[var(--gds-composer-toolbar-hover-bg)]","focus:outline-none focus:ring-2 focus:ring-primary","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed")},S__namespace.createElement(lucideReact.Paperclip,{className:"w-4 h-4"})))),m??(ne&&S__namespace.createElement("button",{type:"button",onClick:a?l:J,disabled:a?!l:!W&&j.length===0,"aria-label":a?"Stop":"Send",className:s("h-8 w-8 rounded-lg flex items-center justify-center transition-colors flex-shrink-0","focus:outline-none focus:ring-2 focus:ring-primary",a?"bg-red-500 hover:bg-red-600 text-white disabled:opacity-50":W||j.length>0?"bg-primary hover:bg-primary/90 text-primary-foreground":"bg-[var(--gds-composer-toolbar-active-bg)] text-[var(--gds-composer-muted-fg)] cursor-not-allowed")},a?S__namespace.createElement(lucideReact.Square,{className:"w-3.5 h-3.5"}):S__namespace.createElement(lucideReact.Send,{className:"w-3.5 h-3.5"}))),o&&S__namespace.createElement("input",{ref:v,type:"file",accept:o.accept,multiple:o.multiple,onChange:A=>{A.target.files&&X(Array.from(A.target.files)),A.target.value="";},className:"sr-only",tabIndex:-1,"aria-hidden":"true"})))}var gs=S__namespace.forwardRef(function(t,o){let{initialText:r,initialJson:n,formats:a,toolbar:l,triggers:p,attachments:i,...c}=t,d=S__namespace.useMemo(()=>a===false?[]:a??["bold","italic","underline","strikethrough","code","h1","h2","blockquote","ul","ol"],[a]),m=l===true||l==="top",g=S__namespace.useMemo(()=>{if(!i)return null;let H=i===true?{}:i;return H.enabled===false?null:{enabled:true,accept:H.accept??"image/*",maxItems:H.maxItems??10,multiple:H.multiple??true}},[i]),[u,b]=S__namespace.useState([]),h=S__namespace.useRef(u);h.current=u,S__namespace.useEffect(()=>()=>{h.current.forEach(H=>URL.revokeObjectURL(H.previewUrl));},[]);let f=S__namespace.useCallback(H=>{if(!g)return;let F=H.filter(j=>g.accept?g.accept==="image/*"?j.type.startsWith("image/"):g.accept.split(",").some(N=>{let X=N.trim();return X.endsWith("/*")?j.type.startsWith(X.slice(0,-1)):j.type===X||j.name.toLowerCase().endsWith(X)}):true);F.length!==0&&b(j=>{let N=g.maxItems-j.length;if(N<=0)return j;let X=F.slice(0,N).map(L=>({id:`${L.name}-${L.size}-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,file:L,previewUrl:URL.createObjectURL(L),name:L.name}));return [...j,...X]});},[g]),y=S__namespace.useRef(null),R=S__namespace.useRef(()=>{}),x=S__namespace.useRef(()=>{}),k=S__namespace.useCallback(H=>{y.current=H;},[]);S__namespace.useImperativeHandle(o,()=>({play:H=>{console.warn('[Composer] handle.play(steps) is not wired in v1 \u2014 pass `steps` + `trigger="manual"` and toggle `play` instead.');},stop:()=>{},restart:H=>x.current(H),focus:()=>y.current?.focus(),clear:()=>{let H=y.current;H&&Zo(H);},insert:H=>{y.current?.update(()=>{let F=lexical.$getSelection();lexical.$isRangeSelection(F)&&F.insertText(H);});},getContent:()=>y.current?us(y.current):{text:"",json:"",mentions:[]},getEditor:()=>y.current}),[]);let T=S__namespace.useMemo(()=>({paragraph:"gds-composer-paragraph",quote:"gds-composer-quote",heading:{h1:"gds-composer-h1",h2:"gds-composer-h2",h3:"gds-composer-h3"},list:{ul:"gds-composer-ul",ol:"gds-composer-ol",listitem:"gds-composer-li"},text:{bold:"font-semibold",italic:"italic",underline:"underline",strikethrough:"line-through",code:"gds-composer-code"},beautifulMentions:{"@":"gds-composer-mention px-1.5 py-0.5 mx-0.5 rounded bg-primary/10 text-primary font-medium","/":"gds-composer-mention px-1.5 py-0.5 mx-0.5 rounded bg-violet-500/15 text-violet-600 dark:text-violet-400 font-medium"}}),[]),O=S__namespace.useMemo(()=>({namespace:"gds-composer",theme:T,onError:H=>{console.error("[Composer]",H);},nodes:[richText.HeadingNode,richText.QuoteNode,list.ListNode,list.ListItemNode,link.LinkNode,link.AutoLinkNode,code.CodeNode,code.CodeHighlightNode,lexicalBeautifulMentions.BeautifulMentionNode],editorState:n||(r?H=>{let F=lexical.$getRoot(),j=lexical.$createParagraphNode();j.append(lexical.$createTextNode(r)),F.append(j);}:void 0)}),[T,n,r]),D=d.length>0,{readOnly:E=false,...$}=c;return S__namespace.createElement(LexicalComposer.LexicalComposer,{initialConfig:{...O,editable:!E}},S__namespace.createElement($p,{...$,readOnly:E,triggers:p??[],attachmentsCfg:E?null:g,formatList:d,showToolbar:m&&D&&!E,handleEditorReady:k,submitRef:R,restartRef:x,attachments:u,setAttachments:b,ingestImages:f}))}),Kp=S__namespace.forwardRef(function(t,o){return S__namespace.createElement(gs,{ref:o,placeholder:"Write a reply\u2026",formats:false,submitOnEnter:false,...t})});var Rt=ft__namespace.Root,St=ft__namespace.Trigger,qp=ft__namespace.Anchor,ht=S__namespace.forwardRef(({className:e,align:t="center",sideOffset:o=4,surface:r="solid",...n},a)=>S__namespace.createElement(ft__namespace.Portal,null,S__namespace.createElement(ft__namespace.Content,{ref:a,align:t,sideOffset:o,"data-surface":r,className:s("z-50 w-72 rounded-md border p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",gt(r,"bg-popover"),Xe[r],e),...n})));ht.displayName=ft__namespace.Content.displayName;var Yp="PPP",Zp="LLL dd, y";function Xp({value:e,onChange:t,placeholder:o="Pick a date",disabled:r,className:n,contentClassName:a,align:l="start",side:p,format:i=Yp,captionLayout:c,icon:d,"aria-label":m}){return S__namespace.createElement(Rt,null,S__namespace.createElement(St,{asChild:true},S__namespace.createElement(We,{type:"button",variant:"outline",disabled:r,"aria-label":m??(e?void 0:o),"data-empty":!e,className:s("w-[280px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",n)},d??S__namespace.createElement(lucideReact.CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?dateFns.format(e,i):S__namespace.createElement("span",null,o))),S__namespace.createElement(ht,{className:s("w-auto p-0",a),align:l,side:p},S__namespace.createElement(Mr,{mode:"single",selected:e,onSelect:t,captionLayout:c,initialFocus:true})))}function Jp({value:e,onChange:t,placeholder:o="Pick a date range",disabled:r,className:n,contentClassName:a,align:l="start",side:p,format:i=Zp,captionLayout:c,icon:d,numberOfMonths:m=2,"aria-label":g}){let u=!!e?.from;return S__namespace.createElement(Rt,null,S__namespace.createElement(St,{asChild:true},S__namespace.createElement(We,{type:"button",variant:"outline",disabled:r,"aria-label":g??(u?void 0:o),"data-empty":!u,className:s("w-[300px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",n)},d??S__namespace.createElement(lucideReact.CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?.from?e.to?S__namespace.createElement(S__namespace.Fragment,null,dateFns.format(e.from,i)," \u2013"," ",dateFns.format(e.to,i)):dateFns.format(e.from,i):S__namespace.createElement("span",null,o))),S__namespace.createElement(ht,{className:s("w-auto p-0",a),align:l,side:p},S__namespace.createElement(Mr,{mode:"range",selected:e,onSelect:t,defaultMonth:e?.from,numberOfMonths:m,captionLayout:c,initialFocus:true})))}var em=ye__namespace.Root,tm=ye__namespace.Trigger,hs=ye__namespace.Portal,om=ye__namespace.Close,Ra=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(ye__namespace.Overlay,{ref:o,className:s("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Ra.displayName=ye__namespace.Overlay.displayName;var bs=S__namespace.forwardRef(({className:e,children:t,surface:o="solid",...r},n)=>S__namespace.createElement(hs,null,S__namespace.createElement(Ra,null),S__namespace.createElement(ye__namespace.Content,{ref:n,"data-surface":o,className:s("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",gt(o,"bg-background"),Xe[o],e),...r},t,S__namespace.createElement(ye__namespace.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},S__namespace.createElement(lucideReact.X,{className:"h-4 w-4"}),S__namespace.createElement("span",{className:"sr-only"},"Close")))));bs.displayName=ye__namespace.Content.displayName;var vs=({className:e,...t})=>S__namespace.createElement("div",{className:s("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});vs.displayName="DialogHeader";var ys=({className:e,...t})=>S__namespace.createElement("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ys.displayName="DialogFooter";var xs=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(ye__namespace.Title,{ref:o,className:s("text-lg font-semibold leading-none tracking-tight",e),...t}));xs.displayName=ye__namespace.Title.displayName;var ws=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(ye__namespace.Description,{ref:o,className:s("text-sm text-muted-foreground",e),...t}));ws.displayName=ye__namespace.Description.displayName;var im=U__namespace.Root,sm=U__namespace.Trigger,lm=U__namespace.Group,dm=U__namespace.Portal,cm=U__namespace.Sub,pm=U__namespace.RadioGroup,Rs=S__namespace.forwardRef(({className:e,inset:t,children:o,...r},n)=>S__namespace.createElement(U__namespace.SubTrigger,{ref:n,className:s("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r},o,S__namespace.createElement(lucideReact.ChevronRight,{className:"ml-auto"})));Rs.displayName=U__namespace.SubTrigger.displayName;var Ss=S__namespace.forwardRef(({className:e,surface:t="solid",...o},r)=>S__namespace.createElement(U__namespace.SubContent,{ref:r,"data-surface":t,className:s("z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",gt(t,"bg-popover"),Xe[t],e),...o}));Ss.displayName=U__namespace.SubContent.displayName;var Cs=S__namespace.forwardRef(({className:e,sideOffset:t=4,surface:o="solid",...r},n)=>S__namespace.createElement(U__namespace.Portal,null,S__namespace.createElement(U__namespace.Content,{ref:n,sideOffset:t,"data-surface":o,className:s("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",gt(o,"bg-popover"),Xe[o],e),...r})));Cs.displayName=U__namespace.Content.displayName;var ks=S__namespace.forwardRef(({className:e,inset:t,...o},r)=>S__namespace.createElement(U__namespace.Item,{ref:r,className:s("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));ks.displayName=U__namespace.Item.displayName;var Ts=S__namespace.forwardRef(({className:e,children:t,checked:o,...r},n)=>S__namespace.createElement(U__namespace.CheckboxItem,{ref:n,className:s("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...r},S__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},S__namespace.createElement(U__namespace.ItemIndicator,null,S__namespace.createElement(lucideReact.Check,{className:"h-4 w-4"}))),t));Ts.displayName=U__namespace.CheckboxItem.displayName;var Ps=S__namespace.forwardRef(({className:e,children:t,...o},r)=>S__namespace.createElement(U__namespace.RadioItem,{ref:r,className:s("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o},S__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},S__namespace.createElement(U__namespace.ItemIndicator,null,S__namespace.createElement(lucideReact.Circle,{className:"h-2 w-2 fill-current"}))),t));Ps.displayName=U__namespace.RadioItem.displayName;var Ms=S__namespace.forwardRef(({className:e,inset:t,...o},r)=>S__namespace.createElement(U__namespace.Label,{ref:r,className:s("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));Ms.displayName=U__namespace.Label.displayName;var Ns=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(U__namespace.Separator,{ref:o,className:s("-mx-1 my-1 h-px bg-muted",e),...t}));Ns.displayName=U__namespace.Separator.displayName;var Es=({className:e,...t})=>S__namespace.createElement("span",{className:s("ml-auto text-xs tracking-widest opacity-60",e),...t});Es.displayName="DropdownMenuShortcut";var um=classVarianceAuthority.cva("flex w-full rounded-md border border-input bg-transparent shadow-sm transition-colors file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{default:"h-9 pl-3 pr-3 py-1 text-base file:text-sm md:text-sm",sm:"h-8 pl-2 pr-2 py-1 text-xs file:text-xs"}},defaultVariants:{size:"default"}}),Ls=S__namespace.forwardRef(({className:e,type:t,size:o="default",...r},n)=>S__namespace.createElement("input",{type:t,className:s(um({size:o}),e),ref:n,...r}));Ls.displayName="Input";var fm=classVarianceAuthority.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ds=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(Sa__namespace.Root,{ref:o,className:s(fm(),e),...t}));Ds.displayName=Sa__namespace.Root.displayName;var As=S__namespace.forwardRef(({className:e,value:t,...o},r)=>S__namespace.createElement(er__namespace.Root,{ref:r,className:s("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...o},S__namespace.createElement(er__namespace.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})));As.displayName=er__namespace.Root.displayName;var Ca=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(cmdk.Command,{ref:o,className:s("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Ca.displayName=cmdk.Command.displayName;var ka=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":""},S__namespace.createElement(lucideReact.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),S__namespace.createElement(cmdk.Command.Input,{ref:o,className:s("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})));ka.displayName=cmdk.Command.Input.displayName;var Ta=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(cmdk.Command.List,{ref:o,className:s("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Ta.displayName=cmdk.Command.List.displayName;var Pa=S__namespace.forwardRef((e,t)=>S__namespace.createElement(cmdk.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Pa.displayName=cmdk.Command.Empty.displayName;var zr=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(cmdk.Command.Group,{ref:o,className:s("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));zr.displayName=cmdk.Command.Group.displayName;var Ma=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(cmdk.Command.Separator,{ref:o,className:s("-mx-1 h-px bg-border",e),...t}));Ma.displayName=cmdk.Command.Separator.displayName;var To=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(cmdk.Command.Item,{ref:o,className:s("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));To.displayName=cmdk.Command.Item.displayName;var tr=S__namespace.forwardRef(({className:e,orientation:t="horizontal",decorative:o=true,...r},n)=>S__namespace.createElement(Na__namespace.Root,{ref:n,decorative:o,orientation:t,className:s("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));tr.displayName=Na__namespace.Root.displayName;var Rm=3,Hs=S__namespace.forwardRef(function({options:t,value:o,defaultValue:r,onValueChange:n,placeholder:a="Select\u2026",searchPlaceholder:l="Search\u2026",emptyMessage:p="Nothing matches.",maxCount:i=Rm,searchable:c=true,badgeDismissible:d=true,disabled:m=false,modalPopover:g=false,className:u,id:b,"aria-label":h,...f},y){let R=o!==void 0,[x,k]=S__namespace.useState(r??[]),T=R?o:x,[O,D]=S__namespace.useState(false),E=S__namespace.useMemo(()=>{let v=new Map;for(let W of t)v.set(W.value,W);return v},[t]),$=S__namespace.useCallback(v=>{R||k(v),n?.(v);},[R,n]),H=v=>{T.includes(v)?$(T.filter(W=>W!==v)):$([...T,v]);},F=(v,W)=>{v.preventDefault(),v.stopPropagation(),$(T.filter(I=>I!==W));},j=v=>{v?.preventDefault(),v?.stopPropagation(),$([]);},N=()=>{let v=t.filter(W=>!W.disabled).map(W=>W.value);$(v);},X=t.length>0&&t.filter(v=>!v.disabled).every(v=>T.includes(v.value)),L=T.slice(0,i),Y=Math.max(0,T.length-i);return S__namespace.createElement(Rt,{open:O,onOpenChange:D,modal:g},S__namespace.createElement(St,{asChild:true},S__namespace.createElement("button",{ref:y,type:"button",id:b,role:"combobox","aria-expanded":O,"aria-haspopup":"listbox","aria-label":h,disabled:m,"data-gds-part":"multi-select",className:s("flex min-h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-transparent pl-2 pr-2 text-sm shadow-sm","ring-offset-background placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50","[&[data-state=open]]:ring-1 [&[data-state=open]]:ring-ring",u)},T.length===0?S__namespace.createElement("span",{className:"text-muted-foreground px-1"},a):S__namespace.createElement("div",{className:"flex flex-1 flex-wrap items-center gap-1 py-1","data-gds-part":"multi-select-badges"},L.map(v=>{let W=E.get(v);if(!W)return null;let I=W.icon;return S__namespace.createElement(Tr,{key:v,variant:"secondary",className:"gap-1 pr-1","data-gds-part":"multi-select-badge"},I?S__namespace.createElement(I,{className:"h-3 w-3"}):null,S__namespace.createElement("span",{className:"truncate max-w-[12rem]"},W.label),d&&!m&&S__namespace.createElement("span",{role:"button","aria-label":`Remove ${W.label}`,tabIndex:0,onClick:le=>F(le,v),onKeyDown:le=>{(le.key==="Enter"||le.key===" ")&&F(le,v);},className:"ml-0.5 inline-flex h-4 w-4 cursor-pointer items-center justify-center rounded-sm hover:bg-muted-foreground/20"},S__namespace.createElement(lucideReact.X,{className:"h-3 w-3","aria-hidden":true})))}),Y>0&&S__namespace.createElement(Tr,{variant:"outline",className:"text-muted-foreground","data-gds-part":"multi-select-overflow",title:T.slice(i).map(v=>E.get(v)?.label??v).join(", ")},"+",Y," more")),S__namespace.createElement("div",{className:"flex shrink-0 items-center gap-1"},T.length>0&&!m&&S__namespace.createElement("span",{role:"button","aria-label":"Clear all",tabIndex:0,onClick:v=>j(v),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&j(v);},className:"inline-flex h-5 w-5 cursor-pointer items-center justify-center rounded-sm text-muted-foreground hover:text-foreground hover:bg-muted"},S__namespace.createElement(lucideReact.XCircle,{className:"h-3.5 w-3.5","aria-hidden":true})),S__namespace.createElement(lucideReact.ChevronDown,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":true})))),S__namespace.createElement(ht,{align:"start",className:"w-[var(--radix-popover-trigger-width)] p-0","data-gds-part":"multi-select-content"},S__namespace.createElement(Ca,null,c&&S__namespace.createElement(ka,{placeholder:l}),S__namespace.createElement(Ta,null,S__namespace.createElement(Pa,null,p),S__namespace.createElement(zr,null,t.map(v=>{let W=v.icon,I=T.includes(v.value);return S__namespace.createElement(To,{key:v.value,value:v.label,onSelect:()=>H(v.value),disabled:v.disabled,"data-gds-part":"multi-select-item","data-selected":I||void 0},S__namespace.createElement("div",{className:s("mr-2 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border border-primary",I?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),"aria-hidden":true},S__namespace.createElement(lucideReact.Check,{className:"h-3 w-3"})),W?S__namespace.createElement(W,{className:"mr-2 h-4 w-4 text-muted-foreground"}):null,S__namespace.createElement("span",{className:"truncate"},v.label))})),S__namespace.createElement(Ma,null),S__namespace.createElement(zr,null,S__namespace.createElement("div",{className:"flex items-center justify-between gap-1 p-1"},S__namespace.createElement(To,{onSelect:N,className:"flex-1 justify-center text-xs",disabled:X},"Select all"),S__namespace.createElement(tr,{orientation:"vertical",className:"h-5"}),S__namespace.createElement(To,{onSelect:()=>j(),className:"flex-1 justify-center text-xs",disabled:T.length===0},"Clear"),S__namespace.createElement(tr,{orientation:"vertical",className:"h-5"}),S__namespace.createElement(To,{onSelect:()=>D(false),className:"flex-1 justify-center text-xs"},"Close")))))))});Hs.displayName="MultiSelect";var Is=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(Kt__namespace.Root,{className:s("grid gap-2",e),...t,ref:o}));Is.displayName=Kt__namespace.Root.displayName;var Fs=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(Kt__namespace.Item,{ref:o,className:s("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t},S__namespace.createElement(Kt__namespace.Indicator,{className:"flex items-center justify-center"},S__namespace.createElement(lucideReact.Circle,{className:"h-2.5 w-2.5 fill-current text-current"}))));Fs.displayName=Kt__namespace.Item.displayName;var km=({className:e,...t})=>S__namespace.createElement(Po__namespace.PanelGroup,{"data-gds-part":"resizable-panel-group",className:s("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t}),Tm=Po__namespace.Panel,Pm=({withHandle:e,className:t,...o})=>S__namespace.createElement(Po__namespace.PanelResizeHandle,{"data-gds-part":"resizable-handle",className:s("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...o},e&&S__namespace.createElement("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border"},S__namespace.createElement(lucideReact.GripVertical,{className:"h-2.5 w-2.5"})));var Bs=classVarianceAuthority.cva("gds-row flex flex-row",{variants:{gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{true:"flex-wrap",false:"flex-nowrap"}},defaultVariants:{gap:"md",align:"center",justify:"start",wrap:false}}),zs=S__namespace.forwardRef(({className:e,gap:t,align:o,justify:r,wrap:n,asChild:a=false,...l},p)=>S__namespace.createElement(a?reactSlot.Slot:"div",{ref:p,"data-gds-part":"row",className:s(Bs({gap:t,align:o,justify:r,wrap:n,className:e})),...l}));zs.displayName="Row";var Os=classVarianceAuthority.cva("gds-grid grid",{variants:{cols:{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 md:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",5:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-5",6:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-6",12:"grid-cols-4 md:grid-cols-6 lg:grid-cols-12"},gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"}},defaultVariants:{cols:"3",gap:"md",align:"stretch"}}),Vs=S__namespace.forwardRef(({className:e,cols:t,gap:o,align:r,asChild:n=false,...a},l)=>S__namespace.createElement(n?reactSlot.Slot:"div",{ref:l,"data-gds-part":"grid",className:s(Os({cols:t,gap:o,align:r,className:e})),...a}));Vs.displayName="Grid";var _s=classVarianceAuthority.cva("gds-flex flex",{variants:{direction:{row:"flex-row",col:"flex-col","row-reverse":"flex-row-reverse","col-reverse":"flex-col-reverse"},gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"}},defaultVariants:{direction:"row",gap:"none",align:"stretch",justify:"start",wrap:"nowrap"}}),Gs=S__namespace.forwardRef(({className:e,direction:t,gap:o,align:r,justify:n,wrap:a,asChild:l=false,...p},i)=>S__namespace.createElement(l?reactSlot.Slot:"div",{ref:i,"data-gds-part":"flex",className:s(_s({direction:t,gap:o,align:r,justify:n,wrap:a,className:e})),...p}));Gs.displayName="Flex";var Ws=S__namespace.forwardRef(({className:e,children:t,...o},r)=>S__namespace.createElement(it__namespace.Root,{ref:r,className:s("relative overflow-hidden",e),...o},S__namespace.createElement(it__namespace.Viewport,{className:"h-full w-full rounded-[inherit]"},t),S__namespace.createElement(Ea,null),S__namespace.createElement(it__namespace.Corner,null)));Ws.displayName=it__namespace.Root.displayName;var Ea=S__namespace.forwardRef(({className:e,orientation:t="vertical",...o},r)=>S__namespace.createElement(it__namespace.ScrollAreaScrollbar,{ref:r,orientation:t,className:s("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o},S__namespace.createElement(it__namespace.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})));Ea.displayName=it__namespace.ScrollAreaScrollbar.displayName;var Bm=K__namespace.Root,zm=K__namespace.Group,Om=K__namespace.Value,Vm=classVarianceAuthority.cva("flex w-full items-center justify-between rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",{variants:{size:{default:"h-10 px-3 py-2 text-sm",sm:"h-8 px-2 py-1 text-xs"}},defaultVariants:{size:"default"}}),js=S__namespace.forwardRef(({className:e,children:t,size:o="default",...r},n)=>S__namespace.createElement(K__namespace.Trigger,{ref:n,className:s(Vm({size:o}),e),...r},t,S__namespace.createElement(K__namespace.Icon,{asChild:true},S__namespace.createElement(lucideReact.ChevronDown,{className:s("opacity-50",o==="sm"?"h-3.5 w-3.5":"h-4 w-4")}))));js.displayName=K__namespace.Trigger.displayName;var La=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(K__namespace.ScrollUpButton,{ref:o,className:s("flex cursor-default items-center justify-center py-1",e),...t},S__namespace.createElement(lucideReact.ChevronUp,{className:"h-4 w-4"})));La.displayName=K__namespace.ScrollUpButton.displayName;var Da=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(K__namespace.ScrollDownButton,{ref:o,className:s("flex cursor-default items-center justify-center py-1",e),...t},S__namespace.createElement(lucideReact.ChevronDown,{className:"h-4 w-4"})));Da.displayName=K__namespace.ScrollDownButton.displayName;var $s=S__namespace.forwardRef(({className:e,children:t,position:o="popper",...r},n)=>S__namespace.createElement(K__namespace.Portal,null,S__namespace.createElement(K__namespace.Content,{ref:n,className:s("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:o,...r},S__namespace.createElement(La,null),S__namespace.createElement(K__namespace.Viewport,{className:s("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},t),S__namespace.createElement(Da,null))));$s.displayName=K__namespace.Content.displayName;var Ks=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(K__namespace.Label,{ref:o,className:s("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Ks.displayName=K__namespace.Label.displayName;var qs=S__namespace.forwardRef(({className:e,children:t,...o},r)=>S__namespace.createElement(K__namespace.Item,{ref:r,className:s("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o},S__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},S__namespace.createElement(K__namespace.ItemIndicator,null,S__namespace.createElement(lucideReact.Check,{className:"h-4 w-4"}))),S__namespace.createElement(K__namespace.ItemText,null,t)));qs.displayName=K__namespace.Item.displayName;var Ys=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(K__namespace.Separator,{ref:o,className:s("-mx-1 my-1 h-px bg-muted",e),...t}));Ys.displayName=K__namespace.Separator.displayName;var Wm=ye__namespace.Root,Um=ye__namespace.Trigger,jm=ye__namespace.Close,Zs=ye__namespace.Portal,Aa=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(ye__namespace.Overlay,{className:s("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));Aa.displayName=ye__namespace.Overlay.displayName;var $m=classVarianceAuthority.cva("fixed z-50 gap-4 p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Xs=S__namespace.forwardRef(({side:e="right",surface:t="solid",className:o,children:r,...n},a)=>S__namespace.createElement(Zs,null,S__namespace.createElement(Aa,null),S__namespace.createElement(ye__namespace.Content,{ref:a,"data-surface":t,className:s($m({side:e}),gt(t,"bg-background"),Xe[t],o),...n},r,S__namespace.createElement(ye__namespace.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary"},S__namespace.createElement(lucideReact.X,{className:"h-4 w-4"}),S__namespace.createElement("span",{className:"sr-only"},"Close")))));Xs.displayName=ye__namespace.Content.displayName;var Js=({className:e,...t})=>S__namespace.createElement("div",{className:s("flex flex-col space-y-2 text-center sm:text-left",e),...t});Js.displayName="SheetHeader";var Qs=({className:e,...t})=>S__namespace.createElement("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Qs.displayName="SheetFooter";var el=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(ye__namespace.Title,{ref:o,className:s("text-lg font-semibold text-foreground",e),...t}));el.displayName=ye__namespace.Title.displayName;var tl=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(ye__namespace.Description,{ref:o,className:s("text-sm text-muted-foreground",e),...t}));tl.displayName=ye__namespace.Description.displayName;function Km({className:e,...t}){return React.createElement("div",{className:s("animate-pulse rounded-md bg-muted",e),...t})}var ol=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(It__namespace.Root,{ref:o,className:s("relative flex w-full touch-none select-none items-center",e),...t},S__namespace.createElement(It__namespace.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary"},S__namespace.createElement(It__namespace.Range,{className:"absolute h-full bg-primary"})),S__namespace.createElement(It__namespace.Thumb,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})));ol.displayName=It__namespace.Root.displayName;var ru={vertical:sortable.verticalListSortingStrategy,horizontal:sortable.horizontalListSortingStrategy,grid:sortable.rectSortingStrategy},Ha=S__namespace.createContext(null),cl=S__namespace.createContext(null),Ia=S__namespace.forwardRef(function({disabled:t=false,className:o,children:r,...n},a){let l=S__namespace.useRef(new Map),p=S__namespace.useCallback(m=>(l.current.set(m.id,m),()=>{l.current.delete(m.id);}),[]),i=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:4}}),core.useSensor(core.KeyboardSensor,{coordinateGetter:sortable.sortableKeyboardCoordinates})),c=m=>{let g=l.current,u=g.get(String(m));if(u)return u;for(let b of g.values())if(b.values.some(h=>h===m))return b;return null},d=S__namespace.useCallback(m=>{if(t)return;let{active:g,over:u}=m;if(!u)return;let b=c(g.id),h=c(u.id);if(!b||!h)return;if(b.id===h.id){if(g.id===u.id)return;let x=b.values.findIndex(T=>T===g.id),k=b.values.findIndex(T=>T===u.id);if(x===-1||k===-1)return;b.onReorder?.(sortable.arrayMove(b.values,x,k));return}let f=b.values.filter(x=>x!==g.id),y=u.id===h.id?h.values.length:Math.max(0,h.values.findIndex(x=>x===u.id)),R=[...h.values.slice(0,y),g.id,...h.values.slice(y)];b.onReorder?.(f),h.onReorder?.(R);},[t]);return S__namespace.createElement(cl.Provider,{value:{registerContainer:p}},S__namespace.createElement(core.DndContext,{sensors:i,collisionDetection:core.closestCorners,onDragEnd:d},S__namespace.createElement("div",{ref:a,"data-gds-part":"sortable-group","data-disabled":t||void 0,className:s(o),...n},r)))});Ia.displayName="Sortable.Group";var rr=S__namespace.forwardRef(function({values:t,onReorder:o,strategy:r="vertical",disabled:n=false,id:a,className:l,children:p,...i},c){let d=S__namespace.useContext(cl),m=d!==null,g=S__namespace.useId(),u=a??g;S__namespace.useEffect(()=>{if(m)return d.registerContainer({id:u,values:t,onReorder:o})},[m,d,u,t,o]);let b=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:4}}),core.useSensor(core.KeyboardSensor,{coordinateGetter:sortable.sortableKeyboardCoordinates})),h=S__namespace.useCallback(R=>{let{active:x,over:k}=R;if(!k||x.id===k.id)return;let T=t.findIndex(D=>D===x.id),O=t.findIndex(D=>D===k.id);T===-1||O===-1||o?.(sortable.arrayMove(t,T,O));},[t,o]),f=S__namespace.useMemo(()=>({disabled:n}),[n]),y=S__namespace.createElement(sortable.SortableContext,{items:t,strategy:ru[r]},S__namespace.createElement(au,{id:u,enabled:m,forwardedRef:c,strategy:r,disabled:n,className:l,...i},p));return m?S__namespace.createElement(Ha.Provider,{value:f},y):S__namespace.createElement(Ha.Provider,{value:f},S__namespace.createElement(core.DndContext,{sensors:b,collisionDetection:core.closestCenter,onDragEnd:h},y))});rr.displayName="Sortable";function au({id:e,enabled:t,forwardedRef:o,strategy:r,disabled:n,className:a,children:l,...p}){let i=core.useDroppable({id:e,disabled:!t}),c=S__namespace.useCallback(d=>{t&&i.setNodeRef(d),typeof o=="function"?o(d):o&&(o.current=d);},[t,i,o]);return S__namespace.createElement("div",{ref:c,"data-gds-part":"sortable","data-strategy":r,"data-disabled":n||void 0,className:s(a),...p},l)}var pl=S__namespace.createContext(null),Fa=S__namespace.forwardRef(function({value:t,asChild:o=false,disabled:r,className:n,style:a,children:l,...p},i){let c=S__namespace.useContext(Ha);if(!c)throw new Error("<Sortable.Item> must be rendered inside <Sortable>.");let d=c.disabled||r||false,{attributes:m,listeners:g,setNodeRef:u,setActivatorNodeRef:b,transform:h,transition:f,isDragging:y}=sortable.useSortable({id:t,disabled:d}),R=S__namespace.useRef(false),x=S__namespace.useCallback(D=>{u(D),typeof i=="function"?i(D):i&&(i.current=D);},[u,i]),k=S__namespace.useMemo(()=>({listeners:g,setActivatorNodeRef:b,hasHandle:R,disabled:d}),[g,b,d]),T={transform:utilities.CSS.Transform.toString(h),transition:f,zIndex:y?1:void 0,cursor:d?"default":R.current?void 0:"grab",...a},O=o?reactSlot.Slot:"div";return S__namespace.createElement(pl.Provider,{value:k},S__namespace.createElement(O,{ref:x,"data-gds-part":"sortable-item","data-value":String(t),"data-dragging":y||void 0,className:s(n),style:T,...m,...R.current?{}:g,...p},l))});Fa.displayName="Sortable.Item";var Ba=S__namespace.forwardRef(function({asChild:t=false,className:o,children:r,...n},a){let l=S__namespace.useContext(pl);if(!l)throw new Error("<Sortable.Handle> must be rendered inside <Sortable.Item>.");S__namespace.useLayoutEffect(()=>(l.hasHandle.current=true,()=>{l.hasHandle.current=false;}),[l.hasHandle]);let p=S__namespace.useCallback(c=>{l.setActivatorNodeRef(c),typeof a=="function"?a(c):a&&(a.current=c);},[l,a]),i={"data-gds-part":"sortable-handle","aria-label":"Drag to reorder",className:s("cursor-grab touch-none select-none",l.disabled&&"cursor-default opacity-50",o),...l.disabled?{}:l.listeners,...n};return t?S__namespace.createElement(reactSlot.Slot,{ref:p,...i},r):S__namespace.createElement("button",{type:"button",ref:p,...i},r)});Ba.displayName="Sortable.Handle";rr.Item=Fa;rr.Handle=Ba;rr.Group=Ia;var nu=rr;var ml=classVarianceAuthority.cva("gds-stack flex flex-col",{variants:{gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}},defaultVariants:{gap:"md",align:"stretch",justify:"start"}}),ul=S__namespace.forwardRef(({className:e,gap:t,align:o,justify:r,asChild:n=false,...a},l)=>S__namespace.createElement(n?reactSlot.Slot:"div",{ref:l,"data-gds-part":"stack",className:s(ml({gap:t,align:o,justify:r,className:e})),...a}));ul.displayName="Stack";var gl=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(nr__namespace.Root,{className:s("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:o},S__namespace.createElement(nr__namespace.Thumb,{className:s("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})));gl.displayName=nr__namespace.Root.displayName;var fl=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement("div",{className:"relative w-full overflow-auto"},S__namespace.createElement("table",{ref:o,className:s("w-full caption-bottom text-sm",e),...t})));fl.displayName="Table";var hl=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement("thead",{ref:o,className:s("[&_tr]:border-b",e),...t}));hl.displayName="TableHeader";var bl=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement("tbody",{ref:o,className:s("[&_tr:last-child]:border-0",e),...t}));bl.displayName="TableBody";var vl=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement("tfoot",{ref:o,className:s("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));vl.displayName="TableFooter";var yl=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement("tr",{ref:o,className:s("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));yl.displayName="TableRow";var xl=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement("th",{ref:o,className:s("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));xl.displayName="TableHead";var wl=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement("td",{ref:o,className:s("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));wl.displayName="TableCell";var Rl=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement("caption",{ref:o,className:s("mt-4 text-sm text-muted-foreground",e),...t}));Rl.displayName="TableCaption";var Sl=S__namespace.createContext(S__namespace.createElement(lucideReact.ChevronRight,null)),Cl=S__namespace.forwardRef(({separator:e,children:t,...o},r)=>S__namespace.createElement(Sl.Provider,{value:e??S__namespace.createElement(lucideReact.ChevronRight,null)},S__namespace.createElement("nav",{ref:r,"aria-label":"breadcrumb",...o},t)));Cl.displayName="Breadcrumb";var kl=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement("ol",{ref:o,className:s("flex flex-wrap items-center gap-1.5 break-words text-xs text-muted-foreground",e),...t}));kl.displayName="BreadcrumbList";var Tl=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement("li",{ref:o,className:s("inline-flex items-center gap-1.5",e),...t}));Tl.displayName="BreadcrumbItem";var jr=s("inline-flex items-center gap-1.5 rounded-md px-1.5 py-0.5 text-xs","transition-colors hover:text-foreground hover:bg-muted/60","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","[&_svg]:pointer-events-none [&_svg]:size-3.5 [&_svg]:shrink-0"),Pl=S__namespace.forwardRef(({asChild:e,className:t,href:o,...r},n)=>e?S__namespace.createElement("span",{ref:n,className:s(jr,t),...r}):o?S__namespace.createElement("a",{ref:n,href:o,className:s(jr,t),...r}):S__namespace.createElement("button",{ref:n,type:"button",className:s(jr,t),...r}));Pl.displayName="BreadcrumbLink";var Ml=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement("span",{ref:o,role:"link","aria-disabled":"true","aria-current":"page",className:s("inline-flex items-center gap-1.5 px-0.5 text-xs font-medium text-foreground","[&_svg]:pointer-events-none [&_svg]:size-3.5 [&_svg]:shrink-0",e),...t}));Ml.displayName="BreadcrumbPage";var Nl=({children:e,className:t,...o})=>{let r=S__namespace.useContext(Sl);return S__namespace.createElement("li",{role:"presentation","aria-hidden":"true",className:s("[&_svg]:size-3 [&_svg]:shrink-0 text-muted-foreground/60",t),...o},e??r)};Nl.displayName="BreadcrumbSeparator";var El=({className:e,...t})=>S__namespace.createElement("span",{role:"presentation","aria-hidden":"true",className:s("flex h-5 w-5 items-center justify-center",e),...t},S__namespace.createElement(lucideReact.MoreHorizontal,{className:"h-3.5 w-3.5"}),S__namespace.createElement("span",{className:"sr-only"},"More"));El.displayName="BreadcrumbEllipsis";var Ll=S__namespace.forwardRef(({label:e,items:t,onSelect:o,onSelectLabel:r,current:n,className:a},l)=>{let[p,i]=S__namespace.useState(false);return S__namespace.createElement(Rt,{open:p,onOpenChange:i},S__namespace.createElement(St,{asChild:true},S__namespace.createElement("button",{ref:l,type:"button",className:s(jr,n&&"font-medium text-foreground",a),onClick:()=>{r?r():i(c=>!c);}},S__namespace.createElement("span",null,e),S__namespace.createElement(lucideReact.ChevronDown,{className:s("h-3 w-3 text-muted-foreground transition-transform",p&&"rotate-180"),onClick:c=>{c.stopPropagation(),i(d=>!d);},role:"button","aria-label":`Show ${e} children`}))),S__namespace.createElement(ht,{align:"start",className:"w-64 p-1 max-h-80 overflow-y-auto"},t.length===0?S__namespace.createElement("p",{className:"px-2 py-1.5 text-xs text-muted-foreground"},"No items here yet."):S__namespace.createElement("ul",{className:"flex flex-col gap-0.5"},t.map(c=>S__namespace.createElement("li",{key:c.id},S__namespace.createElement("button",{type:"button",onClick:()=>{o(c.id),i(false);},className:s("w-full text-left rounded-md px-2 py-1.5","flex items-start gap-2","hover:bg-muted transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",c.active&&"bg-muted/60")},S__namespace.createElement("span",{className:"flex-1 min-w-0"},S__namespace.createElement("span",{className:"flex items-center gap-1.5"},S__namespace.createElement("span",{className:"text-xs font-medium text-foreground truncate"},c.label),c.active&&S__namespace.createElement(lucideReact.Check,{className:"h-3 w-3 text-primary shrink-0"})),c.summary&&S__namespace.createElement("span",{className:"block text-[10px] text-muted-foreground leading-snug truncate"},c.summary)),c.hasChildren&&S__namespace.createElement(lucideReact.ChevronRight,{className:"h-3 w-3 text-muted-foreground/70 shrink-0 mt-0.5"})))))))});Ll.displayName="BreadcrumbMenuTrigger";var Oa=bt__namespace.Provider,lo=bt__namespace.Root,co=bt__namespace.Trigger,qt=S__namespace.forwardRef(({className:e,sideOffset:t=4,...o},r)=>S__namespace.createElement(bt__namespace.Portal,null,S__namespace.createElement(bt__namespace.Content,{ref:r,sideOffset:t,className:s("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...o})));qt.displayName=bt__namespace.Content.displayName;var Al=S__namespace.createContext({size:"md",variant:"pill"}),pu=vt__namespace.Root,mu=classVarianceAuthority.cva("inline-flex items-center text-muted-foreground",{variants:{variant:{pill:"justify-center rounded-lg bg-muted",underlined:"justify-start border-b border-border"},size:{sm:"",md:"",lg:""}},compoundVariants:[{variant:"pill",size:"sm",className:"h-7 p-0.5"},{variant:"pill",size:"md",className:"h-8 p-0.5"},{variant:"pill",size:"lg",className:"h-10 p-1"},{variant:"underlined",size:"sm",className:"gap-3"},{variant:"underlined",size:"md",className:"gap-4"},{variant:"underlined",size:"lg",className:"gap-6"}],defaultVariants:{variant:"pill",size:"md"}}),uu=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{pill:"rounded-md data-[state=active]:bg-background data-[state=active]:text-foreground",underlined:"rounded-none bg-transparent border-b-2 border-transparent -mb-px hover:text-foreground data-[state=active]:border-primary data-[state=active]:text-primary"},size:{sm:"text-[11px] gap-1 [&_svg]:size-3",md:"text-xs gap-1.5 [&_svg]:size-3.5",lg:"text-sm gap-2 [&_svg]:size-4"}},compoundVariants:[{variant:"pill",size:"sm",className:"h-6 px-1.5"},{variant:"pill",size:"md",className:"h-7 px-2"},{variant:"pill",size:"lg",className:"h-8 px-2.5"},{variant:"underlined",size:"sm",className:"pb-1.5 pt-1 px-1"},{variant:"underlined",size:"md",className:"pb-2 pt-1.5 px-1.5"},{variant:"underlined",size:"lg",className:"pb-2.5 pt-2 px-2"}],defaultVariants:{variant:"pill",size:"md"}}),Hl=S__namespace.forwardRef(({className:e,size:t="md",variant:o="pill",children:r,...n},a)=>S__namespace.createElement(Al.Provider,{value:{size:t??"md",variant:o??"pill"}},S__namespace.createElement(vt__namespace.List,{ref:a,className:s(mu({size:t,variant:o}),e),...n},r)));Hl.displayName=vt__namespace.List.displayName;var Il=S__namespace.forwardRef(({className:e,size:t,variant:o,tooltip:r,...n},a)=>{let l=S__namespace.useContext(Al),p=t??l.size,i=o??l.variant,c=n["aria-label"]??(typeof r=="string"?r:void 0),d=S__namespace.createElement(vt__namespace.Trigger,{ref:a,className:s(uu({size:p,variant:i}),e),"aria-label":c,...n});return r?S__namespace.createElement(lo,null,S__namespace.createElement(co,{asChild:true},d),S__namespace.createElement(qt,null,r)):d});Il.displayName=vt__namespace.Trigger.displayName;var Fl=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement(vt__namespace.Content,{ref:o,className:s("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Fl.displayName=vt__namespace.Content.displayName;var Bl=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement("textarea",{className:s("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));Bl.displayName="Textarea";var zl=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ol=S__namespace.forwardRef(({className:e,variant:t,size:o,...r},n)=>S__namespace.createElement(Va__namespace.Root,{ref:n,className:s(zl({variant:t,size:o,className:e})),...r}));Ol.displayName=Va__namespace.Root.displayName;var _l=S__namespace.createContext("md"),fu=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-lg bg-muted text-muted-foreground",{variants:{size:{sm:"h-7 p-0.5",md:"h-8 p-0.5",lg:"h-10 p-1"}},defaultVariants:{size:"md"}}),hu=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 data-[state=on]:bg-background data-[state=on]:text-foreground",{variants:{size:{sm:"h-6 px-1.5 text-[11px] gap-1 [&_svg]:size-3",md:"h-7 px-2 text-xs gap-1.5 [&_svg]:size-3.5",lg:"h-8 px-2.5 text-sm gap-2 [&_svg]:size-4"}},defaultVariants:{size:"md"}}),Gl=S__namespace.forwardRef(({className:e,size:t="md",children:o,...r},n)=>S__namespace.createElement(_l.Provider,{value:t??"md"},S__namespace.createElement(Mo__namespace.Root,{ref:n,className:s(fu({size:t}),e),...r},o)));Gl.displayName=Mo__namespace.Root.displayName;var Wl=S__namespace.forwardRef(({className:e,size:t,tooltip:o,tooltipSide:r="top",tooltipDelay:n,"aria-label":a,...l},p)=>{let i=S__namespace.useContext(_l),c=t??i,d=a??(typeof o=="string"?o:void 0),m=S__namespace.createElement(Mo__namespace.Item,{ref:p,className:s(hu({size:c}),e),"aria-label":d,...l});return o==null?m:S__namespace.createElement(lo,{delayDuration:n},S__namespace.createElement(co,{asChild:true},S__namespace.createElement("span",{className:"inline-flex"},m)),S__namespace.createElement(qt,{side:r},o))});Wl.displayName=Mo__namespace.Item.displayName;var vu=classVarianceAuthority.cva("grid items-center w-full gap-3 [grid-template-columns:auto_1fr_auto]",{variants:{position:{top:"border-b border-border",bottom:"border-t border-border",inline:""},variant:{default:"bg-background",subtle:"bg-muted/30",transparent:"bg-transparent"},size:{sm:"min-h-10 px-3",md:"min-h-12 px-4",lg:"min-h-14 px-6"},sticky:{true:"",false:""}},compoundVariants:[{sticky:true,position:"top",className:"sticky top-0 z-20"},{sticky:true,position:"bottom",className:"sticky bottom-0 z-20"}],defaultVariants:{position:"top",variant:"default",size:"md",sticky:false}}),Ul=S__namespace.forwardRef(({className:e,position:t,variant:o,size:r,sticky:n,leading:a,center:l,trailing:p,children:i,"aria-label":c,...d},m)=>{let g=i==null;return S__namespace.createElement("div",{ref:m,role:"toolbar","aria-label":c??"Toolbar","data-gds-part":"toolbar","data-position":t??"top",className:s(vu({position:t,variant:o,size:r,sticky:n}),e),...d},g?S__namespace.createElement(S__namespace.Fragment,null,S__namespace.createElement("div",{"data-gds-part":"toolbar-leading",className:"flex items-center min-w-0"},a),S__namespace.createElement("div",{"data-gds-part":"toolbar-center",className:"flex items-center min-w-0 justify-center"},l),S__namespace.createElement("div",{"data-gds-part":"toolbar-trailing",className:"flex items-center min-w-0 justify-end"},p)):i)});Ul.displayName="Toolbar";var jl=S__namespace.forwardRef(({className:e,align:t="leading",...o},r)=>S__namespace.createElement("div",{ref:r,"data-gds-part":`toolbar-${t}`,className:s("flex items-center min-w-0",t==="center"&&"justify-center",t==="trailing"&&"justify-end",e),...o}));jl.displayName="ToolbarSlot";var Kl=S__namespace.createContext(null),_a=S__namespace.createContext(0);function ql(){return S__namespace.useContext(_a)}function sr(e){let t=S__namespace.useContext(Kl);if(!t)throw new Error(`<${e}> must be rendered inside a <Sidebar> root.`);return t}var Yt=S__namespace.forwardRef(({collapsed:e,defaultCollapsed:t=false,onCollapsedChange:o,collapsible:r=true,variant:n="rail",className:a,style:l,children:p,...i},c)=>{let d=e!==void 0,[m,g]=S__namespace.useState(t),u=d?e:m,b=n==="panel",h=()=>{let f=!u;d||g(f),o?.(f);};return S__namespace.createElement(Oa,{delayDuration:0},S__namespace.createElement(Kl.Provider,{value:{collapsed:u}},S__namespace.createElement("aside",{ref:c,"data-gds-part":"sidebar","data-collapsed":u||void 0,"data-variant":n,className:s("relative flex h-full flex-col bg-card text-card-foreground",b?"w-full border border-border rounded-lg overflow-hidden":"border-r border-border transition-[width] duration-200 ease-out",a),style:b?l:{width:u?"var(--gds-sidebar-collapsed-width, 4rem)":"var(--gds-sidebar-width, 16rem)",...l},...i},p,r&&!b&&S__namespace.createElement("button",{type:"button",onClick:h,"aria-label":u?"Expand sidebar":"Collapse sidebar","data-gds-part":"sidebar-collapse-toggle",className:s("absolute -right-3 top-6 z-10 flex h-6 w-6 items-center justify-center","rounded-full border border-border bg-card text-muted-foreground shadow-sm","hover:text-foreground hover:bg-muted transition-colors")},u?S__namespace.createElement(lucideReact.ChevronRight,{className:"h-3 w-3"}):S__namespace.createElement(lucideReact.ChevronLeft,{className:"h-3 w-3"})))))});Yt.displayName="Sidebar";var Wa=S__namespace.forwardRef(({className:e,...t},o)=>{let{collapsed:r}=sr("SidebarHeader");return S__namespace.createElement("div",{ref:o,"data-gds-part":"sidebar-header","data-collapsed":r||void 0,className:s("flex shrink-0 items-center border-b border-border",r?"justify-center px-2":"px-3","h-[var(--gds-sidebar-header-height,3.25rem)]",e),...t})});Wa.displayName="SidebarHeader";var Ua=S__namespace.forwardRef(({className:e,...t},o)=>S__namespace.createElement("nav",{ref:o,"data-gds-part":"sidebar-content",className:s("flex-1 overflow-y-auto overflow-x-hidden","py-[var(--gds-sidebar-content-py,0.5rem)]",e),...t}));Ua.displayName="SidebarContent";var ja=S__namespace.forwardRef(({className:e,...t},o)=>{let{collapsed:r}=sr("SidebarFooter");return S__namespace.createElement("div",{ref:o,"data-gds-part":"sidebar-footer","data-collapsed":r||void 0,className:s("shrink-0 border-t border-border",r?"px-2 py-2":"px-3 py-2",e),...t})});ja.displayName="SidebarFooter";var $a=S__namespace.forwardRef(({title:e,icon:t,trailing:o,collapsible:r=true,defaultExpanded:n=true,className:a,children:l,...p},i)=>{let{collapsed:c}=sr("SidebarSection"),[d,m]=S__namespace.useState(n),g=!!e&&r;return c?S__namespace.createElement("div",{ref:i,"data-gds-part":"sidebar-section",className:s("px-[var(--gds-sidebar-section-px,0.5rem)] space-y-[var(--gds-sidebar-section-gap,0.125rem)]",a),...p},l):S__namespace.createElement("div",{ref:i,"data-gds-part":"sidebar-section",className:s("px-[var(--gds-sidebar-section-px,0.5rem)] pb-1",a),...p},e&&(g?S__namespace.createElement("div",{className:s("group/header flex w-full items-center gap-1 rounded-md px-2 py-1.5 text-xs font-medium uppercase tracking-wide","text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors")},S__namespace.createElement("button",{type:"button",onClick:()=>m(u=>!u),"aria-expanded":d,className:"flex flex-1 items-center gap-2 text-left min-w-0"},t,S__namespace.createElement("span",{className:"flex-1 text-left normal-case truncate"},e),d?S__namespace.createElement(lucideReact.ChevronDown,{className:"h-3 w-3 shrink-0",strokeWidth:1.5}):S__namespace.createElement(lucideReact.ChevronRight,{className:"h-3 w-3 shrink-0",strokeWidth:1.5})),o&&S__namespace.createElement("span",{className:"flex items-center shrink-0",onClick:u=>u.stopPropagation(),onKeyDown:u=>u.stopPropagation()},o)):S__namespace.createElement("div",{className:s("flex items-center gap-2 px-2 py-1.5 text-xs font-medium uppercase tracking-wide","text-muted-foreground")},t,S__namespace.createElement("span",{className:"flex-1 truncate"},e),o&&S__namespace.createElement("span",{className:"shrink-0"},o))),d&&S__namespace.createElement("div",{className:s("mt-[var(--gds-sidebar-section-gap,0.125rem)]","space-y-[var(--gds-sidebar-section-gap,0.125rem)]")},l))});$a.displayName="SidebarSection";var Ka=S__namespace.forwardRef(({icon:e,badge:t,active:o=false,asButton:r=false,asChild:n=false,disabled:a=false,collapsedLabel:l,size:p="md",description:i,className:c,children:d,...m},g)=>{let{collapsed:u}=sr("SidebarItem"),b=ql(),h=!u&&b>0?{paddingLeft:`calc(0.5rem + ${b} * var(--gds-sidebar-tree-indent, 1.5rem))`}:void 0,f=p==="sm",y=f?"text-xs px-2 py-1":"text-sm px-2 py-1.5",R=f&&!o?"font-normal":"font-medium",x=o?"bg-primary/10 text-primary":f?"text-muted-foreground hover:bg-muted hover:text-foreground":"text-foreground/80 hover:bg-muted hover:text-foreground",k=!u&&i!=null,T=s("group flex items-center gap-2.5 rounded-md transition-colors",y,R,k&&(f?"py-1.5":"py-2"),u?"justify-center px-2 py-2":null,x,a&&"opacity-50 pointer-events-none",c),O=k?S__namespace.createElement("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5 text-left leading-tight"},S__namespace.createElement("span",{className:"truncate"},d),S__namespace.createElement("span",{className:s("truncate font-normal text-muted-foreground",f?"text-[10px]":"text-[11px]")},i)):S__namespace.createElement("span",{className:"flex-1 truncate text-left"},d),D=S__namespace.createElement(S__namespace.Fragment,null,e&&S__namespace.createElement("span",{className:"shrink-0 [&>svg]:h-4 [&>svg]:w-4","aria-hidden":true},e),!u&&O,!u&&t!==void 0&&t!==null&&S__namespace.createElement("span",{className:"ml-auto inline-flex items-center justify-center rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground"},t)),E;if(n)E=S__namespace.createElement(reactSlot.Slot,{"data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,className:T,style:h},d);else if(r){let{href:H,target:F,rel:j,download:N,hrefLang:X,ping:L,referrerPolicy:Y,type:v,...W}=m;E=S__namespace.createElement("button",{type:"button","data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,disabled:a,className:s(T,"w-full text-left"),style:h,...W},D);}else E=S__namespace.createElement("a",{ref:g,"data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,"aria-disabled":a||void 0,className:T,style:h,...m},D);if(!u)return E;let $=l??(typeof d=="string"?d:null);return $?S__namespace.createElement(lo,null,S__namespace.createElement(co,{asChild:true},E),S__namespace.createElement(qt,{side:"right",sideOffset:8},$,t!=null&&S__namespace.createElement("span",{className:"ml-2 inline-flex items-center justify-center rounded bg-foreground/10 px-1.5 py-0 text-[10px]"},t))):E});Ka.displayName="SidebarItem";var qa=S__namespace.forwardRef(function({label:t,icon:o,badge:r,active:n=false,defaultExpanded:a=true,expanded:l,onExpandedChange:p,disabled:i,description:c,trailing:d,className:m,style:g,children:u,...b},h){let{collapsed:f}=sr("SidebarTreeItem"),y=ql(),R=l!==void 0,[x,k]=S__namespace.useState(a),T=R?l:x,O=()=>{let E=!T;R||k(E),p?.(E);};if(f)return S__namespace.createElement(_a.Provider,{value:y},u);let D=y*1.5;return S__namespace.createElement("div",{"data-gds-part":"sidebar-tree-item"},S__namespace.createElement("div",{className:"group/row relative"},S__namespace.createElement("button",{ref:h,type:"button",onClick:O,"aria-expanded":T,"aria-current":n?"page":void 0,"data-active":n||void 0,disabled:i,className:s("group flex w-full items-center gap-1.5 rounded-md py-1 text-sm font-medium transition-colors",n?"bg-primary/10 text-primary":"text-foreground/80 hover:bg-muted hover:text-foreground",i&&"opacity-50 pointer-events-none",d!=null&&"pr-12",m),style:{paddingLeft:`calc(0.25rem + ${D}rem)`,paddingRight:d!=null?"3rem":"0.5rem",...g},...b},S__namespace.createElement("span",{className:"inline-flex h-4 w-4 items-center justify-center text-muted-foreground shrink-0","aria-hidden":true},T?S__namespace.createElement(lucideReact.ChevronDown,{className:"h-3 w-3"}):S__namespace.createElement(lucideReact.ChevronRight,{className:"h-3 w-3"})),o&&S__namespace.createElement("span",{className:"shrink-0 [&>svg]:h-4 [&>svg]:w-4","aria-hidden":true},o),c!=null?S__namespace.createElement("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5 text-left leading-tight"},S__namespace.createElement("span",{className:"truncate"},t),S__namespace.createElement("span",{className:"truncate text-[11px] font-normal text-muted-foreground"},c)):S__namespace.createElement("span",{className:"flex-1 truncate text-left"},t),r!=null&&S__namespace.createElement("span",{className:"ml-auto inline-flex items-center justify-center rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground"},r)),d!=null&&S__namespace.createElement("div",{onClick:E=>E.stopPropagation(),className:"pointer-events-auto absolute inset-y-0 right-1.5 flex items-center gap-0.5"},d)),T&&u&&S__namespace.createElement(_a.Provider,{value:y+1},S__namespace.createElement("div",{className:"space-y-[var(--gds-sidebar-section-gap,0.125rem)]"},u)))});qa.displayName="SidebarTreeItem";Yt.Header=Wa;Yt.Content=Ua;Yt.Footer=ja;Yt.Section=$a;Yt.Item=Ka;Yt.TreeItem=qa;var Zt=[50,100,200,300,400,500,600,700,800,900,950],Yl=[.985,.955,.895,.82,.72,.61,.51,.415,.325,.245,.17],wu=[.015,.04,.075,.11,.14,.17,.17,.15,.12,.08,.04];function qr({hue:e,chromaScale:t=1}){let o=(e%360+360)%360,r={};for(let n=0;n<Zt.length;n++){let a=Yl[n],l=wu[n]*t;r[Zt[n]]=`${a.toFixed(4)} ${l.toFixed(4)} ${o.toFixed(2)}`;}return r}function Zl(){let e={};for(let t=0;t<Zt.length;t++){let o=Yl[t];e[Zt[t]]=`${o.toFixed(4)} 0 0`;}return e}var Ya={light:{destructive:"0.560 0.220 27.0",destructiveFg:"0.990 0.005 27.0",success:"0.610 0.180 145.0",warning:"0.720 0.180 60.0",info:"0.580 0.200 240.0",highlight:"0.860 0.180 95.0"},dark:{destructive:"0.680 0.220 27.0",destructiveFg:"0.990 0.005 27.0",success:"0.720 0.180 145.0",warning:"0.800 0.180 60.0",info:"0.700 0.200 240.0",highlight:"0.880 0.180 95.0"}},lr="1 0 0",Xl="0 0 0";function No(e,t){let[,o,r]=e.split(/\s+/).map(d=>d.trim()),n=Number(o),a=r;if(t==="light"){let m=Math.min(n*.22,.045),g=.38,u=n;return {soft:`${.965.toFixed(3)} ${m.toFixed(3)} ${a}`,deep:`${g.toFixed(3)} ${u.toFixed(3)} ${a}`}}let l=.22,p=Math.min(n*.45,.075),i=.82,c=n*.9;return {soft:`${l.toFixed(3)} ${p.toFixed(3)} ${a}`,deep:`${i.toFixed(3)} ${c.toFixed(3)} ${a}`}}var Yr={geist:"var(--font-geist), system-ui, sans-serif",inter:"var(--font-inter), system-ui, sans-serif",manrope:"var(--font-manrope), system-ui, sans-serif",figtree:"var(--font-figtree), system-ui, sans-serif",dmSans:"var(--font-dm-sans), system-ui, sans-serif",lexend:"var(--font-lexend), system-ui, sans-serif",outfit:"var(--font-outfit), system-ui, sans-serif",plusJakarta:"var(--font-plus-jakarta), system-ui, sans-serif",spaceGrotesk:"var(--font-space-grotesk), system-ui, sans-serif",fraunces:"var(--font-fraunces), Georgia, serif",instrumentSerif:"var(--font-instrument-serif), Georgia, serif",sourceSerif:"var(--font-source-serif), Georgia, serif",jetbrainsMono:"var(--font-jetbrains-mono), ui-monospace, monospace",geistMono:"var(--font-geist-mono), ui-monospace, monospace",ibmPlexMono:"var(--font-ibm-plex-mono), ui-monospace, monospace",system:"system-ui, -apple-system, sans-serif",serif:"Georgia, 'Times New Roman', serif",mono:"ui-monospace, Menlo, monospace"};var Ru=["superLight","light","dark","superDark"],Su={muted:.6,default:1,vibrant:1.3};function Cu(e,t,o){let r=t.primary*o,n=t.accent*o,a=(r+n)/2*.8,l=p=>(p%360+360)%360;return {1:`0.600 ${(.17*r).toFixed(4)} ${e.primary.toFixed(2)}`,2:`0.640 ${(.17*a).toFixed(4)} ${l(e.primary+140).toFixed(2)}`,3:`0.580 ${(.17*a).toFixed(4)} ${l(e.primary+220).toFixed(2)}`,4:`0.510 0.0250 ${e.neutral.toFixed(2)}`,5:`0.620 ${(.17*n).toFixed(4)} ${e.accent.toFixed(2)}`}}var G=e=>({source:"neutral",step:e}),lt=e=>({source:"primary",step:e}),Xt=e=>({source:"accent",step:e}),dr=e=>({source:"pure",value:e}),ku={superLight:{background:G(50),foreground:G(800),card:dr(lr),cardForeground:G(800),popover:dr(lr),popoverForeground:G(800),primary:lt(600),primaryForeground:lt(50),secondary:G(100),secondaryForeground:G(700),muted:G(100),mutedForeground:G(500),accent:Xt(600),accentForeground:Xt(50),border:G(200),input:G(200),ring:lt(500)},light:{background:G(50),foreground:G(950),card:dr(lr),cardForeground:G(950),popover:dr(lr),popoverForeground:G(950),primary:lt(500),primaryForeground:lt(50),secondary:G(100),secondaryForeground:G(700),muted:G(100),mutedForeground:G(500),accent:Xt(500),accentForeground:Xt(50),border:G(200),input:G(200),ring:lt(500)},dark:{background:G(950),foreground:G(50),card:G(900),cardForeground:G(50),popover:G(900),popoverForeground:G(50),primary:lt(400),primaryForeground:lt(950),secondary:G(800),secondaryForeground:G(200),muted:G(800),mutedForeground:G(400),accent:Xt(400),accentForeground:Xt(950),border:G(800),input:G(800),ring:lt(400)},superDark:{background:dr(Xl),foreground:G(100),card:G(950),cardForeground:G(100),popover:G(950),popoverForeground:G(100),primary:lt(300),primaryForeground:lt(950),secondary:G(900),secondaryForeground:G(300),muted:G(900),mutedForeground:G(500),accent:Xt(300),accentForeground:Xt(950),border:G(900),input:G(900),ring:lt(300)}};function Ae(e,t){return e.source==="pure"?e.value:t[e.source][e.step]}function Tu(e,t){let o=ku[t],r=t==="superLight"||t==="light",n=r?Ya.light:Ya.dark;return {background:Ae(o.background,e),foreground:Ae(o.foreground,e),card:Ae(o.card,e),cardForeground:Ae(o.cardForeground,e),popover:Ae(o.popover,e),popoverForeground:Ae(o.popoverForeground,e),primary:Ae(o.primary,e),primaryForeground:Ae(o.primaryForeground,e),secondary:Ae(o.secondary,e),secondaryForeground:Ae(o.secondaryForeground,e),muted:Ae(o.muted,e),mutedForeground:Ae(o.mutedForeground,e),accent:Ae(o.accent,e),accentForeground:Ae(o.accentForeground,e),border:Ae(o.border,e),input:Ae(o.input,e),ring:Ae(o.ring,e),destructive:n.destructive,destructiveForeground:n.destructiveFg,success:n.success,warning:n.warning,info:n.info,highlight:n.highlight,...(()=>{let a=r?"light":"dark",l=No(n.destructive,a),p=No(n.success,a),i=No(n.warning,a),c=No(n.info,a),d=No(n.highlight,a);return {destructiveSoft:l.soft,destructiveDeep:l.deep,successSoft:p.soft,successDeep:p.deep,warningSoft:i.soft,warningDeep:i.deep,infoSoft:c.soft,infoDeep:c.deep,highlightSoft:d.soft,highlightDeep:d.deep}})()}}var Ft={display:3.75,h1:2.5,h2:2,h3:1.5,h4:1.25,h5:1.125,h6:1,body:1,bodySm:.875},Pu={compact:.85,default:1,spacious:1.18};function Mu(e){let t=Pu[e.scale],o=r=>`${(r*t).toFixed(3)}rem`;return {fontSans:Yr[e.body],fontMono:Yr[e.mono],fontDisplay:Yr[e.display],headingWeight:e.headingWeight??600,bodyWeight:e.bodyWeight??400,headingTracking:e.headingTracking??"-0.01em",scale:{display:o(Ft.display),h1:o(Ft.h1),h2:o(Ft.h2),h3:o(Ft.h3),h4:o(Ft.h4),h5:o(Ft.h5),h6:o(Ft.h6),body:o(Ft.body),bodySm:o(Ft.bodySm)}}}var Nu={sharp:0,subtle:.25,soft:.5,round:.875,pill:1.25};function Eu(e){let t=Nu[e.style],o=r=>`${r.toFixed(3)}rem`;return {base:o(t),sm:o(Math.max(0,t-.25)),md:o(t),lg:o(t+.25),xl:o(t+.5),"2xl":o(t+1),full:"9999px"}}var Lu={tight:.85,default:1,roomy:1.2};function Du(e){return {baseUnit:"1rem",densityFactor:Lu[e.density]}}var Au={none:{sm:"none",md:"none",lg:"none",xl:"none","2xl":"none",inner:"none"},subtle:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.03)",md:"0 2px 4px -1px rgb(0 0 0 / 0.04), 0 1px 2px -1px rgb(0 0 0 / 0.03)",lg:"0 6px 14px -2px rgb(0 0 0 / 0.05)",xl:"0 12px 24px -4px rgb(0 0 0 / 0.06)","2xl":"0 24px 48px -12px rgb(0 0 0 / 0.12)",inner:"inset 0 1px 2px 0 rgb(0 0 0 / 0.03)"},default:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},dramatic:{sm:"0 2px 4px 0 rgb(0 0 0 / 0.12)",md:"0 8px 16px -2px rgb(0 0 0 / 0.18), 0 4px 8px -4px rgb(0 0 0 / 0.12)",lg:"0 20px 32px -4px rgb(0 0 0 / 0.22), 0 8px 16px -8px rgb(0 0 0 / 0.18)",xl:"0 32px 48px -6px rgb(0 0 0 / 0.28), 0 12px 24px -10px rgb(0 0 0 / 0.22)","2xl":"0 48px 80px -16px rgb(0 0 0 / 0.45)",inner:"inset 0 4px 8px 0 rgb(0 0 0 / 0.1)"}};function Hu(e){let t=e?.shadows??"default",o=e?.motionIntensity??1,r=n=>`${Math.round(n*o)}ms`;return {shadows:Au[t],motion:{fast:r(150),base:r(200),slow:r(300),slower:r(500)},borderWidth:e?.borderWidth??"1px"}}function po(e){let t=Su[e.intensity??"default"],o=e.neutralPureGray??false,r=(e.chroma?.neutral??.08)*t,n=(e.chroma?.primary??1)*t,a=(e.chroma?.accent??1)*t,l=o?Zl():qr({hue:e.hues.neutral,chromaScale:r}),p=qr({hue:e.hues.primary,chromaScale:n}),i=qr({hue:e.hues.accent,chromaScale:a}),c={neutral:l,primary:p,accent:i},d=Cu(e.hues,{primary:n,accent:a},t),m=Object.fromEntries(Ru.map(y=>[y,Tu(c,y)])),g=Mu(e.typography),u=Eu(e.radius),b=Du(e.spacing),h=Hu(e.effects),f={buttonShape:e.components?.buttonShape??"default",inputStyle:e.components?.inputStyle??"outlined",cardStyle:e.components?.cardStyle??"flat"};return {id:e.id,name:e.name,description:e.description,tagline:e.tagline,input:e,ramps:c,colors:m,chart:d,typography:g,radius:u,spacing:b,effects:h,components:f}}var cr={id:"calm",name:"Calm",description:"Warm neutrals, terracotta primary, serif typography.",tagline:"Signature",hues:{neutral:40,primary:20,accent:40},chroma:{neutral:.15,primary:.75,accent:.8},intensity:"muted",typography:{display:"fraunces",body:"fraunces",mono:"jetbrainsMono",scale:"default",headingWeight:600,headingTracking:"-0.02em"},spacing:{density:"roomy"},radius:{style:"round"},effects:{shadows:"subtle",motionIntensity:1.25},components:{buttonShape:"pill",inputStyle:"outlined",cardStyle:"outlined"}},Za={id:"energy",name:"Energy",description:"Teal + indigo \u2014 punchy, cool-tone, modern sans.",tagline:"Alternate",hues:{neutral:175,primary:175,accent:235},chroma:{neutral:.08,primary:1,accent:1},intensity:"vibrant",typography:{display:"geist",body:"geist",mono:"geistMono",scale:"default",headingWeight:600},spacing:{density:"default"},radius:{style:"soft"},effects:{shadows:"default",motionIntensity:1},components:{buttonShape:"default",inputStyle:"outlined",cardStyle:"flat"}},Zr=[cr,Za];function Iu(e){return {"--background":e.background,"--foreground":e.foreground,"--card":e.card,"--card-foreground":e.cardForeground,"--popover":e.popover,"--popover-foreground":e.popoverForeground,"--primary":e.primary,"--primary-foreground":e.primaryForeground,"--secondary":e.secondary,"--secondary-foreground":e.secondaryForeground,"--muted":e.muted,"--muted-foreground":e.mutedForeground,"--accent":e.accent,"--accent-foreground":e.accentForeground,"--destructive":e.destructive,"--destructive-foreground":e.destructiveForeground,"--border":e.border,"--input":e.input,"--ring":e.ring,"--success":e.success,"--warning":e.warning,"--info":e.info,"--highlight":e.highlight,"--destructive-soft":e.destructiveSoft,"--destructive-deep":e.destructiveDeep,"--success-soft":e.successSoft,"--success-deep":e.successDeep,"--warning-soft":e.warningSoft,"--warning-deep":e.warningDeep,"--info-soft":e.infoSoft,"--info-deep":e.infoDeep,"--highlight-soft":e.highlightSoft,"--highlight-deep":e.highlightDeep}}function Ja(e,t){let o=e.colors[t];return {...Iu(o),...Xa("neutral",e.ramps.neutral),...Xa("primary",e.ramps.primary),...Xa("accent",e.ramps.accent),"--chart-1":e.chart[1],"--chart-2":e.chart[2],"--chart-3":e.chart[3],"--chart-4":e.chart[4],"--chart-5":e.chart[5],"--font-sans":e.typography.fontSans,"--font-mono":e.typography.fontMono,"--font-display":e.typography.fontDisplay,"--font-heading-weight":String(e.typography.headingWeight),"--font-body-weight":String(e.typography.bodyWeight),"--font-heading-tracking":e.typography.headingTracking,"--text-display":e.typography.scale.display,"--text-h1":e.typography.scale.h1,"--text-h2":e.typography.scale.h2,"--text-h3":e.typography.scale.h3,"--text-h4":e.typography.scale.h4,"--text-h5":e.typography.scale.h5,"--text-h6":e.typography.scale.h6,"--text-body":e.typography.scale.body,"--text-body-sm":e.typography.scale.bodySm,"--radius":e.radius.base,"--gds-radius-sm":e.radius.sm,"--gds-radius-md":e.radius.md,"--gds-radius-lg":e.radius.lg,"--gds-radius-xl":e.radius.xl,"--gds-radius-2xl":e.radius["2xl"],"--gds-radius-full":e.radius.full,"--gds-density":String(e.spacing.densityFactor),"--gds-shadow-sm":e.effects.shadows.sm,"--gds-shadow-md":e.effects.shadows.md,"--gds-shadow-lg":e.effects.shadows.lg,"--gds-shadow-xl":e.effects.shadows.xl,"--gds-shadow-2xl":e.effects.shadows["2xl"],"--gds-shadow-inner":e.effects.shadows.inner,"--gds-transition-fast":e.effects.motion.fast,"--gds-transition-base":e.effects.motion.base,"--gds-transition-slow":e.effects.motion.slow,"--gds-transition-slower":e.effects.motion.slower,"--gds-border-width":e.effects.borderWidth}}function Xa(e,t){let o={};for(let r of Zt)o[`--ramp-${e}-${r}`]=t[r];return o}function Xr(e,t){if(typeof document>"u")return;let o=document.documentElement,r=Ja(e,t);for(let[n,a]of Object.entries(r))o.style.setProperty(n,a);o.setAttribute("data-grade-theme",e.id),o.setAttribute("data-mode",t),o.setAttribute("data-button-shape",e.components.buttonShape??"default"),o.setAttribute("data-input-style",e.components.inputStyle??"outlined"),o.setAttribute("data-card-style",e.components.cardStyle??"flat");}function pr(e){if(typeof document>"u")return "";let t=document.createElement("span");t.style.color=`oklch(${e})`,t.style.position="absolute",t.style.visibility="hidden",document.body.appendChild(t);let o=getComputedStyle(t).color;document.body.removeChild(t);let r=o.match(/\d+/g);if(!r||r.length<3)return "";let[n,a,l]=r.slice(0,3).map(Number);return "#"+[n,a,l].map(p=>Math.max(0,Math.min(255,p)).toString(16).padStart(2,"0")).join("").toUpperCase()}function Fu(e){let t=e.trim().split(/\s+/);if(t.length<3)return {oklch:e,hex:""};let[o,r,n]=t.map(Number),a=`${o.toFixed(3)} ${r.toFixed(3)} ${Math.round(n)}`,l=pr(e);return {oklch:a,hex:l}}function Qa(e,t,o){let r=[`### ${e} ramp (hue ${Math.round(o)}\xB0)`,"","| Step | OKLCH | Hex |","|------|-------|-----|"];for(let n of Zt){let{oklch:a,hex:l}=Fu(t[n]);r.push(`| ${n} | \`${a}\` | \`${l||"\u2014"}\` |`);}return r.join(`
117
+ `)}function Jl(e,t){let o=[`### ${e}`,"","| Token | Usage | Light (hex) | Dark (hex) |","|-------|-------|-------------|------------|"];for(let r of t){let n=pr(r.light)||"\u2014",a=pr(r.dark)||"\u2014";o.push(`| \`--${r.token}\` | ${r.usage} | \`${n}\` (\`${r.light}\`) | \`${a}\` (\`${r.dark}\`) |`);}return o.join(`
118
+ `)}function Ql(e){return !e||e.input==null?"{}":JSON.stringify(e.input,null,2)??"{}"}function ed(e){let{input:t,ramps:o,colors:r,chart:n,typography:a,radius:l,spacing:p,effects:i,components:c}=e,d=t.intensity??"default",m=h=>({token:h,usage:Bu[h]??"",light:r.light[h],dark:r.dark[h]}),g=["background","foreground","card","cardForeground","popover","popoverForeground","primary","primaryForeground","secondary","secondaryForeground","muted","mutedForeground","accent","accentForeground","border","input","ring"].map(m),u=["destructive","destructiveForeground","success","warning","info","highlight"].map(m),b=[1,2,3,4,5].map(h=>{let f=n[h];return {slot:h,triplet:f,hex:pr(f)||"\u2014"}});return `# ${e.name} \u2014 Grade Design System Theme
66
119
 
67
120
  > **Portable theme spec.** Paste this entire file into a fresh LLM prompt along with your design brief. The model will have everything it needs to produce UI that matches this exact theme \u2014 colors, typography, spacing, shapes, and the "feel" we're after.
68
121
 
@@ -72,10 +125,10 @@ Use directly inside a Card or page section for section-scoped toolbars:
72
125
  - **ID**: \`${t.id}\`
73
126
  ${t.description?`- **Description**: ${t.description}
74
127
  `:""}- **Hues**: neutral \`${t.hues.neutral}\xB0\` \xB7 primary \`${t.hues.primary}\xB0\` \xB7 accent \`${t.hues.accent}\xB0\`
75
- - **Intensity**: \`${l}\` ${l==="muted"?"(quieter chroma across the board)":l==="vibrant"?"(punchier chroma across the board)":"(balanced)"}
128
+ - **Intensity**: \`${d}\` ${d==="muted"?"(quieter chroma across the board)":d==="vibrant"?"(punchier chroma across the board)":"(balanced)"}
76
129
  - **Typography**: ${t.typography.display} display \xB7 ${t.typography.body} body \xB7 ${t.typography.mono} mono \xB7 scale \`${t.typography.scale}\`
77
130
  - **Spacing density**: \`${t.spacing.density}\`
78
- - **Radius style**: \`${t.radius.style}\` (base \`${d.base}\`)
131
+ - **Radius style**: \`${t.radius.style}\` (base \`${l.base}\`)
79
132
  - **Button shape**: \`${c.buttonShape}\` \xB7 **Input style**: \`${c.inputStyle}\` \xB7 **Card style**: \`${c.cardStyle}\`
80
133
  - **Shadow preset**: \`${t.effects?.shadows??"default"}\` \xB7 **Motion intensity**: \`${t.effects?.motionIntensity??1}\`
81
134
 
@@ -92,30 +145,30 @@ A \`ThemeInput\` is a small object (three hues plus a handful of presets). The g
92
145
  ## Full ThemeInput (round-trippable)
93
146
 
94
147
  \`\`\`json
95
- ${Us(e)}
148
+ ${Ql(e)}
96
149
  \`\`\`
97
150
 
98
151
  ## Color ramps
99
152
 
100
153
  Three 11-stop OKLCH ramps, generated from the input hues + chromas + global intensity. Every color elsewhere in the theme resolves back to one of these stops.
101
154
 
102
- ${sa("Neutral",o.neutral,t.hues.neutral)}
155
+ ${Qa("Neutral",o.neutral,t.hues.neutral)}
103
156
 
104
- ${sa("Primary",o.primary,t.hues.primary)}
157
+ ${Qa("Primary",o.primary,t.hues.primary)}
105
158
 
106
- ${sa("Accent",o.accent,t.hues.accent)}
159
+ ${Qa("Accent",o.accent,t.hues.accent)}
107
160
 
108
161
  ## Semantic tokens (hue-derived)
109
162
 
110
163
  Purpose-based tokens drawn from the ramps. Two values per token \u2014 the generator produces them for all four brightness modes, but only light + dark are shown here for brevity.
111
164
 
112
- ${$s("Core semantic tokens",g)}
165
+ ${Jl("Core semantic tokens",g)}
113
166
 
114
167
  ## Fixed semantic tokens (not hue-derived)
115
168
 
116
169
  Status colors stay consistent across themes so users always read green as success, red as destructive, etc. Accessibility wins over brand cohesion.
117
170
 
118
- ${$s("Status colors",u)}
171
+ ${Jl("Status colors",u)}
119
172
 
120
173
  ## Chart palette
121
174
 
@@ -123,7 +176,7 @@ ${$s("Status colors",u)}
123
176
 
124
177
  | Slot | OKLCH | Hex |
125
178
  |------|-------|-----|
126
- ${b.map(f=>`| \`--chart-${f.slot}\` | \`${f.triplet}\` | \`${f.hex}\` |`).join(`
179
+ ${b.map(h=>`| \`--chart-${h.slot}\` | \`${h.triplet}\` | \`${h.hex}\` |`).join(`
127
180
  `)}
128
181
 
129
182
  ## Typography
@@ -155,27 +208,27 @@ ${b.map(f=>`| \`--chart-${f.slot}\` | \`${f.triplet}\` | \`${f.hex}\` |`).join(`
155
208
 
156
209
  | Step | Value |
157
210
  |------|-------|
158
- | \`--radius\` (base) | \`${d.base}\` |
159
- | \`--gds-radius-sm\` | \`${d.sm}\` |
160
- | \`--gds-radius-md\` | \`${d.md}\` |
161
- | \`--gds-radius-lg\` | \`${d.lg}\` |
162
- | \`--gds-radius-xl\` | \`${d.xl}\` |
163
- | \`--gds-radius-2xl\` | \`${d["2xl"]}\` |
164
- | \`--gds-radius-full\` | \`${d.full}\` |
211
+ | \`--radius\` (base) | \`${l.base}\` |
212
+ | \`--gds-radius-sm\` | \`${l.sm}\` |
213
+ | \`--gds-radius-md\` | \`${l.md}\` |
214
+ | \`--gds-radius-lg\` | \`${l.lg}\` |
215
+ | \`--gds-radius-xl\` | \`${l.xl}\` |
216
+ | \`--gds-radius-2xl\` | \`${l["2xl"]}\` |
217
+ | \`--gds-radius-full\` | \`${l.full}\` |
165
218
 
166
219
  ### Spacing
167
220
 
168
- - **Density factor**: \`${m.densityFactor}\` (applied as \`var(--gds-density)\` on components that opt in)
169
- - **Base unit**: \`${m.baseUnit}\`
221
+ - **Density factor**: \`${p.densityFactor}\` (applied as \`var(--gds-density)\` on components that opt in)
222
+ - **Base unit**: \`${p.baseUnit}\`
170
223
 
171
224
  ### Motion
172
225
 
173
226
  | Var | Duration |
174
227
  |-----|----------|
175
- | \`--gds-transition-fast\` | \`${s.motion.fast}\` |
176
- | \`--gds-transition-base\` | \`${s.motion.base}\` |
177
- | \`--gds-transition-slow\` | \`${s.motion.slow}\` |
178
- | \`--gds-transition-slower\` | \`${s.motion.slower}\` |
228
+ | \`--gds-transition-fast\` | \`${i.motion.fast}\` |
229
+ | \`--gds-transition-base\` | \`${i.motion.base}\` |
230
+ | \`--gds-transition-slow\` | \`${i.motion.slow}\` |
231
+ | \`--gds-transition-slower\` | \`${i.motion.slower}\` |
179
232
 
180
233
  ### Shadows
181
234
 
@@ -183,10 +236,10 @@ All shadows are applied via Tailwind's \`shadow-*\` utilities mapped to these va
183
236
 
184
237
  | Var | Value |
185
238
  |-----|-------|
186
- | \`--gds-shadow-sm\` | \`${s.shadows.sm}\` |
187
- | \`--gds-shadow-md\` | \`${s.shadows.md}\` |
188
- | \`--gds-shadow-lg\` | \`${s.shadows.lg}\` |
189
- | \`--gds-shadow-xl\` | \`${s.shadows.xl}\` |
239
+ | \`--gds-shadow-sm\` | \`${i.shadows.sm}\` |
240
+ | \`--gds-shadow-md\` | \`${i.shadows.md}\` |
241
+ | \`--gds-shadow-lg\` | \`${i.shadows.lg}\` |
242
+ | \`--gds-shadow-xl\` | \`${i.shadows.xl}\` |
190
243
 
191
244
  ## CSS variable conventions
192
245
 
@@ -244,7 +297,7 @@ Every component accepts a \`className\` for layout tweaks. Variants are passed v
244
297
 
245
298
  When generating UI in the ${e.name} theme, match this character:
246
299
 
247
- ${dp(e)}
300
+ ${zu(e)}
248
301
 
249
302
  ## Instructions for the generating LLM
250
303
 
@@ -263,7 +316,7 @@ To recreate this theme in code:
263
316
  \`\`\`ts
264
317
  import { generateTheme, applyThemeToRoot, type ThemeInput } from "@gradeui/ui";
265
318
 
266
- const input: ThemeInput = ${Us(e).replace(/\n/g,`
319
+ const input: ThemeInput = ${Ql(e).replace(/\n/g,`
267
320
  `)};
268
321
 
269
322
  const theme = generateTheme(input);
@@ -272,11 +325,11 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
272
325
 
273
326
  ---
274
327
  *Generated from Grade Design System v1 \xB7 ${new Date().toISOString()}*
275
- `}var lp={background:"Page / body background",foreground:"Primary text",card:"Elevated surface background",cardForeground:"Text on cards",popover:"Floating menu background",popoverForeground:"Text inside floating menus",primary:"Primary actions, links, default button",primaryForeground:"Text on primary-tinted fills",secondary:"Secondary surfaces + quiet buttons",secondaryForeground:"Text on secondary surfaces",muted:"Subtle surfaces (hover states, skeletons)",mutedForeground:"Secondary / less-important text",accent:"Highlights, hover accents",accentForeground:"Text on accent surfaces",border:"Default borders",input:"Form input borders",ring:"Focus ring color",destructive:"Destructive actions, errors",destructiveForeground:"Text on destructive surfaces",success:"Success states",warning:"Warning states",info:"Informational states",highlight:"Emphasis, new features, callouts"};function dp(e){let t=[],{input:o,components:r}=e;o.intensity==="muted"?t.push("- **Quiet and restrained.** Avoid heavy saturation, glowing effects, or loud contrast jumps. Let whitespace do the work."):o.intensity==="vibrant"?t.push("- **Loud and confident.** Primary color wants to lead. Use it on hero CTAs, key metrics, empty states. Don't be shy."):t.push("- **Balanced.** Neither shouty nor sleepy \u2014 a workhorse feel suited to product interfaces."),o.spacing.density==="roomy"?t.push("- **Generous spacing.** Stretch things out \u2014 reach for `gap-6`, `gap-8`, `p-6`, `p-8`. Airy is the vibe."):o.spacing.density==="tight"?t.push("- **Dense layouts.** Pack information in \u2014 `gap-2`, `gap-3`, `p-3`, `p-4`. Scan-friendly dashboard energy."):t.push("- **Standard density.** Use Tailwind's default spacing ladder."),o.radius.style==="pill"?t.push("- **Fully rounded.** Controls are pill-shaped. Use `rounded-full` on custom chips / pills too."):o.radius.style==="sharp"?t.push("- **Square corners.** Zero radius everywhere \u2014 very architectural. Do not add curves."):o.radius.style==="round"?t.push("- **Rounded and friendly.** Corner radius is noticeable (\u224814px base). Avoid sharp edges."):t.push("- **Standard rounded corners.**");let i=o.typography.display;return i==="fraunces"||i==="instrumentSerif"||i==="sourceSerif"?t.push("- **Editorial serif headings.** Treat headings like magazine titles \u2014 give them space and weight. Serifs reward larger sizes."):(i==="geist"||i==="inter")&&t.push("- **Modern technical sans.** Clean, functional, neutral. Good for product UIs."),r.cardStyle==="outlined"?t.push("- **Cards are outlined**, not shadowed. Rely on borders + spacing for hierarchy."):r.cardStyle==="elevated"?t.push("- **Cards have real elevation.** Use shadows to stack content visually."):r.cardStyle==="glass"&&t.push("- **Glass / frosted cards.** Use translucent surfaces over background imagery or gradients."),r.buttonShape==="pill"&&t.push("- **Buttons are pills** \u2014 don't override with square corners."),t.join(`
276
- `)}function la(e){if(typeof window>"u"||typeof document>"u")return;let t=js(e),o=new Blob([t],{type:"text/markdown;charset=utf-8"}),r=URL.createObjectURL(o),i=document.createElement("a");i.href=r,i.download=`grade-theme-${e.input.id}.md`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r);}var tt=Object.fromEntries(ir.map(e=>[e.id,Dt(e)])),Zt=ko.id;function At(e){if(e in tt)return tt[e];let t=ca(e);if(t)return Dt(t)}function da(){return [...Object.values(tt),...Ys()]}var Ks="grade-user-themes";function lr(){if(typeof localStorage>"u")return {};try{let e=localStorage.getItem(Ks);if(!e)return {};let t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return {}}}function qs(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(Ks,JSON.stringify(e));}catch{}}function Ys(){return Object.values(lr()).map(Dt)}function ca(e){return lr()[e]}function dr(e){let t=lr();return t[e.id]=e,qs(t),Dt(e)}function pa(e){if(e in tt)return;let t=lr();delete t[e],qs(t);}function cp(e,t,o){let r=tt[e]?.input??ca(e);if(!r)return;let i={...r,id:t,name:o};return dr(i),i}var ma="grade-theme",cr="grade-mode",Xs=["superLight","light","dark","superDark"],Zs=new Set(["dark","superDark"]),pp=`
328
+ `}var Bu={background:"Page / body background",foreground:"Primary text",card:"Elevated surface background",cardForeground:"Text on cards",popover:"Floating menu background",popoverForeground:"Text inside floating menus",primary:"Primary actions, links, default button",primaryForeground:"Text on primary-tinted fills",secondary:"Secondary surfaces + quiet buttons",secondaryForeground:"Text on secondary surfaces",muted:"Subtle surfaces (hover states, skeletons)",mutedForeground:"Secondary / less-important text",accent:"Highlights, hover accents",accentForeground:"Text on accent surfaces",border:"Default borders",input:"Form input borders",ring:"Focus ring color",destructive:"Destructive actions, errors",destructiveForeground:"Text on destructive surfaces",success:"Success states",warning:"Warning states",info:"Informational states",highlight:"Emphasis, new features, callouts"};function zu(e){let t=[],{input:o,components:r}=e;o.intensity==="muted"?t.push("- **Quiet and restrained.** Avoid heavy saturation, glowing effects, or loud contrast jumps. Let whitespace do the work."):o.intensity==="vibrant"?t.push("- **Loud and confident.** Primary color wants to lead. Use it on hero CTAs, key metrics, empty states. Don't be shy."):t.push("- **Balanced.** Neither shouty nor sleepy \u2014 a workhorse feel suited to product interfaces."),o.spacing.density==="roomy"?t.push("- **Generous spacing.** Stretch things out \u2014 reach for `gap-6`, `gap-8`, `p-6`, `p-8`. Airy is the vibe."):o.spacing.density==="tight"?t.push("- **Dense layouts.** Pack information in \u2014 `gap-2`, `gap-3`, `p-3`, `p-4`. Scan-friendly dashboard energy."):t.push("- **Standard density.** Use Tailwind's default spacing ladder."),o.radius.style==="pill"?t.push("- **Fully rounded.** Controls are pill-shaped. Use `rounded-full` on custom chips / pills too."):o.radius.style==="sharp"?t.push("- **Square corners.** Zero radius everywhere \u2014 very architectural. Do not add curves."):o.radius.style==="round"?t.push("- **Rounded and friendly.** Corner radius is noticeable (\u224814px base). Avoid sharp edges."):t.push("- **Standard rounded corners.**");let n=o.typography.display;return n==="fraunces"||n==="instrumentSerif"||n==="sourceSerif"?t.push("- **Editorial serif headings.** Treat headings like magazine titles \u2014 give them space and weight. Serifs reward larger sizes."):(n==="geist"||n==="inter")&&t.push("- **Modern technical sans.** Clean, functional, neutral. Good for product UIs."),r.cardStyle==="outlined"?t.push("- **Cards are outlined**, not shadowed. Rely on borders + spacing for hierarchy."):r.cardStyle==="elevated"?t.push("- **Cards have real elevation.** Use shadows to stack content visually."):r.cardStyle==="glass"&&t.push("- **Glass / frosted cards.** Use translucent surfaces over background imagery or gradients."),r.buttonShape==="pill"&&t.push("- **Buttons are pills** \u2014 don't override with square corners."),t.join(`
329
+ `)}function en(e){if(typeof window>"u"||typeof document>"u")return;let t=ed(e),o=new Blob([t],{type:"text/markdown;charset=utf-8"}),r=URL.createObjectURL(o),n=document.createElement("a");n.href=r,n.download=`grade-theme-${e.input.id}.md`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r);}var kt=Object.fromEntries(Zr.map(e=>[e.id,po(e)])),Eo=cr.id;function mo(e){if(e in kt)return kt[e];let t=on(e);if(t)return po(t)}function tn(){return [...Object.values(kt),...rd()]}var td="grade-user-themes";function Jr(){if(typeof localStorage>"u")return {};try{let e=localStorage.getItem(td);if(!e)return {};let t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return {}}}function od(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(td,JSON.stringify(e));}catch{}}function rd(){return Object.values(Jr()).map(po)}function on(e){return Jr()[e]}function Qr(e){let t=Jr();return t[e.id]=e,od(t),po(e)}function rn(e){if(e in kt)return;let t=Jr();delete t[e],od(t);}function Ou(e,t,o){let r=kt[e]?.input??on(e);if(!r)return;let n={...r,id:t,name:o};return Qr(n),n}var an="grade-theme",ea="grade-mode",nd=["superLight","light","dark","superDark"],ad=new Set(["dark","superDark"]),Vu=`
277
330
  (function() {
278
331
  try {
279
- var mode = localStorage.getItem('${cr}');
332
+ var mode = localStorage.getItem('${ea}');
280
333
  var valid = ['superLight','light','dark','superDark'];
281
334
  if (!mode || valid.indexOf(mode) === -1) {
282
335
  mode = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
@@ -285,11 +338,11 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
285
338
  document.documentElement.classList.add('dark');
286
339
  }
287
340
  document.documentElement.setAttribute('data-mode', mode);
288
- var themeId = localStorage.getItem('${ma}');
341
+ var themeId = localStorage.getItem('${an}');
289
342
  if (themeId) document.documentElement.setAttribute('data-grade-theme', themeId);
290
343
  } catch(e) {}
291
344
  })();
292
- `,ua=w__namespace.createContext(null);function mp({children:e,defaultTheme:t=Zt,defaultMode:o="light"}){let[r,i]=w__namespace.useState(t),[a,d]=w__namespace.useState(o),[m,s]=w__namespace.useState(0);w__namespace.useEffect(()=>{try{let f=localStorage.getItem(ma);f&&At(f)&&i(f);let h=localStorage.getItem(cr);if(h&&Xs.includes(h))d(h);else if(typeof window<"u"){let P=window.matchMedia("(prefers-color-scheme: dark)").matches;d(P?"dark":"light");}}catch{}},[]),w__namespace.useEffect(()=>{let f=At(r)??At(Zt);f&&(sr(f,a),typeof document<"u"&&document.documentElement.classList.toggle("dark",Zs.has(a)));},[r,a,m]),w__namespace.useEffect(()=>{if(typeof window>"u")return;let f=window.matchMedia("(prefers-color-scheme: dark)"),h=P=>{try{if(localStorage.getItem(cr))return}catch{return}d(P.matches?"dark":"light");};return f.addEventListener("change",h),()=>f.removeEventListener("change",h)},[]);let c=w__namespace.useCallback(f=>{i(f);try{localStorage.setItem(ma,f);}catch{}},[]),l=w__namespace.useCallback(f=>{d(f);try{localStorage.setItem(cr,f);}catch{}},[]),p=w__namespace.useCallback(f=>{dr(f),s(h=>h+1),c(f.id);},[c]),g=w__namespace.useCallback(f=>{f in tt||(pa(f),s(h=>h+1),i(h=>h===f?Zt:h));},[]),u=w__namespace.useCallback(()=>{s(f=>f+1);},[]),b=w__namespace.useMemo(()=>{let f=At(r)??At(Zt);return {theme:f,themeId:f.id,mode:a,isDark:Zs.has(a),setThemeId:c,setMode:l,themes:da(),saveAndActivate:p,deleteTheme:g,refresh:u}},[r,a,m,c,l,p,g,u]);return w__namespace.createElement(ua.Provider,{value:b},e)}function ga(){let e=w__namespace.useContext(ua);if(!e)throw new Error("useGradeTheme must be used inside <GradeThemeProvider>. Wrap your app (typically in app/layout.tsx).");return e}function It(){return w__namespace.useContext(ua)}var fa=w__namespace.createContext(null);function Js(){return w__namespace.useContext(fa)}var Sp={maplibre:()=>Promise.resolve().then(()=>(al(),rl)).then(e=>e.createMaplibreAdapter),mapbox:()=>Promise.resolve().then(()=>(ll(),sl)).then(e=>e.createMapboxAdapter),google:()=>Promise.resolve().then(()=>(pl(),cl)).then(e=>e.createGoogleAdapter)},Cp=500,ha=w__namespace.forwardRef(function(t,o){let{center:r,zoom:i,bounds:a,appearance:d="auto",interactive:m=true,hoveredId:s,onHoveredIdChange:c,onLoad:l,onError:p,className:g,style:u,children:b,...f}=t,h=f.provider??"maplibre",P=f.styleUrl,S=f.tilerKey,R=f.accessToken,C=f.apiKey,k=f.mapId,B=w__namespace.useRef(null),H=w__namespace.useRef(null),I=w__namespace.useRef(new globalThis.Map),V=w__namespace.useRef(null),[Pe,ee]=w__namespace.useState(false),ye=w__namespace.useRef(c),G=w__namespace.useRef(p),ge=w__namespace.useRef(l);w__namespace.useEffect(()=>{ye.current=c,G.current=p,ge.current=l;});let we=It()?.isDark??false,v=d==="auto"?we?"dark":"light":d;w__namespace.useEffect(()=>{let D=false,te=B.current;if(!te)return;let Me=d==="auto"?we?"dark":"light":d;return (async()=>{try{let fe=await Sp[h]();if(D)return;let ne=await fe(te,{center:r,zoom:i,bounds:a,appearance:Me,interactive:m,styleUrl:P,tilerKey:S,accessToken:R,apiKey:C,mapId:k},{onLoad:()=>{},onError:he=>G.current?.(he),onMarkerHover:he=>ye.current?.(he),onMarkerClick:()=>{}});if(D){ne.destroy();return}H.current=ne,ee(!0),ge.current?.(ml(H,I));}catch(fe){if(D)return;fe?.code||G.current?.({code:"provider-init-failed",message:fe?.message??"Map init failed",cause:fe});}})(),()=>{D=true,H.current?.destroy(),H.current=null,ee(false),I.current.clear(),V.current=null;}},[h,P,R,C,k,S]),w__namespace.useEffect(()=>{H.current?.setAppearance(v);},[v]),w__namespace.useEffect(()=>{H.current?.setInteractive(m);},[m]),w__namespace.useEffect(()=>{H.current&&(a?H.current.setBounds(a[0],a[1]):(H.current.setCenter(r),H.current.setZoom(i)));},[r[0],r[1],i,a?.[0]?.[0],a?.[0]?.[1],a?.[1]?.[0],a?.[1]?.[1]]),w__namespace.useEffect(()=>{let D=V.current;D&&D!==s&&I.current.get(D)?.setHovered(false),s&&I.current.get(s)?.setHovered(true),V.current=s??null;},[s]),w__namespace.useImperativeHandle(o,()=>ml(H,I),[]);let O=w__namespace.useMemo(()=>({registerMarker:(D,te,Me)=>{let fe=H.current;if(!fe)return null;let ne=fe.addMarker(D,te,Me);I.current.set(D,ne),process.env.NODE_ENV!=="production"&&I.current.size===Cp+1&&console.warn(`@gradeui/ui Map: rendering ${I.current.size} markers. DOM markers degrade past ~1k. Consider clustering via the .instance escape hatch.`);let he=ne.remove;return ne.remove=()=>{he(),I.current.delete(D),V.current===D&&(V.current=null);},s===D&&ne.setHovered(true),ne}}),[Pe]);return w__namespace.createElement("div",{ref:B,"data-gds-part":"map",className:n("gds-map relative isolate overflow-hidden",g),style:{borderRadius:"var(--gds-map-radius, var(--radius, 0.5rem))",border:"var(--gds-map-border, 1px solid var(--border, transparent))",...u}},w__namespace.createElement(fa.Provider,{value:O},b))});ha.displayName="Map";function ml(e,t){let o=()=>{};return {flyTo:(r,i)=>{let a=e.current;if(!a)return;let d;if(typeof r=="string"){if(d=t.current.get(r)?.coords??null,!d){console.warn(`@gradeui/ui Map.flyTo: no marker registered with id "${r}".`);return}}else d=r;a.flyTo(d,i);},panTo:(r,i)=>e.current?.panTo(r,i)??o(),fitBounds:(r,i)=>e.current?.fitBounds(r,i)??o(),getCenter:()=>e.current?.getCenter()??[0,0],getZoom:()=>e.current?.getZoom()??0,getBounds:()=>e.current?.getBounds()??[[0,0],[0,0]],get instance(){return e.current?.instance??null}}}var ba=w__namespace.memo(function({id:t,at:o,anchor:r="bottom",className:i,children:a,onClick:d}){let m=Js(),[s,c]=w__namespace.useState(null),l=w__namespace.useRef(null),p=w__namespace.useRef(d);return w__namespace.useEffect(()=>{p.current=d;}),w__namespace.useEffect(()=>{if(!m)return;let g=m.registerMarker(t,o,r);if(g){l.current=g,c(g.element);let u=b=>{p.current?.({id:t,coords:g.coords,native:b});};return g.element.addEventListener("click",u),()=>{g.element.removeEventListener("click",u),g.remove(),l.current=null,c(null);}}},[m,t]),w__namespace.useEffect(()=>{l.current?.setPosition(o);},[o[0],o[1]]),s?reactDom.createPortal(w__namespace.createElement("div",{"data-gds-part":"map-marker-content",className:n("pointer-events-auto",i)},a),s):null});ba.displayName="MapMarker";var Op={video:"aspect-video",square:"aspect-square",portrait:"aspect-[3/4]",wide:"aspect-[21/9]",auto:""},Vp={none:"0",sm:"var(--radius, 0.25rem)",md:"calc(var(--radius, 0.375rem) * 1.25)",lg:"calc(var(--radius, 0.5rem) * 1.5)",xl:"calc(var(--radius, 0.75rem) * 2)"},_p={album:lucideReact.Disc3,"tv-show":lucideReact.Tv,movie:lucideReact.Clapperboard,game:lucideReact.Gamepad2,book:lucideReact.Book,portrait:lucideReact.User,landscape:lucideReact.Mountain,poster:lucideReact.Film,product:lucideReact.Package,food:lucideReact.UtensilsCrossed,video:lucideReact.Video,audio:lucideReact.Music,embed:lucideReact.Code2,"3d":lucideReact.Box,generic:lucideReact.Image},Wp={album:"square","tv-show":"portrait",movie:"portrait",game:"portrait",book:"portrait",portrait:"portrait",landscape:"wide",poster:"portrait",product:"square",food:"square",video:"video",audio:"video",embed:"video","3d":"square",generic:"video"};function $p(e){if(!e)return "";let t=/^(the|a|an|and|for|by|of|in|on|at|to)$/i,o=e.trim().split(/\s+/).filter(r=>r&&!t.test(r));return o.length===0?e.replace(/\s+/g,"").slice(0,2).toUpperCase():o.length===1?o[0].slice(0,2).toUpperCase():(o[0][0]+o[1][0]).toUpperCase()}function Up(e){return e<64?"sm":e>=160?"lg":"md"}var ot=w__namespace.forwardRef(({className:e,aspect:t,radius:o="lg",border:r=false,loading:i=false,onVisibilityChange:a,fallback:d,emptyState:m="auto",hint:s="generic",alt:c,source:l,src:p,glyph:g,overlay:u,instanceId:b,style:f,children:h,...P},S)=>{let R=w__namespace.useRef(null);w__namespace.useImperativeHandle(S,()=>R.current);let C=s,k=t,B=o,H=r,I=i,V=c,Pe=p,ee=m,ye=k??Wp[C];w__namespace.useEffect(()=>{if(!a||!R.current)return;let he=R.current,lt=new IntersectionObserver(([zt])=>a(zt.isIntersecting),{threshold:.05});return lt.observe(he),()=>lt.disconnect()},[a]);let G=!h&&ee!=="none",[ge,Ae]=w__namespace.useState("md");w__namespace.useEffect(()=>{if(!G)return;let he=R.current;if(!he)return;let lt=new ResizeObserver(([zt])=>{let Ho=zt.contentRect.width;Ae(Up(Ho));});return lt.observe(he),()=>lt.disconnect()},[G]);let we=w__namespace.useMemo(()=>$p(V),[V]),v=_p[C]??lucideReact.Image,O=ee==="auto"||ee==="icon",D=Pe,te=w__namespace.useMemo(()=>l?JSON.stringify(l):void 0,[l]),[Me,fe]=w__namespace.useState(false);w__namespace.useEffect(()=>{fe(false);},[D]);let ne=Me?void 0:D;return w__namespace.createElement("div",{ref:R,"data-gds-part":"media-surface","data-media-hint":C,"data-media-source-kind":l?.kind,"data-media-source":te,"data-media-alt":V,"data-gds-instance-id":b,className:n("gds-media-surface relative w-full overflow-hidden",Op[ye],H&&"border border-border",e),style:{borderRadius:`var(--gds-media-radius, ${Vp[B]})`,...f},...P},G&&w__namespace.createElement("div",{"data-gds-part":"media-surface-placeholder","data-tier":ge,className:"absolute inset-0 z-0 flex flex-col items-center justify-center gap-2 pointer-events-none px-3 text-center",style:{background:"var(--gds-media-placeholder-bg)",color:"var(--gds-media-placeholder-fg)"},"aria-hidden":true},O?ge==="sm"?we?w__namespace.createElement("span",{className:"font-semibold text-sm tracking-tight"},we):w__namespace.createElement(v,{className:"h-1/2 w-1/2 max-h-6 max-w-6"}):ge==="md"?w__namespace.createElement(w__namespace.Fragment,null,g??w__namespace.createElement(v,{className:"h-1/3 w-1/3 max-h-10 max-w-10"})):w__namespace.createElement(w__namespace.Fragment,null,g??w__namespace.createElement(v,{className:"h-1/4 w-1/4 max-h-12 max-w-12"}),V&&w__namespace.createElement("span",{className:"text-xs leading-snug line-clamp-2 max-w-[80%]","data-gds-part":"media-surface-caption"},V)):ee),(ne||h)&&w__namespace.createElement("div",{"data-gds-part":"media-surface-content",className:"absolute inset-0 z-[1]"},ne&&w__namespace.createElement("img",{src:ne,alt:V??"",onError:()=>fe(true),className:"absolute inset-0 h-full w-full object-cover","data-gds-part":"media-surface-img"}),h),I&&w__namespace.createElement("div",{className:"absolute inset-0 z-[2] flex items-center justify-center bg-muted animate-pulse","aria-hidden":true},d),u&&w__namespace.createElement("div",{"data-gds-part":"media-surface-overlay",className:"absolute inset-0 z-10"},u))});ot.displayName="MediaSurface";function Ft(){let[e,t]=w__namespace.useState(false);return w__namespace.useEffect(()=>{let o=window.matchMedia("(prefers-reduced-motion: reduce)");t(o.matches);let r=i=>t(i.matches);return o.addEventListener("change",r),()=>o.removeEventListener("change",r)},[]),e}var gl=w__namespace.forwardRef(({src:e,controls:t=true,autoPlay:o=false,loop:r=false,muted:i,pauseOffscreen:a=true,aspect:d="video",radius:m="lg",border:s=false,poster:c,label:l,className:p,style:g,playbackRate:u=1,objectFit:b="cover"},f)=>{let h=w__namespace.useRef(null),P=Ft(),[S,R]=w__namespace.useState(!!c);w__namespace.useImperativeHandle(f,()=>h.current);let C=i??o,k=o&&!P;w__namespace.useEffect(()=>{h.current&&(h.current.playbackRate=u);},[u]),w__namespace.useEffect(()=>{R(!!c);},[c]);let B=w__namespace.useCallback(H=>{!a||!h.current||(H&&k?h.current.play().catch(()=>{}):h.current.pause());},[a,k]);return w__namespace.createElement(ot,{aspect:d,radius:m,border:s,"aria-label":l,className:p,style:g,onVisibilityChange:a?B:void 0},w__namespace.createElement("video",{ref:h,src:e,controls:t,autoPlay:k,loop:r,muted:C,playsInline:true,preload:k?"auto":"metadata",onPlaying:()=>R(false),className:n("w-full h-full",b==="cover"&&"object-cover",b==="contain"&&"object-contain",b==="fill"&&"object-fill")},"Your browser does not support the video tag."),c&&S&&w__namespace.createElement("img",{src:c,alt:"","aria-hidden":"true",loading:"lazy",decoding:"async","data-gds-part":"video-poster",className:n("absolute inset-0 w-full h-full pointer-events-none transition-opacity duration-200",b==="cover"&&"object-cover",b==="contain"&&"object-contain",b==="fill"&&"object-fill")}))});gl.displayName="VideoPlayer";var fl=w__namespace.forwardRef(({src:e,controls:t=false,autoPlay:o=true,loop:r=true,pauseOffscreen:i=true,aspect:a="square",radius:d="lg",border:m=false,poster:s,label:c,className:l,style:p,stateMachines:g,artboard:u,fit:b="contain",stateMachineInputs:f},h)=>{let P=Ft(),[S,R]=w__namespace.useState(null),[C,k]=w__namespace.useState(null);return w__namespace.useEffect(()=>{let B=false;return import('@rive-app/react-canvas').then(H=>{B||R(H);}).catch(()=>{B||k("Rive runtime not installed. Run `npm install @rive-app/react-canvas`.");}),()=>{B=true;}},[]),w__namespace.createElement(ot,{ref:h,aspect:a,radius:d,border:m,"aria-label":c,className:l,style:p},C?w__namespace.createElement("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4 text-center"},C):S&&e?w__namespace.createElement(qp,{Mod:S,src:e,stateMachines:g,artboard:u,fit:b,stateMachineInputs:f,autoPlay:o&&!P,loop:r,pauseOffscreen:i,controls:t,poster:s}):s&&w__namespace.createElement("img",{src:s,alt:"",className:"w-full h-full object-contain"}))});fl.displayName="RivePlayer";function qp({Mod:e,src:t,stateMachines:o,artboard:r,fit:i,autoPlay:a,loop:d,pauseOffscreen:m,controls:s,poster:c}){let{useRive:l,Layout:p,Fit:g,Alignment:u,EventType:b}=e,f={contain:g.Contain,cover:g.Cover,fill:g.Fill,fitWidth:g.FitWidth,fitHeight:g.FitHeight,none:g.None},{rive:h,RiveComponent:P}=l({src:t,stateMachines:o,artboard:r,autoplay:a,layout:new p({fit:f[i],alignment:u.Center})}),[S,R]=w__namespace.useState(a);w__namespace.useEffect(()=>{if(!h||!d)return;let k=()=>{h.play();};return h.on(b.Stop,k),()=>{h.off(b.Stop,k);}},[h,d,b]),w__namespace.useEffect(()=>{if(!m||!h)return;let k=h.canvas;if(!k)return;let B=new IntersectionObserver(([H])=>{H.isIntersecting&&a?h.play():h.pause();},{threshold:.05});return B.observe(k),()=>B.disconnect()},[h,m,a]);let C=()=>{h&&(S?(h.pause(),R(false)):(h.play(),R(true)));};return w__namespace.createElement(w__namespace.Fragment,null,w__namespace.createElement(P,{className:"w-full h-full"}),!h&&c&&w__namespace.createElement("img",{src:c,alt:"",className:"absolute inset-0 w-full h-full object-contain pointer-events-none"}),s&&w__namespace.createElement("div",{className:n("absolute inset-0 flex items-end justify-end p-2","opacity-0 hover:opacity-100 transition-opacity","bg-gradient-to-t from-black/40 to-transparent")},w__namespace.createElement(xe,{size:"icon",variant:"secondary",onClick:C},S?w__namespace.createElement(lucideReact.Pause,{className:"h-4 w-4"}):w__namespace.createElement(lucideReact.Play,{className:"h-4 w-4"}))))}var bl=({renderer:e,scene:t,camera:o,preset:r,width:i,height:a})=>{let d=new postprocessing.EffectComposer(e);d.setSize(i,a),d.addPass(new postprocessing.RenderPass(t,o));let m=new postprocessing.BloomEffect({intensity:0,luminanceThreshold:.6,radius:.6,kernelSize:postprocessing.KernelSize.MEDIUM}),s=new postprocessing.NoiseEffect({blendFunction:postprocessing.BlendFunction.OVERLAY});s.blendMode.opacity.value=0;let c=new postprocessing.ScanlineEffect({blendFunction:postprocessing.BlendFunction.OVERLAY,density:1.25});c.blendMode.opacity.value=0;let l=new postprocessing.VignetteEffect({darkness:0,offset:.5}),p=new postprocessing.ChromaticAberrationEffect({offset:new Z__namespace.Vector2(0,0),radialModulation:false,modulationOffset:.15}),g=new postprocessing.GlitchEffect({chromaticAberrationOffset:new Z__namespace.Vector2(0,0),columns:.05});g.minStrength=0,g.maxStrength=0,d.addPass(new postprocessing.EffectPass(o,m)),d.addPass(new postprocessing.EffectPass(o,s,c,l)),d.addPass(new postprocessing.EffectPass(o,p)),d.addPass(new postprocessing.EffectPass(o,g));function u(b){let f=b.effects;m.intensity=f.bloom?.intensity??0,m.luminanceMaterial&&f.bloom?.luminanceThreshold!==void 0&&(m.luminanceMaterial.threshold=f.bloom.luminanceThreshold),s.blendMode.opacity.value=f.noise?.intensity??0,c.density=f.scanlines?.density??1.25,c.blendMode.opacity.value=f.scanlines?.opacity??0,l.darkness=f.vignette?.darkness??0,l.offset=f.vignette?.offset??.5;let h=f.chromatic?.offset??0;p.offset?.set(h,h),f.glitch?(g.minStrength=f.glitch.strength?.[0]??0,g.maxStrength=f.glitch.strength?.[1]??0):(g.minStrength=0,g.maxStrength=0);}return u(r),{composer:d,setPreset:u,resize:(b,f)=>d.setSize(b,f),dispose:()=>{d.dispose();}}};var Xt=3e3,ya=400,am=80,vl=({width:e,height:t,palette:o})=>{let r=new Z__namespace.Scene;r.background=new Z__namespace.Color(o.background);let i=new Z__namespace.PerspectiveCamera(70,e/t,.1,ya*2);i.position.z=0;let a=new Float32Array(Xt*6),d=new Float32Array(Xt*6),m=new Float32Array(Xt),s=new Z__namespace.Color(o.primary),c=new Z__namespace.Color(o.accent);function l(h,P){let S=Math.random()*Math.PI*2,R=am*Math.pow(Math.random(),.6),C=Math.cos(S)*R,k=Math.sin(S)*R,B=P?-Math.random()*ya:-ya;m[h]=B,a[h*6+0]=C,a[h*6+1]=k,a[h*6+2]=B,a[h*6+3]=C,a[h*6+4]=k,a[h*6+5]=B-2,d[h*6+0]=s.r,d[h*6+1]=s.g,d[h*6+2]=s.b,d[h*6+3]=c.r,d[h*6+4]=c.g,d[h*6+5]=c.b;}for(let h=0;h<Xt;h++)l(h,true);let p=new Z__namespace.BufferGeometry;p.setAttribute("position",new Z__namespace.BufferAttribute(a,3)),p.setAttribute("color",new Z__namespace.BufferAttribute(d,3));let g=new Z__namespace.LineBasicMaterial({vertexColors:true,transparent:true,opacity:.95,blending:Z__namespace.AdditiveBlending}),u=new Z__namespace.LineSegments(p,g);r.add(u);let b=60,f=6;return {scene:r,camera:i,update:(h,P)=>{let S=p.attributes.position.array;for(let R=0;R<Xt;R++){let C=R*6;S[C+2]+=b*P,S[C+5]=S[C+2]-f,S[C+2]>5&&l(R,false);}p.attributes.position.needsUpdate=true;},resize:(h,P)=>{let S=i;S.aspect=h/P,S.updateProjectionMatrix();},setPalette:h=>{r.background=new Z__namespace.Color(h.background);let P=new Z__namespace.Color(h.primary),S=new Z__namespace.Color(h.accent),R=p.attributes.color.array;for(let C=0;C<Xt;C++)R[C*6+0]=P.r,R[C*6+1]=P.g,R[C*6+2]=P.b,R[C*6+3]=S.r,R[C*6+4]=S.g,R[C*6+5]=S.b;p.attributes.color.needsUpdate=true;},dispose:()=>{p.dispose(),g.dispose();}}};var nm=`
345
+ `,nn=S__namespace.createContext(null);function _u({children:e,defaultTheme:t=Eo,defaultMode:o="light"}){let[r,n]=S__namespace.useState(t),[a,l]=S__namespace.useState(o),[p,i]=S__namespace.useState(0);S__namespace.useEffect(()=>{try{let h=localStorage.getItem(an);h&&mo(h)&&n(h);let f=localStorage.getItem(ea);if(f&&nd.includes(f))l(f);else if(typeof window<"u"){let y=window.matchMedia("(prefers-color-scheme: dark)").matches;l(y?"dark":"light");}}catch{}},[]),S__namespace.useEffect(()=>{let h=mo(r)??mo(Eo);h&&(Xr(h,a),typeof document<"u"&&document.documentElement.classList.toggle("dark",ad.has(a)));},[r,a,p]),S__namespace.useEffect(()=>{if(typeof window>"u")return;let h=window.matchMedia("(prefers-color-scheme: dark)"),f=y=>{try{if(localStorage.getItem(ea))return}catch{return}l(y.matches?"dark":"light");};return h.addEventListener("change",f),()=>h.removeEventListener("change",f)},[]);let c=S__namespace.useCallback(h=>{n(h);try{localStorage.setItem(an,h);}catch{}},[]),d=S__namespace.useCallback(h=>{l(h);try{localStorage.setItem(ea,h);}catch{}},[]),m=S__namespace.useCallback(h=>{Qr(h),i(f=>f+1),c(h.id);},[c]),g=S__namespace.useCallback(h=>{h in kt||(rn(h),i(f=>f+1),n(f=>f===h?Eo:f));},[]),u=S__namespace.useCallback(()=>{i(h=>h+1);},[]),b=S__namespace.useMemo(()=>{let h=mo(r)??mo(Eo);return {theme:h,themeId:h.id,mode:a,isDark:ad.has(a),setThemeId:c,setMode:d,themes:tn(),saveAndActivate:m,deleteTheme:g,refresh:u}},[r,a,p,c,d,m,g,u]);return S__namespace.createElement(nn.Provider,{value:b},e)}function sn(){let e=S__namespace.useContext(nn);if(!e)throw new Error("useGradeTheme must be used inside <GradeThemeProvider>. Wrap your app (typically in app/layout.tsx).");return e}function uo(){return S__namespace.useContext(nn)}var ln=S__namespace.createContext(null);function id(){return S__namespace.useContext(ln)}var Ju={maplibre:()=>Promise.resolve().then(()=>(md(),pd)).then(e=>e.createMaplibreAdapter),mapbox:()=>Promise.resolve().then(()=>(hd(),fd)).then(e=>e.createMapboxAdapter),google:()=>Promise.resolve().then(()=>(yd(),vd)).then(e=>e.createGoogleAdapter)},Qu=500,dn=S__namespace.forwardRef(function(t,o){let{center:r,zoom:n,bounds:a,appearance:l="auto",interactive:p=true,hoveredId:i,onHoveredIdChange:c,onLoad:d,onError:m,className:g,style:u,children:b,...h}=t,f=h.provider??"maplibre",y=h.styleUrl,R=h.tilerKey,x=h.accessToken,k=h.apiKey,T=h.mapId,O=S__namespace.useRef(null),D=S__namespace.useRef(null),E=S__namespace.useRef(new globalThis.Map),$=S__namespace.useRef(null),[H,F]=S__namespace.useState(false),j=S__namespace.useRef(c),N=S__namespace.useRef(m),X=S__namespace.useRef(d);S__namespace.useEffect(()=>{j.current=c,N.current=m,X.current=d;});let Y=uo()?.isDark??false,v=l==="auto"?Y?"dark":"light":l;S__namespace.useEffect(()=>{let I=false,le=O.current;if(!le)return;let J=l==="auto"?Y?"dark":"light":l;return (async()=>{try{let he=await Ju[f]();if(I)return;let ne=await he(le,{center:r,zoom:n,bounds:a,appearance:J,interactive:p,styleUrl:y,tilerKey:R,accessToken:x,apiKey:k,mapId:T},{onLoad:()=>{},onError:be=>N.current?.(be),onMarkerHover:be=>j.current?.(be),onMarkerClick:()=>{}});if(I){ne.destroy();return}D.current=ne,F(!0),X.current?.(xd(D,E));}catch(he){if(I)return;he?.code||N.current?.({code:"provider-init-failed",message:he?.message??"Map init failed",cause:he});}})(),()=>{I=true,D.current?.destroy(),D.current=null,F(false),E.current.clear(),$.current=null;}},[f,y,x,k,T,R]),S__namespace.useEffect(()=>{D.current?.setAppearance(v);},[v]),S__namespace.useEffect(()=>{D.current?.setInteractive(p);},[p]),S__namespace.useEffect(()=>{D.current&&(a?D.current.setBounds(a[0],a[1]):(D.current.setCenter(r),D.current.setZoom(n)));},[r[0],r[1],n,a?.[0]?.[0],a?.[0]?.[1],a?.[1]?.[0],a?.[1]?.[1]]),S__namespace.useEffect(()=>{let I=$.current;I&&I!==i&&E.current.get(I)?.setHovered(false),i&&E.current.get(i)?.setHovered(true),$.current=i??null;},[i]),S__namespace.useImperativeHandle(o,()=>xd(D,E),[]);let W=S__namespace.useMemo(()=>({registerMarker:(I,le,J)=>{let he=D.current;if(!he)return null;let ne=he.addMarker(I,le,J);E.current.set(I,ne),process.env.NODE_ENV!=="production"&&E.current.size===Qu+1&&console.warn(`@gradeui/ui Map: rendering ${E.current.size} markers. DOM markers degrade past ~1k. Consider clustering via the .instance escape hatch.`);let be=ne.remove;return ne.remove=()=>{be(),E.current.delete(I),$.current===I&&($.current=null);},i===I&&ne.setHovered(true),ne}}),[H]);return S__namespace.createElement("div",{ref:O,"data-gds-part":"map",className:s("gds-map relative isolate overflow-hidden",g),style:{borderRadius:"var(--gds-map-radius, var(--radius, 0.5rem))",border:"var(--gds-map-border, 1px solid var(--border, transparent))",...u}},S__namespace.createElement(ln.Provider,{value:W},b))});dn.displayName="Map";function xd(e,t){let o=()=>{};return {flyTo:(r,n)=>{let a=e.current;if(!a)return;let l;if(typeof r=="string"){if(l=t.current.get(r)?.coords??null,!l){console.warn(`@gradeui/ui Map.flyTo: no marker registered with id "${r}".`);return}}else l=r;a.flyTo(l,n);},panTo:(r,n)=>e.current?.panTo(r,n)??o(),fitBounds:(r,n)=>e.current?.fitBounds(r,n)??o(),getCenter:()=>e.current?.getCenter()??[0,0],getZoom:()=>e.current?.getZoom()??0,getBounds:()=>e.current?.getBounds()??[[0,0],[0,0]],get instance(){return e.current?.instance??null}}}var cn=S__namespace.memo(function({id:t,at:o,anchor:r="bottom",className:n,children:a,onClick:l}){let p=id(),[i,c]=S__namespace.useState(null),d=S__namespace.useRef(null),m=S__namespace.useRef(l);return S__namespace.useEffect(()=>{m.current=l;}),S__namespace.useEffect(()=>{if(!p)return;let g=p.registerMarker(t,o,r);if(g){d.current=g,c(g.element);let u=b=>{m.current?.({id:t,coords:g.coords,native:b});};return g.element.addEventListener("click",u),()=>{g.element.removeEventListener("click",u),g.remove(),d.current=null,c(null);}}},[p,t]),S__namespace.useEffect(()=>{d.current?.setPosition(o);},[o[0],o[1]]),i?reactDom.createPortal(S__namespace.createElement("div",{"data-gds-part":"map-marker-content",className:s("pointer-events-auto",n)},a),i):null});cn.displayName="MapMarker";var fg={video:"aspect-video",square:"aspect-square",portrait:"aspect-[3/4]",wide:"aspect-[21/9]",auto:""},hg={none:"0",sm:"var(--radius, 0.25rem)",md:"calc(var(--radius, 0.375rem) * 1.25)",lg:"calc(var(--radius, 0.5rem) * 1.5)",xl:"calc(var(--radius, 0.75rem) * 2)"},bg={album:lucideReact.Disc3,"tv-show":lucideReact.Tv,movie:lucideReact.Clapperboard,game:lucideReact.Gamepad2,book:lucideReact.Book,portrait:lucideReact.User,landscape:lucideReact.Mountain,poster:lucideReact.Film,product:lucideReact.Package,food:lucideReact.UtensilsCrossed,video:lucideReact.Video,audio:lucideReact.Music,embed:lucideReact.Code2,"3d":lucideReact.Box,generic:lucideReact.Image},vg={album:"square","tv-show":"portrait",movie:"portrait",game:"portrait",book:"portrait",portrait:"portrait",landscape:"wide",poster:"portrait",product:"square",food:"square",video:"video",audio:"video",embed:"video","3d":"square",generic:"video"};function yg(e){if(!e)return "";let t=/^(the|a|an|and|for|by|of|in|on|at|to)$/i,o=e.trim().split(/\s+/).filter(r=>r&&!t.test(r));return o.length===0?e.replace(/\s+/g,"").slice(0,2).toUpperCase():o.length===1?o[0].slice(0,2).toUpperCase():(o[0][0]+o[1][0]).toUpperCase()}function xg(e){return e<64?"sm":e>=160?"lg":"md"}var Tt=S__namespace.forwardRef(({className:e,aspect:t,radius:o="lg",border:r=false,loading:n=false,onVisibilityChange:a,fallback:l,emptyState:p="auto",hint:i="generic",alt:c,source:d,src:m,glyph:g,overlay:u,instanceId:b,style:h,children:f,...y},R)=>{let x=S__namespace.useRef(null);S__namespace.useImperativeHandle(R,()=>x.current);let k=i,T=t,O=o,D=r,E=n,$=c,H=m,F=p,j=T??vg[k];S__namespace.useEffect(()=>{if(!a||!x.current)return;let be=x.current,Be=new IntersectionObserver(([A])=>a(A.isIntersecting),{threshold:.05});return Be.observe(be),()=>Be.disconnect()},[a]);let N=!f&&F!=="none",[X,L]=S__namespace.useState("md");S__namespace.useEffect(()=>{if(!N)return;let be=x.current;if(!be)return;let Be=new ResizeObserver(([A])=>{let ce=A.contentRect.width;L(xg(ce));});return Be.observe(be),()=>Be.disconnect()},[N]);let Y=S__namespace.useMemo(()=>yg($),[$]),v=bg[k]??lucideReact.Image,W=F==="auto"||F==="icon",I=H,le=S__namespace.useMemo(()=>d?JSON.stringify(d):void 0,[d]),[J,he]=S__namespace.useState(false);S__namespace.useEffect(()=>{he(false);},[I]);let ne=J?void 0:I;return S__namespace.createElement("div",{ref:x,"data-gds-part":"media-surface","data-media-hint":k,"data-media-source-kind":d?.kind,"data-media-source":le,"data-media-alt":$,"data-gds-instance-id":b,className:s("gds-media-surface relative w-full overflow-hidden",fg[j],D&&"border border-border",e),style:{borderRadius:`var(--gds-media-radius, ${hg[O]})`,...h},...y},N&&S__namespace.createElement("div",{"data-gds-part":"media-surface-placeholder","data-tier":X,className:"absolute inset-0 z-0 flex flex-col items-center justify-center gap-2 pointer-events-none px-3 text-center",style:{background:"var(--gds-media-placeholder-bg)",color:"var(--gds-media-placeholder-fg)"},"aria-hidden":true},W?X==="sm"?Y?S__namespace.createElement("span",{className:"font-semibold text-sm tracking-tight"},Y):S__namespace.createElement(v,{className:"h-1/2 w-1/2 max-h-6 max-w-6"}):X==="md"?S__namespace.createElement(S__namespace.Fragment,null,g??S__namespace.createElement(v,{className:"h-1/3 w-1/3 max-h-10 max-w-10"})):S__namespace.createElement(S__namespace.Fragment,null,g??S__namespace.createElement(v,{className:"h-1/4 w-1/4 max-h-12 max-w-12"}),$&&S__namespace.createElement("span",{className:"text-xs leading-snug line-clamp-2 max-w-[80%]","data-gds-part":"media-surface-caption"},$)):F),(ne||f)&&S__namespace.createElement("div",{"data-gds-part":"media-surface-content",className:"absolute inset-0 z-[1]"},ne&&S__namespace.createElement("img",{src:ne,alt:$??"",onError:()=>he(true),className:"absolute inset-0 h-full w-full object-cover","data-gds-part":"media-surface-img"}),f),E&&S__namespace.createElement("div",{className:"absolute inset-0 z-[2] flex items-center justify-center bg-muted animate-pulse","aria-hidden":true},l),u&&S__namespace.createElement("div",{"data-gds-part":"media-surface-overlay",className:"absolute inset-0 z-10"},u))});Tt.displayName="MediaSurface";function go(){let[e,t]=S__namespace.useState(false);return S__namespace.useEffect(()=>{let o=window.matchMedia("(prefers-reduced-motion: reduce)");t(o.matches);let r=n=>t(n.matches);return o.addEventListener("change",r),()=>o.removeEventListener("change",r)},[]),e}var Rd=S__namespace.forwardRef(({src:e,controls:t=true,autoPlay:o=false,loop:r=false,muted:n,pauseOffscreen:a=true,aspect:l="video",radius:p="lg",border:i=false,poster:c,label:d,className:m,style:g,playbackRate:u=1,objectFit:b="cover"},h)=>{let f=S__namespace.useRef(null),y=go(),[R,x]=S__namespace.useState(!!c);S__namespace.useImperativeHandle(h,()=>f.current);let k=n??o,T=o&&!y;S__namespace.useEffect(()=>{f.current&&(f.current.playbackRate=u);},[u]),S__namespace.useEffect(()=>{x(!!c);},[c]);let O=S__namespace.useCallback(D=>{!a||!f.current||(D&&T?f.current.play().catch(()=>{}):f.current.pause());},[a,T]);return S__namespace.createElement(Tt,{aspect:l,radius:p,border:i,"aria-label":d,className:m,style:g,onVisibilityChange:a?O:void 0},S__namespace.createElement("video",{ref:f,src:e,controls:t,autoPlay:T,loop:r,muted:k,playsInline:true,preload:T?"auto":"metadata",onPlaying:()=>x(false),className:s("w-full h-full",b==="cover"&&"object-cover",b==="contain"&&"object-contain",b==="fill"&&"object-fill")},"Your browser does not support the video tag."),c&&R&&S__namespace.createElement("img",{src:c,alt:"","aria-hidden":"true",loading:"lazy",decoding:"async","data-gds-part":"video-poster",className:s("absolute inset-0 w-full h-full pointer-events-none transition-opacity duration-200",b==="cover"&&"object-cover",b==="contain"&&"object-contain",b==="fill"&&"object-fill")}))});Rd.displayName="VideoPlayer";var Sd=S__namespace.forwardRef(({src:e,controls:t=false,autoPlay:o=true,loop:r=true,pauseOffscreen:n=true,aspect:a="square",radius:l="lg",border:p=false,poster:i,label:c,className:d,style:m,stateMachines:g,artboard:u,fit:b="contain",stateMachineInputs:h},f)=>{let y=go(),[R,x]=S__namespace.useState(null),[k,T]=S__namespace.useState(null);return S__namespace.useEffect(()=>{let O=false;return import('@rive-app/react-canvas').then(D=>{O||x(D);}).catch(()=>{O||T("Rive runtime not installed. Run `npm install @rive-app/react-canvas`.");}),()=>{O=true;}},[]),S__namespace.createElement(Tt,{ref:f,aspect:a,radius:l,border:p,"aria-label":c,className:d,style:m},k?S__namespace.createElement("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4 text-center"},k):R&&e?S__namespace.createElement(Sg,{Mod:R,src:e,stateMachines:g,artboard:u,fit:b,stateMachineInputs:h,autoPlay:o&&!y,loop:r,pauseOffscreen:n,controls:t,poster:i}):i&&S__namespace.createElement("img",{src:i,alt:"",className:"w-full h-full object-contain"}))});Sd.displayName="RivePlayer";function Sg({Mod:e,src:t,stateMachines:o,artboard:r,fit:n,autoPlay:a,loop:l,pauseOffscreen:p,controls:i,poster:c}){let{useRive:d,Layout:m,Fit:g,Alignment:u,EventType:b}=e,h={contain:g.Contain,cover:g.Cover,fill:g.Fill,fitWidth:g.FitWidth,fitHeight:g.FitHeight,none:g.None},{rive:f,RiveComponent:y}=d({src:t,stateMachines:o,artboard:r,autoplay:a,layout:new m({fit:h[n],alignment:u.Center})}),[R,x]=S__namespace.useState(a);S__namespace.useEffect(()=>{if(!f||!l)return;let T=()=>{f.play();};return f.on(b.Stop,T),()=>{f.off(b.Stop,T);}},[f,l,b]),S__namespace.useEffect(()=>{if(!p||!f)return;let T=f.canvas;if(!T)return;let O=new IntersectionObserver(([D])=>{D.isIntersecting&&a?f.play():f.pause();},{threshold:.05});return O.observe(T),()=>O.disconnect()},[f,p,a]);let k=()=>{f&&(R?(f.pause(),x(false)):(f.play(),x(true)));};return S__namespace.createElement(S__namespace.Fragment,null,S__namespace.createElement(y,{className:"w-full h-full"}),!f&&c&&S__namespace.createElement("img",{src:c,alt:"",className:"absolute inset-0 w-full h-full object-contain pointer-events-none"}),i&&S__namespace.createElement("div",{className:s("absolute inset-0 flex items-end justify-end p-2","opacity-0 hover:opacity-100 transition-opacity","bg-gradient-to-t from-black/40 to-transparent")},S__namespace.createElement(We,{size:"icon",variant:"secondary",onClick:k},R?S__namespace.createElement(lucideReact.Pause,{className:"h-4 w-4"}):S__namespace.createElement(lucideReact.Play,{className:"h-4 w-4"}))))}var kd=({renderer:e,scene:t,camera:o,preset:r,width:n,height:a})=>{let l=new postprocessing.EffectComposer(e);l.setSize(n,a),l.addPass(new postprocessing.RenderPass(t,o));let p=new postprocessing.BloomEffect({intensity:0,luminanceThreshold:.6,radius:.6,kernelSize:postprocessing.KernelSize.MEDIUM}),i=new postprocessing.NoiseEffect({blendFunction:postprocessing.BlendFunction.OVERLAY});i.blendMode.opacity.value=0;let c=new postprocessing.ScanlineEffect({blendFunction:postprocessing.BlendFunction.OVERLAY,density:1.25});c.blendMode.opacity.value=0;let d=new postprocessing.VignetteEffect({darkness:0,offset:.5}),m=new postprocessing.ChromaticAberrationEffect({offset:new fe__namespace.Vector2(0,0),radialModulation:false,modulationOffset:.15}),g=new postprocessing.GlitchEffect({chromaticAberrationOffset:new fe__namespace.Vector2(0,0),columns:.05});g.minStrength=0,g.maxStrength=0,l.addPass(new postprocessing.EffectPass(o,p)),l.addPass(new postprocessing.EffectPass(o,i,c,d)),l.addPass(new postprocessing.EffectPass(o,m)),l.addPass(new postprocessing.EffectPass(o,g));function u(b){let h=b.effects;p.intensity=h.bloom?.intensity??0,p.luminanceMaterial&&h.bloom?.luminanceThreshold!==void 0&&(p.luminanceMaterial.threshold=h.bloom.luminanceThreshold),i.blendMode.opacity.value=h.noise?.intensity??0,c.density=h.scanlines?.density??1.25,c.blendMode.opacity.value=h.scanlines?.opacity??0,d.darkness=h.vignette?.darkness??0,d.offset=h.vignette?.offset??.5;let f=h.chromatic?.offset??0;m.offset?.set(f,f),h.glitch?(g.minStrength=h.glitch.strength?.[0]??0,g.maxStrength=h.glitch.strength?.[1]??0):(g.minStrength=0,g.maxStrength=0);}return u(r),{composer:l,setPreset:u,resize:(b,h)=>l.setSize(b,h),dispose:()=>{l.dispose();}}};var Lo=3e3,mn=400,Ag=80,Td=({width:e,height:t,palette:o})=>{let r=new fe__namespace.Scene;r.background=new fe__namespace.Color(o.background);let n=new fe__namespace.PerspectiveCamera(70,e/t,.1,mn*2);n.position.z=0;let a=new Float32Array(Lo*6),l=new Float32Array(Lo*6),p=new Float32Array(Lo),i=new fe__namespace.Color(o.primary),c=new fe__namespace.Color(o.accent);function d(f,y){let R=Math.random()*Math.PI*2,x=Ag*Math.pow(Math.random(),.6),k=Math.cos(R)*x,T=Math.sin(R)*x,O=y?-Math.random()*mn:-mn;p[f]=O,a[f*6+0]=k,a[f*6+1]=T,a[f*6+2]=O,a[f*6+3]=k,a[f*6+4]=T,a[f*6+5]=O-2,l[f*6+0]=i.r,l[f*6+1]=i.g,l[f*6+2]=i.b,l[f*6+3]=c.r,l[f*6+4]=c.g,l[f*6+5]=c.b;}for(let f=0;f<Lo;f++)d(f,true);let m=new fe__namespace.BufferGeometry;m.setAttribute("position",new fe__namespace.BufferAttribute(a,3)),m.setAttribute("color",new fe__namespace.BufferAttribute(l,3));let g=new fe__namespace.LineBasicMaterial({vertexColors:true,transparent:true,opacity:.95,blending:fe__namespace.AdditiveBlending}),u=new fe__namespace.LineSegments(m,g);r.add(u);let b=60,h=6;return {scene:r,camera:n,update:(f,y)=>{let R=m.attributes.position.array;for(let x=0;x<Lo;x++){let k=x*6;R[k+2]+=b*y,R[k+5]=R[k+2]-h,R[k+2]>5&&d(x,false);}m.attributes.position.needsUpdate=true;},resize:(f,y)=>{let R=n;R.aspect=f/y,R.updateProjectionMatrix();},setPalette:f=>{r.background=new fe__namespace.Color(f.background);let y=new fe__namespace.Color(f.primary),R=new fe__namespace.Color(f.accent),x=m.attributes.color.array;for(let k=0;k<Lo;k++)x[k*6+0]=y.r,x[k*6+1]=y.g,x[k*6+2]=y.b,x[k*6+3]=R.r,x[k*6+4]=R.g,x[k*6+5]=R.b;m.attributes.color.needsUpdate=true;},dispose:()=>{m.dispose(),g.dispose();}}};var Hg=`
293
346
  precision highp float;
294
347
  varying vec2 vUv;
295
348
  uniform float uTime;
@@ -327,19 +380,19 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
327
380
 
328
381
  gl_FragColor = vec4(col, 1.0);
329
382
  }
330
- `,im=`
383
+ `,Ig=`
331
384
  varying vec2 vUv;
332
385
  void main() {
333
386
  vUv = uv;
334
387
  gl_Position = vec4(position.xy, 0.0, 1.0);
335
388
  }
336
- `,yl=({width:e,height:t,palette:o})=>{let r=new Z__namespace.Scene,i=new Z__namespace.OrthographicCamera(-1,1,1,-1,0,1),a={uTime:{value:0},uResolution:{value:new Z__namespace.Vector2(e,t)},uBackground:{value:new Z__namespace.Color(o.background)},uPrimary:{value:new Z__namespace.Color(o.primary)},uSecondary:{value:new Z__namespace.Color(o.secondary)},uAccent:{value:new Z__namespace.Color(o.accent)}},d=new Z__namespace.ShaderMaterial({uniforms:a,vertexShader:im,fragmentShader:nm,depthTest:false,depthWrite:false}),m=new Z__namespace.PlaneGeometry(2,2),s=new Z__namespace.Mesh(m,d);return r.add(s),{scene:r,camera:i,update:l=>{a.uTime.value=l;},resize:(l,p)=>{a.uResolution.value.set(l,p);},setPalette:l=>{a.uBackground.value.set(l.background),a.uPrimary.value.set(l.primary),a.uSecondary.value.set(l.secondary),a.uAccent.value.set(l.accent);},dispose:()=>{m.dispose(),d.dispose();}}};var sm=`
389
+ `,Pd=({width:e,height:t,palette:o})=>{let r=new fe__namespace.Scene,n=new fe__namespace.OrthographicCamera(-1,1,1,-1,0,1),a={uTime:{value:0},uResolution:{value:new fe__namespace.Vector2(e,t)},uBackground:{value:new fe__namespace.Color(o.background)},uPrimary:{value:new fe__namespace.Color(o.primary)},uSecondary:{value:new fe__namespace.Color(o.secondary)},uAccent:{value:new fe__namespace.Color(o.accent)}},l=new fe__namespace.ShaderMaterial({uniforms:a,vertexShader:Ig,fragmentShader:Hg,depthTest:false,depthWrite:false}),p=new fe__namespace.PlaneGeometry(2,2),i=new fe__namespace.Mesh(p,l);return r.add(i),{scene:r,camera:n,update:d=>{a.uTime.value=d;},resize:(d,m)=>{a.uResolution.value.set(d,m);},setPalette:d=>{a.uBackground.value.set(d.background),a.uPrimary.value.set(d.primary),a.uSecondary.value.set(d.secondary),a.uAccent.value.set(d.accent);},dispose:()=>{p.dispose(),l.dispose();}}};var Fg=`
337
390
  varying vec2 vUv;
338
391
  void main() {
339
392
  vUv = uv;
340
393
  gl_Position = vec4(position.xy, 0.0, 1.0);
341
394
  }
342
- `,lm=`
395
+ `,Bg=`
343
396
  precision highp float;
344
397
  varying vec2 vUv;
345
398
  uniform float uTime;
@@ -396,13 +449,13 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
396
449
 
397
450
  gl_FragColor = vec4(col, 1.0);
398
451
  }
399
- `,wl=({width:e,height:t,palette:o})=>{let r=new Z__namespace.Scene,i=new Z__namespace.OrthographicCamera(-1,1,1,-1,0,1),a={uTime:{value:0},uResolution:{value:new Z__namespace.Vector2(e,t)},uBackground:{value:new Z__namespace.Color(o.background)},uPrimary:{value:new Z__namespace.Color(o.primary)},uSecondary:{value:new Z__namespace.Color(o.secondary)},uAccent:{value:new Z__namespace.Color(o.accent)}},d=new Z__namespace.ShaderMaterial({uniforms:a,vertexShader:sm,fragmentShader:lm,depthTest:false,depthWrite:false}),m=new Z__namespace.PlaneGeometry(2,2),s=new Z__namespace.Mesh(m,d);return r.add(s),{scene:r,camera:i,update:l=>{a.uTime.value=l;},resize:(l,p)=>{a.uResolution.value.set(l,p);},setPalette:l=>{a.uBackground.value.set(l.background),a.uPrimary.value.set(l.primary),a.uSecondary.value.set(l.secondary),a.uAccent.value.set(l.accent);},dispose:()=>{m.dispose(),d.dispose();}}};var dm=`
452
+ `,Md=({width:e,height:t,palette:o})=>{let r=new fe__namespace.Scene,n=new fe__namespace.OrthographicCamera(-1,1,1,-1,0,1),a={uTime:{value:0},uResolution:{value:new fe__namespace.Vector2(e,t)},uBackground:{value:new fe__namespace.Color(o.background)},uPrimary:{value:new fe__namespace.Color(o.primary)},uSecondary:{value:new fe__namespace.Color(o.secondary)},uAccent:{value:new fe__namespace.Color(o.accent)}},l=new fe__namespace.ShaderMaterial({uniforms:a,vertexShader:Fg,fragmentShader:Bg,depthTest:false,depthWrite:false}),p=new fe__namespace.PlaneGeometry(2,2),i=new fe__namespace.Mesh(p,l);return r.add(i),{scene:r,camera:n,update:d=>{a.uTime.value=d;},resize:(d,m)=>{a.uResolution.value.set(d,m);},setPalette:d=>{a.uBackground.value.set(d.background),a.uPrimary.value.set(d.primary),a.uSecondary.value.set(d.secondary),a.uAccent.value.set(d.accent);},dispose:()=>{p.dispose(),l.dispose();}}};var zg=`
400
453
  varying vec2 vUv;
401
454
  void main() {
402
455
  vUv = uv;
403
456
  gl_Position = vec4(position.xy, 0.0, 1.0);
404
457
  }
405
- `,cm=`
458
+ `,Og=`
406
459
  precision highp float;
407
460
  varying vec2 vUv;
408
461
  uniform float uTime;
@@ -472,7 +525,7 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
472
525
 
473
526
  gl_FragColor = vec4(col, 1.0);
474
527
  }
475
- `,xl=({palette:e})=>{let t=new Z__namespace.Scene,o=new Z__namespace.OrthographicCamera(-1,1,1,-1,0,1),r={uTime:{value:0},uBackground:{value:new Z__namespace.Color(e.background)},uPrimary:{value:new Z__namespace.Color(e.primary)},uSecondary:{value:new Z__namespace.Color(e.secondary)},uAccent:{value:new Z__namespace.Color(e.accent)}},i=new Z__namespace.ShaderMaterial({uniforms:r,vertexShader:dm,fragmentShader:cm,depthTest:false,depthWrite:false}),a=new Z__namespace.PlaneGeometry(2,2),d=new Z__namespace.Mesh(a,i);return t.add(d),{scene:t,camera:o,update:s=>{r.uTime.value=s;},setPalette:s=>{r.uBackground.value.set(s.background),r.uPrimary.value.set(s.primary),r.uSecondary.value.set(s.secondary),r.uAccent.value.set(s.accent);},dispose:()=>{a.dispose(),i.dispose();}}};var Po={space:vl,plasma:yl,voronoi:wl,synthwave:xl},Mo=[{id:"space",label:"Hyperspace",description:"Classic 'jump to hyperspace' \u2014 streaking stars flying past camera. Pairs well with VHS or Cinematic post-FX.",tags:["space","retro","motion","hero","background"],scene:"space",defaultPostPreset:"vhs"},{id:"plasma",label:"Plasma",description:"Soft rolling colour clouds \u2014 overlapping sines warping a palette ramp. Classic demoscene vibe. Pairs well with Synthwave or Cinematic.",tags:["abstract","soft","ambient","hero","background","gradient"],scene:"plasma",defaultPostPreset:"synthwave"},{id:"voronoi",label:"Voronoi",description:"Jittered cellular grid \u2014 orbiting seed points form animated cells with glowing edges. Great for data / organic / network moods. Pairs well with CRT or VHS.",tags:["abstract","cells","organic","network","hero","background"],scene:"voronoi",defaultPostPreset:"crt"},{id:"synthwave",label:"Synthwave Grid",description:"Retro-future perspective grid receding to a banded sun disc on the horizon. Pairs beautifully with the Synthwave post preset (its namesake).",tags:["retro","synthwave","80s","hero","background","grid","sun"],scene:"synthwave",defaultPostPreset:"synthwave"}],No=Object.fromEntries(Mo.map(e=>[e.id,e]));var Eo={none:{id:"none",label:"Clean",effects:{}},vhs:{id:"vhs",label:"VHS",effects:{bloom:{intensity:.35,luminanceThreshold:.5,radius:.7},noise:{intensity:.04},scanlines:{density:1.5,opacity:.12},vignette:{darkness:.4,offset:.45},chromatic:{offset:.0015}}},cinematic:{id:"cinematic",label:"Cinematic",effects:{bloom:{intensity:.5,luminanceThreshold:.55,radius:.8},vignette:{darkness:.5,offset:.5}}},synthwave:{id:"synthwave",label:"Synthwave",effects:{bloom:{intensity:.8,luminanceThreshold:.3,radius:.9},chromatic:{offset:.002},vignette:{darkness:.3,offset:.55}}},crt:{id:"crt",label:"CRT",effects:{bloom:{intensity:.2,luminanceThreshold:.7,radius:.4},scanlines:{density:2,opacity:.25},vignette:{darkness:.6,offset:.4},chromatic:{offset:.0025}}}},gr="vhs";var Rl=`
528
+ `,Nd=({palette:e})=>{let t=new fe__namespace.Scene,o=new fe__namespace.OrthographicCamera(-1,1,1,-1,0,1),r={uTime:{value:0},uBackground:{value:new fe__namespace.Color(e.background)},uPrimary:{value:new fe__namespace.Color(e.primary)},uSecondary:{value:new fe__namespace.Color(e.secondary)},uAccent:{value:new fe__namespace.Color(e.accent)}},n=new fe__namespace.ShaderMaterial({uniforms:r,vertexShader:zg,fragmentShader:Og,depthTest:false,depthWrite:false}),a=new fe__namespace.PlaneGeometry(2,2),l=new fe__namespace.Mesh(a,n);return t.add(l),{scene:t,camera:o,update:i=>{r.uTime.value=i;},setPalette:i=>{r.uBackground.value.set(i.background),r.uPrimary.value.set(i.primary),r.uSecondary.value.set(i.secondary),r.uAccent.value.set(i.accent);},dispose:()=>{a.dispose(),n.dispose();}}};var mr={space:Td,plasma:Pd,voronoi:Md,synthwave:Nd},ur=[{id:"space",label:"Hyperspace",description:"Classic 'jump to hyperspace' \u2014 streaking stars flying past camera. Pairs well with VHS or Cinematic post-FX.",tags:["space","retro","motion","hero","background"],scene:"space",defaultPostPreset:"vhs"},{id:"plasma",label:"Plasma",description:"Soft rolling colour clouds \u2014 overlapping sines warping a palette ramp. Classic demoscene vibe. Pairs well with Synthwave or Cinematic.",tags:["abstract","soft","ambient","hero","background","gradient"],scene:"plasma",defaultPostPreset:"synthwave"},{id:"voronoi",label:"Voronoi",description:"Jittered cellular grid \u2014 orbiting seed points form animated cells with glowing edges. Great for data / organic / network moods. Pairs well with CRT or VHS.",tags:["abstract","cells","organic","network","hero","background"],scene:"voronoi",defaultPostPreset:"crt"},{id:"synthwave",label:"Synthwave Grid",description:"Retro-future perspective grid receding to a banded sun disc on the horizon. Pairs beautifully with the Synthwave post preset (its namesake).",tags:["retro","synthwave","80s","hero","background","grid","sun"],scene:"synthwave",defaultPostPreset:"synthwave"}],gr=Object.fromEntries(ur.map(e=>[e.id,e]));var fr={none:{id:"none",label:"Clean",effects:{}},vhs:{id:"vhs",label:"VHS",effects:{bloom:{intensity:.35,luminanceThreshold:.5,radius:.7},noise:{intensity:.04},scanlines:{density:1.5,opacity:.12},vignette:{darkness:.4,offset:.45},chromatic:{offset:.0015}}},cinematic:{id:"cinematic",label:"Cinematic",effects:{bloom:{intensity:.5,luminanceThreshold:.55,radius:.8},vignette:{darkness:.5,offset:.5}}},synthwave:{id:"synthwave",label:"Synthwave",effects:{bloom:{intensity:.8,luminanceThreshold:.3,radius:.9},chromatic:{offset:.002},vignette:{darkness:.3,offset:.55}}},crt:{id:"crt",label:"CRT",effects:{bloom:{intensity:.2,luminanceThreshold:.7,radius:.4},scanlines:{density:2,opacity:.25},vignette:{darkness:.6,offset:.4},chromatic:{offset:.0025}}}},aa="vhs";var Ed=`
476
529
  precision highp float;
477
530
  varying vec2 vUv;
478
531
  uniform float uTime;
@@ -482,13 +535,13 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
482
535
  uniform vec3 uSecondary;
483
536
  uniform vec3 uAccent;
484
537
  uniform vec3 uBackground;
485
- `,pm=`
538
+ `,Vg=`
486
539
  varying vec2 vUv;
487
540
  void main() {
488
541
  vUv = uv;
489
542
  gl_Position = vec4(position.xy, 0.0, 1.0);
490
543
  }
491
- `,Jt=class extends Error{log;source;constructor(t,o){super(`Fragment shader failed to compile:
492
- ${t.trim()}`),this.name="ShaderCompileError",this.log=t,this.source=o;}};function mm(e,t){let o=e.getContext(),r=o.createShader(o.FRAGMENT_SHADER);if(!r)throw new Error("Unable to allocate fragment shader");o.shaderSource(r,t),o.compileShader(r);let i=o.getShaderParameter(r,o.COMPILE_STATUS),a=o.getShaderInfoLog(r)||"";if(o.deleteShader(r),!i)throw new Jt(a,t)}function wa(e){return ({renderer:t,width:o,height:r,palette:i})=>{let a=`${Rl}
493
- ${e}`;mm(t,a);let d=new Z__namespace.Scene,m=new Z__namespace.OrthographicCamera(-1,1,1,-1,0,1),s={uTime:{value:0},uResolution:{value:new Z__namespace.Vector2(o,r)},uMouse:{value:new Z__namespace.Vector2(.5,.5)},uPrimary:{value:new Z__namespace.Color(i.primary)},uSecondary:{value:new Z__namespace.Color(i.secondary)},uAccent:{value:new Z__namespace.Color(i.accent)},uBackground:{value:new Z__namespace.Color(i.background)}},c=new Z__namespace.ShaderMaterial({uniforms:s,vertexShader:pm,fragmentShader:a,depthTest:false,depthWrite:false}),l=new Z__namespace.PlaneGeometry(2,2),p=new Z__namespace.Mesh(l,c);return d.add(p),{scene:d,camera:m,update:u=>{s.uTime.value=u;},resize:(u,b)=>{s.uResolution.value.set(u,b);},setPalette:u=>{s.uPrimary.value.set(u.primary),s.uSecondary.value.set(u.secondary),s.uAccent.value.set(u.accent),s.uBackground.value.set(u.background);},setMouse:(u,b)=>{s.uMouse.value.set(u,b);},dispose:()=>{l.dispose(),c.dispose();}}}}var Lo={primary:"#ff5fb9",secondary:"#9fe8ff",accent:"#ffc857",background:"#0a0a14"},fm=/^[\d.]+\s+[\d.]+\s+[\d.]+(?:\s*\/\s*[\d.%]+)?$/,hm=/^[\d.]+\s+[\d.]+%\s+[\d.]+%(?:\s*\/\s*[\d.%]+)?$/,bm=/^\s*var\(\s*(--[^,)\s]+)(?:\s*,[^)]*)?\s*\)\s*$/;function fr(e,t,o){if(typeof document>"u")return o;let r=e,i=bm.exec(e);if(i){let m=getComputedStyle(t).getPropertyValue(i[1]).trim();m&&(fm.test(m)?r=`oklch(${m})`:hm.test(m)&&(r=`hsl(${m})`));}let a=document.createElement("span");if(a.style.color="",a.style.color=r,a.style.color==="")return o;a.style.display="none",t.appendChild(a);let d=getComputedStyle(a).color;if(t.removeChild(a),!d)return o;if(d.startsWith("rgb"))return d;try{let m=document.createElement("canvas");m.width=1,m.height=1;let s=m.getContext("2d");if(!s)return d;s.clearRect(0,0,1,1),s.fillStyle=d,s.fillRect(0,0,1,1);let[c,l,p]=s.getImageData(0,0,1,1).data;return `rgb(${c}, ${l}, ${p})`}catch{return d}}function Sl(e,t){return {primary:fr(e.primary,t,Lo.primary),secondary:fr(e.secondary,t,Lo.secondary),accent:fr(e.accent,t,Lo.accent),background:fr(e.background,t,Lo.background)}}var hr=w__namespace.forwardRef(({preset:e,fragmentShader:t,onShaderError:o,postPreset:r,palette:i,createScene:a,controls:d=false,autoPlay:m=true,pauseOffscreen:s=true,aspect:c="video",radius:l="lg",border:p=false,poster:g,label:u,className:b,style:f,maxDpr:h},P)=>{let S=w__namespace.useRef(null),[R,C]=w__namespace.useState(m),[k,B]=w__namespace.useState(false),H=Ft(),I=w__namespace.useMemo(()=>({...Lo,...i}),[i]),V=w__namespace.useMemo(()=>a||(t?wa(t):e&&Po[e]?Po[e]:null),[a,t,e]),Pe=w__namespace.useMemo(()=>{if(r)return r;if(e){let G=No[e];if(G?.defaultPostPreset)return G.defaultPostPreset}return gr},[r,e]);w__namespace.useEffect(()=>{let G=S.current;if(!G||!V)return;let ge=G.clientWidth||1,Ae=G.clientHeight||1,we=Sl(I,G),v=new Z__namespace.WebGLRenderer({antialias:true,alpha:false,powerPreference:"high-performance"}),O=h??Math.min(window.devicePixelRatio||1,2);v.setPixelRatio(O),v.setSize(ge,Ae),v.setClearColor(new Z__namespace.Color(we.background),1),v.domElement.dataset.gdsPart="shader-canvas",v.domElement.style.width="100%",v.domElement.style.height="100%",v.domElement.style.display="block",G.appendChild(v.domElement);let D;try{D=V({renderer:v,width:ge,height:Ae,palette:we});}catch(Y){if(Y instanceof Jt)o?.(Y),D=Po.space({renderer:v,width:ge,height:Ae,palette:we});else throw v.dispose(),v.domElement.parentElement===G&&G.removeChild(v.domElement),Y}let te=Eo[Pe]??Eo[gr],Me=bl({renderer:v,scene:D.scene,camera:D.camera,preset:te,width:ge,height:Ae}),fe=new Z__namespace.Clock,ne=0,he=m&&!H,lt=true,zt=()=>{if(ne=requestAnimationFrame(zt),!he||s&&!lt)return;let Y=fe.getDelta(),Ne=fe.getElapsedTime();D.update?.(Ne,Y),Me.composer.render(Y);};zt(),he&&B(true);let Ho=new ResizeObserver(([Y])=>{let Ne=Math.max(1,Math.floor(Y.contentRect.width)),Qt=Math.max(1,Math.floor(Y.contentRect.height));v.setSize(Ne,Qt),Me.resize(Ne,Qt),D.resize?.(Ne,Qt);});Ho.observe(G);let xa=new IntersectionObserver(([Y])=>{lt=Y.isIntersecting;},{threshold:.05});xa.observe(G);let Ra=new MutationObserver(()=>{if(!S.current)return;let Y=Sl(I,S.current);v.setClearColor(new Z__namespace.Color(Y.background),1),D.setPalette?.(Y);});Ra.observe(document.documentElement,{attributes:true,attributeFilter:["class","style","data-theme","data-gds-theme","data-grade-mode"]});let Sa=D,Do=Sa.setMouse?Y=>{let Ne=G.getBoundingClientRect(),Qt=(Y.clientX-Ne.left)/Ne.width,kl=1-(Y.clientY-Ne.top)/Ne.height;Sa.setMouse(Qt,kl);}:null;return Do&&G.addEventListener("pointermove",Do),ee.current={toggle:()=>{he=!he,C(he);},setPalette:Y=>{v.setClearColor(new Z__namespace.Color(Y.background),1),D.setPalette?.(Y);},setPostPreset:Y=>{let Ne=Eo[Y];Ne&&Me.setPreset(Ne);}},()=>{cancelAnimationFrame(ne),Ho.disconnect(),xa.disconnect(),Ra.disconnect(),Do&&G.removeEventListener("pointermove",Do),Me.dispose(),D.dispose?.(),v.dispose(),v.domElement.parentElement===G&&G.removeChild(v.domElement),ee.current=null;}},[V,Pe,I,m,H,s,h,o]);let ee=w__namespace.useRef(null),ye=()=>ee.current?.toggle();return w__namespace.createElement(ot,{ref:G=>{S.current=G,typeof P=="function"?P(G):P&&(P.current=G);},aspect:c,radius:l,border:p,"aria-label":u,className:b,style:f,"data-gds-part":"three-scene"},!k&&g&&w__namespace.createElement("img",{src:g,alt:"",className:"absolute inset-0 w-full h-full object-cover","data-gds-part":"scene-poster"}),d&&w__namespace.createElement("div",{"data-gds-part":"scene-controls",className:n("absolute inset-0 flex items-end justify-end p-2","opacity-0 hover:opacity-100 transition-opacity","bg-gradient-to-t from-black/30 to-transparent")},w__namespace.createElement(xe,{size:"icon",variant:"secondary",onClick:ye},R?w__namespace.createElement(lucideReact.Pause,{className:"h-4 w-4"}):w__namespace.createElement(lucideReact.Play,{className:"h-4 w-4"}))))});hr.displayName="ThreeScene";var br=w__namespace.forwardRef(({preset:e,live:t="hover",postPreset:o,palette:r,className:i,aspect:a="video",radius:d="lg",label:m,hideLabel:s=false,onClick:c},l)=>{let p=No[e],[g,u]=w__namespace.useState(false),b=t==="always"||t==="hover"&&g;return w__namespace.createElement("div",{ref:l,"data-gds-part":"picker-card","data-gds-preset":e,onMouseEnter:()=>u(true),onMouseLeave:()=>u(false),onClick:c,className:n("group cursor-pointer flex flex-col gap-2",i)},b?w__namespace.createElement(hr,{preset:e,postPreset:o,palette:r,aspect:a,radius:d,autoPlay:true,controls:false,pauseOffscreen:true,poster:p?.poster,maxDpr:1}):w__namespace.createElement(ot,{aspect:a,radius:d,"data-gds-part":"preset-poster",className:"bg-gradient-to-br from-muted to-muted/50"},p?.poster?w__namespace.createElement("img",{src:p.poster,alt:p.label,className:"w-full h-full object-cover"}):w__namespace.createElement("div",{className:"absolute inset-0 flex items-center justify-center text-xs text-muted-foreground"},p?.label??e)),!s&&w__namespace.createElement("div",{className:"flex items-baseline justify-between text-xs"},w__namespace.createElement("span",{className:"font-medium text-foreground","data-gds-part":"preset-label"},m??p?.label??e),p?.tags?.[0]&&w__namespace.createElement("span",{className:"text-muted-foreground"},p.tags[0])))});br.displayName="ShaderPresetPreview";function ym({value:e,onChange:t,filterTags:o,live:r="hover",postPreset:i,palette:a,columns:d=3,className:m}){let s=w__namespace.useMemo(()=>o?.length?Mo.filter(l=>o.some(p=>l.tags.includes(p))):Mo,[o]);return w__namespace.createElement("div",{"data-gds-part":"preset-grid",role:"radiogroup",className:n("grid grid-cols-2 gap-3",d===2?"md:grid-cols-2":d===4?"md:grid-cols-4":"md:grid-cols-3",m)},s.map(l=>{let p=e===l.id;return w__namespace.createElement("div",{key:l.id,className:"relative",role:"radio","aria-checked":p},w__namespace.createElement(br,{preset:l.id,postPreset:i,palette:a,live:r,onClick:()=>t?.(l.id),className:n("transition-all",p&&"ring-2 ring-primary ring-offset-2 ring-offset-background rounded-lg")}),p&&w__namespace.createElement("div",{"data-gds-part":"picker-selected-badge",className:"absolute top-2 right-2 rounded-full bg-primary text-primary-foreground p-1 shadow-sm"},w__namespace.createElement(lucideReact.Check,{className:"h-3.5 w-3.5"})))}))}function Sm({children:e}){let t=w.useRef(null);return w.useEffect(()=>{let o=new Rm__default.default({duration:1.2,easing:i=>Math.min(1,1.001-Math.pow(2,-10*i)),orientation:"vertical",gestureOrientation:"vertical",smoothWheel:true});t.current=o;function r(i){o.raf(i),requestAnimationFrame(r);}return requestAnimationFrame(r),()=>{o.destroy(),t.current=null;}},[]),React.createElement(React.Fragment,null,e)}function Mm({className:e}){let t=It();if(!t)return null;let{theme:o,themes:r,setThemeId:i,deleteTheme:a}=t;return w__namespace.createElement(Je,null,w__namespace.createElement(Qe,{asChild:true},w__namespace.createElement(xe,{variant:"ghost",size:"sm",className:n("gap-2",e),"aria-label":"Switch theme"},w__namespace.createElement(lucideReact.Palette,{className:"h-4 w-4"}),w__namespace.createElement("span",{className:"hidden sm:inline"},o.name))),w__namespace.createElement(je,{className:"w-80 p-2",align:"end"},w__namespace.createElement("div",{className:"flex items-start justify-between gap-2 px-2 py-1.5 mb-1"},w__namespace.createElement("div",null,w__namespace.createElement("div",{className:"text-xs font-medium text-muted-foreground"},"Theme"),w__namespace.createElement("div",{className:"text-xs text-muted-foreground/80"},"Switch the skin applied site-wide.")),w__namespace.createElement("button",{type:"button",onClick:()=>la(o),className:"flex items-center gap-1 rounded-md border border-border px-2 py-1 text-[10px] font-medium text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",title:"Download the active theme as a markdown spec \u2014 paste into a fresh LLM prompt"},w__namespace.createElement(lucideReact.Download,{className:"h-3 w-3"}),".md")),w__namespace.createElement("div",{className:"flex flex-col gap-0.5"},r.map(d=>{let m=d.id===o.id,s=d.id in tt,c=d.ramps.primary[500],l=d.ramps.accent[500],p=d.ramps.neutral[500];return w__namespace.createElement("div",{key:d.id,className:n("group flex items-start gap-3 rounded-md px-2 py-2 text-left transition-colors","hover:bg-muted",m&&"bg-muted")},w__namespace.createElement("button",{type:"button",onClick:()=>i(d.id),className:"flex items-start gap-3 flex-1 min-w-0 text-left"},w__namespace.createElement("div",{className:"mt-0.5 flex shrink-0 overflow-hidden rounded-md border border-border"},w__namespace.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${c})`},"aria-hidden":true}),w__namespace.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${l})`},"aria-hidden":true}),w__namespace.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${p})`},"aria-hidden":true})),w__namespace.createElement("div",{className:"min-w-0 flex-1"},w__namespace.createElement("div",{className:"flex items-center gap-2"},w__namespace.createElement("span",{className:"text-sm font-medium truncate text-foreground"},d.name),d.tagline&&w__namespace.createElement("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground shrink-0"},d.tagline)),d.description&&w__namespace.createElement("div",{className:"text-xs text-muted-foreground line-clamp-2"},d.description))),m&&w__namespace.createElement(lucideReact.Check,{className:"mt-2 h-4 w-4 shrink-0 text-primary"}),!s&&!m&&w__namespace.createElement("button",{type:"button",onClick:g=>{g.stopPropagation(),a(d.id);},className:"mt-1 opacity-0 group-hover:opacity-100 transition-opacity rounded p-1 hover:bg-destructive/10 hover:text-destructive","aria-label":`Delete theme ${d.name}`},w__namespace.createElement(lucideReact.Trash2,{className:"h-3.5 w-3.5"})))}))))}var Cl=[{mode:"superLight",label:"Super light",icon:lucideReact.SunDim,tooltip:"Super light \u2014 airy, low contrast"},{mode:"light",label:"Light",icon:lucideReact.Sun,tooltip:"Light"},{mode:"dark",label:"Dark",icon:lucideReact.Moon,tooltip:"Dark"},{mode:"superDark",label:"Super dark",icon:lucideReact.MoonStar,tooltip:"Super dark \u2014 OLED, high contrast"}];function Dm({className:e,variant:t="icons"}){let o=It();if(!o)return null;let{mode:r,setMode:i}=o;return t==="labeled"?w__namespace.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:n("inline-flex flex-wrap gap-1 rounded-md border border-border bg-background p-1",e)},Cl.map(({mode:a,label:d,icon:m})=>{let s=r===a;return w__namespace.createElement("button",{key:a,type:"button",role:"radio","aria-checked":s,onClick:()=>i(a),className:n("flex items-center gap-2 rounded px-3 py-1.5 text-sm transition-colors",s?"bg-primary text-primary-foreground":"hover:bg-accent hover:text-accent-foreground")},w__namespace.createElement(m,{className:"h-4 w-4"}),w__namespace.createElement("span",null,d))})):w__namespace.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:n("inline-flex items-center gap-0.5 rounded-md border border-border bg-background p-0.5",e)},Cl.map(({mode:a,icon:d,tooltip:m})=>{let s=r===a;return w__namespace.createElement("button",{key:a,type:"button",role:"radio","aria-checked":s,"aria-label":m,title:m,onClick:()=>i(a),className:n("flex h-7 w-7 items-center justify-center rounded transition-colors",s?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground")},w__namespace.createElement(d,{className:"h-3.5 w-3.5"}))}))}function Fm(){let{isDark:e,setMode:t}=ga();return React.createElement(xe,{variant:"ghost",size:"sm",onClick:()=>t(e?"light":"dark"),className:"gap-2","aria-label":e?"Switch to light mode":"Switch to dark mode"},e?React.createElement(React.Fragment,null,React.createElement(lucideReact.Sun,{className:"h-4 w-4"}),React.createElement("span",{className:"hidden sm:inline"},"Light")):React.createElement(React.Fragment,null,React.createElement(lucideReact.Moon,{className:"h-4 w-4"}),React.createElement("span",{className:"hidden sm:inline"},"Dark")))}exports.ALL_MODES=Xs;exports.Accordion=od;exports.AccordionContent=En;exports.AccordionItem=Mn;exports.AccordionTrigger=Nn;exports.AppShell=Vn;exports.AppShellAside=$n;exports.AppShellFooter=jn;exports.AppShellHeader=_n;exports.AppShellMain=Un;exports.AppShellNav=Wn;exports.Avatar=Kn;exports.AvatarFallback=Yn;exports.AvatarImage=qn;exports.BUILT_IN_INPUTS=ir;exports.Badge=Vo;exports.Breadcrumb=hs;exports.BreadcrumbEllipsis=Rs;exports.BreadcrumbItem=vs;exports.BreadcrumbLink=ys;exports.BreadcrumbList=bs;exports.BreadcrumbMenuTrigger=Ss;exports.BreadcrumbPage=ws;exports.BreadcrumbSeparator=xs;exports.Button=xe;exports.COMPONENT_CONTRACTS=kr;exports.Calendar=Wo;exports.CalendarDayButton=Qn;exports.Callout=Hn;exports.CalloutDescription=An;exports.CalloutTitle=Dn;exports.Card=ei;exports.CardContent=ai;exports.CardDescription=ri;exports.CardFooter=ni;exports.CardHeader=ti;exports.CardTitle=oi;exports.Carousel=hd;exports.CarouselArrows=Nr;exports.CarouselDots=Mr;exports.CarouselNext=co;exports.CarouselPrev=lo;exports.CarouselSlide=$o;exports.CarouselVideoSlide=Pr;exports.Checkbox=ii;exports.DatePicker=Rd;exports.DateRangePicker=Sd;exports.Dialog=kd;exports.DialogClose=Pd;exports.DialogContent=di;exports.DialogDescription=ui;exports.DialogFooter=pi;exports.DialogHeader=ci;exports.DialogOverlay=Er;exports.DialogPortal=li;exports.DialogTitle=mi;exports.DialogTrigger=Td;exports.DropdownMenu=Ld;exports.DropdownMenuCheckboxItem=vi;exports.DropdownMenuContent=hi;exports.DropdownMenuGroup=Dd;exports.DropdownMenuItem=bi;exports.DropdownMenuLabel=wi;exports.DropdownMenuPortal=Ad;exports.DropdownMenuRadioGroup=Fd;exports.DropdownMenuRadioItem=yi;exports.DropdownMenuSeparator=xi;exports.DropdownMenuShortcut=Ri;exports.DropdownMenuSub=Id;exports.DropdownMenuSubContent=fi;exports.DropdownMenuSubTrigger=gi;exports.DropdownMenuTrigger=Hd;exports.FRAGMENT_HEADER=Rl;exports.Flex=Ai;exports.GRADE_PRE_HYDRATION_SCRIPT=pp;exports.GradeModeSwitcher=Dm;exports.GradeThemeProvider=mp;exports.GradeThemeSwitcher=Mm;exports.Grid=Hi;exports.Input=Si;exports.Label=Ci;exports.LenisProvider=Sm;exports.Map=ha;exports.MapMarker=ba;exports.MediaSurface=ot;exports.MediaSurfaceContract=xr;exports.MultiSelect=Ti;exports.Popover=Je;exports.PopoverAnchor=yd;exports.PopoverContent=je;exports.PopoverTrigger=Qe;exports.Progress=ki;exports.RadioGroup=Pi;exports.RadioGroupItem=Mi;exports.ResizableHandle=Jd;exports.ResizablePanel=Xd;exports.ResizablePanelGroup=Zd;exports.RivePlayer=fl;exports.Row=Ei;exports.ScrollArea=Ii;exports.ScrollBar=Br;exports.Select=lc;exports.SelectContent=Bi;exports.SelectGroup=dc;exports.SelectItem=Oi;exports.SelectLabel=Gi;exports.SelectScrollDownButton=Or;exports.SelectScrollUpButton=Gr;exports.SelectSeparator=Vi;exports.SelectTrigger=zi;exports.SelectValue=cc;exports.Separator=ho;exports.ShaderCompileError=Jt;exports.ShaderPresetPicker=ym;exports.ShaderPresetPreview=br;exports.Sheet=gc;exports.SheetClose=hc;exports.SheetContent=Wi;exports.SheetDescription=Ki;exports.SheetFooter=Ui;exports.SheetHeader=$i;exports.SheetOverlay=Vr;exports.SheetPortal=_i;exports.SheetTitle=ji;exports.SheetTrigger=fc;exports.Sidebar=vt;exports.SidebarContent=Jr;exports.SidebarFooter=Qr;exports.SidebarHeader=Xr;exports.SidebarItem=ta;exports.SidebarSection=ea;exports.SidebarTreeItem=oa;exports.Skeleton=vc;exports.Slider=qi;exports.Sortable=Ec;exports.SortableGroup=Wr;exports.SortableHandle=Ur;exports.SortableItem=$r;exports.Stack=ns;exports.Switch=is;exports.Table=ss;exports.TableBody=ds;exports.TableCaption=gs;exports.TableCell=us;exports.TableFooter=cs;exports.TableHead=ms;exports.TableHeader=ls;exports.TableRow=ps;exports.Tabs=Fc;exports.TabsContent=Ms;exports.TabsList=Ts;exports.TabsTrigger=Ps;exports.Textarea=Ns;exports.ThemeToggle=Fm;exports.ThreeScene=hr;exports.Toggle=Ls;exports.ToggleGroup=As;exports.ToggleGroupItem=Is;exports.Toolbar=Fs;exports.ToolbarSlot=zs;exports.Tooltip=Lt;exports.TooltipContent=bt;exports.TooltipProvider=Kr;exports.TooltipTrigger=Ht;exports.VideoPlayer=gl;exports.appShellAsideVariants=Bn;exports.appShellFooterVariants=On;exports.appShellHeaderVariants=Fn;exports.appShellMainVariants=Gn;exports.appShellNavVariants=zn;exports.applyThemeToRoot=sr;exports.badgeVariants=Xn;exports.buildFragmentShaderScene=wa;exports.builtInThemes=tt;exports.buttonVariants=so;exports.calloutVariants=Ln;exports.calmInput=ko;exports.cn=n;exports.defaultPostPreset=gr;exports.defaultThemeId=Zt;exports.deleteUserTheme=pa;exports.duplicateTheme=cp;exports.energyInput=aa;exports.flexVariants=Di;exports.generateTheme=Dt;exports.getComponentContract=Xl;exports.getTheme=At;exports.gridVariants=Li;exports.listContractedComponents=Jl;exports.listThemes=da;exports.listUserThemes=Ys;exports.loadUserThemeInput=ca;exports.postPresets=Eo;exports.rowVariants=Ni;exports.saveUserTheme=dr;exports.sceneRegistry=Po;exports.shaderPresetById=No;exports.shaderPresets=Mo;exports.shellVariants=In;exports.stackVariants=as;exports.themeToCSSVars=ia;exports.toggleVariants=Es;exports.useCarouselApi=bd;exports.useGradeTheme=ga;exports.useMaybeGradeTheme=It;exports.usePrefersReducedMotion=Ft;//# sourceMappingURL=index.js.map
544
+ `,Do=class extends Error{log;source;constructor(t,o){super(`Fragment shader failed to compile:
545
+ ${t.trim()}`),this.name="ShaderCompileError",this.log=t,this.source=o;}};function _g(e,t){let o=e.getContext(),r=o.createShader(o.FRAGMENT_SHADER);if(!r)throw new Error("Unable to allocate fragment shader");o.shaderSource(r,t),o.compileShader(r);let n=o.getShaderParameter(r,o.COMPILE_STATUS),a=o.getShaderInfoLog(r)||"";if(o.deleteShader(r),!n)throw new Do(a,t)}function un(e){return ({renderer:t,width:o,height:r,palette:n})=>{let a=`${Ed}
546
+ ${e}`;_g(t,a);let l=new fe__namespace.Scene,p=new fe__namespace.OrthographicCamera(-1,1,1,-1,0,1),i={uTime:{value:0},uResolution:{value:new fe__namespace.Vector2(o,r)},uMouse:{value:new fe__namespace.Vector2(.5,.5)},uPrimary:{value:new fe__namespace.Color(n.primary)},uSecondary:{value:new fe__namespace.Color(n.secondary)},uAccent:{value:new fe__namespace.Color(n.accent)},uBackground:{value:new fe__namespace.Color(n.background)}},c=new fe__namespace.ShaderMaterial({uniforms:i,vertexShader:Vg,fragmentShader:a,depthTest:false,depthWrite:false}),d=new fe__namespace.PlaneGeometry(2,2),m=new fe__namespace.Mesh(d,c);return l.add(m),{scene:l,camera:p,update:u=>{i.uTime.value=u;},resize:(u,b)=>{i.uResolution.value.set(u,b);},setPalette:u=>{i.uPrimary.value.set(u.primary),i.uSecondary.value.set(u.secondary),i.uAccent.value.set(u.accent),i.uBackground.value.set(u.background);},setMouse:(u,b)=>{i.uMouse.value.set(u,b);},dispose:()=>{d.dispose(),c.dispose();}}}}var hr={primary:"#ff5fb9",secondary:"#9fe8ff",accent:"#ffc857",background:"#0a0a14"},Ug=/^[\d.]+\s+[\d.]+\s+[\d.]+(?:\s*\/\s*[\d.%]+)?$/,jg=/^[\d.]+\s+[\d.]+%\s+[\d.]+%(?:\s*\/\s*[\d.%]+)?$/,$g=/^\s*var\(\s*(--[^,)\s]+)(?:\s*,[^)]*)?\s*\)\s*$/;function na(e,t,o){if(typeof document>"u")return o;let r=e,n=$g.exec(e);if(n){let p=getComputedStyle(t).getPropertyValue(n[1]).trim();p&&(Ug.test(p)?r=`oklch(${p})`:jg.test(p)&&(r=`hsl(${p})`));}let a=document.createElement("span");if(a.style.color="",a.style.color=r,a.style.color==="")return o;a.style.display="none",t.appendChild(a);let l=getComputedStyle(a).color;if(t.removeChild(a),!l)return o;if(l.startsWith("rgb"))return l;try{let p=document.createElement("canvas");p.width=1,p.height=1;let i=p.getContext("2d");if(!i)return l;i.clearRect(0,0,1,1),i.fillStyle=l,i.fillRect(0,0,1,1);let[c,d,m]=i.getImageData(0,0,1,1).data;return `rgb(${c}, ${d}, ${m})`}catch{return l}}function Ld(e,t){return {primary:na(e.primary,t,hr.primary),secondary:na(e.secondary,t,hr.secondary),accent:na(e.accent,t,hr.accent),background:na(e.background,t,hr.background)}}var ia=S__namespace.forwardRef(({preset:e,fragmentShader:t,onShaderError:o,postPreset:r,palette:n,createScene:a,controls:l=false,autoPlay:p=true,pauseOffscreen:i=true,aspect:c="video",radius:d="lg",border:m=false,poster:g,label:u,className:b,style:h,maxDpr:f},y)=>{let R=S__namespace.useRef(null),[x,k]=S__namespace.useState(p),[T,O]=S__namespace.useState(false),D=go(),E=S__namespace.useMemo(()=>({...hr,...n}),[n]),$=S__namespace.useMemo(()=>a||(t?un(t):e&&mr[e]?mr[e]:null),[a,t,e]),H=S__namespace.useMemo(()=>{if(r)return r;if(e){let N=gr[e];if(N?.defaultPostPreset)return N.defaultPostPreset}return aa},[r,e]);S__namespace.useEffect(()=>{let N=R.current;if(!N||!$)return;let X=N.clientWidth||1,L=N.clientHeight||1,Y=Ld(E,N),v=new fe__namespace.WebGLRenderer({antialias:true,alpha:false,powerPreference:"high-performance"}),W=f??Math.min(window.devicePixelRatio||1,2);v.setPixelRatio(W),v.setSize(X,L),v.setClearColor(new fe__namespace.Color(Y.background),1),v.domElement.dataset.gdsPart="shader-canvas",v.domElement.style.width="100%",v.domElement.style.height="100%",v.domElement.style.display="block",N.appendChild(v.domElement);let I;try{I=$({renderer:v,width:X,height:L,palette:Y});}catch(Z){if(Z instanceof Do)o?.(Z),I=mr.space({renderer:v,width:X,height:L,palette:Y});else throw v.dispose(),v.domElement.parentElement===N&&N.removeChild(v.domElement),Z}let le=fr[H]??fr[aa],J=kd({renderer:v,scene:I.scene,camera:I.camera,preset:le,width:X,height:L}),he=new fe__namespace.Clock,ne=0,be=p&&!D,Be=true,A=()=>{if(ne=requestAnimationFrame(A),!be||i&&!Be)return;let Z=he.getDelta(),ie=he.getElapsedTime();I.update?.(ie,Z),J.composer.render(Z);};A(),be&&O(true);let ce=new ResizeObserver(([Z])=>{let ie=Math.max(1,Math.floor(Z.contentRect.width)),ze=Math.max(1,Math.floor(Z.contentRect.height));v.setSize(ie,ze),J.resize(ie,ze),I.resize?.(ie,ze);});ce.observe(N);let Q=new IntersectionObserver(([Z])=>{Be=Z.isIntersecting;},{threshold:.05});Q.observe(N);let Ge=new MutationObserver(()=>{if(!R.current)return;let Z=Ld(E,R.current);v.setClearColor(new fe__namespace.Color(Z.background),1),I.setPalette?.(Z);});Ge.observe(document.documentElement,{attributes:true,attributeFilter:["class","style","data-theme","data-gds-theme","data-grade-mode"]});let oe=I,Re=oe.setMouse?Z=>{let ie=N.getBoundingClientRect(),ze=(Z.clientX-ie.left)/ie.width,to=1-(Z.clientY-ie.top)/ie.height;oe.setMouse(ze,to);}:null;return Re&&N.addEventListener("pointermove",Re),F.current={toggle:()=>{be=!be,k(be);},setPalette:Z=>{v.setClearColor(new fe__namespace.Color(Z.background),1),I.setPalette?.(Z);},setPostPreset:Z=>{let ie=fr[Z];ie&&J.setPreset(ie);}},()=>{cancelAnimationFrame(ne),ce.disconnect(),Q.disconnect(),Ge.disconnect(),Re&&N.removeEventListener("pointermove",Re),J.dispose(),I.dispose?.(),v.dispose(),v.domElement.parentElement===N&&N.removeChild(v.domElement),F.current=null;}},[$,H,E,p,D,i,f,o]);let F=S__namespace.useRef(null),j=()=>F.current?.toggle();return S__namespace.createElement(Tt,{ref:N=>{R.current=N,typeof y=="function"?y(N):y&&(y.current=N);},aspect:c,radius:d,border:m,"aria-label":u,className:b,style:h,"data-gds-part":"three-scene"},!T&&g&&S__namespace.createElement("img",{src:g,alt:"",className:"absolute inset-0 w-full h-full object-cover","data-gds-part":"scene-poster"}),l&&S__namespace.createElement("div",{"data-gds-part":"scene-controls",className:s("absolute inset-0 flex items-end justify-end p-2","opacity-0 hover:opacity-100 transition-opacity","bg-gradient-to-t from-black/30 to-transparent")},S__namespace.createElement(We,{size:"icon",variant:"secondary",onClick:j},x?S__namespace.createElement(lucideReact.Pause,{className:"h-4 w-4"}):S__namespace.createElement(lucideReact.Play,{className:"h-4 w-4"}))))});ia.displayName="ThreeScene";var sa=S__namespace.forwardRef(({preset:e,live:t="hover",postPreset:o,palette:r,className:n,aspect:a="video",radius:l="lg",label:p,hideLabel:i=false,onClick:c},d)=>{let m=gr[e],[g,u]=S__namespace.useState(false),b=t==="always"||t==="hover"&&g;return S__namespace.createElement("div",{ref:d,"data-gds-part":"picker-card","data-gds-preset":e,onMouseEnter:()=>u(true),onMouseLeave:()=>u(false),onClick:c,className:s("group cursor-pointer flex flex-col gap-2",n)},b?S__namespace.createElement(ia,{preset:e,postPreset:o,palette:r,aspect:a,radius:l,autoPlay:true,controls:false,pauseOffscreen:true,poster:m?.poster,maxDpr:1}):S__namespace.createElement(Tt,{aspect:a,radius:l,"data-gds-part":"preset-poster",className:"bg-gradient-to-br from-muted to-muted/50"},m?.poster?S__namespace.createElement("img",{src:m.poster,alt:m.label,className:"w-full h-full object-cover"}):S__namespace.createElement("div",{className:"absolute inset-0 flex items-center justify-center text-xs text-muted-foreground"},m?.label??e)),!i&&S__namespace.createElement("div",{className:"flex items-baseline justify-between text-xs"},S__namespace.createElement("span",{className:"font-medium text-foreground","data-gds-part":"preset-label"},p??m?.label??e),m?.tags?.[0]&&S__namespace.createElement("span",{className:"text-muted-foreground"},m.tags[0])))});sa.displayName="ShaderPresetPreview";function qg({value:e,onChange:t,filterTags:o,live:r="hover",postPreset:n,palette:a,columns:l=3,className:p}){let i=S__namespace.useMemo(()=>o?.length?ur.filter(d=>o.some(m=>d.tags.includes(m))):ur,[o]);return S__namespace.createElement("div",{"data-gds-part":"preset-grid",role:"radiogroup",className:s("grid grid-cols-2 gap-3",l===2?"md:grid-cols-2":l===4?"md:grid-cols-4":"md:grid-cols-3",p)},i.map(d=>{let m=e===d.id;return S__namespace.createElement("div",{key:d.id,className:"relative",role:"radio","aria-checked":m},S__namespace.createElement(sa,{preset:d.id,postPreset:n,palette:a,live:r,onClick:()=>t?.(d.id),className:s("transition-all",m&&"ring-2 ring-primary ring-offset-2 ring-offset-background rounded-lg")}),m&&S__namespace.createElement("div",{"data-gds-part":"picker-selected-badge",className:"absolute top-2 right-2 rounded-full bg-primary text-primary-foreground p-1 shadow-sm"},S__namespace.createElement(lucideReact.Check,{className:"h-3.5 w-3.5"})))}))}function Jg({children:e}){let t=S.useRef(null);return S.useEffect(()=>{let o=new Xg__default.default({duration:1.2,easing:n=>Math.min(1,1.001-Math.pow(2,-10*n)),orientation:"vertical",gestureOrientation:"vertical",smoothWheel:true});t.current=o;function r(n){o.raf(n),requestAnimationFrame(r);}return requestAnimationFrame(r),()=>{o.destroy(),t.current=null;}},[]),React.createElement(React.Fragment,null,e)}function rf({className:e}){let t=uo();if(!t)return null;let{theme:o,themes:r,setThemeId:n,deleteTheme:a}=t;return S__namespace.createElement(Rt,null,S__namespace.createElement(St,{asChild:true},S__namespace.createElement(We,{variant:"ghost",size:"sm",className:s("gap-2",e),"aria-label":"Switch theme"},S__namespace.createElement(lucideReact.Palette,{className:"h-4 w-4"}),S__namespace.createElement("span",{className:"hidden sm:inline"},o.name))),S__namespace.createElement(ht,{className:"w-80 p-2",align:"end"},S__namespace.createElement("div",{className:"flex items-start justify-between gap-2 px-2 py-1.5 mb-1"},S__namespace.createElement("div",null,S__namespace.createElement("div",{className:"text-xs font-medium text-muted-foreground"},"Theme"),S__namespace.createElement("div",{className:"text-xs text-muted-foreground/80"},"Switch the skin applied site-wide.")),S__namespace.createElement("button",{type:"button",onClick:()=>en(o),className:"flex items-center gap-1 rounded-md border border-border px-2 py-1 text-[10px] font-medium text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",title:"Download the active theme as a markdown spec \u2014 paste into a fresh LLM prompt"},S__namespace.createElement(lucideReact.Download,{className:"h-3 w-3"}),".md")),S__namespace.createElement("div",{className:"flex flex-col gap-0.5"},r.map(l=>{let p=l.id===o.id,i=l.id in kt,c=l.ramps.primary[500],d=l.ramps.accent[500],m=l.ramps.neutral[500];return S__namespace.createElement("div",{key:l.id,className:s("group flex items-start gap-3 rounded-md px-2 py-2 text-left transition-colors","hover:bg-muted",p&&"bg-muted")},S__namespace.createElement("button",{type:"button",onClick:()=>n(l.id),className:"flex items-start gap-3 flex-1 min-w-0 text-left"},S__namespace.createElement("div",{className:"mt-0.5 flex shrink-0 overflow-hidden rounded-md border border-border"},S__namespace.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${c})`},"aria-hidden":true}),S__namespace.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${d})`},"aria-hidden":true}),S__namespace.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${m})`},"aria-hidden":true})),S__namespace.createElement("div",{className:"min-w-0 flex-1"},S__namespace.createElement("div",{className:"flex items-center gap-2"},S__namespace.createElement("span",{className:"text-sm font-medium truncate text-foreground"},l.name),l.tagline&&S__namespace.createElement("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground shrink-0"},l.tagline)),l.description&&S__namespace.createElement("div",{className:"text-xs text-muted-foreground line-clamp-2"},l.description))),p&&S__namespace.createElement(lucideReact.Check,{className:"mt-2 h-4 w-4 shrink-0 text-primary"}),!i&&!p&&S__namespace.createElement("button",{type:"button",onClick:g=>{g.stopPropagation(),a(l.id);},className:"mt-1 opacity-0 group-hover:opacity-100 transition-opacity rounded p-1 hover:bg-destructive/10 hover:text-destructive","aria-label":`Delete theme ${l.name}`},S__namespace.createElement(lucideReact.Trash2,{className:"h-3.5 w-3.5"})))}))))}var Dd=[{mode:"superLight",label:"Super light",icon:lucideReact.SunDim,tooltip:"Super light \u2014 airy, low contrast"},{mode:"light",label:"Light",icon:lucideReact.Sun,tooltip:"Light"},{mode:"dark",label:"Dark",icon:lucideReact.Moon,tooltip:"Dark"},{mode:"superDark",label:"Super dark",icon:lucideReact.MoonStar,tooltip:"Super dark \u2014 OLED, high contrast"}];function df({className:e,variant:t="icons"}){let o=uo();if(!o)return null;let{mode:r,setMode:n}=o;return t==="labeled"?S__namespace.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:s("inline-flex flex-wrap gap-1 rounded-md border border-border bg-background p-1",e)},Dd.map(({mode:a,label:l,icon:p})=>{let i=r===a;return S__namespace.createElement("button",{key:a,type:"button",role:"radio","aria-checked":i,onClick:()=>n(a),className:s("flex items-center gap-2 rounded px-3 py-1.5 text-sm transition-colors",i?"bg-primary text-primary-foreground":"hover:bg-accent hover:text-accent-foreground")},S__namespace.createElement(p,{className:"h-4 w-4"}),S__namespace.createElement("span",null,l))})):S__namespace.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:s("inline-flex items-center gap-0.5 rounded-md border border-border bg-background p-0.5",e)},Dd.map(({mode:a,icon:l,tooltip:p})=>{let i=r===a;return S__namespace.createElement("button",{key:a,type:"button",role:"radio","aria-checked":i,"aria-label":p,title:p,onClick:()=>n(a),className:s("flex h-7 w-7 items-center justify-center rounded transition-colors",i?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground")},S__namespace.createElement(l,{className:"h-3.5 w-3.5"}))}))}function mf(){let{isDark:e,setMode:t}=sn();return React.createElement(We,{variant:"ghost",size:"sm",onClick:()=>t(e?"light":"dark"),className:"gap-2","aria-label":e?"Switch to light mode":"Switch to dark mode"},e?React.createElement(React.Fragment,null,React.createElement(lucideReact.Sun,{className:"h-4 w-4"}),React.createElement("span",{className:"hidden sm:inline"},"Light")):React.createElement(React.Fragment,null,React.createElement(lucideReact.Moon,{className:"h-4 w-4"}),React.createElement("span",{className:"hidden sm:inline"},"Dark")))}exports.ALL_MODES=nd;exports.Accordion=mc;exports.AccordionContent=ki;exports.AccordionItem=Si;exports.AccordionTrigger=Ci;exports.AppShell=Fi;exports.AppShellAside=Oi;exports.AppShellFooter=_i;exports.AppShellHeader=Bi;exports.AppShellMain=Vi;exports.AppShellNav=zi;exports.Avatar=Wi;exports.AvatarFallback=ji;exports.AvatarImage=Ui;exports.BUILT_IN_INPUTS=Zr;exports.Badge=Tr;exports.Banner=Yi;exports.BlinkingCursor=Dr;exports.Breadcrumb=Cl;exports.BreadcrumbEllipsis=El;exports.BreadcrumbItem=Tl;exports.BreadcrumbLink=Pl;exports.BreadcrumbList=kl;exports.BreadcrumbMenuTrigger=Ll;exports.BreadcrumbPage=Ml;exports.BreadcrumbSeparator=Nl;exports.Button=We;exports.COMPONENT_CONTRACTS=fa;exports.Calendar=Mr;exports.CalendarDayButton=Xi;exports.Callout=Pi;exports.CalloutDescription=Ni;exports.CalloutTitle=Mi;exports.Card=Ji;exports.CardContent=os;exports.CardDescription=ts;exports.CardFooter=rs;exports.CardHeader=Qi;exports.CardTitle=es;exports.Carousel=Lc;exports.CarouselArrows=ya;exports.CarouselDots=va;exports.CarouselNext=Ko;exports.CarouselPrev=$o;exports.CarouselSlide=Nr;exports.CarouselVideoSlide=ba;exports.Checkbox=as;exports.Code=ds;exports.Composer=gs;exports.ComposerReply=Kp;exports.DEMO_SPEED_PRESETS=ko;exports.DatePicker=Xp;exports.DateRangePicker=Jp;exports.DemoStage=is;exports.Dialog=em;exports.DialogClose=om;exports.DialogContent=bs;exports.DialogDescription=ws;exports.DialogFooter=ys;exports.DialogHeader=vs;exports.DialogOverlay=Ra;exports.DialogPortal=hs;exports.DialogTitle=xs;exports.DialogTrigger=tm;exports.DropdownMenu=im;exports.DropdownMenuCheckboxItem=Ts;exports.DropdownMenuContent=Cs;exports.DropdownMenuGroup=lm;exports.DropdownMenuItem=ks;exports.DropdownMenuLabel=Ms;exports.DropdownMenuPortal=dm;exports.DropdownMenuRadioGroup=pm;exports.DropdownMenuRadioItem=Ps;exports.DropdownMenuSeparator=Ns;exports.DropdownMenuShortcut=Es;exports.DropdownMenuSub=cm;exports.DropdownMenuSubContent=Ss;exports.DropdownMenuSubTrigger=Rs;exports.DropdownMenuTrigger=sm;exports.FRAGMENT_HEADER=Ed;exports.Flex=Gs;exports.GRADE_PRE_HYDRATION_SCRIPT=Vu;exports.GradeModeSwitcher=df;exports.GradeThemeProvider=_u;exports.GradeThemeSwitcher=rf;exports.Grid=Vs;exports.Input=Ls;exports.Label=Ds;exports.LenisProvider=Jg;exports.Map=dn;exports.MapMarker=cn;exports.MediaSurface=Tt;exports.MediaSurfaceContract=ma;exports.Message=Kc;exports.MultiSelect=Hs;exports.Popover=Rt;exports.PopoverAnchor=qp;exports.PopoverContent=ht;exports.PopoverTrigger=St;exports.Progress=As;exports.RadioGroup=Is;exports.RadioGroupItem=Fs;exports.ResizableHandle=Pm;exports.ResizablePanel=Tm;exports.ResizablePanelGroup=km;exports.Reveal=ss;exports.RivePlayer=Sd;exports.Row=zs;exports.ScrollArea=Ws;exports.ScrollBar=Ea;exports.Select=Bm;exports.SelectContent=$s;exports.SelectGroup=zm;exports.SelectItem=qs;exports.SelectLabel=Ks;exports.SelectScrollDownButton=Da;exports.SelectScrollUpButton=La;exports.SelectSeparator=Ys;exports.SelectTrigger=js;exports.SelectValue=Om;exports.Separator=tr;exports.ShaderCompileError=Do;exports.ShaderPresetPicker=qg;exports.ShaderPresetPreview=sa;exports.Sheet=Wm;exports.SheetClose=jm;exports.SheetContent=Xs;exports.SheetDescription=tl;exports.SheetFooter=Qs;exports.SheetHeader=Js;exports.SheetOverlay=Aa;exports.SheetPortal=Zs;exports.SheetTitle=el;exports.SheetTrigger=Um;exports.Sidebar=Yt;exports.SidebarContent=Ua;exports.SidebarFooter=ja;exports.SidebarHeader=Wa;exports.SidebarItem=Ka;exports.SidebarSection=$a;exports.SidebarTreeItem=qa;exports.Skeleton=Km;exports.Slider=ol;exports.Sortable=nu;exports.SortableGroup=Ia;exports.SortableHandle=Ba;exports.SortableItem=Fa;exports.Stack=ul;exports.Switch=gl;exports.Table=fl;exports.TableBody=bl;exports.TableCaption=Rl;exports.TableCell=wl;exports.TableFooter=vl;exports.TableHead=xl;exports.TableHeader=hl;exports.TableRow=yl;exports.Tabs=pu;exports.TabsContent=Fl;exports.TabsList=Hl;exports.TabsTrigger=Il;exports.Textarea=Bl;exports.ThemeToggle=mf;exports.ThreeScene=ia;exports.Toggle=Ol;exports.ToggleGroup=Gl;exports.ToggleGroupItem=Wl;exports.Toolbar=Ul;exports.ToolbarSlot=jl;exports.Tooltip=lo;exports.TooltipContent=qt;exports.TooltipProvider=Oa;exports.TooltipTrigger=co;exports.VideoPlayer=Rd;exports.appShellAsideVariants=Ai;exports.appShellFooterVariants=Ii;exports.appShellHeaderVariants=Li;exports.appShellMainVariants=Hi;exports.appShellNavVariants=Di;exports.applyThemeToRoot=Xr;exports.badgeVariants=Ki;exports.bannerVariants=qi;exports.buildFragmentShaderScene=un;exports.builtInThemes=kt;exports.buttonVariants=jo;exports.calloutVariants=Ti;exports.calmInput=cr;exports.cn=s;exports.defaultPostPreset=aa;exports.defaultThemeId=Eo;exports.deleteUserTheme=rn;exports.demoSleep=re;exports.demoTypeText=Er;exports.duplicateTheme=Ou;exports.energyInput=Za;exports.flexVariants=_s;exports.generateTheme=po;exports.getComponentContract=sc;exports.getTheme=mo;exports.gridVariants=Os;exports.listContractedComponents=lc;exports.listThemes=tn;exports.listUserThemes=rd;exports.loadUserThemeInput=on;exports.postPresets=fr;exports.rowVariants=Bs;exports.saveUserTheme=Qr;exports.sceneRegistry=mr;exports.shaderPresetById=gr;exports.shaderPresets=ur;exports.shellVariants=Ei;exports.stackVariants=ml;exports.themeToCSSVars=Ja;exports.toggleVariants=zl;exports.useCarouselApi=Dc;exports.useGradeTheme=sn;exports.useMaybeGradeTheme=uo;exports.usePrefersReducedMotion=go;exports.useScriptedDemo=jt;//# sourceMappingURL=index.js.map
494
547
  //# sourceMappingURL=index.js.map