@domphy/ui 0.21.5 → 0.21.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/dist/core-theme-ui.global.js +5 -5
- package/dist/core-theme-ui.global.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var no=Object.defineProperty,Pr=Object.defineProperties,Ir=Object.getOwnPropertyDescriptor,Or=Object.getOwnPropertyDescriptors,Lr=Object.getOwnPropertyNames,on=Object.getOwnPropertySymbols;var rn=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable;var nn=(r,o,n)=>o in r?no(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,E=(r,o)=>{for(var n in o||(o={}))rn.call(o,n)&&nn(r,n,o[n]);if(on)for(var n of on(o))zr.call(o,n)&&nn(r,n,o[n]);return r},z=(r,o)=>Pr(r,Or(o));var Rr=(r,o)=>{for(var n in o)no(r,n,{get:o[n],enumerable:!0})},Vr=(r,o,n,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of Lr(o))!rn.call(r,s)&&s!==n&&no(r,s,{get:()=>o[s],enumerable:!(e=Ir(o,s))||e.enumerable});return r};var Mr=r=>Vr(no({},"__esModule",{value:!0}),r);var al={};Rr(al,{abbreviation:()=>_r,accordion:()=>Nr,alert:()=>$r,avatar:()=>Ar,badge:()=>Br,blockquote:()=>Hr,breadcrumb:()=>Fr,breadcrumbEllipsis:()=>Kr,button:()=>qr,buttonGhost:()=>wo,buttonSwitch:()=>Yr,card:()=>Ur,code:()=>Jr,combobox:()=>na,command:()=>ra,commandItem:()=>ia,commandSearch:()=>aa,datePicker:()=>ca,descriptionList:()=>da,details:()=>pa,dialog:()=>fa,divider:()=>ga,drawer:()=>ba,elevation:()=>_,emphasis:()=>Sa,empty:()=>va,errorBoundary:()=>xa,fab:()=>ka,figure:()=>wa,focusRing:()=>S,formGroup:()=>Ta,grid:()=>Da,heading:()=>Ia,horizontalRule:()=>Oa,icon:()=>La,image:()=>za,inputCheckbox:()=>Ra,inputColor:()=>Va,inputDateTime:()=>Ma,inputFile:()=>_a,inputNumber:()=>Na,inputOTP:()=>$a,inputPassword:()=>Fa,inputRadio:()=>Ka,inputRange:()=>ja,inputSearch:()=>Wa,inputSwitch:()=>qa,inputText:()=>Ya,keyboard:()=>Ga,label:()=>Ua,link:()=>Ja,linkButton:()=>Qa,list:()=>ei,listItem:()=>ti,listItemButton:()=>oi,mark:()=>ni,menu:()=>ri,motion:()=>ii,orderedList:()=>li,pagination:()=>mi,panelSection:()=>ui,paragraph:()=>di,popover:()=>pi,popoverArrow:()=>qo,preformated:()=>hi,progress:()=>fi,rating:()=>Si,ringProgress:()=>vi,row:()=>Uo,scrollArea:()=>Ci,segmented:()=>Ei,select:()=>ki,selectBox:()=>Pi,selectItem:()=>Ii,selectList:()=>Oi,skeleton:()=>Li,small:()=>zi,spinner:()=>Ri,splitter:()=>Vi,splitterHandle:()=>Ni,splitterPanel:()=>_i,stack:()=>$i,steps:()=>Bi,strong:()=>Hi,subscript:()=>Fi,superscript:()=>Ki,table:()=>ji,tabs:()=>Wi,tag:()=>Yt,textarea:()=>qi,timeline:()=>Yi,timelineItem:()=>Gi,toast:()=>Ui,toggleGroup:()=>Zi,toolbar:()=>Qi,toolbarSpacer:()=>el,tooltip:()=>tl,transitionGroup:()=>ol,unorderedList:()=>nl,visuallyHidden:()=>rl});module.exports=Mr(al);var Co=require("@domphy/core"),Xe=require("@domphy/theme");function _r(r={}){var e,s;let o=(0,Co.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Co.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>(0,Xe.themeSize)(t),backgroundColor:t=>(0,Xe.themeColor)(t),color:t=>(0,Xe.themeColor)(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>(0,Xe.themeColor)(t,"shift-7",o.get(t)),textUnderlineOffset:(0,Xe.themeSpacing)(.72),cursor:"help","&:hover":{color:t=>(0,Xe.themeColor)(t,"shift-11",n.get(t)),textDecorationColor:t=>(0,Xe.themeColor)(t,"shift-9",n.get(t))}}}}var Eo=require("@domphy/core"),gt=require("@domphy/theme");var xo=require("@domphy/theme");function S(r,o="primary"){let n=(0,xo.themeColor)(r,"surface"),e=(0,xo.themeColor)(r,"shift-9",o);return`0 0 0 2px ${n}, 0 0 0 4px ${e}`}function Nr(r={}){var s,t;let{type:o="single"}=r,n=(0,Eo.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,Eo.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{_onMount:a=>{if(o!=="single")return;let i=a.domElement;if(!i)return;let m=u=>{let l=u.target.closest("summary");if(!l)return;let c=l.closest("details");!c||c.parentElement!==i||c.open||Array.from(i.querySelectorAll(":scope > details")).forEach(d=>{d!==c&&(d.open=!1)})};i.addEventListener("click",m),a.addHook("Remove",()=>i.removeEventListener("click",m))},style:{display:"flex",flexDirection:"column",borderRadius:a=>(0,gt.themeSpacing)((0,gt.themeDensity)(a)*1.5),outline:a=>`1px solid ${(0,gt.themeColor)(a,"border-strong",n.get(a))}`,outlineOffset:"-1px",color:a=>(0,gt.themeColor)(a,"text",n.get(a)),overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${(0,gt.themeColor)(a,"border-strong",n.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{boxShadow:a=>S(a,e.get(a))}}}}var an=require("@domphy/core"),ye=require("@domphy/theme");function $r(r={}){var n;let o=(0,an.toState)((n=r.color)!=null?n:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:(0,ye.themeSpacing)(3),paddingBlock:e=>(0,ye.themeSpacing)((0,ye.themeDensity)(e)*2),paddingInline:e=>(0,ye.themeSpacing)((0,ye.themeDensity)(e)*4),borderRadius:e=>(0,ye.themeSpacing)((0,ye.themeDensity)(e)*1.5),boxShadow:e=>`inset ${(0,ye.themeSpacing)(1)} 0 0 0 ${(0,ye.themeColor)(e,"shift-8",o.get(e))}`,backgroundColor:e=>(0,ye.themeColor)(e,"inherit",o.get(e)),color:e=>(0,ye.themeColor)(e,"shift-10",o.get(e)),fontSize:e=>(0,ye.themeSize)(e,"inherit")}}}var ln=require("@domphy/core"),lt=require("@domphy/theme");function Ar(r={}){var n;let o=(0,ln.toState)((n=r.color)!=null?n:"primary","color");return{dataTone:"shift-2",_doctorDisable:"inline-typography",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:(0,lt.themeSpacing)(9),height:(0,lt.themeSpacing)(9),fontSize:e=>(0,lt.themeSize)(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>(0,lt.themeColor)(e,"inherit",o.get(e)),color:e=>(0,lt.themeColor)(e,"shift-11",o.get(e)),boxShadow:e=>`0 0 0 1px ${(0,lt.themeColor)(e,"border",o.get(e))}`,"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}var ko=require("@domphy/core"),Ce=require("@domphy/theme");function Br(r={}){var s;let{label:o=999}=r,n=(0,ko.toState)(o),e=(0,ko.toState)((s=r.color)!=null?s:"danger","color");return{_doctorDisable:"inline-typography",style:{position:"relative","&::after":{content:t=>`"${n.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:t=>(0,Ce.themeSpacing)((0,Ce.themeDensity)(t)*(1.5/1.5)),minWidth:(0,Ce.themeSpacing)(5),height:t=>(0,Ce.themeSpacing)((0,Ce.themeDensity)(t)*(5/1.5)),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>(0,Ce.themeSize)(t,"decrease-2"),fontWeight:"600",lineHeight:1,borderRadius:t=>(0,Ce.themeSpacing)((0,Ce.themeDensity)(t)*999),backgroundColor:t=>(0,Ce.themeColor)(t,"shift-9",e.get(t)),color:t=>(0,Ce.themeColor)(t,"shift-0",e.get(t)),boxShadow:t=>`0 0 0 1px ${(0,Ce.themeColor)(t,"shift-0",e.get(t))}`}}}}var sn=require("@domphy/core"),Le=require("@domphy/theme");function Hr(r={}){var n;let o=(0,sn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>(0,Le.themeSize)(e,"inherit"),backgroundColor:e=>(0,Le.themeColor)(e,"inherit",o.get(e)),color:e=>(0,Le.themeColor)(e,"text",o.get(e)),boxShadow:e=>`inset ${(0,Le.themeSpacing)(1)} 0 0 0 ${(0,Le.themeColor)(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>(0,Le.themeSpacing)((0,Le.themeDensity)(e)*2),paddingInline:e=>(0,Le.themeSpacing)((0,Le.themeDensity)(e)*4),margin:0}}}var cn=require("@domphy/core"),Fe=require("@domphy/theme");function Fr(r={}){var e;let{separator:o="/"}=r,n=(0,cn.toState)((e=r.color)!=null?e:"neutral","color");return{_onInsert:s=>{s.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:s=>(0,Fe.themeSize)(s,"inherit"),gap:(0,Fe.themeSpacing)(1),color:s=>(0,Fe.themeColor)(s,"text",n.get(s)),backgroundColor:s=>(0,Fe.themeColor)(s,"inherit",n.get(s)),"& > *":{display:"inline-flex",alignItems:"center",color:s=>(0,Fe.themeColor)(s,"text",n.get(s))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:s=>(0,Fe.themeColor)(s,"shift-4",n.get(s)),paddingInlineStart:(0,Fe.themeSpacing)(1)},"& > [aria-current=page]":{color:s=>(0,Fe.themeColor)(s,"shift-10",n.get(s)),pointerEvents:"none"}}}}var mn=require("@domphy/core"),st=require("@domphy/theme");function Kr(r={}){var n;let o=(0,mn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:e=>(0,st.themeSize)(e,"inherit"),paddingInline:(0,st.themeSpacing)(1),border:"none",background:"none",cursor:"pointer",color:e=>(0,st.themeColor)(e,"text",o.get(e)),borderRadius:(0,st.themeSpacing)(1),transition:"color 140ms ease, background-color 140ms ease, box-shadow 140ms ease","&:hover":{color:e=>(0,st.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,st.themeColor)(e,"hover",o.get(e))},"&:focus-visible":{boxShadow:e=>S(e,o.get(e))}}}}var dn=require("@domphy/core"),F=require("@domphy/theme");var Nt={small:"decrease-1",medium:"inherit",large:"increase-1"};var un=require("@domphy/core"),pe=require("@domphy/theme");var jr={small:.5,medium:1,large:1.5};function wo(r={}){var s,t,a;let o=(0,un.toState)((s=r.color)!=null?s:"neutral","color"),n=jr[(t=r.size)!=null?t:"medium"],e=Nt[(a=r.size)!=null?a:"medium"];return{type:"button",_onInsert:i=>{i.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:i=>(0,pe.themeSize)(i,e),paddingBlock:i=>(0,pe.themeSpacing)((0,pe.themeDensity)(i)*n),paddingInline:i=>(0,pe.themeSpacing)((0,pe.themeDensity)(i)*n),borderRadius:i=>(0,pe.themeSpacing)((0,pe.themeDensity)(i)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:i=>(0,pe.themeSpacing)((0,pe.themeDensity)(i)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:i=>(0,pe.themeColor)(i,"text",o.get(i)),"&:hover:not([disabled]):not([aria-busy=true])":{color:i=>(0,pe.themeColor)(i,"text",o.get(i)),backgroundColor:i=>(0,pe.themeColor)(i,"hover",o.get(i))},"&:active:not([disabled]):not([aria-busy=true])":{color:i=>(0,pe.themeColor)(i,"text",o.get(i)),backgroundColor:i=>(0,pe.themeColor)(i,"increase-2",o.get(i))},"&:focus-visible":{boxShadow:i=>S(i,o.get(i))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>(0,pe.themeColor)(i,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var Wr={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function qr(r={}){var a,i,m,u;let o=(a=r.variant)!=null?a:"outline";if(o==="ghost")return wo({color:r.color,size:r.size});let n=(0,dn.toState)((i=r.color)!=null?i:"primary","color"),e=o==="solid",s=Wr[(m=r.size)!=null?m:"medium"],t=Nt[(u=r.size)!=null?u:"medium"];return z(E({type:"button",_onInsert:l=>{l.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')}},e?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{appearance:"none",fontSize:l=>(0,F.themeSize)(l,t),paddingBlock:l=>(0,F.themeSpacing)((0,F.themeDensity)(l)*s.block),paddingInline:l=>(0,F.themeSpacing)((0,F.themeDensity)(l)*s.inline),borderRadius:l=>(0,F.themeSpacing)((0,F.themeDensity)(l)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:l=>(0,F.themeSpacing)((0,F.themeDensity)(l)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e?"none":l=>`1px solid ${(0,F.themeColor)(l,"border-strong",n.get(l))}`,color:l=>e?(0,F.themeColor)(l,"shift-0","neutral"):(0,F.themeColor)(l,"shift-13",n.get(l)),backgroundColor:l=>e?(0,F.themeColor)(l,"shift-13",n.get(l)):(0,F.themeColor)(l,"inherit",n.get(l)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{color:l=>e?(0,F.themeColor)(l,"shift-0","neutral"):(0,F.themeColor)(l,"shift-14",n.get(l)),backgroundColor:l=>e?(0,F.themeColor)(l,"shift-14",n.get(l)):(0,F.themeColor)(l,"hover",n.get(l))},"&:active:not([disabled]):not([aria-busy=true])":{backgroundColor:l=>e?(0,F.themeColor)(l,"shift-15",n.get(l)):(0,F.themeColor)(l,"increase-2",n.get(l))},"&:focus-visible":{boxShadow:l=>S(l,n.get(l))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:l=>(0,F.themeColor)(l,"shift-2","neutral"),outline:l=>`1px solid ${(0,F.themeColor)(l,"border-strong","neutral")}`,color:l=>(0,F.themeColor)(l,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}})}var ro=require("@domphy/core"),Q=require("@domphy/theme");function Yr(r={}){var t,a;let{checked:o=!1}=r,n=(0,ro.toState)(o),e=(0,ro.toState)((t=r.color)!=null?t:"neutral","color"),s=(0,ro.toState)((a=r.accentColor)!=null?a:"primary","accentColor");return{type:"button",_onSchedule:i=>{i.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:i=>n.get(i),dataTone:"shift-2",onClick:()=>n.set(!n.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:i=>(0,Q.themeSize)(i),border:"none",outlineWidth:"1px",outline:i=>`1px solid ${(0,Q.themeColor)(i,"border",e.get(i))}`,minWidth:(0,Q.themeSpacing)(12),minHeight:(0,Q.themeSpacing)(6),borderRadius:(0,Q.themeSpacing)(999),paddingLeft:(0,Q.themeSpacing)(7),paddingRight:(0,Q.themeSpacing)(2),cursor:"pointer",transition:"padding-left 0.3s, padding-right 0.3s, background-color 140ms ease, box-shadow 140ms ease",backgroundColor:i=>(0,Q.themeColor)(i,"inherit",e.get(i)),color:i=>(0,Q.themeColor)(i,"text",e.get(i)),"&:focus-visible":{boxShadow:i=>S(i,s.get(i))},"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:(0,Q.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:(0,Q.themeSpacing)(5),height:(0,Q.themeSpacing)(5),borderRadius:(0,Q.themeSpacing)(999),color:i=>(0,Q.themeColor)(i,"text"),backgroundColor:i=>(0,Q.themeColor)(i,"decrease-2",e.get(i))},"&[aria-checked=true]":{backgroundColor:i=>(0,Q.themeColor)(i,"increase-3",s.get(i)),outline:"none",color:i=>(0,Q.themeColor)(i,"decrease-2"),paddingLeft:(0,Q.themeSpacing)(2),paddingRight:(0,Q.themeSpacing)(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${(0,Q.themeSpacing)(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var pn=require("@domphy/core"),$=require("@domphy/theme");var Gr={low:"0 1px 2px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.10)",medium:"0 2px 4px rgba(0,0,0,0.10), 0 10px 24px rgba(0,0,0,0.14)",high:"0 6px 12px rgba(0,0,0,0.14), 0 24px 48px rgba(0,0,0,0.20)"};function _(r){return Gr[r]}function Ur(r={}){var n;let o=(0,pn.toState)((n=r.color)!=null?n:"neutral","color");return{_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),backgroundColor:e=>(0,$.themeColor)(e,"inherit",o.get(e)),color:e=>(0,$.themeColor)(e,"shift-10",o.get(e)),outline:e=>`1px solid ${(0,$.themeColor)(e,"border-strong",o.get(e))}`,outlineOffset:"-1px",boxShadow:_("low"),overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),paddingInline:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*4),fontWeight:"600",color:e=>(0,$.themeColor)(e,"shift-11",o.get(e)),margin:0},"& > p":{gridArea:"desc",paddingInline:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*4),paddingBottom:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),color:e=>(0,$.themeColor)(e,"text",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*4),color:e=>(0,$.themeColor)(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:(0,$.themeSpacing)(2),paddingBlock:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),paddingInline:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*4),borderTop:e=>`1px solid ${(0,$.themeColor)(e,"border",o.get(e))}`}}}}var hn=require("@domphy/core"),ze=require("@domphy/theme");function Jr(r={}){var n;let o=(0,hn.toState)((n=r.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="code"&&console.warn('"code" primitive patch must use code tag')},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",fontSize:e=>(0,ze.themeSize)(e,"inherit"),color:e=>(0,ze.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,ze.themeColor)(e,"inherit",o.get(e)),height:e=>(0,ze.themeSpacing)((0,ze.themeDensity)(e)*(6/1.5)),paddingInline:e=>(0,ze.themeSpacing)((0,ze.themeDensity)(e)*(1.5/1.5)),borderRadius:e=>(0,ze.themeSpacing)((0,ze.themeDensity)(e)*(1/1.5))}}}var Ke=require("@domphy/core"),Y=require("@domphy/theme");var ao=require("@domphy/core"),Ze=require("@domphy/floating");var Wt=require("@domphy/core");function Xr(r){return typeof r.set=="function"}function ct(r,o,n=!0){if(typeof r.addListener=="function")return n&&o(r.get()),r.addListener(o);if(n)return(0,Wt.effect)(()=>{o(r.get())});let e=!0,s=(0,Wt.effect)(()=>{let t=r.get();e||o(t)});return e=!1,s}function To(r,o){Xr(r)&&r.set(o)}function yt(r,o){o==null||o(),To(r,!1)}function $t(r){return(0,Wt.toState)(r!=null?r:!1)}function Re(r,o){return`domphy-${r}-${o.nodeId}`}function Zr(r,o){var at,Ue,kt,it;let{openState:n,onDismiss:e,placement:s,content:t,keepOpenOnContentHover:a}=o,{kind:i}=o,m=`floating:${i}`,u=null,l=null,c=null,d=null,f=!1,h=r.domElement,C=r.getRoot(),v=Re(i,r),p={style:{position:"fixed",pointerEvents:"auto",visibility:V=>n.get(V)?"visible":"hidden"},onKeyDown:V=>{V.key==="Escape"&&q()},onMouseEnter:()=>a&&w(),onMouseLeave:()=>a&&q(),_onMount:V=>{var de;if(c=V.domElement,c.id||(c.id=v),h&&c&&!c.hasAttribute("data-theme")){let Je=(de=h.closest("[data-theme]"))==null?void 0:de.getAttribute("data-theme");Je&&c.setAttribute("data-theme",Je)}},_portal:V=>{let de=h.closest("dialog");if(de){let Ne=de.querySelector(":scope > #domphy-floating");return Ne||(Ne=de.ownerDocument.createElement("div"),Ne.id="domphy-floating",Object.assign(Ne.style,{position:"fixed",inset:"0",zIndex:"20",pointerEvents:"none"}),de.appendChild(Ne)),Ne}let Je=V.domElement.querySelector("#domphy-floating");if(!Je){let Ne={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};Je=V.children.insert(Ne).domElement}return Je}},b=V=>(0,ao.merge)(V,p);b(t);let k=()=>{f||(f=!0,d=C.children.insert(t),d._behaviorInstances.set(m,Oe))},g=()=>{f&&(!c||!c.isConnected)&&(l==null||l(),l=null,d=null,c=null,f=!1),k(),h&&c&&(l==null||l(),l=(0,Ze.autoUpdate)(h,c,()=>{(0,Ze.computePosition)(h,c,{placement:s.get(),middleware:[(0,Ze.offset)(12),(0,Ze.flip)(),(0,Ze.shift)()],strategy:"fixed"}).then(({x:V,y:de,placement:Je})=>{c&&(Object.assign(c.style,{left:`${V}px`,top:`${de}px`}),s.set(Je))})}),To(n,!0))},D=()=>{l==null||l(),l=null,d&&(d.remove(),d=null),c=null,f=!1,yt(n,e)},w=()=>{u&&clearTimeout(u),u=setTimeout(g,100)},q=()=>{u&&clearTimeout(u),u=setTimeout(D,100)},ve=V=>{if(!n.get()||!h||!c)return;let de=V.target;!h.contains(de)&&!c.contains(de)&&q()};(at=C.domElement)==null||at.addEventListener("click",ve);let Ie=V=>{V.key==="Escape"&&n.get()&&q()},Z=(it=(kt=(Ue=C.domElement)==null?void 0:Ue.ownerDocument)!=null?kt:C.domElement)!=null?it:null;Z==null||Z.addEventListener("keydown",Ie);let He=V=>{V?f||g():f&&D()},re=()=>{},Ee=!1,Ge=!1,Oe,Et=V=>{var de;V._behaviors=z(E({},(de=V._behaviors)!=null?de:{}),{[m]:{attach:()=>Oe,props:{}}})};return Oe={show:w,hide:q,panelId:v,update(V){if(!Ge&&(e=V.onDismiss,V.openState!==n&&(re(),n=V.openState,re=ct(n,He,!1),n.get()&&g()),s=V.placement,t=V.content,a=V.keepOpenOnContentHover,b(t),Et(t),d)){Ge=!0;try{d.patch(t)}finally{Ge=!1}}},destroy(){var V;Ee||(Ee=!0,u&&clearTimeout(u),u=null,l==null||l(),l=null,d==null||d.remove(),d=null,c=null,f=!1,re(),re=()=>{},(V=C.domElement)==null||V.removeEventListener("click",ve),Z==null||Z.removeEventListener("keydown",Ie))}},Et(t),re=ct(n,He),Oe}function Qe(r){let{kind:o,placement:n,onDismiss:e}=r,s=$t(r.open),t=`floating:${o}`,a=u=>{var l;return(l=u==null?void 0:u.getBehavior(t))==null?void 0:l.show()},i=u=>{var l;return(l=u==null?void 0:u.getBehavior(t))==null?void 0:l.hide()},m=E({onKeyDown:(u,l)=>u.key==="Escape"&&i(l)},(0,ao.behavior)(t,Zr,{kind:o,openState:s,onDismiss:e,placement:n,content:r.content,keepOpenOnContentHover:!!r.keepOpenOnContentHover}));return{show:a,hide:i,anchorPartial:m}}var bt=require("@domphy/core"),J=require("@domphy/theme");var Qr='<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>',qt=1.5,ea=6/qt,fn=2.5/qt,ta=1/qt,gn=4/qt,oa=1/qt;function Yt(r={}){var e;let{removable:o=!1}=r,n=(0,bt.toState)((e=r.color)!=null?e:"neutral","color");return z(E({dataTone:"shift-2"},(0,bt.behavior)("tag-remove",(s,t)=>{let a=()=>s.remove(),i=()=>({span:(0,bt.rawHtml)(Qr),_key:"tag-remove",onClick:l=>{l.stopPropagation(),a()},onKeyDown:l=>{let c=l;c.key!=="Enter"&&c.key!==" "||(c.preventDefault(),c.stopPropagation(),a())},tabindex:0,role:"button",ariaLabel:"Remove",style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:l=>(0,J.themeSpacing)((0,J.themeDensity)(l)*oa),width:l=>(0,J.themeSpacing)((0,J.themeDensity)(l)*gn),height:l=>(0,J.themeSpacing)((0,J.themeDensity)(l)*gn),flexShrink:0,transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover":{backgroundColor:l=>(0,J.themeColor)(l,"shift-4",n.get(l))},"&:focus-visible":{boxShadow:l=>S(l,n.get(l))}}}),m=()=>{var l;return(l=s.children.items.find(c=>c instanceof bt.ElementNode&&c.key==="tag-remove"))!=null?l:null},u=(l,c)=>{let d=m();l.removable&&!d?s.children.insert(i(),void 0,c):!l.removable&&d&&s.children.remove(d)};return u(t,!1),{update:l=>u(l,!0)}},{removable:o})),{style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:s=>(0,J.themeSpacing)((0,J.themeDensity)(s)*ea),paddingBlock:0,borderRadius:s=>(0,J.themeSpacing)((0,J.themeDensity)(s)*999),paddingInlineStart:s=>(0,J.themeSpacing)((0,J.themeDensity)(s)*fn),paddingInlineEnd:s=>(0,J.themeSpacing)((0,J.themeDensity)(s)*(o?ta:fn)),gap:(0,J.themeSpacing)(1.5),fontSize:s=>(0,J.themeSize)(s,"decrease-1"),backgroundColor:s=>(0,J.themeColor)(s,"inherit",n.get(s)),color:s=>(0,J.themeColor)(s,"text",n.get(s)),border:"none",outlineOffset:"-1px",outline:s=>`1px solid ${(0,J.themeColor)(s,"border-strong",n.get(s))}`}})}function na(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:s=!1,multiple:t=!1}=r,a=(0,Ke.toState)(r.value),i=(0,Ke.toState)(s),{show:m,hide:u,anchorPartial:l}=Qe({kind:"combobox",open:i,onDismiss:r.onDismiss,placement:(0,Ke.toState)(n),content:r.content}),c={onClick:(g,D)=>!t&&u(D),dataTone:"shift-14",style:{backgroundColor:g=>(0,Y.themeColor)(g,"inherit"),color:g=>(0,Y.themeColor)(g,"text"),borderRadius:g=>(0,Y.themeSpacing)((0,Y.themeDensity)(g)*2),outline:g=>`1px solid ${(0,Y.themeColor)(g,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}};(0,Ke.merge)(r.content,c);let d={border:"none",outline:"none",padding:0,margin:0,flex:1,height:(0,Y.themeSpacing)(6),marginInlineStart:(0,Y.themeSpacing)(2),fontSize:g=>(0,Y.themeSize)(g,"inherit"),color:g=>(0,Y.themeColor)(g,"text",e),backgroundColor:g=>(0,Y.themeColor)(g,"inherit",e)},f=g=>{var D,w;return(w=(D=g==null?void 0:g.elementNode)==null?void 0:D.getBehavior("comboboxInner"))==null?void 0:w.query},h=g=>{let D=g;for(;D;){if(D._behaviorInstances.has("floating:combobox"))return D;D=D.parent}return g},C={role:"combobox",ariaHaspopup:"listbox",ariaExpanded:g=>i.get(g),ariaControls:g=>g!=null&&g.elementNode?Re("combobox",h(g.elementNode)):void 0},v=g=>g?((0,Ke.merge)(g,E({onFocus:(D,w)=>m(w),style:d,_key:"combobox-input"},C)),g):E({input:null,ariaLabel:"Filter options",onFocus:(D,w)=>m(w),value:D=>{var w,q;return(q=(w=f(D))==null?void 0:w.get(D))!=null?q:""},onInput:(D,w)=>{var q;(q=w.getBehavior("comboboxInner"))==null||q.query.set(D.target.value)},style:d,_key:"combobox-input"},C),p=g=>({div:D=>{i.get(D);let w=g.state.get(D),q=Array.isArray(w)?w:[w],Ie=g.options.filter(Z=>q.includes(Z.value)).map(Z=>({span:Z.label,$:[Yt({color:g.color,removable:!0})],_key:Z.value,_onRemove:He=>{let re=g.state.get(),Ge=(Array.isArray(re)?re:[re]).filter(Oe=>Oe!==Z.value);g.multiple?g.state.set(Ge):g.state.set(Ge[0])}}));return Ie.push(v(g.input)),Ie},_key:"comboboxWrap",style:{display:"flex",flexWrap:"wrap",gap:(0,Y.themeSpacing)(1)}}),k=z(E({_onInsert:g=>{g.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onSchedule:(g,D)=>{D[g.tagName]=[p({options:o,multiple:t,color:e,state:a,input:r.input})]}},(0,Ke.behavior)("comboboxInner",(g,D)=>{let w=g.getMetadata("comboboxQuery");return w||(w=(0,Ke.toState)(""),g.setMetadata("comboboxQuery",w)),{query:w,update(q){g.children.update([p(q)])}}},{options:o,multiple:t,color:e,state:a,input:r.input})),{style:{minWidth:(0,Y.themeSpacing)(32),outlineOffset:"-1px",outline:g=>`1px solid ${(0,Y.themeColor)(g,"border-strong","neutral")}`,paddingBlock:g=>(0,Y.themeSpacing)((0,Y.themeDensity)(g)*1),paddingInline:g=>(0,Y.themeSpacing)((0,Y.themeDensity)(g)*1),borderRadius:g=>(0,Y.themeSpacing)((0,Y.themeDensity)(g)*1.5),fontSize:g=>(0,Y.themeSize)(g,"inherit"),color:g=>(0,Y.themeColor)(g,"text",e),backgroundColor:g=>(0,Y.themeColor)(g,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-within":{boxShadow:g=>S(g,e)}}});return(0,Ke.merge)(l,k),l}var io=require("@domphy/core"),ee=require("@domphy/theme");function ra(){return{role:"group",ariaLabel:"Commands",_onSchedule:(r,o)=>{(0,io.merge)(o,{_context:{command:{query:(0,io.toState)("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function aa(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let s=e.getContext("command");if(!s){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>s.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:e=>(0,ee.themeSize)(e,"inherit"),paddingInline:e=>(0,ee.themeSpacing)((0,ee.themeDensity)(e)*3),paddingBlock:e=>(0,ee.themeSpacing)((0,ee.themeDensity)(e)*2),border:"none",borderBottom:e=>`1px solid ${(0,ee.themeColor)(e,"border",o)}`,outline:"none",color:e=>(0,ee.themeColor)(e,"shift-10",o),backgroundColor:e=>(0,ee.themeColor)(e,"inherit",o),"&::placeholder":{color:e=>(0,ee.themeColor)(e,"shift-7")},transition:"border-bottom-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{borderBottomColor:e=>(0,ee.themeColor)(e,"shift-6",n),boxShadow:e=>S(e,n)}}}}function ia(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{_onMount:e=>{var u,l;let s=e.getContext("command");if(!s){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=(l=(u=t.textContent)==null?void 0:u.toLowerCase())!=null?l:"",i=c=>{t.hidden=c.length>0&&!a.includes(c.toLowerCase())};i(s.query.get());let m=s.query.addListener(i);e.addHook("Remove",m)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>(0,ee.themeSize)(e,"inherit"),height:e=>(0,ee.themeSpacing)(6+(0,ee.themeDensity)(e)*2),paddingInline:e=>(0,ee.themeSpacing)((0,ee.themeDensity)(e)*3),border:"none",outline:"none",color:e=>(0,ee.themeColor)(e,"shift-13",o),backgroundColor:e=>(0,ee.themeColor)(e,"inherit",o),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{color:e=>(0,ee.themeColor)(e,"shift-13",o),backgroundColor:e=>(0,ee.themeColor)(e,"hover",o)},"&:focus-visible":{boxShadow:e=>S(e,n)}}}}var xe=require("@domphy/core"),P=require("@domphy/theme");var fe=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()),wt=(r,o)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+o),Do=(r,o)=>new Date(r.getFullYear(),r.getMonth()+o,r.getDate()),Gt=(r,o)=>!!r&&!!o&&r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()&&r.getDate()===o.getDate(),Po=r=>`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`,Io=(r,o)=>wt(r,-((r.getDay()-o+7)%7));function la(r){var o,n;try{let e=new Intl.Locale(r),s=(n=(o=e.getWeekInfo)==null?void 0:o.call(e))!=null?n:e.weekInfo;if(s!=null&&s.firstDay)return s.firstDay%7}catch(e){}return 0}function sa(r,o){let n=o,e=null,s=a=>{e==null||e(),e=a.onChange?a.selection.addListener(i=>a.onChange(i)):null},t=(a,i)=>{a!==i&&a.set(i.get())};return s(n),{update(a){a.selectionIsCallerOwned||t(a.selection,n.selection),t(a.viewYear,n.viewYear),t(a.viewMonth,n.viewMonth),t(a.focused,n.focused),t(a.hovered,n.hovered),t(a.hour,n.hour),t(a.minute,n.minute),t(a.open,n.open),(a.selection!==n.selection||a.onChange!==n.onChange)&&s(a),n=a},destroy(){e==null||e(),e=null}}}function ca(r={}){var Zo,Qo,en,tn;let{mode:o="single",time:n=!1,min:e,max:s,disabledDate:t,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:i,onChange:m}=r,u=(Zo=r.weekStartsOn)!=null?Zo:la(a),l=(0,xe.toState)((Qo=r.accentColor)!=null?Qo:"primary","accentColor"),c=(0,xe.toState)((en=r.placement)!=null?en:"bottom-start"),d=(0,xe.toState)((tn=r.value)!=null?tn:o==="range"?[null,null]:null),f=(()=>{let y=d.get(),x=o==="range"?y==null?void 0:y[0]:y;return x instanceof Date?x:new Date})(),h=(0,xe.toState)(f.getFullYear(),"viewYear"),C=(0,xe.toState)(f.getMonth(),"viewMonth"),v=(0,xe.toState)(fe(f),"focused"),p=(0,xe.toState)(null,"hovered"),b=(0,xe.toState)(f.getHours(),"hour"),k=(0,xe.toState)(f.getMinutes(),"minute"),g=new Intl.DateTimeFormat(a,E({dateStyle:"medium"},n?{timeStyle:"short"}:{})),D=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),w=new Intl.DateTimeFormat(a,{weekday:"short"}),q=new Intl.DateTimeFormat(a,{dateStyle:"full"}),ve=y=>y?g.format(y):"",Ie=y=>{if(i)return i(y);if(o==="range"){let[x,T]=y!=null?y:[null,null];return x?`${ve(x)} \u2013 ${ve(T)}`:""}return ve(y)},Z=Array.from({length:7},(y,x)=>w.format(new Date(2023,0,1+(x+u)%7))),He=y=>!!e&&fe(y)<fe(e)||!!s&&fe(y)>fe(s)||!!t&&t(y),re=y=>{if(!n)return fe(y);let x=fe(y);return x.setHours(b.get(),k.get(),0,0),x},Ee=(y,x)=>{var O;if(He(y))return;if(o==="single"){d.set(re(y)),n||Ne(x);return}let[T,L]=(O=d.get())!=null?O:[null,null];!T||T&&L?d.set([re(y),null]):fe(y)<fe(T)?(d.set([re(y),re(T)]),n||Ne(x)):(d.set([T,re(y)]),n||Ne(x))},Ge=()=>{var y;if(n)if(o==="single"){let x=d.get();x&&d.set(re(x))}else{let[x,T]=(y=d.get())!=null?y:[null,null];d.set([x&&re(x),T&&re(T)])}},Oe=(y,x)=>{var _t;if(o!=="range")return!1;let[T,L]=(_t=d.get(x))!=null?_t:[null,null],O=L!=null?L:p.get(x);if(!T||!O)return!1;let M=fe(T)<=fe(O)?T:O,$e=fe(T)<=fe(O)?O:T,ke=fe(y);return ke>=fe(M)&&ke<=fe($e)},Et=(y,x)=>{let T=d.get(x);if(o==="range"){let[L,O]=T!=null?T:[null,null];return Gt(y,L)||Gt(y,O)}return Gt(y,T)},at=y=>{h.set(y.getFullYear()),C.set(y.getMonth())},Ue=y=>{let x=Do(new Date(h.get(),C.get(),1),y);at(x)},kt=y=>h.set(h.get()+y),it=y=>{var T;let x=(T=y==null?void 0:y.getRoot())==null?void 0:T.domElement;setTimeout(()=>{var L;(L=x==null?void 0:x.querySelector(`[data-date="${Po(v.get())}"]`))==null||L.focus()},0)},V=Cr(),de=(0,xe.toState)(!1),{show:Je,hide:Ne,anchorPartial:So}=Qe({kind:"datePicker",open:de,placement:c,content:V}),Sr=E({type:"text",readonly:!0,value:y=>Ie(d.get(y)),role:"combobox",ariaHaspopup:"dialog",ariaExpanded:y=>de.get(y),ariaControls:y=>y!=null&&y.elementNode?Re("datePicker",y.elementNode):void 0,ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(y,x)=>{vo(x)},onFocus:(y,x)=>{vo(x)},onKeyDown:(y,x)=>{let T=y.key;(T==="ArrowDown"||T==="Enter")&&(y.preventDefault(),vo(x))}},(0,xe.behavior)("datePicker",sa,{selection:d,selectionIsCallerOwned:r.value!==void 0,viewYear:h,viewMonth:C,focused:v,hovered:p,hour:b,minute:k,open:de,onChange:m}));function vo(y){var T;let x=(T=vr())!=null?T:new Date;v.set(fe(x)),at(x),Je(y),it(y)}function vr(){var x;let y=d.get();return o==="range"?(x=y==null?void 0:y[0])!=null?x:null:y!=null?y:null}return(0,xe.merge)(So,Sr),So;function Cr(){let y=(M,$e,ke)=>({button:M,type:"button",ariaLabel:$e,onClick:ke,style:ma()}),x={div:[y("\xAB","Previous year",()=>kt(-1)),y("\u2039","Previous month",()=>Ue(-1)),{div:M=>D.format(new Date(h.get(M),C.get(M),1)),ariaLive:"polite",_doctorDisable:"inline-typography",style:{flex:"1",textAlign:"center",fontWeight:"bold",fontSize:M=>(0,P.themeSize)(M)}},y("\u203A","Next month",()=>Ue(1)),y("\xBB","Next year",()=>kt(1))],style:{display:"flex",alignItems:"center",gap:(0,P.themeSpacing)(1),marginBottom:(0,P.themeSpacing)(2)}},T={div:Z.map((M,$e)=>({div:M,_doctorDisable:"inline-typography",style:{textAlign:"center",fontSize:ke=>(0,P.themeSize)(ke,"decrease-1"),fontWeight:"bold",color:ke=>(0,P.themeColor)(ke,"shift-7"),paddingBlock:(0,P.themeSpacing)(1)},_key:$e})),role:"row",style:yn()},L={div:M=>xr(M),role:"grid",ariaLabel:"Calendar",onKeyDown:Tr,onMouseLeave:()=>o==="range"&&p.set(null),style:{display:"flex",flexDirection:"column",gap:(0,P.themeSpacing)(.5)}},O=[x,T,L];return n&&O.push(kr()),O.push(wr()),{div:O,role:"dialog",ariaModal:"false",dataTone:"shift-14",style:{minWidth:(0,P.themeSpacing)(70),padding:(0,P.themeSpacing)(3),borderRadius:M=>(0,P.themeSpacing)((0,P.themeDensity)(M)*2),backgroundColor:M=>(0,P.themeColor)(M,"inherit"),color:M=>(0,P.themeColor)(M,"text"),outline:M=>`1px solid ${(0,P.themeColor)(M,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}}}function xr(y){let x=new Date(h.get(y),C.get(y),1),T=C.get(y),L=Io(x,u),O=[];for(let M=0;M<6;M++){let $e=[];for(let ke=0;ke<7;ke++){let _t=wt(L,M*7+ke);$e.push(Er(_t,T,y))}O.push({div:$e,role:"row",style:yn(),_key:M})}return O}function Er(y,x,T){let L=He(y),O=Et(y,T),M=Oe(y,T),$e=y.getMonth()!==x,ke=Gt(y,v.get(T)),_t=Gt(y,new Date);return{button:String(y.getDate()),type:"button",role:"gridcell",tabIndex:ke?0:-1,ariaSelected:O,ariaDisabled:L,disabled:L,ariaLabel:q.format(y),dataDate:Po(y),onClick:(ne,Dr)=>Ee(y,Dr),onMouseEnter:()=>o==="range"&&p.set(y),style:{appearance:"none",border:"none",cursor:L?"not-allowed":"pointer",aspectRatio:"1",borderRadius:(0,P.themeSpacing)(1),fontSize:ne=>(0,P.themeSize)(ne),fontFamily:"inherit",opacity:L?.35:$e?.5:1,backgroundColor:ne=>O?(0,P.themeColor)(ne,"shift-7",l.get(ne)):M?(0,P.themeColor)(ne,"hover",l.get(ne)):"transparent",color:ne=>O?(0,P.themeColor)(ne,"shift-0",l.get(ne)):(0,P.themeColor)(ne,"text"),outline:_t?ne=>`1px solid ${(0,P.themeColor)(ne,"shift-6",l.get(ne))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:ne=>O?(0,P.themeColor)(ne,"shift-7",l.get(ne)):(0,P.themeColor)(ne,"shift-3",l.get(ne))},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:ne=>S(ne,l.get(ne))}},_key:Po(y)}}function kr(){let y=(x,T,L)=>({select:Array.from({length:x},(O,M)=>({option:String(M).padStart(2,"0"),value:String(M),selected:$e=>T.get($e)===M,_key:M})),ariaLabel:L,onChange:O=>{T.set(Number(O.target.value)),Ge()},style:ua()});return{div:[y(24,b,"Hour"),{span:":",_doctorDisable:"inline-typography",style:{fontWeight:"bold"}},y(60,k,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:(0,P.themeSpacing)(1),marginTop:(0,P.themeSpacing)(3)}}}function wr(){let y=(x,T)=>({button:x,type:"button",onClick:(L,O)=>T(O),style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:L=>(0,P.themeSize)(L,"decrease-1"),color:L=>(0,P.themeColor)(L,"muted",l.get(L)),padding:(0,P.themeSpacing)(1)}});return{div:[y("Today",x=>{let T=new Date;v.set(fe(T)),at(T),it(x)}),y("Clear",()=>{d.set(o==="range"?[null,null]:null),p.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:(0,P.themeSpacing)(2),paddingTop:(0,P.themeSpacing)(2),borderTop:x=>`1px solid ${(0,P.themeColor)(x,"border")}`}}}function Tr(y,x){let T=y,L=v.get(),O=null;switch(T.key){case"ArrowLeft":O=wt(L,-1);break;case"ArrowRight":O=wt(L,1);break;case"ArrowUp":O=wt(L,-7);break;case"ArrowDown":O=wt(L,7);break;case"Home":O=Io(L,u);break;case"End":O=wt(Io(L,u),6);break;case"PageUp":O=Do(L,T.shiftKey?-12:-1);break;case"PageDown":O=Do(L,T.shiftKey?12:1);break;case"Enter":case" ":T.preventDefault(),Ee(L,x);return;default:return}T.preventDefault(),v.set(O),at(O),it(x)}}function yn(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:(0,P.themeSpacing)(.5)}}function ma(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:r=>(0,P.themeSize)(r),color:r=>(0,P.themeColor)(r,"muted"),width:(0,P.themeSpacing)(7),height:(0,P.themeSpacing)(7),borderRadius:(0,P.themeSpacing)(1),"&:hover":{backgroundColor:r=>(0,P.themeColor)(r,"shift-3")}}}function ua(){return{fontFamily:"inherit",fontSize:r=>(0,P.themeSize)(r),padding:(0,P.themeSpacing)(1),borderRadius:(0,P.themeSpacing)(1),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${(0,P.themeColor)(r,"border-strong")}`,backgroundColor:r=>(0,P.themeColor)(r,"inherit"),color:r=>(0,P.themeColor)(r,"text")}}var bn=require("@domphy/core"),mt=require("@domphy/theme");function da(r={}){var n;let o=(0,bn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:`minmax(${(0,mt.themeSpacing)(24)}, max-content) 1fr`,columnGap:(0,mt.themeSpacing)(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>(0,mt.themeSize)(e,"inherit"),color:e=>(0,mt.themeColor)(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>(0,mt.themeSize)(e,"inherit"),color:e=>(0,mt.themeColor)(e,"text",o.get(e))}}}}var Oo=require("@domphy/core"),N=require("@domphy/theme");function pa(r={}){var s,t;let{duration:o=240}=r,n=(0,Oo.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,Oo.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},_doctorDisable:"inline-typography",style:{fontSize:a=>(0,N.themeSize)(a,"inherit"),color:a=>(0,N.themeColor)(a,"text",n.get(a)),backgroundColor:a=>(0,N.themeColor)(a,"inherit",n.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>(0,N.themeColor)(a,"shift-2",n.get(a)),color:a=>(0,N.themeColor)(a,"shift-10",n.get(a)),fontSize:a=>(0,N.themeSize)(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:(0,N.themeSpacing)(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*4),height:(0,N.themeSpacing)(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:(0,N.themeSpacing)(2),height:(0,N.themeSpacing)(2),flexShrink:0,marginTop:(0,N.themeSpacing)(-.5),borderInlineEnd:a=>`${(0,N.themeSpacing)(.5)} solid ${(0,N.themeColor)(a,"shift-9",n.get(a))}`,borderBottom:a=>`${(0,N.themeSpacing)(.5)} solid ${(0,N.themeColor)(a,"shift-9",n.get(a))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>(0,N.themeColor)(a,"shift-3",n.get(a))},"& > summary:focus-visible":{borderRadius:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*2),boxShadow:a=>S(a,e.get(a))},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${o}ms ease, opacity ${o}ms ease, padding ${o}ms ease`},"&[open] > :not(summary)":{maxHeight:"none",opacity:1,paddingTop:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*1),paddingBottom:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*3)}}}}var vn=require("@domphy/core"),Ae=require("@domphy/theme");var Ut=0;function lo(){Ut++,Ut===1&&(document.body.style.overflow="hidden")}function At(){Ut=Math.max(0,Ut-1),Ut===0&&(document.body.style.overflow="")}var Sn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function ha(r,o){let{state:n,onDismiss:e}=o,s=null,t=!1,a=!1,i=null,m=r.domElement;m.setAttribute("aria-modal","true");let u=()=>{t=!1,typeof m.close=="function"&&m.close(),m.style.visibility="hidden",m.style.pointerEvents="none",m.style.display="none",a&&(At(),a=!1),s==null||s.focus(),s=null},l=h=>{if(h.key!=="Tab")return;let C=Array.from(m.querySelectorAll(Sn)).filter(b=>!b.closest("[aria-hidden='true']")&&b.offsetParent!==null);if(!C.length){h.preventDefault();return}let v=C[0],p=C[C.length-1];h.shiftKey?(document.activeElement===v||document.activeElement===m)&&(h.preventDefault(),p.focus()):document.activeElement===p&&(h.preventDefault(),v.focus())},c=h=>{h.preventDefault(),yt(n,e)};m.addEventListener("cancel",c);let d=h=>{if(h)t=!1,i&&(clearTimeout(i),i=null),s=document.activeElement,m.style.visibility="visible",m.style.pointerEvents="auto",m.style.display="",typeof m.showModal=="function"&&!m.open&&m.showModal(),a||(lo(),a=!0),m.addEventListener("keydown",l),requestAnimationFrame(()=>{m.style.opacity="1";let C=m.querySelector(Sn);C==null||C.focus()});else{if(t=!0,m.style.opacity="0",m.removeEventListener("keydown",l),!m.open){u();return}i=setTimeout(()=>{i=null,t&&u()},350)}},f=ct(n,d);return{requestClose:()=>yt(n,e),onTransitionEnd:h=>{t&&h.target===m&&h.propertyName==="opacity"&&u()},update(h){e=h.onDismiss,h.state!==n&&(f(),n=h.state,f=ct(n,d,!1))},destroy(){i&&(clearTimeout(i),i=null),f(),m.removeEventListener("cancel",c),a&&(At(),a=!1),m.removeEventListener("keydown",l),s==null||s.focus(),s=null}}}function fa(r={}){let{color:o="neutral",open:n=!1,labelledBy:e,describedBy:s,onDismiss:t}=r,a=$t(n);return z(E({_onInsert:i=>{i.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')}},(0,vn.behavior)("dialog",ha,{state:a,onDismiss:t})),{ariaLabelledby:e,ariaDescribedby:s,onClick:(i,m)=>{var c;if(i.target!==m.domElement)return;let u=m.domElement.getBoundingClientRect();i.clientX>=u.left&&i.clientX<=u.right&&i.clientY>=u.top&&i.clientY<=u.bottom||(c=m.getBehavior("dialog"))==null||c.requestClose()},onTransitionEnd:(i,m)=>{var u;return(u=m.getBehavior("dialog"))==null?void 0:u.onTransitionEnd(i)},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:i=>(0,Ae.themeSize)(i,"inherit"),color:i=>(0,Ae.themeColor)(i,"shift-10",o),backgroundColor:i=>(0,Ae.themeColor)(i,"inherit",o),border:"none",borderRadius:i=>(0,Ae.themeSpacing)((0,Ae.themeDensity)(i)*2),padding:i=>(0,Ae.themeSpacing)((0,Ae.themeDensity)(i)*3),boxShadow:_("high"),"&::backdrop":{backgroundColor:i=>(0,Ae.themeColor)(i,"shift-2","neutral"),opacity:.75}}})}var Cn=require("@domphy/core"),ut=require("@domphy/theme");function ga(r={}){var n;let o=(0,Cn.toState)((n=r.color)!=null?n:"neutral","color");return{role:"separator",_onInsert:e=>{e.tagName!=="div"&&console.warn('"divider" patch should be used with <div>')},style:{display:"flex",justifyContent:"center",alignItems:"baseline",gap:(0,ut.themeSpacing)(2),fontSize:e=>(0,ut.themeSize)(e,"inherit"),backgroundColor:e=>(0,ut.themeColor)(e),color:e=>(0,ut.themeColor)(e,"text",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>(0,ut.themeColor)(e,"border-strong",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>(0,ut.themeColor)(e,"border-strong",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var xn=require("@domphy/core"),we=require("@domphy/theme");var Lo={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},En={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},Bt=r=>r==="left"||r==="right";function kn(r,o){return r==="start"?o?"right":"left":r==="end"?o?"left":"right":r}function ya(r,o){let{state:n,onDismiss:e,placement:s,size:t}=o,a=r.domElement;a.setAttribute("aria-modal","true");let i=p=>{p.preventDefault(),yt(n,e)};a.addEventListener("cancel",i);let m=(p,b)=>{let g=(p==="start"||p==="end")&&(a.ownerDocument.documentElement.dir==="rtl"||a.ownerDocument.dir==="rtl"),D=kn(p,g),w=b!=null?b:Bt(D)?(0,we.themeSpacing)(80):(0,we.themeSpacing)(64);return a.style.margin=En[D],a.style.width=Bt(D)?w:"100dvw",a.style.height=Bt(D)?"100dvh":w,D},u=m(s,t),l=!1,c=!1,d=null,f=()=>{d=null,l&&(l=!1,typeof a.close=="function"&&a.close(),a.style.visibility="hidden",a.style.pointerEvents="none",a.style.display="none",c&&(At(),c=!1))},h=p=>{p.target===a&&p.propertyName==="transform"&&f()};a.addEventListener("transitionend",h);let C=p=>{if(p)l=!1,d&&(clearTimeout(d),d=null),a.style.visibility="visible",a.style.pointerEvents="auto",a.style.display="",typeof a.showModal=="function"&&!a.open&&a.showModal(),c||(lo(),c=!0),requestAnimationFrame(()=>{a.style.transform="translate(0, 0)"});else{if(l=!0,a.style.transform=Lo[u],!a.open){f();return}d=setTimeout(f,350)}},v=ct(n,C);return{requestClose:()=>yt(n,e),update(p){e=p.onDismiss,p.state!==n&&(v(),n=p.state,v=ct(n,C,!1)),(p.placement!==s||p.size!==t)&&(s=p.placement,t=p.size,u=m(s,t),n.get()||(a.style.transform=Lo[u]))},destroy(){d&&(clearTimeout(d),d=null),v(),a.removeEventListener("cancel",i),a.removeEventListener("transitionend",h),c&&(At(),c=!1)}}}function ba(r={}){let{color:o="neutral",open:n=!1,onDismiss:e,placement:s="end",size:t}=r,a=$t(n),i=kn(s,!1),m=Bt(i)?(0,we.themeSpacing)(80):(0,we.themeSpacing)(64),u=t!=null?t:m;return z(E({_onInsert:l=>{l.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')}},(0,xn.behavior)("drawer",ya,{state:a,onDismiss:e,placement:s,size:t})),{onClick:(l,c)=>{var h;if(l.target!==c.domElement)return;let d=c.domElement.getBoundingClientRect();l.clientX>=d.left&&l.clientX<=d.right&&l.clientY>=d.top&&l.clientY<=d.bottom||(h=c.getBehavior("drawer"))==null||h.requestClose()},style:{transform:Lo[i],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:l=>(0,we.themeSize)(l,"inherit"),color:l=>(0,we.themeColor)(l,"shift-10",o),backgroundColor:l=>(0,we.themeColor)(l,"inherit",o),border:"none",padding:l=>(0,we.themeSpacing)((0,we.themeDensity)(l)*3),margin:En[i],width:Bt(i)?u:"100dvw",height:Bt(i)?"100dvh":u,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:_("high"),"&::backdrop":{backgroundColor:l=>(0,we.themeColor)(l,"shift-2","neutral"),opacity:.75}}})}var wn=require("@domphy/core"),so=require("@domphy/theme");function Sa(r={}){var n;let o=(0,wn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>(0,so.themeSize)(e,"inherit"),fontStyle:"italic",color:e=>(0,so.themeColor)(e,"shift-10",o.get(e))}}}var Tn=require("@domphy/core"),St=require("@domphy/theme");function va(r={}){var n;let o=(0,Tn.toState)((n=r.color)!=null?n:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:(0,St.themeSpacing)(3),paddingBlock:(0,St.themeSpacing)(12),paddingInline:(0,St.themeSpacing)(6),textAlign:"center",color:e=>(0,St.themeColor)(e,"muted",o.get(e)),"& > :first-child":{color:e=>(0,St.themeColor)(e,"shift-5",o.get(e)),opacity:.9},"& > :nth-child(2)":{color:e=>(0,St.themeColor)(e,"text",o.get(e))}}}}var zo="errorBoundaryOriginal";function Ca(r){var n;let o=r.getMetadata(zo);if(typeof o=="function"){(n=r._childrenRelease)==null||n.call(r),r._setupFunctionChildren(o);return}if(o!=null){r.children.update(Array.isArray(o)?o:[o]);return}r.children.update([])}function xa(r={}){return{_onSchedule:(o,n)=>{o.getMetadata(zo)===void 0&&o.setMetadata(zo,n[o.tagName])},_onError:(o,n)=>{var t,a;(t=r.onError)==null||t.call(r,n);let e=()=>Ca(o),s=typeof r.fallback=="function"?r.fallback(n,e):(a=r.fallback)!=null?a:{div:"An error occurred."};o.children.update([s])}}}var Dn=require("@domphy/core"),dt=require("@domphy/theme");var Ea={small:8,medium:10,large:14};function ka(r={}){var e,s;let o=(0,Dn.toState)((e=r.color)!=null?e:"primary","color"),n=(0,dt.themeSpacing)(Ea[(s=r.size)!=null?s:"medium"]);return{type:"button",_onInsert:t=>{t.tagName!=="button"&&console.warn('"fab" patch must use button tag')},_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"],style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:n,height:n,borderRadius:"50%",fontSize:t=>(0,dt.themeSize)(t,"inherit"),backgroundColor:t=>(0,dt.themeColor)(t,"shift-13",o.get(t)),color:t=>(0,dt.themeColor)(t,"shift-0","neutral"),boxShadow:_("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>(0,dt.themeColor)(t,"shift-14",o.get(t)),boxShadow:_("medium")},"&:active:not([disabled])":{backgroundColor:t=>(0,dt.themeColor)(t,"shift-15",o.get(t)),boxShadow:_("low")},"&:focus-visible":{boxShadow:t=>`${_("medium")}, ${S(t,o.get(t))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var Pn=require("@domphy/core"),et=require("@domphy/theme");function wa(r={}){var n;let o=(0,Pn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:(0,et.themeSpacing)(2),marginInline:0,marginTop:(0,et.themeSpacing)(3),marginBottom:(0,et.themeSpacing)(3),color:e=>(0,et.themeColor)(e,"text",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:(0,et.themeSpacing)(2)},"& figcaption":{fontSize:e=>(0,et.themeSize)(e,"decrease-1"),color:e=>(0,et.themeColor)(e,"muted",o.get(e)),lineHeight:1.45}}}}var In=require("@domphy/core"),K=require("@domphy/theme");function Ta(r={}){var s;let{layout:o="horizontal"}=r,n=(0,In.toState)((s=r.color)!=null?s:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},_doctorDisable:"inline-typography",style:{margin:0,paddingInline:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*3),paddingBlock:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*3),border:"none",borderRadius:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*2),fontSize:t=>(0,K.themeSize)(t,"inherit"),backgroundColor:t=>(0,K.themeColor)(t,"inherit",n.get(t)),color:t=>(0,K.themeColor)(t,"text",n.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:(0,K.themeSpacing)(4),rowGap:(0,K.themeSpacing)(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>(0,K.themeSize)(t,"inherit"),fontWeight:600,paddingBlock:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*1),borderRadius:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*2),color:t=>(0,K.themeColor)(t,"text",n.get(t)),backgroundColor:t=>(0,K.themeColor)(t,"inherit",n.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?0:(0,K.themeSpacing)((0,K.themeDensity)(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(${(0,K.themeSpacing)(2)} * -1)`,fontSize:t=>(0,K.themeSize)(t,"decrease-1"),color:t=>(0,K.themeColor)(t,"text",n.get(t))}}}}var co=require("@domphy/theme");function Da(r={}){let{columns:o=1,gap:n=4,align:e}=r;return{style:E({display:"grid",gridTemplateColumns:typeof o=="number"?`repeat(${o}, minmax(0, 1fr))`:o,gap:s=>(0,co.themeSpacing)((0,co.themeDensity)(s)*n)},e?{alignItems:e}:{})}}var On=require("@domphy/core"),Tt=require("@domphy/theme"),Pa={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Ia(r={}){var e;let o=(0,On.toState)((e=r.color)!=null?e:"neutral","color"),n=r.size;return{_onInsert:s=>{["h1","h2","h3","h4","h5","h6"].includes(s.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:s=>(0,Tt.themeColor)(s,"shift-11",o.get(s)),marginTop:0,marginBottom:(0,Tt.themeSpacing)(2),fontSize:s=>{if(n!==void 0)return(0,Tt.themeSize)(s,n);let t=Pa[s.elementNode.tagName]||"inherit";return(0,Tt.themeSize)(s,t)}}}}var Ln=require("@domphy/core"),Ht=require("@domphy/theme");function Oa(r={}){var n;let o=(0,Ln.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},dataTone:"shift-3",style:{border:0,height:"1px",marginInline:0,marginTop:(0,Ht.themeSpacing)(3),marginBottom:(0,Ht.themeSpacing)(3),backgroundColor:e=>(0,Ht.themeColor)(e,"inherit",o.get(e)),color:e=>(0,Ht.themeColor)(e,"text",o.get(e))}}}var zn=require("@domphy/core"),Dt=require("@domphy/theme");function La(r={}){var n;let o=(0,zn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="span"&&console.warn('"icon" primitive patch should use span tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",alignSelf:"center",justifySelf:"center",verticalAlign:"middle",width:(0,Dt.themeSpacing)(4),height:(0,Dt.themeSpacing)(4),flexShrink:"0",fontSize:e=>(0,Dt.themeSize)(e),backgroundColor:"transparent",color:e=>(0,Dt.themeColor)(e,"text",o.get(e))}}}var Rn=require("@domphy/core"),Jt=require("@domphy/theme");function za(r={}){var n;let o=(0,Rn.toState)((n=r.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:(0,Jt.themeSpacing)(2),backgroundColor:e=>(0,Jt.themeColor)(e,"inherit",o.get(e)),color:e=>(0,Jt.themeColor)(e,"text",o.get(e))}}}var Ro=require("@domphy/core"),X=require("@domphy/theme");function Ra(r={}){var e,s;let o=(0,Ro.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Ro.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>(0,X.themeSize)(t,"inherit"),color:t=>(0,X.themeColor)(t,"text",o.get(t)),display:"inline-flex",position:"relative",width:(0,X.themeSpacing)(6),height:(0,X.themeSpacing)(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:(0,X.themeSpacing)(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,X.themeColor)(t,"border-strong",o.get(t))}`,color:t=>(0,X.themeColor)(t,"text",o.get(t)),width:(0,X.themeSpacing)(4),height:(0,X.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,X.themeColor)(t,"hover",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,X.themeColor)(t,"shift-6",n.get(t))}`,backgroundColor:t=>(0,X.themeColor)(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,X.themeColor)(t,"shift-7",n.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${(0,X.themeSpacing)(.5)} solid ${(0,X.themeColor)(t,"inherit",n.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${(0,X.themeColor)(t,"shift-6",n.get(t))}`,backgroundColor:t=>(0,X.themeColor)(t,"shift-3",n.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>(0,X.themeColor)(t,"shift-8",n.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>(0,X.themeColor)(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:(0,X.themeSpacing)(1.5),boxShadow:t=>S(t,n.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,X.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var Vn=require("@domphy/core"),se=require("@domphy/theme");function Va(r={}){var n;let o=(0,Vn.toState)((n=r.color)!=null?n:"neutral","color");return{type:"color",_onInsert:e=>{e.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag')},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:e=>(0,se.themeSize)(e,"inherit"),color:e=>(0,se.themeColor)(e,"text",o.get(e)),paddingBlock:e=>(0,se.themeSpacing)((0,se.themeDensity)(e)*1),paddingInline:e=>(0,se.themeSpacing)((0,se.themeDensity)(e)*1),blockSize:e=>(0,se.themeSpacing)(6+(0,se.themeDensity)(e)*2),inlineSize:e=>(0,se.themeSpacing)(6+(0,se.themeDensity)(e)*2),backgroundColor:"transparent",transition:"box-shadow 140ms ease",borderRadius:e=>(0,se.themeSpacing)((0,se.themeDensity)(e)*1.5),"&:focus-visible":{boxShadow:e=>S(e,o.get(e))},"&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:e=>(0,se.themeSpacing)((0,se.themeDensity)(e)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>(0,se.themeColor)(e,"shift-2","neutral"),outline:e=>`1px solid ${(0,se.themeColor)(e,"border-strong","neutral")}`}}}}var Vo=require("@domphy/core"),ce=require("@domphy/theme");function Ma(r={}){var s,t;let{mode:o="datetime-local"}=r,n=(0,Vo.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,Vo.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{type:o,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag')},style:{fontFamily:"inherit",fontSize:a=>(0,ce.themeSize)(a,"inherit"),lineHeight:"inherit",color:a=>(0,ce.themeColor)(a,"text",n.get(a)),backgroundColor:a=>(0,ce.themeColor)(a,"inherit",n.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${(0,ce.themeColor)(a,"border-strong",n.get(a))}`,borderRadius:a=>(0,ce.themeSpacing)((0,ce.themeDensity)(a)*1.5),paddingInline:a=>(0,ce.themeSpacing)((0,ce.themeDensity)(a)*3),height:a=>(0,ce.themeSpacing)(6+(0,ce.themeDensity)(a)*2),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${(0,ce.themeColor)(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,ce.themeColor)(a,"muted","neutral"),backgroundColor:a=>(0,ce.themeColor)(a,"shift-2","neutral"),outline:a=>`1px solid ${(0,ce.themeColor)(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${(0,ce.themeSpacing)(.5)} solid ${(0,ce.themeColor)(a,"shift-6","error")}`}}}}var Mo=require("@domphy/core"),j=require("@domphy/theme");function _a(r={}){var e,s;let o=(0,Mo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Mo.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"file",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag')},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>(0,j.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,j.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,j.themeColor)(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,j.themeColor)(t,"border-strong",o.get(t))}`,borderRadius:t=>(0,j.themeSpacing)((0,j.themeDensity)(t)*1.5),height:t=>(0,j.themeSpacing)(6+(0,j.themeDensity)(t)*2),paddingInline:t=>(0,j.themeSpacing)((0,j.themeDensity)(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:t=>(0,j.themeSpacing)((0,j.themeDensity)(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:(0,j.themeSpacing)(1),height:(0,j.themeSpacing)(6),paddingInline:(0,j.themeSpacing)(2),cursor:"pointer",color:t=>(0,j.themeColor)(t,"shift-11",o.get(t)),backgroundColor:t=>(0,j.themeColor)(t,"surface",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,j.themeColor)(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>(0,j.themeColor)(t,"muted","neutral"),outline:t=>`1px solid ${(0,j.themeColor)(t,"border-strong","neutral")}`,backgroundColor:t=>(0,j.themeColor)(t,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>(0,j.themeColor)(t,"muted","neutral"),backgroundColor:t=>(0,j.themeColor)(t,"shift-3","neutral")}}}}var _o=require("@domphy/core"),ae=require("@domphy/theme");function Na(r={}){var e,s;let o=(0,_o.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,_o.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"number",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag')},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,ae.themeSpacing)(10),paddingInlineStart:t=>(0,ae.themeSpacing)((0,ae.themeDensity)(t)*3),paddingInlineEnd:t=>(0,ae.themeSpacing)((0,ae.themeDensity)(t)*1.5),paddingBlock:t=>(0,ae.themeSpacing)((0,ae.themeDensity)(t)*1),borderRadius:t=>(0,ae.themeSpacing)((0,ae.themeDensity)(t)*1.5),fontSize:t=>(0,ae.themeSize)(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,ae.themeColor)(t,"border-strong",o.get(t))}`,color:t=>(0,ae.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,ae.themeColor)(t,"inherit",o.get(t)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,ae.themeColor)(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>(0,ae.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,ae.themeColor)(t,"border-strong","neutral")}`,color:t=>(0,ae.themeColor)(t,"muted","neutral")}}}}var No=require("@domphy/theme");function $a(){return{role:"group",ariaLabel:"One-time password",style:{display:"flex",alignItems:"center",gap:(0,No.themeSpacing)(2),"& > *":{minWidth:`${(0,No.themeSpacing)(9)}!important`}},_onMount:r=>{let o=r.domElement,n=()=>Array.from(o.querySelectorAll("input")),e=a=>{let i=n(),m=a.target,u=i.indexOf(m);m.value&&u<i.length-1&&i[u+1].focus()},s=a=>{let i=n(),m=a.target,u=i.indexOf(m);a.key==="Backspace"&&!m.value&&u>0&&i[u-1].focus(),a.key==="ArrowLeft"&&u>0&&i[u-1].focus(),a.key==="ArrowRight"&&u<i.length-1&&i[u+1].focus()},t=a=>{var d,f,h;a.preventDefault();let i=(f=(d=a.clipboardData)==null?void 0:d.getData("text"))!=null?f:"",m=n(),u=m.indexOf(a.target),l=u===-1?0:u;[...i].forEach((C,v)=>{let p=m[l+v];p&&(p.value=C,p.dispatchEvent(new Event("input",{bubbles:!0})),p.dispatchEvent(new Event("change",{bubbles:!0})))});let c=Math.min(l+i.length-1,m.length-1);(h=m[c])==null||h.focus()};o.addEventListener("input",e),o.addEventListener("keydown",s),o.addEventListener("paste",t),r.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",s),o.removeEventListener("paste",t)})}}}var vt=require("@domphy/core"),ge=require("@domphy/theme");var Aa='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"/><path d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"/></svg>',Ba='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.585 10.587a2 2 0 0 0 2.829 2.828"/><path d="M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"/><path d="M3 3l18 18"/></svg>',Ha=["name","value","onInput","disabled","required"];function Mn(r){if(r!=null)return typeof r=="function"?r:(0,vt.isState)(r)?o=>r.get(o):r}function Fa(r={}){var t,a;let o=(0,vt.toState)((t=r.color)!=null?t:"neutral","color"),n=(0,vt.toState)((a=r.accentColor)!=null?a:"primary","accentColor"),e=(0,vt.toState)(!1),s={};return{_onInsert:i=>{i.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onSchedule:(i,m)=>{let u=m;for(let l of Ha)u[l]!==void 0&&(s[l]=u[l],delete u[l])},_onInit:i=>{var C,v,p,b,k,g,D;let m=(C=r.name)!=null?C:s.name,u=Mn((v=r.value)!=null?v:s.value),l=(p=r.onInput)!=null?p:s.onInput,c=Mn((b=r.disabled)!=null?b:s.disabled),d=(k=r.required)!=null?k:s.required,f=z(E(E(E(E(E({input:null,type:w=>e.get(w)?"text":"password",ariaLabel:(g=r.ariaLabel)!=null?g:"Password",autocomplete:(D=r.autocomplete)!=null?D:"current-password"},m!=null?{name:m}:{}),u!=null?{value:u}:{}),l!=null?{onInput:l}:{}),c!=null?{disabled:c}:{}),d!=null?{required:d}:{}),{style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}}),h={button:w=>(0,vt.rawHtml)(e.get(w)?Ba:Aa),type:"button",ariaLabel:w=>e.get(w)?"Hide password":"Show password",onClick:()=>e.set(!e.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",display:"flex",alignItems:"center",flexShrink:0,opacity:.6}};i.children.insert(f),i.children.insert(h)},style:{display:"flex",alignItems:"center",gap:i=>(0,ge.themeSpacing)((0,ge.themeDensity)(i)*1),paddingBlock:i=>(0,ge.themeSpacing)((0,ge.themeDensity)(i)*1),paddingInline:i=>(0,ge.themeSpacing)((0,ge.themeDensity)(i)*3),borderRadius:i=>(0,ge.themeSpacing)((0,ge.themeDensity)(i)*1.5),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${(0,ge.themeColor)(i,"border-strong",o.get(i))}`,color:i=>(0,ge.themeColor)(i,"text",o.get(i)),backgroundColor:i=>(0,ge.themeColor)(i,"inherit",o.get(i)),fontSize:i=>(0,ge.themeSize)(i,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:i=>`1px solid ${(0,ge.themeColor)(i,"shift-5",n.get(i))}`},"&:focus-within":{boxShadow:i=>S(i,n.get(i))}}}}var $o=require("@domphy/core"),be=require("@domphy/theme");function Ka(r={}){var e,s;let o=(0,$o.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,$o.toState)((s=r.accentColor)!=null?s:"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=>(0,be.themeSize)(t,"inherit"),color:t=>(0,be.themeColor)(t,"text",o.get(t)),appearance:"none",display:"inline-flex",position:"relative",width:(0,be.themeSpacing)(6),height:(0,be.themeSpacing)(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 ${(0,be.themeColor)(t,"border-strong",o.get(t))}`,color:t=>(0,be.themeColor)(t,"text",o.get(t)),width:(0,be.themeSpacing)(4),height:(0,be.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,be.themeColor)(t,"hover",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,be.themeColor)(t,"shift-6",n.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>(0,be.themeColor)(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,be.themeColor)(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:"50%",boxShadow:t=>S(t,n.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,be.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var Ao=require("@domphy/core"),Te=require("@domphy/theme");function ja(r={}){var e,s;let o=(0,Ao.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Ao.toState)((s=r.accentColor)!=null?s:"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:(0,Te.themeSpacing)(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:(0,Te.themeSpacing)(1.5),borderRadius:(0,Te.themeSpacing)(999),backgroundColor:t=>(0,Te.themeColor)(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:(0,Te.themeSpacing)(4),height:(0,Te.themeSpacing)(4),borderRadius:(0,Te.themeSpacing)(999),border:"none",marginTop:`calc((${(0,Te.themeSpacing)(1.5)} - ${(0,Te.themeSpacing)(4)}) / 2)`,backgroundColor:t=>(0,Te.themeColor)(t,"shift-9",n.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>(0,Te.themeColor)(t,"shift-10",n.get(t))},borderRadius:(0,Te.themeSpacing)(2),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var Bo=require("@domphy/core"),me=require("@domphy/theme");function Wa(r={}){var e,s;let o=(0,Bo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Bo.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"search",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag')},style:{fontFamily:"inherit",fontSize:t=>(0,me.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,me.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,me.themeColor)(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,me.themeColor)(t,"border-strong",o.get(t))}`,borderRadius:t=>(0,me.themeSpacing)((0,me.themeDensity)(t)*1.5),minWidth:(0,me.themeSpacing)(32),paddingInline:t=>(0,me.themeSpacing)((0,me.themeDensity)(t)*3),paddingBlock:t=>(0,me.themeSpacing)((0,me.themeDensity)(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:t=>(0,me.themeColor)(t,"shift-7",o.get(t))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,me.themeColor)(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>(0,me.themeColor)(t,"muted","neutral"),backgroundColor:t=>(0,me.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,me.themeColor)(t,"border-strong","neutral")}`}}}}var _n=require("@domphy/core"),ue=require("@domphy/theme");function qa(r={}){var n;let o=(0,_n.toState)((n=r.accentColor)!=null?n:"primary","accentColor");return{role:"switch",dataTone:"shift-2",type:"checkbox",_onSchedule:e=>{if(e.tagName!=="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:e=>(0,ue.themeSize)(e,"inherit"),backgroundColor:e=>(0,ue.themeColor)(e,"inherit"),color:e=>(0,ue.themeColor)(e,"text"),appearance:"none",position:"relative",display:"inline-flex",width:(0,ue.themeSpacing)(9),height:(0,ue.themeSpacing)(6),cursor:"pointer",margin:"0",paddingBlock:(0,ue.themeSpacing)(1),transition:"box-shadow 140ms ease",borderRadius:(0,ue.themeSpacing)(999),"&:focus-visible":{boxShadow:e=>S(e,o.get(e))},"&:checked":{"&::before":{backgroundColor:e=>(0,ue.themeColor)(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${(0,ue.themeSpacing)(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:(0,ue.themeSpacing)(3),height:(0,ue.themeSpacing)(3),borderRadius:(0,ue.themeSpacing)(999),left:(0,ue.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>(0,ue.themeColor)(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:(0,ue.themeSpacing)(999),display:"inline-block",fontSize:e=>(0,ue.themeSize)(e,"inherit"),lineHeight:1,backgroundColor:e=>(0,ue.themeColor)(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var Ho=require("@domphy/core"),W=require("@domphy/theme");function Ya(r={}){var s,t;let{type:o="text"}=r,n=(0,Ho.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,Ho.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{type:o,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type')},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,W.themeSpacing)(10),paddingInline:a=>(0,W.themeSpacing)((0,W.themeDensity)(a)*3),paddingBlock:a=>(0,W.themeSpacing)((0,W.themeDensity)(a)*1),borderRadius:a=>(0,W.themeSpacing)((0,W.themeDensity)(a)*1.5),fontSize:a=>(0,W.themeSize)(a,"inherit"),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${(0,W.themeColor)(a,"border-strong",n.get(a))}`,color:a=>(0,W.themeColor)(a,"text",n.get(a)),backgroundColor:a=>(0,W.themeColor)(a,"inherit",n.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>(0,W.themeColor)(a,"shift-7")},"&:not(:placeholder-shown)":{color:a=>(0,W.themeColor)(a,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${(0,W.themeColor)(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:a=>(0,W.themeColor)(a,"shift-2","neutral"),outline:a=>`1px solid ${(0,W.themeColor)(a,"border-strong","neutral")}`,color:a=>(0,W.themeColor)(a,"muted","neutral")},"&:invalid:not(:placeholder-shown)":{outline:a=>`${(0,W.themeSpacing)(.5)} solid ${(0,W.themeColor)(a,"shift-6","error")}`},"&[data-status=error]":{outline:a=>`${(0,W.themeSpacing)(.5)} solid ${(0,W.themeColor)(a,"shift-6","error")}`},"&[data-status=warning]":{outline:a=>`${(0,W.themeSpacing)(.5)} solid ${(0,W.themeColor)(a,"shift-6","warning")}`}}}}var Nn=require("@domphy/core"),De=require("@domphy/theme");function Ga(r={}){var n;let o=(0,Nn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>(0,De.themeSize)(e,"inherit"),color:e=>(0,De.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,De.themeColor)(e,"inherit",o.get(e)),paddingBlock:e=>(0,De.themeSpacing)((0,De.themeDensity)(e)*(.5/1.5)),paddingInline:e=>(0,De.themeSpacing)((0,De.themeDensity)(e)*(1.5/1.5)),borderRadius:e=>(0,De.themeSpacing)((0,De.themeDensity)(e)*(1/1.5)),outline:e=>`1px solid ${(0,De.themeColor)(e,"border-strong",o.get(e))}`}}}var Fo=require("@domphy/core"),Ct=require("@domphy/theme");function Ua(r={}){var e,s;let o=(0,Fo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Fo.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:(0,Ct.themeSpacing)(2),fontSize:t=>(0,Ct.themeSize)(t,"inherit"),color:t=>(0,Ct.themeColor)(t,"text",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>(0,Ct.themeColor)(t,"shift-10",n.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>(0,Ct.themeColor)(t,"muted","neutral")}}}}var Ko=require("@domphy/core"),tt=require("@domphy/theme");function Ja(r={}){var e,s;let o=(0,Ko.toState)((e=r.color)!=null?e:"primary","color"),n=(0,Ko.toState)((s=r.accentColor)!=null?s:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},onClick:(t,a)=>{let i=a.domElement;(i!=null&&i.hasAttribute("disabled")||(i==null?void 0:i.getAttribute("aria-disabled"))==="true")&&t.preventDefault()},style:{fontSize:t=>(0,tt.themeSize)(t,"inherit"),backgroundColor:t=>(0,tt.themeColor)(t),color:t=>(0,tt.themeColor)(t,"shift-13",o.get(t)),textDecoration:"none","&:visited":{color:t=>(0,tt.themeColor)(t,"shift-13",n.get(t))},"&:hover:not([disabled])":{color:t=>(0,tt.themeColor)(t,"shift-14",o.get(t)),textDecoration:"underline"},borderRadius:(0,tt.themeSpacing)(1),outline:"none",transition:"color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:t=>(0,tt.themeColor)(t,"muted","neutral")}}}}var $n=require("@domphy/core"),I=require("@domphy/theme");var Xa={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}},Za={small:.5,medium:1,large:1.5};function Qa(r={}){var i,m,u;let o=(i=r.variant)!=null?i:"outline",n=(0,$n.toState)((m=r.color)!=null?m:o==="ghost"?"neutral":"primary","color"),e=(u=r.size)!=null?u:"medium",s=Nt[e];if(o==="ghost"){let l=Za[e];return{_onInsert:c=>{c.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:c=>(0,I.themeSize)(c,s),textDecoration:"none",paddingBlock:c=>(0,I.themeSpacing)((0,I.themeDensity)(c)*l),paddingInline:c=>(0,I.themeSpacing)((0,I.themeDensity)(c)*l),borderRadius:c=>(0,I.themeSpacing)((0,I.themeDensity)(c)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:c=>(0,I.themeSpacing)((0,I.themeDensity)(c)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:c=>(0,I.themeColor)(c,"text",n.get(c)),"&:hover:not([aria-disabled=true])":{color:c=>(0,I.themeColor)(c,"text",n.get(c)),backgroundColor:c=>(0,I.themeColor)(c,"hover",n.get(c)),textDecoration:"none"},"&:active:not([aria-disabled=true])":{color:c=>(0,I.themeColor)(c,"text",n.get(c)),backgroundColor:c=>(0,I.themeColor)(c,"increase-2",n.get(c))},"&:focus-visible":{boxShadow:c=>S(c,n.get(c))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:c=>(0,I.themeColor)(c,"border-strong","neutral")}}}}let t=o==="solid",a=Xa[e];return z(E({_onInsert:l=>{l.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')}},t?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{fontSize:l=>(0,I.themeSize)(l,s),textDecoration:"none",paddingBlock:l=>(0,I.themeSpacing)((0,I.themeDensity)(l)*a.block),paddingInline:l=>(0,I.themeSpacing)((0,I.themeDensity)(l)*a.inline),borderRadius:l=>(0,I.themeSpacing)((0,I.themeDensity)(l)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:l=>(0,I.themeSpacing)((0,I.themeDensity)(l)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:t?"none":l=>`1px solid ${(0,I.themeColor)(l,"border-strong",n.get(l))}`,color:l=>t?(0,I.themeColor)(l,"shift-0","neutral"):(0,I.themeColor)(l,"shift-13",n.get(l)),backgroundColor:l=>t?(0,I.themeColor)(l,"shift-13",n.get(l)):(0,I.themeColor)(l,"inherit",n.get(l)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([aria-disabled=true])":{textDecoration:"none",color:l=>t?(0,I.themeColor)(l,"shift-0","neutral"):(0,I.themeColor)(l,"shift-14",n.get(l)),backgroundColor:l=>t?(0,I.themeColor)(l,"shift-14",n.get(l)):(0,I.themeColor)(l,"hover",n.get(l))},"&:active:not([aria-disabled=true])":{backgroundColor:l=>t?(0,I.themeColor)(l,"shift-15",n.get(l)):(0,I.themeColor)(l,"increase-2",n.get(l))},"&:focus-visible":{boxShadow:l=>S(l,n.get(l))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:l=>(0,I.themeColor)(l,"shift-2","neutral"),outline:l=>`1px solid ${(0,I.themeColor)(l,"border-strong","neutral")}`,color:l=>(0,I.themeColor)(l,"muted","neutral")}}})}var An=require("@domphy/core"),B=require("@domphy/theme");function ei(r={}){var n;let o=(n=r.color)!=null?n:"neutral";return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",backgroundColor:e=>(0,B.themeColor)(e,"inherit",o),color:e=>(0,B.themeColor)(e,"text",o)}}}function ti(r={}){let{dense:o=!1}=r;return{style:{display:"flex",alignItems:"center",gap:n=>(0,B.themeSpacing)((0,B.themeDensity)(n)*2),paddingBlock:n=>(0,B.themeSpacing)(o?1:(0,B.themeDensity)(n)*2),paddingInline:n=>(0,B.themeSpacing)((0,B.themeDensity)(n)*3),fontSize:n=>(0,B.themeSize)(n,"inherit"),color:n=>(0,B.themeColor)(n,"text")}}}function oi(r={}){var s,t;let o=(0,An.toState)((s=r.color)!=null?s:"neutral","color"),n=(t=r.accentColor)!=null?t:"primary",{dense:e=!1}=r;return{style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>(0,B.themeSpacing)((0,B.themeDensity)(a)*2),paddingBlock:a=>(0,B.themeSpacing)(e?1:(0,B.themeDensity)(a)*2),paddingInline:a=>(0,B.themeSpacing)((0,B.themeDensity)(a)*3),fontSize:a=>(0,B.themeSize)(a,"inherit"),color:a=>(0,B.themeColor)(a,"text",o.get(a)),borderRadius:a=>(0,B.themeSpacing)((0,B.themeDensity)(a)*1.5),transition:"background-color 150ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:a=>(0,B.themeColor)(a,"hover",o.get(a))},"&:active:not([disabled])":{backgroundColor:a=>(0,B.themeColor)(a,"increase-2",o.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>(0,B.themeColor)(a,"shift-3",n),color:a=>(0,B.themeColor)(a,"shift-12",n)},"&:focus-visible":{boxShadow:a=>S(a,n)},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var Bn=require("@domphy/core"),Ve=require("@domphy/theme");function ni(r={}){var n;let o=(0,Bn.toState)((n=r.accentColor)!=null?n:"highlight","accentColor");return{_onInsert:e=>{e.tagName!=="mark"&&console.warn('"mark" primitive patch must use mark tag')},dataTone:"shift-2",style:{display:"inline-flex",alignItems:"center",fontSize:e=>(0,Ve.themeSize)(e,"inherit"),color:e=>(0,Ve.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,Ve.themeColor)(e,"inherit",o.get(e)),height:e=>(0,Ve.themeSpacing)((0,Ve.themeDensity)(e)*(6/1.5)),borderRadius:e=>(0,Ve.themeSpacing)((0,Ve.themeDensity)(e)*(1/1.5)),paddingInline:e=>(0,Ve.themeSpacing)((0,Ve.themeDensity)(e)*(1.5/1.5))}}}var mo=require("@domphy/core"),G=require("@domphy/theme");function ri(r={items:[]}){var l;let{items:o=[],selectable:n=!0,color:e="neutral",accentColor:s="primary"}=r,t=(0,mo.toState)((l=r.activeKey)!=null?l:null),a=r.activeKey!==void 0,i=(c,d)=>{let f=c.nodeId;return d.items.map((h,C)=>{var p;let v=(p=h.key)!=null?p:C;return z(E({button:typeof h.label=="string"?[{span:h.label}]:[h.label],_key:v,type:"button",id:`menuitem${f}${v}`,role:"menuitem"},d.selectable?{ariaCurrent:b=>d.activeKey.get(b)===v||void 0}:{}),{onClick:()=>{var b;d.selectable&&d.activeKey.set(v),(b=h.onClick)==null||b.call(h)},onKeyDown:b=>{var q;let k=b.key;if(k==="Enter"||k===" "){b.preventDefault(),b.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(k))return;b.preventDefault();let g=d.items.map((ve,Ie)=>{var Z;return(Z=ve.key)!=null?Z:Ie}),D=g.indexOf(v),w=D;k==="ArrowDown"?w=(D+1)%g.length:k==="ArrowUp"?w=(D-1+g.length)%g.length:k==="Home"?w=0:k==="End"&&(w=g.length-1),(q=document.getElementById(`menuitem${f}${g[w]}`))==null||q.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:(0,G.themeSpacing)(2),width:"100%",fontSize:b=>(0,G.themeSize)(b,"inherit"),height:b=>(0,G.themeSpacing)(6+(0,G.themeDensity)(b)*2),paddingInline:b=>(0,G.themeSpacing)((0,G.themeDensity)(b)*3),border:"none",outline:"none",color:b=>(0,G.themeColor)(b,"text",d.color),backgroundColor:b=>(0,G.themeColor)(b,"inherit",d.color),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:b=>(0,G.themeColor)(b,"hover",d.color)},"&[aria-current=true]":{backgroundColor:b=>(0,G.themeColor)(b,"shift-3",d.accentColor),color:b=>(0,G.themeColor)(b,"shift-13",d.accentColor)},"&:focus-visible":{boxShadow:b=>S(b,d.accentColor)}}})})},m=(c,d)=>{let f=d;return{update(h){h.activeKey!==f.activeKey&&!h.activeKeyIsCallerOwned&&h.activeKey.set(f.activeKey.get()),f=h,f.items.length!==0&&c.children.update(i(c,f))}}},u={items:o,activeKey:t,activeKeyIsCallerOwned:a,selectable:n,color:e,accentColor:s};return z(E({role:"menu",dataTone:"shift-0",_onSchedule:(c,d)=>{o.length!==0&&(d[c.tagName]=i(c,u))}},(0,mo.behavior)("menu",m,u)),{style:{display:"flex",flexDirection:"column",paddingBlock:c=>(0,G.themeSpacing)((0,G.themeDensity)(c)*2),paddingInline:c=>(0,G.themeSpacing)((0,G.themeDensity)(c)*2),fontSize:c=>(0,G.themeSize)(c,"inherit"),backgroundColor:c=>(0,G.themeColor)(c,"inherit",e),color:c=>(0,G.themeColor)(c,"text",e),borderRadius:c=>(0,G.themeSpacing)((0,G.themeDensity)(c)*2),outline:c=>`1px solid ${(0,G.themeColor)(c,"border-strong",e)}`,outlineOffset:"-1px",boxShadow:_("medium")}})}var Fn=require("@domphy/core");var Hn=r=>!!r&&typeof r.get=="function"&&r._isState===!0,ot=r=>{let o={},n=[];for(let e in r){let s=r[e];e==="x"?n.push(`translateX(${typeof s=="number"?`${s}px`:s})`):e==="y"?n.push(`translateY(${typeof s=="number"?`${s}px`:s})`):e==="scale"?n.push(`scale(${s})`):e==="rotate"?n.push(`rotate(${typeof s=="number"?`${s}deg`:s})`):o[e]=s}return n.length&&(o.transform=n.join(" ")),o};function jo(r={}){var o,n,e,s;return{duration:(o=r.duration)!=null?o:300,delay:(n=r.delay)!=null?n:0,easing:(e=r.easing)!=null?e:"ease",iterations:(s=r.iterations)!=null?s:1,fill:"both"}}function Wo(){if(typeof matchMedia!="function")return!1;try{return matchMedia("(prefers-reduced-motion: reduce)").matches}catch(r){return!1}}function ai(r,o){let n=r.domElement,e=o,s,t=i=>{s==null||s(),s=void 0,!(!n||!Hn(i))&&(s=i.addListener(m=>{Wo()?Object.assign(n.style,ot(m)):typeof n.animate=="function"&&n.animate([ot(m)],jo(e.transition))}))},a=(i,m)=>{if(!n)return;let u=Hn(i.animate)?i.animate.get():i.animate;if(Wo()){u?Object.assign(n.style,ot(u)):m==="enter"&&i.initial&&Object.assign(n.style,ot(i.initial));return}if(typeof n.animate=="function")if(u){let l=m==="enter"&&i.initial?[ot(i.initial),ot(u)]:[ot(u)];n.animate(l,jo(i.transition))}else m==="enter"&&i.initial&&Object.assign(n.style,ot(i.initial))};return a(o,"enter"),t(o.animate),{play:a,getExit:()=>e.exit,getTransition:()=>e.transition,update(i){e=i,a(i,"update"),t(i.animate)},destroy(){s==null||s()}}}function ii(r={}){return z(E({},(0,Fn.behavior)("motion",(o,n)=>ai(o,n),r)),{_onBeforeRemove:(o,n)=>{var a,i;let e=o.domElement,s=o.getBehavior("motion"),t=(a=s==null?void 0:s.getExit())!=null?a:r.exit;if(!e||!t||typeof e.animate!="function")return n();if(Wo())return Object.assign(e.style,ot(t)),n();e.animate([ot(t)],jo((i=s==null?void 0:s.getTransition())!=null?i:r.transition)).finished.then(n,n)}})}var Kn=require("@domphy/core"),Pt=require("@domphy/theme");function li(r={}){var n;let o=(0,Kn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>(0,Pt.themeSize)(e,"inherit"),backgroundColor:e=>(0,Pt.themeColor)(e),color:e=>(0,Pt.themeColor)(e,"text",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,Pt.themeSpacing)(3),listStyleType:"decimal",listStylePosition:"outside"}}}var It=require("@domphy/core"),te=require("@domphy/theme");function si(r,o){if(o<=7)return Array.from({length:o},(t,a)=>a+1);let n=[1];r>3&&n.push("...");let e=Math.max(2,r-1),s=Math.min(o-1,r+1);for(let t=e;t<=s;t++)n.push(t);return r<o-2&&n.push("..."),n.push(o),n}function ci(r,o,n,e){if((0,It.isState)(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=(0,It.toState)(n!=null?n:e),r.setMetadata(o,s)),s}function jn(r,o){let n=r.getMetadata("paginationTotal");return n||(n=(0,It.toState)(o),r.setMetadata("paginationTotal",n)),n}function mi(r){let{total:o,color:n="neutral",accentColor:e="primary"}=r,s={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:a=>(0,te.themeSpacing)(6+(0,te.themeDensity)(a)*2),height:a=>(0,te.themeSpacing)(6+(0,te.themeDensity)(a)*2),paddingInline:a=>(0,te.themeSpacing)((0,te.themeDensity)(a)*2),borderRadius:a=>(0,te.themeSpacing)((0,te.themeDensity)(a)*1.5),border:"none",cursor:"pointer",fontSize:a=>(0,te.themeSize)(a,"inherit"),backgroundColor:"transparent",color:a=>(0,te.themeColor)(a,"shift-13",n),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled])":{color:a=>(0,te.themeColor)(a,"shift-13",n),backgroundColor:a=>(0,te.themeColor)(a,"hover",n)},"&:focus-visible":{boxShadow:a=>S(a,e)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},t=z(E({},s),{backgroundColor:a=>(0,te.themeColor)(a,"shift-13",e),color:a=>(0,te.themeColor)(a,"shift-0","neutral"),fontWeight:"bold",cursor:"default","&:hover:not([disabled])":{backgroundColor:a=>(0,te.themeColor)(a,"shift-13",e)}});return z(E({role:"navigation",ariaLabel:"Pagination",_doctorDisable:"inline-typography",_onInsert:a=>{a.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:a=>{let i=ci(a,"paginationPage",r.value,1),m=jn(a,o),u={div:l=>{let c=i.get(l),d=m.get(l),f=[];f.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:c<=1,onClick:()=>c>1&&i.set(c-1),style:s});let h=0;for(let C of si(c,d))if(C==="...")f.push({span:"\u2026",_key:`ellipsis-${h++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:v=>(0,te.themeSpacing)((0,te.themeDensity)(v)*2),color:v=>(0,te.themeColor)(v,"shift-7",n)}});else{let v=C===c;f.push({button:String(C),_key:`page-${C}`,type:"button",ariaLabel:`Page ${C}`,ariaCurrent:v?"page":void 0,disabled:v,onClick:()=>i.set(C),style:v?t:s})}return f.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:c>=d,onClick:()=>c<d&&i.set(c+1),style:s}),f},style:{display:"flex",alignItems:"center",gap:(0,te.themeSpacing)(1)}};a.children.insert(u)}},(0,It.behavior)("pagination-total",a=>({update(i){jn(a,i.total).set(i.total)}}),{total:o})),{style:{display:"inline-flex"}})}var Wn=require("@domphy/core"),Ft=require("@domphy/theme");function ui(r={}){var s;let{padding:o=4,divider:n=!1}=r,e=(0,Wn.toState)((s=r.color)!=null?s:"neutral","color");return{style:E({padding:t=>(0,Ft.themeSpacing)((0,Ft.themeDensity)(t)*o)},n?{borderBottom:t=>`1px solid ${(0,Ft.themeColor)(t,"border",e.get(t))}`}:{})}}var qn=require("@domphy/core"),uo=require("@domphy/theme");function di(r={}){var n;let o=(0,qn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>(0,uo.themeSize)(e,"inherit"),color:e=>(0,uo.themeColor)(e,"text",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}var Xt=require("@domphy/core"),xt=require("@domphy/theme");function pi(r){var c;let{open:o=!1,placement:n="bottom",openOn:e="click"}=r,s=(0,Xt.toState)(o),t=(0,Xt.toState)(n),{show:a,hide:i,anchorPartial:m}=Qe({kind:"popover",open:s,onDismiss:r.onDismiss,placement:t,content:r.content,keepOpenOnContentHover:e==="hover"}),u={role:"dialog",dataTone:"shift-14",style:{backgroundColor:d=>(0,xt.themeColor)(d,"inherit"),color:d=>(0,xt.themeColor)(d,"text"),borderRadius:d=>(0,xt.themeSpacing)((0,xt.themeDensity)(d)*2),outline:d=>`1px solid ${(0,xt.themeColor)(d,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}};return(c=r.content).$||(c.$=[]),r.content.$.push(u),(0,Xt.merge)(m,{ariaHaspopup:"dialog",ariaExpanded:d=>s.get(d),ariaControls:d=>d!=null&&d.elementNode?Re("popover",d.elementNode):void 0,onMouseEnter:(d,f)=>e==="hover"&&a(f),onMouseLeave:(d,f)=>e==="hover"&&i(f),onClick:(d,f)=>{e==="click"&&(s.get()?i(f):a(f))},onKeyDown:(d,f)=>{d.key==="Escape"&&s.get()&&i(f)},onFocus:(d,f)=>e==="hover"&&a(f),onBlur:(d,f)=>{if(e!=="hover")return;let h=d.relatedTarget,v=f.getRoot().domElement.querySelector(`#${Re("popover",f)}`);h&&(v!=null&&v.contains(h))||i(f)}}),m}var Yn=require("@domphy/core"),je=require("@domphy/theme");function qo(r={}){let{placement:o="bottom-end",color:n="neutral",sideOffset:e=(0,je.themeSpacing)(6),bordered:s=!0}=r,t=(0,Yn.toState)(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"},i=l=>{var c;return(c=a[t.get(l)])!=null?c:a["bottom-end"]},m=l=>l.includes("start")?e:l.includes("end")?"auto":"50%",u=l=>l.includes("end")?e:l.includes("start")?"auto":"50%";return{style:{fontSize:l=>(0,je.themeSize)(l),backgroundColor:l=>(0,je.themeColor)(l),color:l=>(0,je.themeColor)(l,"text",n),position:"relative","&::after":{content:'""',position:"absolute",width:(0,je.themeSpacing)(1.5),height:(0,je.themeSpacing)(1.5),backgroundColor:l=>(0,je.themeColor)(l,"inherit",n),borderWidth:s?"1px":0,borderColor:l=>(0,je.themeColor)(l,"border-strong",n),borderTopStyle:l=>{let c=i(l);return c.includes("top")||c.includes("right")?"solid":"none"},borderBottomStyle:l=>{let c=i(l);return c.includes("bottom")||c.includes("left")?"solid":"none"},borderLeftStyle:l=>{let c=i(l);return c.includes("top")||c.includes("left")?"solid":"none"},borderRightStyle:l=>{let c=i(l);return c.includes("bottom")||c.includes("right")?"solid":"none"},top:l=>{let c=i(l);return c.includes("top")?0:c.includes("bottom")?"auto":m(c)},right:l=>{let c=i(l);return c.includes("right")?0:c.includes("left")?"auto":u(c)},bottom:l=>{let c=i(l);return c.includes("bottom")?0:c.includes("top")?"auto":u(c)},left:l=>{let c=i(l);return c.includes("left")?0:c.includes("right")?"auto":m(c)},transform:l=>{let c=i(l),d=c.includes("right")||c.includes("end")&&!c.includes("left")?"50%":"-50%",f=c.includes("bottom")||c.includes("end")&&!c.includes("top")?"50%":"-50%";return`translate(${d},${f}) rotate(45deg)`}}}}}var Gn=require("@domphy/core"),Me=require("@domphy/theme");function hi(r={}){var n;let o=(0,Gn.toState)((n=r.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>(0,Me.themeSize)(e,"inherit"),color:e=>(0,Me.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,Me.themeColor)(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>(0,Me.themeSpacing)((0,Me.themeDensity)(e)*2),paddingInline:e=>(0,Me.themeSpacing)((0,Me.themeDensity)(e)*3),borderRadius:e=>(0,Me.themeSpacing)((0,Me.themeDensity)(e)*2)}}}var Yo=require("@domphy/core"),nt=require("@domphy/theme");function fi(r={}){var e,s;let o=(0,Yo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Yo.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},dataTone:"shift-3",style:{appearance:"none",width:"100%",height:(0,nt.themeSpacing)(2),border:0,borderRadius:(0,nt.themeSpacing)(999),overflow:"hidden",backgroundColor:t=>(0,nt.themeColor)(t,"inherit",o.get(t)),color:t=>(0,nt.themeColor)(t,"text",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>(0,nt.themeColor)(t,"inherit",o.get(t)),borderRadius:(0,nt.themeSpacing)(999)},"&::-webkit-progress-value":{backgroundColor:t=>(0,nt.themeColor)(t,"shift-9",n.get(t)),borderRadius:(0,nt.themeSpacing)(999),transition:"width 220ms ease"}}}}var pt=require("@domphy/core"),Ot=require("@domphy/theme");var gi='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>',yi='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/></svg>';function Un(r,o){var n,e,s;r.onChange=o.onChange,r.readOnly=(n=o.readOnly)!=null?n:!1,r.max=(e=o.max)!=null?e:5,r.color=(s=o.color)!=null?s:"warning",(0,pt.isState)(o.value)?o.value!==r.valueState&&r.valueState.set(o.value.get()):o.value!==void 0&&r.valueState.set(o.value)}function bi(r,o,n,e){let s=a=>{let i=e.get(a);return i>0?i:n.valueState.get(a)},t={button:a=>(0,pt.rawHtml)(o<=s(a)?gi:yi),_key:o,type:"button",ariaLabel:`${o} star${o>1?"s":""}`,onClick:()=>{var i;if(n.readOnly)return;let a=o===n.valueState.get()?0:o;n.valueState.set(a),(i=n.onChange)==null||i.call(n,a),e.set(0)},onMouseEnter:()=>{n.readOnly||e.set(o)},onMouseLeave:()=>e.set(0),onKeyDown:a=>{var l,c,d;if(n.readOnly)return;let i=n.valueState.get(),m=i;if(a.key==="ArrowRight"||a.key==="ArrowUp")m=Math.min(n.max,i+1),a.preventDefault();else if(a.key==="ArrowLeft"||a.key==="ArrowDown")m=Math.max(0,i-1),a.preventDefault();else return;n.valueState.set(m),(l=n.onChange)==null||l.call(n,m);let u=m>0?m-1:0;(d=(c=r.domElement)==null?void 0:c.children[u])==null||d.focus()},style:{background:"none",border:"none",outline:"none",borderRadius:(0,Ot.themeSpacing)(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:a=>S(a,n.color)}}};r.children.insert(t)}function Go(r,o,n){let e=r.children.items;for(;e.length>o.max;)r.children.remove(e[e.length-1]);for(let s=e.length+1;s<=o.max;s++)bi(r,s,o,n)}function Si(r={}){var e,s,t,a,i,m,u;let o={valueState:(0,pt.toState)((e=r.value)!=null?e:0),onChange:r.onChange,readOnly:(s=r.readOnly)!=null?s:!1,max:(t=r.max)!=null?t:5,color:(a=r.color)!=null?a:"warning"},n=(0,pt.toState)(0);return z(E({role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:(0,Ot.themeSpacing)(.5),fontSize:l=>(0,Ot.themeSize)(l,"increase-1"),cursor:o.readOnly?"default":"pointer",color:l=>(0,Ot.themeColor)(l,"muted",o.color)}},(0,pt.behavior)("rating",(l,c)=>(Un(o,c),Go(l,o,n),{update(d){Un(o,d),Go(l,o,n)}}),{value:r.value,max:(i=r.max)!=null?i:5,onChange:r.onChange,readOnly:(m=r.readOnly)!=null?m:!1,color:(u=r.color)!=null?u:"warning"})),{_onInit:l=>{Go(l,o,n)}})}var po=require("@domphy/core"),Lt=require("@domphy/theme");function vi(r={}){var m,u,l;let{size:o=16,thickness:n=.25}=r,e=(0,po.toState)((m=r.value)!=null?m:0,"value"),s=(0,po.toState)((u=r.color)!=null?u:"primary","color"),t=(0,po.toState)((l=r.trackColor)!=null?l:"neutral","trackColor"),a=Math.round((1-n)*100),i=`radial-gradient(circle closest-side, transparent ${a}%, black ${a}%)`;return{role:"progressbar",ariaValuenow:c=>String(Math.round(e.get(c))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:c=>{c.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:(0,Lt.themeSpacing)(o),height:(0,Lt.themeSpacing)(o),borderRadius:"50%",color:c=>(0,Lt.themeColor)(c,"shift-9",s.get(c)),background:c=>`conic-gradient(from -90deg, ${(0,Lt.themeColor)(c,"shift-9",s.get(c))} ${e.get(c)}%, ${(0,Lt.themeColor)(c,"shift-3",t.get(c))} 0%)`,WebkitMask:i,mask:i}}}var Zt=require("@domphy/theme");function Uo(r={}){let{gap:o=4,align:n="center",justify:e,wrap:s=!1,density:t=!0}=r;return{style:E(E({display:"flex",alignItems:n,gap:t?a=>(0,Zt.themeSpacing)((0,Zt.themeDensity)(a)*o):()=>(0,Zt.themeSpacing)(o)},e?{justifyContent:e}:{}),s?{flexWrap:"wrap"}:{})}}var Jn=require("@domphy/core"),rt=require("@domphy/theme");function Ci(r={}){var n;let o=(0,Jn.toState)((n=r.color)!=null?n:"neutral","color");return{style:{overflow:"auto",color:e=>(0,rt.themeColor)(e,"text",o.get(e)),"&::-webkit-scrollbar":{width:(0,rt.themeSpacing)(2),height:(0,rt.themeSpacing)(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>(0,rt.themeColor)(e,"shift-5",o.get(e)),borderRadius:(0,rt.themeSpacing)(999),border:`${(0,rt.themeSpacing)(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e=>(0,rt.themeColor)(e,"shift-7",o.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${(0,rt.themeColor)(e,"shift-5",o.get(e))} transparent`}}}var zt=require("@domphy/core"),he=require("@domphy/theme");function Xn(r,o,n,e){if((0,zt.isState)(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=(0,zt.toState)(n!=null?n:e),r.setMetadata(o,s)),s}function xi(r,o,n,e){var u;let s=r.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(s))return;r.preventDefault();let t=o.map((l,c)=>{var d;return(d=l.key)!=null?d:String(c)}),a=t.indexOf(n),i=a;s==="ArrowRight"?i=(a+1)%t.length:s==="ArrowLeft"?i=(a-1+t.length)%t.length:s==="Home"?i=0:s==="End"&&(i=t.length-1),e.set(t[i]);let m=r.target.closest("[role=radiogroup]");(u=m==null?void 0:m.querySelectorAll("[role=radio]")[i])==null||u.focus()}function Zn(r,o,n,e){return r.map((s,t)=>{var m;let a=(m=s.key)!=null?m:String(t);return{button:[typeof s.label=="string"?{span:s.label}:s.label],_key:a,type:"button",role:"radio",ariaChecked:u=>o.get(u)===a,tabIndex:u=>{var c,d;let l=o.get(u);return l===a||l===""&&a===((d=(c=r[0])==null?void 0:c.key)!=null?d:"")?0:-1},onClick:()=>o.set(a),onKeyDown:u=>xi(u,r,a,o),style:{cursor:"pointer",fontSize:u=>(0,he.themeSize)(u,"inherit"),height:(0,he.themeSpacing)(6),paddingBlock:(0,he.themeSpacing)(1),paddingInline:(0,he.themeSpacing)(3),border:"none",borderRadius:(0,he.themeSpacing)(10),color:u=>(0,he.themeColor)(u,"text",n),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>(0,he.themeColor)(u,"shift-3",n)},"&:active:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>(0,he.themeColor)(u,"increase-2",n)},"&[aria-checked=true]":{backgroundColor:u=>(0,he.themeColor)(u,"shift-0",e),color:u=>(0,he.themeColor)(u,"shift-10",e),boxShadow:_("low")},"&:focus-visible":{boxShadow:u=>S(u,e)},"&[aria-checked=true]:focus-visible":{boxShadow:u=>`${_("low")}, ${S(u,e)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function Ei(r={items:[]}){var t,a,i;let{items:o=[],color:n="neutral",accentColor:e="primary"}=r,s={items:o,color:n,accentColor:e};return z(E({role:"radiogroup",_context:{segmented:{value:(0,zt.toState)((i=(a=r.value)!=null?a:(t=o[0])==null?void 0:t.key)!=null?i:"")}},_onSchedule:(m,u)=>{var c,d;let l=Xn(m,"segmentedValue",r.value,(d=(c=o[0])==null?void 0:c.key)!=null?d:"");u[m.tagName]=Zn(o,l,n,e)}},(0,zt.behavior)("segmented-items",m=>({update(u){var c,d;let l=Xn(m,"segmentedValue",r.value,(d=(c=u.items[0])==null?void 0:c.key)!=null?d:"");m.children.update(Zn(u.items,l,u.color,u.accentColor),!!m.domElement,!0)}}),s)),{dataTone:"shift-2",style:{display:"inline-flex",paddingBlock:(0,he.themeSpacing)(1),paddingInline:(0,he.themeSpacing)(1),gap:(0,he.themeSpacing)(.5),borderRadius:(0,he.themeSpacing)(10),backgroundColor:m=>(0,he.themeColor)(m,"inherit",n),color:m=>(0,he.themeColor)(m,"text",n)}})}var A=require("@domphy/theme");function ki(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{_onInsert:e=>{e.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:e=>(0,A.themeSize)(e,"inherit"),lineHeight:"inherit",color:e=>(0,A.themeColor)(e,"text",o),backgroundColor:e=>(0,A.themeColor)(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${(0,A.themeColor)(e,"border-strong",o)}`,borderRadius:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*1.5),paddingBlock:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*1),paddingLeft:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*3),paddingRight:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*5),backgroundImage:e=>{let s=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${(0,A.themeColorToken)(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(s)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${(0,A.themeSpacing)(2)} center`,backgroundSize:`${(0,A.themeSpacing)(2.5)} ${(0,A.themeSpacing)(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:e=>(0,A.themeSpacing)(6+(0,A.themeDensity)(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`1px solid ${(0,A.themeColor)(e,"shift-5",n)}`},"&:focus-visible":{boxShadow:e=>S(e,n)},"& optgroup":{color:e=>(0,A.themeColor)(e,"shift-11",o)},"& option[disabled]":{color:e=>(0,A.themeColor)(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>(0,A.themeColor)(e,"muted","neutral"),outline:e=>`1px solid ${(0,A.themeColor)(e,"border-strong","neutral")}`,backgroundColor:e=>(0,A.themeColor)(e,"shift-2","neutral")}}}}var ht=require("@domphy/core"),ie=require("@domphy/theme");var wi=1e3;function Ti(r){let o=r.getMetadata("selectBoxTypeahead");return o||(o={buffer:"",timer:null},r.setMetadata("selectBoxTypeahead",o)),o}var Qn=(r,o)=>r.trim().toLowerCase().startsWith(o);function Di(r){return r?Array.from(r.querySelectorAll("[role=option]")).filter(o=>o.getAttribute("aria-disabled")!=="true"&&!o.hasAttribute("disabled")):[]}function Pi(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:s=!1,multiple:t=!1}=r,a=(0,ht.toState)(r.value),i=(0,ht.toState)(s),{show:m,hide:u,anchorPartial:l}=Qe({kind:"selectBox",open:i,onDismiss:r.onDismiss,placement:(0,ht.toState)(n),content:r.content}),c={onClick:(p,b)=>!t&&u(b),dataTone:"shift-14",style:{backgroundColor:p=>(0,ie.themeColor)(p,"inherit"),color:p=>(0,ie.themeColor)(p,"text"),borderRadius:p=>(0,ie.themeSpacing)((0,ie.themeDensity)(p)*2),outline:p=>`1px solid ${(0,ie.themeColor)(p,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}};(0,ht.merge)(r.content,c);let d=p=>({div:b=>{let k=p.state.get(b),g=Array.isArray(k)?k:[k];return p.options.filter(w=>g.includes(w.value)).map(w=>({span:w.label,$:[Yt({color:p.color,removable:p.multiple})],_key:w.value,_onRemove:q=>{let ve=p.state.get(),Z=(Array.isArray(ve)?ve:[ve]).filter(He=>He!==w.value);p.multiple?p.state.set(Z):p.state.set(Z[0])}}))},_key:"selectBoxWrap",style:{display:"flex",flexWrap:"wrap",gap:(0,ie.themeSpacing)(1),flex:1}}),f=(p,b)=>({update(k){p.children.update([d(k)])}}),h=p=>i.get()?u(p):m(p),C=(p,b)=>{var Ie,Z,He,re;let k=Ti(b);k.timer&&clearTimeout(k.timer),k.buffer+=p.toLowerCase(),k.timer=setTimeout(()=>{k.buffer=""},wi);let g=k.buffer.length>1&&new Set(k.buffer).size===1,D=g?k.buffer[0]:k.buffer;if(i.get()){let Ee=b.getRoot().domElement,Ge=(Ie=Ee==null?void 0:Ee.querySelector(`#${Re("selectBox",b)}`))!=null?Ie:null,Oe=Di(Ge).filter(kt=>{var it;return Qn((it=kt.textContent)!=null?it:"",D)});if(!Oe.length)return;let Et=(He=(Z=b.domElement)==null?void 0:Z.ownerDocument)==null?void 0:He.activeElement,at=g&&Et?Oe.indexOf(Et):-1,Ue=Oe[(at+1)%Oe.length];Ue.focus(),(re=Ue.scrollIntoView)==null||re.call(Ue,{block:"nearest"});return}if(t)return;let w=o.filter(Ee=>Qn(Ee.label,D));if(!w.length)return;let q=g?w.findIndex(Ee=>Ee.value===a.get()):-1,ve=w[(q+1)%w.length];a.set(ve.value)},v=z(E({_onInsert:p=>{p.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onSchedule:(p,b)=>{b[p.tagName]=[d({options:o,multiple:t,color:e,state:a})]}},(0,ht.behavior)("selectBoxInner",f,{options:o,multiple:t,color:e,state:a})),{onClick:(p,b)=>h(b),tabindex:0,role:"button",ariaExpanded:p=>i.get(p),ariaHaspopup:"listbox",ariaControls:p=>p!=null&&p.elementNode?Re("selectBox",p.elementNode):void 0,onKeyDown:(p,b)=>{let k=p.key;if(k==="Escape"){u(b);return}if(k==="Enter"||k===" "){p.preventDefault(),h(b);return}if(k==="ArrowDown"&&!i.get()){p.preventDefault(),m(b);return}let g=p;k.length===1&&!g.ctrlKey&&!g.metaKey&&!g.altKey&&C(k,b)},style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:p=>(0,ie.themeSpacing)(6+(0,ie.themeDensity)(p)*2),minWidth:(0,ie.themeSpacing)(32),outlineOffset:"-1px",outline:p=>`1px solid ${(0,ie.themeColor)(p,"border-strong","neutral")}`,paddingInline:p=>(0,ie.themeSpacing)((0,ie.themeDensity)(p)*2),borderRadius:p=>(0,ie.themeSpacing)((0,ie.themeDensity)(p)*1.5),fontSize:p=>(0,ie.themeSize)(p,"inherit"),color:p=>(0,ie.themeColor)(p,"text",e),backgroundColor:p=>(0,ie.themeColor)(p,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:p=>S(p,e)}}});return(0,ht.merge)(l,v),l}var Pe=require("@domphy/theme");function Ii(r={}){let{accentColor:o="primary",color:n="neutral",value:e=null}=r;return{role:"option",tabindex:-1,ariaSelected:t=>{var m;let a=(m=t==null?void 0:t.elementNode)==null?void 0:m.getContext("select");if(!a)return;let i=a.value.get(t);return a.multiple?i.includes(e):i===e},onClick:(t,a)=>{let i=a.getContext("select");if(!i)return;let m=i.value,u=m.get();i.multiple?u.includes(e)?m.set(u.filter(l=>l!==e)):m.set(u.concat([e])):u!==e&&m.set(e)},_onInit:t=>{t.tagName!=="div"&&console.warn('"selectItem" patch must use div tag')},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>(0,Pe.themeSize)(t,"inherit"),height:t=>(0,Pe.themeSpacing)(6+(0,Pe.themeDensity)(t)*2),paddingInline:t=>(0,Pe.themeSpacing)((0,Pe.themeDensity)(t)*3),border:"none",outline:"none",color:t=>(0,Pe.themeColor)(t,"text",n),backgroundColor:t=>(0,Pe.themeColor)(t,"inherit",n),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>(0,Pe.themeColor)(t,"hover",n)},"&[aria-selected=true]":{backgroundColor:t=>(0,Pe.themeColor)(t,"shift-6",o),color:t=>(0,Pe.themeColor)(t,"shift-11")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,o)}}}}var er=require("@domphy/core"),We=require("@domphy/theme");function Oi(r={}){var a;let{color:o="neutral",multiple:n=!1}=r,e=(0,er.toState)((a=r.value)!=null?a:n?[]:null),s={div:i=>{let m=e.get(i);return(Array.isArray(m)?m:[m]).map(l=>({input:null,type:"hidden",name:r.name,value:l==null?"":String(l)}))},ariaHidden:"true",hidden:!0};return{dataTone:"shift-0",role:"listbox",ariaLabel:"Options",ariaMultiselectable:n?"true":void 0,_context:{select:{value:e,multiple:n}},_onInit:i=>{i.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),i.children.insert(s)},style:{display:"flex",flexDirection:"column",paddingBlock:i=>(0,We.themeSpacing)((0,We.themeDensity)(i)*2),paddingInline:i=>(0,We.themeSpacing)((0,We.themeDensity)(i)*2),fontSize:i=>(0,We.themeSize)(i,"inherit"),backgroundColor:i=>(0,We.themeColor)(i,"inherit",o),color:i=>(0,We.themeColor)(i,"text",o)}}}var ho=require("@domphy/core"),qe=require("@domphy/theme");function Li(r={}){var s;let o=(0,ho.toState)((s=r.color)!=null?s:"neutral","color"),n={"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},e=(0,ho.hashString)(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-1",style:{fontSize:t=>(0,qe.themeSize)(t),color:t=>(0,qe.themeColor)(t,"text",o.get(t)),height:(0,qe.themeSpacing)(6),display:"block",borderRadius:(0,qe.themeSpacing)(1),backgroundColor:t=>(0,qe.themeColor)(t,"inherit",o.get(t)),backgroundImage:t=>`linear-gradient(90deg, ${(0,qe.themeColor)(t,"inherit",o.get(t))} 0%, ${(0,qe.themeColor)(t,"shift-2",o.get(t))} 50%, ${(0,qe.themeColor)(t,"inherit",o.get(t))} 100%)`,backgroundSize:"200% 100%",animation:`${e} 1.6s ease-in-out infinite`,[`@keyframes ${e}`]:n}}}var tr=require("@domphy/core"),fo=require("@domphy/theme");function zi(r={}){var n;let o=(0,tr.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:e=>(0,fo.themeSize)(e,"inherit"),color:e=>(0,fo.themeColor)(e,"shift-10",o.get(e))}}}var go=require("@domphy/core"),Ye=require("@domphy/theme"),nr={to:{transform:"rotate(360deg)"}},or=(0,go.hashString)(JSON.stringify(nr));function Ri(r={}){var n;let o=(0,go.toState)((n=r.color)!=null?n:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:e=>{e.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:e=>(0,Ye.themeSize)(e),backgroundColor:e=>(0,Ye.themeColor)(e),color:e=>(0,Ye.themeColor)(e,"text",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:(0,Ye.themeSpacing)(6),height:(0,Ye.themeSpacing)(6),borderRadius:"50%",border:e=>`${(0,Ye.themeSpacing)(.5)} solid ${(0,Ye.themeColor)(e,"border-strong",o.get(e))}`,borderTopColor:e=>(0,Ye.themeColor)(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${or} 0.7s linear infinite`,[`@keyframes ${or}`]:nr}}}var Kt=require("@domphy/core"),ft=require("@domphy/theme");function Vi(r={}){let{direction:o="horizontal",defaultSize:n=50,min:e=10,max:s=90}=r;return{_onSchedule:(t,a)=>{(0,Kt.merge)(a,{_context:{splitter:{direction:o,size:(0,Kt.toState)(n),min:e,max:s,panelCount:0}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function Mi(r){let o=r.parent;if(!o)return!0;for(let n of o.children.items)if(n instanceof Kt.ElementNode&&n.getMetadata("splitterPanel"))return n===r;return!0}function _i(){return{_metadata:{splitterPanel:!0},_onMount:r=>{let o=r.getContext("splitter");if(!o){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let n=r.domElement,e=o.direction==="horizontal"?"width":"height",s=a=>{n.style[e]=`${Mi(r)?a:100-a}%`};s(o.size.get()),n.style.flexShrink="0",n.style.overflow="auto";let t=o.size.addListener(s);r.addHook("Remove",()=>{var a;o.panelCount=Math.max(0,((a=o.panelCount)!=null?a:1)-1),t()})}}}function Ni(){return{role:"separator",tabindex:0,_onMount:r=>{let o=r.getContext("splitter");if(!o){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let n=r.domElement,e=o.direction==="horizontal";n.style.cursor=e?"col-resize":"row-resize",n.setAttribute("aria-orientation",e?"vertical":"horizontal"),n.setAttribute("aria-valuemin",String(o.min)),n.setAttribute("aria-valuemax",String(o.max)),n.setAttribute("aria-valuenow",String(Math.round(o.size.get())));let s=o.size.addListener(m=>{n.setAttribute("aria-valuenow",String(Math.round(m)))}),t=m=>{let u=m.shiftKey?10:1,l=null;e?m.key==="ArrowRight"?l=Math.min(o.size.get()+u,o.max):m.key==="ArrowLeft"&&(l=Math.max(o.size.get()-u,o.min)):m.key==="ArrowDown"?l=Math.min(o.size.get()+u,o.max):m.key==="ArrowUp"&&(l=Math.max(o.size.get()-u,o.min)),m.key==="Home"?l=o.min:m.key==="End"&&(l=o.max),l!==null&&(m.preventDefault(),o.size.set(l))},a=null,i=m=>{m.preventDefault();let u=n.parentElement,l=d=>{let f=u.getBoundingClientRect(),h=e?(d.clientX-f.left)/f.width*100:(d.clientY-f.top)/f.height*100;o.size.set(Math.min(Math.max(h,o.min),o.max))},c=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c),a=null};a=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c),a=null},document.addEventListener("mousemove",l),document.addEventListener("mouseup",c)};n.addEventListener("keydown",t),n.addEventListener("mousedown",i),r.addHook("Remove",()=>{a==null||a(),s(),n.removeEventListener("keydown",t),n.removeEventListener("mousedown",i)})},dataTone:"shift-2",style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:r=>(0,ft.themeColor)(r,"inherit"),color:r=>(0,ft.themeColor)(r,"text"),"&:hover":{backgroundColor:r=>(0,ft.themeColor)(r,"increase-1")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:r=>S(r,"primary")},"&::after":{content:'""',width:(0,ft.themeSpacing)(1),height:(0,ft.themeSpacing)(1),borderRadius:(0,ft.themeSpacing)(999),backgroundColor:r=>(0,ft.themeColor)(r,"shift-4")}}}}var Qt=require("@domphy/theme");function $i(r={}){let{gap:o=3,align:n,justify:e,density:s=!0}=r;return{style:E(E({display:"flex",flexDirection:"column",gap:s?t=>(0,Qt.themeSpacing)((0,Qt.themeDensity)(t)*o):()=>(0,Qt.themeSpacing)(o)},n?{alignItems:n}:{}),e?{justifyContent:e}:{})}}var Rt=require("@domphy/core"),R=require("@domphy/theme");function rr(r,o,n,e){if((0,Rt.isState)(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=(0,Rt.toState)(n!=null?n:e),r.setMetadata(o,s)),s}function Ai(r,o,n){return r==="vertical"?{"&:not(:last-child)::after":{content:'""',position:"absolute",left:(0,R.themeSpacing)(3),top:(0,R.themeSpacing)(6),bottom:`-${(0,R.themeSpacing)(2)}`,width:"2px",height:"auto",right:"auto",backgroundColor:e=>(0,R.themeColor)(e,"shift-3",o),zIndex:"0"},"&[data-status=done]:not(:last-child)::after":{backgroundColor:e=>(0,R.themeColor)(e,"shift-9",n)}}:{"&:not(:first-child)::after":{content:'""',position:"absolute",top:(0,R.themeSpacing)(3),right:`calc(50% + ${(0,R.themeSpacing)(3)})`,left:`calc(-50% + ${(0,R.themeSpacing)(3)})`,height:"2px",backgroundColor:e=>(0,R.themeColor)(e,"shift-3",o),zIndex:"0"},"&[data-status=done]:not(:first-child)::after":{backgroundColor:e=>(0,R.themeColor)(e,"shift-9",n)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:e=>(0,R.themeColor)(e,"shift-9",n)}}}function ar(r,o,n,e,s){let t=n==="vertical",a=Ai(n,e,s);return r.map((i,m)=>{var l;return{li:[typeof i.label=="string"?{span:i.label}:i.label],_key:(l=i.key)!=null?l:m,dataStep:String(m+1),dataStatus:c=>{let d=o.get(c);return m<d?"done":m===d?"active":"pending"},ariaCurrent:c=>o.get(c)===m?"step":void 0,style:z(E({position:"relative",display:"flex",flexDirection:t?"row":"column",alignItems:t?"flex-start":"center",gap:(0,R.themeSpacing)(1),flex:t?"none":"1",fontSize:c=>(0,R.themeSize)(c,"decrease-1"),textAlign:t?"left":"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:(0,R.themeSpacing)(6),height:(0,R.themeSpacing)(6),borderRadius:(0,R.themeSpacing)(999),fontSize:c=>(0,R.themeSize)(c,"decrease-1"),fontWeight:"bold",flexShrink:"0",border:c=>`2px solid ${(0,R.themeColor)(c,"border-strong",e)}`,backgroundColor:c=>(0,R.themeColor)(c,"inherit"),color:c=>(0,R.themeColor)(c,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"}},a),{"&[data-status=active]::before":{backgroundColor:c=>(0,R.themeColor)(c,"shift-9",s),borderColor:c=>(0,R.themeColor)(c,"shift-9",s),color:c=>(0,R.themeColor)(c,"shift-0",s),boxShadow:c=>`0 0 0 3px ${(0,R.themeColor)(c,"shift-3",s)}`},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:c=>(0,R.themeColor)(c,"shift-9",s),borderColor:c=>(0,R.themeColor)(c,"shift-9",s),color:c=>(0,R.themeColor)(c,"shift-0",s)},"&[data-status=pending]":{color:c=>(0,R.themeColor)(c,"muted")},"&[data-status=active]":{color:c=>(0,R.themeColor)(c,"shift-11",s),fontWeight:"bold"},"&[data-status=done]":{color:c=>(0,R.themeColor)(c,"text",e)}})}})}function Bi(r={items:[]}){var a;let{items:o=[],direction:n="horizontal",color:e="neutral",accentColor:s="primary"}=r,t={items:o,direction:n,color:e,accentColor:s};return z(E({_doctorDisable:"inline-typography",_context:{steps:{current:(0,Rt.toState)((a=r.current)!=null?a:0),direction:n,color:e,accentColor:s}},_onSchedule:(i,m)=>{let u=rr(i,"stepsCurrent",r.current,0);m[i.tagName]=ar(o,u,n,e,s)}},(0,Rt.behavior)("steps-items",i=>({update(m){let u=rr(i,"stepsCurrent",r.current,0);i.children.update(ar(m.items,u,m.direction,m.color,m.accentColor),!!i.domElement,!0)}}),t)),{style:{display:"flex",flexDirection:n==="vertical"?"column":"row",alignItems:n==="vertical"?"flex-start":"center",gap:(0,R.themeSpacing)(2),listStyle:"none",margin:"0",padding:"0"}})}var ir=require("@domphy/core"),eo=require("@domphy/theme");function Hi(r={}){var n;let o=(0,ir.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>(0,eo.themeSize)(e,"inherit"),fontWeight:"bold",color:e=>(0,eo.themeColor)(e,"shift-11",o.get(e)),backgroundColor:e=>(0,eo.themeColor)(e)}}}var lr=require("@domphy/core"),yo=require("@domphy/theme");function Fi(r={}){var n;let o=(0,lr.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>(0,yo.themeSize)(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>(0,yo.themeColor)(e,"text",o.get(e))}}}var sr=require("@domphy/core"),bo=require("@domphy/theme");function Ki(r={}){var n;let o=(0,sr.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>(0,bo.themeSize)(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>(0,bo.themeColor)(e,"text",o.get(e))}}}var cr=require("@domphy/core"),H=require("@domphy/theme");function ji(r={}){var n;let o=(0,cr.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},_doctorDisable:"inline-typography",style:{fontSize:e=>(0,H.themeSize)(e,"inherit"),color:e=>(0,H.themeColor)(e,"text",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*3),paddingBlock:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*1),color:e=>(0,H.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,H.themeColor)(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*3),paddingBlock:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*1),color:e=>(0,H.themeColor)(e,"text",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${(0,H.themeColor)(e,"shift-3",o.get(e))}`,fontSize:e=>(0,H.themeSize)(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*3),paddingBlock:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*1),color:e=>(0,H.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,H.themeColor)(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${(0,H.themeColor)(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>(0,H.themeColor)(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>(0,H.themeColor)(e,"hover")}}}}var jt=require("@domphy/core"),U=require("@domphy/theme");function mr(r,o,n,e){if((0,jt.isState)(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=(0,jt.toState)(n!=null?n:e),r.setMetadata(o,s)),s}function ur(r,o,n,e,s){let t=r.nodeId,i={div:o.map((u,l)=>{var f;let c=(f=u.key)!=null?f:l;return{button:[typeof u.label=="string"?{span:u.label}:u.label],_key:c,type:"button",role:"tab",id:`tab${t}${c}`,ariaControls:`panel${t}${c}`,ariaSelected:h=>n.get(h)===c,tabIndex:h=>n.get(h)===c?0:-1,onClick:()=>n.set(c),onKeyDown:h=>{var g;let C=h.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(C))return;h.preventDefault();let v=o.map((D,w)=>{var q;return(q=D.key)!=null?q:w}),p=v.indexOf(c),b=p;C==="ArrowRight"?b=(p+1)%v.length:C==="ArrowLeft"?b=(p-1+v.length)%v.length:C==="Home"?b=0:C==="End"&&(b=v.length-1),n.set(v[b]);let k=h.target.closest("[role=tablist]");(g=k==null?void 0:k.querySelectorAll("[role=tab]")[b])==null||g.focus()},style:{cursor:"pointer",fontSize:h=>(0,U.themeSize)(h,"inherit"),height:h=>(0,U.themeSpacing)(6+(0,U.themeDensity)(h)*2),paddingInline:h=>(0,U.themeSpacing)((0,U.themeDensity)(h)*4),border:"none",outline:"none",color:h=>(0,U.themeColor)(h,"shift-13"),backgroundColor:h=>(0,U.themeColor)(h,"inherit"),boxShadow:h=>`inset 0 ${(0,U.themeSpacing)(-.5)} 0 0 ${(0,U.themeColor)(h,"shift-1",s)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-selected=true])":{color:h=>(0,U.themeColor)(h,"shift-13"),boxShadow:h=>`inset 0 ${(0,U.themeSpacing)(-.5)} 0 0 ${(0,U.themeColor)(h,"shift-2",s)}`},"&[aria-selected=true]:not([disabled])":{color:h=>(0,U.themeColor)(h,"shift-13",e),boxShadow:h=>`inset 0 ${(0,U.themeSpacing)(-.5)} 0 0 ${(0,U.themeColor)(h,"shift-8",e)}`},"&:focus-visible":{boxShadow:h=>S(h,e)},"&[aria-selected=true]:focus-visible":{boxShadow:h=>`${S(h,e)}, inset 0 ${(0,U.themeSpacing)(-.5)} 0 0 ${(0,U.themeColor)(h,"shift-6",e)}`}}}}),_key:"tablist",role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},m=o.map((u,l)=>{var d;let c=(d=u.key)!=null?d:l;return{div:[u.content],_key:c,role:"tabpanel",id:`panel${t}${c}`,ariaLabelledby:`tab${t}${c}`,hidden:f=>n.get(f)!==c,style:{paddingBlock:f=>(0,U.themeSpacing)((0,U.themeDensity)(f)*2),paddingInline:f=>(0,U.themeSpacing)((0,U.themeDensity)(f)*2)}}});return[i,...m]}function Wi(r={items:[]}){let{items:o=[],accentColor:n="primary",color:e="neutral"}=r;return E({_onSchedule:(t,a)=>{var m,u;let i=mr(t,"tabsActiveKey",r.activeKey,(u=(m=o[0])==null?void 0:m.key)!=null?u:0);a[t.tagName]=ur(t,o,i,n,e)}},(0,jt.behavior)("tabs-items",t=>({update(a){var m,u;let i=mr(t,"tabsActiveKey",r.activeKey,(u=(m=a.items[0])==null?void 0:m.key)!=null?u:0);t.children.update(ur(t,a.items,i,a.accentColor,a.color),!!t.domElement,!0)}}),{items:o,accentColor:n,color:e}))}var to=require("@domphy/core"),le=require("@domphy/theme");function qi(r={}){var s,t;let o=(0,to.toState)((s=r.color)!=null?s:"neutral","color"),n=(0,to.toState)((t=r.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=r;return z(E({_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')}},(0,to.behavior)("textarea-auto-resize",(a,i)=>{let m=a.domElement,u=i.autoResize,l=!1,c,d,f=()=>{!u||l||(l=!0,d==null||d.unobserve(m),m.style.overflow="hidden",m.style.height="auto",m.style.height=`${m.scrollHeight}px`,l=!1,u&&(d==null||d.observe(m)))},h=()=>{typeof IntersectionObserver!="undefined"&&(c||(c=new IntersectionObserver(v=>{v.some(p=>p.isIntersecting)&&f()})),c.observe(m)),typeof ResizeObserver!="undefined"&&(d||(d=new ResizeObserver(()=>{l||f()})),d.observe(m))},C=()=>{c==null||c.unobserve(m),d==null||d.unobserve(m)};return m.addEventListener("input",f),a.attributes.addListener("value",f),u&&(h(),f()),{resize:f,update(v){u=v.autoResize,a.attributes.addListener("value",f),u?(h(),f()):C()},destroy(){m.removeEventListener("input",f),c==null||c.disconnect(),d==null||d.disconnect()}}},{autoResize:e})),{_onUpdate:a=>{var i;(i=a.getBehavior("textarea-auto-resize"))==null||i.resize()},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>(0,le.themeSpacing)((0,le.themeDensity)(a)*2),paddingBlock:a=>(0,le.themeSpacing)((0,le.themeDensity)(a)*1.5),border:"none",borderRadius:a=>(0,le.themeSpacing)((0,le.themeDensity)(a)*1.5),fontSize:a=>(0,le.themeSize)(a,"inherit"),color:a=>(0,le.themeColor)(a,"text",o.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${(0,le.themeColor)(a,"border-strong",o.get(a))}`,backgroundColor:a=>(0,le.themeColor)(a,"inherit",o.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>(0,le.themeColor)(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${(0,le.themeColor)(a,"shift-5",n.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,n.get(a))},"&:invalid":{outline:a=>`${(0,le.themeSpacing)(.5)} solid ${(0,le.themeColor)(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,le.themeColor)(a,"muted","neutral"),outline:a=>`1px solid ${(0,le.themeColor)(a,"border-strong","neutral")}`,backgroundColor:a=>(0,le.themeColor)(a,"shift-2","neutral")}}})}var dr=require("@domphy/core"),Be=require("@domphy/theme");function Yi(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Gi(r={}){var t,a,i;let{last:o=!1}=r,n=(t=r.color)!=null?t:"neutral",e=(a=r.accentColor)!=null?a:"primary",s=(0,dr.toState)((i=r.active)!=null?i:!1);return{style:E({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:m=>(0,Be.themeSpacing)((0,Be.themeDensity)(m)*2),paddingBottom:m=>o?"0":(0,Be.themeSpacing)((0,Be.themeDensity)(m)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:(0,Be.themeSpacing)(1),transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:m=>(0,Be.themeColor)(m,"shift-8",s.get(m)?e:n),opacity:m=>s.get(m)?"1":"0.4"}},o?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:m=>(0,Be.themeSpacing)((0,Be.themeDensity)(m)*-4),width:"2px",backgroundColor:m=>(0,Be.themeColor)(m,"shift-3",n)}})}}var hr=require("@domphy/core"),Se=require("@domphy/theme");function Jo(r){let o=r.getMetadata("toastOpen");return o||(o=(0,hr.toState)(!1),r.setMetadata("toastOpen",o)),o}var pr=r=>{let o=r==null?void 0:r.elementNode;return o?Jo(o).get(r):!1};function Ui(r={}){let{position:o="top-center",color:n="neutral"}=r,e=o.startsWith("top"),s=o.endsWith("center"),t=o.endsWith("right"),a={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:e?"column":"column-reverse",alignItems:s?"center":t?"end":"start",inset:0,gap:(0,Se.themeSpacing)(4),zIndex:30,padding:(0,Se.themeSpacing)(6),pointerEvents:"none"}};return{_portal:i=>{let m=i.domElement.querySelector(`#domphy-toast-${o}`);return m||(m=i.children.insert(a).domElement),m},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:(0,Se.themeSpacing)(32),pointerEvents:"auto",paddingBlock:i=>(0,Se.themeSpacing)((0,Se.themeDensity)(i)*2),paddingInline:i=>(0,Se.themeSpacing)((0,Se.themeDensity)(i)*4),borderRadius:i=>(0,Se.themeSpacing)((0,Se.themeDensity)(i)*2),fontSize:i=>(0,Se.themeSize)(i,"inherit"),color:i=>(0,Se.themeColor)(i,"text",n),backgroundColor:i=>(0,Se.themeColor)(i,"inherit",n),boxShadow:_("medium"),opacity:i=>Number(pr(i)),transform:i=>pr(i)?"translateY(0)":e?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:i=>requestAnimationFrame(()=>Jo(i).set(!0)),_onBeforeRemove:(i,m)=>{var p,b;let u=!1,l=null,c=!1,d=i.getRoot(),f=(b=(p=i.domElement)==null?void 0:p.parentElement)!=null?b:null,h=()=>{var g;if(c||!f||f.id!==`domphy-toast-${o}`||f.childElementCount>0)return;c=!0;let k=(g=d.children)==null?void 0:g.items.find(D=>D.domElement===f);k?d.children.remove(k):f.remove()},C=()=>{u||(u=!0,l&&(clearTimeout(l),l=null),i.domElement.removeEventListener("transitionend",v),m(),h())},v=k=>{k.propertyName==="transform"&&C()};i.domElement.addEventListener("transitionend",v),l=setTimeout(C,350),i.addHook("Remove",()=>{var k;l&&(clearTimeout(l),l=null),(k=i.domElement)==null||k.removeEventListener("transitionend",v),h()}),Jo(i).set(!1)}}}var Vt=require("@domphy/core"),oe=require("@domphy/theme");function fr(r,o,n,e){if((0,Vt.isState)(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=(0,Vt.toState)(n!=null?n:e),r.setMetadata(o,s)),s}function Ji(r,o){return Array.isArray(r)?r.includes(o):r===o}function Xi(r,o,n,e,s){var l;let t=r.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(t))return;r.preventDefault();let a=o.map((c,d)=>{var f;return(f=c.key)!=null?f:String(d)}),i=a.indexOf(n),m=i;t==="ArrowRight"?m=(i+1)%a.length:t==="ArrowLeft"?m=(i-1+a.length)%a.length:t==="Home"?m=0:t==="End"&&(m=a.length-1),s||e.set(a[m]);let u=r.target.closest("[role=group]");(l=u==null?void 0:u.querySelectorAll("button")[m])==null||l.focus()}function gr(r,o,n,e,s){return r.map((t,a)=>{var u;let i=(u=t.key)!=null?u:String(a);return{button:[typeof t.label=="string"?{span:t.label}:t.label],_key:i,type:"button",role:"button",ariaPressed:l=>Ji(o.get(l),i),tabIndex:l=>{var d,f,h,C,v;let c=o.get(l);if(n){let b=(h=(f=(Array.isArray(c)?c:[])[0])!=null?f:(d=r[0])==null?void 0:d.key)!=null?h:"0";return i===b?0:-1}return c===i||c===""&&i===((v=(C=r[0])==null?void 0:C.key)!=null?v:"0")?0:-1},onClick:()=>{let l=o.get();if(n){let c=Array.isArray(l)?[...l]:[];o.set(c.includes(i)?c.filter(d=>d!==i):[...c,i])}else o.set(l===i?"":i)},onKeyDown:l=>Xi(l,r,i,o,n),style:{cursor:"pointer",fontSize:l=>(0,oe.themeSize)(l,"inherit"),height:(0,oe.themeSpacing)(6),paddingBlock:(0,oe.themeSpacing)(1),paddingInline:(0,oe.themeSpacing)(2),border:"none",borderRadius:(0,oe.themeSpacing)(1.5),color:l=>(0,oe.themeColor)(l,"shift-13",e),backgroundColor:l=>(0,oe.themeColor)(l,"inherit",e),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-pressed=true])":{color:l=>(0,oe.themeColor)(l,"shift-13",e),backgroundColor:l=>(0,oe.themeColor)(l,"hover",e)},"&:active:not([disabled])":{backgroundColor:l=>(0,oe.themeColor)(l,"increase-2",e)},"&[aria-pressed=true]":{backgroundColor:l=>(0,oe.themeColor)(l,"shift-3",s),color:l=>(0,oe.themeColor)(l,"shift-13",s)},"&:focus-visible":{boxShadow:l=>S(l,s)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function Zi(r={items:[]}){var a;let{items:o=[],multiple:n=!1,color:e="neutral",accentColor:s="primary"}=r,t={items:o,multiple:n,color:e,accentColor:s};return z(E({role:"group",_context:{toggleGroup:{value:(0,Vt.toState)((a=r.value)!=null?a:n?[]:""),multiple:n}},_onSchedule:(i,m)=>{let u=fr(i,"toggleGroupValue",r.value,n?[]:"");m[i.tagName]=gr(o,u,n,e,s)}},(0,Vt.behavior)("toggle-items",i=>({update(m){let u=fr(i,"toggleGroupValue",r.value,m.multiple?[]:"");i.children.update(gr(m.items,u,m.multiple,m.color,m.accentColor),!!i.domElement,!0)}}),t)),{style:{display:"flex",paddingBlock:(0,oe.themeSpacing)(1),paddingInline:(0,oe.themeSpacing)(1),gap:(0,oe.themeSpacing)(1),borderRadius:(0,oe.themeSpacing)(2),fontSize:i=>(0,oe.themeSize)(i,"inherit"),backgroundColor:i=>(0,oe.themeColor)(i,"inherit",e),color:i=>(0,oe.themeColor)(i,"text",e),outline:i=>`1px solid ${(0,oe.themeColor)(i,"border",e)}`,outlineOffset:"-1px"}})}function Qi(r={}){return Uo(r)}function el(){return{div:null,style:{flex:"1 1 0"}}}var oo=require("@domphy/core"),_e=require("@domphy/theme");function tl(r={}){let{open:o=!1,placement:n="top",content:e="Tooltip Content"}=r,s=(0,oo.toState)(n),t=(0,oo.toState)(e),a={span:d=>t.get(d)},{show:i,hide:m,anchorPartial:u}=Qe({kind:"tooltip",open:o,onDismiss:r.onDismiss,placement:s,content:a}),l={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:d=>(0,_e.themeSpacing)((0,_e.themeDensity)(d)*1),paddingInline:d=>(0,_e.themeSpacing)((0,_e.themeDensity)(d)*3),borderRadius:d=>(0,_e.themeSpacing)((0,_e.themeDensity)(d)*1.5),color:d=>(0,_e.themeColor)(d,"text"),backgroundColor:d=>(0,_e.themeColor)(d),fontSize:d=>(0,_e.themeSize)(d,"inherit"),boxShadow:_("low")},$:[qo({placement:s,bordered:!1})]};return a.$||(a.$=[]),a.$.push(l),(0,oo.merge)(u,{ariaDescribedby:d=>d!=null&&d.elementNode?Re("tooltip",d.elementNode):void 0,onMouseEnter:(d,f)=>i(f),onMouseLeave:(d,f)=>m(f),onFocus:(d,f)=>i(f),onBlur:(d,f)=>m(f),onKeyDown:(d,f)=>d.key==="Escape"&&m(f)}),u}var Xo=require("@domphy/core");function yr(r,o){return r.key!==void 0&&r.key!==null?String(r.key):`index-${o}`}function ol(r={}){let{duration:o=300,delay:n=0}=r,e=new Map,s=new Map,t=new Set,a=new Set;return{_onMount:i=>{i.addHook("Remove",()=>{for(let m of Array.from(s.values()))m();s.clear();for(let m of t)clearTimeout(m);t.clear();for(let m of a)cancelAnimationFrame(m);a.clear()})},_onBeforeUpdate:i=>{e=new Map,i.children.items.forEach((m,u)=>{if(!(m instanceof Xo.ElementNode))return;let l=m.domElement;l&&e.set(yr(m,u),l.getBoundingClientRect())})},_onUpdate:i=>{i.children.items.forEach((m,u)=>{var D;if(!(m instanceof Xo.ElementNode))return;let l=m.domElement;if(!l)return;let c=yr(m,u),d=e.get(c);if(!d)return;let f=l.getBoundingClientRect(),h=d.left-f.left,C=d.top-f.top;if(Math.abs(h)<.5&&Math.abs(C)<.5)return;(D=s.get(l))==null||D(),l.style.transition="none",l.style.transform=`translate(${h}px, ${C}px)`,l.getBoundingClientRect();let v=requestAnimationFrame(()=>{a.delete(v),l.style.transition=`transform ${o}ms ease ${n}ms`,l.style.transform="translate(0px, 0px)"});a.add(v);let p=!1,b=null,k=()=>{p||(p=!0,b&&(t.delete(b),b=null),s.delete(l),l.removeEventListener("transitionend",g),l.style.transition="",l.style.transform="")},g=w=>{w.propertyName==="transform"&&k()};s.set(l,()=>{p=!0,b&&(clearTimeout(b),t.delete(b),b=null),s.delete(l),l.removeEventListener("transitionend",g)}),l.addEventListener("transitionend",g),b=setTimeout(k,o+n+34),t.add(b)}),e.clear()}}}var br=require("@domphy/core"),Mt=require("@domphy/theme");function nl(r={}){var n;let o=(0,br.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>(0,Mt.themeSize)(e,"inherit"),backgroundColor:e=>(0,Mt.themeColor)(e),color:e=>(0,Mt.themeColor)(e,"text",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,Mt.themeSpacing)(3),listStyleType:"disc",listStylePosition:"outside"}}}function rl(){return{style:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}}}0&&(module.exports={abbreviation,accordion,alert,avatar,badge,blockquote,breadcrumb,breadcrumbEllipsis,button,buttonGhost,buttonSwitch,card,code,combobox,command,commandItem,commandSearch,datePicker,descriptionList,details,dialog,divider,drawer,elevation,emphasis,empty,errorBoundary,fab,figure,focusRing,formGroup,grid,heading,horizontalRule,icon,image,inputCheckbox,inputColor,inputDateTime,inputFile,inputNumber,inputOTP,inputPassword,inputRadio,inputRange,inputSearch,inputSwitch,inputText,keyboard,label,link,linkButton,list,listItem,listItemButton,mark,menu,motion,orderedList,pagination,panelSection,paragraph,popover,popoverArrow,preformated,progress,rating,ringProgress,row,scrollArea,segmented,select,selectBox,selectItem,selectList,skeleton,small,spinner,splitter,splitterHandle,splitterPanel,stack,steps,strong,subscript,superscript,table,tabs,tag,textarea,timeline,timelineItem,toast,toggleGroup,toolbar,toolbarSpacer,tooltip,transitionGroup,unorderedList,visuallyHidden});
|
|
1
|
+
"use strict";var no=Object.defineProperty,Pr=Object.defineProperties,Ir=Object.getOwnPropertyDescriptor,Or=Object.getOwnPropertyDescriptors,Lr=Object.getOwnPropertyNames,on=Object.getOwnPropertySymbols;var rn=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable;var nn=(r,o,n)=>o in r?no(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,E=(r,o)=>{for(var n in o||(o={}))rn.call(o,n)&&nn(r,n,o[n]);if(on)for(var n of on(o))zr.call(o,n)&&nn(r,n,o[n]);return r},z=(r,o)=>Pr(r,Or(o));var Rr=(r,o)=>{for(var n in o)no(r,n,{get:o[n],enumerable:!0})},Vr=(r,o,n,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of Lr(o))!rn.call(r,s)&&s!==n&&no(r,s,{get:()=>o[s],enumerable:!(e=Ir(o,s))||e.enumerable});return r};var Mr=r=>Vr(no({},"__esModule",{value:!0}),r);var il={};Rr(il,{abbreviation:()=>_r,accordion:()=>Nr,alert:()=>$r,avatar:()=>Ar,badge:()=>Br,blockquote:()=>Hr,breadcrumb:()=>Fr,breadcrumbEllipsis:()=>Kr,button:()=>qr,buttonGhost:()=>wo,buttonSwitch:()=>Yr,card:()=>Ur,code:()=>Jr,combobox:()=>na,command:()=>ra,commandItem:()=>ia,commandSearch:()=>aa,datePicker:()=>ca,descriptionList:()=>da,details:()=>pa,dialog:()=>fa,divider:()=>ga,drawer:()=>ba,elevation:()=>_,emphasis:()=>Sa,empty:()=>va,errorBoundary:()=>xa,fab:()=>ka,figure:()=>wa,focusRing:()=>S,formGroup:()=>Ta,grid:()=>Da,heading:()=>Ia,horizontalRule:()=>Oa,icon:()=>La,image:()=>za,inputCheckbox:()=>Ra,inputColor:()=>Va,inputDateTime:()=>Ma,inputFile:()=>_a,inputNumber:()=>Na,inputOTP:()=>$a,inputPassword:()=>Fa,inputRadio:()=>Ka,inputRange:()=>ja,inputSearch:()=>Wa,inputSwitch:()=>qa,inputText:()=>Ya,keyboard:()=>Ga,label:()=>Ua,link:()=>Ja,linkButton:()=>Qa,list:()=>ei,listItem:()=>ti,listItemButton:()=>oi,mark:()=>ni,menu:()=>ri,motion:()=>ii,orderedList:()=>li,pagination:()=>mi,panelSection:()=>ui,paragraph:()=>di,popover:()=>hi,popoverArrow:()=>qo,preformated:()=>fi,progress:()=>gi,rating:()=>vi,ringProgress:()=>Ci,row:()=>Uo,scrollArea:()=>xi,segmented:()=>ki,select:()=>wi,selectBox:()=>Ii,selectItem:()=>Oi,selectList:()=>Li,skeleton:()=>zi,small:()=>Ri,spinner:()=>Vi,splitter:()=>Mi,splitterHandle:()=>$i,splitterPanel:()=>Ni,stack:()=>Ai,steps:()=>Hi,strong:()=>Fi,subscript:()=>Ki,superscript:()=>ji,table:()=>Wi,tabs:()=>qi,tag:()=>Yt,textarea:()=>Yi,timeline:()=>Gi,timelineItem:()=>Ui,toast:()=>Ji,toggleGroup:()=>Qi,toolbar:()=>el,toolbarSpacer:()=>tl,tooltip:()=>ol,transitionGroup:()=>nl,unorderedList:()=>rl,visuallyHidden:()=>al});module.exports=Mr(il);var Co=require("@domphy/core"),Xe=require("@domphy/theme");function _r(r={}){var e,s;let o=(0,Co.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Co.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>(0,Xe.themeSize)(t),backgroundColor:t=>(0,Xe.themeColor)(t),color:t=>(0,Xe.themeColor)(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>(0,Xe.themeColor)(t,"shift-7",o.get(t)),textUnderlineOffset:(0,Xe.themeSpacing)(.72),cursor:"help","&:hover":{color:t=>(0,Xe.themeColor)(t,"shift-11",n.get(t)),textDecorationColor:t=>(0,Xe.themeColor)(t,"shift-9",n.get(t))}}}}var Eo=require("@domphy/core"),gt=require("@domphy/theme");var xo=require("@domphy/theme");function S(r,o="primary"){let n=(0,xo.themeColor)(r,"surface"),e=(0,xo.themeColor)(r,"shift-9",o);return`0 0 0 2px ${n}, 0 0 0 4px ${e}`}function Nr(r={}){var s,t;let{type:o="single"}=r,n=(0,Eo.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,Eo.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{_onMount:a=>{if(o!=="single")return;let i=a.domElement;if(!i)return;let m=u=>{let l=u.target.closest("summary");if(!l)return;let c=l.closest("details");!c||c.parentElement!==i||c.open||Array.from(i.querySelectorAll(":scope > details")).forEach(d=>{d!==c&&(d.open=!1)})};i.addEventListener("click",m),a.addHook("Remove",()=>i.removeEventListener("click",m))},style:{display:"flex",flexDirection:"column",borderRadius:a=>(0,gt.themeSpacing)((0,gt.themeDensity)(a)*1.5),outline:a=>`1px solid ${(0,gt.themeColor)(a,"border-strong",n.get(a))}`,outlineOffset:"-1px",color:a=>(0,gt.themeColor)(a,"text",n.get(a)),overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${(0,gt.themeColor)(a,"border-strong",n.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{boxShadow:a=>S(a,e.get(a))}}}}var an=require("@domphy/core"),ye=require("@domphy/theme");function $r(r={}){var n;let o=(0,an.toState)((n=r.color)!=null?n:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:(0,ye.themeSpacing)(3),paddingBlock:e=>(0,ye.themeSpacing)((0,ye.themeDensity)(e)*2),paddingInline:e=>(0,ye.themeSpacing)((0,ye.themeDensity)(e)*4),borderRadius:e=>(0,ye.themeSpacing)((0,ye.themeDensity)(e)*1.5),boxShadow:e=>`inset ${(0,ye.themeSpacing)(1)} 0 0 0 ${(0,ye.themeColor)(e,"shift-8",o.get(e))}`,backgroundColor:e=>(0,ye.themeColor)(e,"inherit",o.get(e)),color:e=>(0,ye.themeColor)(e,"shift-10",o.get(e)),fontSize:e=>(0,ye.themeSize)(e,"inherit")}}}var ln=require("@domphy/core"),lt=require("@domphy/theme");function Ar(r={}){var n;let o=(0,ln.toState)((n=r.color)!=null?n:"primary","color");return{dataTone:"shift-2",_doctorDisable:"inline-typography",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:(0,lt.themeSpacing)(9),height:(0,lt.themeSpacing)(9),fontSize:e=>(0,lt.themeSize)(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>(0,lt.themeColor)(e,"inherit",o.get(e)),color:e=>(0,lt.themeColor)(e,"shift-11",o.get(e)),boxShadow:e=>`0 0 0 1px ${(0,lt.themeColor)(e,"border",o.get(e))}`,"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}var ko=require("@domphy/core"),Ce=require("@domphy/theme");function Br(r={}){var s;let{label:o=999}=r,n=(0,ko.toState)(o),e=(0,ko.toState)((s=r.color)!=null?s:"danger","color");return{_doctorDisable:"inline-typography",style:{position:"relative","&::after":{content:t=>`"${n.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:t=>(0,Ce.themeSpacing)((0,Ce.themeDensity)(t)*(1.5/1.5)),minWidth:(0,Ce.themeSpacing)(5),height:t=>(0,Ce.themeSpacing)((0,Ce.themeDensity)(t)*(5/1.5)),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>(0,Ce.themeSize)(t,"decrease-2"),fontWeight:"600",lineHeight:1,borderRadius:t=>(0,Ce.themeSpacing)((0,Ce.themeDensity)(t)*999),backgroundColor:t=>(0,Ce.themeColor)(t,"shift-9",e.get(t)),color:t=>(0,Ce.themeColor)(t,"shift-0",e.get(t)),boxShadow:t=>`0 0 0 1px ${(0,Ce.themeColor)(t,"shift-0",e.get(t))}`}}}}var sn=require("@domphy/core"),Le=require("@domphy/theme");function Hr(r={}){var n;let o=(0,sn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>(0,Le.themeSize)(e,"inherit"),backgroundColor:e=>(0,Le.themeColor)(e,"inherit",o.get(e)),color:e=>(0,Le.themeColor)(e,"text",o.get(e)),boxShadow:e=>`inset ${(0,Le.themeSpacing)(1)} 0 0 0 ${(0,Le.themeColor)(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>(0,Le.themeSpacing)((0,Le.themeDensity)(e)*2),paddingInline:e=>(0,Le.themeSpacing)((0,Le.themeDensity)(e)*4),margin:0}}}var cn=require("@domphy/core"),Fe=require("@domphy/theme");function Fr(r={}){var e;let{separator:o="/"}=r,n=(0,cn.toState)((e=r.color)!=null?e:"neutral","color");return{_onInsert:s=>{s.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:s=>(0,Fe.themeSize)(s,"inherit"),gap:(0,Fe.themeSpacing)(1),color:s=>(0,Fe.themeColor)(s,"text",n.get(s)),backgroundColor:s=>(0,Fe.themeColor)(s,"inherit",n.get(s)),"& > *":{display:"inline-flex",alignItems:"center",color:s=>(0,Fe.themeColor)(s,"text",n.get(s))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:s=>(0,Fe.themeColor)(s,"shift-4",n.get(s)),paddingInlineStart:(0,Fe.themeSpacing)(1)},"& > [aria-current=page]":{color:s=>(0,Fe.themeColor)(s,"shift-10",n.get(s)),pointerEvents:"none"}}}}var mn=require("@domphy/core"),st=require("@domphy/theme");function Kr(r={}){var n;let o=(0,mn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:e=>(0,st.themeSize)(e,"inherit"),paddingInline:(0,st.themeSpacing)(1),border:"none",background:"none",cursor:"pointer",color:e=>(0,st.themeColor)(e,"text",o.get(e)),borderRadius:(0,st.themeSpacing)(1),transition:"color 140ms ease, background-color 140ms ease, box-shadow 140ms ease","&:hover":{color:e=>(0,st.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,st.themeColor)(e,"hover",o.get(e))},"&:focus-visible":{boxShadow:e=>S(e,o.get(e))}}}}var dn=require("@domphy/core"),F=require("@domphy/theme");var Nt={small:"decrease-1",medium:"inherit",large:"increase-1"};var un=require("@domphy/core"),pe=require("@domphy/theme");var jr={small:.5,medium:1,large:1.5};function wo(r={}){var s,t,a;let o=(0,un.toState)((s=r.color)!=null?s:"neutral","color"),n=jr[(t=r.size)!=null?t:"medium"],e=Nt[(a=r.size)!=null?a:"medium"];return{type:"button",_onInsert:i=>{i.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:i=>(0,pe.themeSize)(i,e),paddingBlock:i=>(0,pe.themeSpacing)((0,pe.themeDensity)(i)*n),paddingInline:i=>(0,pe.themeSpacing)((0,pe.themeDensity)(i)*n),borderRadius:i=>(0,pe.themeSpacing)((0,pe.themeDensity)(i)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:i=>(0,pe.themeSpacing)((0,pe.themeDensity)(i)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:i=>(0,pe.themeColor)(i,"text",o.get(i)),"&:hover:not([disabled]):not([aria-busy=true])":{color:i=>(0,pe.themeColor)(i,"text",o.get(i)),backgroundColor:i=>(0,pe.themeColor)(i,"hover",o.get(i))},"&:active:not([disabled]):not([aria-busy=true])":{color:i=>(0,pe.themeColor)(i,"text",o.get(i)),backgroundColor:i=>(0,pe.themeColor)(i,"increase-2",o.get(i))},"&:focus-visible":{boxShadow:i=>S(i,o.get(i))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>(0,pe.themeColor)(i,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var Wr={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function qr(r={}){var a,i,m,u;let o=(a=r.variant)!=null?a:"outline";if(o==="ghost")return wo({color:r.color,size:r.size});let n=(0,dn.toState)((i=r.color)!=null?i:"primary","color"),e=o==="solid",s=Wr[(m=r.size)!=null?m:"medium"],t=Nt[(u=r.size)!=null?u:"medium"];return z(E({type:"button",_onInsert:l=>{l.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')}},e?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{appearance:"none",fontSize:l=>(0,F.themeSize)(l,t),paddingBlock:l=>(0,F.themeSpacing)((0,F.themeDensity)(l)*s.block),paddingInline:l=>(0,F.themeSpacing)((0,F.themeDensity)(l)*s.inline),borderRadius:l=>(0,F.themeSpacing)((0,F.themeDensity)(l)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:l=>(0,F.themeSpacing)((0,F.themeDensity)(l)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e?"none":l=>`1px solid ${(0,F.themeColor)(l,"border-strong",n.get(l))}`,color:l=>e?(0,F.themeColor)(l,"shift-0","neutral"):(0,F.themeColor)(l,"shift-13",n.get(l)),backgroundColor:l=>e?(0,F.themeColor)(l,"shift-13",n.get(l)):(0,F.themeColor)(l,"inherit",n.get(l)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{color:l=>e?(0,F.themeColor)(l,"shift-0","neutral"):(0,F.themeColor)(l,"shift-14",n.get(l)),backgroundColor:l=>e?(0,F.themeColor)(l,"shift-14",n.get(l)):(0,F.themeColor)(l,"hover",n.get(l))},"&:active:not([disabled]):not([aria-busy=true])":{backgroundColor:l=>e?(0,F.themeColor)(l,"shift-15",n.get(l)):(0,F.themeColor)(l,"increase-2",n.get(l))},"&:focus-visible":{boxShadow:l=>S(l,n.get(l))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:l=>(0,F.themeColor)(l,"shift-2","neutral"),outline:l=>`1px solid ${(0,F.themeColor)(l,"border-strong","neutral")}`,color:l=>(0,F.themeColor)(l,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}})}var ro=require("@domphy/core"),Q=require("@domphy/theme");function Yr(r={}){var t,a;let{checked:o=!1}=r,n=(0,ro.toState)(o),e=(0,ro.toState)((t=r.color)!=null?t:"neutral","color"),s=(0,ro.toState)((a=r.accentColor)!=null?a:"primary","accentColor");return{type:"button",_onSchedule:i=>{i.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:i=>n.get(i),dataTone:"shift-2",onClick:()=>n.set(!n.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:i=>(0,Q.themeSize)(i),border:"none",outlineWidth:"1px",outline:i=>`1px solid ${(0,Q.themeColor)(i,"border",e.get(i))}`,minWidth:(0,Q.themeSpacing)(12),minHeight:(0,Q.themeSpacing)(6),borderRadius:(0,Q.themeSpacing)(999),paddingLeft:(0,Q.themeSpacing)(7),paddingRight:(0,Q.themeSpacing)(2),cursor:"pointer",transition:"padding-left 0.3s, padding-right 0.3s, background-color 140ms ease, box-shadow 140ms ease",backgroundColor:i=>(0,Q.themeColor)(i,"inherit",e.get(i)),color:i=>(0,Q.themeColor)(i,"text",e.get(i)),"&:focus-visible":{boxShadow:i=>S(i,s.get(i))},"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:(0,Q.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:(0,Q.themeSpacing)(5),height:(0,Q.themeSpacing)(5),borderRadius:(0,Q.themeSpacing)(999),color:i=>(0,Q.themeColor)(i,"text"),backgroundColor:i=>(0,Q.themeColor)(i,"decrease-2",e.get(i))},"&[aria-checked=true]":{backgroundColor:i=>(0,Q.themeColor)(i,"increase-3",s.get(i)),outline:"none",color:i=>(0,Q.themeColor)(i,"decrease-2"),paddingLeft:(0,Q.themeSpacing)(2),paddingRight:(0,Q.themeSpacing)(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${(0,Q.themeSpacing)(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var pn=require("@domphy/core"),$=require("@domphy/theme");var Gr={low:"0 1px 2px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.10)",medium:"0 2px 4px rgba(0,0,0,0.10), 0 10px 24px rgba(0,0,0,0.14)",high:"0 6px 12px rgba(0,0,0,0.14), 0 24px 48px rgba(0,0,0,0.20)"};function _(r){return Gr[r]}function Ur(r={}){var n;let o=(0,pn.toState)((n=r.color)!=null?n:"neutral","color");return{_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),backgroundColor:e=>(0,$.themeColor)(e,"inherit",o.get(e)),color:e=>(0,$.themeColor)(e,"shift-10",o.get(e)),outline:e=>`1px solid ${(0,$.themeColor)(e,"border-strong",o.get(e))}`,outlineOffset:"-1px",boxShadow:_("low"),overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),paddingInline:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*4),fontWeight:"600",color:e=>(0,$.themeColor)(e,"shift-11",o.get(e)),margin:0},"& > p":{gridArea:"desc",paddingInline:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*4),paddingBottom:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),color:e=>(0,$.themeColor)(e,"text",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*4),color:e=>(0,$.themeColor)(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:(0,$.themeSpacing)(2),paddingBlock:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),paddingInline:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*4),borderTop:e=>`1px solid ${(0,$.themeColor)(e,"border",o.get(e))}`}}}}var hn=require("@domphy/core"),ze=require("@domphy/theme");function Jr(r={}){var n;let o=(0,hn.toState)((n=r.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="code"&&console.warn('"code" primitive patch must use code tag')},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",fontSize:e=>(0,ze.themeSize)(e,"inherit"),color:e=>(0,ze.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,ze.themeColor)(e,"inherit",o.get(e)),height:e=>(0,ze.themeSpacing)((0,ze.themeDensity)(e)*(6/1.5)),paddingInline:e=>(0,ze.themeSpacing)((0,ze.themeDensity)(e)*(1.5/1.5)),borderRadius:e=>(0,ze.themeSpacing)((0,ze.themeDensity)(e)*(1/1.5))}}}var Ke=require("@domphy/core"),Y=require("@domphy/theme");var ao=require("@domphy/core"),Ze=require("@domphy/floating");var Wt=require("@domphy/core");function Xr(r){return typeof r.set=="function"}function ct(r,o,n=!0){if(typeof r.addListener=="function")return n&&o(r.get()),r.addListener(o);if(n)return(0,Wt.effect)(()=>{o(r.get())});let e=!0,s=(0,Wt.effect)(()=>{let t=r.get();e||o(t)});return e=!1,s}function To(r,o){Xr(r)&&r.set(o)}function yt(r,o){o==null||o(),To(r,!1)}function $t(r){return(0,Wt.toState)(r!=null?r:!1)}function Re(r,o){return`domphy-${r}-${o.nodeId}`}function Zr(r,o){var at,Ue,kt,it;let{openState:n,onDismiss:e,placement:s,content:t,keepOpenOnContentHover:a}=o,{kind:i}=o,m=`floating:${i}`,u=null,l=null,c=null,d=null,f=!1,h=r.domElement,C=r.getRoot(),v=Re(i,r),p={style:{position:"fixed",pointerEvents:"auto",visibility:V=>n.get(V)?"visible":"hidden"},onKeyDown:V=>{V.key==="Escape"&&q()},onMouseEnter:()=>a&&w(),onMouseLeave:()=>a&&q(),_onMount:V=>{var de;if(c=V.domElement,c.id||(c.id=v),h&&c&&!c.hasAttribute("data-theme")){let Je=(de=h.closest("[data-theme]"))==null?void 0:de.getAttribute("data-theme");Je&&c.setAttribute("data-theme",Je)}},_portal:V=>{let de=h.closest("dialog");if(de){let Ne=de.querySelector(":scope > #domphy-floating");return Ne||(Ne=de.ownerDocument.createElement("div"),Ne.id="domphy-floating",Object.assign(Ne.style,{position:"fixed",inset:"0",zIndex:"20",pointerEvents:"none"}),de.appendChild(Ne)),Ne}let Je=V.domElement.querySelector("#domphy-floating");if(!Je){let Ne={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};Je=V.children.insert(Ne).domElement}return Je}},b=V=>(0,ao.merge)(V,p);b(t);let k=()=>{f||(f=!0,d=C.children.insert(t),d._behaviorInstances.set(m,Oe))},g=()=>{f&&(!c||!c.isConnected)&&(l==null||l(),l=null,d=null,c=null,f=!1),k(),h&&c&&(l==null||l(),l=(0,Ze.autoUpdate)(h,c,()=>{(0,Ze.computePosition)(h,c,{placement:s.get(),middleware:[(0,Ze.offset)(12),(0,Ze.flip)(),(0,Ze.shift)()],strategy:"fixed"}).then(({x:V,y:de,placement:Je})=>{c&&(Object.assign(c.style,{left:`${V}px`,top:`${de}px`}),s.set(Je))})}),To(n,!0))},D=()=>{l==null||l(),l=null,d&&(d.remove(),d=null),c=null,f=!1,yt(n,e)},w=()=>{u&&clearTimeout(u),u=setTimeout(g,100)},q=()=>{u&&clearTimeout(u),u=setTimeout(D,100)},ve=V=>{if(!n.get()||!h||!c)return;let de=V.target;!h.contains(de)&&!c.contains(de)&&q()};(at=C.domElement)==null||at.addEventListener("click",ve);let Ie=V=>{V.key==="Escape"&&n.get()&&q()},Z=(it=(kt=(Ue=C.domElement)==null?void 0:Ue.ownerDocument)!=null?kt:C.domElement)!=null?it:null;Z==null||Z.addEventListener("keydown",Ie);let He=V=>{V?f||g():f&&D()},re=()=>{},Ee=!1,Ge=!1,Oe,Et=V=>{var de;V._behaviors=z(E({},(de=V._behaviors)!=null?de:{}),{[m]:{attach:()=>Oe,props:{}}})};return Oe={show:w,hide:q,panelId:v,update(V){if(!Ge&&(e=V.onDismiss,V.openState!==n&&(re(),n=V.openState,re=ct(n,He,!1),n.get()&&g()),s=V.placement,t=V.content,a=V.keepOpenOnContentHover,b(t),Et(t),d)){Ge=!0;try{d.patch(t)}finally{Ge=!1}}},destroy(){var V;Ee||(Ee=!0,u&&clearTimeout(u),u=null,l==null||l(),l=null,d==null||d.remove(),d=null,c=null,f=!1,re(),re=()=>{},(V=C.domElement)==null||V.removeEventListener("click",ve),Z==null||Z.removeEventListener("keydown",Ie))}},Et(t),re=ct(n,He),Oe}function Qe(r){let{kind:o,placement:n,onDismiss:e}=r,s=$t(r.open),t=`floating:${o}`,a=u=>{var l;return(l=u==null?void 0:u.getBehavior(t))==null?void 0:l.show()},i=u=>{var l;return(l=u==null?void 0:u.getBehavior(t))==null?void 0:l.hide()},m=E({onKeyDown:(u,l)=>u.key==="Escape"&&i(l)},(0,ao.behavior)(t,Zr,{kind:o,openState:s,onDismiss:e,placement:n,content:r.content,keepOpenOnContentHover:!!r.keepOpenOnContentHover}));return{show:a,hide:i,anchorPartial:m}}var bt=require("@domphy/core"),J=require("@domphy/theme");var Qr='<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>',qt=1.5,ea=6/qt,fn=2.5/qt,ta=1/qt,gn=4/qt,oa=1/qt;function Yt(r={}){var e;let{removable:o=!1}=r,n=(0,bt.toState)((e=r.color)!=null?e:"neutral","color");return z(E({dataTone:"shift-2"},(0,bt.behavior)("tag-remove",(s,t)=>{let a=()=>s.remove(),i=()=>({span:(0,bt.rawHtml)(Qr),_key:"tag-remove",onClick:l=>{l.stopPropagation(),a()},onKeyDown:l=>{let c=l;c.key!=="Enter"&&c.key!==" "||(c.preventDefault(),c.stopPropagation(),a())},tabindex:0,role:"button",ariaLabel:"Remove",style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:l=>(0,J.themeSpacing)((0,J.themeDensity)(l)*oa),width:l=>(0,J.themeSpacing)((0,J.themeDensity)(l)*gn),height:l=>(0,J.themeSpacing)((0,J.themeDensity)(l)*gn),flexShrink:0,transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover":{backgroundColor:l=>(0,J.themeColor)(l,"shift-4",n.get(l))},"&:focus-visible":{boxShadow:l=>S(l,n.get(l))}}}),m=()=>{var l;return(l=s.children.items.find(c=>c instanceof bt.ElementNode&&c.key==="tag-remove"))!=null?l:null},u=(l,c)=>{let d=m();l.removable&&!d?s.children.insert(i(),void 0,c):!l.removable&&d&&s.children.remove(d)};return u(t,!1),{update:l=>u(l,!0)}},{removable:o})),{style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:s=>(0,J.themeSpacing)((0,J.themeDensity)(s)*ea),paddingBlock:0,borderRadius:s=>(0,J.themeSpacing)((0,J.themeDensity)(s)*999),paddingInlineStart:s=>(0,J.themeSpacing)((0,J.themeDensity)(s)*fn),paddingInlineEnd:s=>(0,J.themeSpacing)((0,J.themeDensity)(s)*(o?ta:fn)),gap:(0,J.themeSpacing)(1.5),fontSize:s=>(0,J.themeSize)(s,"decrease-1"),backgroundColor:s=>(0,J.themeColor)(s,"inherit",n.get(s)),color:s=>(0,J.themeColor)(s,"text",n.get(s)),border:"none",outlineOffset:"-1px",outline:s=>`1px solid ${(0,J.themeColor)(s,"border-strong",n.get(s))}`}})}function na(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:s=!1,multiple:t=!1}=r,a=(0,Ke.toState)(r.value),i=(0,Ke.toState)(s),{show:m,hide:u,anchorPartial:l}=Qe({kind:"combobox",open:i,onDismiss:r.onDismiss,placement:(0,Ke.toState)(n),content:r.content}),c={onClick:(g,D)=>!t&&u(D),dataTone:"shift-0",style:{backgroundColor:g=>(0,Y.themeColor)(g,"inherit"),color:g=>(0,Y.themeColor)(g,"text"),borderRadius:g=>(0,Y.themeSpacing)((0,Y.themeDensity)(g)*2),outline:g=>`1px solid ${(0,Y.themeColor)(g,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}};(0,Ke.merge)(r.content,c);let d={border:"none",outline:"none",padding:0,margin:0,flex:1,height:(0,Y.themeSpacing)(6),marginInlineStart:(0,Y.themeSpacing)(2),fontSize:g=>(0,Y.themeSize)(g,"inherit"),color:g=>(0,Y.themeColor)(g,"text",e),backgroundColor:g=>(0,Y.themeColor)(g,"inherit",e)},f=g=>{var D,w;return(w=(D=g==null?void 0:g.elementNode)==null?void 0:D.getBehavior("comboboxInner"))==null?void 0:w.query},h=g=>{let D=g;for(;D;){if(D._behaviorInstances.has("floating:combobox"))return D;D=D.parent}return g},C={role:"combobox",ariaHaspopup:"listbox",ariaExpanded:g=>i.get(g),ariaControls:g=>g!=null&&g.elementNode?Re("combobox",h(g.elementNode)):void 0},v=g=>g?((0,Ke.merge)(g,E({onFocus:(D,w)=>m(w),style:d,_key:"combobox-input"},C)),g):E({input:null,ariaLabel:"Filter options",onFocus:(D,w)=>m(w),value:D=>{var w,q;return(q=(w=f(D))==null?void 0:w.get(D))!=null?q:""},onInput:(D,w)=>{var q;(q=w.getBehavior("comboboxInner"))==null||q.query.set(D.target.value)},style:d,_key:"combobox-input"},C),p=g=>({div:D=>{i.get(D);let w=g.state.get(D),q=Array.isArray(w)?w:[w],Ie=g.options.filter(Z=>q.includes(Z.value)).map(Z=>({span:Z.label,$:[Yt({color:g.color,removable:!0})],_key:Z.value,_onRemove:He=>{let re=g.state.get(),Ge=(Array.isArray(re)?re:[re]).filter(Oe=>Oe!==Z.value);g.multiple?g.state.set(Ge):g.state.set(Ge[0])}}));return Ie.push(v(g.input)),Ie},_key:"comboboxWrap",style:{display:"flex",flexWrap:"wrap",gap:(0,Y.themeSpacing)(1)}}),k=z(E({_onInsert:g=>{g.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onSchedule:(g,D)=>{D[g.tagName]=[p({options:o,multiple:t,color:e,state:a,input:r.input})]}},(0,Ke.behavior)("comboboxInner",(g,D)=>{let w=g.getMetadata("comboboxQuery");return w||(w=(0,Ke.toState)(""),g.setMetadata("comboboxQuery",w)),{query:w,update(q){g.children.update([p(q)])}}},{options:o,multiple:t,color:e,state:a,input:r.input})),{style:{minWidth:(0,Y.themeSpacing)(32),outlineOffset:"-1px",outline:g=>`1px solid ${(0,Y.themeColor)(g,"border-strong","neutral")}`,paddingBlock:g=>(0,Y.themeSpacing)((0,Y.themeDensity)(g)*1),paddingInline:g=>(0,Y.themeSpacing)((0,Y.themeDensity)(g)*1),borderRadius:g=>(0,Y.themeSpacing)((0,Y.themeDensity)(g)*1.5),fontSize:g=>(0,Y.themeSize)(g,"inherit"),color:g=>(0,Y.themeColor)(g,"text",e),backgroundColor:g=>(0,Y.themeColor)(g,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-within":{boxShadow:g=>S(g,e)}}});return(0,Ke.merge)(l,k),l}var io=require("@domphy/core"),ee=require("@domphy/theme");function ra(){return{role:"group",ariaLabel:"Commands",_onSchedule:(r,o)=>{(0,io.merge)(o,{_context:{command:{query:(0,io.toState)("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function aa(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let s=e.getContext("command");if(!s){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>s.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:e=>(0,ee.themeSize)(e,"inherit"),paddingInline:e=>(0,ee.themeSpacing)((0,ee.themeDensity)(e)*3),paddingBlock:e=>(0,ee.themeSpacing)((0,ee.themeDensity)(e)*2),border:"none",borderBottom:e=>`1px solid ${(0,ee.themeColor)(e,"border",o)}`,outline:"none",color:e=>(0,ee.themeColor)(e,"shift-10",o),backgroundColor:e=>(0,ee.themeColor)(e,"inherit",o),"&::placeholder":{color:e=>(0,ee.themeColor)(e,"shift-7")},transition:"border-bottom-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{borderBottomColor:e=>(0,ee.themeColor)(e,"shift-6",n),boxShadow:e=>S(e,n)}}}}function ia(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{_onMount:e=>{var u,l;let s=e.getContext("command");if(!s){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=(l=(u=t.textContent)==null?void 0:u.toLowerCase())!=null?l:"",i=c=>{t.hidden=c.length>0&&!a.includes(c.toLowerCase())};i(s.query.get());let m=s.query.addListener(i);e.addHook("Remove",m)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>(0,ee.themeSize)(e,"inherit"),height:e=>(0,ee.themeSpacing)(6+(0,ee.themeDensity)(e)*2),paddingInline:e=>(0,ee.themeSpacing)((0,ee.themeDensity)(e)*3),border:"none",outline:"none",color:e=>(0,ee.themeColor)(e,"shift-13",o),backgroundColor:e=>(0,ee.themeColor)(e,"inherit",o),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{color:e=>(0,ee.themeColor)(e,"shift-13",o),backgroundColor:e=>(0,ee.themeColor)(e,"hover",o)},"&:focus-visible":{boxShadow:e=>S(e,n)}}}}var xe=require("@domphy/core"),P=require("@domphy/theme");var fe=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()),wt=(r,o)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+o),Do=(r,o)=>new Date(r.getFullYear(),r.getMonth()+o,r.getDate()),Gt=(r,o)=>!!r&&!!o&&r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()&&r.getDate()===o.getDate(),Po=r=>`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`,Io=(r,o)=>wt(r,-((r.getDay()-o+7)%7));function la(r){var o,n;try{let e=new Intl.Locale(r),s=(n=(o=e.getWeekInfo)==null?void 0:o.call(e))!=null?n:e.weekInfo;if(s!=null&&s.firstDay)return s.firstDay%7}catch(e){}return 0}function sa(r,o){let n=o,e=null,s=a=>{e==null||e(),e=a.onChange?a.selection.addListener(i=>a.onChange(i)):null},t=(a,i)=>{a!==i&&a.set(i.get())};return s(n),{update(a){a.selectionIsCallerOwned||t(a.selection,n.selection),t(a.viewYear,n.viewYear),t(a.viewMonth,n.viewMonth),t(a.focused,n.focused),t(a.hovered,n.hovered),t(a.hour,n.hour),t(a.minute,n.minute),t(a.open,n.open),(a.selection!==n.selection||a.onChange!==n.onChange)&&s(a),n=a},destroy(){e==null||e(),e=null}}}function ca(r={}){var Zo,Qo,en,tn;let{mode:o="single",time:n=!1,min:e,max:s,disabledDate:t,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:i,onChange:m}=r,u=(Zo=r.weekStartsOn)!=null?Zo:la(a),l=(0,xe.toState)((Qo=r.accentColor)!=null?Qo:"primary","accentColor"),c=(0,xe.toState)((en=r.placement)!=null?en:"bottom-start"),d=(0,xe.toState)((tn=r.value)!=null?tn:o==="range"?[null,null]:null),f=(()=>{let y=d.get(),x=o==="range"?y==null?void 0:y[0]:y;return x instanceof Date?x:new Date})(),h=(0,xe.toState)(f.getFullYear(),"viewYear"),C=(0,xe.toState)(f.getMonth(),"viewMonth"),v=(0,xe.toState)(fe(f),"focused"),p=(0,xe.toState)(null,"hovered"),b=(0,xe.toState)(f.getHours(),"hour"),k=(0,xe.toState)(f.getMinutes(),"minute"),g=new Intl.DateTimeFormat(a,E({dateStyle:"medium"},n?{timeStyle:"short"}:{})),D=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),w=new Intl.DateTimeFormat(a,{weekday:"short"}),q=new Intl.DateTimeFormat(a,{dateStyle:"full"}),ve=y=>y?g.format(y):"",Ie=y=>{if(i)return i(y);if(o==="range"){let[x,T]=y!=null?y:[null,null];return x?`${ve(x)} \u2013 ${ve(T)}`:""}return ve(y)},Z=Array.from({length:7},(y,x)=>w.format(new Date(2023,0,1+(x+u)%7))),He=y=>!!e&&fe(y)<fe(e)||!!s&&fe(y)>fe(s)||!!t&&t(y),re=y=>{if(!n)return fe(y);let x=fe(y);return x.setHours(b.get(),k.get(),0,0),x},Ee=(y,x)=>{var O;if(He(y))return;if(o==="single"){d.set(re(y)),n||Ne(x);return}let[T,L]=(O=d.get())!=null?O:[null,null];!T||T&&L?d.set([re(y),null]):fe(y)<fe(T)?(d.set([re(y),re(T)]),n||Ne(x)):(d.set([T,re(y)]),n||Ne(x))},Ge=()=>{var y;if(n)if(o==="single"){let x=d.get();x&&d.set(re(x))}else{let[x,T]=(y=d.get())!=null?y:[null,null];d.set([x&&re(x),T&&re(T)])}},Oe=(y,x)=>{var _t;if(o!=="range")return!1;let[T,L]=(_t=d.get(x))!=null?_t:[null,null],O=L!=null?L:p.get(x);if(!T||!O)return!1;let M=fe(T)<=fe(O)?T:O,$e=fe(T)<=fe(O)?O:T,ke=fe(y);return ke>=fe(M)&&ke<=fe($e)},Et=(y,x)=>{let T=d.get(x);if(o==="range"){let[L,O]=T!=null?T:[null,null];return Gt(y,L)||Gt(y,O)}return Gt(y,T)},at=y=>{h.set(y.getFullYear()),C.set(y.getMonth())},Ue=y=>{let x=Do(new Date(h.get(),C.get(),1),y);at(x)},kt=y=>h.set(h.get()+y),it=y=>{var T;let x=(T=y==null?void 0:y.getRoot())==null?void 0:T.domElement;setTimeout(()=>{var L;(L=x==null?void 0:x.querySelector(`[data-date="${Po(v.get())}"]`))==null||L.focus()},0)},V=Cr(),de=(0,xe.toState)(!1),{show:Je,hide:Ne,anchorPartial:So}=Qe({kind:"datePicker",open:de,placement:c,content:V}),Sr=E({type:"text",readonly:!0,value:y=>Ie(d.get(y)),role:"combobox",ariaHaspopup:"dialog",ariaExpanded:y=>de.get(y),ariaControls:y=>y!=null&&y.elementNode?Re("datePicker",y.elementNode):void 0,ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(y,x)=>{vo(x)},onFocus:(y,x)=>{vo(x)},onKeyDown:(y,x)=>{let T=y.key;(T==="ArrowDown"||T==="Enter")&&(y.preventDefault(),vo(x))}},(0,xe.behavior)("datePicker",sa,{selection:d,selectionIsCallerOwned:r.value!==void 0,viewYear:h,viewMonth:C,focused:v,hovered:p,hour:b,minute:k,open:de,onChange:m}));function vo(y){var T;let x=(T=vr())!=null?T:new Date;v.set(fe(x)),at(x),Je(y),it(y)}function vr(){var x;let y=d.get();return o==="range"?(x=y==null?void 0:y[0])!=null?x:null:y!=null?y:null}return(0,xe.merge)(So,Sr),So;function Cr(){let y=(M,$e,ke)=>({button:M,type:"button",ariaLabel:$e,onClick:ke,style:ma()}),x={div:[y("\xAB","Previous year",()=>kt(-1)),y("\u2039","Previous month",()=>Ue(-1)),{div:M=>D.format(new Date(h.get(M),C.get(M),1)),ariaLive:"polite",_doctorDisable:"inline-typography",style:{flex:"1",textAlign:"center",fontWeight:"bold",fontSize:M=>(0,P.themeSize)(M)}},y("\u203A","Next month",()=>Ue(1)),y("\xBB","Next year",()=>kt(1))],style:{display:"flex",alignItems:"center",gap:(0,P.themeSpacing)(1),marginBottom:(0,P.themeSpacing)(2)}},T={div:Z.map((M,$e)=>({div:M,_doctorDisable:"inline-typography",style:{textAlign:"center",fontSize:ke=>(0,P.themeSize)(ke,"decrease-1"),fontWeight:"bold",color:ke=>(0,P.themeColor)(ke,"shift-7"),paddingBlock:(0,P.themeSpacing)(1)},_key:$e})),role:"row",style:yn()},L={div:M=>xr(M),role:"grid",ariaLabel:"Calendar",onKeyDown:Tr,onMouseLeave:()=>o==="range"&&p.set(null),style:{display:"flex",flexDirection:"column",gap:(0,P.themeSpacing)(.5)}},O=[x,T,L];return n&&O.push(kr()),O.push(wr()),{div:O,role:"dialog",ariaModal:"false",dataTone:"shift-0",style:{minWidth:(0,P.themeSpacing)(70),padding:(0,P.themeSpacing)(3),borderRadius:M=>(0,P.themeSpacing)((0,P.themeDensity)(M)*2),backgroundColor:M=>(0,P.themeColor)(M,"inherit"),color:M=>(0,P.themeColor)(M,"text"),outline:M=>`1px solid ${(0,P.themeColor)(M,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}}}function xr(y){let x=new Date(h.get(y),C.get(y),1),T=C.get(y),L=Io(x,u),O=[];for(let M=0;M<6;M++){let $e=[];for(let ke=0;ke<7;ke++){let _t=wt(L,M*7+ke);$e.push(Er(_t,T,y))}O.push({div:$e,role:"row",style:yn(),_key:M})}return O}function Er(y,x,T){let L=He(y),O=Et(y,T),M=Oe(y,T),$e=y.getMonth()!==x,ke=Gt(y,v.get(T)),_t=Gt(y,new Date);return{button:String(y.getDate()),type:"button",role:"gridcell",tabIndex:ke?0:-1,ariaSelected:O,ariaDisabled:L,disabled:L,ariaLabel:q.format(y),dataDate:Po(y),onClick:(ne,Dr)=>Ee(y,Dr),onMouseEnter:()=>o==="range"&&p.set(y),style:{appearance:"none",border:"none",cursor:L?"not-allowed":"pointer",aspectRatio:"1",borderRadius:(0,P.themeSpacing)(1),fontSize:ne=>(0,P.themeSize)(ne),fontFamily:"inherit",opacity:L?.35:$e?.5:1,backgroundColor:ne=>O?(0,P.themeColor)(ne,"shift-7",l.get(ne)):M?(0,P.themeColor)(ne,"hover",l.get(ne)):"transparent",color:ne=>O?(0,P.themeColor)(ne,"shift-0",l.get(ne)):(0,P.themeColor)(ne,"text"),outline:_t?ne=>`1px solid ${(0,P.themeColor)(ne,"shift-6",l.get(ne))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:ne=>O?(0,P.themeColor)(ne,"shift-7",l.get(ne)):(0,P.themeColor)(ne,"shift-3",l.get(ne))},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:ne=>S(ne,l.get(ne))}},_key:Po(y)}}function kr(){let y=(x,T,L)=>({select:Array.from({length:x},(O,M)=>({option:String(M).padStart(2,"0"),value:String(M),selected:$e=>T.get($e)===M,_key:M})),ariaLabel:L,onChange:O=>{T.set(Number(O.target.value)),Ge()},style:ua()});return{div:[y(24,b,"Hour"),{span:":",_doctorDisable:"inline-typography",style:{fontWeight:"bold"}},y(60,k,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:(0,P.themeSpacing)(1),marginTop:(0,P.themeSpacing)(3)}}}function wr(){let y=(x,T)=>({button:x,type:"button",onClick:(L,O)=>T(O),style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:L=>(0,P.themeSize)(L,"decrease-1"),color:L=>(0,P.themeColor)(L,"muted",l.get(L)),padding:(0,P.themeSpacing)(1)}});return{div:[y("Today",x=>{let T=new Date;v.set(fe(T)),at(T),it(x)}),y("Clear",()=>{d.set(o==="range"?[null,null]:null),p.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:(0,P.themeSpacing)(2),paddingTop:(0,P.themeSpacing)(2),borderTop:x=>`1px solid ${(0,P.themeColor)(x,"border")}`}}}function Tr(y,x){let T=y,L=v.get(),O=null;switch(T.key){case"ArrowLeft":O=wt(L,-1);break;case"ArrowRight":O=wt(L,1);break;case"ArrowUp":O=wt(L,-7);break;case"ArrowDown":O=wt(L,7);break;case"Home":O=Io(L,u);break;case"End":O=wt(Io(L,u),6);break;case"PageUp":O=Do(L,T.shiftKey?-12:-1);break;case"PageDown":O=Do(L,T.shiftKey?12:1);break;case"Enter":case" ":T.preventDefault(),Ee(L,x);return;default:return}T.preventDefault(),v.set(O),at(O),it(x)}}function yn(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:(0,P.themeSpacing)(.5)}}function ma(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:r=>(0,P.themeSize)(r),color:r=>(0,P.themeColor)(r,"muted"),width:(0,P.themeSpacing)(7),height:(0,P.themeSpacing)(7),borderRadius:(0,P.themeSpacing)(1),"&:hover":{backgroundColor:r=>(0,P.themeColor)(r,"shift-3")}}}function ua(){return{fontFamily:"inherit",fontSize:r=>(0,P.themeSize)(r),padding:(0,P.themeSpacing)(1),borderRadius:(0,P.themeSpacing)(1),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${(0,P.themeColor)(r,"border-strong")}`,backgroundColor:r=>(0,P.themeColor)(r,"inherit"),color:r=>(0,P.themeColor)(r,"text")}}var bn=require("@domphy/core"),mt=require("@domphy/theme");function da(r={}){var n;let o=(0,bn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:`minmax(${(0,mt.themeSpacing)(24)}, max-content) 1fr`,columnGap:(0,mt.themeSpacing)(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>(0,mt.themeSize)(e,"inherit"),color:e=>(0,mt.themeColor)(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>(0,mt.themeSize)(e,"inherit"),color:e=>(0,mt.themeColor)(e,"text",o.get(e))}}}}var Oo=require("@domphy/core"),N=require("@domphy/theme");function pa(r={}){var s,t;let{duration:o=240}=r,n=(0,Oo.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,Oo.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},_doctorDisable:"inline-typography",style:{fontSize:a=>(0,N.themeSize)(a,"inherit"),color:a=>(0,N.themeColor)(a,"text",n.get(a)),backgroundColor:a=>(0,N.themeColor)(a,"inherit",n.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>(0,N.themeColor)(a,"shift-2",n.get(a)),color:a=>(0,N.themeColor)(a,"shift-10",n.get(a)),fontSize:a=>(0,N.themeSize)(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:(0,N.themeSpacing)(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*4),height:(0,N.themeSpacing)(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:(0,N.themeSpacing)(2),height:(0,N.themeSpacing)(2),flexShrink:0,marginTop:(0,N.themeSpacing)(-.5),borderInlineEnd:a=>`${(0,N.themeSpacing)(.5)} solid ${(0,N.themeColor)(a,"shift-9",n.get(a))}`,borderBottom:a=>`${(0,N.themeSpacing)(.5)} solid ${(0,N.themeColor)(a,"shift-9",n.get(a))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>(0,N.themeColor)(a,"shift-3",n.get(a))},"& > summary:focus-visible":{borderRadius:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*2),boxShadow:a=>S(a,e.get(a))},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${o}ms ease, opacity ${o}ms ease, padding ${o}ms ease`},"&[open] > :not(summary)":{maxHeight:"none",opacity:1,paddingTop:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*1),paddingBottom:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*3)}}}}var vn=require("@domphy/core"),Ae=require("@domphy/theme");var Ut=0;function lo(){Ut++,Ut===1&&(document.body.style.overflow="hidden")}function At(){Ut=Math.max(0,Ut-1),Ut===0&&(document.body.style.overflow="")}var Sn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function ha(r,o){let{state:n,onDismiss:e}=o,s=null,t=!1,a=!1,i=null,m=r.domElement;m.setAttribute("aria-modal","true");let u=()=>{t=!1,typeof m.close=="function"&&m.close(),m.style.visibility="hidden",m.style.pointerEvents="none",m.style.display="none",a&&(At(),a=!1),s==null||s.focus(),s=null},l=h=>{if(h.key!=="Tab")return;let C=Array.from(m.querySelectorAll(Sn)).filter(b=>!b.closest("[aria-hidden='true']")&&b.offsetParent!==null);if(!C.length){h.preventDefault();return}let v=C[0],p=C[C.length-1];h.shiftKey?(document.activeElement===v||document.activeElement===m)&&(h.preventDefault(),p.focus()):document.activeElement===p&&(h.preventDefault(),v.focus())},c=h=>{h.preventDefault(),yt(n,e)};m.addEventListener("cancel",c);let d=h=>{if(h)t=!1,i&&(clearTimeout(i),i=null),s=document.activeElement,m.style.visibility="visible",m.style.pointerEvents="auto",m.style.display="",typeof m.showModal=="function"&&!m.open&&m.showModal(),a||(lo(),a=!0),m.addEventListener("keydown",l),requestAnimationFrame(()=>{m.style.opacity="1";let C=m.querySelector(Sn);C==null||C.focus()});else{if(t=!0,m.style.opacity="0",m.removeEventListener("keydown",l),!m.open){u();return}i=setTimeout(()=>{i=null,t&&u()},350)}},f=ct(n,d);return{requestClose:()=>yt(n,e),onTransitionEnd:h=>{t&&h.target===m&&h.propertyName==="opacity"&&u()},update(h){e=h.onDismiss,h.state!==n&&(f(),n=h.state,f=ct(n,d,!1))},destroy(){i&&(clearTimeout(i),i=null),f(),m.removeEventListener("cancel",c),a&&(At(),a=!1),m.removeEventListener("keydown",l),s==null||s.focus(),s=null}}}function fa(r={}){let{color:o="neutral",open:n=!1,labelledBy:e,describedBy:s,onDismiss:t}=r,a=$t(n);return z(E({_onInsert:i=>{i.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')}},(0,vn.behavior)("dialog",ha,{state:a,onDismiss:t})),{ariaLabelledby:e,ariaDescribedby:s,onClick:(i,m)=>{var c;if(i.target!==m.domElement)return;let u=m.domElement.getBoundingClientRect();i.clientX>=u.left&&i.clientX<=u.right&&i.clientY>=u.top&&i.clientY<=u.bottom||(c=m.getBehavior("dialog"))==null||c.requestClose()},onTransitionEnd:(i,m)=>{var u;return(u=m.getBehavior("dialog"))==null?void 0:u.onTransitionEnd(i)},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:i=>(0,Ae.themeSize)(i,"inherit"),color:i=>(0,Ae.themeColor)(i,"shift-10",o),backgroundColor:i=>(0,Ae.themeColor)(i,"inherit",o),border:"none",borderRadius:i=>(0,Ae.themeSpacing)((0,Ae.themeDensity)(i)*2),padding:i=>(0,Ae.themeSpacing)((0,Ae.themeDensity)(i)*3),boxShadow:_("high"),"&::backdrop":{backgroundColor:i=>(0,Ae.themeColor)(i,"shift-2","neutral"),opacity:.75}}})}var Cn=require("@domphy/core"),ut=require("@domphy/theme");function ga(r={}){var n;let o=(0,Cn.toState)((n=r.color)!=null?n:"neutral","color");return{role:"separator",_onInsert:e=>{e.tagName!=="div"&&console.warn('"divider" patch should be used with <div>')},style:{display:"flex",justifyContent:"center",alignItems:"baseline",gap:(0,ut.themeSpacing)(2),fontSize:e=>(0,ut.themeSize)(e,"inherit"),backgroundColor:e=>(0,ut.themeColor)(e),color:e=>(0,ut.themeColor)(e,"text",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>(0,ut.themeColor)(e,"border-strong",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>(0,ut.themeColor)(e,"border-strong",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var xn=require("@domphy/core"),we=require("@domphy/theme");var Lo={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},En={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},Bt=r=>r==="left"||r==="right";function kn(r,o){return r==="start"?o?"right":"left":r==="end"?o?"left":"right":r}function ya(r,o){let{state:n,onDismiss:e,placement:s,size:t}=o,a=r.domElement;a.setAttribute("aria-modal","true");let i=p=>{p.preventDefault(),yt(n,e)};a.addEventListener("cancel",i);let m=(p,b)=>{let g=(p==="start"||p==="end")&&(a.ownerDocument.documentElement.dir==="rtl"||a.ownerDocument.dir==="rtl"),D=kn(p,g),w=b!=null?b:Bt(D)?(0,we.themeSpacing)(80):(0,we.themeSpacing)(64);return a.style.margin=En[D],a.style.width=Bt(D)?w:"100dvw",a.style.height=Bt(D)?"100dvh":w,D},u=m(s,t),l=!1,c=!1,d=null,f=()=>{d=null,l&&(l=!1,typeof a.close=="function"&&a.close(),a.style.visibility="hidden",a.style.pointerEvents="none",a.style.display="none",c&&(At(),c=!1))},h=p=>{p.target===a&&p.propertyName==="transform"&&f()};a.addEventListener("transitionend",h);let C=p=>{if(p)l=!1,d&&(clearTimeout(d),d=null),a.style.visibility="visible",a.style.pointerEvents="auto",a.style.display="",typeof a.showModal=="function"&&!a.open&&a.showModal(),c||(lo(),c=!0),requestAnimationFrame(()=>{a.style.transform="translate(0, 0)"});else{if(l=!0,a.style.transform=Lo[u],!a.open){f();return}d=setTimeout(f,350)}},v=ct(n,C);return{requestClose:()=>yt(n,e),update(p){e=p.onDismiss,p.state!==n&&(v(),n=p.state,v=ct(n,C,!1)),(p.placement!==s||p.size!==t)&&(s=p.placement,t=p.size,u=m(s,t),n.get()||(a.style.transform=Lo[u]))},destroy(){d&&(clearTimeout(d),d=null),v(),a.removeEventListener("cancel",i),a.removeEventListener("transitionend",h),c&&(At(),c=!1)}}}function ba(r={}){let{color:o="neutral",open:n=!1,onDismiss:e,placement:s="end",size:t}=r,a=$t(n),i=kn(s,!1),m=Bt(i)?(0,we.themeSpacing)(80):(0,we.themeSpacing)(64),u=t!=null?t:m;return z(E({_onInsert:l=>{l.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')}},(0,xn.behavior)("drawer",ya,{state:a,onDismiss:e,placement:s,size:t})),{onClick:(l,c)=>{var h;if(l.target!==c.domElement)return;let d=c.domElement.getBoundingClientRect();l.clientX>=d.left&&l.clientX<=d.right&&l.clientY>=d.top&&l.clientY<=d.bottom||(h=c.getBehavior("drawer"))==null||h.requestClose()},style:{transform:Lo[i],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:l=>(0,we.themeSize)(l,"inherit"),color:l=>(0,we.themeColor)(l,"shift-10",o),backgroundColor:l=>(0,we.themeColor)(l,"inherit",o),border:"none",padding:l=>(0,we.themeSpacing)((0,we.themeDensity)(l)*3),margin:En[i],width:Bt(i)?u:"100dvw",height:Bt(i)?"100dvh":u,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:_("high"),"&::backdrop":{backgroundColor:l=>(0,we.themeColor)(l,"shift-2","neutral"),opacity:.75}}})}var wn=require("@domphy/core"),so=require("@domphy/theme");function Sa(r={}){var n;let o=(0,wn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>(0,so.themeSize)(e,"inherit"),fontStyle:"italic",color:e=>(0,so.themeColor)(e,"shift-10",o.get(e))}}}var Tn=require("@domphy/core"),St=require("@domphy/theme");function va(r={}){var n;let o=(0,Tn.toState)((n=r.color)!=null?n:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:(0,St.themeSpacing)(3),paddingBlock:(0,St.themeSpacing)(12),paddingInline:(0,St.themeSpacing)(6),textAlign:"center",color:e=>(0,St.themeColor)(e,"muted",o.get(e)),"& > :first-child":{color:e=>(0,St.themeColor)(e,"shift-5",o.get(e)),opacity:.9},"& > :nth-child(2)":{color:e=>(0,St.themeColor)(e,"text",o.get(e))}}}}var zo="errorBoundaryOriginal";function Ca(r){var n;let o=r.getMetadata(zo);if(typeof o=="function"){(n=r._childrenRelease)==null||n.call(r),r._setupFunctionChildren(o);return}if(o!=null){r.children.update(Array.isArray(o)?o:[o]);return}r.children.update([])}function xa(r={}){return{_onSchedule:(o,n)=>{o.getMetadata(zo)===void 0&&o.setMetadata(zo,n[o.tagName])},_onError:(o,n)=>{var t,a;(t=r.onError)==null||t.call(r,n);let e=()=>Ca(o),s=typeof r.fallback=="function"?r.fallback(n,e):(a=r.fallback)!=null?a:{div:"An error occurred."};o.children.update([s])}}}var Dn=require("@domphy/core"),dt=require("@domphy/theme");var Ea={small:8,medium:10,large:14};function ka(r={}){var e,s;let o=(0,Dn.toState)((e=r.color)!=null?e:"primary","color"),n=(0,dt.themeSpacing)(Ea[(s=r.size)!=null?s:"medium"]);return{type:"button",_onInsert:t=>{t.tagName!=="button"&&console.warn('"fab" patch must use button tag')},_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"],style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:n,height:n,borderRadius:"50%",fontSize:t=>(0,dt.themeSize)(t,"inherit"),backgroundColor:t=>(0,dt.themeColor)(t,"shift-13",o.get(t)),color:t=>(0,dt.themeColor)(t,"shift-0","neutral"),boxShadow:_("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>(0,dt.themeColor)(t,"shift-14",o.get(t)),boxShadow:_("medium")},"&:active:not([disabled])":{backgroundColor:t=>(0,dt.themeColor)(t,"shift-15",o.get(t)),boxShadow:_("low")},"&:focus-visible":{boxShadow:t=>`${_("medium")}, ${S(t,o.get(t))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var Pn=require("@domphy/core"),et=require("@domphy/theme");function wa(r={}){var n;let o=(0,Pn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:(0,et.themeSpacing)(2),marginInline:0,marginTop:(0,et.themeSpacing)(3),marginBottom:(0,et.themeSpacing)(3),color:e=>(0,et.themeColor)(e,"text",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:(0,et.themeSpacing)(2)},"& figcaption":{fontSize:e=>(0,et.themeSize)(e,"decrease-1"),color:e=>(0,et.themeColor)(e,"muted",o.get(e)),lineHeight:1.45}}}}var In=require("@domphy/core"),K=require("@domphy/theme");function Ta(r={}){var s;let{layout:o="horizontal"}=r,n=(0,In.toState)((s=r.color)!=null?s:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},_doctorDisable:"inline-typography",style:{margin:0,paddingInline:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*3),paddingBlock:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*3),border:"none",borderRadius:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*2),fontSize:t=>(0,K.themeSize)(t,"inherit"),backgroundColor:t=>(0,K.themeColor)(t,"inherit",n.get(t)),color:t=>(0,K.themeColor)(t,"text",n.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:(0,K.themeSpacing)(4),rowGap:(0,K.themeSpacing)(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>(0,K.themeSize)(t,"inherit"),fontWeight:600,paddingBlock:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*1),borderRadius:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*2),color:t=>(0,K.themeColor)(t,"text",n.get(t)),backgroundColor:t=>(0,K.themeColor)(t,"inherit",n.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?0:(0,K.themeSpacing)((0,K.themeDensity)(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(${(0,K.themeSpacing)(2)} * -1)`,fontSize:t=>(0,K.themeSize)(t,"decrease-1"),color:t=>(0,K.themeColor)(t,"text",n.get(t))}}}}var co=require("@domphy/theme");function Da(r={}){let{columns:o=1,gap:n=4,align:e}=r;return{style:E({display:"grid",gridTemplateColumns:typeof o=="number"?`repeat(${o}, minmax(0, 1fr))`:o,gap:s=>(0,co.themeSpacing)((0,co.themeDensity)(s)*n)},e?{alignItems:e}:{})}}var On=require("@domphy/core"),Tt=require("@domphy/theme"),Pa={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Ia(r={}){var e;let o=(0,On.toState)((e=r.color)!=null?e:"neutral","color"),n=r.size;return{_onInsert:s=>{["h1","h2","h3","h4","h5","h6"].includes(s.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:s=>(0,Tt.themeColor)(s,"shift-11",o.get(s)),marginTop:0,marginBottom:(0,Tt.themeSpacing)(2),fontSize:s=>{if(n!==void 0)return(0,Tt.themeSize)(s,n);let t=Pa[s.elementNode.tagName]||"inherit";return(0,Tt.themeSize)(s,t)}}}}var Ln=require("@domphy/core"),Ht=require("@domphy/theme");function Oa(r={}){var n;let o=(0,Ln.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},dataTone:"shift-3",style:{border:0,height:"1px",marginInline:0,marginTop:(0,Ht.themeSpacing)(3),marginBottom:(0,Ht.themeSpacing)(3),backgroundColor:e=>(0,Ht.themeColor)(e,"inherit",o.get(e)),color:e=>(0,Ht.themeColor)(e,"text",o.get(e))}}}var zn=require("@domphy/core"),Dt=require("@domphy/theme");function La(r={}){var n;let o=(0,zn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="span"&&console.warn('"icon" primitive patch should use span tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",alignSelf:"center",justifySelf:"center",verticalAlign:"middle",width:(0,Dt.themeSpacing)(4),height:(0,Dt.themeSpacing)(4),flexShrink:"0",fontSize:e=>(0,Dt.themeSize)(e),backgroundColor:"transparent",color:e=>(0,Dt.themeColor)(e,"text",o.get(e))}}}var Rn=require("@domphy/core"),Jt=require("@domphy/theme");function za(r={}){var n;let o=(0,Rn.toState)((n=r.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:(0,Jt.themeSpacing)(2),backgroundColor:e=>(0,Jt.themeColor)(e,"inherit",o.get(e)),color:e=>(0,Jt.themeColor)(e,"text",o.get(e))}}}var Ro=require("@domphy/core"),X=require("@domphy/theme");function Ra(r={}){var e,s;let o=(0,Ro.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Ro.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>(0,X.themeSize)(t,"inherit"),color:t=>(0,X.themeColor)(t,"text",o.get(t)),display:"inline-flex",position:"relative",width:(0,X.themeSpacing)(6),height:(0,X.themeSpacing)(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:(0,X.themeSpacing)(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,X.themeColor)(t,"border-strong",o.get(t))}`,color:t=>(0,X.themeColor)(t,"text",o.get(t)),width:(0,X.themeSpacing)(4),height:(0,X.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,X.themeColor)(t,"hover",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,X.themeColor)(t,"shift-6",n.get(t))}`,backgroundColor:t=>(0,X.themeColor)(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,X.themeColor)(t,"shift-7",n.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${(0,X.themeSpacing)(.5)} solid ${(0,X.themeColor)(t,"inherit",n.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${(0,X.themeColor)(t,"shift-6",n.get(t))}`,backgroundColor:t=>(0,X.themeColor)(t,"shift-3",n.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>(0,X.themeColor)(t,"shift-8",n.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>(0,X.themeColor)(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:(0,X.themeSpacing)(1.5),boxShadow:t=>S(t,n.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,X.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var Vn=require("@domphy/core"),se=require("@domphy/theme");function Va(r={}){var n;let o=(0,Vn.toState)((n=r.color)!=null?n:"neutral","color");return{type:"color",_onInsert:e=>{e.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag')},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:e=>(0,se.themeSize)(e,"inherit"),color:e=>(0,se.themeColor)(e,"text",o.get(e)),paddingBlock:e=>(0,se.themeSpacing)((0,se.themeDensity)(e)*1),paddingInline:e=>(0,se.themeSpacing)((0,se.themeDensity)(e)*1),blockSize:e=>(0,se.themeSpacing)(6+(0,se.themeDensity)(e)*2),inlineSize:e=>(0,se.themeSpacing)(6+(0,se.themeDensity)(e)*2),backgroundColor:"transparent",transition:"box-shadow 140ms ease",borderRadius:e=>(0,se.themeSpacing)((0,se.themeDensity)(e)*1.5),"&:focus-visible":{boxShadow:e=>S(e,o.get(e))},"&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:e=>(0,se.themeSpacing)((0,se.themeDensity)(e)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>(0,se.themeColor)(e,"shift-2","neutral"),outline:e=>`1px solid ${(0,se.themeColor)(e,"border-strong","neutral")}`}}}}var Vo=require("@domphy/core"),ce=require("@domphy/theme");function Ma(r={}){var s,t;let{mode:o="datetime-local"}=r,n=(0,Vo.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,Vo.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{type:o,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag')},style:{fontFamily:"inherit",fontSize:a=>(0,ce.themeSize)(a,"inherit"),lineHeight:"inherit",color:a=>(0,ce.themeColor)(a,"text",n.get(a)),backgroundColor:a=>(0,ce.themeColor)(a,"inherit",n.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${(0,ce.themeColor)(a,"border-strong",n.get(a))}`,borderRadius:a=>(0,ce.themeSpacing)((0,ce.themeDensity)(a)*1.5),paddingInline:a=>(0,ce.themeSpacing)((0,ce.themeDensity)(a)*3),height:a=>(0,ce.themeSpacing)(6+(0,ce.themeDensity)(a)*2),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${(0,ce.themeColor)(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,ce.themeColor)(a,"muted","neutral"),backgroundColor:a=>(0,ce.themeColor)(a,"shift-2","neutral"),outline:a=>`1px solid ${(0,ce.themeColor)(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${(0,ce.themeSpacing)(.5)} solid ${(0,ce.themeColor)(a,"shift-6","error")}`}}}}var Mo=require("@domphy/core"),j=require("@domphy/theme");function _a(r={}){var e,s;let o=(0,Mo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Mo.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"file",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag')},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>(0,j.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,j.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,j.themeColor)(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,j.themeColor)(t,"border-strong",o.get(t))}`,borderRadius:t=>(0,j.themeSpacing)((0,j.themeDensity)(t)*1.5),height:t=>(0,j.themeSpacing)(6+(0,j.themeDensity)(t)*2),paddingInline:t=>(0,j.themeSpacing)((0,j.themeDensity)(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:t=>(0,j.themeSpacing)((0,j.themeDensity)(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:(0,j.themeSpacing)(1),height:(0,j.themeSpacing)(6),paddingInline:(0,j.themeSpacing)(2),cursor:"pointer",color:t=>(0,j.themeColor)(t,"shift-11",o.get(t)),backgroundColor:t=>(0,j.themeColor)(t,"surface",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,j.themeColor)(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>(0,j.themeColor)(t,"muted","neutral"),outline:t=>`1px solid ${(0,j.themeColor)(t,"border-strong","neutral")}`,backgroundColor:t=>(0,j.themeColor)(t,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>(0,j.themeColor)(t,"muted","neutral"),backgroundColor:t=>(0,j.themeColor)(t,"shift-3","neutral")}}}}var _o=require("@domphy/core"),ae=require("@domphy/theme");function Na(r={}){var e,s;let o=(0,_o.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,_o.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"number",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag')},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,ae.themeSpacing)(10),paddingInlineStart:t=>(0,ae.themeSpacing)((0,ae.themeDensity)(t)*3),paddingInlineEnd:t=>(0,ae.themeSpacing)((0,ae.themeDensity)(t)*1.5),paddingBlock:t=>(0,ae.themeSpacing)((0,ae.themeDensity)(t)*1),borderRadius:t=>(0,ae.themeSpacing)((0,ae.themeDensity)(t)*1.5),fontSize:t=>(0,ae.themeSize)(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,ae.themeColor)(t,"border-strong",o.get(t))}`,color:t=>(0,ae.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,ae.themeColor)(t,"inherit",o.get(t)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,ae.themeColor)(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>(0,ae.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,ae.themeColor)(t,"border-strong","neutral")}`,color:t=>(0,ae.themeColor)(t,"muted","neutral")}}}}var No=require("@domphy/theme");function $a(){return{role:"group",ariaLabel:"One-time password",style:{display:"flex",alignItems:"center",gap:(0,No.themeSpacing)(2),"& > *":{minWidth:`${(0,No.themeSpacing)(9)}!important`}},_onMount:r=>{let o=r.domElement,n=()=>Array.from(o.querySelectorAll("input")),e=a=>{let i=n(),m=a.target,u=i.indexOf(m);m.value&&u<i.length-1&&i[u+1].focus()},s=a=>{let i=n(),m=a.target,u=i.indexOf(m);a.key==="Backspace"&&!m.value&&u>0&&i[u-1].focus(),a.key==="ArrowLeft"&&u>0&&i[u-1].focus(),a.key==="ArrowRight"&&u<i.length-1&&i[u+1].focus()},t=a=>{var d,f,h;a.preventDefault();let i=(f=(d=a.clipboardData)==null?void 0:d.getData("text"))!=null?f:"",m=n(),u=m.indexOf(a.target),l=u===-1?0:u;[...i].forEach((C,v)=>{let p=m[l+v];p&&(p.value=C,p.dispatchEvent(new Event("input",{bubbles:!0})),p.dispatchEvent(new Event("change",{bubbles:!0})))});let c=Math.min(l+i.length-1,m.length-1);(h=m[c])==null||h.focus()};o.addEventListener("input",e),o.addEventListener("keydown",s),o.addEventListener("paste",t),r.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",s),o.removeEventListener("paste",t)})}}}var vt=require("@domphy/core"),ge=require("@domphy/theme");var Aa='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"/><path d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"/></svg>',Ba='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.585 10.587a2 2 0 0 0 2.829 2.828"/><path d="M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"/><path d="M3 3l18 18"/></svg>',Ha=["name","value","onInput","disabled","required"];function Mn(r){if(r!=null)return typeof r=="function"?r:(0,vt.isState)(r)?o=>r.get(o):r}function Fa(r={}){var t,a;let o=(0,vt.toState)((t=r.color)!=null?t:"neutral","color"),n=(0,vt.toState)((a=r.accentColor)!=null?a:"primary","accentColor"),e=(0,vt.toState)(!1),s={};return{_onInsert:i=>{i.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onSchedule:(i,m)=>{let u=m;for(let l of Ha)u[l]!==void 0&&(s[l]=u[l],delete u[l])},_onInit:i=>{var C,v,p,b,k,g,D;let m=(C=r.name)!=null?C:s.name,u=Mn((v=r.value)!=null?v:s.value),l=(p=r.onInput)!=null?p:s.onInput,c=Mn((b=r.disabled)!=null?b:s.disabled),d=(k=r.required)!=null?k:s.required,f=z(E(E(E(E(E({input:null,type:w=>e.get(w)?"text":"password",ariaLabel:(g=r.ariaLabel)!=null?g:"Password",autocomplete:(D=r.autocomplete)!=null?D:"current-password"},m!=null?{name:m}:{}),u!=null?{value:u}:{}),l!=null?{onInput:l}:{}),c!=null?{disabled:c}:{}),d!=null?{required:d}:{}),{style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}}),h={button:w=>(0,vt.rawHtml)(e.get(w)?Ba:Aa),type:"button",ariaLabel:w=>e.get(w)?"Hide password":"Show password",onClick:()=>e.set(!e.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",display:"flex",alignItems:"center",flexShrink:0,opacity:.6}};i.children.insert(f),i.children.insert(h)},style:{display:"flex",alignItems:"center",gap:i=>(0,ge.themeSpacing)((0,ge.themeDensity)(i)*1),paddingBlock:i=>(0,ge.themeSpacing)((0,ge.themeDensity)(i)*1),paddingInline:i=>(0,ge.themeSpacing)((0,ge.themeDensity)(i)*3),borderRadius:i=>(0,ge.themeSpacing)((0,ge.themeDensity)(i)*1.5),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${(0,ge.themeColor)(i,"border-strong",o.get(i))}`,color:i=>(0,ge.themeColor)(i,"text",o.get(i)),backgroundColor:i=>(0,ge.themeColor)(i,"inherit",o.get(i)),fontSize:i=>(0,ge.themeSize)(i,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:i=>`1px solid ${(0,ge.themeColor)(i,"shift-5",n.get(i))}`},"&:focus-within":{boxShadow:i=>S(i,n.get(i))}}}}var $o=require("@domphy/core"),be=require("@domphy/theme");function Ka(r={}){var e,s;let o=(0,$o.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,$o.toState)((s=r.accentColor)!=null?s:"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=>(0,be.themeSize)(t,"inherit"),color:t=>(0,be.themeColor)(t,"text",o.get(t)),appearance:"none",display:"inline-flex",position:"relative",width:(0,be.themeSpacing)(6),height:(0,be.themeSpacing)(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 ${(0,be.themeColor)(t,"border-strong",o.get(t))}`,color:t=>(0,be.themeColor)(t,"text",o.get(t)),width:(0,be.themeSpacing)(4),height:(0,be.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,be.themeColor)(t,"hover",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,be.themeColor)(t,"shift-6",n.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>(0,be.themeColor)(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,be.themeColor)(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:"50%",boxShadow:t=>S(t,n.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,be.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var Ao=require("@domphy/core"),Te=require("@domphy/theme");function ja(r={}){var e,s;let o=(0,Ao.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Ao.toState)((s=r.accentColor)!=null?s:"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:(0,Te.themeSpacing)(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:(0,Te.themeSpacing)(1.5),borderRadius:(0,Te.themeSpacing)(999),backgroundColor:t=>(0,Te.themeColor)(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:(0,Te.themeSpacing)(4),height:(0,Te.themeSpacing)(4),borderRadius:(0,Te.themeSpacing)(999),border:"none",marginTop:`calc((${(0,Te.themeSpacing)(1.5)} - ${(0,Te.themeSpacing)(4)}) / 2)`,backgroundColor:t=>(0,Te.themeColor)(t,"shift-9",n.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>(0,Te.themeColor)(t,"shift-10",n.get(t))},borderRadius:(0,Te.themeSpacing)(2),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var Bo=require("@domphy/core"),me=require("@domphy/theme");function Wa(r={}){var e,s;let o=(0,Bo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Bo.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"search",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag')},style:{fontFamily:"inherit",fontSize:t=>(0,me.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,me.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,me.themeColor)(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,me.themeColor)(t,"border-strong",o.get(t))}`,borderRadius:t=>(0,me.themeSpacing)((0,me.themeDensity)(t)*1.5),minWidth:(0,me.themeSpacing)(32),paddingInline:t=>(0,me.themeSpacing)((0,me.themeDensity)(t)*3),paddingBlock:t=>(0,me.themeSpacing)((0,me.themeDensity)(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:t=>(0,me.themeColor)(t,"shift-7",o.get(t))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,me.themeColor)(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>(0,me.themeColor)(t,"muted","neutral"),backgroundColor:t=>(0,me.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,me.themeColor)(t,"border-strong","neutral")}`}}}}var _n=require("@domphy/core"),ue=require("@domphy/theme");function qa(r={}){var n;let o=(0,_n.toState)((n=r.accentColor)!=null?n:"primary","accentColor");return{role:"switch",dataTone:"shift-2",type:"checkbox",_onSchedule:e=>{if(e.tagName!=="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:e=>(0,ue.themeSize)(e,"inherit"),backgroundColor:e=>(0,ue.themeColor)(e,"inherit"),color:e=>(0,ue.themeColor)(e,"text"),appearance:"none",position:"relative",display:"inline-flex",width:(0,ue.themeSpacing)(9),height:(0,ue.themeSpacing)(6),cursor:"pointer",margin:"0",paddingBlock:(0,ue.themeSpacing)(1),transition:"box-shadow 140ms ease",borderRadius:(0,ue.themeSpacing)(999),"&:focus-visible":{boxShadow:e=>S(e,o.get(e))},"&:checked":{"&::before":{backgroundColor:e=>(0,ue.themeColor)(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${(0,ue.themeSpacing)(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:(0,ue.themeSpacing)(3),height:(0,ue.themeSpacing)(3),borderRadius:(0,ue.themeSpacing)(999),left:(0,ue.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>(0,ue.themeColor)(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:(0,ue.themeSpacing)(999),display:"inline-block",fontSize:e=>(0,ue.themeSize)(e,"inherit"),lineHeight:1,backgroundColor:e=>(0,ue.themeColor)(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var Ho=require("@domphy/core"),W=require("@domphy/theme");function Ya(r={}){var s,t;let{type:o="text"}=r,n=(0,Ho.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,Ho.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{type:o,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type')},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,W.themeSpacing)(10),paddingInline:a=>(0,W.themeSpacing)((0,W.themeDensity)(a)*3),paddingBlock:a=>(0,W.themeSpacing)((0,W.themeDensity)(a)*1),borderRadius:a=>(0,W.themeSpacing)((0,W.themeDensity)(a)*1.5),fontSize:a=>(0,W.themeSize)(a,"inherit"),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${(0,W.themeColor)(a,"border-strong",n.get(a))}`,color:a=>(0,W.themeColor)(a,"text",n.get(a)),backgroundColor:a=>(0,W.themeColor)(a,"inherit",n.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>(0,W.themeColor)(a,"shift-7")},"&:not(:placeholder-shown)":{color:a=>(0,W.themeColor)(a,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${(0,W.themeColor)(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:a=>(0,W.themeColor)(a,"shift-2","neutral"),outline:a=>`1px solid ${(0,W.themeColor)(a,"border-strong","neutral")}`,color:a=>(0,W.themeColor)(a,"muted","neutral")},"&:invalid:not(:placeholder-shown)":{outline:a=>`${(0,W.themeSpacing)(.5)} solid ${(0,W.themeColor)(a,"shift-6","error")}`},"&[data-status=error]":{outline:a=>`${(0,W.themeSpacing)(.5)} solid ${(0,W.themeColor)(a,"shift-6","error")}`},"&[data-status=warning]":{outline:a=>`${(0,W.themeSpacing)(.5)} solid ${(0,W.themeColor)(a,"shift-6","warning")}`}}}}var Nn=require("@domphy/core"),De=require("@domphy/theme");function Ga(r={}){var n;let o=(0,Nn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>(0,De.themeSize)(e,"inherit"),color:e=>(0,De.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,De.themeColor)(e,"inherit",o.get(e)),paddingBlock:e=>(0,De.themeSpacing)((0,De.themeDensity)(e)*(.5/1.5)),paddingInline:e=>(0,De.themeSpacing)((0,De.themeDensity)(e)*(1.5/1.5)),borderRadius:e=>(0,De.themeSpacing)((0,De.themeDensity)(e)*(1/1.5)),outline:e=>`1px solid ${(0,De.themeColor)(e,"border-strong",o.get(e))}`}}}var Fo=require("@domphy/core"),Ct=require("@domphy/theme");function Ua(r={}){var e,s;let o=(0,Fo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Fo.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:(0,Ct.themeSpacing)(2),fontSize:t=>(0,Ct.themeSize)(t,"inherit"),color:t=>(0,Ct.themeColor)(t,"text",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>(0,Ct.themeColor)(t,"shift-10",n.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>(0,Ct.themeColor)(t,"muted","neutral")}}}}var Ko=require("@domphy/core"),tt=require("@domphy/theme");function Ja(r={}){var e,s;let o=(0,Ko.toState)((e=r.color)!=null?e:"primary","color"),n=(0,Ko.toState)((s=r.accentColor)!=null?s:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},onClick:(t,a)=>{let i=a.domElement;(i!=null&&i.hasAttribute("disabled")||(i==null?void 0:i.getAttribute("aria-disabled"))==="true")&&t.preventDefault()},style:{fontSize:t=>(0,tt.themeSize)(t,"inherit"),backgroundColor:t=>(0,tt.themeColor)(t),color:t=>(0,tt.themeColor)(t,"shift-13",o.get(t)),textDecoration:"none","&:visited":{color:t=>(0,tt.themeColor)(t,"shift-13",n.get(t))},"&:hover:not([disabled])":{color:t=>(0,tt.themeColor)(t,"shift-14",o.get(t)),textDecoration:"underline"},borderRadius:(0,tt.themeSpacing)(1),outline:"none",transition:"color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:t=>(0,tt.themeColor)(t,"muted","neutral")}}}}var $n=require("@domphy/core"),I=require("@domphy/theme");var Xa={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}},Za={small:.5,medium:1,large:1.5};function Qa(r={}){var i,m,u;let o=(i=r.variant)!=null?i:"outline",n=(0,$n.toState)((m=r.color)!=null?m:o==="ghost"?"neutral":"primary","color"),e=(u=r.size)!=null?u:"medium",s=Nt[e];if(o==="ghost"){let l=Za[e];return{_onInsert:c=>{c.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:c=>(0,I.themeSize)(c,s),textDecoration:"none",paddingBlock:c=>(0,I.themeSpacing)((0,I.themeDensity)(c)*l),paddingInline:c=>(0,I.themeSpacing)((0,I.themeDensity)(c)*l),borderRadius:c=>(0,I.themeSpacing)((0,I.themeDensity)(c)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:c=>(0,I.themeSpacing)((0,I.themeDensity)(c)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:c=>(0,I.themeColor)(c,"text",n.get(c)),"&:hover:not([aria-disabled=true])":{color:c=>(0,I.themeColor)(c,"text",n.get(c)),backgroundColor:c=>(0,I.themeColor)(c,"hover",n.get(c)),textDecoration:"none"},"&:active:not([aria-disabled=true])":{color:c=>(0,I.themeColor)(c,"text",n.get(c)),backgroundColor:c=>(0,I.themeColor)(c,"increase-2",n.get(c))},"&:focus-visible":{boxShadow:c=>S(c,n.get(c))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:c=>(0,I.themeColor)(c,"border-strong","neutral")}}}}let t=o==="solid",a=Xa[e];return z(E({_onInsert:l=>{l.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')}},t?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{fontSize:l=>(0,I.themeSize)(l,s),textDecoration:"none",paddingBlock:l=>(0,I.themeSpacing)((0,I.themeDensity)(l)*a.block),paddingInline:l=>(0,I.themeSpacing)((0,I.themeDensity)(l)*a.inline),borderRadius:l=>(0,I.themeSpacing)((0,I.themeDensity)(l)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:l=>(0,I.themeSpacing)((0,I.themeDensity)(l)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:t?"none":l=>`1px solid ${(0,I.themeColor)(l,"border-strong",n.get(l))}`,color:l=>t?(0,I.themeColor)(l,"shift-0","neutral"):(0,I.themeColor)(l,"shift-13",n.get(l)),backgroundColor:l=>t?(0,I.themeColor)(l,"shift-13",n.get(l)):(0,I.themeColor)(l,"inherit",n.get(l)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([aria-disabled=true])":{textDecoration:"none",color:l=>t?(0,I.themeColor)(l,"shift-0","neutral"):(0,I.themeColor)(l,"shift-14",n.get(l)),backgroundColor:l=>t?(0,I.themeColor)(l,"shift-14",n.get(l)):(0,I.themeColor)(l,"hover",n.get(l))},"&:active:not([aria-disabled=true])":{backgroundColor:l=>t?(0,I.themeColor)(l,"shift-15",n.get(l)):(0,I.themeColor)(l,"increase-2",n.get(l))},"&:focus-visible":{boxShadow:l=>S(l,n.get(l))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:l=>(0,I.themeColor)(l,"shift-2","neutral"),outline:l=>`1px solid ${(0,I.themeColor)(l,"border-strong","neutral")}`,color:l=>(0,I.themeColor)(l,"muted","neutral")}}})}var An=require("@domphy/core"),B=require("@domphy/theme");function ei(r={}){var n;let o=(n=r.color)!=null?n:"neutral";return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",backgroundColor:e=>(0,B.themeColor)(e,"inherit",o),color:e=>(0,B.themeColor)(e,"text",o)}}}function ti(r={}){let{dense:o=!1}=r;return{style:{display:"flex",alignItems:"center",gap:n=>(0,B.themeSpacing)((0,B.themeDensity)(n)*2),paddingBlock:n=>(0,B.themeSpacing)(o?1:(0,B.themeDensity)(n)*2),paddingInline:n=>(0,B.themeSpacing)((0,B.themeDensity)(n)*3),fontSize:n=>(0,B.themeSize)(n,"inherit"),color:n=>(0,B.themeColor)(n,"text")}}}function oi(r={}){var s,t;let o=(0,An.toState)((s=r.color)!=null?s:"neutral","color"),n=(t=r.accentColor)!=null?t:"primary",{dense:e=!1}=r;return{style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>(0,B.themeSpacing)((0,B.themeDensity)(a)*2),paddingBlock:a=>(0,B.themeSpacing)(e?1:(0,B.themeDensity)(a)*2),paddingInline:a=>(0,B.themeSpacing)((0,B.themeDensity)(a)*3),fontSize:a=>(0,B.themeSize)(a,"inherit"),color:a=>(0,B.themeColor)(a,"text",o.get(a)),borderRadius:a=>(0,B.themeSpacing)((0,B.themeDensity)(a)*1.5),transition:"background-color 150ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:a=>(0,B.themeColor)(a,"hover",o.get(a))},"&:active:not([disabled])":{backgroundColor:a=>(0,B.themeColor)(a,"increase-2",o.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>(0,B.themeColor)(a,"shift-3",n),color:a=>(0,B.themeColor)(a,"shift-12",n)},"&:focus-visible":{boxShadow:a=>S(a,n)},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var Bn=require("@domphy/core"),Ve=require("@domphy/theme");function ni(r={}){var n;let o=(0,Bn.toState)((n=r.accentColor)!=null?n:"highlight","accentColor");return{_onInsert:e=>{e.tagName!=="mark"&&console.warn('"mark" primitive patch must use mark tag')},dataTone:"shift-2",style:{display:"inline-flex",alignItems:"center",fontSize:e=>(0,Ve.themeSize)(e,"inherit"),color:e=>(0,Ve.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,Ve.themeColor)(e,"inherit",o.get(e)),height:e=>(0,Ve.themeSpacing)((0,Ve.themeDensity)(e)*(6/1.5)),borderRadius:e=>(0,Ve.themeSpacing)((0,Ve.themeDensity)(e)*(1/1.5)),paddingInline:e=>(0,Ve.themeSpacing)((0,Ve.themeDensity)(e)*(1.5/1.5))}}}var mo=require("@domphy/core"),G=require("@domphy/theme");function ri(r={items:[]}){var l;let{items:o=[],selectable:n=!0,color:e="neutral",accentColor:s="primary"}=r,t=(0,mo.toState)((l=r.activeKey)!=null?l:null),a=r.activeKey!==void 0,i=(c,d)=>{let f=c.nodeId;return d.items.map((h,C)=>{var p;let v=(p=h.key)!=null?p:C;return z(E({button:typeof h.label=="string"?[{span:h.label}]:[h.label],_key:v,type:"button",id:`menuitem${f}${v}`,role:"menuitem"},d.selectable?{ariaCurrent:b=>d.activeKey.get(b)===v||void 0}:{}),{onClick:()=>{var b;d.selectable&&d.activeKey.set(v),(b=h.onClick)==null||b.call(h)},onKeyDown:b=>{var q;let k=b.key;if(k==="Enter"||k===" "){b.preventDefault(),b.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(k))return;b.preventDefault();let g=d.items.map((ve,Ie)=>{var Z;return(Z=ve.key)!=null?Z:Ie}),D=g.indexOf(v),w=D;k==="ArrowDown"?w=(D+1)%g.length:k==="ArrowUp"?w=(D-1+g.length)%g.length:k==="Home"?w=0:k==="End"&&(w=g.length-1),(q=document.getElementById(`menuitem${f}${g[w]}`))==null||q.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:(0,G.themeSpacing)(2),width:"100%",fontSize:b=>(0,G.themeSize)(b,"inherit"),height:b=>(0,G.themeSpacing)(6+(0,G.themeDensity)(b)*2),paddingInline:b=>(0,G.themeSpacing)((0,G.themeDensity)(b)*3),border:"none",outline:"none",color:b=>(0,G.themeColor)(b,"text",d.color),backgroundColor:b=>(0,G.themeColor)(b,"inherit",d.color),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:b=>(0,G.themeColor)(b,"hover",d.color)},"&[aria-current=true]":{backgroundColor:b=>(0,G.themeColor)(b,"shift-3",d.accentColor),color:b=>(0,G.themeColor)(b,"shift-13",d.accentColor)},"&:focus-visible":{boxShadow:b=>S(b,d.accentColor)}}})})},m=(c,d)=>{let f=d;return{update(h){h.activeKey!==f.activeKey&&!h.activeKeyIsCallerOwned&&h.activeKey.set(f.activeKey.get()),f=h,f.items.length!==0&&c.children.update(i(c,f))}}},u={items:o,activeKey:t,activeKeyIsCallerOwned:a,selectable:n,color:e,accentColor:s};return z(E({role:"menu",dataTone:"shift-0",_onSchedule:(c,d)=>{o.length!==0&&(d[c.tagName]=i(c,u))}},(0,mo.behavior)("menu",m,u)),{style:{display:"flex",flexDirection:"column",paddingBlock:c=>(0,G.themeSpacing)((0,G.themeDensity)(c)*2),paddingInline:c=>(0,G.themeSpacing)((0,G.themeDensity)(c)*2),fontSize:c=>(0,G.themeSize)(c,"inherit"),backgroundColor:c=>(0,G.themeColor)(c,"inherit",e),color:c=>(0,G.themeColor)(c,"text",e),borderRadius:c=>(0,G.themeSpacing)((0,G.themeDensity)(c)*2),outline:c=>`1px solid ${(0,G.themeColor)(c,"border-strong",e)}`,outlineOffset:"-1px",boxShadow:_("medium")}})}var Fn=require("@domphy/core");var Hn=r=>!!r&&typeof r.get=="function"&&r._isState===!0,ot=r=>{let o={},n=[];for(let e in r){let s=r[e];e==="x"?n.push(`translateX(${typeof s=="number"?`${s}px`:s})`):e==="y"?n.push(`translateY(${typeof s=="number"?`${s}px`:s})`):e==="scale"?n.push(`scale(${s})`):e==="rotate"?n.push(`rotate(${typeof s=="number"?`${s}deg`:s})`):o[e]=s}return n.length&&(o.transform=n.join(" ")),o};function jo(r={}){var o,n,e,s;return{duration:(o=r.duration)!=null?o:300,delay:(n=r.delay)!=null?n:0,easing:(e=r.easing)!=null?e:"ease",iterations:(s=r.iterations)!=null?s:1,fill:"both"}}function Wo(){if(typeof matchMedia!="function")return!1;try{return matchMedia("(prefers-reduced-motion: reduce)").matches}catch(r){return!1}}function ai(r,o){let n=r.domElement,e=o,s,t=i=>{s==null||s(),s=void 0,!(!n||!Hn(i))&&(s=i.addListener(m=>{Wo()?Object.assign(n.style,ot(m)):typeof n.animate=="function"&&n.animate([ot(m)],jo(e.transition))}))},a=(i,m)=>{if(!n)return;let u=Hn(i.animate)?i.animate.get():i.animate;if(Wo()){u?Object.assign(n.style,ot(u)):m==="enter"&&i.initial&&Object.assign(n.style,ot(i.initial));return}if(typeof n.animate=="function")if(u){let l=m==="enter"&&i.initial?[ot(i.initial),ot(u)]:[ot(u)];n.animate(l,jo(i.transition))}else m==="enter"&&i.initial&&Object.assign(n.style,ot(i.initial))};return a(o,"enter"),t(o.animate),{play:a,getExit:()=>e.exit,getTransition:()=>e.transition,update(i){e=i,a(i,"update"),t(i.animate)},destroy(){s==null||s()}}}function ii(r={}){return z(E({},(0,Fn.behavior)("motion",(o,n)=>ai(o,n),r)),{_onBeforeRemove:(o,n)=>{var a,i;let e=o.domElement,s=o.getBehavior("motion"),t=(a=s==null?void 0:s.getExit())!=null?a:r.exit;if(!e||!t||typeof e.animate!="function")return n();if(Wo())return Object.assign(e.style,ot(t)),n();e.animate([ot(t)],jo((i=s==null?void 0:s.getTransition())!=null?i:r.transition)).finished.then(n,n)}})}var Kn=require("@domphy/core"),Pt=require("@domphy/theme");function li(r={}){var n;let o=(0,Kn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>(0,Pt.themeSize)(e,"inherit"),backgroundColor:e=>(0,Pt.themeColor)(e),color:e=>(0,Pt.themeColor)(e,"text",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,Pt.themeSpacing)(3),listStyleType:"decimal",listStylePosition:"outside"}}}var It=require("@domphy/core"),te=require("@domphy/theme");function si(r,o){if(o<=7)return Array.from({length:o},(t,a)=>a+1);let n=[1];r>3&&n.push("...");let e=Math.max(2,r-1),s=Math.min(o-1,r+1);for(let t=e;t<=s;t++)n.push(t);return r<o-2&&n.push("..."),n.push(o),n}function ci(r,o,n,e){if((0,It.isState)(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=(0,It.toState)(n!=null?n:e),r.setMetadata(o,s)),s}function jn(r,o){let n=r.getMetadata("paginationTotal");return n||(n=(0,It.toState)(o),r.setMetadata("paginationTotal",n)),n}function mi(r){let{total:o,color:n="neutral",accentColor:e="primary"}=r,s={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:a=>(0,te.themeSpacing)(6+(0,te.themeDensity)(a)*2),height:a=>(0,te.themeSpacing)(6+(0,te.themeDensity)(a)*2),paddingInline:a=>(0,te.themeSpacing)((0,te.themeDensity)(a)*2),borderRadius:a=>(0,te.themeSpacing)((0,te.themeDensity)(a)*1.5),border:"none",cursor:"pointer",fontSize:a=>(0,te.themeSize)(a,"inherit"),backgroundColor:"transparent",color:a=>(0,te.themeColor)(a,"shift-13",n),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled])":{color:a=>(0,te.themeColor)(a,"shift-13",n),backgroundColor:a=>(0,te.themeColor)(a,"hover",n)},"&:focus-visible":{boxShadow:a=>S(a,e)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},t=z(E({},s),{backgroundColor:a=>(0,te.themeColor)(a,"shift-13",e),color:a=>(0,te.themeColor)(a,"shift-0","neutral"),fontWeight:"bold",cursor:"default","&:hover:not([disabled])":{backgroundColor:a=>(0,te.themeColor)(a,"shift-13",e)}});return z(E({role:"navigation",ariaLabel:"Pagination",_doctorDisable:"inline-typography",_onInsert:a=>{a.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:a=>{let i=ci(a,"paginationPage",r.value,1),m=jn(a,o),u={div:l=>{let c=i.get(l),d=m.get(l),f=[];f.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:c<=1,onClick:()=>c>1&&i.set(c-1),style:s});let h=0;for(let C of si(c,d))if(C==="...")f.push({span:"\u2026",_key:`ellipsis-${h++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:v=>(0,te.themeSpacing)((0,te.themeDensity)(v)*2),color:v=>(0,te.themeColor)(v,"shift-7",n)}});else{let v=C===c;f.push({button:String(C),_key:`page-${C}`,type:"button",ariaLabel:`Page ${C}`,ariaCurrent:v?"page":void 0,disabled:v,onClick:()=>i.set(C),style:v?t:s})}return f.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:c>=d,onClick:()=>c<d&&i.set(c+1),style:s}),f},style:{display:"flex",alignItems:"center",gap:(0,te.themeSpacing)(1)}};a.children.insert(u)}},(0,It.behavior)("pagination-total",a=>({update(i){jn(a,i.total).set(i.total)}}),{total:o})),{style:{display:"inline-flex"}})}var Wn=require("@domphy/core"),Ft=require("@domphy/theme");function ui(r={}){var s;let{padding:o=4,divider:n=!1}=r,e=(0,Wn.toState)((s=r.color)!=null?s:"neutral","color");return{style:E({padding:t=>(0,Ft.themeSpacing)((0,Ft.themeDensity)(t)*o)},n?{borderBottom:t=>`1px solid ${(0,Ft.themeColor)(t,"border",e.get(t))}`}:{})}}var qn=require("@domphy/core"),uo=require("@domphy/theme");function di(r={}){var n;let o=(0,qn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>(0,uo.themeSize)(e,"inherit"),color:e=>(0,uo.themeColor)(e,"text",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}var Xt=require("@domphy/core"),xt=require("@domphy/theme");function pi(r){if(typeof r.dataTone=="string")return!0;let n=r.$;return n?n.some(e=>e!=null&&typeof e.dataTone=="string"):!1}function hi(r){var c;let{open:o=!1,placement:n="bottom",openOn:e="click"}=r,s=(0,Xt.toState)(o),t=(0,Xt.toState)(n),{show:a,hide:i,anchorPartial:m}=Qe({kind:"popover",open:s,onDismiss:r.onDismiss,placement:t,content:r.content,keepOpenOnContentHover:e==="hover"}),u={role:"dialog",dataTone:"shift-0",style:{backgroundColor:d=>(0,xt.themeColor)(d,"inherit"),color:d=>(0,xt.themeColor)(d,"text"),borderRadius:d=>(0,xt.themeSpacing)((0,xt.themeDensity)(d)*2),outline:d=>`1px solid ${(0,xt.themeColor)(d,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}};return pi(r.content)||((c=r.content).$||(c.$=[]),r.content.$.push(u)),(0,Xt.merge)(m,{ariaHaspopup:"dialog",ariaExpanded:d=>s.get(d),ariaControls:d=>d!=null&&d.elementNode?Re("popover",d.elementNode):void 0,onMouseEnter:(d,f)=>e==="hover"&&a(f),onMouseLeave:(d,f)=>e==="hover"&&i(f),onClick:(d,f)=>{e==="click"&&(s.get()?i(f):a(f))},onKeyDown:(d,f)=>{d.key==="Escape"&&s.get()&&i(f)},onFocus:(d,f)=>e==="hover"&&a(f),onBlur:(d,f)=>{if(e!=="hover")return;let h=d.relatedTarget,v=f.getRoot().domElement.querySelector(`#${Re("popover",f)}`);h&&(v!=null&&v.contains(h))||i(f)}}),m}var Yn=require("@domphy/core"),je=require("@domphy/theme");function qo(r={}){let{placement:o="bottom-end",color:n="neutral",sideOffset:e=(0,je.themeSpacing)(6),bordered:s=!0}=r,t=(0,Yn.toState)(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"},i=l=>{var c;return(c=a[t.get(l)])!=null?c:a["bottom-end"]},m=l=>l.includes("start")?e:l.includes("end")?"auto":"50%",u=l=>l.includes("end")?e:l.includes("start")?"auto":"50%";return{style:{fontSize:l=>(0,je.themeSize)(l),backgroundColor:l=>(0,je.themeColor)(l),color:l=>(0,je.themeColor)(l,"text",n),position:"relative","&::after":{content:'""',position:"absolute",width:(0,je.themeSpacing)(1.5),height:(0,je.themeSpacing)(1.5),backgroundColor:l=>(0,je.themeColor)(l,"inherit",n),borderWidth:s?"1px":0,borderColor:l=>(0,je.themeColor)(l,"border-strong",n),borderTopStyle:l=>{let c=i(l);return c.includes("top")||c.includes("right")?"solid":"none"},borderBottomStyle:l=>{let c=i(l);return c.includes("bottom")||c.includes("left")?"solid":"none"},borderLeftStyle:l=>{let c=i(l);return c.includes("top")||c.includes("left")?"solid":"none"},borderRightStyle:l=>{let c=i(l);return c.includes("bottom")||c.includes("right")?"solid":"none"},top:l=>{let c=i(l);return c.includes("top")?0:c.includes("bottom")?"auto":m(c)},right:l=>{let c=i(l);return c.includes("right")?0:c.includes("left")?"auto":u(c)},bottom:l=>{let c=i(l);return c.includes("bottom")?0:c.includes("top")?"auto":u(c)},left:l=>{let c=i(l);return c.includes("left")?0:c.includes("right")?"auto":m(c)},transform:l=>{let c=i(l),d=c.includes("right")||c.includes("end")&&!c.includes("left")?"50%":"-50%",f=c.includes("bottom")||c.includes("end")&&!c.includes("top")?"50%":"-50%";return`translate(${d},${f}) rotate(45deg)`}}}}}var Gn=require("@domphy/core"),Me=require("@domphy/theme");function fi(r={}){var n;let o=(0,Gn.toState)((n=r.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>(0,Me.themeSize)(e,"inherit"),color:e=>(0,Me.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,Me.themeColor)(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>(0,Me.themeSpacing)((0,Me.themeDensity)(e)*2),paddingInline:e=>(0,Me.themeSpacing)((0,Me.themeDensity)(e)*3),borderRadius:e=>(0,Me.themeSpacing)((0,Me.themeDensity)(e)*2)}}}var Yo=require("@domphy/core"),nt=require("@domphy/theme");function gi(r={}){var e,s;let o=(0,Yo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Yo.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},dataTone:"shift-3",style:{appearance:"none",width:"100%",height:(0,nt.themeSpacing)(2),border:0,borderRadius:(0,nt.themeSpacing)(999),overflow:"hidden",backgroundColor:t=>(0,nt.themeColor)(t,"inherit",o.get(t)),color:t=>(0,nt.themeColor)(t,"text",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>(0,nt.themeColor)(t,"inherit",o.get(t)),borderRadius:(0,nt.themeSpacing)(999)},"&::-webkit-progress-value":{backgroundColor:t=>(0,nt.themeColor)(t,"shift-9",n.get(t)),borderRadius:(0,nt.themeSpacing)(999),transition:"width 220ms ease"}}}}var pt=require("@domphy/core"),Ot=require("@domphy/theme");var yi='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>',bi='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/></svg>';function Un(r,o){var n,e,s;r.onChange=o.onChange,r.readOnly=(n=o.readOnly)!=null?n:!1,r.max=(e=o.max)!=null?e:5,r.color=(s=o.color)!=null?s:"warning",(0,pt.isState)(o.value)?o.value!==r.valueState&&r.valueState.set(o.value.get()):o.value!==void 0&&r.valueState.set(o.value)}function Si(r,o,n,e){let s=a=>{let i=e.get(a);return i>0?i:n.valueState.get(a)},t={button:a=>(0,pt.rawHtml)(o<=s(a)?yi:bi),_key:o,type:"button",ariaLabel:`${o} star${o>1?"s":""}`,onClick:()=>{var i;if(n.readOnly)return;let a=o===n.valueState.get()?0:o;n.valueState.set(a),(i=n.onChange)==null||i.call(n,a),e.set(0)},onMouseEnter:()=>{n.readOnly||e.set(o)},onMouseLeave:()=>e.set(0),onKeyDown:a=>{var l,c,d;if(n.readOnly)return;let i=n.valueState.get(),m=i;if(a.key==="ArrowRight"||a.key==="ArrowUp")m=Math.min(n.max,i+1),a.preventDefault();else if(a.key==="ArrowLeft"||a.key==="ArrowDown")m=Math.max(0,i-1),a.preventDefault();else return;n.valueState.set(m),(l=n.onChange)==null||l.call(n,m);let u=m>0?m-1:0;(d=(c=r.domElement)==null?void 0:c.children[u])==null||d.focus()},style:{background:"none",border:"none",outline:"none",borderRadius:(0,Ot.themeSpacing)(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:a=>S(a,n.color)}}};r.children.insert(t)}function Go(r,o,n){let e=r.children.items;for(;e.length>o.max;)r.children.remove(e[e.length-1]);for(let s=e.length+1;s<=o.max;s++)Si(r,s,o,n)}function vi(r={}){var e,s,t,a,i,m,u;let o={valueState:(0,pt.toState)((e=r.value)!=null?e:0),onChange:r.onChange,readOnly:(s=r.readOnly)!=null?s:!1,max:(t=r.max)!=null?t:5,color:(a=r.color)!=null?a:"warning"},n=(0,pt.toState)(0);return z(E({role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:(0,Ot.themeSpacing)(.5),fontSize:l=>(0,Ot.themeSize)(l,"increase-1"),cursor:o.readOnly?"default":"pointer",color:l=>(0,Ot.themeColor)(l,"muted",o.color)}},(0,pt.behavior)("rating",(l,c)=>(Un(o,c),Go(l,o,n),{update(d){Un(o,d),Go(l,o,n)}}),{value:r.value,max:(i=r.max)!=null?i:5,onChange:r.onChange,readOnly:(m=r.readOnly)!=null?m:!1,color:(u=r.color)!=null?u:"warning"})),{_onInit:l=>{Go(l,o,n)}})}var po=require("@domphy/core"),Lt=require("@domphy/theme");function Ci(r={}){var m,u,l;let{size:o=16,thickness:n=.25}=r,e=(0,po.toState)((m=r.value)!=null?m:0,"value"),s=(0,po.toState)((u=r.color)!=null?u:"primary","color"),t=(0,po.toState)((l=r.trackColor)!=null?l:"neutral","trackColor"),a=Math.round((1-n)*100),i=`radial-gradient(circle closest-side, transparent ${a}%, black ${a}%)`;return{role:"progressbar",ariaValuenow:c=>String(Math.round(e.get(c))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:c=>{c.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:(0,Lt.themeSpacing)(o),height:(0,Lt.themeSpacing)(o),borderRadius:"50%",color:c=>(0,Lt.themeColor)(c,"shift-9",s.get(c)),background:c=>`conic-gradient(from -90deg, ${(0,Lt.themeColor)(c,"shift-9",s.get(c))} ${e.get(c)}%, ${(0,Lt.themeColor)(c,"shift-3",t.get(c))} 0%)`,WebkitMask:i,mask:i}}}var Zt=require("@domphy/theme");function Uo(r={}){let{gap:o=4,align:n="center",justify:e,wrap:s=!1,density:t=!0}=r;return{style:E(E({display:"flex",alignItems:n,gap:t?a=>(0,Zt.themeSpacing)((0,Zt.themeDensity)(a)*o):()=>(0,Zt.themeSpacing)(o)},e?{justifyContent:e}:{}),s?{flexWrap:"wrap"}:{})}}var Jn=require("@domphy/core"),rt=require("@domphy/theme");function xi(r={}){var n;let o=(0,Jn.toState)((n=r.color)!=null?n:"neutral","color");return{style:{overflow:"auto",color:e=>(0,rt.themeColor)(e,"text",o.get(e)),"&::-webkit-scrollbar":{width:(0,rt.themeSpacing)(2),height:(0,rt.themeSpacing)(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>(0,rt.themeColor)(e,"shift-5",o.get(e)),borderRadius:(0,rt.themeSpacing)(999),border:`${(0,rt.themeSpacing)(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e=>(0,rt.themeColor)(e,"shift-7",o.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${(0,rt.themeColor)(e,"shift-5",o.get(e))} transparent`}}}var zt=require("@domphy/core"),he=require("@domphy/theme");function Xn(r,o,n,e){if((0,zt.isState)(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=(0,zt.toState)(n!=null?n:e),r.setMetadata(o,s)),s}function Ei(r,o,n,e){var u;let s=r.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(s))return;r.preventDefault();let t=o.map((l,c)=>{var d;return(d=l.key)!=null?d:String(c)}),a=t.indexOf(n),i=a;s==="ArrowRight"?i=(a+1)%t.length:s==="ArrowLeft"?i=(a-1+t.length)%t.length:s==="Home"?i=0:s==="End"&&(i=t.length-1),e.set(t[i]);let m=r.target.closest("[role=radiogroup]");(u=m==null?void 0:m.querySelectorAll("[role=radio]")[i])==null||u.focus()}function Zn(r,o,n,e){return r.map((s,t)=>{var m;let a=(m=s.key)!=null?m:String(t);return{button:[typeof s.label=="string"?{span:s.label}:s.label],_key:a,type:"button",role:"radio",ariaChecked:u=>o.get(u)===a,tabIndex:u=>{var c,d;let l=o.get(u);return l===a||l===""&&a===((d=(c=r[0])==null?void 0:c.key)!=null?d:"")?0:-1},onClick:()=>o.set(a),onKeyDown:u=>Ei(u,r,a,o),style:{cursor:"pointer",fontSize:u=>(0,he.themeSize)(u,"inherit"),height:(0,he.themeSpacing)(6),paddingBlock:(0,he.themeSpacing)(1),paddingInline:(0,he.themeSpacing)(3),border:"none",borderRadius:(0,he.themeSpacing)(10),color:u=>(0,he.themeColor)(u,"text",n),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>(0,he.themeColor)(u,"shift-3",n)},"&:active:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>(0,he.themeColor)(u,"increase-2",n)},"&[aria-checked=true]":{backgroundColor:u=>(0,he.themeColor)(u,"shift-0",e),color:u=>(0,he.themeColor)(u,"shift-10",e),boxShadow:_("low")},"&:focus-visible":{boxShadow:u=>S(u,e)},"&[aria-checked=true]:focus-visible":{boxShadow:u=>`${_("low")}, ${S(u,e)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function ki(r={items:[]}){var t,a,i;let{items:o=[],color:n="neutral",accentColor:e="primary"}=r,s={items:o,color:n,accentColor:e};return z(E({role:"radiogroup",_context:{segmented:{value:(0,zt.toState)((i=(a=r.value)!=null?a:(t=o[0])==null?void 0:t.key)!=null?i:"")}},_onSchedule:(m,u)=>{var c,d;let l=Xn(m,"segmentedValue",r.value,(d=(c=o[0])==null?void 0:c.key)!=null?d:"");u[m.tagName]=Zn(o,l,n,e)}},(0,zt.behavior)("segmented-items",m=>({update(u){var c,d;let l=Xn(m,"segmentedValue",r.value,(d=(c=u.items[0])==null?void 0:c.key)!=null?d:"");m.children.update(Zn(u.items,l,u.color,u.accentColor),!!m.domElement,!0)}}),s)),{dataTone:"shift-2",style:{display:"inline-flex",paddingBlock:(0,he.themeSpacing)(1),paddingInline:(0,he.themeSpacing)(1),gap:(0,he.themeSpacing)(.5),borderRadius:(0,he.themeSpacing)(10),backgroundColor:m=>(0,he.themeColor)(m,"inherit",n),color:m=>(0,he.themeColor)(m,"text",n)}})}var A=require("@domphy/theme");function wi(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{_onInsert:e=>{e.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:e=>(0,A.themeSize)(e,"inherit"),lineHeight:"inherit",color:e=>(0,A.themeColor)(e,"text",o),backgroundColor:e=>(0,A.themeColor)(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${(0,A.themeColor)(e,"border-strong",o)}`,borderRadius:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*1.5),paddingBlock:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*1),paddingLeft:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*3),paddingRight:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*5),backgroundImage:e=>{let s=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${(0,A.themeColorToken)(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(s)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${(0,A.themeSpacing)(2)} center`,backgroundSize:`${(0,A.themeSpacing)(2.5)} ${(0,A.themeSpacing)(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:e=>(0,A.themeSpacing)(6+(0,A.themeDensity)(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`1px solid ${(0,A.themeColor)(e,"shift-5",n)}`},"&:focus-visible":{boxShadow:e=>S(e,n)},"& optgroup":{color:e=>(0,A.themeColor)(e,"shift-11",o)},"& option[disabled]":{color:e=>(0,A.themeColor)(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>(0,A.themeColor)(e,"muted","neutral"),outline:e=>`1px solid ${(0,A.themeColor)(e,"border-strong","neutral")}`,backgroundColor:e=>(0,A.themeColor)(e,"shift-2","neutral")}}}}var ht=require("@domphy/core"),ie=require("@domphy/theme");var Ti=1e3;function Di(r){let o=r.getMetadata("selectBoxTypeahead");return o||(o={buffer:"",timer:null},r.setMetadata("selectBoxTypeahead",o)),o}var Qn=(r,o)=>r.trim().toLowerCase().startsWith(o);function Pi(r){return r?Array.from(r.querySelectorAll("[role=option]")).filter(o=>o.getAttribute("aria-disabled")!=="true"&&!o.hasAttribute("disabled")):[]}function Ii(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:s=!1,multiple:t=!1}=r,a=(0,ht.toState)(r.value),i=(0,ht.toState)(s),{show:m,hide:u,anchorPartial:l}=Qe({kind:"selectBox",open:i,onDismiss:r.onDismiss,placement:(0,ht.toState)(n),content:r.content}),c={onClick:(p,b)=>!t&&u(b),dataTone:"shift-0",style:{backgroundColor:p=>(0,ie.themeColor)(p,"inherit"),color:p=>(0,ie.themeColor)(p,"text"),borderRadius:p=>(0,ie.themeSpacing)((0,ie.themeDensity)(p)*2),outline:p=>`1px solid ${(0,ie.themeColor)(p,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}};(0,ht.merge)(r.content,c);let d=p=>({div:b=>{let k=p.state.get(b),g=Array.isArray(k)?k:[k];return p.options.filter(w=>g.includes(w.value)).map(w=>({span:w.label,$:[Yt({color:p.color,removable:p.multiple})],_key:w.value,_onRemove:q=>{let ve=p.state.get(),Z=(Array.isArray(ve)?ve:[ve]).filter(He=>He!==w.value);p.multiple?p.state.set(Z):p.state.set(Z[0])}}))},_key:"selectBoxWrap",style:{display:"flex",flexWrap:"wrap",gap:(0,ie.themeSpacing)(1),flex:1}}),f=(p,b)=>({update(k){p.children.update([d(k)])}}),h=p=>i.get()?u(p):m(p),C=(p,b)=>{var Ie,Z,He,re;let k=Di(b);k.timer&&clearTimeout(k.timer),k.buffer+=p.toLowerCase(),k.timer=setTimeout(()=>{k.buffer=""},Ti);let g=k.buffer.length>1&&new Set(k.buffer).size===1,D=g?k.buffer[0]:k.buffer;if(i.get()){let Ee=b.getRoot().domElement,Ge=(Ie=Ee==null?void 0:Ee.querySelector(`#${Re("selectBox",b)}`))!=null?Ie:null,Oe=Pi(Ge).filter(kt=>{var it;return Qn((it=kt.textContent)!=null?it:"",D)});if(!Oe.length)return;let Et=(He=(Z=b.domElement)==null?void 0:Z.ownerDocument)==null?void 0:He.activeElement,at=g&&Et?Oe.indexOf(Et):-1,Ue=Oe[(at+1)%Oe.length];Ue.focus(),(re=Ue.scrollIntoView)==null||re.call(Ue,{block:"nearest"});return}if(t)return;let w=o.filter(Ee=>Qn(Ee.label,D));if(!w.length)return;let q=g?w.findIndex(Ee=>Ee.value===a.get()):-1,ve=w[(q+1)%w.length];a.set(ve.value)},v=z(E({_onInsert:p=>{p.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onSchedule:(p,b)=>{b[p.tagName]=[d({options:o,multiple:t,color:e,state:a})]}},(0,ht.behavior)("selectBoxInner",f,{options:o,multiple:t,color:e,state:a})),{onClick:(p,b)=>h(b),tabindex:0,role:"button",ariaExpanded:p=>i.get(p),ariaHaspopup:"listbox",ariaControls:p=>p!=null&&p.elementNode?Re("selectBox",p.elementNode):void 0,onKeyDown:(p,b)=>{let k=p.key;if(k==="Escape"){u(b);return}if(k==="Enter"||k===" "){p.preventDefault(),h(b);return}if(k==="ArrowDown"&&!i.get()){p.preventDefault(),m(b);return}let g=p;k.length===1&&!g.ctrlKey&&!g.metaKey&&!g.altKey&&C(k,b)},style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:p=>(0,ie.themeSpacing)(6+(0,ie.themeDensity)(p)*2),minWidth:(0,ie.themeSpacing)(32),outlineOffset:"-1px",outline:p=>`1px solid ${(0,ie.themeColor)(p,"border-strong","neutral")}`,paddingInline:p=>(0,ie.themeSpacing)((0,ie.themeDensity)(p)*2),borderRadius:p=>(0,ie.themeSpacing)((0,ie.themeDensity)(p)*1.5),fontSize:p=>(0,ie.themeSize)(p,"inherit"),color:p=>(0,ie.themeColor)(p,"text",e),backgroundColor:p=>(0,ie.themeColor)(p,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:p=>S(p,e)}}});return(0,ht.merge)(l,v),l}var Pe=require("@domphy/theme");function Oi(r={}){let{accentColor:o="primary",color:n="neutral",value:e=null}=r;return{role:"option",tabindex:-1,ariaSelected:t=>{var m;let a=(m=t==null?void 0:t.elementNode)==null?void 0:m.getContext("select");if(!a)return;let i=a.value.get(t);return a.multiple?i.includes(e):i===e},onClick:(t,a)=>{let i=a.getContext("select");if(!i)return;let m=i.value,u=m.get();i.multiple?u.includes(e)?m.set(u.filter(l=>l!==e)):m.set(u.concat([e])):u!==e&&m.set(e)},_onInit:t=>{t.tagName!=="div"&&console.warn('"selectItem" patch must use div tag')},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>(0,Pe.themeSize)(t,"inherit"),height:t=>(0,Pe.themeSpacing)(6+(0,Pe.themeDensity)(t)*2),paddingInline:t=>(0,Pe.themeSpacing)((0,Pe.themeDensity)(t)*3),border:"none",outline:"none",color:t=>(0,Pe.themeColor)(t,"text",n),backgroundColor:t=>(0,Pe.themeColor)(t,"inherit",n),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>(0,Pe.themeColor)(t,"hover",n)},"&[aria-selected=true]":{backgroundColor:t=>(0,Pe.themeColor)(t,"shift-6",o),color:t=>(0,Pe.themeColor)(t,"shift-11")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,o)}}}}var er=require("@domphy/core"),We=require("@domphy/theme");function Li(r={}){var a;let{color:o="neutral",multiple:n=!1}=r,e=(0,er.toState)((a=r.value)!=null?a:n?[]:null),s={div:i=>{let m=e.get(i);return(Array.isArray(m)?m:[m]).map(l=>({input:null,type:"hidden",name:r.name,value:l==null?"":String(l)}))},ariaHidden:"true",hidden:!0};return{dataTone:"shift-0",role:"listbox",ariaLabel:"Options",ariaMultiselectable:n?"true":void 0,_context:{select:{value:e,multiple:n}},_onInit:i=>{i.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),i.children.insert(s)},style:{display:"flex",flexDirection:"column",paddingBlock:i=>(0,We.themeSpacing)((0,We.themeDensity)(i)*2),paddingInline:i=>(0,We.themeSpacing)((0,We.themeDensity)(i)*2),fontSize:i=>(0,We.themeSize)(i,"inherit"),backgroundColor:i=>(0,We.themeColor)(i,"inherit",o),color:i=>(0,We.themeColor)(i,"text",o)}}}var ho=require("@domphy/core"),qe=require("@domphy/theme");function zi(r={}){var s;let o=(0,ho.toState)((s=r.color)!=null?s:"neutral","color"),n={"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},e=(0,ho.hashString)(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-1",style:{fontSize:t=>(0,qe.themeSize)(t),color:t=>(0,qe.themeColor)(t,"text",o.get(t)),height:(0,qe.themeSpacing)(6),display:"block",borderRadius:(0,qe.themeSpacing)(1),backgroundColor:t=>(0,qe.themeColor)(t,"inherit",o.get(t)),backgroundImage:t=>`linear-gradient(90deg, ${(0,qe.themeColor)(t,"inherit",o.get(t))} 0%, ${(0,qe.themeColor)(t,"shift-2",o.get(t))} 50%, ${(0,qe.themeColor)(t,"inherit",o.get(t))} 100%)`,backgroundSize:"200% 100%",animation:`${e} 1.6s ease-in-out infinite`,[`@keyframes ${e}`]:n}}}var tr=require("@domphy/core"),fo=require("@domphy/theme");function Ri(r={}){var n;let o=(0,tr.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:e=>(0,fo.themeSize)(e,"inherit"),color:e=>(0,fo.themeColor)(e,"shift-10",o.get(e))}}}var go=require("@domphy/core"),Ye=require("@domphy/theme"),nr={to:{transform:"rotate(360deg)"}},or=(0,go.hashString)(JSON.stringify(nr));function Vi(r={}){var n;let o=(0,go.toState)((n=r.color)!=null?n:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:e=>{e.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:e=>(0,Ye.themeSize)(e),backgroundColor:e=>(0,Ye.themeColor)(e),color:e=>(0,Ye.themeColor)(e,"text",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:(0,Ye.themeSpacing)(6),height:(0,Ye.themeSpacing)(6),borderRadius:"50%",border:e=>`${(0,Ye.themeSpacing)(.5)} solid ${(0,Ye.themeColor)(e,"border-strong",o.get(e))}`,borderTopColor:e=>(0,Ye.themeColor)(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${or} 0.7s linear infinite`,[`@keyframes ${or}`]:nr}}}var Kt=require("@domphy/core"),ft=require("@domphy/theme");function Mi(r={}){let{direction:o="horizontal",defaultSize:n=50,min:e=10,max:s=90}=r;return{_onSchedule:(t,a)=>{(0,Kt.merge)(a,{_context:{splitter:{direction:o,size:(0,Kt.toState)(n),min:e,max:s,panelCount:0}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function _i(r){let o=r.parent;if(!o)return!0;for(let n of o.children.items)if(n instanceof Kt.ElementNode&&n.getMetadata("splitterPanel"))return n===r;return!0}function Ni(){return{_metadata:{splitterPanel:!0},_onMount:r=>{let o=r.getContext("splitter");if(!o){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let n=r.domElement,e=o.direction==="horizontal"?"width":"height",s=a=>{n.style[e]=`${_i(r)?a:100-a}%`};s(o.size.get()),n.style.flexShrink="0",n.style.overflow="auto";let t=o.size.addListener(s);r.addHook("Remove",()=>{var a;o.panelCount=Math.max(0,((a=o.panelCount)!=null?a:1)-1),t()})}}}function $i(){return{role:"separator",tabindex:0,_onMount:r=>{let o=r.getContext("splitter");if(!o){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let n=r.domElement,e=o.direction==="horizontal";n.style.cursor=e?"col-resize":"row-resize",n.setAttribute("aria-orientation",e?"vertical":"horizontal"),n.setAttribute("aria-valuemin",String(o.min)),n.setAttribute("aria-valuemax",String(o.max)),n.setAttribute("aria-valuenow",String(Math.round(o.size.get())));let s=o.size.addListener(m=>{n.setAttribute("aria-valuenow",String(Math.round(m)))}),t=m=>{let u=m.shiftKey?10:1,l=null;e?m.key==="ArrowRight"?l=Math.min(o.size.get()+u,o.max):m.key==="ArrowLeft"&&(l=Math.max(o.size.get()-u,o.min)):m.key==="ArrowDown"?l=Math.min(o.size.get()+u,o.max):m.key==="ArrowUp"&&(l=Math.max(o.size.get()-u,o.min)),m.key==="Home"?l=o.min:m.key==="End"&&(l=o.max),l!==null&&(m.preventDefault(),o.size.set(l))},a=null,i=m=>{m.preventDefault();let u=n.parentElement,l=d=>{let f=u.getBoundingClientRect(),h=e?(d.clientX-f.left)/f.width*100:(d.clientY-f.top)/f.height*100;o.size.set(Math.min(Math.max(h,o.min),o.max))},c=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c),a=null};a=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c),a=null},document.addEventListener("mousemove",l),document.addEventListener("mouseup",c)};n.addEventListener("keydown",t),n.addEventListener("mousedown",i),r.addHook("Remove",()=>{a==null||a(),s(),n.removeEventListener("keydown",t),n.removeEventListener("mousedown",i)})},dataTone:"shift-2",style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:r=>(0,ft.themeColor)(r,"inherit"),color:r=>(0,ft.themeColor)(r,"text"),"&:hover":{backgroundColor:r=>(0,ft.themeColor)(r,"increase-1")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:r=>S(r,"primary")},"&::after":{content:'""',width:(0,ft.themeSpacing)(1),height:(0,ft.themeSpacing)(1),borderRadius:(0,ft.themeSpacing)(999),backgroundColor:r=>(0,ft.themeColor)(r,"shift-4")}}}}var Qt=require("@domphy/theme");function Ai(r={}){let{gap:o=3,align:n,justify:e,density:s=!0}=r;return{style:E(E({display:"flex",flexDirection:"column",gap:s?t=>(0,Qt.themeSpacing)((0,Qt.themeDensity)(t)*o):()=>(0,Qt.themeSpacing)(o)},n?{alignItems:n}:{}),e?{justifyContent:e}:{})}}var Rt=require("@domphy/core"),R=require("@domphy/theme");function rr(r,o,n,e){if((0,Rt.isState)(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=(0,Rt.toState)(n!=null?n:e),r.setMetadata(o,s)),s}function Bi(r,o,n){return r==="vertical"?{"&:not(:last-child)::after":{content:'""',position:"absolute",left:(0,R.themeSpacing)(3),top:(0,R.themeSpacing)(6),bottom:`-${(0,R.themeSpacing)(2)}`,width:"2px",height:"auto",right:"auto",backgroundColor:e=>(0,R.themeColor)(e,"shift-3",o),zIndex:"0"},"&[data-status=done]:not(:last-child)::after":{backgroundColor:e=>(0,R.themeColor)(e,"shift-9",n)}}:{"&:not(:first-child)::after":{content:'""',position:"absolute",top:(0,R.themeSpacing)(3),right:`calc(50% + ${(0,R.themeSpacing)(3)})`,left:`calc(-50% + ${(0,R.themeSpacing)(3)})`,height:"2px",backgroundColor:e=>(0,R.themeColor)(e,"shift-3",o),zIndex:"0"},"&[data-status=done]:not(:first-child)::after":{backgroundColor:e=>(0,R.themeColor)(e,"shift-9",n)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:e=>(0,R.themeColor)(e,"shift-9",n)}}}function ar(r,o,n,e,s){let t=n==="vertical",a=Bi(n,e,s);return r.map((i,m)=>{var l;return{li:[typeof i.label=="string"?{span:i.label}:i.label],_key:(l=i.key)!=null?l:m,dataStep:String(m+1),dataStatus:c=>{let d=o.get(c);return m<d?"done":m===d?"active":"pending"},ariaCurrent:c=>o.get(c)===m?"step":void 0,style:z(E({position:"relative",display:"flex",flexDirection:t?"row":"column",alignItems:t?"flex-start":"center",gap:(0,R.themeSpacing)(1),flex:t?"none":"1",fontSize:c=>(0,R.themeSize)(c,"decrease-1"),textAlign:t?"left":"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:(0,R.themeSpacing)(6),height:(0,R.themeSpacing)(6),borderRadius:(0,R.themeSpacing)(999),fontSize:c=>(0,R.themeSize)(c,"decrease-1"),fontWeight:"bold",flexShrink:"0",border:c=>`2px solid ${(0,R.themeColor)(c,"border-strong",e)}`,backgroundColor:c=>(0,R.themeColor)(c,"inherit"),color:c=>(0,R.themeColor)(c,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"}},a),{"&[data-status=active]::before":{backgroundColor:c=>(0,R.themeColor)(c,"shift-9",s),borderColor:c=>(0,R.themeColor)(c,"shift-9",s),color:c=>(0,R.themeColor)(c,"shift-0",s),boxShadow:c=>`0 0 0 3px ${(0,R.themeColor)(c,"shift-3",s)}`},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:c=>(0,R.themeColor)(c,"shift-9",s),borderColor:c=>(0,R.themeColor)(c,"shift-9",s),color:c=>(0,R.themeColor)(c,"shift-0",s)},"&[data-status=pending]":{color:c=>(0,R.themeColor)(c,"muted")},"&[data-status=active]":{color:c=>(0,R.themeColor)(c,"shift-11",s),fontWeight:"bold"},"&[data-status=done]":{color:c=>(0,R.themeColor)(c,"text",e)}})}})}function Hi(r={items:[]}){var a;let{items:o=[],direction:n="horizontal",color:e="neutral",accentColor:s="primary"}=r,t={items:o,direction:n,color:e,accentColor:s};return z(E({_doctorDisable:"inline-typography",_context:{steps:{current:(0,Rt.toState)((a=r.current)!=null?a:0),direction:n,color:e,accentColor:s}},_onSchedule:(i,m)=>{let u=rr(i,"stepsCurrent",r.current,0);m[i.tagName]=ar(o,u,n,e,s)}},(0,Rt.behavior)("steps-items",i=>({update(m){let u=rr(i,"stepsCurrent",r.current,0);i.children.update(ar(m.items,u,m.direction,m.color,m.accentColor),!!i.domElement,!0)}}),t)),{style:{display:"flex",flexDirection:n==="vertical"?"column":"row",alignItems:n==="vertical"?"flex-start":"center",gap:(0,R.themeSpacing)(2),listStyle:"none",margin:"0",padding:"0"}})}var ir=require("@domphy/core"),eo=require("@domphy/theme");function Fi(r={}){var n;let o=(0,ir.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>(0,eo.themeSize)(e,"inherit"),fontWeight:"bold",color:e=>(0,eo.themeColor)(e,"shift-11",o.get(e)),backgroundColor:e=>(0,eo.themeColor)(e)}}}var lr=require("@domphy/core"),yo=require("@domphy/theme");function Ki(r={}){var n;let o=(0,lr.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>(0,yo.themeSize)(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>(0,yo.themeColor)(e,"text",o.get(e))}}}var sr=require("@domphy/core"),bo=require("@domphy/theme");function ji(r={}){var n;let o=(0,sr.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>(0,bo.themeSize)(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>(0,bo.themeColor)(e,"text",o.get(e))}}}var cr=require("@domphy/core"),H=require("@domphy/theme");function Wi(r={}){var n;let o=(0,cr.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},_doctorDisable:"inline-typography",style:{fontSize:e=>(0,H.themeSize)(e,"inherit"),color:e=>(0,H.themeColor)(e,"text",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*3),paddingBlock:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*1),color:e=>(0,H.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,H.themeColor)(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*3),paddingBlock:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*1),color:e=>(0,H.themeColor)(e,"text",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${(0,H.themeColor)(e,"shift-3",o.get(e))}`,fontSize:e=>(0,H.themeSize)(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*3),paddingBlock:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*1),color:e=>(0,H.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,H.themeColor)(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${(0,H.themeColor)(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>(0,H.themeColor)(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>(0,H.themeColor)(e,"hover")}}}}var jt=require("@domphy/core"),U=require("@domphy/theme");function mr(r,o,n,e){if((0,jt.isState)(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=(0,jt.toState)(n!=null?n:e),r.setMetadata(o,s)),s}function ur(r,o,n,e,s){let t=r.nodeId,i={div:o.map((u,l)=>{var f;let c=(f=u.key)!=null?f:l;return{button:[typeof u.label=="string"?{span:u.label}:u.label],_key:c,type:"button",role:"tab",id:`tab${t}${c}`,ariaControls:`panel${t}${c}`,ariaSelected:h=>n.get(h)===c,tabIndex:h=>n.get(h)===c?0:-1,onClick:()=>n.set(c),onKeyDown:h=>{var g;let C=h.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(C))return;h.preventDefault();let v=o.map((D,w)=>{var q;return(q=D.key)!=null?q:w}),p=v.indexOf(c),b=p;C==="ArrowRight"?b=(p+1)%v.length:C==="ArrowLeft"?b=(p-1+v.length)%v.length:C==="Home"?b=0:C==="End"&&(b=v.length-1),n.set(v[b]);let k=h.target.closest("[role=tablist]");(g=k==null?void 0:k.querySelectorAll("[role=tab]")[b])==null||g.focus()},style:{cursor:"pointer",fontSize:h=>(0,U.themeSize)(h,"inherit"),height:h=>(0,U.themeSpacing)(6+(0,U.themeDensity)(h)*2),paddingInline:h=>(0,U.themeSpacing)((0,U.themeDensity)(h)*4),border:"none",outline:"none",color:h=>(0,U.themeColor)(h,"shift-13"),backgroundColor:h=>(0,U.themeColor)(h,"inherit"),boxShadow:h=>`inset 0 ${(0,U.themeSpacing)(-.5)} 0 0 ${(0,U.themeColor)(h,"shift-1",s)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-selected=true])":{color:h=>(0,U.themeColor)(h,"shift-13"),boxShadow:h=>`inset 0 ${(0,U.themeSpacing)(-.5)} 0 0 ${(0,U.themeColor)(h,"shift-2",s)}`},"&[aria-selected=true]:not([disabled])":{color:h=>(0,U.themeColor)(h,"shift-13",e),boxShadow:h=>`inset 0 ${(0,U.themeSpacing)(-.5)} 0 0 ${(0,U.themeColor)(h,"shift-8",e)}`},"&:focus-visible":{boxShadow:h=>S(h,e)},"&[aria-selected=true]:focus-visible":{boxShadow:h=>`${S(h,e)}, inset 0 ${(0,U.themeSpacing)(-.5)} 0 0 ${(0,U.themeColor)(h,"shift-6",e)}`}}}}),_key:"tablist",role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},m=o.map((u,l)=>{var d;let c=(d=u.key)!=null?d:l;return{div:[u.content],_key:c,role:"tabpanel",id:`panel${t}${c}`,ariaLabelledby:`tab${t}${c}`,hidden:f=>n.get(f)!==c,style:{paddingBlock:f=>(0,U.themeSpacing)((0,U.themeDensity)(f)*2),paddingInline:f=>(0,U.themeSpacing)((0,U.themeDensity)(f)*2)}}});return[i,...m]}function qi(r={items:[]}){let{items:o=[],accentColor:n="primary",color:e="neutral"}=r;return E({_onSchedule:(t,a)=>{var m,u;let i=mr(t,"tabsActiveKey",r.activeKey,(u=(m=o[0])==null?void 0:m.key)!=null?u:0);a[t.tagName]=ur(t,o,i,n,e)}},(0,jt.behavior)("tabs-items",t=>({update(a){var m,u;let i=mr(t,"tabsActiveKey",r.activeKey,(u=(m=a.items[0])==null?void 0:m.key)!=null?u:0);t.children.update(ur(t,a.items,i,a.accentColor,a.color),!!t.domElement,!0)}}),{items:o,accentColor:n,color:e}))}var to=require("@domphy/core"),le=require("@domphy/theme");function Yi(r={}){var s,t;let o=(0,to.toState)((s=r.color)!=null?s:"neutral","color"),n=(0,to.toState)((t=r.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=r;return z(E({_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')}},(0,to.behavior)("textarea-auto-resize",(a,i)=>{let m=a.domElement,u=i.autoResize,l=!1,c,d,f=()=>{!u||l||(l=!0,d==null||d.unobserve(m),m.style.overflow="hidden",m.style.height="auto",m.style.height=`${m.scrollHeight}px`,l=!1,u&&(d==null||d.observe(m)))},h=()=>{typeof IntersectionObserver!="undefined"&&(c||(c=new IntersectionObserver(v=>{v.some(p=>p.isIntersecting)&&f()})),c.observe(m)),typeof ResizeObserver!="undefined"&&(d||(d=new ResizeObserver(()=>{l||f()})),d.observe(m))},C=()=>{c==null||c.unobserve(m),d==null||d.unobserve(m)};return m.addEventListener("input",f),a.attributes.addListener("value",f),u&&(h(),f()),{resize:f,update(v){u=v.autoResize,a.attributes.addListener("value",f),u?(h(),f()):C()},destroy(){m.removeEventListener("input",f),c==null||c.disconnect(),d==null||d.disconnect()}}},{autoResize:e})),{_onUpdate:a=>{var i;(i=a.getBehavior("textarea-auto-resize"))==null||i.resize()},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>(0,le.themeSpacing)((0,le.themeDensity)(a)*2),paddingBlock:a=>(0,le.themeSpacing)((0,le.themeDensity)(a)*1.5),border:"none",borderRadius:a=>(0,le.themeSpacing)((0,le.themeDensity)(a)*1.5),fontSize:a=>(0,le.themeSize)(a,"inherit"),color:a=>(0,le.themeColor)(a,"text",o.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${(0,le.themeColor)(a,"border-strong",o.get(a))}`,backgroundColor:a=>(0,le.themeColor)(a,"inherit",o.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>(0,le.themeColor)(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${(0,le.themeColor)(a,"shift-5",n.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,n.get(a))},"&:invalid":{outline:a=>`${(0,le.themeSpacing)(.5)} solid ${(0,le.themeColor)(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,le.themeColor)(a,"muted","neutral"),outline:a=>`1px solid ${(0,le.themeColor)(a,"border-strong","neutral")}`,backgroundColor:a=>(0,le.themeColor)(a,"shift-2","neutral")}}})}var dr=require("@domphy/core"),Be=require("@domphy/theme");function Gi(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Ui(r={}){var t,a,i;let{last:o=!1}=r,n=(t=r.color)!=null?t:"neutral",e=(a=r.accentColor)!=null?a:"primary",s=(0,dr.toState)((i=r.active)!=null?i:!1);return{style:E({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:m=>(0,Be.themeSpacing)((0,Be.themeDensity)(m)*2),paddingBottom:m=>o?"0":(0,Be.themeSpacing)((0,Be.themeDensity)(m)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:(0,Be.themeSpacing)(1),transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:m=>(0,Be.themeColor)(m,"shift-8",s.get(m)?e:n),opacity:m=>s.get(m)?"1":"0.4"}},o?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:m=>(0,Be.themeSpacing)((0,Be.themeDensity)(m)*-4),width:"2px",backgroundColor:m=>(0,Be.themeColor)(m,"shift-3",n)}})}}var hr=require("@domphy/core"),Se=require("@domphy/theme");function Jo(r){let o=r.getMetadata("toastOpen");return o||(o=(0,hr.toState)(!1),r.setMetadata("toastOpen",o)),o}var pr=r=>{let o=r==null?void 0:r.elementNode;return o?Jo(o).get(r):!1};function Ji(r={}){let{position:o="top-center",color:n="neutral"}=r,e=o.startsWith("top"),s=o.endsWith("center"),t=o.endsWith("right"),a={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:e?"column":"column-reverse",alignItems:s?"center":t?"end":"start",inset:0,gap:(0,Se.themeSpacing)(4),zIndex:30,padding:(0,Se.themeSpacing)(6),pointerEvents:"none"}};return{_portal:i=>{let m=i.domElement.querySelector(`#domphy-toast-${o}`);return m||(m=i.children.insert(a).domElement),m},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:(0,Se.themeSpacing)(32),pointerEvents:"auto",paddingBlock:i=>(0,Se.themeSpacing)((0,Se.themeDensity)(i)*2),paddingInline:i=>(0,Se.themeSpacing)((0,Se.themeDensity)(i)*4),borderRadius:i=>(0,Se.themeSpacing)((0,Se.themeDensity)(i)*2),fontSize:i=>(0,Se.themeSize)(i,"inherit"),color:i=>(0,Se.themeColor)(i,"text",n),backgroundColor:i=>(0,Se.themeColor)(i,"inherit",n),boxShadow:_("medium"),opacity:i=>Number(pr(i)),transform:i=>pr(i)?"translateY(0)":e?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:i=>requestAnimationFrame(()=>Jo(i).set(!0)),_onBeforeRemove:(i,m)=>{var p,b;let u=!1,l=null,c=!1,d=i.getRoot(),f=(b=(p=i.domElement)==null?void 0:p.parentElement)!=null?b:null,h=()=>{var g;if(c||!f||f.id!==`domphy-toast-${o}`||f.childElementCount>0)return;c=!0;let k=(g=d.children)==null?void 0:g.items.find(D=>D.domElement===f);k?d.children.remove(k):f.remove()},C=()=>{u||(u=!0,l&&(clearTimeout(l),l=null),i.domElement.removeEventListener("transitionend",v),m(),h())},v=k=>{k.propertyName==="transform"&&C()};i.domElement.addEventListener("transitionend",v),l=setTimeout(C,350),i.addHook("Remove",()=>{var k;l&&(clearTimeout(l),l=null),(k=i.domElement)==null||k.removeEventListener("transitionend",v),h()}),Jo(i).set(!1)}}}var Vt=require("@domphy/core"),oe=require("@domphy/theme");function fr(r,o,n,e){if((0,Vt.isState)(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=(0,Vt.toState)(n!=null?n:e),r.setMetadata(o,s)),s}function Xi(r,o){return Array.isArray(r)?r.includes(o):r===o}function Zi(r,o,n,e,s){var l;let t=r.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(t))return;r.preventDefault();let a=o.map((c,d)=>{var f;return(f=c.key)!=null?f:String(d)}),i=a.indexOf(n),m=i;t==="ArrowRight"?m=(i+1)%a.length:t==="ArrowLeft"?m=(i-1+a.length)%a.length:t==="Home"?m=0:t==="End"&&(m=a.length-1),s||e.set(a[m]);let u=r.target.closest("[role=group]");(l=u==null?void 0:u.querySelectorAll("button")[m])==null||l.focus()}function gr(r,o,n,e,s){return r.map((t,a)=>{var u;let i=(u=t.key)!=null?u:String(a);return{button:[typeof t.label=="string"?{span:t.label}:t.label],_key:i,type:"button",role:"button",ariaPressed:l=>Xi(o.get(l),i),tabIndex:l=>{var d,f,h,C,v;let c=o.get(l);if(n){let b=(h=(f=(Array.isArray(c)?c:[])[0])!=null?f:(d=r[0])==null?void 0:d.key)!=null?h:"0";return i===b?0:-1}return c===i||c===""&&i===((v=(C=r[0])==null?void 0:C.key)!=null?v:"0")?0:-1},onClick:()=>{let l=o.get();if(n){let c=Array.isArray(l)?[...l]:[];o.set(c.includes(i)?c.filter(d=>d!==i):[...c,i])}else o.set(l===i?"":i)},onKeyDown:l=>Zi(l,r,i,o,n),style:{cursor:"pointer",fontSize:l=>(0,oe.themeSize)(l,"inherit"),height:(0,oe.themeSpacing)(6),paddingBlock:(0,oe.themeSpacing)(1),paddingInline:(0,oe.themeSpacing)(2),border:"none",borderRadius:(0,oe.themeSpacing)(1.5),color:l=>(0,oe.themeColor)(l,"shift-13",e),backgroundColor:l=>(0,oe.themeColor)(l,"inherit",e),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-pressed=true])":{color:l=>(0,oe.themeColor)(l,"shift-13",e),backgroundColor:l=>(0,oe.themeColor)(l,"hover",e)},"&:active:not([disabled])":{backgroundColor:l=>(0,oe.themeColor)(l,"increase-2",e)},"&[aria-pressed=true]":{backgroundColor:l=>(0,oe.themeColor)(l,"shift-3",s),color:l=>(0,oe.themeColor)(l,"shift-13",s)},"&:focus-visible":{boxShadow:l=>S(l,s)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function Qi(r={items:[]}){var a;let{items:o=[],multiple:n=!1,color:e="neutral",accentColor:s="primary"}=r,t={items:o,multiple:n,color:e,accentColor:s};return z(E({role:"group",_context:{toggleGroup:{value:(0,Vt.toState)((a=r.value)!=null?a:n?[]:""),multiple:n}},_onSchedule:(i,m)=>{let u=fr(i,"toggleGroupValue",r.value,n?[]:"");m[i.tagName]=gr(o,u,n,e,s)}},(0,Vt.behavior)("toggle-items",i=>({update(m){let u=fr(i,"toggleGroupValue",r.value,m.multiple?[]:"");i.children.update(gr(m.items,u,m.multiple,m.color,m.accentColor),!!i.domElement,!0)}}),t)),{style:{display:"flex",paddingBlock:(0,oe.themeSpacing)(1),paddingInline:(0,oe.themeSpacing)(1),gap:(0,oe.themeSpacing)(1),borderRadius:(0,oe.themeSpacing)(2),fontSize:i=>(0,oe.themeSize)(i,"inherit"),backgroundColor:i=>(0,oe.themeColor)(i,"inherit",e),color:i=>(0,oe.themeColor)(i,"text",e),outline:i=>`1px solid ${(0,oe.themeColor)(i,"border",e)}`,outlineOffset:"-1px"}})}function el(r={}){return Uo(r)}function tl(){return{div:null,style:{flex:"1 1 0"}}}var oo=require("@domphy/core"),_e=require("@domphy/theme");function ol(r={}){let{open:o=!1,placement:n="top",content:e="Tooltip Content"}=r,s=(0,oo.toState)(n),t=(0,oo.toState)(e),a={span:d=>t.get(d)},{show:i,hide:m,anchorPartial:u}=Qe({kind:"tooltip",open:o,onDismiss:r.onDismiss,placement:s,content:a}),l={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:d=>(0,_e.themeSpacing)((0,_e.themeDensity)(d)*1),paddingInline:d=>(0,_e.themeSpacing)((0,_e.themeDensity)(d)*3),borderRadius:d=>(0,_e.themeSpacing)((0,_e.themeDensity)(d)*1.5),color:d=>(0,_e.themeColor)(d,"text"),backgroundColor:d=>(0,_e.themeColor)(d),fontSize:d=>(0,_e.themeSize)(d,"inherit"),boxShadow:_("low")},$:[qo({placement:s,bordered:!1})]};return a.$||(a.$=[]),a.$.push(l),(0,oo.merge)(u,{ariaDescribedby:d=>d!=null&&d.elementNode?Re("tooltip",d.elementNode):void 0,onMouseEnter:(d,f)=>i(f),onMouseLeave:(d,f)=>m(f),onFocus:(d,f)=>i(f),onBlur:(d,f)=>m(f),onKeyDown:(d,f)=>d.key==="Escape"&&m(f)}),u}var Xo=require("@domphy/core");function yr(r,o){return r.key!==void 0&&r.key!==null?String(r.key):`index-${o}`}function nl(r={}){let{duration:o=300,delay:n=0}=r,e=new Map,s=new Map,t=new Set,a=new Set;return{_onMount:i=>{i.addHook("Remove",()=>{for(let m of Array.from(s.values()))m();s.clear();for(let m of t)clearTimeout(m);t.clear();for(let m of a)cancelAnimationFrame(m);a.clear()})},_onBeforeUpdate:i=>{e=new Map,i.children.items.forEach((m,u)=>{if(!(m instanceof Xo.ElementNode))return;let l=m.domElement;l&&e.set(yr(m,u),l.getBoundingClientRect())})},_onUpdate:i=>{i.children.items.forEach((m,u)=>{var D;if(!(m instanceof Xo.ElementNode))return;let l=m.domElement;if(!l)return;let c=yr(m,u),d=e.get(c);if(!d)return;let f=l.getBoundingClientRect(),h=d.left-f.left,C=d.top-f.top;if(Math.abs(h)<.5&&Math.abs(C)<.5)return;(D=s.get(l))==null||D(),l.style.transition="none",l.style.transform=`translate(${h}px, ${C}px)`,l.getBoundingClientRect();let v=requestAnimationFrame(()=>{a.delete(v),l.style.transition=`transform ${o}ms ease ${n}ms`,l.style.transform="translate(0px, 0px)"});a.add(v);let p=!1,b=null,k=()=>{p||(p=!0,b&&(t.delete(b),b=null),s.delete(l),l.removeEventListener("transitionend",g),l.style.transition="",l.style.transform="")},g=w=>{w.propertyName==="transform"&&k()};s.set(l,()=>{p=!0,b&&(clearTimeout(b),t.delete(b),b=null),s.delete(l),l.removeEventListener("transitionend",g)}),l.addEventListener("transitionend",g),b=setTimeout(k,o+n+34),t.add(b)}),e.clear()}}}var br=require("@domphy/core"),Mt=require("@domphy/theme");function rl(r={}){var n;let o=(0,br.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>(0,Mt.themeSize)(e,"inherit"),backgroundColor:e=>(0,Mt.themeColor)(e),color:e=>(0,Mt.themeColor)(e,"text",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,Mt.themeSpacing)(3),listStyleType:"disc",listStylePosition:"outside"}}}function al(){return{style:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}}}0&&(module.exports={abbreviation,accordion,alert,avatar,badge,blockquote,breadcrumb,breadcrumbEllipsis,button,buttonGhost,buttonSwitch,card,code,combobox,command,commandItem,commandSearch,datePicker,descriptionList,details,dialog,divider,drawer,elevation,emphasis,empty,errorBoundary,fab,figure,focusRing,formGroup,grid,heading,horizontalRule,icon,image,inputCheckbox,inputColor,inputDateTime,inputFile,inputNumber,inputOTP,inputPassword,inputRadio,inputRange,inputSearch,inputSwitch,inputText,keyboard,label,link,linkButton,list,listItem,listItemButton,mark,menu,motion,orderedList,pagination,panelSection,paragraph,popover,popoverArrow,preformated,progress,rating,ringProgress,row,scrollArea,segmented,select,selectBox,selectItem,selectList,skeleton,small,spinner,splitter,splitterHandle,splitterPanel,stack,steps,strong,subscript,superscript,table,tabs,tag,textarea,timeline,timelineItem,toast,toggleGroup,toolbar,toolbarSpacer,tooltip,transitionGroup,unorderedList,visuallyHidden});
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|