@fabio.caffarello/react-design-system 1.19.0 → 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +143 -143
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3381 -3354
- package/dist/index.js.map +1 -1
- package/dist/react-design-system.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Lo=Object.defineProperty,Fo=Object.defineProperties;var _o=Object.getOwnPropertyDescriptors;var er=Object.getOwnPropertySymbols;var un=Object.prototype.hasOwnProperty,fn=Object.prototype.propertyIsEnumerable;var Br=(e,t,r)=>t in e?Lo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,R=(e,t)=>{for(var r in t||(t={}))un.call(t,r)&&Br(e,r,t[r]);if(er)for(var r of er(t))fn.call(t,r)&&Br(e,r,t[r]);return e},P=(e,t)=>Fo(e,_o(t));var O=(e,t)=>{var r={};for(var s in e)un.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&er)for(var s of er(e))t.indexOf(s)<0&&fn.call(e,s)&&(r[s]=e[s]);return r};var mn=(e,t,r)=>Br(e,typeof t!="symbol"?t+"":t,r);var tr=(e,t,r)=>new Promise((s,a)=>{var o=u=>{try{c(r.next(u))}catch(d){a(d)}},i=u=>{try{c(r.throw(u))}catch(d){a(d)}},c=u=>u.done?s(u.value):Promise.resolve(u.value).then(o,i);c((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),Ue=require("react-dom"),Je={icon:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},text:{xs:"text-xs",sm:"text-sm",base:"text-base"},spacing:{itemPaddingX:"px-4",itemPaddingY:"py-2",nestedIndent:"pl-6",nestedIndentLevel2:"pl-10",nestedIndentLevel3:"pl-14",groupTitlePadding:"px-4 py-2",iconMargin:"mr-3"},colors:{active:{bg:"bg-surface-brand-muted",text:"text-fg-brand-emphasis",border:"border-line-brand"},inactive:{text:"text-fg-secondary",hover:"hover:bg-surface-hover hover:text-fg-primary"},groupTitle:"text-fg-tertiary"},chevron:{size:"h-3 w-3",color:"text-fg-quaternary"},navigation:{width:{default:"56px",compact:"48px",expanded:"200px"},background:{default:"#fafafa",hover:"#f5f5f5"}},split:{transition:"transition-all duration-300",collapsedWidth:"0px"},content:{scrollbar:{width:"thin",color:{thumb:"#cbd5e1",track:"#f1f5f9"}}}};function Po(e){return e<=0?Je.spacing.itemPaddingX:e===1?Je.spacing.nestedIndent:e===2?Je.spacing.nestedIndentLevel2:e===3?Je.spacing.nestedIndentLevel3:`pl-${4+e*4}`}class pe{static create(t){const r=t*this.BASE_UNIT,s=r/16;return{value:r,rem:`${s}rem`,px:`${r}px`,tailwind:this.getTailwindClass(t)}}static getTailwindClass(t){return{0:"0",.5:"0.5",1:"1",1.5:"1.5",2:"2",2.5:"2.5",3:"3",3.5:"3.5",4:"4",5:"5",6:"6",8:"8",10:"10",12:"12",16:"16",20:"20",24:"24",32:"32",40:"40",48:"48",64:"64",80:"80",96:"96"}[t]||String(t)}}mn(pe,"BASE_UNIT",4);const gr={none:pe.create(0),"0.5":pe.create(.5),xs:pe.create(1),"1.5":pe.create(1.5),sm:pe.create(2),"2.5":pe.create(2.5),md:pe.create(3),"3.5":pe.create(3.5),base:pe.create(4),lg:pe.create(6),xl:pe.create(8),"2xl":pe.create(10),"3xl":pe.create(12),"4xl":pe.create(16),"5xl":pe.create(20),"6xl":pe.create(24)};function zo(e){return gr[e]}function T(e,t="p"){const s=gr[e].tailwind;return`${{p:"p",m:"m",px:"px",mx:"mx",py:"py",my:"my",pt:"pt",mt:"mt",pr:"pr",mr:"mr",pb:"pb",mb:"mb",pl:"pl",ml:"ml",gap:"gap","gap-x":"gap-x","gap-y":"gap-y","space-y":"space-y"}[t]}-${s}`}class fe{static createFontSize(t){const s={"2xs":{px:10,tailwind:"text-2xs"},xs:{px:12,tailwind:"text-xs"},sm:{px:14,tailwind:"text-sm"},base:{px:16,tailwind:"text-base"},lg:{px:18,tailwind:"text-lg"},xl:{px:20,tailwind:"text-xl"},"2xl":{px:24,tailwind:"text-2xl"},"3xl":{px:30,tailwind:"text-3xl"},"4xl":{px:36,tailwind:"text-4xl"},"5xl":{px:48,tailwind:"text-5xl"},"6xl":{px:60,tailwind:"text-6xl"}}[t];return{value:s.px,rem:`${s.px/16}rem`,px:`${s.px}px`,tailwind:s.tailwind}}static createLineHeight(t){const s={none:{value:1,tailwind:"leading-none"},tight:{value:1.25,tailwind:"leading-tight"},snug:{value:1.375,tailwind:"leading-snug"},normal:{value:1.5,tailwind:"leading-normal"},relaxed:{value:1.625,tailwind:"leading-relaxed"},loose:{value:2,tailwind:"leading-loose"}}[t];return{value:s.value,tailwind:s.tailwind}}static createFontWeight(t){const s={light:{value:300,tailwind:"font-light"},normal:{value:400,tailwind:"font-normal"},medium:{value:500,tailwind:"font-medium"},semibold:{value:600,tailwind:"font-semibold"},bold:{value:700,tailwind:"font-bold"}}[t];return{value:s.value,tailwind:s.tailwind}}static create(t,r="normal",s="normal"){return{fontSize:this.createFontSize(t),lineHeight:this.createLineHeight(r),fontWeight:this.createFontWeight(s)}}}const Oo={sans:{name:"sans",stack:'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif',tailwind:"font-sans"},serif:{name:"serif",stack:'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',tailwind:"font-serif"},mono:{name:"mono",stack:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',tailwind:"font-mono"}},Vo={light:fe.createFontWeight("light"),normal:fe.createFontWeight("normal"),medium:fe.createFontWeight("medium"),semibold:fe.createFontWeight("semibold"),bold:fe.createFontWeight("bold")},ht={h1:fe.create("4xl","tight","bold"),h2:fe.create("3xl","tight","bold"),h3:fe.create("2xl","snug","semibold"),h4:fe.create("xl","snug","semibold"),h5:fe.create("lg","normal","medium"),h6:fe.create("base","normal","medium"),body:fe.create("base","relaxed","normal"),bodySmall:fe.create("sm","relaxed","normal"),bodyLarge:fe.create("lg","relaxed","normal"),label:fe.create("sm","normal","medium"),caption:fe.create("xs","normal","normal"),button:fe.create("base","normal","medium")};function Wo(e){return ht[e]}function ce(e){const t=ht[e];return`${t.fontSize.tailwind} ${t.lineHeight.tailwind} ${t.fontWeight.tailwind}`}function re(e){return ht[e].fontSize.tailwind}function ve(e){return fe.createFontSize(e).tailwind}function Fe(e){return ht[e].fontWeight.tailwind}function Et(e){return fe.createFontWeight(e).tailwind}function Ho(e){return ht[e].lineHeight.tailwind}const Bo=[50,100,200,300,400,500,600,700,800,900,950];function E(e,t,r){const s=Uo(e),a=qo(e);return{hex:e,rgb:s,hsl:a,cssVar:`var(--color-${t}-${r})`,tailwind:`${t}-${r}`}}function Uo(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?`${parseInt(t[1],16)}, ${parseInt(t[2],16)}, ${parseInt(t[3],16)}`:"0, 0, 0"}function qo(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!t)return"0, 0%, 0%";const r=parseInt(t[1],16)/255,s=parseInt(t[2],16)/255,a=parseInt(t[3],16)/255,o=Math.max(r,s,a),i=Math.min(r,s,a);let c=0,u=0;const d=(o+i)/2;if(o!==i){const f=o-i;switch(u=d>.5?f/(2-o-i):f/(o+i),o){case r:c=((s-a)/f+(s<a?6:0))/6;break;case s:c=((a-r)/f+2)/6;break;case a:c=((r-s)/f+4)/6;break}}return`${Math.round(c*360)}, ${Math.round(u*100)}%, ${Math.round(d*100)}%`}const Ze={50:E("#eef2ff","indigo",50),100:E("#e0e7ff","indigo",100),200:E("#c7d2fe","indigo",200),300:E("#a5b4fc","indigo",300),400:E("#818cf8","indigo",400),500:E("#6366f1","indigo",500),600:E("#4f46e5","indigo",600),700:E("#4338ca","indigo",700),800:E("#3730a3","indigo",800),900:E("#312e81","indigo",900),950:E("#1e1b4b","indigo",950)},Qe={50:E("#f5f3ff","violet",50),100:E("#ede9fe","violet",100),200:E("#ddd6fe","violet",200),300:E("#c4b5fd","violet",300),400:E("#a78bfa","violet",400),500:E("#8b5cf6","violet",500),600:E("#7c3aed","violet",600),700:E("#6d28d9","violet",700),800:E("#5b21b6","violet",800),900:E("#4c1d95","violet",900),950:E("#2e1065","violet",950)},et={50:E("#ecfeff","cyan",50),100:E("#cffafe","cyan",100),200:E("#a5f3fc","cyan",200),300:E("#67e8f9","cyan",300),400:E("#22d3ee","cyan",400),500:E("#06b6d4","cyan",500),600:E("#0891b2","cyan",600),700:E("#0e7490","cyan",700),800:E("#155e75","cyan",800),900:E("#164e63","cyan",900),950:E("#083344","cyan",950)},tt={50:E("#f8fafc","slate",50),100:E("#f1f5f9","slate",100),200:E("#e2e8f0","slate",200),300:E("#cbd5e1","slate",300),400:E("#94a3b8","slate",400),500:E("#64748b","slate",500),600:E("#475569","slate",600),700:E("#334155","slate",700),800:E("#1e293b","slate",800),900:E("#0f172a","slate",900),950:E("#020617","slate",950)},In={50:E("#f9fafb","gray",50),100:E("#f3f4f6","gray",100),200:E("#e5e7eb","gray",200),300:E("#d1d5db","gray",300),400:E("#9ca3af","gray",400),500:E("#6b7280","gray",500),600:E("#4b5563","gray",600),700:E("#374151","gray",700),800:E("#1f2937","gray",800),900:E("#111827","gray",900),950:E("#030712","gray",950)},rt={50:E("#ecfdf5","emerald",50),100:E("#d1fae5","emerald",100),200:E("#a7f3d0","emerald",200),300:E("#6ee7b7","emerald",300),400:E("#34d399","emerald",400),500:E("#10b981","emerald",500),600:E("#059669","emerald",600),700:E("#047857","emerald",700),800:E("#065f46","emerald",800),900:E("#064e3b","emerald",900),950:E("#022c22","emerald",950)},Dn={50:E("#f0fdf4","green",50),100:E("#dcfce7","green",100),200:E("#bbf7d0","green",200),300:E("#86efac","green",300),400:E("#4ade80","green",400),500:E("#22c55e","green",500),600:E("#16a34a","green",600),700:E("#15803d","green",700),800:E("#166534","green",800),900:E("#14532d","green",900),950:E("#052e16","green",950)},st={50:E("#fffbeb","amber",50),100:E("#fef3c7","amber",100),200:E("#fde68a","amber",200),300:E("#fcd34d","amber",300),400:E("#fbbf24","amber",400),500:E("#f59e0b","amber",500),600:E("#d97706","amber",600),700:E("#b45309","amber",700),800:E("#92400e","amber",800),900:E("#78350f","amber",900),950:E("#451a03","amber",950)},Ln={50:E("#fefce8","yellow",50),100:E("#fef9c3","yellow",100),200:E("#fef08a","yellow",200),300:E("#fde047","yellow",300),400:E("#facc15","yellow",400),500:E("#eab308","yellow",500),600:E("#ca8a04","yellow",600),700:E("#a16207","yellow",700),800:E("#854d0e","yellow",800),900:E("#713f12","yellow",900),950:E("#422006","yellow",950)},Fn={50:E("#fff7ed","orange",50),100:E("#ffedd5","orange",100),200:E("#fed7aa","orange",200),300:E("#fdba74","orange",300),400:E("#fb923c","orange",400),500:E("#f97316","orange",500),600:E("#ea580c","orange",600),700:E("#c2410c","orange",700),800:E("#9a3412","orange",800),900:E("#7c2d12","orange",900),950:E("#431407","orange",950)},nt={50:E("#fff1f2","rose",50),100:E("#ffe4e6","rose",100),200:E("#fecdd3","rose",200),300:E("#fda4af","rose",300),400:E("#fb7185","rose",400),500:E("#f43f5e","rose",500),600:E("#e11d48","rose",600),700:E("#be123c","rose",700),800:E("#9f1239","rose",800),900:E("#881337","rose",900),950:E("#4c0519","rose",950)},_n={50:E("#fef2f2","red",50),100:E("#fee2e2","red",100),200:E("#fecaca","red",200),300:E("#fca5a5","red",300),400:E("#f87171","red",400),500:E("#ef4444","red",500),600:E("#dc2626","red",600),700:E("#b91c1c","red",700),800:E("#991b1b","red",800),900:E("#7f1d1d","red",900),950:E("#450a0a","red",950)},at={50:E("#f0f9ff","sky",50),100:E("#e0f2fe","sky",100),200:E("#bae6fd","sky",200),300:E("#7dd3fc","sky",300),400:E("#38bdf8","sky",400),500:E("#0ea5e9","sky",500),600:E("#0284c7","sky",600),700:E("#0369a1","sky",700),800:E("#075985","sky",800),900:E("#0c4a6e","sky",900),950:E("#082f49","sky",950)},Pn={50:E("#eff6ff","blue",50),100:E("#dbeafe","blue",100),200:E("#bfdbfe","blue",200),300:E("#93c5fd","blue",300),400:E("#60a5fa","blue",400),500:E("#3b82f6","blue",500),600:E("#2563eb","blue",600),700:E("#1d4ed8","blue",700),800:E("#1e40af","blue",800),900:E("#1e3a8a","blue",900),950:E("#172554","blue",950)},zn={50:E("#fdf4ff","fuchsia",50),100:E("#fae8ff","fuchsia",100),200:E("#f5d0fe","fuchsia",200),300:E("#f0abfc","fuchsia",300),400:E("#e879f9","fuchsia",400),500:E("#d946ef","fuchsia",500),600:E("#c026d3","fuchsia",600),700:E("#a21caf","fuchsia",700),800:E("#86198f","fuchsia",800),900:E("#701a75","fuchsia",900),950:E("#4a044e","fuchsia",950)},On={50:E("#fdf2f8","pink",50),100:E("#fce7f3","pink",100),200:E("#fbcfe8","pink",200),300:E("#f9a8d4","pink",300),400:E("#f472b6","pink",400),500:E("#ec4899","pink",500),600:E("#db2777","pink",600),700:E("#be185d","pink",700),800:E("#9d174d","pink",800),900:E("#831843","pink",900),950:E("#500724","pink",950)},Vn={50:E("#faf5ff","purple",50),100:E("#f3e8ff","purple",100),200:E("#e9d5ff","purple",200),300:E("#d8b4fe","purple",300),400:E("#c084fc","purple",400),500:E("#a855f7","purple",500),600:E("#9333ea","purple",600),700:E("#7e22ce","purple",700),800:E("#6b21a8","purple",800),900:E("#581c87","purple",900),950:E("#3b0764","purple",950)},Wn={50:E("#f0fdfa","teal",50),100:E("#ccfbf1","teal",100),200:E("#99f6e4","teal",200),300:E("#5eead4","teal",300),400:E("#2dd4bf","teal",400),500:E("#14b8a6","teal",500),600:E("#0d9488","teal",600),700:E("#0f766e","teal",700),800:E("#115e59","teal",800),900:E("#134e4a","teal",900),950:E("#042f2e","teal",950)},Hn={50:E("#f7fee7","lime",50),100:E("#ecfccb","lime",100),200:E("#d9f99d","lime",200),300:E("#bef264","lime",300),400:E("#a3e635","lime",400),500:E("#84cc16","lime",500),600:E("#65a30d","lime",600),700:E("#4d7c0f","lime",700),800:E("#3f6212","lime",800),900:E("#365314","lime",900),950:E("#1a2e05","lime",950)},cs={indigo:Ze,violet:Qe,cyan:et,slate:tt,gray:In,emerald:rt,green:Dn,amber:st,yellow:Ln,orange:Fn,rose:nt,red:_n,sky:at,blue:Pn,fuchsia:zn,pink:On,purple:Vn,teal:Wn,lime:Hn};function At(e,t){return cs[e][t]}function Go(e){return cs[e]}const Ut={primary:{light:Ze[400],DEFAULT:Ze[500],dark:Ze[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},secondary:{light:Qe[400],DEFAULT:Qe[500],dark:Qe[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{light:et[400],DEFAULT:et[500],dark:et[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},success:{light:rt[400],DEFAULT:rt[500],dark:rt[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},warning:{light:st[400],DEFAULT:st[500],dark:st[600],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{light:nt[400],DEFAULT:nt[500],dark:nt[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},info:{light:at[400],DEFAULT:at[500],dark:at[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:tt[100],DEFAULT:tt[500],dark:tt[700],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},xr={primary:{light:Ze[500],DEFAULT:Ze[400],dark:Ze[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},secondary:{light:Qe[500],DEFAULT:Qe[400],dark:Qe[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{light:et[500],DEFAULT:et[400],dark:et[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},success:{light:rt[500],DEFAULT:rt[400],dark:rt[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},warning:{light:st[500],DEFAULT:st[400],dark:st[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{light:nt[500],DEFAULT:nt[400],dark:nt[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},info:{light:at[500],DEFAULT:at[400],dark:at[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:tt[700],DEFAULT:tt[400],dark:tt[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},Ko=Ut;function Wt(e,t="DEFAULT",r="light"){return(r==="dark"?xr:Ut)[e][t]}function Yo(e,t="light"){return(t==="dark"?xr:Ut)[e]}function Xo(e,t,r={}){const{format:s="hex",opacity:a}=r,o=At(e,t);let i;switch(s){case"rgb":i=a!==void 0?`rgba(${o.rgb}, ${a})`:`rgb(${o.rgb})`;break;case"hsl":i=a!==void 0?`hsla(${o.hsl}, ${a})`:`hsl(${o.hsl})`;break;case"cssVar":i=o.cssVar;break;case"tailwind":i=o.tailwind;break;case"hex":default:i=o.hex}return i}function Jo(e,t="DEFAULT",r={}){const{format:s="hex",opacity:a}=r,o=Wt(e,t);let i;switch(s){case"rgb":i=a!==void 0?`rgba(${o.rgb}, ${a})`:`rgb(${o.rgb})`;break;case"hsl":i=a!==void 0?`hsla(${o.hsl}, ${a})`:`hsl(${o.hsl})`;break;case"cssVar":i=o.cssVar;break;case"tailwind":i=o.tailwind;break;case"hex":default:i=o.hex}return i}function Zo(e,t,r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,c=At(e,t),d=[`${s}-${c.tailwind}`];return a&&d.push(`hover:${s}-${c.tailwind}`),o&&d.push(`focus:${s}-${c.tailwind}`),i&&d.push(`active:${s}-${c.tailwind}`),d.join(" ")}function Qo(e,t="DEFAULT",r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,c=Wt(e,t),d=[`${s}-${c.tailwind}`];if(a){const f=Wt(e,t==="DEFAULT"?"dark":"DEFAULT");d.push(`hover:${s}-${f.tailwind}`)}if(o&&d.push(`focus:${s}-${c.tailwind}`),i){const f=Wt(e,"dark");d.push(`active:${s}-${f.tailwind}`)}return d.join(" ")}function ei(e,t,r="bg"){const s=At(e,t);return`hover:${r}-${s.tailwind}`}function ti(e,t,r="border"){const s=At(e,t);return`focus:${r}-${s.tailwind}`}function ri(e,t){return`focus:ring-${At(e,t).tailwind}`}function si(e,t){return`rgba(${e.rgb}, ${t})`}function Bn(e){const t=ts(e);return t?.299*t[0]+.587*t[1]+.114*t[2]>128:!0}function ni(e){return Bn(e)?"#000000":"#ffffff"}function ts(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null}function ds(e,t,r=.5){const s=ts(e),a=ts(t);if(!s||!a)return e;const o=Math.round(s[0]*(1-r)+a[0]*r),i=Math.round(s[1]*(1-r)+a[1]*r),c=Math.round(s[2]*(1-r)+a[2]*r);return`#${((1<<24)+(o<<16)+(i<<8)+c).toString(16).slice(1)}`}function ai(e,t){return ds(e,"#ffffff",t/100)}function oi(e,t){return ds(e,"#000000",t/100)}const ii={primary:{name:"indigo",light:400,default:500,dark:600},secondary:{name:"violet",light:400,default:500,dark:600},accent:{name:"cyan",light:400,default:500,dark:600}};class Nt{static create(t){const s={sm:{minWidth:640,tailwind:"sm"},md:{minWidth:768,tailwind:"md"},lg:{minWidth:1024,tailwind:"lg"},xl:{minWidth:1280,tailwind:"xl"},"2xl":{minWidth:1536,tailwind:"2xl"}}[t];return{name:t,minWidth:s.minWidth,px:`${s.minWidth}px`,rem:`${s.minWidth/16}rem`,tailwind:s.tailwind}}}const vr={sm:Nt.create("sm"),md:Nt.create("md"),lg:Nt.create("lg"),xl:Nt.create("xl"),"2xl":Nt.create("2xl")};function li(e){return vr[e]}function ci(e,t="min"){const r=vr[e];return`@media (${t==="min"?"min-width":"max-width"}: ${r.px})`}function Un(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Un(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function qn(){for(var e,t,r=0,s="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Un(e))&&(s&&(s+=" "),s+=t);return s}const di=(e,t)=>{const r=new Array(e.length+t.length);for(let s=0;s<e.length;s++)r[s]=e[s];for(let s=0;s<t.length;s++)r[e.length+s]=t[s];return r},ui=(e,t)=>({classGroupId:e,validator:t}),Gn=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),lr="-",pn=[],fi="arbitrary..",mi=e=>{const t=hi(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return pi(i);const c=i.split(lr),u=c[0]===""&&c.length>1?1:0;return Kn(c,u,t)},getConflictingClassGroupIds:(i,c)=>{if(c){const u=s[i],d=r[i];return u?d?di(d,u):u:d||pn}return r[i]||pn}}},Kn=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const a=e[t],o=r.nextPart.get(a);if(o){const d=Kn(e,t+1,o);if(d)return d}const i=r.validators;if(i===null)return;const c=t===0?e.join(lr):e.slice(t).join(lr),u=i.length;for(let d=0;d<u;d++){const f=i[d];if(f.validator(c))return f.classGroupId}},pi=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),s=t.slice(0,r);return s?fi+s:void 0})(),hi=e=>{const{theme:t,classGroups:r}=e;return bi(r,t)},bi=(e,t)=>{const r=Gn();for(const s in e){const a=e[s];us(a,r,s,t)}return r},us=(e,t,r,s)=>{const a=e.length;for(let o=0;o<a;o++){const i=e[o];gi(i,t,r,s)}},gi=(e,t,r,s)=>{if(typeof e=="string"){xi(e,t,r);return}if(typeof e=="function"){vi(e,t,r,s);return}yi(e,t,r,s)},xi=(e,t,r)=>{const s=e===""?t:Yn(t,e);s.classGroupId=r},vi=(e,t,r,s)=>{if(wi(e)){us(e(s),t,r,s);return}t.validators===null&&(t.validators=[]),t.validators.push(ui(r,e))},yi=(e,t,r,s)=>{const a=Object.entries(e),o=a.length;for(let i=0;i<o;i++){const[c,u]=a[i];us(u,Yn(t,c),r,s)}},Yn=(e,t)=>{let r=e;const s=t.split(lr),a=s.length;for(let o=0;o<a;o++){const i=s[o];let c=r.nextPart.get(i);c||(c=Gn(),r.nextPart.set(i,c)),r=c}return r},wi=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,ki=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),s=Object.create(null);const a=(o,i)=>{r[o]=i,t++,t>e&&(t=0,s=r,r=Object.create(null))};return{get(o){let i=r[o];if(i!==void 0)return i;if((i=s[o])!==void 0)return a(o,i),i},set(o,i){o in r?r[o]=i:a(o,i)}}},rs="!",hn=":",ji=[],bn=(e,t,r,s,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:s,isExternal:a}),Ni=e=>{const{prefix:t,experimentalParseClassName:r}=e;let s=a=>{const o=[];let i=0,c=0,u=0,d;const f=a.length;for(let y=0;y<f;y++){const k=a[y];if(i===0&&c===0){if(k===hn){o.push(a.slice(u,y)),u=y+1;continue}if(k==="/"){d=y;continue}}k==="["?i++:k==="]"?i--:k==="("?c++:k===")"&&c--}const p=o.length===0?a:a.slice(u);let m=p,h=!1;p.endsWith(rs)?(m=p.slice(0,-1),h=!0):p.startsWith(rs)&&(m=p.slice(1),h=!0);const x=d&&d>u?d-u:void 0;return bn(o,h,m,x)};if(t){const a=t+hn,o=s;s=i=>i.startsWith(a)?o(i.slice(a.length)):bn(ji,!1,i,void 0,!0)}if(r){const a=s;s=o=>r({className:o,parseClassName:a})}return s},Si=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,s)=>{t.set(r,1e6+s)}),r=>{const s=[];let a=[];for(let o=0;o<r.length;o++){const i=r[o],c=i[0]==="[",u=t.has(i);c||u?(a.length>0&&(a.sort(),s.push(...a),a=[]),s.push(i)):a.push(i)}return a.length>0&&(a.sort(),s.push(...a)),s}},Ci=e=>R({cache:ki(e.cacheSize),parseClassName:Ni(e),sortModifiers:Si(e)},mi(e)),$i=/\s+/,Ei=(e,t)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:o}=t,i=[],c=e.trim().split($i);let u="";for(let d=c.length-1;d>=0;d-=1){const f=c[d],{isExternal:p,modifiers:m,hasImportantModifier:h,baseClassName:x,maybePostfixModifierPosition:y}=r(f);if(p){u=f+(u.length>0?" "+u:u);continue}let k=!!y,g=s(k?x.substring(0,y):x);if(!g){if(!k){u=f+(u.length>0?" "+u:u);continue}if(g=s(x),!g){u=f+(u.length>0?" "+u:u);continue}k=!1}const j=m.length===0?"":m.length===1?m[0]:o(m).join(":"),C=h?j+rs:j,b=C+g;if(i.indexOf(b)>-1)continue;i.push(b);const v=a(g,k);for(let N=0;N<v.length;++N){const D=v[N];i.push(C+D)}u=f+(u.length>0?" "+u:u)}return u},Mi=(...e)=>{let t=0,r,s,a="";for(;t<e.length;)(r=e[t++])&&(s=Xn(r))&&(a&&(a+=" "),a+=s);return a},Xn=e=>{if(typeof e=="string")return e;let t,r="";for(let s=0;s<e.length;s++)e[s]&&(t=Xn(e[s]))&&(r&&(r+=" "),r+=t);return r},Ti=(e,...t)=>{let r,s,a,o;const i=u=>{const d=t.reduce((f,p)=>p(f),e());return r=Ci(d),s=r.cache.get,a=r.cache.set,o=c,c(u)},c=u=>{const d=s(u);if(d)return d;const f=Ei(u,r);return a(u,f),f};return o=i,(...u)=>o(Mi(...u))},Ai=[],me=e=>{const t=r=>r[e]||Ai;return t.isThemeGetter=!0,t},Jn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Zn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ri=/^\d+\/\d+$/,Ii=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Di=/\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$/,Li=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Fi=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_i=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wt=e=>Ri.test(e),te=e=>!!e&&!Number.isNaN(Number(e)),Ge=e=>!!e&&Number.isInteger(Number(e)),Ur=e=>e.endsWith("%")&&te(e.slice(0,-1)),Ve=e=>Ii.test(e),Pi=()=>!0,zi=e=>Di.test(e)&&!Li.test(e),Qn=()=>!1,Oi=e=>Fi.test(e),Vi=e=>_i.test(e),Wi=e=>!G(e)&&!K(e),Hi=e=>Rt(e,ra,Qn),G=e=>Jn.test(e),ut=e=>Rt(e,sa,zi),qr=e=>Rt(e,Ki,te),gn=e=>Rt(e,ea,Qn),Bi=e=>Rt(e,ta,Vi),rr=e=>Rt(e,na,Oi),K=e=>Zn.test(e),_t=e=>It(e,sa),Ui=e=>It(e,Yi),xn=e=>It(e,ea),qi=e=>It(e,ra),Gi=e=>It(e,ta),sr=e=>It(e,na,!0),Rt=(e,t,r)=>{const s=Jn.exec(e);return s?s[1]?t(s[1]):r(s[2]):!1},It=(e,t,r=!1)=>{const s=Zn.exec(e);return s?s[1]?t(s[1]):r:!1},ea=e=>e==="position"||e==="percentage",ta=e=>e==="image"||e==="url",ra=e=>e==="length"||e==="size"||e==="bg-size",sa=e=>e==="length",Ki=e=>e==="number",Yi=e=>e==="family-name",na=e=>e==="shadow",Xi=()=>{const e=me("color"),t=me("font"),r=me("text"),s=me("font-weight"),a=me("tracking"),o=me("leading"),i=me("breakpoint"),c=me("container"),u=me("spacing"),d=me("radius"),f=me("shadow"),p=me("inset-shadow"),m=me("text-shadow"),h=me("drop-shadow"),x=me("blur"),y=me("perspective"),k=me("aspect"),g=me("ease"),j=me("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...b(),K,G],N=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],S=()=>[K,G,u],A=()=>[wt,"full","auto",...S()],M=()=>[Ge,"none","subgrid",K,G],$=()=>["auto",{span:["full",Ge,K,G]},Ge,K,G],L=()=>[Ge,"auto",K,G],_=()=>["auto","min","max","fr",K,G],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],z=()=>["start","end","center","stretch","center-safe","end-safe"],X=()=>["auto",...S()],q=()=>[wt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],H=()=>[e,K,G],le=()=>[...b(),xn,gn,{position:[K,G]}],ne=()=>["no-repeat",{repeat:["","x","y","space","round"]}],I=()=>["auto","cover","contain",qi,Hi,{size:[K,G]}],B=()=>[Ur,_t,ut],Y=()=>["","none","full",d,K,G],Q=()=>["",te,_t,ut],W=()=>["solid","dashed","dotted","double"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>[te,Ur,xn,gn],se=()=>["","none",x,K,G],ae=()=>["none",te,K,G],oe=()=>["none",te,K,G],Ne=()=>[te,K,G],ze=()=>[wt,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ve],breakpoint:[Ve],color:[Pi],container:[Ve],"drop-shadow":[Ve],ease:["in","out","in-out"],font:[Wi],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ve],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ve],shadow:[Ve],spacing:["px",te],text:[Ve],"text-shadow":[Ve],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",wt,G,K,k]}],container:["container"],columns:[{columns:[te,G,K,c]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:v()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[Ge,"auto",K,G]}],basis:[{basis:[wt,"full","auto",c,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[te,wt,"auto","initial","none",G]}],grow:[{grow:["",te,K,G]}],shrink:[{shrink:["",te,K,G]}],order:[{order:[Ge,"first","last","none",K,G]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":_()}],"auto-rows":[{"auto-rows":_()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...z(),"normal"]}],"justify-self":[{"justify-self":["auto",...z()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...z(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...z(),"baseline"]}],"place-self":[{"place-self":["auto",...z()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:X()}],mx:[{mx:X()}],my:[{my:X()}],ms:[{ms:X()}],me:[{me:X()}],mt:[{mt:X()}],mr:[{mr:X()}],mb:[{mb:X()}],ml:[{ml:X()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],w:[{w:[c,"screen",...q()]}],"min-w":[{"min-w":[c,"screen","none",...q()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",r,_t,ut]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,K,qr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ur,G]}],"font-family":[{font:[Ui,G,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:[a,K,G]}],"line-clamp":[{"line-clamp":[te,"none",K,qr]}],leading:[{leading:[o,...S()]}],"list-image":[{"list-image":["none",K,G]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",K,G]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:[te,"from-font","auto",K,ut]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[te,"auto",K,G]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K,G]}],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",K,G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:le()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:I()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ge,K,G],radial:["",K,G],conic:[Ge,K,G]},Gi,Bi]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...W(),"hidden","none"]}],"divide-style":[{divide:[...W(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...W(),"none","hidden"]}],"outline-offset":[{"outline-offset":[te,K,G]}],"outline-w":[{outline:["",te,_t,ut]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",f,sr,rr]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",p,sr,rr]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[te,ut]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",m,sr,rr]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[te,K,G]}],"mix-blend":[{"mix-blend":[...U(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":U()}],"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":[te]}],"mask-image-linear-from-pos":[{"mask-linear-from":V()}],"mask-image-linear-to-pos":[{"mask-linear-to":V()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":V()}],"mask-image-t-to-pos":[{"mask-t-to":V()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":V()}],"mask-image-r-to-pos":[{"mask-r-to":V()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":V()}],"mask-image-b-to-pos":[{"mask-b-to":V()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":V()}],"mask-image-l-to-pos":[{"mask-l-to":V()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":V()}],"mask-image-x-to-pos":[{"mask-x-to":V()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":V()}],"mask-image-y-to-pos":[{"mask-y-to":V()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[K,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":V()}],"mask-image-radial-to-pos":[{"mask-radial-to":V()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[te]}],"mask-image-conic-from-pos":[{"mask-conic-from":V()}],"mask-image-conic-to-pos":[{"mask-conic-to":V()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:le()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:I()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",K,G]}],filter:[{filter:["","none",K,G]}],blur:[{blur:se()}],brightness:[{brightness:[te,K,G]}],contrast:[{contrast:[te,K,G]}],"drop-shadow":[{"drop-shadow":["","none",h,sr,rr]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",te,K,G]}],"hue-rotate":[{"hue-rotate":[te,K,G]}],invert:[{invert:["",te,K,G]}],saturate:[{saturate:[te,K,G]}],sepia:[{sepia:["",te,K,G]}],"backdrop-filter":[{"backdrop-filter":["","none",K,G]}],"backdrop-blur":[{"backdrop-blur":se()}],"backdrop-brightness":[{"backdrop-brightness":[te,K,G]}],"backdrop-contrast":[{"backdrop-contrast":[te,K,G]}],"backdrop-grayscale":[{"backdrop-grayscale":["",te,K,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[te,K,G]}],"backdrop-invert":[{"backdrop-invert":["",te,K,G]}],"backdrop-opacity":[{"backdrop-opacity":[te,K,G]}],"backdrop-saturate":[{"backdrop-saturate":[te,K,G]}],"backdrop-sepia":[{"backdrop-sepia":["",te,K,G]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",K,G]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[te,"initial",K,G]}],ease:[{ease:["linear","initial",g,K,G]}],delay:[{delay:[te,K,G]}],animate:[{animate:["none",j,K,G]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,K,G]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:Ne()}],"skew-x":[{"skew-x":Ne()}],"skew-y":[{"skew-y":Ne()}],transform:[{transform:[K,G,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ze()}],"translate-x":[{"translate-x":ze()}],"translate-y":[{"translate-y":ze()}],"translate-z":[{"translate-z":ze()}],"translate-none":["translate-none"],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"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",K,G]}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",K,G]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[te,_t,ut,qr]}],stroke:[{stroke:["none",...H()]}],"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"]}},Ji=Ti(Xi);function w(...e){return Ji(qn(e))}const vn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,yn=qn,Zi=(e,t)=>r=>{var s;if((t==null?void 0:t.variants)==null)return yn(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(d=>{const f=r==null?void 0:r[d],p=o==null?void 0:o[d];if(f===null)return null;const m=vn(f)||vn(p);return a[d][m]}),c=r&&Object.entries(r).reduce((d,f)=>{let[p,m]=f;return m===void 0||(d[p]=m),d},{}),u=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((d,f)=>{let x=f,{class:p,className:m}=x,h=O(x,["class","className"]);return Object.entries(h).every(y=>{let[k,g]=y;return Array.isArray(g)?g.includes(R(R({},o),c)[k]):R(R({},o),c)[k]===g})?[...d,p,m]:d},[]);return yn(e,i,u,r==null?void 0:r.class,r==null?void 0:r.className)},xe=(e,t)=>{const r=Zi(e,t);return(s=>{const a=r(s);return w(a)})};class Me{static create(t,r="ease-in-out"){const s={fast:{value:"150ms",ms:150,tailwind:"duration-150"},base:{value:"200ms",ms:200,tailwind:"duration-200"},slow:{value:"300ms",ms:300,tailwind:"duration-300"},slower:{value:"500ms",ms:500,tailwind:"duration-500"}},a={"ease-in":{value:"cubic-bezier(0.4, 0, 1, 1)",tailwind:"ease-in",description:"Slow start, fast end"},"ease-out":{value:"cubic-bezier(0, 0, 0.2, 1)",tailwind:"ease-out",description:"Fast start, slow end"},"ease-in-out":{value:"cubic-bezier(0.4, 0, 0.2, 1)",tailwind:"ease-in-out",description:"Slow start and end, fast middle"},spring:{value:"cubic-bezier(0.68, -0.55, 0.265, 1.55)",tailwind:"ease-[cubic-bezier(0.68,-0.55,0.265,1.55)]",description:"Spring-like bounce effect"}};return{duration:s[t],easing:a[r]}}static createTransition(t,r="base",s="ease-in-out"){const a=this.create(r,s),o=Array.isArray(t)?t.join(", "):t,i=[a.duration.tailwind,a.easing.tailwind].join(" ");return{property:o,duration:a.duration.value,timingFunction:a.easing.value,tailwind:i}}}const Qi={fast:Me.create("fast"),base:Me.create("base"),slow:Me.create("slow"),slower:Me.create("slower"),colors:Me.createTransition(["color","background-color","border-color"],"base"),opacity:Me.createTransition("opacity","fast"),transform:Me.createTransition("transform","base"),all:Me.createTransition("all","base")};function el(e,t){return Me.create(e,t)}function he(e,t="ease-in-out"){const r=Me.create(e,t);return`${r.duration.tailwind} ${r.easing.tailwind}`}function tl(e,t="base",r="ease-in-out"){return Me.createTransition(e,t,r).tailwind}class Ee{static create(t){return{base:{value:0,tailwind:"z-0",description:"Base layer for normal content"},dropdown:{value:1e3,tailwind:"z-[1000]",description:"Dropdown menus and select options"},sticky:{value:1020,tailwind:"z-[1020]",description:"Sticky headers and navigation"},fixed:{value:1030,tailwind:"z-[1030]",description:"Fixed position elements"},"modal-backdrop":{value:1040,tailwind:"z-[1040]",description:"Modal backdrop/overlay"},modal:{value:1050,tailwind:"z-[1050]",description:"Modal dialogs and drawers"},popover:{value:1060,tailwind:"z-[1060]",description:"Popovers and tooltips"},tooltip:{value:1070,tailwind:"z-[1070]",description:"Tooltips (highest priority)"},toast:{value:1080,tailwind:"z-[1080]",description:"Toast notifications (highest priority)"}}[t]}}const wn={base:Ee.create("base"),dropdown:Ee.create("dropdown"),sticky:Ee.create("sticky"),fixed:Ee.create("fixed"),"modal-backdrop":Ee.create("modal-backdrop"),modal:Ee.create("modal"),popover:Ee.create("popover"),tooltip:Ee.create("tooltip"),toast:Ee.create("toast")};function rl(e){return Ee.create(e)}function ue(e){return Ee.create(e).tailwind}class ge{static create(t){const r=t/100,s={0:"Fully transparent",5:"Very light overlay",10:"Light overlay",20:"Subtle overlay",25:"Quarter opacity",30:"Light background",40:"Semi-transparent",50:"Half opacity",60:"Semi-opaque",70:"Mostly opaque",75:"Three-quarter opacity",80:"High opacity",90:"Very high opacity",95:"Nearly opaque",100:"Fully opaque"};return{value:t,decimal:r,tailwind:{0:"opacity-0",5:"opacity-5",10:"opacity-10",20:"opacity-20",25:"opacity-25",30:"opacity-30",40:"opacity-40",50:"opacity-50",60:"opacity-60",70:"opacity-70",75:"opacity-75",80:"opacity-80",90:"opacity-90",95:"opacity-95",100:"opacity-100"}[t],description:s[t]}}}ge.create(0),ge.create(5),ge.create(10),ge.create(20),ge.create(25),ge.create(30),ge.create(40),ge.create(50),ge.create(60),ge.create(70),ge.create(75),ge.create(80),ge.create(90),ge.create(95),ge.create(100);function sl(e){return ge.create(e)}function nl(e){return ge.create(e).tailwind}var nr={exports:{}},Pt={};/**
|
|
1
|
+
"use strict";var Fo=Object.defineProperty,_o=Object.defineProperties;var Po=Object.getOwnPropertyDescriptors;var tr=Object.getOwnPropertySymbols;var fn=Object.prototype.hasOwnProperty,mn=Object.prototype.propertyIsEnumerable;var Ur=(e,t,r)=>t in e?Fo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t)=>{for(var r in t||(t={}))fn.call(t,r)&&Ur(e,r,t[r]);if(tr)for(var r of tr(t))mn.call(t,r)&&Ur(e,r,t[r]);return e},P=(e,t)=>_o(e,Po(t));var O=(e,t)=>{var r={};for(var s in e)fn.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&tr)for(var s of tr(e))t.indexOf(s)<0&&mn.call(e,s)&&(r[s]=e[s]);return r};var pn=(e,t,r)=>Ur(e,typeof t!="symbol"?t+"":t,r);var rr=(e,t,r)=>new Promise((s,a)=>{var o=u=>{try{c(r.next(u))}catch(d){a(d)}},i=u=>{try{c(r.throw(u))}catch(d){a(d)}},c=u=>u.done?s(u.value):Promise.resolve(u.value).then(o,i);c((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),Ue=require("react-dom"),Je={icon:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},text:{xs:"text-xs",sm:"text-sm",base:"text-base"},spacing:{itemPaddingX:"px-4",itemPaddingY:"py-2",nestedIndent:"pl-6",nestedIndentLevel2:"pl-10",nestedIndentLevel3:"pl-14",groupTitlePadding:"px-4 py-2",iconMargin:"mr-3"},colors:{active:{bg:"bg-surface-brand-muted",text:"text-fg-brand-emphasis",border:"border-line-brand"},inactive:{text:"text-fg-secondary",hover:"hover:bg-surface-hover hover:text-fg-primary"},groupTitle:"text-fg-tertiary"},chevron:{size:"h-3 w-3",color:"text-fg-quaternary"},navigation:{width:{default:"56px",compact:"48px",expanded:"200px"},background:{default:"#fafafa",hover:"#f5f5f5"}},split:{transition:"transition-all duration-300",collapsedWidth:"0px"},content:{scrollbar:{width:"thin",color:{thumb:"#cbd5e1",track:"#f1f5f9"}}}};function zo(e){return e<=0?Je.spacing.itemPaddingX:e===1?Je.spacing.nestedIndent:e===2?Je.spacing.nestedIndentLevel2:e===3?Je.spacing.nestedIndentLevel3:`pl-${4+e*4}`}class pe{static create(t){const r=t*this.BASE_UNIT,s=r/16;return{value:r,rem:`${s}rem`,px:`${r}px`,tailwind:this.getTailwindClass(t)}}static getTailwindClass(t){return{0:"0",.5:"0.5",1:"1",1.5:"1.5",2:"2",2.5:"2.5",3:"3",3.5:"3.5",4:"4",5:"5",6:"6",8:"8",10:"10",12:"12",16:"16",20:"20",24:"24",32:"32",40:"40",48:"48",64:"64",80:"80",96:"96"}[t]||String(t)}}pn(pe,"BASE_UNIT",4);const xr={none:pe.create(0),"0.5":pe.create(.5),xs:pe.create(1),"1.5":pe.create(1.5),sm:pe.create(2),"2.5":pe.create(2.5),md:pe.create(3),"3.5":pe.create(3.5),base:pe.create(4),lg:pe.create(6),xl:pe.create(8),"2xl":pe.create(10),"3xl":pe.create(12),"4xl":pe.create(16),"5xl":pe.create(20),"6xl":pe.create(24)};function Oo(e){return xr[e]}function E(e,t="p"){const s=xr[e].tailwind;return`${{p:"p",m:"m",px:"px",mx:"mx",py:"py",my:"my",pt:"pt",mt:"mt",pr:"pr",mr:"mr",pb:"pb",mb:"mb",pl:"pl",ml:"ml",gap:"gap","gap-x":"gap-x","gap-y":"gap-y","space-y":"space-y"}[t]}-${s}`}class fe{static createFontSize(t){const s={"2xs":{px:10,tailwind:"text-2xs"},xs:{px:12,tailwind:"text-xs"},sm:{px:14,tailwind:"text-sm"},base:{px:16,tailwind:"text-base"},lg:{px:18,tailwind:"text-lg"},xl:{px:20,tailwind:"text-xl"},"2xl":{px:24,tailwind:"text-2xl"},"3xl":{px:30,tailwind:"text-3xl"},"4xl":{px:36,tailwind:"text-4xl"},"5xl":{px:48,tailwind:"text-5xl"},"6xl":{px:60,tailwind:"text-6xl"}}[t];return{value:s.px,rem:`${s.px/16}rem`,px:`${s.px}px`,tailwind:s.tailwind}}static createLineHeight(t){const s={none:{value:1,tailwind:"leading-none"},tight:{value:1.25,tailwind:"leading-tight"},snug:{value:1.375,tailwind:"leading-snug"},normal:{value:1.5,tailwind:"leading-normal"},relaxed:{value:1.625,tailwind:"leading-relaxed"},loose:{value:2,tailwind:"leading-loose"}}[t];return{value:s.value,tailwind:s.tailwind}}static createFontWeight(t){const s={light:{value:300,tailwind:"font-light"},normal:{value:400,tailwind:"font-normal"},medium:{value:500,tailwind:"font-medium"},semibold:{value:600,tailwind:"font-semibold"},bold:{value:700,tailwind:"font-bold"}}[t];return{value:s.value,tailwind:s.tailwind}}static create(t,r="normal",s="normal"){return{fontSize:this.createFontSize(t),lineHeight:this.createLineHeight(r),fontWeight:this.createFontWeight(s)}}}const Vo={sans:{name:"sans",stack:'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif',tailwind:"font-sans"},serif:{name:"serif",stack:'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',tailwind:"font-serif"},mono:{name:"mono",stack:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',tailwind:"font-mono"}},Wo={light:fe.createFontWeight("light"),normal:fe.createFontWeight("normal"),medium:fe.createFontWeight("medium"),semibold:fe.createFontWeight("semibold"),bold:fe.createFontWeight("bold")},bt={h1:fe.create("4xl","tight","bold"),h2:fe.create("3xl","tight","bold"),h3:fe.create("2xl","snug","semibold"),h4:fe.create("xl","snug","semibold"),h5:fe.create("lg","normal","medium"),h6:fe.create("base","normal","medium"),body:fe.create("base","relaxed","normal"),bodySmall:fe.create("sm","relaxed","normal"),bodyLarge:fe.create("lg","relaxed","normal"),label:fe.create("sm","normal","medium"),caption:fe.create("xs","normal","normal"),button:fe.create("base","normal","medium")};function Ho(e){return bt[e]}function ce(e){const t=bt[e];return`${t.fontSize.tailwind} ${t.lineHeight.tailwind} ${t.fontWeight.tailwind}`}function re(e){return bt[e].fontSize.tailwind}function ve(e){return fe.createFontSize(e).tailwind}function Fe(e){return bt[e].fontWeight.tailwind}function Et(e){return fe.createFontWeight(e).tailwind}function Bo(e){return bt[e].lineHeight.tailwind}const Uo=[50,100,200,300,400,500,600,700,800,900,950];function $(e,t,r){const s=qo(e),a=Go(e);return{hex:e,rgb:s,hsl:a,cssVar:`var(--color-${t}-${r})`,tailwind:`${t}-${r}`}}function qo(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?`${parseInt(t[1],16)}, ${parseInt(t[2],16)}, ${parseInt(t[3],16)}`:"0, 0, 0"}function Go(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!t)return"0, 0%, 0%";const r=parseInt(t[1],16)/255,s=parseInt(t[2],16)/255,a=parseInt(t[3],16)/255,o=Math.max(r,s,a),i=Math.min(r,s,a);let c=0,u=0;const d=(o+i)/2;if(o!==i){const f=o-i;switch(u=d>.5?f/(2-o-i):f/(o+i),o){case r:c=((s-a)/f+(s<a?6:0))/6;break;case s:c=((a-r)/f+2)/6;break;case a:c=((r-s)/f+4)/6;break}}return`${Math.round(c*360)}, ${Math.round(u*100)}%, ${Math.round(d*100)}%`}const Ze={50:$("#eef2ff","indigo",50),100:$("#e0e7ff","indigo",100),200:$("#c7d2fe","indigo",200),300:$("#a5b4fc","indigo",300),400:$("#818cf8","indigo",400),500:$("#6366f1","indigo",500),600:$("#4f46e5","indigo",600),700:$("#4338ca","indigo",700),800:$("#3730a3","indigo",800),900:$("#312e81","indigo",900),950:$("#1e1b4b","indigo",950)},Qe={50:$("#f5f3ff","violet",50),100:$("#ede9fe","violet",100),200:$("#ddd6fe","violet",200),300:$("#c4b5fd","violet",300),400:$("#a78bfa","violet",400),500:$("#8b5cf6","violet",500),600:$("#7c3aed","violet",600),700:$("#6d28d9","violet",700),800:$("#5b21b6","violet",800),900:$("#4c1d95","violet",900),950:$("#2e1065","violet",950)},et={50:$("#ecfeff","cyan",50),100:$("#cffafe","cyan",100),200:$("#a5f3fc","cyan",200),300:$("#67e8f9","cyan",300),400:$("#22d3ee","cyan",400),500:$("#06b6d4","cyan",500),600:$("#0891b2","cyan",600),700:$("#0e7490","cyan",700),800:$("#155e75","cyan",800),900:$("#164e63","cyan",900),950:$("#083344","cyan",950)},tt={50:$("#f8fafc","slate",50),100:$("#f1f5f9","slate",100),200:$("#e2e8f0","slate",200),300:$("#cbd5e1","slate",300),400:$("#94a3b8","slate",400),500:$("#64748b","slate",500),600:$("#475569","slate",600),700:$("#334155","slate",700),800:$("#1e293b","slate",800),900:$("#0f172a","slate",900),950:$("#020617","slate",950)},Dn={50:$("#f9fafb","gray",50),100:$("#f3f4f6","gray",100),200:$("#e5e7eb","gray",200),300:$("#d1d5db","gray",300),400:$("#9ca3af","gray",400),500:$("#6b7280","gray",500),600:$("#4b5563","gray",600),700:$("#374151","gray",700),800:$("#1f2937","gray",800),900:$("#111827","gray",900),950:$("#030712","gray",950)},rt={50:$("#ecfdf5","emerald",50),100:$("#d1fae5","emerald",100),200:$("#a7f3d0","emerald",200),300:$("#6ee7b7","emerald",300),400:$("#34d399","emerald",400),500:$("#10b981","emerald",500),600:$("#059669","emerald",600),700:$("#047857","emerald",700),800:$("#065f46","emerald",800),900:$("#064e3b","emerald",900),950:$("#022c22","emerald",950)},Ln={50:$("#f0fdf4","green",50),100:$("#dcfce7","green",100),200:$("#bbf7d0","green",200),300:$("#86efac","green",300),400:$("#4ade80","green",400),500:$("#22c55e","green",500),600:$("#16a34a","green",600),700:$("#15803d","green",700),800:$("#166534","green",800),900:$("#14532d","green",900),950:$("#052e16","green",950)},st={50:$("#fffbeb","amber",50),100:$("#fef3c7","amber",100),200:$("#fde68a","amber",200),300:$("#fcd34d","amber",300),400:$("#fbbf24","amber",400),500:$("#f59e0b","amber",500),600:$("#d97706","amber",600),700:$("#b45309","amber",700),800:$("#92400e","amber",800),900:$("#78350f","amber",900),950:$("#451a03","amber",950)},Fn={50:$("#fefce8","yellow",50),100:$("#fef9c3","yellow",100),200:$("#fef08a","yellow",200),300:$("#fde047","yellow",300),400:$("#facc15","yellow",400),500:$("#eab308","yellow",500),600:$("#ca8a04","yellow",600),700:$("#a16207","yellow",700),800:$("#854d0e","yellow",800),900:$("#713f12","yellow",900),950:$("#422006","yellow",950)},_n={50:$("#fff7ed","orange",50),100:$("#ffedd5","orange",100),200:$("#fed7aa","orange",200),300:$("#fdba74","orange",300),400:$("#fb923c","orange",400),500:$("#f97316","orange",500),600:$("#ea580c","orange",600),700:$("#c2410c","orange",700),800:$("#9a3412","orange",800),900:$("#7c2d12","orange",900),950:$("#431407","orange",950)},nt={50:$("#fff1f2","rose",50),100:$("#ffe4e6","rose",100),200:$("#fecdd3","rose",200),300:$("#fda4af","rose",300),400:$("#fb7185","rose",400),500:$("#f43f5e","rose",500),600:$("#e11d48","rose",600),700:$("#be123c","rose",700),800:$("#9f1239","rose",800),900:$("#881337","rose",900),950:$("#4c0519","rose",950)},Pn={50:$("#fef2f2","red",50),100:$("#fee2e2","red",100),200:$("#fecaca","red",200),300:$("#fca5a5","red",300),400:$("#f87171","red",400),500:$("#ef4444","red",500),600:$("#dc2626","red",600),700:$("#b91c1c","red",700),800:$("#991b1b","red",800),900:$("#7f1d1d","red",900),950:$("#450a0a","red",950)},at={50:$("#f0f9ff","sky",50),100:$("#e0f2fe","sky",100),200:$("#bae6fd","sky",200),300:$("#7dd3fc","sky",300),400:$("#38bdf8","sky",400),500:$("#0ea5e9","sky",500),600:$("#0284c7","sky",600),700:$("#0369a1","sky",700),800:$("#075985","sky",800),900:$("#0c4a6e","sky",900),950:$("#082f49","sky",950)},zn={50:$("#eff6ff","blue",50),100:$("#dbeafe","blue",100),200:$("#bfdbfe","blue",200),300:$("#93c5fd","blue",300),400:$("#60a5fa","blue",400),500:$("#3b82f6","blue",500),600:$("#2563eb","blue",600),700:$("#1d4ed8","blue",700),800:$("#1e40af","blue",800),900:$("#1e3a8a","blue",900),950:$("#172554","blue",950)},On={50:$("#fdf4ff","fuchsia",50),100:$("#fae8ff","fuchsia",100),200:$("#f5d0fe","fuchsia",200),300:$("#f0abfc","fuchsia",300),400:$("#e879f9","fuchsia",400),500:$("#d946ef","fuchsia",500),600:$("#c026d3","fuchsia",600),700:$("#a21caf","fuchsia",700),800:$("#86198f","fuchsia",800),900:$("#701a75","fuchsia",900),950:$("#4a044e","fuchsia",950)},Vn={50:$("#fdf2f8","pink",50),100:$("#fce7f3","pink",100),200:$("#fbcfe8","pink",200),300:$("#f9a8d4","pink",300),400:$("#f472b6","pink",400),500:$("#ec4899","pink",500),600:$("#db2777","pink",600),700:$("#be185d","pink",700),800:$("#9d174d","pink",800),900:$("#831843","pink",900),950:$("#500724","pink",950)},Wn={50:$("#faf5ff","purple",50),100:$("#f3e8ff","purple",100),200:$("#e9d5ff","purple",200),300:$("#d8b4fe","purple",300),400:$("#c084fc","purple",400),500:$("#a855f7","purple",500),600:$("#9333ea","purple",600),700:$("#7e22ce","purple",700),800:$("#6b21a8","purple",800),900:$("#581c87","purple",900),950:$("#3b0764","purple",950)},Hn={50:$("#f0fdfa","teal",50),100:$("#ccfbf1","teal",100),200:$("#99f6e4","teal",200),300:$("#5eead4","teal",300),400:$("#2dd4bf","teal",400),500:$("#14b8a6","teal",500),600:$("#0d9488","teal",600),700:$("#0f766e","teal",700),800:$("#115e59","teal",800),900:$("#134e4a","teal",900),950:$("#042f2e","teal",950)},Bn={50:$("#f7fee7","lime",50),100:$("#ecfccb","lime",100),200:$("#d9f99d","lime",200),300:$("#bef264","lime",300),400:$("#a3e635","lime",400),500:$("#84cc16","lime",500),600:$("#65a30d","lime",600),700:$("#4d7c0f","lime",700),800:$("#3f6212","lime",800),900:$("#365314","lime",900),950:$("#1a2e05","lime",950)},ds={indigo:Ze,violet:Qe,cyan:et,slate:tt,gray:Dn,emerald:rt,green:Ln,amber:st,yellow:Fn,orange:_n,rose:nt,red:Pn,sky:at,blue:zn,fuchsia:On,pink:Vn,purple:Wn,teal:Hn,lime:Bn};function At(e,t){return ds[e][t]}function Ko(e){return ds[e]}const qt={primary:{light:Ze[400],DEFAULT:Ze[500],dark:Ze[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},secondary:{light:Qe[400],DEFAULT:Qe[500],dark:Qe[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{light:et[400],DEFAULT:et[500],dark:et[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},success:{light:rt[400],DEFAULT:rt[500],dark:rt[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},warning:{light:st[400],DEFAULT:st[500],dark:st[600],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{light:nt[400],DEFAULT:nt[500],dark:nt[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},info:{light:at[400],DEFAULT:at[500],dark:at[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:tt[100],DEFAULT:tt[500],dark:tt[700],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},vr={primary:{light:Ze[500],DEFAULT:Ze[400],dark:Ze[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},secondary:{light:Qe[500],DEFAULT:Qe[400],dark:Qe[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{light:et[500],DEFAULT:et[400],dark:et[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},success:{light:rt[500],DEFAULT:rt[400],dark:rt[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},warning:{light:st[500],DEFAULT:st[400],dark:st[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{light:nt[500],DEFAULT:nt[400],dark:nt[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},info:{light:at[500],DEFAULT:at[400],dark:at[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:tt[700],DEFAULT:tt[400],dark:tt[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},Yo=qt;function Ht(e,t="DEFAULT",r="light"){return(r==="dark"?vr:qt)[e][t]}function Xo(e,t="light"){return(t==="dark"?vr:qt)[e]}function Jo(e,t,r={}){const{format:s="hex",opacity:a}=r,o=At(e,t);let i;switch(s){case"rgb":i=a!==void 0?`rgba(${o.rgb}, ${a})`:`rgb(${o.rgb})`;break;case"hsl":i=a!==void 0?`hsla(${o.hsl}, ${a})`:`hsl(${o.hsl})`;break;case"cssVar":i=o.cssVar;break;case"tailwind":i=o.tailwind;break;case"hex":default:i=o.hex}return i}function Zo(e,t="DEFAULT",r={}){const{format:s="hex",opacity:a}=r,o=Ht(e,t);let i;switch(s){case"rgb":i=a!==void 0?`rgba(${o.rgb}, ${a})`:`rgb(${o.rgb})`;break;case"hsl":i=a!==void 0?`hsla(${o.hsl}, ${a})`:`hsl(${o.hsl})`;break;case"cssVar":i=o.cssVar;break;case"tailwind":i=o.tailwind;break;case"hex":default:i=o.hex}return i}function Qo(e,t,r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,c=At(e,t),d=[`${s}-${c.tailwind}`];return a&&d.push(`hover:${s}-${c.tailwind}`),o&&d.push(`focus:${s}-${c.tailwind}`),i&&d.push(`active:${s}-${c.tailwind}`),d.join(" ")}function ei(e,t="DEFAULT",r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,c=Ht(e,t),d=[`${s}-${c.tailwind}`];if(a){const f=Ht(e,t==="DEFAULT"?"dark":"DEFAULT");d.push(`hover:${s}-${f.tailwind}`)}if(o&&d.push(`focus:${s}-${c.tailwind}`),i){const f=Ht(e,"dark");d.push(`active:${s}-${f.tailwind}`)}return d.join(" ")}function ti(e,t,r="bg"){const s=At(e,t);return`hover:${r}-${s.tailwind}`}function ri(e,t,r="border"){const s=At(e,t);return`focus:${r}-${s.tailwind}`}function si(e,t){return`focus:ring-${At(e,t).tailwind}`}function ni(e,t){return`rgba(${e.rgb}, ${t})`}function Un(e){const t=rs(e);return t?.299*t[0]+.587*t[1]+.114*t[2]>128:!0}function ai(e){return Un(e)?"#000000":"#ffffff"}function rs(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null}function us(e,t,r=.5){const s=rs(e),a=rs(t);if(!s||!a)return e;const o=Math.round(s[0]*(1-r)+a[0]*r),i=Math.round(s[1]*(1-r)+a[1]*r),c=Math.round(s[2]*(1-r)+a[2]*r);return`#${((1<<24)+(o<<16)+(i<<8)+c).toString(16).slice(1)}`}function oi(e,t){return us(e,"#ffffff",t/100)}function ii(e,t){return us(e,"#000000",t/100)}const li={primary:{name:"indigo",light:400,default:500,dark:600},secondary:{name:"violet",light:400,default:500,dark:600},accent:{name:"cyan",light:400,default:500,dark:600}};class St{static create(t){const s={sm:{minWidth:640,tailwind:"sm"},md:{minWidth:768,tailwind:"md"},lg:{minWidth:1024,tailwind:"lg"},xl:{minWidth:1280,tailwind:"xl"},"2xl":{minWidth:1536,tailwind:"2xl"}}[t];return{name:t,minWidth:s.minWidth,px:`${s.minWidth}px`,rem:`${s.minWidth/16}rem`,tailwind:s.tailwind}}}const yr={sm:St.create("sm"),md:St.create("md"),lg:St.create("lg"),xl:St.create("xl"),"2xl":St.create("2xl")};function ci(e){return yr[e]}function di(e,t="min"){const r=yr[e];return`@media (${t==="min"?"min-width":"max-width"}: ${r.px})`}function qn(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=qn(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function Gn(){for(var e,t,r=0,s="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=qn(e))&&(s&&(s+=" "),s+=t);return s}const ui=(e,t)=>{const r=new Array(e.length+t.length);for(let s=0;s<e.length;s++)r[s]=e[s];for(let s=0;s<t.length;s++)r[e.length+s]=t[s];return r},fi=(e,t)=>({classGroupId:e,validator:t}),Kn=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),cr="-",hn=[],mi="arbitrary..",pi=e=>{const t=bi(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return hi(i);const c=i.split(cr),u=c[0]===""&&c.length>1?1:0;return Yn(c,u,t)},getConflictingClassGroupIds:(i,c)=>{if(c){const u=s[i],d=r[i];return u?d?ui(d,u):u:d||hn}return r[i]||hn}}},Yn=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const a=e[t],o=r.nextPart.get(a);if(o){const d=Yn(e,t+1,o);if(d)return d}const i=r.validators;if(i===null)return;const c=t===0?e.join(cr):e.slice(t).join(cr),u=i.length;for(let d=0;d<u;d++){const f=i[d];if(f.validator(c))return f.classGroupId}},hi=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),s=t.slice(0,r);return s?mi+s:void 0})(),bi=e=>{const{theme:t,classGroups:r}=e;return gi(r,t)},gi=(e,t)=>{const r=Kn();for(const s in e){const a=e[s];fs(a,r,s,t)}return r},fs=(e,t,r,s)=>{const a=e.length;for(let o=0;o<a;o++){const i=e[o];xi(i,t,r,s)}},xi=(e,t,r,s)=>{if(typeof e=="string"){vi(e,t,r);return}if(typeof e=="function"){yi(e,t,r,s);return}wi(e,t,r,s)},vi=(e,t,r)=>{const s=e===""?t:Xn(t,e);s.classGroupId=r},yi=(e,t,r,s)=>{if(ki(e)){fs(e(s),t,r,s);return}t.validators===null&&(t.validators=[]),t.validators.push(fi(r,e))},wi=(e,t,r,s)=>{const a=Object.entries(e),o=a.length;for(let i=0;i<o;i++){const[c,u]=a[i];fs(u,Xn(t,c),r,s)}},Xn=(e,t)=>{let r=e;const s=t.split(cr),a=s.length;for(let o=0;o<a;o++){const i=s[o];let c=r.nextPart.get(i);c||(c=Kn(),r.nextPart.set(i,c)),r=c}return r},ki=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,ji=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),s=Object.create(null);const a=(o,i)=>{r[o]=i,t++,t>e&&(t=0,s=r,r=Object.create(null))};return{get(o){let i=r[o];if(i!==void 0)return i;if((i=s[o])!==void 0)return a(o,i),i},set(o,i){o in r?r[o]=i:a(o,i)}}},ss="!",bn=":",Ni=[],gn=(e,t,r,s,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:s,isExternal:a}),Si=e=>{const{prefix:t,experimentalParseClassName:r}=e;let s=a=>{const o=[];let i=0,c=0,u=0,d;const f=a.length;for(let v=0;v<f;v++){const k=a[v];if(i===0&&c===0){if(k===bn){o.push(a.slice(u,v)),u=v+1;continue}if(k==="/"){d=v;continue}}k==="["?i++:k==="]"?i--:k==="("?c++:k===")"&&c--}const p=o.length===0?a:a.slice(u);let m=p,h=!1;p.endsWith(ss)?(m=p.slice(0,-1),h=!0):p.startsWith(ss)&&(m=p.slice(1),h=!0);const x=d&&d>u?d-u:void 0;return gn(o,h,m,x)};if(t){const a=t+bn,o=s;s=i=>i.startsWith(a)?o(i.slice(a.length)):gn(Ni,!1,i,void 0,!0)}if(r){const a=s;s=o=>r({className:o,parseClassName:a})}return s},Ci=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,s)=>{t.set(r,1e6+s)}),r=>{const s=[];let a=[];for(let o=0;o<r.length;o++){const i=r[o],c=i[0]==="[",u=t.has(i);c||u?(a.length>0&&(a.sort(),s.push(...a),a=[]),s.push(i)):a.push(i)}return a.length>0&&(a.sort(),s.push(...a)),s}},$i=e=>T({cache:ji(e.cacheSize),parseClassName:Si(e),sortModifiers:Ci(e)},pi(e)),Ei=/\s+/,Mi=(e,t)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:o}=t,i=[],c=e.trim().split(Ei);let u="";for(let d=c.length-1;d>=0;d-=1){const f=c[d],{isExternal:p,modifiers:m,hasImportantModifier:h,baseClassName:x,maybePostfixModifierPosition:v}=r(f);if(p){u=f+(u.length>0?" "+u:u);continue}let k=!!v,b=s(k?x.substring(0,v):x);if(!b){if(!k){u=f+(u.length>0?" "+u:u);continue}if(b=s(x),!b){u=f+(u.length>0?" "+u:u);continue}k=!1}const j=m.length===0?"":m.length===1?m[0]:o(m).join(":"),C=h?j+ss:j,g=C+b;if(i.indexOf(g)>-1)continue;i.push(g);const y=a(b,k);for(let N=0;N<y.length;++N){const _=y[N];i.push(C+_)}u=f+(u.length>0?" "+u:u)}return u},Ti=(...e)=>{let t=0,r,s,a="";for(;t<e.length;)(r=e[t++])&&(s=Jn(r))&&(a&&(a+=" "),a+=s);return a},Jn=e=>{if(typeof e=="string")return e;let t,r="";for(let s=0;s<e.length;s++)e[s]&&(t=Jn(e[s]))&&(r&&(r+=" "),r+=t);return r},Ai=(e,...t)=>{let r,s,a,o;const i=u=>{const d=t.reduce((f,p)=>p(f),e());return r=$i(d),s=r.cache.get,a=r.cache.set,o=c,c(u)},c=u=>{const d=s(u);if(d)return d;const f=Mi(u,r);return a(u,f),f};return o=i,(...u)=>o(Ti(...u))},Ri=[],me=e=>{const t=r=>r[e]||Ri;return t.isThemeGetter=!0,t},Zn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Qn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ii=/^\d+\/\d+$/,Di=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Li=/\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$/,Fi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_i=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Pi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,kt=e=>Ii.test(e),te=e=>!!e&&!Number.isNaN(Number(e)),Ge=e=>!!e&&Number.isInteger(Number(e)),qr=e=>e.endsWith("%")&&te(e.slice(0,-1)),Ve=e=>Di.test(e),zi=()=>!0,Oi=e=>Li.test(e)&&!Fi.test(e),ea=()=>!1,Vi=e=>_i.test(e),Wi=e=>Pi.test(e),Hi=e=>!G(e)&&!K(e),Bi=e=>Rt(e,sa,ea),G=e=>Zn.test(e),ut=e=>Rt(e,na,Oi),Gr=e=>Rt(e,Yi,te),xn=e=>Rt(e,ta,ea),Ui=e=>Rt(e,ra,Wi),sr=e=>Rt(e,aa,Vi),K=e=>Qn.test(e),_t=e=>It(e,na),qi=e=>It(e,Xi),vn=e=>It(e,ta),Gi=e=>It(e,sa),Ki=e=>It(e,ra),nr=e=>It(e,aa,!0),Rt=(e,t,r)=>{const s=Zn.exec(e);return s?s[1]?t(s[1]):r(s[2]):!1},It=(e,t,r=!1)=>{const s=Qn.exec(e);return s?s[1]?t(s[1]):r:!1},ta=e=>e==="position"||e==="percentage",ra=e=>e==="image"||e==="url",sa=e=>e==="length"||e==="size"||e==="bg-size",na=e=>e==="length",Yi=e=>e==="number",Xi=e=>e==="family-name",aa=e=>e==="shadow",Ji=()=>{const e=me("color"),t=me("font"),r=me("text"),s=me("font-weight"),a=me("tracking"),o=me("leading"),i=me("breakpoint"),c=me("container"),u=me("spacing"),d=me("radius"),f=me("shadow"),p=me("inset-shadow"),m=me("text-shadow"),h=me("drop-shadow"),x=me("blur"),v=me("perspective"),k=me("aspect"),b=me("ease"),j=me("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],g=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],y=()=>[...g(),K,G],N=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],S=()=>[K,G,u],M=()=>[kt,"full","auto",...S()],F=()=>[Ge,"none","subgrid",K,G],A=()=>["auto",{span:["full",Ge,K,G]},Ge,K,G],R=()=>[Ge,"auto",K,G],I=()=>["auto","min","max","fr",K,G],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],z=()=>["start","end","center","stretch","center-safe","end-safe"],Y=()=>["auto",...S()],q=()=>[kt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],W=()=>[e,K,G],ae=()=>[...g(),vn,xn,{position:[K,G]}],se=()=>["no-repeat",{repeat:["","x","y","space","round"]}],D=()=>["auto","cover","contain",Gi,Bi,{size:[K,G]}],B=()=>[qr,_t,ut],X=()=>["","none","full",d,K,G],Q=()=>["",te,_t,ut],H=()=>["solid","dashed","dotted","double"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>[te,qr,vn,xn],ne=()=>["","none",x,K,G],oe=()=>["none",te,K,G],ie=()=>["none",te,K,G],Ne=()=>[te,K,G],ze=()=>[kt,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ve],breakpoint:[Ve],color:[zi],container:[Ve],"drop-shadow":[Ve],ease:["in","out","in-out"],font:[Hi],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ve],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ve],shadow:[Ve],spacing:["px",te],text:[Ve],"text-shadow":[Ve],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",kt,G,K,k]}],container:["container"],columns:[{columns:[te,G,K,c]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:y()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[Ge,"auto",K,G]}],basis:[{basis:[kt,"full","auto",c,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[te,kt,"auto","initial","none",G]}],grow:[{grow:["",te,K,G]}],shrink:[{shrink:["",te,K,G]}],order:[{order:[Ge,"first","last","none",K,G]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":I()}],"auto-rows":[{"auto-rows":I()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...z(),"normal"]}],"justify-self":[{"justify-self":["auto",...z()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...z(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...z(),"baseline"]}],"place-self":[{"place-self":["auto",...z()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:Y()}],mx:[{mx:Y()}],my:[{my:Y()}],ms:[{ms:Y()}],me:[{me:Y()}],mt:[{mt:Y()}],mr:[{mr:Y()}],mb:[{mb:Y()}],ml:[{ml:Y()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],w:[{w:[c,"screen",...q()]}],"min-w":[{"min-w":[c,"screen","none",...q()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",r,_t,ut]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,K,Gr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qr,G]}],"font-family":[{font:[qi,G,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:[a,K,G]}],"line-clamp":[{"line-clamp":[te,"none",K,Gr]}],leading:[{leading:[o,...S()]}],"list-image":[{"list-image":["none",K,G]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",K,G]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:[te,"from-font","auto",K,ut]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[te,"auto",K,G]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K,G]}],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",K,G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ae()}],"bg-repeat":[{bg:se()}],"bg-size":[{bg:D()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ge,K,G],radial:["",K,G],conic:[Ge,K,G]},Ki,Ui]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...H(),"hidden","none"]}],"divide-style":[{divide:[...H(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...H(),"none","hidden"]}],"outline-offset":[{"outline-offset":[te,K,G]}],"outline-w":[{outline:["",te,_t,ut]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",f,nr,sr]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",p,nr,sr]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[te,ut]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",m,nr,sr]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[te,K,G]}],"mix-blend":[{"mix-blend":[...U(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":U()}],"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":[te]}],"mask-image-linear-from-pos":[{"mask-linear-from":V()}],"mask-image-linear-to-pos":[{"mask-linear-to":V()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":V()}],"mask-image-t-to-pos":[{"mask-t-to":V()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":V()}],"mask-image-r-to-pos":[{"mask-r-to":V()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":V()}],"mask-image-b-to-pos":[{"mask-b-to":V()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":V()}],"mask-image-l-to-pos":[{"mask-l-to":V()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":V()}],"mask-image-x-to-pos":[{"mask-x-to":V()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":V()}],"mask-image-y-to-pos":[{"mask-y-to":V()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[K,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":V()}],"mask-image-radial-to-pos":[{"mask-radial-to":V()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"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":g()}],"mask-image-conic-pos":[{"mask-conic":[te]}],"mask-image-conic-from-pos":[{"mask-conic-from":V()}],"mask-image-conic-to-pos":[{"mask-conic-to":V()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ae()}],"mask-repeat":[{mask:se()}],"mask-size":[{mask:D()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",K,G]}],filter:[{filter:["","none",K,G]}],blur:[{blur:ne()}],brightness:[{brightness:[te,K,G]}],contrast:[{contrast:[te,K,G]}],"drop-shadow":[{"drop-shadow":["","none",h,nr,sr]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",te,K,G]}],"hue-rotate":[{"hue-rotate":[te,K,G]}],invert:[{invert:["",te,K,G]}],saturate:[{saturate:[te,K,G]}],sepia:[{sepia:["",te,K,G]}],"backdrop-filter":[{"backdrop-filter":["","none",K,G]}],"backdrop-blur":[{"backdrop-blur":ne()}],"backdrop-brightness":[{"backdrop-brightness":[te,K,G]}],"backdrop-contrast":[{"backdrop-contrast":[te,K,G]}],"backdrop-grayscale":[{"backdrop-grayscale":["",te,K,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[te,K,G]}],"backdrop-invert":[{"backdrop-invert":["",te,K,G]}],"backdrop-opacity":[{"backdrop-opacity":[te,K,G]}],"backdrop-saturate":[{"backdrop-saturate":[te,K,G]}],"backdrop-sepia":[{"backdrop-sepia":["",te,K,G]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",K,G]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[te,"initial",K,G]}],ease:[{ease:["linear","initial",b,K,G]}],delay:[{delay:[te,K,G]}],animate:[{animate:["none",j,K,G]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,K,G]}],"perspective-origin":[{"perspective-origin":y()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:Ne()}],"skew-x":[{"skew-x":Ne()}],"skew-y":[{"skew-y":Ne()}],transform:[{transform:[K,G,"","none","gpu","cpu"]}],"transform-origin":[{origin:y()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ze()}],"translate-x":[{"translate-x":ze()}],"translate-y":[{"translate-y":ze()}],"translate-z":[{"translate-z":ze()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"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",K,G]}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",K,G]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[te,_t,ut,Gr]}],stroke:[{stroke:["none",...W()]}],"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"]}},Zi=Ai(Ji);function w(...e){return Zi(Gn(e))}const yn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,wn=Gn,Qi=(e,t)=>r=>{var s;if((t==null?void 0:t.variants)==null)return wn(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(d=>{const f=r==null?void 0:r[d],p=o==null?void 0:o[d];if(f===null)return null;const m=yn(f)||yn(p);return a[d][m]}),c=r&&Object.entries(r).reduce((d,f)=>{let[p,m]=f;return m===void 0||(d[p]=m),d},{}),u=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((d,f)=>{let x=f,{class:p,className:m}=x,h=O(x,["class","className"]);return Object.entries(h).every(v=>{let[k,b]=v;return Array.isArray(b)?b.includes(T(T({},o),c)[k]):T(T({},o),c)[k]===b})?[...d,p,m]:d},[]);return wn(e,i,u,r==null?void 0:r.class,r==null?void 0:r.className)},xe=(e,t)=>{const r=Qi(e,t);return(s=>{const a=r(s);return w(a)})};class Me{static create(t,r="ease-in-out"){const s={fast:{value:"150ms",ms:150,tailwind:"duration-150"},base:{value:"200ms",ms:200,tailwind:"duration-200"},slow:{value:"300ms",ms:300,tailwind:"duration-300"},slower:{value:"500ms",ms:500,tailwind:"duration-500"}},a={"ease-in":{value:"cubic-bezier(0.4, 0, 1, 1)",tailwind:"ease-in",description:"Slow start, fast end"},"ease-out":{value:"cubic-bezier(0, 0, 0.2, 1)",tailwind:"ease-out",description:"Fast start, slow end"},"ease-in-out":{value:"cubic-bezier(0.4, 0, 0.2, 1)",tailwind:"ease-in-out",description:"Slow start and end, fast middle"},spring:{value:"cubic-bezier(0.68, -0.55, 0.265, 1.55)",tailwind:"ease-[cubic-bezier(0.68,-0.55,0.265,1.55)]",description:"Spring-like bounce effect"}};return{duration:s[t],easing:a[r]}}static createTransition(t,r="base",s="ease-in-out"){const a=this.create(r,s),o=Array.isArray(t)?t.join(", "):t,i=[a.duration.tailwind,a.easing.tailwind].join(" ");return{property:o,duration:a.duration.value,timingFunction:a.easing.value,tailwind:i}}}const el={fast:Me.create("fast"),base:Me.create("base"),slow:Me.create("slow"),slower:Me.create("slower"),colors:Me.createTransition(["color","background-color","border-color"],"base"),opacity:Me.createTransition("opacity","fast"),transform:Me.createTransition("transform","base"),all:Me.createTransition("all","base")};function tl(e,t){return Me.create(e,t)}function he(e,t="ease-in-out"){const r=Me.create(e,t);return`${r.duration.tailwind} ${r.easing.tailwind}`}function rl(e,t="base",r="ease-in-out"){return Me.createTransition(e,t,r).tailwind}class Ee{static create(t){return{base:{value:0,tailwind:"z-0",description:"Base layer for normal content"},dropdown:{value:1e3,tailwind:"z-[1000]",description:"Dropdown menus and select options"},sticky:{value:1020,tailwind:"z-[1020]",description:"Sticky headers and navigation"},fixed:{value:1030,tailwind:"z-[1030]",description:"Fixed position elements"},"modal-backdrop":{value:1040,tailwind:"z-[1040]",description:"Modal backdrop/overlay"},modal:{value:1050,tailwind:"z-[1050]",description:"Modal dialogs and drawers"},popover:{value:1060,tailwind:"z-[1060]",description:"Popovers and tooltips"},tooltip:{value:1070,tailwind:"z-[1070]",description:"Tooltips (highest priority)"},toast:{value:1080,tailwind:"z-[1080]",description:"Toast notifications (highest priority)"}}[t]}}const kn={base:Ee.create("base"),dropdown:Ee.create("dropdown"),sticky:Ee.create("sticky"),fixed:Ee.create("fixed"),"modal-backdrop":Ee.create("modal-backdrop"),modal:Ee.create("modal"),popover:Ee.create("popover"),tooltip:Ee.create("tooltip"),toast:Ee.create("toast")};function sl(e){return Ee.create(e)}function ue(e){return Ee.create(e).tailwind}class ge{static create(t){const r=t/100,s={0:"Fully transparent",5:"Very light overlay",10:"Light overlay",20:"Subtle overlay",25:"Quarter opacity",30:"Light background",40:"Semi-transparent",50:"Half opacity",60:"Semi-opaque",70:"Mostly opaque",75:"Three-quarter opacity",80:"High opacity",90:"Very high opacity",95:"Nearly opaque",100:"Fully opaque"};return{value:t,decimal:r,tailwind:{0:"opacity-0",5:"opacity-5",10:"opacity-10",20:"opacity-20",25:"opacity-25",30:"opacity-30",40:"opacity-40",50:"opacity-50",60:"opacity-60",70:"opacity-70",75:"opacity-75",80:"opacity-80",90:"opacity-90",95:"opacity-95",100:"opacity-100"}[t],description:s[t]}}}ge.create(0),ge.create(5),ge.create(10),ge.create(20),ge.create(25),ge.create(30),ge.create(40),ge.create(50),ge.create(60),ge.create(70),ge.create(75),ge.create(80),ge.create(90),ge.create(95),ge.create(100);function nl(e){return ge.create(e)}function al(e){return ge.create(e).tailwind}var ar={exports:{}},Pt={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var jn;function ol(){if(jn)return Pt;jn=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(s,a,o){var i=null;if(o!==void 0&&(i=""+o),a.key!==void 0&&(i=""+a.key),"key"in a){o={};for(var c in a)c!=="key"&&(o[c]=a[c])}else o=a;return a=o.ref,{$$typeof:e,type:s,key:i,ref:a!==void 0?a:null,props:o}}return Pt.Fragment=t,Pt.jsx=r,Pt.jsxs=r,Pt}var zt={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,167 +14,167 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var Nn;function il(){return Nn||(Nn=1,process.env.NODE_ENV!=="production"&&(function(){function e(D){if(D==null)return null;if(typeof D=="function")return D.$$typeof===A?null:D.displayName||D.name||null;if(typeof D=="string")return D;switch(D){case k:return"Fragment";case j:return"Profiler";case b:return"StrictMode";case N:return"Suspense";case _:return"SuspenseList";case F:return"Activity"}if(typeof D=="object")switch(typeof D.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),D.$$typeof){case v:return"Portal";case g:return D.displayName||"Context";case C:return(D._context.displayName||"Context")+".Consumer";case y:var B=D.render;return D=D.displayName,D||(D=B.displayName||B.name||"",D=D!==""?"ForwardRef("+D+")":"ForwardRef"),D;case S:return B=D.displayName||null,B!==null?B:e(D.type)||"Memo";case M:B=D._payload,D=D._init;try{return e(D(B))}catch(X){}}return null}function t(D){return""+D}function r(D){try{var B=!1}catch(H){B=!0}if(B){B=console;var X=B.error,Q=typeof Symbol=="function"&&Symbol.toStringTag&&D[Symbol.toStringTag]||D.constructor.name||"Object";return X.call(B,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Q),t(D)}}function s(D){if(D===k)return"<>";if(typeof D=="object"&&D!==null&&D.$$typeof===M)return"<...>";try{var B=e(D);return B?"<"+B+">":"<...>"}catch(X){return"<...>"}}function a(){var D=R.A;return D===null?null:D.getOwner()}function o(){return Error("react-stack-top-frame")}function i(D){if(I.call(D,"key")){var B=Object.getOwnPropertyDescriptor(D,"key").get;if(B&&B.isReactWarning)return!1}return D.key!==void 0}function c(D,B){function X(){Y||(Y=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",B))}X.isReactWarning=!0,Object.defineProperty(D,"key",{get:X,configurable:!0})}function u(){var D=e(this.type);return q[D]||(q[D]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),D=this.props.ref,D!==void 0?D:null}function d(D,B,X,Q,H,U){var V=X.ref;return D={$$typeof:x,type:D,key:B,props:X,_owner:Q},(V!==void 0?V:null)!==null?Object.defineProperty(D,"ref",{enumerable:!1,get:u}):Object.defineProperty(D,"ref",{enumerable:!1,value:null}),D._store={},Object.defineProperty(D._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(D,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(D,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:H}),Object.defineProperty(D,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:U}),Object.freeze&&(Object.freeze(D.props),Object.freeze(D)),D}function f(D,B,X,Q,H,U){var V=B.children;if(V!==void 0)if(Q)if(L(V)){for(Q=0;Q<V.length;Q++)p(V[Q]);Object.freeze&&Object.freeze(V)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else p(V);if(I.call(B,"key")){V=e(D);var ne=Object.keys(B).filter(function(ie){return ie!=="key"});Q=0<ne.length?"{key: someKey, "+ne.join(": ..., ")+": ...}":"{key: someKey}",se[V+Q]||(ne=0<ne.length?"{"+ne.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,Q,V,
|
|
22
|
+
<%s key={someKey} {...props} />`,Q,V,ne,V),se[V+Q]=!0)}if(V=null,X!==void 0&&(r(X),V=""+X),i(B)&&(r(B.key),V=""+B.key),"key"in B){X={};for(var oe in B)oe!=="key"&&(X[oe]=B[oe])}else X=B;return V&&c(X,typeof D=="function"?D.displayName||D.name||"Unknown":D),d(D,V,X,a(),H,U)}function p(D){m(D)?D._store&&(D._store.validated=1):typeof D=="object"&&D!==null&&D.$$typeof===M&&(D._payload.status==="fulfilled"?m(D._payload.value)&&D._payload.value._store&&(D._payload.value._store.validated=1):D._store&&(D._store.validated=1))}function m(D){return typeof D=="object"&&D!==null&&D.$$typeof===x}var h=l,x=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),g=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),A=Symbol.for("react.client.reference"),R=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=Object.prototype.hasOwnProperty,L=Array.isArray,z=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(D){return D()}};var Y,q={},W=h.react_stack_bottom_frame.bind(h,o)(),ae=z(s(o)),se={};zt.Fragment=k,zt.jsx=function(D,B,X){var Q=1e4>R.recentlyCreatedOwnerStacks++;return f(D,B,X,!1,Q?Error("react-stack-top-frame"):W,Q?z(s(D)):ae)},zt.jsxs=function(D,B,X){var Q=1e4>R.recentlyCreatedOwnerStacks++;return f(D,B,X,!0,Q?Error("react-stack-top-frame"):W,Q?z(s(D)):ae)}})()),zt}var Sn;function ll(){return Sn||(Sn=1,process.env.NODE_ENV==="production"?ar.exports=ol():ar.exports=il()),ar.exports}var n=ll();const oa=l.createContext(void 0);function ia({children:e,defaultTheme:t="light",storageKey:r="theme"}){const[s,a]=l.useState(()=>{if(typeof window=="undefined")return t;try{const d=localStorage.getItem(r);if(d==="light"||d==="dark")return d}catch(d){console.warn("Failed to read theme from localStorage:",d)}return t});l.useEffect(()=>{if(typeof window!="undefined"){try{localStorage.setItem(r,s)}catch(d){console.warn("Failed to save theme to localStorage:",d)}typeof document!="undefined"&&(document.documentElement.classList.remove("light","dark"),document.documentElement.classList.add(s))}},[s,r]);const u={theme:s,toggleTheme:()=>{a(d=>d==="light"?"dark":"light")},setTheme:d=>{a(d)},colors:s==="light"?qt:vr,isDark:s==="dark"};return n.jsx(oa.Provider,{value:u,children:e})}function cl(){const e=l.useContext(oa);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}const dl={breakpoints:yr,spacing:xr,typography:bt,animations:el,features:{reducedMotion:!1,highContrast:!1,debug:!1},behavior:{defaultAnimationDuration:200,defaultTransitionDuration:150,focusVisible:!0}},la=l.createContext(void 0);function ca({children:e,config:t,strategy:r="default"}){const s=l.useMemo(()=>{const d=T({},dl);return t?P(T(T({},d),t),{breakpoints:t.breakpoints||d.breakpoints,spacing:t.spacing||d.spacing,typography:t.typography||d.typography,animations:t.animations||d.animations,features:T(T({},d.features),t.features),behavior:T(T({},d.behavior),t.behavior)}):d},[t]);l.useEffect(()=>{typeof document!="undefined"&&(s.features.reducedMotion?document.documentElement.style.setProperty("--motion-reduce","1"):document.documentElement.style.removeProperty("--motion-reduce"))},[s.features.reducedMotion]),l.useEffect(()=>{typeof document!="undefined"&&(s.features.highContrast?document.documentElement.classList.add("high-contrast"):document.documentElement.classList.remove("high-contrast"))},[s.features.highContrast]);const a=l.useMemo(()=>d=>s.spacing[d],[s.spacing]),o=l.useMemo(()=>d=>s.breakpoints[d],[s.breakpoints]),i=l.useMemo(()=>d=>{var f;return(f=s.features[d])!=null?f:!1},[s.features]),c=l.useMemo(()=>d=>{console.warn("ConfigProvider: updateConfig called but config is immutable. Consider using state management for dynamic updates.")},[]),u={config:s,getSpacing:a,getBreakpoint:o,isFeatureEnabled:i,updateConfig:c};return n.jsx(la.Provider,{value:u,children:e})}function ul(){const e=l.useContext(la);if(e===void 0)throw new Error("useConfig must be used within a ConfigProvider");return e}const wr=l.createContext(void 0);function ms(){const e=l.useContext(wr);if(!e)throw new Error("Toast components must be used within a ToastProvider");return e}function fl(){return l.useContext(wr)}function da({children:e,defaultDuration:t=5e3,maxToasts:r=5}){const[s,a]=l.useState([]),o=l.useCallback(d=>{var m;const f=`toast-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,p=P(T({},d),{id:f,duration:(m=d.duration)!=null?m:t});return a(h=>[p,...h].slice(0,r)),f},[t,r]),i=l.useCallback(d=>{a(f=>f.filter(p=>p.id!==d))},[]),c=l.useCallback(()=>{a([])},[]),u={toasts:s,addToast:o,removeToast:i,clearAll:c};return n.jsx(wr.Provider,{value:u,children:e})}const kr=l.createContext(void 0);function Dt(){const e=l.useContext(kr);if(!e)throw new Error("Dialog components must be used within a Dialog component");return e}function ml(){return l.useContext(kr)}function ps({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,titleId:a,descriptionId:o}){const[i,c]=l.useState(r),u=l.useRef(null),d=t!==void 0?t:i,f=m=>{t===void 0&&c(m),s==null||s(m)};l.useEffect(()=>{if(d)u.current=document.activeElement;else{const m=setTimeout(()=>{var h;(h=u.current)==null||h.focus()},0);return()=>clearTimeout(m)}},[d]),l.useEffect(()=>(d?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[d]);const p={isOpen:d,onOpenChange:f,onClose:()=>f(!1),titleId:a,descriptionId:o};return n.jsx(kr.Provider,{value:p,children:e})}const pl={ThemeProvider:ia,ConfigProvider:ca,ToastProvider:da,DialogProvider:ps},or=pl;function hl(e,t){const{theme:r,config:s,toast:a,dialog:o,providers:i={theme:!0,config:!0,toast:!0,dialog:!0}}=t||{};let c=e;return i.dialog&&(c=n.jsx(or.DialogProvider,P(T({},o),{children:c}))),i.toast&&(c=n.jsx(or.ToastProvider,P(T({},a),{children:c}))),i.config&&(c=n.jsx(or.ConfigProvider,P(T({},s),{children:c}))),i.theme&&(c=n.jsx(or.ThemeProvider,P(T({},r),{children:c}))),c}function bl({children:e,config:t}){const r=l.useMemo(()=>hl(e,t),[e,t]);return n.jsx(n.Fragment,{children:r})}function gl(){return{}}class Ke{static create(t){const s={none:{px:0,tailwind:"rounded-none",description:"No border radius"},sm:{px:2,tailwind:"rounded-sm",description:"Small radius (2px) for subtle rounding"},md:{px:6,tailwind:"rounded-md",description:"Medium radius (6px) for buttons and inputs"},lg:{px:8,tailwind:"rounded-lg",description:"Large radius (8px) for cards and containers"},xl:{px:12,tailwind:"rounded-xl",description:"Extra large radius (12px) for prominent elements"},"2xl":{px:16,tailwind:"rounded-2xl",description:"2X large radius (16px) for large containers"},"3xl":{px:24,tailwind:"rounded-3xl",description:"3X large radius (24px) for very large containers"},full:{px:9999,tailwind:"rounded-full",description:"Full radius for circular elements"}}[t];return{value:s.px,rem:`${s.px/16}rem`,px:`${s.px}px`,tailwind:s.tailwind,description:s.description}}}const xl={none:Ke.create("none"),sm:Ke.create("sm"),md:Ke.create("md"),lg:Ke.create("lg"),xl:Ke.create("xl"),"2xl":Ke.create("2xl"),"3xl":Ke.create("3xl"),full:Ke.create("full")};function J(e){return xl[e].tailwind}function vl(s){var a=s,{variant:e="info",className:t}=a,r=O(a,["variant","className"]);const o={warning:w("bg-warning-bg","text-warning-dark","border-warning"),error:w("bg-error-bg","text-error-dark","border-error"),info:w("bg-info-bg","text-info-dark","border-info")};return n.jsx("div",T({role:"alert",className:w("border",E("base","px"),E("sm","py"),J("lg"),o[e],t)},r))}const yl={primary:{light:"text-indigo-400",DEFAULT:"text-fg-brand",dark:"text-indigo-600",contrast:"text-fg-inverse"},secondary:{light:"text-pink-300",DEFAULT:"text-fg-brand-secondary",dark:"text-pink-600",contrast:"text-fg-inverse"},success:{light:"text-green-300",DEFAULT:"text-fg-success",dark:"text-success-dark",contrast:"text-fg-inverse"},warning:{light:"text-yellow-300",DEFAULT:"text-fg-warning",dark:"text-warning-dark",contrast:"text-fg-inverse"},error:{light:"text-red-300",DEFAULT:"text-fg-error",dark:"text-error-dark",contrast:"text-fg-inverse"},info:{light:"text-blue-300",DEFAULT:"text-fg-info",dark:"text-info-dark",contrast:"text-fg-inverse"},neutral:{light:"text-fg-tertiary",DEFAULT:"text-fg-secondary",dark:"text-fg-primary",contrast:"text-fg-inverse"}};function wl(f,d){var p=f,{variant:e="paragraph",bold:t,italic:r,className:s,as:a,color:o,colorRole:i="neutral",colorShade:c="dark"}=p,u=O(p,["variant","bold","italic","className","as","color","colorRole","colorShade"]);const m=[];let h;if(a)h=a;else switch(e){case"heading":h="h2";break;case"list":h="li";break;case"paragraph":default:h="p";break}return e==="heading"?m.push(ce("h2")):e==="body"||e==="paragraph"?m.push(ce("body")):e==="bodySmall"?m.push(ce("bodySmall")):e==="bodyLarge"?m.push(ce("bodyLarge")):e==="caption"?m.push(ce("caption")):e==="label"?m.push(ce("label")):m.push(ce("body")),t&&m.push("font-bold"),r&&m.push("italic"),m.push(yl[i][c]),n.jsx(h,T({ref:d,className:w(...m,s)},u))}const Be=l.forwardRef(wl);/**
|
|
23
23
|
* @license lucide-react v0.552.0 - ISC
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the ISC license.
|
|
26
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/const
|
|
27
|
+
*/const kl=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jl=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,s)=>s?s.toUpperCase():r.toLowerCase()),Cn=e=>{const t=jl(e);return t.charAt(0).toUpperCase()+t.slice(1)},ua=(...e)=>e.filter((t,r,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===r).join(" ").trim(),Nl=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
28
28
|
* @license lucide-react v0.552.0 - ISC
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the ISC license.
|
|
31
31
|
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/var
|
|
32
|
+
*/var Sl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
33
33
|
* @license lucide-react v0.552.0 - ISC
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the ISC license.
|
|
36
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/const
|
|
37
|
+
*/const Cl=l.forwardRef((d,u)=>{var f=d,{color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:a="",children:o,iconNode:i}=f,c=O(f,["color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode"]);return l.createElement("svg",T(T(P(T({ref:u},Sl),{width:t,height:t,stroke:e,strokeWidth:s?Number(r)*24/Number(t):r,className:ua("lucide",a)}),!o&&!Nl(c)&&{"aria-hidden":"true"}),c),[...i.map(([p,m])=>l.createElement(p,m)),...Array.isArray(o)?o:[o]])});/**
|
|
38
38
|
* @license lucide-react v0.552.0 - ISC
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the ISC license.
|
|
41
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/const
|
|
42
|
+
*/const le=(e,t)=>{const r=l.forwardRef((i,o)=>{var c=i,{className:s}=c,a=O(c,["className"]);return l.createElement(Cl,T({ref:o,iconNode:t,className:ua(`lucide-${kl(Cn(e))}`,`lucide-${e}`,s)},a))});return r.displayName=Cn(e),r};/**
|
|
43
43
|
* @license lucide-react v0.552.0 - ISC
|
|
44
44
|
*
|
|
45
45
|
* This source code is licensed under the ISC license.
|
|
46
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const
|
|
47
|
+
*/const $l=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],El=le("arrow-up-down",$l);/**
|
|
48
48
|
* @license lucide-react v0.552.0 - ISC
|
|
49
49
|
*
|
|
50
50
|
* This source code is licensed under the ISC license.
|
|
51
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/const
|
|
52
|
+
*/const Ml=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Tl=le("calendar",Ml);/**
|
|
53
53
|
* @license lucide-react v0.552.0 - ISC
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the ISC license.
|
|
56
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/const
|
|
57
|
+
*/const Al=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ns=le("check",Al);/**
|
|
58
58
|
* @license lucide-react v0.552.0 - ISC
|
|
59
59
|
*
|
|
60
60
|
* This source code is licensed under the ISC license.
|
|
61
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/const
|
|
62
|
+
*/const Rl=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],hs=le("chevron-down",Rl);/**
|
|
63
63
|
* @license lucide-react v0.552.0 - ISC
|
|
64
64
|
*
|
|
65
65
|
* This source code is licensed under the ISC license.
|
|
66
66
|
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const
|
|
67
|
+
*/const Il=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Bt=le("chevron-left",Il);/**
|
|
68
68
|
* @license lucide-react v0.552.0 - ISC
|
|
69
69
|
*
|
|
70
70
|
* This source code is licensed under the ISC license.
|
|
71
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/const
|
|
72
|
+
*/const Dl=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ht=le("chevron-right",Dl);/**
|
|
73
73
|
* @license lucide-react v0.552.0 - ISC
|
|
74
74
|
*
|
|
75
75
|
* This source code is licensed under the ISC license.
|
|
76
76
|
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/const
|
|
77
|
+
*/const Ll=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],bs=le("circle-alert",Ll);/**
|
|
78
78
|
* @license lucide-react v0.552.0 - ISC
|
|
79
79
|
*
|
|
80
80
|
* This source code is licensed under the ISC license.
|
|
81
81
|
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const
|
|
82
|
+
*/const Fl=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],dr=le("circle-check",Fl);/**
|
|
83
83
|
* @license lucide-react v0.552.0 - ISC
|
|
84
84
|
*
|
|
85
85
|
* This source code is licensed under the ISC license.
|
|
86
86
|
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const
|
|
87
|
+
*/const _l=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Pl=le("clock",_l);/**
|
|
88
88
|
* @license lucide-react v0.552.0 - ISC
|
|
89
89
|
*
|
|
90
90
|
* This source code is licensed under the ISC license.
|
|
91
91
|
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const
|
|
92
|
+
*/const zl=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],Ol=le("command",zl);/**
|
|
93
93
|
* @license lucide-react v0.552.0 - ISC
|
|
94
94
|
*
|
|
95
95
|
* This source code is licensed under the ISC license.
|
|
96
96
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const
|
|
97
|
+
*/const Vl=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Wl=le("download",Vl);/**
|
|
98
98
|
* @license lucide-react v0.552.0 - ISC
|
|
99
99
|
*
|
|
100
100
|
* This source code is licensed under the ISC license.
|
|
101
101
|
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/const
|
|
102
|
+
*/const Hl=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],Bl=le("ellipsis-vertical",Hl);/**
|
|
103
103
|
* @license lucide-react v0.552.0 - ISC
|
|
104
104
|
*
|
|
105
105
|
* This source code is licensed under the ISC license.
|
|
106
106
|
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const
|
|
107
|
+
*/const Ul=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],ql=le("eye-off",Ul);/**
|
|
108
108
|
* @license lucide-react v0.552.0 - ISC
|
|
109
109
|
*
|
|
110
110
|
* This source code is licensed under the ISC license.
|
|
111
111
|
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const
|
|
112
|
+
*/const Gl=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Kl=le("eye",Gl);/**
|
|
113
113
|
* @license lucide-react v0.552.0 - ISC
|
|
114
114
|
*
|
|
115
115
|
* This source code is licensed under the ISC license.
|
|
116
116
|
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const
|
|
117
|
+
*/const Yl=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],Xl=le("file",Yl);/**
|
|
118
118
|
* @license lucide-react v0.552.0 - ISC
|
|
119
119
|
*
|
|
120
120
|
* This source code is licensed under the ISC license.
|
|
121
121
|
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const
|
|
122
|
+
*/const Jl=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Zl=le("funnel",Jl);/**
|
|
123
123
|
* @license lucide-react v0.552.0 - ISC
|
|
124
124
|
*
|
|
125
125
|
* This source code is licensed under the ISC license.
|
|
126
126
|
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/const
|
|
127
|
+
*/const Ql=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],ec=le("grip-vertical",Ql);/**
|
|
128
128
|
* @license lucide-react v0.552.0 - ISC
|
|
129
129
|
*
|
|
130
130
|
* This source code is licensed under the ISC license.
|
|
131
131
|
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
-
*/const
|
|
132
|
+
*/const tc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],rc=le("info",tc);/**
|
|
133
133
|
* @license lucide-react v0.552.0 - ISC
|
|
134
134
|
*
|
|
135
135
|
* This source code is licensed under the ISC license.
|
|
136
136
|
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
-
*/const
|
|
137
|
+
*/const sc=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],fa=le("loader-circle",sc);/**
|
|
138
138
|
* @license lucide-react v0.552.0 - ISC
|
|
139
139
|
*
|
|
140
140
|
* This source code is licensed under the ISC license.
|
|
141
141
|
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
-
*/const
|
|
142
|
+
*/const nc=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],ac=le("menu",nc);/**
|
|
143
143
|
* @license lucide-react v0.552.0 - ISC
|
|
144
144
|
*
|
|
145
145
|
* This source code is licensed under the ISC license.
|
|
146
146
|
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
-
*/const
|
|
147
|
+
*/const oc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],ic=le("panel-left-close",oc);/**
|
|
148
148
|
* @license lucide-react v0.552.0 - ISC
|
|
149
149
|
*
|
|
150
150
|
* This source code is licensed under the ISC license.
|
|
151
151
|
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/const
|
|
152
|
+
*/const lc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],cc=le("panel-left-open",lc);/**
|
|
153
153
|
* @license lucide-react v0.552.0 - ISC
|
|
154
154
|
*
|
|
155
155
|
* This source code is licensed under the ISC license.
|
|
156
156
|
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
-
*/const
|
|
157
|
+
*/const dc=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],as=le("search",dc);/**
|
|
158
158
|
* @license lucide-react v0.552.0 - ISC
|
|
159
159
|
*
|
|
160
160
|
* This source code is licensed under the ISC license.
|
|
161
161
|
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
-
*/const
|
|
162
|
+
*/const uc=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],jt=le("star",uc);/**
|
|
163
163
|
* @license lucide-react v0.552.0 - ISC
|
|
164
164
|
*
|
|
165
165
|
* This source code is licensed under the ISC license.
|
|
166
166
|
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
-
*/const
|
|
167
|
+
*/const fc=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],mc=le("triangle-alert",fc);/**
|
|
168
168
|
* @license lucide-react v0.552.0 - ISC
|
|
169
169
|
*
|
|
170
170
|
* This source code is licensed under the ISC license.
|
|
171
171
|
* See the LICENSE file in the root directory of this source tree.
|
|
172
|
-
*/const
|
|
172
|
+
*/const pc=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],hc=le("upload",pc);/**
|
|
173
173
|
* @license lucide-react v0.552.0 - ISC
|
|
174
174
|
*
|
|
175
175
|
* This source code is licensed under the ISC license.
|
|
176
176
|
* See the LICENSE file in the root directory of this source tree.
|
|
177
|
-
*/const hc=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],we=ie("x",hc),bc=xe("motion-safe:animate-spin",{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-8 w-8"},variant:{primary:"text-fg-brand",secondary:"text-fg-brand-secondary",neutral:"text-fg-secondary"}},defaultVariants:{size:"md",variant:"primary"}}),bs=l.memo(function(i){var c=i,{size:t="md",variant:r="primary",label:s,className:a=""}=c,o=O(c,["size","variant","label","className"]);return n.jsxs("div",P(R({className:w("inline-flex","items-center",a),role:"status","aria-label":s||"Loading","aria-live":"polite"},o),{children:[n.jsx(ua,{className:w(bc({size:t,variant:r})),"aria-hidden":"true"}),s&&n.jsx("span",{className:w(T("sm","ml"),re("bodySmall"),"text-fg-secondary","sr-only"),children:s})]}))});bs.displayName="Spinner";const gc=xe(w("inline-flex","items-center","justify-center",ce("button").split(" ")[2]||"font-medium",J("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{primary:w("bg-surface-brand","text-fg-inverse","hover:opacity-90","focus:ring-line-brand"),secondary:w("bg-surface-secondary","text-fg-inverse","hover:opacity-90","focus:ring-line-secondary"),error:w("bg-error","text-fg-inverse","hover:opacity-90","focus:ring-error"),outline:w("border-2","border-line-default","bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),ghost:w("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),iconOnly:w("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus","p-0")},size:{sm:w(T("md","px"),T("1.5","py"),re("bodySmall"),T("1.5","gap")),md:w(T("base","px"),T("sm","py"),re("body"),T("sm","gap")),lg:w(T("lg","px"),T("md","py"),re("bodyLarge"),T("2.5","gap"))}},compoundVariants:[{variant:"iconOnly",size:"sm",class:w("h-8","w-8","p-0")},{variant:"iconOnly",size:"md",class:w("h-10","w-10","p-0")},{variant:"iconOnly",size:"lg",class:w("h-12","w-12","p-0")}],defaultVariants:{variant:"primary",size:"md"}});function Cn({children:e,position:t}){return e?n.jsx("span",{className:`inline-flex items-center ${t==="left"?"mr-0":"ml-0"}`,children:e}):null}const Z=l.memo(l.forwardRef(function(k,y){var g=k,{variant:t="primary",size:r="md",isLoading:s=!1,loadingText:a,loadingIcon:o,leftIcon:i,rightIcon:c,fullWidth:u=!1,as:d="button",className:f="",disabled:p=!1,children:m,"aria-label":h}=g,x=O(g,["variant","size","isLoading","loadingText","loadingIcon","leftIcon","rightIcon","fullWidth","as","className","disabled","children","aria-label"]);const j=l.useMemo(()=>w(gc({variant:t,size:r}),u&&"w-full",f),[t,r,u,f]),C=l.useMemo(()=>t==="iconOnly"||!m&&(i||c),[t,m,i,c]),b=l.useMemo(()=>C&&!h&&!m?"Button":h,[C,h,m]),v=l.useMemo(()=>t==="error"?"primary":t==="primary"||t==="secondary"?"neutral":"primary",[t]),N=l.useMemo(()=>r==="sm"?"sm":r==="lg"?"lg":"md",[r]),D=l.useMemo(()=>o||n.jsx(bs,{size:N,variant:v}),[o,N,v]),S=d==="button"&&!x.type?"button":void 0,A=R(R({className:j,disabled:p||s,"aria-busy":s,"aria-label":b,"aria-disabled":p||s},S?{type:S}:{}),x);return n.jsx(d,P(R({ref:y},A),{children:s?n.jsxs(n.Fragment,{children:[D,a&&n.jsx("span",{className:"ml-2",children:a}),!a&&m&&n.jsx("span",{className:"ml-2 opacity-0",children:m})]}):n.jsxs(n.Fragment,{children:[i&&n.jsx(Cn,{position:"left",children:i}),m,c&&n.jsx(Cn,{position:"right",children:c})]})}))}));Z.displayName="Button";const xc=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>w(T("xs","mt"),ce("caption"),t&&"text-fg-error",r&&"text-fg-success",!t&&!r&&"text-fg-secondary"),[t,r]),c=l.useMemo(()=>s||(t?"Error":r?"Success":""),[s,t,r]);return n.jsx("div",{id:a||o,className:i,role:t||r?"alert":void 0,children:c})}),ke=l.memo(l.forwardRef(function(C,j){var b=C,{id:t,label:r,error:s=!1,success:a=!1,helperText:o,size:i="md",variant:c="outlined",leftIcon:u,rightIcon:d,showClearButton:f=!1,onClear:p,className:m="",disabled:h=!1,type:x="text",value:y,onChange:k}=b,g=O(b,["id","label","error","success","helperText","size","variant","leftIcon","rightIcon","showClearButton","onClear","className","disabled","type","value","onChange"]);const v=l.useMemo(()=>t||`input-${Math.random().toString(36).substr(2,9)}`,[t]),N=l.useMemo(()=>s?`${v}-error`:void 0,[s,v]),D=l.useMemo(()=>o?`${v}-helper`:void 0,[o,v]),[S,A]=l.useState(!1),M=l.useMemo(()=>x==="password",[x]),$=l.useMemo(()=>M&&S?"text":x,[M,S,x]),L=l.useMemo(()=>s?"error":a?"success":"default",[s,a]),_=l.useMemo(()=>y!=null&&y!=="",[y]),F=l.useMemo(()=>f&&_&&!h,[f,_,h]),z=l.useMemo(()=>"focus:border-line-focus",[]),X=l.useMemo(()=>"focus:border-error",[]),q=l.useMemo(()=>"focus:border-success",[]),H=l.useMemo(()=>z.replace("focus:border-","focus:ring-"),[z]),le=l.useCallback(V=>V==="error"?X.replace("focus:border-","focus:ring-"):q.replace("focus:border-","focus:ring-"),[X,q]),ne=xe(w("w-full",J("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{default:w("border-0","border-b-2","border-line-default","focus:border-line-focus"),outlined:w("border","border-line-default","focus:border-line-focus"),filled:w("bg-surface-muted","border-0","focus:bg-surface-base","focus:ring-2",H)},size:{sm:w("h-8",re("bodySmall"),T("md","px")),md:w("h-10",re("body"),T("base","px")),lg:w("h-12",re("bodyLarge"),T("lg","px"))},state:{default:"",error:w("border-error","focus:border-error",le("error")),success:w("border-success","focus:border-success",le("success"))}},defaultVariants:{variant:"outlined",size:"md",state:"default"}}),I=l.useMemo(()=>w(ne({variant:c,size:i,state:L}),u&&(i==="sm"?"pl-9":i==="lg"?"pl-12":"pl-10"),(d||F||M)&&(i==="sm"?"pr-9":i==="lg"?"pr-12":"pr-10"),m),[c,i,L,u,d,F,M,m]),B=l.useMemo(()=>w("block",ce("label"),T("xs","mb"),h&&"opacity-50"),[h]),Y=l.useMemo(()=>i==="sm"?"h-4 w-4":i==="lg"?"h-5 w-5":"h-4 w-4",[i]),Q=l.useMemo(()=>i==="sm"?"top-2":i==="lg"?"top-3.5":"top-2.5",[i]),W=l.useCallback(V=>{var se;if(V.stopPropagation(),p)p();else if(k){const ae=(se=V.currentTarget.closest(".relative"))==null?void 0:se.querySelector("input");if(ae){const oe={target:ae,currentTarget:ae,bubbles:!0,cancelable:!0,defaultPrevented:!1,eventPhase:2,isTrusted:!1,nativeEvent:new Event("change"),preventDefault:()=>{},stopPropagation:()=>{},persist:()=>{},timeStamp:Date.now()};Object.defineProperty(oe.target,"value",{value:"",writable:!0}),Object.defineProperty(oe.currentTarget,"value",{value:"",writable:!0}),k(oe)}}},[p,k]),U=l.useCallback(()=>{A(V=>!V)},[]);return n.jsxs("div",{className:"w-full",children:[r&&n.jsx("label",{htmlFor:v,className:B,children:r}),n.jsxs("div",{className:"relative",children:[u&&n.jsx("div",{className:`absolute left-3 ${Q} text-fg-secondary opacity-60 pointer-events-none`,children:n.jsx("div",{className:Y,children:u})}),n.jsx("input",R({id:v,ref:j,type:$,className:I,disabled:h,value:y,onChange:k,"aria-invalid":s,"aria-required":g.required,"aria-describedby":N||D,suppressHydrationWarning:!0},g)),n.jsxs("div",{className:"absolute right-3 top-0 bottom-0 flex items-center gap-1",children:[F&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:W,className:"h-auto p-1","aria-label":"Clear input",children:n.jsx(we,{className:Y})}),M&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:U,className:"h-auto p-1","aria-label":S?"Hide password":"Show password",children:S?n.jsx(Ul,{className:Y}):n.jsx(Gl,{className:Y})}),d&&!F&&!M&&n.jsx("div",{className:`text-fg-secondary opacity-60 pointer-events-none ${Y}`,children:d})]})]}),(s||a||o)&&n.jsx(xc,{error:s,success:a,helperText:o,errorId:N,helperId:D})]})}));ke.displayName="Input";function fa({href:e,active:t}){const r=l.useMemo(()=>t!==void 0?t:!1,[t]),s=l.useMemo(()=>{try{const a=typeof require!="undefined"?require("next/link"):null;return a==null?void 0:a.default}catch(a){return}},[]);return{isActive:r,NextLink:s}}const vc=xe(w("inline-flex","items-center","transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","disabled:pointer-events-none","no-underline"),{variants:{variant:{default:w("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","focus:ring-line-brand"),underline:w("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","border-b-2","border-transparent","hover:border-current","focus:ring-line-brand"),background:w("text-fg-primary","hover:bg-surface-hover","rounded-md",J("md"),"focus:ring-line-brand")},size:{sm:w(T("sm","px"),T("xs","py"),re("bodySmall")),md:w(T("base","px"),T("sm","py"),re("body")),lg:w(T("lg","px"),T("md","py"),re("bodyLarge"))}},defaultVariants:{variant:"default",size:"md"},compoundVariants:[{variant:"underline",size:"sm",class:T("0.5","pb")},{variant:"underline",size:"md",class:T("xs","pb")},{variant:"underline",size:"lg",class:T("1.5","pb")},{variant:"background",size:"sm",class:T("xs","px")},{variant:"background",size:"md",class:T("sm","px")},{variant:"background",size:"lg",class:T("base","px")}]});function gs(m){var h=m,{href:e,children:t,active:r,disabled:s=!1,variant:a="default",size:o="md",as:i,className:c,"aria-label":u,onClick:d,onKeyDown:f}=h,p=O(h,["href","children","active","disabled","variant","size","as","className","aria-label","onClick","onKeyDown"]);const x=l.useMemo(()=>r!==void 0?r:!1,[r]),{NextLink:y}=fa({href:e,active:x}),k=i||y||"a",g=l.useMemo(()=>{if(!x)return"";switch(a){case"underline":return w("border-b-2","border-line-brand","text-fg-brand-emphasis");case"background":return w("bg-surface-brand-muted","text-fg-brand-emphasis");case"default":default:return w("text-fg-brand-emphasis","font-semibold")}},[x,a]),j=l.useCallback(v=>{if(s){v.preventDefault(),v.stopPropagation();return}d==null||d(v)},[s,d]),C=l.useCallback(v=>{if(s){(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),v.stopPropagation());return}f==null||f(v)},[s,f]),b=l.useMemo(()=>{const v=R({className:w(vc({variant:a,size:o}),g,s&&"opacity-50 cursor-not-allowed pointer-events-none",c),"aria-current":x?"page":void 0,"aria-disabled":s?!0:void 0,"aria-label":u,tabIndex:s?-1:void 0,onClick:j,onKeyDown:C,"data-active":x,"data-disabled":s},p);return y&&!i?P(R({},v),{href:s?void 0:e}):P(R({},v),{href:s?void 0:e})},[a,o,g,s,c,x,u,j,C,e,y,i,p]);return n.jsx(k,P(R({},b),{children:t}))}const yc=xe(w("inline-flex","items-center","justify-center",Fe("label"),J("md"),"border"),{variants:{variant:{success:"",warning:"",error:"",info:"",neutral:"",primary:"",secondary:""},size:{sm:w(T("1.5","px"),T("0.5","py"),re("caption")),md:w(T("sm","px"),T("xs","py"),re("caption")),lg:w(T("sm","px"),T("xs","py"),re("bodySmall"))},style:{solid:"",outline:""}},compoundVariants:[{variant:"success",style:"solid",class:w("bg-success-bg","text-success-dark","border-success")},{variant:"warning",style:"solid",class:w("bg-warning-bg","text-warning-dark","border-warning")},{variant:"error",style:"solid",class:w("bg-error-bg","text-error-dark","border-error")},{variant:"info",style:"solid",class:w("bg-info-bg","text-info-dark","border-info")},{variant:"neutral",style:"solid",class:w("bg-surface-muted","text-fg-primary","border-line-default")},{variant:"primary",style:"solid",class:w("bg-surface-brand-subtle","text-fg-brand-emphasis","border-line-brand")},{variant:"secondary",style:"solid",class:w("bg-pink-300","text-fg-brand-secondary-emphasis","border-line-secondary")},{variant:"success",style:"outline",class:w("bg-transparent","border-success","text-fg-success")},{variant:"warning",style:"outline",class:w("bg-transparent","border-warning","text-fg-warning")},{variant:"error",style:"outline",class:w("bg-transparent","border-error","text-fg-error")},{variant:"info",style:"outline",class:w("bg-transparent","border-info","text-fg-info")},{variant:"neutral",style:"outline",class:w("bg-transparent","border-line-default","text-fg-secondary")},{variant:"primary",style:"outline",class:w("bg-transparent","border-line-brand","text-fg-brand")},{variant:"secondary",style:"outline",class:w("bg-transparent","border-line-secondary","text-fg-brand-secondary")}],defaultVariants:{variant:"neutral",size:"md",style:"solid"}}),ma=l.memo(l.forwardRef(function(d,u){var f=d,{variant:t="neutral",size:r="md",style:s="solid",className:a="",children:o,"aria-label":i}=f,c=O(f,["variant","size","style","className","children","aria-label"]);const p=l.useMemo(()=>w(yc({variant:t,size:r,style:s}),a),[t,r,s,a]),m=l.useMemo(()=>{if(i)return i;if(typeof o=="string")return o;if(typeof o=="object"&&o!==null&&"props"in o){const h=o.props;if(h!=null&&h.children&&typeof h.children=="string")return h.children}},[i,o]);return n.jsx("span",P(R({ref:u,role:"status","aria-label":m,className:p},c),{children:o}))}));ma.displayName="Badge";const wc=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>w(T("xs","mt"),ce("caption"),t&&"text-fg-error",r&&"text-fg-success",!t&&!r&&"text-fg-secondary"),[t,r]),c=l.useMemo(()=>s||(t?"Error":r?"Success":""),[s,t,r]);return n.jsx("div",{id:a||o,className:i,role:t||r?"alert":void 0,children:c})}),kr=l.memo(l.forwardRef(function(x,h){var y=x,{options:t=[],optionGroups:r,placeholder:s,label:a,error:o=!1,success:i=!1,helperText:c,size:u="md",className:d="",disabled:f=!1,id:p}=y,m=O(y,["options","optionGroups","placeholder","label","error","success","helperText","size","className","disabled","id"]);const k=l.useMemo(()=>p||`select-${Math.random().toString(36).substr(2,9)}`,[p]),g=l.useMemo(()=>o?`${k}-error`:void 0,[o,k]),j=l.useMemo(()=>c?`${k}-helper`:void 0,[c,k]),C=l.useMemo(()=>"focus:border-line-focus",[]),b=l.useMemo(()=>"focus:border-error",[]),v=l.useMemo(()=>"focus:border-success",[]),N=l.useCallback($=>$==="error"?b.replace("focus:border-","focus:ring-"):$==="success"?v.replace("focus:border-","focus:ring-"):C.replace("focus:border-","focus:ring-"),[b,v,C]),D=xe(w("block","w-full",J("md"),"border","bg-surface-base","transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{size:{sm:w("h-8",re("bodySmall"),T("md","px")),md:w("h-10",re("body"),T("base","px")),lg:w("h-12",re("bodyLarge"),T("lg","px"))},state:{default:w("border-line-default",N()),error:w("border-error",N("error")),success:w("border-success",N("success"))}},defaultVariants:{size:"md",state:"default"}}),S=l.useMemo(()=>o?"error":i?"success":"default",[o,i]),A=l.useMemo(()=>w(D({size:u,state:S}),d),[u,S,d]),M=l.useMemo(()=>w("block",ce("label"),T("xs","mb"),f&&"opacity-50"),[f]);return n.jsxs("div",{className:"w-full",children:[a&&n.jsx("label",{htmlFor:k,className:M,children:a}),n.jsxs("select",P(R({id:k,ref:h,className:A,disabled:f,"aria-invalid":o,"aria-required":m.required,"aria-describedby":g||j},m),{children:[s&&n.jsx("option",{value:"",disabled:!0,children:s}),r&&r.length>0?r.map(($,L)=>n.jsx("optgroup",{label:$.label,children:($.options||[]).map(_=>n.jsx("option",{value:_.value,disabled:_.disabled,children:_.label},_.value))},L)):(t||[]).map($=>n.jsx("option",{value:$.value,disabled:$.disabled,children:$.label},$.value))]})),(o||i||c)&&n.jsx(wc,{error:o,success:i,helperText:c,errorId:g,helperId:j})]})}));kr.displayName="Select";const pa=l.memo(l.forwardRef(function(i,o){var c=i,{error:t=!1,resize:r="vertical",className:s=""}=c,a=O(c,["error","resize","className"]);const u=l.useMemo(()=>"focus:border-line-focus",[]),d=l.useMemo(()=>"focus:border-error",[]),f=l.useMemo(()=>t?d.replace("focus:border-","focus:ring-"):u.replace("focus:border-","focus:ring-"),[t,d,u]),p=l.useMemo(()=>({none:"resize-none",both:"resize",horizontal:"resize-x",vertical:"resize-y"}),[]),m=l.useMemo(()=>w("block","w-full",J("md"),T("base","px"),T("md","py"),"border",re("body"),"focus:outline-none","focus:ring-2","focus:ring-offset-2",p[r],w(t?"border-error":"border-line-default",f),s),[r,p,t,f,s]),h=l.useMemo(()=>t&&a.id?`${a.id}-error`:void 0,[t,a.id]);return n.jsx("textarea",R({ref:o,className:m,"aria-invalid":t,"aria-describedby":h},a))}));pa.displayName="Textarea";const Mt=l.memo(l.forwardRef(function(i,o){var c=i,{variant:t="default",className:r="",children:s}=c,a=O(c,["variant","className","children"]);const u=l.useMemo(()=>w("block",re("label"),Fe("label"),"text-fg-primary"),[]),d=l.useMemo(()=>({default:"",required:w("after:content-['*']",`after:${T("0.5","ml")}`,"after:text-fg-error"),optional:w("after:content-['(optional)']","after:ml-1","after:text-fg-tertiary","after:font-normal")}),[]),f=l.useMemo(()=>w(u,d[t],r),[u,d,t,r]);return n.jsx("label",P(R({ref:o,className:f},a),{children:s}))}));Mt.displayName="Label";function ha(a){var o=a,{message:e,id:t,className:r=""}=o,s=O(o,["message","id","className"]);const i=[T("xs","mt"),re("bodySmall"),"text-fg-error","flex","items-center",T("xs","gap")],c=w(...i,r);return n.jsxs("div",P(R({role:"alert",id:t,className:c,"aria-live":"polite"},s),{children:[n.jsx(hs,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),n.jsx("span",{children:e})]}))}class Ie{static createWidth(t){const s={none:{px:0,tailwind:"border-0"},thin:{px:1,tailwind:"border"},base:{px:1,tailwind:"border"},medium:{px:2,tailwind:"border-2"},thick:{px:4,tailwind:"border-4"}}[t];return{value:s.px,px:`${s.px}px`,tailwind:s.tailwind}}static create(t,r="solid"){return{width:this.createWidth(t),style:r,description:`${t} ${r} border`}}}Ie.create("none"),Ie.create("thin"),Ie.create("base"),Ie.create("medium"),Ie.create("thick"),Ie.create("thin","dashed"),Ie.create("base","dashed"),Ie.create("thin","dotted"),Ie.create("base","dotted");function kc(e){return Ie.createWidth(e).tailwind}function Bt(u){var d=u,{content:e,children:t,position:r="top",delay:s=200,className:a="","aria-label":o,preservePositioning:i=!1}=d,c=O(d,["content","children","position","delay","className","aria-label","preservePositioning"]);const[f,p]=l.useState(!1),m=l.useRef(null),h=l.useRef(null),x=l.useRef(null),y=`tooltip-${Math.random().toString(36).substr(2,9)}`,k=()=>{const M=setTimeout(()=>{p(!0)},s);m.current=M},g=()=>{m.current&&(clearTimeout(m.current),m.current=null),p(!1)},j=()=>{p(!0)},C=()=>{p(!1)},b=M=>{var $;M.key==="Escape"&&(p(!1),($=x.current)==null||$.blur())};l.useEffect(()=>()=>{m.current&&(clearTimeout(m.current),m.current=null)},[]),l.useEffect(()=>{if(!f)return;const M=$=>{h.current&&!h.current.contains($.target)&&x.current&&!x.current.contains($.target)&&p(!1)};return document.addEventListener("mousedown",M),()=>{document.removeEventListener("mousedown",M)}},[f]);const v=M=>({top:"border-t-surface-inverse",bottom:"border-b-surface-inverse",left:"border-l-surface-inverse",right:"border-r-surface-inverse"})[M],N=xe(w("absolute",ue("tooltip"),T("sm","px"),T("xs","py"),re("caption"),"text-fg-inverse","bg-surface-inverse",J("md"),"shadow-lg","whitespace-nowrap"),{variants:{position:{top:w("bottom-full","left-1/2","transform","-translate-x-1/2",T("sm","mb")),bottom:w("top-full","left-1/2","transform","-translate-x-1/2",T("sm","mt")),left:w("right-full","top-1/2","transform","-translate-y-1/2",T("sm","mr")),right:w("left-full","top-1/2","transform","-translate-y-1/2",T("sm","ml"))}},defaultVariants:{position:"top"}}),D=xe(w("absolute","w-0","h-0",kc("thick"),"border-transparent"),{variants:{position:{top:w("top-full","left-1/2","transform","-translate-x-1/2",v("top")),bottom:w("bottom-full","left-1/2","transform","-translate-x-1/2",v("bottom")),left:w("left-full","top-1/2","transform","-translate-y-1/2",v("left")),right:w("right-full","top-1/2","transform","-translate-y-1/2",v("right"))}},defaultVariants:{position:"top"}}),S=l.isValidElement(t)?(()=>{const M=t,$=M.props,L=$.ref;return l.cloneElement(M,{ref:_=>{x.current=_,typeof L=="function"?L(_):L&&typeof L=="object"&&"current"in L&&(L.current=_)},"aria-describedby":f?y:$["aria-describedby"],onMouseEnter:_=>{var F;k(),(F=$.onMouseEnter)==null||F.call($,_)},onMouseLeave:_=>{var F;g(),(F=$.onMouseLeave)==null||F.call($,_)},onFocus:_=>{var F;j(),(F=$.onFocus)==null||F.call($,_)},onBlur:_=>{var F;C(),(F=$.onBlur)==null||F.call($,_)},onKeyDown:_=>{var F;b(_),(F=$.onKeyDown)==null||F.call($,_)}})})():t,A=w(i?"static":"relative","inline-block",a);return n.jsxs("div",P(R({className:A},c),{children:[S,f&&n.jsxs("div",{ref:h,id:y,className:w(N({position:r})),role:"tooltip","aria-live":"polite",children:[e,n.jsx("div",{className:w(D({position:r})),"aria-hidden":"true"})]})]}))}function ba(c){var u=c,{variant:e="text",width:t,height:r,lines:s=1,className:a="","aria-label":o}=u,i=O(u,["variant","width","height","lines","className","aria-label"]);const d=["motion-safe:animate-pulse","bg-surface-muted",J("sm")],f={text:"h-4",card:"h-32",list:"h-12",circle:"rounded-full"},p=w(...d,f[e],a),m={};t&&(m.width=t),r&&(m.height=r);const h=o||`Loading ${e} content`;return e==="text"&&s>1?n.jsx("div",P(R({className:T("sm","space-y"),role:"status","aria-busy":"true","aria-label":h},i),{children:Array.from({length:s}).map((x,y)=>n.jsx("div",{className:p,style:y===s-1?{width:"75%"}:m,"aria-hidden":"true"},y))})):n.jsx("div",R({className:p,style:m,role:"status","aria-busy":"true","aria-label":h},i))}function jc({defaultOpen:e=!0,open:t,onOpenChange:r,storageKey:s}){const a=l.useCallback(()=>{if(s&&typeof window!="undefined"){const f=localStorage.getItem(s);if(f!==null)return f==="true"}return e},[e,s]),[o,i]=l.useState(a),c=t!==void 0?t:o;l.useEffect(()=>{s&&typeof window!="undefined"&&t===void 0&&localStorage.setItem(s,String(o))},[o,s,t]);const u=l.useCallback(f=>{t===void 0&&i(f),r==null||r(f)},[t,r]),d=l.useCallback(()=>{u(!c)},[c,u]);return{isOpen:c,toggle:d,setOpen:u}}function ga(f){var p=f,{children:e,trigger:t,defaultOpen:r=!0,open:s,onOpenChange:a,disabled:o=!1,duration:i=200,storageKey:c,className:u=""}=p,d=O(p,["children","trigger","defaultOpen","open","onOpenChange","disabled","duration","storageKey","className"]);const{isOpen:m,toggle:h}=jc({defaultOpen:r,open:s,onOpenChange:a,storageKey:c}),x=l.useRef(null),[y,k]=l.useState(m?"auto":0);l.useEffect(()=>{x.current&&k(m?x.current.scrollHeight:0)},[m,e]),l.useEffect(()=>{if(!m||!x.current)return;const j=new ResizeObserver(()=>{x.current&&m&&k(x.current.scrollHeight)});return j.observe(x.current),()=>{j.disconnect()}},[m]);const g=`collapsible-content-${Math.random().toString(36).substr(2,9)}`;return n.jsxs("div",P(R({className:u},d),{children:[n.jsx("button",{type:"button",onClick:h,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),o||h())},disabled:o,"aria-expanded":m,"aria-controls":g,"aria-disabled":o,className:w("w-full","text-left","focus:outline-none","focus:ring-2","focus:ring-line-brand","focus:ring-offset-2",J("md")),children:t}),n.jsx("div",{id:g,ref:x,style:{height:typeof y=="number"?`${y}px`:y,overflow:"hidden",transition:`height ${i}ms ease-in-out`},"aria-hidden":!m,children:n.jsx("div",{children:e})})]}))}const jr=l.memo(l.forwardRef(function(f,d){var p=f,{id:t,label:r,error:s=!1,helperText:a,className:o="",disabled:i=!1,indeterminate:c=!1}=p,u=O(p,["id","label","error","helperText","className","disabled","indeterminate"]);const m=l.useMemo(()=>t||`checkbox-${Math.random().toString(36).substr(2,9)}`,[t]),h=l.useMemo(()=>s?`${m}-error`:void 0,[s,m]),x=l.useMemo(()=>a?`${m}-helper`:void 0,[a,m]),y=l.useMemo(()=>"focus:border-line-focus",[]),k=l.useMemo(()=>"focus:border-error",[]),g=l.useMemo(()=>s?k.replace("focus:border-","focus:ring-"):y.replace("focus:border-","focus:ring-"),[s,k,y]),j=l.useMemo(()=>w("h-4","w-4",J("sm"),"border","border-line-default","text-fg-brand","focus:ring-2",g,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",o),[g,s,o]),C=l.useMemo(()=>w(ce("label"),T("sm","ml"),i?"opacity-50 cursor-not-allowed":"cursor-pointer"),[i]),b=l.useRef(null),v=l.useCallback(N=>{b.current=N,typeof d=="function"?d(N):d&&(d.current=N),N&&(N.indeterminate=c)},[d,c]);return l.useEffect(()=>{b.current&&(b.current.indeterminate=c)},[c]),n.jsxs("div",{className:w("flex","flex-col",T("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",R({type:"checkbox",id:m,ref:v,className:j,disabled:i,"aria-invalid":s,"aria-describedby":h||x||void 0,"aria-label":r?void 0:"Checkbox"},u)),r&&n.jsx("label",{htmlFor:m,className:C,children:r})]}),(s||a)&&n.jsx("div",{id:h||x,className:w(T("xs","mt"),ce("caption"),s?"text-fg-error":"text-fg-secondary"),role:s?"alert":void 0,children:s?a||"This field has an error":a})]})}));jr.displayName="Checkbox";const xa=l.memo(l.forwardRef(function(d,u){var f=d,{id:t,label:r,error:s=!1,helperText:a,className:o="",disabled:i=!1}=f,c=O(f,["id","label","error","helperText","className","disabled"]);const p=l.useMemo(()=>t||`radio-${Math.random().toString(36).substr(2,9)}`,[t]),m=l.useMemo(()=>s?`${p}-error`:void 0,[s,p]),h=l.useMemo(()=>a?`${p}-helper`:void 0,[a,p]),x=l.useMemo(()=>"focus:border-line-focus",[]),y=l.useMemo(()=>"focus:border-error",[]),k=l.useMemo(()=>s?y.replace("focus:border-","focus:ring-"):x.replace("focus:border-","focus:ring-"),[s,y,x]),g=l.useMemo(()=>w("h-4","w-4","border","border-line-default","text-fg-brand","focus:ring-2",k,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",o),[k,s,o]),j=l.useMemo(()=>w(ce("label"),T("sm","ml"),i?"opacity-50 cursor-not-allowed":"cursor-pointer"),[i]);return n.jsxs("div",{className:w("flex","flex-col",T("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",R({type:"radio",id:p,ref:u,className:g,disabled:i,"aria-invalid":s,"aria-describedby":m||h||void 0,"aria-label":r?void 0:"Radio button"},c)),r&&n.jsx("label",{htmlFor:p,className:j,children:r})]}),(s||a)&&n.jsx("div",{id:m||h,className:w(T("xs","mt"),ce("caption"),s?"text-fg-error":"text-fg-secondary"),role:s?"alert":void 0,children:s?a||"This field has an error":a})]})}));xa.displayName="Radio";class ft{static create(t){return{none:{value:"none",tailwind:"shadow-none",description:"No shadow"},sm:{value:"0 1px 2px 0 rgb(0 0 0 / 0.05)",tailwind:"shadow-sm",description:"Small shadow for subtle elevation"},md:{value:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",tailwind:"shadow-md",description:"Medium shadow for cards and elevated elements"},lg:{value:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",tailwind:"shadow-lg",description:"Large shadow for modals and dropdowns"},xl:{value:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",tailwind:"shadow-xl",description:"Extra large shadow for prominent modals"},"2xl":{value:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",tailwind:"shadow-2xl",description:"2X large shadow for maximum elevation"},inner:{value:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",tailwind:"shadow-inner",description:"Inner shadow for inset elements"}}[t]}}const Nc={none:ft.create("none"),sm:ft.create("sm"),md:ft.create("md"),lg:ft.create("lg"),xl:ft.create("xl"),"2xl":ft.create("2xl"),inner:ft.create("inner")};function Se(e){return Nc[e].tailwind}const Ot={track:{sm:{w:"w-9",h:"h-5"},md:{w:"w-11",h:"h-6"},lg:{w:"w-14",h:"h-7"}},thumb:{sm:{w:"w-4",h:"h-4"},md:{w:"w-5",h:"h-5"},lg:{w:"w-6",h:"h-6"}},translate:{sm:"translate-x-4",md:"translate-x-5",lg:"translate-x-7"}};function Sc(e){return{track:`${Ot.track[e].w} ${Ot.track[e].h}`,thumb:`${Ot.thumb[e].w} ${Ot.thumb[e].h}`,translate:Ot.translate[e]}}const Cc=xe("w-full",{variants:{size:{sm:"h-1",md:"h-2",lg:"h-3"},variant:{primary:"bg-surface-muted",secondary:"bg-surface-muted",success:"bg-success-bg-emphasis",error:"bg-error-bg-emphasis",warning:"bg-warning-bg-emphasis",info:"bg-info-bg-emphasis"}},defaultVariants:{size:"md",variant:"primary"}}),$n=xe("transition-all",{variants:{variant:{primary:"bg-surface-brand",secondary:"bg-surface-secondary",success:"bg-success",error:"bg-error",warning:"bg-warning",info:"bg-info"}},defaultVariants:{variant:"primary"}}),xs=l.forwardRef(function(p,f){var m=p,{value:t,max:r=100,variant:s="primary",size:a="md",showLabel:o=!1,label:i,"aria-label":c,className:u=""}=m,d=O(m,["value","max","variant","size","showLabel","label","aria-label","className"]);const h=t===void 0,x=h?void 0:Math.min(Math.max(t/r*100,0),100),y=c||(h?"Loading in progress":`Progress: ${x==null?void 0:x.toFixed(0)}%`);return n.jsxs("div",P(R({ref:f,className:w("w-full",u)},d),{children:[o&&(i||!h)&&n.jsxs("div",{className:w("flex","items-center","justify-between",T("xs","mb")),children:[i&&n.jsx("span",{className:w(re("bodySmall"),Fe("label"),"text-fg-primary"),children:i}),!h&&x!==void 0&&n.jsxs("span",{className:w(re("bodySmall"),"text-fg-secondary"),children:[x.toFixed(0),"%"]})]}),n.jsx("div",{role:"progressbar","aria-valuemin":h?void 0:0,"aria-valuemax":h?void 0:r,"aria-valuenow":h?void 0:t,"aria-label":y,"aria-busy":h,className:w("relative","w-full","overflow-hidden",Cc({size:a,variant:s}),J("full")),children:h?n.jsx("div",{className:w("absolute","top-0","left-0","bottom-0",$n({variant:s}),J("full"),"motion-reduce:animate-none"),style:{width:"30%",animation:"progress-indeterminate 1.5s ease-in-out infinite"}}):n.jsx("div",{className:w("h-full",$n({variant:s}),J("full"),"transition-all","duration-300","ease-out"),style:{width:`${x}%`},"aria-hidden":"true"})})]}))});xs.displayName="Progress";const va=l.memo(l.forwardRef(function(m,p){var h=m,{size:t="md",label:r,description:s,error:a=!1,className:o="",disabled:i=!1,checked:c,onChange:u,id:d}=h,f=O(h,["size","label","description","error","className","disabled","checked","onChange","id"]);const x=l.useMemo(()=>d||`switch-${Math.random().toString(36).substr(2,9)}`,[d]),y=l.useMemo(()=>r?`${x}-label`:void 0,[r,x]),k=l.useMemo(()=>s?`${x}-description`:void 0,[s,x]),g=l.useMemo(()=>Sc(t),[t]),j=l.useMemo(()=>"focus:border-line-focus".replace("focus:border-","focus:ring-"),[]),C=l.useMemo(()=>w("relative","inline-flex","shrink-0","cursor-pointer","rounded-full","border-2","border-transparent",he("base"),"focus:outline-none","focus:ring-2",j,"focus:ring-offset-2",g.track,c?"bg-surface-brand":"bg-surface-muted",a&&!c&&"border-error",i&&"opacity-50 cursor-not-allowed",o),[j,g.track,c,a,i,o]),b=l.useMemo(()=>w("pointer-events-none","inline-block","rounded-full","bg-surface-base","shadow","transform",he("base"),g.thumb,c?g.translate:"translate-x-0"),[g.thumb,g.translate,c]);return n.jsxs("div",{className:w("flex","items-start",T("md","gap")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("button",{type:"button",className:C,role:"switch","aria-checked":c,"aria-labelledby":y,"aria-describedby":k,disabled:i,onClick:l.useCallback(v=>{if(!i&&u){const N=P(R({},v),{target:P(R({},v.target),{checked:!c}),currentTarget:P(R({},v.currentTarget),{checked:!c})});u(N)}},[i,u,c]),onKeyDown:l.useCallback(v=>{if((v.key==="Enter"||v.key===" ")&&!i&&u){v.preventDefault();const N=P(R({},v),{target:P(R({},v.target),{checked:!c}),currentTarget:P(R({},v.currentTarget),{checked:!c})});u(N)}},[i,u,c]),children:n.jsx("span",{className:b})}),n.jsx("input",R({ref:p,type:"checkbox",id:x,checked:c,onChange:u,disabled:i,className:"sr-only","aria-hidden":"true"},f))]}),(r||s)&&n.jsxs("div",{className:"flex-1",children:[r&&n.jsx("label",{id:y,htmlFor:x,className:w("block",re("bodySmall"),Fe("label"),a?"text-fg-error":"text-fg-primary",i?"opacity-50":"cursor-pointer"),children:r}),s&&n.jsx("p",{id:k,className:w(T("xs","mt"),re("bodySmall"),a?"text-fg-error":"text-fg-secondary"),children:s})]})]})}));va.displayName="Switch";const vs=l.memo(function(o){var i=o,{orientation:t="horizontal",variant:r="solid",className:s=""}=i,a=O(i,["orientation","variant","className"]);const c=l.useMemo(()=>{const u=["border-0","border-line-default"],d={horizontal:"w-full border-t",vertical:"h-full border-l self-stretch"},f={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted"};return w(...u,d[t],f[r],s)},[t,r,s]);return t==="vertical"?n.jsx("div",R({className:c,role:"separator","aria-orientation":"vertical"},a)):n.jsx("hr",R({className:c,role:"separator","aria-orientation":"horizontal"},a))});vs.displayName="Separator";const ya=l.forwardRef(function(g,k){var j=g,{value:t,defaultValue:r,min:s=0,max:a=100,step:o=1,variant:i="single",size:c="md",disabled:u=!1,showValue:d=!1,marks:f=[],onChange:p,onValueChange:m,label:h,className:x=""}=j,y=O(j,["value","defaultValue","min","max","step","variant","size","disabled","showValue","marks","onChange","onValueChange","label","className"]);const C=l.useRef(null),[b,v]=l.useState(r||(i==="range"?[s,a]:s)),[N,D]=l.useState(!1),[S,A]=l.useState(null),M=t!==void 0,$=M?t:b,L=W=>(W-s)/(a-s)*100,_=W=>{if(!C.current)return s;const U=C.current.getBoundingClientRect(),V=Math.max(0,Math.min(1,(W-U.left)/U.width)),se=s+V*(a-s);return Math.round(se/o)*o},F=(W,U="min")=>{if(u)return;W.preventDefault(),D(!0),A(U);const V=ae=>{if(!C.current)return;const oe=_(ae.clientX);z(oe,U)},se=()=>{D(!1),A(null),document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",se)};document.addEventListener("mousemove",V),document.addEventListener("mouseup",se)},z=(W,U="min")=>{const V=Math.max(s,Math.min(a,W));if(i==="range"){const[se,ae]=Array.isArray($)?$:[s,a];let oe;U==="min"?oe=[Math.min(V,ae),ae]:oe=[se,Math.max(V,se)],M||v(oe),p==null||p(oe),m==null||m(oe)}else M||v(V),p==null||p(V),m==null||m(V)},X=W=>{if(u||N)return;const U=_(W.clientX);z(U)},q=()=>"focus:ring-line-brand ring-offset-2",H=xe(w("relative","cursor-pointer"),{variants:{size:{sm:"h-1",md:"h-2",lg:"h-3"},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},defaultVariants:{size:"md",disabled:!1}}),le=xe(w("absolute","bg-surface-brand","rounded-full","border-2","border-white","shadow-md","cursor-grab","active:cursor-grabbing",he("base"),"-translate-x-1/2","-translate-y-1/2","top-1/2"),{variants:{size:{sm:"w-3 h-3",md:"w-4 h-4",lg:"w-5 h-5"},active:{true:q(),false:""}},defaultVariants:{size:"md",active:!1}}),ne=typeof $=="number"?$:$[0],I=Array.isArray($)?$[0]:s,B=Array.isArray($)?$[1]:ne,Y=L(I),Q=L(B);return n.jsxs("div",P(R({ref:k,className:w("w-full",x)},y),{children:[h&&n.jsxs("label",{className:w("block",re("bodySmall"),Fe("label"),"text-fg-primary",T("sm","mb")),children:[h,d&&n.jsx("span",{className:w(T("sm","ml"),"text-fg-secondary"),children:i==="range"?`${I} - ${B}`:ne})]}),n.jsxs("div",{ref:C,className:w(H({size:c,disabled:u}),"bg-surface-muted",J("full")),onClick:X,role:i==="range"?void 0:"slider","aria-valuemin":i==="range"?void 0:s,"aria-valuemax":i==="range"?void 0:a,"aria-valuenow":i==="range"?void 0:ne,"aria-disabled":i==="range"?void 0:u,"aria-label":i==="range"?void 0:h,children:[n.jsx("div",{className:w("absolute",H({size:c}),"bg-surface-brand",J("full"),he("base")),style:{left:`${Y}%`,width:`${Q-Y}%`}}),f.map(W=>{const U=L(W);return n.jsx("div",{className:w("absolute","w-1","h-1","bg-line-strong",J("full"),"-translate-x-1/2"),style:{left:`${U}%`,top:"50%",transform:"translate(-50%, -50%)"}},W)}),i==="range"?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:w(le({size:c,active:S==="min"})),style:{left:`${Y}%`},onMouseDown:W=>F(W,"min"),role:"slider","aria-valuemin":s,"aria-valuemax":B,"aria-valuenow":I}),n.jsx("div",{className:w(le({size:c,active:S==="max"})),style:{left:`${Q}%`},onMouseDown:W=>F(W,"max"),role:"slider","aria-valuemin":I,"aria-valuemax":a,"aria-valuenow":B})]}):n.jsx("div",{className:w(le({size:c,active:N})),style:{left:`${Q}%`},onMouseDown:W=>F(W)}),d&&!h&&n.jsx("div",{className:"absolute -top-6 left-0 right-0 flex justify-center",children:n.jsx("span",{className:w(re("caption"),"text-fg-secondary","bg-surface-overlay",T("sm","px"),T("xs","py"),J("md"),"shadow"),children:i==="range"?`${I} - ${B}`:ne})})]})]}))});ya.displayName="Slider";const $c=xe(w("inline-flex","items-center","font-medium",J("full"),T("xs","gap")),{variants:{variant:{default:w("bg-surface-muted","text-fg-primary","border","border-line-default"),outlined:w("bg-transparent","text-fg-primary","border","border-line-default"),filled:w("bg-surface-brand","text-fg-inverse","border","border-transparent")},size:{sm:w(T("xs","px"),T("xs","py"),re("caption")),md:w(T("sm","px"),T("xs","py"),re("bodySmall")),lg:w(T("md","px"),T("sm","py"),re("body"))},selected:{true:w("bg-surface-brand","text-fg-inverse","border","border-line-brand"),false:""},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},compoundVariants:[{selected:!0,variant:"default",class:""},{selected:!0,variant:"outlined",class:""},{selected:!0,variant:"filled",class:""}],defaultVariants:{variant:"default",size:"md",selected:!1,disabled:!1}}),ys=l.forwardRef(function(h,m){var x=h,{children:t,variant:r="default",size:s="md",onRemove:a,selected:o=!1,disabled:i=!1,className:c="","aria-label":u,onClick:d,tabIndex:f}=x,p=O(x,["children","variant","size","onRemove","selected","disabled","className","aria-label","onClick","tabIndex"]);const y=d!==void 0||o!==!1&&o!==void 0,k=o?"option":y?"button":void 0,j=(()=>{if(u)return u;if(typeof t=="string")return t;if(typeof t=="object"&&t!==null&&"props"in t){const v=t.props;if(v!=null&&v.children&&typeof v.children=="string")return v.children}})(),C=k==="button"&&!j,b=v=>{i||(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),d&&d())};return n.jsxs("div",P(R({ref:m,className:w($c({variant:r,size:s,selected:o,disabled:i}),a&&T("xs","pr"),y&&!i&&"cursor-pointer focus:outline-none focus:ring-2 focus:ring-line-focus focus:ring-offset-2",c),role:k,"aria-selected":o?!0:void 0,"aria-disabled":i,"aria-label":C?"Chip":u||(k==="button"?j:void 0),tabIndex:f!==void 0?f:y&&!i?0:void 0,onClick:i?void 0:d,onKeyDown:b},p),{children:[n.jsx("span",{children:t}),a&&!i&&n.jsx("button",{type:"button",onClick:v=>{v.stopPropagation(),a()},className:w(T("xs","ml"),"hover:bg-tint-hover",J("full"),T("xs","p"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-1"),"aria-label":`Remove ${j||"chip"}`,children:n.jsx(we,{className:"h-3 w-3","aria-hidden":"true"})})]}))});ys.displayName="Chip";const dr=l.forwardRef(function(f,d){var p=f,{src:t,alt:r,fallback:s,size:a="md",variant:o="circle","aria-label":i,className:c=""}=p,u=O(p,["src","alt","fallback","size","variant","aria-label","className"]);const[m,h]=l.useState(!1),[x,y]=l.useState(!1),k={xs:"h-6 w-6 text-xs",sm:"h-8 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg",xl:"h-16 w-16 text-xl"},g={circle:"rounded-full",square:"rounded-none",rounded:"rounded-md"},j=!t||m,C=typeof s=="string"?s.toUpperCase().slice(0,2):s,b=i||r||"User avatar";return n.jsxs("div",P(R({ref:d,className:w("relative","inline-flex","items-center","justify-center","shrink-0","font-medium","overflow-hidden",k[a],g[o],"bg-surface-muted","text-fg-primary",c),role:"img","aria-label":b},u),{children:[!j&&t&&n.jsx("img",{src:t,alt:r||"",className:w("w-full","h-full","object-cover",o==="circle"?"rounded-full":o==="square"?"rounded-none":"rounded-md",x?"opacity-100":"opacity-0","transition-opacity","duration-200"),onLoad:()=>y(!0),onError:()=>{h(!0),y(!1)},"aria-hidden":"true"}),j&&n.jsx("span",{className:w("flex","items-center","justify-center","w-full","h-full",o==="circle"?"rounded-full":o==="square"?"rounded-none":"rounded-md"),"aria-hidden":"true",children:C||"?"})]}))});dr.displayName="Avatar";function Ec(c){var u=c,{children:e,max:t=3,size:r="md",variant:s="circle",spacing:a="md",className:o=""}=u,i=O(u,["children","max","size","variant","spacing","className"]);const d={none:"",sm:"-space-x-1",md:"-space-x-2",lg:"-space-x-3"},f=l.Children.toArray(e).filter(Boolean),p=f.slice(0,t),m=f.length-t;return n.jsxs("div",P(R({className:w("flex","items-center",d[a],o),role:"group","aria-label":`${f.length} avatars`},i),{children:[p.map((h,x)=>{let y=h;if(l.isValidElement(h)&&h.type===dr){const k=h.props;y=l.cloneElement(h,{size:k.size||r,variant:k.variant||s})}return n.jsx("div",{className:"ring-2 ring-surface-base",style:{zIndex:f.length-x},children:y},x)}),m>0&&n.jsx(dr,{size:r,variant:s,fallback:`+${m}`,"aria-label":`${m} more avatars`,className:"ring-2 ring-surface-base",style:{zIndex:0}})]}))}const ur=l.memo(function(d){var f=d,{variant:t="default",padding:r="medium",className:s="",onClick:a,"aria-label":o,"aria-labelledby":i,children:c}=f,u=O(f,["variant","padding","className","onClick","aria-label","aria-labelledby","children"]);const p=xe(w("bg-surface-base",J("lg"),"border","border-line-default","shadow-sm"),{variants:{variant:{default:"",hover:w("hover:shadow-md","transition-shadow","cursor-pointer"),selected:w("border-line-brand","shadow-md")},padding:{none:"",small:T("xs","p"),medium:T("base","p"),large:T("lg","p")}},defaultVariants:{variant:"default",padding:"medium"}}),m=l.useMemo(()=>a!==void 0||t==="hover",[a,t]),h=m?"button":void 0,x=m?0:void 0,y=w(p({variant:t,padding:r}),s),k=l.useCallback(g=>{m&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),a==null||a())},[m,a]);return n.jsx("div",P(R({className:y,role:h,tabIndex:x,onClick:a,onKeyDown:k,"aria-label":o,"aria-labelledby":i},u),{children:c}))});ur.displayName="Card";const Nr=l.createContext(void 0);function ws(){const e=l.useContext(Nr);if(e===void 0)throw new Error("useFormContext must be used within a Form component with react-hook-form integration");return e}function Mc(){return l.useContext(Nr)}function wa({form:e,loading:t=!1,children:r}){const s={form:e,loading:t};return n.jsx(Nr.Provider,{value:s,children:r})}function Tc(c){var u=c,{children:e,onSubmit:t,loading:r=!1,error:s=null,success:a=null,className:o=""}=u,i=O(u,["children","onSubmit","loading","error","success","className"]);const d=w(T("lg","gap"),"flex","flex-col",o);if("form"in i&&i.form!==void 0){const y=i,{form:g,onSubmit:j,onSubmitError:C}=y,b=O(y,["form","onSubmit","onSubmitError"]),v=g.handleSubmit(N=>tr(null,null,function*(){try{yield j(N)}catch(D){C==null||C(D)}}),N=>{C==null||C(N)});return n.jsx(wa,{form:g,loading:r,children:n.jsxs("form",P(R({className:d,onSubmit:v,noValidate:!0},b),{children:[e,s&&n.jsx("div",{role:"alert",className:w(T("md","p"),ve("sm"),"text-error-dark","bg-error-bg","border","border-error",J("md")),children:s}),a&&n.jsx("div",{role:"alert",className:w(T("md","p"),ve("sm"),"text-success-dark","bg-success-bg","border","border-success",J("md")),children:a})]}))})}const p=i.onSubmit||t,k=i,{onSubmit:m}=k,h=O(k,["onSubmit"]),x=g=>{g.preventDefault(),p&&!r&&p(g)};return n.jsxs("form",P(R({className:d,onSubmit:x,noValidate:!0},h),{children:[e,s&&n.jsx("div",{role:"alert",className:w(T("md","p"),ve("sm"),"text-error-dark","bg-error-bg","border","border-error",J("md")),children:s}),a&&n.jsx("div",{role:"alert",className:w(T("md","p"),ve("sm"),"text-success-dark","bg-success-bg","border","border-success",J("md")),children:a})]}))}function Ac({name:e,label:t,children:r,rules:s,className:a=""}){var m;const{form:o}=ws();if(!o)throw new Error("FormField must be used within a Form component with react-hook-form integration");const{register:i,formState:{errors:c},watch:u}=o,d=i(e,s),f=(m=c[e])==null?void 0:m.message,p=u(e);return n.jsxs("div",{className:w("flex","flex-col",T("sm","gap"),a),children:[t&&n.jsx(Mt,{htmlFor:e,className:w("block",ve("sm"),Et("medium"),"text-fg-primary"),children:t}),r({name:e,register:h=>i(h,s),error:f,value:p,onChange:d.onChange,onBlur:d.onBlur}),f&&n.jsx(ha,{message:f})]})}var Rc=e=>e.type==="checkbox",Ic=e=>e instanceof Date,He=e=>e==null;const Dc=e=>typeof e=="object";var qe=e=>!He(e)&&!Array.isArray(e)&&Dc(e)&&!Ic(e),Lc=e=>{const t=e.constructor&&e.constructor.prototype;return qe(t)&&t.hasOwnProperty("isPrototypeOf")},ka=typeof window!="undefined"&&typeof window.HTMLElement!="undefined"&&typeof document!="undefined";function mt(e){if(e instanceof Date)return new Date(e);const t=typeof FileList!="undefined"&&e instanceof FileList;if(ka&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(qe(e)&&Lc(e)))return e;const s=r?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(s[a]=mt(e[a]));return s}var ks=e=>/^\w*$/.test(e),_e=e=>e===void 0,ja=e=>Array.isArray(e)?e.filter(Boolean):[],js=e=>ja(e.replace(/["|']|\]/g,"").split(/\.|\[/)),De=(e,t,r)=>{if(!t||!qe(e))return r;const s=(ks(t)?[t]:js(t)).reduce((a,o)=>He(a)?a:a[o],e);return _e(s)||s===e?_e(e[t])?r:e[t]:s},Na=e=>typeof e=="boolean",Fc=e=>typeof e=="function",fr=(e,t,r)=>{let s=-1;const a=ks(t)?[t]:js(t),o=a.length,i=o-1;for(;++s<o;){const c=a[s];let u=r;if(s!==i){const d=e[c];u=qe(d)||Array.isArray(d)?d:isNaN(+a[s+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=u,e=e[c]}};const St={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},We={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Sa=l.createContext(null);Sa.displayName="HookFormControlContext";const _c=()=>l.useContext(Sa),Pc=typeof window!="undefined"?l.useLayoutEffect:l.useEffect;var Xe=e=>typeof e=="string";const zc=l.createContext(null);zc.displayName="HookFormContext";var Oc=(e,t,r,s,a)=>t?P(R({},r[e]),{types:P(R({},r[e]&&r[e].types?r[e].types:{}),{[s]:a||!0})}):{},Le=e=>Array.isArray(e)?e:[e],mr=e=>qe(e)&&!Object.keys(e).length,Vc=e=>e.type==="file",Wc=e=>{if(!ka)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Hc=e=>e.type==="radio";function Bc(e,t){const r=t.slice(0,-1).length;let s=0;for(;s<r;)e=_e(e)?s++:e[t[s++]];return e}function Uc(e){for(const t in e)if(e.hasOwnProperty(t)&&!_e(e[t]))return!1;return!0}function Ca(e,t){const r=Array.isArray(t)?t:ks(t)?[t]:js(t),s=r.length===1?e:Bc(e,r),a=r.length-1,o=r[a];return s&&delete s[o],a!==0&&(qe(s)&&mr(s)||Array.isArray(s)&&Uc(s))&&Ca(e,r.slice(0,-1)),e}var $a=e=>e instanceof RegExp,or=e=>({isOnSubmit:!e||e===St.onSubmit,isOnBlur:e===St.onBlur,isOnChange:e===St.onChange,isOnAll:e===St.all,isOnTouch:e===St.onTouched}),qc=(e,t,r)=>t.watchAll||t.watch.has(e)||[...t.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length)));const as=(e,t,r,s)=>{for(const o of Object.keys(e)){const i=De(e,o);if(i){const a=i,{_f:c}=a,u=O(a,["_f"]);if(c){if(c.refs&&c.refs[0]&&t(c.refs[0],o))return!0;if(c.ref&&t(c.ref,c.name))return!0;if(as(u,t))break}else if(qe(u)&&as(u,t))break}}};var Gc=(e,t,r)=>{const s=Le(De(e,r));return fr(s,"root",t[r]),fr(e,r,s),e};function En(e,t,r="validate"){if(Xe(e)||Array.isArray(e)&&e.every(Xe)||Na(e)&&!e)return{type:r,message:Xe(e)?e:"",ref:t}}var jt=e=>qe(e)&&!$a(e)?e:{value:e,message:""},Kc=(e,t,r,s,a,o)=>tr(null,null,function*(){const{ref:i,refs:c,required:u,maxLength:d,minLength:f,min:p,max:m,pattern:h,validate:x,name:y,valueAsNumber:k,mount:g}=e._f,j=De(r,y);if(!g||t.has(y))return{};const C=c?c[0]:i,b=A=>{a&&C.reportValidity&&(C.setCustomValidity(Na(A)?"":A||""),C.reportValidity())},v={};Hc(i),Rc(i);const N=(k||Vc(i))&&_e(i.value)&&_e(j)||Wc(i)&&i.value===""||j===""||Array.isArray(j)&&!j.length,D=Oc.bind(null,y,s,v),S=(A,M,$,L=We.maxLength,_=We.minLength)=>{const F=A?M:$;v[y]=R({type:A?L:_,message:F,ref:i},D(A?L:_,F))};if(!Array.isArray(j)||!j.length){const{value:A,message:M}=Xe(u)?{value:!!u,message:u}:jt(u);if(A&&(v[y]=R({type:We.required,message:M,ref:C},D(We.required,M)),!s))return b(M),v}if(!N&&(!He(p)||!He(m))){let A,M;const $=jt(m),L=jt(p);if(!He(j)&&!isNaN(j)){const _=i.valueAsNumber||j&&+j;He($.value)||(A=_>$.value),He(L.value)||(M=_<L.value)}else{const _=i.valueAsDate||new Date(j),F=q=>new Date(new Date().toDateString()+" "+q),z=i.type=="time",X=i.type=="week";Xe($.value)&&j&&(A=z?F(j)>F($.value):X?j>$.value:_>new Date($.value)),Xe(L.value)&&j&&(M=z?F(j)<F(L.value):X?j<L.value:_<new Date(L.value))}if((A||M)&&(S(!!A,$.message,L.message,We.max,We.min),!s))return b(v[y].message),v}if((d||f)&&!N&&(Xe(j)||Array.isArray(j))){const A=jt(d),M=jt(f),$=!He(A.value)&&j.length>+A.value,L=!He(M.value)&&j.length<+M.value;if(($||L)&&(S($,A.message,M.message),!s))return b(v[y].message),v}if(h&&!N&&Xe(j)){const{value:A,message:M}=jt(h);if($a(A)&&!j.match(A)&&(v[y]=R({type:We.pattern,message:M,ref:i},D(We.pattern,M)),!s))return b(M),v}if(x){if(Fc(x)){const A=yield x(j,r),M=En(A,C);if(M&&(v[y]=R(R({},M),D(We.validate,M.message)),!s))return b(M.message),v}else if(qe(x)){let A={};for(const M in x){if(!mr(A)&&!s)break;const $=En(yield x[M](j,r),C,M);$&&(A=R(R({},$),D(M,$.message)),b($.message),s&&(v[y]=A))}if(!mr(A)&&(v[y]=R({ref:C},A),!s))return v}}return b(!0),v}),Ye=()=>{if(typeof crypto!="undefined"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance=="undefined"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},Gr=(e,t,r={})=>r.shouldFocus||_e(r.shouldFocus)?r.focusName||`${e}.${_e(r.focusIndex)?t:r.focusIndex}.`:"",Kr=(e,t)=>[...e,...Le(t)],Yr=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Xr(e,t,r){return[...e.slice(0,t),...Le(r),...e.slice(t)]}var Jr=(e,t,r)=>Array.isArray(e)?(_e(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],Zr=(e,t)=>[...Le(t),...Le(e)];function Yc(e,t){let r=0;const s=[...e];for(const a of t)s.splice(a-r,1),r++;return ja(s).length?s:[]}var Qr=(e,t)=>_e(t)?[]:Yc(e,Le(t).sort((r,s)=>r-s)),es=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},Mn=(e,t,r)=>(e[t]=r,e);function Xc(e){const t=_c(),{control:r=t,name:s,keyName:a="id",shouldUnregister:o,rules:i}=e,[c,u]=l.useState(r._getFieldArray(s)),d=l.useRef(r._getFieldArray(s).map(Ye)),f=l.useRef(!1);r._names.array.add(s),l.useMemo(()=>i&&c.length>=0&&r.register(s,i),[r,s,c.length,i]),Pc(()=>r._subjects.array.subscribe({next:({values:b,name:v})=>{if(v===s||!v){const N=De(b,s);Array.isArray(N)&&(u(N),d.current=N.map(Ye))}}}).unsubscribe,[r,s]);const p=l.useCallback(b=>{f.current=!0,r._setFieldArray(s,b)},[r,s]),m=(b,v)=>{const N=Le(mt(b)),D=Kr(r._getFieldArray(s),N);r._names.focus=Gr(s,D.length-1,v),d.current=Kr(d.current,N.map(Ye)),p(D),u(D),r._setFieldArray(s,D,Kr,{argA:Yr(b)})},h=(b,v)=>{const N=Le(mt(b)),D=Zr(r._getFieldArray(s),N);r._names.focus=Gr(s,0,v),d.current=Zr(d.current,N.map(Ye)),p(D),u(D),r._setFieldArray(s,D,Zr,{argA:Yr(b)})},x=b=>{const v=Qr(r._getFieldArray(s),b);d.current=Qr(d.current,b),p(v),u(v),!Array.isArray(De(r._fields,s))&&fr(r._fields,s,void 0),r._setFieldArray(s,v,Qr,{argA:b})},y=(b,v,N)=>{const D=Le(mt(v)),S=Xr(r._getFieldArray(s),b,D);r._names.focus=Gr(s,b,N),d.current=Xr(d.current,b,D.map(Ye)),p(S),u(S),r._setFieldArray(s,S,Xr,{argA:b,argB:Yr(v)})},k=(b,v)=>{const N=r._getFieldArray(s);es(N,b,v),es(d.current,b,v),p(N),u(N),r._setFieldArray(s,N,es,{argA:b,argB:v},!1)},g=(b,v)=>{const N=r._getFieldArray(s);Jr(N,b,v),Jr(d.current,b,v),p(N),u(N),r._setFieldArray(s,N,Jr,{argA:b,argB:v},!1)},j=(b,v)=>{const N=mt(v),D=Mn(r._getFieldArray(s),b,N);d.current=[...D].map((S,A)=>!S||A===b?Ye():d.current[A]),p(D),u([...D]),r._setFieldArray(s,D,Mn,{argA:b,argB:N},!0,!1)},C=b=>{const v=Le(mt(b));d.current=v.map(Ye),p([...v]),u([...v]),r._setFieldArray(s,[...v],N=>N,{},!0,!1)};return l.useEffect(()=>{if(r._state.action=!1,qc(s,r._names)&&r._subjects.state.next(R({},r._formState)),f.current&&(!or(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!or(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([s]).then(b=>{r._updateIsValidating([s]);const v=De(b.errors,s),N=De(r._formState.errors,s);(N?!v&&N.type||v&&(N.type!==v.type||N.message!==v.message):v&&v.type)&&(v?fr(r._formState.errors,s,v):Ca(r._formState.errors,s),r._subjects.state.next({errors:r._formState.errors}))});else{const b=De(r._fields,s);b&&b._f&&!(or(r._options.reValidateMode).isOnSubmit&&or(r._options.mode).isOnSubmit)&&Kc(b,r._names.disabled,r._formValues,r._options.criteriaMode===St.all,r._options.shouldUseNativeValidation).then(v=>!mr(v)&&r._subjects.state.next({errors:Gc(r._formState.errors,v,s)}))}r._subjects.state.next({name:s,values:mt(r._formValues)}),r._names.focus&&as(r._fields,(b,v)=>{if(r._names.focus&&v.startsWith(r._names.focus)&&b.focus)return b.focus(),1}),r._names.focus="",r._setValid(),f.current=!1},[c,s,r]),l.useEffect(()=>(!De(r._formValues,s)&&r._setFieldArray(s),()=>{const b=(v,N)=>{const D=De(r._fields,v);D&&D._f&&(D._f.mount=N)};r._options.shouldUnregister||o?r.unregister(s):b(s,!1)}),[s,r,a,o]),{swap:l.useCallback(k,[p,s,r]),move:l.useCallback(g,[p,s,r]),prepend:l.useCallback(h,[p,s,r]),append:l.useCallback(m,[p,s,r]),remove:l.useCallback(x,[p,s,r]),insert:l.useCallback(y,[p,s,r]),update:l.useCallback(j,[p,s,r]),replace:l.useCallback(C,[p,s,r]),fields:l.useMemo(()=>c.map((b,v)=>P(R({},b),{[a]:d.current[v]||Ye()})),[c,a])}}function Jc(e){const{form:t}=ws();if(!t)throw new Error("useFormFieldArray must be used within a Form component with react-hook-form integration");return Xc(P(R({},e),{control:t.control}))}function Ea(a){var o=a,{items:e,separator:t="/",className:r=""}=o,s=O(o,["items","separator","className"]);const i=["flex","items-center",T("sm","space-x"),re("bodySmall")],c=w(...i,r);return n.jsx("nav",P(R({"aria-label":"Breadcrumb",className:c},s),{children:n.jsx("ol",{className:w("flex","items-center",T("sm","space-x")),children:e.map((u,d)=>{const f=d===e.length-1;return n.jsxs("li",{className:"flex items-center",children:[d>0&&n.jsx("span",{className:w(T("sm","mx"),"text-fg-tertiary"),"aria-hidden":"true",children:t}),f?n.jsx("span",{className:w("text-fg-primary",Fe("label")),"aria-current":"page",children:u.label}):u.href?n.jsx("a",{href:u.href,className:w("inline-flex","items-center",T("xs","px"),T("xs","pt"),"border-b-2","border-transparent",re("bodySmall"),Fe("label"),"transition-colors","text-fg-secondary","hover:border-line-emphasis","hover:text-fg-primary"),children:u.label}):n.jsx("span",{className:"text-fg-secondary",children:u.label})]},d)})})}))}function Ma(u){var d=u,{currentPage:e,totalPages:t,onPageChange:r,totalItems:s,itemsPerPage:a,showPageInfo:o=!0,className:i=""}=d,c=O(d,["currentPage","totalPages","onPageChange","totalItems","itemsPerPage","showPageInfo","className"]);const f=()=>{e>1&&r(e-1)},p=()=>{e<t&&r(e+1)},m=g=>{g>=1&&g<=t&&g!==e&&r(g)},h=()=>{const g=[];if(t<=5)for(let C=1;C<=t;C++)g.push(C);else if(e<=3){for(let C=1;C<=4;C++)g.push(C);g.push("ellipsis"),g.push(t)}else if(e>=t-2){g.push(1),g.push("ellipsis");for(let C=t-3;C<=t;C++)g.push(C)}else{g.push(1),g.push("ellipsis");for(let C=e-1;C<=e+1;C++)g.push(C);g.push("ellipsis"),g.push(t)}return g},x=s&&a?(e-1)*a+1:void 0,y=s&&a?Math.min(e*a,s):void 0,k=w("flex","items-center","justify-between",T("base","px"),T("md","py"),i);return n.jsxs("nav",P(R({className:k,"aria-label":"Pagination"},c),{children:[n.jsxs("div",{className:w("flex","items-center",T("sm","gap")),children:[n.jsx(Z,{variant:"secondary",onClick:f,disabled:e===1,size:"sm",children:"Previous"}),n.jsx("div",{className:w("flex","items-center",T("xs","gap")),children:h().map((g,j)=>{if(g==="ellipsis")return n.jsx("span",{className:w(T("sm","px"),"text-fg-tertiary"),children:"..."},`ellipsis-${j}`);const C=g,b=C===e;return n.jsx(Z,{variant:b?"primary":"ghost",onClick:()=>m(C),size:"sm","aria-current":b?"page":void 0,"aria-label":`Go to page ${C}`,children:C},C)})}),n.jsx(Z,{variant:"secondary",onClick:p,disabled:e===t,size:"sm",children:"Next"})]}),o&&s&&a&&n.jsxs("div",{className:w(ve("sm"),"text-fg-primary"),children:["Showing ",x," to ",y," of ",s," results"]})]}))}function Ta(u){var d=u,{title:e,message:t,actionLabel:r,onAction:s,illustration:a,variant:o="default",className:i=""}=d,c=O(d,["title","message","actionLabel","onAction","illustration","variant","className"]);const f=w("flex","flex-col","items-center","justify-center","text-center",T("xl","py"),T("base","px"),i),p=o==="withAction"||r&&s,m=o==="withIllustration"||a;return n.jsxs("div",P(R({className:f,role:"status","aria-live":"polite","aria-label":`${e}. ${t}`},c),{children:[m&&a&&n.jsx("div",{className:w(T("base","mb")),"aria-hidden":"true",children:a}),n.jsx(Be,{as:"h3",className:w(re("h4"),Et("semibold"),"text-fg-primary",T("sm","mb")),children:e}),n.jsx(Be,{as:"p",className:w(re("bodySmall"),"text-fg-secondary",T("md","mb"),"max-w-sm"),children:t}),p&&r&&s&&n.jsx(Z,{variant:"primary",onClick:s,children:r})]}))}function Aa(c){var u=c,{trigger:e,items:t,align:r="right",variant:s="default",className:a="","aria-label":o}=u,i=O(u,["trigger","items","align","variant","className","aria-label"]);const[d,f]=l.useState(!1),[p,m]=l.useState(-1),h=l.useRef(null),x=l.useRef(null),y=l.useRef(null),k=l.useRef([]),g=`dropdown-menu-${Math.random().toString(36).substr(2,9)}`,j=`dropdown-trigger-${Math.random().toString(36).substr(2,9)}`;l.useEffect(()=>{const S=A=>{h.current&&!h.current.contains(A.target)&&(f(!1),m(-1))};return d&&(document.addEventListener("mousedown",S),setTimeout(()=>{var M;const A=t.findIndex($=>!$.disabled);A>=0&&(m(A),(M=k.current[A])==null||M.focus())},0)),()=>{document.removeEventListener("mousedown",S)}},[d,t]),l.useEffect(()=>{if(!d)return;const S=M=>{var _,F,z,X;const $=t.map((q,H)=>({item:q,index:H})).filter(({item:q})=>!q.disabled),L=$.findIndex(({index:q})=>q===p);switch(M.key){case"ArrowDown":{M.preventDefault();const q=L<$.length-1?$[L+1].index:$[0].index;m(q),(_=k.current[q])==null||_.focus();break}case"ArrowUp":{M.preventDefault();const q=L>0?$[L-1].index:$[$.length-1].index;m(q),(F=k.current[q])==null||F.focus();break}case"Home":{M.preventDefault();const q=$[0].index;m(q),(z=k.current[q])==null||z.focus();break}case"End":{M.preventDefault();const q=$[$.length-1].index;m(q),(X=k.current[q])==null||X.focus();break}case"Enter":case" ":M.preventDefault(),p>=0&&!t[p].disabled&&C(t[p]);break;case"Escape":M.preventDefault(),f(!1),m(-1),setTimeout(()=>{var q;(q=x.current)==null||q.focus()},0);break}},A=y.current;if(A){const M=S;return A.addEventListener("keydown",M),()=>{A.removeEventListener("keydown",M)}}},[d,p,t]);const C=S=>{S.disabled||(S.onClick(),f(!1),m(-1),setTimeout(()=>{var A;(A=x.current)==null||A.focus()},0))},b=()=>{f(!d),m(-1)},v=S=>{(S.key==="Enter"||S.key===" "||S.key==="ArrowDown")&&(S.preventDefault(),f(!0))},N=r==="right"?"right-0":"left-0",D=l.isValidElement(e)?l.cloneElement(e,{onClick:S=>{b(),e.props.onClick&&e.props.onClick(S)},onKeyDown:S=>{v(S),e.props.onKeyDown&&e.props.onKeyDown(S)},"aria-haspopup":"menu","aria-expanded":d,"aria-controls":g,"aria-label":o||e.props["aria-label"]||"Open menu",id:j,ref:S=>{x.current=S,typeof e.ref=="function"?e.ref(S):e.ref&&(e.ref.current=S)}}):n.jsx("div",{ref:x,onClick:b,onKeyDown:v,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":d,"aria-controls":g,"aria-label":o||"Open menu",id:j,children:e});return n.jsxs("div",P(R({className:w("relative","inline-block",a),ref:h},i),{children:[D,d&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:w("fixed","inset-0","z-10"),onClick:()=>{f(!1),m(-1)},"aria-hidden":"true"}),n.jsx("div",{ref:y,id:g,className:w("absolute","z-20",T("sm","mt"),"w-48",J("md"),Se("lg"),"bg-surface-overlay","ring-1","ring-line-strong","ring-opacity-5",N),role:"menu","aria-orientation":"vertical","aria-labelledby":j,"aria-activedescendant":p>=0?`${g}-item-${p}`:void 0,children:n.jsx("div",{className:w(T("xs","py")),role:"none",children:t.map((S,A)=>{const M=w("block",T("base","px"),T("xs","py"),re("bodySmall"),"w-full","text-left","focus:outline-none",S.disabled?w("text-fg-disabled","cursor-not-allowed","opacity-50"):S.variant==="danger"?w("text-error-dark","hover:bg-error-bg-emphasis","focus:bg-error-bg-emphasis"):w("text-fg-primary","hover:bg-surface-hover","focus:bg-surface-hover"));return n.jsx("button",{id:`${g}-item-${A}`,ref:$=>{k.current[A]=$},type:"button",className:M,onClick:()=>C(S),disabled:S.disabled,role:"menuitem","aria-disabled":S.disabled,tabIndex:S.disabled?-1:p===A?0:-1,children:S.label},A)})})})]})]}))}const Ra=l.createContext(void 0);function Ia(){const e=l.useContext(Ra);if(!e)throw new Error("DatePicker components must be used within a DatePicker component");return e}function os({children:e,mode:t="single",value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,locale:u}){const d=()=>{if(r!==void 0)return null;if(s){if(t==="single"&&s instanceof Date)return s;if(t==="range"&&typeof s=="object"&&"start"in s)return null}return null},f=()=>r!==void 0?null:s&&t==="range"&&typeof s=="object"&&"start"in s?s:{start:null,end:null},[p,m]=l.useState(d()),[h,x]=l.useState(f()),y=t==="single"?r instanceof Date?r:p:null,k=t==="range"?r&&typeof r=="object"&&"start"in r?r:h:null,C={selectedDate:y,selectedRange:k,mode:t,onDateChange:b=>{t==="single"&&(r===void 0&&m(b),a==null||a(b))},onRangeChange:b=>{t==="range"&&(r===void 0&&x(b),a==null||a(b))},minDate:o,maxDate:i,disabledDates:c,locale:u};return n.jsx(Ra.Provider,{value:C,children:e})}function Vt(e,t="yyyy-MM-dd"){const r=e.getFullYear(),s=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(r)).replace("MM",s).replace("dd",a).replace("MM/dd/yyyy",`${s}/${a}/${r}`).replace("dd/MM/yyyy",`${a}/${s}/${r}`)}function Tn(e){if(!e)return null;const t=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(t){const[,a,o,i]=t,c=new Date(parseInt(a),parseInt(o)-1,parseInt(i));if(!isNaN(c.getTime()))return c}const r=e.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(r){const[,a,o,i]=r,c=new Date(parseInt(i),parseInt(a)-1,parseInt(o));if(!isNaN(c.getTime()))return c}const s=e.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(s){const[,a,o,i]=s,c=new Date(parseInt(i),parseInt(o)-1,parseInt(a));if(!isNaN(c.getTime()))return c}return null}function Ns(c){var u=c,{placeholder:e="Select date",format:t="yyyy-MM-dd",showCalendarButton:r=!0,"aria-label":s,onFocus:a,className:o=""}=u,i=O(u,["placeholder","format","showCalendarButton","aria-label","onFocus","className"]);const{selectedDate:d,selectedRange:f,mode:p,onDateChange:m}=Ia(),[h,x]=l.useState(""),[y,k]=l.useState(!1),g=l.useRef(null);l.useEffect(()=>{p==="single"&&d?x(Vt(d,t)):p==="range"&&f?f.start&&f.end?x(`${Vt(f.start,t)} - ${Vt(f.end,t)}`):f.start?x(Vt(f.start,t)):x(""):x("")},[d,f,p,t]);const j=v=>{const N=v.target.value;if(x(N),p==="single"){const D=Tn(N);m(D)}},C=()=>{if(k(!1),h&&p==="single"){const v=Tn(h);v&&x(Vt(v,t))}},b=()=>{var v;(v=g.current)==null||v.focus()};return n.jsx("div",P(R({className:`relative ${o}`},i),{children:n.jsx(ke,{ref:g,type:"text",value:h,onChange:j,onFocus:()=>{k(!0),a==null||a()},onBlur:C,placeholder:e,"aria-label":s||e,rightIcon:r?n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:b,"aria-label":"Open calendar",type:"button",children:n.jsx(Ml,{className:"h-4 w-4"})}):void 0})}))}function Zc(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function Qc(e){return new Date(e.getFullYear(),e.getMonth(),1).getDay()}function Ct(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function ed(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function td(e,t,r){if(!t||!r)return!1;const s=e.getTime();return s>=t.getTime()&&s<=r.getTime()}function An(e,t,r,s){return!!(t&&e<t||r&&e>r||s!=null&&s.some(a=>Ct(e,a)))}const rd=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],sd=["January","February","March","April","May","June","July","August","September","October","November","December"];function Ss(a){var o=a,{month:e,onMonthChange:t,className:r=""}=o,s=O(o,["month","onMonthChange","className"]);const{selectedDate:i,selectedRange:c,mode:u,onDateChange:d,onRangeChange:f,minDate:p,maxDate:m,disabledDates:h}=Ia(),[x,y]=l.useState(e||i||(c==null?void 0:c.start)||new Date),k=l.useRef(null),[g,j]=l.useState(null);l.useEffect(()=>{e&&y(e)},[e]);const C=Zc(x),b=Qc(x),v=[];for(let M=0;M<b;M++)v.push(null);for(let M=1;M<=C;M++)v.push(new Date(x.getFullYear(),x.getMonth(),M));const N=M=>{if(!An(M,p,m,h)){if(u==="single")d(M);else if(u==="range"){const $=c||{start:null,end:null};!$.start||$.start&&$.end?f({start:M,end:null}):$.start&&!$.end&&(M<$.start?f({start:M,end:$.start}):f({start:$.start,end:M}))}}},D=()=>{const M=new Date(x.getFullYear(),x.getMonth()-1,1);y(M),t==null||t(M)},S=()=>{const M=new Date(x.getFullYear(),x.getMonth()+1,1);y(M),t==null||t(M)},A=(M,$)=>{let L=null;switch(M.key){case"ArrowLeft":M.preventDefault(),L=new Date($.getFullYear(),$.getMonth(),$.getDate()-1);break;case"ArrowRight":M.preventDefault(),L=new Date($.getFullYear(),$.getMonth(),$.getDate()+1);break;case"ArrowUp":M.preventDefault(),L=new Date($.getFullYear(),$.getMonth(),$.getDate()-7);break;case"ArrowDown":M.preventDefault(),L=new Date($.getFullYear(),$.getMonth(),$.getDate()+7);break;case"Home":M.preventDefault(),L=new Date($.getFullYear(),$.getMonth(),1);break;case"End":M.preventDefault(),L=new Date($.getFullYear(),$.getMonth()+1,0);break;case"Enter":case" ":M.preventDefault(),N($);return}L&&(ed(L,x)||y(new Date(L.getFullYear(),L.getMonth(),1)),j(L))};return n.jsxs("div",P(R({ref:k,className:`p-4 ${r}`,role:"grid","aria-label":"Calendar"},s),{children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:D,"aria-label":"Previous month",children:n.jsx(Ht,{className:"h-4 w-4"})}),n.jsxs("div",{className:"text-sm font-semibold",children:[sd[x.getMonth()]," ",x.getFullYear()]}),n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:S,"aria-label":"Next month",children:n.jsx(pt,{className:"h-4 w-4"})})]}),n.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:rd.map(M=>n.jsx("div",{className:"text-center text-xs font-medium text-fg-tertiary py-1",children:M},M))}),n.jsx("div",{className:"grid grid-cols-7 gap-1",children:v.map((M,$)=>{if(!M)return n.jsx("div",{className:"aspect-square"},`empty-${$}`);const L=u==="single"?Ct(M,i):Ct(M,(c==null?void 0:c.start)||null)||Ct(M,(c==null?void 0:c.end)||null),_=u==="range"&&c?td(M,c.start,c.end):!1,F=An(M,p,m,h),z=Ct(M,new Date),X=g&&Ct(M,g);return n.jsx("button",{type:"button",onClick:()=>N(M),onKeyDown:q=>A(q,M),disabled:F,className:`
|
|
177
|
+
*/const bc=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],we=le("x",bc),gc=xe("motion-safe:animate-spin",{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-8 w-8"},variant:{primary:"text-fg-brand",secondary:"text-fg-brand-secondary",neutral:"text-fg-secondary"}},defaultVariants:{size:"md",variant:"primary"}}),gs=l.memo(function(i){var c=i,{size:t="md",variant:r="primary",label:s,className:a=""}=c,o=O(c,["size","variant","label","className"]);return n.jsxs("div",P(T({className:w("inline-flex","items-center",a),role:"status","aria-label":s||"Loading","aria-live":"polite"},o),{children:[n.jsx(fa,{className:w(gc({size:t,variant:r})),"aria-hidden":"true"}),s&&n.jsx("span",{className:w(E("sm","ml"),re("bodySmall"),"text-fg-secondary","sr-only"),children:s})]}))});gs.displayName="Spinner";const xc=xe(w("inline-flex","items-center","justify-center",ce("button").split(" ")[2]||"font-medium",J("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{primary:w("bg-surface-brand-strong","text-fg-inverse","hover:opacity-90","focus:ring-line-brand"),secondary:w("bg-surface-secondary","text-fg-inverse","hover:opacity-90","focus:ring-line-secondary"),error:w("bg-error","text-fg-inverse","hover:opacity-90","focus:ring-error"),outline:w("border-2","border-line-default","bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),ghost:w("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),iconOnly:w("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus","p-0")},size:{sm:w(E("md","px"),E("1.5","py"),re("bodySmall"),E("1.5","gap")),md:w(E("base","px"),E("sm","py"),re("body"),E("sm","gap")),lg:w(E("lg","px"),E("md","py"),re("bodyLarge"),E("2.5","gap"))}},compoundVariants:[{variant:"iconOnly",size:"sm",class:w("h-8","w-8","p-0")},{variant:"iconOnly",size:"md",class:w("h-10","w-10","p-0")},{variant:"iconOnly",size:"lg",class:w("h-12","w-12","p-0")}],defaultVariants:{variant:"primary",size:"md"}});function $n({children:e,position:t}){return e?n.jsx("span",{className:`inline-flex items-center ${t==="left"?"mr-0":"ml-0"}`,children:e}):null}const Z=l.memo(l.forwardRef(function(k,v){var b=k,{variant:t="primary",size:r="md",isLoading:s=!1,loadingText:a,loadingIcon:o,leftIcon:i,rightIcon:c,fullWidth:u=!1,as:d="button",className:f="",disabled:p=!1,children:m,"aria-label":h}=b,x=O(b,["variant","size","isLoading","loadingText","loadingIcon","leftIcon","rightIcon","fullWidth","as","className","disabled","children","aria-label"]);const j=l.useMemo(()=>w(xc({variant:t,size:r}),u&&"w-full",f),[t,r,u,f]),C=l.useMemo(()=>t==="iconOnly"||!m&&(i||c),[t,m,i,c]),g=l.useMemo(()=>C&&!h&&!m?"Button":h,[C,h,m]),y=l.useMemo(()=>t==="error"?"primary":t==="primary"||t==="secondary"?"neutral":"primary",[t]),N=l.useMemo(()=>r==="sm"?"sm":r==="lg"?"lg":"md",[r]),_=l.useMemo(()=>o||n.jsx(gs,{size:N,variant:y}),[o,N,y]),S=d==="button"&&!x.type?"button":void 0,M=T(T({className:j,disabled:p||s,"aria-busy":s,"aria-label":g,"aria-disabled":p||s},S?{type:S}:{}),x);return n.jsx(d,P(T({ref:v},M),{children:s?n.jsxs(n.Fragment,{children:[_,a&&n.jsx("span",{className:"ml-2",children:a}),!a&&m&&n.jsx("span",{className:"ml-2 opacity-0",children:m})]}):n.jsxs(n.Fragment,{children:[i&&n.jsx($n,{position:"left",children:i}),m,c&&n.jsx($n,{position:"right",children:c})]})}))}));Z.displayName="Button";const vc=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>w(E("xs","mt"),ce("caption"),t&&"text-fg-error",r&&"text-fg-success",!t&&!r&&"text-fg-secondary"),[t,r]),c=l.useMemo(()=>s||(t?"Error":r?"Success":""),[s,t,r]);return n.jsx("div",{id:a||o,className:i,role:t||r?"alert":void 0,children:c})}),ke=l.memo(l.forwardRef(function(C,j){var g=C,{id:t,label:r,error:s=!1,success:a=!1,helperText:o,size:i="md",variant:c="outlined",leftIcon:u,rightIcon:d,showClearButton:f=!1,onClear:p,className:m="",disabled:h=!1,type:x="text",value:v,onChange:k}=g,b=O(g,["id","label","error","success","helperText","size","variant","leftIcon","rightIcon","showClearButton","onClear","className","disabled","type","value","onChange"]);const y=l.useMemo(()=>t||`input-${Math.random().toString(36).substr(2,9)}`,[t]),N=l.useMemo(()=>s?`${y}-error`:void 0,[s,y]),_=l.useMemo(()=>o?`${y}-helper`:void 0,[o,y]),[S,M]=l.useState(!1),F=l.useMemo(()=>x==="password",[x]),A=l.useMemo(()=>F&&S?"text":x,[F,S,x]),R=l.useMemo(()=>s?"error":a?"success":"default",[s,a]),I=l.useMemo(()=>v!=null&&v!=="",[v]),L=l.useMemo(()=>f&&I&&!h,[f,I,h]),z=l.useMemo(()=>"focus:border-line-focus",[]),Y=l.useMemo(()=>"focus:border-error",[]),q=l.useMemo(()=>"focus:border-success",[]),W=l.useMemo(()=>z.replace("focus:border-","focus:ring-"),[z]),ae=l.useCallback(V=>V==="error"?Y.replace("focus:border-","focus:ring-"):q.replace("focus:border-","focus:ring-"),[Y,q]),se=xe(w("w-full",J("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{default:w("border-0","border-b-2","border-line-default","focus:border-line-focus"),outlined:w("border","border-line-default","focus:border-line-focus"),filled:w("bg-surface-muted","border-0","focus:bg-surface-base","focus:ring-2",W)},size:{sm:w("h-8",re("bodySmall"),E("md","px")),md:w("h-10",re("body"),E("base","px")),lg:w("h-12",re("bodyLarge"),E("lg","px"))},state:{default:"",error:w("border-error","focus:border-error",ae("error")),success:w("border-success","focus:border-success",ae("success"))}},defaultVariants:{variant:"outlined",size:"md",state:"default"}}),D=l.useMemo(()=>w(se({variant:c,size:i,state:R}),u&&(i==="sm"?"pl-9":i==="lg"?"pl-12":"pl-10"),(d||L||F)&&(i==="sm"?"pr-9":i==="lg"?"pr-12":"pr-10"),m),[c,i,R,u,d,L,F,m]),B=l.useMemo(()=>w("block",ce("label"),E("xs","mb"),h&&"opacity-50"),[h]),X=l.useMemo(()=>i==="sm"?"h-4 w-4":i==="lg"?"h-5 w-5":"h-4 w-4",[i]),Q=l.useMemo(()=>i==="sm"?"top-2":i==="lg"?"top-3.5":"top-2.5",[i]),H=l.useCallback(V=>{var ne;if(V.stopPropagation(),p)p();else if(k){const oe=(ne=V.currentTarget.closest(".relative"))==null?void 0:ne.querySelector("input");if(oe){const ie={target:oe,currentTarget:oe,bubbles:!0,cancelable:!0,defaultPrevented:!1,eventPhase:2,isTrusted:!1,nativeEvent:new Event("change"),preventDefault:()=>{},stopPropagation:()=>{},persist:()=>{},timeStamp:Date.now()};Object.defineProperty(ie.target,"value",{value:"",writable:!0}),Object.defineProperty(ie.currentTarget,"value",{value:"",writable:!0}),k(ie)}}},[p,k]),U=l.useCallback(()=>{M(V=>!V)},[]);return n.jsxs("div",{className:"w-full",children:[r&&n.jsx("label",{htmlFor:y,className:B,children:r}),n.jsxs("div",{className:"relative",children:[u&&n.jsx("div",{className:`absolute left-3 ${Q} text-fg-secondary opacity-60 pointer-events-none`,children:n.jsx("div",{className:X,children:u})}),n.jsx("input",T({id:y,ref:j,type:A,className:D,disabled:h,value:v,onChange:k,"aria-invalid":s,"aria-required":b.required,"aria-describedby":N||_,suppressHydrationWarning:!0},b)),n.jsxs("div",{className:"absolute right-3 top-0 bottom-0 flex items-center gap-1",children:[L&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:H,className:"h-auto p-1","aria-label":"Clear input",children:n.jsx(we,{className:X})}),F&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:U,className:"h-auto p-1","aria-label":S?"Hide password":"Show password",children:S?n.jsx(ql,{className:X}):n.jsx(Kl,{className:X})}),d&&!L&&!F&&n.jsx("div",{className:`text-fg-secondary opacity-60 pointer-events-none ${X}`,children:d})]})]}),(s||a||o)&&n.jsx(vc,{error:s,success:a,helperText:o,errorId:N,helperId:_})]})}));ke.displayName="Input";function ma({href:e,active:t}){const r=l.useMemo(()=>t!==void 0?t:!1,[t]),s=l.useMemo(()=>{try{const a=typeof require!="undefined"?require("next/link"):null;return a==null?void 0:a.default}catch(a){return}},[]);return{isActive:r,NextLink:s}}const yc=xe(w("inline-flex","items-center","transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","disabled:pointer-events-none","no-underline"),{variants:{variant:{default:w("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","focus:ring-line-brand"),underline:w("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","border-b-2","border-transparent","hover:border-current","focus:ring-line-brand"),background:w("text-fg-primary","hover:bg-surface-hover","rounded-md",J("md"),"focus:ring-line-brand")},size:{sm:w(E("sm","px"),E("xs","py"),re("bodySmall")),md:w(E("base","px"),E("sm","py"),re("body")),lg:w(E("lg","px"),E("md","py"),re("bodyLarge"))}},defaultVariants:{variant:"default",size:"md"},compoundVariants:[{variant:"underline",size:"sm",class:E("0.5","pb")},{variant:"underline",size:"md",class:E("xs","pb")},{variant:"underline",size:"lg",class:E("1.5","pb")},{variant:"background",size:"sm",class:E("xs","px")},{variant:"background",size:"md",class:E("sm","px")},{variant:"background",size:"lg",class:E("base","px")}]});function xs(m){var h=m,{href:e,children:t,active:r,disabled:s=!1,variant:a="default",size:o="md",as:i,className:c,"aria-label":u,onClick:d,onKeyDown:f}=h,p=O(h,["href","children","active","disabled","variant","size","as","className","aria-label","onClick","onKeyDown"]);const x=l.useMemo(()=>r!==void 0?r:!1,[r]),{NextLink:v}=ma({href:e,active:x}),k=i||v||"a",b=l.useMemo(()=>{if(!x)return"";switch(a){case"underline":return w("border-b-2","border-line-brand","text-fg-brand-emphasis");case"background":return w("bg-surface-brand-muted","text-fg-brand-emphasis");case"default":default:return w("text-fg-brand-emphasis","font-semibold")}},[x,a]),j=l.useCallback(y=>{if(s){y.preventDefault(),y.stopPropagation();return}d==null||d(y)},[s,d]),C=l.useCallback(y=>{if(s){(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),y.stopPropagation());return}f==null||f(y)},[s,f]),g=l.useMemo(()=>{const y=T({className:w(yc({variant:a,size:o}),b,s&&"opacity-50 cursor-not-allowed pointer-events-none",c),"aria-current":x?"page":void 0,"aria-disabled":s?!0:void 0,"aria-label":u,tabIndex:s?-1:void 0,onClick:j,onKeyDown:C,"data-active":x,"data-disabled":s},p);return v&&!i?P(T({},y),{href:s?void 0:e}):P(T({},y),{href:s?void 0:e})},[a,o,b,s,c,x,u,j,C,e,v,i,p]);return n.jsx(k,P(T({},g),{children:t}))}const wc=xe(w("inline-flex","items-center","justify-center",Fe("label"),J("md"),"border"),{variants:{variant:{success:"",warning:"",error:"",info:"",neutral:"",primary:"",secondary:""},size:{sm:w(E("1.5","px"),E("0.5","py"),re("caption")),md:w(E("sm","px"),E("xs","py"),re("caption")),lg:w(E("sm","px"),E("xs","py"),re("bodySmall"))},style:{solid:"",outline:""}},compoundVariants:[{variant:"success",style:"solid",class:w("bg-success-bg","text-success-dark","border-success")},{variant:"warning",style:"solid",class:w("bg-warning-bg","text-warning-dark","border-warning")},{variant:"error",style:"solid",class:w("bg-error-bg","text-error-dark","border-error")},{variant:"info",style:"solid",class:w("bg-info-bg","text-info-dark","border-info")},{variant:"neutral",style:"solid",class:w("bg-surface-muted","text-fg-primary","border-line-default")},{variant:"primary",style:"solid",class:w("bg-surface-brand-subtle","text-fg-brand-emphasis","border-line-brand")},{variant:"secondary",style:"solid",class:w("bg-pink-300","text-fg-brand-secondary-emphasis","border-line-secondary")},{variant:"success",style:"outline",class:w("bg-transparent","border-success","text-fg-success")},{variant:"warning",style:"outline",class:w("bg-transparent","border-warning","text-fg-warning")},{variant:"error",style:"outline",class:w("bg-transparent","border-error","text-fg-error")},{variant:"info",style:"outline",class:w("bg-transparent","border-info","text-fg-info")},{variant:"neutral",style:"outline",class:w("bg-transparent","border-line-default","text-fg-secondary")},{variant:"primary",style:"outline",class:w("bg-transparent","border-line-brand","text-fg-brand")},{variant:"secondary",style:"outline",class:w("bg-transparent","border-line-secondary","text-fg-brand-secondary")}],defaultVariants:{variant:"neutral",size:"md",style:"solid"}}),pa=l.memo(l.forwardRef(function(d,u){var f=d,{variant:t="neutral",size:r="md",style:s="solid",className:a="",children:o,"aria-label":i}=f,c=O(f,["variant","size","style","className","children","aria-label"]);const p=l.useMemo(()=>w(wc({variant:t,size:r,style:s}),a),[t,r,s,a]),m=l.useMemo(()=>{if(i)return i;if(typeof o=="string")return o;if(typeof o=="object"&&o!==null&&"props"in o){const h=o.props;if(h!=null&&h.children&&typeof h.children=="string")return h.children}},[i,o]);return n.jsx("span",P(T({ref:u,role:"status","aria-label":m,className:p},c),{children:o}))}));pa.displayName="Badge";const kc=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>w(E("xs","mt"),ce("caption"),t&&"text-fg-error",r&&"text-fg-success",!t&&!r&&"text-fg-secondary"),[t,r]),c=l.useMemo(()=>s||(t?"Error":r?"Success":""),[s,t,r]);return n.jsx("div",{id:a||o,className:i,role:t||r?"alert":void 0,children:c})}),jr=l.memo(l.forwardRef(function(x,h){var v=x,{options:t=[],optionGroups:r,placeholder:s,label:a,error:o=!1,success:i=!1,helperText:c,size:u="md",className:d="",disabled:f=!1,id:p}=v,m=O(v,["options","optionGroups","placeholder","label","error","success","helperText","size","className","disabled","id"]);const k=l.useMemo(()=>p||`select-${Math.random().toString(36).substr(2,9)}`,[p]),b=l.useMemo(()=>o?`${k}-error`:void 0,[o,k]),j=l.useMemo(()=>c?`${k}-helper`:void 0,[c,k]),C=l.useMemo(()=>"focus:border-line-focus",[]),g=l.useMemo(()=>"focus:border-error",[]),y=l.useMemo(()=>"focus:border-success",[]),N=l.useCallback(A=>A==="error"?g.replace("focus:border-","focus:ring-"):A==="success"?y.replace("focus:border-","focus:ring-"):C.replace("focus:border-","focus:ring-"),[g,y,C]),_=xe(w("block","w-full",J("md"),"border","bg-surface-base","transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{size:{sm:w("h-8",re("bodySmall"),E("md","px")),md:w("h-10",re("body"),E("base","px")),lg:w("h-12",re("bodyLarge"),E("lg","px"))},state:{default:w("border-line-default",N()),error:w("border-error",N("error")),success:w("border-success",N("success"))}},defaultVariants:{size:"md",state:"default"}}),S=l.useMemo(()=>o?"error":i?"success":"default",[o,i]),M=l.useMemo(()=>w(_({size:u,state:S}),d),[u,S,d]),F=l.useMemo(()=>w("block",ce("label"),E("xs","mb"),f&&"opacity-50"),[f]);return n.jsxs("div",{className:"w-full",children:[a&&n.jsx("label",{htmlFor:k,className:F,children:a}),n.jsxs("select",P(T({id:k,ref:h,className:M,disabled:f,"aria-invalid":o,"aria-required":m.required,"aria-describedby":b||j},m),{children:[s&&n.jsx("option",{value:"",disabled:!0,children:s}),r&&r.length>0?r.map((A,R)=>n.jsx("optgroup",{label:A.label,children:(A.options||[]).map(I=>n.jsx("option",{value:I.value,disabled:I.disabled,children:I.label},I.value))},R)):(t||[]).map(A=>n.jsx("option",{value:A.value,disabled:A.disabled,children:A.label},A.value))]})),(o||i||c)&&n.jsx(kc,{error:o,success:i,helperText:c,errorId:b,helperId:j})]})}));jr.displayName="Select";const ha=l.memo(l.forwardRef(function(i,o){var c=i,{error:t=!1,resize:r="vertical",className:s=""}=c,a=O(c,["error","resize","className"]);const u=l.useMemo(()=>"focus:border-line-focus",[]),d=l.useMemo(()=>"focus:border-error",[]),f=l.useMemo(()=>t?d.replace("focus:border-","focus:ring-"):u.replace("focus:border-","focus:ring-"),[t,d,u]),p=l.useMemo(()=>({none:"resize-none",both:"resize",horizontal:"resize-x",vertical:"resize-y"}),[]),m=l.useMemo(()=>w("block","w-full",J("md"),E("base","px"),E("md","py"),"border",re("body"),"focus:outline-none","focus:ring-2","focus:ring-offset-2",p[r],w(t?"border-error":"border-line-default",f),s),[r,p,t,f,s]),h=l.useMemo(()=>t&&a.id?`${a.id}-error`:void 0,[t,a.id]);return n.jsx("textarea",T({ref:o,className:m,"aria-invalid":t,"aria-describedby":h},a))}));ha.displayName="Textarea";const Mt=l.memo(l.forwardRef(function(i,o){var c=i,{variant:t="default",className:r="",children:s}=c,a=O(c,["variant","className","children"]);const u=l.useMemo(()=>w("block",re("label"),Fe("label"),"text-fg-primary"),[]),d=l.useMemo(()=>({default:"",required:w("after:content-['*']",`after:${E("0.5","ml")}`,"after:text-fg-error"),optional:w("after:content-['(optional)']","after:ml-1","after:text-fg-tertiary","after:font-normal")}),[]),f=l.useMemo(()=>w(u,d[t],r),[u,d,t,r]);return n.jsx("label",P(T({ref:o,className:f},a),{children:s}))}));Mt.displayName="Label";function ba(a){var o=a,{message:e,id:t,className:r=""}=o,s=O(o,["message","id","className"]);const i=[E("xs","mt"),re("bodySmall"),"text-fg-error","flex","items-center",E("xs","gap")],c=w(...i,r);return n.jsxs("div",P(T({role:"alert",id:t,className:c,"aria-live":"polite"},s),{children:[n.jsx(bs,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),n.jsx("span",{children:e})]}))}class Ie{static createWidth(t){const s={none:{px:0,tailwind:"border-0"},thin:{px:1,tailwind:"border"},base:{px:1,tailwind:"border"},medium:{px:2,tailwind:"border-2"},thick:{px:4,tailwind:"border-4"}}[t];return{value:s.px,px:`${s.px}px`,tailwind:s.tailwind}}static create(t,r="solid"){return{width:this.createWidth(t),style:r,description:`${t} ${r} border`}}}Ie.create("none"),Ie.create("thin"),Ie.create("base"),Ie.create("medium"),Ie.create("thick"),Ie.create("thin","dashed"),Ie.create("base","dashed"),Ie.create("thin","dotted"),Ie.create("base","dotted");function jc(e){return Ie.createWidth(e).tailwind}function Ut(u){var d=u,{content:e,children:t,position:r="top",delay:s=200,className:a="","aria-label":o,preservePositioning:i=!1}=d,c=O(d,["content","children","position","delay","className","aria-label","preservePositioning"]);const[f,p]=l.useState(!1),m=l.useRef(null),h=l.useRef(null),x=l.useRef(null),v=`tooltip-${Math.random().toString(36).substr(2,9)}`,k=()=>{const F=setTimeout(()=>{p(!0)},s);m.current=F},b=()=>{m.current&&(clearTimeout(m.current),m.current=null),p(!1)},j=()=>{p(!0)},C=()=>{p(!1)},g=F=>{var A;F.key==="Escape"&&(p(!1),(A=x.current)==null||A.blur())};l.useEffect(()=>()=>{m.current&&(clearTimeout(m.current),m.current=null)},[]),l.useEffect(()=>{if(!f)return;const F=A=>{h.current&&!h.current.contains(A.target)&&x.current&&!x.current.contains(A.target)&&p(!1)};return document.addEventListener("mousedown",F),()=>{document.removeEventListener("mousedown",F)}},[f]);const y=F=>({top:"border-t-surface-inverse",bottom:"border-b-surface-inverse",left:"border-l-surface-inverse",right:"border-r-surface-inverse"})[F],N=xe(w("absolute",ue("tooltip"),E("sm","px"),E("xs","py"),re("caption"),"text-fg-inverse","bg-surface-inverse",J("md"),"shadow-lg","whitespace-nowrap"),{variants:{position:{top:w("bottom-full","left-1/2","transform","-translate-x-1/2",E("sm","mb")),bottom:w("top-full","left-1/2","transform","-translate-x-1/2",E("sm","mt")),left:w("right-full","top-1/2","transform","-translate-y-1/2",E("sm","mr")),right:w("left-full","top-1/2","transform","-translate-y-1/2",E("sm","ml"))}},defaultVariants:{position:"top"}}),_=xe(w("absolute","w-0","h-0",jc("thick"),"border-transparent"),{variants:{position:{top:w("top-full","left-1/2","transform","-translate-x-1/2",y("top")),bottom:w("bottom-full","left-1/2","transform","-translate-x-1/2",y("bottom")),left:w("left-full","top-1/2","transform","-translate-y-1/2",y("left")),right:w("right-full","top-1/2","transform","-translate-y-1/2",y("right"))}},defaultVariants:{position:"top"}}),S=l.isValidElement(t)?(()=>{const F=t,A=F.props,R=A.ref;return l.cloneElement(F,{ref:I=>{x.current=I,typeof R=="function"?R(I):R&&typeof R=="object"&&"current"in R&&(R.current=I)},"aria-describedby":f?v:A["aria-describedby"],onMouseEnter:I=>{var L;k(),(L=A.onMouseEnter)==null||L.call(A,I)},onMouseLeave:I=>{var L;b(),(L=A.onMouseLeave)==null||L.call(A,I)},onFocus:I=>{var L;j(),(L=A.onFocus)==null||L.call(A,I)},onBlur:I=>{var L;C(),(L=A.onBlur)==null||L.call(A,I)},onKeyDown:I=>{var L;g(I),(L=A.onKeyDown)==null||L.call(A,I)}})})():t,M=w(i?"static":"relative","inline-block",a);return n.jsxs("div",P(T({className:M},c),{children:[S,f&&n.jsxs("div",{ref:h,id:v,className:w(N({position:r})),role:"tooltip","aria-live":"polite",children:[e,n.jsx("div",{className:w(_({position:r})),"aria-hidden":"true"})]})]}))}function ga(c){var u=c,{variant:e="text",width:t,height:r,lines:s=1,className:a="","aria-label":o}=u,i=O(u,["variant","width","height","lines","className","aria-label"]);const d=["motion-safe:animate-pulse","bg-surface-muted",J("sm")],f={text:"h-4",card:"h-32",list:"h-12",circle:"rounded-full"},p=w(...d,f[e],a),m={};t&&(m.width=t),r&&(m.height=r);const h=o||`Loading ${e} content`;return e==="text"&&s>1?n.jsx("div",P(T({className:E("sm","space-y"),role:"status","aria-busy":"true","aria-label":h},i),{children:Array.from({length:s}).map((x,v)=>n.jsx("div",{className:p,style:v===s-1?{width:"75%"}:m,"aria-hidden":"true"},v))})):n.jsx("div",T({className:p,style:m,role:"status","aria-busy":"true","aria-label":h},i))}function Nc({defaultOpen:e=!0,open:t,onOpenChange:r,storageKey:s}){const a=l.useCallback(()=>{if(s&&typeof window!="undefined"){const f=localStorage.getItem(s);if(f!==null)return f==="true"}return e},[e,s]),[o,i]=l.useState(a),c=t!==void 0?t:o;l.useEffect(()=>{s&&typeof window!="undefined"&&t===void 0&&localStorage.setItem(s,String(o))},[o,s,t]);const u=l.useCallback(f=>{t===void 0&&i(f),r==null||r(f)},[t,r]),d=l.useCallback(()=>{u(!c)},[c,u]);return{isOpen:c,toggle:d,setOpen:u}}function xa(f){var p=f,{children:e,trigger:t,defaultOpen:r=!0,open:s,onOpenChange:a,disabled:o=!1,duration:i=200,storageKey:c,className:u=""}=p,d=O(p,["children","trigger","defaultOpen","open","onOpenChange","disabled","duration","storageKey","className"]);const{isOpen:m,toggle:h}=Nc({defaultOpen:r,open:s,onOpenChange:a,storageKey:c}),x=l.useRef(null),[v,k]=l.useState(m?"auto":0);l.useEffect(()=>{x.current&&k(m?x.current.scrollHeight:0)},[m,e]),l.useEffect(()=>{if(!m||!x.current)return;const j=new ResizeObserver(()=>{x.current&&m&&k(x.current.scrollHeight)});return j.observe(x.current),()=>{j.disconnect()}},[m]);const b=`collapsible-content-${Math.random().toString(36).substr(2,9)}`;return n.jsxs("div",P(T({className:u},d),{children:[n.jsx("button",{type:"button",onClick:h,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),o||h())},disabled:o,"aria-expanded":m,"aria-controls":b,"aria-disabled":o,className:w("w-full","text-left","focus:outline-none","focus:ring-2","focus:ring-line-brand","focus:ring-offset-2",J("md")),children:t}),n.jsx("div",{id:b,ref:x,style:{height:typeof v=="number"?`${v}px`:v,overflow:"hidden",transition:`height ${i}ms ease-in-out`},"aria-hidden":!m,children:n.jsx("div",{children:e})})]}))}const Nr=l.memo(l.forwardRef(function(f,d){var p=f,{id:t,label:r,error:s=!1,helperText:a,className:o="",disabled:i=!1,indeterminate:c=!1}=p,u=O(p,["id","label","error","helperText","className","disabled","indeterminate"]);const m=l.useMemo(()=>t||`checkbox-${Math.random().toString(36).substr(2,9)}`,[t]),h=l.useMemo(()=>s?`${m}-error`:void 0,[s,m]),x=l.useMemo(()=>a?`${m}-helper`:void 0,[a,m]),v=l.useMemo(()=>"focus:border-line-focus",[]),k=l.useMemo(()=>"focus:border-error",[]),b=l.useMemo(()=>s?k.replace("focus:border-","focus:ring-"):v.replace("focus:border-","focus:ring-"),[s,k,v]),j=l.useMemo(()=>w("h-4","w-4",J("sm"),"border","border-line-default","text-fg-brand","focus:ring-2",b,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",o),[b,s,o]),C=l.useMemo(()=>w(ce("label"),E("sm","ml"),i?"opacity-50 cursor-not-allowed":"cursor-pointer"),[i]),g=l.useRef(null),y=l.useCallback(N=>{g.current=N,typeof d=="function"?d(N):d&&(d.current=N),N&&(N.indeterminate=c)},[d,c]);return l.useEffect(()=>{g.current&&(g.current.indeterminate=c)},[c]),n.jsxs("div",{className:w("flex","flex-col",E("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",T({type:"checkbox",id:m,ref:y,className:j,disabled:i,"aria-invalid":s,"aria-describedby":h||x||void 0,"aria-label":r?void 0:"Checkbox"},u)),r&&n.jsx("label",{htmlFor:m,className:C,children:r})]}),(s||a)&&n.jsx("div",{id:h||x,className:w(E("xs","mt"),ce("caption"),s?"text-fg-error":"text-fg-secondary"),role:s?"alert":void 0,children:s?a||"This field has an error":a})]})}));Nr.displayName="Checkbox";const va=l.memo(l.forwardRef(function(d,u){var f=d,{id:t,label:r,error:s=!1,helperText:a,className:o="",disabled:i=!1}=f,c=O(f,["id","label","error","helperText","className","disabled"]);const p=l.useMemo(()=>t||`radio-${Math.random().toString(36).substr(2,9)}`,[t]),m=l.useMemo(()=>s?`${p}-error`:void 0,[s,p]),h=l.useMemo(()=>a?`${p}-helper`:void 0,[a,p]),x=l.useMemo(()=>"focus:border-line-focus",[]),v=l.useMemo(()=>"focus:border-error",[]),k=l.useMemo(()=>s?v.replace("focus:border-","focus:ring-"):x.replace("focus:border-","focus:ring-"),[s,v,x]),b=l.useMemo(()=>w("h-4","w-4","border","border-line-default","text-fg-brand","focus:ring-2",k,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",o),[k,s,o]),j=l.useMemo(()=>w(ce("label"),E("sm","ml"),i?"opacity-50 cursor-not-allowed":"cursor-pointer"),[i]);return n.jsxs("div",{className:w("flex","flex-col",E("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",T({type:"radio",id:p,ref:u,className:b,disabled:i,"aria-invalid":s,"aria-describedby":m||h||void 0,"aria-label":r?void 0:"Radio button"},c)),r&&n.jsx("label",{htmlFor:p,className:j,children:r})]}),(s||a)&&n.jsx("div",{id:m||h,className:w(E("xs","mt"),ce("caption"),s?"text-fg-error":"text-fg-secondary"),role:s?"alert":void 0,children:s?a||"This field has an error":a})]})}));va.displayName="Radio";class ft{static create(t){return{none:{value:"none",tailwind:"shadow-none",description:"No shadow"},sm:{value:"0 1px 2px 0 rgb(0 0 0 / 0.05)",tailwind:"shadow-sm",description:"Small shadow for subtle elevation"},md:{value:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",tailwind:"shadow-md",description:"Medium shadow for cards and elevated elements"},lg:{value:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",tailwind:"shadow-lg",description:"Large shadow for modals and dropdowns"},xl:{value:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",tailwind:"shadow-xl",description:"Extra large shadow for prominent modals"},"2xl":{value:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",tailwind:"shadow-2xl",description:"2X large shadow for maximum elevation"},inner:{value:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",tailwind:"shadow-inner",description:"Inner shadow for inset elements"}}[t]}}const Sc={none:ft.create("none"),sm:ft.create("sm"),md:ft.create("md"),lg:ft.create("lg"),xl:ft.create("xl"),"2xl":ft.create("2xl"),inner:ft.create("inner")};function Se(e){return Sc[e].tailwind}const Ot={track:{sm:{w:"w-9",h:"h-5"},md:{w:"w-11",h:"h-6"},lg:{w:"w-14",h:"h-7"}},thumb:{sm:{w:"w-4",h:"h-4"},md:{w:"w-5",h:"h-5"},lg:{w:"w-6",h:"h-6"}},translate:{sm:"translate-x-4",md:"translate-x-5",lg:"translate-x-7"}};function Cc(e){return{track:`${Ot.track[e].w} ${Ot.track[e].h}`,thumb:`${Ot.thumb[e].w} ${Ot.thumb[e].h}`,translate:Ot.translate[e]}}const $c=xe("w-full",{variants:{size:{sm:"h-1",md:"h-2",lg:"h-3"},variant:{primary:"bg-surface-muted",secondary:"bg-surface-muted",success:"bg-success-bg-emphasis",error:"bg-error-bg-emphasis",warning:"bg-warning-bg-emphasis",info:"bg-info-bg-emphasis"}},defaultVariants:{size:"md",variant:"primary"}}),En=xe("transition-all",{variants:{variant:{primary:"bg-surface-brand",secondary:"bg-surface-secondary",success:"bg-success",error:"bg-error",warning:"bg-warning",info:"bg-info"}},defaultVariants:{variant:"primary"}}),vs=l.forwardRef(function(p,f){var m=p,{value:t,max:r=100,variant:s="primary",size:a="md",showLabel:o=!1,label:i,"aria-label":c,className:u=""}=m,d=O(m,["value","max","variant","size","showLabel","label","aria-label","className"]);const h=t===void 0,x=h?void 0:Math.min(Math.max(t/r*100,0),100),v=c||(h?"Loading in progress":`Progress: ${x==null?void 0:x.toFixed(0)}%`);return n.jsxs("div",P(T({ref:f,className:w("w-full",u)},d),{children:[o&&(i||!h)&&n.jsxs("div",{className:w("flex","items-center","justify-between",E("xs","mb")),children:[i&&n.jsx("span",{className:w(re("bodySmall"),Fe("label"),"text-fg-primary"),children:i}),!h&&x!==void 0&&n.jsxs("span",{className:w(re("bodySmall"),"text-fg-secondary"),children:[x.toFixed(0),"%"]})]}),n.jsx("div",{role:"progressbar","aria-valuemin":h?void 0:0,"aria-valuemax":h?void 0:r,"aria-valuenow":h?void 0:t,"aria-label":v,"aria-busy":h,className:w("relative","w-full","overflow-hidden",$c({size:a,variant:s}),J("full")),children:h?n.jsx("div",{className:w("absolute","top-0","left-0","bottom-0",En({variant:s}),J("full"),"motion-reduce:animate-none"),style:{width:"30%",animation:"progress-indeterminate 1.5s ease-in-out infinite"}}):n.jsx("div",{className:w("h-full",En({variant:s}),J("full"),"transition-all","duration-300","ease-out"),style:{width:`${x}%`},"aria-hidden":"true"})})]}))});vs.displayName="Progress";const ya=l.memo(l.forwardRef(function(m,p){var h=m,{size:t="md",label:r,description:s,error:a=!1,className:o="",disabled:i=!1,checked:c,onChange:u,id:d}=h,f=O(h,["size","label","description","error","className","disabled","checked","onChange","id"]);const x=l.useMemo(()=>d||`switch-${Math.random().toString(36).substr(2,9)}`,[d]),v=l.useMemo(()=>r?`${x}-label`:void 0,[r,x]),k=l.useMemo(()=>s?`${x}-description`:void 0,[s,x]),b=l.useMemo(()=>Cc(t),[t]),j=l.useMemo(()=>"focus:border-line-focus".replace("focus:border-","focus:ring-"),[]),C=l.useMemo(()=>w("relative","inline-flex","shrink-0","cursor-pointer","rounded-full","border-2","border-transparent",he("base"),"focus:outline-none","focus:ring-2",j,"focus:ring-offset-2",b.track,c?"bg-surface-brand":"bg-surface-muted",a&&!c&&"border-error",i&&"opacity-50 cursor-not-allowed",o),[j,b.track,c,a,i,o]),g=l.useMemo(()=>w("pointer-events-none","inline-block","rounded-full","bg-surface-base","shadow","transform",he("base"),b.thumb,c?b.translate:"translate-x-0"),[b.thumb,b.translate,c]);return n.jsxs("div",{className:w("flex","items-start",E("md","gap")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("button",{type:"button",className:C,role:"switch","aria-checked":c,"aria-labelledby":v,"aria-describedby":k,disabled:i,onClick:l.useCallback(y=>{if(!i&&u){const N=P(T({},y),{target:P(T({},y.target),{checked:!c}),currentTarget:P(T({},y.currentTarget),{checked:!c})});u(N)}},[i,u,c]),onKeyDown:l.useCallback(y=>{if((y.key==="Enter"||y.key===" ")&&!i&&u){y.preventDefault();const N=P(T({},y),{target:P(T({},y.target),{checked:!c}),currentTarget:P(T({},y.currentTarget),{checked:!c})});u(N)}},[i,u,c]),children:n.jsx("span",{className:g})}),n.jsx("input",T({ref:p,type:"checkbox",id:x,checked:c,onChange:u,disabled:i,className:"sr-only","aria-hidden":"true"},f))]}),(r||s)&&n.jsxs("div",{className:"flex-1",children:[r&&n.jsx("label",{id:v,htmlFor:x,className:w("block",re("bodySmall"),Fe("label"),a?"text-fg-error":"text-fg-primary",i?"opacity-50":"cursor-pointer"),children:r}),s&&n.jsx("p",{id:k,className:w(E("xs","mt"),re("bodySmall"),a?"text-fg-error":"text-fg-secondary"),children:s})]})]})}));ya.displayName="Switch";const ys=l.memo(function(o){var i=o,{orientation:t="horizontal",variant:r="solid",className:s=""}=i,a=O(i,["orientation","variant","className"]);const c=l.useMemo(()=>{const u=["border-0","border-line-default"],d={horizontal:"w-full border-t",vertical:"h-full border-l self-stretch"},f={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted"};return w(...u,d[t],f[r],s)},[t,r,s]);return t==="vertical"?n.jsx("div",T({className:c,role:"separator","aria-orientation":"vertical"},a)):n.jsx("hr",T({className:c,role:"separator","aria-orientation":"horizontal"},a))});ys.displayName="Separator";const wa=l.forwardRef(function(b,k){var j=b,{value:t,defaultValue:r,min:s=0,max:a=100,step:o=1,variant:i="single",size:c="md",disabled:u=!1,showValue:d=!1,marks:f=[],onChange:p,onValueChange:m,label:h,className:x=""}=j,v=O(j,["value","defaultValue","min","max","step","variant","size","disabled","showValue","marks","onChange","onValueChange","label","className"]);const C=l.useRef(null),[g,y]=l.useState(r||(i==="range"?[s,a]:s)),[N,_]=l.useState(!1),[S,M]=l.useState(null),F=t!==void 0,A=F?t:g,R=H=>(H-s)/(a-s)*100,I=H=>{if(!C.current)return s;const U=C.current.getBoundingClientRect(),V=Math.max(0,Math.min(1,(H-U.left)/U.width)),ne=s+V*(a-s);return Math.round(ne/o)*o},L=(H,U="min")=>{if(u)return;H.preventDefault(),_(!0),M(U);const V=oe=>{if(!C.current)return;const ie=I(oe.clientX);z(ie,U)},ne=()=>{_(!1),M(null),document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",ne)};document.addEventListener("mousemove",V),document.addEventListener("mouseup",ne)},z=(H,U="min")=>{const V=Math.max(s,Math.min(a,H));if(i==="range"){const[ne,oe]=Array.isArray(A)?A:[s,a];let ie;U==="min"?ie=[Math.min(V,oe),oe]:ie=[ne,Math.max(V,ne)],F||y(ie),p==null||p(ie),m==null||m(ie)}else F||y(V),p==null||p(V),m==null||m(V)},Y=H=>{if(u||N)return;const U=I(H.clientX);z(U)},q=()=>"focus:ring-line-brand ring-offset-2",W=xe(w("relative","cursor-pointer"),{variants:{size:{sm:"h-1",md:"h-2",lg:"h-3"},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},defaultVariants:{size:"md",disabled:!1}}),ae=xe(w("absolute","bg-surface-brand","rounded-full","border-2","border-white","shadow-md","cursor-grab","active:cursor-grabbing",he("base"),"-translate-x-1/2","-translate-y-1/2","top-1/2"),{variants:{size:{sm:"w-3 h-3",md:"w-4 h-4",lg:"w-5 h-5"},active:{true:q(),false:""}},defaultVariants:{size:"md",active:!1}}),se=typeof A=="number"?A:A[0],D=Array.isArray(A)?A[0]:s,B=Array.isArray(A)?A[1]:se,X=R(D),Q=R(B);return n.jsxs("div",P(T({ref:k,className:w("w-full",x)},v),{children:[h&&n.jsxs("label",{className:w("block",re("bodySmall"),Fe("label"),"text-fg-primary",E("sm","mb")),children:[h,d&&n.jsx("span",{className:w(E("sm","ml"),"text-fg-secondary"),children:i==="range"?`${D} - ${B}`:se})]}),n.jsxs("div",{ref:C,className:w(W({size:c,disabled:u}),"bg-surface-muted",J("full")),onClick:Y,role:i==="range"?void 0:"slider","aria-valuemin":i==="range"?void 0:s,"aria-valuemax":i==="range"?void 0:a,"aria-valuenow":i==="range"?void 0:se,"aria-disabled":i==="range"?void 0:u,"aria-label":i==="range"?void 0:h,children:[n.jsx("div",{className:w("absolute",W({size:c}),"bg-surface-brand",J("full"),he("base")),style:{left:`${X}%`,width:`${Q-X}%`}}),f.map(H=>{const U=R(H);return n.jsx("div",{className:w("absolute","w-1","h-1","bg-line-strong",J("full"),"-translate-x-1/2"),style:{left:`${U}%`,top:"50%",transform:"translate(-50%, -50%)"}},H)}),i==="range"?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:w(ae({size:c,active:S==="min"})),style:{left:`${X}%`},onMouseDown:H=>L(H,"min"),role:"slider","aria-valuemin":s,"aria-valuemax":B,"aria-valuenow":D}),n.jsx("div",{className:w(ae({size:c,active:S==="max"})),style:{left:`${Q}%`},onMouseDown:H=>L(H,"max"),role:"slider","aria-valuemin":D,"aria-valuemax":a,"aria-valuenow":B})]}):n.jsx("div",{className:w(ae({size:c,active:N})),style:{left:`${Q}%`},onMouseDown:H=>L(H)}),d&&!h&&n.jsx("div",{className:"absolute -top-6 left-0 right-0 flex justify-center",children:n.jsx("span",{className:w(re("caption"),"text-fg-secondary","bg-surface-overlay",E("sm","px"),E("xs","py"),J("md"),"shadow"),children:i==="range"?`${D} - ${B}`:se})})]})]}))});wa.displayName="Slider";const Ec=xe(w("inline-flex","items-center","font-medium",J("full"),E("xs","gap")),{variants:{variant:{default:w("bg-surface-muted","text-fg-primary","border","border-line-default"),outlined:w("bg-transparent","text-fg-primary","border","border-line-default"),filled:w("bg-surface-brand-strong","text-fg-inverse","border","border-transparent")},size:{sm:w(E("xs","px"),E("xs","py"),re("caption")),md:w(E("sm","px"),E("xs","py"),re("bodySmall")),lg:w(E("md","px"),E("sm","py"),re("body"))},selected:{true:w("bg-surface-brand-strong","text-fg-inverse","border","border-line-brand"),false:""},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},compoundVariants:[{selected:!0,variant:"default",class:""},{selected:!0,variant:"outlined",class:""},{selected:!0,variant:"filled",class:""}],defaultVariants:{variant:"default",size:"md",selected:!1,disabled:!1}}),ws=l.forwardRef(function(h,m){var x=h,{children:t,variant:r="default",size:s="md",onRemove:a,selected:o=!1,disabled:i=!1,className:c="","aria-label":u,onClick:d,tabIndex:f}=x,p=O(x,["children","variant","size","onRemove","selected","disabled","className","aria-label","onClick","tabIndex"]);const v=d!==void 0||o!==!1&&o!==void 0,k=o?"option":v?"button":void 0,j=(()=>{if(u)return u;if(typeof t=="string")return t;if(typeof t=="object"&&t!==null&&"props"in t){const y=t.props;if(y!=null&&y.children&&typeof y.children=="string")return y.children}})(),C=k==="button"&&!j,g=y=>{i||(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),d&&d())};return n.jsxs("div",P(T({ref:m,className:w(Ec({variant:r,size:s,selected:o,disabled:i}),a&&E("xs","pr"),v&&!i&&"cursor-pointer focus:outline-none focus:ring-2 focus:ring-line-focus focus:ring-offset-2",c),role:k,"aria-selected":o?!0:void 0,"aria-disabled":i,"aria-label":C?"Chip":u||(k==="button"?j:void 0),tabIndex:f!==void 0?f:v&&!i?0:void 0,onClick:i?void 0:d,onKeyDown:g},p),{children:[n.jsx("span",{children:t}),a&&!i&&n.jsx("button",{type:"button",onClick:y=>{y.stopPropagation(),a()},className:w(E("xs","ml"),"hover:bg-tint-hover",J("full"),E("xs","p"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-1"),"aria-label":`Remove ${j||"chip"}`,children:n.jsx(we,{className:"h-3 w-3","aria-hidden":"true"})})]}))});ws.displayName="Chip";const ur=l.forwardRef(function(f,d){var p=f,{src:t,alt:r,fallback:s,size:a="md",variant:o="circle","aria-label":i,className:c=""}=p,u=O(p,["src","alt","fallback","size","variant","aria-label","className"]);const[m,h]=l.useState(!1),[x,v]=l.useState(!1),k={xs:"h-6 w-6 text-xs",sm:"h-8 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg",xl:"h-16 w-16 text-xl"},b={circle:"rounded-full",square:"rounded-none",rounded:"rounded-md"},j=!t||m,C=typeof s=="string"?s.toUpperCase().slice(0,2):s,g=i||r||"User avatar";return n.jsxs("div",P(T({ref:d,className:w("relative","inline-flex","items-center","justify-center","shrink-0","font-medium","overflow-hidden",k[a],b[o],"bg-surface-muted","text-fg-primary",c),role:"img","aria-label":g},u),{children:[!j&&t&&n.jsx("img",{src:t,alt:r||"",className:w("w-full","h-full","object-cover",o==="circle"?"rounded-full":o==="square"?"rounded-none":"rounded-md",x?"opacity-100":"opacity-0","transition-opacity","duration-200"),onLoad:()=>v(!0),onError:()=>{h(!0),v(!1)},"aria-hidden":"true"}),j&&n.jsx("span",{className:w("flex","items-center","justify-center","w-full","h-full",o==="circle"?"rounded-full":o==="square"?"rounded-none":"rounded-md"),"aria-hidden":"true",children:C||"?"})]}))});ur.displayName="Avatar";function Mc(c){var u=c,{children:e,max:t=3,size:r="md",variant:s="circle",spacing:a="md",className:o=""}=u,i=O(u,["children","max","size","variant","spacing","className"]);const d={none:"",sm:"-space-x-1",md:"-space-x-2",lg:"-space-x-3"},f=l.Children.toArray(e).filter(Boolean),p=f.slice(0,t),m=f.length-t;return n.jsxs("div",P(T({className:w("flex","items-center",d[a],o),role:"group","aria-label":`${f.length} avatars`},i),{children:[p.map((h,x)=>{let v=h;if(l.isValidElement(h)&&h.type===ur){const k=h.props;v=l.cloneElement(h,{size:k.size||r,variant:k.variant||s})}return n.jsx("div",{className:"ring-2 ring-surface-base",style:{zIndex:f.length-x},children:v},x)}),m>0&&n.jsx(ur,{size:r,variant:s,fallback:`+${m}`,"aria-label":`${m} more avatars`,className:"ring-2 ring-surface-base",style:{zIndex:0}})]}))}const fr=l.memo(function(d){var f=d,{variant:t="default",padding:r="medium",className:s="",onClick:a,"aria-label":o,"aria-labelledby":i,children:c}=f,u=O(f,["variant","padding","className","onClick","aria-label","aria-labelledby","children"]);const p=xe(w("bg-surface-base",J("lg"),"border","border-line-default","shadow-sm"),{variants:{variant:{default:"",hover:w("hover:shadow-md","transition-shadow","cursor-pointer"),selected:w("border-line-brand","shadow-md")},padding:{none:"",small:E("xs","p"),medium:E("base","p"),large:E("lg","p")}},defaultVariants:{variant:"default",padding:"medium"}}),m=l.useMemo(()=>a!==void 0||t==="hover",[a,t]),h=m?"button":void 0,x=m?0:void 0,v=w(p({variant:t,padding:r}),s),k=l.useCallback(b=>{m&&(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),a==null||a())},[m,a]);return n.jsx("div",P(T({className:v,role:h,tabIndex:x,onClick:a,onKeyDown:k,"aria-label":o,"aria-labelledby":i},u),{children:c}))});fr.displayName="Card";const Sr=l.createContext(void 0);function ks(){const e=l.useContext(Sr);if(e===void 0)throw new Error("useFormContext must be used within a Form component with react-hook-form integration");return e}function Tc(){return l.useContext(Sr)}function ka({form:e,loading:t=!1,children:r}){const s={form:e,loading:t};return n.jsx(Sr.Provider,{value:s,children:r})}function Ac(c){var u=c,{children:e,onSubmit:t,loading:r=!1,error:s=null,success:a=null,className:o=""}=u,i=O(u,["children","onSubmit","loading","error","success","className"]);const d=w(E("lg","gap"),"flex","flex-col",o);if("form"in i&&i.form!==void 0){const v=i,{form:b,onSubmit:j,onSubmitError:C}=v,g=O(v,["form","onSubmit","onSubmitError"]),y=b.handleSubmit(N=>rr(null,null,function*(){try{yield j(N)}catch(_){C==null||C(_)}}),N=>{C==null||C(N)});return n.jsx(ka,{form:b,loading:r,children:n.jsxs("form",P(T({className:d,onSubmit:y,noValidate:!0},g),{children:[e,s&&n.jsx("div",{role:"alert",className:w(E("md","p"),ve("sm"),"text-error-dark","bg-error-bg","border","border-error",J("md")),children:s}),a&&n.jsx("div",{role:"alert",className:w(E("md","p"),ve("sm"),"text-success-dark","bg-success-bg","border","border-success",J("md")),children:a})]}))})}const p=i.onSubmit||t,k=i,{onSubmit:m}=k,h=O(k,["onSubmit"]),x=b=>{b.preventDefault(),p&&!r&&p(b)};return n.jsxs("form",P(T({className:d,onSubmit:x,noValidate:!0},h),{children:[e,s&&n.jsx("div",{role:"alert",className:w(E("md","p"),ve("sm"),"text-error-dark","bg-error-bg","border","border-error",J("md")),children:s}),a&&n.jsx("div",{role:"alert",className:w(E("md","p"),ve("sm"),"text-success-dark","bg-success-bg","border","border-success",J("md")),children:a})]}))}function Rc({name:e,label:t,children:r,rules:s,className:a=""}){var m;const{form:o}=ks();if(!o)throw new Error("FormField must be used within a Form component with react-hook-form integration");const{register:i,formState:{errors:c},watch:u}=o,d=i(e,s),f=(m=c[e])==null?void 0:m.message,p=u(e);return n.jsxs("div",{className:w("flex","flex-col",E("sm","gap"),a),children:[t&&n.jsx(Mt,{htmlFor:e,className:w("block",ve("sm"),Et("medium"),"text-fg-primary"),children:t}),r({name:e,register:h=>i(h,s),error:f,value:p,onChange:d.onChange,onBlur:d.onBlur}),f&&n.jsx(ba,{message:f})]})}var Ic=e=>e.type==="checkbox",Dc=e=>e instanceof Date,He=e=>e==null;const Lc=e=>typeof e=="object";var qe=e=>!He(e)&&!Array.isArray(e)&&Lc(e)&&!Dc(e),Fc=e=>{const t=e.constructor&&e.constructor.prototype;return qe(t)&&t.hasOwnProperty("isPrototypeOf")},ja=typeof window!="undefined"&&typeof window.HTMLElement!="undefined"&&typeof document!="undefined";function mt(e){if(e instanceof Date)return new Date(e);const t=typeof FileList!="undefined"&&e instanceof FileList;if(ja&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(qe(e)&&Fc(e)))return e;const s=r?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(s[a]=mt(e[a]));return s}var js=e=>/^\w*$/.test(e),_e=e=>e===void 0,Na=e=>Array.isArray(e)?e.filter(Boolean):[],Ns=e=>Na(e.replace(/["|']|\]/g,"").split(/\.|\[/)),De=(e,t,r)=>{if(!t||!qe(e))return r;const s=(js(t)?[t]:Ns(t)).reduce((a,o)=>He(a)?a:a[o],e);return _e(s)||s===e?_e(e[t])?r:e[t]:s},Sa=e=>typeof e=="boolean",_c=e=>typeof e=="function",mr=(e,t,r)=>{let s=-1;const a=js(t)?[t]:Ns(t),o=a.length,i=o-1;for(;++s<o;){const c=a[s];let u=r;if(s!==i){const d=e[c];u=qe(d)||Array.isArray(d)?d:isNaN(+a[s+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=u,e=e[c]}};const Ct={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},We={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Ca=l.createContext(null);Ca.displayName="HookFormControlContext";const Pc=()=>l.useContext(Ca),zc=typeof window!="undefined"?l.useLayoutEffect:l.useEffect;var Xe=e=>typeof e=="string";const Oc=l.createContext(null);Oc.displayName="HookFormContext";var Vc=(e,t,r,s,a)=>t?P(T({},r[e]),{types:P(T({},r[e]&&r[e].types?r[e].types:{}),{[s]:a||!0})}):{},Le=e=>Array.isArray(e)?e:[e],pr=e=>qe(e)&&!Object.keys(e).length,Wc=e=>e.type==="file",Hc=e=>{if(!ja)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Bc=e=>e.type==="radio";function Uc(e,t){const r=t.slice(0,-1).length;let s=0;for(;s<r;)e=_e(e)?s++:e[t[s++]];return e}function qc(e){for(const t in e)if(e.hasOwnProperty(t)&&!_e(e[t]))return!1;return!0}function $a(e,t){const r=Array.isArray(t)?t:js(t)?[t]:Ns(t),s=r.length===1?e:Uc(e,r),a=r.length-1,o=r[a];return s&&delete s[o],a!==0&&(qe(s)&&pr(s)||Array.isArray(s)&&qc(s))&&$a(e,r.slice(0,-1)),e}var Ea=e=>e instanceof RegExp,ir=e=>({isOnSubmit:!e||e===Ct.onSubmit,isOnBlur:e===Ct.onBlur,isOnChange:e===Ct.onChange,isOnAll:e===Ct.all,isOnTouch:e===Ct.onTouched}),Gc=(e,t,r)=>t.watchAll||t.watch.has(e)||[...t.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length)));const os=(e,t,r,s)=>{for(const o of Object.keys(e)){const i=De(e,o);if(i){const a=i,{_f:c}=a,u=O(a,["_f"]);if(c){if(c.refs&&c.refs[0]&&t(c.refs[0],o))return!0;if(c.ref&&t(c.ref,c.name))return!0;if(os(u,t))break}else if(qe(u)&&os(u,t))break}}};var Kc=(e,t,r)=>{const s=Le(De(e,r));return mr(s,"root",t[r]),mr(e,r,s),e};function Mn(e,t,r="validate"){if(Xe(e)||Array.isArray(e)&&e.every(Xe)||Sa(e)&&!e)return{type:r,message:Xe(e)?e:"",ref:t}}var Nt=e=>qe(e)&&!Ea(e)?e:{value:e,message:""},Yc=(e,t,r,s,a,o)=>rr(null,null,function*(){const{ref:i,refs:c,required:u,maxLength:d,minLength:f,min:p,max:m,pattern:h,validate:x,name:v,valueAsNumber:k,mount:b}=e._f,j=De(r,v);if(!b||t.has(v))return{};const C=c?c[0]:i,g=M=>{a&&C.reportValidity&&(C.setCustomValidity(Sa(M)?"":M||""),C.reportValidity())},y={};Bc(i),Ic(i);const N=(k||Wc(i))&&_e(i.value)&&_e(j)||Hc(i)&&i.value===""||j===""||Array.isArray(j)&&!j.length,_=Vc.bind(null,v,s,y),S=(M,F,A,R=We.maxLength,I=We.minLength)=>{const L=M?F:A;y[v]=T({type:M?R:I,message:L,ref:i},_(M?R:I,L))};if(!Array.isArray(j)||!j.length){const{value:M,message:F}=Xe(u)?{value:!!u,message:u}:Nt(u);if(M&&(y[v]=T({type:We.required,message:F,ref:C},_(We.required,F)),!s))return g(F),y}if(!N&&(!He(p)||!He(m))){let M,F;const A=Nt(m),R=Nt(p);if(!He(j)&&!isNaN(j)){const I=i.valueAsNumber||j&&+j;He(A.value)||(M=I>A.value),He(R.value)||(F=I<R.value)}else{const I=i.valueAsDate||new Date(j),L=q=>new Date(new Date().toDateString()+" "+q),z=i.type=="time",Y=i.type=="week";Xe(A.value)&&j&&(M=z?L(j)>L(A.value):Y?j>A.value:I>new Date(A.value)),Xe(R.value)&&j&&(F=z?L(j)<L(R.value):Y?j<R.value:I<new Date(R.value))}if((M||F)&&(S(!!M,A.message,R.message,We.max,We.min),!s))return g(y[v].message),y}if((d||f)&&!N&&(Xe(j)||Array.isArray(j))){const M=Nt(d),F=Nt(f),A=!He(M.value)&&j.length>+M.value,R=!He(F.value)&&j.length<+F.value;if((A||R)&&(S(A,M.message,F.message),!s))return g(y[v].message),y}if(h&&!N&&Xe(j)){const{value:M,message:F}=Nt(h);if(Ea(M)&&!j.match(M)&&(y[v]=T({type:We.pattern,message:F,ref:i},_(We.pattern,F)),!s))return g(F),y}if(x){if(_c(x)){const M=yield x(j,r),F=Mn(M,C);if(F&&(y[v]=T(T({},F),_(We.validate,F.message)),!s))return g(F.message),y}else if(qe(x)){let M={};for(const F in x){if(!pr(M)&&!s)break;const A=Mn(yield x[F](j,r),C,F);A&&(M=T(T({},A),_(F,A.message)),g(A.message),s&&(y[v]=M))}if(!pr(M)&&(y[v]=T({ref:C},M),!s))return y}}return g(!0),y}),Ye=()=>{if(typeof crypto!="undefined"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance=="undefined"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},Kr=(e,t,r={})=>r.shouldFocus||_e(r.shouldFocus)?r.focusName||`${e}.${_e(r.focusIndex)?t:r.focusIndex}.`:"",Yr=(e,t)=>[...e,...Le(t)],Xr=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Jr(e,t,r){return[...e.slice(0,t),...Le(r),...e.slice(t)]}var Zr=(e,t,r)=>Array.isArray(e)?(_e(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],Qr=(e,t)=>[...Le(t),...Le(e)];function Xc(e,t){let r=0;const s=[...e];for(const a of t)s.splice(a-r,1),r++;return Na(s).length?s:[]}var es=(e,t)=>_e(t)?[]:Xc(e,Le(t).sort((r,s)=>r-s)),ts=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},Tn=(e,t,r)=>(e[t]=r,e);function Jc(e){const t=Pc(),{control:r=t,name:s,keyName:a="id",shouldUnregister:o,rules:i}=e,[c,u]=l.useState(r._getFieldArray(s)),d=l.useRef(r._getFieldArray(s).map(Ye)),f=l.useRef(!1);r._names.array.add(s),l.useMemo(()=>i&&c.length>=0&&r.register(s,i),[r,s,c.length,i]),zc(()=>r._subjects.array.subscribe({next:({values:g,name:y})=>{if(y===s||!y){const N=De(g,s);Array.isArray(N)&&(u(N),d.current=N.map(Ye))}}}).unsubscribe,[r,s]);const p=l.useCallback(g=>{f.current=!0,r._setFieldArray(s,g)},[r,s]),m=(g,y)=>{const N=Le(mt(g)),_=Yr(r._getFieldArray(s),N);r._names.focus=Kr(s,_.length-1,y),d.current=Yr(d.current,N.map(Ye)),p(_),u(_),r._setFieldArray(s,_,Yr,{argA:Xr(g)})},h=(g,y)=>{const N=Le(mt(g)),_=Qr(r._getFieldArray(s),N);r._names.focus=Kr(s,0,y),d.current=Qr(d.current,N.map(Ye)),p(_),u(_),r._setFieldArray(s,_,Qr,{argA:Xr(g)})},x=g=>{const y=es(r._getFieldArray(s),g);d.current=es(d.current,g),p(y),u(y),!Array.isArray(De(r._fields,s))&&mr(r._fields,s,void 0),r._setFieldArray(s,y,es,{argA:g})},v=(g,y,N)=>{const _=Le(mt(y)),S=Jr(r._getFieldArray(s),g,_);r._names.focus=Kr(s,g,N),d.current=Jr(d.current,g,_.map(Ye)),p(S),u(S),r._setFieldArray(s,S,Jr,{argA:g,argB:Xr(y)})},k=(g,y)=>{const N=r._getFieldArray(s);ts(N,g,y),ts(d.current,g,y),p(N),u(N),r._setFieldArray(s,N,ts,{argA:g,argB:y},!1)},b=(g,y)=>{const N=r._getFieldArray(s);Zr(N,g,y),Zr(d.current,g,y),p(N),u(N),r._setFieldArray(s,N,Zr,{argA:g,argB:y},!1)},j=(g,y)=>{const N=mt(y),_=Tn(r._getFieldArray(s),g,N);d.current=[..._].map((S,M)=>!S||M===g?Ye():d.current[M]),p(_),u([..._]),r._setFieldArray(s,_,Tn,{argA:g,argB:N},!0,!1)},C=g=>{const y=Le(mt(g));d.current=y.map(Ye),p([...y]),u([...y]),r._setFieldArray(s,[...y],N=>N,{},!0,!1)};return l.useEffect(()=>{if(r._state.action=!1,Gc(s,r._names)&&r._subjects.state.next(T({},r._formState)),f.current&&(!ir(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!ir(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([s]).then(g=>{r._updateIsValidating([s]);const y=De(g.errors,s),N=De(r._formState.errors,s);(N?!y&&N.type||y&&(N.type!==y.type||N.message!==y.message):y&&y.type)&&(y?mr(r._formState.errors,s,y):$a(r._formState.errors,s),r._subjects.state.next({errors:r._formState.errors}))});else{const g=De(r._fields,s);g&&g._f&&!(ir(r._options.reValidateMode).isOnSubmit&&ir(r._options.mode).isOnSubmit)&&Yc(g,r._names.disabled,r._formValues,r._options.criteriaMode===Ct.all,r._options.shouldUseNativeValidation).then(y=>!pr(y)&&r._subjects.state.next({errors:Kc(r._formState.errors,y,s)}))}r._subjects.state.next({name:s,values:mt(r._formValues)}),r._names.focus&&os(r._fields,(g,y)=>{if(r._names.focus&&y.startsWith(r._names.focus)&&g.focus)return g.focus(),1}),r._names.focus="",r._setValid(),f.current=!1},[c,s,r]),l.useEffect(()=>(!De(r._formValues,s)&&r._setFieldArray(s),()=>{const g=(y,N)=>{const _=De(r._fields,y);_&&_._f&&(_._f.mount=N)};r._options.shouldUnregister||o?r.unregister(s):g(s,!1)}),[s,r,a,o]),{swap:l.useCallback(k,[p,s,r]),move:l.useCallback(b,[p,s,r]),prepend:l.useCallback(h,[p,s,r]),append:l.useCallback(m,[p,s,r]),remove:l.useCallback(x,[p,s,r]),insert:l.useCallback(v,[p,s,r]),update:l.useCallback(j,[p,s,r]),replace:l.useCallback(C,[p,s,r]),fields:l.useMemo(()=>c.map((g,y)=>P(T({},g),{[a]:d.current[y]||Ye()})),[c,a])}}function Zc(e){const{form:t}=ks();if(!t)throw new Error("useFormFieldArray must be used within a Form component with react-hook-form integration");return Jc(P(T({},e),{control:t.control}))}function Ma(a){var o=a,{items:e,separator:t="/",className:r=""}=o,s=O(o,["items","separator","className"]);const i=["flex","items-center",E("sm","space-x"),re("bodySmall")],c=w(...i,r);return n.jsx("nav",P(T({"aria-label":"Breadcrumb",className:c},s),{children:n.jsx("ol",{className:w("flex","items-center",E("sm","space-x")),children:e.map((u,d)=>{const f=d===e.length-1;return n.jsxs("li",{className:"flex items-center",children:[d>0&&n.jsx("span",{className:w(E("sm","mx"),"text-fg-tertiary"),"aria-hidden":"true",children:t}),f?n.jsx("span",{className:w("text-fg-primary",Fe("label")),"aria-current":"page",children:u.label}):u.href?n.jsx("a",{href:u.href,className:w("inline-flex","items-center",E("xs","px"),E("xs","pt"),"border-b-2","border-transparent",re("bodySmall"),Fe("label"),"transition-colors","text-fg-secondary","hover:border-line-emphasis","hover:text-fg-primary"),children:u.label}):n.jsx("span",{className:"text-fg-secondary",children:u.label})]},d)})})}))}function Ta(u){var d=u,{currentPage:e,totalPages:t,onPageChange:r,totalItems:s,itemsPerPage:a,showPageInfo:o=!0,className:i=""}=d,c=O(d,["currentPage","totalPages","onPageChange","totalItems","itemsPerPage","showPageInfo","className"]);const f=()=>{e>1&&r(e-1)},p=()=>{e<t&&r(e+1)},m=b=>{b>=1&&b<=t&&b!==e&&r(b)},h=()=>{const b=[];if(t<=5)for(let C=1;C<=t;C++)b.push(C);else if(e<=3){for(let C=1;C<=4;C++)b.push(C);b.push("ellipsis"),b.push(t)}else if(e>=t-2){b.push(1),b.push("ellipsis");for(let C=t-3;C<=t;C++)b.push(C)}else{b.push(1),b.push("ellipsis");for(let C=e-1;C<=e+1;C++)b.push(C);b.push("ellipsis"),b.push(t)}return b},x=s&&a?(e-1)*a+1:void 0,v=s&&a?Math.min(e*a,s):void 0,k=w("flex","items-center","justify-between",E("base","px"),E("md","py"),i);return n.jsxs("nav",P(T({className:k,"aria-label":"Pagination"},c),{children:[n.jsxs("div",{className:w("flex","items-center",E("sm","gap")),children:[n.jsx(Z,{variant:"secondary",onClick:f,disabled:e===1,size:"sm",children:"Previous"}),n.jsx("div",{className:w("flex","items-center",E("xs","gap")),children:h().map((b,j)=>{if(b==="ellipsis")return n.jsx("span",{className:w(E("sm","px"),"text-fg-tertiary"),children:"..."},`ellipsis-${j}`);const C=b,g=C===e;return n.jsx(Z,{variant:g?"primary":"ghost",onClick:()=>m(C),size:"sm","aria-current":g?"page":void 0,"aria-label":`Go to page ${C}`,children:C},C)})}),n.jsx(Z,{variant:"secondary",onClick:p,disabled:e===t,size:"sm",children:"Next"})]}),o&&s&&a&&n.jsxs("div",{className:w(ve("sm"),"text-fg-primary"),children:["Showing ",x," to ",v," of ",s," results"]})]}))}function Aa(u){var d=u,{title:e,message:t,actionLabel:r,onAction:s,illustration:a,variant:o="default",className:i=""}=d,c=O(d,["title","message","actionLabel","onAction","illustration","variant","className"]);const f=w("flex","flex-col","items-center","justify-center","text-center",E("xl","py"),E("base","px"),i),p=o==="withAction"||r&&s,m=o==="withIllustration"||a;return n.jsxs("div",P(T({className:f,role:"status","aria-live":"polite","aria-label":`${e}. ${t}`},c),{children:[m&&a&&n.jsx("div",{className:w(E("base","mb")),"aria-hidden":"true",children:a}),n.jsx(Be,{as:"h3",className:w(re("h4"),Et("semibold"),"text-fg-primary",E("sm","mb")),children:e}),n.jsx(Be,{as:"p",className:w(re("bodySmall"),"text-fg-secondary",E("md","mb"),"max-w-sm"),children:t}),p&&r&&s&&n.jsx(Z,{variant:"primary",onClick:s,children:r})]}))}function Ra(c){var u=c,{trigger:e,items:t,align:r="right",variant:s="default",className:a="","aria-label":o}=u,i=O(u,["trigger","items","align","variant","className","aria-label"]);const[d,f]=l.useState(!1),[p,m]=l.useState(-1),h=l.useRef(null),x=l.useRef(null),v=l.useRef(null),k=l.useRef([]),b=`dropdown-menu-${Math.random().toString(36).substr(2,9)}`,j=`dropdown-trigger-${Math.random().toString(36).substr(2,9)}`;l.useEffect(()=>{const S=M=>{h.current&&!h.current.contains(M.target)&&(f(!1),m(-1))};return d&&(document.addEventListener("mousedown",S),setTimeout(()=>{var F;const M=t.findIndex(A=>!A.disabled);M>=0&&(m(M),(F=k.current[M])==null||F.focus())},0)),()=>{document.removeEventListener("mousedown",S)}},[d,t]),l.useEffect(()=>{if(!d)return;const S=F=>{var I,L,z,Y;const A=t.map((q,W)=>({item:q,index:W})).filter(({item:q})=>!q.disabled),R=A.findIndex(({index:q})=>q===p);switch(F.key){case"ArrowDown":{F.preventDefault();const q=R<A.length-1?A[R+1].index:A[0].index;m(q),(I=k.current[q])==null||I.focus();break}case"ArrowUp":{F.preventDefault();const q=R>0?A[R-1].index:A[A.length-1].index;m(q),(L=k.current[q])==null||L.focus();break}case"Home":{F.preventDefault();const q=A[0].index;m(q),(z=k.current[q])==null||z.focus();break}case"End":{F.preventDefault();const q=A[A.length-1].index;m(q),(Y=k.current[q])==null||Y.focus();break}case"Enter":case" ":F.preventDefault(),p>=0&&!t[p].disabled&&C(t[p]);break;case"Escape":F.preventDefault(),f(!1),m(-1),setTimeout(()=>{var q;(q=x.current)==null||q.focus()},0);break}},M=v.current;if(M){const F=S;return M.addEventListener("keydown",F),()=>{M.removeEventListener("keydown",F)}}},[d,p,t]);const C=S=>{S.disabled||(S.onClick(),f(!1),m(-1),setTimeout(()=>{var M;(M=x.current)==null||M.focus()},0))},g=()=>{f(!d),m(-1)},y=S=>{(S.key==="Enter"||S.key===" "||S.key==="ArrowDown")&&(S.preventDefault(),f(!0))},N=r==="right"?"right-0":"left-0",_=l.isValidElement(e)?l.cloneElement(e,{onClick:S=>{g(),e.props.onClick&&e.props.onClick(S)},onKeyDown:S=>{y(S),e.props.onKeyDown&&e.props.onKeyDown(S)},"aria-haspopup":"menu","aria-expanded":d,"aria-controls":b,"aria-label":o||e.props["aria-label"]||"Open menu",id:j,ref:S=>{x.current=S,typeof e.ref=="function"?e.ref(S):e.ref&&(e.ref.current=S)}}):n.jsx("div",{ref:x,onClick:g,onKeyDown:y,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":d,"aria-controls":b,"aria-label":o||"Open menu",id:j,children:e});return n.jsxs("div",P(T({className:w("relative","inline-block",a),ref:h},i),{children:[_,d&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:w("fixed","inset-0","z-10"),onClick:()=>{f(!1),m(-1)},"aria-hidden":"true"}),n.jsx("div",{ref:v,id:b,className:w("absolute","z-20",E("sm","mt"),"w-48",J("md"),Se("lg"),"bg-surface-overlay","ring-1","ring-line-strong","ring-opacity-5",N),role:"menu","aria-orientation":"vertical","aria-labelledby":j,"aria-activedescendant":p>=0?`${b}-item-${p}`:void 0,children:n.jsx("div",{className:w(E("xs","py")),role:"none",children:t.map((S,M)=>{const F=w("block",E("base","px"),E("xs","py"),re("bodySmall"),"w-full","text-left","focus:outline-none",S.disabled?w("text-fg-disabled","cursor-not-allowed","opacity-50"):S.variant==="danger"?w("text-error-dark","hover:bg-error-bg-emphasis","focus:bg-error-bg-emphasis"):w("text-fg-primary","hover:bg-surface-hover","focus:bg-surface-hover"));return n.jsx("button",{id:`${b}-item-${M}`,ref:A=>{k.current[M]=A},type:"button",className:F,onClick:()=>C(S),disabled:S.disabled,role:"menuitem","aria-disabled":S.disabled,tabIndex:S.disabled?-1:p===M?0:-1,children:S.label},M)})})})]})]}))}const Ia=l.createContext(void 0);function Da(){const e=l.useContext(Ia);if(!e)throw new Error("DatePicker components must be used within a DatePicker component");return e}function is({children:e,mode:t="single",value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,locale:u}){const d=()=>{if(r!==void 0)return null;if(s){if(t==="single"&&s instanceof Date)return s;if(t==="range"&&typeof s=="object"&&"start"in s)return null}return null},f=()=>r!==void 0?null:s&&t==="range"&&typeof s=="object"&&"start"in s?s:{start:null,end:null},[p,m]=l.useState(d()),[h,x]=l.useState(f()),v=t==="single"?r instanceof Date?r:p:null,k=t==="range"?r&&typeof r=="object"&&"start"in r?r:h:null,C={selectedDate:v,selectedRange:k,mode:t,onDateChange:g=>{t==="single"&&(r===void 0&&m(g),a==null||a(g))},onRangeChange:g=>{t==="range"&&(r===void 0&&x(g),a==null||a(g))},minDate:o,maxDate:i,disabledDates:c,locale:u};return n.jsx(Ia.Provider,{value:C,children:e})}function Vt(e,t="yyyy-MM-dd"){const r=e.getFullYear(),s=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(r)).replace("MM",s).replace("dd",a).replace("MM/dd/yyyy",`${s}/${a}/${r}`).replace("dd/MM/yyyy",`${a}/${s}/${r}`)}function An(e){if(!e)return null;const t=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(t){const[,a,o,i]=t,c=new Date(parseInt(a),parseInt(o)-1,parseInt(i));if(!isNaN(c.getTime()))return c}const r=e.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(r){const[,a,o,i]=r,c=new Date(parseInt(i),parseInt(a)-1,parseInt(o));if(!isNaN(c.getTime()))return c}const s=e.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(s){const[,a,o,i]=s,c=new Date(parseInt(i),parseInt(o)-1,parseInt(a));if(!isNaN(c.getTime()))return c}return null}function Ss(c){var u=c,{placeholder:e="Select date",format:t="yyyy-MM-dd",showCalendarButton:r=!0,"aria-label":s,onFocus:a,className:o=""}=u,i=O(u,["placeholder","format","showCalendarButton","aria-label","onFocus","className"]);const{selectedDate:d,selectedRange:f,mode:p,onDateChange:m}=Da(),[h,x]=l.useState(""),[v,k]=l.useState(!1),b=l.useRef(null);l.useEffect(()=>{p==="single"&&d?x(Vt(d,t)):p==="range"&&f?f.start&&f.end?x(`${Vt(f.start,t)} - ${Vt(f.end,t)}`):f.start?x(Vt(f.start,t)):x(""):x("")},[d,f,p,t]);const j=y=>{const N=y.target.value;if(x(N),p==="single"){const _=An(N);m(_)}},C=()=>{if(k(!1),h&&p==="single"){const y=An(h);y&&x(Vt(y,t))}},g=()=>{var y;(y=b.current)==null||y.focus()};return n.jsx("div",P(T({className:`relative ${o}`},i),{children:n.jsx(ke,{ref:b,type:"text",value:h,onChange:j,onFocus:()=>{k(!0),a==null||a()},onBlur:C,placeholder:e,"aria-label":s||e,rightIcon:r?n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:g,"aria-label":"Open calendar",type:"button",children:n.jsx(Tl,{className:"h-4 w-4"})}):void 0})}))}function Qc(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function ed(e){return new Date(e.getFullYear(),e.getMonth(),1).getDay()}function pt(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Wt(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function td(e,t,r){if(!t||!r)return!1;const s=e.getTime();return s>=t.getTime()&&s<=r.getTime()}function Rn(e,t,r,s){return!!(t&&e<t||r&&e>r||s!=null&&s.some(a=>pt(e,a)))}const rd=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],sd=["January","February","March","April","May","June","July","August","September","October","November","December"];function Cs(a){var o=a,{month:e,onMonthChange:t,className:r=""}=o,s=O(o,["month","onMonthChange","className"]);const{selectedDate:i,selectedRange:c,mode:u,onDateChange:d,onRangeChange:f,minDate:p,maxDate:m,disabledDates:h}=Da(),[x,v]=l.useState(e||i||(c==null?void 0:c.start)||new Date),k=l.useRef(null),[b,j]=l.useState(()=>{const R=new Date,I=e||i||(c==null?void 0:c.start)||R;return i&&Wt(i,I)?i:Wt(R,I)?R:new Date(I.getFullYear(),I.getMonth(),1)});l.useEffect(()=>{e&&v(e)},[e]),l.useEffect(()=>{if(!k.current)return;const R=k.current.querySelector(`[data-date="${b.toISOString()}"]`);R&&R.focus()},[b]);const C=(()=>{if(Wt(b,x))return b;const R=new Date;return Wt(R,x)?R:new Date(x.getFullYear(),x.getMonth(),1)})(),g=Qc(x),y=ed(x),N=[];for(let R=0;R<y;R++)N.push(null);for(let R=1;R<=g;R++)N.push(new Date(x.getFullYear(),x.getMonth(),R));const _=R=>{if(!Rn(R,p,m,h)){if(u==="single")d(R);else if(u==="range"){const I=c||{start:null,end:null};!I.start||I.start&&I.end?f({start:R,end:null}):I.start&&!I.end&&(R<I.start?f({start:R,end:I.start}):f({start:I.start,end:R}))}}},S=()=>{const R=new Date(x.getFullYear(),x.getMonth()-1,1);v(R),t==null||t(R)},M=()=>{const R=new Date(x.getFullYear(),x.getMonth()+1,1);v(R),t==null||t(R)},F=(R,I)=>{let L=null;switch(R.key){case"ArrowLeft":R.preventDefault(),L=new Date(I.getFullYear(),I.getMonth(),I.getDate()-1);break;case"ArrowRight":R.preventDefault(),L=new Date(I.getFullYear(),I.getMonth(),I.getDate()+1);break;case"ArrowUp":R.preventDefault(),L=new Date(I.getFullYear(),I.getMonth(),I.getDate()-7);break;case"ArrowDown":R.preventDefault(),L=new Date(I.getFullYear(),I.getMonth(),I.getDate()+7);break;case"Home":R.preventDefault(),L=new Date(I.getFullYear(),I.getMonth(),1);break;case"End":R.preventDefault(),L=new Date(I.getFullYear(),I.getMonth()+1,0);break;case"Enter":case" ":R.preventDefault(),_(I);return}L&&(Wt(L,x)||v(new Date(L.getFullYear(),L.getMonth(),1)),j(L))},A=[];for(let R=0;R<N.length;R+=7)A.push(N.slice(R,R+7));return n.jsxs("div",P(T({ref:k,className:`p-4 ${r}`},s),{children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:S,"aria-label":"Previous month",children:n.jsx(Bt,{className:"h-4 w-4"})}),n.jsxs("div",{className:"text-sm font-semibold",children:[sd[x.getMonth()]," ",x.getFullYear()]}),n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:M,"aria-label":"Next month",children:n.jsx(ht,{className:"h-4 w-4"})})]}),n.jsxs("div",{role:"grid","aria-label":"Calendar",children:[n.jsx("div",{role:"row",className:"grid grid-cols-7 gap-1 mb-2",children:rd.map(R=>n.jsx("div",{role:"columnheader",className:"text-center text-xs font-medium text-fg-tertiary py-1",children:R},R))}),A.map((R,I)=>n.jsx("div",{role:"row",className:"grid grid-cols-7 gap-1",children:R.map((L,z)=>{if(!L)return n.jsx("div",{role:"gridcell",className:"aspect-square"},`empty-${I}-${z}`);const Y=u==="single"?pt(L,i):pt(L,(c==null?void 0:c.start)||null)||pt(L,(c==null?void 0:c.end)||null),q=u==="range"&&c?td(L,c.start,c.end):!1,W=Rn(L,p,m,h),ae=pt(L,new Date),se=pt(L,b),D=pt(L,C);return n.jsx("button",{role:"gridcell",type:"button","data-date":L.toISOString(),tabIndex:D?0:-1,onClick:()=>_(L),onKeyDown:B=>F(B,L),className:`
|
|
178
178
|
aspect-square
|
|
179
179
|
text-sm
|
|
180
180
|
${J("md")}
|
|
@@ -182,29 +182,29 @@ React keys must be passed directly to JSX without using spread:
|
|
|
182
182
|
focus:outline-none
|
|
183
183
|
focus:ring-2
|
|
184
184
|
focus:ring-offset-1
|
|
185
|
-
${
|
|
186
|
-
`,"aria-label":
|
|
185
|
+
${W?"text-fg-disabled cursor-not-allowed opacity-50":Y?"bg-surface-brand-strong text-fg-inverse font-semibold":q?"bg-surface-brand-muted text-fg-brand-emphasis":ae?"border-2 border-line-brand font-semibold":se?"bg-surface-brand-muted":"hover:bg-surface-active"}
|
|
186
|
+
`,"aria-label":L.toDateString(),"aria-selected":Y,"aria-disabled":W,children:L.getDate()},L.toISOString())})},`week-${I}`))]})]}))}function Cr({children:e,mode:t="single",value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,placeholder:u,format:d,showCalendarButton:f=!0,"aria-label":p,className:m=""}){const[h,x]=l.useState(!1),v=l.useRef(null),k=l.useRef(null);return l.useEffect(()=>{if(!h)return;const b=j=>{var N,_,S,M;const C=j.target,g=(_=(N=v.current)==null?void 0:N.contains(C))!=null?_:!1,y=(M=(S=k.current)==null?void 0:S.contains(C))!=null?M:!1;!g&&!y&&x(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[h]),l.useEffect(()=>{if(!h)return;const b=j=>{j.key==="Escape"&&x(!1)};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[h]),e?n.jsx(is,{mode:t,value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,children:e}):n.jsx("div",{ref:v,className:`relative ${m}`,children:n.jsxs(is,{mode:t,value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,children:[n.jsx(Ss,{placeholder:u,format:d,showCalendarButton:f,"aria-label":p,onFocus:()=>x(!0)}),h&&n.jsx(La,{containerRef:v,popupRef:k,children:n.jsx(Cs,{})})]})})}function La({children:e,containerRef:t,popupRef:r}){const s=l.useRef(null),a=r||s,[o,i]=l.useState(null);if(l.useEffect(()=>{if(t!=null&&t.current){const u=t.current.getBoundingClientRect();i({top:u.bottom+window.scrollY+8,left:u.left+window.scrollX})}},[t]),!o)return null;const c=n.jsx("div",{ref:a,className:`
|
|
187
187
|
fixed ${ue("popover")}
|
|
188
188
|
bg-surface-overlay
|
|
189
189
|
${J("lg")}
|
|
190
190
|
${Se("xl")}
|
|
191
191
|
border border-line-default
|
|
192
|
-
`,role:"dialog","aria-modal":"false","aria-label":"Date picker calendar",style:{top:`${o.top}px`,left:`${o.left}px`},children:e});return typeof window!="undefined"?Ue.createPortal(c,document.body):c}
|
|
192
|
+
`,role:"dialog","aria-modal":"false","aria-label":"Date picker calendar",style:{top:`${o.top}px`,left:`${o.left}px`},children:e});return typeof window!="undefined"?Ue.createPortal(c,document.body):c}Cr.Input=Ss;Cr.Calendar=Cs;Cr.Popup=La;const nd=Cr,$r=l.createContext(void 0);function Er(){const e=l.useContext($r);if(e===void 0)throw new Error("useTabsContext must be used within a Tabs component");return e}function ad(){return l.useContext($r)}function Fa({defaultValue:e,value:t,onValueChange:r,orientation:s="horizontal",activationMode:a="automatic",children:o}){const[i,c]=l.useState(e||""),u=t!==void 0,d=u?t:i,f=l.useCallback(m=>{u||c(m),r==null||r(m)},[u,r]),p={value:d,onValueChange:f,orientation:s,activationMode:a};return n.jsx($r.Provider,{value:p,children:o})}function _a(a){var o=a,{children:e,className:t="",variant:r="default"}=o,s=O(o,["children","className","variant"]);const{orientation:i}=Er(),c=l.useRef(null);l.useEffect(()=>{const f=c.current;if(!f)return;const p=m=>{var k;const h=Array.from(f.querySelectorAll('[role="tab"]:not([disabled])')),x=h.findIndex(b=>b===document.activeElement);if(x===-1)return;let v=x;i==="horizontal"?m.key==="ArrowRight"?(m.preventDefault(),v=(x+1)%h.length):m.key==="ArrowLeft"&&(m.preventDefault(),v=(x-1+h.length)%h.length):m.key==="ArrowDown"?(m.preventDefault(),v=(x+1)%h.length):m.key==="ArrowUp"&&(m.preventDefault(),v=(x-1+h.length)%h.length),m.key==="Home"?(m.preventDefault(),v=0):m.key==="End"&&(m.preventDefault(),v=h.length-1),v!==x&&((k=h[v])==null||k.focus())};return f.addEventListener("keydown",p),()=>f.removeEventListener("keydown",p)},[i]);const u=r==="compact"&&i==="vertical"?"flex":"inline-flex",d=w(i==="vertical"?"flex-col":"flex-row",E("xs","gap"));return n.jsx("div",P(T({ref:c,role:"tablist","aria-orientation":i,className:w(u,d,E("xs","p"),"bg-surface-muted",J("md"),t)},s),{children:e}))}function Pa(c){var u=c,{value:e,children:t,disabled:r=!1,className:s="",onClick:a,onKeyDown:o}=u,i=O(u,["value","children","disabled","className","onClick","onKeyDown"]);const{value:d,onValueChange:f,orientation:p,activationMode:m}=Er(),h=d===e,x=b=>{r||((m==="automatic"||h)&&f(e),a==null||a(b))},v=b=>{var j;m==="automatic"&&!r&&!h&&f(e),(j=i.onFocus)==null||j.call(i,b)},k=b=>{if(!r&&!(b.key==="ArrowRight"||b.key==="ArrowLeft"||b.key==="ArrowDown"||b.key==="ArrowUp"||b.key==="Home"||b.key==="End")){if(m==="manual"&&(b.key==="Enter"||b.key===" ")){b.preventDefault(),f(e);return}o==null||o(b)}};return n.jsx("button",P(T({type:"button",role:"tab","aria-selected":h,"aria-controls":`tabpanel-${e}`,id:`tab-${e}`,tabIndex:r?-1:h?0:-1,disabled:r,onClick:x,onFocus:v,onKeyDown:k,className:w("inline-flex","items-center","justify-center",E("sm","px"),E("xs","py"),re("bodySmall"),Fe("label"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-2",J("sm"),h?w("bg-surface-brand-strong","text-fg-inverse"):w("text-fg-secondary","hover:bg-surface-active"),r?"opacity-50 cursor-not-allowed":"cursor-pointer",s)},i),{children:t}))}function za(o){var i=o,{value:e,children:t,forceMount:r=!1,className:s=""}=i,a=O(i,["value","children","forceMount","className"]);const{value:c}=Er(),u=c===e;return!u&&!r?null:n.jsx("div",P(T({role:"tabpanel",id:`tabpanel-${e}`,"aria-labelledby":`tab-${e}`,hidden:!u,className:`
|
|
193
193
|
mt-2
|
|
194
194
|
focus:outline-none
|
|
195
195
|
${s}
|
|
196
|
-
`},a),{children:t}))}function
|
|
196
|
+
`},a),{children:t}))}function Mr(r){var s=r,{children:e}=s,t=O(s,["children"]);return n.jsx(Fa,P(T({},t),{children:e}))}Mr.List=_a;Mr.Trigger=Pa;Mr.Content=za;const od=Mr,Tr=l.forwardRef(function(m,p){var h=m,{onSearch:t,onClear:r,loading:s=!1,showClearButton:a=!0,debounceMs:o=300,value:i,defaultValue:c,onChange:u,className:d=""}=h,f=O(h,["onSearch","onClear","loading","showClearButton","debounceMs","value","defaultValue","onChange","className"]);const[x,v]=l.useState(typeof c=="string"?c:""),[k,b]=l.useState(null),j=i!==void 0,C=j?i:x,g=C!=null&&String(C).length>0,y=S=>{const M=S.target.value;j||v(M),u==null||u(S),k&&clearTimeout(k);const F=setTimeout(()=>{t==null||t(M)},o);b(F)},N=()=>{j||v("");const S={target:{value:""},currentTarget:{value:""}};u==null||u(S),r==null||r(),t==null||t("")},_=S=>{var M;S.key==="Enter"&&t&&t(String(C||"")),(M=f.onKeyDown)==null||M.call(f,S)};return n.jsx("div",{className:w("relative",d),children:n.jsx(ke,P(T({ref:p},f),{type:"search",value:C,onChange:y,onKeyDown:_,leftIcon:s?n.jsx("div",{className:"animate-spin",children:n.jsx(as,{className:"h-4 w-4"})}):n.jsx(as,{className:"h-4 w-4"}),rightIcon:a&&g&&!s?n.jsx(Z,{variant:"ghost",size:"sm",onClick:N,className:"h-auto p-1","aria-label":"Clear search",children:n.jsx(we,{className:"h-4 w-4"})}):void 0,className:w(E("lg","pr"))}))})});Tr.displayName="SearchInput";const $s=l.forwardRef(function({option:t,isHighlighted:r,onSelect:s},a){const o=()=>{t.disabled||s(t)};return n.jsxs("div",{ref:a,role:"option","aria-selected":r,"aria-disabled":t.disabled,onClick:o,className:`
|
|
197
197
|
flex
|
|
198
198
|
items-center
|
|
199
199
|
gap-2
|
|
200
|
-
${
|
|
201
|
-
${
|
|
200
|
+
${E("sm","px")}
|
|
201
|
+
${E("sm","py")}
|
|
202
202
|
text-sm
|
|
203
203
|
cursor-pointer
|
|
204
204
|
transition-colors
|
|
205
205
|
${r?"bg-surface-active":""}
|
|
206
206
|
${t.disabled?"opacity-50 cursor-not-allowed":"hover:bg-surface-hover"}
|
|
207
|
-
`,children:[t.icon&&n.jsx("span",{className:"flex-shrink-0",children:t.icon}),n.jsx("span",{className:"flex-1",children:t.label})]})})
|
|
207
|
+
`,children:[t.icon&&n.jsx("span",{className:"flex-shrink-0",children:t.icon}),n.jsx("span",{className:"flex-1",children:t.label})]})});$s.displayName="AutocompleteOption";const Ar=l.forwardRef(function({options:t,highlightedIndex:r,onSelect:s,loading:a=!1,emptyMessage:o="No options found",containerRef:i,showSelectAll:c=!1,allSelected:u=!1,onSelectAll:d,onDeselectAll:f},p){const[m,h]=l.useState({top:0,left:0,width:0});l.useEffect(()=>{if(i.current){const v=i.current.getBoundingClientRect();h({top:v.bottom+window.scrollY+4,left:v.left+window.scrollX,width:v.width})}},[i]);const x=n.jsx("div",{ref:p,role:"listbox",className:`
|
|
208
208
|
absolute
|
|
209
209
|
${ue("popover")}
|
|
210
210
|
bg-surface-overlay
|
|
@@ -214,27 +214,27 @@ React keys must be passed directly to JSX without using spread:
|
|
|
214
214
|
border-line-default
|
|
215
215
|
max-h-60
|
|
216
216
|
overflow-y-auto
|
|
217
|
-
${
|
|
217
|
+
${E("xs","py")}
|
|
218
218
|
`,style:{top:`${m.top}px`,left:`${m.left}px`,width:`${m.width}px`},children:a?n.jsx("div",{className:`
|
|
219
|
-
${
|
|
219
|
+
${E("md","p")}
|
|
220
220
|
text-sm
|
|
221
221
|
text-fg-tertiary
|
|
222
222
|
text-center
|
|
223
223
|
`,children:"Loading..."}):t.length===0?n.jsx("div",{className:`
|
|
224
|
-
${
|
|
224
|
+
${E("md","p")}
|
|
225
225
|
text-sm
|
|
226
226
|
text-fg-tertiary
|
|
227
227
|
text-center
|
|
228
228
|
`,children:o}):n.jsxs(n.Fragment,{children:[c&&n.jsx("div",{className:`
|
|
229
|
-
${
|
|
230
|
-
${
|
|
229
|
+
${E("sm","px")}
|
|
230
|
+
${E("sm","py")}
|
|
231
231
|
text-sm
|
|
232
232
|
font-medium
|
|
233
233
|
cursor-pointer
|
|
234
234
|
hover:bg-surface-hover
|
|
235
235
|
border-b
|
|
236
236
|
border-line-default
|
|
237
|
-
`,onClick:u?f:d,children:u?"Deselect All":"Select All"}),t.map((y,k)=>n.jsx(Cs,{option:y,isHighlighted:k===r,onSelect:s},y.value))]})});return typeof window!="undefined"?Ue.createPortal(x,document.body):null});Tr.displayName="AutocompleteList";const za=l.forwardRef(function({options:t,value:r,defaultValue:s,onChange:a,onSelect:o,placeholder:i="Type to search...",loading:c=!1,disabled:u=!1,emptyMessage:d="No options found",debounceMs:f=300,filterOptions:p,className:m="",inputClassName:h="",size:x="md"},y){const[k,g]=l.useState(typeof s=="string"?s:""),[j,C]=l.useState(!1),[b,v]=l.useState(-1),[N,D]=l.useState(""),S=l.useRef(null),A=l.useRef(null),M=l.useRef(null),$=l.useRef(null),L=r!==void 0,_=L?r:k,z=N.trim()?p?p(t,N):t.filter(I=>I.label.toLowerCase().includes(N.toLowerCase())):t,X=z.length>0,q=I=>{const B=I.target.value;D(B),L||g(B),a==null||a(B),$.current&&clearTimeout($.current),$.current=setTimeout(()=>{C(!0),v(-1)},f)},H=I=>{var B;I.disabled||(L||g(I.value),D(I.label),C(!1),v(-1),a==null||a(I.value),o==null||o(I),(B=A.current)==null||B.focus())},le=I=>{if(!j||z.length===0){(I.key==="ArrowDown"||I.key==="Enter")&&C(!0);return}switch(I.key){case"ArrowDown":I.preventDefault(),v(B=>B<z.length-1?B+1:0);break;case"ArrowUp":I.preventDefault(),v(B=>B>0?B-1:z.length-1);break;case"Enter":I.preventDefault(),b>=0&&b<z.length&&H(z[b]);break;case"Escape":I.preventDefault(),C(!1),v(-1);break}};l.useEffect(()=>{if(!j)return;const I=B=>{S.current&&!S.current.contains(B.target)&&(C(!1),v(-1))};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[j]),l.useEffect(()=>{if(b>=0&&M.current){const I=M.current.querySelectorAll('[role="option"]');I[b]&&typeof I[b].scrollIntoView=="function"&&I[b].scrollIntoView({block:"nearest",behavior:"smooth"})}},[b]),l.useEffect(()=>{if(_){const I=t.find(B=>B.value===_);D(I?I.label:_)}else D("")},[_,t]);const ne=j&&(X||c||d);return n.jsxs("div",{ref:S,className:`relative ${m}`,children:[n.jsx(ke,{ref:A||y,value:N,onChange:q,onKeyDown:le,onFocus:()=>C(!0),placeholder:i,disabled:u,size:x,rightIcon:c?n.jsx(ua,{className:"h-4 w-4 animate-spin"}):n.jsx(ps,{className:`h-4 w-4 transition-transform ${j?"rotate-180":""}`}),className:h}),ne&&n.jsx(Tr,{ref:M,options:z,highlightedIndex:b,onSelect:H,loading:c,emptyMessage:d,containerRef:S})]})});za.displayName="Autocomplete";const Oa=l.forwardRef(function({options:t,value:r,defaultValue:s=[],onChange:a,onSelect:o,placeholder:i="Select options...",loading:c=!1,disabled:u=!1,emptyMessage:d="No options found",maxSelected:f,showSelectAll:p=!1,className:m="",inputClassName:h="",size:x="md"},y){const[k,g]=l.useState(s),[j,C]=l.useState(!1),[b,v]=l.useState(-1),[N,D]=l.useState(""),S=l.useRef(null),A=l.useRef(null),M=l.useRef(null),$=r!==void 0,L=$?r:k,_=t.filter(W=>L.includes(W.value)),z=(()=>{let W=t;return N.trim()&&(W=t.filter(U=>U.label.toLowerCase().includes(N.toLowerCase()))),W})(),X=z.length>0,q=W=>{const U=W.target.value;D(U),C(!0),v(-1)},H=W=>{if(W.disabled||f&&L.length>=f&&!L.includes(W.value))return;const U=L.includes(W.value)?L.filter(V=>V!==W.value):[...L,W.value];$||g(U),a==null||a(U),o==null||o(t.filter(V=>U.includes(V.value))),D("")},le=()=>{const W=z.filter(V=>!V.disabled).map(V=>V.value),U=[...new Set([...L,...W])];$||g(U),a==null||a(U),o==null||o(t.filter(V=>U.includes(V.value)))},ne=()=>{const W=z.map(V=>V.value),U=L.filter(V=>!W.includes(V));$||g(U),a==null||a(U),o==null||o(t.filter(V=>U.includes(V.value)))},I=W=>{const U=L.filter(V=>V!==W);$||g(U),a==null||a(U),o==null||o(t.filter(V=>U.includes(V.value)))},B=W=>{if(!j||z.length===0){(W.key==="ArrowDown"||W.key==="Enter")&&C(!0),W.key==="Backspace"&&N===""&&L.length>0&&I(L[L.length-1]);return}switch(W.key){case"ArrowDown":W.preventDefault(),v(U=>U<z.length-1?U+1:0);break;case"ArrowUp":W.preventDefault(),v(U=>U>0?U-1:z.length-1);break;case"Enter":W.preventDefault(),b>=0&&b<z.length&&H(z[b]);break;case"Escape":W.preventDefault(),C(!1),v(-1);break}};l.useEffect(()=>{if(!j)return;const W=U=>{S.current&&!S.current.contains(U.target)&&(C(!1),v(-1),D(""))};return document.addEventListener("mousedown",W),()=>document.removeEventListener("mousedown",W)},[j]);const Y=z.filter(W=>!W.disabled).every(W=>L.includes(W.value)),Q=j&&(X||c||d);return n.jsxs("div",{ref:S,className:w("relative",m),children:[n.jsxs("div",{className:w("flex","flex-wrap",T("sm","gap"),T("sm","p"),"border","border-line-default",J("md"),"min-h-10","focus-within:outline-none","focus-within:ring-2","focus-within:ring-offset-2","focus-within:border-line-brand","focus-within:ring-line-brand"),children:[_.map(W=>n.jsx(ys,{onRemove:()=>I(W.value),size:x==="sm"?"sm":x==="lg"?"lg":"md",children:W.label},W.value)),n.jsx("input",{ref:W=>{typeof y=="function"?y(W):y&&(y.current=W),A.current=W},type:"text",value:N,onChange:q,onKeyDown:B,onFocus:()=>C(!0),placeholder:L.length===0?i:"",disabled:u,className:w("flex-1","min-w-32","outline-none","bg-transparent",h)})]}),Q&&n.jsx(Tr,{ref:M,options:z.map(W=>P(R({},W),{icon:L.includes(W.value)?n.jsx(ss,{className:w("h-4","w-4","text-fg-brand")}):W.icon})),highlightedIndex:b,onSelect:H,loading:c,emptyMessage:d,containerRef:S,showSelectAll:p&&z.length>0,allSelected:Y,onSelectAll:le,onDeselectAll:ne})]})});Oa.displayName="MultiSelect";function id({value:e,defaultValue:t=0,max:r=5,size:s="md",variant:a="filled",readOnly:o=!1,allowHalf:i=!1,showValue:c=!1,onChange:u,onHover:d,className:f="",icon:p,emptyIcon:m}){const[h,x]=l.useState(t),[y,k]=l.useState(null),g=e!==void 0,j=y!=null?y:g?e:h,C={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},b=S=>{o||(g||x(S),u==null||u(S))},v=S=>{o||(k(S),d==null||d(S))},N=()=>{o||k(null)},D=S=>{const A=S+1,M=i&&j>=A-.5&&j<A,$=j>=A,L=w(C[s],he("base"),!o&&"cursor-pointer",$||M?"text-fg-warning":"text-fg-disabled"),_=p||n.jsx(kt,{className:L,fill:$?"currentColor":"none"}),F=m||n.jsx(kt,{className:L,fill:"none"});return n.jsx("span",{className:"relative inline-block",onClick:()=>b(A),onMouseEnter:()=>v(A),onMouseLeave:N,role:o?void 0:"button",tabIndex:o?void 0:0,"aria-label":`Rate ${A} out of ${r}`,onKeyDown:z=>{!o&&(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),b(A))},children:M?n.jsxs("span",{className:"relative inline-block",children:[n.jsx("span",{className:"absolute inset-0 overflow-hidden",style:{width:"50%"},children:a==="filled"?n.jsx(kt,{className:L,fill:"currentColor"}):_}),a==="filled"?n.jsx(kt,{className:L,fill:"none"}):F]}):$?a==="filled"?n.jsx(kt,{className:L,fill:"currentColor"}):_:a==="filled"?n.jsx(kt,{className:L,fill:"none"}):F},S)};return n.jsxs("div",{className:w("inline-flex","items-center",T("xs","gap"),f),children:[n.jsx("div",{className:w("flex","items-center"),role:o?"img":void 0,"aria-label":o?`Rating: ${j} out of ${r}`:void 0,children:Array.from({length:r},(S,A)=>D(A))}),c&&n.jsxs("span",{className:w(T("sm","ml"),ve("sm"),"text-fg-secondary"),children:[j.toFixed(i?1:0),"/",r]})]})}function ld({accept:e,multiple:t=!1,maxSize:r,maxFiles:s,onFilesChange:a,onFileRemove:o,showPreview:i=!0,showProgress:c=!1,disabled:u=!1,className:d="",label:f,description:p}){const[m,h]=l.useState([]),[x,y]=l.useState(!1),k=l.useRef(null),g=$=>{if($===0)return"0 Bytes";const L=1024,_=["Bytes","KB","MB","GB"],F=Math.floor(Math.log($)/Math.log(L));return Math.round($/Math.pow(L,F)*100)/100+" "+_[F]},j=$=>r&&$.size>r?`File size exceeds ${g(r)}`:null,C=$=>{const L=Array.from($),_=[];return L.forEach(F=>{const z=j(F),X=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,q={file:F,id:X,error:z,progress:c?0:void 0};if(i&&F.type.startsWith("image/")){const H=new FileReader;H.onload=le=>{h(ne=>ne.map(I=>{var B;return I.id===X?P(R({},I),{preview:(B=le.target)==null?void 0:B.result}):I}))},H.readAsDataURL(F)}_.push(q)}),_},b=$=>{const L=t?[...m,...$]:$,_=s?L.slice(0,s):L;h(_),a==null||a(_)},v=$=>{if($.preventDefault(),y(!1),u)return;const L=$.dataTransfer.files;if(L.length>0){const _=C(L);b(_)}},N=$=>{$.preventDefault(),u||y(!0)},D=$=>{$.preventDefault(),y(!1)},S=$=>{if($.target.files&&$.target.files.length>0){const L=C($.target.files);b(L)}k.current&&(k.current.value="")},A=$=>{const L=m.filter(_=>_.id!==$);h(L),a==null||a(L),o==null||o($)},M=()=>{var $;u||($=k.current)==null||$.click()};return n.jsxs("div",{className:w(T("lg","gap"),"flex","flex-col",d),children:[(f||p)&&n.jsxs("div",{children:[f&&n.jsx("label",{className:w("block",ve("sm"),Et("medium"),"text-fg-primary",T("xs","mb")),children:f}),p&&n.jsx("p",{className:w(ve("sm"),"text-fg-secondary"),children:p})]}),n.jsxs("div",{onDrop:v,onDragOver:N,onDragLeave:D,onClick:M,className:w("relative","border-2","border-dashed",x?"border-line-brand":"border-line-default",J("lg"),T("lg","p"),"text-center","cursor-pointer",he("base"),"focus:border-line-focus",u?"opacity-50 cursor-not-allowed":w("hover:border-line-strong","focus:outline-none","focus:ring-2","focus:ring-offset-2")),role:"button",tabIndex:u?-1:0,"aria-label":"Upload files","aria-disabled":u,children:[n.jsx("input",{ref:k,type:"file",accept:e,multiple:t,onChange:S,disabled:u,className:"hidden"}),n.jsxs("div",{className:w("flex","flex-col","items-center",T("sm","gap")),children:[n.jsx(pc,{className:w("h-8","w-8",x?"text-fg-brand":"text-fg-secondary")}),n.jsxs("div",{children:[n.jsx("span",{className:w(ve("sm"),Et("medium"),"text-fg-primary"),children:x?"Drop files here":"Click to upload or drag and drop"}),e&&n.jsxs("p",{className:w(ve("xs"),"text-fg-secondary",T("xs","mt")),children:["Accepted: ",e]}),r&&n.jsxs("p",{className:w(ve("xs"),"text-fg-secondary"),children:["Max size: ",g(r)]})]})]})]}),m.length>0&&n.jsx("div",{className:w("flex","flex-col",T("sm","gap")),children:m.map($=>n.jsxs("div",{className:w("flex","items-center",T("md","gap"),T("base","p"),"border","border-line-default",J("md"),$.error?"bg-error-bg":"bg-surface-muted"),children:[i&&$.preview?n.jsx("img",{src:$.preview,alt:$.file.name,className:w("w-12","h-12","object-cover",J("md"))}):n.jsx(Yl,{className:w("h-8","w-8","text-fg-secondary")}),n.jsxs("div",{className:w("flex-1","min-w-0"),children:[n.jsx("p",{className:w(ve("sm"),Et("medium"),"text-fg-primary","truncate"),children:$.file.name}),n.jsx("p",{className:w(ve("xs"),"text-fg-secondary"),children:g($.file.size)}),$.error&&n.jsxs("div",{className:w("flex","items-center",T("xs","gap"),T("xs","mt")),children:[n.jsx(hs,{className:w("h-3","w-3","text-fg-error")}),n.jsx("span",{className:w(ve("xs"),"text-fg-error"),children:$.error})]}),c&&$.progress!==void 0&&n.jsx("div",{className:w(T("sm","mt")),children:n.jsx(xs,{value:$.progress,size:"sm"})})]}),!$.error&&!c&&n.jsx(cr,{className:w("h-5","w-5","text-fg-success")}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:L=>{L.stopPropagation(),A($.id)},className:"h-auto p-1","aria-label":`Remove ${$.file.name}`,children:n.jsx(we,{className:"h-4 w-4"})})]},$.id))})]})}function $s({trigger:e,children:t,open:r,defaultOpen:s=!1,onOpenChange:a,placement:o="bottom",showCloseButton:i=!1,title:c,closeOnClickOutside:u=!0,closeOnEscape:d=!0,className:f="",triggerClassName:p="",contentClassName:m=""}){const[h,x]=l.useState(s),y=l.useRef(null),k=l.useRef(null),[g,j]=l.useState({top:0,left:0}),C=r!==void 0,b=C?r:h,v=l.useCallback(()=>{if(!y.current||!k.current)return;const A=y.current.getBoundingClientRect(),M=k.current.getBoundingClientRect(),$=window.scrollY,L=window.scrollX;let _=0,F=0;o.startsWith("top")?(_=A.top+$-M.height-8,o==="top-start"?F=A.left+L:o==="top-end"?F=A.right+L-M.width:F=A.left+L+(A.width-M.width)/2):o.startsWith("bottom")?(_=A.bottom+$+8,o==="bottom-start"?F=A.left+L:o==="bottom-end"?F=A.right+L-M.width:F=A.left+L+(A.width-M.width)/2):o.startsWith("left")?(F=A.left+L-M.width-8,o==="left-start"?_=A.top+$:o==="left-end"?_=A.bottom+$-M.height:_=A.top+$+(A.height-M.height)/2):o.startsWith("right")&&(F=A.right+L+8,o==="right-start"?_=A.top+$:o==="right-end"?_=A.bottom+$-M.height:_=A.top+$+(A.height-M.height)/2);const z=8;_=Math.max(z,Math.min(_,window.innerHeight+$-M.height-z)),F=Math.max(z,Math.min(F,window.innerWidth+L-M.width-z)),j({top:_,left:F})},[o]);l.useEffect(()=>{if(b){v();const A=()=>v(),M=()=>v();return window.addEventListener("resize",A),window.addEventListener("scroll",M,!0),()=>{window.removeEventListener("resize",A),window.removeEventListener("scroll",M,!0)}}},[b,o,v]),l.useEffect(()=>{b&&k.current&&setTimeout(v,0)},[b,v]);const N=l.useCallback(A=>{C||x(A),a==null||a(A)},[C,a]),D=l.useCallback(()=>{N(!1)},[N]);l.useEffect(()=>{if(b&&d){const A=M=>{M.key==="Escape"&&D()};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)}},[b,d,D]),l.useEffect(()=>{if(b&&u){const A=M=>{k.current&&y.current&&!k.current.contains(M.target)&&!y.current.contains(M.target)&&D()};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)}},[b,u,D]);const S=b?n.jsxs("div",{ref:k,className:`
|
|
237
|
+
`,onClick:u?f:d,children:u?"Deselect All":"Select All"}),t.map((v,k)=>n.jsx($s,{option:v,isHighlighted:k===r,onSelect:s},v.value))]})});return typeof window!="undefined"?Ue.createPortal(x,document.body):null});Ar.displayName="AutocompleteList";const Oa=l.forwardRef(function({options:t,value:r,defaultValue:s,onChange:a,onSelect:o,placeholder:i="Type to search...",loading:c=!1,disabled:u=!1,emptyMessage:d="No options found",debounceMs:f=300,filterOptions:p,className:m="",inputClassName:h="",size:x="md"},v){const[k,b]=l.useState(typeof s=="string"?s:""),[j,C]=l.useState(!1),[g,y]=l.useState(-1),[N,_]=l.useState(""),S=l.useRef(null),M=l.useRef(null),F=l.useRef(null),A=l.useRef(null),R=r!==void 0,I=R?r:k,z=N.trim()?p?p(t,N):t.filter(D=>D.label.toLowerCase().includes(N.toLowerCase())):t,Y=z.length>0,q=D=>{const B=D.target.value;_(B),R||b(B),a==null||a(B),A.current&&clearTimeout(A.current),A.current=setTimeout(()=>{C(!0),y(-1)},f)},W=D=>{var B;D.disabled||(R||b(D.value),_(D.label),C(!1),y(-1),a==null||a(D.value),o==null||o(D),(B=M.current)==null||B.focus())},ae=D=>{if(!j||z.length===0){(D.key==="ArrowDown"||D.key==="Enter")&&C(!0);return}switch(D.key){case"ArrowDown":D.preventDefault(),y(B=>B<z.length-1?B+1:0);break;case"ArrowUp":D.preventDefault(),y(B=>B>0?B-1:z.length-1);break;case"Enter":D.preventDefault(),g>=0&&g<z.length&&W(z[g]);break;case"Escape":D.preventDefault(),C(!1),y(-1);break}};l.useEffect(()=>{if(!j)return;const D=B=>{S.current&&!S.current.contains(B.target)&&(C(!1),y(-1))};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[j]),l.useEffect(()=>{if(g>=0&&F.current){const D=F.current.querySelectorAll('[role="option"]');D[g]&&typeof D[g].scrollIntoView=="function"&&D[g].scrollIntoView({block:"nearest",behavior:"smooth"})}},[g]),l.useEffect(()=>{if(I){const D=t.find(B=>B.value===I);_(D?D.label:I)}else _("")},[I,t]);const se=j&&(Y||c||d);return n.jsxs("div",{ref:S,className:`relative ${m}`,children:[n.jsx(ke,{ref:M||v,value:N,onChange:q,onKeyDown:ae,onFocus:()=>C(!0),placeholder:i,disabled:u,size:x,rightIcon:c?n.jsx(fa,{className:"h-4 w-4 animate-spin"}):n.jsx(hs,{className:`h-4 w-4 transition-transform ${j?"rotate-180":""}`}),className:h}),se&&n.jsx(Ar,{ref:F,options:z,highlightedIndex:g,onSelect:W,loading:c,emptyMessage:d,containerRef:S})]})});Oa.displayName="Autocomplete";const Va=l.forwardRef(function({options:t,value:r,defaultValue:s=[],onChange:a,onSelect:o,placeholder:i="Select options...",loading:c=!1,disabled:u=!1,emptyMessage:d="No options found",maxSelected:f,showSelectAll:p=!1,className:m="",inputClassName:h="",size:x="md"},v){const[k,b]=l.useState(s),[j,C]=l.useState(!1),[g,y]=l.useState(-1),[N,_]=l.useState(""),S=l.useRef(null),M=l.useRef(null),F=l.useRef(null),A=r!==void 0,R=A?r:k,I=t.filter(H=>R.includes(H.value)),z=(()=>{let H=t;return N.trim()&&(H=t.filter(U=>U.label.toLowerCase().includes(N.toLowerCase()))),H})(),Y=z.length>0,q=H=>{const U=H.target.value;_(U),C(!0),y(-1)},W=H=>{if(H.disabled||f&&R.length>=f&&!R.includes(H.value))return;const U=R.includes(H.value)?R.filter(V=>V!==H.value):[...R,H.value];A||b(U),a==null||a(U),o==null||o(t.filter(V=>U.includes(V.value))),_("")},ae=()=>{const H=z.filter(V=>!V.disabled).map(V=>V.value),U=[...new Set([...R,...H])];A||b(U),a==null||a(U),o==null||o(t.filter(V=>U.includes(V.value)))},se=()=>{const H=z.map(V=>V.value),U=R.filter(V=>!H.includes(V));A||b(U),a==null||a(U),o==null||o(t.filter(V=>U.includes(V.value)))},D=H=>{const U=R.filter(V=>V!==H);A||b(U),a==null||a(U),o==null||o(t.filter(V=>U.includes(V.value)))},B=H=>{if(!j||z.length===0){(H.key==="ArrowDown"||H.key==="Enter")&&C(!0),H.key==="Backspace"&&N===""&&R.length>0&&D(R[R.length-1]);return}switch(H.key){case"ArrowDown":H.preventDefault(),y(U=>U<z.length-1?U+1:0);break;case"ArrowUp":H.preventDefault(),y(U=>U>0?U-1:z.length-1);break;case"Enter":H.preventDefault(),g>=0&&g<z.length&&W(z[g]);break;case"Escape":H.preventDefault(),C(!1),y(-1);break}};l.useEffect(()=>{if(!j)return;const H=U=>{S.current&&!S.current.contains(U.target)&&(C(!1),y(-1),_(""))};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[j]);const X=z.filter(H=>!H.disabled).every(H=>R.includes(H.value)),Q=j&&(Y||c||d);return n.jsxs("div",{ref:S,className:w("relative",m),children:[n.jsxs("div",{className:w("flex","flex-wrap",E("sm","gap"),E("sm","p"),"border","border-line-default",J("md"),"min-h-10","focus-within:outline-none","focus-within:ring-2","focus-within:ring-offset-2","focus-within:border-line-brand","focus-within:ring-line-brand"),children:[I.map(H=>n.jsx(ws,{onRemove:()=>D(H.value),size:x==="sm"?"sm":x==="lg"?"lg":"md",children:H.label},H.value)),n.jsx("input",{ref:H=>{typeof v=="function"?v(H):v&&(v.current=H),M.current=H},type:"text",value:N,onChange:q,onKeyDown:B,onFocus:()=>C(!0),placeholder:R.length===0?i:"",disabled:u,className:w("flex-1","min-w-32","outline-none","bg-transparent",h)})]}),Q&&n.jsx(Ar,{ref:F,options:z.map(H=>P(T({},H),{icon:R.includes(H.value)?n.jsx(ns,{className:w("h-4","w-4","text-fg-brand")}):H.icon})),highlightedIndex:g,onSelect:W,loading:c,emptyMessage:d,containerRef:S,showSelectAll:p&&z.length>0,allSelected:X,onSelectAll:ae,onDeselectAll:se})]})});Va.displayName="MultiSelect";function id({value:e,defaultValue:t=0,max:r=5,size:s="md",variant:a="filled",readOnly:o=!1,allowHalf:i=!1,showValue:c=!1,onChange:u,onHover:d,className:f="",icon:p,emptyIcon:m}){const[h,x]=l.useState(t),[v,k]=l.useState(null),b=e!==void 0,j=v!=null?v:b?e:h,C={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},g=S=>{o||(b||x(S),u==null||u(S))},y=S=>{o||(k(S),d==null||d(S))},N=()=>{o||k(null)},_=S=>{const M=S+1,F=i&&j>=M-.5&&j<M,A=j>=M,R=w(C[s],he("base"),!o&&"cursor-pointer",A||F?"text-fg-warning":"text-fg-disabled"),I=p||n.jsx(jt,{className:R,fill:A?"currentColor":"none"}),L=m||n.jsx(jt,{className:R,fill:"none"});return n.jsx("span",{className:"relative inline-block",onClick:()=>g(M),onMouseEnter:()=>y(M),onMouseLeave:N,role:o?void 0:"button",tabIndex:o?void 0:0,"aria-label":`Rate ${M} out of ${r}`,onKeyDown:z=>{!o&&(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),g(M))},children:F?n.jsxs("span",{className:"relative inline-block",children:[n.jsx("span",{className:"absolute inset-0 overflow-hidden",style:{width:"50%"},children:a==="filled"?n.jsx(jt,{className:R,fill:"currentColor"}):I}),a==="filled"?n.jsx(jt,{className:R,fill:"none"}):L]}):A?a==="filled"?n.jsx(jt,{className:R,fill:"currentColor"}):I:a==="filled"?n.jsx(jt,{className:R,fill:"none"}):L},S)};return n.jsxs("div",{className:w("inline-flex","items-center",E("xs","gap"),f),children:[n.jsx("div",{className:w("flex","items-center"),role:o?"img":void 0,"aria-label":o?`Rating: ${j} out of ${r}`:void 0,children:Array.from({length:r},(S,M)=>_(M))}),c&&n.jsxs("span",{className:w(E("sm","ml"),ve("sm"),"text-fg-secondary"),children:[j.toFixed(i?1:0),"/",r]})]})}function ld({accept:e,multiple:t=!1,maxSize:r,maxFiles:s,onFilesChange:a,onFileRemove:o,showPreview:i=!0,showProgress:c=!1,disabled:u=!1,className:d="",label:f,description:p}){const[m,h]=l.useState([]),[x,v]=l.useState(!1),k=l.useRef(null),b=A=>{if(A===0)return"0 Bytes";const R=1024,I=["Bytes","KB","MB","GB"],L=Math.floor(Math.log(A)/Math.log(R));return Math.round(A/Math.pow(R,L)*100)/100+" "+I[L]},j=A=>r&&A.size>r?`File size exceeds ${b(r)}`:null,C=A=>{const R=Array.from(A),I=[];return R.forEach(L=>{const z=j(L),Y=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,q={file:L,id:Y,error:z,progress:c?0:void 0};if(i&&L.type.startsWith("image/")){const W=new FileReader;W.onload=ae=>{h(se=>se.map(D=>{var B;return D.id===Y?P(T({},D),{preview:(B=ae.target)==null?void 0:B.result}):D}))},W.readAsDataURL(L)}I.push(q)}),I},g=A=>{const R=t?[...m,...A]:A,I=s?R.slice(0,s):R;h(I),a==null||a(I)},y=A=>{if(A.preventDefault(),v(!1),u)return;const R=A.dataTransfer.files;if(R.length>0){const I=C(R);g(I)}},N=A=>{A.preventDefault(),u||v(!0)},_=A=>{A.preventDefault(),v(!1)},S=A=>{if(A.target.files&&A.target.files.length>0){const R=C(A.target.files);g(R)}k.current&&(k.current.value="")},M=A=>{const R=m.filter(I=>I.id!==A);h(R),a==null||a(R),o==null||o(A)},F=()=>{var A;u||(A=k.current)==null||A.click()};return n.jsxs("div",{className:w(E("lg","gap"),"flex","flex-col",d),children:[(f||p)&&n.jsxs("div",{children:[f&&n.jsx("label",{className:w("block",ve("sm"),Et("medium"),"text-fg-primary",E("xs","mb")),children:f}),p&&n.jsx("p",{className:w(ve("sm"),"text-fg-secondary"),children:p})]}),n.jsxs("div",{onDrop:y,onDragOver:N,onDragLeave:_,onClick:F,className:w("relative","border-2","border-dashed",x?"border-line-brand":"border-line-default",J("lg"),E("lg","p"),"text-center","cursor-pointer",he("base"),"focus:border-line-focus",u?"opacity-50 cursor-not-allowed":w("hover:border-line-strong","focus:outline-none","focus:ring-2","focus:ring-offset-2")),role:"button",tabIndex:u?-1:0,"aria-label":"Upload files","aria-disabled":u,children:[n.jsx("input",{ref:k,type:"file",accept:e,multiple:t,onChange:S,disabled:u,className:"hidden"}),n.jsxs("div",{className:w("flex","flex-col","items-center",E("sm","gap")),children:[n.jsx(hc,{className:w("h-8","w-8",x?"text-fg-brand":"text-fg-secondary")}),n.jsxs("div",{children:[n.jsx("span",{className:w(ve("sm"),Et("medium"),"text-fg-primary"),children:x?"Drop files here":"Click to upload or drag and drop"}),e&&n.jsxs("p",{className:w(ve("xs"),"text-fg-secondary",E("xs","mt")),children:["Accepted: ",e]}),r&&n.jsxs("p",{className:w(ve("xs"),"text-fg-secondary"),children:["Max size: ",b(r)]})]})]})]}),m.length>0&&n.jsx("div",{className:w("flex","flex-col",E("sm","gap")),children:m.map(A=>n.jsxs("div",{className:w("flex","items-center",E("md","gap"),E("base","p"),"border","border-line-default",J("md"),A.error?"bg-error-bg":"bg-surface-muted"),children:[i&&A.preview?n.jsx("img",{src:A.preview,alt:A.file.name,className:w("w-12","h-12","object-cover",J("md"))}):n.jsx(Xl,{className:w("h-8","w-8","text-fg-secondary")}),n.jsxs("div",{className:w("flex-1","min-w-0"),children:[n.jsx("p",{className:w(ve("sm"),Et("medium"),"text-fg-primary","truncate"),children:A.file.name}),n.jsx("p",{className:w(ve("xs"),"text-fg-secondary"),children:b(A.file.size)}),A.error&&n.jsxs("div",{className:w("flex","items-center",E("xs","gap"),E("xs","mt")),children:[n.jsx(bs,{className:w("h-3","w-3","text-fg-error")}),n.jsx("span",{className:w(ve("xs"),"text-fg-error"),children:A.error})]}),c&&A.progress!==void 0&&n.jsx("div",{className:w(E("sm","mt")),children:n.jsx(vs,{value:A.progress,size:"sm"})})]}),!A.error&&!c&&n.jsx(dr,{className:w("h-5","w-5","text-fg-success")}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:R=>{R.stopPropagation(),M(A.id)},className:"h-auto p-1","aria-label":`Remove ${A.file.name}`,children:n.jsx(we,{className:"h-4 w-4"})})]},A.id))})]})}function Es({trigger:e,children:t,open:r,defaultOpen:s=!1,onOpenChange:a,placement:o="bottom",showCloseButton:i=!1,title:c,closeOnClickOutside:u=!0,closeOnEscape:d=!0,className:f="",triggerClassName:p="",contentClassName:m=""}){const[h,x]=l.useState(s),v=l.useRef(null),k=l.useRef(null),[b,j]=l.useState({top:0,left:0}),C=r!==void 0,g=C?r:h,y=l.useCallback(()=>{if(!v.current||!k.current)return;const M=v.current.getBoundingClientRect(),F=k.current.getBoundingClientRect(),A=window.scrollY,R=window.scrollX;let I=0,L=0;o.startsWith("top")?(I=M.top+A-F.height-8,o==="top-start"?L=M.left+R:o==="top-end"?L=M.right+R-F.width:L=M.left+R+(M.width-F.width)/2):o.startsWith("bottom")?(I=M.bottom+A+8,o==="bottom-start"?L=M.left+R:o==="bottom-end"?L=M.right+R-F.width:L=M.left+R+(M.width-F.width)/2):o.startsWith("left")?(L=M.left+R-F.width-8,o==="left-start"?I=M.top+A:o==="left-end"?I=M.bottom+A-F.height:I=M.top+A+(M.height-F.height)/2):o.startsWith("right")&&(L=M.right+R+8,o==="right-start"?I=M.top+A:o==="right-end"?I=M.bottom+A-F.height:I=M.top+A+(M.height-F.height)/2);const z=8;I=Math.max(z,Math.min(I,window.innerHeight+A-F.height-z)),L=Math.max(z,Math.min(L,window.innerWidth+R-F.width-z)),j({top:I,left:L})},[o]);l.useEffect(()=>{if(g){y();const M=()=>y(),F=()=>y();return window.addEventListener("resize",M),window.addEventListener("scroll",F,!0),()=>{window.removeEventListener("resize",M),window.removeEventListener("scroll",F,!0)}}},[g,o,y]),l.useEffect(()=>{g&&k.current&&setTimeout(y,0)},[g,y]);const N=l.useCallback(M=>{C||x(M),a==null||a(M)},[C,a]),_=l.useCallback(()=>{N(!1)},[N]);l.useEffect(()=>{if(g&&d){const M=F=>{F.key==="Escape"&&_()};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)}},[g,d,_]),l.useEffect(()=>{if(g&&u){const M=F=>{k.current&&v.current&&!k.current.contains(F.target)&&!v.current.contains(F.target)&&_()};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)}},[g,u,_]);const S=g?n.jsxs("div",{ref:k,className:`
|
|
238
238
|
absolute
|
|
239
239
|
${ue("popover")}
|
|
240
240
|
bg-surface-overlay
|
|
@@ -246,18 +246,18 @@ React keys must be passed directly to JSX without using spread:
|
|
|
246
246
|
max-w-96
|
|
247
247
|
${he("base")}
|
|
248
248
|
${m}
|
|
249
|
-
`,style:{top:`${
|
|
249
|
+
`,style:{top:`${b.top}px`,left:`${b.left}px`},role:"dialog","aria-modal":"false",children:[(c||i)&&n.jsxs("div",{className:`
|
|
250
250
|
flex
|
|
251
251
|
items-center
|
|
252
252
|
justify-between
|
|
253
|
-
${
|
|
254
|
-
${
|
|
253
|
+
${E("base","px")}
|
|
254
|
+
${E("md","py")}
|
|
255
255
|
border-b
|
|
256
256
|
border-line-default
|
|
257
|
-
`,children:[c&&n.jsx("h3",{className:`${re("bodySmall")} ${Fe("h5")} text-fg-primary`,children:c}),i&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:
|
|
258
|
-
${
|
|
259
|
-
${c||i?"":
|
|
260
|
-
`,children:t})]}):null;return n.jsxs("div",{className:`inline-block ${f}`,children:[n.jsx("div",{ref:
|
|
257
|
+
`,children:[c&&n.jsx("h3",{className:`${re("bodySmall")} ${Fe("h5")} text-fg-primary`,children:c}),i&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:_,className:"h-auto p-1","aria-label":"Close popover",children:n.jsx(we,{className:"h-4 w-4"})})]}),n.jsx("div",{className:`
|
|
258
|
+
${E("base","p")}
|
|
259
|
+
${c||i?"":E("md","p")}
|
|
260
|
+
`,children:t})]}):null;return n.jsxs("div",{className:`inline-block ${f}`,children:[n.jsx("div",{ref:v,className:p,onClick:()=>N(!g),children:e}),typeof window!="undefined"&&Ue.createPortal(S,document.body)]})}function cd({value:e,defaultValue:t,format:r="24h",onChange:s,disabled:a=!1,label:o,error:i=!1,helperText:c,className:u=""}){const[d,f]=l.useState(t||""),[p,m]=l.useState(12),[h,x]=l.useState(0),[v,k]=l.useState("AM"),b=e!==void 0,j=b?e:d,C=l.useCallback(I=>{if(!I)return{hours:12,minutes:0,amPm:"AM"};if(r==="24h"){const[L,z]=I.split(":").map(Number);return{hours:L||12,minutes:z||0,amPm:"AM"}}else{const L=I.match(/(\d+):(\d+)\s*(AM|PM)/i);return L?{hours:parseInt(L[1]),minutes:parseInt(L[2]),amPm:L[3].toUpperCase()}:{hours:12,minutes:0,amPm:"AM"}}},[r]),g=(I,L,z)=>{if(r==="24h")return`${String(I).padStart(2,"0")}:${String(L).padStart(2,"0")}`;{const Y=z==="PM"&&I!==12?I+12:z==="AM"&&I===12?0:I;return`${String(Y===0?12:Y>12?Y-12:Y).padStart(2,"0")}:${String(L).padStart(2,"0")} ${z||"AM"}`}};l.useEffect(()=>{if(j){const I=C(j);m(I.hours),x(I.minutes),k(I.amPm)}},[j,C]);const y=I=>{const L=r==="24h"?Math.max(0,Math.min(23,I)):Math.max(1,Math.min(12,I));m(L);const z=g(L,h,r==="12h"?v:void 0);b||f(z),s==null||s(z)},N=I=>{const L=Math.max(0,Math.min(59,I));x(L);const z=g(p,L,r==="12h"?v:void 0);b||f(z),s==null||s(z)},_=()=>{const I=v==="AM"?"PM":"AM";k(I);const L=g(p,h,I);b||f(L),s==null||s(L)},S=()=>{if(r==="24h")y((p+1)%24);else{const I=p===12?1:p+1;y(I)}},M=()=>{if(r==="24h")y(p===0?23:p-1);else{const I=p===1?12:p-1;y(I)}},F=()=>{N((h+1)%60)},A=()=>{N(h===0?59:h-1)},R=n.jsx("div",{className:`${E("base","p")} min-w-48`,children:n.jsxs("div",{className:"flex items-center justify-center gap-4",children:[n.jsxs("div",{className:"flex flex-col items-center gap-2",children:[n.jsx(Z,{variant:"ghost",size:"sm",onClick:S,disabled:a,"aria-label":"Increment hours",children:"↑"}),n.jsx("div",{className:"text-2xl font-mono font-semibold w-12 text-center",children:String(p).padStart(2,"0")}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:M,disabled:a,"aria-label":"Decrement hours",children:"↓"})]}),n.jsx("div",{className:"text-2xl font-semibold",children:":"}),n.jsxs("div",{className:"flex flex-col items-center gap-2",children:[n.jsx(Z,{variant:"ghost",size:"sm",onClick:F,disabled:a,"aria-label":"Increment minutes",children:"↑"}),n.jsx("div",{className:"text-2xl font-mono font-semibold w-12 text-center",children:String(h).padStart(2,"0")}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:A,disabled:a,"aria-label":"Decrement minutes",children:"↓"})]}),r==="12h"&&n.jsxs("div",{className:"flex flex-col gap-2 ml-2",children:[n.jsx(Z,{variant:v==="AM"?"primary":"outline",size:"sm",onClick:()=>_(),disabled:a,children:"AM"}),n.jsx(Z,{variant:v==="PM"?"primary":"outline",size:"sm",onClick:()=>_(),disabled:a,children:"PM"})]})]})});return n.jsx("div",{className:u,children:n.jsx(Es,{trigger:n.jsx(ke,{label:o,value:j||g(p,h,r==="12h"?v:void 0),readOnly:!0,disabled:a,error:i,helperText:c,leftIcon:n.jsx(Pl,{className:"h-4 w-4"}),className:"cursor-pointer"}),placement:"bottom-start",showCloseButton:!0,title:"Select Time",children:R})})}function dd({value:e,defaultValue:t="#000000",format:r="hex",onChange:s,presets:a,showInput:o=!0,disabled:i=!1,label:c,className:u=""}){const[d,f]=l.useState(t),[p,m]=l.useState({r:0,g:0,b:0}),h=e!==void 0,x=h?e:d,v=N=>{const _=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(N);return _?{r:parseInt(_[1],16),g:parseInt(_[2],16),b:parseInt(_[3],16)}:{r:0,g:0,b:0}},k=(N,_,S)=>"#"+[N,_,S].map(M=>{const F=M.toString(16);return F.length===1?"0"+F:F}).join("");l.useEffect(()=>{if(x){const N=v(x);m(N)}},[x]);const b=N=>{const _=N.target.value;(/^#[0-9A-F]{6}$/i.test(_)||_==="")&&(h||f(_),s==null||s(_),_&&m(v(_)))},j=(N,_)=>{const S=P(T({},p),{[N]:Math.max(0,Math.min(255,_))});m(S);const M=k(S.r,S.g,S.b);h||f(M),s==null||s(M)},g=a||["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#808080","#ffa500"],y=n.jsxs("div",{className:`${E("base","p")} min-w-[280px]`,children:[n.jsx("div",{className:`
|
|
261
261
|
w-full
|
|
262
262
|
h-32
|
|
263
263
|
${J("md")}
|
|
@@ -265,7 +265,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
265
265
|
mb-4
|
|
266
266
|
border
|
|
267
267
|
border-line-default
|
|
268
|
-
`,style:{backgroundColor:x}}),n.jsxs("div",{className:"space-y-3 mb-4",children:[n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-fg-secondary mb-1",children:["Red: ",p.r]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.r,onChange:N=>j("r",parseInt(N.target.value)),disabled:i,className:"w-full"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-fg-secondary mb-1",children:["Green: ",p.g]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.g,onChange:N=>j("g",parseInt(N.target.value)),disabled:i,className:"w-full"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-fg-secondary mb-1",children:["Blue: ",p.b]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.b,onChange:N=>j("b",parseInt(N.target.value)),disabled:i,className:"w-full"})]})]}),o&&n.jsx("div",{className:"mb-4",children:n.jsx(ke,{label:"Hex",value:x,onChange:
|
|
268
|
+
`,style:{backgroundColor:x}}),n.jsxs("div",{className:"space-y-3 mb-4",children:[n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-fg-secondary mb-1",children:["Red: ",p.r]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.r,onChange:N=>j("r",parseInt(N.target.value)),disabled:i,className:"w-full"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-fg-secondary mb-1",children:["Green: ",p.g]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.g,onChange:N=>j("g",parseInt(N.target.value)),disabled:i,className:"w-full"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-fg-secondary mb-1",children:["Blue: ",p.b]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.b,onChange:N=>j("b",parseInt(N.target.value)),disabled:i,className:"w-full"})]})]}),o&&n.jsx("div",{className:"mb-4",children:n.jsx(ke,{label:"Hex",value:x,onChange:b,disabled:i,placeholder:"#000000",className:"font-mono"})}),g.length>0&&n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-fg-secondary mb-2",children:"Presets"}),n.jsx("div",{className:"grid grid-cols-10 gap-1",children:g.map((N,_)=>n.jsx("button",{type:"button",onClick:()=>{i||(h||f(N),s==null||s(N),m(v(N)))},disabled:i,className:`
|
|
269
269
|
w-6
|
|
270
270
|
h-6
|
|
271
271
|
${J("sm")}
|
|
@@ -274,7 +274,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
274
274
|
hover:scale-110
|
|
275
275
|
${Se("sm")}
|
|
276
276
|
${x.toLowerCase()===N.toLowerCase()?"ring-2 ring-offset-1 ring-line-brand":""}
|
|
277
|
-
`,style:{backgroundColor:N},"aria-label":`Select color ${N}`},
|
|
277
|
+
`,style:{backgroundColor:N},"aria-label":`Select color ${N}`},_))})]})]});return n.jsx("div",{className:u,children:n.jsx(Es,{trigger:n.jsxs("div",{className:"flex items-center gap-2",children:[c&&n.jsx("label",{className:"text-sm font-medium text-fg-secondary",children:c}),n.jsx("div",{className:`
|
|
278
278
|
w-10
|
|
279
279
|
h-10
|
|
280
280
|
${J("md")}
|
|
@@ -283,7 +283,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
283
283
|
${Se("sm")}
|
|
284
284
|
cursor-pointer
|
|
285
285
|
${i?"opacity-50 cursor-not-allowed":""}
|
|
286
|
-
`,style:{backgroundColor:x}}),o&&n.jsx(ke,{value:x,onChange:
|
|
286
|
+
`,style:{backgroundColor:x}}),o&&n.jsx(ke,{value:x,onChange:b,disabled:i,placeholder:"#000000",className:"w-24 font-mono"})]}),placement:"bottom-start",showCloseButton:!0,title:"Pick a Color",children:y})})}const Wa=l.createContext(void 0);function ud({children:e,value:t}){return n.jsx(Wa.Provider,{value:t,children:e})}function fd(){const e=l.useContext(Wa);if(!e)throw new Error("Drawer components must be used within Drawer");return e}function Ms({children:e,className:t="",showCloseButton:r=!1}){const{isOpen:s,closeDrawer:a,position:o,size:i,closeOnOverlayClick:c,closeOnEscape:u}=fd();if(l.useEffect(()=>{if(s&&u){const m=h=>{h.key==="Escape"&&a()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)}},[s,u,a]),l.useEffect(()=>{if(s)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[s]),!s)return null;const d={sm:o==="left"||o==="right"?"w-64":"h-64",md:o==="left"||o==="right"?"w-96":"h-96",lg:o==="left"||o==="right"?"w-[32rem]":"h-[32rem]",xl:o==="left"||o==="right"?"w-[42rem]":"h-[42rem]",full:o==="left"||o==="right"?"w-full":"h-full"},f={left:"left-0 top-0 bottom-0",right:"right-0 top-0 bottom-0",top:"top-0 left-0 right-0",bottom:"bottom-0 left-0 right-0"},p=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`
|
|
287
287
|
fixed
|
|
288
288
|
inset-0
|
|
289
289
|
bg-scrim
|
|
@@ -305,23 +305,23 @@ React keys must be passed directly to JSX without using spread:
|
|
|
305
305
|
`,role:"dialog","aria-modal":"true",onClick:m=>m.stopPropagation(),children:[r&&n.jsx("div",{className:`
|
|
306
306
|
flex
|
|
307
307
|
justify-end
|
|
308
|
-
${
|
|
308
|
+
${E("sm","p")}
|
|
309
309
|
border-b
|
|
310
310
|
border-line-default
|
|
311
|
-
`,children:n.jsx(Z,{variant:"ghost",size:"sm",onClick:a,className:"h-auto p-1","aria-label":"Close drawer",children:n.jsx(we,{className:"h-4 w-4"})})}),e]})]});return typeof window!="undefined"?Ue.createPortal(p,document.body):null}function
|
|
312
|
-
${
|
|
311
|
+
`,children:n.jsx(Z,{variant:"ghost",size:"sm",onClick:a,className:"h-auto p-1","aria-label":"Close drawer",children:n.jsx(we,{className:"h-4 w-4"})})}),e]})]});return typeof window!="undefined"?Ue.createPortal(p,document.body):null}function Ha(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);return n.jsx("div",P(T({className:`
|
|
312
|
+
${E("lg","p")}
|
|
313
313
|
border-b
|
|
314
314
|
border-line-default
|
|
315
315
|
${t}
|
|
316
|
-
`},r),{children:e}))}function
|
|
317
|
-
${
|
|
316
|
+
`},r),{children:e}))}function Ba(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);return n.jsx("div",P(T({className:`
|
|
317
|
+
${E("lg","p")}
|
|
318
318
|
border-t
|
|
319
319
|
border-line-default
|
|
320
320
|
flex
|
|
321
321
|
justify-end
|
|
322
|
-
${
|
|
322
|
+
${E("sm","gap")}
|
|
323
323
|
${t}
|
|
324
|
-
`},r),{children:e}))}function
|
|
324
|
+
`},r),{children:e}))}function Gt({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,position:a="right",size:o="md",closeOnOverlayClick:i=!0,closeOnEscape:c=!0}){const[u,d]=l.useState(r),f=t!==void 0,p=f?t:u,m=x=>{f||d(x),s==null||s(x)},h=()=>{m(!1)};return n.jsx(ud,{value:{isOpen:p,closeDrawer:h,position:a,size:o,closeOnOverlayClick:i,closeOnEscape:c},children:e})}Gt.Content=Ms;Gt.Header=Ha;Gt.Footer=Ba;const Ua=l.createContext(void 0);function md({children:e,value:t}){return n.jsx(Ua.Provider,{value:t,children:e})}function Ts(){const e=l.useContext(Ua);if(!e)throw new Error("Menu components must be used within Menu");return e}const As=l.forwardRef(function(i,o){var c=i,{children:t,asChild:r=!1,onClick:s}=c,a=O(c,["children","asChild","onClick"]);const{isOpen:u,setIsOpen:d}=Ts(),f=p=>{s==null||s(p),r||d(!u)};return n.jsx("div",P(T({ref:o,onClick:f,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":u},a),{children:t}))});As.displayName="MenuTrigger";function qa({children:e,className:t="",align:r="start"}){const{isOpen:s,closeMenu:a,placement:o}=Ts(),i=l.useRef(null),c=l.useRef(null),[u,d]=l.useState({top:0,left:0});if(l.useEffect(()=>{if(s){const p=document.querySelector('[aria-haspopup="menu"]');c.current=p}},[s]),l.useEffect(()=>{if(s&&i.current&&c.current){const p=()=>{const x=c.current.getBoundingClientRect(),v=i.current.getBoundingClientRect(),k=window.scrollY,b=window.scrollX;let j=0,C=0;o==="bottom"?(j=x.bottom+k+4,r==="start"?C=x.left+b:r==="end"?C=x.right+b-v.width:C=x.left+b+(x.width-v.width)/2):o==="top"?(j=x.top+k-v.height-4,r==="start"?C=x.left+b:r==="end"?C=x.right+b-v.width:C=x.left+b+(x.width-v.width)/2):o==="right"?(C=x.right+b+4,r==="start"?j=x.top+k:r==="end"?j=x.bottom+k-v.height:j=x.top+k+(x.height-v.height)/2):o==="left"&&(C=x.left+b-v.width-4,r==="start"?j=x.top+k:r==="end"?j=x.bottom+k-v.height:j=x.top+k+(x.height-v.height)/2);const g=8;j=Math.max(g,Math.min(j,window.innerHeight+k-v.height-g)),C=Math.max(g,Math.min(C,window.innerWidth+b-v.width-g)),d({top:j,left:C})};p();const m=()=>p(),h=()=>p();return window.addEventListener("resize",m),window.addEventListener("scroll",h,!0),()=>{window.removeEventListener("resize",m),window.removeEventListener("scroll",h,!0)}}},[s,o,r]),l.useEffect(()=>{if(s){const p=m=>{m.key==="Escape"&&a()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)}},[s,a]),l.useEffect(()=>{if(s){const p=m=>{i.current&&c.current&&!i.current.contains(m.target)&&!c.current.contains(m.target)&&a()};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)}},[s,a]),!s)return null;const f=n.jsx("div",{ref:i,role:"menu",className:`
|
|
325
325
|
absolute
|
|
326
326
|
${ue("popover")}
|
|
327
327
|
bg-surface-overlay
|
|
@@ -330,14 +330,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
330
330
|
border
|
|
331
331
|
border-line-default
|
|
332
332
|
min-w-40
|
|
333
|
-
${
|
|
333
|
+
${E("xs","py")}
|
|
334
334
|
${t}
|
|
335
|
-
`,style:{top:`${u.top}px`,left:`${u.left}px`},children:e});return typeof window!="undefined"?Ue.createPortal(f,document.body):null}const
|
|
335
|
+
`,style:{top:`${u.top}px`,left:`${u.left}px`},children:e});return typeof window!="undefined"?Ue.createPortal(f,document.body):null}const Rs=l.forwardRef(function(p,f){var m=p,{children:t,icon:r,rightIcon:s,disabled:a=!1,onClick:o,onSelect:i,hasSubmenu:c=!1,className:u=""}=m,d=O(m,["children","icon","rightIcon","disabled","onClick","onSelect","hasSubmenu","className"]);const{closeMenu:h}=Ts(),x=k=>{a||(o==null||o(k),i==null||i(k),!c&&!k.defaultPrevented&&h())},v=k=>{a||(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),x(k))};return n.jsxs("div",P(T({ref:f,role:"menuitem",tabIndex:a?-1:0,"aria-disabled":a,onClick:x,onKeyDown:v,className:`
|
|
336
336
|
flex
|
|
337
337
|
items-center
|
|
338
338
|
gap-2
|
|
339
|
-
${
|
|
340
|
-
${
|
|
339
|
+
${E("sm","px")}
|
|
340
|
+
${E("sm","py")}
|
|
341
341
|
${re("bodySmall")}
|
|
342
342
|
text-fg-primary
|
|
343
343
|
cursor-pointer
|
|
@@ -347,18 +347,18 @@ React keys must be passed directly to JSX without using spread:
|
|
|
347
347
|
focus:outline-none
|
|
348
348
|
${a?"opacity-50 cursor-not-allowed":""}
|
|
349
349
|
${u}
|
|
350
|
-
`},d),{children:[r&&n.jsx("span",{className:"shrink-0",children:r}),n.jsx("span",{className:"flex-1",children:t}),c&&n.jsx(
|
|
350
|
+
`},d),{children:[r&&n.jsx("span",{className:"shrink-0",children:r}),n.jsx("span",{className:"flex-1",children:t}),c&&n.jsx(ht,{className:"h-4 w-4 text-fg-secondary shrink-0"}),s&&!c&&n.jsx("span",{className:"shrink-0",children:s})]}))});Rs.displayName="MenuItem";function Ga(r){var s=r,{className:e=""}=s,t=O(s,["className"]);return n.jsx("div",T({role:"separator",className:`
|
|
351
351
|
h-px
|
|
352
352
|
bg-line-default
|
|
353
|
-
${
|
|
353
|
+
${E("sm","my")}
|
|
354
354
|
${e}
|
|
355
|
-
`},t))}function
|
|
355
|
+
`},t))}function Kt({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,placement:a="bottom"}){const[o,i]=l.useState(r),c=t!==void 0,u=c?t:o,d=p=>{c||i(p),s==null||s(p)},f=()=>{d(!1)};return n.jsx(md,{value:{isOpen:u,setIsOpen:d,closeMenu:f,placement:a},children:e})}Kt.Trigger=As;Kt.Content=qa;Kt.Item=Rs;Kt.Separator=Ga;function pd({items:e,type:t="single",defaultOpen:r,onValueChange:s,className:a=""}){const o=()=>r===void 0?[]:Array.isArray(r)?r:[r],[i,c]=l.useState(o),u=d=>{var p;if((p=e.find(m=>m.id===d))!=null&&p.disabled)return;let f;t==="single"?f=i.includes(d)?[]:[d]:f=i.includes(d)?i.filter(m=>m!==d):[...i,d],c(f),s==null||s(t==="single"?f[0]||"":f)};return n.jsx("div",{className:`${E("xs","space-y")} ${a}`,children:e.map(d=>{const f=i.includes(d.id),p=d.disabled;return n.jsxs("div",{className:`border border-line-default ${J("md")} overflow-hidden`,children:[n.jsxs("button",{type:"button",onClick:()=>u(d.id),disabled:p,className:`
|
|
356
356
|
w-full
|
|
357
357
|
flex
|
|
358
358
|
items-center
|
|
359
359
|
justify-between
|
|
360
|
-
${
|
|
361
|
-
${
|
|
360
|
+
${E("base","px")}
|
|
361
|
+
${E("md","py")}
|
|
362
362
|
${ce("label")}
|
|
363
363
|
text-left
|
|
364
364
|
text-fg-primary
|
|
@@ -370,8 +370,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
370
370
|
focus:ring-line-focus
|
|
371
371
|
${he("base")}
|
|
372
372
|
${p?"opacity-50 cursor-not-allowed":"cursor-pointer"}
|
|
373
|
-
`,"aria-expanded":f,"aria-controls":`accordion-content-${d.id}`,"aria-disabled":p,children:[n.jsx("span",{children:d.title}),n.jsx(
|
|
374
|
-
${
|
|
373
|
+
`,"aria-expanded":f,"aria-controls":`accordion-content-${d.id}`,"aria-disabled":p,children:[n.jsx("span",{children:d.title}),n.jsx(hs,{className:`
|
|
374
|
+
${E("sm","ml")}
|
|
375
375
|
${he("base")}
|
|
376
376
|
${f?"transform rotate-180":""}
|
|
377
377
|
${p?"opacity-50":""}
|
|
@@ -380,10 +380,10 @@ React keys must be passed directly to JSX without using spread:
|
|
|
380
380
|
${he("base")}
|
|
381
381
|
${f?"max-h-[1000px] opacity-100":"max-h-0 opacity-0"}
|
|
382
382
|
`,"aria-hidden":!f,children:n.jsx("div",{className:`
|
|
383
|
-
${
|
|
384
|
-
${
|
|
383
|
+
${E("base","px")}
|
|
384
|
+
${E("md","py")}
|
|
385
385
|
text-fg-secondary
|
|
386
|
-
`,children:d.content})})]},d.id)})})}const Ga=l.createContext(void 0);function is({children:e,mobileMenuOpen:t,onMobileMenuChange:r,defaultMobileMenuOpen:s=!1}){const[a,o]=l.useState(s),i=t!==void 0,c=i?t:a,u=l.useCallback(m=>{i||o(m),r==null||r(m)},[i,r]),d=l.useCallback(()=>{u(!c)},[c,u]),f=l.useCallback(()=>{u(!0)},[u]),p=l.useCallback(()=>{u(!1)},[u]);return n.jsx(Ga.Provider,{value:{isMobileMenuOpen:c,toggleMobileMenu:d,setMobileMenuOpen:u,openMobileMenu:f,closeMobileMenu:p},children:e})}function Rs(){const e=l.useContext(Ga);if(!e)throw new Error("useHeaderContext must be used within HeaderProvider");return e}function Ka(s){var a=s,{children:e,className:t}=a,r=O(a,["children","className"]);return n.jsx("div",{className:"flex-shrink-0",children:n.jsx(gs,P(R({href:r.href||"/",variant:"default",className:w("flex items-center font-semibold text-lg",t)},r),{children:e}))})}function Ya({children:e,className:t}){return n.jsx("nav",{className:w("flex-1 flex items-center justify-center gap-4","hidden md:flex",t),"aria-label":"Main navigation",children:e})}function Xa({children:e,className:t}){return n.jsx("div",{className:w("flex-shrink-0 flex items-center gap-2",t),children:e})}function Ja({className:e,icon:t,closeIcon:r,variant:s="ghost",size:a="md"}){const{isMobileMenuOpen:o,toggleMobileMenu:i}=Rs(),c=t||n.jsx(nc,{className:"h-5 w-5"}),u=r||n.jsx(we,{className:"h-5 w-5"});return n.jsx(Z,{variant:s,size:a,onClick:i,className:w("md:hidden",e),"aria-label":o?"Close menu":"Open menu","aria-expanded":o,children:o?u:c})}function Za({children:e,className:t}){const{isMobileMenuOpen:r,closeMobileMenu:s}=Rs();return n.jsx(qt,{open:r,onOpenChange:a=>{a||s()},position:"left",size:"sm",closeOnOverlayClick:!0,closeOnEscape:!0,children:n.jsx(Es,{className:w("p-4",t),children:n.jsx("nav",{className:"flex flex-col gap-2","aria-label":"Mobile navigation",children:e})})})}const hd={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"},ot=l.forwardRef((u,c)=>{var d=u,{className:e,maxWidth:t="lg",paddingX:r="base",paddingY:s="base",center:a=!0,children:o}=d,i=O(d,["className","maxWidth","paddingX","paddingY","center","children"]);return n.jsx("div",P(R({ref:c,className:w("w-full",hd[t],T(r,"px"),T(s,"py"),a&&"mx-auto",e)},i),{children:o}))});ot.displayName="Container";const Tt=l.forwardRef((u,c)=>{var d=u,{className:e,spacing:t="base",align:r="stretch",justify:s="start",direction:a="column",children:o}=d,i=O(d,["className","spacing","align","justify","direction","children"]);const f=a==="column"?T(t,"gap-y"):T(t,"gap-x"),p={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},m={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"};return n.jsx("div",P(R({ref:c,className:w("flex",a==="column"?"flex-col":"flex-row",f,p[r],m[s],e)},i),{children:o}))});Tt.displayName="Stack";const bd=xe(w("w-full","bg-surface-base","transition-shadow","transition-colors"),{variants:{variant:{default:"",elevated:"shadow-sm",bordered:w("border-b","border-line-muted")}},defaultVariants:{variant:"default"}});function bt(c){var u=c,{children:e,variant:t="default",sticky:r=!1,maxWidth:s="full",bare:a=!1,className:o}=u,i=O(u,["children","variant","sticky","maxWidth","bare","className"]);const d=n.jsx("div",{className:"flex items-center justify-between gap-4",children:e});return a?n.jsx(is,{children:n.jsx("div",P(R({className:w(o)},i),{children:d}))}):n.jsx(is,{children:n.jsx("header",P(R({className:w(bd({variant:t}),r&&`sticky top-0 ${ue("sticky")}`,r&&"backdrop-blur-sm bg-surface-base/95",o)},i),{children:n.jsx(ot,{maxWidth:s,paddingX:"base",paddingY:"sm",children:d})}))})}bt.Logo=Ka;bt.Navigation=Ya;bt.Actions=Xa;bt.Hamburger=Ja;bt.MobileMenu=Za;const Rn=xe(w("flex","items-center","gap-2"),{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col"},variant:{default:"",pills:"",tabs:""}},defaultVariants:{orientation:"horizontal",variant:"default"},compoundVariants:[{orientation:"vertical",variant:"default",class:"items-stretch"},{orientation:"vertical",variant:"pills",class:"items-stretch"},{orientation:"vertical",variant:"tabs",class:"items-stretch"}]});function gd(u){var d=u,{items:e,orientation:t="horizontal",variant:r="default",className:s,"aria-label":a="Main navigation",bare:o=!1,pathname:i}=d,c=O(d,["items","orientation","variant","className","aria-label","bare","pathname"]);let f=i;if(!f)try{const h=typeof require!="undefined"?require("next/navigation"):null;if(h!=null&&h.usePathname){const x=h.usePathname;f=x()}}catch(h){f=void 0}const p=l.useMemo(()=>e.map(h=>{if(h.active!==void 0)return h;if(f){const x=f===h.href||h.href!=="/"&&f.startsWith(`${h.href}/`);return P(R({},h),{active:x})}return P(R({},h),{active:!1})}),[e,f]),m=n.jsx(n.Fragment,{children:p.map((h,x)=>{const y=r==="pills"?"background":r==="tabs"?"underline":"default";return n.jsxs(gs,{href:h.href,active:h.active,disabled:h.disabled,variant:y,className:w("flex items-center gap-2",t==="vertical"&&"w-full justify-start",h.className),children:[h.icon&&n.jsx("span",{className:"flex-shrink-0","aria-hidden":"true",children:h.icon}),n.jsx("span",{children:h.label}),h.badge&&n.jsx("span",{className:"ml-auto",children:h.badge})]},h.href||x)})});return o?n.jsx("div",P(R({className:w(Rn({orientation:t,variant:r}),s)},c),{children:m})):n.jsx("nav",P(R({className:w(Rn({orientation:t,variant:r}),s),"aria-label":a},c),{children:m}))}function Qa(e){return n.jsx(gd,P(R({},e),{pathname:e.pathname}))}const xd=xe(w("w-full","flex","flex-col","gap-2"),{variants:{variant:{default:w(T("base","mb")),compact:w(T("sm","mb"))}},defaultVariants:{variant:"default"}});function eo(c){var u=c,{title:e,description:t,breadcrumb:r,actions:s,variant:a="default",className:o}=u,i=O(u,["title","description","breadcrumb","actions","variant","className"]);return n.jsxs("div",P(R({className:w(xd({variant:a}),o)},i),{children:[r&&r.length>0&&n.jsx(Ea,{items:r}),n.jsxs("div",{className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx(Be,{variant:"heading",as:"h1",className:"mb-2 text-2xl font-bold",children:e}),t&&n.jsx(Be,{variant:"body",className:"text-fg-secondary",children:t})]}),s&&n.jsx("div",{className:"flex items-center gap-2 flex-shrink-0",children:s})]})]}))}function vd(s){var a=s,{onForgotPasswordClick:e,className:t}=a,r=O(a,["onForgotPasswordClick","className"]);return n.jsx("div",{className:w(T("base","p"),"bg-surface-muted",J("md"),t),children:n.jsxs("form",P(R({},r),{onSubmit:o=>{o.preventDefault(),r.onSubmit&&r.onSubmit(o)},className:w("space-y-4",r.className),children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(Mt,{htmlFor:"login-email",variant:"required",children:"Your email"}),n.jsx(ke,{id:"login-email",placeholder:"myname@email.com",type:"email"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(Mt,{htmlFor:"login-password",variant:"required",children:"Your password"}),n.jsx(ke,{id:"login-password",placeholder:"••••••••",type:"password"})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx(Z,{variant:"secondary",type:"button",onClick:e,children:"Forgot password?"}),n.jsx(Z,{variant:"regular",type:"submit",children:"Sign in"})]})]}))})}function yd(d){var f=d,{isOpen:e,onClose:t,title:r,children:s,variant:a="default",showCloseButton:o=!0,footer:i,className:c=""}=f,u=O(f,["isOpen","onClose","title","children","variant","showCloseButton","footer","className"]);const p=l.useRef(null),m=l.useRef(null);if(l.useEffect(()=>{if(!e)return;m.current=document.activeElement;const j=setTimeout(()=>{var b;(b=p.current)==null||b.focus()},0),C=b=>{b.key==="Escape"&&t()};return document.addEventListener("keydown",C),()=>{var b;clearTimeout(j),document.removeEventListener("keydown",C),(b=m.current)==null||b.focus()}},[e,t]),l.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),!e)return null;const h=["fixed","inset-0",ue("modal"),"overflow-y-auto"],x=["fixed","inset-0","bg-scrim","transition-opacity"],k=["relative","bg-surface-overlay","rounded-lg","shadow-xl","my-8","mx-auto",{default:"max-w-md",large:"max-w-2xl",fullscreen:"max-w-full h-full"}[a],"p-6",c].filter(Boolean).join(" "),g=n.jsxs("div",{className:h.join(" "),role:"dialog","aria-modal":"true","aria-labelledby":r?"modal-title":void 0,onClick:j=>{j.target===j.currentTarget&&t()},children:[n.jsx("div",{className:x.join(" "),"aria-hidden":"true"}),n.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:n.jsxs("div",P(R({ref:p,tabIndex:-1,className:k,onClick:j=>j.stopPropagation()},u),{children:[r&&n.jsxs("div",{className:"flex justify-between items-center mb-4",children:[n.jsx("h2",{id:"modal-title",className:"text-xl font-semibold text-fg-primary",children:r}),o&&n.jsx("button",{onClick:t,className:"text-fg-tertiary hover:text-fg-secondary focus:outline-none","aria-label":"Close modal",children:n.jsx(we,{className:"h-6 w-6"})})]}),!r&&o&&n.jsx("div",{className:"flex justify-end mb-4",children:n.jsx("button",{onClick:t,className:"text-fg-tertiary hover:text-fg-secondary focus:outline-none","aria-label":"Close modal",children:n.jsx(we,{className:"h-6 w-6"})})}),n.jsx("div",{className:"mb-4",children:s}),i&&n.jsx("div",{className:"flex justify-end gap-2 mt-4",children:i})]}))})]});return typeof window!="undefined"?Ue.createPortal(g,document.body):g}const Ar=l.createContext(void 0);function Pe(){const e=l.useContext(Ar);if(e===void 0)throw new Error("useTableContext must be used within a Table component");return e}function wd(){const e=l.useContext(Ar);return e||void 0}function ls({columns:e,data:t,loading:r=!1,paginationMode:s,page:a,pageSize:o,total:i,onPageChange:c,onPageSizeChange:u,defaultPageSize:d=10,pageSizeOptions:f,sortColumn:p,sortDirection:m,onSort:h,defaultSortColumn:x,defaultSortDirection:y="asc",filters:k,filterValues:g,onFilter:j,initialFilterValues:C={},selectable:b=!1,selectedRows:v,onSelectionChange:N,rowId:D,actions:S,emptyMessage:A="No data available",emptyStateTitle:M,emptyStateMessage:$,emptyStateIllustration:L,emptyStateAction:_,onRowClick:F,resizable:z=!1,columnWidths:X,onColumnResize:q,virtualScrolling:H,virtualScrollingOptions:le,children:ne}){const I=l.useMemo(()=>s||(i!==void 0&&c?"server":"client"),[s,i,c]),B=a!==void 0,[Y,Q]=l.useState(1),[W,U]=l.useState(d),V=B?a:Y,se=o!=null?o:W,ae=l.useMemo(()=>I==="server"?i!=null?i:0:t.length,[I,i,t.length]),oe=l.useMemo(()=>Math.ceil(ae/se),[ae,se]),Ne=p!==void 0,[ze,Lt]=l.useState(x||""),[Ae,Ft]=l.useState(y),$e=Ne?p:ze,Yt=Ne?m||"asc":Ae,Or=g!==void 0,[$o,Eo]=l.useState(C),Xt=Or?g:$o,Vr=v!==void 0,[Mo,To]=l.useState([]),Re=Vr?v:Mo,Jt=l.useMemo(()=>!k||k.length===0?t:t.filter(ee=>k.every(de=>{const be=Xt[de.key];if(!be||be==="")return!0;const Qt=ee[de.key];return de.type==="text"?String(Qt||"").toLowerCase().includes(String(be).toLowerCase()):String(Qt)===String(be)})),[t,k,Xt]),Wr=l.useMemo(()=>{if(Ne&&h||!$e)return Jt;const ee=[...Jt];return ee.sort((de,be)=>{const Qt=de[$e],Do=be[$e],dn=String(Qt||"").localeCompare(String(Do||""));return Yt==="asc"?dn:-dn}),ee},[Jt,$e,Yt,h,Ne]),Oe=l.useMemo(()=>{if(I==="server")return Wr;const ee=(V-1)*se,de=ee+se;return Wr.slice(ee,de)},[Wr,I,V,se]),vt=l.useCallback((ee,de)=>{var be;return D?D(ee):((be=ee==null?void 0:ee.id)==null?void 0:be.toString())||de.toString()},[D]),Zt=l.useMemo(()=>!b||Oe.length===0?!1:Oe.every((ee,de)=>{const be=vt(ee,de);return Re.includes(be)}),[b,Oe,Re,vt]),tn=l.useMemo(()=>{if(!b)return!1;const ee=Re.length;return ee>0&&ee<Oe.length},[b,Re.length,Oe.length]),yt=l.useCallback(ee=>{B?c==null||c(ee):Q(ee)},[B,c]),rn=l.useCallback(ee=>{u?u(ee):U(ee),yt(1)},[u,yt]),sn=l.useCallback((ee,de)=>{Ne?h==null||h(ee,de):(Lt(ee),Ft(de))},[Ne,h]),nn=l.useCallback(ee=>{Or?j==null||j(ee):Eo(ee),yt(1)},[Or,j,yt]),dt=l.useCallback(ee=>{Vr?N==null||N(ee):To(ee)},[Vr,N]),an=l.useCallback(ee=>{const de=Re.includes(ee)?Re.filter(be=>be!==ee):[...Re,ee];dt(de)},[Re,dt]),on=l.useCallback(()=>{if(Zt)dt([]);else{const ee=Oe.map((de,be)=>vt(de,be));dt(ee)}},[Zt,Oe,vt,dt]),[Ao,Ro]=l.useState({}),Hr=X!==void 0,ln=Hr?X:Ao,cn=l.useCallback((ee,de)=>{Hr?q==null||q(ee,de):Ro(be=>P(R({},be),{[ee]:de}))},[Hr,q]),Io=l.useMemo(()=>({columns:e,data:t,paginatedData:Oe,loading:r,paginationState:{page:V,pageSize:se,total:ae,totalPages:oe},sortState:{column:$e,direction:Yt},filterState:{values:Xt,config:k||[]},selectionState:{selectedRows:Re,isAllSelected:Zt,isIndeterminate:tn},paginationMode:I,selectable:b,rowId:D,actions:S,resizable:z,columnWidths:ln,virtualScrolling:H,emptyMessage:A,emptyStateTitle:M,emptyStateMessage:$,emptyStateIllustration:L,emptyStateAction:_,setPage:yt,setPageSize:rn,setSorting:sn,setFilters:nn,setSelection:dt,toggleRowSelection:an,toggleSelectAll:on,getRowId:vt,setColumnWidth:cn,onPageChange:c,onPageSizeChange:u,onSort:h,onFilter:j,onSelectionChange:N,onRowClick:F,onColumnResize:q}),[e,t,Oe,r,V,se,ae,oe,$e,Yt,Xt,k,Re,Zt,tn,I,b,D,S,A,M,$,L,_,yt,rn,sn,nn,dt,an,on,vt,cn,c,u,h,j,N,F,q,z,ln,H]);return n.jsx(Ar.Provider,{value:Io,children:ne})}function Is(u){var d=u,{column:e,resizable:t=!1,width:r,onResize:s,minWidth:a=50,maxWidth:o,className:i=""}=d,c=O(d,["column","resizable","width","onResize","minWidth","maxWidth","className"]);const{sortState:f,setSorting:p,onSort:m}=Pe(),h=l.useRef(null),x=l.useRef(null),y=l.useRef(null),k=()=>{if(!e.sortable||!m&&!p)return;const N=f.column===e.key&&f.direction==="asc"?"desc":"asc";m?m(e.key,N):p(e.key,N)},g=N=>{b&&(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),k())},j=N=>{if(N.preventDefault(),N.stopPropagation(),!x.current||!s)return;const D=r||x.current.offsetWidth;y.current={x:N.clientX,width:D};const S=M=>{if(!y.current)return;const $=M.clientX-y.current.x,L=y.current.width+$,_=Math.max(a,o?Math.min(L,o):L);s(e.key,_)},A=()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",A),y.current=null};document.addEventListener("mousemove",S),document.addEventListener("mouseup",A)},C=f.column===e.key,b=e.sortable&&(m||p),v=C?f.direction:void 0;return n.jsx("th",P(R({ref:x,scope:"col",role:"columnheader","aria-sort":C?v==="asc"?"ascending":"descending":b?"none":void 0,className:`px-6 py-3 text-left text-xs font-medium text-fg-tertiary uppercase tracking-wider ${b?"cursor-pointer hover:bg-surface-active focus:bg-surface-active focus:outline-none focus:ring-2 focus:ring-line-focus focus:ring-offset-2 select-none":""} ${e.hiddenOnMobile?"hidden md:table-cell":""} ${i}`,onClick:b?k:void 0,onKeyDown:b?g:void 0,tabIndex:b?0:void 0,style:r?{width:`${r}px`,minWidth:`${r}px`}:void 0},c),{children:n.jsxs("div",{className:"flex items-center gap-2 relative",children:[n.jsx("span",{children:e.label}),C&&n.jsx("span",{className:"text-fg-tertiary","aria-hidden":"true",children:f.direction==="asc"?"↑":"↓"}),t&&s&&n.jsx("div",{ref:h,className:"absolute right-0 top-0 bottom-0 w-1 cursor-col-resize hover:bg-surface-brand transition-colors",onMouseDown:j,role:"separator","aria-orientation":"vertical","aria-label":`Resize ${e.label} column`,style:{touchAction:"none"}})]})}))}function Ds(r){var s=r,{className:e=""}=s,t=O(s,["className"]);const{columns:a,selectable:o,selectionState:i,toggleSelectAll:c,actions:u,resizable:d,columnWidths:f,setColumnWidth:p}=Pe();return n.jsxs("tr",P(R({role:"row",className:e},t),{children:[o&&n.jsx("th",{scope:"col",role:"columnheader",className:"px-6 py-3 w-12","aria-label":"Select all",children:n.jsx(jr,{checked:i.isAllSelected,onChange:c,"aria-label":"Select all rows",className:"my-0",indeterminate:i.isIndeterminate})}),a.map(m=>n.jsx(Is,{column:m,resizable:d,width:f==null?void 0:f[m.key],onResize:p},m.key)),u&&n.jsx("th",{scope:"col",role:"columnheader",className:"px-6 py-3 text-right text-xs font-medium text-fg-tertiary uppercase tracking-wider w-12","aria-label":"Actions",children:n.jsx("span",{className:"sr-only",children:"Actions"})})]}))}function Ls(r){var s=r,{className:e=""}=s,t=O(s,["className"]);return Pe(),n.jsx("thead",P(R({className:`bg-surface-subtle sticky top-0 ${ue("sticky")} ${e}`},t),{children:n.jsx(Ds,{})}))}function Fs(a){var o=a,{column:e,row:t,className:r=""}=o,s=O(o,["column","row","className"]);const i=e.key in t?t[e.key]:void 0;return n.jsx("td",P(R({className:`px-6 py-4 whitespace-nowrap text-sm text-fg-primary ${e.hiddenOnMobile?"hidden md:table-cell":""} ${r}`},s),{children:e.render?e.render(i,t):String(i!=null?i:"")}))}function kd(o){var i=o,{actions:e,row:t,align:r="right",className:s=""}=i,a=O(i,["actions","row","align","className"]);const c=e.map(u=>({label:u.label,onClick:()=>u.onClick(t),variant:u.variant,disabled:u.disabled}));return n.jsx("div",P(R({className:`inline-flex ${s}`},a),{children:n.jsx(Aa,{trigger:n.jsx(Z,{variant:"ghost",size:"sm","aria-label":"Row actions",className:"h-8 w-8 p-0",children:n.jsx(Hl,{className:"h-4 w-4"})}),items:c,align:r})}))}function _s(a){var o=a,{row:e,align:t="right",className:r=""}=o,s=O(o,["row","align","className"]);const{actions:i}=Pe();if(!i)return null;const c=i(e);return c.length===0?null:n.jsx(kd,R({row:e,actions:c,align:t,className:r},s))}function pr(i){var c=i,{row:e,rowIndex:t,className:r="",onClick:s,style:a}=c,o=O(c,["row","rowIndex","className","onClick","style"]);const{columns:u,selectable:d,selectionState:f,toggleRowSelection:p,getRowId:m,actions:h,onRowClick:x}=Pe(),y=m(e,t),k=f.selectedRows.includes(y),g=j=>{s&&s(j),x&&x(e)};return n.jsxs("tr",P(R({role:"row","aria-selected":d?k:void 0,"aria-rowindex":t+1,className:`hover:bg-surface-hover ${k?"bg-surface-selected":""} ${r}`,onClick:g,style:a},o),{children:[d&&n.jsx("td",{className:"px-6 py-4",children:n.jsx(jr,{checked:k,onChange:()=>p(y),"aria-label":`Select row ${y}`,className:"my-0"})}),u.map(j=>n.jsx(Fs,{column:j,row:e},String(j.key))),h&&n.jsx("td",{className:"px-6 py-4 text-right",children:n.jsx(_s,{row:e})})]}))}function Ps(r){var s=r,{className:e=""}=s,t=O(s,["className"]);const{emptyMessage:a,emptyStateTitle:o,emptyStateMessage:i,emptyStateIllustration:c,emptyStateAction:u}=Pe();return o||i||c?n.jsxs("div",P(R({className:e},t),{children:[n.jsx(Ta,{title:o||"No data available",message:i||a||"No data available",variant:c?"withIllustration":"default",illustration:c}),u&&n.jsx("div",{className:"mt-4 flex justify-center",children:u})]})):n.jsx("div",P(R({className:`text-center text-fg-secondary ${e}`},t),{children:a||"No data available"}))}function to(e,t){const{itemHeight:r,containerHeight:s,overscan:a=5,enabled:o=!0}=t,[i,c]=l.useState(0),u=l.useRef(null),d=l.useMemo(()=>{if(!o||e.length===0)return e.map((y,k)=>({index:k,start:k*r,end:(k+1)*r,size:r}));const m=Math.max(0,Math.floor(i/r)-a),h=s?Math.min(e.length,Math.ceil((i+s)/r)+a):e.length,x=[];for(let y=m;y<h;y++)x.push({index:y,start:y*r,end:(y+1)*r,size:r});return x},[e,r,i,s,a,o]),f=e.length*r;return l.useEffect(()=>{if(!o||!u.current)return;const m=u.current,h=()=>{c(m.scrollTop)};return m.addEventListener("scroll",h,{passive:!0}),()=>m.removeEventListener("scroll",h)},[o]),{virtualItems:d,totalHeight:f,scrollOffset:i,setScrollOffset:c,scrollToIndex:m=>{if(!u.current)return;const h=m*r;u.current.scrollTop=h,c(h)},containerRef:u}}function zs(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);var y,k;const{paginatedData:o,loading:i,columns:c,selectable:u,actions:d,virtualScrolling:f,virtualScrollingOptions:p}=Pe(),m=c.length+(u?1:0)+(d?1:0),h=to(o,{itemHeight:(p==null?void 0:p.itemHeight)||50,containerHeight:p==null?void 0:p.containerHeight,overscan:(p==null?void 0:p.overscan)||5,enabled:f||!1}),x=l.useMemo(()=>f&&h.virtualItems.length>0?h.virtualItems.map(g=>({row:o[g.index],index:g.index})).filter(g=>g.row!==void 0):o.map((g,j)=>({row:g,index:j})),[f,h.virtualItems,o]);return i?n.jsx("tbody",P(R({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:Array.from({length:5}).map((g,j)=>n.jsx("tr",{children:Array.from({length:m}).map((C,b)=>n.jsx("td",{className:"px-6 py-4",children:n.jsx(ba,{className:"h-4 w-full"})},b))},j))})):o.length===0?n.jsx("tbody",P(R({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:n.jsx("tr",{children:n.jsx("td",{colSpan:m,className:"px-6 py-12",children:n.jsx(Ps,{})})})})):typeof e=="function"?n.jsx("tbody",P(R({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:o.map((g,j)=>e(g,j))})):n.jsx("tbody",P(R({className:`bg-surface-base divide-y divide-line-default ${t}`,role:"rowgroup"},r),{children:f&&h.virtualItems.length>0&&x.length>0?n.jsxs(n.Fragment,{children:[((y=h.virtualItems[0])==null?void 0:y.start)>0&&n.jsx("tr",{style:{height:h.virtualItems[0].start},"aria-hidden":"true",children:n.jsx("td",{colSpan:m})}),x.map(({row:g,index:j})=>n.jsx(pr,{row:g,rowIndex:j},j)),h.virtualItems.length>0&&n.jsx("tr",{style:{height:Math.max(0,h.totalHeight-(((k=h.virtualItems[h.virtualItems.length-1])==null?void 0:k.end)||0))},"aria-hidden":"true",children:n.jsx("td",{colSpan:m})})]}):x.map(({row:g,index:j})=>n.jsx(pr,{row:g,rowIndex:j},j))}))}function jd(i){var c=i,{filters:e,onFilter:t,initialValues:r={},showClearAll:s=!0,className:a=""}=c,o=O(c,["filters","onFilter","initialValues","showClearAll","className"]);const[u,d]=l.useState(r),[f,p]=l.useState(!1),m=Object.values(u).some(g=>g!==""&&g!==null&&g!==void 0),h=(g,j)=>{const C=P(R({},u),{[g]:j});d(C),t(C)},x=()=>{const g={};e.forEach(j=>{g[j.key]=""}),d(g),t(g)},y=g=>{const j=P(R({},u),{[g]:""});d(j),t(j)},k=Object.values(u).filter(g=>g!==""&&g!==null&&g!==void 0).length;return n.jsx("div",P(R({className:`bg-surface-base border-b border-line-default ${a}`},o),{children:n.jsxs("div",{className:"px-4 py-3 sm:px-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("button",{type:"button",onClick:()=>p(!f),className:"flex items-center gap-2 text-sm font-medium text-fg-secondary hover:text-fg-primary",children:[n.jsx(Jl,{className:"h-4 w-4"}),n.jsx("span",{children:"Filters"}),k>0&&n.jsx("span",{className:`inline-flex items-center ${T("sm","px")} ${T("0.5","py")} rounded text-xs font-medium bg-surface-brand-muted text-fg-brand-emphasis`,children:k})]}),m&&s&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:x,className:"text-sm",children:"Clear all"})]}),f&&n.jsx("div",{className:"mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:e.map(g=>{const j=u[g.key]||"";return n.jsxs("div",{className:"space-y-1",children:[n.jsx(Mt,{htmlFor:`filter-${g.key}`,variant:"optional",children:g.label}),n.jsxs("div",{className:"relative",children:[g.type==="text"&&n.jsx(ke,{id:`filter-${g.key}`,type:"text",value:j,onChange:C=>h(g.key,C.target.value),placeholder:g.placeholder||`Filter by ${g.label.toLowerCase()}`,size:"sm",variant:"outlined"}),g.type==="select"&&n.jsxs("div",{className:"relative",children:[n.jsx(kr,{id:`filter-${g.key}`,options:[{value:"",label:`All ${g.label}`},...g.options||[]],value:j,onChange:C=>h(g.key,C.target.value)}),j&&n.jsx("button",{type:"button",onClick:()=>y(g.key),className:"absolute right-8 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${g.label} filter`,children:n.jsx(we,{className:"h-4 w-4"})})]}),g.type==="date"&&n.jsx(ke,{id:`filter-${g.key}`,type:"date",value:j,onChange:C=>h(g.key,C.target.value),size:"sm",variant:"outlined"}),j&&g.type!=="select"&&n.jsx("button",{type:"button",onClick:()=>y(g.key),className:"absolute right-2 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${g.label} filter`,children:n.jsx(we,{className:"h-4 w-4"})})]})]},g.key)})})]})}))}function Os(s){var a=s,{showClearAll:e=!0,className:t=""}=a,r=O(a,["showClearAll","className"]);const{filterState:o,setFilters:i}=Pe();return o.config.length===0?null:n.jsx(jd,R({filters:o.config,onFilter:i,initialValues:o.values,showClearAll:e,className:t},r))}function Nd(f){var p=f,{page:e,pageSize:t,total:r,onPageChange:s,onPageSizeChange:a,pageSizeOptions:o=[10,25,50,100],showPageSizeSelector:i=!0,showPageInfo:c=!0,className:u=""}=p,d=O(p,["page","pageSize","total","onPageChange","onPageSizeChange","pageSizeOptions","showPageSizeSelector","showPageInfo","className"]);const m=Math.ceil(r/t),h=r===0?0:(e-1)*t+1,x=Math.min(e*t,r),y=()=>{e>1&&s(e-1)},k=()=>{e<m&&s(e+1)},g=()=>{e>1&&s(1)},j=()=>{e<m&&s(m)};return n.jsxs("div",P(R({className:`flex items-center justify-between px-4 py-3 bg-surface-base border-t border-line-default sm:px-6 ${u}`},d),{children:[n.jsxs("div",{className:"flex flex-1 justify-between sm:hidden",children:[n.jsx(Z,{variant:"outline",size:"sm",onClick:y,disabled:e===1,children:"Previous"}),n.jsx(Z,{variant:"outline",size:"sm",onClick:k,disabled:e>=m,children:"Next"})]}),n.jsxs("div",{className:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between",children:[c&&n.jsx("div",{children:n.jsxs(Be,{as:"p",className:"text-sm text-fg-secondary",children:["Showing ",n.jsx("span",{className:"font-medium",children:h})," to"," ",n.jsx("span",{className:"font-medium",children:x})," of"," ",n.jsx("span",{className:"font-medium",children:r})," results"]})}),n.jsxs("div",{className:"flex items-center gap-4",children:[i&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Be,{as:"span",className:"text-sm text-fg-secondary",children:"Show:"}),n.jsx(kr,{options:o.map(C=>({value:C.toString(),label:C.toString()})),value:t.toString(),onChange:C=>{const b=parseInt(C.target.value);a(b),s(1)},className:"w-20"})]}),n.jsxs("nav",{className:"flex items-center gap-1","aria-label":"Pagination",children:[n.jsxs(Z,{variant:"ghost",size:"sm",onClick:g,disabled:e===1,"aria-label":"First page",children:[n.jsx(Ht,{className:"h-4 w-4"}),n.jsx(Ht,{className:"h-4 w-4 -ml-2"})]}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:y,disabled:e===1,"aria-label":"Previous page",children:n.jsx(Ht,{className:"h-4 w-4"})}),n.jsx("div",{className:"flex items-center gap-1",children:Array.from({length:Math.min(5,m)},(C,b)=>{let v;return m<=5||e<=3?v=b+1:e>=m-2?v=m-4+b:v=e-2+b,n.jsx(Z,{variant:e===v?"primary":"ghost",size:"sm",onClick:()=>s(v),className:"min-w-10","aria-label":`Page ${v}`,"aria-current":e===v?"page":void 0,children:v},v)})}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:k,disabled:e>=m,"aria-label":"Next page",children:n.jsx(pt,{className:"h-4 w-4"})}),n.jsxs(Z,{variant:"ghost",size:"sm",onClick:j,disabled:e>=m,"aria-label":"Last page",children:[n.jsx(pt,{className:"h-4 w-4"}),n.jsx(pt,{className:"h-4 w-4 -ml-2"})]})]})]})]})]}))}function Vs(o){var i=o,{showPageSizeSelector:e=!0,showPageInfo:t=!0,pageSizeOptions:r,className:s=""}=i,a=O(i,["showPageSizeSelector","showPageInfo","pageSizeOptions","className"]);const{paginationState:c,setPage:u,setPageSize:d,paginationMode:f}=Pe();return f==="client"&&c.totalPages<=1?null:n.jsx(Nd,R({page:c.page,pageSize:c.pageSize,total:c.total,onPageChange:u,onPageSizeChange:d,pageSizeOptions:r,showPageSizeSelector:e,showPageInfo:t,className:s},a))}function je(e){const o=e,{className:t=""}=o,r=O(o,["className"]),s="children"in e&&e.children!==void 0,a=s?r:Sd(r);return s?n.jsx("div",{className:`bg-surface-base shadow rounded-lg overflow-hidden ${t}`,children:n.jsx(ls,P(R({},a),{children:e.children}))}):n.jsx("div",{className:`bg-surface-base shadow rounded-lg overflow-hidden ${t}`,children:n.jsxs(ls,P(R({},a),{children:[a.filters&&a.filters.length>0&&n.jsx(Os,{}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"min-w-full divide-y divide-line-default",role:"table","aria-label":e["aria-label"],"aria-labelledby":e["aria-labelledby"],"aria-rowcount":a.total||a.data.length,"aria-colcount":a.columns.length+(a.selectable?1:0)+(a.actions?1:0),children:[n.jsx(Ls,{}),n.jsx(zs,{})]})}),n.jsx(Vs,{})]}))})}function Sd(e){const{columns:t,data:r,loading:s,onSort:a,sortColumn:o,sortDirection:i,emptyMessage:c,emptyStateTitle:u,emptyStateMessage:d,emptyStateIllustration:f,emptyStateAction:p,pagination:m,filters:h,selectable:x,selectedRows:y,onSelectionChange:k,rowId:g,actions:j,onRowClick:C,paginationMode:b,defaultPageSize:v,resizable:N,columnWidths:D,onColumnResize:S,virtualScrolling:A,virtualScrollingOptions:M}=e;let $=b||"auto";return $==="auto"&&($=m&&m.total!==void 0&&m.onPageChange?"server":"client"),{columns:t,data:r,loading:s,paginationMode:$,page:m==null?void 0:m.page,pageSize:m==null?void 0:m.pageSize,total:m==null?void 0:m.total,onPageChange:m==null?void 0:m.onPageChange,onPageSizeChange:m==null?void 0:m.onPageSizeChange,defaultPageSize:v||(m==null?void 0:m.pageSize)||10,pageSizeOptions:m==null?void 0:m.pageSizeOptions,sortColumn:o,sortDirection:i,onSort:a,filters:h==null?void 0:h.config,filterValues:h==null?void 0:h.initialValues,onFilter:h==null?void 0:h.onFilter,initialFilterValues:h==null?void 0:h.initialValues,selectable:x,selectedRows:y,onSelectionChange:k,rowId:g,actions:j,onRowClick:C,emptyMessage:c,emptyStateTitle:u,emptyStateMessage:d,emptyStateIllustration:f,emptyStateAction:p,resizable:N,columnWidths:D,onColumnResize:S,virtualScrolling:A,virtualScrollingOptions:M,children:n.jsx(n.Fragment,{})}}je.Header=Ls;je.HeaderRow=Ds;je.HeaderCell=Is;je.Body=zs;je.Row=pr;je.Cell=Fs;je.Filters=Os;je.Pagination=Vs;je.EmptyState=Ps;je.Actions=_s;function Cd(e={}){const{defaultWidths:t={},minWidth:r=50,maxWidth:s,resizable:a=!0}=e,[o,i]=l.useState(t),[c,u]=l.useState(!1),[d,f]=l.useState(null),p=l.useRef(null),m=l.useCallback((C,b)=>{const v=Math.max(r,s?Math.min(b,s):b);i(N=>P(R({},N),{[C]:v}))},[r,s]),h=l.useCallback(()=>{i(t)},[t]),x=l.useCallback((C,b,v)=>{a&&(u(!0),f(C),p.current={startX:b,startWidth:v})},[a]),y=l.useCallback(C=>{if(!c||!d||!p.current)return;const b=C-p.current.startX,v=p.current.startWidth+b;m(d,v)},[c,d,m]),k=l.useCallback(()=>{u(!1),f(null),p.current=null},[]),g=l.useRef(void 0),j=l.useRef(void 0);return typeof window!="undefined"&&(g.current=C=>{c&&y(C.clientX)},j.current=()=>{c&&k()},c?(document.addEventListener("mousemove",g.current),document.addEventListener("mouseup",j.current)):(g.current&&document.removeEventListener("mousemove",g.current),j.current&&document.removeEventListener("mouseup",j.current))),{columnWidths:o,setColumnWidth:m,resetColumnWidths:h,isResizing:c,resizingColumn:d,startResize:x,handleResize:y,endResize:k}}const Rr=l.createContext(null);function $d(){return l.useContext(Rr)}function it(){const e=l.useContext(Rr);if(!e)throw new Error("useSideNavbarThemeRequired must be used within SideNavbarThemeProvider");return e}const $t={variant:"default",navigationWidth:"56px",contentWidth:"320px",animationDuration:300,animationEasing:"ease-in-out"};function Ws({children:e,variant:t=$t.variant,navigationWidth:r=$t.navigationWidth,contentWidth:s=$t.contentWidth,animationDuration:a=$t.animationDuration,animationEasing:o=$t.animationEasing}){const i=l.useMemo(()=>({variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o}),[t,r,s,a,o]);return n.jsx(Rr.Provider,{value:i,children:e})}const Ir=l.createContext(null);function Ed(){return l.useContext(Ir)}function gt(){const e=l.useContext(Ir);if(!e)throw new Error("useSideNavbarConfigRequired must be used within SideNavbarConfigProvider");return e}const ye={mode:"full",resizable:!1,minWidth:void 0,maxWidth:void 0,snapPoints:void 0,responsive:!1,mobileBreakpoint:768,mobileVariant:"collapse",overlayBackdrop:!0,persistState:!0,persistWidth:!1,storageKey:void 0,keyboardShortcut:"Ctrl+B",enableKeyboardShortcut:!0};function Hs({children:e,mode:t=ye.mode,resizable:r=ye.resizable,minWidth:s=ye.minWidth,maxWidth:a=ye.maxWidth,snapPoints:o=ye.snapPoints,responsive:i=ye.responsive,mobileBreakpoint:c=ye.mobileBreakpoint,mobileVariant:u=ye.mobileVariant,overlayBackdrop:d=ye.overlayBackdrop,persistState:f=ye.persistState,persistWidth:p=ye.persistWidth,storageKey:m=ye.storageKey,keyboardShortcut:h=ye.keyboardShortcut,enableKeyboardShortcut:x=ye.enableKeyboardShortcut}){const y=l.useMemo(()=>({mode:t,resizable:r,minWidth:s,maxWidth:a,snapPoints:o,responsive:i,mobileBreakpoint:c,mobileVariant:u,overlayBackdrop:d,persistState:f,persistWidth:p,storageKey:m,keyboardShortcut:h,enableKeyboardShortcut:x}),[t,r,s,a,o,i,c,u,d,f,p,m,h,x]);return n.jsx(Ir.Provider,{value:y,children:e})}const Dr=l.createContext(null);function Md(){return l.useContext(Dr)}function lt(){const e=l.useContext(Dr);if(!e)throw new Error("useSideNavbarStateRequired must be used within SideNavbarStateProvider");return e}function hr(e){if(typeof e=="number")return e;const t=parseFloat(e);return isNaN(t)?0:e.endsWith("rem")||e.endsWith("em")?t*16:(e.endsWith("px"),t)}function ro(e,t){return e===void 0||t===void 0?!0:e<t}function ir(e,t,r){let s=e;return t!==void 0&&(s=Math.max(s,t)),r!==void 0&&(s=Math.min(s,r)),s}const Td=["ctrl","cmd","control","shift","alt","meta","option"];function so(e){const t={key:"",ctrl:!1,shift:!1,alt:!1,meta:!1,isValid:!1};if(!e||typeof e!="string")return t;const r=e.trim();if(!r)return t;const s=r.split("+").map(u=>u.trim().toLowerCase()).filter(u=>u.length>0);if(s.length===0)return t;const a=new Set;let o="";for(let u=0;u<s.length;u++){const d=s[u];if(Td.includes(d))a.add(d);else if(u===s.length-1)o=d;else return t}if(!o)return t;const i=a.has("ctrl")||a.has("cmd")||a.has("control"),c=a.has("alt")||a.has("option");return{key:o,ctrl:i,shift:a.has("shift"),alt:c,meta:a.has("meta"),isValid:!0}}function Ad(e,t="windows"){if(!e.isValid)return"";const r=[];return t==="mac"?(e.ctrl&&r.push("⌘"),e.shift&&r.push("⇧"),e.alt&&r.push("⌥"),e.meta&&r.push("⌃"),r.push(e.key.toUpperCase()),r.join("")):(e.ctrl&&r.push("Ctrl"),e.shift&&r.push("Shift"),e.alt&&r.push("Alt"),e.meta&&r.push("Meta"),r.push(e.key.toUpperCase()),r.join("+"))}function no({initialWidth:e,minWidth:t,maxWidth:r,snapPoints:s,snapThreshold:a=20,onWidthChange:o,enabled:i=!0}){process.env.NODE_ENV==="development"&&(ro(t,r)||console.warn("[useResize] Invalid bounds: minWidth must be less than maxWidth",{minWidth:t,maxWidth:r}));const c=ir(e,t,r),[u,d]=l.useState(c),[f,p]=l.useState(!1),m=l.useRef(0),h=l.useRef(c),x=l.useCallback(j=>{let C=ir(j,t,r);if(s&&s.length>0){const b=s.reduce((v,N)=>{const D=Math.abs(C-N),S=Math.abs(C-v);return D<S?N:v},s[0]);Math.abs(C-b)<=a&&(C=b)}d(C),o==null||o(C)},[t,r,s,a,o]),y=l.useCallback(j=>{if(!i||!f)return;const C=j.clientX-m.current,b=h.current+C;x(b)},[i,f,x]),k=l.useCallback(()=>{i&&(p(!1),m.current=0,h.current=u)},[i,u]),g=l.useCallback(j=>{i&&(j.preventDefault(),j.stopPropagation(),p(!0),m.current=j.clientX,h.current=u)},[i,u]);return l.useEffect(()=>{if(f)return document.addEventListener("mousemove",y),document.addEventListener("mouseup",k),document.body.style.userSelect="none",document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",k),document.body.style.userSelect="",document.body.style.cursor=""}},[f,y,k]),l.useEffect(()=>{f||d(ir(e,t,r))},[e,t,r,f]),{width:u,isResizing:f,startResize:g,setWidth:x}}function ao({mobileBreakpoint:e=768,onMobileChange:t,enabled:r=!0}={}){const[s,a]=l.useState(typeof window!="undefined"?window.innerWidth:1024),[o,i]=l.useState(typeof window!="undefined"?window.innerWidth<e:!1),c=l.useCallback(()=>{if(!r||typeof window=="undefined")return;const u=window.innerWidth,d=u<e;a(u),d!==o&&(i(d),t==null||t(d))},[r,e,o,t]);return l.useEffect(()=>{if(!r||typeof window=="undefined")return;const u=window.innerWidth,d=u<e;a(u),i(d),window.addEventListener("resize",c);let f=null;return window.ResizeObserver&&(f=new ResizeObserver(()=>{c()}),f.observe(document.body)),()=>{window.removeEventListener("resize",c),f==null||f.disconnect()}},[r,e,c]),{isMobile:o,viewportWidth:s}}function oo({isActive:e,containerRef:t,restoreFocus:r=!0,initialFocusRef:s}){const a=l.useRef(null);l.useEffect(()=>{if(e){if(a.current=document.activeElement,s!=null&&s.current)s.current.focus();else if(t.current){const i=t.current.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');i==null||i.focus()}}else r&&a.current&&(a.current.focus(),a.current=null)},[e,t,s,r]);const o=l.useCallback(i=>{if(!(!e||!t.current)&&i.key==="Tab"){const c=t.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),u=c[0],d=c[c.length-1];i.shiftKey?document.activeElement===u&&(i.preventDefault(),d==null||d.focus()):document.activeElement===d&&(i.preventDefault(),u==null||u.focus())}},[e,t]);l.useEffect(()=>{if(e)return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}},[e,o])}function io({key:e,ctrl:t=!1,shift:r=!1,alt:s=!1,meta:a=!1,onTrigger:o,enabled:i=!0,preventDefault:c=!0}){const u=l.useCallback(d=>{if(!i)return;const f=d.target;if((f.tagName==="INPUT"||f.tagName==="TEXTAREA"||f.isContentEditable)&&!t&&!a)return;const m=e.length===1?d.key.toLowerCase()===e.toLowerCase():d.key===e,h=t?d.ctrlKey||d.metaKey:!d.ctrlKey&&!d.metaKey,x=r?d.shiftKey:!d.shiftKey,y=s?d.altKey:!d.altKey,k=a?d.metaKey:!d.metaKey,g=t?(d.ctrlKey||d.metaKey)&&!a:h&&k;m&&g&&x&&y&&(c&&(d.preventDefault(),d.stopPropagation()),o())},[i,e,t,r,s,a,o,c]);l.useEffect(()=>{if(i)return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u)}},[i,u])}function Bs({children:e,defaultCollapsed:t=!1,collapsed:r,onCollapseChange:s,onWidthChange:a,onMobileChange:o,exclusiveGroups:i=!1}){const c=it(),u=gt(),d=l.useRef(null),f=r!==void 0,p=()=>{if(f)return r;if(u.storageKey&&u.persistState&&typeof window!="undefined"){const F=localStorage.getItem(`${u.storageKey}-collapsed`);if(F!==null)return F==="true"}return t},m=()=>{if(u.storageKey&&u.persistWidth&&typeof window!="undefined"){const F=localStorage.getItem(`${u.storageKey}-width`);if(F!==null){const z=parseInt(F,10);if(!isNaN(z))return z}}return hr(c.contentWidth)},[h,x]=l.useState(p),[y,k]=l.useState({}),{isMobile:g}=ao({mobileBreakpoint:u.mobileBreakpoint,onMobileChange:F=>{o==null||o(F),F&&u.mobileVariant==="collapse"&&!f&&x(!0)},enabled:u.responsive}),{width:j,isResizing:C,startResize:b,setWidth:v}=no({initialWidth:m(),minWidth:u.minWidth,maxWidth:u.maxWidth,snapPoints:u.snapPoints,onWidthChange:F=>{a==null||a(F),u.storageKey&&u.persistWidth&&typeof window!="undefined"&&localStorage.setItem(`${u.storageKey}-width`,String(F))},enabled:u.resizable&&!g});oo({isActive:g&&u.mobileVariant==="overlay"&&!h,containerRef:d,restoreFocus:!0});const N=f?r:h,D=l.useCallback(F=>{f||x(F),s==null||s(F)},[f,s]),S=l.useCallback(()=>{D(!N)},[N,D]),A=so(u.keyboardShortcut);io({key:A.key,ctrl:A.ctrl,shift:A.shift,alt:A.alt,meta:A.meta,onTrigger:S,enabled:u.enableKeyboardShortcut});const M=l.useCallback(F=>{v(F)},[v]),$=l.useCallback(F=>{k(i?z=>{const q=z[F]===!1,H={},le=new Set([...Object.keys(z),F]);return q?le.forEach(ne=>{H[ne]=!0}):le.forEach(ne=>{H[ne]=ne!==F}),H}:z=>P(R({},z),{[F]:!z[F]}))},[i]),L=l.useCallback((F,z)=>{k(X=>P(R({},X),{[F]:z}))},[]);l.useEffect(()=>{f&&r!==h&&x(r)},[f,r,h]),l.useEffect(()=>{u.storageKey&&u.persistState&&typeof window!="undefined"&&!f&&localStorage.setItem(`${u.storageKey}-collapsed`,String(h))},[u.storageKey,u.persistState,h,f]);const _=l.useMemo(()=>({collapsed:N,toggle:S,setCollapsed:D,currentWidth:j,setWidth:M,isMobile:g,isResizing:C,startResize:b,groupStates:y,toggleGroup:$,setGroupCollapsed:L,sidebarRef:d}),[N,S,D,j,M,g,C,b,y,$,L]);return n.jsx(Dr.Provider,{value:_,children:e})}function Us({children:e,variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o,mode:i,resizable:c,minWidth:u,maxWidth:d,snapPoints:f,responsive:p,mobileBreakpoint:m,mobileVariant:h,overlayBackdrop:x,persistState:y,persistWidth:k,storageKey:g,keyboardShortcut:j,enableKeyboardShortcut:C,defaultCollapsed:b,collapsed:v,onCollapseChange:N,onWidthChange:D,onMobileChange:S,exclusiveGroups:A}){return n.jsx(Ws,{variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o,children:n.jsx(Hs,{mode:i,resizable:c,minWidth:u,maxWidth:d,snapPoints:f,responsive:p,mobileBreakpoint:m,mobileVariant:h,overlayBackdrop:x,persistState:y,persistWidth:k,storageKey:g,keyboardShortcut:j,enableKeyboardShortcut:C,children:n.jsx(Bs,{defaultCollapsed:b,collapsed:v,onCollapseChange:N,onWidthChange:D,onMobileChange:S,exclusiveGroups:A,children:e})})})}const Lr=l.createContext(null);function qs(){return l.useContext(Lr)}function Gs(){const e=l.useContext(Lr);if(!e)throw new Error("useSidebarSlotRequired must be used within SidebarSlotProvider");return e}function lo({children:e,defaultSlot:t=null}){const[r,s]=l.useState(t),a=l.useRef(new Map),o=l.useCallback((u,d)=>{a.current.set(u,d)},[]),i=l.useCallback(u=>{a.current.delete(u)},[]),c=l.useMemo(()=>({activeSlot:r,setActiveSlot:s,slots:a.current,registerSlot:o,unregisterSlot:i}),[r,o,i]);return n.jsx(Lr.Provider,{value:c,children:e})}const Fr=l.createContext(null);function Rd(){return l.useContext(Fr)}function Ks(){const e=l.useContext(Fr);return e||{showMainToggle:!0,mainTogglePosition:"floating"}}function Ys(r){var s=r,{className:e=""}=s,t=O(s,["className"]);const{currentWidth:a,setWidth:o,isResizing:i,startResize:c}=lt(),{resizable:u}=gt();return u?n.jsxs("div",P(R({className:`
|
|
386
|
+
`,children:d.content})})]},d.id)})})}const Ka=l.createContext(void 0);function ls({children:e,mobileMenuOpen:t,onMobileMenuChange:r,defaultMobileMenuOpen:s=!1}){const[a,o]=l.useState(s),i=t!==void 0,c=i?t:a,u=l.useCallback(m=>{i||o(m),r==null||r(m)},[i,r]),d=l.useCallback(()=>{u(!c)},[c,u]),f=l.useCallback(()=>{u(!0)},[u]),p=l.useCallback(()=>{u(!1)},[u]);return n.jsx(Ka.Provider,{value:{isMobileMenuOpen:c,toggleMobileMenu:d,setMobileMenuOpen:u,openMobileMenu:f,closeMobileMenu:p},children:e})}function Is(){const e=l.useContext(Ka);if(!e)throw new Error("useHeaderContext must be used within HeaderProvider");return e}function Ya(s){var a=s,{children:e,className:t}=a,r=O(a,["children","className"]);return n.jsx("div",{className:"flex-shrink-0",children:n.jsx(xs,P(T({href:r.href||"/",variant:"default",className:w("flex items-center font-semibold text-lg",t)},r),{children:e}))})}function Xa({children:e,className:t}){return n.jsx("nav",{className:w("flex-1 flex items-center justify-center gap-4","hidden md:flex",t),"aria-label":"Main navigation",children:e})}function Ja({children:e,className:t}){return n.jsx("div",{className:w("flex-shrink-0 flex items-center gap-2",t),children:e})}function Za({className:e,icon:t,closeIcon:r,variant:s="ghost",size:a="md"}){const{isMobileMenuOpen:o,toggleMobileMenu:i}=Is(),c=t||n.jsx(ac,{className:"h-5 w-5"}),u=r||n.jsx(we,{className:"h-5 w-5"});return n.jsx(Z,{variant:s,size:a,onClick:i,className:w("md:hidden",e),"aria-label":o?"Close menu":"Open menu","aria-expanded":o,children:o?u:c})}function Qa({children:e,className:t}){const{isMobileMenuOpen:r,closeMobileMenu:s}=Is();return n.jsx(Gt,{open:r,onOpenChange:a=>{a||s()},position:"left",size:"sm",closeOnOverlayClick:!0,closeOnEscape:!0,children:n.jsx(Ms,{className:w("p-4",t),children:n.jsx("nav",{className:"flex flex-col gap-2","aria-label":"Mobile navigation",children:e})})})}const hd={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"},ot=l.forwardRef((u,c)=>{var d=u,{className:e,maxWidth:t="lg",paddingX:r="base",paddingY:s="base",center:a=!0,children:o}=d,i=O(d,["className","maxWidth","paddingX","paddingY","center","children"]);return n.jsx("div",P(T({ref:c,className:w("w-full",hd[t],E(r,"px"),E(s,"py"),a&&"mx-auto",e)},i),{children:o}))});ot.displayName="Container";const Tt=l.forwardRef((u,c)=>{var d=u,{className:e,spacing:t="base",align:r="stretch",justify:s="start",direction:a="column",children:o}=d,i=O(d,["className","spacing","align","justify","direction","children"]);const f=a==="column"?E(t,"gap-y"):E(t,"gap-x"),p={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},m={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"};return n.jsx("div",P(T({ref:c,className:w("flex",a==="column"?"flex-col":"flex-row",f,p[r],m[s],e)},i),{children:o}))});Tt.displayName="Stack";const bd=xe(w("w-full","bg-surface-base","transition-shadow","transition-colors"),{variants:{variant:{default:"",elevated:"shadow-sm",bordered:w("border-b","border-line-muted")}},defaultVariants:{variant:"default"}});function gt(c){var u=c,{children:e,variant:t="default",sticky:r=!1,maxWidth:s="full",bare:a=!1,className:o}=u,i=O(u,["children","variant","sticky","maxWidth","bare","className"]);const d=n.jsx("div",{className:"flex items-center justify-between gap-4",children:e});return a?n.jsx(ls,{children:n.jsx("div",P(T({className:w(o)},i),{children:d}))}):n.jsx(ls,{children:n.jsx("header",P(T({className:w(bd({variant:t}),r&&`sticky top-0 ${ue("sticky")}`,r&&"backdrop-blur-sm bg-surface-base/95",o)},i),{children:n.jsx(ot,{maxWidth:s,paddingX:"base",paddingY:"sm",children:d})}))})}gt.Logo=Ya;gt.Navigation=Xa;gt.Actions=Ja;gt.Hamburger=Za;gt.MobileMenu=Qa;const In=xe(w("flex","items-center","gap-2"),{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col"},variant:{default:"",pills:"",tabs:""}},defaultVariants:{orientation:"horizontal",variant:"default"},compoundVariants:[{orientation:"vertical",variant:"default",class:"items-stretch"},{orientation:"vertical",variant:"pills",class:"items-stretch"},{orientation:"vertical",variant:"tabs",class:"items-stretch"}]});function gd(u){var d=u,{items:e,orientation:t="horizontal",variant:r="default",className:s,"aria-label":a="Main navigation",bare:o=!1,pathname:i}=d,c=O(d,["items","orientation","variant","className","aria-label","bare","pathname"]);let f=i;if(!f)try{const h=typeof require!="undefined"?require("next/navigation"):null;if(h!=null&&h.usePathname){const x=h.usePathname;f=x()}}catch(h){f=void 0}const p=l.useMemo(()=>e.map(h=>{if(h.active!==void 0)return h;if(f){const x=f===h.href||h.href!=="/"&&f.startsWith(`${h.href}/`);return P(T({},h),{active:x})}return P(T({},h),{active:!1})}),[e,f]),m=n.jsx(n.Fragment,{children:p.map((h,x)=>{const v=r==="pills"?"background":r==="tabs"?"underline":"default";return n.jsxs(xs,{href:h.href,active:h.active,disabled:h.disabled,variant:v,className:w("flex items-center gap-2",t==="vertical"&&"w-full justify-start",h.className),children:[h.icon&&n.jsx("span",{className:"flex-shrink-0","aria-hidden":"true",children:h.icon}),n.jsx("span",{children:h.label}),h.badge&&n.jsx("span",{className:"ml-auto",children:h.badge})]},h.href||x)})});return o?n.jsx("div",P(T({className:w(In({orientation:t,variant:r}),s)},c),{children:m})):n.jsx("nav",P(T({className:w(In({orientation:t,variant:r}),s),"aria-label":a},c),{children:m}))}function eo(e){return n.jsx(gd,P(T({},e),{pathname:e.pathname}))}const xd=xe(w("w-full","flex","flex-col","gap-2"),{variants:{variant:{default:w(E("base","mb")),compact:w(E("sm","mb"))}},defaultVariants:{variant:"default"}});function to(c){var u=c,{title:e,description:t,breadcrumb:r,actions:s,variant:a="default",className:o}=u,i=O(u,["title","description","breadcrumb","actions","variant","className"]);return n.jsxs("div",P(T({className:w(xd({variant:a}),o)},i),{children:[r&&r.length>0&&n.jsx(Ma,{items:r}),n.jsxs("div",{className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx(Be,{variant:"heading",as:"h1",className:"mb-2 text-2xl font-bold",children:e}),t&&n.jsx(Be,{variant:"body",className:"text-fg-secondary",children:t})]}),s&&n.jsx("div",{className:"flex items-center gap-2 flex-shrink-0",children:s})]})]}))}function vd(s){var a=s,{onForgotPasswordClick:e,className:t}=a,r=O(a,["onForgotPasswordClick","className"]);return n.jsx("div",{className:w(E("base","p"),"bg-surface-muted",J("md"),t),children:n.jsxs("form",P(T({},r),{onSubmit:o=>{o.preventDefault(),r.onSubmit&&r.onSubmit(o)},className:w("space-y-4",r.className),children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(Mt,{htmlFor:"login-email",variant:"required",children:"Your email"}),n.jsx(ke,{id:"login-email",placeholder:"myname@email.com",type:"email"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(Mt,{htmlFor:"login-password",variant:"required",children:"Your password"}),n.jsx(ke,{id:"login-password",placeholder:"••••••••",type:"password"})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx(Z,{variant:"secondary",type:"button",onClick:e,children:"Forgot password?"}),n.jsx(Z,{variant:"regular",type:"submit",children:"Sign in"})]})]}))})}function yd(d){var f=d,{isOpen:e,onClose:t,title:r,children:s,variant:a="default",showCloseButton:o=!0,footer:i,className:c=""}=f,u=O(f,["isOpen","onClose","title","children","variant","showCloseButton","footer","className"]);const p=l.useRef(null),m=l.useRef(null);if(l.useEffect(()=>{if(!e)return;m.current=document.activeElement;const j=setTimeout(()=>{var g;(g=p.current)==null||g.focus()},0),C=g=>{g.key==="Escape"&&t()};return document.addEventListener("keydown",C),()=>{var g;clearTimeout(j),document.removeEventListener("keydown",C),(g=m.current)==null||g.focus()}},[e,t]),l.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),!e)return null;const h=["fixed","inset-0",ue("modal"),"overflow-y-auto"],x=["fixed","inset-0","bg-scrim","transition-opacity"],k=["relative","bg-surface-overlay","rounded-lg","shadow-xl","my-8","mx-auto",{default:"max-w-md",large:"max-w-2xl",fullscreen:"max-w-full h-full"}[a],"p-6",c].filter(Boolean).join(" "),b=n.jsxs("div",{className:h.join(" "),role:"dialog","aria-modal":"true","aria-labelledby":r?"modal-title":void 0,onClick:j=>{j.target===j.currentTarget&&t()},children:[n.jsx("div",{className:x.join(" "),"aria-hidden":"true"}),n.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:n.jsxs("div",P(T({ref:p,tabIndex:-1,className:k,onClick:j=>j.stopPropagation()},u),{children:[r&&n.jsxs("div",{className:"flex justify-between items-center mb-4",children:[n.jsx("h2",{id:"modal-title",className:"text-xl font-semibold text-fg-primary",children:r}),o&&n.jsx("button",{onClick:t,className:"text-fg-tertiary hover:text-fg-secondary focus:outline-none","aria-label":"Close modal",children:n.jsx(we,{className:"h-6 w-6"})})]}),!r&&o&&n.jsx("div",{className:"flex justify-end mb-4",children:n.jsx("button",{onClick:t,className:"text-fg-tertiary hover:text-fg-secondary focus:outline-none","aria-label":"Close modal",children:n.jsx(we,{className:"h-6 w-6"})})}),n.jsx("div",{className:"mb-4",children:s}),i&&n.jsx("div",{className:"flex justify-end gap-2 mt-4",children:i})]}))})]});return typeof window!="undefined"?Ue.createPortal(b,document.body):b}const Rr=l.createContext(void 0);function Pe(){const e=l.useContext(Rr);if(e===void 0)throw new Error("useTableContext must be used within a Table component");return e}function wd(){const e=l.useContext(Rr);return e||void 0}function cs({columns:e,data:t,loading:r=!1,paginationMode:s,page:a,pageSize:o,total:i,onPageChange:c,onPageSizeChange:u,defaultPageSize:d=10,pageSizeOptions:f,sortColumn:p,sortDirection:m,onSort:h,defaultSortColumn:x,defaultSortDirection:v="asc",filters:k,filterValues:b,onFilter:j,initialFilterValues:C={},selectable:g=!1,selectedRows:y,onSelectionChange:N,rowId:_,actions:S,emptyMessage:M="No data available",emptyStateTitle:F,emptyStateMessage:A,emptyStateIllustration:R,emptyStateAction:I,onRowClick:L,resizable:z=!1,columnWidths:Y,onColumnResize:q,virtualScrolling:W,virtualScrollingOptions:ae,children:se}){const D=l.useMemo(()=>s||(i!==void 0&&c?"server":"client"),[s,i,c]),B=a!==void 0,[X,Q]=l.useState(1),[H,U]=l.useState(d),V=B?a:X,ne=o!=null?o:H,oe=l.useMemo(()=>D==="server"?i!=null?i:0:t.length,[D,i,t.length]),ie=l.useMemo(()=>Math.ceil(oe/ne),[oe,ne]),Ne=p!==void 0,[ze,Lt]=l.useState(x||""),[Ae,Ft]=l.useState(v),$e=Ne?p:ze,Xt=Ne?m||"asc":Ae,Vr=b!==void 0,[Eo,Mo]=l.useState(C),Jt=Vr?b:Eo,Wr=y!==void 0,[To,Ao]=l.useState([]),Re=Wr?y:To,Zt=l.useMemo(()=>!k||k.length===0?t:t.filter(ee=>k.every(de=>{const be=Jt[de.key];if(!be||be==="")return!0;const er=ee[de.key];return de.type==="text"?String(er||"").toLowerCase().includes(String(be).toLowerCase()):String(er)===String(be)})),[t,k,Jt]),Hr=l.useMemo(()=>{if(Ne&&h||!$e)return Zt;const ee=[...Zt];return ee.sort((de,be)=>{const er=de[$e],Lo=be[$e],un=String(er||"").localeCompare(String(Lo||""));return Xt==="asc"?un:-un}),ee},[Zt,$e,Xt,h,Ne]),Oe=l.useMemo(()=>{if(D==="server")return Hr;const ee=(V-1)*ne,de=ee+ne;return Hr.slice(ee,de)},[Hr,D,V,ne]),yt=l.useCallback((ee,de)=>{var be;return _?_(ee):((be=ee==null?void 0:ee.id)==null?void 0:be.toString())||de.toString()},[_]),Qt=l.useMemo(()=>!g||Oe.length===0?!1:Oe.every((ee,de)=>{const be=yt(ee,de);return Re.includes(be)}),[g,Oe,Re,yt]),rn=l.useMemo(()=>{if(!g)return!1;const ee=Re.length;return ee>0&&ee<Oe.length},[g,Re.length,Oe.length]),wt=l.useCallback(ee=>{B?c==null||c(ee):Q(ee)},[B,c]),sn=l.useCallback(ee=>{u?u(ee):U(ee),wt(1)},[u,wt]),nn=l.useCallback((ee,de)=>{Ne?h==null||h(ee,de):(Lt(ee),Ft(de))},[Ne,h]),an=l.useCallback(ee=>{Vr?j==null||j(ee):Mo(ee),wt(1)},[Vr,j,wt]),dt=l.useCallback(ee=>{Wr?N==null||N(ee):Ao(ee)},[Wr,N]),on=l.useCallback(ee=>{const de=Re.includes(ee)?Re.filter(be=>be!==ee):[...Re,ee];dt(de)},[Re,dt]),ln=l.useCallback(()=>{if(Qt)dt([]);else{const ee=Oe.map((de,be)=>yt(de,be));dt(ee)}},[Qt,Oe,yt,dt]),[Ro,Io]=l.useState({}),Br=Y!==void 0,cn=Br?Y:Ro,dn=l.useCallback((ee,de)=>{Br?q==null||q(ee,de):Io(be=>P(T({},be),{[ee]:de}))},[Br,q]),Do=l.useMemo(()=>({columns:e,data:t,paginatedData:Oe,loading:r,paginationState:{page:V,pageSize:ne,total:oe,totalPages:ie},sortState:{column:$e,direction:Xt},filterState:{values:Jt,config:k||[]},selectionState:{selectedRows:Re,isAllSelected:Qt,isIndeterminate:rn},paginationMode:D,selectable:g,rowId:_,actions:S,resizable:z,columnWidths:cn,virtualScrolling:W,emptyMessage:M,emptyStateTitle:F,emptyStateMessage:A,emptyStateIllustration:R,emptyStateAction:I,setPage:wt,setPageSize:sn,setSorting:nn,setFilters:an,setSelection:dt,toggleRowSelection:on,toggleSelectAll:ln,getRowId:yt,setColumnWidth:dn,onPageChange:c,onPageSizeChange:u,onSort:h,onFilter:j,onSelectionChange:N,onRowClick:L,onColumnResize:q}),[e,t,Oe,r,V,ne,oe,ie,$e,Xt,Jt,k,Re,Qt,rn,D,g,_,S,M,F,A,R,I,wt,sn,nn,an,dt,on,ln,yt,dn,c,u,h,j,N,L,q,z,cn,W]);return n.jsx(Rr.Provider,{value:Do,children:se})}function Ds(u){var d=u,{column:e,resizable:t=!1,width:r,onResize:s,minWidth:a=50,maxWidth:o,className:i=""}=d,c=O(d,["column","resizable","width","onResize","minWidth","maxWidth","className"]);const{sortState:f,setSorting:p,onSort:m}=Pe(),h=l.useRef(null),x=l.useRef(null),v=l.useRef(null),k=()=>{if(!e.sortable||!m&&!p)return;const N=f.column===e.key&&f.direction==="asc"?"desc":"asc";m?m(e.key,N):p(e.key,N)},b=N=>{g&&(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),k())},j=N=>{if(N.preventDefault(),N.stopPropagation(),!x.current||!s)return;const _=r||x.current.offsetWidth;v.current={x:N.clientX,width:_};const S=F=>{if(!v.current)return;const A=F.clientX-v.current.x,R=v.current.width+A,I=Math.max(a,o?Math.min(R,o):R);s(e.key,I)},M=()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",M),v.current=null};document.addEventListener("mousemove",S),document.addEventListener("mouseup",M)},C=f.column===e.key,g=e.sortable&&(m||p),y=C?f.direction:void 0;return n.jsx("th",P(T({ref:x,scope:"col",role:"columnheader","aria-sort":C?y==="asc"?"ascending":"descending":g?"none":void 0,className:`px-6 py-3 text-left text-xs font-medium text-fg-tertiary uppercase tracking-wider ${g?"cursor-pointer hover:bg-surface-active focus:bg-surface-active focus:outline-none focus:ring-2 focus:ring-line-focus focus:ring-offset-2 select-none":""} ${e.hiddenOnMobile?"hidden md:table-cell":""} ${i}`,onClick:g?k:void 0,onKeyDown:g?b:void 0,tabIndex:g?0:void 0,style:r?{width:`${r}px`,minWidth:`${r}px`}:void 0},c),{children:n.jsxs("div",{className:"flex items-center gap-2 relative",children:[n.jsx("span",{children:e.label}),C&&n.jsx("span",{className:"text-fg-tertiary","aria-hidden":"true",children:f.direction==="asc"?"↑":"↓"}),t&&s&&n.jsx("div",{ref:h,className:"absolute right-0 top-0 bottom-0 w-1 cursor-col-resize hover:bg-surface-brand transition-colors",onMouseDown:j,role:"separator","aria-orientation":"vertical","aria-label":`Resize ${e.label} column`,style:{touchAction:"none"}})]})}))}function Ls(r){var s=r,{className:e=""}=s,t=O(s,["className"]);const{columns:a,selectable:o,selectionState:i,toggleSelectAll:c,actions:u,resizable:d,columnWidths:f,setColumnWidth:p}=Pe();return n.jsxs("tr",P(T({role:"row",className:e},t),{children:[o&&n.jsx("th",{scope:"col",role:"columnheader",className:"px-6 py-3 w-12","aria-label":"Select all",children:n.jsx(Nr,{checked:i.isAllSelected,onChange:c,"aria-label":"Select all rows",className:"my-0",indeterminate:i.isIndeterminate})}),a.map(m=>n.jsx(Ds,{column:m,resizable:d,width:f==null?void 0:f[m.key],onResize:p},m.key)),u&&n.jsx("th",{scope:"col",role:"columnheader",className:"px-6 py-3 text-right text-xs font-medium text-fg-tertiary uppercase tracking-wider w-12","aria-label":"Actions",children:n.jsx("span",{className:"sr-only",children:"Actions"})})]}))}function Fs(r){var s=r,{className:e=""}=s,t=O(s,["className"]);return Pe(),n.jsx("thead",P(T({className:`bg-surface-subtle sticky top-0 ${ue("sticky")} ${e}`},t),{children:n.jsx(Ls,{})}))}function _s(a){var o=a,{column:e,row:t,className:r=""}=o,s=O(o,["column","row","className"]);const i=e.key in t?t[e.key]:void 0;return n.jsx("td",P(T({className:`px-6 py-4 whitespace-nowrap text-sm text-fg-primary ${e.hiddenOnMobile?"hidden md:table-cell":""} ${r}`},s),{children:e.render?e.render(i,t):String(i!=null?i:"")}))}function kd(o){var i=o,{actions:e,row:t,align:r="right",className:s=""}=i,a=O(i,["actions","row","align","className"]);const c=e.map(u=>({label:u.label,onClick:()=>u.onClick(t),variant:u.variant,disabled:u.disabled}));return n.jsx("div",P(T({className:`inline-flex ${s}`},a),{children:n.jsx(Ra,{trigger:n.jsx(Z,{variant:"ghost",size:"sm","aria-label":"Row actions",className:"h-8 w-8 p-0",children:n.jsx(Bl,{className:"h-4 w-4"})}),items:c,align:r})}))}function Ps(a){var o=a,{row:e,align:t="right",className:r=""}=o,s=O(o,["row","align","className"]);const{actions:i}=Pe();if(!i)return null;const c=i(e);return c.length===0?null:n.jsx(kd,T({row:e,actions:c,align:t,className:r},s))}function hr(i){var c=i,{row:e,rowIndex:t,className:r="",onClick:s,style:a}=c,o=O(c,["row","rowIndex","className","onClick","style"]);const{columns:u,selectable:d,selectionState:f,toggleRowSelection:p,getRowId:m,actions:h,onRowClick:x}=Pe(),v=m(e,t),k=f.selectedRows.includes(v),b=j=>{s&&s(j),x&&x(e)};return n.jsxs("tr",P(T({role:"row","aria-selected":d?k:void 0,"aria-rowindex":t+1,className:`hover:bg-surface-hover ${k?"bg-surface-selected":""} ${r}`,onClick:b,style:a},o),{children:[d&&n.jsx("td",{className:"px-6 py-4",children:n.jsx(Nr,{checked:k,onChange:()=>p(v),"aria-label":`Select row ${v}`,className:"my-0"})}),u.map(j=>n.jsx(_s,{column:j,row:e},String(j.key))),h&&n.jsx("td",{className:"px-6 py-4 text-right",children:n.jsx(Ps,{row:e})})]}))}function zs(r){var s=r,{className:e=""}=s,t=O(s,["className"]);const{emptyMessage:a,emptyStateTitle:o,emptyStateMessage:i,emptyStateIllustration:c,emptyStateAction:u}=Pe();return o||i||c?n.jsxs("div",P(T({className:e},t),{children:[n.jsx(Aa,{title:o||"No data available",message:i||a||"No data available",variant:c?"withIllustration":"default",illustration:c}),u&&n.jsx("div",{className:"mt-4 flex justify-center",children:u})]})):n.jsx("div",P(T({className:`text-center text-fg-secondary ${e}`},t),{children:a||"No data available"}))}function ro(e,t){const{itemHeight:r,containerHeight:s,overscan:a=5,enabled:o=!0}=t,[i,c]=l.useState(0),u=l.useRef(null),d=l.useMemo(()=>{if(!o||e.length===0)return e.map((v,k)=>({index:k,start:k*r,end:(k+1)*r,size:r}));const m=Math.max(0,Math.floor(i/r)-a),h=s?Math.min(e.length,Math.ceil((i+s)/r)+a):e.length,x=[];for(let v=m;v<h;v++)x.push({index:v,start:v*r,end:(v+1)*r,size:r});return x},[e,r,i,s,a,o]),f=e.length*r;return l.useEffect(()=>{if(!o||!u.current)return;const m=u.current,h=()=>{c(m.scrollTop)};return m.addEventListener("scroll",h,{passive:!0}),()=>m.removeEventListener("scroll",h)},[o]),{virtualItems:d,totalHeight:f,scrollOffset:i,setScrollOffset:c,scrollToIndex:m=>{if(!u.current)return;const h=m*r;u.current.scrollTop=h,c(h)},containerRef:u}}function Os(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);var v,k;const{paginatedData:o,loading:i,columns:c,selectable:u,actions:d,virtualScrolling:f,virtualScrollingOptions:p}=Pe(),m=c.length+(u?1:0)+(d?1:0),h=ro(o,{itemHeight:(p==null?void 0:p.itemHeight)||50,containerHeight:p==null?void 0:p.containerHeight,overscan:(p==null?void 0:p.overscan)||5,enabled:f||!1}),x=l.useMemo(()=>f&&h.virtualItems.length>0?h.virtualItems.map(b=>({row:o[b.index],index:b.index})).filter(b=>b.row!==void 0):o.map((b,j)=>({row:b,index:j})),[f,h.virtualItems,o]);return i?n.jsx("tbody",P(T({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:Array.from({length:5}).map((b,j)=>n.jsx("tr",{children:Array.from({length:m}).map((C,g)=>n.jsx("td",{className:"px-6 py-4",children:n.jsx(ga,{className:"h-4 w-full"})},g))},j))})):o.length===0?n.jsx("tbody",P(T({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:n.jsx("tr",{children:n.jsx("td",{colSpan:m,className:"px-6 py-12",children:n.jsx(zs,{})})})})):typeof e=="function"?n.jsx("tbody",P(T({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:o.map((b,j)=>e(b,j))})):n.jsx("tbody",P(T({className:`bg-surface-base divide-y divide-line-default ${t}`,role:"rowgroup"},r),{children:f&&h.virtualItems.length>0&&x.length>0?n.jsxs(n.Fragment,{children:[((v=h.virtualItems[0])==null?void 0:v.start)>0&&n.jsx("tr",{style:{height:h.virtualItems[0].start},"aria-hidden":"true",children:n.jsx("td",{colSpan:m})}),x.map(({row:b,index:j})=>n.jsx(hr,{row:b,rowIndex:j},j)),h.virtualItems.length>0&&n.jsx("tr",{style:{height:Math.max(0,h.totalHeight-(((k=h.virtualItems[h.virtualItems.length-1])==null?void 0:k.end)||0))},"aria-hidden":"true",children:n.jsx("td",{colSpan:m})})]}):x.map(({row:b,index:j})=>n.jsx(hr,{row:b,rowIndex:j},j))}))}function jd(i){var c=i,{filters:e,onFilter:t,initialValues:r={},showClearAll:s=!0,className:a=""}=c,o=O(c,["filters","onFilter","initialValues","showClearAll","className"]);const[u,d]=l.useState(r),[f,p]=l.useState(!1),m=Object.values(u).some(b=>b!==""&&b!==null&&b!==void 0),h=(b,j)=>{const C=P(T({},u),{[b]:j});d(C),t(C)},x=()=>{const b={};e.forEach(j=>{b[j.key]=""}),d(b),t(b)},v=b=>{const j=P(T({},u),{[b]:""});d(j),t(j)},k=Object.values(u).filter(b=>b!==""&&b!==null&&b!==void 0).length;return n.jsx("div",P(T({className:`bg-surface-base border-b border-line-default ${a}`},o),{children:n.jsxs("div",{className:"px-4 py-3 sm:px-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("button",{type:"button",onClick:()=>p(!f),className:"flex items-center gap-2 text-sm font-medium text-fg-secondary hover:text-fg-primary",children:[n.jsx(Zl,{className:"h-4 w-4"}),n.jsx("span",{children:"Filters"}),k>0&&n.jsx("span",{className:`inline-flex items-center ${E("sm","px")} ${E("0.5","py")} rounded text-xs font-medium bg-surface-brand-muted text-fg-brand-emphasis`,children:k})]}),m&&s&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:x,className:"text-sm",children:"Clear all"})]}),f&&n.jsx("div",{className:"mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:e.map(b=>{const j=u[b.key]||"";return n.jsxs("div",{className:"space-y-1",children:[n.jsx(Mt,{htmlFor:`filter-${b.key}`,variant:"optional",children:b.label}),n.jsxs("div",{className:"relative",children:[b.type==="text"&&n.jsx(ke,{id:`filter-${b.key}`,type:"text",value:j,onChange:C=>h(b.key,C.target.value),placeholder:b.placeholder||`Filter by ${b.label.toLowerCase()}`,size:"sm",variant:"outlined"}),b.type==="select"&&n.jsxs("div",{className:"relative",children:[n.jsx(jr,{id:`filter-${b.key}`,options:[{value:"",label:`All ${b.label}`},...b.options||[]],value:j,onChange:C=>h(b.key,C.target.value)}),j&&n.jsx("button",{type:"button",onClick:()=>v(b.key),className:"absolute right-8 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${b.label} filter`,children:n.jsx(we,{className:"h-4 w-4"})})]}),b.type==="date"&&n.jsx(ke,{id:`filter-${b.key}`,type:"date",value:j,onChange:C=>h(b.key,C.target.value),size:"sm",variant:"outlined"}),j&&b.type!=="select"&&n.jsx("button",{type:"button",onClick:()=>v(b.key),className:"absolute right-2 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${b.label} filter`,children:n.jsx(we,{className:"h-4 w-4"})})]})]},b.key)})})]})}))}function Vs(s){var a=s,{showClearAll:e=!0,className:t=""}=a,r=O(a,["showClearAll","className"]);const{filterState:o,setFilters:i}=Pe();return o.config.length===0?null:n.jsx(jd,T({filters:o.config,onFilter:i,initialValues:o.values,showClearAll:e,className:t},r))}function Nd(f){var p=f,{page:e,pageSize:t,total:r,onPageChange:s,onPageSizeChange:a,pageSizeOptions:o=[10,25,50,100],showPageSizeSelector:i=!0,showPageInfo:c=!0,className:u=""}=p,d=O(p,["page","pageSize","total","onPageChange","onPageSizeChange","pageSizeOptions","showPageSizeSelector","showPageInfo","className"]);const m=Math.ceil(r/t),h=r===0?0:(e-1)*t+1,x=Math.min(e*t,r),v=()=>{e>1&&s(e-1)},k=()=>{e<m&&s(e+1)},b=()=>{e>1&&s(1)},j=()=>{e<m&&s(m)};return n.jsxs("div",P(T({className:`flex items-center justify-between px-4 py-3 bg-surface-base border-t border-line-default sm:px-6 ${u}`},d),{children:[n.jsxs("div",{className:"flex flex-1 justify-between sm:hidden",children:[n.jsx(Z,{variant:"outline",size:"sm",onClick:v,disabled:e===1,children:"Previous"}),n.jsx(Z,{variant:"outline",size:"sm",onClick:k,disabled:e>=m,children:"Next"})]}),n.jsxs("div",{className:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between",children:[c&&n.jsx("div",{children:n.jsxs(Be,{as:"p",className:"text-sm text-fg-secondary",children:["Showing ",n.jsx("span",{className:"font-medium",children:h})," to"," ",n.jsx("span",{className:"font-medium",children:x})," of"," ",n.jsx("span",{className:"font-medium",children:r})," results"]})}),n.jsxs("div",{className:"flex items-center gap-4",children:[i&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Be,{as:"span",className:"text-sm text-fg-secondary",children:"Show:"}),n.jsx(jr,{options:o.map(C=>({value:C.toString(),label:C.toString()})),value:t.toString(),onChange:C=>{const g=parseInt(C.target.value);a(g),s(1)},className:"w-20"})]}),n.jsxs("nav",{className:"flex items-center gap-1","aria-label":"Pagination",children:[n.jsxs(Z,{variant:"ghost",size:"sm",onClick:b,disabled:e===1,"aria-label":"First page",children:[n.jsx(Bt,{className:"h-4 w-4"}),n.jsx(Bt,{className:"h-4 w-4 -ml-2"})]}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:v,disabled:e===1,"aria-label":"Previous page",children:n.jsx(Bt,{className:"h-4 w-4"})}),n.jsx("div",{className:"flex items-center gap-1",children:Array.from({length:Math.min(5,m)},(C,g)=>{let y;return m<=5||e<=3?y=g+1:e>=m-2?y=m-4+g:y=e-2+g,n.jsx(Z,{variant:e===y?"primary":"ghost",size:"sm",onClick:()=>s(y),className:"min-w-10","aria-label":`Page ${y}`,"aria-current":e===y?"page":void 0,children:y},y)})}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:k,disabled:e>=m,"aria-label":"Next page",children:n.jsx(ht,{className:"h-4 w-4"})}),n.jsxs(Z,{variant:"ghost",size:"sm",onClick:j,disabled:e>=m,"aria-label":"Last page",children:[n.jsx(ht,{className:"h-4 w-4"}),n.jsx(ht,{className:"h-4 w-4 -ml-2"})]})]})]})]})]}))}function Ws(o){var i=o,{showPageSizeSelector:e=!0,showPageInfo:t=!0,pageSizeOptions:r,className:s=""}=i,a=O(i,["showPageSizeSelector","showPageInfo","pageSizeOptions","className"]);const{paginationState:c,setPage:u,setPageSize:d,paginationMode:f}=Pe();return f==="client"&&c.totalPages<=1?null:n.jsx(Nd,T({page:c.page,pageSize:c.pageSize,total:c.total,onPageChange:u,onPageSizeChange:d,pageSizeOptions:r,showPageSizeSelector:e,showPageInfo:t,className:s},a))}function je(e){const o=e,{className:t=""}=o,r=O(o,["className"]),s="children"in e&&e.children!==void 0,a=s?r:Sd(r);return s?n.jsx("div",{className:`bg-surface-base shadow rounded-lg overflow-hidden ${t}`,children:n.jsx(cs,P(T({},a),{children:e.children}))}):n.jsx("div",{className:`bg-surface-base shadow rounded-lg overflow-hidden ${t}`,children:n.jsxs(cs,P(T({},a),{children:[a.filters&&a.filters.length>0&&n.jsx(Vs,{}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"min-w-full divide-y divide-line-default",role:"table","aria-label":e["aria-label"],"aria-labelledby":e["aria-labelledby"],"aria-rowcount":a.total||a.data.length,"aria-colcount":a.columns.length+(a.selectable?1:0)+(a.actions?1:0),children:[n.jsx(Fs,{}),n.jsx(Os,{})]})}),n.jsx(Ws,{})]}))})}function Sd(e){const{columns:t,data:r,loading:s,onSort:a,sortColumn:o,sortDirection:i,emptyMessage:c,emptyStateTitle:u,emptyStateMessage:d,emptyStateIllustration:f,emptyStateAction:p,pagination:m,filters:h,selectable:x,selectedRows:v,onSelectionChange:k,rowId:b,actions:j,onRowClick:C,paginationMode:g,defaultPageSize:y,resizable:N,columnWidths:_,onColumnResize:S,virtualScrolling:M,virtualScrollingOptions:F}=e;let A=g||"auto";return A==="auto"&&(A=m&&m.total!==void 0&&m.onPageChange?"server":"client"),{columns:t,data:r,loading:s,paginationMode:A,page:m==null?void 0:m.page,pageSize:m==null?void 0:m.pageSize,total:m==null?void 0:m.total,onPageChange:m==null?void 0:m.onPageChange,onPageSizeChange:m==null?void 0:m.onPageSizeChange,defaultPageSize:y||(m==null?void 0:m.pageSize)||10,pageSizeOptions:m==null?void 0:m.pageSizeOptions,sortColumn:o,sortDirection:i,onSort:a,filters:h==null?void 0:h.config,filterValues:h==null?void 0:h.initialValues,onFilter:h==null?void 0:h.onFilter,initialFilterValues:h==null?void 0:h.initialValues,selectable:x,selectedRows:v,onSelectionChange:k,rowId:b,actions:j,onRowClick:C,emptyMessage:c,emptyStateTitle:u,emptyStateMessage:d,emptyStateIllustration:f,emptyStateAction:p,resizable:N,columnWidths:_,onColumnResize:S,virtualScrolling:M,virtualScrollingOptions:F,children:n.jsx(n.Fragment,{})}}je.Header=Fs;je.HeaderRow=Ls;je.HeaderCell=Ds;je.Body=Os;je.Row=hr;je.Cell=_s;je.Filters=Vs;je.Pagination=Ws;je.EmptyState=zs;je.Actions=Ps;function Cd(e={}){const{defaultWidths:t={},minWidth:r=50,maxWidth:s,resizable:a=!0}=e,[o,i]=l.useState(t),[c,u]=l.useState(!1),[d,f]=l.useState(null),p=l.useRef(null),m=l.useCallback((C,g)=>{const y=Math.max(r,s?Math.min(g,s):g);i(N=>P(T({},N),{[C]:y}))},[r,s]),h=l.useCallback(()=>{i(t)},[t]),x=l.useCallback((C,g,y)=>{a&&(u(!0),f(C),p.current={startX:g,startWidth:y})},[a]),v=l.useCallback(C=>{if(!c||!d||!p.current)return;const g=C-p.current.startX,y=p.current.startWidth+g;m(d,y)},[c,d,m]),k=l.useCallback(()=>{u(!1),f(null),p.current=null},[]),b=l.useRef(void 0),j=l.useRef(void 0);return typeof window!="undefined"&&(b.current=C=>{c&&v(C.clientX)},j.current=()=>{c&&k()},c?(document.addEventListener("mousemove",b.current),document.addEventListener("mouseup",j.current)):(b.current&&document.removeEventListener("mousemove",b.current),j.current&&document.removeEventListener("mouseup",j.current))),{columnWidths:o,setColumnWidth:m,resetColumnWidths:h,isResizing:c,resizingColumn:d,startResize:x,handleResize:v,endResize:k}}const Ir=l.createContext(null);function $d(){return l.useContext(Ir)}function it(){const e=l.useContext(Ir);if(!e)throw new Error("useSideNavbarThemeRequired must be used within SideNavbarThemeProvider");return e}const $t={variant:"default",navigationWidth:"56px",contentWidth:"320px",animationDuration:300,animationEasing:"ease-in-out"};function Hs({children:e,variant:t=$t.variant,navigationWidth:r=$t.navigationWidth,contentWidth:s=$t.contentWidth,animationDuration:a=$t.animationDuration,animationEasing:o=$t.animationEasing}){const i=l.useMemo(()=>({variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o}),[t,r,s,a,o]);return n.jsx(Ir.Provider,{value:i,children:e})}const Dr=l.createContext(null);function Ed(){return l.useContext(Dr)}function xt(){const e=l.useContext(Dr);if(!e)throw new Error("useSideNavbarConfigRequired must be used within SideNavbarConfigProvider");return e}const ye={mode:"full",resizable:!1,minWidth:void 0,maxWidth:void 0,snapPoints:void 0,responsive:!1,mobileBreakpoint:768,mobileVariant:"collapse",overlayBackdrop:!0,persistState:!0,persistWidth:!1,storageKey:void 0,keyboardShortcut:"Ctrl+B",enableKeyboardShortcut:!0};function Bs({children:e,mode:t=ye.mode,resizable:r=ye.resizable,minWidth:s=ye.minWidth,maxWidth:a=ye.maxWidth,snapPoints:o=ye.snapPoints,responsive:i=ye.responsive,mobileBreakpoint:c=ye.mobileBreakpoint,mobileVariant:u=ye.mobileVariant,overlayBackdrop:d=ye.overlayBackdrop,persistState:f=ye.persistState,persistWidth:p=ye.persistWidth,storageKey:m=ye.storageKey,keyboardShortcut:h=ye.keyboardShortcut,enableKeyboardShortcut:x=ye.enableKeyboardShortcut}){const v=l.useMemo(()=>({mode:t,resizable:r,minWidth:s,maxWidth:a,snapPoints:o,responsive:i,mobileBreakpoint:c,mobileVariant:u,overlayBackdrop:d,persistState:f,persistWidth:p,storageKey:m,keyboardShortcut:h,enableKeyboardShortcut:x}),[t,r,s,a,o,i,c,u,d,f,p,m,h,x]);return n.jsx(Dr.Provider,{value:v,children:e})}const Lr=l.createContext(null);function Md(){return l.useContext(Lr)}function lt(){const e=l.useContext(Lr);if(!e)throw new Error("useSideNavbarStateRequired must be used within SideNavbarStateProvider");return e}function br(e){if(typeof e=="number")return e;const t=parseFloat(e);return isNaN(t)?0:e.endsWith("rem")||e.endsWith("em")?t*16:(e.endsWith("px"),t)}function so(e,t){return e===void 0||t===void 0?!0:e<t}function lr(e,t,r){let s=e;return t!==void 0&&(s=Math.max(s,t)),r!==void 0&&(s=Math.min(s,r)),s}const Td=["ctrl","cmd","control","shift","alt","meta","option"];function no(e){const t={key:"",ctrl:!1,shift:!1,alt:!1,meta:!1,isValid:!1};if(!e||typeof e!="string")return t;const r=e.trim();if(!r)return t;const s=r.split("+").map(u=>u.trim().toLowerCase()).filter(u=>u.length>0);if(s.length===0)return t;const a=new Set;let o="";for(let u=0;u<s.length;u++){const d=s[u];if(Td.includes(d))a.add(d);else if(u===s.length-1)o=d;else return t}if(!o)return t;const i=a.has("ctrl")||a.has("cmd")||a.has("control"),c=a.has("alt")||a.has("option");return{key:o,ctrl:i,shift:a.has("shift"),alt:c,meta:a.has("meta"),isValid:!0}}function Ad(e,t="windows"){if(!e.isValid)return"";const r=[];return t==="mac"?(e.ctrl&&r.push("⌘"),e.shift&&r.push("⇧"),e.alt&&r.push("⌥"),e.meta&&r.push("⌃"),r.push(e.key.toUpperCase()),r.join("")):(e.ctrl&&r.push("Ctrl"),e.shift&&r.push("Shift"),e.alt&&r.push("Alt"),e.meta&&r.push("Meta"),r.push(e.key.toUpperCase()),r.join("+"))}function ao({initialWidth:e,minWidth:t,maxWidth:r,snapPoints:s,snapThreshold:a=20,onWidthChange:o,enabled:i=!0}){process.env.NODE_ENV==="development"&&(so(t,r)||console.warn("[useResize] Invalid bounds: minWidth must be less than maxWidth",{minWidth:t,maxWidth:r}));const c=lr(e,t,r),[u,d]=l.useState(c),[f,p]=l.useState(!1),m=l.useRef(0),h=l.useRef(c),x=l.useCallback(j=>{let C=lr(j,t,r);if(s&&s.length>0){const g=s.reduce((y,N)=>{const _=Math.abs(C-N),S=Math.abs(C-y);return _<S?N:y},s[0]);Math.abs(C-g)<=a&&(C=g)}d(C),o==null||o(C)},[t,r,s,a,o]),v=l.useCallback(j=>{if(!i||!f)return;const C=j.clientX-m.current,g=h.current+C;x(g)},[i,f,x]),k=l.useCallback(()=>{i&&(p(!1),m.current=0,h.current=u)},[i,u]),b=l.useCallback(j=>{i&&(j.preventDefault(),j.stopPropagation(),p(!0),m.current=j.clientX,h.current=u)},[i,u]);return l.useEffect(()=>{if(f)return document.addEventListener("mousemove",v),document.addEventListener("mouseup",k),document.body.style.userSelect="none",document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",k),document.body.style.userSelect="",document.body.style.cursor=""}},[f,v,k]),l.useEffect(()=>{f||d(lr(e,t,r))},[e,t,r,f]),{width:u,isResizing:f,startResize:b,setWidth:x}}function oo({mobileBreakpoint:e=768,onMobileChange:t,enabled:r=!0}={}){const[s,a]=l.useState(typeof window!="undefined"?window.innerWidth:1024),[o,i]=l.useState(typeof window!="undefined"?window.innerWidth<e:!1),c=l.useCallback(()=>{if(!r||typeof window=="undefined")return;const u=window.innerWidth,d=u<e;a(u),d!==o&&(i(d),t==null||t(d))},[r,e,o,t]);return l.useEffect(()=>{if(!r||typeof window=="undefined")return;const u=window.innerWidth,d=u<e;a(u),i(d),window.addEventListener("resize",c);let f=null;return window.ResizeObserver&&(f=new ResizeObserver(()=>{c()}),f.observe(document.body)),()=>{window.removeEventListener("resize",c),f==null||f.disconnect()}},[r,e,c]),{isMobile:o,viewportWidth:s}}function io({isActive:e,containerRef:t,restoreFocus:r=!0,initialFocusRef:s}){const a=l.useRef(null);l.useEffect(()=>{if(e){if(a.current=document.activeElement,s!=null&&s.current)s.current.focus();else if(t.current){const i=t.current.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');i==null||i.focus()}}else r&&a.current&&(a.current.focus(),a.current=null)},[e,t,s,r]);const o=l.useCallback(i=>{if(!(!e||!t.current)&&i.key==="Tab"){const c=t.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),u=c[0],d=c[c.length-1];i.shiftKey?document.activeElement===u&&(i.preventDefault(),d==null||d.focus()):document.activeElement===d&&(i.preventDefault(),u==null||u.focus())}},[e,t]);l.useEffect(()=>{if(e)return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}},[e,o])}function lo({key:e,ctrl:t=!1,shift:r=!1,alt:s=!1,meta:a=!1,onTrigger:o,enabled:i=!0,preventDefault:c=!0}){const u=l.useCallback(d=>{if(!i)return;const f=d.target;if((f.tagName==="INPUT"||f.tagName==="TEXTAREA"||f.isContentEditable)&&!t&&!a)return;const m=e.length===1?d.key.toLowerCase()===e.toLowerCase():d.key===e,h=t?d.ctrlKey||d.metaKey:!d.ctrlKey&&!d.metaKey,x=r?d.shiftKey:!d.shiftKey,v=s?d.altKey:!d.altKey,k=a?d.metaKey:!d.metaKey,b=t?(d.ctrlKey||d.metaKey)&&!a:h&&k;m&&b&&x&&v&&(c&&(d.preventDefault(),d.stopPropagation()),o())},[i,e,t,r,s,a,o,c]);l.useEffect(()=>{if(i)return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u)}},[i,u])}function Us({children:e,defaultCollapsed:t=!1,collapsed:r,onCollapseChange:s,onWidthChange:a,onMobileChange:o,exclusiveGroups:i=!1}){const c=it(),u=xt(),d=l.useRef(null),f=r!==void 0,p=()=>{if(f)return r;if(u.storageKey&&u.persistState&&typeof window!="undefined"){const L=localStorage.getItem(`${u.storageKey}-collapsed`);if(L!==null)return L==="true"}return t},m=()=>{if(u.storageKey&&u.persistWidth&&typeof window!="undefined"){const L=localStorage.getItem(`${u.storageKey}-width`);if(L!==null){const z=parseInt(L,10);if(!isNaN(z))return z}}return br(c.contentWidth)},[h,x]=l.useState(p),[v,k]=l.useState({}),{isMobile:b}=oo({mobileBreakpoint:u.mobileBreakpoint,onMobileChange:L=>{o==null||o(L),L&&u.mobileVariant==="collapse"&&!f&&x(!0)},enabled:u.responsive}),{width:j,isResizing:C,startResize:g,setWidth:y}=ao({initialWidth:m(),minWidth:u.minWidth,maxWidth:u.maxWidth,snapPoints:u.snapPoints,onWidthChange:L=>{a==null||a(L),u.storageKey&&u.persistWidth&&typeof window!="undefined"&&localStorage.setItem(`${u.storageKey}-width`,String(L))},enabled:u.resizable&&!b});io({isActive:b&&u.mobileVariant==="overlay"&&!h,containerRef:d,restoreFocus:!0});const N=f?r:h,_=l.useCallback(L=>{f||x(L),s==null||s(L)},[f,s]),S=l.useCallback(()=>{_(!N)},[N,_]),M=no(u.keyboardShortcut);lo({key:M.key,ctrl:M.ctrl,shift:M.shift,alt:M.alt,meta:M.meta,onTrigger:S,enabled:u.enableKeyboardShortcut});const F=l.useCallback(L=>{y(L)},[y]),A=l.useCallback(L=>{k(i?z=>{const q=z[L]===!1,W={},ae=new Set([...Object.keys(z),L]);return q?ae.forEach(se=>{W[se]=!0}):ae.forEach(se=>{W[se]=se!==L}),W}:z=>P(T({},z),{[L]:!z[L]}))},[i]),R=l.useCallback((L,z)=>{k(Y=>P(T({},Y),{[L]:z}))},[]);l.useEffect(()=>{f&&r!==h&&x(r)},[f,r,h]),l.useEffect(()=>{u.storageKey&&u.persistState&&typeof window!="undefined"&&!f&&localStorage.setItem(`${u.storageKey}-collapsed`,String(h))},[u.storageKey,u.persistState,h,f]);const I=l.useMemo(()=>({collapsed:N,toggle:S,setCollapsed:_,currentWidth:j,setWidth:F,isMobile:b,isResizing:C,startResize:g,groupStates:v,toggleGroup:A,setGroupCollapsed:R,sidebarRef:d}),[N,S,_,j,F,b,C,g,v,A,R]);return n.jsx(Lr.Provider,{value:I,children:e})}function qs({children:e,variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o,mode:i,resizable:c,minWidth:u,maxWidth:d,snapPoints:f,responsive:p,mobileBreakpoint:m,mobileVariant:h,overlayBackdrop:x,persistState:v,persistWidth:k,storageKey:b,keyboardShortcut:j,enableKeyboardShortcut:C,defaultCollapsed:g,collapsed:y,onCollapseChange:N,onWidthChange:_,onMobileChange:S,exclusiveGroups:M}){return n.jsx(Hs,{variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o,children:n.jsx(Bs,{mode:i,resizable:c,minWidth:u,maxWidth:d,snapPoints:f,responsive:p,mobileBreakpoint:m,mobileVariant:h,overlayBackdrop:x,persistState:v,persistWidth:k,storageKey:b,keyboardShortcut:j,enableKeyboardShortcut:C,children:n.jsx(Us,{defaultCollapsed:g,collapsed:y,onCollapseChange:N,onWidthChange:_,onMobileChange:S,exclusiveGroups:M,children:e})})})}const Fr=l.createContext(null);function Gs(){return l.useContext(Fr)}function Ks(){const e=l.useContext(Fr);if(!e)throw new Error("useSidebarSlotRequired must be used within SidebarSlotProvider");return e}function co({children:e,defaultSlot:t=null}){const[r,s]=l.useState(t),a=l.useRef(new Map),o=l.useCallback((u,d)=>{a.current.set(u,d)},[]),i=l.useCallback(u=>{a.current.delete(u)},[]),c=l.useMemo(()=>({activeSlot:r,setActiveSlot:s,slots:a.current,registerSlot:o,unregisterSlot:i}),[r,o,i]);return n.jsx(Fr.Provider,{value:c,children:e})}const _r=l.createContext(null);function Rd(){return l.useContext(_r)}function Ys(){const e=l.useContext(_r);return e||{showMainToggle:!0,mainTogglePosition:"floating"}}function Xs(r){var s=r,{className:e=""}=s,t=O(s,["className"]);const{currentWidth:a,setWidth:o,isResizing:i,startResize:c}=lt(),{resizable:u}=xt();return u?n.jsxs("div",P(T({className:`
|
|
387
387
|
group
|
|
388
388
|
absolute
|
|
389
389
|
top-0
|
|
@@ -410,7 +410,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
410
410
|
group-hover:opacity-100
|
|
411
411
|
transition-opacity
|
|
412
412
|
${i?"opacity-100":""}
|
|
413
|
-
`}),n.jsx(
|
|
413
|
+
`}),n.jsx(ec,{className:`
|
|
414
414
|
h-4
|
|
415
415
|
w-4
|
|
416
416
|
text-fg-tertiary
|
|
@@ -419,12 +419,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
419
419
|
transition-opacity
|
|
420
420
|
absolute
|
|
421
421
|
${i?"opacity-100":""}
|
|
422
|
-
`,"aria-hidden":"true"})]})):null}function
|
|
422
|
+
`,"aria-hidden":"true"})]})):null}function Js(o){var i=o,{visible:e,onBackdropClick:t,className:r="",style:s}=i,a=O(i,["visible","onBackdropClick","className","style"]);const{collapsed:c,setCollapsed:u,isMobile:d}=lt(),{animationDuration:f}=it(),{mobileVariant:p,overlayBackdrop:m}=xt(),h=d&&p==="overlay",x=e!=null?e:h&&m&&!c,v=()=>{t?t():u(!0)};return x?n.jsx("div",T({className:`
|
|
423
423
|
fixed inset-0
|
|
424
424
|
bg-scrim
|
|
425
425
|
${ue("modal-backdrop")}
|
|
426
426
|
${r}
|
|
427
|
-
`,style:
|
|
427
|
+
`,style:T({animation:`fadeIn ${f}ms ease-in-out`},s),onClick:v,"aria-hidden":"true","data-testid":"side-navbar-backdrop"},a)):null}const Id={xs:"w-5 h-5",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10"},Dd={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},Ld={floating:`absolute ${ue("fixed")}`,top:"absolute top-2 right-2 z-10",bottom:"absolute bottom-2 right-2 z-10",inside:"relative z-10","navigation-top":"relative mt-2 mx-auto z-10","navigation-bottom":"relative mt-auto mb-2 mx-auto z-10"},Fd={default:"bg-surface-raised border border-line-default shadow-sm hover:bg-surface-hover hover:shadow",ghost:"bg-transparent hover:bg-surface-hover border-0",outline:"bg-transparent border border-line-default hover:bg-surface-hover"},_d={floating:"right",top:"bottom",bottom:"top",inside:"right","navigation-top":"right","navigation-bottom":"right"};function Zs(v){var k=v,{position:e="floating",offset:t,icon:r,expandIcon:s,collapseIcon:a,size:o="sm",variant:i="default",showTooltip:c=!0,tooltipPosition:u,keyboardShortcut:d,enableKeyboardShortcut:f,className:p="",style:m,"aria-label":h}=k,x=O(k,["position","offset","icon","expandIcon","collapseIcon","size","variant","showTooltip","tooltipPosition","keyboardShortcut","enableKeyboardShortcut","className","style","aria-label"]);var W,ae;const{collapsed:b,toggle:j}=lt(),{animationDuration:C,animationEasing:g,navigationWidth:y,contentWidth:N,minWidth:_}=it(),S=xt(),M=d!=null?d:S.keyboardShortcut,F=f!=null?f:S.enableKeyboardShortcut,A=()=>{if(typeof r=="function")return r(b);if(r)return r;if(b&&s)return s;if(!b&&a)return a;const se=b?cc:ic;return n.jsx(se,{className:Dd[o],style:{transition:"none",transform:"none",willChange:"auto"}})},R=b?"Expand sidebar":"Collapse sidebar",I=u!=null?u:_d[e],L=c?`${b?"Expand":"Collapse"} sidebar${F?` (${M})`:""}`:void 0,z=t?{transform:`translate(${(W=t.x)!=null?W:0}px, ${(ae=t.y)!=null?ae:0}px)`}:{},Y=e==="floating"?T({right:"-12px",top:"1rem",transform:"translateY(-50%)",transition:`right ${C}ms ${g}`},z):z,q=n.jsx("button",P(T({type:"button",onClick:j,className:`
|
|
428
428
|
${Id[o]}
|
|
429
429
|
${Fd[i]}
|
|
430
430
|
rounded-full
|
|
@@ -433,7 +433,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
433
433
|
focus:outline-none focus:ring-2 focus:ring-line-focus focus:ring-offset-1
|
|
434
434
|
${e==="floating"?"":Ld[e]}
|
|
435
435
|
${p}
|
|
436
|
-
`,style:
|
|
436
|
+
`,style:T(T(T(T({},e==="floating"?{position:"absolute",right:"-11px",left:"auto"}:{}),e!=="floating"?Y:{}),e==="floating"?{zIndex:kn.fixed.value}:{}),m),"aria-label":h||R,"aria-expanded":!b,"aria-controls":"side-navbar-sidebar","data-position":e},x),{children:A()}));if(e==="floating"){const se=c&&L?n.jsx(Ut,{content:L,position:I,preservePositioning:!0,children:q}):q;return n.jsx("div",{style:{position:"absolute",right:"0",top:"1rem",transform:"translateY(-50%)",zIndex:kn.fixed.value},children:se})}return c&&L?n.jsx(Ut,{content:L,position:I,children:q}):q}const Pd={default:"",compact:"text-sm",elevated:"shadow-lg",minimal:"border-0",bordered:"border-2"};function uo(o){var i=o,{children:e,className:t="",style:r,"aria-label":s}=i,a=O(i,["children","className","style","aria-label"]);const c=lt(),u=it(),d=xt(),f=Ys(),{collapsed:p,setCollapsed:m,currentWidth:h,isResizing:x,sidebarRef:v,isMobile:k}=c,{variant:b,navigationWidth:j,contentWidth:C,animationDuration:g,animationEasing:y}=u,{mode:N,resizable:_,mobileVariant:S,overlayBackdrop:M}=d,F=typeof j=="number"?`${j}px`:j,A=typeof C=="number"?`${C}px`:C,I=N==="navigation"||p?F:_?`${h}px`:A,[L,z]=l.useState(!1);l.useEffect(()=>{z(!0)},[]);const Y=k&&S==="overlay",q=L&&Y,W=q?`fixed left-0 top-0 ${ue("fixed")}`:"relative";return n.jsxs(n.Fragment,{children:[L&&Y&&M&&!p&&n.jsx(Js,{}),n.jsxs("aside",P(T({ref:v,className:w(W,"flex","h-full","overflow-visible",Pd[b],q&&p?"-translate-x-full":"translate-x-0",t),style:T({position:q?"fixed":"relative",backgroundColor:"var(--color-surface-subtle)",borderRight:"1px solid var(--color-line-default)",width:I,minWidth:I,transitionProperty:x?"none":"width, min-width, transform",transitionDuration:`${g}ms`,transitionTimingFunction:y},r),role:"complementary","aria-label":s||"Sidebar navigation","aria-expanded":N!=="navigation"?!p:void 0,"data-mode":N,"data-collapsed":p},a),{children:[_&&N!=="navigation"&&!p&&n.jsx(Xs,{}),f.showMainToggle&&N!=="navigation"&&n.jsx(Zs,{position:f.mainTogglePosition}),n.jsx("div",{className:"flex h-full w-full overflow-visible",children:e})]}))]})}const Pr=l.createContext(null);function zd(){return l.useContext(Pr)}function zr(){const e=l.useContext(Pr);if(!e)throw new Error("useNavbarRequired must be used within a SideNavbar.Navbar component");return e}function gr(o){var i=o,{icon:e,size:t="sm",variant:r="ghost",className:s=""}=i,a=O(i,["icon","size","variant","className"]);const{collapsed:c,toggle:u}=zr(),d=()=>{if(e)return typeof e=="function"?e(c):e;const h=c?ht:Bt;return n.jsx(h,{className:p[t],style:{transition:"none",transform:"none",willChange:"auto"}})},f={xs:"w-6 h-6",sm:"w-8 h-8",md:"w-10 h-10"},p={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5"},m={default:"bg-surface-base border border-line-default shadow-sm hover:bg-surface-hover",ghost:"hover:bg-surface-active",outline:"border border-line-emphasis hover:bg-surface-hover"};return n.jsx(Ut,{content:c?"Expand sidebar":"Collapse sidebar",position:"right",children:n.jsx("button",P(T({type:"button",onClick:u,className:`
|
|
437
437
|
flex
|
|
438
438
|
items-center
|
|
439
439
|
justify-center
|
|
@@ -448,10 +448,10 @@ React keys must be passed directly to JSX without using spread:
|
|
|
448
448
|
${m[r]}
|
|
449
449
|
[&:hover]:!transform-none
|
|
450
450
|
${s}
|
|
451
|
-
`,style:{willChange:"auto",transform:"none",transition:"none"},"aria-label":c?"Expand sidebar":"Collapse sidebar","aria-expanded":!c},a),{children:d()}))})}const Od={sm:{container:"w-8 h-8",icon:"w-4 h-4",badge:"min-w-3.5 h-3.5 text-2xs"},md:{container:"w-10 h-10",icon:"w-5 h-5",badge:"min-w-5 h-5 text-xs"},lg:{container:"w-12 h-12",icon:"w-6 h-6",badge:"min-w-5 h-5 text-xs"}},Vd={default:"bg-error",success:"bg-success",warning:"bg-warning",danger:"bg-error-dark"},Wd={tooltip:"",inline:`flex-row ${
|
|
451
|
+
`,style:{willChange:"auto",transform:"none",transition:"none"},"aria-label":c?"Expand sidebar":"Collapse sidebar","aria-expanded":!c},a),{children:d()}))})}const Od={sm:{container:"w-8 h-8",icon:"w-4 h-4",badge:"min-w-3.5 h-3.5 text-2xs"},md:{container:"w-10 h-10",icon:"w-5 h-5",badge:"min-w-5 h-5 text-xs"},lg:{container:"w-12 h-12",icon:"w-6 h-6",badge:"min-w-5 h-5 text-xs"}},Vd={default:"bg-error",success:"bg-success",warning:"bg-warning",danger:"bg-error-dark"},Wd={tooltip:"",inline:`flex-row ${E("sm","gap")} w-full ${E("md","px")}`,below:`flex-col ${E("1.5","gap")}`};function fo(b){var j=b,{id:e,icon:t,label:r,labelMode:s,showLabel:a=!0,active:o=!1,showTooltip:i=!0,badge:c,badgeVariant:u="default",variant:d="default",size:f="md",href:p,target:m,onClick:h,disabled:x=!1,className:v=""}=j,k=O(j,["id","icon","label","labelMode","showLabel","active","showTooltip","badge","badgeVariant","variant","size","href","target","onClick","disabled","className"]);var Y;const{activeItem:C,setActiveItem:g,labelMode:y}=zr(),N=(Y=s!=null?s:y)!=null?Y:"tooltip",_=o||e&&C===e,S=Od[f],M=q=>{if(x){q.preventDefault();return}e&&g(e),h==null||h()},F=N!=="tooltip"&&a&&r&&n.jsx("span",{className:w("text-xs","flex-shrink-0","relative z-10",N==="below"&&"text-center",N==="inline"&&"truncate"),style:{willChange:"auto",transform:"none",zIndex:10},children:r}),A=w("relative","flex","items-center",N==="inline"?"justify-start":"justify-center",N==="below"&&"flex-col","rounded-lg","box-border","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-1","w-full","flex-shrink-0","min-w-0","[&>*]:!transition-none","[&>*]:!transform-none",N==="tooltip"?S.container:w(E("sm","px"),E("1.5","py")),N!=="tooltip"&&Wd[N],x?"opacity-50 cursor-not-allowed":"cursor-pointer",v),R={default:_?"bg-surface-brand-muted text-fg-brand-emphasis":x?"text-fg-disabled":"text-fg-secondary hover:bg-surface-active hover:text-fg-primary [&:hover]:!transform-none",ghost:_?"text-fg-brand-emphasis":x?"text-fg-disabled":"text-fg-secondary hover:text-fg-primary [&:hover]:!transform-none",subtle:_?"bg-surface-active text-fg-primary":x?"text-fg-disabled":"text-fg-tertiary hover:bg-surface-hover hover:text-fg-primary [&:hover]:!transform-none"},I=n.jsxs(n.Fragment,{children:[n.jsx("span",{className:w("flex-shrink-0",S.icon,"[&>svg]:transition-none","[&>svg]:!transform-none","[&>svg]:!will-change-auto","box-border","flex items-center justify-center",`relative ${ue("base")}`),style:{minWidth:S.icon==="w-4 h-4"?"1rem":S.icon==="w-5 h-5"?"1.25rem":"1.5rem",minHeight:S.icon==="w-4 h-4"?"1rem":S.icon==="w-5 h-5"?"1.25rem":"1.5rem",willChange:"auto",transform:"none",transition:"none",zIndex:N!=="tooltip"?0:"auto"},children:t}),F,c!=null&&n.jsx("span",{className:w("absolute","-top-1","-right-1","flex","items-center","justify-center","px-1","font-medium","text-fg-inverse","rounded-full",S.badge,Vd[u]),children:c})]}),L={willChange:"auto",transform:"none",transition:"none"},z=p?n.jsx("a",{href:p,target:m,rel:m==="_blank"?"noopener noreferrer":void 0,onClick:M,className:w(A,R[d]),style:L,"aria-label":r,"aria-current":_?"page":void 0,"aria-disabled":x,children:I}):n.jsx("button",P(T({type:"button",onClick:M,disabled:x,className:w(A,R[d]),style:L,"aria-label":r,"aria-current":_?"page":void 0},k),{children:I}));return N==="tooltip"&&i&&r&&!x?n.jsx(Ut,{content:r,position:"right",children:z}):z}function mo(s){var a=s,{orientation:e="horizontal",className:t=""}=a,r=O(a,["orientation","className"]);return e==="vertical"?n.jsx("div",T({className:w("w-px","h-6","bg-line-default","mx-auto",t),role:"separator","aria-orientation":"vertical"},r)):n.jsx("div",T({className:w("w-full","h-px","bg-line-default","my-2","flex-shrink-0",t),role:"separator","aria-orientation":"horizontal",style:{willChange:"auto",transform:"none"}},r))}function po(c){var u=c,{id:e,label:t,collapsible:r=!1,defaultCollapsed:s=!1,children:a,className:o}=u,i=O(u,["id","label","collapsible","defaultCollapsed","children","className"]);const[d,f]=l.useState(s);return n.jsxs("div",P(T({id:e,className:w("flex flex-col",o)},i),{children:[t&&n.jsx("div",{className:w(E("sm","px"),E("1.5","py"),"text-xs text-fg-tertiary uppercase tracking-wider",r&&"cursor-pointer hover:text-fg-secondary"),onClick:r?()=>f(!d):void 0,children:n.jsxs("div",{className:w("flex items-center",E("1.5","gap")),children:[" ",r&&n.jsx("span",{className:"shrink-0",children:d?n.jsx(ht,{className:"w-3 h-3",style:{transition:"none",transform:"none"}}):n.jsx(hs,{className:"w-3 h-3",style:{transition:"none",transform:"none"}})}),n.jsx("span",{children:t})]})}),!d&&n.jsxs("div",{className:"flex flex-col gap-2",children:[" ",a]})]}))}function vt(f){var p=f,{children:e,showMainToggle:t,mainTogglePosition:r,showToggle:s=!1,togglePosition:a="bottom",labelMode:o="tooltip",expandedWidth:i=200,className:c="",style:u}=p,d=O(p,["children","showMainToggle","mainTogglePosition","showToggle","togglePosition","labelMode","expandedWidth","className","style"]);const m=lt(),h=it(),x=xt(),v=Ys(),k=l.useRef(null),[b,j]=l.useState(null),[C,g]=l.useState(!1),y=t!=null?t:v.showMainToggle;r!=null||v.mainTogglePosition;const N=o==="inline"&&!m.collapsed,_=N?typeof i=="number"?`${i}px`:i:h.navigationWidth,S=l.useMemo(()=>({collapsed:m.collapsed,toggle:m.toggle,navbarRef:k,activeItem:b,setActiveItem:j,isHovered:C,showInternalToggle:s,togglePosition:a,labelMode:o}),[m.collapsed,m.toggle,b,C,s,a,o]);return y&&x.mode,n.jsx(Pr.Provider,{value:S,children:n.jsxs("nav",P(T({ref:k,className:w("relative","flex-shrink-0","flex","flex-col","h-full",N?"items-stretch":"items-center",c),style:T({position:"relative",backgroundColor:"var(--color-surface-raised)",borderRight:"1px solid var(--color-line-default)",width:_,transitionProperty:"width",transitionDuration:`${h.animationDuration}ms`,transitionTimingFunction:h.animationEasing},u),onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),"aria-label":"Side navigation"},d),{children:[s&&a==="top"&&n.jsx("div",{className:"flex-shrink-0 p-2",style:{borderBottom:"1px solid var(--color-line-default)"},children:n.jsx(gr,{})}),n.jsx("div",{className:w("relative","flex-1","flex","flex-col","overflow-y-auto","overflow-x-hidden","p-2","gap-2","w-full","min-w-0",N?"items-stretch":"items-center","justify-start"),style:{zIndex:1},children:e}),s&&a==="bottom"&&n.jsx("div",{className:"flex-shrink-0 p-2",style:{borderTop:"1px solid var(--color-line-default)"},children:n.jsx(gr,{})})]}))})}vt.Toggle=gr;vt.Item=fo;vt.Separator=mo;vt.Group=po;vt.displayName="Navbar";const Or=l.createContext(null);function ho(){return l.useContext(Or)}function Yt(){const e=l.useContext(Or);if(!e)throw new Error("useSidebarRequired must be used within a SideNavbar.Sidebar component");return e}function bo(c){var u=c,{title:e,subtitle:t,showBorder:r=!0,children:s,className:a="",style:o}=u,i=O(u,["title","subtitle","showBorder","children","className","style"]);const{collapsed:d,registerHeader:f,unregisterHeader:p}=Yt();return l.useEffect(()=>(f(),()=>p()),[f,p]),d?null:n.jsx("div",P(T({className:`
|
|
452
452
|
flex-shrink-0
|
|
453
|
-
${
|
|
454
|
-
${
|
|
453
|
+
${E("md","px")}
|
|
454
|
+
${E("sm","py")}
|
|
455
455
|
${r?"border-b border-line-default":""}
|
|
456
456
|
bg-surface-subtle
|
|
457
457
|
${a}
|
|
@@ -465,34 +465,34 @@ React keys must be passed directly to JSX without using spread:
|
|
|
465
465
|
text-fg-secondary
|
|
466
466
|
m-0
|
|
467
467
|
mt-1
|
|
468
|
-
`,children:t})]})}))}function
|
|
468
|
+
`,children:t})]})}))}function go(i){var c=i,{scrollable:e=!0,padding:t="md",children:r,className:s="",style:a}=c,o=O(c,["scrollable","padding","children","className","style"]);const{collapsed:u,setScrollPosition:d}=Yt();if(u)return null;const f=t!=="none"?E(t,"p"):"",p=e?"overflow-y-auto overflow-x-hidden":"overflow-hidden",m=e?{scrollbarWidth:Je.content.scrollbar.width,scrollbarColor:`${Je.content.scrollbar.color.thumb} ${Je.content.scrollbar.color.track}`}:{},h=x=>{e&&d(x.currentTarget.scrollTop)};return n.jsx("div",P(T({className:`
|
|
469
469
|
flex-1
|
|
470
470
|
min-h-0
|
|
471
471
|
${p}
|
|
472
472
|
${f}
|
|
473
473
|
${s}
|
|
474
|
-
`,style:
|
|
474
|
+
`,style:T(T({},m),a),onScroll:h},o),{children:r}))}function xo(i){var c=i,{padding:e="md",showBorder:t=!0,children:r,className:s="",style:a}=c,o=O(c,["padding","showBorder","children","className","style"]);const{collapsed:u,registerFooter:d,unregisterFooter:f}=Yt();if(l.useEffect(()=>(d(),()=>f()),[d,f]),u)return null;const p=e!=="none"?E(e,"p"):"";return n.jsx("div",P(T({className:`
|
|
475
475
|
flex-shrink-0
|
|
476
476
|
${p}
|
|
477
477
|
${t?"border-t border-line-default":""}
|
|
478
478
|
bg-surface-subtle
|
|
479
479
|
${s}
|
|
480
|
-
`,style:a},o),{children:r}))}function
|
|
480
|
+
`,style:a},o),{children:r}))}function vo(d){var f=d,{id:e,title:t,icon:r,actions:s,collapsible:a=!0,defaultCollapsed:o=!1,children:i,className:c=""}=f,u=O(f,["id","title","icon","actions","collapsible","defaultCollapsed","children","className"]);var N;const{collapsed:p,activeGroup:m,setActiveGroup:h}=Yt(),{groupStates:x,toggleGroup:v,setGroupCollapsed:k}=lt(),{animationDuration:b}=it(),j=l.useRef(!1);if(l.useEffect(()=>{!j.current&&x[e]===void 0&&(j.current=!0,k(e,o))},[e,o,x,k]),p)return null;const C=(N=x[e])!=null?N:o,g=m===e,y=()=>{h(e),a&&v(e)};return n.jsxs("div",P(T({className:`
|
|
481
481
|
border-b
|
|
482
482
|
border-line-default
|
|
483
483
|
last:border-b-0
|
|
484
484
|
${c}
|
|
485
|
-
`},u),{children:[t&&n.jsxs("button",{type:"button",onClick:
|
|
485
|
+
`},u),{children:[t&&n.jsxs("button",{type:"button",onClick:y,className:`
|
|
486
486
|
flex
|
|
487
487
|
items-center
|
|
488
488
|
justify-between
|
|
489
489
|
w-full
|
|
490
|
-
${
|
|
491
|
-
${
|
|
490
|
+
${E("md","px")}
|
|
491
|
+
${E("2.5","py")}
|
|
492
492
|
text-left
|
|
493
493
|
transition-colors
|
|
494
494
|
duration-150
|
|
495
|
-
${
|
|
495
|
+
${g?"bg-surface-active":"hover:bg-surface-active"}
|
|
496
496
|
${a?"cursor-pointer":"cursor-default"}
|
|
497
497
|
`,"aria-expanded":a?!C:void 0,"aria-controls":a?`sidebar-group-${e}`:void 0,children:[n.jsxs("div",{className:"flex items-center gap-2",children:[r&&n.jsx("span",{className:"w-4 h-4 text-fg-tertiary",children:r}),n.jsx("span",{className:"text-sm font-medium text-fg-secondary",children:t})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[s,a&&n.jsx(ChevronDown,{className:`
|
|
498
498
|
w-4
|
|
@@ -500,14 +500,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
500
500
|
text-fg-tertiary
|
|
501
501
|
transition-transform
|
|
502
502
|
${C?"-rotate-90":"rotate-0"}
|
|
503
|
-
`,style:{transitionDuration:`${
|
|
503
|
+
`,style:{transitionDuration:`${b}ms`},"aria-hidden":"true"})]})]}),a?n.jsx(xa,{open:!C,duration:b,children:n.jsx("div",{id:`sidebar-group-${e}`,className:"px-3 py-2",children:i})}):n.jsx("div",{className:"px-3 py-2",children:i})]}))}function yo({id:e,children:t}){const{activeSlot:r,registerSlot:s,unregisterSlot:a}=Ks();return l.useEffect(()=>(s(e,t),()=>a(e)),[e,t,s,a]),r!==e?null:n.jsx(n.Fragment,{children:t})}function wo({fallback:e=null}){const{activeSlot:t,slots:r}=Ks();return!t||!r.has(t)?n.jsx(n.Fragment,{children:e}):n.jsx(n.Fragment,{children:r.get(t)})}function ct(a){var o=a,{children:e,className:t="",style:r}=o,s=O(o,["children","className","style"]);const i=lt(),c=it(),u=l.useRef(null),[d,f]=l.useState(0),[p,m]=l.useState(!1),[h,x]=l.useState(!1),[v,k]=l.useState(null),b=l.useCallback(()=>m(!0),[]),j=l.useCallback(()=>m(!1),[]),C=l.useCallback(()=>x(!0),[]),g=l.useCallback(()=>x(!1),[]),y=l.useMemo(()=>({collapsed:i.collapsed,currentWidth:i.currentWidth,isMobile:i.isMobile,sidebarRef:u,scrollPosition:d,setScrollPosition:f,hasHeader:p,hasFooter:h,registerHeader:b,unregisterHeader:j,registerFooter:C,unregisterFooter:g,activeGroup:v,setActiveGroup:k}),[i.collapsed,i.currentWidth,i.isMobile,d,p,h,b,j,C,g,v]),N=br(c.contentWidth),_=br(c.navigationWidth),S=N-_;return n.jsx(Or.Provider,{value:y,children:n.jsx("aside",P(T({ref:u,id:"side-navbar-sidebar",className:w("flex","flex-col","h-full","bg-surface-subtle","border-r","border-line-default","overflow-hidden",t),style:T({width:i.collapsed?0:S,opacity:i.collapsed?0:1,visibility:i.collapsed?"hidden":"visible",transitionProperty:"width, opacity, visibility",transitionDuration:`${c.animationDuration}ms`,transitionTimingFunction:c.animationEasing},r),"aria-hidden":i.collapsed},s),{children:e}))})}ct.Header=bo;ct.Content=go;ct.Footer=xo;ct.Group=vo;ct.Slot=yo;ct.SlotContent=wo;function Ce(M){var F=M,{mode:e="full",variant:t="default",navigationWidth:r="56px",width:s="320px",animationDuration:a=300,resizable:o=!1,minWidth:i,maxWidth:c,snapPoints:u,responsive:d=!1,mobileBreakpoint:f=768,mobileVariant:p="collapse",overlayBackdrop:m=!0,storageKey:h,persistWidth:x=!1,defaultCollapsed:v=!1,collapsed:k,onCollapseChange:b,onWidthChange:j,onMobileChange:C,exclusiveGroups:g=!1,showToggle:y=!0,togglePosition:N="floating",children:_}=F,S=O(F,["mode","variant","navigationWidth","width","animationDuration","resizable","minWidth","maxWidth","snapPoints","responsive","mobileBreakpoint","mobileVariant","overlayBackdrop","storageKey","persistWidth","defaultCollapsed","collapsed","onCollapseChange","onWidthChange","onMobileChange","exclusiveGroups","showToggle","togglePosition","children"]);const A=l.useMemo(()=>({showMainToggle:y,mainTogglePosition:N}),[y,N]);return n.jsx(_r.Provider,{value:A,children:n.jsx(qs,{variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,mode:e,resizable:o,minWidth:i,maxWidth:c,snapPoints:u,responsive:d,mobileBreakpoint:f,mobileVariant:p,overlayBackdrop:m,storageKey:h,persistWidth:x,defaultCollapsed:v,collapsed:k,onCollapseChange:b,onWidthChange:j,onMobileChange:C,exclusiveGroups:g,children:n.jsx(uo,P(T({},S),{children:_}))})})}Ce.Navbar=vt;Ce.Sidebar=ct;Ce.Toggle=Zs;Ce.ResizeHandle=Xs;Ce.Backdrop=Js;Ce.Provider=qs;Ce.ThemeProvider=Hs;Ce.ConfigProvider=Bs;Ce.StateProvider=Us;Ce.SlotProvider=co;function Hd({defaultStates:e={},persist:t=!1,storageKey:r}={}){const s=()=>{if(t&&r&&typeof window!="undefined"){const d=localStorage.getItem(`${r}-groups`);if(d)try{const f=JSON.parse(d);return T(T({},e),f)}catch(f){}}return e},[a,o]=l.useState(s);l.useEffect(()=>{t&&r&&typeof window!="undefined"&&localStorage.setItem(`${r}-groups`,JSON.stringify(a))},[t,r,a]);const i=l.useCallback(d=>{o(f=>P(T({},f),{[d]:!f[d]}))},[]),c=l.useCallback((d,f)=>{o(p=>P(T({},p),{[d]:f}))},[]),u=l.useCallback(()=>{o(e)},[e]);return{groupStates:a,toggleGroup:i,setGroupCollapsed:c,resetGroups:u}}function Bd(){const{activeItem:e,setActiveItem:t}=zr(),r=Gs(),s=l.useCallback((a,o)=>{t(a),o&&(r!=null&&r.setActiveSlot)&&r.setActiveSlot(o)},[t,r]);return{activeItem:e,setActiveItem:t,navigate:s}}function Ud(){var r,s,a,o;const e=Gs(),t=ho();return{activeSlot:(r=e==null?void 0:e.activeSlot)!=null?r:null,setActiveSlot:(s=e==null?void 0:e.setActiveSlot)!=null?s:(()=>{}),scrollPosition:(a=t==null?void 0:t.scrollPosition)!=null?a:0,setScrollPosition:(o=t==null?void 0:t.setScrollPosition)!=null?o:(()=>{})}}function qd(){const e=useSideNavbarThemeRequired(),t=useSideNavbarConfigRequired(),r=useSideNavbarStateRequired();return{theme:e,config:t,state:r}}function ko({children:e,asChild:t=!1}){const{onOpenChange:r}=Dt();return t&&l.isValidElement(e)?l.cloneElement(e,{onClick:s=>{r(!0),e.props.onClick&&e.props.onClick(s)}}):n.jsx("button",{type:"button",onClick:()=>r(!0),"aria-haspopup":"dialog",children:e})}function Qs(i){var c=i,{children:e,size:t="md",closeOnOverlayClick:r=!0,closeOnEscape:s=!0,className:a=""}=c,o=O(c,["children","size","closeOnOverlayClick","closeOnEscape","className"]);const{isOpen:u,onClose:d,titleId:f,descriptionId:p}=Dt(),m=l.useRef(null),h=l.useRef(null);if(l.useEffect(()=>{if(!u)return;const b=setTimeout(()=>{var N;const g=(N=m.current)==null?void 0:N.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),y=g==null?void 0:g[0];y==null||y.focus()},0),j=g=>{s&&g.key==="Escape"&&d()},C=g=>{if(g.key!=="Tab"||!m.current)return;const y=Array.from(m.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(S=>!S.disabled&&S.offsetParent!==null);if(y.length===0){g.preventDefault();return}const N=y[0],_=y[y.length-1];g.shiftKey?document.activeElement===N&&(g.preventDefault(),_.focus()):document.activeElement===_&&(g.preventDefault(),N.focus())};return document.addEventListener("keydown",j),document.addEventListener("keydown",C),()=>{clearTimeout(b),document.removeEventListener("keydown",j),document.removeEventListener("keydown",C)}},[u,d,s]),!u)return null;const x={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-2xl",fullscreen:"max-w-full h-full m-0 rounded-none"},v=b=>{r&&b.target===h.current&&d()},k=n.jsxs("div",{className:`fixed inset-0 ${ue("modal")} overflow-y-auto`,onClick:v,children:[n.jsx("div",{ref:h,className:"fixed inset-0 bg-scrim transition-opacity","aria-hidden":"true"}),n.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:n.jsx("div",P(T({ref:m,role:"dialog","aria-modal":"true","aria-labelledby":f,"aria-describedby":p,className:`
|
|
504
504
|
relative ${ue("modal")} w-full
|
|
505
505
|
${x[t]}
|
|
506
506
|
bg-surface-overlay
|
|
507
507
|
${J("lg")}
|
|
508
508
|
${Se("xl")}
|
|
509
509
|
${a}
|
|
510
|
-
`,tabIndex:-1},o),{children:e}))})]});return typeof window!="undefined"?Ue.createPortal(k,document.body):k}function
|
|
510
|
+
`,tabIndex:-1},o),{children:e}))})]});return typeof window!="undefined"?Ue.createPortal(k,document.body):k}function en(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);return n.jsx("div",P(T({className:`flex flex-col space-y-1.5 p-6 pb-4 ${t}`},r),{children:e}))}function jo(o){var i=o,{as:e="h2",children:t,className:r="",id:s}=i,a=O(i,["as","children","className","id"]);const c=Dt(),u=l.useId(),d=s||c.titleId||u;return n.jsx(e,P(T({id:d,className:`${ce("h3")} font-semibold leading-none tracking-tight ${r}`},a),{children:t}))}function No(a){var o=a,{children:e,className:t="",id:r}=o,s=O(o,["children","className","id"]);const i=Dt(),c=l.useId(),u=r||i.descriptionId||c;return n.jsx("p",P(T({id:u,className:`${ce("bodySmall")} text-fg-secondary ${t}`},s),{children:e}))}function tn(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);return n.jsx("div",P(T({className:`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 p-6 pt-4 ${t}`},r),{children:e}))}function So({"aria-label":e="Close dialog",className:t="",asChild:r=!1,children:s}){const{onClose:a}=Dt();return r&&l.isValidElement(s)?l.cloneElement(s,{onClick:o=>{a(),s.props.onClick&&s.props.onClick(o)}}):n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:a,className:`absolute right-4 top-4 ${t}`,"aria-label":e,children:n.jsx(we,{className:"h-4 w-4"})})}function Te({children:e,open:t,defaultOpen:r,onOpenChange:s}){const a=l.useId(),o=l.useId();return n.jsx(ps,{open:t,defaultOpen:r,onOpenChange:s,titleId:a,descriptionId:o,children:e})}Te.Trigger=ko;Te.Content=Qs;Te.Header=en;Te.Title=jo;Te.Description=No;Te.Footer=tn;Te.Close=So;function Gd({open:e,defaultOpen:t,onOpenChange:r,title:s,description:a,confirmLabel:o="Confirm",cancelLabel:i="Cancel",variant:c="default",onConfirm:u,onCancel:d,children:f}){const p=()=>{u==null||u(),r==null||r(!1)},m=()=>{d==null||d(),r==null||r(!1)};return n.jsx(Te,{open:e,defaultOpen:t,onOpenChange:r,children:n.jsx(Qs,{size:"sm",closeOnOverlayClick:!1,children:f||n.jsxs(n.Fragment,{children:[n.jsxs(en,{children:[n.jsx(Te.Title,{children:s}),a&&n.jsx(Te.Description,{children:a})]}),n.jsxs(tn,{children:[n.jsx(Z,{variant:"outline",onClick:m,children:i}),n.jsx(Z,{variant:c==="destructive"?"error":"primary",onClick:p,children:o})]})]})})})}const Kd={success:dr,error:bs,warning:mc,info:rc},Yd={success:"border-success",error:"border-error",warning:"border-warning",info:"border-info"},Xd={success:"text-fg-success",error:"text-fg-error",warning:"text-fg-warning",info:"text-fg-info"};function Co(i){var c=i,{toast:e,onDismiss:t,position:r="top-right",className:s="",style:a}=c,o=O(c,["toast","onDismiss","position","className","style"]);const[u,d]=l.useState(!1),[f,p]=l.useState(!1),m=Kd[e.variant];l.useEffect(()=>{if(e.duration===void 0)return;d(!0);const v=setTimeout(()=>{p(!0),setTimeout(()=>{t(e.id)},300)},e.duration);return()=>clearTimeout(v)},[e.duration,e.id,t]),l.useEffect(()=>{const v=setTimeout(()=>d(!0),10);return()=>clearTimeout(v)},[]);const h={"top-right":"top-4 right-4","top-left":"top-4 left-4","bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4","top-center":"top-4 left-1/2 -translate-x-1/2","bottom-center":"bottom-4 left-1/2 -translate-x-1/2"},x=()=>{p(!0),setTimeout(()=>{t(e.id)},300)};return n.jsx("div",P(T({className:`
|
|
511
511
|
fixed ${h[r]} ${ue("toast")}
|
|
512
512
|
w-full max-w-sm
|
|
513
513
|
transition-all duration-300 ease-in-out
|
|
@@ -522,7 +522,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
522
522
|
${Se("lg")}
|
|
523
523
|
border
|
|
524
524
|
${Yd[e.variant]}
|
|
525
|
-
`,children:[n.jsx("div",{className:`flex-shrink-0 ${Xd[e.variant]}`,children:n.jsx(m,{className:"h-5 w-5","aria-hidden":"true"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"font-medium text-fg-primary",children:e.title}),e.description&&n.jsx("div",{className:"mt-1 text-sm text-fg-secondary",children:e.description}),e.action&&n.jsx("div",{className:"mt-3",children:n.jsx(Z,{variant:"outline",size:"sm",onClick:()=>{var
|
|
525
|
+
`,children:[n.jsx("div",{className:`flex-shrink-0 ${Xd[e.variant]}`,children:n.jsx(m,{className:"h-5 w-5","aria-hidden":"true"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"font-medium text-fg-primary",children:e.title}),e.description&&n.jsx("div",{className:"mt-1 text-sm text-fg-secondary",children:e.description}),e.action&&n.jsx("div",{className:"mt-3",children:n.jsx(Z,{variant:"outline",size:"sm",onClick:()=>{var v;(v=e.action)==null||v.onClick(),x()},children:e.action.label})})]}),n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:x,className:"flex-shrink-0","aria-label":"Dismiss notification",children:n.jsx(we,{className:"h-4 w-4"})})]})}))}function Jd({position:e="top-right",maxToasts:t}){const{toasts:r,removeToast:s}=ms(),a=t?r.slice(0,t):r;if(a.length===0)return null;const o=n.jsx("div",{className:`fixed inset-0 pointer-events-none ${ue("toast")}`,"aria-live":"polite","aria-label":"Notifications",children:a.map((i,c)=>{const u=e.includes("top"),d=1+c*5;return n.jsx(Co,{toast:i,onDismiss:s,position:e,style:{[u?"top":"bottom"]:`${d}rem`}},i.id)})});return typeof window!="undefined"?Ue.createPortal(o,document.body):o}function Zd(){const{addToast:e,removeToast:t,clearAll:r}=ms(),s=l.useCallback(d=>e({title:d.title,description:d.description,variant:d.variant||"info",duration:d.duration,action:d.action}),[e]),a=l.useCallback((d,f,p)=>s(T({title:d,description:f,variant:"success"},p)),[s]),o=l.useCallback((d,f,p)=>s(T({title:d,description:f,variant:"error"},p)),[s]),i=l.useCallback((d,f,p)=>s(T({title:d,description:f,variant:"warning"},p)),[s]),c=l.useCallback((d,f,p)=>s(T({title:d,description:f,variant:"info"},p)),[s]),u=l.useCallback((d,f,p,m="info",h)=>s({title:d,description:f,variant:m,duration:h,action:{label:"Undo",onClick:p}}),[s]);return{show:s,success:a,error:o,warning:i,info:c,withUndo:u,dismiss:t,clearAll:r}}function $o({steps:e,currentStep:t,defaultCurrentStep:r=0,onStepChange:s,onComplete:a,allowNavigation:o=!0,showStepNumbers:i=!0,orientation:c="horizontal",className:u=""}){const[d,f]=l.useState(r),p=t!==void 0,m=p?t:d,h=g=>g<m?"completed":g===m?"active":"pending",x=()=>{if(m<e.length-1){const g=m+1;p||f(g),s==null||s(g)}else a==null||a()},v=()=>{if(m>0){const g=m-1;p||f(g),s==null||s(g)}},k=g=>{o&&(e[g].disabled||(p||f(g),s==null||s(g)))},b=e[m],j=m===0,C=m===e.length-1;return c==="vertical"?n.jsxs("div",{className:`flex gap-4 ${u}`,children:[n.jsx("div",{className:"flex flex-col",children:e.map((g,y)=>{const N=g.status||h(y),_=y===m;return n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("button",P(T({type:"button",onClick:()=>k(y),disabled:!o||g.disabled},N==="pending"?{"data-marker":"pending"}:{}),{className:`
|
|
526
526
|
flex
|
|
527
527
|
items-center
|
|
528
528
|
justify-center
|
|
@@ -531,25 +531,25 @@ React keys must be passed directly to JSX without using spread:
|
|
|
531
531
|
${J("full")}
|
|
532
532
|
border-2
|
|
533
533
|
${he("base")}
|
|
534
|
-
${N==="completed"?"bg-success border-success text-fg-inverse":N==="active"?"bg-surface-brand border-line-brand text-fg-inverse":N==="error"?"bg-error border-error text-fg-inverse":"bg-surface-base border-line-emphasis text-fg-quaternary"}
|
|
535
|
-
${!o||
|
|
536
|
-
`,children:N==="completed"?n.jsx(
|
|
534
|
+
${N==="completed"?"bg-success border-success text-fg-inverse":N==="active"?"bg-surface-brand-strong border-line-brand text-fg-inverse":N==="error"?"bg-error border-error text-fg-inverse":"bg-surface-base border-line-emphasis text-fg-quaternary"}
|
|
535
|
+
${!o||g.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"}
|
|
536
|
+
`,children:N==="completed"?n.jsx(ns,{className:"h-5 w-5"}):i?y+1:null})),y<e.length-1&&n.jsx("div",{className:`
|
|
537
537
|
w-0.5
|
|
538
538
|
h-12
|
|
539
539
|
mt-2
|
|
540
540
|
${N==="completed"?"bg-success":"bg-line-emphasis"}
|
|
541
|
-
`})]}),n.jsxs("div",{className:"flex-1 pb-8",children:[n.jsx("button",{type:"button",onClick:()=>k(
|
|
541
|
+
`})]}),n.jsxs("div",{className:"flex-1 pb-8",children:[n.jsx("button",{type:"button",onClick:()=>k(y),disabled:!o||g.disabled,className:`
|
|
542
542
|
text-left
|
|
543
|
-
${
|
|
543
|
+
${_?"font-semibold":"font-medium"}
|
|
544
544
|
${N==="active"?"text-fg-brand-emphasis":"text-fg-secondary"}
|
|
545
|
-
${!o||
|
|
546
|
-
`,children:
|
|
547
|
-
${
|
|
545
|
+
${!o||g.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"}
|
|
546
|
+
`,children:g.title}),g.description&&n.jsx("p",{className:"text-sm text-fg-tertiary mt-1",children:g.description})]})]},g.id)})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("div",{className:`
|
|
547
|
+
${E("lg","p")}
|
|
548
548
|
border
|
|
549
549
|
border-line-default
|
|
550
550
|
${J("lg")}
|
|
551
551
|
bg-surface-base
|
|
552
|
-
`,children:
|
|
552
|
+
`,children:b.content}),n.jsxs("div",{className:`flex justify-between mt-4 ${E("base","gap")}`,children:[n.jsx(Z,{variant:"outline",onClick:v,disabled:j,children:"Previous"}),n.jsx(Z,{variant:"primary",onClick:x,children:C?"Complete":"Next"})]})]})]}):n.jsxs("div",{className:`space-y-6 ${u}`,children:[n.jsx("div",{className:"flex items-center",children:e.map((g,y)=>{const N=g.status||h(y),_=y===m;return n.jsxs("div",{className:"flex items-center flex-1",children:[n.jsxs("div",{className:"flex flex-col items-center flex-1",children:[n.jsx("button",P(T({type:"button",onClick:()=>k(y),disabled:!o||g.disabled},N==="pending"?{"data-marker":"pending"}:{}),{className:`
|
|
553
553
|
flex
|
|
554
554
|
items-center
|
|
555
555
|
justify-center
|
|
@@ -558,21 +558,21 @@ React keys must be passed directly to JSX without using spread:
|
|
|
558
558
|
${J("full")}
|
|
559
559
|
border-2
|
|
560
560
|
${he("base")}
|
|
561
|
-
${N==="completed"?"bg-success border-success text-fg-inverse":N==="active"?"bg-surface-brand border-line-brand text-fg-inverse":N==="error"?"bg-error border-error text-fg-inverse":"bg-surface-base border-line-emphasis text-fg-quaternary"}
|
|
562
|
-
${!o||
|
|
563
|
-
`,children:N==="completed"?n.jsx(
|
|
561
|
+
${N==="completed"?"bg-success border-success text-fg-inverse":N==="active"?"bg-surface-brand-strong border-line-brand text-fg-inverse":N==="error"?"bg-error border-error text-fg-inverse":"bg-surface-base border-line-emphasis text-fg-quaternary"}
|
|
562
|
+
${!o||g.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"}
|
|
563
|
+
`,children:N==="completed"?n.jsx(ns,{className:"h-5 w-5"}):i?y+1:null})),n.jsxs("div",{className:`mt-2 text-center ${E("sm","px")}`,children:[n.jsx("p",{className:`
|
|
564
564
|
text-sm
|
|
565
565
|
font-medium
|
|
566
|
-
${
|
|
567
|
-
`,children:
|
|
566
|
+
${_?"text-fg-brand-emphasis":"text-fg-secondary"}
|
|
567
|
+
`,children:g.title}),g.description&&n.jsx("p",{className:"text-xs text-fg-tertiary mt-1",children:g.description})]})]}),y<e.length-1&&n.jsx("div",{className:`flex-1 mx-2 ${E("base","mx")}`,children:n.jsx(ys,{className:`
|
|
568
568
|
${N==="completed"?"border-success":"border-line-emphasis"}
|
|
569
|
-
`})})]},
|
|
570
|
-
${
|
|
569
|
+
`})})]},g.id)})}),n.jsx("div",{className:`
|
|
570
|
+
${E("lg","p")}
|
|
571
571
|
border
|
|
572
572
|
border-line-default
|
|
573
573
|
${J("lg")}
|
|
574
574
|
bg-surface-base
|
|
575
|
-
`,children:
|
|
575
|
+
`,children:b.content}),n.jsxs("div",{className:`flex justify-between ${E("base","gap")}`,children:[n.jsx(Z,{variant:"outline",onClick:v,disabled:j,children:"Previous"}),n.jsx(Z,{variant:"primary",onClick:x,children:C?"Complete":"Next"})]})]})}function Qd({items:e,orientation:t="vertical",className:r=""}){return t==="horizontal"?n.jsx("div",{className:`flex items-start ${r}`,children:e.map((s,a)=>{const o=s.status||(a===0?"active":a<e.findIndex(c=>c.status==="active")?"completed":"default"),i=a===e.length-1;return n.jsx("div",{className:"flex items-start flex-1",children:n.jsxs("div",{className:"flex flex-col items-center flex-1",children:[n.jsx("div",P(T({},o==="default"?{"data-marker":"pending"}:{}),{className:`
|
|
576
576
|
flex
|
|
577
577
|
items-center
|
|
578
578
|
justify-center
|
|
@@ -580,13 +580,13 @@ React keys must be passed directly to JSX without using spread:
|
|
|
580
580
|
h-10
|
|
581
581
|
${J("full")}
|
|
582
582
|
border-2
|
|
583
|
-
${o==="completed"?"bg-success border-success text-fg-inverse":o==="active"?"bg-surface-brand border-line-brand text-fg-inverse":o==="error"?"bg-error border-error text-fg-inverse":"bg-surface-base border-line-emphasis text-fg-quaternary"}
|
|
584
|
-
`,children:s.icon||(o==="completed"?n.jsx(
|
|
583
|
+
${o==="completed"?"bg-success border-success text-fg-inverse":o==="active"?"bg-surface-brand-strong border-line-brand text-fg-inverse":o==="error"?"bg-error border-error text-fg-inverse":"bg-surface-base border-line-emphasis text-fg-quaternary"}
|
|
584
|
+
`,children:s.icon||(o==="completed"?n.jsx(dr,{className:"h-4 w-4"}):a+1)})),!i&&n.jsx("div",{className:`
|
|
585
585
|
w-full
|
|
586
586
|
h-0.5
|
|
587
587
|
mt-2
|
|
588
588
|
${o==="completed"?"bg-success":"bg-line-emphasis"}
|
|
589
|
-
`}),n.jsxs("div",{className:`mt-4 text-center ${
|
|
589
|
+
`}),n.jsxs("div",{className:`mt-4 text-center ${E("base","px")}`,children:[s.timestamp&&n.jsx("p",{className:"text-xs text-fg-tertiary mb-1",children:s.timestamp}),n.jsx("h3",{className:"text-sm font-semibold text-fg-primary",children:s.title}),s.description&&n.jsx("p",{className:"text-xs text-fg-secondary mt-1",children:s.description}),s.content&&n.jsx("div",{className:"mt-2",children:s.content})]})]})},s.id)})}):n.jsx("div",{className:`space-y-0 ${r}`,children:e.map((s,a)=>{const o=s.status||(a===0?"active":a<e.findIndex(c=>c.status==="active")?"completed":"default"),i=a===e.length-1;return n.jsxs("div",{className:"flex items-start gap-4",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("div",P(T({},o==="default"?{"data-marker":"pending"}:{}),{className:`
|
|
590
590
|
flex
|
|
591
591
|
items-center
|
|
592
592
|
justify-center
|
|
@@ -594,8 +594,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
594
594
|
h-10
|
|
595
595
|
${J("full")}
|
|
596
596
|
border-2
|
|
597
|
-
${o==="completed"?"bg-success border-success text-fg-inverse":o==="active"?"bg-surface-brand border-line-brand text-fg-inverse":o==="error"?"bg-error border-error text-fg-inverse":"bg-surface-base border-line-emphasis text-fg-quaternary"}
|
|
598
|
-
`,children:s.icon||(o==="completed"?n.jsx(
|
|
597
|
+
${o==="completed"?"bg-success border-success text-fg-inverse":o==="active"?"bg-surface-brand-strong border-line-brand text-fg-inverse":o==="error"?"bg-error border-error text-fg-inverse":"bg-surface-base border-line-emphasis text-fg-quaternary"}
|
|
598
|
+
`,children:s.icon||(o==="completed"?n.jsx(dr,{className:"h-4 w-4"}):a+1)})),!i&&n.jsx("div",{className:`
|
|
599
599
|
w-0.5
|
|
600
600
|
flex-1
|
|
601
601
|
min-h-16
|
|
@@ -605,7 +605,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
605
605
|
text-base
|
|
606
606
|
font-semibold
|
|
607
607
|
${o==="active"?"text-fg-brand-emphasis":"text-fg-primary"}
|
|
608
|
-
`,children:s.title}),s.description&&n.jsx("p",{className:"text-sm text-fg-secondary mt-1",children:s.description}),s.content&&n.jsx("div",{className:"mt-3",children:s.content})]})]},s.id)})})}function eu({items:e,open:t,defaultOpen:r=!1,onOpenChange:s,trigger:a,placeholder:o="Type a command or search...",emptyMessage:i="No commands found",className:c=""}){const[u,d]=l.useState(r),[f,p]=l.useState(""),[m,h]=l.useState(0),x=l.useRef(null),
|
|
608
|
+
`,children:s.title}),s.description&&n.jsx("p",{className:"text-sm text-fg-secondary mt-1",children:s.description}),s.content&&n.jsx("div",{className:"mt-3",children:s.content})]})]},s.id)})})}function eu({items:e,open:t,defaultOpen:r=!1,onOpenChange:s,trigger:a,placeholder:o="Type a command or search...",emptyMessage:i="No commands found",className:c=""}){const[u,d]=l.useState(r),[f,p]=l.useState(""),[m,h]=l.useState(0),x=l.useRef(null),v=l.useRef(null),k=t!==void 0,b=k?t:u,j=e.filter(S=>{var I,L;if(!f)return!0;const M=f.toLowerCase(),F=S.label.toLowerCase().includes(M),A=(I=S.description)==null?void 0:I.toLowerCase().includes(M),R=(L=S.keywords)==null?void 0:L.some(z=>z.toLowerCase().includes(M));return F||A||R}),C=j.reduce((S,M)=>{const F=M.group||"Other";return S[F]||(S[F]=[]),S[F].push(M),S},{}),g=l.useCallback(S=>{k||d(S),s==null||s(S),S&&(p(""),h(0),setTimeout(()=>{var M;return(M=x.current)==null?void 0:M.focus()},0))},[k,s]),y=S=>{S.action(),g(!1)},N=S=>{if(S.key==="Escape"){g(!1);return}if(S.key==="ArrowDown"){S.preventDefault(),h(M=>Math.min(M+1,j.length-1));return}if(S.key==="ArrowUp"){S.preventDefault(),h(M=>Math.max(M-1,0));return}if(S.key==="Enter"){S.preventDefault(),j[m]&&y(j[m]);return}};l.useEffect(()=>{if(v.current&&m>=0){const S=v.current.querySelector(`[data-index="${m}"]`);S&&typeof S.scrollIntoView=="function"&&S.scrollIntoView({block:"nearest",behavior:"smooth"})}},[m]),l.useEffect(()=>{h(0)},[f]),l.useEffect(()=>{const S=M=>{(M.metaKey||M.ctrlKey)&&M.key==="k"&&(M.preventDefault(),g(!b))};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[b,g]);const _=b?n.jsx("div",{className:`
|
|
609
609
|
fixed
|
|
610
610
|
inset-0
|
|
611
611
|
${ue("modal-backdrop")}
|
|
@@ -615,10 +615,10 @@ React keys must be passed directly to JSX without using spread:
|
|
|
615
615
|
justify-center
|
|
616
616
|
pt-[20vh]
|
|
617
617
|
${he("base")}
|
|
618
|
-
`,onClick:()=>
|
|
618
|
+
`,onClick:()=>g(!1),children:n.jsxs("div",{className:`
|
|
619
619
|
w-full
|
|
620
620
|
max-w-2xl
|
|
621
|
-
${
|
|
621
|
+
${E("base","mx")}
|
|
622
622
|
bg-surface-overlay
|
|
623
623
|
${J("lg")}
|
|
624
624
|
${Se("xl")}
|
|
@@ -629,61 +629,61 @@ React keys must be passed directly to JSX without using spread:
|
|
|
629
629
|
flex
|
|
630
630
|
items-center
|
|
631
631
|
gap-3
|
|
632
|
-
${
|
|
632
|
+
${E("base","p")}
|
|
633
633
|
border-b
|
|
634
634
|
border-line-default
|
|
635
|
-
`,children:[n.jsx(
|
|
635
|
+
`,children:[n.jsx(as,{className:"h-5 w-5 text-fg-secondary"}),n.jsx(ke,{ref:x,value:f,onChange:S=>p(S.target.value),onKeyDown:N,placeholder:o,className:"flex-1 border-0 focus:ring-0",autoFocus:!0}),n.jsxs("div",{className:`
|
|
636
636
|
flex
|
|
637
637
|
items-center
|
|
638
638
|
gap-1
|
|
639
|
-
${
|
|
640
|
-
${
|
|
639
|
+
${E("sm","px")}
|
|
640
|
+
${E("xs","py")}
|
|
641
641
|
${J("sm")}
|
|
642
642
|
bg-surface-muted
|
|
643
643
|
text-xs
|
|
644
644
|
text-fg-tertiary
|
|
645
|
-
`,children:[n.jsx(
|
|
645
|
+
`,children:[n.jsx(Ol,{className:"h-3 w-3"}),n.jsx("span",{children:"K"})]})]}),n.jsx("div",{ref:v,className:`
|
|
646
646
|
max-h-96
|
|
647
647
|
overflow-y-auto
|
|
648
|
-
${
|
|
648
|
+
${E("sm","py")}
|
|
649
649
|
`,children:Object.keys(C).length===0?n.jsx("div",{className:`
|
|
650
|
-
${
|
|
650
|
+
${E("lg","p")}
|
|
651
651
|
text-center
|
|
652
652
|
text-sm
|
|
653
653
|
text-fg-secondary
|
|
654
|
-
`,children:i}):Object.entries(C).map(([S,
|
|
655
|
-
${
|
|
656
|
-
${
|
|
654
|
+
`,children:i}):Object.entries(C).map(([S,M])=>n.jsxs("div",{children:[S!=="Other"&&n.jsx("div",{className:`
|
|
655
|
+
${E("sm","px")}
|
|
656
|
+
${E("xs","py")}
|
|
657
657
|
text-xs
|
|
658
658
|
font-semibold
|
|
659
659
|
text-fg-tertiary
|
|
660
660
|
uppercase
|
|
661
661
|
tracking-wider
|
|
662
|
-
`,children:S}),
|
|
662
|
+
`,children:S}),M.map((F,A)=>{const R=j.indexOf(F),I=R===m;return n.jsxs("button",{type:"button","data-index":R,onClick:()=>y(F),className:`
|
|
663
663
|
w-full
|
|
664
664
|
flex
|
|
665
665
|
items-center
|
|
666
666
|
gap-3
|
|
667
|
-
${
|
|
668
|
-
${
|
|
667
|
+
${E("base","px")}
|
|
668
|
+
${E("md","py")}
|
|
669
669
|
text-left
|
|
670
670
|
${he("base")}
|
|
671
|
-
${
|
|
672
|
-
`,children:[
|
|
673
|
-
${
|
|
674
|
-
`,children:
|
|
671
|
+
${I?"bg-surface-brand-muted":"hover:bg-surface-hover"}
|
|
672
|
+
`,children:[F.icon&&n.jsx("div",{className:`
|
|
673
|
+
${I?"text-fg-brand-emphasis":"text-fg-secondary"}
|
|
674
|
+
`,children:F.icon}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:`
|
|
675
675
|
text-sm
|
|
676
676
|
font-medium
|
|
677
|
-
${
|
|
678
|
-
`,children:
|
|
679
|
-
`),Ne=new Blob([
|
|
677
|
+
${I?"text-fg-brand-emphasis":"text-fg-primary"}
|
|
678
|
+
`,children:F.label}),F.description&&n.jsx("div",{className:`text-xs ${I?"text-fg-secondary":"text-fg-tertiary"} ${E("0.5","mt")}`,children:F.description})]})]},F.id)})]},S))})]})}):null;return n.jsxs(n.Fragment,{children:[a?n.jsx("div",{onClick:()=>g(!0),children:a}):null,typeof window!="undefined"&&Ue.createPortal(_,document.body)]})}function tu({columns:e,data:t,loading:r=!1,onSort:s,sortColumn:a,sortDirection:o,multiSort:i=!1,groups:c=[],onGroupChange:u,groupable:d=!1,resizable:f=!0,reorderable:p=!1,onColumnReorder:m,columnWidths:h,onColumnResize:x,selectable:v=!1,selectedRows:k,onSelectionChange:b,rowId:j,exportable:C=!1,onExport:g,exportFormats:y=["csv","xlsx","json"],pagination:N,filters:_,actions:S,toolbarActions:M,virtualScrolling:F=!1,virtualScrollingOptions:A,emptyMessage:R,emptyStateTitle:I,emptyStateMessage:L,emptyStateIllustration:z,emptyStateAction:Y,className:q=""}){const[W,ae]=l.useState(c),[se,D]=l.useState(h||{}),B=l.useMemo(()=>e.map(U=>P(T({},U),{width:se[U.key]||U.defaultWidth})),[e,se]),X=U=>{g?g(U):U==="csv"?Q(t,e):U==="json"&&H(t)},Q=(U,V)=>{const ne=V.filter(Ae=>Ae.exportable!==!1).map(Ae=>Ae.label||Ae.key),oe=U.map(Ae=>V.filter(Ft=>Ft.exportable!==!1).map(Ft=>{const $e=Ae[Ft.key];return typeof $e=="string"&&$e.includes(",")?`"${$e}"`:$e})),ie=[ne.join(","),...oe.map(Ae=>Ae.join(","))].join(`
|
|
679
|
+
`),Ne=new Blob([ie],{type:"text/csv"}),ze=URL.createObjectURL(Ne),Lt=document.createElement("a");Lt.href=ze,Lt.download=`export-${Date.now()}.csv`,Lt.click(),URL.revokeObjectURL(ze)},H=U=>{const V=JSON.stringify(U,null,2),ne=new Blob([V],{type:"application/json"}),oe=URL.createObjectURL(ne),ie=document.createElement("a");ie.href=oe,ie.download=`export-${Date.now()}.json`,ie.click(),URL.revokeObjectURL(oe)};return n.jsxs("div",{className:`space-y-4 ${q}`,children:[(C||d||M)&&n.jsxs("div",{className:`
|
|
680
680
|
flex
|
|
681
681
|
items-center
|
|
682
682
|
justify-between
|
|
683
|
-
${
|
|
683
|
+
${E("base","p")}
|
|
684
684
|
bg-surface-base
|
|
685
685
|
border
|
|
686
686
|
border-line-default
|
|
687
687
|
rounded-lg
|
|
688
|
-
`,children:[n.jsx("div",{className:"flex items-center gap-2",children:d&&n.jsx(Z,{variant:"outline",size:"sm",leftIcon:n.jsx($l,{className:"h-4 w-4"}),children:"Group"})}),n.jsxs("div",{className:"flex items-center gap-2",children:[A,C&&n.jsx("div",{className:"flex items-center gap-1",children:v.map(U=>n.jsx(Z,{variant:"outline",size:"sm",leftIcon:n.jsx(Vl,{className:"h-4 w-4"}),onClick:()=>Y(U),children:U.toUpperCase()},U))})]})]}),n.jsx(je,{columns:B,data:t,loading:r,onSort:s,sortColumn:a,sortDirection:o,pagination:N,filters:D,selectable:y,selectedRows:k,onSelectionChange:g,rowId:j,actions:S,resizable:f,columnWidths:ne,onColumnResize:(U,V)=>{I(se=>P(R({},se),{[U]:V})),x==null||x(U,V)},virtualScrolling:M,virtualScrollingOptions:$,emptyMessage:L,emptyStateTitle:_,emptyStateMessage:F,emptyStateIllustration:z,emptyStateAction:X})]})}function ru({columns:e,data:t,searchPlaceholder:r="Search...",enableSearch:s=!0,itemsPerPage:a=10,enablePagination:o=!0,actions:i,onRowClick:c,loading:u=!1,emptyMessage:d="No data available"}){const[f,p]=l.useState(""),[m,h]=l.useState(1),x=l.useMemo(()=>e.map(b=>{if(b.accessor||b.header){const v=b.key||(typeof b.accessor=="string"?b.accessor:String(b.accessor)),N=b.label||b.header||"";return P(R({},b),{key:v,label:N})}return b}),[e]),y=l.useMemo(()=>{if(!f.trim())return t;const b=f.toLowerCase();return t.filter(v=>x.some(N=>{const D=v[String(N.key)];return String(D).toLowerCase().includes(b)}))},[t,f,x]),k=l.useMemo(()=>{if(!o)return y;const b=(m-1)*a,v=b+a;return y.slice(b,v)},[y,m,a,o]),g=o?Math.ceil(y.length/a):1,j=b=>{h(b)},C=b=>{p(b),h(1)};return n.jsx(ot,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(Tt,{spacing:"md",children:[n.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s&&n.jsx("div",{className:"flex-1 max-w-md",children:n.jsx(Mr,{placeholder:r,value:f,onSearch:C})}),i&&n.jsx("div",{className:"flex gap-2",children:i})]}),n.jsx(je,{columns:x,data:k,loading:u,emptyMessage:d,onRowClick:c?b=>{const v=y.findIndex(N=>N===b);c(b,v>=0?v:k.findIndex(N=>N===b))}:void 0}),o&&g>1&&n.jsx("div",{className:"flex justify-center",children:n.jsx(Ma,{currentPage:m,totalPages:g,onPageChange:j})}),s&&n.jsxs("div",{className:"text-sm text-fg-secondary text-center",children:["Showing ",k.length," of ",y.length," results"]})]})})}function su({steps:e,onComplete:t,allowBackNavigation:r=!0,showStepNumbers:s=!0}){const[a,o]=l.useState(0),[i,c]=l.useState({}),[u,d]=l.useState({}),f=()=>tr(null,null,function*(){const k=e[a];if(k.validate&&!(yield k.validate())){d(P(R({},u),{[a]:!0}));return}d(P(R({},u),{[a]:!1})),k.onSubmit&&(yield k.onSubmit(i)),a<e.length-1?o(a+1):t&&t(i)}),p=()=>{a>0&&r&&(o(a-1),d(P(R({},u),{[a-1]:!1})))},m=k=>{r&&k<a&&o(k)},h=e[a],x=a===e.length-1,y=u[a]===!0;return n.jsx(ot,{maxWidth:"lg",paddingX:"base",paddingY:"lg",children:n.jsxs(Tt,{spacing:"lg",children:[n.jsx(Co,{steps:e.map((k,g)=>({id:k.id,title:k.title,content:k.content,description:k.description,status:g<a?"completed":g===a?y?"error":"active":"pending"})),currentStep:a,onStepChange:m,allowNavigation:r}),n.jsx("div",{className:"bg-surface-base rounded-lg border p-6",children:n.jsxs(Tt,{spacing:"md",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-semibold",children:h.title}),h.description&&n.jsx("p",{className:"text-fg-secondary mt-1",children:h.description})]}),y&&n.jsx("div",{className:"bg-error-bg border border-error-border rounded p-3",children:n.jsx("p",{className:"text-sm text-fg-error",children:"Please fix the errors before proceeding."})}),n.jsx("div",{className:"min-h-48",children:h.fields}),n.jsxs("div",{className:"flex justify-between pt-4 border-t",children:[n.jsx(Z,{variant:"outline",onClick:p,disabled:a===0,children:"Back"}),n.jsx(Z,{variant:"primary",onClick:f,children:x?"Complete":"Next"})]})]})})]})})}function nu({items:e,searchFn:t,filterFn:r,renderItem:s,filters:a=[],searchPlaceholder:o="Search...",emptyMessage:i="No results found",showResultsCount:c=!0}){const[u,d]=l.useState(""),[f,p]=l.useState({}),m=l.useMemo(()=>{let k=e;if(u.trim()&&t){const g=u.toLowerCase();k=k.filter(j=>t(g,j))}return r&&Object.keys(f).length>0&&(k=k.filter(g=>r(f,g))),k},[e,u,f,t,r]),h=(k,g)=>{p(j=>P(R({},j),{[k]:g}))},x=()=>{p({}),d("")},y=u.trim().length>0||Object.keys(f).length>0;return n.jsx(ot,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(Tt,{spacing:"md",children:[n.jsx(ur,{padding:"medium",children:n.jsxs(Tt,{spacing:"md",children:[n.jsx("div",{children:n.jsx(Mr,{placeholder:o,value:u,onSearch:d})}),a.length>0&&n.jsx("div",{className:"flex flex-wrap gap-2",children:a.map(k=>{var g;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs(Be,{className:"text-fg-secondary text-sm",children:[k.label,":"]}),n.jsxs("select",{className:"px-3 py-1 border rounded text-sm",value:String(f[k.id]||""),onChange:j=>h(k.id,j.target.value||void 0),children:[n.jsx("option",{value:"",children:"All"}),(g=k.options)==null?void 0:g.map(j=>n.jsx("option",{value:String(j.value||""),children:j.label},j.id))]})]},k.id)})}),y&&n.jsx("div",{children:n.jsx(Z,{variant:"outline",size:"sm",onClick:x,children:"Clear Filters"})})]})}),c&&n.jsxs("div",{className:"text-sm text-fg-secondary",children:["Showing ",m.length," of ",e.length," results",y&&" (filtered)"]}),m.length===0?n.jsx(ur,{padding:"large",children:n.jsx("div",{className:"text-center text-fg-secondary",children:n.jsx(Be,{children:i})})}):n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:m.map((k,g)=>n.jsx("div",{children:s(k,g)},g))})]})})}function au({sidebar:e,children:t,header:r,footer:s,defaultCollapsed:a=!1,sidebarProps:o}){return n.jsxs("div",{className:"flex h-screen overflow-hidden",children:[e&&n.jsx(Ce,P(R({defaultCollapsed:a},o),{children:e})),n.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[r&&n.jsx("header",{className:"border-b bg-surface-base",children:n.jsx(ot,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:r})}),n.jsx("main",{className:"flex-1 overflow-y-auto",children:n.jsx(ot,{maxWidth:"xl",paddingX:"base",paddingY:"base",children:t})}),s&&n.jsx("footer",{className:"border-t bg-surface-base",children:n.jsx(ot,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:s})})]})]})}exports.AMBER=st;exports.Accordion=pd;exports.AlertDialog=Gd;exports.AppProvider=hl;exports.Autocomplete=za;exports.AutocompleteList=Tr;exports.AutocompleteOption=Cs;exports.Avatar=dr;exports.AvatarGroup=Ec;exports.BLUE=Pn;exports.BRAND_COLORS=ii;exports.BREAKPOINT_TOKENS=vr;exports.Badge=ma;exports.Breadcrumb=Ea;exports.BreakpointTokenFactory=Nt;exports.Button=Z;exports.COLOR_SCALES=Bo;exports.CYAN=et;exports.Card=ur;exports.Checkbox=jr;exports.Chip=ys;exports.Collapsible=ga;exports.ColorPicker=dd;exports.CommandPalette=eu;exports.ConfigProvider=la;exports.DashboardLayout=au;exports.DataGrid=tu;exports.DataTablePattern=ru;exports.DatePicker=nd;exports.DatePickerCalendar=Ss;exports.DatePickerInput=Ns;exports.DatePickerProvider=os;exports.Dialog=Te;exports.DialogClose=No;exports.DialogContent=Zs;exports.DialogContext=wr;exports.DialogDescription=jo;exports.DialogFooter=en;exports.DialogHeader=Qs;exports.DialogProvider=ms;exports.DialogTitle=ko;exports.DialogTrigger=wo;exports.Drawer=qt;exports.DrawerContent=Es;exports.DrawerFooter=Ha;exports.DrawerHeader=Wa;exports.Dropdown=Aa;exports.EMERALD=rt;exports.EmptyState=Ta;exports.ErrorMessage=ha;exports.FONT_FAMILY_TOKENS=Oo;exports.FONT_WEIGHT_TOKENS=Vo;exports.FUCHSIA=zn;exports.FileUpload=ld;exports.Form=Tc;exports.FormContext=Nr;exports.FormField=Ac;exports.FormProvider=wa;exports.FormWizardPattern=su;exports.GRAY=In;exports.GREEN=Dn;exports.Header=bt;exports.HeaderActions=Xa;exports.HeaderComponent=bt;exports.HeaderHamburger=Ja;exports.HeaderLogo=Ka;exports.HeaderMobileMenu=Za;exports.HeaderNavigation=Ya;exports.HeaderProvider=is;exports.INDIGO=Ze;exports.Info=xl;exports.Input=ke;exports.LIME=Hn;exports.Label=Mt;exports.LoginBox=vd;exports.Menu=Gt;exports.MenuContent=Ua;exports.MenuItem=As;exports.MenuSeparator=qa;exports.MenuTrigger=Ts;exports.Modal=yd;exports.MultiSelect=Oa;exports.NavLink=gs;exports.Navbar=xt;exports.NavbarContext=_r;exports.NavbarGroup=mo;exports.NavbarItem=uo;exports.NavbarSeparator=fo;exports.NavbarToggle=br;exports.Navigation=Qa;exports.NavigationComponent=Qa;exports.ORANGE=Fn;exports.PINK=On;exports.PRIMITIVE_COLORS=cs;exports.PURPLE=Vn;exports.PageHeader=eo;exports.PageHeaderComponent=eo;exports.Pagination=Ma;exports.Popover=$s;exports.Progress=xs;exports.RED=_n;exports.ROSE=nt;exports.Radio=xa;exports.Rating=id;exports.SEMANTIC_COLORS=Ko;exports.SEMANTIC_COLORS_DARK=xr;exports.SEMANTIC_COLORS_LIGHT=Ut;exports.SIDEBAR_TOKENS=Je;exports.SKY=at;exports.SLATE=tt;exports.SPACING_TOKENS=gr;exports.SearchAndFilterPattern=nu;exports.SearchInput=Mr;exports.Select=kr;exports.Separator=vs;exports.SideNavbar=Ce;exports.SideNavbarBackdrop=Xs;exports.SideNavbarConfigContext=Ir;exports.SideNavbarConfigProvider=Hs;exports.SideNavbarProvider=Us;exports.SideNavbarResizeHandle=Ys;exports.SideNavbarRoot=co;exports.SideNavbarStateContext=Dr;exports.SideNavbarStateProvider=Bs;exports.SideNavbarThemeContext=Rr;exports.SideNavbarThemeProvider=Ws;exports.SideNavbarToggle=Js;exports.SideNavbarToggleContext=Fr;exports.Sidebar=ct;exports.SidebarContent=bo;exports.SidebarContext=zr;exports.SidebarFooter=go;exports.SidebarGroup=xo;exports.SidebarHeader=ho;exports.SidebarSlot=vo;exports.SidebarSlotContent=yo;exports.SidebarSlotContext=Lr;exports.SidebarSlotProvider=lo;exports.Skeleton=ba;exports.Slider=ya;exports.SpacingTokenFactory=pe;exports.Spinner=bs;exports.Stepper=Co;exports.Switch=va;exports.TEAL=Wn;exports.TYPOGRAPHY_TOKENS=ht;exports.Table=je;exports.TableActions=_s;exports.TableBody=zs;exports.TableCell=Fs;exports.TableContext=Ar;exports.TableEmptyState=Ps;exports.TableFilters=Os;exports.TableHeader=Ls;exports.TableHeaderCell=Is;exports.TableHeaderRow=Ds;exports.TablePagination=Vs;exports.TableProvider=ls;exports.TableRow=pr;exports.Tabs=od;exports.TabsContent=Pa;exports.TabsContext=Cr;exports.TabsList=Fa;exports.TabsProvider=La;exports.TabsTrigger=_a;exports.Text=Be;exports.Textarea=pa;exports.ThemeProvider=oa;exports.TimePicker=cd;exports.Timeline=Qd;exports.Toast=So;exports.ToastContainer=Jd;exports.ToastContext=yr;exports.ToastProvider=ca;exports.Tooltip=Bt;exports.TypographyTokenFactory=fe;exports.VIOLET=Qe;exports.YELLOW=Ln;exports.blendColors=ds;exports.clampWidth=ir;exports.cn=w;exports.darken=oi;exports.defaultConfigValues=ye;exports.defaultThemeValues=$t;exports.formatKeyboardShortcut=Ad;exports.getAnimation=el;exports.getAnimationClass=he;exports.getBreakpoint=li;exports.getColor=Xo;exports.getColorClass=Zo;exports.getContrastColor=ni;exports.getFocusColorClass=ti;exports.getFocusRingClass=ri;exports.getHoverColorClass=ei;exports.getMediaQuery=ci;exports.getNestedIndentClass=Po;exports.getOpacity=sl;exports.getOpacityClass=nl;exports.getPrimitiveColor=At;exports.getPrimitiveColorPalette=Go;exports.getSemanticColor=Wt;exports.getSemanticColorClass=Qo;exports.getSemanticColorRole=Yo;exports.getSemanticColorValue=Jo;exports.getSpacing=zo;exports.getSpacingClass=T;exports.getTransitionClass=tl;exports.getTypography=Wo;exports.getTypographyClasses=ce;exports.getTypographyLineHeight=Ho;exports.getTypographySize=re;exports.getTypographySizeFromFontSize=ve;exports.getTypographyWeight=Fe;exports.getTypographyWeightFromFontWeight=Et;exports.getZIndex=rl;exports.getZIndexClass=ue;exports.isLightColor=Bn;exports.lighten=ai;exports.parseKeyboardShortcut=so;exports.parseWidthToPixels=hr;exports.useApp=bl;exports.useColumnResizing=Cd;exports.useConfig=dl;exports.useDialogContext=Dt;exports.useDialogContextOptional=fl;exports.useFocusManagement=oo;exports.useFormContext=ws;exports.useFormContextOptional=Mc;exports.useFormFieldArray=Jc;exports.useGroupState=Hd;exports.useHeaderContext=Rs;exports.useKeyboardShortcut=io;exports.useNavLink=fa;exports.useNavbar=zd;exports.useNavbarRequired=Pr;exports.useResize=no;exports.useResponsiveSidebar=ao;exports.useSideNavbarCombined=qd;exports.useSideNavbarConfig=Ed;exports.useSideNavbarConfigRequired=gt;exports.useSideNavbarContent=Ud;exports.useSideNavbarNavigation=Bd;exports.useSideNavbarState=Md;exports.useSideNavbarStateRequired=lt;exports.useSideNavbarTheme=$d;exports.useSideNavbarThemeRequired=it;exports.useSideNavbarToggleContext=Rd;exports.useSideNavbarToggleContextRequired=Ks;exports.useSidebar=po;exports.useSidebarRequired=Kt;exports.useSidebarSlot=qs;exports.useSidebarSlotRequired=Gs;exports.useTableContext=Pe;exports.useTableContextOptional=wd;exports.useTabsContext=$r;exports.useTabsContextOptional=ad;exports.useTheme=ll;exports.useToast=Zd;exports.useToastContext=fs;exports.useToastContextOptional=ul;exports.useVirtualScrolling=to;exports.validateWidthBounds=ro;exports.withOpacity=si;
|
|
688
|
+
`,children:[n.jsx("div",{className:"flex items-center gap-2",children:d&&n.jsx(Z,{variant:"outline",size:"sm",leftIcon:n.jsx(El,{className:"h-4 w-4"}),children:"Group"})}),n.jsxs("div",{className:"flex items-center gap-2",children:[M,C&&n.jsx("div",{className:"flex items-center gap-1",children:y.map(U=>n.jsx(Z,{variant:"outline",size:"sm",leftIcon:n.jsx(Wl,{className:"h-4 w-4"}),onClick:()=>X(U),children:U.toUpperCase()},U))})]})]}),n.jsx(je,{columns:B,data:t,loading:r,onSort:s,sortColumn:a,sortDirection:o,pagination:N,filters:_,selectable:v,selectedRows:k,onSelectionChange:b,rowId:j,actions:S,resizable:f,columnWidths:se,onColumnResize:(U,V)=>{D(ne=>P(T({},ne),{[U]:V})),x==null||x(U,V)},virtualScrolling:F,virtualScrollingOptions:A,emptyMessage:R,emptyStateTitle:I,emptyStateMessage:L,emptyStateIllustration:z,emptyStateAction:Y})]})}function ru({columns:e,data:t,searchPlaceholder:r="Search...",enableSearch:s=!0,itemsPerPage:a=10,enablePagination:o=!0,actions:i,onRowClick:c,loading:u=!1,emptyMessage:d="No data available"}){const[f,p]=l.useState(""),[m,h]=l.useState(1),x=l.useMemo(()=>e.map(g=>{if(g.accessor||g.header){const y=g.key||(typeof g.accessor=="string"?g.accessor:String(g.accessor)),N=g.label||g.header||"";return P(T({},g),{key:y,label:N})}return g}),[e]),v=l.useMemo(()=>{if(!f.trim())return t;const g=f.toLowerCase();return t.filter(y=>x.some(N=>{const _=y[String(N.key)];return String(_).toLowerCase().includes(g)}))},[t,f,x]),k=l.useMemo(()=>{if(!o)return v;const g=(m-1)*a,y=g+a;return v.slice(g,y)},[v,m,a,o]),b=o?Math.ceil(v.length/a):1,j=g=>{h(g)},C=g=>{p(g),h(1)};return n.jsx(ot,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(Tt,{spacing:"md",children:[n.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s&&n.jsx("div",{className:"flex-1 max-w-md",children:n.jsx(Tr,{placeholder:r,value:f,onSearch:C})}),i&&n.jsx("div",{className:"flex gap-2",children:i})]}),n.jsx(je,{columns:x,data:k,loading:u,emptyMessage:d,onRowClick:c?g=>{const y=v.findIndex(N=>N===g);c(g,y>=0?y:k.findIndex(N=>N===g))}:void 0}),o&&b>1&&n.jsx("div",{className:"flex justify-center",children:n.jsx(Ta,{currentPage:m,totalPages:b,onPageChange:j})}),s&&n.jsxs("div",{className:"text-sm text-fg-secondary text-center",children:["Showing ",k.length," of ",v.length," results"]})]})})}function su({steps:e,onComplete:t,allowBackNavigation:r=!0,showStepNumbers:s=!0}){const[a,o]=l.useState(0),[i,c]=l.useState({}),[u,d]=l.useState({}),f=()=>rr(null,null,function*(){const k=e[a];if(k.validate&&!(yield k.validate())){d(P(T({},u),{[a]:!0}));return}d(P(T({},u),{[a]:!1})),k.onSubmit&&(yield k.onSubmit(i)),a<e.length-1?o(a+1):t&&t(i)}),p=()=>{a>0&&r&&(o(a-1),d(P(T({},u),{[a-1]:!1})))},m=k=>{r&&k<a&&o(k)},h=e[a],x=a===e.length-1,v=u[a]===!0;return n.jsx(ot,{maxWidth:"lg",paddingX:"base",paddingY:"lg",children:n.jsxs(Tt,{spacing:"lg",children:[n.jsx($o,{steps:e.map((k,b)=>({id:k.id,title:k.title,content:k.content,description:k.description,status:b<a?"completed":b===a?v?"error":"active":"pending"})),currentStep:a,onStepChange:m,allowNavigation:r}),n.jsx("div",{className:"bg-surface-base rounded-lg border p-6",children:n.jsxs(Tt,{spacing:"md",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-semibold",children:h.title}),h.description&&n.jsx("p",{className:"text-fg-secondary mt-1",children:h.description})]}),v&&n.jsx("div",{className:"bg-error-bg border border-error-border rounded p-3",children:n.jsx("p",{className:"text-sm text-fg-error",children:"Please fix the errors before proceeding."})}),n.jsx("div",{className:"min-h-48",children:h.fields}),n.jsxs("div",{className:"flex justify-between pt-4 border-t",children:[n.jsx(Z,{variant:"outline",onClick:p,disabled:a===0,children:"Back"}),n.jsx(Z,{variant:"primary",onClick:f,children:x?"Complete":"Next"})]})]})})]})})}function nu({items:e,searchFn:t,filterFn:r,renderItem:s,filters:a=[],searchPlaceholder:o="Search...",emptyMessage:i="No results found",showResultsCount:c=!0}){const[u,d]=l.useState(""),[f,p]=l.useState({}),m=l.useMemo(()=>{let k=e;if(u.trim()&&t){const b=u.toLowerCase();k=k.filter(j=>t(b,j))}return r&&Object.keys(f).length>0&&(k=k.filter(b=>r(f,b))),k},[e,u,f,t,r]),h=(k,b)=>{p(j=>P(T({},j),{[k]:b}))},x=()=>{p({}),d("")},v=u.trim().length>0||Object.keys(f).length>0;return n.jsx(ot,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(Tt,{spacing:"md",children:[n.jsx(fr,{padding:"medium",children:n.jsxs(Tt,{spacing:"md",children:[n.jsx("div",{children:n.jsx(Tr,{placeholder:o,value:u,onSearch:d})}),a.length>0&&n.jsx("div",{className:"flex flex-wrap gap-2",children:a.map(k=>{var b;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs(Be,{className:"text-fg-secondary text-sm",children:[k.label,":"]}),n.jsxs("select",{className:"px-3 py-1 border rounded text-sm",value:String(f[k.id]||""),onChange:j=>h(k.id,j.target.value||void 0),children:[n.jsx("option",{value:"",children:"All"}),(b=k.options)==null?void 0:b.map(j=>n.jsx("option",{value:String(j.value||""),children:j.label},j.id))]})]},k.id)})}),v&&n.jsx("div",{children:n.jsx(Z,{variant:"outline",size:"sm",onClick:x,children:"Clear Filters"})})]})}),c&&n.jsxs("div",{className:"text-sm text-fg-secondary",children:["Showing ",m.length," of ",e.length," results",v&&" (filtered)"]}),m.length===0?n.jsx(fr,{padding:"large",children:n.jsx("div",{className:"text-center text-fg-secondary",children:n.jsx(Be,{children:i})})}):n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:m.map((k,b)=>n.jsx("div",{children:s(k,b)},b))})]})})}function au({sidebar:e,children:t,header:r,footer:s,defaultCollapsed:a=!1,sidebarProps:o}){return n.jsxs("div",{className:"flex h-screen overflow-hidden",children:[e&&n.jsx(Ce,P(T({defaultCollapsed:a},o),{children:e})),n.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[r&&n.jsx("header",{className:"border-b bg-surface-base",children:n.jsx(ot,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:r})}),n.jsx("main",{className:"flex-1 overflow-y-auto",children:n.jsx(ot,{maxWidth:"xl",paddingX:"base",paddingY:"base",children:t})}),s&&n.jsx("footer",{className:"border-t bg-surface-base",children:n.jsx(ot,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:s})})]})]})}exports.AMBER=st;exports.Accordion=pd;exports.AlertDialog=Gd;exports.AppProvider=bl;exports.Autocomplete=Oa;exports.AutocompleteList=Ar;exports.AutocompleteOption=$s;exports.Avatar=ur;exports.AvatarGroup=Mc;exports.BLUE=zn;exports.BRAND_COLORS=li;exports.BREAKPOINT_TOKENS=yr;exports.Badge=pa;exports.Breadcrumb=Ma;exports.BreakpointTokenFactory=St;exports.Button=Z;exports.COLOR_SCALES=Uo;exports.CYAN=et;exports.Card=fr;exports.Checkbox=Nr;exports.Chip=ws;exports.Collapsible=xa;exports.ColorPicker=dd;exports.CommandPalette=eu;exports.ConfigProvider=ca;exports.DashboardLayout=au;exports.DataGrid=tu;exports.DataTablePattern=ru;exports.DatePicker=nd;exports.DatePickerCalendar=Cs;exports.DatePickerInput=Ss;exports.DatePickerProvider=is;exports.Dialog=Te;exports.DialogClose=So;exports.DialogContent=Qs;exports.DialogContext=kr;exports.DialogDescription=No;exports.DialogFooter=tn;exports.DialogHeader=en;exports.DialogProvider=ps;exports.DialogTitle=jo;exports.DialogTrigger=ko;exports.Drawer=Gt;exports.DrawerContent=Ms;exports.DrawerFooter=Ba;exports.DrawerHeader=Ha;exports.Dropdown=Ra;exports.EMERALD=rt;exports.EmptyState=Aa;exports.ErrorMessage=ba;exports.FONT_FAMILY_TOKENS=Vo;exports.FONT_WEIGHT_TOKENS=Wo;exports.FUCHSIA=On;exports.FileUpload=ld;exports.Form=Ac;exports.FormContext=Sr;exports.FormField=Rc;exports.FormProvider=ka;exports.FormWizardPattern=su;exports.GRAY=Dn;exports.GREEN=Ln;exports.Header=gt;exports.HeaderActions=Ja;exports.HeaderComponent=gt;exports.HeaderHamburger=Za;exports.HeaderLogo=Ya;exports.HeaderMobileMenu=Qa;exports.HeaderNavigation=Xa;exports.HeaderProvider=ls;exports.INDIGO=Ze;exports.Info=vl;exports.Input=ke;exports.LIME=Bn;exports.Label=Mt;exports.LoginBox=vd;exports.Menu=Kt;exports.MenuContent=qa;exports.MenuItem=Rs;exports.MenuSeparator=Ga;exports.MenuTrigger=As;exports.Modal=yd;exports.MultiSelect=Va;exports.NavLink=xs;exports.Navbar=vt;exports.NavbarContext=Pr;exports.NavbarGroup=po;exports.NavbarItem=fo;exports.NavbarSeparator=mo;exports.NavbarToggle=gr;exports.Navigation=eo;exports.NavigationComponent=eo;exports.ORANGE=_n;exports.PINK=Vn;exports.PRIMITIVE_COLORS=ds;exports.PURPLE=Wn;exports.PageHeader=to;exports.PageHeaderComponent=to;exports.Pagination=Ta;exports.Popover=Es;exports.Progress=vs;exports.RED=Pn;exports.ROSE=nt;exports.Radio=va;exports.Rating=id;exports.SEMANTIC_COLORS=Yo;exports.SEMANTIC_COLORS_DARK=vr;exports.SEMANTIC_COLORS_LIGHT=qt;exports.SIDEBAR_TOKENS=Je;exports.SKY=at;exports.SLATE=tt;exports.SPACING_TOKENS=xr;exports.SearchAndFilterPattern=nu;exports.SearchInput=Tr;exports.Select=jr;exports.Separator=ys;exports.SideNavbar=Ce;exports.SideNavbarBackdrop=Js;exports.SideNavbarConfigContext=Dr;exports.SideNavbarConfigProvider=Bs;exports.SideNavbarProvider=qs;exports.SideNavbarResizeHandle=Xs;exports.SideNavbarRoot=uo;exports.SideNavbarStateContext=Lr;exports.SideNavbarStateProvider=Us;exports.SideNavbarThemeContext=Ir;exports.SideNavbarThemeProvider=Hs;exports.SideNavbarToggle=Zs;exports.SideNavbarToggleContext=_r;exports.Sidebar=ct;exports.SidebarContent=go;exports.SidebarContext=Or;exports.SidebarFooter=xo;exports.SidebarGroup=vo;exports.SidebarHeader=bo;exports.SidebarSlot=yo;exports.SidebarSlotContent=wo;exports.SidebarSlotContext=Fr;exports.SidebarSlotProvider=co;exports.Skeleton=ga;exports.Slider=wa;exports.SpacingTokenFactory=pe;exports.Spinner=gs;exports.Stepper=$o;exports.Switch=ya;exports.TEAL=Hn;exports.TYPOGRAPHY_TOKENS=bt;exports.Table=je;exports.TableActions=Ps;exports.TableBody=Os;exports.TableCell=_s;exports.TableContext=Rr;exports.TableEmptyState=zs;exports.TableFilters=Vs;exports.TableHeader=Fs;exports.TableHeaderCell=Ds;exports.TableHeaderRow=Ls;exports.TablePagination=Ws;exports.TableProvider=cs;exports.TableRow=hr;exports.Tabs=od;exports.TabsContent=za;exports.TabsContext=$r;exports.TabsList=_a;exports.TabsProvider=Fa;exports.TabsTrigger=Pa;exports.Text=Be;exports.Textarea=ha;exports.ThemeProvider=ia;exports.TimePicker=cd;exports.Timeline=Qd;exports.Toast=Co;exports.ToastContainer=Jd;exports.ToastContext=wr;exports.ToastProvider=da;exports.Tooltip=Ut;exports.TypographyTokenFactory=fe;exports.VIOLET=Qe;exports.YELLOW=Fn;exports.blendColors=us;exports.clampWidth=lr;exports.cn=w;exports.darken=ii;exports.defaultConfigValues=ye;exports.defaultThemeValues=$t;exports.formatKeyboardShortcut=Ad;exports.getAnimation=tl;exports.getAnimationClass=he;exports.getBreakpoint=ci;exports.getColor=Jo;exports.getColorClass=Qo;exports.getContrastColor=ai;exports.getFocusColorClass=ri;exports.getFocusRingClass=si;exports.getHoverColorClass=ti;exports.getMediaQuery=di;exports.getNestedIndentClass=zo;exports.getOpacity=nl;exports.getOpacityClass=al;exports.getPrimitiveColor=At;exports.getPrimitiveColorPalette=Ko;exports.getSemanticColor=Ht;exports.getSemanticColorClass=ei;exports.getSemanticColorRole=Xo;exports.getSemanticColorValue=Zo;exports.getSpacing=Oo;exports.getSpacingClass=E;exports.getTransitionClass=rl;exports.getTypography=Ho;exports.getTypographyClasses=ce;exports.getTypographyLineHeight=Bo;exports.getTypographySize=re;exports.getTypographySizeFromFontSize=ve;exports.getTypographyWeight=Fe;exports.getTypographyWeightFromFontWeight=Et;exports.getZIndex=sl;exports.getZIndexClass=ue;exports.isLightColor=Un;exports.lighten=oi;exports.parseKeyboardShortcut=no;exports.parseWidthToPixels=br;exports.useApp=gl;exports.useColumnResizing=Cd;exports.useConfig=ul;exports.useDialogContext=Dt;exports.useDialogContextOptional=ml;exports.useFocusManagement=io;exports.useFormContext=ks;exports.useFormContextOptional=Tc;exports.useFormFieldArray=Zc;exports.useGroupState=Hd;exports.useHeaderContext=Is;exports.useKeyboardShortcut=lo;exports.useNavLink=ma;exports.useNavbar=zd;exports.useNavbarRequired=zr;exports.useResize=ao;exports.useResponsiveSidebar=oo;exports.useSideNavbarCombined=qd;exports.useSideNavbarConfig=Ed;exports.useSideNavbarConfigRequired=xt;exports.useSideNavbarContent=Ud;exports.useSideNavbarNavigation=Bd;exports.useSideNavbarState=Md;exports.useSideNavbarStateRequired=lt;exports.useSideNavbarTheme=$d;exports.useSideNavbarThemeRequired=it;exports.useSideNavbarToggleContext=Rd;exports.useSideNavbarToggleContextRequired=Ys;exports.useSidebar=ho;exports.useSidebarRequired=Yt;exports.useSidebarSlot=Gs;exports.useSidebarSlotRequired=Ks;exports.useTableContext=Pe;exports.useTableContextOptional=wd;exports.useTabsContext=Er;exports.useTabsContextOptional=ad;exports.useTheme=cl;exports.useToast=Zd;exports.useToastContext=ms;exports.useToastContextOptional=fl;exports.useVirtualScrolling=ro;exports.validateWidthBounds=so;exports.withOpacity=ni;
|
|
689
689
|
//# sourceMappingURL=index.cjs.map
|