vanilla-breeze 0.7.0 → 0.7.1

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.
Files changed (86) hide show
  1. package/custom-elements.json +6768 -6425
  2. package/dist/cdn/components/settings-panel.js +1 -1
  3. package/dist/cdn/themes/8bit.tokens.json +1 -1
  4. package/dist/cdn/themes/alpha1999-dark.tokens.json +1 -1
  5. package/dist/cdn/themes/alpha1999.tokens.json +1 -1
  6. package/dist/cdn/themes/art-deco-dark.tokens.json +1 -1
  7. package/dist/cdn/themes/art-deco.tokens.json +1 -1
  8. package/dist/cdn/themes/bauhaus-dark.tokens.json +1 -1
  9. package/dist/cdn/themes/bauhaus.tokens.json +1 -1
  10. package/dist/cdn/themes/brutalist-dark.tokens.json +1 -1
  11. package/dist/cdn/themes/brutalist.tokens.json +1 -1
  12. package/dist/cdn/themes/catppuccin-frappe.tokens.json +1 -1
  13. package/dist/cdn/themes/catppuccin-latte-dark.tokens.json +1 -1
  14. package/dist/cdn/themes/catppuccin-latte.tokens.json +1 -1
  15. package/dist/cdn/themes/catppuccin-macchiato.tokens.json +1 -1
  16. package/dist/cdn/themes/catppuccin-mocha.tokens.json +1 -1
  17. package/dist/cdn/themes/classic-dark.tokens.json +1 -1
  18. package/dist/cdn/themes/classic.tokens.json +1 -1
  19. package/dist/cdn/themes/claymorphism-dark.tokens.json +1 -1
  20. package/dist/cdn/themes/claymorphism.tokens.json +1 -1
  21. package/dist/cdn/themes/clinical-dark.tokens.json +1 -1
  22. package/dist/cdn/themes/clinical.tokens.json +1 -1
  23. package/dist/cdn/themes/cottagecore-dark.tokens.json +1 -1
  24. package/dist/cdn/themes/cottagecore.tokens.json +1 -1
  25. package/dist/cdn/themes/cyber.tokens.json +1 -1
  26. package/dist/cdn/themes/dawn-dark.tokens.json +1 -1
  27. package/dist/cdn/themes/dawn.tokens.json +1 -1
  28. package/dist/cdn/themes/dracula.tokens.json +1 -1
  29. package/dist/cdn/themes/dusk.tokens.json +1 -1
  30. package/dist/cdn/themes/editorial-dark.tokens.json +1 -1
  31. package/dist/cdn/themes/editorial.tokens.json +1 -1
  32. package/dist/cdn/themes/financial-dark.tokens.json +1 -1
  33. package/dist/cdn/themes/financial.tokens.json +1 -1
  34. package/dist/cdn/themes/genai.tokens.json +1 -1
  35. package/dist/cdn/themes/glassmorphism-dark.tokens.json +1 -1
  36. package/dist/cdn/themes/glassmorphism.tokens.json +1 -1
  37. package/dist/cdn/themes/government-dark.tokens.json +1 -1
  38. package/dist/cdn/themes/government.tokens.json +1 -1
  39. package/dist/cdn/themes/gruvbox-dark.tokens.json +1 -1
  40. package/dist/cdn/themes/gruvbox.tokens.json +1 -1
  41. package/dist/cdn/themes/high-noon-dark.tokens.json +1 -1
  42. package/dist/cdn/themes/high-noon.tokens.json +1 -1
  43. package/dist/cdn/themes/journal-dark.tokens.json +1 -1
  44. package/dist/cdn/themes/journal.tokens.json +1 -1
  45. package/dist/cdn/themes/kawaii-dark.tokens.json +1 -1
  46. package/dist/cdn/themes/kawaii.tokens.json +1 -1
  47. package/dist/cdn/themes/magna-dark.tokens.json +1 -1
  48. package/dist/cdn/themes/magna.tokens.json +1 -1
  49. package/dist/cdn/themes/midnight.tokens.json +1 -1
  50. package/dist/cdn/themes/minimal-dark.tokens.json +1 -1
  51. package/dist/cdn/themes/minimal.tokens.json +1 -1
  52. package/dist/cdn/themes/modern-dark.tokens.json +1 -1
  53. package/dist/cdn/themes/modern.tokens.json +1 -1
  54. package/dist/cdn/themes/nes-dark.tokens.json +1 -1
  55. package/dist/cdn/themes/nes.tokens.json +1 -1
  56. package/dist/cdn/themes/neumorphism-dark.tokens.json +1 -1
  57. package/dist/cdn/themes/neumorphism.tokens.json +1 -1
  58. package/dist/cdn/themes/nord-dark.tokens.json +1 -1
  59. package/dist/cdn/themes/nord.tokens.json +1 -1
  60. package/dist/cdn/themes/organic-dark.tokens.json +1 -1
  61. package/dist/cdn/themes/organic.tokens.json +1 -1
  62. package/dist/cdn/themes/rose-pine-dark.tokens.json +1 -1
  63. package/dist/cdn/themes/rose-pine.tokens.json +1 -1
  64. package/dist/cdn/themes/rough-dark.tokens.json +1 -1
  65. package/dist/cdn/themes/rough.tokens.json +1 -1
  66. package/dist/cdn/themes/solarized-dark.tokens.json +1 -1
  67. package/dist/cdn/themes/solarized.tokens.json +1 -1
  68. package/dist/cdn/themes/startup-dark.tokens.json +1 -1
  69. package/dist/cdn/themes/startup.tokens.json +1 -1
  70. package/dist/cdn/themes/super2026-dark.tokens.json +1 -1
  71. package/dist/cdn/themes/super2026.tokens.json +1 -1
  72. package/dist/cdn/themes/swiss-dark.tokens.json +1 -1
  73. package/dist/cdn/themes/swiss.tokens.json +1 -1
  74. package/dist/cdn/themes/terminal.tokens.json +1 -1
  75. package/dist/cdn/themes/tokyo-night-dark.tokens.json +1 -1
  76. package/dist/cdn/themes/tokyo-night.tokens.json +1 -1
  77. package/dist/cdn/themes/vaporwave-dark.tokens.json +1 -1
  78. package/dist/cdn/themes/vaporwave.tokens.json +1 -1
  79. package/dist/cdn/themes/win9x-dark.tokens.json +1 -1
  80. package/dist/cdn/themes/win9x.tokens.json +1 -1
  81. package/dist/cdn/vanilla-breeze-autoload.js +1 -1
  82. package/dist/cdn/vanilla-breeze-core.css +1 -1
  83. package/dist/cdn/vanilla-breeze-core.js +1 -1
  84. package/dist/cdn/vanilla-breeze.css +1 -1
  85. package/dist/cdn/vanilla-breeze.js +1 -1
  86. package/package.json +3 -3
@@ -342,7 +342,7 @@ svg {
342
342
  <span class="description" part="description"><slot name="description" data-slot="description"></slot></span>
343
343
  <span class="icon" part="icon"><slot name="icon" data-slot="icon"></slot></span>
344
344
  </div>
345
- `,lr=class extends k{static get observedAttributes(){return["trend","loading"]}setup(){if(this.shadowRoot)for(let t of au){let i=this.shadowRoot.querySelector(`slot[name="${t}"]`);this.#t(t,i)}else{let t=this.attachShadow({mode:"open"});t.innerHTML=wv;for(let i of au){let s=t.querySelector(`slot[name="${i}"]`);s?.addEventListener("slotchange",()=>this.#t(i,s)),this.#t(i,s)}}this.#e(),this.#i(),this.#n()}attributeChangedCallback(t){this.isConnected&&(t==="trend"?this.#e():t==="loading"&&this.#i())}#t(t,i){let s=!!i&&i.assignedNodes({flatten:!0}).some(n=>n.nodeType===Node.ELEMENT_NODE||n.nodeType===Node.TEXT_NODE&&n.textContent.trim().length>0);this.setState(`has-${t}`,s)}#e(){let t=(this.getAttribute("trend")||"").toLowerCase();for(let i of vv)this.setState(`trend-${i}`,i===t)}#i(){let t=this.hasAttribute("loading");this.setState("loading",t),t?this.setAttribute("aria-busy","true"):this.getAttribute("aria-busy")==="true"&&this.removeAttribute("aria-busy")}#n(){let t=this.closest("a[href]");this.setState("interactive",!!t)}};E("score-card",lr);var Av=0;function Xi(e,t){return e.matches("content-swap")?t:`data-${t}`}function Ki(e){let t=e.querySelector(':scope > [data-face="front"]'),i=e.querySelector(':scope > [data-face="back"]');if(!t||!i)return;e.style.viewTransitionName||(e.style.viewTransitionName=`content-swap-${++Av}`);let s=e.matches("content-swap");s||e.setAttribute("data-swap-init","");let n=[];function r(l,u,d,h){l.addEventListener(u,d,h),n.push(()=>l.removeEventListener(u,d,h))}let a=[...e.querySelectorAll("[data-swap]")].filter(l=>l.parentElement?.closest("content-swap, [data-swap]")===e),o=a.length===0,c=e.querySelector(":scope > [data-swap-toggle]");if(o){if(!c){let l=document.createElement("button");l.type="button",l.setAttribute("data-swap-toggle",""),l.textContent="Show back",e.append(l),c=l}r(c,"click",l=>{l.stopPropagation(),Ot(e,l.detail===0?"keyboard":"pointer")}),r(e,"click",l=>{let d=l.target.closest?.(kv);d&&d!==e&&e.contains(d)||Ot(e,"pointer")})}else c&&!c.hasAttribute("data-swap")&&c.remove(),c=null,a.forEach(l=>{let u=l.matches(Ev);r(l,"click",d=>{d.stopPropagation();let h=u&&d.detail===0;Ot(e,h?"keyboard":"pointer")}),!u&&(l.hasAttribute("role")||(l.setAttribute("role","button"),n.push(()=>l.removeAttribute("role"))),l.hasAttribute("tabindex")||(l.setAttribute("tabindex","0"),n.push(()=>l.removeAttribute("tabindex"))),r(l,"keydown",d=>{d.target===l&&(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),Ot(e,"keyboard"))}))});if(e.matches('[data-gesture="flick"], [data-gesture="swipe"]')&&(r(e,"swipe-left",()=>Ot(e,"pointer")),r(e,"swipe-right",()=>Ot(e,"pointer"))),!s){let l=new MutationObserver(()=>Yi(e,t,i));l.observe(e,{attributes:!0,attributeFilter:["data-swapped"]}),n.push(()=>l.disconnect())}return Yi(e,t,i),Sv([t,i]),()=>{for(let l of n)l();n.length=0}}var Ev='button, a[href], summary, input:is([type="button"], [type="submit"], [type="reset"])',kv='a[href], button, input, select, textarea, label, summary, [contenteditable=""], [contenteditable="true"], [tabindex]';function Sv(e){let t=e.map(i=>i.style.transition);for(let i of e)i.style.transition="none";for(let i of e)getComputedStyle(i).transform;e.forEach((i,s)=>{i.style.transition=t[s]})}function Yi(e,t,i){let s=e.hasAttribute(Xi(e,"swapped"));t.inert=s,i.inert=!s,e.querySelector(":scope > [data-swap-toggle]")?.setAttribute("aria-pressed",String(s))}function lu(e){return{front:e.querySelector(':scope > [data-face="front"]'),back:e.querySelector(':scope > [data-face="back"]')}}function Ge(e,t,i="api"){let{front:s,back:n}=lu(e);if(!s||!n)return;let r=Xi(e,"swapped");if(t&&e.hasAttribute(r)||!t&&!e.hasAttribute(r))return;let a=document.activeElement,o=()=>{t?e.setAttribute(r,""):e.removeAttribute(r),Yi(e,s,n),xv(e,i);let u=t?n:s,d=t?s:n,h=u.querySelector("[autofocus]");h?h.focus():i==="keyboard"&&d.contains(a)&&Cv(u)},c=u=>{let d=e;typeof d.setState=="function"&&d.setState("transition-running",u)};c(!0);let l=ut(o);l&&l.finished&&typeof l.finished.finally=="function"?l.finished.finally(()=>c(!1)):c(!1)}function Ot(e,t="api"){Ge(e,!e.hasAttribute(Xi(e,"swapped")),t)}function xv(e,t="internal"){e.dispatchEvent(new CustomEvent("content-swap:swap",{detail:{swapped:e.hasAttribute(Xi(e,"swapped")),source:t},bubbles:!0}))}function Cv(e){let t=e.querySelector("[data-swap], button, a, input, select, textarea");t&&t.focus()}var ur=class extends k{static observedAttributes=["swapped"];#t=null;attributeChangedCallback(){if(!this.isConnected)return;let{front:t,back:i}=lu(this);t&&i&&Yi(this,t,i)}setup(){this.#t=Ki(this)??null}teardown(){this.#t?.(),this.#t=null}flip(){Ge(this,!0)}unflip(){Ge(this,!1)}toggle(){Ot(this)}get flipped(){return this.hasAttribute("swapped")}set flipped(t){Ge(this,!!t)}get swapped(){return this.hasAttribute("swapped")}set swapped(t){Ge(this,!!t)}};E("content-swap",ur);function ou(){document.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(e=>{e.querySelector(":scope > [data-face]")&&Ki(e)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ou):ou();var cu=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.hasAttribute("data-swap")&&!s.matches("content-swap")&&!s.hasAttribute("data-swap-init")&&s.querySelector(":scope > [data-face]")&&Ki(s),s.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(n=>{n.querySelector(":scope > [data-face]")&&Ki(n)})}});document.body?cu.observe(document.body,{childList:!0,subtree:!0}):document.addEventListener("DOMContentLoaded",()=>{cu.observe(document.body,{childList:!0,subtree:!0})});var dr=class extends k{#t=null;#e=!1;#i=null;setup(){!this.hasAttribute("role")&&!this.querySelector("nav")&&this.setAttribute("role","navigation"),this.#r("pathname"),this.listen(window,"popstate",this.#s);let t=window.navigation;t&&typeof t.addEventListener=="function"&&this.listen(t,"currententrychange",this.#o)}get items(){return this.#t?this.#t.map(t=>({...t})):Array.from(this.#n()).map(t=>({href:t.getAttribute("href")||"",label:t.textContent?.trim()||""}))}set items(t){if(!Array.isArray(t))return;let i=t.map(s=>({...s}));this.#t&&this.#u(this.#t,i)||(this.#t=i,this.#g(i),this.#e?this.#c(this.#i):this.#r("pathname"),this.dispatchEvent(new CustomEvent("nav-bar:items-changed",{detail:{items:this.items,source:"property"},bubbles:!0,composed:!0})))}get current(){if(this.#e)return this.#i;for(let t of this.#n())if(t.getAttribute("aria-current")==="page")return t.getAttribute("data-route")||t.getAttribute("href")||null;return null}set current(t){let i=this.current,s=t==null?null:String(t);this.#e=!0,this.#i=s,this.#c(s),i!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:i,source:"property"},bubbles:!0,composed:!0}))}releaseCurrent(){this.#e&&(this.#e=!1,this.#i=null,this.#r("pathname"))}refresh(){this.#e||this.#r("pathname")}#n(){let t=this.querySelectorAll("a[data-nav-link]");return t.length>0?t:this.querySelectorAll(":scope > a")}#s=()=>{this.#e||this.#r("popstate")};#o=()=>{queueMicrotask(()=>{this.#e||!this.isConnected||this.#r("navigation")})};#r(t){let i=this.current,s=this.#a();this.#c(s),s==null&&this.#l(),i!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:i,source:t},bubbles:!0,composed:!0}))}#a(){let t=Zi(window.location.pathname),i=window.location.origin,s=Array.from(this.#n());if(s.length===0)return null;let n=this.getAttribute("data-match")==="exact",r=null,a=null,o=-1;for(let l of s){let u=l.getAttribute("href");if(!u||u.startsWith("#"))continue;let d;try{d=new URL(u,document.baseURI)}catch{continue}if(!/^https?:$/.test(d.protocol)||d.origin!==i)continue;let h=Zi(d.pathname);if(h===t){r==null&&(r=l);continue}!n&&h!=="/"&&t.startsWith(h+"/")&&h.length>o&&(a=l,o=h.length)}let c=r||a;return c?c.getAttribute("data-route")||c.getAttribute("href"):null}#l(){let t=Zi(window.location.pathname),i=window.location.origin,s=this.getAttribute("data-match")==="exact",n=null,r=-1;for(let a of this.querySelectorAll("a[data-nav-link]")){let o=a.closest("drop-down, li");if(!(!o||!this.contains(o)))for(let c of o.querySelectorAll("a[href]:not([data-nav-link])")){let l=c.getAttribute("href");if(!l||l.startsWith("#"))continue;let u;try{u=new URL(l,document.baseURI)}catch{continue}if(!/^https?:$/.test(u.protocol)||u.origin!==i)continue;let d=Zi(u.pathname),h=-1;d===t?h=Number.MAX_SAFE_INTEGER:!s&&d!=="/"&&t.startsWith(d+"/")&&(h=d.length),h>r&&(n=a,r=h)}}n&&n.setAttribute("aria-current","true")}#c(t){let i=this.#n();for(let s of i){let n=s.getAttribute("data-route")||s.getAttribute("href");t!=null&&n===t?s.setAttribute("aria-current","page"):s.removeAttribute("aria-current")}}#g(t){this.querySelectorAll(":scope > a").forEach(n=>n.remove());let i=this.querySelector("a[data-nav-link]")!=null,s=document.createDocumentFragment();for(let n of t){let r=this.#f(n);i&&r.setAttribute("data-nav-link",""),s.appendChild(r)}this.appendChild(s)}#f(t){let i=document.createElement("a"),s=Tv(t.href);if(s!=null&&i.setAttribute("href",s),t.route&&i.setAttribute("data-route",t.route),t.external&&(i.target="_blank",i.rel="noopener noreferrer"),t.icon){let n=document.createElement("icon-wc");n.setAttribute("name",String(t.icon)),n.setAttribute("size","sm"),i.appendChild(n)}if(i.appendChild(document.createTextNode(t.label||"")),t.external){let n=document.createElement("span");n.className="sr-only",n.textContent=` ${this.getAttribute("data-label-new-tab")??"(opens in new tab)"}`,i.appendChild(n)}if(t.badge!=null){let n=document.createElement("span");n.className="badge",n.textContent=String(t.badge),i.appendChild(n)}return i}#u(t,i){if(t.length!==i.length)return!1;for(let s=0;s<t.length;s++){let n=Object.keys(t[s]).sort(),r=Object.keys(i[s]).sort();if(n.length!==r.length)return!1;for(let a=0;a<n.length;a++)if(n[a]!==r[a]||t[s][n[a]]!==i[s][r[a]])return!1}return!0}};function Zi(e){let t=e.replace(/\/+$/,"");return t===""?"/":t}function Tv(e){if(e==null||e==="")return"#";let t=String(e),i;try{i=new URL(t,document.baseURI)}catch{return null}return/^https?:$/.test(i.protocol)?t:null}E("nav-bar",dr);var Dv=0,mr=class extends k{#t;#e=[];#i;#n;#s;#o;#r;#a;#l=null;#c=0;#g=0;#f=!1;#u=!1;#p=!1;#y=null;#d=!1;#m=!1;#h=!1;#E=!1;#v=new WeakSet;get currentIndex(){return this.#c}get slideCount(){return this.#e.length}get playing(){return this.#l!==null}setup(){let t=[...this.children];if(t.length===0)return!1;this.#u=window.matchMedia("(prefers-reduced-motion: reduce)").matches||document.documentElement.hasAttribute("data-motion-reduced"),this.#p=this.hasAttribute("transition")&&!!document.startViewTransition,this.hasAttribute("transition")&&!this.#p&&this.removeAttribute("transition"),this.setAttribute("role","region"),this.setAttribute("aria-roledescription","carousel"),!this.hasAttribute("aria-label")&&!this.hasAttribute("aria-labelledby")&&this.setAttribute("aria-label","Carousel"),this.#t=document.createElement("div"),this.#t.className="carousel-track",this.#t.setAttribute("tabindex","0"),this.#t.setAttribute("role","group"),this.#t.setAttribute("aria-label",this.dataset.labelTrack||"Slides");let i=this.getAttribute("item-width");if(i&&i!=="auto"&&i!=="full"&&CSS.supports("inline-size",i)&&this.#t.style.setProperty("--_item-width",i),t.forEach((a,o)=>{a.setAttribute("role","group"),a.setAttribute("aria-roledescription","slide"),a.hasAttribute("aria-label")||(a.setAttribute("aria-label",`${o+1} of ${t.length}`),this.#v.add(a)),this.#t.appendChild(a)}),this.#e=[...this.#t.children],this.hasAttribute("autoplay")&&!this.#u&&this.#b(),this.#n=document.createElement("button"),this.#n.type="button",this.#n.className="carousel-prev",this.#n.setAttribute("aria-label","Previous slide"),this.#n.innerHTML='<icon-wc name="chevron-left" size="sm"></icon-wc>',this.#s=document.createElement("button"),this.#s.type="button",this.#s.className="carousel-next",this.#s.setAttribute("aria-label","Next slide"),this.#s.innerHTML='<icon-wc name="chevron-right" size="sm"></icon-wc>',this.getAttribute("indicators")!=="false"&&(this.#o=document.createElement("div"),this.#o.className="carousel-indicators",this.#o.setAttribute("role","group"),this.#o.setAttribute("aria-label","Slide indicators"),this.#e.forEach((a,o)=>{let c=document.createElement("button");c.type="button",c.className="carousel-dot",c.setAttribute("aria-label",`Go to slide ${o+1}`),o===0&&c.setAttribute("aria-current","true"),this.listen(c,"click",()=>this.goTo(o)),this.#o.appendChild(c)})),this.#r=document.createElement("div"),this.#r.className="carousel-live",this.#r.setAttribute("aria-live","polite"),this.#r.setAttribute("aria-atomic","true"),this.#i&&this.appendChild(this.#i),this.appendChild(this.#n),this.appendChild(this.#t),this.appendChild(this.#s),this.#o&&this.appendChild(this.#o),this.appendChild(this.#r),this.listen(this.#n,"click",()=>this.prev()),this.listen(this.#s,"click",()=>this.next()),this.listen(this.#t,"keydown",this.#H),this.listen(this,"mouseenter",()=>{this.#h=!0,this.#w()}),this.listen(this,"mouseleave",()=>{this.#h=!1,this.#w()}),this.listen(this,"touchstart",()=>{this.#h=!0,this.#w()},{passive:!0}),this.listen(this,"focusin",()=>{this.#E=!0,this.#w()}),this.listen(this,"focusout",a=>{this.contains(a.relatedTarget)||(this.#E=!1,this.#w())}),this.#p){let a=++Dv,o=this.getAttribute("transition")||"fade",c=o==="slide"?"vt-carousel-slide":o==="scale"?"vt-carousel-scale":"vt-carousel";this.#t.style.viewTransitionName=`carousel-${a}`,this.#t.style.viewTransitionClass=c}if(this.#p){let a=this.#t;Promise.resolve().then(()=>(pr(),fr)).then(({addSwipeListener:o})=>{!this.isConnected||this.#t!==a||(this.#y=o(a,{threshold:40}),this.listen(a,"swipe-left",()=>this.#x()?this.prev():this.next()),this.listen(a,"swipe-right",()=>this.#x()?this.next():this.prev()))})}this.#p||(this.#a=new IntersectionObserver(this.#B,{root:this.#t,threshold:.5}),this.#e.forEach(a=>this.#a.observe(a)),"onscrollend"in window&&this.listen(this.#t,"scrollend",()=>{this.#f=!1,this.#M()}));let r=this.#I()??(Number(this.getAttribute("start"))||0);if(this.#p){let a=r>0&&r<this.#e.length?r:0;this.#e.forEach((o,c)=>{o.hidden=c!==a}),this.#D(a)}else r>0&&r<this.#e.length&&this.goTo(r,!1);return this.#R(),this.#h=this.#E=!1,this.#d=this.hasAttribute("autoplay")&&!this.#u&&!this.#m,this.#w(),!0}teardown(){this.#d=!1,this.#L(),this.#a&&(this.#a.disconnect(),this.#a=null),this.#y&&(this.#y(),this.#y=null),this.#t?.parentElement===this&&[...this.#t.children].forEach(t=>this.appendChild(t)),this.#e.forEach(t=>{this.#v.has(t)&&t.removeAttribute("aria-label")}),this.#t?.remove(),this.#i?.remove(),this.#n?.remove(),this.#s?.remove(),this.#o?.remove(),this.#r?.remove(),this.#t=this.#i=this.#n=this.#s=this.#o=this.#r=null,this.#e=[],this.#p=!1,this.#c=0,this.#g=0,this.#f=!1}get slides(){return this.#e.map((t,i)=>({id:t.id||void 0,html:t.innerHTML,label:t.getAttribute("aria-label")||`${i+1} of ${this.#e.length}`}))}set slides(t){let i=Array.isArray(t)?t:[];for(;this.firstChild;)this.firstChild.remove();for(let s of i){let n=document.createElement("div");s.id&&(n.id=s.id),s.label&&n.setAttribute("aria-label",s.label),n.innerHTML=s.html||"",this.appendChild(n)}this._reinit(),this.dispatchEvent(new CustomEvent("carousel-wc:slides-changed",{detail:{slides:i,source:"property"},bubbles:!0}))}next(){let t=this.hasAttribute("loop");this.#c<this.#e.length-1?this.goTo(this.#c+1):t&&this.goTo(0)}prev(){let t=this.hasAttribute("loop");this.#c>0?this.goTo(this.#c-1):t&&this.goTo(this.#e.length-1)}goTo(t,i=!0){if(!(t<0||t>=this.#e.length)){if(this.#p)if(i&&t!==this.#c){let s=t>this.#c?"forward":"backward";document.documentElement.dataset.vtDirection=s,ut(()=>{this.#S(t)}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}else this.#S(t);else{let s=this.#e[t].getBoundingClientRect(),n=this.#t.getBoundingClientRect(),r=this.#x()?s.right-n.right:s.left-n.left,a=i&&!this.#u?"smooth":"instant";this.#t.scrollTo({left:this.#t.scrollLeft+r,behavior:a})}this.#D(t)}}#S(t){this.#e.forEach((i,s)=>{i.hidden=s!==t})}play(){this.#u||!this.#t||(this.#m=!1,this.#d=!0,this.#h=this.#E=!1,this.#i||(this.#b(),this.insertBefore(this.#i,this.firstChild)),this.#w())}pause(){this.#m=!0,this.#d=!1,this.#w()}#b(){let t=document.createElement("button");t.type="button",t.className="carousel-rotate",this.listen(t,"click",()=>{this.#d?this.pause():this.play()}),this.#i=t,this.#k()}#k(){let t=this.#i;if(!t)return;let i=this.#d?"Pause automatic slide show":"Start automatic slide show";t.getAttribute("aria-label")!==i&&(t.setAttribute("aria-label",i),t.innerHTML=`<icon-wc name="${this.#d?"pause":"play"}" size="sm"></icon-wc>`)}#w(){this.#d&&!this.#h&&!this.#E&&!this.#u&&this.isConnected&&!!this.#t?this.#A():this.#L(),this.#k()}#A(){if(this.#l)return;let t=Number(this.getAttribute("autoplay-delay"))||5e3;this.#l=setInterval(()=>this.next(),t),this.#r?.setAttribute("aria-live","off"),this.dispatchEvent(new CustomEvent("carousel-wc:play",{bubbles:!0}))}#L(){this.#r?.setAttribute("aria-live","polite"),this.#l&&(clearInterval(this.#l),this.#l=null,this.dispatchEvent(new CustomEvent("carousel-wc:pause",{bubbles:!0})))}#x(){return getComputedStyle(this).direction==="rtl"}reset(){let t=Number(this.getAttribute("start"))||0;this.goTo(t,!1),this.#N()}#D(t){this.#c=t,this.#R(),this.#G(),this.#r&&(this.#r.textContent=`Slide ${t+1} of ${this.#e.length}`),!this.#f&&(this.#M(),!this.#p&&"onscrollend"in window&&(this.#f=!0))}#M(){this.#c!==this.#g&&(this.#g=this.#c,this.dispatchEvent(new CustomEvent("carousel-wc:change",{detail:{index:this.#c,slide:this.#e[this.#c]},bubbles:!0})))}#R(){let t=this.hasAttribute("loop"),i=this.#c===0,s=this.#c===this.#e.length-1;if(this.#n&&(this.#n.disabled=!t&&i),this.#s&&(this.#s.disabled=!t&&s),this.#o){let n=this.#o.children;for(let r=0;r<n.length;r++)r===this.#c?(n[r].setAttribute("aria-current","true"),n[r].setAttribute("data-active","")):(n[r].removeAttribute("aria-current"),n[r].removeAttribute("data-active"))}}#B=t=>{for(let i of t)if(i.isIntersecting){let s=this.#e.indexOf(i.target);s!==-1&&s!==this.#c&&this.#D(s)}};#H=t=>{let i=(t.key==="ArrowLeft"||t.key==="ArrowRight")&&this.#x();switch(t.key){case"ArrowLeft":t.preventDefault(),i?this.next():this.prev();break;case"ArrowRight":t.preventDefault(),i?this.prev():this.next();break;case"Home":t.preventDefault(),this.goTo(0);break;case"End":t.preventDefault(),this.goTo(this.#e.length-1);break}};#I(){let t=this.getAttribute("persist");if(!t)return null;try{let i=localStorage.getItem(`carousel:${t}`);return i!==null?Number(i):null}catch{return null}}#G(){let t=this.getAttribute("persist");if(t)try{localStorage.setItem(`carousel:${t}`,String(this.#c))}catch{}}#N(){let t=this.getAttribute("persist");if(t)try{localStorage.removeItem(`carousel:${t}`)}catch{}}};E("carousel-wc",mr);var Nv=0,gr=class extends k{static formAssociated=!0;#t;#e;#i;#n;#s=[];#o=[];#r=-1;#a=!1;#l="";#c="";#g;#f=!1;#u;#p;#y=[];constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}get#d(){return this.hasAttribute("multiple")}setup(){let t=this.querySelector(":scope > input")||this.querySelector(":scope > .tags-input-area > input");if(!t)return!1;this.#e=t;let i=this.#e.getAttribute("name");i&&(this.hasAttribute("name")||this.setAttribute("name",i),this.#e.removeAttribute("name"));let s=this.querySelector("ul, ol");if(!s)return!1;if(this.#i=s,this.#d){let c=this.querySelector(":scope > .tags-input-area");if(!c){c=document.createElement("div"),c.className="tags-input-area";let u=this.querySelector(":scope > pop-over[data-combobox-host]")||this.#i;this.insertBefore(c,u)}this.#u=c,this.#e.parentNode!==this.#u&&this.#u.appendChild(this.#e);let l=this.querySelector(":scope > [data-combobox-live]");l||(l=document.createElement("div"),l.setAttribute("aria-live","polite"),l.setAttribute("aria-atomic","true"),l.setAttribute("data-combobox-live",""),l.className="visually-hidden",this.appendChild(l)),this.#p=l}let n=this.getAttribute("placeholder");n&&!this.#e.getAttribute("placeholder")&&this.#e.setAttribute("placeholder",n);let r=`cb${++Nv}`;this.#i.id||(this.#i.id=`combobox-listbox-${r}`),this.#e.setAttribute("role","combobox"),this.#e.setAttribute("aria-expanded","false"),this.#e.setAttribute("aria-autocomplete","list"),this.#e.setAttribute("aria-controls",this.#i.id),this.#e.setAttribute("autocomplete","off"),this.#i.setAttribute("role","listbox"),this.#d&&this.#i.setAttribute("aria-multiselectable","true");let a=this.#d?this.#u:this.#e;a.id||(a.id=`combobox-anchor-${r}`);let o=this.querySelector(":scope > pop-over[data-combobox-host]");if(o?this.#n=o:(this.#n=document.createElement("pop-over"),this.#n.setAttribute("data-combobox-host",""),this.#n.id=`combobox-pop-${r}`,this.#n.dataset.mode="manual",this.#n.dataset.position="bottom-start",this.#n.dataset.anchor=a.id,this.#n.appendChild(this.#i),this.appendChild(this.#n)),this.#n.dataset.anchor=a.id,this.#i.parentElement!==this.#n&&this.#n.appendChild(this.#i),this.#E(),!this.#d){let c=this.getAttribute("value");c&&this.#N(c,!1),this.#g===void 0&&(this.#g=this.#l)}return this.listen(this.#e,"input",this.#w),this.listen(this.#e,"keydown",this.#A),this.listen(this.#e,"focus",this.#L),this.listen(this.#e,"click",this.#x),this.listen(this.#i,"click",this.#D),this.listen(this.#i,"pointerdown",this.#M),this.listen(document,"click",this.#R),this.listen(this.#n,"pop-over:hide",this.#et),this.listen(this,"invalid",this.#m),this.#$(),this.#C(),this.#q(),this.#h(this.matches(":disabled")),!0}teardown(){}#m=()=>{this.#e.setAttribute("aria-invalid","true")};formDisabledCallback(t){this.#e&&this.#h(t)}#h(t){this.#f=t,t&&this.#q();let i=this.#b(),s=this.#d&&i>0&&this.#y.length>=i;if(this.#e.disabled=t||s,this.#u)for(let n of this.#u.querySelectorAll(".tag button"))n.disabled=t}#E(){this.#s=Array.from(this.#i.querySelectorAll(":scope > li[data-value]")),this.#s.forEach((t,i)=>{t.setAttribute("role","option"),t.setAttribute("aria-selected","false"),t.id||(t.id=`${this.#i.id}-option-${i}`)}),this.#o=[...this.#s]}#v(t,i){if(this.#y.some(o=>o.value===t))return;let s=this.#b();if(s&&this.#y.length>=s)return;this.#y.push({value:t,label:i});let n=document.createElement("span");n.className="tag",n.dataset.value=t,n.textContent=i+" ";let r=document.createElement("button");r.type="button",r.setAttribute("aria-label",`Remove ${i}`),r.innerHTML="&times;",r.disabled=this.#f,r.addEventListener("click",o=>{o.stopPropagation(),this.#S(t)}),n.appendChild(r),this.#u.insertBefore(n,this.#e);let a=this.#s.find(o=>o.getAttribute("data-value")===t);a&&a.setAttribute("aria-selected","true"),this.#k(`${i} added`),this.#e.value="",this.#B(""),this.#$(),this.#C(),this.#P(),s&&this.#y.length>=s&&(this.#e.disabled=!0,this.#q())}#S(t){let i=this.#y.findIndex(o=>o.value===t);if(i===-1)return;let s=this.#y.splice(i,1)[0],n=this.#u.querySelector(`.tag[data-value="${CSS.escape(t)}"]`);n&&n.remove();let r=this.#s.find(o=>o.getAttribute("data-value")===t);r&&r.setAttribute("aria-selected","false"),this.#k(`${s.label} removed`),this.#b()&&this.#e.disabled&&(this.#e.disabled=this.#f),this.#B(this.#e.value.trim()),this.#$(),this.#C(),this.#P(),this.#e.focus()}#b(){let t=this.getAttribute("max");return t?parseInt(t,10):0}#k(t){this.#p&&(this.#p.textContent="",requestAnimationFrame(()=>{this.#p.textContent=t}))}#w=()=>{let t=this.#e.value.trim();if(!this.#d&&this.#l){let i=this.#i.querySelector('[aria-selected="true"]');i&&i.setAttribute("aria-selected","false"),this.#l="",this.#c="",this.removeAttribute("value"),this.#$(),this.#C()}this.#B(t),this.#T()};#A=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.#a||this.#T(),this.#H(this.#r+1);break;case"ArrowUp":t.preventDefault(),this.#a||this.#T(),this.#H(this.#r-1);break;case"Home":this.#a&&(t.preventDefault(),this.#H(0));break;case"End":this.#a&&(t.preventDefault(),this.#H(this.#o.length-1));break;case"Enter":if(this.#a&&this.#r>=0&&this.#o[this.#r]){t.preventDefault();let i=this.#o[this.#r];this.#d?this.#v(i.getAttribute("data-value"),i.textContent.trim()):this.#G(i)}else if(this.#d&&this.hasAttribute("custom")&&this.#e.value.trim()){t.preventDefault();let i=this.#e.value.trim();this.#v(i,i)}break;case"Backspace":if(this.#d&&!this.#e.value&&this.#y.length>0){let i=this.#y[this.#y.length-1];this.#S(i.value)}break;case",":if(this.#d&&this.hasAttribute("custom")&&this.#e.value.trim()){t.preventDefault();let i=this.#e.value.trim();this.#v(i,i)}break;case"Escape":this.#a&&(t.preventDefault(),t.stopPropagation(),this.#q(),this.#e.focus());break;case"Tab":this.#a&&this.#q();break}};#L=()=>{this.#d?(this.#B(this.#e.value.trim()),this.#T()):(this.#e.value||!this.#l)&&(this.#B(this.#e.value.trim()),this.#T())};#x=()=>{this.#a||(this.#B(this.#e.value.trim()),this.#T())};#D=t=>{let i=t.target.closest("li[data-value]");i&&this.#o.includes(i)&&(this.#d?this.#v(i.getAttribute("data-value"),i.textContent.trim()):this.#G(i))};#M=t=>{t.preventDefault()};#R=t=>{this.#a&&!this.contains(t.target)&&this.#q()};#B(t){let i=this.getAttribute("filter")||"contains",s=t.toLowerCase(),n=this.#d?new Set(this.#y.map(r=>r.value)):null;this.#o=[],this.#s.forEach(r=>{let a=r.getAttribute("data-value"),o=r.textContent.trim().toLowerCase();if(n&&n.has(a)){r.hidden=!0;return}let c;t?i==="startsWith"?c=o.startsWith(s):c=o.includes(s):c=!0,r.hidden=!c,c&&this.#o.push(r)}),this.#r=-1,this.#I(),this.setState("no-matches",this.#o.length===0)}#H(t){if(this.#o.length===0)return;t<0&&(t=this.#o.length-1),t>=this.#o.length&&(t=0),this.#r>=0&&this.#o[this.#r]&&this.#o[this.#r].removeAttribute("data-active"),this.#r=t;let i=this.#o[t];i.setAttribute("data-active",""),i.scrollIntoView({block:"nearest"}),this.#e.setAttribute("aria-activedescendant",i.id)}#I(){this.#s.forEach(t=>t.removeAttribute("data-active")),this.#e.removeAttribute("aria-activedescendant")}#G(t,i="internal"){let s=t.getAttribute("data-value")||"",n=t.textContent.trim();if(this.#l===s){this.#e.value=n,this.#q(),this.#e.focus();return}this.#s.forEach(r=>r.setAttribute("aria-selected","false")),t.setAttribute("aria-selected","true"),this.#l=s,this.#c=n,this.#e.value=n,this.setAttribute("value",s),this.#$(),this.#C(),this.#q(),this.#e.focus(),this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{value:s,label:n,source:i}}))}#N(t,i=!0,s="api"){let n=this.#s.find(r=>r.getAttribute("data-value")===t);n&&(i?this.#G(n,s):(this.#s.forEach(r=>r.setAttribute("aria-selected","false")),n.setAttribute("aria-selected","true"),this.#l=t,this.#c=n.textContent.trim(),this.#e.value=this.#c,this.setAttribute("value",t)))}#T(){this.#a||this.#f||(this.#a=!0,this.setAttribute("open",""),this.#e.setAttribute("aria-expanded","true"),this.#n?.show(),this.dispatchEvent(new CustomEvent("combo-box:open",{bubbles:!0})))}#q(){this.#a&&(this.#a=!1,this.removeAttribute("open"),this.#e.setAttribute("aria-expanded","false"),this.#r=-1,this.#I(),this.#n?.hide(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))}#et=()=>{this.#a&&(this.#a=!1,this.removeAttribute("open"),this.#e.setAttribute("aria-expanded","false"),this.#r=-1,this.#I(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))};#$(){if(this.#d)if(this.#y.length>0){let t=new FormData,i=this.getAttribute("name")||"";for(let s of this.#y)t.append(i,s.value);this.#t.setFormValue(t)}else this.#t.setFormValue(null);else this.#l?this.#t.setFormValue(this.#l,this.#c):this.#t.setFormValue(null)}#C(){this.hasAttribute("required")?this.#d?this.#y.length===0?this.#t.setValidity({valueMissing:!0},"Please select at least one option",this.#e):this.#t.setValidity({}):this.#l?this.#t.setValidity({}):this.#t.setValidity({valueMissing:!0},"Please select an option",this.#e):this.#t.setValidity({}),this.#t.validity.valid&&this.#e.removeAttribute("aria-invalid")}#P(){this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{values:this.#y.map(t=>t.value),labels:this.#y.map(t=>t.label),source:"internal"}}))}formResetCallback(){this.#d?(this.#u.querySelectorAll(".tag").forEach(t=>t.remove()),this.#y=[],this.#e.value="",this.#e.disabled=this.#f):(this.#l="",this.#c="",this.#e.value="",this.removeAttribute("value")),this.#s.forEach(t=>{t.setAttribute("aria-selected","false"),t.hidden=!1}),this.#o=[...this.#s],this.#r=-1,this.#I(),this.#q(),this.#e.removeAttribute("aria-invalid"),!this.#d&&this.#g&&this.#N(this.#g,!1),this.#$(),this.#C()}formStateRestoreCallback(t){t&&(this.#d||(this.#N(t,!1),this.#$(),this.#C()))}get value(){return this.#l}set value(t){t?this.#N(t):this.#Y()}#Y(){this.#s.forEach(t=>t.setAttribute("aria-selected","false")),this.#l="",this.#c="",this.#e&&(this.#e.value=""),this.removeAttribute("value"),this.#$(),this.#C()}get label(){return this.#c}get values(){return this.#y.map(t=>t.value)}get labels(){return this.#y.map(t=>t.label)}static get observedAttributes(){return["value","disabled"]}attributeChangedCallback(t,i,s){if(!this.#e)return;if(t==="disabled"){this.#h(this.matches(":disabled"));return}let n=s??"";t==="value"&&n!==this.#l&&(n?(this.#N(n,!1),this.#$(),this.#C()):this.#Y())}};E("combo-box",gr);var Qi=86400,Mv=0;function ce(e){return String(e).padStart(2,"0")}function qt(e){if(!e)return null;let t=/^(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?$/.exec(String(e).trim());if(!t)return null;let i=Number(t[1]),s=Number(t[2]),n=Number(t[3]||0);return i>23||s>59||n>59?null:i*3600+s*60+n}function gu(e,t){let i=Math.floor(e/3600),s=Math.floor(e%3600/60),n=e%60;return t?`${ce(i)}:${ce(s)}:${ce(n)}`:`${ce(i)}:${ce(s)}`}function yt(e,t){return(e%t+t)%t}function _v(e){try{let{hourCycle:t}=new Intl.DateTimeFormat(e||void 0,{hour:"numeric"}).resolvedOptions();return t==="h12"||t==="h11"?"12h":"24h"}catch{return"24h"}}function $v(e){let t={am:"AM",pm:"PM",periodFirst:!1};try{let i=new Intl.DateTimeFormat(e||void 0,{hour:"numeric",minute:"2-digit",hourCycle:"h12"}),s=i.formatToParts(new Date(2e3,0,1,9,0)),n=i.formatToParts(new Date(2e3,0,1,21,0)),r=s.find(o=>o.type==="dayPeriod")?.value,a=n.find(o=>o.type==="dayPeriod")?.value;if(r&&a){t.am=r,t.pm=a;let o=s.map(c=>c.type);t.periodFirst=o.indexOf("dayPeriod")<o.indexOf("hour")}}catch{}return t}function Iv(e,t){let i=e.trim().toLowerCase();if(!i)return null;let s=null,n=[[t.am.toLowerCase(),"AM"],[t.pm.toLowerCase(),"PM"],["a.m.","AM"],["p.m.","PM"],["am","AM"],["pm","PM"],["a","AM"],["p","PM"]].sort((l,u)=>u[0].length-l[0].length);for(let[l,u]of n)if(l){if(i.endsWith(l)){s=u,i=i.slice(0,-l.length).trim();break}if(i.startsWith(l)){s=u,i=i.slice(l.length).trim();break}}if(!/^\d{1,2}(?:[:.]\d{1,2}){0,2}$/.test(i))return null;let r=i.split(/[:.]/).map(Number),a=r[0],o=r[1]??0,c=r[2]??0;if(o>59||c>59)return null;if(s){if(a<1||a>12)return null;s==="AM"?a=a===12?0:a:a=a===12?12:a+12}else if(a>23)return null;return a*3600+o*60+c}var br=class extends k{static formAssociated=!0;static get observedAttributes(){return["disabled","required"]}#t;#e=`tp${++Mv}`;#i=!1;#n;#s;#o;#r;#a;#l=[];#c=null;#g=[];#f="24h";#u="";#p={am:"AM",pm:"PM",periodFirst:!1};#y=!1;#d=null;#m=null;#h=null;#E=60;#v;#S;#b=!1;#k="";#w=!1;constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}setup(){let t=this.querySelector(':scope > input[type="time"]');if(!t)return!1;this.#n=t,this.#u=this.closest("[lang]")?.lang||navigator.language||"en-US",this.#p=$v(this.#u);let i=this.getAttribute("data-format");this.#f=i==="12h"||i==="24h"?i:_v(this.#u),this.#L();let s=t.getAttribute("name");s&&(this.hasAttribute("name")||this.setAttribute("name",s),t.removeAttribute("name")),t.hasAttribute("disabled")&&(t.removeAttribute("disabled"),this.hasAttribute("disabled")||this.setAttribute("disabled",""));let n=`${this.#e}-no-form`,r=t.getAttribute("form");return r&&r!==n&&!this.hasAttribute("form")&&this.setAttribute("form",r),t.setAttribute("form",n),this.#v===void 0&&(this.#v=t.defaultValue),this.#S!==void 0&&(t.value=this.#S,this.#S=void 0),this.#d=qt(t.value),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"),t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.listen(t,"click",this.#M),this.listen(t,"focus",this.#D),this.#B(),this.#H(),this.#i=!0,this.#R(),this.#st(),this.#F(!1),this.#nt(),this.listen(document,"click",this.#q),this.listen(this,"focusout",this.#et),this.listen(this,"invalid",this.#J),this.#A(this.matches(":disabled")),!0}teardown(){this.#b=!1,this.#o?.remove(),this.#a?.remove(),this.#l=[],this.#g=[],this.#c=null,this.#i=!1,clearTimeout(this.#Q),this.#j=""}attributeChangedCallback(t){this.#i&&(t==="disabled"&&this.#A(this.matches(":disabled")),t==="required"&&this.#nt())}formDisabledCallback(t){this.#i&&this.#A(t)}#A(t){this.#s.disabled=t,this.#r.disabled=t,t&&this.#T()}#L(){let t=this.#n.getAttribute("step");if(t&&t.trim().toLowerCase()==="any")this.#E=null;else{let s=Number(t);this.#E=Number.isFinite(s)&&s>0?Math.max(1,Math.round(s)):60}this.#m=qt(this.#n.getAttribute("min")),this.#h=qt(this.#n.getAttribute("max"));let i=qt(this.#n.value);this.#y=this.#E!==null&&this.#E%60!==0||i!==null&&i%60!==0}#x(t,i){return this.dataset[`label${t}`]||i}#D=()=>{this.#i&&!this.#s.disabled&&this.#s.focus()};#M=t=>{t.preventDefault(),this.#D()};#R(){let t=new Set([...Array.from(this.#n.labels||[]),...Array.from(this.#t.labels||[])]),i=[];for(let a of t)a.id||(a.id=`${this.#e}-label-${i.length}`),i.push(a.id),this.listen(a,"click",this.#D);let s=this.#s,n=i.join(" ")||this.#n.getAttribute("aria-labelledby")||this.getAttribute("aria-labelledby");n?s.setAttribute("aria-labelledby",n):s.setAttribute("aria-label",this.#n.getAttribute("aria-label")||this.getAttribute("aria-label")||this.#x("Input","Time"));let r=this.#n.getAttribute("aria-describedby");r&&s.setAttribute("aria-describedby",r)}#B(){this.#o=document.createElement("div"),this.#o.className="time-trigger";let t=document.createElement("input");t.type="text",t.className="time-input",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded","false"),t.setAttribute("autocomplete","off"),t.setAttribute("placeholder",this.#x("Placeholder","Type a time\u2026")),this.#s=t,this.#o.appendChild(t),this.#r=document.createElement("button"),this.#r.type="button",this.#r.className="time-trigger-icon",this.#r.setAttribute("aria-label",this.#x("Toggle","Toggle time spinners")),this.#r.setAttribute("tabindex","-1");let i=document.createElement("icon-wc");i.setAttribute("name","clock"),i.setAttribute("size","sm"),i.setAttribute("aria-hidden","true"),this.#r.appendChild(i),this.#o.appendChild(this.#r),this.appendChild(this.#o),this.listen(this.#r,"click",s=>{s.stopPropagation(),this.#b?this.#T():this.#N(),this.#s.focus()}),this.listen(t,"focus",()=>t.select()),this.listen(t,"keydown",this.#C),this.listen(t,"blur",this.#Y)}#H(){let t=`${this.#e}-panel`;this.#a=document.createElement("div"),this.#a.className="time-panel",this.#a.id=t,this.#a.setAttribute("role","dialog"),this.#a.setAttribute("aria-modal","false"),this.#a.setAttribute("aria-label",this.#x("Dialog","Choose time")),this.#s.setAttribute("aria-controls",t);let i=this.#E??60,s=i>=3600&&i%3600===0?i/3600:1,n=i>=60&&i<3600&&i%60===0?i/60:1,r=i<60?i:1,a=i>=3600&&i%3600===0,o=this.#f==="12h",c=null;o&&(c=document.createElement("button"),c.type="button",c.className="period-toggle"),this.#c=c,c&&this.#p.periodFirst&&this.#a.appendChild(c);let l=!o&&this.#m!==null&&this.#h!==null&&this.#m<=this.#h;this.#l=[],this.#l.push(this.#I("hour",this.#x("Hours","Hours"),o?1:l?Math.floor(this.#m/3600):0,o?12:l?Math.floor(this.#h/3600):23,s,!1)),this.#a.appendChild(this.#G()),this.#l.push(this.#I("minute",this.#x("Minutes","Minutes"),0,59,n,a)),this.#y&&(this.#a.appendChild(this.#G()),this.#l.push(this.#I("second",this.#x("Seconds","Seconds"),0,59,r,!1))),c&&!this.#p.periodFirst&&this.#a.appendChild(c),this.#g=[...this.#a.querySelectorAll(".time-spinner, .period-toggle")],this.appendChild(this.#a);for(let u of this.#l)this.listen(u.incBtn,"click",()=>this.#z(u,u.delta,"pointer")),this.listen(u.decBtn,"click",()=>this.#z(u,-u.delta,"pointer")),this.listen(u.el,"keydown",d=>this.#V(d,u));if(this.#c){let u=this.#c;this.listen(u,"click",d=>{this.#X(d.detail===0?"keyboard":"pointer")}),this.listen(u,"keydown",d=>this.#_(d,u))}}#I(t,i,s,n,r,a){let o=document.createElement("div");o.className="time-spinner",o.dataset.unit=t,o.setAttribute("role","spinbutton"),o.setAttribute("aria-label",i),o.setAttribute("aria-valuemin",String(s)),o.setAttribute("aria-valuemax",String(n)),a&&o.setAttribute("aria-readonly","true"),o.setAttribute("tabindex","0");let c=document.createElement("button");c.type="button",c.className="time-inc",c.setAttribute("aria-hidden","true"),c.setAttribute("tabindex","-1"),c.textContent="\u25B2",a&&(c.disabled=!0);let l=document.createElement("span");l.className="time-value";let u=document.createElement("button");return u.type="button",u.className="time-dec",u.setAttribute("aria-hidden","true"),u.setAttribute("tabindex","-1"),u.textContent="\u25BC",a&&(u.disabled=!0),o.append(c,l,u),this.#a.appendChild(o),{unit:t,el:o,valueEl:l,incBtn:c,decBtn:u,min:s,max:n,delta:r,readOnly:a}}#G(){let t=document.createElement("span");return t.className="time-sep",t.setAttribute("aria-hidden","true"),t.textContent=":",t}#N(){this.#b||this.#s.disabled||(this.#b=!0,this.#a.setAttribute("data-open",""),this.#s.setAttribute("aria-expanded","true"))}#T(){this.#b&&(this.#b=!1,this.#a.removeAttribute("data-open"),this.#s.setAttribute("aria-expanded","false"))}#q=t=>{this.#b&&!this.contains(t.target)&&this.#T()};#et=t=>{let i=t.relatedTarget;i instanceof Node&&this.contains(i)||this.#T()};#$(t){try{let i=new Date(2e3,0,1,Math.floor(t/3600),Math.floor(t%3600/60),t%60),s={hour:this.#f==="12h"?"numeric":"2-digit",minute:"2-digit",hourCycle:this.#f==="12h"?"h12":"h23"};return this.#y&&(s.second="2-digit"),new Intl.DateTimeFormat(this.#u,s).format(i)}catch{return gu(t,this.#y)}}#C=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation(),this.#P(),this.#b&&this.#T();return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#b||this.#N(),this.#g[0]?.focus();return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#b&&this.#T(),this.#st();return}};#P(){let t=this.#s.value.trim();if(!t)this.#W(null,"keyboard");else{let i=Iv(t,this.#p);i!==null&&this.#W(i,"keyboard")}this.#st()}#Y=t=>{t.relatedTarget instanceof Node&&this.contains(t.relatedTarget)||(this.#P(),this.#J())};#J=()=>{this.#i&&(this.#w||(this.#w=!0,this.#nt()),this.#n.dispatchEvent(new Event("blur",{bubbles:!0})))};#_(t,i){let s=this.#g.indexOf(i),n=getComputedStyle(this).direction==="rtl",r=n?"ArrowLeft":"ArrowRight",a=n?"ArrowRight":"ArrowLeft";return t.key===r||t.key===a?(t.preventDefault(),this.#g[s+(t.key===r?1:-1)]?.focus(),!0):t.key==="Escape"?(t.preventDefault(),t.stopPropagation(),this.#T(),this.#s.focus(),!0):!1}#V(t,i){if(this.#_(t,i.el))return;let s=i.unit==="hour"?i.delta:Math.ceil(10/i.delta)*i.delta;switch(t.key){case"ArrowUp":t.preventDefault(),this.#z(i,i.delta,"keyboard");break;case"ArrowDown":t.preventDefault(),this.#z(i,-i.delta,"keyboard");break;case"PageUp":t.preventDefault(),this.#z(i,s,"keyboard");break;case"PageDown":t.preventDefault(),this.#z(i,-s,"keyboard");break;case"Home":t.preventDefault(),this.#U(i,i.min,1,"keyboard");break;case"End":t.preventDefault(),this.#U(i,i.max,-1,"keyboard");break;default:/^\d$/.test(t.key)&&(t.preventDefault(),this.#K(t.key,i))}}#j="";#Q;#K(t,i){clearTimeout(this.#Q),this.#j+=t;let s=()=>{let n=Math.min(Math.max(Number(this.#j),i.min),i.max);this.#j="",this.#U(i,n,0,"keyboard")};this.#j.length>=2||Number(this.#j)*10>i.max?s():this.#Q=setTimeout(s,800)}#O(){return this.#it(this.#m??0,1)}#it(t,i){let s=yt(t,Qi),n=this.#E;if(n){let o=this.#m??0,c=(s-o)/n,l=i>0?Math.floor(c):i<0?Math.ceil(c):Math.round(c);s=yt(o+l*n,Qi)}let r=this.#m,a=this.#h;return r!==null&&a!==null&&r<=a?(s<r&&(s=r),s>a&&(s=n?r+Math.floor((a-r)/n)*n:a)):r!==null&&a===null&&s<r?s=r:a!==null&&r===null&&s>a&&(s=n?Math.floor(a/n)*n:a),s}#z(t,i,s){if(t.readOnly)return;if(this.#d===null){this.#W(this.#O(),s);return}let n=this.#d,r=Math.floor(n/3600),a=Math.floor(n%3600/60),o=n%60,c;t.unit==="hour"?c=(this.#f==="12h"?yt(r%12+i,12)+(r>=12?12:0):yt(r+i,24))*3600+a*60+o:t.unit==="minute"?c=r*3600+yt(a+i,60)*60+o:c=r*3600+a*60+yt(o+i,60),this.#W(this.#it(c,i),s)}#U(t,i,s,n){if(t.readOnly)return;let r=this.#d??this.#O(),a=Math.floor(r/3600),o=Math.floor(r%3600/60),c=r%60,l;t.unit==="hour"?l=(this.#f==="12h"?i%12+(a>=12?12:0):i)*3600+o*60+c:t.unit==="minute"?l=a*3600+i*60+c:l=a*3600+o*60+i,this.#W(this.#it(l,s),n)}#X(t){let i=this.#d??this.#O();this.#W(this.#it(yt(i+12*3600,Qi),0),t)}#W(t,i){let s=this.value;return this.#d=t,t!==null&&t%60!==0&&!this.#y&&(this.#y=!0),this.#st(),this.value===s?!1:(this.#F(),this.#nt(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{...this.#Z(),source:i}})),!0)}#Z(){let t=this.#d;return t===null?{value:"",hours:null,minutes:null,seconds:null}:{value:this.value,hours:Math.floor(t/3600),minutes:Math.floor(t%3600/60),seconds:t%60}}#st(){if(!this.#i)return;let t=this.#d;this.#s.value=t===null?"":this.#$(t);let i=this.#x("Empty","Not set"),s=t===null?null:Math.floor(t/3600),n={hour:s===null?null:this.#f==="12h"?s%12||12:s,minute:t===null?null:Math.floor(t%3600/60),second:t===null?null:t%60},r=s===null?"":s>=12?this.#p.pm:this.#p.am;for(let a of this.#l){let o=n[a.unit];if(a.valueEl.textContent=o===null?"--":ce(o),o===null){a.el.removeAttribute("aria-valuenow"),a.el.setAttribute("aria-valuetext",i);continue}a.el.setAttribute("aria-valuenow",String(o));let c;try{c=a.unit==="hour"&&this.#f==="12h"?new Intl.DateTimeFormat(this.#u,{hour:"numeric",hourCycle:"h12"}).format(new Date(2e3,0,1,s)):new Intl.NumberFormat(this.#u,{style:"unit",unit:a.unit,unitDisplay:"long"}).format(o)}catch{c=a.unit==="hour"&&r?`${o} ${r}`:String(o)}a.el.setAttribute("aria-valuetext",c)}this.#c&&(this.#c.textContent=r||"--",this.#c.setAttribute("aria-label",`${this.#x("Period","AM/PM")}: ${r||i}`))}#F(t=!0){let i=this.value;this.#t.setFormValue(i||null),this.#n.value=i,t&&this.#n.dispatchEvent(new Event("input",{bubbles:!0}))}#tt(t,i,s,n={}){let r=this.#n.getAttribute(`data-message-${t.toLowerCase()}`)??this.#x(i,s);for(let[a,o]of Object.entries(n))r=r.replaceAll(`{${a}}`,o);return r}#nt(){if(!this.#i)return!1;let t=this.hasAttribute("required")||this.#n.hasAttribute("required");t?this.#s.setAttribute("aria-required","true"):this.#s.removeAttribute("aria-required");let i=this.#d,s=this.#m,n=this.#h,r={},a="";if(i===null)t&&(r={valueMissing:!0},a=this.#tt("valueMissing","Required","Please select a time"));else{let l=s!==null&&n!==null&&s>n,u=s!==null&&i<s,d=n!==null&&i>n;if(l?u&&d:u)r=l?{rangeUnderflow:!0,rangeOverflow:!0}:{rangeUnderflow:!0},a=this.#tt("rangeUnderflow","RangeUnderflow","Choose a time at or after {time}",{time:this.#$(s)});else if(!l&&d)r={rangeOverflow:!0},a=this.#tt("rangeOverflow","RangeOverflow","Choose a time at or before {time}",{time:this.#$(n)});else if(this.#E&&yt(i-(s??0),this.#E)!==0){let h=this.#it(i,1),f=yt(h+this.#E,Qi);r={stepMismatch:!0},a=this.#tt("stepMismatch","StepMismatch","Choose a valid time. The nearest are {lower} and {upper}",{lower:this.#$(h),upper:this.#$(f)})}}let o=this.#t.validationMessage;return a?this.#t.setValidity(r,a,this.#s):this.#t.setValidity({}),a&&(i!==null||this.#w)?this.#s.setAttribute("aria-invalid","true"):this.#s.removeAttribute("aria-invalid"),(this.#n.validationMessage===this.#k||!this.#n.validity.customError)&&(this.#n.setCustomValidity(a),this.#k=a),o!==a}#rt(t){this.#d=t,this.#st(),this.#F(),this.#nt()}formResetCallback(){this.#i&&(this.#w=!1,this.#rt(qt(this.#v)))}formStateRestoreCallback(t){!this.#i||typeof t!="string"||this.#rt(qt(t))}get form(){return this.#t.form}get validity(){return this.#t.validity}get validationMessage(){return this.#t.validationMessage}get willValidate(){return this.#t.willValidate}checkValidity(){return this.#t.checkValidity()}reportValidity(){return this.#t.reportValidity()}get value(){return this.#i?this.#d===null?"":gu(this.#d,this.#y):this.#S??""}set value(t){let i=t==null?"":String(t).trim(),s=i?qt(i):null;if(!(i&&s===null)){if(!this.#i){this.#S=i;return}this.#W(s,"api")}}};E("time-picker",br);var ts="popover"in HTMLElement.prototype;var le=[{ja:"\u4EE4\u548C",latin:"R",start:[2019,5,1]},{ja:"\u5E73\u6210",latin:"H",start:[1989,1,8]},{ja:"\u662D\u548C",latin:"S",start:[1926,12,25]},{ja:"\u5927\u6B63",latin:"T",start:[1912,7,30]},{ja:"\u660E\u6CBB",latin:"M",start:[1868,10,23]}],Bv=new RegExp(`^(?:(${le.map(e=>e.ja).join("|")})|(${le.map(e=>e.latin).join("|")}))`+String.raw`\s*(元|\d{1,2})年?[/.\-]?\s*(\d{1,2})月?[/.\-]?\s*(\d{1,2})日?$`,"i"),Rv=/^(\d{4})年(\d{1,2})月(\d{1,2})日?$/;function bu(e){return e.trim().replace(/[0-9]/g,t=>String(t.charCodeAt(0)-65296)).replace(/\s+/g,"")}function yu(e,t,i){let s=new Date(2e3,t-1,i);return s.setFullYear(e),s.getMonth()===t-1&&s.getDate()===i?s:null}function vu(e){let t=bu(e).match(Bv);if(!t)return null;let i=t[1]?le.find(a=>a.ja===t[1]):le.find(a=>a.latin.toUpperCase()===t[2].toUpperCase());if(!i)return null;let s=t[3]==="\u5143"?1:Number(t[3]);if(s<1)return null;let n=yu(i.start[0]+s-1,Number(t[4]),Number(t[5]));if(!n||n<new Date(i.start[0],i.start[1]-1,i.start[2]))return null;let r=le.indexOf(i);if(r>0){let a=le[r-1].start;if(n>=new Date(a[0],a[1]-1,a[2]))return null}return n}function wu(e){let t=bu(e).match(Rv);return t?yu(Number(t[1]),Number(t[2]),Number(t[3])):null}et();var Sr=["january","february","march","april","may","june","july","august","september","october","november","december"],Ov=0;function it(e){let t=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${s}`}function xr(e,t,i){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(i))return null;let s=new Date(e,t,i);return s.getFullYear()!==e||s.getMonth()!==t||s.getDate()!==i?null:s}function ht(e){if(!e)return null;let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(String(e).trim());return t?xr(Number(t[1]),Number(t[2])-1,Number(t[3])):null}function Ke(e,t){return new Date(e,t+1,0).getDate()}function vr(e,t){let i=new Date(e.getFullYear(),e.getMonth()+t,1),s=i.getFullYear(),n=i.getMonth();return new Date(s,n,Math.min(e.getDate(),Ke(s,n)))}function qv(e){try{let t=new Intl.Locale(e),i=t.getWeekInfo?.()??t.weekInfo;if(i)return i.firstDay%7}catch{}return 0}var wr=new Map;function Au(e,t){let i=`${e}:${t}`;if(wr.has(i))return wr.get(i);let s;try{let n=new Intl.DateTimeFormat(e,{weekday:t});s=Array.from({length:7},(r,a)=>n.format(new Date(2026,0,4+a)))}catch{s=t==="long"?["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}return wr.set(i,s),s}function Eu(e,t){try{return new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"numeric"}).format(e)}catch{return it(e)}}function Ar(e,t){return!!(e&&t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate())}var Er=new Map;function jv(e){if(Er.has(e))return Er.get(e);let t=new Map;Sr.forEach((i,s)=>{t.set(i,s),t.set(i.slice(0,3),s)});try{let i=new Intl.DateTimeFormat(e,{month:"long"}),s=new Intl.DateTimeFormat(e,{month:"short"});for(let n=0;n<12;n++){let r=new Date(2e3,n,1);t.set(i.format(r).toLowerCase(),n),t.set(s.format(r).toLowerCase().replace(".",""),n)}}catch{}return Er.set(e,t),t}function kr(e,t){let i=e.trim(),s={date:null,partial:null};if(!i)return s;if(/^\d{4}[-/]\d{2}[-/]\d{2}$/.test(i)){let o=ht(i.replace(/\//g,"-"));return o?{date:o,partial:null}:s}if(es(t)==="ja"){let o=vu(i);if(o)return{date:o,partial:null}}let n=wu(i);if(n)return{date:n,partial:null};let r=jv(t),a=i.match(/^([a-zÀ-ɏ]+)\.?\s+(\d{1,2}),?\s+(\d{4})$/i);if(a){let o=r.get(a[1].toLowerCase());if(o===void 0)return s;let c=xr(Number(a[3]),o,Number(a[2]));return c?{date:c,partial:null}:s}if(a=i.match(/^(\d{1,2})\.?\s+([a-zÀ-ɏ]+)\.?\s+(\d{4})$/i),a){let o=r.get(a[2].toLowerCase());if(o===void 0)return s;let c=xr(Number(a[3]),o,Number(a[1]));return c?{date:c,partial:null}:s}if(a=i.match(/^([a-zÀ-ɏ]+)\.?\s+(\d{4})$/i),a){let o=r.get(a[1].toLowerCase());if(o!==void 0)return{date:null,partial:{year:Number(a[2]),month:o}}}return s}function ku(e){let t=new Map;if(!e)return t;for(let i of e.split(",")){let[s,n]=i.trim().split(":");s&&t.set(s,n||"")}return t}var Cr=class extends k{static formAssociated=!0;static get observedAttributes(){return["disabled","required"]}#t;#e=`dp${++Ov}`;#i=!1;#n;#s;#o;#r;#a;#l;#c;#g;#f=!1;#u=!1;#p="en-US";#y=null;#d=null;#m=new Date().getFullYear();#h=new Date().getMonth();#E=null;#v=null;#S=new Map;#b=new Map;#k;#w;#A=0;#L="";#x=!1;constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}setup(){let t=this.querySelector(':scope > input[type="date"]');if(!t)return!1;this.#n=t,this.#p=Et(this.closest("[lang]")?.lang||navigator.language),this.#A=qv(this.#p),this.#E=ht(t.getAttribute("min")),this.#v=ht(t.getAttribute("max")),this.#S=ku(this.getAttribute("data-disabled-dates")),this.#b=ku(this.getAttribute("data-highlight-dates"));let i=t.getAttribute("name");i&&(this.hasAttribute("name")||this.setAttribute("name",i),t.removeAttribute("name")),t.hasAttribute("disabled")&&(t.removeAttribute("disabled"),this.hasAttribute("disabled")||this.setAttribute("disabled",""));let s=`${this.#e}-no-form`,n=t.getAttribute("form");n&&n!==s&&!this.hasAttribute("form")&&this.setAttribute("form",n),t.setAttribute("form",s),this.#k===void 0&&(this.#k=t.defaultValue),this.#w!==void 0&&(t.value=this.#w,this.#w=void 0),this.#y=ht(t.value);let r=new Date;return this.#v&&r>this.#v&&(r=this.#v),this.#E&&r<this.#E&&(r=this.#E),this.#d=this.#y||r,this.#m=this.#d.getFullYear(),this.#h=this.#d.getMonth(),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"),t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.listen(t,"click",this.#B),this.listen(t,"focus",this.#R),this.#I(),this.#G(),this.#i=!0,this.#H(),this.#J(),this.#Z(!1),this.#F(),this.#u=ts,this.#u&&this.#a.setAttribute("popover","manual"),this.listen(document,"click",this.#U),this.listen(this,"invalid",this.#z),this.#D(this.matches(":disabled")),!0}teardown(){this.#f=!1,this.removeAttribute("open"),window.removeEventListener("scroll",this.#Q,{capture:!0}),window.removeEventListener("resize",this.#Q),this.#r?.remove(),this.#a?.remove(),this.#S=new Map,this.#b=new Map,this.#i=!1}attributeChangedCallback(t){this.#i&&(t==="disabled"&&this.#D(this.matches(":disabled")),t==="required"&&this.#F())}formDisabledCallback(t){this.#i&&this.#D(t)}#D(t){this.#s.disabled=t,this.#o.disabled=t,t&&this.#V()}#M(t,i){return this.dataset[`label${t}`]||i}#R=()=>{this.#i&&!this.#s.disabled&&this.#s.focus()};#B=t=>{t.preventDefault(),this.#R()};#H(){let t=new Set([...Array.from(this.#n.labels||[]),...Array.from(this.#t.labels||[])]),i=[];for(let a of t)a.id||(a.id=`${this.#e}-label-${i.length}`),i.push(a.id),this.listen(a,"click",this.#R);let s=this.#s,n=i.join(" ")||this.#n.getAttribute("aria-labelledby")||this.getAttribute("aria-labelledby");n?s.setAttribute("aria-labelledby",n):s.setAttribute("aria-label",this.#n.getAttribute("aria-label")||this.getAttribute("aria-label")||this.#M("Input","Date"));let r=this.#n.getAttribute("aria-describedby");r&&s.setAttribute("aria-describedby",r)}#I(){this.#r=document.createElement("div"),this.#r.className="date-trigger",this.#s=document.createElement("input"),this.#s.type="text",this.#s.className="date-input",this.#s.setAttribute("role","combobox"),this.#s.setAttribute("aria-haspopup","dialog"),this.#s.setAttribute("aria-expanded","false"),this.#s.setAttribute("autocomplete","off"),this.#s.setAttribute("placeholder",this.#M("Placeholder","Type a date\u2026")),this.#r.appendChild(this.#s),this.#o=document.createElement("button"),this.#o.type="button",this.#o.className="date-trigger-icon",this.#o.setAttribute("aria-label",this.#M("Toggle","Toggle calendar")),this.#o.setAttribute("tabindex","-1");let t=document.createElement("icon-wc");t.setAttribute("name","calendar"),t.setAttribute("size","sm"),t.setAttribute("aria-hidden","true"),this.#o.appendChild(t),this.#r.appendChild(this.#o),this.appendChild(this.#r),this.listen(this.#o,"click",i=>{i.stopPropagation(),this.#f?this.#V():this.#_(),this.#s.focus()}),this.listen(this.#s,"focus",()=>this.#s.select()),this.listen(this.#s,"input",this.#K),this.listen(this.#s,"keydown",this.#O),this.listen(this.#s,"blur",this.#it)}#G(){let t=`${this.#e}-calendar`;this.#a=document.createElement("div"),this.#a.className="calendar",this.#a.id=t,this.#a.setAttribute("role","dialog"),this.#a.setAttribute("aria-modal","false"),this.#a.setAttribute("aria-label",this.#M("Dialog","Choose date")),this.#a.hidden=!0,this.#s.setAttribute("aria-controls",t);let i=document.createElement("div");i.className="calendar-header";let s=document.createElement("button");s.type="button",s.className="calendar-nav",s.setAttribute("aria-label",this.#M("Prev","Previous month"));let n=document.createElement("icon-wc");n.setAttribute("name","chevron-left"),n.setAttribute("size","sm"),n.setAttribute("aria-hidden","true"),s.appendChild(n);let r=document.createElement("span");r.className="calendar-title",this.#c=document.createElement("span"),this.#c.className="calendar-month",this.#c.id=`${t}-title`,this.#c.setAttribute("aria-live","polite"),this.#c.setAttribute("aria-atomic","true"),this.#g=document.createElement("select"),this.#g.className="calendar-year",this.#g.setAttribute("aria-label",this.#M("Year","Year")),this.#et(),r.appendChild(this.#c),r.appendChild(this.#g);let a=document.createElement("button");a.type="button",a.className="calendar-nav",a.setAttribute("aria-label",this.#M("Next","Next month"));let o=document.createElement("icon-wc");o.setAttribute("name","chevron-right"),o.setAttribute("size","sm"),o.setAttribute("aria-hidden","true"),a.appendChild(o),i.appendChild(s),i.appendChild(r),i.appendChild(a),this.#a.appendChild(i);let c=document.createElement("table");c.setAttribute("role","grid"),c.setAttribute("aria-labelledby",`${t}-title`);let l=Au(this.#p,"short"),u=Au(this.#p,"long"),d=document.createElement("thead"),h=document.createElement("tr");for(let f=0;f<7;f++){let p=(this.#A+f)%7,m=document.createElement("th");m.setAttribute("abbr",u[p]),m.setAttribute("scope","col"),m.textContent=l[p],h.appendChild(m)}d.appendChild(h),c.appendChild(d),this.#l=document.createElement("tbody"),c.appendChild(this.#l),this.#a.appendChild(c),this.appendChild(this.#a),this.#N(),this.listen(s,"click",()=>this.#$(-1)),this.listen(a,"click",()=>this.#$(1)),this.listen(this.#g,"change",()=>{this.#m=Number(this.#g.value);let f=Ke(this.#m,this.#h),p=Math.min(this.#d?.getDate()??1,f);this.#d=new Date(this.#m,this.#h,p),this.#N()}),this.listen(this.#l,"click",this.#X),this.listen(this.#a,"keydown",this.#W)}#N(){let t;try{t=new Intl.DateTimeFormat(this.#p,{month:"long"}).format(new Date(this.#m,this.#h,1))}catch{t=Sr[this.#h].charAt(0).toUpperCase()+Sr[this.#h].slice(1)}let i;try{i=new Intl.DateTimeFormat(this.#p,{month:"long",year:"numeric"}).format(new Date(this.#m,this.#h,1))}catch{i=`${t} ${this.#m}`}if(this.#c.lastElementChild?.textContent!==i){let l=document.createElement("span");l.setAttribute("aria-hidden","true"),l.textContent=t;let u=document.createElement("span");u.className="visually-hidden",u.textContent=i,this.#c.replaceChildren(l,u)}this.#g.querySelector(`option[value="${this.#m}"]`)||this.#et(),this.#g.value=String(this.#m),this.#l.replaceChildren();let s=Ke(this.#m,this.#h),r=(new Date(this.#m,this.#h,1).getDay()-this.#A+7)%7,a=new Date,o=document.createElement("tr");for(let l=0;l<r;l++)o.appendChild(document.createElement("td"));for(let l=1;l<=s;l++){let u=new Date(this.#m,this.#h,l),d=it(u),h=document.createElement("td"),f=document.createElement("button");f.type="button",f.setAttribute("data-date",d),f.textContent=String(l),Ar(u,a)&&f.setAttribute("aria-current","date");let p=Ar(u,this.#y);h.setAttribute("aria-selected",String(p));let m=this.#q(u,d);m.disabled&&(f.setAttribute("aria-disabled","true"),m.reason&&f.setAttribute("data-disabled-reason",m.reason)),this.#b.has(d)&&f.setAttribute("data-highlight",this.#b.get(d)||""),Ar(u,this.#d)?(f.setAttribute("tabindex","0"),p||f.setAttribute("data-focused","")):f.setAttribute("tabindex","-1"),h.appendChild(f),o.appendChild(h),(r+l)%7===0&&(this.#l.appendChild(o),o=document.createElement("tr"))}let c=(r+s)%7;if(c>0){for(let l=c;l<7;l++)o.appendChild(document.createElement("td"));this.#l.appendChild(o)}}#T(t){return this.#q(t,it(t)).disabled}#q(t,i){return this.#S.has(i)?{disabled:!0,reason:this.#S.get(i)}:this.#E&&t<this.#E?{disabled:!0,reason:null}:this.#v&&t>this.#v?{disabled:!0,reason:null}:{disabled:!1,reason:null}}#et(){this.#g.replaceChildren();let t=new Date().getFullYear(),i=this.#E?this.#E.getFullYear():t-100,s=this.#v?this.#v.getFullYear():t+10;i=Math.min(i,this.#m),s=Math.max(s,this.#m);for(let n=i;n<=s;n++){let r=document.createElement("option");r.value=String(n),r.textContent=String(n),this.#g.appendChild(r)}}#$(t){let i=this.#d??new Date(this.#m,this.#h,1),s=new Date(this.#m,this.#h,Math.min(i.getDate(),Ke(this.#m,this.#h)));this.#d=vr(s,t),this.#m=this.#d.getFullYear(),this.#h=this.#d.getMonth(),this.#N();let n=document.activeElement;n?.matches(".calendar-nav:focus-visible")&&this.#a.contains(n)||this.#Y(this.#d)}#C(t,i){if(t&&this.#T(t))return!1;let s=this.value,n=t?it(t):"";return this.#y=t,t&&(this.#d=t),this.#J(),n===s?!1:(this.#Z(),this.#F(),t&&i==="api"&&(this.#m=t.getFullYear(),this.#h=t.getMonth()),(this.#f||i==="api")&&this.#N(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:n,date:t?new Date(t):null,source:i}})),!0)}#P(t,i){this.#T(t)||(this.#C(t,i),this.#V(),this.#s.focus())}#Y(t){let i=this.#l.querySelector(`[data-date="${it(t)}"]`);if(i){for(let s of this.#l.querySelectorAll("button[data-date]"))s.setAttribute("tabindex",s===i?"0":"-1"),s!==i&&s.removeAttribute("data-focused");i.closest("td")?.getAttribute("aria-selected")!=="true"&&i.setAttribute("data-focused",""),i.focus()}}#J(){this.#s.value=this.#y?Eu(this.#y,this.#p):""}#_(){if(!(this.#f||this.#s.disabled)){if(this.#f=!0,this.setAttribute("open",""),this.#s.setAttribute("aria-expanded","true"),this.#a.hidden=!1,this.#d&&(this.#m=this.#d.getFullYear(),this.#h=this.#d.getMonth()),this.#N(),this.#u){try{this.#a.showPopover()}catch{}this.#j(),window.addEventListener("scroll",this.#Q,{capture:!0,passive:!0}),window.addEventListener("resize",this.#Q,{passive:!0})}this.dispatchEvent(new CustomEvent("date-picker:open",{bubbles:!0}))}}#V(){if(this.#f){if(this.#f=!1,this.removeAttribute("open"),this.#s.setAttribute("aria-expanded","false"),this.#a.hidden=!0,this.#u){try{this.#a.hidePopover()}catch{}window.removeEventListener("scroll",this.#Q,{capture:!0}),window.removeEventListener("resize",this.#Q)}this.dispatchEvent(new CustomEvent("date-picker:close",{bubbles:!0}))}}#j(){if(!this.#u)return;let t=this.#r.getBoundingClientRect(),i=this.#a.getBoundingClientRect(),s=4,n=8,r=window.innerHeight,a=window.innerWidth,o=r-t.bottom-n,c=t.top-n,l;o<i.height&&c>o?(l=t.top-i.height-s,this.#a.dataset.placement="top"):(l=t.bottom+s,delete this.#a.dataset.placement);let u=t.left;u+i.width>a-n&&(u=a-i.width-n),u<n&&(u=n),this.#a.style.setProperty("--calendar-top",`${l}px`),this.#a.style.setProperty("--calendar-left",`${u}px`)}#Q=()=>{this.#f&&this.#j()};#K=()=>{let t=this.#s.value,{date:i,partial:s}=kr(t,this.#p);if(i)this.#d=i,this.#m=i.getFullYear(),this.#h=i.getMonth(),this.#N();else if(s){this.#m=s.year,this.#h=s.month;let n=Ke(s.year,s.month),r=Math.min(this.#d?.getDate()??1,n);this.#d=new Date(s.year,s.month,r),this.#N()}!this.#f&&t.length>0&&this.#_()};#O=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let i=this.#s.value.trim();if(!i){this.#C(null,"keyboard"),this.#V();return}let{date:s}=kr(i,this.#p);s&&!this.#T(s)&&this.#P(s,"keyboard");return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#f||this.#_(),requestAnimationFrame(()=>{this.#d&&this.#Y(this.#d)});return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#f&&this.#V(),this.#J();return;case"Tab":this.#f&&this.#V();return}};#it=t=>{if(t.relatedTarget instanceof Node&&this.contains(t.relatedTarget))return;let i=this.#s.value.trim();if(!i)this.#C(null,"keyboard");else{let{date:s}=kr(i,this.#p);s&&!this.#T(s)&&this.#C(s,"keyboard")}this.#J(),this.#f&&this.#V(),this.#z()};#z=()=>{this.#i&&(this.#x||(this.#x=!0,this.#F()),this.#n.dispatchEvent(new Event("blur",{bubbles:!0})))};#U=t=>{this.#f&&!this.contains(t.target)&&this.#V()};#X=t=>{let s=t.target?.closest("button[data-date]");if(!s||s.getAttribute("aria-disabled")==="true")return;let n=ht(s.getAttribute("data-date"));n&&this.#P(n,"pointer")};#W=t=>{if(t.key==="Tab"){let o=[...this.#a.querySelectorAll('.calendar-header button, .calendar-header select, tbody button[tabindex="0"]')];if(!o.length)return;let c=o.indexOf(document.activeElement),l=c<0?0:(c+(t.shiftKey?-1:1)+o.length)%o.length;t.preventDefault(),o[l].focus();return}let i=t.target instanceof Element&&this.#l.contains(t.target),s=this.#d;if(!s)return;let n,r=(s.getDay()-this.#A+7)%7,a=getComputedStyle(this).direction==="rtl"?-1:1;switch(t.key){case"ArrowRight":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()+a);break;case"ArrowLeft":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()-a);break;case"ArrowDown":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()+7);break;case"ArrowUp":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()-7);break;case"PageDown":n=vr(s,t.shiftKey?12:1);break;case"PageUp":n=vr(s,t.shiftKey?-12:-1);break;case"Home":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()-r);break;case"End":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()+(6-r));break;case"Enter":case" ":if(!i)return;t.preventDefault(),t.stopPropagation(),this.#P(s,"keyboard");return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#V(),this.#s.focus();return;default:return}i&&(t.preventDefault(),t.stopPropagation(),this.#E&&n<this.#E&&(n=this.#E),this.#v&&n>this.#v&&(n=this.#v),this.#d=n,(n.getMonth()!==this.#h||n.getFullYear()!==this.#m)&&(this.#h=n.getMonth(),this.#m=n.getFullYear(),this.#N()),this.#Y(n))};#Z(t=!0){let i=this.#y?it(this.#y):"";this.#t.setFormValue(i||null),this.#n.value=i,t&&this.#n.dispatchEvent(new Event("input",{bubbles:!0}))}#st(t,i,s,n=null){let r=this.#n.getAttribute(`data-message-${t.toLowerCase()}`)??this.#M(i,s);return n?r.replaceAll("{date}",Eu(n,this.#p)):r}#F(){if(!this.#i)return!1;let t=this.hasAttribute("required")||this.#n.hasAttribute("required");t?this.#s.setAttribute("aria-required","true"):this.#s.removeAttribute("aria-required");let i=this.#y,s={},n="";t&&!i?(s={valueMissing:!0},n=this.#st("valueMissing","Required","Please select a date")):i&&this.#E&&i<this.#E?(s={rangeUnderflow:!0},n=this.#st("rangeUnderflow","RangeUnderflow","Choose a date on or after {date}",this.#E)):i&&this.#v&&i>this.#v&&(s={rangeOverflow:!0},n=this.#st("rangeOverflow","RangeOverflow","Choose a date on or before {date}",this.#v));let r=this.#t.validationMessage;return n?this.#t.setValidity(s,n,this.#s):this.#t.setValidity({}),n&&(i||this.#x)?this.#s.setAttribute("aria-invalid","true"):this.#s.removeAttribute("aria-invalid"),(this.#n.validationMessage===this.#L||!this.#n.validity.customError)&&(this.#n.setCustomValidity(n),this.#L=n),r!==n}#tt(){this.#i&&(this.#N(),this.#F()&&this.#n.dispatchEvent(new Event("input",{bubbles:!0})))}#nt(t){let i=t||new Date;this.#y=t,this.#d=i,this.#m=i.getFullYear(),this.#h=i.getMonth(),this.#J(),this.#Z(),this.#F(),this.#N()}formResetCallback(){this.#i&&(this.#x=!1,this.#nt(ht(this.#k)))}formStateRestoreCallback(t){!this.#i||typeof t!="string"||this.#nt(ht(t))}get form(){return this.#t.form}get validity(){return this.#t.validity}get validationMessage(){return this.#t.validationMessage}get willValidate(){return this.#t.willValidate}checkValidity(){return this.#t.checkValidity()}reportValidity(){return this.#t.reportValidity()}get value(){return this.#i?this.#y?it(this.#y):"":this.#w??""}set value(t){let i=t==null?"":String(t).trim(),s=i?ht(i):null;if(!(i&&!s)){if(!this.#i){this.#w=i;return}this.#C(s,"api")}}get min(){return this.#E?it(this.#E):""}set min(t){this.#E=ht(t),this.#n&&(this.#E?this.#n.setAttribute("min",it(this.#E)):this.#n.removeAttribute("min")),this.#tt()}get max(){return this.#v?it(this.#v):""}set max(t){this.#v=ht(t),this.#n&&(this.#v?this.#n.setAttribute("max",it(this.#v)):this.#n.removeAttribute("max")),this.#tt()}};E("date-picker",Cr);re();function ue(e,t,i){t/=100,i/=100;let s=a=>(a+e/30)%12,n=t*Math.min(i,1-i),r=a=>i-n*Math.max(-1,Math.min(s(a)-3,9-s(a),1));return{r:Math.round(r(0)*255),g:Math.round(r(8)*255),b:Math.round(r(4)*255)}}function is(e,t,i,s=!1){e/=255,t/=255,i/=255;let n=Math.max(e,t,i),r=Math.min(e,t,i),a=(n+r)/2,o=0,c=0;if(n!==r){let l=n-r;switch(c=a>.5?l/(2-n-r):l/(n+r),n){case e:o=((t-i)/l+(t<i?6:0))/6;break;case t:o=((i-e)/l+2)/6;break;case i:o=((e-t)/l+4)/6;break}}return s?{h:o*360,s:c*100,l:a*100}:{h:Math.round(o*360),s:Math.round(c*100),l:Math.round(a*100)}}function Hv(e){e=e.replace(/^#/,""),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}}function zv(e,t,i){return"#"+[e,t,i].map(s=>Math.max(0,Math.min(255,Math.round(s))).toString(16).padStart(2,"0")).join("")}function kt(e,t=!1){let{r:i,g:s,b:n}=Hv(e);return is(i,s,n,t)}function St(e,t,i){let{r:s,g:n,b:r}=ue(e,t,i);return zv(s,n,r)}function j(e,t,i){return Math.max(t,Math.min(i,e))}function Tr(e){return e/=255,e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Lr(e){let t=e<=.0031308?e*12.92:1.055*Math.pow(e,.4166666666666667)-.055;return Math.round(j(t,0,1)*255)}function Vv(e,t,i){let s=Tr(e),n=Tr(t),r=Tr(i),a=.4122214708*s+.5363325363*n+.0514459929*r,o=.2119034982*s+.6806995451*n+.1073969566*r,c=.0883024619*s+.2817188376*n+.6299787005*r,l=Math.cbrt(a),u=Math.cbrt(o),d=Math.cbrt(c),h=.2104542553*l+.793617785*u-.0040720468*d,f=1.9779984951*l-2.428592205*u+.4505937099*d,p=.0259040371*l+.7827717662*u-.808675766*d,m=Math.sqrt(f*f+p*p),g=Math.atan2(p,f)*180/Math.PI;return g<0&&(g+=360),m<1e-4&&(g=0),{L:h,C:m,H:g}}function Uv(e,t,i){let s=i*Math.PI/180,n=t*Math.cos(s),r=t*Math.sin(s),a=e+.3963377774*n+.2158037573*r,o=e-.1055613458*n-.0638541728*r,c=e-.0894841775*n-1.291485548*r,l=a**3,u=o**3,d=c**3,h=4.0767416621*l-3.3077115913*u+.2309699292*d,f=-1.2684380046*l+2.6097574011*u-.3413193965*d,p=-.0041960863*l-.7034186147*u+1.707614701*d;return{r:Lr(h),g:Lr(f),b:Lr(p)}}function Dr(e,t,i){let s=ue(e,t,i);return Vv(s.r,s.g,s.b)}function Su(e,t,i,s=!1){let{r:n,g:r,b:a}=Uv(e,t,i);return is(n,r,a,s)}function Wv(e,t,i){return St(e,t,i)}function Gv(e,t,i){let{r:s,g:n,b:r}=ue(e,t,i);return`rgb(${s} ${n} ${r})`}function Kv(e,t,i){return`hsl(${Math.round(e)}deg ${Math.round(t)}% ${Math.round(i)}%)`}function Yv(e,t,i){let{L:s,C:n,H:r}=Dr(e,t,i);return`oklch(${(s*100).toFixed(1)}% ${n.toFixed(3)} ${r.toFixed(1)}deg)`}function xu(e,t,i,s){switch(e){case"rgb":return Gv(t,i,s);case"hsl":return Kv(t,i,s);case"oklch":return Yv(t,i,s);default:return Wv(t,i,s)}}var de=["hex","rgb","hsl","oklch"],Xv="hex",Zv=/^#[0-9a-fA-F]{6}$/,he=8,Jv=0,Nr=class extends k{static formAssociated=!0;#t;#e;#i;#n;#s;#o;#r;#a;#l;#c;#g;#f;#u={};#p=Xv;#y;#d;#m;#h=!1;#E=!1;#v=!1;#S=`cp${++Jv}`;#b=0;#k=100;#w=50;#A;static get observedAttributes(){return["disabled"]}constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}setup(){if(this.#e=this.querySelector(':scope > input[type="color"]'),!this.#e)return!1;if(!this.#v){let s=this.getAttribute("format");s&&de.includes(s)&&(this.#p=s),this.#v=!0}if(this.#A===void 0){let s=this.#e.defaultValue;this.#A=Zv.test(s)?s.toLowerCase():this.#e.value||"#000000"}let t=kt(this.#e.value||this.#A,!0);this.#b=t.h,this.#k=t.s,this.#w=t.l;let i=this.#e.getAttribute("name");return i&&(this.hasAttribute("name")||this.setAttribute("name",i),this.#e.removeAttribute("name")),this.#e.hasAttribute("disabled")&&(this.#e.removeAttribute("disabled"),this.hasAttribute("disabled")||this.setAttribute("disabled","")),this.#e.setAttribute("tabindex","-1"),this.#e.setAttribute("aria-hidden","true"),this.#e.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.listen(this.#e,"click",this.#x),this.#M(),this.#R(),this.#O(),this.#Z(),this.#E=ts,this.#E&&this.#r.setAttribute("popover","manual"),this.listen(document,"click",this.#W),this.listen(this,"keydown",this.#D),this.#L(this.matches(":disabled")),!0}teardown(){this.#h=!1,this.removeAttribute("open"),window.removeEventListener("scroll",this.#X,{capture:!0}),window.removeEventListener("resize",this.#X),this.#i?.remove(),this.#r?.remove()}attributeChangedCallback(t){t==="disabled"&&this.#i&&this.#L(this.matches(":disabled"))}formDisabledCallback(t){this.#i&&this.#L(t)}#L(t){this.#i.disabled=t,t&&this.#z()}#x=t=>{t.preventDefault(),this.#i.disabled||this.#i.focus()};#D=t=>{t.key!=="Escape"||t.defaultPrevented||!this.#h||(t.preventDefault(),t.stopPropagation(),this.#z())};#M(){this.#i=document.createElement("button"),this.#i.type="button",this.#i.className="color-trigger",this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.#n=document.createElement("span"),this.#n.className="color-swatch",this.#s=document.createElement("span"),this.#s.className="color-hex",this.#s.id=`${this.#S}-value`,this.#i.appendChild(this.#n),this.#i.appendChild(this.#s);let t=[];for(let i of Array.from(this.#e.labels||[]))i.id||(i.id=`${this.#S}-label-${t.length}`),t.push(i.id);t.length===0&&(this.#o=document.createElement("span"),this.#o.className="visually-hidden",this.#o.id=`${this.#S}-name`,this.#o.textContent=this.#e.getAttribute("aria-label")||this.getAttribute("aria-label")||"Color",this.#i.prepend(this.#o),t.push(this.#o.id)),this.#i.setAttribute("aria-labelledby",[...t,this.#s.id].join(" ")),this.appendChild(this.#i),this.listen(this.#i,"click",()=>{this.#h?this.#z():this.#it()})}#R(){this.#y=void 0,this.#d=void 0,this.#r=document.createElement("div"),this.#r.className="color-panel",this.#r.setAttribute("role","dialog"),this.#r.setAttribute("aria-label","Color picker"),this.#a=document.createElement("div"),this.#a.className="color-area",this.#a.setAttribute("role","slider"),this.#a.setAttribute("aria-label","Saturation and lightness"),this.#a.setAttribute("aria-valuemin","0"),this.#a.setAttribute("aria-valuemax","100"),this.#a.setAttribute("tabindex","0"),this.#l=document.createElement("div"),this.#l.className="color-area-thumb",this.#a.appendChild(this.#l),this.#r.appendChild(this.#a);let t=document.createElement("div");t.className="color-hue-wrap",this.#c=document.createElement("div"),this.#c.className="color-hue",this.#c.setAttribute("role","slider"),this.#c.setAttribute("aria-label","Hue"),this.#c.setAttribute("aria-valuemin","0"),this.#c.setAttribute("aria-valuemax","360"),this.#c.setAttribute("tabindex","0"),this.#g=document.createElement("div"),this.#g.className="color-hue-thumb",this.#c.appendChild(this.#g),t.appendChild(this.#c),this.#r.appendChild(t);let i=document.createElement("div");i.className="color-format-row";let s=document.createElement("label");s.className="color-format-label";let n=document.createElement("span");n.textContent="Format",this.#f=document.createElement("select"),this.#f.className="color-format-select";for(let o of de){let c=document.createElement("option");c.value=o,c.textContent=o.toUpperCase(),this.#f.appendChild(c)}this.#f.value=this.#p,s.appendChild(n),s.appendChild(this.#f),i.appendChild(s),this.#r.appendChild(i),this.listen(this.#f,"change",this.#I),this.#u.hex=this.#B("hex",[{label:"Hex",channel:"hex",kind:"text",maxLength:7}]),this.#u.rgb=this.#B("rgb",[{label:"R",channel:"r",kind:"number",min:0,max:255,step:1},{label:"G",channel:"g",kind:"number",min:0,max:255,step:1},{label:"B",channel:"b",kind:"number",min:0,max:255,step:1}]),this.#u.hsl=this.#B("hsl",[{label:"H",channel:"h",kind:"number",min:0,max:360,step:1},{label:"S",channel:"s",kind:"number",min:0,max:100,step:1},{label:"L",channel:"l",kind:"number",min:0,max:100,step:1}]),this.#u.oklch=this.#B("oklch",[{label:"L%",channel:"oL",kind:"number",min:0,max:100,step:.1},{label:"C",channel:"oC",kind:"number",min:0,max:.4,step:.001},{label:"H\xB0",channel:"oH",kind:"number",min:0,max:360,step:.1}]);for(let o of de)this.#r.appendChild(this.#u[o].wrapper);this.#H();let r=this.querySelector(":scope > datalist");if(r){this.#y=document.createElement("div"),this.#y.className="color-swatches",this.#y.setAttribute("role","group"),this.#y.setAttribute("aria-label","Preset colors");for(let o of r.querySelectorAll("option[value]")){let c=document.createElement("button");c.type="button",c.setAttribute("aria-pressed","false"),c.style.background=o.value,c.setAttribute("aria-label",o.textContent||o.value),c.setAttribute("data-color",o.value),this.#y.appendChild(c)}this.#r.appendChild(this.#y),this.listen(this.#y,"click",this.#V)}let a=document.createElement("div");a.className="color-actions","EyeDropper"in window&&(this.#d=document.createElement("button"),this.#d.type="button",this.#d.className="color-eyedropper",this.#d.setAttribute("aria-label","Pick color from screen"),this.#d.textContent="\u{1F4A7}",a.appendChild(this.#d),this.listen(this.#d,"click",this.#j)),this.#m=document.createElement("button"),this.#m.type="button",this.#m.className="color-copy",this.#m.setAttribute("aria-label","Copy hex value"),this.#m.textContent="Copy",a.appendChild(this.#m),this.listen(this.#m,"click",this.#Q),this.#r.appendChild(a),this.appendChild(this.#r),this.listen(this.#a,"pointerdown",this.#G),this.listen(this.#a,"keydown",this.#T),this.listen(this.#c,"pointerdown",this.#q),this.listen(this.#c,"keydown",this.#$);for(let o of de){let c=o==="hex"?this.#P:o==="rgb"?this.#Y:o==="hsl"?this.#J:this.#_;for(let{el:l}of this.#u[o].inputs)this.listen(l,"change",c)}}#B(t,i){let s=document.createElement("div");s.className=`color-inputs color-inputs-${t}`,s.setAttribute("data-format",t);let n=[];for(let r of i){let a=document.createElement("label");a.className="color-input-label";let o=document.createElement("span");o.textContent=r.label;let c=document.createElement("input");c.type=r.kind,c.setAttribute("data-channel",r.channel),c.setAttribute("autocomplete","off"),c.setAttribute("spellcheck","false"),r.kind==="text"&&r.maxLength&&c.setAttribute("maxlength",String(r.maxLength)),r.kind==="number"&&(c.min=String(r.min),c.max=String(r.max),r.step!=null&&(c.step=String(r.step))),a.appendChild(o),a.appendChild(c),s.appendChild(a),n.push({el:c,channel:r.channel})}return{wrapper:s,inputs:n}}#H(){for(let t of de)this.#u[t].wrapper.hidden=t!==this.#p;this.#m&&this.#m.setAttribute("aria-label",`Copy ${this.#p.toUpperCase()} value`)}#I=()=>{let t=this.#f.value;de.includes(t)&&(this.#p=t,this.#H(),this.#O())};#G=t=>{t.preventDefault(),this.#a.setPointerCapture(t.pointerId),this.#N(t);let i=n=>this.#N(n),s=n=>{this.#a.releasePointerCapture(n.pointerId),this.#a.removeEventListener("pointermove",i),this.#a.removeEventListener("pointerup",s)};this.#a.addEventListener("pointermove",i),this.#a.addEventListener("pointerup",s)};#N(t){let i=this.#a.getBoundingClientRect(),s=j((t.clientX-i.left)/i.width,0,1),n=j((t.clientY-i.top)/i.height,0,1);this.#k=Math.round(s*100),this.#w=Math.round((1-n)*100),this.#K("pointer")}#T=t=>{let i=t.shiftKey?10:1;switch(this.#k=Math.round(this.#k),this.#w=Math.round(this.#w),t.key){case"ArrowRight":t.preventDefault(),this.#k=j(this.#k+i,0,100);break;case"ArrowLeft":t.preventDefault(),this.#k=j(this.#k-i,0,100);break;case"ArrowUp":t.preventDefault(),this.#w=j(this.#w+i,0,100);break;case"ArrowDown":t.preventDefault(),this.#w=j(this.#w-i,0,100);break;case"Home":t.preventDefault(),this.#k=0;break;case"End":t.preventDefault(),this.#k=100;break;case"PageUp":t.preventDefault(),this.#w=j(this.#w+10,0,100);break;case"PageDown":t.preventDefault(),this.#w=j(this.#w-10,0,100);break;default:return}this.#K("keyboard")};#q=t=>{t.preventDefault(),this.#c.setPointerCapture(t.pointerId),this.#et(t);let i=n=>this.#et(n),s=n=>{this.#c.releasePointerCapture(n.pointerId),this.#c.removeEventListener("pointermove",i),this.#c.removeEventListener("pointerup",s)};this.#c.addEventListener("pointermove",i),this.#c.addEventListener("pointerup",s)};#et(t){let i=this.#c.getBoundingClientRect(),s=j((t.clientX-i.left)/i.width,0,1);this.#b=Math.round(s*360),this.#K("pointer")}#$=t=>{let i=t.shiftKey?10:1;switch(this.#b=Math.round(this.#b),t.key){case"ArrowRight":case"ArrowUp":t.preventDefault(),this.#b=(this.#b+i)%361;break;case"ArrowLeft":case"ArrowDown":t.preventDefault(),this.#b=(this.#b-i+361)%361;break;case"PageUp":t.preventDefault(),this.#b=j(this.#b+10,0,360);break;case"PageDown":t.preventDefault(),this.#b=j(this.#b-10,0,360);break;case"Home":t.preventDefault(),this.#b=0;break;case"End":t.preventDefault(),this.#b=360;break;default:return}this.#K("keyboard")};#C(t,i){return this.#u[t].inputs.find(s=>s.channel===i)?.el}#P=()=>{let t=this.#C("hex","hex");if(!t)return;let i=t.value.trim();if(i.startsWith("#")||(i="#"+i),/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(i)){let s=kt(i,!0);this.#b=s.h,this.#k=s.s,this.#w=s.l,this.#K()}};#Y=()=>{let t=j(Number(this.#C("rgb","r").value)||0,0,255),i=j(Number(this.#C("rgb","g").value)||0,0,255),s=j(Number(this.#C("rgb","b").value)||0,0,255),n=is(t,i,s,!0);this.#b=n.h,this.#k=n.s,this.#w=n.l,this.#K()};#J=()=>{let t=j(Number(this.#C("hsl","h").value)||0,0,360)%361,i=j(Number(this.#C("hsl","s").value)||0,0,100),s=j(Number(this.#C("hsl","l").value)||0,0,100);this.#b=t,this.#k=i,this.#w=s,this.#K()};#_=()=>{let t=j(Number(this.#C("oklch","oL").value)||0,0,100)/100,i=j(Number(this.#C("oklch","oC").value)||0,0,.4),s=j(Number(this.#C("oklch","oH").value)||0,0,360),n=Su(t,i,s,!0);this.#b=n.h,this.#k=n.s,this.#w=n.l,this.#K()};#V=t=>{let i=t.target.closest("button[data-color]");if(!i)return;let s=i.getAttribute("data-color"),n=kt(s,!0);this.#b=n.h,this.#k=n.s,this.#w=n.l,this.#K()};#j=async()=>{try{let i=await new window.EyeDropper().open(),s=kt(i.sRGBHex,!0);this.#b=s.h,this.#k=s.s,this.#w=s.l,this.#K()}catch{}};#Q=()=>{let t=xu(this.#p,this.#b,this.#k,this.#w);bt(t,{button:this.#m,announceMessage:"Color copied"})};#K(t="internal"){this.#O(),this.#Z();let i=St(this.#b,this.#k,this.#w),s=ue(this.#b,this.#k,this.#w);this.dispatchEvent(new CustomEvent("color-picker:change",{bubbles:!0,detail:{hex:i,rgb:{r:s.r,g:s.g,b:s.b},hsl:{h:Math.round(this.#b),s:Math.round(this.#k),l:Math.round(this.#w)},source:t}}))}#O(){let t=St(this.#b,this.#k,this.#w),i=ue(this.#b,this.#k,this.#w),s=St(this.#b,100,50);this.#n.style.background=t,this.#s.textContent=t,this.#a.style.setProperty("--area-hue",s),this.#l.style.left=`${this.#k}%`,this.#l.style.top=`${100-this.#w}%`,this.#l.style.background=t;let n=Math.round(this.#b),r=Math.round(this.#k),a=Math.round(this.#w);this.#a.setAttribute("aria-valuenow",String(r)),this.#a.setAttribute("aria-valuetext",(this.getAttribute("data-label-area-value")||"Saturation {s}%, lightness {l}%").replaceAll("{s}",String(r)).replaceAll("{l}",String(a))),this.#g.style.left=`${this.#b/360*100}%`,this.#c.setAttribute("aria-valuenow",String(n)),this.#c.setAttribute("aria-valuetext",`Hue ${n}\xB0`);let o=(l,u,d)=>{let h=this.#C(l,u);h&&(h.value=String(d))};o("hex","hex",t),o("rgb","r",i.r),o("rgb","g",i.g),o("rgb","b",i.b),o("hsl","h",n),o("hsl","s",r),o("hsl","l",a);let c=Dr(this.#b,this.#k,this.#w);if(o("oklch","oL",(c.L*100).toFixed(1)),o("oklch","oC",c.C.toFixed(3)),o("oklch","oH",c.H.toFixed(1)),this.#y)for(let l of this.#y.querySelectorAll("button[data-color]")){let u=(l.getAttribute("data-color")||"").toLowerCase()===t.toLowerCase();l.setAttribute("aria-pressed",String(u))}}#it(){if(!(this.#h||this.#i.disabled)){if(this.#h=!0,this.setAttribute("open",""),this.#i.setAttribute("aria-expanded","true"),this.#E){try{this.#r.showPopover()}catch{}this.#U(),window.addEventListener("scroll",this.#X,{capture:!0,passive:!0}),window.addEventListener("resize",this.#X,{passive:!0})}requestAnimationFrame(()=>this.#a.focus()),this.dispatchEvent(new CustomEvent("color-picker:open",{bubbles:!0}))}}#z(){if(!this.#h)return;let t=this.#r.contains(document.activeElement);if(this.#h=!1,this.removeAttribute("open"),this.#i.setAttribute("aria-expanded","false"),this.#E){try{this.#r.hidePopover()}catch{}window.removeEventListener("scroll",this.#X,{capture:!0}),window.removeEventListener("resize",this.#X)}t&&this.#i.isConnected&&!this.#i.disabled&&this.#i.focus(),this.dispatchEvent(new CustomEvent("color-picker:close",{bubbles:!0}))}#U(){if(!this.#E)return;let t=this.#i.getBoundingClientRect(),i=this.#r.offsetWidth,s=this.#r.offsetHeight,n=document.documentElement.clientWidth,r=document.documentElement.clientHeight,o=getComputedStyle(this).direction==="rtl"?t.right-i:t.left;o=Math.min(o,n-i-he),o=Math.max(o,he);let c=t.bottom+4;c+s>r-he&&t.top-s-4>=he&&(c=t.top-s-4),c=Math.max(he,Math.min(c,r-s-he)),this.#r.style.setProperty("--panel-top",`${Math.round(c)}px`),this.#r.style.setProperty("--panel-left",`${Math.round(o)}px`)}#X=()=>{this.#h&&this.#U()};#W=t=>{this.#h&&!this.contains(t.target)&&this.#z()};#Z(){let t=St(this.#b,this.#k,this.#w);this.#t.setFormValue(t),this.#e.value=t,this.#e.dispatchEvent(new Event("input",{bubbles:!0}))}formResetCallback(){if(!this.#i)return;let t=kt(this.#A,!0);this.#b=t.h,this.#k=t.s,this.#w=t.l,this.#O(),this.#Z()}formStateRestoreCallback(t){if(!t||!this.#i)return;let i=kt(t,!0);this.#b=i.h,this.#k=i.s,this.#w=i.l,this.#O(),this.#Z()}get value(){return St(this.#b,this.#k,this.#w)}set value(t){if(!/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t))return;let i=St(this.#b,this.#k,this.#w).toLowerCase(),s=t.toLowerCase();if(i===s||i===s.toLowerCase())return;let n=kt(t,!0);this.#b=n.h,this.#k=n.s,this.#w=n.l,this.#K("api")}};E("color-picker",Nr);var Qv='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="5" y1="12" x2="19" y2="12"/></svg>',t0='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>';function e0(e){if(!e)return[];let t=e.trim();if(t.startsWith("["))try{return JSON.parse(t).map(s=>({value:String(s.value),label:String(s.label??s.value)}))}catch{return[]}return t.split(",").map(i=>{let s=i.trim();return{value:s,label:s}})}function i0(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}function s0(e){let t=Math.max(0,Math.round(e)),i=Math.floor(t/3600),s=Math.floor(t%3600/60),n=t%60,r=a=>String(a).padStart(2,"0");return i>0?`${i}:${r(s)}:${r(n)}`:`${s}:${r(n)}`}function n0(e,t){let i=Number(e)||0,s=["B","KB","MB","GB","TB","PB"],n=0,r=Math.abs(i);for(;r>=1e3&&n<s.length-1;)r/=1e3,n+=1;let a=new Intl.NumberFormat(t,{minimumFractionDigits:n===0?0:1,maximumFractionDigits:n===0?0:2});return`${i<0?"-":""}${a.format(r)} ${s[n]}`}function r0(){return document.documentElement.lang||void 0}function Mr(e){let t=String(e),i=t.indexOf(".");return i<0?0:t.length-i-1}var Cu=!1,a0=0,_r=class extends k{static formAssociated=!0;static observedAttributes=["value","disabled","readonly","aria-label","aria-labelledby","data-label-decrease","data-label-increase"];#t;#e;#i=-1/0;#n=1/0;#s=1;#o=[];#r=[];#a;#l;#c="";#g=!1;#f=!1;#u;#p;#y;#d=!1;#m=!1;#h;#E;#v;#S;#b;#k;#w=0;#A=0;#L=!1;#x=!1;constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}setup(){this.#R(),this.#B(),this.#G();let t=this.getAttribute("value");this.#d||(this.#y=t,this.#d=!0),this.#j(t??this.#I(),"init"),this.#D(),requestAnimationFrame(()=>{this.isConnected&&this.#D()}),this.listen(this.#h,"focus",()=>this.#D()),this.listen(this,"click",i=>{i.target===this&&!this.#et()&&this.#h.focus()})}teardown(){this.#T(),this.#x=!1}attributeChangedCallback(t,i,s){!this.isConnected||!this.#h||(t==="value"?this.#j(s??this.#I(),"attr"):t==="disabled"||t==="readonly"?this.#C():t==="aria-label"||t==="aria-labelledby"?this.#D():this.#M())}#D(){let t=[],i=[];try{i=[...this.#t.labels||[]]}catch{}for(let a of i)a.id||(a.id=`stepper-wc-label-${++a0}`),t.push(a.id);let s=(this.getAttribute("aria-labelledby")||"").trim();s&&t.push(...s.split(/\s+/));let n=[...new Set(t)];n.length?this.#h.setAttribute("aria-labelledby",n.join(" ")):this.#h.removeAttribute("aria-labelledby");let r=this.getAttribute("aria-label");r?this.#h.setAttribute("aria-label",r):this.#h.removeAttribute("aria-label")}#M(){this.#S.setAttribute("aria-label",this.getAttribute("data-label-decrease")||"Decrease"),this.#b.setAttribute("aria-label",this.getAttribute("data-label-increase")||"Increase")}#R(){if(this.hasAttribute("data-options"))this.#e="enum";else if(this.hasAttribute("data-values"))this.#e="token";else if(this.hasAttribute("data-format")||this.hasAttribute("data-suffix"))this.#e="formatted";else{if(this.#e="numeric",Cu)return;Cu=!0,console.info('[stepper-wc] No mode attribute set. Plain numeric stepping is better served by `<input type="number" data-stepper>`. See /docs/interaction/numeric-inputs/')}}#B(){this.#i=this.hasAttribute("data-min")?Number(this.getAttribute("data-min")):-1/0,this.#n=this.hasAttribute("data-max")?Number(this.getAttribute("data-max")):1/0,this.#s=Number(this.getAttribute("data-step"))||1,this.#o=i0(this.getAttribute("data-values")),this.#r=e0(this.getAttribute("data-options")),this.#a=this.getAttribute("data-format")||(this.hasAttribute("data-suffix")?"number":null),this.#l=this.getAttribute("data-currency")||"USD",this.#c=this.getAttribute("data-suffix")||"",this.#g=this.hasAttribute("data-show-label"),this.#f=this.hasAttribute("data-accelerate"),this.#u=r0(),this.#k=this.#H()}#H(){if(!this.#a)return null;let t=Mr(this.#s);return this.#a==="number"?new Intl.NumberFormat(this.#u,{minimumFractionDigits:t,maximumFractionDigits:t}):this.#a==="currency"?new Intl.NumberFormat(this.#u,{style:"currency",currency:this.#l}):this.#a==="percent"?new Intl.NumberFormat(this.#u,{style:"percent",minimumFractionDigits:t,maximumFractionDigits:t}):null}#I(){return this.#e==="enum"?this.#r[0]?.value??"":this.#e==="token"?this.#o[0]??"":"0"}#G(){this.replaceChildren(),this.#S=document.createElement("button"),this.#S.type="button",this.#S.className="stepper-dec",this.#S.setAttribute("tabindex","-1"),this.#S.innerHTML=Qv,this.#b=document.createElement("button"),this.#b.type="button",this.#b.className="stepper-inc",this.#b.setAttribute("tabindex","-1"),this.#b.innerHTML=t0,this.#h=document.createElement("span"),this.#h.className="stepper-value",this.#h.setAttribute("role","spinbutton"),this.#h.setAttribute("tabindex","0"),this.#E=document.createElement("span"),this.#E.className="stepper-value-display",this.#h.appendChild(this.#E),this.#v=new Set;for(let t of this.#it())this.#z(t);this.appendChild(this.#S),this.appendChild(this.#h),this.appendChild(this.#b),this.#N(this.#S,-1),this.#N(this.#b,1),this.listen(this.#h,"keydown",this.#q),this.#M(),this.#C()}#N(t,i){if(this.listen(t,"click",n=>{if(this.#x){this.#x=!1,n.preventDefault();return}this.#P(i,1)}),!this.#f)return;this.listen(t,"pointerdown",n=>{let r=n;r.pointerType==="mouse"&&r.button!==0||this.#$()||(this.#L=!1,this.#w=window.setTimeout(()=>{this.#L=!0,this.#A=window.setInterval(()=>this.#P(i,1),100),this.#w=window.setTimeout(()=>{window.clearInterval(this.#A),this.#A=window.setInterval(()=>this.#P(i,5),50)},1e3)},500))});let s=()=>{this.#T(),this.#L&&(this.#x=!0)};this.listen(t,"pointerup",s),this.listen(t,"pointerleave",s),this.listen(t,"pointercancel",s)}#T(){window.clearTimeout(this.#w),window.clearInterval(this.#A),this.#w=0,this.#A=0}#q=t=>{if(this.#$())return;let i=getComputedStyle(this).direction==="rtl";switch(i&&t.key==="ArrowLeft"?"ArrowRight":i&&t.key==="ArrowRight"?"ArrowLeft":t.key){case"ArrowUp":case"ArrowRight":t.preventDefault(),this.#P(1,1);break;case"ArrowDown":case"ArrowLeft":t.preventDefault(),this.#P(-1,1);break;case"PageUp":t.preventDefault(),this.#P(1,10);break;case"PageDown":t.preventDefault(),this.#P(-1,10);break;case"Home":t.preventDefault(),this.#Y("min");break;case"End":t.preventDefault(),this.#Y("max");break;default:}};#et(){return this.hasAttribute("disabled")||this.#m}#$(){return this.#et()||this.hasAttribute("readonly")}#C(){let t=this.#et();this.#h.setAttribute("aria-disabled",String(t)),this.hasAttribute("readonly")?this.#h.setAttribute("aria-readonly","true"):this.#h.removeAttribute("aria-readonly"),t?(this.#h.removeAttribute("tabindex"),this.#T()):this.#h.setAttribute("tabindex","0"),this.#p!==void 0?this.#X():(this.#S.disabled=this.#$(),this.#b.disabled=this.#$())}#P(t,i){if(this.#$())return;let s=this.#J(t,i);s===null||s===this.#p||this.#j(s,"step")}#Y(t){if(this.#e==="enum"){let s=t==="min"?0:this.#r.length-1;this.#j(this.#r[s]?.value,"step");return}if(this.#e==="token"){let s=t==="min"?0:this.#o.length-1;this.#j(this.#o[s],"step");return}let i=t==="min"?this.#i===-1/0?this.#p:this.#i:this.#n===1/0?this.#p:this.#n;this.#j(String(i),"step")}#J(t,i){if(this.#e==="enum"){let c=this.#r.findIndex(d=>d.value===this.#p),l=c===-1?0:c,u=Math.min(this.#r.length-1,Math.max(0,l+t*i));return this.#r[u]?.value}if(this.#e==="token"){let l=this.#_(this.#p);l===-1&&(l=this.#V(this.#p));let u=Math.min(this.#o.length-1,Math.max(0,l+t*i));return this.#o[u]}let s=Number(this.#p)||0,n=Mr(this.#s),r=s+t*this.#s*i,a=Number(r.toFixed(n)),o=Math.min(this.#n,Math.max(this.#i,a));return String(o)}#_(t){if(t==null)return-1;let i=this.#o.indexOf(String(t));if(i!==-1)return i;let s=Number(t);if(Number.isFinite(s)){let n=this.#o.findIndex(r=>Number(r)===s);if(n!==-1)return n}return-1}#V(t){let i=Number(t);if(!Number.isFinite(i))return 0;let s=0,n=1/0;return this.#o.forEach((r,a)=>{let o=Number(r);if(!Number.isFinite(o))return;let c=Math.abs(o-i);c<n&&(n=c,s=a)}),s}#j(t,i){let s=this.#Q(t),n=s!==this.#p;this.#p=s,this.getAttribute("value")!==String(s)&&this.setAttribute("value",String(s)),this.#K(),this.#U(),this.#X(),this.#st(),this.#F(),n&&i!=="init"&&(this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})))}#Q(t){if(t==null)return this.#I();if(this.#e==="enum"){let n=String(t);return this.#r.find(a=>a.value===n)?n:this.#r[0]?.value??""}if(this.#e==="token")return String(t);let i=Number(t);if(!Number.isFinite(i))return String(this.#i===-1/0?0:this.#i);let s=Mr(this.#s);return String(Number(Math.min(this.#n,Math.max(this.#i,i)).toFixed(s)))}#K(){let t=this.#O();this.#E.textContent=t,this.#z(t)}#O(t=this.#p){if(this.#e==="enum")return this.#r.find(s=>s.value===t)?.label??t??"";if(this.#e==="token"){let i=this.#g?String(t).replace(/^--/,""):String(t);return this.#c?`${i}${this.#c}`:i}if(this.#e==="formatted"){let i=Number(t)||0;if(this.#a==="duration")return s0(i);if(this.#a==="bytes")return n0(i,this.#u);if(this.#k){let s=this.#a==="percent"?i/100:i,n=this.#k.format(s);return this.#c&&this.#a==="number"?`${n}${this.#c}`:n}return this.#c?`${i}${this.#c}`:String(i)}return String(t??"")}#it(){if(this.#e==="enum")return this.#r.map(s=>this.#O(s.value));if(this.#e==="token")return this.#o.map(s=>this.#O(s));let t=new Set,i=s=>{Number.isFinite(s)&&t.add(s)};if(this.#i!==-1/0&&i(this.#i),this.#n!==1/0&&i(this.#n),i(Number(this.getAttribute("value"))||0),this.#n===1/0){let s=[10,100,1e3,1e4];for(let n of s)i(n);if(this.#a==="bytes")for(let n of[999,999e3,999e6,999e9])i(n)}return[...t].map(s=>this.#O(String(s)))}#z(t){let i=String(t??"");if(!i||this.#v.has(i))return;this.#v.add(i);let s=document.createElement("span");s.className="stepper-value-reserve",s.setAttribute("aria-hidden","true"),s.textContent=i,this.#h.appendChild(s)}recomputeWidth(){if(this.#h){this.#h.querySelectorAll(".stepper-value-reserve").forEach(t=>t.remove()),this.#v=new Set;for(let t of this.#it())this.#z(t)}}#U(){if(this.#e==="enum"){let i=this.#r.findIndex(s=>s.value===this.#p);this.#h.setAttribute("aria-valuemin","1"),this.#h.setAttribute("aria-valuemax",String(this.#r.length)),this.#h.setAttribute("aria-valuenow",String((i===-1?0:i)+1)),this.#h.setAttribute("aria-valuetext",this.#O());return}if(this.#e==="token"){let i=this.#_(this.#p);this.#h.setAttribute("aria-valuemin","1"),this.#h.setAttribute("aria-valuemax",String(this.#o.length)),this.#h.setAttribute("aria-valuenow",String((i===-1?0:i)+1)),this.#h.setAttribute("aria-valuetext",this.#O());return}let t=Number(this.#p)||0;this.#i!==-1/0?this.#h.setAttribute("aria-valuemin",String(this.#i)):this.#h.removeAttribute("aria-valuemin"),this.#n!==1/0?this.#h.setAttribute("aria-valuemax",String(this.#n)):this.#h.removeAttribute("aria-valuemax"),this.#h.setAttribute("aria-valuenow",String(t)),this.#h.setAttribute("aria-valuetext",this.#O())}#X(){let t=this.#W(),i=this.#Z(),s=this.#$();this.#S.disabled=t||s,this.#b.disabled=i||s}#W(){return this.#e==="enum"?this.#p===this.#r[0]?.value:this.#e==="token"?this.#_(this.#p)===0:this.#i!==-1/0&&Number(this.#p)<=this.#i}#Z(){return this.#e==="enum"?this.#p===this.#r[this.#r.length-1]?.value:this.#e==="token"?this.#_(this.#p)===this.#o.length-1:this.#n!==1/0&&Number(this.#p)>=this.#n}#st(){this.#t.setFormValue(String(this.#p??""))}#F(){this.setState("at-min",this.#W()),this.setState("at-max",this.#Z())}formResetCallback(){this.#j(this.#y??this.#I(),"reset")}formDisabledCallback(t){this.#m=t,this.#h&&this.#C()}formStateRestoreCallback(t){t!=null&&this.#j(t,"restore")}get displayText(){return this.#E?.textContent??""}get value(){return this.#p==null?"":String(this.#p)}set value(t){String(t)!==String(this.#p)&&this.#j(t,"api")}get form(){return this.#t.form}get name(){return this.getAttribute("name")}get type(){return this.localName}get validity(){return this.#t.validity}get validationMessage(){return this.#t.validationMessage}checkValidity(){return this.#t.checkValidity()}reportValidity(){return this.#t.reportValidity()}};E("stepper-wc",_r);var o0={live:"Live",recording:"Recording",streaming:"Streaming",error:"Error",online:"Online",running:"Running",away:"Away",paused:"Paused",busy:"Busy",offline:"Offline",stopped:"Stopped"},$r=class extends k{static get observedAttributes(){return["data-variant","data-live","aria-label"]}#t=null;#e=null;#i=!1;setup(){let t=this.querySelector(":scope > .status-dot"),i=this.querySelector(":scope > .status-label"),s=this.querySelector(":scope > .status-default-label");t||(t=document.createElement("span"),t.className="status-dot",t.setAttribute("aria-hidden","true")),i||(i=document.createElement("span"),i.className="status-label"),s||(s=document.createElement("span"),s.className="status-default-label");for(let n of[...this.childNodes])n===t||n===i||n===s||i.appendChild(n);this.append(t,i,s),this.#t=i,this.#e=s,this.#n(),this.#s()}attributeChangedCallback(t,i,s){i!==s&&(!this.isConnected||!this.hasAttribute("data-upgraded")||(t==="data-variant"?(this.#s(),this.dispatchEvent(new CustomEvent("status-wc:change",{bubbles:!0,detail:{variant:s,previousVariant:i}}))):t==="data-live"?this.#n():t==="aria-label"&&this.#s()))}#n(){this.getAttribute("data-live")==="off"?this.#i&&(this.removeAttribute("role"),this.removeAttribute("aria-live"),this.#i=!1):!this.hasAttribute("role")&&!this.hasAttribute("aria-live")&&(this.setAttribute("role","status"),this.setAttribute("aria-live","polite"),this.#i=!0)}#s(){let t=this.#e;if(!t)return;let i=!!this.#t?.textContent?.trim(),s="";if(!i){let n=this.getAttribute("data-variant")||"";s=this.getAttribute("aria-label")||n&&this.getAttribute(`data-label-${n}`)||o0[n]||n}t.textContent!==s&&(t.textContent=s)}get variant(){return this.getAttribute("data-variant")}set variant(t){t?this.setAttribute("data-variant",t):this.removeAttribute("data-variant")}};E("status-wc",$r);He();Ve();var Ir=0,c0='a[href], button, input, select, textarea, summary, iframe, [tabindex], [contenteditable]:not([contenteditable="false"])',l0="a[href], button, input, select, textarea, summary",u0=new Set(["button","link","checkbox","radio","switch","tab","option","treeitem","gridcell","menuitem","menuitemcheckbox","menuitemradio","combobox","textbox","searchbox","slider","spinbutton"]);function ss(e){return e.hasAttribute("data-disabled")||e.getAttribute("aria-disabled")==="true"||!!e.disabled}function d0(e){return e.pointerType===""||e.pointerId===-1||e.button===-1||e.clientX===0&&e.clientY===0&&e.buttons===0}var Br=class extends k{#t;#e;#i;#n=[];#s=-1;#o=!1;#r=[];#a=!1;#l=[];#c=null;setup(){let t=this.querySelector(":scope > [data-trigger]"),i=this.querySelector('menu, ul[role="menu"]');if(!t||!i)return!1;this.#t=t,this.#e=i;let s=this.querySelector(":scope > pop-over[data-context-menu-host]");s?this.#i=s:(this.#i=document.createElement("pop-over"),this.#i.setAttribute("data-context-menu-host",""),this.#i.id=`ctx-menu-${++Ir}`,this.#i.dataset.mode="auto",this.#i.appendChild(this.#e),this.appendChild(this.#i)),this.#e.parentElement!==this.#i&&this.#i.appendChild(this.#e),this.#e.setAttribute("role","menu"),this.#e.id||(this.#e.id=`ctx-menu-list-${++Ir}`),this.#t.matches(c0)||this.#g("tabindex","0"),this.#a=this.#t.matches(l0)||this.#t.hasAttribute("tabindex")&&u0.has((this.#t.getAttribute("role")||"").trim().toLowerCase()),this.#a?(this.#g("aria-haspopup","menu"),this.#g("aria-expanded","false"),this.#g("aria-controls",this.#e.id)):!this.#t.hasAttribute("aria-description")&&!this.#t.hasAttribute("aria-describedby")&&this.#g("aria-description",this.getAttribute("data-label-available")||"Context menu available"),this.#e.querySelectorAll(':scope > li:empty:not([data-group]), :scope > [role="separator"], :scope > hr').forEach(r=>{r.setAttribute("role","separator")}),this.#f();let n=Array.from(this.#e.querySelectorAll('button, a, [role="menuitem"]'));return n.forEach(r=>{r.setAttribute("role","menuitem"),r.setAttribute("tabindex","-1")}),this.#n=n.filter(r=>!r.disabled),this.#e.querySelectorAll("li").forEach(r=>{r.querySelector(':scope > :is(button, a, [role="menuitem"])')&&r.setAttribute("role","none")}),this.#n.forEach(r=>{r.hasAttribute("data-disabled")&&r.setAttribute("aria-disabled","true"),this.listen(r,"click",this.#b);let a=r.getAttribute("data-shortcut");if(a){if(!r.querySelector(":scope > .ctx-kbd")){let c=document.createElement("kbd");c.className="ctx-kbd",c.setAttribute("aria-hidden","true"),c.textContent=Wl(a),r.appendChild(c)}r.setAttribute("aria-keyshortcuts",Wi(a));let o=At(a,()=>{ss(r)||r.click()});this.#r.push(o)}}),this.listen(this.#t,"contextmenu",this.#p),this.listen(this.#t,"keydown",this.#y),this.listen(this.#e,"keydown",this.#v),this.listen(this.#e,"click",this.#S,{capture:!0}),this.listen(window,"scroll",this.#w,{capture:!0}),this.listen(this.#i,"pop-over:hide",this.#k),!0}teardown(){this.#r.forEach(t=>t()),this.#r=[];for(let t of this.#l)this.#t?.removeAttribute(t);this.#l=[],this.#c=null,this.#o&&(this.#o=!1,this.removeAttribute("data-open"),this.#i?.hide?.()),this.#s=-1,this.#n=[],this.#e?.querySelectorAll(".ctx-kbd").forEach(t=>t.remove()),this.#u()}#g(t,i){this.#t.setAttribute(t,i),this.#l.push(t)}#f(){let t=this.#e;for(let i of Array.from(t.querySelectorAll(":scope > li[data-group]"))){i.id||(i.id=`ctx-group-${++Ir}`),i.classList.add("ctx-group-label"),i.setAttribute("aria-hidden","true");let s=document.createElement("li");s.setAttribute("role","group"),s.setAttribute("aria-labelledby",i.id),s.setAttribute("data-ctx-group","");let n=document.createElement("ul");n.setAttribute("role","none"),s.appendChild(n),t.insertBefore(s,i),n.appendChild(i);let r=s.nextElementSibling;for(;r&&!r.hasAttribute("data-group")&&r.getAttribute("role")!=="separator";){let a=r;r=r.nextElementSibling,n.appendChild(a)}}}#u(){let t=this.#e;if(t)for(let i of Array.from(t.querySelectorAll(":scope > li[data-ctx-group]"))){let s=i.querySelector(":scope > ul");if(s)for(let n of Array.from(s.children))t.insertBefore(n,i);i.remove()}}get items(){if(!this.#e)return[];let t=[],i=this.#e.querySelectorAll(":scope > li:not([data-ctx-group]), :scope > li[data-ctx-group] > ul > li");for(let s of i){if(s.hasAttribute("data-group")){t.push({group:s.textContent.trim()});continue}if(s.matches(':empty, [role="separator"]')||s.querySelector("hr")){t.push({separator:!0});continue}let n=s.querySelector('button, a, [role="menuitem"]');if(!n)continue;let r=Array.from(n.childNodes).filter(a=>!(a instanceof Element&&a.classList.contains("ctx-kbd"))).map(a=>a.textContent).join("");t.push({label:r.trim().replace(/\s+/g," "),value:n.getAttribute("data-value")||void 0,href:n.tagName==="A"?n.getAttribute("href"):void 0,shortcut:n.getAttribute("data-shortcut")||void 0,disabled:n.disabled||n.hasAttribute("data-disabled")||void 0})}return t}set items(t){let i=Array.isArray(t)?t:[],s=this.querySelector('menu, ul[role="menu"]');for(s||(s=document.createElement("menu"),this.appendChild(s));s.firstChild;)s.firstChild.remove();for(let n of i){let r=document.createElement("li");if(n.separator)r.setAttribute("role","separator");else if(n.group!=null)r.setAttribute("data-group",""),r.textContent=n.group;else{let a=n.href?document.createElement("a"):document.createElement("button");n.href&&a.setAttribute("href",n.href),n.value&&a.setAttribute("data-value",n.value),n.shortcut&&a.setAttribute("data-shortcut",n.shortcut),n.disabled&&a.setAttribute("data-disabled",""),a.tagName==="BUTTON"&&a.setAttribute("type","button"),a.textContent=n.label||"",r.appendChild(a)}s.appendChild(r)}this._reinit(),this.dispatchEvent(new CustomEvent("context-menu:items-changed",{detail:{items:i,source:"property"},bubbles:!0}))}#p=t=>{if(t.preventDefault(),d0(t)){this.#o||this.#d();return}t.buttons!==0?this.listen(window,"pointerup",()=>{setTimeout(()=>this.#m(t.clientX,t.clientY),0)},{once:!0,capture:!0}):this.#m(t.clientX,t.clientY)};#y=t=>{t.defaultPrevented||(t.key==="ContextMenu"||t.key==="F10"&&t.shiftKey)&&(t.preventDefault(),this.#o||this.#d())};#d(){let t=document.activeElement,s=(t&&this.#t.contains(t)?t:this.#t).getBoundingClientRect();this.#m(s.left,s.bottom)}#m(t,i){let s=document.activeElement;this.#c=s&&this.#t.contains(s)?s:this.#t,this.#o=!0,this.setAttribute("data-open",""),this.#a&&this.#t?.setAttribute("aria-expanded","true"),this.#i.style.top=`${i}px`,this.#i.style.left=`${t}px`,this.#i.show(),requestAnimationFrame(()=>{let n=this.#i.getBoundingClientRect(),r=t+n.width>window.innerWidth?t-n.width:t,a=i+n.height>window.innerHeight?i-n.height:i;this.#i.style.top=`${Math.max(0,a)}px`,this.#i.style.left=`${Math.max(0,r)}px`}),this.#s=-1,this.#A(0),this.dispatchEvent(new CustomEvent("context-menu:open",{bubbles:!0}))}close(){if(!this.#o)return;let t=this.#h();this.#o=!1,this.removeAttribute("data-open"),this.#a&&this.#t?.setAttribute("aria-expanded","false"),this.#s=-1,this.#i?.hide(),t&&this.#E(),this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0}))}#h(){let t=document.activeElement;return!t||t===document.body||!!this.#i?.contains(t)}#E(){let t=this.#c?.isConnected?this.#c:this.#t;this.#c=null,t?.isConnected&&t.focus({preventScroll:!0})}#v=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.#A(this.#s+1);break;case"ArrowUp":case"Up":t.preventDefault(),this.#A(this.#s-1);break;case"Home":t.preventDefault(),this.#A(0);break;case"End":t.preventDefault(),this.#A(this.#n.length-1);break;case"Enter":case" ":{t.preventDefault();let i=this.#n[this.#s];i&&!ss(i)&&i.click();break}case"Tab":this.close();break}};#S=t=>{let i=t.target.closest?.('button, a, [role="menuitem"]');i&&this.#e.contains(i)&&ss(i)&&(t.preventDefault(),t.stopPropagation())};#b=t=>{let i=t.currentTarget;ss(i)||(this.close(),this.dispatchEvent(new CustomEvent("context-menu:select",{bubbles:!0,detail:{item:i,value:i.getAttribute("data-value")||void 0}})))};#k=()=>{this.#o&&(this.#o=!1,this.removeAttribute("data-open"),this.#a&&this.#t?.setAttribute("aria-expanded","false"),this.#s=-1,this.#h()&&this.#E(),this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0})))};#w=()=>{this.#o&&this.close()};#A(t){this.#n.length!==0&&(t<0&&(t=this.#n.length-1),t>=this.#n.length&&(t=0),this.#s=t,this.#n[t].focus())}get isOpen(){return this.#o}};E("context-menu",Br);Rt();var Tu=10,h0=new Set(["replace","append","prepend"]),f0="Failed to load content",Rr=class extends k{#t;#e;#i=null;#n=!1;#s=null;#o="";#r=!1;#a=null;setup(){let t=this.getAttribute("src");return t?(this.#r=!0,this.#i===null&&(this.#i=this.innerHTML),this.#n&&this.#s===t||this.#l(t),!0):!1}teardown(){this.#r=!1,this.#t?.disconnect(),this.hasAttribute("data-loading")&&(this.#e?.abort(),this.removeAttribute("data-loading"),this.removeAttribute("aria-busy"))}get src(){return this.getAttribute("src")||""}set src(t){let i=t==null?"":String(t);this.src!==i&&(i?this.setAttribute("src",i):this.removeAttribute("src"),this.dispatchEvent(new CustomEvent("include-file:src-changed",{detail:{src:i,source:"property"},bubbles:!0})))}static get observedAttributes(){return["src"]}attributeChangedCallback(t,i,s){if(!(t!=="src"||!s||i===s)){if(!this.#r){queueMicrotask(()=>{!this.#r&&this.isConnected&&this.getAttribute("src")&&this._reinit()});return}this.#l(s)}}#l(t){this.hasAttribute("lazy")&&!this.#c()?this.#g():this.#d(t)}#c(){let t=this.getBoundingClientRect();return t.top<window.innerHeight+200&&t.bottom>-200}#g(){this.#t?.disconnect(),this.#t=new IntersectionObserver(t=>{for(let i of t)if(i.isIntersecting){this.#t.disconnect();let s=this.getAttribute("src");s&&this.#d(s)}},{rootMargin:"200px"}),this.#t.observe(this)}#f(t){let i;try{i=new URL(t,document.baseURI)}catch{throw new Error(`Invalid URL: ${t}`)}if(i.protocol!=="http:"&&i.protocol!=="https:")throw new Error(`Refused ${i.protocol} URL: only http(s) is allowed`);return this.#u(i.href),i.href}#u(t){if(!this.hasAttribute("allow-cross-origin")&&new URL(t).origin!==location.origin)throw new Error(`Refused cross-origin URL ${t} (add allow-cross-origin to permit)`)}#p(t){let i=0,s=this.parentElement?.closest("include-file");for(;s;){if(#o in s&&(i++,s.#o===t))throw new Error(`Refused include cycle: ${t} is already included by an ancestor`);s=s.parentElement?.closest("include-file")}if(i>=Tu)throw new Error(`Refused include: nesting deeper than ${Tu}`)}#y(){let t=this.getAttribute("mode")||"replace";return h0.has(t)?t:(console.warn(`<include-file>: unknown mode "${t}", using "replace"`),"replace")}async#d(t){this.#e?.abort();let i=new AbortController;this.#e=i,this.#h(),this.setAttribute("data-loading",""),this.setAttribute("aria-busy","true"),this.removeAttribute("data-loaded"),this.removeAttribute("data-error");try{let s=this.#f(t);this.#p(s),this.#o=s;let n=await fetch(s,{signal:i.signal});if(n.url&&this.#u(n.url),!n.ok)throw new Error(`HTTP ${n.status}: ${n.statusText}`);let r=await n.text();if(i.signal.aborted)return;let a=this.hasAttribute("trusted");this.hasAttribute("allow-scripts")&&!a&&console.warn("<include-file>: allow-scripts is ignored without trusted");let o=a&&this.hasAttribute("allow-scripts"),c;if(a){let f=document.createElement("template");f.innerHTML=r,c=f.content}else c=se(r,{allowIncludeFile:!0,keepIds:!0,keepStyle:!0});let l=document.createElement("template");l.content.append(c.cloneNode(!0));let u=l.innerHTML,d=[...c.querySelectorAll("script")];o||d.forEach(f=>f.remove());let h=this.#y();h==="replace"?this.replaceChildren(c):h==="append"?this.append(c):this.prepend(c);for(let f of o?d:[]){let p=document.createElement("script");for(let m of f.attributes)p.setAttribute(m.name,m.value);p.textContent=f.textContent,f.replaceWith(p)}this.removeAttribute("data-loading"),this.removeAttribute("aria-busy"),this.setAttribute("data-loaded",""),this.#n=!0,this.#s=t,this.dispatchEvent(new CustomEvent("include-file:loaded",{bubbles:!0,detail:{src:t,url:s,html:u}}))}catch(s){if(s.name==="AbortError"||i.signal.aborted)return;this.#m(t,s)}}#m(t,i){if(this.removeAttribute("data-loading"),this.removeAttribute("aria-busy"),this.setAttribute("data-error",""),this.#y()==="replace"&&this.#i!==null&&!this.#n&&(this.innerHTML=this.#i),!this.textContent.trim()&&!this.children.length){let s=document.createElement("p");s.setAttribute("role","alert"),s.setAttribute("data-include-error",""),s.textContent=this.getAttribute("data-label-error")||f0,this.append(s),this.#a=s}this.dispatchEvent(new CustomEvent("include-file:error",{bubbles:!0,detail:{src:t,error:i.message}}))}#h(){this.#a?.parentNode===this&&this.#a.remove(),this.#a=null}reload(){let t=this.getAttribute("src");t&&this.#d(t)}};E("include-file",Rr);ct();var Lu="environment",Du="preferences",Fr={timeOfDay:!1,seasonal:!1},p0=900*1e3,xt={...Fr};function jt(e,t,i){return e+(t-e)*Math.min(1,Math.max(0,i))}var fe={_timer:null,_baseHues:null,_timeOverride:null,_monthOverride:null,async init(){let e=await x.get(Lu,Du);xt=e?{...Fr,...e}:{...Fr},(xt.timeOfDay||xt.seasonal)&&(this._captureBaseHues(),this._update(),this._startLoop()),window.addEventListener("vb:theme-change",()=>{this._hasActiveSource()&&requestAnimationFrame(()=>{this._captureBaseHues(),this._update()})})},load(){return{...xt}},save(e){return xt={...xt,...e},x.set(Lu,Du,xt).catch(()=>{}),{...xt}},setTimeOverride(e){this._timeOverride=e,this._hasActiveSource()&&this._update()},setMonthOverride(e){this._monthOverride=e,this._hasActiveSource()&&this._update()},setSource(e,t){let i=this.save({[e]:t});t?(this._captureBaseHues(),this._update(),this._startLoop()):this._hasActiveSource(i)?this._update():(this._clearModifiers(),this._stopLoop())},_hasActiveSource(e){let t=e||this.load();return t.timeOfDay||t.seasonal},_captureBaseHues(){let e=document.documentElement;e.style.removeProperty("--hue-primary"),e.style.removeProperty("--hue-secondary"),e.style.removeProperty("--hue-accent");let t=e.getAttribute("data-theme");if(t){let i=`[data-theme~="${t}"]`;for(let s of document.styleSheets)try{for(let n=0;n<s.cssRules.length;n++){let r=s.cssRules[n];if(r.selectorText?.includes(i)&&!r.selectorText.includes("dark")){let a=r.style?.getPropertyValue("--hue-primary");if(a){this._baseHues={primary:parseFloat(a)||260,secondary:parseFloat(r.style.getPropertyValue("--hue-secondary"))||200,accent:parseFloat(r.style.getPropertyValue("--hue-accent"))||30};return}}}}catch{}}this._baseHues={primary:260,secondary:200,accent:30}},_update(){let e=this.load(),t=0;e.timeOfDay&&(t+=this._getTimeOfDayOffset()),e.seasonal&&(t+=this._getSeasonalOffset());let i=document.documentElement;t!==0&&this._baseHues?(i.style.setProperty("--hue-primary",String(this._baseHues.primary+t)),i.style.setProperty("--hue-secondary",String(this._baseHues.secondary+t)),i.style.setProperty("--hue-accent",String(this._baseHues.accent+t*.5))):t===0&&this._clearModifiers()},_clearModifiers(){let e=document.documentElement;e.style.removeProperty("--hue-primary"),e.style.removeProperty("--hue-secondary"),e.style.removeProperty("--hue-accent")},_getTimeOfDayOffset(){let e=this._timeOverride??new Date().getHours()+new Date().getMinutes()/60;return e<5?-20:e<7?jt(-20,20,(e-5)/2):e<10?jt(20,5,(e-7)/3):e<14?jt(5,0,(e-10)/4):e<17?jt(0,-5,(e-14)/3):e<19?jt(-5,15,(e-17)/2):e<21?jt(15,-10,(e-19)/2):jt(-10,-20,(e-21)/8)},_getHemisphere(){return window.__VB_ENV_LOCATION?.hemisphere||"north"},_getSeasonalOffset(){let e=this._monthOverride??new Date().getMonth(),i=this._getHemisphere()==="south"?(e+6)%12:e;return i>=2&&i<=4?5:i>=5&&i<=7?10:i>=8&&i<=10?-5:-10},_startLoop(){this._timer||(this._timer=setInterval(()=>this._update(),p0))},_stopLoop(){this._timer&&clearInterval(this._timer),this._timer=null}};var ns=null;function Mu(){return"0.7.0-30b3407e8"}function m0(){let e=document.querySelectorAll('script[src*="vanilla-breeze"]'),t="/cdn/sw.js";for(let i of e){let s=i.getAttribute("src");if(s){let n=s.lastIndexOf("/");if(n!==-1){t=s.slice(0,n)+"/sw.js";break}}}return t}function _u(){return ns||(ns=navigator.serviceWorker?.ready??Promise.reject(new Error("SW not supported"))),ns}function $u(e){return new Promise((t,i)=>{navigator.serviceWorker?.controller?Nu(navigator.serviceWorker.controller,e,t,i):_u().then(s=>{let n=s.active||s.waiting||s.installing;n?Nu(n,e,t,i):i(new Error("No active service worker"))}).catch(i)})}function Nu(e,t,i,s){let n=new MessageChannel;n.port1.onmessage=r=>i(r.data),n.port1.onmessageerror=()=>s(new Error("Message error")),e.postMessage({type:t},[n.port2]),setTimeout(()=>s(new Error("SW message timeout")),5e3)}async function Iu(){return $u("GET_STATUS")}async function Bu(){return $u("CLEAR_CACHE")}async function Ru(){let e=await _u();return await e.update(),{updated:!!e.waiting}}function g0(){return typeof window>"u"||!("serviceWorker"in navigator)?!1:window.__VB_SERVICE_WORKER?!0:document.querySelector('meta[name="vb-service-worker"]')?.content==="true"}if(g0()){let e=m0();window.addEventListener("load",()=>{ns=navigator.serviceWorker.register(e).catch(t=>{console.warn("[VB] Service worker registration failed:",t)})})}ct();ar();var pe=null,st="settings",os={motionFx:!0,sounds:!1,charShortcuts:!0},jr=()=>({...os,charShortcuts:Pt()}),A0=document.documentElement.hasAttribute("data-sticky"),Hr=null,E0={trigger:"Site settings",dialog:"Site settings",title:"Settings",close:"Close settings",appearance:"Appearance","color-mode":"Color mode","mode-auto":"Auto","mode-light":"Light","mode-dark":"Dark",theme:"Theme",accessibility:"Accessibility","high-contrast":"High Contrast","large-text":"Large Text",dyslexia:"Dyslexia-Friendly","char-shortcuts":"Single-Key Shortcuts",layout:"Layout",fluid:"Fluid Scaling",density:"Density","density-compact":"Compact","density-default":"Default","density-spacious":"Spacious",backdrop:"Canvas Backdrop","backdrop-style":"Style","backdrop-default":"Default","backdrop-flush":"Flush","backdrop-elevated":"Elevated",chrome:"Chrome","chrome-card":"Card","chrome-stretch":"Stretch","chrome-integrated":"Integrated","fixed-header":"Fixed Header","page-bg":"Page Background","page-bg-default":"Theme Default","page-bg-color":"Solid Color","page-bg-gradient":"Gradient","bg-color":"Color","grad-start":"Start","grad-end":"End","grad-direction":"Direction","dir-to-bottom":"Top \u2192 Bottom","dir-to-right":"Left \u2192 Right","dir-135deg":"Diagonal \u2198","dir-45deg":"Diagonal \u2197",sticky:"Sticky Navigation",effects:"Effects",motion:"Motion Effects",sounds:"Sound Effects",environment:"Environment","time-of-day":"Time-of-Day Shifts",seasonal:"Seasonal Tinting",system:"System","sw-label":"Service Worker:","sw-checking":"checking\u2026","sw-unsupported":"Not supported","sw-active":"Active ({n} cached files)","sw-unregistered":"Not registered","clear-cache":"Clear Cache",clearing:"Clearing\u2026",cleared:"Cache cleared","check-update":"Check for Updates",checking:"Checking\u2026","update-available":"Update available","up-to-date":"Up to date",failed:"Failed",reset:"Reset to Defaults","reset-confirm":"Reset all settings to defaults?","reset-yes":"Reset","reset-cancel":"Cancel","reset-done":"Settings reset to defaults"},k0='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>';function Tt(e){return String(e).replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")}async function zr(e){let t=document.documentElement;e?t.dataset.sticky="":delete t.dataset.sticky;try{let i=await Promise.resolve().then(()=>(qu(),Ou));e?i.initStickyManager():i.destroyStickyManager()}catch{}}var Vr=class extends k{#t=null;#e=null;#i=!1;#n=!1;#s=0;#o="";#r=new Set;#a=[];#l=[];#c={...os,charShortcuts:Pt()};#g=document.documentElement.hasAttribute("data-sticky");setup(){let t=++this.#s;return this.#o||=crypto.randomUUID().slice(0,8),this.#L(),this.#D(),this.#U(),this.listen(window,"vb:theme-change",this.#z),this.listen(window,"vb:extensions-change",this.#z),this.listen(window,"vb:a11y-themes-change",this.#z),this.#n&&(this.#n=!1,this.open()),this.#y().then(()=>{this.#f(t)&&this.#U()}),!0}teardown(){this.#s++;for(let i of this.#a)clearTimeout(i);this.#a=[],this.#i=!1,this.removeAttribute("open"),this.#t?.setAttribute("aria-expanded","false");let t=!!this.#e?.contains(document.activeElement);this.#e?.remove(),t&&this.#t?.isConnected&&this.#t.focus(),this.#e=null}#f(t){return t===this.#s&&this.isConnected}#u(t,i={}){let s=this.getAttribute(`data-label-${t}`)??E0[t]??t;for(let[n,r]of Object.entries(i))s=s.replaceAll(`{${n}}`,String(r));return s}#p(t){return Tt(this.#u(t))}get data(){return{a11yThemes:[...this.#l],extensions:{...this.#c},sticky:this.#g}}set data(t){if(!t||typeof t!="object")return;let i=[],s=[];Array.isArray(t.a11yThemes)&&(this.#l=t.a11yThemes.map(String),s.push("a11y"),i.push(x.set(st,"a11y",this.#l)),this.#F(),window.dispatchEvent(new CustomEvent("vb:a11y-themes-change",{detail:[...this.#l]}))),t.extensions&&typeof t.extensions=="object"&&(this.#c={...jr(),...t.extensions},s.push("extensions"),i.push(x.set(st,"extensions",this.#c)),this.#tt()),t.sticky!=null&&(this.#g=!!t.sticky,s.push("sticky"),i.push(x.set(st,"sticky",this.#g?"on":"off")),zr(this.#g));for(let n of s)this.#r.add(n);this.#e&&this.#U(),Promise.allSettled(i).then(()=>{for(let n of s)this.#r.delete(n);this.#e&&this.#U(),this.dispatchEvent(new CustomEvent("settings-panel:data-changed",{detail:{data:this.data,source:"property"},bubbles:!0}))})}async#y(){let[t,i,s]=await Promise.all([x.get(st,"a11y"),x.get(st,"extensions"),x.get(st,"sticky")]);Hr===null&&(Hr=A0&&s!=="on"),this.#r.has("a11y")||(this.#l=Array.isArray(t)?t:[]),this.#r.has("extensions")||(this.#c={...jr(),...i??{}}),this.#r.has("sticky")||(this.#g=document.documentElement.hasAttribute("data-sticky"))}#d(t){return t!==""&&t!==void 0}#m(t){return t==="compact"?"compact":t==="spacious"?"spacious":"default"}#h(t,i){return t?i==="compact"?"compact":i==="spacious"?"spacious":"default":""}#E(t){return t!==""&&t!==void 0}#v(t){return t==="flush"?"flush":t==="elevated"?"elevated":"default"}#S(t,i){return t?i==="flush"?"flush":i==="elevated"?"elevated":"default":""}#b(t){if(!t)return"card";let i=t.split(/\s+/);for(let s of i)if(s==="stretch"||s==="integrated")return s;return"card"}#k(t){return t?t.split(/\s+/).includes("fixed"):!1}#w(t,i){let s=[];return t&&t!=="card"&&s.push(t),i&&s.push("fixed"),s.join(" ")||"card"}#A(t){return this.#e?.querySelector(t)??null}#L(){this.#t=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button"),this.#t||(this.#t=document.createElement("button"),this.#t.setAttribute("type","button"),this.#t.setAttribute("data-trigger",""),this.#t.setAttribute("data-minted",""),this.#t.className="settings-trigger",this.#t.innerHTML=k0,this.prepend(this.#t)),this.#t.hasAttribute("data-minted")&&this.#t.setAttribute("aria-label",this.#u("trigger")),this.#t.setAttribute("aria-haspopup","dialog"),this.#t.setAttribute("aria-expanded","false"),this.#e=document.createElement("div"),this.#e.className="settings-panel",this.#e.setAttribute("role","dialog"),this.#e.setAttribute("aria-label",this.#u("dialog")),this.#e.tabIndex=-1;let t=`settings-panel-${this.#o}`;this.#e.id=t,this.#t.setAttribute("aria-controls",t),this.#e.innerHTML=this.#x(),this.appendChild(this.#e)}#x(){let{mode:t,brand:i,fluid:s,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:l,pageBgGradDir:u}=I.getState(),d=[...this.#l],h={...this.#c},f=fe.load(),p=this.#d(s),m=this.#m(s),g=this.#E(n),b=this.#v(n),A=this.#o,w=S=>this.#p(S),_=(S,L,F,Be,ot,te={})=>`
345
+ `,lr=class extends k{static get observedAttributes(){return["trend","loading"]}setup(){if(this.shadowRoot)for(let t of au){let i=this.shadowRoot.querySelector(`slot[name="${t}"]`);this.#t(t,i)}else{let t=this.attachShadow({mode:"open"});t.innerHTML=wv;for(let i of au){let s=t.querySelector(`slot[name="${i}"]`);s?.addEventListener("slotchange",()=>this.#t(i,s)),this.#t(i,s)}}this.#e(),this.#i(),this.#n()}attributeChangedCallback(t){this.isConnected&&(t==="trend"?this.#e():t==="loading"&&this.#i())}#t(t,i){let s=!!i&&i.assignedNodes({flatten:!0}).some(n=>n.nodeType===Node.ELEMENT_NODE||n.nodeType===Node.TEXT_NODE&&n.textContent.trim().length>0);this.setState(`has-${t}`,s)}#e(){let t=(this.getAttribute("trend")||"").toLowerCase();for(let i of vv)this.setState(`trend-${i}`,i===t)}#i(){let t=this.hasAttribute("loading");this.setState("loading",t),t?this.setAttribute("aria-busy","true"):this.getAttribute("aria-busy")==="true"&&this.removeAttribute("aria-busy")}#n(){let t=this.closest("a[href]");this.setState("interactive",!!t)}};E("score-card",lr);var Av=0;function Xi(e,t){return e.matches("content-swap")?t:`data-${t}`}function Ki(e){let t=e.querySelector(':scope > [data-face="front"]'),i=e.querySelector(':scope > [data-face="back"]');if(!t||!i)return;e.style.viewTransitionName||(e.style.viewTransitionName=`content-swap-${++Av}`);let s=e.matches("content-swap");s||e.setAttribute("data-swap-init","");let n=[];function r(l,u,d,h){l.addEventListener(u,d,h),n.push(()=>l.removeEventListener(u,d,h))}let a=[...e.querySelectorAll("[data-swap]")].filter(l=>l.parentElement?.closest("content-swap, [data-swap]")===e),o=a.length===0,c=e.querySelector(":scope > [data-swap-toggle]");if(o){if(!c){let l=document.createElement("button");l.type="button",l.setAttribute("data-swap-toggle",""),l.textContent="Show back",e.append(l),c=l}r(c,"click",l=>{l.stopPropagation(),Ot(e,l.detail===0?"keyboard":"pointer")}),r(e,"click",l=>{let d=l.target.closest?.(kv);d&&d!==e&&e.contains(d)||Ot(e,"pointer")})}else c&&!c.hasAttribute("data-swap")&&c.remove(),c=null,a.forEach(l=>{let u=l.matches(Ev);r(l,"click",d=>{d.stopPropagation();let h=u&&d.detail===0;Ot(e,h?"keyboard":"pointer")}),!u&&(l.hasAttribute("role")||(l.setAttribute("role","button"),n.push(()=>l.removeAttribute("role"))),l.hasAttribute("tabindex")||(l.setAttribute("tabindex","0"),n.push(()=>l.removeAttribute("tabindex"))),r(l,"keydown",d=>{d.target===l&&(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),Ot(e,"keyboard"))}))});if(e.matches('[data-gesture="flick"], [data-gesture="swipe"]')&&(r(e,"swipe-left",()=>Ot(e,"pointer")),r(e,"swipe-right",()=>Ot(e,"pointer"))),!s){let l=new MutationObserver(()=>Yi(e,t,i));l.observe(e,{attributes:!0,attributeFilter:["data-swapped"]}),n.push(()=>l.disconnect())}return Yi(e,t,i),Sv([t,i]),()=>{for(let l of n)l();n.length=0}}var Ev='button, a[href], summary, input:is([type="button"], [type="submit"], [type="reset"])',kv='a[href], button, input, select, textarea, label, summary, [contenteditable=""], [contenteditable="true"], [tabindex]';function Sv(e){let t=e.map(i=>i.style.transition);for(let i of e)i.style.transition="none";for(let i of e)getComputedStyle(i).transform;e.forEach((i,s)=>{i.style.transition=t[s]})}function Yi(e,t,i){let s=e.hasAttribute(Xi(e,"swapped"));t.inert=s,i.inert=!s,e.querySelector(":scope > [data-swap-toggle]")?.setAttribute("aria-pressed",String(s))}function lu(e){return{front:e.querySelector(':scope > [data-face="front"]'),back:e.querySelector(':scope > [data-face="back"]')}}function Ge(e,t,i="api"){let{front:s,back:n}=lu(e);if(!s||!n)return;let r=Xi(e,"swapped");if(t&&e.hasAttribute(r)||!t&&!e.hasAttribute(r))return;let a=document.activeElement,o=()=>{t?e.setAttribute(r,""):e.removeAttribute(r),Yi(e,s,n),xv(e,i);let u=t?n:s,d=t?s:n,h=u.querySelector("[autofocus]");h?h.focus():i==="keyboard"&&d.contains(a)&&Cv(u)},c=u=>{let d=e;typeof d.setState=="function"&&d.setState("transition-running",u)};c(!0);let l=ut(o);l&&l.finished&&typeof l.finished.finally=="function"?l.finished.finally(()=>c(!1)):c(!1)}function Ot(e,t="api"){Ge(e,!e.hasAttribute(Xi(e,"swapped")),t)}function xv(e,t="internal"){e.dispatchEvent(new CustomEvent("content-swap:swap",{detail:{swapped:e.hasAttribute(Xi(e,"swapped")),source:t},bubbles:!0}))}function Cv(e){let t=e.querySelector("[data-swap], button, a, input, select, textarea");t&&t.focus()}var ur=class extends k{static observedAttributes=["swapped"];#t=null;attributeChangedCallback(){if(!this.isConnected)return;let{front:t,back:i}=lu(this);t&&i&&Yi(this,t,i)}setup(){this.#t=Ki(this)??null}teardown(){this.#t?.(),this.#t=null}flip(){Ge(this,!0)}unflip(){Ge(this,!1)}toggle(){Ot(this)}get flipped(){return this.hasAttribute("swapped")}set flipped(t){Ge(this,!!t)}get swapped(){return this.hasAttribute("swapped")}set swapped(t){Ge(this,!!t)}};E("content-swap",ur);function ou(){document.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(e=>{e.querySelector(":scope > [data-face]")&&Ki(e)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ou):ou();var cu=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.hasAttribute("data-swap")&&!s.matches("content-swap")&&!s.hasAttribute("data-swap-init")&&s.querySelector(":scope > [data-face]")&&Ki(s),s.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(n=>{n.querySelector(":scope > [data-face]")&&Ki(n)})}});document.body?cu.observe(document.body,{childList:!0,subtree:!0}):document.addEventListener("DOMContentLoaded",()=>{cu.observe(document.body,{childList:!0,subtree:!0})});var dr=class extends k{#t=null;#e=!1;#i=null;setup(){!this.hasAttribute("role")&&!this.querySelector("nav")&&this.setAttribute("role","navigation"),this.#r("pathname"),this.listen(window,"popstate",this.#s);let t=window.navigation;t&&typeof t.addEventListener=="function"&&this.listen(t,"currententrychange",this.#o)}get items(){return this.#t?this.#t.map(t=>({...t})):Array.from(this.#n()).map(t=>({href:t.getAttribute("href")||"",label:t.textContent?.trim()||""}))}set items(t){if(!Array.isArray(t))return;let i=t.map(s=>({...s}));this.#t&&this.#u(this.#t,i)||(this.#t=i,this.#g(i),this.#e?this.#c(this.#i):this.#r("pathname"),this.dispatchEvent(new CustomEvent("nav-bar:items-changed",{detail:{items:this.items,source:"property"},bubbles:!0,composed:!0})))}get current(){if(this.#e)return this.#i;for(let t of this.#n())if(t.getAttribute("aria-current")==="page")return t.getAttribute("data-route")||t.getAttribute("href")||null;return null}set current(t){let i=this.current,s=t==null?null:String(t);this.#e=!0,this.#i=s,this.#c(s),i!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:i,source:"property"},bubbles:!0,composed:!0}))}releaseCurrent(){this.#e&&(this.#e=!1,this.#i=null,this.#r("pathname"))}refresh(){this.#e||this.#r("pathname")}#n(){let t=this.querySelectorAll("a[data-nav-link]");return t.length>0?t:this.querySelectorAll(":scope > a")}#s=()=>{this.#e||this.#r("popstate")};#o=()=>{queueMicrotask(()=>{this.#e||!this.isConnected||this.#r("navigation")})};#r(t){let i=this.current,s=this.#a();this.#c(s),s==null&&this.#l(),i!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:i,source:t},bubbles:!0,composed:!0}))}#a(){let t=Zi(window.location.pathname),i=window.location.origin,s=Array.from(this.#n());if(s.length===0)return null;let n=this.getAttribute("data-match")==="exact",r=null,a=null,o=-1;for(let l of s){let u=l.getAttribute("href");if(!u||u.startsWith("#"))continue;let d;try{d=new URL(u,document.baseURI)}catch{continue}if(!/^https?:$/.test(d.protocol)||d.origin!==i)continue;let h=Zi(d.pathname);if(h===t){r==null&&(r=l);continue}!n&&h!=="/"&&t.startsWith(h+"/")&&h.length>o&&(a=l,o=h.length)}let c=r||a;return c?c.getAttribute("data-route")||c.getAttribute("href"):null}#l(){let t=Zi(window.location.pathname),i=window.location.origin,s=this.getAttribute("data-match")==="exact",n=null,r=-1;for(let a of this.querySelectorAll("a[data-nav-link]")){let o=a.closest("drop-down, li");if(!(!o||!this.contains(o)))for(let c of o.querySelectorAll("a[href]:not([data-nav-link])")){let l=c.getAttribute("href");if(!l||l.startsWith("#"))continue;let u;try{u=new URL(l,document.baseURI)}catch{continue}if(!/^https?:$/.test(u.protocol)||u.origin!==i)continue;let d=Zi(u.pathname),h=-1;d===t?h=Number.MAX_SAFE_INTEGER:!s&&d!=="/"&&t.startsWith(d+"/")&&(h=d.length),h>r&&(n=a,r=h)}}n&&n.setAttribute("aria-current","true")}#c(t){let i=this.#n();for(let s of i){let n=s.getAttribute("data-route")||s.getAttribute("href");t!=null&&n===t?s.setAttribute("aria-current","page"):s.removeAttribute("aria-current")}}#g(t){this.querySelectorAll(":scope > a").forEach(n=>n.remove());let i=this.querySelector("a[data-nav-link]")!=null,s=document.createDocumentFragment();for(let n of t){let r=this.#f(n);i&&r.setAttribute("data-nav-link",""),s.appendChild(r)}this.appendChild(s)}#f(t){let i=document.createElement("a"),s=Tv(t.href);if(s!=null&&i.setAttribute("href",s),t.route&&i.setAttribute("data-route",t.route),t.external&&(i.target="_blank",i.rel="noopener noreferrer"),t.icon){let n=document.createElement("icon-wc");n.setAttribute("name",String(t.icon)),n.setAttribute("size","sm"),i.appendChild(n)}if(i.appendChild(document.createTextNode(t.label||"")),t.external){let n=document.createElement("span");n.className="sr-only",n.textContent=` ${this.getAttribute("data-label-new-tab")??"(opens in new tab)"}`,i.appendChild(n)}if(t.badge!=null){let n=document.createElement("span");n.className="badge",n.textContent=String(t.badge),i.appendChild(n)}return i}#u(t,i){if(t.length!==i.length)return!1;for(let s=0;s<t.length;s++){let n=Object.keys(t[s]).sort(),r=Object.keys(i[s]).sort();if(n.length!==r.length)return!1;for(let a=0;a<n.length;a++)if(n[a]!==r[a]||t[s][n[a]]!==i[s][r[a]])return!1}return!0}};function Zi(e){let t=e.replace(/\/+$/,"");return t===""?"/":t}function Tv(e){if(e==null||e==="")return"#";let t=String(e),i;try{i=new URL(t,document.baseURI)}catch{return null}return/^https?:$/.test(i.protocol)?t:null}E("nav-bar",dr);var Dv=0,mr=class extends k{#t;#e=[];#i;#n;#s;#o;#r;#a;#l=null;#c=0;#g=0;#f=!1;#u=!1;#p=!1;#y=null;#d=!1;#m=!1;#h=!1;#E=!1;#v=new WeakSet;get currentIndex(){return this.#c}get slideCount(){return this.#e.length}get playing(){return this.#l!==null}setup(){let t=[...this.children];if(t.length===0)return!1;this.#u=window.matchMedia("(prefers-reduced-motion: reduce)").matches||document.documentElement.hasAttribute("data-motion-reduced"),this.#p=this.hasAttribute("transition")&&!!document.startViewTransition,this.hasAttribute("transition")&&!this.#p&&this.removeAttribute("transition"),this.setAttribute("role","region"),this.setAttribute("aria-roledescription","carousel"),!this.hasAttribute("aria-label")&&!this.hasAttribute("aria-labelledby")&&this.setAttribute("aria-label","Carousel"),this.#t=document.createElement("div"),this.#t.className="carousel-track",this.#t.setAttribute("tabindex","0"),this.#t.setAttribute("role","group"),this.#t.setAttribute("aria-label",this.dataset.labelTrack||"Slides");let i=this.getAttribute("item-width");if(i&&i!=="auto"&&i!=="full"&&CSS.supports("inline-size",i)&&this.#t.style.setProperty("--_item-width",i),t.forEach((a,o)=>{a.setAttribute("role","group"),a.setAttribute("aria-roledescription","slide"),a.hasAttribute("aria-label")||(a.setAttribute("aria-label",`${o+1} of ${t.length}`),this.#v.add(a)),this.#t.appendChild(a)}),this.#e=[...this.#t.children],this.hasAttribute("autoplay")&&!this.#u&&this.#b(),this.#n=document.createElement("button"),this.#n.type="button",this.#n.className="carousel-prev",this.#n.setAttribute("aria-label","Previous slide"),this.#n.innerHTML='<icon-wc name="chevron-left" size="sm"></icon-wc>',this.#s=document.createElement("button"),this.#s.type="button",this.#s.className="carousel-next",this.#s.setAttribute("aria-label","Next slide"),this.#s.innerHTML='<icon-wc name="chevron-right" size="sm"></icon-wc>',this.getAttribute("indicators")!=="false"&&(this.#o=document.createElement("div"),this.#o.className="carousel-indicators",this.#o.setAttribute("role","group"),this.#o.setAttribute("aria-label","Slide indicators"),this.#e.forEach((a,o)=>{let c=document.createElement("button");c.type="button",c.className="carousel-dot",c.setAttribute("aria-label",`Go to slide ${o+1}`),o===0&&c.setAttribute("aria-current","true"),this.listen(c,"click",()=>this.goTo(o)),this.#o.appendChild(c)})),this.#r=document.createElement("div"),this.#r.className="carousel-live",this.#r.setAttribute("aria-live","polite"),this.#r.setAttribute("aria-atomic","true"),this.#i&&this.appendChild(this.#i),this.appendChild(this.#n),this.appendChild(this.#t),this.appendChild(this.#s),this.#o&&this.appendChild(this.#o),this.appendChild(this.#r),this.listen(this.#n,"click",()=>this.prev()),this.listen(this.#s,"click",()=>this.next()),this.listen(this.#t,"keydown",this.#H),this.listen(this,"mouseenter",()=>{this.#h=!0,this.#w()}),this.listen(this,"mouseleave",()=>{this.#h=!1,this.#w()}),this.listen(this,"touchstart",()=>{this.#h=!0,this.#w()},{passive:!0}),this.listen(this,"focusin",()=>{this.#E=!0,this.#w()}),this.listen(this,"focusout",a=>{this.contains(a.relatedTarget)||(this.#E=!1,this.#w())}),this.#p){let a=++Dv,o=this.getAttribute("transition")||"fade",c=o==="slide"?"vt-carousel-slide":o==="scale"?"vt-carousel-scale":"vt-carousel";this.#t.style.viewTransitionName=`carousel-${a}`,this.#t.style.viewTransitionClass=c}if(this.#p){let a=this.#t;Promise.resolve().then(()=>(pr(),fr)).then(({addSwipeListener:o})=>{!this.isConnected||this.#t!==a||(this.#y=o(a,{threshold:40}),this.listen(a,"swipe-left",()=>this.#x()?this.prev():this.next()),this.listen(a,"swipe-right",()=>this.#x()?this.next():this.prev()))})}this.#p||(this.#a=new IntersectionObserver(this.#B,{root:this.#t,threshold:.5}),this.#e.forEach(a=>this.#a.observe(a)),"onscrollend"in window&&this.listen(this.#t,"scrollend",()=>{this.#f=!1,this.#M()}));let r=this.#I()??(Number(this.getAttribute("start"))||0);if(this.#p){let a=r>0&&r<this.#e.length?r:0;this.#e.forEach((o,c)=>{o.hidden=c!==a}),this.#D(a)}else r>0&&r<this.#e.length&&this.goTo(r,!1);return this.#R(),this.#h=this.#E=!1,this.#d=this.hasAttribute("autoplay")&&!this.#u&&!this.#m,this.#w(),!0}teardown(){this.#d=!1,this.#L(),this.#a&&(this.#a.disconnect(),this.#a=null),this.#y&&(this.#y(),this.#y=null),this.#t?.parentElement===this&&[...this.#t.children].forEach(t=>this.appendChild(t)),this.#e.forEach(t=>{this.#v.has(t)&&t.removeAttribute("aria-label")}),this.#t?.remove(),this.#i?.remove(),this.#n?.remove(),this.#s?.remove(),this.#o?.remove(),this.#r?.remove(),this.#t=this.#i=this.#n=this.#s=this.#o=this.#r=null,this.#e=[],this.#p=!1,this.#c=0,this.#g=0,this.#f=!1}get slides(){return this.#e.map((t,i)=>({id:t.id||void 0,html:t.innerHTML,label:t.getAttribute("aria-label")||`${i+1} of ${this.#e.length}`}))}set slides(t){let i=Array.isArray(t)?t:[];for(;this.firstChild;)this.firstChild.remove();for(let s of i){let n=document.createElement("div");s.id&&(n.id=s.id),s.label&&n.setAttribute("aria-label",s.label),n.innerHTML=s.html||"",this.appendChild(n)}this._reinit(),this.dispatchEvent(new CustomEvent("carousel-wc:slides-changed",{detail:{slides:i,source:"property"},bubbles:!0}))}next(){let t=this.hasAttribute("loop");this.#c<this.#e.length-1?this.goTo(this.#c+1):t&&this.goTo(0)}prev(){let t=this.hasAttribute("loop");this.#c>0?this.goTo(this.#c-1):t&&this.goTo(this.#e.length-1)}goTo(t,i=!0){if(!(t<0||t>=this.#e.length)){if(this.#p)if(i&&t!==this.#c){let s=t>this.#c?"forward":"backward";document.documentElement.dataset.vtDirection=s,ut(()=>{this.#S(t)}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}else this.#S(t);else{let s=this.#e[t].getBoundingClientRect(),n=this.#t.getBoundingClientRect(),r=this.#x()?s.right-n.right:s.left-n.left,a=i&&!this.#u?"smooth":"instant";this.#t.scrollTo({left:this.#t.scrollLeft+r,behavior:a})}this.#D(t)}}#S(t){this.#e.forEach((i,s)=>{i.hidden=s!==t})}play(){this.#u||!this.#t||(this.#m=!1,this.#d=!0,this.#h=this.#E=!1,this.#i||(this.#b(),this.insertBefore(this.#i,this.firstChild)),this.#w())}pause(){this.#m=!0,this.#d=!1,this.#w()}#b(){let t=document.createElement("button");t.type="button",t.className="carousel-rotate",this.listen(t,"click",()=>{this.#d?this.pause():this.play()}),this.#i=t,this.#k()}#k(){let t=this.#i;if(!t)return;let i=this.#d?"Pause automatic slide show":"Start automatic slide show";t.getAttribute("aria-label")!==i&&(t.setAttribute("aria-label",i),t.innerHTML=`<icon-wc name="${this.#d?"pause":"play"}" size="sm"></icon-wc>`)}#w(){this.#d&&!this.#h&&!this.#E&&!this.#u&&this.isConnected&&!!this.#t?this.#A():this.#L(),this.#k()}#A(){if(this.#l)return;let t=Number(this.getAttribute("autoplay-delay"))||5e3;this.#l=setInterval(()=>this.next(),t),this.#r?.setAttribute("aria-live","off"),this.dispatchEvent(new CustomEvent("carousel-wc:play",{bubbles:!0}))}#L(){this.#r?.setAttribute("aria-live","polite"),this.#l&&(clearInterval(this.#l),this.#l=null,this.dispatchEvent(new CustomEvent("carousel-wc:pause",{bubbles:!0})))}#x(){return getComputedStyle(this).direction==="rtl"}reset(){let t=Number(this.getAttribute("start"))||0;this.goTo(t,!1),this.#N()}#D(t){this.#c=t,this.#R(),this.#G(),this.#r&&(this.#r.textContent=`Slide ${t+1} of ${this.#e.length}`),!this.#f&&(this.#M(),!this.#p&&"onscrollend"in window&&(this.#f=!0))}#M(){this.#c!==this.#g&&(this.#g=this.#c,this.dispatchEvent(new CustomEvent("carousel-wc:change",{detail:{index:this.#c,slide:this.#e[this.#c]},bubbles:!0})))}#R(){let t=this.hasAttribute("loop"),i=this.#c===0,s=this.#c===this.#e.length-1;if(this.#n&&(this.#n.disabled=!t&&i),this.#s&&(this.#s.disabled=!t&&s),this.#o){let n=this.#o.children;for(let r=0;r<n.length;r++)r===this.#c?(n[r].setAttribute("aria-current","true"),n[r].setAttribute("data-active","")):(n[r].removeAttribute("aria-current"),n[r].removeAttribute("data-active"))}}#B=t=>{for(let i of t)if(i.isIntersecting){let s=this.#e.indexOf(i.target);s!==-1&&s!==this.#c&&this.#D(s)}};#H=t=>{let i=(t.key==="ArrowLeft"||t.key==="ArrowRight")&&this.#x();switch(t.key){case"ArrowLeft":t.preventDefault(),i?this.next():this.prev();break;case"ArrowRight":t.preventDefault(),i?this.prev():this.next();break;case"Home":t.preventDefault(),this.goTo(0);break;case"End":t.preventDefault(),this.goTo(this.#e.length-1);break}};#I(){let t=this.getAttribute("persist");if(!t)return null;try{let i=localStorage.getItem(`carousel:${t}`);return i!==null?Number(i):null}catch{return null}}#G(){let t=this.getAttribute("persist");if(t)try{localStorage.setItem(`carousel:${t}`,String(this.#c))}catch{}}#N(){let t=this.getAttribute("persist");if(t)try{localStorage.removeItem(`carousel:${t}`)}catch{}}};E("carousel-wc",mr);var Nv=0,gr=class extends k{static formAssociated=!0;#t;#e;#i;#n;#s=[];#o=[];#r=-1;#a=!1;#l="";#c="";#g;#f=!1;#u;#p;#y=[];constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}get#d(){return this.hasAttribute("multiple")}setup(){let t=this.querySelector(":scope > input")||this.querySelector(":scope > .tags-input-area > input");if(!t)return!1;this.#e=t;let i=this.#e.getAttribute("name");i&&(this.hasAttribute("name")||this.setAttribute("name",i),this.#e.removeAttribute("name"));let s=this.querySelector("ul, ol");if(!s)return!1;if(this.#i=s,this.#d){let c=this.querySelector(":scope > .tags-input-area");if(!c){c=document.createElement("div"),c.className="tags-input-area";let u=this.querySelector(":scope > pop-over[data-combobox-host]")||this.#i;this.insertBefore(c,u)}this.#u=c,this.#e.parentNode!==this.#u&&this.#u.appendChild(this.#e);let l=this.querySelector(":scope > [data-combobox-live]");l||(l=document.createElement("div"),l.setAttribute("aria-live","polite"),l.setAttribute("aria-atomic","true"),l.setAttribute("data-combobox-live",""),l.className="visually-hidden",this.appendChild(l)),this.#p=l}let n=this.getAttribute("placeholder");n&&!this.#e.getAttribute("placeholder")&&this.#e.setAttribute("placeholder",n);let r=`cb${++Nv}`;this.#i.id||(this.#i.id=`combobox-listbox-${r}`),this.#e.setAttribute("role","combobox"),this.#e.setAttribute("aria-expanded","false"),this.#e.setAttribute("aria-autocomplete","list"),this.#e.setAttribute("aria-controls",this.#i.id),this.#e.setAttribute("autocomplete","off"),this.#i.setAttribute("role","listbox"),this.#d&&this.#i.setAttribute("aria-multiselectable","true");let a=this.#d?this.#u:this.#e;a.id||(a.id=`combobox-anchor-${r}`);let o=this.querySelector(":scope > pop-over[data-combobox-host]");if(o?this.#n=o:(this.#n=document.createElement("pop-over"),this.#n.setAttribute("data-combobox-host",""),this.#n.id=`combobox-pop-${r}`,this.#n.dataset.mode="manual",this.#n.dataset.position="bottom-start",this.#n.dataset.anchor=a.id,this.#n.appendChild(this.#i),this.appendChild(this.#n)),this.#n.dataset.anchor=a.id,this.#i.parentElement!==this.#n&&this.#n.appendChild(this.#i),this.#E(),!this.#d){let c=this.getAttribute("value");c&&this.#N(c,!1),this.#g===void 0&&(this.#g=this.#l)}return this.listen(this.#e,"input",this.#w),this.listen(this.#e,"keydown",this.#A),this.listen(this.#e,"focus",this.#L),this.listen(this.#e,"click",this.#x),this.listen(this.#i,"click",this.#D),this.listen(this.#i,"pointerdown",this.#M),this.listen(document,"click",this.#R),this.listen(this.#n,"pop-over:hide",this.#et),this.listen(this,"invalid",this.#m),this.#$(),this.#C(),this.#q(),this.#h(this.matches(":disabled")),!0}teardown(){}#m=()=>{this.#e.setAttribute("aria-invalid","true")};formDisabledCallback(t){this.#e&&this.#h(t)}#h(t){this.#f=t,t&&this.#q();let i=this.#b(),s=this.#d&&i>0&&this.#y.length>=i;if(this.#e.disabled=t||s,this.#u)for(let n of this.#u.querySelectorAll(".tag button"))n.disabled=t}#E(){this.#s=Array.from(this.#i.querySelectorAll(":scope > li[data-value]")),this.#s.forEach((t,i)=>{t.setAttribute("role","option"),t.setAttribute("aria-selected","false"),t.id||(t.id=`${this.#i.id}-option-${i}`)}),this.#o=[...this.#s]}#v(t,i){if(this.#y.some(o=>o.value===t))return;let s=this.#b();if(s&&this.#y.length>=s)return;this.#y.push({value:t,label:i});let n=document.createElement("span");n.className="tag",n.dataset.value=t,n.textContent=i+" ";let r=document.createElement("button");r.type="button",r.setAttribute("aria-label",`Remove ${i}`),r.innerHTML="&times;",r.disabled=this.#f,r.addEventListener("click",o=>{o.stopPropagation(),this.#S(t)}),n.appendChild(r),this.#u.insertBefore(n,this.#e);let a=this.#s.find(o=>o.getAttribute("data-value")===t);a&&a.setAttribute("aria-selected","true"),this.#k(`${i} added`),this.#e.value="",this.#B(""),this.#$(),this.#C(),this.#P(),s&&this.#y.length>=s&&(this.#e.disabled=!0,this.#q())}#S(t){let i=this.#y.findIndex(o=>o.value===t);if(i===-1)return;let s=this.#y.splice(i,1)[0],n=this.#u.querySelector(`.tag[data-value="${CSS.escape(t)}"]`);n&&n.remove();let r=this.#s.find(o=>o.getAttribute("data-value")===t);r&&r.setAttribute("aria-selected","false"),this.#k(`${s.label} removed`),this.#b()&&this.#e.disabled&&(this.#e.disabled=this.#f),this.#B(this.#e.value.trim()),this.#$(),this.#C(),this.#P(),this.#e.focus()}#b(){let t=this.getAttribute("max");return t?parseInt(t,10):0}#k(t){this.#p&&(this.#p.textContent="",requestAnimationFrame(()=>{this.#p.textContent=t}))}#w=()=>{let t=this.#e.value.trim();if(!this.#d&&this.#l){let i=this.#i.querySelector('[aria-selected="true"]');i&&i.setAttribute("aria-selected","false"),this.#l="",this.#c="",this.removeAttribute("value"),this.#$(),this.#C()}this.#B(t),this.#T()};#A=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.#a||this.#T(),this.#H(this.#r+1);break;case"ArrowUp":t.preventDefault(),this.#a||this.#T(),this.#H(this.#r-1);break;case"Home":this.#a&&(t.preventDefault(),this.#H(0));break;case"End":this.#a&&(t.preventDefault(),this.#H(this.#o.length-1));break;case"Enter":if(this.#a&&this.#r>=0&&this.#o[this.#r]){t.preventDefault();let i=this.#o[this.#r];this.#d?this.#v(i.getAttribute("data-value"),i.textContent.trim()):this.#G(i)}else if(this.#d&&this.hasAttribute("custom")&&this.#e.value.trim()){t.preventDefault();let i=this.#e.value.trim();this.#v(i,i)}break;case"Backspace":if(this.#d&&!this.#e.value&&this.#y.length>0){let i=this.#y[this.#y.length-1];this.#S(i.value)}break;case",":if(this.#d&&this.hasAttribute("custom")&&this.#e.value.trim()){t.preventDefault();let i=this.#e.value.trim();this.#v(i,i)}break;case"Escape":this.#a&&(t.preventDefault(),t.stopPropagation(),this.#q(),this.#e.focus());break;case"Tab":this.#a&&this.#q();break}};#L=()=>{this.#d?(this.#B(this.#e.value.trim()),this.#T()):(this.#e.value||!this.#l)&&(this.#B(this.#e.value.trim()),this.#T())};#x=()=>{this.#a||(this.#B(this.#e.value.trim()),this.#T())};#D=t=>{let i=t.target.closest("li[data-value]");i&&this.#o.includes(i)&&(this.#d?this.#v(i.getAttribute("data-value"),i.textContent.trim()):this.#G(i))};#M=t=>{t.preventDefault()};#R=t=>{this.#a&&!this.contains(t.target)&&this.#q()};#B(t){let i=this.getAttribute("filter")||"contains",s=t.toLowerCase(),n=this.#d?new Set(this.#y.map(r=>r.value)):null;this.#o=[],this.#s.forEach(r=>{let a=r.getAttribute("data-value"),o=r.textContent.trim().toLowerCase();if(n&&n.has(a)){r.hidden=!0;return}let c;t?i==="startsWith"?c=o.startsWith(s):c=o.includes(s):c=!0,r.hidden=!c,c&&this.#o.push(r)}),this.#r=-1,this.#I(),this.setState("no-matches",this.#o.length===0)}#H(t){if(this.#o.length===0)return;t<0&&(t=this.#o.length-1),t>=this.#o.length&&(t=0),this.#r>=0&&this.#o[this.#r]&&this.#o[this.#r].removeAttribute("data-active"),this.#r=t;let i=this.#o[t];i.setAttribute("data-active",""),i.scrollIntoView({block:"nearest"}),this.#e.setAttribute("aria-activedescendant",i.id)}#I(){this.#s.forEach(t=>t.removeAttribute("data-active")),this.#e.removeAttribute("aria-activedescendant")}#G(t,i="internal"){let s=t.getAttribute("data-value")||"",n=t.textContent.trim();if(this.#l===s){this.#e.value=n,this.#q(),this.#e.focus();return}this.#s.forEach(r=>r.setAttribute("aria-selected","false")),t.setAttribute("aria-selected","true"),this.#l=s,this.#c=n,this.#e.value=n,this.setAttribute("value",s),this.#$(),this.#C(),this.#q(),this.#e.focus(),this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{value:s,label:n,source:i}}))}#N(t,i=!0,s="api"){let n=this.#s.find(r=>r.getAttribute("data-value")===t);n&&(i?this.#G(n,s):(this.#s.forEach(r=>r.setAttribute("aria-selected","false")),n.setAttribute("aria-selected","true"),this.#l=t,this.#c=n.textContent.trim(),this.#e.value=this.#c,this.setAttribute("value",t)))}#T(){this.#a||this.#f||(this.#a=!0,this.setAttribute("open",""),this.#e.setAttribute("aria-expanded","true"),this.#n?.show(),this.dispatchEvent(new CustomEvent("combo-box:open",{bubbles:!0})))}#q(){this.#a&&(this.#a=!1,this.removeAttribute("open"),this.#e.setAttribute("aria-expanded","false"),this.#r=-1,this.#I(),this.#n?.hide(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))}#et=()=>{this.#a&&(this.#a=!1,this.removeAttribute("open"),this.#e.setAttribute("aria-expanded","false"),this.#r=-1,this.#I(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))};#$(){if(this.#d)if(this.#y.length>0){let t=new FormData,i=this.getAttribute("name")||"";for(let s of this.#y)t.append(i,s.value);this.#t.setFormValue(t)}else this.#t.setFormValue(null);else this.#l?this.#t.setFormValue(this.#l,this.#c):this.#t.setFormValue(null)}#C(){this.hasAttribute("required")?this.#d?this.#y.length===0?this.#t.setValidity({valueMissing:!0},"Please select at least one option",this.#e):this.#t.setValidity({}):this.#l?this.#t.setValidity({}):this.#t.setValidity({valueMissing:!0},"Please select an option",this.#e):this.#t.setValidity({}),this.#t.validity.valid&&this.#e.removeAttribute("aria-invalid")}#P(){this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{values:this.#y.map(t=>t.value),labels:this.#y.map(t=>t.label),source:"internal"}}))}formResetCallback(){this.#d?(this.#u.querySelectorAll(".tag").forEach(t=>t.remove()),this.#y=[],this.#e.value="",this.#e.disabled=this.#f):(this.#l="",this.#c="",this.#e.value="",this.removeAttribute("value")),this.#s.forEach(t=>{t.setAttribute("aria-selected","false"),t.hidden=!1}),this.#o=[...this.#s],this.#r=-1,this.#I(),this.#q(),this.#e.removeAttribute("aria-invalid"),!this.#d&&this.#g&&this.#N(this.#g,!1),this.#$(),this.#C()}formStateRestoreCallback(t){t&&(this.#d||(this.#N(t,!1),this.#$(),this.#C()))}get value(){return this.#l}set value(t){t?this.#N(t):this.#Y()}#Y(){this.#s.forEach(t=>t.setAttribute("aria-selected","false")),this.#l="",this.#c="",this.#e&&(this.#e.value=""),this.removeAttribute("value"),this.#$(),this.#C()}get label(){return this.#c}get values(){return this.#y.map(t=>t.value)}get labels(){return this.#y.map(t=>t.label)}static get observedAttributes(){return["value","disabled"]}attributeChangedCallback(t,i,s){if(!this.#e)return;if(t==="disabled"){this.#h(this.matches(":disabled"));return}let n=s??"";t==="value"&&n!==this.#l&&(n?(this.#N(n,!1),this.#$(),this.#C()):this.#Y())}};E("combo-box",gr);var Qi=86400,Mv=0;function ce(e){return String(e).padStart(2,"0")}function qt(e){if(!e)return null;let t=/^(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?$/.exec(String(e).trim());if(!t)return null;let i=Number(t[1]),s=Number(t[2]),n=Number(t[3]||0);return i>23||s>59||n>59?null:i*3600+s*60+n}function gu(e,t){let i=Math.floor(e/3600),s=Math.floor(e%3600/60),n=e%60;return t?`${ce(i)}:${ce(s)}:${ce(n)}`:`${ce(i)}:${ce(s)}`}function yt(e,t){return(e%t+t)%t}function _v(e){try{let{hourCycle:t}=new Intl.DateTimeFormat(e||void 0,{hour:"numeric"}).resolvedOptions();return t==="h12"||t==="h11"?"12h":"24h"}catch{return"24h"}}function $v(e){let t={am:"AM",pm:"PM",periodFirst:!1};try{let i=new Intl.DateTimeFormat(e||void 0,{hour:"numeric",minute:"2-digit",hourCycle:"h12"}),s=i.formatToParts(new Date(2e3,0,1,9,0)),n=i.formatToParts(new Date(2e3,0,1,21,0)),r=s.find(o=>o.type==="dayPeriod")?.value,a=n.find(o=>o.type==="dayPeriod")?.value;if(r&&a){t.am=r,t.pm=a;let o=s.map(c=>c.type);t.periodFirst=o.indexOf("dayPeriod")<o.indexOf("hour")}}catch{}return t}function Iv(e,t){let i=e.trim().toLowerCase();if(!i)return null;let s=null,n=[[t.am.toLowerCase(),"AM"],[t.pm.toLowerCase(),"PM"],["a.m.","AM"],["p.m.","PM"],["am","AM"],["pm","PM"],["a","AM"],["p","PM"]].sort((l,u)=>u[0].length-l[0].length);for(let[l,u]of n)if(l){if(i.endsWith(l)){s=u,i=i.slice(0,-l.length).trim();break}if(i.startsWith(l)){s=u,i=i.slice(l.length).trim();break}}if(!/^\d{1,2}(?:[:.]\d{1,2}){0,2}$/.test(i))return null;let r=i.split(/[:.]/).map(Number),a=r[0],o=r[1]??0,c=r[2]??0;if(o>59||c>59)return null;if(s){if(a<1||a>12)return null;s==="AM"?a=a===12?0:a:a=a===12?12:a+12}else if(a>23)return null;return a*3600+o*60+c}var br=class extends k{static formAssociated=!0;static get observedAttributes(){return["disabled","required"]}#t;#e=`tp${++Mv}`;#i=!1;#n;#s;#o;#r;#a;#l=[];#c=null;#g=[];#f="24h";#u="";#p={am:"AM",pm:"PM",periodFirst:!1};#y=!1;#d=null;#m=null;#h=null;#E=60;#v;#S;#b=!1;#k="";#w=!1;constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}setup(){let t=this.querySelector(':scope > input[type="time"]');if(!t)return!1;this.#n=t,this.#u=this.closest("[lang]")?.lang||navigator.language||"en-US",this.#p=$v(this.#u);let i=this.getAttribute("data-format");this.#f=i==="12h"||i==="24h"?i:_v(this.#u),this.#L();let s=t.getAttribute("name");s&&(this.hasAttribute("name")||this.setAttribute("name",s),t.removeAttribute("name")),t.hasAttribute("disabled")&&(t.removeAttribute("disabled"),this.hasAttribute("disabled")||this.setAttribute("disabled",""));let n=`${this.#e}-no-form`,r=t.getAttribute("form");return r&&r!==n&&!this.hasAttribute("form")&&this.setAttribute("form",r),t.setAttribute("form",n),this.#v===void 0&&(this.#v=t.defaultValue),this.#S!==void 0&&(t.value=this.#S,this.#S=void 0),this.#d=qt(t.value),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"),t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.listen(t,"click",this.#M),this.listen(t,"focus",this.#D),this.#B(),this.#H(),this.#i=!0,this.#R(),this.#st(),this.#F(!1),this.#nt(),this.listen(document,"click",this.#q),this.listen(this,"focusout",this.#et),this.listen(this,"invalid",this.#J),this.#A(this.matches(":disabled")),!0}teardown(){this.#b=!1,this.#o?.remove(),this.#a?.remove(),this.#l=[],this.#g=[],this.#c=null,this.#i=!1,clearTimeout(this.#Q),this.#j=""}attributeChangedCallback(t){this.#i&&(t==="disabled"&&this.#A(this.matches(":disabled")),t==="required"&&this.#nt())}formDisabledCallback(t){this.#i&&this.#A(t)}#A(t){this.#s.disabled=t,this.#r.disabled=t,t&&this.#T()}#L(){let t=this.#n.getAttribute("step");if(t&&t.trim().toLowerCase()==="any")this.#E=null;else{let s=Number(t);this.#E=Number.isFinite(s)&&s>0?Math.max(1,Math.round(s)):60}this.#m=qt(this.#n.getAttribute("min")),this.#h=qt(this.#n.getAttribute("max"));let i=qt(this.#n.value);this.#y=this.#E!==null&&this.#E%60!==0||i!==null&&i%60!==0}#x(t,i){return this.dataset[`label${t}`]||i}#D=()=>{this.#i&&!this.#s.disabled&&this.#s.focus()};#M=t=>{t.preventDefault(),this.#D()};#R(){let t=new Set([...Array.from(this.#n.labels||[]),...Array.from(this.#t.labels||[])]),i=[];for(let a of t)a.id||(a.id=`${this.#e}-label-${i.length}`),i.push(a.id),this.listen(a,"click",this.#D);let s=this.#s,n=i.join(" ")||this.#n.getAttribute("aria-labelledby")||this.getAttribute("aria-labelledby");n?s.setAttribute("aria-labelledby",n):s.setAttribute("aria-label",this.#n.getAttribute("aria-label")||this.getAttribute("aria-label")||this.#x("Input","Time"));let r=this.#n.getAttribute("aria-describedby");r&&s.setAttribute("aria-describedby",r)}#B(){this.#o=document.createElement("div"),this.#o.className="time-trigger";let t=document.createElement("input");t.type="text",t.className="time-input",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded","false"),t.setAttribute("autocomplete","off"),t.setAttribute("placeholder",this.#x("Placeholder","Type a time\u2026")),this.#s=t,this.#o.appendChild(t),this.#r=document.createElement("button"),this.#r.type="button",this.#r.className="time-trigger-icon",this.#r.setAttribute("aria-label",this.#x("Toggle","Toggle time spinners")),this.#r.setAttribute("tabindex","-1");let i=document.createElement("icon-wc");i.setAttribute("name","clock"),i.setAttribute("size","sm"),i.setAttribute("aria-hidden","true"),this.#r.appendChild(i),this.#o.appendChild(this.#r),this.appendChild(this.#o),this.listen(this.#r,"click",s=>{s.stopPropagation(),this.#b?this.#T():this.#N(),this.#s.focus()}),this.listen(t,"focus",()=>t.select()),this.listen(t,"keydown",this.#C),this.listen(t,"blur",this.#Y)}#H(){let t=`${this.#e}-panel`;this.#a=document.createElement("div"),this.#a.className="time-panel",this.#a.id=t,this.#a.setAttribute("role","dialog"),this.#a.setAttribute("aria-modal","false"),this.#a.setAttribute("aria-label",this.#x("Dialog","Choose time")),this.#s.setAttribute("aria-controls",t);let i=this.#E??60,s=i>=3600&&i%3600===0?i/3600:1,n=i>=60&&i<3600&&i%60===0?i/60:1,r=i<60?i:1,a=i>=3600&&i%3600===0,o=this.#f==="12h",c=null;o&&(c=document.createElement("button"),c.type="button",c.className="period-toggle"),this.#c=c,c&&this.#p.periodFirst&&this.#a.appendChild(c);let l=!o&&this.#m!==null&&this.#h!==null&&this.#m<=this.#h;this.#l=[],this.#l.push(this.#I("hour",this.#x("Hours","Hours"),o?1:l?Math.floor(this.#m/3600):0,o?12:l?Math.floor(this.#h/3600):23,s,!1)),this.#a.appendChild(this.#G()),this.#l.push(this.#I("minute",this.#x("Minutes","Minutes"),0,59,n,a)),this.#y&&(this.#a.appendChild(this.#G()),this.#l.push(this.#I("second",this.#x("Seconds","Seconds"),0,59,r,!1))),c&&!this.#p.periodFirst&&this.#a.appendChild(c),this.#g=[...this.#a.querySelectorAll(".time-spinner, .period-toggle")],this.appendChild(this.#a);for(let u of this.#l)this.listen(u.incBtn,"click",()=>this.#z(u,u.delta,"pointer")),this.listen(u.decBtn,"click",()=>this.#z(u,-u.delta,"pointer")),this.listen(u.el,"keydown",d=>this.#V(d,u));if(this.#c){let u=this.#c;this.listen(u,"click",d=>{this.#X(d.detail===0?"keyboard":"pointer")}),this.listen(u,"keydown",d=>this.#_(d,u))}}#I(t,i,s,n,r,a){let o=document.createElement("div");o.className="time-spinner",o.dataset.unit=t,o.setAttribute("role","spinbutton"),o.setAttribute("aria-label",i),o.setAttribute("aria-valuemin",String(s)),o.setAttribute("aria-valuemax",String(n)),a&&o.setAttribute("aria-readonly","true"),o.setAttribute("tabindex","0");let c=document.createElement("button");c.type="button",c.className="time-inc",c.setAttribute("aria-hidden","true"),c.setAttribute("tabindex","-1"),c.textContent="\u25B2",a&&(c.disabled=!0);let l=document.createElement("span");l.className="time-value";let u=document.createElement("button");return u.type="button",u.className="time-dec",u.setAttribute("aria-hidden","true"),u.setAttribute("tabindex","-1"),u.textContent="\u25BC",a&&(u.disabled=!0),o.append(c,l,u),this.#a.appendChild(o),{unit:t,el:o,valueEl:l,incBtn:c,decBtn:u,min:s,max:n,delta:r,readOnly:a}}#G(){let t=document.createElement("span");return t.className="time-sep",t.setAttribute("aria-hidden","true"),t.textContent=":",t}#N(){this.#b||this.#s.disabled||(this.#b=!0,this.#a.setAttribute("data-open",""),this.#s.setAttribute("aria-expanded","true"))}#T(){this.#b&&(this.#b=!1,this.#a.removeAttribute("data-open"),this.#s.setAttribute("aria-expanded","false"))}#q=t=>{this.#b&&!this.contains(t.target)&&this.#T()};#et=t=>{let i=t.relatedTarget;i instanceof Node&&this.contains(i)||this.#T()};#$(t){try{let i=new Date(2e3,0,1,Math.floor(t/3600),Math.floor(t%3600/60),t%60),s={hour:this.#f==="12h"?"numeric":"2-digit",minute:"2-digit",hourCycle:this.#f==="12h"?"h12":"h23"};return this.#y&&(s.second="2-digit"),new Intl.DateTimeFormat(this.#u,s).format(i)}catch{return gu(t,this.#y)}}#C=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation(),this.#P(),this.#b&&this.#T();return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#b||this.#N(),this.#g[0]?.focus();return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#b&&this.#T(),this.#st();return}};#P(){let t=this.#s.value.trim();if(!t)this.#W(null,"keyboard");else{let i=Iv(t,this.#p);i!==null&&this.#W(i,"keyboard")}this.#st()}#Y=t=>{t.relatedTarget instanceof Node&&this.contains(t.relatedTarget)||(this.#P(),this.#J())};#J=()=>{this.#i&&(this.#w||(this.#w=!0,this.#nt()),this.#n.dispatchEvent(new Event("blur",{bubbles:!0})))};#_(t,i){let s=this.#g.indexOf(i),n=getComputedStyle(this).direction==="rtl",r=n?"ArrowLeft":"ArrowRight",a=n?"ArrowRight":"ArrowLeft";return t.key===r||t.key===a?(t.preventDefault(),this.#g[s+(t.key===r?1:-1)]?.focus(),!0):t.key==="Escape"?(t.preventDefault(),t.stopPropagation(),this.#T(),this.#s.focus(),!0):!1}#V(t,i){if(this.#_(t,i.el))return;let s=i.unit==="hour"?i.delta:Math.ceil(10/i.delta)*i.delta;switch(t.key){case"ArrowUp":t.preventDefault(),this.#z(i,i.delta,"keyboard");break;case"ArrowDown":t.preventDefault(),this.#z(i,-i.delta,"keyboard");break;case"PageUp":t.preventDefault(),this.#z(i,s,"keyboard");break;case"PageDown":t.preventDefault(),this.#z(i,-s,"keyboard");break;case"Home":t.preventDefault(),this.#U(i,i.min,1,"keyboard");break;case"End":t.preventDefault(),this.#U(i,i.max,-1,"keyboard");break;default:/^\d$/.test(t.key)&&(t.preventDefault(),this.#K(t.key,i))}}#j="";#Q;#K(t,i){clearTimeout(this.#Q),this.#j+=t;let s=()=>{let n=Math.min(Math.max(Number(this.#j),i.min),i.max);this.#j="",this.#U(i,n,0,"keyboard")};this.#j.length>=2||Number(this.#j)*10>i.max?s():this.#Q=setTimeout(s,800)}#O(){return this.#it(this.#m??0,1)}#it(t,i){let s=yt(t,Qi),n=this.#E;if(n){let o=this.#m??0,c=(s-o)/n,l=i>0?Math.floor(c):i<0?Math.ceil(c):Math.round(c);s=yt(o+l*n,Qi)}let r=this.#m,a=this.#h;return r!==null&&a!==null&&r<=a?(s<r&&(s=r),s>a&&(s=n?r+Math.floor((a-r)/n)*n:a)):r!==null&&a===null&&s<r?s=r:a!==null&&r===null&&s>a&&(s=n?Math.floor(a/n)*n:a),s}#z(t,i,s){if(t.readOnly)return;if(this.#d===null){this.#W(this.#O(),s);return}let n=this.#d,r=Math.floor(n/3600),a=Math.floor(n%3600/60),o=n%60,c;t.unit==="hour"?c=(this.#f==="12h"?yt(r%12+i,12)+(r>=12?12:0):yt(r+i,24))*3600+a*60+o:t.unit==="minute"?c=r*3600+yt(a+i,60)*60+o:c=r*3600+a*60+yt(o+i,60),this.#W(this.#it(c,i),s)}#U(t,i,s,n){if(t.readOnly)return;let r=this.#d??this.#O(),a=Math.floor(r/3600),o=Math.floor(r%3600/60),c=r%60,l;t.unit==="hour"?l=(this.#f==="12h"?i%12+(a>=12?12:0):i)*3600+o*60+c:t.unit==="minute"?l=a*3600+i*60+c:l=a*3600+o*60+i,this.#W(this.#it(l,s),n)}#X(t){let i=this.#d??this.#O();this.#W(this.#it(yt(i+12*3600,Qi),0),t)}#W(t,i){let s=this.value;return this.#d=t,t!==null&&t%60!==0&&!this.#y&&(this.#y=!0),this.#st(),this.value===s?!1:(this.#F(),this.#nt(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{...this.#Z(),source:i}})),!0)}#Z(){let t=this.#d;return t===null?{value:"",hours:null,minutes:null,seconds:null}:{value:this.value,hours:Math.floor(t/3600),minutes:Math.floor(t%3600/60),seconds:t%60}}#st(){if(!this.#i)return;let t=this.#d;this.#s.value=t===null?"":this.#$(t);let i=this.#x("Empty","Not set"),s=t===null?null:Math.floor(t/3600),n={hour:s===null?null:this.#f==="12h"?s%12||12:s,minute:t===null?null:Math.floor(t%3600/60),second:t===null?null:t%60},r=s===null?"":s>=12?this.#p.pm:this.#p.am;for(let a of this.#l){let o=n[a.unit];if(a.valueEl.textContent=o===null?"--":ce(o),o===null){a.el.removeAttribute("aria-valuenow"),a.el.setAttribute("aria-valuetext",i);continue}a.el.setAttribute("aria-valuenow",String(o));let c;try{c=a.unit==="hour"&&this.#f==="12h"?new Intl.DateTimeFormat(this.#u,{hour:"numeric",hourCycle:"h12"}).format(new Date(2e3,0,1,s)):new Intl.NumberFormat(this.#u,{style:"unit",unit:a.unit,unitDisplay:"long"}).format(o)}catch{c=a.unit==="hour"&&r?`${o} ${r}`:String(o)}a.el.setAttribute("aria-valuetext",c)}this.#c&&(this.#c.textContent=r||"--",this.#c.setAttribute("aria-label",`${this.#x("Period","AM/PM")}: ${r||i}`))}#F(t=!0){let i=this.value;this.#t.setFormValue(i||null),this.#n.value=i,t&&this.#n.dispatchEvent(new Event("input",{bubbles:!0}))}#tt(t,i,s,n={}){let r=this.#n.getAttribute(`data-message-${t.toLowerCase()}`)??this.#x(i,s);for(let[a,o]of Object.entries(n))r=r.replaceAll(`{${a}}`,o);return r}#nt(){if(!this.#i)return!1;let t=this.hasAttribute("required")||this.#n.hasAttribute("required");t?this.#s.setAttribute("aria-required","true"):this.#s.removeAttribute("aria-required");let i=this.#d,s=this.#m,n=this.#h,r={},a="";if(i===null)t&&(r={valueMissing:!0},a=this.#tt("valueMissing","Required","Please select a time"));else{let l=s!==null&&n!==null&&s>n,u=s!==null&&i<s,d=n!==null&&i>n;if(l?u&&d:u)r=l?{rangeUnderflow:!0,rangeOverflow:!0}:{rangeUnderflow:!0},a=this.#tt("rangeUnderflow","RangeUnderflow","Choose a time at or after {time}",{time:this.#$(s)});else if(!l&&d)r={rangeOverflow:!0},a=this.#tt("rangeOverflow","RangeOverflow","Choose a time at or before {time}",{time:this.#$(n)});else if(this.#E&&yt(i-(s??0),this.#E)!==0){let h=this.#it(i,1),f=yt(h+this.#E,Qi);r={stepMismatch:!0},a=this.#tt("stepMismatch","StepMismatch","Choose a valid time. The nearest are {lower} and {upper}",{lower:this.#$(h),upper:this.#$(f)})}}let o=this.#t.validationMessage;return a?this.#t.setValidity(r,a,this.#s):this.#t.setValidity({}),a&&(i!==null||this.#w)?this.#s.setAttribute("aria-invalid","true"):this.#s.removeAttribute("aria-invalid"),(this.#n.validationMessage===this.#k||!this.#n.validity.customError)&&(this.#n.setCustomValidity(a),this.#k=a),o!==a}#rt(t){this.#d=t,this.#st(),this.#F(),this.#nt()}formResetCallback(){this.#i&&(this.#w=!1,this.#rt(qt(this.#v)))}formStateRestoreCallback(t){!this.#i||typeof t!="string"||this.#rt(qt(t))}get form(){return this.#t.form}get validity(){return this.#t.validity}get validationMessage(){return this.#t.validationMessage}get willValidate(){return this.#t.willValidate}checkValidity(){return this.#t.checkValidity()}reportValidity(){return this.#t.reportValidity()}get value(){return this.#i?this.#d===null?"":gu(this.#d,this.#y):this.#S??""}set value(t){let i=t==null?"":String(t).trim(),s=i?qt(i):null;if(!(i&&s===null)){if(!this.#i){this.#S=i;return}this.#W(s,"api")}}};E("time-picker",br);var ts="popover"in HTMLElement.prototype;var le=[{ja:"\u4EE4\u548C",latin:"R",start:[2019,5,1]},{ja:"\u5E73\u6210",latin:"H",start:[1989,1,8]},{ja:"\u662D\u548C",latin:"S",start:[1926,12,25]},{ja:"\u5927\u6B63",latin:"T",start:[1912,7,30]},{ja:"\u660E\u6CBB",latin:"M",start:[1868,10,23]}],Bv=new RegExp(`^(?:(${le.map(e=>e.ja).join("|")})|(${le.map(e=>e.latin).join("|")}))`+String.raw`\s*(元|\d{1,2})年?[/.\-]?\s*(\d{1,2})月?[/.\-]?\s*(\d{1,2})日?$`,"i"),Rv=/^(\d{4})年(\d{1,2})月(\d{1,2})日?$/;function bu(e){return e.trim().replace(/[0-9]/g,t=>String(t.charCodeAt(0)-65296)).replace(/\s+/g,"")}function yu(e,t,i){let s=new Date(2e3,t-1,i);return s.setFullYear(e),s.getMonth()===t-1&&s.getDate()===i?s:null}function vu(e){let t=bu(e).match(Bv);if(!t)return null;let i=t[1]?le.find(a=>a.ja===t[1]):le.find(a=>a.latin.toUpperCase()===t[2].toUpperCase());if(!i)return null;let s=t[3]==="\u5143"?1:Number(t[3]);if(s<1)return null;let n=yu(i.start[0]+s-1,Number(t[4]),Number(t[5]));if(!n||n<new Date(i.start[0],i.start[1]-1,i.start[2]))return null;let r=le.indexOf(i);if(r>0){let a=le[r-1].start;if(n>=new Date(a[0],a[1]-1,a[2]))return null}return n}function wu(e){let t=bu(e).match(Rv);return t?yu(Number(t[1]),Number(t[2]),Number(t[3])):null}et();var Sr=["january","february","march","april","may","june","july","august","september","october","november","december"],Ov=0;function it(e){let t=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${s}`}function xr(e,t,i){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(i))return null;let s=new Date(e,t,i);return s.getFullYear()!==e||s.getMonth()!==t||s.getDate()!==i?null:s}function ht(e){if(!e)return null;let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(String(e).trim());return t?xr(Number(t[1]),Number(t[2])-1,Number(t[3])):null}function Ke(e,t){return new Date(e,t+1,0).getDate()}function vr(e,t){let i=new Date(e.getFullYear(),e.getMonth()+t,1),s=i.getFullYear(),n=i.getMonth();return new Date(s,n,Math.min(e.getDate(),Ke(s,n)))}function qv(e){try{let t=new Intl.Locale(e),i=t.getWeekInfo?.()??t.weekInfo;if(i)return i.firstDay%7}catch{}return 0}var wr=new Map;function Au(e,t){let i=`${e}:${t}`;if(wr.has(i))return wr.get(i);let s;try{let n=new Intl.DateTimeFormat(e,{weekday:t});s=Array.from({length:7},(r,a)=>n.format(new Date(2026,0,4+a)))}catch{s=t==="long"?["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}return wr.set(i,s),s}function Eu(e,t){try{return new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"numeric"}).format(e)}catch{return it(e)}}function Ar(e,t){return!!(e&&t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate())}var Er=new Map;function jv(e){if(Er.has(e))return Er.get(e);let t=new Map;Sr.forEach((i,s)=>{t.set(i,s),t.set(i.slice(0,3),s)});try{let i=new Intl.DateTimeFormat(e,{month:"long"}),s=new Intl.DateTimeFormat(e,{month:"short"});for(let n=0;n<12;n++){let r=new Date(2e3,n,1);t.set(i.format(r).toLowerCase(),n),t.set(s.format(r).toLowerCase().replace(".",""),n)}}catch{}return Er.set(e,t),t}function kr(e,t){let i=e.trim(),s={date:null,partial:null};if(!i)return s;if(/^\d{4}[-/]\d{2}[-/]\d{2}$/.test(i)){let o=ht(i.replace(/\//g,"-"));return o?{date:o,partial:null}:s}if(es(t)==="ja"){let o=vu(i);if(o)return{date:o,partial:null}}let n=wu(i);if(n)return{date:n,partial:null};let r=jv(t),a=i.match(/^([a-zÀ-ɏ]+)\.?\s+(\d{1,2}),?\s+(\d{4})$/i);if(a){let o=r.get(a[1].toLowerCase());if(o===void 0)return s;let c=xr(Number(a[3]),o,Number(a[2]));return c?{date:c,partial:null}:s}if(a=i.match(/^(\d{1,2})\.?\s+([a-zÀ-ɏ]+)\.?\s+(\d{4})$/i),a){let o=r.get(a[2].toLowerCase());if(o===void 0)return s;let c=xr(Number(a[3]),o,Number(a[1]));return c?{date:c,partial:null}:s}if(a=i.match(/^([a-zÀ-ɏ]+)\.?\s+(\d{4})$/i),a){let o=r.get(a[1].toLowerCase());if(o!==void 0)return{date:null,partial:{year:Number(a[2]),month:o}}}return s}function ku(e){let t=new Map;if(!e)return t;for(let i of e.split(",")){let[s,n]=i.trim().split(":");s&&t.set(s,n||"")}return t}var Cr=class extends k{static formAssociated=!0;static get observedAttributes(){return["disabled","required"]}#t;#e=`dp${++Ov}`;#i=!1;#n;#s;#o;#r;#a;#l;#c;#g;#f=!1;#u=!1;#p="en-US";#y=null;#d=null;#m=new Date().getFullYear();#h=new Date().getMonth();#E=null;#v=null;#S=new Map;#b=new Map;#k;#w;#A=0;#L="";#x=!1;constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}setup(){let t=this.querySelector(':scope > input[type="date"]');if(!t)return!1;this.#n=t,this.#p=Et(this.closest("[lang]")?.lang||navigator.language),this.#A=qv(this.#p),this.#E=ht(t.getAttribute("min")),this.#v=ht(t.getAttribute("max")),this.#S=ku(this.getAttribute("data-disabled-dates")),this.#b=ku(this.getAttribute("data-highlight-dates"));let i=t.getAttribute("name");i&&(this.hasAttribute("name")||this.setAttribute("name",i),t.removeAttribute("name")),t.hasAttribute("disabled")&&(t.removeAttribute("disabled"),this.hasAttribute("disabled")||this.setAttribute("disabled",""));let s=`${this.#e}-no-form`,n=t.getAttribute("form");n&&n!==s&&!this.hasAttribute("form")&&this.setAttribute("form",n),t.setAttribute("form",s),this.#k===void 0&&(this.#k=t.defaultValue),this.#w!==void 0&&(t.value=this.#w,this.#w=void 0),this.#y=ht(t.value);let r=new Date;return this.#v&&r>this.#v&&(r=this.#v),this.#E&&r<this.#E&&(r=this.#E),this.#d=this.#y||r,this.#m=this.#d.getFullYear(),this.#h=this.#d.getMonth(),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"),t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.listen(t,"click",this.#B),this.listen(t,"focus",this.#R),this.#I(),this.#G(),this.#i=!0,this.#H(),this.#J(),this.#Z(!1),this.#F(),this.#u=ts,this.#u&&this.#a.setAttribute("popover","manual"),this.listen(document,"click",this.#U),this.listen(this,"invalid",this.#z),this.#D(this.matches(":disabled")),!0}teardown(){this.#f=!1,this.removeAttribute("open"),window.removeEventListener("scroll",this.#Q,{capture:!0}),window.removeEventListener("resize",this.#Q),this.#r?.remove(),this.#a?.remove(),this.#S=new Map,this.#b=new Map,this.#i=!1}attributeChangedCallback(t){this.#i&&(t==="disabled"&&this.#D(this.matches(":disabled")),t==="required"&&this.#F())}formDisabledCallback(t){this.#i&&this.#D(t)}#D(t){this.#s.disabled=t,this.#o.disabled=t,t&&this.#V()}#M(t,i){return this.dataset[`label${t}`]||i}#R=()=>{this.#i&&!this.#s.disabled&&this.#s.focus()};#B=t=>{t.preventDefault(),this.#R()};#H(){let t=new Set([...Array.from(this.#n.labels||[]),...Array.from(this.#t.labels||[])]),i=[];for(let a of t)a.id||(a.id=`${this.#e}-label-${i.length}`),i.push(a.id),this.listen(a,"click",this.#R);let s=this.#s,n=i.join(" ")||this.#n.getAttribute("aria-labelledby")||this.getAttribute("aria-labelledby");n?s.setAttribute("aria-labelledby",n):s.setAttribute("aria-label",this.#n.getAttribute("aria-label")||this.getAttribute("aria-label")||this.#M("Input","Date"));let r=this.#n.getAttribute("aria-describedby");r&&s.setAttribute("aria-describedby",r)}#I(){this.#r=document.createElement("div"),this.#r.className="date-trigger",this.#s=document.createElement("input"),this.#s.type="text",this.#s.className="date-input",this.#s.setAttribute("role","combobox"),this.#s.setAttribute("aria-haspopup","dialog"),this.#s.setAttribute("aria-expanded","false"),this.#s.setAttribute("autocomplete","off"),this.#s.setAttribute("placeholder",this.#M("Placeholder","Type a date\u2026")),this.#r.appendChild(this.#s),this.#o=document.createElement("button"),this.#o.type="button",this.#o.className="date-trigger-icon",this.#o.setAttribute("aria-label",this.#M("Toggle","Toggle calendar")),this.#o.setAttribute("tabindex","-1");let t=document.createElement("icon-wc");t.setAttribute("name","calendar"),t.setAttribute("size","sm"),t.setAttribute("aria-hidden","true"),this.#o.appendChild(t),this.#r.appendChild(this.#o),this.appendChild(this.#r),this.listen(this.#o,"click",i=>{i.stopPropagation(),this.#f?this.#V():this.#_(),this.#s.focus()}),this.listen(this.#s,"focus",()=>this.#s.select()),this.listen(this.#s,"input",this.#K),this.listen(this.#s,"keydown",this.#O),this.listen(this.#s,"blur",this.#it)}#G(){let t=`${this.#e}-calendar`;this.#a=document.createElement("div"),this.#a.className="calendar",this.#a.id=t,this.#a.setAttribute("role","dialog"),this.#a.setAttribute("aria-modal","false"),this.#a.setAttribute("aria-label",this.#M("Dialog","Choose date")),this.#a.hidden=!0,this.#s.setAttribute("aria-controls",t);let i=document.createElement("div");i.className="calendar-header";let s=document.createElement("button");s.type="button",s.className="calendar-nav",s.setAttribute("aria-label",this.#M("Prev","Previous month"));let n=document.createElement("icon-wc");n.setAttribute("name","chevron-left"),n.setAttribute("size","sm"),n.setAttribute("aria-hidden","true"),s.appendChild(n);let r=document.createElement("span");r.className="calendar-title",this.#c=document.createElement("span"),this.#c.className="calendar-month",this.#c.id=`${t}-title`,this.#c.setAttribute("aria-live","polite"),this.#c.setAttribute("aria-atomic","true"),this.#g=document.createElement("select"),this.#g.className="calendar-year",this.#g.setAttribute("aria-label",this.#M("Year","Year")),this.#et(),r.appendChild(this.#c),r.appendChild(this.#g);let a=document.createElement("button");a.type="button",a.className="calendar-nav",a.setAttribute("aria-label",this.#M("Next","Next month"));let o=document.createElement("icon-wc");o.setAttribute("name","chevron-right"),o.setAttribute("size","sm"),o.setAttribute("aria-hidden","true"),a.appendChild(o),i.appendChild(s),i.appendChild(r),i.appendChild(a),this.#a.appendChild(i);let c=document.createElement("table");c.setAttribute("role","grid"),c.setAttribute("aria-labelledby",`${t}-title`);let l=Au(this.#p,"short"),u=Au(this.#p,"long"),d=document.createElement("thead"),h=document.createElement("tr");for(let f=0;f<7;f++){let p=(this.#A+f)%7,m=document.createElement("th");m.setAttribute("abbr",u[p]),m.setAttribute("scope","col"),m.textContent=l[p],h.appendChild(m)}d.appendChild(h),c.appendChild(d),this.#l=document.createElement("tbody"),c.appendChild(this.#l),this.#a.appendChild(c),this.appendChild(this.#a),this.#N(),this.listen(s,"click",()=>this.#$(-1)),this.listen(a,"click",()=>this.#$(1)),this.listen(this.#g,"change",()=>{this.#m=Number(this.#g.value);let f=Ke(this.#m,this.#h),p=Math.min(this.#d?.getDate()??1,f);this.#d=new Date(this.#m,this.#h,p),this.#N()}),this.listen(this.#l,"click",this.#X),this.listen(this.#a,"keydown",this.#W)}#N(){let t;try{t=new Intl.DateTimeFormat(this.#p,{month:"long"}).format(new Date(this.#m,this.#h,1))}catch{t=Sr[this.#h].charAt(0).toUpperCase()+Sr[this.#h].slice(1)}let i;try{i=new Intl.DateTimeFormat(this.#p,{month:"long",year:"numeric"}).format(new Date(this.#m,this.#h,1))}catch{i=`${t} ${this.#m}`}if(this.#c.lastElementChild?.textContent!==i){let l=document.createElement("span");l.setAttribute("aria-hidden","true"),l.textContent=t;let u=document.createElement("span");u.className="visually-hidden",u.textContent=i,this.#c.replaceChildren(l,u)}this.#g.querySelector(`option[value="${this.#m}"]`)||this.#et(),this.#g.value=String(this.#m),this.#l.replaceChildren();let s=Ke(this.#m,this.#h),r=(new Date(this.#m,this.#h,1).getDay()-this.#A+7)%7,a=new Date,o=document.createElement("tr");for(let l=0;l<r;l++)o.appendChild(document.createElement("td"));for(let l=1;l<=s;l++){let u=new Date(this.#m,this.#h,l),d=it(u),h=document.createElement("td"),f=document.createElement("button");f.type="button",f.setAttribute("data-date",d),f.textContent=String(l),Ar(u,a)&&f.setAttribute("aria-current","date");let p=Ar(u,this.#y);h.setAttribute("aria-selected",String(p));let m=this.#q(u,d);m.disabled&&(f.setAttribute("aria-disabled","true"),m.reason&&f.setAttribute("data-disabled-reason",m.reason)),this.#b.has(d)&&f.setAttribute("data-highlight",this.#b.get(d)||""),Ar(u,this.#d)?(f.setAttribute("tabindex","0"),p||f.setAttribute("data-focused","")):f.setAttribute("tabindex","-1"),h.appendChild(f),o.appendChild(h),(r+l)%7===0&&(this.#l.appendChild(o),o=document.createElement("tr"))}let c=(r+s)%7;if(c>0){for(let l=c;l<7;l++)o.appendChild(document.createElement("td"));this.#l.appendChild(o)}}#T(t){return this.#q(t,it(t)).disabled}#q(t,i){return this.#S.has(i)?{disabled:!0,reason:this.#S.get(i)}:this.#E&&t<this.#E?{disabled:!0,reason:null}:this.#v&&t>this.#v?{disabled:!0,reason:null}:{disabled:!1,reason:null}}#et(){this.#g.replaceChildren();let t=new Date().getFullYear(),i=this.#E?this.#E.getFullYear():t-100,s=this.#v?this.#v.getFullYear():t+10;i=Math.min(i,this.#m),s=Math.max(s,this.#m);for(let n=i;n<=s;n++){let r=document.createElement("option");r.value=String(n),r.textContent=String(n),this.#g.appendChild(r)}}#$(t){let i=this.#d??new Date(this.#m,this.#h,1),s=new Date(this.#m,this.#h,Math.min(i.getDate(),Ke(this.#m,this.#h)));this.#d=vr(s,t),this.#m=this.#d.getFullYear(),this.#h=this.#d.getMonth(),this.#N();let n=document.activeElement;n?.matches(".calendar-nav:focus-visible")&&this.#a.contains(n)||this.#Y(this.#d)}#C(t,i){if(t&&this.#T(t))return!1;let s=this.value,n=t?it(t):"";return this.#y=t,t&&(this.#d=t),this.#J(),n===s?!1:(this.#Z(),this.#F(),t&&i==="api"&&(this.#m=t.getFullYear(),this.#h=t.getMonth()),(this.#f||i==="api")&&this.#N(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:n,date:t?new Date(t):null,source:i}})),!0)}#P(t,i){this.#T(t)||(this.#C(t,i),this.#V(),this.#s.focus())}#Y(t){let i=this.#l.querySelector(`[data-date="${it(t)}"]`);if(i){for(let s of this.#l.querySelectorAll("button[data-date]"))s.setAttribute("tabindex",s===i?"0":"-1"),s!==i&&s.removeAttribute("data-focused");i.closest("td")?.getAttribute("aria-selected")!=="true"&&i.setAttribute("data-focused",""),i.focus()}}#J(){this.#s.value=this.#y?Eu(this.#y,this.#p):""}#_(){if(!(this.#f||this.#s.disabled)){if(this.#f=!0,this.setAttribute("open",""),this.#s.setAttribute("aria-expanded","true"),this.#a.hidden=!1,this.#d&&(this.#m=this.#d.getFullYear(),this.#h=this.#d.getMonth()),this.#N(),this.#u){try{this.#a.showPopover()}catch{}this.#j(),window.addEventListener("scroll",this.#Q,{capture:!0,passive:!0}),window.addEventListener("resize",this.#Q,{passive:!0})}this.dispatchEvent(new CustomEvent("date-picker:open",{bubbles:!0}))}}#V(){if(this.#f){if(this.#f=!1,this.removeAttribute("open"),this.#s.setAttribute("aria-expanded","false"),this.#a.hidden=!0,this.#u){try{this.#a.hidePopover()}catch{}window.removeEventListener("scroll",this.#Q,{capture:!0}),window.removeEventListener("resize",this.#Q)}this.dispatchEvent(new CustomEvent("date-picker:close",{bubbles:!0}))}}#j(){if(!this.#u)return;let t=this.#r.getBoundingClientRect(),i=this.#a.getBoundingClientRect(),s=4,n=8,r=window.innerHeight,a=window.innerWidth,o=r-t.bottom-n,c=t.top-n,l;o<i.height&&c>o?(l=t.top-i.height-s,this.#a.dataset.placement="top"):(l=t.bottom+s,delete this.#a.dataset.placement);let u=t.left;u+i.width>a-n&&(u=a-i.width-n),u<n&&(u=n),this.#a.style.setProperty("--calendar-top",`${l}px`),this.#a.style.setProperty("--calendar-left",`${u}px`)}#Q=()=>{this.#f&&this.#j()};#K=()=>{let t=this.#s.value,{date:i,partial:s}=kr(t,this.#p);if(i)this.#d=i,this.#m=i.getFullYear(),this.#h=i.getMonth(),this.#N();else if(s){this.#m=s.year,this.#h=s.month;let n=Ke(s.year,s.month),r=Math.min(this.#d?.getDate()??1,n);this.#d=new Date(s.year,s.month,r),this.#N()}!this.#f&&t.length>0&&this.#_()};#O=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let i=this.#s.value.trim();if(!i){this.#C(null,"keyboard"),this.#V();return}let{date:s}=kr(i,this.#p);s&&!this.#T(s)&&this.#P(s,"keyboard");return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#f||this.#_(),requestAnimationFrame(()=>{this.#d&&this.#Y(this.#d)});return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#f&&this.#V(),this.#J();return;case"Tab":this.#f&&this.#V();return}};#it=t=>{if(t.relatedTarget instanceof Node&&this.contains(t.relatedTarget))return;let i=this.#s.value.trim();if(!i)this.#C(null,"keyboard");else{let{date:s}=kr(i,this.#p);s&&!this.#T(s)&&this.#C(s,"keyboard")}this.#J(),this.#f&&this.#V(),this.#z()};#z=()=>{this.#i&&(this.#x||(this.#x=!0,this.#F()),this.#n.dispatchEvent(new Event("blur",{bubbles:!0})))};#U=t=>{this.#f&&!this.contains(t.target)&&this.#V()};#X=t=>{let s=t.target?.closest("button[data-date]");if(!s||s.getAttribute("aria-disabled")==="true")return;let n=ht(s.getAttribute("data-date"));n&&this.#P(n,"pointer")};#W=t=>{if(t.key==="Tab"){let o=[...this.#a.querySelectorAll('.calendar-header button, .calendar-header select, tbody button[tabindex="0"]')];if(!o.length)return;let c=o.indexOf(document.activeElement),l=c<0?0:(c+(t.shiftKey?-1:1)+o.length)%o.length;t.preventDefault(),o[l].focus();return}let i=t.target instanceof Element&&this.#l.contains(t.target),s=this.#d;if(!s)return;let n,r=(s.getDay()-this.#A+7)%7,a=getComputedStyle(this).direction==="rtl"?-1:1;switch(t.key){case"ArrowRight":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()+a);break;case"ArrowLeft":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()-a);break;case"ArrowDown":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()+7);break;case"ArrowUp":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()-7);break;case"PageDown":n=vr(s,t.shiftKey?12:1);break;case"PageUp":n=vr(s,t.shiftKey?-12:-1);break;case"Home":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()-r);break;case"End":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()+(6-r));break;case"Enter":case" ":if(!i)return;t.preventDefault(),t.stopPropagation(),this.#P(s,"keyboard");return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#V(),this.#s.focus();return;default:return}i&&(t.preventDefault(),t.stopPropagation(),this.#E&&n<this.#E&&(n=this.#E),this.#v&&n>this.#v&&(n=this.#v),this.#d=n,(n.getMonth()!==this.#h||n.getFullYear()!==this.#m)&&(this.#h=n.getMonth(),this.#m=n.getFullYear(),this.#N()),this.#Y(n))};#Z(t=!0){let i=this.#y?it(this.#y):"";this.#t.setFormValue(i||null),this.#n.value=i,t&&this.#n.dispatchEvent(new Event("input",{bubbles:!0}))}#st(t,i,s,n=null){let r=this.#n.getAttribute(`data-message-${t.toLowerCase()}`)??this.#M(i,s);return n?r.replaceAll("{date}",Eu(n,this.#p)):r}#F(){if(!this.#i)return!1;let t=this.hasAttribute("required")||this.#n.hasAttribute("required");t?this.#s.setAttribute("aria-required","true"):this.#s.removeAttribute("aria-required");let i=this.#y,s={},n="";t&&!i?(s={valueMissing:!0},n=this.#st("valueMissing","Required","Please select a date")):i&&this.#E&&i<this.#E?(s={rangeUnderflow:!0},n=this.#st("rangeUnderflow","RangeUnderflow","Choose a date on or after {date}",this.#E)):i&&this.#v&&i>this.#v&&(s={rangeOverflow:!0},n=this.#st("rangeOverflow","RangeOverflow","Choose a date on or before {date}",this.#v));let r=this.#t.validationMessage;return n?this.#t.setValidity(s,n,this.#s):this.#t.setValidity({}),n&&(i||this.#x)?this.#s.setAttribute("aria-invalid","true"):this.#s.removeAttribute("aria-invalid"),(this.#n.validationMessage===this.#L||!this.#n.validity.customError)&&(this.#n.setCustomValidity(n),this.#L=n),r!==n}#tt(){this.#i&&(this.#N(),this.#F()&&this.#n.dispatchEvent(new Event("input",{bubbles:!0})))}#nt(t){let i=t||new Date;this.#y=t,this.#d=i,this.#m=i.getFullYear(),this.#h=i.getMonth(),this.#J(),this.#Z(),this.#F(),this.#N()}formResetCallback(){this.#i&&(this.#x=!1,this.#nt(ht(this.#k)))}formStateRestoreCallback(t){!this.#i||typeof t!="string"||this.#nt(ht(t))}get form(){return this.#t.form}get validity(){return this.#t.validity}get validationMessage(){return this.#t.validationMessage}get willValidate(){return this.#t.willValidate}checkValidity(){return this.#t.checkValidity()}reportValidity(){return this.#t.reportValidity()}get value(){return this.#i?this.#y?it(this.#y):"":this.#w??""}set value(t){let i=t==null?"":String(t).trim(),s=i?ht(i):null;if(!(i&&!s)){if(!this.#i){this.#w=i;return}this.#C(s,"api")}}get min(){return this.#E?it(this.#E):""}set min(t){this.#E=ht(t),this.#n&&(this.#E?this.#n.setAttribute("min",it(this.#E)):this.#n.removeAttribute("min")),this.#tt()}get max(){return this.#v?it(this.#v):""}set max(t){this.#v=ht(t),this.#n&&(this.#v?this.#n.setAttribute("max",it(this.#v)):this.#n.removeAttribute("max")),this.#tt()}};E("date-picker",Cr);re();function ue(e,t,i){t/=100,i/=100;let s=a=>(a+e/30)%12,n=t*Math.min(i,1-i),r=a=>i-n*Math.max(-1,Math.min(s(a)-3,9-s(a),1));return{r:Math.round(r(0)*255),g:Math.round(r(8)*255),b:Math.round(r(4)*255)}}function is(e,t,i,s=!1){e/=255,t/=255,i/=255;let n=Math.max(e,t,i),r=Math.min(e,t,i),a=(n+r)/2,o=0,c=0;if(n!==r){let l=n-r;switch(c=a>.5?l/(2-n-r):l/(n+r),n){case e:o=((t-i)/l+(t<i?6:0))/6;break;case t:o=((i-e)/l+2)/6;break;case i:o=((e-t)/l+4)/6;break}}return s?{h:o*360,s:c*100,l:a*100}:{h:Math.round(o*360),s:Math.round(c*100),l:Math.round(a*100)}}function Hv(e){e=e.replace(/^#/,""),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}}function zv(e,t,i){return"#"+[e,t,i].map(s=>Math.max(0,Math.min(255,Math.round(s))).toString(16).padStart(2,"0")).join("")}function kt(e,t=!1){let{r:i,g:s,b:n}=Hv(e);return is(i,s,n,t)}function St(e,t,i){let{r:s,g:n,b:r}=ue(e,t,i);return zv(s,n,r)}function j(e,t,i){return Math.max(t,Math.min(i,e))}function Tr(e){return e/=255,e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Lr(e){let t=e<=.0031308?e*12.92:1.055*Math.pow(e,.4166666666666667)-.055;return Math.round(j(t,0,1)*255)}function Vv(e,t,i){let s=Tr(e),n=Tr(t),r=Tr(i),a=.4122214708*s+.5363325363*n+.0514459929*r,o=.2119034982*s+.6806995451*n+.1073969566*r,c=.0883024619*s+.2817188376*n+.6299787005*r,l=Math.cbrt(a),u=Math.cbrt(o),d=Math.cbrt(c),h=.2104542553*l+.793617785*u-.0040720468*d,f=1.9779984951*l-2.428592205*u+.4505937099*d,p=.0259040371*l+.7827717662*u-.808675766*d,m=Math.sqrt(f*f+p*p),g=Math.atan2(p,f)*180/Math.PI;return g<0&&(g+=360),m<1e-4&&(g=0),{L:h,C:m,H:g}}function Uv(e,t,i){let s=i*Math.PI/180,n=t*Math.cos(s),r=t*Math.sin(s),a=e+.3963377774*n+.2158037573*r,o=e-.1055613458*n-.0638541728*r,c=e-.0894841775*n-1.291485548*r,l=a**3,u=o**3,d=c**3,h=4.0767416621*l-3.3077115913*u+.2309699292*d,f=-1.2684380046*l+2.6097574011*u-.3413193965*d,p=-.0041960863*l-.7034186147*u+1.707614701*d;return{r:Lr(h),g:Lr(f),b:Lr(p)}}function Dr(e,t,i){let s=ue(e,t,i);return Vv(s.r,s.g,s.b)}function Su(e,t,i,s=!1){let{r:n,g:r,b:a}=Uv(e,t,i);return is(n,r,a,s)}function Wv(e,t,i){return St(e,t,i)}function Gv(e,t,i){let{r:s,g:n,b:r}=ue(e,t,i);return`rgb(${s} ${n} ${r})`}function Kv(e,t,i){return`hsl(${Math.round(e)}deg ${Math.round(t)}% ${Math.round(i)}%)`}function Yv(e,t,i){let{L:s,C:n,H:r}=Dr(e,t,i);return`oklch(${(s*100).toFixed(1)}% ${n.toFixed(3)} ${r.toFixed(1)}deg)`}function xu(e,t,i,s){switch(e){case"rgb":return Gv(t,i,s);case"hsl":return Kv(t,i,s);case"oklch":return Yv(t,i,s);default:return Wv(t,i,s)}}var de=["hex","rgb","hsl","oklch"],Xv="hex",Zv=/^#[0-9a-fA-F]{6}$/,he=8,Jv=0,Nr=class extends k{static formAssociated=!0;#t;#e;#i;#n;#s;#o;#r;#a;#l;#c;#g;#f;#u={};#p=Xv;#y;#d;#m;#h=!1;#E=!1;#v=!1;#S=`cp${++Jv}`;#b=0;#k=100;#w=50;#A;static get observedAttributes(){return["disabled"]}constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}setup(){if(this.#e=this.querySelector(':scope > input[type="color"]'),!this.#e)return!1;if(!this.#v){let s=this.getAttribute("format");s&&de.includes(s)&&(this.#p=s),this.#v=!0}if(this.#A===void 0){let s=this.#e.defaultValue;this.#A=Zv.test(s)?s.toLowerCase():this.#e.value||"#000000"}let t=kt(this.#e.value||this.#A,!0);this.#b=t.h,this.#k=t.s,this.#w=t.l;let i=this.#e.getAttribute("name");return i&&(this.hasAttribute("name")||this.setAttribute("name",i),this.#e.removeAttribute("name")),this.#e.hasAttribute("disabled")&&(this.#e.removeAttribute("disabled"),this.hasAttribute("disabled")||this.setAttribute("disabled","")),this.#e.setAttribute("tabindex","-1"),this.#e.setAttribute("aria-hidden","true"),this.#e.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.listen(this.#e,"click",this.#x),this.#M(),this.#R(),this.#O(),this.#Z(),this.#E=ts,this.#E&&this.#r.setAttribute("popover","manual"),this.listen(document,"click",this.#W),this.listen(this,"keydown",this.#D),this.#L(this.matches(":disabled")),!0}teardown(){this.#h=!1,this.removeAttribute("open"),window.removeEventListener("scroll",this.#X,{capture:!0}),window.removeEventListener("resize",this.#X),this.#i?.remove(),this.#r?.remove()}attributeChangedCallback(t){t==="disabled"&&this.#i&&this.#L(this.matches(":disabled"))}formDisabledCallback(t){this.#i&&this.#L(t)}#L(t){this.#i.disabled=t,t&&this.#z()}#x=t=>{t.preventDefault(),this.#i.disabled||this.#i.focus()};#D=t=>{t.key!=="Escape"||t.defaultPrevented||!this.#h||(t.preventDefault(),t.stopPropagation(),this.#z())};#M(){this.#i=document.createElement("button"),this.#i.type="button",this.#i.className="color-trigger",this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.#n=document.createElement("span"),this.#n.className="color-swatch",this.#s=document.createElement("span"),this.#s.className="color-hex",this.#s.id=`${this.#S}-value`,this.#i.appendChild(this.#n),this.#i.appendChild(this.#s);let t=[];for(let i of Array.from(this.#e.labels||[]))i.id||(i.id=`${this.#S}-label-${t.length}`),t.push(i.id);t.length===0&&(this.#o=document.createElement("span"),this.#o.className="visually-hidden",this.#o.id=`${this.#S}-name`,this.#o.textContent=this.#e.getAttribute("aria-label")||this.getAttribute("aria-label")||"Color",this.#i.prepend(this.#o),t.push(this.#o.id)),this.#i.setAttribute("aria-labelledby",[...t,this.#s.id].join(" ")),this.appendChild(this.#i),this.listen(this.#i,"click",()=>{this.#h?this.#z():this.#it()})}#R(){this.#y=void 0,this.#d=void 0,this.#r=document.createElement("div"),this.#r.className="color-panel",this.#r.setAttribute("role","dialog"),this.#r.setAttribute("aria-label","Color picker"),this.#a=document.createElement("div"),this.#a.className="color-area",this.#a.setAttribute("role","slider"),this.#a.setAttribute("aria-label","Saturation and lightness"),this.#a.setAttribute("aria-valuemin","0"),this.#a.setAttribute("aria-valuemax","100"),this.#a.setAttribute("tabindex","0"),this.#l=document.createElement("div"),this.#l.className="color-area-thumb",this.#a.appendChild(this.#l),this.#r.appendChild(this.#a);let t=document.createElement("div");t.className="color-hue-wrap",this.#c=document.createElement("div"),this.#c.className="color-hue",this.#c.setAttribute("role","slider"),this.#c.setAttribute("aria-label","Hue"),this.#c.setAttribute("aria-valuemin","0"),this.#c.setAttribute("aria-valuemax","360"),this.#c.setAttribute("tabindex","0"),this.#g=document.createElement("div"),this.#g.className="color-hue-thumb",this.#c.appendChild(this.#g),t.appendChild(this.#c),this.#r.appendChild(t);let i=document.createElement("div");i.className="color-format-row";let s=document.createElement("label");s.className="color-format-label";let n=document.createElement("span");n.textContent="Format",this.#f=document.createElement("select"),this.#f.className="color-format-select";for(let o of de){let c=document.createElement("option");c.value=o,c.textContent=o.toUpperCase(),this.#f.appendChild(c)}this.#f.value=this.#p,s.appendChild(n),s.appendChild(this.#f),i.appendChild(s),this.#r.appendChild(i),this.listen(this.#f,"change",this.#I),this.#u.hex=this.#B("hex",[{label:"Hex",channel:"hex",kind:"text",maxLength:7}]),this.#u.rgb=this.#B("rgb",[{label:"R",channel:"r",kind:"number",min:0,max:255,step:1},{label:"G",channel:"g",kind:"number",min:0,max:255,step:1},{label:"B",channel:"b",kind:"number",min:0,max:255,step:1}]),this.#u.hsl=this.#B("hsl",[{label:"H",channel:"h",kind:"number",min:0,max:360,step:1},{label:"S",channel:"s",kind:"number",min:0,max:100,step:1},{label:"L",channel:"l",kind:"number",min:0,max:100,step:1}]),this.#u.oklch=this.#B("oklch",[{label:"L%",channel:"oL",kind:"number",min:0,max:100,step:.1},{label:"C",channel:"oC",kind:"number",min:0,max:.4,step:.001},{label:"H\xB0",channel:"oH",kind:"number",min:0,max:360,step:.1}]);for(let o of de)this.#r.appendChild(this.#u[o].wrapper);this.#H();let r=this.querySelector(":scope > datalist");if(r){this.#y=document.createElement("div"),this.#y.className="color-swatches",this.#y.setAttribute("role","group"),this.#y.setAttribute("aria-label","Preset colors");for(let o of r.querySelectorAll("option[value]")){let c=document.createElement("button");c.type="button",c.setAttribute("aria-pressed","false"),c.style.background=o.value,c.setAttribute("aria-label",o.textContent||o.value),c.setAttribute("data-color",o.value),this.#y.appendChild(c)}this.#r.appendChild(this.#y),this.listen(this.#y,"click",this.#V)}let a=document.createElement("div");a.className="color-actions","EyeDropper"in window&&(this.#d=document.createElement("button"),this.#d.type="button",this.#d.className="color-eyedropper",this.#d.setAttribute("aria-label","Pick color from screen"),this.#d.textContent="\u{1F4A7}",a.appendChild(this.#d),this.listen(this.#d,"click",this.#j)),this.#m=document.createElement("button"),this.#m.type="button",this.#m.className="color-copy",this.#m.setAttribute("aria-label","Copy hex value"),this.#m.textContent="Copy",a.appendChild(this.#m),this.listen(this.#m,"click",this.#Q),this.#r.appendChild(a),this.appendChild(this.#r),this.listen(this.#a,"pointerdown",this.#G),this.listen(this.#a,"keydown",this.#T),this.listen(this.#c,"pointerdown",this.#q),this.listen(this.#c,"keydown",this.#$);for(let o of de){let c=o==="hex"?this.#P:o==="rgb"?this.#Y:o==="hsl"?this.#J:this.#_;for(let{el:l}of this.#u[o].inputs)this.listen(l,"change",c)}}#B(t,i){let s=document.createElement("div");s.className=`color-inputs color-inputs-${t}`,s.setAttribute("data-format",t);let n=[];for(let r of i){let a=document.createElement("label");a.className="color-input-label";let o=document.createElement("span");o.textContent=r.label;let c=document.createElement("input");c.type=r.kind,c.setAttribute("data-channel",r.channel),c.setAttribute("autocomplete","off"),c.setAttribute("spellcheck","false"),r.kind==="text"&&r.maxLength&&c.setAttribute("maxlength",String(r.maxLength)),r.kind==="number"&&(c.min=String(r.min),c.max=String(r.max),r.step!=null&&(c.step=String(r.step))),a.appendChild(o),a.appendChild(c),s.appendChild(a),n.push({el:c,channel:r.channel})}return{wrapper:s,inputs:n}}#H(){for(let t of de)this.#u[t].wrapper.hidden=t!==this.#p;this.#m&&this.#m.setAttribute("aria-label",`Copy ${this.#p.toUpperCase()} value`)}#I=()=>{let t=this.#f.value;de.includes(t)&&(this.#p=t,this.#H(),this.#O())};#G=t=>{t.preventDefault(),this.#a.setPointerCapture(t.pointerId),this.#N(t);let i=n=>this.#N(n),s=n=>{this.#a.releasePointerCapture(n.pointerId),this.#a.removeEventListener("pointermove",i),this.#a.removeEventListener("pointerup",s)};this.#a.addEventListener("pointermove",i),this.#a.addEventListener("pointerup",s)};#N(t){let i=this.#a.getBoundingClientRect(),s=j((t.clientX-i.left)/i.width,0,1),n=j((t.clientY-i.top)/i.height,0,1);this.#k=Math.round(s*100),this.#w=Math.round((1-n)*100),this.#K("pointer")}#T=t=>{let i=t.shiftKey?10:1;switch(this.#k=Math.round(this.#k),this.#w=Math.round(this.#w),t.key){case"ArrowRight":t.preventDefault(),this.#k=j(this.#k+i,0,100);break;case"ArrowLeft":t.preventDefault(),this.#k=j(this.#k-i,0,100);break;case"ArrowUp":t.preventDefault(),this.#w=j(this.#w+i,0,100);break;case"ArrowDown":t.preventDefault(),this.#w=j(this.#w-i,0,100);break;case"Home":t.preventDefault(),this.#k=0;break;case"End":t.preventDefault(),this.#k=100;break;case"PageUp":t.preventDefault(),this.#w=j(this.#w+10,0,100);break;case"PageDown":t.preventDefault(),this.#w=j(this.#w-10,0,100);break;default:return}this.#K("keyboard")};#q=t=>{t.preventDefault(),this.#c.setPointerCapture(t.pointerId),this.#et(t);let i=n=>this.#et(n),s=n=>{this.#c.releasePointerCapture(n.pointerId),this.#c.removeEventListener("pointermove",i),this.#c.removeEventListener("pointerup",s)};this.#c.addEventListener("pointermove",i),this.#c.addEventListener("pointerup",s)};#et(t){let i=this.#c.getBoundingClientRect(),s=j((t.clientX-i.left)/i.width,0,1);this.#b=Math.round(s*360),this.#K("pointer")}#$=t=>{let i=t.shiftKey?10:1;switch(this.#b=Math.round(this.#b),t.key){case"ArrowRight":case"ArrowUp":t.preventDefault(),this.#b=(this.#b+i)%361;break;case"ArrowLeft":case"ArrowDown":t.preventDefault(),this.#b=(this.#b-i+361)%361;break;case"PageUp":t.preventDefault(),this.#b=j(this.#b+10,0,360);break;case"PageDown":t.preventDefault(),this.#b=j(this.#b-10,0,360);break;case"Home":t.preventDefault(),this.#b=0;break;case"End":t.preventDefault(),this.#b=360;break;default:return}this.#K("keyboard")};#C(t,i){return this.#u[t].inputs.find(s=>s.channel===i)?.el}#P=()=>{let t=this.#C("hex","hex");if(!t)return;let i=t.value.trim();if(i.startsWith("#")||(i="#"+i),/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(i)){let s=kt(i,!0);this.#b=s.h,this.#k=s.s,this.#w=s.l,this.#K()}};#Y=()=>{let t=j(Number(this.#C("rgb","r").value)||0,0,255),i=j(Number(this.#C("rgb","g").value)||0,0,255),s=j(Number(this.#C("rgb","b").value)||0,0,255),n=is(t,i,s,!0);this.#b=n.h,this.#k=n.s,this.#w=n.l,this.#K()};#J=()=>{let t=j(Number(this.#C("hsl","h").value)||0,0,360)%361,i=j(Number(this.#C("hsl","s").value)||0,0,100),s=j(Number(this.#C("hsl","l").value)||0,0,100);this.#b=t,this.#k=i,this.#w=s,this.#K()};#_=()=>{let t=j(Number(this.#C("oklch","oL").value)||0,0,100)/100,i=j(Number(this.#C("oklch","oC").value)||0,0,.4),s=j(Number(this.#C("oklch","oH").value)||0,0,360),n=Su(t,i,s,!0);this.#b=n.h,this.#k=n.s,this.#w=n.l,this.#K()};#V=t=>{let i=t.target.closest("button[data-color]");if(!i)return;let s=i.getAttribute("data-color"),n=kt(s,!0);this.#b=n.h,this.#k=n.s,this.#w=n.l,this.#K()};#j=async()=>{try{let i=await new window.EyeDropper().open(),s=kt(i.sRGBHex,!0);this.#b=s.h,this.#k=s.s,this.#w=s.l,this.#K()}catch{}};#Q=()=>{let t=xu(this.#p,this.#b,this.#k,this.#w);bt(t,{button:this.#m,announceMessage:"Color copied"})};#K(t="internal"){this.#O(),this.#Z();let i=St(this.#b,this.#k,this.#w),s=ue(this.#b,this.#k,this.#w);this.dispatchEvent(new CustomEvent("color-picker:change",{bubbles:!0,detail:{hex:i,rgb:{r:s.r,g:s.g,b:s.b},hsl:{h:Math.round(this.#b),s:Math.round(this.#k),l:Math.round(this.#w)},source:t}}))}#O(){let t=St(this.#b,this.#k,this.#w),i=ue(this.#b,this.#k,this.#w),s=St(this.#b,100,50);this.#n.style.background=t,this.#s.textContent=t,this.#a.style.setProperty("--area-hue",s),this.#l.style.left=`${this.#k}%`,this.#l.style.top=`${100-this.#w}%`,this.#l.style.background=t;let n=Math.round(this.#b),r=Math.round(this.#k),a=Math.round(this.#w);this.#a.setAttribute("aria-valuenow",String(r)),this.#a.setAttribute("aria-valuetext",(this.getAttribute("data-label-area-value")||"Saturation {s}%, lightness {l}%").replaceAll("{s}",String(r)).replaceAll("{l}",String(a))),this.#g.style.left=`${this.#b/360*100}%`,this.#c.setAttribute("aria-valuenow",String(n)),this.#c.setAttribute("aria-valuetext",`Hue ${n}\xB0`);let o=(l,u,d)=>{let h=this.#C(l,u);h&&(h.value=String(d))};o("hex","hex",t),o("rgb","r",i.r),o("rgb","g",i.g),o("rgb","b",i.b),o("hsl","h",n),o("hsl","s",r),o("hsl","l",a);let c=Dr(this.#b,this.#k,this.#w);if(o("oklch","oL",(c.L*100).toFixed(1)),o("oklch","oC",c.C.toFixed(3)),o("oklch","oH",c.H.toFixed(1)),this.#y)for(let l of this.#y.querySelectorAll("button[data-color]")){let u=(l.getAttribute("data-color")||"").toLowerCase()===t.toLowerCase();l.setAttribute("aria-pressed",String(u))}}#it(){if(!(this.#h||this.#i.disabled)){if(this.#h=!0,this.setAttribute("open",""),this.#i.setAttribute("aria-expanded","true"),this.#E){try{this.#r.showPopover()}catch{}this.#U(),window.addEventListener("scroll",this.#X,{capture:!0,passive:!0}),window.addEventListener("resize",this.#X,{passive:!0})}requestAnimationFrame(()=>this.#a.focus()),this.dispatchEvent(new CustomEvent("color-picker:open",{bubbles:!0}))}}#z(){if(!this.#h)return;let t=this.#r.contains(document.activeElement);if(this.#h=!1,this.removeAttribute("open"),this.#i.setAttribute("aria-expanded","false"),this.#E){try{this.#r.hidePopover()}catch{}window.removeEventListener("scroll",this.#X,{capture:!0}),window.removeEventListener("resize",this.#X)}t&&this.#i.isConnected&&!this.#i.disabled&&this.#i.focus(),this.dispatchEvent(new CustomEvent("color-picker:close",{bubbles:!0}))}#U(){if(!this.#E)return;let t=this.#i.getBoundingClientRect(),i=this.#r.offsetWidth,s=this.#r.offsetHeight,n=document.documentElement.clientWidth,r=document.documentElement.clientHeight,o=getComputedStyle(this).direction==="rtl"?t.right-i:t.left;o=Math.min(o,n-i-he),o=Math.max(o,he);let c=t.bottom+4;c+s>r-he&&t.top-s-4>=he&&(c=t.top-s-4),c=Math.max(he,Math.min(c,r-s-he)),this.#r.style.setProperty("--panel-top",`${Math.round(c)}px`),this.#r.style.setProperty("--panel-left",`${Math.round(o)}px`)}#X=()=>{this.#h&&this.#U()};#W=t=>{this.#h&&!this.contains(t.target)&&this.#z()};#Z(){let t=St(this.#b,this.#k,this.#w);this.#t.setFormValue(t),this.#e.value=t,this.#e.dispatchEvent(new Event("input",{bubbles:!0}))}formResetCallback(){if(!this.#i)return;let t=kt(this.#A,!0);this.#b=t.h,this.#k=t.s,this.#w=t.l,this.#O(),this.#Z()}formStateRestoreCallback(t){if(!t||!this.#i)return;let i=kt(t,!0);this.#b=i.h,this.#k=i.s,this.#w=i.l,this.#O(),this.#Z()}get value(){return St(this.#b,this.#k,this.#w)}set value(t){if(!/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t))return;let i=St(this.#b,this.#k,this.#w).toLowerCase(),s=t.toLowerCase();if(i===s||i===s.toLowerCase())return;let n=kt(t,!0);this.#b=n.h,this.#k=n.s,this.#w=n.l,this.#K("api")}};E("color-picker",Nr);var Qv='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="5" y1="12" x2="19" y2="12"/></svg>',t0='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>';function e0(e){if(!e)return[];let t=e.trim();if(t.startsWith("["))try{return JSON.parse(t).map(s=>({value:String(s.value),label:String(s.label??s.value)}))}catch{return[]}return t.split(",").map(i=>{let s=i.trim();return{value:s,label:s}})}function i0(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}function s0(e){let t=Math.max(0,Math.round(e)),i=Math.floor(t/3600),s=Math.floor(t%3600/60),n=t%60,r=a=>String(a).padStart(2,"0");return i>0?`${i}:${r(s)}:${r(n)}`:`${s}:${r(n)}`}function n0(e,t){let i=Number(e)||0,s=["B","KB","MB","GB","TB","PB"],n=0,r=Math.abs(i);for(;r>=1e3&&n<s.length-1;)r/=1e3,n+=1;let a=new Intl.NumberFormat(t,{minimumFractionDigits:n===0?0:1,maximumFractionDigits:n===0?0:2});return`${i<0?"-":""}${a.format(r)} ${s[n]}`}function r0(){return document.documentElement.lang||void 0}function Mr(e){let t=String(e),i=t.indexOf(".");return i<0?0:t.length-i-1}var Cu=!1,a0=0,_r=class extends k{static formAssociated=!0;static observedAttributes=["value","disabled","readonly","aria-label","aria-labelledby","data-label-decrease","data-label-increase"];#t;#e;#i=-1/0;#n=1/0;#s=1;#o=[];#r=[];#a;#l;#c="";#g=!1;#f=!1;#u;#p;#y;#d=!1;#m=!1;#h;#E;#v;#S;#b;#k;#w=0;#A=0;#L=!1;#x=!1;constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}setup(){this.#R(),this.#B(),this.#G();let t=this.getAttribute("value");this.#d||(this.#y=t,this.#d=!0),this.#j(t??this.#I(),"init"),this.#D(),requestAnimationFrame(()=>{this.isConnected&&this.#D()}),this.listen(this.#h,"focus",()=>this.#D()),this.listen(this,"click",i=>{i.target===this&&!this.#et()&&this.#h.focus()})}teardown(){this.#T(),this.#x=!1}attributeChangedCallback(t,i,s){!this.isConnected||!this.#h||(t==="value"?this.#j(s??this.#I(),"attr"):t==="disabled"||t==="readonly"?this.#C():t==="aria-label"||t==="aria-labelledby"?this.#D():this.#M())}#D(){let t=[],i=[];try{i=[...this.#t.labels||[]]}catch{}for(let a of i)a.id||(a.id=`stepper-wc-label-${++a0}`),t.push(a.id);let s=(this.getAttribute("aria-labelledby")||"").trim();s&&t.push(...s.split(/\s+/));let n=[...new Set(t)];n.length?this.#h.setAttribute("aria-labelledby",n.join(" ")):this.#h.removeAttribute("aria-labelledby");let r=this.getAttribute("aria-label");r?this.#h.setAttribute("aria-label",r):this.#h.removeAttribute("aria-label")}#M(){this.#S.setAttribute("aria-label",this.getAttribute("data-label-decrease")||"Decrease"),this.#b.setAttribute("aria-label",this.getAttribute("data-label-increase")||"Increase")}#R(){if(this.hasAttribute("data-options"))this.#e="enum";else if(this.hasAttribute("data-values"))this.#e="token";else if(this.hasAttribute("data-format")||this.hasAttribute("data-suffix"))this.#e="formatted";else{if(this.#e="numeric",Cu)return;Cu=!0,console.info('[stepper-wc] No mode attribute set. Plain numeric stepping is better served by `<input type="number" data-stepper>`. See /docs/interaction/numeric-inputs/')}}#B(){this.#i=this.hasAttribute("data-min")?Number(this.getAttribute("data-min")):-1/0,this.#n=this.hasAttribute("data-max")?Number(this.getAttribute("data-max")):1/0,this.#s=Number(this.getAttribute("data-step"))||1,this.#o=i0(this.getAttribute("data-values")),this.#r=e0(this.getAttribute("data-options")),this.#a=this.getAttribute("data-format")||(this.hasAttribute("data-suffix")?"number":null),this.#l=this.getAttribute("data-currency")||"USD",this.#c=this.getAttribute("data-suffix")||"",this.#g=this.hasAttribute("data-show-label"),this.#f=this.hasAttribute("data-accelerate"),this.#u=r0(),this.#k=this.#H()}#H(){if(!this.#a)return null;let t=Mr(this.#s);return this.#a==="number"?new Intl.NumberFormat(this.#u,{minimumFractionDigits:t,maximumFractionDigits:t}):this.#a==="currency"?new Intl.NumberFormat(this.#u,{style:"currency",currency:this.#l}):this.#a==="percent"?new Intl.NumberFormat(this.#u,{style:"percent",minimumFractionDigits:t,maximumFractionDigits:t}):null}#I(){return this.#e==="enum"?this.#r[0]?.value??"":this.#e==="token"?this.#o[0]??"":"0"}#G(){this.replaceChildren(),this.#S=document.createElement("button"),this.#S.type="button",this.#S.className="stepper-dec",this.#S.setAttribute("tabindex","-1"),this.#S.innerHTML=Qv,this.#b=document.createElement("button"),this.#b.type="button",this.#b.className="stepper-inc",this.#b.setAttribute("tabindex","-1"),this.#b.innerHTML=t0,this.#h=document.createElement("span"),this.#h.className="stepper-value",this.#h.setAttribute("role","spinbutton"),this.#h.setAttribute("tabindex","0"),this.#E=document.createElement("span"),this.#E.className="stepper-value-display",this.#h.appendChild(this.#E),this.#v=new Set;for(let t of this.#it())this.#z(t);this.appendChild(this.#S),this.appendChild(this.#h),this.appendChild(this.#b),this.#N(this.#S,-1),this.#N(this.#b,1),this.listen(this.#h,"keydown",this.#q),this.#M(),this.#C()}#N(t,i){if(this.listen(t,"click",n=>{if(this.#x){this.#x=!1,n.preventDefault();return}this.#P(i,1)}),!this.#f)return;this.listen(t,"pointerdown",n=>{let r=n;r.pointerType==="mouse"&&r.button!==0||this.#$()||(this.#L=!1,this.#w=window.setTimeout(()=>{this.#L=!0,this.#A=window.setInterval(()=>this.#P(i,1),100),this.#w=window.setTimeout(()=>{window.clearInterval(this.#A),this.#A=window.setInterval(()=>this.#P(i,5),50)},1e3)},500))});let s=()=>{this.#T(),this.#L&&(this.#x=!0)};this.listen(t,"pointerup",s),this.listen(t,"pointerleave",s),this.listen(t,"pointercancel",s)}#T(){window.clearTimeout(this.#w),window.clearInterval(this.#A),this.#w=0,this.#A=0}#q=t=>{if(this.#$())return;let i=getComputedStyle(this).direction==="rtl";switch(i&&t.key==="ArrowLeft"?"ArrowRight":i&&t.key==="ArrowRight"?"ArrowLeft":t.key){case"ArrowUp":case"ArrowRight":t.preventDefault(),this.#P(1,1);break;case"ArrowDown":case"ArrowLeft":t.preventDefault(),this.#P(-1,1);break;case"PageUp":t.preventDefault(),this.#P(1,10);break;case"PageDown":t.preventDefault(),this.#P(-1,10);break;case"Home":t.preventDefault(),this.#Y("min");break;case"End":t.preventDefault(),this.#Y("max");break;default:}};#et(){return this.hasAttribute("disabled")||this.#m}#$(){return this.#et()||this.hasAttribute("readonly")}#C(){let t=this.#et();this.#h.setAttribute("aria-disabled",String(t)),this.hasAttribute("readonly")?this.#h.setAttribute("aria-readonly","true"):this.#h.removeAttribute("aria-readonly"),t?(this.#h.removeAttribute("tabindex"),this.#T()):this.#h.setAttribute("tabindex","0"),this.#p!==void 0?this.#X():(this.#S.disabled=this.#$(),this.#b.disabled=this.#$())}#P(t,i){if(this.#$())return;let s=this.#J(t,i);s===null||s===this.#p||this.#j(s,"step")}#Y(t){if(this.#e==="enum"){let s=t==="min"?0:this.#r.length-1;this.#j(this.#r[s]?.value,"step");return}if(this.#e==="token"){let s=t==="min"?0:this.#o.length-1;this.#j(this.#o[s],"step");return}let i=t==="min"?this.#i===-1/0?this.#p:this.#i:this.#n===1/0?this.#p:this.#n;this.#j(String(i),"step")}#J(t,i){if(this.#e==="enum"){let c=this.#r.findIndex(d=>d.value===this.#p),l=c===-1?0:c,u=Math.min(this.#r.length-1,Math.max(0,l+t*i));return this.#r[u]?.value}if(this.#e==="token"){let l=this.#_(this.#p);l===-1&&(l=this.#V(this.#p));let u=Math.min(this.#o.length-1,Math.max(0,l+t*i));return this.#o[u]}let s=Number(this.#p)||0,n=Mr(this.#s),r=s+t*this.#s*i,a=Number(r.toFixed(n)),o=Math.min(this.#n,Math.max(this.#i,a));return String(o)}#_(t){if(t==null)return-1;let i=this.#o.indexOf(String(t));if(i!==-1)return i;let s=Number(t);if(Number.isFinite(s)){let n=this.#o.findIndex(r=>Number(r)===s);if(n!==-1)return n}return-1}#V(t){let i=Number(t);if(!Number.isFinite(i))return 0;let s=0,n=1/0;return this.#o.forEach((r,a)=>{let o=Number(r);if(!Number.isFinite(o))return;let c=Math.abs(o-i);c<n&&(n=c,s=a)}),s}#j(t,i){let s=this.#Q(t),n=s!==this.#p;this.#p=s,this.getAttribute("value")!==String(s)&&this.setAttribute("value",String(s)),this.#K(),this.#U(),this.#X(),this.#st(),this.#F(),n&&i!=="init"&&(this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})))}#Q(t){if(t==null)return this.#I();if(this.#e==="enum"){let n=String(t);return this.#r.find(a=>a.value===n)?n:this.#r[0]?.value??""}if(this.#e==="token")return String(t);let i=Number(t);if(!Number.isFinite(i))return String(this.#i===-1/0?0:this.#i);let s=Mr(this.#s);return String(Number(Math.min(this.#n,Math.max(this.#i,i)).toFixed(s)))}#K(){let t=this.#O();this.#E.textContent=t,this.#z(t)}#O(t=this.#p){if(this.#e==="enum")return this.#r.find(s=>s.value===t)?.label??t??"";if(this.#e==="token"){let i=this.#g?String(t).replace(/^--/,""):String(t);return this.#c?`${i}${this.#c}`:i}if(this.#e==="formatted"){let i=Number(t)||0;if(this.#a==="duration")return s0(i);if(this.#a==="bytes")return n0(i,this.#u);if(this.#k){let s=this.#a==="percent"?i/100:i,n=this.#k.format(s);return this.#c&&this.#a==="number"?`${n}${this.#c}`:n}return this.#c?`${i}${this.#c}`:String(i)}return String(t??"")}#it(){if(this.#e==="enum")return this.#r.map(s=>this.#O(s.value));if(this.#e==="token")return this.#o.map(s=>this.#O(s));let t=new Set,i=s=>{Number.isFinite(s)&&t.add(s)};if(this.#i!==-1/0&&i(this.#i),this.#n!==1/0&&i(this.#n),i(Number(this.getAttribute("value"))||0),this.#n===1/0){let s=[10,100,1e3,1e4];for(let n of s)i(n);if(this.#a==="bytes")for(let n of[999,999e3,999e6,999e9])i(n)}return[...t].map(s=>this.#O(String(s)))}#z(t){let i=String(t??"");if(!i||this.#v.has(i))return;this.#v.add(i);let s=document.createElement("span");s.className="stepper-value-reserve",s.setAttribute("aria-hidden","true"),s.textContent=i,this.#h.appendChild(s)}recomputeWidth(){if(this.#h){this.#h.querySelectorAll(".stepper-value-reserve").forEach(t=>t.remove()),this.#v=new Set;for(let t of this.#it())this.#z(t)}}#U(){if(this.#e==="enum"){let i=this.#r.findIndex(s=>s.value===this.#p);this.#h.setAttribute("aria-valuemin","1"),this.#h.setAttribute("aria-valuemax",String(this.#r.length)),this.#h.setAttribute("aria-valuenow",String((i===-1?0:i)+1)),this.#h.setAttribute("aria-valuetext",this.#O());return}if(this.#e==="token"){let i=this.#_(this.#p);this.#h.setAttribute("aria-valuemin","1"),this.#h.setAttribute("aria-valuemax",String(this.#o.length)),this.#h.setAttribute("aria-valuenow",String((i===-1?0:i)+1)),this.#h.setAttribute("aria-valuetext",this.#O());return}let t=Number(this.#p)||0;this.#i!==-1/0?this.#h.setAttribute("aria-valuemin",String(this.#i)):this.#h.removeAttribute("aria-valuemin"),this.#n!==1/0?this.#h.setAttribute("aria-valuemax",String(this.#n)):this.#h.removeAttribute("aria-valuemax"),this.#h.setAttribute("aria-valuenow",String(t)),this.#h.setAttribute("aria-valuetext",this.#O())}#X(){let t=this.#W(),i=this.#Z(),s=this.#$();this.#S.disabled=t||s,this.#b.disabled=i||s}#W(){return this.#e==="enum"?this.#p===this.#r[0]?.value:this.#e==="token"?this.#_(this.#p)===0:this.#i!==-1/0&&Number(this.#p)<=this.#i}#Z(){return this.#e==="enum"?this.#p===this.#r[this.#r.length-1]?.value:this.#e==="token"?this.#_(this.#p)===this.#o.length-1:this.#n!==1/0&&Number(this.#p)>=this.#n}#st(){this.#t.setFormValue(String(this.#p??""))}#F(){this.setState("at-min",this.#W()),this.setState("at-max",this.#Z())}formResetCallback(){this.#j(this.#y??this.#I(),"reset")}formDisabledCallback(t){this.#m=t,this.#h&&this.#C()}formStateRestoreCallback(t){t!=null&&this.#j(t,"restore")}get displayText(){return this.#E?.textContent??""}get value(){return this.#p==null?"":String(this.#p)}set value(t){String(t)!==String(this.#p)&&this.#j(t,"api")}get form(){return this.#t.form}get name(){return this.getAttribute("name")}get type(){return this.localName}get validity(){return this.#t.validity}get validationMessage(){return this.#t.validationMessage}checkValidity(){return this.#t.checkValidity()}reportValidity(){return this.#t.reportValidity()}};E("stepper-wc",_r);var o0={live:"Live",recording:"Recording",streaming:"Streaming",error:"Error",online:"Online",running:"Running",away:"Away",paused:"Paused",busy:"Busy",offline:"Offline",stopped:"Stopped"},$r=class extends k{static get observedAttributes(){return["data-variant","data-live","aria-label"]}#t=null;#e=null;#i=!1;setup(){let t=this.querySelector(":scope > .status-dot"),i=this.querySelector(":scope > .status-label"),s=this.querySelector(":scope > .status-default-label");t||(t=document.createElement("span"),t.className="status-dot",t.setAttribute("aria-hidden","true")),i||(i=document.createElement("span"),i.className="status-label"),s||(s=document.createElement("span"),s.className="status-default-label");for(let n of[...this.childNodes])n===t||n===i||n===s||i.appendChild(n);this.append(t,i,s),this.#t=i,this.#e=s,this.#n(),this.#s()}attributeChangedCallback(t,i,s){i!==s&&(!this.isConnected||!this.hasAttribute("data-upgraded")||(t==="data-variant"?(this.#s(),this.dispatchEvent(new CustomEvent("status-wc:change",{bubbles:!0,detail:{variant:s,previousVariant:i}}))):t==="data-live"?this.#n():t==="aria-label"&&this.#s()))}#n(){this.getAttribute("data-live")==="off"?this.#i&&(this.removeAttribute("role"),this.removeAttribute("aria-live"),this.#i=!1):!this.hasAttribute("role")&&!this.hasAttribute("aria-live")&&(this.setAttribute("role","status"),this.setAttribute("aria-live","polite"),this.#i=!0)}#s(){let t=this.#e;if(!t)return;let i=!!this.#t?.textContent?.trim(),s="";if(!i){let n=this.getAttribute("data-variant")||"";s=this.getAttribute("aria-label")||n&&this.getAttribute(`data-label-${n}`)||o0[n]||n}t.textContent!==s&&(t.textContent=s)}get variant(){return this.getAttribute("data-variant")}set variant(t){t?this.setAttribute("data-variant",t):this.removeAttribute("data-variant")}};E("status-wc",$r);He();Ve();var Ir=0,c0='a[href], button, input, select, textarea, summary, iframe, [tabindex], [contenteditable]:not([contenteditable="false"])',l0="a[href], button, input, select, textarea, summary",u0=new Set(["button","link","checkbox","radio","switch","tab","option","treeitem","gridcell","menuitem","menuitemcheckbox","menuitemradio","combobox","textbox","searchbox","slider","spinbutton"]);function ss(e){return e.hasAttribute("data-disabled")||e.getAttribute("aria-disabled")==="true"||!!e.disabled}function d0(e){return e.pointerType===""||e.pointerId===-1||e.button===-1||e.clientX===0&&e.clientY===0&&e.buttons===0}var Br=class extends k{#t;#e;#i;#n=[];#s=-1;#o=!1;#r=[];#a=!1;#l=[];#c=null;setup(){let t=this.querySelector(":scope > [data-trigger]"),i=this.querySelector('menu, ul[role="menu"]');if(!t||!i)return!1;this.#t=t,this.#e=i;let s=this.querySelector(":scope > pop-over[data-context-menu-host]");s?this.#i=s:(this.#i=document.createElement("pop-over"),this.#i.setAttribute("data-context-menu-host",""),this.#i.id=`ctx-menu-${++Ir}`,this.#i.dataset.mode="auto",this.#i.appendChild(this.#e),this.appendChild(this.#i)),this.#e.parentElement!==this.#i&&this.#i.appendChild(this.#e),this.#e.setAttribute("role","menu"),this.#e.id||(this.#e.id=`ctx-menu-list-${++Ir}`),this.#t.matches(c0)||this.#g("tabindex","0"),this.#a=this.#t.matches(l0)||this.#t.hasAttribute("tabindex")&&u0.has((this.#t.getAttribute("role")||"").trim().toLowerCase()),this.#a?(this.#g("aria-haspopup","menu"),this.#g("aria-expanded","false"),this.#g("aria-controls",this.#e.id)):!this.#t.hasAttribute("aria-description")&&!this.#t.hasAttribute("aria-describedby")&&this.#g("aria-description",this.getAttribute("data-label-available")||"Context menu available"),this.#e.querySelectorAll(':scope > li:empty:not([data-group]), :scope > [role="separator"], :scope > hr').forEach(r=>{r.setAttribute("role","separator")}),this.#f();let n=Array.from(this.#e.querySelectorAll('button, a, [role="menuitem"]'));return n.forEach(r=>{r.setAttribute("role","menuitem"),r.setAttribute("tabindex","-1")}),this.#n=n.filter(r=>!r.disabled),this.#e.querySelectorAll("li").forEach(r=>{r.querySelector(':scope > :is(button, a, [role="menuitem"])')&&r.setAttribute("role","none")}),this.#n.forEach(r=>{r.hasAttribute("data-disabled")&&r.setAttribute("aria-disabled","true"),this.listen(r,"click",this.#b);let a=r.getAttribute("data-shortcut");if(a){if(!r.querySelector(":scope > .ctx-kbd")){let c=document.createElement("kbd");c.className="ctx-kbd",c.setAttribute("aria-hidden","true"),c.textContent=Wl(a),r.appendChild(c)}r.setAttribute("aria-keyshortcuts",Wi(a));let o=At(a,()=>{ss(r)||r.click()});this.#r.push(o)}}),this.listen(this.#t,"contextmenu",this.#p),this.listen(this.#t,"keydown",this.#y),this.listen(this.#e,"keydown",this.#v),this.listen(this.#e,"click",this.#S,{capture:!0}),this.listen(window,"scroll",this.#w,{capture:!0}),this.listen(this.#i,"pop-over:hide",this.#k),!0}teardown(){this.#r.forEach(t=>t()),this.#r=[];for(let t of this.#l)this.#t?.removeAttribute(t);this.#l=[],this.#c=null,this.#o&&(this.#o=!1,this.removeAttribute("data-open"),this.#i?.hide?.()),this.#s=-1,this.#n=[],this.#e?.querySelectorAll(".ctx-kbd").forEach(t=>t.remove()),this.#u()}#g(t,i){this.#t.setAttribute(t,i),this.#l.push(t)}#f(){let t=this.#e;for(let i of Array.from(t.querySelectorAll(":scope > li[data-group]"))){i.id||(i.id=`ctx-group-${++Ir}`),i.classList.add("ctx-group-label"),i.setAttribute("aria-hidden","true");let s=document.createElement("li");s.setAttribute("role","group"),s.setAttribute("aria-labelledby",i.id),s.setAttribute("data-ctx-group","");let n=document.createElement("ul");n.setAttribute("role","none"),s.appendChild(n),t.insertBefore(s,i),n.appendChild(i);let r=s.nextElementSibling;for(;r&&!r.hasAttribute("data-group")&&r.getAttribute("role")!=="separator";){let a=r;r=r.nextElementSibling,n.appendChild(a)}}}#u(){let t=this.#e;if(t)for(let i of Array.from(t.querySelectorAll(":scope > li[data-ctx-group]"))){let s=i.querySelector(":scope > ul");if(s)for(let n of Array.from(s.children))t.insertBefore(n,i);i.remove()}}get items(){if(!this.#e)return[];let t=[],i=this.#e.querySelectorAll(":scope > li:not([data-ctx-group]), :scope > li[data-ctx-group] > ul > li");for(let s of i){if(s.hasAttribute("data-group")){t.push({group:s.textContent.trim()});continue}if(s.matches(':empty, [role="separator"]')||s.querySelector("hr")){t.push({separator:!0});continue}let n=s.querySelector('button, a, [role="menuitem"]');if(!n)continue;let r=Array.from(n.childNodes).filter(a=>!(a instanceof Element&&a.classList.contains("ctx-kbd"))).map(a=>a.textContent).join("");t.push({label:r.trim().replace(/\s+/g," "),value:n.getAttribute("data-value")||void 0,href:n.tagName==="A"?n.getAttribute("href"):void 0,shortcut:n.getAttribute("data-shortcut")||void 0,disabled:n.disabled||n.hasAttribute("data-disabled")||void 0})}return t}set items(t){let i=Array.isArray(t)?t:[],s=this.querySelector('menu, ul[role="menu"]');for(s||(s=document.createElement("menu"),this.appendChild(s));s.firstChild;)s.firstChild.remove();for(let n of i){let r=document.createElement("li");if(n.separator)r.setAttribute("role","separator");else if(n.group!=null)r.setAttribute("data-group",""),r.textContent=n.group;else{let a=n.href?document.createElement("a"):document.createElement("button");n.href&&a.setAttribute("href",n.href),n.value&&a.setAttribute("data-value",n.value),n.shortcut&&a.setAttribute("data-shortcut",n.shortcut),n.disabled&&a.setAttribute("data-disabled",""),a.tagName==="BUTTON"&&a.setAttribute("type","button"),a.textContent=n.label||"",r.appendChild(a)}s.appendChild(r)}this._reinit(),this.dispatchEvent(new CustomEvent("context-menu:items-changed",{detail:{items:i,source:"property"},bubbles:!0}))}#p=t=>{if(t.preventDefault(),d0(t)){this.#o||this.#d();return}t.buttons!==0?this.listen(window,"pointerup",()=>{setTimeout(()=>this.#m(t.clientX,t.clientY),0)},{once:!0,capture:!0}):this.#m(t.clientX,t.clientY)};#y=t=>{t.defaultPrevented||(t.key==="ContextMenu"||t.key==="F10"&&t.shiftKey)&&(t.preventDefault(),this.#o||this.#d())};#d(){let t=document.activeElement,s=(t&&this.#t.contains(t)?t:this.#t).getBoundingClientRect();this.#m(s.left,s.bottom)}#m(t,i){let s=document.activeElement;this.#c=s&&this.#t.contains(s)?s:this.#t,this.#o=!0,this.setAttribute("data-open",""),this.#a&&this.#t?.setAttribute("aria-expanded","true"),this.#i.style.top=`${i}px`,this.#i.style.left=`${t}px`,this.#i.show(),requestAnimationFrame(()=>{let n=this.#i.getBoundingClientRect(),r=t+n.width>window.innerWidth?t-n.width:t,a=i+n.height>window.innerHeight?i-n.height:i;this.#i.style.top=`${Math.max(0,a)}px`,this.#i.style.left=`${Math.max(0,r)}px`}),this.#s=-1,this.#A(0),this.dispatchEvent(new CustomEvent("context-menu:open",{bubbles:!0}))}close(){if(!this.#o)return;let t=this.#h();this.#o=!1,this.removeAttribute("data-open"),this.#a&&this.#t?.setAttribute("aria-expanded","false"),this.#s=-1,this.#i?.hide(),t&&this.#E(),this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0}))}#h(){let t=document.activeElement;return!t||t===document.body||!!this.#i?.contains(t)}#E(){let t=this.#c?.isConnected?this.#c:this.#t;this.#c=null,t?.isConnected&&t.focus({preventScroll:!0})}#v=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.#A(this.#s+1);break;case"ArrowUp":case"Up":t.preventDefault(),this.#A(this.#s-1);break;case"Home":t.preventDefault(),this.#A(0);break;case"End":t.preventDefault(),this.#A(this.#n.length-1);break;case"Enter":case" ":{t.preventDefault();let i=this.#n[this.#s];i&&!ss(i)&&i.click();break}case"Tab":this.close();break}};#S=t=>{let i=t.target.closest?.('button, a, [role="menuitem"]');i&&this.#e.contains(i)&&ss(i)&&(t.preventDefault(),t.stopPropagation())};#b=t=>{let i=t.currentTarget;ss(i)||(this.close(),this.dispatchEvent(new CustomEvent("context-menu:select",{bubbles:!0,detail:{item:i,value:i.getAttribute("data-value")||void 0}})))};#k=()=>{this.#o&&(this.#o=!1,this.removeAttribute("data-open"),this.#a&&this.#t?.setAttribute("aria-expanded","false"),this.#s=-1,this.#h()&&this.#E(),this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0})))};#w=()=>{this.#o&&this.close()};#A(t){this.#n.length!==0&&(t<0&&(t=this.#n.length-1),t>=this.#n.length&&(t=0),this.#s=t,this.#n[t].focus())}get isOpen(){return this.#o}};E("context-menu",Br);Rt();var Tu=10,h0=new Set(["replace","append","prepend"]),f0="Failed to load content",Rr=class extends k{#t;#e;#i=null;#n=!1;#s=null;#o="";#r=!1;#a=null;setup(){let t=this.getAttribute("src");return t?(this.#r=!0,this.#i===null&&(this.#i=this.innerHTML),this.#n&&this.#s===t||this.#l(t),!0):!1}teardown(){this.#r=!1,this.#t?.disconnect(),this.hasAttribute("data-loading")&&(this.#e?.abort(),this.removeAttribute("data-loading"),this.removeAttribute("aria-busy"))}get src(){return this.getAttribute("src")||""}set src(t){let i=t==null?"":String(t);this.src!==i&&(i?this.setAttribute("src",i):this.removeAttribute("src"),this.dispatchEvent(new CustomEvent("include-file:src-changed",{detail:{src:i,source:"property"},bubbles:!0})))}static get observedAttributes(){return["src"]}attributeChangedCallback(t,i,s){if(!(t!=="src"||!s||i===s)){if(!this.#r){queueMicrotask(()=>{!this.#r&&this.isConnected&&this.getAttribute("src")&&this._reinit()});return}this.#l(s)}}#l(t){this.hasAttribute("lazy")&&!this.#c()?this.#g():this.#d(t)}#c(){let t=this.getBoundingClientRect();return t.top<window.innerHeight+200&&t.bottom>-200}#g(){this.#t?.disconnect(),this.#t=new IntersectionObserver(t=>{for(let i of t)if(i.isIntersecting){this.#t.disconnect();let s=this.getAttribute("src");s&&this.#d(s)}},{rootMargin:"200px"}),this.#t.observe(this)}#f(t){let i;try{i=new URL(t,document.baseURI)}catch{throw new Error(`Invalid URL: ${t}`)}if(i.protocol!=="http:"&&i.protocol!=="https:")throw new Error(`Refused ${i.protocol} URL: only http(s) is allowed`);return this.#u(i.href),i.href}#u(t){if(!this.hasAttribute("allow-cross-origin")&&new URL(t).origin!==location.origin)throw new Error(`Refused cross-origin URL ${t} (add allow-cross-origin to permit)`)}#p(t){let i=0,s=this.parentElement?.closest("include-file");for(;s;){if(#o in s&&(i++,s.#o===t))throw new Error(`Refused include cycle: ${t} is already included by an ancestor`);s=s.parentElement?.closest("include-file")}if(i>=Tu)throw new Error(`Refused include: nesting deeper than ${Tu}`)}#y(){let t=this.getAttribute("mode")||"replace";return h0.has(t)?t:(console.warn(`<include-file>: unknown mode "${t}", using "replace"`),"replace")}async#d(t){this.#e?.abort();let i=new AbortController;this.#e=i,this.#h(),this.setAttribute("data-loading",""),this.setAttribute("aria-busy","true"),this.removeAttribute("data-loaded"),this.removeAttribute("data-error");try{let s=this.#f(t);this.#p(s),this.#o=s;let n=await fetch(s,{signal:i.signal});if(n.url&&this.#u(n.url),!n.ok)throw new Error(`HTTP ${n.status}: ${n.statusText}`);let r=await n.text();if(i.signal.aborted)return;let a=this.hasAttribute("trusted");this.hasAttribute("allow-scripts")&&!a&&console.warn("<include-file>: allow-scripts is ignored without trusted");let o=a&&this.hasAttribute("allow-scripts"),c;if(a){let f=document.createElement("template");f.innerHTML=r,c=f.content}else c=se(r,{allowIncludeFile:!0,keepIds:!0,keepStyle:!0});let l=document.createElement("template");l.content.append(c.cloneNode(!0));let u=l.innerHTML,d=[...c.querySelectorAll("script")];o||d.forEach(f=>f.remove());let h=this.#y();h==="replace"?this.replaceChildren(c):h==="append"?this.append(c):this.prepend(c);for(let f of o?d:[]){let p=document.createElement("script");for(let m of f.attributes)p.setAttribute(m.name,m.value);p.textContent=f.textContent,f.replaceWith(p)}this.removeAttribute("data-loading"),this.removeAttribute("aria-busy"),this.setAttribute("data-loaded",""),this.#n=!0,this.#s=t,this.dispatchEvent(new CustomEvent("include-file:loaded",{bubbles:!0,detail:{src:t,url:s,html:u}}))}catch(s){if(s.name==="AbortError"||i.signal.aborted)return;this.#m(t,s)}}#m(t,i){if(this.removeAttribute("data-loading"),this.removeAttribute("aria-busy"),this.setAttribute("data-error",""),this.#y()==="replace"&&this.#i!==null&&!this.#n&&(this.innerHTML=this.#i),!this.textContent.trim()&&!this.children.length){let s=document.createElement("p");s.setAttribute("role","alert"),s.setAttribute("data-include-error",""),s.textContent=this.getAttribute("data-label-error")||f0,this.append(s),this.#a=s}this.dispatchEvent(new CustomEvent("include-file:error",{bubbles:!0,detail:{src:t,error:i.message}}))}#h(){this.#a?.parentNode===this&&this.#a.remove(),this.#a=null}reload(){let t=this.getAttribute("src");t&&this.#d(t)}};E("include-file",Rr);ct();var Lu="environment",Du="preferences",Fr={timeOfDay:!1,seasonal:!1},p0=900*1e3,xt={...Fr};function jt(e,t,i){return e+(t-e)*Math.min(1,Math.max(0,i))}var fe={_timer:null,_baseHues:null,_timeOverride:null,_monthOverride:null,async init(){let e=await x.get(Lu,Du);xt=e?{...Fr,...e}:{...Fr},(xt.timeOfDay||xt.seasonal)&&(this._captureBaseHues(),this._update(),this._startLoop()),window.addEventListener("vb:theme-change",()=>{this._hasActiveSource()&&requestAnimationFrame(()=>{this._captureBaseHues(),this._update()})})},load(){return{...xt}},save(e){return xt={...xt,...e},x.set(Lu,Du,xt).catch(()=>{}),{...xt}},setTimeOverride(e){this._timeOverride=e,this._hasActiveSource()&&this._update()},setMonthOverride(e){this._monthOverride=e,this._hasActiveSource()&&this._update()},setSource(e,t){let i=this.save({[e]:t});t?(this._captureBaseHues(),this._update(),this._startLoop()):this._hasActiveSource(i)?this._update():(this._clearModifiers(),this._stopLoop())},_hasActiveSource(e){let t=e||this.load();return t.timeOfDay||t.seasonal},_captureBaseHues(){let e=document.documentElement;e.style.removeProperty("--hue-primary"),e.style.removeProperty("--hue-secondary"),e.style.removeProperty("--hue-accent");let t=e.getAttribute("data-theme");if(t){let i=`[data-theme~="${t}"]`;for(let s of document.styleSheets)try{for(let n=0;n<s.cssRules.length;n++){let r=s.cssRules[n];if(r.selectorText?.includes(i)&&!r.selectorText.includes("dark")){let a=r.style?.getPropertyValue("--hue-primary");if(a){this._baseHues={primary:parseFloat(a)||260,secondary:parseFloat(r.style.getPropertyValue("--hue-secondary"))||200,accent:parseFloat(r.style.getPropertyValue("--hue-accent"))||30};return}}}}catch{}}this._baseHues={primary:260,secondary:200,accent:30}},_update(){let e=this.load(),t=0;e.timeOfDay&&(t+=this._getTimeOfDayOffset()),e.seasonal&&(t+=this._getSeasonalOffset());let i=document.documentElement;t!==0&&this._baseHues?(i.style.setProperty("--hue-primary",String(this._baseHues.primary+t)),i.style.setProperty("--hue-secondary",String(this._baseHues.secondary+t)),i.style.setProperty("--hue-accent",String(this._baseHues.accent+t*.5))):t===0&&this._clearModifiers()},_clearModifiers(){let e=document.documentElement;e.style.removeProperty("--hue-primary"),e.style.removeProperty("--hue-secondary"),e.style.removeProperty("--hue-accent")},_getTimeOfDayOffset(){let e=this._timeOverride??new Date().getHours()+new Date().getMinutes()/60;return e<5?-20:e<7?jt(-20,20,(e-5)/2):e<10?jt(20,5,(e-7)/3):e<14?jt(5,0,(e-10)/4):e<17?jt(0,-5,(e-14)/3):e<19?jt(-5,15,(e-17)/2):e<21?jt(15,-10,(e-19)/2):jt(-10,-20,(e-21)/8)},_getHemisphere(){return window.__VB_ENV_LOCATION?.hemisphere||"north"},_getSeasonalOffset(){let e=this._monthOverride??new Date().getMonth(),i=this._getHemisphere()==="south"?(e+6)%12:e;return i>=2&&i<=4?5:i>=5&&i<=7?10:i>=8&&i<=10?-5:-10},_startLoop(){this._timer||(this._timer=setInterval(()=>this._update(),p0))},_stopLoop(){this._timer&&clearInterval(this._timer),this._timer=null}};var ns=null;function Mu(){return"0.7.1-e131c0b54"}function m0(){let e=document.querySelectorAll('script[src*="vanilla-breeze"]'),t="/cdn/sw.js";for(let i of e){let s=i.getAttribute("src");if(s){let n=s.lastIndexOf("/");if(n!==-1){t=s.slice(0,n)+"/sw.js";break}}}return t}function _u(){return ns||(ns=navigator.serviceWorker?.ready??Promise.reject(new Error("SW not supported"))),ns}function $u(e){return new Promise((t,i)=>{navigator.serviceWorker?.controller?Nu(navigator.serviceWorker.controller,e,t,i):_u().then(s=>{let n=s.active||s.waiting||s.installing;n?Nu(n,e,t,i):i(new Error("No active service worker"))}).catch(i)})}function Nu(e,t,i,s){let n=new MessageChannel;n.port1.onmessage=r=>i(r.data),n.port1.onmessageerror=()=>s(new Error("Message error")),e.postMessage({type:t},[n.port2]),setTimeout(()=>s(new Error("SW message timeout")),5e3)}async function Iu(){return $u("GET_STATUS")}async function Bu(){return $u("CLEAR_CACHE")}async function Ru(){let e=await _u();return await e.update(),{updated:!!e.waiting}}function g0(){return typeof window>"u"||!("serviceWorker"in navigator)?!1:window.__VB_SERVICE_WORKER?!0:document.querySelector('meta[name="vb-service-worker"]')?.content==="true"}if(g0()){let e=m0();window.addEventListener("load",()=>{ns=navigator.serviceWorker.register(e).catch(t=>{console.warn("[VB] Service worker registration failed:",t)})})}ct();ar();var pe=null,st="settings",os={motionFx:!0,sounds:!1,charShortcuts:!0},jr=()=>({...os,charShortcuts:Pt()}),A0=document.documentElement.hasAttribute("data-sticky"),Hr=null,E0={trigger:"Site settings",dialog:"Site settings",title:"Settings",close:"Close settings",appearance:"Appearance","color-mode":"Color mode","mode-auto":"Auto","mode-light":"Light","mode-dark":"Dark",theme:"Theme",accessibility:"Accessibility","high-contrast":"High Contrast","large-text":"Large Text",dyslexia:"Dyslexia-Friendly","char-shortcuts":"Single-Key Shortcuts",layout:"Layout",fluid:"Fluid Scaling",density:"Density","density-compact":"Compact","density-default":"Default","density-spacious":"Spacious",backdrop:"Canvas Backdrop","backdrop-style":"Style","backdrop-default":"Default","backdrop-flush":"Flush","backdrop-elevated":"Elevated",chrome:"Chrome","chrome-card":"Card","chrome-stretch":"Stretch","chrome-integrated":"Integrated","fixed-header":"Fixed Header","page-bg":"Page Background","page-bg-default":"Theme Default","page-bg-color":"Solid Color","page-bg-gradient":"Gradient","bg-color":"Color","grad-start":"Start","grad-end":"End","grad-direction":"Direction","dir-to-bottom":"Top \u2192 Bottom","dir-to-right":"Left \u2192 Right","dir-135deg":"Diagonal \u2198","dir-45deg":"Diagonal \u2197",sticky:"Sticky Navigation",effects:"Effects",motion:"Motion Effects",sounds:"Sound Effects",environment:"Environment","time-of-day":"Time-of-Day Shifts",seasonal:"Seasonal Tinting",system:"System","sw-label":"Service Worker:","sw-checking":"checking\u2026","sw-unsupported":"Not supported","sw-active":"Active ({n} cached files)","sw-unregistered":"Not registered","clear-cache":"Clear Cache",clearing:"Clearing\u2026",cleared:"Cache cleared","check-update":"Check for Updates",checking:"Checking\u2026","update-available":"Update available","up-to-date":"Up to date",failed:"Failed",reset:"Reset to Defaults","reset-confirm":"Reset all settings to defaults?","reset-yes":"Reset","reset-cancel":"Cancel","reset-done":"Settings reset to defaults"},k0='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>';function Tt(e){return String(e).replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")}async function zr(e){let t=document.documentElement;e?t.dataset.sticky="":delete t.dataset.sticky;try{let i=await Promise.resolve().then(()=>(qu(),Ou));e?i.initStickyManager():i.destroyStickyManager()}catch{}}var Vr=class extends k{#t=null;#e=null;#i=!1;#n=!1;#s=0;#o="";#r=new Set;#a=[];#l=[];#c={...os,charShortcuts:Pt()};#g=document.documentElement.hasAttribute("data-sticky");setup(){let t=++this.#s;return this.#o||=crypto.randomUUID().slice(0,8),this.#L(),this.#D(),this.#U(),this.listen(window,"vb:theme-change",this.#z),this.listen(window,"vb:extensions-change",this.#z),this.listen(window,"vb:a11y-themes-change",this.#z),this.#n&&(this.#n=!1,this.open()),this.#y().then(()=>{this.#f(t)&&this.#U()}),!0}teardown(){this.#s++;for(let i of this.#a)clearTimeout(i);this.#a=[],this.#i=!1,this.removeAttribute("open"),this.#t?.setAttribute("aria-expanded","false");let t=!!this.#e?.contains(document.activeElement);this.#e?.remove(),t&&this.#t?.isConnected&&this.#t.focus(),this.#e=null}#f(t){return t===this.#s&&this.isConnected}#u(t,i={}){let s=this.getAttribute(`data-label-${t}`)??E0[t]??t;for(let[n,r]of Object.entries(i))s=s.replaceAll(`{${n}}`,String(r));return s}#p(t){return Tt(this.#u(t))}get data(){return{a11yThemes:[...this.#l],extensions:{...this.#c},sticky:this.#g}}set data(t){if(!t||typeof t!="object")return;let i=[],s=[];Array.isArray(t.a11yThemes)&&(this.#l=t.a11yThemes.map(String),s.push("a11y"),i.push(x.set(st,"a11y",this.#l)),this.#F(),window.dispatchEvent(new CustomEvent("vb:a11y-themes-change",{detail:[...this.#l]}))),t.extensions&&typeof t.extensions=="object"&&(this.#c={...jr(),...t.extensions},s.push("extensions"),i.push(x.set(st,"extensions",this.#c)),this.#tt()),t.sticky!=null&&(this.#g=!!t.sticky,s.push("sticky"),i.push(x.set(st,"sticky",this.#g?"on":"off")),zr(this.#g));for(let n of s)this.#r.add(n);this.#e&&this.#U(),Promise.allSettled(i).then(()=>{for(let n of s)this.#r.delete(n);this.#e&&this.#U(),this.dispatchEvent(new CustomEvent("settings-panel:data-changed",{detail:{data:this.data,source:"property"},bubbles:!0}))})}async#y(){let[t,i,s]=await Promise.all([x.get(st,"a11y"),x.get(st,"extensions"),x.get(st,"sticky")]);Hr===null&&(Hr=A0&&s!=="on"),this.#r.has("a11y")||(this.#l=Array.isArray(t)?t:[]),this.#r.has("extensions")||(this.#c={...jr(),...i??{}}),this.#r.has("sticky")||(this.#g=document.documentElement.hasAttribute("data-sticky"))}#d(t){return t!==""&&t!==void 0}#m(t){return t==="compact"?"compact":t==="spacious"?"spacious":"default"}#h(t,i){return t?i==="compact"?"compact":i==="spacious"?"spacious":"default":""}#E(t){return t!==""&&t!==void 0}#v(t){return t==="flush"?"flush":t==="elevated"?"elevated":"default"}#S(t,i){return t?i==="flush"?"flush":i==="elevated"?"elevated":"default":""}#b(t){if(!t)return"card";let i=t.split(/\s+/);for(let s of i)if(s==="stretch"||s==="integrated")return s;return"card"}#k(t){return t?t.split(/\s+/).includes("fixed"):!1}#w(t,i){let s=[];return t&&t!=="card"&&s.push(t),i&&s.push("fixed"),s.join(" ")||"card"}#A(t){return this.#e?.querySelector(t)??null}#L(){this.#t=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button"),this.#t||(this.#t=document.createElement("button"),this.#t.setAttribute("type","button"),this.#t.setAttribute("data-trigger",""),this.#t.setAttribute("data-minted",""),this.#t.className="settings-trigger",this.#t.innerHTML=k0,this.prepend(this.#t)),this.#t.hasAttribute("data-minted")&&this.#t.setAttribute("aria-label",this.#u("trigger")),this.#t.setAttribute("aria-haspopup","dialog"),this.#t.setAttribute("aria-expanded","false"),this.#e=document.createElement("div"),this.#e.className="settings-panel",this.#e.setAttribute("role","dialog"),this.#e.setAttribute("aria-label",this.#u("dialog")),this.#e.tabIndex=-1;let t=`settings-panel-${this.#o}`;this.#e.id=t,this.#t.setAttribute("aria-controls",t),this.#e.innerHTML=this.#x(),this.appendChild(this.#e)}#x(){let{mode:t,brand:i,fluid:s,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:l,pageBgGradDir:u}=I.getState(),d=[...this.#l],h={...this.#c},f=fe.load(),p=this.#d(s),m=this.#m(s),g=this.#E(n),b=this.#v(n),A=this.#o,w=S=>this.#p(S),_=(S,L,F,Be,ot,te={})=>`
346
346
  <fieldset data-segmented>
347
347
  <legend class="visually-hidden">${L}</legend>
348
348
  ${F.map(mt=>`