@archieai/ui 2.1.0 → 2.1.1
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.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1474 -1448
- package/dist/index.js.map +1 -1
- package/dist/platform/PlatformProvider.d.ts +2 -0
- package/dist/platform/PlatformProvider.d.ts.map +1 -1
- package/dist/platform/index.d.ts +1 -1
- package/dist/platform/index.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("react"),q=require("framer-motion"),i=require("./Search-DR0PlkBC.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("react"),q=require("framer-motion"),i=require("./Search-DR0PlkBC.cjs"),pa=require("@radix-ui/react-tabs"),ie=require("sonner"),xa=require("@radix-ui/react-tooltip"),fa=require("@radix-ui/react-dialog"),ua=require("@radix-ui/react-visually-hidden");function Ue(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const o in r)if(o!=="default"){const a=Object.getOwnPropertyDescriptor(r,o);Object.defineProperty(t,o,a.get?a:{enumerable:!0,get:()=>r[o]})}}return t.default=r,Object.freeze(t)}const Fe=Ue(j),Ce=Ue(pa),we=Ue(xa),de=Ue(fa),Or=Ue(ua),ga={font:"'Geist', system-ui, sans-serif",monoFont:"'Geist Mono', monospace",bodySize:16,bodyLineHeight:24,bodyWeight:300,headingWeight:600,buttonHeight:{sm:32,md:40,lg:48},inputHeight:40,radii:{sm:4,md:6,lg:8,xl:12},shadows:{sm:"0 1px 2px rgba(0,0,0,0.05)",md:"0 4px 6px rgba(0,0,0,0.07)",lg:"0 10px 20px rgba(0,0,0,0.1)"},spacing:[0,4,8,12,16,24,32,48,64],animation:{duration:"150ms",easing:"ease"}},ma={font:"-apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', system-ui, sans-serif",monoFont:"'SF Mono', 'Menlo', monospace",bodySize:13,bodyLineHeight:18,bodyWeight:400,headingWeight:600,buttonHeight:{sm:22,md:28,lg:32},inputHeight:22,radii:{sm:4,md:6,lg:10,xl:14},shadows:{sm:"0 0.5px 1px rgba(0,0,0,0.04)",md:"0 2px 8px rgba(0,0,0,0.06)",lg:"0 8px 24px rgba(0,0,0,0.08)"},spacing:[0,4,8,12,16,20,24,32,40],animation:{duration:"300ms",easing:"cubic-bezier(0.2, 0.8, 0.2, 1)"}},ha={font:"'Segoe UI Variable', 'Segoe UI', system-ui, sans-serif",monoFont:"'Cascadia Code', 'Consolas', monospace",bodySize:14,bodyLineHeight:20,bodyWeight:400,headingWeight:600,buttonHeight:{sm:24,md:32,lg:40},inputHeight:32,radii:{sm:2,md:4,lg:6,xl:8},shadows:{sm:"0 1px 2px rgba(0,0,0,0.08), 0 0 1px rgba(0,0,0,0.06)",md:"0 2px 4px rgba(0,0,0,0.1), 0 0 1px rgba(0,0,0,0.06)",lg:"0 8px 16px rgba(0,0,0,0.14), 0 0 1px rgba(0,0,0,0.06)"},spacing:[0,2,4,8,12,16,24,32,48],animation:{duration:"250ms",easing:"cubic-bezier(0.1, 0.9, 0.2, 1)"}},zr={web:ga,mac:ma,windows:ha},ba="archie",va="web",ya="Archie",ja="Clean, professional, fintech. An AI accounting assistant that feels trustworthy, precise, and modern. Think premium SaaS — spacious layouts, subtle shadows, confident typography. Designed for accountants who need clarity and speed.",wa={primary:{200:"#d6f4ff",400:"#6aeafd",800:"#15b1cd",1e3:"#022e40"},accent:{200:"#fff2e2",800:"#ff6f00",1e3:"#e15713"},neutral:{50:"#fafafc",100:"#f5f6fa",200:"#e5e7f0",600:"#8c92af",800:"#595f7a",1e3:"#000626",white:"#ffffff"},status:{error:"#fb6060","error-bg":"#ffecec",success:"#71d481","success-bg":"#e2f7e5",warning:"#8f6c1a","warning-bg":"#fff2e2"},entity:{mint:{bg:"#DAFBE1",text:"#15803D"},sky:{bg:"#E0F2FF",text:"#0369A1"},lavender:{bg:"#E4E4F8",text:"#6D28D9"},rose:{bg:"#FEE2E5",text:"#BE123C"},peach:{bg:"#FFE5D2",text:"#C2410C"},teal:{bg:"#ccfbf1",text:"#0d9488"}}},Ca={heading:{family:"Geist",weights:"600, 700",style:"Sans-serif, clean, modern — confident and precise"},body:{family:"Geist",weights:"400, 500, 600"},scale:[{name:"display",size:"48px",weight:"700",lineHeight:"1.1"},{name:"h1",size:"36px",weight:"700",lineHeight:"1.2"},{name:"h2",size:"28px",weight:"600",lineHeight:"1.25"},{name:"h3",size:"22px",weight:"600",lineHeight:"1.3"},{name:"h4",size:"18px",weight:"600",lineHeight:"1.4"},{name:"body",size:"15px",weight:"400",lineHeight:"1.5"},{name:"small",size:"13px",weight:"400",lineHeight:"1.43"},{name:"x-small",size:"11px",weight:"400",lineHeight:"1.33"},{name:"column-header",size:"10px",weight:"700",lineHeight:"1.6"},{name:"tag",size:"10px",weight:"500",lineHeight:"1.6"}]},Sa={sm:"0 1px 2px rgba(0,0,0,0.05)",md:"0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.07)",lg:"0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.08)",xl:"0 20px 25px rgba(0,0,0,0.08), 0 8px 10px rgba(0,0,0,0.08)"},ka=[4,8,12,16,20,24,32,40,48,64],Na={sm:4,md:6,lg:8,xl:12,"2xl":16,full:9999},za={sidebar:"60px icon rail (240px expanded), navy #022e40 background",content:"flexible, chat-container max-width: 720px",windowSize:"1440x900",platform:{windowChrome:"browser"}},Ta=`33-component @archieai/ui library (CVA + Radix + Framer Motion):
|
|
2
2
|
ATOMS: Avatar (circular/square, sm/lg), StatusIndicator, Typography (display/h1-h4/body/small/tiny/x-small/tag), Logos (LogoA, SignatureA, FullLogo), Icons (305 SVG icons)
|
|
3
3
|
MOLECULES: Button (primary/secondary/tertiary/cta/danger, brand/neutral tone, sm/md/lg), Input, TextArea, Checkbox, Toggle (sm/md/lg), RangeInput, Dropdown, Tabs (TabsList/TabsTrigger/TabsContent), Chip (file/template/client/agent/workstream), Tag, Breadcrumbs, ProgressBar, CircularProgress, LoadingSpinner, MessageBubble (assistant/user), Toast (info/success/warning/error/prompt), StatusMessage, Timestamp, FileIcon, SidebarItem, Tooltip, Modal, ArtifactCard (normal/hover/generating/error), DataAccordion, CopyButton, AutopilotAction
|
|
4
4
|
ORGANISMS: ConversationHeader, Modal (full)
|
|
@@ -9,7 +9,7 @@ Key patterns:
|
|
|
9
9
|
- Active nav: teal #15b1cd left border + light teal bg
|
|
10
10
|
- Sidebar: narrow icon rail with icon + label, navy #022e40 background
|
|
11
11
|
- Status badges: colored entity palette (mint/sky/lavender/rose/peach/teal)
|
|
12
|
-
- Two Inbox layout: My Inbox (human attention) + Archie's Inbox (AI supervisory dashboard)
|
|
12
|
+
- Two Inbox layout: My Inbox (human attention) + Archie's Inbox (AI supervisory dashboard)`,$a="Archie/Web",Tr={id:ba,platform:va,name:ya,personality:ja,colors:wa,typography:Ca,shadows:Sa,spacing:ka,radii:Na,layout:za,components:Ta,figmaCollectionPrefix:$a},La="archie",Ma="mac",Aa="Archie",Ra="Clean, professional, fintech for native macOS. Archie as a first-class Mac citizen — feels at home on macOS with vibrancy, native controls, and the same trustworthy precision. Sidebar adapts to macOS conventions while keeping Archie's teal/navy identity.",Fa={primary:{200:"#d6f4ff",400:"#6aeafd",800:"#15b1cd",1e3:"#022e40"},accent:{200:"#fff2e2",800:"#ff6f00",1e3:"#e15713"},neutral:{50:"#fafafc",100:"#f5f6fa",200:"#e5e7f0",600:"#8c92af",800:"#595f7a",1e3:"#000626",white:"#ffffff"},status:{error:"#fb6060","error-bg":"#ffecec",success:"#71d481","success-bg":"#e2f7e5",warning:"#8f6c1a","warning-bg":"#fff2e2"},entity:{mint:{bg:"#DAFBE1",text:"#15803D"},sky:{bg:"#E0F2FF",text:"#0369A1"},lavender:{bg:"#E4E4F8",text:"#6D28D9"},rose:{bg:"#FEE2E5",text:"#BE123C"},peach:{bg:"#FFE5D2",text:"#C2410C"},teal:{bg:"#ccfbf1",text:"#0d9488"}}},Ba={heading:{family:"Geist",weights:"600, 700",style:"Sans-serif, clean, modern — confident and precise, feels native on macOS"},body:{family:"Geist",weights:"400, 500, 600"},scale:[{name:"display",size:"40px",weight:"700",lineHeight:"1.1"},{name:"h1",size:"28px",weight:"700",lineHeight:"1.2"},{name:"h2",size:"22px",weight:"600",lineHeight:"1.25"},{name:"h3",size:"18px",weight:"600",lineHeight:"1.3"},{name:"h4",size:"15px",weight:"600",lineHeight:"1.4"},{name:"body",size:"13px",weight:"400",lineHeight:"1.5"},{name:"small",size:"12px",weight:"400",lineHeight:"1.43"},{name:"x-small",size:"11px",weight:"400",lineHeight:"1.33"},{name:"column-header",size:"10px",weight:"700",lineHeight:"1.6"},{name:"tag",size:"10px",weight:"500",lineHeight:"1.6"}]},Ia={sm:"0 1px 2px rgba(0,0,0,0.05)",md:"0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.07)",lg:"0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.08)",xl:"0 20px 25px rgba(0,0,0,0.08), 0 8px 10px rgba(0,0,0,0.08)"},Da=[4,8,12,16,20,24,32,40,48,64],Wa={sm:4,md:6,lg:8,xl:12,"2xl":16,full:9999},Pa={sidebar:"52px icon rail (220px expanded), navy #022e40 background with vibrancy",content:"flexible, max-width: 680px for conversation area",windowSize:"1512x982",platform:{windowChrome:"macos-native",vibrancy:!0,trafficLights:{x:16,y:12,size:12},titleBarHeight:28,toolbarHeight:44}},Ea=`Archie macOS components (SwiftUI/AppKit native + Geist-branded elements):
|
|
13
13
|
NATIVE SHELL: macOSWindowChrome (title bar + traffic lights), macOSToolbar (toolbar area), macOSSidebar (vibrancy sidebar)
|
|
14
14
|
INBOX: InboxRow (email/notification item), InboxFilter (category tabs), InboxBadge (unread count)
|
|
15
15
|
AI PANEL: ArchieMessage (AI response bubble), HumanMessage (user bubble), TypingIndicator, ActionCard (AI action requiring approval)
|
|
@@ -22,16 +22,16 @@ Key macOS patterns:
|
|
|
22
22
|
- Active nav item: teal #15b1cd fill + white icon
|
|
23
23
|
- Content area: plain white #ffffff (no vibrancy)
|
|
24
24
|
- Two Inbox layout: sidebar nav item per inbox, split-view pane on right
|
|
25
|
-
- Minimum touch/click target: 28x28px (macOS guideline)`,
|
|
25
|
+
- Minimum touch/click target: 28x28px (macOS guideline)`,Va="Archie/Mac",Pt={id:La,platform:Ma,name:Aa,personality:Ra,colors:Fa,typography:Ba,shadows:Ia,spacing:Da,radii:Wa,layout:Pa,components:Ea,figmaCollectionPrefix:Va},Ha="martha",_a="web",Oa="Martha",Ga="Warm, editorial, craftsperson. The feeling of a master artisan's studio — confident, considered, precise. Not corporate. Not cold. Tactile and human. A workspace that feels like a well-worn leather notebook.",Ua={primary:{50:"#FDF5F3",100:"#FCE8E4",200:"#F9D0C8",300:"#F5B1A4",400:"#E69180",500:"#D97F6F",600:"#C66656",700:"#A54E41",800:"#7D3A30",900:"#562821"},accent:{50:"#FDF9EF",100:"#FBF1D9",200:"#F7E3B3",300:"#F1D288",400:"#E8C163",500:"#E0B666",600:"#D4A54E",700:"#B88C3A",800:"#8F6B2C",900:"#654C1F"},neutral:{50:"#FDFCFA",100:"#FBF9F8",200:"#F5F1EC",300:"#E8E0D5",400:"#A8A29E",500:"#A39686",600:"#6B5D52",700:"#44403C",800:"#2F241B",900:"#1C1917"},status:{success:"#52A560",warning:"#E8A93A",error:"#C0392B",info:"#6B9BD1"}},Ya={heading:{family:"Geist",weights:"600, 700",style:"Sans-serif, clean, modern — warm and considered, never corporate"},body:{family:"Geist",weights:"400, 500"},scale:[{name:"display-xl",size:"48px",weight:"700",lineHeight:"1.1"},{name:"display-lg",size:"36px",weight:"700",lineHeight:"1.15"},{name:"heading-lg",size:"28px",weight:"600",lineHeight:"1.3"},{name:"heading-md",size:"20px",weight:"600",lineHeight:"1.35"},{name:"heading-sm",size:"16px",weight:"600",lineHeight:"1.4"},{name:"body-lg",size:"16px",weight:"400",lineHeight:"1.5"},{name:"body-md",size:"14px",weight:"400",lineHeight:"1.5"},{name:"body-sm",size:"12px",weight:"400",lineHeight:"1.5"},{name:"caption",size:"11px",weight:"500",lineHeight:"1.4"},{name:"overline",size:"10px",weight:"600",lineHeight:"1.4"}]},Ka={sm:"0 1px 2px rgba(47,36,27,0.06)",md:"0 4px 8px rgba(47,36,27,0.08)",lg:"0 12px 24px rgba(47,36,27,0.12)",xl:"0 20px 25px rgba(47,36,27,0.15)",glow:"0 8px 24px rgba(217,127,111,0.35)"},Za=[4,8,12,16,20,24,32,40,48,64],Xa={sm:4,md:6,lg:8,xl:12,"2xl":16,full:9999},qa={sidebar:"240–260px full sidebar, neutral-100 background",content:"flexible",windowSize:"1440x900",platform:{windowChrome:"browser"}},Ja=`21-component Warm Atelier library:
|
|
26
26
|
Button (primary/secondary/ghost/destructive/outline, sm/md/lg)
|
|
27
27
|
Card, Input, TextArea, Select, Checkbox, Toggle
|
|
28
28
|
Avatar (xs/sm/md/lg/xl), Badge (default/coral/gold/success/warning/error/info)
|
|
29
|
-
Modal, Sidebar, NavItem, Tab, Table, Breadcrumb, Tooltip, Divider, Skeleton, ProgressBar`,
|
|
29
|
+
Modal, Sidebar, NavItem, Tab, Table, Breadcrumb, Tooltip, Divider, Skeleton, ProgressBar`,Qa="Warm Atelier",Et={id:Ha,platform:_a,name:Oa,personality:Ga,colors:Ua,typography:Ya,shadows:Ka,spacing:Za,radii:Xa,layout:qa,components:Ja,figmaCollectionPrefix:Qa},en="martha",rn="mac",tn="Martha",on="Warm, editorial, craftsperson on native macOS. Martha as a first-class Mac citizen — the same artisan warmth but respecting macOS design language. Coral and warm neutrals with macOS vibrancy. Feels like a premium creative tool.",an={primary:{50:"#FDF5F3",100:"#FCE8E4",200:"#F9D0C8",300:"#F5B1A4",400:"#E69180",500:"#D97F6F",600:"#C66656",700:"#A54E41",800:"#7D3A30",900:"#562821"},accent:{50:"#FDF9EF",100:"#FBF1D9",200:"#F7E3B3",300:"#F1D288",400:"#E8C163",500:"#E0B666",600:"#D4A54E",700:"#B88C3A",800:"#8F6B2C",900:"#654C1F"},neutral:{50:"#FDFCFA",100:"#FBF9F8",200:"#F5F1EC",300:"#E8E0D5",400:"#A8A29E",500:"#A39686",600:"#6B5D52",700:"#44403C",800:"#2F241B",900:"#1C1917"},status:{success:"#52A560",warning:"#E8A93A",error:"#C0392B",info:"#6B9BD1"}},nn={heading:{family:"Geist",weights:"600, 700",style:"Sans-serif, clean, modern — warm and editorial, never corporate"},body:{family:"Geist",weights:"400, 500"},scale:[{name:"display-xl",size:"36px",weight:"700",lineHeight:"1.1"},{name:"display-lg",size:"28px",weight:"700",lineHeight:"1.15"},{name:"heading-lg",size:"22px",weight:"600",lineHeight:"1.3"},{name:"heading-md",size:"17px",weight:"600",lineHeight:"1.35"},{name:"heading-sm",size:"14px",weight:"600",lineHeight:"1.4"},{name:"body-lg",size:"14px",weight:"400",lineHeight:"1.5"},{name:"body-md",size:"13px",weight:"400",lineHeight:"1.5"},{name:"body-sm",size:"12px",weight:"400",lineHeight:"1.5"},{name:"caption",size:"11px",weight:"500",lineHeight:"1.4"},{name:"overline",size:"10px",weight:"600",lineHeight:"1.4"}]},sn={sm:"0 1px 2px rgba(47,36,27,0.06)",md:"0 4px 8px rgba(47,36,27,0.08)",lg:"0 12px 24px rgba(47,36,27,0.12)",xl:"0 20px 25px rgba(47,36,27,0.15)",glow:"0 8px 24px rgba(217,127,111,0.35)"},ln=[4,8,12,16,20,24,32,40,48,64],cn={sm:4,md:6,lg:8,xl:12,"2xl":16,full:9999},dn={sidebar:"240px full sidebar with vibrancy, neutral-100/warm background",content:"flexible, editor max-width: 720px",windowSize:"1512x982",platform:{windowChrome:"macos-native",vibrancy:!0,trafficLights:{x:16,y:12,size:12},titleBarHeight:28,toolbarHeight:48}},pn=`21-component Warm Atelier library (macOS native shell variants):
|
|
30
30
|
Button (primary/secondary/ghost/destructive/outline, sm/md/lg)
|
|
31
31
|
Card, Input, TextArea, Select, Checkbox, Toggle
|
|
32
32
|
Avatar (xs/sm/md/lg/xl), Badge (default/coral/gold/success/warning/error/info)
|
|
33
33
|
Modal, Sidebar, NavItem, Tab, Table, Breadcrumb, Tooltip, Divider, Skeleton, ProgressBar
|
|
34
|
-
macOSWindowChrome, macOSToolbar, macOSSidebar (Desktop only — NSVisualEffectView vibrancy)`,pn="Warm Atelier/Mac",Vt={id:Qa,platform:en,name:rn,personality:tn,colors:on,typography:an,shadows:nn,spacing:sn,radii:ln,layout:cn,components:dn,figmaCollectionPrefix:pn},xn={archie:{web:zr,mac:Pt},martha:{web:Et,mac:Vt}},fn=zr,un=Pt,gn=Et,mn=Vt,Ht=zr,Tr=j.createContext({platform:"web",brand:null});function hn({platform:r="web",brand:t=null,children:o}){return e.jsx(Tr.Provider,{value:{platform:r,brand:t},children:o})}function _t(){return j.useContext(Tr).platform}function Ot(){return j.useContext(Tr).brand}function Gt(){const r=_t();return Wt[r]}function Ut(){var a,n,s,l,c,d,x,p,f,u,g,m,h,v,w,k,L,z,C;const r=Ot(),t=Gt(),o=(r??Ht).colors??{};return{primary:((a=o.primary)==null?void 0:a["800"])??"#15b1cd",primaryDeep:((n=o.primary)==null?void 0:n["1000"])??"#022e40",primaryLight:((s=o.primary)==null?void 0:s["200"])??"#d6f4ff",accent:((l=o.accent)==null?void 0:l["800"])??"#ff6f00",accentLight:((c=o.accent)==null?void 0:c["200"])??"#fff2e2",n1000:((d=o.neutral)==null?void 0:d["1000"])??"#000626",n800:((x=o.neutral)==null?void 0:x["800"])??"#595f7a",n600:((p=o.neutral)==null?void 0:p["600"])??"#8c92af",n500:((f=o.neutral)==null?void 0:f["500"])??"#a1a7c4",n400:((u=o.neutral)==null?void 0:u["400"])??"#b5b9d1",n300:((g=o.neutral)==null?void 0:g["300"])??"#cdd0e0",n200:((m=o.neutral)==null?void 0:m["200"])??"#e5e7f0",n100:((h=o.neutral)==null?void 0:h["100"])??"#f5f6fa",n50:((v=o.neutral)==null?void 0:v["50"])??"#fafafc",white:((w=o.neutral)==null?void 0:w.white)??"#ffffff",error:((k=o.status)==null?void 0:k.error)??"#fb6060",errorBg:((L=o.status)==null?void 0:L["error-bg"])??"#ffecec",success:((z=o.status)==null?void 0:z.success)??"#71d481",successBg:((C=o.status)==null?void 0:C["success-bg"])??"#e2f7e5",font:t.font,monoFont:t.monoFont,bodySize:t.bodySize,bodyLineHeight:t.bodyLineHeight,bodyWeight:t.bodyWeight,headingWeight:t.headingWeight,buttonHeight:t.buttonHeight,inputHeight:t.inputHeight,shadow:t.shadows.sm,shadowMd:t.shadows.md,shadowLg:t.shadows.lg,radiusSm:t.radii.sm,radiusMd:t.radii.md,radiusLg:t.radii.lg,radiusXl:t.radii.xl,animDuration:t.animation.duration,animEasing:t.animation.easing}}function Yt(r){var t,o,a="";if(typeof r=="string"||typeof r=="number")a+=r;else if(typeof r=="object")if(Array.isArray(r)){var n=r.length;for(t=0;t<n;t++)r[t]&&(o=Yt(r[t]))&&(a&&(a+=" "),a+=o)}else for(o in r)r[o]&&(a&&(a+=" "),a+=o);return a}function Kt(){for(var r,t,o=0,a="",n=arguments.length;o<n;o++)(r=arguments[o])&&(t=Yt(r))&&(a&&(a+=" "),a+=t);return a}const Lr="-",bn=r=>{const t=yn(r),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=r;return{getClassGroupId:l=>{const c=l.split(Lr);return c[0]===""&&c.length!==1&&c.shift(),Zt(c,t)||vn(l)},getConflictingClassGroupIds:(l,c)=>{const d=o[l]||[];return c&&a[l]?[...d,...a[l]]:d}}},Zt=(r,t)=>{var l;if(r.length===0)return t.classGroupId;const o=r[0],a=t.nextPart.get(o),n=a?Zt(r.slice(1),a):void 0;if(n)return n;if(t.validators.length===0)return;const s=r.join(Lr);return(l=t.validators.find(({validator:c})=>c(s)))==null?void 0:l.classGroupId},Or=/^\[(.+)\]$/,vn=r=>{if(Or.test(r)){const t=Or.exec(r)[1],o=t==null?void 0:t.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},yn=r=>{const{theme:t,classGroups:o}=r,a={nextPart:new Map,validators:[]};for(const n in o)wr(o[n],a,n,t);return a},wr=(r,t,o,a)=>{r.forEach(n=>{if(typeof n=="string"){const s=n===""?t:Gr(t,n);s.classGroupId=o;return}if(typeof n=="function"){if(jn(n)){wr(n(a),t,o,a);return}t.validators.push({validator:n,classGroupId:o});return}Object.entries(n).forEach(([s,l])=>{wr(l,Gr(t,s),o,a)})})},Gr=(r,t)=>{let o=r;return t.split(Lr).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},jn=r=>r.isThemeGetter,wn=r=>{if(r<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map;const n=(s,l)=>{o.set(s,l),t++,t>r&&(t=0,a=o,o=new Map)};return{get(s){let l=o.get(s);if(l!==void 0)return l;if((l=a.get(s))!==void 0)return n(s,l),l},set(s,l){o.has(s)?o.set(s,l):n(s,l)}}},Cr="!",Sr=":",Cn=Sr.length,Sn=r=>{const{prefix:t,experimentalParseClassName:o}=r;let a=n=>{const s=[];let l=0,c=0,d=0,x;for(let m=0;m<n.length;m++){let h=n[m];if(l===0&&c===0){if(h===Sr){s.push(n.slice(d,m)),d=m+Cn;continue}if(h==="/"){x=m;continue}}h==="["?l++:h==="]"?l--:h==="("?c++:h===")"&&c--}const p=s.length===0?n:n.substring(d),f=kn(p),u=f!==p,g=x&&x>d?x-d:void 0;return{modifiers:s,hasImportantModifier:u,baseClassName:f,maybePostfixModifierPosition:g}};if(t){const n=t+Sr,s=a;a=l=>l.startsWith(n)?s(l.substring(n.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(o){const n=a;a=s=>o({className:s,parseClassName:n})}return a},kn=r=>r.endsWith(Cr)?r.substring(0,r.length-1):r.startsWith(Cr)?r.substring(1):r,Nn=r=>{const t=Object.fromEntries(r.orderSensitiveModifiers.map(a=>[a,!0]));return a=>{if(a.length<=1)return a;const n=[];let s=[];return a.forEach(l=>{l[0]==="["||t[l]?(n.push(...s.sort(),l),s=[]):s.push(l)}),n.push(...s.sort()),n}},zn=r=>({cache:wn(r.cacheSize),parseClassName:Sn(r),sortModifiers:Nn(r),...bn(r)}),Tn=/\s+/,Ln=(r,t)=>{const{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:n,sortModifiers:s}=t,l=[],c=r.trim().split(Tn);let d="";for(let x=c.length-1;x>=0;x-=1){const p=c[x],{isExternal:f,modifiers:u,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:h}=o(p);if(f){d=p+(d.length>0?" "+d:d);continue}let v=!!h,w=a(v?m.substring(0,h):m);if(!w){if(!v){d=p+(d.length>0?" "+d:d);continue}if(w=a(m),!w){d=p+(d.length>0?" "+d:d);continue}v=!1}const k=s(u).join(":"),L=g?k+Cr:k,z=L+w;if(l.includes(z))continue;l.push(z);const C=n(w,v);for(let T=0;T<C.length;++T){const I=C[T];l.push(L+I)}d=p+(d.length>0?" "+d:d)}return d};function $n(){let r=0,t,o,a="";for(;r<arguments.length;)(t=arguments[r++])&&(o=Xt(t))&&(a&&(a+=" "),a+=o);return a}const Xt=r=>{if(typeof r=="string")return r;let t,o="";for(let a=0;a<r.length;a++)r[a]&&(t=Xt(r[a]))&&(o&&(o+=" "),o+=t);return o};function Mn(r,...t){let o,a,n,s=l;function l(d){const x=t.reduce((p,f)=>f(p),r());return o=zn(x),a=o.cache.get,n=o.cache.set,s=c,c(d)}function c(d){const x=a(d);if(x)return x;const p=Ln(d,o);return n(d,p),p}return function(){return s($n.apply(null,arguments))}}const X=r=>{const t=o=>o[r]||[];return t.isThemeGetter=!0,t},qt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,An=/^\d+\/\d+$/,Rn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Fn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Bn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,In=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Dn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ne=r=>An.test(r),P=r=>!!r&&!Number.isNaN(Number(r)),ge=r=>!!r&&Number.isInteger(Number(r)),ur=r=>r.endsWith("%")&&P(r.slice(0,-1)),pe=r=>Rn.test(r),Wn=()=>!0,Pn=r=>Fn.test(r)&&!Bn.test(r),Qt=()=>!1,En=r=>In.test(r),Vn=r=>Dn.test(r),Hn=r=>!A(r)&&!R(r),_n=r=>De(r,to,Qt),A=r=>qt.test(r),je=r=>De(r,oo,Pn),gr=r=>De(r,Kn,P),Ur=r=>De(r,eo,Qt),On=r=>De(r,ro,Vn),qe=r=>De(r,ao,En),R=r=>Jt.test(r),Ee=r=>We(r,oo),Gn=r=>We(r,Zn),Yr=r=>We(r,eo),Un=r=>We(r,to),Yn=r=>We(r,ro),Je=r=>We(r,ao,!0),De=(r,t,o)=>{const a=qt.exec(r);return a?a[1]?t(a[1]):o(a[2]):!1},We=(r,t,o=!1)=>{const a=Jt.exec(r);return a?a[1]?t(a[1]):o:!1},eo=r=>r==="position"||r==="percentage",ro=r=>r==="image"||r==="url",to=r=>r==="length"||r==="size"||r==="bg-size",oo=r=>r==="length",Kn=r=>r==="number",Zn=r=>r==="family-name",ao=r=>r==="shadow",Xn=()=>{const r=X("color"),t=X("font"),o=X("text"),a=X("font-weight"),n=X("tracking"),s=X("leading"),l=X("breakpoint"),c=X("container"),d=X("spacing"),x=X("radius"),p=X("shadow"),f=X("inset-shadow"),u=X("text-shadow"),g=X("drop-shadow"),m=X("blur"),h=X("perspective"),v=X("aspect"),w=X("ease"),k=X("animate"),L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...z(),R,A],T=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],$=()=>[R,A,d],F=()=>[Ne,"full","auto",...$()],S=()=>[ge,"none","subgrid",R,A],N=()=>["auto",{span:["full",ge,R,A]},ge,R,A],B=()=>[ge,"auto",R,A],E=()=>["auto","min","max","fr",R,A],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],H=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...$()],O=()=>[Ne,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...$()],M=()=>[r,R,A],D=()=>[...z(),Yr,Ur,{position:[R,A]}],_=()=>["no-repeat",{repeat:["","x","y","space","round"]}],fe=()=>["auto","cover","contain",Un,_n,{size:[R,A]}],re=()=>[ur,Ee,je],K=()=>["","none","full",x,R,A],U=()=>["",P,Ee,je],ne=()=>["solid","dashed","dotted","double"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>[P,ur,Yr,Ur],ve=()=>["","none",m,R,A],Se=()=>["none",P,R,A],ue=()=>["none",P,R,A],ye=()=>[P,R,A],ke=()=>[Ne,"full",...$()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[pe],breakpoint:[pe],color:[Wn],container:[pe],"drop-shadow":[pe],ease:["in","out","in-out"],font:[Hn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[pe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[pe],shadow:[pe],spacing:["px",P],text:[pe],"text-shadow":[pe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ne,A,R,v]}],container:["container"],columns:[{columns:[P,A,R,c]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{start:F()}],end:[{end:F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[ge,"auto",R,A]}],basis:[{basis:[Ne,"full","auto",c,...$()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[P,Ne,"auto","initial","none",A]}],grow:[{grow:["",P,R,A]}],shrink:[{shrink:["",P,R,A]}],order:[{order:[ge,"first","last","none",R,A]}],"grid-cols":[{"grid-cols":S()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":S()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":E()}],"auto-rows":[{"auto-rows":E()}],gap:[{gap:$()}],"gap-x":[{"gap-x":$()}],"gap-y":[{"gap-y":$()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...H(),"normal"]}],"justify-self":[{"justify-self":["auto",...H()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...H(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...H(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...H(),"baseline"]}],"place-self":[{"place-self":["auto",...H()]}],p:[{p:$()}],px:[{px:$()}],py:[{py:$()}],ps:[{ps:$()}],pe:[{pe:$()}],pt:[{pt:$()}],pr:[{pr:$()}],pb:[{pb:$()}],pl:[{pl:$()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":$()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":$()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],w:[{w:[c,"screen",...O()]}],"min-w":[{"min-w":[c,"screen","none",...O()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...O()]}],h:[{h:["screen","lh",...O()]}],"min-h":[{"min-h":["screen","lh","none",...O()]}],"max-h":[{"max-h":["screen","lh",...O()]}],"font-size":[{text:["base",o,Ee,je]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,R,gr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ur,A]}],"font-family":[{font:[Gn,A,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,R,A]}],"line-clamp":[{"line-clamp":[P,"none",R,gr]}],leading:[{leading:[s,...$()]}],"list-image":[{"list-image":["none",R,A]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",R,A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[P,"from-font","auto",R,je]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[P,"auto",R,A]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",R,A]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",R,A]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:_()}],"bg-size":[{bg:fe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ge,R,A],radial:["",R,A],conic:[ge,R,A]},Yn,On]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ne(),"hidden","none"]}],"divide-style":[{divide:[...ne(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[P,R,A]}],"outline-w":[{outline:["",P,Ee,je]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",p,Je,qe]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",f,Je,qe]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[P,je]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",u,Je,qe]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[P,R,A]}],"mix-blend":[{"mix-blend":[...Q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[P]}],"mask-image-linear-from-pos":[{"mask-linear-from":Z()}],"mask-image-linear-to-pos":[{"mask-linear-to":Z()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":Z()}],"mask-image-t-to-pos":[{"mask-t-to":Z()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":Z()}],"mask-image-r-to-pos":[{"mask-r-to":Z()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":Z()}],"mask-image-b-to-pos":[{"mask-b-to":Z()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":Z()}],"mask-image-l-to-pos":[{"mask-l-to":Z()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":Z()}],"mask-image-x-to-pos":[{"mask-x-to":Z()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":Z()}],"mask-image-y-to-pos":[{"mask-y-to":Z()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[R,A]}],"mask-image-radial-from-pos":[{"mask-radial-from":Z()}],"mask-image-radial-to-pos":[{"mask-radial-to":Z()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":z()}],"mask-image-conic-pos":[{"mask-conic":[P]}],"mask-image-conic-from-pos":[{"mask-conic-from":Z()}],"mask-image-conic-to-pos":[{"mask-conic-to":Z()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:_()}],"mask-size":[{mask:fe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",R,A]}],filter:[{filter:["","none",R,A]}],blur:[{blur:ve()}],brightness:[{brightness:[P,R,A]}],contrast:[{contrast:[P,R,A]}],"drop-shadow":[{"drop-shadow":["","none",g,Je,qe]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",P,R,A]}],"hue-rotate":[{"hue-rotate":[P,R,A]}],invert:[{invert:["",P,R,A]}],saturate:[{saturate:[P,R,A]}],sepia:[{sepia:["",P,R,A]}],"backdrop-filter":[{"backdrop-filter":["","none",R,A]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[P,R,A]}],"backdrop-contrast":[{"backdrop-contrast":[P,R,A]}],"backdrop-grayscale":[{"backdrop-grayscale":["",P,R,A]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[P,R,A]}],"backdrop-invert":[{"backdrop-invert":["",P,R,A]}],"backdrop-opacity":[{"backdrop-opacity":[P,R,A]}],"backdrop-saturate":[{"backdrop-saturate":[P,R,A]}],"backdrop-sepia":[{"backdrop-sepia":["",P,R,A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":$()}],"border-spacing-x":[{"border-spacing-x":$()}],"border-spacing-y":[{"border-spacing-y":$()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",R,A]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[P,"initial",R,A]}],ease:[{ease:["linear","initial",w,R,A]}],delay:[{delay:[P,R,A]}],animate:[{animate:["none",k,R,A]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,R,A]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:Se()}],"rotate-x":[{"rotate-x":Se()}],"rotate-y":[{"rotate-y":Se()}],"rotate-z":[{"rotate-z":Se()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":["scale-3d"],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[R,A,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ke()}],"translate-x":[{"translate-x":ke()}],"translate-y":[{"translate-y":ke()}],"translate-z":[{"translate-z":ke()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",R,A]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",R,A]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[P,Ee,je,gr]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},qn=Mn(Xn);function y(...r){return qn(Kt(r))}const Kr=r=>typeof r=="boolean"?`${r}`:r===0?"0":r,Zr=Kt,b=(r,t)=>o=>{var a;if((t==null?void 0:t.variants)==null)return Zr(r,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:n,defaultVariants:s}=t,l=Object.keys(n).map(x=>{const p=o==null?void 0:o[x],f=s==null?void 0:s[x];if(p===null)return null;const u=Kr(p)||Kr(f);return n[x][u]}),c=o&&Object.entries(o).reduce((x,p)=>{let[f,u]=p;return u===void 0||(x[f]=u),x},{}),d=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((x,p)=>{let{class:f,className:u,...g}=p;return Object.entries(g).every(m=>{let[h,v]=m;return Array.isArray(v)?v.includes({...s,...c}[h]):{...s,...c}[h]===v})?[...x,f,u]:x},[]);return Zr(r,l,d,o==null?void 0:o.class,o==null?void 0:o.className)},Jn=b("relative inline-flex items-center justify-center shrink-0 overflow-hidden",{variants:{shape:{circular:"rounded-full",square:""},size:{small:"size-[16px]",md:"size-[24px]",big:"size-[32px]"}},compoundVariants:[{shape:"square",size:"small",className:"rounded-[4px]"},{shape:"square",size:"md",className:"rounded-[6px]"},{shape:"square",size:"big",className:"rounded-[8px]"}],defaultVariants:{shape:"circular",size:"small"}}),Qn=b('font-["Geist",system-ui,sans-serif] font-normal text-center text-[var(--color-blue-800)]',{variants:{size:{small:"text-[8px] leading-[16px]",md:"text-[12px] leading-[20px]",big:"text-[16px] leading-[24px]"}},defaultVariants:{size:"small"}}),es=b("absolute inset-0 w-full h-full object-cover"),rs=r=>{const t=r.trim().split(/\s+/);return t.length>=2?(t[0][0]+t[1][0]).toUpperCase():r.slice(0,2).toUpperCase()},ts=(r,t)=>`https://picsum.photos/seed/${r}/${t}/${t}`,pr=j.forwardRef(({className:r,type:t="text",shape:o="circular",size:a="small",initials:n="AR",src:s,alt:l="Avatar",fallbackInitials:c,...d},x)=>{const[p,f]=j.useState(!1),u=j.useMemo(()=>Math.floor(Math.random()*1e3),[]),m=s||ts(u,a==="big"?64:a==="md"?48:32),h=p&&c?c:n,v=t==="image"&&!p,w=()=>{f(!0)},k={backgroundImage:"linear-gradient(90deg, rgba(21, 177, 205, 0.08) 0%, rgba(21, 177, 205, 0.08) 100%), linear-gradient(90deg, rgb(255, 255, 255) 0%, rgb(255, 255, 255) 100%)"};return e.jsx("div",{ref:x,className:y(Jn({shape:o,size:a}),r),style:v?void 0:k,role:"img","aria-label":l,...d,children:v?e.jsx("img",{src:m,alt:l,className:y(es()),onError:w}):e.jsx("span",{className:y(Qn({size:a})),children:rs(h)})})});pr.displayName="Avatar";const os=b("relative inline-flex items-center justify-center shrink-0",{variants:{size:{small:"w-2 h-2",medium:"w-3 h-3",large:"w-4 h-4"}},defaultVariants:{size:"medium"}}),as=b("w-full h-full rounded-full",{variants:{variant:{success:"bg-[var(--color-green-1000)]",warning:"bg-[var(--color-orange-800)]",error:"bg-[var(--color-red-1000)]",info:"bg-[var(--color-blue-800)]",neutral:"bg-[var(--color-gray-600)]"}},defaultVariants:{variant:"neutral"}}),ns=b("absolute w-full h-full rounded-full opacity-75 animate-ping",{variants:{variant:{success:"bg-[var(--color-green-1000)]",warning:"bg-[var(--color-orange-800)]",error:"bg-[var(--color-red-1000)]",info:"bg-[var(--color-blue-800)]",neutral:"bg-[var(--color-gray-600)]"}},defaultVariants:{variant:"neutral"}}),ss={success:"Success status",warning:"Warning status",error:"Error status",info:"Info status",neutral:"Neutral status"},$r=j.forwardRef(({className:r,variant:t="neutral",size:o="medium",animated:a=!1,...n},s)=>e.jsxs("div",{ref:s,role:"status","aria-label":ss[t],className:y(os({size:o}),r),...n,children:[a&&e.jsx("span",{className:ns({variant:t})}),e.jsx("span",{className:as({variant:t})})]}));$r.displayName="StatusIndicator";const ls=b("inline-flex items-center px-2 py-[2px] rounded-full text-[11px] font-semibold whitespace-nowrap tabular-nums",{variants:{direction:{up:"bg-[var(--color-green-200)] text-[var(--color-green-1000)]",down:"bg-[var(--color-red-200)] text-[var(--color-red-1000)]",flat:"bg-[var(--color-gray-100)] text-[var(--color-gray-800)]",warning:"bg-[var(--color-orange-200)] text-[var(--color-amber-1000)]"}},defaultVariants:{direction:"flat"}});function is({value:r,direction:t,className:o}){return e.jsx("span",{className:y(ls({direction:t}),o),style:{fontFamily:"Geist Mono, ui-monospace, monospace"},children:r})}const cs=b("inline-flex items-center gap-[5px] px-[10px] py-[3px] rounded-full text-[11px] font-semibold whitespace-nowrap",{variants:{variant:{success:"bg-[var(--color-green-200)] text-[var(--color-green-1000)]",warning:"bg-[#fef9c3] text-[#854d0e]",error:"bg-[var(--color-red-200)] text-[var(--color-red-1000)]",info:"bg-[var(--color-blue-200)] text-[var(--color-blue-1000)]",neutral:"bg-[var(--color-gray-100)] text-[var(--color-gray-800)]"}},defaultVariants:{variant:"neutral"}});function ds({label:r,variant:t="neutral",showDot:o,icon:a,className:n}){return e.jsxs("span",{className:y(cs({variant:t}),n),children:[a?e.jsx("span",{className:"flex items-center shrink-0",children:a}):o?e.jsx("span",{className:"w-[6px] h-[6px] rounded-full bg-current shrink-0"}):null,r]})}function ps({number:r,onClick:t,className:o}){return e.jsxs("sup",{id:`fnref-${r}`,className:y("text-[10px] font-semibold text-[var(--color-blue-800)] cursor-pointer select-none leading-none",t&&"hover:text-[var(--color-blue-1000)] transition-colors duration-150",o),title:`See footnote ${r}`,onClick:()=>t==null?void 0:t(r),"aria-label":`Footnote ${r}`,children:["[",r,"]"]})}const xs={up:"var(--color-green-1000)",down:"var(--color-red-1000)",flat:"var(--color-gray-600)"};function fs(r){if(r.length<2)return"flat";const t=r[r.length-1].value-r[0].value;return t>0?"up":t<0?"down":"flat"}function us({data:r,direction:t,width:o=80,height:a=24,showLastDot:n=!0,className:s}){if(r.length<2)return null;const l=t??fs(r),c=xs[l],d=r.map(z=>z.value),x=Math.min(...d),f=Math.max(...d)-x||1,u=2,g=o-u*2,m=a-u*2,h=r.map((z,C)=>{const T=u+C/(r.length-1)*g,I=u+m-(z.value-x)/f*m;return`${T},${I}`}),v=h.join(" "),w=h[h.length-1].split(","),k=parseFloat(w[0]),L=parseFloat(w[1]);return e.jsxs("svg",{width:o,height:a,viewBox:`0 0 ${o} ${a}`,className:y("overflow-visible",s),"aria-hidden":"true",role:"img",children:[e.jsx("polyline",{points:v,fill:"none",stroke:c,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),n&&e.jsx("circle",{cx:k,cy:L,r:2.5,fill:c})]})}const gs={display:"typography-display",h1:"typography-h1",h2:"typography-h2",h3:"typography-h3",h4:"typography-h4",h5:"typography-h5",small:"typography-small",tiny:"typography-tiny","x-small":"typography-x-small","column-header":"typography-column-header",tag:"typography-tag"},ms={display:"h1",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",small:"p",tiny:"p","x-small":"p","column-header":"span",tag:"span"},hs={primary:"text-[var(--color-gray-1000)]",secondary:"text-[var(--color-gray-600)]",inherit:""},bs={thin:"font-thin",extralight:"font-extralight",light:"font-light",regular:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",black:"font-black"},vs={sans:"!font-body",mono:"!font-mono"},Ye=({variant:r,as:t,children:o,className:a,color:n="primary",weight:s,fontFamily:l})=>{const c=t||ms[r],d=gs[r],x=hs[n],p=s?bs[s]:"",f=l?vs[l]:"";return e.jsx(c,{className:y(d,x,p,f,a),children:o})},ys={dark:"rgba(0, 6, 38, 1)",darkTeal:"rgba(2, 46, 64, 1)",teal:"rgba(21, 177, 205, 1)",lightTeal:"rgba(106, 234, 253, 1)",orange:"rgba(255, 111, 0, 1)",white:"rgba(255, 255, 255, 1)"},Mr=({size:r=256,colorVariant:t="dark",...o})=>{const a=ys[t];return e.jsxs("svg",{...o,width:r,height:r,viewBox:"0 0 256 256",fill:"none",children:[e.jsx("path",{d:"M35.2761 209.996L27.7832 218.211H11V227H79.5141V218.211H53.3838L48.1047 212.422L62.2011 175.529H138.132L151.434 212.289L146.041 218.211H120.914V227H206.306V218.211H192.664L187.404 212.441L115.029 30H79.7412L81.3306 34.872L93.5916 64.7535M46.0234 218.211H45.9098L46.9127 215.575L46.0234 218.211ZM126.496 162.633H73.9891L69.4858 157.703L97.7164 88.5402H103.223L113.383 113.951L126.269 146.182L130.923 157.818L126.515 162.652L126.496 162.633ZM131.548 159.06H131.567L133.024 162.652L131.548 159.06Z",fill:a}),e.jsx("path",{d:"M233.477 227C239.841 227 245 221.791 245 215.365C245 208.938 239.841 203.729 233.477 203.729C227.113 203.729 221.954 208.938 221.954 215.365C221.954 221.791 227.113 227 233.477 227Z",fill:a})]})};Mr.displayName="LogoA";const js={dark:"rgba(0, 6, 38, 1)",darkTeal:"rgba(2, 46, 64, 1)",teal:"rgba(21, 177, 205, 1)",lightTeal:"rgba(106, 234, 253, 1)",orange:"rgba(255, 111, 0, 1)",white:"rgba(255, 255, 255, 1)"},no=({size:r=163,colorVariant:t="dark",...o})=>{const a=js[t],n=603/163,s=typeof r=="number"?r:parseFloat(r),l=s*n;return e.jsxs("svg",{...o,width:l,height:s,viewBox:"0 0 603 163",fill:"none",children:[e.jsxs("g",{clipPath:"url(#clip0_full_logo)",children:[e.jsx("path",{d:"M303.686 142.03C284.282 142.03 267.966 127.819 267.966 105.332C267.966 84.0925 278.722 69.1137 300.637 67.9807L314.384 93.9439H326.694V59.4543H301.96C284.723 59.4543 270.554 65.5226 260.642 75.2972C250.537 85.2639 244.862 99.0905 244.862 114.3C244.862 142.702 267.506 163.019 293.025 163.019C314.615 163.019 330.107 148.156 332.733 127.416C326.406 136.365 315.727 142.049 303.724 142.049L303.686 142.03Z",fill:a}),e.jsx("path",{d:"M481.48 48.6811C490.204 48.6811 497.183 41.4797 497.183 32.9534C497.183 24.427 490.204 17.2256 481.48 17.2256C472.756 17.2256 465.547 24.2157 465.547 32.9534C465.547 41.691 472.526 48.6811 481.48 48.6811Z",fill:a}),e.jsx("path",{d:"M570.942 141.588C550.868 141.588 534.724 126.072 534.724 102.912V101.376H603C603 78.8691 587.949 59.4351 562.87 59.4351C536.047 59.4351 513.787 84.7838 513.787 112.533C513.787 140.282 534.513 163 561.336 163C581.622 163 598.859 150.114 602.348 126.955C594.487 137.229 583.367 141.588 570.942 141.588ZM558.94 69.9202C570.501 69.9202 578.132 79.0996 578.132 92.6381H535.606C538.654 78.005 548.049 69.9202 558.94 69.9202Z",fill:a}),e.jsx("path",{d:"M198.233 79.0995V57.2459L155.476 73.204L172.502 86.5313V148.866L168.073 153.667H146.81L84.8802 0H55.8901L57.7691 4.53204L67.8351 28.8438L19.9402 146.984L13.7856 153.667H0V160.811H56.2736V153.667H34.8187L30.4855 148.962L42.0662 118.947H104.437L115.366 148.847L110.937 153.667H90.3062V160.811H221.26V153.667H198.233V89.1622L213.725 78.0242L230.961 91.2362H240.088V59.4543H230.079C217.118 59.4543 204.847 64.6585 198.233 79.1188V79.0995ZM28.7791 153.667H28.6641L29.4885 151.516L28.7599 153.667H28.7791ZM51.7487 108.462L48.0483 104.448L71.2288 48.1818H75.7537L84.094 68.8448L94.6777 95.0577L98.4932 104.525L94.8694 108.462H51.7487ZM99.0109 105.543H99.03L100.219 108.462L99.0109 105.543Z",fill:a}),e.jsx("path",{d:"M495.668 153.667V57.2459L452.911 73.204L469.918 86.5313V148.866L465.489 153.667H443.344L438.934 148.885V91.5627C438.934 72.7816 429.328 59.4543 411.229 59.4543H407.394C392.995 59.4543 382.737 68.1919 374.895 76.2766H374.799V1.92035L328.764 16.7839L349.05 29.6695V148.866L344.64 153.667H333.404V160.811H390.253V153.667H379.229L374.819 148.866V84.3421C379.401 80.6358 385.728 76.6991 392.707 76.6991C406.014 76.6991 413.223 84.5726 413.223 98.5528V148.866L408.794 153.667H399.706V160.811H514.745V153.667H495.687H495.668Z",fill:a})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_full_logo",children:e.jsx("rect",{width:"603",height:"163",fill:"white"})})})]})};no.displayName="FullLogo";const ws={dark:"rgba(0, 6, 38, 1)",darkTeal:"rgba(2, 46, 64, 1)",teal:"rgba(21, 177, 205, 1)",lightTeal:"rgba(106, 234, 253, 1)",orange:"rgba(255, 111, 0, 1)",white:"rgba(255, 255, 255, 1)"},Ar=({size:r=329,colorVariant:t="dark",animated:o=!1,animationDuration:a=2,animationDelay:n=0,...s})=>{const l=ws[t],c=j.useId(),d=2800;return o?e.jsxs("svg",{...s,width:r,height:r,viewBox:"0 0 329 329",fill:"none",children:[e.jsx("style",{children:`
|
|
34
|
+
macOSWindowChrome, macOSToolbar, macOSSidebar (Desktop only — NSVisualEffectView vibrancy)`,xn="Warm Atelier/Mac",Vt={id:en,platform:rn,name:tn,personality:on,colors:an,typography:nn,shadows:sn,spacing:ln,radii:cn,layout:dn,components:pn,figmaCollectionPrefix:xn},fn={archie:{web:Tr,mac:Pt},martha:{web:Et,mac:Vt}},un=Tr,gn=Pt,mn=Et,hn=Vt,Ht=Tr,$r=j.createContext({platform:"web",brand:null});function _t(r){return{display:"contents","--archie-btn-sm":`${r.buttonHeight.sm}px`,"--archie-btn-md":`${r.buttonHeight.md}px`,"--archie-btn-lg":`${r.buttonHeight.lg}px`,"--archie-input-h":`${r.inputHeight}px`,"--archie-radius-sm":`${r.radii.sm}px`,"--archie-radius-md":`${r.radii.md}px`,"--archie-radius-lg":`${r.radii.lg}px`,"--archie-radius-xl":`${r.radii.xl}px`,"--archie-shadow-sm":r.shadows.sm,"--archie-shadow-md":r.shadows.md,"--archie-shadow-lg":r.shadows.lg,"--archie-anim-duration":r.animation.duration,"--archie-anim-easing":r.animation.easing,"--archie-font":r.font,"--archie-mono-font":r.monoFont,"--archie-body-size":`${r.bodySize}px`,"--archie-body-lh":`${r.bodyLineHeight}px`,"--archie-body-weight":`${r.bodyWeight}`,"--archie-heading-weight":`${r.headingWeight}`}}function bn({platform:r="web",brand:t=null,children:o}){const a=zr[r],n=j.useMemo(()=>_t(a),[a]);return e.jsx($r.Provider,{value:{platform:r,brand:t},children:e.jsx("div",{style:n,children:o})})}function Ot(){return j.useContext($r).platform}function Gt(){return j.useContext($r).brand}function Ut(){const r=Ot();return zr[r]}function Yt(){var a,n,s,l,c,d,x,p,f,u,g,m,h,v,w,k,$,z,C;const r=Gt(),t=Ut(),o=(r??Ht).colors??{};return{primary:((a=o.primary)==null?void 0:a["800"])??"#15b1cd",primaryDeep:((n=o.primary)==null?void 0:n["1000"])??"#022e40",primaryLight:((s=o.primary)==null?void 0:s["200"])??"#d6f4ff",accent:((l=o.accent)==null?void 0:l["800"])??"#ff6f00",accentLight:((c=o.accent)==null?void 0:c["200"])??"#fff2e2",n1000:((d=o.neutral)==null?void 0:d["1000"])??"#000626",n800:((x=o.neutral)==null?void 0:x["800"])??"#595f7a",n600:((p=o.neutral)==null?void 0:p["600"])??"#8c92af",n500:((f=o.neutral)==null?void 0:f["500"])??"#a1a7c4",n400:((u=o.neutral)==null?void 0:u["400"])??"#b5b9d1",n300:((g=o.neutral)==null?void 0:g["300"])??"#cdd0e0",n200:((m=o.neutral)==null?void 0:m["200"])??"#e5e7f0",n100:((h=o.neutral)==null?void 0:h["100"])??"#f5f6fa",n50:((v=o.neutral)==null?void 0:v["50"])??"#fafafc",white:((w=o.neutral)==null?void 0:w.white)??"#ffffff",error:((k=o.status)==null?void 0:k.error)??"#fb6060",errorBg:(($=o.status)==null?void 0:$["error-bg"])??"#ffecec",success:((z=o.status)==null?void 0:z.success)??"#71d481",successBg:((C=o.status)==null?void 0:C["success-bg"])??"#e2f7e5",font:t.font,monoFont:t.monoFont,bodySize:t.bodySize,bodyLineHeight:t.bodyLineHeight,bodyWeight:t.bodyWeight,headingWeight:t.headingWeight,buttonHeight:t.buttonHeight,inputHeight:t.inputHeight,shadow:t.shadows.sm,shadowMd:t.shadows.md,shadowLg:t.shadows.lg,radiusSm:t.radii.sm,radiusMd:t.radii.md,radiusLg:t.radii.lg,radiusXl:t.radii.xl,animDuration:t.animation.duration,animEasing:t.animation.easing}}function Kt(r){var t,o,a="";if(typeof r=="string"||typeof r=="number")a+=r;else if(typeof r=="object")if(Array.isArray(r)){var n=r.length;for(t=0;t<n;t++)r[t]&&(o=Kt(r[t]))&&(a&&(a+=" "),a+=o)}else for(o in r)r[o]&&(a&&(a+=" "),a+=o);return a}function Zt(){for(var r,t,o=0,a="",n=arguments.length;o<n;o++)(r=arguments[o])&&(t=Kt(r))&&(a&&(a+=" "),a+=t);return a}const Lr="-",vn=r=>{const t=jn(r),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=r;return{getClassGroupId:l=>{const c=l.split(Lr);return c[0]===""&&c.length!==1&&c.shift(),Xt(c,t)||yn(l)},getConflictingClassGroupIds:(l,c)=>{const d=o[l]||[];return c&&a[l]?[...d,...a[l]]:d}}},Xt=(r,t)=>{var l;if(r.length===0)return t.classGroupId;const o=r[0],a=t.nextPart.get(o),n=a?Xt(r.slice(1),a):void 0;if(n)return n;if(t.validators.length===0)return;const s=r.join(Lr);return(l=t.validators.find(({validator:c})=>c(s)))==null?void 0:l.classGroupId},Gr=/^\[(.+)\]$/,yn=r=>{if(Gr.test(r)){const t=Gr.exec(r)[1],o=t==null?void 0:t.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},jn=r=>{const{theme:t,classGroups:o}=r,a={nextPart:new Map,validators:[]};for(const n in o)wr(o[n],a,n,t);return a},wr=(r,t,o,a)=>{r.forEach(n=>{if(typeof n=="string"){const s=n===""?t:Ur(t,n);s.classGroupId=o;return}if(typeof n=="function"){if(wn(n)){wr(n(a),t,o,a);return}t.validators.push({validator:n,classGroupId:o});return}Object.entries(n).forEach(([s,l])=>{wr(l,Ur(t,s),o,a)})})},Ur=(r,t)=>{let o=r;return t.split(Lr).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},wn=r=>r.isThemeGetter,Cn=r=>{if(r<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map;const n=(s,l)=>{o.set(s,l),t++,t>r&&(t=0,a=o,o=new Map)};return{get(s){let l=o.get(s);if(l!==void 0)return l;if((l=a.get(s))!==void 0)return n(s,l),l},set(s,l){o.has(s)?o.set(s,l):n(s,l)}}},Cr="!",Sr=":",Sn=Sr.length,kn=r=>{const{prefix:t,experimentalParseClassName:o}=r;let a=n=>{const s=[];let l=0,c=0,d=0,x;for(let m=0;m<n.length;m++){let h=n[m];if(l===0&&c===0){if(h===Sr){s.push(n.slice(d,m)),d=m+Sn;continue}if(h==="/"){x=m;continue}}h==="["?l++:h==="]"?l--:h==="("?c++:h===")"&&c--}const p=s.length===0?n:n.substring(d),f=Nn(p),u=f!==p,g=x&&x>d?x-d:void 0;return{modifiers:s,hasImportantModifier:u,baseClassName:f,maybePostfixModifierPosition:g}};if(t){const n=t+Sr,s=a;a=l=>l.startsWith(n)?s(l.substring(n.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(o){const n=a;a=s=>o({className:s,parseClassName:n})}return a},Nn=r=>r.endsWith(Cr)?r.substring(0,r.length-1):r.startsWith(Cr)?r.substring(1):r,zn=r=>{const t=Object.fromEntries(r.orderSensitiveModifiers.map(a=>[a,!0]));return a=>{if(a.length<=1)return a;const n=[];let s=[];return a.forEach(l=>{l[0]==="["||t[l]?(n.push(...s.sort(),l),s=[]):s.push(l)}),n.push(...s.sort()),n}},Tn=r=>({cache:Cn(r.cacheSize),parseClassName:kn(r),sortModifiers:zn(r),...vn(r)}),$n=/\s+/,Ln=(r,t)=>{const{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:n,sortModifiers:s}=t,l=[],c=r.trim().split($n);let d="";for(let x=c.length-1;x>=0;x-=1){const p=c[x],{isExternal:f,modifiers:u,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:h}=o(p);if(f){d=p+(d.length>0?" "+d:d);continue}let v=!!h,w=a(v?m.substring(0,h):m);if(!w){if(!v){d=p+(d.length>0?" "+d:d);continue}if(w=a(m),!w){d=p+(d.length>0?" "+d:d);continue}v=!1}const k=s(u).join(":"),$=g?k+Cr:k,z=$+w;if(l.includes(z))continue;l.push(z);const C=n(w,v);for(let T=0;T<C.length;++T){const I=C[T];l.push($+I)}d=p+(d.length>0?" "+d:d)}return d};function Mn(){let r=0,t,o,a="";for(;r<arguments.length;)(t=arguments[r++])&&(o=qt(t))&&(a&&(a+=" "),a+=o);return a}const qt=r=>{if(typeof r=="string")return r;let t,o="";for(let a=0;a<r.length;a++)r[a]&&(t=qt(r[a]))&&(o&&(o+=" "),o+=t);return o};function An(r,...t){let o,a,n,s=l;function l(d){const x=t.reduce((p,f)=>f(p),r());return o=Tn(x),a=o.cache.get,n=o.cache.set,s=c,c(d)}function c(d){const x=a(d);if(x)return x;const p=Ln(d,o);return n(d,p),p}return function(){return s(Mn.apply(null,arguments))}}const X=r=>{const t=o=>o[r]||[];return t.isThemeGetter=!0,t},Jt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Qt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Rn=/^\d+\/\d+$/,Fn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Bn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,In=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Dn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Wn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ne=r=>Rn.test(r),P=r=>!!r&&!Number.isNaN(Number(r)),ge=r=>!!r&&Number.isInteger(Number(r)),ur=r=>r.endsWith("%")&&P(r.slice(0,-1)),pe=r=>Fn.test(r),Pn=()=>!0,En=r=>Bn.test(r)&&!In.test(r),eo=()=>!1,Vn=r=>Dn.test(r),Hn=r=>Wn.test(r),_n=r=>!A(r)&&!R(r),On=r=>De(r,oo,eo),A=r=>Jt.test(r),je=r=>De(r,ao,En),gr=r=>De(r,Zn,P),Yr=r=>De(r,ro,eo),Gn=r=>De(r,to,Hn),qe=r=>De(r,no,Vn),R=r=>Qt.test(r),Ee=r=>We(r,ao),Un=r=>We(r,Xn),Kr=r=>We(r,ro),Yn=r=>We(r,oo),Kn=r=>We(r,to),Je=r=>We(r,no,!0),De=(r,t,o)=>{const a=Jt.exec(r);return a?a[1]?t(a[1]):o(a[2]):!1},We=(r,t,o=!1)=>{const a=Qt.exec(r);return a?a[1]?t(a[1]):o:!1},ro=r=>r==="position"||r==="percentage",to=r=>r==="image"||r==="url",oo=r=>r==="length"||r==="size"||r==="bg-size",ao=r=>r==="length",Zn=r=>r==="number",Xn=r=>r==="family-name",no=r=>r==="shadow",qn=()=>{const r=X("color"),t=X("font"),o=X("text"),a=X("font-weight"),n=X("tracking"),s=X("leading"),l=X("breakpoint"),c=X("container"),d=X("spacing"),x=X("radius"),p=X("shadow"),f=X("inset-shadow"),u=X("text-shadow"),g=X("drop-shadow"),m=X("blur"),h=X("perspective"),v=X("aspect"),w=X("ease"),k=X("animate"),$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...z(),R,A],T=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],L=()=>[R,A,d],F=()=>[Ne,"full","auto",...L()],S=()=>[ge,"none","subgrid",R,A],N=()=>["auto",{span:["full",ge,R,A]},ge,R,A],B=()=>[ge,"auto",R,A],E=()=>["auto","min","max","fr",R,A],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],H=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...L()],O=()=>[Ne,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],M=()=>[r,R,A],D=()=>[...z(),Kr,Yr,{position:[R,A]}],_=()=>["no-repeat",{repeat:["","x","y","space","round"]}],fe=()=>["auto","cover","contain",Yn,On,{size:[R,A]}],re=()=>[ur,Ee,je],K=()=>["","none","full",x,R,A],U=()=>["",P,Ee,je],ne=()=>["solid","dashed","dotted","double"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>[P,ur,Kr,Yr],ve=()=>["","none",m,R,A],Se=()=>["none",P,R,A],ue=()=>["none",P,R,A],ye=()=>[P,R,A],ke=()=>[Ne,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[pe],breakpoint:[pe],color:[Pn],container:[pe],"drop-shadow":[pe],ease:["in","out","in-out"],font:[_n],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[pe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[pe],shadow:[pe],spacing:["px",P],text:[pe],"text-shadow":[pe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ne,A,R,v]}],container:["container"],columns:[{columns:[P,A,R,c]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{start:F()}],end:[{end:F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[ge,"auto",R,A]}],basis:[{basis:[Ne,"full","auto",c,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[P,Ne,"auto","initial","none",A]}],grow:[{grow:["",P,R,A]}],shrink:[{shrink:["",P,R,A]}],order:[{order:[ge,"first","last","none",R,A]}],"grid-cols":[{"grid-cols":S()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":S()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":E()}],"auto-rows":[{"auto-rows":E()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...H(),"normal"]}],"justify-self":[{"justify-self":["auto",...H()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...H(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...H(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...H(),"baseline"]}],"place-self":[{"place-self":["auto",...H()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],w:[{w:[c,"screen",...O()]}],"min-w":[{"min-w":[c,"screen","none",...O()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...O()]}],h:[{h:["screen","lh",...O()]}],"min-h":[{"min-h":["screen","lh","none",...O()]}],"max-h":[{"max-h":["screen","lh",...O()]}],"font-size":[{text:["base",o,Ee,je]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,R,gr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ur,A]}],"font-family":[{font:[Un,A,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,R,A]}],"line-clamp":[{"line-clamp":[P,"none",R,gr]}],leading:[{leading:[s,...L()]}],"list-image":[{"list-image":["none",R,A]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",R,A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[P,"from-font","auto",R,je]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[P,"auto",R,A]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",R,A]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",R,A]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:_()}],"bg-size":[{bg:fe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ge,R,A],radial:["",R,A],conic:[ge,R,A]},Kn,Gn]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ne(),"hidden","none"]}],"divide-style":[{divide:[...ne(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[P,R,A]}],"outline-w":[{outline:["",P,Ee,je]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",p,Je,qe]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",f,Je,qe]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[P,je]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",u,Je,qe]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[P,R,A]}],"mix-blend":[{"mix-blend":[...Q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[P]}],"mask-image-linear-from-pos":[{"mask-linear-from":Z()}],"mask-image-linear-to-pos":[{"mask-linear-to":Z()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":Z()}],"mask-image-t-to-pos":[{"mask-t-to":Z()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":Z()}],"mask-image-r-to-pos":[{"mask-r-to":Z()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":Z()}],"mask-image-b-to-pos":[{"mask-b-to":Z()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":Z()}],"mask-image-l-to-pos":[{"mask-l-to":Z()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":Z()}],"mask-image-x-to-pos":[{"mask-x-to":Z()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":Z()}],"mask-image-y-to-pos":[{"mask-y-to":Z()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[R,A]}],"mask-image-radial-from-pos":[{"mask-radial-from":Z()}],"mask-image-radial-to-pos":[{"mask-radial-to":Z()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":z()}],"mask-image-conic-pos":[{"mask-conic":[P]}],"mask-image-conic-from-pos":[{"mask-conic-from":Z()}],"mask-image-conic-to-pos":[{"mask-conic-to":Z()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:_()}],"mask-size":[{mask:fe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",R,A]}],filter:[{filter:["","none",R,A]}],blur:[{blur:ve()}],brightness:[{brightness:[P,R,A]}],contrast:[{contrast:[P,R,A]}],"drop-shadow":[{"drop-shadow":["","none",g,Je,qe]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",P,R,A]}],"hue-rotate":[{"hue-rotate":[P,R,A]}],invert:[{invert:["",P,R,A]}],saturate:[{saturate:[P,R,A]}],sepia:[{sepia:["",P,R,A]}],"backdrop-filter":[{"backdrop-filter":["","none",R,A]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[P,R,A]}],"backdrop-contrast":[{"backdrop-contrast":[P,R,A]}],"backdrop-grayscale":[{"backdrop-grayscale":["",P,R,A]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[P,R,A]}],"backdrop-invert":[{"backdrop-invert":["",P,R,A]}],"backdrop-opacity":[{"backdrop-opacity":[P,R,A]}],"backdrop-saturate":[{"backdrop-saturate":[P,R,A]}],"backdrop-sepia":[{"backdrop-sepia":["",P,R,A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",R,A]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[P,"initial",R,A]}],ease:[{ease:["linear","initial",w,R,A]}],delay:[{delay:[P,R,A]}],animate:[{animate:["none",k,R,A]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,R,A]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:Se()}],"rotate-x":[{"rotate-x":Se()}],"rotate-y":[{"rotate-y":Se()}],"rotate-z":[{"rotate-z":Se()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":["scale-3d"],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[R,A,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ke()}],"translate-x":[{"translate-x":ke()}],"translate-y":[{"translate-y":ke()}],"translate-z":[{"translate-z":ke()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",R,A]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",R,A]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[P,Ee,je,gr]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Jn=An(qn);function y(...r){return Jn(Zt(r))}const Zr=r=>typeof r=="boolean"?`${r}`:r===0?"0":r,Xr=Zt,b=(r,t)=>o=>{var a;if((t==null?void 0:t.variants)==null)return Xr(r,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:n,defaultVariants:s}=t,l=Object.keys(n).map(x=>{const p=o==null?void 0:o[x],f=s==null?void 0:s[x];if(p===null)return null;const u=Zr(p)||Zr(f);return n[x][u]}),c=o&&Object.entries(o).reduce((x,p)=>{let[f,u]=p;return u===void 0||(x[f]=u),x},{}),d=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((x,p)=>{let{class:f,className:u,...g}=p;return Object.entries(g).every(m=>{let[h,v]=m;return Array.isArray(v)?v.includes({...s,...c}[h]):{...s,...c}[h]===v})?[...x,f,u]:x},[]);return Xr(r,l,d,o==null?void 0:o.class,o==null?void 0:o.className)},Qn=b("relative inline-flex items-center justify-center shrink-0 overflow-hidden",{variants:{shape:{circular:"rounded-full",square:""},size:{small:"size-[16px]",md:"size-[24px]",big:"size-[32px]"}},compoundVariants:[{shape:"square",size:"small",className:"rounded-[4px]"},{shape:"square",size:"md",className:"rounded-[6px]"},{shape:"square",size:"big",className:"rounded-[8px]"}],defaultVariants:{shape:"circular",size:"small"}}),es=b('font-["Geist",system-ui,sans-serif] font-normal text-center text-[var(--color-blue-800)]',{variants:{size:{small:"text-[8px] leading-[16px]",md:"text-[12px] leading-[20px]",big:"text-[16px] leading-[24px]"}},defaultVariants:{size:"small"}}),rs=b("absolute inset-0 w-full h-full object-cover"),ts=r=>{const t=r.trim().split(/\s+/);return t.length>=2?(t[0][0]+t[1][0]).toUpperCase():r.slice(0,2).toUpperCase()},os=(r,t)=>`https://picsum.photos/seed/${r}/${t}/${t}`,pr=j.forwardRef(({className:r,type:t="text",shape:o="circular",size:a="small",initials:n="AR",src:s,alt:l="Avatar",fallbackInitials:c,...d},x)=>{const[p,f]=j.useState(!1),u=j.useMemo(()=>Math.floor(Math.random()*1e3),[]),m=s||os(u,a==="big"?64:a==="md"?48:32),h=p&&c?c:n,v=t==="image"&&!p,w=()=>{f(!0)},k={backgroundImage:"linear-gradient(90deg, rgba(21, 177, 205, 0.08) 0%, rgba(21, 177, 205, 0.08) 100%), linear-gradient(90deg, rgb(255, 255, 255) 0%, rgb(255, 255, 255) 100%)"};return e.jsx("div",{ref:x,className:y(Qn({shape:o,size:a}),r),style:v?void 0:k,role:"img","aria-label":l,...d,children:v?e.jsx("img",{src:m,alt:l,className:y(rs()),onError:w}):e.jsx("span",{className:y(es({size:a})),children:ts(h)})})});pr.displayName="Avatar";const as=b("relative inline-flex items-center justify-center shrink-0",{variants:{size:{small:"w-2 h-2",medium:"w-3 h-3",large:"w-4 h-4"}},defaultVariants:{size:"medium"}}),ns=b("w-full h-full rounded-full",{variants:{variant:{success:"bg-[var(--color-green-1000)]",warning:"bg-[var(--color-orange-800)]",error:"bg-[var(--color-red-1000)]",info:"bg-[var(--color-blue-800)]",neutral:"bg-[var(--color-gray-600)]"}},defaultVariants:{variant:"neutral"}}),ss=b("absolute w-full h-full rounded-full opacity-75 animate-ping",{variants:{variant:{success:"bg-[var(--color-green-1000)]",warning:"bg-[var(--color-orange-800)]",error:"bg-[var(--color-red-1000)]",info:"bg-[var(--color-blue-800)]",neutral:"bg-[var(--color-gray-600)]"}},defaultVariants:{variant:"neutral"}}),ls={success:"Success status",warning:"Warning status",error:"Error status",info:"Info status",neutral:"Neutral status"},Mr=j.forwardRef(({className:r,variant:t="neutral",size:o="medium",animated:a=!1,...n},s)=>e.jsxs("div",{ref:s,role:"status","aria-label":ls[t],className:y(as({size:o}),r),...n,children:[a&&e.jsx("span",{className:ss({variant:t})}),e.jsx("span",{className:ns({variant:t})})]}));Mr.displayName="StatusIndicator";const is=b("inline-flex items-center px-2 py-[2px] rounded-full text-[11px] font-semibold whitespace-nowrap tabular-nums",{variants:{direction:{up:"bg-[var(--color-green-200)] text-[var(--color-green-1000)]",down:"bg-[var(--color-red-200)] text-[var(--color-red-1000)]",flat:"bg-[var(--color-gray-100)] text-[var(--color-gray-800)]",warning:"bg-[var(--color-orange-200)] text-[var(--color-amber-1000)]"}},defaultVariants:{direction:"flat"}});function cs({value:r,direction:t,className:o}){return e.jsx("span",{className:y(is({direction:t}),o),style:{fontFamily:"Geist Mono, ui-monospace, monospace"},children:r})}const ds=b("inline-flex items-center gap-[5px] px-[10px] py-[3px] rounded-full text-[11px] font-semibold whitespace-nowrap",{variants:{variant:{success:"bg-[var(--color-green-200)] text-[var(--color-green-1000)]",warning:"bg-[#fef9c3] text-[#854d0e]",error:"bg-[var(--color-red-200)] text-[var(--color-red-1000)]",info:"bg-[var(--color-blue-200)] text-[var(--color-blue-1000)]",neutral:"bg-[var(--color-gray-100)] text-[var(--color-gray-800)]"}},defaultVariants:{variant:"neutral"}});function ps({label:r,variant:t="neutral",showDot:o,icon:a,className:n}){return e.jsxs("span",{className:y(ds({variant:t}),n),children:[a?e.jsx("span",{className:"flex items-center shrink-0",children:a}):o?e.jsx("span",{className:"w-[6px] h-[6px] rounded-full bg-current shrink-0"}):null,r]})}function xs({number:r,onClick:t,className:o}){return e.jsxs("sup",{id:`fnref-${r}`,className:y("text-[10px] font-semibold text-[var(--color-blue-800)] cursor-pointer select-none leading-none",t&&"hover:text-[var(--color-blue-1000)] transition-colors duration-150",o),title:`See footnote ${r}`,onClick:()=>t==null?void 0:t(r),"aria-label":`Footnote ${r}`,children:["[",r,"]"]})}const fs={up:"var(--color-green-1000)",down:"var(--color-red-1000)",flat:"var(--color-gray-600)"};function us(r){if(r.length<2)return"flat";const t=r[r.length-1].value-r[0].value;return t>0?"up":t<0?"down":"flat"}function gs({data:r,direction:t,width:o=80,height:a=24,showLastDot:n=!0,className:s}){if(r.length<2)return null;const l=t??us(r),c=fs[l],d=r.map(z=>z.value),x=Math.min(...d),f=Math.max(...d)-x||1,u=2,g=o-u*2,m=a-u*2,h=r.map((z,C)=>{const T=u+C/(r.length-1)*g,I=u+m-(z.value-x)/f*m;return`${T},${I}`}),v=h.join(" "),w=h[h.length-1].split(","),k=parseFloat(w[0]),$=parseFloat(w[1]);return e.jsxs("svg",{width:o,height:a,viewBox:`0 0 ${o} ${a}`,className:y("overflow-visible",s),"aria-hidden":"true",role:"img",children:[e.jsx("polyline",{points:v,fill:"none",stroke:c,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),n&&e.jsx("circle",{cx:k,cy:$,r:2.5,fill:c})]})}const ms={display:"typography-display",h1:"typography-h1",h2:"typography-h2",h3:"typography-h3",h4:"typography-h4",h5:"typography-h5",small:"typography-small",tiny:"typography-tiny","x-small":"typography-x-small","column-header":"typography-column-header",tag:"typography-tag"},hs={display:"h1",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",small:"p",tiny:"p","x-small":"p","column-header":"span",tag:"span"},bs={primary:"text-[var(--color-gray-1000)]",secondary:"text-[var(--color-gray-600)]",inherit:""},vs={thin:"font-thin",extralight:"font-extralight",light:"font-light",regular:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",black:"font-black"},ys={sans:"!font-body",mono:"!font-mono"},Ye=({variant:r,as:t,children:o,className:a,color:n="primary",weight:s,fontFamily:l})=>{const c=t||hs[r],d=ms[r],x=bs[n],p=s?vs[s]:"",f=l?ys[l]:"";return e.jsx(c,{className:y(d,x,p,f,a),children:o})},js={dark:"rgba(0, 6, 38, 1)",darkTeal:"rgba(2, 46, 64, 1)",teal:"rgba(21, 177, 205, 1)",lightTeal:"rgba(106, 234, 253, 1)",orange:"rgba(255, 111, 0, 1)",white:"rgba(255, 255, 255, 1)"},Ar=({size:r=256,colorVariant:t="dark",...o})=>{const a=js[t];return e.jsxs("svg",{...o,width:r,height:r,viewBox:"0 0 256 256",fill:"none",children:[e.jsx("path",{d:"M35.2761 209.996L27.7832 218.211H11V227H79.5141V218.211H53.3838L48.1047 212.422L62.2011 175.529H138.132L151.434 212.289L146.041 218.211H120.914V227H206.306V218.211H192.664L187.404 212.441L115.029 30H79.7412L81.3306 34.872L93.5916 64.7535M46.0234 218.211H45.9098L46.9127 215.575L46.0234 218.211ZM126.496 162.633H73.9891L69.4858 157.703L97.7164 88.5402H103.223L113.383 113.951L126.269 146.182L130.923 157.818L126.515 162.652L126.496 162.633ZM131.548 159.06H131.567L133.024 162.652L131.548 159.06Z",fill:a}),e.jsx("path",{d:"M233.477 227C239.841 227 245 221.791 245 215.365C245 208.938 239.841 203.729 233.477 203.729C227.113 203.729 221.954 208.938 221.954 215.365C221.954 221.791 227.113 227 233.477 227Z",fill:a})]})};Ar.displayName="LogoA";const ws={dark:"rgba(0, 6, 38, 1)",darkTeal:"rgba(2, 46, 64, 1)",teal:"rgba(21, 177, 205, 1)",lightTeal:"rgba(106, 234, 253, 1)",orange:"rgba(255, 111, 0, 1)",white:"rgba(255, 255, 255, 1)"},so=({size:r=163,colorVariant:t="dark",...o})=>{const a=ws[t],n=603/163,s=typeof r=="number"?r:parseFloat(r),l=s*n;return e.jsxs("svg",{...o,width:l,height:s,viewBox:"0 0 603 163",fill:"none",children:[e.jsxs("g",{clipPath:"url(#clip0_full_logo)",children:[e.jsx("path",{d:"M303.686 142.03C284.282 142.03 267.966 127.819 267.966 105.332C267.966 84.0925 278.722 69.1137 300.637 67.9807L314.384 93.9439H326.694V59.4543H301.96C284.723 59.4543 270.554 65.5226 260.642 75.2972C250.537 85.2639 244.862 99.0905 244.862 114.3C244.862 142.702 267.506 163.019 293.025 163.019C314.615 163.019 330.107 148.156 332.733 127.416C326.406 136.365 315.727 142.049 303.724 142.049L303.686 142.03Z",fill:a}),e.jsx("path",{d:"M481.48 48.6811C490.204 48.6811 497.183 41.4797 497.183 32.9534C497.183 24.427 490.204 17.2256 481.48 17.2256C472.756 17.2256 465.547 24.2157 465.547 32.9534C465.547 41.691 472.526 48.6811 481.48 48.6811Z",fill:a}),e.jsx("path",{d:"M570.942 141.588C550.868 141.588 534.724 126.072 534.724 102.912V101.376H603C603 78.8691 587.949 59.4351 562.87 59.4351C536.047 59.4351 513.787 84.7838 513.787 112.533C513.787 140.282 534.513 163 561.336 163C581.622 163 598.859 150.114 602.348 126.955C594.487 137.229 583.367 141.588 570.942 141.588ZM558.94 69.9202C570.501 69.9202 578.132 79.0996 578.132 92.6381H535.606C538.654 78.005 548.049 69.9202 558.94 69.9202Z",fill:a}),e.jsx("path",{d:"M198.233 79.0995V57.2459L155.476 73.204L172.502 86.5313V148.866L168.073 153.667H146.81L84.8802 0H55.8901L57.7691 4.53204L67.8351 28.8438L19.9402 146.984L13.7856 153.667H0V160.811H56.2736V153.667H34.8187L30.4855 148.962L42.0662 118.947H104.437L115.366 148.847L110.937 153.667H90.3062V160.811H221.26V153.667H198.233V89.1622L213.725 78.0242L230.961 91.2362H240.088V59.4543H230.079C217.118 59.4543 204.847 64.6585 198.233 79.1188V79.0995ZM28.7791 153.667H28.6641L29.4885 151.516L28.7599 153.667H28.7791ZM51.7487 108.462L48.0483 104.448L71.2288 48.1818H75.7537L84.094 68.8448L94.6777 95.0577L98.4932 104.525L94.8694 108.462H51.7487ZM99.0109 105.543H99.03L100.219 108.462L99.0109 105.543Z",fill:a}),e.jsx("path",{d:"M495.668 153.667V57.2459L452.911 73.204L469.918 86.5313V148.866L465.489 153.667H443.344L438.934 148.885V91.5627C438.934 72.7816 429.328 59.4543 411.229 59.4543H407.394C392.995 59.4543 382.737 68.1919 374.895 76.2766H374.799V1.92035L328.764 16.7839L349.05 29.6695V148.866L344.64 153.667H333.404V160.811H390.253V153.667H379.229L374.819 148.866V84.3421C379.401 80.6358 385.728 76.6991 392.707 76.6991C406.014 76.6991 413.223 84.5726 413.223 98.5528V148.866L408.794 153.667H399.706V160.811H514.745V153.667H495.687H495.668Z",fill:a})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_full_logo",children:e.jsx("rect",{width:"603",height:"163",fill:"white"})})})]})};so.displayName="FullLogo";const Cs={dark:"rgba(0, 6, 38, 1)",darkTeal:"rgba(2, 46, 64, 1)",teal:"rgba(21, 177, 205, 1)",lightTeal:"rgba(106, 234, 253, 1)",orange:"rgba(255, 111, 0, 1)",white:"rgba(255, 255, 255, 1)"},Rr=({size:r=329,colorVariant:t="dark",animated:o=!1,animationDuration:a=2,animationDelay:n=0,...s})=>{const l=Cs[t],c=j.useId(),d=2800;return o?e.jsxs("svg",{...s,width:r,height:r,viewBox:"0 0 329 329",fill:"none",children:[e.jsx("style",{children:`
|
|
35
35
|
@keyframes drawSignature-${c.replace(/:/g,"")} {
|
|
36
36
|
0% {
|
|
37
37
|
stroke-dashoffset: var(--path-length);
|
|
@@ -56,10 +56,10 @@ macOSWindowChrome, macOSToolbar, macOSSidebar (Desktop only — NSVisualEffectVi
|
|
|
56
56
|
transform: scale(1);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
`}),e.jsx("path",{d:"M239.997 257.024C239.13 256.261 238.348 255.328 237.671 254.268C236.994 253.208 236.55 252.126 236.359 251.066C236.169 250.006 236.359 249.179 236.93 248.585C239.659 245.277 243.233 242.118 247.696 239.107C252.138 236.095 256.601 234.59 261.063 234.59C263.2 234.59 264.595 235.375 265.293 236.922C265.97 238.47 266.309 240.018 266.309 241.587C266.309 244.302 265.568 246.443 264.13 247.991C262.692 249.539 260.831 250.854 258.61 251.914C256.389 252.996 254.062 253.907 251.63 254.692C249.198 255.455 247.04 256.24 245.095 257.024L242.768 258.191C241.795 258.191 240.886 257.809 239.997 257.024Z",fill:l,style:{transformOrigin:"252px 247px",animation:`drawDot-${c.replace(/:/g,"")} 0.3s ease-out ${n+a*.9}s forwards`,opacity:0}}),e.jsx("path",{d:"M308.102 176.765C306.453 175.663 304.126 174.963 301.123 174.687C298.119 174.411 294.46 174.433 290.167 174.772C285.873 175.111 281.008 175.578 275.594 176.193C273.648 176.405 271.829 176.617 270.179 176.808L245.793 180.942C242.091 181.536 239.003 182.003 236.486 182.406C233.969 182.808 231.558 182.702 229.232 182.13L193.572 185.777C193.952 184.293 194.587 182.893 195.517 181.6C196.469 180.243 197.548 179.161 198.711 178.398C205.099 169.068 211.254 160.056 217.176 151.299C223.077 142.562 228.639 134.102 233.885 125.959L234.752 121.888L253.936 88.6814C253.936 87.3243 254.422 86.2641 255.395 85.4795C256.368 84.7162 257.045 83.4439 257.425 81.7051L260.344 73.2445C260.915 71.6966 261.465 70.0426 261.93 68.2826C262.417 66.5439 262.671 64.5082 262.671 62.1757C262.671 60.8186 262.459 59.1223 262.1 57.0866C261.698 55.051 261.084 53.1426 260.217 51.4038C259.35 49.6438 258.271 48.1595 257.024 46.8872C255.776 45.615 254.168 45 252.243 45C250.89 45 249.388 45.3817 247.738 46.1663C246.089 46.9509 244.439 47.9263 242.789 49.0925C241.139 50.2588 239.595 51.4674 238.136 52.7397C236.677 54.012 235.471 55.0298 234.498 55.7932L207.468 81.7263L206.008 82.5957L192.641 96.2939C192.429 96.2939 192.112 96.3999 191.626 96.5907C191.139 96.7816 190.801 96.8876 190.61 96.8876L122.04 164.763C120.094 164.763 117.493 163.894 114.193 162.134C110.915 160.374 107.023 159.505 102.56 159.505C101.587 159.505 100.53 159.802 99.3666 160.374C98.2033 160.947 97.3361 161.243 96.7439 161.243C95.9613 161.243 95.2422 160.798 94.5654 159.929C93.8885 159.059 92.7887 158.635 91.2236 158.635C86.5704 159.611 83.567 160.183 82.2134 160.374C80.8597 160.586 79.9714 160.671 79.5907 160.671C77.6448 159.886 76.397 159.696 75.8047 160.098C75.2125 160.501 74.7472 160.777 74.3453 160.968C73.7743 160.586 72.3149 160.247 69.9883 159.95C67.6617 159.674 65.5255 159.505 63.6008 159.505C60.682 159.505 56.6634 159.611 51.5449 159.802C46.4053 159.992 41.3715 160.629 36.4434 161.689C31.5153 162.749 27.2005 164.488 23.5203 166.926C19.8401 169.365 18 172.8 18 177.274C18 181.155 18.9518 184.462 20.8976 187.177C22.8435 189.912 25.3181 192.223 28.3215 194.174C31.3249 196.125 34.6667 197.524 38.3469 198.394C42.0271 199.263 45.6016 199.709 49.0915 199.709C51.2277 200.281 53.1524 200.09 54.9079 199.136C54.6964 199.136 55.7328 199.369 57.9536 199.857C60.1744 200.345 62.9451 200.79 66.2235 201.172C69.523 201.553 72.9494 201.999 76.545 202.465C80.1195 202.953 83.0806 203.207 85.4071 203.207L59.5399 232.915L54.0196 239.319C52.8563 240.294 52.4333 241.948 52.7294 244.281C53.0043 246.613 53.6389 247.779 54.6118 247.779C57.1287 247.779 60.3225 246.083 64.193 242.69C68.0636 239.297 72.1457 235.163 76.397 230.307C80.6694 225.451 84.9207 220.51 89.1931 215.464C93.4444 210.417 97.2303 206.24 100.53 202.932C100.911 202.932 101.312 202.974 101.693 203.08C102.074 203.165 102.455 203.228 102.856 203.228C115.822 203.228 127.878 202.847 139.045 202.062C150.192 201.299 160.407 200.896 169.692 200.896C166.985 205.37 164.066 209.929 160.978 214.594C157.89 219.259 154.591 224.115 151.101 229.162L127.285 264.701C125.932 266.842 124.726 268.984 123.648 271.104C122.569 273.225 122.061 275.366 122.061 277.508C122.061 279.056 122.59 280.371 123.648 281.431C124.705 282.491 125.826 283.042 126.989 283.042C129.316 283.042 131.346 282.364 133.081 281.007C134.815 279.65 136.613 278.038 138.453 276.193C140.293 274.349 142.197 272.44 144.121 270.511C146.046 268.56 148.373 267.012 151.08 265.846L182.467 237.007C182.658 236.414 183.102 235.777 183.758 235.12C184.434 234.442 185.259 233.615 186.232 232.639L197.273 223.33C200.192 220.807 202.941 217.881 205.543 214.573C208.166 211.286 209.477 209.145 209.477 208.169C209.477 206.027 208.229 204.967 205.712 204.967C205.331 204.967 204.697 205.116 203.83 205.413C202.962 205.709 201.947 206.346 200.784 207.3L156.896 248.076L146.152 255.646L149.049 251.575C149.832 250.218 151.186 248.034 153.132 245.023C155.056 242.012 157.192 238.725 159.519 235.12C161.846 231.537 164.32 227.805 166.943 223.903C169.566 220.022 172.019 216.418 174.367 213.11C176.693 209.823 178.724 207.045 180.458 204.819C182.193 202.592 183.44 201.278 184.223 200.875C184.604 200.684 185.386 200.493 186.55 200.302C186.803 200.281 187.121 200.281 187.374 200.239L196.871 199.433C201.672 199.009 206.304 198.161 210.746 196.931C215.166 195.68 219.798 194.853 224.6 194.407C226.122 194.301 228.893 193.983 232.891 193.474C236.909 192.965 241.266 192.393 245.941 191.757C250.615 191.142 254.993 190.527 259.075 189.912C263.157 189.297 265.991 188.852 267.599 188.555C269.206 188.258 270.602 188.025 271.787 187.834C272.971 187.664 274.431 187.516 276.165 187.41C276.313 187.41 276.503 187.177 276.651 187.134L281.579 186.583C284.435 186.265 286.888 186.095 288.961 186.095C291.013 186.095 292.514 186.18 293.445 186.392C292.726 188.152 292.112 189.361 291.563 190.039C291.034 190.718 290.59 191.142 290.23 191.333C289.871 191.524 289.659 191.672 289.596 191.757C289.532 191.842 289.532 192.181 289.596 192.796C289.807 194.768 291.647 195.531 295.116 195.15C295.708 195.086 296.491 194.81 297.421 194.323C298.352 193.835 299.325 193.305 300.319 192.732C301.313 192.16 302.286 191.545 303.195 190.909C304.126 190.272 304.782 189.7 305.184 189.191C306.072 188.937 307.299 188.046 308.885 186.477C310.45 184.929 311.169 183.402 311 181.875C310.746 179.628 309.794 177.931 308.145 176.829L308.102 176.765ZM96.7227 190.039C76.5662 189.276 60.9781 188.088 49.9375 186.54C38.8968 184.993 31.5364 181.981 27.8562 177.507C28.6388 176.15 31.3884 175.026 36.1473 174.157C40.885 173.288 46.0246 172.567 51.5449 171.973C57.0653 171.379 62.1414 170.955 66.7946 170.679C71.4477 170.383 74.0704 170.234 74.6415 170.234H79.2946C88.6009 170.807 96.0882 171.4 101.82 171.973C107.531 172.545 111.549 173.033 113.876 173.436L96.7227 190.039ZM147.146 188.576C136.592 188.958 125.488 189.255 113.876 189.446C115.23 187.495 117.366 184.971 120.263 181.875C123.182 178.78 126.376 175.472 129.845 171.973C133.335 168.474 137.015 164.891 140.885 161.201C144.756 157.511 148.436 154.013 151.926 150.705L172.273 129.14C172.654 127.973 173.33 127.401 174.303 127.401L184.181 118.092C185.154 117.71 186.55 116.629 188.411 114.89C190.251 113.151 192.176 111.201 194.206 109.08C196.237 106.96 198.182 104.818 200.023 102.676C201.863 100.535 203.259 98.902 204.231 97.7146L211.211 93.0496C213.919 90.3354 216.541 87.706 219.058 85.1827C221.575 82.6593 224.092 80.3268 226.609 78.1852L231.262 73.5202C233.99 70.9968 236.74 68.8128 239.553 66.968C242.345 65.1232 246.279 62.727 251.313 59.822V63.0239C251.313 66.3318 250.551 70.1062 248.986 74.3896C247.421 78.6729 245.877 82.3625 244.333 85.4583L184.181 180.137C182.446 181.494 180.881 183.445 179.528 185.968C168.487 187.325 157.679 188.194 147.125 188.597L147.146 188.576Z",stroke:l,strokeWidth:"2",fill:l,style:{"--path-length":d,strokeDasharray:d,strokeDashoffset:d,fillOpacity:0,animation:`drawSignature-${c.replace(/:/g,"")} ${a}s ease-out ${n}s forwards`}})]}):e.jsxs("svg",{...s,width:r,height:r,viewBox:"0 0 329 329",fill:"none",children:[e.jsx("path",{d:"M239.997 257.024C239.13 256.261 238.348 255.328 237.671 254.268C236.994 253.208 236.55 252.126 236.359 251.066C236.169 250.006 236.359 249.179 236.93 248.585C239.659 245.277 243.233 242.118 247.696 239.107C252.138 236.095 256.601 234.59 261.063 234.59C263.2 234.59 264.595 235.375 265.293 236.922C265.97 238.47 266.309 240.018 266.309 241.587C266.309 244.302 265.568 246.443 264.13 247.991C262.692 249.539 260.831 250.854 258.61 251.914C256.389 252.996 254.062 253.907 251.63 254.692C249.198 255.455 247.04 256.24 245.095 257.024L242.768 258.191C241.795 258.191 240.886 257.809 239.997 257.024Z",fill:l}),e.jsx("path",{d:"M308.102 176.765C306.453 175.663 304.126 174.963 301.123 174.687C298.119 174.411 294.46 174.433 290.167 174.772C285.873 175.111 281.008 175.578 275.594 176.193C273.648 176.405 271.829 176.617 270.179 176.808L245.793 180.942C242.091 181.536 239.003 182.003 236.486 182.406C233.969 182.808 231.558 182.702 229.232 182.13L193.572 185.777C193.952 184.293 194.587 182.893 195.517 181.6C196.469 180.243 197.548 179.161 198.711 178.398C205.099 169.068 211.254 160.056 217.176 151.299C223.077 142.562 228.639 134.102 233.885 125.959L234.752 121.888L253.936 88.6814C253.936 87.3243 254.422 86.2641 255.395 85.4795C256.368 84.7162 257.045 83.4439 257.425 81.7051L260.344 73.2445C260.915 71.6966 261.465 70.0426 261.93 68.2826C262.417 66.5439 262.671 64.5082 262.671 62.1757C262.671 60.8186 262.459 59.1223 262.1 57.0866C261.698 55.051 261.084 53.1426 260.217 51.4038C259.35 49.6438 258.271 48.1595 257.024 46.8872C255.776 45.615 254.168 45 252.243 45C250.89 45 249.388 45.3817 247.738 46.1663C246.089 46.9509 244.439 47.9263 242.789 49.0925C241.139 50.2588 239.595 51.4674 238.136 52.7397C236.677 54.012 235.471 55.0298 234.498 55.7932L207.468 81.7263L206.008 82.5957L192.641 96.2939C192.429 96.2939 192.112 96.3999 191.626 96.5907C191.139 96.7816 190.801 96.8876 190.61 96.8876L122.04 164.763C120.094 164.763 117.493 163.894 114.193 162.134C110.915 160.374 107.023 159.505 102.56 159.505C101.587 159.505 100.53 159.802 99.3666 160.374C98.2033 160.947 97.3361 161.243 96.7439 161.243C95.9613 161.243 95.2422 160.798 94.5654 159.929C93.8885 159.059 92.7887 158.635 91.2236 158.635C86.5704 159.611 83.567 160.183 82.2134 160.374C80.8597 160.586 79.9714 160.671 79.5907 160.671C77.6448 159.886 76.397 159.696 75.8047 160.098C75.2125 160.501 74.7472 160.777 74.3453 160.968C73.7743 160.586 72.3149 160.247 69.9883 159.95C67.6617 159.674 65.5255 159.505 63.6008 159.505C60.682 159.505 56.6634 159.611 51.5449 159.802C46.4053 159.992 41.3715 160.629 36.4434 161.689C31.5153 162.749 27.2005 164.488 23.5203 166.926C19.8401 169.365 18 172.8 18 177.274C18 181.155 18.9518 184.462 20.8976 187.177C22.8435 189.912 25.3181 192.223 28.3215 194.174C31.3249 196.125 34.6667 197.524 38.3469 198.394C42.0271 199.263 45.6016 199.709 49.0915 199.709C51.2277 200.281 53.1524 200.09 54.9079 199.136C54.6964 199.136 55.7328 199.369 57.9536 199.857C60.1744 200.345 62.9451 200.79 66.2235 201.172C69.523 201.553 72.9494 201.999 76.545 202.465C80.1195 202.953 83.0806 203.207 85.4071 203.207L59.5399 232.915L54.0196 239.319C52.8563 240.294 52.4333 241.948 52.7294 244.281C53.0043 246.613 53.6389 247.779 54.6118 247.779C57.1287 247.779 60.3225 246.083 64.193 242.69C68.0636 239.297 72.1457 235.163 76.397 230.307C80.6694 225.451 84.9207 220.51 89.1931 215.464C93.4444 210.417 97.2303 206.24 100.53 202.932C100.911 202.932 101.312 202.974 101.693 203.08C102.074 203.165 102.455 203.228 102.856 203.228C115.822 203.228 127.878 202.847 139.045 202.062C150.192 201.299 160.407 200.896 169.692 200.896C166.985 205.37 164.066 209.929 160.978 214.594C157.89 219.259 154.591 224.115 151.101 229.162L127.285 264.701C125.932 266.842 124.726 268.984 123.648 271.104C122.569 273.225 122.061 275.366 122.061 277.508C122.061 279.056 122.59 280.371 123.648 281.431C124.705 282.491 125.826 283.042 126.989 283.042C129.316 283.042 131.346 282.364 133.081 281.007C134.815 279.65 136.613 278.038 138.453 276.193C140.293 274.349 142.197 272.44 144.121 270.511C146.046 268.56 148.373 267.012 151.08 265.846L182.467 237.007C182.658 236.414 183.102 235.777 183.758 235.12C184.434 234.442 185.259 233.615 186.232 232.639L197.273 223.33C200.192 220.807 202.941 217.881 205.543 214.573C208.166 211.286 209.477 209.145 209.477 208.169C209.477 206.027 208.229 204.967 205.712 204.967C205.331 204.967 204.697 205.116 203.83 205.413C202.962 205.709 201.947 206.346 200.784 207.3L156.896 248.076L146.152 255.646L149.049 251.575C149.832 250.218 151.186 248.034 153.132 245.023C155.056 242.012 157.192 238.725 159.519 235.12C161.846 231.537 164.32 227.805 166.943 223.903C169.566 220.022 172.019 216.418 174.367 213.11C176.693 209.823 178.724 207.045 180.458 204.819C182.193 202.592 183.44 201.278 184.223 200.875C184.604 200.684 185.386 200.493 186.55 200.302C186.803 200.281 187.121 200.281 187.374 200.239L196.871 199.433C201.672 199.009 206.304 198.161 210.746 196.931C215.166 195.68 219.798 194.853 224.6 194.407C226.122 194.301 228.893 193.983 232.891 193.474C236.909 192.965 241.266 192.393 245.941 191.757C250.615 191.142 254.993 190.527 259.075 189.912C263.157 189.297 265.991 188.852 267.599 188.555C269.206 188.258 270.602 188.025 271.787 187.834C272.971 187.664 274.431 187.516 276.165 187.41C276.313 187.41 276.503 187.177 276.651 187.134L281.579 186.583C284.435 186.265 286.888 186.095 288.961 186.095C291.013 186.095 292.514 186.18 293.445 186.392C292.726 188.152 292.112 189.361 291.563 190.039C291.034 190.718 290.59 191.142 290.23 191.333C289.871 191.524 289.659 191.672 289.596 191.757C289.532 191.842 289.532 192.181 289.596 192.796C289.807 194.768 291.647 195.531 295.116 195.15C295.708 195.086 296.491 194.81 297.421 194.323C298.352 193.835 299.325 193.305 300.319 192.732C301.313 192.16 302.286 191.545 303.195 190.909C304.126 190.272 304.782 189.7 305.184 189.191C306.072 188.937 307.299 188.046 308.885 186.477C310.45 184.929 311.169 183.402 311 181.875C310.746 179.628 309.794 177.931 308.145 176.829L308.102 176.765ZM96.7227 190.039C76.5662 189.276 60.9781 188.088 49.9375 186.54C38.8968 184.993 31.5364 181.981 27.8562 177.507C28.6388 176.15 31.3884 175.026 36.1473 174.157C40.885 173.288 46.0246 172.567 51.5449 171.973C57.0653 171.379 62.1414 170.955 66.7946 170.679C71.4477 170.383 74.0704 170.234 74.6415 170.234H79.2946C88.6009 170.807 96.0882 171.4 101.82 171.973C107.531 172.545 111.549 173.033 113.876 173.436L96.7227 190.039ZM147.146 188.576C136.592 188.958 125.488 189.255 113.876 189.446C115.23 187.495 117.366 184.971 120.263 181.875C123.182 178.78 126.376 175.472 129.845 171.973C133.335 168.474 137.015 164.891 140.885 161.201C144.756 157.511 148.436 154.013 151.926 150.705L172.273 129.14C172.654 127.973 173.33 127.401 174.303 127.401L184.181 118.092C185.154 117.71 186.55 116.629 188.411 114.89C190.251 113.151 192.176 111.201 194.206 109.08C196.237 106.96 198.182 104.818 200.023 102.676C201.863 100.535 203.259 98.902 204.231 97.7146L211.211 93.0496C213.919 90.3354 216.541 87.706 219.058 85.1827C221.575 82.6593 224.092 80.3268 226.609 78.1852L231.262 73.5202C233.99 70.9968 236.74 68.8128 239.553 66.968C242.345 65.1232 246.279 62.727 251.313 59.822V63.0239C251.313 66.3318 250.551 70.1062 248.986 74.3896C247.421 78.6729 245.877 82.3625 244.333 85.4583L184.181 180.137C182.446 181.494 180.881 183.445 179.528 185.968C168.487 187.325 157.679 188.194 147.125 188.597L147.146 188.576Z",fill:l})]})};Ar.displayName="SignatureA";const Cs=b("group relative flex items-center rounded-[8px] border box-border cursor-pointer w-full overflow-hidden isolate transition-[border-color] duration-300",{variants:{status:{normal:"bg-[var(--color-white)] border-[var(--color-gray-200)]",hover:"border-[var(--color-blue-800)]",generating:"bg-[var(--color-white)] border-[var(--color-gray-200)] cursor-default",error:"border-[var(--color-red-1000)]"},disabled:{true:"opacity-50 cursor-not-allowed pointer-events-none",false:""}},defaultVariants:{status:"normal",disabled:!1}}),Ss=b("absolute inset-0 -z-10 transition-opacity duration-300",{variants:{status:{normal:"opacity-0 group-hover:opacity-100",hover:"opacity-100",generating:"opacity-0",error:"opacity-100"}},defaultVariants:{status:"normal"}}),ks=b("absolute inset-0",{variants:{status:{normal:"bg-[var(--color-blue-200)]",hover:"bg-[var(--color-blue-200)]",generating:"",error:"bg-[var(--color-red-200)]"}},defaultVariants:{status:"normal"}}),mr=b("flex gap-2 h-[75px] shrink-0",{variants:{status:{normal:"p-2 items-end",hover:"p-2 items-end",generating:"px-4 py-2 items-center",error:"px-4 py-2 items-center"}},defaultVariants:{status:"normal"}}),Ns=b("relative -bottom-2 w-[60px] h-[66px] bg-[var(--color-gray-50)] border border-[var(--color-gray-200)] border-b-0 rounded-t-[4px] overflow-hidden transition-transform duration-300 group-hover:opacity-90 group-hover:shadow-sm"),zs=b("w-full h-full bg-[var(--color-blue-200)]/30 p-2 space-y-2 flex flex-col items-start justify-start gap-1"),Ts=b("h-1 bg-[var(--color-gray-200)] rounded-full origin-left"),Ls=b("flex flex-col gap-[4px] grow items-start p-4 min-w-0"),$s=b("font-medium text-[14px] leading-[20px] text-[var(--color-blue-1000)]"),Ms=b("text-[12px] leading-[16px] text-[var(--color-gray-600)]"),As=b("px-4 overflow-hidden flex items-center w-[56px] relative"),Rs=b("absolute w-6 h-6 text-[var(--color-blue-800)]"),Fs=b("w-6 h-6 text-[var(--color-gray-200)]"),Bs=b("w-4 h-4 shrink-0 transition-all duration-300",{variants:{status:{normal:"text-[var(--color-blue-1000)] group-hover:text-[var(--color-blue-800)] group-hover:translate-x-0.5",hover:"text-[var(--color-blue-800)] translate-x-0.5",generating:"text-[var(--color-gray-600)] animate-spin",error:"text-[var(--color-blue-1000)] group-hover:rotate-[-20deg]"}},defaultVariants:{status:"normal"}}),Is=b("w-4 h-4 shrink-0 text-[var(--color-red-1000)] transition-transform duration-300 group-hover:scale-110"),Ds={rest:{scaleX:1},hover:{scaleX:[0,1]}},Ws={rest:{x:0},hover:{x:4}},Ps={rest:{x:-20,opacity:0},hover:{x:0,opacity:1}},Es={rest:{x:0,opacity:1},hover:{x:20,opacity:0}},Vs=[100,66,75,50],so=j.forwardRef(({title:r,subtitle:t,status:o,onClick:a,onActionClick:n,className:s,disabled:l=!1},c)=>{const[d,x]=j.useState(!1),p=o||(d&&!l?"hover":"normal"),f=j.useMemo(()=>p==="generating"||p==="error"?"rest":d?"hover":"rest",[p,d]),u=j.useCallback(()=>{!o&&!l&&x(!0)},[o,l]),g=j.useCallback(()=>{!o&&!l&&x(!1)},[o,l]),m=j.useCallback(()=>{!l&&a&&a()},[l,a]),h=j.useCallback(L=>{L.stopPropagation(),!l&&n&&n()},[l,n]),v=j.useCallback(L=>{(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),m())},[m]),w=()=>p==="generating"?e.jsx("div",{className:mr({status:"generating"}),children:e.jsx(i.Loader,{size:16,className:"text-[var(--color-gray-600)] animate-spin"})}):p==="error"?e.jsx("div",{className:mr({status:"error"}),children:e.jsx(i.TriangleAlert,{size:16,className:Is()})}):e.jsx("div",{className:mr({status:p}),children:e.jsx("div",{className:Ns(),children:e.jsx(q.motion.div,{className:zs(),variants:{rest:{},hover:{transition:{staggerChildren:.1}}},children:Vs.map((L,z)=>e.jsx(q.motion.div,{className:Ts(),style:{width:`${L}%`},variants:Ds,transition:{duration:.4,ease:"easeInOut"}},z))})})}),k=()=>p==="generating"?null:p==="error"?e.jsx("button",{type:"button",onClick:h,className:"focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-800)] focus-visible:ring-offset-2 rounded-sm","aria-label":"Retry",children:e.jsx(i.RotateCcw,{size:16,className:Bs({status:"error"})})}):e.jsxs(e.Fragment,{children:[e.jsx(q.motion.div,{className:Rs(),variants:Ps,transition:{duration:.3,ease:"backOut"},children:e.jsx(i.ArrowUp,{size:24,className:"rotate-90"})}),e.jsx(q.motion.div,{className:Fs(),variants:Es,transition:{duration:.3},children:e.jsx(i.ArrowUp,{size:24,className:"rotate-90"})})]});return e.jsxs(q.motion.div,{ref:c,role:"button",tabIndex:l?-1:0,className:y(Cs({status:p,disabled:l}),s),onClick:m,onKeyDown:v,onMouseEnter:u,onMouseLeave:g,"aria-disabled":l,"aria-label":`${r} - ${t}${p==="error"?" - Error occurred":""}${p==="generating"?" - Generating":""}`,initial:"rest",whileHover:"hover",animate:f,children:[e.jsx("div",{className:Ss({status:p}),children:e.jsx("div",{className:ks({status:p})})}),w(),e.jsxs(q.motion.div,{className:Ls(),variants:Ws,children:[e.jsx("p",{className:$s(),title:r,children:r}),e.jsx("p",{className:Ms(),title:t,children:t})]}),e.jsx("div",{className:As(),children:k()})]})});so.displayName="ArtifactCard";const Hs=b("flex items-center flex-wrap gap-2",{variants:{size:{small:"text-[0.875rem] leading-[1.25rem]",medium:"text-[1rem] leading-[1.5rem]"}},defaultVariants:{size:"medium"}}),Qe=b("inline-flex items-center gap-2 transition-colors duration-200 rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2",{variants:{state:{default:"text-[var(--color-gray-600)] hover:text-[var(--color-blue-1000)] cursor-pointer",active:"text-[var(--color-blue-1000)] font-medium cursor-default",inactive:"text-[var(--color-gray-600)] cursor-default"}},defaultVariants:{state:"default"}}),_s=b("text-[var(--color-gray-600)] flex items-center justify-center"),lo=({items:r,separator:t=e.jsx(i.ChevronRight,{size:16}),className:o,size:a="medium"})=>e.jsx("nav",{"aria-label":"Breadcrumb",className:y(Hs({size:a}),o),children:e.jsx("ol",{className:"flex items-center flex-wrap gap-2",children:r.map((n,s)=>{const l=s===r.length-1;let c;return l?c=e.jsxs("span",{className:Qe({state:"active"}),"aria-current":"page",children:[n.icon,n.label]}):n.href?c=e.jsxs("a",{href:n.href,className:Qe({state:"default"}),onClick:n.onClick,children:[n.icon,n.label]}):n.onClick?c=e.jsxs("button",{type:"button",className:Qe({state:"default"}),onClick:n.onClick,children:[n.icon,n.label]}):c=e.jsxs("span",{className:Qe({state:"inactive"}),children:[n.icon,n.label]}),e.jsxs("li",{className:"flex items-center gap-2",children:[c,!l&&e.jsx("span",{className:_s(),"aria-hidden":"true",children:t})]},`${n.label}-${s}`)})})}),Os={sm:"h-8 px-3 text-xs gap-1.5 rounded-md",default:"h-10 px-4 text-sm gap-2 rounded-lg",lg:"h-12 px-6 text-base gap-2.5 rounded-lg",icon:"h-10 w-10 rounded-lg"},Be=j.forwardRef(({variant:r="default",size:t="default",loading:o=!1,disabled:a,leftIcon:n,rightIcon:s,startIcon:l,endIcon:c,children:d,className:x,style:p,onMouseEnter:f,onMouseLeave:u,...g},m)=>{const h=Ut(),v=a||o,w=n??l,k=s??c,L={default:{background:h.primary,color:h.white},secondary:{background:h.white,color:h.primaryDeep,border:`1px solid ${h.n200}`},outline:{background:"transparent",color:h.primaryDeep,border:`1px solid ${h.n200}`},ghost:{background:"transparent",color:h.n800},destructive:{background:h.error,color:h.white},link:{background:"transparent",color:h.primary,padding:0,height:"auto"}},z=T=>{r==="link"?T.currentTarget.style.textDecoration="underline":T.currentTarget.style.opacity="0.85",f==null||f(T)},C=T=>{r==="link"?T.currentTarget.style.textDecoration="none":T.currentTarget.style.opacity="1",u==null||u(T)};return e.jsxs("button",{ref:m,className:y("inline-flex items-center justify-center font-light transition-all duration-150 cursor-pointer",Os[t],v&&"opacity-50 cursor-not-allowed pointer-events-none",x),style:{...L[r],fontFamily:h.font,...r==="link"?{textDecoration:"none"}:{},...p},disabled:v,onMouseEnter:z,onMouseLeave:C,...g,children:[o?e.jsx("svg",{className:"w-4 h-4 animate-spin",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:e.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}):w?e.jsx("span",{className:"shrink-0",children:w}):null,d,!o&&k&&e.jsx("span",{className:"shrink-0",children:k})]})});Be.displayName="Button";const Gs=b("flex items-center justify-center shrink-0 rounded-[2px]",{variants:{size:{sm:"p-1",md:"p-1.5",lg:"p-2 rounded-[4px]"}},defaultVariants:{size:"sm"}}),io={txt:{background:"#f5f6fa",iconColor:"#8c92af",icon:i.FileText},docx:{background:"#E0F2FF",iconColor:"#0369A1",icon:i.FileText},doc:{background:"#E0F2FF",iconColor:"#0369A1",icon:i.FileText},pdf:{background:"#ffecec",iconColor:"#fb6060",icon:i.Pdf},csv:{background:"#e2f7e5",iconColor:"#71d481",icon:i.Grid},xlsx:{background:"#e2f7e5",iconColor:"#71d481",icon:i.Grid},xls:{background:"#e2f7e5",iconColor:"#71d481",icon:i.Grid},json:{background:"#fff2e2",iconColor:"#e15713",icon:i.Code},js:{background:"#fff2e2",iconColor:"#ff6f00",icon:i.Code},ts:{background:"#E0F2FF",iconColor:"#0369A1",icon:i.Code},md:{background:"#f5f6fa",iconColor:"#8c92af",icon:i.Code},pptx:{background:"#FFE5D2",iconColor:"#C2410C",icon:i.WhiteboardView},ppt:{background:"#FFE5D2",iconColor:"#C2410C",icon:i.WhiteboardView},zip:{background:"#f5f6fa",iconColor:"#8c92af",icon:i.Archive},rar:{background:"#f5f6fa",iconColor:"#8c92af",icon:i.Archive},"7z":{background:"#f5f6fa",iconColor:"#8c92af",icon:i.Archive},mp4:{background:"#FEE2E5",iconColor:"#BE123C",icon:i.Video},mov:{background:"#FEE2E5",iconColor:"#BE123C",icon:i.Video},avi:{background:"#FEE2E5",iconColor:"#BE123C",icon:i.Video},mp3:{background:"#E4E4F8",iconColor:"#6D28D9",icon:i.Volume2},wav:{background:"#E4E4F8",iconColor:"#6D28D9",icon:i.Volume2}},Us={background:"#f5f6fa",iconColor:"#8c92af",icon:i.FileText},co=r=>{if(!r)return"";const t=r.lastIndexOf(".");return t<=0?"":r.slice(t+1).toLowerCase()},po=r=>{const t=co(r);return io[t]||Us},Ys={sm:12,md:16,lg:24},Rr=j.forwardRef(({filename:r,size:t="sm",className:o},a)=>{const n=po(r),s=n.icon,l=Ys[t];return e.jsx("div",{ref:a,className:y(Gs({size:t}),o),style:{backgroundColor:n.background,color:n.iconColor},children:e.jsx(s,{size:l,color:n.iconColor,className:"shrink-0"})})});Rr.displayName="FileIcon";const Ks=b("relative inline-flex items-center px-1 py-1 gap-1 rounded-[5px] border overflow-hidden transition-colors",{variants:{status:{none:"",uploading:"border-[var(--color-gray-600)] bg-[var(--color-gray-50)]",processing:"border-[var(--color-gray-600)] bg-[var(--color-gray-50)]",done:"border-[var(--color-gray-200)] bg-[var(--color-white)]",error:"border-[var(--color-gray-200)] bg-[var(--color-white)]"}},defaultVariants:{status:"done"}}),Xr=b("truncate text-[0.75rem] leading-[1rem] font-normal",{variants:{status:{none:"",uploading:"text-[var(--color-gray-600)]",processing:"text-[var(--color-gray-800)]",done:"text-[var(--color-gray-800)]",error:"text-[var(--color-gray-800)]"}},defaultVariants:{status:"done"}}),hr=b("shrink-0",{variants:{status:{uploading:"text-[var(--color-blue-800)]",processing:"text-[var(--color-blue-800)]",done:"text-[var(--color-gray-600)]",error:"text-[var(--color-red-1000)]"}},defaultVariants:{status:"done"}}),Zs=b("absolute top-0 left-0 bottom-0 bg-[var(--color-gray-200)] z-0 rounded-bl-[4px] rounded-tl-[4px]",{variants:{status:{uploading:"opacity-100",processing:"opacity-100",done:"opacity-0",error:"opacity-0"}},defaultVariants:{status:"uploading"}}),ze=b("flex items-center justify-center shrink-0 p-1 rounded-[2px]",{variants:{variant:{file:"",template:"bg-[var(--color-entity-sky)]",client:"",agent:"bg-[var(--color-entity-sky)]",workstream:"bg-[var(--color-entity-sky)]",status:"",skill:"",autopilot:""}},defaultVariants:{variant:"file"}});var te=(r=>(r.Uploading="uploading",r.Processing="processing",r.Done="done",r.Error="error",r))(te||{});const xo=({onClick:r})=>{const t=o=>{o.stopPropagation(),r()};return e.jsx(q.motion.button,{onClick:t,className:"absolute -top-[6px] -right-[6px] hidden group-hover:flex items-center justify-center bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-[8px] p-[2px] focus:outline-none focus:ring-2 focus:ring-[var(--color-blue-800)] shrink-0 z-20","aria-label":"Remove",initial:{scale:0,opacity:0},whileInView:{scale:1,opacity:1},whileHover:{scale:1.1},whileTap:{scale:.95},transition:{scale:{type:"spring",stiffness:400,damping:17},opacity:{duration:.2}},children:e.jsx(i.X,{size:10,className:"text-[var(--color-gray-800)]"})})};xo.displayName="ChipDeleteButton";const Xs="sm",qs=r=>{if(r.type==="file"){const t=r.status??te.Done;return{filename:r.filename,showFileIcon:t===te.Done}}return r.type==="fileMention"?{filename:r.filename,showFileIcon:!0}:null},fo=({chipProps:r})=>{const{type:t}=r,o=qs(r);if(o!=null&&o.showFileIcon)return e.jsx(Rr,{filename:o.filename,size:Xs});if(t==="file"){const{status:a=te.Done}=r,n=a===te.Uploading,s=a===te.Processing,l=a===te.Error,c=n?"uploading":s?"processing":"error";return e.jsxs("div",{className:y(ze({variant:"status"}),l&&"bg-[var(--color-red-200)]"),children:[n&&e.jsx(i.ArrowUp,{size:12,className:hr({status:c})}),s&&e.jsx(i.Loader,{size:12,className:y(hr({status:c}),"animate-spin")}),l&&e.jsx(i.TriangleAlert,{size:12,className:hr({status:c})})]})}return t==="templateMention"?e.jsx("div",{className:ze({variant:"template"}),children:e.jsx(i.FileText,{size:12,className:"text-[var(--color-gray-600)]"})}):t==="clientMention"?e.jsx(pr,{type:"text",initials:r.name,size:"small",shape:"circular"}):t==="agentMention"?r.iconSrc?e.jsx("img",{src:r.iconSrc,alt:"","aria-hidden":"true",className:"w-5 h-5 rounded-[3px] object-cover shrink-0"}):e.jsx("div",{className:ze({variant:"agent"}),children:e.jsx(i.Cpu,{size:12,className:"text-[var(--color-gray-600)]"})}):t==="workstreamMention"?e.jsx("div",{className:ze({variant:"workstream"}),children:e.jsx(i.WorkStream,{size:12,className:"text-[var(--color-gray-600)]"})}):t==="skill"?e.jsx("div",{className:ze({variant:"skill"}),style:{backgroundColor:"var(--color-blue-800-bg)"},children:e.jsx(i.FileText,{size:12,style:{color:"var(--color-blue-800)"}})}):t==="autopilot"?e.jsx("div",{className:ze({variant:"autopilot"}),style:{backgroundColor:"var(--color-blue-800-bg)"},children:e.jsx(i.Layout,{size:12,style:{color:"var(--color-gray-600)"}})}):null};fo.displayName="ChipLeadingContent";const Js=(r,t=20)=>{if(r.length<=t)return r;const o=r.lastIndexOf(".");if(o===-1||o===0)return r.slice(0,t-1)+"…";const a=r.slice(0,o),n=r.slice(o);if(n.length>=t-3)return r.slice(0,t-1)+"…";const s=t-n.length-1;return s<3?r.slice(0,t-1)+"…":a.slice(0,s)+"…"+n},Qs=r=>{switch(r.type){case"file":case"fileMention":return Js(r.filename);case"templateMention":case"clientMention":case"agentMention":case"workstreamMention":case"skill":case"autopilot":return r.name}},el=r=>{switch(r.type){case"file":case"fileMention":return r.filename;case"templateMention":case"clientMention":case"agentMention":case"workstreamMention":case"skill":case"autopilot":return r.name}},rl={skill:{borderColor:"var(--color-blue-800)",backgroundColor:"var(--color-blue-800-bg)"},autopilot:{borderColor:"var(--color-gray-200)",backgroundColor:"var(--color-gray-100)"}},tl={skill:{color:"var(--color-blue-800)"},autopilot:{color:"var(--color-gray-600)"}},uo=r=>{const{type:t,className:o,onDelete:a}=r,n=t==="file"?r.status??te.Done:te.Done,s=n===te.Uploading,l=n===te.Processing,c=t==="file"?r.progress??0:0,d=(s||l)&&t==="file",x=a&&!s&&!l,p=Qs(r),f=el(r),u=t==="agentMention"?r.labelContent:void 0,g=t==="skill"||t==="autopilot",m=g?"none":n,h=g?"none":n,v=g?rl[t]:void 0,w=g?tl[t]:void 0;return e.jsxs("div",{className:"relative inline-block group",children:[e.jsxs("div",{className:y(Ks({status:m}),o),style:v,children:[d&&e.jsx(q.motion.div,{className:Zs({status:n}),initial:{width:"0%"},animate:{width:`${c}%`},transition:{duration:.3,ease:"easeOut"}}),e.jsxs("div",{className:"relative z-10 flex items-center gap-1 pr-1",children:[e.jsx(fo,{chipProps:r}),u?e.jsx("span",{className:Xr({status:h}),style:w,title:f,children:u}):e.jsx("span",{className:Xr({status:h}),style:w,title:f,children:p})]})]}),x&&e.jsx(xo,{onClick:a})]})};uo.displayName="Chip";const ol=b("inline-flex items-center gap-2 cursor-pointer select-none group disabled:cursor-not-allowed disabled:opacity-50 w-fit",{variants:{size:{medium:"text-[1rem] leading-[1.5rem] gap-2",small:"gap-1"}},defaultVariants:{size:"medium"}}),al=b("flex items-center justify-center transition-colors duration-200 ease-in-out rounded-[2px] border shrink-0 peer-focus-visible:ring-2 peer-focus-visible:ring-[var(--color-blue-200)] peer-focus-visible:ring-offset-1",{variants:{checked:{true:"bg-[var(--color-blue-800)] border-[var(--color-blue-800)] text-white",false:"bg-white border-[var(--color-gray-200)] group-hover:border-[var(--color-gray-600)]"},indeterminate:{true:"bg-[var(--color-blue-800)] border-[var(--color-blue-800)]",false:""},size:{medium:"w-[16px] h-[16px]",small:"w-[12px] h-[12px]"}},defaultVariants:{checked:!1,indeterminate:!1,size:"medium"}}),nl="sr-only peer",go=j.forwardRef(({className:r,checked:t,defaultChecked:o,onChange:a,label:n,size:s="medium",disabled:l,indeterminate:c=!1,...d},x)=>{const[p,f]=j.useState(o||!1),u=t!==void 0,g=u?t:p,m=j.useRef(null);j.useEffect(()=>{const w=m.current;w&&(w.indeterminate=c)},[c]);const h=w=>{m.current=w,typeof x=="function"?x(w):x&&(x.current=w)},v=w=>{u||f(w.target.checked),a==null||a(w)};return e.jsxs("label",{className:ol({size:s,className:r}),children:[e.jsx("input",{type:"checkbox",className:nl,ref:h,checked:u?t:void 0,defaultChecked:u?void 0:o,onChange:v,disabled:l,...d}),e.jsx("span",{className:al({checked:!!g,indeterminate:c,size:s}),children:c&&!g?e.jsx("span",{className:"w-2 h-0.5 rounded-full bg-white"}):e.jsx(i.Check,{size:s==="medium"?12:8,strokeWidth:3,className:y("text-white transition-opacity duration-200",g?"opacity-100":"opacity-0")})}),n&&e.jsx(Ye,{as:"span",variant:s==="medium"?"small":"x-small",color:"secondary",children:n})]})});go.displayName="Checkbox";const sl=b("relative inline-flex items-center justify-center",{variants:{size:{xs:"w-[18px] h-[18px]",small:"w-[24px] h-[24px]",medium:"w-[32px] h-[32px]",large:"w-[40px] h-[40px]"}},defaultVariants:{size:"medium"}}),ll=b("transform"),il=b("stroke-[var(--color-gray-200)]"),cl=b("transition-[stroke-dashoffset] duration-300 ease-in-out",{variants:{variant:{default:"stroke-[var(--color-blue-800)]",success:"stroke-[var(--color-green-1000)]",warning:"stroke-[var(--color-orange-800)]",error:"stroke-[var(--color-red-1000)]"}},defaultVariants:{variant:"default"}}),dl=b("absolute inset-0 flex items-center justify-center font-medium text-[var(--color-gray-800)]",{variants:{size:{xs:"text-[6px]",small:"text-[8px]",medium:"text-[10px]",large:"text-[12px]"}},defaultVariants:{size:"medium"}}),pl={xs:18,small:24,medium:32,large:40},mo=j.forwardRef(({className:r,value:t=0,max:o=100,size:a="medium",variant:n="default",showLabel:s=!0,labelFormatter:l,strokeWidth:c=3,...d},x)=>{const p=Math.min(Math.max(t/o*100,0),100),f=pl[a],u=(f-c)/2,g=2*Math.PI*u,m=g-p/100*g,h=l?l(t,o):`${Math.round(t)}`;return e.jsxs("div",{ref:x,className:y(sl({size:a}),r),role:"progressbar","aria-valuemin":0,"aria-valuemax":o,"aria-valuenow":t,...d,children:[e.jsxs("svg",{className:ll(),width:f,height:f,viewBox:`0 0 ${f} ${f}`,children:[e.jsx("circle",{className:il(),cx:f/2,cy:f/2,r:u,fill:"none",strokeWidth:c}),e.jsx("circle",{className:cl({variant:n}),cx:f/2,cy:f/2,r:u,fill:"none",strokeWidth:c,strokeLinecap:"round",strokeDasharray:g,strokeDashoffset:m,transform:`rotate(-90 ${f/2} ${f/2})`})]}),s&&e.jsx("span",{className:dl({size:a}),children:h})]})});mo.displayName="CircularProgress";function xl(r,t){j.useEffect(()=>{const o=a=>{const n=r==null?void 0:r.current;!n||n.contains(a.target)||t(a)};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}},[r,t])}const fl=b("absolute top-full left-0 z-50 w-full min-w-[200px] overflow-hidden rounded-[8px] border border-[var(--color-gray-200)] bg-[var(--color-white)] shadow-lg focus:outline-none",{variants:{align:{start:"left-0",end:"right-0 left-auto",center:"left-1/2 -translate-x-1/2"},attached:{true:"mt-0 rounded-t-none border-t-0",false:"mt-2"}},defaultVariants:{align:"start",attached:!1}}),ul=b("flex w-full cursor-pointer items-center px-3 py-2 text-[0.875rem] text-[var(--color-gray-800)] transition-colors hover:bg-[var(--color-gray-50)] focus:bg-[var(--color-blue-200)] focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--color-blue-200)] disabled:pointer-events-none disabled:opacity-50",{variants:{active:{true:"bg-[var(--color-blue-200)] text-[var(--color-blue-1000)]"},variant:{default:"",destructive:"text-[var(--color-red-1000)] hover:bg-[var(--color-red-200)] focus:bg-[var(--color-red-200)]"}},defaultVariants:{variant:"default",active:!1}}),gl=b("w-full px-3 py-1 text-[0.625rem] font-bold text-[var(--color-gray-600)] uppercase tracking-wider select-none"),ml=b("w-full h-px bg-[var(--color-gray-200)] my-1"),ho=j.createContext(void 0),xr=()=>{const r=j.useContext(ho);if(!r)throw new Error("useDropdown must be used within a Dropdown");return r},bo=({children:r,defaultOpen:t=!1,open:o,onOpenChange:a,className:n,...s})=>{const[l,c]=j.useState(t),d=o!==void 0,x=d?o:l,p=j.useRef(null),f=()=>{const g=!x;d||c(g),a==null||a(g)},u=()=>{d||c(!1),a==null||a(!1)};return xl(p,u),e.jsx(ho.Provider,{value:{isOpen:x,toggle:f,close:u},children:e.jsx("div",{ref:p,className:y("relative w-full text-left",n),...s,children:r})})};bo.displayName="Dropdown";const vo=j.forwardRef(({className:r,children:t,onClick:o,chevronIcon:a=!1,...n},s)=>{const{toggle:l,isOpen:c}=xr(),d=x=>{l(),o==null||o(x)};return e.jsxs("div",{ref:s,className:y("cursor-pointer w-full relative overflow-visible",r),onClick:d,"aria-haspopup":"true","aria-expanded":c,...n,children:[t,a&&e.jsx(q.motion.span,{animate:{rotate:c?180:0},transition:{duration:.2,ease:[.16,1,.3,1]},className:"absolute right-3 top-1/2 -translate-y-1/2 z-20 pointer-events-none text-[var(--color-gray-600)]",children:e.jsx(i.ChevronDown,{size:16})})]})});vo.displayName="DropdownTrigger";const yo=j.forwardRef(({className:r,align:t="start",attached:o=!1,children:a,...n},s)=>{const{isOpen:l}=xr();return e.jsx(q.AnimatePresence,{children:l&&e.jsx(q.motion.div,{ref:s,initial:{opacity:0,y:-4,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-4,scale:.98},transition:{duration:.2,ease:[.16,1,.3,1]},style:{transformOrigin:"top center"},className:y(fl({align:t,attached:o}),r),...n,children:a})})});yo.displayName="DropdownContent";const jo=j.forwardRef(({className:r,active:t,variant:o,closeOnSelect:a=!0,children:n,onClick:s,...l},c)=>{const{close:d}=xr(),x=p=>{s==null||s(p),a&&d()};return e.jsx("div",{ref:c,className:y(ul({active:t,variant:o}),r),onClick:x,role:"menuitem",...l,children:n})});jo.displayName="DropdownItem";const hl=j.forwardRef(({className:r,children:t,...o},a)=>e.jsx("div",{ref:a,className:y(gl(),r),...o,children:t}));hl.displayName="DropdownLabel";const bl=j.forwardRef(({className:r,animated:t=!1,animationDelay:o=.2,...a},n)=>t?e.jsx("div",{ref:n,className:y("h-px my-1 overflow-hidden",r),...a,children:e.jsx(q.motion.div,{className:"h-full bg-[var(--color-gray-200)]",initial:{width:0},animate:{width:"100%"},transition:{duration:.3,ease:[.16,1,.3,1],delay:o}})}):e.jsx("div",{ref:n,className:y(ml(),r),...a}));bl.displayName="DropdownSeparator";const vl=b("w-full bg-[var(--color-white)] border border-solid rounded-[8px] font-normal transition-colors duration-200 box-border focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"border-[var(--color-gray-200)] text-[var(--color-gray-600)] placeholder:text-[var(--color-gray-600)] hover:border-[var(--color-gray-500)] focus:border-[var(--color-blue-1000)] focus:text-[var(--color-blue-1000)]",error:"border-[var(--color-red-1000)] text-[var(--color-red-1000)] placeholder:text-[var(--color-red-1000)] focus:border-[var(--color-red-1000)]",success:"border-[var(--color-green-1000)] text-[var(--color-green-1000)] placeholder:text-[var(--color-green-1000)] focus:border-[var(--color-green-1000)]"},size:{medium:"px-4 py-4 text-[1rem] leading-[1.5rem]",small:"px-3 py-2 text-[0.875rem] leading-[1.25rem]",tiny:"p-2 text-[0.75rem] leading-[1rem]",micro:"px-1.5 py-1 text-[0.6875rem] leading-[0.875rem]"}},defaultVariants:{status:"default",size:"medium"}}),yl=b("relative w-full",{variants:{size:{medium:"",small:"",tiny:"",micro:""}},defaultVariants:{size:"medium"}}),qr=b("absolute top-1/2 -translate-y-1/2 pointer-events-none flex items-center justify-center",{variants:{status:{default:"text-[var(--color-gray-600)]",error:"text-[var(--color-red-1000)]",success:"text-[var(--color-green-1000)]"},position:{start:"",end:""},size:{medium:"size-[24px]",small:"size-[16px]",tiny:"size-[16px]",micro:"size-[14px]"}},compoundVariants:[{position:"start",size:"medium",className:"left-4"},{position:"start",size:"small",className:"left-3"},{position:"start",size:"tiny",className:"left-2"},{position:"start",size:"micro",className:"left-1.5"},{position:"end",size:"medium",className:"right-4"},{position:"end",size:"small",className:"right-3"},{position:"end",size:"tiny",className:"right-2"},{position:"end",size:"micro",className:"right-1.5"}],defaultVariants:{status:"default",size:"medium",position:"end"}}),jl=b("text-[var(--color-red-1000)]",{variants:{size:{medium:"text-[0.875rem] leading-[1.25rem]",small:"text-[0.75rem] leading-[1rem]",tiny:"text-[0.75rem] leading-[1rem]",micro:"text-[0.6875rem] leading-[0.875rem]"}},defaultVariants:{size:"medium"}}),wo=j.forwardRef(({className:r,status:t="default",size:o="medium",startIcon:a,endIcon:n,disabled:s,error:l,label:c,hint:d,...x},p)=>{const f=j.useId(),u=l?"error":t,g={medium:"pl-12",small:"pl-9",tiny:"pl-8",micro:"pl-7"},m={medium:"pr-12",small:"pr-9",tiny:"pr-8",micro:"pr-7"};return e.jsxs("div",{className:"flex flex-col gap-1",children:[c&&e.jsx("label",{className:"text-[11px] font-semibold text-[var(--color-gray-800)]",children:c}),e.jsxs("div",{className:yl({size:o}),children:[a&&e.jsx("span",{className:qr({status:u,size:o,position:"start"}),children:a}),e.jsx("input",{ref:p,className:y(vl({status:u,size:o}),a&&g[o],n&&m[o],r),disabled:s,"aria-invalid":!!l,"aria-describedby":l?f:void 0,...x}),n&&e.jsx("span",{className:qr({status:u,size:o,position:"end"}),children:n})]}),l&&e.jsx("span",{id:f,className:jl({size:o}),role:"alert",children:l}),!l&&d&&e.jsx("span",{className:"text-[11px] text-[var(--color-gray-600)]",children:d})]})});wo.displayName="Input";const wl=b("flex flex-col items-center justify-center"),Cl=b("relative",{variants:{size:{sm:"w-8 h-8",md:"w-12 h-12",lg:"w-16 h-16"}},defaultVariants:{size:"lg"}}),Sl=b("absolute inset-0 rounded-full border-4 border-transparent animate-spin",{variants:{color:{primary:"border-t-[var(--color-blue-800)]",secondary:"border-t-[var(--color-gray-600)]"}},defaultVariants:{color:"primary"}}),kl=b("mt-4 typography-small",{variants:{color:{primary:"text-[var(--color-gray-1000)]",muted:"text-[var(--color-gray-600)]"}},defaultVariants:{color:"muted"}}),Nl=({size:r="lg",color:t="primary",text:o,textColor:a="muted",className:n})=>e.jsxs("div",{className:y(wl(),n),children:[e.jsx("div",{className:Cl({size:r}),children:e.jsx("div",{className:Sl({color:t})})}),o&&e.jsx("p",{className:kl({color:a}),children:o})]}),br=b("relative flex flex-col w-full max-w-[668px] transition-colors duration-200 group",{variants:{variant:{user:"",assistant:"",system:"",loader:""},alignment:{left:"items-start",center:"items-center",right:"items-end"},isEditing:{true:"items-stretch",false:""}},compoundVariants:[{variant:"user",alignment:void 0,isEditing:!1,className:"items-end"},{variant:"assistant",alignment:void 0,isEditing:!1,className:"items-start"},{variant:"system",alignment:void 0,className:"items-start"},{variant:"loader",alignment:void 0,className:"items-start"}],defaultVariants:{variant:"user",isEditing:!1}}),zl=b("flex gap-[12px] items-start w-full"),Tl=b("flex flex-col flex-1 min-w-0"),Jr=b("flex flex-col w-full transition-colors duration-200",{variants:{variant:{user:"[background-image:linear-gradient(var(--color-white),var(--color-white)),linear-gradient(180deg,#B9BCCB_0%,#E5E7F0_100%)] [background-origin:padding-box,border-box] [background-clip:padding-box,border-box] border border-transparent rounded-[16px] p-[16px] overflow-clip shadow-[0px_4px_6px_-2px_rgba(0,0,0,0.03),0px_12px_16px_-4px_rgba(0,0,0,0.05)]",assistant:"bg-transparent px-[8px] pb-[8px] gap-[8px]",system:"bg-transparent gap-[8px]",loader:"bg-transparent gap-[24px]"},isSticky:{true:"shadow-[0px_8px_16px_-4px_rgba(0,0,0,0.1),0px_4px_8px_-4px_rgba(0,0,0,0.06)]",false:""},withTimer:{true:"",false:""}},compoundVariants:[{variant:"assistant",withTimer:!0,className:"bg-white p-[16px] rounded-[4px]"},{variant:"user",withTimer:!0,className:"bg-[var(--color-gray-100)] [background-image:none] border-0 rounded-[4px] shadow-none overflow-visible"}],defaultVariants:{variant:"user",isSticky:!1,withTimer:!1}}),Ll=b("flex w-full",{variants:{variant:{user:"flex-col gap-[8px]",assistant:"flex-col gap-[8px]",system:"flex-row items-center gap-[8px]",loader:"flex-col items-start"}},defaultVariants:{variant:"user"}}),$l=b("typography-h4 text-[var(--color-blue-1000)]"),Qr=b("typography-small",{variants:{variant:{user:"text-[var(--color-blue-1000)]",assistant:"text-[var(--color-blue-1000)]",system:"text-[var(--color-gray-600)]",loader:""}},defaultVariants:{variant:"user"}}),et=b("flex gap-[8px] p-[4px] rounded-[4px] transition-opacity duration-200",{variants:{variant:{user:"",assistant:"",system:"hidden",loader:"hidden"}},defaultVariants:{variant:"user"}}),Ml=b(["flex","gap-[8px]","opacity-0","group-hover:opacity-100","transition-opacity","duration-200"]),Al=b("p-1 rounded-[4px] text-[var(--color-gray-400)] hover:text-[var(--color-gray-800)] hover:drop-shadow-[0_1px_2px_rgba(0,0,0,0.05)] transition-all duration-200 focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-1 disabled:opacity-30 disabled:cursor-not-allowed disabled:hover:text-[var(--color-gray-400)] disabled:hover:drop-shadow-none",{variants:{isActive:{true:"text-[var(--color-blue-800)]",false:""}},defaultVariants:{isActive:!1}}),Rl=b("flex items-start justify-center shrink-0 pt-[4px]"),Fl=b("flex items-center justify-center size-[32px] rounded-full bg-[var(--color-blue-1000)]"),Bl=b("text-[12px] text-[var(--color-gray-600)] mt-[4px]"),Il=b("flex items-center justify-center"),Dl=b("relative overflow-hidden flex items-center gap-[8px] py-[2px] select-none"),Wl=b(["absolute -inset-y-2 -inset-x-4","animate-shimmer","bg-[linear-gradient(90deg,transparent_0%,transparent_35%,rgba(255,255,255,0.4)_50%,transparent_65%,transparent_100%)]","blur-[1px]","z-10 pointer-events-none"]),Pl=b(["relative shrink-0 flex items-center justify-center","text-[var(--color-gray-600)]","animate-signal-rhythm","origin-center"]),El=b(["absolute inset-0","bg-[var(--color-blue-200)]","rounded-full","opacity-0","animate-ping-slow","-z-10"]),Vl=b(["flex","flex-col","w-full","bg-[var(--color-white)]","rounded-[16px]","border","border-[var(--color-blue-800)]","p-[16px]","gap-[8px]","transition-colors","duration-200"]),Hl=b(["w-full","min-h-[60px]","bg-transparent","border-none","resize-none","typography-small","text-[var(--color-blue-1000)]","placeholder:text-[var(--color-gray-600)]","focus:outline-none","disabled:opacity-50","disabled:cursor-not-allowed"]),_l=b(["text-[12px]","leading-[16px]","text-[var(--color-gray-600)]"]),Ol=b("flex items-center gap-[8px]"),Gl=b("overflow-clip shrink-0 size-[24px]"),Ul=b("text-[14px] leading-[20px] font-semibold text-[var(--color-blue-1000)] whitespace-nowrap"),Yl=b("text-[14px] leading-[20px] text-[var(--color-gray-400)] whitespace-nowrap"),Kl=b(["flex","items-center","gap-[4px]"]),rt=b(["p-[4px]","rounded-[4px]","text-[var(--color-gray-400)]","transition-colors","duration-200","hover:text-[var(--color-gray-800)]","hover:bg-[var(--color-gray-100)]","disabled:opacity-30","disabled:cursor-not-allowed","disabled:hover:bg-transparent","disabled:hover:text-[var(--color-gray-400)]","focus-visible:ring-2","focus-visible:ring-[var(--color-blue-200)]","focus-visible:ring-offset-1"]),Zl=b(["text-[12px]","leading-[16px]","text-[var(--color-gray-600)]","font-normal","tabular-nums","select-none","min-w-[32px]","text-center"]),vr=r=>{const t=typeof r=="string"?new Date(r):r,a=new Date().getTime()-t.getTime(),n=Math.floor(a/6e4);if(n<1)return"Just now";if(n===1)return"1 minute ago";if(n<60)return`${n} minutes ago`;const s=Math.floor(n/60);return s===1?"1 hour ago":s<24?`${s} hours ago`:t.toLocaleDateString()};function Xl(r){const[t,o]=j.useState(()=>r?vr(r):"");return j.useEffect(()=>{if(!r){o("");return}o(vr(r));const a=setInterval(()=>{o(vr(r))},3e4);return()=>clearInterval(a)},[r]),t}const ql=[],Jl=typeof navigator<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Ql=Jl?"⌘+Enter to save, Esc to cancel":"Ctrl+Enter to save, Esc to cancel",ei=r=>{const t=typeof r=="string"?new Date(r):r,a=new Date().getTime()-t.getTime(),n=Math.floor(a/6e4);if(n<1)return"Just now";if(n<60)return`${n} min ago`;const s=Math.floor(n/60);return s<24?`${s}h ago`:t.toLocaleDateString()},Me=j.memo(({onClick:r,icon:t,label:o,className:a,isActive:n=!1,disabled:s=!1,showSuccessFeedback:l=!1,successIcon:c=i.Check,successDuration:d=2e3})=>{const[x,p]=j.useState(!1),f=j.useCallback(async()=>{if(!(!r||s))try{await r(),l&&(p(!0),setTimeout(()=>p(!1),d))}catch(g){console.error("Action failed:",g)}},[r,s,l,d]),u=x?c:t;return e.jsx("button",{className:y(Al({isActive:n||x}),a),onClick:f,type:"button","aria-label":x?"Success":o,disabled:s,children:e.jsx(u,{size:12})})});Me.displayName="ActionButton";const Co=j.memo(({branchInfo:r,onPrevious:t,onNext:o,isLoading:a=!1})=>{const n=r.currentIndex>1,s=r.currentIndex<r.totalBranches;return r.totalBranches<=1?null:e.jsxs("div",{className:y(Kl()),children:[e.jsx("button",{type:"button",className:y(rt()),onClick:t,disabled:!n||a,"aria-label":"Previous version",children:e.jsx(i.ChevronLeft,{size:14})}),e.jsxs("span",{className:y(Zl()),children:[r.currentIndex," / ",r.totalBranches]}),e.jsx("button",{type:"button",className:y(rt()),onClick:o,disabled:!s||a,"aria-label":"Next version",children:e.jsx(i.ChevronRight,{size:14})})]})});Co.displayName="BranchNavigator";const ri=()=>{const[r,t]=j.useState(0);return j.useEffect(()=>{const o=setInterval(()=>{t(a=>a+1)},2500);return()=>clearInterval(o)},[]),e.jsx("div",{className:y(Il()),children:e.jsx(Ar,{size:28,colorVariant:"lightTeal",animated:!0,animationDuration:2},r)})},So=j.forwardRef(({className:r,variant:t="user",heading:o,children:a,isLoading:n,timestamp:s,hideAvatar:l=!1,showTimestamp:c=!1,isSticky:d=!1,isInitialPrompt:x=!1,alignment:p,actions:f=ql,enableCopy:u=!1,copyIcon:g,onCopySuccess:m,enableEdit:h=!1,isEditing:v,initialEditContent:w,onEditStart:k,onEditCancel:L,onEditSave:z,isSaving:C=!1,branchInfo:T,onPreviousBranch:I,onNextBranch:$,isBranchLoading:F=!1,withTimer:S=!1,senderName:N,senderAvatar:B,senderTime:E,...V},H)=>{const W=Xl(S&&!E?s:void 0),O=E||W,M=j.useRef(null),D=j.useRef(null),[_,fe]=j.useState(!1),[re,K]=j.useState(!1),[U,ne]=j.useState(w??""),Q=v??re,Z=p??(t==="user"?x?"center":"right":"left"),ve=j.useCallback(()=>M.current?M.current.innerText:typeof a=="string"?a:"",[a]),Se=j.useCallback(()=>{if(v===void 0){const G=w??ve();ne(G),K(!0)}k==null||k()},[w,ve,v,k]),ue=j.useCallback(()=>{v===void 0&&K(!1),ne(""),L==null||L()},[v,L]),ye=j.useCallback(async()=>{if(!(!(U!=null&&U.trim())||C)&&U.trim()!==(w==null?void 0:w.trim()))try{await(z==null?void 0:z(U)),v===void 0&&K(!1),ne("")}catch(G){console.error("Failed to save edit:",G)}},[U,C,z,v,w]),ke=j.useCallback(G=>{G.key==="Escape"?ue():G.key==="Enter"&&(G.metaKey||G.ctrlKey)&&(G.preventDefault(),ye())},[ue,ye]),Wr=j.useRef(!1),Pr=j.useRef(w);j.useEffect(()=>{Pr.current=w},[w]),j.useEffect(()=>{const G=Wr.current;if(Wr.current=Q,Q&&!G){const Pe=w||Pr.current||ve()||"";ne(Pe)}else!Q&&G&&ne("")},[Q,w,ve]),j.useEffect(()=>{if(Q&&D.current){D.current.focus();const G=D.current.value.length;D.current.setSelectionRange(G,G)}},[Q]);const ia=j.useCallback(async()=>{if(!M.current)return;const G=M.current.innerText;try{navigator.clipboard&&navigator.clipboard.writeText?(await navigator.clipboard.writeText(G),fe(!0),m==null||m(),setTimeout(()=>{fe(!1)},2e3)):console.warn("Clipboard API not available")}catch(Pe){console.error("Failed to copy:",Pe)}},[m]),ca=j.useCallback(G=>{ne(G.target.value)},[]),Er=j.useMemo(()=>f.length>0||u||h&&t==="user",[f.length,u,h,t]),Vr=j.useMemo(()=>!d&&!Q&&(t==="user"||t==="assistant")&&Er,[d,Q,t,Er]),Hr=j.useMemo(()=>!Q&&T&&T.totalBranches>1&&t==="user",[Q,T,t]);return t==="loader"||n?e.jsx("div",{ref:H,className:y(br({variant:"loader",alignment:"left",isEditing:!1}),r),...V,children:e.jsx("div",{className:y(Jr({variant:"loader",isSticky:d})),children:e.jsx(ri,{})})}):Q&&t==="user"?e.jsxs("div",{ref:H,className:y(br({variant:t,alignment:"right",isEditing:!0}),"group",r),...V,children:[e.jsx("div",{className:y(Vl()),children:e.jsx("textarea",{ref:D,value:U,onChange:ca,onKeyDown:ke,className:y(Hl()),placeholder:"Edit your message...",disabled:C,"aria-label":"Edit message"})}),e.jsxs("div",{className:y(et({variant:t}),"opacity-100 justify-between"),children:[e.jsx("span",{className:y(_l()),children:Ql}),e.jsxs("div",{className:"flex",children:[e.jsx(Me,{onClick:ye,icon:i.Check,label:"Save",disabled:C||!(U!=null&&U.trim())||U.trim()===(w==null?void 0:w.trim())}),e.jsx(Me,{onClick:ue,icon:i.X,label:"Cancel",disabled:C})]})]})]}):e.jsxs("div",{ref:H,className:y(br({variant:t,alignment:Z,isEditing:!1}),"group",r),...V,children:[S&&N&&e.jsxs("div",{className:y(Ol()),children:[B&&e.jsx("div",{className:y(Gl()),children:B}),e.jsx("span",{className:y(Ul()),children:N}),O&&e.jsx("span",{className:y(Yl()),children:O})]}),e.jsxs("div",{className:y(zl()),children:[!S&&!l&&t==="assistant"&&e.jsx("div",{className:y(Rl()),children:e.jsx("div",{className:y(Fl()),children:e.jsx(Mr,{size:20,colorVariant:"lightTeal"})})}),e.jsxs("div",{className:y(Tl()),children:[e.jsx("div",{className:y(Jr({variant:t,isSticky:d,withTimer:S})),children:e.jsx("div",{className:y(Ll({variant:t})),ref:M,children:t==="system"?e.jsxs("div",{className:y(Dl()),children:[e.jsx("div",{className:y(Wl())}),e.jsxs("div",{className:y(Pl()),children:[e.jsx(i.Activity,{size:16}),e.jsx("div",{className:y(El())})]}),e.jsx("span",{className:y(Qr({variant:t})),children:a})]}):e.jsxs(e.Fragment,{children:[t==="assistant"&&o&&e.jsx("h4",{className:y($l()),children:o}),e.jsx("div",{className:y(Qr({variant:t})),children:a})]})})}),c&&s&&e.jsx("div",{className:y(Bl()),children:ei(s)}),(Vr||Hr)&&e.jsxs("div",{className:y(et({variant:t}),"justify-between"),children:[e.jsx("div",{className:y(Ml()),children:Vr&&e.jsxs(e.Fragment,{children:[u&&g&&e.jsx(Me,{onClick:ia,icon:_?i.Check:g,label:_?"Copied":"Copy",isActive:_}),h&&t==="user"&&e.jsx(Me,{onClick:Se,icon:i.Edit2,label:"Edit"}),f.map((G,Pe)=>e.jsx(Me,{onClick:G.onClick,icon:G.icon,label:G.label,isActive:G.isActive,showSuccessFeedback:G.showSuccessFeedback,successIcon:G.successIcon,successDuration:G.successDuration},`${G.label}-${Pe}`))]})}),Hr&&T&&e.jsx(Co,{branchInfo:T,onPrevious:I,onNext:$,isLoading:F})]})]})]})]})});So.displayName="MessageBubble";const ti=b("w-full overflow-hidden rounded-full bg-[var(--color-gray-200)]",{variants:{size:{small:"h-1",medium:"h-2",large:"h-3"}},defaultVariants:{size:"medium"}}),oi=b("h-full w-full flex-1 transition-all duration-300 ease-in-out rounded-full",{variants:{variant:{default:"bg-[var(--color-blue-800)]",success:"bg-[var(--color-green-1000)]",error:"bg-[var(--color-red-1000)]",warning:"bg-[var(--color-amber-1000)]"}},defaultVariants:{variant:"default"}}),ai=b("flex justify-between mb-2 text-[var(--color-gray-800)]",{variants:{size:{small:"text-xs",medium:"text-sm",large:"text-base"}},defaultVariants:{size:"medium"}}),ko=j.forwardRef(({className:r,value:t=0,max:o=100,variant:a="default",size:n="medium",showValueLabel:s=!1,label:l,valueFormatter:c,...d},x)=>{const p=Math.min(Math.max(t/o*100,0),100),f=c?c(t,o):`${Math.round(p)}%`;return e.jsxs("div",{ref:x,className:y("w-full",r),role:"progressbar","aria-valuemin":0,"aria-valuemax":o,"aria-valuenow":t,...d,children:[(l||s)&&e.jsxs("div",{className:ai({size:n}),children:[l&&e.jsx("span",{className:"font-medium",children:l}),s&&e.jsx("span",{className:"ml-auto",children:f})]}),e.jsx("div",{className:ti({size:n}),children:e.jsx("div",{className:oi({variant:a}),style:{transform:`translateX(-${100-p}%)`}})})]})});ko.displayName="ProgressBar";const ni=b(["w-full h-2 rounded-lg appearance-none cursor-pointer","focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","[&::-webkit-slider-thumb]:appearance-none","[&::-webkit-slider-thumb]:w-5 [&::-webkit-slider-thumb]:h-5","[&::-webkit-slider-thumb]:bg-[var(--color-white)]","[&::-webkit-slider-thumb]:border-2","[&::-webkit-slider-thumb]:rounded-full","[&::-webkit-slider-thumb]:shadow-sm","[&::-webkit-slider-thumb]:transition-all [&::-webkit-slider-thumb]:duration-200","[&::-webkit-slider-thumb]:hover:scale-110","[&::-moz-range-thumb]:w-5 [&::-moz-range-thumb]:h-5","[&::-moz-range-thumb]:bg-[var(--color-white)]","[&::-moz-range-thumb]:border-2","[&::-moz-range-thumb]:rounded-full","[&::-moz-range-thumb]:shadow-sm","[&::-moz-range-thumb]:transition-all [&::-moz-range-thumb]:duration-200","[&::-moz-range-thumb]:hover:scale-110"].join(" "),{variants:{variant:{cyan:["focus-visible:ring-[var(--color-blue-200)]","[&::-webkit-slider-thumb]:border-[var(--color-gray-200)] [&::-webkit-slider-thumb]:hover:border-[var(--color-blue-800)]","[&::-moz-range-thumb]:border-[var(--color-gray-200)] [&::-moz-range-thumb]:hover:border-[var(--color-blue-800)]"],orange:["focus-visible:ring-[var(--color-orange-200)]","[&::-webkit-slider-thumb]:border-[var(--color-gray-200)] [&::-webkit-slider-thumb]:hover:border-[var(--color-orange-800)]","[&::-moz-range-thumb]:border-[var(--color-gray-200)] [&::-moz-range-thumb]:hover:border-[var(--color-orange-800)]"]},animated:{true:["[&::-webkit-slider-thumb]:animate-pulse","[&::-moz-range-thumb]:animate-pulse"],false:[]}},defaultVariants:{variant:"cyan",animated:!1}}),No=j.forwardRef(({className:r,variant:t="cyan",animated:o=!1,style:a,...n},s)=>{const{min:l=0,max:c=100,value:d,defaultValue:x}=n,p=Number(d??x??0),f=Number(l),u=Number(c),g=Math.min(Math.max((p-f)*100/(u-f),0),100),m=t==="orange"?"var(--color-orange-800)":"var(--color-blue-800)",h=`linear-gradient(to right, ${m} 0%, ${m} ${g}%, var(--color-gray-200) ${g}%, var(--color-gray-200) 100%)`;return e.jsx("input",{ref:s,type:"range",className:y(ni({variant:t,animated:o}),r),style:{background:h,...a},...n})});No.displayName="RangeInput";const si=b("box-border flex cursor-pointer transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2",{variants:{type:{collapsed:"flex-col items-center justify-center w-[64px] py-[6px] px-[4px] gap-[4px] rounded-[4px]",expanded:"flex-row items-center w-full h-[32px] px-[4px] py-[6px] gap-[8px] rounded-[4px]"},variant:{default:"text-[var(--color-gray-800)] hover:bg-[var(--color-gray-100)]",active:"text-[var(--color-blue-800)] bg-[var(--color-blue-200)]",brand:"h-[44px] rounded-[24px] bg-transparent hover:bg-transparent"},heightAuto:{true:"h-auto"},disabled:{true:"opacity-50 cursor-not-allowed pointer-events-none"}},compoundVariants:[{type:"collapsed",variant:"active",className:"bg-[var(--color-blue-200)]"}],defaultVariants:{type:"expanded",variant:"default",heightAuto:!1,disabled:!1}}),li=b("relative shrink-0 flex items-center justify-center",{variants:{type:{collapsed:"size-[16px]",expanded:"size-[16px]"},variant:{default:"text-[var(--color-gray-800)]",active:"text-[var(--color-blue-800)]",brand:"text-[var(--color-blue-1000)] size-[24px]"},heightAuto:{true:"size-auto"}},defaultVariants:{type:"expanded",variant:"default",heightAuto:!1}}),ii=b("font-normal whitespace-nowrap shrink-0",{variants:{type:{collapsed:"text-[8px] leading-[10px] text-center min-w-full",expanded:"text-[14px] leading-[20px]"},variant:{default:"text-[var(--color-gray-800)]",active:"text-[var(--color-blue-800)]",brand:"hidden"}},defaultVariants:{type:"expanded",variant:"default"}}),zo=j.forwardRef(({className:r,icon:t,label:o,isCollapsed:a=!1,isActive:n=!1,variant:s="default",heightAuto:l=!1,disabled:c=!1,onClick:d,children:x,...p},f)=>{const u=a?"collapsed":"expanded",g=n?"active":s,m=v=>{c||d&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),d())},h=()=>{c||d==null||d()};return e.jsxs("div",{ref:f,className:y(si({type:u,variant:g,heightAuto:l,disabled:c}),r),role:"button",tabIndex:c?-1:0,"aria-label":o,"aria-disabled":c,onClick:h,onKeyDown:m,...p,children:[t&&e.jsx("div",{className:y(li({type:u,variant:g,heightAuto:l})),children:t}),(s!=="brand"||!a)&&e.jsx("span",{className:y(ii({type:u,variant:g})),children:o})]})});zo.displayName="SidebarItem";const ci=b("inline-flex items-center justify-center rounded-[4px] whitespace-nowrap transition-colors duration-200 box-border",{variants:{variant:{default:"border border-[var(--color-gray-200)] bg-[var(--color-gray-100)] px-2 py-[2px] text-[var(--color-gray-800)] gap-1",collaborator:"border border-[var(--color-gray-200)] bg-[var(--color-gray-100)] px-2 py-[2px] text-[var(--color-gray-800)] gap-1",indicator:"bg-[var(--color-gray-100)] px-[2px] h-[12px] gap-[4px] text-[var(--color-gray-600)]",highlight:"border border-[var(--color-blue-800)] bg-[var(--color-blue-800-subtle)] px-2 py-[2px] text-[var(--color-blue-1000)] gap-1",error:"bg-[var(--color-red-200)] px-[2px] h-[12px] gap-[4px] text-[var(--color-red-1000)]"}},defaultVariants:{variant:"default"}}),di=b("w-4 h-4 rounded-full object-cover shrink-0"),tt=b("flex items-center justify-center shrink-0"),Ie=j.forwardRef(({className:r,variant:t="default",startIcon:o,endIcon:a,avatarSrc:n,onDelete:s,children:l,...c},d)=>e.jsxs("div",{ref:d,className:y(s&&"relative group",ci({variant:t}),r),...c,children:[n&&e.jsx("img",{src:n,alt:"avatar",className:di()}),o&&e.jsx("span",{className:tt(),children:o}),e.jsx(Ye,{variant:"tag",color:"inherit",className:"whitespace-nowrap",children:l}),a&&e.jsx("span",{className:tt(),children:a}),s&&e.jsx(q.motion.button,{onClick:x=>{x.stopPropagation(),s()},className:"absolute -top-[6px] -right-[6px] hidden group-hover:flex items-center justify-center bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-[8px] p-[2px] focus:outline-none focus:ring-2 focus:ring-[var(--color-blue-800)] shrink-0 z-20","aria-label":"Remove",initial:{scale:0,opacity:0},whileInView:{scale:1,opacity:1},whileHover:{scale:1.1},whileTap:{scale:.95},transition:{scale:{type:"spring",stiffness:400,damping:17},opacity:{duration:.2}},children:e.jsx(i.X,{size:10,className:"text-[var(--color-gray-800)]"})})]}));Ie.displayName="Tag";const pi=b("inline-flex items-center justify-start bg-transparent p-0 w-full",{variants:{variant:{default:"",underline:"border-b border-[var(--color-gray-200)] [&>button]:-mb-px",pills:"bg-[var(--color-gray-200)] rounded p-0.5 gap-1 w-auto",segmented:"bg-[var(--color-gray-100)] rounded-lg p-[3px] gap-[2px] w-auto","filter-pills":"gap-1.5 flex-wrap w-auto"}},defaultVariants:{variant:"default"}}),xi=b("inline-flex items-center justify-center whitespace-nowrap focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 transition-colors cursor-pointer group shrink-0",{variants:{variant:{default:'p-2 font-["Geist",system-ui,sans-serif] text-[10px] leading-4 font-normal border-b border-[var(--color-gray-200)] text-[var(--color-gray-600)] data-[state=active]:text-[var(--color-blue-1000)] data-[state=active]:border-[var(--color-blue-1000)] data-[state=inactive]:hover:bg-[var(--color-gray-100)] gap-2',underline:'p-2 font-["Geist",system-ui,sans-serif] text-[10px] leading-4 font-normal border-b border-[var(--color-gray-200)] text-[var(--color-gray-600)] data-[state=active]:text-[var(--color-blue-1000)] data-[state=active]:border-[var(--color-blue-1000)] data-[state=inactive]:hover:bg-[var(--color-gray-100)] gap-2',pills:"px-2 h-6 rounded font-body text-xs leading-4 font-light text-[var(--color-blue-1000)] border border-transparent data-[state=active]:bg-[var(--color-white)] data-[state=active]:border-[var(--color-gray-200)] data-[state=active]:shadow-sm data-[state=inactive]:hover:bg-[var(--color-gray-100)]",segmented:"py-[5px] px-3 rounded-md text-xs font-normal text-[var(--color-gray-600)] data-[state=active]:bg-[var(--color-white)] data-[state=active]:text-[var(--color-gray-1000)] data-[state=active]:font-semibold data-[state=active]:shadow-sm data-[state=inactive]:hover:text-[var(--color-gray-800)]","filter-pills":"py-1 px-3 rounded-full text-xs font-medium text-[var(--color-gray-600)] border border-[var(--color-gray-200)] data-[state=active]:bg-[rgba(21,177,205,0.09)] data-[state=active]:text-[var(--color-blue-800)] data-[state=active]:border-[rgba(21,177,205,0.25)] data-[state=inactive]:hover:bg-[var(--color-gray-100)] capitalize"}},defaultVariants:{variant:"default"}}),fi=b("mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2"),ui=b("flex items-center gap-[2px]"),ot=b("group-data-[state=active]:text-[var(--color-blue-1000)]"),To=Fe.createContext("default"),gi=Ce.Root,Lo=Fe.forwardRef(({className:r,variant:t="default",...o},a)=>e.jsx(To.Provider,{value:t,children:e.jsx(Ce.List,{ref:a,className:y(pi({variant:t}),r),...o})}));Lo.displayName=Ce.List.displayName;const $o=Fe.forwardRef(({className:r,children:t,errorCount:o,configurationCount:a,...n},s)=>{const l=Fe.useContext(To);return e.jsxs(Ce.Trigger,{ref:s,className:y(xi({variant:l}),r),...n,children:[t,l!=="pills"&&(a!==void 0||o!==void 0)&&e.jsxs("div",{className:ui(),children:[a!==void 0&&e.jsx(Ie,{variant:"indicator",startIcon:e.jsx(i.Settings,{size:10,className:"text-[#15B1CD]"}),className:ot(),children:a}),o!==void 0&&e.jsx(Ie,{variant:"indicator",startIcon:e.jsx(i.TriangleAlert,{size:10,className:"text-[#FB6060]"}),className:ot(),children:o})]})]})});$o.displayName=Ce.Trigger.displayName;const Mo=Fe.forwardRef(({className:r,...t},o)=>e.jsx(Ce.Content,{ref:o,className:y(fi(),r),...t}));Mo.displayName=Ce.Content.displayName;const mi=b("w-full bg-[var(--color-white)] border border-solid rounded-[8px] font-normal transition-colors duration-200 box-border focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 min-h-[80px]",{variants:{status:{default:"border-[var(--color-gray-200)] text-[var(--color-gray-600)] placeholder:text-[var(--color-gray-600)] hover:border-[var(--color-gray-500)] focus:border-[var(--color-blue-1000)] focus:text-[var(--color-blue-1000)]",error:"border-[var(--color-red-1000)] text-[var(--color-red-1000)] placeholder:text-[var(--color-red-1000)] focus:border-[var(--color-red-1000)]",success:"border-[var(--color-green-1000)] text-[var(--color-green-1000)] placeholder:text-[var(--color-green-1000)] focus:border-[var(--color-green-1000)]"},size:{medium:"px-4 py-4 text-[1rem] leading-[1.5rem]",small:"px-3 py-2 text-[0.875rem] leading-[1.25rem]",tiny:"p-2 text-[0.75rem] leading-[1rem]"},resize:{none:"resize-none",vertical:"resize-y",horizontal:"resize-x",both:"resize"}},defaultVariants:{status:"default",size:"medium",resize:"vertical"}}),hi=b("relative w-full",{variants:{size:{medium:"",small:"",tiny:""}},defaultVariants:{size:"medium"}}),Ao=j.forwardRef(({className:r,status:t="default",size:o="medium",resize:a="vertical",disabled:n,label:s,hint:l,...c},d)=>e.jsxs("div",{className:"flex flex-col gap-1",children:[s&&e.jsx("label",{className:"text-[11px] font-semibold text-[var(--color-gray-800)]",children:s}),e.jsx("div",{className:hi({size:o}),children:e.jsx("textarea",{ref:d,className:y(mi({status:t,size:o,resize:a}),r),disabled:n,...c})}),l&&e.jsx("span",{className:"text-[11px] text-[var(--color-gray-600)]",children:l})]}));Ao.displayName="TextArea";const bi=b("inline-flex items-center gap-1 font-sans whitespace-nowrap",{variants:{size:{small:"text-[0.625rem] leading-[1rem]",medium:"text-[0.75rem] leading-[1rem]",large:"text-[0.875rem] leading-[1.25rem]"},variant:{default:"text-[var(--color-gray-600)]",primary:"text-[var(--color-gray-800)]",muted:"text-[var(--color-gray-600)]"}},defaultVariants:{size:"medium",variant:"default"}}),vi=b("flex items-center justify-center shrink-0",{variants:{size:{small:"[&>svg]:w-[10px] [&>svg]:h-[10px]",medium:"[&>svg]:w-[12px] [&>svg]:h-[12px]",large:"[&>svg]:w-[14px] [&>svg]:h-[14px]"}},defaultVariants:{size:"medium"}}),yi=(r,t)=>{const o=t.getTime()-r.getTime(),a=Math.floor(o/1e3),n=Math.floor(a/60),s=Math.floor(n/60),l=Math.floor(s/24),c=Math.floor(l/7),d=Math.floor(l/30),x=Math.floor(l/365),p=o<0,f=Math.abs(a),u=Math.abs(n),g=Math.abs(s),m=Math.abs(l),h=Math.abs(c),v=Math.abs(d),w=Math.abs(x),k=(L,z)=>{const C=L===1?"":"s";return p?`in ${L} ${z}${C}`:`${L} ${z}${C} ago`};return f<60?"just now":u<60?k(u,"minute"):g<24?k(g,"hour"):m===1?p?"tomorrow":"yesterday":m<7?k(m,"day"):h<4?k(h,"week"):v<12?k(v,"month"):k(w,"year")},ji=(r,t,o)=>{switch(t){case"relative":return yi(r,new Date);case"short":return r.toLocaleDateString(o,{month:"short",day:"numeric",year:"numeric"});case"long":return r.toLocaleDateString(o,{month:"long",day:"numeric",year:"numeric"});case"time":return r.toLocaleTimeString(o,{hour:"numeric",minute:"2-digit",hour12:!0});case"datetime":return r.toLocaleDateString(o,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0});default:return r.toLocaleDateString(o)}},wi=r=>r instanceof Date?r:typeof r=="number"?new Date(r):new Date(r),Ro=j.forwardRef(({className:r,date:t,format:o="relative",size:a="medium",variant:n="default",showIcon:s=!1,locale:l="en-US",...c},d)=>{const x=j.useMemo(()=>wi(t),[t]),p=j.useMemo(()=>ji(x,o,l),[x,o,l]),f=j.useMemo(()=>x.toISOString(),[x]),u=n==="primary"?"var(--color-gray-800)":"var(--color-gray-600)",g=a==="small"?10:a==="large"?14:12;return e.jsxs("time",{ref:d,dateTime:f,className:y(bi({size:a,variant:n}),r),...c,children:[s&&e.jsx("span",{className:vi({size:a}),children:e.jsx(i.ClockHistory,{size:g,color:u})}),p]})});Ro.displayName="Timestamp";const Ci=b("flex min-w-[420px] w-fit max-w-[850px] pl-4 pr-3 py-3 rounded-[12px] shadow-xl border pointer-events-auto gap-2 relative items-center bg-white",{variants:{variant:{info:"bg-[linear-gradient(90deg,rgba(21,177,205,0.08)_0%,rgba(21,177,205,0.08)_100%),linear-gradient(90deg,rgb(255,255,255)_0%,rgb(255,255,255)_100%)] border-[var(--color-blue-800)]",success:"bg-[linear-gradient(90deg,rgba(113,212,129,0.08)_0%,rgba(113,212,129,0.08)_100%),linear-gradient(90deg,rgb(255,255,255)_0%,rgb(255,255,255)_100%)] border-[var(--color-green-1000)]",warning:"bg-[linear-gradient(90deg,rgba(242,229,40,0.08)_0%,rgba(242,229,40,0.08)_100%),linear-gradient(90deg,rgb(255,255,255)_0%,rgb(255,255,255)_100%)] border-[var(--color-orange-800)]",error:"bg-[linear-gradient(90deg,rgba(251,96,96,0.08)_0%,rgba(251,96,96,0.08)_100%),linear-gradient(90deg,rgb(255,255,255)_0%,rgb(255,255,255)_100%)] border-[var(--color-red-1000)]",prompt:"bg-[var(--color-gray-50)] border-[var(--color-blue-1000)]",loading:"bg-[linear-gradient(90deg,rgba(21,177,205,0.06)_0%,rgba(21,177,205,0.06)_100%),linear-gradient(90deg,rgb(255,255,255)_0%,rgb(255,255,255)_100%)] border-[var(--color-blue-800)]"}},defaultVariants:{variant:"info"}}),Si=b("flex-shrink-0",{variants:{variant:{info:"text-[var(--color-blue-800)]",success:"text-[var(--color-green-1000)]",warning:"text-[var(--color-orange-800)]",error:"text-[var(--color-red-1000)]",prompt:"text-[var(--color-blue-1000)]",loading:"text-[var(--color-blue-800)]"}},defaultVariants:{variant:"info"}}),ki=b("flex flex-col gap-0.5 flex-1 min-w-0 overflow-hidden"),Ni=b("font-bold text-[var(--color-blue-1000)] text-[0.75rem] leading-normal whitespace-nowrap"),zi=b("font-normal text-[var(--color-gray-600)] text-[0.6875rem] leading-normal line-clamp-2"),Ti=b("flex items-center gap-2 shrink-0"),Li=b("w-[1px] self-stretch flex-shrink-0 bg-current",{variants:{variant:{info:"text-[var(--color-blue-800)]",success:"text-[var(--color-green-1000)]",warning:"text-[var(--color-orange-800)]",error:"text-[var(--color-red-1000)]",prompt:"text-[var(--color-blue-1000)]",loading:"text-[var(--color-blue-800)]"}},defaultVariants:{variant:"info"}}),$i=b("p-0 bg-transparent border-none text-[var(--color-blue-1000)] hover:opacity-70 transition-opacity flex items-center justify-center w-4 h-4 shrink-0 cursor-pointer rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2"),Mi={info:i.Info,success:i.CheckCircle,warning:i.TriangleAlert,error:i.AlertCircle,prompt:i.Sparks,loading:null},Ai={info:"var(--color-blue-800)",success:"var(--color-green-1000)",warning:"var(--color-orange-800)",error:"var(--color-red-1000)",prompt:"var(--color-blue-800)",loading:"var(--color-blue-800)"},he=({id:r,variant:t="info",title:o,description:a,icon:n,action:s,secondaryAction:l,onClose:c})=>{const d=Mi[t],x=Ai[t],p=()=>{c&&c(),r&&ie.toast.dismiss(r)},f=g=>m=>{g(m),r&&ie.toast.dismiss(r)},u=()=>n||(t==="loading"?e.jsx("svg",{className:"animate-spin",width:16,height:16,viewBox:"0 0 16 16",fill:"none",children:e.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:x,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"28",strokeDashoffset:"8"})}):t==="success"?e.jsx(i.CheckCircle,{size:16,color:x}):t==="error"?e.jsx(i.AlertCircle,{size:16,color:x}):t==="prompt"?e.jsx(i.Sparks,{size:16,color:x}):d?e.jsx(d,{size:16}):null);return e.jsxs("div",{className:y(Ci({variant:t})),role:"alert",children:[e.jsx("div",{className:Si({variant:t}),children:u()}),e.jsxs("div",{className:ki(),children:[e.jsx("span",{className:Ni(),children:o}),a&&e.jsx("span",{className:zi(),children:a})]}),e.jsx("div",{className:Li({variant:t})}),e.jsxs("div",{className:Ti(),children:[l&&e.jsx(Be,{onClick:f(l.onClick),variant:"ghost",size:"sm",leftIcon:l.icon||e.jsx(i.Trash,{size:13,color:"currentColor"}),className:"w-auto",children:l.label}),s&&e.jsx(Be,{onClick:f(s.onClick),variant:"default",size:"sm",leftIcon:s.icon||e.jsx(i.Check,{size:13,color:"currentColor"}),className:"w-auto",children:s.label}),e.jsx("button",{onClick:p,className:$i(),"aria-label":"Close",children:e.jsx(i.X,{size:16})})]})]})},Ri=({position:r="bottom-right",offset:t=24,gap:o=8,width:a,...n})=>e.jsx(ie.Toaster,{position:r,offset:t,gap:o,toastOptions:{unstyled:!0,classNames:{toast:y("bg-transparent p-0",a?"":"w-auto")},style:a?{width:typeof a=="number"?`${a}px`:a}:void 0},...n}),Fi={success:(r,t,o)=>ie.toast.custom(a=>e.jsx(he,{id:a,variant:"success",title:r,description:t,action:o})),error:(r,t,o)=>ie.toast.custom(a=>e.jsx(he,{id:a,variant:"error",title:r,description:t,action:o})),warning:(r,t,o)=>ie.toast.custom(a=>e.jsx(he,{id:a,variant:"warning",title:r,description:t,action:o})),info:(r,t,o)=>ie.toast.custom(a=>e.jsx(he,{id:a,variant:"info",title:r,description:t,action:o})),prompt:(r,t,o,a)=>ie.toast.custom(n=>e.jsx(he,{id:n,variant:"prompt",title:r,description:t,action:o,secondaryAction:a})),loading:(r,t)=>ie.toast.custom(o=>e.jsx(he,{id:o,variant:"loading",title:r,description:t})),custom:r=>ie.toast.custom(t=>e.jsx(he,{id:t,...r}))},Bi=b("flex items-center justify-between w-full",{variants:{size:{s:"h-10",m:"min-h-[48px]",l:"min-h-[48px]"}},defaultVariants:{size:"l"}}),Ii=b("select-none",{variants:{size:{s:"text-[var(--color-blue-1000)]",m:"font-medium text-[var(--color-gray-1000)]",l:"font-medium text-[var(--color-gray-1000)]"}},defaultVariants:{size:"l"}}),Di=b("relative inline-flex shrink-0 cursor-pointer items-center rounded-full transition-colors duration-200 ease-in-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{enabled:{true:"bg-[var(--color-blue-800)]",false:"bg-[var(--color-gray-200)]"},size:{s:"h-4 w-7",m:"h-5 w-9",l:"h-6 w-11"}},defaultVariants:{enabled:!1,size:"l"}}),Wi=b("pointer-events-none inline-block transform rounded-full bg-white ring-0 transition duration-200 ease-in-out",{variants:{enabled:{true:"",false:""},size:{s:"h-3 w-3 shadow-sm",m:"h-4 w-4 shadow",l:"h-5 w-5 shadow-lg"}},compoundVariants:[{enabled:!1,size:"s",class:"translate-x-0.5"},{enabled:!0,size:"s",class:"translate-x-[14px]"},{enabled:!1,size:"m",class:"translate-x-0.5"},{enabled:!0,size:"m",class:"translate-x-[18px]"},{enabled:!1,size:"l",class:"translate-x-0.5"},{enabled:!0,size:"l",class:"translate-x-[22px]"}],defaultVariants:{enabled:!1,size:"l"}}),Pi=b("font-bold uppercase text-[var(--color-gray-600)]",{variants:{size:{s:"text-[10px] w-5",m:"text-[10px] w-5",l:"text-xs w-6"}},defaultVariants:{size:"l"}}),Ei={s:"x-small",m:"small",l:"small"},Fo=j.forwardRef(({enabled:r,onChange:t,label:o,size:a="l",showStatusLabel:n=!1,className:s,disabled:l,...c},d)=>e.jsxs("div",{className:y(Bi({size:a}),s),children:[o&&e.jsx(Ye,{variant:Ei[a],className:Ii({size:a}),children:o}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{ref:d,type:"button",role:"switch","aria-checked":r,disabled:l,onClick:()=>!l&&t(!r),className:Di({enabled:r,size:a}),...c,children:e.jsx("span",{className:Wi({enabled:r,size:a})})}),n&&e.jsx("span",{className:Pi({size:a}),children:r?"ON":"OFF"})]})]}));Fo.displayName="Toggle";const Vi=b("flex items-center justify-between w-full gap-2 min-h-[20px]"),Hi=b("text-xs font-normal font-sans leading-4 whitespace-nowrap",{variants:{status:{success:"text-[var(--color-gray-800)]",warning:"text-[var(--color-gray-800)]",error:"text-[var(--color-gray-800)]",info:"text-[var(--color-gray-800)]",neutral:"text-[var(--color-gray-800)]",loading:"text-[var(--color-gray-800)]"}},defaultVariants:{status:"neutral"}}),_i={success:"var(--color-green-1000)",warning:"var(--color-orange-800)",error:"var(--color-red-1000)",info:"var(--color-blue-800)",neutral:"var(--color-gray-600)",loading:"var(--color-blue-800)"},Bo=j.forwardRef(({className:r,status:t="neutral",message:o,...a},n)=>{const s=t==="loading"?"info":t,l=_i[t],c=()=>t==="loading"?e.jsx(i.Loader,{size:16,color:l,className:"animate-spin"}):t==="success"?e.jsx(i.CheckCircle,{size:16,color:l}):t==="warning"?e.jsx(i.TriangleAlert,{size:16,color:l}):t==="error"?e.jsx(i.AlertCircle,{size:16,color:l}):t==="info"?e.jsx(i.Info,{size:16,color:l}):null;return e.jsxs("div",{ref:n,className:y(Vi(),r),...a,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx($r,{variant:s,size:"small"}),e.jsx("span",{className:Hi({status:t}),children:o})]}),e.jsx("div",{className:"w-4 h-4 flex items-center justify-center",children:c()})]})});Bo.displayName="StatusMessage";const Oi=b("inline-flex items-center px-[10px] py-[3px] rounded-full text-[11px] font-semibold whitespace-nowrap shrink-0",{variants:{status:{draft:"bg-[var(--color-gray-200)] text-[var(--color-gray-800)]",provisional:"bg-[#fef9c3] text-[#854d0e]",final:"bg-[var(--color-green-200)] text-[var(--color-green-1000)]"}},defaultVariants:{status:"draft"}}),Gi={draft:"Draft",provisional:"Provisional",final:"Final"};function Ui({title:r,subtitle:t,period:o,asAtDate:a,generatedAt:n,status:s,renderMode:l="web",className:c}){const d=l==="pdf",x=l==="excel",p=l==="web"&&s,f=l==="web"&&n,u=d?"12px 16px":x?"8px":"20px 24px",g=d?"18px":"20px";return e.jsxs("div",{className:y("flex items-start justify-between gap-4 bg-[var(--color-white)] border-b border-[var(--color-gray-200)]",c),style:{padding:u},children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("h1",{className:"m-0 font-bold leading-[1.25] text-[var(--color-gray-1000)]",style:{fontSize:g},children:r}),t&&e.jsx("p",{className:"m-0 text-[13px] text-[var(--color-gray-800)]",children:t}),e.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[o&&e.jsx("span",{className:"text-[12px] text-[var(--color-gray-600)]",children:o}),a&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-[12px] text-[var(--color-gray-200)]",children:"·"}),e.jsxs("span",{className:"text-[12px] text-[var(--color-gray-600)]",children:["As at ",a]})]}),o&&f&&e.jsx("span",{className:"text-[12px] text-[var(--color-gray-200)]",children:"·"}),f&&e.jsxs("span",{className:"text-[12px] text-[var(--color-gray-600)]",children:["Generated ",n]})]})]}),p&&e.jsx("span",{className:Oi({status:s}),children:Gi[s]??s})]})}const Yi={2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4"},er={up:"var(--color-green-1000)",down:"var(--color-red-1000)",flat:"var(--color-gray-800)",warning:"var(--color-amber-1000)"},rr="Geist Mono, ui-monospace, monospace";function Ki({items:r,columns:t=4,renderMode:o="web",className:a}){if(o==="pdf"||o==="excel")return e.jsx("table",{className:y(a),style:{width:"100%",borderCollapse:"collapse",border:o==="pdf"?"1px solid var(--color-gray-200)":void 0},children:e.jsx("tbody",{children:e.jsx("tr",{children:r.map((s,l)=>e.jsxs("td",{style:{padding:"8px 12px",verticalAlign:"top",borderRight:l<r.length-1?"1px solid var(--color-gray-200)":void 0},children:[e.jsx("div",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-gray-600)"},children:s.label}),e.jsx("div",{style:{fontSize:16,fontWeight:300,fontFamily:rr,fontVariantNumeric:"tabular-nums",letterSpacing:"-0.02em",color:"var(--color-gray-1000)",lineHeight:1.3,marginTop:2},children:s.value}),s.delta&&e.jsx("div",{style:{fontSize:11,fontWeight:600,fontFamily:rr,color:er[s.deltaDir??"flat"]??er.flat,marginTop:1},children:s.delta})]},l))})})});const n=Yi[t]??"grid-cols-4";return e.jsx("div",{className:y(`grid ${n} gap-3`,a),children:r.map((s,l)=>e.jsxs("div",{className:"bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-xl flex flex-col gap-1.5",style:{padding:"18px 20px"},children:[e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.08em] text-[var(--color-gray-600)]",children:s.label}),e.jsx("div",{className:"text-[22px] font-light leading-none text-[var(--color-gray-1000)]",style:{fontFamily:rr,fontVariantNumeric:"tabular-nums",letterSpacing:"-0.02em"},children:s.value}),s.delta&&e.jsx("div",{className:"text-[11px] font-semibold",style:{fontFamily:rr,color:er[s.deltaDir??"flat"]??er.flat},children:s.delta})]},l))})}const at={up:"var(--color-green-1000)",down:"var(--color-red-1000)",flat:"var(--color-gray-800)",warning:"var(--color-amber-1000)"};function Zi({label:r,value:t,delta:o,deltaDir:a="flat",subtext:n,renderMode:s="web",className:l}){const c=s==="pdf",d=c?"20px":"28px",x=c?"12px 16px":"18px 20px";return e.jsxs("div",{className:y("bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-xl flex flex-col gap-1.5",l),style:{padding:x},children:[e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.08em] text-[var(--color-gray-600)]",children:r}),e.jsx("div",{className:"font-light leading-none text-[var(--color-gray-1000)]",style:{fontSize:d,fontFamily:"Geist Mono, ui-monospace, monospace",fontVariantNumeric:"tabular-nums",letterSpacing:"-0.02em"},children:t}),o&&e.jsx("div",{className:"text-[12px] font-semibold",style:{fontFamily:"Geist Mono, ui-monospace, monospace",color:at[a]??at.flat},children:o}),n&&e.jsx("div",{className:"text-[11px] text-[var(--color-gray-600)]",children:n})]})}function Xi({title:r,body:t,actions:o,renderMode:a="web",className:n}){const s=a==="web"&&o&&o.length>0,l=a==="pdf"?"16px 20px":"20px 24px";return e.jsxs("div",{className:y("bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-xl flex flex-col gap-3",n),style:{padding:l},children:[r&&e.jsx("h3",{className:"m-0 text-[15px] font-semibold text-[var(--color-gray-1000)]",children:r}),t&&e.jsx("p",{className:"m-0 text-[13px] leading-[1.6] text-[var(--color-gray-800)]",children:t}),s&&e.jsx("div",{className:"flex gap-2 flex-wrap",children:o.map((c,d)=>e.jsx("button",{onClick:c.onClick,className:"px-4 py-1.5 border border-[var(--color-gray-200)] rounded-lg bg-[var(--color-gray-50)] text-[var(--color-gray-1000)] text-[13px] font-medium cursor-pointer hover:bg-[var(--color-gray-100)] transition-colors duration-150",children:c.label},d))})]})}const qi=b("flex gap-3 rounded-[10px] border items-start",{variants:{variant:{info:"bg-[var(--color-blue-200)] border-[var(--color-blue-400)]",success:"bg-[#f0fdf4] border-[#bbf7d0]",warning:"bg-[#fefce8] border-[#fde68a]",error:"bg-[var(--color-red-200)] border-[#fecaca]"}},defaultVariants:{variant:"info"}}),Ji={info:"ℹ",success:"✓",warning:"⚠",error:"✕"},nt={info:"#1e40af",success:"#166534",warning:"#854d0e",error:"#991b1b"},st={info:"#3b82f6",success:"#16a34a",warning:"#d97706",error:"#dc2626"},Qi={info:"var(--color-blue-400)",success:"#bbf7d0",warning:"#fde68a",error:"#fecaca"};function ec({variant:r="info",title:t,message:o,action:a,renderMode:n="web",className:s}){const l=n==="web"&&a,c=n==="pdf"?"10px 14px":"12px 16px";return e.jsxs("div",{className:y(qi({variant:r}),s),style:{padding:c},children:[e.jsx("span",{className:"text-[14px] shrink-0 mt-[1px]",style:{color:st[r]},children:Ji[r]}),e.jsxs("div",{className:"flex-1 flex flex-col gap-[2px]",children:[e.jsx("span",{className:"text-[13px] font-semibold",style:{color:nt[r]},children:t}),o&&e.jsx("span",{className:"text-[12px]",style:{color:st[r]},children:o})]}),l&&e.jsx("button",{onClick:a.onClick,className:"text-[12px] font-medium cursor-pointer bg-transparent shrink-0",style:{padding:"4px 12px",border:`1px solid ${Qi[r]}`,borderRadius:6,color:nt[r]},children:a.label})]})}function rc({title:r,description:t,action:o,className:a}){return e.jsxs("div",{className:y("flex flex-col items-center justify-center gap-3 text-center",a),style:{padding:"48px 24px"},children:[e.jsx("div",{className:"w-10 h-10 rounded-full bg-[var(--color-gray-50)] border border-[var(--color-gray-200)] flex items-center justify-center text-[18px] text-[var(--color-gray-600)]",children:"○"}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("h3",{className:"m-0 text-[15px] font-semibold text-[var(--color-gray-1000)]",children:r}),t&&e.jsx("p",{className:"m-0 text-[13px] text-[var(--color-gray-800)]",style:{maxWidth:360},children:t})]}),o&&e.jsx("button",{onClick:o.onClick,className:"px-5 py-2 border-none rounded-lg bg-[var(--color-blue-1000)] text-[var(--color-white)] text-[13px] font-semibold cursor-pointer hover:opacity-90 transition-opacity duration-150",children:o.label})]})}const tr={up:"var(--color-green-1000)",down:"var(--color-red-1000)",flat:"var(--color-gray-800)"},lt="Geist Mono, ui-monospace, monospace";function tc({items:r,renderMode:t="web",className:o}){return t==="pdf"||t==="excel"?e.jsx("div",{className:y("flex items-center gap-4 flex-wrap",o),style:{padding:"6px 0",fontSize:12,color:"var(--color-gray-800)"},children:r.map((a,n)=>e.jsxs("span",{style:{whiteSpace:"nowrap"},children:[e.jsxs("span",{style:{fontWeight:600,color:"var(--color-gray-600)",marginRight:4},children:[a.label,":"]}),e.jsx("span",{style:{fontFamily:lt,fontVariantNumeric:"tabular-nums",fontWeight:600,color:tr[a.direction??"flat"]??tr.flat},children:a.value}),n<r.length-1&&e.jsx("span",{style:{margin:"0 4px",color:"var(--color-gray-400)"},children:"|"})]},n))}):e.jsx("div",{className:y("flex items-stretch bg-[var(--color-gray-50)] border border-[var(--color-gray-200)] rounded-lg overflow-hidden",o),children:r.map((a,n)=>e.jsxs("div",{className:"flex-1 flex flex-col gap-1",style:{padding:"12px 16px",borderLeft:n>0?"1px solid var(--color-gray-200)":void 0},children:[e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-[0.08em] text-[var(--color-gray-600)]",children:a.label}),e.jsx("span",{className:"text-[16px] font-semibold",style:{fontFamily:lt,fontVariantNumeric:"tabular-nums",color:tr[a.direction??"flat"]??tr.flat},children:a.value})]},n))})}const oc={default:"bg-[var(--color-white)] border border-[var(--color-gray-200)]",highlighted:"bg-[var(--color-gray-50)] border border-[var(--color-gray-200)]",audit:"bg-[#fffbeb] border border-[#fde68a]"};function ac({content:r,author:t,authorRole:o,date:a,sectionLabel:n,expandable:s=!1,defaultExpanded:l=!0,variant:c="default",renderMode:d="web",className:x}){const[p,f]=j.useState(l),g=d==="web"&&s&&r.length>200;return e.jsxs("div",{className:y("rounded-xl flex flex-col gap-3",oc[c],x),style:{padding:d==="pdf"?"12px 16px":"16px 20px"},children:[n&&e.jsx("p",{className:"m-0 text-[10px] font-bold uppercase tracking-[0.08em] text-[var(--color-gray-600)]",children:n}),e.jsx("p",{className:y("m-0 text-[13px] leading-[1.65] text-[var(--color-gray-800)]",!p&&g&&"line-clamp-3"),children:r}),g&&e.jsx("button",{onClick:()=>f(m=>!m),className:"self-start text-[12px] font-medium text-[var(--color-blue-800)] hover:text-[var(--color-blue-1000)] cursor-pointer transition-colors duration-150 bg-transparent border-none p-0",children:p?"Show less":"Read more"}),(t||a)&&e.jsxs("div",{className:"flex items-center gap-2 pt-1 border-t border-[var(--color-gray-200)] mt-1 flex-wrap",children:[t&&e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"w-5 h-5 rounded-full bg-[var(--color-blue-1000)] flex items-center justify-center text-[9px] font-bold text-[var(--color-white)] shrink-0","aria-hidden":"true",children:t.split(" ").map(m=>m[0]).join("").slice(0,2).toUpperCase()}),e.jsx("span",{className:"text-[12px] font-medium text-[var(--color-gray-1000)]",children:t}),o&&e.jsxs("span",{className:"text-[12px] text-[var(--color-gray-600)]",children:["· ",o]})]}),a&&e.jsx("span",{className:"text-[12px] text-[var(--color-gray-600)] ml-auto",children:a})]})]})}function nc({label:r,description:t,sectionNumber:o,children:a,noBorder:n=!1,renderMode:s="web",className:l}){const c=s==="pdf",x=c||s==="excel";return e.jsxs("section",{className:y("flex flex-col",x?"gap-2":"gap-4",!n&&(x?"border-t border-[var(--color-gray-200)] pt-4":"border-t border-[var(--color-gray-200)] pt-6"),l),children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("h2",{className:"m-0 uppercase flex items-center gap-2",style:{fontSize:c?11:13,fontWeight:700,color:"var(--color-gray-1000)",letterSpacing:"0.08em",borderLeft:c?"3px solid var(--color-blue-800)":void 0,paddingLeft:c?8:void 0},children:[o&&e.jsx("span",{className:"tabular-nums",children:o}),r]}),t&&e.jsx("p",{className:"m-0 text-[13px] text-[var(--color-gray-800)]",children:t})]}),a&&e.jsx("div",{className:y("flex flex-col",x?"gap-2":"gap-4"),children:a})]})}const sc={month:"Monthly",quarter:"Quarterly",year:"Annual",custom:"Custom"},it="inline-flex items-center justify-center w-7 h-7 rounded-md border border-[var(--color-gray-200)] bg-[var(--color-white)] text-[var(--color-gray-800)] hover:bg-[var(--color-gray-100)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors duration-150 cursor-pointer";function lc({current:r,available:t=[],format:o,availableFormats:a=[],onPeriodChange:n,onFormatChange:s,hasPrev:l=!0,hasNext:c=!1,compact:d=!1,className:x}){const p=t.findIndex(g=>g.id===r.id),f=()=>{if(!l)return;const g=p>0?t[p-1]:null;g&&(n==null||n(g.id))},u=()=>{if(!c)return;const g=p<t.length-1?t[p+1]:null;g&&(n==null||n(g.id))};return e.jsxs("div",{className:y("flex items-center gap-2 flex-wrap",d?"gap-1":"gap-2",x),children:[e.jsx("button",{className:it,disabled:!l,onClick:f,"aria-label":"Previous period",title:"Previous period",children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M7.5 2L3.5 6L7.5 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),t.length>1?e.jsx("select",{className:y("border border-[var(--color-gray-200)] rounded-md bg-[var(--color-white)] text-[var(--color-gray-1000)] font-medium cursor-pointer hover:bg-[var(--color-gray-100)] transition-colors duration-150 appearance-none text-center",d?"text-[12px] px-2 py-1":"text-[13px] px-3 py-1.5"),value:r.id,onChange:g=>n==null?void 0:n(g.target.value),"aria-label":"Select period",children:t.map(g=>e.jsx("option",{value:g.id,children:g.label},g.id))}):e.jsx("span",{className:y("font-semibold text-[var(--color-gray-1000)] min-w-[80px] text-center",d?"text-[12px]":"text-[13px]"),children:r.label}),e.jsx("button",{className:it,disabled:!c,onClick:u,"aria-label":"Next period",title:"Next period",children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4.5 2L8.5 6L4.5 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),a.length>1&&o&&e.jsx("div",{className:"flex items-center border border-[var(--color-gray-200)] rounded-md overflow-hidden bg-[var(--color-white)]",role:"group","aria-label":"Period format",children:a.map(g=>e.jsx("button",{onClick:()=>s==null?void 0:s(g),className:y("cursor-pointer transition-colors duration-150",d?"px-2 py-1 text-[11px]":"px-3 py-1.5 text-[12px]",g===o?"bg-[var(--color-gray-1000)] text-[var(--color-white)] font-semibold":"text-[var(--color-gray-800)] hover:bg-[var(--color-gray-100)]"),"aria-pressed":g===o,children:sc[g]},g))})]})}const ic=b("flex items-center",{variants:{variant:{default:"border border-[var(--color-gray-200)] rounded-md overflow-hidden bg-[var(--color-white)]",pills:"gap-1"}},defaultVariants:{variant:"default"}}),cc=b("cursor-pointer transition-colors duration-150 font-medium whitespace-nowrap disabled:opacity-40 disabled:cursor-not-allowed",{variants:{variant:{default:"px-3 py-1.5 text-[12px]",pills:"px-3 py-1 text-[12px] rounded-full border"},active:{true:"",false:""}},compoundVariants:[{variant:"default",active:!0,className:"bg-[var(--color-gray-1000)] text-[var(--color-white)]"},{variant:"default",active:!1,className:"text-[var(--color-gray-800)] hover:bg-[var(--color-gray-100)]"},{variant:"pills",active:!0,className:"bg-[var(--color-blue-1000)] border-[var(--color-blue-1000)] text-[var(--color-white)]"},{variant:"pills",active:!1,className:"bg-[var(--color-white)] border-[var(--color-gray-200)] text-[var(--color-gray-800)] hover:bg-[var(--color-gray-100)]"}],defaultVariants:{variant:"default",active:!1}});function dc({modes:r,activeMode:t,onModeChange:o,variant:a="default",compact:n=!1,className:s}){return e.jsx("div",{className:y(ic({variant:a}),s),role:"group","aria-label":"Comparison mode",children:r.map(l=>{const c=l.id===t,d=n&&l.shortLabel?l.shortLabel:l.label;return e.jsx("button",{onClick:()=>!l.disabled&&(o==null?void 0:o(l.id)),disabled:l.disabled,className:cc({variant:a,active:c}),"aria-pressed":c,children:d},l.id)})})}const pc={pdf:{label:"PDF",icon:"⬇"},excel:{label:"Excel",icon:"⬇"},csv:{label:"CSV",icon:"⬇"},print:{label:"Print",icon:"⎙"}};function xc({actions:r,label:t,size:o="md",className:a}){const n=y("inline-flex items-center gap-1.5 border border-[var(--color-gray-200)] rounded-md bg-[var(--color-white)] text-[var(--color-gray-800)] font-medium cursor-pointer hover:bg-[var(--color-gray-100)] active:bg-[var(--color-gray-200)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors duration-150",o==="sm"?"px-2 py-1 text-[11px]":"px-3 py-1.5 text-[12px]");return e.jsxs("div",{className:y("flex items-center gap-2 flex-wrap",a),children:[t&&e.jsx("span",{className:"text-[12px] text-[var(--color-gray-600)] font-medium mr-1",children:t}),r.map(s=>{const l=pc[s.format],c=s.label??l.label;return e.jsxs("button",{onClick:s.onClick,disabled:s.disabled,className:n,"aria-label":`Export as ${c}`,children:[e.jsx("span",{"aria-hidden":"true",className:"text-[var(--color-gray-600)]",children:l.icon}),c]},s.format)})]})}const fc={draft:{label:"Draft",bg:"var(--color-gray-200)",color:"var(--color-gray-800)"},reviewed:{label:"Reviewed",bg:"#fef9c3",color:"#854d0e"},"signed-off":{label:"Signed Off",bg:"var(--color-green-200)",color:"var(--color-green-1000)"},filed:{label:"Filed",bg:"var(--color-blue-200)",color:"var(--color-blue-1000)"}};function uc({firmName:r,preparedBy:t,reviewedBy:o,date:a,reference:n,status:s="draft",renderMode:l="web",className:c}){const d=fc[s],x=l==="web";return e.jsxs("div",{className:y("flex items-start justify-between gap-6 border-t border-[var(--color-gray-200)] pt-4 mt-2",c),children:[e.jsxs("div",{className:"flex flex-col gap-1.5",children:[r&&e.jsx("p",{className:"m-0 text-[13px] font-semibold text-[var(--color-gray-1000)]",children:r}),n&&e.jsx("p",{className:"m-0 text-[11px] text-[var(--color-gray-600)] uppercase tracking-[0.06em]",children:n}),e.jsxs("div",{className:"flex items-center gap-4 mt-0.5 flex-wrap",children:[t&&e.jsxs("span",{className:"text-[12px] text-[var(--color-gray-800)]",children:[e.jsx("span",{className:"text-[var(--color-gray-600)] mr-1",children:"Prepared by"}),t]}),o&&e.jsxs("span",{className:"text-[12px] text-[var(--color-gray-800)]",children:[e.jsx("span",{className:"text-[var(--color-gray-600)] mr-1",children:"Reviewed by"}),o]}),a&&e.jsx("span",{className:"text-[12px] text-[var(--color-gray-600)]",children:a})]})]}),x&&e.jsx("span",{className:"inline-flex items-center px-[10px] py-[3px] rounded-full text-[11px] font-semibold whitespace-nowrap shrink-0",style:{background:d.bg,color:d.color},children:d.label})]})}function gc({footnotes:r,className:t}){return r.length===0?null:e.jsxs("div",{className:y("border-t border-[var(--color-gray-200)] pt-4 flex flex-col gap-1.5",t),"aria-label":"Footnotes",children:[e.jsx("p",{className:"m-0 text-[10px] font-bold uppercase tracking-[0.08em] text-[var(--color-gray-600)] mb-1",children:"Notes"}),r.map(o=>e.jsxs("div",{id:`fn-${o.number}`,className:"flex items-start gap-2",children:[e.jsxs("span",{className:"text-[11px] font-semibold text-[var(--color-blue-800)] shrink-0 w-5 text-right tabular-nums",children:["[",o.number,"]"]}),e.jsx("p",{className:"m-0 text-[12px] text-[var(--color-gray-800)] leading-[1.5]",children:o.text})]},o.number))]})}const mc=b("flex items-center justify-between w-full gap-2 min-h-[20px]"),hc=b("flex items-center gap-2"),bc=b("text-[12px] font-normal font-sans leading-[16px]",{variants:{status:{running:"text-[var(--color-gray-800)]",completed:"text-[var(--color-gray-800)]",stopped:"text-[var(--color-blue-800)]"}},defaultVariants:{status:"running"}}),ct=b("w-4 h-4 flex items-center justify-center shrink-0"),vc={running:"var(--color-gray-800)",completed:"var(--color-gray-800)",stopped:"var(--color-blue-800)"},yc={running:"var(--color-gray-800)",completed:"var(--color-green-1000)",stopped:"var(--color-blue-800)"},Io=j.forwardRef(({className:r,status:t="running",message:o,...a},n)=>{const s=vc[t],l=yc[t],c=()=>t==="completed"?e.jsx(i.CheckCircle,{size:16,color:l}):t==="stopped"?e.jsx(i.Hand,{size:16,color:l}):e.jsx(i.Pause,{size:16,color:l});return e.jsxs("div",{ref:n,className:y(mc(),r),...a,children:[e.jsxs("div",{className:hc(),children:[e.jsx("div",{className:ct(),children:e.jsx(i.Hexagon,{size:16,color:s})}),e.jsx("span",{className:bc({status:t}),children:o})]}),e.jsx("div",{className:ct(),children:c()})]})});Io.displayName="AutopilotAction";const jc={default:"text-[var(--color-gray-600)] hover:bg-[var(--color-gray-200)]",accent:"text-[var(--color-blue-800)] hover:opacity-80",bordered:"border border-[rgba(0,13,77,0.45)] rounded-lg px-2 py-1 text-[rgba(0,9,51,0.65)] hover:bg-[rgba(0,13,77,0.05)]",tertiary:"border border-[var(--color-blue-800)] rounded-lg px-2 py-1 text-[var(--color-blue-800)] hover:bg-[var(--color-blue-50)]"};function Do({text:r,label:t,variant:o="default",className:a=""}){const[n,s]=j.useState(!1),l=async d=>{d.stopPropagation(),await navigator.clipboard.writeText(r),s(!0),setTimeout(()=>s(!1),2e3)},c=o==="accent"||o==="tertiary"?"text-[var(--color-blue-800)]":"text-[var(--color-gray-500)]";return e.jsx("button",{onClick:l,className:`flex items-center gap-1.5 px-2 py-1 rounded text-xs ${jc[o]} transition-colors ${a}`,children:n?e.jsxs(e.Fragment,{children:[t?"Copied":null,e.jsx(i.Check,{size:13,className:c})]}):e.jsxs(e.Fragment,{children:[t??null,e.jsx(i.Clipboard,{size:13})]})})}function wc({title:r,badge:t,copyText:o,open:a,onOpenChange:n,defaultOpen:s=!1,children:l,className:c,variant:d="default"}){const[x,p]=j.useState(s),f=a!==void 0,u=f?a:x,g=d==="compact",m=()=>{const h=!u;f||p(h),n==null||n(h)};return e.jsxs("div",{className:`rounded-lg border border-[var(--color-gray-200)] bg-white overflow-hidden transition-colors hover:border-[var(--color-blue-800)] ${c??""}`,children:[e.jsxs("button",{type:"button",onClick:m,className:`w-full flex items-center justify-between transition-colors text-left ${g?"px-3 py-2":"px-2 py-1"}`,children:[e.jsxs("div",{className:`flex items-center ${g?"gap-[7px]":"gap-3"}`,children:[e.jsx("span",{className:"text-[var(--color-blue-1000)] flex-shrink-0 transition-transform duration-200",style:{transform:u?"rotate(90deg)":"rotate(0deg)"},children:e.jsx(i.ChevronRight,{size:g?20:16})}),e.jsx("span",{className:`text-[var(--color-blue-1000)] ${g?"text-xs leading-4 font-normal":"text-sm font-semibold"}`,children:r}),t!==void 0&&(g?e.jsx("span",{className:"text-[10px] leading-none rounded bg-[var(--color-blue-1000)] text-white px-1.5 py-0.5",children:t}):e.jsxs("span",{className:"inline-flex items-center gap-1 bg-[var(--color-gray-100)] text-[var(--color-gray-600)] rounded px-[2px] py-[2px] text-[10px] leading-none",children:[e.jsx(i.Settings,{size:14,className:"text-[var(--color-gray-600)]"}),t]}))]}),o&&e.jsx("div",{className:"flex-shrink-0",onClick:h=>h.stopPropagation(),children:e.jsx(Do,{text:o,label:"Copy",variant:g?"accent":"default"})})]}),e.jsx("div",{className:"grid transition-[grid-template-rows] duration-200 ease-in-out motion-reduce:transition-none",style:{gridTemplateRows:u?"1fr":"0fr",contain:"layout style",willChange:"grid-template-rows"},children:e.jsx("div",{className:"overflow-hidden min-h-0",children:e.jsx("div",{className:`${u?"border-t border-[var(--color-gray-200)]":""} p-2`,children:l})})})]})}const Cc=b("z-50 rounded-[4px] px-3 py-3 shadow-[0px_8px_8px_-4px_rgba(0,0,0,0.04),0px_20px_24px_-4px_rgba(0,0,0,0.08)] max-w-[var(--radix-tooltip-content-available-width)] origin-[var(--radix-tooltip-content-transform-origin)]",{variants:{variant:{default:"bg-[var(--color-blue-1000)] text-[var(--color-gray-50)]",light:"bg-[var(--color-gray-50)] text-[var(--color-gray-1000)]"}},defaultVariants:{variant:"default"}}),Sc=b("",{variants:{variant:{default:"fill-[var(--color-blue-1000)]",light:"fill-[var(--color-gray-50)]"}},defaultVariants:{variant:"default"}}),kc=({delayDuration:r=0,...t})=>e.jsx(we.Provider,{delayDuration:r,...t}),Nc=we.Root,zc=we.Trigger,Wo=Fe.forwardRef(({className:r,sideOffset:t=4,children:o,variant:a,...n},s)=>e.jsx(we.Portal,{children:e.jsx(we.Content,{ref:s,sideOffset:t,asChild:!0,className:y(Cc({variant:a}),r),...n,children:e.jsxs(q.motion.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.1,ease:"easeOut"},children:[e.jsx(Ye,{variant:"x-small",color:"inherit",className:"font-normal relative z-10",children:o}),e.jsx(we.Arrow,{className:Sc({variant:a})})]})})}));Wo.displayName=we.Content.displayName;const Tc=b("w-full h-[48px] box-border flex items-center justify-between px-[16px] py-[12px] bg-[var(--color-white)] border-b border-[var(--color-gray-200)]"),Lc=b("flex items-center gap-[12px] h-[24px]"),$c=b("flex items-center gap-[12px] h-[24px] rounded-[8px]"),dt=b("flex items-center justify-center size-[16px] overflow-hidden text-[var(--color-gray-800)] hover:text-[var(--color-blue-800)] transition-colors bg-transparent border-none cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] rounded-sm disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:text-[var(--color-gray-800)]",{variants:{disabled:{true:"opacity-50 cursor-not-allowed hover:text-[var(--color-gray-800)]"}},defaultVariants:{disabled:!1}}),Mc=b("flex items-center gap-[8px]"),Ac=b("flex items-center"),Po=j.forwardRef(({className:r,breadcrumbs:t,tags:o=[],collaborators:a=[],onAddTag:n,onAddCollaborator:s,tagsOverflowCount:l=0,addTagDisabled:c=!1,addCollaboratorDisabled:d=!1,...x},p)=>e.jsxs("div",{ref:p,className:y(Tc(),r),...x,children:[e.jsx(lo,{items:t,size:"medium"}),e.jsx("div",{className:Lc(),children:e.jsxs("div",{className:$c(),children:[(o.length>0||l>0)&&e.jsxs("div",{className:Mc(),children:[o.map(f=>e.jsx(Ie,{variant:"default",className:"bg-[var(--color-gray-100)] border border-[var(--color-gray-200)] text-[var(--color-gray-800)] px-[8px] py-[2px] text-[10px] h-[20px]",children:f.label},f.id)),l>0&&e.jsxs(Ie,{variant:"default",className:"bg-[var(--color-gray-100)] border border-[var(--color-gray-200)] text-[var(--color-gray-800)] px-[8px] py-[2px] text-[10px] h-[20px]",children:["+",l]})]}),a.length>0&&e.jsx("div",{className:Ac(),children:e.jsx("div",{className:"flex items-center flex-row-reverse",children:a.map((f,u)=>e.jsx("div",{className:"relative shrink-0 border-[1.5px] border-white rounded-full",style:{zIndex:a.length-u,marginRight:u<a.length-1?-4:0},children:e.jsx(pr,{initials:f.name,src:f.src,alt:f.name,className:"size-[24px] text-[10px]"})},f.id))})}),e.jsx("button",{type:"button",onClick:n,className:dt({disabled:c}),"aria-label":"Add tag",disabled:c,children:e.jsx(i.TagPlus,{size:16})}),e.jsx("button",{type:"button",onClick:s,className:dt({disabled:d}),"aria-label":"Add collaborator",disabled:d,children:e.jsx(i.UserPlus,{size:16})})]})})]}));Po.displayName="ConversationHeader";const Rc=b("fixed inset-0 z-50 bg-[rgba(0,6,38,0.5)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),Fc=b("fixed left-[50%] top-[50%] z-50 translate-x-[-50%] translate-y-[-50%] bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-[12px] shadow-lg p-4 flex flex-col gap-2 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 duration-200",{variants:{size:{sm:"w-[95vw] sm:w-[300px] max-w-[calc(100vw-2rem)]",md:"w-[95vw] sm:w-[400px] max-w-[calc(100vw-2rem)]",lg:"w-[95vw] sm:w-[500px] max-w-[calc(100vw-2rem)]",xl:"w-[95vw] sm:w-[600px] max-w-[calc(100vw-2rem)]",full:"w-[100vw] h-[100vh] sm:w-[calc(100vw-2rem)] sm:h-[calc(100vh-2rem)] rounded-none sm:rounded-[12px]"}},defaultVariants:{size:"md"}}),Bc=b("absolute right-4 top-4 flex-shrink-0 w-4 h-4 text-[var(--color-blue-1000)] cursor-pointer bg-transparent border-none p-0 hover:opacity-70 transition-opacity focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2 rounded-sm"),Ic=b("!font-[Geist,system-ui,-apple-system,sans-serif] font-medium text-[1rem] leading-[1.5rem] text-[var(--color-blue-1000)] w-full"),Dc=b("font-[Geist,system-ui,-apple-system,sans-serif] font-normal text-[0.875rem] leading-[1.25rem] text-[var(--color-gray-800)] w-full"),Wc=b("flex flex-col gap-4 w-full",{variants:{size:{sm:"max-h-[60vh] overflow-y-auto",md:"max-h-[70vh] overflow-y-auto",lg:"max-h-[75vh] overflow-y-auto",xl:"max-h-[80vh] overflow-y-auto",full:"flex-1 overflow-y-auto"},contentAlign:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"}},defaultVariants:{size:"md",contentAlign:"start"}}),Pc=b("flex gap-2 items-start w-full"),Eo=({open:r,onOpenChange:t,title:o,description:a,showCloseButton:n=!0,closeIcon:s,children:l,primaryAction:c,secondaryAction:d,closeOnClickOutside:x=!0,closeOnEsc:p=!0,onClose:f,className:u,overlayClassName:g,contentClassName:m,footerClassName:h,size:v="md",contentAlign:w="start"})=>{const k=j.useRef(null),L=j.useRef(null),z=j.useCallback(S=>{t(S),S||f==null||f()},[t,f]),C=j.useCallback(async()=>{c!=null&&c.onClick&&await c.onClick()},[c]),T=j.useCallback(async()=>{d!=null&&d.onClick&&await d.onClick()},[d]),I=j.useCallback(S=>{p||S.preventDefault()},[p]),$=j.useCallback(S=>{x||S.preventDefault()},[x]),F=c||d;return e.jsx(de.Root,{open:r,onOpenChange:z,children:e.jsxs(de.Portal,{children:[e.jsx(de.Overlay,{className:y(Rc(),g)}),e.jsxs(de.Content,{className:y(Fc({size:v}),u),onEscapeKeyDown:I,onPointerDownOutside:$,children:[o?e.jsx(de.Title,{className:Ic(),children:o}):e.jsx(_r.Root,{children:e.jsx(de.Title,{children:"Modal dialog"})}),a?e.jsx(de.Description,{className:Dc(),children:a}):e.jsx(_r.Root,{children:e.jsx(de.Description,{children:"Modal content"})}),n&&e.jsx(de.Close,{asChild:!0,children:e.jsx("button",{className:Bc(),"aria-label":"Close modal",children:s||e.jsx(i.X,{size:16,color:"currentColor"})})}),l&&e.jsx("div",{className:y(Wc({size:v,contentAlign:w}),m),children:l}),F&&e.jsxs("div",{className:y(Pc(),h),children:[d&&e.jsx(Be,{ref:L,variant:d.variant||"secondary",size:"sm",onClick:T,disabled:d.disabled||d.loading,leftIcon:d.icon,className:"flex-1",children:d.label}),c&&e.jsx(Be,{ref:k,variant:c.variant||"default",size:"sm",onClick:C,disabled:c.disabled||c.loading,leftIcon:c.icon,className:"flex-1",children:c.label})]})]})]})})};Eo.displayName="Modal";const Ec=r=>e.jsx(q.motion.svg,{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",animate:{rotate:r?90:0},transition:{duration:.15,ease:"easeOut"},"aria-hidden":"true",style:{display:"inline-block",flexShrink:0},children:e.jsx("path",{d:"M3 2L7 5L3 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function Vc({cells:r,drillRows:t,colCount:o,defaultExpanded:a=!1,onToggle:n,rowClassName:s,drillRowClassName:l}){const[c,d]=j.useState(a),x=()=>{const p=!c;d(p),n==null||n(p)};return e.jsxs(e.Fragment,{children:[e.jsx("tr",{className:y("cursor-pointer select-none transition-colors duration-150","hover:bg-[var(--color-gray-50)] active:bg-[var(--color-gray-100)]",c&&"bg-[var(--color-gray-50)]",s),onClick:x,tabIndex:0,role:"button","aria-expanded":c,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),x())},children:r.map((p,f)=>e.jsx("td",{style:{padding:"10px 16px",fontSize:13},children:f===0?e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[var(--color-gray-600)]",children:Ec(c)}),p]}):p},f))}),e.jsx(q.AnimatePresence,{initial:!1,children:c&&e.jsx("tr",{children:e.jsx("td",{colSpan:o,style:{padding:0,border:"none"},children:e.jsx(q.motion.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:[.4,0,.2,1]},style:{overflow:"hidden"},children:e.jsx("table",{style:{width:"100%",borderCollapse:"collapse"},children:e.jsx("tbody",{children:t.map(p=>e.jsx("tr",{className:y("border-b border-[var(--color-gray-100)] last:border-0",l),style:{background:"var(--color-gray-50)"},children:p.cells.map((f,u)=>e.jsx("td",{style:{padding:"8px 16px",paddingLeft:u===0?36:16,fontSize:12,color:"var(--color-gray-800)"},children:f},u))},p.key))})})})})},"drill-wrapper")})]})}const Hc={a4:"210mm",letter:"216mm","a4-landscape":"297mm","letter-landscape":"279mm"};function _c({printHeader:r,printFooter:t,paperSize:o="a4",renderMode:a="web",children:n,className:s}){const l=a==="pdf",c=a==="excel",d=o==="a4-landscape"||o==="letter-landscape",x=d?o==="a4-landscape"?"a4":"letter":o??"a4",p=l?"12mm":"20mm",f=`15mm ${p}`,u=`15mm ${p}`,g=l?"gap-6":c?"gap-2":"gap-6";return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:`
|
|
59
|
+
`}),e.jsx("path",{d:"M239.997 257.024C239.13 256.261 238.348 255.328 237.671 254.268C236.994 253.208 236.55 252.126 236.359 251.066C236.169 250.006 236.359 249.179 236.93 248.585C239.659 245.277 243.233 242.118 247.696 239.107C252.138 236.095 256.601 234.59 261.063 234.59C263.2 234.59 264.595 235.375 265.293 236.922C265.97 238.47 266.309 240.018 266.309 241.587C266.309 244.302 265.568 246.443 264.13 247.991C262.692 249.539 260.831 250.854 258.61 251.914C256.389 252.996 254.062 253.907 251.63 254.692C249.198 255.455 247.04 256.24 245.095 257.024L242.768 258.191C241.795 258.191 240.886 257.809 239.997 257.024Z",fill:l,style:{transformOrigin:"252px 247px",animation:`drawDot-${c.replace(/:/g,"")} 0.3s ease-out ${n+a*.9}s forwards`,opacity:0}}),e.jsx("path",{d:"M308.102 176.765C306.453 175.663 304.126 174.963 301.123 174.687C298.119 174.411 294.46 174.433 290.167 174.772C285.873 175.111 281.008 175.578 275.594 176.193C273.648 176.405 271.829 176.617 270.179 176.808L245.793 180.942C242.091 181.536 239.003 182.003 236.486 182.406C233.969 182.808 231.558 182.702 229.232 182.13L193.572 185.777C193.952 184.293 194.587 182.893 195.517 181.6C196.469 180.243 197.548 179.161 198.711 178.398C205.099 169.068 211.254 160.056 217.176 151.299C223.077 142.562 228.639 134.102 233.885 125.959L234.752 121.888L253.936 88.6814C253.936 87.3243 254.422 86.2641 255.395 85.4795C256.368 84.7162 257.045 83.4439 257.425 81.7051L260.344 73.2445C260.915 71.6966 261.465 70.0426 261.93 68.2826C262.417 66.5439 262.671 64.5082 262.671 62.1757C262.671 60.8186 262.459 59.1223 262.1 57.0866C261.698 55.051 261.084 53.1426 260.217 51.4038C259.35 49.6438 258.271 48.1595 257.024 46.8872C255.776 45.615 254.168 45 252.243 45C250.89 45 249.388 45.3817 247.738 46.1663C246.089 46.9509 244.439 47.9263 242.789 49.0925C241.139 50.2588 239.595 51.4674 238.136 52.7397C236.677 54.012 235.471 55.0298 234.498 55.7932L207.468 81.7263L206.008 82.5957L192.641 96.2939C192.429 96.2939 192.112 96.3999 191.626 96.5907C191.139 96.7816 190.801 96.8876 190.61 96.8876L122.04 164.763C120.094 164.763 117.493 163.894 114.193 162.134C110.915 160.374 107.023 159.505 102.56 159.505C101.587 159.505 100.53 159.802 99.3666 160.374C98.2033 160.947 97.3361 161.243 96.7439 161.243C95.9613 161.243 95.2422 160.798 94.5654 159.929C93.8885 159.059 92.7887 158.635 91.2236 158.635C86.5704 159.611 83.567 160.183 82.2134 160.374C80.8597 160.586 79.9714 160.671 79.5907 160.671C77.6448 159.886 76.397 159.696 75.8047 160.098C75.2125 160.501 74.7472 160.777 74.3453 160.968C73.7743 160.586 72.3149 160.247 69.9883 159.95C67.6617 159.674 65.5255 159.505 63.6008 159.505C60.682 159.505 56.6634 159.611 51.5449 159.802C46.4053 159.992 41.3715 160.629 36.4434 161.689C31.5153 162.749 27.2005 164.488 23.5203 166.926C19.8401 169.365 18 172.8 18 177.274C18 181.155 18.9518 184.462 20.8976 187.177C22.8435 189.912 25.3181 192.223 28.3215 194.174C31.3249 196.125 34.6667 197.524 38.3469 198.394C42.0271 199.263 45.6016 199.709 49.0915 199.709C51.2277 200.281 53.1524 200.09 54.9079 199.136C54.6964 199.136 55.7328 199.369 57.9536 199.857C60.1744 200.345 62.9451 200.79 66.2235 201.172C69.523 201.553 72.9494 201.999 76.545 202.465C80.1195 202.953 83.0806 203.207 85.4071 203.207L59.5399 232.915L54.0196 239.319C52.8563 240.294 52.4333 241.948 52.7294 244.281C53.0043 246.613 53.6389 247.779 54.6118 247.779C57.1287 247.779 60.3225 246.083 64.193 242.69C68.0636 239.297 72.1457 235.163 76.397 230.307C80.6694 225.451 84.9207 220.51 89.1931 215.464C93.4444 210.417 97.2303 206.24 100.53 202.932C100.911 202.932 101.312 202.974 101.693 203.08C102.074 203.165 102.455 203.228 102.856 203.228C115.822 203.228 127.878 202.847 139.045 202.062C150.192 201.299 160.407 200.896 169.692 200.896C166.985 205.37 164.066 209.929 160.978 214.594C157.89 219.259 154.591 224.115 151.101 229.162L127.285 264.701C125.932 266.842 124.726 268.984 123.648 271.104C122.569 273.225 122.061 275.366 122.061 277.508C122.061 279.056 122.59 280.371 123.648 281.431C124.705 282.491 125.826 283.042 126.989 283.042C129.316 283.042 131.346 282.364 133.081 281.007C134.815 279.65 136.613 278.038 138.453 276.193C140.293 274.349 142.197 272.44 144.121 270.511C146.046 268.56 148.373 267.012 151.08 265.846L182.467 237.007C182.658 236.414 183.102 235.777 183.758 235.12C184.434 234.442 185.259 233.615 186.232 232.639L197.273 223.33C200.192 220.807 202.941 217.881 205.543 214.573C208.166 211.286 209.477 209.145 209.477 208.169C209.477 206.027 208.229 204.967 205.712 204.967C205.331 204.967 204.697 205.116 203.83 205.413C202.962 205.709 201.947 206.346 200.784 207.3L156.896 248.076L146.152 255.646L149.049 251.575C149.832 250.218 151.186 248.034 153.132 245.023C155.056 242.012 157.192 238.725 159.519 235.12C161.846 231.537 164.32 227.805 166.943 223.903C169.566 220.022 172.019 216.418 174.367 213.11C176.693 209.823 178.724 207.045 180.458 204.819C182.193 202.592 183.44 201.278 184.223 200.875C184.604 200.684 185.386 200.493 186.55 200.302C186.803 200.281 187.121 200.281 187.374 200.239L196.871 199.433C201.672 199.009 206.304 198.161 210.746 196.931C215.166 195.68 219.798 194.853 224.6 194.407C226.122 194.301 228.893 193.983 232.891 193.474C236.909 192.965 241.266 192.393 245.941 191.757C250.615 191.142 254.993 190.527 259.075 189.912C263.157 189.297 265.991 188.852 267.599 188.555C269.206 188.258 270.602 188.025 271.787 187.834C272.971 187.664 274.431 187.516 276.165 187.41C276.313 187.41 276.503 187.177 276.651 187.134L281.579 186.583C284.435 186.265 286.888 186.095 288.961 186.095C291.013 186.095 292.514 186.18 293.445 186.392C292.726 188.152 292.112 189.361 291.563 190.039C291.034 190.718 290.59 191.142 290.23 191.333C289.871 191.524 289.659 191.672 289.596 191.757C289.532 191.842 289.532 192.181 289.596 192.796C289.807 194.768 291.647 195.531 295.116 195.15C295.708 195.086 296.491 194.81 297.421 194.323C298.352 193.835 299.325 193.305 300.319 192.732C301.313 192.16 302.286 191.545 303.195 190.909C304.126 190.272 304.782 189.7 305.184 189.191C306.072 188.937 307.299 188.046 308.885 186.477C310.45 184.929 311.169 183.402 311 181.875C310.746 179.628 309.794 177.931 308.145 176.829L308.102 176.765ZM96.7227 190.039C76.5662 189.276 60.9781 188.088 49.9375 186.54C38.8968 184.993 31.5364 181.981 27.8562 177.507C28.6388 176.15 31.3884 175.026 36.1473 174.157C40.885 173.288 46.0246 172.567 51.5449 171.973C57.0653 171.379 62.1414 170.955 66.7946 170.679C71.4477 170.383 74.0704 170.234 74.6415 170.234H79.2946C88.6009 170.807 96.0882 171.4 101.82 171.973C107.531 172.545 111.549 173.033 113.876 173.436L96.7227 190.039ZM147.146 188.576C136.592 188.958 125.488 189.255 113.876 189.446C115.23 187.495 117.366 184.971 120.263 181.875C123.182 178.78 126.376 175.472 129.845 171.973C133.335 168.474 137.015 164.891 140.885 161.201C144.756 157.511 148.436 154.013 151.926 150.705L172.273 129.14C172.654 127.973 173.33 127.401 174.303 127.401L184.181 118.092C185.154 117.71 186.55 116.629 188.411 114.89C190.251 113.151 192.176 111.201 194.206 109.08C196.237 106.96 198.182 104.818 200.023 102.676C201.863 100.535 203.259 98.902 204.231 97.7146L211.211 93.0496C213.919 90.3354 216.541 87.706 219.058 85.1827C221.575 82.6593 224.092 80.3268 226.609 78.1852L231.262 73.5202C233.99 70.9968 236.74 68.8128 239.553 66.968C242.345 65.1232 246.279 62.727 251.313 59.822V63.0239C251.313 66.3318 250.551 70.1062 248.986 74.3896C247.421 78.6729 245.877 82.3625 244.333 85.4583L184.181 180.137C182.446 181.494 180.881 183.445 179.528 185.968C168.487 187.325 157.679 188.194 147.125 188.597L147.146 188.576Z",stroke:l,strokeWidth:"2",fill:l,style:{"--path-length":d,strokeDasharray:d,strokeDashoffset:d,fillOpacity:0,animation:`drawSignature-${c.replace(/:/g,"")} ${a}s ease-out ${n}s forwards`}})]}):e.jsxs("svg",{...s,width:r,height:r,viewBox:"0 0 329 329",fill:"none",children:[e.jsx("path",{d:"M239.997 257.024C239.13 256.261 238.348 255.328 237.671 254.268C236.994 253.208 236.55 252.126 236.359 251.066C236.169 250.006 236.359 249.179 236.93 248.585C239.659 245.277 243.233 242.118 247.696 239.107C252.138 236.095 256.601 234.59 261.063 234.59C263.2 234.59 264.595 235.375 265.293 236.922C265.97 238.47 266.309 240.018 266.309 241.587C266.309 244.302 265.568 246.443 264.13 247.991C262.692 249.539 260.831 250.854 258.61 251.914C256.389 252.996 254.062 253.907 251.63 254.692C249.198 255.455 247.04 256.24 245.095 257.024L242.768 258.191C241.795 258.191 240.886 257.809 239.997 257.024Z",fill:l}),e.jsx("path",{d:"M308.102 176.765C306.453 175.663 304.126 174.963 301.123 174.687C298.119 174.411 294.46 174.433 290.167 174.772C285.873 175.111 281.008 175.578 275.594 176.193C273.648 176.405 271.829 176.617 270.179 176.808L245.793 180.942C242.091 181.536 239.003 182.003 236.486 182.406C233.969 182.808 231.558 182.702 229.232 182.13L193.572 185.777C193.952 184.293 194.587 182.893 195.517 181.6C196.469 180.243 197.548 179.161 198.711 178.398C205.099 169.068 211.254 160.056 217.176 151.299C223.077 142.562 228.639 134.102 233.885 125.959L234.752 121.888L253.936 88.6814C253.936 87.3243 254.422 86.2641 255.395 85.4795C256.368 84.7162 257.045 83.4439 257.425 81.7051L260.344 73.2445C260.915 71.6966 261.465 70.0426 261.93 68.2826C262.417 66.5439 262.671 64.5082 262.671 62.1757C262.671 60.8186 262.459 59.1223 262.1 57.0866C261.698 55.051 261.084 53.1426 260.217 51.4038C259.35 49.6438 258.271 48.1595 257.024 46.8872C255.776 45.615 254.168 45 252.243 45C250.89 45 249.388 45.3817 247.738 46.1663C246.089 46.9509 244.439 47.9263 242.789 49.0925C241.139 50.2588 239.595 51.4674 238.136 52.7397C236.677 54.012 235.471 55.0298 234.498 55.7932L207.468 81.7263L206.008 82.5957L192.641 96.2939C192.429 96.2939 192.112 96.3999 191.626 96.5907C191.139 96.7816 190.801 96.8876 190.61 96.8876L122.04 164.763C120.094 164.763 117.493 163.894 114.193 162.134C110.915 160.374 107.023 159.505 102.56 159.505C101.587 159.505 100.53 159.802 99.3666 160.374C98.2033 160.947 97.3361 161.243 96.7439 161.243C95.9613 161.243 95.2422 160.798 94.5654 159.929C93.8885 159.059 92.7887 158.635 91.2236 158.635C86.5704 159.611 83.567 160.183 82.2134 160.374C80.8597 160.586 79.9714 160.671 79.5907 160.671C77.6448 159.886 76.397 159.696 75.8047 160.098C75.2125 160.501 74.7472 160.777 74.3453 160.968C73.7743 160.586 72.3149 160.247 69.9883 159.95C67.6617 159.674 65.5255 159.505 63.6008 159.505C60.682 159.505 56.6634 159.611 51.5449 159.802C46.4053 159.992 41.3715 160.629 36.4434 161.689C31.5153 162.749 27.2005 164.488 23.5203 166.926C19.8401 169.365 18 172.8 18 177.274C18 181.155 18.9518 184.462 20.8976 187.177C22.8435 189.912 25.3181 192.223 28.3215 194.174C31.3249 196.125 34.6667 197.524 38.3469 198.394C42.0271 199.263 45.6016 199.709 49.0915 199.709C51.2277 200.281 53.1524 200.09 54.9079 199.136C54.6964 199.136 55.7328 199.369 57.9536 199.857C60.1744 200.345 62.9451 200.79 66.2235 201.172C69.523 201.553 72.9494 201.999 76.545 202.465C80.1195 202.953 83.0806 203.207 85.4071 203.207L59.5399 232.915L54.0196 239.319C52.8563 240.294 52.4333 241.948 52.7294 244.281C53.0043 246.613 53.6389 247.779 54.6118 247.779C57.1287 247.779 60.3225 246.083 64.193 242.69C68.0636 239.297 72.1457 235.163 76.397 230.307C80.6694 225.451 84.9207 220.51 89.1931 215.464C93.4444 210.417 97.2303 206.24 100.53 202.932C100.911 202.932 101.312 202.974 101.693 203.08C102.074 203.165 102.455 203.228 102.856 203.228C115.822 203.228 127.878 202.847 139.045 202.062C150.192 201.299 160.407 200.896 169.692 200.896C166.985 205.37 164.066 209.929 160.978 214.594C157.89 219.259 154.591 224.115 151.101 229.162L127.285 264.701C125.932 266.842 124.726 268.984 123.648 271.104C122.569 273.225 122.061 275.366 122.061 277.508C122.061 279.056 122.59 280.371 123.648 281.431C124.705 282.491 125.826 283.042 126.989 283.042C129.316 283.042 131.346 282.364 133.081 281.007C134.815 279.65 136.613 278.038 138.453 276.193C140.293 274.349 142.197 272.44 144.121 270.511C146.046 268.56 148.373 267.012 151.08 265.846L182.467 237.007C182.658 236.414 183.102 235.777 183.758 235.12C184.434 234.442 185.259 233.615 186.232 232.639L197.273 223.33C200.192 220.807 202.941 217.881 205.543 214.573C208.166 211.286 209.477 209.145 209.477 208.169C209.477 206.027 208.229 204.967 205.712 204.967C205.331 204.967 204.697 205.116 203.83 205.413C202.962 205.709 201.947 206.346 200.784 207.3L156.896 248.076L146.152 255.646L149.049 251.575C149.832 250.218 151.186 248.034 153.132 245.023C155.056 242.012 157.192 238.725 159.519 235.12C161.846 231.537 164.32 227.805 166.943 223.903C169.566 220.022 172.019 216.418 174.367 213.11C176.693 209.823 178.724 207.045 180.458 204.819C182.193 202.592 183.44 201.278 184.223 200.875C184.604 200.684 185.386 200.493 186.55 200.302C186.803 200.281 187.121 200.281 187.374 200.239L196.871 199.433C201.672 199.009 206.304 198.161 210.746 196.931C215.166 195.68 219.798 194.853 224.6 194.407C226.122 194.301 228.893 193.983 232.891 193.474C236.909 192.965 241.266 192.393 245.941 191.757C250.615 191.142 254.993 190.527 259.075 189.912C263.157 189.297 265.991 188.852 267.599 188.555C269.206 188.258 270.602 188.025 271.787 187.834C272.971 187.664 274.431 187.516 276.165 187.41C276.313 187.41 276.503 187.177 276.651 187.134L281.579 186.583C284.435 186.265 286.888 186.095 288.961 186.095C291.013 186.095 292.514 186.18 293.445 186.392C292.726 188.152 292.112 189.361 291.563 190.039C291.034 190.718 290.59 191.142 290.23 191.333C289.871 191.524 289.659 191.672 289.596 191.757C289.532 191.842 289.532 192.181 289.596 192.796C289.807 194.768 291.647 195.531 295.116 195.15C295.708 195.086 296.491 194.81 297.421 194.323C298.352 193.835 299.325 193.305 300.319 192.732C301.313 192.16 302.286 191.545 303.195 190.909C304.126 190.272 304.782 189.7 305.184 189.191C306.072 188.937 307.299 188.046 308.885 186.477C310.45 184.929 311.169 183.402 311 181.875C310.746 179.628 309.794 177.931 308.145 176.829L308.102 176.765ZM96.7227 190.039C76.5662 189.276 60.9781 188.088 49.9375 186.54C38.8968 184.993 31.5364 181.981 27.8562 177.507C28.6388 176.15 31.3884 175.026 36.1473 174.157C40.885 173.288 46.0246 172.567 51.5449 171.973C57.0653 171.379 62.1414 170.955 66.7946 170.679C71.4477 170.383 74.0704 170.234 74.6415 170.234H79.2946C88.6009 170.807 96.0882 171.4 101.82 171.973C107.531 172.545 111.549 173.033 113.876 173.436L96.7227 190.039ZM147.146 188.576C136.592 188.958 125.488 189.255 113.876 189.446C115.23 187.495 117.366 184.971 120.263 181.875C123.182 178.78 126.376 175.472 129.845 171.973C133.335 168.474 137.015 164.891 140.885 161.201C144.756 157.511 148.436 154.013 151.926 150.705L172.273 129.14C172.654 127.973 173.33 127.401 174.303 127.401L184.181 118.092C185.154 117.71 186.55 116.629 188.411 114.89C190.251 113.151 192.176 111.201 194.206 109.08C196.237 106.96 198.182 104.818 200.023 102.676C201.863 100.535 203.259 98.902 204.231 97.7146L211.211 93.0496C213.919 90.3354 216.541 87.706 219.058 85.1827C221.575 82.6593 224.092 80.3268 226.609 78.1852L231.262 73.5202C233.99 70.9968 236.74 68.8128 239.553 66.968C242.345 65.1232 246.279 62.727 251.313 59.822V63.0239C251.313 66.3318 250.551 70.1062 248.986 74.3896C247.421 78.6729 245.877 82.3625 244.333 85.4583L184.181 180.137C182.446 181.494 180.881 183.445 179.528 185.968C168.487 187.325 157.679 188.194 147.125 188.597L147.146 188.576Z",fill:l})]})};Rr.displayName="SignatureA";const Ss=b("group relative flex items-center rounded-[8px] border box-border cursor-pointer w-full overflow-hidden isolate transition-[border-color] duration-300",{variants:{status:{normal:"bg-[var(--color-white)] border-[var(--color-gray-200)]",hover:"border-[var(--color-blue-800)]",generating:"bg-[var(--color-white)] border-[var(--color-gray-200)] cursor-default",error:"border-[var(--color-red-1000)]"},disabled:{true:"opacity-50 cursor-not-allowed pointer-events-none",false:""}},defaultVariants:{status:"normal",disabled:!1}}),ks=b("absolute inset-0 -z-10 transition-opacity duration-300",{variants:{status:{normal:"opacity-0 group-hover:opacity-100",hover:"opacity-100",generating:"opacity-0",error:"opacity-100"}},defaultVariants:{status:"normal"}}),Ns=b("absolute inset-0",{variants:{status:{normal:"bg-[var(--color-blue-200)]",hover:"bg-[var(--color-blue-200)]",generating:"",error:"bg-[var(--color-red-200)]"}},defaultVariants:{status:"normal"}}),mr=b("flex gap-2 h-[75px] shrink-0",{variants:{status:{normal:"p-2 items-end",hover:"p-2 items-end",generating:"px-4 py-2 items-center",error:"px-4 py-2 items-center"}},defaultVariants:{status:"normal"}}),zs=b("relative -bottom-2 w-[60px] h-[66px] bg-[var(--color-gray-50)] border border-[var(--color-gray-200)] border-b-0 rounded-t-[4px] overflow-hidden transition-transform duration-300 group-hover:opacity-90 group-hover:shadow-sm"),Ts=b("w-full h-full bg-[var(--color-blue-200)]/30 p-2 space-y-2 flex flex-col items-start justify-start gap-1"),$s=b("h-1 bg-[var(--color-gray-200)] rounded-full origin-left"),Ls=b("flex flex-col gap-[4px] grow items-start p-4 min-w-0"),Ms=b("font-medium text-[14px] leading-[20px] text-[var(--color-blue-1000)]"),As=b("text-[12px] leading-[16px] text-[var(--color-gray-600)]"),Rs=b("px-4 overflow-hidden flex items-center w-[56px] relative"),Fs=b("absolute w-6 h-6 text-[var(--color-blue-800)]"),Bs=b("w-6 h-6 text-[var(--color-gray-200)]"),Is=b("w-4 h-4 shrink-0 transition-all duration-300",{variants:{status:{normal:"text-[var(--color-blue-1000)] group-hover:text-[var(--color-blue-800)] group-hover:translate-x-0.5",hover:"text-[var(--color-blue-800)] translate-x-0.5",generating:"text-[var(--color-gray-600)] animate-spin",error:"text-[var(--color-blue-1000)] group-hover:rotate-[-20deg]"}},defaultVariants:{status:"normal"}}),Ds=b("w-4 h-4 shrink-0 text-[var(--color-red-1000)] transition-transform duration-300 group-hover:scale-110"),Ws={rest:{scaleX:1},hover:{scaleX:[0,1]}},Ps={rest:{x:0},hover:{x:4}},Es={rest:{x:-20,opacity:0},hover:{x:0,opacity:1}},Vs={rest:{x:0,opacity:1},hover:{x:20,opacity:0}},Hs=[100,66,75,50],lo=j.forwardRef(({title:r,subtitle:t,status:o,onClick:a,onActionClick:n,className:s,disabled:l=!1},c)=>{const[d,x]=j.useState(!1),p=o||(d&&!l?"hover":"normal"),f=j.useMemo(()=>p==="generating"||p==="error"?"rest":d?"hover":"rest",[p,d]),u=j.useCallback(()=>{!o&&!l&&x(!0)},[o,l]),g=j.useCallback(()=>{!o&&!l&&x(!1)},[o,l]),m=j.useCallback(()=>{!l&&a&&a()},[l,a]),h=j.useCallback($=>{$.stopPropagation(),!l&&n&&n()},[l,n]),v=j.useCallback($=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),m())},[m]),w=()=>p==="generating"?e.jsx("div",{className:mr({status:"generating"}),children:e.jsx(i.Loader,{size:16,className:"text-[var(--color-gray-600)] animate-spin"})}):p==="error"?e.jsx("div",{className:mr({status:"error"}),children:e.jsx(i.TriangleAlert,{size:16,className:Ds()})}):e.jsx("div",{className:mr({status:p}),children:e.jsx("div",{className:zs(),children:e.jsx(q.motion.div,{className:Ts(),variants:{rest:{},hover:{transition:{staggerChildren:.1}}},children:Hs.map(($,z)=>e.jsx(q.motion.div,{className:$s(),style:{width:`${$}%`},variants:Ws,transition:{duration:.4,ease:"easeInOut"}},z))})})}),k=()=>p==="generating"?null:p==="error"?e.jsx("button",{type:"button",onClick:h,className:"focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-800)] focus-visible:ring-offset-2 rounded-sm","aria-label":"Retry",children:e.jsx(i.RotateCcw,{size:16,className:Is({status:"error"})})}):e.jsxs(e.Fragment,{children:[e.jsx(q.motion.div,{className:Fs(),variants:Es,transition:{duration:.3,ease:"backOut"},children:e.jsx(i.ArrowUp,{size:24,className:"rotate-90"})}),e.jsx(q.motion.div,{className:Bs(),variants:Vs,transition:{duration:.3},children:e.jsx(i.ArrowUp,{size:24,className:"rotate-90"})})]});return e.jsxs(q.motion.div,{ref:c,role:"button",tabIndex:l?-1:0,className:y(Ss({status:p,disabled:l}),s),onClick:m,onKeyDown:v,onMouseEnter:u,onMouseLeave:g,"aria-disabled":l,"aria-label":`${r} - ${t}${p==="error"?" - Error occurred":""}${p==="generating"?" - Generating":""}`,initial:"rest",whileHover:"hover",animate:f,children:[e.jsx("div",{className:ks({status:p}),children:e.jsx("div",{className:Ns({status:p})})}),w(),e.jsxs(q.motion.div,{className:Ls(),variants:Ps,children:[e.jsx("p",{className:Ms(),title:r,children:r}),e.jsx("p",{className:As(),title:t,children:t})]}),e.jsx("div",{className:Rs(),children:k()})]})});lo.displayName="ArtifactCard";const _s=b("flex items-center flex-wrap gap-2",{variants:{size:{small:"text-[0.875rem] leading-[1.25rem]",medium:"text-[1rem] leading-[1.5rem]"}},defaultVariants:{size:"medium"}}),Qe=b("inline-flex items-center gap-2 transition-colors duration-200 rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2",{variants:{state:{default:"text-[var(--color-gray-600)] hover:text-[var(--color-blue-1000)] cursor-pointer",active:"text-[var(--color-blue-1000)] font-medium cursor-default",inactive:"text-[var(--color-gray-600)] cursor-default"}},defaultVariants:{state:"default"}}),Os=b("text-[var(--color-gray-600)] flex items-center justify-center"),io=({items:r,separator:t=e.jsx(i.ChevronRight,{size:16}),className:o,size:a="medium"})=>e.jsx("nav",{"aria-label":"Breadcrumb",className:y(_s({size:a}),o),children:e.jsx("ol",{className:"flex items-center flex-wrap gap-2",children:r.map((n,s)=>{const l=s===r.length-1;let c;return l?c=e.jsxs("span",{className:Qe({state:"active"}),"aria-current":"page",children:[n.icon,n.label]}):n.href?c=e.jsxs("a",{href:n.href,className:Qe({state:"default"}),onClick:n.onClick,children:[n.icon,n.label]}):n.onClick?c=e.jsxs("button",{type:"button",className:Qe({state:"default"}),onClick:n.onClick,children:[n.icon,n.label]}):c=e.jsxs("span",{className:Qe({state:"inactive"}),children:[n.icon,n.label]}),e.jsxs("li",{className:"flex items-center gap-2",children:[c,!l&&e.jsx("span",{className:Os(),"aria-hidden":"true",children:t})]},`${n.label}-${s}`)})})}),Gs={sm:"h-[var(--archie-btn-sm)] px-3 text-xs gap-1.5 rounded-[var(--archie-radius-md)]",default:"h-[var(--archie-btn-md)] px-4 text-sm gap-2 rounded-[var(--archie-radius-lg)]",lg:"h-[var(--archie-btn-lg)] px-6 text-base gap-2.5 rounded-[var(--archie-radius-lg)]",icon:"h-[var(--archie-btn-md)] w-[var(--archie-btn-md)] rounded-[var(--archie-radius-lg)]"},Be=j.forwardRef(({variant:r="default",size:t="default",loading:o=!1,disabled:a,leftIcon:n,rightIcon:s,startIcon:l,endIcon:c,children:d,className:x,style:p,onMouseEnter:f,onMouseLeave:u,...g},m)=>{const h=Yt(),v=a||o,w=n??l,k=s??c,$={default:{background:h.primary,color:h.white},secondary:{background:h.white,color:h.primaryDeep,border:`1px solid ${h.n200}`},outline:{background:"transparent",color:h.primaryDeep,border:`1px solid ${h.n200}`},ghost:{background:"transparent",color:h.n800},destructive:{background:h.error,color:h.white},link:{background:"transparent",color:h.primary,padding:0,height:"auto"}},z=T=>{r==="link"?T.currentTarget.style.textDecoration="underline":T.currentTarget.style.opacity="0.85",f==null||f(T)},C=T=>{r==="link"?T.currentTarget.style.textDecoration="none":T.currentTarget.style.opacity="1",u==null||u(T)};return e.jsxs("button",{ref:m,className:y("inline-flex items-center justify-center font-light transition-all duration-[var(--archie-anim-duration)] ease-[var(--archie-anim-easing)] cursor-pointer",Gs[t],v&&"opacity-50 cursor-not-allowed pointer-events-none",x),style:{...$[r],fontFamily:h.font,...r==="link"?{textDecoration:"none"}:{},...p},disabled:v,onMouseEnter:z,onMouseLeave:C,...g,children:[o?e.jsx("svg",{className:"w-4 h-4 animate-spin",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:e.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}):w?e.jsx("span",{className:"shrink-0",children:w}):null,d,!o&&k&&e.jsx("span",{className:"shrink-0",children:k})]})});Be.displayName="Button";const Us=b("flex items-center justify-center shrink-0 rounded-[2px]",{variants:{size:{sm:"p-1",md:"p-1.5",lg:"p-2 rounded-[4px]"}},defaultVariants:{size:"sm"}}),co={txt:{background:"#f5f6fa",iconColor:"#8c92af",icon:i.FileText},docx:{background:"#E0F2FF",iconColor:"#0369A1",icon:i.FileText},doc:{background:"#E0F2FF",iconColor:"#0369A1",icon:i.FileText},pdf:{background:"#ffecec",iconColor:"#fb6060",icon:i.Pdf},csv:{background:"#e2f7e5",iconColor:"#71d481",icon:i.Grid},xlsx:{background:"#e2f7e5",iconColor:"#71d481",icon:i.Grid},xls:{background:"#e2f7e5",iconColor:"#71d481",icon:i.Grid},json:{background:"#fff2e2",iconColor:"#e15713",icon:i.Code},js:{background:"#fff2e2",iconColor:"#ff6f00",icon:i.Code},ts:{background:"#E0F2FF",iconColor:"#0369A1",icon:i.Code},md:{background:"#f5f6fa",iconColor:"#8c92af",icon:i.Code},pptx:{background:"#FFE5D2",iconColor:"#C2410C",icon:i.WhiteboardView},ppt:{background:"#FFE5D2",iconColor:"#C2410C",icon:i.WhiteboardView},zip:{background:"#f5f6fa",iconColor:"#8c92af",icon:i.Archive},rar:{background:"#f5f6fa",iconColor:"#8c92af",icon:i.Archive},"7z":{background:"#f5f6fa",iconColor:"#8c92af",icon:i.Archive},mp4:{background:"#FEE2E5",iconColor:"#BE123C",icon:i.Video},mov:{background:"#FEE2E5",iconColor:"#BE123C",icon:i.Video},avi:{background:"#FEE2E5",iconColor:"#BE123C",icon:i.Video},mp3:{background:"#E4E4F8",iconColor:"#6D28D9",icon:i.Volume2},wav:{background:"#E4E4F8",iconColor:"#6D28D9",icon:i.Volume2}},Ys={background:"#f5f6fa",iconColor:"#8c92af",icon:i.FileText},po=r=>{if(!r)return"";const t=r.lastIndexOf(".");return t<=0?"":r.slice(t+1).toLowerCase()},xo=r=>{const t=po(r);return co[t]||Ys},Ks={sm:12,md:16,lg:24},Fr=j.forwardRef(({filename:r,size:t="sm",className:o},a)=>{const n=xo(r),s=n.icon,l=Ks[t];return e.jsx("div",{ref:a,className:y(Us({size:t}),o),style:{backgroundColor:n.background,color:n.iconColor},children:e.jsx(s,{size:l,color:n.iconColor,className:"shrink-0"})})});Fr.displayName="FileIcon";const Zs=b("relative inline-flex items-center px-1 py-1 gap-1 rounded-[5px] border overflow-hidden transition-colors",{variants:{status:{none:"",uploading:"border-[var(--color-gray-600)] bg-[var(--color-gray-50)]",processing:"border-[var(--color-gray-600)] bg-[var(--color-gray-50)]",done:"border-[var(--color-gray-200)] bg-[var(--color-white)]",error:"border-[var(--color-gray-200)] bg-[var(--color-white)]"}},defaultVariants:{status:"done"}}),qr=b("truncate text-[0.75rem] leading-[1rem] font-normal",{variants:{status:{none:"",uploading:"text-[var(--color-gray-600)]",processing:"text-[var(--color-gray-800)]",done:"text-[var(--color-gray-800)]",error:"text-[var(--color-gray-800)]"}},defaultVariants:{status:"done"}}),hr=b("shrink-0",{variants:{status:{uploading:"text-[var(--color-blue-800)]",processing:"text-[var(--color-blue-800)]",done:"text-[var(--color-gray-600)]",error:"text-[var(--color-red-1000)]"}},defaultVariants:{status:"done"}}),Xs=b("absolute top-0 left-0 bottom-0 bg-[var(--color-gray-200)] z-0 rounded-bl-[4px] rounded-tl-[4px]",{variants:{status:{uploading:"opacity-100",processing:"opacity-100",done:"opacity-0",error:"opacity-0"}},defaultVariants:{status:"uploading"}}),ze=b("flex items-center justify-center shrink-0 p-1 rounded-[2px]",{variants:{variant:{file:"",template:"bg-[var(--color-entity-sky)]",client:"",agent:"bg-[var(--color-entity-sky)]",workstream:"bg-[var(--color-entity-sky)]",status:"",skill:"",autopilot:""}},defaultVariants:{variant:"file"}});var te=(r=>(r.Uploading="uploading",r.Processing="processing",r.Done="done",r.Error="error",r))(te||{});const fo=({onClick:r})=>{const t=o=>{o.stopPropagation(),r()};return e.jsx(q.motion.button,{onClick:t,className:"absolute -top-[6px] -right-[6px] hidden group-hover:flex items-center justify-center bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-[8px] p-[2px] focus:outline-none focus:ring-2 focus:ring-[var(--color-blue-800)] shrink-0 z-20","aria-label":"Remove",initial:{scale:0,opacity:0},whileInView:{scale:1,opacity:1},whileHover:{scale:1.1},whileTap:{scale:.95},transition:{scale:{type:"spring",stiffness:400,damping:17},opacity:{duration:.2}},children:e.jsx(i.X,{size:10,className:"text-[var(--color-gray-800)]"})})};fo.displayName="ChipDeleteButton";const qs="sm",Js=r=>{if(r.type==="file"){const t=r.status??te.Done;return{filename:r.filename,showFileIcon:t===te.Done}}return r.type==="fileMention"?{filename:r.filename,showFileIcon:!0}:null},uo=({chipProps:r})=>{const{type:t}=r,o=Js(r);if(o!=null&&o.showFileIcon)return e.jsx(Fr,{filename:o.filename,size:qs});if(t==="file"){const{status:a=te.Done}=r,n=a===te.Uploading,s=a===te.Processing,l=a===te.Error,c=n?"uploading":s?"processing":"error";return e.jsxs("div",{className:y(ze({variant:"status"}),l&&"bg-[var(--color-red-200)]"),children:[n&&e.jsx(i.ArrowUp,{size:12,className:hr({status:c})}),s&&e.jsx(i.Loader,{size:12,className:y(hr({status:c}),"animate-spin")}),l&&e.jsx(i.TriangleAlert,{size:12,className:hr({status:c})})]})}return t==="templateMention"?e.jsx("div",{className:ze({variant:"template"}),children:e.jsx(i.FileText,{size:12,className:"text-[var(--color-gray-600)]"})}):t==="clientMention"?e.jsx(pr,{type:"text",initials:r.name,size:"small",shape:"circular"}):t==="agentMention"?r.iconSrc?e.jsx("img",{src:r.iconSrc,alt:"","aria-hidden":"true",className:"w-5 h-5 rounded-[3px] object-cover shrink-0"}):e.jsx("div",{className:ze({variant:"agent"}),children:e.jsx(i.Cpu,{size:12,className:"text-[var(--color-gray-600)]"})}):t==="workstreamMention"?e.jsx("div",{className:ze({variant:"workstream"}),children:e.jsx(i.WorkStream,{size:12,className:"text-[var(--color-gray-600)]"})}):t==="skill"?e.jsx("div",{className:ze({variant:"skill"}),style:{backgroundColor:"var(--color-blue-800-bg)"},children:e.jsx(i.FileText,{size:12,style:{color:"var(--color-blue-800)"}})}):t==="autopilot"?e.jsx("div",{className:ze({variant:"autopilot"}),style:{backgroundColor:"var(--color-blue-800-bg)"},children:e.jsx(i.Layout,{size:12,style:{color:"var(--color-gray-600)"}})}):null};uo.displayName="ChipLeadingContent";const Qs=(r,t=20)=>{if(r.length<=t)return r;const o=r.lastIndexOf(".");if(o===-1||o===0)return r.slice(0,t-1)+"…";const a=r.slice(0,o),n=r.slice(o);if(n.length>=t-3)return r.slice(0,t-1)+"…";const s=t-n.length-1;return s<3?r.slice(0,t-1)+"…":a.slice(0,s)+"…"+n},el=r=>{switch(r.type){case"file":case"fileMention":return Qs(r.filename);case"templateMention":case"clientMention":case"agentMention":case"workstreamMention":case"skill":case"autopilot":return r.name}},rl=r=>{switch(r.type){case"file":case"fileMention":return r.filename;case"templateMention":case"clientMention":case"agentMention":case"workstreamMention":case"skill":case"autopilot":return r.name}},tl={skill:{borderColor:"var(--color-blue-800)",backgroundColor:"var(--color-blue-800-bg)"},autopilot:{borderColor:"var(--color-gray-200)",backgroundColor:"var(--color-gray-100)"}},ol={skill:{color:"var(--color-blue-800)"},autopilot:{color:"var(--color-gray-600)"}},go=r=>{const{type:t,className:o,onDelete:a}=r,n=t==="file"?r.status??te.Done:te.Done,s=n===te.Uploading,l=n===te.Processing,c=t==="file"?r.progress??0:0,d=(s||l)&&t==="file",x=a&&!s&&!l,p=el(r),f=rl(r),u=t==="agentMention"?r.labelContent:void 0,g=t==="skill"||t==="autopilot",m=g?"none":n,h=g?"none":n,v=g?tl[t]:void 0,w=g?ol[t]:void 0;return e.jsxs("div",{className:"relative inline-block group",children:[e.jsxs("div",{className:y(Zs({status:m}),o),style:v,children:[d&&e.jsx(q.motion.div,{className:Xs({status:n}),initial:{width:"0%"},animate:{width:`${c}%`},transition:{duration:.3,ease:"easeOut"}}),e.jsxs("div",{className:"relative z-10 flex items-center gap-1 pr-1",children:[e.jsx(uo,{chipProps:r}),u?e.jsx("span",{className:qr({status:h}),style:w,title:f,children:u}):e.jsx("span",{className:qr({status:h}),style:w,title:f,children:p})]})]}),x&&e.jsx(fo,{onClick:a})]})};go.displayName="Chip";const al=b("inline-flex items-center gap-2 cursor-pointer select-none group disabled:cursor-not-allowed disabled:opacity-50 w-fit",{variants:{size:{medium:"text-[1rem] leading-[1.5rem] gap-2",small:"gap-1"}},defaultVariants:{size:"medium"}}),nl=b("flex items-center justify-center transition-colors duration-[var(--archie-anim-duration)] ease-[var(--archie-anim-easing)] rounded-[2px] border shrink-0 peer-focus-visible:ring-2 peer-focus-visible:ring-[var(--color-blue-200)] peer-focus-visible:ring-offset-1",{variants:{checked:{true:"bg-[var(--color-blue-800)] border-[var(--color-blue-800)] text-white",false:"bg-white border-[var(--color-gray-200)] group-hover:border-[var(--color-gray-600)]"},indeterminate:{true:"bg-[var(--color-blue-800)] border-[var(--color-blue-800)]",false:""},size:{medium:"w-[16px] h-[16px]",small:"w-[12px] h-[12px]"}},defaultVariants:{checked:!1,indeterminate:!1,size:"medium"}}),sl="sr-only peer",mo=j.forwardRef(({className:r,checked:t,defaultChecked:o,onChange:a,label:n,size:s="medium",disabled:l,indeterminate:c=!1,...d},x)=>{const[p,f]=j.useState(o||!1),u=t!==void 0,g=u?t:p,m=j.useRef(null);j.useEffect(()=>{const w=m.current;w&&(w.indeterminate=c)},[c]);const h=w=>{m.current=w,typeof x=="function"?x(w):x&&(x.current=w)},v=w=>{u||f(w.target.checked),a==null||a(w)};return e.jsxs("label",{className:al({size:s,className:r}),children:[e.jsx("input",{type:"checkbox",className:sl,ref:h,checked:u?t:void 0,defaultChecked:u?void 0:o,onChange:v,disabled:l,...d}),e.jsx("span",{className:nl({checked:!!g,indeterminate:c,size:s}),children:c&&!g?e.jsx("span",{className:"w-2 h-0.5 rounded-full bg-white"}):e.jsx(i.Check,{size:s==="medium"?12:8,strokeWidth:3,className:y("text-white transition-opacity duration-200",g?"opacity-100":"opacity-0")})}),n&&e.jsx(Ye,{as:"span",variant:s==="medium"?"small":"x-small",color:"secondary",children:n})]})});mo.displayName="Checkbox";const ll=b("relative inline-flex items-center justify-center",{variants:{size:{xs:"w-[18px] h-[18px]",small:"w-[24px] h-[24px]",medium:"w-[32px] h-[32px]",large:"w-[40px] h-[40px]"}},defaultVariants:{size:"medium"}}),il=b("transform"),cl=b("stroke-[var(--color-gray-200)]"),dl=b("transition-[stroke-dashoffset] duration-300 ease-in-out",{variants:{variant:{default:"stroke-[var(--color-blue-800)]",success:"stroke-[var(--color-green-1000)]",warning:"stroke-[var(--color-orange-800)]",error:"stroke-[var(--color-red-1000)]"}},defaultVariants:{variant:"default"}}),pl=b("absolute inset-0 flex items-center justify-center font-medium text-[var(--color-gray-800)]",{variants:{size:{xs:"text-[6px]",small:"text-[8px]",medium:"text-[10px]",large:"text-[12px]"}},defaultVariants:{size:"medium"}}),xl={xs:18,small:24,medium:32,large:40},ho=j.forwardRef(({className:r,value:t=0,max:o=100,size:a="medium",variant:n="default",showLabel:s=!0,labelFormatter:l,strokeWidth:c=3,...d},x)=>{const p=Math.min(Math.max(t/o*100,0),100),f=xl[a],u=(f-c)/2,g=2*Math.PI*u,m=g-p/100*g,h=l?l(t,o):`${Math.round(t)}`;return e.jsxs("div",{ref:x,className:y(ll({size:a}),r),role:"progressbar","aria-valuemin":0,"aria-valuemax":o,"aria-valuenow":t,...d,children:[e.jsxs("svg",{className:il(),width:f,height:f,viewBox:`0 0 ${f} ${f}`,children:[e.jsx("circle",{className:cl(),cx:f/2,cy:f/2,r:u,fill:"none",strokeWidth:c}),e.jsx("circle",{className:dl({variant:n}),cx:f/2,cy:f/2,r:u,fill:"none",strokeWidth:c,strokeLinecap:"round",strokeDasharray:g,strokeDashoffset:m,transform:`rotate(-90 ${f/2} ${f/2})`})]}),s&&e.jsx("span",{className:pl({size:a}),children:h})]})});ho.displayName="CircularProgress";function fl(r,t){j.useEffect(()=>{const o=a=>{const n=r==null?void 0:r.current;!n||n.contains(a.target)||t(a)};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}},[r,t])}const ul=b("absolute top-full left-0 z-50 w-full min-w-[200px] overflow-hidden rounded-[var(--archie-radius-lg)] border border-[var(--color-gray-200)] bg-[var(--color-white)] [box-shadow:var(--archie-shadow-lg)] focus:outline-none",{variants:{align:{start:"left-0",end:"right-0 left-auto",center:"left-1/2 -translate-x-1/2"},attached:{true:"mt-0 rounded-t-none border-t-0",false:"mt-2"}},defaultVariants:{align:"start",attached:!1}}),gl=b("flex w-full cursor-pointer items-center px-3 py-2 text-[0.875rem] text-[var(--color-gray-800)] transition-colors hover:bg-[var(--color-gray-50)] focus:bg-[var(--color-blue-200)] focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--color-blue-200)] disabled:pointer-events-none disabled:opacity-50",{variants:{active:{true:"bg-[var(--color-blue-200)] text-[var(--color-blue-1000)]"},variant:{default:"",destructive:"text-[var(--color-red-1000)] hover:bg-[var(--color-red-200)] focus:bg-[var(--color-red-200)]"}},defaultVariants:{variant:"default",active:!1}}),ml=b("w-full px-3 py-1 text-[0.625rem] font-bold text-[var(--color-gray-600)] uppercase tracking-wider select-none"),hl=b("w-full h-px bg-[var(--color-gray-200)] my-1"),bo=j.createContext(void 0),xr=()=>{const r=j.useContext(bo);if(!r)throw new Error("useDropdown must be used within a Dropdown");return r},vo=({children:r,defaultOpen:t=!1,open:o,onOpenChange:a,className:n,...s})=>{const[l,c]=j.useState(t),d=o!==void 0,x=d?o:l,p=j.useRef(null),f=()=>{const g=!x;d||c(g),a==null||a(g)},u=()=>{d||c(!1),a==null||a(!1)};return fl(p,u),e.jsx(bo.Provider,{value:{isOpen:x,toggle:f,close:u},children:e.jsx("div",{ref:p,className:y("relative w-full text-left",n),...s,children:r})})};vo.displayName="Dropdown";const yo=j.forwardRef(({className:r,children:t,onClick:o,chevronIcon:a=!1,...n},s)=>{const{toggle:l,isOpen:c}=xr(),d=x=>{l(),o==null||o(x)};return e.jsxs("div",{ref:s,className:y("cursor-pointer w-full relative overflow-visible",r),onClick:d,"aria-haspopup":"true","aria-expanded":c,...n,children:[t,a&&e.jsx(q.motion.span,{animate:{rotate:c?180:0},transition:{duration:.2,ease:[.16,1,.3,1]},className:"absolute right-3 top-1/2 -translate-y-1/2 z-20 pointer-events-none text-[var(--color-gray-600)]",children:e.jsx(i.ChevronDown,{size:16})})]})});yo.displayName="DropdownTrigger";const jo=j.forwardRef(({className:r,align:t="start",attached:o=!1,children:a,...n},s)=>{const{isOpen:l}=xr();return e.jsx(q.AnimatePresence,{children:l&&e.jsx(q.motion.div,{ref:s,initial:{opacity:0,y:-4,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-4,scale:.98},transition:{duration:.2,ease:[.16,1,.3,1]},style:{transformOrigin:"top center"},className:y(ul({align:t,attached:o}),r),...n,children:a})})});jo.displayName="DropdownContent";const wo=j.forwardRef(({className:r,active:t,variant:o,closeOnSelect:a=!0,children:n,onClick:s,...l},c)=>{const{close:d}=xr(),x=p=>{s==null||s(p),a&&d()};return e.jsx("div",{ref:c,className:y(gl({active:t,variant:o}),r),onClick:x,role:"menuitem",...l,children:n})});wo.displayName="DropdownItem";const bl=j.forwardRef(({className:r,children:t,...o},a)=>e.jsx("div",{ref:a,className:y(ml(),r),...o,children:t}));bl.displayName="DropdownLabel";const vl=j.forwardRef(({className:r,animated:t=!1,animationDelay:o=.2,...a},n)=>t?e.jsx("div",{ref:n,className:y("h-px my-1 overflow-hidden",r),...a,children:e.jsx(q.motion.div,{className:"h-full bg-[var(--color-gray-200)]",initial:{width:0},animate:{width:"100%"},transition:{duration:.3,ease:[.16,1,.3,1],delay:o}})}):e.jsx("div",{ref:n,className:y(hl(),r),...a}));vl.displayName="DropdownSeparator";const yl=b("w-full bg-[var(--color-white)] border border-solid rounded-[var(--archie-radius-lg)] font-normal transition-colors duration-[var(--archie-anim-duration)] box-border focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"border-[var(--color-gray-200)] text-[var(--color-gray-600)] placeholder:text-[var(--color-gray-600)] hover:border-[var(--color-gray-500)] focus:border-[var(--color-blue-1000)] focus:text-[var(--color-blue-1000)]",error:"border-[var(--color-red-1000)] text-[var(--color-red-1000)] placeholder:text-[var(--color-red-1000)] focus:border-[var(--color-red-1000)]",success:"border-[var(--color-green-1000)] text-[var(--color-green-1000)] placeholder:text-[var(--color-green-1000)] focus:border-[var(--color-green-1000)]"},size:{medium:"px-4 py-4 text-[1rem] leading-[1.5rem]",small:"px-3 py-2 text-[0.875rem] leading-[1.25rem]",tiny:"p-2 text-[0.75rem] leading-[1rem]",micro:"px-1.5 py-1 text-[0.6875rem] leading-[0.875rem]"}},defaultVariants:{status:"default",size:"medium"}}),jl=b("relative w-full",{variants:{size:{medium:"",small:"",tiny:"",micro:""}},defaultVariants:{size:"medium"}}),Jr=b("absolute top-1/2 -translate-y-1/2 pointer-events-none flex items-center justify-center",{variants:{status:{default:"text-[var(--color-gray-600)]",error:"text-[var(--color-red-1000)]",success:"text-[var(--color-green-1000)]"},position:{start:"",end:""},size:{medium:"size-[24px]",small:"size-[16px]",tiny:"size-[16px]",micro:"size-[14px]"}},compoundVariants:[{position:"start",size:"medium",className:"left-4"},{position:"start",size:"small",className:"left-3"},{position:"start",size:"tiny",className:"left-2"},{position:"start",size:"micro",className:"left-1.5"},{position:"end",size:"medium",className:"right-4"},{position:"end",size:"small",className:"right-3"},{position:"end",size:"tiny",className:"right-2"},{position:"end",size:"micro",className:"right-1.5"}],defaultVariants:{status:"default",size:"medium",position:"end"}}),wl=b("text-[var(--color-red-1000)]",{variants:{size:{medium:"text-[0.875rem] leading-[1.25rem]",small:"text-[0.75rem] leading-[1rem]",tiny:"text-[0.75rem] leading-[1rem]",micro:"text-[0.6875rem] leading-[0.875rem]"}},defaultVariants:{size:"medium"}}),Co=j.forwardRef(({className:r,status:t="default",size:o="medium",startIcon:a,endIcon:n,disabled:s,error:l,label:c,hint:d,...x},p)=>{const f=j.useId(),u=l?"error":t,g={medium:"pl-12",small:"pl-9",tiny:"pl-8",micro:"pl-7"},m={medium:"pr-12",small:"pr-9",tiny:"pr-8",micro:"pr-7"};return e.jsxs("div",{className:"flex flex-col gap-1",children:[c&&e.jsx("label",{className:"text-[11px] font-semibold text-[var(--color-gray-800)]",children:c}),e.jsxs("div",{className:jl({size:o}),children:[a&&e.jsx("span",{className:Jr({status:u,size:o,position:"start"}),children:a}),e.jsx("input",{ref:p,className:y(yl({status:u,size:o}),a&&g[o],n&&m[o],r),disabled:s,"aria-invalid":!!l,"aria-describedby":l?f:void 0,...x}),n&&e.jsx("span",{className:Jr({status:u,size:o,position:"end"}),children:n})]}),l&&e.jsx("span",{id:f,className:wl({size:o}),role:"alert",children:l}),!l&&d&&e.jsx("span",{className:"text-[11px] text-[var(--color-gray-600)]",children:d})]})});Co.displayName="Input";const Cl=b("flex flex-col items-center justify-center"),Sl=b("relative",{variants:{size:{sm:"w-8 h-8",md:"w-12 h-12",lg:"w-16 h-16"}},defaultVariants:{size:"lg"}}),kl=b("absolute inset-0 rounded-full border-4 border-transparent animate-spin",{variants:{color:{primary:"border-t-[var(--color-blue-800)]",secondary:"border-t-[var(--color-gray-600)]"}},defaultVariants:{color:"primary"}}),Nl=b("mt-4 typography-small",{variants:{color:{primary:"text-[var(--color-gray-1000)]",muted:"text-[var(--color-gray-600)]"}},defaultVariants:{color:"muted"}}),zl=({size:r="lg",color:t="primary",text:o,textColor:a="muted",className:n})=>e.jsxs("div",{className:y(Cl(),n),children:[e.jsx("div",{className:Sl({size:r}),children:e.jsx("div",{className:kl({color:t})})}),o&&e.jsx("p",{className:Nl({color:a}),children:o})]}),br=b("relative flex flex-col w-full max-w-[668px] transition-colors duration-200 group",{variants:{variant:{user:"",assistant:"",system:"",loader:""},alignment:{left:"items-start",center:"items-center",right:"items-end"},isEditing:{true:"items-stretch",false:""}},compoundVariants:[{variant:"user",alignment:void 0,isEditing:!1,className:"items-end"},{variant:"assistant",alignment:void 0,isEditing:!1,className:"items-start"},{variant:"system",alignment:void 0,className:"items-start"},{variant:"loader",alignment:void 0,className:"items-start"}],defaultVariants:{variant:"user",isEditing:!1}}),Tl=b("flex gap-[12px] items-start w-full"),$l=b("flex flex-col flex-1 min-w-0"),Qr=b("flex flex-col w-full transition-colors duration-200",{variants:{variant:{user:"[background-image:linear-gradient(var(--color-white),var(--color-white)),linear-gradient(180deg,#B9BCCB_0%,#E5E7F0_100%)] [background-origin:padding-box,border-box] [background-clip:padding-box,border-box] border border-transparent rounded-[16px] p-[16px] overflow-clip shadow-[0px_4px_6px_-2px_rgba(0,0,0,0.03),0px_12px_16px_-4px_rgba(0,0,0,0.05)]",assistant:"bg-transparent px-[8px] pb-[8px] gap-[8px]",system:"bg-transparent gap-[8px]",loader:"bg-transparent gap-[24px]"},isSticky:{true:"shadow-[0px_8px_16px_-4px_rgba(0,0,0,0.1),0px_4px_8px_-4px_rgba(0,0,0,0.06)]",false:""},withTimer:{true:"",false:""}},compoundVariants:[{variant:"assistant",withTimer:!0,className:"bg-white p-[16px] rounded-[4px]"},{variant:"user",withTimer:!0,className:"bg-[var(--color-gray-100)] [background-image:none] border-0 rounded-[4px] shadow-none overflow-visible"}],defaultVariants:{variant:"user",isSticky:!1,withTimer:!1}}),Ll=b("flex w-full",{variants:{variant:{user:"flex-col gap-[8px]",assistant:"flex-col gap-[8px]",system:"flex-row items-center gap-[8px]",loader:"flex-col items-start"}},defaultVariants:{variant:"user"}}),Ml=b("typography-h4 text-[var(--color-blue-1000)]"),et=b("typography-small",{variants:{variant:{user:"text-[var(--color-blue-1000)]",assistant:"text-[var(--color-blue-1000)]",system:"text-[var(--color-gray-600)]",loader:""}},defaultVariants:{variant:"user"}}),rt=b("flex gap-[8px] p-[4px] rounded-[4px] transition-opacity duration-200",{variants:{variant:{user:"",assistant:"",system:"hidden",loader:"hidden"}},defaultVariants:{variant:"user"}}),Al=b(["flex","gap-[8px]","opacity-0","group-hover:opacity-100","transition-opacity","duration-200"]),Rl=b("p-1 rounded-[4px] text-[var(--color-gray-400)] hover:text-[var(--color-gray-800)] hover:drop-shadow-[0_1px_2px_rgba(0,0,0,0.05)] transition-all duration-200 focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-1 disabled:opacity-30 disabled:cursor-not-allowed disabled:hover:text-[var(--color-gray-400)] disabled:hover:drop-shadow-none",{variants:{isActive:{true:"text-[var(--color-blue-800)]",false:""}},defaultVariants:{isActive:!1}}),Fl=b("flex items-start justify-center shrink-0 pt-[4px]"),Bl=b("flex items-center justify-center size-[32px] rounded-full bg-[var(--color-blue-1000)]"),Il=b("text-[12px] text-[var(--color-gray-600)] mt-[4px]"),Dl=b("flex items-center justify-center"),Wl=b("relative overflow-hidden flex items-center gap-[8px] py-[2px] select-none"),Pl=b(["absolute -inset-y-2 -inset-x-4","animate-shimmer","bg-[linear-gradient(90deg,transparent_0%,transparent_35%,rgba(255,255,255,0.4)_50%,transparent_65%,transparent_100%)]","blur-[1px]","z-10 pointer-events-none"]),El=b(["relative shrink-0 flex items-center justify-center","text-[var(--color-gray-600)]","animate-signal-rhythm","origin-center"]),Vl=b(["absolute inset-0","bg-[var(--color-blue-200)]","rounded-full","opacity-0","animate-ping-slow","-z-10"]),Hl=b(["flex","flex-col","w-full","bg-[var(--color-white)]","rounded-[16px]","border","border-[var(--color-blue-800)]","p-[16px]","gap-[8px]","transition-colors","duration-200"]),_l=b(["w-full","min-h-[60px]","bg-transparent","border-none","resize-none","typography-small","text-[var(--color-blue-1000)]","placeholder:text-[var(--color-gray-600)]","focus:outline-none","disabled:opacity-50","disabled:cursor-not-allowed"]),Ol=b(["text-[12px]","leading-[16px]","text-[var(--color-gray-600)]"]),Gl=b("flex items-center gap-[8px]"),Ul=b("overflow-clip shrink-0 size-[24px]"),Yl=b("text-[14px] leading-[20px] font-semibold text-[var(--color-blue-1000)] whitespace-nowrap"),Kl=b("text-[14px] leading-[20px] text-[var(--color-gray-400)] whitespace-nowrap"),Zl=b(["flex","items-center","gap-[4px]"]),tt=b(["p-[4px]","rounded-[4px]","text-[var(--color-gray-400)]","transition-colors","duration-200","hover:text-[var(--color-gray-800)]","hover:bg-[var(--color-gray-100)]","disabled:opacity-30","disabled:cursor-not-allowed","disabled:hover:bg-transparent","disabled:hover:text-[var(--color-gray-400)]","focus-visible:ring-2","focus-visible:ring-[var(--color-blue-200)]","focus-visible:ring-offset-1"]),Xl=b(["text-[12px]","leading-[16px]","text-[var(--color-gray-600)]","font-normal","tabular-nums","select-none","min-w-[32px]","text-center"]),vr=r=>{const t=typeof r=="string"?new Date(r):r,a=new Date().getTime()-t.getTime(),n=Math.floor(a/6e4);if(n<1)return"Just now";if(n===1)return"1 minute ago";if(n<60)return`${n} minutes ago`;const s=Math.floor(n/60);return s===1?"1 hour ago":s<24?`${s} hours ago`:t.toLocaleDateString()};function ql(r){const[t,o]=j.useState(()=>r?vr(r):"");return j.useEffect(()=>{if(!r){o("");return}o(vr(r));const a=setInterval(()=>{o(vr(r))},3e4);return()=>clearInterval(a)},[r]),t}const Jl=[],Ql=typeof navigator<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ei=Ql?"⌘+Enter to save, Esc to cancel":"Ctrl+Enter to save, Esc to cancel",ri=r=>{const t=typeof r=="string"?new Date(r):r,a=new Date().getTime()-t.getTime(),n=Math.floor(a/6e4);if(n<1)return"Just now";if(n<60)return`${n} min ago`;const s=Math.floor(n/60);return s<24?`${s}h ago`:t.toLocaleDateString()},Me=j.memo(({onClick:r,icon:t,label:o,className:a,isActive:n=!1,disabled:s=!1,showSuccessFeedback:l=!1,successIcon:c=i.Check,successDuration:d=2e3})=>{const[x,p]=j.useState(!1),f=j.useCallback(async()=>{if(!(!r||s))try{await r(),l&&(p(!0),setTimeout(()=>p(!1),d))}catch(g){console.error("Action failed:",g)}},[r,s,l,d]),u=x?c:t;return e.jsx("button",{className:y(Rl({isActive:n||x}),a),onClick:f,type:"button","aria-label":x?"Success":o,disabled:s,children:e.jsx(u,{size:12})})});Me.displayName="ActionButton";const So=j.memo(({branchInfo:r,onPrevious:t,onNext:o,isLoading:a=!1})=>{const n=r.currentIndex>1,s=r.currentIndex<r.totalBranches;return r.totalBranches<=1?null:e.jsxs("div",{className:y(Zl()),children:[e.jsx("button",{type:"button",className:y(tt()),onClick:t,disabled:!n||a,"aria-label":"Previous version",children:e.jsx(i.ChevronLeft,{size:14})}),e.jsxs("span",{className:y(Xl()),children:[r.currentIndex," / ",r.totalBranches]}),e.jsx("button",{type:"button",className:y(tt()),onClick:o,disabled:!s||a,"aria-label":"Next version",children:e.jsx(i.ChevronRight,{size:14})})]})});So.displayName="BranchNavigator";const ti=()=>{const[r,t]=j.useState(0);return j.useEffect(()=>{const o=setInterval(()=>{t(a=>a+1)},2500);return()=>clearInterval(o)},[]),e.jsx("div",{className:y(Dl()),children:e.jsx(Rr,{size:28,colorVariant:"lightTeal",animated:!0,animationDuration:2},r)})},ko=j.forwardRef(({className:r,variant:t="user",heading:o,children:a,isLoading:n,timestamp:s,hideAvatar:l=!1,showTimestamp:c=!1,isSticky:d=!1,isInitialPrompt:x=!1,alignment:p,actions:f=Jl,enableCopy:u=!1,copyIcon:g,onCopySuccess:m,enableEdit:h=!1,isEditing:v,initialEditContent:w,onEditStart:k,onEditCancel:$,onEditSave:z,isSaving:C=!1,branchInfo:T,onPreviousBranch:I,onNextBranch:L,isBranchLoading:F=!1,withTimer:S=!1,senderName:N,senderAvatar:B,senderTime:E,...V},H)=>{const W=ql(S&&!E?s:void 0),O=E||W,M=j.useRef(null),D=j.useRef(null),[_,fe]=j.useState(!1),[re,K]=j.useState(!1),[U,ne]=j.useState(w??""),Q=v??re,Z=p??(t==="user"?x?"center":"right":"left"),ve=j.useCallback(()=>M.current?M.current.innerText:typeof a=="string"?a:"",[a]),Se=j.useCallback(()=>{if(v===void 0){const G=w??ve();ne(G),K(!0)}k==null||k()},[w,ve,v,k]),ue=j.useCallback(()=>{v===void 0&&K(!1),ne(""),$==null||$()},[v,$]),ye=j.useCallback(async()=>{if(!(!(U!=null&&U.trim())||C)&&U.trim()!==(w==null?void 0:w.trim()))try{await(z==null?void 0:z(U)),v===void 0&&K(!1),ne("")}catch(G){console.error("Failed to save edit:",G)}},[U,C,z,v,w]),ke=j.useCallback(G=>{G.key==="Escape"?ue():G.key==="Enter"&&(G.metaKey||G.ctrlKey)&&(G.preventDefault(),ye())},[ue,ye]),Pr=j.useRef(!1),Er=j.useRef(w);j.useEffect(()=>{Er.current=w},[w]),j.useEffect(()=>{const G=Pr.current;if(Pr.current=Q,Q&&!G){const Pe=w||Er.current||ve()||"";ne(Pe)}else!Q&&G&&ne("")},[Q,w,ve]),j.useEffect(()=>{if(Q&&D.current){D.current.focus();const G=D.current.value.length;D.current.setSelectionRange(G,G)}},[Q]);const ca=j.useCallback(async()=>{if(!M.current)return;const G=M.current.innerText;try{navigator.clipboard&&navigator.clipboard.writeText?(await navigator.clipboard.writeText(G),fe(!0),m==null||m(),setTimeout(()=>{fe(!1)},2e3)):console.warn("Clipboard API not available")}catch(Pe){console.error("Failed to copy:",Pe)}},[m]),da=j.useCallback(G=>{ne(G.target.value)},[]),Vr=j.useMemo(()=>f.length>0||u||h&&t==="user",[f.length,u,h,t]),Hr=j.useMemo(()=>!d&&!Q&&(t==="user"||t==="assistant")&&Vr,[d,Q,t,Vr]),_r=j.useMemo(()=>!Q&&T&&T.totalBranches>1&&t==="user",[Q,T,t]);return t==="loader"||n?e.jsx("div",{ref:H,className:y(br({variant:"loader",alignment:"left",isEditing:!1}),r),...V,children:e.jsx("div",{className:y(Qr({variant:"loader",isSticky:d})),children:e.jsx(ti,{})})}):Q&&t==="user"?e.jsxs("div",{ref:H,className:y(br({variant:t,alignment:"right",isEditing:!0}),"group",r),...V,children:[e.jsx("div",{className:y(Hl()),children:e.jsx("textarea",{ref:D,value:U,onChange:da,onKeyDown:ke,className:y(_l()),placeholder:"Edit your message...",disabled:C,"aria-label":"Edit message"})}),e.jsxs("div",{className:y(rt({variant:t}),"opacity-100 justify-between"),children:[e.jsx("span",{className:y(Ol()),children:ei}),e.jsxs("div",{className:"flex",children:[e.jsx(Me,{onClick:ye,icon:i.Check,label:"Save",disabled:C||!(U!=null&&U.trim())||U.trim()===(w==null?void 0:w.trim())}),e.jsx(Me,{onClick:ue,icon:i.X,label:"Cancel",disabled:C})]})]})]}):e.jsxs("div",{ref:H,className:y(br({variant:t,alignment:Z,isEditing:!1}),"group",r),...V,children:[S&&N&&e.jsxs("div",{className:y(Gl()),children:[B&&e.jsx("div",{className:y(Ul()),children:B}),e.jsx("span",{className:y(Yl()),children:N}),O&&e.jsx("span",{className:y(Kl()),children:O})]}),e.jsxs("div",{className:y(Tl()),children:[!S&&!l&&t==="assistant"&&e.jsx("div",{className:y(Fl()),children:e.jsx("div",{className:y(Bl()),children:e.jsx(Ar,{size:20,colorVariant:"lightTeal"})})}),e.jsxs("div",{className:y($l()),children:[e.jsx("div",{className:y(Qr({variant:t,isSticky:d,withTimer:S})),children:e.jsx("div",{className:y(Ll({variant:t})),ref:M,children:t==="system"?e.jsxs("div",{className:y(Wl()),children:[e.jsx("div",{className:y(Pl())}),e.jsxs("div",{className:y(El()),children:[e.jsx(i.Activity,{size:16}),e.jsx("div",{className:y(Vl())})]}),e.jsx("span",{className:y(et({variant:t})),children:a})]}):e.jsxs(e.Fragment,{children:[t==="assistant"&&o&&e.jsx("h4",{className:y(Ml()),children:o}),e.jsx("div",{className:y(et({variant:t})),children:a})]})})}),c&&s&&e.jsx("div",{className:y(Il()),children:ri(s)}),(Hr||_r)&&e.jsxs("div",{className:y(rt({variant:t}),"justify-between"),children:[e.jsx("div",{className:y(Al()),children:Hr&&e.jsxs(e.Fragment,{children:[u&&g&&e.jsx(Me,{onClick:ca,icon:_?i.Check:g,label:_?"Copied":"Copy",isActive:_}),h&&t==="user"&&e.jsx(Me,{onClick:Se,icon:i.Edit2,label:"Edit"}),f.map((G,Pe)=>e.jsx(Me,{onClick:G.onClick,icon:G.icon,label:G.label,isActive:G.isActive,showSuccessFeedback:G.showSuccessFeedback,successIcon:G.successIcon,successDuration:G.successDuration},`${G.label}-${Pe}`))]})}),_r&&T&&e.jsx(So,{branchInfo:T,onPrevious:I,onNext:L,isLoading:F})]})]})]})]})});ko.displayName="MessageBubble";const oi=b("w-full overflow-hidden rounded-full bg-[var(--color-gray-200)]",{variants:{size:{small:"h-1",medium:"h-2",large:"h-3"}},defaultVariants:{size:"medium"}}),ai=b("h-full w-full flex-1 transition-all duration-300 ease-in-out rounded-full",{variants:{variant:{default:"bg-[var(--color-blue-800)]",success:"bg-[var(--color-green-1000)]",error:"bg-[var(--color-red-1000)]",warning:"bg-[var(--color-amber-1000)]"}},defaultVariants:{variant:"default"}}),ni=b("flex justify-between mb-2 text-[var(--color-gray-800)]",{variants:{size:{small:"text-xs",medium:"text-sm",large:"text-base"}},defaultVariants:{size:"medium"}}),No=j.forwardRef(({className:r,value:t=0,max:o=100,variant:a="default",size:n="medium",showValueLabel:s=!1,label:l,valueFormatter:c,...d},x)=>{const p=Math.min(Math.max(t/o*100,0),100),f=c?c(t,o):`${Math.round(p)}%`;return e.jsxs("div",{ref:x,className:y("w-full",r),role:"progressbar","aria-valuemin":0,"aria-valuemax":o,"aria-valuenow":t,...d,children:[(l||s)&&e.jsxs("div",{className:ni({size:n}),children:[l&&e.jsx("span",{className:"font-medium",children:l}),s&&e.jsx("span",{className:"ml-auto",children:f})]}),e.jsx("div",{className:oi({size:n}),children:e.jsx("div",{className:ai({variant:a}),style:{transform:`translateX(-${100-p}%)`}})})]})});No.displayName="ProgressBar";const si=b(["w-full h-2 rounded-lg appearance-none cursor-pointer","focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","[&::-webkit-slider-thumb]:appearance-none","[&::-webkit-slider-thumb]:w-5 [&::-webkit-slider-thumb]:h-5","[&::-webkit-slider-thumb]:bg-[var(--color-white)]","[&::-webkit-slider-thumb]:border-2","[&::-webkit-slider-thumb]:rounded-full","[&::-webkit-slider-thumb]:shadow-sm","[&::-webkit-slider-thumb]:transition-all [&::-webkit-slider-thumb]:duration-200","[&::-webkit-slider-thumb]:hover:scale-110","[&::-moz-range-thumb]:w-5 [&::-moz-range-thumb]:h-5","[&::-moz-range-thumb]:bg-[var(--color-white)]","[&::-moz-range-thumb]:border-2","[&::-moz-range-thumb]:rounded-full","[&::-moz-range-thumb]:shadow-sm","[&::-moz-range-thumb]:transition-all [&::-moz-range-thumb]:duration-200","[&::-moz-range-thumb]:hover:scale-110"].join(" "),{variants:{variant:{cyan:["focus-visible:ring-[var(--color-blue-200)]","[&::-webkit-slider-thumb]:border-[var(--color-gray-200)] [&::-webkit-slider-thumb]:hover:border-[var(--color-blue-800)]","[&::-moz-range-thumb]:border-[var(--color-gray-200)] [&::-moz-range-thumb]:hover:border-[var(--color-blue-800)]"],orange:["focus-visible:ring-[var(--color-orange-200)]","[&::-webkit-slider-thumb]:border-[var(--color-gray-200)] [&::-webkit-slider-thumb]:hover:border-[var(--color-orange-800)]","[&::-moz-range-thumb]:border-[var(--color-gray-200)] [&::-moz-range-thumb]:hover:border-[var(--color-orange-800)]"]},animated:{true:["[&::-webkit-slider-thumb]:animate-pulse","[&::-moz-range-thumb]:animate-pulse"],false:[]}},defaultVariants:{variant:"cyan",animated:!1}}),zo=j.forwardRef(({className:r,variant:t="cyan",animated:o=!1,style:a,...n},s)=>{const{min:l=0,max:c=100,value:d,defaultValue:x}=n,p=Number(d??x??0),f=Number(l),u=Number(c),g=Math.min(Math.max((p-f)*100/(u-f),0),100),m=t==="orange"?"var(--color-orange-800)":"var(--color-blue-800)",h=`linear-gradient(to right, ${m} 0%, ${m} ${g}%, var(--color-gray-200) ${g}%, var(--color-gray-200) 100%)`;return e.jsx("input",{ref:s,type:"range",className:y(si({variant:t,animated:o}),r),style:{background:h,...a},...n})});zo.displayName="RangeInput";const li=b("box-border flex cursor-pointer transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2",{variants:{type:{collapsed:"flex-col items-center justify-center w-[64px] py-[6px] px-[4px] gap-[4px] rounded-[4px]",expanded:"flex-row items-center w-full h-[32px] px-[4px] py-[6px] gap-[8px] rounded-[4px]"},variant:{default:"text-[var(--color-gray-800)] hover:bg-[var(--color-gray-100)]",active:"text-[var(--color-blue-800)] bg-[var(--color-blue-200)]",brand:"h-[44px] rounded-[24px] bg-transparent hover:bg-transparent"},heightAuto:{true:"h-auto"},disabled:{true:"opacity-50 cursor-not-allowed pointer-events-none"}},compoundVariants:[{type:"collapsed",variant:"active",className:"bg-[var(--color-blue-200)]"}],defaultVariants:{type:"expanded",variant:"default",heightAuto:!1,disabled:!1}}),ii=b("relative shrink-0 flex items-center justify-center",{variants:{type:{collapsed:"size-[16px]",expanded:"size-[16px]"},variant:{default:"text-[var(--color-gray-800)]",active:"text-[var(--color-blue-800)]",brand:"text-[var(--color-blue-1000)] size-[24px]"},heightAuto:{true:"size-auto"}},defaultVariants:{type:"expanded",variant:"default",heightAuto:!1}}),ci=b("font-normal whitespace-nowrap shrink-0",{variants:{type:{collapsed:"text-[8px] leading-[10px] text-center min-w-full",expanded:"text-[14px] leading-[20px]"},variant:{default:"text-[var(--color-gray-800)]",active:"text-[var(--color-blue-800)]",brand:"hidden"}},defaultVariants:{type:"expanded",variant:"default"}}),To=j.forwardRef(({className:r,icon:t,label:o,isCollapsed:a=!1,isActive:n=!1,variant:s="default",heightAuto:l=!1,disabled:c=!1,onClick:d,children:x,...p},f)=>{const u=a?"collapsed":"expanded",g=n?"active":s,m=v=>{c||d&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),d())},h=()=>{c||d==null||d()};return e.jsxs("div",{ref:f,className:y(li({type:u,variant:g,heightAuto:l,disabled:c}),r),role:"button",tabIndex:c?-1:0,"aria-label":o,"aria-disabled":c,onClick:h,onKeyDown:m,...p,children:[t&&e.jsx("div",{className:y(ii({type:u,variant:g,heightAuto:l})),children:t}),(s!=="brand"||!a)&&e.jsx("span",{className:y(ci({type:u,variant:g})),children:o})]})});To.displayName="SidebarItem";const di=b("inline-flex items-center justify-center rounded-[4px] whitespace-nowrap transition-colors duration-200 box-border",{variants:{variant:{default:"border border-[var(--color-gray-200)] bg-[var(--color-gray-100)] px-2 py-[2px] text-[var(--color-gray-800)] gap-1",collaborator:"border border-[var(--color-gray-200)] bg-[var(--color-gray-100)] px-2 py-[2px] text-[var(--color-gray-800)] gap-1",indicator:"bg-[var(--color-gray-100)] px-[2px] h-[12px] gap-[4px] text-[var(--color-gray-600)]",highlight:"border border-[var(--color-blue-800)] bg-[var(--color-blue-800-subtle)] px-2 py-[2px] text-[var(--color-blue-1000)] gap-1",error:"bg-[var(--color-red-200)] px-[2px] h-[12px] gap-[4px] text-[var(--color-red-1000)]"}},defaultVariants:{variant:"default"}}),pi=b("w-4 h-4 rounded-full object-cover shrink-0"),ot=b("flex items-center justify-center shrink-0"),Ie=j.forwardRef(({className:r,variant:t="default",startIcon:o,endIcon:a,avatarSrc:n,onDelete:s,children:l,...c},d)=>e.jsxs("div",{ref:d,className:y(s&&"relative group",di({variant:t}),r),...c,children:[n&&e.jsx("img",{src:n,alt:"avatar",className:pi()}),o&&e.jsx("span",{className:ot(),children:o}),e.jsx(Ye,{variant:"tag",color:"inherit",className:"whitespace-nowrap",children:l}),a&&e.jsx("span",{className:ot(),children:a}),s&&e.jsx(q.motion.button,{onClick:x=>{x.stopPropagation(),s()},className:"absolute -top-[6px] -right-[6px] hidden group-hover:flex items-center justify-center bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-[8px] p-[2px] focus:outline-none focus:ring-2 focus:ring-[var(--color-blue-800)] shrink-0 z-20","aria-label":"Remove",initial:{scale:0,opacity:0},whileInView:{scale:1,opacity:1},whileHover:{scale:1.1},whileTap:{scale:.95},transition:{scale:{type:"spring",stiffness:400,damping:17},opacity:{duration:.2}},children:e.jsx(i.X,{size:10,className:"text-[var(--color-gray-800)]"})})]}));Ie.displayName="Tag";const xi=b("inline-flex items-center justify-start bg-transparent p-0 w-full",{variants:{variant:{default:"",underline:"border-b border-[var(--color-gray-200)] [&>button]:-mb-px",pills:"bg-[var(--color-gray-200)] rounded p-0.5 gap-1 w-auto",segmented:"bg-[var(--color-gray-100)] rounded-lg p-[3px] gap-[2px] w-auto","filter-pills":"gap-1.5 flex-wrap w-auto"}},defaultVariants:{variant:"default"}}),fi=b("inline-flex items-center justify-center whitespace-nowrap focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 transition-colors cursor-pointer group shrink-0",{variants:{variant:{default:'p-2 font-["Geist",system-ui,sans-serif] text-[10px] leading-4 font-normal border-b border-[var(--color-gray-200)] text-[var(--color-gray-600)] data-[state=active]:text-[var(--color-blue-1000)] data-[state=active]:border-[var(--color-blue-1000)] data-[state=inactive]:hover:bg-[var(--color-gray-100)] gap-2',underline:'p-2 font-["Geist",system-ui,sans-serif] text-[10px] leading-4 font-normal border-b border-[var(--color-gray-200)] text-[var(--color-gray-600)] data-[state=active]:text-[var(--color-blue-1000)] data-[state=active]:border-[var(--color-blue-1000)] data-[state=inactive]:hover:bg-[var(--color-gray-100)] gap-2',pills:"px-2 h-6 rounded font-body text-xs leading-4 font-light text-[var(--color-blue-1000)] border border-transparent data-[state=active]:bg-[var(--color-white)] data-[state=active]:border-[var(--color-gray-200)] data-[state=active]:shadow-sm data-[state=inactive]:hover:bg-[var(--color-gray-100)]",segmented:"py-[5px] px-3 rounded-md text-xs font-normal text-[var(--color-gray-600)] data-[state=active]:bg-[var(--color-white)] data-[state=active]:text-[var(--color-gray-1000)] data-[state=active]:font-semibold data-[state=active]:shadow-sm data-[state=inactive]:hover:text-[var(--color-gray-800)]","filter-pills":"py-1 px-3 rounded-full text-xs font-medium text-[var(--color-gray-600)] border border-[var(--color-gray-200)] data-[state=active]:bg-[rgba(21,177,205,0.09)] data-[state=active]:text-[var(--color-blue-800)] data-[state=active]:border-[rgba(21,177,205,0.25)] data-[state=inactive]:hover:bg-[var(--color-gray-100)] capitalize"}},defaultVariants:{variant:"default"}}),ui=b("mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2"),gi=b("flex items-center gap-[2px]"),at=b("group-data-[state=active]:text-[var(--color-blue-1000)]"),$o=Fe.createContext("default"),mi=Ce.Root,Lo=Fe.forwardRef(({className:r,variant:t="default",...o},a)=>e.jsx($o.Provider,{value:t,children:e.jsx(Ce.List,{ref:a,className:y(xi({variant:t}),r),...o})}));Lo.displayName=Ce.List.displayName;const Mo=Fe.forwardRef(({className:r,children:t,errorCount:o,configurationCount:a,...n},s)=>{const l=Fe.useContext($o);return e.jsxs(Ce.Trigger,{ref:s,className:y(fi({variant:l}),r),...n,children:[t,l!=="pills"&&(a!==void 0||o!==void 0)&&e.jsxs("div",{className:gi(),children:[a!==void 0&&e.jsx(Ie,{variant:"indicator",startIcon:e.jsx(i.Settings,{size:10,className:"text-[#15B1CD]"}),className:at(),children:a}),o!==void 0&&e.jsx(Ie,{variant:"indicator",startIcon:e.jsx(i.TriangleAlert,{size:10,className:"text-[#FB6060]"}),className:at(),children:o})]})]})});Mo.displayName=Ce.Trigger.displayName;const Ao=Fe.forwardRef(({className:r,...t},o)=>e.jsx(Ce.Content,{ref:o,className:y(ui(),r),...t}));Ao.displayName=Ce.Content.displayName;const hi=b("w-full bg-[var(--color-white)] border border-solid rounded-[var(--archie-radius-lg)] font-normal transition-colors duration-[var(--archie-anim-duration)] box-border focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 min-h-[80px]",{variants:{status:{default:"border-[var(--color-gray-200)] text-[var(--color-gray-600)] placeholder:text-[var(--color-gray-600)] hover:border-[var(--color-gray-500)] focus:border-[var(--color-blue-1000)] focus:text-[var(--color-blue-1000)]",error:"border-[var(--color-red-1000)] text-[var(--color-red-1000)] placeholder:text-[var(--color-red-1000)] focus:border-[var(--color-red-1000)]",success:"border-[var(--color-green-1000)] text-[var(--color-green-1000)] placeholder:text-[var(--color-green-1000)] focus:border-[var(--color-green-1000)]"},size:{medium:"px-4 py-4 text-[1rem] leading-[1.5rem]",small:"px-3 py-2 text-[0.875rem] leading-[1.25rem]",tiny:"p-2 text-[0.75rem] leading-[1rem]"},resize:{none:"resize-none",vertical:"resize-y",horizontal:"resize-x",both:"resize"}},defaultVariants:{status:"default",size:"medium",resize:"vertical"}}),bi=b("relative w-full",{variants:{size:{medium:"",small:"",tiny:""}},defaultVariants:{size:"medium"}}),Ro=j.forwardRef(({className:r,status:t="default",size:o="medium",resize:a="vertical",disabled:n,label:s,hint:l,...c},d)=>e.jsxs("div",{className:"flex flex-col gap-1",children:[s&&e.jsx("label",{className:"text-[11px] font-semibold text-[var(--color-gray-800)]",children:s}),e.jsx("div",{className:bi({size:o}),children:e.jsx("textarea",{ref:d,className:y(hi({status:t,size:o,resize:a}),r),disabled:n,...c})}),l&&e.jsx("span",{className:"text-[11px] text-[var(--color-gray-600)]",children:l})]}));Ro.displayName="TextArea";const vi=b("inline-flex items-center gap-1 font-sans whitespace-nowrap",{variants:{size:{small:"text-[0.625rem] leading-[1rem]",medium:"text-[0.75rem] leading-[1rem]",large:"text-[0.875rem] leading-[1.25rem]"},variant:{default:"text-[var(--color-gray-600)]",primary:"text-[var(--color-gray-800)]",muted:"text-[var(--color-gray-600)]"}},defaultVariants:{size:"medium",variant:"default"}}),yi=b("flex items-center justify-center shrink-0",{variants:{size:{small:"[&>svg]:w-[10px] [&>svg]:h-[10px]",medium:"[&>svg]:w-[12px] [&>svg]:h-[12px]",large:"[&>svg]:w-[14px] [&>svg]:h-[14px]"}},defaultVariants:{size:"medium"}}),ji=(r,t)=>{const o=t.getTime()-r.getTime(),a=Math.floor(o/1e3),n=Math.floor(a/60),s=Math.floor(n/60),l=Math.floor(s/24),c=Math.floor(l/7),d=Math.floor(l/30),x=Math.floor(l/365),p=o<0,f=Math.abs(a),u=Math.abs(n),g=Math.abs(s),m=Math.abs(l),h=Math.abs(c),v=Math.abs(d),w=Math.abs(x),k=($,z)=>{const C=$===1?"":"s";return p?`in ${$} ${z}${C}`:`${$} ${z}${C} ago`};return f<60?"just now":u<60?k(u,"minute"):g<24?k(g,"hour"):m===1?p?"tomorrow":"yesterday":m<7?k(m,"day"):h<4?k(h,"week"):v<12?k(v,"month"):k(w,"year")},wi=(r,t,o)=>{switch(t){case"relative":return ji(r,new Date);case"short":return r.toLocaleDateString(o,{month:"short",day:"numeric",year:"numeric"});case"long":return r.toLocaleDateString(o,{month:"long",day:"numeric",year:"numeric"});case"time":return r.toLocaleTimeString(o,{hour:"numeric",minute:"2-digit",hour12:!0});case"datetime":return r.toLocaleDateString(o,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0});default:return r.toLocaleDateString(o)}},Ci=r=>r instanceof Date?r:typeof r=="number"?new Date(r):new Date(r),Fo=j.forwardRef(({className:r,date:t,format:o="relative",size:a="medium",variant:n="default",showIcon:s=!1,locale:l="en-US",...c},d)=>{const x=j.useMemo(()=>Ci(t),[t]),p=j.useMemo(()=>wi(x,o,l),[x,o,l]),f=j.useMemo(()=>x.toISOString(),[x]),u=n==="primary"?"var(--color-gray-800)":"var(--color-gray-600)",g=a==="small"?10:a==="large"?14:12;return e.jsxs("time",{ref:d,dateTime:f,className:y(vi({size:a,variant:n}),r),...c,children:[s&&e.jsx("span",{className:yi({size:a}),children:e.jsx(i.ClockHistory,{size:g,color:u})}),p]})});Fo.displayName="Timestamp";const Si=b("flex min-w-[420px] w-fit max-w-[850px] pl-4 pr-3 py-3 rounded-[var(--archie-radius-xl)] [box-shadow:var(--archie-shadow-lg)] border pointer-events-auto gap-2 relative items-center bg-white",{variants:{variant:{info:"bg-[linear-gradient(90deg,rgba(21,177,205,0.08)_0%,rgba(21,177,205,0.08)_100%),linear-gradient(90deg,rgb(255,255,255)_0%,rgb(255,255,255)_100%)] border-[var(--color-blue-800)]",success:"bg-[linear-gradient(90deg,rgba(113,212,129,0.08)_0%,rgba(113,212,129,0.08)_100%),linear-gradient(90deg,rgb(255,255,255)_0%,rgb(255,255,255)_100%)] border-[var(--color-green-1000)]",warning:"bg-[linear-gradient(90deg,rgba(242,229,40,0.08)_0%,rgba(242,229,40,0.08)_100%),linear-gradient(90deg,rgb(255,255,255)_0%,rgb(255,255,255)_100%)] border-[var(--color-orange-800)]",error:"bg-[linear-gradient(90deg,rgba(251,96,96,0.08)_0%,rgba(251,96,96,0.08)_100%),linear-gradient(90deg,rgb(255,255,255)_0%,rgb(255,255,255)_100%)] border-[var(--color-red-1000)]",prompt:"bg-[var(--color-gray-50)] border-[var(--color-blue-1000)]",loading:"bg-[linear-gradient(90deg,rgba(21,177,205,0.06)_0%,rgba(21,177,205,0.06)_100%),linear-gradient(90deg,rgb(255,255,255)_0%,rgb(255,255,255)_100%)] border-[var(--color-blue-800)]"}},defaultVariants:{variant:"info"}}),ki=b("flex-shrink-0",{variants:{variant:{info:"text-[var(--color-blue-800)]",success:"text-[var(--color-green-1000)]",warning:"text-[var(--color-orange-800)]",error:"text-[var(--color-red-1000)]",prompt:"text-[var(--color-blue-1000)]",loading:"text-[var(--color-blue-800)]"}},defaultVariants:{variant:"info"}}),Ni=b("flex flex-col gap-0.5 flex-1 min-w-0 overflow-hidden"),zi=b("font-bold text-[var(--color-blue-1000)] text-[0.75rem] leading-normal whitespace-nowrap"),Ti=b("font-normal text-[var(--color-gray-600)] text-[0.6875rem] leading-normal line-clamp-2"),$i=b("flex items-center gap-2 shrink-0"),Li=b("w-[1px] self-stretch flex-shrink-0 bg-current",{variants:{variant:{info:"text-[var(--color-blue-800)]",success:"text-[var(--color-green-1000)]",warning:"text-[var(--color-orange-800)]",error:"text-[var(--color-red-1000)]",prompt:"text-[var(--color-blue-1000)]",loading:"text-[var(--color-blue-800)]"}},defaultVariants:{variant:"info"}}),Mi=b("p-0 bg-transparent border-none text-[var(--color-blue-1000)] hover:opacity-70 transition-opacity flex items-center justify-center w-4 h-4 shrink-0 cursor-pointer rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2"),Ai={info:i.Info,success:i.CheckCircle,warning:i.TriangleAlert,error:i.AlertCircle,prompt:i.Sparks,loading:null},Ri={info:"var(--color-blue-800)",success:"var(--color-green-1000)",warning:"var(--color-orange-800)",error:"var(--color-red-1000)",prompt:"var(--color-blue-800)",loading:"var(--color-blue-800)"},he=({id:r,variant:t="info",title:o,description:a,icon:n,action:s,secondaryAction:l,onClose:c})=>{const d=Ai[t],x=Ri[t],p=()=>{c&&c(),r&&ie.toast.dismiss(r)},f=g=>m=>{g(m),r&&ie.toast.dismiss(r)},u=()=>n||(t==="loading"?e.jsx("svg",{className:"animate-spin",width:16,height:16,viewBox:"0 0 16 16",fill:"none",children:e.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:x,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"28",strokeDashoffset:"8"})}):t==="success"?e.jsx(i.CheckCircle,{size:16,color:x}):t==="error"?e.jsx(i.AlertCircle,{size:16,color:x}):t==="prompt"?e.jsx(i.Sparks,{size:16,color:x}):d?e.jsx(d,{size:16}):null);return e.jsxs("div",{className:y(Si({variant:t})),role:"alert",children:[e.jsx("div",{className:ki({variant:t}),children:u()}),e.jsxs("div",{className:Ni(),children:[e.jsx("span",{className:zi(),children:o}),a&&e.jsx("span",{className:Ti(),children:a})]}),e.jsx("div",{className:Li({variant:t})}),e.jsxs("div",{className:$i(),children:[l&&e.jsx(Be,{onClick:f(l.onClick),variant:"ghost",size:"sm",leftIcon:l.icon||e.jsx(i.Trash,{size:13,color:"currentColor"}),className:"w-auto",children:l.label}),s&&e.jsx(Be,{onClick:f(s.onClick),variant:"default",size:"sm",leftIcon:s.icon||e.jsx(i.Check,{size:13,color:"currentColor"}),className:"w-auto",children:s.label}),e.jsx("button",{onClick:p,className:Mi(),"aria-label":"Close",children:e.jsx(i.X,{size:16})})]})]})},Fi=({position:r="bottom-right",offset:t=24,gap:o=8,width:a,...n})=>e.jsx(ie.Toaster,{position:r,offset:t,gap:o,toastOptions:{unstyled:!0,classNames:{toast:y("bg-transparent p-0",a?"":"w-auto")},style:a?{width:typeof a=="number"?`${a}px`:a}:void 0},...n}),Bi={success:(r,t,o)=>ie.toast.custom(a=>e.jsx(he,{id:a,variant:"success",title:r,description:t,action:o})),error:(r,t,o)=>ie.toast.custom(a=>e.jsx(he,{id:a,variant:"error",title:r,description:t,action:o})),warning:(r,t,o)=>ie.toast.custom(a=>e.jsx(he,{id:a,variant:"warning",title:r,description:t,action:o})),info:(r,t,o)=>ie.toast.custom(a=>e.jsx(he,{id:a,variant:"info",title:r,description:t,action:o})),prompt:(r,t,o,a)=>ie.toast.custom(n=>e.jsx(he,{id:n,variant:"prompt",title:r,description:t,action:o,secondaryAction:a})),loading:(r,t)=>ie.toast.custom(o=>e.jsx(he,{id:o,variant:"loading",title:r,description:t})),custom:r=>ie.toast.custom(t=>e.jsx(he,{id:t,...r}))},Ii=b("flex items-center justify-between w-full",{variants:{size:{s:"h-10",m:"min-h-[48px]",l:"min-h-[48px]"}},defaultVariants:{size:"l"}}),Di=b("select-none",{variants:{size:{s:"text-[var(--color-blue-1000)]",m:"font-medium text-[var(--color-gray-1000)]",l:"font-medium text-[var(--color-gray-1000)]"}},defaultVariants:{size:"l"}}),Wi=b("relative inline-flex shrink-0 cursor-pointer items-center rounded-full transition-colors duration-[var(--archie-anim-duration)] ease-[var(--archie-anim-easing)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{enabled:{true:"bg-[var(--color-blue-800)]",false:"bg-[var(--color-gray-200)]"},size:{s:"h-4 w-7",m:"h-5 w-9",l:"h-6 w-11"}},defaultVariants:{enabled:!1,size:"l"}}),Pi=b("pointer-events-none inline-block transform rounded-full bg-white ring-0 transition duration-[var(--archie-anim-duration)] ease-[var(--archie-anim-easing)]",{variants:{enabled:{true:"",false:""},size:{s:"h-3 w-3 shadow-sm",m:"h-4 w-4 shadow",l:"h-5 w-5 shadow-lg"}},compoundVariants:[{enabled:!1,size:"s",class:"translate-x-0.5"},{enabled:!0,size:"s",class:"translate-x-[14px]"},{enabled:!1,size:"m",class:"translate-x-0.5"},{enabled:!0,size:"m",class:"translate-x-[18px]"},{enabled:!1,size:"l",class:"translate-x-0.5"},{enabled:!0,size:"l",class:"translate-x-[22px]"}],defaultVariants:{enabled:!1,size:"l"}}),Ei=b("font-bold uppercase text-[var(--color-gray-600)]",{variants:{size:{s:"text-[10px] w-5",m:"text-[10px] w-5",l:"text-xs w-6"}},defaultVariants:{size:"l"}}),Vi={s:"x-small",m:"small",l:"small"},Bo=j.forwardRef(({enabled:r,onChange:t,label:o,size:a="l",showStatusLabel:n=!1,className:s,disabled:l,...c},d)=>e.jsxs("div",{className:y(Ii({size:a}),s),children:[o&&e.jsx(Ye,{variant:Vi[a],className:Di({size:a}),children:o}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{ref:d,type:"button",role:"switch","aria-checked":r,disabled:l,onClick:()=>!l&&t(!r),className:Wi({enabled:r,size:a}),...c,children:e.jsx("span",{className:Pi({enabled:r,size:a})})}),n&&e.jsx("span",{className:Ei({size:a}),children:r?"ON":"OFF"})]})]}));Bo.displayName="Toggle";const Hi=b("flex items-center justify-between w-full gap-2 min-h-[20px]"),_i=b("text-xs font-normal font-sans leading-4 whitespace-nowrap",{variants:{status:{success:"text-[var(--color-gray-800)]",warning:"text-[var(--color-gray-800)]",error:"text-[var(--color-gray-800)]",info:"text-[var(--color-gray-800)]",neutral:"text-[var(--color-gray-800)]",loading:"text-[var(--color-gray-800)]"}},defaultVariants:{status:"neutral"}}),Oi={success:"var(--color-green-1000)",warning:"var(--color-orange-800)",error:"var(--color-red-1000)",info:"var(--color-blue-800)",neutral:"var(--color-gray-600)",loading:"var(--color-blue-800)"},Io=j.forwardRef(({className:r,status:t="neutral",message:o,...a},n)=>{const s=t==="loading"?"info":t,l=Oi[t],c=()=>t==="loading"?e.jsx(i.Loader,{size:16,color:l,className:"animate-spin"}):t==="success"?e.jsx(i.CheckCircle,{size:16,color:l}):t==="warning"?e.jsx(i.TriangleAlert,{size:16,color:l}):t==="error"?e.jsx(i.AlertCircle,{size:16,color:l}):t==="info"?e.jsx(i.Info,{size:16,color:l}):null;return e.jsxs("div",{ref:n,className:y(Hi(),r),...a,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Mr,{variant:s,size:"small"}),e.jsx("span",{className:_i({status:t}),children:o})]}),e.jsx("div",{className:"w-4 h-4 flex items-center justify-center",children:c()})]})});Io.displayName="StatusMessage";const Gi=b("inline-flex items-center px-[10px] py-[3px] rounded-full text-[11px] font-semibold whitespace-nowrap shrink-0",{variants:{status:{draft:"bg-[var(--color-gray-200)] text-[var(--color-gray-800)]",provisional:"bg-[#fef9c3] text-[#854d0e]",final:"bg-[var(--color-green-200)] text-[var(--color-green-1000)]"}},defaultVariants:{status:"draft"}}),Ui={draft:"Draft",provisional:"Provisional",final:"Final"};function Yi({title:r,subtitle:t,period:o,asAtDate:a,generatedAt:n,status:s,renderMode:l="web",className:c}){const d=l==="pdf",x=l==="excel",p=l==="web"&&s,f=l==="web"&&n,u=d?"12px 16px":x?"8px":"20px 24px",g=d?"18px":"20px";return e.jsxs("div",{className:y("flex items-start justify-between gap-4 bg-[var(--color-white)] border-b border-[var(--color-gray-200)]",c),style:{padding:u},children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("h1",{className:"m-0 font-bold leading-[1.25] text-[var(--color-gray-1000)]",style:{fontSize:g},children:r}),t&&e.jsx("p",{className:"m-0 text-[13px] text-[var(--color-gray-800)]",children:t}),e.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[o&&e.jsx("span",{className:"text-[12px] text-[var(--color-gray-600)]",children:o}),a&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-[12px] text-[var(--color-gray-200)]",children:"·"}),e.jsxs("span",{className:"text-[12px] text-[var(--color-gray-600)]",children:["As at ",a]})]}),o&&f&&e.jsx("span",{className:"text-[12px] text-[var(--color-gray-200)]",children:"·"}),f&&e.jsxs("span",{className:"text-[12px] text-[var(--color-gray-600)]",children:["Generated ",n]})]})]}),p&&e.jsx("span",{className:Gi({status:s}),children:Ui[s]??s})]})}const Ki={2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4"},er={up:"var(--color-green-1000)",down:"var(--color-red-1000)",flat:"var(--color-gray-800)",warning:"var(--color-amber-1000)"},rr="Geist Mono, ui-monospace, monospace";function Zi({items:r,columns:t=4,renderMode:o="web",className:a}){if(o==="pdf"||o==="excel")return e.jsx("table",{className:y(a),style:{width:"100%",borderCollapse:"collapse",border:o==="pdf"?"1px solid var(--color-gray-200)":void 0},children:e.jsx("tbody",{children:e.jsx("tr",{children:r.map((s,l)=>e.jsxs("td",{style:{padding:"8px 12px",verticalAlign:"top",borderRight:l<r.length-1?"1px solid var(--color-gray-200)":void 0},children:[e.jsx("div",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-gray-600)"},children:s.label}),e.jsx("div",{style:{fontSize:16,fontWeight:300,fontFamily:rr,fontVariantNumeric:"tabular-nums",letterSpacing:"-0.02em",color:"var(--color-gray-1000)",lineHeight:1.3,marginTop:2},children:s.value}),s.delta&&e.jsx("div",{style:{fontSize:11,fontWeight:600,fontFamily:rr,color:er[s.deltaDir??"flat"]??er.flat,marginTop:1},children:s.delta})]},l))})})});const n=Ki[t]??"grid-cols-4";return e.jsx("div",{className:y(`grid ${n} gap-3`,a),children:r.map((s,l)=>e.jsxs("div",{className:"bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-xl flex flex-col gap-1.5",style:{padding:"18px 20px"},children:[e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.08em] text-[var(--color-gray-600)]",children:s.label}),e.jsx("div",{className:"text-[22px] font-light leading-none text-[var(--color-gray-1000)]",style:{fontFamily:rr,fontVariantNumeric:"tabular-nums",letterSpacing:"-0.02em"},children:s.value}),s.delta&&e.jsx("div",{className:"text-[11px] font-semibold",style:{fontFamily:rr,color:er[s.deltaDir??"flat"]??er.flat},children:s.delta})]},l))})}const nt={up:"var(--color-green-1000)",down:"var(--color-red-1000)",flat:"var(--color-gray-800)",warning:"var(--color-amber-1000)"};function Xi({label:r,value:t,delta:o,deltaDir:a="flat",subtext:n,renderMode:s="web",className:l}){const c=s==="pdf",d=c?"20px":"28px",x=c?"12px 16px":"18px 20px";return e.jsxs("div",{className:y("bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-xl flex flex-col gap-1.5",l),style:{padding:x},children:[e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.08em] text-[var(--color-gray-600)]",children:r}),e.jsx("div",{className:"font-light leading-none text-[var(--color-gray-1000)]",style:{fontSize:d,fontFamily:"Geist Mono, ui-monospace, monospace",fontVariantNumeric:"tabular-nums",letterSpacing:"-0.02em"},children:t}),o&&e.jsx("div",{className:"text-[12px] font-semibold",style:{fontFamily:"Geist Mono, ui-monospace, monospace",color:nt[a]??nt.flat},children:o}),n&&e.jsx("div",{className:"text-[11px] text-[var(--color-gray-600)]",children:n})]})}function qi({title:r,body:t,actions:o,renderMode:a="web",className:n}){const s=a==="web"&&o&&o.length>0,l=a==="pdf"?"16px 20px":"20px 24px";return e.jsxs("div",{className:y("bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-xl flex flex-col gap-3",n),style:{padding:l},children:[r&&e.jsx("h3",{className:"m-0 text-[15px] font-semibold text-[var(--color-gray-1000)]",children:r}),t&&e.jsx("p",{className:"m-0 text-[13px] leading-[1.6] text-[var(--color-gray-800)]",children:t}),s&&e.jsx("div",{className:"flex gap-2 flex-wrap",children:o.map((c,d)=>e.jsx("button",{onClick:c.onClick,className:"px-4 py-1.5 border border-[var(--color-gray-200)] rounded-lg bg-[var(--color-gray-50)] text-[var(--color-gray-1000)] text-[13px] font-medium cursor-pointer hover:bg-[var(--color-gray-100)] transition-colors duration-150",children:c.label},d))})]})}const Ji=b("flex gap-3 rounded-[10px] border items-start",{variants:{variant:{info:"bg-[var(--color-blue-200)] border-[var(--color-blue-400)]",success:"bg-[#f0fdf4] border-[#bbf7d0]",warning:"bg-[#fefce8] border-[#fde68a]",error:"bg-[var(--color-red-200)] border-[#fecaca]"}},defaultVariants:{variant:"info"}}),Qi={info:"ℹ",success:"✓",warning:"⚠",error:"✕"},st={info:"#1e40af",success:"#166534",warning:"#854d0e",error:"#991b1b"},lt={info:"#3b82f6",success:"#16a34a",warning:"#d97706",error:"#dc2626"},ec={info:"var(--color-blue-400)",success:"#bbf7d0",warning:"#fde68a",error:"#fecaca"};function rc({variant:r="info",title:t,message:o,action:a,renderMode:n="web",className:s}){const l=n==="web"&&a,c=n==="pdf"?"10px 14px":"12px 16px";return e.jsxs("div",{className:y(Ji({variant:r}),s),style:{padding:c},children:[e.jsx("span",{className:"text-[14px] shrink-0 mt-[1px]",style:{color:lt[r]},children:Qi[r]}),e.jsxs("div",{className:"flex-1 flex flex-col gap-[2px]",children:[e.jsx("span",{className:"text-[13px] font-semibold",style:{color:st[r]},children:t}),o&&e.jsx("span",{className:"text-[12px]",style:{color:lt[r]},children:o})]}),l&&e.jsx("button",{onClick:a.onClick,className:"text-[12px] font-medium cursor-pointer bg-transparent shrink-0",style:{padding:"4px 12px",border:`1px solid ${ec[r]}`,borderRadius:6,color:st[r]},children:a.label})]})}function tc({title:r,description:t,action:o,className:a}){return e.jsxs("div",{className:y("flex flex-col items-center justify-center gap-3 text-center",a),style:{padding:"48px 24px"},children:[e.jsx("div",{className:"w-10 h-10 rounded-full bg-[var(--color-gray-50)] border border-[var(--color-gray-200)] flex items-center justify-center text-[18px] text-[var(--color-gray-600)]",children:"○"}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("h3",{className:"m-0 text-[15px] font-semibold text-[var(--color-gray-1000)]",children:r}),t&&e.jsx("p",{className:"m-0 text-[13px] text-[var(--color-gray-800)]",style:{maxWidth:360},children:t})]}),o&&e.jsx("button",{onClick:o.onClick,className:"px-5 py-2 border-none rounded-lg bg-[var(--color-blue-1000)] text-[var(--color-white)] text-[13px] font-semibold cursor-pointer hover:opacity-90 transition-opacity duration-150",children:o.label})]})}const tr={up:"var(--color-green-1000)",down:"var(--color-red-1000)",flat:"var(--color-gray-800)"},it="Geist Mono, ui-monospace, monospace";function oc({items:r,renderMode:t="web",className:o}){return t==="pdf"||t==="excel"?e.jsx("div",{className:y("flex items-center gap-4 flex-wrap",o),style:{padding:"6px 0",fontSize:12,color:"var(--color-gray-800)"},children:r.map((a,n)=>e.jsxs("span",{style:{whiteSpace:"nowrap"},children:[e.jsxs("span",{style:{fontWeight:600,color:"var(--color-gray-600)",marginRight:4},children:[a.label,":"]}),e.jsx("span",{style:{fontFamily:it,fontVariantNumeric:"tabular-nums",fontWeight:600,color:tr[a.direction??"flat"]??tr.flat},children:a.value}),n<r.length-1&&e.jsx("span",{style:{margin:"0 4px",color:"var(--color-gray-400)"},children:"|"})]},n))}):e.jsx("div",{className:y("flex items-stretch bg-[var(--color-gray-50)] border border-[var(--color-gray-200)] rounded-lg overflow-hidden",o),children:r.map((a,n)=>e.jsxs("div",{className:"flex-1 flex flex-col gap-1",style:{padding:"12px 16px",borderLeft:n>0?"1px solid var(--color-gray-200)":void 0},children:[e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-[0.08em] text-[var(--color-gray-600)]",children:a.label}),e.jsx("span",{className:"text-[16px] font-semibold",style:{fontFamily:it,fontVariantNumeric:"tabular-nums",color:tr[a.direction??"flat"]??tr.flat},children:a.value})]},n))})}const ac={default:"bg-[var(--color-white)] border border-[var(--color-gray-200)]",highlighted:"bg-[var(--color-gray-50)] border border-[var(--color-gray-200)]",audit:"bg-[#fffbeb] border border-[#fde68a]"};function nc({content:r,author:t,authorRole:o,date:a,sectionLabel:n,expandable:s=!1,defaultExpanded:l=!0,variant:c="default",renderMode:d="web",className:x}){const[p,f]=j.useState(l),g=d==="web"&&s&&r.length>200;return e.jsxs("div",{className:y("rounded-xl flex flex-col gap-3",ac[c],x),style:{padding:d==="pdf"?"12px 16px":"16px 20px"},children:[n&&e.jsx("p",{className:"m-0 text-[10px] font-bold uppercase tracking-[0.08em] text-[var(--color-gray-600)]",children:n}),e.jsx("p",{className:y("m-0 text-[13px] leading-[1.65] text-[var(--color-gray-800)]",!p&&g&&"line-clamp-3"),children:r}),g&&e.jsx("button",{onClick:()=>f(m=>!m),className:"self-start text-[12px] font-medium text-[var(--color-blue-800)] hover:text-[var(--color-blue-1000)] cursor-pointer transition-colors duration-150 bg-transparent border-none p-0",children:p?"Show less":"Read more"}),(t||a)&&e.jsxs("div",{className:"flex items-center gap-2 pt-1 border-t border-[var(--color-gray-200)] mt-1 flex-wrap",children:[t&&e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"w-5 h-5 rounded-full bg-[var(--color-blue-1000)] flex items-center justify-center text-[9px] font-bold text-[var(--color-white)] shrink-0","aria-hidden":"true",children:t.split(" ").map(m=>m[0]).join("").slice(0,2).toUpperCase()}),e.jsx("span",{className:"text-[12px] font-medium text-[var(--color-gray-1000)]",children:t}),o&&e.jsxs("span",{className:"text-[12px] text-[var(--color-gray-600)]",children:["· ",o]})]}),a&&e.jsx("span",{className:"text-[12px] text-[var(--color-gray-600)] ml-auto",children:a})]})]})}function sc({label:r,description:t,sectionNumber:o,children:a,noBorder:n=!1,renderMode:s="web",className:l}){const c=s==="pdf",x=c||s==="excel";return e.jsxs("section",{className:y("flex flex-col",x?"gap-2":"gap-4",!n&&(x?"border-t border-[var(--color-gray-200)] pt-4":"border-t border-[var(--color-gray-200)] pt-6"),l),children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("h2",{className:"m-0 uppercase flex items-center gap-2",style:{fontSize:c?11:13,fontWeight:700,color:"var(--color-gray-1000)",letterSpacing:"0.08em",borderLeft:c?"3px solid var(--color-blue-800)":void 0,paddingLeft:c?8:void 0},children:[o&&e.jsx("span",{className:"tabular-nums",children:o}),r]}),t&&e.jsx("p",{className:"m-0 text-[13px] text-[var(--color-gray-800)]",children:t})]}),a&&e.jsx("div",{className:y("flex flex-col",x?"gap-2":"gap-4"),children:a})]})}const lc={month:"Monthly",quarter:"Quarterly",year:"Annual",custom:"Custom"},ct="inline-flex items-center justify-center w-7 h-7 rounded-md border border-[var(--color-gray-200)] bg-[var(--color-white)] text-[var(--color-gray-800)] hover:bg-[var(--color-gray-100)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors duration-150 cursor-pointer";function ic({current:r,available:t=[],format:o,availableFormats:a=[],onPeriodChange:n,onFormatChange:s,hasPrev:l=!0,hasNext:c=!1,compact:d=!1,className:x}){const p=t.findIndex(g=>g.id===r.id),f=()=>{if(!l)return;const g=p>0?t[p-1]:null;g&&(n==null||n(g.id))},u=()=>{if(!c)return;const g=p<t.length-1?t[p+1]:null;g&&(n==null||n(g.id))};return e.jsxs("div",{className:y("flex items-center gap-2 flex-wrap",d?"gap-1":"gap-2",x),children:[e.jsx("button",{className:ct,disabled:!l,onClick:f,"aria-label":"Previous period",title:"Previous period",children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M7.5 2L3.5 6L7.5 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),t.length>1?e.jsx("select",{className:y("border border-[var(--color-gray-200)] rounded-md bg-[var(--color-white)] text-[var(--color-gray-1000)] font-medium cursor-pointer hover:bg-[var(--color-gray-100)] transition-colors duration-150 appearance-none text-center",d?"text-[12px] px-2 py-1":"text-[13px] px-3 py-1.5"),value:r.id,onChange:g=>n==null?void 0:n(g.target.value),"aria-label":"Select period",children:t.map(g=>e.jsx("option",{value:g.id,children:g.label},g.id))}):e.jsx("span",{className:y("font-semibold text-[var(--color-gray-1000)] min-w-[80px] text-center",d?"text-[12px]":"text-[13px]"),children:r.label}),e.jsx("button",{className:ct,disabled:!c,onClick:u,"aria-label":"Next period",title:"Next period",children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4.5 2L8.5 6L4.5 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),a.length>1&&o&&e.jsx("div",{className:"flex items-center border border-[var(--color-gray-200)] rounded-md overflow-hidden bg-[var(--color-white)]",role:"group","aria-label":"Period format",children:a.map(g=>e.jsx("button",{onClick:()=>s==null?void 0:s(g),className:y("cursor-pointer transition-colors duration-150",d?"px-2 py-1 text-[11px]":"px-3 py-1.5 text-[12px]",g===o?"bg-[var(--color-gray-1000)] text-[var(--color-white)] font-semibold":"text-[var(--color-gray-800)] hover:bg-[var(--color-gray-100)]"),"aria-pressed":g===o,children:lc[g]},g))})]})}const cc=b("flex items-center",{variants:{variant:{default:"border border-[var(--color-gray-200)] rounded-md overflow-hidden bg-[var(--color-white)]",pills:"gap-1"}},defaultVariants:{variant:"default"}}),dc=b("cursor-pointer transition-colors duration-150 font-medium whitespace-nowrap disabled:opacity-40 disabled:cursor-not-allowed",{variants:{variant:{default:"px-3 py-1.5 text-[12px]",pills:"px-3 py-1 text-[12px] rounded-full border"},active:{true:"",false:""}},compoundVariants:[{variant:"default",active:!0,className:"bg-[var(--color-gray-1000)] text-[var(--color-white)]"},{variant:"default",active:!1,className:"text-[var(--color-gray-800)] hover:bg-[var(--color-gray-100)]"},{variant:"pills",active:!0,className:"bg-[var(--color-blue-1000)] border-[var(--color-blue-1000)] text-[var(--color-white)]"},{variant:"pills",active:!1,className:"bg-[var(--color-white)] border-[var(--color-gray-200)] text-[var(--color-gray-800)] hover:bg-[var(--color-gray-100)]"}],defaultVariants:{variant:"default",active:!1}});function pc({modes:r,activeMode:t,onModeChange:o,variant:a="default",compact:n=!1,className:s}){return e.jsx("div",{className:y(cc({variant:a}),s),role:"group","aria-label":"Comparison mode",children:r.map(l=>{const c=l.id===t,d=n&&l.shortLabel?l.shortLabel:l.label;return e.jsx("button",{onClick:()=>!l.disabled&&(o==null?void 0:o(l.id)),disabled:l.disabled,className:dc({variant:a,active:c}),"aria-pressed":c,children:d},l.id)})})}const xc={pdf:{label:"PDF",icon:"⬇"},excel:{label:"Excel",icon:"⬇"},csv:{label:"CSV",icon:"⬇"},print:{label:"Print",icon:"⎙"}};function fc({actions:r,label:t,size:o="md",className:a}){const n=y("inline-flex items-center gap-1.5 border border-[var(--color-gray-200)] rounded-md bg-[var(--color-white)] text-[var(--color-gray-800)] font-medium cursor-pointer hover:bg-[var(--color-gray-100)] active:bg-[var(--color-gray-200)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors duration-150",o==="sm"?"px-2 py-1 text-[11px]":"px-3 py-1.5 text-[12px]");return e.jsxs("div",{className:y("flex items-center gap-2 flex-wrap",a),children:[t&&e.jsx("span",{className:"text-[12px] text-[var(--color-gray-600)] font-medium mr-1",children:t}),r.map(s=>{const l=xc[s.format],c=s.label??l.label;return e.jsxs("button",{onClick:s.onClick,disabled:s.disabled,className:n,"aria-label":`Export as ${c}`,children:[e.jsx("span",{"aria-hidden":"true",className:"text-[var(--color-gray-600)]",children:l.icon}),c]},s.format)})]})}const uc={draft:{label:"Draft",bg:"var(--color-gray-200)",color:"var(--color-gray-800)"},reviewed:{label:"Reviewed",bg:"#fef9c3",color:"#854d0e"},"signed-off":{label:"Signed Off",bg:"var(--color-green-200)",color:"var(--color-green-1000)"},filed:{label:"Filed",bg:"var(--color-blue-200)",color:"var(--color-blue-1000)"}};function gc({firmName:r,preparedBy:t,reviewedBy:o,date:a,reference:n,status:s="draft",renderMode:l="web",className:c}){const d=uc[s],x=l==="web";return e.jsxs("div",{className:y("flex items-start justify-between gap-6 border-t border-[var(--color-gray-200)] pt-4 mt-2",c),children:[e.jsxs("div",{className:"flex flex-col gap-1.5",children:[r&&e.jsx("p",{className:"m-0 text-[13px] font-semibold text-[var(--color-gray-1000)]",children:r}),n&&e.jsx("p",{className:"m-0 text-[11px] text-[var(--color-gray-600)] uppercase tracking-[0.06em]",children:n}),e.jsxs("div",{className:"flex items-center gap-4 mt-0.5 flex-wrap",children:[t&&e.jsxs("span",{className:"text-[12px] text-[var(--color-gray-800)]",children:[e.jsx("span",{className:"text-[var(--color-gray-600)] mr-1",children:"Prepared by"}),t]}),o&&e.jsxs("span",{className:"text-[12px] text-[var(--color-gray-800)]",children:[e.jsx("span",{className:"text-[var(--color-gray-600)] mr-1",children:"Reviewed by"}),o]}),a&&e.jsx("span",{className:"text-[12px] text-[var(--color-gray-600)]",children:a})]})]}),x&&e.jsx("span",{className:"inline-flex items-center px-[10px] py-[3px] rounded-full text-[11px] font-semibold whitespace-nowrap shrink-0",style:{background:d.bg,color:d.color},children:d.label})]})}function mc({footnotes:r,className:t}){return r.length===0?null:e.jsxs("div",{className:y("border-t border-[var(--color-gray-200)] pt-4 flex flex-col gap-1.5",t),"aria-label":"Footnotes",children:[e.jsx("p",{className:"m-0 text-[10px] font-bold uppercase tracking-[0.08em] text-[var(--color-gray-600)] mb-1",children:"Notes"}),r.map(o=>e.jsxs("div",{id:`fn-${o.number}`,className:"flex items-start gap-2",children:[e.jsxs("span",{className:"text-[11px] font-semibold text-[var(--color-blue-800)] shrink-0 w-5 text-right tabular-nums",children:["[",o.number,"]"]}),e.jsx("p",{className:"m-0 text-[12px] text-[var(--color-gray-800)] leading-[1.5]",children:o.text})]},o.number))]})}const hc=b("flex items-center justify-between w-full gap-2 min-h-[20px]"),bc=b("flex items-center gap-2"),vc=b("text-[12px] font-normal font-sans leading-[16px]",{variants:{status:{running:"text-[var(--color-gray-800)]",completed:"text-[var(--color-gray-800)]",stopped:"text-[var(--color-blue-800)]"}},defaultVariants:{status:"running"}}),dt=b("w-4 h-4 flex items-center justify-center shrink-0"),yc={running:"var(--color-gray-800)",completed:"var(--color-gray-800)",stopped:"var(--color-blue-800)"},jc={running:"var(--color-gray-800)",completed:"var(--color-green-1000)",stopped:"var(--color-blue-800)"},Do=j.forwardRef(({className:r,status:t="running",message:o,...a},n)=>{const s=yc[t],l=jc[t],c=()=>t==="completed"?e.jsx(i.CheckCircle,{size:16,color:l}):t==="stopped"?e.jsx(i.Hand,{size:16,color:l}):e.jsx(i.Pause,{size:16,color:l});return e.jsxs("div",{ref:n,className:y(hc(),r),...a,children:[e.jsxs("div",{className:bc(),children:[e.jsx("div",{className:dt(),children:e.jsx(i.Hexagon,{size:16,color:s})}),e.jsx("span",{className:vc({status:t}),children:o})]}),e.jsx("div",{className:dt(),children:c()})]})});Do.displayName="AutopilotAction";const wc={default:"text-[var(--color-gray-600)] hover:bg-[var(--color-gray-200)]",accent:"text-[var(--color-blue-800)] hover:opacity-80",bordered:"border border-[rgba(0,13,77,0.45)] rounded-lg px-2 py-1 text-[rgba(0,9,51,0.65)] hover:bg-[rgba(0,13,77,0.05)]",tertiary:"border border-[var(--color-blue-800)] rounded-lg px-2 py-1 text-[var(--color-blue-800)] hover:bg-[var(--color-blue-50)]"};function Wo({text:r,label:t,variant:o="default",className:a=""}){const[n,s]=j.useState(!1),l=async d=>{d.stopPropagation(),await navigator.clipboard.writeText(r),s(!0),setTimeout(()=>s(!1),2e3)},c=o==="accent"||o==="tertiary"?"text-[var(--color-blue-800)]":"text-[var(--color-gray-500)]";return e.jsx("button",{onClick:l,className:`flex items-center gap-1.5 px-2 py-1 rounded text-xs ${wc[o]} transition-colors ${a}`,children:n?e.jsxs(e.Fragment,{children:[t?"Copied":null,e.jsx(i.Check,{size:13,className:c})]}):e.jsxs(e.Fragment,{children:[t??null,e.jsx(i.Clipboard,{size:13})]})})}function Cc({title:r,badge:t,copyText:o,open:a,onOpenChange:n,defaultOpen:s=!1,children:l,className:c,variant:d="default"}){const[x,p]=j.useState(s),f=a!==void 0,u=f?a:x,g=d==="compact",m=()=>{const h=!u;f||p(h),n==null||n(h)};return e.jsxs("div",{className:`rounded-lg border border-[var(--color-gray-200)] bg-white overflow-hidden transition-colors hover:border-[var(--color-blue-800)] ${c??""}`,children:[e.jsxs("button",{type:"button",onClick:m,className:`w-full flex items-center justify-between transition-colors text-left ${g?"px-3 py-2":"px-2 py-1"}`,children:[e.jsxs("div",{className:`flex items-center ${g?"gap-[7px]":"gap-3"}`,children:[e.jsx("span",{className:"text-[var(--color-blue-1000)] flex-shrink-0 transition-transform duration-200",style:{transform:u?"rotate(90deg)":"rotate(0deg)"},children:e.jsx(i.ChevronRight,{size:g?20:16})}),e.jsx("span",{className:`text-[var(--color-blue-1000)] ${g?"text-xs leading-4 font-normal":"text-sm font-semibold"}`,children:r}),t!==void 0&&(g?e.jsx("span",{className:"text-[10px] leading-none rounded bg-[var(--color-blue-1000)] text-white px-1.5 py-0.5",children:t}):e.jsxs("span",{className:"inline-flex items-center gap-1 bg-[var(--color-gray-100)] text-[var(--color-gray-600)] rounded px-[2px] py-[2px] text-[10px] leading-none",children:[e.jsx(i.Settings,{size:14,className:"text-[var(--color-gray-600)]"}),t]}))]}),o&&e.jsx("div",{className:"flex-shrink-0",onClick:h=>h.stopPropagation(),children:e.jsx(Wo,{text:o,label:"Copy",variant:g?"accent":"default"})})]}),e.jsx("div",{className:"grid transition-[grid-template-rows] duration-200 ease-in-out motion-reduce:transition-none",style:{gridTemplateRows:u?"1fr":"0fr",contain:"layout style",willChange:"grid-template-rows"},children:e.jsx("div",{className:"overflow-hidden min-h-0",children:e.jsx("div",{className:`${u?"border-t border-[var(--color-gray-200)]":""} p-2`,children:l})})})]})}const Sc=b("z-50 rounded-[4px] px-3 py-3 shadow-[0px_8px_8px_-4px_rgba(0,0,0,0.04),0px_20px_24px_-4px_rgba(0,0,0,0.08)] max-w-[var(--radix-tooltip-content-available-width)] origin-[var(--radix-tooltip-content-transform-origin)]",{variants:{variant:{default:"bg-[var(--color-blue-1000)] text-[var(--color-gray-50)]",light:"bg-[var(--color-gray-50)] text-[var(--color-gray-1000)]"}},defaultVariants:{variant:"default"}}),kc=b("",{variants:{variant:{default:"fill-[var(--color-blue-1000)]",light:"fill-[var(--color-gray-50)]"}},defaultVariants:{variant:"default"}}),Nc=({delayDuration:r=0,...t})=>e.jsx(we.Provider,{delayDuration:r,...t}),zc=we.Root,Tc=we.Trigger,Po=Fe.forwardRef(({className:r,sideOffset:t=4,children:o,variant:a,...n},s)=>e.jsx(we.Portal,{children:e.jsx(we.Content,{ref:s,sideOffset:t,asChild:!0,className:y(Sc({variant:a}),r),...n,children:e.jsxs(q.motion.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.1,ease:"easeOut"},children:[e.jsx(Ye,{variant:"x-small",color:"inherit",className:"font-normal relative z-10",children:o}),e.jsx(we.Arrow,{className:kc({variant:a})})]})})}));Po.displayName=we.Content.displayName;const $c=b("w-full h-[48px] box-border flex items-center justify-between px-[16px] py-[12px] bg-[var(--color-white)] border-b border-[var(--color-gray-200)]"),Lc=b("flex items-center gap-[12px] h-[24px]"),Mc=b("flex items-center gap-[12px] h-[24px] rounded-[8px]"),pt=b("flex items-center justify-center size-[16px] overflow-hidden text-[var(--color-gray-800)] hover:text-[var(--color-blue-800)] transition-colors bg-transparent border-none cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] rounded-sm disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:text-[var(--color-gray-800)]",{variants:{disabled:{true:"opacity-50 cursor-not-allowed hover:text-[var(--color-gray-800)]"}},defaultVariants:{disabled:!1}}),Ac=b("flex items-center gap-[8px]"),Rc=b("flex items-center"),Eo=j.forwardRef(({className:r,breadcrumbs:t,tags:o=[],collaborators:a=[],onAddTag:n,onAddCollaborator:s,tagsOverflowCount:l=0,addTagDisabled:c=!1,addCollaboratorDisabled:d=!1,...x},p)=>e.jsxs("div",{ref:p,className:y($c(),r),...x,children:[e.jsx(io,{items:t,size:"medium"}),e.jsx("div",{className:Lc(),children:e.jsxs("div",{className:Mc(),children:[(o.length>0||l>0)&&e.jsxs("div",{className:Ac(),children:[o.map(f=>e.jsx(Ie,{variant:"default",className:"bg-[var(--color-gray-100)] border border-[var(--color-gray-200)] text-[var(--color-gray-800)] px-[8px] py-[2px] text-[10px] h-[20px]",children:f.label},f.id)),l>0&&e.jsxs(Ie,{variant:"default",className:"bg-[var(--color-gray-100)] border border-[var(--color-gray-200)] text-[var(--color-gray-800)] px-[8px] py-[2px] text-[10px] h-[20px]",children:["+",l]})]}),a.length>0&&e.jsx("div",{className:Rc(),children:e.jsx("div",{className:"flex items-center flex-row-reverse",children:a.map((f,u)=>e.jsx("div",{className:"relative shrink-0 border-[1.5px] border-white rounded-full",style:{zIndex:a.length-u,marginRight:u<a.length-1?-4:0},children:e.jsx(pr,{initials:f.name,src:f.src,alt:f.name,className:"size-[24px] text-[10px]"})},f.id))})}),e.jsx("button",{type:"button",onClick:n,className:pt({disabled:c}),"aria-label":"Add tag",disabled:c,children:e.jsx(i.TagPlus,{size:16})}),e.jsx("button",{type:"button",onClick:s,className:pt({disabled:d}),"aria-label":"Add collaborator",disabled:d,children:e.jsx(i.UserPlus,{size:16})})]})})]}));Eo.displayName="ConversationHeader";const Fc=b("fixed inset-0 z-50 bg-[rgba(0,6,38,0.5)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),Bc=b("fixed left-[50%] top-[50%] z-50 translate-x-[-50%] translate-y-[-50%] bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-[var(--archie-radius-xl)] [box-shadow:var(--archie-shadow-lg)] p-4 flex flex-col gap-2 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 duration-[var(--archie-anim-duration)]",{variants:{size:{sm:"w-[95vw] sm:w-[300px] max-w-[calc(100vw-2rem)]",md:"w-[95vw] sm:w-[400px] max-w-[calc(100vw-2rem)]",lg:"w-[95vw] sm:w-[500px] max-w-[calc(100vw-2rem)]",xl:"w-[95vw] sm:w-[600px] max-w-[calc(100vw-2rem)]",full:"w-[100vw] h-[100vh] sm:w-[calc(100vw-2rem)] sm:h-[calc(100vh-2rem)] rounded-none sm:rounded-[var(--archie-radius-xl)]"}},defaultVariants:{size:"md"}}),Ic=b("absolute right-4 top-4 flex-shrink-0 w-4 h-4 text-[var(--color-blue-1000)] cursor-pointer bg-transparent border-none p-0 hover:opacity-70 transition-opacity focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2 rounded-sm"),Dc=b("!font-[Geist,system-ui,-apple-system,sans-serif] font-medium text-[1rem] leading-[1.5rem] text-[var(--color-blue-1000)] w-full"),Wc=b("font-[Geist,system-ui,-apple-system,sans-serif] font-normal text-[0.875rem] leading-[1.25rem] text-[var(--color-gray-800)] w-full"),Pc=b("flex flex-col gap-4 w-full",{variants:{size:{sm:"max-h-[60vh] overflow-y-auto",md:"max-h-[70vh] overflow-y-auto",lg:"max-h-[75vh] overflow-y-auto",xl:"max-h-[80vh] overflow-y-auto",full:"flex-1 overflow-y-auto"},contentAlign:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"}},defaultVariants:{size:"md",contentAlign:"start"}}),Ec=b("flex gap-2 items-start w-full"),Vo=({open:r,onOpenChange:t,title:o,description:a,showCloseButton:n=!0,closeIcon:s,children:l,primaryAction:c,secondaryAction:d,closeOnClickOutside:x=!0,closeOnEsc:p=!0,onClose:f,className:u,overlayClassName:g,contentClassName:m,footerClassName:h,size:v="md",contentAlign:w="start"})=>{const k=j.useRef(null),$=j.useRef(null),z=j.useCallback(S=>{t(S),S||f==null||f()},[t,f]),C=j.useCallback(async()=>{c!=null&&c.onClick&&await c.onClick()},[c]),T=j.useCallback(async()=>{d!=null&&d.onClick&&await d.onClick()},[d]),I=j.useCallback(S=>{p||S.preventDefault()},[p]),L=j.useCallback(S=>{x||S.preventDefault()},[x]),F=c||d;return e.jsx(de.Root,{open:r,onOpenChange:z,children:e.jsxs(de.Portal,{children:[e.jsx(de.Overlay,{className:y(Fc(),g)}),e.jsxs(de.Content,{className:y(Bc({size:v}),u),onEscapeKeyDown:I,onPointerDownOutside:L,children:[o?e.jsx(de.Title,{className:Dc(),children:o}):e.jsx(Or.Root,{children:e.jsx(de.Title,{children:"Modal dialog"})}),a?e.jsx(de.Description,{className:Wc(),children:a}):e.jsx(Or.Root,{children:e.jsx(de.Description,{children:"Modal content"})}),n&&e.jsx(de.Close,{asChild:!0,children:e.jsx("button",{className:Ic(),"aria-label":"Close modal",children:s||e.jsx(i.X,{size:16,color:"currentColor"})})}),l&&e.jsx("div",{className:y(Pc({size:v,contentAlign:w}),m),children:l}),F&&e.jsxs("div",{className:y(Ec(),h),children:[d&&e.jsx(Be,{ref:$,variant:d.variant||"secondary",size:"sm",onClick:T,disabled:d.disabled||d.loading,leftIcon:d.icon,className:"flex-1",children:d.label}),c&&e.jsx(Be,{ref:k,variant:c.variant||"default",size:"sm",onClick:C,disabled:c.disabled||c.loading,leftIcon:c.icon,className:"flex-1",children:c.label})]})]})]})})};Vo.displayName="Modal";const Vc=r=>e.jsx(q.motion.svg,{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",animate:{rotate:r?90:0},transition:{duration:.15,ease:"easeOut"},"aria-hidden":"true",style:{display:"inline-block",flexShrink:0},children:e.jsx("path",{d:"M3 2L7 5L3 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function Hc({cells:r,drillRows:t,colCount:o,defaultExpanded:a=!1,onToggle:n,rowClassName:s,drillRowClassName:l}){const[c,d]=j.useState(a),x=()=>{const p=!c;d(p),n==null||n(p)};return e.jsxs(e.Fragment,{children:[e.jsx("tr",{className:y("cursor-pointer select-none transition-colors duration-150","hover:bg-[var(--color-gray-50)] active:bg-[var(--color-gray-100)]",c&&"bg-[var(--color-gray-50)]",s),onClick:x,tabIndex:0,role:"button","aria-expanded":c,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),x())},children:r.map((p,f)=>e.jsx("td",{style:{padding:"10px 16px",fontSize:13},children:f===0?e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[var(--color-gray-600)]",children:Vc(c)}),p]}):p},f))}),e.jsx(q.AnimatePresence,{initial:!1,children:c&&e.jsx("tr",{children:e.jsx("td",{colSpan:o,style:{padding:0,border:"none"},children:e.jsx(q.motion.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:[.4,0,.2,1]},style:{overflow:"hidden"},children:e.jsx("table",{style:{width:"100%",borderCollapse:"collapse"},children:e.jsx("tbody",{children:t.map(p=>e.jsx("tr",{className:y("border-b border-[var(--color-gray-100)] last:border-0",l),style:{background:"var(--color-gray-50)"},children:p.cells.map((f,u)=>e.jsx("td",{style:{padding:"8px 16px",paddingLeft:u===0?36:16,fontSize:12,color:"var(--color-gray-800)"},children:f},u))},p.key))})})})})},"drill-wrapper")})]})}const _c={a4:"210mm",letter:"216mm","a4-landscape":"297mm","letter-landscape":"279mm"};function Oc({printHeader:r,printFooter:t,paperSize:o="a4",renderMode:a="web",children:n,className:s}){const l=a==="pdf",c=a==="excel",d=o==="a4-landscape"||o==="letter-landscape",x=d?o==="a4-landscape"?"a4":"letter":o??"a4",p=l?"12mm":"20mm",f=`15mm ${p}`,u=`15mm ${p}`,g=l?"gap-6":c?"gap-2":"gap-6";return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:`
|
|
60
60
|
@media print {
|
|
61
61
|
.report-page {
|
|
62
|
-
width: ${
|
|
62
|
+
width: ${_c[o??"a4"]};
|
|
63
63
|
margin: 0 auto;
|
|
64
64
|
padding: ${l?"0":f};
|
|
65
65
|
font-size: 10pt;
|
|
@@ -120,10 +120,10 @@ macOSWindowChrome, macOSToolbar, macOSSidebar (Desktop only — NSVisualEffectVi
|
|
|
120
120
|
margin-top: 20mm;
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
`}),r&&e.jsx("div",{className:"print-header hidden print:block border-b border-[var(--color-gray-200)] pb-3 mb-4",children:r}),e.jsx("div",{className:y(`report-page flex flex-col ${g}`,s),children:n}),t&&e.jsx("div",{className:"print-footer hidden print:block border-t border-[var(--color-gray-200)] pt-3 mt-4 text-[11px] text-[var(--color-gray-600)]",children:t})]})}const Oc="Geist Mono, ui-monospace, monospace",pt=r=>r==="right"?"right":r==="center"?"center":"left";function Gc({columns:r,rows:t,emptyMessage:o="No data",renderMode:a="web",className:n}){const s=a==="pdf",l=a==="excel",c=s||l,d=s?"6px 10px":l?"4px 8px":"10px 16px",x=s?"5px 10px":l?"4px 8px":"9px 16px",p=c?12:13,f=c?9:10;return e.jsx("div",{className:y("border border-[var(--color-gray-200)] overflow-hidden",!l&&"rounded-lg",n),children:e.jsxs("table",{className:"w-full",style:{borderCollapse:"collapse",tableLayout:s?"auto":void 0},children:[e.jsx("thead",{children:e.jsx("tr",{children:r.map(u=>e.jsx("th",{style:{padding:x,textAlign:pt(u.align),fontSize:f,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-gray-600)",background:"var(--color-gray-50)",borderBottom:"1px solid var(--color-gray-200)",whiteSpace:"nowrap"},children:u.label},u.key))})}),e.jsx("tbody",{children:t.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:r.length,style:{padding:"24px 16px",textAlign:"center",fontSize:13,color:"var(--color-gray-600)",background:"var(--color-white)"},children:o})}):t.map((u,g)=>e.jsx("tr",{style:{background:"var(--color-white)",borderBottom:g<t.length-1?"1px solid var(--color-gray-100)":void 0},children:r.map((m,h)=>e.jsx("td",{style:{padding:d,textAlign:pt(m.align),fontSize:p,color:h===0?"var(--color-gray-1000)":"var(--color-gray-800)",fontFamily:m.mono?Oc:void 0,fontVariantNumeric:m.mono?"tabular-nums":void 0,whiteSpace:s&&(h===0||m.mono)?"nowrap":void 0},children:u[m.key]??"—"},m.key))},g))})]})})}const lr="Geist Mono, ui-monospace, monospace",Vo=24,Ho=34,Oe=r=>r==="right"?"right":r==="center"?"center":"left";function Uc({row:r,columns:t,renderMode:o="web"}){const a=r.variant==="grand-total",n=o==="pdf",s=n?11:13,l=n?12:13,c=a?"var(--color-blue-200)":"var(--color-gray-100)",d=a?"var(--color-blue-1000)":"var(--color-gray-1000)",x=a?"2px solid var(--color-blue-800)":"1px solid var(--color-gray-200)";return e.jsx("tr",{style:{background:c,borderTop:x,height:a?n?Vo:Ho:void 0},children:t.map((p,f)=>{const u=f===0,g=u?r.label:r.values[p.key]??"";return e.jsx("td",{style:{padding:n?"0 10px":"0 16px",textAlign:Oe(p.align),fontSize:a?l:s,fontWeight:a?700:600,color:d,fontFamily:p.mono||!u?lr:void 0,fontVariantNumeric:"tabular-nums",whiteSpace:n?"nowrap":void 0},children:g},p.key)})})}function Yc({columns:r,groups:t,rows:o,totals:a,renderMode:n="web",className:s}){const l=n==="pdf",c=n==="excel",d=l||c,x=l?"6px 10px":c?"4px 8px":"10px 16px",p=l?Vo:c?void 0:Ho,f=d?12:13,u=d?9:10;return e.jsx("div",{className:y("border border-[var(--color-gray-200)] overflow-hidden",!c&&"rounded-lg",s),children:e.jsxs("table",{className:"w-full",style:{borderCollapse:"collapse",tableLayout:l?"auto":void 0},children:[e.jsx("thead",{children:e.jsx("tr",{style:{height:p},children:r.map(g=>e.jsx("th",{style:{padding:l?"0 10px":c?"4px 8px":"0 16px",textAlign:Oe(g.align),fontSize:u,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-white)",background:"var(--color-blue-1000)",whiteSpace:"nowrap"},children:g.label},g.key))})}),o&&o.length>0&&e.jsx("tbody",{children:o.map((g,m)=>e.jsx("tr",{style:{background:"var(--color-white)",borderBottom:"1px solid var(--color-gray-100)"},children:r.map((h,v)=>e.jsx("td",{style:{padding:x,textAlign:Oe(h.align),fontSize:f,color:"var(--color-gray-1000)",fontFamily:h.mono?lr:void 0,fontVariantNumeric:h.mono?"tabular-nums":void 0,whiteSpace:l&&(v===0||h.mono)?"nowrap":void 0},children:g[h.key]??"—"},h.key))},m))}),t==null?void 0:t.map((g,m)=>e.jsxs("tbody",{style:{pageBreakInside:"avoid",breakInside:"avoid"},children:[e.jsx("tr",{style:{background:"var(--color-blue-800-bg)",borderTop:m>0?"1px solid var(--color-blue-800-subtle)":void 0,borderBottom:"1px solid var(--color-blue-800-subtle)"},children:e.jsxs("td",{colSpan:r.length,style:{padding:d?"5px 10px":"7px 16px",paddingLeft:d?16:24,fontSize:d?9:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-blue-1000)"},children:[g.label,n==="web"&&g.count!=null&&e.jsx("span",{style:{marginLeft:8,padding:"1px 6px",borderRadius:9999,fontSize:10,fontWeight:600,background:"var(--color-blue-800-subtle)",color:"var(--color-blue-1000)"},children:g.count})]})}),g.rows.map((h,v)=>e.jsx("tr",{style:{background:"var(--color-white)",borderBottom:v<g.rows.length-1?"1px solid var(--color-gray-100)":void 0},children:r.map((w,k)=>e.jsx("td",{style:{padding:x,paddingLeft:k===0?d?16:24:void 0,textAlign:Oe(w.align),fontSize:f,color:"var(--color-gray-1000)",fontFamily:w.mono?lr:void 0,fontVariantNumeric:w.mono?"tabular-nums":void 0,whiteSpace:l&&(k===0||w.mono)?"nowrap":void 0},children:h[w.key]??"—"},w.key))},v)),g.subtotal&&e.jsx("tr",{style:{background:"var(--color-gray-100)",borderTop:"1px solid var(--color-gray-200)",borderBottom:"1px solid var(--color-gray-200)"},children:r.map((h,v)=>{const w=g.subtotal[h.key],k=v===0?w??"Subtotal":w??"";return e.jsx("td",{style:{padding:d?"5px 10px":"9px 16px",textAlign:Oe(h.align),fontSize:v===0?d?10:11:f,fontWeight:600,textTransform:v===0?"uppercase":void 0,letterSpacing:v===0?"0.04em":void 0,color:v===0?"var(--color-gray-800)":"var(--color-gray-1000)",fontFamily:h.mono?lr:void 0,fontVariantNumeric:h.mono?"tabular-nums":void 0,whiteSpace:l?"nowrap":void 0},children:k},h.key)})})]},m)),a&&a.length>0&&e.jsx("tfoot",{children:a.map((g,m)=>e.jsx(Uc,{row:g,columns:r,renderMode:n},m))})]})})}const xt="Geist Mono, ui-monospace, monospace",yr="#f0f9ff",Kc="var(--color-blue-1000)";function Zc({rowLabel:r,columns:t,sections:o,rows:a,renderMode:n="web",className:s}){const l=n==="pdf",c=n==="excel",d=l||c,x=d?"6px 10px":"10px 16px",p=d?"5px 10px":"9px 16px",f=d?12:13,u=d?9:10,g=o?null:a??[];return e.jsx("div",{className:y("border border-[var(--color-gray-200)] overflow-hidden",!c&&"rounded-lg",s),children:e.jsxs("table",{className:"w-full",style:{borderCollapse:"collapse",tableLayout:l?"auto":void 0},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{padding:p,textAlign:"left",fontSize:u,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-gray-600)",background:"var(--color-gray-50)",borderBottom:"1px solid var(--color-gray-200)",whiteSpace:"nowrap"},children:r}),t.map(m=>e.jsx("th",{style:{padding:p,textAlign:"right",fontSize:u,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:m.highlight?Kc:"var(--color-gray-600)",background:m.highlight?yr:"var(--color-gray-50)",borderBottom:"1px solid var(--color-gray-200)",whiteSpace:"nowrap"},children:m.label},m.key))]})}),e.jsxs("tbody",{children:[g==null?void 0:g.map((m,h)=>e.jsxs("tr",{style:{background:"var(--color-white)",borderBottom:h<g.length-1?"1px solid var(--color-gray-100)":void 0},children:[e.jsx("td",{style:{padding:x,fontSize:f,color:"var(--color-gray-1000)",whiteSpace:l?"nowrap":void 0},children:m.account??m.label??""}),t.map(v=>e.jsx("td",{style:{padding:x,textAlign:"right",fontSize:f,fontFamily:xt,fontVariantNumeric:"tabular-nums",color:v.highlight?"var(--color-gray-1000)":"var(--color-gray-800)",background:v.highlight?yr:void 0,whiteSpace:l?"nowrap":void 0},children:m[v.key]??"—"},v.key))]},h)),o==null?void 0:o.map((m,h)=>e.jsxs(j.Fragment,{children:[e.jsx("tr",{style:{background:"var(--color-gray-50)",borderTop:h>0?"1px solid var(--color-gray-200)":void 0,borderBottom:"1px solid var(--color-gray-200)"},children:e.jsx("td",{colSpan:t.length+1,style:{padding:d?"5px 10px":"7px 16px",fontSize:u,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-gray-600)"},children:m.label})}),m.rows.map((v,w)=>e.jsxs("tr",{style:{background:"var(--color-white)",borderBottom:w<m.rows.length-1?"1px solid var(--color-gray-100)":void 0},children:[e.jsx("td",{style:{padding:x,paddingLeft:d?16:24,fontSize:f,color:"var(--color-gray-800)",whiteSpace:l?"nowrap":void 0},children:v.account??v.label??""}),t.map(k=>e.jsx("td",{style:{padding:x,textAlign:"right",fontSize:f,fontFamily:xt,fontVariantNumeric:"tabular-nums",color:k.highlight?"var(--color-gray-1000)":"var(--color-gray-800)",background:k.highlight?yr:void 0,whiteSpace:l?"nowrap":void 0},children:v[k.key]??"—"},k.key))]},w))]},h))]})]})})}const Ae={primary:"#e15713",secondary:"#15b1cd",positive:"#71d481",negative:"#fb6060",total:"#000626",grid:"#e5e7f0",axisLabel:"#8c92af",text:"#000626",textMuted:"#595f7a",priorFill:"rgba(229, 231, 240, 0.6)",areaFill:"rgba(229, 87, 19, 0.08)",areaFill2:"rgba(21, 177, 205, 0.08)",forecastFill:"rgba(229, 87, 19, 0.04)",forecastBand:"rgba(229, 87, 19, 0.05)"},Xc=[Ae.primary,Ae.secondary,Ae.positive,Ae.total,Ae.axisLabel,"#5b21b6","#c2410c"],J="'Geist Mono', 'ui-monospace', monospace",ee="'Geist', 'system-ui', sans-serif",Y={top:20,right:12,bottom:32,left:56};function Re(r,t){const o=parseInt(r.slice(1,3),16),a=parseInt(r.slice(3,5),16),n=parseInt(r.slice(5,7),16);return`rgba(${o}, ${a}, ${n}, ${t})`}const _o={archie:{primary:"#e15713",secondary:"#15b1cd",positive:"#71d481",negative:"#fb6060",total:"#000626",series:["#e15713","#15b1cd","#6D28D9","#15803D","#BE123C","#0369A1","#C2410C"]},ocean:{primary:"#0369A1",secondary:"#15b1cd",positive:"#71d481",negative:"#fb6060",total:"#022e40",series:["#0369A1","#15b1cd","#6aeafd","#022e40","#8c92af","#15803D","#6D28D9"]},forest:{primary:"#15803D",secondary:"#0369A1",positive:"#71d481",negative:"#fb6060",total:"#000626",series:["#15803D","#0369A1","#71d481","#000626","#8c92af","#6D28D9","#C2410C"]},sunset:{primary:"#C2410C",secondary:"#BE123C",positive:"#71d481",negative:"#fb6060",total:"#000626",series:["#C2410C","#BE123C","#8f6c1a","#000626","#8c92af","#e15713","#6D28D9"]},lavender:{primary:"#6D28D9",secondary:"#0369A1",positive:"#71d481",negative:"#fb6060",total:"#000626",series:["#6D28D9","#0369A1","#15803D","#000626","#8c92af","#C2410C","#BE123C"]},monochrome:{primary:"#000626",secondary:"#595f7a",positive:"#71d481",negative:"#fb6060",total:"#000626",series:["#000626","#595f7a","#8c92af","#e5e7f0","#022e40"]}};function le(r){const t=_o[r.colorScheme??"archie"],o=r.primaryColor??t.primary,a=r.comparisonColor??t.secondary;return{primary:o,secondary:a,positive:t.positive,negative:t.negative,total:t.total,series:[o,a,...t.series.slice(2)],priorFill:"rgba(229, 231, 240, 0.6)",areaFill:Re(o,.08),areaFill2:Re(a,.08),forecastFill:Re(o,.04),forecastBand:Re(o,.05),grid:"#e5e7f0",axisLabel:"#8c92af",text:"#000626",textMuted:"#595f7a"}}function qc({title:r,subtitle:t,footer:o,renderMode:a="web",className:n,children:s}){const l=a==="pdf";return e.jsxs("div",{className:y("chart-section",n),style:{breakInside:"avoid",pageBreakInside:"avoid"},children:[e.jsxs("div",{style:{borderBottom:"1px solid #e5e7f0",paddingBottom:l?6:8,marginBottom:l?12:16},children:[e.jsx("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"#000626",fontFamily:"'Geist', system-ui, sans-serif"},children:r}),t&&e.jsx("div",{style:{fontSize:11,fontWeight:400,color:"#8c92af",marginTop:2,fontFamily:"'Geist', system-ui, sans-serif"},children:t})]}),e.jsx("div",{children:s}),o&&e.jsx("div",{style:{fontSize:10,fontWeight:400,color:"#8c92af",marginTop:l?6:8,fontFamily:"'Geist', system-ui, sans-serif",lineHeight:1.5},children:o})]})}function Ke(r,t){const[o,a]=r,[n,s]=t,l=a-o||1,c=s-n;return d=>n+(d-o)/l*c}function Oo(r,t,o=.25){const a=r.length,n=t/(a+o*(a-1)+o),s=n*(1-o/(1+o)),l=n*(o/(1+o)),c=d=>{const x=r.indexOf(d);return x===-1?0:x*(s+l)+l/2};return c.bandwidth=s,c.step=s+l,c}function Ze(r,t,o=5){if(r===t)return[r];const a=(t-r)/(o-1),n=Math.pow(10,Math.floor(Math.log10(Math.abs(a)))),s=[1,2,2.5,5,10];let l=n;for(const p of s)if(p*n>=a){l=p*n;break}const c=Math.floor(r/l)*l,d=[];let x=c;for(;x<=t+l*.01;)d.push(x),x=parseFloat((x+l).toPrecision(12));return d}function fr(r){const t=Math.min(0,...r),o=Math.max(0,...r);return[t,o]}function xe(r,t,o="$",a=!0){if(t==="percent")return`${r.toFixed(1)}%`;if(t==="ratio")return`${r.toFixed(2)}×`;if(t==="number")return a?dr(r):r.toLocaleString("en",{maximumFractionDigits:1});const n=o;return a?`${n}${dr(r)}`:`${n}${Math.abs(r).toLocaleString("en",{maximumFractionDigits:0})}`}function dr(r){const t=Math.abs(r),o=r<0?"-":"";return t>=1e6?`${o}${(t/1e6).toFixed(t>=1e7?0:1)}M`:t>=1e3?`${o}${(t/1e3).toFixed(t>=1e5?0:1)}K`:`${o}${t.toFixed(0)}`}function Ge(r,t,o="$"){return t==="percent"?`${r.toFixed(1)}%`:t==="ratio"?`${r.toFixed(2)}×`:t==="number"?dr(r):`${o}${dr(r)}`}const me=2;function Jc({data:r,config:t}){const{width:o,height:a,valueType:n,currency:s="$",renderMode:l="web",showDataLabels:c=!1,showLegend:d=!1,showComparison:x=!1,comparisonLabel:p="Prior Year",primaryLabel:f="Current"}=t,u=le(t),g=l==="pdf",m=o-Y.left-Y.right,h=a-Y.top-Y.bottom,v=j.useMemo(()=>{const S=r.map(N=>N.value);return x&&r.forEach(N=>{N.priorValue!==void 0&&S.push(N.priorValue)}),S},[r,x]),w=fr(v),k=Ke(w,[h,0]),L=k(0),z=r.map(S=>S.label),C=Oo(z,m,.3),T=C.bandwidth,I=Ze(w[0],w[1],5),$=(S,N=!0)=>xe(S,n,s,N),F=S=>Ge(S,n,s);return e.jsx("svg",{width:o,height:a,viewBox:`0 0 ${o} ${a}`,"aria-hidden":"true",style:{display:"block",overflow:"visible"},children:e.jsxs("g",{transform:`translate(${Y.left},${Y.top})`,children:[I.map(S=>{const N=k(S);return e.jsxs("g",{children:[e.jsx("line",{x1:0,y1:N,x2:m,y2:N,stroke:u.grid,strokeWidth:1}),e.jsx("text",{x:-8,y:N,textAnchor:"end",dominantBaseline:"middle",style:{fontSize:10,fontFamily:J,fill:u.axisLabel},children:$(S)})]},S)}),w[0]<0&&e.jsx("line",{x1:0,y1:L,x2:m,y2:L,stroke:u.axisLabel,strokeWidth:1}),r.map((S,N)=>{const B=C(S.label),E=S.isTotal?u.total:S.value<0?u.negative:u.primary,V=Math.min(k(S.value),L),H=Math.abs(k(S.value)-L),W=S.value<0,O=x&&S.priorValue!==void 0,M=O?Math.min(k(S.priorValue),L):0,D=O?Math.abs(k(S.priorValue)-L):0;return e.jsxs("g",{children:[e.jsxs("defs",{children:[e.jsx("clipPath",{id:`bar-clip-${N}`,children:e.jsx("rect",{x:B,y:W?V:V-me,width:T,height:H+me+1,rx:me,ry:me})}),O&&e.jsx("clipPath",{id:`prior-clip-${N}`,children:e.jsx("rect",{x:B,y:S.priorValue<0?M:M-me,width:T,height:D+me+1,rx:me,ry:me})})]}),O&&e.jsx("rect",{x:B,y:M,width:T,height:D,fill:u.priorFill,clipPath:`url(#prior-clip-${N})`}),H>0&&e.jsx("rect",{x:B,y:V,width:T,height:H,fill:E,clipPath:`url(#bar-clip-${N})`}),c&&H>0&&e.jsx("text",{x:B+T/2,y:W?V+H+12:V-4,textAnchor:"middle",style:{fontSize:10,fontFamily:J,fontWeight:600,fill:u.text},children:F(S.value)})]},S.label)}),r.map(S=>e.jsx("text",{x:C(S.label)+T/2,y:h+16,textAnchor:"middle",style:{fontSize:g?9:10,fontFamily:ee,fill:u.axisLabel},children:S.label},S.label)),d&&x&&e.jsxs("g",{transform:`translate(0, ${h+28})`,children:[e.jsx("rect",{width:10,height:10,rx:2,fill:u.primary,y:-1}),e.jsx("text",{x:14,y:8,style:{fontSize:10,fontFamily:ee,fill:u.axisLabel},children:f}),e.jsx("rect",{x:80,width:10,height:10,rx:2,fill:u.priorFill,y:-1}),e.jsx("text",{x:94,y:8,style:{fontSize:10,fontFamily:ee,fill:u.axisLabel},children:p})]})]})})}function ir(r,t=.4){if(r.length===0)return"";if(r.length===1)return`M ${r[0][0]},${r[0][1]}`;if(r.length===2)return`M ${r[0][0]},${r[0][1]} L ${r[1][0]},${r[1][1]}`;const o=[`M ${r[0][0]},${r[0][1]}`];for(let a=0;a<r.length-1;a++){const n=r[a-1]??r[a],s=r[a],l=r[a+1],c=r[a+2]??r[a+1],d=s[0]+(l[0]-n[0])/6*t*3,x=s[1]+(l[1]-n[1])/6*t*3,p=l[0]-(c[0]-s[0])/6*t*3,f=l[1]-(c[1]-s[1])/6*t*3;o.push(`C ${d},${x} ${p},${f} ${l[0]},${l[1]}`)}return o.join(" ")}function kr(r,t,o){if(t.length===0)return"";const a=t[t.length-1],n=t[0];return`${r} L ${a[0]},${o} L ${n[0]},${o} Z`}function Qc(r,t,o,a,n){const s=[];let l=0;for(let c=0;c<r.length;c++){const d=r[c];if(t[c]){const p=o(0),f=o(l+d);s.push({x:a[c],yTop:Math.min(p,f),yBottom:Math.max(p,f),kind:"total"}),l+=d}else{const p=l,f=l+d,u=o(p),g=o(f);s.push({x:a[c],yTop:Math.min(u,g),yBottom:Math.max(u,g),kind:d>=0?"positive":"negative",connectorX:a[c]+n}),l=f}}return s}function Go({labels:r,series:t,config:o}){const{width:a,height:n,valueType:s,currency:l="$",renderMode:c="web",showLegend:d=!1}=o,x=le(o),p=c==="pdf",f=a-Y.left-Y.right,u=n-Y.top-Y.bottom,g=j.useMemo(()=>t.flatMap(C=>C.data),[t]),m=fr(g),h=Ke(m,[u,0]),v=h(0),w=Ze(m[0],m[1],5),k=C=>xe(C,s,l),L=r.length>1?f/(r.length-1):0,z=C=>C*L;return e.jsx("svg",{width:a,height:n,viewBox:`0 0 ${a} ${n}`,"aria-hidden":"true",style:{display:"block",overflow:"visible"},children:e.jsxs("g",{transform:`translate(${Y.left},${Y.top})`,children:[w.map(C=>{const T=h(C);return e.jsxs("g",{children:[e.jsx("line",{x1:0,y1:T,x2:f,y2:T,stroke:x.grid,strokeWidth:1}),e.jsx("text",{x:-8,y:T,textAnchor:"end",dominantBaseline:"middle",style:{fontSize:10,fontFamily:J,fill:x.axisLabel},children:k(C)})]},C)}),m[0]<0&&e.jsx("line",{x1:0,y1:v,x2:f,y2:v,stroke:x.axisLabel,strokeWidth:1}),t.map((C,T)=>{const I=C.color??x.series[T%x.series.length],$=Re(I.startsWith("#")?I:x.series[T%x.series.length],.08),F=C.data.map((E,V)=>[z(V),h(E)]),S=ir(F),N=kr(S,F,v),B=F[F.length-1];return e.jsxs("g",{children:[(C.showArea??!1)&&e.jsx("path",{d:N,fill:$,stroke:"none"}),e.jsx("path",{d:S,fill:"none",stroke:I,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),B&&e.jsx("circle",{cx:B[0],cy:B[1],r:4,fill:I,stroke:"#fff",strokeWidth:1.5})]},C.label)}),r.map((C,T)=>e.jsx("text",{x:z(T),y:u+16,textAnchor:"middle",style:{fontSize:p?9:10,fontFamily:ee,fill:x.axisLabel},children:C},C)),d&&t.length>1&&e.jsx("g",{transform:`translate(0, ${u+28})`,children:t.map((C,T)=>{const I=C.color??x.series[T%x.series.length],$=T*110;return e.jsxs("g",{transform:`translate(${$}, 0)`,children:[e.jsx("line",{x1:0,y1:5,x2:16,y2:5,stroke:I,strokeWidth:2,strokeLinecap:"round"}),e.jsx("circle",{cx:8,cy:5,r:3,fill:I}),e.jsx("text",{x:20,y:9,style:{fontSize:10,fontFamily:ee,fill:x.axisLabel},children:C.label})]},C.label)})})]})})}function ed({data:r,config:t,color:o}){const a=le(t),n=[{label:t.primaryLabel??"Value",data:r.map(s=>s.value),color:o??a.primary,showArea:!0}];return t.showComparison&&r.some(s=>s.priorValue!==void 0)&&n.push({label:t.comparisonLabel??"Prior Year",data:r.map(s=>s.priorValue??0),color:a.secondary,showArea:!1}),e.jsx(Go,{labels:r.map(s=>s.label),series:n,config:{...t,showLegend:t.showComparison?t.showLegend:!1}})}const or=2;function rd({data:r,config:t}){const{width:o,height:a,valueType:n,currency:s="$",renderMode:l="web",showDataLabels:c=!0}=t,d=le(t),x=l==="pdf",p=o-Y.left-Y.right,f=a-Y.top-Y.bottom,u=j.useMemo(()=>{const S=[0];let N=0;for(const B of r)N+=B.value,S.push(N);return S},[r]),g=Math.min(0,...u),m=Math.max(0,...u),h=Ze(g,m,5),v=[Math.min(g,h[0]),Math.max(m,h[h.length-1])],w=Ke(v,[f,0]),k=r.map(S=>S.label),L=Oo(k,p,.35),z=L.bandwidth,C=k.map(S=>L(S)),T=Qc(r.map(S=>S.value),r.map(S=>!!S.isTotal),w,C,z),I=S=>xe(S,n,s),$=S=>Ge(S,n,s),F={positive:d.positive,negative:d.negative,total:d.total};return e.jsx("svg",{width:o,height:a,viewBox:`0 0 ${o} ${a}`,"aria-hidden":"true",style:{display:"block",overflow:"visible"},children:e.jsxs("g",{transform:`translate(${Y.left},${Y.top})`,children:[h.map(S=>{const N=w(S);return e.jsxs("g",{children:[e.jsx("line",{x1:0,y1:N,x2:p,y2:N,stroke:d.grid,strokeWidth:1}),e.jsx("text",{x:-8,y:N,textAnchor:"end",dominantBaseline:"middle",style:{fontSize:10,fontFamily:J,fill:d.axisLabel},children:I(S)})]},S)}),T.map((S,N)=>{const B=r[N],E=S.yBottom-S.yTop,V=B.value<0,H=F[S.kind],W=`wf-clip-${N}`,O=T[N+1],M=(S.kind==="total",S.yTop);return e.jsxs("g",{children:[e.jsx("defs",{children:e.jsx("clipPath",{id:W,children:e.jsx("rect",{x:S.x,y:V||S.kind==="total"?S.yTop:S.yTop-or,width:z,height:E+or+1,rx:or,ry:or})})}),E>0&&e.jsx("rect",{x:S.x,y:S.yTop,width:z,height:E,fill:H,clipPath:`url(#${W})`}),O&&S.connectorX!==void 0&&e.jsx("line",{x1:S.connectorX,y1:M,x2:O.x,y2:M,stroke:d.grid,strokeWidth:1,strokeDasharray:"3,3"}),c&&e.jsxs("text",{x:S.x+z/2,y:V?S.yBottom+12:S.yTop-4,textAnchor:"middle",style:{fontSize:x?9:10,fontFamily:J,fontWeight:600,fill:d.text},children:[B.value>=0?"+":"",$(B.value)]}),e.jsx("text",{x:S.x+z/2,y:f+16,textAnchor:"middle",style:{fontSize:x?9:10,fontFamily:ee,fill:d.axisLabel},children:B.label})]},B.label)})]})})}const Ve=18,ar=10,ft=140,td=60,ut=2;function od({data:r,config:t,sorted:o=!0}){const{width:a,height:n,valueType:s,currency:l="$",renderMode:c="web"}=t,d=le(t),x=c==="pdf",p=j.useMemo(()=>o?[...r].sort((C,T)=>Math.abs(T.value)-Math.abs(C.value)):r,[r,o]),f=p.length*(Ve+ar)+ar+8,u=n>0?n:f,g=a-ft-td-24,m=p.map(C=>C.value),h=fr(m),v=Ke(h,[0,g]),w=v(0),k=C=>Ge(C,s,l),L=C=>xe(C,s,l),z=Ze(h[0],h[1],4);return e.jsx("svg",{width:a,height:u,viewBox:`0 0 ${a} ${u}`,"aria-hidden":"true",style:{display:"block",overflow:"visible"},children:e.jsxs("g",{transform:`translate(${ft+12},4)`,children:[z.map(C=>{const T=v(C);return e.jsxs("g",{children:[e.jsx("line",{x1:T,y1:0,x2:T,y2:f-8,stroke:d.grid,strokeWidth:1}),e.jsx("text",{x:T,y:f-2,textAnchor:"middle",style:{fontSize:9,fontFamily:J,fill:d.axisLabel},children:L(C)})]},C)}),h[0]<0&&e.jsx("line",{x1:w,y1:0,x2:w,y2:f-8,stroke:d.axisLabel,strokeWidth:1}),p.map((C,T)=>{const I=T*(Ve+ar)+ar,$=C.value<0,F=$?v(C.value):w,S=Math.abs(v(C.value)-w),N=$?d.negative:d.primary;return e.jsxs("g",{children:[e.jsx("text",{x:-8,y:I+Ve/2,textAnchor:"end",dominantBaseline:"middle",style:{fontSize:x?9:10,fontFamily:ee,fill:d.text},children:C.label.length>22?C.label.slice(0,21)+"…":C.label}),e.jsx("rect",{x:F,y:I,width:Math.max(S,1),height:Ve,fill:N,rx:ut,ry:ut}),e.jsx("text",{x:v(Math.max(0,C.value))+6,y:I+Ve/2,dominantBaseline:"middle",style:{fontSize:10,fontFamily:J,fontWeight:600,fill:d.text},children:k(C.value)})]},C.label)})]})})}const ad=3;function nr(r,t,o,a){const n=(a-90)*Math.PI/180;return{x:r+o*Math.cos(n),y:t+o*Math.sin(n)}}function nd(r,t,o,a,n,s){const l=nr(r,t,o,s),c=nr(r,t,o,n),d=nr(r,t,a,s),x=nr(r,t,a,n),p=s-n>180?1:0;return[`M ${l.x},${l.y}`,`A ${o},${o} 0 ${p},0 ${c.x},${c.y}`,`L ${x.x},${x.y}`,`A ${a},${a} 0 ${p},1 ${d.x},${d.y}`,"Z"].join(" ")}function sd({segments:r,config:t,centerLabel:o}){const{width:a,valueType:n,currency:s="$",renderMode:l="web"}=t,c=le(t),d=l==="pdf",x=j.useMemo(()=>r.reduce((z,C)=>z+Math.abs(C.value),0),[r]),p=Math.ceil(r.length/2)*20+16,f=Math.min(a,200),u=f+p,g=f/2,m=f/2,h=f/2-8,v=h*.62,w=j.useMemo(()=>{let z=0;const C=ad,T=360-r.length*C;return r.map((I,$)=>{const F=I.color??c.series[$%c.series.length],S=x>0?Math.abs(I.value)/x:0,N=S*T,B=z,E=z+N;return z=E+C,{...I,startDeg:B,endDeg:E,color:F,proportion:S}})},[r,x]),k=z=>Ge(z,n,s),L=z=>Ge(z,n,s);return e.jsxs("svg",{width:a,height:u,viewBox:`0 0 ${a} ${u}`,"aria-hidden":"true",style:{display:"block"},children:[e.jsxs("g",{transform:`translate(${(a-f)/2}, 0)`,children:[w.map(z=>e.jsx("path",{d:nd(g,m,h,v,z.startDeg,z.endDeg),fill:z.color},z.label)),e.jsx("text",{x:g,y:m-6,textAnchor:"middle",style:{fontSize:18,fontFamily:J,fontWeight:300,fill:c.text},children:k(x)}),o&&e.jsx("text",{x:g,y:m+14,textAnchor:"middle",style:{fontSize:9,fontFamily:ee,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",fill:c.axisLabel},children:o})]}),e.jsx("g",{transform:`translate(12, ${f+8})`,children:w.map((z,C)=>{const T=C%2,I=Math.floor(C/2),$=T*(a/2-6),F=I*20;return e.jsxs("g",{transform:`translate(${$}, ${F})`,children:[e.jsx("circle",{cx:5,cy:6,r:5,fill:z.color}),e.jsx("text",{x:14,y:11,style:{fontSize:d?9:10,fontFamily:ee,fill:c.axisLabel},children:z.label.length>18?z.label.slice(0,17)+"…":z.label}),e.jsx("text",{x:a/2-18,y:11,textAnchor:"end",style:{fontSize:10,fontFamily:J,fontWeight:600,fill:c.text},children:L(z.value)})]},z.label)})})]})}function ld({data:r,config:t}){const{width:o,height:a,valueType:n,currency:s="$",renderMode:l="web"}=t,c=le(t),d=l==="pdf",x=o-Y.left-Y.right,p=a-Y.top-Y.bottom,f=r.findIndex(D=>D.isForecast),u=f!==-1,g=u?r.slice(0,f):r,m=u?r.slice(f):[],h=j.useMemo(()=>{const D=r.map(_=>_.value);return r.forEach(_=>{_.upperBound!==void 0&&D.push(_.upperBound),_.lowerBound!==void 0&&D.push(_.lowerBound)}),D},[r]),v=fr(h),w=Ke(v,[p,0]),k=w(0),L=Ze(v[0],v[1],5),z=r.length>1?x/(r.length-1):0,C=D=>D*z,T=g.map((D,_)=>[C(_),w(D.value)]),I=m.map((D,_)=>[C(f+_),w(D.value)]),$=T.length?[T[T.length-1],...I]:I,F=ir(T),S=kr(F,T,k),N=ir($),B=kr(N,$,k),E=m.some(D=>D.upperBound!==void 0&&D.lowerBound!==void 0),V=E?m.map((D,_)=>({upper:[C(f+_),w(D.upperBound??D.value)],lower:[C(f+_),w(D.lowerBound??D.value)]})):[];let H="";if(V.length>0){const D=ir(V.map(re=>re.upper)),fe=[...V].reverse().map(re=>re.lower).map((re,K)=>`L ${re[0]},${re[1]}`).join(" ");H=`${D} ${fe} Z`}const W=u?C(f):null,O=T[T.length-1],M=D=>xe(D,n,s);return e.jsx("svg",{width:o,height:a,viewBox:`0 0 ${o} ${a}`,"aria-hidden":"true",style:{display:"block",overflow:"visible"},children:e.jsxs("g",{transform:`translate(${Y.left},${Y.top})`,children:[L.map(D=>{const _=w(D);return e.jsxs("g",{children:[e.jsx("line",{x1:0,y1:_,x2:x,y2:_,stroke:c.grid,strokeWidth:1}),e.jsx("text",{x:-8,y:_,textAnchor:"end",dominantBaseline:"middle",style:{fontSize:10,fontFamily:J,fill:c.axisLabel},children:M(D)})]},D)}),E&&H&&e.jsx("path",{d:H,fill:c.forecastBand,stroke:"none"}),T.length>1&&e.jsx("path",{d:S,fill:c.areaFill,stroke:"none"}),T.length>1&&e.jsx("path",{d:F,fill:"none",stroke:c.primary,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),I.length>0&&e.jsx("path",{d:B,fill:c.forecastFill,stroke:"none"}),I.length>0&&e.jsx("path",{d:N,fill:"none",stroke:c.primary,strokeWidth:1.5,strokeDasharray:"5,4",strokeLinecap:"round",strokeLinejoin:"round"}),O&&e.jsx("circle",{cx:O[0],cy:O[1],r:4,fill:c.primary,stroke:"#fff",strokeWidth:1.5}),W!==null&&e.jsx("line",{x1:W,y1:0,x2:W,y2:p,stroke:c.grid,strokeWidth:1,strokeDasharray:"3,3"}),W!==null&&e.jsx("text",{x:W+5,y:p*.2,style:{fontSize:d?8:9,fontFamily:ee,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",fill:c.axisLabel},children:"FORECAST"}),r.map((D,_)=>r.length>14&&_%2!==0?null:e.jsx("text",{x:C(_),y:p+16,textAnchor:"middle",style:{fontSize:d?9:10,fontFamily:ee,fill:c.axisLabel},children:D.label},D.label))]})})}const id=6,gt=12;function cd({data:r,config:t,labelGutter:o=130}){const{width:a,height:n,valueType:s,currency:l="$"}=t,c=le(t),d=j.useMemo(()=>Math.max(...r.map(v=>v.value),1),[r]),p=Math.max(80,a-o-110),f=r.length,u=(n-20)/f,g=Math.max(18,u-gt-id),m=o+p/2,h=r.map((v,w)=>{const k=v.value/d*p,L=10+w*u;return{...v,width:k,y:L}});return e.jsx("svg",{width:a,height:n,style:{fontFamily:ee},role:"img",children:h.map((v,w)=>{const k=m-v.width/2,L=w>0?v.value/h[w-1].value*100:null,z=xe(v.value,s,l,!0),C=h[w+1];return e.jsxs("g",{children:[e.jsx("text",{x:o-10,y:v.y+g/2,textAnchor:"end",dominantBaseline:"central",fontSize:12,fill:c.text,fontWeight:500,children:v.label}),L!==null&&e.jsxs("text",{x:m,y:v.y-4,textAnchor:"middle",fontSize:10,fontFamily:J,fill:c.axisLabel,children:[L.toFixed(0),"% ↓"]}),e.jsx("rect",{x:k,y:v.y,width:v.width,height:g,rx:3,fill:c.primary,opacity:.85-w*.08}),C&&e.jsx("path",{d:(()=>{const T=k,I=k+v.width,$=m-C.width/2,F=m+C.width/2,S=v.y+g,N=S+gt;return`M${T},${S} L${I},${S} L${F},${N} L${$},${N} Z`})(),fill:c.primary,opacity:.15}),e.jsx("text",{x:o+p+10,y:v.y+g/2-6,fontSize:12,fontFamily:J,fill:c.text,fontWeight:500,children:z}),v.count!==void 0&&e.jsxs("text",{x:o+p+10,y:v.y+g/2+8,fontSize:10,fill:c.axisLabel,children:[v.count.toLocaleString("en")," ",v.count===1?"deal":"deals"]})]},v.label)})})}const Te=34,Le=12;function dd({data:r,config:t,labelGutter:o=140,readoutGutter:a=120}){const{width:n,valueType:s,currency:l="$"}=t,c=le(t),d=o,x=Math.max(80,n-o-a);return e.jsx("svg",{width:n,height:Math.max(t.height,r.length*Te+16),style:{fontFamily:ee},role:"img",children:r.map((p,f)=>{const u=p.bands??[p.target*.6,p.target,p.target*1.3],g=Math.max(u[2],p.actual,p.target)*1.02,m=T=>Math.max(0,Math.min(T,g))/g*x,h=12+f*Te,v=h+(Te-Le)/2,w=m(u[0]),k=m(u[1]),L=m(u[2]),z=m(p.actual),C=d+m(p.target);return e.jsxs("g",{children:[e.jsx("text",{x:o-10,y:h+Te/2,textAnchor:"end",dominantBaseline:"central",fontSize:12,fill:c.text,fontWeight:500,children:p.label}),e.jsx("rect",{x:d,y:v-6,width:L,height:Le+12,fill:"#d4d8e3",rx:2}),e.jsx("rect",{x:d,y:v-6,width:k,height:Le+12,fill:"#e5e7f0",rx:2}),e.jsx("rect",{x:d,y:v-6,width:w,height:Le+12,fill:"#f0f1f7",rx:2}),e.jsx("rect",{x:d,y:v,width:z,height:Le,fill:p.actual>=p.target?c.positive:c.primary,rx:2}),e.jsx("line",{x1:C,x2:C,y1:v-6,y2:v+Le+6,stroke:c.total,strokeWidth:2}),e.jsx("text",{x:n-10,y:h+Te/2-6,textAnchor:"end",fontSize:12,fontFamily:J,fill:c.text,fontWeight:500,children:xe(p.actual,s,l,!0)}),e.jsxs("text",{x:n-10,y:h+Te/2+8,textAnchor:"end",fontSize:10,fontFamily:J,fill:c.axisLabel,children:["/ ",xe(p.target,s,l,!0)]})]},p.label)})})}function pd(r,t,o){const a=c=>[parseInt(c.slice(1,3),16),parseInt(c.slice(3,5),16),parseInt(c.slice(5,7),16)],n=a(r),s=a(t);return"#"+n.map((c,d)=>Math.round(c+(s[d]-c)*o)).map(c=>c.toString(16).padStart(2,"0")).join("")}function xd({rows:r,cols:t,values:o,config:a,labelGutter:n=110,topGutter:s=28}){const{width:l,height:c,valueType:d,currency:x="$",showDataLabels:p=!0}=a,f=le(a),{min:u,max:g}=j.useMemo(()=>{let k=1/0,L=-1/0;for(const z of o)for(const C of z)C<k&&(k=C),C>L&&(L=C);return isFinite(k)||(k=0,L=1),k===L&&(L=k+1),{min:k,max:L}},[o]),m=(l-n-8)/t.length,h=(c-s-8)/r.length,v="#ffffff",w=f.primary;return e.jsxs("svg",{width:l,height:c,style:{fontFamily:ee},role:"img",children:[t.map((k,L)=>e.jsx("text",{x:n+L*m+m/2,y:s-8,textAnchor:"middle",fontSize:10,fontWeight:600,fill:f.axisLabel,style:{letterSpacing:"0.05em",textTransform:"uppercase"},children:k},`col-${k}`)),r.map((k,L)=>e.jsxs("g",{children:[e.jsx("text",{x:n-8,y:s+L*h+h/2,textAnchor:"end",dominantBaseline:"central",fontSize:11,fill:f.text,fontWeight:500,children:k}),t.map((z,C)=>{var E;const T=((E=o[L])==null?void 0:E[C])??0,I=(T-u)/(g-u),$=pd(v,w,Math.max(0,Math.min(1,I))),F=n+C*m+1,S=s+L*h+1,N=m-2,B=h-2;return e.jsxs("g",{children:[e.jsx("rect",{x:F,y:S,width:N,height:B,rx:2,fill:$,stroke:f.grid}),p&&e.jsx("text",{x:F+N/2,y:S+B/2,textAnchor:"middle",dominantBaseline:"central",fontSize:10,fontFamily:J,fill:I>.55?"#fff":f.text,children:xe(T,d,x,!0)})]},`c-${L}-${C}`)})]},`row-${k}`))]})}function fd({accent:r,width:t,height:o}){return e.jsxs("svg",{viewBox:`0 0 ${t} ${o}`,width:t,height:o,xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid slice",children:[e.jsx("rect",{width:t,height:o,fill:"#000626"}),e.jsx("ellipse",{cx:t*.8,cy:o*.85,rx:t*.7,ry:o*.55,fill:r,opacity:"0.18"}),e.jsx("ellipse",{cx:t*.15,cy:o*.25,rx:t*.55,ry:o*.4,fill:r,opacity:"0.12"}),e.jsx("path",{d:`M ${t*.4},0 Q ${t*1.1},${o*.3} ${t*.6},${o}`,fill:"none",stroke:r,strokeWidth:t*.025,opacity:"0.4",strokeLinecap:"round"}),e.jsx("circle",{cx:t*.78,cy:o*.22,r:t*.08,fill:r,opacity:"0.25"}),e.jsx("circle",{cx:t*.6,cy:o*.55,r:t*.04,fill:r,opacity:"0.5"})]})}function ud({accent:r,width:t,height:o}){return e.jsxs("svg",{viewBox:`0 0 ${t} ${o}`,width:t,height:o,xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid slice",children:[e.jsx("rect",{width:t,height:o,fill:"#000626"}),e.jsx("rect",{x:0,y:o*.6,width:t,height:o*.4,fill:"#01082f"}),e.jsx("circle",{cx:t*.55,cy:o*.38,r:t*.14,fill:r,opacity:"0.9"}),e.jsx("rect",{x:t*.4,y:o*.61,width:t*.3,height:o*.12,fill:r,opacity:"0.15"}),e.jsx("line",{x1:t*.3,y1:o*.6,x2:t*.32,y2:o*.3,stroke:"#fff",strokeWidth:1.5,opacity:"0.4"}),e.jsx("line",{x1:t*.7,y1:o*.6,x2:t*.68,y2:o*.2,stroke:"#fff",strokeWidth:1.5,opacity:"0.4"}),[.65,.72,.8,.9].map((a,n)=>e.jsx("line",{x1:0,y1:o*a,x2:t,y2:o*a,stroke:"#fff",strokeWidth:.5,opacity:.06},n))]})}function gd({accent:r,width:t,height:o}){return e.jsxs("svg",{viewBox:`0 0 ${t} ${o}`,width:t,height:o,xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid slice",children:[e.jsx("rect",{width:t,height:o,fill:"#01240e"}),e.jsx("path",{d:`M ${t*.5},${o*.1} C ${t*1.2},${o*.1} ${t*1},${o*.9} ${t*.5},${o*.95} C ${t*0},${o*.9} ${t*-.2},${o*.1} ${t*.5},${o*.1}Z`,fill:"#71d481",opacity:"0.18"}),e.jsx("path",{d:`M ${t*.8},${o*-.05} C ${t*1.5},${o*.3} ${t*.9},${o*.8} ${t*.4},${o*.9} C ${t*0},${o*.6} ${t*.2},${o*-.1} ${t*.8},${o*-.05}Z`,fill:"#71d481",opacity:"0.14"}),e.jsx("circle",{cx:t*.5,cy:o*.5,r:t*.03,fill:r,opacity:"0.7"}),e.jsx("line",{x1:t*.5,y1:o*.1,x2:t*.5,y2:o*.95,stroke:"#71d481",strokeWidth:1.5,opacity:"0.3"})]})}function md({accent:r,width:t,height:o}){return e.jsxs("svg",{viewBox:`0 0 ${t} ${o}`,width:t,height:o,xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid slice",children:[e.jsx("rect",{width:t,height:o,fill:"#000626"}),e.jsx("polygon",{points:`${t*0},${o*1} ${t*1},${o*0} ${t*1},${o*1}`,fill:r,opacity:"0.15"}),e.jsx("polygon",{points:`${t*.2},${o*0} ${t*.6},${o*0} ${t*0},${o*.7} ${t*0},${o*.3}`,fill:"#fff",opacity:"0.04"}),e.jsx("polygon",{points:`${t*.5},${o*0} ${t*1},${o*.4} ${t*.5},${o*.5}`,fill:r,opacity:"0.25"}),[.3,.5,.7,.9].map(a=>[.2,.5,.8].map(n=>e.jsx("circle",{cx:t*n,cy:o*a,r:2,fill:"#fff",opacity:"0.12"},`${n}-${a}`)))]})}function hd({style:r,accent:t,width:o,height:a}){switch(r){case"marina":return e.jsx(ud,{accent:t,width:o,height:a});case"leaves":return e.jsx(gd,{accent:t,width:o,height:a});case"abstract":return e.jsx(md,{accent:t,width:o,height:a});default:return e.jsx(fd,{accent:t,width:o,height:a})}}function bd({config:r,renderMode:t="pdf",width:o=794,height:a=1122}){const{entityName:n,reportTitle:s="Monthly Management Report",period:l,preparedBy:c,logoUrl:d,heroStyle:x="curves",accentColor:p="#e15713",publishedDate:f}=r,u=t==="pdf",g=Math.round(o*.52),m=o-g,h=6;return e.jsxs("div",{style:{width:o,height:a,display:"flex",flexDirection:"row",overflow:"hidden",fontFamily:"'Geist', system-ui, sans-serif",backgroundColor:"#fff",position:"relative"},children:[e.jsxs("div",{style:{width:g,height:a,display:"flex",flexDirection:"column",padding:u?"44px 36px 44px 44px":"56px 48px 56px 56px",boxSizing:"border-box",position:"relative",zIndex:1,backgroundColor:"#fff"},children:[e.jsx("div",{style:{marginBottom:"auto"},children:d?e.jsx("img",{src:d,alt:n,style:{maxHeight:u?36:44,maxWidth:g*.55,objectFit:"contain"}}):e.jsx("div",{style:{fontSize:u?14:16,fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",color:"#000626"},children:n})}),e.jsxs("div",{style:{marginTop:"auto",marginBottom:"auto"},children:[e.jsx("div",{style:{width:36,height:4,borderRadius:2,backgroundColor:p,marginBottom:u?18:24}}),e.jsx("h1",{style:{margin:"0 0 10px 0",fontSize:u?26:32,fontWeight:500,color:"#000626",lineHeight:1.15},children:n}),e.jsx("div",{style:{fontSize:u?14:17,fontWeight:400,color:"#595f7a",marginBottom:u?6:8},children:s}),e.jsx("div",{style:{fontSize:u?13:15,fontWeight:400,color:"#8c92af"},children:l})]}),e.jsxs("div",{style:{marginTop:"auto",paddingTop:24},children:[c&&e.jsx("div",{style:{fontSize:u?8:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.10em",color:"#8c92af",marginBottom:4},children:"Prepared by"}),c&&e.jsx("div",{style:{fontSize:u?10:12,color:"#595f7a"},children:c}),f&&e.jsx("div",{style:{fontSize:u?9:10,color:"#c8cce0",marginTop:4},children:f})]})]}),e.jsx("div",{style:{width:h,height:a,backgroundColor:p,flexShrink:0}}),e.jsx("div",{style:{flex:1,height:a,overflow:"hidden",position:"relative"},children:e.jsx(hd,{style:x,accent:p,width:m-h,height:a})})]})}const vd={Critical:"#000626",High:"#e15713",Medium:"#8c92af",Low:"#c8cce0"},mt={up:"#71d481",down:"#fb6060",flat:"#8c92af"},yd={up:"▲",down:"▼",flat:"—"};function jd({met:r}){return r==null?null:e.jsx("span",{style:{color:r?"#71d481":"#fb6060",fontWeight:700,fontSize:12},children:r?"✓":"×"})}function wd({rows:r,renderMode:t="web"}){const o=t==="pdf",a=o?9:11,n=o?8:10,s=r.reduce((x,p)=>{const f=`${p.categoryLetter}:${p.category}`;return x.has(f)||x.set(f,[]),x.get(f).push(p),x},new Map),l=r.some(x=>x.target!==null&&x.target!==void 0),c=r.filter(x=>x.lowerIsBetter&&x.footnoteMarker),d=o?"5px 8px":"7px 10px";return e.jsxs("div",{style:{fontFamily:"'Geist', system-ui, sans-serif",breakInside:"avoid",pageBreakInside:"avoid"},children:[e.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",tableLayout:"fixed"},children:[e.jsxs("colgroup",{children:[e.jsx("col",{style:{width:"28%"}}),e.jsx("col",{style:{width:"14%"}}),l&&e.jsx("col",{style:{width:"12%"}}),l&&e.jsx("col",{style:{width:"6%"}}),e.jsx("col",{style:{width:l?"24%":"36%"}}),e.jsx("col",{style:{width:"16%"}})]}),e.jsx("thead",{children:e.jsx("tr",{style:{borderBottom:"2px solid #e5e7f0"},children:["METRIC","RESULT",...l?["TARGET",""]:[],"TREND","IMPORTANCE"].map(x=>e.jsx("th",{style:{padding:d,fontSize:n,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"#8c92af",textAlign:x==="RESULT"||x==="TARGET"?"right":"left",paddingBottom:8},children:x},x))})}),e.jsx("tbody",{children:[...s.entries()].map(([x,p])=>{const f=p[0];return e.jsxs(j.Fragment,{children:[e.jsx("tr",{style:{breakInside:"avoid",pageBreakInside:"avoid",borderTop:"1px solid #e5e7f0"},children:e.jsx("td",{colSpan:l?6:4,style:{padding:`${o?6:8}px ${o?8:10}px`,paddingTop:o?10:14},children:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:o?16:20,height:o?16:20,borderRadius:4,backgroundColor:f.categoryColor,color:"#fff",fontSize:o?9:11,fontWeight:700,flexShrink:0,fontFamily:"'Geist Mono', monospace"},children:f.categoryLetter}),e.jsx("span",{style:{fontSize:o?9:11,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"#000626"},children:f.category})]})})}),p.map((u,g)=>e.jsxs("tr",{style:{backgroundColor:g%2===0?"transparent":"rgba(229,231,240,0.2)",breakInside:"avoid",pageBreakInside:"avoid"},children:[e.jsxs("td",{style:{padding:d,fontSize:a,color:"#000626"},children:[u.label,u.footnoteMarker&&e.jsx("sup",{style:{color:"#8c92af",fontSize:a-2},children:u.footnoteMarker})]}),e.jsx("td",{style:{padding:d,fontSize:a,fontFamily:"'Geist Mono', monospace",fontWeight:600,color:"#000626",textAlign:"right"},children:u.result}),l&&e.jsx("td",{style:{padding:d,fontSize:a,fontFamily:"'Geist Mono', monospace",color:"#8c92af",textAlign:"right"},children:u.target??"—"}),l&&e.jsx("td",{style:{padding:d,textAlign:"center"},children:e.jsx(jd,{met:u.targetMet})}),e.jsxs("td",{style:{padding:d,fontSize:a},children:[e.jsxs("span",{style:{color:mt[u.trendDirection],fontWeight:600},children:[yd[u.trendDirection]," "]}),e.jsx("span",{style:{fontFamily:"'Geist Mono', monospace",color:mt[u.trendDirection],fontWeight:600},children:u.trendValue}),e.jsx("span",{style:{color:"#8c92af",marginLeft:4,fontSize:o?8:9},children:u.trendPeriod})]}),e.jsx("td",{style:{padding:d},children:e.jsx("span",{style:{fontSize:o?8:10,fontWeight:600,color:vd[u.importance]??"#8c92af",textTransform:"uppercase",letterSpacing:"0.06em"},children:u.importance})})]},u.label))]},x)})})]}),c.length>0&&e.jsx("div",{style:{marginTop:12,paddingTop:8,borderTop:"1px solid #e5e7f0",fontSize:o?8:9,color:"#8c92af"},children:c.map(x=>e.jsxs("div",{children:[e.jsx("sup",{children:x.footnoteMarker})," ",x.label,": lower values indicate better performance"]},x.label))})]})}function Cd({size:r}){return e.jsx("svg",{width:r,height:r,viewBox:"0 0 18 18",fill:"none",children:e.jsx("path",{d:"M5 9.5V16H3a1 1 0 01-1-1v-4.5a1 1 0 011-1h2zM6 9.5l2.5-7a1.5 1.5 0 013 0v4.5h3.5a1.5 1.5 0 011.5 1.5l-.9 4.5a1.5 1.5 0 01-1.5 1.5H6V9.5z",fill:"#71d481"})})}function Sd({size:r}){return e.jsx("svg",{width:r,height:r,viewBox:"0 0 18 18",fill:"none",children:e.jsx("path",{d:"M13 8.5V2H15a1 1 0 011 1v4.5a1 1 0 01-1 1h-2zM12 8.5l-2.5 7a1.5 1.5 0 01-3 0v-4.5H3a1.5 1.5 0 01-1.5-1.5l.9-4.5A1.5 1.5 0 013.9 3.5H12V8.5z",fill:"#fb6060"})})}function kd({size:r}){return e.jsx("svg",{width:r,height:r,viewBox:"0 0 18 18",fill:"none",children:e.jsx("rect",{x:"3",y:"8",width:"12",height:"2",rx:"1",fill:"#8c92af"})})}function Nd({status:r,size:t}){return r==="positive"?e.jsx(Cd,{size:t}):r==="negative"?e.jsx(Sd,{size:t}):e.jsx(kd,{size:t})}function Uo({observations:r,renderMode:t="web"}){const o=t==="pdf",a=o?14:18;return e.jsx("div",{style:{fontFamily:"'Geist', system-ui, sans-serif"},children:r.map((n,s)=>e.jsxs("div",{style:{display:"flex",gap:o?12:16,alignItems:"flex-start",paddingTop:o?10:14,paddingBottom:o?10:14,borderBottom:s<r.length-1?"1px solid #e5e7f0":"none",breakInside:"avoid",pageBreakInside:"avoid"},children:[e.jsx("div",{style:{flexShrink:0,paddingTop:2},children:e.jsx(Nd,{status:n.status,size:a})}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontSize:9,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.10em",color:"#8c92af",marginBottom:3},children:n.category}),e.jsxs("div",{style:{marginBottom:o?3:4},children:[e.jsx("span",{style:{fontSize:o?11:13,fontWeight:700,color:"#000626"},children:n.headline}),n.context&&e.jsx("span",{style:{fontSize:o?11:13,fontWeight:400,color:"#8c92af",marginLeft:6},children:n.context})]}),e.jsx("p",{style:{margin:0,fontSize:o?10:12,fontWeight:400,color:"#595f7a",lineHeight:1.6},children:n.narrative})]})]},n.category))})}function zd({commentary:r,actions:t,observations:o,renderMode:a="web"}){const n=a==="pdf";return e.jsxs("div",{style:{fontFamily:"'Geist', system-ui, sans-serif"},children:[e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"60% 40%",gap:n?24:32,marginBottom:n?24:32,alignItems:"start"},children:[e.jsx("div",{children:r.map((s,l)=>e.jsxs("div",{style:{marginBottom:n?12:16},children:[s.heading&&e.jsx("div",{style:{fontSize:n?10:12,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"#000626",marginBottom:n?4:6},children:s.heading}),e.jsx("p",{style:{margin:0,fontSize:n?10:13,lineHeight:1.65,color:"#000626"},children:s.body})]},l))}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:n?9:11,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"#8c92af",marginBottom:n?8:12},children:"Key Actions"}),e.jsx("ul",{style:{margin:0,padding:0,listStyle:"none"},children:t.map((s,l)=>e.jsxs("li",{style:{display:"flex",gap:10,alignItems:"flex-start",marginBottom:n?7:10,fontSize:n?10:13,lineHeight:1.8,color:"#000626"},children:[e.jsx("span",{style:{color:"#e15713",fontWeight:700,fontSize:14,lineHeight:1.6,flexShrink:0},children:"•"}),e.jsx("span",{children:s})]},l))})]})]}),o.length>0&&e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:n?9:11,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"#000626",borderBottom:"2px solid #e5e7f0",paddingBottom:n?6:8,marginBottom:0},children:"KPI Observations"}),e.jsx(Uo,{observations:o,renderMode:a})]})]})}const jr="'Geist Mono', ui-monospace, monospace",ht="#71d481",bt="#fb6060",$e="#8c92af",Td="#595f7a",Ld="#000626",Yo="#e5e7f0";function $d({data:r,color:t,width:o=80,height:a=22}){if(r.length<2)return null;const n=Math.min(...r),l=Math.max(...r)-n||1,c=2,d=r.map((p,f)=>({x:c+f/(r.length-1)*(o-c*2),y:c+(1-(p-n)/l)*(a-c*2)}));let x=`M ${d[0].x},${d[0].y}`;for(let p=1;p<d.length;p++){const f=d[p-1],u=d[p],g=(f.x+u.x)/2;x+=` C ${g},${f.y} ${g},${u.y} ${u.x},${u.y}`}return e.jsx("svg",{width:o,height:a,viewBox:`0 0 ${o} ${a}`,style:{display:"block",overflow:"visible"},children:e.jsx("path",{d:x,fill:"none",stroke:t,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function Ko({label:r,value:t,comparison:o,comparisonLabel:a,trend:n,target:s,description:l,sparklineData:c,renderMode:d="web",_last:x=!1}){const p=d==="pdf",f=p?"10px 12px":"16px 20px",u=p?22:28,g=p?8:9,m=n==null?$e:n.favorable!=null?n.favorable?ht:bt:n.direction==="up"?ht:n.direction==="down"?bt:$e,h=n==null?"":n.direction==="up"?"▲ ":n.direction==="down"?"▼ ":"";return e.jsxs("div",{style:{padding:f,background:"#ffffff",borderRight:x?void 0:`1px solid ${Yo}`,display:"flex",flexDirection:"column",gap:p?4:6},children:[e.jsx("div",{style:{fontSize:g,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.1em",color:$e},children:r}),e.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:12,justifyContent:"space-between"},children:[e.jsx("div",{style:{fontSize:u,fontWeight:300,fontFamily:jr,color:Ld,lineHeight:1,letterSpacing:"-0.01em"},children:t}),c&&c.length>=2&&e.jsx("div",{style:{marginBottom:2},children:e.jsx($d,{data:c,color:m,width:80,height:22})})]}),n&&e.jsxs("div",{style:{fontSize:11,fontWeight:500,color:m,lineHeight:1.2},children:[h,n.value]}),o&&e.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:6},children:[e.jsx("span",{style:{fontSize:13,fontFamily:jr,color:$e},children:o}),a&&e.jsx("span",{style:{fontSize:10,color:$e},children:a})]}),s&&e.jsxs("div",{style:{fontSize:11,color:$e,display:"flex",gap:4},children:[e.jsx("span",{style:{fontWeight:600},children:"Target"}),e.jsx("span",{style:{fontFamily:jr},children:s})]}),l&&e.jsx("div",{style:{fontSize:11,color:Td,lineHeight:1.5,marginTop:2},children:l})]})}function Md({cards:r,renderMode:t="web"}){return r.length===0?null:e.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${r.length}, 1fr)`,border:`1px solid ${Yo}`,borderRadius:8,overflow:"hidden"},children:r.map((o,a)=>e.jsx(Ko,{...o,renderMode:t,_last:a===r.length-1},a))})}const Ad="'Geist Mono', ui-monospace, monospace",Rd="#71d481",Fd="#fb6060",Bd="#f5f6fa",Id="#e5e7f0",sr="#8c92af",Dd="#000626",vt={Critical:0,High:1,Medium:2,Low:3};function yt(r,t,o,a,n,s){if(a<=o+.5)return"";const l=s-n>Math.PI?1:0,c=Math.cos(n),d=Math.sin(n),x=Math.cos(s),p=Math.sin(s),f=u=>u.toFixed(2);return[`M ${f(r+o*c)},${f(t+o*d)}`,`A ${o},${o} 0 ${l} 1 ${f(r+o*x)},${f(t+o*p)}`,`L ${f(r+a*x)},${f(t+a*p)}`,`A ${a},${a} 0 ${l} 0 ${f(r+a*c)},${f(t+a*d)}`,"Z"].join(" ")}function Wd({items:r,period:t,onTrackCount:o,offTrackCount:a,renderMode:n="web",width:s=500}){const l=n==="pdf",c=r.length;if(c===0)return null;const d=[...r].sort((F,S)=>{const N=(vt[F.importance]??3)-(vt[S.importance]??3);return N!==0?N:F.label.localeCompare(S.label)}),x=o+a,p=x>0?Math.round(o/x*100):0,f=560,u=560,g=280,m=280,h=188,v=42,w=h+24,z=2*Math.PI/c/2-.015,C=Math.round(u*(s/f));function T(F){return F/c*2*Math.PI-Math.PI/2}function I(F){return F.targetMet===!0?Rd:F.targetMet===!1?Fd:sr}function $(F){return F.targetMet===!0?"rgba(113,212,129,0.10)":F.targetMet===!1?"rgba(251,96,96,0.08)":Bd}return e.jsxs("svg",{width:s,height:C,viewBox:`0 0 ${f} ${u}`,style:{display:"block",overflow:"visible"},children:[d.map((F,S)=>{const N=T(S),B=N-z,E=N+z,V=v+Math.max(2,Math.min(F.score/100,1)*(h-v)),H=g+w*Math.cos(N),W=m+w*Math.sin(N),O=N*180/Math.PI+90,M=O>90&&O<270?O+180:O,D=F.label.length>22?`${F.label.slice(0,20)}…`:F.label;return e.jsxs("g",{children:[e.jsx("path",{d:yt(g,m,v,h,B,E),fill:$(F)}),e.jsx("path",{d:yt(g,m,v,V,B,E),fill:I(F),opacity:F.targetMet===null?.5:.88}),e.jsx("text",{x:0,y:0,textAnchor:"middle",dominantBaseline:"middle",fontSize:l?7:8.5,fill:sr,transform:`translate(${H.toFixed(1)},${W.toFixed(1)}) rotate(${M.toFixed(1)})`,children:D})]},S)}),e.jsx("circle",{cx:g,cy:m,r:v-1,fill:"white"}),e.jsx("circle",{cx:g,cy:m,r:h,fill:"none",stroke:Id,strokeWidth:.75}),e.jsxs("text",{x:g,y:m-5,textAnchor:"middle",dominantBaseline:"auto",fontSize:20,fontWeight:300,fontFamily:Ad,fill:Dd,children:[p,"%"]}),e.jsx("text",{x:g,y:m+7,textAnchor:"middle",dominantBaseline:"hanging",fontSize:7,letterSpacing:"0.07em",fill:sr,children:"ON TRACK"}),e.jsxs("text",{x:g,y:u-8,textAnchor:"middle",dominantBaseline:"auto",fontSize:9,fill:sr,children:[`${o} on track · ${a} off track`,r.length>x?` · ${r.length-x} no target`:"",t?` · ${t}`:""]})]})}const Xe="'Geist Mono', ui-monospace, monospace",Fr="#71d481",Br="#fb6060",oe="#000626",Zo="#f5f6fa",Nr="#e5e7f0",be="#8c92af",Pd="#D6F4FF",Xo="#00bcd4",Ed="rgba(0,188,212,0.06)",jt="rgba(0,188,212,0.15)";function ce(r,t){const o=Math.abs(r),a=r<0?"-":"",n=o.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0});return`${a}${t}${n}`}function Ir(r){return`${r>0?"+":""}${r.toFixed(1)}%`}function Dr(r,t){return`${r>0?"+":""}${ce(r,t)}`}function Vd({rows:r,period:t,showForecast:o=!1,currency:a="$",renderMode:n="web"}){const s=n==="pdf",l=n==="excel",c=s||l,d=c?"5px 8px":"9px 14px",x=c?"0 8px":"0 14px",p=c?24:34,f=c?11:13,u=c?8:9;return e.jsx("div",{style:{border:`1px solid ${Nr}`,borderRadius:l?0:8,overflow:"hidden"},children:e.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},children:[e.jsx("thead",{children:e.jsxs("tr",{style:{height:p,background:oe},children:[e.jsx("th",{style:{padding:x,paddingLeft:c?12:20,textAlign:"left",fontSize:u,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"#ffffff",whiteSpace:"nowrap"},children:t?`Item · ${t}`:"Item"}),e.jsx("th",{style:He(u,x),children:"Budget"}),e.jsx("th",{style:He(u,x),children:"Actual"}),o&&e.jsx("th",{style:He(u,x),children:"Forecast"}),e.jsx("th",{style:He(u,x),children:"Variance $"}),e.jsx("th",{style:He(u,x),children:"Variance %"})]})}),e.jsx("tbody",{children:r.map((g,m)=>{if(g.isSectionHeader)return e.jsx("tr",{style:{background:Ed,borderTop:m>0?`1px solid ${jt}`:void 0,borderBottom:`1px solid ${jt}`,borderLeft:`3px solid ${Xo}`},children:e.jsx("td",{colSpan:o?6:5,style:{padding:c?"4px 8px":"6px 14px",paddingLeft:c?12:20,fontSize:c?8:9,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:oe},children:g.label})},m);if(g.isGrandTotal)return e.jsx(_d,{row:g,currency:a,showForecast:o,compact:c,fontSize:f},m);if(g.isTotal)return e.jsx(Hd,{row:g,currency:a,showForecast:o,compact:c,fontSize:f},m);const h=(g.indent??0)*(c?10:14),v=g.budget!=null,w=g.actual!=null,k=v&&w?g.actual-g.budget:null,L=v&&w&&g.budget!==0?(g.actual-g.budget)/Math.abs(g.budget)*100:null,z=k==null?null:g.isNegativeGood?k<0:k>0,C=z==null?be:z?Fr:Br;return e.jsxs("tr",{style:{background:"#ffffff",borderBottom:`1px solid ${Zo}`},children:[e.jsx("td",{style:{padding:d,paddingLeft:(c?12:20)+h,fontSize:f,color:oe,whiteSpace:c?"nowrap":void 0},children:g.label}),e.jsx("td",{style:ae(f,d,be),children:v?ce(g.budget,a):"—"}),e.jsx("td",{style:ae(f,d,oe),children:w?ce(g.actual,a):"—"}),o&&e.jsx("td",{style:ae(f,d,be),children:g.forecast!=null?ce(g.forecast,a):"—"}),e.jsx("td",{style:ae(f,d,C),children:k!=null?Dr(k,a):"—"}),e.jsx("td",{style:{padding:d,textAlign:"right"},children:L!=null?e.jsx("span",{style:{display:"inline-block",padding:"1px 5px",borderRadius:4,fontSize:c?10:11,fontWeight:600,fontFamily:Xe,color:C,background:z==null?"transparent":z?"rgba(113,212,129,0.10)":"rgba(251,96,96,0.09)"},children:Ir(L)}):e.jsx("span",{style:{color:be,fontSize:f},children:"—"})})]},m)})})]})})}function He(r,t){return{padding:t,textAlign:"right",fontSize:r,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"#ffffff",fontFamily:Xe,whiteSpace:"nowrap"}}function ae(r,t,o){return{padding:t,textAlign:"right",fontSize:r,fontFamily:Xe,fontVariantNumeric:"tabular-nums",color:o,whiteSpace:"nowrap"}}function Hd({row:r,currency:t,showForecast:o,compact:a,fontSize:n}){const s=r.budget!=null,l=r.actual!=null,c=s&&l?r.actual-r.budget:null,d=s&&l&&r.budget!==0?(r.actual-r.budget)/Math.abs(r.budget)*100:null,x=c==null?null:r.isNegativeGood?c<0:c>0,p=x==null?be:x?Fr:Br,f=a?"5px 8px":"8px 14px";return e.jsxs("tr",{style:{background:Zo,borderTop:`1px solid ${Nr}`,borderBottom:`1px solid ${Nr}`},children:[e.jsx("td",{style:{padding:f,paddingLeft:a?12:20,fontSize:a?9:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.04em",color:oe,whiteSpace:a?"nowrap":void 0},children:r.label}),e.jsx("td",{style:{...ae(n,f,oe),fontWeight:600},children:s?ce(r.budget,t):"—"}),e.jsx("td",{style:{...ae(n,f,oe),fontWeight:600},children:l?ce(r.actual,t):"—"}),o&&e.jsx("td",{style:{...ae(n,f,oe),fontWeight:600},children:r.forecast!=null?ce(r.forecast,t):"—"}),e.jsx("td",{style:{...ae(n,f,p),fontWeight:600},children:c!=null?Dr(c,t):"—"}),e.jsx("td",{style:{padding:f,textAlign:"right"},children:d!=null?e.jsx("span",{style:{display:"inline-block",padding:"1px 5px",borderRadius:4,fontSize:a?10:11,fontWeight:700,fontFamily:Xe,color:p,background:x==null?"transparent":x?"rgba(113,212,129,0.10)":"rgba(251,96,96,0.09)"},children:Ir(d)}):e.jsx("span",{style:{color:be,fontSize:n},children:"—"})})]})}function _d({row:r,currency:t,showForecast:o,compact:a,fontSize:n}){const s=r.budget!=null,l=r.actual!=null,c=s&&l?r.actual-r.budget:null,d=s&&l&&r.budget!==0?(r.actual-r.budget)/Math.abs(r.budget)*100:null,x=c==null?null:r.isNegativeGood?c<0:c>0,p=x==null?be:x?Fr:Br,f=a?24:34,u=a?"0 8px":"0 14px";return e.jsxs("tr",{style:{background:Pd,borderTop:`2px solid ${Xo}`,height:f},children:[e.jsx("td",{style:{padding:u,paddingLeft:a?12:20,fontSize:a?10:12,fontWeight:700,color:oe,whiteSpace:a?"nowrap":void 0},children:r.label}),e.jsx("td",{style:{...ae(n,u,oe),fontWeight:700},children:s?ce(r.budget,t):"—"}),e.jsx("td",{style:{...ae(n,u,oe),fontWeight:700},children:l?ce(r.actual,t):"—"}),o&&e.jsx("td",{style:{...ae(n,u,oe),fontWeight:700},children:r.forecast!=null?ce(r.forecast,t):"—"}),e.jsx("td",{style:{...ae(n,u,p),fontWeight:700},children:c!=null?Dr(c,t):"—"}),e.jsx("td",{style:{padding:u,textAlign:"right"},children:d!=null?e.jsx("span",{style:{display:"inline-block",padding:"1px 5px",borderRadius:4,fontSize:a?10:11,fontWeight:700,fontFamily:Xe,color:p,background:x==null?"transparent":x?"rgba(113,212,129,0.13)":"rgba(251,96,96,0.11)"},children:Ir(d)}):e.jsx("span",{style:{color:be,fontSize:n},children:"—"})})]})}const Od=b("inline-flex items-center whitespace-nowrap",{variants:{variant:{square:"px-2 py-0.5 rounded text-[10px] font-bold uppercase tracking-wider",pill:"px-2.5 py-1 rounded-full text-[11px] font-semibold",entity:"px-2 py-0.5 rounded text-[11px] font-medium"}},defaultVariants:{variant:"pill"}}),qo=j.forwardRef(({className:r,variant:t="pill",bg:o,color:a,style:n,children:s,...l},c)=>e.jsx("span",{ref:c,className:y(Od({variant:t}),r),style:{background:o,color:a,...n},...l,children:s}));qo.displayName="Badge";const Gd=b("bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-[12px]",{variants:{variant:{default:"shadow-sm",elevated:"shadow-md",stat:"shadow-sm"},padding:{none:"",sm:"p-3",md:"p-4",lg:"p-6"}},defaultVariants:{variant:"default",padding:"md"}}),Jo=j.forwardRef(({className:r,variant:t="default",padding:o="md",children:a,...n},s)=>e.jsx("div",{ref:s,className:y(Gd({variant:t,padding:o}),r),...n,children:a}));Jo.displayName="Card";const Qo=j.forwardRef(({className:r,label:t,hint:o,error:a,size:n="medium",disabled:s,...l},c)=>{const d=j.useId(),x=n==="small"?"h-8 text-xs px-2.5 pr-7":"h-10 text-[13px] px-3 pr-8";return e.jsxs("div",{className:"flex flex-col gap-1",children:[t&&e.jsx("label",{className:"text-[11px] font-semibold text-[var(--color-gray-800)]",children:t}),e.jsxs("div",{className:"relative",children:[e.jsx("select",{ref:c,className:y("w-full appearance-none rounded-[6px] border outline-none transition-colors duration-150","bg-[var(--color-white)] text-[var(--color-gray-1000)]",a?"border-[var(--color-red-1000)] bg-[var(--color-red-200)]":"border-[var(--color-gray-200)] focus:border-[var(--color-blue-800)] focus:ring-2 focus:ring-[rgba(21,177,205,0.12)]",s&&"bg-[var(--color-gray-50)] text-[var(--color-gray-600)] cursor-not-allowed",x,r),disabled:s,"aria-invalid":!!a,"aria-describedby":a?d:void 0,...l}),e.jsx("svg",{className:"pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 text-[var(--color-gray-600)]",width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"m6 9 6 6 6-6"})})]}),a&&e.jsx("span",{id:d,className:"text-[11px] text-[var(--color-red-1000)]",role:"alert",children:a}),!a&&o&&e.jsx("span",{className:"text-[11px] text-[var(--color-gray-600)]",children:o})]})});Qo.displayName="Select";const ea=j.forwardRef(({className:r,label:t,hint:o,error:a,showToggle:n=!0,size:s="medium",disabled:l,...c},d)=>{const[x,p]=j.useState(!1),f=j.useId(),u=s==="small"?"h-8 text-xs":"h-10 text-[13px]";return e.jsxs("div",{className:"flex flex-col gap-1",children:[t&&e.jsx("label",{className:"text-[11px] font-semibold text-[var(--color-gray-800)]",children:t}),e.jsxs("div",{className:y("flex items-center rounded-[6px] border transition-colors duration-150",a?"border-[var(--color-red-1000)]":"border-[var(--color-gray-200)] focus-within:border-[var(--color-blue-800)] focus-within:ring-2 focus-within:ring-[rgba(21,177,205,0.12)]",l&&"bg-[var(--color-gray-50)] cursor-not-allowed",u),children:[e.jsx("input",{ref:d,type:x?"text":"password",className:y("flex-1 bg-transparent border-none outline-none px-3 text-[var(--color-gray-1000)]",u,r),disabled:l,"aria-invalid":!!a,"aria-describedby":a?f:void 0,...c}),n&&e.jsx("button",{type:"button",onClick:()=>p(!x),className:"shrink-0 px-2.5 text-[var(--color-gray-600)] bg-transparent border-none cursor-pointer hover:text-[var(--color-gray-800)] transition-colors","aria-label":x?"Hide password":"Show password",tabIndex:-1,children:x?e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94"}),e.jsx("path",{d:"M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19"}),e.jsx("line",{x1:"1",x2:"23",y1:"1",y2:"23"})]}):e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),e.jsx("circle",{cx:"12",cy:"12",r:"3"})]})})]}),a&&e.jsx("span",{id:f,className:"text-[11px] text-[var(--color-red-1000)]",role:"alert",children:a}),!a&&o&&e.jsx("span",{className:"text-[11px] text-[var(--color-gray-600)]",children:o})]})});ea.displayName="PasswordField";const ra=j.forwardRef(({className:r,label:t,hint:o,error:a,suffix:n,size:s="medium",disabled:l,style:c,...d},x)=>{const p=j.useId(),f=s==="small"?"h-8 text-xs px-2":"h-10 text-[13px] px-2.5";return e.jsxs("div",{className:"flex flex-col gap-1",children:[t&&e.jsx("label",{className:"text-[11px] font-semibold text-[var(--color-gray-800)]",children:t}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{ref:x,type:"number",className:y("rounded-[6px] border outline-none transition-colors duration-150 text-right","bg-[var(--color-white)] text-[var(--color-gray-1000)]",a?"border-[var(--color-red-1000)]":"border-[var(--color-gray-200)] focus:border-[var(--color-blue-800)] focus:ring-2 focus:ring-[rgba(21,177,205,0.12)]",l&&"bg-[var(--color-gray-50)] text-[var(--color-gray-600)] cursor-not-allowed",f,r),disabled:l,"aria-invalid":!!a,"aria-describedby":a?p:void 0,style:{width:100,...c},...d}),n&&e.jsx("span",{className:"text-[12px] text-[var(--color-gray-600)] shrink-0",children:n})]}),a&&e.jsx("span",{id:p,className:"text-[11px] text-[var(--color-red-1000)]",role:"alert",children:a}),!a&&o&&e.jsx("span",{className:"text-[11px] text-[var(--color-gray-600)]",children:o})]})});ra.displayName="NumberInput";const Ud=b("flex gap-3 p-3 rounded-[8px] border",{variants:{variant:{success:"bg-[var(--color-green-200)] border-[rgba(113,212,129,0.25)]",error:"bg-[var(--color-red-200)] border-[rgba(251,96,96,0.19)]",warning:"bg-[#fef3c7] border-[rgba(251,191,36,0.25)]",info:"bg-[rgba(21,177,205,0.07)] border-[rgba(21,177,205,0.19)]"}},defaultVariants:{variant:"info"}}),wt=b("text-[13px] font-semibold mb-0.5",{variants:{variant:{success:"text-[var(--color-green-1000)]",error:"text-[var(--color-red-1000)]",warning:"text-[#92400e]",info:"text-[var(--color-blue-800)]"}}}),Yd=b("text-[12px] leading-[1.4]",{variants:{variant:{success:"text-[rgba(26,122,58,0.8)]",error:"text-[rgba(251,96,96,0.8)]",warning:"text-[rgba(146,64,14,0.8)]",info:"text-[rgba(21,177,205,0.8)]"}}}),Kd={success:e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),e.jsx("path",{d:"m9 11 3 3L22 4"})]}),error:e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),e.jsx("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})]}),warning:e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}),e.jsx("path",{d:"M12 9v4"}),e.jsx("path",{d:"M12 17h.01"})]}),info:e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"M12 16v-4"}),e.jsx("path",{d:"M12 8h.01"})]})},ta=j.forwardRef(({className:r,variant:t="info",title:o,body:a,icon:n,dismissible:s,onDismiss:l,...c},d)=>{const x=n??Kd[t];return e.jsxs("div",{ref:d,className:y(Ud({variant:t}),r),role:"alert",...c,children:[e.jsx("span",{className:y(wt({variant:t}),"shrink-0 mt-0.5"),children:x}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:wt({variant:t}),children:o}),a&&e.jsx("div",{className:Yd({variant:t}),children:a})]}),s&&l&&e.jsx("button",{onClick:l,className:"shrink-0 p-1 bg-transparent border-none cursor-pointer opacity-60 hover:opacity-100 transition-opacity","aria-label":"Dismiss",children:e.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M18 6 6 18"}),e.jsx("path",{d:"m6 6 12 12"})]})})]})});ta.displayName="Banner";const oa=j.forwardRef(({className:r,label:t,description:o,children:a,...n},s)=>e.jsxs("div",{ref:s,className:y("flex gap-4 py-[11px] px-4 items-center border-b border-[var(--color-gray-100)]",r),...n,children:[e.jsxs("div",{className:"flex-[0_0_160px]",children:[e.jsx("span",{className:"text-[13px] font-medium text-[var(--color-gray-1000)]",children:t}),o&&e.jsx("span",{className:"text-[11px] text-[var(--color-gray-600)] ml-1",children:o})]}),e.jsx("div",{className:"flex-1",children:a})]}));oa.displayName="FieldRow";const aa=j.forwardRef(({className:r,sections:t,activeId:o,onSelect:a,...n},s)=>e.jsx("div",{ref:s,className:y("w-[180px] border border-[var(--color-gray-200)] rounded-[12px] overflow-hidden bg-[var(--color-white)]",r),...n,children:e.jsx("div",{className:"py-2",children:t.map(({category:l,items:c})=>e.jsxs("div",{children:[e.jsx("div",{className:"px-3 py-1.5 text-[9px] font-bold uppercase tracking-[0.1em] text-[var(--color-gray-600)]",children:l}),c.map(({id:d,label:x,icon:p})=>e.jsxs("button",{onClick:()=>a(d),className:y("w-full px-3 py-1.5 flex items-center gap-2 text-left text-[12px] border-l-2 cursor-pointer transition-colors duration-150 bg-transparent border-t-0 border-r-0 border-b-0",o===d?"bg-[rgba(21,177,205,0.07)] border-l-[var(--color-blue-800)] text-[var(--color-blue-800)] font-semibold":"border-l-transparent text-[var(--color-gray-800)] font-normal hover:bg-[var(--color-gray-50)]"),children:[p&&e.jsx("span",{className:"shrink-0 flex items-center",children:p}),x]},d))]},l))})}));aa.displayName="SettingsNav";const na=j.forwardRef(({className:r,title:t,description:o,children:a,onSave:n,dirty:s,saveLabel:l="Save changes",...c},d)=>e.jsxs("div",{ref:d,className:y("bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-[12px] overflow-hidden",r),...c,children:[e.jsxs("div",{className:"px-5 py-4 border-b border-[var(--color-gray-100)]",children:[e.jsx("div",{className:"text-[13px] font-bold text-[var(--color-gray-1000)]",children:t}),o&&e.jsx("div",{className:"text-[12px] text-[var(--color-gray-600)] mt-0.5",children:o})]}),e.jsx("div",{className:"px-5",children:a}),n&&e.jsxs("div",{className:"px-5 py-3 border-t border-[var(--color-gray-100)] flex items-center gap-2.5",children:[e.jsx("button",{onClick:n,disabled:!s,className:y("px-3.5 py-1.5 rounded-[6px] text-[13px] font-semibold border-none cursor-pointer transition-all duration-150",s?"bg-[var(--color-blue-1000)] text-[var(--color-white)] hover:opacity-90":"bg-[var(--color-gray-100)] text-[var(--color-gray-600)] cursor-default"),children:l}),s&&e.jsx("span",{className:"text-[12px] text-[var(--color-gray-600)]",children:"Unsaved changes"})]})]}));na.displayName="SettingsSectionCard";const Ct="Geist Mono, ui-monospace, monospace";function Zd({items:r,columns:t=4}){const o=t===2?"grid-cols-2":t===3?"grid-cols-3":"grid-cols-4";return e.jsx("div",{className:`grid ${o} gap-3`,children:r.map((a,n)=>e.jsxs("div",{className:"bg-[var(--color-bg-primary)] border border-[var(--color-border-default)] rounded-xl p-[18px_20px] flex flex-col gap-1.5",children:[e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.08em] text-[var(--color-text-tertiary)]",children:a.label}),e.jsx("div",{className:"text-[22px] font-light text-[var(--color-text-primary)] leading-none",style:{fontFamily:Ct,fontVariantNumeric:"tabular-nums",letterSpacing:"-0.02em"},children:a.value}),a.delta&&e.jsx("div",{className:"text-[11px] font-semibold",style:{fontFamily:Ct,color:a.deltaDir==="up"?"var(--dl-data-positive)":a.deltaDir==="down"?"var(--dl-data-negative)":a.deltaDir==="warning"?"var(--dl-data-warning)":"var(--dl-data-neutral)"},children:a.delta})]},n))})}const St="Geist Mono, ui-monospace, monospace",Xd={up:"var(--dl-data-positive)",down:"var(--dl-data-negative)",flat:"var(--dl-data-neutral)",warning:"var(--dl-data-warning)"};function qd({label:r,value:t,delta:o,deltaDir:a}){return e.jsxs("div",{style:{background:"var(--color-bg-primary)",border:"1px solid var(--color-border-default)",borderRadius:12,padding:"18px 20px",display:"flex",flexDirection:"column",gap:6},children:[e.jsx("div",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-text-tertiary)"},children:r}),e.jsx("div",{style:{fontSize:28,fontWeight:300,color:"var(--color-text-primary)",lineHeight:1,fontFamily:St,fontVariantNumeric:"tabular-nums",letterSpacing:"-0.02em"},children:t}),o&&e.jsx("div",{style:{fontSize:12,fontWeight:600,fontFamily:St,color:Xd[a??"flat"]??"var(--dl-data-neutral)"},children:o})]})}const Jd="Geist Mono, ui-monospace, monospace",Qd={up:"var(--dl-data-positive)",down:"var(--dl-data-negative)",flat:"var(--dl-data-neutral)"};function e0({label:r,value:t,trend:o,delta:a}){return e.jsxs("div",{style:{background:"var(--color-bg-primary)",border:"1px solid var(--color-border-default)",borderRadius:10,padding:"14px 16px",display:"flex",flexDirection:"column",gap:4},children:[e.jsx("div",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-text-tertiary)"},children:r}),e.jsx("div",{style:{fontSize:22,fontWeight:400,color:"var(--color-text-primary)",lineHeight:1,fontFamily:Jd,fontVariantNumeric:"tabular-nums"},children:t}),a&&e.jsx("div",{style:{fontSize:11,color:o?Qd[o]??"var(--dl-data-neutral)":"var(--color-text-tertiary)"},children:a})]})}const cr="Geist Mono, ui-monospace, monospace";function r0({row:r,columns:t}){const o=r.variant==="grand-total",a=o?"#022e40":"var(--color-bg-secondary, #f9fafb)",n=o?"#ffffff":"var(--color-text-primary, #000626)",s=o?"rgba(255,255,255,0.65)":"var(--color-text-secondary, #595f7a)";return e.jsx("tr",{style:{background:a,borderTop:o?"none":"1px solid var(--color-border-default, #e5e7eb)"},children:t.map((l,c)=>{const d=c===0,x=d?r.label:r.values[l.key]??"—",p=d||c===1?n:s;return e.jsx("td",{style:{padding:"10px 16px",textAlign:l.align==="right"?"right":"left",fontSize:o?14:13,fontWeight:o?700:600,color:p,fontFamily:l.mono||!d?cr:void 0,fontVariantNumeric:"tabular-nums"},children:x},l.key)})})}function t0({columns:r,groups:t,rows:o,totals:a}){return e.jsx("div",{className:"border border-[var(--color-border-default,#e5e7eb)] rounded-lg overflow-hidden",children:e.jsxs("table",{className:"w-full",style:{borderCollapse:"collapse"},children:[e.jsx("thead",{children:e.jsx("tr",{children:r.map(n=>e.jsx("th",{style:{padding:"9px 16px",textAlign:n.align==="right"?"right":n.align==="center"?"center":"left",fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-text-tertiary, #8c92af)",background:"var(--color-bg-secondary, #f9fafb)",borderBottom:"1px solid var(--color-border-default, #e5e7eb)"},children:n.label},n.key))})}),e.jsxs("tbody",{children:[o==null?void 0:o.map((n,s)=>e.jsx("tr",{style:{background:"var(--color-bg-primary, #fff)",borderBottom:"1px solid var(--color-border-light, #f3f4f6)"},children:r.map((l,c)=>e.jsx("td",{style:{padding:"10px 16px",textAlign:l.align==="right"?"right":"left",fontSize:13,color:c===0?"var(--color-text-primary, #000626)":"var(--color-text-secondary, #595f7a)",fontFamily:l.mono?cr:void 0,fontVariantNumeric:l.mono?"tabular-nums":void 0},children:String(n[l.key]??"—")},l.key))},s)),t==null?void 0:t.map((n,s)=>e.jsxs(j.Fragment,{children:[e.jsx("tr",{style:{background:"var(--color-bg-secondary, #f9fafb)",borderTop:s>0?"1px solid var(--color-border-default, #e5e7eb)":void 0,borderBottom:"1px solid var(--color-border-default, #e5e7eb)"},children:e.jsxs("td",{colSpan:r.length,style:{padding:"7px 16px",fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-text-tertiary, #8c92af)"},children:[n.label,n.count!=null&&e.jsx("span",{style:{marginLeft:8,padding:"1px 6px",borderRadius:9999,fontSize:10,fontWeight:600,background:"var(--color-gray-200, #e5e7eb)",color:"var(--color-text-tertiary, #8c92af)"},children:n.count})]})}),n.rows.map((l,c)=>e.jsx("tr",{style:{background:"var(--color-bg-primary, #fff)",borderBottom:c<n.rows.length-1?"1px solid var(--color-border-light, #f3f4f6)":void 0},children:r.map((d,x)=>e.jsx("td",{style:{padding:"10px 16px",paddingLeft:x===0?24:16,textAlign:d.align==="right"?"right":"left",fontSize:13,color:x===0?"var(--color-text-secondary, #595f7a)":"var(--color-text-primary, #000626)",fontFamily:d.mono?cr:void 0,fontVariantNumeric:d.mono?"tabular-nums":void 0},children:String(l[d.key]??"—")},d.key))},c)),n.subtotal&&e.jsx("tr",{style:{background:"var(--color-bg-secondary, #f9fafb)",borderTop:"1px solid var(--color-border-default, #e5e7eb)",borderBottom:"1px solid var(--color-border-default, #e5e7eb)"},children:r.map((l,c)=>e.jsx("td",{style:{padding:"9px 16px",textAlign:l.align==="right"?"right":"left",fontSize:c===0?11:13,fontWeight:600,textTransform:c===0?"uppercase":void 0,letterSpacing:c===0?"0.04em":void 0,color:c===0?"var(--color-text-tertiary, #8c92af)":"var(--color-text-primary, #000626)",fontFamily:l.mono?cr:void 0,fontVariantNumeric:l.mono?"tabular-nums":void 0},children:String(n.subtotal[l.key]??(c===0?"Subtotal":"—"))},l.key))})]},s)),a==null?void 0:a.map((n,s)=>e.jsx(r0,{row:n,columns:r},s))]})]})})}const o0="Geist Mono, ui-monospace, monospace";function a0({columns:r,rows:t}){return e.jsx("div",{className:"border border-[var(--color-border-default,#e5e7eb)] rounded-lg overflow-hidden",children:e.jsxs("table",{className:"w-full",style:{borderCollapse:"collapse"},children:[e.jsx("thead",{children:e.jsx("tr",{children:r.map(o=>e.jsx("th",{style:{padding:"9px 16px",textAlign:o.align==="right"?"right":o.align==="center"?"center":"left",fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-text-tertiary, #8c92af)",background:"var(--color-bg-secondary, #f9fafb)",borderBottom:"1px solid var(--color-border-default, #e5e7eb)"},children:o.label},o.key))})}),e.jsx("tbody",{children:t.map((o,a)=>e.jsx("tr",{style:{background:"var(--color-bg-primary, #fff)",borderBottom:a<t.length-1?"1px solid var(--color-border-light, #f3f4f6)":void 0},children:r.map((n,s)=>e.jsx("td",{style:{padding:"10px 16px",textAlign:n.align==="right"?"right":n.align==="center"?"center":"left",fontSize:13,color:s===0?"var(--color-text-primary, #000626)":"var(--color-text-secondary, #595f7a)",fontFamily:n.mono?o0:void 0,fontVariantNumeric:n.mono?"tabular-nums":void 0},children:String(o[n.key]??"—")},n.key))},a))})]})})}const n0="Geist Mono, ui-monospace, monospace";function s0({rowLabel:r,columns:t,rows:o}){return e.jsx("div",{className:"border border-[var(--color-border-default,#e5e7eb)] rounded-lg overflow-hidden",children:e.jsxs("table",{className:"w-full",style:{borderCollapse:"collapse"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{padding:"9px 16px",textAlign:"left",fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-text-tertiary, #8c92af)",background:"var(--color-bg-secondary, #f9fafb)",borderBottom:"1px solid var(--color-border-default, #e5e7eb)",whiteSpace:"nowrap"},children:r}),t.map(a=>e.jsx("th",{style:{padding:"9px 16px",textAlign:"right",fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:a.highlight?"#022e40":"var(--color-text-tertiary, #8c92af)",background:a.highlight?"#f0f9ff":"var(--color-bg-secondary, #f9fafb)",borderBottom:"1px solid var(--color-border-default, #e5e7eb)",whiteSpace:"nowrap"},children:a.label},a.key))]})}),e.jsx("tbody",{children:(o??[]).map((a,n)=>e.jsxs("tr",{style:{background:"var(--color-bg-primary, #fff)",borderBottom:n<(o??[]).length-1?"1px solid var(--color-border-light, #f3f4f6)":void 0},children:[e.jsx("td",{style:{padding:"10px 16px",fontSize:13,color:"var(--color-text-primary, #000626)"},children:String(a.account??"")}),t.map(s=>e.jsx("td",{style:{padding:"10px 16px",textAlign:"right",fontSize:13,fontFamily:n0,fontVariantNumeric:"tabular-nums",color:s.highlight?"var(--color-text-primary, #000626)":"var(--color-text-secondary, #595f7a)",background:s.highlight?"#f0f9ff":void 0},children:String(a[s.key]??"—")},s.key))]},n))})]})})}const kt={draft:{bg:"var(--color-gray-200, #e5e7eb)",color:"var(--color-text-secondary, #595f7a)",label:"Draft"},provisional:{bg:"#fef9c3",color:"#854d0e",label:"Provisional"},final:{bg:"#dcfce7",color:"#166534",label:"Final"}};function l0({title:r,subtitle:t,period:o,generatedAt:a,status:n}){const s=kt[n??""]??kt.draft;return e.jsxs("div",{className:"flex items-start justify-between gap-4",style:{padding:"20px 24px",background:"var(--color-bg-primary, #fff)",borderBottom:"1px solid var(--color-border-default, #e5e7eb)"},children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("h1",{style:{margin:0,fontSize:20,fontWeight:700,color:"var(--color-text-primary, #000626)",lineHeight:1.25},children:r}),t&&e.jsx("p",{style:{margin:0,fontSize:13,color:"var(--color-text-secondary, #595f7a)"},children:t}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:4},children:[o&&e.jsx("span",{style:{fontSize:12,color:"var(--color-text-tertiary, #8c92af)"},children:o}),o&&a&&e.jsx("span",{style:{fontSize:12,color:"#e5e7eb"},children:"·"}),a&&e.jsxs("span",{style:{fontSize:12,color:"var(--color-text-tertiary, #8c92af)"},children:["Generated ",a]})]})]}),n&&e.jsx("span",{style:{padding:"3px 10px",borderRadius:9999,fontSize:11,fontWeight:600,background:s.bg,color:s.color,whiteSpace:"nowrap",flexShrink:0},children:s.label})]})}function i0({period:r,prevPeriod:t,nextPeriod:o,actions:a}){return e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,padding:"8px 16px",background:"var(--color-bg-secondary, #f9fafb)",borderBottom:"1px solid var(--color-border-default, #e5e7eb)",flexWrap:"wrap"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[t&&e.jsxs("button",{style:{padding:"4px 10px",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:6,background:"#fff",color:"var(--color-text-secondary, #595f7a)",fontSize:12,cursor:"pointer"},children:["← ",t]}),e.jsx("span",{style:{padding:"4px 12px",border:"1px solid #022e40",borderRadius:6,background:"#f0f9ff",color:"#022e40",fontSize:12,fontWeight:600},children:r}),o&&e.jsxs("button",{style:{padding:"4px 10px",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:6,background:"#fff",color:"var(--color-text-secondary, #595f7a)",fontSize:12,cursor:"pointer"},children:[o," →"]})]}),a&&a.length>0&&e.jsx("div",{style:{display:"flex",alignItems:"center",gap:6},children:a.map((n,s)=>e.jsx("button",{style:{padding:"5px 14px",border:n.variant==="primary"?"none":"1px solid var(--color-border-default, #e5e7eb)",borderRadius:6,background:n.variant==="primary"?"#022e40":"#fff",color:n.variant==="primary"?"#fff":"var(--color-text-secondary, #595f7a)",fontSize:12,fontWeight:500,cursor:"pointer"},children:n.label},s))})]})}function c0({periods:r,activePeriod:t,compareEnabled:o}){return e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 16px",background:"var(--color-bg-secondary, #f9fafb)",borderBottom:"1px solid var(--color-border-default, #e5e7eb)",flexWrap:"wrap"},children:[e.jsx("div",{style:{display:"flex",alignItems:"center",gap:2,padding:2,background:"var(--color-gray-100, #f3f4f6)",borderRadius:8,border:"1px solid var(--color-border-light, #f3f4f6)"},children:(r??[]).map(a=>{const n=a.id===t;return e.jsx("button",{style:{padding:"4px 12px",borderRadius:6,border:"none",background:n?"#fff":"transparent",color:n?"var(--color-text-primary, #000626)":"var(--color-text-tertiary, #8c92af)",fontSize:12,fontWeight:n?600:400,cursor:"pointer",boxShadow:n?"0 1px 2px rgba(0,0,0,0.08)":"none"},children:a.label},a.id)})}),o!=null&&e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",fontSize:12,color:"var(--color-text-secondary, #595f7a)"},children:[e.jsx("span",{style:{display:"inline-flex",width:28,height:16,borderRadius:9999,background:o?"#022e40":"var(--color-gray-300, #d1d5db)",alignItems:"center",padding:"0 2px"},children:e.jsx("span",{style:{width:12,height:12,borderRadius:"50%",background:"#fff",transform:o?"translateX(12px)":"translateX(0)",transition:"transform 0.15s"}})}),"Compare to previous"]})]})}function d0({title:r,body:t,actions:o}){return e.jsxs("div",{style:{background:"var(--color-bg-primary, #fff)",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:12,padding:"20px 24px",display:"flex",flexDirection:"column",gap:12},children:[r&&e.jsx("h3",{style:{margin:0,fontSize:15,fontWeight:600,color:"var(--color-text-primary, #000626)"},children:r}),t&&e.jsx("p",{style:{margin:0,fontSize:13,lineHeight:1.6,color:"var(--color-text-secondary, #595f7a)"},children:t}),o&&o.length>0&&e.jsx("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:o.map((a,n)=>e.jsx("button",{style:{padding:"6px 16px",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:8,background:"var(--color-bg-secondary, #f9fafb)",color:"var(--color-text-primary, #000626)",fontSize:13,fontWeight:500,cursor:"pointer"},children:a.label},n))})]})}function p0({title:r,description:t,children:o}){return e.jsxs("div",{style:{background:"var(--color-bg-primary, #fff)",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:12,overflow:"hidden"},children:[(r||t)&&e.jsxs("div",{style:{padding:"14px 20px",borderBottom:"1px solid var(--color-border-default, #e5e7eb)",background:"var(--color-bg-secondary, #f9fafb)"},children:[r&&e.jsx("h3",{style:{margin:0,fontSize:14,fontWeight:600,color:"var(--color-text-primary, #000626)"},children:r}),t&&e.jsx("p",{style:{margin:r?"2px 0 0":0,fontSize:12,color:"var(--color-text-tertiary, #8c92af)"},children:t})]}),o&&e.jsx("div",{style:{padding:20},children:o})]})}const x0={Active:{bg:"#dcfce7",color:"#15803d"},Inactive:{bg:"var(--color-gray-100, #f3f4f6)",color:"var(--color-text-tertiary, #8c92af)"},Pending:{bg:"#fef9c3",color:"#d97706"},Suspended:{bg:"#fee2e2",color:"#dc2626"}};function f0({name:r,type:t,status:o,meta:a}){const n=x0[o??""]??{bg:"var(--color-gray-100, #f3f4f6)",color:"var(--color-text-secondary, #595f7a)"};return e.jsxs("div",{style:{background:"var(--color-bg-primary, #fff)",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:12,padding:"16px 20px",display:"flex",flexDirection:"column",gap:12},children:[e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:8},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[e.jsx("span",{style:{fontSize:15,fontWeight:600,color:"var(--color-text-primary, #000626)"},children:r}),t&&e.jsx("span",{style:{fontSize:12,color:"var(--color-text-tertiary, #8c92af)"},children:t})]}),o&&e.jsx("span",{style:{padding:"3px 10px",borderRadius:9999,fontSize:11,fontWeight:600,background:n.bg,color:n.color,flexShrink:0},children:o})]}),a&&a.length>0&&e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(140px, 1fr))",gap:"8px 16px",paddingTop:8,borderTop:"1px solid var(--color-border-light, #f3f4f6)"},children:a.map((s,l)=>e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[e.jsx("span",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--color-text-tertiary, #8c92af)"},children:s.label}),e.jsx("span",{style:{fontSize:13,color:"var(--color-text-primary, #000626)"},children:s.value})]},l))})]})}function u0({gap:r=4,direction:t="vertical",children:o}){return e.jsx("div",{style:{display:"flex",flexDirection:t==="horizontal"?"row":"column",gap:r*4,width:"100%"},children:o})}function g0({columns:r=2,gap:t=4,children:o}){return e.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${r}, 1fr)`,gap:t*4,width:"100%"},children:o})}const Nt={info:{bg:"var(--color-blue-50, #eff6ff)",border:"var(--color-blue-200, #bfdbfe)",titleColor:"#1e40af",msgColor:"#3b82f6",icon:"ℹ"},success:{bg:"#f0fdf4",border:"#bbf7d0",titleColor:"#166534",msgColor:"#16a34a",icon:"✓"},warning:{bg:"#fefce8",border:"#fde68a",titleColor:"#854d0e",msgColor:"#d97706",icon:"⚠"},error:{bg:"#fef2f2",border:"#fecaca",titleColor:"#991b1b",msgColor:"#dc2626",icon:"✕"}};function m0({variant:r="info",title:t,message:o,action:a}){const n=Nt[r]??Nt.info;return e.jsxs("div",{style:{display:"flex",gap:12,padding:"12px 16px",background:n.bg,border:`1px solid ${n.border}`,borderRadius:10,alignItems:"flex-start"},children:[e.jsx("span",{style:{fontSize:14,color:n.msgColor,flexShrink:0,marginTop:1},children:n.icon}),e.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2},children:[e.jsx("span",{style:{fontSize:13,fontWeight:600,color:n.titleColor},children:t}),o&&e.jsx("span",{style:{fontSize:12,color:n.msgColor},children:o})]}),a&&e.jsx("button",{style:{padding:"4px 12px",border:`1px solid ${n.border}`,borderRadius:6,background:"transparent",color:n.titleColor,fontSize:12,fontWeight:500,cursor:"pointer",flexShrink:0},children:a.label})]})}const zt={success:{bg:"var(--dl-data-positive-bg, #dcfce7)",color:"var(--dl-data-positive)"},warning:{bg:"var(--dl-data-warning-bg, #fef9c3)",color:"var(--dl-data-warning)"},error:{bg:"var(--dl-data-negative-bg, #fee2e2)",color:"var(--dl-data-negative)"},info:{bg:"var(--color-blue-50, #eff6ff)",color:"#1d4ed8"},neutral:{bg:"var(--color-gray-100, #f3f4f6)",color:"var(--color-text-secondary, #595f7a)"}};function h0({label:r,variant:t="neutral"}){const o=zt[t]??zt.neutral;return e.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"3px 10px",borderRadius:9999,fontSize:11,fontWeight:600,background:o.bg,color:o.color,whiteSpace:"nowrap"},children:r})}function b0({title:r,description:t,action:o}){return e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,padding:"48px 24px",textAlign:"center"},children:[e.jsx("div",{style:{width:40,height:40,borderRadius:"50%",background:"var(--color-bg-secondary, #f9fafb)",border:"1px solid var(--color-border-default, #e5e7eb)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,color:"var(--color-text-tertiary, #8c92af)"},children:"○"}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[e.jsx("h3",{style:{margin:0,fontSize:15,fontWeight:600,color:"var(--color-text-primary, #000626)"},children:r}),t&&e.jsx("p",{style:{margin:0,fontSize:13,color:"var(--color-text-secondary, #595f7a)",maxWidth:360},children:t})]}),o&&e.jsx("button",{style:{padding:"8px 20px",border:"none",borderRadius:8,background:"#022e40",color:"#ffffff",fontSize:13,fontWeight:600,cursor:"pointer"},children:o.label})]})}function v0({value:r,label:t}){const o=Math.min(100,Math.max(0,r));return e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[t&&e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:12,color:"var(--color-text-secondary, #595f7a)"},children:[e.jsx("span",{children:t}),e.jsxs("span",{style:{fontWeight:600,color:"var(--color-text-primary, #000626)"},children:[o,"%"]})]}),e.jsx("div",{style:{height:6,background:"var(--color-gray-200, #e5e7eb)",borderRadius:9999,overflow:"hidden"},children:e.jsx("div",{style:{height:"100%",width:`${o}%`,background:"#022e40",borderRadius:9999,transition:"width 0.3s ease"}})})]})}const Tt={running:{bg:"#eff6ff",color:"#1d4ed8",label:"Running"},paused:{bg:"#fef9c3",color:"#d97706",label:"Paused"},completed:{bg:"#dcfce7",color:"#15803d",label:"Done"},failed:{bg:"#fee2e2",color:"#dc2626",label:"Failed"},pending:{bg:"var(--color-gray-100, #f3f4f6)",color:"var(--color-text-secondary, #595f7a)",label:"Pending"}};function y0({name:r,status:t,progressPct:o,currentStep:a,completedSteps:n,totalSteps:s,clientName:l}){const c=Tt[t]??Tt.pending,d=Math.min(100,Math.max(0,o??0));return e.jsxs("div",{style:{background:"var(--color-bg-primary, #fff)",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:12,padding:"16px 20px",display:"flex",flexDirection:"column",gap:12},children:[e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:8},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[e.jsx("span",{style:{fontSize:14,fontWeight:600,color:"var(--color-text-primary, #000626)"},children:r}),l&&e.jsx("span",{style:{fontSize:12,color:"var(--color-text-tertiary, #8c92af)"},children:l})]}),e.jsx("span",{style:{padding:"3px 10px",borderRadius:9999,fontSize:11,fontWeight:600,background:c.bg,color:c.color,flexShrink:0},children:c.label})]}),o!=null&&e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:12,color:"var(--color-text-secondary, #595f7a)"},children:[a&&e.jsx("span",{children:a}),n!=null&&s!=null&&e.jsxs("span",{style:{fontWeight:600},children:[n,"/",s," steps"]})]}),e.jsx("div",{style:{height:4,background:"var(--color-gray-200, #e5e7eb)",borderRadius:9999,overflow:"hidden"},children:e.jsx("div",{style:{height:"100%",width:`${d}%`,background:t==="failed"?"#dc2626":"#022e40",borderRadius:9999}})})]})]})}const Lt={pending:{bg:"var(--color-gray-100, #f3f4f6)",color:"var(--color-text-secondary, #595f7a)"},running:{bg:"#eff6ff",color:"#1d4ed8"},done:{bg:"#dcfce7",color:"#15803d"},failed:{bg:"#fee2e2",color:"#dc2626"},skipped:{bg:"var(--color-gray-100, #f3f4f6)",color:"var(--color-text-tertiary, #8c92af)"},awaiting_approval:{bg:"#fef9c3",color:"#d97706"}},j0={data_extraction:"Extraction",analysis:"Analysis",document_creation:"Document",api_call:"API",human_review:"Review",notification:"Notify"};function w0({name:r,status:t,type:o,outputSummary:a}){const n=Lt[t]??Lt.pending,s=j0[o??""]??o??"Task";return e.jsxs("div",{style:{background:"var(--color-bg-primary, #fff)",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:10,padding:"12px 16px",display:"flex",flexDirection:"column",gap:6},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx("span",{style:{padding:"2px 7px",borderRadius:5,fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.06em",background:"var(--color-bg-secondary, #f9fafb)",color:"var(--color-text-tertiary, #8c92af)",flexShrink:0},children:s}),e.jsx("span",{style:{fontSize:13,fontWeight:500,color:"var(--color-text-primary, #000626)"},children:r})]}),e.jsx("span",{style:{padding:"2px 8px",borderRadius:9999,fontSize:11,fontWeight:600,background:n.bg,color:n.color,flexShrink:0},children:t})]}),a&&e.jsx("p",{style:{margin:0,fontSize:12,color:"var(--color-text-secondary, #595f7a)",paddingLeft:2},children:a})]})}function C0({title:r,description:t,context:o,approveLabel:a,rejectLabel:n}){return e.jsxs("div",{style:{background:"var(--color-bg-primary, #fff)",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:12,padding:"20px 24px",display:"flex",flexDirection:"column",gap:16},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[e.jsx("h3",{style:{margin:0,fontSize:15,fontWeight:600,color:"var(--color-text-primary, #000626)"},children:r}),t&&e.jsx("p",{style:{margin:0,fontSize:13,color:"var(--color-text-secondary, #595f7a)"},children:t})]}),o&&e.jsx("div",{style:{padding:"10px 14px",background:"var(--color-bg-secondary, #f9fafb)",borderRadius:8,border:"1px solid var(--color-border-light, #f3f4f6)",fontSize:12,color:"var(--color-text-secondary, #595f7a)",fontFamily:"Geist Mono, ui-monospace, monospace"},children:o}),e.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[n&&e.jsx("button",{style:{padding:"8px 20px",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:8,background:"var(--color-bg-primary, #fff)",color:"var(--color-text-secondary, #595f7a)",fontSize:13,fontWeight:500,cursor:"pointer"},children:n}),e.jsx("button",{style:{padding:"8px 20px",border:"none",borderRadius:8,background:"#022e40",color:"#ffffff",fontSize:13,fontWeight:600,cursor:"pointer"},children:a})]})]})}const $t={up:{bg:"var(--dl-data-positive-bg, #dcfce7)",color:"var(--dl-data-positive)"},down:{bg:"var(--dl-data-negative-bg, #fee2e2)",color:"var(--dl-data-negative)"},flat:{bg:"var(--color-gray-100, #f3f4f6)",color:"var(--dl-data-neutral)"},warning:{bg:"var(--dl-data-warning-bg, #fef9c3)",color:"var(--dl-data-warning)"}};function S0({value:r,direction:t}){const o=$t[t??"flat"]??$t.flat;return e.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"2px 8px",borderRadius:9999,fontSize:11,fontWeight:600,fontFamily:"Geist Mono, ui-monospace, monospace",background:o.bg,color:o.color,whiteSpace:"nowrap"},children:r})}const k0={up:"var(--dl-data-positive)",down:"var(--dl-data-negative)",flat:"var(--dl-data-neutral)"},N0="Geist Mono, ui-monospace, monospace";function z0({items:r}){return e.jsx("div",{style:{display:"flex",alignItems:"stretch",background:"var(--color-bg-secondary, #f9fafb)",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:8,overflow:"hidden"},children:r.map((t,o)=>e.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,padding:"12px 16px",borderLeft:o>0?"1px solid var(--color-border-default, #e5e7eb)":void 0},children:[e.jsx("span",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-text-tertiary, #8c92af)"},children:t.label}),e.jsx("span",{style:{fontSize:16,fontWeight:600,fontFamily:N0,fontVariantNumeric:"tabular-nums",color:k0[t.direction??"flat"]??"var(--dl-data-neutral)"},children:t.value})]},o))})}const Mt={default:{bg:"#ffffff",border:"var(--color-border-default, #e5e7eb)"},highlighted:{bg:"var(--color-bg-secondary, #f9fafb)",border:"var(--color-border-default, #e5e7eb)"},audit:{bg:"#fffbeb",border:"#fde68a"}};function T0({content:r,author:t,authorRole:o,date:a,sectionLabel:n,expandable:s,defaultExpanded:l=!0,variant:c="default",className:d}){const[x,p]=j.useState(l),f=Mt[c]??Mt.default,u=s&&r.length>200&&!x;return e.jsxs("div",{className:d,style:{display:"flex",flexDirection:"column",gap:8,padding:"14px 16px",background:f.bg,border:`1px solid ${f.border}`,borderRadius:10},children:[n&&e.jsx("span",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-text-tertiary, #8c92af)"},children:n}),e.jsx("p",{style:{fontSize:13,lineHeight:1.6,color:"var(--color-text-primary, #000626)",margin:0,...u?{display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden"}:{}},children:r}),s&&r.length>200&&e.jsx("button",{onClick:()=>p(!x),style:{background:"none",border:"none",cursor:"pointer",fontSize:12,fontWeight:500,color:"var(--dl-data-neutral, #6b7280)",padding:0,textAlign:"left"},children:x?"Show less":"Show more"}),(t||a)&&e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{borderTop:"1px solid var(--color-border-light, #f3f4f6)",margin:"4px 0"}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[t&&e.jsx("div",{style:{width:24,height:24,borderRadius:"50%",background:"var(--color-gray-200, #e5e7eb)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:10,fontWeight:600,color:"var(--color-text-secondary, #595f7a)"},children:t.split(" ").map(g=>g[0]).join("").slice(0,2)}),e.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[t&&e.jsx("span",{style:{fontSize:12,fontWeight:500,color:"var(--color-text-primary, #000626)"},children:t}),o&&e.jsx("span",{style:{fontSize:11,color:"var(--color-text-tertiary, #8c92af)"},children:o})]})]}),a&&e.jsx("span",{style:{fontSize:11,color:"var(--color-text-tertiary, #8c92af)"},children:a})]})]})]})}function L0({label:r,description:t,sectionNumber:o,children:a,noBorder:n,className:s}){return e.jsxs("section",{className:s,style:{display:"flex",flexDirection:"column",gap:4,...n?{}:{borderTop:"1px solid var(--color-border-default, #e5e7eb)",paddingTop:16}},children:[e.jsxs("h2",{style:{fontSize:13,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-text-primary, #000626)",margin:0},children:[o&&e.jsx("span",{style:{color:"var(--color-text-tertiary, #8c92af)",marginRight:8},children:o}),r]}),t&&e.jsx("p",{style:{fontSize:13,color:"var(--color-text-secondary, #595f7a)",margin:0},children:t}),a&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4},children:a})]})}const $0={info:"ℹ",success:"✓",warning:"⚠",error:"✕"},At={info:"#1e40af",success:"#166534",warning:"#854d0e",error:"#991b1b"},Rt={info:"#3b82f6",success:"#16a34a",warning:"#d97706",error:"#dc2626"},M0={info:"#eff6ff",success:"#f0fdf4",warning:"#fefce8",error:"#fef2f2"},Ft={info:"#bfdbfe",success:"#bbf7d0",warning:"#fde68a",error:"#fecaca"};function A0({variant:r="info",title:t,message:o,action:a,className:n}){const s=r;return e.jsxs("div",{className:n,style:{display:"flex",gap:12,padding:"12px 16px",background:M0[s],border:`1px solid ${Ft[s]}`,borderRadius:10,alignItems:"flex-start"},children:[e.jsx("span",{style:{fontSize:14,color:Rt[s],flexShrink:0,marginTop:1},children:$0[s]}),e.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2},children:[e.jsx("span",{style:{fontSize:13,fontWeight:600,color:At[s]},children:t}),o&&e.jsx("span",{style:{fontSize:12,color:Rt[s]},children:o})]}),a&&e.jsx("button",{onClick:a.onClick,style:{padding:"4px 12px",border:`1px solid ${Ft[s]}`,borderRadius:6,background:"transparent",color:At[s],fontSize:12,fontWeight:500,cursor:"pointer",flexShrink:0},children:a.label})]})}const R0={month:"Monthly",quarter:"Quarterly",year:"Annual",custom:"Custom"},Bt={display:"inline-flex",alignItems:"center",justifyContent:"center",width:28,height:28,borderRadius:6,border:"1px solid var(--color-border-default, #e5e7eb)",background:"#fff",color:"var(--color-text-primary, #000626)",cursor:"pointer",flexShrink:0};function F0({current:r,available:t=[],format:o,availableFormats:a=[],onPeriodChange:n,onFormatChange:s,hasPrev:l=!0,hasNext:c=!1,compact:d,className:x}){return e.jsxs("div",{className:x,style:{display:"flex",alignItems:"center",gap:d?4:8,flexWrap:"wrap"},children:[e.jsx("button",{style:{...Bt,opacity:l?1:.4},disabled:!l,onClick:()=>{if(l&&t.length>1){const p=t.findIndex(f=>f.id===r.id);p>0&&(n==null||n(t[p-1].id))}},"aria-label":"Previous period",children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:e.jsx("path",{d:"M7.5 2L3.5 6L7.5 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),t.length>1?e.jsx("select",{value:r.id,onChange:p=>n==null?void 0:n(p.target.value),style:{border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:6,background:"#fff",fontSize:d?12:13,fontWeight:500,padding:d?"4px 8px":"6px 12px",cursor:"pointer",textAlign:"center"},"aria-label":"Select period",children:t.map(p=>e.jsx("option",{value:p.id,children:p.label},p.id))}):e.jsx("span",{style:{fontSize:d?12:13,fontWeight:600,color:"var(--color-text-primary, #000626)",minWidth:80,textAlign:"center"},children:r.label}),e.jsx("button",{style:{...Bt,opacity:c?1:.4},disabled:!c,onClick:()=>{if(c&&t.length>1){const p=t.findIndex(f=>f.id===r.id);p<t.length-1&&(n==null||n(t[p+1].id))}},"aria-label":"Next period",children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:e.jsx("path",{d:"M4.5 2L8.5 6L4.5 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),a.length>1&&o&&e.jsx("div",{style:{display:"flex",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:6,overflow:"hidden"},role:"group","aria-label":"Period format",children:a.map(p=>e.jsx("button",{onClick:()=>s==null?void 0:s(p),"aria-pressed":p===o,style:{padding:d?"4px 8px":"6px 12px",fontSize:d?11:12,fontWeight:p===o?600:400,background:p===o?"var(--color-text-primary, #000626)":"#fff",color:p===o?"#fff":"var(--color-text-secondary, #595f7a)",border:"none",cursor:"pointer"},children:R0[p]??p},p))})]})}function B0({modes:r,activeMode:t,onModeChange:o,variant:a="default",compact:n,className:s}){const l=a==="pills";return e.jsx("div",{className:s,role:"group","aria-label":"Comparison mode",style:{display:"flex",...l?{gap:4}:{border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:6,overflow:"hidden"}},children:r.map(c=>{const d=c.id===t,x=n&&c.shortLabel?c.shortLabel:c.label,p={padding:n?"4px 8px":"6px 12px",fontSize:n?11:12,cursor:c.disabled?"not-allowed":"pointer",opacity:c.disabled?.4:1,border:"none",fontWeight:d?600:400,transition:"background 0.15s, color 0.15s"},f=l?d?{background:"var(--color-text-primary, #000626)",color:"#fff",border:"1px solid var(--color-text-primary, #000626)",borderRadius:6}:{background:"#fff",color:"var(--color-text-secondary, #595f7a)",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:6}:d?{background:"var(--color-text-primary, #000626)",color:"#fff"}:{background:"#fff",color:"var(--color-text-secondary, #595f7a)"};return e.jsx("button",{onClick:()=>!c.disabled&&(o==null?void 0:o(c.id)),"aria-pressed":d,disabled:c.disabled,style:{...p,...f},children:x},c.id)})})}const I0={pdf:{label:"PDF",icon:"⬇"},excel:{label:"Excel",icon:"⬇"},csv:{label:"CSV",icon:"⬇"},print:{label:"Print",icon:"⎙"}};function D0({actions:r,label:t,size:o="md",className:a}){const n=o==="sm";return e.jsxs("div",{className:a,style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[t&&e.jsx("span",{style:{fontSize:12,fontWeight:500,color:"var(--color-text-tertiary, #8c92af)",marginRight:4},children:t}),r.map(s=>{const l=I0[s.format]??{label:s.format,icon:"⬇"};return e.jsxs("button",{onClick:s.onClick,disabled:s.disabled,style:{display:"inline-flex",alignItems:"center",gap:6,padding:n?"4px 8px":"6px 12px",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:6,background:"#fff",color:"var(--color-text-secondary, #595f7a)",fontSize:n?11:12,fontWeight:500,cursor:s.disabled?"not-allowed":"pointer",opacity:s.disabled?.4:1},children:[e.jsx("span",{style:{color:"var(--color-text-tertiary, #8c92af)"},children:l.icon}),s.label??l.label]},s.format)})]})}const It={draft:{label:"Draft",bg:"var(--color-gray-200, #e5e7eb)",color:"var(--color-text-secondary, #595f7a)"},reviewed:{label:"Reviewed",bg:"#fef9c3",color:"#854d0e"},"signed-off":{label:"Signed Off",bg:"#bbf7d0",color:"#166534"},filed:{label:"Filed",bg:"#bfdbfe",color:"#1e40af"}};function W0({firmName:r,preparedBy:t,reviewedBy:o,date:a,reference:n,status:s="draft",className:l}){const c=It[s]??It.draft;return e.jsxs("div",{className:l,style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",borderTop:"1px solid var(--color-border-default, #e5e7eb)",paddingTop:12},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[r&&e.jsx("span",{style:{fontSize:13,fontWeight:600,color:"var(--color-text-primary, #000626)"},children:r}),n&&e.jsx("span",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-text-tertiary, #8c92af)"},children:n}),e.jsxs("div",{style:{display:"flex",gap:16,marginTop:4},children:[t&&e.jsxs("span",{style:{fontSize:12,color:"var(--color-text-secondary, #595f7a)"},children:["Prepared by: ",e.jsx("strong",{children:t})]}),o&&e.jsxs("span",{style:{fontSize:12,color:"var(--color-text-secondary, #595f7a)"},children:["Reviewed by: ",e.jsx("strong",{children:o})]}),a&&e.jsx("span",{style:{fontSize:12,color:"var(--color-text-tertiary, #8c92af)"},children:a})]})]}),e.jsx("span",{style:{fontSize:11,fontWeight:600,padding:"3px 10px",borderRadius:999,background:c.bg,color:c.color,whiteSpace:"nowrap"},children:c.label})]})}function P0({footnotes:r,className:t}){return!r||r.length===0?null:e.jsxs("div",{className:t,style:{borderTop:"1px solid var(--color-border-default, #e5e7eb)",paddingTop:16,display:"flex",flexDirection:"column",gap:6},children:[e.jsx("span",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-text-tertiary, #8c92af)"},children:"Notes"}),r.map(o=>e.jsxs("div",{style:{display:"flex",gap:8,alignItems:"flex-start"},children:[e.jsxs("span",{style:{fontSize:11,fontWeight:700,color:"#1e40af",minWidth:20,textAlign:"right",fontVariantNumeric:"tabular-nums"},children:["[",o.number,"]"]}),e.jsx("span",{style:{fontSize:12,color:"var(--color-text-secondary, #595f7a)",lineHeight:1.5},children:o.text})]},o.number))]})}function E0({number:r,onClick:t,className:o}){return e.jsxs("sup",{className:o,onClick:()=>t==null?void 0:t(r),title:`Footnote ${r}`,"aria-label":`Footnote ${r}`,style:{fontSize:10,fontWeight:700,color:"#1e40af",cursor:t?"pointer":"default",marginLeft:1},children:["[",r,"]"]})}const Dt={up:"#166534",down:"#dc2626",flat:"#6b7280"};function V0(r){if(r.length<2)return"flat";const t=r[0].value,o=r[r.length-1].value;return o>t?"up":o<t?"down":"flat"}function H0({data:r,direction:t,width:o=80,height:a=24,showLastDot:n=!0,className:s}){if(!r||r.length<2)return null;const l=t??V0(r),c=Dt[l]??Dt.flat,d=r.map(v=>v.value),x=Math.min(...d),f=Math.max(...d)-x||1,u=3,g=d.map((v,w)=>{const k=u+w/(d.length-1)*(o-u*2),L=u+(1-(v-x)/f)*(a-u*2);return`${k},${L}`}).join(" "),m=u+(d.length-1)/(d.length-1)*(o-u*2),h=u+(1-(d[d.length-1]-x)/f)*(a-u*2);return e.jsxs("svg",{className:s,width:o,height:a,viewBox:`0 0 ${o} ${a}`,fill:"none","aria-hidden":"true",children:[e.jsx("polyline",{points:g,stroke:c,strokeWidth:1.5,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),n&&e.jsx("circle",{cx:m,cy:h,r:2.5,fill:c})]})}const se=48,_0=4,_e=4,O0=24;function G0(r){if(r<=0)return 100;const t=Math.pow(10,Math.floor(Math.log10(r))),o=r/t;return([1,2,2.5,5,10].find(n=>n>=o)??10)*t}function U0(r,t,o,a,n){const s=Math.min(n,o/2,a/2);return`M${r},${t+a} L${r},${t+s} Q${r},${t} ${r+s},${t} L${r+o-s},${t} Q${r+o},${t} ${r+o},${t+s} L${r+o},${t+a} Z`}function sa({data:r,series:t,height:o=200,formatYTick:a,formatXTick:n,formatTooltipHeader:s,formatTooltipValue:l,referenceLine:c,className:d}){const x=j.useRef(null),[p,f]=j.useState(0);j.useEffect(()=>{const N=x.current;if(!N||typeof ResizeObserver>"u")return;const B=new ResizeObserver(E=>{var V;f(((V=E[0])==null?void 0:V.contentRect.width)??0)});return B.observe(N),()=>B.disconnect()},[]);const[u,g]=j.useState(null);if(!r.length||p===0)return e.jsx("div",{ref:x,"data-testid":"stacked-bar-chart",className:d,style:{width:"100%",height:o}});const m=p-se-_0,h=o-_e-O0,v=r.length,w=m/v,k=Math.max(8,Math.min(28,Math.floor(w)-4)),L=(w-k)/2,z=r.reduce((N,B)=>{const E=t.reduce((V,H)=>V+Number(B[H.key]??0),0);return Math.max(N,E)},0),C=G0(Math.max(z,(c==null?void 0:c.value)??0)),T=5,I=Array.from({length:T},(N,B)=>C/(T-1)*B);function $(N){return _e+h-N/C*h}function F(N){const B=N.currentTarget.closest("svg");if(!B)return;const E=B.getBoundingClientRect(),V=N.clientX-E.left,H=N.clientY-E.top,W=Math.floor((V-se)/w);W>=0&&W<v?g({index:W,mouseX:V,mouseY:H}):u!==null&&g(null)}const S=u!==null?(()=>{const N=r[u.index],B=t.reduce((H,W)=>H+Number(N[W.key]??0),0),E=160,V=u.mouseX+12+E>p?u.mouseX-12-E:u.mouseX+12;return e.jsxs("div",{style:{position:"absolute",left:V,top:Math.max(0,u.mouseY-8),pointerEvents:"none",zIndex:50,background:"#fff",border:"1px solid #e5e7eb",borderRadius:8,boxShadow:"0 4px 12px rgba(0,0,0,0.08)",padding:"8px 12px",fontSize:12,minWidth:140},children:[e.jsx("div",{style:{fontWeight:500,color:"#374151",marginBottom:6},children:s?s(N.x):N.x}),[...t].reverse().map(H=>{const W=Number(N[H.key]??0);return e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:16,marginBottom:2},children:[e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:6,color:"#6b7280"},children:[e.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:H.color,flexShrink:0,display:"inline-block"}}),H.label]}),e.jsx("span",{style:{fontWeight:500,color:"#1f2937",fontVariantNumeric:"tabular-nums"},children:l?l(W):String(W)})]},H.key)}),t.length>1&&e.jsxs("div",{style:{marginTop:6,paddingTop:6,borderTop:"1px solid #f3f4f6",display:"flex",justifyContent:"space-between"},children:[e.jsx("span",{style:{color:"#9ca3af"},children:"Total"}),e.jsx("span",{style:{fontWeight:600,color:"#1f2937",fontVariantNumeric:"tabular-nums"},children:l?l(B):String(B)})]})]})})():null;return e.jsxs("div",{ref:x,"data-testid":"stacked-bar-chart",className:d,style:{position:"relative",width:"100%",height:o},children:[e.jsxs("svg",{width:"100%",height:o,"aria-hidden":"true",children:[I.filter(N=>N>0).map(N=>e.jsx("line",{x1:se,y1:$(N),x2:se+m,y2:$(N),stroke:"#e5e7eb",strokeWidth:1},N)),I.map(N=>e.jsx("text",{x:se-6,y:$(N),textAnchor:"end",dominantBaseline:"middle",fontSize:11,fill:"#9ca3af",children:a?a(N):String(N)},N)),u!==null&&e.jsx("rect",{x:se+u.index*w,y:_e,width:w,height:h,fill:"rgba(0,0,0,0.04)"}),r.map((N,B)=>{const E=se+B*w+L;let V=-1;for(let W=t.length-1;W>=0;W--)if(Number(N[t[W].key]??0)>0){V=W;break}let H=0;return e.jsx("g",{children:t.map((W,O)=>{const M=Number(N[W.key]??0);if(M<=0)return null;const D=M/C*h,_=$(H+M);return H+=M,O===V?e.jsx("path",{d:U0(E,_,k,D,3),fill:W.color},W.key):e.jsx("rect",{x:E,y:_,width:k,height:D,fill:W.color},W.key)})},N.x)}),r.map((N,B)=>e.jsx("text",{x:se+B*w+w/2,y:_e+h+14,textAnchor:"middle",fontSize:11,fill:"#9ca3af",children:n?n(N.x):N.x},N.x)),c&&e.jsx("line",{x1:se,y1:$(c.value),x2:se+m,y2:$(c.value),stroke:c.color??"#E24B4A",strokeDasharray:c.strokeDasharray??"4 3",strokeWidth:1.5}),e.jsx("rect",{x:se,y:_e,width:m,height:h,fill:"transparent",onMouseMove:F,onMouseLeave:()=>g(null)})]}),S]})}function Y0({cells:r,drillRows:t,colCount:o,defaultExpanded:a=!1,onToggle:n,rowClassName:s,drillRowClassName:l}){const[c,d]=j.useState(a),x=()=>{const p=!c;d(p),n==null||n(p)};return e.jsxs(e.Fragment,{children:[e.jsx("tr",{className:s,onClick:x,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),x())},role:"button",tabIndex:0,"aria-expanded":c,style:{cursor:"pointer",background:"#fff"},children:r.map((p,f)=>e.jsx("td",{style:{padding:"10px 16px",fontSize:13,color:f===0?"var(--color-text-primary, #000626)":"var(--color-text-secondary, #595f7a)"},children:f===0?e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:6},children:[e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",style:{transform:c?"rotate(90deg)":"rotate(0deg)",transition:"transform 0.15s ease-out",flexShrink:0},children:e.jsx("path",{d:"M3 1L7 5L3 9",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})}),p]}):p},f))}),c&&t.map(p=>e.jsx("tr",{className:l,style:{background:"var(--color-bg-secondary, #f9fafb)",borderBottom:"1px solid var(--color-gray-100, #f3f4f6)"},children:p.cells.map((f,u)=>e.jsx("td",{style:{padding:"8px 16px",paddingLeft:u===0?32:16,fontSize:12,color:"var(--color-text-secondary, #595f7a)"},children:f},u))},p.key))]})}const K0=`
|
|
123
|
+
`}),r&&e.jsx("div",{className:"print-header hidden print:block border-b border-[var(--color-gray-200)] pb-3 mb-4",children:r}),e.jsx("div",{className:y(`report-page flex flex-col ${g}`,s),children:n}),t&&e.jsx("div",{className:"print-footer hidden print:block border-t border-[var(--color-gray-200)] pt-3 mt-4 text-[11px] text-[var(--color-gray-600)]",children:t})]})}const Gc="Geist Mono, ui-monospace, monospace",xt=r=>r==="right"?"right":r==="center"?"center":"left";function Uc({columns:r,rows:t,emptyMessage:o="No data",renderMode:a="web",className:n}){const s=a==="pdf",l=a==="excel",c=s||l,d=s?"6px 10px":l?"4px 8px":"10px 16px",x=s?"5px 10px":l?"4px 8px":"9px 16px",p=c?12:13,f=c?9:10;return e.jsx("div",{className:y("border border-[var(--color-gray-200)] overflow-hidden",!l&&"rounded-lg",n),children:e.jsxs("table",{className:"w-full",style:{borderCollapse:"collapse",tableLayout:s?"auto":void 0},children:[e.jsx("thead",{children:e.jsx("tr",{children:r.map(u=>e.jsx("th",{style:{padding:x,textAlign:xt(u.align),fontSize:f,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-gray-600)",background:"var(--color-gray-50)",borderBottom:"1px solid var(--color-gray-200)",whiteSpace:"nowrap"},children:u.label},u.key))})}),e.jsx("tbody",{children:t.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:r.length,style:{padding:"24px 16px",textAlign:"center",fontSize:13,color:"var(--color-gray-600)",background:"var(--color-white)"},children:o})}):t.map((u,g)=>e.jsx("tr",{style:{background:"var(--color-white)",borderBottom:g<t.length-1?"1px solid var(--color-gray-100)":void 0},children:r.map((m,h)=>e.jsx("td",{style:{padding:d,textAlign:xt(m.align),fontSize:p,color:h===0?"var(--color-gray-1000)":"var(--color-gray-800)",fontFamily:m.mono?Gc:void 0,fontVariantNumeric:m.mono?"tabular-nums":void 0,whiteSpace:s&&(h===0||m.mono)?"nowrap":void 0},children:u[m.key]??"—"},m.key))},g))})]})})}const lr="Geist Mono, ui-monospace, monospace",Ho=24,_o=34,Oe=r=>r==="right"?"right":r==="center"?"center":"left";function Yc({row:r,columns:t,renderMode:o="web"}){const a=r.variant==="grand-total",n=o==="pdf",s=n?11:13,l=n?12:13,c=a?"var(--color-blue-200)":"var(--color-gray-100)",d=a?"var(--color-blue-1000)":"var(--color-gray-1000)",x=a?"2px solid var(--color-blue-800)":"1px solid var(--color-gray-200)";return e.jsx("tr",{style:{background:c,borderTop:x,height:a?n?Ho:_o:void 0},children:t.map((p,f)=>{const u=f===0,g=u?r.label:r.values[p.key]??"";return e.jsx("td",{style:{padding:n?"0 10px":"0 16px",textAlign:Oe(p.align),fontSize:a?l:s,fontWeight:a?700:600,color:d,fontFamily:p.mono||!u?lr:void 0,fontVariantNumeric:"tabular-nums",whiteSpace:n?"nowrap":void 0},children:g},p.key)})})}function Kc({columns:r,groups:t,rows:o,totals:a,renderMode:n="web",className:s}){const l=n==="pdf",c=n==="excel",d=l||c,x=l?"6px 10px":c?"4px 8px":"10px 16px",p=l?Ho:c?void 0:_o,f=d?12:13,u=d?9:10;return e.jsx("div",{className:y("border border-[var(--color-gray-200)] overflow-hidden",!c&&"rounded-lg",s),children:e.jsxs("table",{className:"w-full",style:{borderCollapse:"collapse",tableLayout:l?"auto":void 0},children:[e.jsx("thead",{children:e.jsx("tr",{style:{height:p},children:r.map(g=>e.jsx("th",{style:{padding:l?"0 10px":c?"4px 8px":"0 16px",textAlign:Oe(g.align),fontSize:u,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-white)",background:"var(--color-blue-1000)",whiteSpace:"nowrap"},children:g.label},g.key))})}),o&&o.length>0&&e.jsx("tbody",{children:o.map((g,m)=>e.jsx("tr",{style:{background:"var(--color-white)",borderBottom:"1px solid var(--color-gray-100)"},children:r.map((h,v)=>e.jsx("td",{style:{padding:x,textAlign:Oe(h.align),fontSize:f,color:"var(--color-gray-1000)",fontFamily:h.mono?lr:void 0,fontVariantNumeric:h.mono?"tabular-nums":void 0,whiteSpace:l&&(v===0||h.mono)?"nowrap":void 0},children:g[h.key]??"—"},h.key))},m))}),t==null?void 0:t.map((g,m)=>e.jsxs("tbody",{style:{pageBreakInside:"avoid",breakInside:"avoid"},children:[e.jsx("tr",{style:{background:"var(--color-blue-800-bg)",borderTop:m>0?"1px solid var(--color-blue-800-subtle)":void 0,borderBottom:"1px solid var(--color-blue-800-subtle)"},children:e.jsxs("td",{colSpan:r.length,style:{padding:d?"5px 10px":"7px 16px",paddingLeft:d?16:24,fontSize:d?9:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-blue-1000)"},children:[g.label,n==="web"&&g.count!=null&&e.jsx("span",{style:{marginLeft:8,padding:"1px 6px",borderRadius:9999,fontSize:10,fontWeight:600,background:"var(--color-blue-800-subtle)",color:"var(--color-blue-1000)"},children:g.count})]})}),g.rows.map((h,v)=>e.jsx("tr",{style:{background:"var(--color-white)",borderBottom:v<g.rows.length-1?"1px solid var(--color-gray-100)":void 0},children:r.map((w,k)=>e.jsx("td",{style:{padding:x,paddingLeft:k===0?d?16:24:void 0,textAlign:Oe(w.align),fontSize:f,color:"var(--color-gray-1000)",fontFamily:w.mono?lr:void 0,fontVariantNumeric:w.mono?"tabular-nums":void 0,whiteSpace:l&&(k===0||w.mono)?"nowrap":void 0},children:h[w.key]??"—"},w.key))},v)),g.subtotal&&e.jsx("tr",{style:{background:"var(--color-gray-100)",borderTop:"1px solid var(--color-gray-200)",borderBottom:"1px solid var(--color-gray-200)"},children:r.map((h,v)=>{const w=g.subtotal[h.key],k=v===0?w??"Subtotal":w??"";return e.jsx("td",{style:{padding:d?"5px 10px":"9px 16px",textAlign:Oe(h.align),fontSize:v===0?d?10:11:f,fontWeight:600,textTransform:v===0?"uppercase":void 0,letterSpacing:v===0?"0.04em":void 0,color:v===0?"var(--color-gray-800)":"var(--color-gray-1000)",fontFamily:h.mono?lr:void 0,fontVariantNumeric:h.mono?"tabular-nums":void 0,whiteSpace:l?"nowrap":void 0},children:k},h.key)})})]},m)),a&&a.length>0&&e.jsx("tfoot",{children:a.map((g,m)=>e.jsx(Yc,{row:g,columns:r,renderMode:n},m))})]})})}const ft="Geist Mono, ui-monospace, monospace",yr="#f0f9ff",Zc="var(--color-blue-1000)";function Xc({rowLabel:r,columns:t,sections:o,rows:a,renderMode:n="web",className:s}){const l=n==="pdf",c=n==="excel",d=l||c,x=d?"6px 10px":"10px 16px",p=d?"5px 10px":"9px 16px",f=d?12:13,u=d?9:10,g=o?null:a??[];return e.jsx("div",{className:y("border border-[var(--color-gray-200)] overflow-hidden",!c&&"rounded-lg",s),children:e.jsxs("table",{className:"w-full",style:{borderCollapse:"collapse",tableLayout:l?"auto":void 0},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{padding:p,textAlign:"left",fontSize:u,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-gray-600)",background:"var(--color-gray-50)",borderBottom:"1px solid var(--color-gray-200)",whiteSpace:"nowrap"},children:r}),t.map(m=>e.jsx("th",{style:{padding:p,textAlign:"right",fontSize:u,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:m.highlight?Zc:"var(--color-gray-600)",background:m.highlight?yr:"var(--color-gray-50)",borderBottom:"1px solid var(--color-gray-200)",whiteSpace:"nowrap"},children:m.label},m.key))]})}),e.jsxs("tbody",{children:[g==null?void 0:g.map((m,h)=>e.jsxs("tr",{style:{background:"var(--color-white)",borderBottom:h<g.length-1?"1px solid var(--color-gray-100)":void 0},children:[e.jsx("td",{style:{padding:x,fontSize:f,color:"var(--color-gray-1000)",whiteSpace:l?"nowrap":void 0},children:m.account??m.label??""}),t.map(v=>e.jsx("td",{style:{padding:x,textAlign:"right",fontSize:f,fontFamily:ft,fontVariantNumeric:"tabular-nums",color:v.highlight?"var(--color-gray-1000)":"var(--color-gray-800)",background:v.highlight?yr:void 0,whiteSpace:l?"nowrap":void 0},children:m[v.key]??"—"},v.key))]},h)),o==null?void 0:o.map((m,h)=>e.jsxs(j.Fragment,{children:[e.jsx("tr",{style:{background:"var(--color-gray-50)",borderTop:h>0?"1px solid var(--color-gray-200)":void 0,borderBottom:"1px solid var(--color-gray-200)"},children:e.jsx("td",{colSpan:t.length+1,style:{padding:d?"5px 10px":"7px 16px",fontSize:u,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-gray-600)"},children:m.label})}),m.rows.map((v,w)=>e.jsxs("tr",{style:{background:"var(--color-white)",borderBottom:w<m.rows.length-1?"1px solid var(--color-gray-100)":void 0},children:[e.jsx("td",{style:{padding:x,paddingLeft:d?16:24,fontSize:f,color:"var(--color-gray-800)",whiteSpace:l?"nowrap":void 0},children:v.account??v.label??""}),t.map(k=>e.jsx("td",{style:{padding:x,textAlign:"right",fontSize:f,fontFamily:ft,fontVariantNumeric:"tabular-nums",color:k.highlight?"var(--color-gray-1000)":"var(--color-gray-800)",background:k.highlight?yr:void 0,whiteSpace:l?"nowrap":void 0},children:v[k.key]??"—"},k.key))]},w))]},h))]})]})})}const Ae={primary:"#e15713",secondary:"#15b1cd",positive:"#71d481",negative:"#fb6060",total:"#000626",grid:"#e5e7f0",axisLabel:"#8c92af",text:"#000626",textMuted:"#595f7a",priorFill:"rgba(229, 231, 240, 0.6)",areaFill:"rgba(229, 87, 19, 0.08)",areaFill2:"rgba(21, 177, 205, 0.08)",forecastFill:"rgba(229, 87, 19, 0.04)",forecastBand:"rgba(229, 87, 19, 0.05)"},qc=[Ae.primary,Ae.secondary,Ae.positive,Ae.total,Ae.axisLabel,"#5b21b6","#c2410c"],J="'Geist Mono', 'ui-monospace', monospace",ee="'Geist', 'system-ui', sans-serif",Y={top:20,right:12,bottom:32,left:56};function Re(r,t){const o=parseInt(r.slice(1,3),16),a=parseInt(r.slice(3,5),16),n=parseInt(r.slice(5,7),16);return`rgba(${o}, ${a}, ${n}, ${t})`}const Oo={archie:{primary:"#e15713",secondary:"#15b1cd",positive:"#71d481",negative:"#fb6060",total:"#000626",series:["#e15713","#15b1cd","#6D28D9","#15803D","#BE123C","#0369A1","#C2410C"]},ocean:{primary:"#0369A1",secondary:"#15b1cd",positive:"#71d481",negative:"#fb6060",total:"#022e40",series:["#0369A1","#15b1cd","#6aeafd","#022e40","#8c92af","#15803D","#6D28D9"]},forest:{primary:"#15803D",secondary:"#0369A1",positive:"#71d481",negative:"#fb6060",total:"#000626",series:["#15803D","#0369A1","#71d481","#000626","#8c92af","#6D28D9","#C2410C"]},sunset:{primary:"#C2410C",secondary:"#BE123C",positive:"#71d481",negative:"#fb6060",total:"#000626",series:["#C2410C","#BE123C","#8f6c1a","#000626","#8c92af","#e15713","#6D28D9"]},lavender:{primary:"#6D28D9",secondary:"#0369A1",positive:"#71d481",negative:"#fb6060",total:"#000626",series:["#6D28D9","#0369A1","#15803D","#000626","#8c92af","#C2410C","#BE123C"]},monochrome:{primary:"#000626",secondary:"#595f7a",positive:"#71d481",negative:"#fb6060",total:"#000626",series:["#000626","#595f7a","#8c92af","#e5e7f0","#022e40"]}};function le(r){const t=Oo[r.colorScheme??"archie"],o=r.primaryColor??t.primary,a=r.comparisonColor??t.secondary;return{primary:o,secondary:a,positive:t.positive,negative:t.negative,total:t.total,series:[o,a,...t.series.slice(2)],priorFill:"rgba(229, 231, 240, 0.6)",areaFill:Re(o,.08),areaFill2:Re(a,.08),forecastFill:Re(o,.04),forecastBand:Re(o,.05),grid:"#e5e7f0",axisLabel:"#8c92af",text:"#000626",textMuted:"#595f7a"}}function Jc({title:r,subtitle:t,footer:o,renderMode:a="web",className:n,children:s}){const l=a==="pdf";return e.jsxs("div",{className:y("chart-section",n),style:{breakInside:"avoid",pageBreakInside:"avoid"},children:[e.jsxs("div",{style:{borderBottom:"1px solid #e5e7f0",paddingBottom:l?6:8,marginBottom:l?12:16},children:[e.jsx("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"#000626",fontFamily:"'Geist', system-ui, sans-serif"},children:r}),t&&e.jsx("div",{style:{fontSize:11,fontWeight:400,color:"#8c92af",marginTop:2,fontFamily:"'Geist', system-ui, sans-serif"},children:t})]}),e.jsx("div",{children:s}),o&&e.jsx("div",{style:{fontSize:10,fontWeight:400,color:"#8c92af",marginTop:l?6:8,fontFamily:"'Geist', system-ui, sans-serif",lineHeight:1.5},children:o})]})}function Ke(r,t){const[o,a]=r,[n,s]=t,l=a-o||1,c=s-n;return d=>n+(d-o)/l*c}function Go(r,t,o=.25){const a=r.length,n=t/(a+o*(a-1)+o),s=n*(1-o/(1+o)),l=n*(o/(1+o)),c=d=>{const x=r.indexOf(d);return x===-1?0:x*(s+l)+l/2};return c.bandwidth=s,c.step=s+l,c}function Ze(r,t,o=5){if(r===t)return[r];const a=(t-r)/(o-1),n=Math.pow(10,Math.floor(Math.log10(Math.abs(a)))),s=[1,2,2.5,5,10];let l=n;for(const p of s)if(p*n>=a){l=p*n;break}const c=Math.floor(r/l)*l,d=[];let x=c;for(;x<=t+l*.01;)d.push(x),x=parseFloat((x+l).toPrecision(12));return d}function fr(r){const t=Math.min(0,...r),o=Math.max(0,...r);return[t,o]}function xe(r,t,o="$",a=!0){if(t==="percent")return`${r.toFixed(1)}%`;if(t==="ratio")return`${r.toFixed(2)}×`;if(t==="number")return a?dr(r):r.toLocaleString("en",{maximumFractionDigits:1});const n=o;return a?`${n}${dr(r)}`:`${n}${Math.abs(r).toLocaleString("en",{maximumFractionDigits:0})}`}function dr(r){const t=Math.abs(r),o=r<0?"-":"";return t>=1e6?`${o}${(t/1e6).toFixed(t>=1e7?0:1)}M`:t>=1e3?`${o}${(t/1e3).toFixed(t>=1e5?0:1)}K`:`${o}${t.toFixed(0)}`}function Ge(r,t,o="$"){return t==="percent"?`${r.toFixed(1)}%`:t==="ratio"?`${r.toFixed(2)}×`:t==="number"?dr(r):`${o}${dr(r)}`}const me=2;function Qc({data:r,config:t}){const{width:o,height:a,valueType:n,currency:s="$",renderMode:l="web",showDataLabels:c=!1,showLegend:d=!1,showComparison:x=!1,comparisonLabel:p="Prior Year",primaryLabel:f="Current"}=t,u=le(t),g=l==="pdf",m=o-Y.left-Y.right,h=a-Y.top-Y.bottom,v=j.useMemo(()=>{const S=r.map(N=>N.value);return x&&r.forEach(N=>{N.priorValue!==void 0&&S.push(N.priorValue)}),S},[r,x]),w=fr(v),k=Ke(w,[h,0]),$=k(0),z=r.map(S=>S.label),C=Go(z,m,.3),T=C.bandwidth,I=Ze(w[0],w[1],5),L=(S,N=!0)=>xe(S,n,s,N),F=S=>Ge(S,n,s);return e.jsx("svg",{width:o,height:a,viewBox:`0 0 ${o} ${a}`,"aria-hidden":"true",style:{display:"block",overflow:"visible"},children:e.jsxs("g",{transform:`translate(${Y.left},${Y.top})`,children:[I.map(S=>{const N=k(S);return e.jsxs("g",{children:[e.jsx("line",{x1:0,y1:N,x2:m,y2:N,stroke:u.grid,strokeWidth:1}),e.jsx("text",{x:-8,y:N,textAnchor:"end",dominantBaseline:"middle",style:{fontSize:10,fontFamily:J,fill:u.axisLabel},children:L(S)})]},S)}),w[0]<0&&e.jsx("line",{x1:0,y1:$,x2:m,y2:$,stroke:u.axisLabel,strokeWidth:1}),r.map((S,N)=>{const B=C(S.label),E=S.isTotal?u.total:S.value<0?u.negative:u.primary,V=Math.min(k(S.value),$),H=Math.abs(k(S.value)-$),W=S.value<0,O=x&&S.priorValue!==void 0,M=O?Math.min(k(S.priorValue),$):0,D=O?Math.abs(k(S.priorValue)-$):0;return e.jsxs("g",{children:[e.jsxs("defs",{children:[e.jsx("clipPath",{id:`bar-clip-${N}`,children:e.jsx("rect",{x:B,y:W?V:V-me,width:T,height:H+me+1,rx:me,ry:me})}),O&&e.jsx("clipPath",{id:`prior-clip-${N}`,children:e.jsx("rect",{x:B,y:S.priorValue<0?M:M-me,width:T,height:D+me+1,rx:me,ry:me})})]}),O&&e.jsx("rect",{x:B,y:M,width:T,height:D,fill:u.priorFill,clipPath:`url(#prior-clip-${N})`}),H>0&&e.jsx("rect",{x:B,y:V,width:T,height:H,fill:E,clipPath:`url(#bar-clip-${N})`}),c&&H>0&&e.jsx("text",{x:B+T/2,y:W?V+H+12:V-4,textAnchor:"middle",style:{fontSize:10,fontFamily:J,fontWeight:600,fill:u.text},children:F(S.value)})]},S.label)}),r.map(S=>e.jsx("text",{x:C(S.label)+T/2,y:h+16,textAnchor:"middle",style:{fontSize:g?9:10,fontFamily:ee,fill:u.axisLabel},children:S.label},S.label)),d&&x&&e.jsxs("g",{transform:`translate(0, ${h+28})`,children:[e.jsx("rect",{width:10,height:10,rx:2,fill:u.primary,y:-1}),e.jsx("text",{x:14,y:8,style:{fontSize:10,fontFamily:ee,fill:u.axisLabel},children:f}),e.jsx("rect",{x:80,width:10,height:10,rx:2,fill:u.priorFill,y:-1}),e.jsx("text",{x:94,y:8,style:{fontSize:10,fontFamily:ee,fill:u.axisLabel},children:p})]})]})})}function ir(r,t=.4){if(r.length===0)return"";if(r.length===1)return`M ${r[0][0]},${r[0][1]}`;if(r.length===2)return`M ${r[0][0]},${r[0][1]} L ${r[1][0]},${r[1][1]}`;const o=[`M ${r[0][0]},${r[0][1]}`];for(let a=0;a<r.length-1;a++){const n=r[a-1]??r[a],s=r[a],l=r[a+1],c=r[a+2]??r[a+1],d=s[0]+(l[0]-n[0])/6*t*3,x=s[1]+(l[1]-n[1])/6*t*3,p=l[0]-(c[0]-s[0])/6*t*3,f=l[1]-(c[1]-s[1])/6*t*3;o.push(`C ${d},${x} ${p},${f} ${l[0]},${l[1]}`)}return o.join(" ")}function kr(r,t,o){if(t.length===0)return"";const a=t[t.length-1],n=t[0];return`${r} L ${a[0]},${o} L ${n[0]},${o} Z`}function ed(r,t,o,a,n){const s=[];let l=0;for(let c=0;c<r.length;c++){const d=r[c];if(t[c]){const p=o(0),f=o(l+d);s.push({x:a[c],yTop:Math.min(p,f),yBottom:Math.max(p,f),kind:"total"}),l+=d}else{const p=l,f=l+d,u=o(p),g=o(f);s.push({x:a[c],yTop:Math.min(u,g),yBottom:Math.max(u,g),kind:d>=0?"positive":"negative",connectorX:a[c]+n}),l=f}}return s}function Uo({labels:r,series:t,config:o}){const{width:a,height:n,valueType:s,currency:l="$",renderMode:c="web",showLegend:d=!1}=o,x=le(o),p=c==="pdf",f=a-Y.left-Y.right,u=n-Y.top-Y.bottom,g=j.useMemo(()=>t.flatMap(C=>C.data),[t]),m=fr(g),h=Ke(m,[u,0]),v=h(0),w=Ze(m[0],m[1],5),k=C=>xe(C,s,l),$=r.length>1?f/(r.length-1):0,z=C=>C*$;return e.jsx("svg",{width:a,height:n,viewBox:`0 0 ${a} ${n}`,"aria-hidden":"true",style:{display:"block",overflow:"visible"},children:e.jsxs("g",{transform:`translate(${Y.left},${Y.top})`,children:[w.map(C=>{const T=h(C);return e.jsxs("g",{children:[e.jsx("line",{x1:0,y1:T,x2:f,y2:T,stroke:x.grid,strokeWidth:1}),e.jsx("text",{x:-8,y:T,textAnchor:"end",dominantBaseline:"middle",style:{fontSize:10,fontFamily:J,fill:x.axisLabel},children:k(C)})]},C)}),m[0]<0&&e.jsx("line",{x1:0,y1:v,x2:f,y2:v,stroke:x.axisLabel,strokeWidth:1}),t.map((C,T)=>{const I=C.color??x.series[T%x.series.length],L=Re(I.startsWith("#")?I:x.series[T%x.series.length],.08),F=C.data.map((E,V)=>[z(V),h(E)]),S=ir(F),N=kr(S,F,v),B=F[F.length-1];return e.jsxs("g",{children:[(C.showArea??!1)&&e.jsx("path",{d:N,fill:L,stroke:"none"}),e.jsx("path",{d:S,fill:"none",stroke:I,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),B&&e.jsx("circle",{cx:B[0],cy:B[1],r:4,fill:I,stroke:"#fff",strokeWidth:1.5})]},C.label)}),r.map((C,T)=>e.jsx("text",{x:z(T),y:u+16,textAnchor:"middle",style:{fontSize:p?9:10,fontFamily:ee,fill:x.axisLabel},children:C},C)),d&&t.length>1&&e.jsx("g",{transform:`translate(0, ${u+28})`,children:t.map((C,T)=>{const I=C.color??x.series[T%x.series.length],L=T*110;return e.jsxs("g",{transform:`translate(${L}, 0)`,children:[e.jsx("line",{x1:0,y1:5,x2:16,y2:5,stroke:I,strokeWidth:2,strokeLinecap:"round"}),e.jsx("circle",{cx:8,cy:5,r:3,fill:I}),e.jsx("text",{x:20,y:9,style:{fontSize:10,fontFamily:ee,fill:x.axisLabel},children:C.label})]},C.label)})})]})})}function rd({data:r,config:t,color:o}){const a=le(t),n=[{label:t.primaryLabel??"Value",data:r.map(s=>s.value),color:o??a.primary,showArea:!0}];return t.showComparison&&r.some(s=>s.priorValue!==void 0)&&n.push({label:t.comparisonLabel??"Prior Year",data:r.map(s=>s.priorValue??0),color:a.secondary,showArea:!1}),e.jsx(Uo,{labels:r.map(s=>s.label),series:n,config:{...t,showLegend:t.showComparison?t.showLegend:!1}})}const or=2;function td({data:r,config:t}){const{width:o,height:a,valueType:n,currency:s="$",renderMode:l="web",showDataLabels:c=!0}=t,d=le(t),x=l==="pdf",p=o-Y.left-Y.right,f=a-Y.top-Y.bottom,u=j.useMemo(()=>{const S=[0];let N=0;for(const B of r)N+=B.value,S.push(N);return S},[r]),g=Math.min(0,...u),m=Math.max(0,...u),h=Ze(g,m,5),v=[Math.min(g,h[0]),Math.max(m,h[h.length-1])],w=Ke(v,[f,0]),k=r.map(S=>S.label),$=Go(k,p,.35),z=$.bandwidth,C=k.map(S=>$(S)),T=ed(r.map(S=>S.value),r.map(S=>!!S.isTotal),w,C,z),I=S=>xe(S,n,s),L=S=>Ge(S,n,s),F={positive:d.positive,negative:d.negative,total:d.total};return e.jsx("svg",{width:o,height:a,viewBox:`0 0 ${o} ${a}`,"aria-hidden":"true",style:{display:"block",overflow:"visible"},children:e.jsxs("g",{transform:`translate(${Y.left},${Y.top})`,children:[h.map(S=>{const N=w(S);return e.jsxs("g",{children:[e.jsx("line",{x1:0,y1:N,x2:p,y2:N,stroke:d.grid,strokeWidth:1}),e.jsx("text",{x:-8,y:N,textAnchor:"end",dominantBaseline:"middle",style:{fontSize:10,fontFamily:J,fill:d.axisLabel},children:I(S)})]},S)}),T.map((S,N)=>{const B=r[N],E=S.yBottom-S.yTop,V=B.value<0,H=F[S.kind],W=`wf-clip-${N}`,O=T[N+1],M=(S.kind==="total",S.yTop);return e.jsxs("g",{children:[e.jsx("defs",{children:e.jsx("clipPath",{id:W,children:e.jsx("rect",{x:S.x,y:V||S.kind==="total"?S.yTop:S.yTop-or,width:z,height:E+or+1,rx:or,ry:or})})}),E>0&&e.jsx("rect",{x:S.x,y:S.yTop,width:z,height:E,fill:H,clipPath:`url(#${W})`}),O&&S.connectorX!==void 0&&e.jsx("line",{x1:S.connectorX,y1:M,x2:O.x,y2:M,stroke:d.grid,strokeWidth:1,strokeDasharray:"3,3"}),c&&e.jsxs("text",{x:S.x+z/2,y:V?S.yBottom+12:S.yTop-4,textAnchor:"middle",style:{fontSize:x?9:10,fontFamily:J,fontWeight:600,fill:d.text},children:[B.value>=0?"+":"",L(B.value)]}),e.jsx("text",{x:S.x+z/2,y:f+16,textAnchor:"middle",style:{fontSize:x?9:10,fontFamily:ee,fill:d.axisLabel},children:B.label})]},B.label)})]})})}const Ve=18,ar=10,ut=140,od=60,gt=2;function ad({data:r,config:t,sorted:o=!0}){const{width:a,height:n,valueType:s,currency:l="$",renderMode:c="web"}=t,d=le(t),x=c==="pdf",p=j.useMemo(()=>o?[...r].sort((C,T)=>Math.abs(T.value)-Math.abs(C.value)):r,[r,o]),f=p.length*(Ve+ar)+ar+8,u=n>0?n:f,g=a-ut-od-24,m=p.map(C=>C.value),h=fr(m),v=Ke(h,[0,g]),w=v(0),k=C=>Ge(C,s,l),$=C=>xe(C,s,l),z=Ze(h[0],h[1],4);return e.jsx("svg",{width:a,height:u,viewBox:`0 0 ${a} ${u}`,"aria-hidden":"true",style:{display:"block",overflow:"visible"},children:e.jsxs("g",{transform:`translate(${ut+12},4)`,children:[z.map(C=>{const T=v(C);return e.jsxs("g",{children:[e.jsx("line",{x1:T,y1:0,x2:T,y2:f-8,stroke:d.grid,strokeWidth:1}),e.jsx("text",{x:T,y:f-2,textAnchor:"middle",style:{fontSize:9,fontFamily:J,fill:d.axisLabel},children:$(C)})]},C)}),h[0]<0&&e.jsx("line",{x1:w,y1:0,x2:w,y2:f-8,stroke:d.axisLabel,strokeWidth:1}),p.map((C,T)=>{const I=T*(Ve+ar)+ar,L=C.value<0,F=L?v(C.value):w,S=Math.abs(v(C.value)-w),N=L?d.negative:d.primary;return e.jsxs("g",{children:[e.jsx("text",{x:-8,y:I+Ve/2,textAnchor:"end",dominantBaseline:"middle",style:{fontSize:x?9:10,fontFamily:ee,fill:d.text},children:C.label.length>22?C.label.slice(0,21)+"…":C.label}),e.jsx("rect",{x:F,y:I,width:Math.max(S,1),height:Ve,fill:N,rx:gt,ry:gt}),e.jsx("text",{x:v(Math.max(0,C.value))+6,y:I+Ve/2,dominantBaseline:"middle",style:{fontSize:10,fontFamily:J,fontWeight:600,fill:d.text},children:k(C.value)})]},C.label)})]})})}const nd=3;function nr(r,t,o,a){const n=(a-90)*Math.PI/180;return{x:r+o*Math.cos(n),y:t+o*Math.sin(n)}}function sd(r,t,o,a,n,s){const l=nr(r,t,o,s),c=nr(r,t,o,n),d=nr(r,t,a,s),x=nr(r,t,a,n),p=s-n>180?1:0;return[`M ${l.x},${l.y}`,`A ${o},${o} 0 ${p},0 ${c.x},${c.y}`,`L ${x.x},${x.y}`,`A ${a},${a} 0 ${p},1 ${d.x},${d.y}`,"Z"].join(" ")}function ld({segments:r,config:t,centerLabel:o}){const{width:a,valueType:n,currency:s="$",renderMode:l="web"}=t,c=le(t),d=l==="pdf",x=j.useMemo(()=>r.reduce((z,C)=>z+Math.abs(C.value),0),[r]),p=Math.ceil(r.length/2)*20+16,f=Math.min(a,200),u=f+p,g=f/2,m=f/2,h=f/2-8,v=h*.62,w=j.useMemo(()=>{let z=0;const C=nd,T=360-r.length*C;return r.map((I,L)=>{const F=I.color??c.series[L%c.series.length],S=x>0?Math.abs(I.value)/x:0,N=S*T,B=z,E=z+N;return z=E+C,{...I,startDeg:B,endDeg:E,color:F,proportion:S}})},[r,x]),k=z=>Ge(z,n,s),$=z=>Ge(z,n,s);return e.jsxs("svg",{width:a,height:u,viewBox:`0 0 ${a} ${u}`,"aria-hidden":"true",style:{display:"block"},children:[e.jsxs("g",{transform:`translate(${(a-f)/2}, 0)`,children:[w.map(z=>e.jsx("path",{d:sd(g,m,h,v,z.startDeg,z.endDeg),fill:z.color},z.label)),e.jsx("text",{x:g,y:m-6,textAnchor:"middle",style:{fontSize:18,fontFamily:J,fontWeight:300,fill:c.text},children:k(x)}),o&&e.jsx("text",{x:g,y:m+14,textAnchor:"middle",style:{fontSize:9,fontFamily:ee,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",fill:c.axisLabel},children:o})]}),e.jsx("g",{transform:`translate(12, ${f+8})`,children:w.map((z,C)=>{const T=C%2,I=Math.floor(C/2),L=T*(a/2-6),F=I*20;return e.jsxs("g",{transform:`translate(${L}, ${F})`,children:[e.jsx("circle",{cx:5,cy:6,r:5,fill:z.color}),e.jsx("text",{x:14,y:11,style:{fontSize:d?9:10,fontFamily:ee,fill:c.axisLabel},children:z.label.length>18?z.label.slice(0,17)+"…":z.label}),e.jsx("text",{x:a/2-18,y:11,textAnchor:"end",style:{fontSize:10,fontFamily:J,fontWeight:600,fill:c.text},children:$(z.value)})]},z.label)})})]})}function id({data:r,config:t}){const{width:o,height:a,valueType:n,currency:s="$",renderMode:l="web"}=t,c=le(t),d=l==="pdf",x=o-Y.left-Y.right,p=a-Y.top-Y.bottom,f=r.findIndex(D=>D.isForecast),u=f!==-1,g=u?r.slice(0,f):r,m=u?r.slice(f):[],h=j.useMemo(()=>{const D=r.map(_=>_.value);return r.forEach(_=>{_.upperBound!==void 0&&D.push(_.upperBound),_.lowerBound!==void 0&&D.push(_.lowerBound)}),D},[r]),v=fr(h),w=Ke(v,[p,0]),k=w(0),$=Ze(v[0],v[1],5),z=r.length>1?x/(r.length-1):0,C=D=>D*z,T=g.map((D,_)=>[C(_),w(D.value)]),I=m.map((D,_)=>[C(f+_),w(D.value)]),L=T.length?[T[T.length-1],...I]:I,F=ir(T),S=kr(F,T,k),N=ir(L),B=kr(N,L,k),E=m.some(D=>D.upperBound!==void 0&&D.lowerBound!==void 0),V=E?m.map((D,_)=>({upper:[C(f+_),w(D.upperBound??D.value)],lower:[C(f+_),w(D.lowerBound??D.value)]})):[];let H="";if(V.length>0){const D=ir(V.map(re=>re.upper)),fe=[...V].reverse().map(re=>re.lower).map((re,K)=>`L ${re[0]},${re[1]}`).join(" ");H=`${D} ${fe} Z`}const W=u?C(f):null,O=T[T.length-1],M=D=>xe(D,n,s);return e.jsx("svg",{width:o,height:a,viewBox:`0 0 ${o} ${a}`,"aria-hidden":"true",style:{display:"block",overflow:"visible"},children:e.jsxs("g",{transform:`translate(${Y.left},${Y.top})`,children:[$.map(D=>{const _=w(D);return e.jsxs("g",{children:[e.jsx("line",{x1:0,y1:_,x2:x,y2:_,stroke:c.grid,strokeWidth:1}),e.jsx("text",{x:-8,y:_,textAnchor:"end",dominantBaseline:"middle",style:{fontSize:10,fontFamily:J,fill:c.axisLabel},children:M(D)})]},D)}),E&&H&&e.jsx("path",{d:H,fill:c.forecastBand,stroke:"none"}),T.length>1&&e.jsx("path",{d:S,fill:c.areaFill,stroke:"none"}),T.length>1&&e.jsx("path",{d:F,fill:"none",stroke:c.primary,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),I.length>0&&e.jsx("path",{d:B,fill:c.forecastFill,stroke:"none"}),I.length>0&&e.jsx("path",{d:N,fill:"none",stroke:c.primary,strokeWidth:1.5,strokeDasharray:"5,4",strokeLinecap:"round",strokeLinejoin:"round"}),O&&e.jsx("circle",{cx:O[0],cy:O[1],r:4,fill:c.primary,stroke:"#fff",strokeWidth:1.5}),W!==null&&e.jsx("line",{x1:W,y1:0,x2:W,y2:p,stroke:c.grid,strokeWidth:1,strokeDasharray:"3,3"}),W!==null&&e.jsx("text",{x:W+5,y:p*.2,style:{fontSize:d?8:9,fontFamily:ee,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",fill:c.axisLabel},children:"FORECAST"}),r.map((D,_)=>r.length>14&&_%2!==0?null:e.jsx("text",{x:C(_),y:p+16,textAnchor:"middle",style:{fontSize:d?9:10,fontFamily:ee,fill:c.axisLabel},children:D.label},D.label))]})})}const cd=6,mt=12;function dd({data:r,config:t,labelGutter:o=130}){const{width:a,height:n,valueType:s,currency:l="$"}=t,c=le(t),d=j.useMemo(()=>Math.max(...r.map(v=>v.value),1),[r]),p=Math.max(80,a-o-110),f=r.length,u=(n-20)/f,g=Math.max(18,u-mt-cd),m=o+p/2,h=r.map((v,w)=>{const k=v.value/d*p,$=10+w*u;return{...v,width:k,y:$}});return e.jsx("svg",{width:a,height:n,style:{fontFamily:ee},role:"img",children:h.map((v,w)=>{const k=m-v.width/2,$=w>0?v.value/h[w-1].value*100:null,z=xe(v.value,s,l,!0),C=h[w+1];return e.jsxs("g",{children:[e.jsx("text",{x:o-10,y:v.y+g/2,textAnchor:"end",dominantBaseline:"central",fontSize:12,fill:c.text,fontWeight:500,children:v.label}),$!==null&&e.jsxs("text",{x:m,y:v.y-4,textAnchor:"middle",fontSize:10,fontFamily:J,fill:c.axisLabel,children:[$.toFixed(0),"% ↓"]}),e.jsx("rect",{x:k,y:v.y,width:v.width,height:g,rx:3,fill:c.primary,opacity:.85-w*.08}),C&&e.jsx("path",{d:(()=>{const T=k,I=k+v.width,L=m-C.width/2,F=m+C.width/2,S=v.y+g,N=S+mt;return`M${T},${S} L${I},${S} L${F},${N} L${L},${N} Z`})(),fill:c.primary,opacity:.15}),e.jsx("text",{x:o+p+10,y:v.y+g/2-6,fontSize:12,fontFamily:J,fill:c.text,fontWeight:500,children:z}),v.count!==void 0&&e.jsxs("text",{x:o+p+10,y:v.y+g/2+8,fontSize:10,fill:c.axisLabel,children:[v.count.toLocaleString("en")," ",v.count===1?"deal":"deals"]})]},v.label)})})}const Te=34,$e=12;function pd({data:r,config:t,labelGutter:o=140,readoutGutter:a=120}){const{width:n,valueType:s,currency:l="$"}=t,c=le(t),d=o,x=Math.max(80,n-o-a);return e.jsx("svg",{width:n,height:Math.max(t.height,r.length*Te+16),style:{fontFamily:ee},role:"img",children:r.map((p,f)=>{const u=p.bands??[p.target*.6,p.target,p.target*1.3],g=Math.max(u[2],p.actual,p.target)*1.02,m=T=>Math.max(0,Math.min(T,g))/g*x,h=12+f*Te,v=h+(Te-$e)/2,w=m(u[0]),k=m(u[1]),$=m(u[2]),z=m(p.actual),C=d+m(p.target);return e.jsxs("g",{children:[e.jsx("text",{x:o-10,y:h+Te/2,textAnchor:"end",dominantBaseline:"central",fontSize:12,fill:c.text,fontWeight:500,children:p.label}),e.jsx("rect",{x:d,y:v-6,width:$,height:$e+12,fill:"#d4d8e3",rx:2}),e.jsx("rect",{x:d,y:v-6,width:k,height:$e+12,fill:"#e5e7f0",rx:2}),e.jsx("rect",{x:d,y:v-6,width:w,height:$e+12,fill:"#f0f1f7",rx:2}),e.jsx("rect",{x:d,y:v,width:z,height:$e,fill:p.actual>=p.target?c.positive:c.primary,rx:2}),e.jsx("line",{x1:C,x2:C,y1:v-6,y2:v+$e+6,stroke:c.total,strokeWidth:2}),e.jsx("text",{x:n-10,y:h+Te/2-6,textAnchor:"end",fontSize:12,fontFamily:J,fill:c.text,fontWeight:500,children:xe(p.actual,s,l,!0)}),e.jsxs("text",{x:n-10,y:h+Te/2+8,textAnchor:"end",fontSize:10,fontFamily:J,fill:c.axisLabel,children:["/ ",xe(p.target,s,l,!0)]})]},p.label)})})}function xd(r,t,o){const a=c=>[parseInt(c.slice(1,3),16),parseInt(c.slice(3,5),16),parseInt(c.slice(5,7),16)],n=a(r),s=a(t);return"#"+n.map((c,d)=>Math.round(c+(s[d]-c)*o)).map(c=>c.toString(16).padStart(2,"0")).join("")}function fd({rows:r,cols:t,values:o,config:a,labelGutter:n=110,topGutter:s=28}){const{width:l,height:c,valueType:d,currency:x="$",showDataLabels:p=!0}=a,f=le(a),{min:u,max:g}=j.useMemo(()=>{let k=1/0,$=-1/0;for(const z of o)for(const C of z)C<k&&(k=C),C>$&&($=C);return isFinite(k)||(k=0,$=1),k===$&&($=k+1),{min:k,max:$}},[o]),m=(l-n-8)/t.length,h=(c-s-8)/r.length,v="#ffffff",w=f.primary;return e.jsxs("svg",{width:l,height:c,style:{fontFamily:ee},role:"img",children:[t.map((k,$)=>e.jsx("text",{x:n+$*m+m/2,y:s-8,textAnchor:"middle",fontSize:10,fontWeight:600,fill:f.axisLabel,style:{letterSpacing:"0.05em",textTransform:"uppercase"},children:k},`col-${k}`)),r.map((k,$)=>e.jsxs("g",{children:[e.jsx("text",{x:n-8,y:s+$*h+h/2,textAnchor:"end",dominantBaseline:"central",fontSize:11,fill:f.text,fontWeight:500,children:k}),t.map((z,C)=>{var E;const T=((E=o[$])==null?void 0:E[C])??0,I=(T-u)/(g-u),L=xd(v,w,Math.max(0,Math.min(1,I))),F=n+C*m+1,S=s+$*h+1,N=m-2,B=h-2;return e.jsxs("g",{children:[e.jsx("rect",{x:F,y:S,width:N,height:B,rx:2,fill:L,stroke:f.grid}),p&&e.jsx("text",{x:F+N/2,y:S+B/2,textAnchor:"middle",dominantBaseline:"central",fontSize:10,fontFamily:J,fill:I>.55?"#fff":f.text,children:xe(T,d,x,!0)})]},`c-${$}-${C}`)})]},`row-${k}`))]})}function ud({accent:r,width:t,height:o}){return e.jsxs("svg",{viewBox:`0 0 ${t} ${o}`,width:t,height:o,xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid slice",children:[e.jsx("rect",{width:t,height:o,fill:"#000626"}),e.jsx("ellipse",{cx:t*.8,cy:o*.85,rx:t*.7,ry:o*.55,fill:r,opacity:"0.18"}),e.jsx("ellipse",{cx:t*.15,cy:o*.25,rx:t*.55,ry:o*.4,fill:r,opacity:"0.12"}),e.jsx("path",{d:`M ${t*.4},0 Q ${t*1.1},${o*.3} ${t*.6},${o}`,fill:"none",stroke:r,strokeWidth:t*.025,opacity:"0.4",strokeLinecap:"round"}),e.jsx("circle",{cx:t*.78,cy:o*.22,r:t*.08,fill:r,opacity:"0.25"}),e.jsx("circle",{cx:t*.6,cy:o*.55,r:t*.04,fill:r,opacity:"0.5"})]})}function gd({accent:r,width:t,height:o}){return e.jsxs("svg",{viewBox:`0 0 ${t} ${o}`,width:t,height:o,xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid slice",children:[e.jsx("rect",{width:t,height:o,fill:"#000626"}),e.jsx("rect",{x:0,y:o*.6,width:t,height:o*.4,fill:"#01082f"}),e.jsx("circle",{cx:t*.55,cy:o*.38,r:t*.14,fill:r,opacity:"0.9"}),e.jsx("rect",{x:t*.4,y:o*.61,width:t*.3,height:o*.12,fill:r,opacity:"0.15"}),e.jsx("line",{x1:t*.3,y1:o*.6,x2:t*.32,y2:o*.3,stroke:"#fff",strokeWidth:1.5,opacity:"0.4"}),e.jsx("line",{x1:t*.7,y1:o*.6,x2:t*.68,y2:o*.2,stroke:"#fff",strokeWidth:1.5,opacity:"0.4"}),[.65,.72,.8,.9].map((a,n)=>e.jsx("line",{x1:0,y1:o*a,x2:t,y2:o*a,stroke:"#fff",strokeWidth:.5,opacity:.06},n))]})}function md({accent:r,width:t,height:o}){return e.jsxs("svg",{viewBox:`0 0 ${t} ${o}`,width:t,height:o,xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid slice",children:[e.jsx("rect",{width:t,height:o,fill:"#01240e"}),e.jsx("path",{d:`M ${t*.5},${o*.1} C ${t*1.2},${o*.1} ${t*1},${o*.9} ${t*.5},${o*.95} C ${t*0},${o*.9} ${t*-.2},${o*.1} ${t*.5},${o*.1}Z`,fill:"#71d481",opacity:"0.18"}),e.jsx("path",{d:`M ${t*.8},${o*-.05} C ${t*1.5},${o*.3} ${t*.9},${o*.8} ${t*.4},${o*.9} C ${t*0},${o*.6} ${t*.2},${o*-.1} ${t*.8},${o*-.05}Z`,fill:"#71d481",opacity:"0.14"}),e.jsx("circle",{cx:t*.5,cy:o*.5,r:t*.03,fill:r,opacity:"0.7"}),e.jsx("line",{x1:t*.5,y1:o*.1,x2:t*.5,y2:o*.95,stroke:"#71d481",strokeWidth:1.5,opacity:"0.3"})]})}function hd({accent:r,width:t,height:o}){return e.jsxs("svg",{viewBox:`0 0 ${t} ${o}`,width:t,height:o,xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid slice",children:[e.jsx("rect",{width:t,height:o,fill:"#000626"}),e.jsx("polygon",{points:`${t*0},${o*1} ${t*1},${o*0} ${t*1},${o*1}`,fill:r,opacity:"0.15"}),e.jsx("polygon",{points:`${t*.2},${o*0} ${t*.6},${o*0} ${t*0},${o*.7} ${t*0},${o*.3}`,fill:"#fff",opacity:"0.04"}),e.jsx("polygon",{points:`${t*.5},${o*0} ${t*1},${o*.4} ${t*.5},${o*.5}`,fill:r,opacity:"0.25"}),[.3,.5,.7,.9].map(a=>[.2,.5,.8].map(n=>e.jsx("circle",{cx:t*n,cy:o*a,r:2,fill:"#fff",opacity:"0.12"},`${n}-${a}`)))]})}function bd({style:r,accent:t,width:o,height:a}){switch(r){case"marina":return e.jsx(gd,{accent:t,width:o,height:a});case"leaves":return e.jsx(md,{accent:t,width:o,height:a});case"abstract":return e.jsx(hd,{accent:t,width:o,height:a});default:return e.jsx(ud,{accent:t,width:o,height:a})}}function vd({config:r,renderMode:t="pdf",width:o=794,height:a=1122}){const{entityName:n,reportTitle:s="Monthly Management Report",period:l,preparedBy:c,logoUrl:d,heroStyle:x="curves",accentColor:p="#e15713",publishedDate:f}=r,u=t==="pdf",g=Math.round(o*.52),m=o-g,h=6;return e.jsxs("div",{style:{width:o,height:a,display:"flex",flexDirection:"row",overflow:"hidden",fontFamily:"'Geist', system-ui, sans-serif",backgroundColor:"#fff",position:"relative"},children:[e.jsxs("div",{style:{width:g,height:a,display:"flex",flexDirection:"column",padding:u?"44px 36px 44px 44px":"56px 48px 56px 56px",boxSizing:"border-box",position:"relative",zIndex:1,backgroundColor:"#fff"},children:[e.jsx("div",{style:{marginBottom:"auto"},children:d?e.jsx("img",{src:d,alt:n,style:{maxHeight:u?36:44,maxWidth:g*.55,objectFit:"contain"}}):e.jsx("div",{style:{fontSize:u?14:16,fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",color:"#000626"},children:n})}),e.jsxs("div",{style:{marginTop:"auto",marginBottom:"auto"},children:[e.jsx("div",{style:{width:36,height:4,borderRadius:2,backgroundColor:p,marginBottom:u?18:24}}),e.jsx("h1",{style:{margin:"0 0 10px 0",fontSize:u?26:32,fontWeight:500,color:"#000626",lineHeight:1.15},children:n}),e.jsx("div",{style:{fontSize:u?14:17,fontWeight:400,color:"#595f7a",marginBottom:u?6:8},children:s}),e.jsx("div",{style:{fontSize:u?13:15,fontWeight:400,color:"#8c92af"},children:l})]}),e.jsxs("div",{style:{marginTop:"auto",paddingTop:24},children:[c&&e.jsx("div",{style:{fontSize:u?8:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.10em",color:"#8c92af",marginBottom:4},children:"Prepared by"}),c&&e.jsx("div",{style:{fontSize:u?10:12,color:"#595f7a"},children:c}),f&&e.jsx("div",{style:{fontSize:u?9:10,color:"#c8cce0",marginTop:4},children:f})]})]}),e.jsx("div",{style:{width:h,height:a,backgroundColor:p,flexShrink:0}}),e.jsx("div",{style:{flex:1,height:a,overflow:"hidden",position:"relative"},children:e.jsx(bd,{style:x,accent:p,width:m-h,height:a})})]})}const yd={Critical:"#000626",High:"#e15713",Medium:"#8c92af",Low:"#c8cce0"},ht={up:"#71d481",down:"#fb6060",flat:"#8c92af"},jd={up:"▲",down:"▼",flat:"—"};function wd({met:r}){return r==null?null:e.jsx("span",{style:{color:r?"#71d481":"#fb6060",fontWeight:700,fontSize:12},children:r?"✓":"×"})}function Cd({rows:r,renderMode:t="web"}){const o=t==="pdf",a=o?9:11,n=o?8:10,s=r.reduce((x,p)=>{const f=`${p.categoryLetter}:${p.category}`;return x.has(f)||x.set(f,[]),x.get(f).push(p),x},new Map),l=r.some(x=>x.target!==null&&x.target!==void 0),c=r.filter(x=>x.lowerIsBetter&&x.footnoteMarker),d=o?"5px 8px":"7px 10px";return e.jsxs("div",{style:{fontFamily:"'Geist', system-ui, sans-serif",breakInside:"avoid",pageBreakInside:"avoid"},children:[e.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",tableLayout:"fixed"},children:[e.jsxs("colgroup",{children:[e.jsx("col",{style:{width:"28%"}}),e.jsx("col",{style:{width:"14%"}}),l&&e.jsx("col",{style:{width:"12%"}}),l&&e.jsx("col",{style:{width:"6%"}}),e.jsx("col",{style:{width:l?"24%":"36%"}}),e.jsx("col",{style:{width:"16%"}})]}),e.jsx("thead",{children:e.jsx("tr",{style:{borderBottom:"2px solid #e5e7f0"},children:["METRIC","RESULT",...l?["TARGET",""]:[],"TREND","IMPORTANCE"].map(x=>e.jsx("th",{style:{padding:d,fontSize:n,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"#8c92af",textAlign:x==="RESULT"||x==="TARGET"?"right":"left",paddingBottom:8},children:x},x))})}),e.jsx("tbody",{children:[...s.entries()].map(([x,p])=>{const f=p[0];return e.jsxs(j.Fragment,{children:[e.jsx("tr",{style:{breakInside:"avoid",pageBreakInside:"avoid",borderTop:"1px solid #e5e7f0"},children:e.jsx("td",{colSpan:l?6:4,style:{padding:`${o?6:8}px ${o?8:10}px`,paddingTop:o?10:14},children:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:o?16:20,height:o?16:20,borderRadius:4,backgroundColor:f.categoryColor,color:"#fff",fontSize:o?9:11,fontWeight:700,flexShrink:0,fontFamily:"'Geist Mono', monospace"},children:f.categoryLetter}),e.jsx("span",{style:{fontSize:o?9:11,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"#000626"},children:f.category})]})})}),p.map((u,g)=>e.jsxs("tr",{style:{backgroundColor:g%2===0?"transparent":"rgba(229,231,240,0.2)",breakInside:"avoid",pageBreakInside:"avoid"},children:[e.jsxs("td",{style:{padding:d,fontSize:a,color:"#000626"},children:[u.label,u.footnoteMarker&&e.jsx("sup",{style:{color:"#8c92af",fontSize:a-2},children:u.footnoteMarker})]}),e.jsx("td",{style:{padding:d,fontSize:a,fontFamily:"'Geist Mono', monospace",fontWeight:600,color:"#000626",textAlign:"right"},children:u.result}),l&&e.jsx("td",{style:{padding:d,fontSize:a,fontFamily:"'Geist Mono', monospace",color:"#8c92af",textAlign:"right"},children:u.target??"—"}),l&&e.jsx("td",{style:{padding:d,textAlign:"center"},children:e.jsx(wd,{met:u.targetMet})}),e.jsxs("td",{style:{padding:d,fontSize:a},children:[e.jsxs("span",{style:{color:ht[u.trendDirection],fontWeight:600},children:[jd[u.trendDirection]," "]}),e.jsx("span",{style:{fontFamily:"'Geist Mono', monospace",color:ht[u.trendDirection],fontWeight:600},children:u.trendValue}),e.jsx("span",{style:{color:"#8c92af",marginLeft:4,fontSize:o?8:9},children:u.trendPeriod})]}),e.jsx("td",{style:{padding:d},children:e.jsx("span",{style:{fontSize:o?8:10,fontWeight:600,color:yd[u.importance]??"#8c92af",textTransform:"uppercase",letterSpacing:"0.06em"},children:u.importance})})]},u.label))]},x)})})]}),c.length>0&&e.jsx("div",{style:{marginTop:12,paddingTop:8,borderTop:"1px solid #e5e7f0",fontSize:o?8:9,color:"#8c92af"},children:c.map(x=>e.jsxs("div",{children:[e.jsx("sup",{children:x.footnoteMarker})," ",x.label,": lower values indicate better performance"]},x.label))})]})}function Sd({size:r}){return e.jsx("svg",{width:r,height:r,viewBox:"0 0 18 18",fill:"none",children:e.jsx("path",{d:"M5 9.5V16H3a1 1 0 01-1-1v-4.5a1 1 0 011-1h2zM6 9.5l2.5-7a1.5 1.5 0 013 0v4.5h3.5a1.5 1.5 0 011.5 1.5l-.9 4.5a1.5 1.5 0 01-1.5 1.5H6V9.5z",fill:"#71d481"})})}function kd({size:r}){return e.jsx("svg",{width:r,height:r,viewBox:"0 0 18 18",fill:"none",children:e.jsx("path",{d:"M13 8.5V2H15a1 1 0 011 1v4.5a1 1 0 01-1 1h-2zM12 8.5l-2.5 7a1.5 1.5 0 01-3 0v-4.5H3a1.5 1.5 0 01-1.5-1.5l.9-4.5A1.5 1.5 0 013.9 3.5H12V8.5z",fill:"#fb6060"})})}function Nd({size:r}){return e.jsx("svg",{width:r,height:r,viewBox:"0 0 18 18",fill:"none",children:e.jsx("rect",{x:"3",y:"8",width:"12",height:"2",rx:"1",fill:"#8c92af"})})}function zd({status:r,size:t}){return r==="positive"?e.jsx(Sd,{size:t}):r==="negative"?e.jsx(kd,{size:t}):e.jsx(Nd,{size:t})}function Yo({observations:r,renderMode:t="web"}){const o=t==="pdf",a=o?14:18;return e.jsx("div",{style:{fontFamily:"'Geist', system-ui, sans-serif"},children:r.map((n,s)=>e.jsxs("div",{style:{display:"flex",gap:o?12:16,alignItems:"flex-start",paddingTop:o?10:14,paddingBottom:o?10:14,borderBottom:s<r.length-1?"1px solid #e5e7f0":"none",breakInside:"avoid",pageBreakInside:"avoid"},children:[e.jsx("div",{style:{flexShrink:0,paddingTop:2},children:e.jsx(zd,{status:n.status,size:a})}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontSize:9,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.10em",color:"#8c92af",marginBottom:3},children:n.category}),e.jsxs("div",{style:{marginBottom:o?3:4},children:[e.jsx("span",{style:{fontSize:o?11:13,fontWeight:700,color:"#000626"},children:n.headline}),n.context&&e.jsx("span",{style:{fontSize:o?11:13,fontWeight:400,color:"#8c92af",marginLeft:6},children:n.context})]}),e.jsx("p",{style:{margin:0,fontSize:o?10:12,fontWeight:400,color:"#595f7a",lineHeight:1.6},children:n.narrative})]})]},n.category))})}function Td({commentary:r,actions:t,observations:o,renderMode:a="web"}){const n=a==="pdf";return e.jsxs("div",{style:{fontFamily:"'Geist', system-ui, sans-serif"},children:[e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"60% 40%",gap:n?24:32,marginBottom:n?24:32,alignItems:"start"},children:[e.jsx("div",{children:r.map((s,l)=>e.jsxs("div",{style:{marginBottom:n?12:16},children:[s.heading&&e.jsx("div",{style:{fontSize:n?10:12,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"#000626",marginBottom:n?4:6},children:s.heading}),e.jsx("p",{style:{margin:0,fontSize:n?10:13,lineHeight:1.65,color:"#000626"},children:s.body})]},l))}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:n?9:11,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"#8c92af",marginBottom:n?8:12},children:"Key Actions"}),e.jsx("ul",{style:{margin:0,padding:0,listStyle:"none"},children:t.map((s,l)=>e.jsxs("li",{style:{display:"flex",gap:10,alignItems:"flex-start",marginBottom:n?7:10,fontSize:n?10:13,lineHeight:1.8,color:"#000626"},children:[e.jsx("span",{style:{color:"#e15713",fontWeight:700,fontSize:14,lineHeight:1.6,flexShrink:0},children:"•"}),e.jsx("span",{children:s})]},l))})]})]}),o.length>0&&e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:n?9:11,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"#000626",borderBottom:"2px solid #e5e7f0",paddingBottom:n?6:8,marginBottom:0},children:"KPI Observations"}),e.jsx(Yo,{observations:o,renderMode:a})]})]})}const jr="'Geist Mono', ui-monospace, monospace",bt="#71d481",vt="#fb6060",Le="#8c92af",$d="#595f7a",Ld="#000626",Ko="#e5e7f0";function Md({data:r,color:t,width:o=80,height:a=22}){if(r.length<2)return null;const n=Math.min(...r),l=Math.max(...r)-n||1,c=2,d=r.map((p,f)=>({x:c+f/(r.length-1)*(o-c*2),y:c+(1-(p-n)/l)*(a-c*2)}));let x=`M ${d[0].x},${d[0].y}`;for(let p=1;p<d.length;p++){const f=d[p-1],u=d[p],g=(f.x+u.x)/2;x+=` C ${g},${f.y} ${g},${u.y} ${u.x},${u.y}`}return e.jsx("svg",{width:o,height:a,viewBox:`0 0 ${o} ${a}`,style:{display:"block",overflow:"visible"},children:e.jsx("path",{d:x,fill:"none",stroke:t,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function Zo({label:r,value:t,comparison:o,comparisonLabel:a,trend:n,target:s,description:l,sparklineData:c,renderMode:d="web",_last:x=!1}){const p=d==="pdf",f=p?"10px 12px":"16px 20px",u=p?22:28,g=p?8:9,m=n==null?Le:n.favorable!=null?n.favorable?bt:vt:n.direction==="up"?bt:n.direction==="down"?vt:Le,h=n==null?"":n.direction==="up"?"▲ ":n.direction==="down"?"▼ ":"";return e.jsxs("div",{style:{padding:f,background:"#ffffff",borderRight:x?void 0:`1px solid ${Ko}`,display:"flex",flexDirection:"column",gap:p?4:6},children:[e.jsx("div",{style:{fontSize:g,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.1em",color:Le},children:r}),e.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:12,justifyContent:"space-between"},children:[e.jsx("div",{style:{fontSize:u,fontWeight:300,fontFamily:jr,color:Ld,lineHeight:1,letterSpacing:"-0.01em"},children:t}),c&&c.length>=2&&e.jsx("div",{style:{marginBottom:2},children:e.jsx(Md,{data:c,color:m,width:80,height:22})})]}),n&&e.jsxs("div",{style:{fontSize:11,fontWeight:500,color:m,lineHeight:1.2},children:[h,n.value]}),o&&e.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:6},children:[e.jsx("span",{style:{fontSize:13,fontFamily:jr,color:Le},children:o}),a&&e.jsx("span",{style:{fontSize:10,color:Le},children:a})]}),s&&e.jsxs("div",{style:{fontSize:11,color:Le,display:"flex",gap:4},children:[e.jsx("span",{style:{fontWeight:600},children:"Target"}),e.jsx("span",{style:{fontFamily:jr},children:s})]}),l&&e.jsx("div",{style:{fontSize:11,color:$d,lineHeight:1.5,marginTop:2},children:l})]})}function Ad({cards:r,renderMode:t="web"}){return r.length===0?null:e.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${r.length}, 1fr)`,border:`1px solid ${Ko}`,borderRadius:8,overflow:"hidden"},children:r.map((o,a)=>e.jsx(Zo,{...o,renderMode:t,_last:a===r.length-1},a))})}const Rd="'Geist Mono', ui-monospace, monospace",Fd="#71d481",Bd="#fb6060",Id="#f5f6fa",Dd="#e5e7f0",sr="#8c92af",Wd="#000626",yt={Critical:0,High:1,Medium:2,Low:3};function jt(r,t,o,a,n,s){if(a<=o+.5)return"";const l=s-n>Math.PI?1:0,c=Math.cos(n),d=Math.sin(n),x=Math.cos(s),p=Math.sin(s),f=u=>u.toFixed(2);return[`M ${f(r+o*c)},${f(t+o*d)}`,`A ${o},${o} 0 ${l} 1 ${f(r+o*x)},${f(t+o*p)}`,`L ${f(r+a*x)},${f(t+a*p)}`,`A ${a},${a} 0 ${l} 0 ${f(r+a*c)},${f(t+a*d)}`,"Z"].join(" ")}function Pd({items:r,period:t,onTrackCount:o,offTrackCount:a,renderMode:n="web",width:s=500}){const l=n==="pdf",c=r.length;if(c===0)return null;const d=[...r].sort((F,S)=>{const N=(yt[F.importance]??3)-(yt[S.importance]??3);return N!==0?N:F.label.localeCompare(S.label)}),x=o+a,p=x>0?Math.round(o/x*100):0,f=560,u=560,g=280,m=280,h=188,v=42,w=h+24,z=2*Math.PI/c/2-.015,C=Math.round(u*(s/f));function T(F){return F/c*2*Math.PI-Math.PI/2}function I(F){return F.targetMet===!0?Fd:F.targetMet===!1?Bd:sr}function L(F){return F.targetMet===!0?"rgba(113,212,129,0.10)":F.targetMet===!1?"rgba(251,96,96,0.08)":Id}return e.jsxs("svg",{width:s,height:C,viewBox:`0 0 ${f} ${u}`,style:{display:"block",overflow:"visible"},children:[d.map((F,S)=>{const N=T(S),B=N-z,E=N+z,V=v+Math.max(2,Math.min(F.score/100,1)*(h-v)),H=g+w*Math.cos(N),W=m+w*Math.sin(N),O=N*180/Math.PI+90,M=O>90&&O<270?O+180:O,D=F.label.length>22?`${F.label.slice(0,20)}…`:F.label;return e.jsxs("g",{children:[e.jsx("path",{d:jt(g,m,v,h,B,E),fill:L(F)}),e.jsx("path",{d:jt(g,m,v,V,B,E),fill:I(F),opacity:F.targetMet===null?.5:.88}),e.jsx("text",{x:0,y:0,textAnchor:"middle",dominantBaseline:"middle",fontSize:l?7:8.5,fill:sr,transform:`translate(${H.toFixed(1)},${W.toFixed(1)}) rotate(${M.toFixed(1)})`,children:D})]},S)}),e.jsx("circle",{cx:g,cy:m,r:v-1,fill:"white"}),e.jsx("circle",{cx:g,cy:m,r:h,fill:"none",stroke:Dd,strokeWidth:.75}),e.jsxs("text",{x:g,y:m-5,textAnchor:"middle",dominantBaseline:"auto",fontSize:20,fontWeight:300,fontFamily:Rd,fill:Wd,children:[p,"%"]}),e.jsx("text",{x:g,y:m+7,textAnchor:"middle",dominantBaseline:"hanging",fontSize:7,letterSpacing:"0.07em",fill:sr,children:"ON TRACK"}),e.jsxs("text",{x:g,y:u-8,textAnchor:"middle",dominantBaseline:"auto",fontSize:9,fill:sr,children:[`${o} on track · ${a} off track`,r.length>x?` · ${r.length-x} no target`:"",t?` · ${t}`:""]})]})}const Xe="'Geist Mono', ui-monospace, monospace",Br="#71d481",Ir="#fb6060",oe="#000626",Xo="#f5f6fa",Nr="#e5e7f0",be="#8c92af",Ed="#D6F4FF",qo="#00bcd4",Vd="rgba(0,188,212,0.06)",wt="rgba(0,188,212,0.15)";function ce(r,t){const o=Math.abs(r),a=r<0?"-":"",n=o.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0});return`${a}${t}${n}`}function Dr(r){return`${r>0?"+":""}${r.toFixed(1)}%`}function Wr(r,t){return`${r>0?"+":""}${ce(r,t)}`}function Hd({rows:r,period:t,showForecast:o=!1,currency:a="$",renderMode:n="web"}){const s=n==="pdf",l=n==="excel",c=s||l,d=c?"5px 8px":"9px 14px",x=c?"0 8px":"0 14px",p=c?24:34,f=c?11:13,u=c?8:9;return e.jsx("div",{style:{border:`1px solid ${Nr}`,borderRadius:l?0:8,overflow:"hidden"},children:e.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},children:[e.jsx("thead",{children:e.jsxs("tr",{style:{height:p,background:oe},children:[e.jsx("th",{style:{padding:x,paddingLeft:c?12:20,textAlign:"left",fontSize:u,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"#ffffff",whiteSpace:"nowrap"},children:t?`Item · ${t}`:"Item"}),e.jsx("th",{style:He(u,x),children:"Budget"}),e.jsx("th",{style:He(u,x),children:"Actual"}),o&&e.jsx("th",{style:He(u,x),children:"Forecast"}),e.jsx("th",{style:He(u,x),children:"Variance $"}),e.jsx("th",{style:He(u,x),children:"Variance %"})]})}),e.jsx("tbody",{children:r.map((g,m)=>{if(g.isSectionHeader)return e.jsx("tr",{style:{background:Vd,borderTop:m>0?`1px solid ${wt}`:void 0,borderBottom:`1px solid ${wt}`,borderLeft:`3px solid ${qo}`},children:e.jsx("td",{colSpan:o?6:5,style:{padding:c?"4px 8px":"6px 14px",paddingLeft:c?12:20,fontSize:c?8:9,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:oe},children:g.label})},m);if(g.isGrandTotal)return e.jsx(Od,{row:g,currency:a,showForecast:o,compact:c,fontSize:f},m);if(g.isTotal)return e.jsx(_d,{row:g,currency:a,showForecast:o,compact:c,fontSize:f},m);const h=(g.indent??0)*(c?10:14),v=g.budget!=null,w=g.actual!=null,k=v&&w?g.actual-g.budget:null,$=v&&w&&g.budget!==0?(g.actual-g.budget)/Math.abs(g.budget)*100:null,z=k==null?null:g.isNegativeGood?k<0:k>0,C=z==null?be:z?Br:Ir;return e.jsxs("tr",{style:{background:"#ffffff",borderBottom:`1px solid ${Xo}`},children:[e.jsx("td",{style:{padding:d,paddingLeft:(c?12:20)+h,fontSize:f,color:oe,whiteSpace:c?"nowrap":void 0},children:g.label}),e.jsx("td",{style:ae(f,d,be),children:v?ce(g.budget,a):"—"}),e.jsx("td",{style:ae(f,d,oe),children:w?ce(g.actual,a):"—"}),o&&e.jsx("td",{style:ae(f,d,be),children:g.forecast!=null?ce(g.forecast,a):"—"}),e.jsx("td",{style:ae(f,d,C),children:k!=null?Wr(k,a):"—"}),e.jsx("td",{style:{padding:d,textAlign:"right"},children:$!=null?e.jsx("span",{style:{display:"inline-block",padding:"1px 5px",borderRadius:4,fontSize:c?10:11,fontWeight:600,fontFamily:Xe,color:C,background:z==null?"transparent":z?"rgba(113,212,129,0.10)":"rgba(251,96,96,0.09)"},children:Dr($)}):e.jsx("span",{style:{color:be,fontSize:f},children:"—"})})]},m)})})]})})}function He(r,t){return{padding:t,textAlign:"right",fontSize:r,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"#ffffff",fontFamily:Xe,whiteSpace:"nowrap"}}function ae(r,t,o){return{padding:t,textAlign:"right",fontSize:r,fontFamily:Xe,fontVariantNumeric:"tabular-nums",color:o,whiteSpace:"nowrap"}}function _d({row:r,currency:t,showForecast:o,compact:a,fontSize:n}){const s=r.budget!=null,l=r.actual!=null,c=s&&l?r.actual-r.budget:null,d=s&&l&&r.budget!==0?(r.actual-r.budget)/Math.abs(r.budget)*100:null,x=c==null?null:r.isNegativeGood?c<0:c>0,p=x==null?be:x?Br:Ir,f=a?"5px 8px":"8px 14px";return e.jsxs("tr",{style:{background:Xo,borderTop:`1px solid ${Nr}`,borderBottom:`1px solid ${Nr}`},children:[e.jsx("td",{style:{padding:f,paddingLeft:a?12:20,fontSize:a?9:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.04em",color:oe,whiteSpace:a?"nowrap":void 0},children:r.label}),e.jsx("td",{style:{...ae(n,f,oe),fontWeight:600},children:s?ce(r.budget,t):"—"}),e.jsx("td",{style:{...ae(n,f,oe),fontWeight:600},children:l?ce(r.actual,t):"—"}),o&&e.jsx("td",{style:{...ae(n,f,oe),fontWeight:600},children:r.forecast!=null?ce(r.forecast,t):"—"}),e.jsx("td",{style:{...ae(n,f,p),fontWeight:600},children:c!=null?Wr(c,t):"—"}),e.jsx("td",{style:{padding:f,textAlign:"right"},children:d!=null?e.jsx("span",{style:{display:"inline-block",padding:"1px 5px",borderRadius:4,fontSize:a?10:11,fontWeight:700,fontFamily:Xe,color:p,background:x==null?"transparent":x?"rgba(113,212,129,0.10)":"rgba(251,96,96,0.09)"},children:Dr(d)}):e.jsx("span",{style:{color:be,fontSize:n},children:"—"})})]})}function Od({row:r,currency:t,showForecast:o,compact:a,fontSize:n}){const s=r.budget!=null,l=r.actual!=null,c=s&&l?r.actual-r.budget:null,d=s&&l&&r.budget!==0?(r.actual-r.budget)/Math.abs(r.budget)*100:null,x=c==null?null:r.isNegativeGood?c<0:c>0,p=x==null?be:x?Br:Ir,f=a?24:34,u=a?"0 8px":"0 14px";return e.jsxs("tr",{style:{background:Ed,borderTop:`2px solid ${qo}`,height:f},children:[e.jsx("td",{style:{padding:u,paddingLeft:a?12:20,fontSize:a?10:12,fontWeight:700,color:oe,whiteSpace:a?"nowrap":void 0},children:r.label}),e.jsx("td",{style:{...ae(n,u,oe),fontWeight:700},children:s?ce(r.budget,t):"—"}),e.jsx("td",{style:{...ae(n,u,oe),fontWeight:700},children:l?ce(r.actual,t):"—"}),o&&e.jsx("td",{style:{...ae(n,u,oe),fontWeight:700},children:r.forecast!=null?ce(r.forecast,t):"—"}),e.jsx("td",{style:{...ae(n,u,p),fontWeight:700},children:c!=null?Wr(c,t):"—"}),e.jsx("td",{style:{padding:u,textAlign:"right"},children:d!=null?e.jsx("span",{style:{display:"inline-block",padding:"1px 5px",borderRadius:4,fontSize:a?10:11,fontWeight:700,fontFamily:Xe,color:p,background:x==null?"transparent":x?"rgba(113,212,129,0.13)":"rgba(251,96,96,0.11)"},children:Dr(d)}):e.jsx("span",{style:{color:be,fontSize:n},children:"—"})})]})}const Gd=b("inline-flex items-center whitespace-nowrap",{variants:{variant:{square:"px-2 py-0.5 rounded text-[10px] font-bold uppercase tracking-wider",pill:"px-2.5 py-1 rounded-full text-[11px] font-semibold",entity:"px-2 py-0.5 rounded text-[11px] font-medium"}},defaultVariants:{variant:"pill"}}),Jo=j.forwardRef(({className:r,variant:t="pill",bg:o,color:a,style:n,children:s,...l},c)=>e.jsx("span",{ref:c,className:y(Gd({variant:t}),r),style:{background:o,color:a,...n},...l,children:s}));Jo.displayName="Badge";const Ud=b("bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-[var(--archie-radius-xl)]",{variants:{variant:{default:"[box-shadow:var(--archie-shadow-sm)]",elevated:"[box-shadow:var(--archie-shadow-md)]",stat:"[box-shadow:var(--archie-shadow-sm)]"},padding:{none:"",sm:"p-3",md:"p-4",lg:"p-6"}},defaultVariants:{variant:"default",padding:"md"}}),Qo=j.forwardRef(({className:r,variant:t="default",padding:o="md",children:a,...n},s)=>e.jsx("div",{ref:s,className:y(Ud({variant:t,padding:o}),r),...n,children:a}));Qo.displayName="Card";const ea=j.forwardRef(({className:r,label:t,hint:o,error:a,size:n="medium",disabled:s,...l},c)=>{const d=j.useId(),x=n==="small"?"h-8 text-xs px-2.5 pr-7":"h-10 text-[13px] px-3 pr-8";return e.jsxs("div",{className:"flex flex-col gap-1",children:[t&&e.jsx("label",{className:"text-[11px] font-semibold text-[var(--color-gray-800)]",children:t}),e.jsxs("div",{className:"relative",children:[e.jsx("select",{ref:c,className:y("w-full appearance-none rounded-[6px] border outline-none transition-colors duration-150","bg-[var(--color-white)] text-[var(--color-gray-1000)]",a?"border-[var(--color-red-1000)] bg-[var(--color-red-200)]":"border-[var(--color-gray-200)] focus:border-[var(--color-blue-800)] focus:ring-2 focus:ring-[rgba(21,177,205,0.12)]",s&&"bg-[var(--color-gray-50)] text-[var(--color-gray-600)] cursor-not-allowed",x,r),disabled:s,"aria-invalid":!!a,"aria-describedby":a?d:void 0,...l}),e.jsx("svg",{className:"pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 text-[var(--color-gray-600)]",width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"m6 9 6 6 6-6"})})]}),a&&e.jsx("span",{id:d,className:"text-[11px] text-[var(--color-red-1000)]",role:"alert",children:a}),!a&&o&&e.jsx("span",{className:"text-[11px] text-[var(--color-gray-600)]",children:o})]})});ea.displayName="Select";const ra=j.forwardRef(({className:r,label:t,hint:o,error:a,showToggle:n=!0,size:s="medium",disabled:l,...c},d)=>{const[x,p]=j.useState(!1),f=j.useId(),u=s==="small"?"h-8 text-xs":"h-10 text-[13px]";return e.jsxs("div",{className:"flex flex-col gap-1",children:[t&&e.jsx("label",{className:"text-[11px] font-semibold text-[var(--color-gray-800)]",children:t}),e.jsxs("div",{className:y("flex items-center rounded-[6px] border transition-colors duration-150",a?"border-[var(--color-red-1000)]":"border-[var(--color-gray-200)] focus-within:border-[var(--color-blue-800)] focus-within:ring-2 focus-within:ring-[rgba(21,177,205,0.12)]",l&&"bg-[var(--color-gray-50)] cursor-not-allowed",u),children:[e.jsx("input",{ref:d,type:x?"text":"password",className:y("flex-1 bg-transparent border-none outline-none px-3 text-[var(--color-gray-1000)]",u,r),disabled:l,"aria-invalid":!!a,"aria-describedby":a?f:void 0,...c}),n&&e.jsx("button",{type:"button",onClick:()=>p(!x),className:"shrink-0 px-2.5 text-[var(--color-gray-600)] bg-transparent border-none cursor-pointer hover:text-[var(--color-gray-800)] transition-colors","aria-label":x?"Hide password":"Show password",tabIndex:-1,children:x?e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94"}),e.jsx("path",{d:"M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19"}),e.jsx("line",{x1:"1",x2:"23",y1:"1",y2:"23"})]}):e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),e.jsx("circle",{cx:"12",cy:"12",r:"3"})]})})]}),a&&e.jsx("span",{id:f,className:"text-[11px] text-[var(--color-red-1000)]",role:"alert",children:a}),!a&&o&&e.jsx("span",{className:"text-[11px] text-[var(--color-gray-600)]",children:o})]})});ra.displayName="PasswordField";const ta=j.forwardRef(({className:r,label:t,hint:o,error:a,suffix:n,size:s="medium",disabled:l,style:c,...d},x)=>{const p=j.useId(),f=s==="small"?"h-8 text-xs px-2":"h-10 text-[13px] px-2.5";return e.jsxs("div",{className:"flex flex-col gap-1",children:[t&&e.jsx("label",{className:"text-[11px] font-semibold text-[var(--color-gray-800)]",children:t}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{ref:x,type:"number",className:y("rounded-[6px] border outline-none transition-colors duration-150 text-right","bg-[var(--color-white)] text-[var(--color-gray-1000)]",a?"border-[var(--color-red-1000)]":"border-[var(--color-gray-200)] focus:border-[var(--color-blue-800)] focus:ring-2 focus:ring-[rgba(21,177,205,0.12)]",l&&"bg-[var(--color-gray-50)] text-[var(--color-gray-600)] cursor-not-allowed",f,r),disabled:l,"aria-invalid":!!a,"aria-describedby":a?p:void 0,style:{width:100,...c},...d}),n&&e.jsx("span",{className:"text-[12px] text-[var(--color-gray-600)] shrink-0",children:n})]}),a&&e.jsx("span",{id:p,className:"text-[11px] text-[var(--color-red-1000)]",role:"alert",children:a}),!a&&o&&e.jsx("span",{className:"text-[11px] text-[var(--color-gray-600)]",children:o})]})});ta.displayName="NumberInput";const Yd=b("flex gap-3 p-3 rounded-[var(--archie-radius-lg)] border",{variants:{variant:{success:"bg-[var(--color-green-200)] border-[rgba(113,212,129,0.25)]",error:"bg-[var(--color-red-200)] border-[rgba(251,96,96,0.19)]",warning:"bg-[#fef3c7] border-[rgba(251,191,36,0.25)]",info:"bg-[rgba(21,177,205,0.07)] border-[rgba(21,177,205,0.19)]"}},defaultVariants:{variant:"info"}}),Ct=b("text-[13px] font-semibold mb-0.5",{variants:{variant:{success:"text-[var(--color-green-1000)]",error:"text-[var(--color-red-1000)]",warning:"text-[#92400e]",info:"text-[var(--color-blue-800)]"}}}),Kd=b("text-[12px] leading-[1.4]",{variants:{variant:{success:"text-[rgba(26,122,58,0.8)]",error:"text-[rgba(251,96,96,0.8)]",warning:"text-[rgba(146,64,14,0.8)]",info:"text-[rgba(21,177,205,0.8)]"}}}),Zd={success:e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),e.jsx("path",{d:"m9 11 3 3L22 4"})]}),error:e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),e.jsx("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})]}),warning:e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}),e.jsx("path",{d:"M12 9v4"}),e.jsx("path",{d:"M12 17h.01"})]}),info:e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"M12 16v-4"}),e.jsx("path",{d:"M12 8h.01"})]})},oa=j.forwardRef(({className:r,variant:t="info",title:o,body:a,icon:n,dismissible:s,onDismiss:l,...c},d)=>{const x=n??Zd[t];return e.jsxs("div",{ref:d,className:y(Yd({variant:t}),r),role:"alert",...c,children:[e.jsx("span",{className:y(Ct({variant:t}),"shrink-0 mt-0.5"),children:x}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:Ct({variant:t}),children:o}),a&&e.jsx("div",{className:Kd({variant:t}),children:a})]}),s&&l&&e.jsx("button",{onClick:l,className:"shrink-0 p-1 bg-transparent border-none cursor-pointer opacity-60 hover:opacity-100 transition-opacity","aria-label":"Dismiss",children:e.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M18 6 6 18"}),e.jsx("path",{d:"m6 6 12 12"})]})})]})});oa.displayName="Banner";const aa=j.forwardRef(({className:r,label:t,description:o,children:a,...n},s)=>e.jsxs("div",{ref:s,className:y("flex gap-4 py-[11px] px-4 items-center border-b border-[var(--color-gray-100)]",r),...n,children:[e.jsxs("div",{className:"flex-[0_0_160px]",children:[e.jsx("span",{className:"text-[13px] font-medium text-[var(--color-gray-1000)]",children:t}),o&&e.jsx("span",{className:"text-[11px] text-[var(--color-gray-600)] ml-1",children:o})]}),e.jsx("div",{className:"flex-1",children:a})]}));aa.displayName="FieldRow";const na=j.forwardRef(({className:r,sections:t,activeId:o,onSelect:a,...n},s)=>e.jsx("div",{ref:s,className:y("w-[180px] border border-[var(--color-gray-200)] rounded-[var(--archie-radius-xl)] overflow-hidden bg-[var(--color-white)]",r),...n,children:e.jsx("div",{className:"py-2",children:t.map(({category:l,items:c})=>e.jsxs("div",{children:[e.jsx("div",{className:"px-3 py-1.5 text-[9px] font-bold uppercase tracking-[0.1em] text-[var(--color-gray-600)]",children:l}),c.map(({id:d,label:x,icon:p})=>e.jsxs("button",{onClick:()=>a(d),className:y("w-full px-3 py-1.5 flex items-center gap-2 text-left text-[12px] border-l-2 cursor-pointer transition-colors duration-150 bg-transparent border-t-0 border-r-0 border-b-0",o===d?"bg-[rgba(21,177,205,0.07)] border-l-[var(--color-blue-800)] text-[var(--color-blue-800)] font-semibold":"border-l-transparent text-[var(--color-gray-800)] font-normal hover:bg-[var(--color-gray-50)]"),children:[p&&e.jsx("span",{className:"shrink-0 flex items-center",children:p}),x]},d))]},l))})}));na.displayName="SettingsNav";const sa=j.forwardRef(({className:r,title:t,description:o,children:a,onSave:n,dirty:s,saveLabel:l="Save changes",...c},d)=>e.jsxs("div",{ref:d,className:y("bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-[var(--archie-radius-xl)] overflow-hidden",r),...c,children:[e.jsxs("div",{className:"px-5 py-4 border-b border-[var(--color-gray-100)]",children:[e.jsx("div",{className:"text-[13px] font-bold text-[var(--color-gray-1000)]",children:t}),o&&e.jsx("div",{className:"text-[12px] text-[var(--color-gray-600)] mt-0.5",children:o})]}),e.jsx("div",{className:"px-5",children:a}),n&&e.jsxs("div",{className:"px-5 py-3 border-t border-[var(--color-gray-100)] flex items-center gap-2.5",children:[e.jsx("button",{onClick:n,disabled:!s,className:y("px-3.5 py-1.5 rounded-[6px] text-[13px] font-semibold border-none cursor-pointer transition-all duration-150",s?"bg-[var(--color-blue-1000)] text-[var(--color-white)] hover:opacity-90":"bg-[var(--color-gray-100)] text-[var(--color-gray-600)] cursor-default"),children:l}),s&&e.jsx("span",{className:"text-[12px] text-[var(--color-gray-600)]",children:"Unsaved changes"})]})]}));sa.displayName="SettingsSectionCard";const St="Geist Mono, ui-monospace, monospace";function Xd({items:r,columns:t=4}){const o=t===2?"grid-cols-2":t===3?"grid-cols-3":"grid-cols-4";return e.jsx("div",{className:`grid ${o} gap-3`,children:r.map((a,n)=>e.jsxs("div",{className:"bg-[var(--color-bg-primary)] border border-[var(--color-border-default)] rounded-xl p-[18px_20px] flex flex-col gap-1.5",children:[e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.08em] text-[var(--color-text-tertiary)]",children:a.label}),e.jsx("div",{className:"text-[22px] font-light text-[var(--color-text-primary)] leading-none",style:{fontFamily:St,fontVariantNumeric:"tabular-nums",letterSpacing:"-0.02em"},children:a.value}),a.delta&&e.jsx("div",{className:"text-[11px] font-semibold",style:{fontFamily:St,color:a.deltaDir==="up"?"var(--dl-data-positive)":a.deltaDir==="down"?"var(--dl-data-negative)":a.deltaDir==="warning"?"var(--dl-data-warning)":"var(--dl-data-neutral)"},children:a.delta})]},n))})}const kt="Geist Mono, ui-monospace, monospace",qd={up:"var(--dl-data-positive)",down:"var(--dl-data-negative)",flat:"var(--dl-data-neutral)",warning:"var(--dl-data-warning)"};function Jd({label:r,value:t,delta:o,deltaDir:a}){return e.jsxs("div",{style:{background:"var(--color-bg-primary)",border:"1px solid var(--color-border-default)",borderRadius:12,padding:"18px 20px",display:"flex",flexDirection:"column",gap:6},children:[e.jsx("div",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-text-tertiary)"},children:r}),e.jsx("div",{style:{fontSize:28,fontWeight:300,color:"var(--color-text-primary)",lineHeight:1,fontFamily:kt,fontVariantNumeric:"tabular-nums",letterSpacing:"-0.02em"},children:t}),o&&e.jsx("div",{style:{fontSize:12,fontWeight:600,fontFamily:kt,color:qd[a??"flat"]??"var(--dl-data-neutral)"},children:o})]})}const Qd="Geist Mono, ui-monospace, monospace",e0={up:"var(--dl-data-positive)",down:"var(--dl-data-negative)",flat:"var(--dl-data-neutral)"};function r0({label:r,value:t,trend:o,delta:a}){return e.jsxs("div",{style:{background:"var(--color-bg-primary)",border:"1px solid var(--color-border-default)",borderRadius:10,padding:"14px 16px",display:"flex",flexDirection:"column",gap:4},children:[e.jsx("div",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-text-tertiary)"},children:r}),e.jsx("div",{style:{fontSize:22,fontWeight:400,color:"var(--color-text-primary)",lineHeight:1,fontFamily:Qd,fontVariantNumeric:"tabular-nums"},children:t}),a&&e.jsx("div",{style:{fontSize:11,color:o?e0[o]??"var(--dl-data-neutral)":"var(--color-text-tertiary)"},children:a})]})}const cr="Geist Mono, ui-monospace, monospace";function t0({row:r,columns:t}){const o=r.variant==="grand-total",a=o?"#022e40":"var(--color-bg-secondary, #f9fafb)",n=o?"#ffffff":"var(--color-text-primary, #000626)",s=o?"rgba(255,255,255,0.65)":"var(--color-text-secondary, #595f7a)";return e.jsx("tr",{style:{background:a,borderTop:o?"none":"1px solid var(--color-border-default, #e5e7eb)"},children:t.map((l,c)=>{const d=c===0,x=d?r.label:r.values[l.key]??"—",p=d||c===1?n:s;return e.jsx("td",{style:{padding:"10px 16px",textAlign:l.align==="right"?"right":"left",fontSize:o?14:13,fontWeight:o?700:600,color:p,fontFamily:l.mono||!d?cr:void 0,fontVariantNumeric:"tabular-nums"},children:x},l.key)})})}function o0({columns:r,groups:t,rows:o,totals:a}){return e.jsx("div",{className:"border border-[var(--color-border-default,#e5e7eb)] rounded-lg overflow-hidden",children:e.jsxs("table",{className:"w-full",style:{borderCollapse:"collapse"},children:[e.jsx("thead",{children:e.jsx("tr",{children:r.map(n=>e.jsx("th",{style:{padding:"9px 16px",textAlign:n.align==="right"?"right":n.align==="center"?"center":"left",fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-text-tertiary, #8c92af)",background:"var(--color-bg-secondary, #f9fafb)",borderBottom:"1px solid var(--color-border-default, #e5e7eb)"},children:n.label},n.key))})}),e.jsxs("tbody",{children:[o==null?void 0:o.map((n,s)=>e.jsx("tr",{style:{background:"var(--color-bg-primary, #fff)",borderBottom:"1px solid var(--color-border-light, #f3f4f6)"},children:r.map((l,c)=>e.jsx("td",{style:{padding:"10px 16px",textAlign:l.align==="right"?"right":"left",fontSize:13,color:c===0?"var(--color-text-primary, #000626)":"var(--color-text-secondary, #595f7a)",fontFamily:l.mono?cr:void 0,fontVariantNumeric:l.mono?"tabular-nums":void 0},children:String(n[l.key]??"—")},l.key))},s)),t==null?void 0:t.map((n,s)=>e.jsxs(j.Fragment,{children:[e.jsx("tr",{style:{background:"var(--color-bg-secondary, #f9fafb)",borderTop:s>0?"1px solid var(--color-border-default, #e5e7eb)":void 0,borderBottom:"1px solid var(--color-border-default, #e5e7eb)"},children:e.jsxs("td",{colSpan:r.length,style:{padding:"7px 16px",fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-text-tertiary, #8c92af)"},children:[n.label,n.count!=null&&e.jsx("span",{style:{marginLeft:8,padding:"1px 6px",borderRadius:9999,fontSize:10,fontWeight:600,background:"var(--color-gray-200, #e5e7eb)",color:"var(--color-text-tertiary, #8c92af)"},children:n.count})]})}),n.rows.map((l,c)=>e.jsx("tr",{style:{background:"var(--color-bg-primary, #fff)",borderBottom:c<n.rows.length-1?"1px solid var(--color-border-light, #f3f4f6)":void 0},children:r.map((d,x)=>e.jsx("td",{style:{padding:"10px 16px",paddingLeft:x===0?24:16,textAlign:d.align==="right"?"right":"left",fontSize:13,color:x===0?"var(--color-text-secondary, #595f7a)":"var(--color-text-primary, #000626)",fontFamily:d.mono?cr:void 0,fontVariantNumeric:d.mono?"tabular-nums":void 0},children:String(l[d.key]??"—")},d.key))},c)),n.subtotal&&e.jsx("tr",{style:{background:"var(--color-bg-secondary, #f9fafb)",borderTop:"1px solid var(--color-border-default, #e5e7eb)",borderBottom:"1px solid var(--color-border-default, #e5e7eb)"},children:r.map((l,c)=>e.jsx("td",{style:{padding:"9px 16px",textAlign:l.align==="right"?"right":"left",fontSize:c===0?11:13,fontWeight:600,textTransform:c===0?"uppercase":void 0,letterSpacing:c===0?"0.04em":void 0,color:c===0?"var(--color-text-tertiary, #8c92af)":"var(--color-text-primary, #000626)",fontFamily:l.mono?cr:void 0,fontVariantNumeric:l.mono?"tabular-nums":void 0},children:String(n.subtotal[l.key]??(c===0?"Subtotal":"—"))},l.key))})]},s)),a==null?void 0:a.map((n,s)=>e.jsx(t0,{row:n,columns:r},s))]})]})})}const a0="Geist Mono, ui-monospace, monospace";function n0({columns:r,rows:t}){return e.jsx("div",{className:"border border-[var(--color-border-default,#e5e7eb)] rounded-lg overflow-hidden",children:e.jsxs("table",{className:"w-full",style:{borderCollapse:"collapse"},children:[e.jsx("thead",{children:e.jsx("tr",{children:r.map(o=>e.jsx("th",{style:{padding:"9px 16px",textAlign:o.align==="right"?"right":o.align==="center"?"center":"left",fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-text-tertiary, #8c92af)",background:"var(--color-bg-secondary, #f9fafb)",borderBottom:"1px solid var(--color-border-default, #e5e7eb)"},children:o.label},o.key))})}),e.jsx("tbody",{children:t.map((o,a)=>e.jsx("tr",{style:{background:"var(--color-bg-primary, #fff)",borderBottom:a<t.length-1?"1px solid var(--color-border-light, #f3f4f6)":void 0},children:r.map((n,s)=>e.jsx("td",{style:{padding:"10px 16px",textAlign:n.align==="right"?"right":n.align==="center"?"center":"left",fontSize:13,color:s===0?"var(--color-text-primary, #000626)":"var(--color-text-secondary, #595f7a)",fontFamily:n.mono?a0:void 0,fontVariantNumeric:n.mono?"tabular-nums":void 0},children:String(o[n.key]??"—")},n.key))},a))})]})})}const s0="Geist Mono, ui-monospace, monospace";function l0({rowLabel:r,columns:t,rows:o}){return e.jsx("div",{className:"border border-[var(--color-border-default,#e5e7eb)] rounded-lg overflow-hidden",children:e.jsxs("table",{className:"w-full",style:{borderCollapse:"collapse"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{padding:"9px 16px",textAlign:"left",fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-text-tertiary, #8c92af)",background:"var(--color-bg-secondary, #f9fafb)",borderBottom:"1px solid var(--color-border-default, #e5e7eb)",whiteSpace:"nowrap"},children:r}),t.map(a=>e.jsx("th",{style:{padding:"9px 16px",textAlign:"right",fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:a.highlight?"#022e40":"var(--color-text-tertiary, #8c92af)",background:a.highlight?"#f0f9ff":"var(--color-bg-secondary, #f9fafb)",borderBottom:"1px solid var(--color-border-default, #e5e7eb)",whiteSpace:"nowrap"},children:a.label},a.key))]})}),e.jsx("tbody",{children:(o??[]).map((a,n)=>e.jsxs("tr",{style:{background:"var(--color-bg-primary, #fff)",borderBottom:n<(o??[]).length-1?"1px solid var(--color-border-light, #f3f4f6)":void 0},children:[e.jsx("td",{style:{padding:"10px 16px",fontSize:13,color:"var(--color-text-primary, #000626)"},children:String(a.account??"")}),t.map(s=>e.jsx("td",{style:{padding:"10px 16px",textAlign:"right",fontSize:13,fontFamily:s0,fontVariantNumeric:"tabular-nums",color:s.highlight?"var(--color-text-primary, #000626)":"var(--color-text-secondary, #595f7a)",background:s.highlight?"#f0f9ff":void 0},children:String(a[s.key]??"—")},s.key))]},n))})]})})}const Nt={draft:{bg:"var(--color-gray-200, #e5e7eb)",color:"var(--color-text-secondary, #595f7a)",label:"Draft"},provisional:{bg:"#fef9c3",color:"#854d0e",label:"Provisional"},final:{bg:"#dcfce7",color:"#166534",label:"Final"}};function i0({title:r,subtitle:t,period:o,generatedAt:a,status:n}){const s=Nt[n??""]??Nt.draft;return e.jsxs("div",{className:"flex items-start justify-between gap-4",style:{padding:"20px 24px",background:"var(--color-bg-primary, #fff)",borderBottom:"1px solid var(--color-border-default, #e5e7eb)"},children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("h1",{style:{margin:0,fontSize:20,fontWeight:700,color:"var(--color-text-primary, #000626)",lineHeight:1.25},children:r}),t&&e.jsx("p",{style:{margin:0,fontSize:13,color:"var(--color-text-secondary, #595f7a)"},children:t}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:4},children:[o&&e.jsx("span",{style:{fontSize:12,color:"var(--color-text-tertiary, #8c92af)"},children:o}),o&&a&&e.jsx("span",{style:{fontSize:12,color:"#e5e7eb"},children:"·"}),a&&e.jsxs("span",{style:{fontSize:12,color:"var(--color-text-tertiary, #8c92af)"},children:["Generated ",a]})]})]}),n&&e.jsx("span",{style:{padding:"3px 10px",borderRadius:9999,fontSize:11,fontWeight:600,background:s.bg,color:s.color,whiteSpace:"nowrap",flexShrink:0},children:s.label})]})}function c0({period:r,prevPeriod:t,nextPeriod:o,actions:a}){return e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,padding:"8px 16px",background:"var(--color-bg-secondary, #f9fafb)",borderBottom:"1px solid var(--color-border-default, #e5e7eb)",flexWrap:"wrap"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[t&&e.jsxs("button",{style:{padding:"4px 10px",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:6,background:"#fff",color:"var(--color-text-secondary, #595f7a)",fontSize:12,cursor:"pointer"},children:["← ",t]}),e.jsx("span",{style:{padding:"4px 12px",border:"1px solid #022e40",borderRadius:6,background:"#f0f9ff",color:"#022e40",fontSize:12,fontWeight:600},children:r}),o&&e.jsxs("button",{style:{padding:"4px 10px",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:6,background:"#fff",color:"var(--color-text-secondary, #595f7a)",fontSize:12,cursor:"pointer"},children:[o," →"]})]}),a&&a.length>0&&e.jsx("div",{style:{display:"flex",alignItems:"center",gap:6},children:a.map((n,s)=>e.jsx("button",{style:{padding:"5px 14px",border:n.variant==="primary"?"none":"1px solid var(--color-border-default, #e5e7eb)",borderRadius:6,background:n.variant==="primary"?"#022e40":"#fff",color:n.variant==="primary"?"#fff":"var(--color-text-secondary, #595f7a)",fontSize:12,fontWeight:500,cursor:"pointer"},children:n.label},s))})]})}function d0({periods:r,activePeriod:t,compareEnabled:o}){return e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 16px",background:"var(--color-bg-secondary, #f9fafb)",borderBottom:"1px solid var(--color-border-default, #e5e7eb)",flexWrap:"wrap"},children:[e.jsx("div",{style:{display:"flex",alignItems:"center",gap:2,padding:2,background:"var(--color-gray-100, #f3f4f6)",borderRadius:8,border:"1px solid var(--color-border-light, #f3f4f6)"},children:(r??[]).map(a=>{const n=a.id===t;return e.jsx("button",{style:{padding:"4px 12px",borderRadius:6,border:"none",background:n?"#fff":"transparent",color:n?"var(--color-text-primary, #000626)":"var(--color-text-tertiary, #8c92af)",fontSize:12,fontWeight:n?600:400,cursor:"pointer",boxShadow:n?"0 1px 2px rgba(0,0,0,0.08)":"none"},children:a.label},a.id)})}),o!=null&&e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",fontSize:12,color:"var(--color-text-secondary, #595f7a)"},children:[e.jsx("span",{style:{display:"inline-flex",width:28,height:16,borderRadius:9999,background:o?"#022e40":"var(--color-gray-300, #d1d5db)",alignItems:"center",padding:"0 2px"},children:e.jsx("span",{style:{width:12,height:12,borderRadius:"50%",background:"#fff",transform:o?"translateX(12px)":"translateX(0)",transition:"transform 0.15s"}})}),"Compare to previous"]})]})}function p0({title:r,body:t,actions:o}){return e.jsxs("div",{style:{background:"var(--color-bg-primary, #fff)",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:12,padding:"20px 24px",display:"flex",flexDirection:"column",gap:12},children:[r&&e.jsx("h3",{style:{margin:0,fontSize:15,fontWeight:600,color:"var(--color-text-primary, #000626)"},children:r}),t&&e.jsx("p",{style:{margin:0,fontSize:13,lineHeight:1.6,color:"var(--color-text-secondary, #595f7a)"},children:t}),o&&o.length>0&&e.jsx("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:o.map((a,n)=>e.jsx("button",{style:{padding:"6px 16px",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:8,background:"var(--color-bg-secondary, #f9fafb)",color:"var(--color-text-primary, #000626)",fontSize:13,fontWeight:500,cursor:"pointer"},children:a.label},n))})]})}function x0({title:r,description:t,children:o}){return e.jsxs("div",{style:{background:"var(--color-bg-primary, #fff)",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:12,overflow:"hidden"},children:[(r||t)&&e.jsxs("div",{style:{padding:"14px 20px",borderBottom:"1px solid var(--color-border-default, #e5e7eb)",background:"var(--color-bg-secondary, #f9fafb)"},children:[r&&e.jsx("h3",{style:{margin:0,fontSize:14,fontWeight:600,color:"var(--color-text-primary, #000626)"},children:r}),t&&e.jsx("p",{style:{margin:r?"2px 0 0":0,fontSize:12,color:"var(--color-text-tertiary, #8c92af)"},children:t})]}),o&&e.jsx("div",{style:{padding:20},children:o})]})}const f0={Active:{bg:"#dcfce7",color:"#15803d"},Inactive:{bg:"var(--color-gray-100, #f3f4f6)",color:"var(--color-text-tertiary, #8c92af)"},Pending:{bg:"#fef9c3",color:"#d97706"},Suspended:{bg:"#fee2e2",color:"#dc2626"}};function u0({name:r,type:t,status:o,meta:a}){const n=f0[o??""]??{bg:"var(--color-gray-100, #f3f4f6)",color:"var(--color-text-secondary, #595f7a)"};return e.jsxs("div",{style:{background:"var(--color-bg-primary, #fff)",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:12,padding:"16px 20px",display:"flex",flexDirection:"column",gap:12},children:[e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:8},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[e.jsx("span",{style:{fontSize:15,fontWeight:600,color:"var(--color-text-primary, #000626)"},children:r}),t&&e.jsx("span",{style:{fontSize:12,color:"var(--color-text-tertiary, #8c92af)"},children:t})]}),o&&e.jsx("span",{style:{padding:"3px 10px",borderRadius:9999,fontSize:11,fontWeight:600,background:n.bg,color:n.color,flexShrink:0},children:o})]}),a&&a.length>0&&e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(140px, 1fr))",gap:"8px 16px",paddingTop:8,borderTop:"1px solid var(--color-border-light, #f3f4f6)"},children:a.map((s,l)=>e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[e.jsx("span",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--color-text-tertiary, #8c92af)"},children:s.label}),e.jsx("span",{style:{fontSize:13,color:"var(--color-text-primary, #000626)"},children:s.value})]},l))})]})}function g0({gap:r=4,direction:t="vertical",children:o}){return e.jsx("div",{style:{display:"flex",flexDirection:t==="horizontal"?"row":"column",gap:r*4,width:"100%"},children:o})}function m0({columns:r=2,gap:t=4,children:o}){return e.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${r}, 1fr)`,gap:t*4,width:"100%"},children:o})}const zt={info:{bg:"var(--color-blue-50, #eff6ff)",border:"var(--color-blue-200, #bfdbfe)",titleColor:"#1e40af",msgColor:"#3b82f6",icon:"ℹ"},success:{bg:"#f0fdf4",border:"#bbf7d0",titleColor:"#166534",msgColor:"#16a34a",icon:"✓"},warning:{bg:"#fefce8",border:"#fde68a",titleColor:"#854d0e",msgColor:"#d97706",icon:"⚠"},error:{bg:"#fef2f2",border:"#fecaca",titleColor:"#991b1b",msgColor:"#dc2626",icon:"✕"}};function h0({variant:r="info",title:t,message:o,action:a}){const n=zt[r]??zt.info;return e.jsxs("div",{style:{display:"flex",gap:12,padding:"12px 16px",background:n.bg,border:`1px solid ${n.border}`,borderRadius:10,alignItems:"flex-start"},children:[e.jsx("span",{style:{fontSize:14,color:n.msgColor,flexShrink:0,marginTop:1},children:n.icon}),e.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2},children:[e.jsx("span",{style:{fontSize:13,fontWeight:600,color:n.titleColor},children:t}),o&&e.jsx("span",{style:{fontSize:12,color:n.msgColor},children:o})]}),a&&e.jsx("button",{style:{padding:"4px 12px",border:`1px solid ${n.border}`,borderRadius:6,background:"transparent",color:n.titleColor,fontSize:12,fontWeight:500,cursor:"pointer",flexShrink:0},children:a.label})]})}const Tt={success:{bg:"var(--dl-data-positive-bg, #dcfce7)",color:"var(--dl-data-positive)"},warning:{bg:"var(--dl-data-warning-bg, #fef9c3)",color:"var(--dl-data-warning)"},error:{bg:"var(--dl-data-negative-bg, #fee2e2)",color:"var(--dl-data-negative)"},info:{bg:"var(--color-blue-50, #eff6ff)",color:"#1d4ed8"},neutral:{bg:"var(--color-gray-100, #f3f4f6)",color:"var(--color-text-secondary, #595f7a)"}};function b0({label:r,variant:t="neutral"}){const o=Tt[t]??Tt.neutral;return e.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"3px 10px",borderRadius:9999,fontSize:11,fontWeight:600,background:o.bg,color:o.color,whiteSpace:"nowrap"},children:r})}function v0({title:r,description:t,action:o}){return e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,padding:"48px 24px",textAlign:"center"},children:[e.jsx("div",{style:{width:40,height:40,borderRadius:"50%",background:"var(--color-bg-secondary, #f9fafb)",border:"1px solid var(--color-border-default, #e5e7eb)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,color:"var(--color-text-tertiary, #8c92af)"},children:"○"}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[e.jsx("h3",{style:{margin:0,fontSize:15,fontWeight:600,color:"var(--color-text-primary, #000626)"},children:r}),t&&e.jsx("p",{style:{margin:0,fontSize:13,color:"var(--color-text-secondary, #595f7a)",maxWidth:360},children:t})]}),o&&e.jsx("button",{style:{padding:"8px 20px",border:"none",borderRadius:8,background:"#022e40",color:"#ffffff",fontSize:13,fontWeight:600,cursor:"pointer"},children:o.label})]})}function y0({value:r,label:t}){const o=Math.min(100,Math.max(0,r));return e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[t&&e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:12,color:"var(--color-text-secondary, #595f7a)"},children:[e.jsx("span",{children:t}),e.jsxs("span",{style:{fontWeight:600,color:"var(--color-text-primary, #000626)"},children:[o,"%"]})]}),e.jsx("div",{style:{height:6,background:"var(--color-gray-200, #e5e7eb)",borderRadius:9999,overflow:"hidden"},children:e.jsx("div",{style:{height:"100%",width:`${o}%`,background:"#022e40",borderRadius:9999,transition:"width 0.3s ease"}})})]})}const $t={running:{bg:"#eff6ff",color:"#1d4ed8",label:"Running"},paused:{bg:"#fef9c3",color:"#d97706",label:"Paused"},completed:{bg:"#dcfce7",color:"#15803d",label:"Done"},failed:{bg:"#fee2e2",color:"#dc2626",label:"Failed"},pending:{bg:"var(--color-gray-100, #f3f4f6)",color:"var(--color-text-secondary, #595f7a)",label:"Pending"}};function j0({name:r,status:t,progressPct:o,currentStep:a,completedSteps:n,totalSteps:s,clientName:l}){const c=$t[t]??$t.pending,d=Math.min(100,Math.max(0,o??0));return e.jsxs("div",{style:{background:"var(--color-bg-primary, #fff)",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:12,padding:"16px 20px",display:"flex",flexDirection:"column",gap:12},children:[e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:8},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[e.jsx("span",{style:{fontSize:14,fontWeight:600,color:"var(--color-text-primary, #000626)"},children:r}),l&&e.jsx("span",{style:{fontSize:12,color:"var(--color-text-tertiary, #8c92af)"},children:l})]}),e.jsx("span",{style:{padding:"3px 10px",borderRadius:9999,fontSize:11,fontWeight:600,background:c.bg,color:c.color,flexShrink:0},children:c.label})]}),o!=null&&e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:12,color:"var(--color-text-secondary, #595f7a)"},children:[a&&e.jsx("span",{children:a}),n!=null&&s!=null&&e.jsxs("span",{style:{fontWeight:600},children:[n,"/",s," steps"]})]}),e.jsx("div",{style:{height:4,background:"var(--color-gray-200, #e5e7eb)",borderRadius:9999,overflow:"hidden"},children:e.jsx("div",{style:{height:"100%",width:`${d}%`,background:t==="failed"?"#dc2626":"#022e40",borderRadius:9999}})})]})]})}const Lt={pending:{bg:"var(--color-gray-100, #f3f4f6)",color:"var(--color-text-secondary, #595f7a)"},running:{bg:"#eff6ff",color:"#1d4ed8"},done:{bg:"#dcfce7",color:"#15803d"},failed:{bg:"#fee2e2",color:"#dc2626"},skipped:{bg:"var(--color-gray-100, #f3f4f6)",color:"var(--color-text-tertiary, #8c92af)"},awaiting_approval:{bg:"#fef9c3",color:"#d97706"}},w0={data_extraction:"Extraction",analysis:"Analysis",document_creation:"Document",api_call:"API",human_review:"Review",notification:"Notify"};function C0({name:r,status:t,type:o,outputSummary:a}){const n=Lt[t]??Lt.pending,s=w0[o??""]??o??"Task";return e.jsxs("div",{style:{background:"var(--color-bg-primary, #fff)",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:10,padding:"12px 16px",display:"flex",flexDirection:"column",gap:6},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx("span",{style:{padding:"2px 7px",borderRadius:5,fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.06em",background:"var(--color-bg-secondary, #f9fafb)",color:"var(--color-text-tertiary, #8c92af)",flexShrink:0},children:s}),e.jsx("span",{style:{fontSize:13,fontWeight:500,color:"var(--color-text-primary, #000626)"},children:r})]}),e.jsx("span",{style:{padding:"2px 8px",borderRadius:9999,fontSize:11,fontWeight:600,background:n.bg,color:n.color,flexShrink:0},children:t})]}),a&&e.jsx("p",{style:{margin:0,fontSize:12,color:"var(--color-text-secondary, #595f7a)",paddingLeft:2},children:a})]})}function S0({title:r,description:t,context:o,approveLabel:a,rejectLabel:n}){return e.jsxs("div",{style:{background:"var(--color-bg-primary, #fff)",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:12,padding:"20px 24px",display:"flex",flexDirection:"column",gap:16},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[e.jsx("h3",{style:{margin:0,fontSize:15,fontWeight:600,color:"var(--color-text-primary, #000626)"},children:r}),t&&e.jsx("p",{style:{margin:0,fontSize:13,color:"var(--color-text-secondary, #595f7a)"},children:t})]}),o&&e.jsx("div",{style:{padding:"10px 14px",background:"var(--color-bg-secondary, #f9fafb)",borderRadius:8,border:"1px solid var(--color-border-light, #f3f4f6)",fontSize:12,color:"var(--color-text-secondary, #595f7a)",fontFamily:"Geist Mono, ui-monospace, monospace"},children:o}),e.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[n&&e.jsx("button",{style:{padding:"8px 20px",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:8,background:"var(--color-bg-primary, #fff)",color:"var(--color-text-secondary, #595f7a)",fontSize:13,fontWeight:500,cursor:"pointer"},children:n}),e.jsx("button",{style:{padding:"8px 20px",border:"none",borderRadius:8,background:"#022e40",color:"#ffffff",fontSize:13,fontWeight:600,cursor:"pointer"},children:a})]})]})}const Mt={up:{bg:"var(--dl-data-positive-bg, #dcfce7)",color:"var(--dl-data-positive)"},down:{bg:"var(--dl-data-negative-bg, #fee2e2)",color:"var(--dl-data-negative)"},flat:{bg:"var(--color-gray-100, #f3f4f6)",color:"var(--dl-data-neutral)"},warning:{bg:"var(--dl-data-warning-bg, #fef9c3)",color:"var(--dl-data-warning)"}};function k0({value:r,direction:t}){const o=Mt[t??"flat"]??Mt.flat;return e.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"2px 8px",borderRadius:9999,fontSize:11,fontWeight:600,fontFamily:"Geist Mono, ui-monospace, monospace",background:o.bg,color:o.color,whiteSpace:"nowrap"},children:r})}const N0={up:"var(--dl-data-positive)",down:"var(--dl-data-negative)",flat:"var(--dl-data-neutral)"},z0="Geist Mono, ui-monospace, monospace";function T0({items:r}){return e.jsx("div",{style:{display:"flex",alignItems:"stretch",background:"var(--color-bg-secondary, #f9fafb)",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:8,overflow:"hidden"},children:r.map((t,o)=>e.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,padding:"12px 16px",borderLeft:o>0?"1px solid var(--color-border-default, #e5e7eb)":void 0},children:[e.jsx("span",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-text-tertiary, #8c92af)"},children:t.label}),e.jsx("span",{style:{fontSize:16,fontWeight:600,fontFamily:z0,fontVariantNumeric:"tabular-nums",color:N0[t.direction??"flat"]??"var(--dl-data-neutral)"},children:t.value})]},o))})}const At={default:{bg:"#ffffff",border:"var(--color-border-default, #e5e7eb)"},highlighted:{bg:"var(--color-bg-secondary, #f9fafb)",border:"var(--color-border-default, #e5e7eb)"},audit:{bg:"#fffbeb",border:"#fde68a"}};function $0({content:r,author:t,authorRole:o,date:a,sectionLabel:n,expandable:s,defaultExpanded:l=!0,variant:c="default",className:d}){const[x,p]=j.useState(l),f=At[c]??At.default,u=s&&r.length>200&&!x;return e.jsxs("div",{className:d,style:{display:"flex",flexDirection:"column",gap:8,padding:"14px 16px",background:f.bg,border:`1px solid ${f.border}`,borderRadius:10},children:[n&&e.jsx("span",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-text-tertiary, #8c92af)"},children:n}),e.jsx("p",{style:{fontSize:13,lineHeight:1.6,color:"var(--color-text-primary, #000626)",margin:0,...u?{display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden"}:{}},children:r}),s&&r.length>200&&e.jsx("button",{onClick:()=>p(!x),style:{background:"none",border:"none",cursor:"pointer",fontSize:12,fontWeight:500,color:"var(--dl-data-neutral, #6b7280)",padding:0,textAlign:"left"},children:x?"Show less":"Show more"}),(t||a)&&e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{borderTop:"1px solid var(--color-border-light, #f3f4f6)",margin:"4px 0"}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[t&&e.jsx("div",{style:{width:24,height:24,borderRadius:"50%",background:"var(--color-gray-200, #e5e7eb)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:10,fontWeight:600,color:"var(--color-text-secondary, #595f7a)"},children:t.split(" ").map(g=>g[0]).join("").slice(0,2)}),e.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[t&&e.jsx("span",{style:{fontSize:12,fontWeight:500,color:"var(--color-text-primary, #000626)"},children:t}),o&&e.jsx("span",{style:{fontSize:11,color:"var(--color-text-tertiary, #8c92af)"},children:o})]})]}),a&&e.jsx("span",{style:{fontSize:11,color:"var(--color-text-tertiary, #8c92af)"},children:a})]})]})]})}function L0({label:r,description:t,sectionNumber:o,children:a,noBorder:n,className:s}){return e.jsxs("section",{className:s,style:{display:"flex",flexDirection:"column",gap:4,...n?{}:{borderTop:"1px solid var(--color-border-default, #e5e7eb)",paddingTop:16}},children:[e.jsxs("h2",{style:{fontSize:13,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-text-primary, #000626)",margin:0},children:[o&&e.jsx("span",{style:{color:"var(--color-text-tertiary, #8c92af)",marginRight:8},children:o}),r]}),t&&e.jsx("p",{style:{fontSize:13,color:"var(--color-text-secondary, #595f7a)",margin:0},children:t}),a&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4},children:a})]})}const M0={info:"ℹ",success:"✓",warning:"⚠",error:"✕"},Rt={info:"#1e40af",success:"#166534",warning:"#854d0e",error:"#991b1b"},Ft={info:"#3b82f6",success:"#16a34a",warning:"#d97706",error:"#dc2626"},A0={info:"#eff6ff",success:"#f0fdf4",warning:"#fefce8",error:"#fef2f2"},Bt={info:"#bfdbfe",success:"#bbf7d0",warning:"#fde68a",error:"#fecaca"};function R0({variant:r="info",title:t,message:o,action:a,className:n}){const s=r;return e.jsxs("div",{className:n,style:{display:"flex",gap:12,padding:"12px 16px",background:A0[s],border:`1px solid ${Bt[s]}`,borderRadius:10,alignItems:"flex-start"},children:[e.jsx("span",{style:{fontSize:14,color:Ft[s],flexShrink:0,marginTop:1},children:M0[s]}),e.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2},children:[e.jsx("span",{style:{fontSize:13,fontWeight:600,color:Rt[s]},children:t}),o&&e.jsx("span",{style:{fontSize:12,color:Ft[s]},children:o})]}),a&&e.jsx("button",{onClick:a.onClick,style:{padding:"4px 12px",border:`1px solid ${Bt[s]}`,borderRadius:6,background:"transparent",color:Rt[s],fontSize:12,fontWeight:500,cursor:"pointer",flexShrink:0},children:a.label})]})}const F0={month:"Monthly",quarter:"Quarterly",year:"Annual",custom:"Custom"},It={display:"inline-flex",alignItems:"center",justifyContent:"center",width:28,height:28,borderRadius:6,border:"1px solid var(--color-border-default, #e5e7eb)",background:"#fff",color:"var(--color-text-primary, #000626)",cursor:"pointer",flexShrink:0};function B0({current:r,available:t=[],format:o,availableFormats:a=[],onPeriodChange:n,onFormatChange:s,hasPrev:l=!0,hasNext:c=!1,compact:d,className:x}){return e.jsxs("div",{className:x,style:{display:"flex",alignItems:"center",gap:d?4:8,flexWrap:"wrap"},children:[e.jsx("button",{style:{...It,opacity:l?1:.4},disabled:!l,onClick:()=>{if(l&&t.length>1){const p=t.findIndex(f=>f.id===r.id);p>0&&(n==null||n(t[p-1].id))}},"aria-label":"Previous period",children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:e.jsx("path",{d:"M7.5 2L3.5 6L7.5 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),t.length>1?e.jsx("select",{value:r.id,onChange:p=>n==null?void 0:n(p.target.value),style:{border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:6,background:"#fff",fontSize:d?12:13,fontWeight:500,padding:d?"4px 8px":"6px 12px",cursor:"pointer",textAlign:"center"},"aria-label":"Select period",children:t.map(p=>e.jsx("option",{value:p.id,children:p.label},p.id))}):e.jsx("span",{style:{fontSize:d?12:13,fontWeight:600,color:"var(--color-text-primary, #000626)",minWidth:80,textAlign:"center"},children:r.label}),e.jsx("button",{style:{...It,opacity:c?1:.4},disabled:!c,onClick:()=>{if(c&&t.length>1){const p=t.findIndex(f=>f.id===r.id);p<t.length-1&&(n==null||n(t[p+1].id))}},"aria-label":"Next period",children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:e.jsx("path",{d:"M4.5 2L8.5 6L4.5 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),a.length>1&&o&&e.jsx("div",{style:{display:"flex",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:6,overflow:"hidden"},role:"group","aria-label":"Period format",children:a.map(p=>e.jsx("button",{onClick:()=>s==null?void 0:s(p),"aria-pressed":p===o,style:{padding:d?"4px 8px":"6px 12px",fontSize:d?11:12,fontWeight:p===o?600:400,background:p===o?"var(--color-text-primary, #000626)":"#fff",color:p===o?"#fff":"var(--color-text-secondary, #595f7a)",border:"none",cursor:"pointer"},children:F0[p]??p},p))})]})}function I0({modes:r,activeMode:t,onModeChange:o,variant:a="default",compact:n,className:s}){const l=a==="pills";return e.jsx("div",{className:s,role:"group","aria-label":"Comparison mode",style:{display:"flex",...l?{gap:4}:{border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:6,overflow:"hidden"}},children:r.map(c=>{const d=c.id===t,x=n&&c.shortLabel?c.shortLabel:c.label,p={padding:n?"4px 8px":"6px 12px",fontSize:n?11:12,cursor:c.disabled?"not-allowed":"pointer",opacity:c.disabled?.4:1,border:"none",fontWeight:d?600:400,transition:"background 0.15s, color 0.15s"},f=l?d?{background:"var(--color-text-primary, #000626)",color:"#fff",border:"1px solid var(--color-text-primary, #000626)",borderRadius:6}:{background:"#fff",color:"var(--color-text-secondary, #595f7a)",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:6}:d?{background:"var(--color-text-primary, #000626)",color:"#fff"}:{background:"#fff",color:"var(--color-text-secondary, #595f7a)"};return e.jsx("button",{onClick:()=>!c.disabled&&(o==null?void 0:o(c.id)),"aria-pressed":d,disabled:c.disabled,style:{...p,...f},children:x},c.id)})})}const D0={pdf:{label:"PDF",icon:"⬇"},excel:{label:"Excel",icon:"⬇"},csv:{label:"CSV",icon:"⬇"},print:{label:"Print",icon:"⎙"}};function W0({actions:r,label:t,size:o="md",className:a}){const n=o==="sm";return e.jsxs("div",{className:a,style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[t&&e.jsx("span",{style:{fontSize:12,fontWeight:500,color:"var(--color-text-tertiary, #8c92af)",marginRight:4},children:t}),r.map(s=>{const l=D0[s.format]??{label:s.format,icon:"⬇"};return e.jsxs("button",{onClick:s.onClick,disabled:s.disabled,style:{display:"inline-flex",alignItems:"center",gap:6,padding:n?"4px 8px":"6px 12px",border:"1px solid var(--color-border-default, #e5e7eb)",borderRadius:6,background:"#fff",color:"var(--color-text-secondary, #595f7a)",fontSize:n?11:12,fontWeight:500,cursor:s.disabled?"not-allowed":"pointer",opacity:s.disabled?.4:1},children:[e.jsx("span",{style:{color:"var(--color-text-tertiary, #8c92af)"},children:l.icon}),s.label??l.label]},s.format)})]})}const Dt={draft:{label:"Draft",bg:"var(--color-gray-200, #e5e7eb)",color:"var(--color-text-secondary, #595f7a)"},reviewed:{label:"Reviewed",bg:"#fef9c3",color:"#854d0e"},"signed-off":{label:"Signed Off",bg:"#bbf7d0",color:"#166534"},filed:{label:"Filed",bg:"#bfdbfe",color:"#1e40af"}};function P0({firmName:r,preparedBy:t,reviewedBy:o,date:a,reference:n,status:s="draft",className:l}){const c=Dt[s]??Dt.draft;return e.jsxs("div",{className:l,style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",borderTop:"1px solid var(--color-border-default, #e5e7eb)",paddingTop:12},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[r&&e.jsx("span",{style:{fontSize:13,fontWeight:600,color:"var(--color-text-primary, #000626)"},children:r}),n&&e.jsx("span",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-text-tertiary, #8c92af)"},children:n}),e.jsxs("div",{style:{display:"flex",gap:16,marginTop:4},children:[t&&e.jsxs("span",{style:{fontSize:12,color:"var(--color-text-secondary, #595f7a)"},children:["Prepared by: ",e.jsx("strong",{children:t})]}),o&&e.jsxs("span",{style:{fontSize:12,color:"var(--color-text-secondary, #595f7a)"},children:["Reviewed by: ",e.jsx("strong",{children:o})]}),a&&e.jsx("span",{style:{fontSize:12,color:"var(--color-text-tertiary, #8c92af)"},children:a})]})]}),e.jsx("span",{style:{fontSize:11,fontWeight:600,padding:"3px 10px",borderRadius:999,background:c.bg,color:c.color,whiteSpace:"nowrap"},children:c.label})]})}function E0({footnotes:r,className:t}){return!r||r.length===0?null:e.jsxs("div",{className:t,style:{borderTop:"1px solid var(--color-border-default, #e5e7eb)",paddingTop:16,display:"flex",flexDirection:"column",gap:6},children:[e.jsx("span",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--color-text-tertiary, #8c92af)"},children:"Notes"}),r.map(o=>e.jsxs("div",{style:{display:"flex",gap:8,alignItems:"flex-start"},children:[e.jsxs("span",{style:{fontSize:11,fontWeight:700,color:"#1e40af",minWidth:20,textAlign:"right",fontVariantNumeric:"tabular-nums"},children:["[",o.number,"]"]}),e.jsx("span",{style:{fontSize:12,color:"var(--color-text-secondary, #595f7a)",lineHeight:1.5},children:o.text})]},o.number))]})}function V0({number:r,onClick:t,className:o}){return e.jsxs("sup",{className:o,onClick:()=>t==null?void 0:t(r),title:`Footnote ${r}`,"aria-label":`Footnote ${r}`,style:{fontSize:10,fontWeight:700,color:"#1e40af",cursor:t?"pointer":"default",marginLeft:1},children:["[",r,"]"]})}const Wt={up:"#166534",down:"#dc2626",flat:"#6b7280"};function H0(r){if(r.length<2)return"flat";const t=r[0].value,o=r[r.length-1].value;return o>t?"up":o<t?"down":"flat"}function _0({data:r,direction:t,width:o=80,height:a=24,showLastDot:n=!0,className:s}){if(!r||r.length<2)return null;const l=t??H0(r),c=Wt[l]??Wt.flat,d=r.map(v=>v.value),x=Math.min(...d),f=Math.max(...d)-x||1,u=3,g=d.map((v,w)=>{const k=u+w/(d.length-1)*(o-u*2),$=u+(1-(v-x)/f)*(a-u*2);return`${k},${$}`}).join(" "),m=u+(d.length-1)/(d.length-1)*(o-u*2),h=u+(1-(d[d.length-1]-x)/f)*(a-u*2);return e.jsxs("svg",{className:s,width:o,height:a,viewBox:`0 0 ${o} ${a}`,fill:"none","aria-hidden":"true",children:[e.jsx("polyline",{points:g,stroke:c,strokeWidth:1.5,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),n&&e.jsx("circle",{cx:m,cy:h,r:2.5,fill:c})]})}const se=48,O0=4,_e=4,G0=24;function U0(r){if(r<=0)return 100;const t=Math.pow(10,Math.floor(Math.log10(r))),o=r/t;return([1,2,2.5,5,10].find(n=>n>=o)??10)*t}function Y0(r,t,o,a,n){const s=Math.min(n,o/2,a/2);return`M${r},${t+a} L${r},${t+s} Q${r},${t} ${r+s},${t} L${r+o-s},${t} Q${r+o},${t} ${r+o},${t+s} L${r+o},${t+a} Z`}function la({data:r,series:t,height:o=200,formatYTick:a,formatXTick:n,formatTooltipHeader:s,formatTooltipValue:l,referenceLine:c,className:d}){const x=j.useRef(null),[p,f]=j.useState(0);j.useEffect(()=>{const N=x.current;if(!N||typeof ResizeObserver>"u")return;const B=new ResizeObserver(E=>{var V;f(((V=E[0])==null?void 0:V.contentRect.width)??0)});return B.observe(N),()=>B.disconnect()},[]);const[u,g]=j.useState(null);if(!r.length||p===0)return e.jsx("div",{ref:x,"data-testid":"stacked-bar-chart",className:d,style:{width:"100%",height:o}});const m=p-se-O0,h=o-_e-G0,v=r.length,w=m/v,k=Math.max(8,Math.min(28,Math.floor(w)-4)),$=(w-k)/2,z=r.reduce((N,B)=>{const E=t.reduce((V,H)=>V+Number(B[H.key]??0),0);return Math.max(N,E)},0),C=U0(Math.max(z,(c==null?void 0:c.value)??0)),T=5,I=Array.from({length:T},(N,B)=>C/(T-1)*B);function L(N){return _e+h-N/C*h}function F(N){const B=N.currentTarget.closest("svg");if(!B)return;const E=B.getBoundingClientRect(),V=N.clientX-E.left,H=N.clientY-E.top,W=Math.floor((V-se)/w);W>=0&&W<v?g({index:W,mouseX:V,mouseY:H}):u!==null&&g(null)}const S=u!==null?(()=>{const N=r[u.index],B=t.reduce((H,W)=>H+Number(N[W.key]??0),0),E=160,V=u.mouseX+12+E>p?u.mouseX-12-E:u.mouseX+12;return e.jsxs("div",{style:{position:"absolute",left:V,top:Math.max(0,u.mouseY-8),pointerEvents:"none",zIndex:50,background:"#fff",border:"1px solid #e5e7eb",borderRadius:8,boxShadow:"0 4px 12px rgba(0,0,0,0.08)",padding:"8px 12px",fontSize:12,minWidth:140},children:[e.jsx("div",{style:{fontWeight:500,color:"#374151",marginBottom:6},children:s?s(N.x):N.x}),[...t].reverse().map(H=>{const W=Number(N[H.key]??0);return e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:16,marginBottom:2},children:[e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:6,color:"#6b7280"},children:[e.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:H.color,flexShrink:0,display:"inline-block"}}),H.label]}),e.jsx("span",{style:{fontWeight:500,color:"#1f2937",fontVariantNumeric:"tabular-nums"},children:l?l(W):String(W)})]},H.key)}),t.length>1&&e.jsxs("div",{style:{marginTop:6,paddingTop:6,borderTop:"1px solid #f3f4f6",display:"flex",justifyContent:"space-between"},children:[e.jsx("span",{style:{color:"#9ca3af"},children:"Total"}),e.jsx("span",{style:{fontWeight:600,color:"#1f2937",fontVariantNumeric:"tabular-nums"},children:l?l(B):String(B)})]})]})})():null;return e.jsxs("div",{ref:x,"data-testid":"stacked-bar-chart",className:d,style:{position:"relative",width:"100%",height:o},children:[e.jsxs("svg",{width:"100%",height:o,"aria-hidden":"true",children:[I.filter(N=>N>0).map(N=>e.jsx("line",{x1:se,y1:L(N),x2:se+m,y2:L(N),stroke:"#e5e7eb",strokeWidth:1},N)),I.map(N=>e.jsx("text",{x:se-6,y:L(N),textAnchor:"end",dominantBaseline:"middle",fontSize:11,fill:"#9ca3af",children:a?a(N):String(N)},N)),u!==null&&e.jsx("rect",{x:se+u.index*w,y:_e,width:w,height:h,fill:"rgba(0,0,0,0.04)"}),r.map((N,B)=>{const E=se+B*w+$;let V=-1;for(let W=t.length-1;W>=0;W--)if(Number(N[t[W].key]??0)>0){V=W;break}let H=0;return e.jsx("g",{children:t.map((W,O)=>{const M=Number(N[W.key]??0);if(M<=0)return null;const D=M/C*h,_=L(H+M);return H+=M,O===V?e.jsx("path",{d:Y0(E,_,k,D,3),fill:W.color},W.key):e.jsx("rect",{x:E,y:_,width:k,height:D,fill:W.color},W.key)})},N.x)}),r.map((N,B)=>e.jsx("text",{x:se+B*w+w/2,y:_e+h+14,textAnchor:"middle",fontSize:11,fill:"#9ca3af",children:n?n(N.x):N.x},N.x)),c&&e.jsx("line",{x1:se,y1:L(c.value),x2:se+m,y2:L(c.value),stroke:c.color??"#E24B4A",strokeDasharray:c.strokeDasharray??"4 3",strokeWidth:1.5}),e.jsx("rect",{x:se,y:_e,width:m,height:h,fill:"transparent",onMouseMove:F,onMouseLeave:()=>g(null)})]}),S]})}function K0({cells:r,drillRows:t,colCount:o,defaultExpanded:a=!1,onToggle:n,rowClassName:s,drillRowClassName:l}){const[c,d]=j.useState(a),x=()=>{const p=!c;d(p),n==null||n(p)};return e.jsxs(e.Fragment,{children:[e.jsx("tr",{className:s,onClick:x,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),x())},role:"button",tabIndex:0,"aria-expanded":c,style:{cursor:"pointer",background:"#fff"},children:r.map((p,f)=>e.jsx("td",{style:{padding:"10px 16px",fontSize:13,color:f===0?"var(--color-text-primary, #000626)":"var(--color-text-secondary, #595f7a)"},children:f===0?e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:6},children:[e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",style:{transform:c?"rotate(90deg)":"rotate(0deg)",transition:"transform 0.15s ease-out",flexShrink:0},children:e.jsx("path",{d:"M3 1L7 5L3 9",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})}),p]}):p},f))}),c&&t.map(p=>e.jsx("tr",{className:l,style:{background:"var(--color-bg-secondary, #f9fafb)",borderBottom:"1px solid var(--color-gray-100, #f3f4f6)"},children:p.cells.map((f,u)=>e.jsx("td",{style:{padding:"8px 16px",paddingLeft:u===0?32:16,fontSize:12,color:"var(--color-text-secondary, #595f7a)"},children:f},u))},p.key))]})}const Z0=`
|
|
124
124
|
@media print {
|
|
125
125
|
.report-page { break-inside: avoid; }
|
|
126
126
|
.no-print { display: none !important; }
|
|
127
127
|
}
|
|
128
|
-
`;function Z0({printHeader:r,printFooter:t,children:o,className:a}){return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:K0}),r&&e.jsx("div",{className:"hidden print:block",children:r}),e.jsx("div",{className:`report-page ${a??""}`,style:{display:"flex",flexDirection:"column",gap:24},children:o}),t&&e.jsx("div",{className:"hidden print:block",children:t})]})}const X0={KpiStrip:Zd,MetricCard:qd,StatCard:e0,FinancialTable:t0,DataTable:a0,PivotTable:s0,ReportHeader:l0,ReportToolbar:i0,FilterBar:c0,BriefingCard:d0,SectionCard:p0,EntityCard:f0,Stack:u0,Grid:g0,Banner:m0,StatusPill:h0,EmptyState:b0,ProgressBar:v0,WorkstreamCard:y0,TaskCard:w0,ApprovalCard:C0,DeltaPill:S0,VarianceBand:z0,CommentaryBlock:T0,ReportSection:L0,ReportBanner:A0,PeriodSelector:F0,ComparisonToggle:B0,ExportBar:D0,AuditStamp:W0,FootnoteList:P0,FootnoteRef:E0,SparklineCell:H0,StackedBarChart:sa,DrillDownRow:Y0,ReportPage:Z0};class q0 extends j.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,o){console.warn("[UIRenderer] block render error:",t,o)}render(){return this.state.error?e.jsxs("div",{style:{padding:"8px 12px",borderRadius:6,background:"#fef2f2",border:"1px solid #fecaca",fontSize:12,color:"#991b1b"},children:["Render error: ",this.state.error.message]}):this.props.children}}function J0({block:r}){const t=X0[r.component];if(!t)return e.jsxs("div",{style:{padding:"8px 12px",borderRadius:6,background:"#f9fafb",border:"1px solid #e5e7eb",fontSize:12,color:"#6b7280"},children:["Unknown component: ",e.jsx("code",{children:r.component})]});const o=r.layout==="aside"?"w-72 shrink-0":r.layout==="inline"?"inline-flex":"w-full",a=r.children&&r.children.length>0?e.jsx(la,{blocks:r.children}):void 0;return e.jsx(q0,{children:e.jsx("div",{className:o,children:j.createElement(t,r.props,a)})})}function la({blocks:r}){return!r||r.length===0?null:e.jsx("div",{className:"flex flex-col gap-3 w-full",children:r.map(t=>e.jsx(J0,{block:t},t.id))})}exports.Activity=i.Activity;exports.Airplay=i.Airplay;exports.AlertCircle=i.AlertCircle;exports.AlertOctagon=i.AlertOctagon;exports.AlignCenter=i.AlignCenter;exports.AlignJustify=i.AlignJustify;exports.AlignLeft=i.AlignLeft;exports.AlignRight=i.AlignRight;exports.Anchor=i.Anchor;exports.Aperture=i.Aperture;exports.Archive=i.Archive;exports.ArrowDown2=i.ArrowDown2;exports.ArrowDownCircle=i.ArrowDownCircle;exports.ArrowDownLeft=i.ArrowDownLeft;exports.ArrowDownRight=i.ArrowDownRight;exports.ArrowLeftCircle=i.ArrowLeftCircle;exports.ArrowRightCircle=i.ArrowRightCircle;exports.ArrowUp=i.ArrowUp;exports.ArrowUpCircle=i.ArrowUpCircle;exports.ArrowUpLeft=i.ArrowUpLeft;exports.ArrowUpRight=i.ArrowUpRight;exports.AtSign=i.AtSign;exports.Award=i.Award;exports.BarChart2=i.BarChart2;exports.Battery=i.Battery;exports.BatteryCharging=i.BatteryCharging;exports.BellOff=i.BellOff;exports.Bluetooth=i.Bluetooth;exports.Bold=i.Bold;exports.Book=i.Book;exports.BookOpen=i.BookOpen;exports.Bookmark=i.Bookmark;exports.Box=i.Box;exports.Briefcase=i.Briefcase;exports.BrushCleanup=i.BrushCleanup;exports.Bug=i.Bug;exports.Calendar=i.Calendar;exports.Camera=i.Camera;exports.CameraOff=i.CameraOff;exports.Cast=i.Cast;exports.Check=i.Check;exports.CheckCircle=i.CheckCircle;exports.CheckSquare=i.CheckSquare;exports.ChevronDown=i.ChevronDown;exports.ChevronLeft=i.ChevronLeft;exports.ChevronRight=i.ChevronRight;exports.ChevronUp=i.ChevronUp;exports.ChevronsDown=i.ChevronsDown;exports.ChevronsLeft=i.ChevronsLeft;exports.ChevronsRight=i.ChevronsRight;exports.ChevronsUp=i.ChevronsUp;exports.Chrome=i.Chrome;exports.Circle=i.Circle;exports.Clipboard=i.Clipboard;exports.ClockHistory=i.ClockHistory;exports.Cloud=i.Cloud;exports.CloudDrizzle=i.CloudDrizzle;exports.CloudLightning=i.CloudLightning;exports.CloudOff=i.CloudOff;exports.CloudRain=i.CloudRain;exports.CloudSnow=i.CloudSnow;exports.Code=i.Code;exports.Codepen=i.Codepen;exports.Codesandbox=i.Codesandbox;exports.Coffee=i.Coffee;exports.Columns=i.Columns;exports.Command=i.Command;exports.Compass=i.Compass;exports.Component=i.Component;exports.CornerDownLeft=i.CornerDownLeft;exports.CornerDownRight=i.CornerDownRight;exports.CornerLeftDown=i.CornerLeftDown;exports.CornerLeftUp=i.CornerLeftUp;exports.CornerRightDown=i.CornerRightDown;exports.CornerRightUp=i.CornerRightUp;exports.CornerUpLeft=i.CornerUpLeft;exports.CornerUpRight=i.CornerUpRight;exports.Cpu=i.Cpu;exports.CreditCard=i.CreditCard;exports.Crop=i.Crop;exports.Crosshair=i.Crosshair;exports.Database=i.Database;exports.Delete=i.Delete;exports.Disc=i.Disc;exports.Divide=i.Divide;exports.DivideCircle=i.DivideCircle;exports.DivideSquare=i.DivideSquare;exports.DollarSign=i.DollarSign;exports.Download=i.Download;exports.DownloadCloud=i.DownloadCloud;exports.Dribbble=i.Dribbble;exports.Droplet=i.Droplet;exports.Dumbell=i.Dumbell;exports.Edit2=i.Edit2;exports.Edit3=i.Edit3;exports.Eye=i.Eye;exports.EyeOff=i.EyeOff;exports.Facebook=i.Facebook;exports.FastForward=i.FastForward;exports.Feather=i.Feather;exports.Figma=i.Figma;exports.FileMinus=i.FileMinus;exports.FilePlus=i.FilePlus;exports.FileText=i.FileText;exports.Film=i.Film;exports.Filter=i.Filter;exports.Filter1=i.Filter1;exports.Flag=i.Flag;exports.Folder=i.Folder;exports.FolderMinus=i.FolderMinus;exports.FolderPlus=i.FolderPlus;exports.Framer=i.Framer;exports.Frown=i.Frown;exports.GalleryView=i.GalleryView;exports.Gauge=i.Gauge;exports.Gift=i.Gift;exports.GitBranch=i.GitBranch;exports.GitCommit=i.GitCommit;exports.GitMerge=i.GitMerge;exports.GitPullRequest=i.GitPullRequest;exports.Github=i.Github;exports.Gitlab=i.Gitlab;exports.Globe=i.Globe;exports.Grid=i.Grid;exports.Group1=i.Group1;exports.Hand=i.Hand;exports.HardDrive=i.HardDrive;exports.Hash=i.Hash;exports.Headphones=i.Headphones;exports.HeightSize=i.HeightSize;exports.Hexagon=i.Hexagon;exports.Home=i.Home;exports.Home2=i.Home2;exports.Image=i.Image;exports.Inbox=i.Inbox;exports.Info=i.Info;exports.Instagram=i.Instagram;exports.Invite=i.Invite;exports.Italic=i.Italic;exports.KanbanView=i.KanbanView;exports.Key=i.Key;exports.Layers=i.Layers;exports.Layout=i.Layout;exports.LifeBuoy=i.LifeBuoy;exports.Link=i.Link;exports.Link2=i.Link2;exports.Linkedin=i.Linkedin;exports.List=i.List;exports.ListView=i.ListView;exports.Loader=i.Loader;exports.Lock=i.Lock;exports.LogIn=i.LogIn;exports.Mail=i.Mail;exports.Map=i.Map;exports.MapPin=i.MapPin;exports.Maximize=i.Maximize;exports.Maximize2=i.Maximize2;exports.Meh=i.Meh;exports.MessageCircle=i.MessageCircle;exports.MessageSquare=i.MessageSquare;exports.Mic=i.Mic;exports.MicOff=i.MicOff;exports.Minimize=i.Minimize;exports.Minimize2=i.Minimize2;exports.MinusCircle=i.MinusCircle;exports.MinusSquare=i.MinusSquare;exports.Monitor=i.Monitor;exports.Moon=i.Moon;exports.MoreVertical=i.MoreVertical;exports.MousePointer=i.MousePointer;exports.Move=i.Move;exports.Music=i.Music;exports.Navigation=i.Navigation;exports.Navigation2=i.Navigation2;exports.NewChat=i.NewChat;exports.Octagon=i.Octagon;exports.Package=i.Package;exports.PaperPlane1=i.PaperPlane1;exports.Paperclip=i.Paperclip;exports.Pause=i.Pause;exports.PauseCircle=i.PauseCircle;exports.Pdf=i.Pdf;exports.PenTool=i.PenTool;exports.Percent=i.Percent;exports.Phone=i.Phone;exports.PhoneCall=i.PhoneCall;exports.PhoneForwarded=i.PhoneForwarded;exports.PhoneIncoming=i.PhoneIncoming;exports.PhoneMissed=i.PhoneMissed;exports.PhoneOff=i.PhoneOff;exports.PhoneOutgoing=i.PhoneOutgoing;exports.Pin=i.Pin;exports.Play=i.Play;exports.PlayCircle=i.PlayCircle;exports.Plug21=i.Plug21;exports.Plus=i.Plus;exports.PlusCircle=i.PlusCircle;exports.PlusSquare=i.PlusSquare;exports.Pocket=i.Pocket;exports.Power=i.Power;exports.Printer=i.Printer;exports.Radio=i.Radio;exports.Redo=i.Redo;exports.RefreshCcw=i.RefreshCcw;exports.RefreshCw=i.RefreshCw;exports.Repeat=i.Repeat;exports.Rewind=i.Rewind;exports.RotateCcw=i.RotateCcw;exports.RotateCw=i.RotateCw;exports.Rss=i.Rss;exports.Save=i.Save;exports.Scissors=i.Scissors;exports.Search=i.Search;exports.Send=i.Send;exports.Server=i.Server;exports.Settings=i.Settings;exports.Share=i.Share;exports.Share2=i.Share2;exports.Shield=i.Shield;exports.ShieldOff=i.ShieldOff;exports.ShoppingBag=i.ShoppingBag;exports.ShoppingCart=i.ShoppingCart;exports.Shuffle=i.Shuffle;exports.Sidebar=i.Sidebar;exports.SkipBack=i.SkipBack;exports.SkipForward=i.SkipForward;exports.Slack=i.Slack;exports.Slash=i.Slash;exports.Sliders=i.Sliders;exports.Smartphone=i.Smartphone;exports.Smile=i.Smile;exports.Sort1=i.Sort1;exports.SortDefault=i.SortDefault;exports.SortDown=i.SortDown;exports.SortUp=i.SortUp;exports.Sources=i.Sources;exports.Sparks=i.Sparks;exports.Speaker=i.Speaker;exports.Square=i.Square;exports.Star=i.Star;exports.StopCircle=i.StopCircle;exports.Sun=i.Sun;exports.Sunrise=i.Sunrise;exports.Sunset=i.Sunset;exports.TableView=i.TableView;exports.Tablet=i.Tablet;exports.TagIcon=i.Tag;exports.TagPlus=i.TagPlus;exports.Target=i.Target;exports.Telescope=i.Telescope;exports.Terminal=i.Terminal;exports.TextileIcon=i.TextileIcon;exports.Thermometer=i.Thermometer;exports.ThumbsDown=i.ThumbsDown;exports.ThumbsUp=i.ThumbsUp;exports.ToggleLeft=i.ToggleLeft;exports.ToggleRight=i.ToggleRight;exports.Tool=i.Tool;exports.Trash=i.Trash;exports.Trello=i.Trello;exports.TrendingDown=i.TrendingDown;exports.TrendingUp=i.TrendingUp;exports.Triangle=i.Triangle;exports.TriangleAlert=i.TriangleAlert;exports.Truck=i.Truck;exports.Tv=i.Tv;exports.Twitch=i.Twitch;exports.Twitter=i.Twitter;exports.Type=i.Type;exports.Umbrella=i.Umbrella;exports.Underline=i.Underline;exports.Undo=i.Undo;exports.Unlock=i.Unlock;exports.Uploadfile=i.Uploadfile;exports.UserCheck=i.UserCheck;exports.UserEdit=i.UserEdit;exports.UserMinus=i.UserMinus;exports.UserPlus=i.UserPlus;exports.UserX=i.UserX;exports.Users=i.Users;exports.Video=i.Video;exports.VideoOff=i.VideoOff;exports.Voicemail=i.Voicemail;exports.Volume=i.Volume;exports.Volume1=i.Volume1;exports.Volume2=i.Volume2;exports.VolumeX=i.VolumeX;exports.Watch=i.Watch;exports.WhiteboardView=i.WhiteboardView;exports.Wifi=i.Wifi;exports.WifiOff=i.WifiOff;exports.Wind=i.Wind;exports.WorkStream=i.WorkStream;exports.X=i.X;exports.XCircle=i.XCircle;exports.XOctagon=i.XOctagon;exports.XSquare=i.XSquare;exports.Youtube=i.Youtube;exports.Zap=i.Zap;exports.ZapOff=i.ZapOff;exports.ZoomIn=i.ZoomIn;exports.ZoomOut=i.ZoomOut;exports.ARCHIE_MAC=un;exports.ARCHIE_WEB=fn;exports.AreaChart=ed;exports.ArtifactCard=so;exports.AuditStamp=uc;exports.AutopilotAction=Io;exports.Avatar=pr;exports.BRAND_PROFILES=xn;exports.Badge=qo;exports.Banner=ta;exports.BarChart=Jc;exports.Breadcrumbs=lo;exports.BriefingCard=Xi;exports.BudgetVarianceTable=Vd;exports.BulletChart=dd;exports.Button=Be;exports.COLOR_SCHEMES=_o;exports.Card=Jo;exports.ChartColors=Ae;exports.ChartPAD=Y;exports.ChartSection=qc;exports.Checkbox=go;exports.Chip=uo;exports.ChipStatus=te;exports.CircularProgress=mo;exports.CommentaryBlock=ac;exports.ComparisonToggle=dc;exports.ConversationHeader=Po;exports.CopyButton=Do;exports.CoverPage=bd;exports.DEFAULT_BRAND=Ht;exports.DONUT_COLORS=Xc;exports.DataAccordion=wc;exports.DataTable=Gc;exports.DeltaPill=is;exports.DonutChart=sd;exports.DrillDownRow=Vc;exports.Dropdown=bo;exports.DropdownContent=yo;exports.DropdownItem=jo;exports.DropdownTrigger=vo;exports.EmptyState=rc;exports.ExecutiveSummaryPage=zd;exports.ExportBar=xc;exports.FILE_TYPE_MAP=io;exports.FieldRow=oa;exports.FileIcon=Rr;exports.FinancialTable=Yc;exports.FootnoteList=gc;exports.FootnoteRef=ps;exports.ForecastChart=ld;exports.FullLogo=no;exports.FunnelChart=cd;exports.HeatMap=xd;exports.HorizontalBarChart=od;exports.Input=wo;exports.KpiObservations=Uo;exports.KpiResultsTable=wd;exports.KpiStatCard=Ko;exports.KpiStatStrip=Md;exports.KpiStrip=Ki;exports.KpiWheel=Wd;exports.LineChart=Go;exports.LoadingSpinner=Nl;exports.LogoA=Mr;exports.MARTHA_MAC=mn;exports.MARTHA_WEB=gn;exports.MessageBubble=So;exports.MetricCard=Zi;exports.Modal=Eo;exports.NumberInput=ra;exports.PLATFORM_TOKENS=Wt;exports.PasswordField=ea;exports.PeriodSelector=lc;exports.PivotTable=Zc;exports.PlatformProvider=hn;exports.ProgressBar=ko;exports.RangeInput=No;exports.ReportBanner=ec;exports.ReportHeader=Ui;exports.ReportPage=_c;exports.ReportSection=nc;exports.Select=Qo;exports.SettingsNav=aa;exports.SettingsSectionCard=na;exports.SidebarItem=zo;exports.SignatureA=Ar;exports.SparklineCell=us;exports.StackedBarChart=sa;exports.StatusIndicator=$r;exports.StatusMessage=Bo;exports.StatusPill=ds;exports.Tabs=gi;exports.TabsContent=Mo;exports.TabsList=Lo;exports.TabsTrigger=$o;exports.Tag=Ie;exports.TextArea=Ao;exports.Timestamp=Ro;exports.Toast=he;exports.ToastContainer=Ri;exports.Toggle=Fo;exports.Tooltip=Nc;exports.TooltipContent=Wo;exports.TooltipProvider=kc;exports.TooltipTrigger=zc;exports.Typography=Ye;exports.UIRenderer=la;exports.VarianceBand=tc;exports.WaterfallChart=rd;exports.cn=y;exports.getFileExtension=co;exports.getFileTypeConfig=po;exports.hexToRgba=Re;exports.resolveChartColors=le;exports.showToast=Fi;exports.useBrand=Ot;exports.useDropdown=xr;exports.usePlatform=_t;exports.usePlatformTokens=Gt;exports.useTokens=Ut;
|
|
128
|
+
`;function X0({printHeader:r,printFooter:t,children:o,className:a}){return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:Z0}),r&&e.jsx("div",{className:"hidden print:block",children:r}),e.jsx("div",{className:`report-page ${a??""}`,style:{display:"flex",flexDirection:"column",gap:24},children:o}),t&&e.jsx("div",{className:"hidden print:block",children:t})]})}const q0={KpiStrip:Xd,MetricCard:Jd,StatCard:r0,FinancialTable:o0,DataTable:n0,PivotTable:l0,ReportHeader:i0,ReportToolbar:c0,FilterBar:d0,BriefingCard:p0,SectionCard:x0,EntityCard:u0,Stack:g0,Grid:m0,Banner:h0,StatusPill:b0,EmptyState:v0,ProgressBar:y0,WorkstreamCard:j0,TaskCard:C0,ApprovalCard:S0,DeltaPill:k0,VarianceBand:T0,CommentaryBlock:$0,ReportSection:L0,ReportBanner:R0,PeriodSelector:B0,ComparisonToggle:I0,ExportBar:W0,AuditStamp:P0,FootnoteList:E0,FootnoteRef:V0,SparklineCell:_0,StackedBarChart:la,DrillDownRow:K0,ReportPage:X0};class J0 extends j.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,o){console.warn("[UIRenderer] block render error:",t,o)}render(){return this.state.error?e.jsxs("div",{style:{padding:"8px 12px",borderRadius:6,background:"#fef2f2",border:"1px solid #fecaca",fontSize:12,color:"#991b1b"},children:["Render error: ",this.state.error.message]}):this.props.children}}function Q0({block:r}){const t=q0[r.component];if(!t)return e.jsxs("div",{style:{padding:"8px 12px",borderRadius:6,background:"#f9fafb",border:"1px solid #e5e7eb",fontSize:12,color:"#6b7280"},children:["Unknown component: ",e.jsx("code",{children:r.component})]});const o=r.layout==="aside"?"w-72 shrink-0":r.layout==="inline"?"inline-flex":"w-full",a=r.children&&r.children.length>0?e.jsx(ia,{blocks:r.children}):void 0;return e.jsx(J0,{children:e.jsx("div",{className:o,children:j.createElement(t,r.props,a)})})}function ia({blocks:r}){return!r||r.length===0?null:e.jsx("div",{className:"flex flex-col gap-3 w-full",children:r.map(t=>e.jsx(Q0,{block:t},t.id))})}exports.Activity=i.Activity;exports.Airplay=i.Airplay;exports.AlertCircle=i.AlertCircle;exports.AlertOctagon=i.AlertOctagon;exports.AlignCenter=i.AlignCenter;exports.AlignJustify=i.AlignJustify;exports.AlignLeft=i.AlignLeft;exports.AlignRight=i.AlignRight;exports.Anchor=i.Anchor;exports.Aperture=i.Aperture;exports.Archive=i.Archive;exports.ArrowDown2=i.ArrowDown2;exports.ArrowDownCircle=i.ArrowDownCircle;exports.ArrowDownLeft=i.ArrowDownLeft;exports.ArrowDownRight=i.ArrowDownRight;exports.ArrowLeftCircle=i.ArrowLeftCircle;exports.ArrowRightCircle=i.ArrowRightCircle;exports.ArrowUp=i.ArrowUp;exports.ArrowUpCircle=i.ArrowUpCircle;exports.ArrowUpLeft=i.ArrowUpLeft;exports.ArrowUpRight=i.ArrowUpRight;exports.AtSign=i.AtSign;exports.Award=i.Award;exports.BarChart2=i.BarChart2;exports.Battery=i.Battery;exports.BatteryCharging=i.BatteryCharging;exports.BellOff=i.BellOff;exports.Bluetooth=i.Bluetooth;exports.Bold=i.Bold;exports.Book=i.Book;exports.BookOpen=i.BookOpen;exports.Bookmark=i.Bookmark;exports.Box=i.Box;exports.Briefcase=i.Briefcase;exports.BrushCleanup=i.BrushCleanup;exports.Bug=i.Bug;exports.Calendar=i.Calendar;exports.Camera=i.Camera;exports.CameraOff=i.CameraOff;exports.Cast=i.Cast;exports.Check=i.Check;exports.CheckCircle=i.CheckCircle;exports.CheckSquare=i.CheckSquare;exports.ChevronDown=i.ChevronDown;exports.ChevronLeft=i.ChevronLeft;exports.ChevronRight=i.ChevronRight;exports.ChevronUp=i.ChevronUp;exports.ChevronsDown=i.ChevronsDown;exports.ChevronsLeft=i.ChevronsLeft;exports.ChevronsRight=i.ChevronsRight;exports.ChevronsUp=i.ChevronsUp;exports.Chrome=i.Chrome;exports.Circle=i.Circle;exports.Clipboard=i.Clipboard;exports.ClockHistory=i.ClockHistory;exports.Cloud=i.Cloud;exports.CloudDrizzle=i.CloudDrizzle;exports.CloudLightning=i.CloudLightning;exports.CloudOff=i.CloudOff;exports.CloudRain=i.CloudRain;exports.CloudSnow=i.CloudSnow;exports.Code=i.Code;exports.Codepen=i.Codepen;exports.Codesandbox=i.Codesandbox;exports.Coffee=i.Coffee;exports.Columns=i.Columns;exports.Command=i.Command;exports.Compass=i.Compass;exports.Component=i.Component;exports.CornerDownLeft=i.CornerDownLeft;exports.CornerDownRight=i.CornerDownRight;exports.CornerLeftDown=i.CornerLeftDown;exports.CornerLeftUp=i.CornerLeftUp;exports.CornerRightDown=i.CornerRightDown;exports.CornerRightUp=i.CornerRightUp;exports.CornerUpLeft=i.CornerUpLeft;exports.CornerUpRight=i.CornerUpRight;exports.Cpu=i.Cpu;exports.CreditCard=i.CreditCard;exports.Crop=i.Crop;exports.Crosshair=i.Crosshair;exports.Database=i.Database;exports.Delete=i.Delete;exports.Disc=i.Disc;exports.Divide=i.Divide;exports.DivideCircle=i.DivideCircle;exports.DivideSquare=i.DivideSquare;exports.DollarSign=i.DollarSign;exports.Download=i.Download;exports.DownloadCloud=i.DownloadCloud;exports.Dribbble=i.Dribbble;exports.Droplet=i.Droplet;exports.Dumbell=i.Dumbell;exports.Edit2=i.Edit2;exports.Edit3=i.Edit3;exports.Eye=i.Eye;exports.EyeOff=i.EyeOff;exports.Facebook=i.Facebook;exports.FastForward=i.FastForward;exports.Feather=i.Feather;exports.Figma=i.Figma;exports.FileMinus=i.FileMinus;exports.FilePlus=i.FilePlus;exports.FileText=i.FileText;exports.Film=i.Film;exports.Filter=i.Filter;exports.Filter1=i.Filter1;exports.Flag=i.Flag;exports.Folder=i.Folder;exports.FolderMinus=i.FolderMinus;exports.FolderPlus=i.FolderPlus;exports.Framer=i.Framer;exports.Frown=i.Frown;exports.GalleryView=i.GalleryView;exports.Gauge=i.Gauge;exports.Gift=i.Gift;exports.GitBranch=i.GitBranch;exports.GitCommit=i.GitCommit;exports.GitMerge=i.GitMerge;exports.GitPullRequest=i.GitPullRequest;exports.Github=i.Github;exports.Gitlab=i.Gitlab;exports.Globe=i.Globe;exports.Grid=i.Grid;exports.Group1=i.Group1;exports.Hand=i.Hand;exports.HardDrive=i.HardDrive;exports.Hash=i.Hash;exports.Headphones=i.Headphones;exports.HeightSize=i.HeightSize;exports.Hexagon=i.Hexagon;exports.Home=i.Home;exports.Home2=i.Home2;exports.Image=i.Image;exports.Inbox=i.Inbox;exports.Info=i.Info;exports.Instagram=i.Instagram;exports.Invite=i.Invite;exports.Italic=i.Italic;exports.KanbanView=i.KanbanView;exports.Key=i.Key;exports.Layers=i.Layers;exports.Layout=i.Layout;exports.LifeBuoy=i.LifeBuoy;exports.Link=i.Link;exports.Link2=i.Link2;exports.Linkedin=i.Linkedin;exports.List=i.List;exports.ListView=i.ListView;exports.Loader=i.Loader;exports.Lock=i.Lock;exports.LogIn=i.LogIn;exports.Mail=i.Mail;exports.Map=i.Map;exports.MapPin=i.MapPin;exports.Maximize=i.Maximize;exports.Maximize2=i.Maximize2;exports.Meh=i.Meh;exports.MessageCircle=i.MessageCircle;exports.MessageSquare=i.MessageSquare;exports.Mic=i.Mic;exports.MicOff=i.MicOff;exports.Minimize=i.Minimize;exports.Minimize2=i.Minimize2;exports.MinusCircle=i.MinusCircle;exports.MinusSquare=i.MinusSquare;exports.Monitor=i.Monitor;exports.Moon=i.Moon;exports.MoreVertical=i.MoreVertical;exports.MousePointer=i.MousePointer;exports.Move=i.Move;exports.Music=i.Music;exports.Navigation=i.Navigation;exports.Navigation2=i.Navigation2;exports.NewChat=i.NewChat;exports.Octagon=i.Octagon;exports.Package=i.Package;exports.PaperPlane1=i.PaperPlane1;exports.Paperclip=i.Paperclip;exports.Pause=i.Pause;exports.PauseCircle=i.PauseCircle;exports.Pdf=i.Pdf;exports.PenTool=i.PenTool;exports.Percent=i.Percent;exports.Phone=i.Phone;exports.PhoneCall=i.PhoneCall;exports.PhoneForwarded=i.PhoneForwarded;exports.PhoneIncoming=i.PhoneIncoming;exports.PhoneMissed=i.PhoneMissed;exports.PhoneOff=i.PhoneOff;exports.PhoneOutgoing=i.PhoneOutgoing;exports.Pin=i.Pin;exports.Play=i.Play;exports.PlayCircle=i.PlayCircle;exports.Plug21=i.Plug21;exports.Plus=i.Plus;exports.PlusCircle=i.PlusCircle;exports.PlusSquare=i.PlusSquare;exports.Pocket=i.Pocket;exports.Power=i.Power;exports.Printer=i.Printer;exports.Radio=i.Radio;exports.Redo=i.Redo;exports.RefreshCcw=i.RefreshCcw;exports.RefreshCw=i.RefreshCw;exports.Repeat=i.Repeat;exports.Rewind=i.Rewind;exports.RotateCcw=i.RotateCcw;exports.RotateCw=i.RotateCw;exports.Rss=i.Rss;exports.Save=i.Save;exports.Scissors=i.Scissors;exports.Search=i.Search;exports.Send=i.Send;exports.Server=i.Server;exports.Settings=i.Settings;exports.Share=i.Share;exports.Share2=i.Share2;exports.Shield=i.Shield;exports.ShieldOff=i.ShieldOff;exports.ShoppingBag=i.ShoppingBag;exports.ShoppingCart=i.ShoppingCart;exports.Shuffle=i.Shuffle;exports.Sidebar=i.Sidebar;exports.SkipBack=i.SkipBack;exports.SkipForward=i.SkipForward;exports.Slack=i.Slack;exports.Slash=i.Slash;exports.Sliders=i.Sliders;exports.Smartphone=i.Smartphone;exports.Smile=i.Smile;exports.Sort1=i.Sort1;exports.SortDefault=i.SortDefault;exports.SortDown=i.SortDown;exports.SortUp=i.SortUp;exports.Sources=i.Sources;exports.Sparks=i.Sparks;exports.Speaker=i.Speaker;exports.Square=i.Square;exports.Star=i.Star;exports.StopCircle=i.StopCircle;exports.Sun=i.Sun;exports.Sunrise=i.Sunrise;exports.Sunset=i.Sunset;exports.TableView=i.TableView;exports.Tablet=i.Tablet;exports.TagIcon=i.Tag;exports.TagPlus=i.TagPlus;exports.Target=i.Target;exports.Telescope=i.Telescope;exports.Terminal=i.Terminal;exports.TextileIcon=i.TextileIcon;exports.Thermometer=i.Thermometer;exports.ThumbsDown=i.ThumbsDown;exports.ThumbsUp=i.ThumbsUp;exports.ToggleLeft=i.ToggleLeft;exports.ToggleRight=i.ToggleRight;exports.Tool=i.Tool;exports.Trash=i.Trash;exports.Trello=i.Trello;exports.TrendingDown=i.TrendingDown;exports.TrendingUp=i.TrendingUp;exports.Triangle=i.Triangle;exports.TriangleAlert=i.TriangleAlert;exports.Truck=i.Truck;exports.Tv=i.Tv;exports.Twitch=i.Twitch;exports.Twitter=i.Twitter;exports.Type=i.Type;exports.Umbrella=i.Umbrella;exports.Underline=i.Underline;exports.Undo=i.Undo;exports.Unlock=i.Unlock;exports.Uploadfile=i.Uploadfile;exports.UserCheck=i.UserCheck;exports.UserEdit=i.UserEdit;exports.UserMinus=i.UserMinus;exports.UserPlus=i.UserPlus;exports.UserX=i.UserX;exports.Users=i.Users;exports.Video=i.Video;exports.VideoOff=i.VideoOff;exports.Voicemail=i.Voicemail;exports.Volume=i.Volume;exports.Volume1=i.Volume1;exports.Volume2=i.Volume2;exports.VolumeX=i.VolumeX;exports.Watch=i.Watch;exports.WhiteboardView=i.WhiteboardView;exports.Wifi=i.Wifi;exports.WifiOff=i.WifiOff;exports.Wind=i.Wind;exports.WorkStream=i.WorkStream;exports.X=i.X;exports.XCircle=i.XCircle;exports.XOctagon=i.XOctagon;exports.XSquare=i.XSquare;exports.Youtube=i.Youtube;exports.Zap=i.Zap;exports.ZapOff=i.ZapOff;exports.ZoomIn=i.ZoomIn;exports.ZoomOut=i.ZoomOut;exports.ARCHIE_MAC=gn;exports.ARCHIE_WEB=un;exports.AreaChart=rd;exports.ArtifactCard=lo;exports.AuditStamp=gc;exports.AutopilotAction=Do;exports.Avatar=pr;exports.BRAND_PROFILES=fn;exports.Badge=Jo;exports.Banner=oa;exports.BarChart=Qc;exports.Breadcrumbs=io;exports.BriefingCard=qi;exports.BudgetVarianceTable=Hd;exports.BulletChart=pd;exports.Button=Be;exports.COLOR_SCHEMES=Oo;exports.Card=Qo;exports.ChartColors=Ae;exports.ChartPAD=Y;exports.ChartSection=Jc;exports.Checkbox=mo;exports.Chip=go;exports.ChipStatus=te;exports.CircularProgress=ho;exports.CommentaryBlock=nc;exports.ComparisonToggle=pc;exports.ConversationHeader=Eo;exports.CopyButton=Wo;exports.CoverPage=vd;exports.DEFAULT_BRAND=Ht;exports.DONUT_COLORS=qc;exports.DataAccordion=Cc;exports.DataTable=Uc;exports.DeltaPill=cs;exports.DonutChart=ld;exports.DrillDownRow=Hc;exports.Dropdown=vo;exports.DropdownContent=jo;exports.DropdownItem=wo;exports.DropdownTrigger=yo;exports.EmptyState=tc;exports.ExecutiveSummaryPage=Td;exports.ExportBar=fc;exports.FILE_TYPE_MAP=co;exports.FieldRow=aa;exports.FileIcon=Fr;exports.FinancialTable=Kc;exports.FootnoteList=mc;exports.FootnoteRef=xs;exports.ForecastChart=id;exports.FullLogo=so;exports.FunnelChart=dd;exports.HeatMap=fd;exports.HorizontalBarChart=ad;exports.Input=Co;exports.KpiObservations=Yo;exports.KpiResultsTable=Cd;exports.KpiStatCard=Zo;exports.KpiStatStrip=Ad;exports.KpiStrip=Zi;exports.KpiWheel=Pd;exports.LineChart=Uo;exports.LoadingSpinner=zl;exports.LogoA=Ar;exports.MARTHA_MAC=hn;exports.MARTHA_WEB=mn;exports.MessageBubble=ko;exports.MetricCard=Xi;exports.Modal=Vo;exports.NumberInput=ta;exports.PLATFORM_TOKENS=zr;exports.PasswordField=ra;exports.PeriodSelector=ic;exports.PivotTable=Xc;exports.PlatformProvider=bn;exports.ProgressBar=No;exports.RangeInput=zo;exports.ReportBanner=rc;exports.ReportHeader=Yi;exports.ReportPage=Oc;exports.ReportSection=sc;exports.Select=ea;exports.SettingsNav=na;exports.SettingsSectionCard=sa;exports.SidebarItem=To;exports.SignatureA=Rr;exports.SparklineCell=gs;exports.StackedBarChart=la;exports.StatusIndicator=Mr;exports.StatusMessage=Io;exports.StatusPill=ps;exports.Tabs=mi;exports.TabsContent=Ao;exports.TabsList=Lo;exports.TabsTrigger=Mo;exports.Tag=Ie;exports.TextArea=Ro;exports.Timestamp=Fo;exports.Toast=he;exports.ToastContainer=Fi;exports.Toggle=Bo;exports.Tooltip=zc;exports.TooltipContent=Po;exports.TooltipProvider=Nc;exports.TooltipTrigger=Tc;exports.Typography=Ye;exports.UIRenderer=ia;exports.VarianceBand=oc;exports.WaterfallChart=td;exports.cn=y;exports.getFileExtension=po;exports.getFileTypeConfig=xo;exports.hexToRgba=Re;exports.platformCSSVars=_t;exports.resolveChartColors=le;exports.showToast=Bi;exports.useBrand=Gt;exports.useDropdown=xr;exports.usePlatform=Ot;exports.usePlatformTokens=Ut;exports.useTokens=Yt;
|
|
129
129
|
//# sourceMappingURL=index.cjs.map
|