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
@@ -284,7 +284,7 @@ svg {
284
284
  <span class="description" part="description"><slot name="description" data-slot="description"></slot></span>
285
285
  <span class="icon" part="icon"><slot name="icon" data-slot="icon"></slot></span>
286
286
  </div>
287
- `,wn=class extends E{static get observedAttributes(){return["trend","loading"]}setup(){if(this.shadowRoot)for(let t of zc){let i=this.shadowRoot.querySelector(`slot[name="${t}"]`);this.#t(t,i)}else{let t=this.attachShadow({mode:"open"});t.innerHTML=ng;for(let i of zc){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 sg)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)}};w("score-card",wn);var rg=0;function xi(e,t){return e.matches("content-swap")?t:`data-${t}`}function Ei(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-${++rg}`);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(),Tt(e,l.detail===0?"keyboard":"pointer")}),r(e,"click",l=>{let d=l.target.closest?.(og);d&&d!==e&&e.contains(d)||Tt(e,"pointer")})}else c&&!c.hasAttribute("data-swap")&&c.remove(),c=null,a.forEach(l=>{let u=l.matches(ag);r(l,"click",d=>{d.stopPropagation();let h=u&&d.detail===0;Tt(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(),Tt(e,"keyboard"))}))});if(e.matches('[data-gesture="flick"], [data-gesture="swipe"]')&&(r(e,"swipe-left",()=>Tt(e,"pointer")),r(e,"swipe-right",()=>Tt(e,"pointer"))),!s){let l=new MutationObserver(()=>Si(e,t,i));l.observe(e,{attributes:!0,attributeFilter:["data-swapped"]}),n.push(()=>l.disconnect())}return Si(e,t,i),cg([t,i]),()=>{for(let l of n)l();n.length=0}}var ag='button, a[href], summary, input:is([type="button"], [type="submit"], [type="reset"])',og='a[href], button, input, select, textarea, label, summary, [contenteditable=""], [contenteditable="true"], [tabindex]';function cg(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 Si(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 jc(e){return{front:e.querySelector(':scope > [data-face="front"]'),back:e.querySelector(':scope > [data-face="back"]')}}function Ce(e,t,i="api"){let{front:s,back:n}=jc(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),Si(e,s,n),lg(e,i);let u=t?n:s,d=t?s:n,h=u.querySelector("[autofocus]");h?h.focus():i==="keyboard"&&d.contains(a)&&ug(u)},c=u=>{let d=e;typeof d.setState=="function"&&d.setState("transition-running",u)};c(!0);let l=nt(o);l&&l.finished&&typeof l.finished.finally=="function"?l.finished.finally(()=>c(!1)):c(!1)}function Tt(e,t="api"){Ce(e,!e.hasAttribute(xi(e,"swapped")),t)}function lg(e,t="internal"){e.dispatchEvent(new CustomEvent("content-swap:swap",{detail:{swapped:e.hasAttribute(xi(e,"swapped")),source:t},bubbles:!0}))}function ug(e){let t=e.querySelector("[data-swap], button, a, input, select, textarea");t&&t.focus()}var An=class extends E{static observedAttributes=["swapped"];#t=null;attributeChangedCallback(){if(!this.isConnected)return;let{front:t,back:i}=jc(this);t&&i&&Si(this,t,i)}setup(){this.#t=Ei(this)??null}teardown(){this.#t?.(),this.#t=null}flip(){Ce(this,!0)}unflip(){Ce(this,!1)}toggle(){Tt(this)}get flipped(){return this.hasAttribute("swapped")}set flipped(t){Ce(this,!!t)}get swapped(){return this.hasAttribute("swapped")}set swapped(t){Ce(this,!!t)}};w("content-swap",An);function Uc(){document.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(e=>{e.querySelector(":scope > [data-face]")&&Ei(e)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Uc):Uc();var Wc=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]")&&Ei(s),s.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(n=>{n.querySelector(":scope > [data-face]")&&Ei(n)})}});document.body?Wc.observe(document.body,{childList:!0,subtree:!0}):document.addEventListener("DOMContentLoaded",()=>{Wc.observe(document.body,{childList:!0,subtree:!0})});var En=class extends E{#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.#b(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=ki(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=ki(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=ki(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=ki(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")}}#b(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=dg(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 ki(e){let t=e.replace(/\/+$/,"");return t===""?"/":t}function dg(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}w("nav-bar",En);var fg=0,Cn=class extends E{#t;#e=[];#i;#n;#s;#o;#r;#a;#l=null;#c=0;#b=0;#f=!1;#u=!1;#p=!1;#v=null;#d=!1;#m=!1;#h=!1;#E=!1;#y=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.#y.add(a)),this.#t.appendChild(a)}),this.#e=[...this.#t.children],this.hasAttribute("autoplay")&&!this.#u&&this.#g(),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.#V),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=++fg,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(()=>(kn(),xn)).then(({addSwipeListener:o})=>{!this.isConnected||this.#t!==a||(this.#v=o(a,{threshold:40}),this.listen(a,"swipe-left",()=>this.#k()?this.prev():this.next()),this.listen(a,"swipe-right",()=>this.#k()?this.next():this.prev()))})}this.#p||(this.#a=new IntersectionObserver(this.#O,{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.#_()}));let r=this.#$()??(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.#N(a)}else r>0&&r<this.#e.length&&this.goTo(r,!1);return this.#P(),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.#v&&(this.#v(),this.#v=null),this.#t?.parentElement===this&&[...this.#t.children].forEach(t=>this.appendChild(t)),this.#e.forEach(t=>{this.#y.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.#b=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,nt(()=>{this.#x(t)}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}else this.#x(t);else{let s=this.#e[t].getBoundingClientRect(),n=this.#t.getBoundingClientRect(),r=this.#k()?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.#N(t)}}#x(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.#g(),this.insertBefore(this.#i,this.firstChild)),this.#w())}pause(){this.#m=!0,this.#d=!1,this.#w()}#g(){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.#S()}#S(){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.#S()}#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})))}#k(){return getComputedStyle(this).direction==="rtl"}reset(){let t=Number(this.getAttribute("start"))||0;this.goTo(t,!1),this.#M()}#N(t){this.#c=t,this.#P(),this.#K(),this.#r&&(this.#r.textContent=`Slide ${t+1} of ${this.#e.length}`),!this.#f&&(this.#_(),!this.#p&&"onscrollend"in window&&(this.#f=!0))}#_(){this.#c!==this.#b&&(this.#b=this.#c,this.dispatchEvent(new CustomEvent("carousel-wc:change",{detail:{index:this.#c,slide:this.#e[this.#c]},bubbles:!0})))}#P(){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"))}}#O=t=>{for(let i of t)if(i.isIntersecting){let s=this.#e.indexOf(i.target);s!==-1&&s!==this.#c&&this.#N(s)}};#V=t=>{let i=(t.key==="ArrowLeft"||t.key==="ArrowRight")&&this.#k();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}};#$(){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}}#K(){let t=this.getAttribute("persist");if(t)try{localStorage.setItem(`carousel:${t}`,String(this.#c))}catch{}}#M(){let t=this.getAttribute("persist");if(t)try{localStorage.removeItem(`carousel:${t}`)}catch{}}};w("carousel-wc",Cn);var pg=0,Tn=class extends E{static formAssociated=!0;#t;#e;#i;#n;#s=[];#o=[];#r=-1;#a=!1;#l="";#c="";#b;#f=!1;#u;#p;#v=[];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${++pg}`;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.#M(c,!1),this.#b===void 0&&(this.#b=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.#k),this.listen(this.#i,"click",this.#N),this.listen(this.#i,"pointerdown",this.#_),this.listen(document,"click",this.#P),this.listen(this.#n,"pop-over:hide",this.#et),this.listen(this,"invalid",this.#m),this.#I(),this.#C(),this.#B(),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.#B();let i=this.#g(),s=this.#d&&i>0&&this.#v.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]}#y(t,i){if(this.#v.some(o=>o.value===t))return;let s=this.#g();if(s&&this.#v.length>=s)return;this.#v.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.#x(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.#S(`${i} added`),this.#e.value="",this.#O(""),this.#I(),this.#C(),this.#q(),s&&this.#v.length>=s&&(this.#e.disabled=!0,this.#B())}#x(t){let i=this.#v.findIndex(o=>o.value===t);if(i===-1)return;let s=this.#v.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.#S(`${s.label} removed`),this.#g()&&this.#e.disabled&&(this.#e.disabled=this.#f),this.#O(this.#e.value.trim()),this.#I(),this.#C(),this.#q(),this.#e.focus()}#g(){let t=this.getAttribute("max");return t?parseInt(t,10):0}#S(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.#I(),this.#C()}this.#O(t),this.#T()};#A=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.#a||this.#T(),this.#V(this.#r+1);break;case"ArrowUp":t.preventDefault(),this.#a||this.#T(),this.#V(this.#r-1);break;case"Home":this.#a&&(t.preventDefault(),this.#V(0));break;case"End":this.#a&&(t.preventDefault(),this.#V(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.#y(i.getAttribute("data-value"),i.textContent.trim()):this.#K(i)}else if(this.#d&&this.hasAttribute("custom")&&this.#e.value.trim()){t.preventDefault();let i=this.#e.value.trim();this.#y(i,i)}break;case"Backspace":if(this.#d&&!this.#e.value&&this.#v.length>0){let i=this.#v[this.#v.length-1];this.#x(i.value)}break;case",":if(this.#d&&this.hasAttribute("custom")&&this.#e.value.trim()){t.preventDefault();let i=this.#e.value.trim();this.#y(i,i)}break;case"Escape":this.#a&&(t.preventDefault(),t.stopPropagation(),this.#B(),this.#e.focus());break;case"Tab":this.#a&&this.#B();break}};#L=()=>{this.#d?(this.#O(this.#e.value.trim()),this.#T()):(this.#e.value||!this.#l)&&(this.#O(this.#e.value.trim()),this.#T())};#k=()=>{this.#a||(this.#O(this.#e.value.trim()),this.#T())};#N=t=>{let i=t.target.closest("li[data-value]");i&&this.#o.includes(i)&&(this.#d?this.#y(i.getAttribute("data-value"),i.textContent.trim()):this.#K(i))};#_=t=>{t.preventDefault()};#P=t=>{this.#a&&!this.contains(t.target)&&this.#B()};#O(t){let i=this.getAttribute("filter")||"contains",s=t.toLowerCase(),n=this.#d?new Set(this.#v.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.#$(),this.setState("no-matches",this.#o.length===0)}#V(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)}#$(){this.#s.forEach(t=>t.removeAttribute("data-active")),this.#e.removeAttribute("aria-activedescendant")}#K(t,i="internal"){let s=t.getAttribute("data-value")||"",n=t.textContent.trim();if(this.#l===s){this.#e.value=n,this.#B(),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.#I(),this.#C(),this.#B(),this.#e.focus(),this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{value:s,label:n,source:i}}))}#M(t,i=!0,s="api"){let n=this.#s.find(r=>r.getAttribute("data-value")===t);n&&(i?this.#K(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})))}#B(){this.#a&&(this.#a=!1,this.removeAttribute("open"),this.#e.setAttribute("aria-expanded","false"),this.#r=-1,this.#$(),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.#$(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))};#I(){if(this.#d)if(this.#v.length>0){let t=new FormData,i=this.getAttribute("name")||"";for(let s of this.#v)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.#v.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")}#q(){this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{values:this.#v.map(t=>t.value),labels:this.#v.map(t=>t.label),source:"internal"}}))}formResetCallback(){this.#d?(this.#u.querySelectorAll(".tag").forEach(t=>t.remove()),this.#v=[],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.#$(),this.#B(),this.#e.removeAttribute("aria-invalid"),!this.#d&&this.#b&&this.#M(this.#b,!1),this.#I(),this.#C()}formStateRestoreCallback(t){t&&(this.#d||(this.#M(t,!1),this.#I(),this.#C()))}get value(){return this.#l}set value(t){t?this.#M(t):this.#G()}#G(){this.#s.forEach(t=>t.setAttribute("aria-selected","false")),this.#l="",this.#c="",this.#e&&(this.#e.value=""),this.removeAttribute("value"),this.#I(),this.#C()}get label(){return this.#c}get values(){return this.#v.map(t=>t.value)}get labels(){return this.#v.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.#M(n,!1),this.#I(),this.#C()):this.#G())}};w("combo-box",Tn);var Ti=86400,mg=0;function Kt(e){return String(e).padStart(2,"0")}function Lt(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 Qc(e,t){let i=Math.floor(e/3600),s=Math.floor(e%3600/60),n=e%60;return t?`${Kt(i)}:${Kt(s)}:${Kt(n)}`:`${Kt(i)}:${Kt(s)}`}function dt(e,t){return(e%t+t)%t}function bg(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 gg(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 vg(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 Ln=class extends E{static formAssociated=!0;static get observedAttributes(){return["disabled","required"]}#t;#e=`tp${++mg}`;#i=!1;#n;#s;#o;#r;#a;#l=[];#c=null;#b=[];#f="24h";#u="";#p={am:"AM",pm:"PM",periodFirst:!1};#v=!1;#d=null;#m=null;#h=null;#E=60;#y;#x;#g=!1;#S="";#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=gg(this.#u);let i=this.getAttribute("data-format");this.#f=i==="12h"||i==="24h"?i:bg(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.#y===void 0&&(this.#y=t.defaultValue),this.#x!==void 0&&(t.value=this.#x,this.#x=void 0),this.#d=Lt(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.#_),this.listen(t,"focus",this.#N),this.#O(),this.#V(),this.#i=!0,this.#P(),this.#st(),this.#R(!1),this.#nt(),this.listen(document,"click",this.#B),this.listen(this,"focusout",this.#et),this.listen(this,"invalid",this.#Z),this.#A(this.matches(":disabled")),!0}teardown(){this.#g=!1,this.#o?.remove(),this.#a?.remove(),this.#l=[],this.#b=[],this.#c=null,this.#i=!1,clearTimeout(this.#Q),this.#H=""}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=Lt(this.#n.getAttribute("min")),this.#h=Lt(this.#n.getAttribute("max"));let i=Lt(this.#n.value);this.#v=this.#E!==null&&this.#E%60!==0||i!==null&&i%60!==0}#k(t,i){return this.dataset[`label${t}`]||i}#N=()=>{this.#i&&!this.#s.disabled&&this.#s.focus()};#_=t=>{t.preventDefault(),this.#N()};#P(){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.#N);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.#k("Input","Time"));let r=this.#n.getAttribute("aria-describedby");r&&s.setAttribute("aria-describedby",r)}#O(){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.#k("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.#k("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.#g?this.#T():this.#M(),this.#s.focus()}),this.listen(t,"focus",()=>t.select()),this.listen(t,"keydown",this.#C),this.listen(t,"blur",this.#G)}#V(){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.#k("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.#$("hour",this.#k("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.#K()),this.#l.push(this.#$("minute",this.#k("Minutes","Minutes"),0,59,n,a)),this.#v&&(this.#a.appendChild(this.#K()),this.#l.push(this.#$("second",this.#k("Seconds","Seconds"),0,59,r,!1))),c&&!this.#p.periodFirst&&this.#a.appendChild(c),this.#b=[...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.#U(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(d,u))}}#$(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}}#K(){let t=document.createElement("span");return t.className="time-sep",t.setAttribute("aria-hidden","true"),t.textContent=":",t}#M(){this.#g||this.#s.disabled||(this.#g=!0,this.#a.setAttribute("data-open",""),this.#s.setAttribute("aria-expanded","true"))}#T(){this.#g&&(this.#g=!1,this.#a.removeAttribute("data-open"),this.#s.setAttribute("aria-expanded","false"))}#B=t=>{this.#g&&!this.contains(t.target)&&this.#T()};#et=t=>{let i=t.relatedTarget;i instanceof Node&&this.contains(i)||this.#T()};#I(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.#v&&(s.second="2-digit"),new Intl.DateTimeFormat(this.#u,s).format(i)}catch{return Qc(t,this.#v)}}#C=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation(),this.#q(),this.#g&&this.#T();return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#g||this.#M(),this.#b[0]?.focus();return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#g&&this.#T(),this.#st();return}};#q(){let t=this.#s.value.trim();if(!t)this.#j(null,"keyboard");else{let i=vg(t,this.#p);i!==null&&this.#j(i,"keyboard")}this.#st()}#G=t=>{t.relatedTarget instanceof Node&&this.contains(t.relatedTarget)||(this.#q(),this.#Z())};#Z=()=>{this.#i&&(this.#w||(this.#w=!0,this.#nt()),this.#n.dispatchEvent(new Event("blur",{bubbles:!0})))};#D(t,i){let s=this.#b.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.#b[s+(t.key===r?1:-1)]?.focus(),!0):t.key==="Escape"?(t.preventDefault(),t.stopPropagation(),this.#T(),this.#s.focus(),!0):!1}#U(t,i){if(this.#D(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.#W(i,i.min,1,"keyboard");break;case"End":t.preventDefault(),this.#W(i,i.max,-1,"keyboard");break;default:/^\d$/.test(t.key)&&(t.preventDefault(),this.#Y(t.key,i))}}#H="";#Q;#Y(t,i){clearTimeout(this.#Q),this.#H+=t;let s=()=>{let n=Math.min(Math.max(Number(this.#H),i.min),i.max);this.#H="",this.#W(i,n,0,"keyboard")};this.#H.length>=2||Number(this.#H)*10>i.max?s():this.#Q=setTimeout(s,800)}#F(){return this.#it(this.#m??0,1)}#it(t,i){let s=dt(t,Ti),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=dt(o+l*n,Ti)}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.#j(this.#F(),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"?dt(r%12+i,12)+(r>=12?12:0):dt(r+i,24))*3600+a*60+o:t.unit==="minute"?c=r*3600+dt(a+i,60)*60+o:c=r*3600+a*60+dt(o+i,60),this.#j(this.#it(c,i),s)}#W(t,i,s,n){if(t.readOnly)return;let r=this.#d??this.#F(),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.#j(this.#it(l,s),n)}#X(t){let i=this.#d??this.#F();this.#j(this.#it(dt(i+12*3600,Ti),0),t)}#j(t,i){let s=this.value;return this.#d=t,t!==null&&t%60!==0&&!this.#v&&(this.#v=!0),this.#st(),this.value===s?!1:(this.#R(),this.#nt(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{...this.#J(),source:i}})),!0)}#J(){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.#I(t);let i=this.#k("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?"--":Kt(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.#k("Period","AM/PM")}: ${r||i}`))}#R(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.#k(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.#I(s)});else if(!l&&d)r={rangeOverflow:!0},a=this.#tt("rangeOverflow","RangeOverflow","Choose a time at or before {time}",{time:this.#I(n)});else if(this.#E&&dt(i-(s??0),this.#E)!==0){let h=this.#it(i,1),f=dt(h+this.#E,Ti);r={stepMismatch:!0},a=this.#tt("stepMismatch","StepMismatch","Choose a valid time. The nearest are {lower} and {upper}",{lower:this.#I(h),upper:this.#I(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.#S||!this.#n.validity.customError)&&(this.#n.setCustomValidity(a),this.#S=a),o!==a}#rt(t){this.#d=t,this.#st(),this.#R(),this.#nt()}formResetCallback(){this.#i&&(this.#w=!1,this.#rt(Lt(this.#y)))}formStateRestoreCallback(t){!this.#i||typeof t!="string"||this.#rt(Lt(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?"":Qc(this.#d,this.#v):this.#x??""}set value(t){let i=t==null?"":String(t).trim(),s=i?Lt(i):null;if(!(i&&s===null)){if(!this.#i){this.#x=i;return}this.#j(s,"api")}}};w("time-picker",Ln);var Li="popover"in HTMLElement.prototype;var Yt=[{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]}],yg=new RegExp(`^(?:(${Yt.map(e=>e.ja).join("|")})|(${Yt.map(e=>e.latin).join("|")}))`+String.raw`\s*(元|\d{1,2})年?[/.\-]?\s*(\d{1,2})月?[/.\-]?\s*(\d{1,2})日?$`,"i"),wg=/^(\d{4})年(\d{1,2})月(\d{1,2})日?$/;function tl(e){return e.trim().replace(/[0-9]/g,t=>String(t.charCodeAt(0)-65296)).replace(/\s+/g,"")}function el(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 il(e){let t=tl(e).match(yg);if(!t)return null;let i=t[1]?Yt.find(a=>a.ja===t[1]):Yt.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=el(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=Yt.indexOf(i);if(r>0){let a=Yt[r-1].start;if(n>=new Date(a[0],a[1]-1,a[2]))return null}return n}function sl(e){let t=tl(e).match(wg);return t?el(Number(t[1]),Number(t[2]),Number(t[3])):null}Z();var On=["january","february","march","april","may","june","july","august","september","october","november","december"],Sg=0;function Q(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 Pn(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 rt(e){if(!e)return null;let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(String(e).trim());return t?Pn(Number(t[1]),Number(t[2])-1,Number(t[3])):null}function Te(e,t){return new Date(e,t+1,0).getDate()}function Mn(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(),Te(s,n)))}function xg(e){try{let t=new Intl.Locale(e),i=t.getWeekInfo?.()??t.weekInfo;if(i)return i.firstDay%7}catch{}return 0}var _n=new Map;function nl(e,t){let i=`${e}:${t}`;if(_n.has(i))return _n.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 _n.set(i,s),s}function rl(e,t){try{return new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"numeric"}).format(e)}catch{return Q(e)}}function Dn(e,t){return!!(e&&t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate())}var In=new Map;function kg(e){if(In.has(e))return In.get(e);let t=new Map;On.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 In.set(e,t),t}function $n(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=rt(i.replace(/\//g,"-"));return o?{date:o,partial:null}:s}if(Ni(t)==="ja"){let o=il(i);if(o)return{date:o,partial:null}}let n=sl(i);if(n)return{date:n,partial:null};let r=kg(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=Pn(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=Pn(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 al(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 Rn=class extends E{static formAssociated=!0;static get observedAttributes(){return["disabled","required"]}#t;#e=`dp${++Sg}`;#i=!1;#n;#s;#o;#r;#a;#l;#c;#b;#f=!1;#u=!1;#p="en-US";#v=null;#d=null;#m=new Date().getFullYear();#h=new Date().getMonth();#E=null;#y=null;#x=new Map;#g=new Map;#S;#w;#A=0;#L="";#k=!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=ft(this.closest("[lang]")?.lang||navigator.language),this.#A=xg(this.#p),this.#E=rt(t.getAttribute("min")),this.#y=rt(t.getAttribute("max")),this.#x=al(this.getAttribute("data-disabled-dates")),this.#g=al(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.#S===void 0&&(this.#S=t.defaultValue),this.#w!==void 0&&(t.value=this.#w,this.#w=void 0),this.#v=rt(t.value);let r=new Date;return this.#y&&r>this.#y&&(r=this.#y),this.#E&&r<this.#E&&(r=this.#E),this.#d=this.#v||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.#O),this.listen(t,"focus",this.#P),this.#$(),this.#K(),this.#i=!0,this.#V(),this.#Z(),this.#J(!1),this.#R(),this.#u=Li,this.#u&&this.#a.setAttribute("popover","manual"),this.listen(document,"click",this.#W),this.listen(this,"invalid",this.#z),this.#N(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.#x=new Map,this.#g=new Map,this.#i=!1}attributeChangedCallback(t){this.#i&&(t==="disabled"&&this.#N(this.matches(":disabled")),t==="required"&&this.#R())}formDisabledCallback(t){this.#i&&this.#N(t)}#N(t){this.#s.disabled=t,this.#o.disabled=t,t&&this.#U()}#_(t,i){return this.dataset[`label${t}`]||i}#P=()=>{this.#i&&!this.#s.disabled&&this.#s.focus()};#O=t=>{t.preventDefault(),this.#P()};#V(){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.#P);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.#_("Input","Date"));let r=this.#n.getAttribute("aria-describedby");r&&s.setAttribute("aria-describedby",r)}#$(){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.#_("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.#_("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.#U():this.#D(),this.#s.focus()}),this.listen(this.#s,"focus",()=>this.#s.select()),this.listen(this.#s,"input",this.#Y),this.listen(this.#s,"keydown",this.#F),this.listen(this.#s,"blur",this.#it)}#K(){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.#_("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.#_("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.#b=document.createElement("select"),this.#b.className="calendar-year",this.#b.setAttribute("aria-label",this.#_("Year","Year")),this.#et(),r.appendChild(this.#c),r.appendChild(this.#b);let a=document.createElement("button");a.type="button",a.className="calendar-nav",a.setAttribute("aria-label",this.#_("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=nl(this.#p,"short"),u=nl(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.#M(),this.listen(s,"click",()=>this.#I(-1)),this.listen(a,"click",()=>this.#I(1)),this.listen(this.#b,"change",()=>{this.#m=Number(this.#b.value);let f=Te(this.#m,this.#h),p=Math.min(this.#d?.getDate()??1,f);this.#d=new Date(this.#m,this.#h,p),this.#M()}),this.listen(this.#l,"click",this.#X),this.listen(this.#a,"keydown",this.#j)}#M(){let t;try{t=new Intl.DateTimeFormat(this.#p,{month:"long"}).format(new Date(this.#m,this.#h,1))}catch{t=On[this.#h].charAt(0).toUpperCase()+On[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.#b.querySelector(`option[value="${this.#m}"]`)||this.#et(),this.#b.value=String(this.#m),this.#l.replaceChildren();let s=Te(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=Q(u),h=document.createElement("td"),f=document.createElement("button");f.type="button",f.setAttribute("data-date",d),f.textContent=String(l),Dn(u,a)&&f.setAttribute("aria-current","date");let p=Dn(u,this.#v);h.setAttribute("aria-selected",String(p));let m=this.#B(u,d);m.disabled&&(f.setAttribute("aria-disabled","true"),m.reason&&f.setAttribute("data-disabled-reason",m.reason)),this.#g.has(d)&&f.setAttribute("data-highlight",this.#g.get(d)||""),Dn(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.#B(t,Q(t)).disabled}#B(t,i){return this.#x.has(i)?{disabled:!0,reason:this.#x.get(i)}:this.#E&&t<this.#E?{disabled:!0,reason:null}:this.#y&&t>this.#y?{disabled:!0,reason:null}:{disabled:!1,reason:null}}#et(){this.#b.replaceChildren();let t=new Date().getFullYear(),i=this.#E?this.#E.getFullYear():t-100,s=this.#y?this.#y.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.#b.appendChild(r)}}#I(t){let i=this.#d??new Date(this.#m,this.#h,1),s=new Date(this.#m,this.#h,Math.min(i.getDate(),Te(this.#m,this.#h)));this.#d=Mn(s,t),this.#m=this.#d.getFullYear(),this.#h=this.#d.getMonth(),this.#M();let n=document.activeElement;n?.matches(".calendar-nav:focus-visible")&&this.#a.contains(n)||this.#G(this.#d)}#C(t,i){if(t&&this.#T(t))return!1;let s=this.value,n=t?Q(t):"";return this.#v=t,t&&(this.#d=t),this.#Z(),n===s?!1:(this.#J(),this.#R(),t&&i==="api"&&(this.#m=t.getFullYear(),this.#h=t.getMonth()),(this.#f||i==="api")&&this.#M(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:n,date:t?new Date(t):null,source:i}})),!0)}#q(t,i){this.#T(t)||(this.#C(t,i),this.#U(),this.#s.focus())}#G(t){let i=this.#l.querySelector(`[data-date="${Q(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()}}#Z(){this.#s.value=this.#v?rl(this.#v,this.#p):""}#D(){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.#M(),this.#u){try{this.#a.showPopover()}catch{}this.#H(),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}))}}#U(){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}))}}#H(){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.#H()};#Y=()=>{let t=this.#s.value,{date:i,partial:s}=$n(t,this.#p);if(i)this.#d=i,this.#m=i.getFullYear(),this.#h=i.getMonth(),this.#M();else if(s){this.#m=s.year,this.#h=s.month;let n=Te(s.year,s.month),r=Math.min(this.#d?.getDate()??1,n);this.#d=new Date(s.year,s.month,r),this.#M()}!this.#f&&t.length>0&&this.#D()};#F=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let i=this.#s.value.trim();if(!i){this.#C(null,"keyboard"),this.#U();return}let{date:s}=$n(i,this.#p);s&&!this.#T(s)&&this.#q(s,"keyboard");return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#f||this.#D(),requestAnimationFrame(()=>{this.#d&&this.#G(this.#d)});return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#f&&this.#U(),this.#Z();return;case"Tab":this.#f&&this.#U();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}=$n(i,this.#p);s&&!this.#T(s)&&this.#C(s,"keyboard")}this.#Z(),this.#f&&this.#U(),this.#z()};#z=()=>{this.#i&&(this.#k||(this.#k=!0,this.#R()),this.#n.dispatchEvent(new Event("blur",{bubbles:!0})))};#W=t=>{this.#f&&!this.contains(t.target)&&this.#U()};#X=t=>{let s=t.target?.closest("button[data-date]");if(!s||s.getAttribute("aria-disabled")==="true")return;let n=rt(s.getAttribute("data-date"));n&&this.#q(n,"pointer")};#j=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=Mn(s,t.shiftKey?12:1);break;case"PageUp":n=Mn(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.#q(s,"keyboard");return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#U(),this.#s.focus();return;default:return}i&&(t.preventDefault(),t.stopPropagation(),this.#E&&n<this.#E&&(n=this.#E),this.#y&&n>this.#y&&(n=this.#y),this.#d=n,(n.getMonth()!==this.#h||n.getFullYear()!==this.#m)&&(this.#h=n.getMonth(),this.#m=n.getFullYear(),this.#M()),this.#G(n))};#J(t=!0){let i=this.#v?Q(this.#v):"";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.#_(i,s);return n?r.replaceAll("{date}",rl(n,this.#p)):r}#R(){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.#v,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.#y&&i>this.#y&&(s={rangeOverflow:!0},n=this.#st("rangeOverflow","RangeOverflow","Choose a date on or before {date}",this.#y));let r=this.#t.validationMessage;return n?this.#t.setValidity(s,n,this.#s):this.#t.setValidity({}),n&&(i||this.#k)?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.#M(),this.#R()&&this.#n.dispatchEvent(new Event("input",{bubbles:!0})))}#nt(t){let i=t||new Date;this.#v=t,this.#d=i,this.#m=i.getFullYear(),this.#h=i.getMonth(),this.#Z(),this.#J(),this.#R(),this.#M()}formResetCallback(){this.#i&&(this.#k=!1,this.#nt(rt(this.#S)))}formStateRestoreCallback(t){!this.#i||typeof t!="string"||this.#nt(rt(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.#v?Q(this.#v):"":this.#w??""}set value(t){let i=t==null?"":String(t).trim(),s=i?rt(i):null;if(!(i&&!s)){if(!this.#i){this.#w=i;return}this.#C(s,"api")}}get min(){return this.#E?Q(this.#E):""}set min(t){this.#E=rt(t),this.#n&&(this.#E?this.#n.setAttribute("min",Q(this.#E)):this.#n.removeAttribute("min")),this.#tt()}get max(){return this.#y?Q(this.#y):""}set max(t){this.#y=rt(t),this.#n&&(this.#y?this.#n.setAttribute("max",Q(this.#y)):this.#n.removeAttribute("max")),this.#tt()}};w("date-picker",Rn);zt();function Gt(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 Mi(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 Cg(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 Tg(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 pt(e,t=!1){let{r:i,g:s,b:n}=Cg(e);return Mi(i,s,n,t)}function mt(e,t,i){let{r:s,g:n,b:r}=Gt(e,t,i);return Tg(s,n,r)}function F(e,t,i){return Math.max(t,Math.min(i,e))}function qn(e){return e/=255,e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Fn(e){let t=e<=.0031308?e*12.92:1.055*Math.pow(e,.4166666666666667)-.055;return Math.round(F(t,0,1)*255)}function Lg(e,t,i){let s=qn(e),n=qn(t),r=qn(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),b=Math.atan2(p,f)*180/Math.PI;return b<0&&(b+=360),m<1e-4&&(b=0),{L:h,C:m,H:b}}function Ng(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:Fn(h),g:Fn(f),b:Fn(p)}}function Bn(e,t,i){let s=Gt(e,t,i);return Lg(s.r,s.g,s.b)}function ol(e,t,i,s=!1){let{r:n,g:r,b:a}=Ng(e,t,i);return Mi(n,r,a,s)}function Mg(e,t,i){return mt(e,t,i)}function _g(e,t,i){let{r:s,g:n,b:r}=Gt(e,t,i);return`rgb(${s} ${n} ${r})`}function Dg(e,t,i){return`hsl(${Math.round(e)}deg ${Math.round(t)}% ${Math.round(i)}%)`}function Ig(e,t,i){let{L:s,C:n,H:r}=Bn(e,t,i);return`oklch(${(s*100).toFixed(1)}% ${n.toFixed(3)} ${r.toFixed(1)}deg)`}function cl(e,t,i,s){switch(e){case"rgb":return _g(t,i,s);case"hsl":return Dg(t,i,s);case"oklch":return Ig(t,i,s);default:return Mg(t,i,s)}}var Xt=["hex","rgb","hsl","oklch"],$g="hex",Og=/^#[0-9a-fA-F]{6}$/,Jt=8,Pg=0,Hn=class extends E{static formAssociated=!0;#t;#e;#i;#n;#s;#o;#r;#a;#l;#c;#b;#f;#u={};#p=$g;#v;#d;#m;#h=!1;#E=!1;#y=!1;#x=`cp${++Pg}`;#g=0;#S=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.#y){let s=this.getAttribute("format");s&&Xt.includes(s)&&(this.#p=s),this.#y=!0}if(this.#A===void 0){let s=this.#e.defaultValue;this.#A=Og.test(s)?s.toLowerCase():this.#e.value||"#000000"}let t=pt(this.#e.value||this.#A,!0);this.#g=t.h,this.#S=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.#k),this.#_(),this.#P(),this.#F(),this.#J(),this.#E=Li,this.#E&&this.#r.setAttribute("popover","manual"),this.listen(document,"click",this.#j),this.listen(this,"keydown",this.#N),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()}#k=t=>{t.preventDefault(),this.#i.disabled||this.#i.focus()};#N=t=>{t.key!=="Escape"||t.defaultPrevented||!this.#h||(t.preventDefault(),t.stopPropagation(),this.#z())};#_(){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.#x}-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.#x}-label-${t.length}`),t.push(i.id);t.length===0&&(this.#o=document.createElement("span"),this.#o.className="visually-hidden",this.#o.id=`${this.#x}-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()})}#P(){this.#v=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.#b=document.createElement("div"),this.#b.className="color-hue-thumb",this.#c.appendChild(this.#b),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 Xt){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.#$),this.#u.hex=this.#O("hex",[{label:"Hex",channel:"hex",kind:"text",maxLength:7}]),this.#u.rgb=this.#O("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.#O("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.#O("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 Xt)this.#r.appendChild(this.#u[o].wrapper);this.#V();let r=this.querySelector(":scope > datalist");if(r){this.#v=document.createElement("div"),this.#v.className="color-swatches",this.#v.setAttribute("role","group"),this.#v.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.#v.appendChild(c)}this.#r.appendChild(this.#v),this.listen(this.#v,"click",this.#U)}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.#H)),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.#K),this.listen(this.#a,"keydown",this.#T),this.listen(this.#c,"pointerdown",this.#B),this.listen(this.#c,"keydown",this.#I);for(let o of Xt){let c=o==="hex"?this.#q:o==="rgb"?this.#G:o==="hsl"?this.#Z:this.#D;for(let{el:l}of this.#u[o].inputs)this.listen(l,"change",c)}}#O(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}}#V(){for(let t of Xt)this.#u[t].wrapper.hidden=t!==this.#p;this.#m&&this.#m.setAttribute("aria-label",`Copy ${this.#p.toUpperCase()} value`)}#$=()=>{let t=this.#f.value;Xt.includes(t)&&(this.#p=t,this.#V(),this.#F())};#K=t=>{t.preventDefault(),this.#a.setPointerCapture(t.pointerId),this.#M(t);let i=n=>this.#M(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)};#M(t){let i=this.#a.getBoundingClientRect(),s=F((t.clientX-i.left)/i.width,0,1),n=F((t.clientY-i.top)/i.height,0,1);this.#S=Math.round(s*100),this.#w=Math.round((1-n)*100),this.#Y("pointer")}#T=t=>{let i=t.shiftKey?10:1;switch(this.#S=Math.round(this.#S),this.#w=Math.round(this.#w),t.key){case"ArrowRight":t.preventDefault(),this.#S=F(this.#S+i,0,100);break;case"ArrowLeft":t.preventDefault(),this.#S=F(this.#S-i,0,100);break;case"ArrowUp":t.preventDefault(),this.#w=F(this.#w+i,0,100);break;case"ArrowDown":t.preventDefault(),this.#w=F(this.#w-i,0,100);break;case"Home":t.preventDefault(),this.#S=0;break;case"End":t.preventDefault(),this.#S=100;break;case"PageUp":t.preventDefault(),this.#w=F(this.#w+10,0,100);break;case"PageDown":t.preventDefault(),this.#w=F(this.#w-10,0,100);break;default:return}this.#Y("keyboard")};#B=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=F((t.clientX-i.left)/i.width,0,1);this.#g=Math.round(s*360),this.#Y("pointer")}#I=t=>{let i=t.shiftKey?10:1;switch(this.#g=Math.round(this.#g),t.key){case"ArrowRight":case"ArrowUp":t.preventDefault(),this.#g=(this.#g+i)%361;break;case"ArrowLeft":case"ArrowDown":t.preventDefault(),this.#g=(this.#g-i+361)%361;break;case"PageUp":t.preventDefault(),this.#g=F(this.#g+10,0,360);break;case"PageDown":t.preventDefault(),this.#g=F(this.#g-10,0,360);break;case"Home":t.preventDefault(),this.#g=0;break;case"End":t.preventDefault(),this.#g=360;break;default:return}this.#Y("keyboard")};#C(t,i){return this.#u[t].inputs.find(s=>s.channel===i)?.el}#q=()=>{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=pt(i,!0);this.#g=s.h,this.#S=s.s,this.#w=s.l,this.#Y()}};#G=()=>{let t=F(Number(this.#C("rgb","r").value)||0,0,255),i=F(Number(this.#C("rgb","g").value)||0,0,255),s=F(Number(this.#C("rgb","b").value)||0,0,255),n=Mi(t,i,s,!0);this.#g=n.h,this.#S=n.s,this.#w=n.l,this.#Y()};#Z=()=>{let t=F(Number(this.#C("hsl","h").value)||0,0,360)%361,i=F(Number(this.#C("hsl","s").value)||0,0,100),s=F(Number(this.#C("hsl","l").value)||0,0,100);this.#g=t,this.#S=i,this.#w=s,this.#Y()};#D=()=>{let t=F(Number(this.#C("oklch","oL").value)||0,0,100)/100,i=F(Number(this.#C("oklch","oC").value)||0,0,.4),s=F(Number(this.#C("oklch","oH").value)||0,0,360),n=ol(t,i,s,!0);this.#g=n.h,this.#S=n.s,this.#w=n.l,this.#Y()};#U=t=>{let i=t.target.closest("button[data-color]");if(!i)return;let s=i.getAttribute("data-color"),n=pt(s,!0);this.#g=n.h,this.#S=n.s,this.#w=n.l,this.#Y()};#H=async()=>{try{let i=await new window.EyeDropper().open(),s=pt(i.sRGBHex,!0);this.#g=s.h,this.#S=s.s,this.#w=s.l,this.#Y()}catch{}};#Q=()=>{let t=cl(this.#p,this.#g,this.#S,this.#w);ut(t,{button:this.#m,announceMessage:"Color copied"})};#Y(t="internal"){this.#F(),this.#J();let i=mt(this.#g,this.#S,this.#w),s=Gt(this.#g,this.#S,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.#g),s:Math.round(this.#S),l:Math.round(this.#w)},source:t}}))}#F(){let t=mt(this.#g,this.#S,this.#w),i=Gt(this.#g,this.#S,this.#w),s=mt(this.#g,100,50);this.#n.style.background=t,this.#s.textContent=t,this.#a.style.setProperty("--area-hue",s),this.#l.style.left=`${this.#S}%`,this.#l.style.top=`${100-this.#w}%`,this.#l.style.background=t;let n=Math.round(this.#g),r=Math.round(this.#S),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.#b.style.left=`${this.#g/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=Bn(this.#g,this.#S,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.#v)for(let l of this.#v.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.#W(),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}))}#W(){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-Jt),o=Math.max(o,Jt);let c=t.bottom+4;c+s>r-Jt&&t.top-s-4>=Jt&&(c=t.top-s-4),c=Math.max(Jt,Math.min(c,r-s-Jt)),this.#r.style.setProperty("--panel-top",`${Math.round(c)}px`),this.#r.style.setProperty("--panel-left",`${Math.round(o)}px`)}#X=()=>{this.#h&&this.#W()};#j=t=>{this.#h&&!this.contains(t.target)&&this.#z()};#J(){let t=mt(this.#g,this.#S,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=pt(this.#A,!0);this.#g=t.h,this.#S=t.s,this.#w=t.l,this.#F(),this.#J()}formStateRestoreCallback(t){if(!t||!this.#i)return;let i=pt(t,!0);this.#g=i.h,this.#S=i.s,this.#w=i.l,this.#F(),this.#J()}get value(){return mt(this.#g,this.#S,this.#w)}set value(t){if(!/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t))return;let i=mt(this.#g,this.#S,this.#w).toLowerCase(),s=t.toLowerCase();if(i===s||i===s.toLowerCase())return;let n=pt(t,!0);this.#g=n.h,this.#S=n.s,this.#w=n.l,this.#Y("api")}};w("color-picker",Hn);var Rg='<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>',qg='<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 Fg(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 Bg(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}function Hg(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 Vg(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 zg(){return document.documentElement.lang||void 0}function Vn(e){let t=String(e),i=t.indexOf(".");return i<0?0:t.length-i-1}var ll=!1,Ug=0,zn=class extends E{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="";#b=!1;#f=!1;#u;#p;#v;#d=!1;#m=!1;#h;#E;#y;#x;#g;#S;#w=0;#A=0;#L=!1;#k=!1;constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}setup(){this.#P(),this.#O(),this.#K();let t=this.getAttribute("value");this.#d||(this.#v=t,this.#d=!0),this.#H(t??this.#$(),"init"),this.#N(),requestAnimationFrame(()=>{this.isConnected&&this.#N()}),this.listen(this.#h,"focus",()=>this.#N()),this.listen(this,"click",i=>{i.target===this&&!this.#et()&&this.#h.focus()})}teardown(){this.#T(),this.#k=!1}attributeChangedCallback(t,i,s){!this.isConnected||!this.#h||(t==="value"?this.#H(s??this.#$(),"attr"):t==="disabled"||t==="readonly"?this.#C():t==="aria-label"||t==="aria-labelledby"?this.#N():this.#_())}#N(){let t=[],i=[];try{i=[...this.#t.labels||[]]}catch{}for(let a of i)a.id||(a.id=`stepper-wc-label-${++Ug}`),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")}#_(){this.#x.setAttribute("aria-label",this.getAttribute("data-label-decrease")||"Decrease"),this.#g.setAttribute("aria-label",this.getAttribute("data-label-increase")||"Increase")}#P(){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",ll)return;ll=!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/')}}#O(){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=Bg(this.getAttribute("data-values")),this.#r=Fg(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.#b=this.hasAttribute("data-show-label"),this.#f=this.hasAttribute("data-accelerate"),this.#u=zg(),this.#S=this.#V()}#V(){if(!this.#a)return null;let t=Vn(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}#$(){return this.#e==="enum"?this.#r[0]?.value??"":this.#e==="token"?this.#o[0]??"":"0"}#K(){this.replaceChildren(),this.#x=document.createElement("button"),this.#x.type="button",this.#x.className="stepper-dec",this.#x.setAttribute("tabindex","-1"),this.#x.innerHTML=Rg,this.#g=document.createElement("button"),this.#g.type="button",this.#g.className="stepper-inc",this.#g.setAttribute("tabindex","-1"),this.#g.innerHTML=qg,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.#y=new Set;for(let t of this.#it())this.#z(t);this.appendChild(this.#x),this.appendChild(this.#h),this.appendChild(this.#g),this.#M(this.#x,-1),this.#M(this.#g,1),this.listen(this.#h,"keydown",this.#B),this.#_(),this.#C()}#M(t,i){if(this.listen(t,"click",n=>{if(this.#k){this.#k=!1,n.preventDefault();return}this.#q(i,1)}),!this.#f)return;this.listen(t,"pointerdown",n=>{let r=n;r.pointerType==="mouse"&&r.button!==0||this.#I()||(this.#L=!1,this.#w=window.setTimeout(()=>{this.#L=!0,this.#A=window.setInterval(()=>this.#q(i,1),100),this.#w=window.setTimeout(()=>{window.clearInterval(this.#A),this.#A=window.setInterval(()=>this.#q(i,5),50)},1e3)},500))});let s=()=>{this.#T(),this.#L&&(this.#k=!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}#B=t=>{if(this.#I())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.#q(1,1);break;case"ArrowDown":case"ArrowLeft":t.preventDefault(),this.#q(-1,1);break;case"PageUp":t.preventDefault(),this.#q(1,10);break;case"PageDown":t.preventDefault(),this.#q(-1,10);break;case"Home":t.preventDefault(),this.#G("min");break;case"End":t.preventDefault(),this.#G("max");break;default:}};#et(){return this.hasAttribute("disabled")||this.#m}#I(){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.#x.disabled=this.#I(),this.#g.disabled=this.#I())}#q(t,i){if(this.#I())return;let s=this.#Z(t,i);s===null||s===this.#p||this.#H(s,"step")}#G(t){if(this.#e==="enum"){let s=t==="min"?0:this.#r.length-1;this.#H(this.#r[s]?.value,"step");return}if(this.#e==="token"){let s=t==="min"?0:this.#o.length-1;this.#H(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.#H(String(i),"step")}#Z(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.#D(this.#p);l===-1&&(l=this.#U(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=Vn(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)}#D(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}#U(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}#H(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.#Y(),this.#W(),this.#X(),this.#st(),this.#R(),n&&i!=="init"&&(this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})))}#Q(t){if(t==null)return this.#$();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=Vn(this.#s);return String(Number(Math.min(this.#n,Math.max(this.#i,i)).toFixed(s)))}#Y(){let t=this.#F();this.#E.textContent=t,this.#z(t)}#F(t=this.#p){if(this.#e==="enum")return this.#r.find(s=>s.value===t)?.label??t??"";if(this.#e==="token"){let i=this.#b?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 Hg(i);if(this.#a==="bytes")return Vg(i,this.#u);if(this.#S){let s=this.#a==="percent"?i/100:i,n=this.#S.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.#F(s.value));if(this.#e==="token")return this.#o.map(s=>this.#F(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.#F(String(s)))}#z(t){let i=String(t??"");if(!i||this.#y.has(i))return;this.#y.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.#y=new Set;for(let t of this.#it())this.#z(t)}}#W(){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.#F());return}if(this.#e==="token"){let i=this.#D(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.#F());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.#F())}#X(){let t=this.#j(),i=this.#J(),s=this.#I();this.#x.disabled=t||s,this.#g.disabled=i||s}#j(){return this.#e==="enum"?this.#p===this.#r[0]?.value:this.#e==="token"?this.#D(this.#p)===0:this.#i!==-1/0&&Number(this.#p)<=this.#i}#J(){return this.#e==="enum"?this.#p===this.#r[this.#r.length-1]?.value:this.#e==="token"?this.#D(this.#p)===this.#o.length-1:this.#n!==1/0&&Number(this.#p)>=this.#n}#st(){this.#t.setFormValue(String(this.#p??""))}#R(){this.setState("at-min",this.#j()),this.setState("at-max",this.#J())}formResetCallback(){this.#H(this.#v??this.#$(),"reset")}formDisabledCallback(t){this.#m=t,this.#h&&this.#C()}formStateRestoreCallback(t){t!=null&&this.#H(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.#H(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()}};w("stepper-wc",zn);var Wg={live:"Live",recording:"Recording",streaming:"Streaming",error:"Error",online:"Online",running:"Running",away:"Away",paused:"Paused",busy:"Busy",offline:"Offline",stopped:"Stopped"},Un=class extends E{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}`)||Wg[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")}};w("status-wc",Un);Ee();wi();var Wn=0,jg='a[href], button, input, select, textarea, summary, iframe, [tabindex], [contenteditable]:not([contenteditable="false"])',Kg="a[href], button, input, select, textarea, summary",Yg=new Set(["button","link","checkbox","radio","switch","tab","option","treeitem","gridcell","menuitem","menuitemcheckbox","menuitemradio","combobox","textbox","searchbox","slider","spinbutton"]);function _i(e){return e.hasAttribute("data-disabled")||e.getAttribute("aria-disabled")==="true"||!!e.disabled}function Gg(e){return e.pointerType===""||e.pointerId===-1||e.button===-1||e.clientX===0&&e.clientY===0&&e.buttons===0}var jn=class extends E{#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-${++Wn}`,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-${++Wn}`),this.#t.matches(jg)||this.#b("tabindex","0"),this.#a=this.#t.matches(Kg)||this.#t.hasAttribute("tabindex")&&Yg.has((this.#t.getAttribute("role")||"").trim().toLowerCase()),this.#a?(this.#b("aria-haspopup","menu"),this.#b("aria-expanded","false"),this.#b("aria-controls",this.#e.id)):!this.#t.hasAttribute("aria-description")&&!this.#t.hasAttribute("aria-describedby")&&this.#b("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.#g);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=Nc(a),r.appendChild(c)}r.setAttribute("aria-keyshortcuts",yi(a));let o=jt(a,()=>{_i(r)||r.click()});this.#r.push(o)}}),this.listen(this.#t,"contextmenu",this.#p),this.listen(this.#t,"keydown",this.#v),this.listen(this.#e,"keydown",this.#y),this.listen(this.#e,"click",this.#x,{capture:!0}),this.listen(window,"scroll",this.#w,{capture:!0}),this.listen(this.#i,"pop-over:hide",this.#S),!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()}#b(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-${++Wn}`),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(),Gg(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)};#v=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})}#y=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&&!_i(i)&&i.click();break}case"Tab":this.close();break}};#x=t=>{let i=t.target.closest?.('button, a, [role="menuitem"]');i&&this.#e.contains(i)&&_i(i)&&(t.preventDefault(),t.stopPropagation())};#g=t=>{let i=t.currentTarget;_i(i)||(this.close(),this.dispatchEvent(new CustomEvent("context-menu:select",{bubbles:!0,detail:{item:i,value:i.getAttribute("data-value")||void 0}})))};#S=()=>{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}};w("context-menu",jn);Ht();var ul=10,Xg=new Set(["replace","append","prepend"]),Jg="Failed to load content",Kn=class extends E{#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.#b():this.#d(t)}#c(){let t=this.getBoundingClientRect();return t.top<window.innerHeight+200&&t.bottom>-200}#b(){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>=ul)throw new Error(`Refused include: nesting deeper than ${ul}`)}#v(){let t=this.getAttribute("mode")||"replace";return Xg.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=pi(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.#v();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.#v()==="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")||Jg,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)}};w("include-file",Kn);it();var dl="environment",hl="preferences",Yn={timeOfDay:!1,seasonal:!1},Zg=900*1e3,bt={...Yn};function Nt(e,t,i){return e+(t-e)*Math.min(1,Math.max(0,i))}var Zt={_timer:null,_baseHues:null,_timeOverride:null,_monthOverride:null,async init(){let e=await S.get(dl,hl);bt=e?{...Yn,...e}:{...Yn},(bt.timeOfDay||bt.seasonal)&&(this._captureBaseHues(),this._update(),this._startLoop()),window.addEventListener("vb:theme-change",()=>{this._hasActiveSource()&&requestAnimationFrame(()=>{this._captureBaseHues(),this._update()})})},load(){return{...bt}},save(e){return bt={...bt,...e},S.set(dl,hl,bt).catch(()=>{}),{...bt}},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?Nt(-20,20,(e-5)/2):e<10?Nt(20,5,(e-7)/3):e<14?Nt(5,0,(e-10)/4):e<17?Nt(0,-5,(e-14)/3):e<19?Nt(-5,15,(e-17)/2):e<21?Nt(15,-10,(e-19)/2):Nt(-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(),Zg))},_stopLoop(){this._timer&&clearInterval(this._timer),this._timer=null}};var Di=null;function pl(){return"0.7.0-30b3407e8"}function Qg(){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 ml(){return Di||(Di=navigator.serviceWorker?.ready??Promise.reject(new Error("SW not supported"))),Di}function bl(e){return new Promise((t,i)=>{navigator.serviceWorker?.controller?fl(navigator.serviceWorker.controller,e,t,i):ml().then(s=>{let n=s.active||s.waiting||s.installing;n?fl(n,e,t,i):i(new Error("No active service worker"))}).catch(i)})}function fl(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 gl(){return bl("GET_STATUS")}async function vl(){return bl("CLEAR_CACHE")}async function yl(){let e=await ml();return await e.update(),{updated:!!e.waiting}}function tv(){return typeof window>"u"||!("serviceWorker"in navigator)?!1:window.__VB_SERVICE_WORKER?!0:document.querySelector('meta[name="vb-service-worker"]')?.content==="true"}if(tv()){let e=Qg();window.addEventListener("load",()=>{Di=navigator.serviceWorker.register(e).catch(t=>{console.warn("[VB] Service worker registration failed:",t)})})}it();gn();var Qt=null,tt="settings",Oi={motionFx:!0,sounds:!1,charShortcuts:!0},tr=()=>({...Oi,charShortcuts:Ct()}),nv=document.documentElement.hasAttribute("data-sticky"),er=null,rv={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"},av='<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 vt(e){return String(e).replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")}async function ir(e){let t=document.documentElement;e?t.dataset.sticky="":delete t.dataset.sticky;try{let i=await Promise.resolve().then(()=>(Zn(),El));e?i.initStickyManager():i.destroyStickyManager()}catch{}}var sr=class extends E{#t=null;#e=null;#i=!1;#n=!1;#s=0;#o="";#r=new Set;#a=[];#l=[];#c={...Oi,charShortcuts:Ct()};#b=document.documentElement.hasAttribute("data-sticky");setup(){let t=++this.#s;return this.#o||=crypto.randomUUID().slice(0,8),this.#L(),this.#N(),this.#W(),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.#v().then(()=>{this.#f(t)&&this.#W()}),!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}`)??rv[t]??t;for(let[n,r]of Object.entries(i))s=s.replaceAll(`{${n}}`,String(r));return s}#p(t){return vt(this.#u(t))}get data(){return{a11yThemes:[...this.#l],extensions:{...this.#c},sticky:this.#b}}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(S.set(tt,"a11y",this.#l)),this.#R(),window.dispatchEvent(new CustomEvent("vb:a11y-themes-change",{detail:[...this.#l]}))),t.extensions&&typeof t.extensions=="object"&&(this.#c={...tr(),...t.extensions},s.push("extensions"),i.push(S.set(tt,"extensions",this.#c)),this.#tt()),t.sticky!=null&&(this.#b=!!t.sticky,s.push("sticky"),i.push(S.set(tt,"sticky",this.#b?"on":"off")),ir(this.#b));for(let n of s)this.#r.add(n);this.#e&&this.#W(),Promise.allSettled(i).then(()=>{for(let n of s)this.#r.delete(n);this.#e&&this.#W(),this.dispatchEvent(new CustomEvent("settings-panel:data-changed",{detail:{data:this.data,source:"property"},bubbles:!0}))})}async#v(){let[t,i,s]=await Promise.all([S.get(tt,"a11y"),S.get(tt,"extensions"),S.get(tt,"sticky")]);er===null&&(er=nv&&s!=="on"),this.#r.has("a11y")||(this.#l=Array.isArray(t)?t:[]),this.#r.has("extensions")||(this.#c={...tr(),...i??{}}),this.#r.has("sticky")||(this.#b=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}#y(t){return t==="flush"?"flush":t==="elevated"?"elevated":"default"}#x(t,i){return t?i==="flush"?"flush":i==="elevated"?"elevated":"default":""}#g(t){if(!t)return"card";let i=t.split(/\s+/);for(let s of i)if(s==="stretch"||s==="integrated")return s;return"card"}#S(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=av,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.#k(),this.appendChild(this.#e)}#k(){let{mode:t,brand:i,fluid:s,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:l,pageBgGradDir:u}=_.getState(),d=[...this.#l],h={...this.#c},f=Zt.load(),p=this.#d(s),m=this.#m(s),b=this.#E(n),g=this.#y(n),A=this.#o,y=L=>this.#p(L),$=(L,N,V,me,et,qt={})=>`
287
+ `,wn=class extends E{static get observedAttributes(){return["trend","loading"]}setup(){if(this.shadowRoot)for(let t of zc){let i=this.shadowRoot.querySelector(`slot[name="${t}"]`);this.#t(t,i)}else{let t=this.attachShadow({mode:"open"});t.innerHTML=ng;for(let i of zc){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 sg)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)}};w("score-card",wn);var rg=0;function xi(e,t){return e.matches("content-swap")?t:`data-${t}`}function Ei(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-${++rg}`);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(),Tt(e,l.detail===0?"keyboard":"pointer")}),r(e,"click",l=>{let d=l.target.closest?.(og);d&&d!==e&&e.contains(d)||Tt(e,"pointer")})}else c&&!c.hasAttribute("data-swap")&&c.remove(),c=null,a.forEach(l=>{let u=l.matches(ag);r(l,"click",d=>{d.stopPropagation();let h=u&&d.detail===0;Tt(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(),Tt(e,"keyboard"))}))});if(e.matches('[data-gesture="flick"], [data-gesture="swipe"]')&&(r(e,"swipe-left",()=>Tt(e,"pointer")),r(e,"swipe-right",()=>Tt(e,"pointer"))),!s){let l=new MutationObserver(()=>Si(e,t,i));l.observe(e,{attributes:!0,attributeFilter:["data-swapped"]}),n.push(()=>l.disconnect())}return Si(e,t,i),cg([t,i]),()=>{for(let l of n)l();n.length=0}}var ag='button, a[href], summary, input:is([type="button"], [type="submit"], [type="reset"])',og='a[href], button, input, select, textarea, label, summary, [contenteditable=""], [contenteditable="true"], [tabindex]';function cg(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 Si(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 jc(e){return{front:e.querySelector(':scope > [data-face="front"]'),back:e.querySelector(':scope > [data-face="back"]')}}function Ce(e,t,i="api"){let{front:s,back:n}=jc(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),Si(e,s,n),lg(e,i);let u=t?n:s,d=t?s:n,h=u.querySelector("[autofocus]");h?h.focus():i==="keyboard"&&d.contains(a)&&ug(u)},c=u=>{let d=e;typeof d.setState=="function"&&d.setState("transition-running",u)};c(!0);let l=nt(o);l&&l.finished&&typeof l.finished.finally=="function"?l.finished.finally(()=>c(!1)):c(!1)}function Tt(e,t="api"){Ce(e,!e.hasAttribute(xi(e,"swapped")),t)}function lg(e,t="internal"){e.dispatchEvent(new CustomEvent("content-swap:swap",{detail:{swapped:e.hasAttribute(xi(e,"swapped")),source:t},bubbles:!0}))}function ug(e){let t=e.querySelector("[data-swap], button, a, input, select, textarea");t&&t.focus()}var An=class extends E{static observedAttributes=["swapped"];#t=null;attributeChangedCallback(){if(!this.isConnected)return;let{front:t,back:i}=jc(this);t&&i&&Si(this,t,i)}setup(){this.#t=Ei(this)??null}teardown(){this.#t?.(),this.#t=null}flip(){Ce(this,!0)}unflip(){Ce(this,!1)}toggle(){Tt(this)}get flipped(){return this.hasAttribute("swapped")}set flipped(t){Ce(this,!!t)}get swapped(){return this.hasAttribute("swapped")}set swapped(t){Ce(this,!!t)}};w("content-swap",An);function Uc(){document.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(e=>{e.querySelector(":scope > [data-face]")&&Ei(e)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Uc):Uc();var Wc=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]")&&Ei(s),s.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(n=>{n.querySelector(":scope > [data-face]")&&Ei(n)})}});document.body?Wc.observe(document.body,{childList:!0,subtree:!0}):document.addEventListener("DOMContentLoaded",()=>{Wc.observe(document.body,{childList:!0,subtree:!0})});var En=class extends E{#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.#b(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=ki(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=ki(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=ki(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=ki(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")}}#b(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=dg(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 ki(e){let t=e.replace(/\/+$/,"");return t===""?"/":t}function dg(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}w("nav-bar",En);var fg=0,Cn=class extends E{#t;#e=[];#i;#n;#s;#o;#r;#a;#l=null;#c=0;#b=0;#f=!1;#u=!1;#p=!1;#v=null;#d=!1;#m=!1;#h=!1;#E=!1;#y=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.#y.add(a)),this.#t.appendChild(a)}),this.#e=[...this.#t.children],this.hasAttribute("autoplay")&&!this.#u&&this.#g(),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.#V),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=++fg,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(()=>(kn(),xn)).then(({addSwipeListener:o})=>{!this.isConnected||this.#t!==a||(this.#v=o(a,{threshold:40}),this.listen(a,"swipe-left",()=>this.#k()?this.prev():this.next()),this.listen(a,"swipe-right",()=>this.#k()?this.next():this.prev()))})}this.#p||(this.#a=new IntersectionObserver(this.#O,{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.#_()}));let r=this.#$()??(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.#N(a)}else r>0&&r<this.#e.length&&this.goTo(r,!1);return this.#P(),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.#v&&(this.#v(),this.#v=null),this.#t?.parentElement===this&&[...this.#t.children].forEach(t=>this.appendChild(t)),this.#e.forEach(t=>{this.#y.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.#b=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,nt(()=>{this.#x(t)}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}else this.#x(t);else{let s=this.#e[t].getBoundingClientRect(),n=this.#t.getBoundingClientRect(),r=this.#k()?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.#N(t)}}#x(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.#g(),this.insertBefore(this.#i,this.firstChild)),this.#w())}pause(){this.#m=!0,this.#d=!1,this.#w()}#g(){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.#S()}#S(){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.#S()}#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})))}#k(){return getComputedStyle(this).direction==="rtl"}reset(){let t=Number(this.getAttribute("start"))||0;this.goTo(t,!1),this.#M()}#N(t){this.#c=t,this.#P(),this.#K(),this.#r&&(this.#r.textContent=`Slide ${t+1} of ${this.#e.length}`),!this.#f&&(this.#_(),!this.#p&&"onscrollend"in window&&(this.#f=!0))}#_(){this.#c!==this.#b&&(this.#b=this.#c,this.dispatchEvent(new CustomEvent("carousel-wc:change",{detail:{index:this.#c,slide:this.#e[this.#c]},bubbles:!0})))}#P(){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"))}}#O=t=>{for(let i of t)if(i.isIntersecting){let s=this.#e.indexOf(i.target);s!==-1&&s!==this.#c&&this.#N(s)}};#V=t=>{let i=(t.key==="ArrowLeft"||t.key==="ArrowRight")&&this.#k();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}};#$(){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}}#K(){let t=this.getAttribute("persist");if(t)try{localStorage.setItem(`carousel:${t}`,String(this.#c))}catch{}}#M(){let t=this.getAttribute("persist");if(t)try{localStorage.removeItem(`carousel:${t}`)}catch{}}};w("carousel-wc",Cn);var pg=0,Tn=class extends E{static formAssociated=!0;#t;#e;#i;#n;#s=[];#o=[];#r=-1;#a=!1;#l="";#c="";#b;#f=!1;#u;#p;#v=[];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${++pg}`;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.#M(c,!1),this.#b===void 0&&(this.#b=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.#k),this.listen(this.#i,"click",this.#N),this.listen(this.#i,"pointerdown",this.#_),this.listen(document,"click",this.#P),this.listen(this.#n,"pop-over:hide",this.#et),this.listen(this,"invalid",this.#m),this.#I(),this.#C(),this.#B(),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.#B();let i=this.#g(),s=this.#d&&i>0&&this.#v.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]}#y(t,i){if(this.#v.some(o=>o.value===t))return;let s=this.#g();if(s&&this.#v.length>=s)return;this.#v.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.#x(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.#S(`${i} added`),this.#e.value="",this.#O(""),this.#I(),this.#C(),this.#q(),s&&this.#v.length>=s&&(this.#e.disabled=!0,this.#B())}#x(t){let i=this.#v.findIndex(o=>o.value===t);if(i===-1)return;let s=this.#v.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.#S(`${s.label} removed`),this.#g()&&this.#e.disabled&&(this.#e.disabled=this.#f),this.#O(this.#e.value.trim()),this.#I(),this.#C(),this.#q(),this.#e.focus()}#g(){let t=this.getAttribute("max");return t?parseInt(t,10):0}#S(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.#I(),this.#C()}this.#O(t),this.#T()};#A=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.#a||this.#T(),this.#V(this.#r+1);break;case"ArrowUp":t.preventDefault(),this.#a||this.#T(),this.#V(this.#r-1);break;case"Home":this.#a&&(t.preventDefault(),this.#V(0));break;case"End":this.#a&&(t.preventDefault(),this.#V(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.#y(i.getAttribute("data-value"),i.textContent.trim()):this.#K(i)}else if(this.#d&&this.hasAttribute("custom")&&this.#e.value.trim()){t.preventDefault();let i=this.#e.value.trim();this.#y(i,i)}break;case"Backspace":if(this.#d&&!this.#e.value&&this.#v.length>0){let i=this.#v[this.#v.length-1];this.#x(i.value)}break;case",":if(this.#d&&this.hasAttribute("custom")&&this.#e.value.trim()){t.preventDefault();let i=this.#e.value.trim();this.#y(i,i)}break;case"Escape":this.#a&&(t.preventDefault(),t.stopPropagation(),this.#B(),this.#e.focus());break;case"Tab":this.#a&&this.#B();break}};#L=()=>{this.#d?(this.#O(this.#e.value.trim()),this.#T()):(this.#e.value||!this.#l)&&(this.#O(this.#e.value.trim()),this.#T())};#k=()=>{this.#a||(this.#O(this.#e.value.trim()),this.#T())};#N=t=>{let i=t.target.closest("li[data-value]");i&&this.#o.includes(i)&&(this.#d?this.#y(i.getAttribute("data-value"),i.textContent.trim()):this.#K(i))};#_=t=>{t.preventDefault()};#P=t=>{this.#a&&!this.contains(t.target)&&this.#B()};#O(t){let i=this.getAttribute("filter")||"contains",s=t.toLowerCase(),n=this.#d?new Set(this.#v.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.#$(),this.setState("no-matches",this.#o.length===0)}#V(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)}#$(){this.#s.forEach(t=>t.removeAttribute("data-active")),this.#e.removeAttribute("aria-activedescendant")}#K(t,i="internal"){let s=t.getAttribute("data-value")||"",n=t.textContent.trim();if(this.#l===s){this.#e.value=n,this.#B(),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.#I(),this.#C(),this.#B(),this.#e.focus(),this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{value:s,label:n,source:i}}))}#M(t,i=!0,s="api"){let n=this.#s.find(r=>r.getAttribute("data-value")===t);n&&(i?this.#K(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})))}#B(){this.#a&&(this.#a=!1,this.removeAttribute("open"),this.#e.setAttribute("aria-expanded","false"),this.#r=-1,this.#$(),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.#$(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))};#I(){if(this.#d)if(this.#v.length>0){let t=new FormData,i=this.getAttribute("name")||"";for(let s of this.#v)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.#v.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")}#q(){this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{values:this.#v.map(t=>t.value),labels:this.#v.map(t=>t.label),source:"internal"}}))}formResetCallback(){this.#d?(this.#u.querySelectorAll(".tag").forEach(t=>t.remove()),this.#v=[],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.#$(),this.#B(),this.#e.removeAttribute("aria-invalid"),!this.#d&&this.#b&&this.#M(this.#b,!1),this.#I(),this.#C()}formStateRestoreCallback(t){t&&(this.#d||(this.#M(t,!1),this.#I(),this.#C()))}get value(){return this.#l}set value(t){t?this.#M(t):this.#G()}#G(){this.#s.forEach(t=>t.setAttribute("aria-selected","false")),this.#l="",this.#c="",this.#e&&(this.#e.value=""),this.removeAttribute("value"),this.#I(),this.#C()}get label(){return this.#c}get values(){return this.#v.map(t=>t.value)}get labels(){return this.#v.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.#M(n,!1),this.#I(),this.#C()):this.#G())}};w("combo-box",Tn);var Ti=86400,mg=0;function Kt(e){return String(e).padStart(2,"0")}function Lt(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 Qc(e,t){let i=Math.floor(e/3600),s=Math.floor(e%3600/60),n=e%60;return t?`${Kt(i)}:${Kt(s)}:${Kt(n)}`:`${Kt(i)}:${Kt(s)}`}function dt(e,t){return(e%t+t)%t}function bg(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 gg(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 vg(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 Ln=class extends E{static formAssociated=!0;static get observedAttributes(){return["disabled","required"]}#t;#e=`tp${++mg}`;#i=!1;#n;#s;#o;#r;#a;#l=[];#c=null;#b=[];#f="24h";#u="";#p={am:"AM",pm:"PM",periodFirst:!1};#v=!1;#d=null;#m=null;#h=null;#E=60;#y;#x;#g=!1;#S="";#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=gg(this.#u);let i=this.getAttribute("data-format");this.#f=i==="12h"||i==="24h"?i:bg(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.#y===void 0&&(this.#y=t.defaultValue),this.#x!==void 0&&(t.value=this.#x,this.#x=void 0),this.#d=Lt(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.#_),this.listen(t,"focus",this.#N),this.#O(),this.#V(),this.#i=!0,this.#P(),this.#st(),this.#R(!1),this.#nt(),this.listen(document,"click",this.#B),this.listen(this,"focusout",this.#et),this.listen(this,"invalid",this.#Z),this.#A(this.matches(":disabled")),!0}teardown(){this.#g=!1,this.#o?.remove(),this.#a?.remove(),this.#l=[],this.#b=[],this.#c=null,this.#i=!1,clearTimeout(this.#Q),this.#H=""}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=Lt(this.#n.getAttribute("min")),this.#h=Lt(this.#n.getAttribute("max"));let i=Lt(this.#n.value);this.#v=this.#E!==null&&this.#E%60!==0||i!==null&&i%60!==0}#k(t,i){return this.dataset[`label${t}`]||i}#N=()=>{this.#i&&!this.#s.disabled&&this.#s.focus()};#_=t=>{t.preventDefault(),this.#N()};#P(){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.#N);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.#k("Input","Time"));let r=this.#n.getAttribute("aria-describedby");r&&s.setAttribute("aria-describedby",r)}#O(){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.#k("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.#k("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.#g?this.#T():this.#M(),this.#s.focus()}),this.listen(t,"focus",()=>t.select()),this.listen(t,"keydown",this.#C),this.listen(t,"blur",this.#G)}#V(){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.#k("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.#$("hour",this.#k("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.#K()),this.#l.push(this.#$("minute",this.#k("Minutes","Minutes"),0,59,n,a)),this.#v&&(this.#a.appendChild(this.#K()),this.#l.push(this.#$("second",this.#k("Seconds","Seconds"),0,59,r,!1))),c&&!this.#p.periodFirst&&this.#a.appendChild(c),this.#b=[...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.#U(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(d,u))}}#$(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}}#K(){let t=document.createElement("span");return t.className="time-sep",t.setAttribute("aria-hidden","true"),t.textContent=":",t}#M(){this.#g||this.#s.disabled||(this.#g=!0,this.#a.setAttribute("data-open",""),this.#s.setAttribute("aria-expanded","true"))}#T(){this.#g&&(this.#g=!1,this.#a.removeAttribute("data-open"),this.#s.setAttribute("aria-expanded","false"))}#B=t=>{this.#g&&!this.contains(t.target)&&this.#T()};#et=t=>{let i=t.relatedTarget;i instanceof Node&&this.contains(i)||this.#T()};#I(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.#v&&(s.second="2-digit"),new Intl.DateTimeFormat(this.#u,s).format(i)}catch{return Qc(t,this.#v)}}#C=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation(),this.#q(),this.#g&&this.#T();return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#g||this.#M(),this.#b[0]?.focus();return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#g&&this.#T(),this.#st();return}};#q(){let t=this.#s.value.trim();if(!t)this.#j(null,"keyboard");else{let i=vg(t,this.#p);i!==null&&this.#j(i,"keyboard")}this.#st()}#G=t=>{t.relatedTarget instanceof Node&&this.contains(t.relatedTarget)||(this.#q(),this.#Z())};#Z=()=>{this.#i&&(this.#w||(this.#w=!0,this.#nt()),this.#n.dispatchEvent(new Event("blur",{bubbles:!0})))};#D(t,i){let s=this.#b.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.#b[s+(t.key===r?1:-1)]?.focus(),!0):t.key==="Escape"?(t.preventDefault(),t.stopPropagation(),this.#T(),this.#s.focus(),!0):!1}#U(t,i){if(this.#D(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.#W(i,i.min,1,"keyboard");break;case"End":t.preventDefault(),this.#W(i,i.max,-1,"keyboard");break;default:/^\d$/.test(t.key)&&(t.preventDefault(),this.#Y(t.key,i))}}#H="";#Q;#Y(t,i){clearTimeout(this.#Q),this.#H+=t;let s=()=>{let n=Math.min(Math.max(Number(this.#H),i.min),i.max);this.#H="",this.#W(i,n,0,"keyboard")};this.#H.length>=2||Number(this.#H)*10>i.max?s():this.#Q=setTimeout(s,800)}#F(){return this.#it(this.#m??0,1)}#it(t,i){let s=dt(t,Ti),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=dt(o+l*n,Ti)}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.#j(this.#F(),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"?dt(r%12+i,12)+(r>=12?12:0):dt(r+i,24))*3600+a*60+o:t.unit==="minute"?c=r*3600+dt(a+i,60)*60+o:c=r*3600+a*60+dt(o+i,60),this.#j(this.#it(c,i),s)}#W(t,i,s,n){if(t.readOnly)return;let r=this.#d??this.#F(),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.#j(this.#it(l,s),n)}#X(t){let i=this.#d??this.#F();this.#j(this.#it(dt(i+12*3600,Ti),0),t)}#j(t,i){let s=this.value;return this.#d=t,t!==null&&t%60!==0&&!this.#v&&(this.#v=!0),this.#st(),this.value===s?!1:(this.#R(),this.#nt(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{...this.#J(),source:i}})),!0)}#J(){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.#I(t);let i=this.#k("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?"--":Kt(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.#k("Period","AM/PM")}: ${r||i}`))}#R(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.#k(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.#I(s)});else if(!l&&d)r={rangeOverflow:!0},a=this.#tt("rangeOverflow","RangeOverflow","Choose a time at or before {time}",{time:this.#I(n)});else if(this.#E&&dt(i-(s??0),this.#E)!==0){let h=this.#it(i,1),f=dt(h+this.#E,Ti);r={stepMismatch:!0},a=this.#tt("stepMismatch","StepMismatch","Choose a valid time. The nearest are {lower} and {upper}",{lower:this.#I(h),upper:this.#I(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.#S||!this.#n.validity.customError)&&(this.#n.setCustomValidity(a),this.#S=a),o!==a}#rt(t){this.#d=t,this.#st(),this.#R(),this.#nt()}formResetCallback(){this.#i&&(this.#w=!1,this.#rt(Lt(this.#y)))}formStateRestoreCallback(t){!this.#i||typeof t!="string"||this.#rt(Lt(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?"":Qc(this.#d,this.#v):this.#x??""}set value(t){let i=t==null?"":String(t).trim(),s=i?Lt(i):null;if(!(i&&s===null)){if(!this.#i){this.#x=i;return}this.#j(s,"api")}}};w("time-picker",Ln);var Li="popover"in HTMLElement.prototype;var Yt=[{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]}],yg=new RegExp(`^(?:(${Yt.map(e=>e.ja).join("|")})|(${Yt.map(e=>e.latin).join("|")}))`+String.raw`\s*(元|\d{1,2})年?[/.\-]?\s*(\d{1,2})月?[/.\-]?\s*(\d{1,2})日?$`,"i"),wg=/^(\d{4})年(\d{1,2})月(\d{1,2})日?$/;function tl(e){return e.trim().replace(/[0-9]/g,t=>String(t.charCodeAt(0)-65296)).replace(/\s+/g,"")}function el(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 il(e){let t=tl(e).match(yg);if(!t)return null;let i=t[1]?Yt.find(a=>a.ja===t[1]):Yt.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=el(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=Yt.indexOf(i);if(r>0){let a=Yt[r-1].start;if(n>=new Date(a[0],a[1]-1,a[2]))return null}return n}function sl(e){let t=tl(e).match(wg);return t?el(Number(t[1]),Number(t[2]),Number(t[3])):null}Z();var On=["january","february","march","april","may","june","july","august","september","october","november","december"],Sg=0;function Q(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 Pn(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 rt(e){if(!e)return null;let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(String(e).trim());return t?Pn(Number(t[1]),Number(t[2])-1,Number(t[3])):null}function Te(e,t){return new Date(e,t+1,0).getDate()}function Mn(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(),Te(s,n)))}function xg(e){try{let t=new Intl.Locale(e),i=t.getWeekInfo?.()??t.weekInfo;if(i)return i.firstDay%7}catch{}return 0}var _n=new Map;function nl(e,t){let i=`${e}:${t}`;if(_n.has(i))return _n.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 _n.set(i,s),s}function rl(e,t){try{return new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"numeric"}).format(e)}catch{return Q(e)}}function Dn(e,t){return!!(e&&t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate())}var In=new Map;function kg(e){if(In.has(e))return In.get(e);let t=new Map;On.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 In.set(e,t),t}function $n(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=rt(i.replace(/\//g,"-"));return o?{date:o,partial:null}:s}if(Ni(t)==="ja"){let o=il(i);if(o)return{date:o,partial:null}}let n=sl(i);if(n)return{date:n,partial:null};let r=kg(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=Pn(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=Pn(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 al(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 Rn=class extends E{static formAssociated=!0;static get observedAttributes(){return["disabled","required"]}#t;#e=`dp${++Sg}`;#i=!1;#n;#s;#o;#r;#a;#l;#c;#b;#f=!1;#u=!1;#p="en-US";#v=null;#d=null;#m=new Date().getFullYear();#h=new Date().getMonth();#E=null;#y=null;#x=new Map;#g=new Map;#S;#w;#A=0;#L="";#k=!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=ft(this.closest("[lang]")?.lang||navigator.language),this.#A=xg(this.#p),this.#E=rt(t.getAttribute("min")),this.#y=rt(t.getAttribute("max")),this.#x=al(this.getAttribute("data-disabled-dates")),this.#g=al(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.#S===void 0&&(this.#S=t.defaultValue),this.#w!==void 0&&(t.value=this.#w,this.#w=void 0),this.#v=rt(t.value);let r=new Date;return this.#y&&r>this.#y&&(r=this.#y),this.#E&&r<this.#E&&(r=this.#E),this.#d=this.#v||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.#O),this.listen(t,"focus",this.#P),this.#$(),this.#K(),this.#i=!0,this.#V(),this.#Z(),this.#J(!1),this.#R(),this.#u=Li,this.#u&&this.#a.setAttribute("popover","manual"),this.listen(document,"click",this.#W),this.listen(this,"invalid",this.#z),this.#N(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.#x=new Map,this.#g=new Map,this.#i=!1}attributeChangedCallback(t){this.#i&&(t==="disabled"&&this.#N(this.matches(":disabled")),t==="required"&&this.#R())}formDisabledCallback(t){this.#i&&this.#N(t)}#N(t){this.#s.disabled=t,this.#o.disabled=t,t&&this.#U()}#_(t,i){return this.dataset[`label${t}`]||i}#P=()=>{this.#i&&!this.#s.disabled&&this.#s.focus()};#O=t=>{t.preventDefault(),this.#P()};#V(){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.#P);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.#_("Input","Date"));let r=this.#n.getAttribute("aria-describedby");r&&s.setAttribute("aria-describedby",r)}#$(){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.#_("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.#_("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.#U():this.#D(),this.#s.focus()}),this.listen(this.#s,"focus",()=>this.#s.select()),this.listen(this.#s,"input",this.#Y),this.listen(this.#s,"keydown",this.#F),this.listen(this.#s,"blur",this.#it)}#K(){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.#_("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.#_("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.#b=document.createElement("select"),this.#b.className="calendar-year",this.#b.setAttribute("aria-label",this.#_("Year","Year")),this.#et(),r.appendChild(this.#c),r.appendChild(this.#b);let a=document.createElement("button");a.type="button",a.className="calendar-nav",a.setAttribute("aria-label",this.#_("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=nl(this.#p,"short"),u=nl(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.#M(),this.listen(s,"click",()=>this.#I(-1)),this.listen(a,"click",()=>this.#I(1)),this.listen(this.#b,"change",()=>{this.#m=Number(this.#b.value);let f=Te(this.#m,this.#h),p=Math.min(this.#d?.getDate()??1,f);this.#d=new Date(this.#m,this.#h,p),this.#M()}),this.listen(this.#l,"click",this.#X),this.listen(this.#a,"keydown",this.#j)}#M(){let t;try{t=new Intl.DateTimeFormat(this.#p,{month:"long"}).format(new Date(this.#m,this.#h,1))}catch{t=On[this.#h].charAt(0).toUpperCase()+On[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.#b.querySelector(`option[value="${this.#m}"]`)||this.#et(),this.#b.value=String(this.#m),this.#l.replaceChildren();let s=Te(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=Q(u),h=document.createElement("td"),f=document.createElement("button");f.type="button",f.setAttribute("data-date",d),f.textContent=String(l),Dn(u,a)&&f.setAttribute("aria-current","date");let p=Dn(u,this.#v);h.setAttribute("aria-selected",String(p));let m=this.#B(u,d);m.disabled&&(f.setAttribute("aria-disabled","true"),m.reason&&f.setAttribute("data-disabled-reason",m.reason)),this.#g.has(d)&&f.setAttribute("data-highlight",this.#g.get(d)||""),Dn(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.#B(t,Q(t)).disabled}#B(t,i){return this.#x.has(i)?{disabled:!0,reason:this.#x.get(i)}:this.#E&&t<this.#E?{disabled:!0,reason:null}:this.#y&&t>this.#y?{disabled:!0,reason:null}:{disabled:!1,reason:null}}#et(){this.#b.replaceChildren();let t=new Date().getFullYear(),i=this.#E?this.#E.getFullYear():t-100,s=this.#y?this.#y.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.#b.appendChild(r)}}#I(t){let i=this.#d??new Date(this.#m,this.#h,1),s=new Date(this.#m,this.#h,Math.min(i.getDate(),Te(this.#m,this.#h)));this.#d=Mn(s,t),this.#m=this.#d.getFullYear(),this.#h=this.#d.getMonth(),this.#M();let n=document.activeElement;n?.matches(".calendar-nav:focus-visible")&&this.#a.contains(n)||this.#G(this.#d)}#C(t,i){if(t&&this.#T(t))return!1;let s=this.value,n=t?Q(t):"";return this.#v=t,t&&(this.#d=t),this.#Z(),n===s?!1:(this.#J(),this.#R(),t&&i==="api"&&(this.#m=t.getFullYear(),this.#h=t.getMonth()),(this.#f||i==="api")&&this.#M(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:n,date:t?new Date(t):null,source:i}})),!0)}#q(t,i){this.#T(t)||(this.#C(t,i),this.#U(),this.#s.focus())}#G(t){let i=this.#l.querySelector(`[data-date="${Q(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()}}#Z(){this.#s.value=this.#v?rl(this.#v,this.#p):""}#D(){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.#M(),this.#u){try{this.#a.showPopover()}catch{}this.#H(),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}))}}#U(){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}))}}#H(){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.#H()};#Y=()=>{let t=this.#s.value,{date:i,partial:s}=$n(t,this.#p);if(i)this.#d=i,this.#m=i.getFullYear(),this.#h=i.getMonth(),this.#M();else if(s){this.#m=s.year,this.#h=s.month;let n=Te(s.year,s.month),r=Math.min(this.#d?.getDate()??1,n);this.#d=new Date(s.year,s.month,r),this.#M()}!this.#f&&t.length>0&&this.#D()};#F=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let i=this.#s.value.trim();if(!i){this.#C(null,"keyboard"),this.#U();return}let{date:s}=$n(i,this.#p);s&&!this.#T(s)&&this.#q(s,"keyboard");return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#f||this.#D(),requestAnimationFrame(()=>{this.#d&&this.#G(this.#d)});return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#f&&this.#U(),this.#Z();return;case"Tab":this.#f&&this.#U();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}=$n(i,this.#p);s&&!this.#T(s)&&this.#C(s,"keyboard")}this.#Z(),this.#f&&this.#U(),this.#z()};#z=()=>{this.#i&&(this.#k||(this.#k=!0,this.#R()),this.#n.dispatchEvent(new Event("blur",{bubbles:!0})))};#W=t=>{this.#f&&!this.contains(t.target)&&this.#U()};#X=t=>{let s=t.target?.closest("button[data-date]");if(!s||s.getAttribute("aria-disabled")==="true")return;let n=rt(s.getAttribute("data-date"));n&&this.#q(n,"pointer")};#j=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=Mn(s,t.shiftKey?12:1);break;case"PageUp":n=Mn(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.#q(s,"keyboard");return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#U(),this.#s.focus();return;default:return}i&&(t.preventDefault(),t.stopPropagation(),this.#E&&n<this.#E&&(n=this.#E),this.#y&&n>this.#y&&(n=this.#y),this.#d=n,(n.getMonth()!==this.#h||n.getFullYear()!==this.#m)&&(this.#h=n.getMonth(),this.#m=n.getFullYear(),this.#M()),this.#G(n))};#J(t=!0){let i=this.#v?Q(this.#v):"";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.#_(i,s);return n?r.replaceAll("{date}",rl(n,this.#p)):r}#R(){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.#v,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.#y&&i>this.#y&&(s={rangeOverflow:!0},n=this.#st("rangeOverflow","RangeOverflow","Choose a date on or before {date}",this.#y));let r=this.#t.validationMessage;return n?this.#t.setValidity(s,n,this.#s):this.#t.setValidity({}),n&&(i||this.#k)?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.#M(),this.#R()&&this.#n.dispatchEvent(new Event("input",{bubbles:!0})))}#nt(t){let i=t||new Date;this.#v=t,this.#d=i,this.#m=i.getFullYear(),this.#h=i.getMonth(),this.#Z(),this.#J(),this.#R(),this.#M()}formResetCallback(){this.#i&&(this.#k=!1,this.#nt(rt(this.#S)))}formStateRestoreCallback(t){!this.#i||typeof t!="string"||this.#nt(rt(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.#v?Q(this.#v):"":this.#w??""}set value(t){let i=t==null?"":String(t).trim(),s=i?rt(i):null;if(!(i&&!s)){if(!this.#i){this.#w=i;return}this.#C(s,"api")}}get min(){return this.#E?Q(this.#E):""}set min(t){this.#E=rt(t),this.#n&&(this.#E?this.#n.setAttribute("min",Q(this.#E)):this.#n.removeAttribute("min")),this.#tt()}get max(){return this.#y?Q(this.#y):""}set max(t){this.#y=rt(t),this.#n&&(this.#y?this.#n.setAttribute("max",Q(this.#y)):this.#n.removeAttribute("max")),this.#tt()}};w("date-picker",Rn);zt();function Gt(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 Mi(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 Cg(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 Tg(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 pt(e,t=!1){let{r:i,g:s,b:n}=Cg(e);return Mi(i,s,n,t)}function mt(e,t,i){let{r:s,g:n,b:r}=Gt(e,t,i);return Tg(s,n,r)}function F(e,t,i){return Math.max(t,Math.min(i,e))}function qn(e){return e/=255,e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Fn(e){let t=e<=.0031308?e*12.92:1.055*Math.pow(e,.4166666666666667)-.055;return Math.round(F(t,0,1)*255)}function Lg(e,t,i){let s=qn(e),n=qn(t),r=qn(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),b=Math.atan2(p,f)*180/Math.PI;return b<0&&(b+=360),m<1e-4&&(b=0),{L:h,C:m,H:b}}function Ng(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:Fn(h),g:Fn(f),b:Fn(p)}}function Bn(e,t,i){let s=Gt(e,t,i);return Lg(s.r,s.g,s.b)}function ol(e,t,i,s=!1){let{r:n,g:r,b:a}=Ng(e,t,i);return Mi(n,r,a,s)}function Mg(e,t,i){return mt(e,t,i)}function _g(e,t,i){let{r:s,g:n,b:r}=Gt(e,t,i);return`rgb(${s} ${n} ${r})`}function Dg(e,t,i){return`hsl(${Math.round(e)}deg ${Math.round(t)}% ${Math.round(i)}%)`}function Ig(e,t,i){let{L:s,C:n,H:r}=Bn(e,t,i);return`oklch(${(s*100).toFixed(1)}% ${n.toFixed(3)} ${r.toFixed(1)}deg)`}function cl(e,t,i,s){switch(e){case"rgb":return _g(t,i,s);case"hsl":return Dg(t,i,s);case"oklch":return Ig(t,i,s);default:return Mg(t,i,s)}}var Xt=["hex","rgb","hsl","oklch"],$g="hex",Og=/^#[0-9a-fA-F]{6}$/,Jt=8,Pg=0,Hn=class extends E{static formAssociated=!0;#t;#e;#i;#n;#s;#o;#r;#a;#l;#c;#b;#f;#u={};#p=$g;#v;#d;#m;#h=!1;#E=!1;#y=!1;#x=`cp${++Pg}`;#g=0;#S=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.#y){let s=this.getAttribute("format");s&&Xt.includes(s)&&(this.#p=s),this.#y=!0}if(this.#A===void 0){let s=this.#e.defaultValue;this.#A=Og.test(s)?s.toLowerCase():this.#e.value||"#000000"}let t=pt(this.#e.value||this.#A,!0);this.#g=t.h,this.#S=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.#k),this.#_(),this.#P(),this.#F(),this.#J(),this.#E=Li,this.#E&&this.#r.setAttribute("popover","manual"),this.listen(document,"click",this.#j),this.listen(this,"keydown",this.#N),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()}#k=t=>{t.preventDefault(),this.#i.disabled||this.#i.focus()};#N=t=>{t.key!=="Escape"||t.defaultPrevented||!this.#h||(t.preventDefault(),t.stopPropagation(),this.#z())};#_(){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.#x}-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.#x}-label-${t.length}`),t.push(i.id);t.length===0&&(this.#o=document.createElement("span"),this.#o.className="visually-hidden",this.#o.id=`${this.#x}-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()})}#P(){this.#v=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.#b=document.createElement("div"),this.#b.className="color-hue-thumb",this.#c.appendChild(this.#b),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 Xt){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.#$),this.#u.hex=this.#O("hex",[{label:"Hex",channel:"hex",kind:"text",maxLength:7}]),this.#u.rgb=this.#O("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.#O("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.#O("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 Xt)this.#r.appendChild(this.#u[o].wrapper);this.#V();let r=this.querySelector(":scope > datalist");if(r){this.#v=document.createElement("div"),this.#v.className="color-swatches",this.#v.setAttribute("role","group"),this.#v.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.#v.appendChild(c)}this.#r.appendChild(this.#v),this.listen(this.#v,"click",this.#U)}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.#H)),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.#K),this.listen(this.#a,"keydown",this.#T),this.listen(this.#c,"pointerdown",this.#B),this.listen(this.#c,"keydown",this.#I);for(let o of Xt){let c=o==="hex"?this.#q:o==="rgb"?this.#G:o==="hsl"?this.#Z:this.#D;for(let{el:l}of this.#u[o].inputs)this.listen(l,"change",c)}}#O(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}}#V(){for(let t of Xt)this.#u[t].wrapper.hidden=t!==this.#p;this.#m&&this.#m.setAttribute("aria-label",`Copy ${this.#p.toUpperCase()} value`)}#$=()=>{let t=this.#f.value;Xt.includes(t)&&(this.#p=t,this.#V(),this.#F())};#K=t=>{t.preventDefault(),this.#a.setPointerCapture(t.pointerId),this.#M(t);let i=n=>this.#M(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)};#M(t){let i=this.#a.getBoundingClientRect(),s=F((t.clientX-i.left)/i.width,0,1),n=F((t.clientY-i.top)/i.height,0,1);this.#S=Math.round(s*100),this.#w=Math.round((1-n)*100),this.#Y("pointer")}#T=t=>{let i=t.shiftKey?10:1;switch(this.#S=Math.round(this.#S),this.#w=Math.round(this.#w),t.key){case"ArrowRight":t.preventDefault(),this.#S=F(this.#S+i,0,100);break;case"ArrowLeft":t.preventDefault(),this.#S=F(this.#S-i,0,100);break;case"ArrowUp":t.preventDefault(),this.#w=F(this.#w+i,0,100);break;case"ArrowDown":t.preventDefault(),this.#w=F(this.#w-i,0,100);break;case"Home":t.preventDefault(),this.#S=0;break;case"End":t.preventDefault(),this.#S=100;break;case"PageUp":t.preventDefault(),this.#w=F(this.#w+10,0,100);break;case"PageDown":t.preventDefault(),this.#w=F(this.#w-10,0,100);break;default:return}this.#Y("keyboard")};#B=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=F((t.clientX-i.left)/i.width,0,1);this.#g=Math.round(s*360),this.#Y("pointer")}#I=t=>{let i=t.shiftKey?10:1;switch(this.#g=Math.round(this.#g),t.key){case"ArrowRight":case"ArrowUp":t.preventDefault(),this.#g=(this.#g+i)%361;break;case"ArrowLeft":case"ArrowDown":t.preventDefault(),this.#g=(this.#g-i+361)%361;break;case"PageUp":t.preventDefault(),this.#g=F(this.#g+10,0,360);break;case"PageDown":t.preventDefault(),this.#g=F(this.#g-10,0,360);break;case"Home":t.preventDefault(),this.#g=0;break;case"End":t.preventDefault(),this.#g=360;break;default:return}this.#Y("keyboard")};#C(t,i){return this.#u[t].inputs.find(s=>s.channel===i)?.el}#q=()=>{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=pt(i,!0);this.#g=s.h,this.#S=s.s,this.#w=s.l,this.#Y()}};#G=()=>{let t=F(Number(this.#C("rgb","r").value)||0,0,255),i=F(Number(this.#C("rgb","g").value)||0,0,255),s=F(Number(this.#C("rgb","b").value)||0,0,255),n=Mi(t,i,s,!0);this.#g=n.h,this.#S=n.s,this.#w=n.l,this.#Y()};#Z=()=>{let t=F(Number(this.#C("hsl","h").value)||0,0,360)%361,i=F(Number(this.#C("hsl","s").value)||0,0,100),s=F(Number(this.#C("hsl","l").value)||0,0,100);this.#g=t,this.#S=i,this.#w=s,this.#Y()};#D=()=>{let t=F(Number(this.#C("oklch","oL").value)||0,0,100)/100,i=F(Number(this.#C("oklch","oC").value)||0,0,.4),s=F(Number(this.#C("oklch","oH").value)||0,0,360),n=ol(t,i,s,!0);this.#g=n.h,this.#S=n.s,this.#w=n.l,this.#Y()};#U=t=>{let i=t.target.closest("button[data-color]");if(!i)return;let s=i.getAttribute("data-color"),n=pt(s,!0);this.#g=n.h,this.#S=n.s,this.#w=n.l,this.#Y()};#H=async()=>{try{let i=await new window.EyeDropper().open(),s=pt(i.sRGBHex,!0);this.#g=s.h,this.#S=s.s,this.#w=s.l,this.#Y()}catch{}};#Q=()=>{let t=cl(this.#p,this.#g,this.#S,this.#w);ut(t,{button:this.#m,announceMessage:"Color copied"})};#Y(t="internal"){this.#F(),this.#J();let i=mt(this.#g,this.#S,this.#w),s=Gt(this.#g,this.#S,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.#g),s:Math.round(this.#S),l:Math.round(this.#w)},source:t}}))}#F(){let t=mt(this.#g,this.#S,this.#w),i=Gt(this.#g,this.#S,this.#w),s=mt(this.#g,100,50);this.#n.style.background=t,this.#s.textContent=t,this.#a.style.setProperty("--area-hue",s),this.#l.style.left=`${this.#S}%`,this.#l.style.top=`${100-this.#w}%`,this.#l.style.background=t;let n=Math.round(this.#g),r=Math.round(this.#S),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.#b.style.left=`${this.#g/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=Bn(this.#g,this.#S,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.#v)for(let l of this.#v.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.#W(),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}))}#W(){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-Jt),o=Math.max(o,Jt);let c=t.bottom+4;c+s>r-Jt&&t.top-s-4>=Jt&&(c=t.top-s-4),c=Math.max(Jt,Math.min(c,r-s-Jt)),this.#r.style.setProperty("--panel-top",`${Math.round(c)}px`),this.#r.style.setProperty("--panel-left",`${Math.round(o)}px`)}#X=()=>{this.#h&&this.#W()};#j=t=>{this.#h&&!this.contains(t.target)&&this.#z()};#J(){let t=mt(this.#g,this.#S,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=pt(this.#A,!0);this.#g=t.h,this.#S=t.s,this.#w=t.l,this.#F(),this.#J()}formStateRestoreCallback(t){if(!t||!this.#i)return;let i=pt(t,!0);this.#g=i.h,this.#S=i.s,this.#w=i.l,this.#F(),this.#J()}get value(){return mt(this.#g,this.#S,this.#w)}set value(t){if(!/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t))return;let i=mt(this.#g,this.#S,this.#w).toLowerCase(),s=t.toLowerCase();if(i===s||i===s.toLowerCase())return;let n=pt(t,!0);this.#g=n.h,this.#S=n.s,this.#w=n.l,this.#Y("api")}};w("color-picker",Hn);var Rg='<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>',qg='<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 Fg(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 Bg(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}function Hg(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 Vg(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 zg(){return document.documentElement.lang||void 0}function Vn(e){let t=String(e),i=t.indexOf(".");return i<0?0:t.length-i-1}var ll=!1,Ug=0,zn=class extends E{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="";#b=!1;#f=!1;#u;#p;#v;#d=!1;#m=!1;#h;#E;#y;#x;#g;#S;#w=0;#A=0;#L=!1;#k=!1;constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}setup(){this.#P(),this.#O(),this.#K();let t=this.getAttribute("value");this.#d||(this.#v=t,this.#d=!0),this.#H(t??this.#$(),"init"),this.#N(),requestAnimationFrame(()=>{this.isConnected&&this.#N()}),this.listen(this.#h,"focus",()=>this.#N()),this.listen(this,"click",i=>{i.target===this&&!this.#et()&&this.#h.focus()})}teardown(){this.#T(),this.#k=!1}attributeChangedCallback(t,i,s){!this.isConnected||!this.#h||(t==="value"?this.#H(s??this.#$(),"attr"):t==="disabled"||t==="readonly"?this.#C():t==="aria-label"||t==="aria-labelledby"?this.#N():this.#_())}#N(){let t=[],i=[];try{i=[...this.#t.labels||[]]}catch{}for(let a of i)a.id||(a.id=`stepper-wc-label-${++Ug}`),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")}#_(){this.#x.setAttribute("aria-label",this.getAttribute("data-label-decrease")||"Decrease"),this.#g.setAttribute("aria-label",this.getAttribute("data-label-increase")||"Increase")}#P(){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",ll)return;ll=!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/')}}#O(){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=Bg(this.getAttribute("data-values")),this.#r=Fg(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.#b=this.hasAttribute("data-show-label"),this.#f=this.hasAttribute("data-accelerate"),this.#u=zg(),this.#S=this.#V()}#V(){if(!this.#a)return null;let t=Vn(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}#$(){return this.#e==="enum"?this.#r[0]?.value??"":this.#e==="token"?this.#o[0]??"":"0"}#K(){this.replaceChildren(),this.#x=document.createElement("button"),this.#x.type="button",this.#x.className="stepper-dec",this.#x.setAttribute("tabindex","-1"),this.#x.innerHTML=Rg,this.#g=document.createElement("button"),this.#g.type="button",this.#g.className="stepper-inc",this.#g.setAttribute("tabindex","-1"),this.#g.innerHTML=qg,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.#y=new Set;for(let t of this.#it())this.#z(t);this.appendChild(this.#x),this.appendChild(this.#h),this.appendChild(this.#g),this.#M(this.#x,-1),this.#M(this.#g,1),this.listen(this.#h,"keydown",this.#B),this.#_(),this.#C()}#M(t,i){if(this.listen(t,"click",n=>{if(this.#k){this.#k=!1,n.preventDefault();return}this.#q(i,1)}),!this.#f)return;this.listen(t,"pointerdown",n=>{let r=n;r.pointerType==="mouse"&&r.button!==0||this.#I()||(this.#L=!1,this.#w=window.setTimeout(()=>{this.#L=!0,this.#A=window.setInterval(()=>this.#q(i,1),100),this.#w=window.setTimeout(()=>{window.clearInterval(this.#A),this.#A=window.setInterval(()=>this.#q(i,5),50)},1e3)},500))});let s=()=>{this.#T(),this.#L&&(this.#k=!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}#B=t=>{if(this.#I())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.#q(1,1);break;case"ArrowDown":case"ArrowLeft":t.preventDefault(),this.#q(-1,1);break;case"PageUp":t.preventDefault(),this.#q(1,10);break;case"PageDown":t.preventDefault(),this.#q(-1,10);break;case"Home":t.preventDefault(),this.#G("min");break;case"End":t.preventDefault(),this.#G("max");break;default:}};#et(){return this.hasAttribute("disabled")||this.#m}#I(){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.#x.disabled=this.#I(),this.#g.disabled=this.#I())}#q(t,i){if(this.#I())return;let s=this.#Z(t,i);s===null||s===this.#p||this.#H(s,"step")}#G(t){if(this.#e==="enum"){let s=t==="min"?0:this.#r.length-1;this.#H(this.#r[s]?.value,"step");return}if(this.#e==="token"){let s=t==="min"?0:this.#o.length-1;this.#H(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.#H(String(i),"step")}#Z(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.#D(this.#p);l===-1&&(l=this.#U(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=Vn(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)}#D(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}#U(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}#H(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.#Y(),this.#W(),this.#X(),this.#st(),this.#R(),n&&i!=="init"&&(this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})))}#Q(t){if(t==null)return this.#$();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=Vn(this.#s);return String(Number(Math.min(this.#n,Math.max(this.#i,i)).toFixed(s)))}#Y(){let t=this.#F();this.#E.textContent=t,this.#z(t)}#F(t=this.#p){if(this.#e==="enum")return this.#r.find(s=>s.value===t)?.label??t??"";if(this.#e==="token"){let i=this.#b?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 Hg(i);if(this.#a==="bytes")return Vg(i,this.#u);if(this.#S){let s=this.#a==="percent"?i/100:i,n=this.#S.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.#F(s.value));if(this.#e==="token")return this.#o.map(s=>this.#F(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.#F(String(s)))}#z(t){let i=String(t??"");if(!i||this.#y.has(i))return;this.#y.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.#y=new Set;for(let t of this.#it())this.#z(t)}}#W(){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.#F());return}if(this.#e==="token"){let i=this.#D(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.#F());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.#F())}#X(){let t=this.#j(),i=this.#J(),s=this.#I();this.#x.disabled=t||s,this.#g.disabled=i||s}#j(){return this.#e==="enum"?this.#p===this.#r[0]?.value:this.#e==="token"?this.#D(this.#p)===0:this.#i!==-1/0&&Number(this.#p)<=this.#i}#J(){return this.#e==="enum"?this.#p===this.#r[this.#r.length-1]?.value:this.#e==="token"?this.#D(this.#p)===this.#o.length-1:this.#n!==1/0&&Number(this.#p)>=this.#n}#st(){this.#t.setFormValue(String(this.#p??""))}#R(){this.setState("at-min",this.#j()),this.setState("at-max",this.#J())}formResetCallback(){this.#H(this.#v??this.#$(),"reset")}formDisabledCallback(t){this.#m=t,this.#h&&this.#C()}formStateRestoreCallback(t){t!=null&&this.#H(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.#H(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()}};w("stepper-wc",zn);var Wg={live:"Live",recording:"Recording",streaming:"Streaming",error:"Error",online:"Online",running:"Running",away:"Away",paused:"Paused",busy:"Busy",offline:"Offline",stopped:"Stopped"},Un=class extends E{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}`)||Wg[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")}};w("status-wc",Un);Ee();wi();var Wn=0,jg='a[href], button, input, select, textarea, summary, iframe, [tabindex], [contenteditable]:not([contenteditable="false"])',Kg="a[href], button, input, select, textarea, summary",Yg=new Set(["button","link","checkbox","radio","switch","tab","option","treeitem","gridcell","menuitem","menuitemcheckbox","menuitemradio","combobox","textbox","searchbox","slider","spinbutton"]);function _i(e){return e.hasAttribute("data-disabled")||e.getAttribute("aria-disabled")==="true"||!!e.disabled}function Gg(e){return e.pointerType===""||e.pointerId===-1||e.button===-1||e.clientX===0&&e.clientY===0&&e.buttons===0}var jn=class extends E{#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-${++Wn}`,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-${++Wn}`),this.#t.matches(jg)||this.#b("tabindex","0"),this.#a=this.#t.matches(Kg)||this.#t.hasAttribute("tabindex")&&Yg.has((this.#t.getAttribute("role")||"").trim().toLowerCase()),this.#a?(this.#b("aria-haspopup","menu"),this.#b("aria-expanded","false"),this.#b("aria-controls",this.#e.id)):!this.#t.hasAttribute("aria-description")&&!this.#t.hasAttribute("aria-describedby")&&this.#b("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.#g);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=Nc(a),r.appendChild(c)}r.setAttribute("aria-keyshortcuts",yi(a));let o=jt(a,()=>{_i(r)||r.click()});this.#r.push(o)}}),this.listen(this.#t,"contextmenu",this.#p),this.listen(this.#t,"keydown",this.#v),this.listen(this.#e,"keydown",this.#y),this.listen(this.#e,"click",this.#x,{capture:!0}),this.listen(window,"scroll",this.#w,{capture:!0}),this.listen(this.#i,"pop-over:hide",this.#S),!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()}#b(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-${++Wn}`),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(),Gg(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)};#v=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})}#y=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&&!_i(i)&&i.click();break}case"Tab":this.close();break}};#x=t=>{let i=t.target.closest?.('button, a, [role="menuitem"]');i&&this.#e.contains(i)&&_i(i)&&(t.preventDefault(),t.stopPropagation())};#g=t=>{let i=t.currentTarget;_i(i)||(this.close(),this.dispatchEvent(new CustomEvent("context-menu:select",{bubbles:!0,detail:{item:i,value:i.getAttribute("data-value")||void 0}})))};#S=()=>{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}};w("context-menu",jn);Ht();var ul=10,Xg=new Set(["replace","append","prepend"]),Jg="Failed to load content",Kn=class extends E{#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.#b():this.#d(t)}#c(){let t=this.getBoundingClientRect();return t.top<window.innerHeight+200&&t.bottom>-200}#b(){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>=ul)throw new Error(`Refused include: nesting deeper than ${ul}`)}#v(){let t=this.getAttribute("mode")||"replace";return Xg.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=pi(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.#v();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.#v()==="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")||Jg,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)}};w("include-file",Kn);it();var dl="environment",hl="preferences",Yn={timeOfDay:!1,seasonal:!1},Zg=900*1e3,bt={...Yn};function Nt(e,t,i){return e+(t-e)*Math.min(1,Math.max(0,i))}var Zt={_timer:null,_baseHues:null,_timeOverride:null,_monthOverride:null,async init(){let e=await S.get(dl,hl);bt=e?{...Yn,...e}:{...Yn},(bt.timeOfDay||bt.seasonal)&&(this._captureBaseHues(),this._update(),this._startLoop()),window.addEventListener("vb:theme-change",()=>{this._hasActiveSource()&&requestAnimationFrame(()=>{this._captureBaseHues(),this._update()})})},load(){return{...bt}},save(e){return bt={...bt,...e},S.set(dl,hl,bt).catch(()=>{}),{...bt}},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?Nt(-20,20,(e-5)/2):e<10?Nt(20,5,(e-7)/3):e<14?Nt(5,0,(e-10)/4):e<17?Nt(0,-5,(e-14)/3):e<19?Nt(-5,15,(e-17)/2):e<21?Nt(15,-10,(e-19)/2):Nt(-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(),Zg))},_stopLoop(){this._timer&&clearInterval(this._timer),this._timer=null}};var Di=null;function pl(){return"0.7.1-e131c0b54"}function Qg(){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 ml(){return Di||(Di=navigator.serviceWorker?.ready??Promise.reject(new Error("SW not supported"))),Di}function bl(e){return new Promise((t,i)=>{navigator.serviceWorker?.controller?fl(navigator.serviceWorker.controller,e,t,i):ml().then(s=>{let n=s.active||s.waiting||s.installing;n?fl(n,e,t,i):i(new Error("No active service worker"))}).catch(i)})}function fl(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 gl(){return bl("GET_STATUS")}async function vl(){return bl("CLEAR_CACHE")}async function yl(){let e=await ml();return await e.update(),{updated:!!e.waiting}}function tv(){return typeof window>"u"||!("serviceWorker"in navigator)?!1:window.__VB_SERVICE_WORKER?!0:document.querySelector('meta[name="vb-service-worker"]')?.content==="true"}if(tv()){let e=Qg();window.addEventListener("load",()=>{Di=navigator.serviceWorker.register(e).catch(t=>{console.warn("[VB] Service worker registration failed:",t)})})}it();gn();var Qt=null,tt="settings",Oi={motionFx:!0,sounds:!1,charShortcuts:!0},tr=()=>({...Oi,charShortcuts:Ct()}),nv=document.documentElement.hasAttribute("data-sticky"),er=null,rv={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"},av='<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 vt(e){return String(e).replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")}async function ir(e){let t=document.documentElement;e?t.dataset.sticky="":delete t.dataset.sticky;try{let i=await Promise.resolve().then(()=>(Zn(),El));e?i.initStickyManager():i.destroyStickyManager()}catch{}}var sr=class extends E{#t=null;#e=null;#i=!1;#n=!1;#s=0;#o="";#r=new Set;#a=[];#l=[];#c={...Oi,charShortcuts:Ct()};#b=document.documentElement.hasAttribute("data-sticky");setup(){let t=++this.#s;return this.#o||=crypto.randomUUID().slice(0,8),this.#L(),this.#N(),this.#W(),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.#v().then(()=>{this.#f(t)&&this.#W()}),!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}`)??rv[t]??t;for(let[n,r]of Object.entries(i))s=s.replaceAll(`{${n}}`,String(r));return s}#p(t){return vt(this.#u(t))}get data(){return{a11yThemes:[...this.#l],extensions:{...this.#c},sticky:this.#b}}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(S.set(tt,"a11y",this.#l)),this.#R(),window.dispatchEvent(new CustomEvent("vb:a11y-themes-change",{detail:[...this.#l]}))),t.extensions&&typeof t.extensions=="object"&&(this.#c={...tr(),...t.extensions},s.push("extensions"),i.push(S.set(tt,"extensions",this.#c)),this.#tt()),t.sticky!=null&&(this.#b=!!t.sticky,s.push("sticky"),i.push(S.set(tt,"sticky",this.#b?"on":"off")),ir(this.#b));for(let n of s)this.#r.add(n);this.#e&&this.#W(),Promise.allSettled(i).then(()=>{for(let n of s)this.#r.delete(n);this.#e&&this.#W(),this.dispatchEvent(new CustomEvent("settings-panel:data-changed",{detail:{data:this.data,source:"property"},bubbles:!0}))})}async#v(){let[t,i,s]=await Promise.all([S.get(tt,"a11y"),S.get(tt,"extensions"),S.get(tt,"sticky")]);er===null&&(er=nv&&s!=="on"),this.#r.has("a11y")||(this.#l=Array.isArray(t)?t:[]),this.#r.has("extensions")||(this.#c={...tr(),...i??{}}),this.#r.has("sticky")||(this.#b=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}#y(t){return t==="flush"?"flush":t==="elevated"?"elevated":"default"}#x(t,i){return t?i==="flush"?"flush":i==="elevated"?"elevated":"default":""}#g(t){if(!t)return"card";let i=t.split(/\s+/);for(let s of i)if(s==="stretch"||s==="integrated")return s;return"card"}#S(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=av,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.#k(),this.appendChild(this.#e)}#k(){let{mode:t,brand:i,fluid:s,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:l,pageBgGradDir:u}=_.getState(),d=[...this.#l],h={...this.#c},f=Zt.load(),p=this.#d(s),m=this.#m(s),b=this.#E(n),g=this.#y(n),A=this.#o,y=L=>this.#p(L),$=(L,N,V,me,et,qt={})=>`
288
288
  <fieldset data-segmented>
289
289
  <legend class="visually-hidden">${N}</legend>
290
290
  ${V.map(ot=>`