@domphy/ui 0.1.39 → 0.1.40
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/LICENSE +21 -0
- 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 +47 -48
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var Qo=Object.defineProperty,Zo=Object.defineProperties;var er=Object.getOwnPropertyDescriptors;var $t=Object.getOwnPropertySymbols;var tr=Object.prototype.hasOwnProperty,or=Object.prototype.propertyIsEnumerable;var Rt=(i,o,r)=>o in i?Qo(i,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[o]=r,Lt=(i,o)=>{for(var r in o||(o={}))tr.call(o,r)&&Rt(i,r,o[r]);if($t)for(var r of $t(o))or.call(o,r)&&Rt(i,r,o[r]);return i},Nt=(i,o)=>Zo(i,er(o));import{toState as Mt}from"@domphy/core";import{themeColor as pe,themeSize as rr,themeSpacing as nr}from"@domphy/theme";function ji(i={}){var e,n;let o=Mt((e=i.color)!=null?e:"neutral","color"),r=Mt((n=i.accentColor)!=null?n:"primary","accentColor");return{_onInsert:t=>{t.tagName!="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>rr(t),backgroundColor:t=>pe(t),color:t=>pe(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>pe(t,"shift-7",o.get(t)),textUnderlineOffset:nr(.72),cursor:"help","&:hover":{color:t=>pe(t,"shift-11",r.get(t)),textDecorationColor:t=>pe(t,"shift-9",r.get(t))}}}}import{toState as ir}from"@domphy/core";import{themeColor as X,themeDensity as M,themeSpacing as V}from"@domphy/theme";function Ui(i={}){var r;let o=ir((r=i.color)!=null?r:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>V(M(e)*2),backgroundColor:e=>X(e,"inherit",o.get(e)),color:e=>X(e,"shift-10",o.get(e)),outline:e=>`1px solid ${X(e,"shift-4",o.get(e))}`,outlineOffset:"-1px",overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>V(M(e)*2),paddingInline:e=>V(M(e)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:e=>V(M(e)*4),color:e=>X(e,"shift-9",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>V(M(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>V(M(e)*4),color:e=>X(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:V(2),paddingBlock:e=>V(M(e)*2),paddingInline:e=>V(M(e)*4),borderTop:e=>`1px solid ${X(e,"shift-3",o.get(e))}`}}}}import{merge as ar,toState as lr}from"@domphy/core";import{themeColor as Ze,themeSpacing as sr}from"@domphy/theme";function Zi(i={}){let{direction:o="horizontal",defaultSize:r=50,min:e=10,max:n=90}=i;return{_onSchedule:(t,a)=>{ar(a,{_context:{splitter:{direction:o,size:lr(r),min:e,max:n}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function ea(){return{_onMount:i=>{let o=i.getContext("splitter"),r=i.domElement,e=o.direction==="horizontal"?"width":"height";r.style[e]=`${o.size.get()}%`,r.style.flexShrink="0",r.style.overflow="auto";let n=o.size.addListener(t=>{r.style[e]=`${t}%`});i.addHook("Remove",n)}}}function ta(){return{_onMount:i=>{let o=i.getContext("splitter"),r=i.domElement,e=o.direction==="horizontal";r.style.cursor=e?"col-resize":"row-resize";let n=t=>{t.preventDefault();let a=r.parentElement,l=u=>{let c=a.getBoundingClientRect(),m=e?(u.clientX-c.left)/c.width*100:(u.clientY-c.top)/c.height*100;o.size.set(Math.min(Math.max(m,o.min),o.max))},s=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",l),document.addEventListener("mouseup",s)};r.addEventListener("mousedown",n),i.addHook("Remove",()=>r.removeEventListener("mousedown",n))},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:i=>Ze(i,"shift-2"),"&:hover":{backgroundColor:i=>Ze(i,"shift-3")},"&::after":{content:'""',borderRadius:sr(999),backgroundColor:i=>Ze(i,"shift-4")}}}}import{merge as cr,toState as mr}from"@domphy/core";import{themeColor as z,themeDensity as Ve,themeSize as Dt,themeSpacing as J}from"@domphy/theme";function ia(){return{_onSchedule:(i,o)=>{cr(o,{_context:{command:{query:mr("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function aa(i={}){let{color:o="neutral",accentColor:r="primary"}=i;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let n=e.getContext("command"),t=e.domElement,a=()=>n.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:e=>Dt(e,"inherit"),paddingInline:e=>J(Ve(e)*3),paddingBlock:e=>J(Ve(e)*2),border:"none",borderBottom:e=>`1px solid ${z(e,"shift-3",o)}`,outline:"none",color:e=>z(e,"shift-10",o),backgroundColor:e=>z(e,"inherit",o),"&::placeholder":{color:e=>z(e,"shift-7")},"&:focus-visible":{borderBottomColor:e=>z(e,"shift-6",r)}}}}function la(i={}){let{color:o="neutral",accentColor:r="primary"}=i;return{role:"option",_onMount:e=>{var s,u;let n=e.getContext("command"),t=e.domElement,a=(u=(s=t.textContent)==null?void 0:s.toLowerCase())!=null?u:"",l=n.query.addListener(c=>{t.hidden=c.length>0&&!a.includes(c.toLowerCase())});e.addHook("Remove",l)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>Dt(e,"inherit"),height:e=>J(6+Ve(e)*2),paddingInline:e=>J(Ve(e)*3),border:"none",outline:"none",color:e=>z(e,"shift-9",o),backgroundColor:e=>z(e,"inherit",o),"&:hover:not([disabled])":{backgroundColor:e=>z(e,"shift-2",o)},"&:focus-visible":{outline:e=>`${J(.5)} solid ${z(e,"shift-6",r)}`,outlineOffset:`-${J(.5)}`}}}}import{toState as Ht}from"@domphy/core";import{themeColor as Q,themeSize as ur,themeSpacing as Z}from"@domphy/theme";function ua(i={}){var e,n;let o=Ht((e=i.color)!=null?e:"neutral","color"),r=Ht((n=i.accentColor)!=null?n:"primary","accentColor");return{role:"button",_onInsert:t=>{var c;t.tagName!=="button"&&console.warn('"toggle" patch must use button tag');let a=t.getContext("toggleGroup"),s=((c=t.parent)==null?void 0:c.children.items).filter(m=>m.type==="ElementNode"&&m.attributes.get("role")==="button"),u=t.key!==void 0?String(t.key):String(s.findIndex(m=>m===t));t.attributes.set("ariaPressed",m=>{let p=a.value.get(m);return Array.isArray(p)?p.includes(u):p===u}),t.addEvent("click",()=>{let m=a.value.get();if(a.multiple){let p=Array.isArray(m)?[...m]:[];a.value.set(p.includes(u)?p.filter(h=>h!==u):[...p,u])}else a.value.set(m===u?"":u)})},style:{cursor:"pointer",fontSize:t=>ur(t,"inherit"),height:Z(6),paddingBlock:Z(1),paddingInline:Z(2),border:"none",borderRadius:Z(1),color:t=>Q(t,"shift-9",o.get(t)),backgroundColor:t=>Q(t,"inherit",o.get(t)),transition:"background-color 300ms ease","&:hover:not([disabled])":{backgroundColor:t=>Q(t,"shift-2",o.get(t))},"&[aria-pressed=true]":{backgroundColor:t=>Q(t,"shift-3",r.get(t)),color:t=>Q(t,"shift-12",r.get(t))},"&:focus-visible":{outline:t=>`${Z(.5)} solid ${Q(t,"shift-6",r.get(t))}`,outlineOffset:`-${Z(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as dr}from"@domphy/core";import{themeSpacing as ze,themeColor as Bt,themeSize as hr}from"@domphy/theme";function ga(i={}){var e;let{multiple:o=!1,color:r="neutral"}=i;return{role:"group",_context:{toggleGroup:{value:dr((e=i.value)!=null?e:o?[]:""),multiple:o}},style:{display:"flex",paddingBlock:ze(1),paddingInline:ze(1),gap:ze(1),borderRadius:ze(2),fontSize:n=>hr(n,"inherit"),backgroundColor:n=>Bt(n,"inherit",r),outline:n=>`1px solid ${Bt(n,"shift-3",r)}`,outlineOffset:"-1px"}}}import{themeSpacing as Ft}from"@domphy/theme";function Sa(){return{style:{display:"flex",alignItems:"center",gap:Ft(2),"& > *":{minWidth:Ft(9)+"!important"}},_onMount:i=>{let o=i.domElement,r=()=>Array.from(o.querySelectorAll("input")),e=a=>{let l=r(),s=a.target,u=l.indexOf(s);s.value&&u<l.length-1&&l[u+1].focus()},n=a=>{let l=r(),s=a.target,u=l.indexOf(s);a.key==="Backspace"&&!s.value&&u>0&&l[u-1].focus(),a.key==="ArrowLeft"&&u>0&&l[u-1].focus(),a.key==="ArrowRight"&&u<l.length-1&&l[u+1].focus()},t=a=>{var m,p,h;a.preventDefault();let l=(p=(m=a.clipboardData)==null?void 0:m.getData("text"))!=null?p:"",s=r(),u=s.indexOf(a.target);[...l].forEach((d,g)=>{s[u+g]&&(s[u+g].value=d)});let c=Math.min(u+l.length-1,s.length-1);(h=s[c])==null||h.focus()};o.addEventListener("input",e),o.addEventListener("keydown",n),o.addEventListener("paste",t),i.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",n),o.removeEventListener("paste",t)})}}}import{toState as pr}from"@domphy/core";import{themeColor as et,themeDensity as At,themeSize as fr,themeSpacing as $e}from"@domphy/theme";function ka(i={}){var r;let o=pr((r=i.color)!=null?r:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:$e(3),paddingBlock:e=>$e(At(e)*2),paddingInline:e=>$e(At(e)*4),boxShadow:e=>`inset ${$e(1)} 0 0 0 ${et(e,"shift-8",o.get(e))}`,backgroundColor:e=>et(e,"inherit",o.get(e)),color:e=>et(e,"shift-10",o.get(e)),fontSize:e=>fr(e,"inherit")}}}import{toState as gr}from"@domphy/core";import{themeColor as Wt,themeSize as yr,themeSpacing as jt}from"@domphy/theme";function Ia(i={}){var r;let o=gr((r=i.color)!=null?r:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:jt(9),height:jt(9),fontSize:e=>yr(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>Wt(e,"inherit",o.get(e)),color:e=>Wt(e,"shift-11",o.get(e)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}import{toState as Kt}from"@domphy/core";import{themeSpacing as tt,themeColor as qt,themeSize as br}from"@domphy/theme";function Ra(i={}){var n;let{label:o=999}=i,r=Kt(o),e=Kt((n=i.color)!=null?n:"danger","color");return{style:{position:"relative","&::after":{content:t=>`"${r.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:tt(1),minWidth:tt(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>br(t,"decrease-1"),borderRadius:tt(999),backgroundColor:t=>qt(t,"shift-9",e.get(t)),color:t=>qt(t,"shift-0",e.get(t))}}}}import{toState as Sr}from"@domphy/core";import{themeColor as fe,themeSize as Cr,themeSpacing as Yt}from"@domphy/theme";function Ha(i={}){var e;let{separator:o="/"}=i,r=Sr((e=i.color)!=null?e:"neutral","color");return{_onInsert:n=>{n.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:n=>Cr(n,"inherit"),gap:Yt(1),color:n=>fe(n,"shift-9",r.get(n)),backgroundColor:n=>fe(n,"inherit",r.get(n)),"& > *":{display:"inline-flex",alignItems:"center",color:n=>fe(n,"shift-8",r.get(n))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:n=>fe(n,"shift-4",r.get(n)),paddingInlineStart:Yt(1)},"& > [aria-current=page]":{color:n=>fe(n,"shift-10",r.get(n)),pointerEvents:"none"}}}}import{toState as vr}from"@domphy/core";import{themeColor as Re,themeSize as xr,themeSpacing as Le}from"@domphy/theme";function ja(i={}){var r;let o=vr((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:e=>xr(e,"inherit"),paddingInline:Le(1),border:"none",background:"none",cursor:"pointer",color:e=>Re(e,"shift-8",o.get(e)),borderRadius:Le(1),"&:hover":{color:e=>Re(e,"shift-10",o.get(e)),backgroundColor:e=>Re(e,"shift-2",o.get(e))},"&:focus-visible":{outline:e=>`${Le(.5)} solid ${Re(e,"shift-6",o.get(e))}`,outlineOffset:Le(.5)}}}}import{toState as ot,merge as rt}from"@domphy/core";import{themeSpacing as Y,themeColor as ge,themeDensity as nt,themeSize as Gt}from"@domphy/theme";import{toState as Er}from"@domphy/core";import{themeColor as Ne,themeSize as kr,themeSpacing as $}from"@domphy/theme";var Tr='<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 Me(i={}){var e;let{removable:o=!1}=i,r=Er((e=i.color)!=null?e:"neutral","color");return{dataTone:"shift-2",_onInit:n=>{let t={span:Tr,onClick:a=>{a.stopPropagation(),n.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:$(1),width:$(4),height:$(4),flexShrink:0,"&:hover":{backgroundColor:a=>Ne(a,"shift-4",r.get(a))}}};o&&n.children.insert(t)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:$(6),paddingBlock:"0px",borderRadius:$(1),paddingInlineStart:$(2),paddingInlineEnd:o?$(1):$(2),gap:$(2),fontSize:n=>kr(n,"inherit"),backgroundColor:n=>Ne(n,"inherit",r.get(n)),color:n=>Ne(n,"shift-9",r.get(n)),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${Ne(n,"shift-4",r.get(n))}`}}}import{toState as wr,merge as Pr}from"@domphy/core";import{computePosition as Or,autoUpdate as Ir,offset as _r,flip as Vr,shift as zr}from"@floating-ui/dom";function D(i){let{open:o=!1,placement:r}=i,e=null,n=null,t=null,a=null,l=wr(o),s=()=>{t&&a&&(n&&n(),n=Ir(t,a,()=>{Or(t,a,{placement:r.get(),middleware:[_r(12),Vr(),zr()],strategy:"fixed"}).then(({x:d,y:g,placement:f})=>{Object.assign(a.style,{left:`${d}px`,top:`${g}px`}),r.set(f)})}),l.set(!0))},u=()=>{n&&n(),n=null,l.set(!1)},c=()=>{e&&clearTimeout(e),e=setTimeout(s,100)},m=()=>{e&&clearTimeout(e),e=setTimeout(u,100)},p={style:{position:"fixed",pointerEvents:"auto",visibility:d=>l.get(d)?"visible":"hidden"},_onMount:d=>a=d.domElement,_portal:d=>{let g=d.domElement.querySelector("#domphy-floating");if(!g){let f={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};g=d.children.insert(f).domElement}return g}};return Pr(i.content,p),{show:c,hide:m,anchorPartial:{onKeyDown:d=>d.key==="Escape"&&m(),_onMount:d=>{let g=d.getRoot();t=d.domElement;let f=g.children.insert(i.content),b=S=>{if(!l.get()||!t||!a)return;let q=S.target;!t.contains(q)&&!a.contains(q)&&m()};d.getRoot().domElement.addEventListener("click",b),d.addHook("BeforeRemove",()=>{e&&clearTimeout(e),f&&f.remove(),d.getRoot().domElement.removeEventListener("click",b)})}}}}function ll(i){let{options:o=[],placement:r="bottom",color:e="neutral",open:n=!1,multiple:t=!1}=i,a=ot(i.value),l=ot(n),{show:s,hide:u,anchorPartial:c}=D({open:l,placement:ot(r),content:i.content}),m={onClick:()=>!t&&u()};rt(i.content,m);let p={border:"none",outline:"none",padding:0,margin:0,flex:1,height:Y(6),marginInlineStart:Y(2),fontSize:f=>Gt(f,"inherit"),color:f=>ge(f,"shift-9",e),backgroundColor:f=>ge(f,"inherit",e)},h;i.input?(rt(i.input,{onFocus:()=>s(),style:p,_key:"combobox-input"}),h=i.input):h={input:null,onFocus:()=>s(),value:f=>(a.get(f),""),style:p,_key:"combobox-input"};let d={div:f=>{let b=a.get(f),S=Array.isArray(b)?b:[b],w=o.filter(U=>S.includes(U.value)).map(U=>({span:U.label,$:[Me({color:e,removable:!0})],_key:U.value,_onRemove:Qe=>{let he=a.get(),zt=(Array.isArray(he)?he:[he]).filter(Jo=>Jo!==U.value);t?a.set(zt):a.set(zt[0])}}));return w.push(h),w},style:{display:"flex",flexWrap:"wrap",gap:Y(1)}},g={_onInsert:f=>{f.tagName!="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:f=>f.children.insert(d),style:{minWidth:Y(32),outlineOffset:"-1px",outline:f=>`1px solid ${ge(f,"shift-4","neutral")}`,paddingBlock:f=>Y(nt(f)*1),paddingInline:f=>Y(nt(f)*1),borderRadius:f=>Y(nt(f)*1),fontSize:f=>Gt(f,"inherit"),color:f=>ge(f,"shift-9",e),backgroundColor:f=>ge(f,"inherit",e)}};return rt(c,g),c}import{toState as $r}from"@domphy/core";import{themeSpacing as it,themeColor as De,themeSize as Rr}from"@domphy/theme";function Ut(i={}){let{placement:o="bottom-end",color:r="neutral",sideOffset:e=it(6),bordered:n=!0}=i,t=$r(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"},l=c=>{var m;return(m=a[t.get(c)])!=null?m:a["bottom-end"]},s=c=>c.includes("start")?e:c.includes("end")?"auto":"50%",u=c=>c.includes("end")?e:c.includes("start")?"auto":"50%";return{style:{fontSize:c=>Rr(c),backgroundColor:c=>De(c),color:c=>De(c,"shift-9",r),position:"relative","&::after":{content:'""',position:"absolute",width:it(1.5),height:it(1.5),backgroundColor:c=>De(c,"inherit",r),borderWidth:n?"1px":"0px",borderColor:c=>De(c,"inherit",r),borderTopStyle:c=>{let m=l(c);return m.includes("top")||m.includes("right")?"solid":"none"},borderBottomStyle:c=>{let m=l(c);return m.includes("bottom")||m.includes("left")?"solid":"none"},borderLeftStyle:c=>{let m=l(c);return m.includes("top")||m.includes("left")?"solid":"none"},borderRightStyle:c=>{let m=l(c);return m.includes("bottom")||m.includes("right")?"solid":"none"},top:c=>{let m=l(c);return m.includes("top")?0:m.includes("bottom")?"auto":s(m)},right:c=>{let m=l(c);return m.includes("right")?0:m.includes("left")?"auto":u(m)},bottom:c=>{let m=l(c);return m.includes("bottom")?0:m.includes("top")?"auto":u(m)},left:c=>{let m=l(c);return m.includes("left")?0:m.includes("right")?"auto":s(m)},transform:c=>{let m=l(c),p=m.includes("right")||m.includes("end")&&!m.includes("left")?"50%":"-50%",h=m.includes("bottom")||m.includes("end")&&!m.includes("top")?"50%":"-50%";return`translate(${p},${h}) rotate(45deg)`}}}}}import{toState as Lr}from"@domphy/core";import{themeSpacing as at,themeColor as Xt,themeDensity as Jt,themeSize as Nr}from"@domphy/theme";function Sl(i={}){var r;let o=Lr((r=i.color)!=null?r:"inherit","color");return{_onInsert:e=>{e.tagName!="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>Nr(e,"inherit"),backgroundColor:e=>Xt(e,"inherit",o.get(e)),boxShadow:e=>`inset ${at(1)} 0 0 0 ${Xt(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>at(Jt(e)*2),paddingInline:e=>at(Jt(e)*4),margin:0}}}import{toState as Mr}from"@domphy/core";import{themeColor as R,themeDensity as He,themeSize as Dr,themeSpacing as ye}from"@domphy/theme";function El(i={}){var r;let o=Mr((r=i.color)!=null?r:"primary","color");return{_onInsert:e=>{e.tagName!="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>Dr(e,"inherit"),paddingBlock:e=>ye(He(e)*1),paddingInline:e=>ye(He(e)*3),borderRadius:e=>ye(He(e)*1),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:e=>ye(He(e)*1),userSelect:"none",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${R(e,"shift-4",o.get(e))}`,color:e=>R(e,"shift-9",o.get(e)),backgroundColor:e=>R(e,"inherit",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>R(e,"shift-10",o.get(e)),backgroundColor:e=>R(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${ye(.5)} ${R(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>R(e,"shift-2","neutral"),outline:e=>`1px solid ${R(e,"shift-4","neutral")}`,color:e=>R(e,"shift-8","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}import{toState as Qt}from"@domphy/core";import{themeColor as C,themeSpacing as H,themeSize as Hr}from"@domphy/theme";function _l(i={}){var e,n;let o=Qt((e=i.color)!=null?e:"neutral","color"),r=Qt((n=i.accentColor)!=null?n:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>Hr(t,"inherit"),display:"inline-flex",position:"relative",width:H(6),height:H(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:H(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${C(t,"shift-4",o.get(t))}`,color:t=>C(t,"shift-9",o.get(t)),width:H(4),height:H(4)},"&:hover::before":{backgroundColor:t=>C(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${C(t,"shift-6",r.get(t))}`,backgroundColor:t=>C(t,"shift-8",r.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>C(t,"shift-7",r.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${H(.5)} solid ${C(t,"inherit",r.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${C(t,"shift-6",r.get(t))}`,backgroundColor:t=>C(t,"shift-3",r.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>C(t,"shift-8",r.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>C(t,"shift-7",r.get(t))},"&:focus-visible":{borderRadius:H(1.5),outline:t=>`${H(.5)} solid ${C(t,"shift-6",r.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>C(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as Br}from"@domphy/core";import{themeSpacing as lt,themeColor as Zt,themeSize as Fr}from"@domphy/theme";function Ml(i={}){var r;let o=Br((r=i.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!="code"&&console.warn('"code" primitive patch must use code tag')},style:{display:"inline-flex",alignItems:"center",fontSize:e=>Fr(e,"inherit"),color:e=>Zt(e,"shift-9",o.get(e)),backgroundColor:e=>Zt(e,"inherit",o.get(e)),height:lt(6),paddingInline:lt(1.5),borderRadius:lt(1)}}}import{toState as eo}from"@domphy/core";import{themeColor as B,themeDensity as be,themeSize as to,themeSpacing as y}from"@domphy/theme";function jl(i={}){var n,t;let{duration:o=240}=i,r=eo((n=i.color)!=null?n:"neutral","color"),e=eo((t=i.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:a=>to(a,"inherit"),color:a=>B(a,"shift-9",r.get(a)),backgroundColor:a=>B(a,"inherit",r.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>B(a,"shift-2",r.get(a)),color:a=>B(a,"shift-10",r.get(a)),fontSize:a=>to(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:y(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>y(be(a)*4),height:y(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:y(2),height:y(2),flexShrink:0,marginTop:`-${y(.5)}`,borderInlineEnd:a=>`${y(.5)} solid ${B(a,"shift-9",r.get(a))}`,borderBottom:a=>`${y(.5)} solid ${B(a,"shift-9",r.get(a))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>B(a,"shift-3",r.get(a))},"& > summary:focus-visible":{borderRadius:a=>y(be(a)*2),outlineOffset:`-${y(.5)}`,outline:a=>`${y(.5)} solid ${B(a,"shift-6",e.get(a))}`},"& > :not(summary)":{maxHeight:"0px",opacity:0,overflow:"hidden",paddingInline:a=>y(be(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${o}ms ease, opacity ${o}ms ease, padding ${o}ms ease`},"&[open] > :not(summary)":{maxHeight:y(250),opacity:1,paddingTop:a=>y(be(a)*1),paddingBottom:a=>y(be(a)*3)}}}}import{toState as Ar}from"@domphy/core";import{themeColor as oo,themeSpacing as ro,themeSize as no}from"@domphy/theme";function Jl(i={}){var r;let o=Ar((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${ro(24)}, max-content) 1fr`,columnGap:ro(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>no(e,"inherit"),color:e=>oo(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>no(e,"inherit"),color:e=>oo(e,"shift-9",o.get(e))}}}}import{toState as Wr}from"@domphy/core";import{themeColor as Be,themeDensity as jr,themeSize as Kr,themeSpacing as st}from"@domphy/theme";function os(i={}){let{color:o="neutral",open:r=!1}=i,e=Wr(r);return{_onInsert:n=>{n.tagName!="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(n,t)=>{if(n.target!==t.domElement)return;let a=t.domElement.getBoundingClientRect();n.clientX>=a.left&&n.clientX<=a.right&&n.clientY>=a.top&&n.clientY<=a.bottom||e.set(!1)},onTransitionEnd:(n,t)=>{let a=t.domElement;a.style.opacity==="0"&&(a.close(),document.body.style.overflow="")},_onMount:n=>{let t=n.domElement,a=l=>{l?(t.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{t.style.opacity="1";let s=t.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');s==null||s.focus()})):t.style.opacity="0"};a(e.get()),e.addListener(a)},style:{opacity:"0",transition:"opacity 200ms ease",fontSize:n=>Kr(n,"inherit"),color:n=>Be(n,"shift-10",o),backgroundColor:n=>Be(n,"inherit",o),border:"none",padding:n=>st(jr(n)*3),boxShadow:n=>`0 ${st(9)} ${st(16)} ${Be(n,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:n=>Be(n,"shift-2","neutral"),opacity:.75}}}}import{toState as qr}from"@domphy/core";import{themeColor as Yr,themeSize as Gr}from"@domphy/theme";function cs(i={}){var r;let o=qr((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>Gr(e,"inherit"),fontStyle:"italic",color:e=>Yr(e,"shift-10",o.get(e))}}}import{toState as Ur}from"@domphy/core";import{themeColor as io,themeSize as Xr,themeSpacing as Fe}from"@domphy/theme";function gs(i={}){var r;let o=Ur((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:Fe(2),marginInline:0,marginTop:Fe(3),marginBottom:Fe(3),color:e=>io(e,"shift-9",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:Fe(2)},"& figcaption":{fontSize:e=>Xr(e,"decrease-1"),color:e=>io(e,"shift-8",o.get(e)),lineHeight:1.45}}}}import{toState as Jr}from"@domphy/core";import{themeColor as Ae,themeDensity as ee,themeSpacing as L,themeSize as ct}from"@domphy/theme";function vs(i={}){var n;let{layout:o="horizontal"}=i,r=Jr((n=i.color)!=null?n:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:t=>L(ee(t)*3),paddingBlock:t=>L(ee(t)*3),border:"none",borderRadius:t=>L(ee(t)*2),fontSize:t=>ct(t,"inherit"),backgroundColor:t=>Ae(t,"inherit",r.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:L(4),rowGap:L(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>ct(t,"inherit"),fontWeight:600,paddingBlock:t=>L(ee(t)*1),borderRadius:t=>L(ee(t)*2),color:t=>Ae(t,"shift-9",r.get(t)),backgroundColor:t=>Ae(t,"inherit",r.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?"0px":L(ee(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(${L(2)} * -1)`,fontSize:t=>ct(t,"decrease-1"),color:t=>Ae(t,"shift-9",r.get(t))}}}}import{toState as Qr}from"@domphy/core";import{themeColor as Zr,themeSize as en,themeSpacing as tn}from"@domphy/theme";var on={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Os(i={}){var r;let o=Qr((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{["h1","h2","h3","h4","h5","h6"].includes(e.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:e=>Zr(e,"shift-11",o.get(e)),marginTop:0,marginBottom:tn(2),fontSize:e=>{let n=on[e.elementNode.tagName]||"inherit";return en(e,n)}}}}import{toState as rn}from"@domphy/core";import{themeColor as nn,themeSpacing as ao}from"@domphy/theme";function Ls(i={}){var r;let o=rn((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},style:{border:0,height:"1px",marginInline:0,marginTop:ao(3),marginBottom:ao(3),backgroundColor:e=>nn(e,"shift-4",o.get(e))}}}import{toState as an}from"@domphy/core";import{themeColor as ln,themeSpacing as sn}from"@domphy/theme";function As(i={}){var r;let o=an((r=i.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:sn(2),backgroundColor:e=>ln(e,"inherit",o.get(e))}}}import{toState as cn}from"@domphy/core";import{themeSpacing as lo,themeColor as mn,themeSize as un}from"@domphy/theme";function Ys(i={}){var r;let o=cn((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="span"&&console.warn('"icon" primitive patch should use span tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",alignSelf:"center",justifySelf:"center",verticalAlign:"middle",width:lo(4),height:lo(4),flexShrink:"0",fontSize:e=>un(e),backgroundColor:"transparent",color:e=>mn(e,"shift-9",o.get(e))}}}import{toState as so}from"@domphy/core";import{themeColor as co,themeDensity as Se,themeSpacing as Ce,themeSize as dn}from"@domphy/theme";function Zs(i={}){var e,n;let o=so((e=i.color)!=null?e:"neutral","color"),r=so((n=i.accentColor)!=null?n:"primary","accentColor");return{type:"color",_onSchedule:(t,a)=>{t.tagName!="input"&&console.warn('"inputColor" primitive patch must use input tag'),a.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:t=>dn(t,"inherit"),paddingBlock:t=>Ce(Se(t)*1),paddingInline:t=>Ce(Se(t)*1),blockSize:t=>Ce(6+Se(t)*2),inlineSize:t=>Ce(6+Se(t)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:t=>Ce(Se(t)*1)},"&:hover:not([disabled]), &:focus-visible":{},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>co(t,"shift-2","neutral"),outline:t=>`1px solid ${co(t,"shift-4","neutral")}`}}}}import{toState as mo}from"@domphy/core";import{themeColor as F,themeDensity as mt,themeSpacing as ve,themeSize as hn}from"@domphy/theme";function ac(i={}){var n,t;let{mode:o="datetime-local"}=i,r=mo((n=i.color)!=null?n:"neutral","color"),e=mo((t=i.accentColor)!=null?t:"primary","accentColor");return{type:o,_onSchedule:(a,l)=>{a.tagName!="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),l.type=o},style:{fontFamily:"inherit",fontSize:a=>hn(a,"inherit"),lineHeight:"inherit",color:a=>F(a,"shift-9",r.get(a)),backgroundColor:a=>F(a,"inherit",r.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${F(a,"shift-4",r.get(a))}`,borderRadius:a=>ve(mt(a)*1),paddingInline:a=>ve(mt(a)*3),height:a=>ve(6+mt(a)*2),"&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:a=>`${ve(.5)} solid ${F(a,"shift-6",e.get(a))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>F(a,"shift-8","neutral"),backgroundColor:a=>F(a,"shift-2","neutral"),outline:a=>`1px solid ${F(a,"shift-4","neutral")}`},"&:invalid":{outline:a=>`${ve(.5)} solid ${F(a,"shift-6","error")}`}}}}import{toState as uo}from"@domphy/core";import{themeColor as v,themeDensity as xe,themeSpacing as E,themeSize as pn}from"@domphy/theme";function hc(i={}){var e,n;let o=uo((e=i.color)!=null?e:"neutral","color"),r=uo((n=i.accentColor)!=null?n:"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=>pn(t,"inherit"),lineHeight:"inherit",color:t=>v(t,"shift-9",o.get(t)),backgroundColor:t=>v(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${v(t,"shift-4",o.get(t))}`,borderRadius:t=>E(xe(t)*1),height:t=>E(6+xe(t)*2),paddingInline:t=>E(xe(t)*1),"&::file-selector-button":{marginTop:t=>E(xe(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:E(1),height:E(6),paddingInline:E(2),cursor:"pointer",color:t=>v(t,"shift-10",r.get(t)),backgroundColor:t=>v(t,"shift-2",r.get(t))},"&::-webkit-file-upload-button":{marginTop:t=>E(xe(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:E(1),height:E(6),paddingInline:E(2),cursor:"pointer",color:t=>v(t,"shift-10",o.get(t)),backgroundColor:t=>v(t,"shift-2",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${E(.5)} solid ${v(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>v(t,"shift-8","neutral"),outline:t=>`1px solid ${v(t,"shift-4","neutral")}`,backgroundColor:t=>v(t,"shift-1","neutral")},"&[disabled]::file-selector-button, &[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>v(t,"shift-8","neutral"),backgroundColor:t=>v(t,"shift-3","neutral")}}}}import{toState as ho}from"@domphy/core";import{themeColor as A,themeDensity as ut,themeSpacing as Ee,themeSize as fn}from"@domphy/theme";function Cc(i={}){var e,n;let o=ho((e=i.color)!=null?e:"neutral","color"),r=ho((n=i.accentColor)!=null?n:"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=>fn(t,"inherit"),lineHeight:"inherit",color:t=>A(t,"shift-9",o.get(t)),backgroundColor:t=>A(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${A(t,"shift-4",o.get(t))}`,borderRadius:t=>Ee(ut(t)*1),minWidth:Ee(32),paddingInline:t=>Ee(ut(t)*3),paddingBlock:t=>Ee(ut(t)*1),"&::placeholder":{color:t=>A(t,"shift-7",o.get(t))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${Ee(.5)} solid ${A(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>A(t,"shift-8","neutral"),backgroundColor:t=>A(t,"shift-2","neutral"),outline:t=>`1px solid ${A(t,"shift-4","neutral")}`}}}}import{toState as po}from"@domphy/core";import{themeColor as k,themeDensity as dt,themeSpacing as W,themeSize as gn}from"@domphy/theme";function Pc(i={}){var e,n;let o=po((e=i.color)!=null?e:"neutral","color"),r=po((n=i.accentColor)!=null?n:"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:W(10),paddingInline:t=>W(dt(t)*3),paddingBlock:t=>W(dt(t)*1),borderRadius:t=>W(dt(t)*1),fontSize:t=>gn(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${k(t,"shift-4",o.get(t))}`,color:t=>k(t,"shift-9",o.get(t)),backgroundColor:t=>k(t,"inherit",o.get(t)),"&::placeholder":{color:t=>k(t,"shift-7")},"&:not(:placeholder-shown)":{color:t=>k(t,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${W(.5)} solid ${k(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>k(t,"shift-2","neutral"),outline:t=>`1px solid ${k(t,"shift-4","neutral")}`,color:t=>k(t,"shift-8","neutral")},"&:invalid:not(:placeholder-shown)":{outline:t=>`${W(.5)} solid ${k(t,"shift-6","error")}`},"&[data-status=error]":{outline:t=>`${W(.5)} solid ${k(t,"shift-6","error")}`},"&[data-status=warning]":{outline:t=>`${W(.5)} solid ${k(t,"shift-6","warning")}`}}}}import{toState as fo}from"@domphy/core";import{themeColor as ke,themeSpacing as x}from"@domphy/theme";function Rc(i={}){var e,n;let o=fo((e=i.color)!=null?e:"neutral","color"),r=fo((n=i.accentColor)!=null?n:"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:x(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:x(1.5),borderRadius:x(999),backgroundColor:t=>ke(t,"shift-3",o.get(t))},"&::-moz-range-track":{height:x(1.5),borderRadius:x(999),backgroundColor:t=>ke(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:x(4),height:x(4),borderRadius:x(999),border:"none",marginTop:`calc((${x(1.5)} - ${x(4)}) / 2)`,backgroundColor:t=>ke(t,"shift-9",r.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>ke(t,"shift-10",r.get(t))},"&:focus-visible":{outline:t=>`${x(.5)} solid ${ke(t,"shift-6",r.get(t))}`,outlineOffset:x(1),borderRadius:x(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as go}from"@domphy/core";import{themeColor as G,themeDensity as We,themeSpacing as te,themeSize as yn}from"@domphy/theme";function Fc(i={}){var e,n;let o=go((e=i.color)!=null?e:"neutral","color"),r=go((n=i.accentColor)!=null?n:"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:te(10),paddingInlineStart:t=>te(We(t)*3),paddingInlineEnd:t=>te(We(t)*1.5),paddingBlock:t=>te(We(t)*1),borderRadius:t=>te(We(t)*1),fontSize:t=>yn(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${G(t,"shift-4",o.get(t))}`,color:t=>G(t,"shift-9",o.get(t)),backgroundColor:t=>G(t,"inherit",o.get(t)),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${te(.5)} solid ${G(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>G(t,"shift-2","neutral"),outline:t=>`1px solid ${G(t,"shift-4","neutral")}`,color:t=>G(t,"shift-8","neutral")}}}}import{toState as bn}from"@domphy/core";import{themeColor as ht,themeSize as Sn,themeSpacing as pt}from"@domphy/theme";function Gc(i={}){var r;let o=bn((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>Sn(e,"inherit"),color:e=>ht(e,"shift-9",o.get(e)),backgroundColor:e=>ht(e,"inherit",o.get(e)),paddingBlock:pt(.5),paddingInline:pt(1.5),borderRadius:pt(1),outline:e=>`1px solid ${ht(e,"shift-4",o.get(e))}`}}}import{toState as yo}from"@domphy/core";import{themeColor as ft,themeSize as Cn,themeSpacing as vn}from"@domphy/theme";function tm(i={}){var e,n;let o=yo((e=i.color)!=null?e:"neutral","color"),r=yo((n=i.accentColor)!=null?n:"primary","accentColor");return{_onInsert:t=>{t.tagName!="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:vn(2),fontSize:t=>Cn(t,"inherit"),color:t=>ft(t,"shift-9",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>ft(t,"shift-10",r.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>ft(t,"shift-8","neutral")}}}}import{toState as bo}from"@domphy/core";import{themeColor as oe,themeSize as xn,themeSpacing as gt}from"@domphy/theme";function lm(i={}){var e,n;let o=bo((e=i.color)!=null?e:"primary","color"),r=bo((n=i.accentColor)!=null?n:"secondary","accentColor");return{_onInsert:t=>{t.tagName!="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:t=>xn(t,"inherit"),backgroundColor:t=>oe(t),color:t=>oe(t,"shift-9",o.get(t)),textDecoration:"none","&:visited":{color:t=>oe(t,"shift-9",r.get(t))},"&:hover:not([disabled])":{color:t=>oe(t,"shift-10",o.get(t)),textDecoration:"underline"},"&:focus-visible":{borderRadius:gt(1),outlineOffset:gt(1),outline:t=>`${gt(.5)} solid ${oe(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>oe(t,"shift-8","neutral")}}}}import{toState as En}from"@domphy/core";import{themeSpacing as yt,themeSize as kn,themeColor as So}from"@domphy/theme";function pm(i={}){var r;let o=En((r=i.accentColor)!=null?r:"highlight","accentColor");return{_onInsert:e=>{e.tagName!="mark"&&console.warn('"mark" primitive patch must use mark tag')},dataTone:"shift-2",style:{display:"inline-flex",alignItems:"center",fontSize:e=>kn(e,"inherit"),color:e=>So(e,"shift-9",o.get(e)),backgroundColor:e=>So(e,"inherit",o.get(e)),height:yt(6),borderRadius:yt(1),paddingInline:yt(1.5)}}}import{toState as Tn}from"@domphy/core";import{themeColor as wn,themeSize as Pn}from"@domphy/theme";function xm(i={}){var r;let o=Tn((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>Pn(e,"inherit"),color:e=>wn(e,"shift-9",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}import{toState as On}from"@domphy/core";import{themeColor as Co,themeDensity as bt,themeSpacing as St,themeSize as In}from"@domphy/theme";function Im(i={}){var r;let o=On((r=i.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>In(e,"inherit"),color:e=>Co(e,"shift-9",o.get(e)),backgroundColor:e=>Co(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>St(bt(e)*2),paddingInline:e=>St(bt(e)*3),borderRadius:e=>St(bt(e)*2)}}}import{toState as vo}from"@domphy/core";import{themeColor as je,themeSpacing as Te}from"@domphy/theme";function Nm(i={}){var e,n;let o=vo((e=i.color)!=null?e:"neutral","color"),r=vo((n=i.accentColor)!=null?n:"primary","accentColor");return{_onInsert:t=>{t.tagName!="progress"&&console.warn('"progress" primitive patch must use progress tag')},style:{appearance:"none",width:"100%",height:Te(2),border:0,borderRadius:Te(999),overflow:"hidden",backgroundColor:t=>je(t,"shift-3",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>je(t,"shift-3",o.get(t)),borderRadius:Te(999)},"&::-webkit-progress-value":{backgroundColor:t=>je(t,"shift-9",r.get(t)),borderRadius:Te(999),transition:"width 220ms ease"},"&::-moz-progress-bar":{backgroundColor:t=>je(t,"shift-9",r.get(t)),borderRadius:Te(999)}}}}import{toState as xo}from"@domphy/core";import{themeColor as j,themeSize as _n,themeSpacing as we}from"@domphy/theme";function Wm(i={}){var e,n;let o=xo((e=i.color)!=null?e:"neutral","color"),r=xo((n=i.accentColor)!=null?n:"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=>_n(t,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:we(6),height:we(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 ${j(t,"shift-4",o.get(t))}`,color:t=>j(t,"shift-9",o.get(t)),width:we(4),height:we(4)},"&:hover::before":{backgroundColor:t=>j(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${j(t,"shift-6",r.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>j(t,"shift-8",r.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>j(t,"shift-7",r.get(t))},"&:focus-visible":{borderRadius:"50%",outline:t=>`${we(.5)} solid ${j(t,"shift-6",r.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>j(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{themeColor as P,themeDensity as Pe,themeSize as Vn,themeSpacing as O,themeColorToken as zn}from"@domphy/theme";function qm(i={}){let{color:o="neutral",accentColor:r="primary"}=i;return{_onInsert:e=>{e.tagName!="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:e=>Vn(e,"inherit"),lineHeight:"inherit",color:e=>P(e,"shift-9",o),backgroundColor:e=>P(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${P(e,"shift-4",o)}`,borderRadius:e=>O(Pe(e)*1),paddingBlock:e=>O(Pe(e)*1),paddingLeft:e=>O(Pe(e)*3),paddingRight:e=>O(Pe(e)*5),backgroundImage:e=>{let n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${zn(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(n)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${O(2)} center`,backgroundSize:`${O(2.5)} ${O(1.5)}`,"&:not([multiple])":{height:e=>O(6+Pe(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`${O(.5)} solid ${P(e,"shift-5",r)}`},"&:focus-visible":{outline:e=>`${O(.5)} solid ${P(e,"shift-6",r)}`},"& optgroup":{color:e=>P(e,"shift-11",o)},"& option[disabled]":{color:e=>P(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>P(e,"shift-8","neutral"),outline:e=>`1px solid ${P(e,"shift-4","neutral")}`,backgroundColor:e=>P(e,"shift-2","neutral")}}}}import{hashString as $n,toState as Rn}from"@domphy/core";import{themeColor as Eo,themeSize as Ln,themeSpacing as ko}from"@domphy/theme";function Xm(i={}){var n;let o=Rn((n=i.color)!=null?n:"neutral","color"),r={"0%,100%":{opacity:1},"50%":{opacity:.4}},e=$n(JSON.stringify(r));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:t=>Ln(t),color:t=>Eo(t,"shift-9",o.get(t)),height:ko(6),display:"block",borderRadius:ko(1),backgroundColor:t=>Eo(t,"inherit",o.get(t)),animation:`${e} 1.5s ease-in-out infinite`,[`@keyframes ${e}`]:r}}}import{hashString as Nn,toState as Mn}from"@domphy/core";import{themeColor as Ke,themeSize as Dn,themeSpacing as Ct}from"@domphy/theme";var wo={to:{transform:"rotate(360deg)"}},To=Nn(JSON.stringify(wo));function eu(i={}){var r;let o=Mn((r=i.color)!=null?r:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:e=>{e.tagName!="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:e=>Dn(e),backgroundColor:e=>Ke(e),color:e=>Ke(e,"shift-9",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:Ct(6),height:Ct(6),borderRadius:"50%",border:e=>`${Ct(.5)} solid ${Ke(e,"shift-4",o.get(e))}`,borderTopColor:e=>Ke(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${To} 0.7s linear infinite`,[`@keyframes ${To}`]:wo}}}import{toState as Hn}from"@domphy/core";import{themeColor as Bn,themeDensity as Po,themeSize as Fn,themeSpacing as Oo}from"@domphy/theme";function iu(i={}){var a;let{color:o="neutral",multiple:r=!1}=i,e=Hn((a=i.value)!=null?a:r?[]:null),n={div:l=>{let s=e.get(l);return(Array.isArray(s)?s:[s]).map(c=>({input:null,name:i.name,value:c||""}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:e,multiple:r}},_onInit:l=>{l.tagName!="div"&&console.warn('"selectList" patch must use a div tag'),l.children.insert(n)},style:{display:"flex",flexDirection:"column",paddingBlock:l=>Oo(Po(l)*2),paddingInline:l=>Oo(Po(l)*2),fontSize:l=>Fn(l,"inherit"),backgroundColor:l=>Bn(l,"inherit",o)}}}import{themeSpacing as qe,themeColor as re,themeDensity as Io,themeSize as An}from"@domphy/theme";function cu(i={}){let{accentColor:o="primary",color:r="neutral",value:e=null}=i;return{role:"option",_onInit:t=>{t.tagName!="div"&&console.warn('"selectItem" patch must use div tag');let a=t.getContext("select");if(a){let l=a.value;t.attributes.set("ariaSelected",s=>{let u=l.get(s);return a.multiple?u.includes(e):u==e}),t.addEvent("click",()=>{let s=l.get();a.multiple?s.includes(e)?l.set(s.filter(u=>u!==e)):l.set(s.concat([e])):s!=e&&l.set(e)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>An(t,"inherit"),height:t=>qe(6+Io(t)*2),paddingInline:t=>qe(Io(t)*3),border:"none",outline:"none",color:t=>re(t,"shift-9",r),backgroundColor:t=>re(t,"inherit",r),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>re(t,"shift-2",r)},"&[aria-selected=true]":{backgroundColor:t=>re(t,"shift-6",o),color:t=>re(t,"shift-11")},"&:focus-visible":{outline:t=>`${qe(.5)} solid ${re(t,"shift-6",o)}`,outlineOffset:`-${qe(.5)}`}}}}import{toState as vt,merge as _o}from"@domphy/core";import{themeSpacing as Oe,themeColor as xt,themeDensity as Et,themeSize as Wn}from"@domphy/theme";function fu(i){let{options:o=[],placement:r="bottom",color:e="neutral",open:n=!1,multiple:t=!1}=i,a=vt(i.value),l=vt(n),{show:s,hide:u,anchorPartial:c}=D({open:l,placement:vt(r),content:i.content}),m={onClick:()=>!t&&u()};_o(i.content,m);let p={div:d=>{let g=a.get(d),f=Array.isArray(g)?g:[g];return o.filter(S=>f.includes(S.value)).map(S=>({span:S.label,$:[Me({color:e,removable:t})],_key:S.value,_onRemove:q=>{let w=a.get(),Qe=(Array.isArray(w)?w:[w]).filter(he=>he!==S.value);t?a.set(Qe):a.set(Qe[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:Oe(1),flex:1}},h={_onInsert:d=>{d.tagName!="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:d=>d.children.insert(p),onClick:()=>l.get()?u():s(),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:d=>Oe(6+Et(d)*2),minWidth:Oe(32),outlineOffset:"-1px",outline:d=>`1px solid ${xt(d,"shift-4","neutral")}`,paddingInline:d=>Oe(Et(d)*2),borderRadius:d=>Oe(Et(d)*1),fontSize:d=>Wn(d,"inherit"),color:d=>xt(d,"shift-9",e),backgroundColor:d=>xt(d,"inherit",e)}};return _o(c,h),c}import{toState as jn}from"@domphy/core";import{themeColor as kt,themeSize as Vo,themeSpacing as N}from"@domphy/theme";function xu(i={}){var r;let o=jn((r=i.accentColor)!=null?r:"primary","accentColor");return{dataTone:"shift-2",type:"checkbox",_onSchedule:e=>{if(e.tagName!="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:e=>Vo(e,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:N(9),height:N(6),cursor:"pointer",margin:"0",paddingBlock:N(1),"&:checked":{"&::before":{backgroundColor:e=>kt(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${N(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:N(3),height:N(3),borderRadius:N(999),left:N(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>kt(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:N(999),display:"inline-block",fontSize:e=>Vo(e,"inherit"),lineHeight:1,backgroundColor:e=>kt(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Tt}from"@domphy/core";import{themeColor as ne,themeSize as Kn,themeSpacing as T}from"@domphy/theme";function wu(i={}){var t,a;let{checked:o=!1}=i,r=Tt(o),e=Tt((t=i.color)!=null?t:"neutral","color"),n=Tt((a=i.accentColor)!=null?a:"primary","accentColor");return{_onSchedule:l=>{l.tagName!="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:l=>r.get(l),dataTone:"shift-2",onClick:()=>r.set(!r.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:l=>Kn(l),border:"none",outlineWidth:"1px",outline:l=>`1px solid ${ne(l,"shift-3",e.get(l))}`,minWidth:T(12),minHeight:T(6),borderRadius:T(999),paddingLeft:T(7),paddingRight:T(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:l=>ne(l,"inherit",e.get(l)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:T(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:T(5),height:T(5),borderRadius:T(999),color:l=>ne(l,"shift-9"),backgroundColor:l=>ne(l,"decrease-2",e.get(l))},"&[aria-checked=true]":{backgroundColor:l=>ne(l,"increase-3",n.get(l)),outline:"none",color:l=>ne(l,"decrease-2"),paddingLeft:T(2),paddingRight:T(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${T(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as qn}from"@domphy/core";import{themeColor as Yn,themeSize as Gn}from"@domphy/theme";function $u(i={}){var r;let o=qn((r=i.color)!=null?r:"neutral","color");return{dataSize:"decrease-1",_onInsert:e=>{e.tagName!="small"&&console.warn('"small" primitive patch must use small tag')},style:{fontSize:e=>Gn(e,"inherit"),color:e=>Yn(e,"shift-9",o.get(e))}}}import{toState as Un}from"@domphy/core";import{themeColor as zo,themeSize as Xn}from"@domphy/theme";function Bu(i={}){var r;let o=Un((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>Xn(e,"inherit"),fontWeight:700,color:e=>zo(e,"shift-11",o.get(e)),backgroundColor:e=>zo(e)}}}import{toState as Jn}from"@domphy/core";import{themeColor as Qn,themeSize as Zn}from"@domphy/theme";function Yu(i={}){var r;let o=Jn((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>Zn(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>Qn(e,"shift-9",o.get(e))}}}import{toState as ei}from"@domphy/core";import{themeColor as ti,themeSize as oi}from"@domphy/theme";function ed(i={}){var r;let o=ei((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>oi(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>ti(e,"shift-9",o.get(e))}}}import{toState as ri}from"@domphy/core";import{themeColor as I,themeDensity as ie,themeSpacing as ae,themeSize as $o}from"@domphy/theme";function nd(i={}){var r;let o=ri((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:e=>$o(e,"inherit"),color:e=>I(e,"shift-9",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>ae(ie(e)*3),paddingBlock:e=>ae(ie(e)*1),color:e=>I(e,"shift-10",o.get(e)),backgroundColor:e=>I(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>ae(ie(e)*3),paddingBlock:e=>ae(ie(e)*1),color:e=>I(e,"shift-9",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${I(e,"shift-3",o.get(e))}`,fontSize:e=>$o(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>ae(ie(e)*3),paddingBlock:e=>ae(ie(e)*1),color:e=>I(e,"shift-10",o.get(e)),backgroundColor:e=>I(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${I(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>I(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>I(e,"shift-2")+"!important"}}}}import{toState as Ro}from"@domphy/core";import{themeColor as _,themeDensity as wt,themeSpacing as le,themeSize as ni}from"@domphy/theme";function ud(i={}){var n,t;let o=Ro((n=i.color)!=null?n:"neutral","color"),r=Ro((t=i.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=i;return{_onInsert:a=>{a.tagName!="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:a=>{if(e){let l=a.domElement;l.style.overflow="hidden";let s=()=>{l.style.height="auto",l.style.height=l.scrollHeight+"px"};l.addEventListener("input",s),s()}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>le(wt(a)*2),paddingBlock:a=>le(wt(a)*1.5),border:"none",borderRadius:a=>le(wt(a)*1.5),fontSize:a=>ni(a,"inherit"),color:a=>_(a,"shift-9",o.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${_(a,"shift-4",o.get(a))}`,backgroundColor:a=>_(a,"inherit",o.get(a)),"&::placeholder":{color:a=>_(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`${le(.5)} solid ${_(a,"shift-5",r.get(a))}`},"&:focus-visible":{outline:a=>`${le(.5)} solid ${_(a,"shift-6",r.get(a))}`},"&:invalid":{outline:a=>`${le(.5)} solid ${_(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>_(a,"shift-8","neutral"),outline:a=>`1px solid ${_(a,"shift-4","neutral")}`,backgroundColor:a=>_(a,"shift-2","neutral")}}}}import{toState as ii}from"@domphy/core";import{themeColor as Lo,themeSize as ai,themeSpacing as li}from"@domphy/theme";function bd(i={}){var r;let o=ii((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>ai(e,"inherit"),backgroundColor:e=>Lo(e),color:e=>Lo(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:li(3),listStyleType:"disc",listStylePosition:"outside"}}}import{toState as si}from"@domphy/core";import{themeColor as No,themeSize as ci,themeSpacing as mi}from"@domphy/theme";function Td(i={}){var r;let o=si((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>ci(e,"inherit"),backgroundColor:e=>No(e),color:e=>No(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:mi(3),listStyleType:"decimal",listStylePosition:"outside"}}}import{toState as ui}from"@domphy/core";import{themeColor as se,themeDensity as Ie,themeSize as di,themeSpacing as ce}from"@domphy/theme";function hi(i,o){if(o<=7)return Array.from({length:o},(t,a)=>a+1);let r=[1];i>3&&r.push("...");let e=Math.max(2,i-1),n=Math.min(o-1,i+1);for(let t=e;t<=n;t++)r.push(t);return i<o-2&&r.push("..."),r.push(o),r}function Id(i){var l;let{total:o,color:r="neutral",accentColor:e="primary"}=i,n=ui((l=i.value)!=null?l:1),t={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:s=>ce(6+Ie(s)*2),height:s=>ce(6+Ie(s)*2),paddingInline:s=>ce(Ie(s)*2),borderRadius:s=>ce(Ie(s)*1),border:"none",cursor:"pointer",fontSize:s=>di(s,"inherit"),backgroundColor:"transparent",color:s=>se(s,"shift-9",r),"&:hover:not([disabled])":{backgroundColor:s=>se(s,"shift-2",r)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=Nt(Lt({},t),{backgroundColor:s=>se(s,"shift-6",e),color:s=>se(s,"shift-11",e),fontWeight:"600",cursor:"default","&:hover:not([disabled])":{backgroundColor:s=>se(s,"shift-6",e)}});return{_onInsert:s=>{s.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:s=>{let u={div:c=>{let m=n.get(c),p=[];p.push({button:"\u2039",type:"button",ariaLabel:"Previous page",disabled:m<=1,onClick:()=>m>1&&n.set(m-1),style:t});for(let h of hi(m,o))if(h==="...")p.push({span:"\u2026",style:{display:"inline-flex",alignItems:"center",paddingInline:d=>ce(Ie(d)*2),color:d=>se(d,"shift-7",r)}});else{let d=h===m;p.push({button:String(h),type:"button",ariaLabel:`Page ${h}`,ariaCurrent:d?"page":void 0,disabled:d,onClick:()=>n.set(h),style:d?a:t})}return p.push({button:"\u203A",type:"button",ariaLabel:"Next page",disabled:m>=o,onClick:()=>m<o&&n.set(m+1),style:t}),p},style:{display:"flex",alignItems:"center",gap:ce(1)}};s.children.insert(u)},style:{display:"inline-flex"}}}import{toState as pi}from"@domphy/core";import{themeColor as Ye,themeSize as fi,themeSpacing as gi}from"@domphy/theme";function Ld(i={}){var r;let o=pi((r=i.color)!=null?r:"neutral","color");return{role:"separator",_onInsert:e=>{e.tagName!=="div"&&console.warn('"divider" patch should be used with <div>')},style:{display:"flex",justifyContent:"center",alignItems:"baseline",gap:gi(2),fontSize:e=>fi(e,"inherit"),backgroundColor:e=>Ye(e),color:e=>Ye(e,"shift-9",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>Ye(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>Ye(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}import{toState as yi}from"@domphy/core";import{themeColor as Ge,themeDensity as bi,themeSize as Si,themeSpacing as _e}from"@domphy/theme";var Mo={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},Ci={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},Pt=i=>i==="left"||i==="right";function Hd(i={}){let{color:o="neutral",open:r=!1,placement:e="right",size:n}=i,t=yi(r),a=Pt(e)?_e(80):_e(64),l=n!=null?n:a;return{_onInsert:s=>{s.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(s,u)=>{s.target===u.domElement&&t.set(!1)},onTransitionEnd:(s,u)=>{let c=u.domElement;t.get()||(c.close(),document.body.style.overflow="")},_onMount:s=>{let u=s.domElement,c=m=>{m?(u.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{u.style.transform="translate(0, 0)"})):u.style.transform=Mo[e]};c(t.get()),t.addListener(c)},style:{transform:Mo[e],transition:"transform 0.25s ease",fontSize:s=>Si(s,"inherit"),color:s=>Ge(s,"shift-10",o),backgroundColor:s=>Ge(s,"inherit",o),border:"none",padding:s=>_e(bi(s)*3),margin:Ci[e],width:Pt(e)?l:"100dvw",height:Pt(e)?"100dvh":l,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:s=>`0 ${_e(4)} ${_e(12)} ${Ge(s,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:s=>Ge(s,"shift-2","neutral"),opacity:.75}}}}import{toState as Do,merge as Ho}from"@domphy/core";function Yd(i){let{open:o=!1,placement:r="bottom",openOn:e="click"}=i,n=null,t=Do(o),a=Do(r),{show:l,hide:s,anchorPartial:u}=D({open:t,placement:a,content:i.content}),c={role:"dialog",dataTone:"shift-17",onMouseEnter:()=>e==="hover"&&l(),onMouseLeave:()=>e==="hover"&&s(),_onInsert:p=>{let h=p.attributes.get("id");n=h||p.nodeId,!h&&p.attributes.set("id",n)}};return Ho(i.content,c),Ho(u,{ariaHaspopup:"dialog",ariaExpanded:p=>t.get(p),onMouseEnter:()=>e==="hover"&&l(),onMouseLeave:()=>e==="hover"&&s(),onClick:()=>{e==="click"&&(t.get()?s():l())},onFocus:()=>l(),onBlur:(p,h)=>{let d=p.relatedTarget,g=h.getRoot().domElement,f=n?g.querySelector(`#${CSS.escape(n)}`):null;d&&(f!=null&&f.contains(d))||s()},_onMount:p=>n&&p.attributes.set("ariaControls",n)}),u}import{toState as vi}from"@domphy/core";import{themeColor as Ot,themeDensity as It,themeSize as xi,themeSpacing as K}from"@domphy/theme";function Jd(i={}){let{position:o="top-center",color:r="neutral"}=i,e=vi(!1),n=o.startsWith("top"),t=o.endsWith("center"),a=o.endsWith("right"),l={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:n?"column":"column-reverse",alignItems:t?"center":a?"end":"start",inset:0,gap:K(4),zIndex:30,padding:K(6),pointerEvents:"none"}};return{_portal:s=>{let u=s.domElement.querySelector(`#domphy-toast-${o}`);return u||(u=s.children.insert(l).domElement),u},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:K(32),pointerEvents:"auto",paddingBlock:s=>K(It(s)*2),paddingInline:s=>K(It(s)*4),borderRadius:s=>K(It(s)*2),fontSize:s=>xi(s,"inherit"),color:s=>Ot(s,"shift-9",r),backgroundColor:s=>Ot(s,"inherit",r),boxShadow:s=>`0 ${K(2)} ${K(9)} ${Ot(s,"shift-4","neutral")}`,opacity:s=>Number(e.get(s)),transform:s=>e.get(s)?"translateY(0)":n?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>e.set(!0)),_onBeforeRemove:(s,u)=>{let c=m=>{m.propertyName==="transform"&&(s.domElement.removeEventListener("transitionend",c),u())};s.domElement.addEventListener("transitionend",c),e.set(!1)}}}import{merge as Ei,toState as Bo}from"@domphy/core";import{themeSpacing as _t,themeColor as Fo,themeDensity as Vt,themeSize as ki}from"@domphy/theme";function ih(i={}){let{open:o=!1,placement:r="top",content:e="Tooltip Content"}=i,n=Bo(r),t=Bo(e),a=null,l={span:h=>t.get(h)},{show:s,hide:u,anchorPartial:c}=D({open:o,placement:n,content:l}),m={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",_onInsert:h=>{let d=h.attributes.get("id");a=d||h.nodeId,!d&&h.attributes.set("id",a)},style:{paddingBlock:h=>_t(Vt(h)*1),paddingInline:h=>_t(Vt(h)*3),borderRadius:h=>_t(Vt(h)*1),color:h=>Fo(h,"shift-9"),backgroundColor:h=>Fo(h),fontSize:h=>ki(h,"inherit")},$:[Ut({placement:n,bordered:!1})]};return l.$||(l.$=[]),l.$.push(m),Ei(c,{onMouseEnter:()=>s(),onMouseLeave:()=>u(),onFocus:()=>s(),onBlur:()=>u(),onKeyDown:h=>h.key==="Escape"&&u(),_onMount:h=>a&&h.attributes.set("ariaDescribedby",a)}),c}import{ElementNode as Ao}from"@domphy/core";function Wo(i,o){return i.key!==void 0&&i.key!==null?String(i.key):`index-${o}`}function ch(i={}){let{duration:o=300,delay:r=0}=i,e=new Map;return{_onBeforeUpdate:n=>{e=new Map,n.children.items.forEach((t,a)=>{if(!(t instanceof Ao))return;let l=t.domElement;l&&e.set(Wo(t,a),l.getBoundingClientRect())})},_onUpdate:n=>{n.children.items.forEach((t,a)=>{if(!(t instanceof Ao))return;let l=t.domElement;if(!l)return;let s=Wo(t,a),u=e.get(s);if(!u)return;let c=l.getBoundingClientRect(),m=u.left-c.left,p=u.top-c.top;if(Math.abs(m)<.5&&Math.abs(p)<.5)return;let h=l.style.transition,d=l.style.transform;l.style.transition="none",l.style.transform=`translate(${m}px, ${p}px)`,l.getBoundingClientRect(),requestAnimationFrame(()=>{l.style.transition=`transform ${o}ms ease ${r}ms`,l.style.transform="translate(0px, 0px)"});let g=()=>{l.style.transition=h,l.style.transform=d,l.removeEventListener("transitionend",f)},f=b=>{b.propertyName==="transform"&&g()};l.addEventListener("transitionend",f),setTimeout(g,o+r+34)}),e.clear()}}}import{merge as Ti}from"@domphy/core";import{toState as wi}from"@domphy/core";function fh(i={}){return{role:"tablist",_onSchedule:(r,e)=>{let n={_context:{tabs:{activeKey:wi(i.activeKey||0)}}};Ti(e,n)}}}import{themeSpacing as me,themeColor as ue,themeDensity as jo,themeSize as Pi}from"@domphy/theme";function Sh(i={}){let{accentColor:o="primary",color:r="neutral"}=i;return{role:"tab",_onInsert:n=>{var u;n.tagName!="button"&&console.warn('"tab" patch must use button tag');let t=n.getContext("tabs"),a=(u=n.parent)==null?void 0:u.children.items;a=a.filter(c=>c.type=="ElementNode"&&c.attributes.get("role")=="tab");let l=n.key||a.findIndex(c=>c==n),s={id:"tab"+n.parent.nodeId+l,ariaControls:"tabpanel"+n.parent.nodeId+l,ariaSelected:c=>t.activeKey.get(c)==l,onClick:()=>t.activeKey.set(l),onKeyDown:c=>{var f,b,S,q;let m=c.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(m))return;c.preventDefault();let p=((b=(f=n.parent)==null?void 0:f.children.items)!=null?b:[]).filter(w=>w.type==="ElementNode"&&w.attributes.get("role")==="tab"),h=p.findIndex(w=>w===n),d=h;m==="ArrowRight"?d=(h+1)%p.length:m==="ArrowLeft"?d=(h-1+p.length)%p.length:m==="Home"?d=0:m==="End"&&(d=p.length-1);let g=p[d];t.activeKey.set((S=g.key)!=null?S:d),(q=g.domElement)==null||q.focus()}};n.merge(s)},style:{cursor:"pointer",fontSize:n=>Pi(n,"inherit"),height:n=>me(6+jo(n)*2),paddingInline:n=>me(jo(n)*4),border:"none",outline:"none",color:n=>ue(n,"shift-9"),backgroundColor:n=>ue(n,"inherit"),boxShadow:n=>`inset 0 -${me(.5)} 0 0 ${ue(n,"shift-1",r)}`,"&:hover:not([disabled])":{boxShadow:n=>`inset 0 -${me(.5)} 0 0 ${ue(n,"shift-2",r)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:n=>`inset 0 -${me(.5)} 0 0 ${ue(n,"shift-6",o)}`},"&:focus-visible":{boxShadow:n=>`inset 0 -${me(.5)} 0 0 ${ue(n,"shift-6",o)}`}}}}import{themeSpacing as Ko,themeDensity as qo}from"@domphy/theme";function Eh(){return{role:"tabpanel",style:{paddingBlock:o=>Ko(qo(o)*2),paddingInline:o=>Ko(qo(o)*2)},_onInsert:o=>{var a;let r=o.getContext("tabs"),e=(a=o.parent)==null?void 0:a.children.items;e=e.filter(l=>l.type=="ElementNode"&&l.attributes.get("role")=="tabpanel");let n=o.key||e.findIndex(l=>l==o),t={id:"tabpanel"+o.parent.nodeId+n,ariaLabelledby:"tab"+o.parent.nodeId+n,hidden:l=>r.activeKey.get(l)!=n};o.merge(t)}}}import{merge as Oi}from"@domphy/core";import{toState as Ii}from"@domphy/core";import{themeColor as _i,themeDensity as Yo,themeSize as Vi,themeSpacing as Go}from"@domphy/theme";function _h(i={}){let{color:o="neutral",selectable:r=!0}=i;return{role:"menu",dataTone:"shift-17",_onSchedule:(n,t)=>{var l;let a={_context:{menu:{activeKey:Ii((l=i.activeKey)!=null?l:null),selectable:r}}};Oi(t,a)},style:{display:"flex",flexDirection:"column",paddingBlock:n=>Go(Yo(n)*2),paddingInline:n=>Go(Yo(n)*2),fontSize:n=>Vi(n,"inherit"),backgroundColor:n=>_i(n,"inherit",o)}}}import{themeSpacing as Ue,themeColor as de,themeDensity as Uo,themeSize as zi}from"@domphy/theme";function Rh(i={}){let{accentColor:o="primary",color:r="neutral"}=i;return{role:"menuitem",_onInsert:n=>{var s;n.tagName!="button"&&console.warn('"menuItem" patch must use button tag');let t=n.getContext("menu"),a=(s=n.parent)==null?void 0:s.children.items;a=a.filter(u=>u.type=="ElementNode"&&u.attributes.get("role")=="menuitem");let l=n.key||a.findIndex(u=>u==n);t.selectable&&(n.attributes.set("ariaCurrent",u=>t.activeKey.get(u)==l||void 0),n.addEvent("click",()=>t.activeKey.set(l)))},onKeyDown:(n,t)=>{var c,m,p,h;let a=n.key;if(a==="Enter"||a===" "){n.preventDefault(),(c=t.domElement)==null||c.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(a))return;n.preventDefault();let l=((p=(m=t.parent)==null?void 0:m.children.items)!=null?p:[]).filter(d=>d.type==="ElementNode"&&d.attributes.get("role")==="menuitem"),s=l.findIndex(d=>d===t),u=s;a==="ArrowDown"?u=(s+1)%l.length:a==="ArrowUp"?u=(s-1+l.length)%l.length:a==="Home"?u=0:a==="End"&&(u=l.length-1),(h=l[u].domElement)==null||h.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:n=>zi(n,"inherit"),height:n=>Ue(6+Uo(n)*2),paddingInline:n=>Ue(Uo(n)*3),border:"none",outline:"none",color:n=>de(n,"shift-9"),backgroundColor:n=>de(n,"inherit"),"&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:n=>de(n,"shift-2")},"&[aria-current=true]":{backgroundColor:n=>de(n,"shift-3",o),color:n=>de(n,"shift-10")},"&:focus-visible":{outline:n=>`${Ue(.5)} solid ${de(n,"shift-6",o)}`,outlineOffset:`-${Ue(.5)}`}}}}import{merge as $i}from"@domphy/core";function Dh(i){return{_onSchedule:(o,r)=>{$i(r,{_context:{form:i}})}}}function Bh(i,o){return{_onInsert:r=>{let n=r.getContext("form").setField(i,void 0,o),t=r.tagName,a=r.attributes.get("type");["input","select","textarea"].includes(t)||console.warn('"field" patch must use input, select, or textarea tag');let l={onBlur:()=>n.setTouched(),ariaInvalid:s=>!!n.message("error",s)||void 0,dataStatus:s=>n.status(s)};t==="input"&&a==="checkbox"?(l.checked=n.value(),l.onChange=s=>n.setValue(s.target.checked)):t==="input"&&a==="radio"?l.onChange=s=>n.setValue(s.target.value):t==="select"?(l.value=n.value(),l.onChange=s=>n.setValue(s.target.value)):t==="textarea"?(l.value=n.value(),l.onInput=s=>n.setValue(s.target.value)):(l.value=n.value(),l.onInput=s=>n.setValue(s.target.value)),r.merge(l)}}}import{Notifier as Ri}from"@domphy/core";function Li(i){return!!i&&typeof i.then=="function"}var Je=class{constructor(o,r){this._notifier=new Ri;this._messages={};this._touched=!1;this._pending=!1;this._validationToken=0;this._value=o,this._initValue=o,this._validator=r,r&&this.validate()}value(o){return o&&this._notifier.addListener("value",o),this._value}setValue(o){this._value=o,this._notifier.notify("value",o),this._notifier.notify("dirty",o!==this._initValue),this.validate()}dirty(o){return o&&this._notifier.addListener("dirty",o),this._value!==this._initValue}touched(o){return o&&this._notifier.addListener("touched",o),this._touched}setTouched(){this._touched||(this._touched=!0,this._notifier.notify("touched",!0))}configure(o,r){let e=!1;o!==void 0&&this._value===void 0&&this._initValue===void 0&&(this._value=o,this._initValue=o,this._notifier.notify("value",o),this._notifier.notify("dirty",!1),e=!0),r!==void 0&&r!==this._validator&&(this._validator=r,e=!0),e&&this.validate()}message(o,r){return r&&this._notifier.addListener(o,r),this._messages[o]}status(o){return o&&this._notifier.addListener("status",o),Xe(this._messages)}setMessages(o){let r=this._messages;this._messages=o;for(let e of["error","warning","success"])r[e]!==o[e]&&this._notifier.notify(e,o[e]);Xe(r)!==Xe(o)&&this._notifier.notify("status",Xe(o))}reset(){this._value=this._initValue,this._touched=!1,this._notifier.notify("value",this._value),this._notifier.notify("dirty",!1),this._notifier.notify("touched",!1),this.setMessages({}),this.validate()}validate(){let o=++this._validationToken;if(!this._validator){this._pending=!1,this.setMessages({});return}try{let r=this._validator(this._value);Li(r)?(this._pending=!0,Promise.resolve(r).then(e=>{o===this._validationToken&&(this._pending=!1,this.setMessages(e!=null?e:{}))}).catch(e=>{o===this._validationToken&&(this._pending=!1,console.error(e))})):(this._pending=!1,this.setMessages(r!=null?r:{}))}catch(r){o===this._validationToken&&(this._pending=!1),console.error(r)}}_dispose(){this._validationToken+=1,this._pending=!1,this._notifier._dispose()}};function Xe(i){if(i.error)return"error";if(i.warning)return"warning";if(i.success)return"success"}var Xo=class{constructor(){this.fields=new Map}setField(o,r,e){let n=this.fields.get(o);return n?n.configure(r,e):(n=new Je(r,e),this.fields.set(o,n)),n}getField(o){return this.setField(o)}removeField(o){var r;(r=this.fields.get(o))==null||r._dispose(),this.fields.delete(o)}get valid(){for(let o of this.fields.values())if(o._pending||o._messages.error)return!1;return!0}reset(){for(let o of this.fields.values())o.reset()}snapshot(){let o={};for(let[r,e]of this.fields)Ni(o,r,e._value);return o}_dispose(){for(let o of this.fields.values())o._dispose();this.fields.clear()}};function Ni(i,o,r){let e=o.split("."),n=i;for(let t=0;t<e.length-1;t++){let a=e[t];n[a]==null&&(n[a]=isNaN(Number(e[t+1]))?{}:[]),n=n[a]}n[e[e.length-1]]=r}export{Je as FieldState,Xo as FormState,ji as abbreviation,ka as alert,Ia as avatar,Ra as badge,Sl as blockquote,Ha as breadcrumb,ja as breadcrumbEllipsis,El as button,wu as buttonSwitch,Ui as card,Ml as code,ll as combobox,ia as command,la as commandItem,aa as commandSearch,Jl as descriptionList,jl as details,os as dialog,Ld as divider,Hd as drawer,cs as emphasis,Bh as field,gs as figure,Dh as form,vs as formGroup,Os as heading,Ls as horizontalRule,Ys as icon,As as image,_l as inputCheckbox,Zs as inputColor,ac as inputDateTime,hc as inputFile,Fc as inputNumber,Sa as inputOTP,Wm as inputRadio,Rc as inputRange,Cc as inputSearch,xu as inputSwitch,Pc as inputText,Gc as keyboard,tm as label,lm as link,pm as mark,_h as menu,Rh as menuItem,Td as orderedList,Id as pagination,xm as paragraph,Yd as popover,Ut as popoverArrow,Im as preformated,Nm as progress,qm as select,fu as selectBox,cu as selectItem,iu as selectList,Xm as skeleton,$u as small,eu as spinner,Zi as splitter,ta as splitterHandle,ea as splitterPanel,Bu as strong,Yu as subscript,ed as superscript,Sh as tab,Eh as tabPanel,nd as table,fh as tabs,Me as tag,ud as textarea,Jd as toast,ua as toggle,ga as toggleGroup,ih as tooltip,ch as transitionGroup,bd as unorderedList};
|
|
1
|
+
var Qo=Object.defineProperty,Zo=Object.defineProperties;var er=Object.getOwnPropertyDescriptors;var $t=Object.getOwnPropertySymbols;var tr=Object.prototype.hasOwnProperty,or=Object.prototype.propertyIsEnumerable;var Lt=(i,o,r)=>o in i?Qo(i,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[o]=r,Nt=(i,o)=>{for(var r in o||(o={}))tr.call(o,r)&&Lt(i,r,o[r]);if($t)for(var r of $t(o))or.call(o,r)&&Lt(i,r,o[r]);return i},Rt=(i,o)=>Zo(i,er(o));import{toState as Mt}from"@domphy/core";import{themeColor as pe,themeSize as rr,themeSpacing as nr}from"@domphy/theme";function ji(i={}){var e,n;let o=Mt((e=i.color)!=null?e:"neutral","color"),r=Mt((n=i.accentColor)!=null?n:"primary","accentColor");return{_onInsert:t=>{t.tagName!="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>rr(t),backgroundColor:t=>pe(t),color:t=>pe(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>pe(t,"shift-7",o.get(t)),textUnderlineOffset:nr(.72),cursor:"help","&:hover":{color:t=>pe(t,"shift-11",r.get(t)),textDecorationColor:t=>pe(t,"shift-9",r.get(t))}}}}import{toState as ir}from"@domphy/core";import{themeColor as X,themeDensity as M,themeSpacing as V}from"@domphy/theme";function Ui(i={}){var r;let o=ir((r=i.color)!=null?r:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>V(M(e)*2),backgroundColor:e=>X(e,"inherit",o.get(e)),color:e=>X(e,"shift-10",o.get(e)),outline:e=>`1px solid ${X(e,"shift-4",o.get(e))}`,outlineOffset:"-1px",overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>V(M(e)*2),paddingInline:e=>V(M(e)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:e=>V(M(e)*4),color:e=>X(e,"shift-9",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>V(M(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>V(M(e)*4),color:e=>X(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:V(2),paddingBlock:e=>V(M(e)*2),paddingInline:e=>V(M(e)*4),borderTop:e=>`1px solid ${X(e,"shift-3",o.get(e))}`}}}}import{merge as ar,toState as lr}from"@domphy/core";import{themeColor as Qe,themeSpacing as sr}from"@domphy/theme";function Zi(i={}){let{direction:o="horizontal",defaultSize:r=50,min:e=10,max:n=90}=i;return{_onSchedule:(t,a)=>{ar(a,{_context:{splitter:{direction:o,size:lr(r),min:e,max:n}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function ea(){return{_onMount:i=>{let o=i.getContext("splitter"),r=i.domElement,e=o.direction==="horizontal"?"width":"height";r.style[e]=`${o.size.get()}%`,r.style.flexShrink="0",r.style.overflow="auto";let n=o.size.addListener(t=>{r.style[e]=`${t}%`});i.addHook("Remove",n)}}}function ta(){return{_onMount:i=>{let o=i.getContext("splitter"),r=i.domElement,e=o.direction==="horizontal";r.style.cursor=e?"col-resize":"row-resize";let n=t=>{t.preventDefault();let a=r.parentElement,l=u=>{let c=a.getBoundingClientRect(),m=e?(u.clientX-c.left)/c.width*100:(u.clientY-c.top)/c.height*100;o.size.set(Math.min(Math.max(m,o.min),o.max))},s=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",l),document.addEventListener("mouseup",s)};r.addEventListener("mousedown",n),i.addHook("Remove",()=>r.removeEventListener("mousedown",n))},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:i=>Qe(i,"shift-2"),"&:hover":{backgroundColor:i=>Qe(i,"shift-3")},"&::after":{content:'""',borderRadius:sr(999),backgroundColor:i=>Qe(i,"shift-4")}}}}import{merge as cr,toState as mr}from"@domphy/core";import{themeColor as z,themeDensity as Ie,themeSize as Dt,themeSpacing as J}from"@domphy/theme";function ia(){return{_onSchedule:(i,o)=>{cr(o,{_context:{command:{query:mr("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function aa(i={}){let{color:o="neutral",accentColor:r="primary"}=i;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let n=e.getContext("command"),t=e.domElement,a=()=>n.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:e=>Dt(e,"inherit"),paddingInline:e=>J(Ie(e)*3),paddingBlock:e=>J(Ie(e)*2),border:"none",borderBottom:e=>`1px solid ${z(e,"shift-3",o)}`,outline:"none",color:e=>z(e,"shift-10",o),backgroundColor:e=>z(e,"inherit",o),"&::placeholder":{color:e=>z(e,"shift-7")},"&:focus-visible":{borderBottomColor:e=>z(e,"shift-6",r)}}}}function la(i={}){let{color:o="neutral",accentColor:r="primary"}=i;return{role:"option",_onMount:e=>{var s,u;let n=e.getContext("command"),t=e.domElement,a=(u=(s=t.textContent)==null?void 0:s.toLowerCase())!=null?u:"",l=n.query.addListener(c=>{t.hidden=c.length>0&&!a.includes(c.toLowerCase())});e.addHook("Remove",l)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>Dt(e,"inherit"),height:e=>J(6+Ie(e)*2),paddingInline:e=>J(Ie(e)*3),border:"none",outline:"none",color:e=>z(e,"shift-9",o),backgroundColor:e=>z(e,"inherit",o),"&:hover:not([disabled])":{backgroundColor:e=>z(e,"shift-2",o)},"&:focus-visible":{outline:e=>`${J(.5)} solid ${z(e,"shift-6",r)}`,outlineOffset:`-${J(.5)}`}}}}import{toState as Ht}from"@domphy/core";import{themeColor as Q,themeSize as ur,themeSpacing as Z}from"@domphy/theme";function ua(i={}){var e,n;let o=Ht((e=i.color)!=null?e:"neutral","color"),r=Ht((n=i.accentColor)!=null?n:"primary","accentColor");return{role:"button",_onInsert:t=>{var c;t.tagName!=="button"&&console.warn('"toggle" patch must use button tag');let a=t.getContext("toggleGroup"),s=((c=t.parent)==null?void 0:c.children.items).filter(m=>m.type==="ElementNode"&&m.attributes.get("role")==="button"),u=t.key!==void 0?String(t.key):String(s.findIndex(m=>m===t));t.attributes.set("ariaPressed",m=>{let p=a.value.get(m);return Array.isArray(p)?p.includes(u):p===u}),t.addEvent("click",()=>{let m=a.value.get();if(a.multiple){let p=Array.isArray(m)?[...m]:[];a.value.set(p.includes(u)?p.filter(h=>h!==u):[...p,u])}else a.value.set(m===u?"":u)})},style:{cursor:"pointer",fontSize:t=>ur(t,"inherit"),height:Z(6),paddingBlock:Z(1),paddingInline:Z(2),border:"none",borderRadius:Z(1),color:t=>Q(t,"shift-9",o.get(t)),backgroundColor:t=>Q(t,"inherit",o.get(t)),transition:"background-color 300ms ease","&:hover:not([disabled])":{backgroundColor:t=>Q(t,"shift-2",o.get(t))},"&[aria-pressed=true]":{backgroundColor:t=>Q(t,"shift-3",r.get(t)),color:t=>Q(t,"shift-12",r.get(t))},"&:focus-visible":{outline:t=>`${Z(.5)} solid ${Q(t,"shift-6",r.get(t))}`,outlineOffset:`-${Z(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as dr}from"@domphy/core";import{themeSpacing as _e,themeColor as Bt,themeSize as hr}from"@domphy/theme";function ga(i={}){var e;let{multiple:o=!1,color:r="neutral"}=i;return{role:"group",_context:{toggleGroup:{value:dr((e=i.value)!=null?e:o?[]:""),multiple:o}},style:{display:"flex",paddingBlock:_e(1),paddingInline:_e(1),gap:_e(1),borderRadius:_e(2),fontSize:n=>hr(n,"inherit"),backgroundColor:n=>Bt(n,"inherit",r),outline:n=>`1px solid ${Bt(n,"shift-3",r)}`,outlineOffset:"-1px"}}}import{themeSpacing as Ft}from"@domphy/theme";function Sa(){return{style:{display:"flex",alignItems:"center",gap:Ft(2),"& > *":{minWidth:Ft(9)+"!important"}},_onMount:i=>{let o=i.domElement,r=()=>Array.from(o.querySelectorAll("input")),e=a=>{let l=r(),s=a.target,u=l.indexOf(s);s.value&&u<l.length-1&&l[u+1].focus()},n=a=>{let l=r(),s=a.target,u=l.indexOf(s);a.key==="Backspace"&&!s.value&&u>0&&l[u-1].focus(),a.key==="ArrowLeft"&&u>0&&l[u-1].focus(),a.key==="ArrowRight"&&u<l.length-1&&l[u+1].focus()},t=a=>{var m,p,h;a.preventDefault();let l=(p=(m=a.clipboardData)==null?void 0:m.getData("text"))!=null?p:"",s=r(),u=s.indexOf(a.target);[...l].forEach((d,g)=>{s[u+g]&&(s[u+g].value=d)});let c=Math.min(u+l.length-1,s.length-1);(h=s[c])==null||h.focus()};o.addEventListener("input",e),o.addEventListener("keydown",n),o.addEventListener("paste",t),i.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",n),o.removeEventListener("paste",t)})}}}import{toState as pr}from"@domphy/core";import{themeColor as Ze,themeDensity as At,themeSize as fr,themeSpacing as Ve}from"@domphy/theme";function ka(i={}){var r;let o=pr((r=i.color)!=null?r:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:Ve(3),paddingBlock:e=>Ve(At(e)*2),paddingInline:e=>Ve(At(e)*4),boxShadow:e=>`inset ${Ve(1)} 0 0 0 ${Ze(e,"shift-8",o.get(e))}`,backgroundColor:e=>Ze(e,"inherit",o.get(e)),color:e=>Ze(e,"shift-10",o.get(e)),fontSize:e=>fr(e,"inherit")}}}import{toState as gr}from"@domphy/core";import{themeColor as Wt,themeSize as yr,themeSpacing as jt}from"@domphy/theme";function Ia(i={}){var r;let o=gr((r=i.color)!=null?r:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:jt(9),height:jt(9),fontSize:e=>yr(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>Wt(e,"inherit",o.get(e)),color:e=>Wt(e,"shift-11",o.get(e)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}import{toState as Kt}from"@domphy/core";import{themeSpacing as et,themeColor as qt,themeSize as br}from"@domphy/theme";function La(i={}){var n;let{label:o=999}=i,r=Kt(o),e=Kt((n=i.color)!=null?n:"danger","color");return{style:{position:"relative","&::after":{content:t=>`"${r.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:et(1),minWidth:et(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>br(t,"decrease-1"),borderRadius:et(999),backgroundColor:t=>qt(t,"shift-9",e.get(t)),color:t=>qt(t,"shift-0",e.get(t))}}}}import{toState as Sr}from"@domphy/core";import{themeColor as fe,themeSize as Cr,themeSpacing as Yt}from"@domphy/theme";function Ha(i={}){var e;let{separator:o="/"}=i,r=Sr((e=i.color)!=null?e:"neutral","color");return{_onInsert:n=>{n.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:n=>Cr(n,"inherit"),gap:Yt(1),color:n=>fe(n,"shift-9",r.get(n)),backgroundColor:n=>fe(n,"inherit",r.get(n)),"& > *":{display:"inline-flex",alignItems:"center",color:n=>fe(n,"shift-8",r.get(n))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:n=>fe(n,"shift-4",r.get(n)),paddingInlineStart:Yt(1)},"& > [aria-current=page]":{color:n=>fe(n,"shift-10",r.get(n)),pointerEvents:"none"}}}}import{toState as vr}from"@domphy/core";import{themeColor as ze,themeSize as xr,themeSpacing as $e}from"@domphy/theme";function ja(i={}){var r;let o=vr((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:e=>xr(e,"inherit"),paddingInline:$e(1),border:"none",background:"none",cursor:"pointer",color:e=>ze(e,"shift-8",o.get(e)),borderRadius:$e(1),"&:hover":{color:e=>ze(e,"shift-10",o.get(e)),backgroundColor:e=>ze(e,"shift-2",o.get(e))},"&:focus-visible":{outline:e=>`${$e(.5)} solid ${ze(e,"shift-6",o.get(e))}`,outlineOffset:$e(.5)}}}}import{toState as tt,merge as ot}from"@domphy/core";import{themeSpacing as Y,themeColor as ge,themeDensity as rt,themeSize as Gt}from"@domphy/theme";import{toState as Er}from"@domphy/core";import{themeColor as Le,themeSize as kr,themeSpacing as $}from"@domphy/theme";var Tr='<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 Ne(i={}){var e;let{removable:o=!1}=i,r=Er((e=i.color)!=null?e:"neutral","color");return{dataTone:"shift-2",_onInit:n=>{let t={span:Tr,onClick:a=>{a.stopPropagation(),n.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:$(1),width:$(4),height:$(4),flexShrink:0,"&:hover":{backgroundColor:a=>Le(a,"shift-4",r.get(a))}}};o&&n.children.insert(t)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:$(6),paddingBlock:"0px",borderRadius:$(1),paddingInlineStart:$(2),paddingInlineEnd:o?$(1):$(2),gap:$(2),fontSize:n=>kr(n,"inherit"),backgroundColor:n=>Le(n,"inherit",r.get(n)),color:n=>Le(n,"shift-9",r.get(n)),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${Le(n,"shift-4",r.get(n))}`}}}import{toState as wr,merge as Pr}from"@domphy/core";import{computePosition as Or,autoUpdate as Ir,offset as _r,flip as Vr,shift as zr}from"@floating-ui/dom";function D(i){let{open:o=!1,placement:r}=i,e=null,n=null,t=null,a=null,l=wr(o),s=()=>{t&&a&&(n&&n(),n=Ir(t,a,()=>{Or(t,a,{placement:r.get(),middleware:[_r(12),Vr(),zr()],strategy:"fixed"}).then(({x:d,y:g,placement:f})=>{Object.assign(a.style,{left:`${d}px`,top:`${g}px`}),r.set(f)})}),l.set(!0))},u=()=>{n&&n(),n=null,l.set(!1)},c=()=>{e&&clearTimeout(e),e=setTimeout(s,100)},m=()=>{e&&clearTimeout(e),e=setTimeout(u,100)},p={style:{position:"fixed",pointerEvents:"auto",visibility:d=>l.get(d)?"visible":"hidden"},_onMount:d=>a=d.domElement,_portal:d=>{let g=d.domElement.querySelector("#domphy-floating");if(!g){let f={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};g=d.children.insert(f).domElement}return g}};return Pr(i.content,p),{show:c,hide:m,anchorPartial:{onKeyDown:d=>d.key==="Escape"&&m(),_onMount:d=>{let g=d.getRoot();t=d.domElement;let f=g.children.insert(i.content),b=S=>{if(!l.get()||!t||!a)return;let q=S.target;!t.contains(q)&&!a.contains(q)&&m()};d.getRoot().domElement.addEventListener("click",b),d.addHook("BeforeRemove",()=>{e&&clearTimeout(e),f&&f.remove(),d.getRoot().domElement.removeEventListener("click",b)})}}}}function ll(i){let{options:o=[],placement:r="bottom",color:e="neutral",open:n=!1,multiple:t=!1}=i,a=tt(i.value),l=tt(n),{show:s,hide:u,anchorPartial:c}=D({open:l,placement:tt(r),content:i.content}),m={onClick:()=>!t&&u()};ot(i.content,m);let p={border:"none",outline:"none",padding:0,margin:0,flex:1,height:Y(6),marginInlineStart:Y(2),fontSize:f=>Gt(f,"inherit"),color:f=>ge(f,"shift-9",e),backgroundColor:f=>ge(f,"inherit",e)},h;i.input?(ot(i.input,{onFocus:()=>s(),style:p,_key:"combobox-input"}),h=i.input):h={input:null,onFocus:()=>s(),value:f=>(a.get(f),""),style:p,_key:"combobox-input"};let d={div:f=>{let b=a.get(f),S=Array.isArray(b)?b:[b],T=o.filter(U=>S.includes(U.value)).map(U=>({span:U.label,$:[Ne({color:e,removable:!0})],_key:U.value,_onRemove:Je=>{let he=a.get(),zt=(Array.isArray(he)?he:[he]).filter(Jo=>Jo!==U.value);t?a.set(zt):a.set(zt[0])}}));return T.push(h),T},style:{display:"flex",flexWrap:"wrap",gap:Y(1)}},g={_onInsert:f=>{f.tagName!="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:f=>f.children.insert(d),style:{minWidth:Y(32),outlineOffset:"-1px",outline:f=>`1px solid ${ge(f,"shift-4","neutral")}`,paddingBlock:f=>Y(rt(f)*1),paddingInline:f=>Y(rt(f)*1),borderRadius:f=>Y(rt(f)*1),fontSize:f=>Gt(f,"inherit"),color:f=>ge(f,"shift-9",e),backgroundColor:f=>ge(f,"inherit",e)}};return ot(c,g),c}import{toState as $r}from"@domphy/core";import{themeSpacing as nt,themeColor as Re,themeSize as Lr}from"@domphy/theme";function Ut(i={}){let{placement:o="bottom-end",color:r="neutral",sideOffset:e=nt(6),bordered:n=!0}=i,t=$r(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"},l=c=>{var m;return(m=a[t.get(c)])!=null?m:a["bottom-end"]},s=c=>c.includes("start")?e:c.includes("end")?"auto":"50%",u=c=>c.includes("end")?e:c.includes("start")?"auto":"50%";return{style:{fontSize:c=>Lr(c),backgroundColor:c=>Re(c),color:c=>Re(c,"shift-9",r),position:"relative","&::after":{content:'""',position:"absolute",width:nt(1.5),height:nt(1.5),backgroundColor:c=>Re(c,"inherit",r),borderWidth:n?"1px":"0px",borderColor:c=>Re(c,"inherit",r),borderTopStyle:c=>{let m=l(c);return m.includes("top")||m.includes("right")?"solid":"none"},borderBottomStyle:c=>{let m=l(c);return m.includes("bottom")||m.includes("left")?"solid":"none"},borderLeftStyle:c=>{let m=l(c);return m.includes("top")||m.includes("left")?"solid":"none"},borderRightStyle:c=>{let m=l(c);return m.includes("bottom")||m.includes("right")?"solid":"none"},top:c=>{let m=l(c);return m.includes("top")?0:m.includes("bottom")?"auto":s(m)},right:c=>{let m=l(c);return m.includes("right")?0:m.includes("left")?"auto":u(m)},bottom:c=>{let m=l(c);return m.includes("bottom")?0:m.includes("top")?"auto":u(m)},left:c=>{let m=l(c);return m.includes("left")?0:m.includes("right")?"auto":s(m)},transform:c=>{let m=l(c),p=m.includes("right")||m.includes("end")&&!m.includes("left")?"50%":"-50%",h=m.includes("bottom")||m.includes("end")&&!m.includes("top")?"50%":"-50%";return`translate(${p},${h}) rotate(45deg)`}}}}}import{toState as Nr}from"@domphy/core";import{themeSpacing as it,themeColor as Xt,themeDensity as Jt,themeSize as Rr}from"@domphy/theme";function Sl(i={}){var r;let o=Nr((r=i.color)!=null?r:"inherit","color");return{_onInsert:e=>{e.tagName!="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>Rr(e,"inherit"),backgroundColor:e=>Xt(e,"inherit",o.get(e)),boxShadow:e=>`inset ${it(1)} 0 0 0 ${Xt(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>it(Jt(e)*2),paddingInline:e=>it(Jt(e)*4),margin:0}}}import{toState as Mr}from"@domphy/core";import{themeColor as L,themeDensity as Me,themeSize as Dr,themeSpacing as ye}from"@domphy/theme";function El(i={}){var r;let o=Mr((r=i.color)!=null?r:"primary","color");return{_onInsert:e=>{e.tagName!="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>Dr(e,"inherit"),paddingBlock:e=>ye(Me(e)*1),paddingInline:e=>ye(Me(e)*3),borderRadius:e=>ye(Me(e)*1),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:e=>ye(Me(e)*1),userSelect:"none",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${L(e,"shift-4",o.get(e))}`,color:e=>L(e,"shift-9",o.get(e)),backgroundColor:e=>L(e,"inherit",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>L(e,"shift-10",o.get(e)),backgroundColor:e=>L(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${ye(.5)} ${L(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>L(e,"shift-2","neutral"),outline:e=>`1px solid ${L(e,"shift-4","neutral")}`,color:e=>L(e,"shift-8","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}import{toState as Qt}from"@domphy/core";import{themeColor as C,themeSpacing as H,themeSize as Hr}from"@domphy/theme";function _l(i={}){var e,n;let o=Qt((e=i.color)!=null?e:"neutral","color"),r=Qt((n=i.accentColor)!=null?n:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>Hr(t,"inherit"),display:"inline-flex",position:"relative",width:H(6),height:H(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:H(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${C(t,"shift-4",o.get(t))}`,color:t=>C(t,"shift-9",o.get(t)),width:H(4),height:H(4)},"&:hover::before":{backgroundColor:t=>C(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${C(t,"shift-6",r.get(t))}`,backgroundColor:t=>C(t,"shift-8",r.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>C(t,"shift-7",r.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${H(.5)} solid ${C(t,"inherit",r.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${C(t,"shift-6",r.get(t))}`,backgroundColor:t=>C(t,"shift-3",r.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>C(t,"shift-8",r.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>C(t,"shift-7",r.get(t))},"&:focus-visible":{borderRadius:H(1.5),outline:t=>`${H(.5)} solid ${C(t,"shift-6",r.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>C(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as Br}from"@domphy/core";import{themeSpacing as at,themeColor as Zt,themeSize as Fr}from"@domphy/theme";function Ml(i={}){var r;let o=Br((r=i.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!="code"&&console.warn('"code" primitive patch must use code tag')},style:{display:"inline-flex",alignItems:"center",fontSize:e=>Fr(e,"inherit"),color:e=>Zt(e,"shift-9",o.get(e)),backgroundColor:e=>Zt(e,"inherit",o.get(e)),height:at(6),paddingInline:at(1.5),borderRadius:at(1)}}}import{toState as eo}from"@domphy/core";import{themeColor as B,themeDensity as be,themeSize as to,themeSpacing as y}from"@domphy/theme";function jl(i={}){var n,t;let{duration:o=240}=i,r=eo((n=i.color)!=null?n:"neutral","color"),e=eo((t=i.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:a=>to(a,"inherit"),color:a=>B(a,"shift-9",r.get(a)),backgroundColor:a=>B(a,"inherit",r.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>B(a,"shift-2",r.get(a)),color:a=>B(a,"shift-10",r.get(a)),fontSize:a=>to(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:y(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>y(be(a)*4),height:y(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:y(2),height:y(2),flexShrink:0,marginTop:`-${y(.5)}`,borderInlineEnd:a=>`${y(.5)} solid ${B(a,"shift-9",r.get(a))}`,borderBottom:a=>`${y(.5)} solid ${B(a,"shift-9",r.get(a))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>B(a,"shift-3",r.get(a))},"& > summary:focus-visible":{borderRadius:a=>y(be(a)*2),outlineOffset:`-${y(.5)}`,outline:a=>`${y(.5)} solid ${B(a,"shift-6",e.get(a))}`},"& > :not(summary)":{maxHeight:"0px",opacity:0,overflow:"hidden",paddingInline:a=>y(be(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${o}ms ease, opacity ${o}ms ease, padding ${o}ms ease`},"&[open] > :not(summary)":{maxHeight:y(250),opacity:1,paddingTop:a=>y(be(a)*1),paddingBottom:a=>y(be(a)*3)}}}}import{toState as Ar}from"@domphy/core";import{themeColor as oo,themeSpacing as ro,themeSize as no}from"@domphy/theme";function Jl(i={}){var r;let o=Ar((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${ro(24)}, max-content) 1fr`,columnGap:ro(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>no(e,"inherit"),color:e=>oo(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>no(e,"inherit"),color:e=>oo(e,"shift-9",o.get(e))}}}}import{toState as Wr}from"@domphy/core";import{themeColor as De,themeDensity as jr,themeSize as Kr,themeSpacing as lt}from"@domphy/theme";function os(i={}){let{color:o="neutral",open:r=!1}=i,e=Wr(r);return{_onInsert:n=>{n.tagName!="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(n,t)=>{if(n.target!==t.domElement)return;let a=t.domElement.getBoundingClientRect();n.clientX>=a.left&&n.clientX<=a.right&&n.clientY>=a.top&&n.clientY<=a.bottom||e.set(!1)},onTransitionEnd:(n,t)=>{let a=t.domElement;a.style.opacity==="0"&&(a.close(),document.body.style.overflow="")},_onMount:n=>{let t=n.domElement,a=l=>{l?(t.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{t.style.opacity="1";let s=t.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');s==null||s.focus()})):t.style.opacity="0"};a(e.get()),e.addListener(a)},style:{opacity:"0",transition:"opacity 200ms ease",fontSize:n=>Kr(n,"inherit"),color:n=>De(n,"shift-10",o),backgroundColor:n=>De(n,"inherit",o),border:"none",padding:n=>lt(jr(n)*3),boxShadow:n=>`0 ${lt(9)} ${lt(16)} ${De(n,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:n=>De(n,"shift-2","neutral"),opacity:.75}}}}import{toState as qr}from"@domphy/core";import{themeColor as Yr,themeSize as Gr}from"@domphy/theme";function cs(i={}){var r;let o=qr((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>Gr(e,"inherit"),fontStyle:"italic",color:e=>Yr(e,"shift-10",o.get(e))}}}import{toState as Ur}from"@domphy/core";import{themeColor as io,themeSize as Xr,themeSpacing as He}from"@domphy/theme";function gs(i={}){var r;let o=Ur((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:He(2),marginInline:0,marginTop:He(3),marginBottom:He(3),color:e=>io(e,"shift-9",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:He(2)},"& figcaption":{fontSize:e=>Xr(e,"decrease-1"),color:e=>io(e,"shift-8",o.get(e)),lineHeight:1.45}}}}import{toState as Jr}from"@domphy/core";import{themeColor as Be,themeDensity as ee,themeSpacing as N,themeSize as st}from"@domphy/theme";function vs(i={}){var n;let{layout:o="horizontal"}=i,r=Jr((n=i.color)!=null?n:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:t=>N(ee(t)*3),paddingBlock:t=>N(ee(t)*3),border:"none",borderRadius:t=>N(ee(t)*2),fontSize:t=>st(t,"inherit"),backgroundColor:t=>Be(t,"inherit",r.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:N(4),rowGap:N(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>st(t,"inherit"),fontWeight:600,paddingBlock:t=>N(ee(t)*1),borderRadius:t=>N(ee(t)*2),color:t=>Be(t,"shift-9",r.get(t)),backgroundColor:t=>Be(t,"inherit",r.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?"0px":N(ee(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(${N(2)} * -1)`,fontSize:t=>st(t,"decrease-1"),color:t=>Be(t,"shift-9",r.get(t))}}}}import{toState as Qr}from"@domphy/core";import{themeColor as Zr,themeSize as en,themeSpacing as tn}from"@domphy/theme";var on={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Os(i={}){var r;let o=Qr((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{["h1","h2","h3","h4","h5","h6"].includes(e.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:e=>Zr(e,"shift-11",o.get(e)),marginTop:0,marginBottom:tn(2),fontSize:e=>{let n=on[e.elementNode.tagName]||"inherit";return en(e,n)}}}}import{toState as rn}from"@domphy/core";import{themeColor as nn,themeSpacing as ao}from"@domphy/theme";function Ns(i={}){var r;let o=rn((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},style:{border:0,height:"1px",marginInline:0,marginTop:ao(3),marginBottom:ao(3),backgroundColor:e=>nn(e,"shift-4",o.get(e))}}}import{toState as an}from"@domphy/core";import{themeColor as ln,themeSpacing as sn}from"@domphy/theme";function As(i={}){var r;let o=an((r=i.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:sn(2),backgroundColor:e=>ln(e,"inherit",o.get(e))}}}import{toState as cn}from"@domphy/core";import{themeSpacing as lo,themeColor as mn,themeSize as un}from"@domphy/theme";function Ys(i={}){var r;let o=cn((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="span"&&console.warn('"icon" primitive patch should use span tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",alignSelf:"center",justifySelf:"center",verticalAlign:"middle",width:lo(4),height:lo(4),flexShrink:"0",fontSize:e=>un(e),backgroundColor:"transparent",color:e=>mn(e,"shift-9",o.get(e))}}}import{toState as so}from"@domphy/core";import{themeColor as co,themeDensity as Se,themeSpacing as Ce,themeSize as dn}from"@domphy/theme";function Zs(i={}){var e,n;let o=so((e=i.color)!=null?e:"neutral","color"),r=so((n=i.accentColor)!=null?n:"primary","accentColor");return{type:"color",_onSchedule:(t,a)=>{t.tagName!="input"&&console.warn('"inputColor" primitive patch must use input tag'),a.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:t=>dn(t,"inherit"),paddingBlock:t=>Ce(Se(t)*1),paddingInline:t=>Ce(Se(t)*1),blockSize:t=>Ce(6+Se(t)*2),inlineSize:t=>Ce(6+Se(t)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:t=>Ce(Se(t)*1)},"&:hover:not([disabled]), &:focus-visible":{},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>co(t,"shift-2","neutral"),outline:t=>`1px solid ${co(t,"shift-4","neutral")}`}}}}import{toState as mo}from"@domphy/core";import{themeColor as F,themeDensity as ct,themeSpacing as ve,themeSize as hn}from"@domphy/theme";function ac(i={}){var n,t;let{mode:o="datetime-local"}=i,r=mo((n=i.color)!=null?n:"neutral","color"),e=mo((t=i.accentColor)!=null?t:"primary","accentColor");return{type:o,_onSchedule:(a,l)=>{a.tagName!="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),l.type=o},style:{fontFamily:"inherit",fontSize:a=>hn(a,"inherit"),lineHeight:"inherit",color:a=>F(a,"shift-9",r.get(a)),backgroundColor:a=>F(a,"inherit",r.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${F(a,"shift-4",r.get(a))}`,borderRadius:a=>ve(ct(a)*1),paddingInline:a=>ve(ct(a)*3),height:a=>ve(6+ct(a)*2),"&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:a=>`${ve(.5)} solid ${F(a,"shift-6",e.get(a))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>F(a,"shift-8","neutral"),backgroundColor:a=>F(a,"shift-2","neutral"),outline:a=>`1px solid ${F(a,"shift-4","neutral")}`},"&:invalid":{outline:a=>`${ve(.5)} solid ${F(a,"shift-6","error")}`}}}}import{toState as uo}from"@domphy/core";import{themeColor as v,themeDensity as xe,themeSpacing as x,themeSize as pn}from"@domphy/theme";function hc(i={}){var e,n;let o=uo((e=i.color)!=null?e:"neutral","color"),r=uo((n=i.accentColor)!=null?n:"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=>pn(t,"inherit"),lineHeight:"inherit",color:t=>v(t,"shift-9",o.get(t)),backgroundColor:t=>v(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${v(t,"shift-4",o.get(t))}`,borderRadius:t=>x(xe(t)*1),height:t=>x(6+xe(t)*2),paddingInline:t=>x(xe(t)*1),"&::file-selector-button":{marginTop:t=>x(xe(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:x(1),height:x(6),paddingInline:x(2),cursor:"pointer",color:t=>v(t,"shift-10",r.get(t)),backgroundColor:t=>v(t,"shift-2",r.get(t))},"&::-webkit-file-upload-button":{marginTop:t=>x(xe(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:x(1),height:x(6),paddingInline:x(2),cursor:"pointer",color:t=>v(t,"shift-10",o.get(t)),backgroundColor:t=>v(t,"shift-2",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${x(.5)} solid ${v(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>v(t,"shift-8","neutral"),outline:t=>`1px solid ${v(t,"shift-4","neutral")}`,backgroundColor:t=>v(t,"shift-1","neutral")},"&[disabled]::file-selector-button, &[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>v(t,"shift-8","neutral"),backgroundColor:t=>v(t,"shift-3","neutral")}}}}import{toState as ho}from"@domphy/core";import{themeColor as A,themeDensity as mt,themeSpacing as Ee,themeSize as fn}from"@domphy/theme";function Cc(i={}){var e,n;let o=ho((e=i.color)!=null?e:"neutral","color"),r=ho((n=i.accentColor)!=null?n:"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=>fn(t,"inherit"),lineHeight:"inherit",color:t=>A(t,"shift-9",o.get(t)),backgroundColor:t=>A(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${A(t,"shift-4",o.get(t))}`,borderRadius:t=>Ee(mt(t)*1),minWidth:Ee(32),paddingInline:t=>Ee(mt(t)*3),paddingBlock:t=>Ee(mt(t)*1),"&::placeholder":{color:t=>A(t,"shift-7",o.get(t))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${Ee(.5)} solid ${A(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>A(t,"shift-8","neutral"),backgroundColor:t=>A(t,"shift-2","neutral"),outline:t=>`1px solid ${A(t,"shift-4","neutral")}`}}}}import{toState as po}from"@domphy/core";import{themeColor as E,themeDensity as ut,themeSpacing as W,themeSize as gn}from"@domphy/theme";function Pc(i={}){var e,n;let o=po((e=i.color)!=null?e:"neutral","color"),r=po((n=i.accentColor)!=null?n:"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:W(10),paddingInline:t=>W(ut(t)*3),paddingBlock:t=>W(ut(t)*1),borderRadius:t=>W(ut(t)*1),fontSize:t=>gn(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${E(t,"shift-4",o.get(t))}`,color:t=>E(t,"shift-9",o.get(t)),backgroundColor:t=>E(t,"inherit",o.get(t)),"&::placeholder":{color:t=>E(t,"shift-7")},"&:not(:placeholder-shown)":{color:t=>E(t,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${W(.5)} solid ${E(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>E(t,"shift-2","neutral"),outline:t=>`1px solid ${E(t,"shift-4","neutral")}`,color:t=>E(t,"shift-8","neutral")},"&:invalid:not(:placeholder-shown)":{outline:t=>`${W(.5)} solid ${E(t,"shift-6","error")}`},"&[data-status=error]":{outline:t=>`${W(.5)} solid ${E(t,"shift-6","error")}`},"&[data-status=warning]":{outline:t=>`${W(.5)} solid ${E(t,"shift-6","warning")}`}}}}import{toState as fo}from"@domphy/core";import{themeColor as Fe,themeSpacing as w}from"@domphy/theme";function Lc(i={}){var e,n;let o=fo((e=i.color)!=null?e:"neutral","color"),r=fo((n=i.accentColor)!=null?n:"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:w(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:w(1.5),borderRadius:w(999),backgroundColor:t=>Fe(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:w(4),height:w(4),borderRadius:w(999),border:"none",marginTop:`calc((${w(1.5)} - ${w(4)}) / 2)`,backgroundColor:t=>Fe(t,"shift-9",r.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>Fe(t,"shift-10",r.get(t))},"&:focus-visible":{outline:t=>`${w(.5)} solid ${Fe(t,"shift-6",r.get(t))}`,outlineOffset:w(1),borderRadius:w(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as go}from"@domphy/core";import{themeColor as G,themeDensity as Ae,themeSpacing as te,themeSize as yn}from"@domphy/theme";function Fc(i={}){var e,n;let o=go((e=i.color)!=null?e:"neutral","color"),r=go((n=i.accentColor)!=null?n:"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:te(10),paddingInlineStart:t=>te(Ae(t)*3),paddingInlineEnd:t=>te(Ae(t)*1.5),paddingBlock:t=>te(Ae(t)*1),borderRadius:t=>te(Ae(t)*1),fontSize:t=>yn(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${G(t,"shift-4",o.get(t))}`,color:t=>G(t,"shift-9",o.get(t)),backgroundColor:t=>G(t,"inherit",o.get(t)),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${te(.5)} solid ${G(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>G(t,"shift-2","neutral"),outline:t=>`1px solid ${G(t,"shift-4","neutral")}`,color:t=>G(t,"shift-8","neutral")}}}}import{toState as bn}from"@domphy/core";import{themeColor as dt,themeSize as Sn,themeSpacing as ht}from"@domphy/theme";function Gc(i={}){var r;let o=bn((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>Sn(e,"inherit"),color:e=>dt(e,"shift-9",o.get(e)),backgroundColor:e=>dt(e,"inherit",o.get(e)),paddingBlock:ht(.5),paddingInline:ht(1.5),borderRadius:ht(1),outline:e=>`1px solid ${dt(e,"shift-4",o.get(e))}`}}}import{toState as yo}from"@domphy/core";import{themeColor as pt,themeSize as Cn,themeSpacing as vn}from"@domphy/theme";function tm(i={}){var e,n;let o=yo((e=i.color)!=null?e:"neutral","color"),r=yo((n=i.accentColor)!=null?n:"primary","accentColor");return{_onInsert:t=>{t.tagName!="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:vn(2),fontSize:t=>Cn(t,"inherit"),color:t=>pt(t,"shift-9",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>pt(t,"shift-10",r.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>pt(t,"shift-8","neutral")}}}}import{toState as bo}from"@domphy/core";import{themeColor as oe,themeSize as xn,themeSpacing as ft}from"@domphy/theme";function lm(i={}){var e,n;let o=bo((e=i.color)!=null?e:"primary","color"),r=bo((n=i.accentColor)!=null?n:"secondary","accentColor");return{_onInsert:t=>{t.tagName!="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:t=>xn(t,"inherit"),backgroundColor:t=>oe(t),color:t=>oe(t,"shift-9",o.get(t)),textDecoration:"none","&:visited":{color:t=>oe(t,"shift-9",r.get(t))},"&:hover:not([disabled])":{color:t=>oe(t,"shift-10",o.get(t)),textDecoration:"underline"},"&:focus-visible":{borderRadius:ft(1),outlineOffset:ft(1),outline:t=>`${ft(.5)} solid ${oe(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>oe(t,"shift-8","neutral")}}}}import{toState as En}from"@domphy/core";import{themeSpacing as gt,themeSize as kn,themeColor as So}from"@domphy/theme";function pm(i={}){var r;let o=En((r=i.accentColor)!=null?r:"highlight","accentColor");return{_onInsert:e=>{e.tagName!="mark"&&console.warn('"mark" primitive patch must use mark tag')},dataTone:"shift-2",style:{display:"inline-flex",alignItems:"center",fontSize:e=>kn(e,"inherit"),color:e=>So(e,"shift-9",o.get(e)),backgroundColor:e=>So(e,"inherit",o.get(e)),height:gt(6),borderRadius:gt(1),paddingInline:gt(1.5)}}}import{toState as Tn}from"@domphy/core";import{themeColor as wn,themeSize as Pn}from"@domphy/theme";function xm(i={}){var r;let o=Tn((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>Pn(e,"inherit"),color:e=>wn(e,"shift-9",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}import{toState as On}from"@domphy/core";import{themeColor as Co,themeDensity as yt,themeSpacing as bt,themeSize as In}from"@domphy/theme";function Im(i={}){var r;let o=On((r=i.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>In(e,"inherit"),color:e=>Co(e,"shift-9",o.get(e)),backgroundColor:e=>Co(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>bt(yt(e)*2),paddingInline:e=>bt(yt(e)*3),borderRadius:e=>bt(yt(e)*2)}}}import{toState as vo}from"@domphy/core";import{themeColor as St,themeSpacing as We}from"@domphy/theme";function Rm(i={}){var e,n;let o=vo((e=i.color)!=null?e:"neutral","color"),r=vo((n=i.accentColor)!=null?n:"primary","accentColor");return{_onInsert:t=>{t.tagName!="progress"&&console.warn('"progress" primitive patch must use progress tag')},style:{appearance:"none",width:"100%",height:We(2),border:0,borderRadius:We(999),overflow:"hidden",backgroundColor:t=>St(t,"shift-3",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>St(t,"shift-3",o.get(t)),borderRadius:We(999)},"&::-webkit-progress-value":{backgroundColor:t=>St(t,"shift-9",r.get(t)),borderRadius:We(999),transition:"width 220ms ease"}}}}import{toState as xo}from"@domphy/core";import{themeColor as j,themeSize as _n,themeSpacing as ke}from"@domphy/theme";function Wm(i={}){var e,n;let o=xo((e=i.color)!=null?e:"neutral","color"),r=xo((n=i.accentColor)!=null?n:"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=>_n(t,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:ke(6),height:ke(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 ${j(t,"shift-4",o.get(t))}`,color:t=>j(t,"shift-9",o.get(t)),width:ke(4),height:ke(4)},"&:hover::before":{backgroundColor:t=>j(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${j(t,"shift-6",r.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>j(t,"shift-8",r.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>j(t,"shift-7",r.get(t))},"&:focus-visible":{borderRadius:"50%",outline:t=>`${ke(.5)} solid ${j(t,"shift-6",r.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>j(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{themeColor as P,themeDensity as Te,themeSize as Vn,themeSpacing as O,themeColorToken as zn}from"@domphy/theme";function qm(i={}){let{color:o="neutral",accentColor:r="primary"}=i;return{_onInsert:e=>{e.tagName!="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:e=>Vn(e,"inherit"),lineHeight:"inherit",color:e=>P(e,"shift-9",o),backgroundColor:e=>P(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${P(e,"shift-4",o)}`,borderRadius:e=>O(Te(e)*1),paddingBlock:e=>O(Te(e)*1),paddingLeft:e=>O(Te(e)*3),paddingRight:e=>O(Te(e)*5),backgroundImage:e=>{let n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${zn(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(n)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${O(2)} center`,backgroundSize:`${O(2.5)} ${O(1.5)}`,"&:not([multiple])":{height:e=>O(6+Te(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`${O(.5)} solid ${P(e,"shift-5",r)}`},"&:focus-visible":{outline:e=>`${O(.5)} solid ${P(e,"shift-6",r)}`},"& optgroup":{color:e=>P(e,"shift-11",o)},"& option[disabled]":{color:e=>P(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>P(e,"shift-8","neutral"),outline:e=>`1px solid ${P(e,"shift-4","neutral")}`,backgroundColor:e=>P(e,"shift-2","neutral")}}}}import{hashString as $n,toState as Ln}from"@domphy/core";import{themeColor as Eo,themeSize as Nn,themeSpacing as ko}from"@domphy/theme";function Xm(i={}){var n;let o=Ln((n=i.color)!=null?n:"neutral","color"),r={"0%,100%":{opacity:1},"50%":{opacity:.4}},e=$n(JSON.stringify(r));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:t=>Nn(t),color:t=>Eo(t,"shift-9",o.get(t)),height:ko(6),display:"block",borderRadius:ko(1),backgroundColor:t=>Eo(t,"inherit",o.get(t)),animation:`${e} 1.5s ease-in-out infinite`,[`@keyframes ${e}`]:r}}}import{hashString as Rn,toState as Mn}from"@domphy/core";import{themeColor as je,themeSize as Dn,themeSpacing as Ct}from"@domphy/theme";var wo={to:{transform:"rotate(360deg)"}},To=Rn(JSON.stringify(wo));function eu(i={}){var r;let o=Mn((r=i.color)!=null?r:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:e=>{e.tagName!="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:e=>Dn(e),backgroundColor:e=>je(e),color:e=>je(e,"shift-9",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:Ct(6),height:Ct(6),borderRadius:"50%",border:e=>`${Ct(.5)} solid ${je(e,"shift-4",o.get(e))}`,borderTopColor:e=>je(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${To} 0.7s linear infinite`,[`@keyframes ${To}`]:wo}}}import{toState as Hn}from"@domphy/core";import{themeColor as Bn,themeDensity as Po,themeSize as Fn,themeSpacing as Oo}from"@domphy/theme";function iu(i={}){var a;let{color:o="neutral",multiple:r=!1}=i,e=Hn((a=i.value)!=null?a:r?[]:null),n={div:l=>{let s=e.get(l);return(Array.isArray(s)?s:[s]).map(c=>({input:null,name:i.name,value:c||""}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:e,multiple:r}},_onInit:l=>{l.tagName!="div"&&console.warn('"selectList" patch must use a div tag'),l.children.insert(n)},style:{display:"flex",flexDirection:"column",paddingBlock:l=>Oo(Po(l)*2),paddingInline:l=>Oo(Po(l)*2),fontSize:l=>Fn(l,"inherit"),backgroundColor:l=>Bn(l,"inherit",o)}}}import{themeSpacing as Ke,themeColor as re,themeDensity as Io,themeSize as An}from"@domphy/theme";function cu(i={}){let{accentColor:o="primary",color:r="neutral",value:e=null}=i;return{role:"option",_onInit:t=>{t.tagName!="div"&&console.warn('"selectItem" patch must use div tag');let a=t.getContext("select");if(a){let l=a.value;t.attributes.set("ariaSelected",s=>{let u=l.get(s);return a.multiple?u.includes(e):u==e}),t.addEvent("click",()=>{let s=l.get();a.multiple?s.includes(e)?l.set(s.filter(u=>u!==e)):l.set(s.concat([e])):s!=e&&l.set(e)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>An(t,"inherit"),height:t=>Ke(6+Io(t)*2),paddingInline:t=>Ke(Io(t)*3),border:"none",outline:"none",color:t=>re(t,"shift-9",r),backgroundColor:t=>re(t,"inherit",r),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>re(t,"shift-2",r)},"&[aria-selected=true]":{backgroundColor:t=>re(t,"shift-6",o),color:t=>re(t,"shift-11")},"&:focus-visible":{outline:t=>`${Ke(.5)} solid ${re(t,"shift-6",o)}`,outlineOffset:`-${Ke(.5)}`}}}}import{toState as vt,merge as _o}from"@domphy/core";import{themeSpacing as we,themeColor as xt,themeDensity as Et,themeSize as Wn}from"@domphy/theme";function fu(i){let{options:o=[],placement:r="bottom",color:e="neutral",open:n=!1,multiple:t=!1}=i,a=vt(i.value),l=vt(n),{show:s,hide:u,anchorPartial:c}=D({open:l,placement:vt(r),content:i.content}),m={onClick:()=>!t&&u()};_o(i.content,m);let p={div:d=>{let g=a.get(d),f=Array.isArray(g)?g:[g];return o.filter(S=>f.includes(S.value)).map(S=>({span:S.label,$:[Ne({color:e,removable:t})],_key:S.value,_onRemove:q=>{let T=a.get(),Je=(Array.isArray(T)?T:[T]).filter(he=>he!==S.value);t?a.set(Je):a.set(Je[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:we(1),flex:1}},h={_onInsert:d=>{d.tagName!="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:d=>d.children.insert(p),onClick:()=>l.get()?u():s(),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:d=>we(6+Et(d)*2),minWidth:we(32),outlineOffset:"-1px",outline:d=>`1px solid ${xt(d,"shift-4","neutral")}`,paddingInline:d=>we(Et(d)*2),borderRadius:d=>we(Et(d)*1),fontSize:d=>Wn(d,"inherit"),color:d=>xt(d,"shift-9",e),backgroundColor:d=>xt(d,"inherit",e)}};return _o(c,h),c}import{toState as jn}from"@domphy/core";import{themeColor as kt,themeSize as Vo,themeSpacing as R}from"@domphy/theme";function xu(i={}){var r;let o=jn((r=i.accentColor)!=null?r:"primary","accentColor");return{dataTone:"shift-2",type:"checkbox",_onSchedule:e=>{if(e.tagName!="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:e=>Vo(e,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:R(9),height:R(6),cursor:"pointer",margin:"0",paddingBlock:R(1),"&:checked":{"&::before":{backgroundColor:e=>kt(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${R(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:R(3),height:R(3),borderRadius:R(999),left:R(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>kt(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:R(999),display:"inline-block",fontSize:e=>Vo(e,"inherit"),lineHeight:1,backgroundColor:e=>kt(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Tt}from"@domphy/core";import{themeColor as ne,themeSize as Kn,themeSpacing as k}from"@domphy/theme";function wu(i={}){var t,a;let{checked:o=!1}=i,r=Tt(o),e=Tt((t=i.color)!=null?t:"neutral","color"),n=Tt((a=i.accentColor)!=null?a:"primary","accentColor");return{_onSchedule:l=>{l.tagName!="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:l=>r.get(l),dataTone:"shift-2",onClick:()=>r.set(!r.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:l=>Kn(l),border:"none",outlineWidth:"1px",outline:l=>`1px solid ${ne(l,"shift-3",e.get(l))}`,minWidth:k(12),minHeight:k(6),borderRadius:k(999),paddingLeft:k(7),paddingRight:k(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:l=>ne(l,"inherit",e.get(l)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:k(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:k(5),height:k(5),borderRadius:k(999),color:l=>ne(l,"shift-9"),backgroundColor:l=>ne(l,"decrease-2",e.get(l))},"&[aria-checked=true]":{backgroundColor:l=>ne(l,"increase-3",n.get(l)),outline:"none",color:l=>ne(l,"decrease-2"),paddingLeft:k(2),paddingRight:k(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${k(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as qn}from"@domphy/core";import{themeColor as Yn,themeSize as Gn}from"@domphy/theme";function $u(i={}){var r;let o=qn((r=i.color)!=null?r:"neutral","color");return{dataSize:"decrease-1",_onInsert:e=>{e.tagName!="small"&&console.warn('"small" primitive patch must use small tag')},style:{fontSize:e=>Gn(e,"inherit"),color:e=>Yn(e,"shift-9",o.get(e))}}}import{toState as Un}from"@domphy/core";import{themeColor as zo,themeSize as Xn}from"@domphy/theme";function Bu(i={}){var r;let o=Un((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>Xn(e,"inherit"),fontWeight:700,color:e=>zo(e,"shift-11",o.get(e)),backgroundColor:e=>zo(e)}}}import{toState as Jn}from"@domphy/core";import{themeColor as Qn,themeSize as Zn}from"@domphy/theme";function Yu(i={}){var r;let o=Jn((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>Zn(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>Qn(e,"shift-9",o.get(e))}}}import{toState as ei}from"@domphy/core";import{themeColor as ti,themeSize as oi}from"@domphy/theme";function ed(i={}){var r;let o=ei((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>oi(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>ti(e,"shift-9",o.get(e))}}}import{toState as ri}from"@domphy/core";import{themeColor as I,themeDensity as ie,themeSpacing as ae,themeSize as $o}from"@domphy/theme";function nd(i={}){var r;let o=ri((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:e=>$o(e,"inherit"),color:e=>I(e,"shift-9",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>ae(ie(e)*3),paddingBlock:e=>ae(ie(e)*1),color:e=>I(e,"shift-10",o.get(e)),backgroundColor:e=>I(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>ae(ie(e)*3),paddingBlock:e=>ae(ie(e)*1),color:e=>I(e,"shift-9",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${I(e,"shift-3",o.get(e))}`,fontSize:e=>$o(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>ae(ie(e)*3),paddingBlock:e=>ae(ie(e)*1),color:e=>I(e,"shift-10",o.get(e)),backgroundColor:e=>I(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${I(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>I(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>I(e,"shift-2")+"!important"}}}}import{toState as Lo}from"@domphy/core";import{themeColor as _,themeDensity as wt,themeSpacing as le,themeSize as ni}from"@domphy/theme";function ud(i={}){var n,t;let o=Lo((n=i.color)!=null?n:"neutral","color"),r=Lo((t=i.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=i;return{_onInsert:a=>{a.tagName!="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:a=>{if(e){let l=a.domElement;l.style.overflow="hidden";let s=()=>{l.style.height="auto",l.style.height=l.scrollHeight+"px"};l.addEventListener("input",s),s()}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>le(wt(a)*2),paddingBlock:a=>le(wt(a)*1.5),border:"none",borderRadius:a=>le(wt(a)*1.5),fontSize:a=>ni(a,"inherit"),color:a=>_(a,"shift-9",o.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${_(a,"shift-4",o.get(a))}`,backgroundColor:a=>_(a,"inherit",o.get(a)),"&::placeholder":{color:a=>_(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`${le(.5)} solid ${_(a,"shift-5",r.get(a))}`},"&:focus-visible":{outline:a=>`${le(.5)} solid ${_(a,"shift-6",r.get(a))}`},"&:invalid":{outline:a=>`${le(.5)} solid ${_(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>_(a,"shift-8","neutral"),outline:a=>`1px solid ${_(a,"shift-4","neutral")}`,backgroundColor:a=>_(a,"shift-2","neutral")}}}}import{toState as ii}from"@domphy/core";import{themeColor as No,themeSize as ai,themeSpacing as li}from"@domphy/theme";function bd(i={}){var r;let o=ii((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>ai(e,"inherit"),backgroundColor:e=>No(e),color:e=>No(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:li(3),listStyleType:"disc",listStylePosition:"outside"}}}import{toState as si}from"@domphy/core";import{themeColor as Ro,themeSize as ci,themeSpacing as mi}from"@domphy/theme";function Td(i={}){var r;let o=si((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>ci(e,"inherit"),backgroundColor:e=>Ro(e),color:e=>Ro(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:mi(3),listStyleType:"decimal",listStylePosition:"outside"}}}import{toState as ui}from"@domphy/core";import{themeColor as se,themeDensity as Pe,themeSize as di,themeSpacing as ce}from"@domphy/theme";function hi(i,o){if(o<=7)return Array.from({length:o},(t,a)=>a+1);let r=[1];i>3&&r.push("...");let e=Math.max(2,i-1),n=Math.min(o-1,i+1);for(let t=e;t<=n;t++)r.push(t);return i<o-2&&r.push("..."),r.push(o),r}function Id(i){var l;let{total:o,color:r="neutral",accentColor:e="primary"}=i,n=ui((l=i.value)!=null?l:1),t={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:s=>ce(6+Pe(s)*2),height:s=>ce(6+Pe(s)*2),paddingInline:s=>ce(Pe(s)*2),borderRadius:s=>ce(Pe(s)*1),border:"none",cursor:"pointer",fontSize:s=>di(s,"inherit"),backgroundColor:"transparent",color:s=>se(s,"shift-9",r),"&:hover:not([disabled])":{backgroundColor:s=>se(s,"shift-2",r)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=Rt(Nt({},t),{backgroundColor:s=>se(s,"shift-6",e),color:s=>se(s,"shift-11",e),fontWeight:"600",cursor:"default","&:hover:not([disabled])":{backgroundColor:s=>se(s,"shift-6",e)}});return{_onInsert:s=>{s.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:s=>{let u={div:c=>{let m=n.get(c),p=[];p.push({button:"\u2039",type:"button",ariaLabel:"Previous page",disabled:m<=1,onClick:()=>m>1&&n.set(m-1),style:t});for(let h of hi(m,o))if(h==="...")p.push({span:"\u2026",style:{display:"inline-flex",alignItems:"center",paddingInline:d=>ce(Pe(d)*2),color:d=>se(d,"shift-7",r)}});else{let d=h===m;p.push({button:String(h),type:"button",ariaLabel:`Page ${h}`,ariaCurrent:d?"page":void 0,disabled:d,onClick:()=>n.set(h),style:d?a:t})}return p.push({button:"\u203A",type:"button",ariaLabel:"Next page",disabled:m>=o,onClick:()=>m<o&&n.set(m+1),style:t}),p},style:{display:"flex",alignItems:"center",gap:ce(1)}};s.children.insert(u)},style:{display:"inline-flex"}}}import{toState as pi}from"@domphy/core";import{themeColor as qe,themeSize as fi,themeSpacing as gi}from"@domphy/theme";function Nd(i={}){var r;let o=pi((r=i.color)!=null?r:"neutral","color");return{role:"separator",_onInsert:e=>{e.tagName!=="div"&&console.warn('"divider" patch should be used with <div>')},style:{display:"flex",justifyContent:"center",alignItems:"baseline",gap:gi(2),fontSize:e=>fi(e,"inherit"),backgroundColor:e=>qe(e),color:e=>qe(e,"shift-9",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>qe(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>qe(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}import{toState as yi}from"@domphy/core";import{themeColor as Ye,themeDensity as bi,themeSize as Si,themeSpacing as Oe}from"@domphy/theme";var Mo={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},Ci={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},Pt=i=>i==="left"||i==="right";function Hd(i={}){let{color:o="neutral",open:r=!1,placement:e="right",size:n}=i,t=yi(r),a=Pt(e)?Oe(80):Oe(64),l=n!=null?n:a;return{_onInsert:s=>{s.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(s,u)=>{s.target===u.domElement&&t.set(!1)},onTransitionEnd:(s,u)=>{let c=u.domElement;t.get()||(c.close(),document.body.style.overflow="")},_onMount:s=>{let u=s.domElement,c=m=>{m?(u.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{u.style.transform="translate(0, 0)"})):u.style.transform=Mo[e]};c(t.get()),t.addListener(c)},style:{transform:Mo[e],transition:"transform 0.25s ease",fontSize:s=>Si(s,"inherit"),color:s=>Ye(s,"shift-10",o),backgroundColor:s=>Ye(s,"inherit",o),border:"none",padding:s=>Oe(bi(s)*3),margin:Ci[e],width:Pt(e)?l:"100dvw",height:Pt(e)?"100dvh":l,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:s=>`0 ${Oe(4)} ${Oe(12)} ${Ye(s,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:s=>Ye(s,"shift-2","neutral"),opacity:.75}}}}import{toState as Do,merge as Ho}from"@domphy/core";function Yd(i){let{open:o=!1,placement:r="bottom",openOn:e="click"}=i,n=null,t=Do(o),a=Do(r),{show:l,hide:s,anchorPartial:u}=D({open:t,placement:a,content:i.content}),c={role:"dialog",dataTone:"shift-17",onMouseEnter:()=>e==="hover"&&l(),onMouseLeave:()=>e==="hover"&&s(),_onInsert:p=>{let h=p.attributes.get("id");n=h||p.nodeId,!h&&p.attributes.set("id",n)}};return Ho(i.content,c),Ho(u,{ariaHaspopup:"dialog",ariaExpanded:p=>t.get(p),onMouseEnter:()=>e==="hover"&&l(),onMouseLeave:()=>e==="hover"&&s(),onClick:()=>{e==="click"&&(t.get()?s():l())},onFocus:()=>l(),onBlur:(p,h)=>{let d=p.relatedTarget,g=h.getRoot().domElement,f=n?g.querySelector(`#${CSS.escape(n)}`):null;d&&(f!=null&&f.contains(d))||s()},_onMount:p=>n&&p.attributes.set("ariaControls",n)}),u}import{toState as vi}from"@domphy/core";import{themeColor as Ot,themeDensity as It,themeSize as xi,themeSpacing as K}from"@domphy/theme";function Jd(i={}){let{position:o="top-center",color:r="neutral"}=i,e=vi(!1),n=o.startsWith("top"),t=o.endsWith("center"),a=o.endsWith("right"),l={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:n?"column":"column-reverse",alignItems:t?"center":a?"end":"start",inset:0,gap:K(4),zIndex:30,padding:K(6),pointerEvents:"none"}};return{_portal:s=>{let u=s.domElement.querySelector(`#domphy-toast-${o}`);return u||(u=s.children.insert(l).domElement),u},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:K(32),pointerEvents:"auto",paddingBlock:s=>K(It(s)*2),paddingInline:s=>K(It(s)*4),borderRadius:s=>K(It(s)*2),fontSize:s=>xi(s,"inherit"),color:s=>Ot(s,"shift-9",r),backgroundColor:s=>Ot(s,"inherit",r),boxShadow:s=>`0 ${K(2)} ${K(9)} ${Ot(s,"shift-4","neutral")}`,opacity:s=>Number(e.get(s)),transform:s=>e.get(s)?"translateY(0)":n?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>e.set(!0)),_onBeforeRemove:(s,u)=>{let c=m=>{m.propertyName==="transform"&&(s.domElement.removeEventListener("transitionend",c),u())};s.domElement.addEventListener("transitionend",c),e.set(!1)}}}import{merge as Ei,toState as Bo}from"@domphy/core";import{themeSpacing as _t,themeColor as Fo,themeDensity as Vt,themeSize as ki}from"@domphy/theme";function ih(i={}){let{open:o=!1,placement:r="top",content:e="Tooltip Content"}=i,n=Bo(r),t=Bo(e),a=null,l={span:h=>t.get(h)},{show:s,hide:u,anchorPartial:c}=D({open:o,placement:n,content:l}),m={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",_onInsert:h=>{let d=h.attributes.get("id");a=d||h.nodeId,!d&&h.attributes.set("id",a)},style:{paddingBlock:h=>_t(Vt(h)*1),paddingInline:h=>_t(Vt(h)*3),borderRadius:h=>_t(Vt(h)*1),color:h=>Fo(h,"shift-9"),backgroundColor:h=>Fo(h),fontSize:h=>ki(h,"inherit")},$:[Ut({placement:n,bordered:!1})]};return l.$||(l.$=[]),l.$.push(m),Ei(c,{onMouseEnter:()=>s(),onMouseLeave:()=>u(),onFocus:()=>s(),onBlur:()=>u(),onKeyDown:h=>h.key==="Escape"&&u(),_onMount:h=>a&&h.attributes.set("ariaDescribedby",a)}),c}import{ElementNode as Ao}from"@domphy/core";function Wo(i,o){return i.key!==void 0&&i.key!==null?String(i.key):`index-${o}`}function ch(i={}){let{duration:o=300,delay:r=0}=i,e=new Map;return{_onBeforeUpdate:n=>{e=new Map,n.children.items.forEach((t,a)=>{if(!(t instanceof Ao))return;let l=t.domElement;l&&e.set(Wo(t,a),l.getBoundingClientRect())})},_onUpdate:n=>{n.children.items.forEach((t,a)=>{if(!(t instanceof Ao))return;let l=t.domElement;if(!l)return;let s=Wo(t,a),u=e.get(s);if(!u)return;let c=l.getBoundingClientRect(),m=u.left-c.left,p=u.top-c.top;if(Math.abs(m)<.5&&Math.abs(p)<.5)return;let h=l.style.transition,d=l.style.transform;l.style.transition="none",l.style.transform=`translate(${m}px, ${p}px)`,l.getBoundingClientRect(),requestAnimationFrame(()=>{l.style.transition=`transform ${o}ms ease ${r}ms`,l.style.transform="translate(0px, 0px)"});let g=()=>{l.style.transition=h,l.style.transform=d,l.removeEventListener("transitionend",f)},f=b=>{b.propertyName==="transform"&&g()};l.addEventListener("transitionend",f),setTimeout(g,o+r+34)}),e.clear()}}}import{merge as Ti}from"@domphy/core";import{toState as wi}from"@domphy/core";function fh(i={}){return{role:"tablist",_onSchedule:(r,e)=>{let n={_context:{tabs:{activeKey:wi(i.activeKey||0)}}};Ti(e,n)}}}import{themeSpacing as me,themeColor as ue,themeDensity as jo,themeSize as Pi}from"@domphy/theme";function Sh(i={}){let{accentColor:o="primary",color:r="neutral"}=i;return{role:"tab",_onInsert:n=>{var u;n.tagName!="button"&&console.warn('"tab" patch must use button tag');let t=n.getContext("tabs"),a=(u=n.parent)==null?void 0:u.children.items;a=a.filter(c=>c.type=="ElementNode"&&c.attributes.get("role")=="tab");let l=n.key||a.findIndex(c=>c==n),s={id:"tab"+n.parent.nodeId+l,ariaControls:"tabpanel"+n.parent.nodeId+l,ariaSelected:c=>t.activeKey.get(c)==l,onClick:()=>t.activeKey.set(l),onKeyDown:c=>{var f,b,S,q;let m=c.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(m))return;c.preventDefault();let p=((b=(f=n.parent)==null?void 0:f.children.items)!=null?b:[]).filter(T=>T.type==="ElementNode"&&T.attributes.get("role")==="tab"),h=p.findIndex(T=>T===n),d=h;m==="ArrowRight"?d=(h+1)%p.length:m==="ArrowLeft"?d=(h-1+p.length)%p.length:m==="Home"?d=0:m==="End"&&(d=p.length-1);let g=p[d];t.activeKey.set((S=g.key)!=null?S:d),(q=g.domElement)==null||q.focus()}};n.merge(s)},style:{cursor:"pointer",fontSize:n=>Pi(n,"inherit"),height:n=>me(6+jo(n)*2),paddingInline:n=>me(jo(n)*4),border:"none",outline:"none",color:n=>ue(n,"shift-9"),backgroundColor:n=>ue(n,"inherit"),boxShadow:n=>`inset 0 -${me(.5)} 0 0 ${ue(n,"shift-1",r)}`,"&:hover:not([disabled])":{boxShadow:n=>`inset 0 -${me(.5)} 0 0 ${ue(n,"shift-2",r)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:n=>`inset 0 -${me(.5)} 0 0 ${ue(n,"shift-6",o)}`},"&:focus-visible":{boxShadow:n=>`inset 0 -${me(.5)} 0 0 ${ue(n,"shift-6",o)}`}}}}import{themeSpacing as Ko,themeDensity as qo}from"@domphy/theme";function Eh(){return{role:"tabpanel",style:{paddingBlock:o=>Ko(qo(o)*2),paddingInline:o=>Ko(qo(o)*2)},_onInsert:o=>{var a;let r=o.getContext("tabs"),e=(a=o.parent)==null?void 0:a.children.items;e=e.filter(l=>l.type=="ElementNode"&&l.attributes.get("role")=="tabpanel");let n=o.key||e.findIndex(l=>l==o),t={id:"tabpanel"+o.parent.nodeId+n,ariaLabelledby:"tab"+o.parent.nodeId+n,hidden:l=>r.activeKey.get(l)!=n};o.merge(t)}}}import{merge as Oi}from"@domphy/core";import{toState as Ii}from"@domphy/core";import{themeColor as _i,themeDensity as Yo,themeSize as Vi,themeSpacing as Go}from"@domphy/theme";function _h(i={}){let{color:o="neutral",selectable:r=!0}=i;return{role:"menu",dataTone:"shift-17",_onSchedule:(n,t)=>{var l;let a={_context:{menu:{activeKey:Ii((l=i.activeKey)!=null?l:null),selectable:r}}};Oi(t,a)},style:{display:"flex",flexDirection:"column",paddingBlock:n=>Go(Yo(n)*2),paddingInline:n=>Go(Yo(n)*2),fontSize:n=>Vi(n,"inherit"),backgroundColor:n=>_i(n,"inherit",o)}}}import{themeSpacing as Ge,themeColor as de,themeDensity as Uo,themeSize as zi}from"@domphy/theme";function Lh(i={}){let{accentColor:o="primary",color:r="neutral"}=i;return{role:"menuitem",_onInsert:n=>{var s;n.tagName!="button"&&console.warn('"menuItem" patch must use button tag');let t=n.getContext("menu"),a=(s=n.parent)==null?void 0:s.children.items;a=a.filter(u=>u.type=="ElementNode"&&u.attributes.get("role")=="menuitem");let l=n.key||a.findIndex(u=>u==n);t.selectable&&(n.attributes.set("ariaCurrent",u=>t.activeKey.get(u)==l||void 0),n.addEvent("click",()=>t.activeKey.set(l)))},onKeyDown:(n,t)=>{var c,m,p,h;let a=n.key;if(a==="Enter"||a===" "){n.preventDefault(),(c=t.domElement)==null||c.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(a))return;n.preventDefault();let l=((p=(m=t.parent)==null?void 0:m.children.items)!=null?p:[]).filter(d=>d.type==="ElementNode"&&d.attributes.get("role")==="menuitem"),s=l.findIndex(d=>d===t),u=s;a==="ArrowDown"?u=(s+1)%l.length:a==="ArrowUp"?u=(s-1+l.length)%l.length:a==="Home"?u=0:a==="End"&&(u=l.length-1),(h=l[u].domElement)==null||h.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:n=>zi(n,"inherit"),height:n=>Ge(6+Uo(n)*2),paddingInline:n=>Ge(Uo(n)*3),border:"none",outline:"none",color:n=>de(n,"shift-9"),backgroundColor:n=>de(n,"inherit"),"&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:n=>de(n,"shift-2")},"&[aria-current=true]":{backgroundColor:n=>de(n,"shift-3",o),color:n=>de(n,"shift-10")},"&:focus-visible":{outline:n=>`${Ge(.5)} solid ${de(n,"shift-6",o)}`,outlineOffset:`-${Ge(.5)}`}}}}import{merge as $i}from"@domphy/core";function Dh(i){return{_onSchedule:(o,r)=>{$i(r,{_context:{form:i}})}}}function Bh(i,o){return{_onInsert:r=>{let n=r.getContext("form").setField(i,void 0,o),t=r.tagName,a=r.attributes.get("type");["input","select","textarea"].includes(t)||console.warn('"field" patch must use input, select, or textarea tag');let l={onBlur:()=>n.setTouched(),ariaInvalid:s=>!!n.message("error",s)||void 0,dataStatus:s=>n.status(s)};t==="input"&&a==="checkbox"?(l.checked=n.value(),l.onChange=s=>n.setValue(s.target.checked)):t==="input"&&a==="radio"?l.onChange=s=>n.setValue(s.target.value):t==="select"?(l.value=n.value(),l.onChange=s=>n.setValue(s.target.value)):t==="textarea"?(l.value=n.value(),l.onInput=s=>n.setValue(s.target.value)):(l.value=n.value(),l.onInput=s=>n.setValue(s.target.value)),r.merge(l)}}}import{Notifier as Li}from"@domphy/core";function Ni(i){return!!i&&typeof i.then=="function"}var Xe=class{constructor(o,r){this._notifier=new Li;this._messages={};this._touched=!1;this._pending=!1;this._validationToken=0;this._value=o,this._initValue=o,this._validator=r,r&&this.validate()}value(o){return o&&this._notifier.addListener("value",o),this._value}setValue(o){this._value=o,this._notifier.notify("value",o),this._notifier.notify("dirty",o!==this._initValue),this.validate()}dirty(o){return o&&this._notifier.addListener("dirty",o),this._value!==this._initValue}touched(o){return o&&this._notifier.addListener("touched",o),this._touched}setTouched(){this._touched||(this._touched=!0,this._notifier.notify("touched",!0))}configure(o,r){let e=!1;o!==void 0&&this._value===void 0&&this._initValue===void 0&&(this._value=o,this._initValue=o,this._notifier.notify("value",o),this._notifier.notify("dirty",!1),e=!0),r!==void 0&&r!==this._validator&&(this._validator=r,e=!0),e&&this.validate()}message(o,r){return r&&this._notifier.addListener(o,r),this._messages[o]}status(o){return o&&this._notifier.addListener("status",o),Ue(this._messages)}setMessages(o){let r=this._messages;this._messages=o;for(let e of["error","warning","success"])r[e]!==o[e]&&this._notifier.notify(e,o[e]);Ue(r)!==Ue(o)&&this._notifier.notify("status",Ue(o))}reset(){this._value=this._initValue,this._touched=!1,this._notifier.notify("value",this._value),this._notifier.notify("dirty",!1),this._notifier.notify("touched",!1),this.setMessages({}),this.validate()}validate(){let o=++this._validationToken;if(!this._validator){this._pending=!1,this.setMessages({});return}try{let r=this._validator(this._value);Ni(r)?(this._pending=!0,Promise.resolve(r).then(e=>{o===this._validationToken&&(this._pending=!1,this.setMessages(e!=null?e:{}))}).catch(e=>{o===this._validationToken&&(this._pending=!1,console.error(e))})):(this._pending=!1,this.setMessages(r!=null?r:{}))}catch(r){o===this._validationToken&&(this._pending=!1),console.error(r)}}_dispose(){this._validationToken+=1,this._pending=!1,this._notifier._dispose()}};function Ue(i){if(i.error)return"error";if(i.warning)return"warning";if(i.success)return"success"}var Xo=class{constructor(){this.fields=new Map}setField(o,r,e){let n=this.fields.get(o);return n?n.configure(r,e):(n=new Xe(r,e),this.fields.set(o,n)),n}getField(o){return this.setField(o)}removeField(o){var r;(r=this.fields.get(o))==null||r._dispose(),this.fields.delete(o)}get valid(){for(let o of this.fields.values())if(o._pending||o._messages.error)return!1;return!0}reset(){for(let o of this.fields.values())o.reset()}snapshot(){let o={};for(let[r,e]of this.fields)Ri(o,r,e._value);return o}_dispose(){for(let o of this.fields.values())o._dispose();this.fields.clear()}};function Ri(i,o,r){let e=o.split("."),n=i;for(let t=0;t<e.length-1;t++){let a=e[t];n[a]==null&&(n[a]=isNaN(Number(e[t+1]))?{}:[]),n=n[a]}n[e[e.length-1]]=r}export{Xe as FieldState,Xo as FormState,ji as abbreviation,ka as alert,Ia as avatar,La as badge,Sl as blockquote,Ha as breadcrumb,ja as breadcrumbEllipsis,El as button,wu as buttonSwitch,Ui as card,Ml as code,ll as combobox,ia as command,la as commandItem,aa as commandSearch,Jl as descriptionList,jl as details,os as dialog,Nd as divider,Hd as drawer,cs as emphasis,Bh as field,gs as figure,Dh as form,vs as formGroup,Os as heading,Ns as horizontalRule,Ys as icon,As as image,_l as inputCheckbox,Zs as inputColor,ac as inputDateTime,hc as inputFile,Fc as inputNumber,Sa as inputOTP,Wm as inputRadio,Lc as inputRange,Cc as inputSearch,xu as inputSwitch,Pc as inputText,Gc as keyboard,tm as label,lm as link,pm as mark,_h as menu,Lh as menuItem,Td as orderedList,Id as pagination,xm as paragraph,Yd as popover,Ut as popoverArrow,Im as preformated,Rm as progress,qm as select,fu as selectBox,cu as selectItem,iu as selectList,Xm as skeleton,$u as small,eu as spinner,Zi as splitter,ta as splitterHandle,ea as splitterPanel,Bu as strong,Yu as subscript,ed as superscript,Sh as tab,Eh as tabPanel,nd as table,fh as tabs,Ne as tag,ud as textarea,Jd as toast,ua as toggle,ga as toggleGroup,ih as tooltip,ch as transitionGroup,bd as unorderedList};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|