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