@domphy/ui 0.18.19 → 0.18.21
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/core-theme-ui.global.js +2 -2
- package/dist/core-theme-ui.global.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var zr=Object.defineProperty,Vr=Object.defineProperties;var Mr=Object.getOwnPropertyDescriptors;var Xo=Object.getOwnPropertySymbols;var _r=Object.prototype.hasOwnProperty,Rr=Object.prototype.propertyIsEnumerable;var Jo=(n,o,r)=>o in n?zr(n,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[o]=r,K=(n,o)=>{for(var r in o||(o={}))_r.call(o,r)&&Jo(n,r,o[r]);if(Xo)for(var r of Xo(o))Rr.call(o,r)&&Jo(n,r,o[r]);return n},Oe=(n,o)=>Vr(n,Mr(o));import{toState as Zo}from"@domphy/core";import{themeColor as Ge,themeSize as Ar,themeSpacing as Nr}from"@domphy/theme";function Al(n={}){var e,a;let o=Zo((e=n.color)!=null?e:"neutral","color"),r=Zo((a=n.accentColor)!=null?a:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>Ar(t),backgroundColor:t=>Ge(t),color:t=>Ge(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>Ge(t,"shift-7",o.get(t)),textUnderlineOffset:Nr(.72),cursor:"help","&:hover":{color:t=>Ge(t,"shift-11",r.get(t)),textDecorationColor:t=>Ge(t,"shift-9",r.get(t))}}}}import{toState as Qo}from"@domphy/core";import{themeColor as Jt,themeDensity as Hr,themeSpacing as en}from"@domphy/theme";function Fl(n={}){var a,t;let{type:o="single"}=n,r=Qo((a=n.color)!=null?a:"neutral","color"),e=Qo((t=n.accentColor)!=null?t:"primary","accentColor");return{_onMount:i=>{if(o!=="single")return;let s=i.domElement;if(!s)return;let l=p=>{let c=p.target.closest("summary");if(!c)return;let m=c.closest("details");!m||m.parentElement!==s||m.open||Array.from(s.querySelectorAll(":scope > details")).forEach(y=>{y!==m&&(y.open=!1)})};s.addEventListener("click",l),i.addHook("Remove",()=>s.removeEventListener("click",l))},style:{display:"flex",flexDirection:"column",borderRadius:i=>en(Hr(i)*1),outline:i=>`1px solid ${Jt(i,"shift-4",r.get(i))}`,outlineOffset:"-1px",overflow:"hidden","& > details":{borderBottom:i=>`1px solid ${Jt(i,"shift-4",r.get(i))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{outline:i=>`${en(.5)} solid ${Jt(i,"shift-6",e.get(i))}`}}}}import{toState as Br}from"@domphy/core";import{themeColor as Zt,themeDensity as tn,themeSize as Fr,themeSpacing as bt}from"@domphy/theme";function Yl(n={}){var r;let o=Br((r=n.color)!=null?r:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:bt(3),paddingBlock:e=>bt(tn(e)*2),paddingInline:e=>bt(tn(e)*4),boxShadow:e=>`inset ${bt(1)} 0 0 0 ${Zt(e,"shift-8",o.get(e))}`,backgroundColor:e=>Zt(e,"inherit",o.get(e)),color:e=>Zt(e,"shift-10",o.get(e)),fontSize:e=>Fr(e,"inherit")}}}import{toState as Wr}from"@domphy/core";import{themeColor as on,themeSize as Kr,themeSpacing as nn}from"@domphy/theme";function Xl(n={}){var r;let o=Wr((r=n.color)!=null?r:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:nn(9),height:nn(9),fontSize:e=>Kr(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>on(e,"inherit",o.get(e)),color:e=>on(e,"shift-11",o.get(e)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}import{toState as rn}from"@domphy/core";import{themeColor as an,themeSize as jr,themeSpacing as Qt}from"@domphy/theme";function es(n={}){var a;let{label:o=999}=n,r=rn(o),e=rn((a=n.color)!=null?a:"danger","color");return{style:{position:"relative","&::after":{content:t=>`"${r.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:Qt(1),minWidth:Qt(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>jr(t,"decrease-1"),borderRadius:Qt(999),backgroundColor:t=>an(t,"shift-9",e.get(t)),color:t=>an(t,"shift-0",e.get(t))}}}}import{toState as Yr}from"@domphy/core";import{themeColor as ln,themeDensity as sn,themeSize as qr,themeSpacing as eo}from"@domphy/theme";function rs(n={}){var r;let o=Yr((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>qr(e,"inherit"),backgroundColor:e=>ln(e,"inherit",o.get(e)),boxShadow:e=>`inset ${eo(1)} 0 0 0 ${ln(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>eo(sn(e)*2),paddingInline:e=>eo(sn(e)*4),margin:0}}}import{toState as Gr}from"@domphy/core";import{themeColor as Ue,themeSize as Ur,themeSpacing as cn}from"@domphy/theme";function ss(n={}){var e;let{separator:o="/"}=n,r=Gr((e=n.color)!=null?e:"neutral","color");return{_onInsert:a=>{a.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:a=>Ur(a,"inherit"),gap:cn(1),color:a=>Ue(a,"shift-9",r.get(a)),backgroundColor:a=>Ue(a,"inherit",r.get(a)),"& > *":{display:"inline-flex",alignItems:"center",color:a=>Ue(a,"shift-8",r.get(a))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:a=>Ue(a,"shift-4",r.get(a)),paddingInlineStart:cn(1)},"& > [aria-current=page]":{color:a=>Ue(a,"shift-10",r.get(a)),pointerEvents:"none"}}}}import{toState as Xr}from"@domphy/core";import{themeColor as St,themeSize as Jr,themeSpacing as Ct}from"@domphy/theme";function ds(n={}){var r;let o=Xr((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:e=>Jr(e,"inherit"),paddingInline:Ct(1),border:"none",background:"none",cursor:"pointer",color:e=>St(e,"shift-8",o.get(e)),borderRadius:Ct(1),"&:hover":{color:e=>St(e,"shift-10",o.get(e)),backgroundColor:e=>St(e,"shift-2",o.get(e))},"&:focus-visible":{outline:e=>`${Ct(.5)} solid ${St(e,"shift-6",o.get(e))}`,outlineOffset:Ct(.5)}}}}import{toState as Zr}from"@domphy/core";import{themeColor as Z,themeDensity as vt,themeSize as Qr,themeSpacing as Xe}from"@domphy/theme";function gs(n={}){var r;let o=Zr((r=n.color)!=null?r:"primary","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>Qr(e,"inherit"),paddingBlock:e=>Xe(vt(e)*1),paddingInline:e=>Xe(vt(e)*3),borderRadius:e=>Xe(vt(e)*1),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:e=>Xe(vt(e)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${Z(e,"shift-4",o.get(e))}`,color:e=>Z(e,"shift-9",o.get(e)),backgroundColor:e=>Z(e,"inherit",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>Z(e,"shift-10",o.get(e)),backgroundColor:e=>Z(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${Xe(.5)} ${Z(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>Z(e,"shift-2","neutral"),outline:e=>`1px solid ${Z(e,"shift-4","neutral")}`,color:e=>Z(e,"shift-8","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}import{toState as ei}from"@domphy/core";import{themeColor as Je,themeDensity as Et,themeSize as ti,themeSpacing as Ze}from"@domphy/theme";function Cs(n={}){var r;let o=ei((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>ti(e,"inherit"),paddingBlock:e=>Ze(Et(e)*1),paddingInline:e=>Ze(Et(e)*1),borderRadius:e=>Ze(Et(e)*1),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:e=>Ze(Et(e)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",color:e=>Je(e,"shift-6",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>Je(e,"shift-9",o.get(e)),backgroundColor:e=>Je(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${Ze(.5)} ${Je(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>Je(e,"shift-4","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}import{toState as to}from"@domphy/core";import{themeColor as Le,themeSize as oi,themeSpacing as N}from"@domphy/theme";function xs(n={}){var t,i;let{checked:o=!1}=n,r=to(o),e=to((t=n.color)!=null?t:"neutral","color"),a=to((i=n.accentColor)!=null?i:"primary","accentColor");return{_onSchedule:s=>{s.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:s=>r.get(s),dataTone:"shift-2",onClick:()=>r.set(!r.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:s=>oi(s),border:"none",outlineWidth:"1px",outline:s=>`1px solid ${Le(s,"shift-3",e.get(s))}`,minWidth:N(12),minHeight:N(6),borderRadius:N(999),paddingLeft:N(7),paddingRight:N(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:s=>Le(s,"inherit",e.get(s)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:N(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:N(5),height:N(5),borderRadius:N(999),color:s=>Le(s,"shift-9"),backgroundColor:s=>Le(s,"decrease-2",e.get(s))},"&[aria-checked=true]":{backgroundColor:s=>Le(s,"increase-3",a.get(s)),outline:"none",color:s=>Le(s,"decrease-2"),paddingLeft:N(2),paddingRight:N(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${N(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as ni}from"@domphy/core";import{themeColor as $e,themeDensity as se,themeSpacing as Q}from"@domphy/theme";function Ps(n={}){var r;let o=ni((r=n.color)!=null?r:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>Q(se(e)*2),backgroundColor:e=>$e(e,"inherit",o.get(e)),color:e=>$e(e,"shift-10",o.get(e)),outline:e=>`1px solid ${$e(e,"shift-4",o.get(e))}`,outlineOffset:"-1px",overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>Q(se(e)*2),paddingInline:e=>Q(se(e)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:e=>Q(se(e)*4),color:e=>$e(e,"shift-9",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>Q(se(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>Q(se(e)*4),color:e=>$e(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:Q(2),paddingBlock:e=>Q(se(e)*2),paddingInline:e=>Q(se(e)*4),borderTop:e=>`1px solid ${$e(e,"shift-3",o.get(e))}`}}}}import{toState as ri}from"@domphy/core";import{themeColor as mn,themeSize as ii,themeSpacing as oo}from"@domphy/theme";function Is(n={}){var r;let o=ri((r=n.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="code"&&console.warn('"code" primitive patch must use code tag')},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",fontSize:e=>ii(e,"inherit"),color:e=>mn(e,"shift-9",o.get(e)),backgroundColor:e=>mn(e,"inherit",o.get(e)),height:oo(6),paddingInline:oo(1.5),borderRadius:oo(1)}}}import{merge as no,toState as ro}from"@domphy/core";import{themeColor as Qe,themeDensity as io,themeSize as dn,themeSpacing as Ce}from"@domphy/theme";import{merge as ai,toState as li}from"@domphy/core";import{autoUpdate as si,computePosition as ci,flip as mi,offset as ui,shift as di}from"@domphy/floating";var kt=new WeakMap;function un(n,o,r){let e=kt.get(n);e||(e=new Map,kt.set(n,e));let a=e.get(o);a&&a!==r&&a(),e.set(o,r)}function pi(n){let o=kt.get(n);o&&(kt.delete(n),o.forEach(r=>r()))}function j(n){let{kind:o,open:r=!1,placement:e}=n,a=null,t=null,i=null,s=null,l=null,p=null,c=!1,m=li(r),y=()=>{a&&clearTimeout(a),a=null,t&&(t(),t=null),l&&(l.remove(),l=null),s=null,c=!1,m.set(!1)},g=C=>{C&&(p=C.getRoot(),i=C.domElement,i&&un(i,o,y))},u=()=>{c||!p||(c=!0,l=p.children.insert(n.content))},d=()=>{u(),i&&s&&(t&&t(),t=si(i,s,()=>{ci(i,s,{placement:e.get(),middleware:[ui(12),mi(),di()],strategy:"fixed"}).then(({x:C,y:w,placement:P})=>{s&&(Object.assign(s.style,{left:`${C}px`,top:`${w}px`}),e.set(P))})}),m.set(!0))},h=()=>{t&&t(),t=null,m.set(!1)},S=C=>{g(C),a&&clearTimeout(a),a=setTimeout(d,100)},v=C=>{g(C),a&&clearTimeout(a),a=setTimeout(h,100)},E={style:{position:"fixed",pointerEvents:"auto",visibility:C=>m.get(C)?"visible":"hidden"},onKeyDown:C=>{C.key==="Escape"&&v()},_onMount:C=>{var w;if(s=C.domElement,i&&s&&!s.hasAttribute("data-theme")){let P=(w=i.closest("[data-theme]"))==null?void 0:w.getAttribute("data-theme");P&&s.setAttribute("data-theme",P)}},_portal:C=>{let w=C.domElement.querySelector("#domphy-floating");if(!w){let P={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};w=C.children.insert(P).domElement}return w}};return ai(n.content,E),{show:S,hide:v,anchorPartial:{onKeyDown:C=>C.key==="Escape"&&v(),_onMount:C=>{p=C.getRoot(),i=C.domElement,i&&un(i,o,y);let w=P=>{if(!m.get()||!i||!s)return;let W=P.target;!i.contains(W)&&!s.contains(W)&&v()};C.getRoot().domElement.addEventListener("click",w),C.addHook("BeforeRemove",()=>{i&&pi(i),C.getRoot().domElement.removeEventListener("click",w)})}}}}import{toState as hi}from"@domphy/core";import{themeColor as xt,themeSize as fi,themeSpacing as ee}from"@domphy/theme";var gi='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6.707 5.293l5.293 5.292l5.293 -5.292a1 1 0 0 1 1.414 1.414l-5.292 5.293l5.292 5.293a1 1 0 0 1 -1.414 1.414l-5.293 -5.292l-5.293 5.292a1 1 0 1 1 -1.414 -1.414l5.292 -5.293l-5.292 -5.293a1 1 0 0 1 1.414 -1.414" /></svg>';function wt(n={}){var e;let{removable:o=!1}=n,r=hi((e=n.color)!=null?e:"neutral","color");return{dataTone:"shift-2",_onInit:a=>{let t={span:gi,onClick:i=>{i.stopPropagation(),a.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:ee(1),width:ee(4),height:ee(4),flexShrink:0,"&:hover":{backgroundColor:i=>xt(i,"shift-4",r.get(i))}}};o&&a.children.insert(t)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:ee(6),paddingBlock:"0px",borderRadius:ee(1),paddingInlineStart:ee(2),paddingInlineEnd:o?ee(1):ee(2),gap:ee(2),fontSize:a=>fi(a,"inherit"),backgroundColor:a=>xt(a,"inherit",r.get(a)),color:a=>xt(a,"shift-9",r.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${xt(a,"shift-4",r.get(a))}`}}}function Ks(n){let{options:o=[],placement:r="bottom",color:e="neutral",open:a=!1,multiple:t=!1}=n,i=ro(n.value),s=ro(a),{show:l,hide:p,anchorPartial:c}=j({kind:"combobox",open:s,placement:ro(r),content:n.content}),m={onClick:(h,S)=>!t&&p(S)};no(n.content,m);let y={border:"none",outline:"none",padding:0,margin:0,flex:1,height:Ce(6),marginInlineStart:Ce(2),fontSize:h=>dn(h,"inherit"),color:h=>Qe(h,"shift-9",e),backgroundColor:h=>Qe(h,"inherit",e)},g;if(n.input){let h={onFocus:(S,v)=>l(v),style:y,_key:"combobox-input"};no(n.input,h),g=n.input}else g={input:null,onFocus:(h,S)=>l(S),value:h=>(i.get(h),""),style:y,_key:"combobox-input"};let u={div:h=>{let S=i.get(h),v=Array.isArray(S)?S:[S],D=o.filter(C=>v.includes(C.value)).map(C=>({span:C.label,$:[wt({color:e,removable:!0})],_key:C.value,_onRemove:w=>{let P=i.get(),De=(Array.isArray(P)?P:[P]).filter(ae=>ae!==C.value);t?i.set(De):i.set(De[0])}}));return D.push(g),D},style:{display:"flex",flexWrap:"wrap",gap:Ce(1)}},d={_onInsert:h=>{h.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:h=>h.children.insert(u),style:{minWidth:Ce(32),outlineOffset:"-1px",outline:h=>`1px solid ${Qe(h,"shift-4","neutral")}`,paddingBlock:h=>Ce(io(h)*1),paddingInline:h=>Ce(io(h)*1),borderRadius:h=>Ce(io(h)*1),fontSize:h=>dn(h,"inherit"),color:h=>Qe(h,"shift-9",e),backgroundColor:h=>Qe(h,"inherit",e)}};return no(c,d),c}import{merge as yi,toState as bi}from"@domphy/core";import{themeColor as te,themeDensity as Tt,themeSize as pn,themeSpacing as Ie}from"@domphy/theme";function Gs(){return{_onSchedule:(n,o)=>{yi(o,{_context:{command:{query:bi("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function Us(n={}){let{color:o="neutral",accentColor:r="primary"}=n;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let a=e.getContext("command");if(!a){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,i=()=>a.query.set(t.value);t.addEventListener("input",i),e.addHook("Remove",()=>t.removeEventListener("input",i))},style:{fontFamily:"inherit",fontSize:e=>pn(e,"inherit"),paddingInline:e=>Ie(Tt(e)*3),paddingBlock:e=>Ie(Tt(e)*2),border:"none",borderBottom:e=>`1px solid ${te(e,"shift-3",o)}`,outline:"none",color:e=>te(e,"shift-10",o),backgroundColor:e=>te(e,"inherit",o),"&::placeholder":{color:e=>te(e,"shift-7")},"&:focus-visible":{borderBottomColor:e=>te(e,"shift-6",r)}}}}function Xs(n={}){let{color:o="neutral",accentColor:r="primary"}=n;return{role:"option",_onMount:e=>{var p,c;let a=e.getContext("command");if(!a){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,i=(c=(p=t.textContent)==null?void 0:p.toLowerCase())!=null?c:"",s=m=>{t.hidden=m.length>0&&!i.includes(m.toLowerCase())};s(a.query.get());let l=a.query.addListener(s);e.addHook("Remove",l)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>pn(e,"inherit"),height:e=>Ie(6+Tt(e)*2),paddingInline:e=>Ie(Tt(e)*3),border:"none",outline:"none",color:e=>te(e,"shift-9",o),backgroundColor:e=>te(e,"inherit",o),"&:hover:not([disabled])":{backgroundColor:e=>te(e,"shift-2",o)},"&:focus-visible":{outline:e=>`${Ie(.5)} solid ${te(e,"shift-6",r)}`,outlineOffset:`-${Ie(.5)}`}}}}import{merge as Si,toState as oe}from"@domphy/core";import{themeColor as $,themeSize as ze,themeSpacing as I}from"@domphy/theme";var z=n=>new Date(n.getFullYear(),n.getMonth(),n.getDate()),ve=(n,o)=>new Date(n.getFullYear(),n.getMonth(),n.getDate()+o),ao=(n,o)=>new Date(n.getFullYear(),n.getMonth()+o,n.getDate()),et=(n,o)=>!!n&&!!o&&n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()&&n.getDate()===o.getDate(),lo=n=>`${n.getFullYear()}-${String(n.getMonth()+1).padStart(2,"0")}-${String(n.getDate()).padStart(2,"0")}`,so=(n,o)=>ve(n,-((n.getDay()-o+7)%7));function Ci(n){var o,r;try{let e=new Intl.Locale(n),a=(r=(o=e.getWeekInfo)==null?void 0:o.call(e))!=null?r:e.weekInfo;if(a!=null&&a.firstDay)return a.firstDay%7}catch(e){}return 0}function tc(n={}){var Yo,qo,Go,Uo;let{mode:o="single",time:r=!1,min:e,max:a,disabledDate:t,locale:i=typeof navigator!="undefined"?navigator.language:"en-US",format:s,onChange:l}=n,p=(Yo=n.weekStartsOn)!=null?Yo:Ci(i),c=oe((qo=n.accentColor)!=null?qo:"primary","accentColor"),m=oe((Go=n.placement)!=null?Go:"bottom-start"),y=oe((Uo=n.value)!=null?Uo:o==="range"?[null,null]:null),g=l?y.addListener(f=>l(f)):null,u=(()=>{let f=y.get(),b=o==="range"?f==null?void 0:f[0]:f;return b instanceof Date?b:new Date})(),d=oe(u.getFullYear(),"viewYear"),h=oe(u.getMonth(),"viewMonth"),S=oe(z(u),"focused"),v=oe(null,"hovered"),E=oe(u.getHours(),"hour"),D=oe(u.getMinutes(),"minute"),C=null,w=new Intl.DateTimeFormat(i,K({dateStyle:"medium"},r?{timeStyle:"short"}:{})),P=new Intl.DateTimeFormat(i,{month:"long",year:"numeric"}),W=new Intl.DateTimeFormat(i,{weekday:"short"}),De=new Intl.DateTimeFormat(i,{dateStyle:"full"}),ae=f=>f?w.format(f):"",yr=f=>{if(s)return s(f);if(o==="range"){let[b,k]=f!=null?f:[null,null];return b?`${ae(b)} \u2013 ${ae(k)}`:""}return ae(f)},br=Array.from({length:7},(f,b)=>W.format(new Date(2023,0,1+(b+p)%7))),Fo=f=>!!e&&z(f)<z(e)||!!a&&z(f)>z(a)||!!t&&t(f),le=f=>{if(!r)return z(f);let b=z(f);return b.setHours(E.get(),D.get(),0,0),b},Wo=f=>{var x;if(Fo(f))return;if(o==="single"){y.set(le(f)),r||Ut();return}let[b,k]=(x=y.get())!=null?x:[null,null];!b||b&&k?y.set([le(f),null]):z(f)<z(b)?(y.set([le(f),le(b)]),r||Ut()):(y.set([b,le(f)]),r||Ut())},Sr=()=>{var f;if(r)if(o==="single"){let b=y.get();b&&y.set(le(b))}else{let[b,k]=(f=y.get())!=null?f:[null,null];y.set([b&&le(b),k&&le(k)])}},Cr=(f,b)=>{var Pe;if(o!=="range")return!1;let[k,x]=(Pe=y.get(b))!=null?Pe:[null,null],O=x!=null?x:v.get(b);if(!k||!O)return!1;let T=z(k)<=z(O)?k:O,A=z(k)<=z(O)?O:k,_=z(f);return _>=z(T)&&_<=z(A)},vr=(f,b)=>{let k=y.get(b);if(o==="range"){let[x,O]=k!=null?k:[null,null];return et(f,x)||et(f,O)}return et(f,k)},yt=f=>{d.set(f.getFullYear()),h.set(f.getMonth())},Ko=f=>{let b=ao(new Date(d.get(),h.get(),1),f);yt(b)},jo=f=>d.set(d.get()+f),qt=()=>{setTimeout(()=>{var f;(f=C==null?void 0:C.querySelector(`[data-date="${lo(S.get())}"]`))==null||f.focus()},0)},Er=Dr(),{show:kr,hide:xr,anchorPartial:Gt}=j({kind:"datePicker",open:!1,placement:m,content:Er});function Ut(){xr()}Gt.onClick=()=>{};let wr={type:"text",readonly:!0,value:f=>yr(y.get(f)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(f,b)=>{Xt(b)},onFocus:(f,b)=>{Xt(b)},onKeyDown:(f,b)=>{let k=f.key;(k==="ArrowDown"||k==="Enter")&&(f.preventDefault(),Xt(b))},_onMount:f=>g&&f.addHook("Remove",()=>{g()})};function Xt(f){var k;let b=(k=Tr())!=null?k:new Date;S.set(z(b)),yt(b),kr(f),qt()}function Tr(){var b;let f=y.get();return o==="range"?(b=f==null?void 0:f[0])!=null?b:null:f!=null?f:null}return Si(Gt,wr),Gt;function Dr(){let f=(T,A,_)=>({button:T,type:"button",ariaLabel:A,onClick:_,style:vi()}),b={div:[f("\xAB","Previous year",()=>jo(-1)),f("\u2039","Previous month",()=>Ko(-1)),{div:T=>P.format(new Date(d.get(T),h.get(T),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"600",fontSize:T=>ze(T)}},f("\u203A","Next month",()=>Ko(1)),f("\xBB","Next year",()=>jo(1))],style:{display:"flex",alignItems:"center",gap:I(1),marginBottom:I(2)}},k={div:br.map((T,A)=>({div:T,style:{textAlign:"center",fontSize:_=>ze(_,"decrease-1"),fontWeight:"600",color:_=>$(_,"shift-7"),paddingBlock:I(1)},_key:A})),role:"row",style:hn()},x={div:T=>Pr(T),role:"grid",ariaLabel:"Calendar",onKeyDown:Ir,onMouseLeave:()=>o==="range"&&v.set(null),style:{display:"flex",flexDirection:"column",gap:I(.5)}},O=[b,k,x];return r&&O.push(Lr()),O.push($r()),{div:O,role:"dialog",ariaModal:"false",_onMount:T=>{C=T.domElement},style:{minWidth:I(70),padding:I(3),borderRadius:I(2),backgroundColor:T=>$(T,"base"),color:T=>$(T,"shift-10"),border:T=>`1px solid ${$(T,"shift-4")}`,boxShadow:"0 8px 24px rgba(0,0,0,0.18)"}}}function Pr(f){let b=new Date(d.get(f),h.get(f),1),k=h.get(f),x=so(b,p),O=[];for(let T=0;T<6;T++){let A=[];for(let _=0;_<7;_++){let Pe=ve(x,T*7+_);A.push(Or(Pe,k,f))}O.push({div:A,role:"row",style:hn(),_key:T})}return O}function Or(f,b,k){let x=Fo(f),O=vr(f,k),T=Cr(f,k),A=f.getMonth()!==b,_=et(f,S.get(k)),Pe=et(f,new Date);return{button:String(f.getDate()),type:"button",role:"gridcell",tabIndex:_?0:-1,ariaSelected:O,ariaDisabled:x,disabled:x,ariaLabel:De.format(f),dataDate:lo(f),onClick:()=>Wo(f),onMouseEnter:()=>o==="range"&&v.set(f),style:{appearance:"none",border:"none",cursor:x?"not-allowed":"pointer",aspectRatio:"1",borderRadius:I(1),fontSize:L=>ze(L),fontFamily:"inherit",opacity:x?.35:A?.5:1,backgroundColor:L=>O?$(L,"shift-7",c.get(L)):T?$(L,"shift-2",c.get(L)):"transparent",color:L=>O?$(L,"shift-0",c.get(L)):$(L,"shift-9"),outline:Pe?L=>`1px solid ${$(L,"shift-6",c.get(L))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:L=>O?$(L,"shift-7",c.get(L)):$(L,"shift-3",c.get(L))},"&:focus-visible":{outline:L=>`2px solid ${$(L,"shift-6",c.get(L))}`}},_key:lo(f)}}function Lr(){let f=(b,k,x)=>({select:Array.from({length:b},(O,T)=>({option:String(T).padStart(2,"0"),value:String(T),selected:A=>k.get(A)===T,_key:T})),ariaLabel:x,onChange:O=>{k.set(Number(O.target.value)),Sr()},style:Ei()});return{div:[f(24,E,"Hour"),{span:":",style:{fontWeight:"600"}},f(60,D,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:I(1),marginTop:I(3)}}}function $r(){let f=(b,k)=>({button:b,type:"button",onClick:k,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:x=>ze(x,"decrease-1"),color:x=>$(x,"shift-8",c.get(x)),padding:I(1)}});return{div:[f("Today",()=>{let b=new Date;S.set(z(b)),yt(b),qt()}),f("Clear",()=>{y.set(o==="range"?[null,null]:null),v.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:I(2),paddingTop:I(2),borderTop:b=>`1px solid ${$(b,"shift-3")}`}}}function Ir(f){let b=f,k=S.get(),x=null;switch(b.key){case"ArrowLeft":x=ve(k,-1);break;case"ArrowRight":x=ve(k,1);break;case"ArrowUp":x=ve(k,-7);break;case"ArrowDown":x=ve(k,7);break;case"Home":x=so(k,p);break;case"End":x=ve(so(k,p),6);break;case"PageUp":x=ao(k,b.shiftKey?-12:-1);break;case"PageDown":x=ao(k,b.shiftKey?12:1);break;case"Enter":case" ":b.preventDefault(),Wo(k);return;default:return}b.preventDefault(),S.set(x),yt(x),qt()}}function hn(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:I(.5)}}function vi(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:n=>ze(n),color:n=>$(n,"shift-8"),width:I(7),height:I(7),borderRadius:I(1),"&:hover":{backgroundColor:n=>$(n,"shift-3")}}}function Ei(){return{fontFamily:"inherit",fontSize:n=>ze(n),padding:I(1),borderRadius:I(1),border:n=>`1px solid ${$(n,"shift-4")}`,backgroundColor:n=>$(n,"base"),color:n=>$(n,"shift-9")}}import{toState as ki}from"@domphy/core";import{themeColor as fn,themeSize as gn,themeSpacing as yn}from"@domphy/theme";function ac(n={}){var r;let o=ki((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${yn(24)}, max-content) 1fr`,columnGap:yn(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>gn(e,"inherit"),color:e=>fn(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>gn(e,"inherit"),color:e=>fn(e,"shift-9",o.get(e))}}}}import{toState as bn}from"@domphy/core";import{themeColor as ce,themeDensity as tt,themeSize as Sn,themeSpacing as V}from"@domphy/theme";function mc(n={}){var a,t;let{duration:o=240}=n,r=bn((a=n.color)!=null?a:"neutral","color"),e=bn((t=n.accentColor)!=null?t:"primary","accentColor");return{_onInsert:i=>{i.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:i=>Sn(i,"inherit"),color:i=>ce(i,"shift-9",r.get(i)),backgroundColor:i=>ce(i,"inherit",r.get(i)),overflow:"hidden","& > summary":{backgroundColor:i=>ce(i,"shift-2",r.get(i)),color:i=>ce(i,"shift-10",r.get(i)),fontSize:i=>Sn(i,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:V(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:i=>V(tt(i)*4),height:V(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:V(2),height:V(2),flexShrink:0,marginTop:`-${V(.5)}`,borderInlineEnd:i=>`${V(.5)} solid ${ce(i,"shift-9",r.get(i))}`,borderBottom:i=>`${V(.5)} solid ${ce(i,"shift-9",r.get(i))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:i=>ce(i,"shift-3",r.get(i))},"& > summary:focus-visible":{borderRadius:i=>V(tt(i)*2),outlineOffset:`-${V(.5)}`,outline:i=>`${V(.5)} solid ${ce(i,"shift-6",e.get(i))}`},"& > :not(summary)":{maxHeight:"0px",opacity:0,overflow:"hidden",paddingInline:i=>V(tt(i)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${o}ms ease, opacity ${o}ms ease, padding ${o}ms ease`},"&[open] > :not(summary)":{maxHeight:V(250),opacity:1,paddingTop:i=>V(tt(i)*1),paddingBottom:i=>V(tt(i)*3)}}}}import{toState as xi}from"@domphy/core";import{themeColor as Pt,themeDensity as wi,themeSize as Ti,themeSpacing as co}from"@domphy/theme";var ot=0;function Dt(){ot++,ot===1&&(document.body.style.overflow="hidden")}function Ve(){ot=Math.max(0,ot-1),ot===0&&(document.body.style.overflow="")}var Cn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function gc(n={}){let{color:o="neutral",open:r=!1}=n,e=xi(r),a=null,t=!1,i=!1,s=l=>{t=!1,l.close(),i&&(Ve(),i=!1),a==null||a.focus(),a=null};return{_onInsert:l=>{l.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(l,p)=>{if(l.target!==p.domElement)return;let c=p.domElement.getBoundingClientRect();l.clientX>=c.left&&l.clientX<=c.right&&l.clientY>=c.top&&l.clientY<=c.bottom||e.set(!1)},onTransitionEnd:(l,p)=>{t&&l.target===p.domElement&&l.propertyName==="opacity"&&s(p.domElement)},_onMount:l=>{let p=l.domElement;p.setAttribute("aria-modal","true");let c=null,m=d=>{if(d.key!=="Tab")return;let h=Array.from(p.querySelectorAll(Cn)).filter(E=>!E.closest("[aria-hidden='true']")&&E.offsetParent!==null);if(!h.length){d.preventDefault();return}let S=h[0],v=h[h.length-1];d.shiftKey?(document.activeElement===S||document.activeElement===p)&&(d.preventDefault(),v.focus()):document.activeElement===v&&(d.preventDefault(),S.focus())},y=d=>{d.preventDefault(),e.set(!1)};p.addEventListener("cancel",y);let g=d=>{d?(a=document.activeElement,p.showModal(),i||(Dt(),i=!0),p.addEventListener("keydown",m),requestAnimationFrame(()=>{p.style.opacity="1";let h=p.querySelector(Cn);h==null||h.focus()})):(t=!0,p.style.opacity="0",p.removeEventListener("keydown",m),c=setTimeout(()=>{c=null,t&&s(p)},350))};g(e.get());let u=e.addListener(g);l.addHook("Remove",()=>{c&&(clearTimeout(c),c=null),u(),p.removeEventListener("cancel",y),i&&(Ve(),i=!1),p.removeEventListener("keydown",m),a==null||a.focus(),a=null})},style:{opacity:"0",transition:"opacity 200ms ease",fontSize:l=>Ti(l,"inherit"),color:l=>Pt(l,"shift-10",o),backgroundColor:l=>Pt(l,"inherit",o),border:"none",padding:l=>co(wi(l)*3),boxShadow:l=>`0 ${co(9)} ${co(16)} ${Pt(l,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:l=>Pt(l,"shift-2","neutral"),opacity:.75}}}}import{toState as Di}from"@domphy/core";import{themeColor as Ot,themeSize as Pi,themeSpacing as Oi}from"@domphy/theme";function Cc(n={}){var r;let o=Di((r=n.color)!=null?r:"neutral","color");return{role:"separator",_onInsert:e=>{e.tagName!=="div"&&console.warn('"divider" patch should be used with <div>')},style:{display:"flex",justifyContent:"center",alignItems:"baseline",gap:Oi(2),fontSize:e=>Pi(e,"inherit"),backgroundColor:e=>Ot(e),color:e=>Ot(e,"shift-9",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>Ot(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>Ot(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}import{toState as Li}from"@domphy/core";import{themeColor as Lt,themeDensity as $i,themeSize as Ii,themeSpacing as nt}from"@domphy/theme";var mo={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},vn={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},rt=n=>n==="left"||n==="right";function En(n,o){return n==="start"?o?"right":"left":n==="end"?o?"left":"right":n}function wc(n={}){let{color:o="neutral",open:r=!1,placement:e="end",size:a}=n,t=Li(r),i=e==="start"||e==="end",s=En(e,!1),l=rt(s)?nt(80):nt(64),p=a!=null?a:l;return{_onInsert:c=>{c.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(c,m)=>{c.target===m.domElement&&t.set(!1)},_onMount:c=>{let m=c.domElement;m.setAttribute("aria-modal","true");let y=w=>{w.preventDefault(),t.set(!1)};m.addEventListener("cancel",y);let g=i&&(m.ownerDocument.documentElement.dir==="rtl"||m.ownerDocument.dir==="rtl"),u=En(e,g);i&&(m.style.transform=mo[u],m.style.margin=vn[u],m.style.width=rt(u)?p:"100dvw",m.style.height=rt(u)?"100dvh":p);let d=!1,h=!1,S=null,v=()=>{S=null,d&&(d=!1,m.close(),h&&(Ve(),h=!1))},E=w=>{w.target===m&&w.propertyName==="transform"&&v()};m.addEventListener("transitionend",E);let D=w=>{w?(d=!1,m.showModal(),h||(Dt(),h=!0),requestAnimationFrame(()=>{m.style.transform="translate(0, 0)"})):(d=!0,m.style.transform=mo[u],S=setTimeout(v,350))};D(t.get());let C=t.addListener(D);c.addHook("Remove",()=>{S&&(clearTimeout(S),S=null),C(),m.removeEventListener("cancel",y),m.removeEventListener("transitionend",E),h&&(Ve(),h=!1)})},style:{transform:mo[s],transition:"transform 0.25s ease",fontSize:c=>Ii(c,"inherit"),color:c=>Lt(c,"shift-10",o),backgroundColor:c=>Lt(c,"inherit",o),border:"none",padding:c=>nt($i(c)*3),margin:vn[s],width:rt(s)?p:"100dvw",height:rt(s)?"100dvh":p,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:c=>`0 ${nt(4)} ${nt(12)} ${Lt(c,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:c=>Lt(c,"shift-2","neutral"),opacity:.75}}}}import{toState as zi}from"@domphy/core";import{themeColor as Vi,themeSize as Mi}from"@domphy/theme";function Oc(n={}){var r;let o=zi((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>Mi(e,"inherit"),fontStyle:"italic",color:e=>Vi(e,"shift-10",o.get(e))}}}import{toState as _i}from"@domphy/core";import{themeColor as kn,themeSpacing as uo}from"@domphy/theme";function zc(n={}){var r;let o=_i((r=n.color)!=null?r:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:uo(3),paddingBlock:uo(12),paddingInline:uo(6),textAlign:"center",color:e=>kn(e,"shift-6",o.get(e)),"& > :first-child":{color:e=>kn(e,"shift-5",o.get(e))}}}}function Mc(n={}){return{_onError:(o,r,e)=>{var t,i;(t=n.onError)==null||t.call(n,r);let a=typeof n.fallback=="function"?n.fallback(r,e):(i=n.fallback)!=null?i:{div:"An error occurred."};o.children.update([a])}}}import{toState as Ri}from"@domphy/core";import{themeColor as Me,themeSize as Ai,themeSpacing as it}from"@domphy/theme";var Ni={small:8,medium:10,large:14};function Nc(n={}){var e,a;let o=Ri((e=n.color)!=null?e:"primary","color"),r=it(Ni[(a=n.size)!=null?a:"medium"]);return{_onInsert:t=>{t.tagName!=="button"&&console.warn('"fab" patch must use button tag')},style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:r,height:r,borderRadius:"50%",fontSize:t=>Ai(t,"inherit"),backgroundColor:t=>Me(t,"shift-9",o.get(t)),color:t=>Me(t,"shift-0",o.get(t)),boxShadow:t=>`0 ${it(1)} ${it(4)} ${Me(t,"shift-4","neutral")}`,transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>Me(t,"shift-10",o.get(t)),boxShadow:t=>`0 ${it(2)} ${it(6)} ${Me(t,"shift-5","neutral")}`},"&:focus-visible":{outline:t=>`2px solid ${Me(t,"shift-6",o.get(t))}`,outlineOffset:"2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as Hi}from"@domphy/core";import{themeColor as xn,themeSize as Bi,themeSpacing as $t}from"@domphy/theme";function Wc(n={}){var r;let o=Hi((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:$t(2),marginInline:0,marginTop:$t(3),marginBottom:$t(3),color:e=>xn(e,"shift-9",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:$t(2)},"& figcaption":{fontSize:e=>Bi(e,"decrease-1"),color:e=>xn(e,"shift-8",o.get(e)),lineHeight:1.45}}}}import{toState as Fi}from"@domphy/core";import{themeColor as It,themeDensity as _e,themeSize as po,themeSpacing as ne}from"@domphy/theme";function qc(n={}){var a;let{layout:o="horizontal"}=n,r=Fi((a=n.color)!=null?a:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:t=>ne(_e(t)*3),paddingBlock:t=>ne(_e(t)*3),border:"none",borderRadius:t=>ne(_e(t)*2),fontSize:t=>po(t,"inherit"),backgroundColor:t=>It(t,"inherit",r.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:ne(4),rowGap:ne(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>po(t,"inherit"),fontWeight:600,paddingBlock:t=>ne(_e(t)*1),borderRadius:t=>ne(_e(t)*2),color:t=>It(t,"shift-9",r.get(t)),backgroundColor:t=>It(t,"inherit",r.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?"0px":ne(_e(t)*1)},"& > label:has(+ :not(legend, label, p) + p)":{gridRow:e?"auto":"span 2"},"& > :not(legend, label, p)":{gridColumn:e?"1":"2",minWidth:0,width:"100%",boxSizing:"border-box"},"& > p":{gridColumn:e?"1":"2",minWidth:0,margin:0,marginBlockStart:`calc(${ne(2)} * -1)`,fontSize:t=>po(t,"decrease-1"),color:t=>It(t,"shift-9",r.get(t))}}}}import{toState as Wi}from"@domphy/core";import{themeColor as Ki,themeSize as ji,themeSpacing as Yi}from"@domphy/theme";var qi={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Jc(n={}){var r;let o=Wi((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{["h1","h2","h3","h4","h5","h6"].includes(e.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:e=>Ki(e,"shift-11",o.get(e)),marginTop:0,marginBottom:Yi(2),fontSize:e=>{let a=qi[e.elementNode.tagName]||"inherit";return ji(e,a)}}}}import{toState as Gi}from"@domphy/core";import{themeColor as Ui,themeSpacing as wn}from"@domphy/theme";function tm(n={}){var r;let o=Gi((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},style:{border:0,height:"1px",marginInline:0,marginTop:wn(3),marginBottom:wn(3),backgroundColor:e=>Ui(e,"shift-4",o.get(e))}}}import{toState as Xi}from"@domphy/core";import{themeColor as Ji,themeSize as Zi,themeSpacing as Tn}from"@domphy/theme";function im(n={}){var r;let o=Xi((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="span"&&console.warn('"icon" primitive patch should use span tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",alignSelf:"center",justifySelf:"center",verticalAlign:"middle",width:Tn(4),height:Tn(4),flexShrink:"0",fontSize:e=>Zi(e),backgroundColor:"transparent",color:e=>Ji(e,"shift-9",o.get(e))}}}import{toState as Qi}from"@domphy/core";import{themeColor as ea,themeSpacing as ta}from"@domphy/theme";function cm(n={}){var r;let o=Qi((r=n.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:ta(2),backgroundColor:e=>ea(e,"inherit",o.get(e))}}}import{toState as Dn}from"@domphy/core";import{themeColor as R,themeSize as oa,themeSpacing as me}from"@domphy/theme";function pm(n={}){var e,a;let o=Dn((e=n.color)!=null?e:"neutral","color"),r=Dn((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>oa(t,"inherit"),display:"inline-flex",position:"relative",width:me(6),height:me(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:me(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${R(t,"shift-4",o.get(t))}`,color:t=>R(t,"shift-9",o.get(t)),width:me(4),height:me(4)},"&:hover::before":{backgroundColor:t=>R(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${R(t,"shift-6",r.get(t))}`,backgroundColor:t=>R(t,"shift-8",r.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>R(t,"shift-7",r.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${me(.5)} solid ${R(t,"inherit",r.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${R(t,"shift-6",r.get(t))}`,backgroundColor:t=>R(t,"shift-3",r.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>R(t,"shift-8",r.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>R(t,"shift-7",r.get(t))},"&:focus-visible":{borderRadius:me(1.5),outline:t=>`${me(.5)} solid ${R(t,"shift-6",r.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>R(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{themeColor as Pn,themeDensity as at,themeSize as na,themeSpacing as lt}from"@domphy/theme";function gm(n={}){return{type:"color",_onSchedule:(o,r)=>{o.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag'),r.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:o=>na(o,"inherit"),paddingBlock:o=>lt(at(o)*1),paddingInline:o=>lt(at(o)*1),blockSize:o=>lt(6+at(o)*2),inlineSize:o=>lt(6+at(o)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:o=>lt(at(o)*1)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:o=>Pn(o,"shift-2","neutral"),outline:o=>`1px solid ${Pn(o,"shift-4","neutral")}`}}}}import{toState as On}from"@domphy/core";import{themeColor as ue,themeDensity as ho,themeSize as ra,themeSpacing as st}from"@domphy/theme";function Cm(n={}){var a,t;let{mode:o="datetime-local"}=n,r=On((a=n.color)!=null?a:"neutral","color"),e=On((t=n.accentColor)!=null?t:"primary","accentColor");return{type:o,_onSchedule:(i,s)=>{i.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),s.type=o},style:{fontFamily:"inherit",fontSize:i=>ra(i,"inherit"),lineHeight:"inherit",color:i=>ue(i,"shift-9",r.get(i)),backgroundColor:i=>ue(i,"inherit",r.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${ue(i,"shift-4",r.get(i))}`,borderRadius:i=>st(ho(i)*1),paddingInline:i=>st(ho(i)*3),height:i=>st(6+ho(i)*2),"&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:i=>`${st(.5)} solid ${ue(i,"shift-6",e.get(i))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>ue(i,"shift-8","neutral"),backgroundColor:i=>ue(i,"shift-2","neutral"),outline:i=>`1px solid ${ue(i,"shift-4","neutral")}`},"&:invalid":{outline:i=>`${st(.5)} solid ${ue(i,"shift-6","error")}`}}}}import{toState as Ln}from"@domphy/core";import{themeColor as B,themeDensity as zt,themeSize as ia,themeSpacing as de}from"@domphy/theme";function xm(n={}){var e,a;let o=Ln((e=n.color)!=null?e:"neutral","color"),r=Ln((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"file",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),i.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>ia(t,"inherit"),lineHeight:"inherit",color:t=>B(t,"shift-9",o.get(t)),backgroundColor:t=>B(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${B(t,"shift-4",o.get(t))}`,borderRadius:t=>de(zt(t)*1),height:t=>de(6+zt(t)*2),paddingInline:t=>de(zt(t)*1),"&::-webkit-file-upload-button":{marginTop:t=>de(zt(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:de(1),height:de(6),paddingInline:de(2),cursor:"pointer",color:t=>B(t,"shift-11",o.get(t)),backgroundColor:t=>B(t,"shift-1",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${de(.5)} solid ${B(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>B(t,"shift-8","neutral"),outline:t=>`1px solid ${B(t,"shift-4","neutral")}`,backgroundColor:t=>B(t,"shift-1","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>B(t,"shift-8","neutral"),backgroundColor:t=>B(t,"shift-3","neutral")}}}}import{toState as $n}from"@domphy/core";import{themeColor as Ee,themeDensity as Vt,themeSize as aa,themeSpacing as Re}from"@domphy/theme";function Pm(n={}){var e,a;let o=$n((e=n.color)!=null?e:"neutral","color"),r=$n((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"number",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),i.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:Re(10),paddingInlineStart:t=>Re(Vt(t)*3),paddingInlineEnd:t=>Re(Vt(t)*1.5),paddingBlock:t=>Re(Vt(t)*1),borderRadius:t=>Re(Vt(t)*1),fontSize:t=>aa(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${Ee(t,"shift-4",o.get(t))}`,color:t=>Ee(t,"shift-9",o.get(t)),backgroundColor:t=>Ee(t,"inherit",o.get(t)),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${Re(.5)} solid ${Ee(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>Ee(t,"shift-2","neutral"),outline:t=>`1px solid ${Ee(t,"shift-4","neutral")}`,color:t=>Ee(t,"shift-8","neutral")}}}}import{toState as fo}from"@domphy/core";import{themeColor as Mt,themeDensity as _t,themeSize as la,themeSpacing as ct}from"@domphy/theme";var sa='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"/><path d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"/></svg>',ca='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.585 10.587a2 2 0 0 0 2.829 2.828"/><path d="M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"/><path d="M3 3l18 18"/></svg>';function Im(n={}){var a,t;let o=fo((a=n.color)!=null?a:"neutral","color"),r=fo((t=n.accentColor)!=null?t:"primary","accentColor"),e=fo(!1);return{_onInsert:i=>{i.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onInit:i=>{let s={input:null,type:p=>e.get(p)?"text":"password",style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}},l={button:p=>e.get(p)?ca:sa,type:"button",ariaLabel:p=>e.get(p)?"Hide password":"Show password",onClick:()=>e.set(!e.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",display:"flex",alignItems:"center",flexShrink:0,opacity:.6}};i.children.insert(s),i.children.insert(l)},style:{display:"flex",alignItems:"center",gap:i=>ct(_t(i)*1),paddingBlock:i=>ct(_t(i)*1),paddingInline:i=>ct(_t(i)*3),borderRadius:i=>ct(_t(i)*1),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${Mt(i,"shift-4",o.get(i))}`,color:i=>Mt(i,"shift-9",o.get(i)),backgroundColor:i=>Mt(i,"inherit",o.get(i)),fontSize:i=>la(i,"inherit"),"&:focus-within":{outline:i=>`${ct(.5)} solid ${Mt(i,"shift-6",r.get(i))}`}}}}import{themeSpacing as In}from"@domphy/theme";function Mm(){return{style:{display:"flex",alignItems:"center",gap:In(2),"& > *":{minWidth:`${In(9)}!important`}},_onMount:n=>{let o=n.domElement,r=()=>Array.from(o.querySelectorAll("input")),e=i=>{let s=r(),l=i.target,p=s.indexOf(l);l.value&&p<s.length-1&&s[p+1].focus()},a=i=>{let s=r(),l=i.target,p=s.indexOf(l);i.key==="Backspace"&&!l.value&&p>0&&s[p-1].focus(),i.key==="ArrowLeft"&&p>0&&s[p-1].focus(),i.key==="ArrowRight"&&p<s.length-1&&s[p+1].focus()},t=i=>{var y,g,u;i.preventDefault();let s=(g=(y=i.clipboardData)==null?void 0:y.getData("text"))!=null?g:"",l=r(),p=l.indexOf(i.target),c=p===-1?0:p;[...s].forEach((d,h)=>{l[c+h]&&(l[c+h].value=d)});let m=Math.min(c+s.length-1,l.length-1);(u=l[m])==null||u.focus()};o.addEventListener("input",e),o.addEventListener("keydown",a),o.addEventListener("paste",t),n.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",a),o.removeEventListener("paste",t)})}}}import{toState as zn}from"@domphy/core";import{themeColor as pe,themeSize as ma,themeSpacing as mt}from"@domphy/theme";function Nm(n={}){var e,a;let o=zn((e=n.color)!=null?e:"neutral","color"),r=zn((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"radio",_onInsert:t=>{if(t.tagName!=="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:t=>ma(t,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:mt(6),height:mt(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:"50%",lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${pe(t,"shift-4",o.get(t))}`,color:t=>pe(t,"shift-9",o.get(t)),width:mt(4),height:mt(4)},"&:hover::before":{backgroundColor:t=>pe(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${pe(t,"shift-6",r.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>pe(t,"shift-8",r.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>pe(t,"shift-7",r.get(t))},"&:focus-visible":{borderRadius:"50%",outline:t=>`${mt(.5)} solid ${pe(t,"shift-6",r.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>pe(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as Vn}from"@domphy/core";import{themeColor as Rt,themeSpacing as F}from"@domphy/theme";function Wm(n={}){var e,a;let o=Vn((e=n.color)!=null?e:"neutral","color"),r=Vn((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"range",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:F(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:F(1.5),borderRadius:F(999),backgroundColor:t=>Rt(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:F(4),height:F(4),borderRadius:F(999),border:"none",marginTop:`calc((${F(1.5)} - ${F(4)}) / 2)`,backgroundColor:t=>Rt(t,"shift-9",r.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>Rt(t,"shift-10",r.get(t))},"&:focus-visible":{outline:t=>`${F(.5)} solid ${Rt(t,"shift-6",r.get(t))}`,outlineOffset:F(1),borderRadius:F(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Mn}from"@domphy/core";import{themeColor as he,themeDensity as go,themeSize as ua,themeSpacing as ut}from"@domphy/theme";function qm(n={}){var e,a;let o=Mn((e=n.color)!=null?e:"neutral","color"),r=Mn((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"search",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),i.type="search"},style:{fontFamily:"inherit",fontSize:t=>ua(t,"inherit"),lineHeight:"inherit",color:t=>he(t,"shift-9",o.get(t)),backgroundColor:t=>he(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${he(t,"shift-4",o.get(t))}`,borderRadius:t=>ut(go(t)*1),minWidth:ut(32),paddingInline:t=>ut(go(t)*3),paddingBlock:t=>ut(go(t)*1),"&::placeholder":{color:t=>he(t,"shift-7",o.get(t))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${ut(.5)} solid ${he(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>he(t,"shift-8","neutral"),backgroundColor:t=>he(t,"shift-2","neutral"),outline:t=>`1px solid ${he(t,"shift-4","neutral")}`}}}}import{toState as da}from"@domphy/core";import{themeColor as yo,themeSize as _n,themeSpacing as re}from"@domphy/theme";function Jm(n={}){var r;let o=da((r=n.accentColor)!=null?r:"primary","accentColor");return{role:"switch",dataTone:"shift-2",type:"checkbox",_onSchedule:e=>{if(e.tagName!=="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:e=>_n(e,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:re(9),height:re(6),cursor:"pointer",margin:"0",paddingBlock:re(1),"&:checked":{"&::before":{backgroundColor:e=>yo(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${re(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:re(3),height:re(3),borderRadius:re(999),left:re(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>yo(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:re(999),display:"inline-block",fontSize:e=>_n(e,"inherit"),lineHeight:1,backgroundColor:e=>yo(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Rn}from"@domphy/core";import{themeColor as H,themeDensity as bo,themeSize as pa,themeSpacing as fe}from"@domphy/theme";function tu(n={}){var e,a;let o=Rn((e=n.color)!=null?e:"neutral","color"),r=Rn((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"text",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),i.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:fe(10),paddingInline:t=>fe(bo(t)*3),paddingBlock:t=>fe(bo(t)*1),borderRadius:t=>fe(bo(t)*1),fontSize:t=>pa(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${H(t,"shift-4",o.get(t))}`,color:t=>H(t,"shift-9",o.get(t)),backgroundColor:t=>H(t,"inherit",o.get(t)),"&::placeholder":{color:t=>H(t,"shift-7")},"&:not(:placeholder-shown)":{color:t=>H(t,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${fe(.5)} solid ${H(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>H(t,"shift-2","neutral"),outline:t=>`1px solid ${H(t,"shift-4","neutral")}`,color:t=>H(t,"shift-8","neutral")},"&:invalid:not(:placeholder-shown)":{outline:t=>`${fe(.5)} solid ${H(t,"shift-6","error")}`},"&[data-status=error]":{outline:t=>`${fe(.5)} solid ${H(t,"shift-6","error")}`},"&[data-status=warning]":{outline:t=>`${fe(.5)} solid ${H(t,"shift-6","warning")}`}}}}import{toState as ha}from"@domphy/core";import{themeColor as So,themeSize as fa,themeSpacing as Co}from"@domphy/theme";function iu(n={}){var r;let o=ha((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>fa(e,"inherit"),color:e=>So(e,"shift-9",o.get(e)),backgroundColor:e=>So(e,"inherit",o.get(e)),paddingBlock:Co(.5),paddingInline:Co(1.5),borderRadius:Co(1),outline:e=>`1px solid ${So(e,"shift-4",o.get(e))}`}}}import{toState as An}from"@domphy/core";import{themeColor as vo,themeSize as ga,themeSpacing as ya}from"@domphy/theme";function cu(n={}){var e,a;let o=An((e=n.color)!=null?e:"neutral","color"),r=An((a=n.accentColor)!=null?a:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:ya(2),fontSize:t=>ga(t,"inherit"),color:t=>vo(t,"shift-9",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>vo(t,"shift-10",r.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>vo(t,"shift-8","neutral")}}}}import{toState as Nn}from"@domphy/core";import{themeColor as Ae,themeSize as ba,themeSpacing as Eo}from"@domphy/theme";function pu(n={}){var e,a;let o=Nn((e=n.color)!=null?e:"primary","color"),r=Nn((a=n.accentColor)!=null?a:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:t=>ba(t,"inherit"),backgroundColor:t=>Ae(t),color:t=>Ae(t,"shift-9",o.get(t)),textDecoration:"none","&:visited":{color:t=>Ae(t,"shift-9",r.get(t))},"&:hover:not([disabled])":{color:t=>Ae(t,"shift-10",o.get(t)),textDecoration:"underline"},"&:focus-visible":{borderRadius:Eo(1),outlineOffset:Eo(1),outline:t=>`${Eo(.5)} solid ${Ae(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>Ae(t,"shift-8","neutral")}}}}import{toState as Sa}from"@domphy/core";import{themeColor as ie,themeDensity as At,themeSize as Ca,themeSpacing as dt}from"@domphy/theme";function yu(n={}){var r;let o=Sa((r=n.color)!=null?r:"primary","color");return{_onInsert:e=>{e.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:e=>Ca(e,"inherit"),textDecoration:"none",paddingBlock:e=>dt(At(e)*1),paddingInline:e=>dt(At(e)*3),borderRadius:e=>dt(At(e)*1),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:e=>dt(At(e)*1),userSelect:"none",cursor:"pointer",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${ie(e,"shift-4",o.get(e))}`,color:e=>ie(e,"shift-9",o.get(e)),backgroundColor:e=>ie(e,"inherit",o.get(e)),"&:hover":{color:e=>ie(e,"shift-10",o.get(e)),backgroundColor:e=>ie(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${dt(.5)} ${ie(e,"shift-6",o.get(e))}`},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:e=>ie(e,"shift-2","neutral"),outline:e=>`1px solid ${ie(e,"shift-4","neutral")}`,color:e=>ie(e,"shift-8","neutral")}}}}import{toState as va}from"@domphy/core";import{themeColor as pt,themeDensity as ke,themeSize as Hn,themeSpacing as xe}from"@domphy/theme";function vu(n={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Eu(n={}){let{dense:o=!1}=n;return{style:{display:"flex",alignItems:"center",gap:r=>xe(ke(r)*2),paddingBlock:r=>xe(o?1:ke(r)*2),paddingInline:r=>xe(ke(r)*3),fontSize:r=>Hn(r,"inherit")}}}function ku(n={}){var a,t;let o=va((a=n.color)!=null?a:"neutral","color"),r=(t=n.accentColor)!=null?t:"primary",{dense:e=!1}=n;return{style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:i=>xe(ke(i)*2),paddingBlock:i=>xe(e?1:ke(i)*2),paddingInline:i=>xe(ke(i)*3),fontSize:i=>Hn(i,"inherit"),color:i=>pt(i,"shift-9",o.get(i)),borderRadius:i=>xe(ke(i)*1),transition:"background-color 150ms ease","&:hover:not([disabled])":{backgroundColor:i=>pt(i,"shift-2",o.get(i))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:i=>pt(i,"shift-3",r),color:i=>pt(i,"shift-12",r)},"&:focus-visible":{outline:i=>`2px solid ${pt(i,"shift-6",r)}`,outlineOffset:"-2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as Ea}from"@domphy/core";import{themeColor as Bn,themeSize as ka,themeSpacing as ko}from"@domphy/theme";function Du(n={}){var r;let o=Ea((r=n.accentColor)!=null?r:"highlight","accentColor");return{_onInsert:e=>{e.tagName!=="mark"&&console.warn('"mark" primitive patch must use mark tag')},dataTone:"shift-2",style:{display:"inline-flex",alignItems:"center",fontSize:e=>ka(e,"inherit"),color:e=>Bn(e,"shift-9",o.get(e)),backgroundColor:e=>Bn(e,"inherit",o.get(e)),height:ko(6),borderRadius:ko(1),paddingInline:ko(1.5)}}}import{toState as xa}from"@domphy/core";import{themeColor as we,themeDensity as Nt,themeSize as Fn,themeSpacing as Te}from"@domphy/theme";function $u(n={items:[]}){var i;let{items:o=[],selectable:r=!0,color:e="neutral",accentColor:a="primary"}=n,t=xa((i=n.activeKey)!=null?i:null);return{role:"menu",dataTone:"shift-17",_onSchedule:(s,l)=>{if(o.length===0)return;let p=s.nodeId,c=o.map((m,y)=>{var u;let g=(u=m.key)!=null?u:y;return Oe(K({button:typeof m.label=="string"?[{span:m.label}]:[m.label],_key:g,id:`menuitem${p}${g}`,role:"menuitem"},r?{ariaCurrent:d=>t.get(d)===g||void 0}:{}),{onClick:()=>{var d;r&&t.set(g),(d=m.onClick)==null||d.call(m)},onKeyDown:d=>{var D;let h=d.key;if(h==="Enter"||h===" "){d.preventDefault(),d.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(h))return;d.preventDefault();let S=o.map((C,w)=>{var P;return(P=C.key)!=null?P:w}),v=S.findIndex(C=>C===g),E=v;h==="ArrowDown"?E=(v+1)%S.length:h==="ArrowUp"?E=(v-1+S.length)%S.length:h==="Home"?E=0:h==="End"&&(E=S.length-1),(D=document.getElementById(`menuitem${p}${S[E]}`))==null||D.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:Te(2),width:"100%",fontSize:d=>Fn(d,"inherit"),height:d=>Te(6+Nt(d)*2),paddingInline:d=>Te(Nt(d)*3),border:"none",outline:"none",color:d=>we(d,"shift-9",e),backgroundColor:d=>we(d,"inherit",e),"&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:d=>we(d,"shift-2",e)},"&[aria-current=true]":{backgroundColor:d=>we(d,"shift-3",a),color:d=>we(d,"shift-10")},"&:focus-visible":{outline:d=>`${Te(.5)} solid ${we(d,"shift-6",a)}`,outlineOffset:`-${Te(.5)}`}}})});l[s.tagName]=c},style:{display:"flex",flexDirection:"column",paddingBlock:s=>Te(Nt(s)*2),paddingInline:s=>Te(Nt(s)*2),fontSize:s=>Fn(s,"inherit"),backgroundColor:s=>we(s,"inherit",e)}}}var Wn=n=>!!n&&typeof n.get=="function"&&n._isState===!0,Ne=n=>{let o={},r=[];for(let e in n){let a=n[e];e==="x"?r.push(`translateX(${typeof a=="number"?`${a}px`:a})`):e==="y"?r.push(`translateY(${typeof a=="number"?`${a}px`:a})`):e==="scale"?r.push(`scale(${a})`):e==="rotate"?r.push(`rotate(${typeof a=="number"?`${a}deg`:a})`):o[e]=a}return r.length&&(o.transform=r.join(" ")),o};function Vu(n={}){var i,s,l,p;let{initial:o,animate:r,exit:e,transition:a={}}=n,t={duration:(i=a.duration)!=null?i:300,delay:(s=a.delay)!=null?s:0,easing:(l=a.easing)!=null?l:"ease",iterations:(p=a.iterations)!=null?p:1,fill:"both"};return{_onMount:c=>{let m=c.domElement;if(!m||typeof m.animate!="function")return;let y=Wn(r)?r.get():r;if(y?m.animate(o?[Ne(o),Ne(y)]:[Ne(y)],t):o&&Object.assign(m.style,Ne(o)),Wn(r)){let g=r.addListener(u=>{m.animate([Ne(u)],t)});c.setMetadata("motionRelease",g)}},_onBeforeRemove:(c,m)=>{let y=c.domElement;if(!y||!e||typeof y.animate!="function")return m();y.animate([Ne(e)],t).finished.then(m,m)},_onRemove:c=>{let m=c.getMetadata("motionRelease");m==null||m()}}}import{toState as wa}from"@domphy/core";import{themeColor as Kn,themeSize as Ta,themeSpacing as Da}from"@domphy/theme";function Au(n={}){var r;let o=wa((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>Ta(e,"inherit"),backgroundColor:e=>Kn(e),color:e=>Kn(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:Da(3),listStyleType:"decimal",listStylePosition:"outside"}}}import{toState as Pa}from"@domphy/core";import{themeColor as He,themeDensity as ht,themeSize as Oa,themeSpacing as Be}from"@domphy/theme";function La(n,o){if(o<=7)return Array.from({length:o},(t,i)=>i+1);let r=[1];n>3&&r.push("...");let e=Math.max(2,n-1),a=Math.min(o-1,n+1);for(let t=e;t<=a;t++)r.push(t);return n<o-2&&r.push("..."),r.push(o),r}function Fu(n){var s;let{total:o,color:r="neutral",accentColor:e="primary"}=n,a=Pa((s=n.value)!=null?s:1),t={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:l=>Be(6+ht(l)*2),height:l=>Be(6+ht(l)*2),paddingInline:l=>Be(ht(l)*2),borderRadius:l=>Be(ht(l)*1),border:"none",cursor:"pointer",fontSize:l=>Oa(l,"inherit"),backgroundColor:"transparent",color:l=>He(l,"shift-9",r),"&:hover:not([disabled])":{backgroundColor:l=>He(l,"shift-2",r)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},i=Oe(K({},t),{backgroundColor:l=>He(l,"shift-6",e),color:l=>He(l,"shift-11",e),fontWeight:"600",cursor:"default","&:hover:not([disabled])":{backgroundColor:l=>He(l,"shift-6",e)}});return{role:"navigation",ariaLabel:"Pagination",_onInsert:l=>{l.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:l=>{let p={div:c=>{let m=a.get(c),y=[];y.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:m<=1,onClick:()=>m>1&&a.set(m-1),style:t});let g=0;for(let u of La(m,o))if(u==="...")y.push({span:"\u2026",_key:`ellipsis-${g++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:d=>Be(ht(d)*2),color:d=>He(d,"shift-7",r)}});else{let d=u===m;y.push({button:String(u),_key:`page-${u}`,type:"button",ariaLabel:`Page ${u}`,ariaCurrent:d?"page":void 0,disabled:d,onClick:()=>a.set(u),style:d?i:t})}return y.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:m>=o,onClick:()=>m<o&&a.set(m+1),style:t}),y},style:{display:"flex",alignItems:"center",gap:Be(1)}};l.children.insert(p)},style:{display:"inline-flex"}}}import{toState as $a}from"@domphy/core";import{themeColor as Ia,themeSize as za}from"@domphy/theme";function qu(n={}){var r;let o=$a((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>za(e,"inherit"),color:e=>Ia(e,"shift-9",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}import{merge as Va,toState as jn}from"@domphy/core";import{themeColor as Ma}from"@domphy/theme";function Zu(n){var y;let{open:o=!1,placement:r="bottom",openOn:e="click"}=n,a=null,t=jn(o),i=jn(r),{show:s,hide:l,anchorPartial:p}=j({kind:"popover",open:t,placement:i,content:n.content}),c={role:"dialog",dataTone:"shift-14",style:{backgroundColor:g=>Ma(g,"inherit")},onMouseEnter:()=>e==="hover"&&s(),onMouseLeave:()=>e==="hover"&&l(),_onInsert:g=>{let u=g.attributes.get("id");a=u||g.nodeId,!u&&g.attributes.set("id",a)}};return(y=n.content).$||(y.$=[]),n.content.$.push(c),Va(p,{ariaHaspopup:"dialog",ariaExpanded:g=>t.get(g),onMouseEnter:(g,u)=>e==="hover"&&s(u),onMouseLeave:(g,u)=>e==="hover"&&l(u),onClick:(g,u)=>{e==="click"&&(t.get()?l(u):s(u))},onKeyDown:(g,u)=>{g.key==="Escape"&&t.get()&&l(u)},onFocus:(g,u)=>e==="hover"&&s(u),onBlur:(g,u)=>{let d=g.relatedTarget,h=u.getRoot().domElement,S=a?h.querySelector(`#${CSS.escape(a)}`):null;d&&(S!=null&&S.contains(d))||l(u)},_onMount:g=>a&&g.attributes.set("ariaControls",a)}),p}import{toState as _a}from"@domphy/core";import{themeColor as Ht,themeSize as Ra,themeSpacing as xo}from"@domphy/theme";function Yn(n={}){let{placement:o="bottom-end",color:r="neutral",sideOffset:e=xo(6),bordered:a=!0}=n,t=_a(o),i={top:"bottom",bottom:"top",left:"right",right:"left","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},s=c=>{var m;return(m=i[t.get(c)])!=null?m:i["bottom-end"]},l=c=>c.includes("start")?e:c.includes("end")?"auto":"50%",p=c=>c.includes("end")?e:c.includes("start")?"auto":"50%";return{style:{fontSize:c=>Ra(c),backgroundColor:c=>Ht(c),color:c=>Ht(c,"shift-9",r),position:"relative","&::after":{content:'""',position:"absolute",width:xo(1.5),height:xo(1.5),backgroundColor:c=>Ht(c,"inherit",r),borderWidth:a?"1px":"0px",borderColor:c=>Ht(c,"inherit",r),borderTopStyle:c=>{let m=s(c);return m.includes("top")||m.includes("right")?"solid":"none"},borderBottomStyle:c=>{let m=s(c);return m.includes("bottom")||m.includes("left")?"solid":"none"},borderLeftStyle:c=>{let m=s(c);return m.includes("top")||m.includes("left")?"solid":"none"},borderRightStyle:c=>{let m=s(c);return m.includes("bottom")||m.includes("right")?"solid":"none"},top:c=>{let m=s(c);return m.includes("top")?0:m.includes("bottom")?"auto":l(m)},right:c=>{let m=s(c);return m.includes("right")?0:m.includes("left")?"auto":p(m)},bottom:c=>{let m=s(c);return m.includes("bottom")?0:m.includes("top")?"auto":p(m)},left:c=>{let m=s(c);return m.includes("left")?0:m.includes("right")?"auto":l(m)},transform:c=>{let m=s(c),y=m.includes("right")||m.includes("end")&&!m.includes("left")?"50%":"-50%",g=m.includes("bottom")||m.includes("end")&&!m.includes("top")?"50%":"-50%";return`translate(${y},${g}) rotate(45deg)`}}}}}import{toState as Aa}from"@domphy/core";import{themeColor as qn,themeDensity as wo,themeSize as Na,themeSpacing as To}from"@domphy/theme";function id(n={}){var r;let o=Aa((r=n.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>Na(e,"inherit"),color:e=>qn(e,"shift-9",o.get(e)),backgroundColor:e=>qn(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>To(wo(e)*2),paddingInline:e=>To(wo(e)*3),borderRadius:e=>To(wo(e)*2)}}}import{toState as Gn}from"@domphy/core";import{themeColor as Do,themeSpacing as Bt}from"@domphy/theme";function cd(n={}){var e,a;let o=Gn((e=n.color)!=null?e:"neutral","color"),r=Gn((a=n.accentColor)!=null?a:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},style:{appearance:"none",width:"100%",height:Bt(2),border:0,borderRadius:Bt(999),overflow:"hidden",backgroundColor:t=>Do(t,"shift-3",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>Do(t,"shift-3",o.get(t)),borderRadius:Bt(999)},"&::-webkit-progress-value":{backgroundColor:t=>Do(t,"shift-9",r.get(t)),borderRadius:Bt(999),transition:"width 220ms ease"}}}}import{toState as Un}from"@domphy/core";import{themeColor as Ha,themeSpacing as Ba}from"@domphy/theme";var Fa='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>',Wa='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/></svg>';function pd(n={}){var l,p;let{max:o=5,readOnly:r=!1,onChange:e}=n,a=(l=n.color)!=null?l:"warning",t=Un((p=n.value)!=null?p:0),i=Un(0),s=c=>{let m=i.get(c);return m>0?m:t.get(c)};return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:Ba(.5),fontSize:"1.5rem",cursor:r?"default":"pointer",color:c=>Ha(c,"shift-8",a)},_onInit:c=>{for(let m=1;m<=o;m++){let y=m,g=r?{}:{onClick:()=>{let d=y===t.get()?0:y;t.set(d),e==null||e(d),i.set(0)},onMouseEnter:()=>i.set(y),onMouseLeave:()=>i.set(0),onKeyDown:d=>{var E,D;let h=t.get(),S=h;if(d.key==="ArrowRight"||d.key==="ArrowUp")S=Math.min(o,h+1),d.preventDefault();else if(d.key==="ArrowLeft"||d.key==="ArrowDown")S=Math.max(0,h-1),d.preventDefault();else return;t.set(S),e==null||e(S);let v=S>0?S-1:0;(D=(E=c.domElement)==null?void 0:E.children[v])==null||D.focus()}},u=Oe(K({button:d=>y<=s(d)?Fa:Wa,_key:y,type:"button",ariaLabel:`${y} star${y>1?"s":""}`},g),{style:{background:"none",border:"none",padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center"}});c.children.insert(u)}}}}import{toState as Po}from"@domphy/core";import{themeColor as Xn,themeSpacing as Jn}from"@domphy/theme";function bd(n={}){var l,p,c;let{size:o=16,thickness:r=.25}=n,e=Po((l=n.value)!=null?l:0,"value"),a=Po((p=n.color)!=null?p:"primary","color"),t=Po((c=n.trackColor)!=null?c:"neutral","trackColor"),i=Math.round((1-r)*100),s=`radial-gradient(circle closest-side, transparent ${i}%, black ${i}%)`;return{role:"progressbar",ariaValuenow:m=>String(Math.round(e.get(m))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:m=>{m.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:Jn(o),height:Jn(o),borderRadius:"50%",background:m=>`conic-gradient(from -90deg, ${Xn(m,"shift-9",a.get(m))} ${e.get(m)}%, ${Xn(m,"shift-3",t.get(m))} 0%)`,WebkitMask:s,mask:s}}}import{toState as Ka}from"@domphy/core";import{themeColor as Oo,themeSpacing as Ft}from"@domphy/theme";function Ed(n={}){var r;let o=Ka((r=n.color)!=null?r:"neutral","color");return{style:{overflow:"auto","&::-webkit-scrollbar":{width:Ft(2),height:Ft(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>Oo(e,"shift-5",o.get(e)),borderRadius:Ft(999),border:`${Ft(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e=>Oo(e,"shift-7",o.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${Oo(e,"shift-5",o.get(e))} transparent`}}}import{toState as ja}from"@domphy/core";import{themeColor as Fe,themeSize as Ya,themeSpacing as Y}from"@domphy/theme";function Td(n={items:[]}){var t,i,s;let{items:o=[],color:r="neutral",accentColor:e="primary"}=n,a=ja((s=n.value)!=null?s:(i=(t=o[0])==null?void 0:t.key)!=null?i:"");return{role:"radiogroup",_context:{segmented:{value:a}},_onSchedule:(l,p)=>{let c=o.map((m,y)=>{var d;let g=(d=m.key)!=null?d:String(y);return{button:[typeof m.label=="string"?{span:m.label}:m.label],_key:g,role:"radio",ariaChecked:h=>a.get(h)===g,onClick:()=>a.set(g),style:{cursor:"pointer",fontSize:h=>Ya(h,"inherit"),height:Y(6),paddingBlock:Y(1),paddingInline:Y(3),border:"none",borderRadius:Y(10),color:h=>Fe(h,"shift-9",r),backgroundColor:"transparent",transition:"background-color 300ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:h=>Fe(h,"shift-3",r)},"&[aria-checked=true]":{backgroundColor:h=>Fe(h,"shift-0",e),color:h=>Fe(h,"shift-10",e)},"&:focus-visible":{outline:h=>`${Y(.5)} solid ${Fe(h,"shift-6",e)}`,outlineOffset:`-${Y(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});p[l.tagName]=c},style:{display:"inline-flex",paddingBlock:Y(1),paddingInline:Y(1),gap:Y(.5),borderRadius:Y(10),backgroundColor:l=>Fe(l,"shift-2",r)}}}import{themeColor as q,themeColorToken as qa,themeDensity as ft,themeSize as Ga,themeSpacing as G}from"@domphy/theme";function Od(n={}){let{color:o="neutral",accentColor:r="primary"}=n;return{_onInsert:e=>{e.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:e=>Ga(e,"inherit"),lineHeight:"inherit",color:e=>q(e,"shift-9",o),backgroundColor:e=>q(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${q(e,"shift-4",o)}`,borderRadius:e=>G(ft(e)*1),paddingBlock:e=>G(ft(e)*1),paddingLeft:e=>G(ft(e)*3),paddingRight:e=>G(ft(e)*5),backgroundImage:e=>{let a=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${qa(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(a)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${G(2)} center`,backgroundSize:`${G(2.5)} ${G(1.5)}`,"&:not([multiple])":{height:e=>G(6+ft(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`${G(.5)} solid ${q(e,"shift-5",r)}`},"&:focus-visible":{outline:e=>`${G(.5)} solid ${q(e,"shift-6",r)}`},"& optgroup":{color:e=>q(e,"shift-11",o)},"& option[disabled]":{color:e=>q(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>q(e,"shift-8","neutral"),outline:e=>`1px solid ${q(e,"shift-4","neutral")}`,backgroundColor:e=>q(e,"shift-2","neutral")}}}}import{merge as Zn,toState as Lo}from"@domphy/core";import{themeColor as $o,themeDensity as Io,themeSize as Ua,themeSpacing as gt}from"@domphy/theme";function Md(n){let{options:o=[],placement:r="bottom",color:e="neutral",open:a=!1,multiple:t=!1}=n,i=Lo(n.value),s=Lo(a),{show:l,hide:p,anchorPartial:c}=j({kind:"selectBox",open:s,placement:Lo(r),content:n.content}),m={onClick:(u,d)=>!t&&p(d)};Zn(n.content,m);let y={div:u=>{let d=i.get(u),h=Array.isArray(d)?d:[d];return o.filter(v=>h.includes(v.value)).map(v=>({span:v.label,$:[wt({color:e,removable:t})],_key:v.value,_onRemove:E=>{let D=i.get(),w=(Array.isArray(D)?D:[D]).filter(P=>P!==v.value);t?i.set(w):i.set(w[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:gt(1),flex:1}},g={_onInsert:u=>{u.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:u=>u.children.insert(y),onClick:(u,d)=>s.get()?p(d):l(d),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:u=>gt(6+Io(u)*2),minWidth:gt(32),outlineOffset:"-1px",outline:u=>`1px solid ${$o(u,"shift-4","neutral")}`,paddingInline:u=>gt(Io(u)*2),borderRadius:u=>gt(Io(u)*1),fontSize:u=>Ua(u,"inherit"),color:u=>$o(u,"shift-9",e),backgroundColor:u=>$o(u,"inherit",e)}};return Zn(c,g),c}import{themeColor as We,themeDensity as Qn,themeSize as Xa,themeSpacing as Wt}from"@domphy/theme";function Ad(n={}){let{accentColor:o="primary",color:r="neutral",value:e=null}=n;return{role:"option",_onInit:t=>{t.tagName!=="div"&&console.warn('"selectItem" patch must use div tag');let i=t.getContext("select");if(i){let s=i.value;t.attributes.set("ariaSelected",l=>{let p=s.get(l);return i.multiple?p.includes(e):p===e}),t.addEvent("click",()=>{let l=s.get();i.multiple?l.includes(e)?s.set(l.filter(p=>p!==e)):s.set(l.concat([e])):l!==e&&s.set(e)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>Xa(t,"inherit"),height:t=>Wt(6+Qn(t)*2),paddingInline:t=>Wt(Qn(t)*3),border:"none",outline:"none",color:t=>We(t,"shift-9",r),backgroundColor:t=>We(t,"inherit",r),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>We(t,"shift-2",r)},"&[aria-selected=true]":{backgroundColor:t=>We(t,"shift-6",o),color:t=>We(t,"shift-11")},"&:focus-visible":{outline:t=>`${Wt(.5)} solid ${We(t,"shift-6",o)}`,outlineOffset:`-${Wt(.5)}`}}}}import{toState as Ja}from"@domphy/core";import{themeColor as Za,themeDensity as er,themeSize as Qa,themeSpacing as tr}from"@domphy/theme";function Fd(n={}){var i;let{color:o="neutral",multiple:r=!1}=n,e=Ja((i=n.value)!=null?i:r?[]:null),a={div:s=>{let l=e.get(s);return(Array.isArray(l)?l:[l]).map(c=>({input:null,name:n.name,value:c==null?"":String(c)}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:e,multiple:r}},_onInit:s=>{s.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),s.children.insert(a)},style:{display:"flex",flexDirection:"column",paddingBlock:s=>tr(er(s)*2),paddingInline:s=>tr(er(s)*2),fontSize:s=>Qa(s,"inherit"),backgroundColor:s=>Za(s,"inherit",o)}}}import{hashString as el,toState as tl}from"@domphy/core";import{themeColor as or,themeSize as ol,themeSpacing as nr}from"@domphy/theme";function Yd(n={}){var a;let o=tl((a=n.color)!=null?a:"neutral","color"),r={"0%,100%":{opacity:1},"50%":{opacity:.4}},e=el(JSON.stringify(r));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:t=>ol(t),color:t=>or(t,"shift-9",o.get(t)),height:nr(6),display:"block",borderRadius:nr(1),backgroundColor:t=>or(t,"inherit",o.get(t)),animation:`${e} 1.5s ease-in-out infinite`,[`@keyframes ${e}`]:r}}}import{toState as nl}from"@domphy/core";import{themeColor as rl,themeSize as il}from"@domphy/theme";function Xd(n={}){var r;let o=nl((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:e=>il(e,"inherit"),color:e=>rl(e,"shift-9",o.get(e))}}}import{hashString as al,toState as ll}from"@domphy/core";import{themeColor as Kt,themeSize as sl,themeSpacing as zo}from"@domphy/theme";var ir={to:{transform:"rotate(360deg)"}},rr=al(JSON.stringify(ir));function ep(n={}){var r;let o=ll((r=n.color)!=null?r:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:e=>{e.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:e=>sl(e),backgroundColor:e=>Kt(e),color:e=>Kt(e,"shift-9",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:zo(6),height:zo(6),borderRadius:"50%",border:e=>`${zo(.5)} solid ${Kt(e,"shift-4",o.get(e))}`,borderTopColor:e=>Kt(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${rr} 0.7s linear infinite`,[`@keyframes ${rr}`]:ir}}}import{merge as cl,toState as ml}from"@domphy/core";import{themeColor as jt,themeSpacing as Vo}from"@domphy/theme";function rp(n={}){let{direction:o="horizontal",defaultSize:r=50,min:e=10,max:a=90}=n;return{_onSchedule:(t,i)=>{cl(i,{_context:{splitter:{direction:o,size:ml(r),min:e,max:a,panelCount:0}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function ip(){return{_onMount:n=>{let o=n.getContext("splitter");if(!o){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let r=n.domElement,e=o.direction==="horizontal"?"width":"height",a=o.panelCount++===0,t=s=>{r.style[e]=`${a?s:100-s}%`};t(o.size.get()),r.style.flexShrink="0",r.style.overflow="auto";let i=o.size.addListener(t);n.addHook("Remove",i)}}}function ap(){return{role:"separator",tabindex:0,_onMount:n=>{let o=n.getContext("splitter");if(!o){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let r=n.domElement,e=o.direction==="horizontal";r.style.cursor=e?"col-resize":"row-resize",r.setAttribute("aria-orientation",e?"vertical":"horizontal"),r.setAttribute("aria-valuemin",String(o.min)),r.setAttribute("aria-valuemax",String(o.max)),r.setAttribute("aria-valuenow",String(Math.round(o.size.get())));let a=o.size.addListener(l=>{r.setAttribute("aria-valuenow",String(Math.round(l)))}),t=l=>{let p=l.shiftKey?10:1,c=null;e?l.key==="ArrowRight"?c=Math.min(o.size.get()+p,o.max):l.key==="ArrowLeft"&&(c=Math.max(o.size.get()-p,o.min)):l.key==="ArrowDown"?c=Math.min(o.size.get()+p,o.max):l.key==="ArrowUp"&&(c=Math.max(o.size.get()-p,o.min)),l.key==="Home"?c=o.min:l.key==="End"&&(c=o.max),c!==null&&(l.preventDefault(),o.size.set(c))},i=null,s=l=>{l.preventDefault();let p=r.parentElement,c=y=>{let g=p.getBoundingClientRect(),u=e?(y.clientX-g.left)/g.width*100:(y.clientY-g.top)/g.height*100;o.size.set(Math.min(Math.max(u,o.min),o.max))},m=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",m),i=null};i=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",m),i=null},document.addEventListener("mousemove",c),document.addEventListener("mouseup",m)};r.addEventListener("keydown",t),r.addEventListener("mousedown",s),n.addHook("Remove",()=>{i==null||i(),a(),r.removeEventListener("keydown",t),r.removeEventListener("mousedown",s)})},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:n=>jt(n,"shift-2"),"&:hover":{backgroundColor:n=>jt(n,"shift-3")},"&:focus-visible":{outline:n=>`2px solid ${jt(n,"shift-6")}`,outlineOffset:"2px"},"&::after":{content:'""',width:Vo(1),height:Vo(1),borderRadius:Vo(999),backgroundColor:n=>jt(n,"shift-4")}}}}import{toState as ul}from"@domphy/core";import{themeColor as M,themeSize as ar,themeSpacing as ge}from"@domphy/theme";function mp(n={items:[]}){var i;let{items:o=[],direction:r="horizontal",color:e="neutral",accentColor:a="primary"}=n,t=ul((i=n.current)!=null?i:0);return{_context:{steps:{current:t,direction:r,color:e,accentColor:a}},_onSchedule:(s,l)=>{let p=o.map((c,m)=>{var g;return{li:[typeof c.label=="string"?{span:c.label}:c.label],_key:(g=c.key)!=null?g:m,dataStep:String(m+1),dataStatus:u=>{let d=t.get(u);return m<d?"done":m===d?"active":"pending"},ariaCurrent:u=>t.get(u)===m?"step":void 0,style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:ge(1),flex:"1",fontSize:u=>ar(u,"decrease-1"),textAlign:"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:ge(6),height:ge(6),borderRadius:ge(999),fontSize:u=>ar(u,"decrease-1"),fontWeight:"600",flexShrink:"0",border:u=>`2px solid ${M(u,"shift-4",e)}`,backgroundColor:u=>M(u,"inherit"),color:u=>M(u,"shift-8"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"},"&:not(:first-child)::after":{content:'""',position:"absolute",top:ge(3),right:`calc(50% + ${ge(3)})`,left:`calc(-50% + ${ge(3)})`,height:"2px",backgroundColor:u=>M(u,"shift-3",e),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:u=>M(u,"shift-6",a),borderColor:u=>M(u,"shift-6",a),color:u=>M(u,"shift-15",a)},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:u=>M(u,"shift-3",e),borderColor:u=>M(u,"shift-3",e),color:u=>M(u,"shift-9",e)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:u=>M(u,"shift-3",e)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:u=>M(u,"shift-6",a)},"&[data-status=pending]":{color:u=>M(u,"shift-7")},"&[data-status=active]":{color:u=>M(u,"shift-10"),fontWeight:"600"},"&[data-status=done]":{color:u=>M(u,"shift-8")}}}});l[s.tagName]=p},style:{display:"flex",flexDirection:r==="vertical"?"column":"row",alignItems:r==="vertical"?"flex-start":"center",gap:ge(2),listStyle:"none",margin:"0",padding:"0"}}}import{toState as dl}from"@domphy/core";import{themeColor as lr,themeSize as pl}from"@domphy/theme";function hp(n={}){var r;let o=dl((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>pl(e,"inherit"),fontWeight:700,color:e=>lr(e,"shift-11",o.get(e)),backgroundColor:e=>lr(e)}}}import{toState as hl}from"@domphy/core";import{themeColor as fl,themeSize as gl}from"@domphy/theme";function bp(n={}){var r;let o=hl((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>gl(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>fl(e,"shift-9",o.get(e))}}}import{toState as yl}from"@domphy/core";import{themeColor as bl,themeSize as Sl}from"@domphy/theme";function Ep(n={}){var r;let o=yl((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>Sl(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>bl(e,"shift-9",o.get(e))}}}import{toState as Cl}from"@domphy/core";import{themeColor as U,themeDensity as Ke,themeSize as sr,themeSpacing as je}from"@domphy/theme";function Tp(n={}){var r;let o=Cl((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:e=>sr(e,"inherit"),color:e=>U(e,"shift-9",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>je(Ke(e)*3),paddingBlock:e=>je(Ke(e)*1),color:e=>U(e,"shift-10",o.get(e)),backgroundColor:e=>U(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>je(Ke(e)*3),paddingBlock:e=>je(Ke(e)*1),color:e=>U(e,"shift-9",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${U(e,"shift-3",o.get(e))}`,fontSize:e=>sr(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>je(Ke(e)*3),paddingBlock:e=>je(Ke(e)*1),color:e=>U(e,"shift-10",o.get(e)),backgroundColor:e=>U(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${U(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>U(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>`${U(e,"shift-2")}!important`}}}}import{toState as vl}from"@domphy/core";import{themeColor as Ye,themeDensity as Yt,themeSize as El,themeSpacing as ye}from"@domphy/theme";function Lp(n={items:[]}){var t,i,s;let{items:o=[],accentColor:r="primary",color:e="neutral"}=n,a=vl((s=n.activeKey)!=null?s:(i=(t=o[0])==null?void 0:t.key)!=null?i:0);return{_onSchedule:(l,p)=>{let c=l.nodeId,y={div:o.map((u,d)=>{var v;let h=(v=u.key)!=null?v:d;return{button:[typeof u.label=="string"?{span:u.label}:u.label],_key:h,role:"tab",id:`tab${c}${h}`,ariaControls:`panel${c}${h}`,ariaSelected:E=>a.get(E)===h,onClick:()=>a.set(h),onKeyDown:E=>{let D=E.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(D))return;E.preventDefault();let C=o.map((W,De)=>{var ae;return(ae=W.key)!=null?ae:De}),w=C.findIndex(W=>W===h),P=w;D==="ArrowRight"?P=(w+1)%C.length:D==="ArrowLeft"?P=(w-1+C.length)%C.length:D==="Home"?P=0:D==="End"&&(P=C.length-1),a.set(C[P])},style:{cursor:"pointer",fontSize:E=>El(E,"inherit"),height:E=>ye(6+Yt(E)*2),paddingInline:E=>ye(Yt(E)*4),border:"none",outline:"none",color:E=>Ye(E,"shift-9"),backgroundColor:E=>Ye(E,"inherit"),boxShadow:E=>`inset 0 -${ye(.5)} 0 0 ${Ye(E,"shift-1",e)}`,"&:hover:not([disabled])":{boxShadow:E=>`inset 0 -${ye(.5)} 0 0 ${Ye(E,"shift-2",e)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:E=>`inset 0 -${ye(.5)} 0 0 ${Ye(E,"shift-6",r)}`},"&:focus-visible":{boxShadow:E=>`inset 0 -${ye(.5)} 0 0 ${Ye(E,"shift-6",r)}`}}}}),role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},g=o.map((u,d)=>{var S;let h=(S=u.key)!=null?S:d;return{div:[u.content],_key:h,role:"tabpanel",id:`panel${c}${h}`,ariaLabelledby:`tab${c}${h}`,hidden:v=>a.get(v)!==h,style:{paddingBlock:v=>ye(Yt(v)*2),paddingInline:v=>ye(Yt(v)*2)}}});p[l.tagName]=[y,...g]}}}import{toState as cr}from"@domphy/core";import{themeColor as X,themeDensity as Mo,themeSize as kl,themeSpacing as qe}from"@domphy/theme";function Vp(n={}){var a,t;let o=cr((a=n.color)!=null?a:"neutral","color"),r=cr((t=n.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=n;return{_onInsert:i=>{i.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:i=>{if(e){let s=i.domElement;s.style.overflow="hidden";let l=()=>{s.style.height="auto",s.style.height=`${s.scrollHeight}px`};s.addEventListener("input",l),l(),i.addHook("Remove",()=>s.removeEventListener("input",l))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:i=>qe(Mo(i)*2),paddingBlock:i=>qe(Mo(i)*1.5),border:"none",borderRadius:i=>qe(Mo(i)*1.5),fontSize:i=>kl(i,"inherit"),color:i=>X(i,"shift-9",o.get(i)),outlineOffset:"-1px",outline:i=>`1px solid ${X(i,"shift-4",o.get(i))}`,backgroundColor:i=>X(i,"inherit",o.get(i)),"&::placeholder":{color:i=>X(i,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:i=>`${qe(.5)} solid ${X(i,"shift-5",r.get(i))}`},"&:focus-visible":{outline:i=>`${qe(.5)} solid ${X(i,"shift-6",r.get(i))}`},"&:invalid":{outline:i=>`${qe(.5)} solid ${X(i,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>X(i,"shift-8","neutral"),outline:i=>`1px solid ${X(i,"shift-4","neutral")}`,backgroundColor:i=>X(i,"shift-2","neutral")}}}}import{toState as xl}from"@domphy/core";import{themeColor as mr,themeDensity as _o,themeSpacing as Ro}from"@domphy/theme";function Ap(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Np(n={}){var t,i,s;let{last:o=!1}=n,r=(t=n.color)!=null?t:"neutral",e=(i=n.accentColor)!=null?i:"primary",a=xl((s=n.active)!=null?s:!1);return{style:K({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:l=>Ro(_o(l)*2),paddingBottom:l=>o?"0":Ro(_o(l)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:"0.25em",transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:l=>mr(l,"shift-8",a.get(l)?e:r),opacity:l=>a.get(l)?"1":"0.4"}},o?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:l=>`-${Ro(_o(l)*4)}`,width:"2px",backgroundColor:l=>mr(l,"shift-3",r)}})}}import{toState as wl}from"@domphy/core";import{themeColor as Ao,themeDensity as No,themeSize as Tl,themeSpacing as be}from"@domphy/theme";function Kp(n={}){let{position:o="top-center",color:r="neutral"}=n,e=wl(!1),a=o.startsWith("top"),t=o.endsWith("center"),i=o.endsWith("right"),s={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:a?"column":"column-reverse",alignItems:t?"center":i?"end":"start",inset:0,gap:be(4),zIndex:30,padding:be(6),pointerEvents:"none"}};return{_portal:l=>{let p=l.domElement.querySelector(`#domphy-toast-${o}`);return p||(p=l.children.insert(s).domElement),p},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:be(32),pointerEvents:"auto",paddingBlock:l=>be(No(l)*2),paddingInline:l=>be(No(l)*4),borderRadius:l=>be(No(l)*2),fontSize:l=>Tl(l,"inherit"),color:l=>Ao(l,"shift-9",r),backgroundColor:l=>Ao(l,"inherit",r),boxShadow:l=>`0 ${be(2)} ${be(9)} ${Ao(l,"shift-4","neutral")}`,opacity:l=>Number(e.get(l)),transform:l=>e.get(l)?"translateY(0)":a?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>e.set(!0)),_onBeforeRemove:(l,p)=>{let c=!1,m=null,y=()=>{c||(c=!0,m&&(clearTimeout(m),m=null),l.domElement.removeEventListener("transitionend",g),p())},g=u=>{u.propertyName==="transform"&&y()};l.domElement.addEventListener("transitionend",g),m=setTimeout(y,350),l.addHook("Remove",()=>{var u;m&&(clearTimeout(m),m=null),(u=l.domElement)==null||u.removeEventListener("transitionend",g)}),e.set(!1)}}}import{toState as Dl}from"@domphy/core";import{themeColor as Se,themeSize as ur,themeSpacing as J}from"@domphy/theme";function Gp(n={items:[]}){var i;let{items:o=[],multiple:r=!1,color:e="neutral",accentColor:a="primary"}=n,t=Dl((i=n.value)!=null?i:r?[]:"");return{role:"group",_context:{toggleGroup:{value:t,multiple:r}},_onSchedule:(s,l)=>{let p=o.map((c,m)=>{var u;let y=(u=c.key)!=null?u:String(m);return{button:[typeof c.label=="string"?{span:c.label}:c.label],_key:y,role:"button",ariaPressed:d=>{let h=t.get(d);return Array.isArray(h)?h.includes(y):h===y},onClick:()=>{let d=t.get();if(r){let h=Array.isArray(d)?[...d]:[];t.set(h.includes(y)?h.filter(S=>S!==y):[...h,y])}else t.set(d===y?"":y)},style:{cursor:"pointer",fontSize:d=>ur(d,"inherit"),height:J(6),paddingBlock:J(1),paddingInline:J(2),border:"none",borderRadius:J(1),color:d=>Se(d,"shift-9",e),backgroundColor:d=>Se(d,"inherit",e),transition:"background-color 300ms ease","&:hover:not([disabled])":{backgroundColor:d=>Se(d,"shift-2",e)},"&[aria-pressed=true]":{backgroundColor:d=>Se(d,"shift-3",a),color:d=>Se(d,"shift-12",a)},"&:focus-visible":{outline:d=>`${J(.5)} solid ${Se(d,"shift-6",a)}`,outlineOffset:`-${J(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});l[s.tagName]=p},style:{display:"flex",paddingBlock:J(1),paddingInline:J(1),gap:J(1),borderRadius:J(2),fontSize:s=>ur(s,"inherit"),backgroundColor:s=>Se(s,"inherit",e),outline:s=>`1px solid ${Se(s,"shift-3",e)}`,outlineOffset:"-1px"}}}import{themeDensity as Pl,themeSpacing as Ol}from"@domphy/theme";function Jp(n={}){var r;let o=(r=n.gap)!=null?r:4;return{style:{display:"flex",alignItems:"center",gap:e=>Ol(Pl(e)*o)}}}function Zp(){return{div:null,style:{flex:"1 1 0"}}}import{merge as Ll,toState as dr}from"@domphy/core";import{themeColor as pr,themeDensity as Ho,themeSize as $l,themeSpacing as Bo}from"@domphy/theme";function rh(n={}){let{open:o=!1,placement:r="top",content:e="Tooltip Content"}=n,a=dr(r),t=dr(e),i=`domphy-tt-${Math.random().toString(36).slice(2,9)}`,s={span:g=>t.get(g),id:i},{show:l,hide:p,anchorPartial:c}=j({kind:"tooltip",open:o,placement:a,content:s}),m={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:g=>Bo(Ho(g)*1),paddingInline:g=>Bo(Ho(g)*3),borderRadius:g=>Bo(Ho(g)*1),color:g=>pr(g,"shift-9"),backgroundColor:g=>pr(g),fontSize:g=>$l(g,"inherit")},$:[Yn({placement:a,bordered:!1})]};return s.$||(s.$=[]),s.$.push(m),Ll(c,{ariaDescribedby:i,onMouseEnter:(g,u)=>l(u),onMouseLeave:(g,u)=>p(u),onFocus:(g,u)=>l(u),onBlur:(g,u)=>p(u),onKeyDown:(g,u)=>g.key==="Escape"&&p(u)}),c}import{ElementNode as hr}from"@domphy/core";function fr(n,o){return n.key!==void 0&&n.key!==null?String(n.key):`index-${o}`}function lh(n={}){let{duration:o=300,delay:r=0}=n,e=new Map,a=new Map,t=new Set,i=new Set;return{_onMount:s=>{s.addHook("Remove",()=>{for(let l of Array.from(a.values()))l();a.clear();for(let l of t)clearTimeout(l);t.clear();for(let l of i)cancelAnimationFrame(l);i.clear()})},_onBeforeUpdate:s=>{e=new Map,s.children.items.forEach((l,p)=>{if(!(l instanceof hr))return;let c=l.domElement;c&&e.set(fr(l,p),c.getBoundingClientRect())})},_onUpdate:s=>{s.children.items.forEach((l,p)=>{var C;if(!(l instanceof hr))return;let c=l.domElement;if(!c)return;let m=fr(l,p),y=e.get(m);if(!y)return;let g=c.getBoundingClientRect(),u=y.left-g.left,d=y.top-g.top;if(Math.abs(u)<.5&&Math.abs(d)<.5)return;(C=a.get(c))==null||C(),c.style.transition="none",c.style.transform=`translate(${u}px, ${d}px)`,c.getBoundingClientRect();let h=requestAnimationFrame(()=>{i.delete(h),c.style.transition=`transform ${o}ms ease ${r}ms`,c.style.transform="translate(0px, 0px)"});i.add(h);let S=!1,v=null,E=()=>{S||(S=!0,v&&(t.delete(v),v=null),a.delete(c),c.removeEventListener("transitionend",D),c.style.transition="",c.style.transform="")},D=w=>{w.propertyName==="transform"&&E()};a.set(c,()=>{S=!0,v&&(clearTimeout(v),t.delete(v),v=null),a.delete(c),c.removeEventListener("transitionend",D)}),c.addEventListener("transitionend",D),v=setTimeout(E,o+r+34),t.add(v)}),e.clear()}}}import{toState as Il}from"@domphy/core";import{themeColor as gr,themeSize as zl,themeSpacing as Vl}from"@domphy/theme";function uh(n={}){var r;let o=Il((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>zl(e,"inherit"),backgroundColor:e=>gr(e),color:e=>gr(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:Vl(3),listStyleType:"disc",listStylePosition:"outside"}}}export{Al as abbreviation,Fl as accordion,Yl as alert,Xl as avatar,es as badge,rs as blockquote,ss as breadcrumb,ds as breadcrumbEllipsis,gs as button,Cs as buttonGhost,xs as buttonSwitch,Ps as card,Is as code,Ks as combobox,Gs as command,Xs as commandItem,Us as commandSearch,tc as datePicker,ac as descriptionList,mc as details,gc as dialog,Cc as divider,wc as drawer,Oc as emphasis,zc as empty,Mc as errorBoundary,Nc as fab,Wc as figure,qc as formGroup,Jc as heading,tm as horizontalRule,im as icon,cm as image,pm as inputCheckbox,gm as inputColor,Cm as inputDateTime,xm as inputFile,Pm as inputNumber,Mm as inputOTP,Im as inputPassword,Nm as inputRadio,Wm as inputRange,qm as inputSearch,Jm as inputSwitch,tu as inputText,iu as keyboard,cu as label,pu as link,yu as linkButton,vu as list,Eu as listItem,ku as listItemButton,Du as mark,$u as menu,Vu as motion,Au as orderedList,Fu as pagination,qu as paragraph,Zu as popover,Yn as popoverArrow,id as preformated,cd as progress,pd as rating,bd as ringProgress,Ed as scrollArea,Td as segmented,Od as select,Md as selectBox,Ad as selectItem,Fd as selectList,Yd as skeleton,Xd as small,ep as spinner,rp as splitter,ap as splitterHandle,ip as splitterPanel,mp as steps,hp as strong,bp as subscript,Ep as superscript,Tp as table,Lp as tabs,wt as tag,Vp as textarea,Ap as timeline,Np as timelineItem,Kp as toast,Gp as toggleGroup,Jp as toolbar,Zp as toolbarSpacer,rh as tooltip,lh as transitionGroup,uh as unorderedList};
|
|
1
|
+
var zr=Object.defineProperty,Vr=Object.defineProperties;var Mr=Object.getOwnPropertyDescriptors;var Xo=Object.getOwnPropertySymbols;var _r=Object.prototype.hasOwnProperty,Rr=Object.prototype.propertyIsEnumerable;var Jo=(n,o,r)=>o in n?zr(n,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[o]=r,W=(n,o)=>{for(var r in o||(o={}))_r.call(o,r)&&Jo(n,r,o[r]);if(Xo)for(var r of Xo(o))Rr.call(o,r)&&Jo(n,r,o[r]);return n},Oe=(n,o)=>Vr(n,Mr(o));import{toState as Zo}from"@domphy/core";import{themeColor as Ge,themeSize as Ar,themeSpacing as Nr}from"@domphy/theme";function Al(n={}){var e,a;let o=Zo((e=n.color)!=null?e:"neutral","color"),r=Zo((a=n.accentColor)!=null?a:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>Ar(t),backgroundColor:t=>Ge(t),color:t=>Ge(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>Ge(t,"shift-7",o.get(t)),textUnderlineOffset:Nr(.72),cursor:"help","&:hover":{color:t=>Ge(t,"shift-11",r.get(t)),textDecorationColor:t=>Ge(t,"shift-9",r.get(t))}}}}import{toState as Qo}from"@domphy/core";import{themeColor as Jt,themeDensity as Hr,themeSpacing as en}from"@domphy/theme";function Fl(n={}){var a,t;let{type:o="single"}=n,r=Qo((a=n.color)!=null?a:"neutral","color"),e=Qo((t=n.accentColor)!=null?t:"primary","accentColor");return{_onMount:i=>{if(o!=="single")return;let s=i.domElement;if(!s)return;let l=p=>{let c=p.target.closest("summary");if(!c)return;let m=c.closest("details");!m||m.parentElement!==s||m.open||Array.from(s.querySelectorAll(":scope > details")).forEach(y=>{y!==m&&(y.open=!1)})};s.addEventListener("click",l),i.addHook("Remove",()=>s.removeEventListener("click",l))},style:{display:"flex",flexDirection:"column",borderRadius:i=>en(Hr(i)*1),outline:i=>`1px solid ${Jt(i,"shift-4",r.get(i))}`,outlineOffset:"-1px",overflow:"hidden","& > details":{borderBottom:i=>`1px solid ${Jt(i,"shift-4",r.get(i))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{outline:i=>`${en(.5)} solid ${Jt(i,"shift-6",e.get(i))}`}}}}import{toState as Br}from"@domphy/core";import{themeColor as Zt,themeDensity as tn,themeSize as Fr,themeSpacing as bt}from"@domphy/theme";function Yl(n={}){var r;let o=Br((r=n.color)!=null?r:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:bt(3),paddingBlock:e=>bt(tn(e)*2),paddingInline:e=>bt(tn(e)*4),boxShadow:e=>`inset ${bt(1)} 0 0 0 ${Zt(e,"shift-8",o.get(e))}`,backgroundColor:e=>Zt(e,"inherit",o.get(e)),color:e=>Zt(e,"shift-10",o.get(e)),fontSize:e=>Fr(e,"inherit")}}}import{toState as Wr}from"@domphy/core";import{themeColor as on,themeSize as Kr,themeSpacing as nn}from"@domphy/theme";function Xl(n={}){var r;let o=Wr((r=n.color)!=null?r:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:nn(9),height:nn(9),fontSize:e=>Kr(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>on(e,"inherit",o.get(e)),color:e=>on(e,"shift-11",o.get(e)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}import{toState as rn}from"@domphy/core";import{themeColor as an,themeSize as jr,themeSpacing as Qt}from"@domphy/theme";function es(n={}){var a;let{label:o=999}=n,r=rn(o),e=rn((a=n.color)!=null?a:"danger","color");return{style:{position:"relative","&::after":{content:t=>`"${r.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:Qt(1),minWidth:Qt(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>jr(t,"decrease-1"),borderRadius:Qt(999),backgroundColor:t=>an(t,"shift-9",e.get(t)),color:t=>an(t,"shift-0",e.get(t))}}}}import{toState as Yr}from"@domphy/core";import{themeColor as ln,themeDensity as sn,themeSize as qr,themeSpacing as eo}from"@domphy/theme";function rs(n={}){var r;let o=Yr((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>qr(e,"inherit"),backgroundColor:e=>ln(e,"inherit",o.get(e)),boxShadow:e=>`inset ${eo(1)} 0 0 0 ${ln(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>eo(sn(e)*2),paddingInline:e=>eo(sn(e)*4),margin:0}}}import{toState as Gr}from"@domphy/core";import{themeColor as Ue,themeSize as Ur,themeSpacing as cn}from"@domphy/theme";function ss(n={}){var e;let{separator:o="/"}=n,r=Gr((e=n.color)!=null?e:"neutral","color");return{_onInsert:a=>{a.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:a=>Ur(a,"inherit"),gap:cn(1),color:a=>Ue(a,"shift-9",r.get(a)),backgroundColor:a=>Ue(a,"inherit",r.get(a)),"& > *":{display:"inline-flex",alignItems:"center",color:a=>Ue(a,"shift-8",r.get(a))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:a=>Ue(a,"shift-4",r.get(a)),paddingInlineStart:cn(1)},"& > [aria-current=page]":{color:a=>Ue(a,"shift-10",r.get(a)),pointerEvents:"none"}}}}import{toState as Xr}from"@domphy/core";import{themeColor as St,themeSize as Jr,themeSpacing as Ct}from"@domphy/theme";function ds(n={}){var r;let o=Xr((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:e=>Jr(e,"inherit"),paddingInline:Ct(1),border:"none",background:"none",cursor:"pointer",color:e=>St(e,"shift-8",o.get(e)),borderRadius:Ct(1),"&:hover":{color:e=>St(e,"shift-10",o.get(e)),backgroundColor:e=>St(e,"shift-2",o.get(e))},"&:focus-visible":{outline:e=>`${Ct(.5)} solid ${St(e,"shift-6",o.get(e))}`,outlineOffset:Ct(.5)}}}}import{toState as Zr}from"@domphy/core";import{themeColor as J,themeDensity as vt,themeSize as Qr,themeSpacing as Xe}from"@domphy/theme";function gs(n={}){var r;let o=Zr((r=n.color)!=null?r:"primary","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>Qr(e,"inherit"),paddingBlock:e=>Xe(vt(e)*1),paddingInline:e=>Xe(vt(e)*3),borderRadius:e=>Xe(vt(e)*1),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:e=>Xe(vt(e)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${J(e,"shift-4",o.get(e))}`,color:e=>J(e,"shift-9",o.get(e)),backgroundColor:e=>J(e,"inherit",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>J(e,"shift-10",o.get(e)),backgroundColor:e=>J(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${Xe(.5)} ${J(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>J(e,"shift-2","neutral"),outline:e=>`1px solid ${J(e,"shift-4","neutral")}`,color:e=>J(e,"shift-8","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}import{toState as ei}from"@domphy/core";import{themeColor as Je,themeDensity as Et,themeSize as ti,themeSpacing as Ze}from"@domphy/theme";function Cs(n={}){var r;let o=ei((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>ti(e,"inherit"),paddingBlock:e=>Ze(Et(e)*1),paddingInline:e=>Ze(Et(e)*1),borderRadius:e=>Ze(Et(e)*1),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:e=>Ze(Et(e)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",color:e=>Je(e,"shift-6",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>Je(e,"shift-9",o.get(e)),backgroundColor:e=>Je(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${Ze(.5)} ${Je(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>Je(e,"shift-4","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}import{toState as to}from"@domphy/core";import{themeColor as Le,themeSize as oi,themeSpacing as N}from"@domphy/theme";function xs(n={}){var t,i;let{checked:o=!1}=n,r=to(o),e=to((t=n.color)!=null?t:"neutral","color"),a=to((i=n.accentColor)!=null?i:"primary","accentColor");return{_onSchedule:s=>{s.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:s=>r.get(s),dataTone:"shift-2",onClick:()=>r.set(!r.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:s=>oi(s),border:"none",outlineWidth:"1px",outline:s=>`1px solid ${Le(s,"shift-3",e.get(s))}`,minWidth:N(12),minHeight:N(6),borderRadius:N(999),paddingLeft:N(7),paddingRight:N(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:s=>Le(s,"inherit",e.get(s)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:N(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:N(5),height:N(5),borderRadius:N(999),color:s=>Le(s,"shift-9"),backgroundColor:s=>Le(s,"decrease-2",e.get(s))},"&[aria-checked=true]":{backgroundColor:s=>Le(s,"increase-3",a.get(s)),outline:"none",color:s=>Le(s,"decrease-2"),paddingLeft:N(2),paddingRight:N(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${N(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as ni}from"@domphy/core";import{themeColor as $e,themeDensity as se,themeSpacing as Z}from"@domphy/theme";function Ps(n={}){var r;let o=ni((r=n.color)!=null?r:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>Z(se(e)*2),backgroundColor:e=>$e(e,"inherit",o.get(e)),color:e=>$e(e,"shift-10",o.get(e)),outline:e=>`1px solid ${$e(e,"shift-4",o.get(e))}`,outlineOffset:"-1px",overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>Z(se(e)*2),paddingInline:e=>Z(se(e)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:e=>Z(se(e)*4),color:e=>$e(e,"shift-9",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>Z(se(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>Z(se(e)*4),color:e=>$e(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:Z(2),paddingBlock:e=>Z(se(e)*2),paddingInline:e=>Z(se(e)*4),borderTop:e=>`1px solid ${$e(e,"shift-3",o.get(e))}`}}}}import{toState as ri}from"@domphy/core";import{themeColor as mn,themeSize as ii,themeSpacing as oo}from"@domphy/theme";function Is(n={}){var r;let o=ri((r=n.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="code"&&console.warn('"code" primitive patch must use code tag')},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",fontSize:e=>ii(e,"inherit"),color:e=>mn(e,"shift-9",o.get(e)),backgroundColor:e=>mn(e,"inherit",o.get(e)),height:oo(6),paddingInline:oo(1.5),borderRadius:oo(1)}}}import{merge as no,toState as ro}from"@domphy/core";import{themeColor as Qe,themeDensity as io,themeSize as dn,themeSpacing as Ce}from"@domphy/theme";import{merge as ai,toState as li}from"@domphy/core";import{autoUpdate as si,computePosition as ci,flip as mi,offset as ui,shift as di}from"@domphy/floating";var kt=new WeakMap;function un(n,o,r){let e=kt.get(n);e||(e=new Map,kt.set(n,e));let a=e.get(o);a&&a!==r&&a(),e.set(o,r)}function pi(n){let o=kt.get(n);o&&(kt.delete(n),o.forEach(r=>r()))}function K(n){let{kind:o,open:r=!1,placement:e}=n,a=null,t=null,i=null,s=null,l=null,p=null,c=!1,m=li(r),y=()=>{a&&clearTimeout(a),a=null,t&&(t(),t=null),l&&(l.remove(),l=null),s=null,c=!1,m.set(!1)},g=C=>{C&&(p=C.getRoot(),i=C.domElement,i&&un(i,o,y))},u=()=>{c||!p||(c=!0,l=p.children.insert(n.content))},d=()=>{u(),i&&s&&(t&&t(),t=si(i,s,()=>{ci(i,s,{placement:e.get(),middleware:[ui(12),mi(),di()],strategy:"fixed"}).then(({x:C,y:w,placement:P})=>{s&&(Object.assign(s.style,{left:`${C}px`,top:`${w}px`}),e.set(P))})}),m.set(!0))},h=()=>{t&&t(),t=null,m.set(!1)},S=C=>{g(C),a&&clearTimeout(a),a=setTimeout(d,100)},v=C=>{g(C),a&&clearTimeout(a),a=setTimeout(h,100)},E={style:{position:"fixed",pointerEvents:"auto",visibility:C=>m.get(C)?"visible":"hidden"},onKeyDown:C=>{C.key==="Escape"&&v()},_onMount:C=>{var w;if(s=C.domElement,i&&s&&!s.hasAttribute("data-theme")){let P=(w=i.closest("[data-theme]"))==null?void 0:w.getAttribute("data-theme");P&&s.setAttribute("data-theme",P)}},_portal:C=>{let w=C.domElement.querySelector("#domphy-floating");if(!w){let P={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};w=C.children.insert(P).domElement}return w}};return ai(n.content,E),{show:S,hide:v,anchorPartial:{onKeyDown:C=>C.key==="Escape"&&v(),_onMount:C=>{p=C.getRoot(),i=C.domElement,i&&un(i,o,y);let w=P=>{if(!m.get()||!i||!s)return;let ie=P.target;!i.contains(ie)&&!s.contains(ie)&&v()};C.getRoot().domElement.addEventListener("click",w),C.addHook("BeforeRemove",()=>{i&&pi(i),C.getRoot().domElement.removeEventListener("click",w)})}}}}import{toState as hi}from"@domphy/core";import{themeColor as xt,themeSize as fi,themeSpacing as Q}from"@domphy/theme";var gi='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6.707 5.293l5.293 5.292l5.293 -5.292a1 1 0 0 1 1.414 1.414l-5.292 5.293l5.292 5.293a1 1 0 0 1 -1.414 1.414l-5.293 -5.292l-5.293 5.292a1 1 0 1 1 -1.414 -1.414l5.292 -5.293l-5.292 -5.293a1 1 0 0 1 1.414 -1.414" /></svg>';function wt(n={}){var e;let{removable:o=!1}=n,r=hi((e=n.color)!=null?e:"neutral","color");return{dataTone:"shift-2",_onInit:a=>{let t={span:gi,onClick:i=>{i.stopPropagation(),a.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:Q(1),width:Q(4),height:Q(4),flexShrink:0,"&:hover":{backgroundColor:i=>xt(i,"shift-4",r.get(i))}}};o&&a.children.insert(t)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:Q(6),paddingBlock:0,borderRadius:Q(1),paddingInlineStart:Q(2),paddingInlineEnd:o?Q(1):Q(2),gap:Q(2),fontSize:a=>fi(a,"inherit"),backgroundColor:a=>xt(a,"inherit",r.get(a)),color:a=>xt(a,"shift-9",r.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${xt(a,"shift-4",r.get(a))}`}}}function Ks(n){let{options:o=[],placement:r="bottom",color:e="neutral",open:a=!1,multiple:t=!1}=n,i=ro(n.value),s=ro(a),{show:l,hide:p,anchorPartial:c}=K({kind:"combobox",open:s,placement:ro(r),content:n.content}),m={onClick:(h,S)=>!t&&p(S)};no(n.content,m);let y={border:"none",outline:"none",padding:0,margin:0,flex:1,height:Ce(6),marginInlineStart:Ce(2),fontSize:h=>dn(h,"inherit"),color:h=>Qe(h,"shift-9",e),backgroundColor:h=>Qe(h,"inherit",e)},g;if(n.input){let h={onFocus:(S,v)=>l(v),style:y,_key:"combobox-input"};no(n.input,h),g=n.input}else g={input:null,onFocus:(h,S)=>l(S),value:h=>(i.get(h),""),style:y,_key:"combobox-input"};let u={div:h=>{let S=i.get(h),v=Array.isArray(S)?S:[S],D=o.filter(C=>v.includes(C.value)).map(C=>({span:C.label,$:[wt({color:e,removable:!0})],_key:C.value,_onRemove:w=>{let P=i.get(),De=(Array.isArray(P)?P:[P]).filter(ae=>ae!==C.value);t?i.set(De):i.set(De[0])}}));return D.push(g),D},style:{display:"flex",flexWrap:"wrap",gap:Ce(1)}},d={_onInsert:h=>{h.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:h=>h.children.insert(u),style:{minWidth:Ce(32),outlineOffset:"-1px",outline:h=>`1px solid ${Qe(h,"shift-4","neutral")}`,paddingBlock:h=>Ce(io(h)*1),paddingInline:h=>Ce(io(h)*1),borderRadius:h=>Ce(io(h)*1),fontSize:h=>dn(h,"inherit"),color:h=>Qe(h,"shift-9",e),backgroundColor:h=>Qe(h,"inherit",e)}};return no(c,d),c}import{merge as yi,toState as bi}from"@domphy/core";import{themeColor as ee,themeDensity as Tt,themeSize as pn,themeSpacing as Ie}from"@domphy/theme";function Gs(){return{_onSchedule:(n,o)=>{yi(o,{_context:{command:{query:bi("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function Us(n={}){let{color:o="neutral",accentColor:r="primary"}=n;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let a=e.getContext("command");if(!a){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,i=()=>a.query.set(t.value);t.addEventListener("input",i),e.addHook("Remove",()=>t.removeEventListener("input",i))},style:{fontFamily:"inherit",fontSize:e=>pn(e,"inherit"),paddingInline:e=>Ie(Tt(e)*3),paddingBlock:e=>Ie(Tt(e)*2),border:"none",borderBottom:e=>`1px solid ${ee(e,"shift-3",o)}`,outline:"none",color:e=>ee(e,"shift-10",o),backgroundColor:e=>ee(e,"inherit",o),"&::placeholder":{color:e=>ee(e,"shift-7")},"&:focus-visible":{borderBottomColor:e=>ee(e,"shift-6",r)}}}}function Xs(n={}){let{color:o="neutral",accentColor:r="primary"}=n;return{role:"option",_onMount:e=>{var p,c;let a=e.getContext("command");if(!a){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,i=(c=(p=t.textContent)==null?void 0:p.toLowerCase())!=null?c:"",s=m=>{t.hidden=m.length>0&&!i.includes(m.toLowerCase())};s(a.query.get());let l=a.query.addListener(s);e.addHook("Remove",l)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>pn(e,"inherit"),height:e=>Ie(6+Tt(e)*2),paddingInline:e=>Ie(Tt(e)*3),border:"none",outline:"none",color:e=>ee(e,"shift-9",o),backgroundColor:e=>ee(e,"inherit",o),"&:hover:not([disabled])":{backgroundColor:e=>ee(e,"shift-2",o)},"&:focus-visible":{outline:e=>`${Ie(.5)} solid ${ee(e,"shift-6",r)}`,outlineOffset:`-${Ie(.5)}`}}}}import{merge as Si,toState as te}from"@domphy/core";import{themeColor as $,themeSize as ze,themeSpacing as I}from"@domphy/theme";var z=n=>new Date(n.getFullYear(),n.getMonth(),n.getDate()),ve=(n,o)=>new Date(n.getFullYear(),n.getMonth(),n.getDate()+o),ao=(n,o)=>new Date(n.getFullYear(),n.getMonth()+o,n.getDate()),et=(n,o)=>!!n&&!!o&&n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()&&n.getDate()===o.getDate(),lo=n=>`${n.getFullYear()}-${String(n.getMonth()+1).padStart(2,"0")}-${String(n.getDate()).padStart(2,"0")}`,so=(n,o)=>ve(n,-((n.getDay()-o+7)%7));function Ci(n){var o,r;try{let e=new Intl.Locale(n),a=(r=(o=e.getWeekInfo)==null?void 0:o.call(e))!=null?r:e.weekInfo;if(a!=null&&a.firstDay)return a.firstDay%7}catch(e){}return 0}function tc(n={}){var Yo,qo,Go,Uo;let{mode:o="single",time:r=!1,min:e,max:a,disabledDate:t,locale:i=typeof navigator!="undefined"?navigator.language:"en-US",format:s,onChange:l}=n,p=(Yo=n.weekStartsOn)!=null?Yo:Ci(i),c=te((qo=n.accentColor)!=null?qo:"primary","accentColor"),m=te((Go=n.placement)!=null?Go:"bottom-start"),y=te((Uo=n.value)!=null?Uo:o==="range"?[null,null]:null),g=l?y.addListener(f=>l(f)):null,u=(()=>{let f=y.get(),b=o==="range"?f==null?void 0:f[0]:f;return b instanceof Date?b:new Date})(),d=te(u.getFullYear(),"viewYear"),h=te(u.getMonth(),"viewMonth"),S=te(z(u),"focused"),v=te(null,"hovered"),E=te(u.getHours(),"hour"),D=te(u.getMinutes(),"minute"),C=null,w=new Intl.DateTimeFormat(i,W({dateStyle:"medium"},r?{timeStyle:"short"}:{})),P=new Intl.DateTimeFormat(i,{month:"long",year:"numeric"}),ie=new Intl.DateTimeFormat(i,{weekday:"short"}),De=new Intl.DateTimeFormat(i,{dateStyle:"full"}),ae=f=>f?w.format(f):"",yr=f=>{if(s)return s(f);if(o==="range"){let[b,k]=f!=null?f:[null,null];return b?`${ae(b)} \u2013 ${ae(k)}`:""}return ae(f)},br=Array.from({length:7},(f,b)=>ie.format(new Date(2023,0,1+(b+p)%7))),Fo=f=>!!e&&z(f)<z(e)||!!a&&z(f)>z(a)||!!t&&t(f),le=f=>{if(!r)return z(f);let b=z(f);return b.setHours(E.get(),D.get(),0,0),b},Wo=f=>{var x;if(Fo(f))return;if(o==="single"){y.set(le(f)),r||Ut();return}let[b,k]=(x=y.get())!=null?x:[null,null];!b||b&&k?y.set([le(f),null]):z(f)<z(b)?(y.set([le(f),le(b)]),r||Ut()):(y.set([b,le(f)]),r||Ut())},Sr=()=>{var f;if(r)if(o==="single"){let b=y.get();b&&y.set(le(b))}else{let[b,k]=(f=y.get())!=null?f:[null,null];y.set([b&&le(b),k&&le(k)])}},Cr=(f,b)=>{var Pe;if(o!=="range")return!1;let[k,x]=(Pe=y.get(b))!=null?Pe:[null,null],O=x!=null?x:v.get(b);if(!k||!O)return!1;let T=z(k)<=z(O)?k:O,A=z(k)<=z(O)?O:k,_=z(f);return _>=z(T)&&_<=z(A)},vr=(f,b)=>{let k=y.get(b);if(o==="range"){let[x,O]=k!=null?k:[null,null];return et(f,x)||et(f,O)}return et(f,k)},yt=f=>{d.set(f.getFullYear()),h.set(f.getMonth())},Ko=f=>{let b=ao(new Date(d.get(),h.get(),1),f);yt(b)},jo=f=>d.set(d.get()+f),qt=()=>{setTimeout(()=>{var f;(f=C==null?void 0:C.querySelector(`[data-date="${lo(S.get())}"]`))==null||f.focus()},0)},Er=Dr(),{show:kr,hide:xr,anchorPartial:Gt}=K({kind:"datePicker",open:!1,placement:m,content:Er});function Ut(){xr()}Gt.onClick=()=>{};let wr={type:"text",readonly:!0,value:f=>yr(y.get(f)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(f,b)=>{Xt(b)},onFocus:(f,b)=>{Xt(b)},onKeyDown:(f,b)=>{let k=f.key;(k==="ArrowDown"||k==="Enter")&&(f.preventDefault(),Xt(b))},_onMount:f=>g&&f.addHook("Remove",()=>{g()})};function Xt(f){var k;let b=(k=Tr())!=null?k:new Date;S.set(z(b)),yt(b),kr(f),qt()}function Tr(){var b;let f=y.get();return o==="range"?(b=f==null?void 0:f[0])!=null?b:null:f!=null?f:null}return Si(Gt,wr),Gt;function Dr(){let f=(T,A,_)=>({button:T,type:"button",ariaLabel:A,onClick:_,style:vi()}),b={div:[f("\xAB","Previous year",()=>jo(-1)),f("\u2039","Previous month",()=>Ko(-1)),{div:T=>P.format(new Date(d.get(T),h.get(T),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"600",fontSize:T=>ze(T)}},f("\u203A","Next month",()=>Ko(1)),f("\xBB","Next year",()=>jo(1))],style:{display:"flex",alignItems:"center",gap:I(1),marginBottom:I(2)}},k={div:br.map((T,A)=>({div:T,style:{textAlign:"center",fontSize:_=>ze(_,"decrease-1"),fontWeight:"600",color:_=>$(_,"shift-7"),paddingBlock:I(1)},_key:A})),role:"row",style:hn()},x={div:T=>Pr(T),role:"grid",ariaLabel:"Calendar",onKeyDown:Ir,onMouseLeave:()=>o==="range"&&v.set(null),style:{display:"flex",flexDirection:"column",gap:I(.5)}},O=[b,k,x];return r&&O.push(Lr()),O.push($r()),{div:O,role:"dialog",ariaModal:"false",_onMount:T=>{C=T.domElement},style:{minWidth:I(70),padding:I(3),borderRadius:I(2),backgroundColor:T=>$(T,"base"),color:T=>$(T,"shift-10"),border:T=>`1px solid ${$(T,"shift-4")}`,boxShadow:"0 8px 24px rgba(0,0,0,0.18)"}}}function Pr(f){let b=new Date(d.get(f),h.get(f),1),k=h.get(f),x=so(b,p),O=[];for(let T=0;T<6;T++){let A=[];for(let _=0;_<7;_++){let Pe=ve(x,T*7+_);A.push(Or(Pe,k,f))}O.push({div:A,role:"row",style:hn(),_key:T})}return O}function Or(f,b,k){let x=Fo(f),O=vr(f,k),T=Cr(f,k),A=f.getMonth()!==b,_=et(f,S.get(k)),Pe=et(f,new Date);return{button:String(f.getDate()),type:"button",role:"gridcell",tabIndex:_?0:-1,ariaSelected:O,ariaDisabled:x,disabled:x,ariaLabel:De.format(f),dataDate:lo(f),onClick:()=>Wo(f),onMouseEnter:()=>o==="range"&&v.set(f),style:{appearance:"none",border:"none",cursor:x?"not-allowed":"pointer",aspectRatio:"1",borderRadius:I(1),fontSize:L=>ze(L),fontFamily:"inherit",opacity:x?.35:A?.5:1,backgroundColor:L=>O?$(L,"shift-7",c.get(L)):T?$(L,"shift-2",c.get(L)):"transparent",color:L=>O?$(L,"shift-0",c.get(L)):$(L,"shift-9"),outline:Pe?L=>`1px solid ${$(L,"shift-6",c.get(L))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:L=>O?$(L,"shift-7",c.get(L)):$(L,"shift-3",c.get(L))},"&:focus-visible":{outline:L=>`2px solid ${$(L,"shift-6",c.get(L))}`}},_key:lo(f)}}function Lr(){let f=(b,k,x)=>({select:Array.from({length:b},(O,T)=>({option:String(T).padStart(2,"0"),value:String(T),selected:A=>k.get(A)===T,_key:T})),ariaLabel:x,onChange:O=>{k.set(Number(O.target.value)),Sr()},style:Ei()});return{div:[f(24,E,"Hour"),{span:":",style:{fontWeight:"600"}},f(60,D,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:I(1),marginTop:I(3)}}}function $r(){let f=(b,k)=>({button:b,type:"button",onClick:k,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:x=>ze(x,"decrease-1"),color:x=>$(x,"shift-8",c.get(x)),padding:I(1)}});return{div:[f("Today",()=>{let b=new Date;S.set(z(b)),yt(b),qt()}),f("Clear",()=>{y.set(o==="range"?[null,null]:null),v.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:I(2),paddingTop:I(2),borderTop:b=>`1px solid ${$(b,"shift-3")}`}}}function Ir(f){let b=f,k=S.get(),x=null;switch(b.key){case"ArrowLeft":x=ve(k,-1);break;case"ArrowRight":x=ve(k,1);break;case"ArrowUp":x=ve(k,-7);break;case"ArrowDown":x=ve(k,7);break;case"Home":x=so(k,p);break;case"End":x=ve(so(k,p),6);break;case"PageUp":x=ao(k,b.shiftKey?-12:-1);break;case"PageDown":x=ao(k,b.shiftKey?12:1);break;case"Enter":case" ":b.preventDefault(),Wo(k);return;default:return}b.preventDefault(),S.set(x),yt(x),qt()}}function hn(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:I(.5)}}function vi(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:n=>ze(n),color:n=>$(n,"shift-8"),width:I(7),height:I(7),borderRadius:I(1),"&:hover":{backgroundColor:n=>$(n,"shift-3")}}}function Ei(){return{fontFamily:"inherit",fontSize:n=>ze(n),padding:I(1),borderRadius:I(1),border:n=>`1px solid ${$(n,"shift-4")}`,backgroundColor:n=>$(n,"base"),color:n=>$(n,"shift-9")}}import{toState as ki}from"@domphy/core";import{themeColor as fn,themeSize as gn,themeSpacing as yn}from"@domphy/theme";function ac(n={}){var r;let o=ki((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${yn(24)}, max-content) 1fr`,columnGap:yn(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>gn(e,"inherit"),color:e=>fn(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>gn(e,"inherit"),color:e=>fn(e,"shift-9",o.get(e))}}}}import{toState as bn}from"@domphy/core";import{themeColor as ce,themeDensity as tt,themeSize as Sn,themeSpacing as V}from"@domphy/theme";function mc(n={}){var a,t;let{duration:o=240}=n,r=bn((a=n.color)!=null?a:"neutral","color"),e=bn((t=n.accentColor)!=null?t:"primary","accentColor");return{_onInsert:i=>{i.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:i=>Sn(i,"inherit"),color:i=>ce(i,"shift-9",r.get(i)),backgroundColor:i=>ce(i,"inherit",r.get(i)),overflow:"hidden","& > summary":{backgroundColor:i=>ce(i,"shift-2",r.get(i)),color:i=>ce(i,"shift-10",r.get(i)),fontSize:i=>Sn(i,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:V(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:i=>V(tt(i)*4),height:V(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:V(2),height:V(2),flexShrink:0,marginTop:`-${V(.5)}`,borderInlineEnd:i=>`${V(.5)} solid ${ce(i,"shift-9",r.get(i))}`,borderBottom:i=>`${V(.5)} solid ${ce(i,"shift-9",r.get(i))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:i=>ce(i,"shift-3",r.get(i))},"& > summary:focus-visible":{borderRadius:i=>V(tt(i)*2),outlineOffset:`-${V(.5)}`,outline:i=>`${V(.5)} solid ${ce(i,"shift-6",e.get(i))}`},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:i=>V(tt(i)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${o}ms ease, opacity ${o}ms ease, padding ${o}ms ease`},"&[open] > :not(summary)":{maxHeight:V(250),opacity:1,paddingTop:i=>V(tt(i)*1),paddingBottom:i=>V(tt(i)*3)}}}}import{toState as xi}from"@domphy/core";import{themeColor as Pt,themeDensity as wi,themeSize as Ti,themeSpacing as co}from"@domphy/theme";var ot=0;function Dt(){ot++,ot===1&&(document.body.style.overflow="hidden")}function Ve(){ot=Math.max(0,ot-1),ot===0&&(document.body.style.overflow="")}var Cn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function gc(n={}){let{color:o="neutral",open:r=!1}=n,e=xi(r),a=null,t=!1,i=!1,s=l=>{t=!1,l.close(),i&&(Ve(),i=!1),a==null||a.focus(),a=null};return{_onInsert:l=>{l.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(l,p)=>{if(l.target!==p.domElement)return;let c=p.domElement.getBoundingClientRect();l.clientX>=c.left&&l.clientX<=c.right&&l.clientY>=c.top&&l.clientY<=c.bottom||e.set(!1)},onTransitionEnd:(l,p)=>{t&&l.target===p.domElement&&l.propertyName==="opacity"&&s(p.domElement)},_onMount:l=>{let p=l.domElement;p.setAttribute("aria-modal","true");let c=null,m=d=>{if(d.key!=="Tab")return;let h=Array.from(p.querySelectorAll(Cn)).filter(E=>!E.closest("[aria-hidden='true']")&&E.offsetParent!==null);if(!h.length){d.preventDefault();return}let S=h[0],v=h[h.length-1];d.shiftKey?(document.activeElement===S||document.activeElement===p)&&(d.preventDefault(),v.focus()):document.activeElement===v&&(d.preventDefault(),S.focus())},y=d=>{d.preventDefault(),e.set(!1)};p.addEventListener("cancel",y);let g=d=>{d?(a=document.activeElement,p.showModal(),i||(Dt(),i=!0),p.addEventListener("keydown",m),requestAnimationFrame(()=>{p.style.opacity="1";let h=p.querySelector(Cn);h==null||h.focus()})):(t=!0,p.style.opacity="0",p.removeEventListener("keydown",m),c=setTimeout(()=>{c=null,t&&s(p)},350))};g(e.get());let u=e.addListener(g);l.addHook("Remove",()=>{c&&(clearTimeout(c),c=null),u(),p.removeEventListener("cancel",y),i&&(Ve(),i=!1),p.removeEventListener("keydown",m),a==null||a.focus(),a=null})},style:{opacity:"0",transition:"opacity 200ms ease",fontSize:l=>Ti(l,"inherit"),color:l=>Pt(l,"shift-10",o),backgroundColor:l=>Pt(l,"inherit",o),border:"none",padding:l=>co(wi(l)*3),boxShadow:l=>`0 ${co(9)} ${co(16)} ${Pt(l,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:l=>Pt(l,"shift-2","neutral"),opacity:.75}}}}import{toState as Di}from"@domphy/core";import{themeColor as Ot,themeSize as Pi,themeSpacing as Oi}from"@domphy/theme";function Cc(n={}){var r;let o=Di((r=n.color)!=null?r:"neutral","color");return{role:"separator",_onInsert:e=>{e.tagName!=="div"&&console.warn('"divider" patch should be used with <div>')},style:{display:"flex",justifyContent:"center",alignItems:"baseline",gap:Oi(2),fontSize:e=>Pi(e,"inherit"),backgroundColor:e=>Ot(e),color:e=>Ot(e,"shift-9",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>Ot(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>Ot(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}import{toState as Li}from"@domphy/core";import{themeColor as Lt,themeDensity as $i,themeSize as Ii,themeSpacing as nt}from"@domphy/theme";var mo={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},vn={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},rt=n=>n==="left"||n==="right";function En(n,o){return n==="start"?o?"right":"left":n==="end"?o?"left":"right":n}function wc(n={}){let{color:o="neutral",open:r=!1,placement:e="end",size:a}=n,t=Li(r),i=e==="start"||e==="end",s=En(e,!1),l=rt(s)?nt(80):nt(64),p=a!=null?a:l;return{_onInsert:c=>{c.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(c,m)=>{c.target===m.domElement&&t.set(!1)},_onMount:c=>{let m=c.domElement;m.setAttribute("aria-modal","true");let y=w=>{w.preventDefault(),t.set(!1)};m.addEventListener("cancel",y);let g=i&&(m.ownerDocument.documentElement.dir==="rtl"||m.ownerDocument.dir==="rtl"),u=En(e,g);i&&(m.style.transform=mo[u],m.style.margin=vn[u],m.style.width=rt(u)?p:"100dvw",m.style.height=rt(u)?"100dvh":p);let d=!1,h=!1,S=null,v=()=>{S=null,d&&(d=!1,m.close(),h&&(Ve(),h=!1))},E=w=>{w.target===m&&w.propertyName==="transform"&&v()};m.addEventListener("transitionend",E);let D=w=>{w?(d=!1,m.showModal(),h||(Dt(),h=!0),requestAnimationFrame(()=>{m.style.transform="translate(0, 0)"})):(d=!0,m.style.transform=mo[u],S=setTimeout(v,350))};D(t.get());let C=t.addListener(D);c.addHook("Remove",()=>{S&&(clearTimeout(S),S=null),C(),m.removeEventListener("cancel",y),m.removeEventListener("transitionend",E),h&&(Ve(),h=!1)})},style:{transform:mo[s],transition:"transform 0.25s ease",fontSize:c=>Ii(c,"inherit"),color:c=>Lt(c,"shift-10",o),backgroundColor:c=>Lt(c,"inherit",o),border:"none",padding:c=>nt($i(c)*3),margin:vn[s],width:rt(s)?p:"100dvw",height:rt(s)?"100dvh":p,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:c=>`0 ${nt(4)} ${nt(12)} ${Lt(c,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:c=>Lt(c,"shift-2","neutral"),opacity:.75}}}}import{toState as zi}from"@domphy/core";import{themeColor as Vi,themeSize as Mi}from"@domphy/theme";function Oc(n={}){var r;let o=zi((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>Mi(e,"inherit"),fontStyle:"italic",color:e=>Vi(e,"shift-10",o.get(e))}}}import{toState as _i}from"@domphy/core";import{themeColor as kn,themeSpacing as uo}from"@domphy/theme";function zc(n={}){var r;let o=_i((r=n.color)!=null?r:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:uo(3),paddingBlock:uo(12),paddingInline:uo(6),textAlign:"center",color:e=>kn(e,"shift-6",o.get(e)),"& > :first-child":{color:e=>kn(e,"shift-5",o.get(e))}}}}function Mc(n={}){return{_onError:(o,r,e)=>{var t,i;(t=n.onError)==null||t.call(n,r);let a=typeof n.fallback=="function"?n.fallback(r,e):(i=n.fallback)!=null?i:{div:"An error occurred."};o.children.update([a])}}}import{toState as Ri}from"@domphy/core";import{themeColor as Me,themeSize as Ai,themeSpacing as it}from"@domphy/theme";var Ni={small:8,medium:10,large:14};function Nc(n={}){var e,a;let o=Ri((e=n.color)!=null?e:"primary","color"),r=it(Ni[(a=n.size)!=null?a:"medium"]);return{_onInsert:t=>{t.tagName!=="button"&&console.warn('"fab" patch must use button tag')},style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:r,height:r,borderRadius:"50%",fontSize:t=>Ai(t,"inherit"),backgroundColor:t=>Me(t,"shift-9",o.get(t)),color:t=>Me(t,"shift-0",o.get(t)),boxShadow:t=>`0 ${it(1)} ${it(4)} ${Me(t,"shift-4","neutral")}`,transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>Me(t,"shift-10",o.get(t)),boxShadow:t=>`0 ${it(2)} ${it(6)} ${Me(t,"shift-5","neutral")}`},"&:focus-visible":{outline:t=>`2px solid ${Me(t,"shift-6",o.get(t))}`,outlineOffset:"2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as Hi}from"@domphy/core";import{themeColor as xn,themeSize as Bi,themeSpacing as $t}from"@domphy/theme";function Wc(n={}){var r;let o=Hi((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:$t(2),marginInline:0,marginTop:$t(3),marginBottom:$t(3),color:e=>xn(e,"shift-9",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:$t(2)},"& figcaption":{fontSize:e=>Bi(e,"decrease-1"),color:e=>xn(e,"shift-8",o.get(e)),lineHeight:1.45}}}}import{toState as Fi}from"@domphy/core";import{themeColor as It,themeDensity as _e,themeSize as po,themeSpacing as oe}from"@domphy/theme";function qc(n={}){var a;let{layout:o="horizontal"}=n,r=Fi((a=n.color)!=null?a:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:t=>oe(_e(t)*3),paddingBlock:t=>oe(_e(t)*3),border:"none",borderRadius:t=>oe(_e(t)*2),fontSize:t=>po(t,"inherit"),backgroundColor:t=>It(t,"inherit",r.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:oe(4),rowGap:oe(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>po(t,"inherit"),fontWeight:600,paddingBlock:t=>oe(_e(t)*1),borderRadius:t=>oe(_e(t)*2),color:t=>It(t,"shift-9",r.get(t)),backgroundColor:t=>It(t,"inherit",r.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?0:oe(_e(t)*1)},"& > label:has(+ :not(legend, label, p) + p)":{gridRow:e?"auto":"span 2"},"& > :not(legend, label, p)":{gridColumn:e?"1":"2",minWidth:0,width:"100%",boxSizing:"border-box"},"& > p":{gridColumn:e?"1":"2",minWidth:0,margin:0,marginBlockStart:`calc(${oe(2)} * -1)`,fontSize:t=>po(t,"decrease-1"),color:t=>It(t,"shift-9",r.get(t))}}}}import{toState as Wi}from"@domphy/core";import{themeColor as Ki,themeSize as ji,themeSpacing as Yi}from"@domphy/theme";var qi={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Jc(n={}){var r;let o=Wi((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{["h1","h2","h3","h4","h5","h6"].includes(e.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:e=>Ki(e,"shift-11",o.get(e)),marginTop:0,marginBottom:Yi(2),fontSize:e=>{let a=qi[e.elementNode.tagName]||"inherit";return ji(e,a)}}}}import{toState as Gi}from"@domphy/core";import{themeColor as Ui,themeSpacing as wn}from"@domphy/theme";function tm(n={}){var r;let o=Gi((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},style:{border:0,height:"1px",marginInline:0,marginTop:wn(3),marginBottom:wn(3),backgroundColor:e=>Ui(e,"shift-4",o.get(e))}}}import{toState as Xi}from"@domphy/core";import{themeColor as Ji,themeSize as Zi,themeSpacing as Tn}from"@domphy/theme";function im(n={}){var r;let o=Xi((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="span"&&console.warn('"icon" primitive patch should use span tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",alignSelf:"center",justifySelf:"center",verticalAlign:"middle",width:Tn(4),height:Tn(4),flexShrink:"0",fontSize:e=>Zi(e),backgroundColor:"transparent",color:e=>Ji(e,"shift-9",o.get(e))}}}import{toState as Qi}from"@domphy/core";import{themeColor as ea,themeSpacing as ta}from"@domphy/theme";function cm(n={}){var r;let o=Qi((r=n.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:ta(2),backgroundColor:e=>ea(e,"inherit",o.get(e))}}}import{toState as Dn}from"@domphy/core";import{themeColor as R,themeSize as oa,themeSpacing as me}from"@domphy/theme";function pm(n={}){var e,a;let o=Dn((e=n.color)!=null?e:"neutral","color"),r=Dn((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>oa(t,"inherit"),display:"inline-flex",position:"relative",width:me(6),height:me(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:me(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${R(t,"shift-4",o.get(t))}`,color:t=>R(t,"shift-9",o.get(t)),width:me(4),height:me(4)},"&:hover::before":{backgroundColor:t=>R(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${R(t,"shift-6",r.get(t))}`,backgroundColor:t=>R(t,"shift-8",r.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>R(t,"shift-7",r.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${me(.5)} solid ${R(t,"inherit",r.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${R(t,"shift-6",r.get(t))}`,backgroundColor:t=>R(t,"shift-3",r.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>R(t,"shift-8",r.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>R(t,"shift-7",r.get(t))},"&:focus-visible":{borderRadius:me(1.5),outline:t=>`${me(.5)} solid ${R(t,"shift-6",r.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>R(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{themeColor as Pn,themeDensity as at,themeSize as na,themeSpacing as lt}from"@domphy/theme";function gm(n={}){return{type:"color",_onSchedule:(o,r)=>{o.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag'),r.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:o=>na(o,"inherit"),paddingBlock:o=>lt(at(o)*1),paddingInline:o=>lt(at(o)*1),blockSize:o=>lt(6+at(o)*2),inlineSize:o=>lt(6+at(o)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:o=>lt(at(o)*1)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:o=>Pn(o,"shift-2","neutral"),outline:o=>`1px solid ${Pn(o,"shift-4","neutral")}`}}}}import{toState as On}from"@domphy/core";import{themeColor as ue,themeDensity as ho,themeSize as ra,themeSpacing as st}from"@domphy/theme";function Cm(n={}){var a,t;let{mode:o="datetime-local"}=n,r=On((a=n.color)!=null?a:"neutral","color"),e=On((t=n.accentColor)!=null?t:"primary","accentColor");return{type:o,_onSchedule:(i,s)=>{i.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),s.type=o},style:{fontFamily:"inherit",fontSize:i=>ra(i,"inherit"),lineHeight:"inherit",color:i=>ue(i,"shift-9",r.get(i)),backgroundColor:i=>ue(i,"inherit",r.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${ue(i,"shift-4",r.get(i))}`,borderRadius:i=>st(ho(i)*1),paddingInline:i=>st(ho(i)*3),height:i=>st(6+ho(i)*2),"&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:i=>`${st(.5)} solid ${ue(i,"shift-6",e.get(i))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>ue(i,"shift-8","neutral"),backgroundColor:i=>ue(i,"shift-2","neutral"),outline:i=>`1px solid ${ue(i,"shift-4","neutral")}`},"&:invalid":{outline:i=>`${st(.5)} solid ${ue(i,"shift-6","error")}`}}}}import{toState as Ln}from"@domphy/core";import{themeColor as B,themeDensity as zt,themeSize as ia,themeSpacing as de}from"@domphy/theme";function xm(n={}){var e,a;let o=Ln((e=n.color)!=null?e:"neutral","color"),r=Ln((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"file",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),i.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>ia(t,"inherit"),lineHeight:"inherit",color:t=>B(t,"shift-9",o.get(t)),backgroundColor:t=>B(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${B(t,"shift-4",o.get(t))}`,borderRadius:t=>de(zt(t)*1),height:t=>de(6+zt(t)*2),paddingInline:t=>de(zt(t)*1),"&::-webkit-file-upload-button":{marginTop:t=>de(zt(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:de(1),height:de(6),paddingInline:de(2),cursor:"pointer",color:t=>B(t,"shift-11",o.get(t)),backgroundColor:t=>B(t,"shift-1",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${de(.5)} solid ${B(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>B(t,"shift-8","neutral"),outline:t=>`1px solid ${B(t,"shift-4","neutral")}`,backgroundColor:t=>B(t,"shift-1","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>B(t,"shift-8","neutral"),backgroundColor:t=>B(t,"shift-3","neutral")}}}}import{toState as $n}from"@domphy/core";import{themeColor as Ee,themeDensity as Vt,themeSize as aa,themeSpacing as Re}from"@domphy/theme";function Pm(n={}){var e,a;let o=$n((e=n.color)!=null?e:"neutral","color"),r=$n((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"number",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),i.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:Re(10),paddingInlineStart:t=>Re(Vt(t)*3),paddingInlineEnd:t=>Re(Vt(t)*1.5),paddingBlock:t=>Re(Vt(t)*1),borderRadius:t=>Re(Vt(t)*1),fontSize:t=>aa(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${Ee(t,"shift-4",o.get(t))}`,color:t=>Ee(t,"shift-9",o.get(t)),backgroundColor:t=>Ee(t,"inherit",o.get(t)),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${Re(.5)} solid ${Ee(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>Ee(t,"shift-2","neutral"),outline:t=>`1px solid ${Ee(t,"shift-4","neutral")}`,color:t=>Ee(t,"shift-8","neutral")}}}}import{toState as fo}from"@domphy/core";import{themeColor as Mt,themeDensity as _t,themeSize as la,themeSpacing as ct}from"@domphy/theme";var sa='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"/><path d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"/></svg>',ca='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.585 10.587a2 2 0 0 0 2.829 2.828"/><path d="M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"/><path d="M3 3l18 18"/></svg>';function Im(n={}){var a,t;let o=fo((a=n.color)!=null?a:"neutral","color"),r=fo((t=n.accentColor)!=null?t:"primary","accentColor"),e=fo(!1);return{_onInsert:i=>{i.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onInit:i=>{let s={input:null,type:p=>e.get(p)?"text":"password",style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}},l={button:p=>e.get(p)?ca:sa,type:"button",ariaLabel:p=>e.get(p)?"Hide password":"Show password",onClick:()=>e.set(!e.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",display:"flex",alignItems:"center",flexShrink:0,opacity:.6}};i.children.insert(s),i.children.insert(l)},style:{display:"flex",alignItems:"center",gap:i=>ct(_t(i)*1),paddingBlock:i=>ct(_t(i)*1),paddingInline:i=>ct(_t(i)*3),borderRadius:i=>ct(_t(i)*1),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${Mt(i,"shift-4",o.get(i))}`,color:i=>Mt(i,"shift-9",o.get(i)),backgroundColor:i=>Mt(i,"inherit",o.get(i)),fontSize:i=>la(i,"inherit"),"&:focus-within":{outline:i=>`${ct(.5)} solid ${Mt(i,"shift-6",r.get(i))}`}}}}import{themeSpacing as In}from"@domphy/theme";function Mm(){return{style:{display:"flex",alignItems:"center",gap:In(2),"& > *":{minWidth:`${In(9)}!important`}},_onMount:n=>{let o=n.domElement,r=()=>Array.from(o.querySelectorAll("input")),e=i=>{let s=r(),l=i.target,p=s.indexOf(l);l.value&&p<s.length-1&&s[p+1].focus()},a=i=>{let s=r(),l=i.target,p=s.indexOf(l);i.key==="Backspace"&&!l.value&&p>0&&s[p-1].focus(),i.key==="ArrowLeft"&&p>0&&s[p-1].focus(),i.key==="ArrowRight"&&p<s.length-1&&s[p+1].focus()},t=i=>{var y,g,u;i.preventDefault();let s=(g=(y=i.clipboardData)==null?void 0:y.getData("text"))!=null?g:"",l=r(),p=l.indexOf(i.target),c=p===-1?0:p;[...s].forEach((d,h)=>{l[c+h]&&(l[c+h].value=d)});let m=Math.min(c+s.length-1,l.length-1);(u=l[m])==null||u.focus()};o.addEventListener("input",e),o.addEventListener("keydown",a),o.addEventListener("paste",t),n.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",a),o.removeEventListener("paste",t)})}}}import{toState as zn}from"@domphy/core";import{themeColor as pe,themeSize as ma,themeSpacing as mt}from"@domphy/theme";function Nm(n={}){var e,a;let o=zn((e=n.color)!=null?e:"neutral","color"),r=zn((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"radio",_onInsert:t=>{if(t.tagName!=="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:t=>ma(t,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:mt(6),height:mt(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:"50%",lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${pe(t,"shift-4",o.get(t))}`,color:t=>pe(t,"shift-9",o.get(t)),width:mt(4),height:mt(4)},"&:hover::before":{backgroundColor:t=>pe(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${pe(t,"shift-6",r.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>pe(t,"shift-8",r.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>pe(t,"shift-7",r.get(t))},"&:focus-visible":{borderRadius:"50%",outline:t=>`${mt(.5)} solid ${pe(t,"shift-6",r.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>pe(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as Vn}from"@domphy/core";import{themeColor as Rt,themeSpacing as F}from"@domphy/theme";function Wm(n={}){var e,a;let o=Vn((e=n.color)!=null?e:"neutral","color"),r=Vn((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"range",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:F(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:F(1.5),borderRadius:F(999),backgroundColor:t=>Rt(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:F(4),height:F(4),borderRadius:F(999),border:"none",marginTop:`calc((${F(1.5)} - ${F(4)}) / 2)`,backgroundColor:t=>Rt(t,"shift-9",r.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>Rt(t,"shift-10",r.get(t))},"&:focus-visible":{outline:t=>`${F(.5)} solid ${Rt(t,"shift-6",r.get(t))}`,outlineOffset:F(1),borderRadius:F(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Mn}from"@domphy/core";import{themeColor as he,themeDensity as go,themeSize as ua,themeSpacing as ut}from"@domphy/theme";function qm(n={}){var e,a;let o=Mn((e=n.color)!=null?e:"neutral","color"),r=Mn((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"search",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),i.type="search"},style:{fontFamily:"inherit",fontSize:t=>ua(t,"inherit"),lineHeight:"inherit",color:t=>he(t,"shift-9",o.get(t)),backgroundColor:t=>he(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${he(t,"shift-4",o.get(t))}`,borderRadius:t=>ut(go(t)*1),minWidth:ut(32),paddingInline:t=>ut(go(t)*3),paddingBlock:t=>ut(go(t)*1),"&::placeholder":{color:t=>he(t,"shift-7",o.get(t))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${ut(.5)} solid ${he(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>he(t,"shift-8","neutral"),backgroundColor:t=>he(t,"shift-2","neutral"),outline:t=>`1px solid ${he(t,"shift-4","neutral")}`}}}}import{toState as da}from"@domphy/core";import{themeColor as yo,themeSize as _n,themeSpacing as ne}from"@domphy/theme";function Jm(n={}){var r;let o=da((r=n.accentColor)!=null?r:"primary","accentColor");return{role:"switch",dataTone:"shift-2",type:"checkbox",_onSchedule:e=>{if(e.tagName!=="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:e=>_n(e,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:ne(9),height:ne(6),cursor:"pointer",margin:"0",paddingBlock:ne(1),"&:checked":{"&::before":{backgroundColor:e=>yo(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${ne(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:ne(3),height:ne(3),borderRadius:ne(999),left:ne(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>yo(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:ne(999),display:"inline-block",fontSize:e=>_n(e,"inherit"),lineHeight:1,backgroundColor:e=>yo(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Rn}from"@domphy/core";import{themeColor as H,themeDensity as bo,themeSize as pa,themeSpacing as fe}from"@domphy/theme";function tu(n={}){var e,a;let o=Rn((e=n.color)!=null?e:"neutral","color"),r=Rn((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"text",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),i.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:fe(10),paddingInline:t=>fe(bo(t)*3),paddingBlock:t=>fe(bo(t)*1),borderRadius:t=>fe(bo(t)*1),fontSize:t=>pa(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${H(t,"shift-4",o.get(t))}`,color:t=>H(t,"shift-9",o.get(t)),backgroundColor:t=>H(t,"inherit",o.get(t)),"&::placeholder":{color:t=>H(t,"shift-7")},"&:not(:placeholder-shown)":{color:t=>H(t,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${fe(.5)} solid ${H(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>H(t,"shift-2","neutral"),outline:t=>`1px solid ${H(t,"shift-4","neutral")}`,color:t=>H(t,"shift-8","neutral")},"&:invalid:not(:placeholder-shown)":{outline:t=>`${fe(.5)} solid ${H(t,"shift-6","error")}`},"&[data-status=error]":{outline:t=>`${fe(.5)} solid ${H(t,"shift-6","error")}`},"&[data-status=warning]":{outline:t=>`${fe(.5)} solid ${H(t,"shift-6","warning")}`}}}}import{toState as ha}from"@domphy/core";import{themeColor as So,themeSize as fa,themeSpacing as Co}from"@domphy/theme";function iu(n={}){var r;let o=ha((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>fa(e,"inherit"),color:e=>So(e,"shift-9",o.get(e)),backgroundColor:e=>So(e,"inherit",o.get(e)),paddingBlock:Co(.5),paddingInline:Co(1.5),borderRadius:Co(1),outline:e=>`1px solid ${So(e,"shift-4",o.get(e))}`}}}import{toState as An}from"@domphy/core";import{themeColor as vo,themeSize as ga,themeSpacing as ya}from"@domphy/theme";function cu(n={}){var e,a;let o=An((e=n.color)!=null?e:"neutral","color"),r=An((a=n.accentColor)!=null?a:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:ya(2),fontSize:t=>ga(t,"inherit"),color:t=>vo(t,"shift-9",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>vo(t,"shift-10",r.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>vo(t,"shift-8","neutral")}}}}import{toState as Nn}from"@domphy/core";import{themeColor as Ae,themeSize as ba,themeSpacing as Eo}from"@domphy/theme";function pu(n={}){var e,a;let o=Nn((e=n.color)!=null?e:"primary","color"),r=Nn((a=n.accentColor)!=null?a:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:t=>ba(t,"inherit"),backgroundColor:t=>Ae(t),color:t=>Ae(t,"shift-9",o.get(t)),textDecoration:"none","&:visited":{color:t=>Ae(t,"shift-9",r.get(t))},"&:hover:not([disabled])":{color:t=>Ae(t,"shift-10",o.get(t)),textDecoration:"underline"},"&:focus-visible":{borderRadius:Eo(1),outlineOffset:Eo(1),outline:t=>`${Eo(.5)} solid ${Ae(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>Ae(t,"shift-8","neutral")}}}}import{toState as Sa}from"@domphy/core";import{themeColor as re,themeDensity as At,themeSize as Ca,themeSpacing as dt}from"@domphy/theme";function yu(n={}){var r;let o=Sa((r=n.color)!=null?r:"primary","color");return{_onInsert:e=>{e.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:e=>Ca(e,"inherit"),textDecoration:"none",paddingBlock:e=>dt(At(e)*1),paddingInline:e=>dt(At(e)*3),borderRadius:e=>dt(At(e)*1),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:e=>dt(At(e)*1),userSelect:"none",cursor:"pointer",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${re(e,"shift-4",o.get(e))}`,color:e=>re(e,"shift-9",o.get(e)),backgroundColor:e=>re(e,"inherit",o.get(e)),"&:hover":{color:e=>re(e,"shift-10",o.get(e)),backgroundColor:e=>re(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${dt(.5)} ${re(e,"shift-6",o.get(e))}`},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:e=>re(e,"shift-2","neutral"),outline:e=>`1px solid ${re(e,"shift-4","neutral")}`,color:e=>re(e,"shift-8","neutral")}}}}import{toState as va}from"@domphy/core";import{themeColor as pt,themeDensity as ke,themeSize as Hn,themeSpacing as xe}from"@domphy/theme";function vu(n={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Eu(n={}){let{dense:o=!1}=n;return{style:{display:"flex",alignItems:"center",gap:r=>xe(ke(r)*2),paddingBlock:r=>xe(o?1:ke(r)*2),paddingInline:r=>xe(ke(r)*3),fontSize:r=>Hn(r,"inherit")}}}function ku(n={}){var a,t;let o=va((a=n.color)!=null?a:"neutral","color"),r=(t=n.accentColor)!=null?t:"primary",{dense:e=!1}=n;return{style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:i=>xe(ke(i)*2),paddingBlock:i=>xe(e?1:ke(i)*2),paddingInline:i=>xe(ke(i)*3),fontSize:i=>Hn(i,"inherit"),color:i=>pt(i,"shift-9",o.get(i)),borderRadius:i=>xe(ke(i)*1),transition:"background-color 150ms ease","&:hover:not([disabled])":{backgroundColor:i=>pt(i,"shift-2",o.get(i))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:i=>pt(i,"shift-3",r),color:i=>pt(i,"shift-12",r)},"&:focus-visible":{outline:i=>`2px solid ${pt(i,"shift-6",r)}`,outlineOffset:"-2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as Ea}from"@domphy/core";import{themeColor as Bn,themeSize as ka,themeSpacing as ko}from"@domphy/theme";function Du(n={}){var r;let o=Ea((r=n.accentColor)!=null?r:"highlight","accentColor");return{_onInsert:e=>{e.tagName!=="mark"&&console.warn('"mark" primitive patch must use mark tag')},dataTone:"shift-2",style:{display:"inline-flex",alignItems:"center",fontSize:e=>ka(e,"inherit"),color:e=>Bn(e,"shift-9",o.get(e)),backgroundColor:e=>Bn(e,"inherit",o.get(e)),height:ko(6),borderRadius:ko(1),paddingInline:ko(1.5)}}}import{toState as xa}from"@domphy/core";import{themeColor as we,themeDensity as Nt,themeSize as Fn,themeSpacing as Te}from"@domphy/theme";function $u(n={items:[]}){var i;let{items:o=[],selectable:r=!0,color:e="neutral",accentColor:a="primary"}=n,t=xa((i=n.activeKey)!=null?i:null);return{role:"menu",dataTone:"shift-17",_onSchedule:(s,l)=>{if(o.length===0)return;let p=s.nodeId,c=o.map((m,y)=>{var u;let g=(u=m.key)!=null?u:y;return Oe(W({button:typeof m.label=="string"?[{span:m.label}]:[m.label],_key:g,type:"button",id:`menuitem${p}${g}`,role:"menuitem"},r?{ariaCurrent:d=>t.get(d)===g||void 0}:{}),{onClick:()=>{var d;r&&t.set(g),(d=m.onClick)==null||d.call(m)},onKeyDown:d=>{var D;let h=d.key;if(h==="Enter"||h===" "){d.preventDefault(),d.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(h))return;d.preventDefault();let S=o.map((C,w)=>{var P;return(P=C.key)!=null?P:w}),v=S.indexOf(g),E=v;h==="ArrowDown"?E=(v+1)%S.length:h==="ArrowUp"?E=(v-1+S.length)%S.length:h==="Home"?E=0:h==="End"&&(E=S.length-1),(D=document.getElementById(`menuitem${p}${S[E]}`))==null||D.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:Te(2),width:"100%",fontSize:d=>Fn(d,"inherit"),height:d=>Te(6+Nt(d)*2),paddingInline:d=>Te(Nt(d)*3),border:"none",outline:"none",color:d=>we(d,"shift-9",e),backgroundColor:d=>we(d,"inherit",e),"&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:d=>we(d,"shift-2",e)},"&[aria-current=true]":{backgroundColor:d=>we(d,"shift-3",a),color:d=>we(d,"shift-10")},"&:focus-visible":{outline:d=>`${Te(.5)} solid ${we(d,"shift-6",a)}`,outlineOffset:`-${Te(.5)}`}}})});l[s.tagName]=c},style:{display:"flex",flexDirection:"column",paddingBlock:s=>Te(Nt(s)*2),paddingInline:s=>Te(Nt(s)*2),fontSize:s=>Fn(s,"inherit"),backgroundColor:s=>we(s,"inherit",e)}}}var Wn=n=>!!n&&typeof n.get=="function"&&n._isState===!0,Ne=n=>{let o={},r=[];for(let e in n){let a=n[e];e==="x"?r.push(`translateX(${typeof a=="number"?`${a}px`:a})`):e==="y"?r.push(`translateY(${typeof a=="number"?`${a}px`:a})`):e==="scale"?r.push(`scale(${a})`):e==="rotate"?r.push(`rotate(${typeof a=="number"?`${a}deg`:a})`):o[e]=a}return r.length&&(o.transform=r.join(" ")),o};function Vu(n={}){var i,s,l,p;let{initial:o,animate:r,exit:e,transition:a={}}=n,t={duration:(i=a.duration)!=null?i:300,delay:(s=a.delay)!=null?s:0,easing:(l=a.easing)!=null?l:"ease",iterations:(p=a.iterations)!=null?p:1,fill:"both"};return{_onMount:c=>{let m=c.domElement;if(!m||typeof m.animate!="function")return;let y=Wn(r)?r.get():r;if(y?m.animate(o?[Ne(o),Ne(y)]:[Ne(y)],t):o&&Object.assign(m.style,Ne(o)),Wn(r)){let g=r.addListener(u=>{m.animate([Ne(u)],t)});c.setMetadata("motionRelease",g)}},_onBeforeRemove:(c,m)=>{let y=c.domElement;if(!y||!e||typeof y.animate!="function")return m();y.animate([Ne(e)],t).finished.then(m,m)},_onRemove:c=>{let m=c.getMetadata("motionRelease");m==null||m()}}}import{toState as wa}from"@domphy/core";import{themeColor as Kn,themeSize as Ta,themeSpacing as Da}from"@domphy/theme";function Au(n={}){var r;let o=wa((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>Ta(e,"inherit"),backgroundColor:e=>Kn(e),color:e=>Kn(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:Da(3),listStyleType:"decimal",listStylePosition:"outside"}}}import{toState as Pa}from"@domphy/core";import{themeColor as He,themeDensity as ht,themeSize as Oa,themeSpacing as Be}from"@domphy/theme";function La(n,o){if(o<=7)return Array.from({length:o},(t,i)=>i+1);let r=[1];n>3&&r.push("...");let e=Math.max(2,n-1),a=Math.min(o-1,n+1);for(let t=e;t<=a;t++)r.push(t);return n<o-2&&r.push("..."),r.push(o),r}function Fu(n){var s;let{total:o,color:r="neutral",accentColor:e="primary"}=n,a=Pa((s=n.value)!=null?s:1),t={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:l=>Be(6+ht(l)*2),height:l=>Be(6+ht(l)*2),paddingInline:l=>Be(ht(l)*2),borderRadius:l=>Be(ht(l)*1),border:"none",cursor:"pointer",fontSize:l=>Oa(l,"inherit"),backgroundColor:"transparent",color:l=>He(l,"shift-9",r),"&:hover:not([disabled])":{backgroundColor:l=>He(l,"shift-2",r)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},i=Oe(W({},t),{backgroundColor:l=>He(l,"shift-6",e),color:l=>He(l,"shift-11",e),fontWeight:"600",cursor:"default","&:hover:not([disabled])":{backgroundColor:l=>He(l,"shift-6",e)}});return{role:"navigation",ariaLabel:"Pagination",_onInsert:l=>{l.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:l=>{let p={div:c=>{let m=a.get(c),y=[];y.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:m<=1,onClick:()=>m>1&&a.set(m-1),style:t});let g=0;for(let u of La(m,o))if(u==="...")y.push({span:"\u2026",_key:`ellipsis-${g++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:d=>Be(ht(d)*2),color:d=>He(d,"shift-7",r)}});else{let d=u===m;y.push({button:String(u),_key:`page-${u}`,type:"button",ariaLabel:`Page ${u}`,ariaCurrent:d?"page":void 0,disabled:d,onClick:()=>a.set(u),style:d?i:t})}return y.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:m>=o,onClick:()=>m<o&&a.set(m+1),style:t}),y},style:{display:"flex",alignItems:"center",gap:Be(1)}};l.children.insert(p)},style:{display:"inline-flex"}}}import{toState as $a}from"@domphy/core";import{themeColor as Ia,themeSize as za}from"@domphy/theme";function qu(n={}){var r;let o=$a((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>za(e,"inherit"),color:e=>Ia(e,"shift-9",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}import{merge as Va,toState as jn}from"@domphy/core";import{themeColor as Ma}from"@domphy/theme";function Zu(n){var y;let{open:o=!1,placement:r="bottom",openOn:e="click"}=n,a=null,t=jn(o),i=jn(r),{show:s,hide:l,anchorPartial:p}=K({kind:"popover",open:t,placement:i,content:n.content}),c={role:"dialog",dataTone:"shift-14",style:{backgroundColor:g=>Ma(g,"inherit")},onMouseEnter:()=>e==="hover"&&s(),onMouseLeave:()=>e==="hover"&&l(),_onInsert:g=>{let u=g.attributes.get("id");a=u||g.nodeId,!u&&g.attributes.set("id",a)}};return(y=n.content).$||(y.$=[]),n.content.$.push(c),Va(p,{ariaHaspopup:"dialog",ariaExpanded:g=>t.get(g),onMouseEnter:(g,u)=>e==="hover"&&s(u),onMouseLeave:(g,u)=>e==="hover"&&l(u),onClick:(g,u)=>{e==="click"&&(t.get()?l(u):s(u))},onKeyDown:(g,u)=>{g.key==="Escape"&&t.get()&&l(u)},onFocus:(g,u)=>e==="hover"&&s(u),onBlur:(g,u)=>{let d=g.relatedTarget,h=u.getRoot().domElement,S=a?h.querySelector(`#${CSS.escape(a)}`):null;d&&(S!=null&&S.contains(d))||l(u)},_onMount:g=>a&&g.attributes.set("ariaControls",a)}),p}import{toState as _a}from"@domphy/core";import{themeColor as Ht,themeSize as Ra,themeSpacing as xo}from"@domphy/theme";function Yn(n={}){let{placement:o="bottom-end",color:r="neutral",sideOffset:e=xo(6),bordered:a=!0}=n,t=_a(o),i={top:"bottom",bottom:"top",left:"right",right:"left","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},s=c=>{var m;return(m=i[t.get(c)])!=null?m:i["bottom-end"]},l=c=>c.includes("start")?e:c.includes("end")?"auto":"50%",p=c=>c.includes("end")?e:c.includes("start")?"auto":"50%";return{style:{fontSize:c=>Ra(c),backgroundColor:c=>Ht(c),color:c=>Ht(c,"shift-9",r),position:"relative","&::after":{content:'""',position:"absolute",width:xo(1.5),height:xo(1.5),backgroundColor:c=>Ht(c,"inherit",r),borderWidth:a?"1px":0,borderColor:c=>Ht(c,"inherit",r),borderTopStyle:c=>{let m=s(c);return m.includes("top")||m.includes("right")?"solid":"none"},borderBottomStyle:c=>{let m=s(c);return m.includes("bottom")||m.includes("left")?"solid":"none"},borderLeftStyle:c=>{let m=s(c);return m.includes("top")||m.includes("left")?"solid":"none"},borderRightStyle:c=>{let m=s(c);return m.includes("bottom")||m.includes("right")?"solid":"none"},top:c=>{let m=s(c);return m.includes("top")?0:m.includes("bottom")?"auto":l(m)},right:c=>{let m=s(c);return m.includes("right")?0:m.includes("left")?"auto":p(m)},bottom:c=>{let m=s(c);return m.includes("bottom")?0:m.includes("top")?"auto":p(m)},left:c=>{let m=s(c);return m.includes("left")?0:m.includes("right")?"auto":l(m)},transform:c=>{let m=s(c),y=m.includes("right")||m.includes("end")&&!m.includes("left")?"50%":"-50%",g=m.includes("bottom")||m.includes("end")&&!m.includes("top")?"50%":"-50%";return`translate(${y},${g}) rotate(45deg)`}}}}}import{toState as Aa}from"@domphy/core";import{themeColor as qn,themeDensity as wo,themeSize as Na,themeSpacing as To}from"@domphy/theme";function id(n={}){var r;let o=Aa((r=n.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>Na(e,"inherit"),color:e=>qn(e,"shift-9",o.get(e)),backgroundColor:e=>qn(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>To(wo(e)*2),paddingInline:e=>To(wo(e)*3),borderRadius:e=>To(wo(e)*2)}}}import{toState as Gn}from"@domphy/core";import{themeColor as Do,themeSpacing as Bt}from"@domphy/theme";function cd(n={}){var e,a;let o=Gn((e=n.color)!=null?e:"neutral","color"),r=Gn((a=n.accentColor)!=null?a:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},style:{appearance:"none",width:"100%",height:Bt(2),border:0,borderRadius:Bt(999),overflow:"hidden",backgroundColor:t=>Do(t,"shift-3",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>Do(t,"shift-3",o.get(t)),borderRadius:Bt(999)},"&::-webkit-progress-value":{backgroundColor:t=>Do(t,"shift-9",r.get(t)),borderRadius:Bt(999),transition:"width 220ms ease"}}}}import{toState as Un}from"@domphy/core";import{themeColor as Ha,themeSpacing as Ba}from"@domphy/theme";var Fa='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>',Wa='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/></svg>';function pd(n={}){var l,p;let{max:o=5,readOnly:r=!1,onChange:e}=n,a=(l=n.color)!=null?l:"warning",t=Un((p=n.value)!=null?p:0),i=Un(0),s=c=>{let m=i.get(c);return m>0?m:t.get(c)};return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:Ba(.5),fontSize:"1.5rem",cursor:r?"default":"pointer",color:c=>Ha(c,"shift-8",a)},_onInit:c=>{for(let m=1;m<=o;m++){let y=m,g=r?{}:{onClick:()=>{let d=y===t.get()?0:y;t.set(d),e==null||e(d),i.set(0)},onMouseEnter:()=>i.set(y),onMouseLeave:()=>i.set(0),onKeyDown:d=>{var E,D;let h=t.get(),S=h;if(d.key==="ArrowRight"||d.key==="ArrowUp")S=Math.min(o,h+1),d.preventDefault();else if(d.key==="ArrowLeft"||d.key==="ArrowDown")S=Math.max(0,h-1),d.preventDefault();else return;t.set(S),e==null||e(S);let v=S>0?S-1:0;(D=(E=c.domElement)==null?void 0:E.children[v])==null||D.focus()}},u=Oe(W({button:d=>y<=s(d)?Fa:Wa,_key:y,type:"button",ariaLabel:`${y} star${y>1?"s":""}`},g),{style:{background:"none",border:"none",padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center"}});c.children.insert(u)}}}}import{toState as Po}from"@domphy/core";import{themeColor as Xn,themeSpacing as Jn}from"@domphy/theme";function bd(n={}){var l,p,c;let{size:o=16,thickness:r=.25}=n,e=Po((l=n.value)!=null?l:0,"value"),a=Po((p=n.color)!=null?p:"primary","color"),t=Po((c=n.trackColor)!=null?c:"neutral","trackColor"),i=Math.round((1-r)*100),s=`radial-gradient(circle closest-side, transparent ${i}%, black ${i}%)`;return{role:"progressbar",ariaValuenow:m=>String(Math.round(e.get(m))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:m=>{m.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:Jn(o),height:Jn(o),borderRadius:"50%",background:m=>`conic-gradient(from -90deg, ${Xn(m,"shift-9",a.get(m))} ${e.get(m)}%, ${Xn(m,"shift-3",t.get(m))} 0%)`,WebkitMask:s,mask:s}}}import{toState as Ka}from"@domphy/core";import{themeColor as Oo,themeSpacing as Ft}from"@domphy/theme";function Ed(n={}){var r;let o=Ka((r=n.color)!=null?r:"neutral","color");return{style:{overflow:"auto","&::-webkit-scrollbar":{width:Ft(2),height:Ft(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>Oo(e,"shift-5",o.get(e)),borderRadius:Ft(999),border:`${Ft(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e=>Oo(e,"shift-7",o.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${Oo(e,"shift-5",o.get(e))} transparent`}}}import{toState as ja}from"@domphy/core";import{themeColor as Fe,themeSize as Ya,themeSpacing as j}from"@domphy/theme";function Td(n={items:[]}){var t,i,s;let{items:o=[],color:r="neutral",accentColor:e="primary"}=n,a=ja((s=(i=n.value)!=null?i:(t=o[0])==null?void 0:t.key)!=null?s:"");return{role:"radiogroup",_context:{segmented:{value:a}},_onSchedule:(l,p)=>{let c=o.map((m,y)=>{var d;let g=(d=m.key)!=null?d:String(y);return{button:[typeof m.label=="string"?{span:m.label}:m.label],_key:g,type:"button",role:"radio",ariaChecked:h=>a.get(h)===g,onClick:()=>a.set(g),style:{cursor:"pointer",fontSize:h=>Ya(h,"inherit"),height:j(6),paddingBlock:j(1),paddingInline:j(3),border:"none",borderRadius:j(10),color:h=>Fe(h,"shift-9",r),backgroundColor:"transparent",transition:"background-color 300ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:h=>Fe(h,"shift-3",r)},"&[aria-checked=true]":{backgroundColor:h=>Fe(h,"shift-0",e),color:h=>Fe(h,"shift-10",e)},"&:focus-visible":{outline:h=>`${j(.5)} solid ${Fe(h,"shift-6",e)}`,outlineOffset:`-${j(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});p[l.tagName]=c},style:{display:"inline-flex",paddingBlock:j(1),paddingInline:j(1),gap:j(.5),borderRadius:j(10),backgroundColor:l=>Fe(l,"shift-2",r)}}}import{themeColor as Y,themeColorToken as qa,themeDensity as ft,themeSize as Ga,themeSpacing as q}from"@domphy/theme";function Od(n={}){let{color:o="neutral",accentColor:r="primary"}=n;return{_onInsert:e=>{e.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:e=>Ga(e,"inherit"),lineHeight:"inherit",color:e=>Y(e,"shift-9",o),backgroundColor:e=>Y(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${Y(e,"shift-4",o)}`,borderRadius:e=>q(ft(e)*1),paddingBlock:e=>q(ft(e)*1),paddingLeft:e=>q(ft(e)*3),paddingRight:e=>q(ft(e)*5),backgroundImage:e=>{let a=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${qa(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(a)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${q(2)} center`,backgroundSize:`${q(2.5)} ${q(1.5)}`,"&:not([multiple])":{height:e=>q(6+ft(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`${q(.5)} solid ${Y(e,"shift-5",r)}`},"&:focus-visible":{outline:e=>`${q(.5)} solid ${Y(e,"shift-6",r)}`},"& optgroup":{color:e=>Y(e,"shift-11",o)},"& option[disabled]":{color:e=>Y(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>Y(e,"shift-8","neutral"),outline:e=>`1px solid ${Y(e,"shift-4","neutral")}`,backgroundColor:e=>Y(e,"shift-2","neutral")}}}}import{merge as Zn,toState as Lo}from"@domphy/core";import{themeColor as $o,themeDensity as Io,themeSize as Ua,themeSpacing as gt}from"@domphy/theme";function Md(n){let{options:o=[],placement:r="bottom",color:e="neutral",open:a=!1,multiple:t=!1}=n,i=Lo(n.value),s=Lo(a),{show:l,hide:p,anchorPartial:c}=K({kind:"selectBox",open:s,placement:Lo(r),content:n.content}),m={onClick:(u,d)=>!t&&p(d)};Zn(n.content,m);let y={div:u=>{let d=i.get(u),h=Array.isArray(d)?d:[d];return o.filter(v=>h.includes(v.value)).map(v=>({span:v.label,$:[wt({color:e,removable:t})],_key:v.value,_onRemove:E=>{let D=i.get(),w=(Array.isArray(D)?D:[D]).filter(P=>P!==v.value);t?i.set(w):i.set(w[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:gt(1),flex:1}},g={_onInsert:u=>{u.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:u=>u.children.insert(y),onClick:(u,d)=>s.get()?p(d):l(d),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:u=>gt(6+Io(u)*2),minWidth:gt(32),outlineOffset:"-1px",outline:u=>`1px solid ${$o(u,"shift-4","neutral")}`,paddingInline:u=>gt(Io(u)*2),borderRadius:u=>gt(Io(u)*1),fontSize:u=>Ua(u,"inherit"),color:u=>$o(u,"shift-9",e),backgroundColor:u=>$o(u,"inherit",e)}};return Zn(c,g),c}import{themeColor as We,themeDensity as Qn,themeSize as Xa,themeSpacing as Wt}from"@domphy/theme";function Ad(n={}){let{accentColor:o="primary",color:r="neutral",value:e=null}=n;return{role:"option",_onInit:t=>{t.tagName!=="div"&&console.warn('"selectItem" patch must use div tag');let i=t.getContext("select");if(i){let s=i.value;t.attributes.set("ariaSelected",l=>{let p=s.get(l);return i.multiple?p.includes(e):p===e}),t.addEvent("click",()=>{let l=s.get();i.multiple?l.includes(e)?s.set(l.filter(p=>p!==e)):s.set(l.concat([e])):l!==e&&s.set(e)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>Xa(t,"inherit"),height:t=>Wt(6+Qn(t)*2),paddingInline:t=>Wt(Qn(t)*3),border:"none",outline:"none",color:t=>We(t,"shift-9",r),backgroundColor:t=>We(t,"inherit",r),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>We(t,"shift-2",r)},"&[aria-selected=true]":{backgroundColor:t=>We(t,"shift-6",o),color:t=>We(t,"shift-11")},"&:focus-visible":{outline:t=>`${Wt(.5)} solid ${We(t,"shift-6",o)}`,outlineOffset:`-${Wt(.5)}`}}}}import{toState as Ja}from"@domphy/core";import{themeColor as Za,themeDensity as er,themeSize as Qa,themeSpacing as tr}from"@domphy/theme";function Fd(n={}){var i;let{color:o="neutral",multiple:r=!1}=n,e=Ja((i=n.value)!=null?i:r?[]:null),a={div:s=>{let l=e.get(s);return(Array.isArray(l)?l:[l]).map(c=>({input:null,name:n.name,value:c==null?"":String(c)}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:e,multiple:r}},_onInit:s=>{s.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),s.children.insert(a)},style:{display:"flex",flexDirection:"column",paddingBlock:s=>tr(er(s)*2),paddingInline:s=>tr(er(s)*2),fontSize:s=>Qa(s,"inherit"),backgroundColor:s=>Za(s,"inherit",o)}}}import{hashString as el,toState as tl}from"@domphy/core";import{themeColor as or,themeSize as ol,themeSpacing as nr}from"@domphy/theme";function Yd(n={}){var a;let o=tl((a=n.color)!=null?a:"neutral","color"),r={"0%,100%":{opacity:1},"50%":{opacity:.4}},e=el(JSON.stringify(r));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:t=>ol(t),color:t=>or(t,"shift-9",o.get(t)),height:nr(6),display:"block",borderRadius:nr(1),backgroundColor:t=>or(t,"inherit",o.get(t)),animation:`${e} 1.5s ease-in-out infinite`,[`@keyframes ${e}`]:r}}}import{toState as nl}from"@domphy/core";import{themeColor as rl,themeSize as il}from"@domphy/theme";function Xd(n={}){var r;let o=nl((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:e=>il(e,"inherit"),color:e=>rl(e,"shift-9",o.get(e))}}}import{hashString as al,toState as ll}from"@domphy/core";import{themeColor as Kt,themeSize as sl,themeSpacing as zo}from"@domphy/theme";var ir={to:{transform:"rotate(360deg)"}},rr=al(JSON.stringify(ir));function ep(n={}){var r;let o=ll((r=n.color)!=null?r:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:e=>{e.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:e=>sl(e),backgroundColor:e=>Kt(e),color:e=>Kt(e,"shift-9",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:zo(6),height:zo(6),borderRadius:"50%",border:e=>`${zo(.5)} solid ${Kt(e,"shift-4",o.get(e))}`,borderTopColor:e=>Kt(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${rr} 0.7s linear infinite`,[`@keyframes ${rr}`]:ir}}}import{merge as cl,toState as ml}from"@domphy/core";import{themeColor as jt,themeSpacing as Vo}from"@domphy/theme";function rp(n={}){let{direction:o="horizontal",defaultSize:r=50,min:e=10,max:a=90}=n;return{_onSchedule:(t,i)=>{cl(i,{_context:{splitter:{direction:o,size:ml(r),min:e,max:a,panelCount:0}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function ip(){return{_onMount:n=>{let o=n.getContext("splitter");if(!o){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let r=n.domElement,e=o.direction==="horizontal"?"width":"height",a=o.panelCount++===0,t=s=>{r.style[e]=`${a?s:100-s}%`};t(o.size.get()),r.style.flexShrink="0",r.style.overflow="auto";let i=o.size.addListener(t);n.addHook("Remove",i)}}}function ap(){return{role:"separator",tabindex:0,_onMount:n=>{let o=n.getContext("splitter");if(!o){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let r=n.domElement,e=o.direction==="horizontal";r.style.cursor=e?"col-resize":"row-resize",r.setAttribute("aria-orientation",e?"vertical":"horizontal"),r.setAttribute("aria-valuemin",String(o.min)),r.setAttribute("aria-valuemax",String(o.max)),r.setAttribute("aria-valuenow",String(Math.round(o.size.get())));let a=o.size.addListener(l=>{r.setAttribute("aria-valuenow",String(Math.round(l)))}),t=l=>{let p=l.shiftKey?10:1,c=null;e?l.key==="ArrowRight"?c=Math.min(o.size.get()+p,o.max):l.key==="ArrowLeft"&&(c=Math.max(o.size.get()-p,o.min)):l.key==="ArrowDown"?c=Math.min(o.size.get()+p,o.max):l.key==="ArrowUp"&&(c=Math.max(o.size.get()-p,o.min)),l.key==="Home"?c=o.min:l.key==="End"&&(c=o.max),c!==null&&(l.preventDefault(),o.size.set(c))},i=null,s=l=>{l.preventDefault();let p=r.parentElement,c=y=>{let g=p.getBoundingClientRect(),u=e?(y.clientX-g.left)/g.width*100:(y.clientY-g.top)/g.height*100;o.size.set(Math.min(Math.max(u,o.min),o.max))},m=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",m),i=null};i=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",m),i=null},document.addEventListener("mousemove",c),document.addEventListener("mouseup",m)};r.addEventListener("keydown",t),r.addEventListener("mousedown",s),n.addHook("Remove",()=>{i==null||i(),a(),r.removeEventListener("keydown",t),r.removeEventListener("mousedown",s)})},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:n=>jt(n,"shift-2"),"&:hover":{backgroundColor:n=>jt(n,"shift-3")},"&:focus-visible":{outline:n=>`2px solid ${jt(n,"shift-6")}`,outlineOffset:"2px"},"&::after":{content:'""',width:Vo(1),height:Vo(1),borderRadius:Vo(999),backgroundColor:n=>jt(n,"shift-4")}}}}import{toState as ul}from"@domphy/core";import{themeColor as M,themeSize as ar,themeSpacing as ge}from"@domphy/theme";function mp(n={items:[]}){var i;let{items:o=[],direction:r="horizontal",color:e="neutral",accentColor:a="primary"}=n,t=ul((i=n.current)!=null?i:0);return{_context:{steps:{current:t,direction:r,color:e,accentColor:a}},_onSchedule:(s,l)=>{let p=o.map((c,m)=>{var g;return{li:[typeof c.label=="string"?{span:c.label}:c.label],_key:(g=c.key)!=null?g:m,dataStep:String(m+1),dataStatus:u=>{let d=t.get(u);return m<d?"done":m===d?"active":"pending"},ariaCurrent:u=>t.get(u)===m?"step":void 0,style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:ge(1),flex:"1",fontSize:u=>ar(u,"decrease-1"),textAlign:"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:ge(6),height:ge(6),borderRadius:ge(999),fontSize:u=>ar(u,"decrease-1"),fontWeight:"600",flexShrink:"0",border:u=>`2px solid ${M(u,"shift-4",e)}`,backgroundColor:u=>M(u,"inherit"),color:u=>M(u,"shift-8"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"},"&:not(:first-child)::after":{content:'""',position:"absolute",top:ge(3),right:`calc(50% + ${ge(3)})`,left:`calc(-50% + ${ge(3)})`,height:"2px",backgroundColor:u=>M(u,"shift-3",e),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:u=>M(u,"shift-6",a),borderColor:u=>M(u,"shift-6",a),color:u=>M(u,"shift-15",a)},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:u=>M(u,"shift-3",e),borderColor:u=>M(u,"shift-3",e),color:u=>M(u,"shift-9",e)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:u=>M(u,"shift-3",e)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:u=>M(u,"shift-6",a)},"&[data-status=pending]":{color:u=>M(u,"shift-7")},"&[data-status=active]":{color:u=>M(u,"shift-10"),fontWeight:"600"},"&[data-status=done]":{color:u=>M(u,"shift-8")}}}});l[s.tagName]=p},style:{display:"flex",flexDirection:r==="vertical"?"column":"row",alignItems:r==="vertical"?"flex-start":"center",gap:ge(2),listStyle:"none",margin:"0",padding:"0"}}}import{toState as dl}from"@domphy/core";import{themeColor as lr,themeSize as pl}from"@domphy/theme";function hp(n={}){var r;let o=dl((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>pl(e,"inherit"),fontWeight:700,color:e=>lr(e,"shift-11",o.get(e)),backgroundColor:e=>lr(e)}}}import{toState as hl}from"@domphy/core";import{themeColor as fl,themeSize as gl}from"@domphy/theme";function bp(n={}){var r;let o=hl((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>gl(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>fl(e,"shift-9",o.get(e))}}}import{toState as yl}from"@domphy/core";import{themeColor as bl,themeSize as Sl}from"@domphy/theme";function Ep(n={}){var r;let o=yl((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>Sl(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>bl(e,"shift-9",o.get(e))}}}import{toState as Cl}from"@domphy/core";import{themeColor as G,themeDensity as Ke,themeSize as sr,themeSpacing as je}from"@domphy/theme";function Tp(n={}){var r;let o=Cl((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:e=>sr(e,"inherit"),color:e=>G(e,"shift-9",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>je(Ke(e)*3),paddingBlock:e=>je(Ke(e)*1),color:e=>G(e,"shift-10",o.get(e)),backgroundColor:e=>G(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>je(Ke(e)*3),paddingBlock:e=>je(Ke(e)*1),color:e=>G(e,"shift-9",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${G(e,"shift-3",o.get(e))}`,fontSize:e=>sr(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>je(Ke(e)*3),paddingBlock:e=>je(Ke(e)*1),color:e=>G(e,"shift-10",o.get(e)),backgroundColor:e=>G(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${G(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>G(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>G(e,"shift-2")}}}}import{toState as vl}from"@domphy/core";import{themeColor as Ye,themeDensity as Yt,themeSize as El,themeSpacing as ye}from"@domphy/theme";function Lp(n={items:[]}){var t,i,s;let{items:o=[],accentColor:r="primary",color:e="neutral"}=n,a=vl((s=(i=n.activeKey)!=null?i:(t=o[0])==null?void 0:t.key)!=null?s:0);return{_onSchedule:(l,p)=>{let c=l.nodeId,y={div:o.map((u,d)=>{var v;let h=(v=u.key)!=null?v:d;return{button:[typeof u.label=="string"?{span:u.label}:u.label],_key:h,type:"button",role:"tab",id:`tab${c}${h}`,ariaControls:`panel${c}${h}`,ariaSelected:E=>a.get(E)===h,onClick:()=>a.set(h),onKeyDown:E=>{let D=E.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(D))return;E.preventDefault();let C=o.map((ie,De)=>{var ae;return(ae=ie.key)!=null?ae:De}),w=C.indexOf(h),P=w;D==="ArrowRight"?P=(w+1)%C.length:D==="ArrowLeft"?P=(w-1+C.length)%C.length:D==="Home"?P=0:D==="End"&&(P=C.length-1),a.set(C[P])},style:{cursor:"pointer",fontSize:E=>El(E,"inherit"),height:E=>ye(6+Yt(E)*2),paddingInline:E=>ye(Yt(E)*4),border:"none",outline:"none",color:E=>Ye(E,"shift-9"),backgroundColor:E=>Ye(E,"inherit"),boxShadow:E=>`inset 0 -${ye(.5)} 0 0 ${Ye(E,"shift-1",e)}`,"&:hover:not([disabled])":{boxShadow:E=>`inset 0 -${ye(.5)} 0 0 ${Ye(E,"shift-2",e)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:E=>`inset 0 -${ye(.5)} 0 0 ${Ye(E,"shift-6",r)}`},"&:focus-visible":{boxShadow:E=>`inset 0 -${ye(.5)} 0 0 ${Ye(E,"shift-6",r)}`}}}}),role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},g=o.map((u,d)=>{var S;let h=(S=u.key)!=null?S:d;return{div:[u.content],_key:h,role:"tabpanel",id:`panel${c}${h}`,ariaLabelledby:`tab${c}${h}`,hidden:v=>a.get(v)!==h,style:{paddingBlock:v=>ye(Yt(v)*2),paddingInline:v=>ye(Yt(v)*2)}}});p[l.tagName]=[y,...g]}}}import{toState as cr}from"@domphy/core";import{themeColor as U,themeDensity as Mo,themeSize as kl,themeSpacing as qe}from"@domphy/theme";function Vp(n={}){var a,t;let o=cr((a=n.color)!=null?a:"neutral","color"),r=cr((t=n.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=n;return{_onInsert:i=>{i.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:i=>{if(e){let s=i.domElement;s.style.overflow="hidden";let l=()=>{s.style.height="auto",s.style.height=`${s.scrollHeight}px`};s.addEventListener("input",l),l(),i.addHook("Remove",()=>s.removeEventListener("input",l))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:i=>qe(Mo(i)*2),paddingBlock:i=>qe(Mo(i)*1.5),border:"none",borderRadius:i=>qe(Mo(i)*1.5),fontSize:i=>kl(i,"inherit"),color:i=>U(i,"shift-9",o.get(i)),outlineOffset:"-1px",outline:i=>`1px solid ${U(i,"shift-4",o.get(i))}`,backgroundColor:i=>U(i,"inherit",o.get(i)),"&::placeholder":{color:i=>U(i,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:i=>`${qe(.5)} solid ${U(i,"shift-5",r.get(i))}`},"&:focus-visible":{outline:i=>`${qe(.5)} solid ${U(i,"shift-6",r.get(i))}`},"&:invalid":{outline:i=>`${qe(.5)} solid ${U(i,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>U(i,"shift-8","neutral"),outline:i=>`1px solid ${U(i,"shift-4","neutral")}`,backgroundColor:i=>U(i,"shift-2","neutral")}}}}import{toState as xl}from"@domphy/core";import{themeColor as mr,themeDensity as _o,themeSpacing as Ro}from"@domphy/theme";function Ap(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Np(n={}){var t,i,s;let{last:o=!1}=n,r=(t=n.color)!=null?t:"neutral",e=(i=n.accentColor)!=null?i:"primary",a=xl((s=n.active)!=null?s:!1);return{style:W({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:l=>Ro(_o(l)*2),paddingBottom:l=>o?"0":Ro(_o(l)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:"0.25em",transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:l=>mr(l,"shift-8",a.get(l)?e:r),opacity:l=>a.get(l)?"1":"0.4"}},o?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:l=>`-${Ro(_o(l)*4)}`,width:"2px",backgroundColor:l=>mr(l,"shift-3",r)}})}}import{toState as wl}from"@domphy/core";import{themeColor as Ao,themeDensity as No,themeSize as Tl,themeSpacing as be}from"@domphy/theme";function Kp(n={}){let{position:o="top-center",color:r="neutral"}=n,e=wl(!1),a=o.startsWith("top"),t=o.endsWith("center"),i=o.endsWith("right"),s={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:a?"column":"column-reverse",alignItems:t?"center":i?"end":"start",inset:0,gap:be(4),zIndex:30,padding:be(6),pointerEvents:"none"}};return{_portal:l=>{let p=l.domElement.querySelector(`#domphy-toast-${o}`);return p||(p=l.children.insert(s).domElement),p},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:be(32),pointerEvents:"auto",paddingBlock:l=>be(No(l)*2),paddingInline:l=>be(No(l)*4),borderRadius:l=>be(No(l)*2),fontSize:l=>Tl(l,"inherit"),color:l=>Ao(l,"shift-9",r),backgroundColor:l=>Ao(l,"inherit",r),boxShadow:l=>`0 ${be(2)} ${be(9)} ${Ao(l,"shift-4","neutral")}`,opacity:l=>Number(e.get(l)),transform:l=>e.get(l)?"translateY(0)":a?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>e.set(!0)),_onBeforeRemove:(l,p)=>{let c=!1,m=null,y=()=>{c||(c=!0,m&&(clearTimeout(m),m=null),l.domElement.removeEventListener("transitionend",g),p())},g=u=>{u.propertyName==="transform"&&y()};l.domElement.addEventListener("transitionend",g),m=setTimeout(y,350),l.addHook("Remove",()=>{var u;m&&(clearTimeout(m),m=null),(u=l.domElement)==null||u.removeEventListener("transitionend",g)}),e.set(!1)}}}import{toState as Dl}from"@domphy/core";import{themeColor as Se,themeSize as ur,themeSpacing as X}from"@domphy/theme";function Gp(n={items:[]}){var i;let{items:o=[],multiple:r=!1,color:e="neutral",accentColor:a="primary"}=n,t=Dl((i=n.value)!=null?i:r?[]:"");return{role:"group",_context:{toggleGroup:{value:t,multiple:r}},_onSchedule:(s,l)=>{let p=o.map((c,m)=>{var u;let y=(u=c.key)!=null?u:String(m);return{button:[typeof c.label=="string"?{span:c.label}:c.label],_key:y,type:"button",role:"button",ariaPressed:d=>{let h=t.get(d);return Array.isArray(h)?h.includes(y):h===y},onClick:()=>{let d=t.get();if(r){let h=Array.isArray(d)?[...d]:[];t.set(h.includes(y)?h.filter(S=>S!==y):[...h,y])}else t.set(d===y?"":y)},style:{cursor:"pointer",fontSize:d=>ur(d,"inherit"),height:X(6),paddingBlock:X(1),paddingInline:X(2),border:"none",borderRadius:X(1),color:d=>Se(d,"shift-9",e),backgroundColor:d=>Se(d,"inherit",e),transition:"background-color 300ms ease","&:hover:not([disabled])":{backgroundColor:d=>Se(d,"shift-2",e)},"&[aria-pressed=true]":{backgroundColor:d=>Se(d,"shift-3",a),color:d=>Se(d,"shift-12",a)},"&:focus-visible":{outline:d=>`${X(.5)} solid ${Se(d,"shift-6",a)}`,outlineOffset:`-${X(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});l[s.tagName]=p},style:{display:"flex",paddingBlock:X(1),paddingInline:X(1),gap:X(1),borderRadius:X(2),fontSize:s=>ur(s,"inherit"),backgroundColor:s=>Se(s,"inherit",e),outline:s=>`1px solid ${Se(s,"shift-3",e)}`,outlineOffset:"-1px"}}}import{themeDensity as Pl,themeSpacing as Ol}from"@domphy/theme";function Jp(n={}){var r;let o=(r=n.gap)!=null?r:4;return{style:{display:"flex",alignItems:"center",gap:e=>Ol(Pl(e)*o)}}}function Zp(){return{div:null,style:{flex:"1 1 0"}}}import{merge as Ll,toState as dr}from"@domphy/core";import{themeColor as pr,themeDensity as Ho,themeSize as $l,themeSpacing as Bo}from"@domphy/theme";function rh(n={}){let{open:o=!1,placement:r="top",content:e="Tooltip Content"}=n,a=dr(r),t=dr(e),i=`domphy-tt-${Math.random().toString(36).slice(2,9)}`,s={span:g=>t.get(g),id:i},{show:l,hide:p,anchorPartial:c}=K({kind:"tooltip",open:o,placement:a,content:s}),m={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:g=>Bo(Ho(g)*1),paddingInline:g=>Bo(Ho(g)*3),borderRadius:g=>Bo(Ho(g)*1),color:g=>pr(g,"shift-9"),backgroundColor:g=>pr(g),fontSize:g=>$l(g,"inherit")},$:[Yn({placement:a,bordered:!1})]};return s.$||(s.$=[]),s.$.push(m),Ll(c,{ariaDescribedby:i,onMouseEnter:(g,u)=>l(u),onMouseLeave:(g,u)=>p(u),onFocus:(g,u)=>l(u),onBlur:(g,u)=>p(u),onKeyDown:(g,u)=>g.key==="Escape"&&p(u)}),c}import{ElementNode as hr}from"@domphy/core";function fr(n,o){return n.key!==void 0&&n.key!==null?String(n.key):`index-${o}`}function lh(n={}){let{duration:o=300,delay:r=0}=n,e=new Map,a=new Map,t=new Set,i=new Set;return{_onMount:s=>{s.addHook("Remove",()=>{for(let l of Array.from(a.values()))l();a.clear();for(let l of t)clearTimeout(l);t.clear();for(let l of i)cancelAnimationFrame(l);i.clear()})},_onBeforeUpdate:s=>{e=new Map,s.children.items.forEach((l,p)=>{if(!(l instanceof hr))return;let c=l.domElement;c&&e.set(fr(l,p),c.getBoundingClientRect())})},_onUpdate:s=>{s.children.items.forEach((l,p)=>{var C;if(!(l instanceof hr))return;let c=l.domElement;if(!c)return;let m=fr(l,p),y=e.get(m);if(!y)return;let g=c.getBoundingClientRect(),u=y.left-g.left,d=y.top-g.top;if(Math.abs(u)<.5&&Math.abs(d)<.5)return;(C=a.get(c))==null||C(),c.style.transition="none",c.style.transform=`translate(${u}px, ${d}px)`,c.getBoundingClientRect();let h=requestAnimationFrame(()=>{i.delete(h),c.style.transition=`transform ${o}ms ease ${r}ms`,c.style.transform="translate(0px, 0px)"});i.add(h);let S=!1,v=null,E=()=>{S||(S=!0,v&&(t.delete(v),v=null),a.delete(c),c.removeEventListener("transitionend",D),c.style.transition="",c.style.transform="")},D=w=>{w.propertyName==="transform"&&E()};a.set(c,()=>{S=!0,v&&(clearTimeout(v),t.delete(v),v=null),a.delete(c),c.removeEventListener("transitionend",D)}),c.addEventListener("transitionend",D),v=setTimeout(E,o+r+34),t.add(v)}),e.clear()}}}import{toState as Il}from"@domphy/core";import{themeColor as gr,themeSize as zl,themeSpacing as Vl}from"@domphy/theme";function uh(n={}){var r;let o=Il((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>zl(e,"inherit"),backgroundColor:e=>gr(e),color:e=>gr(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:Vl(3),listStyleType:"disc",listStylePosition:"outside"}}}export{Al as abbreviation,Fl as accordion,Yl as alert,Xl as avatar,es as badge,rs as blockquote,ss as breadcrumb,ds as breadcrumbEllipsis,gs as button,Cs as buttonGhost,xs as buttonSwitch,Ps as card,Is as code,Ks as combobox,Gs as command,Xs as commandItem,Us as commandSearch,tc as datePicker,ac as descriptionList,mc as details,gc as dialog,Cc as divider,wc as drawer,Oc as emphasis,zc as empty,Mc as errorBoundary,Nc as fab,Wc as figure,qc as formGroup,Jc as heading,tm as horizontalRule,im as icon,cm as image,pm as inputCheckbox,gm as inputColor,Cm as inputDateTime,xm as inputFile,Pm as inputNumber,Mm as inputOTP,Im as inputPassword,Nm as inputRadio,Wm as inputRange,qm as inputSearch,Jm as inputSwitch,tu as inputText,iu as keyboard,cu as label,pu as link,yu as linkButton,vu as list,Eu as listItem,ku as listItemButton,Du as mark,$u as menu,Vu as motion,Au as orderedList,Fu as pagination,qu as paragraph,Zu as popover,Yn as popoverArrow,id as preformated,cd as progress,pd as rating,bd as ringProgress,Ed as scrollArea,Td as segmented,Od as select,Md as selectBox,Ad as selectItem,Fd as selectList,Yd as skeleton,Xd as small,ep as spinner,rp as splitter,ap as splitterHandle,ip as splitterPanel,mp as steps,hp as strong,bp as subscript,Ep as superscript,Tp as table,Lp as tabs,wt as tag,Vp as textarea,Ap as timeline,Np as timelineItem,Kp as toast,Gp as toggleGroup,Jp as toolbar,Zp as toolbarSpacer,rh as tooltip,lh as transitionGroup,uh as unorderedList};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|