@domphy/ui 0.15.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- "use strict";var Domphy=(()=>{var Ke=Object.defineProperty,En=Object.defineProperties,_n=Object.getOwnPropertyDescriptor,Tn=Object.getOwnPropertyDescriptors,On=Object.getOwnPropertyNames,Zt=Object.getOwnPropertySymbols;var eo=Object.prototype.hasOwnProperty,Pn=Object.prototype.propertyIsEnumerable;var Qt=(e,t,r)=>t in e?Ke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ue=(e,t)=>{for(var r in t||(t={}))eo.call(t,r)&&Qt(e,r,t[r]);if(Zt)for(var r of Zt(t))Pn.call(t,r)&&Qt(e,r,t[r]);return e},to=(e,t)=>En(e,Tn(t));var qe=(e,t)=>{for(var r in t)Ke(e,r,{get:t[r],enumerable:!0})},Dn=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of On(t))!eo.call(e,i)&&i!==r&&Ke(e,i,{get:()=>t[i],enumerable:!(o=_n(t,i))||o.enumerable});return e};var $n=e=>Dn(Ke({},"__esModule",{value:!0}),e);var Ta={};qe(Ta,{core:()=>Xe,theme:()=>Qe,ui:()=>ht});var Xe={};qe(Xe,{AttributeList:()=>wo,BooleanAttributes:()=>Et,CamelAttributes:()=>lo,ElementList:()=>Co,ElementNode:()=>B,HtmlTags:()=>_t,Notifier:()=>Le,PrefixCSS:()=>de,RecordState:()=>tr,State:()=>vt,SvgTags:()=>so,VoidTags:()=>co,batch:()=>Qn,computed:()=>Zn,effect:()=>Jn,effectScope:()=>Xn,flushPendingNotifiers:()=>po,flushSync:()=>qn,hasPendingNotifiers:()=>fo,hashString:()=>Ee,merge:()=>R,r:()=>An,runBatched:()=>ho,toState:()=>f,untrack:()=>er});var Rn=Object.defineProperty,oo=Object.getOwnPropertySymbols,In=Object.prototype.hasOwnProperty,Ln=Object.prototype.propertyIsEnumerable,no=(e,t,r)=>t in e?Rn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ro=(e,t)=>{for(var r in t||(t={}))In.call(t,r)&&no(e,r,t[r]);if(oo)for(var r of oo(t))Ln.call(t,r)&&no(e,r,t[r]);return e},Et=["allowFullScreen","async","autoFocus","autoPlay","checked","compact","contentEditable","controls","declare","default","defer","disabled","formNoValidate","hidden","isMap","itemScope","loop","multiple","muted","noHref","noShade","noValidate","open","playsInline","readonly","required","reversed","scoped","selected","sortable","trueSpeed","typeMustMatch","wmode","autoCapitalize","translate","spellCheck","inert","download","noModule","paused","autoPictureInPicture"],lo=["viewBox","preserveAspectRatio","gradientTransform","gradientUnits","spreadMethod","markerStart","markerMid","markerEnd","markerHeight","markerWidth","markerUnits","refX","refY","patternContentUnits","patternTransform","patternUnits","filterUnits","primitiveUnits","kernelUnitLength","clipPathUnits","maskContentUnits","maskUnits"],_t=["a","abbr","address","article","aside","audio","b","base","blockquote","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","slot","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","bdi","bdo","math","menu","search","area","embed","hr","animate","animateMotion","animateTransform","circle","clipPath","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","prefetch","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","tbreak","text","textPath","tspan","use","view"],de={transform:["webkit","ms"],transition:["webkit","ms"],animation:["webkit"],userSelect:["webkit","ms"],flexDirection:["webkit","ms"],flexWrap:["webkit","ms"],justifyContent:["webkit","ms"],alignItems:["webkit","ms"],alignSelf:["webkit","ms"],order:["webkit","ms"],flexGrow:["webkit","ms"],flexShrink:["webkit","ms"],flexBasis:["webkit","ms"],columns:["webkit"],columnCount:["webkit"],columnGap:["webkit"],columnRule:["webkit"],columnWidth:["webkit"],boxSizing:["webkit"],appearance:["webkit","moz"],filter:["webkit"],backdropFilter:["webkit"],clipPath:["webkit"],mask:["webkit"],maskImage:["webkit"],textSizeAdjust:["webkit","ms"],hyphens:["webkit","ms"],writingMode:["webkit","ms"],gridTemplateColumns:["ms"],gridTemplateRows:["ms"],gridAutoColumns:["ms"],gridAutoRows:["ms"],gridColumn:["ms"],gridRow:["ms"],marginInlineStart:["webkit"],marginInlineEnd:["webkit"],paddingInlineStart:["webkit"],paddingInlineEnd:["webkit"],minInlineSize:["webkit"],maxInlineSize:["webkit"],minBlockSize:["webkit"],maxBlockSize:["webkit"],inlineSize:["webkit"],blockSize:["webkit"],tabSize:["moz"],overscrollBehavior:["webkit","ms"],touchAction:["ms"],resize:["webkit"],printColorAdjust:["webkit"],backgroundClip:["webkit"],boxDecorationBreak:["webkit"],overflowScrolling:["webkit"]},so=["svg","circle","path","rect","ellipse","line","polyline","polygon","g","defs","use","symbol","linearGradient","radialGradient","stop","clipPath","mask","filter","text","tspan","textPath","image","pattern","marker","animate","animateTransform","animateMotion","feGaussianBlur","feComposite","feColorMatrix","feMerge","feMergeNode","feOffset","feFlood","feBlend","foreignObject"],co=["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"],zn=["onAbort","onAuxClick","onBeforeMatch","onBeforeToggle","onBlur","onCancel","onCanPlay","onCanPlayThrough","onChange","onClick","onClose","onContextLost","onContextMenu","onContextRestored","onCopy","onCueChange","onCut","onDblClick","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDragStart","onDrop","onDurationChange","onEmptied","onEnded","onError","onFocus","onFormData","onInput","onInvalid","onKeyDown","onKeyPress","onKeyUp","onLoad","onLoadedData","onLoadedMetadata","onLoadStart","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onPaste","onPause","onPlay","onPlaying","onProgress","onRateChange","onReset","onResize","onScroll","onScrollEnd","onSecurityPolicyViolation","onSeeked","onSeeking","onSelect","onSlotChange","onStalled","onSubmit","onSuspend","onTimeUpdate","onToggle","onVolumeChange","onWaiting","onWheel","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onCompositionStart","onCompositionUpdate","onCompositionEnd","onTransitionEnd","onTransitionStart","onAnimationStart","onAnimationEnd","onAnimationIteration","onFullscreenChange","onFullscreenError","onFocusIn","onFocusOut"],Mn=zn.reduce((e,t)=>{let r=t.slice(2).toLowerCase();return e[r]=t,e},{}),uo=class{constructor(e){this._releases=new Set;let t=(()=>e());t.onSubscribe=r=>{this._releases.add(r)},this.handler=t}reset(){for(let e of this._releases)e();this._releases.clear()}get dependencyCount(){return this._releases.size}},Re=[],yt=0;function Tt(){return yt>0?null:Re.length?Re[Re.length-1]:null}function mo(e,t){Re.push(e);try{return t()}finally{Re.pop()}}function Nn(e){yt++;try{return e()}finally{yt--}}var Z=[],Vn=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e).catch(t=>{setTimeout(()=>{throw t},0)})},io=100,Ge=0,bt=new Set,ke=new Set;function ho(e){Ge++;try{return e()}finally{if(Ge--,Ge===0){let t=bt;bt=new Set;for(let r of t)r._scheduleFlush()}}}var Le=class{constructor(){this._listeners={},this._pending=new Map,this._scheduled=!1,this._flushing=new Map,this._selfDepth=0}_dispose(){if(this._listeners)for(let e in this._listeners)this._listeners[e].clear();this._listeners=null}addListener(e,t){if(!this._listeners)return()=>{};if(typeof e!="string"||typeof t!="function")throw new Error("Event name must be a string, listener must be a function");this._listeners[e]||(this._listeners[e]=new Set);let r=()=>this.removeListener(e,t);return this._listeners[e].has(t)||(this._listeners[e].add(t),typeof t.onSubscribe=="function"&&t.onSubscribe(r)),r}removeListener(e,t){if(!this._listeners)return;let r=this._listeners[e];r&&r.has(t)&&(r.delete(t),r.size===0&&delete this._listeners[e])}listenerCount(e){var t,r,o;return(o=(r=(t=this._listeners)==null?void 0:t[e])==null?void 0:r.size)!=null?o:0}notify(e,...t){if(!this._listeners||!this._listeners[e])return;let r=Z.length?Z[Z.length-1]:null;if(r&&r[0]===this&&r[1]===e){let o=this._flushing.get(e);if(o&&o[0]===t[0])return;if(this._selfDepth>=io){console.error(`[Domphy] Runaway self-update on "${e}" \u2014 stopped after ${io} iterations`);return}this._selfDepth++,this._pending.set(e,{args:t,chain:[]})}else{if(this._isCircular(e))return;this._pending.set(e,{args:t,chain:[...Z]})}Ge>0?bt.add(this):this._scheduleFlush()}_scheduleFlush(){this._scheduled||(this._scheduled=!0,ke.add(this),Vn(()=>this._flushAll()))}_isCircular(e){let t=Z.findIndex(([o,i])=>o===this&&i===e);if(t===-1)return!1;let r=[...Z.slice(t).map(([,o])=>o),e];return console.error(`[Domphy] Circular dependency detected:
2
- ${r.join(" \u2192 ")}`),!0}_flushAll(){this._scheduled=!1,ke.delete(this);let e=this._pending;this._pending=new Map;for(let[t,{args:r,chain:o}]of e)Z=o,this._flush(t,r);Z=[],this._pending.size===0&&(this._selfDepth=0)}_flush(e,t){if(!this._listeners)return;let r=this._listeners[e];if(r){Z.push([this,e]),this._flushing.set(e,t);for(let o of[...r])if(r.has(o))try{o(...t)}catch(i){console.error(i)}this._flushing.delete(e),Z.pop()}}};function fo(){return ke.size>0}function po(){let e=0;for(;ke.size>0;){if(e++>1e4){console.error("[Domphy] flushSync: notifier queue did not settle");break}let t=[...ke];ke.clear();for(let r of t)r._flushAll()}}var vt=class{constructor(e,t=typeof e){this.name=t,this._isState=!0,this._notifier=new Le,this.initialValue=e,this._value=e}get(e){if(e)this.addListener(e);else{let t=Tt();t&&this.addListener(t.handler)}return this._value}set(e){this._notifier&&(this._value=e,this._notifier.notify(this.name,e))}reset(){this.set(this.initialValue)}addListener(e){return this._notifier?this._notifier.addListener(this.name,e):()=>{}}removeListener(e){this._notifier&&this._notifier.removeListener(this.name,e)}_dispose(){this._notifier&&(this._notifier._dispose(),this._notifier=null)}};function R(e={},t={}){let r=["animation","transition","boxShadow","textShadow","background","fontFamily"],o=["class","rel","transform","acceptCharset","sandbox"],i=["content"];Object.prototype.toString.call(t)==="[object Object]"&&Object.getPrototypeOf(t)===Object.prototype&&(t=le(t));for(let n in t){let a=t[n];if(!(a==null||a===""))if(typeof a=="object"&&!Array.isArray(a))typeof e[n]=="object"?e[n]=R(e[n],a):e[n]=a;else if(r.includes(n))if(typeof e[n]=="function"||typeof a=="function"){let c=e[n];e[n]=u=>{let m=typeof c=="function"?c(u):c,h=typeof a=="function"?a(u):a;return[m,h].filter(d=>d).join(", ")}}else e[n]=[e[n],a].filter(c=>c).join(", ");else if(i.includes(n))if(typeof e[n]=="function"||typeof a=="function"){let c=e[n];e[n]=u=>{let m=typeof c=="function"?c(u):c,h=typeof a=="function"?a(u):a;return[m,h].filter(d=>d).join("")}}else e[n]=[e[n],a].filter(c=>c).join("");else if(o.includes(n))if(typeof e[n]=="function"||typeof a=="function"){let c=e[n];e[n]=u=>{let m=typeof c=="function"?c(u):c,h=typeof a=="function"?a(u):a;return[m,h].filter(d=>d).join(" ")}}else e[n]=[e[n],a].filter(c=>c).join(" ");else if(n.startsWith("on")){let c=n.replace("on","").toLowerCase();Hn(e,c,a)}else if(n.startsWith("_on")){let c=n.replace("_on","");Bn(e,c,a)}else e[n]=a}return e}function Ee(e=""){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=t*16777619>>>0;return String.fromCharCode(97+t%26)+t.toString(16)}function f(e,t){return e instanceof vt||e!=null&&e._isState?e:new vt(e,t)}function An(e){return e}function Bn(e,t,r){let o=`_on${t}`,i=e[o];typeof i=="function"?e[o]=(...n)=>{i(...n),r(...n)}:e[o]=r}function Hn(e,t,r){let o=Mn[t];if(!o)throw Error(`invalid event name "${t}"`);let i=e[o];typeof i=="function"?e[o]=(n,a)=>{i(n,a),r(n,a)}:e[o]=r}function le(e,t=new WeakMap){if(e===null||typeof e!="object"||typeof e=="function")return e;if(t.has(e))return t.get(e);let r=Object.getPrototypeOf(e);if(r!==Object.prototype&&!Array.isArray(e))return e;let o;if(Array.isArray(e)){o=[],t.set(e,o);for(let i of e)o.push(le(i,t));return o}if(e instanceof Date)return new Date(e);if(e instanceof RegExp)return new RegExp(e);if(e instanceof Map){o=new Map,t.set(e,o);for(let[i,n]of e)o.set(le(i,t),le(n,t));return o}if(e instanceof Set){o=new Set,t.set(e,o);for(let i of e)o.add(le(i,t));return o}if(ArrayBuffer.isView(e))return new e.constructor(e);if(e instanceof ArrayBuffer)return e.slice(0);o=Object.create(r),t.set(e,o);for(let i of Reflect.ownKeys(e))o[i]=le(e[i],t);return o}function go(e,t=!1){if(Object.prototype.toString.call(e)!=="[object Object]")throw Error(`typeof ${e} is invalid DomphyElement`);let r=Object.keys(e);for(let o=0;o<r.length;o++){let i=r[o],n=e[i];if(o==0&&!_t.includes(i)&&!i.includes("-")&&!t)throw Error(`key ${i} is not valid HTML tag name`);if(i=="style"&&n&&Object.prototype.toString.call(n)!=="[object Object]")throw Error('"style" must be a object');if(i=="$")e.$.forEach(a=>go(a,!0));else{if(i.startsWith("_on")&&typeof n!="function")throw Error(`hook ${i} value "${n}" must be a function `);if(i.startsWith("on")&&typeof n!="function")throw Error(`event ${i} value "${n}" must be a function `);if(i=="_portal"&&typeof n!="function")throw Error('"_portal" must be a function return HTMLElement');if(i=="_context"&&Object.prototype.toString.call(n)!=="[object Object]")throw Error('"_context" must be a object');if(i=="_metadata"&&Object.prototype.toString.call(n)!=="[object Object]")throw Error('"_metadata" must be a object');if(i=="_key"&&typeof n!="string"&&typeof n!="number")throw Error('"_key" must be a string or number')}}return!0}function Ye(e){return/<([a-z][\w-]*)(\s[^>]*)?>.*<\/\1>|<([a-z][\w-]*)(\s[^>]*)?\/>/i.test(e.trim())}function yo(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function bo(e){return Object.keys(e).find(t=>_t.includes(t))}function vo(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function jn(e){if(e.indexOf("@")===0)return[e];for(var t=[],r=0,o=0,i="",n=0,a=e.length;n<a;n++){var c=e[n];if(c==="(")r+=1;else if(c===")")r-=1;else if(c==="[")o+=1;else if(c==="]")o-=1;else if(c===","&&!r&&!o){t.push(i.trim()),i="";continue}i+=c}return t.push(i.trim()),t}function St(e){let t=e.trim();return t.startsWith("@")?t.replace(/\s+/g,""):t.replace(/\s*([>+~,])\s*/g,"$1").replace(/\s+/g," ").replace(/\(\s*odd\s*\)/g,"(2n+1)").replace(/\(\s*even\s*\)/g,"(2n)").trim()}function Fn(e,t){for(let r=0;r<e.length;r++){let o=e[r],i=null;typeof o.selectorText=="string"?i=St(o.selectorText):typeof o.cssText=="string"&&o.cssText.startsWith("@")&&(i=St(o.cssText.split("{")[0])),i&&!t.has(i)&&t.set(i,o)}return t}function So(e){var t;let r=e.querySelector("#domphy-style");return r||(r=document.createElement("style"),r.id="domphy-style",e.appendChild(r)),r.dataset.domphyBase!=="true"&&((t=r.sheet)==null||t.insertRule("[hidden] { display: none !important; }",0),r.dataset.domphyBase="true"),r}var wt=e=>{if(Array.isArray(e.$)){let t={};return e.$.forEach(r=>R(t,wt(r))),delete e.$,R(t,e),t}else return e},Wn=class{constructor(e,t,r){this._notifier=new Le,this._releases=[],this.parent=r,this.isBoolean=Et.includes(e),lo.includes(e)?this.name=e:this.name=vo(e),this.value=void 0,this.set(t)}render(){if(!this.parent||!this.parent.domElement)return;let e=this.parent.domElement,t=["value"];this.isBoolean?this.value===!1||this.value==null?e.removeAttribute(this.name):e.setAttribute(this.name,this.value===!0?"":this.value):this.value==null?e.removeAttribute(this.name):t.includes(this.name)?e[this.name]=this.value:e.setAttribute(this.name,this.value)}set(e){var t,r;let o=this.value;if(this._releases.length){for(let i of this._releases)i();this._releases=[]}if(e==null)this.value=null;else if(typeof e=="function"){let i=()=>{if(!this.parent||this.parent._disposed)return;let n=this.value;this.value=this.isBoolean?!!e(i):e(i),this.render(),n!==this.value&&this._notifier.notify(this.name,this.value)};i.elementNode=this.parent,i.debug=`class:${(t=this.parent)==null?void 0:t.tagName}_${(r=this.parent)==null?void 0:r.nodeId} attribute:${this.name}`,i.onSubscribe=n=>{this._releases.push(n),this.parent&&this.parent.addHook("BeforeRemove",()=>{n(),i=null})},this.value=this.isBoolean?!!e(i):e(i)}else this.value=this.isBoolean?!!e:e;this.render(),o!==this.value&&this._notifier.notify(this.name,this.value)}addListener(e){let t=e;t.onSubscribe=r=>{var o;return(o=this.parent)==null?void 0:o.addHook("BeforeRemove",r)},this._notifier.addListener(this.name,t)}remove(){this.parent&&this.parent.attributes&&this.parent.attributes.remove(this.name),this._dispose()}_dispose(){this._notifier._dispose(),this.value=null,this.parent=null}generateHTML(){let{name:e,value:t}=this;if(this.isBoolean)return t?`${e}`:"";{let r=Array.isArray(t)?JSON.stringify(t):t;return`${e}="${yo(String(r))}"`}}},wo=class{constructor(e){this.items={},this.parent=e}generateHTML(){if(!this.items)return"";let e=Object.values(this.items).map(t=>t.generateHTML()).join(" ");return e?` ${e}`:""}get(e){var t;if(this.items)return(t=this.items[e])==null?void 0:t.value}set(e,t){!this.items||!this.parent||(this.items[e]?this.items[e].set(t):this.items[e]=new Wn(e,t,this.parent))}addListener(e,t){this.has(e)&&this.items[e].addListener(t)}has(e){return this.items?Object.hasOwn(this.items,e):!1}remove(e){this.items&&(this.items[e]&&(this.items[e]._dispose(),delete this.items[e]),this.parent&&this.parent.domElement&&this.parent.domElement instanceof Element&&this.parent.domElement.removeAttribute(e))}_dispose(){if(this.items)for(let e in this.items)this.items[e]._dispose();this.items=null,this.parent=null}toggle(e,t){if(!Et.includes(e))throw Error(`${e} is not a boolean attribute`);t===!0?this.set(e,!0):t===!1?this.remove(e):this.has(e)?this.remove(e):this.set(e,!0)}addClass(e){if(!e||typeof e!="string")return;let t=(o,i)=>{let n=(o||"").split(" ").filter(a=>a);return!n.includes(i)&&n.push(e),n.join(" ")},r=this.get("class");typeof r=="function"?this.set("class",()=>t(r(),e)):this.set("class",t(r,e))}hasClass(e){return!e||typeof e!="string"?!1:(this.get("class")||"").split(" ").filter(t=>t).includes(e)}toggleClass(e){!e||typeof e!="string"||(this.hasClass(e)?this.removeClass(e):this.addClass(e))}removeClass(e){if(!e||typeof e!="string")return;let t=(this.get("class")||"").split(" ").filter(r=>r).filter(r=>r!==e);t.length>0?this.set("class",t.join(" ")):this.remove("class")}replaceClass(e,t){!e||!t||typeof e!="string"||typeof t!="string"||this.hasClass(e)&&(this.removeClass(e),this.addClass(t))}},xt=typeof process!="undefined"&&process.env!=null&&process.env.NODE_ENV!=="production",Kn=class{constructor(e,t,r){this.value="",this.name=e,this.cssName=vo(e),this.parentRule=r,this.set(t)}_domUpdate(){if(!this.parentRule)return;let e=this.parentRule.domRule;if(e&&e.style){let t=e.style;t.setProperty(this.cssName,String(this.value)),de[this.name]&&de[this.name].forEach(r=>{t.setProperty(`-${r}-${this.cssName}`,String(this.value))})}}_dispose(){this.value="",this.parentRule=null}set(e){var t,r,o,i;if(typeof e=="function"){let n=(()=>{var a;!this.parentRule||(a=this.parentRule.parentNode)!=null&&a._disposed||(this.value=e(n),this._domUpdate())});n.onSubscribe=a=>{var c;(c=this.parentRule.parentNode)==null||c.addHook("BeforeRemove",()=>{a(),n=null})},n.elementNode=this.parentRule.root,n.debug=`class:${(r=(t=this.parentRule)==null?void 0:t.root)==null?void 0:r.tagName}_${(i=(o=this.parentRule)==null?void 0:o.root)==null?void 0:i.nodeId} style:${this.name}`,this.value=e(n)}else this.value=e;this._domUpdate()}remove(){if(this.parentRule){if(this.parentRule.domRule instanceof CSSStyleRule){let e=this.parentRule.domRule.style;e.removeProperty(this.cssName),de[this.name]&&de[this.name].forEach(t=>{e.removeProperty(`-${t}-${this.cssName}`)})}delete this.parentRule.styleBlock[this.name],this._dispose()}}cssText(){let e=`${this.cssName}: ${this.value}`;return de[this.name]&&de[this.name].forEach(t=>{e+=`; -${t}-${this.cssName}: ${this.value}`}),e}},he=class Ct{constructor(t,r){this.domRule=null,this.styleBlock={},this.selectorText=t,this.styleList=new xo(this),this.parent=r}_dispose(){if(this.styleBlock)for(let t of Object.values(this.styleBlock))t._dispose();this.styleList&&this.styleList._dispose(),this.styleBlock=null,this.styleList=null,this.domRule=null,this.parent=null}get root(){let t=this.parent;for(;t instanceof Ct;)t=t.parent;return t}get parentNode(){let t=this.parent;for(;t&&t instanceof Ct;)t=t.parent;return t}insertStyle(t,r){this.styleBlock&&(this.styleBlock[t]?this.styleBlock[t].set(r):this.styleBlock[t]=new Kn(t,r,this))}removeStyle(t){this.styleBlock&&this.styleBlock[t]&&this.styleBlock[t].remove()}cssText(){if(!this.styleBlock||!this.styleList)return"";let t=Object.values(this.styleBlock).map(o=>o.cssText()).join(";"),r=this.styleList.cssText();return`${this.selectorText} { ${t} ${r} } `}mount(t){!t||!this.styleList||(this.domRule=t,"cssRules"in t&&this.styleList.mount(t.cssRules))}remove(){if(this.domRule&&this.domRule.parentStyleSheet){let t=this.domRule.parentStyleSheet,r=t.cssRules;for(let o=0;o<r.length;o++)if(r[o]===this.domRule){t.deleteRule(o);break}}this._dispose()}render(t){if(!this.styleBlock||!this.styleList)return;let r=Object.values(this.styleBlock).map(o=>o.cssText()).join(";");try{if(this.selectorText.startsWith("@")){if(/^@(media|supports|container|layer)\b/.test(this.selectorText)){let o=t.insertRule(`${this.selectorText} {}`,t.cssRules.length),i=t.cssRules[o];"cssRules"in i&&(this.mount(i),this.styleList.render(i))}else if(this.selectorText.startsWith("@keyframes")||this.selectorText.startsWith("@font-face")){let o=this.cssText(),i=t.insertRule(o,t.cssRules.length),n=t.cssRules[i];this.mount(n)}}else{let o=`${this.selectorText} { ${r} }`,i=t.insertRule(o,t.cssRules.length),n=t.cssRules[i];n&&"selectorText"in n&&this.mount(n)}}catch(o){console.warn("Failed to insert rule:",this.selectorText,o)}}},xo=class{constructor(e){this.items=[],this.domStyle=null,this.parent=e}get parentNode(){let e=this.parent;for(;e&&e instanceof he;)e=e.parent;return e}addCSS(e,t=""){if(!this.items||!this.parent)return;let r={};function o(i,n){return i.startsWith("&")?`${n}${i.slice(1)}`:`${n} ${i}`}for(let i in e){let n=e[i],a=jn(i);for(let c of a){let u=o(c,t);if(/^@(container|layer|supports|media)\b/.test(c)){if(typeof n=="object"&&n!=null){let m=new he(c,this.parent);m.styleList.addCSS(n,t),this.items.push(m)}}else if(c.startsWith("@keyframes")){let m=new he(c,this.parent);m.styleList.addCSS(n,""),this.items.push(m)}else if(c.startsWith("@font-face")){let m=new he(c,this.parent);for(let h in n)m.insertStyle(h,n[h]);this.items.push(m)}else if(typeof n=="object"&&n!=null){let m=new he(u,this.parent);this.items.push(m);for(let[h,d]of Object.entries(n))if(typeof d=="object"&&d!=null){let p=o(h,u);h.startsWith("&")?this.addCSS(d,p):m.styleList.insertRule(p).styleList.addCSS(d,p)}else m.insertStyle(h,d)}else r[c]=n}}if(Object.keys(r).length){let i=new he(t,this.parent);for(let n in r)i.insertStyle(n,r[n]);this.items.push(i)}}cssText(){return this.items?this.items.map(e=>e.cssText()).join(""):""}insertRule(e){if(!this.items||!this.parent)return null;let t=this.items.find(r=>r.selectorText===e);return t||(t=new he(e,this.parent),this.items.push(t)),t}hydrate(e){if(this.items)for(let t of this.items){let r=e.get(St(t.selectorText));r&&t.mount(r)}}mount(e){if(!this.items)return;if(!e)throw Error("Require domRuleList argument");let t=0,r=o=>o.replace("(odd)","(2n+1)").replace("(even)","(2n)");this.items.forEach((o,i)=>{let n=i-t,a=e[n];a&&(o.selectorText.startsWith("@")&&a instanceof CSSKeyframesRule||"keyText"in a?o.mount(a):"selectorText"in a?a.selectorText!==r(o.selectorText)?t+=1:o.mount(a):"cssRules"in a&&o.mount(a))})}render(e){e instanceof HTMLStyleElement?(this.domStyle=e,this.items.forEach(t=>t.render(e.sheet))):e instanceof CSSGroupingRule&&this.items.forEach(t=>t.render(e))}_dispose(){if(this.items)for(let e=0;e<this.items.length;e++)this.items[e]._dispose();this.items=[],this.parent=null,this.domStyle=null}},B=class Ce{constructor(t,r=null,o=0){this._disposed=!1,this._beforeRemoveFired=!1,this.type="ElementNode",this.parent=null,this.children=new Co(this),this.styles=new xo(this),this.attributes=new wo(this),this.domElement=null,this._hooks={},this._events=null,this._boundEvents=new Set,this._context={},this._metadata={},this.key=null;var i,n;t=le(t),go(t),t.style=t.style||{},this.parent=r,this.tagName=bo(t),t=wt(t),this.key=(i=t._key)!=null?i:null,this._context=t._context||{},this._metadata=t._metadata||{};let a=`${(n=this.parent)==null?void 0:n.nodeId}.${o}`,c=JSON.stringify(t.style||{},(m,h)=>typeof h=="function"?a:h);this.nodeId=Ee(a+c),this.attributes.addClass(`${this.tagName}_${this.nodeId}`),t._onSchedule&&t._onSchedule(this,t),this.merge(t);let u=t[this.tagName];if(u!=null&&u!=null)if(typeof u=="function"){let m=()=>{if(this._disposed)return;let h=u(m);this.children.update(Array.isArray(h)?h:[h])};m.elementNode=this,m.debug=`class:${this.tagName}_${this.nodeId} children`,m.onSubscribe=h=>this.addHook("BeforeRemove",()=>{h(),m=null}),m&&m()}else this.children.update(Array.isArray(u)?u:[u]);this._hooks.Init&&this._hooks.Init(this)}_createDOMNode(){let t=so.includes(this.tagName)?document.createElementNS("http://www.w3.org/2000/svg",this.tagName):document.createElement(this.tagName);if(this.domElement=t,this._events)for(let r in this._events)this._bindEvent(r);return this.attributes&&Object.values(this.attributes.items).forEach(r=>r.render()),t}_bindEvent(t){if(!this.domElement||this._boundEvents.has(t))return;this._boundEvents.add(t);let r=o=>{var i,n;return(n=(i=this._events)==null?void 0:i[t])==null?void 0:n.call(i,o,this)};this.domElement.addEventListener(t,r),this.addHook("BeforeRemove",o=>{var i;(i=o.domElement)==null||i.removeEventListener(t,r),r=null})}_dispose(){var t,r,o,i;this._disposed||(this._disposed=!0,this._beforeRemoveFired||(this._beforeRemoveFired=!0,(r=(t=this._hooks).BeforeRemove)==null||r.call(t,this,()=>{})),this.children&&this.children._dispose(),this.styles&&(this.styles.items.forEach(n=>n.remove()),this.styles._dispose()),this.attributes&&this.attributes._dispose(),(i=(o=this._hooks).Remove)==null||i.call(o,this),this.domElement=null,this._hooks={},this._events=null,this._context={},this._metadata={},this.parent=null)}merge(t){R(this._context,t._context),R(this._metadata,t._metadata);let r=Object.keys(t);for(let o=0;o<r.length;o++){let i=r[o],n=t[i];["$","_onSchedule","_key","_context","_metadata","style",this.tagName].includes(i)||(["_onInit","_onInsert","_onMount","_onBeforeUpdate","_onUpdate","_onBeforeRemove","_onRemove"].includes(i)?this.addHook(i.substring(3),n):i.startsWith("on")?this.addEvent(i.substring(2).toLowerCase(),n):i=="_portal"?this._portal=n:i=="class"&&typeof n=="string"?this.attributes.addClass(n):this.attributes.set(i,n))}t.style&&this.styles.addCSS(t.style||{},`.${`${this.tagName}_${this.nodeId}`}`)}patch(t){let r=le(t);r.style=r.style||{},r=wt(r);let o=r[this.tagName];if(typeof o!="function"){let m=o==null?[]:Array.isArray(o)?o:[o];this.children.update(m,!!this.domElement,!0)}r._context&&R(this._context,r._context),r._metadata&&R(this._metadata,r._metadata);let i=`${this.tagName}_${this.nodeId}`,n=["$","_onSchedule","_key","_context","_metadata","style",this.tagName],a=["_onInit","_onInsert","_onMount","_onBeforeUpdate","_onUpdate","_onBeforeRemove","_onRemove"],c=new Set(["class"]),u=null;this._events={};for(let m of Object.keys(r)){if(n.includes(m)||a.includes(m)||m==="_portal")continue;let h=r[m];m.startsWith("on")&&typeof h=="function"?this.addEvent(m.substring(2).toLowerCase(),h):m==="class"&&typeof h=="string"?u=h:(this.attributes.set(m,h),c.add(m))}if(this.attributes.set("class",u?`${i} ${u}`:i),this.attributes.items)for(let m of Object.keys(this.attributes.items))c.has(m)||this.attributes.remove(m);if(this._events)for(let m in this._events)this._bindEvent(m)}addEvent(t,r){this._events=this._events||{};let o=this._events[t];typeof o=="function"?this._events[t]=(i,n)=>{o(i,n),r(i,n)}:this._events[t]=r}addHook(t,r){let o=this._hooks[t];if(typeof o=="function"){let i=((...n)=>{o(...n),r(...n)});try{Object.defineProperty(i,"length",{value:Math.max(o.length,r.length),configurable:!0})}catch(n){}this._hooks[t]=i}else this._hooks[t]=r}getRoot(){let t=this;for(;t&&t instanceof Ce&&t.parent;)t=t.parent;return t}getContext(t){let r=this;for(;r&&(!r._context||!Object.hasOwn(r._context,t));)r=r.parent;return r&&r._context?r._context[t]:void 0}setContext(t,r){this._context=this._context||{},this._context[t]=r}getMetadata(t){return this._metadata?this._metadata[t]:void 0}setMetadata(t,r){this._metadata=this._metadata||{},this._metadata[t]=r}generateCSS(){if(!this.styles||!this.children)return"";let t=this.styles.cssText();return t+=this.children.items.map(r=>r instanceof Ce?r.generateCSS():"").join(""),t}generateHTML(){if(!this.children||!this.attributes)return"";let t=this.attributes.generateHTML();if(co.includes(this.tagName))return`<${this.tagName}${t}>`;let r=this.children.generateHTML();return`<${this.tagName}${t}>${r}</${this.tagName}>`}mount(t,r){if(!t)throw new Error("Missing dom node on bind");if(xt&&!r&&this.parent===null&&t.childNodes.length>0&&console.warn("[Domphy] mount() was called without a style element on already-rendered DOM. Reactive style updates after hydration will be dropped \u2014 pass the server-rendered <style> element as the second argument to mount()."),this.domElement=t,this._events)for(let o in this._events)this._bindEvent(o);if(this.children&&this.children.items.forEach((o,i)=>{let n=t.childNodes[i];n&&(o instanceof Ce?o.mount(n):o.domText=n)}),r){let o=r.sheet;o&&this._hydrateStyles(Fn(o.cssRules,new Map))}this._hooks.Mount&&this._hooks.Mount(this)}_hydrateStyles(t){var r;if((r=this.styles)==null||r.hydrate(t),this.children)for(let o of this.children.items)o instanceof Ce&&o._hydrateStyles(t)}render(t){let r=this._createDOMNode();t.appendChild(r),this._hooks.Mount&&this._hooks.Mount(this);let o=this.getRoot().styles.domStyle,i=t.getRootNode(),n=i instanceof ShadowRoot?i:document.head;return o||(o=So(n)),this.styles.render(o),this.children.items.forEach(a=>{if(a instanceof Ce&&a._portal){let c=a._portal(this.getRoot());c&&a.render(c)}else a.render(r)}),r}remove(){if(this.parent)this.parent.children.remove(this);else{let t=()=>{var r;(r=this.domElement)==null||r.remove(),this._dispose()};if(this._hooks.BeforeRemove&&this.domElement){let r=!1,o=()=>{r||(r=!0,t())};this._beforeRemoveFired=!0,this._hooks.BeforeRemove(this,o),this._hooks.BeforeRemove.length<2&&!r?o():xt&&!r&&setTimeout(()=>{r||console.warn("[Domphy] _onBeforeRemove declared a `done` parameter but did not call it within 5s \u2014 the element will stay in the DOM. Call done() when cleanup finishes.")},5e3)}else t()}}},ao=class{constructor(e,t){this.type="TextNode",this.parent=t,this.text=e===""?"\u200B":String(e)}_createDOMNode(){let e;if(Ye(this.text)){let t=document.createElement("template");t.innerHTML=this.text.trim(),e=t.content.firstChild||document.createTextNode("")}else e=document.createTextNode(this.text);return this.domText=e,e}setText(e){var t;let r=e===""?"\u200B":String(e);if(r===this.text&&this.domText)return;let o=Ye(this.text);if(this.text=r,!this.domText)return;if(!o&&!Ye(r)&&this.domText.nodeType===3){this.domText.nodeValue=r;return}let i=this.domText,n=this._createDOMNode();(t=i.parentNode)==null||t.replaceChild(n,i)}_dispose(){this.domText=void 0,this.text=""}generateHTML(){return this.text==="\u200B"?"&#8203;":Ye(this.text)?this.text:yo(this.text)}render(e){let t=this._createDOMNode();e.appendChild(t)}},Co=class{constructor(e){this.items=[],this._nextKey=0,this.owner=e}_createNode(e){return typeof e=="object"&&e!==null?new B(e,this.owner,this._nextKey++):new ao(e==null?"":String(e),this.owner)}_moveDomElement(e,t){if(!this.owner||!this.owner.domElement)return;let r=this.owner.domElement,o=e instanceof B?e.domElement:e.domText;if(o){let i=r.childNodes[t]||null;o!==i&&r.insertBefore(o,i)}}_swapDomElement(e,t){if(!this.owner||!this.owner.domElement)return;let r=this.owner.domElement,o=e instanceof B?e.domElement:e.domText,i=t instanceof B?t.domElement:t.domText;if(!o||!i)return;let n=o.nextSibling,a=i.nextSibling;r.insertBefore(o,a),r.insertBefore(i,n)}update(e,t=!0,r=!1){var o,i,n,a;let c=this.items.slice(),u=new Map;for(let p of c)p instanceof B&&p.key!==null&&p.key!==void 0&&u.set(p.key,p);!r&&this.owner.domElement&&((i=(o=this.owner._hooks)==null?void 0:o.BeforeUpdate)==null||i.call(o,this.owner,e));let m=new Set(c),h=new Set;for(let p=0;p<e.length;p++){let y=e[p],v=typeof y=="object"&&y!==null,x=v?y._key:void 0,w=v?bo(y):void 0;if(x!==void 0){let C=u.get(x);if(C instanceof B&&C.tagName===w){u.delete(x);let E=this.items.indexOf(C);if(E!==p&&E>=0){let O=!!C._portal;this.move(E,p,O?!1:t,!0)}C.parent=this.owner,C.patch(y),h.add(C);continue}}else if(v){let C=this.items[p];if(C instanceof B&&C.key==null&&C.tagName===w&&m.has(C)&&!h.has(C)){C.parent=this.owner,C.patch(y),h.add(C);continue}}else{let C=this.items[p];if(C instanceof ao&&m.has(C)&&!h.has(C)){C.setText(y==null?"":y),h.add(C);continue}}h.add(this.insert(y,p,t,!0))}let d=this.items.slice(e.length);for(let p of d)this.remove(p,t,!0);u.forEach(p=>this.remove(p,t,!0)),r||(a=(n=this.owner._hooks)==null?void 0:n.Update)==null||a.call(n,this.owner)}insert(e,t,r=!0,o=!1){var i,n;let a=this.items.length,c=typeof t!="number"||isNaN(t)||t<0||t>a?a:t,u=this._createNode(e);if(this.items.splice(c,0,u),u instanceof B){u._hooks.Insert&&u._hooks.Insert(u);let m=this.owner.domElement;if(r&&m)if(u._portal){let h=u._portal(this.owner.getRoot());h&&u.render(h)}else{let h=u._createDOMNode(),d=(i=m.childNodes[c])!=null?i:null;m.insertBefore(h,d);let p=m.getRootNode(),y=p instanceof ShadowRoot?p:document.head,v=So(y);u.styles.render(v),u._hooks.Mount&&u._hooks.Mount(u),u.children.items.forEach(x=>{if(x instanceof B&&x._portal){let w=x._portal(x.getRoot());w&&x.render(w)}else x.render(h)})}}else{let m=this.owner.domElement;if(r&&m){let h=u._createDOMNode(),d=(n=m.childNodes[c])!=null?n:null;m.insertBefore(h,d)}}return!o&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner),u}remove(e,t=!0,r=!1){let o=this.items.indexOf(e);if(!(o<0)){if(e instanceof B){if(e._beforeRemoveFired)return;let i=()=>{let n=e.domElement,a=this.items.indexOf(e);a>=0&&this.items.splice(a,1),t&&n&&n.remove(),e._dispose()};if(e._hooks.BeforeRemove&&e.domElement){let n=!1,a=()=>{n||(n=!0,i())};e._beforeRemoveFired=!0,e._hooks.BeforeRemove(e,a),e._hooks.BeforeRemove.length<2&&!n?a():xt&&!n&&setTimeout(()=>{n||console.warn("[Domphy] _onBeforeRemove declared a `done` parameter (e.g. an exit animation) but did not call it within 5s \u2014 the element will stay in the DOM. Call done() when cleanup finishes.")},5e3)}else i()}else{let i=e.domText;this.items.splice(o,1),t&&i&&i.remove(),e._dispose()}!r&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner)}}clear(e=!0,t=!1){if(this.items.length===0)return;let r=this.items.slice();for(let o of r)this.remove(o,e,!0);!t&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner)}_dispose(){this.items.forEach(e=>e._dispose()),this.items=[]}swap(e,t,r=!0,o=!1){if(e<0||t<0||e>=this.items.length||t>=this.items.length||e===t)return;let i=this.items[e],n=this.items[t];this.items[e]=n,this.items[t]=i,r&&this._swapDomElement(i,n),!o&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner)}move(e,t,r=!0,o=!1){if(e<0||e>=this.items.length||t<0||t>=this.items.length||e===t)return;let i=this.items[e];this.items.splice(e,1),this.items.splice(t,0,i),r&&this._moveDomElement(i,t),!o&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner)}generateHTML(){let e="";for(let t of this.items)e+=t.generateHTML();return e}},Un=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e).catch(t=>{setTimeout(()=>{throw t},0)})},fe=new Set,kt=!1;function ko(e){fe.add(e),!kt&&(kt=!0,Un(Eo))}function Eo(){for(kt=!1;fe.size>0;){let e=[...fe];fe.clear();for(let t of e)t()}}function qn(){let e=0;for(;fo()||fe.size>0;){if(e++>1e4){console.error("[Domphy] flushSync did not settle");break}po(),Eo()}}var Ie=[];function Yn(){return Ie.length?Ie[Ie.length-1]:null}function Ot(e){let t=Yn();t&&t._add(e)}var Gn=class{constructor(){this._disposers=new Set,this._stopped=!1}_add(e){if(this._stopped){e();return}this._disposers.add(e)}run(e){Ie.push(this);try{return e()}finally{Ie.pop()}}stop(){if(!this._stopped){this._stopped=!0;for(let e of this._disposers)e();this._disposers.clear()}}};function Xn(){let e=new Gn;return Ot(()=>e.stop()),e}function Jn(e){let t=!1,r=!1,o=()=>{t||n()},i=new uo(()=>{t||ko(o)}),n=()=>{if(!(t||r)){r=!0,i.reset();try{mo(i,e)}finally{r=!1}}},a=()=>{t||(t=!0,i.reset(),fe.delete(o))};return Ot(a),n(),a}function Zn(e){let t="computed",r=new Le,o,i=!0,n=!1,a=()=>{i&&r.listenerCount(t)>0&&m()},c=new uo(()=>{i||(i=!0,ko(a))}),u=()=>{c.reset(),o=mo(c,e),i=!1,n=!0},m=()=>{let d=o,p=n;u(),!(p&&o===d)&&r.notify(t,o)},h=d=>{if(d)r.addListener(t,d);else{let p=Tt();p&&r.addListener(t,p.handler)}return i&&u(),o};return Ot(()=>{c.reset(),fe.delete(a),r._dispose()}),{_isState:!0,_notifier:r,get:h}}function Qn(e){return ho(e)}function er(e){return Nn(e)}var tr=class{constructor(e){this._notifier=new Le,this.initialRecord=ro({},e),this._record=ro({},e)}get(e,t){if(t)this._notifier.addListener(e,t);else{let r=Tt();r&&this._notifier.addListener(e,r.handler)}return this._record[e]}set(e,t){this._record[e]=t,this._notifier.notify(e)}addListener(e,t){return this._notifier.addListener(e,t)}removeListener(e,t){this._notifier.removeListener(e,t)}reset(e){this.set(e,this.initialRecord[e])}_dispose(){this._notifier._dispose()}};var Qe={};qe(Qe,{ElementTones:()=>Me,getTheme:()=>Q,setTheme:()=>ir,themeApply:()=>lr,themeCSS:()=>Dt,themeColor:()=>l,themeColorToken:()=>zt,themeDensity:()=>b,themeName:()=>Ze,themeSize:()=>g,themeSpacing:()=>s,themeTokens:()=>Po,themeVars:()=>ze});var or={direction:"darken",colors:{primary:["#ffffff","#e3ecff","#c6daff","#aac8ff","#8fb6ff","#76a3ff","#5f91fc","#4a7ff4","#386ee7","#2a5ed7","#1e4ec2","#1440aa","#0c3290","#072674","#041a57","#020f38","#010419","#000000"],secondary:["#ffffff","#fce6ea","#faced6","#f7b5c2","#f29db0","#ec859e","#e36e8d","#d8597d","#ca456e","#b93460","#a42351","#8e1643","#770b36","#5f0529","#46031d","#2d0210","#130104","#000000"],info:["#ffffff","#dcf0f9","#b7e1f6","#90d2f1","#6ac3eb","#42b4e2","#16a4d5","#0094c4","#0084b2","#00739e","#00638a","#005476","#004461","#00354d","#002638","#001623","#00070d","#000000"],success:["#ffffff","#e3f3dc","#c6e8b8","#a9dd94","#8ed171","#75c450","#61b635","#51a51f","#429304","#358100","#2a7000","#215f00","#194d00","#123c00","#0b2b00","#051a00","#010900","#000000"],warning:["#ffffff","#ffeada","#ffd3b3","#ffbd8d","#ffa96b","#ff9853","#ec8640","#d77531","#c16523","#aa5718","#944a0f","#7e3d09","#673106","#512504","#3b1a03","#250e02","#0e0401","#000000"],attention:["#ffffff","#ffeada","#ffd3b3","#ffbd8d","#ffa96b","#ff9853","#ec8640","#d77531","#c16523","#aa5718","#944a0f","#7e3d09","#673106","#512504","#3b1a03","#250e02","#0e0401","#000000"],error:["#ffffff","#fce7e4","#fbcfca","#f8b7b0","#f59f96","#ef877e","#e86f67","#de5852","#d3403e","#c5282c","#b30a1b","#9e000b","#860001","#6c0000","#510000","#340000","#170000","#000000"],danger:["#ffffff","#fce7e4","#fbcfca","#f8b7b0","#f59f96","#ef877e","#e86f67","#de5852","#d3403e","#c5282c","#b30a1b","#9e000b","#860001","#6c0000","#510000","#340000","#170000","#000000"],highlight:["#ffffff","#f9f5cd","#f4eb95","#efe05a","#e6d427","#d3c100","#bfad00","#ab9b00","#988900","#857700","#736600","#615600","#4f4600","#3e3600","#2c2700","#1b1700","#090700","#000000"],neutral:["#ffffff","#ededed","#dbdbdb","#cacaca","#bababa","#ababab","#9b9b9b","#8d8d8d","#7e7e7e","#707070","#636363","#565656","#484848","#383838","#282828","#181818","#080808","#000000"]},baseTones:{highlight:5,warning:6,error:8,danger:8,secondary:8,primary:9,info:8,success:8,neutral:8},fontSizes:["0.75rem","0.875rem","1rem","1.25rem","1.5625rem","1.9375rem","2.4375rem","3.0625rem"],densities:[.75,1,1.5,2,2.5],darkBias:1,custom:{}},Ne=or,It=e=>JSON.parse(JSON.stringify(e)),To=e=>e.replace(/[^a-zA-Z0-9_-]/g,"_"),_e={light:It(Ne),dark:ar(Ne)},Je=null,Pt=new Map;function Lt(e){let t=Object.keys(e.colors)[0];return t?e.colors[t].length:0}function nr(e){for(let t in e)if(!Object.keys(Ne).includes(t))throw new Error(`Invalid key: ${t}`);if(e.fontSizes&&!Array.isArray(e.fontSizes))throw new Error("fontSize must be array of string");if(e.densities&&(!Array.isArray(e.densities)||e.densities.some(t=>typeof t!="number")))throw new Error("densities must be array of number");if("custom"in e){let t=e.custom;if(typeof t!="object"||t===null)throw new Error("Invalid custom property: must be an object")}}function Oo(e,t){var r;for(let o in t)t[o]&&typeof t[o]=="object"&&!Array.isArray(t[o])?((r=e[o])!=null||(e[o]={}),Oo(e[o],t[o])):e[o]=t[o]}function rr(e,t){let r={},o=Lt(t);for(let n in t){let a=t[n];if(n==="colors")for(let c in t.colors)[...Array(o).keys()].forEach(u=>r[`--${c}-${u}`]=t.colors[c][u]);else if(n==="fontSizes")[...Array(8).keys()].forEach(c=>r[`--fontSize-${c}`]=t.fontSizes[c]);else if(n==="custom"&&a&&typeof a=="object")for(let c in a)r[`--custom-${To(c)}`]=a[c]}let i="";for(let n in r)i+=` ${n}: ${r[n]};
1
+ "use strict";var Domphy=(()=>{var qe=Object.defineProperty,Dn=Object.defineProperties,$n=Object.getOwnPropertyDescriptor,Ln=Object.getOwnPropertyDescriptors,Rn=Object.getOwnPropertyNames,Qt=Object.getOwnPropertySymbols;var to=Object.prototype.hasOwnProperty,zn=Object.prototype.propertyIsEnumerable;var eo=(e,t,n)=>t in e?qe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,we=(e,t)=>{for(var n in t||(t={}))to.call(t,n)&&eo(e,n,t[n]);if(Qt)for(var n of Qt(t))zn.call(t,n)&&eo(e,n,t[n]);return e},oo=(e,t)=>Dn(e,Ln(t));var Ye=(e,t)=>{for(var n in t)qe(e,n,{get:t[n],enumerable:!0})},In=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Rn(t))!to.call(e,i)&&i!==n&&qe(e,i,{get:()=>t[i],enumerable:!(o=$n(t,i))||o.enumerable});return e};var Mn=e=>In(qe({},"__esModule",{value:!0}),e);var Qa={};Ye(Qa,{core:()=>Je,theme:()=>et,ui:()=>ht});var Je={};Ye(Je,{AttributeList:()=>wo,BooleanAttributes:()=>Tt,CamelAttributes:()=>so,ElementList:()=>ko,ElementNode:()=>B,HtmlTags:()=>_t,Notifier:()=>Me,PrefixCSS:()=>de,RecordState:()=>cr,State:()=>St,SvgTags:()=>co,VoidTags:()=>uo,batch:()=>lr,computed:()=>ar,configure:()=>Bn,effect:()=>ir,effectScope:()=>rr,flushPendingNotifiers:()=>yo,flushSync:()=>tr,hasPendingNotifiers:()=>go,hashString:()=>Te,merge:()=>$,r:()=>Un,runBatched:()=>po,toState:()=>f,untrack:()=>sr});var An=Object.defineProperty,no=Object.getOwnPropertySymbols,Vn=Object.prototype.hasOwnProperty,Nn=Object.prototype.propertyIsEnumerable,ro=(e,t,n)=>t in e?An(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,io=(e,t)=>{for(var n in t||(t={}))Vn.call(t,n)&&ro(e,n,t[n]);if(no)for(var n of no(t))Nn.call(t,n)&&ro(e,n,t[n]);return e},Tt=["allowFullScreen","async","autoFocus","autoPlay","checked","compact","contentEditable","controls","declare","default","defer","disabled","formNoValidate","hidden","isMap","itemScope","loop","multiple","muted","noHref","noShade","noValidate","open","playsInline","readonly","required","reversed","scoped","selected","sortable","trueSpeed","typeMustMatch","wmode","autoCapitalize","translate","spellCheck","inert","download","noModule","paused","autoPictureInPicture"],so=["viewBox","preserveAspectRatio","gradientTransform","gradientUnits","spreadMethod","markerStart","markerMid","markerEnd","markerHeight","markerWidth","markerUnits","refX","refY","patternContentUnits","patternTransform","patternUnits","filterUnits","primitiveUnits","kernelUnitLength","clipPathUnits","maskContentUnits","maskUnits"],_t=["a","abbr","address","article","aside","audio","b","base","blockquote","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","slot","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","bdi","bdo","math","menu","search","area","embed","hr","animate","animateMotion","animateTransform","circle","clipPath","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","prefetch","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","tbreak","text","textPath","tspan","use","view"],de={transform:["webkit","ms"],transition:["webkit","ms"],animation:["webkit"],userSelect:["webkit","ms"],flexDirection:["webkit","ms"],flexWrap:["webkit","ms"],justifyContent:["webkit","ms"],alignItems:["webkit","ms"],alignSelf:["webkit","ms"],order:["webkit","ms"],flexGrow:["webkit","ms"],flexShrink:["webkit","ms"],flexBasis:["webkit","ms"],columns:["webkit"],columnCount:["webkit"],columnGap:["webkit"],columnRule:["webkit"],columnWidth:["webkit"],boxSizing:["webkit"],appearance:["webkit","moz"],filter:["webkit"],backdropFilter:["webkit"],clipPath:["webkit"],mask:["webkit"],maskImage:["webkit"],textSizeAdjust:["webkit","ms"],hyphens:["webkit","ms"],writingMode:["webkit","ms"],gridTemplateColumns:["ms"],gridTemplateRows:["ms"],gridAutoColumns:["ms"],gridAutoRows:["ms"],gridColumn:["ms"],gridRow:["ms"],marginInlineStart:["webkit"],marginInlineEnd:["webkit"],paddingInlineStart:["webkit"],paddingInlineEnd:["webkit"],minInlineSize:["webkit"],maxInlineSize:["webkit"],minBlockSize:["webkit"],maxBlockSize:["webkit"],inlineSize:["webkit"],blockSize:["webkit"],tabSize:["moz"],overscrollBehavior:["webkit","ms"],touchAction:["ms"],resize:["webkit"],printColorAdjust:["webkit"],backgroundClip:["webkit"],boxDecorationBreak:["webkit"],overflowScrolling:["webkit"]},co=["svg","circle","path","rect","ellipse","line","polyline","polygon","g","defs","use","symbol","linearGradient","radialGradient","stop","clipPath","mask","filter","text","tspan","textPath","image","pattern","marker","animate","animateTransform","animateMotion","feGaussianBlur","feComposite","feColorMatrix","feMerge","feMergeNode","feOffset","feFlood","feBlend","foreignObject"],uo=["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"],mo={};function Bn(e){Object.assign(mo,e)}function Hn(){return mo}var jn=["onAbort","onAuxClick","onBeforeMatch","onBeforeToggle","onBlur","onCancel","onCanPlay","onCanPlayThrough","onChange","onClick","onClose","onContextLost","onContextMenu","onContextRestored","onCopy","onCueChange","onCut","onDblClick","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDragStart","onDrop","onDurationChange","onEmptied","onEnded","onError","onFocus","onFormData","onInput","onInvalid","onKeyDown","onKeyPress","onKeyUp","onLoad","onLoadedData","onLoadedMetadata","onLoadStart","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onPaste","onPause","onPlay","onPlaying","onProgress","onRateChange","onReset","onResize","onScroll","onScrollEnd","onSecurityPolicyViolation","onSeeked","onSeeking","onSelect","onSlotChange","onStalled","onSubmit","onSuspend","onTimeUpdate","onToggle","onVolumeChange","onWaiting","onWheel","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onCompositionStart","onCompositionUpdate","onCompositionEnd","onTransitionEnd","onTransitionStart","onAnimationStart","onAnimationEnd","onAnimationIteration","onFullscreenChange","onFullscreenError","onFocusIn","onFocusOut"],Fn=jn.reduce((e,t)=>{let n=t.slice(2).toLowerCase();return e[n]=t,e},{}),ho=class{constructor(e){this._releases=new Set;let t=(()=>e());t.onSubscribe=n=>{this._releases.add(n)},this.handler=t}reset(){for(let e of this._releases)e();this._releases.clear()}get dependencyCount(){return this._releases.size}},ze=[],bt=0;function Ot(){return bt>0?null:ze.length?ze[ze.length-1]:null}function fo(e,t){ze.push(e);try{return t()}finally{ze.pop()}}function Wn(e){bt++;try{return e()}finally{bt--}}var J=[],Kn=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e).catch(t=>{setTimeout(()=>{throw t},0)})},ao=100,Xe=0,vt=new Set,ke=new Set;function po(e){Xe++;try{return e()}finally{if(Xe--,Xe===0){let t=vt;vt=new Set;for(let n of t)n._scheduleFlush()}}}var Me=class{constructor(){this._listeners={},this._pending=new Map,this._scheduled=!1,this._flushing=new Map,this._selfDepth=0}_dispose(){if(this._listeners)for(let e in this._listeners)this._listeners[e].clear();this._listeners=null}addListener(e,t){if(!this._listeners)return()=>{};if(typeof e!="string"||typeof t!="function")throw new Error("Event name must be a string, listener must be a function");this._listeners[e]||(this._listeners[e]=new Set);let n=()=>this.removeListener(e,t);return this._listeners[e].has(t)||(this._listeners[e].add(t),typeof t.onSubscribe=="function"&&t.onSubscribe(n)),n}removeListener(e,t){if(!this._listeners)return;let n=this._listeners[e];n&&n.has(t)&&(n.delete(t),n.size===0&&delete this._listeners[e])}listenerCount(e){var t,n,o;return(o=(n=(t=this._listeners)==null?void 0:t[e])==null?void 0:n.size)!=null?o:0}notify(e,...t){if(!this._listeners||!this._listeners[e])return;let n=J.length?J[J.length-1]:null;if(n&&n[0]===this&&n[1]===e){let o=this._flushing.get(e);if(o&&o[0]===t[0])return;if(this._selfDepth>=ao){console.error(`[Domphy] Runaway self-update on "${e}" \u2014 stopped after ${ao} iterations`);return}this._selfDepth++,this._pending.set(e,{args:t,chain:[]})}else{if(this._isCircular(e))return;this._pending.set(e,{args:t,chain:[...J]})}Xe>0?vt.add(this):this._scheduleFlush()}_scheduleFlush(){this._scheduled||(this._scheduled=!0,ke.add(this),Kn(()=>this._flushAll()))}_isCircular(e){let t=J.findIndex(([o,i])=>o===this&&i===e);if(t===-1)return!1;let n=[...J.slice(t).map(([,o])=>o),e];return console.error(`[Domphy] Circular dependency detected:
2
+ ${n.join(" \u2192 ")}`),!0}_flushAll(){this._scheduled=!1,ke.delete(this);let e=this._pending;this._pending=new Map;for(let[t,{args:n,chain:o}]of e)J=o,this._flush(t,n);J=[],this._pending.size===0&&(this._selfDepth=0)}_flush(e,t){if(!this._listeners)return;let n=this._listeners[e];if(n){J.push([this,e]),this._flushing.set(e,t);for(let o of[...n])if(n.has(o))try{o(...t)}catch(i){console.error(i)}this._flushing.delete(e),J.pop()}}};function go(){return ke.size>0}function yo(){let e=0;for(;ke.size>0;){if(e++>1e4){console.error("[Domphy] flushSync: notifier queue did not settle");break}let t=[...ke];ke.clear();for(let n of t)n._flushAll()}}var St=class{constructor(e,t=typeof e){this.name=t,this._isState=!0,this._notifier=new Me,this.initialValue=e,this._value=e}get(e){if(e)this.addListener(e);else{let t=Ot();t&&this.addListener(t.handler)}return this._value}set(e){this._notifier&&(this._value=e,this._notifier.notify(this.name,e))}reset(){this.set(this.initialValue)}addListener(e){return this._notifier?this._notifier.addListener(this.name,e):()=>{}}removeListener(e){this._notifier&&this._notifier.removeListener(this.name,e)}_dispose(){this._notifier&&(this._notifier._dispose(),this._notifier=null)}};function $(e={},t={}){let n=["animation","transition","boxShadow","textShadow","background","fontFamily"],o=["class","rel","transform","acceptCharset","sandbox"],i=["content"];Object.prototype.toString.call(t)==="[object Object]"&&Object.getPrototypeOf(t)===Object.prototype&&(t=ae(t));for(let r in t){let a=t[r];if(!(a==null||a===""))if(typeof a=="object"&&!Array.isArray(a))typeof e[r]=="object"?e[r]=$(e[r],a):e[r]=a;else if(n.includes(r))if(typeof e[r]=="function"||typeof a=="function"){let c=e[r];e[r]=u=>{let h=typeof c=="function"?c(u):c,m=typeof a=="function"?a(u):a;return[h,m].filter(d=>d).join(", ")}}else e[r]=[e[r],a].filter(c=>c).join(", ");else if(i.includes(r))if(typeof e[r]=="function"||typeof a=="function"){let c=e[r];e[r]=u=>{let h=typeof c=="function"?c(u):c,m=typeof a=="function"?a(u):a;return[h,m].filter(d=>d).join("")}}else e[r]=[e[r],a].filter(c=>c).join("");else if(o.includes(r))if(typeof e[r]=="function"||typeof a=="function"){let c=e[r];e[r]=u=>{let h=typeof c=="function"?c(u):c,m=typeof a=="function"?a(u):a;return[h,m].filter(d=>d).join(" ")}}else e[r]=[e[r],a].filter(c=>c).join(" ");else if(r.startsWith("on")){let c=r.replace("on","").toLowerCase();Yn(e,c,a)}else if(r.startsWith("_on")){let c=r.replace("_on","");qn(e,c,a)}else e[r]=a}return e}function Te(e=""){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=t*16777619>>>0;return String.fromCharCode(97+t%26)+t.toString(16)}function f(e,t){return e instanceof St||e!=null&&e._isState?e:new St(e,t)}function Un(e){return e}function qn(e,t,n){let o=`_on${t}`,i=e[o];typeof i=="function"?e[o]=(...r)=>{i(...r),n(...r)}:e[o]=n}function Yn(e,t,n){let o=Fn[t];if(!o)throw Error(`invalid event name "${t}"`);let i=e[o];typeof i=="function"?e[o]=(r,a)=>{i(r,a),n(r,a)}:e[o]=n}function ae(e,t=new WeakMap){if(e===null||typeof e!="object"||typeof e=="function")return e;if(t.has(e))return t.get(e);let n=Object.getPrototypeOf(e);if(n!==Object.prototype&&!Array.isArray(e))return e;let o;if(Array.isArray(e)){o=[],t.set(e,o);for(let i of e)o.push(ae(i,t));return o}if(e instanceof Date)return new Date(e);if(e instanceof RegExp)return new RegExp(e);if(e instanceof Map){o=new Map,t.set(e,o);for(let[i,r]of e)o.set(ae(i,t),ae(r,t));return o}if(e instanceof Set){o=new Set,t.set(e,o);for(let i of e)o.add(ae(i,t));return o}if(ArrayBuffer.isView(e))return new e.constructor(e);if(e instanceof ArrayBuffer)return e.slice(0);o=Object.create(n),t.set(e,o);for(let i of Reflect.ownKeys(e))o[i]=ae(e[i],t);return o}function bo(e,t=!1){if(Object.prototype.toString.call(e)!=="[object Object]")throw Error(`typeof ${e} is invalid DomphyElement`);let n=Object.keys(e);for(let o=0;o<n.length;o++){let i=n[o],r=e[i];if(o===0&&!_t.includes(i)&&!i.includes("-")&&!t)throw Error(`key ${i} is not valid HTML tag name`);if(i==="style"&&r&&Object.prototype.toString.call(r)!=="[object Object]")throw Error('"style" must be a object');if(i==="$")e.$.forEach(a=>bo(a,!0));else{if(i.startsWith("_on")&&typeof r!="function")throw Error(`hook ${i} value "${r}" must be a function `);if(i.startsWith("on")&&typeof r!="function")throw Error(`event ${i} value "${r}" must be a function `);if(i==="_portal"&&typeof r!="function")throw Error('"_portal" must be a function return HTMLElement');if(i==="_context"&&Object.prototype.toString.call(r)!=="[object Object]")throw Error('"_context" must be a object');if(i==="_metadata"&&Object.prototype.toString.call(r)!=="[object Object]")throw Error('"_metadata" must be a object');if(i==="_key"&&typeof r!="string"&&typeof r!="number")throw Error('"_key" must be a string or number')}}return!0}function Ge(e){return/<([a-z][\w-]*)(\s[^>]*)?>.*<\/\1>|<([a-z][\w-]*)(\s[^>]*)?\/>/i.test(e.trim())}function Gn(e){let t=e.replace(/\s+on[a-zA-Z][\w-]*\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*)/g,"");return t=t.replace(/\/on[a-zA-Z][\w-]*\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*)/g,"/"),t=t.replace(/((?:href|src|action|formaction)\s*=\s*)(["']?)[\s]*javascript:[^"'\s>]*/gi,"$1$2#"),t}function vo(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function So(e){return Object.keys(e).find(t=>_t.includes(t))}function xo(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Xn(e){if(e.indexOf("@")===0)return[e];for(var t=[],n=0,o=0,i="",r=0,a=e.length;r<a;r++){var c=e[r];if(c==="(")n+=1;else if(c===")")n-=1;else if(c==="[")o+=1;else if(c==="]")o-=1;else if(c===","&&!n&&!o){t.push(i.trim()),i="";continue}i+=c}return t.push(i.trim()),t}function xt(e){let t=e.trim();return t.startsWith("@")?t.replace(/\s+/g,""):t.replace(/\s*([>+~,])\s*/g,"$1").replace(/\s+/g," ").replace(/\(\s*odd\s*\)/g,"(2n+1)").replace(/\(\s*even\s*\)/g,"(2n)").trim()}function Jn(e,t){for(let n=0;n<e.length;n++){let o=e[n],i=null;typeof o.selectorText=="string"?i=xt(o.selectorText):typeof o.cssText=="string"&&o.cssText.startsWith("@")&&(i=xt(o.cssText.split("{")[0])),i&&!t.has(i)&&t.set(i,o)}return t}function Co(e,t){var n;let o=e.querySelector("#domphy-style");if(!o){o=document.createElement("style"),o.id="domphy-style";let i=t!=null?t:Hn().cspNonce;i&&(o.nonce=i),e.appendChild(o)}return o.dataset.domphyBase!=="true"&&((n=o.sheet)==null||n.insertRule("[hidden] { display: none !important; }",0),o.dataset.domphyBase="true"),o}var Ct=e=>{if(Array.isArray(e.$)){let t={};return e.$.forEach(n=>$(t,Ct(n))),delete e.$,$(t,e),t}else return e},Zn=class{constructor(e,t,n){this._notifier=new Me,this._releases=[],this.parent=n,this.isBoolean=Tt.includes(e),so.includes(e)?this.name=e:this.name=xo(e),this.value=void 0,this.set(t)}render(){if(!this.parent||!this.parent.domElement)return;let e=this.parent.domElement,t=["value"];this.isBoolean?this.value===!1||this.value==null?e.removeAttribute(this.name):e.setAttribute(this.name,this.value===!0?"":this.value):this.value==null?e.removeAttribute(this.name):t.includes(this.name)?e[this.name]=this.value:e.setAttribute(this.name,this.value)}set(e){var t,n;let o=this.value;if(this._releases.length){for(let i of this._releases)i();this._releases=[]}if(e==null)this.value=null;else if(typeof e=="function"){let i=()=>{if(!this.parent||this.parent._disposed)return;let r=this.value;this.value=this.isBoolean?!!e(i):e(i),this.render(),r!==this.value&&this._notifier.notify(this.name,this.value)};i.elementNode=this.parent,i.debug=`class:${(t=this.parent)==null?void 0:t.tagName}_${(n=this.parent)==null?void 0:n.nodeId} attribute:${this.name}`,i.onSubscribe=r=>{this._releases.push(r),this.parent&&this.parent.addHook("BeforeRemove",()=>{r(),i=null})},this.value=this.isBoolean?!!e(i):e(i)}else this.value=this.isBoolean?!!e:e;this.render(),o!==this.value&&this._notifier.notify(this.name,this.value)}addListener(e){let t=e;t.onSubscribe=n=>{var o;return(o=this.parent)==null?void 0:o.addHook("BeforeRemove",n)},this._notifier.addListener(this.name,t)}remove(){this.parent&&this.parent.attributes&&this.parent.attributes.remove(this.name),this._dispose()}_dispose(){this._notifier._dispose(),this.value=null,this.parent=null}generateHTML(){let{name:e,value:t}=this;if(this.isBoolean)return t?`${e}`:"";{let n=Array.isArray(t)?JSON.stringify(t):t;return`${e}="${vo(String(n))}"`}}},wo=class{constructor(e){this.items={},this.parent=e}generateHTML(){if(!this.items)return"";let e=Object.values(this.items).map(t=>t.generateHTML()).join(" ");return e?` ${e}`:""}get(e){var t;if(this.items)return(t=this.items[e])==null?void 0:t.value}set(e,t){!this.items||!this.parent||(this.items[e]?this.items[e].set(t):this.items[e]=new Zn(e,t,this.parent))}addListener(e,t){this.has(e)&&this.items[e].addListener(t)}has(e){return this.items?Object.hasOwn(this.items,e):!1}remove(e){this.items&&(this.items[e]&&(this.items[e]._dispose(),delete this.items[e]),this.parent&&this.parent.domElement&&this.parent.domElement instanceof Element&&this.parent.domElement.removeAttribute(e))}_dispose(){if(this.items)for(let e in this.items)this.items[e]._dispose();this.items=null,this.parent=null}toggle(e,t){if(!Tt.includes(e))throw Error(`${e} is not a boolean attribute`);t===!0?this.set(e,!0):t===!1?this.remove(e):this.has(e)?this.remove(e):this.set(e,!0)}addClass(e){if(!e||typeof e!="string")return;let t=(o,i)=>{let r=(o||"").split(" ").filter(a=>a);return!r.includes(i)&&r.push(e),r.join(" ")},n=this.get("class");typeof n=="function"?this.set("class",()=>t(n(),e)):this.set("class",t(n,e))}hasClass(e){return!e||typeof e!="string"?!1:(this.get("class")||"").split(" ").filter(t=>t).includes(e)}toggleClass(e){!e||typeof e!="string"||(this.hasClass(e)?this.removeClass(e):this.addClass(e))}removeClass(e){if(!e||typeof e!="string")return;let t=(this.get("class")||"").split(" ").filter(n=>n).filter(n=>n!==e);t.length>0?this.set("class",t.join(" ")):this.remove("class")}replaceClass(e,t){!e||!t||typeof e!="string"||typeof t!="string"||this.hasClass(e)&&(this.removeClass(e),this.addClass(t))}},wt=typeof process!="undefined"&&process.env!=null&&process.env.NODE_ENV!=="production",Qn=class{constructor(e,t,n){this.value="",this.name=e,this.cssName=xo(e),this.parentRule=n,this.set(t)}_domUpdate(){if(!this.parentRule)return;let e=this.parentRule.domRule;if(e&&e.style){let t=e.style;t.setProperty(this.cssName,String(this.value)),de[this.name]&&de[this.name].forEach(n=>{t.setProperty(`-${n}-${this.cssName}`,String(this.value))})}}_dispose(){this.value="",this.parentRule=null}set(e){var t,n,o,i;if(typeof e=="function"){let r=(()=>{var a;!this.parentRule||(a=this.parentRule.parentNode)!=null&&a._disposed||(this.value=e(r),this._domUpdate())});r.onSubscribe=a=>{var c;(c=this.parentRule.parentNode)==null||c.addHook("BeforeRemove",()=>{a(),r=null})},r.elementNode=this.parentRule.root,r.debug=`class:${(n=(t=this.parentRule)==null?void 0:t.root)==null?void 0:n.tagName}_${(i=(o=this.parentRule)==null?void 0:o.root)==null?void 0:i.nodeId} style:${this.name}`,this.value=e(r)}else this.value=e;this._domUpdate()}remove(){if(this.parentRule){if(this.parentRule.domRule instanceof CSSStyleRule){let e=this.parentRule.domRule.style;e.removeProperty(this.cssName),de[this.name]&&de[this.name].forEach(t=>{e.removeProperty(`-${t}-${this.cssName}`)})}delete this.parentRule.styleBlock[this.name],this._dispose()}}cssText(){let e=`${this.cssName}: ${this.value}`;return de[this.name]&&de[this.name].forEach(t=>{e+=`; -${t}-${this.cssName}: ${this.value}`}),e}},me=class Et{constructor(t,n){this.domRule=null,this.styleBlock={},this.selectorText=t,this.styleList=new Eo(this),this.parent=n}_dispose(){if(this.styleBlock)for(let t of Object.values(this.styleBlock))t._dispose();this.styleList&&this.styleList._dispose(),this.styleBlock=null,this.styleList=null,this.domRule=null,this.parent=null}get root(){let t=this.parent;for(;t instanceof Et;)t=t.parent;return t}get parentNode(){let t=this.parent;for(;t&&t instanceof Et;)t=t.parent;return t}insertStyle(t,n){this.styleBlock&&(this.styleBlock[t]?this.styleBlock[t].set(n):this.styleBlock[t]=new Qn(t,n,this))}removeStyle(t){this.styleBlock&&this.styleBlock[t]&&this.styleBlock[t].remove()}cssText(){if(!this.styleBlock||!this.styleList)return"";let t=Object.values(this.styleBlock).map(o=>o.cssText()).join(";"),n=this.styleList.cssText();return`${this.selectorText} { ${t} ${n} } `}mount(t){!t||!this.styleList||(this.domRule=t,"cssRules"in t&&this.styleList.mount(t.cssRules))}remove(){if(this.domRule&&this.domRule.parentStyleSheet){let t=this.domRule.parentStyleSheet,n=t.cssRules;for(let o=0;o<n.length;o++)if(n[o]===this.domRule){t.deleteRule(o);break}}this._dispose()}render(t){if(!this.styleBlock||!this.styleList)return;let n=Object.values(this.styleBlock).map(o=>o.cssText()).join(";");try{if(this.selectorText.startsWith("@")){if(/^@(media|supports|container|layer)\b/.test(this.selectorText)){let o=t.insertRule(`${this.selectorText} {}`,t.cssRules.length),i=t.cssRules[o];"cssRules"in i&&(this.mount(i),this.styleList.render(i))}else if(this.selectorText.startsWith("@keyframes")||this.selectorText.startsWith("@font-face")){let o=this.cssText(),i=t.insertRule(o,t.cssRules.length),r=t.cssRules[i];this.mount(r)}}else{let o=`${this.selectorText} { ${n} }`,i=t.insertRule(o,t.cssRules.length),r=t.cssRules[i];r&&"selectorText"in r&&this.mount(r)}}catch(o){console.warn("Failed to insert rule:",this.selectorText,o)}}},Eo=class{constructor(e){this.items=[],this.domStyle=null,this.parent=e}get parentNode(){let e=this.parent;for(;e&&e instanceof me;)e=e.parent;return e}addCSS(e,t=""){if(!this.items||!this.parent)return;let n={},o=[];function i(r,a){return r.startsWith("&")?`${a}${r.slice(1)}`:`${a} ${r}`}for(let r in e){let a=e[r],c=Xn(r);for(let u of c){let h=i(u,t);if(/^@(container|layer|supports|media)\b/.test(u)){if(typeof a=="object"&&a!=null){let m=new me(u,this.parent);m.styleList.addCSS(a,t),o.push(m)}}else if(u.startsWith("@keyframes")){let m=new me(u,this.parent);m.styleList.addCSS(a,""),this.items.push(m)}else if(u.startsWith("@font-face")){let m=new me(u,this.parent);for(let d in a)m.insertStyle(d,a[d]);this.items.push(m)}else if(typeof a=="object"&&a!=null){let m=new me(h,this.parent);this.items.push(m);for(let[d,p]of Object.entries(a))if(typeof p=="object"&&p!=null){let g=i(d,h);d.startsWith("&")?this.addCSS(p,g):m.styleList.insertRule(g).styleList.addCSS(p,g)}else m.insertStyle(d,p)}else n[u]=a}}if(Object.keys(n).length){let r=new me(t,this.parent);for(let a in n)r.insertStyle(a,n[a]);this.items.push(r)}for(let r of o)this.items.push(r)}cssText(){return this.items?this.items.map(e=>e.cssText()).join(""):""}insertRule(e){if(!this.items||!this.parent)return null;let t=this.items.find(n=>n.selectorText===e);return t||(t=new me(e,this.parent),this.items.push(t)),t}hydrate(e){if(this.items)for(let t of this.items){let n=e.get(xt(t.selectorText));n&&t.mount(n)}}mount(e){if(!this.items)return;if(!e)throw Error("Require domRuleList argument");let t=0,n=o=>o.replace("(odd)","(2n+1)").replace("(even)","(2n)");this.items.forEach((o,i)=>{let r=i-t,a=e[r];a&&(o.selectorText.startsWith("@")&&a instanceof CSSKeyframesRule||"keyText"in a?o.mount(a):"selectorText"in a?a.selectorText!==n(o.selectorText)?t+=1:o.mount(a):"cssRules"in a&&o.mount(a))})}render(e){e instanceof HTMLStyleElement?(this.domStyle=e,this.items.forEach(t=>t.render(e.sheet))):e instanceof CSSGroupingRule&&this.items.forEach(t=>t.render(e))}_dispose(){if(this.items)for(let e=0;e<this.items.length;e++)this.items[e]._dispose();this.items=[],this.parent=null,this.domStyle=null}},B=class Ee{constructor(t,n=null,o=0){this._disposed=!1,this._beforeRemoveFired=!1,this.type="ElementNode",this.parent=null,this.children=new ko(this),this.styles=new Eo(this),this.attributes=new wo(this),this.domElement=null,this._hooks={},this._events=null,this._boundEvents=new Set,this._context={},this._metadata={},this.key=null;var i,r;t=ae(t),bo(t),t.style=t.style||{},this.parent=n,this.tagName=So(t),t=Ct(t),this.key=(i=t._key)!=null?i:null,this._context=t._context||{},this._metadata=t._metadata||{};let a=`${(r=this.parent)==null?void 0:r.nodeId}.${o}`,c=JSON.stringify(t.style||{},(h,m)=>typeof m=="function"?a:m);this.nodeId=Te(a+c),this.attributes.addClass(`${this.tagName}_${this.nodeId}`),t._onSchedule&&t._onSchedule(this,t),this.merge(t);let u=t[this.tagName];if(u!=null&&u!==void 0)if(typeof u=="function"){let h=()=>{if(!this._disposed)try{let m=u(h);this.children.update(Array.isArray(m)?m:[m])}catch(m){this._handleError(m)}};h.elementNode=this,h.debug=`class:${this.tagName}_${this.nodeId} children`,h.onSubscribe=m=>this.addHook("BeforeRemove",()=>{m(),h=null}),h&&h()}else this.children.update(Array.isArray(u)?u:[u]);this._hooks.Init&&this._hooks.Init(this)}_createDOMNode(){let t=co.includes(this.tagName)?document.createElementNS("http://www.w3.org/2000/svg",this.tagName):document.createElement(this.tagName);if(this.domElement=t,this._events)for(let n in this._events)this._bindEvent(n);return this.attributes&&Object.values(this.attributes.items).forEach(n=>n.render()),t}_bindEvent(t){if(!this.domElement||this._boundEvents.has(t))return;this._boundEvents.add(t);let n=o=>{var i,r;return(r=(i=this._events)==null?void 0:i[t])==null?void 0:r.call(i,o,this)};this.domElement.addEventListener(t,n),this.addHook("BeforeRemove",o=>{var i;(i=o.domElement)==null||i.removeEventListener(t,n),n=null})}_dispose(){var t,n,o,i;this._disposed||(this._disposed=!0,this._beforeRemoveFired||(this._beforeRemoveFired=!0,(n=(t=this._hooks).BeforeRemove)==null||n.call(t,this,()=>{})),this.children&&this.children._dispose(),this.styles&&(this.styles.items.forEach(r=>r.remove()),this.styles._dispose()),this.attributes&&this.attributes._dispose(),(i=(o=this._hooks).Remove)==null||i.call(o,this),this.domElement=null,this._hooks={},this._events=null,this._context={},this._metadata={},this.parent=null)}merge(t){$(this._context,t._context),$(this._metadata,t._metadata);let n=Object.keys(t);for(let o=0;o<n.length;o++){let i=n[o],r=t[i];["$","_onSchedule","_key","_context","_metadata","style",this.tagName].includes(i)||(["_onInit","_onInsert","_onMount","_onBeforeUpdate","_onUpdate","_onBeforeRemove","_onRemove","_onError"].includes(i)?this.addHook(i.substring(3),r):i.startsWith("on")?this.addEvent(i.substring(2).toLowerCase(),r):i==="_portal"?this._portal=r:i==="class"&&typeof r=="string"?this.attributes.addClass(r):this.attributes.set(i,r))}t.style&&this.styles.addCSS(t.style||{},`.${`${this.tagName}_${this.nodeId}`}`)}patch(t){let n=ae(t);n.style=n.style||{},n=Ct(n);let o=n[this.tagName];if(typeof o!="function"){let h=o==null?[]:Array.isArray(o)?o:[o];this.children.update(h,!!this.domElement,!0)}n._context&&$(this._context,n._context),n._metadata&&$(this._metadata,n._metadata);let i=`${this.tagName}_${this.nodeId}`,r=["$","_onSchedule","_key","_context","_metadata","style",this.tagName],a=["_onInit","_onInsert","_onMount","_onBeforeUpdate","_onUpdate","_onBeforeRemove","_onRemove","_onError"],c=new Set(["class"]),u=null;this._events={};for(let h of Object.keys(n)){if(r.includes(h)||a.includes(h)||h==="_portal")continue;let m=n[h];h.startsWith("on")&&typeof m=="function"?this.addEvent(h.substring(2).toLowerCase(),m):h==="class"&&typeof m=="string"?u=m:(this.attributes.set(h,m),c.add(h))}if(this.attributes.set("class",u?`${i} ${u}`:i),this.attributes.items)for(let h of Object.keys(this.attributes.items))c.has(h)||this.attributes.remove(h);if(this._events)for(let h in this._events)this._bindEvent(h)}_handleError(t){let n=this;for(;n;){if(n._hooks.Error){let o=n;n._hooks.Error(o,t,()=>{o.children.update([])});return}n=n.parent}console.error("[Domphy] Unhandled error in reactive child:",t)}addEvent(t,n){this._events=this._events||{};let o=this._events[t];typeof o=="function"?this._events[t]=(i,r)=>{o(i,r),n(i,r)}:this._events[t]=n}addHook(t,n){let o=this._hooks[t];if(typeof o=="function"){let i=((...r)=>{o(...r),n(...r)});try{Object.defineProperty(i,"length",{value:Math.max(o.length,n.length),configurable:!0})}catch(r){}this._hooks[t]=i}else this._hooks[t]=n}getRoot(){let t=this;for(;t&&t instanceof Ee&&t.parent;)t=t.parent;return t}getContext(t){let n=this;for(;n&&(!n._context||!Object.hasOwn(n._context,t));)n=n.parent;return n&&n._context?n._context[t]:void 0}setContext(t,n){this._context=this._context||{},this._context[t]=n}getMetadata(t){return this._metadata?this._metadata[t]:void 0}setMetadata(t,n){this._metadata=this._metadata||{},this._metadata[t]=n}generateCSS(){if(!this.styles||!this.children)return"";let t=this.styles.cssText();return t+=this.children.items.map(n=>n instanceof Ee?n.generateCSS():"").join(""),t}generateHTML(){if(!this.children||!this.attributes)return"";let t=this.attributes.generateHTML();if(uo.includes(this.tagName))return`<${this.tagName}${t}>`;let n=this.children.generateHTML();return`<${this.tagName}${t}>${n}</${this.tagName}>`}mount(t,n){if(!t)throw new Error("Missing dom node on bind");if(wt&&!n&&this.parent===null&&t.childNodes.length>0&&console.warn("[Domphy] mount() was called without a style element on already-rendered DOM. Reactive style updates after hydration will be dropped \u2014 pass the server-rendered <style> element as the second argument to mount()."),this.domElement=t,this._events)for(let o in this._events)this._bindEvent(o);if(this.children&&this.children.items.forEach((o,i)=>{let r=t.childNodes[i];r&&(o instanceof Ee?o.mount(r):o.domText=r)}),n){let o=n.sheet;o&&this._hydrateStyles(Jn(o.cssRules,new Map))}this._hooks.Mount&&this._hooks.Mount(this)}_hydrateStyles(t){var n;if((n=this.styles)==null||n.hydrate(t),this.children)for(let o of this.children.items)o instanceof Ee&&o._hydrateStyles(t)}render(t){let n=this._createDOMNode();t.appendChild(n),this._hooks.Mount&&this._hooks.Mount(this);let o=this.getRoot().styles.domStyle,i=t.getRootNode(),r=i instanceof ShadowRoot?i:document.head;return o||(o=Co(r)),this.styles.render(o),this.children.items.forEach(a=>{if(a instanceof Ee&&a._portal){let c=a._portal(this.getRoot());c&&a.render(c)}else a.render(n)}),n}remove(){if(this.parent)this.parent.children.remove(this);else{let t=()=>{var n;(n=this.domElement)==null||n.remove(),this._dispose()};if(this._hooks.BeforeRemove&&this.domElement){let n=!1,o=()=>{n||(n=!0,t())};this._beforeRemoveFired=!0,this._hooks.BeforeRemove(this,o),this._hooks.BeforeRemove.length<2&&!n?o():wt&&!n&&setTimeout(()=>{n||console.warn("[Domphy] _onBeforeRemove declared a `done` parameter but did not call it within 5s \u2014 the element will stay in the DOM. Call done() when cleanup finishes.")},5e3)}else t()}}},lo=class{constructor(e,t){this.type="TextNode",this.parent=t,this.text=e===""?"\u200B":String(e)}_createDOMNode(){let e;if(Ge(this.text)){let t=document.createElement("template");t.innerHTML=this.text.trim(),t.content.querySelectorAll("*").forEach(n=>{for(let o of Array.from(n.attributes))/^on/i.test(o.name)?n.removeAttribute(o.name):/^(?:href|src|action|formaction)$/i.test(o.name)&&/^\s*javascript:/i.test(o.value)&&n.setAttribute(o.name,"#")}),e=t.content.firstChild||document.createTextNode("")}else e=document.createTextNode(this.text);return this.domText=e,e}setText(e){var t;let n=e===""?"\u200B":String(e);if(n===this.text&&this.domText)return;let o=Ge(this.text);if(this.text=n,!this.domText)return;if(!o&&!Ge(n)&&this.domText.nodeType===3){this.domText.nodeValue=n;return}let i=this.domText,r=this._createDOMNode();(t=i.parentNode)==null||t.replaceChild(r,i)}_dispose(){this.domText=void 0,this.text=""}generateHTML(){return this.text==="\u200B"?"&#8203;":Ge(this.text)?Gn(this.text):vo(this.text)}render(e){let t=this._createDOMNode();e.appendChild(t)}},ko=class{constructor(e){this.items=[],this._nextKey=0,this.owner=e}_createNode(e){return typeof e=="object"&&e!==null?new B(e,this.owner,this._nextKey++):new lo(e==null?"":String(e),this.owner)}_moveDomElement(e,t){if(!this.owner||!this.owner.domElement)return;let n=this.owner.domElement,o=e instanceof B?e.domElement:e.domText;if(o){let i=n.childNodes[t]||null;o!==i&&n.insertBefore(o,i)}}_swapDomElement(e,t){if(!this.owner||!this.owner.domElement)return;let n=this.owner.domElement,o=e instanceof B?e.domElement:e.domText,i=t instanceof B?t.domElement:t.domText;if(!o||!i)return;let r=o.nextSibling,a=i.nextSibling;n.insertBefore(o,a),n.insertBefore(i,r)}update(e,t=!0,n=!1){var o,i,r,a;let c=this.items.slice(),u=new Map;for(let p of c)p instanceof B&&p.key!==null&&p.key!==void 0&&u.set(p.key,p);!n&&this.owner.domElement&&((i=(o=this.owner._hooks)==null?void 0:o.BeforeUpdate)==null||i.call(o,this.owner,e));let h=new Set(c),m=new Set;for(let p=0;p<e.length;p++){let g=e[p],v=typeof g=="object"&&g!==null,x=v?g._key:void 0,C=v?So(g):void 0;if(x!==void 0){let w=u.get(x);if(w instanceof B&&w.tagName===C){u.delete(x);let E=this.items.indexOf(w);if(E!==p&&E>=0){let O=!!w._portal;this.move(E,p,O?!1:t,!0)}w.parent=this.owner,w.patch(g),m.add(w);continue}}else if(v){let w=this.items[p];if(w instanceof B&&w.key==null&&w.tagName===C&&h.has(w)&&!m.has(w)){w.parent=this.owner,w.patch(g),m.add(w);continue}}else{let w=this.items[p];if(w instanceof lo&&h.has(w)&&!m.has(w)){w.setText(g==null?"":g),m.add(w);continue}}m.add(this.insert(g,p,t,!0))}let d=this.items.slice(e.length);for(let p of d)this.remove(p,t,!0);u.forEach(p=>this.remove(p,t,!0)),n||(a=(r=this.owner._hooks)==null?void 0:r.Update)==null||a.call(r,this.owner)}insert(e,t,n=!0,o=!1){var i,r;let a=this.items.length,c=typeof t!="number"||Number.isNaN(t)||t<0||t>a?a:t,u=this._createNode(e);if(this.items.splice(c,0,u),u instanceof B){u._hooks.Insert&&u._hooks.Insert(u);let h=this.owner.domElement;if(n&&h)if(u._portal){let m=u._portal(this.owner.getRoot());m&&u.render(m)}else{let m=u._createDOMNode(),d=(i=h.childNodes[c])!=null?i:null;h.insertBefore(m,d);let p=h.getRootNode(),g=p instanceof ShadowRoot?p:document.head,v=Co(g);u.styles.render(v),u._hooks.Mount&&u._hooks.Mount(u),u.children.items.forEach(x=>{if(x instanceof B&&x._portal){let C=x._portal(x.getRoot());C&&x.render(C)}else x.render(m)})}}else{let h=this.owner.domElement;if(n&&h){let m=u._createDOMNode(),d=(r=h.childNodes[c])!=null?r:null;h.insertBefore(m,d)}}return!o&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner),u}remove(e,t=!0,n=!1){let o=this.items.indexOf(e);if(!(o<0)){if(e instanceof B){if(e._beforeRemoveFired)return;let i=()=>{let r=e.domElement,a=this.items.indexOf(e);a>=0&&this.items.splice(a,1),t&&r&&r.remove(),e._dispose()};if(e._hooks.BeforeRemove&&e.domElement){let r=!1,a=()=>{r||(r=!0,i())};e._beforeRemoveFired=!0,e._hooks.BeforeRemove(e,a),e._hooks.BeforeRemove.length<2&&!r?a():wt&&!r&&setTimeout(()=>{r||console.warn("[Domphy] _onBeforeRemove declared a `done` parameter (e.g. an exit animation) but did not call it within 5s \u2014 the element will stay in the DOM. Call done() when cleanup finishes.")},5e3)}else i()}else{let i=e.domText;this.items.splice(o,1),t&&i&&i.remove(),e._dispose()}!n&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner)}}clear(e=!0,t=!1){if(this.items.length===0)return;let n=this.items.slice();for(let o of n)this.remove(o,e,!0);!t&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner)}_dispose(){this.items.forEach(e=>e._dispose()),this.items=[]}swap(e,t,n=!0,o=!1){if(e<0||t<0||e>=this.items.length||t>=this.items.length||e===t)return;let i=this.items[e],r=this.items[t];this.items[e]=r,this.items[t]=i,n&&this._swapDomElement(i,r),!o&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner)}move(e,t,n=!0,o=!1){if(e<0||e>=this.items.length||t<0||t>=this.items.length||e===t)return;let i=this.items[e];this.items.splice(e,1),this.items.splice(t,0,i),n&&this._moveDomElement(i,t),!o&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner)}generateHTML(){let e="";for(let t of this.items)e+=t.generateHTML();return e}},er=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e).catch(t=>{setTimeout(()=>{throw t},0)})},he=new Set,kt=!1;function To(e){he.add(e),!kt&&(kt=!0,er(_o))}function _o(){for(kt=!1;he.size>0;){let e=[...he];he.clear();for(let t of e)try{t()}catch(n){console.error("[Domphy] Uncaught error in effect:",n)}}}function tr(){let e=0;for(;go()||he.size>0;){if(e++>1e4){console.error("[Domphy] flushSync did not settle");break}yo(),_o()}}var Ie=[];function or(){return Ie.length?Ie[Ie.length-1]:null}function Pt(e){let t=or();t&&t._add(e)}var nr=class{constructor(){this._disposers=new Set,this._stopped=!1}_add(e){if(this._stopped){e();return}this._disposers.add(e)}run(e){Ie.push(this);try{return e()}finally{Ie.pop()}}stop(){if(!this._stopped){this._stopped=!0;for(let e of this._disposers)e();this._disposers.clear()}}};function rr(){let e=new nr;return Pt(()=>e.stop()),e}function ir(e){let t=!1,n=!1,o=()=>{t||r()},i=new ho(()=>{t||To(o)}),r=()=>{if(!(t||n)){n=!0,i.reset();try{fo(i,e)}finally{n=!1}}},a=()=>{t||(t=!0,i.reset(),he.delete(o))};return Pt(a),r(),a}function ar(e){let t="computed",n=new Me,o,i=!0,r=!1,a=()=>{i&&n.listenerCount(t)>0&&h()},c=new ho(()=>{i||(i=!0,To(a))}),u=()=>{c.reset(),o=fo(c,e),i=!1,r=!0},h=()=>{let d=o,p=r;u(),!(p&&o===d)&&n.notify(t,o)},m=d=>{if(d)n.addListener(t,d);else{let p=Ot();p&&n.addListener(t,p.handler)}return i&&u(),o};return Pt(()=>{c.reset(),he.delete(a),n._dispose()}),{_isState:!0,_notifier:n,get:m}}function lr(e){return po(e)}function sr(e){return Wn(e)}var cr=class{constructor(e){this._notifier=new Me,this.initialRecord=io({},e),this._record=io({},e)}get(e,t){if(t)this._notifier.addListener(e,t);else{let n=Ot();n&&this._notifier.addListener(e,n.handler)}return this._record[e]}set(e,t){this._record[e]=t,this._notifier.notify(e,t)}addListener(e,t){return this._notifier.addListener(e,t)}removeListener(e,t){this._notifier.removeListener(e,t)}reset(e){this.set(e,this.initialRecord[e])}_dispose(){this._notifier._dispose()}};var et={};Ye(et,{ElementTones:()=>Ve,getTheme:()=>Z,setTheme:()=>hr,themeApply:()=>pr,themeCSS:()=>$t,themeColor:()=>s,themeColorToken:()=>Mt,themeDensity:()=>y,themeName:()=>Qe,themeSize:()=>b,themeSpacing:()=>l,themeTokens:()=>$o,themeVars:()=>Ae});var ur={direction:"darken",colors:{primary:["#ffffff","#e3ecff","#c6daff","#aac8ff","#8fb6ff","#76a3ff","#5f91fc","#4a7ff4","#386ee7","#2a5ed7","#1e4ec2","#1440aa","#0c3290","#072674","#041a57","#020f38","#010419","#000000"],secondary:["#ffffff","#fce6ea","#faced6","#f7b5c2","#f29db0","#ec859e","#e36e8d","#d8597d","#ca456e","#b93460","#a42351","#8e1643","#770b36","#5f0529","#46031d","#2d0210","#130104","#000000"],info:["#ffffff","#dcf0f9","#b7e1f6","#90d2f1","#6ac3eb","#42b4e2","#16a4d5","#0094c4","#0084b2","#00739e","#00638a","#005476","#004461","#00354d","#002638","#001623","#00070d","#000000"],success:["#ffffff","#e3f3dc","#c6e8b8","#a9dd94","#8ed171","#75c450","#61b635","#51a51f","#429304","#358100","#2a7000","#215f00","#194d00","#123c00","#0b2b00","#051a00","#010900","#000000"],warning:["#ffffff","#ffeada","#ffd3b3","#ffbd8d","#ffa96b","#ff9853","#ec8640","#d77531","#c16523","#aa5718","#944a0f","#7e3d09","#673106","#512504","#3b1a03","#250e02","#0e0401","#000000"],attention:["#ffffff","#ffeada","#ffd3b3","#ffbd8d","#ffa96b","#ff9853","#ec8640","#d77531","#c16523","#aa5718","#944a0f","#7e3d09","#673106","#512504","#3b1a03","#250e02","#0e0401","#000000"],error:["#ffffff","#fce7e4","#fbcfca","#f8b7b0","#f59f96","#ef877e","#e86f67","#de5852","#d3403e","#c5282c","#b30a1b","#9e000b","#860001","#6c0000","#510000","#340000","#170000","#000000"],danger:["#ffffff","#fce7e4","#fbcfca","#f8b7b0","#f59f96","#ef877e","#e86f67","#de5852","#d3403e","#c5282c","#b30a1b","#9e000b","#860001","#6c0000","#510000","#340000","#170000","#000000"],highlight:["#ffffff","#f9f5cd","#f4eb95","#efe05a","#e6d427","#d3c100","#bfad00","#ab9b00","#988900","#857700","#736600","#615600","#4f4600","#3e3600","#2c2700","#1b1700","#090700","#000000"],neutral:["#ffffff","#ededed","#dbdbdb","#cacaca","#bababa","#ababab","#9b9b9b","#8d8d8d","#7e7e7e","#707070","#636363","#565656","#484848","#383838","#282828","#181818","#080808","#000000"]},baseTones:{highlight:5,warning:6,error:8,danger:8,secondary:8,primary:9,info:8,success:8,neutral:8},fontSizes:["0.75rem","0.875rem","1rem","1.25rem","1.5625rem","1.9375rem","2.4375rem","3.0625rem"],densities:[.75,1,1.5,2,2.5],darkBias:1,custom:{}},Ne=ur,zt=e=>JSON.parse(JSON.stringify(e)),Po=e=>e.replace(/[^a-zA-Z0-9_-]/g,"_"),_e={light:zt(Ne),dark:fr(Ne)},Ze=null,Dt=new Map;function It(e){let t=Object.keys(e.colors)[0];return t?e.colors[t].length:0}function mr(e){for(let t in e)if(!Object.keys(Ne).includes(t))throw new Error(`Invalid key: ${t}`);if(e.fontSizes&&!Array.isArray(e.fontSizes))throw new Error("fontSize must be array of string");if(e.densities&&(!Array.isArray(e.densities)||e.densities.some(t=>typeof t!="number")))throw new Error("densities must be array of number");if("custom"in e){let t=e.custom;if(typeof t!="object"||t===null)throw new Error("Invalid custom property: must be an object")}}function Do(e,t){var n;for(let o in t)t[o]&&typeof t[o]=="object"&&!Array.isArray(t[o])?((n=e[o])!=null||(e[o]={}),Do(e[o],t[o])):e[o]=t[o]}function dr(e,t){let n={},o=It(t);for(let r in t){let a=t[r];if(r==="colors")for(let c in t.colors)[...Array(o).keys()].forEach(u=>n[`--${c}-${u}`]=t.colors[c][u]);else if(r==="fontSizes")[...Array(8).keys()].forEach(c=>n[`--fontSize-${c}`]=t.fontSizes[c]);else if(r==="custom"&&a&&typeof a=="object")for(let c in a)n[`--custom-${Po(c)}`]=a[c]}let i="";for(let r in n)i+=` ${r}: ${n[r]};
3
3
  `;return`[data-theme="${e}"] {
4
- ${i}}`}function Q(e){if(!_e[e])throw Error(`Theme "${e}" not found`);return _e[e]}function ir(e,t){nr(t),_e[e]||(_e[e]=It(Ne)),Oo(_e[e],t),Je=null,Pt.clear()}function ar(e){let t=It(e);t.direction="lighten";for(let r in t.colors)t.colors[r].reverse(),t.baseTones[r]=t.colors[r].length-1-t.baseTones[r];return t}function Po(e){let t=Pt.get(e);if(t)return t;let r=Q(e),o=Lt(r),i={};for(let n in r){let a=r[n];if(n==="colors")for(let c in r.colors){let u={};[...Array(o).keys()].forEach(m=>u[m]=r.colors[c][m]),i[c]=u}else if(n==="fontSizes")i.fontSizes=r.fontSizes;else if(n==="densities")i.densities=r.densities;else if(n==="custom"&&(i.custom={},a&&typeof a=="object"))for(let c in a)i.custom[c]=a[c]}return Pt.set(e,i),i}function ze(){if(Je)return Je;let e=Q("light"),t=Lt(e),r={};for(let o in e){let i=e[o];if(o==="colors")for(let n in e.colors){let a={};[...Array(t).keys()].forEach(c=>a[c]=`var(--${n}-${c})`),r[n]=a}else if(o==="fontSizes")r.fontSizes=[...Array(8).keys()].map(n=>`var(--fontSize-${n})`);else if(o==="custom"&&(r.custom={},i&&typeof i=="object"))for(let n in i)r.custom[n]=`var(--custom-${To(n)})`}return Je=r,r}function Dt(){return Object.entries(_e).map(([e,t])=>rr(e,t)).join(`
5
- `)}function lr(e){var t;if(typeof document!="undefined")if(e){e.textContent=Dt();return}else e=(t=document.getElementById("domphy-themes"))!=null?t:Object.assign(document.createElement("style"),{id:"domphy-themes"}),e.textContent=Dt(),document.head.appendChild(e)}function s(e){return e/4+"em"}function Ze(e){let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataTheme"));)t=t.parent;let r="light";return t&&t.attributes&&t.attributes.has("dataTheme")&&(r=t.attributes.get("dataTheme"),typeof e=="function"&&t.attributes.addListener("dataTheme",e)),r}var $t=["inherit"];[...Array(5).keys()].forEach(e=>{$t.push(`decrease-${e}`),$t.push(`increase-${e}`)});function sr(e,t="inherit"){if(!$t.includes(t))throw Error(`density name "${t}" invalid`);let r;if(t=="inherit")r=e;else if(t!=null&&t.startsWith("increase-")){let o=parseInt(t.replace("increase-",""),10);r=e+o}else if(t!=null&&t.startsWith("decrease-")){let o=parseInt(t.replace("decrease-",""),10);r=e-o}else r=e;return Math.max(0,Math.min(4,r))}function cr(e){if(!e)return 2;let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataDensity"));)t=t.parent;let r=2;return t&&t.attributes&&t.attributes.has("dataDensity")&&(r=sr(r,t.attributes.get("dataDensity")),typeof e=="function"&&t.attributes.addListener("dataDensity",e)),r}function b(e){let t=cr(e);return Q(e?Ze(e):"light").densities[t]}var Rt=["inherit"];[...Array(8).keys()].forEach(e=>{Rt.push(`decrease-${e}`),Rt.push(`increase-${e}`)});function Do(e,t="inherit"){if(!Rt.includes(t))throw Error(`size name "${t}" invalid`);let r;if(t=="inherit")r=e;else if(t!=null&&t.startsWith("increase-")){let o=parseInt(t.replace("increase-",""),10);r=e+o}else if(t!=null&&t.startsWith("decrease-")){let o=parseInt(t.replace("decrease-",""),10);r=e-o}else r=e;return Math.max(0,Math.min(8,r))}function ur(e){if(!e)return 2;let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataSize"));)t=t.parent;let r=2;return t&&t.attributes&&t.attributes.has("dataSize")&&(r=Do(r,t.attributes.get("dataSize")),typeof e=="function"&&t.attributes.addListener("dataSize",e)),r}function g(e,t="inherit"){let r=Do(ur(e),t);return ze().fontSizes[r]}var se=Ne.colors.neutral.length,Me=["inherit","base"];[...Array(se).keys()].forEach(e=>{Me.push(`decrease-${e}`),Me.push(`increase-${e}`),Me.push(`shift-${e}`)});function _o(e,t){if(e<0||e>se-1)return e;let r=e+t;return r=Math.max(0,Math.min(se-1,r)),r}function mr(e,t){if(e<0||e>se-1)return e;let r=Math.floor((se-1)/2),o=e<=r?e+t:e-t;return o=Math.max(0,Math.min(se-1,o)),o}function Ve(e,t="inherit"){if(typeof t=="number")return t;if(t=="inherit")return e;if(!Me.includes(t))throw Error(`tone name "${t}" invalid`);if(t.startsWith("increase-")){let r=parseInt(t.replace("increase-",""),10);return _o(e,r)}else if(t.startsWith("decrease-")){let r=parseInt(t.replace("decrease-",""),10);return _o(e,-r)}else if(t.startsWith("shift-")){let r=parseInt(t.replace("shift-",""),10);return mr(e,r)}else return e}function $o(e){if(!e)return 0;let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataTone"));)t=t.parent;let r=0;return t&&t.attributes&&t.attributes.has("dataTone")&&(r=Ve(r,t.attributes.get("dataTone")),typeof e=="function"&&t.attributes.addListener("dataTone",e)),r}function Ro(e,t,r){return r<=0?e:t==="lighten"&&e===0?r:t==="darken"&&e===se-1?se-1-r:e}function l(e,t="inherit",r="inherit"){let o=r=="inherit"?"neutral":r;if(!e)return t=="base"?ze()[o][Q("light").baseTones[o]]:ze()[o][Ve(0,t)];let i=Ze(e),n;if(t=="base")n=Q(i).baseTones[o];else{let c=Q(i),u=Ro($o(e),c.direction,c.darkBias);n=Ve(u,t)}let a=ze()[o];if(!a)throw Error(`color "${o}" not found on theme "${i}"`);return a[n]}function zt(e,t="inherit",r="inherit"){let o=r=="inherit"?"neutral":r,i=e?Ze(e):"light",n=Po(i);if(!e)return t=="base"?n[o][Q("light").baseTones[o]]:n[o][Ve(0,t)];let a;if(t=="base")a=Q(i).baseTones[o];else{let c=Q(i),u=Ro($o(e),c.direction,c.darkBias);a=Ve(u,t)}return n[o][a]}var ht={};qe(ht,{abbreviation:()=>hr,alert:()=>dr,avatar:()=>fr,badge:()=>pr,blockquote:()=>gr,breadcrumb:()=>yr,breadcrumbEllipsis:()=>br,button:()=>vr,buttonSwitch:()=>Sr,card:()=>wr,code:()=>xr,combobox:()=>ui,command:()=>mi,commandItem:()=>di,commandSearch:()=>hi,datePicker:()=>pi,descriptionList:()=>bi,details:()=>vi,dialog:()=>Si,divider:()=>wi,drawer:()=>Ci,emphasis:()=>ki,figure:()=>Ei,formGroup:()=>_i,heading:()=>Oi,horizontalRule:()=>Pi,icon:()=>Di,image:()=>$i,inputCheckbox:()=>Ri,inputColor:()=>Ii,inputDateTime:()=>Li,inputFile:()=>zi,inputNumber:()=>Mi,inputOTP:()=>Ni,inputRadio:()=>Vi,inputRange:()=>Ai,inputSearch:()=>Bi,inputSwitch:()=>Hi,inputText:()=>ji,keyboard:()=>Fi,label:()=>Wi,link:()=>Ki,mark:()=>Ui,menu:()=>qi,menuItem:()=>Yi,motion:()=>Gi,orderedList:()=>Xi,pagination:()=>Zi,paragraph:()=>Qi,popover:()=>ea,popoverArrow:()=>qt,preformated:()=>ta,progress:()=>oa,select:()=>na,selectBox:()=>ra,selectItem:()=>ia,selectList:()=>aa,skeleton:()=>la,small:()=>sa,spinner:()=>ca,splitter:()=>ua,splitterHandle:()=>ha,splitterPanel:()=>ma,strong:()=>da,subscript:()=>fa,superscript:()=>pa,tab:()=>ga,tabPanel:()=>ba,table:()=>ya,tabs:()=>va,tag:()=>He,textarea:()=>Sa,toast:()=>wa,toggle:()=>xa,toggleGroup:()=>Ca,tooltip:()=>ka,transitionGroup:()=>Ea,unorderedList:()=>_a});function hr(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),r=f((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:n=>{n.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:n=>g(n),backgroundColor:n=>l(n),color:n=>l(n,"shift-10",t.get(n)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:n=>l(n,"shift-7",t.get(n)),textUnderlineOffset:s(.72),cursor:"help","&:hover":{color:n=>l(n,"shift-11",r.get(n)),textDecorationColor:n=>l(n,"shift-9",r.get(n))}}}}function dr(e={}){var r;let t=f((r=e.color)!=null?r:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:s(3),paddingBlock:o=>s(b(o)*2),paddingInline:o=>s(b(o)*4),boxShadow:o=>`inset ${s(1)} 0 0 0 ${l(o,"shift-8",t.get(o))}`,backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"shift-10",t.get(o)),fontSize:o=>g(o,"inherit")}}}function fr(e={}){var r;let t=f((r=e.color)!=null?r:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:s(9),height:s(9),fontSize:o=>g(o,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"shift-11",t.get(o)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}function pr(e={}){var i;let{label:t=999}=e,r=f(t),o=f((i=e.color)!=null?i:"danger","color");return{style:{position:"relative","&::after":{content:n=>`"${r.get(n)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:s(1),minWidth:s(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:n=>g(n,"decrease-1"),borderRadius:s(999),backgroundColor:n=>l(n,"shift-9",o.get(n)),color:n=>l(n,"shift-0",o.get(n))}}}}function gr(e={}){var r;let t=f((r=e.color)!=null?r:"inherit","color");return{_onInsert:o=>{o.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:o=>g(o,"inherit"),backgroundColor:o=>l(o,"inherit",t.get(o)),boxShadow:o=>`inset ${s(1)} 0 0 0 ${l(o,"shift-4",t.get(o))}`,border:"none",paddingBlock:o=>s(b(o)*2),paddingInline:o=>s(b(o)*4),margin:0}}}function yr(e={}){var o;let{separator:t="/"}=e,r=f((o=e.color)!=null?o:"neutral","color");return{_onInsert:i=>{i.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:i=>g(i,"inherit"),gap:s(1),color:i=>l(i,"shift-9",r.get(i)),backgroundColor:i=>l(i,"inherit",r.get(i)),"& > *":{display:"inline-flex",alignItems:"center",color:i=>l(i,"shift-8",r.get(i))},"& > *:not(:last-child)::after":{content:`"${t}"`,color:i=>l(i,"shift-4",r.get(i)),paddingInlineStart:s(1)},"& > [aria-current=page]":{color:i=>l(i,"shift-10",r.get(i)),pointerEvents:"none"}}}}function br(e={}){var r;let t=f((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:o=>g(o,"inherit"),paddingInline:s(1),border:"none",background:"none",cursor:"pointer",color:o=>l(o,"shift-8",t.get(o)),borderRadius:s(1),"&:hover":{color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"shift-2",t.get(o))},"&:focus-visible":{outline:o=>`${s(.5)} solid ${l(o,"shift-6",t.get(o))}`,outlineOffset:s(.5)}}}}function vr(e={}){var r;let t=f((r=e.color)!=null?r:"primary","color");return{_onInsert:o=>{o.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:o=>g(o,"inherit"),paddingBlock:o=>s(b(o)*1),paddingInline:o=>s(b(o)*3),borderRadius:o=>s(b(o)*1),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:o=>s(b(o)*1),userSelect:"none",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:o=>`1px solid ${l(o,"shift-4",t.get(o))}`,color:o=>l(o,"shift-9",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),"&:hover:not([disabled]):not([aria-busy=true])":{color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"shift-2",t.get(o))},"&:focus-visible":{boxShadow:o=>`inset 0 0 0 ${s(.5)} ${l(o,"shift-6",t.get(o))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:o=>l(o,"shift-2","neutral"),outline:o=>`1px solid ${l(o,"shift-4","neutral")}`,color:o=>l(o,"shift-8","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}function Sr(e={}){var n,a;let{checked:t=!1}=e,r=f(t),o=f((n=e.color)!=null?n:"neutral","color"),i=f((a=e.accentColor)!=null?a:"primary","accentColor");return{_onSchedule:c=>{c.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:c=>r.get(c),dataTone:"shift-2",onClick:()=>r.set(!r.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:c=>g(c),border:"none",outlineWidth:"1px",outline:c=>`1px solid ${l(c,"shift-3",o.get(c))}`,minWidth:s(12),minHeight:s(6),borderRadius:s(999),paddingLeft:s(7),paddingRight:s(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:c=>l(c,"inherit",o.get(c)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:s(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:s(5),height:s(5),borderRadius:s(999),color:c=>l(c,"shift-9"),backgroundColor:c=>l(c,"decrease-2",o.get(c))},"&[aria-checked=true]":{backgroundColor:c=>l(c,"increase-3",i.get(c)),outline:"none",color:c=>l(c,"decrease-2"),paddingLeft:s(2),paddingRight:s(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${s(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function wr(e={}){var r;let t=f((r=e.color)!=null?r:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:o=>s(b(o)*2),backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"shift-10",t.get(o)),outline:o=>`1px solid ${l(o,"shift-4",t.get(o))}`,outlineOffset:"-1px",overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:o=>s(b(o)*2),paddingInline:o=>s(b(o)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:o=>s(b(o)*4),color:o=>l(o,"shift-9",t.get(o)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:o=>s(b(o)*2),height:"auto"},"& > div":{gridArea:"content",padding:o=>s(b(o)*4),color:o=>l(o,"shift-10",t.get(o))},"& > footer":{gridArea:"footer",display:"flex",gap:s(2),paddingBlock:o=>s(b(o)*2),paddingInline:o=>s(b(o)*4),borderTop:o=>`1px solid ${l(o,"shift-3",t.get(o))}`}}}}function xr(e={}){var r;let t=f((r=e.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="code"&&console.warn('"code" primitive patch must use code tag')},style:{display:"inline-flex",alignItems:"center",fontSize:o=>g(o,"inherit"),color:o=>l(o,"shift-9",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),height:s(6),paddingInline:s(1.5),borderRadius:s(1)}}}var Cr=Object.defineProperty,kr=Object.defineProperties,Er=Object.getOwnPropertyDescriptors,tt=Object.getOwnPropertySymbols,Fo=Object.prototype.hasOwnProperty,Wo=Object.prototype.propertyIsEnumerable,Io=(e,t,r)=>t in e?Cr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Y=(e,t)=>{for(var r in t||(t={}))Fo.call(t,r)&&Io(e,r,t[r]);if(tt)for(var r of tt(t))Wo.call(t,r)&&Io(e,r,t[r]);return e},ye=(e,t)=>kr(e,Er(t)),Ko=(e,t)=>{var r={};for(var o in e)Fo.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&tt)for(var o of tt(e))t.indexOf(o)<0&&Wo.call(e,o)&&(r[o]=e[o]);return r},Se=(e,t,r)=>new Promise((o,i)=>{var n=u=>{try{c(r.next(u))}catch(m){i(m)}},a=u=>{try{c(r.throw(u))}catch(m){i(m)}},c=u=>u.done?o(u.value):Promise.resolve(u.value).then(n,a);c((r=r.apply(e,t)).next())}),_r=["top","right","bottom","left"],Lo=["start","end"],vl=_r.reduce((e,t)=>e.concat(t,`${t}-${Lo[0]}`,`${t}-${Lo[1]}`),[]),ot=Math.min,ge=Math.max,nt=Math.round,et=Math.floor,ee=e=>({x:e,y:e}),Tr={left:"right",right:"left",bottom:"top",top:"bottom"};function zo(e,t,r){return ge(e,ot(t,r))}function at(e,t){return typeof e=="function"?e(t):e}function be(e){return e.split("-")[0]}function lt(e){return e.split("-")[1]}function Uo(e){return e==="x"?"y":"x"}function qo(e){return e==="y"?"height":"width"}function ce(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Yo(e){return Uo(ce(e))}function Or(e,t,r=!1){let o=lt(e),i=Yo(e),n=qo(i),a=i==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(a=rt(a)),[a,rt(a)]}function Pr(e){let t=rt(e);return[Vt(e),t,Vt(t)]}function Vt(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Mo=["left","right"],No=["right","left"],Dr=["top","bottom"],$r=["bottom","top"];function Rr(e,t,r){switch(e){case"top":case"bottom":return r?t?No:Mo:t?Mo:No;case"left":case"right":return t?Dr:$r;default:return[]}}function Ir(e,t,r,o){let i=lt(e),n=Rr(be(e),r==="start",o);return i&&(n=n.map(a=>`${a}-${i}`),t&&(n=n.concat(n.map(Vt)))),n}function rt(e){let t=be(e);return Tr[t]+e.slice(t.length)}function Lr(e){return Y({top:0,right:0,bottom:0,left:0},e)}function zr(e){return typeof e!="number"?Lr(e):{top:e,right:e,bottom:e,left:e}}function it(e){let{x:t,y:r,width:o,height:i}=e;return{width:o,height:i,top:r,left:t,right:t+o,bottom:r+i,x:t,y:r}}function Vo({reference:e,floating:t},r,o){let i=ce(r),n=Yo(r),a=qo(n),c=be(r),u=i==="y",m=e.x+e.width/2-t.width/2,h=e.y+e.height/2-t.height/2,d=e[a]/2-t[a]/2,p;switch(c){case"top":p={x:m,y:e.y-t.height};break;case"bottom":p={x:m,y:e.y+e.height};break;case"right":p={x:e.x+e.width,y:h};break;case"left":p={x:e.x-t.width,y:h};break;default:p={x:e.x,y:e.y}}switch(lt(r)){case"start":p[n]-=d*(o&&u?-1:1);break;case"end":p[n]+=d*(o&&u?-1:1);break;default:}return p}function Mr(e){return Se(this,arguments,function*(t,r={}){var o,i,n,a,c,u;let{x:m,y:h,platform:d,rects:p,elements:y,strategy:v}=t,{boundary:x="clippingAncestors",rootBoundary:w="viewport",elementContext:C="floating",altBoundary:E=!1,padding:O=0}=at(r,t),T=zr(O),D=y[E?C==="floating"?"reference":"floating":C],M=it(yield d.getClippingRect({element:(i=yield(o=d.isElement)==null?void 0:o.call(d,D))==null||i?D:D.contextElement||(yield(n=d.getDocumentElement)==null?void 0:n.call(d,y.floating)),boundary:x,rootBoundary:w,strategy:v})),I=C==="floating"?{x:m,y:h,width:p.floating.width,height:p.floating.height}:p.reference,ie=yield(a=d.getOffsetParent)==null?void 0:a.call(d,y.floating),V=(yield(c=d.isElement)==null?void 0:c.call(d,ie))?(yield(u=d.getScale)==null?void 0:u.call(d,ie))||{x:1,y:1}:{x:1,y:1},U=it(d.convertOffsetParentRelativeRectToViewportRelativeRect?yield d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:y,rect:I,offsetParent:ie,strategy:v}):I);return{top:(M.top-U.top+T.top)/V.y,bottom:(U.bottom-M.bottom+T.bottom)/V.y,left:(M.left-U.left+T.left)/V.x,right:(U.right-M.right+T.right)/V.x}})}var Nr=50,Vr=(e,t,r)=>Se(null,null,function*(){var o;let{placement:i="bottom",strategy:n="absolute",middleware:a=[],platform:c}=r,u=c.detectOverflow?c:ye(Y({},c),{detectOverflow:Mr}),m=yield(o=c.isRTL)==null?void 0:o.call(c,t),h=yield c.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:p}=Vo(h,i,m),y=i,v=0,x={};for(let w=0;w<a.length;w++){let C=a[w];if(!C)continue;let{name:E,fn:O}=C,{x:T,y:D,data:M,reset:I}=yield O({x:d,y:p,initialPlacement:i,placement:y,strategy:n,middlewareData:x,rects:h,platform:u,elements:{reference:e,floating:t}});d=T!=null?T:d,p=D!=null?D:p,x[E]=Y(Y({},x[E]),M),I&&v<Nr&&(v++,typeof I=="object"&&(I.placement&&(y=I.placement),I.rects&&(h=I.rects===!0?yield c.getElementRects({reference:e,floating:t,strategy:n}):I.rects),{x:d,y:p}=Vo(h,y,m)),w=-1)}return{x:d,y:p,placement:y,strategy:n,middlewareData:x}});var Ar=(e={})=>({name:"flip",options:e,fn(t){return Se(this,null,function*(){var r,o,i,n,a,c;let{placement:u,middlewareData:m,rects:h,initialPlacement:d,platform:p,elements:y}=t,v=at(e,t),{mainAxis:x=!0,crossAxis:w=!0,fallbackPlacements:C,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:O="none",flipAlignment:T=!0}=v,D=Ko(v,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=m.arrow)!=null&&r.alignmentOffset)return{};let M=be(u),I=ce(d),ie=be(d)===d,V=yield(o=p.isRTL)==null?void 0:o.call(p,y.floating),U=C||(ie||!T?[rt(d)]:Pr(d)),Fe=O!=="none";!C&&Fe&&U.push(...Ir(d,T,O,V));let We=[d,...U],j=yield p.detectOverflow(t,D),me=[],ae=((i=m.flip)==null?void 0:i.overflows)||[];if(x&&me.push(j[M]),w){let ne=Or(u,h,V);me.push(j[ne[0]],j[ne[1]])}if(ae=[...ae,{placement:u,overflows:me}],!me.every(ne=>ne<=0)){let ne=(((n=m.flip)==null?void 0:n.index)||0)+1,$e=We[ne];if($e&&(!(w==="alignment"&&I!==ce($e))||ae.every(F=>ce(F.placement)===I?F.overflows[0]>0:!0)))return{data:{index:ne,overflows:ae},reset:{placement:$e}};let J=(a=ae.filter(F=>F.overflows[0]<=0).sort((F,q)=>F.overflows[1]-q.overflows[1])[0])==null?void 0:a.placement;if(!J)switch(E){case"bestFit":{let F=(c=ae.filter(q=>{if(Fe){let W=ce(q.placement);return W===I||W==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(W=>W>0).reduce((W,dt)=>W+dt,0)]).sort((q,W)=>q[1]-W[1])[0])==null?void 0:c[0];F&&(J=F);break}case"initialPlacement":J=d;break;default:}if(u!==J)return{reset:{placement:J}}}return{}})}});var Br=new Set(["left","top"]);function Hr(e,t){return Se(this,null,function*(){var r;let{placement:o,platform:i,elements:n}=e,a=yield(r=i.isRTL)==null?void 0:r.call(i,n.floating),c=be(o),u=lt(o),m=ce(o)==="y",h=Br.has(c)?-1:1,d=a&&m?-1:1,p=at(t,e),{mainAxis:y,crossAxis:v,alignmentAxis:x}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof x=="number"&&(v=u==="end"?x*-1:x),m?{x:v*d,y:y*h}:{x:y*h,y:v*d}})}var jr=(e=0)=>({name:"offset",options:e,fn(t){return Se(this,null,function*(){var r,o;let{x:i,y:n,placement:a,middlewareData:c}=t,u=yield Hr(t,e);return a===((r=c.offset)==null?void 0:r.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+u.x,y:n+u.y,data:ye(Y({},u),{placement:a})}})}}),Fr=(e={})=>({name:"shift",options:e,fn(t){return Se(this,null,function*(){let{x:r,y:o,placement:i,platform:n}=t,a=at(e,t),{mainAxis:c=!0,crossAxis:u=!1,limiter:m={fn:({x:E,y:O})=>({x:E,y:O})}}=a,h=Ko(a,["mainAxis","crossAxis","limiter"]),d={x:r,y:o},p=yield n.detectOverflow(t,h),y=ce(be(i)),v=Uo(y),x=d[v],w=d[y];if(c){let E=v==="y"?"top":"left",O=v==="y"?"bottom":"right",T=x+p[E],D=x-p[O];x=zo(T,x,D)}if(u){let E=y==="y"?"top":"left",O=y==="y"?"bottom":"right",T=w+p[E],D=w-p[O];w=zo(T,w,D)}let C=m.fn(ye(Y({},t),{[v]:x,[y]:w}));return ye(Y({},C),{data:{x:C.x-r,y:C.y-o,enabled:{[v]:c,[y]:u}}})})}});function st(){return typeof window!="undefined"}function Pe(e){return Go(e)?(e.nodeName||"").toLowerCase():"#document"}function H(e){var t;return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)||window}function te(e){var t;return(t=(Go(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Go(e){return st()?e instanceof Node||e instanceof H(e).Node:!1}function G(e){return st()?e instanceof Element||e instanceof H(e).Element:!1}function re(e){return st()?e instanceof HTMLElement||e instanceof H(e).HTMLElement:!1}function Ao(e){return!st()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof H(e).ShadowRoot}function Be(e){let{overflow:t,overflowX:r,overflowY:o,display:i}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&i!=="inline"&&i!=="contents"}function Wr(e){return/^(table|td|th)$/.test(Pe(e))}function ct(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}var Kr=/transform|translate|scale|rotate|perspective|filter/,Ur=/paint|layout|strict|content/,pe=e=>!!e&&e!=="none",Mt;function Bt(e){let t=G(e)?X(e):e;return pe(t.transform)||pe(t.translate)||pe(t.scale)||pe(t.rotate)||pe(t.perspective)||!Ht()&&(pe(t.backdropFilter)||pe(t.filter))||Kr.test(t.willChange||"")||Ur.test(t.contain||"")}function qr(e){let t=ue(e);for(;re(t)&&!Oe(t);){if(Bt(t))return t;if(ct(t))return null;t=ue(t)}return null}function Ht(){return Mt==null&&(Mt=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Mt}function Oe(e){return/^(html|body|#document)$/.test(Pe(e))}function X(e){return H(e).getComputedStyle(e)}function ut(e){return G(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ue(e){if(Pe(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ao(e)&&e.host||te(e);return Ao(t)?t.host:t}function Xo(e){let t=ue(e);return Oe(t)?e.ownerDocument?e.ownerDocument.body:e.body:re(t)&&Be(t)?t:Xo(t)}function Ae(e,t=[],r=!0){var o;let i=Xo(e),n=i===((o=e.ownerDocument)==null?void 0:o.body),a=H(i);if(n){let c=At(a);return t.concat(a,a.visualViewport||[],Be(i)?i:[],c&&r?Ae(c):[])}else return t.concat(i,Ae(i,[],r))}function At(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Jo(e){let t=X(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,i=re(e),n=i?e.offsetWidth:r,a=i?e.offsetHeight:o,c=nt(r)!==n||nt(o)!==a;return c&&(r=n,o=a),{width:r,height:o,$:c}}function jt(e){return G(e)?e:e.contextElement}function Te(e){let t=jt(e);if(!re(t))return ee(1);let r=t.getBoundingClientRect(),{width:o,height:i,$:n}=Jo(t),a=(n?nt(r.width):r.width)/o,c=(n?nt(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}var Yr=ee(0);function Zo(e){let t=H(e);return!Ht()||!t.visualViewport?Yr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gr(e,t=!1,r){return!r||t&&r!==H(e)?!1:t}function ve(e,t=!1,r=!1,o){let i=e.getBoundingClientRect(),n=jt(e),a=ee(1);t&&(o?G(o)&&(a=Te(o)):a=Te(e));let c=Gr(n,r,o)?Zo(n):ee(0),u=(i.left+c.x)/a.x,m=(i.top+c.y)/a.y,h=i.width/a.x,d=i.height/a.y;if(n){let p=H(n),y=o&&G(o)?H(o):o,v=p,x=At(v);for(;x&&o&&y!==v;){let w=Te(x),C=x.getBoundingClientRect(),E=X(x),O=C.left+(x.clientLeft+parseFloat(E.paddingLeft))*w.x,T=C.top+(x.clientTop+parseFloat(E.paddingTop))*w.y;u*=w.x,m*=w.y,h*=w.x,d*=w.y,u+=O,m+=T,v=H(x),x=At(v)}}return it({width:h,height:d,x:u,y:m})}function mt(e,t){let r=ut(e).scrollLeft;return t?t.left+r:ve(te(e)).left+r}function Qo(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-mt(e,r),i=r.top+t.scrollTop;return{x:o,y:i}}function Xr({elements:e,rect:t,offsetParent:r,strategy:o}){let i=o==="fixed",n=te(r),a=e?ct(e.floating):!1;if(r===n||a&&i)return t;let c={scrollLeft:0,scrollTop:0},u=ee(1),m=ee(0),h=re(r);if((h||!h&&!i)&&((Pe(r)!=="body"||Be(n))&&(c=ut(r)),h)){let p=ve(r);u=Te(r),m.x=p.x+r.clientLeft,m.y=p.y+r.clientTop}let d=n&&!h&&!i?Qo(n,c):ee(0);return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-c.scrollLeft*u.x+m.x+d.x,y:t.y*u.y-c.scrollTop*u.y+m.y+d.y}}function Jr(e){return Array.from(e.getClientRects())}function Zr(e){let t=te(e),r=ut(e),o=e.ownerDocument.body,i=ge(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),n=ge(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),a=-r.scrollLeft+mt(e),c=-r.scrollTop;return X(o).direction==="rtl"&&(a+=ge(t.clientWidth,o.clientWidth)-i),{width:i,height:n,x:a,y:c}}var Bo=25;function Qr(e,t){let r=H(e),o=te(e),i=r.visualViewport,n=o.clientWidth,a=o.clientHeight,c=0,u=0;if(i){n=i.width,a=i.height;let h=Ht();(!h||h&&t==="fixed")&&(c=i.offsetLeft,u=i.offsetTop)}let m=mt(o);if(m<=0){let h=o.ownerDocument,d=h.body,p=getComputedStyle(d),y=h.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(o.clientWidth-d.clientWidth-y);v<=Bo&&(n-=v)}else m<=Bo&&(n+=m);return{width:n,height:a,x:c,y:u}}function ei(e,t){let r=ve(e,!0,t==="fixed"),o=r.top+e.clientTop,i=r.left+e.clientLeft,n=re(e)?Te(e):ee(1),a=e.clientWidth*n.x,c=e.clientHeight*n.y,u=i*n.x,m=o*n.y;return{width:a,height:c,x:u,y:m}}function Ho(e,t,r){let o;if(t==="viewport")o=Qr(e,r);else if(t==="document")o=Zr(te(e));else if(G(t))o=ei(t,r);else{let i=Zo(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return it(o)}function en(e,t){let r=ue(e);return r===t||!G(r)||Oe(r)?!1:X(r).position==="fixed"||en(r,t)}function ti(e,t){let r=t.get(e);if(r)return r;let o=Ae(e,[],!1).filter(c=>G(c)&&Pe(c)!=="body"),i=null,n=X(e).position==="fixed",a=n?ue(e):e;for(;G(a)&&!Oe(a);){let c=X(a),u=Bt(a);!u&&c.position==="fixed"&&(i=null),(n?!u&&!i:!u&&c.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||Be(a)&&!u&&en(e,a))?o=o.filter(m=>m!==a):i=c,a=ue(a)}return t.set(e,o),o}function oi({element:e,boundary:t,rootBoundary:r,strategy:o}){let i=[...t==="clippingAncestors"?ct(e)?[]:ti(e,this._c):[].concat(t),r],n=Ho(e,i[0],o),a=n.top,c=n.right,u=n.bottom,m=n.left;for(let h=1;h<i.length;h++){let d=Ho(e,i[h],o);a=ge(d.top,a),c=ot(d.right,c),u=ot(d.bottom,u),m=ge(d.left,m)}return{width:c-m,height:u-a,x:m,y:a}}function ni(e){let{width:t,height:r}=Jo(e);return{width:t,height:r}}function ri(e,t,r){let o=re(t),i=te(t),n=r==="fixed",a=ve(e,!0,n,t),c={scrollLeft:0,scrollTop:0},u=ee(0);function m(){u.x=mt(i)}if(o||!o&&!n)if((Pe(t)!=="body"||Be(i))&&(c=ut(t)),o){let y=ve(t,!0,n,t);u.x=y.x+t.clientLeft,u.y=y.y+t.clientTop}else i&&m();n&&!o&&i&&m();let h=i&&!o&&!n?Qo(i,c):ee(0),d=a.left+c.scrollLeft-u.x-h.x,p=a.top+c.scrollTop-u.y-h.y;return{x:d,y:p,width:a.width,height:a.height}}function Nt(e){return X(e).position==="static"}function jo(e,t){if(!re(e)||X(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return te(e)===r&&(r=r.ownerDocument.body),r}function tn(e,t){let r=H(e);if(ct(e))return r;if(!re(e)){let i=ue(e);for(;i&&!Oe(i);){if(G(i)&&!Nt(i))return i;i=ue(i)}return r}let o=jo(e,t);for(;o&&Wr(o)&&Nt(o);)o=jo(o,t);return o&&Oe(o)&&Nt(o)&&!Bt(o)?r:o||qr(e)||r}var ii=function(e){return Se(this,null,function*(){let t=this.getOffsetParent||tn,r=this.getDimensions,o=yield r(e.floating);return{reference:ri(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}})};function ai(e){return X(e).direction==="rtl"}var li={convertOffsetParentRelativeRectToViewportRelativeRect:Xr,getDocumentElement:te,getClippingRect:oi,getOffsetParent:tn,getElementRects:ii,getClientRects:Jr,getDimensions:ni,getScale:Te,isElement:G,isRTL:ai};function on(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function si(e,t){let r=null,o,i=te(e);function n(){clearTimeout(o),r==null||r.disconnect(),r=null}function a(c=!1,u=1){n();let m=e.getBoundingClientRect(),{left:h,top:d,width:p,height:y}=m;if(c||t(),!p||!y)return;let v=et(d),x=et(i.clientWidth-(h+p)),w=et(i.clientHeight-(d+y)),C=et(h),E={rootMargin:`${-v}px ${-x}px ${-w}px ${-C}px`,threshold:ge(0,ot(1,u))||1},O=!0;function T(D){let M=D[0].intersectionRatio;if(M!==u){if(!O)return a();M?a(!1,M):o=setTimeout(()=>{a(!1,1e-7)},1e3)}M===1&&!on(m,e.getBoundingClientRect())&&a(),O=!1}try{r=new IntersectionObserver(T,ye(Y({},E),{root:i.ownerDocument}))}catch(D){r=new IntersectionObserver(T,E)}r.observe(e)}return a(!0),n}function nn(e,t,r,o={}){let{ancestorScroll:i=!0,ancestorResize:n=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,m=jt(e),h=i||n?[...m?Ae(m):[],...t?Ae(t):[]]:[];h.forEach(C=>{i&&C.addEventListener("scroll",r,{passive:!0}),n&&C.addEventListener("resize",r)});let d=m&&c?si(m,r):null,p=-1,y=null;a&&(y=new ResizeObserver(([C])=>{C&&C.target===m&&y&&t&&(y.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{y==null||y.observe(t)})),r()}),m&&!u&&y.observe(m),t&&y.observe(t));let v,x=u?ve(e):null;u&&w();function w(){let C=ve(e);x&&!on(x,C)&&r(),x=C,v=requestAnimationFrame(w)}return r(),()=>{h.forEach(C=>{i&&C.removeEventListener("scroll",r),n&&C.removeEventListener("resize",r)}),d==null||d(),y==null||y.disconnect(),y=null,u&&cancelAnimationFrame(v)}}var rn=jr;var an=Fr,ln=Ar;var sn=(e,t,r)=>{let o=new Map,i=Y({platform:li},r),n=ye(Y({},i.platform),{_c:o});return Vr(e,t,ye(Y({},i),{platform:n}))};function oe(e){let{open:t=!1,placement:r}=e,o=null,i=null,n=null,a=null,c=null,u=null,m=!1,h=f(t),d=()=>{m||!u||(m=!0,c=u.children.insert(e.content))},p=()=>{d(),n&&a&&(i&&i(),i=nn(n,a,()=>{sn(n,a,{placement:r.get(),middleware:[rn(12),ln(),an()],strategy:"fixed"}).then(({x:E,y:O,placement:T})=>{Object.assign(a.style,{left:`${E}px`,top:`${O}px`}),r.set(T)})}),h.set(!0))},y=()=>{i&&i(),i=null,h.set(!1)},v=()=>{o&&clearTimeout(o),o=setTimeout(p,100)},x=()=>{o&&clearTimeout(o),o=setTimeout(y,100)},w={style:{position:"fixed",pointerEvents:"auto",visibility:E=>h.get(E)?"visible":"hidden"},_onMount:E=>a=E.domElement,_portal:E=>{let O=E.domElement.querySelector("#domphy-floating");if(!O){let T={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};O=E.children.insert(T).domElement}return O}};return R(e.content,w),{show:v,hide:x,anchorPartial:{onKeyDown:E=>E.key==="Escape"&&x(),_onMount:E=>{u=E.getRoot(),n=E.domElement;let O=T=>{if(!h.get()||!n||!a)return;let D=T.target;!n.contains(D)&&!a.contains(D)&&x()};E.getRoot().domElement.addEventListener("click",O),E.addHook("BeforeRemove",()=>{o&&clearTimeout(o),i&&(i(),i=null),c&&c.remove(),E.getRoot().domElement.removeEventListener("click",O)})}}}}var ci='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6.707 5.293l5.293 5.292l5.293 -5.292a1 1 0 0 1 1.414 1.414l-5.292 5.293l5.292 5.293a1 1 0 0 1 -1.414 1.414l-5.293 -5.292l-5.293 5.292a1 1 0 1 1 -1.414 -1.414l5.292 -5.293l-5.292 -5.293a1 1 0 0 1 1.414 -1.414" /></svg>';function He(e={}){var o;let{removable:t=!1}=e,r=f((o=e.color)!=null?o:"neutral","color");return{dataTone:"shift-2",_onInit:i=>{let n={span:ci,onClick:a=>{a.stopPropagation(),i.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:s(1),width:s(4),height:s(4),flexShrink:0,"&:hover":{backgroundColor:a=>l(a,"shift-4",r.get(a))}}};t&&i.children.insert(n)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:s(6),paddingBlock:"0px",borderRadius:s(1),paddingInlineStart:s(2),paddingInlineEnd:t?s(1):s(2),gap:s(2),fontSize:i=>g(i,"inherit"),backgroundColor:i=>l(i,"inherit",r.get(i)),color:i=>l(i,"shift-9",r.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${l(i,"shift-4",r.get(i))}`}}}function ui(e){let{options:t=[],placement:r="bottom",color:o="neutral",open:i=!1,multiple:n=!1}=e,a=f(e.value),c=f(i),{show:u,hide:m,anchorPartial:h}=oe({open:c,placement:f(r),content:e.content}),d={onClick:()=>!n&&m()};R(e.content,d);let p={border:"none",outline:"none",padding:0,margin:0,flex:1,height:s(6),marginInlineStart:s(2),fontSize:w=>g(w,"inherit"),color:w=>l(w,"shift-9",o),backgroundColor:w=>l(w,"inherit",o)},y;e.input?(R(e.input,{onFocus:()=>u(),style:p,_key:"combobox-input"}),y=e.input):y={input:null,onFocus:()=>u(),value:w=>(a.get(w),""),style:p,_key:"combobox-input"};let v={div:w=>{let C=a.get(w),E=Array.isArray(C)?C:[C],T=t.filter(D=>E.includes(D.value)).map(D=>({span:D.label,$:[He({color:o,removable:!0})],_key:D.value,_onRemove:M=>{let I=a.get(),V=(Array.isArray(I)?I:[I]).filter(U=>U!==D.value);n?a.set(V):a.set(V[0])}}));return T.push(y),T},style:{display:"flex",flexWrap:"wrap",gap:s(1)}},x={_onInsert:w=>{w.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:w=>w.children.insert(v),style:{minWidth:s(32),outlineOffset:"-1px",outline:w=>`1px solid ${l(w,"shift-4","neutral")}`,paddingBlock:w=>s(b(w)*1),paddingInline:w=>s(b(w)*1),borderRadius:w=>s(b(w)*1),fontSize:w=>g(w,"inherit"),color:w=>l(w,"shift-9",o),backgroundColor:w=>l(w,"inherit",o)}};return R(h,x),h}function mi(){return{_onSchedule:(e,t)=>{R(t,{_context:{command:{query:f("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function hi(e={}){let{color:t="neutral",accentColor:r="primary"}=e;return{_onInsert:o=>{o.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:o=>{let i=o.getContext("command");if(!i){console.warn('"commandSearch" patch must be used inside a "command"');return}let n=o.domElement,a=()=>i.query.set(n.value);n.addEventListener("input",a),o.addHook("Remove",()=>n.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:o=>g(o,"inherit"),paddingInline:o=>s(b(o)*3),paddingBlock:o=>s(b(o)*2),border:"none",borderBottom:o=>`1px solid ${l(o,"shift-3",t)}`,outline:"none",color:o=>l(o,"shift-10",t),backgroundColor:o=>l(o,"inherit",t),"&::placeholder":{color:o=>l(o,"shift-7")},"&:focus-visible":{borderBottomColor:o=>l(o,"shift-6",r)}}}}function di(e={}){let{color:t="neutral",accentColor:r="primary"}=e;return{role:"option",_onMount:o=>{var u,m;let i=o.getContext("command");if(!i){console.warn('"commandItem" patch must be used inside a "command"');return}let n=o.domElement,a=(m=(u=n.textContent)==null?void 0:u.toLowerCase())!=null?m:"",c=i.query.addListener(h=>{n.hidden=h.length>0&&!a.includes(h.toLowerCase())});o.addHook("Remove",c)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:o=>g(o,"inherit"),height:o=>s(6+b(o)*2),paddingInline:o=>s(b(o)*3),border:"none",outline:"none",color:o=>l(o,"shift-9",t),backgroundColor:o=>l(o,"inherit",t),"&:hover:not([disabled])":{backgroundColor:o=>l(o,"shift-2",t)},"&:focus-visible":{outline:o=>`${s(.5)} solid ${l(o,"shift-6",r)}`,outlineOffset:`-${s(.5)}`}}}}var N=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),we=(e,t)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),Ft=(e,t)=>new Date(e.getFullYear(),e.getMonth()+t,e.getDate()),je=(e,t)=>!!e&&!!t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),Wt=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`,Kt=(e,t)=>we(e,-((e.getDay()-t+7)%7));function fi(e){var t,r;try{let o=new Intl.Locale(e),i=(r=(t=o.getWeekInfo)==null?void 0:t.call(o))!=null?r:o.weekInfo;if(i!=null&&i.firstDay)return i.firstDay%7}catch(o){}return 0}function pi(e={}){var Yt,Gt,Xt,Jt;let{mode:t="single",time:r=!1,min:o,max:i,disabledDate:n,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:c,onChange:u}=e,m=(Yt=e.weekStartsOn)!=null?Yt:fi(a),h=f((Gt=e.accentColor)!=null?Gt:"primary","accentColor"),d=f((Xt=e.placement)!=null?Xt:"bottom-start"),p=f((Jt=e.value)!=null?Jt:t==="range"?[null,null]:null);u&&p.addListener(S=>u(S));let y=(()=>{let S=p.get(),k=t==="range"?S==null?void 0:S[0]:S;return k instanceof Date?k:new Date})(),v=f(y.getFullYear(),"viewYear"),x=f(y.getMonth(),"viewMonth"),w=f(N(y),"focused"),C=f(null,"hovered"),E=f(y.getHours(),"hour"),O=f(y.getMinutes(),"minute"),T=null,D=new Intl.DateTimeFormat(a,Ue({dateStyle:"medium"},r?{timeStyle:"short"}:{})),M=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),I=new Intl.DateTimeFormat(a,{weekday:"short"}),ie=new Intl.DateTimeFormat(a,{dateStyle:"full"}),V=S=>S?D.format(S):"",U=S=>{if(c)return c(S);if(t==="range"){let[k,_]=S!=null?S:[null,null];return k?`${V(k)} \u2013 ${V(_)}`:""}return V(S)},Fe=Array.from({length:7},(S,k)=>I.format(new Date(2023,0,1+(k+m)%7))),We=S=>!!o&&N(S)<N(o)||!!i&&N(S)>N(i)||!!n&&n(S),j=S=>{if(!r)return N(S);let k=N(S);return k.setHours(E.get(),O.get(),0,0),k},me=S=>{var P;if(We(S))return;if(t==="single"){p.set(j(S)),r||pt();return}let[k,_]=(P=p.get())!=null?P:[null,null];!k||k&&_?p.set([j(S),null]):N(S)<N(k)?(p.set([j(S),j(k)]),r||pt()):(p.set([k,j(S)]),r||pt())},ae=()=>{var S;if(r)if(t==="single"){let k=p.get();k&&p.set(j(k))}else{let[k,_]=(S=p.get())!=null?S:[null,null];p.set([k&&j(k),_&&j(_)])}},ne=(S,k)=>{var xe;if(t!=="range")return!1;let[_,P]=(xe=p.get(k))!=null?xe:[null,null],L=P!=null?P:C.get(k);if(!_||!L)return!1;let $=N(_)<=N(L)?_:L,K=N(_)<=N(L)?L:_,A=N(S);return A>=N($)&&A<=N(K)},$e=(S,k)=>{let _=p.get(k);if(t==="range"){let[P,L]=_!=null?_:[null,null];return je(S,P)||je(S,L)}return je(S,_)},J=S=>{v.set(S.getFullYear()),x.set(S.getMonth())},F=S=>{let k=Ft(new Date(v.get(),x.get(),1),S);J(k)},q=S=>v.set(v.get()+S),W=()=>{setTimeout(()=>{var S;(S=T==null?void 0:T.querySelector(`[data-date="${Wt(w.get())}"]`))==null||S.focus()},0)},dt=vn(),{show:pn,hide:gn,anchorPartial:ft}=oe({open:!1,placement:d,content:dt});function pt(){gn()}ft.onClick=()=>{};let yn={type:"text",readonly:!0,value:S=>U(p.get(S)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:()=>{gt()},onFocus:()=>{gt()},onKeyDown:S=>{let k=S.key;(k==="ArrowDown"||k==="Enter")&&(S.preventDefault(),gt())}};function gt(){var k;let S=(k=bn())!=null?k:new Date;w.set(N(S)),J(S),pn(),W()}function bn(){var k;let S=p.get();return t==="range"?(k=S==null?void 0:S[0])!=null?k:null:S!=null?S:null}return R(ft,yn),ft;function vn(){let S=($,K,A)=>({button:$,type:"button",ariaLabel:K,onClick:A,style:gi()}),k={div:[S("\xAB","Previous year",()=>q(-1)),S("\u2039","Previous month",()=>F(-1)),{div:$=>M.format(new Date(v.get($),x.get($),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"600",fontSize:$=>g($)}},S("\u203A","Next month",()=>F(1)),S("\xBB","Next year",()=>q(1))],style:{display:"flex",alignItems:"center",gap:s(1),marginBottom:s(2)}},_={div:Fe.map(($,K)=>({div:$,style:{textAlign:"center",fontSize:A=>g(A,"decrease-1"),fontWeight:"600",color:A=>l(A,"shift-7"),paddingBlock:s(1)},_key:K})),role:"row",style:cn()},P={div:$=>Sn($),role:"grid",ariaLabel:"Calendar",onKeyDown:kn,onMouseLeave:()=>t==="range"&&C.set(null),style:{display:"flex",flexDirection:"column",gap:s(.5)}},L=[k,_,P];return r&&L.push(xn()),L.push(Cn()),{div:L,role:"dialog",ariaModal:"false",_onMount:$=>{T=$.domElement},style:{minWidth:s(70),padding:s(3),borderRadius:s(2),backgroundColor:$=>l($,"base"),color:$=>l($,"shift-10"),border:$=>`1px solid ${l($,"shift-4")}`,boxShadow:"0 8px 24px rgba(0,0,0,0.18)"}}}function Sn(S){let k=new Date(v.get(S),x.get(S),1),_=x.get(S),P=Kt(k,m),L=[];for(let $=0;$<6;$++){let K=[];for(let A=0;A<7;A++){let xe=we(P,$*7+A);K.push(wn(xe,_,S))}L.push({div:K,role:"row",style:cn(),_key:$})}return L}function wn(S,k,_){let P=We(S),L=$e(S,_),$=ne(S,_),K=S.getMonth()!==k,A=je(S,w.get(_)),xe=je(S,new Date);return{button:String(S.getDate()),type:"button",role:"gridcell",tabIndex:A?0:-1,ariaSelected:L,ariaDisabled:P,disabled:P,ariaLabel:ie.format(S),dataDate:Wt(S),onClick:()=>me(S),onMouseEnter:()=>t==="range"&&C.set(S),style:{appearance:"none",border:"none",cursor:P?"not-allowed":"pointer",aspectRatio:"1",borderRadius:s(1),fontSize:z=>g(z),fontFamily:"inherit",opacity:P?.35:K?.5:1,backgroundColor:z=>L?l(z,"shift-7",h.get(z)):$?l(z,"shift-2",h.get(z)):"transparent",color:z=>L?l(z,"shift-0",h.get(z)):l(z,"shift-9"),outline:xe?z=>`1px solid ${l(z,"shift-6",h.get(z))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:z=>L?l(z,"shift-7",h.get(z)):l(z,"shift-3",h.get(z))},"&:focus-visible":{outline:z=>`2px solid ${l(z,"shift-6",h.get(z))}`}},_key:Wt(S)}}function xn(){let S=(k,_,P)=>({select:Array.from({length:k},(L,$)=>({option:String($).padStart(2,"0"),value:String($),selected:K=>_.get(K)===$,_key:$})),ariaLabel:P,onChange:L=>{_.set(Number(L.target.value)),ae()},style:yi()});return{div:[S(24,E,"Hour"),{span:":",style:{fontWeight:"600"}},S(60,O,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:s(1),marginTop:s(3)}}}function Cn(){let S=(k,_)=>({button:k,type:"button",onClick:_,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:P=>g(P,"decrease-1"),color:P=>l(P,"shift-8",h.get(P)),padding:s(1)}});return{div:[S("Today",()=>{let k=new Date;w.set(N(k)),J(k),W()}),S("Clear",()=>{p.set(t==="range"?[null,null]:null),C.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:s(2),paddingTop:s(2),borderTop:k=>`1px solid ${l(k,"shift-3")}`}}}function kn(S){let k=S,_=w.get(),P=null;switch(k.key){case"ArrowLeft":P=we(_,-1);break;case"ArrowRight":P=we(_,1);break;case"ArrowUp":P=we(_,-7);break;case"ArrowDown":P=we(_,7);break;case"Home":P=Kt(_,m);break;case"End":P=we(Kt(_,m),6);break;case"PageUp":P=Ft(_,k.shiftKey?-12:-1);break;case"PageDown":P=Ft(_,k.shiftKey?12:1);break;case"Enter":case" ":k.preventDefault(),me(_);return;default:return}k.preventDefault(),w.set(P),J(P),W()}}function cn(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:s(.5)}}function gi(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:e=>g(e),color:e=>l(e,"shift-8"),width:s(7),height:s(7),borderRadius:s(1),"&:hover":{backgroundColor:e=>l(e,"shift-3")}}}function yi(){return{fontFamily:"inherit",fontSize:e=>g(e),padding:s(1),borderRadius:s(1),border:e=>`1px solid ${l(e,"shift-4")}`,backgroundColor:e=>l(e,"base"),color:e=>l(e,"shift-9")}}function bi(e={}){var r;let t=f((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${s(24)}, max-content) 1fr`,columnGap:s(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:o=>g(o,"inherit"),color:o=>l(o,"shift-10",t.get(o))},"& dd":{margin:0,fontSize:o=>g(o,"inherit"),color:o=>l(o,"shift-9",t.get(o))}}}}function vi(e={}){var i,n;let{duration:t=240}=e,r=f((i=e.color)!=null?i:"neutral","color"),o=f((n=e.accentColor)!=null?n:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:a=>g(a,"inherit"),color:a=>l(a,"shift-9",r.get(a)),backgroundColor:a=>l(a,"inherit",r.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>l(a,"shift-2",r.get(a)),color:a=>l(a,"shift-10",r.get(a)),fontSize:a=>g(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:s(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>s(b(a)*4),height:s(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:s(2),height:s(2),flexShrink:0,marginTop:`-${s(.5)}`,borderInlineEnd:a=>`${s(.5)} solid ${l(a,"shift-9",r.get(a))}`,borderBottom:a=>`${s(.5)} solid ${l(a,"shift-9",r.get(a))}`,transform:"rotate(45deg)",transition:`transform ${t}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>l(a,"shift-3",r.get(a))},"& > summary:focus-visible":{borderRadius:a=>s(b(a)*2),outlineOffset:`-${s(.5)}`,outline:a=>`${s(.5)} solid ${l(a,"shift-6",o.get(a))}`},"& > :not(summary)":{maxHeight:"0px",opacity:0,overflow:"hidden",paddingInline:a=>s(b(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${t}ms ease, opacity ${t}ms ease, padding ${t}ms ease`},"&[open] > :not(summary)":{maxHeight:s(250),opacity:1,paddingTop:a=>s(b(a)*1),paddingBottom:a=>s(b(a)*3)}}}}function Si(e={}){let{color:t="neutral",open:r=!1}=e,o=f(r);return{_onInsert:i=>{i.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(i,n)=>{if(i.target!==n.domElement)return;let a=n.domElement.getBoundingClientRect();i.clientX>=a.left&&i.clientX<=a.right&&i.clientY>=a.top&&i.clientY<=a.bottom||o.set(!1)},onTransitionEnd:(i,n)=>{let a=n.domElement;a.style.opacity==="0"&&(a.close(),document.body.style.overflow="")},_onMount:i=>{let n=i.domElement,a=u=>{u?(n.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{n.style.opacity="1";let m=n.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');m==null||m.focus()})):n.style.opacity="0"};a(o.get());let c=o.addListener(a);i.addHook("Remove",()=>{c(),document.body.style.overflow=""})},style:{opacity:"0",transition:"opacity 200ms ease",fontSize:i=>g(i,"inherit"),color:i=>l(i,"shift-10",t),backgroundColor:i=>l(i,"inherit",t),border:"none",padding:i=>s(b(i)*3),boxShadow:i=>`0 ${s(9)} ${s(16)} ${l(i,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:i=>l(i,"shift-2","neutral"),opacity:.75}}}}function wi(e={}){var r;let t=f((r=e.color)!=null?r:"neutral","color");return{role:"separator",_onInsert:o=>{o.tagName!=="div"&&console.warn('"divider" patch should be used with <div>')},style:{display:"flex",justifyContent:"center",alignItems:"baseline",gap:s(2),fontSize:o=>g(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"shift-9",t.get(o)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:o=>l(o,"shift-4",t.get(o)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:o=>l(o,"shift-4",t.get(o)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var un={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},xi={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},Ut=e=>e==="left"||e==="right";function Ci(e={}){let{color:t="neutral",open:r=!1,placement:o="right",size:i}=e,n=f(r),a=Ut(o)?s(80):s(64),c=i!=null?i:a;return{_onInsert:u=>{u.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(u,m)=>{u.target===m.domElement&&n.set(!1)},onTransitionEnd:(u,m)=>{let h=m.domElement;n.get()||(h.close(),document.body.style.overflow="")},_onMount:u=>{let m=u.domElement,h=p=>{p?(m.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{m.style.transform="translate(0, 0)"})):m.style.transform=un[o]};h(n.get());let d=n.addListener(h);u.addHook("Remove",()=>{d(),document.body.style.overflow=""})},style:{transform:un[o],transition:"transform 0.25s ease",fontSize:u=>g(u,"inherit"),color:u=>l(u,"shift-10",t),backgroundColor:u=>l(u,"inherit",t),border:"none",padding:u=>s(b(u)*3),margin:xi[o],width:Ut(o)?c:"100dvw",height:Ut(o)?"100dvh":c,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:u=>`0 ${s(4)} ${s(12)} ${l(u,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:u=>l(u,"shift-2","neutral"),opacity:.75}}}}function ki(e={}){var r;let t=f((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:o=>g(o,"inherit"),fontStyle:"italic",color:o=>l(o,"shift-10",t.get(o))}}}function Ei(e={}){var r;let t=f((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:s(2),marginInline:0,marginTop:s(3),marginBottom:s(3),color:o=>l(o,"shift-9",t.get(o)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:s(2)},"& figcaption":{fontSize:o=>g(o,"decrease-1"),color:o=>l(o,"shift-8",t.get(o)),lineHeight:1.45}}}}function _i(e={}){var i;let{layout:t="horizontal"}=e,r=f((i=e.color)!=null?i:"neutral","color"),o=t==="vertical";return{_onInsert:n=>{n.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:n=>s(b(n)*3),paddingBlock:n=>s(b(n)*3),border:"none",borderRadius:n=>s(b(n)*2),fontSize:n=>g(n,"inherit"),backgroundColor:n=>l(n,"inherit",r.get(n)),display:"grid",gridTemplateColumns:o?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:s(4),rowGap:s(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:n=>g(n,"inherit"),fontWeight:600,paddingBlock:n=>s(b(n)*1),borderRadius:n=>s(b(n)*2),color:n=>l(n,"shift-9",r.get(n)),backgroundColor:n=>l(n,"inherit",r.get(n))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:n=>o?"0px":s(b(n)*1)},"& > label:has(+ :not(legend, label, p) + p)":{gridRow:o?"auto":"span 2"},"& > :not(legend, label, p)":{gridColumn:o?"1":"2",minWidth:0,width:"100%",boxSizing:"border-box"},"& > p":{gridColumn:o?"1":"2",minWidth:0,margin:0,marginBlockStart:`calc(${s(2)} * -1)`,fontSize:n=>g(n,"decrease-1"),color:n=>l(n,"shift-9",r.get(n))}}}}var Ti={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Oi(e={}){var r;let t=f((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{["h1","h2","h3","h4","h5","h6"].includes(o.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:o=>l(o,"shift-11",t.get(o)),marginTop:0,marginBottom:s(2),fontSize:o=>{let i=Ti[o.elementNode.tagName]||"inherit";return g(o,i)}}}}function Pi(e={}){var r;let t=f((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},style:{border:0,height:"1px",marginInline:0,marginTop:s(3),marginBottom:s(3),backgroundColor:o=>l(o,"shift-4",t.get(o))}}}function Di(e={}){var r;let t=f((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.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:s(4),height:s(4),flexShrink:"0",fontSize:o=>g(o),backgroundColor:"transparent",color:o=>l(o,"shift-9",t.get(o))}}}function $i(e={}){var r;let t=f((r=e.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:s(2),backgroundColor:o=>l(o,"inherit",t.get(o))}}}function Ri(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),r=f((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"checkbox",_onInsert:n=>{n.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:n=>g(n,"inherit"),display:"inline-flex",position:"relative",width:s(6),height:s(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:s(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"shift-4",t.get(n))}`,color:n=>l(n,"shift-9",t.get(n)),width:s(4),height:s(4)},"&:hover::before":{backgroundColor:n=>l(n,"shift-2",t.get(n))},"&:checked::before":{outline:n=>`1px solid ${l(n,"shift-6",r.get(n))}`,backgroundColor:n=>l(n,"shift-8",r.get(n))},"&:checked:hover:not([disabled])::before":{backgroundColor:n=>l(n,"shift-7",r.get(n))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:n=>`${s(.5)} solid ${l(n,"inherit",r.get(n))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:n=>`1px solid ${l(n,"shift-6",r.get(n))}`,backgroundColor:n=>l(n,"shift-3",r.get(n))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:n=>l(n,"shift-8",r.get(n))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:n=>l(n,"shift-7",r.get(n))},"&:focus-visible":{borderRadius:s(1.5),outline:n=>`${s(.5)} solid ${l(n,"shift-6",r.get(n))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:n=>l(n,"shift-4","neutral"),pointerEvents:"none"}}}}function Ii(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),r=f((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"color",_onSchedule:(n,a)=>{n.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag'),a.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:n=>g(n,"inherit"),paddingBlock:n=>s(b(n)*1),paddingInline:n=>s(b(n)*1),blockSize:n=>s(6+b(n)*2),inlineSize:n=>s(6+b(n)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:n=>s(b(n)*1)},"&:hover:not([disabled]), &:focus-visible":{},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:n=>l(n,"shift-2","neutral"),outline:n=>`1px solid ${l(n,"shift-4","neutral")}`}}}}function Li(e={}){var i,n;let{mode:t="datetime-local"}=e,r=f((i=e.color)!=null?i:"neutral","color"),o=f((n=e.accentColor)!=null?n:"primary","accentColor");return{type:t,_onSchedule:(a,c)=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),c.type=t},style:{fontFamily:"inherit",fontSize:a=>g(a,"inherit"),lineHeight:"inherit",color:a=>l(a,"shift-9",r.get(a)),backgroundColor:a=>l(a,"inherit",r.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"shift-4",r.get(a))}`,borderRadius:a=>s(b(a)*1),paddingInline:a=>s(b(a)*3),height:a=>s(6+b(a)*2),"&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:a=>`${s(.5)} solid ${l(a,"shift-6",o.get(a))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>l(a,"shift-8","neutral"),backgroundColor:a=>l(a,"shift-2","neutral"),outline:a=>`1px solid ${l(a,"shift-4","neutral")}`},"&:invalid":{outline:a=>`${s(.5)} solid ${l(a,"shift-6","error")}`}}}}function zi(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),r=f((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"file",_onSchedule:(n,a)=>{n.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),a.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:n=>g(n,"inherit"),lineHeight:"inherit",color:n=>l(n,"shift-9",t.get(n)),backgroundColor:n=>l(n,"inherit",t.get(n)),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"shift-4",t.get(n))}`,borderRadius:n=>s(b(n)*1),height:n=>s(6+b(n)*2),paddingInline:n=>s(b(n)*1),"&::-webkit-file-upload-button":{marginTop:n=>s(b(n)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:s(1),height:s(6),paddingInline:s(2),cursor:"pointer",color:n=>l(n,"shift-11",t.get(n)),backgroundColor:n=>l(n,"shift-1",t.get(n))},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:n=>`${s(.5)} solid ${l(n,"shift-6",r.get(n))}`},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:n=>l(n,"shift-8","neutral"),outline:n=>`1px solid ${l(n,"shift-4","neutral")}`,backgroundColor:n=>l(n,"shift-1","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:n=>l(n,"shift-8","neutral"),backgroundColor:n=>l(n,"shift-3","neutral")}}}}function Mi(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),r=f((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"number",_onSchedule:(n,a)=>{n.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),a.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:s(10),paddingInlineStart:n=>s(b(n)*3),paddingInlineEnd:n=>s(b(n)*1.5),paddingBlock:n=>s(b(n)*1),borderRadius:n=>s(b(n)*1),fontSize:n=>g(n,"inherit"),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"shift-4",t.get(n))}`,color:n=>l(n,"shift-9",t.get(n)),backgroundColor:n=>l(n,"inherit",t.get(n)),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:n=>`${s(.5)} solid ${l(n,"shift-6",r.get(n))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:n=>l(n,"shift-2","neutral"),outline:n=>`1px solid ${l(n,"shift-4","neutral")}`,color:n=>l(n,"shift-8","neutral")}}}}function Ni(){return{style:{display:"flex",alignItems:"center",gap:s(2),"& > *":{minWidth:s(9)+"!important"}},_onMount:e=>{let t=e.domElement,r=()=>Array.from(t.querySelectorAll("input")),o=a=>{let c=r(),u=a.target,m=c.indexOf(u);u.value&&m<c.length-1&&c[m+1].focus()},i=a=>{let c=r(),u=a.target,m=c.indexOf(u);a.key==="Backspace"&&!u.value&&m>0&&c[m-1].focus(),a.key==="ArrowLeft"&&m>0&&c[m-1].focus(),a.key==="ArrowRight"&&m<c.length-1&&c[m+1].focus()},n=a=>{var d,p,y;a.preventDefault();let c=(p=(d=a.clipboardData)==null?void 0:d.getData("text"))!=null?p:"",u=r(),m=u.indexOf(a.target);[...c].forEach((v,x)=>{u[m+x]&&(u[m+x].value=v)});let h=Math.min(m+c.length-1,u.length-1);(y=u[h])==null||y.focus()};t.addEventListener("input",o),t.addEventListener("keydown",i),t.addEventListener("paste",n),e.addHook("Remove",()=>{t.removeEventListener("input",o),t.removeEventListener("keydown",i),t.removeEventListener("paste",n)})}}}function Vi(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),r=f((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"radio",_onInsert:n=>{if(n.tagName!=="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:n=>g(n,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:s(6),height:s(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:n=>`1px solid ${l(n,"shift-4",t.get(n))}`,color:n=>l(n,"shift-9",t.get(n)),width:s(4),height:s(4)},"&:hover::before":{backgroundColor:n=>l(n,"shift-2",t.get(n))},"&:checked::before":{outline:n=>`1px solid ${l(n,"shift-6",r.get(n))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:n=>l(n,"shift-8",r.get(n))},"&:checked:hover:not([disabled])::before":{backgroundColor:n=>l(n,"shift-7",r.get(n))},"&:focus-visible":{borderRadius:"50%",outline:n=>`${s(.5)} solid ${l(n,"shift-6",r.get(n))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:n=>l(n,"shift-4","neutral"),pointerEvents:"none"}}}}function Ai(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),r=f((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"range",_onInsert:n=>{n.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:s(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:s(1.5),borderRadius:s(999),backgroundColor:n=>l(n,"shift-3",t.get(n))},"&::-webkit-slider-thumb":{appearance:"none",width:s(4),height:s(4),borderRadius:s(999),border:"none",marginTop:`calc((${s(1.5)} - ${s(4)}) / 2)`,backgroundColor:n=>l(n,"shift-9",r.get(n))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:n=>l(n,"shift-10",r.get(n))},"&:focus-visible":{outline:n=>`${s(.5)} solid ${l(n,"shift-6",r.get(n))}`,outlineOffset:s(1),borderRadius:s(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function Bi(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),r=f((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"search",_onSchedule:(n,a)=>{n.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),a.type="search"},style:{fontFamily:"inherit",fontSize:n=>g(n,"inherit"),lineHeight:"inherit",color:n=>l(n,"shift-9",t.get(n)),backgroundColor:n=>l(n,"inherit",t.get(n)),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"shift-4",t.get(n))}`,borderRadius:n=>s(b(n)*1),minWidth:s(32),paddingInline:n=>s(b(n)*3),paddingBlock:n=>s(b(n)*1),"&::placeholder":{color:n=>l(n,"shift-7",t.get(n))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:n=>`${s(.5)} solid ${l(n,"shift-6",r.get(n))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:n=>l(n,"shift-8","neutral"),backgroundColor:n=>l(n,"shift-2","neutral"),outline:n=>`1px solid ${l(n,"shift-4","neutral")}`}}}}function Hi(e={}){var r;let t=f((r=e.accentColor)!=null?r:"primary","accentColor");return{dataTone:"shift-2",type:"checkbox",_onSchedule:o=>{if(o.tagName!=="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:o=>g(o,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:s(9),height:s(6),cursor:"pointer",margin:"0",paddingBlock:s(1),"&:checked":{"&::before":{backgroundColor:o=>l(o,"increase-3",t.get(o))},"&::after":{left:`calc(100% - ${s(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:s(3),height:s(3),borderRadius:s(999),left:s(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:o=>l(o,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:s(999),display:"inline-block",fontSize:o=>g(o,"inherit"),lineHeight:1,backgroundColor:o=>l(o)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function ji(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),r=f((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"text",_onSchedule:(n,a)=>{n.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),a.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:s(10),paddingInline:n=>s(b(n)*3),paddingBlock:n=>s(b(n)*1),borderRadius:n=>s(b(n)*1),fontSize:n=>g(n,"inherit"),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"shift-4",t.get(n))}`,color:n=>l(n,"shift-9",t.get(n)),backgroundColor:n=>l(n,"inherit",t.get(n)),"&::placeholder":{color:n=>l(n,"shift-7")},"&:not(:placeholder-shown)":{color:n=>l(n,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:n=>`${s(.5)} solid ${l(n,"shift-6",r.get(n))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:n=>l(n,"shift-2","neutral"),outline:n=>`1px solid ${l(n,"shift-4","neutral")}`,color:n=>l(n,"shift-8","neutral")},"&:invalid:not(:placeholder-shown)":{outline:n=>`${s(.5)} solid ${l(n,"shift-6","error")}`},"&[data-status=error]":{outline:n=>`${s(.5)} solid ${l(n,"shift-6","error")}`},"&[data-status=warning]":{outline:n=>`${s(.5)} solid ${l(n,"shift-6","warning")}`}}}}function Fi(e={}){var r;let t=f((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:o=>g(o,"inherit"),color:o=>l(o,"shift-9",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),paddingBlock:s(.5),paddingInline:s(1.5),borderRadius:s(1),outline:o=>`1px solid ${l(o,"shift-4",t.get(o))}`}}}function Wi(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),r=f((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:n=>{n.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:s(2),fontSize:n=>g(n,"inherit"),color:n=>l(n,"shift-9",t.get(n)),cursor:"pointer","&:focus-within":{color:n=>l(n,"shift-10",r.get(n))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:n=>l(n,"shift-8","neutral")}}}}function Ki(e={}){var o,i;let t=f((o=e.color)!=null?o:"primary","color"),r=f((i=e.accentColor)!=null?i:"secondary","accentColor");return{_onInsert:n=>{n.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:n=>g(n,"inherit"),backgroundColor:n=>l(n),color:n=>l(n,"shift-9",t.get(n)),textDecoration:"none","&:visited":{color:n=>l(n,"shift-9",r.get(n))},"&:hover:not([disabled])":{color:n=>l(n,"shift-10",t.get(n)),textDecoration:"underline"},"&:focus-visible":{borderRadius:s(1),outlineOffset:s(1),outline:n=>`${s(.5)} solid ${l(n,"shift-6",r.get(n))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:n=>l(n,"shift-8","neutral")}}}}function Ui(e={}){var r;let t=f((r=e.accentColor)!=null?r:"highlight","accentColor");return{_onInsert:o=>{o.tagName!=="mark"&&console.warn('"mark" primitive patch must use mark tag')},dataTone:"shift-2",style:{display:"inline-flex",alignItems:"center",fontSize:o=>g(o,"inherit"),color:o=>l(o,"shift-9",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),height:s(6),borderRadius:s(1),paddingInline:s(1.5)}}}function qi(e={}){let{color:t="neutral",selectable:r=!0}=e;return{role:"menu",dataTone:"shift-17",_onSchedule:(i,n)=>{var c;let a={_context:{menu:{activeKey:f((c=e.activeKey)!=null?c:null),selectable:r}}};R(n,a)},style:{display:"flex",flexDirection:"column",paddingBlock:i=>s(b(i)*2),paddingInline:i=>s(b(i)*2),fontSize:i=>g(i,"inherit"),backgroundColor:i=>l(i,"inherit",t)}}}function Yi(e={}){let{accentColor:t="primary",color:r="neutral"}=e;return{role:"menuitem",_onInsert:i=>{var u,m;i.tagName!=="button"&&console.warn('"menuItem" patch must use button tag');let n=i.getContext("menu");if(!n){console.warn('"menuItem" patch must be used inside a "menu"');return}let a=(m=(u=i.parent)==null?void 0:u.children.items)!=null?m:[];a=a.filter(h=>h.type=="ElementNode"&&h.attributes.get("role")=="menuitem");let c=i.key!==null&&i.key!==void 0?i.key:a.findIndex(h=>h==i);n.selectable&&(i.attributes.set("ariaCurrent",h=>n.activeKey.get(h)==c||void 0),i.addEvent("click",()=>n.activeKey.set(c)))},onKeyDown:(i,n)=>{var h,d,p,y;let a=i.key;if(a==="Enter"||a===" "){i.preventDefault(),(h=n.domElement)==null||h.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(a))return;i.preventDefault();let c=((p=(d=n.parent)==null?void 0:d.children.items)!=null?p:[]).filter(v=>v.type==="ElementNode"&&v.attributes.get("role")==="menuitem"),u=c.findIndex(v=>v===n),m=u;a==="ArrowDown"?m=(u+1)%c.length:a==="ArrowUp"?m=(u-1+c.length)%c.length:a==="Home"?m=0:a==="End"&&(m=c.length-1),(y=c[m].domElement)==null||y.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:i=>s(2),width:"100%",fontSize:i=>g(i,"inherit"),height:i=>s(6+b(i)*2),paddingInline:i=>s(b(i)*3),border:"none",outline:"none",color:i=>l(i,"shift-9"),backgroundColor:i=>l(i,"inherit"),"&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:i=>l(i,"shift-2")},"&[aria-current=true]":{backgroundColor:i=>l(i,"shift-3",t),color:i=>l(i,"shift-10")},"&:focus-visible":{outline:i=>`${s(.5)} solid ${l(i,"shift-6",t)}`,outlineOffset:`-${s(.5)}`}}}}var mn=e=>!!e&&typeof e.get=="function"&&e._isState===!0,De=e=>{let t={},r=[];for(let o in e){let i=e[o];o==="x"?r.push(`translateX(${typeof i=="number"?`${i}px`:i})`):o==="y"?r.push(`translateY(${typeof i=="number"?`${i}px`:i})`):o==="scale"?r.push(`scale(${i})`):o==="rotate"?r.push(`rotate(${typeof i=="number"?`${i}deg`:i})`):t[o]=i}return r.length&&(t.transform=r.join(" ")),t};function Gi(e={}){var a,c,u,m;let{initial:t,animate:r,exit:o,transition:i={}}=e,n={duration:(a=i.duration)!=null?a:300,delay:(c=i.delay)!=null?c:0,easing:(u=i.easing)!=null?u:"ease",iterations:(m=i.iterations)!=null?m:1,fill:"both"};return{_onMount:h=>{let d=h.domElement;if(!d||typeof d.animate!="function")return;let p=mn(r)?r.get():r;if(p?d.animate(t?[De(t),De(p)]:[De(p)],n):t&&Object.assign(d.style,De(t)),mn(r)){let y=r.addListener(v=>{d.animate([De(v)],n)});h.setMetadata("motionRelease",y)}},_onBeforeRemove:(h,d)=>{let p=h.domElement;if(!p||!o||typeof p.animate!="function")return d();p.animate([De(o)],n).finished.then(d,d)},_onRemove:h=>{let d=h.getMetadata("motionRelease");d==null||d()}}}function Xi(e={}){var r;let t=f((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:o=>g(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"shift-9",t.get(o)),marginTop:0,marginBottom:0,paddingLeft:s(3),listStyleType:"decimal",listStylePosition:"outside"}}}function Ji(e,t){if(t<=7)return Array.from({length:t},(n,a)=>a+1);let r=[1];e>3&&r.push("...");let o=Math.max(2,e-1),i=Math.min(t-1,e+1);for(let n=o;n<=i;n++)r.push(n);return e<t-2&&r.push("..."),r.push(t),r}function Zi(e){var c;let{total:t,color:r="neutral",accentColor:o="primary"}=e,i=f((c=e.value)!=null?c:1),n={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:u=>s(6+b(u)*2),height:u=>s(6+b(u)*2),paddingInline:u=>s(b(u)*2),borderRadius:u=>s(b(u)*1),border:"none",cursor:"pointer",fontSize:u=>g(u,"inherit"),backgroundColor:"transparent",color:u=>l(u,"shift-9",r),"&:hover:not([disabled])":{backgroundColor:u=>l(u,"shift-2",r)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=to(Ue({},n),{backgroundColor:u=>l(u,"shift-6",o),color:u=>l(u,"shift-11",o),fontWeight:"600",cursor:"default","&:hover:not([disabled])":{backgroundColor:u=>l(u,"shift-6",o)}});return{_onInsert:u=>{u.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:u=>{let m={div:h=>{let d=i.get(h),p=[];p.push({button:"\u2039",type:"button",ariaLabel:"Previous page",disabled:d<=1,onClick:()=>d>1&&i.set(d-1),style:n});for(let y of Ji(d,t))if(y==="...")p.push({span:"\u2026",style:{display:"inline-flex",alignItems:"center",paddingInline:v=>s(b(v)*2),color:v=>l(v,"shift-7",r)}});else{let v=y===d;p.push({button:String(y),type:"button",ariaLabel:`Page ${y}`,ariaCurrent:v?"page":void 0,disabled:v,onClick:()=>i.set(y),style:v?a:n})}return p.push({button:"\u203A",type:"button",ariaLabel:"Next page",disabled:d>=t,onClick:()=>d<t&&i.set(d+1),style:n}),p},style:{display:"flex",alignItems:"center",gap:s(1)}};u.children.insert(m)},style:{display:"inline-flex"}}}function Qi(e={}){var r;let t=f((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:o=>g(o,"inherit"),color:o=>l(o,"shift-9",t.get(o)),lineHeight:1.5,marginTop:0,marginBottom:0}}}function ea(e){var p;let{open:t=!1,placement:r="bottom",openOn:o="click"}=e,i=null,n=f(t),a=f(r),{show:c,hide:u,anchorPartial:m}=oe({open:n,placement:a,content:e.content}),h={role:"dialog",dataTone:"shift-11",onMouseEnter:()=>o==="hover"&&c(),onMouseLeave:()=>o==="hover"&&u(),_onInsert:y=>{let v=y.attributes.get("id");i=v||y.nodeId,!v&&y.attributes.set("id",i)}};return(p=e.content).$||(p.$=[]),e.content.$.push(h),R(m,{ariaHaspopup:"dialog",ariaExpanded:y=>n.get(y),onMouseEnter:()=>o==="hover"&&c(),onMouseLeave:()=>o==="hover"&&u(),onClick:()=>{o==="click"&&(n.get()?u():c())},onFocus:()=>c(),onBlur:(y,v)=>{let x=y.relatedTarget,w=v.getRoot().domElement,C=i?w.querySelector(`#${CSS.escape(i)}`):null;x&&(C!=null&&C.contains(x))||u()},_onMount:y=>i&&y.attributes.set("ariaControls",i)}),m}function qt(e={}){let{placement:t="bottom-end",color:r="neutral",sideOffset:o=s(6),bordered:i=!0}=e,n=f(t),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"},c=h=>{var d;return(d=a[n.get(h)])!=null?d:a["bottom-end"]},u=h=>h.includes("start")?o:h.includes("end")?"auto":"50%",m=h=>h.includes("end")?o:h.includes("start")?"auto":"50%";return{style:{fontSize:h=>g(h),backgroundColor:h=>l(h),color:h=>l(h,"shift-9",r),position:"relative","&::after":{content:'""',position:"absolute",width:s(1.5),height:s(1.5),backgroundColor:h=>l(h,"inherit",r),borderWidth:i?"1px":"0px",borderColor:h=>l(h,"inherit",r),borderTopStyle:h=>{let d=c(h);return d.includes("top")||d.includes("right")?"solid":"none"},borderBottomStyle:h=>{let d=c(h);return d.includes("bottom")||d.includes("left")?"solid":"none"},borderLeftStyle:h=>{let d=c(h);return d.includes("top")||d.includes("left")?"solid":"none"},borderRightStyle:h=>{let d=c(h);return d.includes("bottom")||d.includes("right")?"solid":"none"},top:h=>{let d=c(h);return d.includes("top")?0:d.includes("bottom")?"auto":u(d)},right:h=>{let d=c(h);return d.includes("right")?0:d.includes("left")?"auto":m(d)},bottom:h=>{let d=c(h);return d.includes("bottom")?0:d.includes("top")?"auto":m(d)},left:h=>{let d=c(h);return d.includes("left")?0:d.includes("right")?"auto":u(d)},transform:h=>{let d=c(h),p=d.includes("right")||d.includes("end")&&!d.includes("left")?"50%":"-50%",y=d.includes("bottom")||d.includes("end")&&!d.includes("top")?"50%":"-50%";return`translate(${p},${y}) rotate(45deg)`}}}}}function ta(e={}){var r;let t=f((r=e.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:o=>g(o,"inherit"),color:o=>l(o,"shift-9",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),border:"none",paddingBlock:o=>s(b(o)*2),paddingInline:o=>s(b(o)*3),borderRadius:o=>s(b(o)*2)}}}function oa(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),r=f((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:n=>{n.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},style:{appearance:"none",width:"100%",height:s(2),border:0,borderRadius:s(999),overflow:"hidden",backgroundColor:n=>l(n,"shift-3",t.get(n)),"&::-webkit-progress-bar":{backgroundColor:n=>l(n,"shift-3",t.get(n)),borderRadius:s(999)},"&::-webkit-progress-value":{backgroundColor:n=>l(n,"shift-9",r.get(n)),borderRadius:s(999),transition:"width 220ms ease"}}}}function na(e={}){let{color:t="neutral",accentColor:r="primary"}=e;return{_onInsert:o=>{o.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:o=>g(o,"inherit"),lineHeight:"inherit",color:o=>l(o,"shift-9",t),backgroundColor:o=>l(o,"inherit",t),border:"none",outlineOffset:"-1px",outline:o=>`1px solid ${l(o,"shift-4",t)}`,borderRadius:o=>s(b(o)*1),paddingBlock:o=>s(b(o)*1),paddingLeft:o=>s(b(o)*3),paddingRight:o=>s(b(o)*5),backgroundImage:o=>{let i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${zt(o,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(i)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${s(2)} center`,backgroundSize:`${s(2.5)} ${s(1.5)}`,"&:not([multiple])":{height:o=>s(6+b(o)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:o=>`${s(.5)} solid ${l(o,"shift-5",r)}`},"&:focus-visible":{outline:o=>`${s(.5)} solid ${l(o,"shift-6",r)}`},"& optgroup":{color:o=>l(o,"shift-11",t)},"& option[disabled]":{color:o=>l(o,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:o=>l(o,"shift-8","neutral"),outline:o=>`1px solid ${l(o,"shift-4","neutral")}`,backgroundColor:o=>l(o,"shift-2","neutral")}}}}function ra(e){let{options:t=[],placement:r="bottom",color:o="neutral",open:i=!1,multiple:n=!1}=e,a=f(e.value),c=f(i),{show:u,hide:m,anchorPartial:h}=oe({open:c,placement:f(r),content:e.content}),d={onClick:()=>!n&&m()};R(e.content,d);let p={div:v=>{let x=a.get(v),w=Array.isArray(x)?x:[x];return t.filter(E=>w.includes(E.value)).map(E=>({span:E.label,$:[He({color:o,removable:n})],_key:E.value,_onRemove:O=>{let T=a.get(),M=(Array.isArray(T)?T:[T]).filter(I=>I!==E.value);n?a.set(M):a.set(M[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:s(1),flex:1}},y={_onInsert:v=>{v.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:v=>v.children.insert(p),onClick:()=>c.get()?m():u(),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:v=>s(6+b(v)*2),minWidth:s(32),outlineOffset:"-1px",outline:v=>`1px solid ${l(v,"shift-4","neutral")}`,paddingInline:v=>s(b(v)*2),borderRadius:v=>s(b(v)*1),fontSize:v=>g(v,"inherit"),color:v=>l(v,"shift-9",o),backgroundColor:v=>l(v,"inherit",o)}};return R(h,y),h}function ia(e={}){let{accentColor:t="primary",color:r="neutral",value:o=null}=e;return{role:"option",_onInit:n=>{n.tagName!=="div"&&console.warn('"selectItem" patch must use div tag');let a=n.getContext("select");if(a){let c=a.value;n.attributes.set("ariaSelected",u=>{let m=c.get(u);return a.multiple?m.includes(o):m==o}),n.addEvent("click",()=>{let u=c.get();a.multiple?u.includes(o)?c.set(u.filter(m=>m!==o)):c.set(u.concat([o])):u!=o&&c.set(o)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:n=>g(n,"inherit"),height:n=>s(6+b(n)*2),paddingInline:n=>s(b(n)*3),border:"none",outline:"none",color:n=>l(n,"shift-9",r),backgroundColor:n=>l(n,"inherit",r),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:n=>l(n,"shift-2",r)},"&[aria-selected=true]":{backgroundColor:n=>l(n,"shift-6",t),color:n=>l(n,"shift-11")},"&:focus-visible":{outline:n=>`${s(.5)} solid ${l(n,"shift-6",t)}`,outlineOffset:`-${s(.5)}`}}}}function aa(e={}){var a;let{color:t="neutral",multiple:r=!1}=e,o=f((a=e.value)!=null?a:r?[]:null),i={div:c=>{let u=o.get(c);return(Array.isArray(u)?u:[u]).map(h=>({input:null,name:e.name,value:h||""}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:o,multiple:r}},_onInit:c=>{c.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),c.children.insert(i)},style:{display:"flex",flexDirection:"column",paddingBlock:c=>s(b(c)*2),paddingInline:c=>s(b(c)*2),fontSize:c=>g(c,"inherit"),backgroundColor:c=>l(c,"inherit",t)}}}function la(e={}){var i;let t=f((i=e.color)!=null?i:"neutral","color"),r={"0%,100%":{opacity:1},"50%":{opacity:.4}},o=Ee(JSON.stringify(r));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:n=>g(n),color:n=>l(n,"shift-9",t.get(n)),height:s(6),display:"block",borderRadius:s(1),backgroundColor:n=>l(n,"inherit",t.get(n)),animation:`${o} 1.5s ease-in-out infinite`,[`@keyframes ${o}`]:r}}}function sa(e={}){var r;let t=f((r=e.color)!=null?r:"neutral","color");return{dataSize:"decrease-1",_onInsert:o=>{o.tagName!=="small"&&console.warn('"small" primitive patch must use small tag')},style:{fontSize:o=>g(o,"inherit"),color:o=>l(o,"shift-9",t.get(o))}}}var dn={to:{transform:"rotate(360deg)"}},hn=Ee(JSON.stringify(dn));function ca(e={}){var r;let t=f((r=e.color)!=null?r:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:o=>{o.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:o=>g(o),backgroundColor:o=>l(o),color:o=>l(o,"shift-9",t.get(o)),display:"inline-block",margin:0,flexShrink:0,width:s(6),height:s(6),borderRadius:"50%",border:o=>`${s(.5)} solid ${l(o,"shift-4",t.get(o))}`,borderTopColor:o=>l(o,"shift-9",t.get(o)),boxSizing:"border-box",padding:0,animation:`${hn} 0.7s linear infinite`,[`@keyframes ${hn}`]:dn}}}function ua(e={}){let{direction:t="horizontal",defaultSize:r=50,min:o=10,max:i=90}=e;return{_onSchedule:(n,a)=>{R(a,{_context:{splitter:{direction:t,size:f(r),min:o,max:i}}})},style:{display:"flex",flexDirection:t==="horizontal"?"row":"column",overflow:"hidden"}}}function ma(){return{_onMount:e=>{let t=e.getContext("splitter");if(!t){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let r=e.domElement,o=t.direction==="horizontal"?"width":"height";r.style[o]=`${t.size.get()}%`,r.style.flexShrink="0",r.style.overflow="auto";let i=t.size.addListener(n=>{r.style[o]=`${n}%`});e.addHook("Remove",i)}}}function ha(){return{_onMount:e=>{let t=e.getContext("splitter");if(!t){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let r=e.domElement,o=t.direction==="horizontal";r.style.cursor=o?"col-resize":"row-resize";let i=n=>{n.preventDefault();let a=r.parentElement,c=m=>{let h=a.getBoundingClientRect(),d=o?(m.clientX-h.left)/h.width*100:(m.clientY-h.top)/h.height*100;t.size.set(Math.min(Math.max(d,t.min),t.max))},u=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u)};document.addEventListener("mousemove",c),document.addEventListener("mouseup",u)};r.addEventListener("mousedown",i),e.addHook("Remove",()=>r.removeEventListener("mousedown",i))},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e=>l(e,"shift-2"),"&:hover":{backgroundColor:e=>l(e,"shift-3")},"&::after":{content:'""',borderRadius:s(999),backgroundColor:e=>l(e,"shift-4")}}}}function da(e={}){var r;let t=f((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:o=>g(o,"inherit"),fontWeight:700,color:o=>l(o,"shift-11",t.get(o)),backgroundColor:o=>l(o)}}}function fa(e={}){var r;let t=f((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:o=>g(o,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:o=>l(o,"shift-9",t.get(o))}}}function pa(e={}){var r;let t=f((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:o=>g(o,"decrease-1"),verticalAlign:"super",lineHeight:0,color:o=>l(o,"shift-9",t.get(o))}}}function ga(e={}){let{accentColor:t="primary",color:r="neutral"}=e;return{role:"tab",_onInsert:i=>{var m,h;i.tagName!=="button"&&console.warn('"tab" patch must use button tag');let n=i.getContext("tabs");if(!n){console.warn('"tab" patch must be used inside a "tabs"');return}let a=(h=(m=i.parent)==null?void 0:m.children.items)!=null?h:[];a=a.filter(d=>d.type=="ElementNode"&&d.attributes.get("role")=="tab");let c=i.key!==null&&i.key!==void 0?i.key:a.findIndex(d=>d==i),u={id:"tab"+i.parent.nodeId+c,ariaControls:"tabpanel"+i.parent.nodeId+c,ariaSelected:d=>n.activeKey.get(d)==c,onClick:()=>n.activeKey.set(c),onKeyDown:d=>{var C,E,O,T;let p=d.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(p))return;d.preventDefault();let y=((E=(C=i.parent)==null?void 0:C.children.items)!=null?E:[]).filter(D=>D.type==="ElementNode"&&D.attributes.get("role")==="tab"),v=y.findIndex(D=>D===i),x=v;p==="ArrowRight"?x=(v+1)%y.length:p==="ArrowLeft"?x=(v-1+y.length)%y.length:p==="Home"?x=0:p==="End"&&(x=y.length-1);let w=y[x];n.activeKey.set((O=w.key)!=null?O:x),(T=w.domElement)==null||T.focus()}};i.merge(u)},style:{cursor:"pointer",fontSize:i=>g(i,"inherit"),height:i=>s(6+b(i)*2),paddingInline:i=>s(b(i)*4),border:"none",outline:"none",color:i=>l(i,"shift-9"),backgroundColor:i=>l(i,"inherit"),boxShadow:i=>`inset 0 -${s(.5)} 0 0 ${l(i,"shift-1",r)}`,"&:hover:not([disabled])":{boxShadow:i=>`inset 0 -${s(.5)} 0 0 ${l(i,"shift-2",r)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:i=>`inset 0 -${s(.5)} 0 0 ${l(i,"shift-6",t)}`},"&:focus-visible":{boxShadow:i=>`inset 0 -${s(.5)} 0 0 ${l(i,"shift-6",t)}`}}}}function ya(e={}){var r;let t=f((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:o=>g(o,"inherit"),color:o=>l(o,"shift-9",t.get(o)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:o=>s(b(o)*3),paddingBlock:o=>s(b(o)*1),color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"inherit")},"& td":{textAlign:"left",paddingInline:o=>s(b(o)*3),paddingBlock:o=>s(b(o)*1),color:o=>l(o,"shift-9",t.get(o)),boxShadow:o=>`inset 0 1px 0 ${l(o,"shift-3",t.get(o))}`,fontSize:o=>g(o,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:o=>s(b(o)*3),paddingBlock:o=>s(b(o)*1),color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"inherit"),boxShadow:o=>`inset 0 -1px 0 ${l(o,"shift-4",t.get(o))}`},"& tr":{backgroundColor:o=>l(o,"inherit")},"& tbody tr:hover":{backgroundColor:o=>l(o,"shift-2")+"!important"}}}}function ba(){return{role:"tabpanel",style:{paddingBlock:t=>s(b(t)*2),paddingInline:t=>s(b(t)*2)},_onInsert:t=>{var a,c;let r=t.getContext("tabs");if(!r){console.warn('"tabPanel" patch must be used inside a "tabs"');return}let o=(c=(a=t.parent)==null?void 0:a.children.items)!=null?c:[];o=o.filter(u=>u.type=="ElementNode"&&u.attributes.get("role")=="tabpanel");let i=t.key!==null&&t.key!==void 0?t.key:o.findIndex(u=>u==t),n={id:"tabpanel"+t.parent.nodeId+i,ariaLabelledby:"tab"+t.parent.nodeId+i,hidden:u=>r.activeKey.get(u)!=i};t.merge(n)}}}function va(e={}){return{role:"tablist",_onSchedule:(r,o)=>{let i={_context:{tabs:{activeKey:f(e.activeKey||0)}}};R(o,i)}}}function Sa(e={}){var i,n;let t=f((i=e.color)!=null?i:"neutral","color"),r=f((n=e.accentColor)!=null?n:"primary","accentColor"),{autoResize:o=!1}=e;return{_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:a=>{if(o){let c=a.domElement;c.style.overflow="hidden";let u=()=>{c.style.height="auto",c.style.height=c.scrollHeight+"px"};c.addEventListener("input",u),u()}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>s(b(a)*2),paddingBlock:a=>s(b(a)*1.5),border:"none",borderRadius:a=>s(b(a)*1.5),fontSize:a=>g(a,"inherit"),color:a=>l(a,"shift-9",t.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"shift-4",t.get(a))}`,backgroundColor:a=>l(a,"inherit",t.get(a)),"&::placeholder":{color:a=>l(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`${s(.5)} solid ${l(a,"shift-5",r.get(a))}`},"&:focus-visible":{outline:a=>`${s(.5)} solid ${l(a,"shift-6",r.get(a))}`},"&:invalid":{outline:a=>`${s(.5)} solid ${l(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>l(a,"shift-8","neutral"),outline:a=>`1px solid ${l(a,"shift-4","neutral")}`,backgroundColor:a=>l(a,"shift-2","neutral")}}}}function wa(e={}){let{position:t="top-center",color:r="neutral"}=e,o=f(!1),i=t.startsWith("top"),n=t.endsWith("center"),a=t.endsWith("right"),c={div:[],id:`domphy-toast-${t}`,style:{position:"fixed",display:"flex",flexDirection:i?"column":"column-reverse",alignItems:n?"center":a?"end":"start",inset:0,gap:s(4),zIndex:30,padding:s(6),pointerEvents:"none"}};return{_portal:u=>{let m=u.domElement.querySelector(`#domphy-toast-${t}`);return m||(m=u.children.insert(c).domElement),m},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:s(32),pointerEvents:"auto",paddingBlock:u=>s(b(u)*2),paddingInline:u=>s(b(u)*4),borderRadius:u=>s(b(u)*2),fontSize:u=>g(u,"inherit"),color:u=>l(u,"shift-9",r),backgroundColor:u=>l(u,"inherit",r),boxShadow:u=>`0 ${s(2)} ${s(9)} ${l(u,"shift-4","neutral")}`,opacity:u=>Number(o.get(u)),transform:u=>o.get(u)?"translateY(0)":i?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>o.set(!0)),_onBeforeRemove:(u,m)=>{let h=d=>{d.propertyName==="transform"&&(u.domElement.removeEventListener("transitionend",h),m())};u.domElement.addEventListener("transitionend",h),o.set(!1)}}}function xa(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),r=f((i=e.accentColor)!=null?i:"primary","accentColor");return{role:"button",_onInsert:n=>{var h,d;n.tagName!=="button"&&console.warn('"toggle" patch must use button tag');let a=n.getContext("toggleGroup");if(!a){console.warn('"toggle" patch must be used inside a "toggleGroup"');return}let u=((d=(h=n.parent)==null?void 0:h.children.items)!=null?d:[]).filter(p=>p.type==="ElementNode"&&p.attributes.get("role")==="button"),m=n.key!==null&&n.key!==void 0?String(n.key):String(u.indexOf(n));n.attributes.set("ariaPressed",p=>{let y=a.value.get(p);return Array.isArray(y)?y.includes(m):y===m}),n.addEvent("click",()=>{let p=a.value.get();if(a.multiple){let y=Array.isArray(p)?[...p]:[];a.value.set(y.includes(m)?y.filter(v=>v!==m):[...y,m])}else a.value.set(p===m?"":m)})},style:{cursor:"pointer",fontSize:n=>g(n,"inherit"),height:s(6),paddingBlock:s(1),paddingInline:s(2),border:"none",borderRadius:s(1),color:n=>l(n,"shift-9",t.get(n)),backgroundColor:n=>l(n,"inherit",t.get(n)),transition:"background-color 300ms ease","&:hover:not([disabled])":{backgroundColor:n=>l(n,"shift-2",t.get(n))},"&[aria-pressed=true]":{backgroundColor:n=>l(n,"shift-3",r.get(n)),color:n=>l(n,"shift-12",r.get(n))},"&:focus-visible":{outline:n=>`${s(.5)} solid ${l(n,"shift-6",r.get(n))}`,outlineOffset:`-${s(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function Ca(e={}){var o;let{multiple:t=!1,color:r="neutral"}=e;return{role:"group",_context:{toggleGroup:{value:f((o=e.value)!=null?o:t?[]:""),multiple:t}},style:{display:"flex",paddingBlock:s(1),paddingInline:s(1),gap:s(1),borderRadius:s(2),fontSize:i=>g(i,"inherit"),backgroundColor:i=>l(i,"inherit",r),outline:i=>`1px solid ${l(i,"shift-3",r)}`,outlineOffset:"-1px"}}}function ka(e={}){let{open:t=!1,placement:r="top",content:o="Tooltip Content"}=e,i=f(r),n=f(o),a=null,c={span:y=>n.get(y)},{show:u,hide:m,anchorPartial:h}=oe({open:t,placement:i,content:c}),d={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",_onInsert:y=>{let v=y.attributes.get("id");a=v||y.nodeId,!v&&y.attributes.set("id",a)},style:{paddingBlock:y=>s(b(y)*1),paddingInline:y=>s(b(y)*3),borderRadius:y=>s(b(y)*1),color:y=>l(y,"shift-9"),backgroundColor:y=>l(y),fontSize:y=>g(y,"inherit")},$:[qt({placement:i,bordered:!1})]};return c.$||(c.$=[]),c.$.push(d),R(h,{onMouseEnter:()=>u(),onMouseLeave:()=>m(),onFocus:()=>u(),onBlur:()=>m(),onKeyDown:y=>y.key==="Escape"&&m(),_onMount:y=>a&&y.attributes.set("ariaDescribedby",a)}),h}function fn(e,t){return e.key!==void 0&&e.key!==null?String(e.key):`index-${t}`}function Ea(e={}){let{duration:t=300,delay:r=0}=e,o=new Map;return{_onBeforeUpdate:i=>{o=new Map,i.children.items.forEach((n,a)=>{if(!(n instanceof B))return;let c=n.domElement;c&&o.set(fn(n,a),c.getBoundingClientRect())})},_onUpdate:i=>{i.children.items.forEach((n,a)=>{if(!(n instanceof B))return;let c=n.domElement;if(!c)return;let u=fn(n,a),m=o.get(u);if(!m)return;let h=c.getBoundingClientRect(),d=m.left-h.left,p=m.top-h.top;if(Math.abs(d)<.5&&Math.abs(p)<.5)return;let y=c.style.transition,v=c.style.transform;c.style.transition="none",c.style.transform=`translate(${d}px, ${p}px)`,c.getBoundingClientRect(),requestAnimationFrame(()=>{c.style.transition=`transform ${t}ms ease ${r}ms`,c.style.transform="translate(0px, 0px)"});let x=()=>{c.style.transition=y,c.style.transform=v,c.removeEventListener("transitionend",w)},w=C=>{C.propertyName==="transform"&&x()};c.addEventListener("transitionend",w),setTimeout(x,t+r+34)}),o.clear()}}}function _a(e={}){var r;let t=f((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:o=>g(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"shift-9",t.get(o)),marginTop:0,marginBottom:0,paddingLeft:s(3),listStyleType:"disc",listStylePosition:"outside"}}}return $n(Ta);})();
4
+ ${i}}`}function Z(e){if(!_e[e])throw Error(`Theme "${e}" not found`);return _e[e]}function hr(e,t){mr(t),_e[e]||(_e[e]=zt(Ne)),Do(_e[e],t),Ze=null,Dt.clear()}function fr(e){let t=zt(e);t.direction="lighten";for(let n in t.colors)t.colors[n].reverse(),t.baseTones[n]=t.colors[n].length-1-t.baseTones[n];return t}function $o(e){let t=Dt.get(e);if(t)return t;let n=Z(e),o=It(n),i={};for(let r in n){let a=n[r];if(r==="colors")for(let c in n.colors){let u={};[...Array(o).keys()].forEach(h=>u[h]=n.colors[c][h]),i[c]=u}else if(r==="fontSizes")i.fontSizes=n.fontSizes;else if(r==="densities")i.densities=n.densities;else if(r==="custom"&&(i.custom={},a&&typeof a=="object"))for(let c in a)i.custom[c]=a[c]}return Dt.set(e,i),i}function Ae(){if(Ze)return Ze;let e=Z("light"),t=It(e),n={};for(let o in e){let i=e[o];if(o==="colors")for(let r in e.colors){let a={};[...Array(t).keys()].forEach(c=>a[c]=`var(--${r}-${c})`),n[r]=a}else if(o==="fontSizes")n.fontSizes=[...Array(8).keys()].map(r=>`var(--fontSize-${r})`);else if(o==="custom"&&(n.custom={},i&&typeof i=="object"))for(let r in i)n.custom[r]=`var(--custom-${Po(r)})`}return Ze=n,n}function $t(){return Object.entries(_e).map(([e,t])=>dr(e,t)).join(`
5
+ `)}function pr(e){var t;if(typeof document!="undefined")if(e){e.textContent=$t();return}else e=(t=document.getElementById("domphy-themes"))!=null?t:Object.assign(document.createElement("style"),{id:"domphy-themes"}),e.textContent=$t(),document.head.appendChild(e)}function l(e){return`${e/4}em`}function Qe(e){let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataTheme"));)t=t.parent;let n="light";return t&&t.attributes&&t.attributes.has("dataTheme")&&(n=t.attributes.get("dataTheme"),typeof e=="function"&&t.attributes.addListener("dataTheme",e)),n}var Lt=["inherit"];[...Array(5).keys()].forEach(e=>{Lt.push(`decrease-${e}`),Lt.push(`increase-${e}`)});function gr(e,t="inherit"){if(!Lt.includes(t))throw Error(`density name "${t}" invalid`);let n;if(t==="inherit")n=e;else if(t!=null&&t.startsWith("increase-")){let o=parseInt(t.replace("increase-",""),10);n=e+o}else if(t!=null&&t.startsWith("decrease-")){let o=parseInt(t.replace("decrease-",""),10);n=e-o}else n=e;return Math.max(0,Math.min(4,n))}function yr(e){if(!e)return 2;let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataDensity"));)t=t.parent;let n=2;return t&&t.attributes&&t.attributes.has("dataDensity")&&(n=gr(n,t.attributes.get("dataDensity")),typeof e=="function"&&t.attributes.addListener("dataDensity",e)),n}function y(e){let t=yr(e);return Z(e?Qe(e):"light").densities[t]}var Rt=["inherit"];[...Array(8).keys()].forEach(e=>{Rt.push(`decrease-${e}`),Rt.push(`increase-${e}`)});function Lo(e,t="inherit"){if(!Rt.includes(t))throw Error(`size name "${t}" invalid`);let n;if(t==="inherit")n=e;else if(t!=null&&t.startsWith("increase-")){let o=parseInt(t.replace("increase-",""),10);n=e+o}else if(t!=null&&t.startsWith("decrease-")){let o=parseInt(t.replace("decrease-",""),10);n=e-o}else n=e;return Math.max(0,Math.min(7,n))}function br(e){if(!e)return 2;let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataSize"));)t=t.parent;let n=2;return t&&t.attributes&&t.attributes.has("dataSize")&&(n=Lo(n,t.attributes.get("dataSize")),typeof e=="function"&&t.attributes.addListener("dataSize",e)),n}function b(e,t="inherit"){let n=Lo(br(e),t);return Ae().fontSizes[n]}var le=Ne.colors.neutral.length,Ve=["inherit","base"];[...Array(le).keys()].forEach(e=>{Ve.push(`decrease-${e}`),Ve.push(`increase-${e}`),Ve.push(`shift-${e}`)});function Oo(e,t){if(e<0||e>le-1)return e;let n=e+t;return n=Math.max(0,Math.min(le-1,n)),n}function vr(e,t){if(e<0||e>le-1)return e;let n=Math.floor((le-1)/2),o=e<=n?e+t:e-t;return o=Math.max(0,Math.min(le-1,o)),o}function Be(e,t="inherit"){if(typeof t=="number")return t;if(t==="inherit")return e;if(!Ve.includes(t))throw Error(`tone name "${t}" invalid`);if(t.startsWith("increase-")){let n=parseInt(t.replace("increase-",""),10);return Oo(e,n)}else if(t.startsWith("decrease-")){let n=parseInt(t.replace("decrease-",""),10);return Oo(e,-n)}else if(t.startsWith("shift-")){let n=parseInt(t.replace("shift-",""),10);return vr(e,n)}else return e}function Ro(e){if(!e)return 0;let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataTone"));)t=t.parent;let n=0;return t&&t.attributes&&t.attributes.has("dataTone")&&(n=Be(n,t.attributes.get("dataTone")),typeof e=="function"&&t.attributes.addListener("dataTone",e)),n}function zo(e,t,n){return n<=0?e:t==="lighten"&&e===0?n:t==="darken"&&e===le-1?le-1-n:e}function s(e,t="inherit",n="inherit"){let o=n==="inherit"?"neutral":n;if(!e)return t==="base"?Ae()[o][Z("light").baseTones[o]]:Ae()[o][Be(0,t)];let i=Qe(e),r;if(t==="base")r=Z(i).baseTones[o];else{let c=Z(i),u=zo(Ro(e),c.direction,c.darkBias);r=Be(u,t)}let a=Ae()[o];if(!a)throw Error(`color "${o}" not found on theme "${i}"`);return a[r]}function Mt(e,t="inherit",n="inherit"){let o=n==="inherit"?"neutral":n,i=e?Qe(e):"light",r=$o(i);if(!e)return t==="base"?r[o][Z("light").baseTones[o]]:r[o][Be(0,t)];let a;if(t==="base")a=Z(i).baseTones[o];else{let c=Z(i),u=zo(Ro(e),c.direction,c.darkBias);a=Be(u,t)}return r[o][a]}var ht={};Ye(ht,{abbreviation:()=>Sr,accordion:()=>xr,alert:()=>Cr,avatar:()=>wr,badge:()=>Er,blockquote:()=>kr,breadcrumb:()=>Tr,breadcrumbEllipsis:()=>_r,button:()=>Or,buttonSwitch:()=>Pr,card:()=>Dr,code:()=>$r,combobox:()=>vi,command:()=>Si,commandItem:()=>Ci,commandSearch:()=>xi,datePicker:()=>Ei,descriptionList:()=>_i,details:()=>Oi,dialog:()=>Pi,divider:()=>Di,drawer:()=>$i,emphasis:()=>Li,empty:()=>Ri,errorBoundary:()=>zi,fab:()=>Mi,figure:()=>Ai,formGroup:()=>Vi,heading:()=>Bi,horizontalRule:()=>Hi,icon:()=>ji,image:()=>Fi,inputCheckbox:()=>Wi,inputColor:()=>Ki,inputDateTime:()=>Ui,inputFile:()=>qi,inputNumber:()=>Yi,inputOTP:()=>Gi,inputRadio:()=>Xi,inputRange:()=>Ji,inputSearch:()=>Zi,inputSwitch:()=>Qi,inputText:()=>ea,keyboard:()=>ta,label:()=>oa,link:()=>na,list:()=>ra,listItem:()=>ia,listItemButton:()=>aa,mark:()=>la,menu:()=>sa,menuItem:()=>ca,motion:()=>ua,orderedList:()=>ma,pagination:()=>ha,paragraph:()=>fa,popover:()=>pa,popoverArrow:()=>Yt,preformated:()=>ga,progress:()=>ya,rating:()=>Sa,segmented:()=>xa,segmentedItem:()=>Ca,select:()=>wa,selectBox:()=>Ea,selectItem:()=>ka,selectList:()=>Ta,skeleton:()=>_a,small:()=>Oa,spinner:()=>Pa,splitter:()=>Da,splitterHandle:()=>La,splitterPanel:()=>$a,stepItem:()=>Ra,steps:()=>za,strong:()=>Ia,subscript:()=>Ma,superscript:()=>Aa,tab:()=>Va,tabPanel:()=>Ba,table:()=>Na,tabs:()=>Ha,tag:()=>Fe,textarea:()=>ja,timeline:()=>Fa,timelineItem:()=>Wa,toast:()=>Ka,toggle:()=>Ua,toggleGroup:()=>qa,toolbar:()=>Ya,toolbarSpacer:()=>Ga,tooltip:()=>Xa,transitionGroup:()=>Ja,unorderedList:()=>Za});function Sr(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),n=f((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:r=>{r.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:r=>b(r),backgroundColor:r=>s(r),color:r=>s(r,"shift-10",t.get(r)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:r=>s(r,"shift-7",t.get(r)),textUnderlineOffset:l(.72),cursor:"help","&:hover":{color:r=>s(r,"shift-11",n.get(r)),textDecorationColor:r=>s(r,"shift-9",n.get(r))}}}}function xr(e={}){var i,r;let{type:t="single"}=e,n=f((i=e.color)!=null?i:"neutral","color"),o=f((r=e.accentColor)!=null?r:"primary","accentColor");return{_onMount:a=>{if(t!=="single")return;let c=a.domElement;if(!c)return;let u=h=>{let m=h.target.closest("summary");if(!m)return;let d=m.closest("details");!d||d.parentElement!==c||d.open||Array.from(c.querySelectorAll(":scope > details")).forEach(p=>{p!==d&&(p.open=!1)})};c.addEventListener("click",u),a.addHook("Remove",()=>c.removeEventListener("click",u))},style:{display:"flex",flexDirection:"column",borderRadius:a=>l(y(a)*1),outline:a=>`1px solid ${s(a,"shift-4",n.get(a))}`,outlineOffset:"-1px",overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${s(a,"shift-4",n.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{outline:a=>`${l(.5)} solid ${s(a,"shift-6",o.get(a))}`}}}}function Cr(e={}){var n;let t=f((n=e.color)!=null?n:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:l(3),paddingBlock:o=>l(y(o)*2),paddingInline:o=>l(y(o)*4),boxShadow:o=>`inset ${l(1)} 0 0 0 ${s(o,"shift-8",t.get(o))}`,backgroundColor:o=>s(o,"inherit",t.get(o)),color:o=>s(o,"shift-10",t.get(o)),fontSize:o=>b(o,"inherit")}}}function wr(e={}){var n;let t=f((n=e.color)!=null?n:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:l(9),height:l(9),fontSize:o=>b(o,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:o=>s(o,"inherit",t.get(o)),color:o=>s(o,"shift-11",t.get(o)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}function Er(e={}){var i;let{label:t=999}=e,n=f(t),o=f((i=e.color)!=null?i:"danger","color");return{style:{position:"relative","&::after":{content:r=>`"${n.get(r)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:l(1),minWidth:l(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:r=>b(r,"decrease-1"),borderRadius:l(999),backgroundColor:r=>s(r,"shift-9",o.get(r)),color:r=>s(r,"shift-0",o.get(r))}}}}function kr(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:o=>b(o,"inherit"),backgroundColor:o=>s(o,"inherit",t.get(o)),boxShadow:o=>`inset ${l(1)} 0 0 0 ${s(o,"shift-4",t.get(o))}`,border:"none",paddingBlock:o=>l(y(o)*2),paddingInline:o=>l(y(o)*4),margin:0}}}function Tr(e={}){var o;let{separator:t="/"}=e,n=f((o=e.color)!=null?o:"neutral","color");return{_onInsert:i=>{i.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:i=>b(i,"inherit"),gap:l(1),color:i=>s(i,"shift-9",n.get(i)),backgroundColor:i=>s(i,"inherit",n.get(i)),"& > *":{display:"inline-flex",alignItems:"center",color:i=>s(i,"shift-8",n.get(i))},"& > *:not(:last-child)::after":{content:`"${t}"`,color:i=>s(i,"shift-4",n.get(i)),paddingInlineStart:l(1)},"& > [aria-current=page]":{color:i=>s(i,"shift-10",n.get(i)),pointerEvents:"none"}}}}function _r(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:o=>b(o,"inherit"),paddingInline:l(1),border:"none",background:"none",cursor:"pointer",color:o=>s(o,"shift-8",t.get(o)),borderRadius:l(1),"&:hover":{color:o=>s(o,"shift-10",t.get(o)),backgroundColor:o=>s(o,"shift-2",t.get(o))},"&:focus-visible":{outline:o=>`${l(.5)} solid ${s(o,"shift-6",t.get(o))}`,outlineOffset:l(.5)}}}}function Or(e={}){var n;let t=f((n=e.color)!=null?n:"primary","color");return{_onInsert:o=>{o.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:o=>b(o,"inherit"),paddingBlock:o=>l(y(o)*1),paddingInline:o=>l(y(o)*3),borderRadius:o=>l(y(o)*1),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:o=>l(y(o)*1),userSelect:"none",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:o=>`1px solid ${s(o,"shift-4",t.get(o))}`,color:o=>s(o,"shift-9",t.get(o)),backgroundColor:o=>s(o,"inherit",t.get(o)),"&:hover:not([disabled]):not([aria-busy=true])":{color:o=>s(o,"shift-10",t.get(o)),backgroundColor:o=>s(o,"shift-2",t.get(o))},"&:focus-visible":{boxShadow:o=>`inset 0 0 0 ${l(.5)} ${s(o,"shift-6",t.get(o))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:o=>s(o,"shift-2","neutral"),outline:o=>`1px solid ${s(o,"shift-4","neutral")}`,color:o=>s(o,"shift-8","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}function Pr(e={}){var r,a;let{checked:t=!1}=e,n=f(t),o=f((r=e.color)!=null?r:"neutral","color"),i=f((a=e.accentColor)!=null?a:"primary","accentColor");return{_onSchedule:c=>{c.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:c=>n.get(c),dataTone:"shift-2",onClick:()=>n.set(!n.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:c=>b(c),border:"none",outlineWidth:"1px",outline:c=>`1px solid ${s(c,"shift-3",o.get(c))}`,minWidth:l(12),minHeight:l(6),borderRadius:l(999),paddingLeft:l(7),paddingRight:l(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:c=>s(c,"inherit",o.get(c)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:l(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:l(5),height:l(5),borderRadius:l(999),color:c=>s(c,"shift-9"),backgroundColor:c=>s(c,"decrease-2",o.get(c))},"&[aria-checked=true]":{backgroundColor:c=>s(c,"increase-3",i.get(c)),outline:"none",color:c=>s(c,"decrease-2"),paddingLeft:l(2),paddingRight:l(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${l(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function Dr(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:o=>l(y(o)*2),backgroundColor:o=>s(o,"inherit",t.get(o)),color:o=>s(o,"shift-10",t.get(o)),outline:o=>`1px solid ${s(o,"shift-4",t.get(o))}`,outlineOffset:"-1px",overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:o=>l(y(o)*2),paddingInline:o=>l(y(o)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:o=>l(y(o)*4),color:o=>s(o,"shift-9",t.get(o)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:o=>l(y(o)*2),height:"auto"},"& > div":{gridArea:"content",padding:o=>l(y(o)*4),color:o=>s(o,"shift-10",t.get(o))},"& > footer":{gridArea:"footer",display:"flex",gap:l(2),paddingBlock:o=>l(y(o)*2),paddingInline:o=>l(y(o)*4),borderTop:o=>`1px solid ${s(o,"shift-3",t.get(o))}`}}}}function $r(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="code"&&console.warn('"code" primitive patch must use code tag')},style:{display:"inline-flex",alignItems:"center",fontSize:o=>b(o,"inherit"),color:o=>s(o,"shift-9",t.get(o)),backgroundColor:o=>s(o,"inherit",t.get(o)),height:l(6),paddingInline:l(1.5),borderRadius:l(1)}}}var Lr=Object.defineProperty,Rr=Object.defineProperties,zr=Object.getOwnPropertyDescriptors,ot=Object.getOwnPropertySymbols,Ko=Object.prototype.hasOwnProperty,Uo=Object.prototype.propertyIsEnumerable,Io=(e,t,n)=>t in e?Lr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Y=(e,t)=>{for(var n in t||(t={}))Ko.call(t,n)&&Io(e,n,t[n]);if(ot)for(var n of ot(t))Uo.call(t,n)&&Io(e,n,t[n]);return e},ge=(e,t)=>Rr(e,zr(t)),qo=(e,t)=>{var n={};for(var o in e)Ko.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&ot)for(var o of ot(e))t.indexOf(o)<0&&Uo.call(e,o)&&(n[o]=e[o]);return n},ve=(e,t,n)=>new Promise((o,i)=>{var r=u=>{try{c(n.next(u))}catch(h){i(h)}},a=u=>{try{c(n.throw(u))}catch(h){i(h)}},c=u=>u.done?o(u.value):Promise.resolve(u.value).then(r,a);c((n=n.apply(e,t)).next())}),Ir=["top","right","bottom","left"],Mo=["start","end"],Yl=Ir.reduce((e,t)=>e.concat(t,`${t}-${Mo[0]}`,`${t}-${Mo[1]}`),[]),nt=Math.min,pe=Math.max,rt=Math.round,tt=Math.floor,Q=e=>({x:e,y:e}),Mr={left:"right",right:"left",bottom:"top",top:"bottom"};function Ao(e,t,n){return pe(e,nt(t,n))}function lt(e,t){return typeof e=="function"?e(t):e}function ye(e){return e.split("-")[0]}function st(e){return e.split("-")[1]}function Yo(e){return e==="x"?"y":"x"}function Go(e){return e==="y"?"height":"width"}function se(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Xo(e){return Yo(se(e))}function Ar(e,t,n=!1){let o=st(e),i=Xo(e),r=Go(i),a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(a=it(a)),[a,it(a)]}function Vr(e){let t=it(e);return[Nt(e),t,Nt(t)]}function Nt(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Vo=["left","right"],No=["right","left"],Nr=["top","bottom"],Br=["bottom","top"];function Hr(e,t,n){switch(e){case"top":case"bottom":return n?t?No:Vo:t?Vo:No;case"left":case"right":return t?Nr:Br;default:return[]}}function jr(e,t,n,o){let i=st(e),r=Hr(ye(e),n==="start",o);return i&&(r=r.map(a=>`${a}-${i}`),t&&(r=r.concat(r.map(Nt)))),r}function it(e){let t=ye(e);return Mr[t]+e.slice(t.length)}function Fr(e){return Y({top:0,right:0,bottom:0,left:0},e)}function Wr(e){return typeof e!="number"?Fr(e):{top:e,right:e,bottom:e,left:e}}function at(e){let{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function Bo({reference:e,floating:t},n,o){let i=se(n),r=Xo(n),a=Go(r),c=ye(n),u=i==="y",h=e.x+e.width/2-t.width/2,m=e.y+e.height/2-t.height/2,d=e[a]/2-t[a]/2,p;switch(c){case"top":p={x:h,y:e.y-t.height};break;case"bottom":p={x:h,y:e.y+e.height};break;case"right":p={x:e.x+e.width,y:m};break;case"left":p={x:e.x-t.width,y:m};break;default:p={x:e.x,y:e.y}}switch(st(n)){case"start":p[r]-=d*(o&&u?-1:1);break;case"end":p[r]+=d*(o&&u?-1:1);break;default:}return p}function Kr(e){return ve(this,arguments,function*(t,n={}){var o,i,r,a,c,u;let{x:h,y:m,platform:d,rects:p,elements:g,strategy:v}=t,{boundary:x="clippingAncestors",rootBoundary:C="viewport",elementContext:w="floating",altBoundary:E=!1,padding:O=0}=lt(n,t),T=Wr(O),D=g[E?w==="floating"?"reference":"floating":w],M=at(yield d.getClippingRect({element:(i=yield(o=d.isElement)==null?void 0:o.call(d,D))==null||i?D:D.contextElement||(yield(r=d.getDocumentElement)==null?void 0:r.call(d,g.floating)),boundary:x,rootBoundary:C,strategy:v})),R=w==="floating"?{x:h,y:m,width:p.floating.width,height:p.floating.height}:p.reference,ie=yield(a=d.getOffsetParent)==null?void 0:a.call(d,g.floating),W=(yield(c=d.isElement)==null?void 0:c.call(d,ie))?(yield(u=d.getScale)==null?void 0:u.call(d,ie))||{x:1,y:1}:{x:1,y:1},H=at(d.convertOffsetParentRelativeRectToViewportRelativeRect?yield d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:g,rect:R,offsetParent:ie,strategy:v}):R);return{top:(M.top-H.top+T.top)/W.y,bottom:(H.bottom-M.bottom+T.bottom)/W.y,left:(M.left-H.left+T.left)/W.x,right:(H.right-M.right+T.right)/W.x}})}var Ur=50,qr=(e,t,n)=>ve(null,null,function*(){var o;let{placement:i="bottom",strategy:r="absolute",middleware:a=[],platform:c}=n,u=c.detectOverflow?c:ge(Y({},c),{detectOverflow:Kr}),h=yield(o=c.isRTL)==null?void 0:o.call(c,t),m=yield c.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:p}=Bo(m,i,h),g=i,v=0,x={};for(let C=0;C<a.length;C++){let w=a[C];if(!w)continue;let{name:E,fn:O}=w,{x:T,y:D,data:M,reset:R}=yield O({x:d,y:p,initialPlacement:i,placement:g,strategy:r,middlewareData:x,rects:m,platform:u,elements:{reference:e,floating:t}});d=T!=null?T:d,p=D!=null?D:p,x[E]=Y(Y({},x[E]),M),R&&v<Ur&&(v++,typeof R=="object"&&(R.placement&&(g=R.placement),R.rects&&(m=R.rects===!0?yield c.getElementRects({reference:e,floating:t,strategy:r}):R.rects),{x:d,y:p}=Bo(m,g,h)),C=-1)}return{x:d,y:p,placement:g,strategy:r,middlewareData:x}});var Yr=(e={})=>({name:"flip",options:e,fn(t){return ve(this,null,function*(){var n,o,i,r,a,c;let{placement:u,middlewareData:h,rects:m,initialPlacement:d,platform:p,elements:g}=t,v=lt(e,t),{mainAxis:x=!0,crossAxis:C=!0,fallbackPlacements:w,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:O="none",flipAlignment:T=!0}=v,D=qo(v,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((n=h.arrow)!=null&&n.alignmentOffset)return{};let M=ye(u),R=se(d),ie=ye(d)===d,W=yield(o=p.isRTL)==null?void 0:o.call(p,g.floating),H=w||(ie||!T?[it(d)]:Vr(d)),Ue=O!=="none";!w&&Ue&&H.push(...jr(d,T,O,W));let ft=[d,...H],xe=yield p.detectOverflow(t,D),j=[],oe=((i=h.flip)==null?void 0:i.overflows)||[];if(x&&j.push(xe[M]),C){let ne=Ar(u,m,W);j.push(xe[ne[0]],xe[ne[1]])}if(oe=[...oe,{placement:u,overflows:j}],!j.every(ne=>ne<=0)){let ne=(((r=h.flip)==null?void 0:r.index)||0)+1,Le=ft[ne];if(Le&&(!(C==="alignment"&&R!==se(Le))||oe.every(V=>se(V.placement)===R?V.overflows[0]>0:!0)))return{data:{index:ne,overflows:oe},reset:{placement:Le}};let ue=(a=oe.filter(V=>V.overflows[0]<=0).sort((V,U)=>V.overflows[1]-U.overflows[1])[0])==null?void 0:a.placement;if(!ue)switch(E){case"bestFit":{let V=(c=oe.filter(U=>{if(Ue){let q=se(U.placement);return q===R||q==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(q=>q>0).reduce((q,Re)=>q+Re,0)]).sort((U,q)=>U[1]-q[1])[0])==null?void 0:c[0];V&&(ue=V);break}case"initialPlacement":ue=d;break;default:}if(u!==ue)return{reset:{placement:ue}}}return{}})}});var Gr=new Set(["left","top"]);function Xr(e,t){return ve(this,null,function*(){var n;let{placement:o,platform:i,elements:r}=e,a=yield(n=i.isRTL)==null?void 0:n.call(i,r.floating),c=ye(o),u=st(o),h=se(o)==="y",m=Gr.has(c)?-1:1,d=a&&h?-1:1,p=lt(t,e),{mainAxis:g,crossAxis:v,alignmentAxis:x}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof x=="number"&&(v=u==="end"?x*-1:x),h?{x:v*d,y:g*m}:{x:g*m,y:v*d}})}var Jr=(e=0)=>({name:"offset",options:e,fn(t){return ve(this,null,function*(){var n,o;let{x:i,y:r,placement:a,middlewareData:c}=t,u=yield Xr(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+u.x,y:r+u.y,data:ge(Y({},u),{placement:a})}})}}),Zr=(e={})=>({name:"shift",options:e,fn(t){return ve(this,null,function*(){let{x:n,y:o,placement:i,platform:r}=t,a=lt(e,t),{mainAxis:c=!0,crossAxis:u=!1,limiter:h={fn:({x:E,y:O})=>({x:E,y:O})}}=a,m=qo(a,["mainAxis","crossAxis","limiter"]),d={x:n,y:o},p=yield r.detectOverflow(t,m),g=se(ye(i)),v=Yo(g),x=d[v],C=d[g];if(c){let E=v==="y"?"top":"left",O=v==="y"?"bottom":"right",T=x+p[E],D=x-p[O];x=Ao(T,x,D)}if(u){let E=g==="y"?"top":"left",O=g==="y"?"bottom":"right",T=C+p[E],D=C-p[O];C=Ao(T,C,D)}let w=h.fn(ge(Y({},t),{[v]:x,[g]:C}));return ge(Y({},w),{data:{x:w.x-n,y:w.y-o,enabled:{[v]:c,[g]:u}}})})}});function ct(){return typeof window!="undefined"}function De(e){return Jo(e)?(e.nodeName||"").toLowerCase():"#document"}function F(e){var t;return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)||window}function ee(e){var t;return(t=(Jo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Jo(e){return ct()?e instanceof Node||e instanceof F(e).Node:!1}function G(e){return ct()?e instanceof Element||e instanceof F(e).Element:!1}function re(e){return ct()?e instanceof HTMLElement||e instanceof F(e).HTMLElement:!1}function Ho(e){return!ct()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof F(e).ShadowRoot}function je(e){let{overflow:t,overflowX:n,overflowY:o,display:i}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&i!=="inline"&&i!=="contents"}function Qr(e){return/^(table|td|th)$/.test(De(e))}function ut(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}var ei=/transform|translate|scale|rotate|perspective|filter/,ti=/paint|layout|strict|content/,fe=e=>!!e&&e!=="none",At;function Ht(e){let t=G(e)?X(e):e;return fe(t.transform)||fe(t.translate)||fe(t.scale)||fe(t.rotate)||fe(t.perspective)||!jt()&&(fe(t.backdropFilter)||fe(t.filter))||ei.test(t.willChange||"")||ti.test(t.contain||"")}function oi(e){let t=ce(e);for(;re(t)&&!Pe(t);){if(Ht(t))return t;if(ut(t))return null;t=ce(t)}return null}function jt(){return At==null&&(At=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),At}function Pe(e){return/^(html|body|#document)$/.test(De(e))}function X(e){return F(e).getComputedStyle(e)}function mt(e){return G(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ce(e){if(De(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ho(e)&&e.host||ee(e);return Ho(t)?t.host:t}function Zo(e){let t=ce(e);return Pe(t)?e.ownerDocument?e.ownerDocument.body:e.body:re(t)&&je(t)?t:Zo(t)}function He(e,t=[],n=!0){var o;let i=Zo(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),a=F(i);if(r){let c=Bt(a);return t.concat(a,a.visualViewport||[],je(i)?i:[],c&&n?He(c):[])}else return t.concat(i,He(i,[],n))}function Bt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Qo(e){let t=X(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,i=re(e),r=i?e.offsetWidth:n,a=i?e.offsetHeight:o,c=rt(n)!==r||rt(o)!==a;return c&&(n=r,o=a),{width:n,height:o,$:c}}function Ft(e){return G(e)?e:e.contextElement}function Oe(e){let t=Ft(e);if(!re(t))return Q(1);let n=t.getBoundingClientRect(),{width:o,height:i,$:r}=Qo(t),a=(r?rt(n.width):n.width)/o,c=(r?rt(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}var ni=Q(0);function en(e){let t=F(e);return!jt()||!t.visualViewport?ni:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ri(e,t=!1,n){return!n||t&&n!==F(e)?!1:t}function be(e,t=!1,n=!1,o){let i=e.getBoundingClientRect(),r=Ft(e),a=Q(1);t&&(o?G(o)&&(a=Oe(o)):a=Oe(e));let c=ri(r,n,o)?en(r):Q(0),u=(i.left+c.x)/a.x,h=(i.top+c.y)/a.y,m=i.width/a.x,d=i.height/a.y;if(r){let p=F(r),g=o&&G(o)?F(o):o,v=p,x=Bt(v);for(;x&&o&&g!==v;){let C=Oe(x),w=x.getBoundingClientRect(),E=X(x),O=w.left+(x.clientLeft+parseFloat(E.paddingLeft))*C.x,T=w.top+(x.clientTop+parseFloat(E.paddingTop))*C.y;u*=C.x,h*=C.y,m*=C.x,d*=C.y,u+=O,h+=T,v=F(x),x=Bt(v)}}return at({width:m,height:d,x:u,y:h})}function dt(e,t){let n=mt(e).scrollLeft;return t?t.left+n:be(ee(e)).left+n}function tn(e,t){let n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-dt(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function ii({elements:e,rect:t,offsetParent:n,strategy:o}){let i=o==="fixed",r=ee(n),a=e?ut(e.floating):!1;if(n===r||a&&i)return t;let c={scrollLeft:0,scrollTop:0},u=Q(1),h=Q(0),m=re(n);if((m||!m&&!i)&&((De(n)!=="body"||je(r))&&(c=mt(n)),m)){let p=be(n);u=Oe(n),h.x=p.x+n.clientLeft,h.y=p.y+n.clientTop}let d=r&&!m&&!i?tn(r,c):Q(0);return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-c.scrollLeft*u.x+h.x+d.x,y:t.y*u.y-c.scrollTop*u.y+h.y+d.y}}function ai(e){return Array.from(e.getClientRects())}function li(e){let t=ee(e),n=mt(e),o=e.ownerDocument.body,i=pe(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=pe(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),a=-n.scrollLeft+dt(e),c=-n.scrollTop;return X(o).direction==="rtl"&&(a+=pe(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:a,y:c}}var jo=25;function si(e,t){let n=F(e),o=ee(e),i=n.visualViewport,r=o.clientWidth,a=o.clientHeight,c=0,u=0;if(i){r=i.width,a=i.height;let m=jt();(!m||m&&t==="fixed")&&(c=i.offsetLeft,u=i.offsetTop)}let h=dt(o);if(h<=0){let m=o.ownerDocument,d=m.body,p=getComputedStyle(d),g=m.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(o.clientWidth-d.clientWidth-g);v<=jo&&(r-=v)}else h<=jo&&(r+=h);return{width:r,height:a,x:c,y:u}}function ci(e,t){let n=be(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=re(e)?Oe(e):Q(1),a=e.clientWidth*r.x,c=e.clientHeight*r.y,u=i*r.x,h=o*r.y;return{width:a,height:c,x:u,y:h}}function Fo(e,t,n){let o;if(t==="viewport")o=si(e,n);else if(t==="document")o=li(ee(e));else if(G(t))o=ci(t,n);else{let i=en(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return at(o)}function on(e,t){let n=ce(e);return n===t||!G(n)||Pe(n)?!1:X(n).position==="fixed"||on(n,t)}function ui(e,t){let n=t.get(e);if(n)return n;let o=He(e,[],!1).filter(c=>G(c)&&De(c)!=="body"),i=null,r=X(e).position==="fixed",a=r?ce(e):e;for(;G(a)&&!Pe(a);){let c=X(a),u=Ht(a);!u&&c.position==="fixed"&&(i=null),(r?!u&&!i:!u&&c.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||je(a)&&!u&&on(e,a))?o=o.filter(h=>h!==a):i=c,a=ce(a)}return t.set(e,o),o}function mi({element:e,boundary:t,rootBoundary:n,strategy:o}){let i=[...t==="clippingAncestors"?ut(e)?[]:ui(e,this._c):[].concat(t),n],r=Fo(e,i[0],o),a=r.top,c=r.right,u=r.bottom,h=r.left;for(let m=1;m<i.length;m++){let d=Fo(e,i[m],o);a=pe(d.top,a),c=nt(d.right,c),u=nt(d.bottom,u),h=pe(d.left,h)}return{width:c-h,height:u-a,x:h,y:a}}function di(e){let{width:t,height:n}=Qo(e);return{width:t,height:n}}function hi(e,t,n){let o=re(t),i=ee(t),r=n==="fixed",a=be(e,!0,r,t),c={scrollLeft:0,scrollTop:0},u=Q(0);function h(){u.x=dt(i)}if(o||!o&&!r)if((De(t)!=="body"||je(i))&&(c=mt(t)),o){let g=be(t,!0,r,t);u.x=g.x+t.clientLeft,u.y=g.y+t.clientTop}else i&&h();r&&!o&&i&&h();let m=i&&!o&&!r?tn(i,c):Q(0),d=a.left+c.scrollLeft-u.x-m.x,p=a.top+c.scrollTop-u.y-m.y;return{x:d,y:p,width:a.width,height:a.height}}function Vt(e){return X(e).position==="static"}function Wo(e,t){if(!re(e)||X(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ee(e)===n&&(n=n.ownerDocument.body),n}function nn(e,t){let n=F(e);if(ut(e))return n;if(!re(e)){let i=ce(e);for(;i&&!Pe(i);){if(G(i)&&!Vt(i))return i;i=ce(i)}return n}let o=Wo(e,t);for(;o&&Qr(o)&&Vt(o);)o=Wo(o,t);return o&&Pe(o)&&Vt(o)&&!Ht(o)?n:o||oi(e)||n}var fi=function(e){return ve(this,null,function*(){let t=this.getOffsetParent||nn,n=this.getDimensions,o=yield n(e.floating);return{reference:hi(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}})};function pi(e){return X(e).direction==="rtl"}var gi={convertOffsetParentRelativeRectToViewportRelativeRect:ii,getDocumentElement:ee,getClippingRect:mi,getOffsetParent:nn,getElementRects:fi,getClientRects:ai,getDimensions:di,getScale:Oe,isElement:G,isRTL:pi};function rn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function yi(e,t){let n=null,o,i=ee(e);function r(){clearTimeout(o),n==null||n.disconnect(),n=null}function a(c=!1,u=1){r();let h=e.getBoundingClientRect(),{left:m,top:d,width:p,height:g}=h;if(c||t(),!p||!g)return;let v=tt(d),x=tt(i.clientWidth-(m+p)),C=tt(i.clientHeight-(d+g)),w=tt(m),E={rootMargin:`${-v}px ${-x}px ${-C}px ${-w}px`,threshold:pe(0,nt(1,u))||1},O=!0;function T(D){let M=D[0].intersectionRatio;if(M!==u){if(!O)return a();M?a(!1,M):o=setTimeout(()=>{a(!1,1e-7)},1e3)}M===1&&!rn(h,e.getBoundingClientRect())&&a(),O=!1}try{n=new IntersectionObserver(T,ge(Y({},E),{root:i.ownerDocument}))}catch(D){n=new IntersectionObserver(T,E)}n.observe(e)}return a(!0),r}function an(e,t,n,o={}){let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,h=Ft(e),m=i||r?[...h?He(h):[],...t?He(t):[]]:[];m.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});let d=h&&c?yi(h,n):null,p=-1,g=null;a&&(g=new ResizeObserver(([w])=>{w&&w.target===h&&g&&t&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{g==null||g.observe(t)})),n()}),h&&!u&&g.observe(h),t&&g.observe(t));let v,x=u?be(e):null;u&&C();function C(){let w=be(e);x&&!rn(x,w)&&n(),x=w,v=requestAnimationFrame(C)}return n(),()=>{m.forEach(w=>{i&&w.removeEventListener("scroll",n),r&&w.removeEventListener("resize",n)}),d==null||d(),g==null||g.disconnect(),g=null,u&&cancelAnimationFrame(v)}}var ln=Jr;var sn=Zr,cn=Yr;var un=(e,t,n)=>{let o=new Map,i=Y({platform:gi},n),r=ge(Y({},i.platform),{_c:o});return qr(e,t,ge(Y({},i),{platform:r}))};function te(e){let{open:t=!1,placement:n}=e,o=null,i=null,r=null,a=null,c=null,u=null,h=!1,m=f(t),d=()=>{h||!u||(h=!0,c=u.children.insert(e.content))},p=()=>{d(),r&&a&&(i&&i(),i=an(r,a,()=>{un(r,a,{placement:n.get(),middleware:[ln(12),cn(),sn()],strategy:"fixed"}).then(({x:E,y:O,placement:T})=>{Object.assign(a.style,{left:`${E}px`,top:`${O}px`}),n.set(T)})}),m.set(!0))},g=()=>{i&&i(),i=null,m.set(!1)},v=()=>{o&&clearTimeout(o),o=setTimeout(p,100)},x=()=>{o&&clearTimeout(o),o=setTimeout(g,100)},C={style:{position:"fixed",pointerEvents:"auto",visibility:E=>m.get(E)?"visible":"hidden"},_onMount:E=>a=E.domElement,_portal:E=>{let O=E.domElement.querySelector("#domphy-floating");if(!O){let T={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};O=E.children.insert(T).domElement}return O}};return $(e.content,C),{show:v,hide:x,anchorPartial:{onKeyDown:E=>E.key==="Escape"&&x(),_onMount:E=>{u=E.getRoot(),r=E.domElement;let O=T=>{if(!m.get()||!r||!a)return;let D=T.target;!r.contains(D)&&!a.contains(D)&&x()};E.getRoot().domElement.addEventListener("click",O),E.addHook("BeforeRemove",()=>{o&&clearTimeout(o),i&&(i(),i=null),c&&c.remove(),E.getRoot().domElement.removeEventListener("click",O)})}}}}var bi='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6.707 5.293l5.293 5.292l5.293 -5.292a1 1 0 0 1 1.414 1.414l-5.292 5.293l5.292 5.293a1 1 0 0 1 -1.414 1.414l-5.293 -5.292l-5.293 5.292a1 1 0 1 1 -1.414 -1.414l5.292 -5.293l-5.292 -5.293a1 1 0 0 1 1.414 -1.414" /></svg>';function Fe(e={}){var o;let{removable:t=!1}=e,n=f((o=e.color)!=null?o:"neutral","color");return{dataTone:"shift-2",_onInit:i=>{let r={span:bi,onClick:a=>{a.stopPropagation(),i.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:l(1),width:l(4),height:l(4),flexShrink:0,"&:hover":{backgroundColor:a=>s(a,"shift-4",n.get(a))}}};t&&i.children.insert(r)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:l(6),paddingBlock:"0px",borderRadius:l(1),paddingInlineStart:l(2),paddingInlineEnd:t?l(1):l(2),gap:l(2),fontSize:i=>b(i,"inherit"),backgroundColor:i=>s(i,"inherit",n.get(i)),color:i=>s(i,"shift-9",n.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${s(i,"shift-4",n.get(i))}`}}}function vi(e){let{options:t=[],placement:n="bottom",color:o="neutral",open:i=!1,multiple:r=!1}=e,a=f(e.value),c=f(i),{show:u,hide:h,anchorPartial:m}=te({open:c,placement:f(n),content:e.content}),d={onClick:()=>!r&&h()};$(e.content,d);let p={border:"none",outline:"none",padding:0,margin:0,flex:1,height:l(6),marginInlineStart:l(2),fontSize:C=>b(C,"inherit"),color:C=>s(C,"shift-9",o),backgroundColor:C=>s(C,"inherit",o)},g;e.input?($(e.input,{onFocus:()=>u(),style:p,_key:"combobox-input"}),g=e.input):g={input:null,onFocus:()=>u(),value:C=>(a.get(C),""),style:p,_key:"combobox-input"};let v={div:C=>{let w=a.get(C),E=Array.isArray(w)?w:[w],T=t.filter(D=>E.includes(D.value)).map(D=>({span:D.label,$:[Fe({color:o,removable:!0})],_key:D.value,_onRemove:M=>{let R=a.get(),W=(Array.isArray(R)?R:[R]).filter(H=>H!==D.value);r?a.set(W):a.set(W[0])}}));return T.push(g),T},style:{display:"flex",flexWrap:"wrap",gap:l(1)}},x={_onInsert:C=>{C.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:C=>C.children.insert(v),style:{minWidth:l(32),outlineOffset:"-1px",outline:C=>`1px solid ${s(C,"shift-4","neutral")}`,paddingBlock:C=>l(y(C)*1),paddingInline:C=>l(y(C)*1),borderRadius:C=>l(y(C)*1),fontSize:C=>b(C,"inherit"),color:C=>s(C,"shift-9",o),backgroundColor:C=>s(C,"inherit",o)}};return $(m,x),m}function Si(){return{_onSchedule:(e,t)=>{$(t,{_context:{command:{query:f("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function xi(e={}){let{color:t="neutral",accentColor:n="primary"}=e;return{_onInsert:o=>{o.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:o=>{let i=o.getContext("command");if(!i){console.warn('"commandSearch" patch must be used inside a "command"');return}let r=o.domElement,a=()=>i.query.set(r.value);r.addEventListener("input",a),o.addHook("Remove",()=>r.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:o=>b(o,"inherit"),paddingInline:o=>l(y(o)*3),paddingBlock:o=>l(y(o)*2),border:"none",borderBottom:o=>`1px solid ${s(o,"shift-3",t)}`,outline:"none",color:o=>s(o,"shift-10",t),backgroundColor:o=>s(o,"inherit",t),"&::placeholder":{color:o=>s(o,"shift-7")},"&:focus-visible":{borderBottomColor:o=>s(o,"shift-6",n)}}}}function Ci(e={}){let{color:t="neutral",accentColor:n="primary"}=e;return{role:"option",_onMount:o=>{var h,m;let i=o.getContext("command");if(!i){console.warn('"commandItem" patch must be used inside a "command"');return}let r=o.domElement,a=(m=(h=r.textContent)==null?void 0:h.toLowerCase())!=null?m:"",c=d=>{r.hidden=d.length>0&&!a.includes(d.toLowerCase())};c(i.query.get());let u=i.query.addListener(c);o.addHook("Remove",u)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:o=>b(o,"inherit"),height:o=>l(6+y(o)*2),paddingInline:o=>l(y(o)*3),border:"none",outline:"none",color:o=>s(o,"shift-9",t),backgroundColor:o=>s(o,"inherit",t),"&:hover:not([disabled])":{backgroundColor:o=>s(o,"shift-2",t)},"&:focus-visible":{outline:o=>`${l(.5)} solid ${s(o,"shift-6",n)}`,outlineOffset:`-${l(.5)}`}}}}var A=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),Se=(e,t)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),Wt=(e,t)=>new Date(e.getFullYear(),e.getMonth()+t,e.getDate()),We=(e,t)=>!!e&&!!t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),Kt=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`,Ut=(e,t)=>Se(e,-((e.getDay()-t+7)%7));function wi(e){var t,n;try{let o=new Intl.Locale(e),i=(n=(t=o.getWeekInfo)==null?void 0:t.call(o))!=null?n:o.weekInfo;if(i!=null&&i.firstDay)return i.firstDay%7}catch(o){}return 0}function Ei(e={}){var Gt,Xt,Jt,Zt;let{mode:t="single",time:n=!1,min:o,max:i,disabledDate:r,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:c,onChange:u}=e,h=(Gt=e.weekStartsOn)!=null?Gt:wi(a),m=f((Xt=e.accentColor)!=null?Xt:"primary","accentColor"),d=f((Jt=e.placement)!=null?Jt:"bottom-start"),p=f((Zt=e.value)!=null?Zt:t==="range"?[null,null]:null),g=u?p.addListener(S=>u(S)):null,v=(()=>{let S=p.get(),k=t==="range"?S==null?void 0:S[0]:S;return k instanceof Date?k:new Date})(),x=f(v.getFullYear(),"viewYear"),C=f(v.getMonth(),"viewMonth"),w=f(A(v),"focused"),E=f(null,"hovered"),O=f(v.getHours(),"hour"),T=f(v.getMinutes(),"minute"),D=null,M=new Intl.DateTimeFormat(a,we({dateStyle:"medium"},n?{timeStyle:"short"}:{})),R=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),ie=new Intl.DateTimeFormat(a,{weekday:"short"}),W=new Intl.DateTimeFormat(a,{dateStyle:"full"}),H=S=>S?M.format(S):"",Ue=S=>{if(c)return c(S);if(t==="range"){let[k,_]=S!=null?S:[null,null];return k?`${H(k)} \u2013 ${H(_)}`:""}return H(S)},ft=Array.from({length:7},(S,k)=>ie.format(new Date(2023,0,1+(k+h)%7))),xe=S=>!!o&&A(S)<A(o)||!!i&&A(S)>A(i)||!!r&&r(S),j=S=>{if(!n)return A(S);let k=A(S);return k.setHours(O.get(),T.get(),0,0),k},oe=S=>{var P;if(xe(S))return;if(t==="single"){p.set(j(S)),n||gt();return}let[k,_]=(P=p.get())!=null?P:[null,null];!k||k&&_?p.set([j(S),null]):A(S)<A(k)?(p.set([j(S),j(k)]),n||gt()):(p.set([k,j(S)]),n||gt())},ne=()=>{var S;if(n)if(t==="single"){let k=p.get();k&&p.set(j(k))}else{let[k,_]=(S=p.get())!=null?S:[null,null];p.set([k&&j(k),_&&j(_)])}},Le=(S,k)=>{var Ce;if(t!=="range")return!1;let[_,P]=(Ce=p.get(k))!=null?Ce:[null,null],z=P!=null?P:E.get(k);if(!_||!z)return!1;let L=A(_)<=A(z)?_:z,K=A(_)<=A(z)?z:_,N=A(S);return N>=A(L)&&N<=A(K)},ue=(S,k)=>{let _=p.get(k);if(t==="range"){let[P,z]=_!=null?_:[null,null];return We(S,P)||We(S,z)}return We(S,_)},V=S=>{x.set(S.getFullYear()),C.set(S.getMonth())},U=S=>{let k=Wt(new Date(x.get(),C.get(),1),S);V(k)},q=S=>x.set(x.get()+S),Re=()=>{setTimeout(()=>{var S;(S=D==null?void 0:D.querySelector(`[data-date="${Kt(w.get())}"]`))==null||S.focus()},0)},vn=En(),{show:Sn,hide:xn,anchorPartial:pt}=te({open:!1,placement:d,content:vn});function gt(){xn()}pt.onClick=()=>{};let Cn={type:"text",readonly:!0,value:S=>Ue(p.get(S)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:()=>{yt()},onFocus:()=>{yt()},onKeyDown:S=>{let k=S.key;(k==="ArrowDown"||k==="Enter")&&(S.preventDefault(),yt())},_onMount:S=>g&&S.addHook("Remove",()=>{g()})};function yt(){var k;let S=(k=wn())!=null?k:new Date;w.set(A(S)),V(S),Sn(),Re()}function wn(){var k;let S=p.get();return t==="range"?(k=S==null?void 0:S[0])!=null?k:null:S!=null?S:null}return $(pt,Cn),pt;function En(){let S=(L,K,N)=>({button:L,type:"button",ariaLabel:K,onClick:N,style:ki()}),k={div:[S("\xAB","Previous year",()=>q(-1)),S("\u2039","Previous month",()=>U(-1)),{div:L=>R.format(new Date(x.get(L),C.get(L),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"600",fontSize:L=>b(L)}},S("\u203A","Next month",()=>U(1)),S("\xBB","Next year",()=>q(1))],style:{display:"flex",alignItems:"center",gap:l(1),marginBottom:l(2)}},_={div:ft.map((L,K)=>({div:L,style:{textAlign:"center",fontSize:N=>b(N,"decrease-1"),fontWeight:"600",color:N=>s(N,"shift-7"),paddingBlock:l(1)},_key:K})),role:"row",style:mn()},P={div:L=>kn(L),role:"grid",ariaLabel:"Calendar",onKeyDown:Pn,onMouseLeave:()=>t==="range"&&E.set(null),style:{display:"flex",flexDirection:"column",gap:l(.5)}},z=[k,_,P];return n&&z.push(_n()),z.push(On()),{div:z,role:"dialog",ariaModal:"false",_onMount:L=>{D=L.domElement},style:{minWidth:l(70),padding:l(3),borderRadius:l(2),backgroundColor:L=>s(L,"base"),color:L=>s(L,"shift-10"),border:L=>`1px solid ${s(L,"shift-4")}`,boxShadow:"0 8px 24px rgba(0,0,0,0.18)"}}}function kn(S){let k=new Date(x.get(S),C.get(S),1),_=C.get(S),P=Ut(k,h),z=[];for(let L=0;L<6;L++){let K=[];for(let N=0;N<7;N++){let Ce=Se(P,L*7+N);K.push(Tn(Ce,_,S))}z.push({div:K,role:"row",style:mn(),_key:L})}return z}function Tn(S,k,_){let P=xe(S),z=ue(S,_),L=Le(S,_),K=S.getMonth()!==k,N=We(S,w.get(_)),Ce=We(S,new Date);return{button:String(S.getDate()),type:"button",role:"gridcell",tabIndex:N?0:-1,ariaSelected:z,ariaDisabled:P,disabled:P,ariaLabel:W.format(S),dataDate:Kt(S),onClick:()=>oe(S),onMouseEnter:()=>t==="range"&&E.set(S),style:{appearance:"none",border:"none",cursor:P?"not-allowed":"pointer",aspectRatio:"1",borderRadius:l(1),fontSize:I=>b(I),fontFamily:"inherit",opacity:P?.35:K?.5:1,backgroundColor:I=>z?s(I,"shift-7",m.get(I)):L?s(I,"shift-2",m.get(I)):"transparent",color:I=>z?s(I,"shift-0",m.get(I)):s(I,"shift-9"),outline:Ce?I=>`1px solid ${s(I,"shift-6",m.get(I))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:I=>z?s(I,"shift-7",m.get(I)):s(I,"shift-3",m.get(I))},"&:focus-visible":{outline:I=>`2px solid ${s(I,"shift-6",m.get(I))}`}},_key:Kt(S)}}function _n(){let S=(k,_,P)=>({select:Array.from({length:k},(z,L)=>({option:String(L).padStart(2,"0"),value:String(L),selected:K=>_.get(K)===L,_key:L})),ariaLabel:P,onChange:z=>{_.set(Number(z.target.value)),ne()},style:Ti()});return{div:[S(24,O,"Hour"),{span:":",style:{fontWeight:"600"}},S(60,T,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:l(1),marginTop:l(3)}}}function On(){let S=(k,_)=>({button:k,type:"button",onClick:_,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:P=>b(P,"decrease-1"),color:P=>s(P,"shift-8",m.get(P)),padding:l(1)}});return{div:[S("Today",()=>{let k=new Date;w.set(A(k)),V(k),Re()}),S("Clear",()=>{p.set(t==="range"?[null,null]:null),E.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:l(2),paddingTop:l(2),borderTop:k=>`1px solid ${s(k,"shift-3")}`}}}function Pn(S){let k=S,_=w.get(),P=null;switch(k.key){case"ArrowLeft":P=Se(_,-1);break;case"ArrowRight":P=Se(_,1);break;case"ArrowUp":P=Se(_,-7);break;case"ArrowDown":P=Se(_,7);break;case"Home":P=Ut(_,h);break;case"End":P=Se(Ut(_,h),6);break;case"PageUp":P=Wt(_,k.shiftKey?-12:-1);break;case"PageDown":P=Wt(_,k.shiftKey?12:1);break;case"Enter":case" ":k.preventDefault(),oe(_);return;default:return}k.preventDefault(),w.set(P),V(P),Re()}}function mn(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:l(.5)}}function ki(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:e=>b(e),color:e=>s(e,"shift-8"),width:l(7),height:l(7),borderRadius:l(1),"&:hover":{backgroundColor:e=>s(e,"shift-3")}}}function Ti(){return{fontFamily:"inherit",fontSize:e=>b(e),padding:l(1),borderRadius:l(1),border:e=>`1px solid ${s(e,"shift-4")}`,backgroundColor:e=>s(e,"base"),color:e=>s(e,"shift-9")}}function _i(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${l(24)}, max-content) 1fr`,columnGap:l(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:o=>b(o,"inherit"),color:o=>s(o,"shift-10",t.get(o))},"& dd":{margin:0,fontSize:o=>b(o,"inherit"),color:o=>s(o,"shift-9",t.get(o))}}}}function Oi(e={}){var i,r;let{duration:t=240}=e,n=f((i=e.color)!=null?i:"neutral","color"),o=f((r=e.accentColor)!=null?r:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:a=>b(a,"inherit"),color:a=>s(a,"shift-9",n.get(a)),backgroundColor:a=>s(a,"inherit",n.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>s(a,"shift-2",n.get(a)),color:a=>s(a,"shift-10",n.get(a)),fontSize:a=>b(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:l(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>l(y(a)*4),height:l(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:l(2),height:l(2),flexShrink:0,marginTop:`-${l(.5)}`,borderInlineEnd:a=>`${l(.5)} solid ${s(a,"shift-9",n.get(a))}`,borderBottom:a=>`${l(.5)} solid ${s(a,"shift-9",n.get(a))}`,transform:"rotate(45deg)",transition:`transform ${t}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>s(a,"shift-3",n.get(a))},"& > summary:focus-visible":{borderRadius:a=>l(y(a)*2),outlineOffset:`-${l(.5)}`,outline:a=>`${l(.5)} solid ${s(a,"shift-6",o.get(a))}`},"& > :not(summary)":{maxHeight:"0px",opacity:0,overflow:"hidden",paddingInline:a=>l(y(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${t}ms ease, opacity ${t}ms ease, padding ${t}ms ease`},"&[open] > :not(summary)":{maxHeight:l(250),opacity:1,paddingTop:a=>l(y(a)*1),paddingBottom:a=>l(y(a)*3)}}}}var dn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function Pi(e={}){let{color:t="neutral",open:n=!1}=e,o=f(n),i=null,r=!1;return{_onInsert:a=>{a.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(a,c)=>{if(a.target!==c.domElement)return;let u=c.domElement.getBoundingClientRect();a.clientX>=u.left&&a.clientX<=u.right&&a.clientY>=u.top&&a.clientY<=u.bottom||o.set(!1)},onTransitionEnd:(a,c)=>{if(!r)return;r=!1,c.domElement.close(),document.body.style.overflow="",i==null||i.focus(),i=null},_onMount:a=>{let c=a.domElement;c.setAttribute("aria-modal","true");let u=p=>{if(p.key!=="Tab")return;let g=Array.from(c.querySelectorAll(dn)).filter(C=>!C.closest("[aria-hidden='true']")&&C.offsetParent!==null);if(!g.length){p.preventDefault();return}let v=g[0],x=g[g.length-1];p.shiftKey?(document.activeElement===v||document.activeElement===c)&&(p.preventDefault(),x.focus()):document.activeElement===x&&(p.preventDefault(),v.focus())},h=p=>{p.preventDefault(),o.set(!1)};c.addEventListener("cancel",h);let m=p=>{p?(i=document.activeElement,c.showModal(),document.body.style.overflow="hidden",c.addEventListener("keydown",u),requestAnimationFrame(()=>{c.style.opacity="1";let g=c.querySelector(dn);g==null||g.focus()})):(r=!0,c.style.opacity="0",c.removeEventListener("keydown",u),setTimeout(()=>{r&&(r=!1,c.close(),document.body.style.overflow="",i==null||i.focus(),i=null)},350))};m(o.get());let d=o.addListener(m);a.addHook("Remove",()=>{d(),c.removeEventListener("cancel",h),document.body.style.overflow="",c.removeEventListener("keydown",u),i==null||i.focus(),i=null})},style:{opacity:"0",transition:"opacity 200ms ease",fontSize:a=>b(a,"inherit"),color:a=>s(a,"shift-10",t),backgroundColor:a=>s(a,"inherit",t),border:"none",padding:a=>l(y(a)*3),boxShadow:a=>`0 ${l(9)} ${l(16)} ${s(a,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:a=>s(a,"shift-2","neutral"),opacity:.75}}}}function Di(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{role:"separator",_onInsert:o=>{o.tagName!=="div"&&console.warn('"divider" patch should be used with <div>')},style:{display:"flex",justifyContent:"center",alignItems:"baseline",gap:l(2),fontSize:o=>b(o,"inherit"),backgroundColor:o=>s(o),color:o=>s(o,"shift-9",t.get(o)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:o=>s(o,"shift-4",t.get(o)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:o=>s(o,"shift-4",t.get(o)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var qt={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},hn={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},Ke=e=>e==="left"||e==="right";function fn(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function $i(e={}){let{color:t="neutral",open:n=!1,placement:o="end",size:i}=e,r=f(n),a=o==="start"||o==="end",c=fn(o,!1),u=Ke(c)?l(80):l(64),h=i!=null?i:u;return{_onInsert:m=>{m.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(m,d)=>{m.target===d.domElement&&r.set(!1)},_onMount:m=>{let d=m.domElement;d.setAttribute("aria-modal","true");let p=T=>{T.preventDefault(),r.set(!1)};d.addEventListener("cancel",p);let g=a&&(d.ownerDocument.documentElement.dir==="rtl"||d.ownerDocument.dir==="rtl"),v=fn(o,g);a&&(d.style.transform=qt[v],d.style.margin=hn[v],d.style.width=Ke(v)?h:"100dvw",d.style.height=Ke(v)?"100dvh":h);let x=!1,C=()=>{x&&(x=!1,d.close(),document.body.style.overflow="")},w=T=>{T.target===d&&T.propertyName==="transform"&&C()};d.addEventListener("transitionend",w);let E=T=>{T?(x=!1,d.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{d.style.transform="translate(0, 0)"})):(x=!0,d.style.transform=qt[v],setTimeout(C,350))};E(r.get());let O=r.addListener(E);m.addHook("Remove",()=>{O(),d.removeEventListener("cancel",p),d.removeEventListener("transitionend",w),document.body.style.overflow=""})},style:{transform:qt[c],transition:"transform 0.25s ease",fontSize:m=>b(m,"inherit"),color:m=>s(m,"shift-10",t),backgroundColor:m=>s(m,"inherit",t),border:"none",padding:m=>l(y(m)*3),margin:hn[c],width:Ke(c)?h:"100dvw",height:Ke(c)?"100dvh":h,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:m=>`0 ${l(4)} ${l(12)} ${s(m,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:m=>s(m,"shift-2","neutral"),opacity:.75}}}}function Li(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:o=>b(o,"inherit"),fontStyle:"italic",color:o=>s(o,"shift-10",t.get(o))}}}function Ri(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:l(3),paddingBlock:l(12),paddingInline:l(6),textAlign:"center",color:o=>s(o,"shift-6",t.get(o)),"& > :first-child":{color:o=>s(o,"shift-5",t.get(o))}}}}function zi(e={}){return{_onError:(t,n,o)=>{var r,a;(r=e.onError)==null||r.call(e,n);let i=typeof e.fallback=="function"?e.fallback(n,o):(a=e.fallback)!=null?a:{div:"An error occurred."};t.children.update([i])}}}var Ii={small:8,medium:10,large:14};function Mi(e={}){var o,i;let t=f((o=e.color)!=null?o:"primary","color"),n=l(Ii[(i=e.size)!=null?i:"medium"]);return{_onInsert:r=>{r.tagName!=="button"&&console.warn('"fab" patch must use button tag')},style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:n,height:n,borderRadius:"50%",fontSize:r=>b(r,"inherit"),backgroundColor:r=>s(r,"shift-9",t.get(r)),color:r=>s(r,"shift-0",t.get(r)),boxShadow:r=>`0 ${l(1)} ${l(4)} ${s(r,"shift-4","neutral")}`,transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:r=>s(r,"shift-10",t.get(r)),boxShadow:r=>`0 ${l(2)} ${l(6)} ${s(r,"shift-5","neutral")}`},"&:focus-visible":{outline:r=>`2px solid ${s(r,"shift-6",t.get(r))}`,outlineOffset:"2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}function Ai(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:l(2),marginInline:0,marginTop:l(3),marginBottom:l(3),color:o=>s(o,"shift-9",t.get(o)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:l(2)},"& figcaption":{fontSize:o=>b(o,"decrease-1"),color:o=>s(o,"shift-8",t.get(o)),lineHeight:1.45}}}}function Vi(e={}){var i;let{layout:t="horizontal"}=e,n=f((i=e.color)!=null?i:"neutral","color"),o=t==="vertical";return{_onInsert:r=>{r.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:r=>l(y(r)*3),paddingBlock:r=>l(y(r)*3),border:"none",borderRadius:r=>l(y(r)*2),fontSize:r=>b(r,"inherit"),backgroundColor:r=>s(r,"inherit",n.get(r)),display:"grid",gridTemplateColumns:o?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:l(4),rowGap:l(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:r=>b(r,"inherit"),fontWeight:600,paddingBlock:r=>l(y(r)*1),borderRadius:r=>l(y(r)*2),color:r=>s(r,"shift-9",n.get(r)),backgroundColor:r=>s(r,"inherit",n.get(r))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:r=>o?"0px":l(y(r)*1)},"& > label:has(+ :not(legend, label, p) + p)":{gridRow:o?"auto":"span 2"},"& > :not(legend, label, p)":{gridColumn:o?"1":"2",minWidth:0,width:"100%",boxSizing:"border-box"},"& > p":{gridColumn:o?"1":"2",minWidth:0,margin:0,marginBlockStart:`calc(${l(2)} * -1)`,fontSize:r=>b(r,"decrease-1"),color:r=>s(r,"shift-9",n.get(r))}}}}var Ni={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Bi(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{["h1","h2","h3","h4","h5","h6"].includes(o.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:o=>s(o,"shift-11",t.get(o)),marginTop:0,marginBottom:l(2),fontSize:o=>{let i=Ni[o.elementNode.tagName]||"inherit";return b(o,i)}}}}function Hi(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},style:{border:0,height:"1px",marginInline:0,marginTop:l(3),marginBottom:l(3),backgroundColor:o=>s(o,"shift-4",t.get(o))}}}function ji(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.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:l(4),height:l(4),flexShrink:"0",fontSize:o=>b(o),backgroundColor:"transparent",color:o=>s(o,"shift-9",t.get(o))}}}function Fi(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:l(2),backgroundColor:o=>s(o,"inherit",t.get(o))}}}function Wi(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),n=f((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"checkbox",_onInsert:r=>{r.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:r=>b(r,"inherit"),display:"inline-flex",position:"relative",width:l(6),height:l(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:l(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${s(r,"shift-4",t.get(r))}`,color:r=>s(r,"shift-9",t.get(r)),width:l(4),height:l(4)},"&:hover::before":{backgroundColor:r=>s(r,"shift-2",t.get(r))},"&:checked::before":{outline:r=>`1px solid ${s(r,"shift-6",n.get(r))}`,backgroundColor:r=>s(r,"shift-8",n.get(r))},"&:checked:hover:not([disabled])::before":{backgroundColor:r=>s(r,"shift-7",n.get(r))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:r=>`${l(.5)} solid ${s(r,"inherit",n.get(r))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:r=>`1px solid ${s(r,"shift-6",n.get(r))}`,backgroundColor:r=>s(r,"shift-3",n.get(r))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:r=>s(r,"shift-8",n.get(r))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:r=>s(r,"shift-7",n.get(r))},"&:focus-visible":{borderRadius:l(1.5),outline:r=>`${l(.5)} solid ${s(r,"shift-6",n.get(r))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:r=>s(r,"shift-4","neutral"),pointerEvents:"none"}}}}function Ki(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),n=f((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"color",_onSchedule:(r,a)=>{r.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag'),a.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:r=>b(r,"inherit"),paddingBlock:r=>l(y(r)*1),paddingInline:r=>l(y(r)*1),blockSize:r=>l(6+y(r)*2),inlineSize:r=>l(6+y(r)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:r=>l(y(r)*1)},"&:hover:not([disabled]), &:focus-visible":{},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:r=>s(r,"shift-2","neutral"),outline:r=>`1px solid ${s(r,"shift-4","neutral")}`}}}}function Ui(e={}){var i,r;let{mode:t="datetime-local"}=e,n=f((i=e.color)!=null?i:"neutral","color"),o=f((r=e.accentColor)!=null?r:"primary","accentColor");return{type:t,_onSchedule:(a,c)=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),c.type=t},style:{fontFamily:"inherit",fontSize:a=>b(a,"inherit"),lineHeight:"inherit",color:a=>s(a,"shift-9",n.get(a)),backgroundColor:a=>s(a,"inherit",n.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${s(a,"shift-4",n.get(a))}`,borderRadius:a=>l(y(a)*1),paddingInline:a=>l(y(a)*3),height:a=>l(6+y(a)*2),"&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:a=>`${l(.5)} solid ${s(a,"shift-6",o.get(a))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>s(a,"shift-8","neutral"),backgroundColor:a=>s(a,"shift-2","neutral"),outline:a=>`1px solid ${s(a,"shift-4","neutral")}`},"&:invalid":{outline:a=>`${l(.5)} solid ${s(a,"shift-6","error")}`}}}}function qi(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),n=f((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"file",_onSchedule:(r,a)=>{r.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),a.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:r=>b(r,"inherit"),lineHeight:"inherit",color:r=>s(r,"shift-9",t.get(r)),backgroundColor:r=>s(r,"inherit",t.get(r)),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${s(r,"shift-4",t.get(r))}`,borderRadius:r=>l(y(r)*1),height:r=>l(6+y(r)*2),paddingInline:r=>l(y(r)*1),"&::-webkit-file-upload-button":{marginTop:r=>l(y(r)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:l(1),height:l(6),paddingInline:l(2),cursor:"pointer",color:r=>s(r,"shift-11",t.get(r)),backgroundColor:r=>s(r,"shift-1",t.get(r))},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:r=>`${l(.5)} solid ${s(r,"shift-6",n.get(r))}`},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:r=>s(r,"shift-8","neutral"),outline:r=>`1px solid ${s(r,"shift-4","neutral")}`,backgroundColor:r=>s(r,"shift-1","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:r=>s(r,"shift-8","neutral"),backgroundColor:r=>s(r,"shift-3","neutral")}}}}function Yi(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),n=f((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"number",_onSchedule:(r,a)=>{r.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),a.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:l(10),paddingInlineStart:r=>l(y(r)*3),paddingInlineEnd:r=>l(y(r)*1.5),paddingBlock:r=>l(y(r)*1),borderRadius:r=>l(y(r)*1),fontSize:r=>b(r,"inherit"),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${s(r,"shift-4",t.get(r))}`,color:r=>s(r,"shift-9",t.get(r)),backgroundColor:r=>s(r,"inherit",t.get(r)),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:r=>`${l(.5)} solid ${s(r,"shift-6",n.get(r))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:r=>s(r,"shift-2","neutral"),outline:r=>`1px solid ${s(r,"shift-4","neutral")}`,color:r=>s(r,"shift-8","neutral")}}}}function Gi(){return{style:{display:"flex",alignItems:"center",gap:l(2),"& > *":{minWidth:`${l(9)}!important`}},_onMount:e=>{let t=e.domElement,n=()=>Array.from(t.querySelectorAll("input")),o=a=>{let c=n(),u=a.target,h=c.indexOf(u);u.value&&h<c.length-1&&c[h+1].focus()},i=a=>{let c=n(),u=a.target,h=c.indexOf(u);a.key==="Backspace"&&!u.value&&h>0&&c[h-1].focus(),a.key==="ArrowLeft"&&h>0&&c[h-1].focus(),a.key==="ArrowRight"&&h<c.length-1&&c[h+1].focus()},r=a=>{var p,g,v;a.preventDefault();let c=(g=(p=a.clipboardData)==null?void 0:p.getData("text"))!=null?g:"",u=n(),h=u.indexOf(a.target),m=h===-1?0:h;[...c].forEach((x,C)=>{u[m+C]&&(u[m+C].value=x)});let d=Math.min(m+c.length-1,u.length-1);(v=u[d])==null||v.focus()};t.addEventListener("input",o),t.addEventListener("keydown",i),t.addEventListener("paste",r),e.addHook("Remove",()=>{t.removeEventListener("input",o),t.removeEventListener("keydown",i),t.removeEventListener("paste",r)})}}}function Xi(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),n=f((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"radio",_onInsert:r=>{if(r.tagName!=="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:r=>b(r,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:l(6),height:l(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:r=>`1px solid ${s(r,"shift-4",t.get(r))}`,color:r=>s(r,"shift-9",t.get(r)),width:l(4),height:l(4)},"&:hover::before":{backgroundColor:r=>s(r,"shift-2",t.get(r))},"&:checked::before":{outline:r=>`1px solid ${s(r,"shift-6",n.get(r))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:r=>s(r,"shift-8",n.get(r))},"&:checked:hover:not([disabled])::before":{backgroundColor:r=>s(r,"shift-7",n.get(r))},"&:focus-visible":{borderRadius:"50%",outline:r=>`${l(.5)} solid ${s(r,"shift-6",n.get(r))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:r=>s(r,"shift-4","neutral"),pointerEvents:"none"}}}}function Ji(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),n=f((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"range",_onInsert:r=>{r.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:l(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:l(1.5),borderRadius:l(999),backgroundColor:r=>s(r,"shift-3",t.get(r))},"&::-webkit-slider-thumb":{appearance:"none",width:l(4),height:l(4),borderRadius:l(999),border:"none",marginTop:`calc((${l(1.5)} - ${l(4)}) / 2)`,backgroundColor:r=>s(r,"shift-9",n.get(r))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:r=>s(r,"shift-10",n.get(r))},"&:focus-visible":{outline:r=>`${l(.5)} solid ${s(r,"shift-6",n.get(r))}`,outlineOffset:l(1),borderRadius:l(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function Zi(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),n=f((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"search",_onSchedule:(r,a)=>{r.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),a.type="search"},style:{fontFamily:"inherit",fontSize:r=>b(r,"inherit"),lineHeight:"inherit",color:r=>s(r,"shift-9",t.get(r)),backgroundColor:r=>s(r,"inherit",t.get(r)),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${s(r,"shift-4",t.get(r))}`,borderRadius:r=>l(y(r)*1),minWidth:l(32),paddingInline:r=>l(y(r)*3),paddingBlock:r=>l(y(r)*1),"&::placeholder":{color:r=>s(r,"shift-7",t.get(r))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:r=>`${l(.5)} solid ${s(r,"shift-6",n.get(r))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:r=>s(r,"shift-8","neutral"),backgroundColor:r=>s(r,"shift-2","neutral"),outline:r=>`1px solid ${s(r,"shift-4","neutral")}`}}}}function Qi(e={}){var n;let t=f((n=e.accentColor)!=null?n:"primary","accentColor");return{role:"switch",dataTone:"shift-2",type:"checkbox",_onSchedule:o=>{if(o.tagName!=="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:o=>b(o,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:l(9),height:l(6),cursor:"pointer",margin:"0",paddingBlock:l(1),"&:checked":{"&::before":{backgroundColor:o=>s(o,"increase-3",t.get(o))},"&::after":{left:`calc(100% - ${l(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:l(3),height:l(3),borderRadius:l(999),left:l(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:o=>s(o,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:l(999),display:"inline-block",fontSize:o=>b(o,"inherit"),lineHeight:1,backgroundColor:o=>s(o)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function ea(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),n=f((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"text",_onSchedule:(r,a)=>{r.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),a.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:l(10),paddingInline:r=>l(y(r)*3),paddingBlock:r=>l(y(r)*1),borderRadius:r=>l(y(r)*1),fontSize:r=>b(r,"inherit"),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${s(r,"shift-4",t.get(r))}`,color:r=>s(r,"shift-9",t.get(r)),backgroundColor:r=>s(r,"inherit",t.get(r)),"&::placeholder":{color:r=>s(r,"shift-7")},"&:not(:placeholder-shown)":{color:r=>s(r,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:r=>`${l(.5)} solid ${s(r,"shift-6",n.get(r))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:r=>s(r,"shift-2","neutral"),outline:r=>`1px solid ${s(r,"shift-4","neutral")}`,color:r=>s(r,"shift-8","neutral")},"&:invalid:not(:placeholder-shown)":{outline:r=>`${l(.5)} solid ${s(r,"shift-6","error")}`},"&[data-status=error]":{outline:r=>`${l(.5)} solid ${s(r,"shift-6","error")}`},"&[data-status=warning]":{outline:r=>`${l(.5)} solid ${s(r,"shift-6","warning")}`}}}}function ta(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:o=>b(o,"inherit"),color:o=>s(o,"shift-9",t.get(o)),backgroundColor:o=>s(o,"inherit",t.get(o)),paddingBlock:l(.5),paddingInline:l(1.5),borderRadius:l(1),outline:o=>`1px solid ${s(o,"shift-4",t.get(o))}`}}}function oa(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),n=f((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:r=>{r.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:l(2),fontSize:r=>b(r,"inherit"),color:r=>s(r,"shift-9",t.get(r)),cursor:"pointer","&:focus-within":{color:r=>s(r,"shift-10",n.get(r))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:r=>s(r,"shift-8","neutral")}}}}function na(e={}){var o,i;let t=f((o=e.color)!=null?o:"primary","color"),n=f((i=e.accentColor)!=null?i:"secondary","accentColor");return{_onInsert:r=>{r.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:r=>b(r,"inherit"),backgroundColor:r=>s(r),color:r=>s(r,"shift-9",t.get(r)),textDecoration:"none","&:visited":{color:r=>s(r,"shift-9",n.get(r))},"&:hover:not([disabled])":{color:r=>s(r,"shift-10",t.get(r)),textDecoration:"underline"},"&:focus-visible":{borderRadius:l(1),outlineOffset:l(1),outline:r=>`${l(.5)} solid ${s(r,"shift-6",n.get(r))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:r=>s(r,"shift-8","neutral")}}}}function ra(e={}){let{color:t="neutral"}=e;return{_context:{list:{color:t}},style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function ia(e={}){let{dense:t=!1}=e;return{style:{display:"flex",alignItems:"center",gap:n=>l(y(n)*2),paddingBlock:n=>l(t?1:y(n)*2),paddingInline:n=>l(y(n)*3),fontSize:n=>b(n,"inherit")}}}function aa(e={}){var i,r;let t=f((i=e.color)!=null?i:"neutral","color"),n=(r=e.accentColor)!=null?r:"primary",{dense:o=!1}=e;return{cursor:"pointer",style:{appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>l(y(a)*2),paddingBlock:a=>l(o?1:y(a)*2),paddingInline:a=>l(y(a)*3),fontSize:a=>b(a,"inherit"),color:a=>s(a,"shift-9",t.get(a)),borderRadius:a=>l(y(a)*1),transition:"background-color 150ms ease","&:hover:not([disabled])":{backgroundColor:a=>s(a,"shift-2",t.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>s(a,"shift-3",n),color:a=>s(a,"shift-12",n)},"&:focus-visible":{outline:a=>`2px solid ${s(a,"shift-6",n)}`,outlineOffset:"-2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}function la(e={}){var n;let t=f((n=e.accentColor)!=null?n:"highlight","accentColor");return{_onInsert:o=>{o.tagName!=="mark"&&console.warn('"mark" primitive patch must use mark tag')},dataTone:"shift-2",style:{display:"inline-flex",alignItems:"center",fontSize:o=>b(o,"inherit"),color:o=>s(o,"shift-9",t.get(o)),backgroundColor:o=>s(o,"inherit",t.get(o)),height:l(6),borderRadius:l(1),paddingInline:l(1.5)}}}function sa(e={}){let{color:t="neutral",selectable:n=!0}=e;return{role:"menu",dataTone:"shift-17",_onSchedule:(i,r)=>{var c;let a={_context:{menu:{activeKey:f((c=e.activeKey)!=null?c:null),selectable:n}}};$(r,a)},style:{display:"flex",flexDirection:"column",paddingBlock:i=>l(y(i)*2),paddingInline:i=>l(y(i)*2),fontSize:i=>b(i,"inherit"),backgroundColor:i=>s(i,"inherit",t)}}}function ca(e={}){let{accentColor:t="primary",color:n="neutral"}=e;return{role:"menuitem",_onInsert:i=>{var u,h;i.tagName!=="button"&&console.warn('"menuItem" patch must use button tag');let r=i.getContext("menu");if(!r){console.warn('"menuItem" patch must be used inside a "menu"');return}let a=(h=(u=i.parent)==null?void 0:u.children.items)!=null?h:[];a=a.filter(m=>m.type==="ElementNode"&&m.attributes.get("role")==="menuitem");let c=i.key!==null&&i.key!==void 0?i.key:a.indexOf(i);r.selectable&&(i.attributes.set("ariaCurrent",m=>r.activeKey.get(m)===c||void 0),i.addEvent("click",()=>r.activeKey.set(c)))},onKeyDown:(i,r)=>{var m,d,p,g;let a=i.key;if(a==="Enter"||a===" "){i.preventDefault(),(m=r.domElement)==null||m.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(a))return;i.preventDefault();let c=((p=(d=r.parent)==null?void 0:d.children.items)!=null?p:[]).filter(v=>v.type==="ElementNode"&&v.attributes.get("role")==="menuitem");if(!c.length)return;let u=c.indexOf(r),h=u;a==="ArrowDown"?h=(u+1)%c.length:a==="ArrowUp"?h=(u-1+c.length)%c.length:a==="Home"?h=0:a==="End"&&(h=c.length-1),(g=c[h].domElement)==null||g.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:i=>l(2),width:"100%",fontSize:i=>b(i,"inherit"),height:i=>l(6+y(i)*2),paddingInline:i=>l(y(i)*3),border:"none",outline:"none",color:i=>s(i,"shift-9",n),backgroundColor:i=>s(i,"inherit",n),"&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:i=>s(i,"shift-2",n)},"&[aria-current=true]":{backgroundColor:i=>s(i,"shift-3",t),color:i=>s(i,"shift-10")},"&:focus-visible":{outline:i=>`${l(.5)} solid ${s(i,"shift-6",t)}`,outlineOffset:`-${l(.5)}`}}}}var pn=e=>!!e&&typeof e.get=="function"&&e._isState===!0,$e=e=>{let t={},n=[];for(let o in e){let i=e[o];o==="x"?n.push(`translateX(${typeof i=="number"?`${i}px`:i})`):o==="y"?n.push(`translateY(${typeof i=="number"?`${i}px`:i})`):o==="scale"?n.push(`scale(${i})`):o==="rotate"?n.push(`rotate(${typeof i=="number"?`${i}deg`:i})`):t[o]=i}return n.length&&(t.transform=n.join(" ")),t};function ua(e={}){var a,c,u,h;let{initial:t,animate:n,exit:o,transition:i={}}=e,r={duration:(a=i.duration)!=null?a:300,delay:(c=i.delay)!=null?c:0,easing:(u=i.easing)!=null?u:"ease",iterations:(h=i.iterations)!=null?h:1,fill:"both"};return{_onMount:m=>{let d=m.domElement;if(!d||typeof d.animate!="function")return;let p=pn(n)?n.get():n;if(p?d.animate(t?[$e(t),$e(p)]:[$e(p)],r):t&&Object.assign(d.style,$e(t)),pn(n)){let g=n.addListener(v=>{d.animate([$e(v)],r)});m.setMetadata("motionRelease",g)}},_onBeforeRemove:(m,d)=>{let p=m.domElement;if(!p||!o||typeof p.animate!="function")return d();p.animate([$e(o)],r).finished.then(d,d)},_onRemove:m=>{let d=m.getMetadata("motionRelease");d==null||d()}}}function ma(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:o=>b(o,"inherit"),backgroundColor:o=>s(o),color:o=>s(o,"shift-9",t.get(o)),marginTop:0,marginBottom:0,paddingLeft:l(3),listStyleType:"decimal",listStylePosition:"outside"}}}function da(e,t){if(t<=7)return Array.from({length:t},(r,a)=>a+1);let n=[1];e>3&&n.push("...");let o=Math.max(2,e-1),i=Math.min(t-1,e+1);for(let r=o;r<=i;r++)n.push(r);return e<t-2&&n.push("..."),n.push(t),n}function ha(e){var c;let{total:t,color:n="neutral",accentColor:o="primary"}=e,i=f((c=e.value)!=null?c:1),r={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:u=>l(6+y(u)*2),height:u=>l(6+y(u)*2),paddingInline:u=>l(y(u)*2),borderRadius:u=>l(y(u)*1),border:"none",cursor:"pointer",fontSize:u=>b(u,"inherit"),backgroundColor:"transparent",color:u=>s(u,"shift-9",n),"&:hover:not([disabled])":{backgroundColor:u=>s(u,"shift-2",n)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=oo(we({},r),{backgroundColor:u=>s(u,"shift-6",o),color:u=>s(u,"shift-11",o),fontWeight:"600",cursor:"default","&:hover:not([disabled])":{backgroundColor:u=>s(u,"shift-6",o)}});return{role:"navigation",ariaLabel:"Pagination",_onInsert:u=>{u.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:u=>{let h={div:m=>{let d=i.get(m),p=[];p.push({button:"\u2039",type:"button",ariaLabel:"Previous page",disabled:d<=1,onClick:()=>d>1&&i.set(d-1),style:r});for(let g of da(d,t))if(g==="...")p.push({span:"\u2026",ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:v=>l(y(v)*2),color:v=>s(v,"shift-7",n)}});else{let v=g===d;p.push({button:String(g),type:"button",ariaLabel:`Page ${g}`,ariaCurrent:v?"page":void 0,disabled:v,onClick:()=>i.set(g),style:v?a:r})}return p.push({button:"\u203A",type:"button",ariaLabel:"Next page",disabled:d>=t,onClick:()=>d<t&&i.set(d+1),style:r}),p},style:{display:"flex",alignItems:"center",gap:l(1)}};u.children.insert(h)},style:{display:"inline-flex"}}}function fa(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:o=>b(o,"inherit"),color:o=>s(o,"shift-9",t.get(o)),lineHeight:1.5,marginTop:0,marginBottom:0}}}function pa(e){var p;let{open:t=!1,placement:n="bottom",openOn:o="click"}=e,i=null,r=f(t),a=f(n),{show:c,hide:u,anchorPartial:h}=te({open:r,placement:a,content:e.content}),m={role:"dialog",dataTone:"shift-11",onMouseEnter:()=>o==="hover"&&c(),onMouseLeave:()=>o==="hover"&&u(),_onInsert:g=>{let v=g.attributes.get("id");i=v||g.nodeId,!v&&g.attributes.set("id",i)}};return(p=e.content).$||(p.$=[]),e.content.$.push(m),$(h,{ariaHaspopup:"dialog",ariaExpanded:g=>r.get(g),onMouseEnter:()=>o==="hover"&&c(),onMouseLeave:()=>o==="hover"&&u(),onClick:()=>{o==="click"&&(r.get()?u():c())},onKeyDown:g=>{g.key==="Escape"&&r.get()&&u()},onFocus:()=>o==="hover"&&c(),onBlur:(g,v)=>{let x=g.relatedTarget,C=v.getRoot().domElement,w=i?C.querySelector(`#${CSS.escape(i)}`):null;x&&(w!=null&&w.contains(x))||u()},_onMount:g=>i&&g.attributes.set("ariaControls",i)}),h}function Yt(e={}){let{placement:t="bottom-end",color:n="neutral",sideOffset:o=l(6),bordered:i=!0}=e,r=f(t),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"},c=m=>{var d;return(d=a[r.get(m)])!=null?d:a["bottom-end"]},u=m=>m.includes("start")?o:m.includes("end")?"auto":"50%",h=m=>m.includes("end")?o:m.includes("start")?"auto":"50%";return{style:{fontSize:m=>b(m),backgroundColor:m=>s(m),color:m=>s(m,"shift-9",n),position:"relative","&::after":{content:'""',position:"absolute",width:l(1.5),height:l(1.5),backgroundColor:m=>s(m,"inherit",n),borderWidth:i?"1px":"0px",borderColor:m=>s(m,"inherit",n),borderTopStyle:m=>{let d=c(m);return d.includes("top")||d.includes("right")?"solid":"none"},borderBottomStyle:m=>{let d=c(m);return d.includes("bottom")||d.includes("left")?"solid":"none"},borderLeftStyle:m=>{let d=c(m);return d.includes("top")||d.includes("left")?"solid":"none"},borderRightStyle:m=>{let d=c(m);return d.includes("bottom")||d.includes("right")?"solid":"none"},top:m=>{let d=c(m);return d.includes("top")?0:d.includes("bottom")?"auto":u(d)},right:m=>{let d=c(m);return d.includes("right")?0:d.includes("left")?"auto":h(d)},bottom:m=>{let d=c(m);return d.includes("bottom")?0:d.includes("top")?"auto":h(d)},left:m=>{let d=c(m);return d.includes("left")?0:d.includes("right")?"auto":u(d)},transform:m=>{let d=c(m),p=d.includes("right")||d.includes("end")&&!d.includes("left")?"50%":"-50%",g=d.includes("bottom")||d.includes("end")&&!d.includes("top")?"50%":"-50%";return`translate(${p},${g}) rotate(45deg)`}}}}}function ga(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:o=>b(o,"inherit"),color:o=>s(o,"shift-9",t.get(o)),backgroundColor:o=>s(o,"inherit",t.get(o)),border:"none",paddingBlock:o=>l(y(o)*2),paddingInline:o=>l(y(o)*3),borderRadius:o=>l(y(o)*2)}}}function ya(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),n=f((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:r=>{r.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},style:{appearance:"none",width:"100%",height:l(2),border:0,borderRadius:l(999),overflow:"hidden",backgroundColor:r=>s(r,"shift-3",t.get(r)),"&::-webkit-progress-bar":{backgroundColor:r=>s(r,"shift-3",t.get(r)),borderRadius:l(999)},"&::-webkit-progress-value":{backgroundColor:r=>s(r,"shift-9",n.get(r)),borderRadius:l(999),transition:"width 220ms ease"}}}}var ba='<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>',va='<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 Sa(e={}){var a,c;let{max:t=5,readOnly:n=!1,onChange:o}=e,i=(a=e.color)!=null?a:"warning",r=f((c=e.value)!=null?c:0);return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:l(.5),fontSize:"1.5rem",cursor:n?"default":"pointer",color:u=>s(u,"shift-8",i)},_onMount:u=>{let h=u.domElement,m=r.get(),d=0,p=()=>{let v=d>0?d:m;Array.from(h.children).forEach((x,C)=>{x.innerHTML=C<v?ba:va})};h.innerHTML="";for(let v=1;v<=t;v++){let x=document.createElement("button");if(x.type="button",x.setAttribute("aria-label",`${v} star${v>1?"s":""}`),x.style.cssText="background:none;border:none;padding:0;cursor:inherit;color:inherit;font-size:inherit;display:flex;align-items:center;",!n){let C=v;x.addEventListener("click",()=>{let w=C===m?0:C;m=w,r.set(w),o==null||o(w),d=0,p()}),x.addEventListener("mouseenter",()=>{d=C,p()}),x.addEventListener("mouseleave",()=>{d=0,p()}),x.addEventListener("keydown",w=>{var T;let E=m;if(w.key==="ArrowRight"||w.key==="ArrowUp")E=Math.min(t,m+1),w.preventDefault();else if(w.key==="ArrowLeft"||w.key==="ArrowDown")E=Math.max(0,m-1),w.preventDefault();else return;m=E,r.set(E),o==null||o(E),p();let O=E>0?E-1:0;(T=h.children[O])==null||T.focus()})}h.appendChild(x)}p();let g=r.addListener(v=>{m=v,d===0&&p()});u.addHook("Remove",g)}}}function xa(e={}){var n;let{color:t="neutral"}=e;return{role:"radiogroup",_context:{segmented:{value:f((n=e.value)!=null?n:"")}},style:{display:"inline-flex",paddingBlock:l(1),paddingInline:l(1),gap:l(.5),borderRadius:l(10),backgroundColor:o=>s(o,"shift-2",t)}}}function Ca(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),n=f((i=e.accentColor)!=null?i:"primary","accentColor");return{role:"radio",_onInsert:r=>{var m,d;r.tagName!=="button"&&console.warn('"segmentedItem" patch must use button tag');let a=r.getContext("segmented");if(!a){console.warn('"segmentedItem" patch must be used inside a "segmented"');return}let u=((d=(m=r.parent)==null?void 0:m.children.items)!=null?d:[]).filter(p=>p.type==="ElementNode"&&p.attributes.get("role")==="radio"),h=r.key!==null&&r.key!==void 0?String(r.key):String(u.indexOf(r));r.attributes.set("ariaChecked",p=>a.value.get(p)===h),r.addEvent("click",()=>a.value.set(h))},style:{cursor:"pointer",fontSize:r=>b(r,"inherit"),height:l(6),paddingBlock:l(1),paddingInline:l(3),border:"none",borderRadius:l(10),color:r=>s(r,"shift-9",t.get(r)),backgroundColor:"transparent",transition:"background-color 300ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:r=>s(r,"shift-3",t.get(r))},"&[aria-checked=true]":{backgroundColor:r=>s(r,"shift-0",n.get(r)),color:r=>s(r,"shift-10",n.get(r))},"&:focus-visible":{outline:r=>`${l(.5)} solid ${s(r,"shift-6",n.get(r))}`,outlineOffset:`-${l(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function wa(e={}){let{color:t="neutral",accentColor:n="primary"}=e;return{_onInsert:o=>{o.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:o=>b(o,"inherit"),lineHeight:"inherit",color:o=>s(o,"shift-9",t),backgroundColor:o=>s(o,"inherit",t),border:"none",outlineOffset:"-1px",outline:o=>`1px solid ${s(o,"shift-4",t)}`,borderRadius:o=>l(y(o)*1),paddingBlock:o=>l(y(o)*1),paddingLeft:o=>l(y(o)*3),paddingRight:o=>l(y(o)*5),backgroundImage:o=>{let i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${Mt(o,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(i)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${l(2)} center`,backgroundSize:`${l(2.5)} ${l(1.5)}`,"&:not([multiple])":{height:o=>l(6+y(o)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:o=>`${l(.5)} solid ${s(o,"shift-5",n)}`},"&:focus-visible":{outline:o=>`${l(.5)} solid ${s(o,"shift-6",n)}`},"& optgroup":{color:o=>s(o,"shift-11",t)},"& option[disabled]":{color:o=>s(o,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:o=>s(o,"shift-8","neutral"),outline:o=>`1px solid ${s(o,"shift-4","neutral")}`,backgroundColor:o=>s(o,"shift-2","neutral")}}}}function Ea(e){let{options:t=[],placement:n="bottom",color:o="neutral",open:i=!1,multiple:r=!1}=e,a=f(e.value),c=f(i),{show:u,hide:h,anchorPartial:m}=te({open:c,placement:f(n),content:e.content}),d={onClick:()=>!r&&h()};$(e.content,d);let p={div:v=>{let x=a.get(v),C=Array.isArray(x)?x:[x];return t.filter(E=>C.includes(E.value)).map(E=>({span:E.label,$:[Fe({color:o,removable:r})],_key:E.value,_onRemove:O=>{let T=a.get(),M=(Array.isArray(T)?T:[T]).filter(R=>R!==E.value);r?a.set(M):a.set(M[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:l(1),flex:1}},g={_onInsert:v=>{v.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:v=>v.children.insert(p),onClick:()=>c.get()?h():u(),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:v=>l(6+y(v)*2),minWidth:l(32),outlineOffset:"-1px",outline:v=>`1px solid ${s(v,"shift-4","neutral")}`,paddingInline:v=>l(y(v)*2),borderRadius:v=>l(y(v)*1),fontSize:v=>b(v,"inherit"),color:v=>s(v,"shift-9",o),backgroundColor:v=>s(v,"inherit",o)}};return $(m,g),m}function ka(e={}){let{accentColor:t="primary",color:n="neutral",value:o=null}=e;return{role:"option",_onInit:r=>{r.tagName!=="div"&&console.warn('"selectItem" patch must use div tag');let a=r.getContext("select");if(a){let c=a.value;r.attributes.set("ariaSelected",u=>{let h=c.get(u);return a.multiple?h.includes(o):h===o}),r.addEvent("click",()=>{let u=c.get();a.multiple?u.includes(o)?c.set(u.filter(h=>h!==o)):c.set(u.concat([o])):u!==o&&c.set(o)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:r=>b(r,"inherit"),height:r=>l(6+y(r)*2),paddingInline:r=>l(y(r)*3),border:"none",outline:"none",color:r=>s(r,"shift-9",n),backgroundColor:r=>s(r,"inherit",n),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:r=>s(r,"shift-2",n)},"&[aria-selected=true]":{backgroundColor:r=>s(r,"shift-6",t),color:r=>s(r,"shift-11")},"&:focus-visible":{outline:r=>`${l(.5)} solid ${s(r,"shift-6",t)}`,outlineOffset:`-${l(.5)}`}}}}function Ta(e={}){var a;let{color:t="neutral",multiple:n=!1}=e,o=f((a=e.value)!=null?a:n?[]:null),i={div:c=>{let u=o.get(c);return(Array.isArray(u)?u:[u]).map(m=>({input:null,name:e.name,value:m||""}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:o,multiple:n}},_onInit:c=>{c.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),c.children.insert(i)},style:{display:"flex",flexDirection:"column",paddingBlock:c=>l(y(c)*2),paddingInline:c=>l(y(c)*2),fontSize:c=>b(c,"inherit"),backgroundColor:c=>s(c,"inherit",t)}}}function _a(e={}){var i;let t=f((i=e.color)!=null?i:"neutral","color"),n={"0%,100%":{opacity:1},"50%":{opacity:.4}},o=Te(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:r=>b(r),color:r=>s(r,"shift-9",t.get(r)),height:l(6),display:"block",borderRadius:l(1),backgroundColor:r=>s(r,"inherit",t.get(r)),animation:`${o} 1.5s ease-in-out infinite`,[`@keyframes ${o}`]:n}}}function Oa(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{dataSize:"decrease-1",_onInsert:o=>{o.tagName!=="small"&&console.warn('"small" primitive patch must use small tag')},style:{fontSize:o=>b(o,"inherit"),color:o=>s(o,"shift-9",t.get(o))}}}var yn={to:{transform:"rotate(360deg)"}},gn=Te(JSON.stringify(yn));function Pa(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:o=>{o.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:o=>b(o),backgroundColor:o=>s(o),color:o=>s(o,"shift-9",t.get(o)),display:"inline-block",margin:0,flexShrink:0,width:l(6),height:l(6),borderRadius:"50%",border:o=>`${l(.5)} solid ${s(o,"shift-4",t.get(o))}`,borderTopColor:o=>s(o,"shift-9",t.get(o)),boxSizing:"border-box",padding:0,animation:`${gn} 0.7s linear infinite`,[`@keyframes ${gn}`]:yn}}}function Da(e={}){let{direction:t="horizontal",defaultSize:n=50,min:o=10,max:i=90}=e;return{_onSchedule:(r,a)=>{$(a,{_context:{splitter:{direction:t,size:f(n),min:o,max:i}}})},style:{display:"flex",flexDirection:t==="horizontal"?"row":"column",overflow:"hidden"}}}function $a(){return{_onMount:e=>{let t=e.getContext("splitter");if(!t){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let n=e.domElement,o=t.direction==="horizontal"?"width":"height";n.style[o]=`${t.size.get()}%`,n.style.flexShrink="0",n.style.overflow="auto";let i=t.size.addListener(r=>{n.style[o]=`${r}%`});e.addHook("Remove",i)}}}function La(){return{role:"separator",tabindex:0,_onMount:e=>{let t=e.getContext("splitter");if(!t){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let n=e.domElement,o=t.direction==="horizontal";n.style.cursor=o?"col-resize":"row-resize",n.setAttribute("aria-orientation",o?"vertical":"horizontal"),n.setAttribute("aria-valuemin",String(t.min)),n.setAttribute("aria-valuemax",String(t.max)),n.setAttribute("aria-valuenow",String(Math.round(t.size.get())));let i=t.size.addListener(u=>{n.setAttribute("aria-valuenow",String(Math.round(u)))}),r=u=>{let h=u.shiftKey?10:1,m=null;o?u.key==="ArrowRight"?m=Math.min(t.size.get()+h,t.max):u.key==="ArrowLeft"&&(m=Math.max(t.size.get()-h,t.min)):u.key==="ArrowDown"?m=Math.min(t.size.get()+h,t.max):u.key==="ArrowUp"&&(m=Math.max(t.size.get()-h,t.min)),u.key==="Home"?m=t.min:u.key==="End"&&(m=t.max),m!==null&&(u.preventDefault(),t.size.set(m))},a=null,c=u=>{u.preventDefault();let h=n.parentElement,m=p=>{let g=h.getBoundingClientRect(),v=o?(p.clientX-g.left)/g.width*100:(p.clientY-g.top)/g.height*100;t.size.set(Math.min(Math.max(v,t.min),t.max))},d=()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",d),a=null};a=()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",d),a=null},document.addEventListener("mousemove",m),document.addEventListener("mouseup",d)};n.addEventListener("keydown",r),n.addEventListener("mousedown",c),e.addHook("Remove",()=>{a==null||a(),i(),n.removeEventListener("keydown",r),n.removeEventListener("mousedown",c)})},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e=>s(e,"shift-2"),"&:hover":{backgroundColor:e=>s(e,"shift-3")},"&:focus-visible":{outline:e=>`2px solid ${s(e,"shift-6")}`,outlineOffset:"2px"},"&::after":{content:'""',borderRadius:l(999),backgroundColor:e=>s(e,"shift-4")}}}}function Ra(){let e="neutral",t="primary";return{_onInsert:n=>{var c,u;let o=n.getContext("steps");if(!o){console.warn('"stepItem" patch must be used inside a "steps"');return}e=o.color,t=o.accentColor;let a=((u=(c=n.parent)==null?void 0:c.children.items)!=null?u:[]).filter(h=>h.type==="ElementNode").indexOf(n);n.domElement&&(n.domElement.dataset.step=String(a+1)),n.attributes.set("dataStatus",h=>{let m=o.current.get(h);return a<m?"done":a===m?"active":"pending"}),n.attributes.set("ariaCurrent",h=>o.current.get(h)===a?"step":void 0)},style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:l(1),flex:"1",fontSize:n=>b(n,"decrease-1"),textAlign:"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:l(6),height:l(6),borderRadius:l(999),fontSize:n=>b(n,"decrease-1"),fontWeight:"600",flexShrink:"0",border:n=>`2px solid ${s(n,"shift-4",e)}`,backgroundColor:n=>s(n,"inherit"),color:n=>s(n,"shift-8"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"},"&:not(:first-child)::after":{content:'""',position:"absolute",top:l(3),right:`calc(50% + ${l(3)})`,left:`calc(-50% + ${l(3)})`,height:"2px",backgroundColor:n=>s(n,"shift-3",e),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:n=>s(n,"shift-6",t),borderColor:n=>s(n,"shift-6",t),color:n=>s(n,"shift-15",t)},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:n=>s(n,"shift-3",e),borderColor:n=>s(n,"shift-3",e),color:n=>s(n,"shift-9",e)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:n=>s(n,"shift-3",e)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:n=>s(n,"shift-6",t)},"&[data-status=pending]":{color:n=>s(n,"shift-7")},"&[data-status=active]":{color:n=>s(n,"shift-10"),fontWeight:"600"},"&[data-status=done]":{color:n=>s(n,"shift-8")}}}}function za(e={}){var r,a,c;let t=(r=e.direction)!=null?r:"horizontal",n=(a=e.color)!=null?a:"neutral",o=(c=e.accentColor)!=null?c:"primary";return{_onSchedule:(u,h)=>{var d;let m={_context:{steps:{current:f((d=e.current)!=null?d:0),direction:t,color:n,accentColor:o}}};$(h,m)},style:{display:"flex",flexDirection:t==="vertical"?"column":"row",alignItems:t==="vertical"?"flex-start":"center",gap:l(2),listStyle:"none",margin:"0",padding:"0"}}}function Ia(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:o=>b(o,"inherit"),fontWeight:700,color:o=>s(o,"shift-11",t.get(o)),backgroundColor:o=>s(o)}}}function Ma(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:o=>b(o,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:o=>s(o,"shift-9",t.get(o))}}}function Aa(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:o=>b(o,"decrease-1"),verticalAlign:"super",lineHeight:0,color:o=>s(o,"shift-9",t.get(o))}}}function Va(e={}){let{accentColor:t="primary",color:n="neutral"}=e;return{role:"tab",_onInsert:i=>{var h,m;i.tagName!=="button"&&console.warn('"tab" patch must use button tag');let r=i.getContext("tabs");if(!r){console.warn('"tab" patch must be used inside a "tabs"');return}let a=(m=(h=i.parent)==null?void 0:h.children.items)!=null?m:[];a=a.filter(d=>d.type==="ElementNode"&&d.attributes.get("role")==="tab");let c=i.key!==null&&i.key!==void 0?i.key:a.indexOf(i),u={id:`tab${i.parent.nodeId}${c}`,ariaControls:`tabpanel${i.parent.nodeId}${c}`,ariaSelected:d=>r.activeKey.get(d)===c,onClick:()=>r.activeKey.set(c),onKeyDown:d=>{var w,E,O,T;let p=d.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(p))return;d.preventDefault();let g=((E=(w=i.parent)==null?void 0:w.children.items)!=null?E:[]).filter(D=>D.type==="ElementNode"&&D.attributes.get("role")==="tab");if(!g.length)return;let v=g.indexOf(i),x=v;p==="ArrowRight"?x=(v+1)%g.length:p==="ArrowLeft"?x=(v-1+g.length)%g.length:p==="Home"?x=0:p==="End"&&(x=g.length-1);let C=g[x];r.activeKey.set((O=C.key)!=null?O:x),(T=C.domElement)==null||T.focus()}};i.merge(u)},style:{cursor:"pointer",fontSize:i=>b(i,"inherit"),height:i=>l(6+y(i)*2),paddingInline:i=>l(y(i)*4),border:"none",outline:"none",color:i=>s(i,"shift-9"),backgroundColor:i=>s(i,"inherit"),boxShadow:i=>`inset 0 -${l(.5)} 0 0 ${s(i,"shift-1",n)}`,"&:hover:not([disabled])":{boxShadow:i=>`inset 0 -${l(.5)} 0 0 ${s(i,"shift-2",n)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:i=>`inset 0 -${l(.5)} 0 0 ${s(i,"shift-6",t)}`},"&:focus-visible":{boxShadow:i=>`inset 0 -${l(.5)} 0 0 ${s(i,"shift-6",t)}`}}}}function Na(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:o=>b(o,"inherit"),color:o=>s(o,"shift-9",t.get(o)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:o=>l(y(o)*3),paddingBlock:o=>l(y(o)*1),color:o=>s(o,"shift-10",t.get(o)),backgroundColor:o=>s(o,"inherit")},"& td":{textAlign:"left",paddingInline:o=>l(y(o)*3),paddingBlock:o=>l(y(o)*1),color:o=>s(o,"shift-9",t.get(o)),boxShadow:o=>`inset 0 1px 0 ${s(o,"shift-3",t.get(o))}`,fontSize:o=>b(o,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:o=>l(y(o)*3),paddingBlock:o=>l(y(o)*1),color:o=>s(o,"shift-10",t.get(o)),backgroundColor:o=>s(o,"inherit"),boxShadow:o=>`inset 0 -1px 0 ${s(o,"shift-4",t.get(o))}`},"& tr":{backgroundColor:o=>s(o,"inherit")},"& tbody tr:hover":{backgroundColor:o=>`${s(o,"shift-2")}!important`}}}}function Ba(){return{role:"tabpanel",style:{paddingBlock:t=>l(y(t)*2),paddingInline:t=>l(y(t)*2)},_onInsert:t=>{var a,c;let n=t.getContext("tabs");if(!n){console.warn('"tabPanel" patch must be used inside a "tabs"');return}let o=(c=(a=t.parent)==null?void 0:a.children.items)!=null?c:[];o=o.filter(u=>u.type==="ElementNode"&&u.attributes.get("role")==="tabpanel");let i=t.key!==null&&t.key!==void 0?t.key:o.indexOf(t),r={id:`tabpanel${t.parent.nodeId}${i}`,ariaLabelledby:`tab${t.parent.nodeId}${i}`,hidden:u=>n.activeKey.get(u)!==i};t.merge(r)}}}function Ha(e={}){return{role:"tablist",ariaOrientation:"horizontal",_onSchedule:(n,o)=>{var r;let i={_context:{tabs:{activeKey:f((r=e.activeKey)!=null?r:0)}}};$(o,i)}}}function ja(e={}){var i,r;let t=f((i=e.color)!=null?i:"neutral","color"),n=f((r=e.accentColor)!=null?r:"primary","accentColor"),{autoResize:o=!1}=e;return{_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:a=>{if(o){let c=a.domElement;c.style.overflow="hidden";let u=()=>{c.style.height="auto",c.style.height=`${c.scrollHeight}px`};c.addEventListener("input",u),u(),a.addHook("Remove",()=>c.removeEventListener("input",u))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>l(y(a)*2),paddingBlock:a=>l(y(a)*1.5),border:"none",borderRadius:a=>l(y(a)*1.5),fontSize:a=>b(a,"inherit"),color:a=>s(a,"shift-9",t.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${s(a,"shift-4",t.get(a))}`,backgroundColor:a=>s(a,"inherit",t.get(a)),"&::placeholder":{color:a=>s(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`${l(.5)} solid ${s(a,"shift-5",n.get(a))}`},"&:focus-visible":{outline:a=>`${l(.5)} solid ${s(a,"shift-6",n.get(a))}`},"&:invalid":{outline:a=>`${l(.5)} solid ${s(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>s(a,"shift-8","neutral"),outline:a=>`1px solid ${s(a,"shift-4","neutral")}`,backgroundColor:a=>s(a,"shift-2","neutral")}}}}function Fa(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Wa(e={}){var r,a,c;let{last:t=!1}=e,n=(r=e.color)!=null?r:"neutral",o=(a=e.accentColor)!=null?a:"primary",i=f((c=e.active)!=null?c:!1);return{style:we({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:u=>l(y(u)*2),paddingBottom:u=>t?"0":l(y(u)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:"0.25em",transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:u=>s(u,"shift-8",i.get(u)?o:n),opacity:u=>i.get(u)?"1":"0.4"}},t?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:u=>`-${l(y(u)*4)}`,width:"2px",backgroundColor:u=>s(u,"shift-3",n)}})}}function Ka(e={}){let{position:t="top-center",color:n="neutral"}=e,o=f(!1),i=t.startsWith("top"),r=t.endsWith("center"),a=t.endsWith("right"),c={div:[],id:`domphy-toast-${t}`,style:{position:"fixed",display:"flex",flexDirection:i?"column":"column-reverse",alignItems:r?"center":a?"end":"start",inset:0,gap:l(4),zIndex:30,padding:l(6),pointerEvents:"none"}};return{_portal:u=>{let h=u.domElement.querySelector(`#domphy-toast-${t}`);return h||(h=u.children.insert(c).domElement),h},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:l(32),pointerEvents:"auto",paddingBlock:u=>l(y(u)*2),paddingInline:u=>l(y(u)*4),borderRadius:u=>l(y(u)*2),fontSize:u=>b(u,"inherit"),color:u=>s(u,"shift-9",n),backgroundColor:u=>s(u,"inherit",n),boxShadow:u=>`0 ${l(2)} ${l(9)} ${s(u,"shift-4","neutral")}`,opacity:u=>Number(o.get(u)),transform:u=>o.get(u)?"translateY(0)":i?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>o.set(!0)),_onBeforeRemove:(u,h)=>{let m=!1,d=()=>{m||(m=!0,u.domElement.removeEventListener("transitionend",p),h())},p=g=>{g.propertyName==="transform"&&d()};u.domElement.addEventListener("transitionend",p),setTimeout(d,350),o.set(!1)}}}function Ua(e={}){var o,i;let t=f((o=e.color)!=null?o:"neutral","color"),n=f((i=e.accentColor)!=null?i:"primary","accentColor");return{role:"button",_onInsert:r=>{var m,d;r.tagName!=="button"&&console.warn('"toggle" patch must use button tag');let a=r.getContext("toggleGroup");if(!a){console.warn('"toggle" patch must be used inside a "toggleGroup"');return}let u=((d=(m=r.parent)==null?void 0:m.children.items)!=null?d:[]).filter(p=>p.type==="ElementNode"&&p.attributes.get("role")==="button"),h=r.key!==null&&r.key!==void 0?String(r.key):String(u.indexOf(r));r.attributes.set("ariaPressed",p=>{let g=a.value.get(p);return Array.isArray(g)?g.includes(h):g===h}),r.addEvent("click",()=>{let p=a.value.get();if(a.multiple){let g=Array.isArray(p)?[...p]:[];a.value.set(g.includes(h)?g.filter(v=>v!==h):[...g,h])}else a.value.set(p===h?"":h)})},style:{cursor:"pointer",fontSize:r=>b(r,"inherit"),height:l(6),paddingBlock:l(1),paddingInline:l(2),border:"none",borderRadius:l(1),color:r=>s(r,"shift-9",t.get(r)),backgroundColor:r=>s(r,"inherit",t.get(r)),transition:"background-color 300ms ease","&:hover:not([disabled])":{backgroundColor:r=>s(r,"shift-2",t.get(r))},"&[aria-pressed=true]":{backgroundColor:r=>s(r,"shift-3",n.get(r)),color:r=>s(r,"shift-12",n.get(r))},"&:focus-visible":{outline:r=>`${l(.5)} solid ${s(r,"shift-6",n.get(r))}`,outlineOffset:`-${l(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function qa(e={}){var o;let{multiple:t=!1,color:n="neutral"}=e;return{role:"group",_context:{toggleGroup:{value:f((o=e.value)!=null?o:t?[]:""),multiple:t}},style:{display:"flex",paddingBlock:l(1),paddingInline:l(1),gap:l(1),borderRadius:l(2),fontSize:i=>b(i,"inherit"),backgroundColor:i=>s(i,"inherit",n),outline:i=>`1px solid ${s(i,"shift-3",n)}`,outlineOffset:"-1px"}}}function Ya(e={}){var n;let t=(n=e.gap)!=null?n:4;return{style:{display:"flex",alignItems:"center",gap:o=>l(y(o)*t)}}}function Ga(){return{div:null,style:{flex:"1 1 0"}}}function Xa(e={}){let{open:t=!1,placement:n="top",content:o="Tooltip Content"}=e,i=f(n),r=f(o),a=`domphy-tt-${Math.random().toString(36).slice(2,9)}`,c={span:g=>r.get(g),id:a},{show:u,hide:h,anchorPartial:m}=te({open:t,placement:i,content:c}),d={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:g=>l(y(g)*1),paddingInline:g=>l(y(g)*3),borderRadius:g=>l(y(g)*1),color:g=>s(g,"shift-9"),backgroundColor:g=>s(g),fontSize:g=>b(g,"inherit")},$:[Yt({placement:i,bordered:!1})]};return c.$||(c.$=[]),c.$.push(d),$(m,{ariaDescribedby:a,onMouseEnter:()=>u(),onMouseLeave:()=>h(),onFocus:()=>u(),onBlur:()=>h(),onKeyDown:g=>g.key==="Escape"&&h()}),m}function bn(e,t){return e.key!==void 0&&e.key!==null?String(e.key):`index-${t}`}function Ja(e={}){let{duration:t=300,delay:n=0}=e,o=new Map,i=new Map;return{_onBeforeUpdate:r=>{o=new Map,r.children.items.forEach((a,c)=>{if(!(a instanceof B))return;let u=a.domElement;u&&o.set(bn(a,c),u.getBoundingClientRect())})},_onUpdate:r=>{r.children.items.forEach((a,c)=>{var w;if(!(a instanceof B))return;let u=a.domElement;if(!u)return;let h=bn(a,c),m=o.get(h);if(!m)return;let d=u.getBoundingClientRect(),p=m.left-d.left,g=m.top-d.top;if(Math.abs(p)<.5&&Math.abs(g)<.5)return;(w=i.get(u))==null||w(),u.style.transition="none",u.style.transform=`translate(${p}px, ${g}px)`,u.getBoundingClientRect(),requestAnimationFrame(()=>{u.style.transition=`transform ${t}ms ease ${n}ms`,u.style.transform="translate(0px, 0px)"});let v=!1,x=()=>{v||(v=!0,i.delete(u),u.removeEventListener("transitionend",C),u.style.transition="",u.style.transform="")},C=E=>{E.propertyName==="transform"&&x()};i.set(u,()=>{v=!0,i.delete(u),u.removeEventListener("transitionend",C)}),u.addEventListener("transitionend",C),setTimeout(x,t+n+34)}),o.clear()}}}function Za(e={}){var n;let t=f((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:o=>b(o,"inherit"),backgroundColor:o=>s(o),color:o=>s(o,"shift-9",t.get(o)),marginTop:0,marginBottom:0,paddingLeft:l(3),listStyleType:"disc",listStylePosition:"outside"}}}return Mn(Qa);})();
6
6
  //# sourceMappingURL=core-theme-ui.global.js.map